Changeset 176285 in webkit
- Timestamp:
- Nov 18, 2014, 2:40:29 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/multicol/orphans-negative-line-spacing-expected.html (added)
-
LayoutTests/fast/multicol/orphans-negative-line-spacing.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderBlockFlow.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r176282 r176285 1 2014-11-18 Myles C. Maxfield <litherum@gmail.com> 2 3 Multicolumn layout with negative line spacing and orphans causes pieces of letters to be shown at the bottom of columns 4 https://bugs.webkit.org/show_bug.cgi?id=138204 5 6 Reviewed by Dave Hyatt. 7 8 Create a layout where the "orphans" css property causes a block element to 9 be pushed to the next column. 10 11 * fast/multicol/orphans-negative-line-spacing-expected.html: Added. 12 * fast/multicol/orphans-negative-line-spacing.html: Added. 13 1 14 2014-11-18 Chris Dumez <cdumez@apple.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r176282 r176285 1 2014-11-18 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Multicolumn layout with negative line spacing and orphans causes pieces of letters to be shown at the bottom of columns 4 https://bugs.webkit.org/show_bug.cgi?id=138204 5 6 Reviewed by Dave Hyatt. 7 8 This code is responsible for pushing block elements to the next column if 9 the "orphans" CSS property is triggered. The mechanism by which this is 10 achieved is to push the block down such that the origin of the block is 11 at the origin of the next column. However, if there is negative line 12 spacing, the top portion of the text might actually be on top of the 13 origin of the block. Therefore, the block wasn't being pushed down enough 14 to entirely contain its text, so the top pieces were being drawn on the 15 previous column. 16 17 Test: fast/multicol/orphans-negative-line-spacing.html 18 19 * rendering/RenderBlockFlow.cpp: 20 (WebCore::RenderBlockFlow::adjustLinePositionForPagination): 21 1 22 2014-11-18 Chris Dumez <cdumez@apple.com> 2 23 -
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
r176262 r176285 1668 1668 setPageBreak(logicalOffset, lineHeight - remainingLogicalHeight); 1669 1669 if (((lineBox == firstRootBox() && totalLogicalHeight < pageLogicalHeightAtNewOffset) || (!style().hasAutoOrphans() && style().orphans() >= lineIndex)) 1670 && !isOutOfFlowPositioned() && !isTableCell()) 1671 setPaginationStrut(remainingLogicalHeight + std::max<LayoutUnit>(0, logicalOffset)); 1672 else { 1670 && !isOutOfFlowPositioned() && !isTableCell()) { 1671 auto firstRootBox = this->firstRootBox(); 1672 auto firstRootBoxOverflowRect = firstRootBox->logicalVisualOverflowRect(firstRootBox->lineTop(), firstRootBox->lineBottom()); 1673 auto firstLineUpperOverhang = std::max(-firstRootBoxOverflowRect.y(), LayoutUnit()); 1674 setPaginationStrut(remainingLogicalHeight + logicalOffset + firstLineUpperOverhang); 1675 } else { 1673 1676 delta += remainingLogicalHeight; 1674 1677 lineBox->setPaginationStrut(remainingLogicalHeight);
Note:
See TracChangeset
for help on using the changeset viewer.