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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTableSection.cpp

Issue 2786463004: Paint backgrounds of a table section/row in one display item (Closed)
Patch Set: - Created 3 years, 8 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/layout/LayoutTableSection.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
index 85cac82a0d68b7001882c944dffcc5e1c70cd521..b69c80e486aa07796a579bd0646dfc172924b5d7 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
@@ -1275,10 +1275,10 @@ void LayoutTableSection::computeOverflowFromCells(unsigned totalRows,
for (unsigned r = 0; r < totalRows; r++) {
unsigned nCols = numCols(r);
for (unsigned c = 0; c < nCols; c++) {
- auto* cell = originatingCellAt(r, c);
+ const auto* cell = originatingCellAt(r, c);
if (!cell)
continue;
- addOverflowFromChild(cell);
+ addOverflowFromChild(*cell);
#if DCHECK_IS_ON()
hasOverflowingCell |= cell->hasVisualOverflow();
#endif
@@ -1521,7 +1521,7 @@ LayoutRect LayoutTableSection::logicalRectForWritingModeAndDirection(
CellSpan LayoutTableSection::dirtiedRows(const LayoutRect& damageRect) const {
if (m_forceSlowPaintPathWithOverflowingCell)
- return fullTableRowSpan();
+ return fullSectionRowSpan();
if (!m_grid.size())
return CellSpan(0, 0);
@@ -2129,4 +2129,13 @@ bool LayoutTableSection::mapToVisualRectInAncestorSpaceInternal(
ancestor, transformState, flags);
}
+bool LayoutTableSection::paintedOutputOfObjectHasNoEffectRegardlessOfSize()
+ const {
+ // LayoutTableSection paints background from columns.
+ if (table()->hasColElements())
+ return false;
+ return LayoutTableBoxComponent::
+ paintedOutputOfObjectHasNoEffectRegardlessOfSize();
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableSection.h ('k') | third_party/WebKit/Source/core/paint/PaintInvalidator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698