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

32587 Коммитов

Автор SHA1 Сообщение Дата
Ray Kraesig 95a4a89b15 Bug 1879608 - [1/1] also manually disable the root window when opening a file-dialog r=win-reviewers,handyman
Eliminate a possible race-condition wherein multiple file-dialogs fight
over disabling the root window, possibly reenabling it early.

Differential Revision: https://phabricator.services.mozilla.com/D201775
2024-02-20 16:37:09 +00:00
Gijs Kruitbosch ff17e7fc68 Bug 1780071 - Manual fixes/disabling of no-comparison-or-assignment-inside-ok for exceptional cases, r=Standard8,devtools-reviewers,anti-tracking-reviewers,places-reviewers,dom-storage-reviewers,pbz,asuth,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D198979
2024-02-19 23:30:40 +00:00
stransky 02ba212707 Bug 1880501 [Linux] Save screen bounds when mGdkWindow is deleted r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D202053
2024-02-19 22:55:54 +00:00
stransky 9982a76fe9 Bug 1877022 [Wayland] Don't switch away from native wake lock inhibitor r=emilio
Better to try inhibit native wake lock again that to switch to Unsupported one and disable it at all.

Differential Revision: https://phabricator.services.mozilla.com/D201709
2024-02-19 22:17:16 +00:00
Gijs Kruitbosch 6168506717 Bug 1780071 - autofix violations of no-comparison-or-assignment-inside-ok in misc other folders r=webdriver-reviewers,necko-reviewers,sync-reviewers,profiler-reviewers,sgalich,whimboo,markh,kershaw,julienw
Differential Revision: https://phabricator.services.mozilla.com/D198978
2024-02-19 21:47:41 +00:00
Emilio Cobos Álvarez 7758e3494a Bug 1880394 - Give the icon to the dialog window class, and revert bug 1880226. r=win-reviewers,handyman
This is to be landed after the merge. I think this is better / more
consistent, and avoids relying on mis-documented window style flags in
MSDN.

Differential Revision: https://phabricator.services.mozilla.com/D201894
2024-02-19 10:15:00 +00:00
Makoto Kato 151afcc1c9 Bug 1880439 - Add contextmenu event tests that are generated by widget. r=masayuki
We don't have any tests with `ui.context_menus.after_mouseup` for GTK. So we
should add it using native mouse methods.

Differential Revision: https://phabricator.services.mozilla.com/D201972
2024-02-16 06:22:12 +00:00
Jan Horak d9d7ace23b Bug 1786251 Add support for drop file portal; r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D198137
2024-02-15 12:52:12 +00:00
Emilio Cobos Álvarez aba7e22f9b Bug 1880226 - Approach 1: Keep WS_EX_DLGMODALFRAME for dialogs. r=win-reviewers,rkraesig
This restores the behavior pre-patch.

Bug 1878037 removed this flag because it didn't affect borders, as
documented in MSDN:

  https://learn.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles

But apparently it has other side effects like suppressing the icon (?).

Differential Revision: https://phabricator.services.mozilla.com/D201889
2024-02-14 22:31:27 +00:00
Greg Stoll 143dc3245c Bug 1879182 - add a pref to make Content Analysis allow by default r=handyman
This will make DLP requests return Allow if the agent is not present or returns an error.

Differential Revision: https://phabricator.services.mozilla.com/D201277
2024-02-14 16:10:53 +00:00
Makoto Kato dafa6009d9 Bug 1878599 - Allow to insert text on text control from dropping external application on Geckoview. r=masayuki,geckoview-reviewers,owlish
Android's drag and drop API will set a dropped item on `drop` event. But other
platforms will be set during `dragstart` event.

Editor's drag and drop event listener checks current dropped item on some
events such as `dragover` event in
`EditorEventListener::DragEventHasSupportingData`. Since there is no way to
set dropped item on `dragover` event, GeckoView will set temporary dropped
item with MIME type.

Differential Revision: https://phabricator.services.mozilla.com/D200618
2024-02-14 00:58:48 +00:00
Greg Stoll 6b9e711a99 Bug 1871135 - Add content analysis support to clipboard operations r=edgar,nika,masayuki,devtools-reviewers
When content analysis is on, pastes will be checked by the CA
agent while tab input is blocked. The synchronous nsIClipboard.getData()
method must block until the analysis result is received, so this
requires doing a SpinEventLoopUntil.

