Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gecko Bug 1552387] Traverse and unlink EffectSet properties on non-HTML/SVG elements too #16893

Merged
merged 1 commit into from
May 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions web-animations/interfaces/Animatable/getAnimations.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@
assert_array_equals(divChild.getAnimations(), [animationChild], 'divChild');
}, 'Returns only the animations specific to each parent/child element');

test(t => {
const foreignElement
= document.createElementNS('http://example.org/test', 'test');
document.body.appendChild(foreignElement);
t.add_cleanup(() => {
foreignElement.remove();
});

const animation = foreignElement.animate(null, 100 * MS_PER_SEC);
assert_array_equals(foreignElement.getAnimations(), [animation]);
}, 'Returns animations for a foreign element');

test(t => {
const div = createDiv(t);
const animation = div.animate(null, 100 * MS_PER_SEC);
Expand Down
20 changes: 20 additions & 0 deletions web-animations/interfaces/KeyframeEffect/target.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,25 @@
'changing the animation current time.');
}, 'Test setting target from a valid target to another target');

promise_test(async t => {
const animation = createDiv(t).animate(
{ opacity: 0 },
{ duration: 1, fill: 'forwards' }
);

const foreignElement
= document.createElementNS('http://example.org/test', 'test');
document.body.appendChild(foreignElement);
t.add_cleanup(() => {
foreignElement.remove();
});

animation.effect.target = foreignElement;

// Wait a frame to make sure nothing bad happens when the UA tries to update
// style.
await waitForNextFrame();
}, 'Target element can be set to a foreign element');

</script>
</body>