Changeset 116986 in webkit
- Timestamp:
- May 14, 2012 1:04:37 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r116985 r116986 1 2012-05-14 Dan Bernstein <mitz@apple.com> 2 3 Pagination splits lines that could fit on a single page if it were not for their top leading 4 https://bugs.webkit.org/show_bug.cgi?id=86388 5 6 Reviewed by Darin Adler. 7 8 * fast/multicol/split-in-top-margin-expected.html: Added. 9 * fast/multicol/split-in-top-margin.html: Added. 10 1 11 2012-05-14 Joshua Bell <jsbell@chromium.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r116983 r116986 1 2012-05-14 Dan Bernstein <mitz@apple.com> 2 3 Pagination splits lines that could fit on a single page if it were not for their top leading 4 https://bugs.webkit.org/show_bug.cgi?id=86388 5 6 Reviewed by Darin Adler. 7 8 Test: fast/multicol/split-in-top-margin.html 9 10 When a line’s visible content fits on a page, but adding the top leading makes it taller than 11 a page, instead of giving up and splitting the line in an arbitrary position, add a strut 12 to push it downwards so that the split occurs in the top leading, and the visible content is 13 fully contained on a single page. 14 15 * rendering/RenderBlock.cpp: 16 (WebCore::RenderBlock::adjustLinePositionForPagination): 17 1 18 2012-05-14 Terry Anderson <tdanderson@chromium.org> 2 19 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r116798 r116986 6774 6774 LayoutUnit pageLogicalHeight = pageLogicalHeightForOffset(logicalOffset); 6775 6775 bool hasUniformPageLogicalHeight = !inRenderFlowThread() || enclosingRenderFlowThread()->regionsHaveUniformLogicalHeight(); 6776 if (!pageLogicalHeight || (hasUniformPageLogicalHeight && lineHeight > pageLogicalHeight) 6776 // If lineHeight is greater than pageLogicalHeight, but logicalVisualOverflow.height() still fits, we are 6777 // still going to add a strut, so that the visible overflow fits on a single page. 6778 if (!pageLogicalHeight || (hasUniformPageLogicalHeight && logicalVisualOverflow.height() > pageLogicalHeight) 6777 6779 || !hasNextPage(logicalOffset)) 6778 6780 return; … … 6782 6784 if (!hasUniformPageLogicalHeight && !pushToNextPageWithMinimumLogicalHeight(remainingLogicalHeight, logicalOffset, lineHeight)) 6783 6785 return; 6786 if (lineHeight > pageLogicalHeight) { 6787 // Split the top margin in order to avoid splitting the visible part of the line. 6788 remainingLogicalHeight -= min(lineHeight - pageLogicalHeight, max(ZERO_LAYOUT_UNIT, logicalVisualOverflow.y() - lineBox->lineTopWithLeading())); 6789 } 6784 6790 LayoutUnit totalLogicalHeight = lineHeight + max(ZERO_LAYOUT_UNIT, logicalOffset); 6785 6791 LayoutUnit pageLogicalHeightAtNewOffset = hasUniformPageLogicalHeight ? pageLogicalHeight : pageLogicalHeightForOffset(logicalOffset + remainingLogicalHeight);
Note: See TracChangeset
for help on using the changeset viewer.