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

204 Коммитов

Автор SHA1 Сообщение Дата
Timothy Nikkel 4cac1c7814 Bug 1763121. nsIDOMWindowUtils::sendNativeTouchpadPan should use an observer to notify when the event has been sent to the destination widget. r=hiro
Otherwise we can return without the widget even seeing the event. This is how other test functions are implemented.

We need this to make the test in bug 1757928 pass.

Differential Revision: https://phabricator.services.mozilla.com/D142943
2022-04-05 22:53:35 +00:00
Masayuki Nakano d450beac6f Bug 1191862 - part 1: Make `nsIWidget::NativeKeyBindingsType` independent from `nsIWidget` and defined in an independent header file r=smaug
I'd like to use it in `IMEData.h`.  However, adding new include into it may
cause bustage with MinGW, and it's included by `nsIWidget.h` because `nsIWidget`
requires some classes defined in `IMEData.h`.  Therefore, I'd like to make a
new header file for avoiding the include hell.

Differential Revision: https://phabricator.services.mozilla.com/D138007
2022-02-15 08:00:05 +00:00
Makoto Kato 3da88d8e66 Bug 1743780 - Get rid of PuppetScreenManager and PuppetScreen. r=emilio
Now we use `mozilla::widget::ScreenManager` even if on content process, so no
one uses `PuppetScreen` and `PuppetScreenManager`.

And I would like to remove `Hal.h` reference from `PuppetWidget`, so I remove
unused method.

Differential Revision: https://phabricator.services.mozilla.com/D132564
2021-12-01 15:07:14 +00:00
sotaro f0775d8818 Bug 1741783 - Rename PuppetWidget::HasLayerManager() to HasWindowRenderer() r=gfx-reviewers,nical
PuppetWidget already renamed GetLayerManager() to GetWindowRenderer().

Differential Revision: https://phabricator.services.mozilla.com/D131465
2021-11-18 14:16:00 +00:00
Emilio Cobos Álvarez 6c858f9e0c Bug 1736441 - Remove a bunch of dead plugins code from widget/. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D128863
2021-10-19 11:19:13 +00:00
Marian-Vasile Laza 0f2876e6ca Backed out changeset 115b43608ec1 (bug 1736441) for causing build bustages on nsWindow.cpp. CLOSED TREE 2021-10-19 13:54:23 +03:00
Emilio Cobos Álvarez c70d201838 Bug 1736441 - Remove a bunch of dead plugins code from widget/. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D128863
2021-10-19 10:06:50 +00:00
Kagami Sascha Rosylight 6c8d3ce28a Bug 1728171 - Part 2: Add button parameter to utils.sendNativePenInput r=cmartin,edgar
Differential Revision: https://phabricator.services.mozilla.com/D124172
2021-09-06 11:50:34 +00:00
Matt Woodrow d41e38aec0 Bug 1727682 - Make WebRenderLayerManager not inherit LayerManager. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D124433
2021-09-05 22:36:45 +00:00
Timothy Nikkel 5014725e77 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 5eefc2666f Bug 1678771. Rename TouchpadPinchPhase to TouchpadGesturePhase. r=hiro
So we can use it for sending pan gestures too.

Depends on D114358

Differential Revision: https://phabricator.services.mozilla.com/D122048
2021-08-08 22:04:17 +00:00
Matt Woodrow 4b6db2ad05 Bug 1722258 - Convert more LayerManager usage to use WindowRenderer. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D120920
2021-08-05 06:48:34 +00:00
Csoregi Natalia bc4c680c8d Backed out 3 changesets (bug 1722258) for causing Bug 1722935. a=backout
Backed out changeset cf8a1175abd1 (bug 1722258)
Backed out changeset 41176d476eb7 (bug 1722258)
Backed out changeset 4149d596d03d (bug 1722258)
2021-07-29 20:19:48 +03:00
Matt Woodrow 7cd494afba Bug 1722258 - Convert more LayerManager usage to use WindowRenderer. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D120920
2021-07-28 20:58:22 +00:00
Matt Woodrow 912b7f8ef1 Bug 1721537 - Split out WindowRenderer base class from LayerManager. r=miko
Depends on D120439

