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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js

Issue 1944993002: Revert of DevTools: fix focus restoration from command menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/ShortcutRegistry.js ('k') | 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). 4 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
5 * Copyright (C) 2009 Joseph Pecoraro 5 * Copyright (C) 2009 Joseph Pecoraro
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 10 *
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 this._zIndex = WebInspector._glassPane ? WebInspector._glassPane._zIndex + 1 000 : 3000; // Deliberately starts with 3000 to hide other z-indexed elements be low. 207 this._zIndex = WebInspector._glassPane ? WebInspector._glassPane._zIndex + 1 000 : 3000; // Deliberately starts with 3000 to hide other z-indexed elements be low.
208 this.element.style.cssText = "position:absolute;top:0;bottom:0;left:0;right: 0;background-color:" + background + ";z-index:" + this._zIndex + ";overflow:hidd en;"; 208 this.element.style.cssText = "position:absolute;top:0;bottom:0;left:0;right: 0;background-color:" + background + ";z-index:" + this._zIndex + ";overflow:hidd en;";
209 document.body.appendChild(this.element); 209 document.body.appendChild(this.element);
210 WebInspector._glassPane = this; 210 WebInspector._glassPane = this;
211 } 211 }
212 212
213 WebInspector.GlassPane.prototype = { 213 WebInspector.GlassPane.prototype = {
214 dispose: function() 214 dispose: function()
215 { 215 {
216 delete WebInspector._glassPane; 216 delete WebInspector._glassPane;
217 if (WebInspector.GlassPane.DefaultFocusedViewStack.length)
218 WebInspector.GlassPane.DefaultFocusedViewStack.peekLast().focus();
217 this.element.remove(); 219 this.element.remove();
218 } 220 }
219 } 221 }
220 222
221 /** @type {!WebInspector.GlassPane|undefined} */ 223 /** @type {!WebInspector.GlassPane|undefined} */
222 WebInspector._glassPane; 224 WebInspector._glassPane;
223 225
224 /** 226 /**
227 * @type {!Array.<!WebInspector.Widget|!WebInspector.Dialog>}
228 */
229 WebInspector.GlassPane.DefaultFocusedViewStack = [];
230
231 /**
225 * @param {?Node=} node 232 * @param {?Node=} node
226 * @return {boolean} 233 * @return {boolean}
227 */ 234 */
228 WebInspector.isBeingEdited = function(node) 235 WebInspector.isBeingEdited = function(node)
229 { 236 {
230 if (!node || node.nodeType !== Node.ELEMENT_NODE) 237 if (!node || node.nodeType !== Node.ELEMENT_NODE)
231 return false; 238 return false;
232 var element = /** {!Element} */ (node); 239 var element = /** {!Element} */ (node);
233 if (element.classList.contains("text-prompt") || element.nodeName === "INPUT " || element.nodeName === "TEXTAREA") 240 if (element.classList.contains("text-prompt") || element.nodeName === "INPUT " || element.nodeName === "TEXTAREA")
234 return true; 241 return true;
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after
1828 [NetworkAgent.ResourcePriority.High, WebInspector.UIString("High")], 1835 [NetworkAgent.ResourcePriority.High, WebInspector.UIString("High")],
1829 [NetworkAgent.ResourcePriority.VeryHigh, WebInspector.UIString("High est")] 1836 [NetworkAgent.ResourcePriority.VeryHigh, WebInspector.UIString("High est")]
1830 ]); 1837 ]);
1831 WebInspector.uiLabelForPriority._priorityToUILabel = labelMap; 1838 WebInspector.uiLabelForPriority._priorityToUILabel = labelMap;
1832 } 1839 }
1833 return labelMap.get(priority) || WebInspector.UIString("Unknown"); 1840 return labelMap.get(priority) || WebInspector.UIString("Unknown");
1834 } 1841 }
1835 1842
1836 /** @type {!WebInspector.ThemeSupport} */ 1843 /** @type {!WebInspector.ThemeSupport} */
1837 WebInspector.themeSupport; 1844 WebInspector.themeSupport;
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/ShortcutRegistry.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698