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

Unified Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.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/PaintPropertyTreeBuilder.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
index d49e0388828d5b037d8eb5184e5a69d345ddb391..41f0d7b0ae0905906d4a0faa21879ea1b77c246a 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
@@ -804,6 +804,9 @@ void PaintPropertyTreeBuilder::updateScrollAndScrollTranslation(
void PaintPropertyTreeBuilder::updateOutOfFlowContext(
const LayoutObject& object,
PaintPropertyTreeBuilderContext& context) {
+ if (object.isLayoutBlock())
+ context.paintOffsetForFloat = context.current.paintOffset;
+
if (object.canContainAbsolutePositionObjects()) {
context.absolutePosition = context.current;
context.containerForAbsolutePosition = &object;
@@ -898,6 +901,10 @@ void PaintPropertyTreeBuilder::updateContextForBoxPosition(
return;
const LayoutBoxModelObject& boxModelObject = toLayoutBoxModelObject(object);
+
+ if (boxModelObject.isFloating())
+ context.current.paintOffset = context.paintOffsetForFloat;
+
switch (object.styleRef().position()) {
case StaticPosition:
break;

Powered by Google App Engine
This is Rietveld 408576698