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

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

Issue 2571043002: Set a direct compositing reason for 3D transform & will-change property tree nodes (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
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 bd9a0b02a5482e7e10b465f4cb14ae36c4504171..eaef97ecd021bffe722c21ec4771073c43151df4 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
@@ -334,7 +334,12 @@ TEST_P(PaintPropertyTreeBuilderTest, Perspective) {
}
TEST_P(PaintPropertyTreeBuilderTest, Transform) {
- loadTestData("transform.html");
+ setBodyInnerHTML(
+ "<style> body { margin: 0 } </style>"
chrishtr 2016/12/13 23:35:35 I inlined this for imrpoved clarity and to be like
+ "<div id='transform' style='margin-left: 50px; margin-top: 100px;"
+ " width: 400px; height: 300px;"
+ " transform: translate3D(123px, 456px, 789px)'>"
+ "</div>");
Element* transform = document().getElementById("transform");
const ObjectPaintProperties* transformProperties =
@@ -349,6 +354,10 @@ TEST_P(PaintPropertyTreeBuilderTest, Transform) {
transformProperties->paintOffsetTranslation()->matrix());
EXPECT_EQ(frameScrollTranslation(),
transformProperties->paintOffsetTranslation()->parent());
+
+ EXPECT_TRUE(transformProperties->transform()->hasDirectCompositingReasons());
+ EXPECT_FALSE(frameScrollTranslation()->hasDirectCompositingReasons());
+
CHECK_EXACT_VISUAL_RECT(LayoutRect(173, 556, 400, 300),
transform->layoutObject(),
document().view()->layoutView());

Powered by Google App Engine
This is Rietveld 408576698