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

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

Issue 1041463003: Remove methods of TextIterator that take Range objects (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add assertions Created 5 years, 8 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/editing/htmlediting.cpp ('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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 bool m_targetRequiresKanaWorkaround; 81 bool m_targetRequiresKanaWorkaround;
82 Vector<UChar> m_normalizedTarget; 82 Vector<UChar> m_normalizedTarget;
83 mutable Vector<UChar> m_normalizedMatch; 83 mutable Vector<UChar> m_normalizedMatch;
84 }; 84 };
85 85
86 86
87 CharacterIterator::CharacterIterator(const Range* range, TextIteratorBehaviorFla gs behavior) 87 CharacterIterator::CharacterIterator(const Range* range, TextIteratorBehaviorFla gs behavior)
88 : m_offset(0) 88 : m_offset(0)
89 , m_runOffset(0) 89 , m_runOffset(0)
90 , m_atBreak(true) 90 , m_atBreak(true)
91 , m_textIterator(range, behavior) 91 , m_textIterator(range->startPosition(), range->endPosition(), behavior)
92 { 92 {
93 initialize(); 93 initialize();
94 } 94 }
95 95
96 CharacterIterator::CharacterIterator(const Position& start, const Position& end, TextIteratorBehaviorFlags behavior) 96 CharacterIterator::CharacterIterator(const Position& start, const Position& end, TextIteratorBehaviorFlags behavior)
97 : m_offset(0) 97 : m_offset(0)
98 , m_runOffset(0) 98 , m_runOffset(0)
99 , m_atBreak(true) 99 , m_atBreak(true)
100 , m_textIterator(start, end, behavior) 100 , m_textIterator(start, end, behavior)
101 { 101 {
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
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/editing/htmlediting.cpp ('k') | Source/core/editing/iterators/TextIterator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698