Bug 1695374 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

When I change the type of `ExtremumLength` to somthing like:
```
pub enum GenericExtremumLength<LengthPercent> {
    #[parse(aliases = "-moz-max-content")]
    MaxContent,
    #[parse(aliases = "-moz-min-content")]
    MinContent,
    MozFitContent,
    MozAvailable,
    FitContentFunc(LengthPercent),
}
```
This makes `StyleSize` and `StyleMaxSize` become 24 bytes (their original size is 16 bytes). The total size of `nsStylePosition` becomes 520 bytes, which is larger than 512 bytes. Perhaps need to figure out a way the make nsStylePosition smaller. Just reordering the struct members to reduce the memory padding doesn't help a lot for now.
When I change the type of `ExtremumLength` to somthing like:
```
pub enum GenericExtremumLength<LengthPercent> {
    #[parse(aliases = "-moz-max-content")]
    MaxContent,
    #[parse(aliases = "-moz-min-content")]
    MinContent,
    MozFitContent,
    MozAvailable,
    FitContentFunc(LengthPercent),
}
```
This makes `StyleSize` and `StyleMaxSize` become 24 bytes (note: the original size is 16 bytes). The total size of `nsStylePosition` becomes 520 bytes, which is larger than 512 bytes. Perhaps need to figure out a way the make nsStylePosition smaller. Just reordering the struct members to reduce the memory padding doesn't help a lot for now.

Back to Bug 1695374 Comment 0