Differential Revision: https://phabricator.services.mozilla.com/D196997
2024-02-13 11:26:48 +00:00
stransky 14f0dfe004 Bug 1875369 [Linux] Don't call gdk_window_get_toplevel() with nullptr GdkWindow r=emilio
Depends on D200272

Differential Revision: https://phabricator.services.mozilla.com/D201382
2024-02-13 09:15:34 +00:00
stransky 6eeb6c8e7f Bug 1875369 [Linux] Get renderer again after WillPaintWindow() r=emilio
WillPaintWindow() spins event loop which can lead to any action related to nsWindow - it can be hid, shown or destroyed.
If the nsWindow visibility is changed, compositor/renderer is deleted and we need to get it again.

Differential Revision: https://phabricator.services.mozilla.com/D200272
2024-02-13 09:15:34 +00:00
stransky 68c3134ed5 Bug 1875369 [Wayland] Set/unset IMContextWrapper GdkWindow when it's mapped/unmapped so we use valid GdkWindow r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D200271
2024-02-13 09:15:33 +00:00
stransky 3de34039e7 Bug 1875369 [Wayland] Create IMContextWrapper without GdkWindow and allow to update/delete GdkWindow r=emilio
nsWindow::mGdkWindow is set/reset when nsWindow becomes visible/invisible so we need to update GdkWindow in IMContextWrapper according to it.

Differential Revision: https://phabricator.services.mozilla.com/D200270
2024-02-13 09:15:33 +00:00
stransky c5eb881965 Bug 1875369 [Wayland] Restring gtk_widget_get_window() usage r=emilio
- Remove gtk_widget_get_window() where it's possible and use mGdkWindow directly.
- Check gtk_widget_get_window() return values to ensure we don't use null GdkWindow.

Differential Revision: https://phabricator.services.mozilla.com/D200269
2024-02-13 09:15:33 +00:00
stransky efb19139f3 Bug 1875369 [Linux] Don't set mGdkWindow at GetCompositorWidgetInitData() r=emilio
We can't set mGdkWindow at GetCompositorWidgetInitData() is window is unmapped. Rather we provide null XWindow and disable rendering and update XWindow afer OnMap event.

Differential Revision: https://phabricator.services.mozilla.com/D200268
2024-02-13 09:15:32 +00:00
stransky 1288a77c14 Bug 1875369 [Wayland] Hide window first before any resources release at nsWindow::Destroy() r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D199088
2024-02-13 09:15:32 +00:00
stransky b22c7a28cf Bug 1875369 [Wayland] Remove nsWindow::OnUnrealize handler as it's handled by MozContainer now r=emilio
Clear mGdkWindow from DisableRendering() handler and remove nsWindow::OnUnrealize().

Differential Revision: https://phabricator.services.mozilla.com/D199087
2024-02-13 09:15:31 +00:00
stransky 9864ea8015 Bug 1875369 [Wayland] Make sure MozContainer is unmapped before unrealize r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D199086
2024-02-13 09:15:31 +00:00
stransky 6e13ee113b Bug 1875369 [Wayland] Handle unmap signals from MozContainer r=emilio
- Unmap MozContainer from it's unmap handler and don't use mShell handler for it
- Disable rendering to MozContainer before we unmap it

Differential Revision: https://phabricator.services.mozilla.com/D199085
2024-02-13 09:15:31 +00:00
stransky dd0f06ca36 Bug 1875369 [Wayland] Don't mark popup as mapped in map-event r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D199032
2024-02-13 09:15:30 +00:00
Emilio Cobos Álvarez d8e936e706 Bug 1879386 - Make sure we respect the "must use light colors" bit in non-native theme drawing. r=morgan
This seems hard to reliably test... Basically, this forces all windows
HCM to use "light" system colors for non-native drawing, the same way we
do for system color resolution.

Differential Revision: https://phabricator.services.mozilla.com/D201205
2024-02-12 20:12:39 +00:00
Emilio Cobos Álvarez c2d17fe6cf Bug 1878623 - Clean up some windows popup code. r=win-reviewers,rkraesig
We no longer have non-transparent popups nor set the window region to
get clipping, instead rendering our own shadows and decorations, so this
code is just not needed anymore.

