Chromium Code Reviews| 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 53706edb310dded7ec14855f7707cb77bc7b31b6..d8e6e7f2eced417e7755414247171fb11726c4fa 100644 |
| --- a/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp |
| +++ b/third_party/WebKit/Source/core/paint/PaintInvalidator.cpp |
| @@ -214,7 +214,16 @@ void PaintInvalidator::updatePaintingLayer(const LayoutObject& object, |
| if (object.isLayoutBlockFlow() && toLayoutBlockFlow(object).containsFloats()) |
| context.paintingLayer->setNeedsPaintPhaseFloat(); |
| - if (&object == &context.paintingLayer->layoutObject()) |
| + // Table collapsed borders are painted in PaintPhaseDescendantBlockBackgrounds |
| + // on the table's layer. |
| + if (object.isTable()) { |
| + const LayoutTable& table = toLayoutTable(object); |
| + if (table.collapseBorders() && !table.collapsedBorders().isEmpty()) |
| + context.paintingLayer->setNeedsPaintPhaseDescendantBlockBackgrounds(); |
|
wkorman
2017/02/27 19:46:23
LayoutTable::invalidatePaintIfNeeded already does
Xianzhu
2017/02/27 20:22:49
LayoutTable::invalidatePaintIfNeeded(PaintInvalida
|
| + } |
| + |
| + // The following flags are for descendants of the layer object only. |
| + if (object == context.paintingLayer->layoutObject()) |
|
wkorman
2017/02/27 19:46:23
Why change from pointer to operator==? Are there p
Xianzhu
2017/02/27 20:22:49
They are the same in binary code, but omitting '&'
|
| return; |
| if (object.styleRef().hasOutline()) |
| @@ -226,12 +235,6 @@ void PaintInvalidator::updatePaintingLayer(const LayoutObject& object, |
| toLayoutBox(object).getScrollableArea()->hasOverflowControls())) { |
| context.paintingLayer->setNeedsPaintPhaseDescendantBlockBackgrounds(); |
| } |
| - |
| - if (object.isTable()) { |
| - const LayoutTable& table = toLayoutTable(object); |
| - if (table.collapseBorders() && !table.collapsedBorders().isEmpty()) |
| - context.paintingLayer->setNeedsPaintPhaseDescendantBlockBackgrounds(); |
| - } |
| } |
| namespace { |