Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(645)

Unified Diff: third_party/WebKit/Source/core/paint/PaintInvalidationTest.cpp

Issue 2733773004: Add check for missing visual rect updates and fix failures (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/paint/PaintInvalidator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698