Skip to content

Commit d767e23

Browse files
Ahmad-S792Ahmad Saleem
authored andcommitted
Sync svg/animations from WPT upstream
https://bugs.webkit.org/show_bug.cgi?id=291806 rdar://149630148 Reviewed by Tim Nguyen. Upstream commit: web-platform-tests/wpt@8d124db * LayoutTests/TestExpectations: * LayoutTests/imported/w3c/resources/resource-files.json: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/w3c-import.log: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/reftests/reference/w3c-import.log: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/reftests/reference/green-100x100.svg: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/historical.html: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/historical-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/crashtests/w3c-import.log: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/crashtests/firefox-bug-1949899.html: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/crashtests/firefox-bug-1930221.html: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/animate-display-to-none-001.html: * LayoutTests/imported/w3c/web-platform-tests/svg/animations/animate-display-to-none-001-expected.html: Canonical link: https://commits.webkit.org/293910@main
1 parent d96ba07 commit d767e23

File tree

12 files changed

+124
-0
lines changed

12 files changed

+124
-0
lines changed

LayoutTests/TestExpectations

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2179,6 +2179,7 @@ imported/w3c/web-platform-tests/svg/animations/conditional-processing-01.html [
21792179
imported/w3c/web-platform-tests/svg/animations/stop-animation-01.html [ ImageOnlyFailure ]
21802180
imported/w3c/web-platform-tests/svg/animations/switch-animation-01.html [ ImageOnlyFailure ]
21812181
imported/w3c/web-platform-tests/svg/animations/switch-animation-02.html [ ImageOnlyFailure ]
2182+
imported/w3c/web-platform-tests/svg/animations/animate-display-to-none-001.html [ ImageOnlyFailure ]
21822183
imported/w3c/web-platform-tests/svg/embedded/image-crossorigin.sub.html [ Skip ]
21832184
imported/w3c/web-platform-tests/svg/embedded/image-embedding-svg-with-near-integral-width.html [ ImageOnlyFailure ]
21842185
imported/w3c/web-platform-tests/svg/embedded/image-fractional-width-vertical-fidelity.svg [ ImageOnlyFailure ]

LayoutTests/imported/w3c/resources/resource-files.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10722,6 +10722,7 @@
1072210722
"web-platform-tests/shadow-dom/untriaged/shadow-trees/shadow-root-001-ref.html",
1072310723
"web-platform-tests/shadow-dom/untriaged/shadow-trees/shadow-root-002-ref.html",
1072410724
"web-platform-tests/shadow-dom/untriaged/styles/not-apply-in-shadow-root-001-ref.html",
10725+
"web-platform-tests/svg/animations/reftests/reference/green-100x100.svg",
1072510726
"web-platform-tests/svg/coordinate-systems/support/abspos-ref.html",
1072610727
"web-platform-tests/svg/coordinate-systems/support/simple.svg",
1072710728
"web-platform-tests/svg/coordinate-systems/support/viewBox-change-repaint-001-ref.html",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<!DOCTYPE html>
2+
<div style="width: 100px; height: 100px; background-color: green"></div>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!doctype html>
2+
<meta charset="utf-8">
3+
<title>Test that underlying style gets restored when seeking away from the
4+
'to' portion of a SVG/SMIL animation to 'display:none'</title>
5+
<link rel="help" href="https://www.w3.org/TR/smil-animation/#ToAttribute">
6+
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
7+
<link rel="match" href="../struct/reftests/reference/green-100x100.html">
8+
<script>
9+
function go() {
10+
svgElem.pauseAnimations();
11+
12+
/* Seek to 75% of the way through duration, when the animation should be
13+
* imposing the "to" value. (This is necessary to trigger the bug
14+
* that we're regression-testing for here.) */
15+
svgElem.setCurrentTime(3);
16+
17+
/* Now, seek back to 25% of the way through duration, when the underlying
18+
* value should be restored. This should make the green rect show up
19+
* in our reftest screenshot. */
20+
svgElem.setCurrentTime(1);
21+
}
22+
</script>
23+
<body onload="go()">
24+
<svg id="svgElem">
25+
<rect width="100" height="100" fill="red"/>
26+
<rect width="100" height="100" fill="green">
27+
<animate attributeName="display" to="none"
28+
begin="0s" dur="4s"/>
29+
</rect>
30+
</svg>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<script>
2+
document.addEventListener('DOMContentLoaded', () => {
3+
document.getElementById("x").beginElementAt(-1369430904473181976352858)
4+
})
5+
</script>
6+
<svg>
7+
<animate id="x" begin="a" />
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<script>
2+
function go() {
3+
a.setAttribute("repeatDur", "indefinite")
4+
a.setAttribute("fill", "freeze")
5+
}
6+
</script>
7+
<body onload="go()">
8+
<svg>
9+
<animateMotion id="a" min="300ms" repeatDur="0s">
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
The tests in this directory were imported from the W3C repository.
2+
Do NOT modify these tests directly in WebKit.
3+
Instead, create a pull request on the WPT github:
4+
https://github.com/web-platform-tests/wpt
5+
6+
Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
7+
8+
Do NOT modify or remove this file.
9+
10+
------------------------------------------------------------------------
11+
Properties requiring vendor prefixes:
12+
None
13+
Property values requiring vendor prefixes:
14+
None
15+
------------------------------------------------------------------------
16+
List of files:
17+
/LayoutTests/imported/w3c/web-platform-tests/svg/animations/crashtests/firefox-bug-1930221.html
18+
/LayoutTests/imported/w3c/web-platform-tests/svg/animations/crashtests/firefox-bug-1949899.html
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
PASS discard element
3+
PASS SVGDiscardElement
4+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!doctype html>
2+
<html>
3+
<meta charset="utf-8">
4+
<title>Historical features of SVG Animation</title>
5+
<script src="/resources/testharness.js"></script>
6+
<script src="/resources/testharnessreport.js"></script>
7+
8+
<svg width="100" height="100" id="test-discard">
9+
<rect x="0" y="0" width="50" height="50" fill="black" transform="translate(0, 0)">
10+
<animateTransform attributeName="transform" begin="0s" dur="0.1s" from="0, 0" to="50, 50"/>
11+
<discard begin="0.1s"/>
12+
</rect>
13+
</svg>
14+
15+
<script>
16+
async_test(t => {
17+
const testDiscardEl = document.getElementById('test-discard');
18+
t.step_timeout(() => {
19+
for (const tag of ["rect", "animateTransform", "discard"]) {
20+
assert_not_equals(testDiscardEl.querySelector(tag), null, tag);
21+
}
22+
t.done();
23+
}, 500);
24+
}, 'discard element');
25+
26+
test(() => {
27+
assert_equals(window.SVGDiscardElement, undefined);
28+
}, 'SVGDiscardElement');
29+
</script>
Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)