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

Unified Diff: third_party/WebKit/Source/core/paint/PaintInvalidator.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/PaintInvalidator.cpp
diff --git a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
index 47ef71c74eebf919da0864f3e618aaae895a540f..72547e270f605616295f3daf3535b9a8e8f138bb 100644
--- a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
@@ -200,8 +200,12 @@ LayoutPoint PaintInvalidator::computeLocationInBacking(
void PaintInvalidator::updatePaintingLayer(const LayoutObject& object,
PaintInvalidatorContext& context) {
if (object.hasLayer() &&
- toLayoutBoxModelObject(object).hasSelfPaintingLayer())
+ toLayoutBoxModelObject(object).hasSelfPaintingLayer()) {
context.paintingLayer = toLayoutBoxModelObject(object).layer();
+ } else if (object.isFloating() && !object.parent()->isLayoutBlock()) {
+ // See LayoutObject::paintingLayer() for specialty of floating objects.
+ context.paintingLayer = object.paintingLayer();
+ }
if (object.isLayoutBlockFlow() && toLayoutBlockFlow(object).containsFloats())
context.paintingLayer->setNeedsPaintPhaseFloat();
@@ -283,6 +287,10 @@ void PaintInvalidator::updateContext(const LayoutObject& object,
if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled())
undoFrameViewContentClipAndScroll.emplace(
*toLayoutView(object).frameView(), context);
+ } else if (object.isFloating() && !object.parent()->isLayoutBlock()) {
+ // See LayoutObject::paintingLayer() for specialty of floating objects.
+ context.paintInvalidationContainer =
+ &object.containerForPaintInvalidation();
} else if (object.styleRef().isStacked() &&
// This is to exclude some objects (e.g. LayoutText) inheriting
// stacked style from parent but aren't actually stacked.

Powered by Google App Engine
This is Rietveld 408576698