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 41a388f7daa05ab64448a17919a73dbf409a6cd4..ce08752b343afb1db20b13f87687c154164cbc08 100644 |
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp |
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp |
@@ -313,7 +313,7 @@ CSSPrimitiveValue* consumeIdentRange(CSSParserTokenRange& range, CSSValueID lowe |
CSSCustomIdentValue* consumeCustomIdent(CSSParserTokenRange& range) |
{ |
- if (range.peek().type() != IdentToken || isCSSWideKeyword(range.peek().id())) |
+ if (range.peek().type() != IdentToken || isCSSWideKeyword(range.peek().value())) |
return nullptr; |
return CSSCustomIdentValue::create(range.consumeIncludingWhitespace().value().toAtomicString()); |
} |
@@ -1110,6 +1110,14 @@ CSSValue* consumeImage(CSSParserTokenRange& range, CSSParserContext context, Con |
return nullptr; |
} |
+bool isCSSWideKeyword(StringView keyword) |
+{ |
+ return equalIgnoringASCIICase(keyword, "initial") |
+ || equalIgnoringASCIICase(keyword, "inherit") |
+ || equalIgnoringASCIICase(keyword, "unset") |
+ || equalIgnoringASCIICase(keyword, "default"); |
+} |
+ |
} // namespace CSSPropertyParserHelpers |
} // namespace blink |