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

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

Issue 2593833002: Constrain transform animation direct compositing reason to transforms. (Closed)
Patch Set: Shift 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
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/paint/PaintPropertyTreeUpdateTests.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeUpdateTests.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeUpdateTests.cpp
index e983490c89dc7f94ba7b167c155eb4c6399d4b10..ba68026e7d176fafac752a41b441f7e4ec28877e 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeUpdateTests.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeUpdateTests.cpp
@@ -441,4 +441,29 @@ TEST_P(PaintPropertyTreeUpdateTest,
EXPECT_EQ(nullptr, frameScroll(childFrameView));
}
+TEST_P(PaintPropertyTreeUpdateTest,
+ TransformNodeWithAnimationLosesNodeWhenAnimationRemoved) {
+ setBodyInnerHTML(
+ "<style>"
+ "@keyframes test {"
+ " 0% { transform: translate(1em, 1em) } "
+ " 100% { transform: translate(2em, 2em) } "
+ "} "
+ ".animate { "
+ " animation-name: test; "
+ " animation-duration: 1s "
+ "}"
+ "</style>"
+ "<div id='target' class='animate'></div>");
+ Element* target = document().getElementById("target");
+ const ObjectPaintProperties* properties =
+ target->layoutObject()->paintProperties();
+ EXPECT_TRUE(properties->transform()->hasDirectCompositingReasons());
+
+ // Removing the animation should remove the transform node.
+ target->removeAttribute(HTMLNames::classAttr);
+ document().view()->updateAllLifecyclePhases();
+ EXPECT_EQ(nullptr, properties->transform());
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698