Add some calc() infrastructure to deal with simplification, sorting
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox75 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
Details
Attachments
(2 files)
We're going to need a more generic simplification mechanism than what we have right now to implement min()
/ max()
/ etc. Cleanup the calc parsing code to do this simplification in the tree of expressions.
For now, we still bail out at parse time if we find an unsimplified min / max / etc in a length / length-percentage value. That is a follow-up.
Assignee | ||
Comment 1•4 years ago
|
||
For now, we still bail out at the stage of getting the calc node into a
CalcLengthPercentage if we couldn't simplify the min() / max() / clamps()
involved.
After this plan is to use just CalcNode everywhere instead of
specified::CalcLengthPercentage, and then modify the computed
CalcLengthPercentage, which would look slightly different as we know all the sum
terms for those are a struct like { Length, Percentage, bool has_percentage } or
such, so all the simplification code for that becomes much simpler, ideally.
Or we could turn CalcNode generic otherwise, if it's too much code... We'll see.
Assignee | ||
Comment 2•4 years ago
|
||
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6810e67ed43e Add some calc infrastructure to deal with simplification / sorting / etc. r=heycam
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/21698 for changes under testing/web-platform/tests
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c083885bd068 Make rust generate better code for some of the functions introduced here. r=heycam
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Comment 7•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6810e67ed43e
https://hg.mozilla.org/mozilla-central/rev/c083885bd068
Upstream PR merged by moz-wptsync-bot
Updated•4 years ago
|
Description
•