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

30450 Коммитов

Автор SHA1 Сообщение Дата
Cristian Tuns fe3db4dbf0 Backed out changeset 6d3f5ad32cd2 (bug 1779559) for causing multiple bc failures CLOSED TREE 2022-07-14 22:24:52 -04:00
Emilio Cobos Álvarez ddb69613e8 Bug 1779559 - Make tabbrowser manage chrome BC activeness. r=Gijs
Just like it manages content, so that we stop chrome animations and such
in hidden or fully-occluded windows too. This already happened on macOS
for minimized windows via PauseCompositor, but this should be better and
more consistent.

Differential Revision: https://phabricator.services.mozilla.com/D151818
2022-07-15 00:22:01 +00:00
Emilio Cobos Álvarez 4414d74633 Bug 1779598 - Stop passing around Maybe<SVGImageContext>. r=aosmond
All its members are optional, so we can just use it as a plain struct
rather than Maybe<> all around, which simplifies the code and prevents
silly bugs like bug 1779592.

Mostly automatic via:

  rg -l 'SVGImageContext' . | xargs sed -i 's/Maybe<SVGImageContext>/SVGImageContext/g'

With trivial build fixes.

Not intended to change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D151846
2022-07-14 16:03:25 +00:00
Jim Blandy 89c88d35e8 Bug 1778767: Define MozClearPointer, a type-safe replacement for g_clear_pointer. r=stransky,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D151410
2022-07-14 04:28:34 +00:00
Norisz Fay 82c8f892b0 Backed out 8 changesets (bug 1754239, bug 1766308, bug 1766307, bug 1766310) for causing build bustages on UtilityAudioDecoderParent.cpp CLOSED TREE
Backed out changeset e383703e28cf (bug 1766307)
Backed out changeset 5fb04c68ae7a (bug 1766307)
Backed out changeset ee76505a46ff (bug 1766310)
Backed out changeset d76eae67ae79 (bug 1754239)
Backed out changeset fed974dcf641 (bug 1754239)
Backed out changeset 67c5fbd546a1 (bug 1766307)
Backed out changeset da49735366d2 (bug 1766308)
Backed out changeset 81ccd31d0f07 (bug 1766307)
2022-07-14 04:03:19 +03:00
az 4e1baacec1 Bug 1766308 - Add gfxVars::CodecSupportInfo to store user-readable codec support string r=media-playback-reviewers,alwu
Differential Revision: https://phabricator.services.mozilla.com/D147386
2022-07-14 00:32:37 +00:00
Cosmin Sabou 3e22258e4c Merge mozilla-central to autoland. 2022-07-13 19:36:23 +03:00
Cosmin Sabou f12c239da6 Backed out changeset cc1377cd7adb (bug 1778767) for causing Bug 1779364. a=backout 2022-07-13 19:28:49 +03:00
Jamie Nicol d40ea70ccc Bug 1772839 - Work around compositor being resumed with abandoned Surfaces. r=geckoview-reviewers,owlish
On some Android devices (predominantly Huawei devices running Android
9 or below) we are seeing large numbers of crashes due to the
compositor being unable to create an EGL surface to render in to. From
local testing, this appears to be due to the Surface we are being
provided from the SurfaceView being in an "abandoned"
state. Presumably this is due to an operating system bug - the Surface
is valid at the time of the surfaceChanged() callback, but becomes
abandoned moments later despite surfaceDestroyed() not being called.

We are able to detect when the Surface is in such a state from C++
code by calling ANativeWindow_getWidth(), as that will return a
negative value to indicate an error.

This patch uses this method to check whether the Surface is in such a
state prior to resuming the compositor. If so, rather than immediately
resuming the compositor it instead toggles the SurfaceView's
visibility. This tricks the SurfaceView in to providing a new (and
hopefully valid) Surface, which will in turn resume the compositor via
the surfaceChanged callback.

Differential Revision: https://phabricator.services.mozilla.com/D151479
2022-07-13 15:38:51 +00:00
stransky 4f231a194e Bug 1778114 Disable DMABUF_SURFACE_EXPORT on AMD r=jgilbert,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D151587
2022-07-12 19:05:47 +00:00
Csoregi Natalia c97011ab89 Backed out 4 changesets (bug 1742797) for causing failures on /browser_ext_getViews.js. CLOSED TREE
Backed out changeset c48ff146a33d (bug 1742797)
Backed out changeset a692ca1d8401 (bug 1742797)
Backed out changeset cfc1f440fb6d (bug 1742797)
Backed out changeset 88f60761e884 (bug 1742797)
2022-07-13 01:02:54 +03:00
Hiroyuki Ikezoe a576a80a90 Bug 1742797 - Add a new IPC call to clear animation resources on WebRender, r=sotaro.
Differential Revision: https://phabricator.services.mozilla.com/D151481
2022-07-12 14:46:53 +00:00
Emilio Cobos Álvarez 482d8239cb Bug 1777135 - Part 2: Improve nsNativeTheme::IsDarkBackground by accounting for default bg color. r=dholbert
Since callers want just an effective color to compute whether it's dark,
we simplify the API a bit too.

This makes sure we find the dark background in plain text documents.

Differential Revision: https://phabricator.services.mozilla.com/D151018
2022-07-12 09:51:47 +00:00
Jim Blandy 147eeeac44 Bug 1778767: Define MozClearPointer, a type-safe replacement for g_clear_pointer. r=stransky,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D151410
2022-07-12 07:41:31 +00:00
criss 95f4f0498b Backed out changeset 67fae8447273 (bug 1734394) for causing Assertion failures on StaticPrefList_browser.h. CLOSED TREE 2022-07-12 09:00:39 +03:00
Nick Alexander 81d66e3c24 Bug 1775136 - Part 2: Support `requireInteraction` and `actions` in alert service and native Windows notifications. r=mhowell,smaug
1.  `requireInteraction` already existed, but it doesn't do anything.
    This patch makes it mean `scenario="reminder"` in the Windows
    Toast notification schema: see
    https://docs.microsoft.com/en-us/uwp/schemas/tiles/toastschema/element-toast.

2.  `actions` is intended to eventually support the Chrome-only
    extension to the Web Notifications API: see
    https://developer.mozilla.org/en-US/docs/Web/API/Notification/actions.

3.  We run into an `xpconnect` limit on the number of supported
    parameters.  Rather than bump the limit, which has global
    consequence, I added a second `init*` method.  The existing
    abstraction is horrible, but I can't rework it within my
    timelines.  Should we choose to invest, we might migrate to WebIDL
    so that we can sensibly use options objects.

Differential Revision: https://phabricator.services.mozilla.com/D150667
2022-07-12 03:18:42 +00:00
Nick Alexander f8bca9ddeb Bug 1775136 - Part 1: Add `nsIWindowsAlertService` to enable testing. r=mhowell
This also provides an entry point for Windows-specific styling of
alerts, should specific consumers want one: e.g.,
`nsIWindowsAlertsService.showWindowsAlert(...)` allowing to configure
the toast template, for example.

Differential Revision: https://phabricator.services.mozilla.com/D151187
2022-07-12 03:18:41 +00:00
Cathy Lu c89057028e Bug 1734394 - Make Geckoview use the session store collector r=geckoview-reviewers,agi,farre,peterv
When the session storage prefs are enabled, GeckoSession updateSessionState will provide the bundle of information, including zoom, scroll, and form data, to the delegate. Currently works for Fission and on Fenix.

Differential Revision: https://phabricator.services.mozilla.com/D148215
2022-07-12 02:50:01 +00:00
Robert Mader f922ff35ad Bug 1777927 - Force-disable VAAPI if vaapitest() failed, r=gfx-reviewers,aosmond
`vaapitest()` is meant to be a sanity check. If it failed there's
likely something very broken about the driver and we log gfx
warnings accordingly, allowing to debug the problem.

Ensure to force-disable VAAPI in this case but still allow users
to enable the feature in blocklisted cases.

While on it add some additional fixes for issues encoutered while
testing:
- `InitVAAPIConfig()` was not run on X11-only builds, wrongly
  setting `sLayersSupportsHardwareVideoDecoding` to `true` there
  on allowlisted drivers. Thus replace `MOZ_WAYLAND` with
  `MOZ_WIDGET_GTK`, ensuring the "Wayland support missing" warning
  is shown in `about:support`.
- `UserForceEnable` must be run before `ForceDisable`, otherwise an
  assert is triggered on debug builds. Reorder this.
- `GetFeatureStatus` was run twice for
  `FEATURE_HARDWARE_VIDEO_DECODING`, once in `InitAcceleration()` in the
  common code path, the again in `InitVAAPIConfig()`. Untangle the common
  code path to only run `InitVAAPIConfig()`.
