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

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

Issue 2524733005: Ensure paint properties are rebuilt on window resizes (Closed)
Patch Set: Rebase Created 4 years, 1 month 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/PaintPropertyTreeBuilderTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
index a59dfd7f14d247d09a4ec8cfe823569b78df22fb..6ab437c8e08209c143276029ff0081767271a465 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
@@ -2931,4 +2931,18 @@ TEST_P(PaintPropertyTreeBuilderTest, DescendantNeedsUpdateAcrossFrames) {
EXPECT_FALSE(innerDivWithTransform->descendantNeedsPaintPropertyUpdate());
}
+TEST_P(PaintPropertyTreeBuilderTest, UpdatingFrameViewContentClip) {
+ setBodyInnerHTML("hello world.");
+ EXPECT_EQ(FloatRoundedRect(0, 0, 800, 600), frameContentClip()->clipRect());
+ document().view()->resize(800, 599);
+ document().view()->updateAllLifecyclePhases();
+ EXPECT_EQ(FloatRoundedRect(0, 0, 800, 599), frameContentClip()->clipRect());
+ document().view()->resize(800, 600);
+ document().view()->updateAllLifecyclePhases();
+ EXPECT_EQ(FloatRoundedRect(0, 0, 800, 600), frameContentClip()->clipRect());
+ document().view()->resize(5, 5);
+ document().view()->updateAllLifecyclePhases();
+ EXPECT_EQ(FloatRoundedRect(0, 0, 5, 5), frameContentClip()->clipRect());
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698