Skip to content
Permalink
Browse files
Web Inspector: Critical content browser toolbar buttons are hidden at…
… narrow widths

https://bugs.webkit.org/show_bug.cgi?id=175999

Reviewed by Devin Rousso.

This patch adds a VisibilityPriority concept to NavigationItems. If a
NavigationBar cannot fit all of its items in the available space, items
are hidden to make room, starting with the lowest priority item. Consecutive
dividers are then collapsed, as well as leading and trailing dividers.

* UserInterface/Main.html:
New file.

* UserInterface/Views/CanvasContentView.js:
(WI.CanvasContentView):
* UserInterface/Views/ConsoleDrawer.js:
(WI.ConsoleDrawer):
* UserInterface/Views/ContentBrowser.js:
(WI.ContentBrowser):
* UserInterface/Views/ContentBrowserTabContentView.js:
(WI.ContentBrowserTabContentView):
* UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView):
Set `High` and `Low` priorities, and group the back/forward buttons.

* UserInterface/Views/GroupNavigationItem.js: Added.
(WI.GroupNavigationItem):
(WI.GroupNavigationItem.prototype.get navigationItems):
(WI.GroupNavigationItem.prototype.get minimumWidth):
(WI.GroupNavigationItem.prototype.updateLayout):
(WI.GroupNavigationItem.prototype.didAttach):
(WI.GroupNavigationItem.prototype.didDetach):
NavigationItem groups. Grouped items are shown/hidden together.

* UserInterface/Views/HierarchicalPathNavigationItem.js:
(WI.HierarchicalPathNavigationItem.prototype.updateLayout):
* UserInterface/Views/ImageResourceContentView.js:
(WI.ImageResourceContentView):
* UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
(WI.IndexedDatabaseObjectStoreContentView):
* UserInterface/Views/LogContentView.js:
(WI.LogContentView):
Set `High` and `Low` priorities.

* UserInterface/Views/NavigationBar.css:
(.navigation-bar .item.force-hidden):
New hidden class, which must be tracked separately from ".hidden".
The former is an implementation detail of NavigationBar, while the
latter is set by the client.

* UserInterface/Views/NavigationBar.js:
(WI.NavigationBar.prototype.insertNavigationItem):
(WI.NavigationBar.prototype.removeNavigationItem):
(WI.NavigationBar.prototype.findNavigationItem.matchingSelfOrChild):
(WI.NavigationBar.prototype.findNavigationItem):
(WI.NavigationBar.prototype.layout.forceItemHidden):
(WI.NavigationBar.prototype.layout.isDivider):
(WI.NavigationBar.prototype.layout.calculateVisibleItemWidth):
(WI.NavigationBar.prototype.layout):
(WI.NavigationBar.prototype._calculateMinimumWidth):
(WI.NavigationBar.prototype.get _visibleNavigationItems):
(WI.NavigationBar):

* UserInterface/Views/NavigationItem.js:
Add support for visibility priority, an integer value that determines the
order in which items are hidden when the NavigationBar becomes too narrow
to fit all of items child items. NavigationIte3m defines constants for
Low, Normal (the default), and High priority.

(WI.NavigationItem):
(WI.NavigationItem.prototype.get minimumWidth):
(WI.NavigationItem.prototype.get width):
(WI.NavigationItem.prototype.get visibilityPriority):
(WI.NavigationItem.prototype.set visibilityPriority):
(WI.NavigationItem.prototype.updateLayout):
(WI.NavigationItem.prototype.didAttach):
(WI.NavigationItem.prototype.didDetach):
Encapsulate the setting of the parent NavigationBar. Needed so that
GroupNavigationItem can forward this action to its children.

