Commit graph

1096 commits

Author SHA1 Message Date
Kartikaya Gupta
9020180bb9 Bug 1714884 - Have the Rollup method take a strongly-typed int point. r=emilio
Depends on D116948

Differential Revision: https://phabricator.services.mozilla.com/D116949
2021-06-07 01:01:10 +00:00
Kartikaya Gupta
0cd36f6974 Bug 1694847 - Remove the expired SCROLL_INPUT_METHODS telemetry probe. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D116320
2021-05-31 21:36:35 +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
Kagami Sascha Rosylight
cdcf59a339 Bug 1710317 - Part 1: Add MouseButton::eEraser r=aklotz,edgar
Differential Revision: https://phabricator.services.mozilla.com/D115508
2021-05-31 13:39:18 +00:00
Kagami Sascha Rosylight
e9b5657b7f Bug 1710316 - Pass modifiers in DispatchTouchEventFromWMPointer r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D115246
2021-05-28 22:48:43 +00:00
Kagami Sascha Rosylight
ac58c02c9a Bug 1710509 - Ignore contact area info when the source device is pen r=aklotz,edgar
Differential Revision: https://phabricator.services.mozilla.com/D115601
2021-05-26 22:56:28 +00:00
Glenn Watson
6cfb58809a Bug 1709983 - Pt 1 - Remove PushClearRectWithComplexRegion. r=gfx-reviewers,nical
The clear region prim don't support complex clip regions (the
complex clip region was being ignored). This has been shipping
like this for many months now, so it seems it's not required.

Differential Revision: https://phabricator.services.mozilla.com/D114563
2021-05-10 20:10:12 +00:00
sotaro
6b97c0067c Bug 1710335 - Add gfxCriticalNoteOnce to nsWindow::Resize() on Windows r=nical,gfx-reviewers
When Bug 1701451 happened, Negative height was passed to nsWindow::Resize(). It is helpful to call gfxCriticalNoteOnce when it happens.

Differential Revision: https://phabricator.services.mozilla.com/D114704
2021-05-10 08:28:16 +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
Bas Schouten
075f140641 Bug 1708480: Move InitializeVirtualDesktopManagerTask outside of #ifdef ACCESSIBILITY. r=mikedeboer
Differential Revision: https://phabricator.services.mozilla.com/D113816
2021-04-30 20:33:23 +00:00
Bas Schouten
1055294cdd Bug 1640852: Grab IVirtualDesktopManager object off the main thread on the creation of the first nsWindow. r=mikedeboer,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D113446
2021-04-28 12:28:56 +00:00
Kagami Sascha Rosylight
9e2ce50d93 Bug 1637259 - Dispatch touch event for WM_POINTER r=edgar,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D111513
2021-04-21 00:13:14 +00:00
Csoregi Natalia
7fe2a291b2 Backed out changeset 267e8925453b (bug 1637259) for failures on pointerevent_attributes_nohover_pointers-manual.html. CLOSED TREE 2021-04-21 00:02:25 +03:00
Kagami Sascha Rosylight
8dc6d93c55 Bug 1637259 - Dispatch touch event for WM_POINTER r=edgar,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D111513
2021-04-20 20:13:41 +00:00
Neil Deakin
27b38ee71f Bug 1704040, adjust border cropping computation on windows to better handle high dpi values, r=jmathies
Differential Revision: https://phabricator.services.mozilla.com/D111733
2021-04-20 16:11:57 +00:00
Emilio Cobos Álvarez
294d0f244e Bug 1705877 - Introduce nsIWidget::Cursor. r=dholbert
This removes some sketchy non-caching of cursors on windows while at it,
now that plugins are gone, but otherwise shouldn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D112475
2021-04-20 09:47:32 +00:00
Emilio Cobos Álvarez
a5f0e8f83c Bug 1706051 - Remove some IPC messages that are unused. r=smaug
Seems they were for plugins, but now they're just dead code.

