Index: third_party/WebKit/Source/core/layout/LayoutTableCell.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp |
index 0fc9192c6c566f8e62a348534055b936b1872ee2..f1a72034116bd257f8b8c6a5a79c35cb5f2ddb81 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp |
@@ -999,4 +999,15 @@ bool LayoutTableCell::backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localR |
return LayoutBlockFlow::backgroundIsKnownToBeOpaqueInRect(localRect); |
} |
+LayoutUnit LayoutTableCell::calculatePaginationStrutToFitContent(LayoutUnit offset, LayoutUnit strutToNextPage, LayoutUnit contentLogicalHeight) const |
+{ |
+ // If break-inside:avoid/forbid is set on a cell we should avoid setting a strut on lines unless the cell is taller than the page, |
+ // in which case we've no choice but to allow it. This special-casing is needed because cells don't propagate struts like normal |
+ // layout blocks - the struts are managed directly by the section when it lays out rows and cells. |
+ LayoutUnit pageLogicalHeight = pageLogicalHeightForOffset(offset); |
+ if (toLayoutBox(parent())->getPaginationBreakability() != AllowAnyBreaks && table()->vBorderSpacing() + logicalHeight() + contentLogicalHeight < pageLogicalHeight) |
mstensho (USE GERRIT)
2016/04/04 21:05:39
I still think this looks strange. We have decided
|
+ return LayoutUnit(); |
+ return LayoutBlockFlow::calculatePaginationStrutToFitContent(offset, strutToNextPage, contentLogicalHeight); |
+} |
+ |
} // namespace blink |