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

32454 Коммитов

Автор SHA1 Сообщение Дата
Andrew Osmond 8f25da9554 Bug 1873996 - Block optional features by default for wildcard/unspecified gfx blocklist entries. r=jrmuizel
Downloadable blocklist entries did not have an explicit way to declare a
rule to affect all features prior to this patch. Instead they would
leave the "feature" attribute unset, which defaults us to
GfxDriverInfo::allFeatures. Now if it is unset, it defaults to
GfxDriverInfo::optionalFeatures. There are also explicit wildcard
feature strings, ALL and OPTIONAL respectively.

Differential Revision: https://phabricator.services.mozilla.com/D198193
2024-01-11 00:34:57 +00:00
Emilio Cobos Álvarez 3a54b24c9b Bug 1872997 - [cocoa] Don't trigger mouseenter/leave events for windows that ignore mouse events. r=mac-reviewers,mstange
In the patches above, we make some tooltips (which ignore mouse events)
actually overlap the mouse. That should be fine (and is fine on other
platforms) but Cocoa still sends mouseenter/leave events which confuse
the front-end.

This fixes that.

Differential Revision: https://phabricator.services.mozilla.com/D197905
2024-01-10 22:51:28 +00:00
Sam Johnson d1dacbb26c Bug 1871514 - Improve macOS control colors. r=mac-reviewers,emilio
Instead of NSColor.textColor, use NSColor.controlTextColor, which is the color observed in native controls.

When these values were originally selected in bug 517412, the system colors were the same, but they have since diverged.

Differential Revision: https://phabricator.services.mozilla.com/D197125
2024-01-10 22:22:52 +00:00
Jeff Muizelaar a1ee18724c Bug 1853986. Let "Don't translate new lines for IME" ride to release. r=masayuki
This is a minimal version. The corresponding code cleanup will
be done in a follow up.

Differential Revision: https://phabricator.services.mozilla.com/D198045
2024-01-10 18:53:21 +00:00
Ray Kraesig 10f48af9e0 Bug 1873764 - [1/1] Add nsAppShell:EventID as an explicitly recognized message r=win-reviewers,mhowell
Add the important internal event "nsAppShell:EventID" to the profiler.

Differential Revision: https://phabricator.services.mozilla.com/D198090
2024-01-10 00:31:06 +00:00
Ray Kraesig ef6ce7eb57 Bug 1872397 - [2/2] Refactor to eliminate nested pseudonamespace struct r=win-reviewers,mhowell
As much as I like the "all-static uninstantiable struct" projection of
Rust-style modules, they're an unnecessary weirdness in C++.

Shuffle the code around to just use a collection of nested namespaces.

No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D197627
2024-01-09 22:36:18 +00:00
Ray Kraesig 77e1f0576a Bug 1872397 - [1/2] Add telemetry for in-process file-picker fallback r=win-reviewers,mhowell
Add a new Glean event for the out-of-process file-dialog, marking when
it breaks and forces us to fall back to the existing in-process
behavior.

This creates a new nested pseudo-namespace struct, which is just weird
enough that it probably needs to be replaced with a true namespace. That
will be done in the next commit.

Differential Revision: https://phabricator.services.mozilla.com/D197626
2024-01-09 22:36:17 +00:00
Stanca Serban c9bbde88a4 Backed out 2 changesets (bug 1872397) for causing build bustages in nsFilePicker.cpp. CLOSED TREE
Backed out changeset 199101385cfb (bug 1872397)
Backed out changeset 393815a4d499 (bug 1872397)
2024-01-09 23:24:14 +02:00
Ray Kraesig 57ffe819df Bug 1872397 - [2/2] Refactor to eliminate nested pseudonamespace struct r=win-reviewers,mhowell
As much as I like the "all-static uninstantiable struct" projection of
Rust-style modules, they're an unnecessary weirdness in C++.

Shuffle the code around to just use a collection of nested namespaces.

No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D197627
2024-01-09 20:36:33 +00:00
Ray Kraesig 97ad91fe45 Bug 1872397 - [1/2] Add telemetry for in-process file-picker fallback r=win-reviewers,mhowell
Add a new Glean event for the out-of-process file-dialog, marking when
it breaks and forces us to fall back to the existing in-process
behavior.

