| Index: Source/core/layout/LayoutBlockFlow.cpp
|
| diff --git a/Source/core/layout/LayoutBlockFlow.cpp b/Source/core/layout/LayoutBlockFlow.cpp
|
| index a17579a659121ceb0e7d760f61a1d7c7a88f2fb2..33114e7ebedcb0be4bb28bc899de7a3c27c2b25c 100644
|
| --- a/Source/core/layout/LayoutBlockFlow.cpp
|
| +++ b/Source/core/layout/LayoutBlockFlow.cpp
|
| @@ -775,14 +775,8 @@ void LayoutBlockFlow::adjustLinePositionForPagination(RootInlineBox& lineBox, La
|
| lineBox.setPaginationStrut(0);
|
| lineBox.setIsFirstAfterPageBreak(false);
|
| LayoutUnit pageLogicalHeight = pageLogicalHeightForOffset(logicalOffset);
|
| - bool hasUniformPageLogicalHeight = !flowThread || flowThread->columnSetsHaveUniformLogicalHeight();
|
| - // If lineHeight is greater than pageLogicalHeight, but logicalVisualOverflow.height() still fits, we are
|
| - // still going to add a strut, so that the visible overflow fits on a single page.
|
| - if (!pageLogicalHeight || (hasUniformPageLogicalHeight && logicalVisualOverflow.height() > pageLogicalHeight)) {
|
| - // FIXME: In case the line aligns with the top of the page (or it's slightly shifted downwards) it will not be marked as the first line in the page.
|
| - // From here, the fix is not straightforward because it's not easy to always determine when the current line is the first in the page.
|
| + if (!pageLogicalHeight)
|
| return;
|
| - }
|
| LayoutUnit remainingLogicalHeight = pageRemainingLogicalHeightForOffset(logicalOffset, ExcludePageBoundary);
|
|
|
| int lineIndex = lineCount(&lineBox);
|
| @@ -796,7 +790,7 @@ void LayoutBlockFlow::adjustLinePositionForPagination(RootInlineBox& lineBox, La
|
| remainingLogicalHeight -= std::min(lineHeight - pageLogicalHeight, std::max<LayoutUnit>(0, logicalVisualOverflow.y() - lineBox.lineTopWithLeading()));
|
| }
|
| LayoutUnit totalLogicalHeight = lineHeight + std::max<LayoutUnit>(0, logicalOffset);
|
| - LayoutUnit pageLogicalHeightAtNewOffset = hasUniformPageLogicalHeight ? pageLogicalHeight : pageLogicalHeightForOffset(logicalOffset + remainingLogicalHeight);
|
| + LayoutUnit pageLogicalHeightAtNewOffset = pageLogicalHeightForOffset(logicalOffset + remainingLogicalHeight);
|
| setPageBreak(logicalOffset, lineHeight - remainingLogicalHeight);
|
| if (((lineBox == firstRootBox() && totalLogicalHeight < pageLogicalHeightAtNewOffset) || (!style()->hasAutoOrphans() && style()->orphans() >= lineIndex))
|
| && !isOutOfFlowPositioned() && !isTableCell()) {
|
| @@ -826,7 +820,7 @@ LayoutUnit LayoutBlockFlow::adjustForUnsplittableChild(LayoutBox& child, LayoutU
|
| LayoutUnit childLogicalHeight = logicalHeightForChild(child) + (includeMargins ? marginBeforeForChild(child) + marginAfterForChild(child) : LayoutUnit());
|
| LayoutUnit pageLogicalHeight = pageLogicalHeightForOffset(logicalOffset);
|
| updateMinimumPageHeight(logicalOffset, childLogicalHeight);
|
| - if (!pageLogicalHeight || childLogicalHeight > pageLogicalHeight)
|
| + if (!pageLogicalHeight)
|
| return logicalOffset;
|
| LayoutUnit remainingLogicalHeight = pageRemainingLogicalHeightForOffset(logicalOffset, ExcludePageBoundary);
|
| if (remainingLogicalHeight < childLogicalHeight)
|
|
|