Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(722)

Unified Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp

Issue 2604743002: [SPInvalidation] Force subtree paint property update on css position change (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 969f3fae941b8ad778fbd4e7a8259c33cd639288..10952bab3ae53cfdca33cc675723a82626873dbc 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
@@ -3156,4 +3156,31 @@ TEST_P(PaintPropertyTreeBuilderTest, TransformOriginWithAndWithoutMotionPath) {
willChange->paintProperties()->transform()->origin());
}
+TEST_P(PaintPropertyTreeBuilderTest, ChangePositionUpdateDescendantProperties) {
+ setBodyInnerHTML(
+ "<style>"
+ " * { margin: 0; }"
+ " #ancestor { position: absolute; overflow: hidden }"
+ " #descendant { position: absolute }"
+ "</style>"
+ "<div id='ancestor'>"
+ " <div id='descendant'></div>"
+ "</div>");
+
+ LayoutObject* ancestor = getLayoutObjectByElementId("ancestor");
+ LayoutObject* descendant = getLayoutObjectByElementId("descendant");
+ EXPECT_EQ(ancestor->paintProperties()->overflowClip(),
+ descendant->paintProperties()
+ ->localBorderBoxProperties()
+ ->propertyTreeState.clip());
+
+ toElement(ancestor->node())
+ ->setAttribute(HTMLNames::styleAttr, "position: static");
+ document().view()->updateAllLifecyclePhases();
+ EXPECT_NE(ancestor->paintProperties()->overflowClip(),
+ descendant->paintProperties()
+ ->localBorderBoxProperties()
+ ->propertyTreeState.clip());
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698