Index: third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js b/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js |
index 1ef85041267ccddc1b51ff1f402d5f812664f027..dfdab46c1dc9d731f4517f572fb2c9f1ebd727ac 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js |
+++ b/third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js |
@@ -68,7 +68,14 @@ Elements.ElementsPanel = class extends UI.Panel { |
this._breadcrumbs.show(crumbsContainer); |
this._breadcrumbs.addEventListener(Elements.ElementsBreadcrumbs.Events.NodeSelected, this._crumbNodeSelected, this); |
+ /** @type {?UI.Widget} */ |
this._currentToolbarPane = null; |
+ /** @type {?UI.Widget} */ |
+ this._animatedToolbarPane = null; |
+ /** @type {?UI.Widget} */ |
+ this._pendingWidget = null; |
+ /** @type {?UI.ToolbarToggle} */ |
+ this._pendingWidgetToggle = null; |
this._stylesWidget = new Elements.StylesSidebarPane(); |
this._computedStyleWidget = new Elements.ComputedStyleWidget(); |
@@ -141,14 +148,14 @@ Elements.ElementsPanel = class extends UI.Panel { |
/** |
* @param {?UI.Widget} widget |
- * @param {!UI.ToolbarToggle=} toggle |
+ * @param {?UI.ToolbarToggle} toggle |
*/ |
showToolbarPane(widget, toggle) { |
if (this._pendingWidgetToggle) |
this._pendingWidgetToggle.setToggled(false); |
this._pendingWidgetToggle = toggle; |
- if (this._animatedToolbarPane !== undefined) |
+ if (this._animatedToolbarPane) |
this._pendingWidget = widget; |
else |
this._startToolbarPaneAnimation(widget); |
@@ -198,11 +205,11 @@ Elements.ElementsPanel = class extends UI.Panel { |
this._currentToolbarPane = this._animatedToolbarPane; |
if (this._currentToolbarPane) |
this._currentToolbarPane.focus(); |
- delete this._animatedToolbarPane; |
+ this._animatedToolbarPane = null; |
- if (this._pendingWidget !== undefined) { |
+ if (this._pendingWidget) { |
this._startToolbarPaneAnimation(this._pendingWidget); |
- delete this._pendingWidget; |
+ this._pendingWidget = null; |
} |
} |
} |
@@ -831,7 +838,7 @@ Elements.ElementsPanel = class extends UI.Panel { |
} |
this._splitWidget.setVertical(this._splitMode === Elements.ElementsPanel._splitMode.Vertical); |
- this.showToolbarPane(null); |
+ this.showToolbarPane(null /* widget */, null /* toggle */); |
var matchedStylesContainer = new UI.VBox(); |
matchedStylesContainer.element.appendChild(this._stylesSidebarToolbar); |