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

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

Issue 1232593004: Don't resolve extended color keywords during parsing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Test expectations fixups. Created 5 years, 5 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: Source/core/css/parser/CSSParserFastPaths.cpp
diff --git a/Source/core/css/parser/CSSParserFastPaths.cpp b/Source/core/css/parser/CSSParserFastPaths.cpp
index 662adf442761416c3ef1ef6e501d0e78bcfc520f..bdc9854155156dba580090f5e7c1294fd0186fb3 100644
--- a/Source/core/css/parser/CSSParserFastPaths.cpp
+++ b/Source/core/css/parser/CSSParserFastPaths.cpp
@@ -454,13 +454,9 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSParserFastPaths::parseColor(const String& st
parseResult = fastParseColorInternal(color, string.characters8(), string.length(), quirksMode);
else
parseResult = fastParseColorInternal(color, string.characters16(), string.length(), quirksMode);
- if (parseResult)
- return cssValuePool().createColorValue(color);
-
- Color namedColor;
- if (!namedColor.setNamedColor(string))
+ if (!parseResult)
return nullptr;
- return cssValuePool().createColorValue(namedColor.rgb());
+ return cssValuePool().createColorValue(color);
}
bool CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyID propertyId, CSSValueID valueID)

Powered by Google App Engine
This is Rietveld 408576698