Diff
Modified: trunk/Source/WebCore/ChangeLog (285903 => 285904)
--- trunk/Source/WebCore/ChangeLog 2021-11-17 01:08:34 UTC (rev 285903)
+++ trunk/Source/WebCore/ChangeLog 2021-11-17 01:26:57 UTC (rev 285904)
@@ -1,3 +1,69 @@
+2021-11-16 Nikolaos Mouchtaris <[email protected]>
+
+ Rename TextDecoration to TextDecorationLine
+ https://bugs.webkit.org/show_bug.cgi?id=232729
+
+ Reviewed by Myles C. Maxfield.
+
+ Split up patch by Tim Nguyen: https://bugs.webkit.org/show_bug.cgi?id=230083. This patch
+ renames enum TextDecoration to TextDecorationLine, to be more in line with the current spec.
+
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::hasUnderline const):
+ * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
+ (getAttributeSetForAccessibilityObject):
+ * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
+ (AXAttributeStringSetStyle):
+ * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+ (AXAttributeStringSetStyle):
+ * animation/CSSPropertyAnimation.cpp:
+ (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::renderTextDecorationLineFlagsToCSSValue):
+ (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
+ (WebCore::renderTextDecorationFlagsToCSSValue): Deleted.
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::operator OptionSet<TextDecorationLine> const):
+ (WebCore::CSSPrimitiveValue::operator OptionSet<TextDecoration> const): Deleted.
+ * editing/Editor.cpp:
+ (WebCore::Editor::fontAttributesAtSelectionStart):
+ * editing/cocoa/HTMLConverter.mm:
+ (WebCore::editingAttributedString):
+ * rendering/StyledMarkedText.cpp:
+ (WebCore::resolveStyleForMarkedText):
+ * rendering/TextDecorationPainter.cpp:
+ (WebCore::TextDecorationPainter::TextDecorationPainter):
+ (WebCore::TextDecorationPainter::paintTextDecoration):
+ (WebCore::collectStylesForRenderer):
+ (WebCore::TextDecorationPainter::textDecorationsInEffectForStyle):
+ (WebCore::TextDecorationPainter::stylesForRenderer):
+ * rendering/TextDecorationPainter.h:
+ * rendering/style/RenderStyle.h:
+ (WebCore::RenderStyle::textDecorationsInEffect const):
+ (WebCore::RenderStyle::textDecoration const):
+ (WebCore::RenderStyle::addToTextDecorationsInEffect):
+ (WebCore::RenderStyle::setTextDecorationsInEffect):
+ (WebCore::RenderStyle::setTextDecoration):
+ (WebCore::RenderStyle::initialTextDecoration):
+ * rendering/style/RenderStyleConstants.cpp:
+ (WebCore::operator<<):
+ * rendering/style/RenderStyleConstants.h:
+ * rendering/svg/SVGInlineTextBox.cpp:
+ (WebCore::SVGInlineTextBox::paint):
+ (WebCore::positionOffsetForDecoration):
+ (WebCore::thicknessForDecoration):
+ (WebCore::SVGInlineTextBox::paintDecoration):
+ (WebCore::SVGInlineTextBox::paintDecorationWithStyle):
+ * rendering/svg/SVGInlineTextBox.h:
+ * style/InlineTextBoxStyle.cpp:
+ (WebCore::minLogicalTopForTextDecorationLine):
+ (WebCore::maxLogicalBottomForTextDecorationLine):
+ (WebCore::enclosingRendererWithTextDecoration):
+ (WebCore::computeUnderlineOffset):
+ (WebCore::visualOverflowForDecorations):
+ * style/StyleBuilderConverter.h:
+ (WebCore::Style::BuilderConverter::convertTextDecoration):
+
2021-11-16 Devin Rousso <[email protected]>
[Apple Pay] handle unknown setup features
Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (285903 => 285904)
--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2021-11-17 01:08:34 UTC (rev 285903)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2021-11-17 01:26:57 UTC (rev 285904)
@@ -3858,7 +3858,7 @@
if (!m_renderer)
return false;
- return m_renderer->style().textDecorationsInEffect().contains(TextDecoration::Underline);
+ return m_renderer->style().textDecorationsInEffect().contains(TextDecorationLine::Underline);
}
String AccessibilityRenderObject::nameForMSAA() const
Modified: trunk/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp (285903 => 285904)
--- trunk/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp 2021-11-17 01:08:34 UTC (rev 285903)
+++ trunk/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp 2021-11-17 01:26:57 UTC (rev 285904)
@@ -164,11 +164,11 @@
result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_JUSTIFICATION), "fill");
}
- result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_UNDERLINE), (style->textDecoration() & TextDecoration::Underline) ? "single" : "none");
+ result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_UNDERLINE), (style->textDecoration() & TextDecorationLine::Underline) ? "single" : "none");
result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_STYLE), style->fontCascade().italic() ? "italic" : "normal");
- result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_STRIKETHROUGH), (style->textDecoration() & TextDecoration::LineThrough) ? "true" : "false");
+ result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_STRIKETHROUGH), (style->textDecoration() & TextDecorationLine::LineThrough) ? "true" : "false");
result = addToAtkAttributeSet(result, atk_text_attribute_get_name(ATK_TEXT_ATTR_INVISIBLE), (style->visibility() == Visibility::Hidden) ? "true" : "false");
Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm (285903 => 285904)
--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm 2021-11-17 01:08:34 UTC (rev 285903)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperBase.mm 2021-11-17 01:26:57 UTC (rev 285904)
@@ -591,7 +591,7 @@
AXAttributeStringSetFont(attrString, style.fontCascade().primaryFont().getCTFont(), range);
auto decor = style.textDecorationsInEffect();
- if (decor & TextDecoration::Underline)
+ if (decor & TextDecorationLine::Underline)
AXAttributeStringSetNumber(attrString, UIAccessibilityTokenUnderline, @YES, range);
// Add code context if this node is within a <code> block.
Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (285903 => 285904)
--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2021-11-17 01:08:34 UTC (rev 285903)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm 2021-11-17 01:26:57 UTC (rev 285904)
@@ -879,26 +879,25 @@
// set underline and strikethrough
auto decor = style.textDecorationsInEffect();
- if (!(decor & TextDecoration::Underline)) {
+ if (!(decor & TextDecorationLine::Underline)) {
[attrString removeAttribute:NSAccessibilityUnderlineTextAttribute range:range];
[attrString removeAttribute:NSAccessibilityUnderlineColorTextAttribute range:range];
}
-
- if (!(decor & TextDecoration::LineThrough)) {
+ if (!(decor & TextDecorationLine::LineThrough)) {
[attrString removeAttribute:NSAccessibilityStrikethroughTextAttribute range:range];
[attrString removeAttribute:NSAccessibilityStrikethroughColorTextAttribute range:range];
}
- if (decor & TextDecoration::Underline || decor & TextDecoration::LineThrough) {
+ if (decor & TextDecorationLine::Underline || decor & TextDecorationLine::LineThrough) {
// FIXME: Should the underline style be reported here?
auto decorationStyles = TextDecorationPainter::stylesForRenderer(*renderer, decor);
- if (decor & TextDecoration::Underline) {
+ if (decor & TextDecorationLine::Underline) {
AXAttributeStringSetNumber(attrString, NSAccessibilityUnderlineTextAttribute, @YES, range);
AXAttributeStringSetColor(attrString, NSAccessibilityUnderlineColorTextAttribute, cocoaColor(decorationStyles.underlineColor).get(), range);
}
-
- if (decor & TextDecoration::LineThrough) {
+
+ if (decor & TextDecorationLine::LineThrough) {
AXAttributeStringSetNumber(attrString, NSAccessibilityStrikethroughTextAttribute, @YES, range);
AXAttributeStringSetColor(attrString, NSAccessibilityStrikethroughColorTextAttribute, cocoaColor(decorationStyles.linethroughColor).get(), range);
}
Modified: trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp (285903 => 285904)
--- trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp 2021-11-17 01:08:34 UTC (rev 285903)
+++ trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp 2021-11-17 01:26:57 UTC (rev 285904)
@@ -2746,7 +2746,7 @@
new DiscretePropertyWrapper<RubyPosition>(CSSPropertyWebkitRubyPosition, &RenderStyle::rubyPosition, &RenderStyle::setRubyPosition),
new DiscretePropertyWrapper<TableLayoutType>(CSSPropertyTableLayout, &RenderStyle::tableLayout, &RenderStyle::setTableLayout),
new DiscretePropertyWrapper<TextAlignMode>(CSSPropertyTextAlign, &RenderStyle::textAlign, &RenderStyle::setTextAlign),
- new DiscretePropertyWrapper<OptionSet<TextDecoration>>(CSSPropertyTextDecorationLine, &RenderStyle::textDecoration, &RenderStyle::setTextDecoration),
+ new DiscretePropertyWrapper<OptionSet<TextDecorationLine>>(CSSPropertyTextDecorationLine, &RenderStyle::textDecoration, &RenderStyle::setTextDecoration),
new DiscretePropertyWrapper<TextDecorationStyle>(CSSPropertyTextDecorationStyle, &RenderStyle::textDecorationStyle, &RenderStyle::setTextDecorationStyle),
new DiscretePropertyWrapper<const Color&>(CSSPropertyWebkitTextEmphasisColor, &RenderStyle::textEmphasisColor, &RenderStyle::setTextEmphasisColor),
new DiscretePropertyWrapper<OptionSet<TextEmphasisPosition>>(CSSPropertyWebkitTextEmphasisPosition, &RenderStyle::textEmphasisPosition, &RenderStyle::setTextEmphasisPosition),
Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (285903 => 285904)
--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2021-11-17 01:08:34 UTC (rev 285903)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2021-11-17 01:26:57 UTC (rev 285904)
@@ -1613,16 +1613,16 @@
return list;
}
-static Ref<CSSValue> renderTextDecorationFlagsToCSSValue(OptionSet<TextDecoration> textDecoration)
+static Ref<CSSValue> renderTextDecorationLineFlagsToCSSValue(OptionSet<TextDecorationLine> textDecorationLine)
{
auto& cssValuePool = CSSValuePool::singleton();
// Blink value is ignored.
auto list = CSSValueList::createSpaceSeparated();
- if (textDecoration & TextDecoration::Underline)
+ if (textDecorationLine & TextDecorationLine::Underline)
list->append(cssValuePool.createIdentifierValue(CSSValueUnderline));
- if (textDecoration & TextDecoration::Overline)
+ if (textDecorationLine & TextDecorationLine::Overline)
list->append(cssValuePool.createIdentifierValue(CSSValueOverline));
- if (textDecoration & TextDecoration::LineThrough)
+ if (textDecorationLine & TextDecorationLine::LineThrough)
list->append(cssValuePool.createIdentifierValue(CSSValueLineThrough));
if (!list->length())
@@ -3291,7 +3291,7 @@
case CSSPropertyTextAlign:
return cssValuePool.createValue(style.textAlign());
case CSSPropertyTextDecoration:
- return renderTextDecorationFlagsToCSSValue(style.textDecoration());
+ return renderTextDecorationLineFlagsToCSSValue(style.textDecoration());
#if ENABLE(CSS3_TEXT)
case CSSPropertyWebkitTextAlignLast:
return cssValuePool.createValue(style.textAlignLast());
@@ -3301,7 +3301,7 @@
case CSSPropertyWebkitTextDecoration:
return getCSSPropertyValuesForShorthandProperties(webkitTextDecorationShorthand());
case CSSPropertyTextDecorationLine:
- return renderTextDecorationFlagsToCSSValue(style.textDecoration());
+ return renderTextDecorationLineFlagsToCSSValue(style.textDecoration());
case CSSPropertyTextDecorationStyle:
return renderTextDecorationStyleFlagsToCSSValue(style.textDecorationStyle());
case CSSPropertyTextDecorationColor:
@@ -3317,7 +3317,7 @@
case CSSPropertyTextDecorationThickness:
return textDecorationThicknessToCSSValue(style.textDecorationThickness());
case CSSPropertyWebkitTextDecorationsInEffect:
- return renderTextDecorationFlagsToCSSValue(style.textDecorationsInEffect());
+ return renderTextDecorationLineFlagsToCSSValue(style.textDecorationsInEffect());
case CSSPropertyWebkitTextFillColor:
return currentColorOrValidColor(&style, style.textFillColor());
case CSSPropertyWebkitTextEmphasisColor:
Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (285903 => 285904)
--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2021-11-17 01:08:34 UTC (rev 285903)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h 2021-11-17 01:26:57 UTC (rev 285904)
@@ -2412,27 +2412,27 @@
}
#endif // CSS3_TEXT
-template<> inline CSSPrimitiveValue::operator OptionSet<TextDecoration>() const
+template<> inline CSSPrimitiveValue::operator OptionSet<TextDecorationLine>() const
{
ASSERT(isValueID());
switch (m_value.valueID) {
case CSSValueNone:
- return OptionSet<TextDecoration> { };
+ return OptionSet<TextDecorationLine> { };
case CSSValueUnderline:
- return TextDecoration::Underline;
+ return TextDecorationLine::Underline;
case CSSValueOverline:
- return TextDecoration::Overline;
+ return TextDecorationLine::Overline;
case CSSValueLineThrough:
- return TextDecoration::LineThrough;
+ return TextDecorationLine::LineThrough;
case CSSValueBlink:
- return TextDecoration::Blink;
+ return TextDecorationLine::Blink;
default:
break;
}
ASSERT_NOT_REACHED();
- return OptionSet<TextDecoration> { };
+ return OptionSet<TextDecorationLine> { };
}
template<> inline CSSPrimitiveValue::operator TextDecorationStyle() const
Modified: trunk/Source/WebCore/editing/Editor.cpp (285903 => 285904)
--- trunk/Source/WebCore/editing/Editor.cpp 2021-11-17 01:08:34 UTC (rev 285903)
+++ trunk/Source/WebCore/editing/Editor.cpp 2021-11-17 01:26:57 UTC (rev 285904)
@@ -4098,9 +4098,9 @@
}
} else {
auto decoration = style->textDecorationsInEffect();
- if (decoration & TextDecoration::LineThrough)
+ if (decoration & TextDecorationLine::LineThrough)
attributes.hasStrikeThrough = true;
- if (decoration & TextDecoration::Underline)
+ if (decoration & TextDecorationLine::Underline)
attributes.hasUnderline = true;
}
Modified: trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm (285903 => 285904)
--- trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm 2021-11-17 01:08:34 UTC (rev 285903)
+++ trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm 2021-11-17 01:26:57 UTC (rev 285904)
@@ -2380,9 +2380,9 @@
if (!renderer)
continue;
auto& style = renderer->style();
- if (style.textDecorationsInEffect() & TextDecoration::Underline)
+ if (style.textDecorationsInEffect() & TextDecorationLine::Underline)
[attrs setObject:[NSNumber numberWithInteger:NSUnderlineStyleSingle] forKey:NSUnderlineStyleAttributeName];
- if (style.textDecorationsInEffect() & TextDecoration::LineThrough)
+ if (style.textDecorationsInEffect() & TextDecorationLine::LineThrough)
[attrs setObject:[NSNumber numberWithInteger:NSUnderlineStyleSingle] forKey:NSStrikethroughStyleAttributeName];
if (auto font = style.fontCascade().primaryFont().getCTFont())
[attrs setObject:toNSFont(font) forKey:NSFontAttributeName];
Modified: trunk/Source/WebCore/rendering/StyledMarkedText.cpp (285903 => 285904)
--- trunk/Source/WebCore/rendering/StyledMarkedText.cpp 2021-11-17 01:08:34 UTC (rev 285903)
+++ trunk/Source/WebCore/rendering/StyledMarkedText.cpp 2021-11-17 01:26:57 UTC (rev 285904)
@@ -57,15 +57,15 @@
auto decorationStyle = renderStyle->textDecorationStyle();
auto decorations = renderStyle->textDecorationsInEffect();
- if (decorations.contains(TextDecoration::Underline)) {
+ if (decorations.contains(TextDecorationLine::Underline)) {
style.textDecorationStyles.underlineColor = color;
style.textDecorationStyles.underlineStyle = decorationStyle;
}
- if (decorations.contains(TextDecoration::Overline)) {
+ if (decorations.contains(TextDecorationLine::Overline)) {
style.textDecorationStyles.overlineColor = color;
style.textDecorationStyles.overlineStyle = decorationStyle;
}
- if (decorations.contains(TextDecoration::LineThrough)) {
+ if (decorations.contains(TextDecorationLine::LineThrough)) {
style.textDecorationStyles.linethroughColor = color;
style.textDecorationStyles.linethroughStyle = decorationStyle;
}
Modified: trunk/Source/WebCore/rendering/TextDecorationPainter.cpp (285903 => 285904)
--- trunk/Source/WebCore/rendering/TextDecorationPainter.cpp 2021-11-17 01:08:34 UTC (rev 285903)
+++ trunk/Source/WebCore/rendering/TextDecorationPainter.cpp 2021-11-17 01:26:57 UTC (rev 285904)
@@ -190,7 +190,7 @@
&& underlineStyle == other.underlineStyle && overlineStyle == other.overlineStyle && linethroughStyle == other.linethroughStyle;
}
-TextDecorationPainter::TextDecorationPainter(GraphicsContext& context, OptionSet<TextDecoration> decorations, const RenderText& renderer, bool isFirstLine, const FontCascade& font, std::optional<Styles> styles)
+TextDecorationPainter::TextDecorationPainter(GraphicsContext& context, OptionSet<TextDecorationLine> decorations, const RenderText& renderer, bool isFirstLine, const FontCascade& font, std::optional<Styles> styles)
: m_context { context }
, m_decorations { decorations }
, m_wavyOffset { wavyOffsetFromDecoration() }
@@ -207,7 +207,7 @@
float textDecorationThickness = m_lineStyle.textDecorationThickness().resolve(m_lineStyle.computedFontSize(), fontMetrics);
FloatPoint localOrigin = boxOrigin;
- auto paintDecoration = [&] (TextDecoration decoration, TextDecorationStyle style, const Color& color, const FloatRect& rect) {
+ auto paintDecoration = [&] (TextDecorationLine decoration, TextDecorationStyle style, const Color& color, const FloatRect& rect) {
m_context.setStrokeColor(color);
auto strokeStyle = textDecorationStyleToStrokeStyle(style);
@@ -214,7 +214,7 @@
if (style == TextDecorationStyle::Wavy)
strokeWavyTextDecoration(m_context, rect, m_lineStyle.computedFontPixelSize());
- else if (decoration == TextDecoration::Underline || decoration == TextDecoration::Overline) {
+ else if (decoration == TextDecorationLine::Underline || decoration == TextDecorationLine::Overline) {
if ((m_lineStyle.textDecorationSkipInk() == TextDecorationSkipInk::Auto || m_lineStyle.textDecorationSkipInk() == TextDecorationSkipInk::All) && m_isHorizontal) {
if (!m_context.paintingDisabled()) {
FloatRect underlineBoundingBox = m_context.computeUnderlineBoundsForText(rect, m_isPrinting);
@@ -229,14 +229,14 @@
m_context.drawLineForText(rect, m_isPrinting, style == TextDecorationStyle::Double, strokeStyle);
}
} else {
- ASSERT(decoration == TextDecoration::LineThrough);
+ ASSERT(decoration == TextDecorationLine::LineThrough);
m_context.drawLineForText(rect, m_isPrinting, style == TextDecorationStyle::Double, strokeStyle);
}
};
- bool areLinesOpaque = !m_isPrinting && (!m_decorations.contains(TextDecoration::Underline) || m_styles.underlineColor.isOpaque())
- && (!m_decorations.contains(TextDecoration::Overline) || m_styles.overlineColor.isOpaque())
- && (!m_decorations.contains(TextDecoration::LineThrough) || m_styles.linethroughColor.isOpaque());
+ bool areLinesOpaque = !m_isPrinting && (!m_decorations.contains(TextDecorationLine::Underline) || m_styles.underlineColor.isOpaque())
+ && (!m_decorations.contains(TextDecorationLine::Overline) || m_styles.overlineColor.isOpaque())
+ && (!m_decorations.contains(TextDecorationLine::LineThrough) || m_styles.linethroughColor.isOpaque());
float extraOffset = 0;
bool clipping = !areLinesOpaque && m_shadow && m_shadow->next();
@@ -277,7 +277,7 @@
}
// These decorations should match the visual overflows computed in visualOverflowForDecorations().
- if (m_decorations.contains(TextDecoration::Underline)) {
+ if (m_decorations.contains(TextDecorationLine::Underline)) {
float textDecorationBaseFontSize = 16;
auto defaultGap = m_lineStyle.computedFontSize() / textDecorationBaseFontSize;
float offset = computeUnderlineOffset(m_lineStyle.textUnderlinePosition(), m_lineStyle.textUnderlineOffset(), m_lineStyle.fontMetrics(), m_textBox, defaultGap);
@@ -284,21 +284,21 @@
float wavyOffset = m_styles.underlineStyle == TextDecorationStyle::Wavy ? m_wavyOffset : 0;
FloatRect rect(localOrigin, FloatSize(m_width, textDecorationThickness));
rect.move(0, offset + wavyOffset);
- paintDecoration(TextDecoration::Underline, m_styles.underlineStyle, m_styles.underlineColor, rect);
+ paintDecoration(TextDecorationLine::Underline, m_styles.underlineStyle, m_styles.underlineColor, rect);
}
- if (m_decorations.contains(TextDecoration::Overline)) {
+ if (m_decorations.contains(TextDecorationLine::Overline)) {
float wavyOffset = m_styles.overlineStyle == TextDecorationStyle::Wavy ? m_wavyOffset : 0;
FloatRect rect(localOrigin, FloatSize(m_width, textDecorationThickness));
float autoTextDecorationThickness = TextDecorationThickness::createWithAuto().resolve(m_lineStyle.computedFontSize(), fontMetrics);
rect.move(0, autoTextDecorationThickness - textDecorationThickness - wavyOffset);
- paintDecoration(TextDecoration::Overline, m_styles.overlineStyle, m_styles.overlineColor, rect);
+ paintDecoration(TextDecorationLine::Overline, m_styles.overlineStyle, m_styles.overlineColor, rect);
}
- if (m_decorations.contains(TextDecoration::LineThrough)) {
+ if (m_decorations.contains(TextDecorationLine::LineThrough)) {
FloatRect rect(localOrigin, FloatSize(m_width, textDecorationThickness));
float autoTextDecorationThickness = TextDecorationThickness::createWithAuto().resolve(m_lineStyle.computedFontSize(), fontMetrics);
auto center = 2 * fontMetrics.floatAscent() / 3 + autoTextDecorationThickness / 2;
rect.move(0, center - textDecorationThickness / 2);
- paintDecoration(TextDecoration::LineThrough, m_styles.linethroughStyle, m_styles.linethroughColor, rect);
+ paintDecoration(TextDecorationLine::LineThrough, m_styles.linethroughStyle, m_styles.linethroughColor, rect);
}
} while (shadow);
@@ -308,24 +308,24 @@
m_context.clearShadow();
}
-static void collectStylesForRenderer(TextDecorationPainter::Styles& result, const RenderObject& renderer, OptionSet<TextDecoration> remainingDecorations, bool firstLineStyle, PseudoId pseudoId)
+static void collectStylesForRenderer(TextDecorationPainter::Styles& result, const RenderObject& renderer, OptionSet<TextDecorationLine> remainingDecorations, bool firstLineStyle, PseudoId pseudoId)
{
- auto extractDecorations = [&] (const RenderStyle& style, OptionSet<TextDecoration> decorations) {
+ auto extractDecorations = [&] (const RenderStyle& style, OptionSet<TextDecorationLine> decorations) {
auto color = TextDecorationPainter::decorationColor(style);
auto decorationStyle = style.textDecorationStyle();
- if (decorations.contains(TextDecoration::Underline)) {
- remainingDecorations.remove(TextDecoration::Underline);
+ if (decorations.contains(TextDecorationLine::Underline)) {
+ remainingDecorations.remove(TextDecorationLine::Underline);
result.underlineColor = color;
result.underlineStyle = decorationStyle;
}
- if (decorations.contains(TextDecoration::Overline)) {
- remainingDecorations.remove(TextDecoration::Overline);
+ if (decorations.contains(TextDecorationLine::Overline)) {
+ remainingDecorations.remove(TextDecorationLine::Overline);
result.overlineColor = color;
result.overlineStyle = decorationStyle;
}
- if (decorations.contains(TextDecoration::LineThrough)) {
- remainingDecorations.remove(TextDecoration::LineThrough);
+ if (decorations.contains(TextDecorationLine::LineThrough)) {
+ remainingDecorations.remove(TextDecorationLine::LineThrough);
result.linethroughColor = color;
result.linethroughStyle = decorationStyle;
}
@@ -368,19 +368,19 @@
return style.visitedDependentColorWithColorFilter(CSSPropertyTextDecorationColor);
}
-OptionSet<TextDecoration> TextDecorationPainter::textDecorationsInEffectForStyle(const TextDecorationPainter::Styles& style)
+OptionSet<TextDecorationLine> TextDecorationPainter::textDecorationsInEffectForStyle(const TextDecorationPainter::Styles& style)
{
- OptionSet<TextDecoration> decorations;
+ OptionSet<TextDecorationLine> decorations;
if (style.underlineColor.isValid())
- decorations.add(TextDecoration::Underline);
+ decorations.add(TextDecorationLine::Underline);
if (style.overlineColor.isValid())
- decorations.add(TextDecoration::Overline);
+ decorations.add(TextDecorationLine::Overline);
if (style.linethroughColor.isValid())
- decorations.add(TextDecoration::LineThrough);
+ decorations.add(TextDecorationLine::LineThrough);
return decorations;
};
-auto TextDecorationPainter::stylesForRenderer(const RenderObject& renderer, OptionSet<TextDecoration> requestedDecorations, bool firstLineStyle, PseudoId pseudoId) -> Styles
+auto TextDecorationPainter::stylesForRenderer(const RenderObject& renderer, OptionSet<TextDecorationLine> requestedDecorations, bool firstLineStyle, PseudoId pseudoId) -> Styles
{
Styles result;
collectStylesForRenderer(result, renderer, requestedDecorations, false, pseudoId);
Modified: trunk/Source/WebCore/rendering/TextDecorationPainter.h (285903 => 285904)
--- trunk/Source/WebCore/rendering/TextDecorationPainter.h 2021-11-17 01:08:34 UTC (rev 285903)
+++ trunk/Source/WebCore/rendering/TextDecorationPainter.h 2021-11-17 01:26:57 UTC (rev 285904)
@@ -44,7 +44,7 @@
class TextDecorationPainter {
public:
struct Styles;
- TextDecorationPainter(GraphicsContext&, OptionSet<TextDecoration> decorations, const RenderText&, bool isFirstLine, const FontCascade&, std::optional<Styles> = std::nullopt);
+ TextDecorationPainter(GraphicsContext&, OptionSet<TextDecorationLine> decorations, const RenderText&, bool isFirstLine, const FontCascade&, std::optional<Styles> = std::nullopt);
void setTextBox(InlineIterator::TextBoxIterator textBox) { m_textBox = textBox; }
void setIsHorizontal(bool isHorizontal) { m_isHorizontal = isHorizontal; }
@@ -66,12 +66,12 @@
TextDecorationStyle linethroughStyle;
};
static Color decorationColor(const RenderStyle&);
- static OptionSet<TextDecoration> textDecorationsInEffectForStyle(const Styles&);
- static Styles stylesForRenderer(const RenderObject&, OptionSet<TextDecoration> requestedDecorations, bool firstLineStyle = false, PseudoId = PseudoId::None);
+ static OptionSet<TextDecorationLine> textDecorationsInEffectForStyle(const Styles&);
+ static Styles stylesForRenderer(const RenderObject&, OptionSet<TextDecorationLine> requestedDecorations, bool firstLineStyle = false, PseudoId = PseudoId::None);
private:
GraphicsContext& m_context;
- OptionSet<TextDecoration> m_decorations;
+ OptionSet<TextDecorationLine> m_decorations;
float m_wavyOffset;
float m_width { 0 };
FloatPoint m_boxOrigin;
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (285903 => 285904)
--- trunk/Source/WebCore/rendering/style/RenderStyle.h 2021-11-17 01:08:34 UTC (rev 285903)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h 2021-11-17 01:26:57 UTC (rev 285904)
@@ -371,8 +371,8 @@
const Length& textIndent() const { return m_rareInheritedData->indent; }
TextAlignMode textAlign() const { return static_cast<TextAlignMode>(m_inheritedFlags.textAlign); }
TextTransform textTransform() const { return static_cast<TextTransform>(m_inheritedFlags.textTransform); }
- OptionSet<TextDecoration> textDecorationsInEffect() const { return OptionSet<TextDecoration>::fromRaw(m_inheritedFlags.textDecorations); }
- OptionSet<TextDecoration> textDecoration() const { return OptionSet<TextDecoration>::fromRaw(m_visualData->textDecoration); }
+ OptionSet<TextDecorationLine> textDecorationsInEffect() const { return OptionSet<TextDecorationLine>::fromRaw(m_inheritedFlags.textDecorations); }
+ OptionSet<TextDecorationLine> textDecoration() const { return OptionSet<TextDecorationLine>::fromRaw(m_visualData->textDecoration); }
TextDecorationStyle textDecorationStyle() const { return static_cast<TextDecorationStyle>(m_rareNonInheritedData->textDecorationStyle); }
TextDecorationSkipInk textDecorationSkipInk() const { return static_cast<TextDecorationSkipInk>(m_rareInheritedData->textDecorationSkipInk); }
TextUnderlinePosition textUnderlinePosition() const { return static_cast<TextUnderlinePosition>(m_rareInheritedData->textUnderlinePosition); }
@@ -984,9 +984,9 @@
void setTextIndent(Length&& length) { SET_VAR(m_rareInheritedData, indent, WTFMove(length)); }
void setTextAlign(TextAlignMode v) { m_inheritedFlags.textAlign = static_cast<unsigned>(v); }
void setTextTransform(TextTransform v) { m_inheritedFlags.textTransform = static_cast<unsigned>(v); }
- void addToTextDecorationsInEffect(OptionSet<TextDecoration> v) { m_inheritedFlags.textDecorations |= static_cast<unsigned>(v.toRaw()); }
- void setTextDecorationsInEffect(OptionSet<TextDecoration> v) { m_inheritedFlags.textDecorations = v.toRaw(); }
- void setTextDecoration(OptionSet<TextDecoration> v) { SET_VAR(m_visualData, textDecoration, v.toRaw()); }
+ void addToTextDecorationsInEffect(OptionSet<TextDecorationLine> v) { m_inheritedFlags.textDecorations |= static_cast<unsigned>(v.toRaw()); }
+ void setTextDecorationsInEffect(OptionSet<TextDecorationLine> v) { m_inheritedFlags.textDecorations = v.toRaw(); }
+ void setTextDecoration(OptionSet<TextDecorationLine> v) { SET_VAR(m_visualData, textDecoration, v.toRaw()); }
void setTextDecorationStyle(TextDecorationStyle v) { SET_VAR(m_rareNonInheritedData, textDecorationStyle, static_cast<unsigned>(v)); }
void setTextDecorationSkipInk(TextDecorationSkipInk skipInk) { SET_VAR(m_rareInheritedData, textDecorationSkipInk, static_cast<unsigned>(skipInk)); }
void setTextUnderlinePosition(TextUnderlinePosition position) { SET_VAR(m_rareInheritedData, textUnderlinePosition, static_cast<unsigned>(position)); }
@@ -1613,7 +1613,7 @@
// Returning -100% percent here means the line-height is not set.
static Length initialLineHeight() { return Length(-100.0f, LengthType::Percent); }
static TextAlignMode initialTextAlign() { return TextAlignMode::Start; }
- static OptionSet<TextDecoration> initialTextDecoration() { return OptionSet<TextDecoration> { }; }
+ static OptionSet<TextDecorationLine> initialTextDecoration() { return OptionSet<TextDecorationLine> { }; }
static TextDecorationStyle initialTextDecorationStyle() { return TextDecorationStyle::Solid; }
static TextDecorationSkipInk initialTextDecorationSkipInk() { return TextDecorationSkipInk::Auto; }
static TextUnderlinePosition initialTextUnderlinePosition() { return TextUnderlinePosition::Auto; }
Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp (285903 => 285904)
--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp 2021-11-17 01:08:34 UTC (rev 285903)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp 2021-11-17 01:26:57 UTC (rev 285904)
@@ -1046,14 +1046,14 @@
return ts;
}
-TextStream& operator<<(TextStream& ts, TextDecoration textDecoration)
+TextStream& operator<<(TextStream& ts, TextDecorationLine line)
{
- switch (textDecoration) {
- case TextDecoration::None: ts << "none"; break;
- case TextDecoration::Underline: ts << "underline"; break;
- case TextDecoration::Overline: ts << "overline"; break;
- case TextDecoration::LineThrough: ts << "line-through"; break;
- case TextDecoration::Blink: ts << "blink"; break;
+ switch (line) {
+ case TextDecorationLine::None: ts << "none"; break;
+ case TextDecorationLine::Underline: ts << "underline"; break;
+ case TextDecorationLine::Overline: ts << "overline"; break;
+ case TextDecorationLine::LineThrough: ts << "line-through"; break;
+ case TextDecorationLine::Blink: ts << "blink"; break;
}
return ts;
}
Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (285903 => 285904)
--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h 2021-11-17 01:08:34 UTC (rev 285903)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h 2021-11-17 01:26:57 UTC (rev 285904)
@@ -740,7 +740,7 @@
};
static const size_t TextDecorationBits = 4;
-enum class TextDecoration : uint8_t {
+enum class TextDecorationLine : uint8_t {
None = 0,
Underline = 1 << 0,
Overline = 1 << 1,
@@ -1333,7 +1333,7 @@
WTF::TextStream& operator<<(WTF::TextStream&, TableLayoutType);
WTF::TextStream& operator<<(WTF::TextStream&, TextAlignMode);
WTF::TextStream& operator<<(WTF::TextStream&, TextCombine);
-WTF::TextStream& operator<<(WTF::TextStream&, TextDecoration);
+WTF::TextStream& operator<<(WTF::TextStream&, TextDecorationLine);
WTF::TextStream& operator<<(WTF::TextStream&, TextDecorationSkipInk);
WTF::TextStream& operator<<(WTF::TextStream&, TextDecorationStyle);
WTF::TextStream& operator<<(WTF::TextStream&, TextEmphasisFill);
Modified: trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp (285903 => 285904)
--- trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp 2021-11-17 01:08:34 UTC (rev 285903)
+++ trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.cpp 2021-11-17 01:26:57 UTC (rev 285904)
@@ -295,10 +295,10 @@
// Spec: All text decorations except line-through should be drawn before the text is filled and stroked; thus, the text is rendered on top of these decorations.
auto decorations = style.textDecorationsInEffect();
- if (decorations & TextDecoration::Underline)
- paintDecoration(paintInfo.context(), TextDecoration::Underline, fragment);
- if (decorations & TextDecoration::Overline)
- paintDecoration(paintInfo.context(), TextDecoration::Overline, fragment);
+ if (decorations & TextDecorationLine::Underline)
+ paintDecoration(paintInfo.context(), TextDecorationLine::Underline, fragment);
+ if (decorations & TextDecorationLine::Overline)
+ paintDecoration(paintInfo.context(), TextDecorationLine::Overline, fragment);
auto paintOrder = RenderStyle::paintTypesForPaintOrder(style.paintOrder());
for (unsigned i = 0; i < paintOrder.size(); ++i) {
@@ -323,8 +323,8 @@
}
// Spec: Line-through should be drawn after the text is filled and stroked; thus, the line-through is rendered on top of the text.
- if (decorations & TextDecoration::LineThrough)
- paintDecoration(paintInfo.context(), TextDecoration::LineThrough, fragment);
+ if (decorations & TextDecorationLine::LineThrough)
+ paintDecoration(paintInfo.context(), TextDecorationLine::LineThrough, fragment);
setPaintingResourceMode({ });
}
@@ -438,15 +438,15 @@
return true;
}
-static inline float positionOffsetForDecoration(OptionSet<TextDecoration> decoration, const FontMetrics& fontMetrics, float thickness)
+static inline float positionOffsetForDecoration(OptionSet<TextDecorationLine> decoration, const FontMetrics& fontMetrics, float thickness)
{
// FIXME: For SVG Fonts we need to use the attributes defined in the <font-face> if specified.
// Compatible with Batik/Opera.
- if (decoration == TextDecoration::Underline)
+ if (decoration == TextDecorationLine::Underline)
return fontMetrics.floatAscent() + thickness * 1.5f;
- if (decoration == TextDecoration::Overline)
+ if (decoration == TextDecorationLine::Overline)
return thickness;
- if (decoration == TextDecoration::LineThrough)
+ if (decoration == TextDecorationLine::LineThrough)
return fontMetrics.floatAscent() * 5 / 8.0f;
ASSERT_NOT_REACHED();
@@ -453,7 +453,7 @@
return 0.0f;
}
-static inline float thicknessForDecoration(OptionSet<TextDecoration>, const FontCascade& font)
+static inline float thicknessForDecoration(OptionSet<TextDecorationLine>, const FontCascade& font)
{
// FIXME: For SVG Fonts we need to use the attributes defined in the <font-face> if specified.
// Compatible with Batik/Opera
@@ -477,7 +477,7 @@
return *renderer;
}
-void SVGInlineTextBox::paintDecoration(GraphicsContext& context, OptionSet<TextDecoration> decoration, const SVGTextFragment& fragment)
+void SVGInlineTextBox::paintDecoration(GraphicsContext& context, OptionSet<TextDecorationLine> decoration, const SVGTextFragment& fragment)
{
if (renderer().style().textDecorationsInEffect().isEmpty())
return;
@@ -505,7 +505,7 @@
}
}
-void SVGInlineTextBox::paintDecorationWithStyle(GraphicsContext& context, OptionSet<TextDecoration> decoration, const SVGTextFragment& fragment, RenderBoxModelObject& decorationRenderer)
+void SVGInlineTextBox::paintDecorationWithStyle(GraphicsContext& context, OptionSet<TextDecorationLine> decoration, const SVGTextFragment& fragment, RenderBoxModelObject& decorationRenderer)
{
ASSERT(!m_paintingResource);
ASSERT(!paintingResourceMode().isEmpty());
Modified: trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.h (285903 => 285904)
--- trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.h 2021-11-17 01:08:34 UTC (rev 285903)
+++ trunk/Source/WebCore/rendering/svg/SVGInlineTextBox.h 2021-11-17 01:26:57 UTC (rev 285904)
@@ -83,8 +83,8 @@
bool prepareGraphicsContextForTextPainting(GraphicsContext*&, float scalingFactor, const RenderStyle&);
void restoreGraphicsContextAfterTextPainting(GraphicsContext*&);
- void paintDecoration(GraphicsContext&, OptionSet<TextDecoration>, const SVGTextFragment&);
- void paintDecorationWithStyle(GraphicsContext&, OptionSet<TextDecoration>, const SVGTextFragment&, RenderBoxModelObject& decorationRenderer);
+ void paintDecoration(GraphicsContext&, OptionSet<TextDecorationLine>, const SVGTextFragment&);
+ void paintDecorationWithStyle(GraphicsContext&, OptionSet<TextDecorationLine>, const SVGTextFragment&, RenderBoxModelObject& decorationRenderer);
void paintTextWithShadows(GraphicsContext&, const RenderStyle&, TextRun&, const SVGTextFragment&, unsigned startPosition, unsigned endPosition);
void paintText(GraphicsContext&, const RenderStyle&, const RenderStyle& selectionStyle, const SVGTextFragment&, bool hasSelection, bool paintSelectedTextOnly);
Modified: trunk/Source/WebCore/style/InlineTextBoxStyle.cpp (285903 => 285904)
--- trunk/Source/WebCore/style/InlineTextBoxStyle.cpp 2021-11-17 01:08:34 UTC (rev 285903)
+++ trunk/Source/WebCore/style/InlineTextBoxStyle.cpp 2021-11-17 01:26:57 UTC (rev 285904)
@@ -49,7 +49,7 @@
return false;
}
-static void minLogicalTopForTextDecorationLine(const InlineIterator::LineIterator& line, float& minLogicalTop, const RenderElement* decorationRenderer, OptionSet<TextDecoration> textDecoration)
+static void minLogicalTopForTextDecorationLine(const InlineIterator::LineIterator& line, float& minLogicalTop, const RenderElement* decorationRenderer, OptionSet<TextDecorationLine> textDecoration)
{
for (auto run = line->firstRun(); run; run.traverseNextOnLine()) {
if (run->renderer().isOutOfFlowPositioned())
@@ -66,7 +66,7 @@
}
}
-static void maxLogicalBottomForTextDecorationLine(const InlineIterator::LineIterator& line, float& maxLogicalBottom, const RenderElement* decorationRenderer, OptionSet<TextDecoration> textDecoration)
+static void maxLogicalBottomForTextDecorationLine(const InlineIterator::LineIterator& line, float& maxLogicalBottom, const RenderElement* decorationRenderer, OptionSet<TextDecorationLine> textDecoration)
{
for (auto run = line->firstRun(); run; run.traverseNextOnLine()) {
if (run->renderer().isOutOfFlowPositioned())
@@ -83,7 +83,7 @@
}
}
-static const RenderElement* enclosingRendererWithTextDecoration(const RenderText& renderer, OptionSet<TextDecoration> textDecoration, bool firstLine)
+static const RenderElement* enclosingRendererWithTextDecoration(const RenderText& renderer, OptionSet<TextDecorationLine> textDecoration, bool firstLine)
{
const RenderElement* current = renderer.parent();
do {
@@ -135,16 +135,16 @@
ASSERT(textRun);
// Position underline relative to the bottom edge of the lowest element's content box.
auto line = textRun->line();
- auto* decorationRenderer = enclosingRendererWithTextDecoration(textRun->renderer(), TextDecoration::Underline, line->isFirst());
+ auto* decorationRenderer = enclosingRendererWithTextDecoration(textRun->renderer(), TextDecorationLine::Underline, line->isFirst());
float offset;
if (textRun->renderer().style().isFlippedLinesWritingMode()) {
offset = textRun->logicalTop();
- minLogicalTopForTextDecorationLine(line, offset, decorationRenderer, TextDecoration::Underline);
+ minLogicalTopForTextDecorationLine(line, offset, decorationRenderer, TextDecorationLine::Underline);
offset = textRun->logicalTop() - offset;
} else {
offset = textRun->logicalBottom();
- maxLogicalBottomForTextDecorationLine(line, offset, decorationRenderer, TextDecoration::Underline);
+ maxLogicalBottomForTextDecorationLine(line, offset, decorationRenderer, TextDecorationLine::Underline);
offset -= textRun->logicalBottom();
}
auto desiredOffset = textRun->logicalHeight() + gap + std::max(offset, 0.0f) + underlineOffset.lengthOr(0);
@@ -190,7 +190,7 @@
// These metrics must match where underlines get drawn.
// FIXME: Share the code in TextDecorationPainter::paintTextDecoration() so we can just query it for the painted geometry.
- if (decoration & TextDecoration::Underline) {
+ if (decoration & TextDecorationLine::Underline) {
// Compensate for the integral ceiling in GraphicsContext::computeLineBoundsAndAntialiasingModeForText()
int underlineOffset = 1;
float textDecorationBaseFontSize = 16;
@@ -204,7 +204,7 @@
overflowResult.extendTop(-underlineOffset);
}
}
- if (decoration & TextDecoration::Overline) {
+ if (decoration & TextDecorationLine::Overline) {
FloatRect rect(FloatPoint(), FloatSize(1, strokeThickness));
float autoTextDecorationThickness = TextDecorationThickness::createWithAuto().resolve(lineStyle.computedFontSize(), lineStyle.fontMetrics());
rect.move(0, autoTextDecorationThickness - strokeThickness - wavyOffset);
@@ -217,7 +217,7 @@
overflowResult.extendTop(-rect.y());
overflowResult.extendBottom(rect.maxY() - height);
}
- if (decoration & TextDecoration::LineThrough) {
+ if (decoration & TextDecorationLine::LineThrough) {
FloatRect rect(FloatPoint(), FloatSize(1, strokeThickness));
float autoTextDecorationThickness = TextDecorationThickness::createWithAuto().resolve(lineStyle.computedFontSize(), lineStyle.fontMetrics());
auto center = 2 * lineStyle.fontMetrics().floatAscent() / 3 + autoTextDecorationThickness / 2;
Modified: trunk/Source/WebCore/style/StyleBuilderConverter.h (285903 => 285904)
--- trunk/Source/WebCore/style/StyleBuilderConverter.h 2021-11-17 01:08:34 UTC (rev 285903)
+++ trunk/Source/WebCore/style/StyleBuilderConverter.h 2021-11-17 01:26:57 UTC (rev 285904)
@@ -79,7 +79,7 @@
static LengthSize convertRadius(BuilderState&, const CSSValue&);
static LengthPoint convertPosition(BuilderState&, const CSSValue&);
static LengthPoint convertPositionOrAuto(BuilderState&, const CSSValue&);
- static OptionSet<TextDecoration> convertTextDecoration(BuilderState&, const CSSValue&);
+ static OptionSet<TextDecorationLine> convertTextDecoration(BuilderState&, const CSSValue&);
template<typename T> static T convertNumber(BuilderState&, const CSSValue&);
template<typename T> static T convertNumberOrAuto(BuilderState&, const CSSValue&);
static short convertWebkitHyphenateLimitLines(BuilderState&, const CSSValue&);
@@ -429,7 +429,7 @@
return LengthPoint(Length(LengthType::Auto), Length(LengthType::Auto));
}
-inline OptionSet<TextDecoration> BuilderConverter::convertTextDecoration(BuilderState&, const CSSValue& value)
+inline OptionSet<TextDecorationLine> BuilderConverter::convertTextDecoration(BuilderState&, const CSSValue& value)
{
auto result = RenderStyle::initialTextDecoration();
if (is<CSSValueList>(value)) {
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (285903 => 285904)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2021-11-17 01:08:34 UTC (rev 285903)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2021-11-17 01:26:57 UTC (rev 285904)
@@ -1,3 +1,13 @@
+2021-11-16 Nikolaos Mouchtaris <[email protected]>
+
+ Rename TextDecoration to TextDecorationLine
+ https://bugs.webkit.org/show_bug.cgi?id=232729
+
+ Reviewed by Myles C. Maxfield.
+
+ * WebView/WebView.mm:
+ (-[WebView updateTextTouchBar]):
+
2021-11-11 Nikolaos Mouchtaris <[email protected]>
Make scroll granularity an enum class
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (285903 => 285904)
--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2021-11-17 01:08:34 UTC (rev 285903)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm 2021-11-17 01:26:57 UTC (rev 285904)
@@ -9509,7 +9509,7 @@
String value = typingStyle->style()->getPropertyValue(CSSPropertyWebkitTextDecorationsInEffect);
[_private->_textTouchBarItemController setTextIsUnderlined:value.contains("underline")];
} else
- [_private->_textTouchBarItemController setTextIsUnderlined:style->textDecorationsInEffect().contains(TextDecoration::Underline)];
+ [_private->_textTouchBarItemController setTextIsUnderlined:style->textDecorationsInEffect().contains(TextDecorationLine::Underline)];
Color textColor = style->visitedDependentColor(CSSPropertyColor);
if (textColor.isValid())