| 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(mapToPopover); | 144 var promises = this._overviewControls.map(control => control.popoverElem
entPromise(x)); |
| 145 | |
| 146 /** | |
| 147 * @param {!WebInspector.TimelineOverview} control | |
| 148 * @return {!Promise<?Element>} | |
| 149 */ | |
| 150 function mapToPopover(control) | |
| 151 { | |
| 152 return control.popoverElementPromise(x) | |
| 153 } | |
| 154 | |
| 155 return Promise.all(promises).then(buildFragment); | 145 return Promise.all(promises).then(buildFragment); |
| 156 | 146 |
| 157 /** | 147 /** |
| 158 * @param {!Array<?Element>} elements | 148 * @param {!Array<?Element>} elements |
| 159 * @return {!DocumentFragment} | 149 * @return {!DocumentFragment} |
| 160 */ | 150 */ |
| 161 function buildFragment(elements) | 151 function buildFragment(elements) |
| 162 { | 152 { |
| 163 var fragment = document.createDocumentFragment(); | 153 var fragment = document.createDocumentFragment(); |
| 164 elements.remove(null); | 154 elements.remove(null); |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 }, | 632 }, |
| 643 | 633 |
| 644 resetCanvas: function() | 634 resetCanvas: function() |
| 645 { | 635 { |
| 646 this._canvas.width = this.element.clientWidth * window.devicePixelRatio; | 636 this._canvas.width = this.element.clientWidth * window.devicePixelRatio; |
| 647 this._canvas.height = this.element.clientHeight * window.devicePixelRati
o; | 637 this._canvas.height = this.element.clientHeight * window.devicePixelRati
o; |
| 648 }, | 638 }, |
| 649 | 639 |
| 650 __proto__: WebInspector.VBox.prototype | 640 __proto__: WebInspector.VBox.prototype |
| 651 } | 641 } |
| OLD | NEW |