[Qt] Port the Qt pixmap JS bindings to use the JSC C API
https://bugs.webkit.org/show_bug.cgi?id=94702

Reviewed by Kenneth Rohde Christiansen.

Based on patch by Noam Rosenthal.

The conversion uses a simple JSClassRef based binding and only a few
uses of private JSC API for the HTML element DOM bindings remain.

This is essentially used for wrapping QPixmap and QImage types in
JavaScript and the other way around, for retrieving the image data
out of a HTML image element when converting from JS/DOM to Qt.

* bridge/qt/qt_pixmapruntime.cpp:
(JSC::Bindings::copyPixels):
(JSC::Bindings::toPixmap):
(JSC::Bindings::toImage):
(JSC::Bindings::imageSizeForVariant):
(JSC::Bindings::getPixmapWidth):
(JSC::Bindings::getPixmapHeight):
(JSC::Bindings::assignToHTMLImageElement):
(JSC::Bindings::pixmapToImageData):
(JSC::Bindings::pixmapToDataUrl):
(JSC::Bindings::pixmapToString):
(JSC::Bindings::QtPixmapRuntime::toJS):
(JSC::Bindings::QtPixmapRuntime::toQt):
(JSC::Bindings::QtPixmapRuntime::canHandle):
(JSC::Bindings::QtPixmapRuntime::getClassRef):
* bridge/qt/qt_pixmapruntime.h:
(QtPixmapRuntime):
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::convertValueToQVariant):
(JSC::Bindings::convertQVariantToValue):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127440 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: NMI: cosmetic change, rename m_domMemoryUsage to m_memoryInstrumentation.
https://bugs.webkit.org/show_bug.cgi?id=95716

Also m_memoryInstrumentation became a reference to external object because it has other life time than domNodeVisitor.

Reviewed by Yury Semikhatsky.

* inspector/InspectorMemoryAgent.cpp:
(WebCore):
(WebCore::collectDomTreeInfo):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Drop default theme concept
https://bugs.webkit.org/show_bug.cgi?id=94778

Reviewed by Gyuyoung Kim.

Source/WebKit/efl:

* ewk/ewk_view.h:
Updated doxygen document not to mention default theme.

Source/WebKit2:

* PlatformEfl.cmake: Removed DEFAULT_THEME_PATH definitions.
* UIProcess/API/efl/ewk_view.cpp:
(_ewk_view_initialize): Removed default theme concept.
* UIProcess/API/efl/ewk_view.h:
Updated doxygen document not to mention default theme.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127444 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Add webplatform and browser to build info
https://bugs.webkit.org/show_bug.cgi?id=95715

Reviewed by George Staikos.

PR# 202102

* WebKitSupport/AboutData.cpp:
(BlackBerry::WebKit::buildPage):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127445 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Unreviewed gardening.

Removing http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-in-body.html
from skipped crashers section, after https://bugs.webkit.org/show_bug.cgi?id=94458#c14

* platform/efl/TestExpectations: Previously crashing test removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127447 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: new CPU Profiles are not shown after reattach
https://bugs.webkit.org/show_bug.cgi?id=95686

Reviewed by Vsevolod Vlasov.

* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::restore): set m_headersRequested flags
to true and clear all profiles on the front-end since there are no
collected profiles yet immediately after render process sitching.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: More directional control characters for debugging in inspector
https://bugs.webkit.org/show_bug.cgi?id=95696

Reviewed by Vsevolod Vlasov.

Source/WebCore:

Entities for text directionality-related characters added (LRE, RLE, LRO, RLO, PDF).

* inspector/front-end/ElementsTreeOutline.js:

LayoutTests:

* inspector/elements/elements-panel-structure-expected.txt:
* inspector/elements/elements-panel-structure.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127449 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] REGRESSION(r127321): It made 3 notification test timeout
https://bugs.webkit.org/show_bug.cgi?id=95638

Patch by Jon Lee <jonlee@apple.com> on 2012-09-04
Reviewed by Csaba Osztrogonác.

