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

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

Issue 2891453003: Incorporate ComputedStyle::hasTransform when diffing transform styles. (Closed)
Patch Set: Created 3 years, 7 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
Index: third_party/WebKit/Source/core/paint/PaintLayerTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp b/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp
index dd84f953839c970cc8e999537fac743accb38708..09d54551d638bcea1668241d2af8e2c7a494eb8c 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp
@@ -809,4 +809,21 @@ TEST_P(PaintLayerTest, ColumnSpanLayerUnderExtraLayerScrolled) {
EXPECT_EQ(LayoutPoint(-150, 50), spanner->visualOffsetFromAncestor(columns));
}
+TEST_P(PaintLayerTest, PaintLayerTransformUpdatedOnStyleTransformAnimation) {
+ setBodyInnerHTML("<div id='target' style='will-change: transform'></div>");
+
+ LayoutObject* targetObject =
+ document().getElementById("target")->layoutObject();
+ PaintLayer* targetPaintLayer = toLayoutBoxModelObject(targetObject)->layer();
+ EXPECT_EQ(nullptr, targetPaintLayer->transform());
+
+ RefPtr<ComputedStyle> oldStyle =
+ ComputedStyle::clone(targetObject->styleRef());
+ ComputedStyle* newStyle = targetObject->mutableStyle();
+ newStyle->setHasCurrentTransformAnimation();
+ targetPaintLayer->updateTransform(oldStyle.get(), *newStyle);
+
+ EXPECT_NE(nullptr, targetPaintLayer->transform());
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698