| 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(180, 72); | 39 this.setConstraints(180, 72); |
| 40 | 40 |
| 41 // 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. |
| 42 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); |
| 43 this._drawerSplitView.hideSidebar(); | 43 this._drawerSplitView.hideSidebar(); |
| 44 this._drawerSplitView.enableShowModeSaving(); | 44 this._drawerSplitView.enableShowModeSaving(); |
| 45 this._drawerSplitView.show(this.element); | 45 this._drawerSplitView.show(this.element); |
| 46 | 46 |
| 47 this._tabbedPane = new WebInspector.TabbedPane(); | 47 this._tabbedPane = new WebInspector.TabbedPane(); |
| 48 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")); |
| 49 this._tabbedPane.show(this._drawerSplitView.mainElement()); | 49 this._tabbedPane.show(this._drawerSplitView.mainElement()); |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 { | 488 { |
| 489 // If we didn't have enough space at the start, we may have wrong scroll
offsets. | 489 // If we didn't have enough space at the start, we may have wrong scroll
offsets. |
| 490 if (document.body.scrollTop !== 0) | 490 if (document.body.scrollTop !== 0) |
| 491 document.body.scrollTop = 0; | 491 document.body.scrollTop = 0; |
| 492 if (document.body.scrollLeft !== 0) | 492 if (document.body.scrollLeft !== 0) |
| 493 document.body.scrollLeft = 0; | 493 document.body.scrollLeft = 0; |
| 494 }, | 494 }, |
| 495 | 495 |
| 496 doResize: function() | 496 doResize: function() |
| 497 { | 497 { |
| 498 var size = this.minimumSize(); | 498 var size = this.constraints().minimum; |
| 499 var right = Math.min(0, window.innerWidth - size.width); | 499 var right = Math.min(0, window.innerWidth - size.width); |
| 500 this.element.style.right = right + "px"; | 500 this.element.style.right = right + "px"; |
| 501 var bottom = Math.min(0, window.innerHeight - size.height); | 501 var bottom = Math.min(0, window.innerHeight - size.height); |
| 502 this.element.style.bottom = bottom + "px"; | 502 this.element.style.bottom = bottom + "px"; |
| 503 | 503 |
| 504 if (window.innerWidth < size.width || window.innerHeight < size.height) | 504 if (window.innerWidth < size.width || window.innerHeight < size.height) |
| 505 window.addEventListener("scroll", this._onScrollBound, false); | 505 window.addEventListener("scroll", this._onScrollBound, false); |
| 506 else | 506 else |
| 507 window.removeEventListener("scroll", this._onScrollBound, false); | 507 window.removeEventListener("scroll", this._onScrollBound, false); |
| 508 | 508 |
| 509 WebInspector.VBox.prototype.doResize.call(this); | 509 WebInspector.VBox.prototype.doResize.call(this); |
| 510 this._onScroll(); | 510 this._onScroll(); |
| 511 }, | 511 }, |
| 512 | 512 |
| 513 __proto__: WebInspector.VBox.prototype | 513 __proto__: WebInspector.VBox.prototype |
| 514 }; | 514 }; |
| OLD | NEW |