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

30230 Коммитов

Автор SHA1 Сообщение Дата
stransky 97e34fc534 Bug 1768360 [Wayland] Don't use move-to-rect with invalid/missing anchor r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D146782
2022-05-19 15:18:05 +00:00
criss 5de2f96173 Backed out changeset acc3d38ec70b (bug 1768360) for causing build bustages on nsWindow.cpp. CLOSED TREE 2022-05-19 15:25:48 +03:00
stransky 85bfbfeed8 Bug 1768360 [Wayland] Don't use move-to-rect with invalid/missing anchor r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D146782
2022-05-19 11:58:14 +00:00
sotaro 15b053536d Bug 1769900 - Add more logs of window size sanity check around nsWindow r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D146658
2022-05-18 15:15:41 +00:00
stransky 8598a83308 Bug 1769716 [Linux] Export gbm_surface_create/gbm_surface_destroy from libgbm r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D146550
2022-05-18 06:42:22 +00:00
Emilio Cobos Álvarez 46ca6e2712 Bug 1768285 - Clean up unused -moz-window-shadow values. r=jwatt
After bug 1768278 and bug 1767815 there's no more uses of the cliprounded value
in the tree (also it causes artifacts on HiDPI screens so we probably don't
want new usages).

The "sheet" value is unused, and the other values other than "default" and
"none" are only derived from "default", so they don't need to be exposed in the
style system.

Differential Revision: https://phabricator.services.mozilla.com/D145821
2022-05-17 23:20:48 +00:00
Andrew McCreight fa8bfd1245 Bug 1514936, part 2 - Drop the outer arguments from static components. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D146457
2022-05-17 20:24:19 +00:00
David Parks 80bfc4acf7 Bug 1767948: Make Windows cursor hiding dependent on if mouse is installed r=Jamie,cmartin
We don't need to track cursor hiding when typing if there shouldn't be a cursor anyway because there is no mouse.

Differential Revision: https://phabricator.services.mozilla.com/D146516
2022-05-17 20:05:08 +00:00
Butkovits Atila 039058996c Bug 1732920 - Lint fix. r=fix. CLOSED TREE 2022-05-17 22:13:21 +03:00
Edgar Chen 0b3765204b Bug 1732920 - Add data type for IPCDataTransferData; r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D146074
2022-05-17 18:47:39 +00:00
Emilio Cobos Álvarez f84c9f07b0 Bug 1769769 - Don't generate nsIPrintDialogService.h in the source dir. r=jwatt
It seems the order of XPIDL_SOURCES vs. XPIDL_MODULE is important.

Differential Revision: https://phabricator.services.mozilla.com/D146579
2022-05-17 15:11:35 +00:00
Edgar Chen 076d44606d Bug 1768597 - Part 2: Use nsContentUtils::IPCTransferableToTransferable to convert IPCDataTransfer into nsITransferable; r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D145941
2022-05-17 08:12:03 +00:00
Jonathan Watt 6e5bce1349 Bug 1769388 - Change nsIPrintSettingsService's 'newPrintSettings' attribute to a 'createNewPrintSettings' function. r=bobowen,webdriver-reviewers,whimboo
Having an attribute be a constructor is just...wrong.

Differential Revision: https://phabricator.services.mozilla.com/D146383
2022-05-16 11:50:34 +00:00
Jonathan Watt 247babb515 Bug 1432651 p2 - Remove nsIPrintSession and all the code that uses it. r=emilio,geckoview-reviewers,m_kato
Lately nsIPrintSession was only used to pass around RemotePrintJobChild objects.
Now that we pass those objects explicitly where needed (part 1), this class
serves no purpose.

Another reason to want to get rid of this class is that having it as a member
of nsIPrintSettings made no sense and was confusing.

Differential Revision: https://phabricator.services.mozilla.com/D146381
2022-05-16 08:38:02 +00:00
Jonathan Watt 41b151c8c4 Bug 1432651 p1 - Pass RemotePrintJobChild through to the places where it's needed. r=emilio
Given how nsIPrintSettings is passed around, stored and copied all over the
place, it's very hard to reason about where and when a RemotePrintJobChild is
needed or valid. This patch avoids all that by explicitly passing a
RemotePrintJobChild when it's needed.

Another reason to make this change is because RemotePrintJobChild really does
not belong on nsIPrintSettings. That interface is supposed to represent a
collection of settings for laying out the document that is to be printed.

Differential Revision: https://phabricator.services.mozilla.com/D146380
2022-05-16 08:38:01 +00:00
Maciej S. Szmigiero 41cb3fd7d8 Bug 1063572 - Geoclue2 geolocation provider. r=emilio
Add a Geoclue (version 2) geolocation provider.

This way Firefox can make use of multiple location sources present in the
system, from GNSS provided by a cellular modem or the current network to
location based on visible WiFi networks and 3G tower data, all while
sharing them with other applications.

This is a pure D-Bus-based implementation using a proper state machine, it
does not require any additional dependencies.

Differential Revision: https://phabricator.services.mozilla.com/D145838
2022-05-16 08:24:09 +00:00
Glenn Watson cebe610723 Bug 1768983 - Add prim flag for checkerboarding backgrounds r=gfx-reviewers,lsalzman
Although not needed right now (checkerboarding backgrounds get
a slice anyway due to being a different scroll root), this will
be important for the upcoming work to make backdrop filter
roots implicit. This allows WR to know when slicing up a content
slice if the prim is relevant to the backdrop root.

Differential Revision: https://phabricator.services.mozilla.com/D146145
2022-05-15 21:54:25 +00:00
Butkovits Atila f3f0323cc9 Backed out changeset 39b20dac431b (bug 1063572) for causing bustages at GeoclueLocationProvider. CLOSED TREE 2022-05-15 15:28:12 +03:00
Maciej S. Szmigiero bff064393f Bug 1063572 - Geoclue2 geolocation provider. r=emilio
Add a Geoclue (version 2) geolocation provider.

This way Firefox can make use of multiple location sources present in the
system, from GNSS provided by a cellular modem or the current network to
location based on visible WiFi networks and 3G tower data, all while
sharing them with other applications.

This is a pure D-Bus-based implementation using a proper state machine, it
does not require any additional dependencies.

Differential Revision: https://phabricator.services.mozilla.com/D145838
2022-05-15 12:09:14 +00:00
Makoto Kato aab3cc4f12 Bug 1767556 - Don't remove composing state when composition is started from first character. r=geckoview-reviewers,agi
This occurs since newer GBoard's behaviour seems to be changed.

When `GeckoEditable` receives text change from Gecko, it is possible to remove
composing state if composition is started from first character.

If Gecko's text change by IME, we shouldn't reset text state in `onTextChange`.
`mCausedOnlyByComposition` means that this change is by IME.

Differential Revision: https://phabricator.services.mozilla.com/D146159
2022-05-15 07:27:48 +00:00
Andrew Osmond 05c788f31b Bug 1769382 - Add mesa/crocus to the list of Intel Mesa drivers. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D146379
2022-05-14 17:00:05 +00:00
stransky 081641d354 Bug 1759784 [Linux] Store logical and aligned surface size for DMABufSurfaceYUV r=sotaro
There may be added pixels to VA-API decoded surface to keep 16px alignment.
Store the aligned size internaly as widthAligned/heightAligned and use that to create EGLImage only.

Depends on D146084

Differential Revision: https://phabricator.services.mozilla.com/D146085
2022-05-14 06:48:36 +00:00
Iulian Moraru b0d5d7d487 Backed out changeset 9545a05173c4 (bug 1769269) for causing multiple failures widget related. CLOSED TREE 2022-05-13 21:25:04 +03:00
Emilio Cobos Álvarez 3a9dbcaaba Bug 1769269 - Center non-overlay scrollbar thumb on cocoa. r=mstange
As per discussion in bug 1764435.

Differential Revision: https://phabricator.services.mozilla.com/D146315
2022-05-13 15:59:24 +00:00
Jonathan Watt 702df2639c Bug 1769129. Remove nsIPrintSettings.isPrintSelectionRBEnabled. r=emilio
nsIPrintSettings is supposed to be a collection of settings passed to the
platform code to determine how the document prints. The
isPrintSelectionRBEnabled member doesn't belong here since it is a flag that
is passed to the OS native print settings dialog to tell it whether to
display a "Print selection only" radio button.

Depends on D146232

Differential Revision: https://phabricator.services.mozilla.com/D146251
2022-05-13 15:26:07 +00:00
Daniel Holbert 50464c1e32 Bug 1765059: Stop storing/reading the print resolution in about:config pref. r=bobowen
This per-printer "print_resolution" about:config pref (which ends up in
nsPrintSettings 'mResolution' member-var) is never exposed in UI, and it's
almost entirely unused.  For the usages that do exist (usages of
nsPrintSettings::mResolution), we potentially do the wrong thing when the value
comes from an about:config pref, as described in this bug.  These usages scale
the printed output *as if we're printing to a printer with the given
resolution*, though of course we have no guarantee of this being the printer's
actual resolution, when this value comes from about:config prefs.

