Open Bug 1777605 Opened 3 years ago Updated 3 years ago

Convert nsIFrame::Type() calls to Is___Frame() where possible

Categories

(Core :: Layout, task)

task

Tracking

()

People

(Reporter: dholbert, Unassigned)

References

Details

nsIFrame::Type() is effectively a non-virtual getter, so it should be pretty quick these days & shouldn't be a perf concern.

However, we sometimes use it a bit clumsily. In particular, for each possible type, we have an equivalent & more-ergonomic "Is__Frame()" API which we should prefer where possible.

Really, we should only use nsIFrame::Type() in cases where we're making repeated type-comparisons

I noticed a few spots where we can switch to "Is__Frame()"-style API. Filing this bug on that.

(For reference... here's the searchfox link for nsIFrame::Type callsites:
https://searchfox.org/mozilla-central/search?q=symbol:_ZNK8nsIFrame4TypeEv&redirect=false )

You need to log in before you can comment on or make changes to this bug.