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

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: First round of rebaseline-cl Created 3 years, 9 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 2bde0f0ab436ca7d0be1c675afd42fcd2e7431d8..c7bef6819474dc71ccaa57ad055425335ec8efed 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableSection.cpp
@@ -1280,11 +1280,8 @@ void LayoutTableSection::computeOverflowFromCells(unsigned totalRows,
for (unsigned r = 0; r < totalRows; r++) {
unsigned nCols = numCols(r);
for (unsigned c = 0; c < nCols; c++) {
- CellStruct& cs = cellAt(r, c);
- LayoutTableCell* cell = cs.primaryCell();
- if (!cell || cs.inColSpan)
- continue;
- if (r < totalRows - 1 && cell == primaryCellAt(r + 1, c))
+ const auto* cell = originatingCellAt(r, c);
chrishtr 2017/03/31 22:59:06 Why the changes here?
Xianzhu 2017/03/31 23:26:30 I added originatingCellAt() in a previous CL. The
+ if (!cell)
continue;
addOverflowFromChild(cell);
#if DCHECK_IS_ON()
@@ -1530,7 +1527,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);
@@ -2138,4 +2135,13 @@ bool LayoutTableSection::mapToVisualRectInAncestorSpaceInternal(
ancestor, transformState, flags);
}
+bool LayoutTableSection::paintedOutputOfObjectHasNoEffectRegardlessOfSize()
+ const {
+ // LayoutTableSection paints background from columns.
+ if (table()->hasColElements())
wkorman 2017/03/31 22:15:41 Sometimes I expect table might have col elements b
Xianzhu 2017/03/31 23:26:30 paintedOutputOfObjectHasNoEffectRegardlessOfSize()
+ return false;
+ return LayoutTableBoxComponent::
+ paintedOutputOfObjectHasNoEffectRegardlessOfSize();
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698