Changeset 209447 in webkit


Ignore:
Timestamp:
Dec 6, 2016, 9:14:28 PM (9 years ago)
Author:
Simon Fraser
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:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r209445 r209447  
     12016-12-06  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Two tiled drawing tests failing with visual viewports enabled.
     4        https://bugs.webkit.org/show_bug.cgi?id=165489
     5
     6        Reviewed by Dean Jackson.
     7       
     8        Unfail and rebaseline.
     9
     10        * platform/mac-wk2/TestExpectations:
     11        * tiled-drawing/scrolling/frames/coordinated-frame-expected.txt:
     12        * tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt:
     13
    1142016-12-06  Wenson Hsieh  <wenson_hsieh@apple.com>
    215
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r209419 r209447  
    268268webkit.org/b/148407 tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-mainframe-slow-vertical.html [ Pass Failure ]
    269269webkit.org/b/165196 tiled-drawing/scrolling/scroll-snap/scroll-snap-iframe.html [ Pass Failure ]
    270 webkit.org/b/165489 tiled-drawing/scrolling/frames/coordinated-frame-gain-scrolling-ancestor.html [ Pass Failure ]
    271 webkit.org/b/165489 tiled-drawing/scrolling/frames/coordinated-frame-lose-scrolling-ancestor.html [ Pass Failure ]
    272270
    273271webkit.org/b/148408 tiled-drawing/scrolling/root-overflow-with-mousewheel.html [ Pass Failure Timeout ]
  • trunk/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-expected.txt

    r209409 r209447  
    1111      (scrollable area size 485 300)
    1212      (contents size 485 420)
    13       (layout viewport at (500,300) size 485x300)
     13      (layout viewport at (0,0) size 485x300)
    1414      (min layout viewport origin (0,0))
    1515      (max layout viewport origin (0,120))
  • trunk/LayoutTests/tiled-drawing/scrolling/frames/coordinated-frame-in-fixed-expected.txt

    r209409 r209447  
    1616          (scrollable area size 485 300)
    1717          (contents size 485 420)
    18           (layout viewport at (500,300) size 485x300)
     18          (layout viewport at (0,0) size 485x300)
    1919          (min layout viewport origin (0,0))
    2020          (max layout viewport origin (0,120))
  • trunk/Source/WebCore/ChangeLog

    r209446 r209447  
     12016-12-06  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Two tiled drawing tests failing with visual viewports enabled.
     4        https://bugs.webkit.org/show_bug.cgi?id=165489
     5
     6        Reviewed by Dean Jackson.
     7
     8        computeLayoutViewportOrigin() gets called for iframes when the layout viewport
     9        is zero-sized, but the visual viewport is non-zero. It doesn't really make sense
     10        to compute a layout viewport when the visual viewport is larger than the layout
     11        viewport, but if this happens just anchor the layout viewport at the origin
     12        of the visual viewport.
     13
     14        * page/FrameView.cpp:
     15        (WebCore::FrameView::computeLayoutViewportOrigin):
     16
    1172016-12-04  Darin Adler  <darin@apple.com>
    218
  • trunk/Source/WebCore/page/FrameView.cpp

    r209438 r209447  
    17991799    LayoutPoint layoutViewportOrigin = layoutViewport.location();
    18001800
    1801     if (visualViewport.x() < layoutViewport.x() || visualViewport.x() < stableLayoutViewportOriginMin.x())
     1801    if (visualViewport.width() > layoutViewport.width())
    18021802        layoutViewportOrigin.setX(visualViewport.x());
    1803 
    1804     if (visualViewport.y() < layoutViewport.y() || visualViewport.y() < stableLayoutViewportOriginMin.y())
     1803    else {
     1804        if (visualViewport.x() < layoutViewport.x() || visualViewport.x() < stableLayoutViewportOriginMin.x())
     1805            layoutViewportOrigin.setX(visualViewport.x());
     1806
     1807        if (visualViewport.maxX() > layoutViewport.maxX() || (visualViewport.maxX() - layoutViewport.width()) > stableLayoutViewportOriginMax.x())
     1808            layoutViewportOrigin.setX(visualViewport.maxX() - layoutViewport.width());
     1809    }
     1810
     1811    if (visualViewport.height() > layoutViewport.height())
    18051812        layoutViewportOrigin.setY(visualViewport.y());
    1806 
    1807     if (visualViewport.maxX() > layoutViewport.maxX() || (visualViewport.maxX() - layoutViewport.width()) > stableLayoutViewportOriginMax.x())
    1808         layoutViewportOrigin.setX(visualViewport.maxX() - layoutViewport.width());
    1809 
    1810     if (visualViewport.maxY() > layoutViewport.maxY() || (visualViewport.maxY() - layoutViewport.height()) > stableLayoutViewportOriginMax.y())
    1811         layoutViewportOrigin.setY(visualViewport.maxY() - layoutViewport.height());
     1813    else {
     1814        if (visualViewport.y() < layoutViewport.y() || visualViewport.y() < stableLayoutViewportOriginMin.y())
     1815            layoutViewportOrigin.setY(visualViewport.y());
     1816
     1817        if (visualViewport.maxY() > layoutViewport.maxY() || (visualViewport.maxY() - layoutViewport.height()) > stableLayoutViewportOriginMax.y())
     1818            layoutViewportOrigin.setY(visualViewport.maxY() - layoutViewport.height());
     1819    }
    18121820
    18131821    return layoutViewportOrigin;
Note: See TracChangeset for help on using the changeset viewer.