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

3058 Коммитов

Автор SHA1 Сообщение Дата
Sylvestre Ledru 9bfd4073b2 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D95434
2020-11-04 18:46:00 +00:00
Markus Stange 495d5646be Bug 1671704 - Draw macOS native-looking scrollbars when using the basic theme on macOS. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D93846
2020-11-02 17:10:24 +00:00
Markus Stange aa21c0548f Bug 1671704 - Unify some calls to ComputeScrollbarParams and call nsLayoutUtils::StyleForScrollbar in the caller. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D95076
2020-11-02 17:08:56 +00:00
tobar2018 d7a64d8211 Bug 1673051 - Remove OnYosemiteOrLater(), OnElCapitanOrLater(), and OnSierraOrLater(). r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D95304
2020-11-02 16:25:18 +00:00
Kartikaya Gupta 719ed26689 Bug 1673728 - Default to adding phase information to the synthesized scroll events on macOS. r=tnikkel
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
2020-10-30 18:33:54 +00:00
Kartikaya Gupta e81dabfa00 Bug 1673728 - Don't put garbage in the synthesized scrollwheel event. r=tnikkel
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
2020-10-30 18:32:25 +00:00
Jeff Muizelaar 938d2dffe9 Bug 1672899. Avoid CGFonts in ctfont_create_exact_copy when possible. r=jfkthame
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
2020-10-28 14:16:41 +00:00
Markus Stange 31f1bafb71 Bug 1673503 - Simplify NSScroller.preferredScrollerStyle API usage. r=spohl
This API has been available since 10.7.

Differential Revision: https://phabricator.services.mozilla.com/D94796
2020-10-27 21:35:10 +00:00
Emilio Cobos Álvarez 7a1a5c1d8d Bug 1672625 - Make monochrome support on GTK work like on Mac. r=jfkthame
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
2020-10-27 16:23:26 +00:00
Markus Stange 75d909c261 Bug 1673055 - Remove now-unused SourceList widget drawing. r=haik
Differential Revision: https://phabricator.services.mozilla.com/D94635
2020-10-26 23:17:34 +00:00
Markus Stange 5df50199ee Bug 1673055 - Remove now-unused Tooltip widget drawing. r=haik
Differential Revision: https://phabricator.services.mozilla.com/D94634
2020-10-26 23:17:32 +00:00
Markus Stange 94d4a67300 Bug 1673055 - Remove now-unused MenuBackground widget drawing. r=haik,spohl
Differential Revision: https://phabricator.services.mozilla.com/D94633
2020-10-26 23:17:24 +00:00
Markus Stange 7f0f151a07 Bug 1673055 - Remove always-true backgroundIsVibrant field. r=haik
Differential Revision: https://phabricator.services.mozilla.com/D94631
2020-10-26 23:17:19 +00:00
Markus Stange 8c342b5dd2 Bug 1673055 - Simplify other code now that SystemSupportsVibrancy() always returns true. r=haik
Differential Revision: https://phabricator.services.mozilla.com/D94629
2020-10-26 23:17:11 +00:00
Markus Stange a15e11c85e Bug 1673055 - Simplify VibrancyManager.mm. r=haik
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
2020-10-26 23:17:03 +00:00
Markus Stange af68ac4a30 Bug 1673132 - Use the -moz-default-appearance values "scrollbar-horizontal" and "scrollbar-vertical" on macOS and remove the now-unused value "scrollbar". r=emilio
Other platforms were already converted to scrollbar-horizontal and scrollbar-vertical in bug 1205643.

Differential Revision: https://phabricator.services.mozilla.com/D94674
2020-10-27 12:37:44 +00:00
Markus Stange cb8968058f Bug 1673132 - Remove "scrollbar-small" -moz-default-appearance value and replace its single use with scrollbar-width: thin. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D94673
2020-10-27 12:37:44 +00:00
Markus Stange 44e288b359 Bug 1673120 - Extract out scrollbar drawing from nsNativeThemeCocoa so that it can later be used by nsNativeBasicTheme. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D93844
2020-10-27 15:16:49 +00:00
Emilio Cobos Álvarez d622f54db0 Bug 1668875 - Distinguish theme changes that can and cannot affect style/layout. r=tnikkel
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
2020-10-27 10:24:40 +00:00
Haik Aftandilian da539131b7 Bug 1673506 - Correctly detect GPUs on Apple Silicon Macs r=mstange
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
2020-10-27 04:38:32 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
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
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
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
2020-10-23 20:40:42 +00:00
Markus Stange 2e46f93110 Bug 1673053 - Remove unnecessary #ifdef, now that we no longer have 32 bit macOS builds. r=haik
Differential Revision: https://phabricator.services.mozilla.com/D94617
2020-10-23 18:22:45 +00:00
Markus Stange 4e4a9ca261 Bug 1673046 - Change the menu separator color to a transparent black. r=haik
This matches the native appearance more closely.

Differential Revision: https://phabricator.services.mozilla.com/D94610
2020-10-23 18:22:45 +00:00
Emilio Cobos Álvarez 5a616bbd7e Bug 1670943 - Add monochrome support for OSX. r=jwatt,jfkthame
See comments for fun.

