Граф коммитов

139 Коммитов

Автор SHA1 Сообщение Дата
Markus Stange 25b05c514f Bug 1749352 - Remove unused mFollowedByMomentum. r=botond
Depends on D135922

Differential Revision: https://phabricator.services.mozilla.com/D135923
2022-03-03 04:11:15 +00:00
Emilio Cobos Álvarez 9d910cfbd7 Bug 1749172 - Fix typo (SCROLL_ASYNCHRONOUSELY -> SCROLL_ASYNCHRONOUSLY) in MouseEvents.h. r=hiro
I was looking at related code and this threw me off a bit.

Differential Revision: https://phabricator.services.mozilla.com/D135454
2022-01-10 21:57:20 +00:00
Eitan Isaacson bcc337c8aa Bug 1744315 - P1: Introduce chrome-only MozMouseExploreByTouch event. r=botond
The goal of this event is for doing hit testing in content and emit an
accessibility event with the result for Android's explore by touch.

This event allows us to use APZ's ability to target the correct content
doc.

Differential Revision: https://phabricator.services.mozilla.com/D132840
2021-12-28 20:41:22 +00:00
Timothy Nikkel 7bc93b89f5 Bug 1678771. Set mIsNoLineOrPageDelta on WidgetWheelEvents we create from PanGestureInput when we don't know the line scroll amount so EventStateManager will fill those in for us. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D114358
2021-08-08 22:04:17 +00:00
Kagami Sascha Rosylight bc3afb6e7f Bug 1710317 - Part 2: Add mButton[s] to WidgetTouchEvent r=aklotz,edgar
It's not ideal to have mButton[s] only to pass them to PointerEvent, but it's required anyway.

Differential Revision: https://phabricator.services.mozilla.com/D115509
2021-05-31 13:39:18 +00:00
Emilio Cobos Álvarez 36b7e1c765 Bug 1708829 - Expose WheelEvent.wheelDelta{,X,Y} for compat with other engines. r=masayuki
The behavior for non-trusted events matches Safari (Chrome does return
deltaX in that case, which seems pretty bogus, because the sign of the
wheelDelta* is the opposite as the delta* props).

Differential Revision: https://phabricator.services.mozilla.com/D114052
2021-05-14 15:17:33 +00:00
Sandor Molnar 7b4d940c00 Backed out 2 changesets (bug 1708829) for causing mochitest plain failures in test_continuous_wheel_events. CLOSED TREE
Backed out changeset 28faebd5fc72 (bug 1708829)
Backed out changeset 044c2060da7d (bug 1708829)
2021-05-14 17:12:03 +03:00
Emilio Cobos Álvarez cbcedecf48 Bug 1708829 - Expose WheelEvent.wheelDelta{,X,Y} for compat with other engines. r=masayuki
The behavior for non-trusted events matches Safari (Chrome does return
deltaX in that case, which seems pretty bogus, because the sign of the
wheelDelta* is the opposite as the delta* props).

Differential Revision: https://phabricator.services.mozilla.com/D114052
2021-05-14 12:41:30 +00:00
Kagami Sascha Rosylight 9298d0e9e9 Bug 1706420 - Part 2: Pass tilt/twist info via WidgetTouchEvent r=aklotz,edgar
Differential Revision: https://phabricator.services.mozilla.com/D113056
2021-05-07 18:01:28 +00:00
Kagami Sascha Rosylight a638421a2b Bug 1706420 - Part 1: Add mInputSource to WidgetTouchEvent r=aklotz,edgar
Differential Revision: https://phabricator.services.mozilla.com/D113055
2021-05-07 18:01:27 +00:00
Edgar Chen 1aad51035c Bug 1672726 - Part 1: Rename MultiTouchInput::ToWidgetTouchEvent to ToWidgetEvent; r=botond
So it can be used in DispatchInputOnControllerThread template.

