[Qt][WK2] Add the componentComplete method to WebView
https://bugs.webkit.org/show_bug.cgi?id=77111

Reviewed by Kenneth Rohde Christiansen.

Move the touch/desktop initialization to componentComplete.
Also return valid default values in the viewport info functions
if the interaction engine is not yet initialized because the
viewport info component could finish initialization earlier
than the WebView, which results in QML warnings during MiniBrowser
startup.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
(QQuickWebView::geometryChanged):
(QQuickWebView::componentComplete):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qwebviewportinfo.cpp:
(QWebViewportInfo::currentScale):
(QWebViewportInfo::devicePixelRatio):
(QWebViewportInfo::initialScale):
(QWebViewportInfo::minimumScale):
(QWebViewportInfo::maximumScale):
(QWebViewportInfo::isScalable):
(QWebViewportInfo::layoutSize):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106022 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] REGRESSION(102228): lot of test failures after enabled page cache
https://bugs.webkit.org/show_bug.cgi?id=73999

Reviewed by Kenneth Rohde Christiansen.

Those tests were failing because PageCache was enabled for WTR and they depend on
it being disable: they rely on onload being called after navigating back to a page.

WTR should run without PageCache enabled. This was fixed in r106005, so we can
unskip these now.

* platform/qt-wk2/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106023 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Unreviewed, rebaseline after http://trac.webkit.org/changeset/105613.


* platform/chromium-linux/svg/custom/relative-sized-image-expected.png: Added.
* platform/chromium-linux/svg/repaint/image-with-clip-path-expected.png: Added.
* platform/chromium-mac-snowleopard/svg/repaint/image-with-clip-path-expected.png: Added.
* platform/chromium-win/svg/custom/relative-sized-image-expected.png: Added.
* platform/chromium-win/svg/custom/relative-sized-image-expected.txt: Added.
* platform/chromium-win/svg/repaint/image-with-clip-path-expected.png: Added.
* platform/chromium/test_expectations.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106024 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Using strncmp() for comparing scheme and port numbers is inefficient
https://bugs.webkit.org/show_bug.cgi?id=75821

Reviewed by Darin Adler.

Replace the equal() function comparing 2 arbitrary strings by a template
comparing the string to an array, character by character.

This is only used for small strings: the schemes and the ports.

* platform/KURL.cpp:
(WebCore::equal):
(WebCore::isDefaultPortForScheme):
(WebCore::isNonFileHierarchicalScheme):
(WebCore::isCanonicalHostnameLowercaseForScheme):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106025 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use PlatformWheelEvent::phase() to determine if a scroll gesture begins or ends
https://bugs.webkit.org/show_bug.cgi?id=77127

Reviewed by Beth Dakin.

* platform/mac/ScrollAnimatorMac.h:
(ScrollAnimatorMac):
Remove handleGestureEvent.

* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::handleWheelEvent):
Look at the event phase to determine when to call didBeginGesture and didEndGesture.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106026 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Updating skipped tests after r105997.

Unreviewed gardening.

* platform/qt-4.8/Skipped:
* platform/qt-5.0/Skipped:
* platform/qt-wk2/Skipped:
* platform/qt/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106027 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] fast/loader tests failed after r94178
https://bugs.webkit.org/show_bug.cgi?id=67388

Patch by Luciano Wolf <luciano.wolf@openbossa.org> on 2012-01-26
Reviewed by Simon Hausmann.

Tools:

Applying the same fix used for Qt-WebKit1 from bug #67254 -
[Qt][DRT] Normalize file:///tmp/LayoutTests in LayoutTestController::pathToLocalResource()
https://bugs.webkit.org/show_bug.cgi?id=67254
Translate file:///tmp/LayoutTests/* urls into the repository LayoutTests directory, which is
derived from the running location of DumpRenderTree binary.

* WebKitTestRunner/InjectedBundle/qt/LayoutTestControllerQt.cpp:
(WTR::LayoutTestController::pathToLocalResource):