After this patch, nsPrintSettings will simply use the value that we actually
get from the printer, instead of this potentially-bogus value from
about:config.  This will avoid the scaling issues described in this bug.

Differential Revision: https://phabricator.services.mozilla.com/D146261
2022-05-13 15:00:29 +00:00
Cristian Tuns fd0c1d6b99 Backed out changeset 00ef44ea9e3f (bug 1769129) for causing build bustages on nsPrintDialogX.mm CLOSED TREE 2022-05-13 08:20:12 -04:00
Jonathan Watt d362d859ac Bug 1769129. Remove nsIPrintSettings.isPrintSelectionRBEnabled. r=emilio
nsIPrintSettings is supposed to be a collection of settings passed to the
platform code to determine how the document prints. The
isPrintSelectionRBEnabled member doesn't belong here since it is a flag that
is passed to the OS native print settings dialog to tell it whether to
display a "Print selection only" radio button.

Differential Revision: https://phabricator.services.mozilla.com/D146251
2022-05-13 11:57:08 +00:00
Jonathan Watt 154323f370 Bug 1769113 - Kill off nsIPrintingPromptService and use nsIPrintDialogService directly. r=emilio
nsIPrintingPromptService comes from an era when the platform print code would
open the print settings dialog, which defaulted to the OS native dialogs.
Its purpose was to allow that dialog to be overridden by embedders to provide
their own interface for the user to select print settings. Nowadays the
platform print code does not open the dialogs. Instead apps like Firefox are
responsible for getting the print settings to pass to the platform code, and
the platform code provides a way to open the OS native print dialog if they
want to use that (nsIPrintDialogService). So nsIPrintingPromptService no longer
has any purpose, and just adds indirection and needless complexity.

Differential Revision: https://phabricator.services.mozilla.com/D146232
2022-05-13 11:20:59 +00:00
Emilio Cobos Álvarez 211ac07df9 Bug 1769012 - Deal with <xul:tree> scrollbars in Theme.cpp. r=mstange
Tree has a non-anonymous scrollbar whose mediator is the
nsTreeBodyFrame:

  https://searchfox.org/mozilla-central/rev/b72e9d7d63bf499d1d8168291b93d4ec7fde236e/toolkit/content/widgets/tree.js#601

So use the scrollbar mediator interface rather than poking at the scroll
frame directly.

Differential Revision: https://phabricator.services.mozilla.com/D146158
2022-05-12 23:21:05 +00:00
Jamie Nicol c54bfe3ed5 Bug 1768925 - Disable SurfaceControl compositing path on Android. r=agi
In bug 1762424 we introduced a compositing path using SurfaceControl
to work around an issue on Android 12 where the app would freeze when
attempting to recover from a GPU process crash. However, this caused
bug 1767128. Until we have a proper solution to that, we should
disable the SurfaceControl functionality.

This means on Android 12 the browser will be once again be unable to
recover from a GPU process crash. However, as part of bug 1762424 we
made it so the parent process crashes in this situation rather than
freezing, meaning Android 12 users will be no worse off than having
the GPU process disabled.

Differential Revision: https://phabricator.services.mozilla.com/D146114
2022-05-11 20:12:50 +00:00
Bas Schouten 65e1ec38c4 Bug 1768662: Add a pref for a frame-rate divisor. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D145980
2022-05-11 17:15:51 +00:00
Paul Adenot fe8840f811 Bug 1730537 - Downgrade a debug assertion in MRPIS code to non-fatal because it's too frequent locally. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D145964
2022-05-11 11:28:15 +00:00
Narcis Beleuzu bd0e17ff20 Merge autoland to Mozilla-Central. a=merge 2022-05-10 06:47:37 +03:00
Molly Howell a2c42daeef Bug 1765049 - Filter out illegal paths. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D145518
2022-05-09 19:27:08 +00:00
stransky 9e36a7b2ef Bug 1756598 [Linux] Make GL context creation thread safe r=sotaro,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D144284
2022-05-09 17:52:11 +00:00
Emilio Cobos Álvarez ddadb3e680 Bug 1764435 - Fix scrollbar drawing when scrollbars are on the left. r=spohl
Our scrollbar drawing code had various RTL checks for the writing mode.

These checks were busted since bug 1554571 (where the writing-mode of
the scrollbar frames and so on is reset). However, they also wouldn't be
correct (we allow to customize scrollbar position via pref).

Instead, look at the scrollable frame to really know if the scrollbar is
on the right or not. Compute that once in Theme.cpp and pass it around
light we were doing for the "is horizontal" bit.

