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: Source/devtools/front_end/ui/Dialog.js

Issue 1327903003: DevTools: tint the glass pane when modal dialog is being shown (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 | « Source/devtools/front_end/dialog.css ('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 28 matching lines...) Expand all
39 this._delegate = delegate; 39 this._delegate = delegate;
40 this._relativeToElement = relativeToElement; 40 this._relativeToElement = relativeToElement;
41 this._modal = modal; 41 this._modal = modal;
42 42
43 this._glassPane = new WebInspector.GlassPane(/** @type {!Document} */ (relat iveToElement.ownerDocument)); 43 this._glassPane = new WebInspector.GlassPane(/** @type {!Document} */ (relat iveToElement.ownerDocument));
44 WebInspector.GlassPane.DefaultFocusedViewStack.push(this); 44 WebInspector.GlassPane.DefaultFocusedViewStack.push(this);
45 45
46 // Install glass pane capturing events. 46 // Install glass pane capturing events.
47 this._glassPane.element.tabIndex = 0; 47 this._glassPane.element.tabIndex = 0;
48 this._glassPane.element.addEventListener("focus", this._onGlassPaneFocus.bin d(this), false); 48 this._glassPane.element.addEventListener("focus", this._onGlassPaneFocus.bin d(this), false);
49 if (this._modal)
50 this._glassPane.element.classList.add("tinted");
49 51
50 this._element = this._glassPane.element.createChild("div"); 52 this._element = this._glassPane.element.createChild("div");
51 this._element.tabIndex = 0; 53 this._element.tabIndex = 0;
52 this._element.addEventListener("focus", this._onFocus.bind(this), false); 54 this._element.addEventListener("focus", this._onFocus.bind(this), false);
53 this._element.addEventListener("keydown", this._onKeyDown.bind(this), false) ; 55 this._element.addEventListener("keydown", this._onKeyDown.bind(this), false) ;
54 this._closeKeys = [ 56 this._closeKeys = [
55 WebInspector.KeyboardShortcut.Keys.Enter.code, 57 WebInspector.KeyboardShortcut.Keys.Enter.code,
56 WebInspector.KeyboardShortcut.Keys.Esc.code, 58 WebInspector.KeyboardShortcut.Keys.Esc.code,
57 ]; 59 ];
58 60
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 { 226 {
225 return WebInspector.Dialog._modalHostView; 227 return WebInspector.Dialog._modalHostView;
226 }; 228 };
227 229
228 WebInspector.Dialog.modalHostRepositioned = function() 230 WebInspector.Dialog.modalHostRepositioned = function()
229 { 231 {
230 if (WebInspector.Dialog._instance) 232 if (WebInspector.Dialog._instance)
231 WebInspector.Dialog._instance._position(); 233 WebInspector.Dialog._instance._position();
232 }; 234 };
233 235
OLDNEW
« no previous file with comments | « Source/devtools/front_end/dialog.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698