Commit Graph
47 Commits
Author SHA1 Message Date
Masatoshi Kimura 1ffc0764f4 Bug 1852806 - Remove macros for older Windows SDK from widget/windows/. r=handyman
Depends on D188031

Differential Revision: https://phabricator.services.mozilla.com/D188032
2023-09-15 03:19:28 +00:00
Cosmin Sabou eab17df623 Backed out 15 changesets (bug 1852806) for causing mda failures on test_video_low_power_telemetry.html. CLOSED TREE
Backed out changeset faea1f4cb9a9 (bug 1852806)
Backed out changeset 4db93c374f9b (bug 1852806)
Backed out changeset 7e40e0e04921 (bug 1852806)
Backed out changeset b0a66c4269ce (bug 1852806)
Backed out changeset 4ff3545936f9 (bug 1852806)
Backed out changeset 02c0a8eb3fd6 (bug 1852806)
Backed out changeset ae2c7b33acfb (bug 1852806)
Backed out changeset 2b89ba254a1a (bug 1852806)
Backed out changeset dfa4f73fc548 (bug 1852806)
Backed out changeset daffcc4c1877 (bug 1852806)
Backed out changeset 33855bcdf15e (bug 1852806)
Backed out changeset 694f29707f3e (bug 1852806)
Backed out changeset 1891eda22a59 (bug 1852806)
Backed out changeset 1b854941389c (bug 1852806)
Backed out changeset 2f7cfe04be59 (bug 1852806)
2023-09-15 09:48:27 +03:00
Masatoshi Kimura 22c1cfabaa Bug 1852806 - Remove macros for older Windows SDK from widget/windows/. r=handyman
Depends on D188031

Differential Revision: https://phabricator.services.mozilla.com/D188032
2023-09-15 03:19:28 +00:00
Tom Ritter a10afc01d5 Bug 1636805: Remove the DirectManipulation hack-arounds r=firefox-build-system-reviewers,ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D169374
2023-02-15 19:01:56 +00:00
Olli Pettay f18298c006 Bug 1807812 - Remove WidgetEventTime::mTime, r=masayuki,geckoview-reviewers,m_kato
HTMLSelectEventListener changes are needed, since currently that code works somewhat by accident given that
mTime often contains totally bogus values, like PR_IntervalNow(). Those changes then reveal issues also in
browser_editAddressDialog.js.

Differential Revision: https://phabricator.services.mozilla.com/D165618
2023-01-02 12:31:40 +00:00
Hiroyuki Ikezoe 2e9c5c3c35 Bug 1794070 - Make mRequiresContentResponseIfCannotScrollHorizontallyInStartDirection private. r=botond
And initialized it only in ctors so that in the next change we can use it to
tell whether this pan event may trigger swipe or not without calling
SwipeTracker::CanTriggerSwipe every time.

There's an unintuitive change in a GTest sending a horizontal pan-start event.
With this changeset, all incomming pan-start events on desktop platforms
basically set mRequiresContentResponseIfCannotScrollHorizontallyInStartDirection
to true even if the event is generated in GTests. So the pan start event runs
into the short circuit path for swipe-to-navigation. This is a good thing because
it means the GTest replicates what our browser does properly.

Differential Revision: https://phabricator.services.mozilla.com/D160435
2022-11-22 06:52:51 +00:00
Butkovits Atila 3eac621efe Backed out 13 changesets (bug 1794070) for causing failures at browser_test_swipe_gesture.js. CLOSED TREE
Backed out changeset afe487b23e1c (bug 1794070)
Backed out changeset b119052f690d (bug 1794070)
Backed out changeset 733188f6b7ca (bug 1794070)
Backed out changeset 53273c86140a (bug 1794070)
Backed out changeset e2e39e61efbe (bug 1794070)
Backed out changeset 93b240feb781 (bug 1794070)
Backed out changeset 78aea5c32e14 (bug 1794070)
Backed out changeset 158008a6363b (bug 1794070)
Backed out changeset 3c3e76c8bf49 (bug 1794070)
Backed out changeset 39beb7abc321 (bug 1794070)
Backed out changeset 0ded01fbbd9e (bug 1794070)
Backed out changeset cf4552e5e11b (bug 1794070)
Backed out changeset 317ee240609d (bug 1794070)
2022-11-21 13:41:34 +02:00
Hiroyuki Ikezoe 2065d692fe Bug 1794070 - Make mRequiresContentResponseIfCannotScrollHorizontallyInStartDirection private. r=botond
And initialized it only in ctors so that in the next change we can use it to
tell whether this pan event may trigger swipe or not without calling
SwipeTracker::CanTriggerSwipe every time.

