On Thu, Jun 15, 2017 at 4:16 PM, Jim Porter <[email protected]> wrote: > From what I can tell, if I click inside a webpage, the event starts out > in chrome and then propagates down into content. I assume there's some > sort of magic happening in the message manager that pushes the event > across process boundaries.
Not quite. For e10s, mouse events are sent across the process boundary using the PBrowser ipdl protocol. On the parent side they go into EventStateManager::DispatchCrossProcessEvent [1] which picks up the TabParent and sends it over IPC to the TabChild. The TabChild then dispatches it to the PuppetWidget in the content process. > I'm working on a Firefox add-on for mouse gestures and as part of this I > need to delay the opening of the context menu on Linux to occur on > mouseup rather than mousedown. I do this by swallowing the original > contextmenu event with .preventDefault()/.stopPropagation(). Then on > mouseup, I synthesize my own contextmenu event. This works fine when > clicking on something in chrome, but no context menu pops up if I click > on something in content. If you set the right flags on the event it should get through. Presumably you're creating this event from JS - you want to make sure that it creates a WidgetMouseEvent with eContextMenu message type. I don't know if that can be done without using the DOMWindowUtils APIs. Posting your code snippet for event creation might help. [1] http://searchfox.org/mozilla-central/rev/20d16dadd336e0c6b97e3e19dc4ff907744b5734/dom/events/EventStateManager.cpp#1228 _______________________________________________ dev-platform mailing list [email protected] https://lists.mozilla.org/listinfo/dev-platform

