[Qt][WK2] Add the animations on the ViewportInteractionEngine
https://bugs.webkit.org/show_bug.cgi?id=66664

Reviewed by Kenneth Rohde Christiansen.

Introduce a QScroller based panning and a QVariantAnimation based scale animation.
QScroller also handles flick gestures and animates overshoot.
If a pinch gesture ends, the scale animation will scale and reposition the content
such that it is within valid boundaries. The content is by default animated such
that the content position as seen in the center of the visible viewport stays
in the center, unless the content would be out of valid bounds.
The patch also simplifies the ViewportUpdateGuard by using reference counting
instead of a boolean for defering update requests.

* UIProcess/qt/QtPanGestureRecognizer.cpp:
(WebKit::QtPanGestureRecognizer::recognize):
* UIProcess/qt/QtPanGestureRecognizer.h:
* UIProcess/qt/QtPinchGestureRecognizer.cpp:
(WebKit::QtPinchGestureRecognizer::recognize):
* UIProcess/qt/QtTouchWebPageProxy.cpp:
(QtTouchWebPageProxy::doneWithTouchEvent):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::bindToScaleLimits):
(WebKit::ViewportUpdateGuard::ViewportUpdateGuard):
(WebKit::ViewportUpdateGuard::~ViewportUpdateGuard):
(WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
(WebKit::QtViewportInteractionEngine::innerBoundedScale):
(WebKit::QtViewportInteractionEngine::outerBoundedScale):
(WebKit::QtViewportInteractionEngine::updateVisibleRect):
(WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged):
(WebKit::QtViewportInteractionEngine::event):
(WebKit::QtViewportInteractionEngine::stopAnimations):
(WebKit::QtViewportInteractionEngine::calculateBoundariesForScale):
(WebKit::QtViewportInteractionEngine::animateContentIntoBoundariesIfNeeded):
(WebKit::QtViewportInteractionEngine::reset):
(WebKit::QtViewportInteractionEngine::setConstraints):
(WebKit::QtViewportInteractionEngine::panGestureStarted):
(WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
(WebKit::QtViewportInteractionEngine::panGestureCancelled):
(WebKit::QtViewportInteractionEngine::panGestureEnded):
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):
(WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
(WebKit::QtViewportInteractionEngine::pinchGestureEnded):
(WebKit::QtViewportInteractionEngine::contentViewportChanged):
* UIProcess/qt/QtViewportInteractionEngine.h:
(WebKit::QtViewportInteractionEngine::scroller):
(WebKit::QtViewportInteractionEngine::ScaleAnimation::ScaleAnimation):
(WebKit::QtViewportInteractionEngine::ScaleAnimation::updateCurrentValue):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] Fix failing assertion on startup of MiniBrowser -touch.

Reviewed by Tor Arne Vestbø.

We're using QScroller since r98460, which requires QWidget/QApplication. So
use QApplication and QtWidgets for the time being.

* MiniBrowser/qt/MiniBrowser.pro:
* MiniBrowser/qt/MiniBrowserApplication.cpp:
(MiniBrowserApplication::MiniBrowserApplication):
(MiniBrowserApplication::notify):
* MiniBrowser/qt/MiniBrowserApplication.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98461 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ParallelJobs path of FEConvolveMatrix is erroneous
https://bugs.webkit.org/show_bug.cgi?id=70409

Reviewed by Zoltan Herczeg.

Covered by existing tests.

* platform/graphics/filters/FEConvolveMatrix.cpp:
(WebCore::FEConvolveMatrix::fastSetInteriorPixels):
Reject the silly idea that bytes per pixel ratio is 3 in preserveAlphaValues mode.
The bug was hidden so far because that computation has no effect when we are going
with the full inferior area in one round (in that case clipBottom and yEnd are equals
and the value of the expression is always 0). With ParallelJobs we process sub-areas
on each thread which has triggered the issue.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] inspector/extensions/extensions-console.html is failing
https://bugs.webkit.org/show_bug.cgi?id=70905

Unreviewed gardening. Skip failing test.

* platform/qt/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98463 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-10-26  Yury Semikhatsky  <yurys@chromium.org>

        Unreviewed, gardening. Mark editing/selection/designmode-no-caret.html as failing in debug mode.

        * platform/chromium/test_expectations.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98464 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Remove g_thread_init() calls from gtk-doc scanner too
https://bugs.webkit.org/show_bug.cgi?id=70908

Reviewed by Gustavo Noronha Silva.

Source/WebKit/gtk:

* docs/GNUmakefile.am:

Source/WebKit2:

* UIProcess/API/gtk/docs/GNUmakefile.am:

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

Skip failing tests temporarily because of missing Qt Mobility on the buildbot.

