Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/ui/SearchableView.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/ui/SearchableView.js b/third_party/WebKit/Source/devtools/front_end/ui/SearchableView.js |
| index 4922e236e813917b7b52700fdf96274d24b817ff..57947ea8263ee8fd4e425129c329cde82890cac7 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/ui/SearchableView.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/ui/SearchableView.js |
| @@ -352,7 +352,7 @@ UI.SearchableView = class extends UI.VBox { |
| this._updateReplaceVisibility(); |
| if (queryCandidate) |
| this._searchInputElement.value = queryCandidate; |
| - this._performSearch(false, false); |
| + this._performSearch(false, false, false, true); |
| this._searchInputElement.focus(); |
| this._searchInputElement.select(); |
| this._searchIsVisible = true; |
| @@ -379,9 +379,9 @@ UI.SearchableView = class extends UI.VBox { |
| return; |
| if (!this._currentQuery) |
| - this._performSearch(true, true, event.shiftKey); |
| + this._clearSearch(); |
| else |
| - this._jumpToNextSearchResult(event.shiftKey); |
| + this._performSearch(false, true, event.shiftKey); |
| } |
| /** |
| @@ -408,14 +408,14 @@ UI.SearchableView = class extends UI.VBox { |
| _onNextButtonSearch(event) { |
| if (!this._searchNavigationNextElement.classList.contains('enabled')) |
| return; |
| - this._jumpToNextSearchResult(); |
| + this._performSearch(false, true); |
| this._searchInputElement.focus(); |
| } |
| _onPrevButtonSearch(event) { |
| if (!this._searchNavigationPrevElement.classList.contains('enabled')) |
| return; |
| - this._jumpToNextSearchResult(true); |
| + this._performSearch(false, true, true); |
| this._searchInputElement.focus(); |
| } |
| @@ -448,8 +448,9 @@ UI.SearchableView = class extends UI.VBox { |
| * @param {boolean} forceSearch |
| * @param {boolean} shouldJump |
| * @param {boolean=} jumpBackwards |
| + * @param {boolean=} reset |
| */ |
| - _performSearch(forceSearch, shouldJump, jumpBackwards) { |
| + _performSearch(forceSearch, shouldJump, jumpBackwards, reset) { |
| var query = this._searchInputElement.value; |
| if (!query || (!forceSearch && query.length < this._minimalSearchQuerySize && !this._currentQuery)) { |
| this._clearSearch(); |
| @@ -460,7 +461,7 @@ UI.SearchableView = class extends UI.VBox { |
| this._searchProvider.currentQuery = query; |
| var searchConfig = this._currentSearchConfig(); |
| - this._searchProvider.performSearch(searchConfig, shouldJump, jumpBackwards); |
| + this._searchProvider.performSearch(searchConfig, shouldJump, jumpBackwards, reset); |
| } |
| /** |
| @@ -516,7 +517,7 @@ UI.SearchableView = class extends UI.VBox { |
| if (!this._searchIsVisible) |
| return; |
| delete this._valueChangedTimeoutId; |
| - this._performSearch(false, true); |
| + this._performSearch(false, true, false, true); |
| } |
| }; |
| @@ -537,8 +538,9 @@ UI.Searchable.prototype = { |
| * @param {!UI.SearchableView.SearchConfig} searchConfig |
| * @param {boolean} shouldJump |
| * @param {boolean=} jumpBackwards |
| + * @param {boolean=} reset |
| */ |
| - performSearch(searchConfig, shouldJump, jumpBackwards) {}, |
| + performSearch(searchConfig, shouldJump, jumpBackwards, reset) {}, |
|
pfeldman
2017/02/06 19:24:53
This makes our contract a bit more redundant - I w
Oleksii Kadurin
2017/02/07 20:20:24
I removed the "reset" parameter. And now I'm using
|
| jumpToNextSearchResult() {}, |