| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 this._breadcrumbs.addEventListener(WebInspector.ElementsBreadcrumbs.Events.N
odeSelected, this._crumbNodeSelected, this); | 67 this._breadcrumbs.addEventListener(WebInspector.ElementsBreadcrumbs.Events.N
odeSelected, this._crumbNodeSelected, this); |
| 68 | 68 |
| 69 this.sidebarPanes = {}; | 69 this.sidebarPanes = {}; |
| 70 /** @type !Array<!WebInspector.ElementsSidebarViewWrapperPane> */ | 70 /** @type !Array<!WebInspector.ElementsSidebarViewWrapperPane> */ |
| 71 this._elementsSidebarViewWrappers = []; | 71 this._elementsSidebarViewWrappers = []; |
| 72 this._currentToolbarPane = null; | 72 this._currentToolbarPane = null; |
| 73 | 73 |
| 74 var sharedSidebarModel = new WebInspector.SharedSidebarModel(); | 74 var sharedSidebarModel = new WebInspector.SharedSidebarModel(); |
| 75 this.sidebarPanes.platformFonts = WebInspector.PlatformFontsWidget.createSid
ebarWrapper(sharedSidebarModel); | 75 this.sidebarPanes.platformFonts = WebInspector.PlatformFontsWidget.createSid
ebarWrapper(sharedSidebarModel); |
| 76 this.sidebarPanes.styles = new WebInspector.StylesSidebarPane(); | 76 this.sidebarPanes.styles = new WebInspector.StylesSidebarPane(); |
| 77 this.sidebarPanes.computedStyle = WebInspector.ComputedStyleWidget.createSid
ebarWrapper(this.sidebarPanes.styles, sharedSidebarModel); | 77 this.sidebarPanes.computedStyle = WebInspector.ComputedStyleWidget.createSid
ebarWrapper(this.sidebarPanes.styles, sharedSidebarModel, this._revealProperty.b
ind(this)); |
| 78 | 78 |
| 79 this.sidebarPanes.metrics = new WebInspector.MetricsSidebarPane(); | 79 this.sidebarPanes.metrics = new WebInspector.MetricsSidebarPane(); |
| 80 this.sidebarPanes.properties = WebInspector.PropertiesWidget.createSidebarWr
apper(); | 80 this.sidebarPanes.properties = WebInspector.PropertiesWidget.createSidebarWr
apper(); |
| 81 this.sidebarPanes.domBreakpoints = WebInspector.domBreakpointsSidebarPane.cr
eateProxy(this); | 81 this.sidebarPanes.domBreakpoints = WebInspector.domBreakpointsSidebarPane.cr
eateProxy(this); |
| 82 this.sidebarPanes.eventListeners = WebInspector.EventListenersWidget.createS
idebarWrapper(); | 82 this.sidebarPanes.eventListeners = WebInspector.EventListenersWidget.createS
idebarWrapper(); |
| 83 | 83 |
| 84 this._stylesSidebarToolbar = this._createStylesSidebarToolbar(this.sidebarPa
nes.styles); | 84 this._stylesSidebarToolbar = this._createStylesSidebarToolbar(this.sidebarPa
nes.styles); |
| 85 | 85 |
| 86 WebInspector.moduleSetting("sidebarPosition").addChangeListener(this._update
SidebarPosition.bind(this)); | 86 WebInspector.moduleSetting("sidebarPosition").addChangeListener(this._update
SidebarPosition.bind(this)); |
| 87 this._updateSidebarPosition(); | 87 this._updateSidebarPosition(); |
| 88 this._loadSidebarViews(); | 88 this._loadSidebarViews(); |
| 89 | 89 |
| 90 /** @type {!Array.<!WebInspector.ElementsTreeOutline>} */ | 90 /** @type {!Array.<!WebInspector.ElementsTreeOutline>} */ |
| 91 this._treeOutlines = []; | 91 this._treeOutlines = []; |
| 92 /** @type {!Map.<!WebInspector.DOMModel, !WebInspector.ElementsTreeOutline>}
*/ | 92 /** @type {!Map.<!WebInspector.DOMModel, !WebInspector.ElementsTreeOutline>}
*/ |
| 93 this._modelToTreeOutline = new Map(); | 93 this._modelToTreeOutline = new Map(); |
| 94 WebInspector.targetManager.observeTargets(this); | 94 WebInspector.targetManager.observeTargets(this); |
| 95 WebInspector.moduleSetting("showUAShadowDOM").addChangeListener(this._showUA
ShadowDOMChanged.bind(this)); | 95 WebInspector.moduleSetting("showUAShadowDOM").addChangeListener(this._showUA
ShadowDOMChanged.bind(this)); |
| 96 WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebInspec
tor.DOMModel.Events.DocumentUpdated, this._documentUpdatedEvent, this); | 96 WebInspector.targetManager.addModelListener(WebInspector.DOMModel, WebInspec
tor.DOMModel.Events.DocumentUpdated, this._documentUpdatedEvent, this); |
| 97 WebInspector.extensionServer.addEventListener(WebInspector.ExtensionServer.E
vents.SidebarPaneAdded, this._extensionSidebarPaneAdded, this); | 97 WebInspector.extensionServer.addEventListener(WebInspector.ExtensionServer.E
vents.SidebarPaneAdded, this._extensionSidebarPaneAdded, this); |
| 98 } | 98 } |
| 99 | 99 |
| 100 WebInspector.ElementsPanel._elementsSidebarViewTitleSymbol = Symbol("title"); | 100 WebInspector.ElementsPanel._elementsSidebarViewTitleSymbol = Symbol("title"); |
| 101 | 101 |
| 102 WebInspector.ElementsPanel.prototype = { | 102 WebInspector.ElementsPanel.prototype = { |
| 103 /** | 103 /** |
| 104 * @param {!WebInspector.CSSProperty} cssProperty |
| 105 */ |
| 106 _revealProperty: function(cssProperty) |
| 107 { |
| 108 var stylesSidebarPane = this.sidebarPanes.styles; |
| 109 this.sidebarPaneView.selectTab(stylesSidebarPane.title()); |
| 110 stylesSidebarPane.revealProperty(/** @type {!WebInspector.CSSProperty} *
/(cssProperty)); |
| 111 return Promise.resolve(); |
| 112 }, |
| 113 |
| 114 /** |
| 104 * @param {!WebInspector.StylesSidebarPane} ssp | 115 * @param {!WebInspector.StylesSidebarPane} ssp |
| 105 * @return {!Element} | 116 * @return {!Element} |
| 106 */ | 117 */ |
| 107 _createStylesSidebarToolbar: function(ssp) | 118 _createStylesSidebarToolbar: function(ssp) |
| 108 { | 119 { |
| 109 var container = createElementWithClass("div", "styles-sidebar-pane-toolb
ar-container"); | 120 var container = createElementWithClass("div", "styles-sidebar-pane-toolb
ar-container"); |
| 110 var hbox = container.createChild("div", "hbox styles-sidebar-pane-toolba
r"); | 121 var hbox = container.createChild("div", "hbox styles-sidebar-pane-toolba
r"); |
| 111 var filterContainerElement = hbox.createChild("div", "styles-sidebar-pan
e-filter-box"); | 122 var filterContainerElement = hbox.createChild("div", "styles-sidebar-pan
e-filter-box"); |
| 112 var filterInput = WebInspector.StylesSidebarPane.createPropertyFilterEle
ment(WebInspector.UIString("Filter"), hbox, ssp.onFilterChanged.bind(ssp)); | 123 var filterInput = WebInspector.StylesSidebarPane.createPropertyFilterEle
ment(WebInspector.UIString("Filter"), hbox, ssp.onFilterChanged.bind(ssp)); |
| 113 filterContainerElement.appendChild(filterInput); | 124 filterContainerElement.appendChild(filterInput); |
| (...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1264 */ | 1275 */ |
| 1265 wasShown: function() | 1276 wasShown: function() |
| 1266 { | 1277 { |
| 1267 this._toolbarItem.setToggled(true); | 1278 this._toolbarItem.setToggled(true); |
| 1268 this._nodeChanged(); | 1279 this._nodeChanged(); |
| 1269 WebInspector.ThrottledWidget.prototype.wasShown.call(this); | 1280 WebInspector.ThrottledWidget.prototype.wasShown.call(this); |
| 1270 }, | 1281 }, |
| 1271 | 1282 |
| 1272 __proto__: WebInspector.ThrottledWidget.prototype | 1283 __proto__: WebInspector.ThrottledWidget.prototype |
| 1273 } | 1284 } |
| OLD | NEW |