| Differences between
and this patch
- a/Source/WebCore/rendering/TextBoxPainter.cpp -3 / +2 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);
Lines 550-556 void TextBoxPainter<TextBoxPath>::paintBackgroundDecorations(TextDecorationPaint a/Source/WebCore/rendering/TextBoxPainter.cpp_sec2
550
549
551
            return TextDecorationPainter::BackgroundDecorationGeometry {
550
            return TextDecorationPainter::BackgroundDecorationGeometry {
552
                textOriginFromPaintRect(textBoxPaintRect),
551
                textOriginFromPaintRect(textBoxPaintRect),
553
                decoratingBox.location,
552
                roundPointToDevicePixels(LayoutPoint { decoratingBox.location }, m_document.deviceScaleFactor(), m_paintTextRun.ltr()),
554
                textBoxPaintRect.width(),
553
                textBoxPaintRect.width(),
555
                textDecorationThickness,
554
                textDecorationThickness,
556
                underlineOffset(),
555
                underlineOffset(),

Return to Bug 243921