| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 this._extensionSidebarPanes = []; | 105 this._extensionSidebarPanes = []; |
| 106 | 106 |
| 107 WebInspector.dockController.addEventListener(WebInspector.DockController.Eve
nts.DockSideChanged, this._dockSideChanged.bind(this)); | 107 WebInspector.dockController.addEventListener(WebInspector.DockController.Eve
nts.DockSideChanged, this._dockSideChanged.bind(this)); |
| 108 WebInspector.settings.splitVerticallyWhenDockedToRight.addChangeListener(thi
s._dockSideChanged.bind(this)); | 108 WebInspector.settings.splitVerticallyWhenDockedToRight.addChangeListener(thi
s._dockSideChanged.bind(this)); |
| 109 this._dockSideChanged(); | 109 this._dockSideChanged(); |
| 110 | 110 |
| 111 this._popoverHelper = new WebInspector.PopoverHelper(this.element, this._get
PopoverAnchor.bind(this), this._showPopover.bind(this)); | 111 this._popoverHelper = new WebInspector.PopoverHelper(this.element, this._get
PopoverAnchor.bind(this), this._showPopover.bind(this)); |
| 112 this._popoverHelper.setTimeout(0); | 112 this._popoverHelper.setTimeout(0); |
| 113 | 113 |
| 114 WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.Document
Updated, this._documentUpdatedEvent, this); | 114 WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.Document
Updated, this._documentUpdatedEvent, this); |
| 115 WebInspector.settings.showShadowDOM.addChangeListener(this._showShadowDOMCha
nged.bind(this)); | 115 WebInspector.settings.showUAShadowDOM.addChangeListener(this._showUAShadowDO
MChanged.bind(this)); |
| 116 | 116 |
| 117 WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Mod
elWasEnabled, this._updateSidebars, this); | 117 WebInspector.cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Mod
elWasEnabled, this._updateSidebars, this); |
| 118 } | 118 } |
| 119 | 119 |
| 120 WebInspector.ElementsPanel.prototype = { | 120 WebInspector.ElementsPanel.prototype = { |
| 121 _updateTreeOutlineVisibleWidth: function() | 121 _updateTreeOutlineVisibleWidth: function() |
| 122 { | 122 { |
| 123 if (!this.treeOutline) | 123 if (!this.treeOutline) |
| 124 return; | 124 return; |
| 125 | 125 |
| (...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1121 * @param {!DOMAgent.NodeId} nodeId | 1121 * @param {!DOMAgent.NodeId} nodeId |
| 1122 */ | 1122 */ |
| 1123 revealAndSelectNode: function(nodeId) | 1123 revealAndSelectNode: function(nodeId) |
| 1124 { | 1124 { |
| 1125 WebInspector.inspectorView.setCurrentPanel(this); | 1125 WebInspector.inspectorView.setCurrentPanel(this); |
| 1126 | 1126 |
| 1127 var node = WebInspector.domAgent.nodeForId(nodeId); | 1127 var node = WebInspector.domAgent.nodeForId(nodeId); |
| 1128 if (!node) | 1128 if (!node) |
| 1129 return; | 1129 return; |
| 1130 | 1130 |
| 1131 node = WebInspector.settings.showShadowDOM.get() ? node : this._leaveUse
rAgentShadowDOM(node); | 1131 node = WebInspector.settings.showUAShadowDOM.get() ? node : this._leaveU
serAgentShadowDOM(node); |
| 1132 WebInspector.domAgent.highlightDOMNodeForTwoSeconds(nodeId); | 1132 WebInspector.domAgent.highlightDOMNodeForTwoSeconds(nodeId); |
| 1133 this.selectDOMNode(node, true); | 1133 this.selectDOMNode(node, true); |
| 1134 }, | 1134 }, |
| 1135 | 1135 |
| 1136 /** | 1136 /** |
| 1137 * @param {!WebInspector.ContextMenu} contextMenu | 1137 * @param {!WebInspector.ContextMenu} contextMenu |
| 1138 * @param {!Object} target | 1138 * @param {!Object} target |
| 1139 */ | 1139 */ |
| 1140 appendApplicableItems: function(event, contextMenu, target) | 1140 appendApplicableItems: function(event, contextMenu, target) |
| 1141 { | 1141 { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1179 var contextMenu = new WebInspector.ContextMenu(event); | 1179 var contextMenu = new WebInspector.ContextMenu(event); |
| 1180 contextMenu.show(); | 1180 contextMenu.show(); |
| 1181 }, | 1181 }, |
| 1182 | 1182 |
| 1183 _dockSideChanged: function() | 1183 _dockSideChanged: function() |
| 1184 { | 1184 { |
| 1185 var vertically = WebInspector.dockController.isVertical() && WebInspecto
r.settings.splitVerticallyWhenDockedToRight.get(); | 1185 var vertically = WebInspector.dockController.isVertical() && WebInspecto
r.settings.splitVerticallyWhenDockedToRight.get(); |
| 1186 this._splitVertically(vertically); | 1186 this._splitVertically(vertically); |
| 1187 }, | 1187 }, |
| 1188 | 1188 |
| 1189 _showShadowDOMChanged: function() | 1189 _showUAShadowDOMChanged: function() |
| 1190 { | 1190 { |
| 1191 this.treeOutline.update(); | 1191 this.treeOutline.update(); |
| 1192 }, | 1192 }, |
| 1193 | 1193 |
| 1194 /** | 1194 /** |
| 1195 * @param {boolean} vertically | 1195 * @param {boolean} vertically |
| 1196 */ | 1196 */ |
| 1197 _splitVertically: function(vertically) | 1197 _splitVertically: function(vertically) |
| 1198 { | 1198 { |
| 1199 if (this.sidebarPaneView && vertically === !this._splitView.isVertical()
) | 1199 if (this.sidebarPaneView && vertically === !this._splitView.isVertical()
) |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1345 return; | 1345 return; |
| 1346 | 1346 |
| 1347 if (WebInspector.inspectElementModeController && WebInspector.inspectEle
mentModeController.enabled()) { | 1347 if (WebInspector.inspectElementModeController && WebInspector.inspectEle
mentModeController.enabled()) { |
| 1348 InspectorFrontendHost.bringToFront(); | 1348 InspectorFrontendHost.bringToFront(); |
| 1349 WebInspector.inspectElementModeController.disable(); | 1349 WebInspector.inspectElementModeController.disable(); |
| 1350 } | 1350 } |
| 1351 | 1351 |
| 1352 /** @type {!WebInspector.ElementsPanel} */ (WebInspector.inspectorView.p
anel("elements")).revealAndSelectNode(node.id); | 1352 /** @type {!WebInspector.ElementsPanel} */ (WebInspector.inspectorView.p
anel("elements")).revealAndSelectNode(node.id); |
| 1353 } | 1353 } |
| 1354 } | 1354 } |
| OLD | NEW |