Changeset 123973 in webkit
- Timestamp:
- Jul 28, 2012 2:40:48 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r123972 r123973 1 2012-07-28 Dan Bernstein <mitz@apple.com> 2 3 In flipped lines writing modes, hit testing at the beginning of a column may return a result from the previous column 4 https://bugs.webkit.org/show_bug.cgi?id=92566 5 6 Reviewed by Simon Fraser. 7 8 * fast/multicol/hit-test-end-of-column-with-line-height-expected.txt: Updated. 9 * fast/multicol/hit-test-end-of-column-with-line-height.html: Extended with tests for 10 horizontal-bt. 11 1 12 2012-07-28 Simon Fraser <simon.fraser@apple.com> 2 13 -
trunk/LayoutTests/fast/multicol/hit-test-end-of-column-with-line-height-expected.txt
r123904 r123973 2 2 PASS 3 3 PASS 4 PASS 5 PASS 4 6 -
trunk/LayoutTests/fast/multicol/hit-test-end-of-column-with-line-height.html
r123904 r123973 28 28 hitOffset = document.caretRangeFromPoint(target.offsetLeft + 250, target.offsetTop + 2).startOffset; 29 29 log(hitOffset === 14 ? "PASS" : "FAIL: hit offset " + hitOffset + "."); 30 31 // Now test with a flipped lines writing mode. 32 target.style.webkitWritingMode = "horizontal-bt"; 33 34 // Clicking above the last line in the first column should not select anything from the first 35 // line on the second column. 36 hitOffset = document.caretRangeFromPoint(target.offsetLeft + 190, target.offsetTop + 3).startOffset; 37 log(hitOffset === 11 ? "PASS" : "FAIL: hit offset " + hitOffset + "."); 38 39 // Clicking below the first line in the second column should not snap to the beginning of the line. 40 hitOffset = document.caretRangeFromPoint(target.offsetLeft + 250, target.offsetTop + 78).startOffset; 41 log(hitOffset === 14 ? "PASS" : "FAIL: hit offset " + hitOffset + "."); 30 42 </script> -
trunk/Source/WebCore/ChangeLog
r123972 r123973 1 2012-07-28 Dan Bernstein <mitz@apple.com> 2 3 In flipped lines writing modes, hit testing at the beginning of a column may return a result from the previous column 4 https://bugs.webkit.org/show_bug.cgi?id=92566 5 6 Reviewed by Simon Fraser. 7 8 Enhanced the fix for <http://webkit.org/b/92524> to work with flipped lines. 9 10 Extended fast/multicol/hit-test-end-of-column-with-line-height.html. 11 12 * rendering/RenderBlock.cpp: 13 (WebCore::RenderBlock::positionForPointWithInlineChildren): For flipped lines, check if the 14 hit line is the last one before a page break, and in that case, check if the hit point was 15 after the break. 16 1 17 2012-07-28 Simon Fraser <simon.fraser@apple.com> 2 18 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r123904 r123973 4917 4917 return createVisiblePosition(0, DOWNSTREAM); 4918 4918 4919 bool linesAreFlipped = style()->isFlippedLinesWritingMode(); 4920 4919 4921 // look for the closest line box in the root box which is at the passed-in y coordinate 4920 4922 InlineBox* closestBox = 0; … … 4927 4929 firstRootBoxWithChildren = root; 4928 4930 4929 if ( root->isFirstAfterPageBreak() && pointInLogicalContents.y() < root->lineTopWithLeading())4931 if (!linesAreFlipped && root->isFirstAfterPageBreak() && pointInLogicalContents.y() < root->lineTopWithLeading()) 4930 4932 break; 4931 4933 … … 4934 4936 // check if this root line box is located at this y coordinate 4935 4937 if (pointInLogicalContents.y() < root->selectionBottom()) { 4938 if (linesAreFlipped) { 4939 RootInlineBox* nextRootBoxWithChildren = root->nextRootBox(); 4940 while (nextRootBoxWithChildren && !nextRootBoxWithChildren->firstLeafChild()) 4941 nextRootBoxWithChildren = nextRootBoxWithChildren->nextRootBox(); 4942 4943 if (nextRootBoxWithChildren && nextRootBoxWithChildren->isFirstAfterPageBreak() && pointInLogicalContents.y() >= nextRootBoxWithChildren->lineTopWithLeading()) 4944 continue; 4945 } 4936 4946 closestBox = root->closestLeafChildForLogicalLeftPosition(pointInLogicalContents.x()); 4937 4947 if (closestBox)
Note: See TracChangeset
for help on using the changeset viewer.