Replace the panel XBL bindings with Custom Elements

NEW
Unassigned

Status

()

P5
normal
2 years ago
2 months ago

People

(Reporter: bgrins, Unassigned)

Tracking

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

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [xbl-custom-element][rebase-needed])

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
XUL <panel> elements can have different bindings attached. The inheritance looks like this:

popup-base (implements nsIDOMXULPopupElement)
    panel (implements nsIDOMXULPopupElement)
        arrowpanel
            datetime-popup

* popup-base is never directly bound to an element
* panel is bound to `<panel>` elements (https://dxr.mozilla.org/mozilla-central/rev/93dd2e456c0ecca00fb4d28744e88078a77deaf7/toolkit/content/xul.css#420)
* arrowpanel is bound to `<panel type="arrow">` (https://dxr.mozilla.org/mozilla-central/rev/93dd2e456c0ecca00fb4d28744e88078a77deaf7/toolkit/content/xul.css#441)
* datetime-popup is bound to `#DateTimePickerPanel[active="true"]` (https://dxr.mozilla.org/mozilla-central/rev/93dd2e456c0ecca00fb4d28744e88078a77deaf7/browser/base/content/browser.css#667)

There are a couple of things to investigate wrt converting to Custom Elements:
1) CE are defined for a tag and can't have CSS binding as used in arrowpanel and datetime-popup. This means we either need to:
  a) fold the logic from those two bindings into the main panel CE
  b) create new tags for each binding and update references to `nsGkAtoms::panel` in platform to also look for the new tags
2) They use the [implements] feature, so we need to figure out a way to connect the js class to nsIDOMXULPopupElement
Comment hidden (mozreview-request)
(Reporter)

Comment 2

2 years ago
This patch is very WIP, but it appears the hamburger panel is opening and positioning itself correctly (others are broken)
Component: General → XBL
Product: Firefox → Core
(Reporter)

Updated

a year ago
Whiteboard: [xbl-custom-element]
(Reporter)

Updated

a year ago
Depends on: 1422465
(Reporter)

Updated

a year ago
Depends on: 1446961

Updated

7 months ago
Whiteboard: [xbl-custom-element] → [xbl-custom-element][rebase-needed]
(Reporter)

Updated

4 months ago
Depends on: 1505489
Summary: Investigate replacing the panel XBL bindings with a Custom Element → Replace the panel XBL bindings with Custom Elements
(Reporter)

Comment 3

2 months ago

Will be interesting to see if we have the same hang we are seeing with <wizard>, if we try to port arrowpanel to use Shadow DOM (https://bugzilla.mozilla.org/show_bug.cgi?id=1495621#c8).

See Also: → bug 1495621
You need to log in before you can comment on or make changes to this bug.