Open Bug 479662 Opened 15 years ago Updated 2 years ago

Adjust where gesture events get stopped

Categories

(Firefox :: General, defect)

All
macOS
defect

Tracking

()

People

(Reporter: Mardak, Unassigned)

References

Details

Originally bug 478666 was about getting swipes to work in about:config, but implemented a general solution for trees. But because we stop propagation of gestures immediately as it enters the browser document, we prevent anything below from getting gestures.

This could be problematic for other things in the chrome that want gestures as well as the content document.

Perhaps we can stop propagation at the xul:browser level instead of the document as well as selectively allowing it into pages with the about: protocol? Dunno how we should choose... but definitely not allow http.. even if it's a xul page with a tree?
No longer blocks: 478666
Depends on: 478666
There was some discussion in the original multi-touch gestures bug (bug 412486) about adding support to the event dispatcher to limit events to chrome and the chrome event handler hook.  It mentions that support for the existing NS_EVENT_FLAG_NO_CONTENT_DISPATCH flag was not maintained in the event dispatcher rewrite.  (I'm not familiar with the rewrite as I started Mozilla development only recently.)

Sounds like adding such support to the event dispatcher would be the way to go.  Then there would be no need to stop event propagation.
Smaug, any idea about the NO_CONTENT_DISPATCH now that gestures are like any other mouse event?
"Support" for NS_EVENT_FLAG_NO_CONTENT_DISPATCH is there, but it
contains the same hack as in 1.8 branch; event is still dispatched to the 
document. The hack is needed to make editor work.

We don't want those non-standard events to propagate to content, so
something in chrome should call .stopPropagation().
But sure, calling it selectively could work. Whitelisting based on
event.originalTarget.ownerDocument.documentURI or something like that.
Allowing perhaps about: and chrome:

(What really should happen is to standardize gesture events and make
 then available everywhere (not using Moz -prefix in the names).
 And that is something I'm trying to do, like, now. Unfortunately it takes time.)
(In reply to comment #3)
> (What really should happen is to standardize gesture events and make
>  then available everywhere (not using Moz -prefix in the names).
>  And that is something I'm trying to do, like, now. Unfortunately it takes
> time.)

From the reports I read, Mac OS X 10.6 (Snow Leopard) will have a documented multi-touch API. Apparently, it was documented in the latest developer seed, but I don't have access to those seeds unfortunately since it requires paying Apple money to join pre-release program. Does anyone at Mozilla have access to those seeds?

IMHO, standardization of the gestures should wait until we know what Snow Leopard contains with consideration of the multi-touch gestures in Windows 7.  (see bug 479901). For example, the trackpad gesture versus full-screen gesture difference may need to be present in the API.  (I think the Windows gestures are designed for touchscreens. Could be wrong on this point.)

Is there a tracking bug for integrating multi-touch gestures between the platforms?
(In reply to comment #4)
> From the reports I read, Mac OS X 10.6 (Snow Leopard) will have a documented
> multi-touch API. Apparently, it was documented in the latest developer seed,
> but I don't have access to those seeds unfortunately since it requires paying
Josh?
(In reply to comment #4)
> IMHO, standardization of the gestures should wait until we know what Snow
> Leopard contains with consideration of the multi-touch gestures in Windows 7. 
> (see bug 479901). For example, the trackpad gesture versus full-screen gesture
> difference may need to be present in the API.  (I think the Windows gestures
> are designed for touchscreens. Could be wrong on this point.)

It is true that it would be good to find out exactly how gestures work on OSX
and W7, but there are also many other operating systems and different kinds
of devices. If gesture events get standardized, they should be implementable
also on mobile devices. And note, standardization process takes time, 
usually lots of time, so there is time to review and change the
draft standards :)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.