| Index: Source/core/css/CSSParser.cpp
|
| diff --git a/Source/core/css/CSSParser.cpp b/Source/core/css/CSSParser.cpp
|
| index ee0e6271bd3f974992dbb809dc02a139dfc1cf83..5c6ddb67b4fe483bedb6f5fd0fe78efaf4d9c272 100644
|
| --- a/Source/core/css/CSSParser.cpp
|
| +++ b/Source/core/css/CSSParser.cpp
|
| @@ -486,13 +486,12 @@ static inline bool isColorPropertyID(CSSPropertyID propertyId)
|
| case CSSPropertyWebkitBorderEndColor:
|
| case CSSPropertyWebkitBorderStartColor:
|
| case CSSPropertyWebkitColumnRuleColor:
|
| -#if ENABLE(CSS3_TEXT)
|
| - case CSSPropertyWebkitTextDecorationColor:
|
| -#endif // CSS3_TEXT
|
| case CSSPropertyWebkitTextEmphasisColor:
|
| case CSSPropertyWebkitTextFillColor:
|
| case CSSPropertyWebkitTextStrokeColor:
|
| return true;
|
| + case CSSPropertyTextDecorationColor:
|
| + return RuntimeEnabledFeatures::css3TextDecorationsEnabled();
|
| default:
|
| return false;
|
| }
|
| @@ -1871,16 +1870,18 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
|
| case CSSPropertyWebkitBorderBeforeColor:
|
| case CSSPropertyWebkitBorderAfterColor:
|
| case CSSPropertyColor: // <color> | inherit
|
| + case CSSPropertyTextDecorationColor:
|
| case CSSPropertyTextLineThroughColor: // CSS3 text decoration colors
|
| case CSSPropertyTextUnderlineColor:
|
| case CSSPropertyTextOverlineColor:
|
| case CSSPropertyWebkitColumnRuleColor:
|
| -#if ENABLE(CSS3_TEXT)
|
| - case CSSPropertyWebkitTextDecorationColor:
|
| -#endif // CSS3_TEXT
|
| case CSSPropertyWebkitTextEmphasisColor:
|
| case CSSPropertyWebkitTextFillColor:
|
| case CSSPropertyWebkitTextStrokeColor:
|
| + if (propId == CSSPropertyTextDecorationColor
|
| + && !RuntimeEnabledFeatures::css3TextDecorationsEnabled())
|
| + return false;
|
| +
|
| if (id == CSSValueWebkitText)
|
| validPrimitive = true; // Always allow this, even when strict parsing is on,
|
| // since we use this in our UA sheets.
|
| @@ -2173,21 +2174,25 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
|
| // none | [ underline || overline || line-through || blink ] | inherit
|
| return parseTextDecoration(propId, important);
|
|
|
| -#if ENABLE(CSS3_TEXT)
|
| - case CSSPropertyWebkitTextDecorationLine:
|
| + case CSSPropertyTextDecorationLine:
|
| + if (!RuntimeEnabledFeatures::css3TextDecorationsEnabled())
|
| + return false;
|
| // none | [ underline || overline || line-through ] | inherit
|
| return parseTextDecoration(propId, important);
|
|
|
| - case CSSPropertyWebkitTextDecorationStyle:
|
| + case CSSPropertyTextDecorationStyle:
|
| + if (!RuntimeEnabledFeatures::css3TextDecorationsEnabled())
|
| + return false;
|
| // solid | double | dotted | dashed | wavy
|
| if (id == CSSValueSolid || id == CSSValueDouble || id == CSSValueDotted || id == CSSValueDashed || id == CSSValueWavy)
|
| validPrimitive = true;
|
| break;
|
|
|
| - case CSSPropertyWebkitTextUnderlinePosition:
|
| + case CSSPropertyTextUnderlinePosition:
|
| + if (!RuntimeEnabledFeatures::css3TextDecorationsEnabled())
|
| + return false;
|
| // auto | alphabetic | under
|
| return parseTextUnderlinePosition(important);
|
| -#endif // CSS3_TEXT
|
|
|
| case CSSPropertyZoom: // normal | reset | document | <number> | <percentage> | inherit
|
| if (id == CSSValueNormal || id == CSSValueReset || id == CSSValueDocument)
|
| @@ -8806,15 +8811,13 @@ bool CSSParser::parsePerspectiveOrigin(CSSPropertyID propId, CSSPropertyID& prop
|
|
|
| void CSSParser::addTextDecorationProperty(CSSPropertyID propId, PassRefPtr<CSSValue> value, bool important)
|
| {
|
| -#if ENABLE(CSS3_TEXT)
|
| // The text-decoration-line property takes priority over text-decoration, unless the latter has important priority set.
|
| if (propId == CSSPropertyTextDecoration && !important && m_currentShorthand == CSSPropertyInvalid) {
|
| for (unsigned i = 0; i < m_parsedProperties.size(); ++i) {
|
| - if (m_parsedProperties[i].id() == CSSPropertyWebkitTextDecorationLine)
|
| + if (m_parsedProperties[i].id() == CSSPropertyTextDecorationLine)
|
| return;
|
| }
|
| }
|
| -#endif // CSS3_TEXT
|
| addProperty(propId, value, important);
|
| }
|
|
|
| @@ -8832,13 +8835,11 @@ bool CSSParser::parseTextDecoration(CSSPropertyID propId, bool important)
|
| while (isValid && value) {
|
| switch (value->id) {
|
| case CSSValueBlink:
|
| -#if ENABLE(CSS3_TEXT)
|
| - // Blink value is not accepted by -webkit-text-decoration-line.
|
| - isValid = propId != CSSPropertyWebkitTextDecorationLine;
|
| + // Blink value is not accepted by text-decoration-line.
|
| + isValid = propId != CSSPropertyTextDecorationLine;
|
| if (isValid)
|
| list->append(cssValuePool().createIdentifierValue(value->id));
|
| break;
|
| -#endif // CSS3_TEXT
|
| case CSSValueUnderline:
|
| case CSSValueOverline:
|
| case CSSValueLineThrough:
|
| @@ -8860,7 +8861,6 @@ bool CSSParser::parseTextDecoration(CSSPropertyID propId, bool important)
|
| return false;
|
| }
|
|
|
| -#if ENABLE(CSS3_TEXT)
|
| bool CSSParser::parseTextUnderlinePosition(bool important)
|
| {
|
| // The text-underline-position property has sintax "auto | alphabetic | [ under || [ left | right ] ]".
|
| @@ -8874,12 +8874,11 @@ bool CSSParser::parseTextUnderlinePosition(bool important)
|
| if (m_valueList->next())
|
| return false;
|
|
|
| - addProperty(CSSPropertyWebkitTextUnderlinePosition, cssValuePool().createIdentifierValue(value->id), important);
|
| + addProperty(CSSPropertyTextUnderlinePosition, cssValuePool().createIdentifierValue(value->id), important);
|
| return true;
|
| }
|
| return false;
|
| }
|
| -#endif // CSS3_TEXT
|
|
|
| bool CSSParser::parseTextEmphasisStyle(bool important)
|
| {
|
|
|