Clean up in ComputeISizeValue() around the handling of aspect-ratio
Categories
(Core :: Layout, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox129 | --- | fixed |
People
(Reporter: TYLin, Assigned: TYLin)
Details
Attachments
(3 files)
See the patches for details.
Assignee | ||
Comment 1•3 months ago
|
||
Rename aContainingBlockSize
to aCBSize
for brevity, which also matches the
parameter naming in ComputeSize()
and ComputeAutoSize
.
Add a helper lambda GetAvailableISize()
to compute the available inline size.
Mark the ComputeISizeValue()
resolving LengthPercentage
as const
.
Updated•3 months ago
|
Assignee | ||
Comment 2•3 months ago
|
||
ComputeISizeValue()
used to take StyleSizeOverrides
, but
This patch reflects the fact that intrinsic inline size value such as
'min-content', 'max-content', etc. can be resolved via a definite block size and
a preferred aspect-ratio.
For the callers in nsIFrame::ComputeSize()
and
nsContainerFrame::ComputeSizeWithIntrinsicDimensions()
, we can pass the
styleBSize
and aspectRatio
that have considered the size overrides.
Also, simplify ComputeISizeValueFromAspectRatio()
so that it can be reused in
other places. We'll adapt more callers in the next part. Note that the aFlags
parameter is unused, so it is removed.
This patch doesn't change behavior.
Assignee | ||
Comment 3•3 months ago
|
||
This patch doesn't change behavior.
Comment 5•3 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/bc9c6a4c6d63
https://hg.mozilla.org/mozilla-central/rev/ee962d6c71e7
https://hg.mozilla.org/mozilla-central/rev/475b839ecea1
Description
•