Differential Revision: https://phabricator.services.mozilla.com/D145865
2022-05-09 17:09:24 +00:00
Jan Horak 23ac78e7a6 Bug 1767946 Act dialog type window as toplevel regarding scale changes ; r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D145716
2022-05-09 09:18:19 +00:00
Masayuki Nakano ab4c034d48 Bug 1767558 Make `IMContextWrapper::EnsureToCacheContentSelection` try to query with owner widget if there is no last focused widget r=m_kato
It tries to query selection with last focused widget.  However, if no widget
has gotten focused yet, it causes the warning.

I think that in such case, it should try it with owner widget which is typically
managed by same `PresShell` in these days.

Differential Revision: https://phabricator.services.mozilla.com/D145396
2022-05-09 06:10:41 +00:00
Timothy Nikkel 1884cc0b7a Bug 1768305. Remove widget.swipe.success-threshold pref. r=hiro
Since bug 1757928 we don't vary the value. If a user were to change this value then the opacity of the swipe to nav ui element would not be in sync with the decision to navigate or not. So remove it so things can't break. The pref widget.swipe.whole-page-pixel-size should be used instead now to control sensitivity.

Differential Revision: https://phabricator.services.mozilla.com/D145828
2022-05-08 21:50:10 +00:00
Emilio Cobos Álvarez 31d3fcdb9b Bug 1767172 - Remove custom screen info handling from GfxInfo, use ScreenManager for that. r=jrmuizel,handyman,stransky
This removes a bunch of custom code from GfxInfo to obtain screen
information, and instead collects that screen information in
ScreenManager.

This, apart of removing duplicated code, has the extra benefit of
reporting multi-monitor information on GTK (and potentially in the
future reporting scale and refresh rate properly as well, I've kept the
telemetry as it was on that regard).

Differential Revision: https://phabricator.services.mozilla.com/D145178
2022-05-06 23:37:25 +00:00
Cosmin Sabou 4ddcb34203 Backed out changeset b2bea8e0b400 (bug 1767172) for causing startup crashes (Bug 1768260). a=backout 2022-05-07 01:28:53 +03:00
Paul Adenot cf08170d87 Bug 1767412 - Don't set the AlbumArtist property on IMusicDisplayProperties. r=chunmin
The Album Artist field when talking about musical metadata is the
artist under which a particular release is classified under. Artist is
the people that are on a specific track, including thing like featurings, etc.

Here we only want to set Artist (the most generic item). Album Artist
overrides artist, and has nothing to do with the album name.

Windows doesn't have an API or a location in the UI to display the album
name.

Differential Revision: https://phabricator.services.mozilla.com/D145339
2022-05-06 13:36:20 +00:00
Jan Horak 17e4f81830 Bug 1767916 Clear the attached wl_buffer from wl_surface before scale factor change;r=stransky
The wl_buffer can be still not resized to double size when the Renderer thread changes
the wl_surface buffer scale to 2 which leads to crash.

