Closed
Bug 1343415
Opened 9 years ago
Closed 9 years ago
Add SMIL test xlink:href for outer HTML Element.
Categories
(Core :: SVG, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla54
| Tracking | Status | |
|---|---|---|
| firefox54 | --- | fixed |
People
(Reporter: mantaroh, Assigned: mantaroh)
Details
Attachments
(1 file, 1 obsolete file)
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 | ||
Comment 2•9 years ago
|
||
| Assignee | ||
Updated•9 years ago
|
Attachment #8842262 -
Attachment is obsolete: true
Comment 3•9 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•9 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.
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•9 years ago
|
Assignee: nobody → mantaroh
Status: NEW → ASSIGNED
Comment 7•9 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in
before you can comment on or make changes to this bug.
Description
•