Differential Revision: https://phabricator.services.mozilla.com/D112539
2021-04-19 13:02:33 +00:00
Botond Ballo
6dfa77de8f Bug 1704070 - Expose the APZ event status in the return value of DispatchInputEvent(). r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D111762
2021-04-14 05:07:56 +00:00
Andrew Osmond
cb0f2694b3 Bug 1704927 - Allow Software WebRender for all popups on early beta and Fission users. r=gfx-reviewers,jrmuizel
This patch turns on Software WebRender for all widgets that don't get
acceleration by default on nightly and early beta, as well as for users
who are put into the Fission experiment. It also cleans up our prefs to
simply enable it for all popups, and not just those affected by Fission.

Differential Revision: https://phabricator.services.mozilla.com/D111958
2021-04-13 23:58:49 +00:00
Botond Ballo
8dc1239f0c Bug 1700833 - Remove browser.input.touch_event_count telemetry probe. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D111739
2021-04-12 23:13:00 +00:00
Botond Ballo
58272bcc12 Bug 1687636 - Add a pref to disable the check to convert touch events to pan gesture events. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D110884
2021-04-07 18:56:39 +00:00
Botond Ballo
fbc9d42537 Bug 1687636 - Determine whether we need to convert touch events to pan gesture events on a per-device basis. r=cmartin
In bug 1511901, we added code to identify certain touch devices as needing
their touch events converted to pan gesture events.

However, we cached the result of this check globally, assuming that all
touch events would come from the same touch device.

On systems with multiple touch devices (for example, a touchpad and a
touchscreen), only one may require conversion, so in this patch the
computation is changed to be per-device.

Differential Revision: https://phabricator.services.mozilla.com/D110883
2021-04-07 18:56:38 +00:00
Marco Bonardo
0ffedcbcb3 Bug 1702474 - Search bar panel is missing shadow or border. r=harry,NeilDeakin,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D110704
2021-04-07 15:15:17 +00:00
David Parks
311a1c73dd Bug 1682030 - Remove some dead NPAPI code from dom/plugins and related spots. r=jmathies,mconley,ipc-reviewers,mccr8
This is the first of two patches in this series that removes a large amount of now dead code from dom/plugins as part of removing all NPAPI plugin support.  This patch removes re-entrancy guards we have for Windows OnPaint messages, as the guards were only needed for windowed plugins.

Differential Revision: https://phabricator.services.mozilla.com/D107144
2021-04-06 19:28:12 +00:00
David Parks
d05df71761 Bug 1682030 - Remove PPluginWidget. r=jmathies,ipc-reviewers,nika
Removes the NPAPI plugin widget actor and its proxy, as part of removing all of NPAPI plugin support.

Differential Revision: https://phabricator.services.mozilla.com/D107141
2021-04-06 19:28:11 +00:00
Csoregi Natalia
d68661e2cc Backed out 24 changesets (bug 1682030) for bustage on ProcessHangMonitor.cpp and nsCOMPtr.h. CLOSED TREE
Backed out changeset 5b1644096477 (bug 1682030)
Backed out changeset 35ae60eea3c7 (bug 1682030)
Backed out changeset 3eca76a6d639 (bug 1682030)
Backed out changeset 259c45447ad9 (bug 1682030)
Backed out changeset de9222dc8c31 (bug 1682030)
Backed out changeset 2986c7e14349 (bug 1682030)
Backed out changeset 6af3410bdb93 (bug 1682030)
Backed out changeset 42b0621c2927 (bug 1682030)
Backed out changeset 366e3e371858 (bug 1682030)
Backed out changeset 9adb2865adea (bug 1682030)
Backed out changeset 6af6af3bc03a (bug 1682030)
Backed out changeset da94a91b35ae (bug 1682030)
Backed out changeset 9143da258d0e (bug 1682030)
Backed out changeset 5e20d06952ba (bug 1682030)
Backed out changeset 6253d7e1ce7d (bug 1682030)
Backed out changeset 0e06ddeea3e2 (bug 1682030)
Backed out changeset 9c58d57c9e44 (bug 1682030)
Backed out changeset e90edd89430e (bug 1682030)
Backed out changeset 5861b8166b10 (bug 1682030)
Backed out changeset b4b88cdc7993 (bug 1682030)
Backed out changeset b80054e9805c (bug 1682030)
Backed out changeset 580d857674c0 (bug 1682030)
Backed out changeset a9cdf93c2662 (bug 1682030)
Backed out changeset 9c9c8b4998e2 (bug 1682030)
2021-04-06 03:54:12 +03:00
David Parks
3987158be1 Bug 1682030 - Remove some dead NPAPI code from dom/plugins and related spots. r=jmathies,mconley,ipc-reviewers,mccr8
This is the first of two patches in this series that removes a large amount of now dead code from dom/plugins as part of removing all NPAPI plugin support.  This patch removes re-entrancy guards we have for Windows OnPaint messages, as the guards were only needed for windowed plugins.

