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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 } | 54 } |
55 | 55 |
56 /** | 56 /** |
57 * @override | 57 * @override |
58 * @param {!Document|!Element=} where | 58 * @param {!Document|!Element=} where |
59 */ | 59 */ |
60 show(where) { | 60 show(where) { |
61 var document = /** @type {!Document} */ ( | 61 var document = /** @type {!Document} */ ( |
62 where instanceof Document ? where : (where || UI.inspectorView.element).
ownerDocument); | 62 where instanceof Document ? where : (where || UI.inspectorView.element).
ownerDocument); |
63 if (UI.Dialog._instance) | 63 if (UI.Dialog._instance) |
64 UI.Dialog._instance.detach(); | 64 UI.Dialog._instance.hide(); |
65 UI.Dialog._instance = this; | 65 UI.Dialog._instance = this; |
66 this._disableTabIndexOnElements(document); | 66 this._disableTabIndexOnElements(document); |
67 super.show(document); | 67 super.show(document); |
68 this._focusRestorer = new UI.WidgetFocusRestorer(this.widget()); | 68 this._focusRestorer = new UI.WidgetFocusRestorer(this.widget()); |
69 } | 69 } |
70 | 70 |
71 /** | 71 /** |
72 * @override | 72 * @override |
73 */ | 73 */ |
74 hide() { | 74 hide() { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 /** | 110 /** |
111 * @param {!Event} event | 111 * @param {!Event} event |
112 */ | 112 */ |
113 _onKeyDown(event) { | 113 _onKeyDown(event) { |
114 if (event.keyCode === UI.KeyboardShortcut.Keys.Esc.code) { | 114 if (event.keyCode === UI.KeyboardShortcut.Keys.Esc.code) { |
115 event.consume(true); | 115 event.consume(true); |
116 this.hide(); | 116 this.hide(); |
117 } | 117 } |
118 } | 118 } |
119 }; | 119 }; |
OLD | NEW |