* platform/qt-arm/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98466 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-10-26  Pavel Feldman  <pfeldman@chromium.org>

        Not reviewed: fixing inspector extensions tests.

        * inspector/front-end/ConsoleMessage.js:
        (WebInspector.ConsoleMessageImpl):
        * inspector/front-end/ExtensionServer.js:
        (WebInspector.ExtensionServer.prototype._onAddConsoleMessage):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Canvas2D should rate-limit drawing to prevent swamping the GPU process.
https://bugs.webkit.org/show_bug.cgi?id=70367

Source/WebCore: 

Reviewed by James Robinson.

Sadly, we don't have infrastructure to test this kind of GPU swamping
yet.

* WebCore.gypi:
Add RateLimiter.* to the Chromium build.
* platform/graphics/chromium/Canvas2DLayerChromium.cpp:
(WebCore::Canvas2DLayerChromium::contentChanged):
When the layer is notified that the contents have changed, ping the
rate limiter.
* platform/graphics/chromium/Canvas2DLayerChromium.h:
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayerChromium::setContentsNeedsDisplay):
Call (new) virtual contentChanged() on a layer when its contents have
been changed (e.g., by a drawing call).
* platform/graphics/chromium/LayerChromium.h:
(WebCore::LayerChromium::contentChanged):
New virtual contentChanged().
* platform/graphics/chromium/RateLimiter.cpp: Added.
(WebCore::RateLimiter::create):
Rate limiter factory function.
(WebCore::RateLimiter::RateLimiter):
(WebCore::RateLimiter::start):
Public API to start rate limiting a context.
(WebCore::RateLimiter::stop):
Public API to stop rate limiting a context.
(WebCore::RateLimiter::rateLimitContext):
Internal timer callback when a context should be rate limited.
* platform/graphics/chromium/RateLimiter.h: Added.
* platform/graphics/chromium/WebGLLayerChromium.cpp:
(WebCore::WebGLLayerChromium::WebGLLayerChromium):
Remove rate limiting timer and extension check (moved to RateLimiter).
(WebCore::WebGLLayerChromium::contentChanged):
The function formerly known as setTextureUpdated(), now renamed to
match the base class virtual contentChanged().  Call rate limiter in
CCLayerTreeHost (local implementation removed).
(WebCore::WebGLLayerChromium::setContext):
When the context is changed, stop the pending rate limiter on the old
context.  Remove extension check (moved to RateLimiter).
* platform/graphics/chromium/WebGLLayerChromium.h:
Remove rate limiting timer and extension check (moved to RateLimiter).
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::startRateLimiter):
Public API for starting per-context rate limiter.
(WebCore::CCLayerTreeHost::stopRateLimiter):
Public API for stopping per-context rate limiter.
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
Implementation of per-GraphicsContext3D RateLimiter.

Source/WebKit/chromium: 

* src/GraphicsContext3DChromium.cpp:
(WebCore::GraphicsContext3DPrivate::markContextChanged):
Remove the call to setTextureChanged (it will be handled internally
by the compositor in setContextNeedsDisplay() instead).  This decouples
GraphicsContext3D from WebGLLayerChromium a bit.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98471 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Name viewport change event consistently.
https://bugs.webkit.org/show_bug.cgi?id=70901

Patch by Zalan Bujtas <zbujtas@gmail.com> on 2011-10-26
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Use ViewportPropertiesDidChange term consistently throughout WebKit.

No tests needed as the change is only method renaming.

* page/Chrome.cpp:
(WebCore::Chrome::dispatchViewportPropertiesDidChange):
* page/Chrome.h:
* page/ChromeClient.h:
(WebCore::ChromeClient::dispatchViewportPropertiesDidChange):
* page/Page.cpp:
(WebCore::Page::updateViewportArguments):

Source/WebKit/efl:

Use ViewportPropertiesDidChange term consistently throughout WebKit.

* WebCoreSupport/ChromeClientEfl.cpp:
(WebCore::ChromeClientEfl::dispatchViewportPropertiesDidChange):
* WebCoreSupport/ChromeClientEfl.h:

Source/WebKit/gtk:

Use ViewportPropertiesDidChange term consistently throughout WebKit.

* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::dispatchViewportPropertiesDidChange):
* WebCoreSupport/ChromeClientGtk.h:

Source/WebKit/qt:

Use ViewportPropertiesDidChange term consistently throughout WebKit.

* WebCoreSupport/ChromeClientQt.cpp:
(WebCore::ChromeClientQt::dispatchViewportPropertiesDidChange):
* WebCoreSupport/ChromeClientQt.h:

Source/WebKit2:

Use ViewportPropertiesDidChange term consistently throughout WebKit.

