Querying a XBL child in a Custom Element connectedCallback function confuses the prototype walk and breaks things (was: "<radiogroup> inside a <wizard> breaks the wizard")
Categories
(Toolkit :: XUL Widgets, defect, P3)
Tracking
()
People
(Reporter: darktrojan, Unassigned)
References
Details
Attachments
(7 files, 1 obsolete file)
Reporter | ||
Comment 1•6 years ago
|
||
Reporter | ||
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Updated•6 years ago
|
Comment 4•6 years ago
|
||
Reporter | ||
Comment 5•6 years ago
|
||
Comment 6•6 years ago
|
||
Comment 7•6 years ago
|
||
Comment 8•6 years ago
|
||
Comment 9•6 years ago
|
||
Comment 10•6 years ago
|
||
Comment 11•6 years ago
|
||
Comment 12•6 years ago
|
||
Comment 13•6 years ago
|
||
Comment 14•6 years ago
|
||
Updated•6 years ago
|
Comment 15•6 years ago
|
||
Comment 16•6 years ago
|
||
Comment 17•6 years ago
|
||
Comment 18•6 years ago
|
||
Comment 19•6 years ago
|
||
Updated•6 years ago
|
Comment 20•6 years ago
|
||
Comment 21•6 years ago
|
||
Comment 22•6 years ago
|
||
Reporter | ||
Comment 23•6 years ago
|
||
Comment 24•6 years ago
|
||
Comment 25•6 years ago
|
||
Updated•6 years ago
|
Comment 26•6 years ago
|
||
Comment 27•6 years ago
|
||
Comment 28•6 years ago
|
||
Comment 29•6 years ago
|
||
Comment 30•6 years ago
|
||
Comment 31•6 years ago
|
||
Comment 32•6 years ago
|
||
(In reply to Boris Zbarsky [:bzbarsky, bz on IRC] from comment #26)
Yes, the following patch on top of the test also fails
OK. So it's just all broken, good.
So I think our basic options are:
- Notify when appending during the prototype walk. This is actually my
preferred fix if we can get away with it without other functionality
regressions or performance problems. Just get rid of the weird and have XUL
act more like HTML here. Yes, this means fixing bug 370111. Importantly,
this option does not incur new technical debt.
Just to add some extra context here, we have a patch up in https://bugzilla.mozilla.org/show_bug.cgi?id=1527977 that will also allow chrome XHTML to use the prototype cache so the parsing / walking would move out of XULDocument and into a new class. So browser.xhtml would match the behavior we have with XUL doc. We may (probably?) want to still make this change if we can performance-wise just so we more closely align with the web-exposed behavior, but we do have a workaround for now.
- Work around in the connected callbacks to avoid touching the DOM nodes in
question, then back that out once we get rid of XBL. Again, more technical
debt and complexity, but may be quickest.
This is done now - if a Custom Element is going to touch the rest of the DOM we are using delayConnectedCallback() to wait until DOMContentLoaded to run the function: https://searchfox.org/mozilla-central/search?q=delayConnectedCallback&path=.
Updated•6 years ago
|
Updated•6 years ago
|
Comment 34•4 years ago
|
||
Yeah now that XBL is gone this can be closed (though the investigation in here could still be relevant for bug 370111).
Description
•