| Summary: | REGRESSION(r253759): Web Inspector: Audits: results folder doesn't get selected by pressing Arrow Down key | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Nikita Vasilyev <nvasilyev> | ||||
| Component: | Web Inspector | Assignee: | Devin Rousso <hi> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | commit-queue, hi, inspector-bugzilla-changes, timothy, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Attachments: |
|
||||||
|
Description
Nikita Vasilyev
2020-03-05 17:21:12 PST
A combination of a couple of odd things cause this bug. _dispatchSelectionDidChangeEvent gets called twice. First time from SelectionController: _dispatchSelectionDidChangeEvent (TreeOutline.js:1131) selectionControllerSelectionDidChange (TreeOutline.js:811) _updateSelectedItems (SelectionController.js:392) selectItem (SelectionController.js:97) _selectItemsFromArrowKey (SelectionController.js:334) handleKeyDown (SelectionController.js:229) _treeKeyDown (TreeOutline.js:669) _treeKeyDown Second time directly from TreeOutline: _dispatchSelectionDidChangeEvent (TreeOutline.js:1131) selectTreeElementInternal (TreeOutline.js:897) select (TreeElement.js:542) _treeKeyDown (TreeOutline.js:682) _treeKeyDown The second call results in ContentViewContainer.prototype.showDefaultContentView: showDefaultContentView (AuditNavigationSidebarPanel.js:71) _treeSelectionDidChange (AuditNavigationSidebarPanel.js:287) dispatch (Object.js:165) dispatchEventToListeners (Object.js:172) _dispatchSelectionDidChangeEvent (TreeOutline.js:1139) selectTreeElementInternal (TreeOutline.js:897) select (TreeElement.js:542) _treeKeyDown (TreeOutline.js:682) _treeKeyDown Which resets treeElement selection. Thus this bug happens. This broken more than 6 weeks ago. My recent AXI changes had nothing to do with it. Works in r255037 Broken in r252338 http://trac.webkit.org/log/trunk/?mode=follow_copy&rev=255037&stop_rev=252338 A lot of builds in this range are broken so I'm stopping bisecting for now. This broke in Bug 205435 - Web Inspector: Audit: exiting edit mode with the same selection as before entering edit mode doesn't reselect https://trac.webkit.org/changeset/253759/webkit Created attachment 392743 [details]
Patch
Comment on attachment 392743 [details]
Patch
I think it's fine to duct tape this for now. Ultimately, when allowsRepeatSelection is true, WI.TreeOutline.Event.SelectionDidChange shouldn't fire twice when selection only changes once.
Comment on attachment 392743 [details] Patch Clearing flags on attachment: 392743 Committed r258246: <https://trac.webkit.org/changeset/258246> All reviewed patches have been landed. Closing bug. |