Chromium Code Reviews| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 102 /** | 102 /** |
| 103 * @return {!Element} | 103 * @return {!Element} |
| 104 */ | 104 */ |
| 105 _createStylesSidebarToolbar: function() | 105 _createStylesSidebarToolbar: function() |
| 106 { | 106 { |
| 107 var container = createElementWithClass("div", "styles-sidebar-pane-toolb ar-container"); | 107 var container = createElementWithClass("div", "styles-sidebar-pane-toolb ar-container"); |
| 108 var hbox = container.createChild("div", "hbox styles-sidebar-pane-toolba r"); | 108 var hbox = container.createChild("div", "hbox styles-sidebar-pane-toolba r"); |
| 109 var filterContainerElement = hbox.createChild("div", "styles-sidebar-pan e-filter-box"); | 109 var filterContainerElement = hbox.createChild("div", "styles-sidebar-pan e-filter-box"); |
| 110 var filterInput = WebInspector.StylesSidebarPane.createPropertyFilterEle ment(WebInspector.UIString("Filter"), hbox, this._stylesWidget.onFilterChanged.b ind(this._stylesWidget)); | 110 var filterInput = WebInspector.StylesSidebarPane.createPropertyFilterEle ment(WebInspector.UIString("Filter"), hbox, this._stylesWidget.onFilterChanged.b ind(this._stylesWidget)); |
| 111 filterContainerElement.appendChild(filterInput); | 111 filterContainerElement.appendChild(filterInput); |
| 112 var toolbar = new WebInspector.ExtensibleToolbar("styles-sidebarpane-too lbar", hbox); | 112 var toolbar = new WebInspector.Toolbar("styles-pane-toolbar", hbox); |
| 113 toolbar.element.classList.add("styles-pane-toolbar"); | |
| 114 toolbar.makeToggledGray(); | 113 toolbar.makeToggledGray(); |
| 114 WebInspector.Toolbar.appendLocationItems(toolbar, "styles-sidebarpane-to olbar"); | |
|
pfeldman
2016/09/20 23:11:35
You might want it on the toolbar itself so that yo
dgozman
2016/09/21 18:47:04
Done.
| |
| 115 var toolbarPaneContainer = container.createChild("div", "styles-sidebar- toolbar-pane-container"); | 115 var toolbarPaneContainer = container.createChild("div", "styles-sidebar- toolbar-pane-container"); |
| 116 this._toolbarPaneElement = createElementWithClass("div", "styles-sidebar -toolbar-pane"); | 116 this._toolbarPaneElement = createElementWithClass("div", "styles-sidebar -toolbar-pane"); |
| 117 toolbarPaneContainer.appendChild(this._toolbarPaneElement); | 117 toolbarPaneContainer.appendChild(this._toolbarPaneElement); |
| 118 return container; | 118 return container; |
| 119 }, | 119 }, |
| 120 | 120 |
| 121 /** | 121 /** |
| 122 * @override | 122 * @override |
| 123 * @param {string} locationName | 123 * @param {string} locationName |
| 124 * @return {?WebInspector.ViewLocation} | 124 * @return {?WebInspector.ViewLocation} |
| (...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1115 /** | 1115 /** |
| 1116 * @override | 1116 * @override |
| 1117 * @param {!WebInspector.DOMNode} node | 1117 * @param {!WebInspector.DOMNode} node |
| 1118 * @return {?{title: string, color: string}} | 1118 * @return {?{title: string, color: string}} |
| 1119 */ | 1119 */ |
| 1120 decorate: function(node) | 1120 decorate: function(node) |
| 1121 { | 1121 { |
| 1122 return { color: "orange", title: WebInspector.UIString("Element state: % s", ":" + WebInspector.CSSModel.fromNode(node).pseudoState(node).join(", :")) }; | 1122 return { color: "orange", title: WebInspector.UIString("Element state: % s", ":" + WebInspector.CSSModel.fromNode(node).pseudoState(node).join(", :")) }; |
| 1123 } | 1123 } |
| 1124 } | 1124 } |
| OLD | NEW |