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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 | 238 |
239 Position adjustedSelectionStartForStyleComputation(const VisibleSelection&); | 239 Position adjustedSelectionStartForStyleComputation(const VisibleSelection&); |
240 | 240 |
241 | 241 |
242 // Miscellaneous functions on Text | 242 // Miscellaneous functions on Text |
243 inline bool isWhitespace(UChar c) | 243 inline bool isWhitespace(UChar c) |
244 { | 244 { |
245 return c == noBreakSpace || c == ' ' || c == '\n' || c == '\t'; | 245 return c == noBreakSpace || c == ' ' || c == '\n' || c == '\t'; |
246 } | 246 } |
247 | 247 |
| 248 // FIXME: Can't really answer this question correctly without knowing the white-
space mode. |
| 249 inline bool isCollapsibleWhitespace(UChar c) |
| 250 { |
| 251 return c == ' ' || c == '\n'; |
| 252 } |
| 253 |
248 inline bool isAmbiguousBoundaryCharacter(UChar character) | 254 inline bool isAmbiguousBoundaryCharacter(UChar character) |
249 { | 255 { |
250 // These are characters that can behave as word boundaries, but can appear w
ithin words. | 256 // These are characters that can behave as word boundaries, but can appear w
ithin words. |
251 // 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. | 257 // 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 // FIXME: this is required until 6853027 is fixed and text checking can do t
his for us. | 258 // FIXME: this is required until 6853027 is fixed and text checking can do t
his for us. |
253 return character == '\'' || character == rightSingleQuotationMark || charact
er == hebrewPunctuationGershayim; | 259 return character == '\'' || character == rightSingleQuotationMark || charact
er == hebrewPunctuationGershayim; |
254 } | 260 } |
255 | 261 |
256 String stringWithRebalancedWhitespace(const String&, bool startIsStartOfParagrap
h, bool endIsEndOfParagraph); | 262 String stringWithRebalancedWhitespace(const String&, bool startIsStartOfParagrap
h, bool endIsEndOfParagraph); |
257 const String& nonBreakingSpaceString(); | 263 const String& nonBreakingSpaceString(); |
258 | 264 |
259 } | 265 } |
260 | 266 |
261 #endif | 267 #endif |
OLD | NEW |