summaryrefslogtreecommitdiffstats
path: root/layout/reftests/svg/smil/repeat
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /layout/reftests/svg/smil/repeat
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/svg/smil/repeat')
-rw-r--r--layout/reftests/svg/smil/repeat/green-box-ref.svg3
-rw-r--r--layout/reftests/svg/smil/repeat/indefinite-repeat-1.svg9
-rw-r--r--layout/reftests/svg/smil/repeat/init-repeat-1-ref.svg8
-rw-r--r--layout/reftests/svg/smil/repeat/init-repeat-1.svg47
-rw-r--r--layout/reftests/svg/smil/repeat/reftest.list3
5 files changed, 70 insertions, 0 deletions
diff --git a/layout/reftests/svg/smil/repeat/green-box-ref.svg b/layout/reftests/svg/smil/repeat/green-box-ref.svg
new file mode 100644
index 0000000000..120941444a
--- /dev/null
+++ b/layout/reftests/svg/smil/repeat/green-box-ref.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+ <rect width="100" height="100" fill="green"/>
+</svg>
diff --git a/layout/reftests/svg/smil/repeat/indefinite-repeat-1.svg b/layout/reftests/svg/smil/repeat/indefinite-repeat-1.svg
new file mode 100644
index 0000000000..5283736bdb
--- /dev/null
+++ b/layout/reftests/svg/smil/repeat/indefinite-repeat-1.svg
@@ -0,0 +1,9 @@
+<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ class="reftest-wait"
+ onload="setTimeAndSnapshot(5)">
+ <script xlink:href="../smil-util.js" type="text/javascript"/>
+ <rect width="100" height="100" fill="red">
+ <set attributeName="fill" to="green" dur="1s" repeatDur="indefinite"/>
+ </rect>
+</svg>
diff --git a/layout/reftests/svg/smil/repeat/init-repeat-1-ref.svg b/layout/reftests/svg/smil/repeat/init-repeat-1-ref.svg
new file mode 100644
index 0000000000..88af1199fd
--- /dev/null
+++ b/layout/reftests/svg/smil/repeat/init-repeat-1-ref.svg
@@ -0,0 +1,8 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+ <g transform="translate(50 50)">
+ <circle r="40" style="fill: yellow; stroke: black; stroke-width: 1"/>
+ <path d="M0 -10v20" stroke="blue"/>
+ <path d="M100 -10v20" stroke="blue"/>
+ <path d="M200 -10v20" stroke="blue"/>
+ </g>
+</svg>
diff --git a/layout/reftests/svg/smil/repeat/init-repeat-1.svg b/layout/reftests/svg/smil/repeat/init-repeat-1.svg
new file mode 100644
index 0000000000..7481fbcba8
--- /dev/null
+++ b/layout/reftests/svg/smil/repeat/init-repeat-1.svg
@@ -0,0 +1,47 @@
+<!--
+ The following tests an anomaly in the SMIL Animation spec.
+
+ SMILANIM 3.6.8 says:
+
+ Thus the strict definition of the first acceptable interval for the element
+ is the first interval that ends after the document begins.
+
+ This is then demonstrated in pseudocode.
+
+ However, it is contradicted by a statement just before the first that says:
+
+ The element has one or more intervals defined that begin and end before the
+ document begins (before 0). These are filtered out of the model.
+
+ So there is some ambiguity about intervals that end at time zero. However, the
+ first statement seems more authorative ("the strict definition") and the
+ second statement does not explicitly say that intervals that end at t=0 are
+ not filtered. Furthermore, the pseudocode is in agreement with the first
+ statement so we conclude that if an interval finishes at time zero it is not
+ an acceptable interval and is filtered out.
+
+ The following animation sets up such an interval, that, based on its
+ repeatCount has an active duration of 1s, producing an interval of (-1s, 0s).
+ Therefore this interval should be filtered out and no animation effect should
+ be produced. The circle should remain at position 0 (the first marker). If the
+ interval is not correctly filtered out it will be at position 100 (the second
+ marker).
+
+ We include this test as a regression test so that no one is tempted to "fix"
+ this behaviour.
+
+ Note that this behaviour persists even in SMIL 3 (including the ambiguity
+ noted above).
+ See http://www.w3.org/TR/SMIL3/smil-timing.html#Timing-BeginEnd-LC-Start
+ -->
+<svg xmlns="http://www.w3.org/2000/svg">
+ <g transform="translate(50 50)">
+ <circle r="40" style="fill: yellow; stroke: black; stroke-width: 1">
+ <animate attributeName="cx" attributeType="XML" fill="freeze"
+ values="0; 200" dur="2s" begin="-1s" repeatCount="0.5"/>
+ </circle>
+ <path d="M0 -10v20" stroke="blue"/>
+ <path d="M100 -10v20" stroke="blue"/>
+ <path d="M200 -10v20" stroke="blue"/>
+ </g>
+</svg>
diff --git a/layout/reftests/svg/smil/repeat/reftest.list b/layout/reftests/svg/smil/repeat/reftest.list
new file mode 100644
index 0000000000..9249500c7c
--- /dev/null
+++ b/layout/reftests/svg/smil/repeat/reftest.list
@@ -0,0 +1,3 @@
+# Tests for repeat behaviour
+== indefinite-repeat-1.svg green-box-ref.svg
+== init-repeat-1.svg init-repeat-1-ref.svg