[EFL][GTK] Don't call deprecated g_type_init when glib => 2.35
https://bugs.webkit.org/show_bug.cgi?id=103209

Patch by Jussi Kukkonen <jussi.kukkonen@intel.com> on 2012-12-13
Reviewed by Kenneth Rohde Christiansen.

g_type_init() is deprecated from 2.35.0 onwards. Don't call it
in that case to avoid warnings and/or build failure.

Source/WebKit/efl:

* ewk/ewk_main.cpp:
(_ewk_init_body):

Source/WebKit2:

Also, remove a call to g_type_init() from WebProcessMainGtk():
It is not needed if gtk_init() is called.

* UIProcess/API/efl/ewk_main.cpp:
(ewk_init):
* WebProcess/efl/WebProcessMainEfl.cpp:
(WebKit::WebProcessMainEfl):
* WebProcess/gtk/WebProcessMainGtk.cpp:
(WebKit::WebProcessMainGtk):

Tools:

* DumpRenderTree/gtk/ImageDiff.cpp:
(main):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137588 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Native Memory Instrumentation: do not validate pointers to objects in RenderArena agains tcmalloc data.
https://bugs.webkit.org/show_bug.cgi?id=104903

Reviewed by Yury Semikhatsky.

This is a simplest approach to do that with zero performance overhead.

Source/WebCore:

* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::reportMemoryUsage):
* rendering/InlineBox.cpp:
(WebCore::InlineBox::reportMemoryUsage):
(WebCore):
* rendering/InlineBox.h:
(InlineBox):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::reportMemoryUsage):
(WebCore):
* rendering/InlineTextBox.h:
(InlineTextBox):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::reportMemoryUsage):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::reportMemoryUsage):

Source/WTF:

* wtf/MemoryInstrumentation.cpp:
(WTF::MemoryClassInfo::setCustomAllocation):
(WTF):
* wtf/MemoryInstrumentation.h:
(MemoryClassInfo):
* wtf/MemoryObjectInfo.h:
(WTF::MemoryObjectInfo::MemoryObjectInfo):
(WTF::MemoryObjectInfo::customAllocation):
(WTF::MemoryObjectInfo::setCustomAllocations):
(MemoryObjectInfo):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137589 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Doc: Fixing Qt WebKit reference documentation.

Patch by Jerome Pasion <jerome.pasion@digia.com> on 2012-12-13
Reviewed by Simon Hausmann.

Fixes:
-added \module for C++ classes and \qmlmodule for QML types
-added links to the Qt WebKit Examples pages
-fixed the qhp settings for Qt Creator

Task-number: QTBUG-28583
Task-number: QTBUG-28418
Task-number: QTBUG-27646

.:

* Source/qtwebkit.qdocconf:

Source/WebKit/qt:

* docs/qtwebkit.qdoc:

Source/WebKit2:

* UIProcess/API/qt/qquickwebview.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137590 268f45cc-cd09-0410-ab3c-d52691b4dbfc
OpenCL version of FEColorMatrix.
https://bugs.webkit.org/show_bug.cgi?id=103398

Patch by Tamas Czene <tczene@inf.u-szeged.hu> on 2012-12-13
Reviewed by Zoltan Herczeg.

~3x speed-up (depending on hardware configuration)

* Target.pri: Added a new file to the build system.
* platform/graphics/filters/FEColorMatrix.cpp: calculateSaturateComponents and calculateHueRotateComponents methodes are moved to the header, since they are used by OpenCL as well
(WebCore::effectType):
* platform/graphics/filters/FEColorMatrix.h:
(FEColorMatrix):
(WebCore::FEColorMatrix::calculateSaturateComponents):
(WebCore):
(WebCore::FEColorMatrix::calculateHueRotateComponents):
* platform/graphics/gpu/opencl/FilterContextOpenCL.h: Required fields for the ColorMatrix kernels were added
(WebCore::FilterContextOpenCL::FilterContextOpenCL):
(FilterContextOpenCL):
* platform/graphics/gpu/opencl/OpenCLFEColorMatrix.cpp: the core implementation goes here
(WebCore):
(WebCore::FilterContextOpenCL::compileFEColorMatrix):
(WebCore::FilterContextOpenCL::applyFEColorMatrix):
(WebCore::FEColorMatrix::platformApplyOpenCL):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137591 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r137512.
http://trac.webkit.org/changeset/137512
https://bugs.webkit.org/show_bug.cgi?id=104912

The entire GTK+ layout test step has been failing for hours
(Requested by mrobinson on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-12-13

Source/WebCore:

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::textUnderElement):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement):

LayoutTests:

* accessibility/button-title-uses-inner-img-alt-expected.txt: Removed.
* accessibility/button-title-uses-inner-img-alt.html: Removed.
* accessibility/focusable-div-expected.txt:
* accessibility/focusable-div.html:
* platform/chromium/TestExpectations:
* platform/chromium/accessibility/image-link-expected.txt:
* platform/mac/accessibility/image-link-expected.txt:
* platform/mac/accessibility/internal-link-anchors2-expected.txt:
* platform/mac/accessibility/static-text-role-uses-text-under-element-expected.txt:
* platform/mac/accessibility/static-text-role-uses-text-under-element.html:
* platform/mac/accessibility/table-with-aria-role-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Device pixel ratio lost upon relaunch of the web process
https://bugs.webkit.org/show_bug.cgi?id=104913

Reviewed by Simon Hausmann.

Use setIntrinsicDeviceScaleFactor instead of setCustomDeviceScaleFactor
when setting the device pixel ratio to make the setting permanent and
make sure it is set as part of the web process creation parameters.

* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_device_pixel_ratio_set):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: "Add Attribute" context menu on closing tag should apply on the opening tag on Elements Panel
https://bugs.webkit.org/show_bug.cgi?id=104902

Reviewed by Alexander Pavlov.

The context menu action on the closing tag scrolls to the opening tag for adding the attribute.

No new tests as this is a UI change.

* inspector/front-end/ElementsTreeOutline.js:
(WebInspector.ElementsTreeElement.prototype._populateTagContextMenu):
(WebInspector.ElementsTreeElement.prototype._addNewAttribute):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] API tests failing because Vibration API is using unsigned as duration since r137410
https://bugs.webkit.org/show_bug.cgi?id=104914

Reviewed by Kenneth Rohde Christiansen.

Update the tests to reflect the data type coming from WebCore.

* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(VibrationCbData):
(onVibrate):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137595 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Expose ARIA roles for tab, tabpanel and tablist
https://bugs.webkit.org/show_bug.cgi?id=84043

Patch by Joanmarie Diggs <jdiggs@igalia.com> on 2012-12-13
Reviewed by Martin Robinson.

Source/WebCore:

Mapped the ARIA roles to their corresponding ATK roles.

No new tests; instead unskipped the associated test.

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(atkRole): Mapped the ARIA roles to their corresponding ATK roles

LayoutTests:

Mapped the ARIA roles to the corresponding ATK roles and unskipped the
associated test. Also created the missing platform-specific expected
results.

* accessibility/aria-tab-roles-expected.txt: Added.
* platform/gtk/TestExpectations: Unskipped the associated test.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137596 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] Fix painting on Mac with retina display
https://bugs.webkit.org/show_bug.cgi?id=104574

Reviewed by Kenneth Rohde Christiansen.

Source/WebKit2:

Since HiDPI support has been added and enabled in Qt we ended up
painting incorrectly scaled content on high-resolution screens.
Because the intrinsic device pixel ratio is always taken into
account by Qt when painting to high-resolution screens we should
automatically obtain the scale ratio from the window in which the
item is rendered instead of setting it in QML.

Qt does not make it possible to override the device pixel ratio
of the native window, therefore our experimental QML API for setting
a custom value is of no use any more and should be removed.

This patch fixes the scaling issue on Mac retina display by querying
the underlying window for the device scale factor and applying it to
the backing store and the scene-graph rendering of the content node.
Additionally removes the experimental API and related API tests.

* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPage::updatePaintNode):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewLegacyPrivate::updateViewportSize):
(QQuickWebViewFlickablePrivate::onComponentComplete):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
(tst_QQuickWebView::newWebView):
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
(WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect):
(WebKit::CoordinatedLayerTreeHostProxy::deviceScaleFactor):
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
(CoordinatedLayerTreeHostProxy):
* UIProcess/qt/QtWebPageSGNode.cpp:
(WebKit::ContentsSGNode::ContentsSGNode):
(WebKit::ContentsSGNode::render):
(WebKit::ContentsSGNode::clipRect):
(ContentsSGNode):
(WebKit::QtWebPageSGNode::QtWebPageSGNode):
(WebKit::QtWebPageSGNode::devicePixelRatio):
(WebKit):
(WebKit::QtWebPageSGNode::setRenderer):
* UIProcess/qt/QtWebPageSGNode.h:
(QtWebPageSGNode):

Tools:

Remove setting the devicePixelRatio experimental property
since the value is now automatically picked up from Qt.

* MiniBrowser/qt/qml/BrowserWindow.qml:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Update the way we set the cookies policy
https://bugs.webkit.org/show_bug.cgi?id=104915

Reviewed by Kenneth Rohde Christiansen.

We are mistakenly assigning the cookie policy to the persistent storage
type which is not correct. This was caused by r137432 and is making
the unit tests fail.

* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebContext::platformInitializeWebProcess):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137598 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Loader_unittests should reset state between runs.
https://bugs.webkit.org/show_bug.cgi?id=104862

Reviewed by Dirk Pranke.

The loader_unittests were not resetting state between runs, leaving
a lot of data behind in global objects that the dashboard and tests
rely on.  A handful were resetting just a few objects.  Use the common
resetGlobals() method instead.

* TestResultServer/static-dashboards/loader_unittests.js:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137599 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Remove temporary workaround from GraphicsSurfaceGLX constructor.
https://bugs.webkit.org/show_bug.cgi?id=104904

QXcbNativeInterface::nativeResourceForContext() is now
available in Qt5. Therefore the temporary workaround
in GraphicsSurfaceGLX can be removed.

Reviewed by Kenneth Rohde Christiansen.

* platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
(WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137600 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Remove deprecated API usage
https://bugs.webkit.org/show_bug.cgi?id=104894

Patch by Claudio Saavedra <csaavedra@igalia.com> on 2012-12-13
Reviewed by Martin Robinson.

Remove deprecated GTK+ API usage.

* platform/gtk/RenderThemeGtk3.cpp:
(WebCore::spinButtonArrowSize): Do not use deprecated
gtk_style_context_get_font().

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137602 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CachedResources should hang on to stripped fragment identifiers
https://bugs.webkit.org/show_bug.cgi?id=104721

Reviewed by Maciej Stachowiak.

No new tests, this will be unused until bug
https://bugs.webkit.org/show_bug.cgi?id=49246 re-lands. Then, it will
allow http/tests/inspector/resource-parameters.html to continue passing.

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource):
(WebCore::CachedResource::load):
* loader/cache/CachedResource.h:
(CachedResource):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource): We override the request's url with the
    local variable "url" here. The only difference between url and request.url() is that url
    has had any fragment identifier removed. Do this work later (in the CachedResource constructor)
    so that the CachedResource can save the fragment for later.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137604 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Update the way we set the cookies policy
https://bugs.webkit.org/show_bug.cgi?id=104915

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-12-13
Reviewed by Kenneth Rohde Christiansen.

We are mistakenly assigning the cookie policy to the persistent storage
type which is not correct. This was caused by r137432 and is making
the unit tests fail.

* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebContext::platformInitializeWebProcess):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Duplicate code in GraphicsContext3D::validateAttributes() and GraphicsContext3D::validateDepthStencil()
https://bugs.webkit.org/show_bug.cgi?id=97275

Reviewed by Dean Jackson.

Remove duplicate code in validateAttributes(). validateAttributes() calls
validateDepthStencil() which has the exact same code.

No new tests because no change in functionality.

* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
(WebCore::GraphicsContext3D::validateAttributes):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137606 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Route main resource loads through the memory cache.
https://bugs.webkit.org/show_bug.cgi?id=49246

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Note that this patch doesn't actually enable caching of main resources. That will be done in a later patch.
The MainResourceLoader actually has an underlying SubresourceLoader (with the cache layer between them).
In several places, the MainResourceLoader's SubresourceLoader is treated as special.

No new tests, as this is primarily a refactor. A couple of expected results changed slightly.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::setRequest):
(WebCore::DocumentLoader::subresource):
(WebCore::DocumentLoader::addSubresourceLoader): Because the SubresourceLoader underlying the main resource
    needs special handling in certain cases, track it separately from the real SubresourceLoaders.
(WebCore::DocumentLoader::removeSubresourceLoader):
(WebCore::DocumentLoader::startLoadingMainResource):
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::MainResourceLoader):
(WebCore::MainResourceLoader::receivedError):
(WebCore::MainResourceLoader::cancel):
(WebCore::MainResourceLoader::clearResource):
(WebCore):
(WebCore::MainResourceLoader::frameLoader):
(WebCore::MainResourceLoader::request):
(WebCore::MainResourceLoader::continueAfterNavigationPolicy):
(WebCore::MainResourceLoader::resourceData):
(WebCore::MainResourceLoader::redirectReceived):
(WebCore::MainResourceLoader::willSendRequest):
(WebCore::MainResourceLoader::continueAfterContentPolicy):
(WebCore::MainResourceLoader::responseReceived):
(WebCore::MainResourceLoader::dataReceived):
(WebCore::MainResourceLoader::didFinishLoading):
(WebCore::MainResourceLoader::notifyFinished):
(WebCore::MainResourceLoader::reportMemoryUsage):
(WebCore::MainResourceLoader::handleSubstituteDataLoadNow):
(WebCore::MainResourceLoader::load):
(WebCore::MainResourceLoader::setDefersLoading):
(WebCore::MainResourceLoader::defersLoading):
(WebCore::MainResourceLoader::setShouldBufferData):
(WebCore::MainResourceLoader::loader):
(WebCore::MainResourceLoader::identifier):
* loader/MainResourceLoader.h:
(MainResourceLoader):
(WebCore::MainResourceLoader::documentLoader):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequest):
* loader/ResourceLoader.h:
(WebCore::ResourceLoader::defersLoading):
(WebCore::ResourceLoader::cancelled):
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::maybeLoadFallbackForMainResponse):
(WebCore::ApplicationCacheHost::maybeLoadFallbackForMainError):
* loader/mac/DocumentLoaderMac.cpp:
(WebCore::DocumentLoader::schedule):
(WebCore::DocumentLoader::unschedule):

LayoutTests:

* http/tests/misc/will-send-request-returns-null-on-redirect-expected.txt: The error code for loads cancelled
    by an embedder's willSendRequest() will show as standard load cancellations rather than as a content policy
    failure. This was an odd quirk of how MainResourceLoader::willSendRequest() was implemented (namely, doing a
    content policy check on ResourceRequests with empty urls).
* platform/chromium-linux/fast/replaced/border-radius-clip-content-edge-expected.png:
* platform/chromium/http/tests/misc/will-send-request-returns-null-on-redirect-expected.txt: The error code for loads cancelled
    by an embedder's willSendRequest() will show as standard load cancellations rather than as a content policy
    failure. This was an odd quirk of how MainResourceLoader::willSendRequest() was implemented (namely, doing a
    content policy check on ResourceRequests with empty urls).


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137607 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Update chromium expectatins for fonts/monospace.html

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137609 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        <rdar://problem/12870065> Frequent NetworkProcess crashes due to null connection when closing tabs
        https://bugs.webkit.org/show_bug.cgi?id=104922

        Reviewed by Anders Carlsson.

        Don't zero out connection pointers when a connection closes. There doesn't appear
        to be any reason to do this.

        Tested by hitting breakpoints in all relevant objects destructors to confirm that
        this doesn't introduce leaks.

        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
        (WebKit::NetworkConnectionToWebProcess::~NetworkConnectionToWebProcess):
        (WebKit::NetworkConnectionToWebProcess::didClose):
        * NetworkProcess/NetworkResourceLoader.cpp:
        (WebKit::NetworkResourceLoader::connectionToWebProcessDidClose):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@137610 268f45cc-cd09-0410-ab3c-d52691b4dbfc