Differential Revision: https://phabricator.services.mozilla.com/D107144
2021-04-05 23:48:35 +00:00
David Parks
45f5dd79ff Bug 1682030 - Remove PPluginWidget. r=jmathies,ipc-reviewers,nika
Removes the NPAPI plugin widget actor and its proxy, as part of removing all of NPAPI plugin support.

Differential Revision: https://phabricator.services.mozilla.com/D107141
2021-04-05 23:48:34 +00:00
Neil Deakin
f625b71d78 Bug 1700148, add an appearance type that forces a dropshadow on menus on Windows, and uses SetWindowRgn to clip the popup to the border radius, r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D109833
2021-04-01 00:13:09 +00:00
Andrew Osmond
9c13aa431d Bug 1700153 - Disable SW-WR for transparent popups on early beta and the Fission experiment. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D109375
2021-03-22 17:19:04 +00:00
Emilio Cobos Alvarez
d1e5b2d2ed Bug 1699682 - Consistently initialize UI state to hide focusrings by default. r=mhowell
UIS_INITIALIZE does something like setting the flag if the last input event was
a mouse event or clearing it if it was a keyboard event. Unfortunately, if this
is initialized to always show focus rings we start always showing outlines for
all content, all the time, which is both undesired and confusing.

It's also not clear from the docs _which_ event it looks at specially at
startup, but anyhow the result we get is clearly flaky, from my testing.

Explicitly clear the flag. It's not clear to me if other applications can cause
the state to change... but otherwise maybe we can just remove the code dealing
with these flags?

Differential Revision: https://phabricator.services.mozilla.com/D109086
2021-03-20 01:28:20 +00:00
Doug Thayer
0ac34c04de Bug 1697091 - Move SetThemeRegion inside skeleton UI maximization else clause r=tnikkel
This change is just cleanup and have no behavioral difference, given that
SetThemeRegion only does anything for eWindowType_popups, which never have a
skeleton UI.

Depends on D108849

Differential Revision: https://phabricator.services.mozilla.com/D108850
2021-03-17 21:12:54 +00:00
Doug Thayer
38c116d745 Bug 1697091 - Ensure ResizeDirectManipulationViewport called on move/resize r=tnikkel
We were skipping the initial ResizeDirectManipulationViewport call when the
skeleton UI showed a maximized window, because it pseudo-ignores the first
Move/Resize in order to not break the maximization. There's no reason
ResizeDirectManipulationViewport should have been in the else clause - it just
wasn't properly considered.

Differential Revision: https://phabricator.services.mozilla.com/D108849
2021-03-17 21:12:53 +00:00
Brindusan Cristian
0b245c08c9 Bug 1697195 - Fix a typo in nsWindow.cpp. a=bustage-fix CLOSED TREE 2021-03-12 18:31:36 +02:00
Andrew Osmond
1c682d57a9 Bug 1697195 - Force enable Software WebRender if Fission and experiment are enabled. r=jrmuizel
Fission without WebRender is an unsupported configuration and enrolls
users based on their compositor. However because of our own rollout of
WebRender, a user might start in early beta with WebRender and lose it
in late beta, while they remain enrolled in the Fission experiment.
Also, a user could lose WebRender because of crashes or device reset,
and we may fall back to Basic.

This patch forces Software WebRender as available (but does not override
Hardware WebRender) if Fission is enabled for users enrolled in the
Fission experiment. It also prevents fallback to Basic layers when
disabling acceleration due to crashes and runtime errors, so the user
will be stuck with Software WebRender at a minimum. It also enables
Software WebRender for Windows popups with transparency.

Differential Revision: https://phabricator.services.mozilla.com/D107661
2021-03-12 15:52:40 +00:00
Chris Martin
cfef04f1a8 Bug 1689884 - Inform PresShell when tablet-mode changes occur r=emilio
Currently, PresShell is not informed when a system setting involving
Windows 10 Tablet Mode, System Dock Mode, or "Convertible Slate Mode" occur.

