| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 | 236 |
| 237 bool Character::isCJKIdeographOrSymbol(UChar32 c) | 237 bool Character::isCJKIdeographOrSymbol(UChar32 c) |
| 238 { | 238 { |
| 239 // Likely common case | 239 // Likely common case |
| 240 if (c < 0x2C7) | 240 if (c < 0x2C7) |
| 241 return false; | 241 return false; |
| 242 | 242 |
| 243 RETURN_HAS_PROPERTY(c, isCJKIdeographOrSymbol) | 243 RETURN_HAS_PROPERTY(c, isCJKIdeographOrSymbol) |
| 244 } | 244 } |
| 245 | 245 |
| 246 bool Character::isPotentialCustomElementNameChar(UChar32 character) |
| 247 { |
| 248 RETURN_HAS_PROPERTY(character, isPotentialCustomElementNameChar); |
| 249 } |
| 250 |
| 246 unsigned Character::expansionOpportunityCount(const LChar* characters, size_t le
ngth, TextDirection direction, bool& isAfterExpansion, const TextJustify textJus
tify) | 251 unsigned Character::expansionOpportunityCount(const LChar* characters, size_t le
ngth, TextDirection direction, bool& isAfterExpansion, const TextJustify textJus
tify) |
| 247 { | 252 { |
| 248 unsigned count = 0; | 253 unsigned count = 0; |
| 249 if (textJustify == TextJustifyDistribute) { | 254 if (textJustify == TextJustifyDistribute) { |
| 250 isAfterExpansion = true; | 255 isAfterExpansion = true; |
| 251 return length; | 256 return length; |
| 252 } | 257 } |
| 253 | 258 |
| 254 if (direction == LTR) { | 259 if (direction == LTR) { |
| 255 for (size_t i = 0; i < length; ++i) { | 260 for (size_t i = 0; i < length; ++i) { |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 } | 365 } |
| 361 | 366 |
| 362 bool Character::isCommonOrInheritedScript(UChar32 character) | 367 bool Character::isCommonOrInheritedScript(UChar32 character) |
| 363 { | 368 { |
| 364 UErrorCode status = U_ZERO_ERROR; | 369 UErrorCode status = U_ZERO_ERROR; |
| 365 UScriptCode script = uscript_getScript(character, &status); | 370 UScriptCode script = uscript_getScript(character, &status); |
| 366 return U_SUCCESS(status) && (script == USCRIPT_COMMON || script == USCRIPT_I
NHERITED); | 371 return U_SUCCESS(status) && (script == USCRIPT_COMMON || script == USCRIPT_I
NHERITED); |
| 367 } | 372 } |
| 368 | 373 |
| 369 } // namespace blink | 374 } // namespace blink |
| OLD | NEW |