Changeset 256577 in webkit


Ignore:
Timestamp:
Feb 13, 2020 5:31:05 PM (4 years ago)
Author:
commit-queue@webkit.org
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 <Ben Nham> 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.
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r256575 r256577  
     12020-02-13  Ben Nham  <nham@apple.com>
     2
     3        Flash of white can occur if JS forces an early layout
     4        https://bugs.webkit.org/show_bug.cgi?id=207516
     5
     6        This causes us to wait for the first non-empty layout before we paint on Mac, which we
     7        already do on all other platforms.
     8
     9        Reviewed by Antti Koivisto.
     10
     11        * fast/scrolling/rtl-scrollbars-listbox-scroll.html: Wait for document to load before scrolling.
     12        * 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.
     13
    1142020-02-13  Jason Lawrence  <lawrence.j@apple.com>
    215
  • trunk/LayoutTests/fast/scrolling/rtl-scrollbars-listbox-scroll.html

    r200116 r256577  
    2727<script>
    2828if (window.eventSender) {
    29     eventSender.mouseMoveTo(25, 5);
    30     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -20, "began", "none");
    31     eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "ended", "none");
     29    window.addEventListener('load', function() {
     30        eventSender.mouseMoveTo(25, 5);
     31        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, -20, "began", "none");
     32        eventSender.mouseScrollByWithWheelAndMomentumPhases(0, 0, "ended", "none");
     33    });
    3234}
    3335</script>
  • trunk/LayoutTests/platform/mac/TestExpectations

    r256566 r256577  
    18841884webkit.org/b/203171 inspector/layers/layers-for-node.html [ Pass Failure ]
    18851885
     1886webkit.org/b/203416 imported/w3c/web-platform-tests/css/css-transitions/before-load-001.html [ Failure ]
     1887
    18861888webkit.org/b/203305 [ HighSierra Debug ] imported/w3c/web-platform-tests/css/css-transitions/properties-value-001.html [ Pass Failure ]
    18871889webkit.org/b/203305 [ HighSierra Debug ] imported/w3c/web-platform-tests/css/css-transitions/properties-value-inherit-001.html [ Pass Failure ]
  • trunk/Source/WebKit/ChangeLog

    r256571 r256577  
     12020-02-13  Ben Nham  <nham@apple.com>
     2
     3        Flash of white can occur if JS forces an early layout
     4        https://bugs.webkit.org/show_bug.cgi?id=207516
     5
     6        This causes us to wait for the first non-empty layout before we paint on Mac, which we
     7        already do on all other platforms.
     8
     9        Reviewed by Antti Koivisto.
     10
     11        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
     12        (WebKit::WebFrameLoaderClient::dispatchDidReachLayoutMilestone):
     13
    1142020-02-13  Brent Fulgham  <bfulgham@apple.com>
    215
  • trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

    r256073 r256577  
    699699        webPage->send(Messages::WebPageProxy::DidFirstLayoutForFrame(m_frame->frameID(), UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
    700700
    701 #if PLATFORM(MAC)
    702         // FIXME: Do this on DidFirstVisuallyNonEmptyLayout when Mac Safari is able to handle it (<rdar://problem/17580021>)
    703         if (m_frame->isMainFrame() && !m_didCompletePageTransition && !webPage->corePage()->settings().suppressesIncrementalRendering()) {
    704             WEBFRAMELOADERCLIENT_RELEASE_LOG(Layout, "dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition");
    705             webPage->didCompletePageTransition();
    706             m_didCompletePageTransition = true;
    707         }
    708 #endif
    709 
    710701#if USE(COORDINATED_GRAPHICS)
    711702        // Make sure viewport properties are dispatched on the main frame by the time the first layout happens.
Note: See TracChangeset for help on using the changeset viewer.