As this can change the result of @media (pointer) queries, layout should know
about this so it can react accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D107917
2021-03-11 17:07:42 +00:00
Alexandru Michis
16809e3387 Backed out 2 changesets (bug 1689884) for causing xpcshell assertion failures in ServiceWorkerManager.cpp (Bug 1697972).
CLOSED TREE

Backed out changeset 64b2735a8fe6 (bug 1689884)
Backed out changeset 416c387ad136 (bug 1689884)
2021-03-12 11:08:15 +02:00
Chris Martin
05f5c91106 Bug 1689884 - Inform PresShell when tablet-mode changes occur r=emilio
Currently, PresShell is not informed when a system setting involving
Windows 10 Tablet Mode, System Dock Mode, or "Convertible Slate Mode" occur.

As this can change the result of @media (pointer) queries, layout should know
about this so it can react accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D107917
2021-03-11 17:07:42 +00:00
Narcis Beleuzu
aaad782884 Backed out 1 changesets (bug 1697195) for dt failures on nsDisplayList.cpp. CLOSED TREE
Backed out changeset d5ebf7eedb59 (bug 1697195)
2021-03-09 21:59:57 +02:00
Andrew Osmond
6fc115d39f Bug 1697195 - Force enable Software WebRender if Fission is enabled. r=jrmuizel
Fission without WebRender is an unsupported configuration and enrolls
users based on their compositor. However because of our own rollout of
WebRender, a user might start in early beta with WebRender and lose it
in late beta, while they remain enrolled in the Fission experiment.
Also, a user could lose WebRender because of crashes or device reset,
and we may fall back to Basic.

This patch forces Software WebRender as available (but does not override
Hardware WebRender) if Fission is enabled. It also prevents fallback to
Basic layers when disabling acceleration due to crashes and runtime
errors, so the user will be stuck with Software WebRender at a minimum.
It also enables Software WebRender for Windows popups with transparency.

Differential Revision: https://phabricator.services.mozilla.com/D107661
2021-03-09 16:53:01 +00:00
Doug Thayer
e2fa1effe1 Bug 1696568 - Ensure skeleton UI window is always consumed if created r=emalysz
If we error out in, say, DrawSkeletonUI, the window we created will be orphaned
and left to sit there indefinitely. This patch fixes that by separating the
error from the consume result.

Differential Revision: https://phabricator.services.mozilla.com/D107301
2021-03-08 21:26:06 +00:00
Hiroyuki Ikezoe
2b2d8e7195 Bug 1678505 - Make APZEventResult::mStatus and mHandledResult private. r=botond
We do want APZEventResult to have a valid mHandledResult in the case of
nsEventStatus_eConsumeDoDefault.

Note that when we call SetStatusAsConsumeDoDefault() with a InputBlockState,
in ReceiveScrollWheelInput() for example, we need to keep the block alive there,
so each block is now RefPtr-ed instead of a raw pointer in such functions (the
raw pointer is sometimes the active one (mActiveWheelBlock etc.) which will be
discarded in ProcessQueue()).

Differential Revision: https://phabricator.services.mozilla.com/D103417
2021-03-02 08:06:27 +00:00
Jens Stutte
1e19379853 Bug 1689953: Harmonize shutdown phase definitions across nsTerminator and AppShutdown r=dthayer,chutten
This patch wants to solve several quirks around the shutdown terminator.

 - Use the same shutdown phase definitions in AppShutdown and nsTerminator. This touches quite a few files.
 - Ensure that the terminator phase shift is handled before any shutdown observer notifications are sent and reduce its heartbeat duration.
 - Add missing phases to the shutdown telemetry.

Please note that this changes the unit of "tick" to 100ms rather than 1s.
As a side effect, we also remove the obsolete "shutdown-persist" context.

