Closed Bug 781977 Opened 7 years ago Closed 7 years ago

Add optional pressure and source parameters to nsIDOMWindowUtils's sendMouse methods

Categories

(Core :: DOM: Events, defect)

x86_64
Windows 7
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: jimm, Assigned: jimm)

References

Details

Attachments

(1 file)

We need a bit more detail in these calls in our metro work.
Attached patch patchSplinter Review
Assignee: nobody → jmathies
Comment on attachment 651040 [details] [diff] [review]
patch

This is for event work in metro, we need to be able to synthesize mouse events from content using touch input vs mouse. I added pressure for completeness.

The defaults in the gui event are zero for pressure and mouse for input so the default values here mirror that.
Attachment #651040 - Flags: review?(roc)
Comment on attachment 651040 [details] [diff] [review]
patch

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

Looks good to me but really needs review from Olli.
Attachment #651040 - Flags: review?(roc)
Attachment #651040 - Flags: review?(bugs)
Attachment #651040 - Flags: review+
Comment on attachment 651040 [details] [diff] [review]
patch


>+  if (aInputSourceArg == nsIDOMMouseEvent::MOZ_SOURCE_UNKNOWN)
>+    aInputSourceArg = nsIDOMMouseEvent::MOZ_SOURCE_MOUSE;
if (expr) {
  stmt;
}


>   void sendMouseEvent(in AString aType,
>                       in float aX,
>                       in float aY,
>                       in long aButton,
>                       in long aClickCount,
>                       in long aModifiers,
>-                      [optional] in boolean aIgnoreRootScrollFrame);
>+                      [optional] in boolean aIgnoreRootScrollFrame,
>+                      [optional] in float aPressure,
>+                      [optional] in unsigned short aInputSourceArg);
I was a bit worried about optional aPressure, since it gives default value 0, IIRC.
But looks like that is what pressure's default value is already now.
Attachment #651040 - Flags: review?(bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/67d9cf5ea455
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.