Differential Revision: https://phabricator.services.mozilla.com/D120440
2021-07-22 22:58:57 +00:00
Matt Woodrow da45121505 Bug 1721537 - Simplify nsIWidget::GetLayerManager by removing unused parameters. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D120439
2021-07-22 22:58:57 +00:00
Greg V c34911209c Bug 1580595 - [Wayland] Add support for pointer lock via relative-pointer and pointer-constraints r=stransky,rmader,emilio
On Wayland, it is not possible to warp the pointer.
To use the appropriate protocols, new IPC messages were added for supporting
a platform's native pointer locking mechanism.

Differential Revision: https://phabricator.services.mozilla.com/D102114
2021-04-22 14:56:43 +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
Sean Feng 706997d444 Bug 1689156 - Bring the fast tab switch paint back r=mstange,mattwoodrow
In bug 1669239, we removed the magic paint which would occur during tab
switches, and instead we requested a tick. However, this approach
didn't work well because tick was a heavy operation which did not
only paints but also many other stuff, such as running
requestAnimationFrame handlers, so it made the tab switches slower
under certain conditions.

So here we reverts the changes we made in bug 1669239.

Differential Revision: https://phabricator.services.mozilla.com/D107858
2021-03-22 20:49:04 +00:00
Timothy Nikkel 957d767576 Bug 1696802. Add test. r=botond,mstange
Creating an event with type NSEventTypeSmartMagnify does not work with either NSEvent mouseEventWithType or NSEvent otherEventWithType (they both hit an assert in the appkit code). So the best we can do is call the same function.

Differential Revision: https://phabricator.services.mozilla.com/D107792
2021-03-12 02:10:43 +00:00
Kagami Sascha Rosylight 9fccbff1fd Bug 1648267 - Part 4: Add OS native pen input injection r=edgar,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D106050
2021-03-02 18:29:45 +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
alaaemad cf0d502d81 Bug 1640186 - Add machinery for sending native pinch gestures from a test, and a test which uses it r=botond
Currently implemented for Linux

Differential Revision: https://phabricator.services.mozilla.com/D103929
2021-02-19 05:35:40 +00:00
Masayuki Nakano a25988774a Bug 1685491 - part 5: Move the code remapping arrow keys in vertical content to `NativeKeyBindings` r=smaug,jfkthame
Currently, this feature is implemented only on Linux and macOS (see also
bug 1077515 and bug 1301497), and the code is really similar each other.
Additionally, it always tries to query selection to check whether the caret is
in vertical content or not if arrow keys are pressed.  For avoiding a lot of
query, this patch makes `TextEventDispatcher` cache writing mode at every
selection change notification.  However, unfortunately, it's not available when
non-editable content has focus, but it should be out of scope of this bug since
it requires a lot of changes.

Anyway, with this patch, we can write a mochitest only on Linux and macOS.
The following patch adds a test for this as a fix of bug 1103374.

Differential Revision: https://phabricator.services.mozilla.com/D102881
2021-02-02 03:29:31 +00:00
Masayuki Nakano 796bb2f86e Bug 1689034 - part 1: Get rid of communication part between plugin process and widget in the main process r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D103138
2021-01-28 08:23:33 +00:00
Masayuki Nakano 44dced1d87 Bug 1683226 - part 13: Get rid of `nsIWidget::StartPluginFocused()` r=m_kato,ipc-reviewers,mccr8
Depends on D100386

Differential Revision: https://phabricator.services.mozilla.com/D100387
2020-12-24 02:46:46 +00:00
Masayuki Nakano 968d02a1a9 Bug 1683226 - part 12: Get rid of `nsIWidget::SetPluginFocus()` r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D100386
2020-12-24 02:46:02 +00:00
Masayuki Nakano f13852f795 Bug 1683226 - part 10: Get rid of `nsIWidget::EnableIMEForPlugin()` r=m_kato
This is used only on Windows.

Differential Revision: https://phabricator.services.mozilla.com/D100122
2020-12-21 06:31:16 +00:00
Masayuki Nakano deee66043a Bug 1683226 - part 6: Get rid of the path of `DefaultProcOfPluginEvent` r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D100118
2020-12-21 06:13:09 +00:00
Masayuki Nakano b20f4bb5c2 Bug 1683226 - part 5: Get rid of the path setting candidate window position from plugin on Windows r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D100117
2020-12-21 06:03:33 +00:00
Sean Feng 6eb1ed8c33 Bug 1671592 - Remove PuppetWidget::PaintTask and PuppetWidget::Paint r=emilio
After Bug 1669239, The way we use `PuppetWidget::Paint` starts to be
more async. For instance, `PuppetWidget::Invalidate` will schedule
an async `PaintTask`, when the `PaintTask` runs, it'll request
the next `Tick` to paint which is also async.

