Add logical accessors for IntrinsicSize
Categories
(Core :: Layout, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox129 | --- | fixed |
People
(Reporter: TYLin, Assigned: TYLin)
Details
Attachments
(2 files)
We sometimes need to get the inline size or block size for IntrinsicSize
like https://searchfox.org/mozilla-central/rev/56dd89bcf4d3b85f66621e89eac6e2936ad382d9/layout/generic/nsContainerFrame.cpp#2251
It would be convenient if we have ISize(WritingMode)
and BSize(WritingMode)
in IntrinsicSize
.
Assignee | ||
Comment 1•9 days ago
|
||
By adding ISize()
and BSize()
to IntrinsicSize
, we can simplify the
repetitive pattern that checks writing mode and gets the corresponding width or
height.
Updated•9 days ago
|
Assignee | ||
Comment 2•9 days ago
|
||
It is suspicious that GetIntrinsicBSize()
does not have code handling
contain-intrinsic-size. However, I believe GetIntrinsicSize()
is already
handling contain-intrinsic-size, so this patch shouldn't change behavior.
This patch is good if all the tests added in
https://hg.mozilla.org/mozilla-central/rev/64b80c6cb760 pass.
Pushed by tlin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b2e5137e73ec Part 1 - Add logical accessors to IntrinsicSize. r=dholbert https://hg.mozilla.org/integration/autoland/rev/5fb02f1bfdd5 Part 2 - Remove redundant code handling contain-intrinsic-size in nsSubDocumentFrame::GetIntrinsicISize(). r=layout-reviewers,emilio
Comment 4•3 days ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b2e5137e73ec
https://hg.mozilla.org/mozilla-central/rev/5fb02f1bfdd5
Description
•