RESOLVED FIXED 174047
Web Inspector: Initial search is sometimes performed twice, produces duplicate results
https://bugs.webkit.org/show_bug.cgi?id=174047
Summary Web Inspector: Initial search is sometimes performed twice, produces duplicat...
Joseph Pecoraro
Reported 2017-06-30 15:06:28 PDT
Summary: Initial search is sometimes performed twice Steps to Reproduce: 1. Setup: Ensure opening inspector will not have a search tab. 2. Inspect <http://bogojoker.com/shell/> 3. Perform a global search for "reset.css" => Search tab is created and there are two results for "reset.css" in the same file 4. Re-perform the search => Just 1 result. As expected. Notes: - Seems to be related to opening the tab the first time.
Attachments
[PATCH] Proposed Fix (1.62 KB, patch)
2017-06-30 15:17 PDT, Joseph Pecoraro
no flags
Joseph Pecoraro
Comment 1 2017-06-30 15:09:17 PDT
Here are the traces for the initial case: [Log] Trace: PageAgent.searchInResources - reset.css performSearch (SearchSidebarPanel.js:284) performSearch (SearchTabContentView.js:88) _searchTextDidChange (Main.js:1272) dispatch (Object.js:170) dispatchEventToListeners (Object.js:177) _handleSearchEvent (SearchBar.js:75) _handleSearchEvent [Log] Trace: PageAgent.searchInResources - reset.css performSearch (SearchSidebarPanel.js:284) focusSearchField (SearchSidebarPanel.js:74) focusSearchField (SearchTabContentView.js:81) focusSearchField And normal case once inside of the sidebar: [Log] Trace: PageAgent.searchInResources - reset.css performSearch (SearchSidebarPanel.js:284) _searchFieldChanged (SearchSidebarPanel.js:309) _searchFieldChanged
Joseph Pecoraro
Comment 2 2017-06-30 15:11:57 PDT
> [Log] Trace: PageAgent.searchInResources - reset.css > performSearch (SearchSidebarPanel.js:284) > focusSearchField (SearchSidebarPanel.js:74) > focusSearchField (SearchTabContentView.js:81) > focusSearchField SearchTabContentView's initialLayout sets this._forcePerformSearch which should not be necessary if the Global Search opened the tab + triggered a search.
Joseph Pecoraro
Comment 3 2017-06-30 15:17:55 PDT
Created attachment 314300 [details] [PATCH] Proposed Fix
Devin Rousso
Comment 4 2017-06-30 15:19:23 PDT
Comment on attachment 314300 [details] [PATCH] Proposed Fix r=me
WebKit Commit Bot
Comment 5 2017-06-30 15:45:11 PDT
Comment on attachment 314300 [details] [PATCH] Proposed Fix Clearing flags on attachment: 314300 Committed r219021: <http://trac.webkit.org/changeset/219021>
WebKit Commit Bot
Comment 6 2017-06-30 15:45:12 PDT
All reviewed patches have been landed. Closing bug.
Jonathan Bedard
Comment 7 2017-06-30 15:45:59 PDT
Note You need to log in before you can comment on or make changes to this bug.