Open Bug 1590178 Opened 2 years ago Updated 10 months ago

Figure out a way to make xul:splitter work with non-xul-flexbox siblings, or make a replacement widget that does

Categories

(Toolkit :: XUL Widgets, task, P3)

task

Tracking

()

People

(Reporter: bgrins, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

One of the challenges with getting XUL flexbox emulation functionally working is that splitters don't work with css flex siblings. They also wouldn't work with html element siblings even if they were -moz-box, since it relies on [width] and [height] attributes.

Neil, how difficult would it be to make <xul:splitter> work with HTML element siblings using css flexbox? I'm trying to figure out if we'd be better off writing something in JS (either an existing widget or writing something from scratch) or if the existing implementation could still be used.

Flags: needinfo?(enndeakin)

The first step would be to be adjust to not read or write the width/height attributes and instead set the style width and height. The resizer does something like this.

There are also some calls to IsXULBoxFrame(). They probably could just be removed at that point.

Finally, nsSpliiterFrame would instead inherit from nsFlexContainerFrame (or something else). Since splitter doesn't have any special layout apart from an override to call UpdateState() in DoXULLayout that shouldn't be too difficult.

Flags: needinfo?(enndeakin)

If the sibling element to a XUL splitter is an HTML element, set the CSS
width or height property instead of element attributes.

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