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

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

Issue 1301743002: Devtools UI: Fix edit as html shortcut regression (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 this._forceElementStateButton.setEnabled(node.nodeType() === Node.ELEMEN T_NODE && !node.pseudoType()); 163 this._forceElementStateButton.setEnabled(node.nodeType() === Node.ELEMEN T_NODE && !node.pseudoType());
164 this._forceElementStateButton.setToggled(!!WebInspector.CSSStyleModel.fr omNode(node).pseudoState(node).length); 164 this._forceElementStateButton.setToggled(!!WebInspector.CSSStyleModel.fr omNode(node).pseudoState(node).length);
165 }, 165 },
166 166
167 _toggleEditAsHTML: function() 167 _toggleEditAsHTML: function()
168 { 168 {
169 var node = this.selectedDOMNode(); 169 var node = this.selectedDOMNode();
170 var treeOutline = this._treeOutlineForNode(node); 170 var treeOutline = this._treeOutlineForNode(node);
171 if (!node || !treeOutline) 171 if (!node || !treeOutline)
172 return; 172 return;
173 var startEditing = !this._editAsHTMLButton.toggled(); 173
174 var startEditing = true;
175 if (Runtime.experiments.isEnabled("materialDesign")) {
176 startEditing = !this._editAsHTMLButton.toggled();
177 this._editAsHTMLButton.setToggled(startEditing);
178 }
174 treeOutline.toggleEditAsHTML(node, startEditing, this._updateToolbarButt ons.bind(this)); 179 treeOutline.toggleEditAsHTML(node, startEditing, this._updateToolbarButt ons.bind(this));
175 this._editAsHTMLButton.setToggled(startEditing);
176 }, 180 },
177 181
178 /** 182 /**
179 * @param {!WebInspector.ContextMenu} contextMenu 183 * @param {!WebInspector.ContextMenu} contextMenu
180 */ 184 */
181 _showBreakpointsMenu: function(contextMenu) 185 _showBreakpointsMenu: function(contextMenu)
182 { 186 {
183 var node = this.selectedDOMNode(); 187 var node = this.selectedDOMNode();
184 if (!node) 188 if (!node)
185 return; 189 return;
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 /** 1256 /**
1253 * @override 1257 * @override
1254 * @param {!WebInspector.DOMNode} node 1258 * @param {!WebInspector.DOMNode} node
1255 * @return {?string} 1259 * @return {?string}
1256 */ 1260 */
1257 decorate: function(node) 1261 decorate: function(node)
1258 { 1262 {
1259 return WebInspector.UIString("Element is hidden"); 1263 return WebInspector.UIString("Element is hidden");
1260 } 1264 }
1261 } 1265 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698