Differential Revision: https://phabricator.services.mozilla.com/D112127
2021-04-22 16:01:26 +00:00
Botond Ballo 698d337722 Bug 1700819 - Avoid dispatching pinch gesture events with mLineOrPageDeltaY == 0. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D110009
2021-03-27 23:29:19 +00:00
Masayuki Nakano b4094e2c64 Bug 1528289 - part 4: Prevent `click` event if APZC cancels autoscroll synchronously r=botond
The automated tests become orange only in macOS and 32bit Windows builds.  It
fails when left mouse button down is synthesized in the autoscroller (a XUL
`<panel>` element).  Although I'm not sure why that depends on the platform,
APZ cancels active autoscrolling before dispatching `mousedown` event.
Therefore, `AutoScrollParent` nor `AutoScrollChild` cannot block the following
click event.

Therefore, this patch adds new field into `APZEventResult` and set it to `true`
when APZ runs `autoscroll` but canceled by a mouse input.  Then, `nsBaseWidget`
can prevent following click event of `eMouseDown` and `eMouseUp` events as
expected before dispatching them into the DOM tree.  (FYI: Preventing click
event of either `eMouseDown` or `eMouseUp` can prevent the following `click`
event, etc.)

Differential Revision: https://phabricator.services.mozilla.com/D107325
2021-03-23 19:22:49 +00:00
Timothy Nikkel 7d1fc30871 Bug 1696802. Add code to support double tap to zoom on mac. r=botond,mstange
We already have a pref for double tap to zoom with is already enabled by default so it's kind of awkward to add another pref.

Differential Revision: https://phabricator.services.mozilla.com/D107389
2021-03-12 02:10:36 +00:00
alaaemad 44695ef057 Bug 1692023 - Add more tests for Linux touchpad zooming r=botond
Differential Revision: https://phabricator.services.mozilla.com/D106132
2021-03-07 18:57:40 +00:00
Edgar Chen f8fb06fea1 Bug 1662363 - Rename eTopLevel/eChild to ePlatformTopLevel/ePlatformChild; r=smaug
This is a follow-up of bug 1653949.

Differential Revision: https://phabricator.services.mozilla.com/D100729
2021-01-05 09:48:24 +00:00
Markus Stange fc8aedee99 Bug 1615858 - Add MultiTouchInput::SingleTouchData::mHistoricalData. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D95649
2020-11-03 16:46:19 +00:00
Kartikaya Gupta 33f67abeea Bug 1664558 - Propagate the layers id from InputData to gecko WidgetEvent types. r=botond
Seems like an oversight that these fields were never propagated from APZ to
the generated main-thread WidgetEvents.

Differential Revision: https://phabricator.services.mozilla.com/D94894
2020-10-28 22:02:00 +00:00
Edgar Chen 007c999be8 Bug 1666201 - Part 1: Rename ToWidget{Wheel|Mouse}Event to ToWidgetEvent; r=kats
So they can be used in template.

Differential Revision: https://phabricator.services.mozilla.com/D91490
2020-10-01 08:52:10 +00:00
Bogdan Tara 222e4f64b7 Backed out 5 changesets (bug 1662094, bug 1666201, bug 1520785) for pointerevent related failures CLOSED TREE
Backed out changeset 0ff76cb4b991 (bug 1662094)
Backed out changeset 94bf1aff7bff (bug 1520785)
Backed out changeset 1688cdab3d48 (bug 1666201)
Backed out changeset e960f750c588 (bug 1666201)
Backed out changeset cb30150e8289 (bug 1666201)
2020-10-01 11:46:32 +03:00
Edgar Chen aa7ddc0905 Bug 1666201 - Part 1: Rename ToWidget{Wheel|Mouse}Event to ToWidgetEvent; r=kats
So they can be used in template.

Differential Revision: https://phabricator.services.mozilla.com/D91490
2020-09-30 17:29:17 +00:00
Edgar Chen 36ea499319 Bug 1662830 - Initialize mExitFrom in MouseInput::ToWidgetMouseEvent; r=smaug
This is missed in https://phabricator.services.mozilla.com/D88225.
MouseInput::ToWidgetMouseEvent is used only in Android.

Differential Revision: https://phabricator.services.mozilla.com/D89217
2020-09-07 09:32:47 +00:00
Timothy Nikkel 9bd1260501 Bug 1658001. Populate wheelEvent.mLineOrPageDeltaY in PinchGestureInput::ToWidgetWheel for pinch gestures produced from direct manipulation. r=kats
We do this analogously to how PanGestureInput does it except that the delta's that we compute mLineOrPageDeltaY from are computed by us instead of provided to us.

mLineOrPageDeltaY being non-zero is what EventStateManager::DispatchLegacyMouseScrollEvents uses to decide to send legacy mouse events, so we need to populate it to get those legacy events to send.

This fix is Windows only on purpose as pinches on macOS don't seem to send wheel events (Windows sends ctrl+wheel). When Linux gets implemented it will need to be determined what to do.

Differential Revision: https://phabricator.services.mozilla.com/D86495
2020-08-11 09:08:06 +00:00
Timothy Nikkel 7248961013 Bug 1653700. Populate PanGestureInput::mLineOrPageDeltaX/Y when the events are produced from direct manipulation. r=kats
The macOS widget code already does this here

https://searchfox.org/mozilla-central/rev/d6d8fcc22c3820f2ae08229e0d37be19fba74db9/widget/cocoa/nsChildView.mm#3491

So we factor our a helper from the macOS widget code (which already does this) to use cross platform.

Differential Revision: https://phabricator.services.mozilla.com/D84059
2020-07-18 20:47:04 +00:00
Edgar Chen dc0bf3f975 Bug 1648630 - Part 3: Propagate layers id to touch event properly for Fission; r=kats
Differential Revision: https://phabricator.services.mozilla.com/D81869
2020-07-03 07:45:35 +00:00
Edgar Chen fb63f237a9 Bug 1648630 - Part 1: Remove MultiTouchInput::ToWidgetMouseEvent; r=kats
This was used in B2G and no one uses it now.

Differential Revision: https://phabricator.services.mozilla.com/D81816
2020-07-02 19:27:51 +00:00
Timothy Nikkel 56a6895a87 Bug 1648489. Send pinch starts events with some amount of scale instead of none with direct manipulation. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D81477
2020-07-01 09:31:03 +00:00
Kagami Sascha Rosylight c2e026792f Bug 1643464 - Part 3: Rename LEFT/RIGHT_BUTTON as PRIMARY/SECONDARY_BUTTON r=masayuki,geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D80333
2020-06-19 17:50:43 +00:00
Kagami Sascha Rosylight 166f2891a2 Bug 1643464 - Part 1: Rename eLeft/eRight to ePrimary/eSecondary r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D80331
2020-06-19 18:02:41 +00:00
Kartikaya Gupta 67a28c6551 Bug 1627708 - Add a PinchGestureSource enum that indicates the source of a PinchGestureInput event. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D77828
2020-06-06 00:32:19 +00:00
Timothy Nikkel 034ccd3b34 Bug 1643461. Fix calculation of deltaY when creating a widget wheel event from pinch input data on Windows. r=kats
The original code made the mistake of thinking that [event magnification] was a multiplicative quantity (ie if the scale changed from a to b then [event magnification] would be b/a). But it is an additive quantity (so b-a). If we then apply this knowledge to how we calculate the value from the Windows code we get the new formula.

The macOS and non-macOS code could be merged because mCurrentSpan is always 100.0 on macOS, but I'm not going to do that just yet because the Windows specific code isn't mature yet, so I'm not sure if we will need to tweak it more and my goal with this change was to just get the signs right to fix the worst bug. The scale can be addressed later if needed.

