| 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 "core/editing/state_machines/StateMachineUtil.h" | 5 #include "core/editing/state_machines/StateMachineUtil.h" |
| 6 | 6 |
| 7 #include "platform/text/Character.h" | 7 #include "platform/text/Character.h" |
| 8 #include "wtf/Assertions.h" | 8 #include "wtf/Assertions.h" |
| 9 #include "wtf/text/CharacterNames.h" | 9 #include "wtf/text/CharacterNames.h" |
| 10 #include "wtf/text/Unicode.h" | 10 #include "wtf/text/Unicode.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 // Rule GB4, (Control | CR | LF) ÷ | 64 // Rule GB4, (Control | CR | LF) ÷ |
| 65 if (prevProp == U_GCB_CONTROL || prevProp == U_GCB_CR || prevProp == U_GCB_LF) | 65 if (prevProp == U_GCB_CONTROL || prevProp == U_GCB_CR || prevProp == U_GCB_LF) |
| 66 return true; | 66 return true; |
| 67 | 67 |
| 68 // Rule GB5, ÷ (Control | CR | LF) | 68 // Rule GB5, ÷ (Control | CR | LF) |
| 69 if (nextProp == U_GCB_CONTROL || nextProp == U_GCB_CR || nextProp == U_GCB_LF) | 69 if (nextProp == U_GCB_CONTROL || nextProp == U_GCB_CR || nextProp == U_GCB_LF) |
| 70 return true; | 70 return true; |
| 71 | 71 |
| 72 // Rule GB6, L x (L | V | LV | LVT) | 72 // Rule GB6, L x (L | V | LV | LVT) |
| 73 if (prevProp == U_GCB_L && (nextProp == U_GCB_L || nextProp == U_GCB_V || | 73 if (prevProp == U_GCB_L && |
| 74 nextProp == U_GCB_LV || nextProp == U_GCB_LVT)) | 74 (nextProp == U_GCB_L || nextProp == U_GCB_V || nextProp == U_GCB_LV || |
| 75 nextProp == U_GCB_LVT)) |
| 75 return false; | 76 return false; |
| 76 | 77 |
| 77 // Rule GB7, (LV | V) x (V | T) | 78 // Rule GB7, (LV | V) x (V | T) |
| 78 if ((prevProp == U_GCB_LV || prevProp == U_GCB_V) && | 79 if ((prevProp == U_GCB_LV || prevProp == U_GCB_V) && |
| 79 (nextProp == U_GCB_V || nextProp == U_GCB_T)) | 80 (nextProp == U_GCB_V || nextProp == U_GCB_T)) |
| 80 return false; | 81 return false; |
| 81 | 82 |
| 82 // Rule GB8, (LVT | T) x T | 83 // Rule GB8, (LVT | T) x T |
| 83 if ((prevProp == U_GCB_LVT || prevProp == U_GCB_T) && nextProp == U_GCB_T) | 84 if ((prevProp == U_GCB_LVT || prevProp == U_GCB_T) && nextProp == U_GCB_T) |
| 84 return false; | 85 return false; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // Proposed Rule GB11, ZWJ x Emoji | 118 // Proposed Rule GB11, ZWJ x Emoji |
| 118 if (prevCodePoint == zeroWidthJoinerCharacter && | 119 if (prevCodePoint == zeroWidthJoinerCharacter && |
| 119 (Character::isEmoji(nextCodePoint))) | 120 (Character::isEmoji(nextCodePoint))) |
| 120 return false; | 121 return false; |
| 121 | 122 |
| 122 // Rule GB999 any ÷ any | 123 // Rule GB999 any ÷ any |
| 123 return true; | 124 return true; |
| 124 } | 125 } |
| 125 | 126 |
| 126 } // namespace blink | 127 } // namespace blink |
| OLD | NEW |