| Index: Source/core/css/CSSParser.cpp
|
| diff --git a/Source/core/css/CSSParser.cpp b/Source/core/css/CSSParser.cpp
|
| index 8dd9d7e9115dc864979b1a316a094a2305b67866..042c163ac5d2253793b23b6fbb6805521ed98b66 100644
|
| --- a/Source/core/css/CSSParser.cpp
|
| +++ b/Source/core/css/CSSParser.cpp
|
| @@ -423,13 +423,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;
|
| }
|
| @@ -1824,16 +1823,18 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
|
| case CSSPropertyWebkitBorderBeforeColor:
|
| case CSSPropertyWebkitBorderAfterColor:
|
| case CSSPropertyColor: // <color> | inherit
|
| - case CSSPropertyTextLineThroughColor: // CSS3 text decoration colors
|
| + case CSSPropertyTextDecorationColor: // CSS3 text decoration colors
|
| + case CSSPropertyTextLineThroughColor:
|
| 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.
|
| @@ -2126,17 +2127,18 @@ 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:
|
| // none | [ underline || overline || line-through ] | inherit
|
| return parseTextDecoration(propId, important);
|
|
|
| - case CSSPropertyWebkitTextDecorationStyle:
|
| + case CSSPropertyTextDecorationStyle:
|
| // solid | double | dotted | dashed | wavy
|
| - if (id == CSSValueSolid || id == CSSValueDouble || id == CSSValueDotted || id == CSSValueDashed || id == CSSValueWavy)
|
| + if (RuntimeEnabledFeatures::css3TextDecorationsEnabled()
|
| + && (id == CSSValueSolid || id == CSSValueDouble || id == CSSValueDotted || id == CSSValueDashed || id == CSSValueWavy))
|
| validPrimitive = true;
|
| break;
|
|
|
| +#if ENABLE(CSS3_TEXT)
|
| case CSSPropertyWebkitTextUnderlinePosition:
|
| // auto | alphabetic | under
|
| return parseTextUnderlinePosition(important);
|
| @@ -8785,20 +8787,22 @@ 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);
|
| }
|
|
|
| bool CSSParser::parseTextDecoration(CSSPropertyID propId, bool important)
|
| {
|
| + if (propId == CSSPropertyTextDecorationLine
|
| + && !RuntimeEnabledFeatures::css3TextDecorationsEnabled())
|
| + return false;
|
| +
|
| CSSParserValue* value = m_valueList->current();
|
| if (value->id == CSSValueNone) {
|
| addTextDecorationProperty(propId, cssValuePool().createIdentifierValue(CSSValueNone), important);
|
| @@ -8811,13 +8815,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:
|
|
|