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

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

Issue 2879943003: DevTools: render product badges behind the setting. (Closed)
Patch Set: removed module from the list. Created 3 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/timeline/TimelineUIUtils.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 UI.Dialog = class extends UI.GlassPane { 31 UI.Dialog = class extends UI.GlassPane {
32 constructor() { 32 constructor() {
33 super(); 33 super();
34 this.registerRequiredCSS('ui/dialog.css'); 34 this.registerRequiredCSS('ui/dialog.css');
35 this.contentElement.tabIndex = 0; 35 this.contentElement.tabIndex = 0;
36 this.contentElement.addEventListener('focus', () => this.widget().focus(), f alse); 36 this.contentElement.addEventListener('focus', () => this.widget().focus(), f alse);
37 this.contentElement.addEventListener('keydown', this._onKeyDown.bind(this), false); 37 this.contentElement.addEventListener('keydown', this._onKeyDown.bind(this), false);
38 this.widget().setDefaultFocusedElement(this.contentElement);
38 this.setPointerEventsBehavior(UI.GlassPane.PointerEventsBehavior.BlockedByGl assPane); 39 this.setPointerEventsBehavior(UI.GlassPane.PointerEventsBehavior.BlockedByGl assPane);
39 this.setOutsideClickCallback(event => { 40 this.setOutsideClickCallback(event => {
40 this.hide(); 41 this.hide();
41 event.consume(true); 42 event.consume(true);
42 }); 43 });
43 /** @type {!Map<!HTMLElement, number>} */ 44 /** @type {!Map<!HTMLElement, number>} */
44 this._tabIndexMap = new Map(); 45 this._tabIndexMap = new Map();
45 /** @type {?UI.WidgetFocusRestorer} */ 46 /** @type {?UI.WidgetFocusRestorer} */
46 this._focusRestorer = null; 47 this._focusRestorer = null;
47 this._closeOnEscape = true; 48 this._closeOnEscape = true;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 /** 119 /**
119 * @param {!Event} event 120 * @param {!Event} event
120 */ 121 */
121 _onKeyDown(event) { 122 _onKeyDown(event) {
122 if (this._closeOnEscape && event.keyCode === UI.KeyboardShortcut.Keys.Esc.co de) { 123 if (this._closeOnEscape && event.keyCode === UI.KeyboardShortcut.Keys.Esc.co de) {
123 event.consume(true); 124 event.consume(true);
124 this.hide(); 125 this.hide();
125 } 126 }
126 } 127 }
127 }; 128 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698