Changeset 287981 in webkit
- Timestamp:
- Jan 13, 2022, 10:21:34 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/editing/selection-with-absolute-positioned-empty-content-expected.txt (added)
-
LayoutTests/editing/selection-with-absolute-positioned-empty-content.html (added)
-
LayoutTests/platform/ios/TestExpectations (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/layout/integration/InlineIteratorLine.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r287976 r287981 1 2022-01-13 Alan Bujtas <zalan@apple.com> 2 3 REGRESSION (r278561): Right clicking a link selects the full line with unrelated text 4 https://bugs.webkit.org/show_bug.cgi?id=235172 5 <rdar://84069534> 6 7 Reviewed by Dean Jackson. 8 9 * fast/editing/selection-with-absolute-positioned-empty-content-expected.txt: Added. 10 * fast/editing/selection-with-absolute-positioned-empty-content.html: Added. 11 1 12 2022-01-10 Sergio Villar Senin <svillar@igalia.com> 2 13 -
trunk/LayoutTests/platform/ios/TestExpectations
r287662 r287981 422 422 editing/selection/selecting-content-by-overshooting-the-deprecated-flex-container.html [ Skip ] 423 423 editing/selection/selecting-content-by-overshooting-the-grid-container.html [ Skip ] 424 editing/selection-with-absolute-positioned-empty-content.html [ Skip ] 424 425 editing/spelling/context-menu-suggestions-multiword-selection.html [ Skip ] 425 426 editing/spelling/context-menu-suggestions-subword-selection.html [ Skip ] -
trunk/Source/WebCore/ChangeLog
r287980 r287981 1 2022-01-13 Alan Bujtas <zalan@apple.com> 2 3 REGRESSION (r278561): Right clicking a link selects the full line with unrelated text 4 https://bugs.webkit.org/show_bug.cgi?id=235172 5 <rdar://84069534> 6 7 Reviewed by Dean Jackson. 8 9 r278561 slightly change highlightStateForTextBox's behavior which now (correctly) returns HighlightState::None when the 10 RenderText content is not part of the current selection. Prior to r278561, it returned the RenderText's original selection state 11 which in this case was HighlightState::End. 12 13 <div><span>A<br>B<span style="position: absolute"></span></span>C</div> 14 15 In this specific case when we select the outer <span>, we end up with the following selection states for the generated line boxes: 16 (B) -> "Inside" 17 (C) -> "None" 18 while previously (C) came back as "End" (note that the absolute positioned element does not generate line boxes). 19 20 Now as Line::selectionState traverses through the line boxes, it comes across an unexpected "Inside -> None" transition at the selection end boundary (B -> C) 21 which incorrectly leaves the line state in "Inside" and we paint the selection all the way to the end of the block. 22 23 Test: fast/editing/selection-with-absolute-positioned-empty-content.html 24 25 * layout/integration/InlineIteratorLine.cpp: 26 (WebCore::InlineIterator::Line::selectionState const): 27 1 28 2022-01-13 Peng Liu <peng.liu6@apple.com> 2 29 -
trunk/Source/WebCore/layout/integration/InlineIteratorLine.cpp
r287520 r287981 191 191 // We are past the end of the selection. 192 192 state = RenderObject::HighlightState::Both; 193 } 193 } else if (boxState == RenderObject::HighlightState::None && state == RenderObject::HighlightState::Inside) 194 state = RenderObject::HighlightState::End; 195 194 196 if (state == RenderObject::HighlightState::Both) 195 197 break;
Note:
See TracChangeset
for help on using the changeset viewer.