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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
49 this._element.addEventListener("keydown", this._onKeyDown.bind(this), false) ; | 49 this._element.addEventListener("keydown", this._onKeyDown.bind(this), false) ; |
50 this._closeKeys = [ | 50 this._closeKeys = [ |
51 WebInspector.KeyboardShortcut.Keys.Enter.code, | 51 WebInspector.KeyboardShortcut.Keys.Enter.code, |
52 WebInspector.KeyboardShortcut.Keys.Esc.code, | 52 WebInspector.KeyboardShortcut.Keys.Esc.code, |
53 ]; | 53 ]; |
54 | 54 |
55 delegate.show(this._element); | 55 delegate.show(this._element); |
56 | 56 |
57 this._position(); | 57 this._position(); |
58 this._delegate.focus(); | 58 this._delegate.focus(); |
59 WebInspector.context.setFlavor(WebInspector.Dialog, this); | |
pfeldman
2014/04/17 10:40:25
I don't think this makes sense.
apavlov
2014/04/17 12:42:22
Done.
| |
59 } | 60 } |
60 | 61 |
61 /** | 62 /** |
62 * @return {?WebInspector.Dialog} | 63 * @return {?WebInspector.Dialog} |
63 */ | 64 */ |
64 WebInspector.Dialog.currentInstance = function() | 65 WebInspector.Dialog.currentInstance = function() |
65 { | 66 { |
66 return WebInspector.Dialog._instance; | 67 return WebInspector.Dialog._instance; |
67 } | 68 } |
68 | 69 |
(...skipping 19 matching lines...) Expand all Loading... | |
88 _hide: function() | 89 _hide: function() |
89 { | 90 { |
90 if (this._isHiding) | 91 if (this._isHiding) |
91 return; | 92 return; |
92 this._isHiding = true; | 93 this._isHiding = true; |
93 | 94 |
94 this._delegate.willHide(); | 95 this._delegate.willHide(); |
95 | 96 |
96 delete WebInspector.Dialog._instance; | 97 delete WebInspector.Dialog._instance; |
97 this._glassPane.dispose(); | 98 this._glassPane.dispose(); |
99 WebInspector.context.setFlavor(WebInspector.Dialog, null); | |
98 }, | 100 }, |
99 | 101 |
100 _onGlassPaneFocus: function(event) | 102 _onGlassPaneFocus: function(event) |
101 { | 103 { |
102 this._hide(); | 104 this._hide(); |
103 }, | 105 }, |
104 | 106 |
105 _onFocus: function(event) | 107 _onFocus: function(event) |
106 { | 108 { |
107 this._delegate.focus(); | 109 this._delegate.focus(); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
198 { | 200 { |
199 return WebInspector.Dialog._modalHostView; | 201 return WebInspector.Dialog._modalHostView; |
200 }; | 202 }; |
201 | 203 |
202 WebInspector.Dialog.modalHostRepositioned = function() | 204 WebInspector.Dialog.modalHostRepositioned = function() |
203 { | 205 { |
204 if (WebInspector.Dialog._instance) | 206 if (WebInspector.Dialog._instance) |
205 WebInspector.Dialog._instance._position(); | 207 WebInspector.Dialog._instance._position(); |
206 }; | 208 }; |
207 | 209 |
OLD | NEW |