| OLD | NEW |
| (Empty) |
| 1 <!-- | |
| 2 Copyright 2012 Google Inc. All Rights Reserved. | |
| 3 | |
| 4 Licensed under the Apache License, Version 2.0 (the "License"); | |
| 5 you may not use this file except in compliance with the License. | |
| 6 You may obtain a copy of the License at | |
| 7 | |
| 8 http://www.apache.org/licenses/LICENSE-2.0 | |
| 9 | |
| 10 Unless required by applicable law or agreed to in writing, software | |
| 11 distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 See the License for the specific language governing permissions and | |
| 14 limitations under the License. | |
| 15 --> | |
| 16 | |
| 17 <!DOCTYPE html><meta charset="UTF-8"> | |
| 18 <style> | |
| 19 .anim { | |
| 20 left: 0px; | |
| 21 width: 100px; | |
| 22 height: 25px; | |
| 23 background-color: #FAA; | |
| 24 position: relative; | |
| 25 } | |
| 26 </style> | |
| 27 | |
| 28 <div id="a" class="anim"></div> | |
| 29 | |
| 30 <script src="../bootstrap.js"></script> | |
| 31 <script> | |
| 32 "use strict"; | |
| 33 | |
| 34 // This test case exhibits the kinda weird behavour that occurs when you have | |
| 35 // an inner animation which has a duration which is a multiple of the | |
| 36 // outer group's duration *and* you use direction: "alternate" | |
| 37 // | |
| 38 // See Bug 22402 about the specification | |
| 39 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=22402 | |
| 40 | |
| 41 var anim = new Animation( | |
| 42 document.getElementById("a"), [{left: "100px"}, {left: "500px"}], | |
| 43 {iterations: Infinity, duration: 1.0 * 1000, fill: 'forwards'}); | |
| 44 var animationGroup = new AnimationGroup([anim], | |
| 45 {direction: "alternate", duration: 1.0 * 1000, iterations: 3.0, fill: 'forwa
rds'}); | |
| 46 | |
| 47 document.timeline.play(animationGroup); | |
| 48 </script> | |
| OLD | NEW |