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

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

Issue 1442233002: Move stroke-dasharray property into CSSPropertyParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments 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 9079aeea25d7c9d0fdcac1823d1ed126ca41ba47..fcecfbd8caa51e3daaf7ecc39fce0cd6afe088b2 100644
--- a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
@@ -1153,6 +1153,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
case CSSPropertyFlexGrow:
case CSSPropertyFlexShrink:
case CSSPropertyFlexFlow:
+ case CSSPropertyStrokeDasharray:
validPrimitive = false;
break;
@@ -5441,12 +5442,6 @@ bool CSSPropertyParser::parseSVGValue(CSSPropertyID propId, bool important)
case CSSPropertyRy:
validPrimitive = validUnit(value, FLength | FPercent, SVGAttributeMode);
break;
- case CSSPropertyStrokeDasharray: // none | <dasharray> | inherit
- if (id == CSSValueNone)
- validPrimitive = true;
- else
- parsedValue = parseSVGStrokeDasharray();
- break;
default:
// If you crash here, it's because you added a css property and are not handling it
@@ -5481,30 +5476,4 @@ bool CSSPropertyParser::parseSVGValue(CSSPropertyID propId, bool important)
return true;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseSVGStrokeDasharray()
-{
- RefPtrWillBeRawPtr<CSSValueList> ret = CSSValueList::createCommaSeparated();
- CSSParserValue* value = m_valueList->current();
- bool validPrimitive = true;
- while (value) {
- validPrimitive = validUnit(value, FLength | FPercent | FNonNeg, SVGAttributeMode);
- if (!validPrimitive)
- break;
- if (value->id)
- ret->append(CSSPrimitiveValue::createIdentifier(value->id));
- else if (value->unit() >= CSSPrimitiveValue::UnitType::Number && value->unit() <= CSSPrimitiveValue::UnitType::Kilohertz)
- ret->append(CSSPrimitiveValue::create(value->fValue, value->unit()));
- else if (value->unit() == CSSPrimitiveValue::UnitType::Rems || value->unit() == CSSPrimitiveValue::UnitType::Chs)
- ret->append(CSSPrimitiveValue::create(value->fValue, value->unit()));
- value = m_valueList->next();
- bool commaConsumed = consumeComma(m_valueList);
- value = m_valueList->current();
- if (commaConsumed && !value)
- return nullptr;
- }
- if (!validPrimitive)
- return nullptr;
- return ret.release();
-}
-
} // namespace blink
« 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