There's an unintuitive change in a GTest sending a horizontal pan-start event.
With this changeset, all incomming pan-start events on desktop platforms
basically set mRequiresContentResponseIfCannotScrollHorizontallyInStartDirection
to true even if the event is generated in GTests. So the pan start event runs
into the short circuit path for swipe-to-navigation. This is a good thing because
it means the GTest replicates what our browser does properly.

Differential Revision: https://phabricator.services.mozilla.com/D160435
2022-11-21 03:10:07 +00:00
Markus Stange 0ebf09c6f2 Bug 1765399 - Move main thread observers to the vsync dispatcher. r=smaug
Main thread observers (previously "generic" observers) are only used
by Windows touchpad scrolling so far.

Differential Revision: https://phabricator.services.mozilla.com/D144371
2022-05-05 02:15:16 +00:00
Marian-Vasile Laza f9224e56ba Backed out 16 changesets (bug 1765399) for causing build bustages on RefPtr.h.
Backed out changeset 8ff5e213e351 (bug 1765399)
Backed out changeset bd164f5cc8b3 (bug 1765399)
Backed out changeset 939b577eee05 (bug 1765399)
Backed out changeset ee00e3583f42 (bug 1765399)
Backed out changeset e5001537e536 (bug 1765399)
Backed out changeset d5a4004a2955 (bug 1765399)
Backed out changeset d3c1f6c420e3 (bug 1765399)
Backed out changeset d21fca656853 (bug 1765399)
Backed out changeset 5e5a29a99c9e (bug 1765399)
Backed out changeset ce326de1e107 (bug 1765399)
Backed out changeset 3890e83660b0 (bug 1765399)
Backed out changeset 2f3ceca7aefe (bug 1765399)
Backed out changeset 40c47c498858 (bug 1765399)
Backed out changeset 3a3a2aa6de9b (bug 1765399)
Backed out changeset 4a30a4b3d30d (bug 1765399)
Backed out changeset a9115d9d648e (bug 1765399)
2022-05-05 00:30:06 +03:00
Markus Stange c0349b4d24 Bug 1765399 - Move main thread observers to the vsync dispatcher. r=smaug
Main thread observers (previously "generic" observers) are only used
by Windows touchpad scrolling so far.

Differential Revision: https://phabricator.services.mozilla.com/D144371
2022-05-04 16:13:37 +00:00
Markus Stange e96280ff69 Bug 1765400 - Make NotifyVsync return void. r=smaug
Nobody was checking the return value anywhere.

Differential Revision: https://phabricator.services.mozilla.com/D144360
2022-05-04 01:01:04 +00:00
Hiroyuki Ikezoe e6f5819fc3 Bug 1754674 - Send a pan end event before momentum events on Windows. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D138401
2022-02-10 07:24:59 +00:00
Timothy Nikkel 223e542d65 Bug 1671067. Don't include the window default scale for Direct Manipulation generated pans. r=hiro
This changes makes us match Chrome and Edge.

The default scale is affected by the DPI setting in Windows settings.

I originally included this scale when I wrote this code based on what it seemed like the Chrome code was doing, but I must have misunderstood what the scale they were using represented.

Differential Revision: https://phabricator.services.mozilla.com/D135591
2022-01-15 11:59:28 +00:00
Hiroyuki Ikezoe 9ae35e56e9 Bug 1348786 - Use SwipeTracker on Windows. r=tnikkel
This code is equivalent with what nsChildView.mm does.

Differential Revision: https://phabricator.services.mozilla.com/D134369
2022-01-05 09:08:08 +00:00
Andrew Osmond cabfab5e52 Bug 1738971 - Part 3. Rework VsyncChild to allow multiple implementations. r=gfx-reviewers,jgilbert
VsyncChild is main thread only, and we would like to reuse PVsync on the
worker threads via PBackgroundChild which already implements it. This
patch does the necessary refactoring to have multiple implementations of
PVsyncChild.

Differential Revision: https://phabricator.services.mozilla.com/D130264
2021-12-10 02:57:50 +00:00
Csoregi Natalia 77f4c3192d Backed out 17 changesets (bug 1738971, bug 1736177) for bp-hybrid failures and others. CLOSED TREE
Backed out changeset 828633114de2 (bug 1736177)
Backed out changeset 5be8557c4721 (bug 1736177)
Backed out changeset 49f8b4205a46 (bug 1736177)
Backed out changeset 2610d4464ad5 (bug 1736177)
Backed out changeset 6d6c78c31c28 (bug 1736177)
Backed out changeset d55f1ee88bb9 (bug 1736177)
Backed out changeset bf588f8ffcf1 (bug 1736177)
Backed out changeset 86f6f6d86c6c (bug 1736177)
Backed out changeset f400c75c5829 (bug 1736177)
Backed out changeset 4a34124d5f4e (bug 1736177)
Backed out changeset 70aff7fcd001 (bug 1736177)
Backed out changeset db2347ee8147 (bug 1736177)
Backed out changeset 3dde5ddb65e5 (bug 1738971)
Backed out changeset 894ba6b7b68f (bug 1738971)
Backed out changeset dc4503052cf1 (bug 1738971)
Backed out changeset d9aef3e9797e (bug 1738971)
Backed out changeset 562a1e8e5ac3 (bug 1738971)
2021-12-10 01:13:23 +02:00
Andrew Osmond 6c4cd0191f Bug 1738971 - Part 3. Rework VsyncChild to allow multiple implementations. r=gfx-reviewers,jgilbert
VsyncChild is main thread only, and we would like to reuse PVsync on the
worker threads via PBackgroundChild which already implements it. This
patch does the necessary refactoring to have multiple implementations of
PVsyncChild.

