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

Side by Side Diff: third_party/WebKit/Source/platform/text/CharacterProperty.h

Issue 1916013004: Implement PotentialCustomElementName (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tkent review Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <cstdint> 5 #include <cstdint>
6 6
7 namespace blink { 7 namespace blink {
8 8
9 using CharacterPropertyType = uint8_t; 9 using CharacterPropertyType = uint8_t;
10 10
11 enum class CharacterProperty : CharacterPropertyType { 11 enum class CharacterProperty : CharacterPropertyType {
12 isCJKIdeographOrSymbol = 0x0001, 12 isCJKIdeographOrSymbol = 0x0001,
13 isUprightInMixedVertical = 0x0002, 13 isUprightInMixedVertical = 0x0002,
14 isPotentialCustomElementNameChar = 0x0004,
14 }; 15 };
15 16
16 inline CharacterProperty operator | ( 17 inline CharacterProperty operator | (
17 CharacterProperty a, CharacterProperty b) 18 CharacterProperty a, CharacterProperty b)
18 { 19 {
19 return static_cast<CharacterProperty>( 20 return static_cast<CharacterProperty>(
20 static_cast<CharacterPropertyType>(a) 21 static_cast<CharacterPropertyType>(a)
21 | static_cast<CharacterPropertyType>(b)); 22 | static_cast<CharacterPropertyType>(b));
22 } 23 }
23 24
24 inline CharacterProperty operator & ( 25 inline CharacterProperty operator & (
25 CharacterProperty a, CharacterProperty b) 26 CharacterProperty a, CharacterProperty b)
26 { 27 {
27 return static_cast<CharacterProperty>( 28 return static_cast<CharacterProperty>(
28 static_cast<CharacterPropertyType>(a) 29 static_cast<CharacterPropertyType>(a)
29 & static_cast<CharacterPropertyType>(b)); 30 & static_cast<CharacterPropertyType>(b));
30 } 31 }
31 32
32 inline CharacterProperty operator |= ( 33 inline CharacterProperty operator |= (
33 CharacterProperty& a, CharacterProperty b) 34 CharacterProperty& a, CharacterProperty b)
34 { 35 {
35 a = a | b; 36 a = a | b;
36 return a; 37 return a;
37 } 38 }
38 39
39 } // namespace blink 40 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698