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

Unified Diff: Source/core/rendering/RenderTableRow.cpp

Issue 673533002: Table rows are not totally invalidated after r170349 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update first comment after Dan's review (forgot to do it) Created 6 years, 2 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 | « Source/core/rendering/RenderTableRow.h ('k') | Source/core/rendering/RenderTableSection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderTableRow.cpp
diff --git a/Source/core/rendering/RenderTableRow.cpp b/Source/core/rendering/RenderTableRow.cpp
index 4639668a44cd4d423c367e3d208a6f67b18865d1..8cc0af283c87ee7576270bc3586cec13b7ab794d 100644
--- a/Source/core/rendering/RenderTableRow.cpp
+++ b/Source/core/rendering/RenderTableRow.cpp
@@ -181,6 +181,8 @@ void RenderTableRow::layout()
m_overflow.clear();
addVisualEffectOverflow();
+ // We do not call addOverflowFromCell here. The cell are laid out to be
+ // measured above and will be sized correctly in a follow-up phase.
// We only ever need to issue paint invalidations if our cells didn't, which means that they didn't need
// layout, so we know that our bounds didn't change. This code is just making up for
@@ -244,4 +246,22 @@ RenderTableRow* RenderTableRow::createAnonymousWithParentRenderer(const RenderOb
return newRow;
}
+void RenderTableRow::addOverflowFromCell(const RenderTableCell* cell)
+{
+ // Non-row-spanning-cells don't create overflow (they are fully contained within this row).
+ if (cell->rowSpan() == 1)
+ return;
+
+ // Cells only generates visual overflow.
+ LayoutRect cellVisualOverflowRect = cell->visualOverflowRectForPropagation(style());
+
+ // The cell and the row share the section's coordinate system. However
+ // the visual overflow should be determined in the coordinate system of
+ // the row, that's why we shift it below.
+ LayoutUnit cellOffsetLogicalTopDifference = cell->location().y() - location().y();
+ cellVisualOverflowRect.move(0, cellOffsetLogicalTopDifference);
+
+ addVisualOverflow(cellVisualOverflowRect);
+}
+
} // namespace blink
« no previous file with comments | « Source/core/rendering/RenderTableRow.h ('k') | Source/core/rendering/RenderTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698