WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-243921-20220813152319.patch (text/plain), 2.06 KB, created by
alan
on 2022-08-13 15:23:20 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
alan
Created:
2022-08-13 15:23:20 PDT
Size:
2.06 KB
patch
obsolete
>From e389e4c5e5400644168afbceb03843de897f9acd Mon Sep 17 00:00:00 2001 >From: Alan Bujtas <zalan@apple.com> >Date: Sat, 13 Aug 2022 15:19:35 -0700 >Subject: [PATCH] [Painting] Underline should be device pixel aligned > https://bugs.webkit.org/show_bug.cgi?id=243921 > >Reviewed by NOBODY (OOPS!). > >The paint rect in TextBoxPainter is only pixel snapped when the content is truncated. > >* Source/WebCore/rendering/TextBoxPainter.cpp: >(WebCore::TextBoxPainter<TextBoxPath>::paintForegroundAndDecorations): >--- > Source/WebCore/rendering/TextBoxPainter.cpp | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > >diff --git a/Source/WebCore/rendering/TextBoxPainter.cpp b/Source/WebCore/rendering/TextBoxPainter.cpp >index d0d1a0e242f9..f752346f5684 100644 >--- a/Source/WebCore/rendering/TextBoxPainter.cpp >+++ b/Source/WebCore/rendering/TextBoxPainter.cpp >@@ -284,13 +284,12 @@ void TextBoxPainter<TextBoxPath>::paintForegroundAndDecorations() > unsigned endOffset = markedText.endOffset; > if (startOffset < endOffset) { > // Avoid measuring the text when the entire line box is selected as an optimization. >- auto snappedPaintRect = m_paintRect; >+ auto snappedPaintRect = snapRectToDevicePixelsWithWritingDirection(LayoutRect { m_paintRect }, m_document.deviceScaleFactor(), m_paintTextRun.ltr()); > if (startOffset || endOffset != m_paintTextRun.length()) { > LayoutRect selectionRect = { m_paintRect.x(), m_paintRect.y(), m_paintRect.width(), m_paintRect.height() }; > fontCascade().adjustSelectionRectForText(m_paintTextRun, selectionRect, startOffset, endOffset); > snappedPaintRect = snapRectToDevicePixelsWithWritingDirection(selectionRect, m_document.deviceScaleFactor(), m_paintTextRun.ltr()); > } >- > auto decorationPainter = createDecorationPainter(markedText, textDecorationSelectionClipOutRect); > paintBackgroundDecorations(decorationPainter, markedText, snappedPaintRect); > paintForeground(markedText);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 243921
:
461601
|
461620
|
461622