1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 * @extends {WebInspector.VBox}
9 WebInspector.RootView = function()
11 WebInspector.VBox.call(this);
13 this.element.classList.add("root-view");
14 this.element.setAttribute("spellcheck", false);
15 window.addEventListener("resize", this.doResize.bind(this), false);
18 WebInspector.RootView.prototype = {
19 attachToBody: function()
22 this.show(document.body);
27 var size = this.constraints().minimum;
28 var zoom = WebInspector.zoomManager.zoomFactor();
29 var right = Math.min(0, window.innerWidth - size.width / zoom);
30 this.element.style.marginRight = right + "px";
31 var bottom = Math.min(0, window.innerHeight - size.height / zoom);
32 this.element.style.marginBottom = bottom + "px";
33 WebInspector.VBox.prototype.doResize.call(this);
36 __proto__: WebInspector.VBox.prototype