OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All |
3 * rights reserved. | 3 * rights reserved. |
4 * Copyright (C) 2005 Alexey Proskuryakov. | 4 * Copyright (C) 2005 Alexey Proskuryakov. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 return EphemeralRangeTemplate<Strategy>(startPos, startPos); | 193 return EphemeralRangeTemplate<Strategy>(startPos, startPos); |
194 if (length > 1) | 194 if (length > 1) |
195 advance(length - 1); | 195 advance(length - 1); |
196 return EphemeralRangeTemplate<Strategy>(startPos, endPosition()); | 196 return EphemeralRangeTemplate<Strategy>(startPos, endPosition()); |
197 } | 197 } |
198 | 198 |
199 EphemeralRange calculateCharacterSubrange(const EphemeralRange& range, | 199 EphemeralRange calculateCharacterSubrange(const EphemeralRange& range, |
200 int characterOffset, | 200 int characterOffset, |
201 int characterCount) { | 201 int characterCount) { |
202 CharacterIterator entireRangeIterator( | 202 CharacterIterator entireRangeIterator( |
203 range, TextIteratorBehavior::Builder() | 203 range, |
204 .setEmitsObjectReplacementCharacter(true) | 204 TextIteratorBehavior::Builder() |
205 .build()); | 205 .setEmitsObjectReplacementCharacter(true) |
| 206 .build()); |
206 return entireRangeIterator.calculateCharacterSubrange(characterOffset, | 207 return entireRangeIterator.calculateCharacterSubrange(characterOffset, |
207 characterCount); | 208 characterCount); |
208 } | 209 } |
209 | 210 |
210 template class CORE_TEMPLATE_EXPORT CharacterIteratorAlgorithm<EditingStrategy>; | 211 template class CORE_TEMPLATE_EXPORT CharacterIteratorAlgorithm<EditingStrategy>; |
211 template class CORE_TEMPLATE_EXPORT | 212 template class CORE_TEMPLATE_EXPORT |
212 CharacterIteratorAlgorithm<EditingInFlatTreeStrategy>; | 213 CharacterIteratorAlgorithm<EditingInFlatTreeStrategy>; |
213 | 214 |
214 } // namespace blink | 215 } // namespace blink |
OLD | NEW |