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-243619-20220806184023.patch (text/plain), 24.19 KB, created by
alan
on 2022-08-06 18:40:23 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
alan
Created:
2022-08-06 18:40:23 PDT
Size:
24.19 KB
patch
obsolete
>From 421dfa9a550a19c5a212a149600c3e4d16f88d7f Mon Sep 17 00:00:00 2001 >From: Alan Bujtas <zalan@apple.com> >Date: Sat, 6 Aug 2022 18:04:09 -0700 >Subject: [PATCH] [Painting] Introduce UnderlineOffsetAndDecoratingBox > https://bugs.webkit.org/show_bug.cgi?id=243619 > >Reviewed by Antti Koivisto. > >Let's grab the underline style (and the offset) from the decorating box and not from the RenderText itself. >This is in preparation for cases when we start drawing multiple lines for a text run with (possibly) different style. > >* LayoutTests/fast/css/text-decoration-in-second-order-descendants-expected.html: Progression, the underline comes from .outer (decorating box) and not from <a>. >* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm: >(AXAttributeStringSetStyle): >* Source/WebCore/rendering/StyledMarkedText.cpp: >(WebCore::resolveStyleForMarkedText): >* Source/WebCore/rendering/TextDecorationPainter.cpp: >(WebCore::textDecorationsInEffectForStyle): >(WebCore::TextDecorationPainter::Styles::operator== const): >(WebCore::TextDecorationPainter::paintBackgroundDecorations): >(WebCore::TextDecorationPainter::paintForegroundDecorations): >(WebCore::TextDecorationPainter::paintLineThrough): >(WebCore::collectStylesForRenderer): >* Source/WebCore/rendering/TextDecorationPainter.h: >* Source/WebCore/style/InlineTextBoxStyle.cpp: >(WebCore::minLogicalTopForTextDecorationLine): >(WebCore::maxLogicalBottomForTextDecorationLine): >(WebCore::textRunOffsetFromBottomMostWithinDecoratingBox): >(WebCore::textRunOffsetFromBottomMost): >(WebCore::underlineOffsetAndDecoratingBoxForTextBoxPainting): >(WebCore::underlineOffsetForTextBoxPainting): Deleted. >* Source/WebCore/style/InlineTextBoxStyle.h: >--- > .../mac/WebAccessibilityObjectWrapperMac.mm | 4 +- > Source/WebCore/rendering/StyledMarkedText.cpp | 12 ++--- > .../rendering/TextDecorationPainter.cpp | 54 +++++++++++-------- > .../WebCore/rendering/TextDecorationPainter.h | 13 ++--- > Source/WebCore/style/InlineTextBoxStyle.cpp | 52 +++++++++++------- > Source/WebCore/style/InlineTextBoxStyle.h | 17 +++--- > ...-in-second-order-descendants-expected.html | 2 +- > 7 files changed, 91 insertions(+), 63 deletions(-) > >diff --git a/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm b/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm >index 6fb35a79273c..307c9d83419f 100644 >--- a/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm >+++ b/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm >@@ -843,12 +843,12 @@ static void AXAttributeStringSetStyle(NSMutableAttributedString* attrString, Ren > > if (decor & TextDecorationLine::Underline) { > AXAttributeStringSetNumber(attrString, NSAccessibilityUnderlineTextAttribute, @YES, range); >- AXAttributeStringSetColor(attrString, NSAccessibilityUnderlineColorTextAttribute, cocoaColor(decorationStyles.underlineColor).get(), range); >+ AXAttributeStringSetColor(attrString, NSAccessibilityUnderlineColorTextAttribute, cocoaColor(decorationStyles.underline.color).get(), range); > } > > if (decor & TextDecorationLine::LineThrough) { > AXAttributeStringSetNumber(attrString, NSAccessibilityStrikethroughTextAttribute, @YES, range); >- AXAttributeStringSetColor(attrString, NSAccessibilityStrikethroughColorTextAttribute, cocoaColor(decorationStyles.linethroughColor).get(), range); >+ AXAttributeStringSetColor(attrString, NSAccessibilityStrikethroughColorTextAttribute, cocoaColor(decorationStyles.linethrough.color).get(), range); > } > } > >diff --git a/Source/WebCore/rendering/StyledMarkedText.cpp b/Source/WebCore/rendering/StyledMarkedText.cpp >index 4ffe67216543..f5699d8addce 100644 >--- a/Source/WebCore/rendering/StyledMarkedText.cpp >+++ b/Source/WebCore/rendering/StyledMarkedText.cpp >@@ -58,16 +58,16 @@ static StyledMarkedText resolveStyleForMarkedText(const MarkedText& markedText, > auto decorations = renderStyle->textDecorationsInEffect(); > > if (decorations.contains(TextDecorationLine::Underline)) { >- style.textDecorationStyles.underlineColor = color; >- style.textDecorationStyles.underlineStyle = decorationStyle; >+ style.textDecorationStyles.underline.color = color; >+ style.textDecorationStyles.underline.decorationStyle = decorationStyle; > } > if (decorations.contains(TextDecorationLine::Overline)) { >- style.textDecorationStyles.overlineColor = color; >- style.textDecorationStyles.overlineStyle = decorationStyle; >+ style.textDecorationStyles.overline.color = color; >+ style.textDecorationStyles.overline.decorationStyle = decorationStyle; > } > if (decorations.contains(TextDecorationLine::LineThrough)) { >- style.textDecorationStyles.linethroughColor = color; >- style.textDecorationStyles.linethroughStyle = decorationStyle; >+ style.textDecorationStyles.linethrough.color = color; >+ style.textDecorationStyles.linethrough.decorationStyle = decorationStyle; > } > } > break; >diff --git a/Source/WebCore/rendering/TextDecorationPainter.cpp b/Source/WebCore/rendering/TextDecorationPainter.cpp >index f5e7397239d1..94f279101d56 100644 >--- a/Source/WebCore/rendering/TextDecorationPainter.cpp >+++ b/Source/WebCore/rendering/TextDecorationPainter.cpp >@@ -188,19 +188,19 @@ static StrokeStyle textDecorationStyleToStrokeStyle(TextDecorationStyle decorati > static inline OptionSet<TextDecorationLine> textDecorationsInEffectForStyle(const TextDecorationPainter::Styles& style) > { > OptionSet<TextDecorationLine> decorations; >- if (style.underlineColor.isValid()) >+ if (style.underline.color.isValid()) > decorations.add(TextDecorationLine::Underline); >- if (style.overlineColor.isValid()) >+ if (style.overline.color.isValid()) > decorations.add(TextDecorationLine::Overline); >- if (style.linethroughColor.isValid()) >+ if (style.linethrough.color.isValid()) > decorations.add(TextDecorationLine::LineThrough); > return decorations; > } > > bool TextDecorationPainter::Styles::operator==(const Styles& other) const > { >- return underlineColor == other.underlineColor && overlineColor == other.overlineColor && linethroughColor == other.linethroughColor >- && underlineStyle == other.underlineStyle && overlineStyle == other.overlineStyle && linethroughStyle == other.linethroughStyle; >+ return underline.color == other.underline.color && overline.color == other.overline.color && linethrough.color == other.linethrough.color >+ && underline.decorationStyle == other.underline.decorationStyle && overline.decorationStyle == other.overline.decorationStyle && linethrough.decorationStyle == other.linethrough.decorationStyle; > } > > TextDecorationPainter::TextDecorationPainter(GraphicsContext& context, const FontCascade& font, InlineIterator::TextBoxIterator textBox, float width, const ShadowData* shadow, const FilterOperations* colorFilter, Styles styleOverride) >@@ -253,9 +253,9 @@ void TextDecorationPainter::paintBackgroundDecorations(const TextRun& textRun, c > ASSERT_NOT_REACHED(); > }; > >- bool areLinesOpaque = !m_isPrinting && (!m_textBoxDecorations.contains(TextDecorationLine::Underline) || m_styles.underlineColor.isOpaque()) >- && (!m_textBoxDecorations.contains(TextDecorationLine::Overline) || m_styles.overlineColor.isOpaque()) >- && (!m_textBoxDecorations.contains(TextDecorationLine::LineThrough) || m_styles.linethroughColor.isOpaque()); >+ bool areLinesOpaque = !m_isPrinting && (!m_textBoxDecorations.contains(TextDecorationLine::Underline) || m_styles.underline.color.isOpaque()) >+ && (!m_textBoxDecorations.contains(TextDecorationLine::Overline) || m_styles.overline.color.isOpaque()) >+ && (!m_textBoxDecorations.contains(TextDecorationLine::LineThrough) || m_styles.linethrough.color.isOpaque()); > > float extraOffset = 0; > bool clipping = !areLinesOpaque && m_shadow && m_shadow->next(); >@@ -297,18 +297,26 @@ void TextDecorationPainter::paintBackgroundDecorations(const TextRun& textRun, c > > // These decorations should match the visual overflows computed in visualOverflowForDecorations(). > if (m_textBoxDecorations.contains(TextDecorationLine::Underline)) { >- auto offset = underlineOffsetForTextBoxPainting(m_textBoxStyle, m_textBox); >- float wavyOffset = m_styles.underlineStyle == TextDecorationStyle::Wavy ? m_wavyOffset : 0; >- FloatRect rect(localOrigin, FloatSize(m_width, textDecorationThickness)); >- rect.move(0, offset + wavyOffset); >- paintDecoration(TextDecorationLine::Underline, m_styles.underlineStyle, m_styles.underlineColor, rect); >+ auto offsetAndDecoratingBox = underlineOffsetAndDecoratingBoxForTextBoxPainting(m_textBoxStyle, m_textBox); >+ auto styleToUse = [&] { >+ if (&offsetAndDecoratingBox.decoratingBox == m_textBox->renderer().parent()) >+ return m_styles.underline; >+ // FIXME: make thickness part of the decoration style. >+ auto isFirstLine = m_textBox->lineBox()->isFirst(); >+ auto& decoratingBoxStyle = isFirstLine ? offsetAndDecoratingBox.decoratingBox.firstLineStyle() : offsetAndDecoratingBox.decoratingBox.style(); >+ return stylesForRenderer(offsetAndDecoratingBox.decoratingBox, decoratingBoxStyle.textDecorationsInEffect(), isFirstLine).underline; >+ }(); >+ auto wavyOffset = styleToUse.decorationStyle == TextDecorationStyle::Wavy ? m_wavyOffset : 0.f; >+ auto underlineRect = FloatRect { localOrigin, FloatSize(m_width, textDecorationThickness) }; >+ underlineRect.move(0.f, offsetAndDecoratingBox.underlineOffset + wavyOffset); >+ paintDecoration(TextDecorationLine::Underline, styleToUse.decorationStyle, styleToUse.color, underlineRect); > } > if (m_textBoxDecorations.contains(TextDecorationLine::Overline)) { >- float wavyOffset = m_styles.overlineStyle == TextDecorationStyle::Wavy ? m_wavyOffset : 0; >+ float wavyOffset = m_styles.overline.decorationStyle == TextDecorationStyle::Wavy ? m_wavyOffset : 0; > FloatRect rect(localOrigin, FloatSize(m_width, textDecorationThickness)); > float autoTextDecorationThickness = ceilToDevicePixel(TextDecorationThickness::createWithAuto().resolve(m_textBoxStyle.computedFontSize(), fontMetrics), m_deviceScaleFactor); > rect.move(0, autoTextDecorationThickness - textDecorationThickness - wavyOffset); >- paintDecoration(TextDecorationLine::Overline, m_styles.overlineStyle, m_styles.overlineColor, rect); >+ paintDecoration(TextDecorationLine::Overline, m_styles.overline.decorationStyle, m_styles.overline.color, rect); > } > > // We only want to paint the shadow, hence the transparent color, not the actual line-through, >@@ -329,7 +337,7 @@ void TextDecorationPainter::paintForegroundDecorations(const FloatPoint& boxOrig > return; > > auto textDecorationThickness = ceilToDevicePixel(m_textBoxStyle.textDecorationThickness().resolve(m_textBoxStyle.computedFontSize(), m_textBoxStyle.metricsOfPrimaryFont()), m_deviceScaleFactor); >- paintLineThrough(m_styles.linethroughColor, textDecorationThickness, boxOrigin); >+ paintLineThrough(m_styles.linethrough.color, textDecorationThickness, boxOrigin); > } > > void TextDecorationPainter::paintLineThrough(const Color& color, float thickness, const FloatPoint& localOrigin) >@@ -342,7 +350,7 @@ void TextDecorationPainter::paintLineThrough(const Color& color, float thickness > > m_context.setStrokeColor(color); > >- TextDecorationStyle style = m_styles.linethroughStyle; >+ TextDecorationStyle style = m_styles.linethrough.decorationStyle; > auto strokeStyle = textDecorationStyleToStrokeStyle(style); > > if (style == TextDecorationStyle::Wavy) >@@ -362,18 +370,18 @@ static void collectStylesForRenderer(TextDecorationPainter::Styles& result, cons > > if (decorations.contains(TextDecorationLine::Underline)) { > remainingDecorations.remove(TextDecorationLine::Underline); >- result.underlineColor = color; >- result.underlineStyle = decorationStyle; >+ result.underline.color = color; >+ result.underline.decorationStyle = decorationStyle; > } > if (decorations.contains(TextDecorationLine::Overline)) { > remainingDecorations.remove(TextDecorationLine::Overline); >- result.overlineColor = color; >- result.overlineStyle = decorationStyle; >+ result.overline.color = color; >+ result.overline.decorationStyle = decorationStyle; > } > if (decorations.contains(TextDecorationLine::LineThrough)) { > remainingDecorations.remove(TextDecorationLine::LineThrough); >- result.linethroughColor = color; >- result.linethroughStyle = decorationStyle; >+ result.linethrough.color = color; >+ result.linethrough.decorationStyle = decorationStyle; > } > }; > >diff --git a/Source/WebCore/rendering/TextDecorationPainter.h b/Source/WebCore/rendering/TextDecorationPainter.h >index 9da3d4b042b4..ff73cf86f529 100644 >--- a/Source/WebCore/rendering/TextDecorationPainter.h >+++ b/Source/WebCore/rendering/TextDecorationPainter.h >@@ -53,12 +53,13 @@ public: > bool operator==(const Styles&) const; > bool operator!=(const Styles& other) const { return !(*this == other); } > >- Color underlineColor; >- Color overlineColor; >- Color linethroughColor; >- TextDecorationStyle underlineStyle; >- TextDecorationStyle overlineStyle; >- TextDecorationStyle linethroughStyle; >+ struct DecorationStyleAndColor { >+ Color color; >+ TextDecorationStyle decorationStyle; >+ }; >+ DecorationStyleAndColor underline; >+ DecorationStyleAndColor overline; >+ DecorationStyleAndColor linethrough; > }; > static Color decorationColor(const RenderStyle&); > static Styles stylesForRenderer(const RenderObject&, OptionSet<TextDecorationLine> requestedDecorations, bool firstLineStyle = false, PseudoId = PseudoId::None); >diff --git a/Source/WebCore/style/InlineTextBoxStyle.cpp b/Source/WebCore/style/InlineTextBoxStyle.cpp >index 0f9764f14247..ef4fbd128a0a 100644 >--- a/Source/WebCore/style/InlineTextBoxStyle.cpp >+++ b/Source/WebCore/style/InlineTextBoxStyle.cpp >@@ -55,7 +55,7 @@ static bool isAncestorAndWithinBlock(const RenderInline& ancestor, const RenderO > return false; > } > >-static float minLogicalTopForTextDecorationLine(const InlineIterator::LineBoxIterator& lineBox, float textRunLogicalTop, const RenderElement* decorationRenderer) >+static float minLogicalTopForTextDecorationLine(const InlineIterator::LineBoxIterator& lineBox, float textRunLogicalTop, const RenderElement& decoratingBoxRenderer) > { > auto minLogicalTop = textRunLogicalTop; > for (auto run = lineBox->firstLeafBox(); run; run.traverseNextOnLine()) { >@@ -63,9 +63,9 @@ static float minLogicalTopForTextDecorationLine(const InlineIterator::LineBoxIte > continue; // Positioned placeholders don't affect calculations. > > if (!run->style().textDecorationsInEffect().contains(TextDecorationLine::Underline)) >- continue; // If the text decoration isn't in effect on the child, then it must be outside of |decorationRenderer|'s hierarchy. >+ continue; // If the text decoration isn't in effect on the child, then it must be outside of |decoratingBoxRenderer|'s hierarchy. > >- if (decorationRenderer && decorationRenderer->isRenderInline() && !isAncestorAndWithinBlock(downcast<RenderInline>(*decorationRenderer), &run->renderer())) >+ if (decoratingBoxRenderer.isRenderInline() && !isAncestorAndWithinBlock(downcast<RenderInline>(decoratingBoxRenderer), &run->renderer())) > continue; > > if (run->isText() || run->style().textDecorationSkipInk() == TextDecorationSkipInk::None) >@@ -74,7 +74,7 @@ static float minLogicalTopForTextDecorationLine(const InlineIterator::LineBoxIte > return minLogicalTop; > } > >-static float maxLogicalBottomForTextDecorationLine(const InlineIterator::LineBoxIterator& lineBox, float textRunLogicalBottom, const RenderElement* decorationRenderer) >+static float maxLogicalBottomForTextDecorationLine(const InlineIterator::LineBoxIterator& lineBox, float textRunLogicalBottom, const RenderElement& decoratingBoxRenderer) > { > auto maxLogicalBottom = textRunLogicalBottom; > for (auto run = lineBox->firstLeafBox(); run; run.traverseNextOnLine()) { >@@ -82,9 +82,9 @@ static float maxLogicalBottomForTextDecorationLine(const InlineIterator::LineBox > continue; // Positioned placeholders don't affect calculations. > > if (!run->style().textDecorationsInEffect().contains(TextDecorationLine::Underline)) >- continue; // If the text decoration isn't in effect on the child, then it must be outside of |decorationRenderer|'s hierarchy. >+ continue; // If the text decoration isn't in effect on the child, then it must be outside of |decoratingBoxRenderer|'s hierarchy. > >- if (decorationRenderer && decorationRenderer->isRenderInline() && !isAncestorAndWithinBlock(downcast<RenderInline>(*decorationRenderer), &run->renderer())) >+ if (decoratingBoxRenderer.isRenderInline() && !isAncestorAndWithinBlock(downcast<RenderInline>(decoratingBoxRenderer), &run->renderer())) > continue; > > if (run->isText() || run->style().textDecorationSkipInk() == TextDecorationSkipInk::None) >@@ -111,18 +111,19 @@ static const RenderElement* enclosingRendererWithTextDecoration(const RenderText > return current; > } > >+static float textRunOffsetFromBottomMostWithinDecoratingBox(const InlineIterator::LineBoxIterator& lineBox, const RenderElement& decoratingBoxRenderer, bool isFlippedLinesWritingMode, float textBoxLogicalTop, float textBoxLogicalBottom) >+{ >+ if (isFlippedLinesWritingMode) >+ return textBoxLogicalTop - minLogicalTopForTextDecorationLine(lineBox, textBoxLogicalTop, decoratingBoxRenderer); >+ return maxLogicalBottomForTextDecorationLine(lineBox, textBoxLogicalBottom, decoratingBoxRenderer) - textBoxLogicalBottom; >+} >+ > static float textRunOffsetFromBottomMost(const InlineIterator::LineBoxIterator& lineBox, const RenderText& renderer, float textBoxLogicalTop, float textBoxLogicalBottom) > { >- float offset = 0.f; >- auto* decorationRenderer = enclosingRendererWithTextDecoration(renderer, lineBox->isFirst()); >- if (renderer.style().isFlippedLinesWritingMode()) { >- auto minLogicalTop = minLogicalTopForTextDecorationLine(lineBox, textBoxLogicalTop, decorationRenderer); >- offset = textBoxLogicalTop - minLogicalTop; >- } else { >- offset = maxLogicalBottomForTextDecorationLine(lineBox, textBoxLogicalBottom, decorationRenderer); >- offset -= textBoxLogicalBottom; >- } >- return offset; >+ auto* decoratingBoxRenderer = enclosingRendererWithTextDecoration(renderer, lineBox->isFirst()); >+ if (!decoratingBoxRenderer) >+ return 0.f; >+ return textRunOffsetFromBottomMostWithinDecoratingBox(lineBox, *decoratingBoxRenderer, decoratingBoxRenderer->style().isFlippedLinesWritingMode(), textBoxLogicalTop, textBoxLogicalBottom); > } > > static inline float defaultGap(const RenderStyle& style) >@@ -290,18 +291,31 @@ GlyphOverflow visualOverflowForDecorations(const RenderStyle& style) > return computedVisualOverflowForDecorations(style, underlineOffset); > } > >-float underlineOffsetForTextBoxPainting(const RenderStyle& style, const InlineIterator::TextBoxIterator& textBox) >+UnderlineOffsetAndDecoratingBox underlineOffsetAndDecoratingBoxForTextBoxPainting(const RenderStyle& style, const InlineIterator::TextBoxIterator& textBox) > { >+ // 1. Find the decorating box for this text run (for root inline box content, it's the containing block, for text inside an inline box, it's mostly the parent inline box itself) >+ // 2. compute the underline offset. >+ auto& textBoxRenderer = textBox->renderer(); > auto lineBox = textBox->lineBox(); >+ auto isFirstLine = lineBox->isFirst(); >+ auto* decoratingBoxRenderer = enclosingRendererWithTextDecoration(textBoxRenderer, isFirstLine); >+ if (!decoratingBoxRenderer) { >+ ASSERT_NOT_REACHED(); >+ return { 0.f, *textBoxRenderer.parent() }; >+ } >+ > auto textUnderlinePositionUnder = std::optional<TextUnderlinePositionUnder> { }; > auto underlinePositionValue = resolvedUnderlinePosition(style, lineBox->baselineType()); > > if (underlinePositionValue == TextUnderlinePosition::Under) { >- auto textRunOffset = textRunOffsetFromBottomMost(lineBox, textBox->renderer(), textBox->logicalTop(), textBox->logicalBottom()); >+ auto textRunOffset = textRunOffsetFromBottomMost(lineBox, textBoxRenderer, textBox->logicalTop(), textBox->logicalBottom()); > textUnderlinePositionUnder = TextUnderlinePositionUnder { textBox->logicalBottom() - textBox->logicalTop(), textRunOffset }; > } > >- return computedUnderlineOffset({ style, underlinePositionValue, defaultGap(style), textUnderlinePositionUnder }); >+ return { >+ computedUnderlineOffset({ style, underlinePositionValue, defaultGap(style), textUnderlinePositionUnder }), >+ *decoratingBoxRenderer >+ }; > } > > } >diff --git a/Source/WebCore/style/InlineTextBoxStyle.h b/Source/WebCore/style/InlineTextBoxStyle.h >index 3843209d626b..ed889df5b253 100644 >--- a/Source/WebCore/style/InlineTextBoxStyle.h >+++ b/Source/WebCore/style/InlineTextBoxStyle.h >@@ -33,37 +33,42 @@ > namespace WebCore { > > class LegacyInlineTextBox; >+class RenderElement; > class RenderStyle; > class TextUnderlineOffset; > > inline float wavyOffsetFromDecoration() > { >- return 1; >+ return 1.f; > } > > struct WavyStrokeParameters { > // Distance between decoration's axis and Bezier curve's control points. > // The height of the curve is based on this distance. Increases the curve's height > // as fontSize increases to make the curve look better. >- float controlPointDistance { 0 }; >+ float controlPointDistance { 0.f }; > > // Increment used to form the diamond shape between start point (p1), control > // points and end point (p2) along the axis of the decoration. The curve gets > // wider as font size increases. >- float step { 0 }; >+ float step { 0.f }; > }; > WavyStrokeParameters getWavyStrokeParameters(float fontSize); > > struct TextUnderlinePositionUnder { >- float textRunLogicalHeight { 0 }; >+ float textRunLogicalHeight { 0.f }; > // This offset value is the distance between the current text run's logical bottom and the lowest position of all the text runs > // on line that belong to the same decoration box. >- float textRunOffsetFromBottomMost { 0 }; >+ float textRunOffsetFromBottomMost { 0.f }; > }; > GlyphOverflow visualOverflowForDecorations(const RenderStyle&); > GlyphOverflow visualOverflowForDecorations(const RenderStyle&, FontBaseline, TextUnderlinePositionUnder); > GlyphOverflow visualOverflowForDecorations(const InlineIterator::LineBoxIterator&, const RenderText&, float textBoxLogicalTop, float textBoxLogicalBottom); > >-float underlineOffsetForTextBoxPainting(const RenderStyle&, const InlineIterator::TextBoxIterator&); >+struct UnderlineOffsetAndDecoratingBox { >+ float underlineOffset { 0.f }; >+ const RenderElement& decoratingBox; >+}; >+UnderlineOffsetAndDecoratingBox underlineOffsetAndDecoratingBoxForTextBoxPainting(const RenderStyle&, const InlineIterator::TextBoxIterator&); > > } // namespace WebCore >diff --git a/LayoutTests/fast/css/text-decoration-in-second-order-descendants-expected.html b/LayoutTests/fast/css/text-decoration-in-second-order-descendants-expected.html >index 0e2f17d53332..b82b1aef93c9 100644 >--- a/LayoutTests/fast/css/text-decoration-in-second-order-descendants-expected.html >+++ b/LayoutTests/fast/css/text-decoration-in-second-order-descendants-expected.html >@@ -4,4 +4,4 @@ > <p> > <a href="www.example.com" style="text-decoration: none;">As the child of an absolutely positioned block, this link should not be underlined</a> > </div> >-<a href="www.example.com">As the child of a statically positioned block, this link should be underlined</a> >+<a href="www.example.com" style="text-decoration-color: black">As the child of a statically positioned block, this link should be underlined</a>
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 243619
:
461434
|
461451
|
461453
|
461454
|
461457
|
461458
|
461459
|
461460