Diff
Modified: trunk/Source/WebCore/ChangeLog (275140 => 275141)
--- trunk/Source/WebCore/ChangeLog 2021-03-27 21:05:23 UTC (rev 275140)
+++ trunk/Source/WebCore/ChangeLog 2021-03-27 22:34:19 UTC (rev 275141)
@@ -1,3 +1,27 @@
+2021-03-27 Antoine Quint <[email protected]>
+
+ Fix build with ENABLE_CSS3_TEXT
+ https://bugs.webkit.org/show_bug.cgi?id=223841
+
+ Reviewed by Darin Adler.
+
+ We also remove the -webkit- prefix for the "hanging" and "each-line" keywords since
+ these are well specified by the CSS Text Module Level 3 spec.
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
+ * css/CSSValueKeywords.in:
+ * css/parser/CSSPropertyParser.cpp:
+ (WebCore::consumeTextIndent):
+ * rendering/style/RenderStyle.h:
+ (WebCore::RenderStyle::setTextIndentType):
+ (WebCore::RenderStyle::setTextAlignLast):
+ (WebCore::RenderStyle::setTextJustify):
+ * rendering/style/StyleRareInheritedData.cpp:
+ (WebCore::StyleRareInheritedData::StyleRareInheritedData):
+ * style/StyleBuilderCustom.h:
+ (WebCore::Style::BuilderCustom::applyValueTextIndent):
+
2021-03-27 Kate Cheney <[email protected]>
PCM: Send report to both click source and attribution destination website
Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (275140 => 275141)
--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2021-03-27 21:05:23 UTC (rev 275140)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2021-03-27 22:34:19 UTC (rev 275141)
@@ -3244,9 +3244,9 @@
auto list = CSSValueList::createSpaceSeparated();
list->append(WTFMove(textIndent));
if (style.textIndentLine() == TextIndentLine::EachLine)
- list->append(cssValuePool.createIdentifierValue(CSSValueWebkitEachLine));
+ list->append(cssValuePool.createIdentifierValue(CSSValueEachLine));
if (style.textIndentType() == TextIndentType::Hanging)
- list->append(cssValuePool.createIdentifierValue(CSSValueWebkitHanging));
+ list->append(cssValuePool.createIdentifierValue(CSSValueHanging));
return list;
}
#endif
Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (275140 => 275141)
--- trunk/Source/WebCore/css/CSSValueKeywords.in 2021-03-27 21:05:23 UTC (rev 275140)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in 2021-03-27 22:34:19 UTC (rev 275141)
@@ -1358,8 +1358,8 @@
#if defined(ENABLE_CSS3_TEXT) && ENABLE_CSS3_TEXT
// text-indent
--webkit-each-line
--webkit-hanging
+each-line
+// hanging
#endif
// -webkit-column-fill
Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (275140 => 275141)
--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp 2021-03-27 21:05:23 UTC (rev 275140)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp 2021-03-27 22:34:19 UTC (rev 275141)
@@ -1174,7 +1174,9 @@
RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
bool hasLengthOrPercentage = false;
-// bool hasEachLine = false;
+#if ENABLE(CSS3_TEXT)
+ bool hasEachLine = false;
+#endif
bool hasHanging = false;
do {
@@ -1187,20 +1189,20 @@
}
CSSValueID id = range.peek().id();
- /* FIXME-NEWPARSER: We don't support this yet.
+#if ENABLE(CSS3_TEXT)
if (!hasEachLine && id == CSSValueEachLine) {
- list->append(*consumeIdent(range));
+ list->append(consumeIdent(range).releaseNonNull());
hasEachLine = true;
continue;
}
-*/
-
+#endif
+
if (!hasHanging && id == CSSValueHanging) {
list->append(consumeIdent(range).releaseNonNull());
hasHanging = true;
continue;
}
-
+
return nullptr;
} while (!range.atEnd());
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (275140 => 275141)
--- trunk/Source/WebCore/rendering/style/RenderStyle.h 2021-03-27 21:05:23 UTC (rev 275140)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h 2021-03-27 22:34:19 UTC (rev 275141)
@@ -980,10 +980,10 @@
void setTextZoom(TextZoom v) { SET_VAR(m_rareInheritedData, textZoom, static_cast<unsigned>(v)); }
#if ENABLE(CSS3_TEXT)
- void setTextIndentLine(TextIndentLine v) { SET_VAR(m_rareInheritedData, textIndentLine, v); }
- void setTextIndentType(TextIndentType v) { SET_VAR(m_rareInheritedData, textIndentType, v); }
- void setTextAlignLast(TextAlignLast v) { SET_VAR(m_rareInheritedData, textAlignLast, v); }
- void setTextJustify(TextJustify v) { SET_VAR(m_rareInheritedData, textJustify, v); }
+ void setTextIndentLine(TextIndentLine v) { SET_VAR(m_rareInheritedData, textIndentLine, static_cast<unsigned>(v)); }
+ void setTextIndentType(TextIndentType v) { SET_VAR(m_rareInheritedData, textIndentType, static_cast<unsigned>(v)); }
+ void setTextAlignLast(TextAlignLast v) { SET_VAR(m_rareInheritedData, textAlignLast, static_cast<unsigned>(v)); }
+ void setTextJustify(TextJustify v) { SET_VAR(m_rareInheritedData, textJustify, static_cast<unsigned>(v)); }
#endif
#if ENABLE(TEXT_AUTOSIZING)
Modified: trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp (275140 => 275141)
--- trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp 2021-03-27 21:05:23 UTC (rev 275140)
+++ trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp 2021-03-27 22:34:19 UTC (rev 275141)
@@ -102,8 +102,8 @@
, textEmphasisPosition(static_cast<unsigned>(RenderStyle::initialTextEmphasisPosition().toRaw()))
, textOrientation(static_cast<unsigned>(TextOrientation::Mixed))
#if ENABLE(CSS3_TEXT)
- , textIndentLine(RenderStyle::initialTextIndentLine())
- , textIndentType(RenderStyle::initialTextIndentType())
+ , textIndentLine(static_cast<unsigned>(RenderStyle::initialTextIndentLine()))
+ , textIndentType(static_cast<unsigned>(RenderStyle::initialTextIndentType()))
#endif
, lineBoxContain(static_cast<unsigned>(RenderStyle::initialLineBoxContain().toRaw()))
, imageOrientation(RenderStyle::initialImageOrientation())
@@ -118,8 +118,8 @@
, imageResolutionSnap(RenderStyle::initialImageResolutionSnap())
#endif
#if ENABLE(CSS3_TEXT)
- , textAlignLast(RenderStyle::initialTextAlignLast())
- , textJustify(RenderStyle::initialTextJustify())
+ , textAlignLast(static_cast<unsigned>(RenderStyle::initialTextAlignLast()))
+ , textJustify(static_cast<unsigned>(RenderStyle::initialTextJustify()))
#endif
, textDecorationSkip(RenderStyle::initialTextDecorationSkip().toRaw())
, textUnderlinePosition(static_cast<unsigned>(RenderStyle::initialTextUnderlinePosition()))
Modified: trunk/Source/WebCore/style/StyleBuilderCustom.h (275140 => 275141)
--- trunk/Source/WebCore/style/StyleBuilderCustom.h 2021-03-27 21:05:23 UTC (rev 275140)
+++ trunk/Source/WebCore/style/StyleBuilderCustom.h 2021-03-27 22:34:19 UTC (rev 275141)
@@ -486,9 +486,9 @@
if (!primitiveValue.valueID())
lengthOrPercentageValue = primitiveValue.convertToLength<FixedIntegerConversion | PercentConversion | CalculatedConversion>(builderState.cssToLengthConversionData());
#if ENABLE(CSS3_TEXT)
- else if (primitiveValue.valueID() == CSSValueWebkitEachLine)
+ else if (primitiveValue.valueID() == CSSValueEachLine)
textIndentLineValue = TextIndentLine::EachLine;
- else if (primitiveValue.valueID() == CSSValueWebkitHanging)
+ else if (primitiveValue.valueID() == CSSValueHanging)
textIndentTypeValue = TextIndentType::Hanging;
#endif
}