* UserInterface/Views/NetworkGridContentView.js:
(WI.NetworkGridContentView):
* UserInterface/Views/RadioButtonNavigationItem.js:
(WI.RadioButtonNavigationItem.prototype.updateLayout):
* UserInterface/Views/RecordingContentView.js:
(WI.RecordingContentView):
* UserInterface/Views/ScriptContentView.js:
(WI.ScriptContentView):
* UserInterface/Views/TextContentView.js:
(WI.TextContentView):
* UserInterface/Views/TextResourceContentView.js:
(WI.TextResourceContentView):
* UserInterface/Views/TimelineRecordingContentView.js:
(WI.TimelineRecordingContentView):
* UserInterface/Views/TimelineTabContentView.js:
(WI.TimelineTabContentView):
Set `High` and `Low` priorities, and group Timeline view mode buttons.


Canonical link: https://commits.webkit.org/192765@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221338 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
LuckyKobold committed Aug 30, 2017
1 parent 869f0f7 commit d935bee2861afc94d142e2ad7bf3e26b570e1539
Showing with 345 additions and 26 deletions.
  1. +100 −0 Source/WebInspectorUI/ChangeLog
  2. +1 −0 Source/WebInspectorUI/UserInterface/Main.html
  3. +3 −0 Source/WebInspectorUI/UserInterface/Views/CanvasContentView.js
  4. +1 −0 Source/WebInspectorUI/UserInterface/Views/ConsoleDrawer.js
  5. +3 −2 Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js
  6. +2 −0 Source/WebInspectorUI/UserInterface/Views/ContentBrowserTabContentView.js
  7. +4 −0 Source/WebInspectorUI/UserInterface/Views/DOMTreeContentView.js
  8. +76 −0 Source/WebInspectorUI/UserInterface/Views/GroupNavigationItem.js
  9. +2 −0 Source/WebInspectorUI/UserInterface/Views/HierarchicalPathNavigationItem.js
  10. +1 −0 Source/WebInspectorUI/UserInterface/Views/ImageResourceContentView.js
  11. +1 −0 Source/WebInspectorUI/UserInterface/Views/IndexedDatabaseObjectStoreContentView.js
  12. +3 −0 Source/WebInspectorUI/UserInterface/Views/LogContentView.js
  13. +4 −0 Source/WebInspectorUI/UserInterface/Views/NavigationBar.css
  14. +89 −21 Source/WebInspectorUI/UserInterface/Views/NavigationBar.js
  15. +35 −1 Source/WebInspectorUI/UserInterface/Views/NavigationItem.js
  16. +1 −0 Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.js
  17. +2 −0 Source/WebInspectorUI/UserInterface/Views/RadioButtonNavigationItem.js
  18. +1 −0 Source/WebInspectorUI/UserInterface/Views/RecordingContentView.js
  19. +5 −0 Source/WebInspectorUI/UserInterface/Views/ScriptContentView.js
  20. +3 −0 Source/WebInspectorUI/UserInterface/Views/TextContentView.js
  21. +3 −0 Source/WebInspectorUI/UserInterface/Views/TextResourceContentView.js
  22. +1 −0 Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js
  23. +4 −2 Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js
@@ -1,3 +1,103 @@
2017-08-29 Matt Baker <mattbaker@apple.com>

Web Inspector: Critical content browser toolbar buttons are hidden at narrow widths
https://bugs.webkit.org/show_bug.cgi?id=175999

Reviewed by Devin Rousso.

This patch adds a VisibilityPriority concept to NavigationItems. If a
NavigationBar cannot fit all of its items in the available space, items
are hidden to make room, starting with the lowest priority item. Consecutive
dividers are then collapsed, as well as leading and trailing dividers.

* UserInterface/Main.html:
New file.

* UserInterface/Views/CanvasContentView.js:
(WI.CanvasContentView):
* UserInterface/Views/ConsoleDrawer.js:
(WI.ConsoleDrawer):
* UserInterface/Views/ContentBrowser.js:
(WI.ContentBrowser):
* UserInterface/Views/ContentBrowserTabContentView.js:
(WI.ContentBrowserTabContentView):
* UserInterface/Views/DOMTreeContentView.js:
(WI.DOMTreeContentView):
Set `High` and `Low` priorities, and group the back/forward buttons.