While the existing test coverage continues to prove the most important functions, we acknowledge the wish for better test coverage with [[ https://bugzilla.mozilla.org/show_bug.cgi?id=1693966 | bug 1693966 ]].

Differential Revision: https://phabricator.services.mozilla.com/D103626
2021-02-27 14:38:14 +00:00
Csoregi Natalia
b08394edf3 Backed out 11 changesets (bug 1678505) for causing crashes. a=backout
Backed out changeset 7cd5f2c1c3f4 (bug 1678505)
Backed out changeset 09f4c4093c07 (bug 1678505)
Backed out changeset 76e3f391b7dd (bug 1678505)
Backed out changeset 6a0e949d4a2d (bug 1678505)
Backed out changeset 69c7b98ac8f6 (bug 1678505)
Backed out changeset 63608c5df1b0 (bug 1678505)
Backed out changeset a4532c4a1768 (bug 1678505)
Backed out changeset 09aab64b89cd (bug 1678505)
Backed out changeset e832d2bfe7a6 (bug 1678505)
Backed out changeset e0898b4f9fe6 (bug 1678505)
Backed out changeset 04a759c327cd (bug 1678505)
2021-02-27 11:26:46 +02:00
Hiroyuki Ikezoe
ddfe302394 Bug 1678505 - Make APZEventResult::mStatus and mHandledResult private. r=botond
We do want APZEventResult to have a valid mHandledResult in the case of
nsEventStatus_eConsumeDoDefault.

Note that when we call SetStatusAsConsumeDoDefault() with a InputBlockState,
in ReceiveScrollWheelInput() for example, we need to keep the block alive there,
so each block is now RefPtr-ed instead of a raw pointer in such functions (the
raw pointer is sometimes the active one (mActiveWheelBlock etc.) which will be
discarded in ProcessQueue()).

Differential Revision: https://phabricator.services.mozilla.com/D103417
2021-02-26 04:15:18 +00:00
Andrew Osmond
08a4397790 Bug 1688096 - Part 2. Add flag to CompositorOptions to allow SW-WR on a per widget basis. r=mattwoodrow
The pref gfx.webrender.software.unaccelerated-widget.allow may be used
to allow software WebRender to be used with new windows/popups that have
transparency on Windows. Otherwise they would fallback to basic layers.

Similarly, the pref gfx.webrender.software.unaccelerated-widget.force
may be used to force software WebRender for all windows that would
fallback to basic layers.

Differential Revision: https://phabricator.services.mozilla.com/D104855
2021-02-24 19:40:00 +00:00
Masayuki Nakano
ef2253b4a1 Bug 1691622 - part 9: Make nsIWidget::SynthesizeNativeMouseEvent take an XP button ID and abstract message value r=smaug,geckoview-reviewers,agi,m_kato
Currently, it takes a raw native message value, but it makes JS content too
complicated.  And on Linux, it cannot synthesize non-primary button events
because GDK has only button press and release messages which dont' include
mouse button information.

For solving these problems, this patch creates a new abstract native message
as `nsIWidget::NativeMouseMessage` and makes each widget converts it to
a platform native message.

Additionally, this patch adds an argument to make it possible its callers
to specify pressing or releasing mouse button with a DOM mouse button value.

Note that the following patch adds new argument to
`synthesizeNativeEventMouse*` for mochitests and which will be tested by
new tests.

Differential Revision: https://phabricator.services.mozilla.com/D105763
2021-02-24 01:27:10 +00:00
Masayuki Nakano
b63882dde8 Bug 1691622 - part 4: Make synthesizeNativeMouseClick*() aware of modifiers r=smaug,geckoview-reviewers,m_kato
Surprisingly, they don't take modifiers, and
`nsIWidget::SynthesizeNativeMouseEvent()` which are implementations of
`nsIDOMWindowUtils::SendNativeMouseEvent()` treat given modifier flags
are native's ones, and handle modifiers only on macOS.  Therefore, this
patch makes them handle native modifiers of Gecko.

Unfortunately, I'm not so familiar with Android API, and in the short
term, I don't need the support on Android.  Therefore, this patch just
adds a TODO comment on Android widget.

Additionally, we don't have a simple way to set modifier only while
posting a mouse input on Windows too.  It requires complicated code.
Therefore, I don't add the support for it on Windows too.

Differential Revision: https://phabricator.services.mozilla.com/D105758
2021-02-24 01:27:07 +00:00
Eitan Isaacson
6e49732365 Bug 1693597 - P1: Rename Accessible to LocalAccessible. r=morgan
Differential Revision: https://phabricator.services.mozilla.com/D105670
2021-02-19 23:14:32 +00:00