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

Unified Diff: third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.cpp

Issue 2375353004: CSS Properties and Values API: Reject CSS-wide keywords in syntax string (Closed)
Patch Set: moo 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
« no previous file with comments | « third_party/WebKit/LayoutTests/custom-properties/register-property-syntax-parsing-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.cpp b/third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.cpp
index 3e4f246ebfa87977ee325a7cf46886d9dab57693..dfab53888c1a38154962138a356b4e7c43736d5a 100644
--- a/third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.cpp
+++ b/third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.cpp
@@ -81,14 +81,13 @@ bool consumeSyntaxType(const String& input, size_t& offset, CSSSyntaxType& type)
bool consumeSyntaxIdent(const String& input, size_t& offset, String& ident)
{
- // TODO(timloh): Are CSS-wide keywords allowed here?
size_t identStart = offset;
while (isNameCodePoint(input[offset]))
offset++;
if (offset == identStart)
return false;
ident = input.substring(identStart, offset - identStart);
- return true;
+ return !CSSPropertyParserHelpers::isCSSWideKeyword(ident);
}
CSSSyntaxDescriptor::CSSSyntaxDescriptor(String input)
« no previous file with comments | « third_party/WebKit/LayoutTests/custom-properties/register-property-syntax-parsing-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698