This creates a new nested pseudo-namespace struct, which is just weird
enough that it probably needs to be replaced with a true namespace. That
will be done in the next commit.

Differential Revision: https://phabricator.services.mozilla.com/D197626
2024-01-09 20:36:33 +00:00
Emilio Cobos Álvarez d55d0f229d Bug 1869796 - Make xul alert windows have the appropriate type hint. r=stransky
Before bug 1869796 they had an utility type hint, now they have a
toplevel type hint, after the patch they have a notification type hint,
which seems more appropriate.

Differential Revision: https://phabricator.services.mozilla.com/D197872
2024-01-09 12:38:33 +00:00
stransky ebb249d65e Bug 1743144 [Wayland] Implement Wayland proxy r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D196554
2024-01-09 12:25:01 +00:00
Natalia Csoregi b7ba987ae4 Backed out changeset 51d87c2129d2 (bug 1865372) for causing RunWatchdog crashes in test_fullscreen_modal.html. CLOSED TREE 2024-01-09 01:41:58 +02:00
Andrew Osmond 21e833985f Bug 1873541 - Convert gfx blocklist entries for all features to subset excluding likely safe set. r=jrmuizel
This patch makes it so that we avoid blocking all features with the
blocklist, and instead continue to allow the safe subset proscribed by
GfxInfoBase::OnlyAllowFeatureOnKnownConfig. Any feature allowed in an
unknown configuration should be allowed in a blanket blocklist entry,
unless we know for a fact that we need to also block them.

Differential Revision: https://phabricator.services.mozilla.com/D197963
2024-01-08 21:30:06 +00:00
Natalia Csoregi b2289eef93 Backed out changeset 9c4ce17422de (bug 1867360) for causing crashes on PRemoteQuotaObjectChild. CLOSED TREE 2024-01-08 23:18:19 +02:00
Nika Layzell c4aa6e4813 Bug 1867360 - Require toplevel protocols to specify which processes they expect to be bound in, r=decoder,ipc-reviewers,necko-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,aosmond,rkraesig,mccr8,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D195485
2024-01-08 19:48:23 +00:00
Emilio Cobos Álvarez 59b776ccd4 Bug 1872997 - Remove "fit to screen" code in cocoa widget. r=mac-reviewers,bradwerth
No other platform does this. This comes from bug 413277, but positioning
windows (in particular popups) partially offscreen is desirable in some
cases (e.g., when drawing non-native shadows).

We have protections in place to prevent content from doing things like
what caused this code to be added.

Remove a cocoa-specific test for this, and tweak another test which has
a dependent window opened from an offscreen window, and the offscreen
window positioning happens right after the load event.

The window ends up on screen even without that tweak.

Differential Revision: https://phabricator.services.mozilla.com/D197903
2024-01-08 19:46:13 +00:00
Iulian Moraru 4f13b132e2 Backed out changeset 11bda0f9d0fc (bug 1872997) for causing mochitest-chrome failures on test_bug413277.html. CLOSED TREE 2024-01-08 21:33:33 +02:00
Emilio Cobos Álvarez 96d98fbb70 Bug 1872997 - Remove "fit to screen" code in cocoa widget. r=mac-reviewers,bradwerth
No other platform does this. This comes from bug 413277, but positioning
windows (in particular popups) partially offscreen is desirable in some
cases (e.g., when drawing non-native shadows).

We have protections in place to prevent content from doing things like
what caused this code to be added.

Differential Revision: https://phabricator.services.mozilla.com/D197903
2024-01-08 18:15:20 +00:00
Brad Werth f11bb5ff7a Bug 1865372: Call nsCocoaWindow::DestroyNativeWindow unconditionally in Destroy. r=mac-reviewers,mstange
This seems like the right time to call DestroyNativeWindow since we are
hiding the window and destorying the nsBaseWidget -- there's not much
else that can happen to this window. Making this call here ensures that
the native window is not maintained on the screen waiting for the
destructor to be called during garbage collection.

Differential Revision: https://phabricator.services.mozilla.com/D197214
2024-01-08 17:47:58 +00:00
Emilio Cobos Álvarez ec695c5797 Bug 1869796 - Minor nsWindow clean-ups. r=stransky
nsBaseWidget already stores these / exposes IsPIPWindow().

Differential Revision: https://phabricator.services.mozilla.com/D197866
2024-01-08 09:55:58 +00:00
Emilio Cobos Álvarez fec5def690 Bug 1871535 - Use a less opaque check color for dark disabled checkboxes. r=spohl
On a darker background this should be fine.

Differential Revision: https://phabricator.services.mozilla.com/D197875
2024-01-08 08:00:37 +00:00
Andrew Osmond 7ac76ab68e Bug 1868737 - Allow minimal gfx features by default for uncertain configurations. r=jrmuizel,perftest-reviewers,kshampur
Some features such as the GPU process (except on Android), backdrop
filter (because it always works with Software WebRender), ANGLE (because
it is generally good) and out of process WebGL (we generally want to
remote WebGL for sandboxing purposes) are special, and should not be
disabled simply because we are uncertain about our configuration. In
these situations, disable most features, but keep these enabled by
default.

Differential Revision: https://phabricator.services.mozilla.com/D197595
2024-01-05 22:23:25 +00:00
Mark Banner dca85f4f1b Bug 1873158 - Update ESLint related modules to their latest versions. r=mossop,aminomancer,devtools-reviewers,reusable-components-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D197765
2024-01-05 19:52:08 +00:00
stransky 0574d0cdc4 Bug 1872961 [Linux] Use pointer cursor for hyperlinks r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D197645
2024-01-05 08:41:15 +00:00
stransky c4d7bddfc3 Bug 1872963 [Linux] Add FreeDesktopPortal to wake lock names r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D197646
2024-01-05 08:41:05 +00:00
Emilio Cobos Álvarez ec1ddfebcd Bug 1872983 - Restore behavior of -moz-window-shadow: auto and appearance: none. r=dholbert
Before the first part of bug 1872399, that would use
WindowShadow::Default, which didn't create a vibrant effect etc, which
causes the background here.

Make it more explicit by calling this "Panel". The second part of
bug 1872399 already did this.

Differential Revision: https://phabricator.services.mozilla.com/D197648
2024-01-04 23:47:54 +00:00
Stanca Serban 2c85dc0395 Backed out changeset 03a4fbacc768 (bug 1868737) for causing talos performance tests related failures. CLOSED TREE 2024-01-05 02:17:01 +02:00
Andrew Osmond 9ad36620d3 Bug 1868737 - Allow minimal gfx features by default for uncertain configurations. r=jrmuizel
Some features such as the GPU process (except on Android), backdrop
filter (because it always works with Software WebRender), ANGLE (because
it is generally good) and out of process WebGL (we generally want to
remote WebGL for sandboxing purposes) are special, and should not be
disabled simply because we are uncertain about our configuration. In
these situations, disable most features, but keep these enabled by
default.

Differential Revision: https://phabricator.services.mozilla.com/D197595
2024-01-04 19:08:42 +00:00
stransky 835b4b8a8c Bug 1865121 [Linux] Restrict dmabuf surface plane count r=emilio
- Don't release dmabuf with incorrect plane count
- Don't save incorrect plane count to dmabuf surface

Differential Revision: https://phabricator.services.mozilla.com/D194041
2024-01-03 17:04:16 +00:00
Jordan Petridis 5dfa42970a Bug 1871863 - Port from GdkCursorType to gdk_cursor_new_from_name. r=rmader,stransky
adwaita-icon-theme, GNOME's and GTK's default icon theme dropped
legacy X cursors recently [1] which is expected to be released with
GNOME 46. When running firefox now some of the cursors are unable to be
created and end up blank with a handful of gtk warnings.

The reason for this, is due to Firefox using the old GdkCursorType
api which doesn't guarantee the cursors requested will exist.
This is mostly legacy code from the gtk2 backend.
gdk_cursor_new_from_name (from gtk3 and onwards) can create all
the cursors firefox wants (and it's also using the same CSS3/4
conventions that firefox does intenrally).

GdkCursorType has also been dropped in GTK 4 and this patch should
help with porting the code too.

[1] https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/merge_requests/61

