-moz-element does not work inside shadow dom / webcomponents
| Tracking | Status | |
|---|---|---|
| firefox152 | --- | fixed |
| Reporter | |
Descriptionβ’1 year ago
|
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Steps to reproduce:
Try to use the -moz-elemnt function inside of a webcomponent. It will not show the content set
look at:
https://jsbin.com/wokuburayi/edit?html,output
Actual results:
nothing is displayed
Expected results:
it should also display the content. cause the document.mozSetImageElement has no scope
Comment 1β’1 year ago
|
The Bugbug bot thinks this bug should belong to the 'Toolkit::UI Widgets' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updatedβ’1 year ago
|
Comment 3β’1 year ago
|
So there are two things wrong here. One is that the lookup code is wrong. But even with that fixed, it wouldn't work because DocumentOrShadowRoot::LookupImageElement doesn't look at the global element table. That's where I'd look to fix this. We probably need to fix the dynamic change watching too, to some extent. So maybe it's worth doing it in the caller (FindTreeToWatch).
Comment 4β’2 months ago
|
Hello kcochrane: nikkis: sfoster:
Please can I work on this bug?
Comment 5β’2 months ago
|
Yeah by all means, let me know if you have any questions?
Comment 6β’2 months ago
|
Hi Emilio,
I appreciate the opportunity to work with great minds like you on a project like this.
However, I just realized that contributions outside Firefox will not count toward my Outreachy contribution phase for the Firefox project, so I would not be able to work on this at the moment. I hope that after this phase, I may still have the opportunity to be part of your community and contribute meaningful solutions.
Thank you.
| Assignee | |
Comment 7β’1 month ago
|
Hi :emilio, I'd like to work on this bug.
From your comment, I understand there are two things to fix:
- DocumentOrShadowRoot::LookupImageElement needs to fall back to the host document's global element table when called from a shadow root context.
- FindTreeToWatch needs to be updated to watch for dynamic changes across the shadow boundary.
May I take this up?
Comment 8β’1 month ago
|
That sounds right! Sure, please go ahead, once you submit the patch the bug should be assigned to you.
| Reporter | |
Comment 9β’1 month ago
|
But via Api I still would be able to assign an element from any shadow root?
Comment 10β’1 month ago
|
Wdym with "via api"? You mean mozSetImageElement? I'd expect that to take priority yeah.
| Reporter | |
Comment 11β’1 month ago
|
But will it work across different shadowdoms? It does not at the moment
| Assignee | |
Comment 12β’1 month ago
|
Updatedβ’1 month ago
|
Updatedβ’1 month ago
|
Updatedβ’1 month ago
|
| Assignee | |
Comment 13β’1 month ago
|
Hey :emilio, this might be out of topic but I followed your article on Windows MSYS2 using zsh yesterday. I was considering to move all my firefox source build to WSL, but yours was simpler and worked well. Especially the pip path fix (AI couldn't help me there). Thanks for writing this!
Comment 14β’1 month ago
|
Comment 15β’1 month ago
|
|
| bugherder | |
Updatedβ’29 days ago
|
