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

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

Issue 2622473002: Replace HTMLAttributeMode with HTMLStandardMode (Closed)
Patch Set: Created 3 years, 11 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
Index: third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp
index a537649d107d676895550b7b60416f49652fbe3f..b63c13b7bb48815d7cc272902c4e78affca69bf4 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp
@@ -154,9 +154,7 @@ CSSPrimitiveValue* consumeNumber(CSSParserTokenRange& range,
inline bool shouldAcceptUnitlessLength(double value,
CSSParserMode cssParserMode,
UnitlessQuirk unitless) {
- // TODO(timloh): Presentational HTML attributes shouldn't use the CSS parser
- // for lengths
- return value == 0 || isUnitLessLengthParsingEnabledForMode(cssParserMode) ||
+ return value == 0 || cssParserMode == SVGAttributeMode ||
(cssParserMode == HTMLQuirksMode && unitless == UnitlessQuirk::Allow);
}

Powered by Google App Engine
This is Rietveld 408576698