| Index: Source/core/editing/Editor.cpp
|
| diff --git a/Source/core/editing/Editor.cpp b/Source/core/editing/Editor.cpp
|
| index 8b1284666713805be0850d8c373739671c180f39..13ac5ce8a5e517bad273a7859ea2e354916427b1 100644
|
| --- a/Source/core/editing/Editor.cpp
|
| +++ b/Source/core/editing/Editor.cpp
|
| @@ -1270,25 +1270,6 @@ PassRefPtr<Range> Editor::rangeOfString(const String& target, Range* referenceRa
|
| }
|
|
|
| RefPtr<Range> resultRange(findPlainText(searchRange.get(), target, options));
|
| - // If we started in the reference range and the found range exactly matches the reference range, find again.
|
| - // Build a selection with the found range to remove collapsed whitespace.
|
| - // Compare ranges instead of selection objects to ignore the way that the current selection was made.
|
| - if (startInReferenceRange && areRangesEqual(VisibleSelection(resultRange.get()).toNormalizedRange().get(), referenceRange)) {
|
| - searchRange = rangeOfContents(m_frame.document());
|
| - if (forward)
|
| - searchRange->setStart(referenceRange->endPosition());
|
| - else
|
| - searchRange->setEnd(referenceRange->startPosition());
|
| -
|
| - if (shadowTreeRoot) {
|
| - if (forward)
|
| - searchRange->setEnd(shadowTreeRoot.get(), shadowTreeRoot->childNodeCount());
|
| - else
|
| - searchRange->setStart(shadowTreeRoot.get(), 0);
|
| - }
|
| -
|
| - resultRange = findPlainText(searchRange.get(), target, options);
|
| - }
|
|
|
| // If nothing was found in the shadow tree, search in main content following the shadow tree.
|
| if (resultRange->collapsed(ASSERT_NO_EXCEPTION) && shadowTreeRoot) {
|
|
|