| Index: third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp
|
| diff --git a/third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp b/third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp
|
| index b63f40506c09166436649eeee8c49008228350e3..9c3eca1630e4214be0710e08057f77355d844074 100644
|
| --- a/third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp
|
| +++ b/third_party/WebKit/Source/web/tests/ScrollingCoordinatorTest.cpp
|
| @@ -1037,7 +1037,11 @@ class StyleRelatedMainThreadScrollingReasonTest
|
| static const uint32_t m_LCDTextRelatedReasons =
|
| MainThreadScrollingReason::kHasOpacityAndLCDText |
|
| MainThreadScrollingReason::kHasTransformAndLCDText |
|
| - MainThreadScrollingReason::kBackgroundNotOpaqueInRectAndLCDText;
|
| + MainThreadScrollingReason::kBackgroundNotOpaqueInRectAndLCDText |
|
| + MainThreadScrollingReason::kHasBoxShadowAndLCDText |
|
| + MainThreadScrollingReason::kHasTranslucentBorderAndLCDText;
|
| + static const uint32_t m_OpaqueScrollersRelatedReasons =
|
| + MainThreadScrollingReason::kHasTranslucentBorderAndLCDText;
|
|
|
| protected:
|
| StyleRelatedMainThreadScrollingReasonTest() {
|
| @@ -1089,6 +1093,12 @@ class StyleRelatedMainThreadScrollingReasonTest
|
| forceFullCompositingUpdate();
|
| ASSERT_FALSE(frameView->mainThreadScrollingReasons());
|
| }
|
| + if ((reason & m_OpaqueScrollersRelatedReasons) &&
|
| + !(reason & ~m_OpaqueScrollersRelatedReasons)) {
|
| + RuntimeEnabledFeatures::setCompositeOpaqueScrollersEnabled(true);
|
| + forceFullCompositingUpdate();
|
| + ASSERT_FALSE(frameView->mainThreadScrollingReasons());
|
| + }
|
| }
|
| };
|
|
|
| @@ -1154,4 +1164,20 @@ TEST_F(StyleRelatedMainThreadScrollingReasonTest, LCDTextEnabledTest) {
|
| MainThreadScrollingReason::kHasBorderRadius);
|
| }
|
|
|
| +TEST_F(StyleRelatedMainThreadScrollingReasonTest, BoxShadowTest) {
|
| + testStyle("box-shadow", MainThreadScrollingReason::kHasBoxShadowAndLCDText);
|
| +}
|
| +
|
| +TEST_F(StyleRelatedMainThreadScrollingReasonTest, TranslucentBorderTest) {
|
| + RuntimeEnabledFeatures::setCompositeOpaqueScrollersEnabled(false);
|
| + testStyle("translucent-border",
|
| + MainThreadScrollingReason::kHasTranslucentBorderAndLCDText);
|
| +}
|
| +
|
| +TEST_F(StyleRelatedMainThreadScrollingReasonTest, OpaqueScrollersEnabledTest) {
|
| + testStyle("translucent-border border-radius",
|
| + MainThreadScrollingReason::kHasOpacityAndLCDText |
|
| + MainThreadScrollingReason::kHasBorderRadius);
|
| +}
|
| +
|
| } // namespace blink
|
|
|