Closed
Bug 1363639
Opened 8 years ago
Closed 8 years ago
stylo: Interpolated result of CSSRect is different from gecko.
Categories
(Core :: CSS Parsing and Computation, enhancement, P2)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: mantaroh, Assigned: mbrubeck)
References
Details
Attachments
(1 file)
As mentioned bug 1353918 comment 9, current stylo's intepolation of CSSRect differ from gecko's implementation.
The gecko treat whole rect as discrete when each offset's unit type differ.
For example:
// The result is 'rect(100px, 100px, auto, 100px)' not 'rect(50px, 50px, auto, 50px)'
var anim = elem.animate({ clip: ['rect(0px, 0px, 0px, 0px)', 'rect(100px, 100px, auto, 100px)']}, 1000);
anim.currentTime = 500;
If each offset's unit type is same, the gecko interpolate each offset except auto value.
For example:
// The result is 'rect(50px, 50px, auto, 50px)'
var anim = elem.animate({ clip: ['rect(0px, 0px, auto, 0px)', 'rect(100px, 100px, auto, 100px)']}, 1000);
anim.currentTime = 500;
We should modify the following implementation in order to be behavior same to gecko.
- Return None when interpolating Option<> if self or other value is None
- Check the offset of self and other when interpolating ClipRect.
If this offset differ, throw the error.
Updated•8 years ago
|
Priority: -- → P2
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → mbrubeck
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•8 years ago
|
||
Assignee | ||
Comment 2•8 years ago
|
||
Amended to fix `compute_distance` too, and remove some redundant checks:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=278a490ec4a55766aef1fe9d96b40c8eed2baeb7
Assignee | ||
Comment 3•8 years ago
|
||
Comment hidden (mozreview-request) |
Comment 5•8 years ago
|
||
mozreview-review |
Comment on attachment 8870613 [details]
Bug 1363639 - stylo: Make interpolation of rect() match Gecko.
https://reviewboard.mozilla.org/r/142064/#review145732
::: layout/reftests/web-animations/1363639-1.html:26
(Diff revision 1)
> + {clip: 'rect(0px, auto, 200px, 0px)'}
> + ], 2000);
> + anim.pause();
> + anim.currentTime = 1000;
> + document.documentElement.removeAttribute("class");
> + console.log("done");
nit: remove `console.log`.
Attachment #8870613 -
Flags: review?(emilio+bugs) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 8•8 years ago
|
||
Pushed by mbrubeck@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/101fb6274f8c
stylo: Make interpolation of rect() match Gecko. r=emilio
Comment 10•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•