Dispatch show event instead of display after r127321.

* WebCoreSupport/NotificationPresenterClientQt.cpp:
(WebCore::NotificationPresenterClientQt::sendDisplayEvent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127450 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CMAKE] Update cmakeconfig.h.cmake
https://bugs.webkit.org/show_bug.cgi?id=95712

Patch by Jinwoo Song <jinwoo7.song@samsung.com> on 2012-09-04
Reviewed by Gyuyoung Kim.

Update feature definitions which are missing compared to WebKitFeatures.cmake

* Source/cmakeconfig.h.cmake:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [WebGL] Save gl.getError() status before taking a WebGL state snapshot and restore it afterwards
https://bugs.webkit.org/show_bug.cgi?id=95443

Patch by Andrey Adaikin <aandrey@chromium.org> on 2012-09-04
Reviewed by Vsevolod Vlasov.

Source/WebCore:

Save gl.getError() status before taking the GL snapshot and restore it afterwards.

* inspector/InjectedScriptWebGLModuleSource.js:
(.):

LayoutTests:

Adds a test to check that we properly save the WebGL getError() status while doing the instrumentation.

* inspector/profiler/webgl/webgl-profiler-get-error-expected.txt: Added.
* inspector/profiler/webgl/webgl-profiler-get-error.html: Added.
* inspector/profiler/webgl/webgl-profiler-test.js: Added.
(initialize_WebGLProfilerTest.InspectorTest.enableWebGLAgent):
(initialize_WebGLProfilerTest):
(createWebGLContext):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127452 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r127447.
http://trac.webkit.org/changeset/127447
https://bugs.webkit.org/show_bug.cgi?id=95726

