Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1061)

Side by Side Diff: Source/devtools/front_end/elements/ElementStatePaneWidget.js

Issue 1273313002: DevTools: introduce dom markers, decorate hidden, forced state and breakpoint elements using marker… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: for landing Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.StylesSidebarPane.BaseToolbarPaneWidget} 7 * @extends {WebInspector.StylesSidebarPane.BaseToolbarPaneWidget}
8 * @param {!WebInspector.ToolbarItem} toolbarItem 8 * @param {!WebInspector.ToolbarItem} toolbarItem
9 */ 9 */
10 WebInspector.ElementStatePaneWidget = function(toolbarItem) 10 WebInspector.ElementStatePaneWidget = function(toolbarItem)
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 this._updateTarget(newNode? newNode.target() : null); 94 this._updateTarget(newNode? newNode.target() : null);
95 if (newNode) 95 if (newNode)
96 this._updateInputs(newNode); 96 this._updateInputs(newNode);
97 }, 97 },
98 98
99 /** 99 /**
100 * @param {!WebInspector.DOMNode} node 100 * @param {!WebInspector.DOMNode} node
101 */ 101 */
102 _updateInputs: function(node) 102 _updateInputs: function(node)
103 { 103 {
104 var nodePseudoState = node.getUserProperty(WebInspector.CSSStyleModel.Ps eudoStatePropertyName) || []; 104 var nodePseudoState = this._target.cssModel.pseudoState(node);
105 var inputs = this._inputs; 105 var inputs = this._inputs;
106 for (var i = 0; i < inputs.length; ++i) { 106 for (var i = 0; i < inputs.length; ++i) {
107 inputs[i].disabled = !!node.pseudoType(); 107 inputs[i].disabled = !!node.pseudoType();
108 inputs[i].checked = nodePseudoState.indexOf(inputs[i].state) >= 0; 108 inputs[i].checked = nodePseudoState.indexOf(inputs[i].state) >= 0;
109 } 109 }
110 }, 110 },
111 111
112 __proto__: WebInspector.StylesSidebarPane.BaseToolbarPaneWidget.prototype 112 __proto__: WebInspector.StylesSidebarPane.BaseToolbarPaneWidget.prototype
113 } 113 }
114 114
(...skipping 27 matching lines...) Expand all
142 }, 142 },
143 143
144 _nodeChanged: function() 144 _nodeChanged: function()
145 { 145 {
146 var enabled = !!WebInspector.context.flavor(WebInspector.DOMNode); 146 var enabled = !!WebInspector.context.flavor(WebInspector.DOMNode);
147 this._button.setEnabled(enabled); 147 this._button.setEnabled(enabled);
148 if (!enabled && this._button.toggled()) 148 if (!enabled && this._button.toggled())
149 WebInspector.ElementsPanel.instance().sidebarPanes.styles.showToolba rPane(null); 149 WebInspector.ElementsPanel.instance().sidebarPanes.styles.showToolba rPane(null);
150 } 150 }
151 } 151 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/components/module.json ('k') | Source/devtools/front_end/elements/ElementsPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698