| 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) {
|
|
|