LayoutTests:

Removing the following tests from skipped list:
fast/loader/local-CSS-from-local.html
fast/loader/local-JavaScript-from-local.html
fast/loader/local-image-from-local.html

* platform/qt-wk2/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106028 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Signal to skia to force A8 text from LCD output, but only when we have to disable LCD because we're in a layer
https://bugs.webkit.org/show_bug.cgi?id=76547

Patch by Mike Reed <reed@google.com> on 2012-01-26
Reviewed by Stephen White.

Existing tests should confirm nothing is broken. Antialiased text
is disabled in layouttests, so they should be unaffected by the
difference in antialiasing quality.

* platform/graphics/skia/SkiaFontWin.cpp:
(WebCore::setupPaintForFont):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[JSC] Inspector instrumentation for JavaScript calls.
https://bugs.webkit.org/show_bug.cgi?id=40119

Reviewed by Geoffrey Garen.

Source/WebCore:

Covered by existing Chromium inspector tests

* bindings/js/JSCallbackData.cpp:
(WebCore::JSCallbackData::invokeCallback):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* bindings/js/JSMainThreadExecState.h:
(WebCore::JSMainThreadExecState::instrumentedCall):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willCallFunctionImpl):

LayoutTests:

* inspector/timeline/timeline-injected-script-eval-expected.txt: expectation is now valid cross-platform
* inspector/timeline/timeline-receive-response-event-expected.txt: ditto
* platform/chromium/inspector/timeline/timeline-injected-script-eval-expected.txt: Removed.
* platform/chromium/inspector/timeline/timeline-receive-response-event-expected.txt: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106030 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Simplify checking for whether we should rubberband or not when at the edge
https://bugs.webkit.org/show_bug.cgi?id=77131

Reviewed by Beth Dakin.

We only need to check once if we're pinned at either edge whether we should rubber-band
or not. Do this when the wheel event phase is PlatformWheelEventPhaseBegan. This lets us
remove a bunch of code that would keep track of the current horizontal scroll direction.

* platform/mac/ScrollAnimatorMac.h:
(ScrollAnimatorMac):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::handleWheelEvent):
(WebCore::ScrollAnimatorMac::beginScrollGesture):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
No need to set m_haveScrolledSincePageLoad in beginScrollGesture
https://bugs.webkit.org/show_bug.cgi?id=77132

Reviewed by Andreas Kling.

m_haveScrolledSincePageLoad is already set to true in handleWheelEvent so we don't need
to set it to true again.

* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::beginScrollGesture):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106032 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Inline beginScrollGesture/endScrollGesture in handleWheelEvent
https://bugs.webkit.org/show_bug.cgi?id=77133

Reviewed by Andreas Kling.

* platform/mac/ScrollAnimatorMac.h:
(ScrollAnimatorMac):
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::handleWheelEvent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Roll chromium_rev to 119248
https://bugs.webkit.org/show_bug.cgi?id=77124

Patch by John Bates <jbates@google.com> on 2012-01-26
Reviewed by James Robinson.

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106034 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Only store the SVN revision in the summarized results if we're on a builder
https://bugs.webkit.org/show_bug.cgi?id=76976

Reviewed by Dirk Pranke.

This shaves another ~130ms off the single test run-webkit-tests runtime.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(summarize_results):
* Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
(ResultSummaryTest.get_result):
(ResultSummaryTest):
(ResultSummaryTest.get_result_summary):
(ResultSummaryTest.get_unexpected_results):
(ResultSummaryTest.test_no_svn_revision):
(ResultSummaryTest.test_svn_revision):
* Scripts/webkitpy/layout_tests/port/base.py:
(Port.use_trac_links_in_results_html):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106035 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in SVGSVGElement::currentViewBoxRect.
https://bugs.webkit.org/show_bug.cgi?id=77121

Reviewed by Nikolas Zimmermann.

