Changeset 209932 in webkit


Ignore:
Timestamp:
Dec 16, 2016 12:44:01 PM (7 years ago)
Author:
akling@apple.com
Message:

Subframes going into page cache don't need to resetScrollbars().
<https://webkit.org/b/163750>
<rdar://problem/29273020>

Reviewed by Antti Koivisto.

Source/WebCore:

The main frame is the only frame that switches its FrameView when using the page cache,
subframes just suspend their DOM and wait around to be either killed or restored.

Thus there is no reason for subframes to reset their FrameView's scrollbars when going
into page cache, since nothing affects them while cached, and their layout should end up
identical when restoring.

This was causing some flakiness with subframe scrollbars jumping between different sizes
in when restoring from page cache in macOS/WK1. This change makes the behavior consistent
in both WK1 and WK2, and removes the flakiness.

  • dom/Document.cpp:

(WebCore::Document::setPageCacheState):

LayoutTests:

Unskip compositing/iframes/page-cache-layer-tree.html on mac-wk1 and fix up the
result now that WK2 behaves correctly as well.

Both DRT and WTR run with scrollbars in "always on" mode, so the correct dimensions
for the 300x150 iframe layers here are 285x135.

  • compositing/iframes/page-cache-layer-tree-expected.txt:
  • platform/mac-wk1/TestExpectations:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r209931 r209932  
     12016-12-16  Andreas Kling  <akling@apple.com>
     2
     3        Subframes going into page cache don't need to resetScrollbars().
     4        <https://webkit.org/b/163750>
     5        <rdar://problem/29273020>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        Unskip compositing/iframes/page-cache-layer-tree.html on mac-wk1 and fix up the
     10        result now that WK2 behaves correctly as well.
     11
     12        Both DRT and WTR run with scrollbars in "always on" mode, so the correct dimensions
     13        for the 300x150 iframe layers here are 285x135.
     14
     15        * compositing/iframes/page-cache-layer-tree-expected.txt:
     16        * platform/mac-wk1/TestExpectations:
     17
    1182016-12-16  Wenson Hsieh  <wenson_hsieh@apple.com>
    219
  • trunk/LayoutTests/compositing/iframes/page-cache-layer-tree-expected.txt

    r207620 r209932  
    2424                (GraphicsLayer
    2525                  (anchor 0.00 0.00)
    26                   (bounds 285.00 150.00)
     26                  (bounds 285.00 135.00)
    2727                  (children 1
    2828                    (GraphicsLayer
     
    7474                    (GraphicsLayer
    7575                      (anchor 0.00 0.00)
    76                       (bounds 285.00 150.00)
     76                      (bounds 285.00 135.00)
    7777                      (children 1
    7878                        (GraphicsLayer
  • trunk/LayoutTests/platform/mac-wk1/TestExpectations

    r209889 r209932  
    286286webkit.org/b/163361 imported/w3c/web-platform-tests/html/webappapis/animation-frames/callback-multicalls.html [ Pass Failure ]
    287287
    288 webkit.org/b/163750 compositing/iframes/page-cache-layer-tree.html [ Pass Failure ]
    289 
    290288webkit.org/b/164491 [ Yosemite ElCapitan ] fast/visual-viewport/rtl-zoomed-rects.html [ Failure ]
    291289
  • trunk/Source/WebCore/ChangeLog

    r209931 r209932  
     12016-12-16  Andreas Kling  <akling@apple.com>
     2
     3        Subframes going into page cache don't need to resetScrollbars().
     4        <https://webkit.org/b/163750>
     5        <rdar://problem/29273020>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        The main frame is the only frame that switches its FrameView when using the page cache,
     10        subframes just suspend their DOM and wait around to be either killed or restored.
     11
     12        Thus there is no reason for subframes to reset their FrameView's scrollbars when going
     13        into page cache, since nothing affects them while cached, and their layout should end up
     14        identical when restoring.
     15
     16        This was causing some flakiness with subframe scrollbars jumping between different sizes
     17        in when restoring from page cache in macOS/WK1. This change makes the behavior consistent
     18        in both WK1 and WK2, and removes the flakiness.
     19
     20        * dom/Document.cpp:
     21        (WebCore::Document::setPageCacheState):
     22
    1232016-12-16  Wenson Hsieh  <wenson_hsieh@apple.com>
    224
  • trunk/Source/WebCore/dom/Document.cpp

    r209890 r209932  
    45414541                if (ScrollingCoordinator* scrollingCoordinator = page->scrollingCoordinator())
    45424542                    scrollingCoordinator->clearStateTree();
    4543             } else
    4544                 v->resetScrollbars();
     4543            }
    45454544        }
    45464545
Note: See TracChangeset for help on using the changeset viewer.