OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. |
3 * Copyright (C) 2005 Alexey Proskuryakov. | 3 * Copyright (C) 2005 Alexey Proskuryakov. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
407 } | 407 } |
408 if (it.atBreak() && !buffer.atBreak()) { | 408 if (it.atBreak() && !buffer.atBreak()) { |
409 buffer.reachedBreak(); | 409 buffer.reachedBreak(); |
410 goto tryAgain; | 410 goto tryAgain; |
411 } | 411 } |
412 } | 412 } |
413 | 413 |
414 return matchLength; | 414 return matchLength; |
415 } | 415 } |
416 | 416 |
417 static const TextIteratorBehaviorFlags iteratorFlagsForFindPlainText = TextItera torEntersTextControls | TextIteratorEntersOpenShadowRoots | TextIteratorDoesNotB reakAtReplacedElement; | 417 static const TextIteratorBehaviorFlags iteratorFlagsForFindPlainText = TextItera torEntersTextControls | TextIteratorEntersOpenShadowRoots | TextIteratorDoesNotB reakAtReplacedElement | TextIteratorEmitExtraSpaceDeprecated; |
yosin_UTC9
2016/01/20 01:40:22
Sorry for confusion, the flag name |TextIteratorEm
ramya.v
2016/01/20 03:42:56
Done.
| |
418 | 418 |
419 template <typename Strategy> | 419 template <typename Strategy> |
420 static EphemeralRangeTemplate<Strategy> findPlainTextAlgorithm(const EphemeralRa ngeTemplate<Strategy>& inputRange, const String& target, FindOptions options) | 420 static EphemeralRangeTemplate<Strategy> findPlainTextAlgorithm(const EphemeralRa ngeTemplate<Strategy>& inputRange, const String& target, FindOptions options) |
421 { | 421 { |
422 // CharacterIterator requires layoutObjects to be up-to-date. | 422 // CharacterIterator requires layoutObjects to be up-to-date. |
423 if (!inputRange.startPosition().inDocument()) | 423 if (!inputRange.startPosition().inDocument()) |
424 return EphemeralRangeTemplate<Strategy>(); | 424 return EphemeralRangeTemplate<Strategy>(); |
425 ASSERT(inputRange.startPosition().document() == inputRange.endPosition().doc ument()); | 425 ASSERT(inputRange.startPosition().document() == inputRange.endPosition().doc ument()); |
426 | 426 |
427 // FIXME: Reduce the code duplication with above (but how?). | 427 // FIXME: Reduce the code duplication with above (but how?). |
(...skipping 17 matching lines...) Expand all Loading... | |
445 { | 445 { |
446 return findPlainTextAlgorithm<EditingStrategy>(inputRange, target, options); | 446 return findPlainTextAlgorithm<EditingStrategy>(inputRange, target, options); |
447 } | 447 } |
448 | 448 |
449 EphemeralRangeInComposedTree findPlainText(const EphemeralRangeInComposedTree& i nputRange, const String& target, FindOptions options) | 449 EphemeralRangeInComposedTree findPlainText(const EphemeralRangeInComposedTree& i nputRange, const String& target, FindOptions options) |
450 { | 450 { |
451 return findPlainTextAlgorithm<EditingInComposedTreeStrategy>(inputRange, tar get, options); | 451 return findPlainTextAlgorithm<EditingInComposedTreeStrategy>(inputRange, tar get, options); |
452 } | 452 } |
453 | 453 |
454 } // namespace blink | 454 } // namespace blink |
OLD | NEW |