Differential Revision: https://phabricator.services.mozilla.com/D197272
2024-01-03 14:14:27 +00:00
Edgar Chen f9dcb72748 Bug 1871424 - Make input checkbox/radio in link element work again; r=vhilla,dom-core
The root cause of issue is that the link elements have not yet adopted the
activation behavior defined in the specification. This patch add a hacky way to
avoid link elements perform activation behavior if it has a child input element
which will perform activation behavior. This patch introduces new flags instead of
reusing the exiting ones, allowing us to uplift this patch more safely.

Differential Revision: https://phabricator.services.mozilla.com/D197393
2024-01-02 15:52:25 +00:00
Mike Hommey b9e458fffa Bug 1746715 - Add the GDK wayland symbols to the mozwayland library. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D197351
2024-01-02 10:28:48 +00:00
Jon Parise 3b5280be4f Bug 1872505 - Use NSString in InsertText* paths. r=m_kato
The InsertText* code paths required an NSAttributedString instance but
only ever used their NSString representation. Callers nearly always have
an NSString, so this results in a lot of unnecessary NSAttributedString
allocations to satisfy this interface.

The primary caller is [ChildView insertText:replacementRange:], which
can receive either an NSString or an NSAttributedString string from the
NSTextInputClient protocol, but this is usually (always?) an NSString in
practice.

We can instead change these methods to receive NSString, simplifying the
callers and removing a bunch of short-lived NSAttributedString objects.

Differential Revision: https://phabricator.services.mozilla.com/D197451
2024-01-02 08:37:26 +00:00
Sam Johnson b47354dd67 Bug 1871612 - Improve non-native theme tooltips on macOS. r=emilio
After bug 1696988, the non-native theme can draw tooltips on macOS in some scenarios such as about:preferences. The non-native theme draws a rounded rectangle with a border that is the same color as the text, which looks pretty out-of-place on macOS--tooltips on macOS do not have rounded corners, and the border is subtle compared to the text color.

However, after bug 1871507, the window server is drawing both the correct background and border for the tooltip already. The non-native theme no longer needs to draw any background or border for tooltips on macOS.

Differential Revision: https://phabricator.services.mozilla.com/D197299
2024-01-01 09:50:27 +00:00
Emilio Cobos Álvarez 35c465dca0 Bug 1872399 - Clean-up -moz-window-shadow set-up. r=dholbert
-moz-window-shadow is a chrome-only property (not exposed to the web),
and chrome stylesheets only use the none value to disable the default
behavior.

Split the style property (default/none) from the actual widget behavior.
This is useful because I want to add a distinction between
natively-styled menupopups and other panels in the following commit.

While at it rename default to "auto" which is a more common name in CSS
for something like this.

We have no use case for removing the shadow of a top-level window, so
remove it to simplify the code.

Differential Revision: https://phabricator.services.mozilla.com/D197454
2023-12-31 21:53:32 +00:00
Sam Johnson 593c49fa81 Bug 1872325 - Reduce macOS menupopup border radius. r=emilio,desktop-theme-reviewers
The macOS menupopup corner radius was recently changed from 4px to 8px, but that does not quite match the system, which measures at 6px.

Differential Revision: https://phabricator.services.mozilla.com/D197408
2023-12-29 05:46:33 +00:00
Nicholas Rishel 8da57e8a7c Bug 1870757 - Add image placement attribute to `nsIWindowsAlertNotification`. r=nalexander,mhughes
Adds option to specify Windows toast image placement for notifications popped from the system principal.

Differential Revision: https://phabricator.services.mozilla.com/D197029
2023-12-27 21:49:33 +00:00
Nicholas Rishel 1b54a6abf3 Bug 1870754 - Initialize gfx when popping a notification from a background task. r=nalexander,mhughes
This prevents a failed debug assertion in the image decoder due to color management attempting to initialize off the main thread. This is only an issue for debug builds, release builds instead return an error in color management initialization and otherwise continue on to decode the image correctly.

Differential Revision: https://phabricator.services.mozilla.com/D197028
2023-12-27 21:49:33 +00:00
Nicholas Rishel ae82f4c39e Bug 1871210 - Extend `AlertNotification` with `WindowsAlertNotification` for custom handling of alert buttons on Windows. r=nalexander,mhughes
When `nsIWindowsAlertNotification`'s `handleActions` property is set to true, actions are sent in the notification observer's `aData` field instead of the notification cookie.

