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

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

Issue 2578343002: Support compositing for active animations in SPv2. (Closed)
Patch Set: Added unit tests. 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 c5b5f979fe69e30528d669d964492e8869bcf052..45a7295919d912179260df3d032cf221826de853 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
@@ -378,6 +378,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