Open Bug 1750306 Opened 3 years ago Updated 3 years ago

nsLayoutUtils::IsPopup should maybe be removed (callers can just check IsMenuPopupFrame directly)

Categories

(Core :: Layout, task)

task

Tracking

()

People

(Reporter: dholbert, Unassigned)

References

Details

After bug 1744009, nsLayoutUtils::IsPopup(foo) is just a wrapper for foo->IsMenuPopupFrame(), and doesn't serve much purpose.

It ostensibly has an optimization (checking whether foo has a view before doing the frame-type check); I think this was to avoid virtual function calls, back when we needed to do a virtual function call to check the frame type.

But these days, I think IsMenuPopupFrame() call should be pretty fast (it just checks some state on the frame, like the "do we have a view" check does) and the optimization here is perhaps not saving us enough [any?] computation to justify the added complexity of having this API.

Hence: I suggest we remove nsLayoutUtils::IsPopup after bug 1744009 has landed.

Sounds good to me.

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