Convert menuitem bindings to custom elements
Categories
(Toolkit :: UI Widgets, task, P3)
Tracking
()
People
(Reporter: timdream, Unassigned)
References
Details
(Whiteboard: [xbl-available])
The following bindings can be converted into multiple custom elements, tie to one menuitem
tag name and different is
values.
- menuitem
- menuitem-iconic
- menuitem-iconic-noaccel
They have <children>
but we won't be moving them. Rather, we can simply prepend/append nodes before and after the children. They might not be used and if so they can be cleaned up.
raw meeting note:
menuitem
It’s a base binding. Uses <content> but not children. Two extended bindings
menuitem-iconic
We need to figure out if <children> is actually used here (inmenuitem[type="checkbox"], menuitem[type="radio"] (content/xul.css), menuitem.menuitem-iconic (content/xul.css), menuitem:not([type]) (viewsource/viewsource.css)
)
Could confirm with a try push, but this was originally added for a single case: https://hg.mozilla.org/mozilla-central/rev/c868ce24344c#l1.23
<children /> is a direct child of <content>; we don’t need to move it and hit layout assertion.
menuitem-iconic-noaccel
This is overloaded with iconic and plain menuitem, but if we don’t need slotting above then we could make this a runtime check and toggle the correct <content> based on that. May be perf issues to deal with since there’s a ton of these not visible initially
Reporter | ||
Comment 1•5 years ago
|
||
Also
menuitem-base
[implements], 2 children, totally doable but can’t be removed yet for same reason as basecontrol. Bug can be filed to track dependency.
Reporter | ||
Updated•5 years ago
|
Updated•5 years ago
|
Reporter | ||
Comment 2•5 years ago
|
||
When moving anonymous content to document DOM, add role="none"
since XULMenuitemAccesible
should ignore them.
Comment 3•5 years ago
|
||
Realized I had an older bug filed for this, with some additional comments. Going to dupe this one and link back to the comments in there.
Updated•5 years ago
|
Description
•