| 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
|
|
|