[EFL][WK2] Use the port independent PageViewportController
https://bugs.webkit.org/show_bug.cgi?id=99850

Patch by Yael Aharon <yael.aharon@intel.com> on 2012-10-23
Reviewed by Kenneth Rohde Christiansen.

Take PageViewportController into use, and rely on it to calculate
scroll position and zoom level.
With this patch, we can do intra page navigation and use the scrollwheel
to scroll, when WTF_USE_TILED_BACKING_STORE and all related flags are enabled.

* CMakeLists.txt:
* UIProcess/API/efl/PageClientImpl.cpp:
(WebKit::PageClientImpl::didChangeViewportProperties):
(WebKit::PageClientImpl::pageDidRequestScroll):
(WebKit::PageClientImpl::didChangeContentsSize):
(WebKit):
(WebKit::PageClientImpl::didRenderFrame):
(WebKit::PageClientImpl::pageTransitionViewportReady):
* UIProcess/API/efl/PageClientImpl.h:
(WebKit):
(PageClientImpl):
(WebKit::PageClientImpl::setPageViewportController):
* UIProcess/API/efl/PageViewportControllerClientEfl.cpp:
(WebKit::PageViewportControllerClientEfl::PageViewportControllerClientEfl):
(WebKit::PageViewportControllerClientEfl::display):
(WebKit::PageViewportControllerClientEfl::updateViewportSize):
(WebKit::PageViewportControllerClientEfl::setVisibleContentsRect):
(WebKit::PageViewportControllerClientEfl::didChangeContentsSize):
(WebKit::PageViewportControllerClientEfl::setViewportPosition):
(WebKit::PageViewportControllerClientEfl::setContentsScale):
(WebKit::PageViewportControllerClientEfl::didResumeContent):
(WebKit::PageViewportControllerClientEfl::didChangeVisibleContents):
(WebKit::PageViewportControllerClientEfl::setController):
* UIProcess/API/efl/PageViewportControllerClientEfl.h:
(WebKit::PageViewportControllerClientEfl::scaleFactor):
(WebKit::PageViewportControllerClientEfl::scrollPosition):
(PageViewportControllerClientEfl):
* UIProcess/API/efl/ewk_view.cpp:
(Ewk_View_Private_Data):
(mapToWebContent):
(_ewk_view_smart_mouse_wheel):
(_ewk_view_smart_mouse_down):
(_ewk_view_smart_mouse_up):
(_ewk_view_smart_mouse_move):
(_ewk_view_initialize):
(ewk_view_load_committed):
(ewk_view_feed_touch_event):
* UIProcess/API/efl/ewk_view_private.h:
* UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp:
(WebKit::LayerTreeCoordinatorProxy::didRenderFrame):
* UIProcess/PageClient.h:
(PageClient):
* UIProcess/PageViewportController.cpp:
* UIProcess/PageViewportController.h:
* UIProcess/WebPageProxy.cpp:
(WebKit):
(WebKit::WebPageProxy::pageTransitionViewportReady):
(WebKit::WebPageProxy::didRenderFrame):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/efl/PageLoadClientEfl.cpp:
(WebKit):
(WebKit::PageLoadClientEfl::didCommitLoadForFrame):
(WebKit::PageLoadClientEfl::PageLoadClientEfl):
* UIProcess/efl/PageLoadClientEfl.h:
(PageLoadClientEfl):
* UIProcess/qt/WebPageProxyQt.cpp:
(WebKit):
(WebKit::WebPageProxy::setUserScripts):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCompletePageTransition):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Crash when adding a keyframes rule in the Styles pane
https://bugs.webkit.org/show_bug.cgi?id=99826

Reviewed by Pavel Feldman.

Source/WebCore:

The client-supplied selector text is first parsed to make sure it results in a valid style rule selector.

Test: inspector/styles/add-new-rule-invalid-selector.html

* inspector/InspectorStyleSheet.cpp:
(WebCore::createCSSParser):
(WebCore):
(WebCore::InspectorStyle::setPropertyText):
(WebCore::checkStyleRuleSelector):
(WebCore::InspectorStyleSheet::addRule):
(WebCore::InspectorStyleSheet::ensureSourceData):
(WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):

LayoutTests:

* inspector/styles/add-new-rule-invalid-selector-expected.txt: Added.
* inspector/styles/add-new-rule-invalid-selector.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Floated anchor element sometimes overlaps following content.
https://bugs.webkit.org/show_bug.cgi?id=100105

Reviewed by Pavel Feldman.

This patch ensures that each console message clears the
potentially-overlapping floated anchor element.

