OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 /** | 4 /** |
5 * @implements {SDK.SDKModelObserver<!Animation.AnimationModel>} | 5 * @implements {SDK.SDKModelObserver<!Animation.AnimationModel>} |
6 * @unrestricted | 6 * @unrestricted |
7 */ | 7 */ |
8 Animation.AnimationTimeline = class extends UI.VBox { | 8 Animation.AnimationTimeline = class extends UI.VBox { |
9 constructor() { | 9 constructor() { |
10 super(true); | 10 super(true); |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 * @param {!Element} element | 165 * @param {!Element} element |
166 * @param {!Event} event | 166 * @param {!Event} event |
167 * @return {!Element|!AnchorBox|undefined} | 167 * @return {!Element|!AnchorBox|undefined} |
168 */ | 168 */ |
169 _getPopoverAnchor(element, event) { | 169 _getPopoverAnchor(element, event) { |
170 if (element.isDescendant(this._previewContainer)) | 170 if (element.isDescendant(this._previewContainer)) |
171 return element; | 171 return element; |
172 } | 172 } |
173 | 173 |
174 /** | 174 /** |
175 * @param {!Element} anchor | 175 * @param {!Element|!AnchorBox} anchor |
176 * @param {!UI.GlassPane} popover | 176 * @param {!UI.GlassPane} popover |
177 * @return {!Promise<boolean>} | 177 * @return {!Promise<boolean>} |
178 */ | 178 */ |
179 _showPopover(anchor, popover) { | 179 _showPopover(anchor, popover) { |
180 var animGroup; | 180 var animGroup; |
181 for (var group of this._previewMap.keysArray()) { | 181 for (var group of this._previewMap.keysArray()) { |
182 if (this._previewMap.get(group).element === anchor.parentElement) | 182 if (this._previewMap.get(group).element === anchor.parentElement) |
183 animGroup = group; | 183 animGroup = group; |
184 } | 184 } |
185 console.assert(animGroup); | 185 console.assert(animGroup); |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 static parse(text) { | 733 static parse(text) { |
734 var match = text.match(/^steps\((\d+), (start|middle)\)$/); | 734 var match = text.match(/^steps\((\d+), (start|middle)\)$/); |
735 if (match) | 735 if (match) |
736 return new Animation.AnimationTimeline.StepTimingFunction(parseInt(match[1
], 10), match[2]); | 736 return new Animation.AnimationTimeline.StepTimingFunction(parseInt(match[1
], 10), match[2]); |
737 match = text.match(/^steps\((\d+)\)$/); | 737 match = text.match(/^steps\((\d+)\)$/); |
738 if (match) | 738 if (match) |
739 return new Animation.AnimationTimeline.StepTimingFunction(parseInt(match[1
], 10), 'end'); | 739 return new Animation.AnimationTimeline.StepTimingFunction(parseInt(match[1
], 10), 'end'); |
740 return null; | 740 return null; |
741 } | 741 } |
742 }; | 742 }; |
OLD | NEW |