Commit Graph

3654 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
5fed8de04b Bug 1754547 - Generalize moz-os-version into moz-platform. r=dao,preferences-reviewers,Gijs
Allow differentiating non-windows platforms on it.

Differential Revision: https://phabricator.services.mozilla.com/D138431
2022-02-10 15:50:31 +00:00
Masayuki Nakano
0c356a2793 Bug 1746104 - part 5-4: Make widget code handle no selection case at getting selection change notifications r=m_kato,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D137425
2022-02-07 22:33:38 +00:00
Stephen A Pohl
9b316675f5 Bug 1752047: Ensure that Voice Over continues to function correctly for elements with tooltips. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D137585
2022-02-02 00:52:52 +00:00
Chris Martin
2f8ba0583d Bug 1752619 - Remove aTargetScreen from nsIWidget::MakeFullScreen() r=handyman,spohl,agi,emilio
Differential Revision: https://phabricator.services.mozilla.com/D137336
2022-01-31 22:07:23 +00:00
Andi-Bogdan Postelnicu
30631a4a9b Bug 1519636 - Reformat recent changes to the Google coding style. r=sylvestre
Updated with clang-format version 13.0.0 (taskcluster-dIIauZE0TkuXy6_23BQhcw)

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D137147
2022-01-31 17:00:21 +00:00
Emilio Cobos Álvarez
f39ab4f51a Bug 1749531 - Allow to override native theme scrollbar styles. r=mstange
Depends on D136129

Differential Revision: https://phabricator.services.mozilla.com/D136130
2022-01-25 21:31:44 +00:00
Emilio Cobos Álvarez
94586650a4 Bug 1749531 - Remove scrollbar drawing code from nsNativeThemeCocoa, use ThemeCocoa drawing. r=mstange
Depends on D136128

Differential Revision: https://phabricator.services.mozilla.com/D136129
2022-01-25 21:31:43 +00:00
Emilio Cobos Álvarez
4c41f32a27 Bug 1749531 - Manage native theme lifetime from Theme.cpp. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D136127
2022-01-25 21:31:43 +00:00
Markus Stange
a4ae35ff54 Bug 1751687 - Return early from validRequestorForSendType if it's called on a non-main thread. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D136800
2022-01-25 00:24:19 +00:00
Edgar Chen
1238a221ba Bug 1742421 - Part 2: [widget/cocoa] Exit fullscreen when changing sizemode; r=mac-reviewers,mstange
Differential Revision: https://phabricator.services.mozilla.com/D133735
2022-01-19 00:49:46 +00:00
Alexandre Lissy
161f130b0a Bug 1731890 - Adding Utility process with basic sandbox r=agi,nika,bobowen
Differential Revision: https://phabricator.services.mozilla.com/D126297
2022-01-12 20:52:58 +00:00
Emilio Cobos Álvarez
de7b391af7 Bug 1749645 - Rename nsNativeBasicTheme{,Cocoa} to Theme{,Cocoa}. r=mstange
We have this situation right now where all the themes are inheriting from
nsNativeBasicTheme. Rename it to a nicer name, and clean up some code while at
it.

In the future I'd like to simplify the inheritance chain to remove
nsNativeTheme altogether (so that all nsITheme implementations use
mozilla::widget::Theme).

That's not hard to do mechanically, but rather than dumping all of
nsNativeTheme into Theme I'd like to do it a bit more carefully, to hopefully
remove a lot of the helpers that nsNativeTheme has to deal with XUL and so on
and use something nicer. Eventually the inheritance chain will be something
like:

 * nsITheme : public nsISupports
 * Theme : public nsITheme, public nsITimerCallback, public nsINamed
 * ThemeCocoa : public Theme
 * nsNativeThemeCocoa : public ThemeCocoa
 * nsNativeThemeWin : public Theme
 * nsNativeThemeGtk : public Theme

