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

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

Issue 1922303004: DevTools: fix focus restoration from command menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary !! 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();
219 this.element.remove(); 217 this.element.remove();
220 } 218 }
221 } 219 }
222 220
223 /** @type {!WebInspector.GlassPane|undefined} */ 221 /** @type {!WebInspector.GlassPane|undefined} */
224 WebInspector._glassPane; 222 WebInspector._glassPane;
225 223
226 /** 224 /**
227 * @type {!Array.<!WebInspector.Widget|!WebInspector.Dialog>}
228 */
229 WebInspector.GlassPane.DefaultFocusedViewStack = [];
230
231 /**
232 * @param {?Node=} node 225 * @param {?Node=} node
233 * @return {boolean} 226 * @return {boolean}
234 */ 227 */
235 WebInspector.isBeingEdited = function(node) 228 WebInspector.isBeingEdited = function(node)
236 { 229 {
237 if (!node || node.nodeType !== Node.ELEMENT_NODE) 230 if (!node || node.nodeType !== Node.ELEMENT_NODE)
238 return false; 231 return false;
239 var element = /** {!Element} */ (node); 232 var element = /** {!Element} */ (node);
240 if (element.classList.contains("text-prompt") || element.nodeName === "INPUT " || element.nodeName === "TEXTAREA") 233 if (element.classList.contains("text-prompt") || element.nodeName === "INPUT " || element.nodeName === "TEXTAREA")
241 return true; 234 return true;
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after
1835 [NetworkAgent.ResourcePriority.High, WebInspector.UIString("High")], 1828 [NetworkAgent.ResourcePriority.High, WebInspector.UIString("High")],
1836 [NetworkAgent.ResourcePriority.VeryHigh, WebInspector.UIString("High est")] 1829 [NetworkAgent.ResourcePriority.VeryHigh, WebInspector.UIString("High est")]
1837 ]); 1830 ]);
1838 WebInspector.uiLabelForPriority._priorityToUILabel = labelMap; 1831 WebInspector.uiLabelForPriority._priorityToUILabel = labelMap;
1839 } 1832 }
1840 return labelMap.get(priority) || WebInspector.UIString("Unknown"); 1833 return labelMap.get(priority) || WebInspector.UIString("Unknown");
1841 } 1834 }
1842 1835
1843 /** @type {!WebInspector.ThemeSupport} */ 1836 /** @type {!WebInspector.ThemeSupport} */
1844 WebInspector.themeSupport; 1837 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