| 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 // FIXME: isRichlyEditablePosition should also take EUpdateStyle. | 234 // FIXME: isRichlyEditablePosition should also take EUpdateStyle. |
| 235 CORE_EXPORT bool isEditablePosition(const Position&, EditableType = ContentIsEdi
table, EUpdateStyle = UpdateStyle); | 235 CORE_EXPORT bool isEditablePosition(const Position&, EditableType = ContentIsEdi
table, EUpdateStyle = UpdateStyle); |
| 236 bool isEditablePosition(const PositionInFlatTree&, EditableType = ContentIsEdita
ble, EUpdateStyle = UpdateStyle); | 236 bool isEditablePosition(const PositionInFlatTree&, EditableType = ContentIsEdita
ble, EUpdateStyle = UpdateStyle); |
| 237 bool isRichlyEditablePosition(const Position&, EditableType = ContentIsEditable)
; | 237 bool isRichlyEditablePosition(const Position&, EditableType = ContentIsEditable)
; |
| 238 bool lineBreakExistsAtPosition(const Position&); | 238 bool lineBreakExistsAtPosition(const Position&); |
| 239 bool isAtUnsplittableElement(const Position&); | 239 bool isAtUnsplittableElement(const Position&); |
| 240 | 240 |
| 241 // miscellaneous functions on Position | 241 // miscellaneous functions on Position |
| 242 | 242 |
| 243 enum WhitespacePositionOption { NotConsiderNonCollapsibleWhitespace, ConsiderNon
CollapsibleWhitespace }; | 243 enum WhitespacePositionOption { NotConsiderNonCollapsibleWhitespace, ConsiderNon
CollapsibleWhitespace }; |
| 244 |
| 245 // |leadingWhitespacePosition(position)| returns a previous position of |
| 246 // |position| if it is at collapsible whitespace, otherwise it returns null |
| 247 // position. When it is called with |NotConsiderNonCollapsibleWhitespace| and |
| 248 // a previous position in a element which has CSS property "white-space:pre", |
| 249 // or its variant, |leadingWhitespacePosition()| returns null position. |
| 250 // TODO(yosin) We should rename |leadingWhitespacePosition()| to |
| 251 // |leadingCollapsibleWhitespacePosition()| as this function really returns. |
| 244 Position leadingWhitespacePosition(const Position&, TextAffinity, WhitespacePosi
tionOption = NotConsiderNonCollapsibleWhitespace); | 252 Position leadingWhitespacePosition(const Position&, TextAffinity, WhitespacePosi
tionOption = NotConsiderNonCollapsibleWhitespace); |
| 245 Position trailingWhitespacePosition(const Position&, TextAffinity, WhitespacePos
itionOption = NotConsiderNonCollapsibleWhitespace); | 253 Position trailingWhitespacePosition(const Position&, TextAffinity, WhitespacePos
itionOption = NotConsiderNonCollapsibleWhitespace); |
| 246 unsigned numEnclosingMailBlockquotes(const Position&); | 254 unsigned numEnclosingMailBlockquotes(const Position&); |
| 247 void updatePositionForNodeRemoval(Position&, Node&); | 255 void updatePositionForNodeRemoval(Position&, Node&); |
| 248 | 256 |
| 249 // ------------------------------------------------------------------------- | 257 // ------------------------------------------------------------------------- |
| 250 // VisiblePosition | 258 // VisiblePosition |
| 251 // ------------------------------------------------------------------------- | 259 // ------------------------------------------------------------------------- |
| 252 | 260 |
| 253 // Functions returning VisiblePosition | 261 // Functions returning VisiblePosition |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 // FIXME: this is required until 6853027 is fixed and text checking can do t
his for us. | 345 // FIXME: this is required until 6853027 is fixed and text checking can do t
his for us. |
| 338 return character == '\'' || character == rightSingleQuotationMarkCharacter |
| character == hebrewPunctuationGershayimCharacter; | 346 return character == '\'' || character == rightSingleQuotationMarkCharacter |
| character == hebrewPunctuationGershayimCharacter; |
| 339 } | 347 } |
| 340 | 348 |
| 341 String stringWithRebalancedWhitespace(const String&, bool startIsStartOfParagrap
h, bool endIsEndOfParagraph); | 349 String stringWithRebalancedWhitespace(const String&, bool startIsStartOfParagrap
h, bool endIsEndOfParagraph); |
| 342 const String& nonBreakingSpaceString(); | 350 const String& nonBreakingSpaceString(); |
| 343 | 351 |
| 344 } // namespace blink | 352 } // namespace blink |
| 345 | 353 |
| 346 #endif | 354 #endif |
| OLD | NEW |