RESOLVED FIXED 199594
Web Inspector: Elements: always show all navigation bar items, but disable those that wouldn't work
https://bugs.webkit.org/show_bug.cgi?id=199594
Summary Web Inspector: Elements: always show all navigation bar items, but disable th...
Devin Rousso
Reported 2019-07-08 15:32:55 PDT
Instead of only showing icons for functionality that is supported by the inspected target, we should always show all of the icons and just disable the ones that wouldn't work.
Attachments
Patch (16.35 KB, patch)
2019-07-11 11:53 PDT, Devin Rousso
no flags
Patch (16.35 KB, patch)
2019-07-12 14:46 PDT, Devin Rousso
no flags
Devin Rousso
Comment 1 2019-07-11 11:53:43 PDT
Ross Kirsling
Comment 2 2019-07-12 14:17:59 PDT
Comment on attachment 373934 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=373934&action=review > Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js:36 > + this._compositingBordersButtonNavigationItem.enabled = InspectorBackend.domains.Page; Did you mean to drop the existing condition? > this._compositingBordersButtonNavigationItem.enabled = InspectorBackend.domains.Page && !!InspectorBackend.domains.Page.getCompositingBordersVisible;
Devin Rousso
Comment 3 2019-07-12 14:36:46 PDT
Comment on attachment 373934 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=373934&action=review >> Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js:36 >> + this._compositingBordersButtonNavigationItem.enabled = InspectorBackend.domains.Page; > > Did you mean to drop the existing condition? No, but I do need to add a `!!`. The idea is that we only want to enable this button if the target has a `PageAgent`. `Page.getCompositingBordersVisible` exists for all supported iOS inspection targets, so we don't need a more specific compatibility check than that.
Ross Kirsling
Comment 4 2019-07-12 14:38:59 PDT
(In reply to Devin Rousso from comment #3) > Comment on attachment 373934 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=373934&action=review > > >> Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js:36 > >> + this._compositingBordersButtonNavigationItem.enabled = InspectorBackend.domains.Page; > > > > Did you mean to drop the existing condition? > > No, but I do need to add a `!!`. The idea is that we only want to enable > this button if the target has a `PageAgent`. > `Page.getCompositingBordersVisible` exists for all supported iOS inspection > targets, so we don't need a more specific compatibility check than that. Ahh, I'm now seeing the correspondence with your // COMPATIBILITY comments. :)
Ross Kirsling
Comment 5 2019-07-12 14:40:52 PDT
Comment on attachment 373934 [details] Patch r=me with that tiny update then :)
Devin Rousso
Comment 6 2019-07-12 14:46:04 PDT
WebKit Commit Bot
Comment 7 2019-07-12 16:09:58 PDT
Comment on attachment 374037 [details] Patch Clearing flags on attachment: 374037 Committed r247405: <https://trac.webkit.org/changeset/247405>
WebKit Commit Bot
Comment 8 2019-07-12 16:09:59 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 9 2019-07-12 16:17:29 PDT
Note You need to log in before you can comment on or make changes to this bug.