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

Unified Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.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/paint/PaintPropertyTreeBuilderTest.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
index c5b5f979fe69e30528d669d964492e8869bcf052..642ed5c9a0d5620b22b50ebd404924d4af200ec1 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
@@ -3220,6 +3220,27 @@ TEST_P(PaintPropertyTreeBuilderTest,
!div->layoutObject()->paintProperties()->overflowClip());
}
+TEST_P(PaintPropertyTreeBuilderTest, FloatUnderInline) {
+ setBodyInnerHTML(
+ "<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>");
+
+ 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(8, 8), localBorderBoxProperties->paintOffset);
chrishtr 2016/12/16 22:10:30 * { margin: 0 }
Xianzhu 2016/12/17 05:43:18 Added an absolute position div container to ensure
+ EXPECT_EQ(effect, localBorderBoxProperties->propertyTreeState.effect());
+}
+
// A basic sanity check for over-invalidation of paint properties.
TEST_P(PaintPropertyTreeBuilderTest, NoPaintPropertyUpdateOnBackgroundChange) {
setBodyInnerHTML("<div id='div' style='background-color: blue'>DIV</div>");

Powered by Google App Engine
This is Rietveld 408576698