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

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

Issue 2060103002: Use the correct height on cells when calculating row height in paged contexts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bug 617443 Created 4 years, 6 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/platform/linux/printing/thead-repeats-at-top-of-each-page-expected.txt ('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/layout/LayoutTableRow.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableRow.cpp b/third_party/WebKit/Source/core/layout/LayoutTableRow.cpp
index c63007719465c5a0a5efd43a6d44b3429359d571..160e3ebca432e1aed15584bd0cae6caf8128f32d 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableRow.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableRow.cpp
@@ -176,6 +176,13 @@ void LayoutTableRow::layout()
cell->markForPaginationRelayoutIfNeeded(layouter);
if (cell->needsLayout())
cell->layout();
+ // We're laying out each cell here to establish its raw logical height so it can be used to
+ // figure out the row's height and baseline later on in layoutRows(). As part of that we
+ // will layout the cell again if we're in a paginated context and come up with the
+ // correct strut. Any strut we come up with here will depend on the old paged layout and will
+ // give the cell an invalid height that is not useful for figuring out the raw height of the row.
+ if (cell->firstRootBox() && cell->firstRootBox()->paginationStrut())
+ cell->setLogicalHeight(cell->logicalHeight() - cell->firstRootBox()->paginationStrut());
}
m_overflow.reset();
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/linux/printing/thead-repeats-at-top-of-each-page-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698