Title: [209447] trunk
Revision
209447
Author
[email protected]
Date
2016-12-06 21:14:28 -0800 (Tue, 06 Dec 2016)

Log Message

Two tiled drawing tests failing with visual viewports enabled.
https://bugs.webkit.org/show_bug.cgi?id=165489

Reviewed by Dean Jackson.
Source/WebCore:

computeLayoutViewportOrigin() gets called for iframes when the layout viewport
is zero-sized, but the visual viewport is non-zero. It doesn't really make sense
to compute a layout viewport when the visual viewport is larger than the layout
viewport, but if this happens just anchor the layout viewport at the origin
of the visual viewport.

* page/FrameView.cpp:
(WebCore::FrameView::computeLayoutViewportOrigin):

LayoutTests:

Unfail and rebaseline.

* platform/mac-wk2/TestExpectations:
* tiled-drawing/scrolling/frames/coordinated-frame-expected.txt:
* tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (209446 => 209447)


--- trunk/LayoutTests/ChangeLog	2016-12-07 04:58:23 UTC (rev 209446)
+++ trunk/LayoutTests/ChangeLog	2016-12-07 05:14:28 UTC (rev 209447)
@@ -1,3 +1,16 @@
+2016-12-06  Simon Fraser  <[email protected]>
+
+        Two tiled drawing tests failing with visual viewports enabled.
+        https://bugs.webkit.org/show_bug.cgi?id=165489
+
+        Reviewed by Dean Jackson.
+        
+        Unfail and rebaseline.
+
+        * platform/mac-wk2/TestExpectations:
+        * tiled-drawing/scrolling/frames/coordinated-frame-expected.txt:
+        * tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt:
+
 2016-12-06  Wenson Hsieh  <[email protected]>
 
         After preventing a beforeinput event, an input event is fired when formatting rich text

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (209446 => 209447)


--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2016-12-07 04:58:23 UTC (rev 209446)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2016-12-07 05:14:28 UTC (rev 209447)
@@ -267,8 +267,6 @@
 webkit.org/b/148407 tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-horizontal.html [ Pass Failure ]
 webkit.org/b/148407 tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html [ Pass Failure ]
 webkit.org/b/165196 tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html [ Pass Failure ]
-webkit.org/b/165489 tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor.html [ Pass Failure ]
-webkit.org/b/165489 tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor.html [ Pass Failure ]
 
 webkit.org/b/148408 tiled-drawing/scrolling/root-overflow-with-mousewheel.html [ Pass Failure Timeout ]
 

Modified: trunk/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-expected.txt (209446 => 209447)


--- trunk/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-expected.txt	2016-12-07 04:58:23 UTC (rev 209446)
+++ trunk/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-expected.txt	2016-12-07 05:14:28 UTC (rev 209447)
@@ -10,7 +10,7 @@
     (Frame scrolling node
       (scrollable area size 485 300)
       (contents size 485 420)
-      (layout viewport at (500,300) size 485x300)
+      (layout viewport at (0,0) size 485x300)
       (min layout viewport origin (0,0))
       (max layout viewport origin (0,120))
       (children 1

Modified: trunk/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt (209446 => 209447)


--- trunk/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt	2016-12-07 04:58:23 UTC (rev 209446)
+++ trunk/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt	2016-12-07 05:14:28 UTC (rev 209447)
@@ -15,7 +15,7 @@
         (Frame scrolling node
           (scrollable area size 485 300)
           (contents size 485 420)
-          (layout viewport at (500,300) size 485x300)
+          (layout viewport at (0,0) size 485x300)
           (min layout viewport origin (0,0))
           (max layout viewport origin (0,120))
           (children 1

Modified: trunk/Source/WebCore/ChangeLog (209446 => 209447)


--- trunk/Source/WebCore/ChangeLog	2016-12-07 04:58:23 UTC (rev 209446)
+++ trunk/Source/WebCore/ChangeLog	2016-12-07 05:14:28 UTC (rev 209447)
@@ -1,3 +1,19 @@
+2016-12-06  Simon Fraser  <[email protected]>
+
+        Two tiled drawing tests failing with visual viewports enabled.
+        https://bugs.webkit.org/show_bug.cgi?id=165489
+
+        Reviewed by Dean Jackson.
+
+        computeLayoutViewportOrigin() gets called for iframes when the layout viewport
+        is zero-sized, but the visual viewport is non-zero. It doesn't really make sense
+        to compute a layout viewport when the visual viewport is larger than the layout
+        viewport, but if this happens just anchor the layout viewport at the origin
+        of the visual viewport.
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::computeLayoutViewportOrigin):
+
 2016-12-04  Darin Adler  <[email protected]>
 
         Remove various stray uses of WebCore::Dictionary

Modified: trunk/Source/WebCore/page/FrameView.cpp (209446 => 209447)


--- trunk/Source/WebCore/page/FrameView.cpp	2016-12-07 04:58:23 UTC (rev 209446)
+++ trunk/Source/WebCore/page/FrameView.cpp	2016-12-07 05:14:28 UTC (rev 209447)
@@ -1798,18 +1798,26 @@
 {
     LayoutPoint layoutViewportOrigin = layoutViewport.location();
 
-    if (visualViewport.x() < layoutViewport.x() || visualViewport.x() < stableLayoutViewportOriginMin.x())
+    if (visualViewport.width() > layoutViewport.width())
         layoutViewportOrigin.setX(visualViewport.x());
+    else {
+        if (visualViewport.x() < layoutViewport.x() || visualViewport.x() < stableLayoutViewportOriginMin.x())
+            layoutViewportOrigin.setX(visualViewport.x());
 
-    if (visualViewport.y() < layoutViewport.y() || visualViewport.y() < stableLayoutViewportOriginMin.y())
+        if (visualViewport.maxX() > layoutViewport.maxX() || (visualViewport.maxX() - layoutViewport.width()) > stableLayoutViewportOriginMax.x())
+            layoutViewportOrigin.setX(visualViewport.maxX() - layoutViewport.width());
+    }
+
+    if (visualViewport.height() > layoutViewport.height())
         layoutViewportOrigin.setY(visualViewport.y());
+    else {
+        if (visualViewport.y() < layoutViewport.y() || visualViewport.y() < stableLayoutViewportOriginMin.y())
+            layoutViewportOrigin.setY(visualViewport.y());
 
-    if (visualViewport.maxX() > layoutViewport.maxX() || (visualViewport.maxX() - layoutViewport.width()) > stableLayoutViewportOriginMax.x())
-        layoutViewportOrigin.setX(visualViewport.maxX() - layoutViewport.width());
+        if (visualViewport.maxY() > layoutViewport.maxY() || (visualViewport.maxY() - layoutViewport.height()) > stableLayoutViewportOriginMax.y())
+            layoutViewportOrigin.setY(visualViewport.maxY() - layoutViewport.height());
+    }
 
-    if (visualViewport.maxY() > layoutViewport.maxY() || (visualViewport.maxY() - layoutViewport.height()) > stableLayoutViewportOriginMax.y())
-        layoutViewportOrigin.setY(visualViewport.maxY() - layoutViewport.height());
-
     return layoutViewportOrigin;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to