Closed Bug 1607049 Opened 6 years ago Closed 6 years ago

Refactor LengthPercentage to move the calc() variant to the heap.

Categories

(Core :: CSS Parsing and Computation, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(3 files)

This is a pre-requisite to implement min() / max() / clamp() / etc, as those need to be a tree.

I split this in three logically separate patches that can land independently (but probably should land together).

This is needed to support min() / max() / clamp(), etc, as those need to be a
tree of values and thus need heap storage.

This unfortunately grows LengthPercentage to be two pointers, which is bad as
it blows up the size of nsStylePosition enough to trigger the size assertions.

This patch comments out the assertion for now, the follow-up patches will
uncomment them.

I'm (sadly) about to make it a bit more complicated to pack it better. So we
may as well do this so it is easier to reason about navigate.

I also reordered things a bit, and removed some From<> implementations and
such.

Depends on D58700

So that it takes one pointer instead of two, and doesn't make nsStylePosition's
size blow up.

This is not as ugly as I was fearing, thankfully, though it requires a bit of
boilerplate. I think it's acceptable.

Depends on D58701

Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4f9f0e35673f Split LengthPercentage again. r=boris https://hg.mozilla.org/integration/autoland/rev/fc566d077b07 Move LengthPercentage to its own file. r=jwatt https://hg.mozilla.org/integration/autoland/rev/4312c783d434 Pack LengthPercentage better. r=jwatt
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: