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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/components/InspectElementModeController.js

Issue 1403853002: Devtools: DOM inspection follows inspect cursor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 5 years, 2 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 10 *
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 /** 159 /**
160 * @override 160 * @override
161 * @param {!WebInspector.Context} context 161 * @param {!WebInspector.Context} context
162 * @param {string} actionId 162 * @param {string} actionId
163 */ 163 */
164 handleAction: function(context, actionId) 164 handleAction: function(context, actionId)
165 { 165 {
166 if (!WebInspector.inspectElementModeController) 166 if (!WebInspector.inspectElementModeController)
167 return; 167 return;
168 WebInspector.inspectElementModeController._toggleInspectMode(); 168 WebInspector.inspectElementModeController._toggleInspectMode();
169
170 if (WebInspector.inspectElementModeController.isInInspectElementMode())
171 return;
172
173 var node = WebInspector.context.flavor(WebInspector.DOMNode);
174 if (node)
175 WebInspector.Revealer.reveal(node);
169 } 176 }
170 } 177 }
171 178
172 /** 179 /**
173 * @constructor 180 * @constructor
174 * @implements {WebInspector.ToolbarItem.Provider} 181 * @implements {WebInspector.ToolbarItem.Provider}
175 */ 182 */
176 WebInspector.InspectElementModeController.ToggleButtonProvider = function() 183 WebInspector.InspectElementModeController.ToggleButtonProvider = function()
177 { 184 {
178 } 185 }
(...skipping 29 matching lines...) Expand all
208 { 215 {
209 if (!WebInspector.inspectElementModeController) 216 if (!WebInspector.inspectElementModeController)
210 return null; 217 return null;
211 218
212 return WebInspector.inspectElementModeController._layoutEditorButton; 219 return WebInspector.inspectElementModeController._layoutEditorButton;
213 } 220 }
214 } 221 }
215 222
216 /** @type {?WebInspector.InspectElementModeController} */ 223 /** @type {?WebInspector.InspectElementModeController} */
217 WebInspector.inspectElementModeController = null; 224 WebInspector.inspectElementModeController = null;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698