It starts to cause some tests to fail because of the timing. This
patch just improves the overall usage to be less async.

Differential Revision: https://phabricator.services.mozilla.com/D93855
2020-10-17 18:07:03 +00:00
Sean Feng 40945e8a39 Bug 1669239 - Call Tick to paint in PuppetWidget::Paint instead of using WillPaintWindow r=emilio,mattwoodrow
The `WillPaintWindow` call is problematic for FirstContentfulPaint
algorithm because it causes paints that outside of ticks, which would
revoke the viewer flush for the next tick, hence no firstContentful
paint entries are fired.

However, this `WillPaintWindow` call is also useful because it allows
the parent to aware that the layers are updated, so that the parent
can fire corresponding events based on the status. If we don't do it,
parent may end up not knowing that the layers are updated, so some
tests may stall because of the missing events.

The proposed solution here is simply using Tick here to satisfy both
requirements.

It's okay to remove mDirtyRegion in this patch because the
mDirtyRegion usage was for BASIC_LAYERS. BASIC_LAYERS means
BasicLayerManager which does in-process drawing which is nonsense
from the content process.

Differential Revision: https://phabricator.services.mozilla.com/D92445
2020-10-15 17:51:36 +00:00
Emilio Cobos Álvarez d725223bc4 Bug 1647871 - Remove nsIWidget::GetCompositionSize(). r=kats
No longer called. This was done as an optimization for OOP iframes, but
it affects the scrollport so it's clearly not sound (the visible rect
shouldn't affect the layout scroll port).

If very tall OOP iframes are a problem somehow, it's something that we
need to deal with in another place. It was, in fact, removed for
top-level remote iframes because of bug 1554861 and other regressions.

Depends on D80731

Differential Revision: https://phabricator.services.mozilla.com/D80732
2020-06-24 13:30:45 +00:00
Emilio Cobos Álvarez 7b19f0d6d4 Bug 1609024 - Remove cache mechanism which is not very useful. r=hiro,snorp,mccr8
I don't think all this complexity is worth it for having a
marginally-more-realistic testing story. Using the pref just works and we should
do that, I think.

Differential Revision: https://phabricator.services.mozilla.com/D59980
2020-05-21 17:02:06 +00:00
Kartikaya Gupta 7d2c8af30b Bug 1622360 - Remove SLGuidAndRenderRoot and convert remaining uses to ScrollableLayerGuid. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D68400

--HG--
extra : moz-landing-system : lando
2020-03-27 17:44:21 +00:00
Chris Peterson fd22d5d367 Bug 1624786 - Replace MOZ_MUST_USE with [[nodiscard]] in widget and widget/windows. r=jmathies
Also move MOZ_MUST_USE before function declarations' specifiers and return type. While clang and gcc's __attribute__((warn_unused_result)) can appear before, between, or after function specifiers and return types, the [[nodiscard]] attribute must precede the function specifiers.

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

--HG--
extra : moz-landing-system : lando
2020-03-26 18:48:30 +00:00
Makoto Kato 6279258383 Bug 1503656 - Part 7. Notify of safe area insets changed. r=smaug
Since safe area insets uses on content, we need send it from chrome process to
content process.

SafeAreaInsetsChanged will be called per window position/size change (Next
patch is Android implementation for it), we have to calculate safe area insets
on widget/window per change.

Current implementation is that this value is top level document only like Blink
since https://github.com/w3c/csswg-drafts/issues/4670 isn't resolved yet.

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

