Commit graph

980 commits

Author SHA1 Message Date
Jeff Muizelaar
f76f41feb4 Bug 1736236 - Remove obsolete LayerManager.h. r=gfx-reviewers,lsalzman
This adds a bunch of #include "WindowRenderer.h" in places
that were getting it implicitly before.

Differential Revision: https://phabricator.services.mozilla.com/D128687
2021-10-17 23:00:47 +00:00
Jeff Muizelaar
6ff665fec1 Bug 1736086 - Rename CreateBasicLayerManager to CreateFallbackRenderer. r=gfx-reviewers,mstange
That's what it actually does now

Differential Revision: https://phabricator.services.mozilla.com/D128634
2021-10-16 00:02:45 +00:00
Makoto Kato
c4cc01692d Bug 1672609 - Implement nsWindow::SetCursor to support cursor property on GeckoView. r=geckoview-reviewers,emilio,owlish
This change also supports pointer icon change such as I-beam etc when pointer
is on text box etc.

Differential Revision: https://phabricator.services.mozilla.com/D126062
2021-10-05 11:42:00 +00:00
Jeff Muizelaar
4f748cc16b Bug 1727661 - Remove RenderTrace. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D123699
2021-08-26 13:38:03 +00:00
Matt Woodrow
d93d452a96 Bug 1727672 - Remove LayerManagerComposite. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123708
2021-08-26 04:59:57 +00:00
Matt Woodrow
d751b43176 Bug 1727489 - Remove PLayerTransaction. r=jrmuizel,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D123595
2021-08-26 04:59:57 +00:00
Butkovits Atila
c83e348e26 Backed out 2 changesets (bug 1727488, bug 1727489) for causing bustages on KnowsCompositor.cpp. CLOSED TREE
Backed out changeset 5a00db1b7a6a (bug 1727489)
Backed out changeset 13686567e748 (bug 1727488)
2021-08-26 04:49:16 +03:00
Matt Woodrow
0d4e9aa48a Bug 1727489 - Remove PLayerTransaction. r=jrmuizel,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D123595
2021-08-26 00:25:21 +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
Aaron Klotz
022c804b33 Bug 1690296: Add callback to notify app to fully display its dynamic toolbar; r=agi,owlish,hiro
* Per advice from Emilio on Matrix, I consolidated overflow checks into `ScrollFrameHelper::GetOverflowState()`.
* In `ScrollFrameHelper::ReflowFinished` we detect the condition requring the app to expand the toolbar.
  (Hiro, I know that you suggested a second place to detect this. If you feel that it is important enough to add that,
   we'd prefer filing a follow-up bug in Layout for that case that your team can follow up on.)
* We then propagate the notification through `PresShell`, up through `PBrowser`, through the `nsWindow`, then into the `GeckoSession`
* We invoke a new method on the `ContentDelegate`. This seemed like the reasonable delegate to use given other existing
  callbacks in the similar vein (such as going fullscreen), but let me know if this should go elsewhere.
* We update GVE and JUnit tests to test this.

Differential Revision: https://phabricator.services.mozilla.com/D120499
2021-07-27 21:50:03 +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
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
Makoto Kato
636f8e1395 Bug 1700365 - SynthesizeNativeMouseEvent shouldn't set button state on ButtonUp. r=geckoview-reviewers,agi
Button state is current button push state. So when on ButtonUp, this is 0.

Differential Revision: https://phabricator.services.mozilla.com/D110197
2021-04-09 09:25:35 +00:00
Aaron Klotz
d248fe7914 Bug 1668952: Part 2 - Fix handling of long toplevel data URIs in GeckoView; r=geckoview-reviewers,agi
While I evaluated multiple approaches to this problem, I selected two:

The first is to handle the case in `GeckoSession.load` directly from within
Java, as this allows us to avoid a Java to Native string conversion, as well as
giving us better opportunities to report the exact nature of the failure back to
the embedding app.

We add a new error code specifically for this case.

In the case where no `NavigationDelegate` is registered, I used
`GeckoSession.load` throwing an exception as a crude way of notifying the app.

In the case where the load request originates from within web content, we deny
the request from within `nsWindow` to avoid requiring any conversion of the
URI spec from native into Java.

Differential Revision: https://phabricator.services.mozilla.com/D109427
2021-04-09 06:01:58 +00:00
Makoto Kato
b9d14a22df Bug 1701148 - Get rid of AndroidBridge::GetAPIVersion(). r=geckoview-reviewers,agi
Use `mozilla::jni::GetAPIVersion` instead.

Differential Revision: https://phabricator.services.mozilla.com/D109857
2021-03-29 01:21:27 +00:00
Hiroyuki Ikezoe
58d740803c Bug 1678505 - Expose ScrollableDirections and OverscrollDirecitons to GeckoView. r=botond,geckoview-reviewers,agi,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D103420
2021-03-02 08:06:28 +00:00
Hiroyuki Ikezoe
cc24f3fbe2 Bug 1678505 - Add overscroll-behavior and scrollable directions into APZHandledResult. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D103419
2021-03-02 08:06:28 +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
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
15210a1949 Bug 1678505 - Expose ScrollableDirections and OverscrollDirecitons to GeckoView. r=botond,geckoview-reviewers,agi,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D103420
2021-02-26 04:15:19 +00:00
Hiroyuki Ikezoe
fe23faeb41 Bug 1678505 - Add overscroll-behavior and scrollable directions into APZHandledResult. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D103419
2021-02-26 04:15:18 +00: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
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
Gerald Squelart
2416d881e2 Bug 1691589 - Reduce reliance on GeckoProfiler.h when only labels (and maybe markers) are needed - r=necko-reviewers,geckoview-reviewers,sg,agi,florian
There are no code changes, only #include changes.
It was a fairly mechanical process: Search for all "AUTO_PROFILER_LABEL", and in each file, if only labels are used, convert "GeckoProfiler.h" into "ProfilerLabels.h" (or just add that last one where needed).
In some files, there were also some marker calls but no other profiler-related calls, in these cases "GeckoProfiler.h" was replaced with both "ProfilerLabels.h" and "ProfilerMarkers.h", which still helps in reducing the use of the all-encompassing "GeckoProfiler.h".

Differential Revision: https://phabricator.services.mozilla.com/D104588
2021-02-16 04:44:19 +00:00
Hiroyuki Ikezoe
b759a55797 Bug 1687430 - Introduce INPUT_RESULT_IGNORED to represent nsEventStatus_eConsumeNoDefault. r=botond,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D102270
2021-01-21 00:24:33 +00:00
Markus Stange
08d19907a7 Bug 1676771 - Resample touch events in Android widget before sending them to APZ. r=geckoview-reviewers,kats,snorp
This behavior can be toggled with the (live) pref android.touch_resampling.enabled.

Differential Revision: https://phabricator.services.mozilla.com/D96798
2020-11-18 02:59:29 +00:00
Markus Stange
5bfa71c81d Bug 1676771 - Break HandleMotionEvent into two parts. r=geckoview-reviewers,kats,snorp
Differential Revision: https://phabricator.services.mozilla.com/D96796
2020-11-18 02:59:32 +00:00
Bogdan Tara
2fdb1139bf Backed out 3 changesets (bug 1676771) for TouchResampler.cpp linux debug bustage CLOSED TREE
Backed out changeset c01032316a72 (bug 1676771)
Backed out changeset 45736914b063 (bug 1676771)
Backed out changeset 8700eb46bb8b (bug 1676771)
2020-11-18 04:54:03 +02:00
Markus Stange
cfffbb8e44 Bug 1676771 - Resample touch events in Android widget before sending them to APZ. r=geckoview-reviewers,kats,snorp
This behavior can be toggled with the (live) pref android.touch_resampling.enabled.

Differential Revision: https://phabricator.services.mozilla.com/D96798
2020-11-17 23:15:34 +00:00
Markus Stange
a0525b8e5b Bug 1676771 - Break HandleMotionEvent into two parts. r=geckoview-reviewers,kats,snorp
Differential Revision: https://phabricator.services.mozilla.com/D96796
2020-11-17 20:20:32 +00:00
Bogdan Tara
43d33ea421 Backed out 3 changesets (bug 1676771) for touchevents related failures CLOSED TREE
Backed out changeset 88d4a2ac2cfc (bug 1676771)
Backed out changeset 7aa9b58c7916 (bug 1676771)
Backed out changeset 7f5daf9a6889 (bug 1676771)
2020-11-17 22:15:14 +02:00
Markus Stange
56de9bd8dd Bug 1676771 - Resample touch events in Android widget before sending them to APZ. r=geckoview-reviewers,kats,snorp
This behavior can be toggled with the (live) pref android.touch_resampling.enabled.

Differential Revision: https://phabricator.services.mozilla.com/D96798
2020-11-17 16:27:07 +00:00
Markus Stange
d2eb5b6a06 Bug 1676771 - Break HandleMotionEvent into two parts. r=geckoview-reviewers,kats,snorp
Differential Revision: https://phabricator.services.mozilla.com/D96796
2020-11-17 18:55:53 +00:00
Hiroyuki Ikezoe
9b56e1a377 Bug 1676814 - Revert a2f0dae16c37 to stop crashing on fast fling etc. r=botond,geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D96965
2020-11-13 15:21:59 +00:00
Markus Stange
c7e344533f Bug 1676768 - Add some missing gfx:: namespace annotations in nsWindow.cpp. r=geckoview-reviewers,snorp
Depends on D96793

Differential Revision: https://phabricator.services.mozilla.com/D96794
2020-11-12 16:11:50 +00:00
Hiroyuki Ikezoe
89a5e2efe5 Bug 1674694 - Use ConvertAPZHandledResult to convert mHandledByRootApzc for motion event cases. r=botond,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D96483
2020-11-11 00:33:30 +00:00
Hiroyuki Ikezoe
f2932331df Bug 1674694 - Use ConvertAPZHandledResult nsEventStatus_eConsumeNoDefault case. r=botond,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D96332
2020-11-11 00:33:28 +00:00
Hiroyuki Ikezoe
7087f97a39 Bug 1674694 - Change APZEventResult::mHandledByRootApzc to Maybe<APZHandledResult>. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D96331
2020-11-11 00:33:20 +00:00
Hiroyuki Ikezoe
9a544e618f Bug 1663000 - Return UNHANDLED even if there's no event handler which uses preventDefault() and the root content is not covered by the dynamic toolbar. r=botond,geckoview-reviewers,snorp
This change has a couple of tests but they are for scrollable/non-scrollable
contents, they are not for non-scrollable contents but covered by the dynamic
toolbar cases, e.g. 100vh body element.  Those cases will be introduced in the
subsequent change.

Differential Revision: https://phabricator.services.mozilla.com/D93915
2020-11-04 03:16:07 +00:00
Markus Stange
f2606240fd Bug 1615858 - Propagate historical touch data from Java to C++. r=kats,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D95650
2020-11-03 19:48:43 +00:00
Aaron Klotz
d701017d5a Bug 1650118: Part 1 - Remove non-e10s mode from GeckoView; r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D90929
2020-10-27 16:43:29 +00:00
Razvan Maries
f3f6721caa Backed out 8 changesets (bug 1650118) for wpt failures on inside-dedicated-worker.html. CLOSED TREE
Backed out changeset ab6218dd84f5 (bug 1650118)
Backed out changeset a99d1aae6e2e (bug 1650118)
Backed out changeset ed357b8bb07e (bug 1650118)
Backed out changeset cd5155e732d9 (bug 1650118)
Backed out changeset 63cc752924f2 (bug 1650118)
Backed out changeset 7f0a281a399e (bug 1650118)
Backed out changeset 0fd77fef3c95 (bug 1650118)
Backed out changeset f397e86fd61e (bug 1650118)
2020-10-27 18:39:11 +02:00
Aaron Klotz
8c6fe5fa49 Bug 1650118: Part 1 - Remove non-e10s mode from GeckoView; r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D90929
2020-10-26 23:53:56 +00:00
Razvan Maries
5e0d52e2cc Backed out 6 changesets (bug 1650118) as per Aaron's request. CLOSED TREE
Backed out changeset 4a7fc6398ad6 (bug 1650118)
Backed out changeset b9fa3dd9c05d (bug 1650118)
Backed out changeset 2cb9109dee0a (bug 1650118)
Backed out changeset a6ca38804021 (bug 1650118)
Backed out changeset 66b9527aecad (bug 1650118)
Backed out changeset 74fd3eb970a6 (bug 1650118)
2020-10-21 07:32:57 +03:00
Aaron Klotz
00e06da12d Bug 1672221: Add null check in NPZCSupport::InputEvent::Run; r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D94131
2020-10-20 16:46:41 +00:00
Aaron Klotz
1709d6e45f Bug 1650118: Part 1 - Remove non-e10s mode from GeckoView; r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D90929
2020-10-19 17:08:28 +00:00