Closed Bug 2000759 Opened 9 months ago Closed 9 months ago

Improve helper methods that check masonry layout

Categories

(Core :: Layout: Grid, task)

task

Tracking

()

RESOLVED FIXED
147 Branch
Tracking Status
firefox147 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Per Jonathan's review comment in https://phabricator.services.mozilla.com/D272824#9439812, we can improve code readability handling orthogonal writing mode by creating an IsMasonry() that takes an writing-mode along with the axis. This bug implements that approach.

We have IsColSubgrid() and IsRowSubgrid(). Masonry layout should have
similar convenience helpers.

Move IsMasonry(LogicalAxis) from nsIFrame into nsGridContainerFrame for
two reasons:

  1. There are no external callers, and having it in grid container frame remove the
    need to assert the caller is a grid container.
  2. IsColSubgrid() and IsRowSubgrid() depend on it.
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 147 Branch
QA Whiteboard: [qa-triage-done-c148/b147]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: