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

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

Issue 2642763009: Fix paint and rect mapping issues for stacked float under stacked inline (Closed)
Patch Set: 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 dc256f86bc459a90c1cb4fa77ffc1e3c30e002b0..6c2c42264f88ae14ee5eaca4d64c66d3deacb35a 100644
--- a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp
@@ -198,7 +198,8 @@ void PaintInvalidator::updatePaintingLayer(const LayoutObject& object,
toLayoutBoxModelObject(object).hasSelfPaintingLayer()) {
context.paintingLayer = toLayoutBoxModelObject(object).layer();
} else if (object.isColumnSpanAll() ||
- (object.isFloating() && !object.parent()->isLayoutBlock())) {
+ (object.isFloating() &&
+ !object.parent()->canContainFloatingObject(object))) {
// See LayoutObject::paintingLayer() for the special-cases of floating under
// inline and multicolumn.
context.paintingLayer = object.paintingLayer();
@@ -270,9 +271,10 @@ void PaintInvalidator::updateContext(const LayoutObject& object,
if (object.isPaintInvalidationContainer()) {
context.paintInvalidationContainer = toLayoutBoxModelObject(&object);
- if (object.styleRef().isStackingContext())
+ if (object.styleRef().isStackingContext()) {
context.paintInvalidationContainerForStackedContents =
toLayoutBoxModelObject(&object);
+ }
} else if (object.isLayoutView()) {
// paintInvalidationContainerForStackedContents is only for stacked
// descendants in its own frame, because it doesn't establish stacking
@@ -281,13 +283,10 @@ void PaintInvalidator::updateContext(const LayoutObject& object,
// this frame's paintInvalidationContainer.
context.paintInvalidationContainerForStackedContents =
context.paintInvalidationContainer;
- if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled())
+ 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.
@@ -301,9 +300,14 @@ void PaintInvalidator::updateContext(const LayoutObject& object,
context.paintInvalidationContainerForStackedContents;
if (context.forcedSubtreeInvalidationFlags &
PaintInvalidatorContext::
- ForcedSubtreeFullInvalidationForStackedContents)
+ ForcedSubtreeFullInvalidationForStackedContents) {
context.forcedSubtreeInvalidationFlags |=
PaintInvalidatorContext::ForcedSubtreeFullInvalidation;
+ }
+ } else if (object.isFloating() &&
+ !object.parent()->canContainFloatingObject(object)) {
+ context.paintInvalidationContainer =
+ &object.containerForPaintInvalidation();
}
if (object == context.paintInvalidationContainer) {

Powered by Google App Engine
This is Rietveld 408576698