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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 this.crumbsElement = crumbsContainer.createChild("div", "crumbs"); | 83 this.crumbsElement = crumbsContainer.createChild("div", "crumbs"); |
84 this.crumbsElement.addEventListener("mousemove", this._mouseMovedInCrumbs.bi
nd(this), false); | 84 this.crumbsElement.addEventListener("mousemove", this._mouseMovedInCrumbs.bi
nd(this), false); |
85 this.crumbsElement.addEventListener("mouseout", this._mouseMovedOutOfCrumbs.
bind(this), false); | 85 this.crumbsElement.addEventListener("mouseout", this._mouseMovedOutOfCrumbs.
bind(this), false); |
86 | 86 |
87 this.sidebarPanes = {}; | 87 this.sidebarPanes = {}; |
88 this.sidebarPanes.platformFonts = new WebInspector.PlatformFontsSidebarPane(
); | 88 this.sidebarPanes.platformFonts = new WebInspector.PlatformFontsSidebarPane(
); |
89 this.sidebarPanes.computedStyle = new WebInspector.ComputedStyleSidebarPane(
); | 89 this.sidebarPanes.computedStyle = new WebInspector.ComputedStyleSidebarPane(
); |
90 this.sidebarPanes.styles = new WebInspector.StylesSidebarPane(this.sidebarPa
nes.computedStyle, this._setPseudoClassForNodeId.bind(this)); | 90 this.sidebarPanes.styles = new WebInspector.StylesSidebarPane(this.sidebarPa
nes.computedStyle, this._setPseudoClassForNodeId.bind(this)); |
91 | 91 |
92 this._matchedStylesFilterBoxContainer = document.createElement("div"); | 92 this._matchedStylesFilterBoxContainer = document.createElement("div"); |
93 this._matchedStylesFilterBoxContainer.className = "filter-box-container insp
ector-footer status-bar"; | 93 this._matchedStylesFilterBoxContainer.className = "sidebar-pane-filter-box"; |
94 this._computedStylesFilterBoxContainer = document.createElement("div"); | 94 this._computedStylesFilterBoxContainer = document.createElement("div"); |
95 this._computedStylesFilterBoxContainer.className = "filter-box-container ins
pector-footer status-bar"; | 95 this._computedStylesFilterBoxContainer.className = "sidebar-pane-filter-box"
; |
96 this.sidebarPanes.styles.setFilterBoxContainers(this._matchedStylesFilterBox
Container, this._computedStylesFilterBoxContainer); | 96 this.sidebarPanes.styles.setFilterBoxContainers(this._matchedStylesFilterBox
Container, this._computedStylesFilterBoxContainer); |
97 | 97 |
98 this.sidebarPanes.metrics = new WebInspector.MetricsSidebarPane(); | 98 this.sidebarPanes.metrics = new WebInspector.MetricsSidebarPane(); |
99 this.sidebarPanes.properties = new WebInspector.PropertiesSidebarPane(); | 99 this.sidebarPanes.properties = new WebInspector.PropertiesSidebarPane(); |
100 this.sidebarPanes.domBreakpoints = WebInspector.domBreakpointsSidebarPane.cr
eateProxy(this); | 100 this.sidebarPanes.domBreakpoints = WebInspector.domBreakpointsSidebarPane.cr
eateProxy(this); |
101 this.sidebarPanes.eventListeners = new WebInspector.EventListenersSidebarPan
e(); | 101 this.sidebarPanes.eventListeners = new WebInspector.EventListenersSidebarPan
e(); |
102 | 102 |
103 this.sidebarPanes.styles.addEventListener(WebInspector.SidebarPane.EventType
s.wasShown, this.updateStyles.bind(this, false)); | 103 this.sidebarPanes.styles.addEventListener(WebInspector.SidebarPane.EventType
s.wasShown, this.updateStyles.bind(this, false)); |
104 this.sidebarPanes.metrics.addEventListener(WebInspector.SidebarPane.EventTyp
es.wasShown, this.updateMetrics.bind(this)); | 104 this.sidebarPanes.metrics.addEventListener(WebInspector.SidebarPane.EventTyp
es.wasShown, this.updateMetrics.bind(this)); |
105 this.sidebarPanes.platformFonts.addEventListener(WebInspector.SidebarPane.Ev
entTypes.wasShown, this.updatePlatformFonts.bind(this)); | 105 this.sidebarPanes.platformFonts.addEventListener(WebInspector.SidebarPane.Ev
entTypes.wasShown, this.updatePlatformFonts.bind(this)); |
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1261 splitView.show(compositePane.bodyElement); | 1261 splitView.show(compositePane.bodyElement); |
1262 | 1262 |
1263 splitView.mainElement().appendChild(matchedStylePanesWrapper); | 1263 splitView.mainElement().appendChild(matchedStylePanesWrapper); |
1264 splitView.sidebarElement().appendChild(computedStylePanesWrapper); | 1264 splitView.sidebarElement().appendChild(computedStylePanesWrapper); |
1265 | 1265 |
1266 this.sidebarPanes.styles.setExpandCallback(expandComposite); | 1266 this.sidebarPanes.styles.setExpandCallback(expandComposite); |
1267 | 1267 |
1268 computedPane.show(computedStylePanesWrapper); | 1268 computedPane.show(computedStylePanesWrapper); |
1269 computedPane.setExpandCallback(expandComposite); | 1269 computedPane.setExpandCallback(expandComposite); |
1270 | 1270 |
1271 if (WebInspector.experimentsSettings.cssStyleSearch.isEnabled()) { | 1271 splitView.mainElement().appendChild(this._matchedStylesFilterBoxCont
ainer); |
1272 splitView.mainElement().appendChild(this._matchedStylesFilterBox
Container); | 1272 splitView.sidebarElement().appendChild(this._computedStylesFilterBox
Container); |
1273 splitView.sidebarElement().appendChild(this._computedStylesFilte
rBoxContainer); | |
1274 } | |
1275 | 1273 |
1276 this.sidebarPaneView.addPane(compositePane); | 1274 this.sidebarPaneView.addPane(compositePane); |
1277 } else { | 1275 } else { |
1278 var stylesPane = new WebInspector.SidebarPane(this.sidebarPanes.styl
es.title()); | 1276 var stylesPane = new WebInspector.SidebarPane(this.sidebarPanes.styl
es.title()); |
1279 stylesPane.element.classList.add("composite"); | 1277 stylesPane.element.classList.add("composite"); |
1280 stylesPane.element.classList.add("fill"); | 1278 stylesPane.element.classList.add("fill"); |
1281 var expandStyles = stylesPane.expand.bind(stylesPane); | 1279 var expandStyles = stylesPane.expand.bind(stylesPane); |
1282 stylesPane.bodyElement.classList.add("metrics-and-styles"); | 1280 stylesPane.bodyElement.classList.add("metrics-and-styles"); |
1283 | 1281 |
1284 stylesPane.bodyElement.appendChild(matchedStylePanesWrapper); | 1282 stylesPane.bodyElement.appendChild(matchedStylePanesWrapper); |
1285 computedPane.bodyElement.appendChild(computedStylePanesWrapper); | 1283 computedPane.bodyElement.appendChild(computedStylePanesWrapper); |
1286 | 1284 |
1287 this.sidebarPanes.styles.setExpandCallback(expandStyles); | 1285 this.sidebarPanes.styles.setExpandCallback(expandStyles); |
1288 this.sidebarPanes.metrics.setExpandCallback(expandStyles); | 1286 this.sidebarPanes.metrics.setExpandCallback(expandStyles); |
1289 | 1287 |
1290 this.sidebarPaneView.addEventListener(WebInspector.TabbedPane.EventT
ypes.TabSelected, tabSelected, this); | 1288 this.sidebarPaneView.addEventListener(WebInspector.TabbedPane.EventT
ypes.TabSelected, tabSelected, this); |
1291 | 1289 |
1292 if (WebInspector.experimentsSettings.cssStyleSearch.isEnabled()) { | 1290 stylesPane.bodyElement.appendChild(this._matchedStylesFilterBoxConta
iner); |
1293 stylesPane.bodyElement.appendChild(this._matchedStylesFilterBoxC
ontainer); | 1291 computedPane.bodyElement.appendChild(this._computedStylesFilterBoxCo
ntainer); |
1294 computedPane.bodyElement.appendChild(this._computedStylesFilterB
oxContainer); | |
1295 } | |
1296 | 1292 |
1297 this.sidebarPaneView.addPane(stylesPane); | 1293 this.sidebarPaneView.addPane(stylesPane); |
1298 this.sidebarPaneView.addPane(computedPane); | 1294 this.sidebarPaneView.addPane(computedPane); |
1299 } | 1295 } |
1300 | 1296 |
1301 this.sidebarPanes.styles.show(matchedStylePanesWrapper); | 1297 this.sidebarPanes.styles.show(matchedStylePanesWrapper); |
1302 this.sidebarPanes.computedStyle.show(computedStylePanesWrapper); | 1298 this.sidebarPanes.computedStyle.show(computedStylePanesWrapper); |
1303 matchedStylePanesWrapper.appendChild(this.sidebarPanes.styles.titleEleme
nt); | 1299 matchedStylePanesWrapper.appendChild(this.sidebarPanes.styles.titleEleme
nt); |
1304 showMetrics.call(this, vertically); | 1300 showMetrics.call(this, vertically); |
1305 this.sidebarPanes.platformFonts.show(computedStylePanesWrapper); | 1301 this.sidebarPanes.platformFonts.show(computedStylePanesWrapper); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1367 return; | 1363 return; |
1368 | 1364 |
1369 if (WebInspector.inspectElementModeController && WebInspector.inspectEle
mentModeController.enabled()) { | 1365 if (WebInspector.inspectElementModeController && WebInspector.inspectEle
mentModeController.enabled()) { |
1370 InspectorFrontendHost.bringToFront(); | 1366 InspectorFrontendHost.bringToFront(); |
1371 WebInspector.inspectElementModeController.disable(); | 1367 WebInspector.inspectElementModeController.disable(); |
1372 } | 1368 } |
1373 | 1369 |
1374 /** @type {!WebInspector.ElementsPanel} */ (WebInspector.inspectorView.p
anel("elements")).revealAndSelectNode(node.id); | 1370 /** @type {!WebInspector.ElementsPanel} */ (WebInspector.inspectorView.p
anel("elements")).revealAndSelectNode(node.id); |
1375 } | 1371 } |
1376 } | 1372 } |
OLD | NEW |