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

Unified Diff: Source/core/css/parser/BisonCSSParser-in.cpp

Issue 171383002: A thread-safe Media Query Parser (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Another attempt to fix Android build issues Created 6 years, 10 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/BisonCSSParser-in.cpp
diff --git a/Source/core/css/parser/BisonCSSParser-in.cpp b/Source/core/css/parser/BisonCSSParser-in.cpp
index 3ae3360ca552c196d1ea8f38df5284128d5a7437..cf2439869d3ac028a54c6e037cdf2635a427f4e1 100644
--- a/Source/core/css/parser/BisonCSSParser-in.cpp
+++ b/Source/core/css/parser/BisonCSSParser-in.cpp
@@ -10133,34 +10133,6 @@ CSSPropertyID cssPropertyID(const CSSParserString& string)
return string.is8Bit() ? cssPropertyID(string.characters8(), length) : cssPropertyID(string.characters16(), length);
}
-template <typename CharacterType>
-static CSSValueID cssValueKeywordID(const CharacterType* valueKeyword, unsigned length)
-{
- char buffer[maxCSSValueKeywordLength + 1]; // 1 for null character
-
- for (unsigned i = 0; i != length; ++i) {
- CharacterType c = valueKeyword[i];
- if (c == 0 || c >= 0x7F)
- return CSSValueInvalid; // illegal character
- buffer[i] = WTF::toASCIILower(c);
- }
- buffer[length] = '\0';
-
- const Value* hashTableEntry = findValue(buffer, length);
- return hashTableEntry ? static_cast<CSSValueID>(hashTableEntry->id) : CSSValueInvalid;
-}
-
-CSSValueID cssValueKeywordID(const CSSParserString& string)
-{
- unsigned length = string.length();
- if (!length)
- return CSSValueInvalid;
- if (length > maxCSSValueKeywordLength)
- return CSSValueInvalid;
-
- return string.is8Bit() ? cssValueKeywordID(string.characters8(), length) : cssValueKeywordID(string.characters16(), length);
-}
-
bool isValidNthToken(const CSSParserString& token)
{
// The tokenizer checks for the construct of an+b.

Powered by Google App Engine
This is Rietveld 408576698