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

33218 Коммитов

Автор SHA1 Сообщение Дата
Martin Stransky 7e51fa5a65 Bug 1917794 [Wayland] Use and store wl_surface passed to touch events r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D221931
2024-09-12 12:23:08 +00:00
stransky c69c2fdc1e Bug 1899299 [Linux] Listen mouse events on mShell for modal popups r=emilio
A popup attached to a modal parent window doesn't get mouse events
from Gtk as they'are directed to the modal parent. This is usually solved
by pointer grab which that doesn't work on Wayland in our current
setup as it performs show and grab in one step.

We emulate it by setting popup as modal too but then patent
window doesn't get mouse events outside of popup (Bug 1899299).
we need to listen

Surprisingly attaching events handler to mShell fixes it
and we're getting events from both parent and popup windows.

Differential Revision: https://phabricator.services.mozilla.com/D221290
2024-09-12 12:17:58 +00:00
stransky ef510545a8 Bug 1917558 [Wayland] Explicitly request wl-pointer v.3 interface r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D221617
2024-09-12 12:15:42 +00:00
Butkovits Atila 171a4c7e85 Backed out 2 changesets (bug 1915665) for causing failures at WinEventObserver.cpp. CLOSED TREE
Backed out changeset a3d4ad8b9ad8 (bug 1915665)
Backed out changeset 1428595baef7 (bug 1915665)
2024-09-12 10:59:44 +03:00
Ray Kraesig 6b590e2cd2 Bug 1915665 - [2/2] Simplify the Chromium-inherited API r=win-reviewers,handyman
The original Chromium listener code has a few infelicities in its API.

* The current session ID is always available, so the `Nothing()` branch
  is impossible. Remove the `Maybe` from the interface.

* If session-change messages for other sessions are received, discard
  them early rather than propagating them.

* Use the whole DWORD value supplied by `GUID_SESSION_DISPLAY_STATUS`,
  rather than just the first byte. (This has no effect here, since
  `MONITOR_DISPLAY_STATE` is an enum with very few values, but might if
  someone blindly copies this code with minimal adjustments to be used
  with another `PBT_POWERSETTINGCHANGE` value.)

Differential Revision: https://phabricator.services.mozilla.com/D220749
2024-09-12 01:21:13 +00:00
Ray Kraesig 16afc39f46 Bug 1915665 - [1/2] Streamline WinEventHub r=win-reviewers,gfx-reviewers,handyman,bradwerth
`WinEventHub` was largely taken from Chromium, where its dynamic
connection/disconnection features are presumably more used. We don't
have any need for that, and anyway if we ever do it'll be easy to add
it alongside the static functionality or even migrate the latter over.

Hardwire the relevant message-processing and invocation directly into
the hidden window's WNDPROC, rather than providing a registration
system. Following the discoveries made in bug 1571516, also remove the
additional failure-mode checks added in bug 1852801, reverting to a
crash (which can be unified with 1571516 when it shows up).

This has, as fallout, a minor functional change to the occlusion
tracker: the subfeature prefs mentioned above are now checked at
message-receipt time, rather than at construction time.

Differential Revision: https://phabricator.services.mozilla.com/D220639
2024-09-12 01:21:12 +00:00
David Parks ba246211e4 Bug 1910452: Part 3 - Fix some issues with synthesizeMockDragAndDrop r=m_kato
This fixes four issues:

1. The test didn't provide enough movement to generate a drag session on the
   source before moving to the target.  This meant that, when they were in
   different windows, Gecko wouldn't send dragleave to the source or dragenter
   to the target.  It also never sent dragenter to the source in the first
   place. This remedies that.
2. dragenter and dragleave weren't properly handled because the test was sending
   dragleaves instead of dragexits (the latter being what Gecko expects and the
   former being synthesized from that -- see e.g. nsNativeDragTarget::DragLeave).
   This now uses dragexits and sets the proper expectations.
3. expectProtectedDataTransferAccess was needlessly complicated and, after #1,
   gave the wrong answers for some events like dragenter called on the source.
4. The event handler wasn't checking for exceptions and the drop handler was
   intentionally causing one, which was causing it to miss the rest of its
   execution.