Differential Revision: https://phabricator.services.mozilla.com/D130264
2021-12-09 19:25:23 +00:00
Timothy Nikkel 1a061191c9 Bug 1678771. Add test. r=hiro
We implement a new nsIDOMWindowUtils function sendNativeTouchpadPan to do this. It is only implemented on Windows here.

Depends on D122048

Differential Revision: https://phabricator.services.mozilla.com/D122049
2021-08-08 22:04:18 +00:00
Timothy Nikkel 6c32151a9a 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
Botond Ballo 294183d485 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
Timothy Nikkel 672f721558 Bug 1697756. Restructure dmanip code so it's not possible to hit MOZ_ASSERT(updateLastScale) in DManipEventHandler::OnContentUpdated. r=botond
I'm not sure if the weird dmanip behaviour coming from the OS is new (because we have a new bug (bug 1697091) that seems like dmanip has changed what it sends us sometimes), or has always existed. But it seems like a good idea to make the code robust against this.

We can hit this assert in the following way. It seems as though dmanip decides after the first few OnContentUpdate calls if it is processing a pinch or a pan (because we can get a scale that is slightly different from 1 on the first OnContentUpdated call, but after that point never changes at all while the offset is changing fluidly) and if it decides it is a pan then it locks the scale to whatever it's last value was. So if we get a scale that is very close to 1 but not fuzzy equal to 1 on the first OnContentUpdated call we will decide that we are processing a pinch, but dmanip can then decide that it's processing a pan. Once the user lifts their finger dmanip will inform us via OnViewportStatusChanged that it is now in inertia mode, it is allowed to go into inertia for pans but not pinches because we pass DIRECTMANIPULATION_CONFIGURATION_TRANSLATION_INERTIA but not DIRECTMANIPULATION_CONFIGURATION_SCALING_INERTIA when we create dmanip here https://searchfox.org/mozilla-central/rev/87a8afd9f57ee4bc542ba0ec3f96a891042b6db7/widget/windows/DirectManipulationOwner.cpp#554 And then dmanip can go straight from inertia to running, this causes us to start a new pinch because our current scale is not fuzzy equal to 1. But also, the current scale has not changed, so it is equal to our last scale, so we have no scale change to send in the pinch start event.

An example of logging when it happens is helpful for understanding and can be found at https://bugzilla.mozilla.org/show_bug.cgi?id=1697756#c2

Differential Revision: https://phabricator.services.mozilla.com/D107994
2021-03-13 01:11:30 +00:00
Timothy Nikkel eb44e4744e Bug 1683426. Assert in DManipEventHandler::OnContentUpdated that SendPinch returns true if mShouldSendPinchStart is true. r=botond
Otherwise we wouldn't send a pinch start. This should never be hit because if we get here the current scale should not be fuzzy equal to the previous scale so SendPinch should compute a non-zero deltaY and send an event and return true.

Differential Revision: https://phabricator.services.mozilla.com/D100170
2020-12-18 22:20:32 +00:00
Timothy Nikkel 84a097f7a6 Bug 1661108. Only send pan events from DManip if the delta is at least 1. r=kats
This seems to match what Chrome does. On macOS we only get sent deltas from the OS that are at least 1.

Differential Revision: https://phabricator.services.mozilla.com/D88542
2020-09-04 03:27:09 +00:00
Butkovits Atila 7d347a562b Backed out changeset a95c23aa4e10 (bug 1661108) for build bustage at DirectManipulationOwner. CLOSED TREE 2020-09-03 20:55:07 +03:00
Timothy Nikkel 58a132f375 Bug 1661108. Only send pan events from DManip if the delta is at least 1. r=kats
This seems to match what Chrome does. On macOS we only get sent deltas from the OS that are at least 1.

Differential Revision: https://phabricator.services.mozilla.com/D88542
2020-09-03 13:10:38 +00:00
Timothy Nikkel e125b73755 Bug 1658225. Ensure that WidgetWheelEvents produced from PinchGestureInputs always have a non-zero deltaY. r=kats
See bug 1648489 for why we need this.

