| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 } | 134 } |
| 135 }, | 135 }, |
| 136 | 136 |
| 137 /** | 137 /** |
| 138 * @return {!Promise<!DocumentFragment>} | 138 * @return {!Promise<!DocumentFragment>} |
| 139 */ | 139 */ |
| 140 _buildPopoverContents: function() | 140 _buildPopoverContents: function() |
| 141 { | 141 { |
| 142 var document = this.element.ownerDocument; | 142 var document = this.element.ownerDocument; |
| 143 var x = this._cursorPosition; | 143 var x = this._cursorPosition; |
| 144 var promises = this._overviewControls.map(control => control.popoverElem
entPromise(x)); | 144 var promises = this._overviewControls.map(mapToPopover); |
| 145 |
| 146 /** |
| 147 * @param {!WebInspector.TimelineOverview} control |
| 148 * @return {!Promise<?Element>} |
| 149 */ |
| 150 function mapToPopover(control) |
| 151 { |
| 152 return control.popoverElementPromise(x) |
| 153 } |
| 154 |
| 145 return Promise.all(promises).then(buildFragment); | 155 return Promise.all(promises).then(buildFragment); |
| 146 | 156 |
| 147 /** | 157 /** |
| 148 * @param {!Array<?Element>} elements | 158 * @param {!Array<?Element>} elements |
| 149 * @return {!DocumentFragment} | 159 * @return {!DocumentFragment} |
| 150 */ | 160 */ |
| 151 function buildFragment(elements) | 161 function buildFragment(elements) |
| 152 { | 162 { |
| 153 var fragment = document.createDocumentFragment(); | 163 var fragment = document.createDocumentFragment(); |
| 154 elements.remove(null); | 164 elements.remove(null); |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 }, | 632 }, |
| 623 | 633 |
| 624 resetCanvas: function() | 634 resetCanvas: function() |
| 625 { | 635 { |
| 626 this._canvas.width = this.element.clientWidth * window.devicePixelRatio; | 636 this._canvas.width = this.element.clientWidth * window.devicePixelRatio; |
| 627 this._canvas.height = this.element.clientHeight * window.devicePixelRati
o; | 637 this._canvas.height = this.element.clientHeight * window.devicePixelRati
o; |
| 628 }, | 638 }, |
| 629 | 639 |
| 630 __proto__: WebInspector.VBox.prototype | 640 __proto__: WebInspector.VBox.prototype |
| 631 } | 641 } |
| OLD | NEW |