* UserInterface/Views/GroupNavigationItem.js: Added.
(WI.GroupNavigationItem):
(WI.GroupNavigationItem.prototype.get navigationItems):
(WI.GroupNavigationItem.prototype.get minimumWidth):
(WI.GroupNavigationItem.prototype.updateLayout):
(WI.GroupNavigationItem.prototype.didAttach):
(WI.GroupNavigationItem.prototype.didDetach):
NavigationItem groups. Grouped items are shown/hidden together.

* UserInterface/Views/HierarchicalPathNavigationItem.js:
(WI.HierarchicalPathNavigationItem.prototype.updateLayout):
* UserInterface/Views/ImageResourceContentView.js:
(WI.ImageResourceContentView):
* UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
(WI.IndexedDatabaseObjectStoreContentView):
* UserInterface/Views/LogContentView.js:
(WI.LogContentView):
Set `High` and `Low` priorities.

* UserInterface/Views/NavigationBar.css:
(.navigation-bar .item.force-hidden):
New hidden class, which must be tracked separately from ".hidden".
The former is an implementation detail of NavigationBar, while the
latter is set by the client.

* UserInterface/Views/NavigationBar.js:
(WI.NavigationBar.prototype.insertNavigationItem):
(WI.NavigationBar.prototype.removeNavigationItem):
(WI.NavigationBar.prototype.findNavigationItem.matchingSelfOrChild):
(WI.NavigationBar.prototype.findNavigationItem):
(WI.NavigationBar.prototype.layout.forceItemHidden):
(WI.NavigationBar.prototype.layout.isDivider):
(WI.NavigationBar.prototype.layout.calculateVisibleItemWidth):
(WI.NavigationBar.prototype.layout):
(WI.NavigationBar.prototype._calculateMinimumWidth):
(WI.NavigationBar.prototype.get _visibleNavigationItems):
(WI.NavigationBar):

* UserInterface/Views/NavigationItem.js:
Add support for visibility priority, an integer value that determines the
order in which items are hidden when the NavigationBar becomes too narrow
to fit all of items child items. NavigationIte3m defines constants for
Low, Normal (the default), and High priority.

(WI.NavigationItem):
(WI.NavigationItem.prototype.get minimumWidth):
(WI.NavigationItem.prototype.get width):
(WI.NavigationItem.prototype.get visibilityPriority):
(WI.NavigationItem.prototype.set visibilityPriority):
(WI.NavigationItem.prototype.updateLayout):
(WI.NavigationItem.prototype.didAttach):
(WI.NavigationItem.prototype.didDetach):
Encapsulate the setting of the parent NavigationBar. Needed so that
GroupNavigationItem can forward this action to its children.

* UserInterface/Views/NetworkGridContentView.js:
(WI.NetworkGridContentView):
* UserInterface/Views/RadioButtonNavigationItem.js:
(WI.RadioButtonNavigationItem.prototype.updateLayout):
* UserInterface/Views/RecordingContentView.js:
(WI.RecordingContentView):
* UserInterface/Views/ScriptContentView.js:
(WI.ScriptContentView):
* UserInterface/Views/TextContentView.js:
(WI.TextContentView):
* UserInterface/Views/TextResourceContentView.js:
(WI.TextResourceContentView):
* UserInterface/Views/TimelineRecordingContentView.js:
(WI.TimelineRecordingContentView):
* UserInterface/Views/TimelineTabContentView.js:
(WI.TimelineTabContentView):
Set `High` and `Low` priorities, and group Timeline view mode buttons.

2017-08-29 Joseph Pecoraro <pecoraro@apple.com>