- Use the chance to turn `media.hardware-video-decoding.enabled` into a
  static pref so it matches `media.hardware-video-decoding.force-enabled`

Differential Revision: https://phabricator.services.mozilla.com/D150959
2022-07-12 01:49:39 +00:00
Butkovits Atila 071d1fd9a9 Backed out changeset eae66c448e16 (bug 1777927) for causing failures at test_gfxBlacklist_Version.js. CLOSED TREE 2022-07-12 04:37:54 +03:00
Butkovits Atila bf8e6bd398 Backed out 2 changesets (bug 1775136) for causing failures at test_windows_alert_service.js
Backed out changeset bfa523daaf13 (bug 1775136)
Backed out changeset 5e75e93d9ba3 (bug 1775136)
2022-07-12 04:35:51 +03:00
Robert Mader 23d8b84193 Bug 1777927 - Force-disable VAAPI if vaapitest() failed, r=gfx-reviewers,aosmond
`vaapitest()` is meant to be a sanity check. If it failed there's
likely something very broken about the driver and we log gfx
warnings accordingly, allowing to debug the problem.

Ensure to force-disable VAAPI in this case but still allow users
to enable the feature in blocklisted cases.

While on it add some additional fixes for issues encoutered while
testing:
- `InitVAAPIConfig()` was not run on X11-only builds, wrongly
  setting `sLayersSupportsHardwareVideoDecoding` to `true` there
  on allowlisted drivers. Thus replace `MOZ_WAYLAND` with
  `MOZ_WIDGET_GTK`, ensuring the "Wayland support missing" warning
  is shown in `about:support`.
- `UserForceEnable` must be run before `ForceDisable`, otherwise an
  assert is triggered on debug builds. Reorder this.
- `GetFeatureStatus` was run twice for
  `FEATURE_HARDWARE_VIDEO_DECODING`, once in `InitAcceleration()` in the
  common code path, the again in `InitVAAPIConfig()`. Untangle the common
  code path to only run `InitVAAPIConfig()`.
- Use the chance to turn `media.hardware-video-decoding.enabled` into a
  static pref so it matches `media.hardware-video-decoding.force-enabled`

Differential Revision: https://phabricator.services.mozilla.com/D150959
2022-07-12 00:00:59 +00:00
Kelsey Gilbert 925ea31507 Bug 1778855 - Use e.g. gfxEnv::MOZ_GL_DEBUG() instead of gfxEnv::GlDebug(). r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D151547
2022-07-11 23:59:53 +00:00
Nick Alexander ef2284fee4 Bug 1775136 - Part 2: Support `requireInteraction` and `actions` in alert service and native Windows notifications. r=mhowell,smaug
1.  `requireInteraction` already existed, but it doesn't do anything.
    This patch makes it mean `scenario="reminder"` in the Windows
    Toast notification schema: see
    https://docs.microsoft.com/en-us/uwp/schemas/tiles/toastschema/element-toast.

2.  `actions` is intended to eventually support the Chrome-only
    extension to the Web Notifications API: see
    https://developer.mozilla.org/en-US/docs/Web/API/Notification/actions.

3.  We run into an `xpconnect` limit on the number of supported
    parameters.  Rather than bump the limit, which has global
    consequence, I added a second `init*` method.  The existing
    abstraction is horrible, but I can't rework it within my
    timelines.  Should we choose to invest, we might migrate to WebIDL
    so that we can sensibly use options objects.

Differential Revision: https://phabricator.services.mozilla.com/D150667
2022-07-11 23:23:53 +00:00
Nick Alexander 986e5f08fe Bug 1775136 - Part 1: Add `nsIWindowsAlertService` to enable testing. r=mhowell
This also provides an entry point for Windows-specific styling of
alerts, should specific consumers want one: e.g.,
`nsIWindowsAlertsService.showWindowsAlert(...)` allowing to configure
the toast template, for example.

Differential Revision: https://phabricator.services.mozilla.com/D151187
2022-07-11 23:23:53 +00:00
Tooru Fujisawa 52c95734e7 Bug 1667455 - Part 9: Stop importing Services.jsm from chrome-priv HTML code, single-line cases. r=kmag,necko-reviewers,geckoview-reviewers,extension-reviewers,m_kato,dragana
Differential Revision: https://phabricator.services.mozilla.com/D150898
2022-07-11 12:41:52 +00:00
Tooru Fujisawa bf93d07148 Bug 1667455 - Part 5: Stop importing Services.jsm from chrome-priv JS code, top-level single-line cases. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,pip-reviewers,twisniewski,m_kato,jdescottes,mconley,AlexandruIonescu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D150894
2022-07-11 12:41:50 +00:00
Emilio Cobos Álvarez a4adec1fe6 Bug 1778834 - Fix a typo in AccentColor handling. r=dholbert
If we're using the theme accent then we should _not_ use the standin.

