Closed
Bug 1441647
Opened 8 years ago
Closed 7 years ago
update contextmenu code to deal with Shadow DOM
Categories
(Firefox :: Menus, defect, P3)
Firefox
Menus
Tracking
()
RESOLVED
FIXED
Firefox 61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: smaug, Assigned: smaug)
References
Details
Attachments
(1 file)
9.66 KB,
patch
|
jaws
:
review+
|
Details | Diff | Splinter Review |
I think this means mostly to update ContextMenu.jsm to use event.composedTarget and not event.target.
Updated•8 years ago
|
Priority: -- → P3
Assignee | ||
Comment 1•7 years ago
|
||
trying to keep the changes absolute minimum.
Making code in ContextMenu.jsm less repetitive should happen in a different bug.
Let's see what try thinks about this
remote: View your change here:
remote: https://hg.mozilla.org/try/rev/c91830d910355131776af3dee3def2a351d0e0bf
remote:
remote: Follow the progress of your build on Treeherder:
remote: https://treeherder.mozilla.org/#/jobs?repo=try&revision=c91830d910355131776af3dee3def2a351d0e0bf
remote: recorded changegroup in replication log in 0.102s
Assignee: nobody → bugs
Attachment #8972706 -
Flags: review?(jaws)
Comment 2•7 years ago
|
||
Comment on attachment 8972706 [details] [diff] [review]
contextmenu_in_shadow_dom.diff
Review of attachment 8972706 [details] [diff] [review]:
-----------------------------------------------------------------
Is it mostly correct to say composedTarget is a chrome-only property that is used to refer to the original target whether it crosses a shadow boundary or not?
I had to read the GetComposedTarget() source code to try to figure this out. MDN doesn't document it and there are no comments in the code for composedTarget. Can you add some comments to https://searchfox.org/mozilla-central/rev/c0d81882c7941c4ff13a50603e37095cdab0d1ea/dom/events/Event.cpp#298 and https://developer.mozilla.org/en-US/docs/Web/API/Event/Comparison_of_Event_Targets explaining this target?
Attachment #8972706 -
Flags: review?(jaws) → review+
Assignee | ||
Comment 3•7 years ago
|
||
It is chromeonly property pointing to first non-native-anonymous target. But yes, it refers to the node inside shadow dom.
IIRC the spec had composedTarged at some point, but it was removed since it would reveal closed shadow DOM.
Assignee | ||
Comment 4•7 years ago
|
||
And it is different to originalTarget, since originalTarget may point to native-anonymous-content too.
But yes, I need to document this stuff.
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/329030905869
update contextmenu code to deal with Shadow DOM, r=jaws
Comment 6•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
You need to log in
before you can comment on or make changes to this bug.
Description
•