REGRESSION(r220235): Web Inspector: Global search should not happen incrementally
@@ -467,6 +467,7 @@
<script src="Views/DetailsSidebarPanel.js"></script>
<script src="Views/GeneralTabBarItem.js"></script>
<script src="Views/GeneralTreeElement.js"></script>
<script src="Views/GroupNavigationItem.js"></script>
<script src="Views/NavigationSidebarPanel.js"></script>
<script src="Views/PinnedTabBarItem.js"></script>
<script src="Views/ResourceContentView.js"></script>
@@ -41,14 +41,17 @@ WI.CanvasContentView = class CanvasContentView extends WI.ContentView
const toolTip = WI.UIString("Request recording of actions. Shift-click to record a single frame.");
const altToolTip = WI.UIString("Cancel recording");
this._recordButtonNavigationItem = new WI.ToggleButtonNavigationItem("canvas-record", toolTip, altToolTip, "Images/Record.svg", "Images/Stop.svg", 13, 13);
this._recordButtonNavigationItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.High;
this._recordButtonNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, this._toggleRecording, this);
}

this._refreshButtonNavigationItem = new WI.ButtonNavigationItem("canvas-refresh", WI.UIString("Refresh"), "Images/ReloadFull.svg", 13, 13);
this._refreshButtonNavigationItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.Low;
this._refreshButtonNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, this._showPreview, this);

this._showGridButtonNavigationItem = new WI.ActivateButtonNavigationItem("show-grid", WI.UIString("Show Grid"), WI.UIString("Hide Grid"), "Images/NavigationItemCheckers.svg", 13, 13);
this._showGridButtonNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, this._showGridButtonClicked, this);
this._showGridButtonNavigationItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.Low;
this._showGridButtonNavigationItem.activated = !!WI.settings.showImageGrid.value;
}

@@ -39,6 +39,7 @@ WI.ConsoleDrawer = class ConsoleDrawer extends WI.ContentBrowser
this.navigationBar.element.addEventListener("mousedown", this._consoleResizerMouseDown.bind(this));

this._toggleDrawerButton = new WI.ToggleButtonNavigationItem("toggle-drawer", WI.UIString("Hide Console"), WI.UIString("Show Console"), "Images/HideConsoleDrawer.svg", "Images/ShowConsoleDrawer.svg");
this._toggleDrawerButton.visibilityPriority = WI.NavigationItem.VisibilityPriority.High;
this._toggleDrawerButton.addEventListener(WI.ButtonNavigationItem.Event.Clicked, () => { WI.toggleSplitConsole(); });
this.navigationBar.insertNavigationItem(this._toggleDrawerButton, 0);

@@ -57,12 +57,13 @@ WI.ContentBrowser = class ContentBrowser extends WI.View
this._backNavigationItem = new WI.ButtonNavigationItem("back", WI.UIString("Back (%s)").format(this._backKeyboardShortcut.displayName), backButtonImage, 8, 13);
this._backNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, goBack);
this._backNavigationItem.enabled = false;
this._navigationBar.addNavigationItem(this._backNavigationItem);

this._forwardNavigationItem = new WI.ButtonNavigationItem("forward", WI.UIString("Forward (%s)").format(this._forwardKeyboardShortcut.displayName), forwardButtonImage, 8, 13);
this._forwardNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, goForward);
this._forwardNavigationItem.enabled = false;
this._navigationBar.addNavigationItem(this._forwardNavigationItem);

let navigationButtonsGroup = new WI.GroupNavigationItem([this._backNavigationItem, this._forwardNavigationItem]);
this._navigationBar.addNavigationItem(navigationButtonsGroup);

this._navigationBar.addNavigationItem(new WI.DividerNavigationItem);
}
@@ -56,6 +56,7 @@ WI.ContentBrowserTabContentView = class ContentBrowserTabContentView extends WI.
this._showNavigationSidebarItem = new WI.ActivateButtonNavigationItem("toggle-navigation-sidebar", showToolTip, hideToolTip, image, 16, 16);
this._showNavigationSidebarItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, WI.toggleNavigationSidebar, WI);
this._showNavigationSidebarItem.activated = !WI.navigationSidebar.collapsed;
this._showNavigationSidebarItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.High;