Source/WebCore:

Symbols shouldn't be rendered. Revert the ASSERT
from r105513 into a hard check.

Test: svg/custom/symbol-viewport-element-crash.svg

* svg/SVGLengthContext.cpp:
(WebCore::SVGLengthContext::determineViewport):

LayoutTests:

* svg/custom/symbol-viewport-element-crash-expected.txt: Added.
* svg/custom/symbol-viewport-element-crash.svg: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106036 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Get rid of ScrollElasticityController::endScrollGesture()
https://bugs.webkit.org/show_bug.cgi?id=77134

Reviewed by Adam Roben.

Just make ScrollElasticityController::handleWheelEvent call snapRubberBand if the wheel
event phase is PlatformWheelEventPhaseEnded.

* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::handleWheelEvent):
* platform/mac/ScrollElasticityController.h:
(ScrollElasticityController):
* platform/mac/ScrollElasticityController.mm:
(WebCore::ScrollElasticityController::handleWheelEvent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106037 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Parsing test_expecations.txt + Skipped lists takes too long
https://bugs.webkit.org/show_bug.cgi?id=77059

Reviewed by Dirk Pranke.

This saves ~100ms on the Apple Mac port.
-memoize a bunch of path methods.
-Avoid doing multiple disk accesses per line.
-Parse the skipped list directly instead of turning it into a test_expecations.txt
formatting string and parsing that.

* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectationParser):
(TestExpectationParser.parse_skipped_tests):
(TestExpectationParser._parse_line):
(TestExpectationParser._collect_matching_tests):
(TestExpectations.__init__):
(TestExpectations._add_skipped_tests):
* Scripts/webkitpy/layout_tests/port/base.py:
(Port):
(Port.test_isfile):
(Port.normalize_test_name):
(Port.layout_tests_dir):
(Port.abspath_for_test):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Get rid of ScrollElasticityController::beginScrollGesture()
https://bugs.webkit.org/show_bug.cgi?id=77138

Reviewed by Adam Roben.

ScrollElasticityController::handleWheelEvent now checks if the wheel event phase is
PlatformWheelEventPhaseBegan and sets up the gesture state if it is.

* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::handleWheelEvent):
* platform/mac/ScrollElasticityController.h:
(ScrollElasticityController):
* platform/mac/ScrollElasticityController.mm:
(WebCore::ScrollElasticityController::handleWheelEvent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r106027.
http://trac.webkit.org/changeset/106027
https://bugs.webkit.org/show_bug.cgi?id=77139

"It messed up Qt5 buildbots." (Requested by jeez_ on #webkit).

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

* platform/qt-4.8/Skipped:
* platform/qt-5.0/Skipped:
* platform/qt-wk2/Skipped:
* platform/qt/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
We shouldn't synchronously update styles on all documents after running script
https://bugs.webkit.org/show_bug.cgi?id=46761

Reviewed by Simon Fraser.

Currently we call Document::updateStyleForAllDocuments() after invoking any event or timeout handler. This is
slow since it iterates over the entire document tree and defeats our recalcStyle timer batching. It is
unnecessary as any code that depends on styles or the render tree being up to date must call
updateStyleIfNeeded() on the document it is accessing.

The first reference I can find to this code is in r798 in the file WebCore/khtml/xml/domnode_impl.cpp. It's been
cargo culted forward ever since.

* bindings/ScriptControllerBase.cpp:
(WebCore::ScriptController::executeScript):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::execute):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::ScriptController):
(WebCore::ScriptController::executeScriptInWorld):
* bindings/js/ScriptController.h:
* bindings/v8/ScheduledAction.cpp:
(WebCore::ScheduledAction::execute):
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::ScriptController):
* bindings/v8/ScriptController.h:
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::executeScript):
* inspector/InspectorClient.cpp:
(WebCore::InspectorClient::doDispatchMessageOnFrontendPage):

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