Depends on D200508

Differential Revision: https://phabricator.services.mozilla.com/D200612
2024-02-12 19:45:49 +00:00
Emilio Cobos Álvarez f56dca9254 Bug 1878037 - Fix some regressions on alert windows. r=saschanaz,win-reviewers,rkraesig
Bug 1870512 removed top level windows with WindowType::Popup, instead
replacing it with an "alert" feature for the only use of them that we
had.

Turns out that on Windows they need a bit more special handling than I
thought, so this patch uses the alert boolean to fix two regressions
(that alerts now create taskbar icons, and that they steal focus).

Remove mIsForMenuPopupFrame since that is now a synonym with
WindowType::Popup.

Remove also the dialog vs. toplevel difference of using
WS_EX_DLGMODALFRAME, since that doesn't seem to have an effect at all on
windows 10+.

Differential Revision: https://phabricator.services.mozilla.com/D200508
2024-02-12 19:45:48 +00:00
Cristian Tuns 2b828fa42e Backed out changeset 9dfe3fe4ccc5 (bug 1871135) for causing mochitest failures in nsClipboardProxy.cpp CLOSED TREE 2024-02-12 12:04:41 -05:00
Greg Stoll cbb35c98d7 Bug 1871135 - Add content analysis support to clipboard operations r=edgar,nika,masayuki,devtools-reviewers
When content analysis is on, pastes will be checked by the CA
agent while tab input is blocked. The synchronous nsIClipboard.getData()
method must block until the analysis result is received, so this
requires doing a SpinEventLoopUntil.

Differential Revision: https://phabricator.services.mozilla.com/D196997
2024-02-12 16:05:06 +00:00
Cristian Tuns ea5dd880a4 Backed out changeset 3caca1d10dcc (bug 1871135) for causing build bustages in nsBaseClipboard.cpp CLOSED TREE 2024-02-12 09:59:09 -05:00
Greg Stoll 5a2f92686a Bug 1871135 - Add content analysis support to clipboard operations r=edgar,nika,masayuki,devtools-reviewers
When content analysis is on, pastes will be checked by the CA
agent while tab input is blocked. The synchronous nsIClipboard.getData()
method must block until the analysis result is received, so this
requires doing a SpinEventLoopUntil.

Differential Revision: https://phabricator.services.mozilla.com/D196997
2024-02-12 00:49:39 +00:00
Perry McManis 42245a5b45 Bug 1877576 - Migrate geckoview GVST probes r=geckoview-reviewers,perry.mcmanis,owlish
Most are brought over straightforwardly, their Telemetry callsites reworded
to use Glean, with mirroring to the Telemetry probes taken care of by the Glean
Interface For Firefox Telemetry (see the telemetry_mirror property).

There were some special cases:
* HistogramStopwatch becomes GleanStopwatch.
  After migration it was only serving Glean consumers.
  Could've used standard Glean APIs, but having something to hold the TimerIds
  was convenient.
* GV_STARTUP_MODULES_MS was removed.
  It was configured to only report for the `firefox` product,
  but could only have a value in `geckoview_streaming`,
  so never reported data.
* MEDIA_DECODING_PROCESS_CRASH was removed.
  It was configured to only report for the `firefox` product,
  but could only have a value in `geckoview_streaming`,
  so never reported data.
* GV_CONTENT_PROCESS_LIFETIME_MS was removed.
  It was configured to only report for the `geckoview_streaming` product,
  meaning it only reported data when used with GVST to reach the Glean
  `geckoview.content_process_lifetime` metric.
  This is now accomplished directly.
* GV_STARTUP_RUNTIME_MS was removed.
  Though it was configured to report data for both `firefox` and
  `geckoview_streaming` products, it only ever had values in geckoview.
  Its data continues to be reported via `geckoview.startup_runtime`.
* gecko.version and gecko.build_id (Scalars) were removed.
  In Firefox Desktop this information is available in the `application`
  section of the Environment.
  In geckoview-using products, this information continues to be available via
  `geckoview.version` and `geckoview.build_id`.
