Open Bug 1589801 Opened 5 years ago Updated 2 years ago

html root element with `display: -moz-box` is not handled by nsCSSFrameConstructor.cpp

Categories

(Core :: Layout, task)

task

Tracking

()

People

(Reporter: ntim, Unassigned)

References

Details

Attachments

(1 obsolete file)

Currently we use a XUL <window> element with display: -moz-box which goes through the aDocElement->IsXULElement() path.

We'd like to try and switch to using an <html> root element with display: -moz-box; applied, with <body> having display: contents. Unfortunately, since <html> isn't a XUL element and display: -moz-box is used, this goes through the unhandled case. This makes -moz-box-orient not work (probably due to NS_NewBlockFormattingContext(mPresShell, computedStyle); not caring about the property?) and debug builds assert.

This particular case should probably just follow the same path as the -webkit-box path or the IsXULElement() path, although I think the latter would give XUL layout features (flex/orient/pack/direction DOM attribute support) to HTML root elements with display: -moz-box.

I think Brendan may have found a way to avoid requiring a -moz-box root in Bug 1492582, but it's still worth investigating if there's a perf win to be had here if it's easy to do.

See Also: → 1492582

(In reply to Brian Grinstead [:bgrins] from comment #1)

I think Brendan may have found a way to avoid requiring a -moz-box root in Bug 1492582, but it's still worth investigating if there's a perf win to be had here if it's easy to do.

Specifically, this comment https://bugzilla.mozilla.org/show_bug.cgi?id=1492582#c67.

(In reply to Tim Nguyen :ntim from comment #0)

This particular case should probably just follow the same path as the -webkit-box path or the IsXULElement() path, although I think that would give XUL layout features (flex/orient/pack/direction DOM attribute support) to HTML root elements with display: -moz-box.

I don't think we need to add attribute support to root HTML elements. We can manually set those as needed in CSS.

(In reply to Brian Grinstead [:bgrins] from comment #3)

(In reply to Tim Nguyen :ntim from comment #0)

This particular case should probably just follow the same path as the -webkit-box path or the IsXULElement() path, although I think that would give XUL layout features (flex/orient/pack/direction DOM attribute support) to HTML root elements with display: -moz-box.

I don't think we need to add attribute support to root HTML elements. We can manually set those as needed in CSS.

Just to be clear, that would only be if we went with the IsXULElement() path

Attachment #9102684 - Attachment is obsolete: true
Severity: normal → S3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: