This causes the generated scroll events to be turned into PanGestureInput events
instead of ScrollWheelInput events. This exercises different codepaths that are
more representative of real-world behaviour on mac laptops. This patch also
allows a pref to flip the behaviour back to the old behaviour of triggering
ScrollWheelInputs, since in some cases we may want to test that behaviour
explicitly.
Depends on D95320
Differential Revision: https://phabricator.services.mozilla.com/D95321
Apparently objective-C doesn't do a great job when you give a vararg function
that takes int32_t arguments double values. I guess tests that use macOS
synthesized wheel inputs were basically only working by accident.
Differential Revision: https://phabricator.services.mozilla.com/D95320
We should be able to use CTFontCreateCopyWithAttributes for non-system fonts
because we don't need to worry about them changing. This avoids the leaks
caused by going through a CGFont.
Differential Revision: https://phabricator.services.mozilla.com/D94772
We do it in nsDeviceContextSpecG since that's what actually consumes the
settings. On GTK the options need to be prefixed by cups- for some
reason in order to work, so factor out a macro listing the options and
do the NSString / cups- prefixing in the platform specific places.
Differential Revision: https://phabricator.services.mozilla.com/D94479
This removes some code which was creating new Objective C classes at runtime.
I originally wrote this code because NSVisualEffectView was a new class that
was added in 10.10, and we were building with a pre-10.10 SDK.
These days we build with the 10.11 SDK, which has NSVisualEffectView, and we
only run on 10.12+.
Differential Revision: https://phabricator.services.mozilla.com/D94622
This should make the optimization landed earlier in this bug apply for
some of the NotifyThemeChanged() calls in nsWindow.cpp which are causing
all the extra invalidations.
If we know that system colors/fonts didn't change, we can avoid doing a
bunch of reflow work and the patch from earlier in the bug can avoid
re-rasterizing images too.
Differential Revision: https://phabricator.services.mozilla.com/D94425
Detect GPUs on Apple Silicon Macs using the AGXAccelerator IOService similarly to Chromium's method.
This may need updating for future Apple Silicon hardware, but works with the device on the DTK.
Differential Revision: https://phabricator.services.mozilla.com/D93120
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Rather than wrapping an NSPrintInfo in nsPrintSettingsX, where we then have two
(potentially conflicting) sources of truth about various settings, we treat the
settings in the base nsPrintInfo class as authoritative, and just apply them to
a temporary NSPrintInfo when needed to interact with platform APIs.
Differential Revision: https://phabricator.services.mozilla.com/D92966
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
For Big Sur toolbar search fields, don't return YES from _isToolbarMode(). And adjust the search field border for better spacing after the search icon.
Differential Revision: https://phabricator.services.mozilla.com/D93705
Draw toolbar button segment backgrounds manually on Big Sur to workaround a problem where they are filled with the toolbar gradient.
Differential Revision: https://phabricator.services.mozilla.com/D93578
This removes the CoreUI draw calls for scrollbars.
We already have code to manually draw scrollbars, which is used to support the
scrollbar-color CSS property. But this code was only used for non-overlay
scrollbars in the past, because scrollbar-color only affects non-overlay scrollbars.
This patch adjusts that custom drawing code to work for overlay scrollbars as well.
It computes the correct sizes, positions, and colors, to match native scrollbars.
The scrollbar track drawing code is changed from "background fill with strokes on
top" to "multiple adjacent non-overlapping filled rectangle segments" so that it
works better with translucent track colors.
Differential Revision: https://phabricator.services.mozilla.com/D93715
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
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
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
In the past we had a problem with transparent windows and window shadows. This
is no longer a problem, because we have dropped the versions of macOS where it
is a problem [1].
So we now support acceleration on all window types.
But we don't necessarily want to use the OpenGL compositor or WebRender for all
windows, due to per-window overhead.
[1] Specifically, the problematic macOS versions are 10.9 and 10.10. On 10.9,
transparent windows with CoreAnimation content never have shadows, and on 10.10,
those windows only get a shadow when they are opened for the second time without
their size changing, see bug 1632895 comment 5. We now support only 10.12+.
Depends on D91828
Differential Revision: https://phabricator.services.mozilla.com/D91829
We already don't support transparency on non-popup windows, but the code in
nsChildView makes it look like we do.
The changes in this patch have the following effects:
- nsCocoaWindow::SetTransparencyMode no longer sets a white background color on
non-popup windows.
- nsChildView picks up the default implementation for Get/SetTransparencyMode
from nsBaseWidget, which ignores calls to SetTransparencyMode and always
returns opaque. The nsChildView methods were only called for non-popup
windows (popup windows call the nsCocoaWindow implementations), so this is
what we want.
Differential Revision: https://phabricator.services.mozilla.com/D91828
This also adds a diagonstic assert to make sure the code works in all process types.
And it adds another item to the sandbox IOKit property name allowlist, so that
the detection works in content processes.
This landed before, in bug 1649490, but without the sandbox adjustment (so it
didn't work in content processes).
Differential Revision: https://phabricator.services.mozilla.com/D91950