| 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 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 | 715 |
| 716 auto* newStyle = document().createElement("style"); | 716 auto* newStyle = document().createElement("style"); |
| 717 newStyle->setTextContent("::-webkit-scrollbar {width: 40px; height: 40px}"); | 717 newStyle->setTextContent("::-webkit-scrollbar {width: 40px; height: 40px}"); |
| 718 document().body()->appendChild(newStyle); | 718 document().body()->appendChild(newStyle); |
| 719 | 719 |
| 720 document().view()->updateAllLifecyclePhases(); | 720 document().view()->updateAllLifecyclePhases(); |
| 721 EXPECT_EQ(overflowClip, container->paintProperties()->overflowClip()); | 721 EXPECT_EQ(overflowClip, container->paintProperties()->overflowClip()); |
| 722 EXPECT_EQ(FloatSize(60, 60), overflowClip->clipRect().rect().size()); | 722 EXPECT_EQ(FloatSize(60, 60), overflowClip->clipRect().rect().size()); |
| 723 } | 723 } |
| 724 | 724 |
| 725 TEST_P(PaintPropertyTreeUpdateTest, Preserve3DChange) { |
| 726 setBodyInnerHTML( |
| 727 "<div id='parent'>" |
| 728 " <div id='child' style='transform: translate3D(1px, 2px, 3px)'></div>" |
| 729 "</div>"); |
| 730 |
| 731 auto* child = getLayoutObjectByElementId("child"); |
| 732 auto* transform = child->paintProperties()->transform(); |
| 733 EXPECT_TRUE(transform->flattensInheritedTransform()); |
| 734 |
| 735 document().getElementById("parent")->setAttribute( |
| 736 HTMLNames::styleAttr, "transform-style: preserve-3d"); |
| 737 document().view()->updateAllLifecyclePhases(); |
| 738 EXPECT_EQ(transform, child->paintProperties()->transform()); |
| 739 EXPECT_FALSE(transform->flattensInheritedTransform()); |
| 740 } |
| 741 |
| 725 } // namespace blink | 742 } // namespace blink |
| OLD | NEW |