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

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

Issue 2749403004: Update subtree paint properties when preserve-3d changes (Closed)
Patch Set: Created 3 years, 9 months 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/LayoutObject.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/PaintPropertyTreeUpdateTests.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeUpdateTests.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeUpdateTests.cpp
index a7758783dbbf4077048d4ccb62f18d1f9f1d2d82..24a7855b70bd5ec71897dd36fdf02d37d9da8b08 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeUpdateTests.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeUpdateTests.cpp
@@ -722,4 +722,21 @@ TEST_P(PaintPropertyTreeUpdateTest, ScrollbarWidthChange) {
EXPECT_EQ(FloatSize(60, 60), overflowClip->clipRect().rect().size());
}
+TEST_P(PaintPropertyTreeUpdateTest, Preserve3DChange) {
+ setBodyInnerHTML(
+ "<div id='parent'>"
+ " <div id='child' style='transform: translate3D(1px, 2px, 3px)'></div>"
+ "</div>");
+
+ auto* child = getLayoutObjectByElementId("child");
+ auto* transform = child->paintProperties()->transform();
+ EXPECT_TRUE(transform->flattensInheritedTransform());
+
+ document().getElementById("parent")->setAttribute(
+ HTMLNames::styleAttr, "transform-style: preserve-3d");
+ document().view()->updateAllLifecyclePhases();
+ EXPECT_EQ(transform, child->paintProperties()->transform());
+ EXPECT_FALSE(transform->flattensInheritedTransform());
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698