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

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

Issue 2650873002: Refactor PaintLayer location and offset calculation especially for floats (Closed)
Patch Set: - Created 3 years, 11 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/PaintLayerTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp b/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp
index 3efb930a86ea17a6c9440608cd518bccf4f3e17d..59f4aec0704a2b8fb9b43a292dbcda7cf03a5137 100644
--- a/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintLayerTest.cpp
@@ -550,8 +550,11 @@ TEST_P(PaintLayerTest, FloatLayerAndAbsoluteUnderInlineLayer) {
toLayoutBoxModelObject(getLayoutObjectByElementId("container"))->layer();
EXPECT_EQ(span, floating->parent());
+ EXPECT_EQ(container, floating->containingLayer());
EXPECT_EQ(span, absolute->parent());
+ EXPECT_EQ(span, absolute->containingLayer());
EXPECT_EQ(container, span->parent());
+ EXPECT_EQ(container, span->containingLayer());
EXPECT_EQ(LayoutPoint(83, 83), floating->location());
EXPECT_EQ(LayoutPoint(50, 50), absolute->location());
@@ -582,6 +585,7 @@ TEST_P(PaintLayerTest, FloatLayerUnderBlockUnderInlineLayer) {
toLayoutBoxModelObject(getLayoutObjectByElementId("span"))->layer();
EXPECT_EQ(span, floating->parent());
+ EXPECT_EQ(span, floating->containingLayer());
EXPECT_EQ(LayoutPoint(83, 83), floating->location());
EXPECT_EQ(LayoutPoint(100, 100), span->location());

Powered by Google App Engine
This is Rietveld 408576698