Changeset 244675 in webkit


Ignore:
Timestamp:
Apr 25, 2019 7:55:36 PM (5 years ago)
Author:
Simon Fraser
Message:

REGRESSION (r234330): 3 legacy-animation-engine/compositing tests are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=188357
<rdar://problem/42986633>

Reviewed by Dean Jackson.
Source/WebCore:

DumpRenderTree had no code that set page.setCompositingPolicyOverride() to Normal, so some
tests would fall into low memory mode and have different behavior.

Fix by moving the code that calls setCompositingPolicyOverride(Normal) from the WK2 layer
to Internals, so it's shared by DRT and WTR.

We no longer need the WK2 C SPI glue.

  • testing/Internals.cpp:

(WebCore::Internals::resetToConsistentState):

Source/WebKit:

DumpRenderTree had no code that set page.setCompositingPolicyOverride() to Normal, so some
tests would fall into low memory mode and have different behavior.

Fix by moving the code that calls setCompositingPolicyOverride(Normal) from the WK2 layer
to Internals, so it's shared by DRT and WTR.

We no longer need the WK2 C SPI glue.

  • WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:

(WKBundlePageSetEventThrottlingBehaviorOverride):
(WKBundlePageSetCompositingPolicyOverride): Deleted.

  • WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:

Tools:

DumpRenderTree had no code that set page.setCompositingPolicyOverride() to Normal, so some
tests would fall into low memory mode and have different behavior.

Fix by moving the code that calls setCompositingPolicyOverride(Normal) from the WK2 layer
to Internals, so it's shared by DRT and WTR.

We no longer need the WK2 C SPI glue.

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::prepare):

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r244674 r244675  
     12019-04-25  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (r234330): 3 legacy-animation-engine/compositing tests are flaky failures
     4        https://bugs.webkit.org/show_bug.cgi?id=188357
     5        <rdar://problem/42986633>
     6
     7        Reviewed by Dean Jackson.
     8
     9        DumpRenderTree had no code that set page.setCompositingPolicyOverride() to Normal, so some
     10        tests would fall into low memory mode and have different behavior.
     11       
     12        Fix by moving the code that calls setCompositingPolicyOverride(Normal) from the WK2 layer
     13        to Internals, so it's shared by DRT and WTR.
     14       
     15        We no longer need the WK2 C SPI glue.
     16
     17        * testing/Internals.cpp:
     18        (WebCore::Internals::resetToConsistentState):
     19
    1202019-04-25  Sihui Liu  <sihui_liu@apple.com>
    221
  • trunk/Source/WebCore/testing/Internals.cpp

    r244440 r244675  
    453453    page.mainFrame().setTextZoomFactor(1.0f);
    454454
    455     page.setCompositingPolicyOverride(WTF::nullopt);
     455    page.setCompositingPolicyOverride(WebCore::CompositingPolicy::Normal);
    456456
    457457    FrameView* mainFrameView = page.mainFrame().view();
  • trunk/Source/WebKit/ChangeLog

    r244670 r244675  
     12019-04-25  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (r234330): 3 legacy-animation-engine/compositing tests are flaky failures
     4        https://bugs.webkit.org/show_bug.cgi?id=188357
     5        <rdar://problem/42986633>
     6
     7        Reviewed by Dean Jackson.
     8       
     9        DumpRenderTree had no code that set page.setCompositingPolicyOverride() to Normal, so some
     10        tests would fall into low memory mode and have different behavior.
     11       
     12        Fix by moving the code that calls setCompositingPolicyOverride(Normal) from the WK2 layer
     13        to Internals, so it's shared by DRT and WTR.
     14       
     15        We no longer need the WK2 C SPI glue.
     16
     17        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
     18        (WKBundlePageSetEventThrottlingBehaviorOverride):
     19        (WKBundlePageSetCompositingPolicyOverride): Deleted.
     20        * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
     21
    1222019-04-25  Chris Dumez  <cdumez@apple.com>
    223
  • trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp

    r244599 r244675  
    804804    WebKit::toImpl(page)->corePage()->setEventThrottlingBehaviorOverride(behaviorValue);
    805805}
    806 
    807 void WKBundlePageSetCompositingPolicyOverride(WKBundlePageRef page, WKCompositingPolicy* policy)
    808 {
    809     Optional<WebCore::CompositingPolicy> policyValue;
    810     if (policy) {
    811         switch (*policy) {
    812         case kWKCompositingPolicyNormal:
    813             policyValue = WebCore::CompositingPolicy::Normal;
    814             break;
    815         case kWKCompositingPolicyConservative:
    816             policyValue = WebCore::CompositingPolicy::Conservative;
    817             break;
    818         }
    819     }
    820 
    821     WebKit::toImpl(page)->corePage()->setCompositingPolicyOverride(policyValue);
    822 }
    823 
  • trunk/Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h

    r244599 r244675  
    135135WK_EXPORT void WKBundlePageSetEventThrottlingBehaviorOverride(WKBundlePageRef, WKEventThrottlingBehavior*);
    136136
    137 enum {
    138     kWKCompositingPolicyNormal = 0,
    139     kWKCompositingPolicyConservative
    140 };
    141 
    142 typedef uint32_t WKCompositingPolicy;
    143 
    144 // Passing null in the second parameter clears the override.
    145 WK_EXPORT void WKBundlePageSetCompositingPolicyOverride(WKBundlePageRef, WKCompositingPolicy*);
    146 
    147137#if TARGET_OS_IPHONE
    148138WK_EXPORT void WKBundlePageSetUseTestingViewportConfiguration(WKBundlePageRef, bool);
  • trunk/Tools/ChangeLog

    r244671 r244675  
     12019-04-25  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (r234330): 3 legacy-animation-engine/compositing tests are flaky failures
     4        https://bugs.webkit.org/show_bug.cgi?id=188357
     5        <rdar://problem/42986633>
     6
     7        Reviewed by Dean Jackson.
     8
     9        DumpRenderTree had no code that set page.setCompositingPolicyOverride() to Normal, so some
     10        tests would fall into low memory mode and have different behavior.
     11       
     12        Fix by moving the code that calls setCompositingPolicyOverride(Normal) from the WK2 layer
     13        to Internals, so it's shared by DRT and WTR.
     14       
     15        We no longer need the WK2 C SPI glue.
     16
     17        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
     18        (WTR::InjectedBundlePage::prepare):
     19
    1202019-04-25  Jonathan Bedard  <jbedard@apple.com>
    221
  • trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp

    r244599 r244675  
    421421    WKEventThrottlingBehavior behavior = kWKEventThrottlingBehaviorResponsive;
    422422    WKBundlePageSetEventThrottlingBehaviorOverride(m_page, &behavior);
    423    
    424     // Force consistent compositing behavior, even if the test runner is under memory pressure. Tests can override via internals.
    425     WKCompositingPolicy policy = kWKCompositingPolicyNormal;
    426     WKBundlePageSetCompositingPolicyOverride(m_page, &policy);
    427423}
    428424
Note: See TracChangeset for help on using the changeset viewer.