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

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

Issue 2575423003: Fix geometry mapping issues for float under inline (Closed)
Patch Set: SVG floating 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/PaintPropertyTreeBuilderTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
index e7480ff8e45d51b1c885b130f2ae0d64ee6d60c2..573872ebd884a811dca6f7cb7b06b92c2e0baf8f 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
@@ -3196,4 +3196,27 @@ TEST_P(PaintPropertyTreeBuilderTest, EffectNodeAnimatedHasCompositorElementId) {
EXPECT_NE(CompositorElementId(), properties->effect()->compositorElementId());
}
+TEST_P(PaintPropertyTreeBuilderTest, FloatUnderInline) {
+ setBodyInnerHTML(
+ "<div style='position: absolute; top: 55px; left: 66px'>"
+ " <span id='span'"
+ " style='position: relative; top: 100px; left: 200px; opacity: 0.5'>"
+ " <div id='target' style='float: left; width: 33px; height: 44px'>"
+ " </div>"
+ " </span"
+ "</div>");
+
+ LayoutObject* span = getLayoutObjectByElementId("span");
+ const auto* effect = span->paintProperties()->effect();
+ ASSERT_TRUE(effect);
+ EXPECT_EQ(0.5f, effect->opacity());
+
+ LayoutObject* target = getLayoutObjectByElementId("target");
+ const auto* localBorderBoxProperties =
+ target->paintProperties()->localBorderBoxProperties();
+ ASSERT_TRUE(localBorderBoxProperties);
+ EXPECT_EQ(LayoutPoint(66, 55), localBorderBoxProperties->paintOffset);
+ EXPECT_EQ(effect, localBorderBoxProperties->propertyTreeState.effect());
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698