Differential Revision: https://phabricator.services.mozilla.com/D151442
2022-07-10 18:09:57 +00:00
Emilio Cobos Álvarez ebd6957137 Bug 1777553 - Use a weak pres context reference in nsMenuItemIconX. r=mac-reviewers,spohl
This is the only thing from the regressing patch that could potentially
cause this macOS leak, realistically. I don't think the leak is
super-worrisome, likely we just shut down the browser before the image
load finishes.

Differential Revision: https://phabricator.services.mozilla.com/D151368
2022-07-08 15:47:20 +00:00
Jamie Nicol 8e7cbade3c Bug 1778651 - Add gfxCriticalNote for negative ANativeWindow size r=gfx-reviewers,geckoview-reviewers,aosmond,owlish
One possible cause of the failures to create an EGLSurface we are
seeing in bug 1772839 is that the Surface's underlying BufferQueue has
already been abandoned. In such circumstances,
ANativeWindow_getWidth/Height will return a negative value. If this
occurs, ensure we annotate crash reports via gfxCriticalNote. This
will allow us to determine whether the crashes we are seeing are
indeed due to an abandoned BufferQueue, or some other reason.

Differential Revision: https://phabricator.services.mozilla.com/D151360
2022-07-08 15:19:14 +00:00
Emilio Cobos Álvarez a4a6aa18d7 Bug 1778444 - Clear UISettings on shutdown. r=kaie
This should be the right fix.

Differential Revision: https://phabricator.services.mozilla.com/D151311
2022-07-07 21:17:36 +00:00
Markus Stange aa49005e37 Bug 1776763 - Only defer menu item activation if we know that the menu is open. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D151274
2022-07-07 20:47:38 +00:00
Karl Tomlinson 54571ce8b0 Bug 1777902 don't change the size of system fonts when ui.textScaleFactor is set r=emilio
Depends on D150930

Differential Revision: https://phabricator.services.mozilla.com/D151111
2022-07-07 10:22:32 +00:00
Nika Layzell 7ced96212e Bug 1778211 - Reject xpidl CDATA containing 'virtual', r=xpcom-reviewers,necko-reviewers,mccr8,dragana
We'll probably want to do something more accurate in the future with a
custom clang static analysis pass which validates that XPIDL interfaces
have the expected vtable and struct layout, however doing so would be
more involved than the string matching done in this patch.

In addition to checking for extra virtual methods, we'll likely also
want to check for data members on interfaces, and reject them unless the
class is marked as `[builtinclass]` in addition to some other attribute
which we'll need to add to prevent them from being implemented in Rust
(as c++ data members will not be reflected by the rust macro).

There were 2 instances of a comment which contained the word 'virtual'
within a CDATA block. These comments were moved out of the CDATA block
to avoid triggering the error.

Differential Revision: https://phabricator.services.mozilla.com/D151068
2022-07-06 14:53:06 +00:00
Ben Hearsum e6cd000e4a Bug 1778182: put private browsing taskbar pinning & window separation behind a distinct pref r=nalexander
`browser.privacySegmentation.enabled` is going to be set when users opt into Felt Privacy. When I originally wrote some of this code I naively used it to pref things on, on the assumption that there would never be a situation where it would be `true` before 106 (when we remove the pref-off for this work).

However, we want to run an experiment with pinning private browsing to the taskbar ahead of 106. To avoid any possibility of accidentally opting users into Felt Privacy without their consent, let's use a distinct pref for turning these features off for now. This pref will disappear in the 106 cycle, as none of this code needs to be behind one at that point - so I don't _think_ this needs to go in `firefox.js`.