Differential Revision: https://phabricator.services.mozilla.com/D196613
2023-12-27 21:49:32 +00:00
Emilio Cobos Álvarez bab2e723d2 Bug 1871030 - Improve how macOS non-native menupopups look. r=desktop-theme-reviewers,mac-reviewers,dao,bradwerth
Give them the same radius as on Linux, which matches the OS more closely.

Differential Revision: https://phabricator.services.mozilla.com/D196960
2023-12-26 11:24:55 +00:00
Sam Johnson 9e320eb3bc Bug 1871507 - Native-looking tooltips for macOS. r=desktop-theme-reviewers,emilio
Native tooltips, menus, and other opaque windows on macOS receive a border from the window server, which greatly improves their appearance with dark mode. Borderless windows, such as popups, do not receive this treatment by default. However, we have been receiving this treatment for non-native menupopups by setting an effect view wrapper as the window's content view. Extending this logic to also support tooltips allows the window server to provide the appropriate border for them as well.

macOS also provides some additional padding to native tooltips, so I have updated this as well.

Differential Revision: https://phabricator.services.mozilla.com/D197122
2023-12-26 10:24:18 +00:00
Andrew Osmond b77093ae01 Bug 1871859 - Ensure DMABUF calls MakeCurrent before creating EGLImage objects. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D197270
2023-12-25 17:37:10 +00:00
Stephen A Pohl f666401558 Bug 1870924: Prevent crashes when trying to access the menu bar in headless mode. r=mac-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D197212
2023-12-23 06:52:28 +00:00
Sandor Molnar 7e131cc523 Backed out changeset d95b94d4f547 (bug 1871514) for causing wpt failures at /css/css-color/deprecated-sameas CLOSED TREE 2023-12-23 05:04:26 +02:00
Sam Johnson 9ee10ec03e Bug 1871514 - Improve macOS control colors. r=mac-reviewers,bradwerth
Instead of NSColor.textColor, use NSColor.controlTextColor, which is the color observed in native controls.

When these values were originally selected in bug 517412, the system colors were the same, but they have since diverged.

Differential Revision: https://phabricator.services.mozilla.com/D197125
2023-12-22 20:30:57 +00:00
Ray Kraesig 50c943690c Bug 1869053 - [5/5] templatize and further simplify AgileReference r=handyman,win-reviewers
Lift `aIid` to compile-time, as a template parameter `InterfaceT`. This
simplifies the common case for using `Resolve()`, where the desired and
supplied interfaces are the same. (For the as-yet-unattested case where
they're not, retain the old functionality by means of a small family of
`ResolveAs()` functions.)

Additionally, to eliminate a swath of custom logic and magic-number
choices surrounding `mHResult`, eliminate `mHResult` itself as well.
Instead, since its value was derived from the creation of the underlying
`IAgileReference`, any callers that might care can acquire it as an
additional return value from a named-constructor function.

These collectively trim `AgileReference`'s footprint down to a single
`RefPtr`, with all its special member functions having only default
implementations.

Differential Revision: https://phabricator.services.mozilla.com/D196513
2023-12-21 19:46:55 +00:00
Ray Kraesig 3e45fd349e Bug 1869053 - [3/5] simplify use of AgileReference in IAudioSessionControl r=handyman,win-reviewers
The documentation for AgileReference previously suggested instantiating
it within a UniquePtr. However, this isn't necessary or helpful in most
contexts.

Streamline the one place where this was done.

Differential Revision: https://phabricator.services.mozilla.com/D196366
2023-12-21 19:46:55 +00:00
Ray Kraesig 149e60c039 Bug 1869053 - [2/5] eliminate all implicit conversions between RefPtr and AgileReference r=handyman,win-reviewers
Remove all of the code in `RefPtr` and `AgileReference` that allowed
for implicitly converting between the two in via constructors or the
assignment operator.

Replace these with a slightly-less-convenient-but-substantially-more-
explicit `Resolve` function family.

(This also eliminates the dependency that `class RefPtr` had on
`class AgileReference`.)

Differential Revision: https://phabricator.services.mozilla.com/D196365
2023-12-21 19:46:54 +00:00
stransky 1f29b25d99 Bug 1859222 [Linux] Allow zero inhibit token r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D195762
2023-12-21 12:54:34 +00:00