Add SMIL test xlink:href for outer HTML Element.

RESOLVED FIXED in Firefox 54

Status

()

RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: mantaroh, Assigned: mantaroh)

Tracking

54 Branch
mozilla54
Points:
---

Firefox Tracking Flags

(firefox54 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

2 years ago
Created attachment 8842262 [details] [diff] [review]
WIP: add smil test with xlink:href attribute.

We can specify the SMIL's animate tag with xlink:href attribute, and then we can specify outer html element like following:

<div id="target"></div>
<svg xmlns:xlink="http://www.w3.org/1999/xlink">
 <animate xlink:href="#target" attributeName="width" from.....>
</svg>

In the gecko, some code support this behavior.

For Example: https://dxr.mozilla.org/mozilla-central/rev/e1135c6fdc9bcd80d38f7285b269e030716dcb72/dom/smil/nsSMILAnimationController.cpp#703

But, we don't have this test.
I will need to this test since we will change around this code.(see bug 1062106)
Comment hidden (mozreview-request)
(Assignee)

Updated

2 years ago
Attachment #8842262 - Attachment is obsolete: true

Comment 3

2 years ago
mozreview-review
Comment on attachment 8842263 [details]
Bug 1343415 - Add test for SMIL with xmil:href attribute which specifying outer element.

https://reviewboard.mozilla.org/r/116140/#review117724

::: dom/smil/test/test_smilWithXlink.xhtml:34
(Diff revision 1)
> +
> +  var cs = getComputedStyle(target);
> +  is(cs.width, "0px",
> +     "SMIL should affect outer element when animation is started.");
> +
> +  svg.setCurrentTime(10);
> +
> +  cs = getComputedStyle(target);
> +  is(cs.width, "200px",
> +     "SMIL should affect outer element when animation is ended");

Nit: I think checking one time value would be enough?

e.g. we could just do:

svg.pauseAnimations();
svg.setCurrentTime(5);

var cs = getComputedStyle(target);
is(cs.width, "50px", ...);

And that would be enough?
Attachment #8842263 - Flags: review?(bbirtles) → review+
Comment hidden (mozreview-request)
(Assignee)

Comment 5

2 years ago
mozreview-review-reply
Comment on attachment 8842263 [details]
Bug 1343415 - Add test for SMIL with xmil:href attribute which specifying outer element.

https://reviewboard.mozilla.org/r/116140/#review117724

> Nit: I think checking one time value would be enough?
> 
> e.g. we could just do:
> 
> svg.pauseAnimations();
> svg.setCurrentTime(5);
> 
> var cs = getComputedStyle(target);
> is(cs.width, "50px", ...);
> 
> And that would be enough?

Thanks Brian,

I removed extra check.

Comment 6

2 years ago
Pushed by mantaroh@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/98785831bbb8
Add test for SMIL with xmil:href attribute which specifying outer element. r=birtles
(Assignee)

Updated

2 years ago
Assignee: nobody → mantaroh
Status: NEW → ASSIGNED

Comment 7

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/98785831bbb8
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox54: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.