Changeset 189847 in webkit
- Timestamp:
- Sep 15, 2015 11:07:16 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r189842 r189847 1 2015-09-15 Zalan Bujtas <zalan@apple.com> 2 3 Simple line layout: Glitch selecting long text. 4 https://bugs.webkit.org/show_bug.cgi?id=149204 5 rdar://problem/22646472 6 7 Reviewed by Antti Koivisto. 8 9 When long text is split into multiple RenderText objects, we ignore renderer boundaries while 10 collecting wrapping positions (so that we don't end up wrapping unbreakable fragments at the end of each renderer). 11 This patch ensures that fragments with hypen character ignore renderer boundaries too. 12 13 * fast/text/multiple-renderers-with-hypen-on-boundary-expected.html: Added. 14 * fast/text/multiple-renderers-with-hypen-on-boundary.html: Added. 15 1 16 2015-09-15 Chris Dumez <cdumez@apple.com> 2 17 -
trunk/Source/WebCore/ChangeLog
r189843 r189847 1 2015-09-15 Zalan Bujtas <zalan@apple.com> 2 3 Simple line layout: Glitch selecting long text. 4 https://bugs.webkit.org/show_bug.cgi?id=149204 5 rdar://problem/22646472 6 7 Reviewed by Antti Koivisto. 8 9 When long text is split into multiple RenderText objects, we ignore renderer boundaries while 10 collecting wrapping positions (so that we don't end up wrapping unbreakable fragments at the end of each renderer). 11 This patch ensures that fragments with hypen character ignore renderer boundaries too. 12 13 Test: fast/text/multiple-renderers-with-hypen-on-boundary.html 14 15 * rendering/SimpleLineLayoutTextFragmentIterator.cpp: 16 (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition): 17 1 18 2015-09-15 Ryosuke Niwa <rniwa@webkit.org> 2 19 -
trunk/Source/WebCore/rendering/SimpleLineLayoutTextFragmentIterator.cpp
r185593 r189847 162 162 nextPosition = m_currentSegment->text.is8Bit() ? nextNonWhitespacePosition<LChar>(*m_currentSegment, currentPosition) : nextNonWhitespacePosition<UChar>(*m_currentSegment, currentPosition); 163 163 else if (positionType == Breakable) { 164 nextPosition = m_currentSegment->text.is8Bit() ? nextBreakablePosition<LChar>(*m_currentSegment, currentPosition) : nextBreakablePosition<UChar>(*m_currentSegment, currentPosition); 164 165 // nextBreakablePosition returns the same position for certain characters such as hyphens. Call next again with modified position unless it's the end of the segment. 165 nextPosition = m_currentSegment->text.is8Bit() ? nextBreakablePosition<LChar>(*m_currentSegment, currentPosition) : nextBreakablePosition<UChar>(*m_currentSegment, currentPosition); 166 if (nextPosition == currentPosition && nextPosition < m_currentSegment->end) 167 nextPosition = m_currentSegment->text.is8Bit() ? nextBreakablePosition<LChar>(*m_currentSegment, currentPosition + 1) : nextBreakablePosition<UChar>(*m_currentSegment, currentPosition + 1); 166 168 // We need to know whether the word actually finishes at the end of this renderer or not. 167 169 if (nextPosition == m_currentSegment->end) { … … 169 171 if (nextSegment != m_flowContents.end() && !isHardLineBreak(nextSegment)) 170 172 overlappingFragment = nextPosition < (nextSegment->text.is8Bit() ? nextBreakablePosition<LChar>(*nextSegment, nextPosition) : nextBreakablePosition<UChar>(*nextSegment, nextPosition)); 171 } else if (nextPosition == currentPosition) {172 if (++nextPosition < m_currentSegment->end)173 nextPosition = m_currentSegment->text.is8Bit() ? nextBreakablePosition<LChar>(*m_currentSegment, currentPosition + 1) : nextBreakablePosition<UChar>(*m_currentSegment, currentPosition + 1);174 173 } 175 174 }
Note: See TracChangeset
for help on using the changeset viewer.