| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/html/HTMLIFrameElement.h" | 5 #include "core/html/HTMLIFrameElement.h" |
| 6 #include "core/paint/PaintPropertyTreeBuilderTest.h" | 6 #include "core/paint/PaintPropertyTreeBuilderTest.h" |
| 7 #include "core/paint/PaintPropertyTreePrinter.h" | 7 #include "core/paint/PaintPropertyTreePrinter.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 EXPECT_NE(nullptr, frameScroll(childFrameView)); | 434 EXPECT_NE(nullptr, frameScroll(childFrameView)); |
| 435 | 435 |
| 436 auto* iframeContainer = document().getElementById("iframeContainer"); | 436 auto* iframeContainer = document().getElementById("iframeContainer"); |
| 437 iframeContainer->setAttribute(HTMLNames::styleAttr, "visibility: hidden;"); | 437 iframeContainer->setAttribute(HTMLNames::styleAttr, "visibility: hidden;"); |
| 438 frameView->updateAllLifecyclePhases(); | 438 frameView->updateAllLifecyclePhases(); |
| 439 | 439 |
| 440 EXPECT_EQ(nullptr, frameScroll(frameView)); | 440 EXPECT_EQ(nullptr, frameScroll(frameView)); |
| 441 EXPECT_EQ(nullptr, frameScroll(childFrameView)); | 441 EXPECT_EQ(nullptr, frameScroll(childFrameView)); |
| 442 } | 442 } |
| 443 | 443 |
| 444 TEST_P(PaintPropertyTreeUpdateTest, |
| 445 TransformNodeWithAnimationLosesNodeWhenAnimationRemoved) { |
| 446 setBodyInnerHTML( |
| 447 "<style>" |
| 448 "@keyframes test {" |
| 449 " 0% { transform: translate(1em, 1em) } " |
| 450 " 100% { transform: translate(2em, 2em) } " |
| 451 "} " |
| 452 ".animate { " |
| 453 " animation-name: test; " |
| 454 " animation-duration: 1s " |
| 455 "}" |
| 456 "</style>" |
| 457 "<div id='target' class='animate'></div>"); |
| 458 Element* target = document().getElementById("target"); |
| 459 const ObjectPaintProperties* properties = |
| 460 target->layoutObject()->paintProperties(); |
| 461 EXPECT_TRUE(properties->transform()->hasDirectCompositingReasons()); |
| 462 |
| 463 // Removing the animation should remove the transform node. |
| 464 target->removeAttribute(HTMLNames::classAttr); |
| 465 document().view()->updateAllLifecyclePhases(); |
| 466 EXPECT_EQ(nullptr, properties->transform()); |
| 467 } |
| 468 |
| 444 } // namespace blink | 469 } // namespace blink |
| OLD | NEW |