Changeset 101561 in webkit
- Timestamp:
- Nov 30, 2011 3:27:07 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r101560 r101561 1 2011-11-30 Ryosuke Niwa <rniwa@webkit.org> 2 3 Cannot select RTL text inside LTR text from right to left by a mouse drag 4 https://bugs.webkit.org/show_bug.cgi?id=73056 5 6 Reviewed by Eric Seidel. 7 8 Added a test case to ensure WebKit can select "A" in "aCBAb" when selecting text by a mouse drag 9 from the position between "A" and "b" to the position between "B" and "A". 10 11 * editing/selection/select-bidi-run-expected.txt: 12 * editing/selection/select-bidi-run.html: 13 1 14 2011-11-30 Chris Fleizach <cfleizach@apple.com> 2 15 -
trunk/LayoutTests/editing/selection/select-bidi-run-expected.txt
r95964 r101561 113 113 FAIL selected "123" but expected "ABC 123" 114 114 115 Test "ABC" in "aABCb": 116 Selecting from left to right 117 PASS selected "C" 118 PASS selected "BC" 119 PASS selected "ABC" 120 Selecting from right to left 121 PASS selected "A" 122 PASS selected "AB" 123 PASS selected "ABC" 124 115 125 PASS successfullyParsed is true 116 126 -
trunk/LayoutTests/editing/selection/select-bidi-run.html
r99258 r101561 9 9 dd { font-size: 0.6em; margin: 0px; padding: 0px 10px; } 10 10 .target { background-color: #bbeeff; } 11 .targetContainer { position: absolute; left: 10px; top: 0px; z-index: -5; } 11 12 </style> 12 13 </head> … … 45 46 <dd>1,12, 123,C 123,BC 123,ABC 123|A,AB,ABC,ABC ,ABC 12,ABC 1,ABC 123</dd> 46 47 48 <dt contenteditable style="position: relative;">aאבגb<div class="targetContainer">a<span class="target">אבג</span>b</div></dt> 49 <dd>C,BC,ABC|A,AB,ABC</dd> 50 47 51 <!--<dt contenteditable><span class="target">אבג 123 - 456</span></dt> 48 52 <dd>1,12, 123,C 123,BC 123,ABC 123|A,AB,ABC,ABC ,ABC 12,ABC 1,ABC 123</dd>--> … … 71 75 var y = target.offsetTop + target.offsetHeight / 2; 72 76 var left = target.offsetLeft; 77 78 offsetParent = target.offsetParent; 79 while (offsetParent) { 80 y += offsetParent.offsetTop; 81 left += offsetParent.offsetLeft; 82 offsetParent = offsetParent.offsetParent; 83 } 73 84 74 85 var startX = left + (leftToRight ? 0 : target.offsetWidth); … … 115 126 116 127 var target = tests[i].getElementsByClassName('target')[0]; 128 var relativeTargets = tests[i].getElementsByClassName('relativeTarget'); 117 129 var testExpectation = testExpectations[i].textContent; 118 130 -
trunk/Source/WebCore/ChangeLog
r101560 r101561 1 2011-11-30 Ryosuke Niwa <rniwa@webkit.org> 2 3 Cannot select RTL text inside LTR text from right to left by a mouse drag 4 https://bugs.webkit.org/show_bug.cgi?id=73056 5 6 Reviewed by Eric Seidel. 7 8 The bug was caused by positionAtRightBoundaryOfBiDiRun using current inline box's offset 9 even when creating a position with previous inline box. Fixed the bug by using the correct offset. 10 11 * editing/RenderedPosition.cpp: 12 (WebCore::RenderedPosition::positionAtLeftBoundaryOfBiDiRun): 13 (WebCore::RenderedPosition::positionAtRightBoundaryOfBiDiRun): 14 1 15 2011-11-30 Chris Fleizach <cfleizach@apple.com> 2 16 -
trunk/Source/WebCore/editing/RenderedPosition.cpp
r95964 r101561 212 212 return createLegacyEditingPosition(m_renderer->node(), m_offset); 213 213 214 return createLegacyEditingPosition(nextLeafChild()->renderer()->node(), m_offset);214 return createLegacyEditingPosition(nextLeafChild()->renderer()->node(), nextLeafChild()->caretLeftmostOffset()); 215 215 } 216 216 … … 222 222 return createLegacyEditingPosition(m_renderer->node(), m_offset); 223 223 224 return createLegacyEditingPosition(prevLeafChild()->renderer()->node(), m_offset);224 return createLegacyEditingPosition(prevLeafChild()->renderer()->node(), prevLeafChild()->caretRightmostOffset()); 225 225 } 226 226
Note: See TracChangeset
for help on using the changeset viewer.