If we don't send a pinch we don't want to update the last scale so that when we do send an event it incorporates the full scale change from the last time we sent an event.

Even if aScale != mLastScale in SendPinch the computed deltaY ( = 100 * (aScale-mLastScale) * widgetscale) can be 0 seemingly because of floating point weirdness I guess.

Depends on D86495

Differential Revision: https://phabricator.services.mozilla.com/D86496
2020-08-10 13:21:45 +00:00
Timothy Nikkel c2617e2c1d 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 d2c926bc60 Bug 1658647. Put the current keyboard modifiers on direct manipulation input events. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D86779
2020-08-11 23:30:57 +00:00
Simon Giesecke 1f29cc4393 Bug 1656117 - Reduce include dependencies on nsRefreshDriver.h. r=mstange
The abstract observer base classes are moved to a separate header file
nsRefreshObservers.h and the includes are adjusted accordingly.

Some method implementations are moved to the corresponding implementation files
to avoid the need to include the nsRefreshDriver.h file in the header.

Differential Revision: https://phabricator.services.mozilla.com/D85764
2020-08-04 21:17:50 +00:00
Timothy Nikkel e23000ad3d 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
Simon Giesecke 2dcd4de57b Bug 1652008 - Add some missing include directives in widget/windows. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D83102
2020-07-15 13:43:37 +00:00
Timothy Nikkel ec7e16ebf9 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
Kartikaya Gupta 8a427f2db0 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 4483bfe47f Bug 1641996. Small follow up.
Depends on D77576

Differential Revision: https://phabricator.services.mozilla.com/D77583
2020-05-30 10:13:37 +00:00
Timothy Nikkel b71fbbc481 Bug 1641996. Put the focus point of pinch events from Direct Manipulation in widget relative coordinates. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D77576
2020-05-30 08:33:24 +00:00
Mihai Alexandru Michis 364252b768 Backed out changeset ac8ebdcda25b (bug 1641996) for causing bustages in DirectManipulationOwner.
CLOSED TREE
2020-05-30 11:05:52 +03:00
Timothy Nikkel dfffc6c3c1 Bug 1641996. Put the focus point of pinch events from Direct Manipulation in widget relative coordinates. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D77576
2020-05-30 06:58:47 +00:00
Sylvestre Ledru 17947d45e5 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D76451
2020-05-25 07:42:38 +00:00
Timothy Nikkel 0ed6f4c163 Bug 1636646. ifdef direct manipulation code so it's not compiled on mingw. r=aklotz
It seems like the build environment needs updating/modifying so it can handle this. But for now we unbreak the build.

Differential Revision: https://phabricator.services.mozilla.com/D74525
2020-05-09 21:38:55 +00:00
Timothy Nikkel 08c31dfc6a Bug 1630912. Add a small state machine and code to send pinch and pan events from direct manipulation. r=kats
We can't just get pinch events, we need to handle both.

This state machine code is basically copied from Chrome's implementation.

Differential Revision: https://phabricator.services.mozilla.com/D71307
2020-05-08 23:20:23 +00:00
Timothy Nikkel 91f1f10a2a Bug 1630912. Hook up direct manipulation object to vsync. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D71306
2020-05-08 23:20:05 +00:00
Timothy Nikkel ba9dea927b Bug 1630912. Create the necessary direct manipulation objects. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D71305
2020-05-08 23:19:58 +00:00
Razvan Maries 076359d55e Backed out 6 changesets (bug 1630912) for build bustages on gfxAndroidPlatform.cpp. CLOSED TREE
Backed out changeset 21dc02bc12b9 (bug 1630912)
Backed out changeset 08a6a1f1c4c7 (bug 1630912)
Backed out changeset 108b1a07929b (bug 1630912)
Backed out changeset e202ddeb4e40 (bug 1630912)
Backed out changeset f7d9852a3d09 (bug 1630912)
Backed out changeset e6cd2ceab183 (bug 1630912)
2020-05-05 09:04:37 +03:00
Timothy Nikkel fbb0581f88 Bug 1630912. Add a small state machine and code to send pinch and pan events from direct manipulation. r=kats
We can't just get pinch events, we need to handle both.

This state machine code is basically copied from Chrome's implementation.

Differential Revision: https://phabricator.services.mozilla.com/D71307
2020-05-01 23:33:18 +00:00
Timothy Nikkel d2ed4630ff Bug 1630912. Hook up direct manipulation object to vsync. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D71306
2020-05-01 23:33:00 +00:00
Timothy Nikkel b45f4cf549 Bug 1630912. Create the necessary direct manipulation objects. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D71305
2020-05-04 15:26:39 +00:00