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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 continue; | 209 continue; |
210 } | 210 } |
211 isAfterExpansion = false; | 211 isAfterExpansion = false; |
212 } | 212 } |
213 } | 213 } |
214 return count; | 214 return count; |
215 } | 215 } |
216 | 216 |
217 bool Character::canReceiveTextEmphasis(UChar32 c) { | 217 bool Character::canReceiveTextEmphasis(UChar32 c) { |
218 CharCategory category = Unicode::category(c); | 218 CharCategory category = Unicode::category(c); |
219 if (category & (Separator_Space | Separator_Line | Separator_Paragraph | | 219 if (category & |
220 Other_NotAssigned | Other_Control | Other_Format)) | 220 (Separator_Space | Separator_Line | Separator_Paragraph | |
| 221 Other_NotAssigned | Other_Control | Other_Format)) |
221 return false; | 222 return false; |
222 | 223 |
223 // Additional word-separator characters listed in CSS Text Level 3 Editor's | 224 // Additional word-separator characters listed in CSS Text Level 3 Editor's |
224 // Draft 3 November 2010. | 225 // Draft 3 November 2010. |
225 if (c == ethiopicWordspaceCharacter || | 226 if (c == ethiopicWordspaceCharacter || |
226 c == aegeanWordSeparatorLineCharacter || | 227 c == aegeanWordSeparatorLineCharacter || |
227 c == aegeanWordSeparatorDotCharacter || | 228 c == aegeanWordSeparatorDotCharacter || |
228 c == ugariticWordDividerCharacter || | 229 c == ugariticWordDividerCharacter || |
229 c == tibetanMarkIntersyllabicTshegCharacter || | 230 c == tibetanMarkIntersyllabicTshegCharacter || |
230 c == tibetanMarkDelimiterTshegBstarCharacter) | 231 c == tibetanMarkDelimiterTshegBstarCharacter) |
(...skipping 23 matching lines...) Expand all Loading... |
254 } | 255 } |
255 | 256 |
256 bool Character::isCommonOrInheritedScript(UChar32 character) { | 257 bool Character::isCommonOrInheritedScript(UChar32 character) { |
257 ICUError status; | 258 ICUError status; |
258 UScriptCode script = uscript_getScript(character, &status); | 259 UScriptCode script = uscript_getScript(character, &status); |
259 return U_SUCCESS(status) && | 260 return U_SUCCESS(status) && |
260 (script == USCRIPT_COMMON || script == USCRIPT_INHERITED); | 261 (script == USCRIPT_COMMON || script == USCRIPT_INHERITED); |
261 } | 262 } |
262 | 263 |
263 } // namespace blink | 264 } // namespace blink |
OLD | NEW |