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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp

Issue 2575423003: Fix geometry mapping issues for float under inline (Closed)
Patch Set: - Created 4 years 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/layout/LayoutObjectTest.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp b/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp
index 36827167359ab6bb0afe50fedaec2933813ac38d..44298690ba792968c18ab30282c7035165831c36 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp
@@ -124,6 +124,31 @@ TEST_F(LayoutObjectTest, PaintingLayerOfOverflowClipLayerUnderColumnSpanAll) {
EXPECT_EQ(columns->layer(), overflowClipObject->paintingLayer());
}
+TEST_F(LayoutObjectTest, FloatUnderInline) {
chrishtr 2016/12/16 22:10:30 Please add more float examples to test your change
Xianzhu 2016/12/17 05:43:18 Added a FloatUnderBlock case, and added test for c
+ enableCompositing();
+ setBodyInnerHTML(
+ "<div id='layered-div' style='position: absolute'>"
+ " <div id='container'>"
+ " <span id='layered-span' style='position: relative'>"
+ " <div id='floating' style='float: left'>FLOAT</div>"
+ " </span>"
+ " </div>"
+ "</div>");
+
+ LayoutBoxModelObject* layeredDiv =
+ toLayoutBoxModelObject(getLayoutObjectByElementId("layered-div"));
+ LayoutBoxModelObject* container =
+ toLayoutBoxModelObject(getLayoutObjectByElementId("container"));
+ LayoutBoxModelObject* layeredSpan =
+ toLayoutBoxModelObject(getLayoutObjectByElementId("layered-span"));
+ LayoutObject* floating = getLayoutObjectByElementId("floating");
+
+ EXPECT_EQ(layeredDiv->layer(), layeredDiv->paintingLayer());
+ EXPECT_EQ(layeredSpan->layer(), layeredSpan->paintingLayer());
+ EXPECT_EQ(layeredDiv->layer(), floating->paintingLayer());
+ EXPECT_EQ(container, floating->container());
+}
+
namespace {
class ScopedSPv2 {

Powered by Google App Engine
This is Rietveld 408576698