Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| index c48220c9b982670f937e3d025d61a06373815254..35f75a72a61146a7cab3d8efc29ee8ea6ef17103 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp |
| @@ -1482,15 +1482,15 @@ bool LayoutBox::intersectsVisibleViewport() |
| PaintInvalidationReason LayoutBox::invalidatePaintIfNeeded(PaintInvalidationState& paintInvalidationState, const LayoutBoxModelObject& paintInvalidationContainer) |
| { |
| - if (isFloating()) |
| - paintInvalidationState.enclosingSelfPaintingLayer(*this).setNeedsPaintPhaseFloat(); |
| - |
| - if (hasBoxDecorationBackground() |
| - // We also paint overflow controls in background phase. |
| - || (hasOverflowClip() && scrollableArea()->hasOverflowControls())) { |
| - PaintLayer& layer = paintInvalidationState.enclosingSelfPaintingLayer(*this); |
| - if (layer.layoutObject() != this) |
| - layer.setNeedsPaintPhaseDescendantBlockBackgrounds(); |
| + PaintLayer& enclosingSelfPaintingLayer = paintInvalidationState.enclosingSelfPaintingLayer(*this); |
| + if (enclosingSelfPaintingLayer.layoutObject() != this) { |
| + if (isFloating()) |
| + enclosingSelfPaintingLayer.setNeedsPaintPhaseFloat(); |
|
Xianzhu
2016/03/08 22:08:42
This change is because a self-painting floating la
|
| + |
| + if (hasBoxDecorationBackground() |
| + // We also paint overflow controls in background phase. |
| + || (hasOverflowClip() && scrollableArea()->hasOverflowControls())) |
| + enclosingSelfPaintingLayer.setNeedsPaintPhaseDescendantBlockBackgrounds(); |
|
chrishtr
2016/03/09 03:40:47
A self-painting layer also doesn't need PaintPhase
Xianzhu
2016/03/09 21:39:52
Right. The layer paints its own background in Pain
|
| } |
| PaintInvalidationReason fullInvalidationReason = fullPaintInvalidationReason(); |