| Index: third_party/WebKit/Source/web/TextFinder.cpp
|
| diff --git a/third_party/WebKit/Source/web/TextFinder.cpp b/third_party/WebKit/Source/web/TextFinder.cpp
|
| index b1248f001ad01b0097ea6a2f6e9b8c45879e212e..c32b414cb888d23ec328e40b72b389fec28ee3b7 100644
|
| --- a/third_party/WebKit/Source/web/TextFinder.cpp
|
| +++ b/third_party/WebKit/Source/web/TextFinder.cpp
|
| @@ -408,10 +408,6 @@ void TextFinder::scopeStringMatches(int identifier,
|
| timedOut = (currentTime() - startTime) >= maxScopingDuration;
|
| } while (!timedOut);
|
|
|
| - // Remember what we search for last time, so we can skip searching if more
|
| - // letters are added to the search string (and last outcome was 0).
|
| - m_lastSearchString = searchText;
|
| -
|
| if (matchCount > 0) {
|
| ownerFrame().frame()->editor().setMarkedTextMatchesAreHighlighted(true);
|
|
|
| @@ -449,7 +445,6 @@ void TextFinder::finishCurrentScopingEffort(int identifier) {
|
| flushCurrentScopingEffort(identifier);
|
|
|
| m_scopingInProgress = false;
|
| - m_lastFindRequestCompletedWithNoMatches = !m_lastMatchCount;
|
|
|
| // This frame is done, so show any scrollbar tickmarks we haven't drawn yet.
|
| ownerFrame().frameView()->invalidatePaintForTickmarks();
|
| @@ -462,10 +457,6 @@ void TextFinder::cancelPendingScopingEffort() {
|
|
|
| m_activeMatchIndex = -1;
|
|
|
| - // Last request didn't complete.
|
| - if (m_scopingInProgress)
|
| - m_lastFindRequestCompletedWithNoMatches = false;
|
| -
|
| m_scopingInProgress = false;
|
| }
|
|
|
| @@ -677,7 +668,6 @@ TextFinder::TextFinder(WebLocalFrameImpl& ownerFrame)
|
| m_findMatchMarkersVersion(0),
|
| m_locatingActiveRect(false),
|
| m_scopingInProgress(false),
|
| - m_lastFindRequestCompletedWithNoMatches(false),
|
| m_findMatchRectsAreValid(false) {}
|
|
|
| TextFinder::~TextFinder() {}
|
| @@ -707,26 +697,7 @@ bool TextFinder::shouldScopeMatches(const String& searchText,
|
| DCHECK(frame->document());
|
| DCHECK(frame->view());
|
|
|
| - if (options.force)
|
| - return true;
|
| -
|
| - if (!ownerFrame().hasVisibleContent())
|
| - return false;
|
| -
|
| - // If the frame completed the scoping operation and found 0 matches the last
|
| - // time it was searched, then we don't have to search it again if the user is
|
| - // just adding to the search string or sending the same search string again.
|
| - if (m_lastFindRequestCompletedWithNoMatches &&
|
| - !m_lastSearchString.isEmpty()) {
|
| - // Check to see if the search string prefixes match.
|
| - String previousSearchPrefix =
|
| - searchText.substring(0, m_lastSearchString.length());
|
| -
|
| - if (previousSearchPrefix == m_lastSearchString)
|
| - return false; // Don't search this frame, it will be fruitless.
|
| - }
|
| -
|
| - return true;
|
| + return options.force || ownerFrame().hasVisibleContent();
|
| }
|
|
|
| void TextFinder::scopeStringMatchesSoon(int identifier,
|
|
|