Changeset 199304 in webkit
- Timestamp:
- Apr 11, 2016 12:31:12 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r199296 r199304 1 2016-04-11 Zalan Bujtas <zalan@apple.com> 2 3 REGRESSION (r193857): Text selection causes text to disappear. 4 https://bugs.webkit.org/show_bug.cgi?id=156448 5 rdar://problem/25578952 6 7 Reviewed by Simon Fraser. 8 9 Apparently when the end position of the selection range is smaller than the start position, we need 10 to repaint the entire text as it indicates selection clearing. 11 12 * fast/text/text-disappear-on-deselect-expected.html: Added. 13 * fast/text/text-disappear-on-deselect.html: Added. 14 1 15 2016-04-11 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/LayoutTests/platform/ios-simulator/TestExpectations
r199295 r199304 246 246 fast/scrolling/scroll-animator-select-list-events.html [ Skip ] 247 247 fast/events/prevent-default-prevents-interaction-with-scrollbars.html [ Skip ] 248 fast/text/text-disappear-on-deselect.html [ ImageOnlyFailure ] 249 248 250 249 251 webkit.org/b/148695 fast/shadow-dom [ Pass ] -
trunk/Source/WebCore/ChangeLog
r199299 r199304 1 2016-04-11 Zalan Bujtas <zalan@apple.com> 2 3 REGRESSION (r193857): Text selection causes text to disappear. 4 https://bugs.webkit.org/show_bug.cgi?id=156448 5 rdar://problem/25578952 6 7 Reviewed by Simon Fraser. 8 9 Apparently when the end position of the selection range is smaller than the start position, we need 10 to repaint the entire text as it indicates selection clearing. 11 12 Test: fast/text/text-disappear-on-deselect.html 13 14 * rendering/TextPainter.cpp: 15 (WebCore::TextPainter::paintText): 16 1 17 2016-04-05 Oliver Hunt <oliver@apple.com> 2 18 -
trunk/Source/WebCore/rendering/TextPainter.cpp
r193929 r199304 155 155 GraphicsContextStateSaver stateSaver(m_context, m_textPaintStyle.strokeWidth > 0); 156 156 updateGraphicsContext(m_context, m_textPaintStyle); 157 if (paintSelectedTextSeparately) { 157 bool fullPaint = !paintSelectedTextSeparately || selectionEnd <= selectionStart; 158 if (fullPaint) 159 paintTextAndEmphasisMarksIfNeeded(textRun, boxRect, textOrigin, 0, length, m_textPaintStyle, m_textShadow); 160 else { 158 161 // Paint the before and after selection parts. 159 162 if (selectionStart > 0) … … 161 164 if (selectionEnd < length) 162 165 paintTextAndEmphasisMarksIfNeeded(textRun, boxRect, textOrigin, selectionEnd, length, m_textPaintStyle, m_textShadow); 163 } else 164 paintTextAndEmphasisMarksIfNeeded(textRun, boxRect, textOrigin, 0, length, m_textPaintStyle, m_textShadow); 166 } 165 167 } 166 167 168 // Paint only the text that is selected. 168 169 if ((paintSelectedTextOnly || paintSelectedTextSeparately) && selectionStart < selectionEnd) {
Note: See TracChangeset
for help on using the changeset viewer.