Commit graph

2928 commits

Author SHA1 Message Date
Agi Sferro
2f4fe0da3f Bug 1567341 - Don't listen to xpcom-shutdown twice in nsAppShell. r=esawin
nsBaseAppShell already listens to xpcom-shutdown and calls |Exit| when it
receives it so we don't need to also listen for it in nsAppShell (which causes
two calls to xpcom-shutdown instead of one).

Differential Revision: https://phabricator.services.mozilla.com/D106209
2021-03-24 21:49:37 +00:00
Agi Sferro
32e27b2a7c Bug 1567341 - Release EventDispatcher listeners on xpcom-shutdown. r=esawin
Differential Revision: https://phabricator.services.mozilla.com/D106204
2021-03-24 21:49:35 +00:00
Alexandru Michis
497409d76e Backed out 24 changesets (bug 1567341) for causing xpcshell failures in test_telemetry.js
CLOSED TREE

Backed out changeset deb795c7d0ed (bug 1567341)
Backed out changeset 62d24a3e5e33 (bug 1567341)
Backed out changeset 1185cabd94e0 (bug 1567341)
Backed out changeset 73a4ae419261 (bug 1567341)
Backed out changeset b6eb111329f3 (bug 1567341)
Backed out changeset 0dc0bfedc042 (bug 1567341)
Backed out changeset 9dca635e41d7 (bug 1567341)
Backed out changeset c34928580933 (bug 1567341)
Backed out changeset f9ba384bb407 (bug 1567341)
Backed out changeset ec25c2df380e (bug 1567341)
Backed out changeset 9e8ea542b51e (bug 1567341)
Backed out changeset 3dc62863a028 (bug 1567341)
Backed out changeset 6c104f865540 (bug 1567341)
Backed out changeset c422ca4207ea (bug 1567341)
Backed out changeset e3df748ed62f (bug 1567341)
Backed out changeset 9d1f27796a97 (bug 1567341)
Backed out changeset 1d93ba23f809 (bug 1567341)
Backed out changeset 55652f6af6ed (bug 1567341)
Backed out changeset 9fb892955a88 (bug 1567341)
Backed out changeset 1cdd95c43416 (bug 1567341)
Backed out changeset 5a839d5e3e33 (bug 1567341)
Backed out changeset ea84b5749a27 (bug 1567341)
Backed out changeset dcb1ae146475 (bug 1567341)
Backed out changeset d72accc274ac (bug 1567341)
2021-03-24 23:37:43 +02:00
Agi Sferro
c4173c2b5a Bug 1567341 - Don't listen to xpcom-shutdown twice in nsAppShell. r=esawin
nsBaseAppShell already listens to xpcom-shutdown and calls |Exit| when it
receives it so we don't need to also listen for it in nsAppShell (which causes
two calls to xpcom-shutdown instead of one).

Differential Revision: https://phabricator.services.mozilla.com/D106209
2021-03-24 20:20:00 +00:00
Agi Sferro
5a745c2b72 Bug 1567341 - Release EventDispatcher listeners on xpcom-shutdown. r=esawin
Differential Revision: https://phabricator.services.mozilla.com/D106204
2021-03-24 20:19:58 +00:00
Agi Sferro
6fa04e6d9d Bug 1697844 - Remove unused Fennec code from org.mozilla.gecko. r=esawin
Differential Revision: https://phabricator.services.mozilla.com/D108071
2021-03-24 20:06:27 +00:00
Agi Sferro
9a5a44bb58 Bug 1697844 - Remove unused Fennec telemetry code. r=esawin
Differential Revision: https://phabricator.services.mozilla.com/D108044
2021-03-24 20:06:24 +00:00
Alexandru Michis
ced948f22d Backed out 10 changesets (bug 1697844) for causing mpu failures in test_visualmetrics.py
CLOSED TREE