Differential Revision: https://phabricator.services.mozilla.com/D135668
2022-01-12 16:33:31 +00:00
Emilio Cobos Álvarez
fc9e3edc1a Bug 1748640 - Revert behavior change from bug 1737831 on notch-less macbooks, and add a pref to control this behavior. r=mac-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D135651
2022-01-11 23:15:44 +00:00
Stephen A Pohl
ab45afb715 Bug 1663508: Collect information about threads that are used during drag sessions on macOS (nightly-only). r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D134186
2022-01-11 21:24:04 +00:00
Andi-Bogdan Postelnicu
120496a230 Bug 1519636 - Reformat recent changes to the Google coding style. r=sylvestre
Updated with clang-format version 13.0.0 (taskcluster-dn0nWlPhT22vaQNfMnFkSg)

Differential Revision: https://phabricator.services.mozilla.com/D135325
2022-01-11 15:49:03 +00:00
Cristian Tuns
dea3b789a7 Backed out 2 changesets (bug 1617369, bug 1519636) for causing lint failures on multiple files. CLOSED TREE
Backed out changeset 6726892a0012 (bug 1617369)
Backed out changeset c08caa5f8504 (bug 1519636)
2022-01-11 04:38:34 -05:00
Andi-Bogdan Postelnicu
f4ea362111 Bug 1519636 - Reformat recent changes to the Google coding style. r=sylvestre
Updated with clang-format version 13.0.0 (taskcluster-dn0nWlPhT22vaQNfMnFkSg)

Differential Revision: https://phabricator.services.mozilla.com/D135325
2022-01-11 09:16:56 +00:00
Stephen A Pohl
2bc7ca4980 Bug 1742877: Add the proper window mask to popup windows on macOS that can be miniaturized, such as the screen share indicator. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D135255
2022-01-07 00:31:26 +00:00
Chris H-C
1efbbf8bd5 Bug 1748904 - Fix use of now-obsolete eval_rst directives in docs r=firefox-source-docs-reviewers,ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D135252
2022-01-06 20:21:24 +00:00
Markus Stange
95c4aaa969 Bug 1707379 - Don't re-show visible windows, in order to avoid unintended window ordering changes on focus. r=spohl
This primarily affects alternative window managers which allow focusing background windows.

Differential Revision: https://phabricator.services.mozilla.com/D134778
2022-01-06 17:25:33 +00:00
Hiroyuki Ikezoe
e33d1e93e3 Bug 1348786 - Factor out the last part of shouldConsiderStartingSwipeFromEvent into a new function. r=tnikkel
The `PanGestureInput`, the argument of the new function named CanTriggerSwipe,
is generated by `theEvent`, the `PanGesgureInput.mPanDisplacement.{x,y}` are
calculated by `theEvent.scrollingDelta{X,Y}` * `BackingScaleFactor()`, so both
inequalities are equivalent.

[1] https://searchfox.org/mozilla-central/rev/07c3bd159f79f81f86050d5e002a14ed741f34f7/widget/cocoa/nsChildView.mm#3394-3395,3408

Differential Revision: https://phabricator.services.mozilla.com/D134368
2022-01-05 09:08:07 +00:00
Hiroyuki Ikezoe
5414f6328c Bug 1348786 - Factor out functions to (may) trigger a swipe gesture into nsBaseWidget. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D134367
2022-01-05 09:08:07 +00:00
Hiroyuki Ikezoe
b6f644b523 Bug 1348786 - Move SendMayStartSwipe() into nsBaseWidget. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D134365
2022-01-05 09:08:07 +00:00
Hiroyuki Ikezoe
cc326dc6bf Bug 1348786 - Move ReportSwipeStarted() and TrackScrollEventAsSwipe() into nsBaseWidget. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D134364
2022-01-05 09:08:06 +00:00
Hiroyuki Ikezoe
78a54829f4 Bug 1348786 - Move mCurrentPanGestureBelongsToSwipe into nsBaseWidget. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D134363
2022-01-05 09:08:06 +00:00
Hiroyuki Ikezoe
c0776e780a Bug 1348786 - Move mSwipeEventQueue from nsChildView into nsBaseWidget. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D134362
2022-01-05 09:08:06 +00:00
Hiroyuki Ikezoe
0f2ffcf2af Bug 1348786 - Move SwipeTracker class as reusable for other platforms. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D134361
2022-01-05 09:08:05 +00:00
Hiroyuki Ikezoe
a5acf54206 Bug 1348786 - Use GetDefaultScaleInternal instead of BackingScaleFactor in SwipeTracker::ProcessEvent. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D134360
2022-01-05 09:08:05 +00:00
Hiroyuki Ikezoe
6b5874286f Bug 1348786 - Move nsChildView::DispatchWindowEvent(WidgetGUIEvent&) into nsBaseWidget. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D134359
2022-01-05 09:08:04 +00:00
Emilio Cobos Álvarez
0fe787991e Bug 1746955 - Make macOS context menus respect the color-scheme CSS property. r=mac-reviewers,mstange
This is consistent with other platforms, and with non-native popups.

