| Index: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
|
| index c5b5f979fe69e30528d669d964492e8869bcf052..4ea2139979d4fdfafef8fffa54e95741c3844f57 100644
|
| --- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
|
| +++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
|
| @@ -63,8 +63,9 @@ class PaintPropertyTreeBuilderTest
|
| return frameView->contentClip();
|
| }
|
|
|
| - const ScrollPaintPropertyNode* frameScroll() {
|
| - FrameView* frameView = document().view();
|
| + const ScrollPaintPropertyNode* frameScroll(FrameView* frameView = nullptr) {
|
| + if (!frameView)
|
| + frameView = document().view();
|
| if (RuntimeEnabledFeatures::rootLayerScrollingEnabled())
|
| return frameView->layoutView()->paintProperties()->scroll();
|
| return frameView->scroll();
|
| @@ -3231,4 +3232,30 @@ TEST_P(PaintPropertyTreeBuilderTest, NoPaintPropertyUpdateOnBackgroundChange) {
|
| EXPECT_FALSE(div->layoutObject()->needsPaintPropertyUpdate());
|
| }
|
|
|
| +// Disabled due to stale scrollsOverflow values, see: https://crbug.com/675296.
|
| +TEST_P(PaintPropertyTreeBuilderTest,
|
| + DISABLED_FrameVisibilityChangeUpdatesProperties) {
|
| + setBodyInnerHTML(
|
| + "<style>body { margin: 0; }</style>"
|
| + "<div id='iframeContainer'>"
|
| + " <iframe id='iframe' style='width: 100px; height: 100px;'></iframe>"
|
| + "</div>");
|
| + setChildFrameHTML(
|
| + "<style>body { margin: 0; }</style>"
|
| + "<div id='forceScroll' style='height: 3000px;'></div>");
|
| +
|
| + FrameView* frameView = document().view();
|
| + frameView->updateAllLifecyclePhases();
|
| + EXPECT_EQ(nullptr, frameScroll(frameView));
|
| + FrameView* childFrameView = childDocument().view();
|
| + EXPECT_NE(nullptr, frameScroll(childFrameView));
|
| +
|
| + auto* iframeContainer = document().getElementById("iframeContainer");
|
| + iframeContainer->setAttribute(HTMLNames::styleAttr, "visibility: hidden;");
|
| + frameView->updateAllLifecyclePhases();
|
| +
|
| + EXPECT_EQ(nullptr, frameScroll(frameView));
|
| + EXPECT_EQ(nullptr, frameScroll(childFrameView));
|
| +}
|
| +
|
| } // namespace blink
|
|
|