Closed Bug 764355 Opened 12 years ago Closed 12 years ago

Add new edgeui simple gesture for win8, and update tap gesture

Categories

(Core :: DOM: Events, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: jimm, Assigned: jimm)

References

Details

Attachments

(1 file, 1 obsolete file)

      No description provided.
Attached patch patch v.1 (obsolete) — Splinter Review
Comment on attachment 632659 [details] [diff] [review]
patch v.1

This add a new gesture for win8 metro which fires when the user swipes inward across the display edge. It's used to invoke edge based ui in metro. I've also added a clickCount (similar to mouse click events) to the tap event to support new single and double tap events on Win8.
Attachment #632659 - Flags: review?(felipc)
Comment on attachment 632659 [details] [diff] [review]
patch v.1

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

I don't see anything here that gets this gesture from the OS and dispatches it.. Don't you need to add a new case in the switch statement at nsWinGesture::ProcessGestureMessage for it?

::: dom/interfaces/events/nsIDOMSimpleGestureEvent.idl
@@ +58,5 @@
>   * (XXX Not implemented on Mac)
>   *
> + * MozEdgeUIGesture - Generated when the user swipes the display to
> + * invoke edge ui.
> + * (XXX Win8 tablets only)

s/tablets/Metro ?

@@ +123,1 @@
>    void initSimpleGestureEvent(in DOMString typeArg,

hmm most others init*Event contains all possible fields for the event. although these functions are mostly just used for testing. I think it would be nice to stay consistent

::: widget/nsGUIEvent.h
@@ +430,5 @@
>  #define NS_SIMPLE_GESTURE_ROTATE_UPDATE  (NS_SIMPLE_GESTURE_EVENT_START+5)
>  #define NS_SIMPLE_GESTURE_ROTATE         (NS_SIMPLE_GESTURE_EVENT_START+6)
>  #define NS_SIMPLE_GESTURE_TAP            (NS_SIMPLE_GESTURE_EVENT_START+7)
>  #define NS_SIMPLE_GESTURE_PRESSTAP       (NS_SIMPLE_GESTURE_EVENT_START+8)
> +// win8 metro speicifc

typo. but this comment doesn't fit too well in this file where the other comments describe different sections of the file. You can just drop it, or maybe call the definition NS_SIMPLE_GESTURE_METRO_EDGEUI if you want.
Comment on attachment 632659 [details] [diff] [review]
patch v.1

(In reply to Felipe Gomes (:felipe) from comment #3)
> Comment on attachment 632659 [details] [diff] [review]
> patch v.1
> 
> Review of attachment 632659 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> I don't see anything here that gets this gesture from the OS and dispatches
> it.. Don't you need to add a new case in the switch statement at
> nsWinGesture::ProcessGestureMessage for it?

This code is on elm and is only fired by the metro interface - 

http://mxr.mozilla.org/projects-central/source/elm/widget/windows/winrt/GestureInput.cpp

This bug is part of the process of moving all the elm code over to mc. The widget code hasn't landed yet, it will probably land last. 

> @@ +123,1 @@
> >    void initSimpleGestureEvent(in DOMString typeArg,
> 
> hmm most others init*Event contains all possible fields for the event.
> although these functions are mostly just used for testing. I think it would
> be nice to stay consistent

Wondered about that, will update. There are no optional params on these so I was trying to avoid updating all the callers. Not a big deal though.

Will fix the typos as well and repost.
Attachment #632659 - Flags: review?(felipc)
Attached patch patch v.2Splinter Review
Attachment #632659 - Attachment is obsolete: true
Comment on attachment 633169 [details] [diff] [review]
patch v.2

There weren't as many calls to that init function as I thought so it wasn't a big deal.
Attachment #633169 - Flags: review?(felipc)
Attachment #633169 - Flags: review?(felipc) → review+
https://hg.mozilla.org/mozilla-central/rev/542d031d6c3f
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
OS: Windows 8 Metro → Windows 8.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: