Changeset 267284 in webkit


Ignore:
Timestamp:
Sep 18, 2020 3:25:44 PM (4 years ago)
Author:
sihui_liu@apple.com
Message:

REGRESSION (r266634): fast/selectors/text-field-selection-stroke-color.html and fast/selectors/text-field-selection-window-inactive-stroke-color.html are flaky failures with pixel noise
https://bugs.webkit.org/show_bug.cgi?id=216394
<rdar://problem/68679551>

Reviewed by Tim Horton.

Source/WebKit:

In WebKitTestRunner, we reset the states and load about:blank page between tests. The resetting may cause some
activity state changes of web page, like WindowIsActive. Before r266634, these changes will be dispatched
quickly enough (before runloop waits or when runloop exits) to web process, so web process can do rendering with
updated activity state. After r266634, dispatch of the changes may be delayed (until CATransaction commits).
Page activity state can affect scrollability (in FrameView::computeScrollability()) and scrollability can affect
tiling size (in TileController::computeTileSize()). Different tilings may cause the tiny pixel difference we see
in the test results.

To fix this, create an SPI for sending out activity state updates in next runloop cycle and adopt it in WTR.

  • UIProcess/API/C/WKPage.cpp:

(WKPageDispatchActivityStateUpdateForTesting):

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::dispatchActivityStateUpdateForTesting):

  • UIProcess/WebPageProxy.h:

Tools:

Make sure activity state changes for window updates in resetStateToConsistentValues are dispatched in time.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):

LayoutTests:

Update test expectations as tests should be passing.

  • platform/mac-wk2/TestExpectations:
Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r267281 r267284  
     12020-09-18  Sihui Liu  <sihui_liu@apple.com>
     2
     3        REGRESSION (r266634): fast/selectors/text-field-selection-stroke-color.html and fast/selectors/text-field-selection-window-inactive-stroke-color.html are flaky failures with pixel noise
     4        https://bugs.webkit.org/show_bug.cgi?id=216394
     5        <rdar://problem/68679551>
     6
     7        Reviewed by Tim Horton.
     8
     9        Update test expectations as tests should be passing.
     10
     11        * platform/mac-wk2/TestExpectations:
     12
    1132020-09-18  Aditya Keerthi  <akeerthi@apple.com>
    214
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r267179 r267284  
    13121312http/tests/resourceLoadStatistics/exemptDomains/ [ Skip ]
    13131313
    1314 webkit.org/b/216394 [ Release ] fast/selectors/text-field-selection-stroke-color.html [ Pass ImageOnlyFailure ]
    1315 webkit.org/b/216394 [ Release ] fast/selectors/selection-window-inactive-stroke-color.html [ Pass ImageOnlyFailure ]
    1316 
    13171314# rdar://68740987 (REGRESSION: [ BigSur wk2 ] http/tests/media/video-no-content-length-stall.html is a constant failure)
    13181315[ BigSur+ ] http/tests/media/video-no-content-length-stall.html [ Failure ]
  • trunk/Source/WebKit/ChangeLog

    r267279 r267284  
     12020-09-18  Sihui Liu  <sihui_liu@apple.com>
     2
     3        REGRESSION (r266634): fast/selectors/text-field-selection-stroke-color.html and fast/selectors/text-field-selection-window-inactive-stroke-color.html are flaky failures with pixel noise
     4        https://bugs.webkit.org/show_bug.cgi?id=216394
     5        <rdar://problem/68679551>
     6
     7        Reviewed by Tim Horton.
     8
     9        In WebKitTestRunner, we reset the states and load about:blank page between tests. The resetting may cause some
     10        activity state changes of web page, like WindowIsActive. Before r266634, these changes will be dispatched
     11        quickly enough (before runloop waits or when runloop exits) to web process, so web process can do rendering with
     12        updated activity state. After r266634, dispatch of the changes may be delayed (until CATransaction commits).
     13        Page activity state can affect scrollability (in FrameView::computeScrollability()) and scrollability can affect
     14        tiling size (in TileController::computeTileSize()). Different tilings may cause the tiny pixel difference we see
     15        in the test results.
     16
     17        To fix this, create an SPI for sending out activity state updates in next runloop cycle and adopt it in WTR.
     18
     19        * UIProcess/API/C/WKPage.cpp:
     20        (WKPageDispatchActivityStateUpdateForTesting):
     21        * UIProcess/API/C/WKPagePrivate.h:
     22        * UIProcess/WebPageProxy.cpp:
     23        (WebKit::WebPageProxy::dispatchActivityStateUpdateForTesting):
     24        * UIProcess/WebPageProxy.h:
     25
    1262020-09-18  Alex Christensen  <achristensen@webkit.org>
    227
  • trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp

    r267081 r267284  
    30033003    toImpl(page)->setMediaCaptureReportingDelay(Seconds(delay));
    30043004}
     3005
     3006void WKPageDispatchActivityStateUpdateForTesting(WKPageRef page)
     3007{
     3008    toImpl(page)->dispatchActivityStateUpdateForTesting();
     3009}
  • trunk/Source/WebKit/UIProcess/API/C/WKPagePrivate.h

    r267081 r267284  
    201201WK_EXPORT void WKPageSetMediaCaptureReportingDelayForTesting(WKPageRef page, double delay);
    202202
     203WK_EXPORT void WKPageDispatchActivityStateUpdateForTesting(WKPageRef page);
     204
    203205#ifdef __cplusplus
    204206}
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r267250 r267284  
    1031210312#endif
    1031310313
     10314void WebPageProxy::dispatchActivityStateUpdateForTesting()
     10315{
     10316    RunLoop::current().dispatch([protectedThis = makeRef(*this)] {
     10317        protectedThis->dispatchActivityStateChange();
     10318    });
     10319}
     10320
    1031410321} // namespace WebKit
    1031510322
  • trunk/Source/WebKit/UIProcess/WebPageProxy.h

    r267203 r267284  
    901901#endif // PLATFORM(COCOA)
    902902
     903    void dispatchActivityStateUpdateForTesting();
     904
    903905    void changeFontAttributes(WebCore::FontAttributeChanges&&);
    904906    void changeFont(WebCore::FontChanges&&);
  • trunk/Tools/ChangeLog

    r267283 r267284  
     12020-09-18  Sihui Liu  <sihui_liu@apple.com>
     2
     3        REGRESSION (r266634): fast/selectors/text-field-selection-stroke-color.html and fast/selectors/text-field-selection-window-inactive-stroke-color.html are flaky failures with pixel noise
     4        https://bugs.webkit.org/show_bug.cgi?id=216394
     5        <rdar://problem/68679551>
     6
     7        Reviewed by Tim Horton.
     8
     9        Make sure activity state changes for window updates in resetStateToConsistentValues are dispatched in time.
     10
     11        * WebKitTestRunner/TestController.cpp:
     12        (WTR::TestController::resetStateToConsistentValues):
     13
    1142020-09-18  Aditya Keerthi  <akeerthi@apple.com>
    215
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r267222 r267284  
    11611161    clearAppBoundSession();
    11621162    clearAdClickAttribution();
     1163
     1164    WKPageDispatchActivityStateUpdateForTesting(m_mainWebView->page());
    11631165
    11641166    m_didReceiveServerRedirectForProvisionalNavigation = false;
Note: See TracChangeset for help on using the changeset viewer.