Closed Bug 1652646 Opened 4 years ago Closed 4 years ago

Use nsIFrame::IsGridItem() and IsFlexItem() to replace equivalent conditions

Categories

(Core :: Layout, task)

task

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

Details

Attachments

(2 files)

We have a few places in our codebase that can use nsIFrame::IsGridItem() or nsIFrame::IsFlexItem() directly.

For example:
https://searchfox.org/mozilla-central/rev/89814940895946b48b4c04c702efd2c676ec8e7e/layout/generic/nsContainerFrame.cpp#2420-2423,2425

The only possible behavior change is in
nsIFrame::MarkIntrinsicISizesDirty(). Before this patch, we clear
CachedFlexItemData for every child frame under nsFlexContainerFrame.
However, only flex items can have cache, so we can use IsFlexItem() to
replace the usage.

Depends on D83453

Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/ddf16c9e09fc Part 1 - Use nsIFrame::IsGridItem() whenever possible. r=dholbert https://hg.mozilla.org/integration/autoland/rev/d0d053e0ccc3 Part 2 - Use nsIFrame::IsFlexItem() whenever possible. r=dholbert
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: