| Differences between
and this patch
- a/Source/WebCore/rendering/TextBoxPainter.cpp -2 / +1 lines
Lines 284-296 void TextBoxPainter<TextBoxPath>::paintForegroundAndDecorations() a/Source/WebCore/rendering/TextBoxPainter.cpp_sec1
284
            unsigned endOffset = markedText.endOffset;
284
            unsigned endOffset = markedText.endOffset;
285
            if (startOffset < endOffset) {
285
            if (startOffset < endOffset) {
286
                // Avoid measuring the text when the entire line box is selected as an optimization.
286
                // Avoid measuring the text when the entire line box is selected as an optimization.
287
                auto snappedPaintRect = m_paintRect;
287
                auto snappedPaintRect = snapRectToDevicePixelsWithWritingDirection(LayoutRect { m_paintRect }, m_document.deviceScaleFactor(), m_paintTextRun.ltr());
288
                if (startOffset || endOffset != m_paintTextRun.length()) {
288
                if (startOffset || endOffset != m_paintTextRun.length()) {
289
                    LayoutRect selectionRect = { m_paintRect.x(), m_paintRect.y(), m_paintRect.width(), m_paintRect.height() };
289
                    LayoutRect selectionRect = { m_paintRect.x(), m_paintRect.y(), m_paintRect.width(), m_paintRect.height() };
290
                    fontCascade().adjustSelectionRectForText(m_paintTextRun, selectionRect, startOffset, endOffset);
290
                    fontCascade().adjustSelectionRectForText(m_paintTextRun, selectionRect, startOffset, endOffset);
291
                    snappedPaintRect = snapRectToDevicePixelsWithWritingDirection(selectionRect, m_document.deviceScaleFactor(), m_paintTextRun.ltr());
291
                    snappedPaintRect = snapRectToDevicePixelsWithWritingDirection(selectionRect, m_document.deviceScaleFactor(), m_paintTextRun.ltr());
292
                }
292
                }
293
294
                auto decorationPainter = createDecorationPainter(markedText, textDecorationSelectionClipOutRect);
293
                auto decorationPainter = createDecorationPainter(markedText, textDecorationSelectionClipOutRect);
295
                paintBackgroundDecorations(decorationPainter, markedText, snappedPaintRect);
294
                paintBackgroundDecorations(decorationPainter, markedText, snappedPaintRect);
296
                paintForeground(markedText);
295
                paintForeground(markedText);

Return to Bug 243921