Differential Revision: https://phabricator.services.mozilla.com/D134336
2021-12-29 21:52:02 +00:00
Emilio Cobos Álvarez
6ed36db472 Bug 1737831 - Also detect when the screen has a notch and, if so, don't shift by the menubar height either. r=mac-reviewers,mstange
This should fix the M1 mac case. Not sure if the SDKDeclarations bits is
in the right place, hopefully it is.

Differential Revision: https://phabricator.services.mozilla.com/D134632
2021-12-27 13:00:16 +00:00
Emilio Cobos Álvarez
80f7e0408a Bug 1737831 - Detect whether menu bar is visible at the beginning of fullscreen, and if so don't shift down by menubar height. r=mac-reviewers,mstange
Not sure if there's a better way to do this, but this works on a 2018 mbp with
the "Automatically show and hide the menubar on full screen" setting on and
off.

Differential Revision: https://phabricator.services.mozilla.com/D134624
2021-12-27 12:59:42 +00:00
Emilio Cobos Álvarez
f445abd8f8 Bug 1746951 - Remove no-longer-needed workaround for native menus in dark mode. r=mstange,mac-reviewers
All this was introduced to make native context menus dark if necessary when
widget.macos.respect-system-appearance was false by default in bug 1704102, but
we have since enabled it and removed the preference so this is no longer
needed.

Differential Revision: https://phabricator.services.mozilla.com/D134333
2021-12-27 12:34:22 +00:00
Kagami Sascha Rosylight
a1852f800f Bug 1539884 - Part 35: Mark relevant nsMenuX methods to CAN_RUN_SCRIPT r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D134473
2021-12-23 16:27:25 +00:00
Gijs Kruitbosch
34d4b63832 Bug 1719939 - remove proton pref from static pref list and its last C++ consumer, r=mstange
Depends on D134311

Differential Revision: https://phabricator.services.mozilla.com/D134312
2021-12-22 21:41:41 +00:00
Mike Hommey
d6208c74dc Bug 1029974 - Move frameworks from TK_LIBS to moz.build. r=firefox-build-system-reviewers,mhentges
And remove TK_CFLAGS when applied to mac only.

Differential Revision: https://phabricator.services.mozilla.com/D134460
2021-12-22 03:58:34 +00:00
Emilio Cobos Álvarez
3889e52366 Bug 1745360 - Back out one patch from bug bug 1743600 which was drive-by and apparently not correct in all macOS versions.
MANUAL PUSH: Backout

Differential Revision: https://phabricator.services.mozilla.com/D133887
2021-12-15 13:13:49 +00:00
Markus Stange
f6d6922fd6 Bug 1745649 - Consistently ignore wheel deltas on MayBegin and Cancelled events. r=mac-reviewers,spohl,bradwerth
We're already ignoring them during APZ scroll handling.
Zeroing out the deltas means that we will also ignore them for DOM wheel events.
This is more consistent and works around a bug in macOS 12.1.

Differential Revision: https://phabricator.services.mozilla.com/D133766
2021-12-14 17:52:56 +00:00
Mike Hommey
46f70ede80 Bug 1745131 - Avoid implicit fallthrough in cocoa widget code. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D133332
2021-12-13 22:26:42 +00:00
Makoto Kato
4d166f2519 Bug 1700370 - Don't use ScreenManager after shutdown phase is started. r=gsvelto
When terminating Firefox, if OS notifies screen change, Firefox seems to crash
according to crash data.

So we should consider this situation.

Differential Revision: https://phabricator.services.mozilla.com/D133058
2021-12-09 12:13:28 +00:00
Masayuki Nakano
3816ca9546 Bug 1741148 - part 3: Make users of nsINode::ComputeIndexOf_Deprecated() use nsINode::ComputeIndexOf() if the result is not set to int32_t nor return as int32_t r=smaug
This patch fixes only the cases if the result of `ComputeIndexOf_Deprecated()`
is used as unsigned integer with implicit or explicit cast.

Differential Revision: https://phabricator.services.mozilla.com/D131336
2021-12-09 11:55:36 +00:00
Masayuki Nakano
f2baf0d9ab Bug 1741148 - part 1: Rename nsINode::ComputeIndexOf to ComputeIndexOf_Deprecated r=smaug
It's hard to fix some callers.  Therefore, in this bug, we should fix only
simple cases.  Therefore, we should rename existing API first.

Differential Revision: https://phabricator.services.mozilla.com/D131334
2021-12-09 08:32:30 +00:00
Masayuki Nakano
19439d5e53 Bug 1744907 - Rename all IME log module name to IMEHandler and all keyboard log module name to KeyboardHandler on desktop environment r=m_kato
Currently, log names of IME handlers and keyboard event handlers are considered
from the class names.  However, some of them are older name, and some of them
are for multiple classes.  This is hard to remember when I tell bug reporters
to log the behavior in their environment.  Therefore, I'd like to name all
IME handlers' log module name is `IMEHandler`, and all keyboard handlers'
log module name is `KeyboardHandler`.

Without dumping each key mapping on Windows, the log level `4` (`LogLevel::Debug`)
is enough.  `KeyboardHandler:5` is really noisy on Windows.  So, new logging
preparation becomes:

`MOZ_LOG=IMEHandler:4,sync`
`MOZ_LOG=KeyboardHandler:4,sync`
or
`MOZ_LOG=IMEHandler:4,KeyboardHandler:4,sync`

Differential Revision: https://phabricator.services.mozilla.com/D133183
2021-12-09 02:31:26 +00:00
Emilio Cobos Álvarez
0d7b041298 Bug 1744195 - Centralize XUL state checks in nsNativeTheme::GetContentState. r=mstange
This makes sure that the non-native theme and the native theme agree on
what's e.g. disabled.

Differential Revision: https://phabricator.services.mozilla.com/D133195
2021-12-09 01:11:58 +00:00
Emilio Cobos Álvarez
6c7be5c0ae Bug 1743600 - Use controlBackgroundColor for ButtonFace if controlColor is transparent. r=harry
This is useful because it might be worth it to invert ButtonFace and ButtonText
to provide highlighted appearance or so. See the discussion in D130641.

Depends on D132478

Differential Revision: https://phabricator.services.mozilla.com/D132479
2021-12-08 10:40:26 +00:00
Emilio Cobos Álvarez
0dfd12b34e Bug 1743600 - Use selectedControlTextColor for native buttons on macOS. r=mac-reviewers,spohl
This is drive-by, but looks like the appropriate system colors rather than
hardcoding to white. I've tested this in monterrey but should do the right
thing in older macOS versions too.

Depends on D132477

Differential Revision: https://phabricator.services.mozilla.com/D132478
2021-12-01 18:23:04 +00:00
Emilio Cobos Álvarez
8ce726b6d4 Bug 1743600 - Clean up some cocoa system color code. r=mac-reviewers,harry
No behavior change, but it's a bit less code this way.

Differential Revision: https://phabricator.services.mozilla.com/D132477
2021-11-30 15:08:37 +00:00
Jonathan Watt
9cb86cebb7 Bug 1740421. Fix print-to-PDF on Mac OS X 10.12 (e.g. printing with no printers installed). r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D132372
2021-11-29 14:19:19 +00:00
Nick Alexander
44d7d86ca5 Bug 1740513 - Don't attempt macOS Handoff in headless mode. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D132090
2021-11-24 23:10:35 +00:00
sotaro
4f3833aa2f Bug 1741111 - Remove LayersBackend::LAYERS_BASIC r=gfx-reviewers,bradwerth
LayersBackend::LAYERS_BASIC is not used any more.

Differential Revision: https://phabricator.services.mozilla.com/D131104
2021-11-17 22:05:47 +00:00