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

Unified Diff: third_party/WebKit/Source/web/TextFinder.cpp

Issue 2363993003: Revert of Handling new frames and frame navigations with find-in-page during a find session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/TextFinder.h ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d5e4454fc6be5117795527523d0e08511ebcd052..1b4df8ff00eb63c4d52849368d2e60486da43a48 100644
--- a/third_party/WebKit/Source/web/TextFinder.cpp
+++ b/third_party/WebKit/Source/web/TextFinder.cpp
@@ -200,6 +200,7 @@
reportFindInPageSelection(selectionRect, m_activeMatchIndex + 1, identifier);
}
+ m_lastFindRequestCompletedWithNoMatches = false;
return true;
}
@@ -207,7 +208,6 @@
{
m_currentActiveMatchFrame = false;
setMarkerActive(m_activeMatch.get(), false);
- resetActiveMatch();
}
void TextFinder::stopFindingAndClearSelection()
@@ -285,7 +285,7 @@
return;
}
- if (!shouldScopeMatches(searchText, options)) {
+ if (!shouldScopeMatches(searchText)) {
finishCurrentScopingEffort(identifier);
return;
}
@@ -673,22 +673,16 @@
frame->document()->markers().removeMarkers(DocumentMarker::TextMatch);
}
-bool TextFinder::shouldScopeMatches(const String& searchText, const WebFindOptions& options)
+bool TextFinder::shouldScopeMatches(const String& searchText)
{
// Don't scope if we can't find a frame or a view.
// The user may have closed the tab/application, so abort.
LocalFrame* frame = ownerFrame().frame();
- if (!frame || !frame->view() || !frame->page())
+ if (!frame || !frame->view() || !frame->page() || !ownerFrame().hasVisibleContent())
return false;
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
« no previous file with comments | « third_party/WebKit/Source/web/TextFinder.h ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698