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•5 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•5 years ago
|
||
Comment 7•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6810e67ed43e
https://hg.mozilla.org/mozilla-central/rev/c083885bd068
Updated•5 years ago
|
Description
•