Commit 045324c6 authored by timloh@chromium.org's avatar timloh@chromium.org

Reduce code duplication for parsing clip-path/filter

The parsing logic for clip-path and filter is identical to that for
marker-start, etc.

BUG=404023

Review URL: https://codereview.chromium.org/475303002

git-svn-id: svn://svn.chromium.org/blink/trunk@180346 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 96e7ac18
...@@ -8186,6 +8186,8 @@ bool CSSPropertyParser::parseSVGValue(CSSPropertyID propId, bool important) ...@@ -8186,6 +8186,8 @@ bool CSSPropertyParser::parseSVGValue(CSSPropertyID propId, bool important)
validPrimitive = true; validPrimitive = true;
break; break;
case CSSPropertyClipPath:
case CSSPropertyFilter:
case CSSPropertyMarkerStart: case CSSPropertyMarkerStart:
case CSSPropertyMarkerMid: case CSSPropertyMarkerMid:
case CSSPropertyMarkerEnd: case CSSPropertyMarkerEnd:
...@@ -8353,19 +8355,8 @@ bool CSSPropertyParser::parseSVGValue(CSSPropertyID propId, bool important) ...@@ -8353,19 +8355,8 @@ bool CSSPropertyParser::parseSVGValue(CSSPropertyID propId, bool important)
validPrimitive = true; validPrimitive = true;
else else
parsedValue = parseSVGStrokeDasharray(); parsedValue = parseSVGStrokeDasharray();
break; break;
case CSSPropertyClipPath: // <uri> | none | inherit
case CSSPropertyFilter:
if (id == CSSValueNone) {
validPrimitive = true;
} else if (value->unit == CSSPrimitiveValue::CSS_URI) {
parsedValue = CSSPrimitiveValue::create(value->string, (CSSPrimitiveValue::UnitType) value->unit);
if (parsedValue)
m_valueList->next();
}
break;
case CSSPropertyMaskType: // luminance | alpha | inherit case CSSPropertyMaskType: // luminance | alpha | inherit
if (id == CSSValueLuminance || id == CSSValueAlpha) if (id == CSSValueLuminance || id == CSSValueAlpha)
validPrimitive = true; validPrimitive = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment