Title: [160686] trunk/Source/WebKit2
Revision
160686
Author
[email protected]
Date
2013-12-16 18:16:07 -0800 (Mon, 16 Dec 2013)

Log Message

WebKit2 View Gestures: Pinching beyond the extremes doesn't animate back to the min/max
https://bugs.webkit.org/show_bug.cgi?id=125750

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
Remove some accidentally included commented out code.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (160685 => 160686)


--- trunk/Source/WebKit2/ChangeLog	2013-12-17 02:12:31 UTC (rev 160685)
+++ trunk/Source/WebKit2/ChangeLog	2013-12-17 02:16:07 UTC (rev 160686)
@@ -3,6 +3,15 @@
         WebKit2 View Gestures: Pinching beyond the extremes doesn't animate back to the min/max
         https://bugs.webkit.org/show_bug.cgi?id=125750
 
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+        (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
+        Remove some accidentally included commented out code.
+
+2013-12-16  Tim Horton  <[email protected]>
+
+        WebKit2 View Gestures: Pinching beyond the extremes doesn't animate back to the min/max
+        https://bugs.webkit.org/show_bug.cgi?id=125750
+
         Reviewed by Simon Fraser.
 
         When you let go of a pinch where you exceeded the maximum or minimum scale,

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (160685 => 160686)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2013-12-17 02:12:31 UTC (rev 160685)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2013-12-17 02:16:07 UTC (rev 160686)
@@ -751,35 +751,6 @@
     return animation;
 }
 
-/*static FloatPoint constrainZoomOriginForFrameView(double scale, FloatPoint origin, FrameView* frameView)
-{
-    // Scaling may have exposed the overhang area, so we need to constrain the final
-    // layer position exactly like scrolling will once it's committed, to ensure that
-    // scrolling doesn't make the view jump; this is borrowed from ScrollableArea.
-    FloatRect visibleContentRect = frameView->visibleContentRect(ScrollableArea::IncludeScrollbars);
-
-    FloatRect zoomContentRect = visibleContentRect;
-    zoomContentRect.moveBy(-origin);
-
-    FloatRect documentRect = frameView->renderView()->unscaledDocumentRect();
-    documentRect.scale(scale);
-    zoomContentRect.intersect(documentRect);
-
-    if (zoomContentRect.size() != visibleContentRect.size()) {
-        zoomContentRect.setSize(visibleContentRect.size());
-        zoomContentRect.intersect(documentRect);
-        if (zoomContentRect.width() < visibleContentRect.width())
-            zoomContentRect.move(-(visibleContentRect.width() - zoomContentRect.width()), 0);
-        if (zoomContentRect.height() < visibleContentRect.height())
-            zoomContentRect.move(0, -(visibleContentRect.height() - zoomContentRect.height()));
-    }
-
-    FloatPoint constrainedOrigin = zoomContentRect.location();
-    constrainedOrigin.moveBy(-visibleContentRect.location());
-
-    return -constrainedOrigin;
-}*/
-
 void TiledCoreAnimationDrawingArea::commitTransientZoom(double scale, FloatPoint origin)
 {
     FrameView* frameView = m_webPage->mainFrameView();
@@ -794,6 +765,9 @@
     IntRect documentRect = frameView->renderView()->unscaledDocumentRect();
     documentRect.scale(scale);
 
+    // Scaling may have exposed the overhang area, so we need to constrain the final
+    // layer position exactly like scrolling will once it's committed, to ensure that
+    // scrolling doesn't make the view jump.
     constrainedOrigin = ScrollableArea::constrainScrollPositionForOverhang(roundedIntRect(visibleContentRect), documentRect.size(), roundedIntPoint(constrainedOrigin), IntPoint(), 0, 0);
     constrainedOrigin.moveBy(-visibleContentRect.location());
     constrainedOrigin = -constrainedOrigin;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to