diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
commit | 2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (patch) | |
tree | 988e8c5b116dd0466244ae2fe5af8ee9be926d76 /Source/WebCore/css/SVGCSSParser.cpp | |
parent | dd91e772430dc294e3bf478c119ef8d43c0a3358 (diff) | |
download | qtwebkit-2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47.tar.gz |
Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286)
Diffstat (limited to 'Source/WebCore/css/SVGCSSParser.cpp')
-rw-r--r-- | Source/WebCore/css/SVGCSSParser.cpp | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/Source/WebCore/css/SVGCSSParser.cpp b/Source/WebCore/css/SVGCSSParser.cpp index 8a67fabf1..d06bb203b 100644 --- a/Source/WebCore/css/SVGCSSParser.cpp +++ b/Source/WebCore/css/SVGCSSParser.cpp @@ -37,7 +37,7 @@ using namespace std; namespace WebCore { -bool CSSParser::parseSVGValue(int propId, bool important) +bool CSSParser::parseSVGValue(CSSPropertyID propId, bool important) { CSSParserValue* value = m_valueList->current(); if (!value) @@ -66,7 +66,7 @@ bool CSSParser::parseSVGValue(int propId, bool important) id >= CSSValueSuper) valid_primitive = true; else - valid_primitive = validUnit(value, FLength|FPercent, false); + valid_primitive = validUnit(value, FLength | FPercent, SVGAttributeMode); break; case CSSPropertyDominantBaseline: @@ -105,7 +105,7 @@ bool CSSParser::parseSVGValue(int propId, bool important) break; case CSSPropertyStrokeMiterlimit: // <miterlimit> | inherit - valid_primitive = validUnit(value, FNumber|FNonNeg, false); + valid_primitive = validUnit(value, FNumber | FNonNeg, SVGAttributeMode); break; case CSSPropertyStrokeLinejoin: // miter | round | bevel | inherit @@ -122,7 +122,7 @@ bool CSSParser::parseSVGValue(int propId, bool important) case CSSPropertyFillOpacity: case CSSPropertyStopOpacity: case CSSPropertyFloodOpacity: - valid_primitive = (!id && validUnit(value, FNumber|FPercent, false)); + valid_primitive = (!id && validUnit(value, FNumber | FPercent, SVGAttributeMode)); break; case CSSPropertyShapeRendering: @@ -201,17 +201,6 @@ bool CSSParser::parseSVGValue(int propId, bool important) } break; - case CSSPropertyColor: // <color> | inherit - if ((id >= CSSValueAqua && id <= CSSValueWindowtext) || - (id >= CSSValueAliceblue && id <= CSSValueYellowgreen)) - parsedValue = SVGColor::createFromString(value->string); - else - parsedValue = parseSVGColor(); - - if (parsedValue) - m_valueList->next(); - break; - case CSSPropertyStopColor: // TODO : icccolor case CSSPropertyFloodColor: case CSSPropertyLightingColor: @@ -241,7 +230,7 @@ bool CSSParser::parseSVGValue(int propId, bool important) case CSSPropertyStrokeWidth: // <length> | inherit case CSSPropertyStrokeDashoffset: - valid_primitive = validUnit(value, FLength | FPercent, false); + valid_primitive = validUnit(value, FLength | FPercent, SVGAttributeMode); break; case CSSPropertyStrokeDasharray: // none | <dasharray> | inherit if (id == CSSValueNone) @@ -255,7 +244,7 @@ bool CSSParser::parseSVGValue(int propId, bool important) if (id == CSSValueAuto || id == CSSValueNormal) valid_primitive = true; else - valid_primitive = validUnit(value, FLength, false); + valid_primitive = validUnit(value, FLength, SVGAttributeMode); break; case CSSPropertyClipPath: // <uri> | none | inherit @@ -335,7 +324,7 @@ PassRefPtr<CSSValue> CSSParser::parseSVGStrokeDasharray() CSSParserValue* value = m_valueList->current(); bool valid_primitive = true; while (value) { - valid_primitive = validUnit(value, FLength | FPercent |FNonNeg, false); + valid_primitive = validUnit(value, FLength | FPercent | FNonNeg, SVGAttributeMode); if (!valid_primitive) break; if (value->id != 0) |