Differential Revision: https://phabricator.services.mozilla.com/D219550
2024-09-11 23:02:23 +00:00
David Parks 8b722be621 Bug 1910452: Part 1 - Intercept drop events for content analysis r=smaug,dlp-reviewers,gstoll,reusable-components-reviewers,mstriemer
Sends OOP drop events to content analysis for approval before sending them to
the DOM.  It intercepts drop events at the browser level and sends them to CA
before calling stopPropagation and preventDefault on them.  (CA also presents a
modal dialog over the tab.) The drag session then ends as usual in the parent
process but remains open on the related browser in the process where it would be
sent to the DOM while the drop is being analyzed.  While CA runs, the browser
dispatches an eQueryDropTargetHittest event to locate the drop target while the
event screen coordinates are still valid.  When CA is complete, a drop or
dragexit event is sent to the drop target (drop if it was approved by CA). Calls
to EndDragSession are delayed during this.

Differential Revision: https://phabricator.services.mozilla.com/D219201
2024-09-11 23:02:22 +00:00
Greg Stoll d31487f277 Bug 1917631 - clean up logic around content analysis pref r=dlp-reviewers,handyman
Differential Revision: https://phabricator.services.mozilla.com/D221648
2024-09-11 06:39:30 +00:00
Sam Johnson 6b0aeee669 Bug 1912338 - Consistently hide macOS titlebar separator for full screen windows. r=mac-reviewers,bradwerth
In bug 1906034, I attempted to preserve the workaround for the white line issue from bug 1700211, but it did not prevent the white line from appearing. Hiding the separator in response to full-screen events avoids the issue.

Differential Revision: https://phabricator.services.mozilla.com/D221576
2024-09-10 17:54:41 +00:00
Ray Kraesig 978be7ce60 Bug 1598915 - [3/2] Fix sense of preference-test r=win-reviewers,handyman
The sense of the test-condition here was reversed: as the preference's
name states, this should run when the preference is false (as it is by
default).

Differential Revision: https://phabricator.services.mozilla.com/D221234
2024-09-10 17:28:04 +00:00
Fatih 6ab4e9bf01 Bug 1834307: Change StaticPrefs::general_smoothScroll() calls with nsLayoutUtils::IsSmoothScrollingEnabled. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D221363
2024-09-10 14:41:23 +00:00
Fatih d9402246b9 Bug 1826051: Improve PointerEvents RFP target for Android. r=tjr
- This patch separates RFPTarget::PointerEvents into PointerEvents and PointerId.
- PointerId protection is disabled for Android.
- WidgetEvents emit non-primary mouse events on Android because any touch other than 1nd touch is considered non-primary
- Sets maximum touch points to 5 on Android

Differential Revision: https://phabricator.services.mozilla.com/D221241
2024-09-10 14:37:50 +00:00
Emilio Cobos Álvarez c4cf618c6c Bug 1917715 - Rename nsLayoutUtils::GetColor. r=longsonr,dholbert
It's suitable for foreground colors only.

Differential Revision: https://phabricator.services.mozilla.com/D221557
2024-09-09 23:12:05 +00:00
Martin Stransky a108f647bd Bug 1915596 [Wayland] Get touchpad hold event directly from Wayland display r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D220551
2024-09-06 09:16:28 +00:00
Masayuki Nakano c13abd36f2 Bug 1915057 - Make `HTMLEditor::NotifyRootChanged()` notifies `IMEStateManager` of the editor root change r=smaug,m_kato
When `HTMLEditor` handles the design mode, `IMEContentObserver` observes the
`<body>` if there is.  However, web apps may remove it.  Then, we need to
recreate `IMEContentObserver` with emulating a focus move because it's difficult
to compute the difference between the old root and the new root (IME focus
notification sends all content to the parent, it's faster in most cases in this
situation). This was fixed in bug 1911010.  However, there are remaining issues
after that.

When new `<body>` or the original `<body>` is connected again,
`IMEContentObserver` does not restart to observe the new `<body>`.  So,
`IMEContentObserver` working differently after the `<body>` is even temporarily
removed.  This make it harder to reproduce reported bugs.

Additionally, if the document element is removed, `IMEContentObserver` won't
be recreated until the document gets focus again even after new root and/or
`<body>` element is connected.  This makes IME users inconvenient with such
tricky editors.

This patch makes `HTMLEditor::NotifyRootChanged` notifies `IMEStateManager`
of the editor root element change.  Then, the new method of `IMEStateManager`
updates IME enabled state and recreate `IMEContentObserver` with emulating
a focus move.

