Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Unified Diff: third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp

Issue 1429003004: Parse text-emphasis shorthand in CSSPropertyParser with CSSParserTokens (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
index 64afe47319deb9226eecf671d013510b5f4940bb..8c378d590d737cc40feeb3a0e3eda62d543a07ed 100644
--- a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
@@ -437,7 +437,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
case CSSPropertyWebkitBorderBeforeColor:
case CSSPropertyWebkitBorderAfterColor:
case CSSPropertyWebkitColumnRuleColor:
- case CSSPropertyWebkitTextEmphasisColor:
case CSSPropertyWebkitTextStrokeColor:
parsedValue = parseColor(m_valueList->current(), acceptQuirkyColors(propId));
if (parsedValue)
@@ -1051,13 +1050,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
case CSSPropertyInvalid:
return false;
// CSS Text Layout Module Level 3: Vertical writing support
- case CSSPropertyWebkitTextEmphasis:
- return parseShorthand(propId, webkitTextEmphasisShorthand(), important);
-
- case CSSPropertyWebkitTextEmphasisStyle:
- parsedValue = parseTextEmphasisStyle();
- break;
-
case CSSPropertyWebkitTextOrientation:
// FIXME: For now just support sideways, sideways-right, upright and vertical-right.
if (id == CSSValueSideways || id == CSSValueSidewaysRight || id == CSSValueVerticalRight || id == CSSValueUpright)
@@ -1193,6 +1185,9 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
case CSSPropertyMotionOffset:
case CSSPropertyMotionRotation:
case CSSPropertyMotion:
+ case CSSPropertyWebkitTextEmphasisColor:
+ case CSSPropertyWebkitTextEmphasisStyle:
+ case CSSPropertyWebkitTextEmphasis:
validPrimitive = false;
break;
@@ -5376,53 +5371,6 @@ PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseTransformOrigin()
return list.release();
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTextEmphasisStyle()
-{
- RefPtrWillBeRawPtr<CSSPrimitiveValue> fill = nullptr;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> shape = nullptr;
-
- for (CSSParserValue* value = m_valueList->current(); value; value = m_valueList->next()) {
- if (value->m_unit == CSSParserValue::String) {
- if (fill || shape)
- return nullptr;
- m_valueList->next();
- return createPrimitiveStringValue(value);
- }
-
- if (value->id == CSSValueNone) {
- if (fill || shape)
- return nullptr;
- m_valueList->next();
- return cssValuePool().createIdentifierValue(CSSValueNone);
- }
-
- if (value->id == CSSValueOpen || value->id == CSSValueFilled) {
- if (fill)
- return nullptr;
- fill = cssValuePool().createIdentifierValue(value->id);
- } else if (value->id == CSSValueDot || value->id == CSSValueCircle || value->id == CSSValueDoubleCircle || value->id == CSSValueTriangle || value->id == CSSValueSesame) {
- if (shape)
- return nullptr;
- shape = cssValuePool().createIdentifierValue(value->id);
- } else {
- break;
- }
- }
-
- if (fill && shape) {
- RefPtrWillBeRawPtr<CSSValueList> parsedValues = CSSValueList::createSpaceSeparated();
- parsedValues->append(fill.release());
- parsedValues->append(shape.release());
- return parsedValues.release();
- }
- if (fill)
- return fill.release();
- if (shape)
- return shape.release();
-
- return nullptr;
-}
-
bool CSSPropertyParser::parseCalculation(CSSParserValue* value, ValueRange range)
{
ASSERT(isCalculation(value));
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698