OLD | NEW |
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 29 matching lines...) Expand all Loading... |
40 | 40 |
41 this._glassPane = new WebInspector.GlassPane(); | 41 this._glassPane = new WebInspector.GlassPane(); |
42 WebInspector.GlassPane.DefaultFocusedViewStack.push(this); | 42 WebInspector.GlassPane.DefaultFocusedViewStack.push(this); |
43 | 43 |
44 // Install glass pane capturing events. | 44 // Install glass pane capturing events. |
45 this._glassPane.element.tabIndex = 0; | 45 this._glassPane.element.tabIndex = 0; |
46 this._glassPane.element.addEventListener("focus", this._onGlassPaneFocus.bin
d(this), false); | 46 this._glassPane.element.addEventListener("focus", this._onGlassPaneFocus.bin
d(this), false); |
47 | 47 |
48 this._element = this._glassPane.element.createChild("div"); | 48 this._element = this._glassPane.element.createChild("div"); |
49 this._element.tabIndex = 0; | 49 this._element.tabIndex = 0; |
| 50 this._element.classList.add("component-root"); |
50 this._element.addEventListener("focus", this._onFocus.bind(this), false); | 51 this._element.addEventListener("focus", this._onFocus.bind(this), false); |
51 this._element.addEventListener("keydown", this._onKeyDown.bind(this), false)
; | 52 this._element.addEventListener("keydown", this._onKeyDown.bind(this), false)
; |
52 this._closeKeys = [ | 53 this._closeKeys = [ |
53 WebInspector.KeyboardShortcut.Keys.Enter.code, | 54 WebInspector.KeyboardShortcut.Keys.Enter.code, |
54 WebInspector.KeyboardShortcut.Keys.Esc.code, | 55 WebInspector.KeyboardShortcut.Keys.Esc.code, |
55 ]; | 56 ]; |
56 | 57 |
57 delegate.show(this._element); | 58 delegate.show(this._element); |
58 | 59 |
59 this._position(); | 60 this._position(); |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 { | 207 { |
207 return WebInspector.Dialog._modalHostView; | 208 return WebInspector.Dialog._modalHostView; |
208 }; | 209 }; |
209 | 210 |
210 WebInspector.Dialog.modalHostRepositioned = function() | 211 WebInspector.Dialog.modalHostRepositioned = function() |
211 { | 212 { |
212 if (WebInspector.Dialog._instance) | 213 if (WebInspector.Dialog._instance) |
213 WebInspector.Dialog._instance._position(); | 214 WebInspector.Dialog._instance._position(); |
214 }; | 215 }; |
215 | 216 |
OLD | NEW |