| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 // This should not happen, but we hide previous popup to be on the safe
side. | 91 // This should not happen, but we hide previous popup to be on the safe
side. |
| 92 if (WebInspector.Popover._popover) | 92 if (WebInspector.Popover._popover) |
| 93 WebInspector.Popover._popover.hide(); | 93 WebInspector.Popover._popover.hide(); |
| 94 WebInspector.Popover._popover = this; | 94 WebInspector.Popover._popover = this; |
| 95 | 95 |
| 96 var document = anchor instanceof Element ? anchor.ownerDocument : conten
tElement.ownerDocument; | 96 var document = anchor instanceof Element ? anchor.ownerDocument : conten
tElement.ownerDocument; |
| 97 var window = document.defaultView; | 97 var window = document.defaultView; |
| 98 | 98 |
| 99 // Temporarily attach in order to measure preferred dimensions. | 99 // Temporarily attach in order to measure preferred dimensions. |
| 100 var preferredSize = view ? view.measurePreferredSize() : this._contentEl
ement.measurePreferredSize(); | 100 var preferredSize = view ? view.measurePreferredSize() : WebInspector.me
asurePreferredSize(this._contentElement); |
| 101 preferredWidth = preferredWidth || preferredSize.width; | 101 preferredWidth = preferredWidth || preferredSize.width; |
| 102 preferredHeight = preferredHeight || preferredSize.height; | 102 preferredHeight = preferredHeight || preferredSize.height; |
| 103 | 103 |
| 104 window.addEventListener("resize", this._hideBound, false); | 104 window.addEventListener("resize", this._hideBound, false); |
| 105 document.body.appendChild(this._containerElement); | 105 document.body.appendChild(this._containerElement); |
| 106 WebInspector.View.prototype.show.call(this, this._containerElement); | 106 WebInspector.View.prototype.show.call(this, this._containerElement); |
| 107 | 107 |
| 108 if (view) | 108 if (view) |
| 109 view.show(this._contentDiv); | 109 view.show(this._contentDiv); |
| 110 else | 110 else |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 this._resetHoverTimer(); | 402 this._resetHoverTimer(); |
| 403 } | 403 } |
| 404 } | 404 } |
| 405 } | 405 } |
| 406 | 406 |
| 407 /** @enum {string} */ | 407 /** @enum {string} */ |
| 408 WebInspector.Popover.Orientation = { | 408 WebInspector.Popover.Orientation = { |
| 409 Top: "top", | 409 Top: "top", |
| 410 Bottom: "bottom" | 410 Bottom: "bottom" |
| 411 } | 411 } |
| OLD | NEW |