Changeset 123904 in webkit
- Timestamp:
- Jul 27, 2012 12:25:43 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r123899 r123904 1 2012-07-27 Dan Bernstein <mitz@apple.com> 2 3 Hit testing near a column break can return a result from an adjacent column when there is leading 4 https://bugs.webkit.org/show_bug.cgi?id=92524 5 6 Reviewed by Anders Carlsson. 7 8 * fast/multicol/hit-test-end-of-column-with-line-height-expected.txt: Added. 9 * fast/multicol/hit-test-end-of-column-with-line-height.html: Added. 10 1 11 2012-07-27 Mike West <mkwst@chromium.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r123902 r123904 1 2012-07-27 Dan Bernstein <mitz@apple.com> 2 3 Hit testing near a column break can return a result from an adjacent column when there is leading 4 https://bugs.webkit.org/show_bug.cgi?id=92524 5 6 Reviewed by Anders Carlsson. 7 8 The fix for <http://webkit.org/b/92311> relied on the existence of a pagination strut for 9 detecting that a line was at the beginning of a new column. However, when a line naturally 10 falls at the beginning of a column, there is no pagination strut, and the check failed. 11 12 Test: fast/multicol/hit-test-end-of-column-with-line-height.html 13 14 * rendering/InlineFlowBox.h: 15 (WebCore::InlineFlowBox::InlineFlowBox): Added initializer for new member variable. 16 (InlineFlowBox): Added m_isFirstAfterPageBreak member variable. 17 * rendering/RenderBlock.cpp: 18 (WebCore::RenderBlock::positionForPointWithInlineChildren): Changed the test for whether a 19 line was at the beginning of a column from relying on a pagination strut to checking 20 isFirstAfterPageBreak(). Also refined the hit test itself to include the leading above such 21 a line. 22 (WebCore::RenderBlock::adjustLinePositionForPagination): Added calls to 23 setIsFirstAfterPageBreak() to first reset this flag, then set it to true if necessary. 24 * rendering/RootInlineBox.h: 25 (WebCore::RootInlineBox::isFirstAfterPageBreak): Added this accessor. 26 (WebCore::RootInlineBox::setIsFirstAfterPageBreak): Ditto. 27 1 28 2012-07-27 John J. Barton <johnjbarton@johnjbarton.com> 2 29 -
trunk/Source/WebCore/rendering/InlineFlowBox.h
r121085 r123904 50 50 , m_hasAnnotationsBefore(false) 51 51 , m_hasAnnotationsAfter(false) 52 , m_isFirstAfterPageBreak(false) 52 53 #ifndef NDEBUG 53 54 , m_hasBadChildList(false) … … 322 323 unsigned m_hasAnnotationsBefore : 1; 323 324 unsigned m_hasAnnotationsAfter : 1; 325 bool m_isFirstAfterPageBreak : 1; 324 326 325 327 unsigned m_lineBreakBidiStatusEor : 5; // WTF::Unicode::Direction -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r123754 r123904 4927 4927 firstRootBoxWithChildren = root; 4928 4928 4929 if (root-> paginationStrut() && pointInLogicalContents.y() < root->logicalTop())4929 if (root->isFirstAfterPageBreak() && pointInLogicalContents.y() < root->lineTopWithLeading()) 4930 4930 break; 4931 4931 … … 6962 6962 logicalOffset += delta; 6963 6963 lineBox->setPaginationStrut(0); 6964 lineBox->setIsFirstAfterPageBreak(false); 6964 6965 LayoutUnit pageLogicalHeight = pageLogicalHeightForOffset(logicalOffset); 6965 6966 bool hasUniformPageLogicalHeight = !inRenderFlowThread() || enclosingRenderFlowThread()->regionsHaveUniformLogicalHeight(); … … 6985 6986 delta += remainingLogicalHeight; 6986 6987 lineBox->setPaginationStrut(remainingLogicalHeight); 6987 } 6988 } 6988 lineBox->setIsFirstAfterPageBreak(true); 6989 } 6990 } else if (remainingLogicalHeight == pageLogicalHeight && lineBox != firstRootBox()) 6991 lineBox->setIsFirstAfterPageBreak(true); 6989 6992 } 6990 6993 -
trunk/Source/WebCore/rendering/RootInlineBox.h
r121085 r123904 56 56 LayoutUnit paginationStrut() const { return m_paginationStrut; } 57 57 void setPaginationStrut(LayoutUnit s) { m_paginationStrut = s; } 58 59 bool isFirstAfterPageBreak() const { return m_isFirstAfterPageBreak; } 60 void setIsFirstAfterPageBreak(bool isFirstAfterPageBreak) { m_isFirstAfterPageBreak = isFirstAfterPageBreak; } 58 61 59 62 LayoutUnit paginatedLineWidth() const { return m_paginatedLineWidth; }
Note: See TracChangeset
for help on using the changeset viewer.