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

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

Issue 2024373002: Replace CSSParserString with StringView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Match arguments to equalStringView. Created 4 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
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 500b3437e716612f9101f43ebbb3850f1b9a99de..9ff8b3594c90ccd58b3ab1f1405331b59424c05e 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp
@@ -8,7 +8,6 @@
#include "core/css/CSSFunctionValue.h"
#include "core/css/CSSValuePool.h"
#include "core/css/parser/CSSParserIdioms.h"
-#include "core/css/parser/CSSParserString.h"
#include "core/css/parser/CSSPropertyParser.h"
#include "core/html/parser/HTMLParserIdioms.h"
#include "platform/RuntimeEnabledFeatures.h"
@@ -440,9 +439,7 @@ static bool fastParseColorInternal(RGBA32& rgb, const CharacterType* characters,
CSSValue* CSSParserFastPaths::parseColor(const String& string, CSSParserMode parserMode)
{
ASSERT(!string.isEmpty());
- CSSParserString cssString;
- cssString.init(string);
- CSSValueID valueID = cssValueKeywordID(cssString);
+ CSSValueID valueID = cssValueKeywordID(string);
if (CSSPropertyParser::isColorKeyword(valueID)) {
if (!isValueAllowedInMode(valueID, parserMode))
return nullptr;
@@ -846,9 +843,7 @@ static CSSValue* parseKeywordValue(CSSPropertyID propertyId, const String& strin
return nullptr;
}
- CSSParserString cssString;
- cssString.init(string);
- CSSValueID valueID = cssValueKeywordID(cssString);
+ CSSValueID valueID = cssValueKeywordID(string);
if (!valueID)
return nullptr;
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSParser.cpp ('k') | third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698