Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/PaintInvalidationTest.cpp |
| diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidationTest.cpp b/third_party/WebKit/Source/core/paint/PaintInvalidationTest.cpp |
| index 5743de1bcad50ecfccb442d6d6bfd859ae7a6ba5..ac414b599265de2c20dfe177e6b5bacf29e9e458 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintInvalidationTest.cpp |
| +++ b/third_party/WebKit/Source/core/paint/PaintInvalidationTest.cpp |
| @@ -52,6 +52,23 @@ TEST_F(PaintInvalidationTest, RecalcOverflowInvalidatesBackground) { |
| EXPECT_TRUE(document().layoutView()->mayNeedPaintInvalidation()); |
| } |
| +TEST_F(PaintInvalidationTest, UpdateVisualRectOnFrameBorderWidthChange) { |
| + setBodyInnerHTML( |
|
chrishtr
2017/03/06 22:44:27
if (REF::rootLayerScrollingEnabled())
return
?
Xianzhu
2017/03/07 00:22:08
This test should still pass for rootLayerScrolling
|
| + "<style>" |
| + " body { margin: 0 }" |
| + " iframe { width: 100px; height: 100px; border: none; }" |
| + "</style>" |
| + "<iframe id='iframe'></iframe>"); |
| + |
| + Element* iframe = document().getElementById("iframe"); |
| + LayoutView* childLayoutView = childDocument().layoutView(); |
| + EXPECT_EQ(LayoutRect(0, 0, 100, 100), childLayoutView->visualRect()); |
| + |
| + iframe->setAttribute(HTMLNames::styleAttr, "border: 20px solid blue"); |
| + document().view()->updateAllLifecyclePhases(); |
| + EXPECT_EQ(LayoutRect(20, 20, 100, 100), childLayoutView->visualRect()); |
| +}; |
| + |
| } // namespace |
| } // namespace blink |