Closed
Bug 941774
Opened 11 years ago
Closed 11 years ago
Add support for touch input injection for testing purposes
Categories
(Core :: Widget: Win32, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: jimm, Assigned: jimm)
References
Details
(Whiteboard: [beta28] p=8 [qa-])
Attachments
(4 files, 11 obsolete files)
9.38 KB,
patch
|
smaug
:
review+
lsblakk
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
20.74 KB,
patch
|
bbondy
:
review+
|
Details | Diff | Splinter Review |
13.07 KB,
patch
|
bbondy
:
review+
|
Details | Diff | Splinter Review |
12.54 KB,
patch
|
Details | Diff | Splinter Review |
Microsoft revamped their pointer input apis, and added a nice touch input injection call similar to SendInput - http://msdn.microsoft.com/en-us/library/windows/desktop/ff657750(v=vs.85).aspx We should get this hooked up for testing in winrt and win32.
Assignee | ||
Updated•11 years ago
|
OS: Windows 7 → Windows 8.1
Assignee | ||
Comment 1•11 years ago
|
||
Assignee: nobody → jmathies
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #8344586 -
Attachment is obsolete: true
Assignee | ||
Comment 3•11 years ago
|
||
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #8344588 -
Attachment is obsolete: true
Assignee | ||
Comment 5•11 years ago
|
||
Assignee | ||
Comment 6•11 years ago
|
||
Attachment #8344591 -
Attachment is obsolete: true
Assignee | ||
Comment 7•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #8344601 -
Attachment is obsolete: true
Updated•11 years ago
|
Blocks: metrov1it21
Status: NEW → ASSIGNED
Priority: -- → P2
QA Contact: jbecerra
Whiteboard: [beta28] p=0
Updated•11 years ago
|
Whiteboard: [beta28] p=0 → [beta28] p=8
Assignee | ||
Comment 8•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&showall=0&rev=4e39147fe82a
Assignee | ||
Comment 9•11 years ago
|
||
Dom window utils interfaces for injecting touch input, similar to the other native event apis.
Attachment #8344587 -
Attachment is obsolete: true
Attachment #8344788 -
Flags: review?(bugs)
Assignee | ||
Comment 10•11 years ago
|
||
Cleaning up some of the dpi/scale info code we have strewn around. I'd like consumers outside of widget going through WinUtils for this info.
Attachment #8344590 -
Attachment is obsolete: true
Attachment #8344791 -
Flags: review?(netzen)
Assignee | ||
Comment 11•11 years ago
|
||
Widget interface that dom utils calls, stubbed out.
Attachment #8344792 -
Flags: review?(roc)
Assignee | ||
Comment 12•11 years ago
|
||
Touch injection apis for win32 and winrt widget, implemented in nsWindowBase.
Attachment #8344600 -
Attachment is obsolete: true
Attachment #8344793 -
Flags: review?(netzen)
Comment on attachment 8344792 [details] [diff] [review] widget base changes v.1 Review of attachment 8344792 [details] [diff] [review]: ----------------------------------------------------------------- ::: widget/nsIWidget.h @@ +1602,5 @@ > + * ui.click_hold_context_menus.delay pref. (This duration is compatible > + * with the default apzc long tap duration.) > + */ > + virtual nsresult SynthesizeNativeTouchTap(nsIntPoint aPointerScreenPoint, > + bool aLongTap) = 0; Why is this pure virtual? Can't this be a helper method somewhere that just calls SynthesizeNativeTouchPoint?
Assignee | ||
Comment 14•11 years ago
|
||
> Why is this pure virtual? Can't this be a helper method somewhere that just
> calls SynthesizeNativeTouchPoint?
Either way would work I suppose. I implemented this for Windows using windows timer events. I could do something down in base widget using xpcom timers too I think. I could argue that Windows is probably the only platform this will ever support so a Windows specific implementation should suffice. (But that's probably just me trying to avoid reworking this in base widget.:)
Updated•11 years ago
|
Attachment #8344788 -
Flags: review?(bugs) → review+
Comment 15•11 years ago
|
||
Comment on attachment 8344791 [details] [diff] [review] widget scale factor updates v.1 Per IRC new patch is coming
Attachment #8344791 -
Flags: review?(netzen)
Comment 16•11 years ago
|
||
Comment on attachment 8344793 [details] [diff] [review] touch inject apis v.1 Review of attachment 8344793 [details] [diff] [review]: ----------------------------------------------------------------- I think a new patch is coming here too, just re-request if not though
Attachment #8344793 -
Flags: review?(netzen)
Assignee | ||
Comment 17•11 years ago
|
||
Cleaned up the float/FLOAT/double mismatches.
Attachment #8344791 -
Attachment is obsolete: true
Attachment #8345923 -
Flags: review?(netzen)
Assignee | ||
Comment 18•11 years ago
|
||
Attachment #8344792 -
Attachment is obsolete: true
Attachment #8344792 -
Flags: review?(roc)
Assignee | ||
Comment 19•11 years ago
|
||
Comment on attachment 8345924 [details] [diff] [review] widget base changes v.2 Moved long tap logic down into base widget.
Attachment #8345924 -
Flags: review?(roc)
Assignee | ||
Comment 20•11 years ago
|
||
win32/winrt widget impl.
Attachment #8344793 -
Attachment is obsolete: true
Attachment #8345928 -
Flags: review?(netzen)
Comment 21•11 years ago
|
||
Comment on attachment 8345923 [details] [diff] [review] widget scale factor updates v.2 Review of attachment 8345923 [details] [diff] [review]: ----------------------------------------------------------------- ::: widget/windows/WinUtils.cpp @@ +205,5 @@ > +double > +WinUtils::PhysToLogFactor() > +{ > + // 1.0 / (dpi / 96.0) > + return 1.0f / LogToPhysFactor(); nit: just 1.0 ::: widget/windows/winrt/MetroUtils.cpp @@ +64,5 @@ > + > +double > +MetroUtils::PhysToLogFactor() > +{ > + return 1.0f / LogToPhysFactor(); nit: Just 1.0 @@ +96,2 @@ > > + return 1.0f; nit: no f
Attachment #8345923 -
Flags: review?(netzen) → review+
Comment 22•11 years ago
|
||
Comment on attachment 8345928 [details] [diff] [review] windows touch inject apis v.2 Review of attachment 8345928 [details] [diff] [review]: ----------------------------------------------------------------- ::: widget/windows/nsWindowBase.cpp @@ +13,5 @@ > using namespace mozilla; > +using namespace mozilla::widget; > + > +static const wchar_t kUser32LibName[] = L"user32.dll"; > +bool nsWindowBase::sTouchInjectInitialized; nit: I think this will be initialized to false automatically but might as well put it explicitly. @@ +39,5 @@ > +bool > +nsWindowBase::InitTouchInjection() > +{ > + if (!sTouchInjectInitialized) { > + // Initialize touch injection on the first call nit: trailing space here and elsewhere @@ +40,5 @@ > +nsWindowBase::InitTouchInjection() > +{ > + if (!sTouchInjectInitialized) { > + // Initialize touch injection on the first call > + HMODULE hMod = LoadLibraryW(kUser32LibName); nit: unmatched FreeLibrary even know it's only called once. @@ +77,5 @@ > + POINTER_TOUCH_INFO info; > + memset(&info, 0, sizeof(POINTER_TOUCH_INFO)); > + > + info.touchFlags = TOUCH_FLAG_NONE; > + info.touchMask = TOUCH_MASK_CONTACTAREA|TOUCH_MASK_ORIENTATION|TOUCH_MASK_PRESSURE; nit: space before and after |
Attachment #8345928 -
Flags: review?(netzen) → review+
Comment on attachment 8345924 [details] [diff] [review] widget base changes v.2 Review of attachment 8345924 [details] [diff] [review]: ----------------------------------------------------------------- ::: widget/nsIWidget.h @@ +1602,5 @@ > + * ui.click_hold_context_menus.delay. This pref is compatible with the > + * apzc long tap duration. Defaults to 1.5 seconds. > + */ > + virtual nsresult SynthesizeNativeTouchTap(nsIntPoint aPointerScreenPoint, > + bool aLongTap) = 0; Make this nonvirtual and just move the implementation to nsIWidget. ::: widget/xpwidgets/nsBaseWidget.cpp @@ +1620,5 @@ > + if (!mLongTapTimer) { > + return NS_OK; > + } > + mLongTapTimer->Cancel(); > + mLongTapTimer = nullptr; Please add nsIWidget's destructor something that cancels mLongTapTimer.
Attachment #8345924 -
Flags: review?(roc) → review+
Assignee | ||
Comment 24•11 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #23) > Comment on attachment 8345924 [details] [diff] [review] > widget base changes v.2 > > Review of attachment 8345924 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: widget/nsIWidget.h > @@ +1602,5 @@ > > + * ui.click_hold_context_menus.delay. This pref is compatible with the > > + * apzc long tap duration. Defaults to 1.5 seconds. > > + */ > > + virtual nsresult SynthesizeNativeTouchTap(nsIntPoint aPointerScreenPoint, > > + bool aLongTap) = 0; > > Make this nonvirtual and just move the implementation to nsIWidget. Is there a reason why you want this in nsIWidget vs. nsBaseWidget? Seems odd that we would put functionality in the interface. Plus it means we have to add a bunch of clutter to nsIWidget.h, which gets included everywhere.
We don't need to put it inline in nsIWidget.h file. Leave it in nsBaseWidget.cpp. In an ideal world we'd merge the nsBaseWidget and nsIWidget classes.
Assignee | ||
Comment 26•11 years ago
|
||
Attachment #8345924 -
Attachment is obsolete: true
Assignee | ||
Comment 27•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&showall=0&rev=bb51fd1c808e
Assignee | ||
Comment 28•11 years ago
|
||
> @@ +40,5 @@
> > +nsWindowBase::InitTouchInjection()
> > +{
> > + if (!sTouchInjectInitialized) {
> > + // Initialize touch injection on the first call
> > + HMODULE hMod = LoadLibraryW(kUser32LibName);
>
> nit: unmatched FreeLibrary even know it's only called once.
Not worried about this, it's user32. Windows ignores the library ref count when the process terminates.
Comment 29•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f861bf92cb7d https://hg.mozilla.org/mozilla-central/rev/20bc4777d26a https://hg.mozilla.org/mozilla-central/rev/bd9d5c318301 https://hg.mozilla.org/mozilla-central/rev/f6cf0e5d1573
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Assignee | ||
Comment 30•11 years ago
|
||
Comment on attachment 8344788 [details] [diff] [review] dom window utils v.1 [Approval Request Comment] Bug caused by (feature/regressing bug #): There's no bug associated with this work. Patches provide a way to simulate touch input for apzc related tests. We want these running on aurora. User impact if declined: Missing test coverage on Aurora, Beta, and Release. Testing completed (on m-c, etc.): Tests are green on mc. Risk to taking this patch (and alternatives if risky): Low. String or IDL/UUID changes made by this patch: None This request applies to the four patches in this bug.
Attachment #8344788 -
Flags: approval-mozilla-aurora?
Updated•11 years ago
|
Attachment #8344788 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 31•11 years ago
|
||
These patches include an IID change in nsIWidget.h. Are IID changes allowed on Aurora?
Flags: needinfo?(lsblakk)
Comment 32•11 years ago
|
||
(In reply to Matt Brubeck (:mbrubeck) from comment #31) > These patches include an IID change in nsIWidget.h. Are IID changes allowed > on Aurora? Yes, we can take IID changes on Aurora, not on Beta.
Flags: needinfo?(lsblakk)
Comment 33•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/6886eaa42cac https://hg.mozilla.org/releases/mozilla-aurora/rev/d4f6385acfff https://hg.mozilla.org/releases/mozilla-aurora/rev/ff02fb4d8474 https://hg.mozilla.org/releases/mozilla-aurora/rev/f4bc4144c7e4
status-firefox28:
--- → fixed
status-firefox29:
--- → fixed
Assignee | ||
Updated•11 years ago
|
Target Milestone: mozilla29 → mozilla28
You need to log in
before you can comment on or make changes to this bug.
Description
•