Index: third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp |
diff --git a/third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp b/third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp |
index 3b0046797503e6ed25a99da55128fd4ba6545c6c..05c3844bbc9d0cdf37e5910d9a936aab9dbaa9af 100644 |
--- a/third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp |
+++ b/third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp |
@@ -110,9 +110,14 @@ static PassRefPtrWillBeRawPtr<CSSValue> parseSimpleLengthValue(CSSPropertyID pro |
if (unit == CSSPrimitiveValue::UnitType::Number) { |
bool quirksMode = isQuirksModeBehavior(cssParserMode); |
- if (number && !quirksMode) |
+ bool svgMode = cssParserMode == SVGAttributeMode; |
+ fprintf(stderr, "parseSimpleLengthValue() parsed %g, svg? %s, quirks %s\n", number, svgMode ? "true" : "false", quirksMode ? "true" : "false"); |
Timothy Loh
2015/11/04 00:33:44
You left in some debugging code here ;)
Stephen Chennney
2015/11/04 18:04:47
Done.
|
+ if (number && (!quirksMode && !svgMode)) |
return nullptr; |
- unit = CSSPrimitiveValue::UnitType::Pixels; |
+ if (svgMode) |
+ unit = CSSPrimitiveValue::UnitType::UserUnits; |
+ else |
+ unit = CSSPrimitiveValue::UnitType::Pixels; |
} |
if (number < 0 && !acceptsNegativeNumbers) |
return nullptr; |