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/CSSParserIdioms.h

Issue 1889143003: Improve named grid areas parsing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch for landing Created 4 years, 8 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/CSSParserIdioms.h
diff --git a/third_party/WebKit/Source/core/css/parser/CSSParserIdioms.h b/third_party/WebKit/Source/core/css/parser/CSSParserIdioms.h
index b9ad905cbf7855c69a85f8d7cfa7567857c5b2b9..86d7aeca2f876ec45f7f6b4251b63bbb6c095239 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSParserIdioms.h
+++ b/third_party/WebKit/Source/core/css/parser/CSSParserIdioms.h
@@ -42,6 +42,20 @@ inline bool isCSSSpace(UChar c)
return c == ' ' || c == '\t' || c == '\n';
}
+// http://dev.w3.org/csswg/css-syntax/#name-start-code-point
+template <typename CharacterType>
+bool isNameStartCodePoint(CharacterType c)
+{
+ return isASCIIAlpha(c) || c == '_' || !isASCII(c);
+}
+
+// http://dev.w3.org/csswg/css-syntax/#name-code-point
+template <typename CharacterType>
+bool isNameCodePoint(CharacterType c)
+{
+ return isNameStartCodePoint(c) || isASCIIDigit(c) || c == '-';
+}
+
}
#endif
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSMarkup.cpp ('k') | third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698