This avoids exposing printer names to potentially compromised content processes.
The changes in bug 1770211 mean that we no longer create platform specific
nsIDeviceContextSpec instances in the content process, so we no longer need
the printer name to instantiate an nsDeviceContextSpecWin there.
Differential Revision: https://phabricator.services.mozilla.com/D146868
This avoids exposing the path to potentially compromised content processes.
The roundtripping of the toFileName value from RemotePrintJobParent's
mPrintSettings to the content process and then back to
RemotePrintJobParent::InitializePrintDevice was silly anyway.
Differential Revision: https://phabricator.services.mozilla.com/D146867
The default value for the pref print.default_dpi in StaticPrefList.yaml is
already 144. Having this override simply prevents that pref from working on
Windows.
Differential Revision: https://phabricator.services.mozilla.com/D146828
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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