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

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

Issue 2426553004: Clean up break-inside restriction propagation from table headers. (Closed)
Patch Set: Created 4 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
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 8215fdb98b428b7a0c9a06eb3ac3b8197e22035c..4c98410cef2bf815338d9fd1597b35af6e62610a 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableRow.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableRow.cpp
@@ -258,6 +258,19 @@ bool LayoutTableRow::nodeAtPoint(HitTestResult& result,
return false;
}
+LayoutBox::PaginationBreakability LayoutTableRow::getPaginationBreakability()
+ const {
+ PaginationBreakability breakability =
+ LayoutTableBoxComponent::getPaginationBreakability();
+ if (breakability == AllowAnyBreaks) {
+ // Even if the row allows us to break inside, we will want to prevent that
+ // if we have a header group that wants to appear at the top of each page.
+ if (const LayoutTableSection* header = table()->header())
+ breakability = header->getPaginationBreakability();
+ }
+ return breakability;
+}
+
void LayoutTableRow::paint(const PaintInfo& paintInfo,
const LayoutPoint& paintOffset) const {
TableRowPainter(*this).paint(paintInfo, paintOffset);
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableRow.h ('k') | third_party/WebKit/Source/core/layout/LayoutTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698