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 09:22:24
Can we just use isASCIILower :)
|
| + } |
| + static bool isPotentialCustomElementName8BitChar(UChar ch) |
|
esprehn
2016/09/02 09:22:24
LChar since this is 8bit
|
| + { |
| + DCHECK_LE(ch, 0xff); |
| + return ('a' <= ch && ch <= 'z') |
|
esprehn
2016/09/02 09:22:24
isASCIILower || isASCIIDigit || ...
|
| + || ('0' <= ch && ch <= '9') |
| + || ch == '-' || ch == '.' || ch == '_' || ch == 0xb7 |
| + || (0xc0 <= ch && ch != 0xd7 && ch != 0xf7); |
| + } |
| static bool isPotentialCustomElementNameChar(UChar32 character); |
| static bool treatAsSpace(UChar32 c) |