Closed Bug 1558559 Opened 5 years ago Closed 4 months ago

Replace unnecessary usages of nsFrame::IsXULBoxFrame / GetChildXULBox

Categories

(Core :: Layout, task, P3)

task

Tracking

()

RESOLVED FIXED

People

(Reporter: bgrins, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

In order to support non-xul-flex elements from various layout code, we want to reduce reliance on nsFrame::IsXULBoxFrame. For instance, it's called by other xul layout types (stacks, decks, menus, etc) that wouldn't find nearby elements.

One option is to expand these checks to include emulated XUL flex children (bug 1493962), but really we should also support non-emulated or CSS flex in order to allow us to experiment with using other (faster) layout for UI when it's appropriate.

One first step might be to eliminate some of these calls. For example
the call at https://searchfox.org/mozilla-central/rev/c606cdd6d014fee4034da1702d484c0d41b604c9/layout/xul/nsDeckFrame.cpp#221
doesn't actually require the child to be a xul box and can be any type
of frame.

See callers at https://searchfox.org/mozilla-central/search?q=GetChildXULBox&path=. Some of these are in xul flex or grid layout implementations and can be ignored, but others should be able to support all kinds of children.

Depends on: 1559192
Priority: -- → P3
Depends on: 1576946
Depends on: 1590178
Depends on: 1689817
No longer depends on: 1559192
Severity: normal → S3

We have very few of these left.

Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.