Last Comment Bug 781977 - Add optional pressure and source parameters to nsIDOMWindowUtils's sendMouse methods
: Add optional pressure and source parameters to nsIDOMWindowUtils's sendMouse ...
Product: Core
Classification: Components
Component: DOM: Events (show other bugs)
: Trunk
: x86_64 Windows 7
: -- normal (vote)
: mozilla17
Assigned To: Jim Mathies [:jimm]
: Andrew Overholt [:overholt]
Depends on: 784016
Blocks: 742445
  Show dependency treegraph
Reported: 2012-08-10 16:17 PDT by Jim Mathies [:jimm]
Modified: 2012-08-23 18:00 PDT (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

patch (8.93 KB, patch)
2012-08-10 16:17 PDT, Jim Mathies [:jimm]
roc: review+
bugs: review+
Details | Diff | Splinter Review

Description Jim Mathies [:jimm] 2012-08-10 16:17:01 PDT
We need a bit more detail in these calls in our metro work.
Comment 1 Jim Mathies [:jimm] 2012-08-10 16:17:35 PDT
Created attachment 651040 [details] [diff] [review]
Comment 2 Jim Mathies [:jimm] 2012-08-10 16:38:53 PDT
Comment on attachment 651040 [details] [diff] [review]

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.
Comment 3 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-08-12 17:59:23 PDT
Comment on attachment 651040 [details] [diff] [review]

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

Looks good to me but really needs review from Olli.
Comment 4 Olli Pettay [:smaug] 2012-08-13 04:03:48 PDT
Comment on attachment 651040 [details] [diff] [review]

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

>   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.
Comment 6 Ryan VanderMeulen [:RyanVM] 2012-08-14 17:52:35 PDT

Note You need to log in before you can comment on or make changes to this bug.