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

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

Issue 2076413002: Handle pagination breaking on rows correctly when a table has >1 section (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@345972
Patch Set: bug 621359 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/fragmentation/single-line-cells-in-multiple-table-sections-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/LayoutTable.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTable.cpp b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
index 6febb8197d75b049dc4d25fa852f59efa1fa805f..2ea24920d5472b03134079d6df36f86c064f7b1c 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTable.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
@@ -535,10 +535,15 @@ void LayoutTable::layout()
distributeExtraLogicalHeight(floorToInt(computedLogicalHeight - totalSectionLogicalHeight));
- for (LayoutTableSection* section = topSection(); section; section = sectionBelow(section))
+ LayoutTableSection* topSection = this->topSection();
+ LayoutUnit logicalOffset = topSection ? topSection->logicalTop() : LayoutUnit();
+ for (LayoutTableSection* section = topSection; section; section = sectionBelow(section)) {
+ section->setLogicalTop(logicalOffset);
section->layoutRows();
+ logicalOffset += section->logicalHeight();
+ }
- if (!topSection() && computedLogicalHeight > totalSectionLogicalHeight && !document().inQuirksMode()) {
+ if (!topSection && computedLogicalHeight > totalSectionLogicalHeight && !document().inQuirksMode()) {
// Completely empty tables (with no sections or anything) should at least honor specified height
// in strict mode.
setLogicalHeight(logicalHeight() + computedLogicalHeight);
@@ -549,7 +554,7 @@ void LayoutTable::layout()
sectionLogicalLeft += style()->isLeftToRightDirection() ? paddingStart() : paddingEnd();
// position the table sections
- LayoutTableSection* section = topSection();
+ LayoutTableSection* section = topSection;
while (section) {
if (!sectionMoved && section->logicalTop() != logicalHeight())
sectionMoved = true;
« no previous file with comments | « third_party/WebKit/LayoutTests/fragmentation/single-line-cells-in-multiple-table-sections-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698