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-243576-20220804200136.patch (text/plain), 4.70 KB, created by
alan
on 2022-08-04 20:01:37 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
alan
Created:
2022-08-04 20:01:37 PDT
Size:
4.70 KB
patch
obsolete
>From 1dfbe31d789b0de4bf0ea07d2698925a86879651 Mon Sep 17 00:00:00 2001 >From: Alan Bujtas <zalan@apple.com> >Date: Thu, 4 Aug 2022 20:00:21 -0700 >Subject: [PATCH] [Painting] Make UnderlineOffsetArguments internal to > InlineTextBoxStyle https://bugs.webkit.org/show_bug.cgi?id=243576 > >Reviewed by NOBODY (OOPS!). > >* Source/WebCore/style/InlineTextBoxStyle.cpp: >(WebCore::visualOverflowForDecorations): >(WebCore::underlineOffsetForTextBoxPainting): >* Source/WebCore/style/InlineTextBoxStyle.h: >--- > Source/WebCore/style/InlineTextBoxStyle.cpp | 12 +++++++++--- > Source/WebCore/style/InlineTextBoxStyle.h | 15 +++++---------- > 2 files changed, 14 insertions(+), 13 deletions(-) > >diff --git a/Source/WebCore/style/InlineTextBoxStyle.cpp b/Source/WebCore/style/InlineTextBoxStyle.cpp >index 60c99f4615dd..7eb441ac8032 100644 >--- a/Source/WebCore/style/InlineTextBoxStyle.cpp >+++ b/Source/WebCore/style/InlineTextBoxStyle.cpp >@@ -37,6 +37,12 @@ > > namespace WebCore { > >+struct UnderlineOffsetArguments { >+ const RenderStyle& lineStyle; >+ float defaultGap { 0 }; >+ std::optional<TextUnderlinePositionUnder> textUnderlinePositionUnder { }; >+}; >+ > static bool isAncestorAndWithinBlock(const RenderInline& ancestor, const RenderObject* child) > { > const RenderObject* object = child; >@@ -249,12 +255,12 @@ GlyphOverflow visualOverflowForDecorations(const InlineIterator::LineBoxIterator > { > auto& style = lineBox->isFirst() ? renderer.firstLineStyle() : renderer.style(); > auto underlineOffset = style.textDecorationsInEffect().contains(TextDecorationLine::Underline) >- ? std::make_optional(computeUnderlineOffset({ style, defaultGap(style), UnderlineOffsetArguments::TextUnderlinePositionUnder { lineBox->baselineType(), textBoxLogicalBottom - textBoxLogicalTop, textRunLogicalOffsetFromLineBottom(lineBox, renderer, textBoxLogicalTop, textBoxLogicalBottom) } })) >+ ? std::make_optional(computeUnderlineOffset({ style, defaultGap(style), TextUnderlinePositionUnder { lineBox->baselineType(), textBoxLogicalBottom - textBoxLogicalTop, textRunLogicalOffsetFromLineBottom(lineBox, renderer, textBoxLogicalTop, textBoxLogicalBottom) } })) > : std::nullopt; > return computedVisualOverflowForDecorations(style, underlineOffset); > } > >-GlyphOverflow visualOverflowForDecorations(const RenderStyle& style, UnderlineOffsetArguments::TextUnderlinePositionUnder textUnderlinePositionUnder) >+GlyphOverflow visualOverflowForDecorations(const RenderStyle& style, TextUnderlinePositionUnder textUnderlinePositionUnder) > { > auto underlineOffset = style.textDecorationsInEffect().contains(TextDecorationLine::Underline) > ? std::make_optional(computeUnderlineOffset({ style, defaultGap(style), textUnderlinePositionUnder })) >@@ -272,7 +278,7 @@ GlyphOverflow visualOverflowForDecorations(const RenderStyle& style) > > float underlineOffsetForTextBoxPainting(const RenderStyle& style, const InlineIterator::TextBoxIterator& textBox) > { >- auto textUnderlinePositionUnder = UnderlineOffsetArguments::TextUnderlinePositionUnder { >+ auto textUnderlinePositionUnder = TextUnderlinePositionUnder { > textBox->lineBox()->baselineType(), > textBox->logicalBottom() - textBox->logicalTop(), > textRunLogicalOffsetFromLineBottom(textBox->lineBox(), textBox->renderer(), textBox->logicalTop(), textBox->logicalBottom()) >diff --git a/Source/WebCore/style/InlineTextBoxStyle.h b/Source/WebCore/style/InlineTextBoxStyle.h >index 88597d757bed..23b4336488be 100644 >--- a/Source/WebCore/style/InlineTextBoxStyle.h >+++ b/Source/WebCore/style/InlineTextBoxStyle.h >@@ -54,18 +54,13 @@ struct WavyStrokeParameters { > }; > WavyStrokeParameters getWavyStrokeParameters(float fontSize); > >-struct UnderlineOffsetArguments { >- const RenderStyle& lineStyle; >- float defaultGap { 0 }; >- struct TextUnderlinePositionUnder { >- FontBaseline baselineType { AlphabeticBaseline }; >- float textRunLogicalHeight { 0 }; >- float textRunOffsetFromLineBottom { 0 }; >- }; >- std::optional<TextUnderlinePositionUnder> textUnderlinePositionUnder { }; >+struct TextUnderlinePositionUnder { >+ FontBaseline baselineType { AlphabeticBaseline }; >+ float textRunLogicalHeight { 0 }; >+ float textRunOffsetFromLineBottom { 0 }; > }; > GlyphOverflow visualOverflowForDecorations(const RenderStyle&); >-GlyphOverflow visualOverflowForDecorations(const RenderStyle&, UnderlineOffsetArguments::TextUnderlinePositionUnder); >+GlyphOverflow visualOverflowForDecorations(const RenderStyle&, TextUnderlinePositionUnder); > GlyphOverflow visualOverflowForDecorations(const InlineIterator::LineBoxIterator&, const RenderText&, float textBoxLogicalTop, float textBoxLogicalBottom); > > float underlineOffsetForTextBoxPainting(const RenderStyle&, const InlineIterator::TextBoxIterator&);
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
Flags:
ews-feeder
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 243576
: 461414