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

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

Issue 2767783003: Incorporate ComputedStyle::hasTransform when diffing transform styles. (Closed)
Patch Set: Sync to head. 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
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 2f55f10bf2f55b0d05203f7b90101ab624ca0e1e..3341e981fd596ea4b88693315bfe66f40a99fd81 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp
@@ -831,4 +831,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