WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
181255
Web Inspector: Find banner sometimes does not work (when already populated and shown for first time on resource)
https://bugs.webkit.org/show_bug.cgi?id=181255
Summary
Web Inspector: Find banner sometimes does not work (when already populated an...
Joseph Pecoraro
Reported
2018-01-03 12:30:40 PST
Find banner sometimes does not work (when already populated and shown for first time on resource) Steps to Reproduce: 1. Inspect webkit.org 2. Show Debugger tab 3. Select "global.js" 4. Show Find Banner (⌘F) 5. Search for "document" => 3 results 6. Reload the page (⌘R) 7. Select global.js again if needed 8. Show Find Banner (⌘F) => Already populated with "document" 9. Hit Enter => No results Notes: - ContentBrowser owns the FindBanner and applies it to whatever ContentView it is showing - When a ContentBrowser opens a TextContentView* for Resource A (1) TextContentView triggers Load Content of Resource A => NetworkAgent.getResponseBody / Debugger.getScriptSource (2) ContentBrowser triggers Perform Search with existing FindBanner value => Page.searchInResource / Debugger.searchInContent While these execute on the backend serially, the result for getting the content body goes through multiple microtask loops. So (1) might be processed in the TextEditor after we attempt to process (2).
Attachments
[PATCH] Proposed Fix
(2.71 KB, patch)
2018-01-03 12:41 PST
,
Joseph Pecoraro
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Joseph Pecoraro
Comment 1
2018-01-03 12:30:48 PST
<
rdar://problem/36248855
>
Joseph Pecoraro
Comment 2
2018-01-03 12:36:37 PST
ContentBrowser just does: 1. Open ContentView 2. ContentView.performSearch(query) And here, text based ContentViews does asynchronous work in both of these: 1.1 Load Content from backend 2.1 Search Content on backend --- So really, this can be a problem with automatically performing a search on any content view that loads its content asynchronously. In practice I think that is really only the content views containing a TextEditor, and those proxy the searching to TextEditor. So for now, I'm just going to make TextEditor defer the search until it has loaded its initial content. Ensuring that when it does the search it should be able to show the results. This also might have a minor perf win to avoid performing searches on resources every time you select them, even if the find banner is not visible. --- We also appear to have an issue where ⌘E / ⌘G doesn't work unless the FindBanner is visible, which will be a separate bug.
Joseph Pecoraro
Comment 3
2018-01-03 12:41:06 PST
Created
attachment 330411
[details]
[PATCH] Proposed Fix
Matt Baker
Comment 4
2018-01-03 16:41:33 PST
Comment on
attachment 330411
[details]
[PATCH] Proposed Fix r=me
WebKit Commit Bot
Comment 5
2018-01-03 16:46:56 PST
Comment on
attachment 330411
[details]
[PATCH] Proposed Fix Clearing flags on attachment: 330411 Committed
r226380
: <
https://trac.webkit.org/changeset/226380
>
WebKit Commit Bot
Comment 6
2018-01-03 16:46:57 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug