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

3085 Коммитов

Автор SHA1 Сообщение Дата
Markus Stange 241c52c3ae Bug 1679839 - Convert some TouchBarInput properties into ObjC properties, and change the grouping of method implementations. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D98213
2020-12-11 04:09:52 +00:00
Markus Stange cab4fdbbdf Bug 1679839 - Move BaseIdentifier into nsTouchBar.h and rename it to kTouchBarBaseIdentifier. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D98212
2020-12-11 04:09:18 +00:00
Markus Stange e14509eebf Bug 1679839 - Add some missing includes. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D98211
2020-12-11 04:09:45 +00:00
Chris Peterson 4415bec7a4 Bug 1681242 - Remove obsolete CGEvent workaround needed for macOS versions < 10.10.2. r=haik,spohl
This workaround is no longer needed because Firefox >= 79 requires macOS >= 10.12.

Differential Revision: https://phabricator.services.mozilla.com/D99019
2020-12-09 19:31:23 +00:00
Christoph Kerschbaumer 01b80dad31 Bug 1680768: Remove unused argument aPrincipal within closeAlert() in nsIAlertsService.idl r=nika
Differential Revision: https://phabricator.services.mozilla.com/D98776
2020-12-07 17:44:34 +00:00
Dave Townsend 486e6c4fae Bug 1675329: Add an API for returning an exit code from the application. r=dthayer,necko-reviewers,dragana,nika
Callers can pass an exit code to nsIAppStartup::Quit and it will be returned from the process when
it exits.

Note that I have using uint16_t as the exit code because on Windows the exit code can be a uint and
elsewhere it is an int. A uint16_t will safely convert to either of those and no-one will ever need
more than 64k exit codes!

Differential Revision: https://phabricator.services.mozilla.com/D96857
2020-12-03 20:19:47 +00:00
Bogdan Tara 4a649093b9 Backed out changeset 3e90a3759639 (bug 1679208) for scrollbars-no-margin.html failures CLOSED TREE 2020-12-03 01:11:32 +02:00
Emilio Cobos Álvarez aa15236426 Bug 1679208 - Don't assume int return values in nsITheme. r=mstange
This doesn't hold with fractional scale values. Right now GTK truncates
the scale factor, Windows rounds, and non-native theme rounds as well.

With this native theme will propagate correctly the floating point
values.

I tried to not change behavior meaningfully in any of the other themes,
mostly to avoid risk. GTK and Windows can be trivially tweaked to
support fractional scale factors properly if we wanted to, but seems
better to not do that as part of this patch.

Depends on D98099

Differential Revision: https://phabricator.services.mozilla.com/D98100
2020-12-02 21:40:05 +00:00
Masayuki Nakano 912a5bc76d Bug 1678553 - part 13: Make `WidgetQueryContentEvent` use `Maybe` to store some data r=m_kato,geckoview-reviewers
Sorry for this big patch.

This makes `WidgetQueryContentEvent::Reply` is stored with `Maybe` to get
rid of `WidgetQueryContentEvent`.  And `Reply` stores offset and string
with `Maybe` and ``OffsetAndData<uint32_t>`, and also tentative caret offset
with `Maybe`.  Then, we can get rid of `WidgetQueryContentEvent::NOT_FOUND`.

Note that I tried to make `OffsetAndData` have a method to create `NSRange`
for cocoa widget.  However, it causes the column limit`to 100 or longer
and that causes unrelated changes in `TextEvents.h` and `IMEData.h`.
Therefore, I create an inline function in `TextInputHandler.mm` instead.

Differential Revision: https://phabricator.services.mozilla.com/D98264
2020-12-02 05:32:19 +00:00
Andrew Osmond c40cc92486 Bug 1679998 - Part 2. Add Apple GPUs to the WebRender allowlist. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D98311
2020-12-01 19:09:04 +00:00
Emilio Cobos Álvarez a7773ac831 Bug 1679208 - Use more strongly typed rects in nsNativeBasicTheme. r=heycam
As per review comments.

Depends on D97937

Differential Revision: https://phabricator.services.mozilla.com/D98099
2020-11-29 22:19:10 +00:00
Emilio Cobos Alvarez ab2154bd1b Bug 1679208 - Improve non-native theme with fractional scaling. r=heycam
This greatly improves non-native theme on Windows in presence of fractional DPI
(see bug 1657191).

This matches what the Windows native theme does, to my knowledge, see
ScaleForFrameDPI in nsNativeThemeWin.h.

However I think the right fix is to not make these LayoutDeviceInt* things but
LayoutDevice*.

That's a bigger fix, and fits well as a follow-up to this bug, so let's land
this in the meantime.

Differential Revision: https://phabricator.services.mozilla.com/D97937
2020-11-30 04:48:07 +00:00
Simon Giesecke 5bfbb2a572 Bug 1673931 - Avoid including Document.h from header files. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D95046

Depends on D95045
2020-11-23 16:07:43 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Cameron McCormack 0f3cfafb48 Bug 1678540 - Refactor nsXPLookAndFeel::GetIntImpl etc. r=spohl
This will allow calling into NativeGetInt etc. to get native LookAndFeel values without
looking at the prefs.

Differential Revision: https://phabricator.services.mozilla.com/D97725
2020-11-20 23:52:47 +00:00
Cameron McCormack 104a5a7dde Bug 1678540 - Don't provide default values for IntID::ScrollButtonLeftMouseButtonAction etc. r=spohl
This simplifies the way nsXPLookAndFeel::GetIntImpl and its overrides interact.

Differential Revision: https://phabricator.services.mozilla.com/D97724
2020-11-20 23:52:52 +00:00
smolnar 93595da8db Backed out changeset d57553438d94 (bug 1675329) for causing bustages in nsAppShell. CLOSED TREE 2020-11-20 22:37:39 +02:00
Dave Townsend a3cb03324e Bug 1675329: Add an API for returning an exit code from the application. r=dthayer,necko-reviewers,dragana,nika
Callers can pass an exit code to nsIAppStartup::Quit and it will be returned from the process when
it exits.

Note that I have using uint16_t as the exit code because on Windows the exit code can be a uint and
elsewhere it is an int. A uint16_t will safely convert to either of those and no-one will ever need
more than 64k exit codes!

Differential Revision: https://phabricator.services.mozilla.com/D96857
2020-11-20 19:13:34 +00:00
Jeff Muizelaar 80315bfb0a Bug 1678408 - Rename IntelHD3000 to IntelSandyBridge. r=aosmond
By default, anything we do for one Sandy Bridge gpu
we should do for all of them. See bug 1678388 for an
example of how we screwed this up.

Differential Revision: https://phabricator.services.mozilla.com/D97649
2020-11-19 19:30:46 +00:00
Andrew Osmond 4afdd0de9f Bug 1678061 - Properly detect OSX 11.0 / 10.16 for blocklist purposes. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D97561
2020-11-19 17:34:25 +00:00
Andrew Osmond 000fa14fd2 Bug 1678058 - Ship WebRender to Big Sur / OSX 10.16 to release. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D97455
2020-11-18 17:41:39 +00:00
Sylvestre Ledru bebb9f9181 Bug 1519636 - Reformat with clang-format-11 to the Google coding style r=andi,sg,geckoview-reviewers,snorp
It is bringing some minor changes

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D90795
2020-11-18 09:05:59 +00:00
Markus Stange 4a49a6612c Bug 1676434 - Replace obsolete -moz-mac-yosemite-theme media query with a new -moz-mac-big-sur-theme media query. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D97089
2020-11-16 20:43:35 +00:00
Tarek Ziadé 37386bc892 Bug 1529510 - Move ProcInfo to processtoolsservice;r=aklotz,mstange
With this change, we expose ProcInfo to Android.

Differential Revision: https://phabricator.services.mozilla.com/D94810
2020-11-12 17:42:54 +00:00
Jed Davis 96f7c5cf5c Bug 1657401 - Change LookAndFeel IPC to use IPDL structs. r=spohl
Aside from automating boilerplate, this will allow reusing some of these
structs for full LookAndFeel remoting in bug 1470983.

Differential Revision: https://phabricator.services.mozilla.com/D94531
2020-11-11 23:26:51 +00:00
Emilio Cobos Álvarez 7c3b5843ac Bug 1676527 - Allow extending the CUPS monochrome print setting list without rebuilding. r=nordzilla
Mostly for debugging / diagnosing purposes. This is easier than asking
people to try builds from try or building Firefox.

Differential Revision: https://phabricator.services.mozilla.com/D96648
2020-11-11 19:00:00 +00:00
Emilio Cobos Álvarez 771dd03229 Bug 1669854 - Add a single pageRanges print setting. r=nordzilla
... which is an array of pairs of ranges, and use it instead of the
existing printRange / startPage / endPage settings.

Differential Revision: https://phabricator.services.mozilla.com/D96093
2020-11-07 16:01:57 +00:00
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