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

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

Issue 2578343002: Support compositing for active animations in SPv2. (Closed)
Patch Set: setNeedsPaintPropertyUpdate on PaintLayer::styleDidChange. 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 7dc20becd1d9b8b5ad4dc0a1800b9269234f6da7..d3cdbccc6f1805df2b865ba10ee2fd6293c12d4e 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
@@ -404,6 +404,25 @@ TEST_P(PaintPropertyTreeBuilderTest, Transform) {
transform->layoutObject()->paintProperties()->transform()->matrix());
}
+TEST_P(PaintPropertyTreeBuilderTest,
+ TransformNodeWithActiveAnimationHasDirectCompositingReason) {
+ setBodyInnerHTML(
+ "<style>"
+ "@keyframes test {"
+ " 0% { transform: translate(1em, 1em) } "
+ " 100% { transform: translate(2em, 2em) } "
+ "} "
+ "</style>"
+ "<div id='transform' "
+ " style='animation-name: test; animation-duration: 1s'>"
+ "</div>");
+
+ Element* transform = document().getElementById("transform");
+ const ObjectPaintProperties* transformProperties =
+ transform->layoutObject()->paintProperties();
+ EXPECT_TRUE(transformProperties->transform()->hasDirectCompositingReasons());
+}
+
TEST_P(PaintPropertyTreeBuilderTest, WillChangeTransform) {
setBodyInnerHTML(
"<style> body { margin: 0 } </style>"

Powered by Google App Engine
This is Rietveld 408576698