Differential Revision: https://phabricator.services.mozilla.com/D78479
2020-06-05 19:45:20 +00:00
Kartikaya Gupta 227e130c84 Bug 1632293 - Replace the BothFingersLifted() special case behaviour with a new pinch input type. r=tnikkel,botond
The BothFingersLifted() mechanism was a bit of a hack to handle the case that
with touch inputs, a user might be able to lift just one finger to transition
from a pinch to a pan or other kind of gesture. This isn't possible with
other kinds of pinch gestures, such as on trackpads or with mousewheels.
So instead of tracking that via special-case behaviour of mFocusPoint, or
adding an extra bool to the PinchGestureInput class, it seems cleaner to
separate the concerns by adding a new type of input event that explicitly
covers the "finger lifted" touch scenario. This patch implements this change,
and removes the BothFingersLifted() machinery.

Differential Revision: https://phabricator.services.mozilla.com/D74415
2020-05-11 16:56:57 +00:00
Botond Ballo 7cf10dca6d Bug 1556556 - Remove many uses of IgnoreRootScrollFrame. r=mstange,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D68913
2020-05-05 19:23:35 +00:00
Timothy Nikkel 005270cdd1 Bug 1619187. Handle content prevent defaulting pinch gestures. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D73217
2020-05-02 23:03:20 +00:00
Cosmin Sabou b9a814e53b Backed out changeset 70d9a096070b (bug 1619187) for causing Gtest failures. CLOSED TREE 2020-05-02 03:29:43 +03:00
Timothy Nikkel f9e267a4a7 Bug 1619187. Handle content prevent defaulting pinch gestures. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D73217
2020-05-01 23:21:08 +00:00
Csoregi Natalia b073baab86 Backed out 30 changesets (bug 1556556, bug 1631568) for multiple mochitest failures. CLOSED TREE
Backed out changeset edd529f7a9c5 (bug 1631568)
Backed out changeset 1cc0881e244b (bug 1631568)
Backed out changeset ed3c1e85d5e3 (bug 1556556)
Backed out changeset 38ffc6215bbf (bug 1556556)
Backed out changeset 03c2c25d8023 (bug 1556556)
Backed out changeset 9c717eb067b8 (bug 1556556)
Backed out changeset 98e26bc98b85 (bug 1556556)
Backed out changeset 05a6a581e755 (bug 1556556)
Backed out changeset 867946cf05bb (bug 1556556)
Backed out changeset 20d72a334530 (bug 1556556)
Backed out changeset 2c62e61d9054 (bug 1556556)
Backed out changeset 62a223d057d2 (bug 1556556)
Backed out changeset 2c5d55a1f0b1 (bug 1556556)
Backed out changeset 700447945b4e (bug 1556556)
Backed out changeset 93190ae4f5ff (bug 1556556)
Backed out changeset a7bd34d961bb (bug 1556556)
Backed out changeset fccd1d3c7189 (bug 1556556)
Backed out changeset 24056e47183d (bug 1556556)
Backed out changeset 204881474cc1 (bug 1556556)
Backed out changeset 387320881876 (bug 1556556)
Backed out changeset be8f5eb58460 (bug 1556556)
Backed out changeset 629c58a9166b (bug 1556556)
Backed out changeset 4312b2b5dda8 (bug 1556556)
Backed out changeset d11dbf6403a5 (bug 1556556)
Backed out changeset 95c54c023779 (bug 1556556)
Backed out changeset 80fcb7e71188 (bug 1556556)
Backed out changeset d75a4ecb0d47 (bug 1556556)
Backed out changeset 903c4de34e7a (bug 1556556)
Backed out changeset f15334a3e803 (bug 1556556)
Backed out changeset 9553e99137ea (bug 1556556)
2020-04-28 12:43:11 +03:00
Botond Ballo b11a399d42 Bug 1556556 - Remove many uses of IgnoreRootScrollFrame. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D68913
2020-04-28 02:25:51 +00:00
Simon Giesecke cb0734d274 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in widget. r=jmathies
Differential Revision: https://phabricator.services.mozilla.com/D66012

