Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Side by Side Diff: Source/core/editing/iterators/CharacterIterator.cpp

Issue 935283002: Rename {Author,UserAgent}ShadowRoot to {Open,Closed}ShadowRoot. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix inspector tests Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/shadow/ShadowRoot.h ('k') | Source/core/editing/iterators/TextIterator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 } 614 }
615 if (it.atBreak() && !buffer.atBreak()) { 615 if (it.atBreak() && !buffer.atBreak()) {
616 buffer.reachedBreak(); 616 buffer.reachedBreak();
617 goto tryAgain; 617 goto tryAgain;
618 } 618 }
619 } 619 }
620 620
621 return matchLength; 621 return matchLength;
622 } 622 }
623 623
624 static const TextIteratorBehaviorFlags iteratorFlagsForFindPlainText = TextItera torEntersTextControls | TextIteratorEntersAuthorShadowRoots | TextIteratorDoesNo tBreakAtReplacedElement; 624 static const TextIteratorBehaviorFlags iteratorFlagsForFindPlainText = TextItera torEntersTextControls | TextIteratorEntersOpenShadowRoots | TextIteratorDoesNotB reakAtReplacedElement;
625 625
626 PassRefPtrWillBeRawPtr<Range> findPlainText(const Range* range, const String& ta rget, FindOptions options) 626 PassRefPtrWillBeRawPtr<Range> findPlainText(const Range* range, const String& ta rget, FindOptions options)
627 { 627 {
628 // First, find the text. 628 // First, find the text.
629 size_t matchStart; 629 size_t matchStart;
630 size_t matchLength; 630 size_t matchLength;
631 { 631 {
632 CharacterIterator findIterator(range, iteratorFlagsForFindPlainText); 632 CharacterIterator findIterator(range, iteratorFlagsForFindPlainText);
633 matchLength = findPlainTextInternal(findIterator, target, options, match Start); 633 matchLength = findPlainTextInternal(findIterator, target, options, match Start);
634 if (!matchLength) 634 if (!matchLength)
(...skipping 29 matching lines...) Expand all
664 resultEnd = collapseTo; 664 resultEnd = collapseTo;
665 return; 665 return;
666 } 666 }
667 } 667 }
668 668
669 CharacterIterator computeRangeIterator(inputStart, inputEnd, iteratorFlagsFo rFindPlainText); 669 CharacterIterator computeRangeIterator(inputStart, inputEnd, iteratorFlagsFo rFindPlainText);
670 computeRangeIterator.calculateCharacterSubrange(matchStart, matchLength, res ultStart, resultEnd); 670 computeRangeIterator.calculateCharacterSubrange(matchStart, matchLength, res ultStart, resultEnd);
671 } 671 }
672 672
673 } // namespace blink 673 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/shadow/ShadowRoot.h ('k') | Source/core/editing/iterators/TextIterator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698