Closed
Bug 1363639
Opened 7 years ago
Closed 7 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•7 years ago
|
Priority: -- → P2
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → mbrubeck
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=e0db0c93f2f29d0bd44e50d2f9490e158ca4c8f9
Assignee | ||
Comment 2•7 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•7 years ago
|
||
Added a test: https://treeherder.mozilla.org/#/jobs?repo=try&revision=1c67fc038ed3dfa81f478cad0ce70f1533eb11b4
Comment hidden (mozreview-request) |
Comment 5•7 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•7 years ago
|
||
https://github.com/servo/servo/pull/17013
Pushed by mbrubeck@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/101fb6274f8c stylo: Make interpolation of rect() match Gecko. r=emilio
Comment 10•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/101fb6274f8c
Status: ASSIGNED → RESOLVED
Closed: 7 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
•