| OLD | NEW |
| 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 |
| OLD | NEW |