Differential Revision: https://phabricator.services.mozilla.com/D145541
2022-05-06 11:50:00 +00:00
Neil Deakin d8b26cb066 Bug 1746052, don't allow Windows reserved filenames when sanitizing filenames. Move MangleTextToValidFileName to nsLocalFileWin and rename it to CheckForReservedFileName, r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D138737
2022-05-06 10:00:55 +00:00
Timothy Nikkel c2bb02d580 Bug 1767933. Improvements to start and end of swipe gesture animation. r=hiro
The patch for bug 1762875 stops us from calling SwipeTracker::StartAnimation if we are performing a navigation (but still call it if we aren't performing a navigation). This also has the effect of not calling SwipeTracker::SwipeFinished since it is triggered from StartAnimation. This means we don't null out nsBaseWidget::mSwipeTracker from the mWidget.SwipeFinished() call. This means that when the next pan that we want to track as a swipe then when we call nsBaseWidget::TrackScrollEventAsSwipe it will find the existing mSwipeTracker and call mSwipeTracker->CancelSwipe(), which sends a MozSwipeGestureEnd event. It would be okay if we didn't send the MozSwipeGestureEnd event in the case of a succesful navigation, the MozSwipeGesture event can serve the same purpose, but to send a MozSwipeGestureEnd when the _next_ swipe gesture is started does not seem like a good idea.

I noticed this while writing the test for bug 1762875.

To fix it just call SwipeFinished immediately when we get a successful swipe navigation. There are two side effects to consider: nulling out mSwipeTracker on the widget, and sending the MozSwipeGestureEnd event.

Nulling out mSwipeTracker on the widget seems fine, it's only there to track ongoing swipes. Since the current swipe is finished we don't need it anymore. However it brought up an issue where existing tests in widget/tests/browser/browser_test_swipe_gesture.js started failing. A test would finished immediately after a successful swipe navigation, remove the tab, and move on to the next test before the fade out animation could run. If the fade out animation had finished it would have called removeBoxes and removed the dom elements for the visual swipe arrows. So they stick around instead. Removing the tab seems to have disconnected these elements from the DOM. The structure above the swipe elements goes up to the hbox created here https://searchfox.org/mozilla-central/rev/dd404f43c7198b1076fe5d7e05b1e6b1a03bdfeb/browser/base/content/tabbrowser.js#2182 I don't know the tabbrowser code but I'm guessing that gets removed on removing a tab. So in order to fix this we always remove and re-create the boxes when we start a new animation. It should be safe to always do this and remove the isAnimationRunning early exit because we don't call startAnimation when we get a MozSwipeGestureStart event, so we should always want to start fresh when we get that event.

Sending the MozSwipeGestureEnd event means we need to be a bit more careful in stopAnimation. We don't want to do anything in stopAnimation if we are already stopping animation because the fade out will handle it, so we add a early return so that another stopAnimation call (which can come from a MozSwipeGestureEnd) won't cut off the animation prematurely.

Differential Revision: https://phabricator.services.mozilla.com/D145545
2022-05-06 05:55:52 +00:00
Timothy Nikkel 3085038dd2 Bug 1762875. Add test. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D145570
2022-05-06 05:55:52 +00:00
Timothy Nikkel ac0f7cfb2d Bug 1762875. Don't let swipe to navigation ui element fade animation get cut off. r=hiro
There are two completely separately mechanisms that fade the UI element, one drives the fade out if a navigation was successful, one drives the animation if navigation did not happen.

If navigation is successful the animation is handled by browser/base/content/browser-gestureSupport.js. If navigation is not succesful the animation is handled by widget/SwipeTracker.cpp. I'm not sure why it was done that way.

If navigation is unsuccessful the opacity gets updated the same way as during the gesture: by sending eSwipeGestureUpdate events and putting the opacity amount on the event.

If navigation is successfull we send the eSwipeGesture event. This causes us to call gHistorySwipeAnimation.stopAnimation() at https://searchfox.org/mozilla-central/rev/26a1b0fce12e6dd495a954c542bb1e7bd6e0d548/browser/base/content/browser-gestureSupport.js#449 which https://searchfox.org/mozilla-central/rev/26a1b0fce12e6dd495a954c542bb1e7bd6e0d548/browser/base/content/browser-gestureSupport.js#706 sets this._isStoppingAnimation = true and sets a transition on the element and then sets the opacity to 0. The _isStoppingAnimation part makes us ignore anymore incoming swipe gesture updates that SwipeTracker.cpp is sending, and then after the transition is finished is removes the boxes so isAnimationRunning() returns false which blocks the swipe gesture updates from having any effect after the transition.

However, when the SwipeTracker.cpp animation finishes it sends a eSwipeGestureEnd which browser-gestureSupport.js does not ignore. So don't start the SwipeTracker animation in the case where we don't need it.

Differential Revision: https://phabricator.services.mozilla.com/D142820
2022-05-06 05:55:51 +00:00
Noemi Erli 295eab376a Backed out 14 changesets (bug 1746052) for causing build bustages in nsExternalHelperAppService.cpp CLOSED TREE
Backed out changeset bf46b0add531 (bug 1746052)
Backed out changeset 684b2aca10bb (bug 1746052)
Backed out changeset d4796eeeaf64 (bug 1746052)
Backed out changeset 5cf2378f6eb4 (bug 1746052)
Backed out changeset 2055ec1e9a57 (bug 1746052)
Backed out changeset 1398fc0669d2 (bug 1746052)
Backed out changeset 1f979899c843 (bug 1746052)
Backed out changeset 561a24801d4d (bug 1746052)
Backed out changeset 73e4689120f0 (bug 1746052)
Backed out changeset 9891f3b0229b (bug 1746052)
Backed out changeset 4c1ab30de0bd (bug 1746052)
Backed out changeset 108e14122e53 (bug 1746052)
Backed out changeset 1ee59c52578a (bug 1746052)
Backed out changeset 41fe77c5f4b2 (bug 1746052)
2022-05-05 23:13:33 +03:00
Neil Deakin c1e573cd3c Bug 1746052, don't allow Windows reserved filenames when sanitizing filenames. Move MangleTextToValidFileName to nsLocalFileWin and rename it to CheckForReservedFileName, r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D138737
2022-05-05 19:46:48 +00:00