Closed
Bug 1371150
Opened 7 years ago
Closed 7 years ago
stylo: Support negative opacity for SMIL
Categories
(Core :: CSS Parsing and Computation, enhancement, P2)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: birtles, Assigned: heycam)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 1 obsolete file)
The attached test case is a reduced test case from a failing test in dom/smil/test/test_smilCSSFromBy.xhtml
The square should fade from opacity 1 to 0 because we have:
<rect x="20" y="20" width="200" height="200" fill="purple">
<animate attributeName="opacity" from="1" by="-1" dur="3s"
fill="freeze" />
</rect>
However, it doesn't.
When I debug it I see:
Parsed opacity property value '1' => 1
Parsed opacity property value '-1' => 0
So it would appear that we are either failing to parse the negative value, or clamping it too early.
As a result we effectively do:
<animate attributeName="opacity" from="1" by="0" dur="3s"
fill="freeze" />
Comment 1•7 years ago
|
||
I think we're doing the clamping stuff during the computing...
http://searchfox.org/mozilla-central/rev/1a054419976437d0778a2b89be1b00207a744e94/servo/components/style/values/specified/mod.rs#707
Updated•7 years ago
|
Priority: -- → P2
Comment 2•7 years ago
|
||
I am leaving comments for someone who are going to fix this bug.
What we need to do here is:
1) Add a flag that represents that current mode allows all numeric values for converting specified value to computed value
2) Set the flag true in Servo_GetAnimationValues (that is used only for SMIL)
3) Check the flag in Opacity.to_computed_value() and clamp the value only if the flag is false.
Once we allow negative color component (bug 1364279), we also need to change Color.to_computed_value, I guess.
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → cam
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•7 years ago
|
||
Thanks for the helpful instructions, Hiro. :-)
https://treeherder.mozilla.org/#/jobs?repo=try&revision=88c2da6603021b38d166e1232149d51372991167
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 6•7 years ago
|
||
I didn't add a separate test case, but I checked that the sub-test in dom/smil/test/test_smilCSSFromBy.xhtml started passing.
Comment 7•7 years ago
|
||
mozreview-review |
Comment on attachment 8889331 [details]
Bug 1371150 - Update test expectations.
https://reviewboard.mozilla.org/r/160406/#review165666
Thanks for fixing this!
Attachment #8889331 -
Flags: review?(hikezoe) → review+
Comment 8•7 years ago
|
||
mozreview-review |
Comment on attachment 8889332 [details]
Bug 1371150 - style: Don't clamp Opacity values when computing them for SMIL.
https://reviewboard.mozilla.org/r/160408/#review165660
Attachment #8889332 -
Flags: review?(hikezoe) → review+
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8889332 -
Attachment is obsolete: true
Assignee | ||
Comment 10•7 years ago
|
||
mozreview-review |
Comment on attachment 8889331 [details]
Bug 1371150 - Update test expectations.
https://reviewboard.mozilla.org/r/160406/#review165688
Attachment #8889331 -
Flags: review?(cam) → review+
Comment 11•7 years ago
|
||
Pushed by cmccormack@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/26d556a0f07c
Update test expectations. r=hiro
Comment 12•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•