* UIProcess/API/efl/PageClientImpl.cpp:
(WebKit::PageClientImpl::didChangeViewportProperties):
* UIProcess/API/efl/PageClientImpl.h:
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::didChangeViewportProperties):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didChangeViewportProperties):
* UIProcess/API/qt/qdesktopwebview.cpp:
(QDesktopWebViewPrivate::didChangeViewportProperties):
* UIProcess/API/qt/qdesktopwebview_p.h:
* UIProcess/API/qt/qtouchwebview.cpp:
(QTouchWebViewPrivate::didChangeViewportProperties):
* UIProcess/API/qt/qtouchwebview_p.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeViewportProperties):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/qt/QtDesktopWebPageProxy.cpp:
(QtDesktopWebPageProxy::didChangeViewportProperties):
* UIProcess/qt/QtDesktopWebPageProxy.h:
* UIProcess/qt/QtTouchViewInterface.cpp:
(WebKit::QtTouchViewInterface::didChangeViewportProperties):
* UIProcess/qt/QtTouchViewInterface.h:
* UIProcess/qt/QtViewInterface.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::didChangeViewportProperties):
* UIProcess/qt/QtWebPageProxy.h:
* UIProcess/win/WebView.cpp:
(WebKit::WebView::didChangeViewportProperties):
* UIProcess/win/WebView.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
* WebProcess/WebCoreSupport/WebChromeClient.h:

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

[Qt][WK2] Crash with http/tests/websocket/tests/hixie76/long-invalid-header.html
https://bugs.webkit.org/show_bug.cgi?id=70917

[Qt][WK2] fast/events/drag-selects-image.html fails
https://bugs.webkit.org/show_bug.cgi?id=70907

[Qt][WK2] Metric mismatches (fast/text/justify-padding-distribution.html and svg/as-object/svg-embedded-in-html-in-iframe.html)
https://bugs.webkit.org/show_bug.cgi?id=70915

* platform/qt-wk2/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98473 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt][WK2] Rename clean-up of QtPinchGestureRecognizer and QtViewportInteractionEngine
https://bugs.webkit.org/show_bug.cgi?id=70903

Reviewed by Kenneth Rohde Christiansen.

Rename computeTouchCenter to computePinchCenter,
and use the plural form of coordinate where appropriate.