--HG--
extra : moz-landing-system : lando
2020-03-16 10:56:57 +00:00
Bogdan Tara c60fd3fdd2 Backed out 4 changesets (bug 1613985) for causing build bustages CLOSED TREE
Backed out changeset fba0caac746c (bug 1613985)
Backed out changeset 8605d7a19107 (bug 1613985)
Backed out changeset 41e858fbf235 (bug 1613985)
Backed out changeset 847433cf1e0a (bug 1613985)
2020-03-16 12:41:41 +02:00
Simon Giesecke 2d961c08ab Bug 1613985 - Use default for equivalent-to-default constructors/destructors in widget. r=jmathies
Differential Revision: https://phabricator.services.mozilla.com/D66012

--HG--
extra : moz-landing-system : lando
2020-03-16 09:14:12 +00:00
Kousuke Takaki 04bba6950f Bug 1602088 - Move nsIScrollableFrame::ScrollUnit to namespace scope. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D61140

--HG--
extra : source : 69fded25adc2ac25e302b49c1128f8926e1311a3
2020-01-30 09:13:19 +00:00
Cosmin Sabou 5a3d320cd0 Backed out changeset 69fded25adc2 (bug 1602088) for causing several box-shadow reftest failures.
CLOSED TREE
2020-01-30 13:23:10 +02:00
Kousuke Takaki 9681569b70 Bug 1602088 - Move nsIScrollableFrame::ScrollUnit to namespace scope. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D61140

--HG--
extra : moz-landing-system : lando
2020-01-30 09:13:19 +00:00
myfreeweb 01916974b0 Bug 1213601 - implement kinetic/inertial scrolling (fling) for Gtk. r=botond
--HG--
extra : rebase_source : 69a374c26bcb8781e83aeb26058a2de349313bbc
extra : amend_source : 521bb6f2b5799bfca5f8b8b5bbe9e4fef1f2dd1e
2019-06-20 16:18:45 -04:00
Razvan Maries 6fbdaf61c3 Backed out changeset f9699ae30f4d (bug 1213601) on jrmuizel's request. 2019-05-26 18:12:56 +03:00
myfreeweb e6dc1a7382 Bug 1213601 - Implement kinetic/inertial scrolling (fling) for Gtk touchpads. r=botond,karlt
--HG--
extra : rebase_source : c89a97e40aa59e1038530becdb53c2d7b992db7b
2019-05-24 13:31:34 -04:00
Srujana Peddinti b44e48bff4 Bug 1259660 - Moved mozilla::WidgetMosueEventBase::buttonType in MouseEvents.h to mozilla::MouseButton in EventForwards.h, and mozilla::WidgetMouseEventBase::buttonsFlag to mozilla::MouseButtonsFlag r=masayuki
Moved mozilla::WidgetMosueEventBase::buttonType in MouseEvents.h to mozilla::MouseButton in EventForwards.h, and mozilla::WidgetMouseEventBase::buttonsFlag to mozilla::MouseButtonsFlag so that any referer in header files do not need to include MouseEvents.h only for referring them. Instead, they just need to include EventForwards.h. Now when MouseEvents.h is changed, the rebuild speed becomes faster.

Differential Revision: https://phabricator.services.mozilla.com/D25325

--HG--
extra : moz-landing-system : lando
2019-04-21 20:13:34 +00:00
Srujana Peddinti 0260a4f6e1 Bug 1259660 - Cleaned up WidgetMouseEventBase by renaming WidgetMouseEventBase::inputSource to WidgetMouseEventBase::mInputSource r=masayuki
Renamed all class member instances from WidgetMouseEventBase::inputSource to WidgetMouseEventBase::mInputSource

Differential Revision: https://phabricator.services.mozilla.com/D25322

--HG--
extra : moz-landing-system : lando
2019-04-21 18:19:43 +00:00
Srujana Peddinti 5f185eb5aa Bug 1259660 - Cleaned up WidgetMouseEventBase by renaming WidgetMouseEventBase::button to WidgetMouseEventBase::mButton. r=masayuki
Renamed all class member instances from WidgetMouseEventBase::button to WidgetMouseEventBase::mButton.

Differential Revision: https://phabricator.services.mozilla.com/D25309

--HG--
extra : moz-landing-system : lando
2019-04-21 18:17:10 +00:00