this._contentBrowser.navigationBar.insertNavigationItem(this._showNavigationSidebarItem, 0);
this._contentBrowser.navigationBar.insertNavigationItem(new WI.DividerNavigationItem, 1);
@@ -72,6 +73,7 @@ WI.ContentBrowserTabContentView = class ContentBrowserTabContentView extends WI.
this._showDetailsSidebarItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, WI.toggleDetailsSidebar, WI);
this._showDetailsSidebarItem.activated = !WI.detailsSidebar.collapsed;
this._showDetailsSidebarItem.enabled = false;
this._showDetailsSidebarItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.High;

this._contentBrowser.navigationBar.addNavigationItem(new WI.DividerNavigationItem);
this._contentBrowser.navigationBar.addNavigationItem(this._showDetailsSidebarItem);
@@ -34,21 +34,25 @@ WI.DOMTreeContentView = class DOMTreeContentView extends WI.ContentView
this._compositingBordersButtonNavigationItem = new WI.ActivateButtonNavigationItem("layer-borders", WI.UIString("Show compositing borders"), WI.UIString("Hide compositing borders"), "Images/LayerBorders.svg", 13, 13);
this._compositingBordersButtonNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, this._toggleCompositingBorders, this);
this._compositingBordersButtonNavigationItem.enabled = !!PageAgent.getCompositingBordersVisible;
this._compositingBordersButtonNavigationItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.Low;

WI.showPaintRectsSetting.addEventListener(WI.Setting.Event.Changed, this._showPaintRectsSettingChanged, this);
this._paintFlashingButtonNavigationItem = new WI.ActivateButtonNavigationItem("paint-flashing", WI.UIString("Enable paint flashing"), WI.UIString("Disable paint flashing"), "Images/Paint.svg", 16, 16);
this._paintFlashingButtonNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, this._togglePaintFlashing, this);
this._paintFlashingButtonNavigationItem.enabled = !!PageAgent.setShowPaintRects;
this._paintFlashingButtonNavigationItem.activated = PageAgent.setShowPaintRects && WI.showPaintRectsSetting.value;
this._paintFlashingButtonNavigationItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.Low;

WI.showShadowDOMSetting.addEventListener(WI.Setting.Event.Changed, this._showShadowDOMSettingChanged, this);
this._showsShadowDOMButtonNavigationItem = new WI.ActivateButtonNavigationItem("shows-shadow-DOM", WI.UIString("Show shadow DOM nodes"), WI.UIString("Hide shadow DOM nodes"), "Images/ShadowDOM.svg", 13, 13);
this._showsShadowDOMButtonNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, this._toggleShowsShadowDOMSetting, this);
this._showsShadowDOMButtonNavigationItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.Low;
this._showShadowDOMSettingChanged();

WI.showPrintStylesSetting.addEventListener(WI.Setting.Event.Changed, this._showPrintStylesSettingChanged, this);
this._showPrintStylesButtonNavigationItem = new WI.ActivateButtonNavigationItem("print-styles", WI.UIString("Force Print Media Styles"), WI.UIString("Use Default Media Styles"), "Images/Printer.svg", 16, 16);
this._showPrintStylesButtonNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, this._togglePrintStylesSetting, this);
this._showPrintStylesButtonNavigationItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.Low;
this._showPrintStylesSettingChanged();

