Mutation not being captured on Reddit
Categories
(Firefox :: Translations, defect, P3)
Tracking
()
People
(Reporter: marco, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
258.32 KB,
image/png
|
Details |
STR:
- Open a Reddit page, such as https://www.reddit.com/r/Banff/
- Translate it to a language of your choice
When scrolling enough, new posts are loaded and they are not translated.
Comment 1•1 year ago
|
||
This may be a duplicate of Bug 1840705, but requires investigation.
I have a suspicion that we are not able to react to a page's use of the MutationObserver, since we are ourselves using a mutation observer.
We're also not recursing into the Shadow DOM, see Bug 1841656.
Comment 2•1 year ago
|
||
The severity field is not set for this bug.
:gregtatum, could you have a look please?
For more information, please visit BugBot documentation.
Updated•1 year ago
|
Reporter | ||
Updated•1 year ago
|
Reporter | ||
Updated•1 year ago
|
Comment 4•1 year ago
•
|
||
I wrote a patch to introduce some basic ShadowDOM mutation in Bug 1855307, and I believe it covers most of the ShadowDOM mutation case.
There's one exception though that is when the host element is added to the tree and it's not a shadow host at the time and later it becomes a shadow host, we are not able to detect this. There's no way to observe the attachShadow
call. Not sure if we have some thing special for devtools.
I wonder if this is related to this reddit issue.
Comment 5•1 year ago
|
||
(In reply to Sean Feng [:sefeng] from comment #4)
I wrote a patch to introduce some basic ShadowDOM mutation in Bug 1842820, and I believe it covers most of the ShadowDOM mutation case.
I assume you meant to say Bug 1855307, not bug 1842820. :)
There's one exception though that is when the host element is added to the tree and it's not a shadow host at the time and later it becomes a shadow host, we are not able to detect this. There's no way to observe the
attachShadow
call. Not sure if we have some thing special for devtools.I wonder if this is related to this reddit issue.
Comment 6•1 year ago
|
||
yeah sorry!
Comment 7•1 year ago
|
||
Hi Marco, can you still see the problem in Reddit after bug 1840705? I just checked again on the latest Nightly and I could find no problem. Also I don't see any shadow trees in Reddit so I don't think comment #4 matters much here, unless I missed something.
Reporter | ||
Comment 8•1 year ago
|
||
Yes, I can still reproduce by going to https://www.reddit.com/r/Banff/, performing translation, and then scrolling enough to get to posts that haven't been loaded yet (which won't be translated).
Comment 9•1 year ago
|
||
Hmm, that's exactly what I did, do you see any shadow tree in devtools? I don't see any, but maybe there's some new-UI option that I don't know?
Reporter | ||
Comment 10•1 year ago
|
||
Yes, I see a few.
At the moment, only posts up to "'Be prepared to encounter a bear': Warning issued in Banff" are translated. Anything after that isn't.
Reporter | ||
Comment 11•1 year ago
|
||
I don't have a Reddit account, maybe something is different when you are logged-in vs not logged-in?
Comment 12•1 year ago
|
||
Oh, oh, yes, now I see that when I sign out, thanks!
Comment 13•1 year ago
|
||
There's no way to observe the attachShadow call. Not sure if we have some thing special for devtools.
Again, not sure if this is the root cause of this. However I just noticed there's a special event that we are using for devtools https://searchfox.org/mozilla-central/rev/ac497ae160e664617e2f4286cdce3b03ef912d90/dom/base/Element.cpp#1307-1309 for attachShadow
call.
Comment 14•1 year ago
|
||
Hi Greg, Please where can i find the file for this bug ?
Comment 15•1 year ago
|
||
peterodejobi9: Here are some useful links.
Docs: https://firefox-source-docs.mozilla.org/toolkit/components/translations/index.html
Browser code: https://searchfox.org/mozilla-central/source/browser/components/translations
Toolkit code: https://searchfox.org/mozilla-central/source/toolkit/components/translations
Comment 16•1 year ago
|
||
Okay thank you i am reading the documentation and trying to understand the code code so i can work on submitting a patch
Description
•