OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 18 matching lines...) Expand all Loading... |
29 */ | 29 */ |
30 | 30 |
31 /** | 31 /** |
32 * @constructor | 32 * @constructor |
33 * @extends {WebInspector.VBox} | 33 * @extends {WebInspector.VBox} |
34 */ | 34 */ |
35 WebInspector.InspectorView = function() | 35 WebInspector.InspectorView = function() |
36 { | 36 { |
37 WebInspector.VBox.call(this); | 37 WebInspector.VBox.call(this); |
38 WebInspector.Dialog.setModalHostView(this); | 38 WebInspector.Dialog.setModalHostView(this); |
| 39 this.setMinimumSize(new Size(180, 50)); |
39 | 40 |
40 // DevTools sidebar is a vertical split of panels tabbed pane and a drawer. | 41 // DevTools sidebar is a vertical split of panels tabbed pane and a drawer. |
41 this._drawerSplitView = new WebInspector.SplitView(false, true, "Inspector.d
rawerSplitViewState", 200, 200); | 42 this._drawerSplitView = new WebInspector.SplitView(false, true, "Inspector.d
rawerSplitViewState", 200, 200); |
42 this._drawerSplitView.hideSidebar(); | 43 this._drawerSplitView.hideSidebar(); |
43 this._drawerSplitView.enableShowModeSaving(); | 44 this._drawerSplitView.enableShowModeSaving(); |
44 this._drawerSplitView.setSidebarElementConstraints(Preferences.minDrawerHeig
ht, Preferences.minDrawerHeight); | |
45 this._drawerSplitView.setMainElementConstraints(25, 25); | |
46 this._drawerSplitView.show(this.element); | 45 this._drawerSplitView.show(this.element); |
47 | 46 |
48 this._tabbedPane = new WebInspector.TabbedPane(); | 47 this._tabbedPane = new WebInspector.TabbedPane(); |
49 this._tabbedPane.setRetainTabOrder(true, WebInspector.moduleManager.orderCom
parator(WebInspector.Panel, "name", "order")); | 48 this._tabbedPane.setRetainTabOrder(true, WebInspector.moduleManager.orderCom
parator(WebInspector.Panel, "name", "order")); |
50 this._tabbedPane.show(this._drawerSplitView.mainElement()); | 49 this._tabbedPane.show(this._drawerSplitView.mainElement()); |
51 this._drawer = new WebInspector.Drawer(this._drawerSplitView); | 50 this._drawer = new WebInspector.Drawer(this._drawerSplitView); |
52 | 51 |
53 // Patch tabbed pane header with toolbar actions. | 52 // Patch tabbed pane header with toolbar actions. |
54 this._toolbarElement = document.createElement("div"); | 53 this._toolbarElement = document.createElement("div"); |
55 this._toolbarElement.className = "toolbar toolbar-background"; | 54 this._toolbarElement.className = "toolbar toolbar-background"; |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 WebInspector.inspectorView; | 432 WebInspector.inspectorView; |
434 | 433 |
435 /** | 434 /** |
436 * @constructor | 435 * @constructor |
437 * @extends {WebInspector.VBox} | 436 * @extends {WebInspector.VBox} |
438 */ | 437 */ |
439 WebInspector.RootView = function() | 438 WebInspector.RootView = function() |
440 { | 439 { |
441 WebInspector.VBox.call(this); | 440 WebInspector.VBox.call(this); |
442 this.markAsRoot(); | 441 this.markAsRoot(); |
443 this.element.classList.add("fill", "root-view"); | 442 this.element.classList.add("root-view"); |
444 this.element.setAttribute("spellcheck", false); | 443 this.element.setAttribute("spellcheck", false); |
445 window.addEventListener("resize", this.doResize.bind(this), true); | 444 window.addEventListener("resize", this.doResize.bind(this), true); |
446 }; | 445 }; |
447 | 446 |
448 WebInspector.RootView.prototype = { | 447 WebInspector.RootView.prototype = { |
| 448 attachToBody: function() |
| 449 { |
| 450 var overflowDiv = document.body.createChild("div"); |
| 451 overflowDiv.className = "fill"; |
| 452 overflowDiv.style.overflow = "hidden"; |
| 453 this.show(overflowDiv); |
| 454 this.doResize(); |
| 455 }, |
| 456 |
| 457 doResize: function() |
| 458 { |
| 459 var size = this.minimumSize(); |
| 460 var width = Math.max(size.width, window.innerWidth); |
| 461 this.element.style.width = width + "px"; |
| 462 var height = Math.max(size.height, window.innerHeight); |
| 463 this.element.style.height = height + "px"; |
| 464 |
| 465 WebInspector.VBox.prototype.doResize.call(this); |
| 466 }, |
| 467 |
449 __proto__: WebInspector.VBox.prototype | 468 __proto__: WebInspector.VBox.prototype |
450 }; | 469 }; |
OLD | NEW |