| 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 20 matching lines...) Expand all Loading... |
| 31 /** | 31 /** |
| 32 * @constructor | 32 * @constructor |
| 33 * @param {!Element} relativeToElement | 33 * @param {!Element} relativeToElement |
| 34 * @param {!WebInspector.DialogDelegate} delegate | 34 * @param {!WebInspector.DialogDelegate} delegate |
| 35 */ | 35 */ |
| 36 WebInspector.Dialog = function(relativeToElement, delegate) | 36 WebInspector.Dialog = function(relativeToElement, delegate) |
| 37 { | 37 { |
| 38 this._delegate = delegate; | 38 this._delegate = delegate; |
| 39 this._relativeToElement = relativeToElement; | 39 this._relativeToElement = relativeToElement; |
| 40 | 40 |
| 41 this._glassPane = new WebInspector.GlassPane(); | 41 this._glassPane = new WebInspector.GlassPane(/** @type {!Document} */ (relat
iveToElement.ownerDocument)); |
| 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.addEventListener("focus", this._onFocus.bind(this), false); | 50 this._element.addEventListener("focus", this._onFocus.bind(this), false); |
| 51 this._element.addEventListener("keydown", this._onKeyDown.bind(this), false)
; | 51 this._element.addEventListener("keydown", this._onKeyDown.bind(this), false)
; |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 { | 206 { |
| 207 return WebInspector.Dialog._modalHostView; | 207 return WebInspector.Dialog._modalHostView; |
| 208 }; | 208 }; |
| 209 | 209 |
| 210 WebInspector.Dialog.modalHostRepositioned = function() | 210 WebInspector.Dialog.modalHostRepositioned = function() |
| 211 { | 211 { |
| 212 if (WebInspector.Dialog._instance) | 212 if (WebInspector.Dialog._instance) |
| 213 WebInspector.Dialog._instance._position(); | 213 WebInspector.Dialog._instance._position(); |
| 214 }; | 214 }; |
| 215 | 215 |
| OLD | NEW |