* inspector/front-end/inspector.css:
(#console-prompt):
(.console-message, .console-user-command):
    Clear the float, and flip the border from the bottom of the
    message to the top. Do the same for the prompt.
(.console-message:first-child):
    Ensure that the first message doesn't have a top border.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132230 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: Web Inspector: 'data:' URLs should be properly trimmed for readability.
https://bugs.webkit.org/show_bug.cgi?id=100083

Reviewed by Pavel Feldman.

We recently landed a patch to trim the middle out of long URLs in
console messages in order to improve readability. That patch didn't
effect 'data:' URLs, as they didn't match the regex in the linkifier.
This patch ensures that 'data:' URLs are properly trimmed down to
size.

This problem came to light while resolving a different, smaller issue:
'image/jpg' wasn't whitelisted as an image MIME type. That trivial fix
is included in this patch.

Test: http/tests/inspector/network/image-as-text-loading-data-url.html

* inspector/front-end/NetworkManager.js:
(WebInspector.NetworkManager):
    Adds 'image/jpg' as a valid image type.
* inspector/front-end/ResourceUtils.js:
(WebInspector.linkifyStringAsFragmentWithCustomLinkifier):
    Supports 'data:' URLs in the linkifier's regex.

LayoutTests: Web Inspector: MIME type errors should truncate long URLs.
https://bugs.webkit.org/show_bug.cgi?id=100083

Reviewed by Pavel Feldman.

* http/tests/inspector/network/image-as-text-loading-data-url-expected.txt: Added.
* http/tests/inspector/network/image-as-text-loading-data-url.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132231 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Texmap] Fix drawTextureRectangleARB after r131485.
https://bugs.webkit.org/show_bug.cgi?id=100133

Consistently rename u_textureSize to u_samplerSize.

Reviewed by Noam Rosenthal.

* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::drawTextureRectangleARB):
* platform/graphics/texmap/TextureMapperShaderManager.cpp:
(WebCore::getShaderSpec):
* platform/graphics/texmap/TextureMapperShaderManager.h:
(TextureMapperShaderProgram):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unnecessary m_layoutDelta[XY]Saturated initialization
https://bugs.webkit.org/show_bug.cgi?id=100018

Reviewed by Julien Chaffraix.
        
Remove unnecessary initialization from LayoutState constructor
added in r132105.

No new tests, no change in functionality.

* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132233 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Move UISourceCode creation out of mappings to workspace.
https://bugs.webkit.org/show_bug.cgi?id=100092

Reviewed by Pavel Feldman.

Source/WebCore:

Moved uiSourceCode constructor calls out of mappings to workspace.

* inspector/front-end/CompilerScriptMapping.js:
* inspector/front-end/NetworkUISourceCodeProvider.js:
(WebInspector.NetworkUISourceCodeProvider.prototype._parsedScriptSource):
(WebInspector.NetworkUISourceCodeProvider.prototype._addUISourceCode):
* inspector/front-end/ResourceScriptMapping.js:
(WebInspector.ResourceScriptMapping.prototype._deleteOriginalUISourceCodeForScripts):
(WebInspector.ResourceScriptMapping.prototype._deleteTemporaryUISourceCodeForScripts):
(WebInspector.ResourceScriptMapping.prototype._bindUISourceCodeToScripts):
(WebInspector.ResourceScriptMapping.prototype._createUISourceCode):
(WebInspector.ResourceScriptMapping.prototype._getOrCreateTemporaryUISourceCode):
(WebInspector.ResourceScriptMapping.prototype._getOrCreateOriginalUISourceCode):
* inspector/front-end/SASSSourceMapping.js:
(_bindUISourceCode):
* inspector/front-end/ScriptSnippetModel.js:
(WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
(WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript):
* inspector/front-end/Workspace.js:
(WebInspector.Project.prototype.addUISourceCode):
(WebInspector.Project.prototype.removeUISourceCode):
(WebInspector.Workspace.prototype.addTemporaryUISourceCode):
(WebInspector.Workspace.prototype.removeTemporaryUISourceCode):

LayoutTests:

* http/tests/inspector/workspace-test.js:
(initialize_WorkspaceTest.InspectorTest.addMockUISourceCodeToWorkspace):
* inspector/debugger/resource-script-mapping-expected.txt:
* inspector/debugger/scripts-panel.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132234 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] Add preference for enabling scroll animators
https://bugs.webkit.org/show_bug.cgi?id=100124

Reviewed by Jocelyn Turcotte.

Expose the ScollAnimatorEnabled setting in QWebPreferences.

* UIProcess/API/qt/qwebpreferences.cpp:
(QWebPreferencesPrivate::testAttribute):
(QWebPreferencesPrivate::setAttribute):
(QWebPreferences::scrollAnimatorEnabled):
(QWebPreferences::setScrollAnimatorEnabled):
* UIProcess/API/qt/qwebpreferences_p.h:
* UIProcess/API/qt/qwebpreferences_p_p.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132235 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed GTK gardening.

Adding failure expectation for fast/media/mq-resolution.html, it relies
on the Resolution Media Query feature being enabled.
Adding a proper bug modifier for fast/files/workers/worker-apply-blob-url-to-xhr.html.

* platform/gtk/TestExpectations:


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