| 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 22 matching lines...) Expand all Loading... |
| 33 * @extends {WebInspector.View} | 33 * @extends {WebInspector.View} |
| 34 * @param {!WebInspector.PopoverHelper=} popoverHelper | 34 * @param {!WebInspector.PopoverHelper=} popoverHelper |
| 35 */ | 35 */ |
| 36 WebInspector.Popover = function(popoverHelper) | 36 WebInspector.Popover = function(popoverHelper) |
| 37 { | 37 { |
| 38 WebInspector.View.call(this); | 38 WebInspector.View.call(this); |
| 39 this.markAsRoot(); | 39 this.markAsRoot(); |
| 40 this.element.className = "popover custom-popup-vertical-scroll custom-popup-
horizontal-scroll"; // Override | 40 this.element.className = "popover custom-popup-vertical-scroll custom-popup-
horizontal-scroll"; // Override |
| 41 this._containerElement = document.createElementWithClass("div", "fill popove
r-container"); | 41 this._containerElement = document.createElementWithClass("div", "fill popove
r-container"); |
| 42 | 42 |
| 43 this._popupArrowElement = document.createElement("div"); | 43 this._popupArrowElement = this.element.createChild("div", "arrow"); |
| 44 this._popupArrowElement.className = "arrow"; | 44 this._contentDiv = this.element.createChild("div", "content"); |
| 45 this.element.appendChild(this._popupArrowElement); | |
| 46 | |
| 47 this._contentDiv = document.createElement("div"); | |
| 48 this._contentDiv.className = "content"; | |
| 49 this.element.appendChild(this._contentDiv); | |
| 50 | 45 |
| 51 this._popoverHelper = popoverHelper; | 46 this._popoverHelper = popoverHelper; |
| 52 this._hideBound = this.hide.bind(this); | 47 this._hideBound = this.hide.bind(this); |
| 53 } | 48 } |
| 54 | 49 |
| 55 WebInspector.Popover.prototype = { | 50 WebInspector.Popover.prototype = { |
| 56 /** | 51 /** |
| 57 * @param {!Element} element | 52 * @param {!Element} element |
| 58 * @param {!Element|!AnchorBox} anchor | 53 * @param {!Element|!AnchorBox} anchor |
| 59 * @param {?number=} preferredWidth | 54 * @param {?number=} preferredWidth |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 this._resetHoverTimer(); | 387 this._resetHoverTimer(); |
| 393 } | 388 } |
| 394 } | 389 } |
| 395 } | 390 } |
| 396 | 391 |
| 397 /** @enum {string} */ | 392 /** @enum {string} */ |
| 398 WebInspector.Popover.Orientation = { | 393 WebInspector.Popover.Orientation = { |
| 399 Top: "top", | 394 Top: "top", |
| 400 Bottom: "bottom" | 395 Bottom: "bottom" |
| 401 } | 396 } |
| OLD | NEW |