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

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

Issue 2079603002: Handle nested theads correctly when paginated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bug 620456 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
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 507970f86467939802e1342e2d09700aad806025..b3dd7c8af4931593b4bcdf1e0623b93d27e8154e 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTable.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
@@ -536,12 +536,18 @@ void LayoutTable::layout()
distributeExtraLogicalHeight(floorToInt(computedLogicalHeight - totalSectionLogicalHeight));
+ bool isPaginated = view()->layoutState()->isPaginated();
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 (isPaginated && m_head && m_head == section) {
+ LayoutUnit offsetForTableHeaders = state.heightOffsetForTableHeaders();
+ offsetForTableHeaders += section->logicalHeight();
+ state.setHeightOffsetForTableHeaders(offsetForTableHeaders);
+ }
}
if (!topSection && computedLogicalHeight > totalSectionLogicalHeight && !document().inQuirksMode()) {
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutState.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTableSection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698