Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(818)

Unified Diff: third_party/WebKit/Source/devtools/front_end/elements/ElementsPanel.js

Issue 2915233002: DevTools: jsdoc for showToolbarPane in Elements (Closed)
Patch Set: ac Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698