Title: [124288] trunk/Source/WebKit/chromium
Revision
124288
Author
[email protected]
Date
2012-07-31 19:55:55 -0700 (Tue, 31 Jul 2012)

Log Message

[chromium]Upstream WebViewImpl:StartPageScaleAnimation changes for Chrome for Android
https://bugs.webkit.org/show_bug.cgi?id=92698

Patch by Yusuf Ozuysal <[email protected]> on 2012-07-31
Reviewed by Adam Barth.

Enforce the maximum and minimum scroll positions after the scale has changed.

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::startPageScaleAnimation):
* src/WebViewImpl.h:
(WebViewImpl):

Modified Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (124287 => 124288)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-08-01 02:49:16 UTC (rev 124287)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-08-01 02:55:55 UTC (rev 124288)
@@ -1,3 +1,17 @@
+2012-07-31  Yusuf Ozuysal  <[email protected]>
+
+        [chromium]Upstream WebViewImpl:StartPageScaleAnimation changes for Chrome for Android
+        https://bugs.webkit.org/show_bug.cgi?id=92698
+
+        Reviewed by Adam Barth.
+
+        Enforce the maximum and minimum scroll positions after the scale has changed.
+
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::startPageScaleAnimation):
+        * src/WebViewImpl.h:
+        (WebViewImpl):
+
 2012-07-31  Terry Anderson  <[email protected]>
 
         [chromium] Use the event bounding box when constructing a PlatformEvent::GestureTap

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (124287 => 124288)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-08-01 02:49:16 UTC (rev 124287)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-08-01 02:55:55 UTC (rev 124288)
@@ -778,10 +778,21 @@
         m_layerTreeView.renderingStats(stats);
 }
 
-void WebViewImpl::startPageScaleAnimation(const IntPoint& scroll, bool useAnchor, float newScale, double durationInSeconds)
+void WebViewImpl::startPageScaleAnimation(const IntPoint& targetPosition, bool useAnchor, float newScale, double durationInSeconds)
 {
-    if (!m_layerTreeView.isNull())
-        m_layerTreeView.startPageScaleAnimation(scroll, useAnchor, newScale, durationInSeconds);
+    if (m_layerTreeView.isNull())
+        return;
+
+    IntPoint clampedPoint = targetPosition;
+    if (!useAnchor)
+        clampedPoint = clampOffsetAtScale(targetPosition, newScale);
+
+    if (!durationInSeconds && !useAnchor) {
+        setPageScaleFactor(newScale, clampedPoint);
+        return;
+    }
+
+    m_layerTreeView.startPageScaleAnimation(targetPosition, useAnchor, newScale, durationInSeconds);
 }
 #endif
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to