--HG--
extra : moz-landing-system : lando
2020-03-04 08:16:31 +00:00
Csoregi Natalia aa5b814fee Backed out 6 changesets (bug 1503656) as per request. CLOSED TREE
Backed out changeset 27faa3b167a9 (bug 1503656)
Backed out changeset 7111f9b5ad06 (bug 1503656)
Backed out changeset 43fdc889beac (bug 1503656)
Backed out changeset 332ceea26151 (bug 1503656)
Backed out changeset f31efa4ea2ec (bug 1503656)
Backed out changeset 91b847efe591 (bug 1503656)
2020-03-04 10:07:42 +02:00
Makoto Kato 00949ff265 Bug 1503656 - Part 7. Notify of safe area insets changed. r=smaug
Since safe area insets uses on content, we need send it from chrome process to
content process.

SafeAreaInsetsChanged will be called per window position/size change (Next
patch is Android implementation for it), we have to calculate safe area insets
on widget/window per change.

Current implementation is that this value is top level document only like Blink
since https://github.com/w3c/csswg-drafts/issues/4670 isn't resolved yet.

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

--HG--
extra : moz-landing-system : lando
2020-03-04 07:28:04 +00:00
Hiroyuki Ikezoe 48f45a3d02 Bug 1550800 - Make PuppetWidget::WidgetToScreenOffset work in out-of-process iframes. r=hsivonen,emilio
A mochitest for this change will be landed in bug 1614268 which needs
a work to make Element.focus() work in OOP iframes (bug 1556627).

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

--HG--
extra : moz-landing-system : lando
2020-02-12 01:44:28 +00:00
pbz 70e1dba79e Bug 1432856 - Extended focus methods in Window.webidl, Client.webidl and Element.webidl to pass CallerType. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D55811

--HG--
extra : moz-landing-system : lando
2020-01-16 14:38:40 +00:00
Oana Pop Rus 661db3a39f Backed out 7 changesets (bug 1432856) for build bustages failures in nsWindow.h on a CLOSED TREE
Backed out changeset 3d08c3cce533 (bug 1432856)
Backed out changeset 49d03dd89b17 (bug 1432856)
Backed out changeset 62fc84c8ce99 (bug 1432856)
Backed out changeset a8a4fa63f5b2 (bug 1432856)
Backed out changeset c81f3d5b9bf3 (bug 1432856)
Backed out changeset 8351a8b1d96a (bug 1432856)
Backed out changeset a303b775a51b (bug 1432856)
2019-12-16 23:53:35 +02:00
pbz e03ecc2171 Bug 1432856 - Extended focus methods in Window.webidl, Client.webidl and Element.webidl to pass CallerType. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D55811

--HG--
extra : moz-landing-system : lando
2019-12-16 21:06:11 +00:00
Masayuki Nakano 0f9b3a05da Bug 1594215 - Make `PuppetWidget::GetEditCommands()` check `mBrowserChild` before using it r=smaug
The reason of the crash is, the window may have already been destroyed and
`PuppetWidget::mBrowserChild` was set to `nullptr` when synthesizing key event.

This patch makes `PuppetWidget::GetEditCommands()` check whether it's `nullptr`
and returns whether it's succeeded or not.  Therefore, `TextInputProcessor`
can throw exception in such case.

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

--HG--
extra : moz-landing-system : lando
2019-11-08 11:32:51 +00:00
Ryan Hunt 116f9c9f98 Bug 1559518 - Use LayoutDevicePixel for BrowserChild visible rect and composition size. r=kats
App units of a remote browser element in the parent process are
different from app units inside the remote content in the child
process. We should apply the appropriate conversions by exposing
the relevant data as LayoutDevicePixel.

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

--HG--
extra : moz-landing-system : lando
2019-06-19 18:20:52 +00:00
Ryan Hunt b552abfc60 Bug 1559518 - Revert composition size changes as they also affect top level remote browsers. r=kats
This change was suspect to not work under full page zoom, but I thought it
would be okay as it would only affect OOP-iframes. That was not true.

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

--HG--
extra : moz-landing-system : lando
2019-06-17 16:09:28 +00:00
Ryan Hunt d7b4b6a1a4 Bug 1558482 - Restrict the composition size to the visibleRect for OOP-iframes. r=kats
Even if we don't have a root displayport, the composition size is still used for
displayport margins calculations. For extremely tall iframes, this will create
a displayport that is way to big. We should instead report a composition size that
is equivalent to the visible rect for OOP-iframes.

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

--HG--
extra : rebase_source : 1f43cb16a0841eb3cd892401c83a46d56276cf2e
2019-06-11 07:57:52 -05:00