| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 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 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1242 else | 1242 else |
| 1243 searchRange = EphemeralRangeTemplate<Strategy>(documentRange.startPo
sition(), referenceRange.startPosition()); | 1243 searchRange = EphemeralRangeTemplate<Strategy>(documentRange.startPo
sition(), referenceRange.startPosition()); |
| 1244 } | 1244 } |
| 1245 | 1245 |
| 1246 RefPtrWillBeRawPtr<Range> resultRange = findStringBetweenPositions(target, s
earchRange, options); | 1246 RefPtrWillBeRawPtr<Range> resultRange = findStringBetweenPositions(target, s
earchRange, options); |
| 1247 | 1247 |
| 1248 // If we started in the reference range and the found range exactly matches | 1248 // If we started in the reference range and the found range exactly matches |
| 1249 // the reference range, find again. Build a selection with the found range | 1249 // the reference range, find again. Build a selection with the found range |
| 1250 // to remove collapsed whitespace. Compare ranges instead of selection | 1250 // to remove collapsed whitespace. Compare ranges instead of selection |
| 1251 // objects to ignore the way that the current selection was made. | 1251 // objects to ignore the way that the current selection was made. |
| 1252 if (resultRange && startInReferenceRange && VisibleSelection::normalizeRange
(EphemeralRangeTemplate<Strategy>(resultRange.get())) == referenceRange) { | 1252 if (resultRange && startInReferenceRange && normalizeRange(EphemeralRangeTem
plate<Strategy>(resultRange.get())) == referenceRange) { |
| 1253 if (forward) | 1253 if (forward) |
| 1254 searchRange = EphemeralRangeTemplate<Strategy>(fromPositionInDOMTree
<Strategy>(resultRange->endPosition()), searchRange.endPosition()); | 1254 searchRange = EphemeralRangeTemplate<Strategy>(fromPositionInDOMTree
<Strategy>(resultRange->endPosition()), searchRange.endPosition()); |
| 1255 else | 1255 else |
| 1256 searchRange = EphemeralRangeTemplate<Strategy>(searchRange.startPosi
tion(), fromPositionInDOMTree<Strategy>(resultRange->startPosition())); | 1256 searchRange = EphemeralRangeTemplate<Strategy>(searchRange.startPosi
tion(), fromPositionInDOMTree<Strategy>(resultRange->startPosition())); |
| 1257 resultRange = findStringBetweenPositions(target, searchRange, options); | 1257 resultRange = findStringBetweenPositions(target, searchRange, options); |
| 1258 } | 1258 } |
| 1259 | 1259 |
| 1260 if (!resultRange && options & WrapAround) | 1260 if (!resultRange && options & WrapAround) |
| 1261 return findStringBetweenPositions(target, documentRange, options); | 1261 return findStringBetweenPositions(target, documentRange, options); |
| 1262 | 1262 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1301 } | 1301 } |
| 1302 | 1302 |
| 1303 DEFINE_TRACE(Editor) | 1303 DEFINE_TRACE(Editor) |
| 1304 { | 1304 { |
| 1305 visitor->trace(m_frame); | 1305 visitor->trace(m_frame); |
| 1306 visitor->trace(m_lastEditCommand); | 1306 visitor->trace(m_lastEditCommand); |
| 1307 visitor->trace(m_mark); | 1307 visitor->trace(m_mark); |
| 1308 } | 1308 } |
| 1309 | 1309 |
| 1310 } // namespace blink | 1310 } // namespace blink |
| OLD | NEW |