Changeset 265051 in webkit


Ignore:
Timestamp:
Jul 29, 2020 1:00:48 PM (4 years ago)
Author:
Simon Fraser
Message:

REGRESSION: ASSERTION FAILED: !needsLayout() on tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html flakily
https://bugs.webkit.org/show_bug.cgi?id=214651
Source/WebCore:

<rdar://problem/65952371>

Reviewed by Zalan Bujtas.

Page::doAfterUpdateRendering() is expected to only call functions that can't trigger layout. However,
it could cause the firing of the "monitorWheelEvent" callback which can run arbitrary JS, so move that
earlier in the rendering update, before we do the final layout.

Also assert that the main frame doesn't need layout at the end of Page::doAfterUpdateRendering();
we were only checking subframes.

Tested by lots of existing tests.

  • page/Page.cpp:

(WebCore::Page::updateRendering):
(WebCore::Page::doAfterUpdateRendering):

LayoutTests:

Reviewed by Zalan Bujtas.

De-flake this test.

  • fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered-expected.txt:
  • fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered.html:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r265050 r265051  
     12020-07-29  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION: ASSERTION FAILED: !needsLayout() on tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html flakily
     4        https://bugs.webkit.org/show_bug.cgi?id=214651
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        De-flake this test.
     9
     10        * fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered-expected.txt:
     11        * fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered.html:
     12
    1132020-07-29  Chris Dumez  <cdumez@apple.com>
    214
  • trunk/LayoutTests/fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered-expected.txt

    r261426 r265051  
    88enabled
    99Hovering vertical scrollbar should show expanded scrollbar
    10 PASS Scrollbar state: enabled,expanded,visible_track,visible_thumb
     10PASS Scrollbar state contains: enabled and expanded
    1111Unhovering vertical scrollbar should hide it
    1212PASS Thumb and track hidden
  • trunk/LayoutTests/fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered.html

    r261426 r265051  
    4949            await UIHelper.waitForCondition(() => {
    5050                let state = iframeWindow.internals.verticalScrollbarState(scroller);
     51                let enabled = state.indexOf('enabled') != -1;
    5152                let expanded = state.indexOf('expanded') != -1;
    52                 if (expanded)
    53                     testPassed('Scrollbar state: ' + state);
     53                if (enabled && expanded)
     54                    testPassed('Scrollbar state contains: enabled and expanded');
    5455                return expanded;
    5556            });
  • trunk/Source/WebCore/ChangeLog

    r265050 r265051  
     12020-07-29  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION: ASSERTION FAILED: !needsLayout() on tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html flakily
     4        https://bugs.webkit.org/show_bug.cgi?id=214651
     5        <rdar://problem/65952371>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        Page::doAfterUpdateRendering() is expected to only call functions that can't trigger layout. However,
     10        it could cause the firing of the "monitorWheelEvent" callback which can run arbitrary JS, so move that
     11        earlier in the rendering update, before we do the final layout.
     12
     13        Also assert that the main frame doesn't need layout at the end of Page::doAfterUpdateRendering();
     14        we were only checking subframes.
     15
     16        Tested by lots of existing tests.
     17
     18        * page/Page.cpp:
     19        (WebCore::Page::updateRendering):
     20        (WebCore::Page::doAfterUpdateRendering):
     21
    1222020-07-29  Chris Dumez  <cdumez@apple.com>
    223
  • trunk/Source/WebCore/page/Page.cpp

    r264856 r265051  
    15051505            document->domWindow()->unfreezeNowTimestamp();
    15061506    }
    1507    
     1507
     1508    if (UNLIKELY(isMonitoringWheelEvents()))
     1509        wheelEventTestMonitor()->checkShouldFireCallbacks();
     1510
    15081511    if (m_isTrackingRenderingUpdates)
    15091512        ++m_renderingUpdateCount;
     
    15481551    DebugPageOverlays::doAfterUpdateRendering(*this);
    15491552
    1550     if (UNLIKELY(isMonitoringWheelEvents()))
    1551         wheelEventTestMonitor()->checkShouldFireCallbacks();
    1552 
    15531553    forEachDocument([] (Document& document) {
    15541554        document.prepareCanvasesForDisplayIfNeeded();
    15551555    });
    15561556
     1557    ASSERT(!mainFrame().view() || !mainFrame().view()->needsLayout());
    15571558#if ASSERT_ENABLED
    15581559    for (Frame* child = mainFrame().tree().firstRenderedChild(); child; child = child->tree().traverseNextRendered()) {
Note: See TracChangeset for help on using the changeset viewer.