Changeset 261198 in webkit


Ignore:
Timestamp:
May 5, 2020 2:01:27 PM (4 years ago)
Author:
Devin Rousso
Message:

Web Inspector: the divider before the console message icons in the tab bar is shown even if there are no other icons
https://bugs.webkit.org/show_bug.cgi?id=211390

Reviewed by Brian Burg.

  • UserInterface/Base/Main.js:

(WI._updateTabBarDividers):
(WI._updateTabBarDividers.isHidden): Added.
If the various WI.ButtonNavigationItem aren't actually created, then the optional chain
will return undefined instead of the desired true when checking whether it is hidden.
Effectively, a WI.ButtonNavigationItem that does not exist should be considered hidden.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r261197 r261198  
     12020-05-05  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: the divider before the console message icons in the tab bar is shown even if there are no other icons
     4        https://bugs.webkit.org/show_bug.cgi?id=211390
     5
     6        Reviewed by Brian Burg.
     7
     8        * UserInterface/Base/Main.js:
     9        (WI._updateTabBarDividers):
     10        (WI._updateTabBarDividers.isHidden): Added.
     11        If the various `WI.ButtonNavigationItem` aren't actually created, then the optional chain
     12        will return `undefined` instead of the desired `true` when checking whether it is `hidden`.
     13        Effectively, a `WI.ButtonNavigationItem` that does not exist should be considered `hidden`.
     14
    1152020-05-05  Devin Rousso  <drousso@apple.com>
    216
  • trunk/Source/WebInspectorUI/UserInterface/Base/Main.js

    r261103 r261198  
    24162416WI._updateTabBarDividers = function()
    24172417{
    2418     let closeHidden = WI._closeTabBarButton?.hidden;
    2419     let dockToSideHidden = WI._dockToSideTabBarButton?.hidden;
    2420     let dockBottomHidden = WI._dockBottomTabBarButton?.hidden;
    2421     let undockHidden = WI._undockTabBarButton?.hidden;
    2422 
    2423     let inspectModeHidden = WI._inspectModeTabBarButton.hidden;
    2424     let deviceSettingsHidden = WI._deviceSettingsTabBarButton && WI._deviceSettingsTabBarButton.hidden;
    2425     let reloadHidden = WI._reloadTabBarButton && WI._reloadTabBarButton.hidden;
    2426     let downloadHidden = WI._downloadTabBarButton && WI._downloadTabBarButton.hidden;
     2418    function isHidden(navigationItem) {
     2419        return !navigationItem || navigationItem.hidden;
     2420    }
     2421
     2422    let closeHidden = isHidden(WI._closeTabBarButton);
     2423    let dockToSideHidden = isHidden(WI._dockToSideTabBarButton);
     2424    let dockBottomHidden = isHidden(WI._dockBottomTabBarButton);
     2425    let undockHidden = isHidden(WI._undockTabBarButton);
     2426
     2427    let inspectModeHidden = isHidden(WI._inspectModeTabBarButton);
     2428    let deviceSettingsHidden = isHidden(WI._deviceSettingsTabBarButton);
     2429    let reloadHidden = isHidden(WI._reloadTabBarButton);
     2430    let downloadHidden = isHidden(WI._downloadTabBarButton);
    24272431
    24282432    let warningsHidden = WI._consoleWarningsTabBarButton.hidden;
Note: See TracChangeset for help on using the changeset viewer.