Index: third_party/WebKit/Source/devtools/front_end/elements/ElementsSidebarPane.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/ElementsSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/elements/ElementsSidebarPane.js |
index 684b06f570f1d41295edbb5f917e511aff27c9c8..2648624ccf6900788276f8b59e946c23062e7b51 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/elements/ElementsSidebarPane.js |
+++ b/third_party/WebKit/Source/devtools/front_end/elements/ElementsSidebarPane.js |
@@ -1,76 +1,70 @@ |
// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
- |
/** |
- * @constructor |
- * @extends {WebInspector.VBox} |
+ * @unrestricted |
*/ |
-WebInspector.ElementsSidebarPane = function() |
-{ |
- WebInspector.VBox.call(this); |
- this.element.classList.add("flex-none"); |
+WebInspector.ElementsSidebarPane = class extends WebInspector.VBox { |
+ constructor() { |
+ super(); |
+ this.element.classList.add('flex-none'); |
this._computedStyleModel = new WebInspector.ComputedStyleModel(); |
- this._computedStyleModel.addEventListener(WebInspector.ComputedStyleModel.Events.ComputedStyleChanged, this.onCSSModelChanged, this); |
+ this._computedStyleModel.addEventListener( |
+ WebInspector.ComputedStyleModel.Events.ComputedStyleChanged, this.onCSSModelChanged, this); |
this._updateThrottler = new WebInspector.Throttler(100); |
this._updateWhenVisible = false; |
-}; |
+ } |
-WebInspector.ElementsSidebarPane.prototype = { |
- /** |
- * @return {?WebInspector.DOMNode} |
- */ |
- node: function() |
- { |
- return this._computedStyleModel.node(); |
- }, |
+ /** |
+ * @return {?WebInspector.DOMNode} |
+ */ |
+ node() { |
+ return this._computedStyleModel.node(); |
+ } |
- /** |
- * @return {?WebInspector.CSSModel} |
- */ |
- cssModel: function() |
- { |
- return this._computedStyleModel.cssModel(); |
- }, |
+ /** |
+ * @return {?WebInspector.CSSModel} |
+ */ |
+ cssModel() { |
+ return this._computedStyleModel.cssModel(); |
+ } |
- /** |
- * @protected |
- * @return {!Promise.<?>} |
- */ |
- doUpdate: function() |
- { |
- return Promise.resolve(); |
- }, |
- |
- update: function() |
- { |
- this._updateWhenVisible = !this.isShowing(); |
- if (this._updateWhenVisible) |
- return; |
- this._updateThrottler.schedule(innerUpdate.bind(this)); |
+ /** |
+ * @protected |
+ * @return {!Promise.<?>} |
+ */ |
+ doUpdate() { |
+ return Promise.resolve(); |
+ } |
- /** |
- * @return {!Promise.<?>} |
- * @this {WebInspector.ElementsSidebarPane} |
- */ |
- function innerUpdate() |
- { |
- return this.isShowing() ? this.doUpdate() : Promise.resolve(); |
- } |
- }, |
- |
- wasShown: function() |
- { |
- WebInspector.VBox.prototype.wasShown.call(this); |
- if (this._updateWhenVisible) |
- this.update(); |
- }, |
+ update() { |
+ this._updateWhenVisible = !this.isShowing(); |
+ if (this._updateWhenVisible) |
+ return; |
+ this._updateThrottler.schedule(innerUpdate.bind(this)); |
/** |
- * @param {!WebInspector.Event} event |
+ * @return {!Promise.<?>} |
+ * @this {WebInspector.ElementsSidebarPane} |
*/ |
- onCSSModelChanged: function(event) { }, |
+ function innerUpdate() { |
+ return this.isShowing() ? this.doUpdate() : Promise.resolve(); |
+ } |
+ } |
+ |
+ /** |
+ * @override |
+ */ |
+ wasShown() { |
+ super.wasShown(); |
+ if (this._updateWhenVisible) |
+ this.update(); |
+ } |
- __proto__: WebInspector.VBox.prototype |
+ /** |
+ * @param {!WebInspector.Event} event |
+ */ |
+ onCSSModelChanged(event) { |
+ } |
}; |