Closed Bug 901151 Opened 11 years ago Closed 3 years ago

Sent mouse event source

Categories

(Firefox for Android Graveyard :: General, defect)

Other
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: wesj, Unassigned)

Details

Attachments

(1 file, 2 obsolete files)

Attached file WIP Patch (obsolete) —
The platform uses the source of the mouse event to determine if it should do fluffing (i.e. only fluff mouse events that come from touches). We should set the source. While we're doing it, I thought I'd try to get us sending normal mouse events as well.
Attached patch Patch (obsolete) — Splinter Review
Trying to send mouse events through the platform is getting there, but will need some work and is lower priority. This part is needed for bug 788073 and is easy.
Attachment #785280 - Attachment is obsolete: true
Attachment #785941 - Flags: review?(bugmail.mozilla)
Attached patch PatchSplinter Review
Ran into an error in the last guy. Fixed
Attachment #785941 - Attachment is obsolete: true
Attachment #785941 - Flags: review?(bugmail.mozilla)
Attachment #785992 - Flags: review?(bugmail.mozilla)
Comment on attachment 785992 [details] [diff] [review]
Patch

Review of attachment 785992 [details] [diff] [review]:
-----------------------------------------------------------------

::: mobile/android/chrome/content/browser.js
@@ +4251,5 @@
>  
>              // the target should already have been fluffed by the platform touch event code, but
>              // will be fluffed out again by the platform mouse event code as well
> +            let window = element.ownerDocument.defaultView;
> +            let cwu = window.top.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);

Not your fault, but it might be a good idea to rename "window" to "win" or something else so we don't have a local variable hiding a built-in global variable. That seems like a potential footgun.

@@ +4515,2 @@
>      try {
> +      cwu.sendMouseEventToWindow(aName, aX, aY, 0, 1, 0, true, 1.0, aSource);

Maybe it makes sense to just inline this function? I don't know if it's worth catching exceptions on each of these events individually, we could just do it as a block around all three of them. If one throws I double the other two won't anyway.
Attachment #785992 - Flags: review?(bugmail.mozilla) → review+
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: