| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2009 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 23 matching lines...) Expand all Loading... |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 class InlineTextBox; | 36 class InlineTextBox; |
| 37 class RenderText; | 37 class RenderText; |
| 38 | 38 |
| 39 enum TextIteratorBehavior { | 39 enum TextIteratorBehavior { |
| 40 TextIteratorDefaultBehavior = 0, | 40 TextIteratorDefaultBehavior = 0, |
| 41 TextIteratorEmitsCharactersBetweenAllVisiblePositions = 1 << 0, | 41 TextIteratorEmitsCharactersBetweenAllVisiblePositions = 1 << 0, |
| 42 TextIteratorIgnoresStyleVisibility = 1 << 2, | 42 TextIteratorIgnoresStyleVisibility = 1 << 2, |
| 43 TextIteratorEmitsOriginalText = 1 << 3, | 43 TextIteratorEmitsOriginalText = 1 << 3, |
| 44 TextIteratorEmitsImageAltText = 1 << 5, | 44 TextIteratorEntersAuthorShadowRoots = 1 << 5, |
| 45 TextIteratorEntersAuthorShadowRoots = 1 << 6, | 45 TextIteratorEmitsObjectReplacementCharacter = 1 << 6 |
| 46 TextIteratorEmitsObjectReplacementCharacter = 1 << 7 | |
| 47 }; | 46 }; |
| 48 typedef unsigned TextIteratorBehaviorFlags; | 47 typedef unsigned TextIteratorBehaviorFlags; |
| 49 | 48 |
| 50 String plainText(const Range*, TextIteratorBehaviorFlags = TextIteratorDefaultBe
havior); | 49 String plainText(const Range*, TextIteratorBehaviorFlags = TextIteratorDefaultBe
havior); |
| 51 PassRefPtr<Range> findPlainText(const Range*, const String&, FindOptions); | 50 PassRefPtr<Range> findPlainText(const Range*, const String&, FindOptions); |
| 52 void findPlainText(const Position& inputStart, const Position& inputEnd, const S
tring&, FindOptions, Position& resultStart, Position& resultEnd); | 51 void findPlainText(const Position& inputStart, const Position& inputEnd, const S
tring&, FindOptions, Position& resultStart, Position& resultEnd); |
| 53 | 52 |
| 54 class BitStack { | 53 class BitStack { |
| 55 public: | 54 public: |
| 56 BitStack(); | 55 BitStack(); |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 // FIXME <rdar://problem/6028818>: This functionality should eventually be p
hased out when we rewrite | 188 // FIXME <rdar://problem/6028818>: This functionality should eventually be p
hased out when we rewrite |
| 190 // moveParagraphs to not clone/destroy moved content. | 189 // moveParagraphs to not clone/destroy moved content. |
| 191 bool m_emitsCharactersBetweenAllVisiblePositions; | 190 bool m_emitsCharactersBetweenAllVisiblePositions; |
| 192 | 191 |
| 193 // Used in pasting inside password field. | 192 // Used in pasting inside password field. |
| 194 bool m_emitsOriginalText; | 193 bool m_emitsOriginalText; |
| 195 | 194 |
| 196 // Used when the visibility of the style should not affect text gathering. | 195 // Used when the visibility of the style should not affect text gathering. |
| 197 bool m_ignoresStyleVisibility; | 196 bool m_ignoresStyleVisibility; |
| 198 | 197 |
| 199 bool m_emitsImageAltText; | |
| 200 | |
| 201 bool m_entersAuthorShadowRoots; | 198 bool m_entersAuthorShadowRoots; |
| 202 | 199 |
| 203 bool m_emitsObjectReplacementCharacter; | 200 bool m_emitsObjectReplacementCharacter; |
| 204 }; | 201 }; |
| 205 | 202 |
| 206 // Iterates through the DOM range, returning all the text, and 0-length boundari
es | 203 // Iterates through the DOM range, returning all the text, and 0-length boundari
es |
| 207 // at points where replaced elements break up the text flow. The text comes back
in | 204 // at points where replaced elements break up the text flow. The text comes back
in |
| 208 // chunks so as to optimize for performance of the iteration. | 205 // chunks so as to optimize for performance of the iteration. |
| 209 class SimplifiedBackwardsTextIterator { | 206 class SimplifiedBackwardsTextIterator { |
| 210 STACK_ALLOCATED(); | 207 STACK_ALLOCATED(); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 Vector<UChar> m_buffer; | 341 Vector<UChar> m_buffer; |
| 345 // Did we have to look ahead in the textIterator to confirm the current chun
k? | 342 // Did we have to look ahead in the textIterator to confirm the current chun
k? |
| 346 bool m_didLookAhead; | 343 bool m_didLookAhead; |
| 347 RefPtr<Range> m_range; | 344 RefPtr<Range> m_range; |
| 348 TextIterator m_textIterator; | 345 TextIterator m_textIterator; |
| 349 }; | 346 }; |
| 350 | 347 |
| 351 } | 348 } |
| 352 | 349 |
| 353 #endif | 350 #endif |
| OLD | NEW |