Differential Revision: https://phabricator.services.mozilla.com/D220362
2024-09-05 00:35:50 +00:00
Greg Stoll b8436fd050 Bug 1914068 - pass correct URL to Content Analysis for same-origin iframes r=dlp-reviewers,win-reviewers,handyman
Differential Revision: https://phabricator.services.mozilla.com/D220168
2024-09-04 19:55:29 +00:00
delthas 5f4990c6aa Bug 1815783 - Expose media URL in MPRIS metadata r=media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D219160
2024-09-04 16:16:56 +00:00
Masayuki Nakano 49bd0ece94 Bug 1913925 - Allow `WidgetMouseEvent` whose `mIgnoreCapturingContent` and/or `mSynthesizeMoveAfterDispatch` is `true` to cross a process boundary r=smaug
We didn't have any ideas of crossing mouse/pointer events which finally cause
synthesized move event to dispatch corresponding boundary events.  However,
`mSynthesizeMoveAfterDispatch` of `eMouseUp` is set to `true` in most cases
because the preceding `ePointerUp` causes releasing implicit capture and
`eMouseUp` may be handled in `EventStateManager::HandleCrossProcessEvent` if
there is a remote target underneath the pointer after `ePointerUp` is handled.
Therefore, we should allow such `eMouseUp` events to cross the process
boundary, but we don't need to copy the members (See the comment in
`ParamTraits<mozilla::WidgetMouseEvent>` for the reason).

I have no idea how to write the xorigin test within WPT. Therefore, this patch
does not contain new test.

Differential Revision: https://phabricator.services.mozilla.com/D220773
2024-09-04 00:28:10 +00:00
Brad Werth 1b2d79c224 Bug 1880582: Use more correct teardown semantics in nsCocoaWindow::Destroy. r=mstange
This patch moves the call to BaseWindow::Destroy() and ::OnDestroy() to
the end of nsCocoaWindow::Destroy(). It adds a death grip on this before
remove this from mParent. This should keep the window in a more stable
state throughout the function scope.

Differential Revision: https://phabricator.services.mozilla.com/D216066
2024-09-03 16:14:17 +00:00
Olli Pettay e1fad67026 Bug 1914513 - Add a pref to disable mutation events, r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D219934
2024-09-02 13:29:57 +00:00
Makoto Kato 1ae9b0e33a Bug 1902949 - button and buttons property of contextmenu should be touch contact. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D220508
2024-09-02 02:50:04 +00:00
Kagami Sascha Rosylight 369450f48c Bug 1912074 - Add more validity checks r=nalexander,nrishel,win-reviewers,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D218776
2024-08-31 10:38:24 +00:00
Gregory Pappas cf796e320f Bug 1914578 - Remove EventTracer r=perftest-reviewers,geckoview-reviewers,win-reviewers,profiler-reviewers,mstange,sparky,gstoll,owlish
Differential Revision: https://phabricator.services.mozilla.com/D219955
2024-08-31 03:39:50 +00:00
Emilio Cobos Álvarez 8cf487b56e Bug 1851775 - Make sure calls to BeginPaint/EndPaint are balanced. r=rkraesig
As mentioned in previous review comments, there were various error cases
which could end up with unbalanced calls.

Differential Revision: https://phabricator.services.mozilla.com/D187534
2024-08-30 15:42:30 +00:00
Norisz Fay 9e27b342a4 Backed out changeset 494bc0426f70 (bug 1851775) for causing mochitest failures on browser_startup.js 2024-08-29 22:55:47 +03:00
Emilio Cobos Álvarez 0a61f56ec2 Bug 1851775 - Make sure calls to BeginPaint/EndPaint are balanced. r=rkraesig
As mentioned in previous review comments, there were various error cases
which could end up with unbalanced calls.

Differential Revision: https://phabricator.services.mozilla.com/D187534
2024-08-29 17:23:36 +00:00
Florian Quèze 757717524a Bug 1915228 - Remove expired telemetry scalar startup.skeleton_ui_disabled_reason, r=win-reviewers,TravisLong,gstoll.
Depends on D220334

Differential Revision: https://phabricator.services.mozilla.com/D220335
2024-08-28 19:44:36 +00:00
Florian Quèze 8fb63116dd Bug 1915228 - Remove expired telemetry scalars widget.gtk_theme_has_scrollbar_buttons and widget.gtk_theme_scrollbar_uses_images, r=TravisLong.
Depends on D220333

Differential Revision: https://phabricator.services.mozilla.com/D220334
2024-08-28 19:44:35 +00:00
Florian Quèze 9a84e38e6c Bug 1915228 - Remove expired telemetry scalar startup.is_restored_by_macos, r=TravisLong.
Depends on D220332

Differential Revision: https://phabricator.services.mozilla.com/D220333
2024-08-28 19:44:35 +00:00
Gregory Pappas bfbc544e6c Bug 1914559 - Remove fallback to hidden window in WindowsUIUtils::UpdateInTabletMode r=win-reviewers,rkraesig
If there aren't any browser windows, we're either very early in startup
or shutting down. In these cases, it's probably fine to not know if
tablet mode is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D219945
2024-08-28 19:30:43 +00:00
Makoto Kato 8d8645b6a8 Bug 1546267 - Detect system locale/timezone change. r=geckoview-reviewers,owlish
We should notify system locale and timezone of changes to Gecko.

Differential Revision: https://phabricator.services.mozilla.com/D218514
2024-08-27 08:40:58 +00:00
Masayuki Nakano b546eb7e32 Bug 1911010 - Make `IMEContentObserver` observe `ParentChainChanged` and let `IMEStateManager` know that r=smaug
`mozAutoDocUpdate` does not make it in a document change when container node
of `insertBefore` has already been removed from the tree.  Therefore, once
`IMEContentObserver::mRootElement` is removed from the DOM tree without a
focus move, `IMEContentObserver` is notified mutations not in a document change.

Similar situations are handled in `IMEStateManager::OnRemoveContent` with
emulating a focus change and that will destroy the active `IMEContentObserver`.
Therefore, if `IMEContentObserver::mRootElement` is removed, we should emulate
a focus move when `IMEStateManager` does not have focused element but there
is active `IMEContentObserver` (that means it is/was in the design mode).

However, checking whether the removed node contains the observing node of the
active `IMEContentObserver` may be expensive.  So, doing expensive things in
`IMEStateManager::OnRemoveContent` may make mutations slower.  Therefore, this
patch makes `IMEContentObserver` observe `ParentChainChanged` and it let
`IMEStateManager` know that with calling its
`OnParentChainChangedOfObservingElement`.  Finally, it calls
`IMEStateManager::OnRemoveContent` to emulate "blur" (and refocus if it's
required).

Differential Revision: https://phabricator.services.mozilla.com/D218696
2024-08-27 07:55:26 +00:00
Norisz Fay 6ad5adeba2 Backed out changeset 4b2edb2c26d4 (bug 1880582) for causing mochitest failures on test_fullscreen-api-race.html CLOSED TREE 2024-08-27 09:02:12 +03:00
Stanca Serban ada4e189a4 Backed out changeset 125344f9e446 (bug 1911010) for causing linux bustages in nsINode.cpp. 2024-08-27 07:54:54 +03:00
sotaro 7e09cc440e Bug 1899454 - Re-enable zero copy video of hardware decoded video with NVIDIA GPUs to release r=win-reviewers,handyman
No regressions have been reported reported since  Bug 1882001, then it seems OK to re-enable zero copy video of hardware decoded video with NVIDIA GPUs to release.

Differential Revision: https://phabricator.services.mozilla.com/D219838
2024-08-27 04:21:14 +00:00
Masayuki Nakano b9ef2f71b3 Bug 1911010 - Make `IMEContentObserver` observe `ParentChainChanged` and let `IMEStateManager` know that r=smaug
`mozAutoDocUpdate` does not make it in a document change when container node
of `insertBefore` has already been removed from the tree.  Therefore, once
`IMEContentObserver::mRootElement` is removed from the DOM tree without a
focus move, `IMEContentObserver` is notified mutations not in a document change.

Similar situations are handled in `IMEStateManager::OnRemoveContent` with
emulating a focus change and that will destroy the active `IMEContentObserver`.
Therefore, if `IMEContentObserver::mRootElement` is removed, we should emulate
a focus move when `IMEStateManager` does not have focused element but there
is active `IMEContentObserver` (that means it is/was in the design mode).

However, checking whether the removed node contains the observing node of the
active `IMEContentObserver` may be expensive.  So, doing expensive things in
`IMEStateManager::OnRemoveContent` may make mutations slower.  Therefore, this
patch makes `IMEContentObserver` observe `ParentChainChanged` and it let
`IMEStateManager` know that with calling its
`OnParentChainChangedOfObservingElement`.  Finally, it calls
`IMEStateManager::OnRemoveContent` to emulate "blur" (and refocus if it's
required).

