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

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

Issue 2717273003: Fix collapsed-border painting for layered table and cells (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/tables/collapsed-border-layered-table-and-cells-expected.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/tables/collapsed-border-layered-table-and-cells-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698