Backed out changeset 63b3268b0d2d (bug 1697844)
Backed out changeset 875b2aa342d9 (bug 1697844)
Backed out changeset 4fb528aaf7d5 (bug 1697844)
Backed out changeset 6ef5e1c9ca21 (bug 1697844)
Backed out changeset 430d6c940eb9 (bug 1697844)
Backed out changeset 7a306f28dc64 (bug 1697844)
Backed out changeset 871a40e2fc00 (bug 1697844)
Backed out changeset 083e9ce71d14 (bug 1697844)
Backed out changeset b53930a3f065 (bug 1697844)
Backed out changeset 24326d04dd37 (bug 1697844)
2021-03-24 21:59:28 +02:00
Agi Sferro
fd023af94e Bug 1697844 - Remove unused Fennec code from org.mozilla.gecko. r=esawin
Differential Revision: https://phabricator.services.mozilla.com/D108071
2021-03-24 18:54:48 +00:00
Agi Sferro
318e4fa13d Bug 1697844 - Remove unused Fennec telemetry code. r=esawin
Differential Revision: https://phabricator.services.mozilla.com/D108044
2021-03-24 18:54:44 +00:00
Simon Giesecke
613e20d136 Bug 1184468 - Use nsBaseHashtable::Values. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108587
2021-03-24 17:56:49 +00:00
Kagami Sascha Rosylight
24e9b29c8d Bug 1699707 - Remove DeviceProximityEvent and UserProximityEvent r=agi,annevk,smaug
Note that this removes `window.ondeviceproximity` and `window.onuserproximity` which unexpectedly have been exposed unconditionally.

Differential Revision: https://phabricator.services.mozilla.com/D109160
2021-03-22 18:16:16 +00:00
Emilio Cobos Álvarez
5cbba9b317 Bug 1699937 - Don't draw focus outlines for box-shadow in the non-native theme. r=mstange
This is a relatively easy way to improve the rendering with the
non-native theme while not regressing anything.

In the future, once non-native-theme is shipped and default everywhere,
I think we could provide something like:

  bool nsITheme::GetShadowRect(nsIFrame*, StyleAppearance, LayoutDeviceRect&, RectCornerRadii&)

or such, where we can provide a precise rect + radii, and we would avoid
painting the shadow if the function returned false. That would allow us
to remove the native theme box shadow code path, and avoid WR fallback,
all at once.

Differential Revision: https://phabricator.services.mozilla.com/D109209
2021-03-20 23:08:11 +00:00
Jamie Nicol
ac9cef0aca Bug 1507074 - Don't block webrender due to lack of GL_OES_EGL_image_external_essl3 support. r=aosmond
Thanks to the previous patch in this series we can now play video
using the non-essl3 GL_OES_EGL_image_external extension, therefore we
no longer require the essl3 version.

It is assumed that all android devices support
GL_OES_EGL_image_external (non-essl3). Even if that is not the case,
webrender is no worse off than layers in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D108909
2021-03-18 18:31:26 +00:00
Emilio Cobos Álvarez
de1f51fa10 Bug 1697467 - Push the high contrast code from nsNativeBasicThemeWin to nsNativeBasicTheme. r=mstange
Linux can also have high contrast (and mac, if you tweak prefs, but
let's assume that doesn't happen), so no reason we shouldn't share this
code.

One related simplification while I was doing this code move is that I
managed to remove the scrollbar "border" code. Turns out that Windows
was overriding ComputeScrollbarColors so that border and track colors
were always the same, and Linux was ignoring the border anyways, so with
this we can simplfiy the implementation a bit (as the Linux scrollbar
track / corner code can be shared with Windows now).

Differential Revision: https://phabricator.services.mozilla.com/D107863
2021-03-12 14:44:13 +00:00
Agi Sferro
111343732d Bug 1694481 - Remove unused code from exthandler/android. r=droeh,esawin
Differential Revision: https://phabricator.services.mozilla.com/D106182
2021-03-10 22:43:08 +00:00
Agi Sferro
b39485034a Bug 1694481 - Remove unused DirectBufferAllocator. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D106179
2021-03-10 22:43:07 +00:00
Agi Sferro
4a3ac00774 Bug 1694481 - Remove unused android:// protocol handler r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D106178
2021-03-10 22:43:06 +00:00
Agi Sferro
59f1e51107 Bug 1694481 - Remove Fennec code in nsIAndroidBridge. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D106177
2021-03-10 22:43:06 +00:00
Agi Sferro
83874acc8d Bug 1694481 - Remove unused telemetry methods. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D106174
2021-03-10 22:43:05 +00:00
Simon Giesecke
ad01a10a3b Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
Simon Giesecke
bc9766c354 Bug 1634281 - Use nsTHashMap for nsBaseHashtable/nsDataHashtable uses with RefPtr data type. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D105963
2021-03-09 11:39:36 +00:00
owlishDeveloper
5f323edf67 Bug 1432949 - Return error if channel cannot be opened. Expand download blob test case r=geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D75687
2021-03-09 00:45:22 +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
Simon Giesecke
0b443059fd Bug 1693306 - Simplify some uses of LookupOrInsertWith by GetOrInsertNew. r=xpcom-reviewers,necko-reviewers,dragana,nika
Differential Revision: https://phabricator.services.mozilla.com/D105479
2021-02-26 09:22:54 +00:00
Simon Giesecke
9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Simon Giesecke
4f75368dcb Bug 1691913 - Rename nsBaseHashtable::GetOrInsert(With) to LookupOrInsert(With). r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
The functions should be called "Lookup" rather than "Get" because they return
a DataType& (rather than UserDataType).

