Closed Bug 1905001 Opened 11 months ago Closed 11 months ago

Add logical accessors for IntrinsicSize

Categories

(Core :: Layout, task)

task

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
firefox129 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

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.

By adding ISize() and BSize() to IntrinsicSize, we can simplify the
repetitive pattern that checks writing mode and gets the corresponding width or
height.

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED

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
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
Blocks: 1906792
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: