| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 " background-attachment: fixed;" | 139 " background-attachment: fixed;" |
| 140 " }" | 140 " }" |
| 141 "</style>" | 141 "</style>" |
| 142 "<iframe></iframe>" | 142 "<iframe></iframe>" |
| 143 "<div id='fixedBackground' class='fixedBackground'></div>" | 143 "<div id='fixedBackground' class='fixedBackground'></div>" |
| 144 "<div id='forceScroll' style='height: 8888px;'></div>"); | 144 "<div id='forceScroll' style='height: 8888px;'></div>"); |
| 145 setChildFrameHTML( | 145 setChildFrameHTML( |
| 146 "<style>body { margin: 0; }</style>" | 146 "<style>body { margin: 0; }</style>" |
| 147 "<div id='forceScroll' style='height: 8888px;'></div>"); | 147 "<div id='forceScroll' style='height: 8888px;'></div>"); |
| 148 document().view()->updateAllLifecyclePhases(); | 148 document().view()->updateAllLifecyclePhases(); |
| 149 | |
| 150 FrameView* parent = document().view(); | 149 FrameView* parent = document().view(); |
| 151 EXPECT_TRUE(frameScroll(parent)->hasBackgroundAttachmentFixedDescendants()); | 150 EXPECT_TRUE(frameScroll(parent)->hasBackgroundAttachmentFixedDescendants()); |
| 152 FrameView* child = childDocument().view(); | 151 FrameView* child = childDocument().view(); |
| 153 EXPECT_TRUE(frameScroll(child)->hasBackgroundAttachmentFixedDescendants()); | 152 EXPECT_TRUE(frameScroll(child)->hasBackgroundAttachmentFixedDescendants()); |
| 154 | 153 |
| 155 // Removing a main thread scrolling reason should update the entire tree. | 154 // Removing a main thread scrolling reason should update the entire tree. |
| 156 auto* fixedBackground = document().getElementById("fixedBackground"); | 155 auto* fixedBackground = document().getElementById("fixedBackground"); |
| 157 fixedBackground->removeAttribute(HTMLNames::classAttr); | 156 fixedBackground->removeAttribute(HTMLNames::classAttr); |
| 158 document().view()->updateAllLifecyclePhases(); | 157 document().view()->updateAllLifecyclePhases(); |
| 159 EXPECT_FALSE(frameScroll(parent)->hasBackgroundAttachmentFixedDescendants()); | 158 EXPECT_FALSE(frameScroll(parent)->hasBackgroundAttachmentFixedDescendants()); |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 EXPECT_TRUE(transform->flattensInheritedTransform()); | 732 EXPECT_TRUE(transform->flattensInheritedTransform()); |
| 734 | 733 |
| 735 document().getElementById("parent")->setAttribute( | 734 document().getElementById("parent")->setAttribute( |
| 736 HTMLNames::styleAttr, "transform-style: preserve-3d"); | 735 HTMLNames::styleAttr, "transform-style: preserve-3d"); |
| 737 document().view()->updateAllLifecyclePhases(); | 736 document().view()->updateAllLifecyclePhases(); |
| 738 EXPECT_EQ(transform, child->paintProperties()->transform()); | 737 EXPECT_EQ(transform, child->paintProperties()->transform()); |
| 739 EXPECT_FALSE(transform->flattensInheritedTransform()); | 738 EXPECT_FALSE(transform->flattensInheritedTransform()); |
| 740 } | 739 } |
| 741 | 740 |
| 742 } // namespace blink | 741 } // namespace blink |
| OLD | NEW |