Differential Revision: https://phabricator.services.mozilla.com/D218696
2024-08-27 00:39:49 +00:00
Brad Werth dc143218d6 Bug 1880582: Don't destroy the native window in nsCocoaWindow::Destroy. r=mstange
This is a temporary measure. We would like to destroy the native window
here, but we want to see the effect of removal on crash volume.

This patch also moves the call to BaseWindow::OnDestroy() to the end of
::Destroy(). This is necessary to get tests to pass. It may also be the
real fix for this Bug.

Differential Revision: https://phabricator.services.mozilla.com/D216066
2024-08-26 23:52:19 +00:00
Brad Werth 581584ebe0 Bug 1912949: Let macOS window manager calculate visible rect of the mouse tracking area. r=mac-reviewers,spohl
macOS offers an enum, NSTrackingInVisibleRect, which keeps the tracking
area up-to-date with the visible area of the window. This patch adds
this enum to our tracking area at window creation time, and removes the
code that was recreating the tracking area with every window resize.

It also moves the responsibility of creating and removing the tracking
area to the nsCocoaWindow, which keeps us from manipulating the tracking
area during deallocation.

Differential Revision: https://phabricator.services.mozilla.com/D219098
2024-08-23 20:56:25 +00:00
stransky 7a3e8f8e71 Bug 1914418 [Linux] Don't recycle g_cancellable r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D219958
2024-08-23 18:20:38 +00:00
Timothy Nikkel 7a3f01bbd3 Bug 1912570. Record/warn in reftests/crashtests if compositor is paused or window is fully occluded. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D219005
2024-08-23 09:39:55 +00:00
Iulian Moraru 81e55ad78b Backed out changeset 056846758066 (bug 1912074) for causing mochitest-chrome failures on test_principal.html. CLOSED TREE 2024-08-23 04:41:22 +03:00
Masayuki Nakano 4088d4a7e4 Bug 1913611 - Make `ModifierKeyState::InitInputEvent` and `KeymapWrapper::InitInputEvent` set `WidgetMouseEventBase::mButtons` of `eContextMenu` r=smaug
They do it only when given event class is expected one but they don't include
`ePointerEventClass` which is newly used for `eContextMenu` event since
bug 1675847.

Differential Revision: https://phabricator.services.mozilla.com/D219632
2024-08-22 21:51:33 +00:00
Kagami Sascha Rosylight 994cdea55b Bug 1912074 - Add more validity checks r=nalexander,nrishel
Differential Revision: https://phabricator.services.mozilla.com/D218776
2024-08-22 20:58:46 +00:00
Emilio Cobos Álvarez ba2b5baa99 Bug 1896235 - Fix -Werror on gcc.
MANUAL PUSH: Trivial fix CLOSED TREE
2024-08-21 15:49:08 +02:00
stransky a9f5b9de1b Bug 1913988 [Wayland] Quit if we're missing requested Wayland interface r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D219732
2024-08-21 11:24:50 +00:00
stransky 8f73158852 Bug 1896235 [Linux] Replace mInhibited and mShouldInhibit flags with enum type to track wake lock state r=emilio
Depends on D219047

Differential Revision: https://phabricator.services.mozilla.com/D219048
2024-08-21 11:17:38 +00:00
stransky 7a2d5ebb0c Bug 1896235 [Linux] Use different GCancellable for inhibit/uninhibit requests r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D219047
2024-08-21 11:17:38 +00:00
Peter Van der Beken 5a5ef4beda Bug 1900930 - Make ENSURE_SUCCESS call WouldReportJSException. r=dom-core,win-reviewers,emilio,gstoll,edgar
Making ENSURE_SUCCESS return the result of StealNSResult() ensures that
exceptions in the ErrorResult are deal with. We can then signal that through
WouldReportJSException.

Differential Revision: https://phabricator.services.mozilla.com/D214792
2024-08-21 08:43:09 +00:00
Florian Quèze ab931780f4 Bug 1913624 - Remove expired telemetry histograms PRINT_BACKGROUND_TASK_TIME_MS and PRINT_BACKGROUND_TASK_ROUND_TRIP_TIME_MS, r=win-reviewers,gstoll,TravisLong.
Depends on D219462

Differential Revision: https://phabricator.services.mozilla.com/D219463
2024-08-20 20:56:46 +00:00