summaryrefslogtreecommitdiffstats
path: root/layout/reftests/svg/smil/syncbase/cycle-invalid-3.svg
blob: 9e7d460affc146b2f3a37dbc83348d5b2b426be6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<svg xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink"
     class="reftest-wait"
     onload="setTimeAndSnapshot(2, true)">
  <script xlink:href="../smil-util.js" type="text/javascript"/>
  <!--
    An invalid cycle that propagates backwards.
    Example 4 from SMIL3 section 5.4.5.

    Regarding cycle detection SMIL 3.0 says:

    "When a cycle is detected, the change propagation is ignored. The element
    that detected the second visit ignores the second change notice, and so
    breaks the cycle."

    So we are only concerned with cycles amongst CHANGE notices. We understand
    this as follows:

    a: 5s-7s
    new -> b: 4s-6s
    new -> a: 3s-5s
    change -> b: 2s-4s
    change -> a: 1s-3s
    change -> b: second change notice, break cycle!

    Thus giving us:
    a: 1s-3s; 3s-5s; 5s-7s
    b: 2s-4s; 4s-6s

    Opera gives us:
    a: -1s-1s; 1s-3s; 3s-5s; 5s-7s
    b: 0s-2s; 2s-4s; 4s-6s

    Safari gives us:
    a: 3s-5s; 5s-7s
    b: 2s-4s; 4s-6s

    Batik 1.7 gives:
    a: 5s-7s
    b: 4s-6s

    Currently we have the result described above, i.e.
    a: 1s-3s; 3s-5s; 5s-7s
    b: 2s-4s; 4s-6s

   -->
  <rect y="100" width="100" height="100" fill="red">
    <animate attributeName="y" attributeType="XML" from="-50" to="50" id="a"
      begin="5s; b.begin-1s" dur="2s"/>
    <animate attributeName="fill" attributeType="CSS" id="b"
      values="green; orange"
      begin="a.begin-1s" dur="2s"/>
  </rect>
</svg>