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

Unified Diff: Source/core/css/parser/CSSParserFastPaths.cpp

Issue 1162453002: [svg2] Make SVGLength wrap a CSSPrimitiveValue (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: nit Created 5 years, 7 months 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 | « Source/core/css/CSSPrimitiveValue.cpp ('k') | Source/core/css/resolver/StyleBuilderConverter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/CSSParserFastPaths.cpp
diff --git a/Source/core/css/parser/CSSParserFastPaths.cpp b/Source/core/css/parser/CSSParserFastPaths.cpp
index 396eefebe85ee14abd4230e61d1c7672839855af..ad5253d317eb783814850943c71fe30f7c7ba8e4 100644
--- a/Source/core/css/parser/CSSParserFastPaths.cpp
+++ b/Source/core/css/parser/CSSParserFastPaths.cpp
@@ -106,10 +106,12 @@ static PassRefPtrWillBeRawPtr<CSSValue> parseSimpleLengthValue(CSSPropertyID pro
}
if (unit == CSSPrimitiveValue::CSS_NUMBER) {
- bool quirksMode = isQuirksModeBehavior(cssParserMode);
- if (number && !quirksMode)
- return nullptr;
- unit = CSSPrimitiveValue::CSS_PX;
+ if (!isUnitLessLengthParsingEnabledForMode(cssParserMode)) {
+ bool quirksMode = isQuirksModeBehavior(cssParserMode);
+ if (number && !quirksMode)
+ return nullptr;
+ unit = CSSPrimitiveValue::CSS_PX;
+ }
}
if (number < 0 && !acceptsNegativeNumbers)
return nullptr;
« no previous file with comments | « Source/core/css/CSSPrimitiveValue.cpp ('k') | Source/core/css/resolver/StyleBuilderConverter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698