Title: [265051] trunk
Revision
265051
Author
[email protected]
Date
2020-07-29 13:00:48 -0700 (Wed, 29 Jul 2020)

Log 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:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (265050 => 265051)


--- trunk/LayoutTests/ChangeLog	2020-07-29 19:12:46 UTC (rev 265050)
+++ trunk/LayoutTests/ChangeLog	2020-07-29 20:00:48 UTC (rev 265051)
@@ -1,3 +1,15 @@
+2020-07-29  Simon Fraser  <[email protected]>
+
+        REGRESSION: ASSERTION FAILED: !needsLayout() on tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html flakily
+        https://bugs.webkit.org/show_bug.cgi?id=214651
+
+        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:
+
 2020-07-29  Chris Dumez  <[email protected]>
 
         Make sure playback state constants remain on OscillatorNode for backward compatibility

Modified: trunk/LayoutTests/fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered-expected.txt (265050 => 265051)


--- trunk/LayoutTests/fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered-expected.txt	2020-07-29 19:12:46 UTC (rev 265050)
+++ trunk/LayoutTests/fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered-expected.txt	2020-07-29 20:00:48 UTC (rev 265051)
@@ -7,7 +7,7 @@
 Initial state
 enabled
 Hovering vertical scrollbar should show expanded scrollbar
-PASS Scrollbar state: enabled,expanded,visible_track,visible_thumb
+PASS Scrollbar state contains: enabled and expanded
 Unhovering vertical scrollbar should hide it
 PASS Thumb and track hidden
 PASS successfullyParsed is true

Modified: trunk/LayoutTests/fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered.html (265050 => 265051)


--- trunk/LayoutTests/fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered.html	2020-07-29 19:12:46 UTC (rev 265050)
+++ trunk/LayoutTests/fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered.html	2020-07-29 20:00:48 UTC (rev 265051)
@@ -48,9 +48,10 @@
             await UIHelper.mouseWheelScrollAt(x, y);
             await UIHelper.waitForCondition(() => {
                 let state = iframeWindow.internals.verticalScrollbarState(scroller);
+                let enabled = state.indexOf('enabled') != -1;
                 let expanded = state.indexOf('expanded') != -1;
-                if (expanded)
-                    testPassed('Scrollbar state: ' + state);
+                if (enabled && expanded)
+                    testPassed('Scrollbar state contains: enabled and expanded');
                 return expanded;
             });
 

Modified: trunk/Source/WebCore/ChangeLog (265050 => 265051)


--- trunk/Source/WebCore/ChangeLog	2020-07-29 19:12:46 UTC (rev 265050)
+++ trunk/Source/WebCore/ChangeLog	2020-07-29 20:00:48 UTC (rev 265051)
@@ -1,3 +1,24 @@
+2020-07-29  Simon Fraser  <[email protected]>
+
+        REGRESSION: ASSERTION FAILED: !needsLayout() on tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html flakily
+        https://bugs.webkit.org/show_bug.cgi?id=214651
+        <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):
+
 2020-07-29  Chris Dumez  <[email protected]>
 
         Make sure playback state constants remain on OscillatorNode for backward compatibility

Modified: trunk/Source/WebCore/page/Page.cpp (265050 => 265051)


--- trunk/Source/WebCore/page/Page.cpp	2020-07-29 19:12:46 UTC (rev 265050)
+++ trunk/Source/WebCore/page/Page.cpp	2020-07-29 20:00:48 UTC (rev 265051)
@@ -1504,7 +1504,10 @@
         if (document && document->domWindow())
             document->domWindow()->unfreezeNowTimestamp();
     }
-    
+
+    if (UNLIKELY(isMonitoringWheelEvents()))
+        wheelEventTestMonitor()->checkShouldFireCallbacks();
+
     if (m_isTrackingRenderingUpdates)
         ++m_renderingUpdateCount;
 
@@ -1547,13 +1550,11 @@
 
     DebugPageOverlays::doAfterUpdateRendering(*this);
 
-    if (UNLIKELY(isMonitoringWheelEvents()))
-        wheelEventTestMonitor()->checkShouldFireCallbacks();
-
     forEachDocument([] (Document& document) {
         document.prepareCanvasesForDisplayIfNeeded();
     });
 
+    ASSERT(!mainFrame().view() || !mainFrame().view()->needsLayout());
 #if ASSERT_ENABLED
     for (Frame* child = mainFrame().tree().firstRenderedChild(); child; child = child->tree().traverseNextRendered()) {
         auto* frameView = child->view();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to