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"); | |
51 this._element.addEventListener("focus", this._onFocus.bind(this), false); | 50 this._element.addEventListener("focus", this._onFocus.bind(this), false); |
52 this._element.addEventListener("keydown", this._onKeyDown.bind(this), false)
; | 51 this._element.addEventListener("keydown", this._onKeyDown.bind(this), false)
; |
53 this._closeKeys = [ | 52 this._closeKeys = [ |
54 WebInspector.KeyboardShortcut.Keys.Enter.code, | 53 WebInspector.KeyboardShortcut.Keys.Enter.code, |
55 WebInspector.KeyboardShortcut.Keys.Esc.code, | 54 WebInspector.KeyboardShortcut.Keys.Esc.code, |
56 ]; | 55 ]; |
57 | 56 |
58 delegate.show(this._element); | 57 delegate.show(this._element); |
59 | 58 |
60 this._position(); | 59 this._position(); |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 { | 206 { |
208 return WebInspector.Dialog._modalHostView; | 207 return WebInspector.Dialog._modalHostView; |
209 }; | 208 }; |
210 | 209 |
211 WebInspector.Dialog.modalHostRepositioned = function() | 210 WebInspector.Dialog.modalHostRepositioned = function() |
212 { | 211 { |
213 if (WebInspector.Dialog._instance) | 212 if (WebInspector.Dialog._instance) |
214 WebInspector.Dialog._instance._position(); | 213 WebInspector.Dialog._instance._position(); |
215 }; | 214 }; |
216 | 215 |
OLD | NEW |