* UIProcess/API/qt/qtouchwebview.cpp:
(QTouchWebViewPrivate::_q_viewportUpdated):
* UIProcess/qt/QtPinchGestureRecognizer.cpp:
(WebKit::computePinchCenter):
(WebKit::QtPinchGestureRecognizer::recognize):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::contentRectInViewportCoordinates):
(WebKit::QtViewportInteractionEngine::event):
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):
(WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
(WebKit::QtViewportInteractionEngine::scaleContent):
* UIProcess/qt/QtViewportInteractionEngine.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-10-26  Yury Semikhatsky  <yurys@chromium.org>

        Unreviewed. Mark compositing/video/video-poster.html as timing out on Mac10.6 GPU.

        * platform/chromium/test_expectations.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-10-26  Pavel Feldman  <pfeldman@google.com>

        Not reviewed: follow up to 98236 - moved inspector settings initialization earlier to unbreak settings panel.

        * inspector/front-end/TextEditorModel.js:
        (WebInspector.TextEditorModel):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-10-26  Yury Semikhatsky  <yurys@chromium.org>

        Unreviewed. Revert change to test_expectations.txt due to test failures.

        * platform/chromium/test_expectations.txt:


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

[Qt][WK2] fast/css/font-face-descending-unicode-range.html fails
https://bugs.webkit.org/show_bug.cgi?id=70922
Skipped

[Qt][WK2] Metric mismatches (fast/text/justify-padding-distribution.html and svg/as-object/svg-embedded-in-html-in-iframe.html)
https://bugs.webkit.org/show_bug.cgi?id=70915
The svg test has correct pixel results so it's ok to add platform results.

* platform/qt-wk2/Skipped:
* platform/qt-wk2/svg/as-object/svg-embedded-in-html-in-iframe-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Properly suspend/resume Geolocation/DeviceMotion/DeviceOrientation objects
https://bugs.webkit.org/show_bug.cgi?id=70328

Reviewed by Simon Hausmann.

Also remove checks for m_client in DeviceMotionController as it can never be null.

No new tests, as the suspend/resume functionality is not fully working yet.

* dom/DeviceMotionController.cpp:
(WebCore::DeviceMotionController::timerFired):
(WebCore::DeviceMotionController::addListener):
(WebCore::DeviceMotionController::removeListener):
(WebCore::DeviceMotionController::removeAllListeners):
(WebCore::DeviceMotionController::suspend):
(WebCore::DeviceMotionController::resume):
* dom/DeviceMotionController.h:
* dom/DeviceOrientationController.cpp:
(WebCore::DeviceOrientationController::suspend):
(WebCore::DeviceOrientationController::resume):
* dom/DeviceOrientationController.h:
* dom/Document.cpp:
(WebCore::Document::suspendActiveDOMObjects):
(WebCore::Document::resumeActiveDOMObjects):
(WebCore::Document::stopActiveDOMObjects):
* dom/Document.h:
* dom/ScriptExecutionContext.h:
* page/GeolocationController.cpp:
(WebCore::GeolocationController::GeolocationController):
(WebCore::GeolocationController::removeObserver):
(WebCore::GeolocationController::suspend):
(WebCore::GeolocationController::resume):
* page/GeolocationController.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-10-26  Yury Semikhatsky  <yurys@chromium.org>

        Unreviewed. Mark compositing/video/video-poster.html as timing out on Mac10.6 CPU-CG.

        * platform/chromium/test_expectations.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-10-26  Nikolas Zimmermann  <nzimmermann@rim.com>

        CSS 2.1 failure: background-intrinsic-*
        https://bugs.webkit.org/show_bug.cgi?id=47156

        Reviewed by Antti Koivisto.

        Add all *intrinsic* tests from the CSS 2.1 Testsuite - we pass all of them now.
        All tests regarding SVG are now imported in LayoutTests, none are failing anymore.

        Add several new testcases covering the SVG Image size negotiation logic, as defined in CSS 2.1.

        * css2.1/20110323/background-intrinsic-001.htm: Added.
        * css2.1/20110323/background-intrinsic-002.htm: Added.
        * css2.1/20110323/background-intrinsic-003.htm: Added.
        * css2.1/20110323/background-intrinsic-004.htm: Added.
        * css2.1/20110323/background-intrinsic-005.htm: Added.
        * css2.1/20110323/background-intrinsic-006.htm: Added.
        * css2.1/20110323/background-intrinsic-007.htm: Added.
        * css2.1/20110323/background-intrinsic-008.htm: Added.
        * css2.1/20110323/background-intrinsic-009.htm: Added.
        * css2.1/20110323/resources/green-intrinsic-height-ratio.svg: Added.
        * css2.1/20110323/resources/green-intrinsic-height.svg: Added.
        * css2.1/20110323/resources/green-intrinsic-none.svg: Added.
        * css2.1/20110323/resources/green-intrinsic-ratio-landscape.svg: Added.
        * css2.1/20110323/resources/green-intrinsic-ratio-portrait.svg: Added.
        * css2.1/20110323/resources/green-intrinsic-width-height.svg: Added.
        * css2.1/20110323/resources/green-intrinsic-width-pc-height-pc.svg: Added.
        * css2.1/20110323/resources/green-intrinsic-width-ratio.svg: Added.
        * css2.1/20110323/resources/green-intrinsic-width.svg: Added.
        * css2.1/20110323/resources/red-intrinsic-height-ratio.svg: Added.
        * css2.1/20110323/resources/red-intrinsic-height.svg: Added.
        * css2.1/20110323/resources/red-intrinsic-none.svg: Added.
        * css2.1/20110323/resources/red-intrinsic-ratio-landscape.svg: Added.
        * css2.1/20110323/resources/red-intrinsic-ratio-portrait.svg: Added.
        * css2.1/20110323/resources/red-intrinsic-width-height.svg: Added.
        * css2.1/20110323/resources/red-intrinsic-width-pc-height-pc.svg: Added.
        * css2.1/20110323/resources/red-intrinsic-width-ratio.svg: Added.
        * css2.1/20110323/resources/red-intrinsic-width.svg: Added.
        * fast/backgrounds/size/contain-and-cover-zoomed.html: Added.
        * fast/images/percent-height-image-expected.txt: Update results, testcase is fixed now.
        * fast/images/percent-height-image.html: Make test async, to make it work cross-browser. With this patch we now pass this testcase.
        * platform/mac-snowleopard/svg/zoom/page/relative-sized-document-scrollbars-expected.png: Removed.
        * platform/mac-snowleopard/svg/zoom/page/zoom-foreignObject-expected.png: Removed.
        * platform/mac/css1/text_properties/vertical_align-expected.txt: Update for rounding differences.
        * platform/mac/css2.1/20110323/background-intrinsic-001-expected.png: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-001-expected.txt: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-002-expected.png: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-002-expected.txt: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-003-expected.png: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-003-expected.txt: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-004-expected.png: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-004-expected.txt: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-005-expected.png: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-005-expected.txt: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-006-expected.png: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-006-expected.txt: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-007-expected.png: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-007-expected.txt: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-008-expected.png: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-008-expected.txt: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-009-expected.png: Added.
        * platform/mac/css2.1/20110323/background-intrinsic-009-expected.txt: Added.
        * platform/mac/fast/backgrounds/size/contain-and-cover-expected.png: Updated for rounding differences.
        * platform/mac/fast/backgrounds/size/contain-and-cover-zoomed-expected.png: Added.
        * platform/mac/fast/backgrounds/size/contain-and-cover-zoomed-expected.txt: Added.
        * platform/mac/fast/block/float/015-expected.png: Slight changes, due 49x50 -> 50x50 size change.
        * platform/mac/fast/block/float/015-expected.txt: Ditto.
        * platform/mac/fast/block/positioning/replaced-inside-fixed-top-bottom-expected.png: Slight changes due to rounding.
        * platform/mac/fast/block/positioning/replaced-inside-fixed-top-bottom-expected.txt: Ditto.
        * platform/mac/fast/repaint/block-layout-inline-children-replaced-expected.png: Ditto.
        * platform/mac/fast/repaint/block-layout-inline-children-replaced-expected.txt: Ditto.
        * platform/mac/svg/as-background-image/background-image-preserveaspectRatio-support-expected.png: Added.
        * platform/mac/svg/as-background-image/background-image-preserveaspectRatio-support-expected.txt: Added.
        * platform/mac/svg/as-background-image/background-image-tiled-expected.png: Added.
        * platform/mac/svg/as-background-image/background-image-tiled-expected.txt: Added.
        * platform/mac/svg/as-background-image/same-image-two-instances-background-image-expected.png: Added.
        * platform/mac/svg/as-background-image/same-image-two-instances-background-image-expected.txt: Added.
        * platform/mac/svg/as-background-image/svg-as-background-4-expected.png: Adapt to preserveAspectRatio changes in hearts.svg.
        * platform/mac/svg/as-border-image/svg-as-border-image-expected.png: This needed a rebaseline, it was forgotten before.
        * platform/mac/svg/as-image/animated-svg-as-image-expected.png: Progression, now both images share the same size & ratio, as desired.
        * platform/mac/svg/as-image/img-preserveAspectRatio-support-1-expected.png: Added.
        * platform/mac/svg/as-image/img-preserveAspectRatio-support-1-expected.txt: Added.
        * platform/mac/svg/as-image/same-image-two-instances-expected.png: Added.
        * platform/mac/svg/as-image/same-image-two-instances-expected.txt: Added.
        * platform/mac/svg/as-image/svg-as-relative-image-expected.png: Adapt to green-relative-size-rect.svg - a circle got added to make it easier to compare.
        * platform/mac/svg/as-image/svg-as-relative-image-with-explicit-size-expected.png: Added.
        * platform/mac/svg/as-image/svg-as-relative-image-with-explicit-size-expected.txt: Added.
        * platform/mac/svg/as-image/svg-image-change-content-size-expected.png: Added.
        * platform/mac/svg/as-image/svg-image-change-content-size-expected.txt: Added.
        * platform/mac/svg/zoom/page/relative-sized-document-scrollbars-expected.png: Updated, scrollbars are gone - now matching Opera/FF.
        * platform/mac/svg/zoom/page/relative-sized-document-scrollbars-expected.txt: Ditto.
        * platform/mac/svg/zoom/page/zoom-background-image-tiled-expected.png: Added.
        * platform/mac/svg/zoom/page/zoom-background-image-tiled-expected.txt: Added.
        * platform/mac/svg/zoom/page/zoom-background-images-expected.png: Added.
        * platform/mac/svg/zoom/page/zoom-background-images-expected.txt: Added.
        * platform/mac/svg/zoom/page/zoom-foreignObject-expected.png: Updated, scrollbars are gone - now matching Opera/FF.
        * platform/mac/svg/zoom/page/zoom-foreignObject-expected.txt: Ditto.
        * platform/mac/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png: Added.
        * platform/mac/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.txt: Added.
        * platform/mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-and-viewBox-expected.png: Added.
        * platform/mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-and-viewBox-expected.txt: Added.
        * platform/mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-expected.png: Added.
        * platform/mac/svg/zoom/page/zoom-svg-as-background-with-relative-size-expected.txt: Added.
        * svg/as-background-image/background-image-preserveaspectRatio-support.html: Added.
        * svg/as-background-image/background-image-tiled.html: Added.
        * svg/as-background-image/resources/construction-tape.svg: Added.
        * svg/as-background-image/resources/hearts.svg: Fix testcase, by adding pAR="none", which is now respected. Now the image looks as desired across Opera/FF and us.
        * svg/as-background-image/same-image-two-instances-background-image.html: Added.
        * svg/as-image/img-preserveAspectRatio-support-1.html: Added.
        * svg/as-image/resources/circle-default-meet.svg: Added.
        * svg/as-image/resources/circle-default-none.svg: Added.
        * svg/as-image/resources/circle-default-slice.svg: Added.
        * svg/as-image/resources/circle-nosize.svg: Added.
        * svg/as-image/resources/circle-viewbox-default.svg: Added.
        * svg/as-image/resources/circle-viewbox-meet.svg: Added.
        * svg/as-image/resources/circle-viewbox-none.svg: Added.
        * svg/as-image/resources/circle-viewbox-slice.svg: Added.
        * svg/as-image/resources/green-relative-size-rect.svg: Use relative units everywhere as intended. Add circle to make it easy to spot ratio changes.
        * svg/as-image/same-image-two-instances.html: Added.
        * svg/as-image/svg-as-relative-image-with-explicit-size.html: Added.
        * svg/as-image/svg-image-change-content-size.xhtml: Added.
        * svg/zoom/page/resources/relative-sized-background-with-viewBox.svg: Added.
        * svg/zoom/page/zoom-background-image-tiled.html: Added.
        * svg/zoom/page/zoom-background-images.html: Added.
        * svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html: Added.
        * svg/zoom/page/zoom-svg-as-background-with-relative-size-and-viewBox.html: Added.
        * svg/zoom/page/zoom-svg-as-background-with-relative-size.html: Added.

2011-10-26  Nikolas Zimmermann  <nzimmermann@rim.com>

        CSS 2.1 failure: background-intrinsic-*
        https://bugs.webkit.org/show_bug.cgi?id=47156

        SVGs do not work as tiled background images
        https://bugs.webkit.org/show_bug.cgi?id=16281

        Apply preserveAspectRatio and synthesize viewboxes in <img>
        https://bugs.webkit.org/show_bug.cgi?id=34521

        SVG background doesn't resize properly when dimensions are changed
        https://bugs.webkit.org/show_bug.cgi?id=42944

        Images with percent height inside a floated div should use intrinsic height.
        https://bugs.webkit.org/show_bug.cgi?id=45439

        SVG image in HTML changes size as the window is resized
        https://bugs.webkit.org/show_bug.cgi?id=52045

        Reviewed by Antti Koivisto.

        Implement intrinsic sizing support for SVGImage (svg embedded through <html:img>/<svg:image>/background-image/border-image/...).
        This is demanded by CSS 2.1, and covered by new layout tests in LayoutTests/css2.1 and several new custom testcases.

        Tests: css2.1/20110323/background-intrinsic-001.htm
               css2.1/20110323/background-intrinsic-002.htm
               css2.1/20110323/background-intrinsic-003.htm
               css2.1/20110323/background-intrinsic-004.htm
               css2.1/20110323/background-intrinsic-005.htm
               css2.1/20110323/background-intrinsic-006.htm
               css2.1/20110323/background-intrinsic-007.htm
               css2.1/20110323/background-intrinsic-008.htm
               css2.1/20110323/background-intrinsic-009.htm
               svg/as-background-image/background-image-preserveaspectRatio-support.html (adapted from testcase from bug 34521)
               svg/as-background-image/background-image-tiled.html (reduction from bug 16281)
               svg/as-background-image/same-image-two-instances-background-image.html
               svg/as-image/img-preserveAspectRatio-support-1.html (reduction from bug 34521)
               svg/as-image/same-image-two-instances.html
               svg/as-image/svg-as-relative-image-with-explicit-size.html
               svg/as-image/svg-image-change-content-size.xhtml (reduction from bug 42944)
               svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html

        * loader/cache/CachedImage.cpp: Enable SVGImage <-> IntSize cache.
        (WebCore::CachedImage::lookupImageForSize): Use recently introduced ImageBySizeCache, to lookup an image for a certain size.
        (WebCore::CachedImage::lookupImageForRenderer): Lookup image by renderer, which first looks up a size for a renderer, then uses lookupImageForSize().
        (WebCore::createSVGImage): Refactored from createImage(), contains the SVGImage creation part only.
        (WebCore::CachedImage::lookupOrCreateImageForRenderer): Use recently introduced ImageBySizeCache, to dynamically create copies of m_image if needed.
        (WebCore::CachedImage::setContainerSizeForRenderer): For SVGImages, pass on container size handling to ImageBySizeCache.
        (WebCore::CachedImage::imageSizeForRenderer): Figure out the image size, respecting per-renderer overrides, for a certain renderer.
        (WebCore::CachedImage::computeIntrinsicDimensions): Remove unnecessary RenderObject parameter.
        (WebCore::CachedImage::addClientForRenderer): Special variant of addClient(), overriding the existing in CachedResource.
        (WebCore::CachedImage::removeClientForRenderer): Special variant of removeClient(), that also clears the image in the ImageBySizeCache.
        (WebCore::CachedImage::createImage): Refactor SVGImage creation into createSVGImage() free function, to be useable from lookupOrCreateImageForRenderer().
        * loader/cache/CachedImage.h: Expose removeClientForRenderer().
        * page/ChromeClient.h:
        (WebCore::ChromeClient::isSVGImageChromeClient): Used to identify whether a RenderSVGRoot is embedded through a SVGImage. Returns false, by default.
        * rendering/ImageBySizeCache.cpp:
        (WebCore::ImageBySizeCache::addClient): Assert the passed renderer is valid.
        (WebCore::ImageBySizeCache::removeClient): Ditto. Allow removeClient() to be called w/o prio addClient() usage.
        (WebCore::ImageBySizeCache::setClient): New helper function, that combines the usage of addClient/removeClient, for the use in CachedImage.
        (WebCore::ImageBySizeCache::imageForSize): Respect empty sizes, just return 0, instead of asserting.
        (WebCore::ImageBySizeCache::imageForRenderer): Added a helper that retrieves an image for a renderer, by lookup up its size and using imageForSize().
        * rendering/ImageBySizeCache.h: Expose setClient() & imageForRenderer().
        * rendering/RenderBoxModelObject.cpp: Implement CSS 2.1 intrinsic size negotiation for images.
        (WebCore::resolveWidthForRatio): New inline helper function used bz calculateImageIntrinsicDimensions.
        (WebCore::resolveHeightForRatio): Ditto.
        (WebCore::resolveAgainstIntrinsicWidthOrHeightAndRatio): Ditto.
        (WebCore::resolveAgainstIntrinsicRatio):  Ditto.
        (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions): New helper function, containing the main algorithm, which is a pure transcription of the spec.
        (WebCore::RenderBoxModelObject::calculateFillTileSize): Use new calculateImageIntrinsicDimensions() helper to figure out the intrinsic size.
        (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Propagate calculateFillTileSize() result to the image resource, via setContainerSizeForRenderer().
        (WebCore::RenderBoxModelObject::paintNinePieceImage): Use new calculateImageIntrinsicDimensions() helper to figure out the intrinsic size.
        * rendering/RenderBoxModelObject.h: Clarify some variable names, added calculateImageIntrinsicDimensions().
        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::RenderImage): Use IntSize(), instead of IntSize(0, 0).
        (WebCore::RenderImage::updateIntrinsicSizeIfNeeded): Refactored from imageDimensionsChanged().
        (WebCore::RenderImage::imageDimensionsChanged): Use updateIntrinsicSizeIfNeeded().
        (WebCore::RenderImage::computeReplacedLogicalWidth): Use RenderReplaced::computeReplacedLogicalWidth() exclusively. For this to work, the intrinsic size must be correct.
        (WebCore::RenderImage::computeIntrinsicRatioInformation): Default implementation for non-SVGImages.
        (WebCore::RenderImage::needsPreferredWidthsRecalculation): Return true, just like RenderPart, if embeddedContentBox is not null.
        (WebCore::RenderImage::embeddedContentBox): Returns the RenderSVGRoot* renderer of the embedded SVG, if possible.
        * rendering/RenderImage.h: Remove isLogicalWidth/HeightSpecified() / computeReplacedLogicalHeight() / calcAspectRatioLogicalWidth/Height().
        * rendering/RenderImageResource.cpp:
        (WebCore::RenderImageResource::setContainerSizeForRenderer): Pass around new "float containerZoomFactor" parameter.
        * rendering/RenderImageResourceStyleImage.cpp:
        (WebCore::RenderImageResourceStyleImage::image): embeddedContentBox() is now calling image() earlier than before. We now have to handle the case that the image is pending.
        (WebCore::RenderImageResourceStyleImage::setContainerSizeForRenderer): Pass zoom factor.
        * rendering/RenderImageResourceStyleImage.h:
        * rendering/RenderListMarker.cpp:
        (WebCore::RenderListMarker::computePreferredLogicalWidths): Pass effective zoom to setContainerSizeForRenderer().
        * rendering/RenderReplaced.cpp:
        (WebCore::RenderReplaced::computeIntrinsicLogicalWidth): Generalized this code, as RenderImage is using it as well now. Marginal changes needed.
        (WebCore::RenderReplaced::computeIntrinsicLogicalHeight): Ditto.
        (WebCore::RenderReplaced::computeReplacedLogicalWidth): Ditto.
        * rendering/style/StyleCachedImage.cpp:
        (WebCore::StyleCachedImage::computeIntrinsicDimensions): Stop passing m_renderer to CachedImage, it's no longer needed.
        (WebCore::StyleCachedImage::setContainerSizeForRenderer): Add "float containerZoomFactor" parameter.
        (WebCore::StyleCachedImage::addClient): Forward to new addClientForRenderer().
        (WebCore::StyleCachedImage::removeClient): Call new removeClientForRenderer() instead of removeClient(), so the ImageBySizeCache is also updated.
        * rendering/style/StyleCachedImage.h: Add "float containerZoomFactor" parameter to setContainerSizeForRenderer.
        * rendering/style/StyleGeneratedImage.h:
        (WebCore::StyleGeneratedImage::setContainerSizeForRenderer): Ditto.
        * rendering/style/StyleImage.h: Ditto.
        * rendering/style/StylePendingImage.h:
        (WebCore::StylePendingImage::setContainerSizeForRenderer): Ditto.
        * rendering/svg/RenderSVGImage.cpp:
        (WebCore::RenderSVGImage::layout): Always supply a container size when embedding SVGs in <svg:image>.
        * rendering/svg/RenderSVGRoot.cpp: Move "override container size" from SVGSVGElement into RenderSVGRoot, where it belongs.
        (WebCore::RenderSVGRoot::isEmbeddedThroughImageElement): Add helper method to determine whether we're loaded through SVGImage.
        (WebCore::RenderSVGRoot::computeReplacedLogicalWidth): If we have a valid container size, it has precendence (only supplied via external SVGImages).
        (WebCore::RenderSVGRoot::computeReplacedLogicalHeight): Ditto.
        (WebCore::RenderSVGRoot::layout): Remove calcViewport() usage, no need to track/override the viewport size anymore, all done in coputeReplacedLogical* now.
        (WebCore::RenderSVGRoot::paint): Use borderBoxRect() which now always matches the previously computed m_viewportSize. 
        (WebCore::RenderSVGRoot::computeRectForRepaint): Ditto.
        * rendering/svg/RenderSVGRoot.h: Move "override container size" from SVGSVGElement into RenderSVGRoot, where it belongs.
        (WebCore::RenderSVGRoot::containerSize):
        (WebCore::RenderSVGRoot::setContainerSize):
        * svg/SVGLength.cpp:
        (WebCore::SVGLength::determineViewport): Resolve lengths against override container size in documents embedded through SVGImage.
        * svg/SVGSVGElement.cpp: Remove "override container size" handling from SVGSVGElement.
        (WebCore::SVGSVGElement::SVGSVGElement): Ditto.
        (WebCore::SVGSVGElement::currentViewBoxRect): Always synthesize a viewBox, if we're embedded through SVGImage, as demanded by SVG 1.1 2nd Edition.
        * svg/SVGSVGElement.h:
        * svg/graphics/SVGImage.cpp:
        (WebCore::SVGImageChromeClient::setObserver): Helper function.
        (WebCore::SVGImageChromeClient::isSVGImageChromeClient): Return true, used to identify whether RenderSVGRoot is embedded through SVGImage.
        (WebCore::SVGImage::setContainerZoom): Forwarded to Page::setPageZoomFactor.
        (WebCore::SVGImage::setContainerSize): Assert that container size is not empty. We should never receive an empty container size.
        (WebCore::SVGImage::usesContainerSize): Adapt to override container size changes, it now lives in RenderSVGRoot instead of SVGSVGElement.
        (WebCore::SVGImage::size): New algorithm to figure out the size of an embedded SVG, as demanded by the CSS/SVG specs.
        (WebCore::SVGImage::draw): Stop calling layout() while painting!
        (WebCore::SVGImage::embeddedContentBox): Add helper which returns the RenderSVGRoot of the document.
        (WebCore::SVGImage::computeIntrinsicDimensions): Implement intrinsic ratio calculation. 
        (WebCore::SVGImage::dataChanged): Force calling FrameView::setCanHaveScrollbars(false), as SVG images now always synthesize a viewBox, and thus never receive scrollbars.
        * svg/graphics/SVGImage.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Inconsistent name of WebKitSettings macros
https://bugs.webkit.org/show_bug.cgi?id=70924

Reviewed by Martin Robinson.

Rename WEBKIT_TYPE_WEB_SETTINGS as WEBKIT_TYPE_SETTINGS and
WEBKIT_IS_WEB_SETTINGS as WEBKIT_IS_SETTINGS.

* UIProcess/API/gtk/WebKitSettings.cpp:
(webkit_settings_init):
(webkit_settings_new):
(webkit_settings_get_enable_javascript):
(webkit_settings_set_enable_javascript):
(webkit_settings_get_auto_load_images):
(webkit_settings_set_auto_load_images):
(webkit_settings_get_load_icons_ignoring_image_load_setting):
(webkit_settings_set_load_icons_ignoring_image_load_setting):
(webkit_settings_get_enable_offline_web_application_cache):
(webkit_settings_set_enable_offline_web_application_cache):
(webkit_settings_get_enable_html5_local_storage):
(webkit_settings_set_enable_html5_local_storage):
(webkit_settings_get_enable_html5_database):
(webkit_settings_set_enable_html5_database):
(webkit_settings_get_enable_xss_auditor):
(webkit_settings_set_enable_xss_auditor):
(webkit_settings_get_enable_frame_flattening):
(webkit_settings_set_enable_frame_flattening):
(webkit_settings_get_enable_plugins):
(webkit_settings_set_enable_plugins):
(webkit_settings_get_enable_java):
(webkit_settings_set_enable_java):
(webkit_settings_get_javascript_can_open_windows_automatically):
(webkit_settings_set_javascript_can_open_windows_automatically):
(webkit_settings_get_enable_hyperlink_auditing):
(webkit_settings_set_enable_hyperlink_auditing):
* UIProcess/API/gtk/WebKitSettings.h:

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