* GV_STARTUP_RUNTIME_MS and GV_CONTENT_PROCESS_LIFETIME_MS are handled oddly.
  Since those probes were recorded in the Java portion of the code,
  and that portion doesn't include Glean,
  we use `nativeAddHistogram` to relay the samples for those two pieces of
  instrumentation.
  If there will be more instrumentation landing in that part of the code,
  I recommend you review the instructions for including the Glean SDK in a
  library, and retire this use of JNI.

Differential Revision: https://phabricator.services.mozilla.com/D200094
2024-02-09 21:11:05 +00:00
Ray Kraesig ce69dffea0 Bug 1878568 - [2/2] Eliminate WindowEnabler r=win-reviewers,yjuglaret
Eliminate `WindowEnabler` by folding it into `nsWindow::PickerOpen()`
and `nsWindow::PickerClosed()`. This avoids the implicit assumption that
multiple instances are created and destroyed in LIFO order.

Differential Revision: https://phabricator.services.mozilla.com/D200742
2024-02-08 17:34:47 +00:00
Ray Kraesig 9a8c352c8e Bug 1878568 - [1/2] Drive-by cleanup: simplify AutoWidgetPickerState r=win-reviewers,yjuglaret
Remove an unnecessary member function from AutoWidgetPickerState.

Additionally, use a safer method of getting the underlying nsWindow than
`static_cast`, and add some thread-safety assertions in
nsWindow::Picker{Open,Closed}().

No functional changes on the happy path.

Differential Revision: https://phabricator.services.mozilla.com/D200741
2024-02-08 17:34:47 +00:00
Makoto Kato c9632a4180 Bug 1878793 - Some drag events aren't fired on xorigin frame. r=botond
This is a regression by bug 1586471.

We should use ReceiveInputEvent for all drag events on desktop.

Also, GV issue is bug 1878819 since we have to consider more when APZ
controller thread and main thread are different. But GV doesn't turn
on fission yet.

And, there is no way to add tests for native drag and drop operations.