Differential Revision: https://phabricator.services.mozilla.com/D105472
2021-02-26 09:11:45 +00: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
Lee Salzman
6d0dfe44e3 Bug 1690216 - Clarify that StartRemoteDrawingInRegion does not actually modify the region. r=mattwoodrow
It caused us substantial confusion investigating this bug under the belief that
StartRemoteDrawingInRegion may have been modifying the dirty region. None of our
existing widget code anymore uses the API in this way, so it makes sense to just
force this dirty region to be const so that we no longer support the assumption
and alleviate confusion in the future about how our widget code actually behaves.

Depends on D106246

Differential Revision: https://phabricator.services.mozilla.com/D106247
2021-02-24 18:34:52 +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
Makoto Kato
6b58ba4928 Bug 1650705 - Don't dispatch unnecessary input event when we dispatch composition start with selected text. r=geckoview-reviewers,agi
Actually, before starting composition, we always remove current selected
text. So it causes that input event is fired by this operation. This is
different of Blink.

`TextEventDispatcher` can set composition string using selected text when
starting composition. So we can reduce this input event.

Also, I mistake bug 1499076 fix. By this fix, we always fires input event
when having selected text even if it is unnecessary. This changeset has
this fix too.

Differential Revision: https://phabricator.services.mozilla.com/D105464
2021-02-21 17:12:13 +00:00
Alexis Beingessner
92afde7986 Bug 1686616 - register all Services.py services with components.conf. r=kmag,necko-reviewers,valentin
These services had their name added to components.conf:

* GfxInfo
* ThirdPartyUtil
* History
* HttpActivityDistributor
* UUIDGenerator
* ServiceWorkerManager
* PermissionManager

These services were added to componenets.conf under a different name:

* DirectoryService => Directory
* IOService => IO
* StringBundleService => StringBundle
* CacheStorageService => CacheStorage
* StreamTransportService => StreamTransport
* SocketTransportService => SocketTransport

These services weren't migrated to components.conf because only Rust
code uses them:

* RemoteAgent
* XULRuntime
* PrefService

These services weren't migrated to components.conf because they're unused:

* ToolkitChromeRegistry (used as ChromeRegistry)
* XULChromeRegistry (used as ChromeRegistry)
* Bits (completely unused)

These services were already available in components.conf but are still
used by rust code:

* URIFixup

These services weren't migrated because they will be handled in
subsequent patchsets:

* ObserverService

For the record, the following Services are being used by Rust code
and must remain until a Rust version of Components.h is written:

* RemoteAgent
* XULRuntime
* PrefService
* URIFixup
* ObserverService
* DirectoryService
* ThirdPartyUtil

Also the cocoa GfxInfo service was changed to use components.conf instead
of registering it at runtime, as all the other widgets were already doing
it this way.

Differential Revision: https://phabricator.services.mozilla.com/D105521
2021-02-18 13:26:28 +00:00
Jamie Nicol
4fbbd0370b Bug 1692848 - Work around Mali driver crash caused by textureSize(samplerExternalOES). r=kvark
On some Mali devices we have encountered driver crashes caused by
calling textureSize(samplerExternalOES) in a shader without also
potentially sampling from the texture in the shader. ARM's suggested
workaround was to trick the driver in to thinking that the texture may
be sampled from (ie by sampling in a branch which is never dynamically
taken).

This is done by checking the value of a dummy uniform, and sampling
the texture if the value is non-default. Using a constant expression
did not work because the compiler would optimize the condition (and
therefore the sample) away.