this.element.classList.add("dom-tree");
@@ -0,0 +1,76 @@
/*
* Copyright (C) 2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/

WI.GroupNavigationItem = class GroupNavigationItem extends WI.NavigationItem
{
constructor(navigationItems)
{
console.assert(Array.isArray(navigationItems));

super();

this._navigationItems = navigationItems;

for (let item of this._navigationItems) {
console.assert(item instanceof WI.NavigationItem);
this.element.appendChild(item.element);
}
}

// Public

get navigationItems() { return this._navigationItems; }

get minimumWidth()
{
return this._navigationItems.reduce((total, item) => total + item.minimumWidth, 0);
}

// Protected

updateLayout(expandOnly)
{
super.updateLayout(expandOnly);

for (let item of this._navigationItems)
item.updateLayout(expandOnly);
}

didAttach(navigationBar)
{
super.didAttach(navigationBar);

for (let item of this._navigationItems)
item.didAttach(navigationBar);
}

didDetach()
{
for (let item of this._navigationItems)
item.didDetach();

super.didDetach();
}
}
@@ -100,6 +100,8 @@ WI.HierarchicalPathNavigationItem = class HierarchicalPathNavigationItem extends

updateLayout(expandOnly)
{
super.updateLayout(expandOnly);

var navigationBar = this.parentNavigationBar;
if (!navigationBar)
return;
@@ -34,6 +34,7 @@ WI.ImageResourceContentView = class ImageResourceContentView extends WI.Resource
const toolTip = WI.UIString("Show Grid");
const activatedToolTip = WI.UIString("Hide Grid");
this._showGridButtonNavigationItem = new WI.ActivateButtonNavigationItem("show-grid", toolTip, activatedToolTip, "Images/NavigationItemCheckers.svg", 13, 13);
this._showGridButtonNavigationItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.Low;
this._showGridButtonNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, this._showGridButtonClicked, this);
this._showGridButtonNavigationItem.activated = !!WI.settings.showImageGrid.value;
}
@@ -81,6 +81,7 @@ WI.IndexedDatabaseObjectStoreContentView = class IndexedDatabaseObjectStoreConte
this._refreshButtonNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, this._refreshButtonClicked, this);

this._clearButtonNavigationItem = new WI.ButtonNavigationItem("indexed-database-object-store-clear", WI.UIString("Clear object store"), "Images/NavigationItemTrash.svg", 15, 15);
this._clearButtonNavigationItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.Low;
this._clearButtonNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, this._clearButtonClicked, this);
}

@@ -77,12 +77,15 @@ WI.LogContentView = class LogContentView extends WI.ContentView
this._scopeBar.addEventListener(WI.ScopeBar.Event.SelectionChanged, this._scopeBarSelectionDidChange, this);

this._garbageCollectNavigationItem = new WI.ButtonNavigationItem("clear-log", WI.UIString("Collect garbage"), "Images/NavigationItemGarbageCollect.svg", 16, 16);
this._garbageCollectNavigationItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.Low;
this._garbageCollectNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, this._garbageCollect, this);

this._clearLogNavigationItem = new WI.ButtonNavigationItem("clear-log", WI.UIString("Clear log (%s or %s)").format(WI.clearKeyboardShortcut.displayName, this._logViewController.messagesAlternateClearKeyboardShortcut.displayName), "Images/NavigationItemClear.svg", 16, 16);
this._clearLogNavigationItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.Low;
this._clearLogNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, this._clearLog, this);

this._showConsoleTabNavigationItem = new WI.ButtonNavigationItem("show-tab", WI.UIString("Show Console tab"), "Images/SplitToggleUp.svg", 16, 16);
this._showConsoleTabNavigationItem.visibilityPriority = WI.NavigationItem.VisibilityPriority.High;
this._showConsoleTabNavigationItem.addEventListener(WI.ButtonNavigationItem.Event.Clicked, this._showConsoleTab, this);

this.messagesElement.addEventListener("contextmenu", this._handleContextMenuEvent.bind(this), false);
@@ -47,3 +47,7 @@
height: auto;
outline: none;
}

.navigation-bar .item.force-hidden {
display: none;
}

0 comments on commit d935bee

Please sign in to comment.