OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> | 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> |
4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
960 vertically = true; | 960 vertically = true; |
961 else | 961 else |
962 vertically = WebInspector.inspectorView.element.offsetWidth < 680; | 962 vertically = WebInspector.inspectorView.element.offsetWidth < 680; |
963 | 963 |
964 if (this.sidebarPaneView && vertically === !this._splitWidget.isVertical
()) | 964 if (this.sidebarPaneView && vertically === !this._splitWidget.isVertical
()) |
965 return; | 965 return; |
966 | 966 |
967 if (this.sidebarPaneView && this.sidebarPaneView.shouldHideOnDetach()) | 967 if (this.sidebarPaneView && this.sidebarPaneView.shouldHideOnDetach()) |
968 return; // We can't reparent extension iframes. | 968 return; // We can't reparent extension iframes. |
969 | 969 |
| 970 var selectedTabId = this.sidebarPaneView ? this.sidebarPaneView.selected
TabId : null; |
| 971 |
970 var extensionSidebarPanes = WebInspector.extensionServer.sidebarPanes(); | 972 var extensionSidebarPanes = WebInspector.extensionServer.sidebarPanes(); |
971 if (this.sidebarPaneView) { | 973 if (this.sidebarPaneView) { |
972 this.sidebarPaneView.detach(); | 974 this.sidebarPaneView.detach(); |
973 this._splitWidget.uninstallResizer(this.sidebarPaneView.headerElemen
t()); | 975 this._splitWidget.uninstallResizer(this.sidebarPaneView.headerElemen
t()); |
974 } | 976 } |
975 | 977 |
976 this._splitWidget.setVertical(!vertically); | 978 this._splitWidget.setVertical(!vertically); |
977 | 979 |
978 var computedPane = new WebInspector.SidebarPane(WebInspector.UIString("C
omputed")); | 980 var computedPane = new WebInspector.SidebarPane(WebInspector.UIString("C
omputed")); |
979 computedPane.element.classList.add("composite"); | 981 computedPane.element.classList.add("composite"); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1058 for (var sidebarViewWrapper of this._elementsSidebarViewWrappers) | 1060 for (var sidebarViewWrapper of this._elementsSidebarViewWrappers) |
1059 this.sidebarPaneView.addPane(sidebarViewWrapper); | 1061 this.sidebarPaneView.addPane(sidebarViewWrapper); |
1060 | 1062 |
1061 this._extensionSidebarPanesContainer = this.sidebarPaneView; | 1063 this._extensionSidebarPanesContainer = this.sidebarPaneView; |
1062 | 1064 |
1063 for (var i = 0; i < extensionSidebarPanes.length; ++i) | 1065 for (var i = 0; i < extensionSidebarPanes.length; ++i) |
1064 this._addExtensionSidebarPane(extensionSidebarPanes[i]); | 1066 this._addExtensionSidebarPane(extensionSidebarPanes[i]); |
1065 | 1067 |
1066 this._splitWidget.setSidebarWidget(this.sidebarPaneView); | 1068 this._splitWidget.setSidebarWidget(this.sidebarPaneView); |
1067 this.sidebarPanes.styles.expand(); | 1069 this.sidebarPanes.styles.expand(); |
| 1070 |
| 1071 if (selectedTabId) |
| 1072 this.sidebarPaneView.selectTab(selectedTabId); |
1068 }, | 1073 }, |
1069 | 1074 |
1070 /** | 1075 /** |
1071 * @param {!WebInspector.Event} event | 1076 * @param {!WebInspector.Event} event |
1072 */ | 1077 */ |
1073 _extensionSidebarPaneAdded: function(event) | 1078 _extensionSidebarPaneAdded: function(event) |
1074 { | 1079 { |
1075 var pane = /** @type {!WebInspector.ExtensionSidebarPane} */ (event.data
); | 1080 var pane = /** @type {!WebInspector.ExtensionSidebarPane} */ (event.data
); |
1076 this._addExtensionSidebarPane(pane); | 1081 this._addExtensionSidebarPane(pane); |
1077 }, | 1082 }, |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1346 if (enabled) | 1351 if (enabled) |
1347 return; | 1352 return; |
1348 | 1353 |
1349 var selectedNode = this._treeOutline.selectedDOMNode(); | 1354 var selectedNode = this._treeOutline.selectedDOMNode(); |
1350 if (selectedNode) | 1355 if (selectedNode) |
1351 WebInspector.DefaultDOMNodeHighlighter.prototype.highlightDOMNode.ca
ll(this, selectedNode, config); | 1356 WebInspector.DefaultDOMNodeHighlighter.prototype.highlightDOMNode.ca
ll(this, selectedNode, config); |
1352 }, | 1357 }, |
1353 | 1358 |
1354 __proto__: WebInspector.DefaultDOMNodeHighlighter.prototype | 1359 __proto__: WebInspector.DefaultDOMNodeHighlighter.prototype |
1355 } | 1360 } |
OLD | NEW |