OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 | 230 |
231 // Functions returning VisibleSelection | 231 // Functions returning VisibleSelection |
232 VisibleSelection selectionForParagraphIteration(const VisibleSelection&); | 232 VisibleSelection selectionForParagraphIteration(const VisibleSelection&); |
233 | 233 |
234 Position adjustedSelectionStartForStyleComputation(const VisibleSelection&); | 234 Position adjustedSelectionStartForStyleComputation(const VisibleSelection&); |
235 | 235 |
236 | 236 |
237 // Miscellaneous functions on Text | 237 // Miscellaneous functions on Text |
238 inline bool isWhitespace(UChar c) | 238 inline bool isWhitespace(UChar c) |
239 { | 239 { |
240 return c == noBreakSpace || c == ' ' || c == '\n' || c == '\t'; | 240 return c == noBreakSpaceCharacter || c == ' ' || c == '\n' || c == '\t'; |
241 } | 241 } |
242 | 242 |
243 // FIXME: Can't really answer this question correctly without knowing the white-
space mode. | 243 // FIXME: Can't really answer this question correctly without knowing the white-
space mode. |
244 inline bool isCollapsibleWhitespace(UChar c) | 244 inline bool isCollapsibleWhitespace(UChar c) |
245 { | 245 { |
246 return c == ' ' || c == '\n'; | 246 return c == ' ' || c == '\n'; |
247 } | 247 } |
248 | 248 |
249 inline bool isAmbiguousBoundaryCharacter(UChar character) | 249 inline bool isAmbiguousBoundaryCharacter(UChar character) |
250 { | 250 { |
251 // These are characters that can behave as word boundaries, but can appear w
ithin words. | 251 // These are characters that can behave as word boundaries, but can appear w
ithin words. |
252 // If they are just typed, i.e. if they are immediately followed by a caret,
we want to delay text checking until the next character has been typed. | 252 // If they are just typed, i.e. if they are immediately followed by a caret,
we want to delay text checking until the next character has been typed. |
253 // FIXME: this is required until 6853027 is fixed and text checking can do t
his for us. | 253 // FIXME: this is required until 6853027 is fixed and text checking can do t
his for us. |
254 return character == '\'' || character == rightSingleQuotationMark || charact
er == hebrewPunctuationGershayim; | 254 return character == '\'' || character == rightSingleQuotationMarkCharacter |
| character == hebrewPunctuationGershayimCharacter; |
255 } | 255 } |
256 | 256 |
257 String stringWithRebalancedWhitespace(const String&, bool startIsStartOfParagrap
h, bool endIsEndOfParagraph); | 257 String stringWithRebalancedWhitespace(const String&, bool startIsStartOfParagrap
h, bool endIsEndOfParagraph); |
258 const String& nonBreakingSpaceString(); | 258 const String& nonBreakingSpaceString(); |
259 | 259 |
260 } | 260 } |
261 | 261 |
262 #endif | 262 #endif |
OLD | NEW |