Mistake, did not reliably pass yet. (Requested by drott on
#webkit).

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

* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127453 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Create JavaScriptSources based on network resources.
https://bugs.webkit.org/show_bug.cgi?id=95352

Reviewed by Pavel Feldman.

Source/WebCore:

Introduced NetworkUISourceCodeProvider that is listening for ResourceTreeModel and creates UISourceCodes for them.
RawSourceCode does not create uiSourceCodes based on resource anymore (this is done by NetworkUISourceCodeProvider instead).
Moved script <-> uiSourceCode binding logic from RawSourceCode to ResourceScriptMapping.
Removed rawSourceCode as it was not needed anymore.

Tests: inspector/debugger/network-uisourcecode-provider.html
       inspector/debugger/resource-script-mapping.html

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.py:
* inspector/front-end/CompilerScriptMapping.js:
* inspector/front-end/DebuggerModel.js:
(WebInspector.DebuggerDispatcher.prototype.scriptFailedToParse):
* inspector/front-end/JavaScriptSource.js:
(WebInspector.JavaScriptSource):
* inspector/front-end/NetworkUISourceCodeProvider.js: Renamed from Source/WebCore/inspector/front-end/StylesUISourceCodeProvider.js.
(WebInspector.NetworkUISourceCodeProvider):
(WebInspector.NetworkUISourceCodeProvider.prototype._populate):
(WebInspector.NetworkUISourceCodeProvider.prototype._styleResourceAdded):
(WebInspector.NetworkUISourceCodeProvider.prototype._scriptResourceAdded.resourceFinished):
(WebInspector.NetworkUISourceCodeProvider.prototype._scriptResourceAdded):
(WebInspector.NetworkUISourceCodeProvider.prototype._addJavaScriptSource):
(WebInspector.NetworkUISourceCodeProvider.prototype._addUISourceCode):
(WebInspector.NetworkUISourceCodeProvider.prototype._resourceAdded):
(WebInspector.NetworkUISourceCodeProvider.prototype._reset):
* inspector/front-end/RawSourceCode.js:
* inspector/front-end/ResourceScriptMapping.js:
(WebInspector.ResourceScriptMapping):
(WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation):
(WebInspector.ResourceScriptMapping.prototype._bindUISourceCodeToScripts):
(WebInspector.ResourceScriptMapping.prototype._scriptsForSourceURL):
(WebInspector.ResourceScriptMapping.prototype._addOrReplaceTemporaryUISourceCode.get var):
(WebInspector.ResourceScriptMapping.prototype._addOrReplaceTemporaryUISourceCode):
(WebInspector.ResourceScriptMapping.prototype.get _uiSourceCodeReplaced):
(WebInspector.ResourceScriptMapping.prototype._reset):
* inspector/front-end/ScriptSnippetModel.js:
(WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
(WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript):
(WebInspector.SnippetJavaScriptSource):
* inspector/front-end/UISourceCode.js:
(WebInspector.UISourceCode):
(WebInspector.UISourceCode.prototype.uiLocationToRawLocation):
(WebInspector.UISourceCode.prototype.setSourceMapping):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/Workspace.js: Drive-by: fixed duplicating uiSourceCodes in workspace.
* inspector/front-end/inspector.html:
* inspector/front-end/inspector.js:

LayoutTests:

Removed raw-source-code.html test as RawSourceCode was removed by this patch.
Added resource-script-mapping.html to test script <-> uiSourceCode binding behavior.
Added network-uisourcecode-provider.html to test uiSourceCode creation behavior.
Updated dynamic-script-tag.html to better match expected behavior.

* http/tests/inspector/network/network-request-revision-content.html:
* http/tests/inspector/workspace-test.js: Added.
(initialize_WorkspaceTest.InspectorTest.createWorkspace):
(initialize_WorkspaceTest.InspectorTest.waitForWorkspaceUISourceCodeReplacedEvent.uiSourceCodeReplaced):
(initialize_WorkspaceTest.InspectorTest.waitForWorkspaceUISourceCodeReplacedEvent):
(initialize_WorkspaceTest.InspectorTest.waitForWorkspaceUISourceCodeAddedEvent.uiSourceCodeAdded):
(initialize_WorkspaceTest.InspectorTest.waitForWorkspaceUISourceCodeAddedEvent):
(initialize_WorkspaceTest.InspectorTest.addMockUISourceCodeToWorkspace):
(initialize_WorkspaceTest.InspectorTest._defaultUISourceCodeProviderEventHandler):
(initialize_WorkspaceTest.InspectorTest.dumpUISourceCode.didRequestContent):
(initialize_WorkspaceTest.InspectorTest.dumpUISourceCode):
(initialize_WorkspaceTest):
* inspector/debugger/breakpoint-manager.html:
* inspector/debugger/dynamic-script-tag-expected.txt:
* inspector/debugger/dynamic-script-tag.html:
* inspector/debugger/network-uisourcecode-provider-expected.txt: Added.
* inspector/debugger/network-uisourcecode-provider.html: Added.
* inspector/debugger/raw-source-code-expected.txt: Removed.
* inspector/debugger/raw-source-code.html: Removed.
* inspector/debugger/resource-script-mapping-expected.txt: Added.
* inspector/debugger/resource-script-mapping.html: Added.
* inspector/debugger/scripts-panel.html:
* inspector/debugger/source-frame-count.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Fix build error in NetworkStateNotifierEfl.cpp
https://bugs.webkit.org/show_bug.cgi?id=95724

Unreviewed EFL build fix.

Make sure <sys/socket.h> is included before
<linux/netlink.h> to fix build errors on some
systems (e.g. Ubuntu 11.10).

No new tests, no behavior change.

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-09-04

* platform/network/efl/NetworkStateNotifierEfl.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127455 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed tests fix.

* http/tests/inspector/workspace-test.js:
* inspector/debugger/dynamic-script-tag-expected.txt:
* inspector/debugger/dynamic-script-tag.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127456 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow child-frame content in hit-tests.
https://bugs.webkit.org/show_bug.cgi?id=95204

.:

Reviewed by Antonio Gomes.

Update exported symbols.

* Source/autotools/symbols.filter:

Source/WebCore:

Reviewed by Antonio Gomes.

Refactors how EventHandler::hitTestResultAtPoint handles child-frame content,
it is now handled by the hit test itself controlled by the AllowChildFrameContent
flag in HitTestRequest.

Tests: fast/dom/nodesFromRect/nodesFromRect-child-frame-content.html
       touchadjustment/iframe-boundary.html

* WebCore.exp.in:
* WebCore.order:
* dom/Document.cpp:
(WebCore::Document::nodesFromRect):
* dom/Document.h:
(Document):
* page/EventHandler.cpp:
(WebCore::EventHandler::hitTestResultAtPoint):
* rendering/HitTestRequest.h:
(WebCore::HitTestRequest::allowChildFrameContent):
(WebCore::HitTestRequest::childFrameHitTest):
(WebCore::HitTestRequest::testChildFrameScrollBars):
* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::nodeAtPoint):
(WebCore):
* rendering/RenderFrameBase.h:
(RenderFrameBase):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hitTest):
* testing/Internals.cpp:
(WebCore::Internals::nodesFromRect):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:

