Chromium Code Reviews| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 66 { | 66 { |
| 67 if (WebInspector.Dialog._instance) | 67 if (WebInspector.Dialog._instance) |
| 68 WebInspector.Dialog._instance.detach(); | 68 WebInspector.Dialog._instance.detach(); |
| 69 WebInspector.Dialog._instance = this; | 69 WebInspector.Dialog._instance = this; |
| 70 | 70 |
| 71 var document = /** @type {!Document} */ (WebInspector.Dialog._modalHostV iew.element.ownerDocument); | 71 var document = /** @type {!Document} */ (WebInspector.Dialog._modalHostV iew.element.ownerDocument); |
| 72 this._disableTabIndexOnElements(document); | 72 this._disableTabIndexOnElements(document); |
| 73 | 73 |
| 74 this._glassPane = new WebInspector.GlassPane(document, this._dimmed); | 74 this._glassPane = new WebInspector.GlassPane(document, this._dimmed); |
| 75 this._glassPane.element.addEventListener("click", this._onGlassPaneClick .bind(this), false); | 75 this._glassPane.element.addEventListener("click", this._onGlassPaneClick .bind(this), false); |
| 76 WebInspector.GlassPane.DefaultFocusedViewStack.push(this); | 76 WebInspector.GlassPane.DefaultFocusedViewStack.push(WebInspector.current FocusElement() || WebInspector.inspectorView); |
|
dgozman
2016/04/28 01:28:29
This makes me think whether we should unify Defaul
| |
| 77 | 77 |
| 78 WebInspector.Widget.prototype.show.call(this, this._glassPane.element); | 78 WebInspector.Widget.prototype.show.call(this, this._glassPane.element); |
| 79 | 79 |
| 80 this._position(); | 80 this._position(); |
| 81 this.focus(); | 81 this.focus(); |
| 82 }, | 82 }, |
| 83 | 83 |
| 84 /** | 84 /** |
| 85 * @override | 85 * @override |
| 86 */ | 86 */ |
| 87 detach: function() | 87 detach: function() |
| 88 { | 88 { |
| 89 WebInspector.Widget.prototype.detach.call(this); | 89 WebInspector.Widget.prototype.detach.call(this); |
| 90 | 90 this._glassPane.dispose(); |
| 91 WebInspector.GlassPane.DefaultFocusedViewStack.pop(); | 91 WebInspector.GlassPane.DefaultFocusedViewStack.pop(); |
| 92 this._glassPane.dispose(); | |
| 93 delete this._glassPane; | 92 delete this._glassPane; |
| 94 | 93 |
| 95 this._restoreTabIndexOnElements(); | 94 this._restoreTabIndexOnElements(); |
| 96 | 95 |
| 97 delete WebInspector.Dialog._instance; | 96 delete WebInspector.Dialog._instance; |
| 98 }, | 97 }, |
| 99 | 98 |
| 100 addCloseButton: function() | 99 addCloseButton: function() |
| 101 { | 100 { |
| 102 var closeButton = this.contentElement.createChild("div", "dialog-close-b utton", "dt-close-button"); | 101 var closeButton = this.contentElement.createChild("div", "dialog-close-b utton", "dt-close-button"); |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 251 { | 250 { |
| 252 return WebInspector.Dialog._modalHostView; | 251 return WebInspector.Dialog._modalHostView; |
| 253 }; | 252 }; |
| 254 | 253 |
| 255 WebInspector.Dialog.modalHostRepositioned = function() | 254 WebInspector.Dialog.modalHostRepositioned = function() |
| 256 { | 255 { |
| 257 if (WebInspector.Dialog._instance) | 256 if (WebInspector.Dialog._instance) |
| 258 WebInspector.Dialog._instance._position(); | 257 WebInspector.Dialog._instance._position(); |
| 259 }; | 258 }; |
| 260 | 259 |
| OLD | NEW |