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

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

Issue 2346193002: Split CSSPrimitiveValue into CSSPrimitiveValue and CSSIdentifierValue (Closed)
Patch Set: Rebase please work Created 4 years, 3 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.h
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h b/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h
index ac5766c75d526f323381ffdd6a214ae0f1f6d97d..2b6931ff52e992e81307620501dd719df49777fc 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.h
@@ -6,6 +6,7 @@
#define CSSPropertyParserHelpers_h
#include "core/css/CSSCustomIdentValue.h"
+#include "core/css/CSSIdentifierValue.h"
#include "core/css/CSSPrimitiveValue.h"
#include "core/css/parser/CSSParserMode.h"
#include "core/css/parser/CSSParserTokenRange.h"
@@ -45,10 +46,10 @@ CSSPrimitiveValue* consumeLengthOrPercent(CSSParserTokenRange&, CSSParserMode, V
CSSPrimitiveValue* consumeAngle(CSSParserTokenRange&);
CSSPrimitiveValue* consumeTime(CSSParserTokenRange&, ValueRange);
-CSSPrimitiveValue* consumeIdent(CSSParserTokenRange&);
-CSSPrimitiveValue* consumeIdentRange(CSSParserTokenRange&, CSSValueID lower, CSSValueID upper);
+CSSIdentifierValue* consumeIdent(CSSParserTokenRange&);
+CSSIdentifierValue* consumeIdentRange(CSSParserTokenRange&, CSSValueID lower, CSSValueID upper);
template<CSSValueID, CSSValueID...> inline bool identMatches(CSSValueID id);
-template<CSSValueID... allowedIdents> CSSPrimitiveValue* consumeIdent(CSSParserTokenRange&);
+template<CSSValueID... allowedIdents> CSSIdentifierValue* consumeIdent(CSSParserTokenRange&);
CSSCustomIdentValue* consumeCustomIdent(CSSParserTokenRange&);
CSSStringValue* consumeString(CSSParserTokenRange&);
@@ -79,11 +80,11 @@ template<CSSValueID head, CSSValueID... tail> inline bool identMatches(CSSValueI
return id == head || identMatches<tail...>(id);
}
-template<CSSValueID... names> CSSPrimitiveValue* consumeIdent(CSSParserTokenRange& range)
+template<CSSValueID... names> CSSIdentifierValue* consumeIdent(CSSParserTokenRange& range)
{
if (range.peek().type() != IdentToken || !identMatches<names...>(range.peek().id()))
return nullptr;
- return CSSPrimitiveValue::createIdentifier(range.consumeIncludingWhitespace().id());
+ return CSSIdentifierValue::create(range.consumeIncludingWhitespace().id());
}
} // namespace CSSPropertyParserHelpers

Powered by Google App Engine
This is Rietveld 408576698