Source/WebKit2:

Reviewed by Antonio Gomes.

Update symbols for the Windows build-system.

* win/WebKit2.def:
* win/WebKit2CFLite.def:

LayoutTests:

Reviewed by Antonio Gomes.
Touch-Adjustment test by Kevin Ellis

Two new tests for hit-testing child frame content. One for testing it as an option to
nodesFromRect, and one testing its improvement on touch adjustment on iframe boundaries.

* fast/dom/nodesFromRect/nodesFromRect-child-frame-content-expected.txt: Added.
* fast/dom/nodesFromRect/nodesFromRect-child-frame-content.html: Added.
* fast/dom/nodesFromRect/resources/child-frame.html: Added.
* fast/dom/nodesFromRect/resources/nodesFromRect.js:
(check):
(checkShadowContent):
(checkRect):
(nodesFromRectAsString):
* touchadjustment/iframe-boundary-expected.txt: Added.
* touchadjustment/iframe-boundary.html: Added.
* touchadjustment/resources/inner-content-page.html: Added.
* touchadjustment/resources/inner-navigation-frame.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127457 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [WebGL] Bugfix: wrong texture binding target in replay for 3D textures
https://bugs.webkit.org/show_bug.cgi?id=95687

Patch by Andrey Adaikin <aandrey@chromium.org> on 2012-09-04
Reviewed by Vsevolod Vlasov.

gl.bindTexture accepts either TEXTURE_2D or TEXTURE_CUBE_MAP targets, but we tried to replay with TEXTURE_CUBE_MAP_POSITIVE_X and others for 3D textures.

* inspector/InjectedScriptWebGLModuleSource.js:
(.):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127459 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Gardening of failing tests
https://bugs.webkit.org/show_bug.cgi?id=95725

Unreviewed gardening.

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-09-04

* platform/efl-wk2/TestExpectations:
* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Skip inspector WebGL tests where WebGL is disabled
https://bugs.webkit.org/show_bug.cgi?id=95733

Patch by Andrey Adaikin <aandrey@chromium.org> on 2012-09-04
Reviewed by Vsevolod Vlasov.

This is to update Skipped and TestExpectations files.

* platform/efl/TestExpectations:
* platform/win/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127461 268f45cc-cd09-0410-ab3c-d52691b4dbfc
.: [EFL] Context menu restore.
https://bugs.webkit.org/show_bug.cgi?id=74179

Patch by Michał Pakuła vel Rutka <m.pakula@samsung.com> on 2012-09-04
Reviewed by Gyuyoung Kim.

Adds context menu support for EFL port using non-CROSS_PLATFORM_CONTEXT_MENUS
approach, the same as used in WebKit2.

* Source/cmake/OptionsEfl.cmake: Turn on CONTEXT_MENUS flag for EFL port

