As noted in the attribute's documentation, we only intend to support a short
list of numeric values. The underlying platform code that reacts to this
attribute (added in a later patch) will screen for whether the provided value
is supported or unsupported, and will gracefully fall back as-needed.
(The corresponding frontend code will probably expose this attribute via a
dropdown widget that only allows users to choose among the supported values, so
there shouldn't really be any way to get an unsupported value into this
attribute anyway.)
Differential Revision: https://phabricator.services.mozilla.com/D86799
This should be able to avoid creating a printer-specific HTTP connection in
nsPrinterCUPS::DefaultSettings when the paper size is a PWG-recognized size.
The current maximum error when comparing paper sizes is 4 points. This may need
to be revised later.
Differential Revision: https://phabricator.services.mozilla.com/D91497
We will use the fallback, PWG paper sizes for localization of paper sizes in
the CUPS backend when possible. This will make paper names more consistent, and
may allow us to avoid extra connections in CUPS.
This also makes the paper size data constexpr data. The localized paper data is
held in a RefPtr as it will be shared with the printers created by the printers
when we start using localized PWG names where possible.
Differential Revision: https://phabricator.services.mozilla.com/D91496
On Linux, Firefox is listening on notify::scale-factor to detect DPI
change. However, scale-factor is an int and on the lower-end side of
the DPI scale, some devices are using fractional scale factors encoded
into Xft/DPI setting. Changing from ×1 to ×1.5 scale is therefore
undetected.
The proposed change is two-folds:
- remove use of a cached sDPI value and rely on GTK being the cache
- listening on notify::gtk-xft-dpi to trigger a DPI change
What is missing:
- performance evaluation of not caching sDPI (on a 10s session
loading 2 pages, there is an "overhead" of 6ms on my setup, nothing
visible from my point of view)
- when changing Xft/DPI and scale, the change is done twice, this
seems harmless
Differential Revision: https://phabricator.services.mozilla.com/D92095
This is the third attempt to investigate the launcher failure of our detour.
The previous commits d8315e4ed18d and 1b81ea85c43d added the assembly bytes
of a detour target and a special error code `DetourResultCode` to the launcher
failure ping.
In the latest telemetry data, however, the most common value of `hresult`
is still `ERROR_UNIDENTIFIED_ERROR`, meaning the previous commit missed to
set an error code in the common fallible codepath we wanted to know.
Besides `ERROR_UNIDENTIFIED_ERROR`, we're seeing `DETOUR_PATCHER_DO_RESERVE_ERROR`
in the telemetry, but having that code is not enough to pinpoint a falling
operation.
For further investigation, this patch adds ten more values to `DetourResultCode`.
`FUNCHOOKCROSSPROCESS_COPYSTUB_ERROR` is the last codepath we forgot to cover
in the previous commit. The values of `MMPOLICY_RESERVE_*` are to investigate
`DETOUR_PATCHER_DO_RESERVE_ERROR` in the MMPolicy level. In both cases, we add
the last Windows error code to `DetourError::mOrigBytes`.
Differential Revision: https://phabricator.services.mozilla.com/D92974
This is mostly a revert of the patch in bug 1425686 that removed the old
probe, but rebased to new code locations and clang-formatted. The histogram
entry is also updated with new bug numbers and fields.
The next patch will refine some of these telemetry recording points; the patch
is split into two for easier reviewing as this part is basically what landed
originally.
Differential Revision: https://phabricator.services.mozilla.com/D92995
Track delayed commits in a global list and don't store them in actual wayland surfaces.
When a delayed commit is called, check that the associated wayland surface is still valid.
Differential Revision: https://phabricator.services.mozilla.com/D92432
This is the third attempt to investigate the launcher failure of our detour.
The previous commits d8315e4ed18d and 1b81ea85c43d added the assembly bytes
of a detour target and a special error code `DetourResultCode` to the launcher
failure ping.
In the latest telemetry data, however, the most common value of `hresult`
is still `ERROR_UNIDENTIFIED_ERROR`, meaning the previous commit missed to
set an error code in the common fallible codepath we wanted to know.
Besides `ERROR_UNIDENTIFIED_ERROR`, we're seeing `DETOUR_PATCHER_DO_RESERVE_ERROR`
in the telemetry, but having that code is not enough to pinpoint a falling
operation.
For further investigation, this patch adds ten more values to `DetourResultCode`.
`FUNCHOOKCROSSPROCESS_COPYSTUB_ERROR` is the last codepath we forgot to cover
in the previous commit. The values of `MMPOLICY_RESERVE_*` are to investigate
`DETOUR_PATCHER_DO_RESERVE_ERROR` in the MMPolicy level. In both cases, we add
the last Windows error code to `DetourError::mOrigBytes`.
Differential Revision: https://phabricator.services.mozilla.com/D92974
Currently margin values only change when the window goes fullscreen, causes unexpected white borders when moving to a lower-DPI display. This patch fixes that by updating the values whenever DPI changes.
Differential Revision: https://phabricator.services.mozilla.com/D89493
The tooltip width can be real number in the hidpi display setup
or when the font scaling is used. In this case the nsWindow GTK
implementation will cut out the non integer part which leads to
narrowing the tooltip and later overflowing the text which
is in the tooltip to next line. This workaround patch adds
a one pixel to the tooltip frame when the tooltip has real number
width or height.
Differential Revision: https://phabricator.services.mozilla.com/D92620
In order to only call `EnableControl()` twice, once in in `Open()` and another one in `Close()`, so reduce other necessary call of `EnableControl()`.
Differential Revision: https://phabricator.services.mozilla.com/D92118
When close the event source, it should be responsible to clear up and reset the virtual control interface, rather than doing so by `Media Control Server` via setting some empty results.
Differential Revision: https://phabricator.services.mozilla.com/D92116
This allows mesa to continue using the existing vsync implementation
and nvidia to use the new EGL xvisual logic.
It is an intermediate solution until the issues are fixed. However,
assuming it will take a while to do so, it's probably worth it.
Differential Revision: https://phabricator.services.mozilla.com/D92466
In order to only call `EnableControl()` twice, once in in `Open()` and another one in `Close()`, so reduce other necessary call of `EnableControl()`.
Differential Revision: https://phabricator.services.mozilla.com/D92118
When close the event source, it should be responsible to clear up and reset the virtual control interface, rather than doing so by `Media Control Server` via setting some empty results.
Differential Revision: https://phabricator.services.mozilla.com/D92116
This was the last flag that the PrintOptions bitfield was tracking.
So, this patch is effectively converting that bitfield (and its alias
"PrintOptionsBits") into a new, simpler boolean field named
"isPrintSelectionRBEnabled".
Differential Revision: https://phabricator.services.mozilla.com/D92542
BasicCompositor defaults to using BufferMode::BUFFERED, which causes it to draw
into a temporary backbuffer, which it then copies to the widget's surface.
With the addition of the "remote backbuffer" feature, there is now a second
buffering stage. This makes the original backbuffer redundant when
"remote backbuffer" is enabled.
This changes the mode to BufferMode::BUFFER_NONE in that case, and also ensures
that the remote backbuffer preserves contents when resized (which is necessary
because the remote backbuffer needs to be a stand-in for the widget surface)
Differential Revision: https://phabricator.services.mozilla.com/D92661
The default drawing codepath requests the OS to draw it, but the OS seems to
ignore the scaling factor of the transform. So when drawing scrollbars after
APZ-zooming, the scrollthumbs appear abnormally thin. This patch forces us into
the custom drawing codepath which gets scaled properly.
Differential Revision: https://phabricator.services.mozilla.com/D92677
We don't need to flush before dispatching the event because we know that
if the values we cared about changed, then we'd get another event.
Differential Revision: https://phabricator.services.mozilla.com/D92444
This code looked like it might work, but it seems to have only ever been backed
by per-printer about:config prefs. I believe we only ever exposed UI for this
feature on Linux, via the native GTK dialog; and even there, the UI doesn't
actually seem to have done anything -- it was never wired up to the actual
implementation of even/odd page-skipping.
Differential Revision: https://phabricator.services.mozilla.com/D92528
This patch simply removes GTK_PRINT_CAPABILITY_PAGE_SET from our
GtkPrintCapabilities struct. This flag is documented as controlling whether
the gtk "Print dialog will offer printing even/odd pages", per
https://developer.gnome.org/gtk3/stable/GtkPrintUnixDialog.html
After this change, the "Only Print: All Sheets | Even Sheets | Odd Sheets"
dropdown-menu in the GTK Print Dialog will be grayed out & disabled, which will
accurately indicate that we don't support this feature.
Differential Revision: https://phabricator.services.mozilla.com/D92527