| Index: third_party/WebKit/Source/devtools/front_end/ui/RootView.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/ui/RootView.js b/third_party/WebKit/Source/devtools/front_end/ui/RootView.js
|
| index 9b29e978827d4270e96b7e035a35dfbfaae64d1f..15f2b86298944a2fc3872ce43cb43e6505f8e4fd 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/ui/RootView.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/ui/RootView.js
|
| @@ -1,44 +1,40 @@
|
| // Copyright 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.RootView = function()
|
| -{
|
| - WebInspector.VBox.call(this);
|
| +WebInspector.RootView = class extends WebInspector.VBox {
|
| + constructor() {
|
| + super();
|
| this.markAsRoot();
|
| - this.element.classList.add("root-view");
|
| - this.registerRequiredCSS("ui/rootView.css");
|
| - this.element.setAttribute("spellcheck", false);
|
| -};
|
| -
|
| -WebInspector.RootView.prototype = {
|
| - /**
|
| - * @param {!Document} document
|
| - */
|
| - attachToDocument: function(document)
|
| - {
|
| - document.defaultView.addEventListener("resize", this.doResize.bind(this), false);
|
| - this._window = document.defaultView;
|
| - this.doResize();
|
| - this.show(/** @type {!Element} */ (document.body));
|
| - },
|
| + this.element.classList.add('root-view');
|
| + this.registerRequiredCSS('ui/rootView.css');
|
| + this.element.setAttribute('spellcheck', false);
|
| + }
|
|
|
| - doResize: function()
|
| - {
|
| - if (this._window) {
|
| - var size = this.constraints().minimum;
|
| - var zoom = WebInspector.zoomManager.zoomFactor();
|
| - var right = Math.min(0, this._window.innerWidth - size.width / zoom);
|
| - this.element.style.marginRight = right + "px";
|
| - var bottom = Math.min(0, this._window.innerHeight - size.height / zoom);
|
| - this.element.style.marginBottom = bottom + "px";
|
| - }
|
| - WebInspector.VBox.prototype.doResize.call(this);
|
| - },
|
| + /**
|
| + * @param {!Document} document
|
| + */
|
| + attachToDocument(document) {
|
| + document.defaultView.addEventListener('resize', this.doResize.bind(this), false);
|
| + this._window = document.defaultView;
|
| + this.doResize();
|
| + this.show(/** @type {!Element} */ (document.body));
|
| + }
|
|
|
| - __proto__: WebInspector.VBox.prototype
|
| + /**
|
| + * @override
|
| + */
|
| + doResize() {
|
| + if (this._window) {
|
| + var size = this.constraints().minimum;
|
| + var zoom = WebInspector.zoomManager.zoomFactor();
|
| + var right = Math.min(0, this._window.innerWidth - size.width / zoom);
|
| + this.element.style.marginRight = right + 'px';
|
| + var bottom = Math.min(0, this._window.innerHeight - size.height / zoom);
|
| + this.element.style.marginBottom = bottom + 'px';
|
| + }
|
| + super.doResize();
|
| + }
|
| };
|
|
|