| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 this._matchedStylesFilterBoxContainer = document.createElement("div"); | 74 this._matchedStylesFilterBoxContainer = document.createElement("div"); |
| 75 this._matchedStylesFilterBoxContainer.className = "sidebar-pane-filter-box"; | 75 this._matchedStylesFilterBoxContainer.className = "sidebar-pane-filter-box"; |
| 76 this._computedStylesFilterBoxContainer = document.createElement("div"); | 76 this._computedStylesFilterBoxContainer = document.createElement("div"); |
| 77 this._computedStylesFilterBoxContainer.className = "sidebar-pane-filter-box"
; | 77 this._computedStylesFilterBoxContainer.className = "sidebar-pane-filter-box"
; |
| 78 this.sidebarPanes.styles.setFilterBoxContainers(this._matchedStylesFilterBox
Container, this._computedStylesFilterBoxContainer); | 78 this.sidebarPanes.styles.setFilterBoxContainers(this._matchedStylesFilterBox
Container, this._computedStylesFilterBoxContainer); |
| 79 | 79 |
| 80 this.sidebarPanes.metrics = new WebInspector.MetricsSidebarPane(); | 80 this.sidebarPanes.metrics = new WebInspector.MetricsSidebarPane(); |
| 81 this.sidebarPanes.properties = new WebInspector.PropertiesSidebarPane(); | 81 this.sidebarPanes.properties = new WebInspector.PropertiesSidebarPane(); |
| 82 this.sidebarPanes.domBreakpoints = WebInspector.domBreakpointsSidebarPane.cr
eateProxy(this); | 82 this.sidebarPanes.domBreakpoints = WebInspector.domBreakpointsSidebarPane.cr
eateProxy(this); |
| 83 this.sidebarPanes.eventListeners = new WebInspector.EventListenersSidebarPan
e(); | 83 this.sidebarPanes.eventListeners = new WebInspector.EventListenersSidebarPan
e(); |
| 84 this.sidebarPanes.animations = new WebInspector.AnimationsSidebarPane(this.s
idebarPanes.styles); |
| 84 | 85 |
| 85 this.sidebarPanes.styles.addEventListener(WebInspector.SidebarPane.EventType
s.wasShown, this.updateStyles.bind(this, false)); | 86 this.sidebarPanes.styles.addEventListener(WebInspector.SidebarPane.EventType
s.wasShown, this.updateStyles.bind(this, false)); |
| 86 this.sidebarPanes.metrics.addEventListener(WebInspector.SidebarPane.EventTyp
es.wasShown, this.updateMetrics.bind(this)); | 87 this.sidebarPanes.metrics.addEventListener(WebInspector.SidebarPane.EventTyp
es.wasShown, this.updateMetrics.bind(this)); |
| 87 this.sidebarPanes.platformFonts.addEventListener(WebInspector.SidebarPane.Ev
entTypes.wasShown, this.updatePlatformFonts.bind(this)); | 88 this.sidebarPanes.platformFonts.addEventListener(WebInspector.SidebarPane.Ev
entTypes.wasShown, this.updatePlatformFonts.bind(this)); |
| 88 this.sidebarPanes.properties.addEventListener(WebInspector.SidebarPane.Event
Types.wasShown, this.updateProperties.bind(this)); | 89 this.sidebarPanes.properties.addEventListener(WebInspector.SidebarPane.Event
Types.wasShown, this.updateProperties.bind(this)); |
| 89 this.sidebarPanes.eventListeners.addEventListener(WebInspector.SidebarPane.E
ventTypes.wasShown, this.updateEventListeners.bind(this)); | 90 this.sidebarPanes.eventListeners.addEventListener(WebInspector.SidebarPane.E
ventTypes.wasShown, this.updateEventListeners.bind(this)); |
| 91 this.sidebarPanes.animations.addEventListener(WebInspector.SidebarPane.Event
Types.wasShown, this.updateAnimations.bind(this)); |
| 90 | 92 |
| 91 this.sidebarPanes.styles.addEventListener("style edited", this._stylesPaneEd
ited, this); | 93 this.sidebarPanes.styles.addEventListener("style edited", this._stylesPaneEd
ited, this); |
| 92 this.sidebarPanes.styles.addEventListener("style property toggled", this._st
ylesPaneEdited, this); | 94 this.sidebarPanes.styles.addEventListener("style property toggled", this._st
ylesPaneEdited, this); |
| 93 this.sidebarPanes.metrics.addEventListener("metrics edited", this._metricsPa
neEdited, this); | 95 this.sidebarPanes.metrics.addEventListener("metrics edited", this._metricsPa
neEdited, this); |
| 94 this._extensionSidebarPanes = []; | 96 this._extensionSidebarPanes = []; |
| 95 | 97 |
| 96 WebInspector.dockController.addEventListener(WebInspector.DockController.Eve
nts.DockSideChanged, this._dockSideChanged.bind(this)); | 98 WebInspector.dockController.addEventListener(WebInspector.DockController.Eve
nts.DockSideChanged, this._dockSideChanged.bind(this)); |
| 97 WebInspector.settings.splitVerticallyWhenDockedToRight.addChangeListener(thi
s._dockSideChanged.bind(this)); | 99 WebInspector.settings.splitVerticallyWhenDockedToRight.addChangeListener(thi
s._dockSideChanged.bind(this)); |
| 98 this._dockSideChanged(); | 100 this._dockSideChanged(); |
| 99 | 101 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 _updateSidebars: function() | 296 _updateSidebars: function() |
| 295 { | 297 { |
| 296 for (var pane in this.sidebarPanes) | 298 for (var pane in this.sidebarPanes) |
| 297 this.sidebarPanes[pane].needsUpdate = true; | 299 this.sidebarPanes[pane].needsUpdate = true; |
| 298 | 300 |
| 299 this.updateStyles(true); | 301 this.updateStyles(true); |
| 300 this.updateMetrics(); | 302 this.updateMetrics(); |
| 301 this.updatePlatformFonts(); | 303 this.updatePlatformFonts(); |
| 302 this.updateProperties(); | 304 this.updateProperties(); |
| 303 this.updateEventListeners(); | 305 this.updateEventListeners(); |
| 306 this.updateAnimations(); |
| 304 }, | 307 }, |
| 305 | 308 |
| 306 _reset: function() | 309 _reset: function() |
| 307 { | 310 { |
| 308 delete this.currentQuery; | 311 delete this.currentQuery; |
| 309 }, | 312 }, |
| 310 | 313 |
| 311 /** | 314 /** |
| 312 * @param {!WebInspector.Event} event | 315 * @param {!WebInspector.Event} event |
| 313 */ | 316 */ |
| (...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1127 updateEventListeners: function() | 1130 updateEventListeners: function() |
| 1128 { | 1131 { |
| 1129 var eventListenersSidebarPane = this.sidebarPanes.eventListeners; | 1132 var eventListenersSidebarPane = this.sidebarPanes.eventListeners; |
| 1130 if (!eventListenersSidebarPane.isShowing() || !eventListenersSidebarPane
.needsUpdate) | 1133 if (!eventListenersSidebarPane.isShowing() || !eventListenersSidebarPane
.needsUpdate) |
| 1131 return; | 1134 return; |
| 1132 | 1135 |
| 1133 eventListenersSidebarPane.update(this.selectedDOMNode()); | 1136 eventListenersSidebarPane.update(this.selectedDOMNode()); |
| 1134 eventListenersSidebarPane.needsUpdate = false; | 1137 eventListenersSidebarPane.needsUpdate = false; |
| 1135 }, | 1138 }, |
| 1136 | 1139 |
| 1140 updateAnimations: function() |
| 1141 { |
| 1142 var animationsSidebarPane = this.sidebarPanes.animations; |
| 1143 if (!animationsSidebarPane.isShowing()) |
| 1144 return; |
| 1145 |
| 1146 animationsSidebarPane.update(this.selectedDOMNode()); |
| 1147 }, |
| 1148 |
| 1137 /** | 1149 /** |
| 1138 * @param {!KeyboardEvent} event | 1150 * @param {!KeyboardEvent} event |
| 1139 */ | 1151 */ |
| 1140 handleShortcut: function(event) | 1152 handleShortcut: function(event) |
| 1141 { | 1153 { |
| 1142 /** | 1154 /** |
| 1143 * @param {!WebInspector.ElementsTreeOutline} treeOutline | 1155 * @param {!WebInspector.ElementsTreeOutline} treeOutline |
| 1144 * @this {WebInspector.ElementsPanel} | 1156 * @this {WebInspector.ElementsPanel} |
| 1145 */ | 1157 */ |
| 1146 function handleUndoRedo(treeOutline) | 1158 function handleUndoRedo(treeOutline) |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1409 | 1421 |
| 1410 this.sidebarPanes.styles.show(matchedStylePanesWrapper); | 1422 this.sidebarPanes.styles.show(matchedStylePanesWrapper); |
| 1411 this.sidebarPanes.computedStyle.show(computedStylePanesWrapper); | 1423 this.sidebarPanes.computedStyle.show(computedStylePanesWrapper); |
| 1412 matchedStylePanesWrapper.appendChild(this.sidebarPanes.styles.titleEleme
nt); | 1424 matchedStylePanesWrapper.appendChild(this.sidebarPanes.styles.titleEleme
nt); |
| 1413 showMetrics.call(this, vertically); | 1425 showMetrics.call(this, vertically); |
| 1414 this.sidebarPanes.platformFonts.show(computedStylePanesWrapper); | 1426 this.sidebarPanes.platformFonts.show(computedStylePanesWrapper); |
| 1415 | 1427 |
| 1416 this.sidebarPaneView.addPane(this.sidebarPanes.eventListeners); | 1428 this.sidebarPaneView.addPane(this.sidebarPanes.eventListeners); |
| 1417 this.sidebarPaneView.addPane(this.sidebarPanes.domBreakpoints); | 1429 this.sidebarPaneView.addPane(this.sidebarPanes.domBreakpoints); |
| 1418 this.sidebarPaneView.addPane(this.sidebarPanes.properties); | 1430 this.sidebarPaneView.addPane(this.sidebarPanes.properties); |
| 1431 if (Runtime.experiments.isEnabled("animationInspection")) |
| 1432 this.sidebarPaneView.addPane(this.sidebarPanes.animations); |
| 1419 this._extensionSidebarPanesContainer = this.sidebarPaneView; | 1433 this._extensionSidebarPanesContainer = this.sidebarPaneView; |
| 1420 | 1434 |
| 1421 for (var i = 0; i < this._extensionSidebarPanes.length; ++i) | 1435 for (var i = 0; i < this._extensionSidebarPanes.length; ++i) |
| 1422 this._extensionSidebarPanesContainer.addPane(this._extensionSidebarP
anes[i]); | 1436 this._extensionSidebarPanesContainer.addPane(this._extensionSidebarP
anes[i]); |
| 1423 | 1437 |
| 1424 this.sidebarPaneView.show(this._splitView.sidebarElement()); | 1438 this.sidebarPaneView.show(this._splitView.sidebarElement()); |
| 1425 this.sidebarPanes.styles.expand(); | 1439 this.sidebarPanes.styles.expand(); |
| 1426 }, | 1440 }, |
| 1427 | 1441 |
| 1428 /** | 1442 /** |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1532 | 1546 |
| 1533 WebInspector.ElementsPanelFactory.prototype = { | 1547 WebInspector.ElementsPanelFactory.prototype = { |
| 1534 /** | 1548 /** |
| 1535 * @return {!WebInspector.Panel} | 1549 * @return {!WebInspector.Panel} |
| 1536 */ | 1550 */ |
| 1537 createPanel: function() | 1551 createPanel: function() |
| 1538 { | 1552 { |
| 1539 return WebInspector.ElementsPanel.instance(); | 1553 return WebInspector.ElementsPanel.instance(); |
| 1540 } | 1554 } |
| 1541 } | 1555 } |
| OLD | NEW |