| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 static inline bool isUnicodeVariationSelector(UChar32 character) | 57 static inline bool isUnicodeVariationSelector(UChar32 character) |
| 58 { | 58 { |
| 59 // http://www.unicode.org/Public/UCD/latest/ucd/StandardizedVariants.htm
l | 59 // http://www.unicode.org/Public/UCD/latest/ucd/StandardizedVariants.htm
l |
| 60 return isInRange(character, 0x180B, 0x180D) // MONGOLIAN FREE VARIATION
SELECTOR ONE to THREE | 60 return isInRange(character, 0x180B, 0x180D) // MONGOLIAN FREE VARIATION
SELECTOR ONE to THREE |
| 61 || isInRange(character, 0xFE00, 0xFE0F) // VARIATION SELECTOR-1 to 1
6 | 61 || isInRange(character, 0xFE00, 0xFE0F) // VARIATION SELECTOR-1 to 1
6 |
| 62 || isInRange(character, 0xE0100, 0xE01EF); // VARIATION SELECTOR-17
to 256 | 62 || isInRange(character, 0xE0100, 0xE01EF); // VARIATION SELECTOR-17
to 256 |
| 63 } | 63 } |
| 64 | 64 |
| 65 static bool isCJKIdeographOrSymbol(UChar32); | 65 static bool isCJKIdeographOrSymbol(UChar32); |
| 66 static bool isCJKIdeographOrSymbolBase(UChar32 c) |
| 67 { |
| 68 return isCJKIdeographOrSymbol(c) |
| 69 && !(U_GET_GC_MASK(c) & (U_GC_M_MASK | U_GC_LM_MASK | U_GC_SK_MASK))
; |
| 70 } |
| 66 | 71 |
| 67 static unsigned expansionOpportunityCount(const LChar*, size_t length, TextD
irection, bool& isAfterExpansion, const TextJustify); | 72 static unsigned expansionOpportunityCount(const LChar*, size_t length, TextD
irection, bool& isAfterExpansion, const TextJustify); |
| 68 static unsigned expansionOpportunityCount(const UChar*, size_t length, TextD
irection, bool& isAfterExpansion, const TextJustify); | 73 static unsigned expansionOpportunityCount(const UChar*, size_t length, TextD
irection, bool& isAfterExpansion, const TextJustify); |
| 69 static unsigned expansionOpportunityCount(const TextRun& run, bool& isAfterE
xpansion) | 74 static unsigned expansionOpportunityCount(const TextRun& run, bool& isAfterE
xpansion) |
| 70 { | 75 { |
| 71 if (run.is8Bit()) | 76 if (run.is8Bit()) |
| 72 return expansionOpportunityCount(run.characters8(), run.length(), ru
n.direction(), isAfterExpansion, run.getTextJustify()); | 77 return expansionOpportunityCount(run.characters8(), run.length(), ru
n.direction(), isAfterExpansion, run.getTextJustify()); |
| 73 return expansionOpportunityCount(run.characters16(), run.length(), run.d
irection(), isAfterExpansion, run.getTextJustify()); | 78 return expansionOpportunityCount(run.characters16(), run.length(), run.d
irection(), isAfterExpansion, run.getTextJustify()); |
| 74 } | 79 } |
| 75 | 80 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 147 |
| 143 static String normalizeSpaces(const LChar*, unsigned length); | 148 static String normalizeSpaces(const LChar*, unsigned length); |
| 144 static String normalizeSpaces(const UChar*, unsigned length); | 149 static String normalizeSpaces(const UChar*, unsigned length); |
| 145 | 150 |
| 146 static bool isCommonOrInheritedScript(UChar32); | 151 static bool isCommonOrInheritedScript(UChar32); |
| 147 }; | 152 }; |
| 148 | 153 |
| 149 } // namespace blink | 154 } // namespace blink |
| 150 | 155 |
| 151 #endif | 156 #endif |
| OLD | NEW |