Differential Revision: https://phabricator.services.mozilla.com/D93527
2020-10-23 11:58:42 +00:00
Emilio Cobos Álvarez ccea7aadbb Bug 1670943 - Remove two dead declarations in nsPrintSettingsX. r=jfkthame
While at it..

Differential Revision: https://phabricator.services.mozilla.com/D93535
2020-10-23 11:58:35 +00:00
Jonathan Kew 3c358ca383 Bug 1667053 patch 2 - If the user runs the system print UI, hold on to and use the printInfo it returns. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D94026
2020-10-23 11:07:46 +00:00
Jonathan Kew f2b9ae0184 Bug 1667053 - Refactor macOS print settings implementation for clarity. r=jwatt
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
2020-10-23 11:07:21 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
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
2020-10-21 21:27:27 +00:00
Markus Stange f714904a27 Bug 1672044 - Convert DrawScrollbarThumb to use DrawTarget. r=haik
Differential Revision: https://phabricator.services.mozilla.com/D93843
2020-10-20 03:57:26 +00:00
Markus Stange 1a0cd33cd1 Bug 1672044 - Convert DrawScrollCorner to use DrawTarget. r=haik
Differential Revision: https://phabricator.services.mozilla.com/D93842
2020-10-20 03:57:25 +00:00
Markus Stange 43bd48b7a2 Bug 1672044 - Convert DrawScrollbarTrack to use DrawTarget. r=haik
Differential Revision: https://phabricator.services.mozilla.com/D93841
2020-10-20 03:57:25 +00:00
Markus Stange a41db84c43 Bug 1672044 - Create a path that draws native widgets using DrawTarget instead of CGContext. r=haik
Differential Revision: https://phabricator.services.mozilla.com/D93840
2020-10-20 03:57:25 +00:00
Haik Aftandilian 8264ddfcc9 Bug 1650615 - Part 2 - Library search field has incorrect styling r=mstange
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
2020-10-17 13:59:51 +00:00
Haik Aftandilian 94b553fca4 Bug 1650615 - Part 1 - Manually draw toolbar button backgrounds on Big Sur r=mstange
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
2020-10-17 13:59:49 +00:00
Markus Stange 7c5c0899bf Bug 1670023 - Emulate native scrollbar colors and sizes with custom drawing. r=haik
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
2020-10-16 23:11:50 +00:00
Makoto Kato 57889a7d2c Bug 1670370 - Move BUG_COMPONENT of widget's IME code to UI Events & Focus Handling. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D93150
2020-10-12 12:26:45 +00:00
Haik Aftandilian 4b8141a376 Bug 1669890 - Workaround MOZ_DIAGNOSTIC_ASSERT(mNumGPUsDetected > 0) DTK crash r=mstange
Until we have GPU detection for the DTK ARM hardware, skip the diagnostic ASSERT on ARM builds.

Differential Revision: https://phabricator.services.mozilla.com/D92983
2020-10-08 19:19:00 +00:00
alwu 17ff21b7c5 Bug 1663128 - part3 : the event source should do the cleanup when it closes. r=chunmin
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
2020-10-07 09:23:08 +00:00
Razvan Maries 98e7259515 Backed out 4 changesets (bug 1663128) for perma failures on browser_control_page_with_audible_and_inaudible_media.js. CLOSED TREE
Backed out changeset c9bd215fdafa (bug 1663128)
Backed out changeset 0ea9bcad0ff8 (bug 1663128)
Backed out changeset 6791eacd4868 (bug 1663128)
Backed out changeset 1f6e8e343055 (bug 1663128)
2020-10-07 12:14:56 +03:00
alwu d81f601202 Bug 1663128 - part3 : the event source should do the cleanup when it closes. r=chunmin
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
2020-10-06 21:43:25 +00:00
Daniel Holbert 675e1e5b28 Bug 1669409: Convert the nsIPrintSettings:kEnableSelectionRB flag into a boolean, since it's the only entry in a bitfield. r=jwatt,emilio
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
2020-10-07 00:36:51 +00:00
Kartikaya Gupta 36fe42d67a Bug 1642526 - Force the macOS scrollthumbs to be drawn via the custom drawing codepath. r=mstange
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
2020-10-06 21:18:41 +00:00
Sylvestre Ledru d9cd198ba1 Bug 1519636 - Reformat recent changes to the Google coding style r=andi,necko-reviewers,dragana
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D92459
2020-10-06 16:12:00 +00:00
Haik Aftandilian f0efce15ed Bug 1668493 - macOS 11.0 - Popup Menus separator lines have blue tint r=mstange
Slight color adjustment of the separator.

Differential Revision: https://phabricator.services.mozilla.com/D92273
2020-10-02 19:40:33 +00:00
Markus Stange 2e5e4bdcbc Bug 1668107 - Clean up how nsChildView decides to use acceleration and OMTC. r=jrmuizel
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
2020-10-01 15:18:51 +00:00
Markus Stange 572cc297b2 Bug 1668107 - Be more consistent about having opaque non-popup windows. r=spohl
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
2020-10-02 15:07:12 +00:00
Bert Peers 5444eeeaf6 Bug 1668145 - Detect all Mac GPUs. r=jrmuizel,haik
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
2020-10-02 01:10:20 +00:00