Also re-enable webrender on Mali-72 and G76 devices, as it was blocked
due to this bug.

Differential Revision: https://phabricator.services.mozilla.com/D105493
2021-02-17 20:59:06 +00:00
owlishDeveloper
3324817c8a Bug 1523577 - Don't initialize GeckoViewStateListener in GeckoThread if on a child process r=geckoview-reviewers,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D105371
2021-02-17 20:34:01 +00:00
sotaro
0dc5ddff34 Bug 1691895 - Make RenderCompositorSWGL work on android r=geckoview-reviewers,mattwoodrow,agi
Partial present is not supported yet with RenderCompositorSWGL on Android.

Differential Revision: https://phabricator.services.mozilla.com/D104654
2021-02-16 22:30:47 +00:00
Jamie Nicol
62ee003e4e Bug 1693082 - Enable webrender for Mali-Txxx devices on release. r=aosmond
Note that quite a few Mali-Txxx devices still won't get webrender, due
to lack of GL_OES_EGL_image_external_essl3 support. Bug 1507074 tracks
lifting this requirement.

Depends on D105338

Differential Revision: https://phabricator.services.mozilla.com/D105339
2021-02-16 16:46:36 +00:00
Jamie Nicol
55937b85b5 Bug 1693072 - Enable webrender for Adreno 505 and 506 devices on release. r=aosmond
Webrender has been enabled for most Adreno 5xx and 6xx devices for a
while now, but 505 and 506 were held back due to bug 1609191. We were
seeing a moderate number of crashes during what we suspected was
shader compilation.

The crashes on 505 and 506 have all but disappeared. Additionally,
after shipping to the wider release audience we saw the same crashes
on other 5xx devices, not just 505 and 506, but the numbers were never
so high as to be worrying. So we are safe to ship to 505 and 506 as
well.

Depends on D105337

Differential Revision: https://phabricator.services.mozilla.com/D105338
2021-02-16 16:46:36 +00:00
Jamie Nicol
1552fafd9d Bug 1693094 - Enable webrender for Adreno 4xx devices on nightly. r=aosmond
It appears to work well based on local testing, so let's enable in on
nightly and see if any bugs are reported.

Differential Revision: https://phabricator.services.mozilla.com/D105337
2021-02-16 16:46:36 +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
Simon Giesecke
780a1636a9 Bug 1691894 - Replace several suboptimal uses of Put after Get by GetOrInsertWith or WithEntryHandle. r=xpcom-reviewers,necko-reviewers,kmag,valentin,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D104849
2021-02-15 15:12:17 +00:00
smolnar
1afbbe67e1 Backed out 5 changesets (bug 1691894) for causing hazard failures in nsXULPrototypeCache. CLOSED TREE
Backed out changeset 22dc870ee609 (bug 1691894)
Backed out changeset 58c31e9d6ae3 (bug 1691894)
Backed out changeset 7483e84149d8 (bug 1691894)
Backed out changeset f977d6cfa973 (bug 1691894)
Backed out changeset db4503476f34 (bug 1691894)
2021-02-15 16:43:23 +02:00
Simon Giesecke
8973094ec1 Bug 1691894 - Replace several suboptimal uses of Put after Get by GetOrInsertWith or WithEntryHandle. r=xpcom-reviewers,necko-reviewers,kmag,valentin,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D104849
2021-02-15 10:04:45 +00:00
Sylvestre Ledru
b4f9be25d4 Bug 1519636 - Reformat recent changes to the Google coding style r=andi,necko-reviewers
Updated with clang-format version 11.0.1 (taskcluster-B6bdwSKDRF-luRQWXBuzpA)

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D105158
2021-02-15 08:49:20 +00:00
Jamie Nicol
bb557e823d Bug 1688705 - Block webrender on Mali-G72 and G76 on Android 11. r=aosmond
In bug 1688017 we blocked webrender on Mali-G76 devices due to reports
of crashes when playing video. Based on more reports by users and
further investigation of the crash data, it appears that Mali-G72 GPUs
are also affected by the same bug, but only on Android 11 (for both
GPUs). Crashes on other Mali GPUs and earlier android versions do
exist, but in much lower numbers.

Update the block to include G72 as well as G76, but only for Android
11.

Differential Revision: https://phabricator.services.mozilla.com/D105047
2021-02-12 21:18:34 +00:00