Title: [256577] trunk
Revision
256577
Author
[email protected]
Date
2020-02-13 17:31:05 -0800 (Thu, 13 Feb 2020)

Log Message

Flash of white can occur if JS forces an early layout
https://bugs.webkit.org/show_bug.cgi?id=207516

This causes us to wait for the first non-empty layout before we paint on Mac, which we
already do on all other platforms.

Patch by Ben Nham <[email protected]> on 2020-02-13
Reviewed by Antti Koivisto.

Source/WebKit:

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidReachLayoutMilestone):

LayoutTests:

* fast/scrolling/rtl-scrollbars-listbox-scroll.html: Wait for document to load before scrolling.
* platform/mac/TestExpectations: Skip before-load-001.html as we already do on iOS. This test depends on first paint timing and this patch makes the Mac behave like iOS in terms of first paint.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (256576 => 256577)


--- trunk/LayoutTests/ChangeLog	2020-02-14 01:17:27 UTC (rev 256576)
+++ trunk/LayoutTests/ChangeLog	2020-02-14 01:31:05 UTC (rev 256577)
@@ -1,3 +1,16 @@
+2020-02-13  Ben Nham  <[email protected]>
+
+        Flash of white can occur if JS forces an early layout
+        https://bugs.webkit.org/show_bug.cgi?id=207516
+
+        This causes us to wait for the first non-empty layout before we paint on Mac, which we
+        already do on all other platforms.
+
+        Reviewed by Antti Koivisto.
+
+        * fast/scrolling/rtl-scrollbars-listbox-scroll.html: Wait for document to load before scrolling.
+        * platform/mac/TestExpectations: Skip before-load-001.html as we already do on iOS. This test depends on first paint timing and this patch makes the Mac behave like iOS in terms of first paint.
+
 2020-02-13  Jason Lawrence  <[email protected]>
 
         [ Mac wk2 ] fast/scrolling/latching/iframe_in_iframe.html is flaky failing.

Modified: trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-scroll.html (256576 => 256577)


--- trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-scroll.html	2020-02-14 01:17:27 UTC (rev 256576)
+++ trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-scroll.html	2020-02-14 01:31:05 UTC (rev 256577)
@@ -26,9 +26,11 @@
 </select>
 <script>
 if (window.eventSender) {
-    eventSender.mouseMoveTo(25, 5);
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -20, "began", "none");
-    eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "ended", "none");
+    window.addEventListener('load', function() {
+        eventSender.mouseMoveTo(25, 5);
+        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -20, "began", "none");
+        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "ended", "none");
+    });
 }
 </script>
 </body>

Modified: trunk/LayoutTests/platform/mac/TestExpectations (256576 => 256577)


--- trunk/LayoutTests/platform/mac/TestExpectations	2020-02-14 01:17:27 UTC (rev 256576)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2020-02-14 01:31:05 UTC (rev 256577)
@@ -1883,6 +1883,8 @@
 
 webkit.org/b/203171 inspector/layers/layers-for-node.html [ Pass Failure ]
 
+webkit.org/b/203416 imported/w3c/web-platform-tests/css/css-transitions/before-load-001.html [ Failure ]
+
 webkit.org/b/203305 [ HighSierra Debug ] imported/w3c/web-platform-tests/css/css-transitions/properties-value-001.html [ Pass Failure ]
 webkit.org/b/203305 [ HighSierra Debug ] imported/w3c/web-platform-tests/css/css-transitions/properties-value-inherit-001.html [ Pass Failure ]
 webkit.org/b/203357 [ Debug ] imported/w3c/web-platform-tests/css/css-transitions/event-dispatch.tentative.html [ Pass Failure ]

Modified: trunk/Source/WebKit/ChangeLog (256576 => 256577)


--- trunk/Source/WebKit/ChangeLog	2020-02-14 01:17:27 UTC (rev 256576)
+++ trunk/Source/WebKit/ChangeLog	2020-02-14 01:31:05 UTC (rev 256577)
@@ -1,3 +1,16 @@
+2020-02-13  Ben Nham  <[email protected]>
+
+        Flash of white can occur if JS forces an early layout
+        https://bugs.webkit.org/show_bug.cgi?id=207516
+
+        This causes us to wait for the first non-empty layout before we paint on Mac, which we
+        already do on all other platforms.
+
+        Reviewed by Antti Koivisto.
+
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::dispatchDidReachLayoutMilestone):
+
 2020-02-13  Brent Fulgham  <[email protected]>
 
         REGRESSION (r255961): Default state for data URL handling is incorrect

Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (256576 => 256577)


--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2020-02-14 01:17:27 UTC (rev 256576)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp	2020-02-14 01:31:05 UTC (rev 256577)
@@ -698,15 +698,6 @@
         webPage->injectedBundleLoaderClient().didFirstLayoutForFrame(*webPage, *m_frame, userData);
         webPage->send(Messages::WebPageProxy::DidFirstLayoutForFrame(m_frame->frameID(), UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
 
-#if PLATFORM(MAC)
-        // FIXME: Do this on DidFirstVisuallyNonEmptyLayout when Mac Safari is able to handle it (<rdar://problem/17580021>)
-        if (m_frame->isMainFrame() && !m_didCompletePageTransition && !webPage->corePage()->settings().suppressesIncrementalRendering()) {
-            WEBFRAMELOADERCLIENT_RELEASE_LOG(Layout, "dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition");
-            webPage->didCompletePageTransition();
-            m_didCompletePageTransition = true;
-        }
-#endif
-
 #if USE(COORDINATED_GRAPHICS)
         // Make sure viewport properties are dispatched on the main frame by the time the first layout happens.
         ASSERT(!webPage->useFixedLayout() || m_frame != m_frame->page()->mainWebFrame() || m_frame->coreFrame()->document()->didDispatchViewportPropertiesChanged());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to