Chromium Code Reviews| Index: third_party/WebKit/Source/platform/text/Character.h |
| diff --git a/third_party/WebKit/Source/platform/text/Character.h b/third_party/WebKit/Source/platform/text/Character.h |
| index 1bef1a6713bfa6b0ebe72430d5ece69e1dd9587b..54dc9ce70892cd810dedf40fde689a206afe6475 100644 |
| --- a/third_party/WebKit/Source/platform/text/Character.h |
| +++ b/third_party/WebKit/Source/platform/text/Character.h |
| @@ -81,6 +81,18 @@ public: |
| static bool isUprightInMixedVertical(UChar32 character); |
| // https://html.spec.whatwg.org/multipage/scripting.html#prod-potentialcustomelementname |
| + static bool isPotentialCustomElementNameStartChar(UChar ch) |
| + { |
| + return 'a' <= ch && ch <= 'z'; |
|
esprehn
2016/09/02 00:53:20
what about upper case? You can just call isASCIILo
|
| + } |
| + static bool isPotentialCustomElementName8BitChar(UChar ch) |
|
esprehn
2016/09/02 00:53:20
LChar? or template<typename CharType>. Widening th
|
| + { |
| + DCHECK_LE(ch, 0xff); |
| + return ('a' <= ch && ch <= 'z') |
| + || ('0' <= ch && ch <= '9') |
| + || ch == '-' || ch == '.' || ch == '_' || ch == 0xb7 |
| + || (0xc0 <= ch && ch != 0xd7 && ch != 0xf7); |
|
esprehn
2016/09/02 00:53:20
btw I don't know why this is in platform/, can we
|
| + } |
| static bool isPotentialCustomElementNameChar(UChar32 character); |
| static bool treatAsSpace(UChar32 c) |