Differential Revision: https://phabricator.services.mozilla.com/D151065
2022-07-06 13:15:46 +00:00
Kagami Sascha Rosylight 1f1d706cf6 Bug 1769290 - Part 11: Apply mozilla-js-handle-rooted-typedef against widget r=andi
Differential Revision: https://phabricator.services.mozilla.com/D150793
2022-07-04 20:57:18 +00:00
Edgar Chen 9e8b9a1dcb Bug 1777517 - [Cocoa] Add clipboard logs; r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D150790
2022-07-04 15:34:45 +00:00
Bogdan Szekely 5e71be17a1 Backed out changeset 22c5f55e75c2 (bug 1777517) for causing build bustages on Unified_cpp_widget_windows2.obj CLOSED TREE 2022-07-04 15:43:29 +03:00
Edgar Chen 4b077b201b Bug 1777517 - [Cocoa] Add clipboard logs; r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D150790
2022-07-04 12:20:22 +00:00
Joel Maher 537a5a0dc8 Bug 1777549 - remove remaining e10s conditions in manifest files. r=gbrown,extension-reviewers,zombie
Differential Revision: https://phabricator.services.mozilla.com/D150820
2022-07-01 13:49:42 +00:00
stransky c623049f30 Bug 1777186 [Wayland] Use correct popup window to calculate parent fit r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D150537
2022-07-01 08:09:04 +00:00
Kris Maglione 0a4ce6199e Bug 1773770: Part 9 - Migrate widget component content proxies to static registration. r=mccr8
Several widget contracts use different implementations in the parent and
content processes. Since the static registration system builds its hashtable
at compile time rather than runtime, it doesn't support different contract IDs
per process. It could make the decision at lookup time, but given how rarely
it's needed, I don't think it would be worth the complexity.

This patch updates the widget components that need different implementations
in the parent and content process to register separate contracts for each
implementation, and a third stub contract which forwards to the appropriate
implementation depending on which process it's used in. The implementation
entries restrict their usage to the process they are meant to be used in.

Differential Revision: https://phabricator.services.mozilla.com/D149436
2022-06-30 09:12:18 +00:00
Kris Maglione df4aae4dd3 Bug 1773770: Part 8 - Migrate Cocoa widget module to static component registration. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D149435
2022-06-30 09:12:18 +00:00
stransky 9340f2d3bc Bug 1773282 [Linux] Disable nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING on release/late beta r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D149766
2022-06-29 12:09:03 +00:00
stransky bea11a62d5 Bug 1773282 [Linux] Remove nsIGfxInfo::FEATURE_VAAPI and use nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING r=alwu
nsIGfxInfo::FEATURE_HARDWARE_VIDEO_DECODING is used on all platforms so let's use it on Linux too and don't add new feature for Linux only.

Differential Revision: https://phabricator.services.mozilla.com/D149765
2022-06-29 12:09:02 +00:00
stransky 447c0b7acc Bug 1773282 [Linux] Remove IsDMABufVAAPIEnabled() r=emilio,media-playback-reviewers,alwu
We don't need IsDMABufVAAPIEnabled() as we use gfx::gfxVars::CanUseHardwareVideoDecoding() directly.

Differential Revision: https://phabricator.services.mozilla.com/D149764
2022-06-29 12:09:02 +00:00
sotaro b15ea105d5 Bug 1776800 - Let zero copy hardware decoded video to release on intel GPU on Windows r=jrmuizel,gfx-reviewers
Reuse decoder device also to release on intel GPU on Windows, since it is also necessary for zero copy hardware decoded video.
Reuse decoder device handling is also updated as aligned to FEATURE_HW_DECODED_VIDEO_ZERO_COPY.

Differential Revision: https://phabricator.services.mozilla.com/D150448
2022-06-28 21:54:36 +00:00
Emilio Cobos Álvarez 2e0d7c56fd Bug 1776556 - Restore Windows' accent-color / system-color behavior for now. r=mstange
This basically pref-gates some of the accent-color changes that landed before
the soft-freeze to match current release behavior, at least for now.

In the future we might want to reconsider turning these on, but at the very
least we should figure out a good story for the grey-ish accent colors, see the
comments in the pref definitions.

The only tricky bit is the use-theme-accent pref handling. I made it specific
to the non-native-theme again so that AccentColor and NNT kept behaving
consistently, but AccentColor in the browser chrome used the real accent color.

Differential Revision: https://phabricator.services.mozilla.com/D150339
2022-06-28 18:55:27 +00:00
Emilio Cobos Álvarez 582414f8e7 Bug 1776858 - Cleanup and add some missing unit conversion methods. r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D150465
2022-06-28 18:52:19 +00:00
smolnar 4a5728f275 Backed out changeset d1e0b50deab6 (bug 1776858) for causing crashtest assertion failures in nsAlgorithm CLOSED TREE 2022-06-28 18:57:04 +03:00