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

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

Issue 2729683002: Handle resize in PaintPropertyTreeBuilder::updateForObjectSizeAndLocation() (Closed)
Patch Set: - Created 3 years, 10 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/PaintPropertyTreeUpdateTests.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeUpdateTests.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeUpdateTests.cpp
index 83f20cf42d2496eb755d97ac9fea2365605032e4..3b4fdd895cd11f4a07f2730a88e10e6a44131731 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeUpdateTests.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeUpdateTests.cpp
@@ -679,4 +679,26 @@ TEST_P(PaintPropertyTreeUpdateTest, CSSClipDependingOnSize) {
clip->paintProperties()->cssClip()->clipRect().rect());
}
+TEST_P(PaintPropertyTreeUpdateTest, ScrollBounds) {
+ setBodyInnerHTML(
+ "<div id='container'"
+ " style='width: 100px; height: 100px; overflow: scroll'>"
+ " <div id='content' style='width: 200px; height: 200px'></div>"
+ "</div>");
+
+ auto* container = getLayoutObjectByElementId("container");
+ auto* scrollNode =
+ container->paintProperties()->scrollTranslation()->scrollNode();
+ EXPECT_EQ(IntSize(100, 100), scrollNode->clip());
+ EXPECT_EQ(IntSize(200, 200), scrollNode->bounds());
+
+ document().getElementById("content")->setAttribute(
+ HTMLNames::styleAttr, "width: 200px; height: 300px");
+ document().view()->updateAllLifecyclePhases();
+ EXPECT_EQ(scrollNode,
+ container->paintProperties()->scrollTranslation()->scrollNode());
+ EXPECT_EQ(IntSize(100, 100), scrollNode->clip());
+ EXPECT_EQ(IntSize(200, 300), scrollNode->bounds());
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698