Source/WebCore: [EFL] Context menu restore.
https://bugs.webkit.org/show_bug.cgi?id=74179

Patch by Michał Pakuła vel Rutka <m.pakula@samsung.com> on 2012-09-04
Reviewed by Gyuyoung Kim.

Adds context menu support for EFL port using non-CROSS_PLATFORM_CONTEXT_MENUS
approach, the same as used in WebKit2.

* PlatformEfl.cmake: Removed -DWTF_USE_CROSS_PLATFORM_CONTEXT_MENUS=1

Source/WebKit: [EFL] Context menu restore.
https://bugs.webkit.org/show_bug.cgi?id=74179

Patch by Michał Pakuła vel Rutka <m.pakula@samsung.com> on 2012-09-04
Reviewed by Gyuyoung Kim.

Adds context menu support for EFL port using non-CROSS_PLATFORM_CONTEXT_MENUS
approach, the same as used in WebKit2.

* PlatformEfl.cmake: Added ContextMenuClientEfl.cpp file to sources list.

Source/WebKit/efl: [EFL] Context menu restore.
https://bugs.webkit.org/show_bug.cgi?id=74179

Patch by Michał Pakuła vel Rutka <m.pakula@samsung.com> on 2012-09-04
Reviewed by Gyuyoung Kim.

Adds context menu support for EFL port using non-CROSS_PLATFORM_CONTEXT_MENUS
approach, the same as used in WebKit2.

* WebCoreSupport/ContextMenuClientEfl.cpp: Added.
(WebCore):
(WebCore::ContextMenuClientEfl::contextMenuDestroyed):
(WebCore::ContextMenuClientEfl::getCustomMenuFromDefaultItems):
(WebCore::ContextMenuClientEfl::contextMenuItemSelected):
(WebCore::ContextMenuClientEfl::downloadURL):
(WebCore::ContextMenuClientEfl::lookUpInDictionary):
(WebCore::ContextMenuClientEfl::speak):
(WebCore::ContextMenuClientEfl::isSpeaking):
(WebCore::ContextMenuClientEfl::stopSpeaking):
(WebCore::ContextMenuClientEfl::searchWithGoogle):
* WebCoreSupport/ContextMenuClientEfl.h: Added.
(WebCore):
(ContextMenuClientEfl):
* ewk/ewk_contextmenu.cpp: Removed ewk_context_menu_customize implementation.
(ewk_context_menu_destroy): Added freeing context menu.
(ewk_context_menu_new): Added filling ewk_contextmenu list.
(ewk_context_menu_item_append):
* ewk/ewk_contextmenu_private.h: Removed ewk_context_menu_customize and changed ewk_context_menu_new definition.
* ewk/ewk_view.cpp:
(_Ewk_View_Private_Data):
(_ewk_view_priv_new):
(_ewk_view_priv_del):
(ewk_view_context_menu_forward_event):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] CSS3 Media Queries functionality is broken
https://bugs.webkit.org/show_bug.cgi?id=95680

Patch by Alexander Shalamov <alexander.shalamov@intel.com> on 2012-09-04
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

In WK2, WebProcess doesn't have access to ewk_view evas object.
Methods that get screen rect or screen depth either return incorrect value or crash.
This patch removes dependency to ewk_view evas object and relies on ecore_x_* functions
to get screen rectangle or color depth of the screen.

* platform/efl/EflScreenUtilities.cpp: removed unused getPixelDepth method definition
* platform/efl/EflScreenUtilities.h: removed unsused getPixelDepth method declaration
(WebCore):
* platform/efl/PlatformScreenEfl.cpp:
(WebCore):
(WebCore::screenHorizontalDPI):
(WebCore::screenVerticalDPI):
(WebCore::screenDepth):
(WebCore::screenDepthPerComponent):
(WebCore::screenIsMonochrome):
(WebCore::screenRect):

LayoutTests:

Unskipped passing CSS3 Media Query tests.

* platform/efl-wk2/TestExpectations:

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