Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Web Inspector: Infos and Debugs buttons don't appear in Console tab u…
…ntil new console messages are displayed rdar://122923625 https://bugs.webkit.org/show_bug.cgi?id=268881 Reviewed by Devin Rousso. The original code hides the Infos and Debugs scope bar items until the console receives the first message coming a non-default channel. Make it so that the Infos and Debugs buttons' visibility syncs with with whether there are messages with those two levels respectively, regardless of what channels the messages came from. Call the Infos and Debugs buttons "conditionally visible" and make a group for their IDs. This way the code controlling their visibility becomes more extendable. Also clean up some unused dead code near the primary changes. * Source/WebInspectorUI/UserInterface/Views/LogContentView.js: (WI.LogContentView.prototype._scopeFromMessageLevel): - The levels Infos and Debugs no longer depend on _hasNonDefaultLogChannelMessage. (WI.LogContentView.prototype._messageAdded): (WI.LogContentView.prototype._logCleared): (WI.LogContentView.prototype._scopeBarSelectionDidChange): (WI.LogContentView.prototype._showOrHideConditionallyVisibleScopeBarItemsAsNeeded): - Show or hide the conditionally-visible buttons as needed. (WI.LogContentView): - In the constructor, hide the newly created Infos and Debugs buttons if they're unselected. (WI.LogContentView.prototype._messageSourceBarSelectionDidChange): (WI.LogContentView.prototype._scopeBarSelectionDidChange): - Clean up unused local variable `items`. Canonical link: https://commits.webkit.org/275914@main
- Loading branch information