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

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

Issue 1483013003: Find In Page doesn't work properly when " " is searched (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding testcase Created 5 years 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
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 3bef0a99e12212414bf51b313653feaebd2f8df5..53237c6df2f09765bf1d99a2f1b455572ce395b9 100644
--- a/third_party/WebKit/Source/web/TextFinder.cpp
+++ b/third_party/WebKit/Source/web/TextFinder.cpp
@@ -306,6 +306,12 @@ void TextFinder::scopeStringMatchesAlgorithm(int identifier, const WebString& se
// find an alternative.
EphemeralRangeTemplate<Strategy> result = findPlainText(EphemeralRangeTemplate<Strategy>(searchStart, searchEnd), searchText, options.matchCase ? 0 : CaseInsensitive);
if (result.isCollapsed()) {
+ // result will be collapsed if whitespace spans over multiple TreeScopes.
+ // FIXME: Show such matches to users.
yosin_UTC9 2016/01/05 08:30:40 Please use "TODO(email):" style. https://google.gi
ramya.v 2016/01/06 08:28:44 Done.
+ if (result.endPosition() != searchEnd) {
+ searchStart = result.endPosition();
+ continue;
+ }
// Not found.
break;
}
« no previous file with comments | « third_party/WebKit/Source/core/editing/Editor.cpp ('k') | third_party/WebKit/Source/web/tests/TextFinderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698