Differential Revision: https://phabricator.services.mozilla.com/D200783
2024-02-08 02:36:23 +00:00
Kelsey Gilbert 34cdfc4f86 Bug 1874226 - Use unique_ptr not Scoped in xpcom/*. r=xpcom-reviewers,necko-reviewers,valentin,emilio
Differential Revision: https://phabricator.services.mozilla.com/D200250
2024-02-07 18:30:22 +00:00
Masayuki Nakano 8b02ebad10 Bug 1878224 - Put it off to load keyboard layout when first needed r=m_kato
As far as I've tested on Win 11, we can put it off to load it when first needed
of the keyboard layout data.  `ToUnicodeEx` API changes the dead key state and
it's called a lot in `KeyboardLayout::LoadLayout`, however, this patch does
not newly call `LoadLayout` after `TranslateMessage` API at least while handling
a key message.  Therefore, this should be safe but regressions of this change
could be serious, so this makes it enabled only in early beta and earlier for
now.

Differential Revision: https://phabricator.services.mozilla.com/D200600
2024-02-07 00:24:16 +00:00
Brad Werth b4e4ce39b0 Bug 1877749: Prevent nsCocoaWindow from forgetting transitions during transitory window rebuilds. r=mstange
DestroyNativeWindow() is called for permanent window destruction, but it
is also called for transitory window recreated in HideWindowChrome().
When the nsCocoaWindow itself is also expected to be destroyed, it's
useful to clear out transitions. But when the nsCocoaWindow is expected
to persist (with a new mWindow instance), it's unhelpful to clear the
transitions, because emulated fullscreen relies on transition
continuity.

This change further simplifies DestroyNativeWindow so it does only the
bare-minimum, always-needed things before forgetting mWindow and its
delegate. The higher-level concern of clearing out transitions is
factored out into a new function CancelAllTransitions, which is invoked
by callers when appropriate.

Differential Revision: https://phabricator.services.mozilla.com/D200215
2024-02-06 21:59:44 +00:00
Stanca Serban 1299ff59c9 Backed out changeset 26e3ad3bf78e (bug 1878224) for causing build bustages. CLOSED TREE 2024-02-06 11:45:20 +02:00
Masayuki Nakano 074fc85b24 Bug 1878224 - Put it off to load keyboard layout when first needed r=m_kato
As far as I've tested on Win 11, we can put it off to load it when first needed
of the keyboard layout data.  `ToUnicodeEx` API changes the dead key state and
it's called a lot in `KeyboardLayout::LoadLayout`, however, this patch does
not newly call `LoadLayout` after `TranslateMessage` API at least while handling
a key message.  Therefore, this should be safe but regressions of this change
could be serious, so this makes it enabled only in early beta and earlier for
now.

Differential Revision: https://phabricator.services.mozilla.com/D200600
2024-02-06 05:13:00 +00:00
Cosmin Sabou 66d12d2fff Backed out 2 changesets (bug 1874226) for causing bustages on dom/ContentParent.h. CLOSED TREE
Backed out changeset 3efd59369cd6 (bug 1874226)
Backed out changeset cd7b0bd12dae (bug 1874226)
2024-02-06 03:08:23 +02:00
Kelsey Gilbert c9e48e76b7 Bug 1874226 - Use unique_ptr not Scoped in xpcom/*. r=xpcom-reviewers,necko-reviewers,valentin,emilio
Differential Revision: https://phabricator.services.mozilla.com/D200250
2024-02-06 00:21:43 +00:00
Tom Ritter bee451eb90 Bug 1826412: Move the Linux Distro stuff to nsIGfxInfo also r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D200390
2024-02-05 21:19:16 +00:00
Tom Ritter 36666160c6 Bug 1826412: Rip out all the ugly and move it to nsIGfxInfo r=jfkthame,fluent-reviewers,flod
This also adds debug information to about:support

Differential Revision: https://phabricator.services.mozilla.com/D200388
2024-02-05 21:19:16 +00:00
Sandor Molnar 78378e0cfd Backed out 4 changesets (bug 1826412) for causing leakcheck failures. CLOSED TREE
Backed out changeset c11b5221fac4 (bug 1826412)
Backed out changeset af653a9af72d (bug 1826412)
Backed out changeset 889c2c0ffd50 (bug 1826412)
Backed out changeset fc0f90aef845 (bug 1826412)
2024-02-05 22:13:09 +02:00
Tom Ritter c2bb94d8cc Bug 1826412: Move the Linux Distro stuff to nsIGfxInfo also r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D200390
2024-02-05 19:30:41 +00:00
Tom Ritter 41e2755e68 Bug 1826412: Rip out all the ugly and move it to nsIGfxInfo r=jfkthame,fluent-reviewers,flod
This also adds debug information to about:support

Differential Revision: https://phabricator.services.mozilla.com/D200388
2024-02-05 19:30:40 +00:00
Sam Johnson 542e45bfa7 Bug 1878583 - Add missing dark stand-in colors. r=desktop-theme-reviewers,emilio
A few stand-in colors were missing dark variants, causing unexpected light elements such as non-native theme tooltips on Linux.

Differential Revision: https://phabricator.services.mozilla.com/D200598
2024-02-05 07:33:56 +00:00
Tooru Fujisawa 236646d127 Bug 1877019 - Reflect user activation modifiers for keyboard event only if it likely activates a link or a link-like button. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D200202
2024-02-03 04:50:41 +00:00
Cristian Tuns faffa3219d Backed out 10 changesets (bug 1875369) for causing reftest failures in 1453030.html CLOSED TREE
Backed out changeset ae7ddca3f0bb (bug 1875369)
Backed out changeset a3452ece094d (bug 1875369)
Backed out changeset 282f24265efc (bug 1875369)
Backed out changeset feeb46cf9436 (bug 1875369)
Backed out changeset a98d8031c4d6 (bug 1875369)
Backed out changeset e7d835c38205 (bug 1875369)
Backed out changeset 91d4dc450ca6 (bug 1875369)
Backed out changeset 302061ddbf3f (bug 1875369)
Backed out changeset 150d8b2ce3b3 (bug 1875369)
Backed out changeset 9e55c666d554 (bug 1875369)
2024-02-02 08:41:41 -05:00
stransky cec5ea4344 Bug 1875369 [Linux] Get renderer again after WillPaintWindow() r=emilio
WillPaintWindow() spins event loop which can lead to any action related to nsWindow - it can be hid, shown or destroyed.
If the nsWindow visibility is changed, compositor/renderer is deleted and we need to get it again.

Differential Revision: https://phabricator.services.mozilla.com/D200272
2024-02-02 10:39:57 +00:00