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

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 review 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..5e2f4e5ce925d97f79bf5b143631b4b917a114f5 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSParserIdioms.h
+++ b/third_party/WebKit/Source/core/css/parser/CSSParserIdioms.h
@@ -42,6 +42,24 @@ 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)
+{
+ if (isASCIIAlpha(c))
Timothy Loh 2016/04/20 04:31:11 maybe for consistency with the other two functions
rwlbuis 2016/04/20 11:18:48 Good idea, will fix before landing.
+ return true;
+ if (c == '_')
+ return true;
+ return !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