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

4213 Коммитов

Автор SHA1 Сообщение Дата
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
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
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
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
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
Makoto Kato d31b62f1e5 Bug 1910824 - Show text substitution panel correctly. r=masayuki
This is a typo by bug 1149826.

Differential Revision: https://phabricator.services.mozilla.com/D218175
2024-08-01 00:55:00 +00:00
Masayuki Nakano 0ddf10ff5e Bug 1904279 - Get rid of `dom.w3c_pointer_events.dispatch_click_as_pointer_event` pref r=smaug,pip-reviewers,search-reviewers,devtools-reviewers,urlbar-reviewers,nchevobbe,dao,jteow,mconley
Keep supporting the pref makes a lot of `click`, `auxclick` and `contextmenu`
event creators complicated (and look messy).  So, let's delete it as soon as
possible.

Differential Revision: https://phabricator.services.mozilla.com/D217225
2024-07-30 06:49:42 +00:00
Tom Schuster dbabfc004e Bug 1809713 - Change nsIClipboard to use the ClipboardType enum. r=nika,geckoview-reviewers,win-reviewers,gstoll,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D217807
2024-07-29 11:52:34 +00:00
Makoto Kato ba148ef600 Bug 1149826 - Part 2. Support text substitution. r=masayuki
macOs has the feature for auto-correction.

Other browsers already has this feature, and can control this by
`autocorrect` attribute [*1] that is still non-standard.

Since content script can modify source text for autocorrect by
any event handers, autocorrect is run when source text isn't
changed only.

The event order for this implementation is the following.

1. `keydown` event by space
2. `keypress` event by space
3. `beforeinput` event (`insertText`) by space
4. `input` event (`insertText`) by space
5. `beforeinput` event (`insertReplacementText`) by autocorrect
6. `input` event (`insertReplacementText`) by autocorrect
7. `keyup` event by space

Also, Safari's order is that input event for space is fired after
`insertReplacementText`. And, Chrome's is broken. When typing
`"omw"`, "w"'s keyup is fired after dismissing a picker. And they
don't use `insertReplacementText`.

And, Saferi can prevent this when calling `event.preventDefault()`
on `keypress` event handler for space/enter key. But I guess that
there is no way to get event handler calls `preventDefault()` from
widget side on Chrome process.

*1 https://github.com/whatwg/html/pull/5841

Differential Revision: https://phabricator.services.mozilla.com/D213512
2024-07-26 06:38:52 +00:00
Erich Gubler 5da7ef90fa Bug 1864698: feat(webgpu): re-enable MacOS support r=webgpu-reviewers,teoxoy
Differential Revision: https://phabricator.services.mozilla.com/D198198
2024-07-16 11:29:03 +00:00
Norisz Fay e4ca95ab89 Backed out changeset 95b8a86436fe (bug 1880582) for causing OSX bc failures on browser_ext_windows_create_params.js CLOSED TREE 2024-07-16 02:39:59 +03:00
Brad Werth 783d0cb50e Bug 1880582: Don't destory 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.

Differential Revision: https://phabricator.services.mozilla.com/D216066
2024-07-15 15:14:43 +00:00
Emilio Cobos Álvarez f1a4df024d Bug 1907405 - Add appearance: -moz-sidebar and hook macOS vibrancy. r=mac-reviewers,spohl
Unused for now, but pretty straight-forward.

Bug 1905257 has some code that actually uses it. This allows the
front-end folks to experiment with this effect for the sidebar.

Differential Revision: https://phabricator.services.mozilla.com/D216325
2024-07-12 14:08:13 +00:00
Tim Huang 2fcca82476 Bug 1903508 - Part 4: Implement nsLookAndFeel::GetKeyboardLayoutImpl() for the MAC platform. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D215073
2024-07-10 12:17:50 +00:00
Otto Länd f27ae4577c Bug 1893119: apply code formatting via Lando
# ignore-this-changeset
2024-07-04 07:52:52 +00:00
David P ce04c3bf58 Bug 1893119: Part 22 - Make nsIDragService::StartDragSession return the nsIDragSession r=rkraesig,win-reviewers,gstoll,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D212298
2024-07-04 07:48:12 +00:00
David P 7376694ac2 Bug 1893119: Part 21 - Separate nsIDragService and nsIDragSession implementations r=gstoll,geckoview-reviewers,rkraesig,win-reviewers,m_kato
Split the class inheritance trees for nsIDragService and nsIDragSession.
Remember that, before the start of this patch series, the inheritance
diagram was:

nsDragService -> nsBaseDragService -> nsIDragService + nsIDragSession

and the only instance was a singleton.  We switched it to:

nsDragService -> nsDragSession -> nsBaseDragService -> nsIDragService + nsBaseDragSession -> nsIDragSession

and maintained the singleton.  This allowed us to allow us to move things to
the new classes without breaking behavior.  We are done with that,
so we can now change the inheritance to its final form:

nsDragService -> nsBaseDragService -> nsIDragService

nsDragSession -> nsBaseDragSession -> nsIDragSession

Of course, we also need to properly construct and release the
nsIDragSessions (formerly part of the singleton), so that is done here as
well.  That happens in nsBaseDrag[Service|Session] for parent process drags
and in nsDrag[Service|Session]Proxy for content.  This is all fairly
straightforward, except in the case of gtk, where we need to change
some callback behavior.

Differential Revision: https://phabricator.services.mozilla.com/D211084
2024-07-04 07:48:11 +00:00
David P f680f60c6e Bug 1893119: Part 20 - Move EndDragSession from nsIDragService to nsIDragSession r=gstoll,rkraesig,win-reviewers,geckoview-reviewers,m_kato
This is a straightforward move.  It does take the liberty of breaking out an
EndDragSessionImpl method, which will be needed later.

Differential Revision: https://phabricator.services.mozilla.com/D211083
2024-07-04 07:48:11 +00:00
David P e819348c38 Bug 1893119: Part 17 - Pass the widget to StartDragSession r=gstoll,rkraesig,win-reviewers,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D211080
2024-07-04 07:48:10 +00:00
David Parks 2eefca6c4a Bug 1893119: Part 14 - Move SetDragEndPoint from nsBaseDragService to nsIDragSession r=gstoll,rkraesig,win-reviewers,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D211078
2024-07-04 07:48:08 +00:00
David Parks 1a0d3f3ebe Bug 1893119: Part 13 - Move FireDragEventAtSource from nsIDragService to nsIDragSession r=gstoll,rkraesig,win-reviewers,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D211077
2024-07-04 07:48:08 +00:00
David P aa09628e5d Bug 1893119: Part 12 - Move DragMoved from nsIDragService to nsIDragSession r=gstoll,rkraesig,win-reviewers,spohl
Differential Revision: https://phabricator.services.mozilla.com/D211076
2024-07-04 07:48:07 +00:00
David P 10cbe46381 Bug 1893119: Part 9 - Move additional parts of nsIDragService to nsIDragSession r=gstoll,rkraesig,geckoview-reviewers,win-reviewers,m_kato
Moving additional methods and fields.  No substantive changes.

Differential Revision: https://phabricator.services.mozilla.com/D211073
2024-07-04 07:48:06 +00:00
David P 2ac3d53a3b Bug 1893119: Part 8 - Prepare for nsBaseDragSession to be broken out of nsBaseDragService r=gstoll,rkraesig,win-reviewers,geckoview-reviewers,m_kato
Creates the nsBaseDragSession class and moves nsIDragSession's methods and data
into it.  This patch also does this for each platform-specific nsDragService
and the nsDragServiceProxy.  The result is that the drag service and drag
session are still one object in both the main and child processes, and the
inheritance diagram for each platform implementation goes from its present
from:

nsDragService -> nsBaseDragService -> nsIDragService + nsIDragSession

to:

nsDragService -> nsDragSession -> nsBaseDragService -> nsIDragService + nsBaseDragSession -> nsIDragSession

(and similar for the nsDragServiceProxy).

At the end of this patch series, the objects will be separated and the
inheritance diagram will be as expected:

nsDragService -> nsBaseDragService -> nsIDragService

nsDragSession -> nsBaseDragSession -> nsIDragSession

There are no substantive changes here -- it's essentially all cut
and paste to prepare to smoothly sever the unwanted inheritance.

Differential Revision: https://phabricator.services.mozilla.com/D211072
2024-07-04 07:48:06 +00:00
David Parks af0569bf6c Bug 1893119: Part 2 - Make C++ callers of nsIDragService::GetCurrentSession pass a widget r=gstoll,win-reviewers,geckoview-reviewers,m_kato
Content process callers must call nsIDragService::GetCurrentSession with the
correct widget under the drag.  For all callers, it is a sanity check.

Differential Revision: https://phabricator.services.mozilla.com/D211065
2024-07-04 07:48:03 +00:00
Tamas Szentpeteri 593dfb6757 Backed out 5 changesets (bug 1903508) for causing Bpnu bustages related to nsLookAndFeel.cpp. CLOSED TREE
Backed out changeset 4c080cae862c (bug 1903508)
Backed out changeset 20c125847bf3 (bug 1903508)
Backed out changeset 7979c19a23d3 (bug 1903508)
Backed out changeset 8bc2f521a6a5 (bug 1903508)
Backed out changeset ad85ae8be066 (bug 1903508)
2024-07-04 00:55:36 +03:00
Sam Johnson 49e038648d Bug 1906037 - Restore macOS desktop tinting on dialog windows. r=mac-reviewers,desktop-theme-reviewers,emilio,spohl
After bug 1867854, dialog windows on macOS no longer show desktop tinting on the window background. Since this requires a transparent Gecko background, the `-moz-mac-unified-toolbar-window` appearance added in bug 1870481 should be applied to every window. It has been renamed to reflect this.

Differential Revision: https://phabricator.services.mozilla.com/D215596
2024-07-03 21:08:20 +00:00
Sam Johnson f501773203 Bug 1906034 - Show macOS titlebar if we are not drawing into it. r=mac-reviewers,spohl
Rather than always hiding the titlebar for ToolbarWindows, conditionally show it if we are not drawing into it.

Differential Revision: https://phabricator.services.mozilla.com/D215586
2024-07-03 20:35:55 +00:00
Tim Huang 75a3c283cf Bug 1903508 - Part 4: Implement nsLookAndFeel::GetKeyboardLayoutImpl() for the MAC platform. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D215073
2024-07-03 20:08:33 +00:00
Norisz Fay 306a996c14 Backed out 5 changesets (bug 1903508) for causing bustage on nsLookAndFeel.mm CLOSED TREE
Backed out changeset fdb7a3ddb14d (bug 1903508)
Backed out changeset 16ddc594a932 (bug 1903508)
Backed out changeset 0c9dba12e2c8 (bug 1903508)
Backed out changeset e3871cddc8ec (bug 1903508)
Backed out changeset dc4af9abfa96 (bug 1903508)
2024-07-03 19:28:48 +03:00
Tim Huang 1c5d2407d6 Bug 1903508 - Part 4: Implement nsLookAndFeel::GetKeyboardLayoutImpl() for the MAC platform. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D215073
2024-07-03 14:28:13 +00:00
Brad Werth 5f4a6a9a17 Bug 1891040 Part 2: Make nsChildView request sync flush rendering during critical animations. r=mac-reviewers,spohl
Differential Revision: https://phabricator.services.mozilla.com/D209771
2024-06-24 16:32:20 +00:00
Emilio Cobos Álvarez bb6693d9cd Bug 1903191 - Tweak sizing to allow zero-size checkboxes/radio buttons. r=dholbert
baseline-alignment-and-overflow.tentative.html starts failing because
the code to set up the reference stops working:

  https://searchfox.org/mozilla-central/rev/8011b6325f7ce05d228a3cdefd45d74fb98ee7b4/testing/web-platform/tests/html/rendering/widgets/baseline-alignment-and-overflow.tentative.html#169-174

But our rendering otherwise doesn't change, plus it fails similarly in
Safari, so I think we're good.

Differential Revision: https://phabricator.services.mozilla.com/D214081
2024-06-19 12:16:08 +00:00
Emilio Cobos Álvarez 6ecd66ed03 Bug 1902315 - Remove other widget z-level fiction. r=win-reviewers,rkraesig,geckoview-reviewers,spohl,m_kato
This comes back to bug 42557 and co. It only does something
half-reasonable on Windows (on macOS we just lie and make z-order
tracking be latest-active tracking), and given we don't use the special
zorder flags elsewhere I'm pretty sure we should be able to just rip
this off... On some DEs like Wayland we can't re-stack toplevel windows.

Differential Revision: https://phabricator.services.mozilla.com/D213602
2024-06-19 07:47:36 +00:00
Brad Werth ef99be2d92 Bug 1880582: Make nsCocoaWindow add and remove tracking areas from the same view. r=mac-reviewers,spohl
It is important to remove the NSTrackingArea before the nsCocoaWindow is
deallocated. This patch ensures that we remember which NSView is holding
the tracking area and remove the tracking area from that view during
dealloc (as well as whenever the tracking area is updated).

Since the `trackingAreaView` property accessor returns a value based on
`contentView` or its superview, manipulations of either view will change
the return value of the accessor. We can't rely on it being consistent
throughout the lifetime of the window. This change ensures that we will
always remove the tracking area from the view that added it.

Differential Revision: https://phabricator.services.mozilla.com/D212949
2024-06-18 18:19:19 +00:00
Brad Werth 00638e8742 Bug 1891611: Make nsCocoaWindow report a missing window as a transparent window. r=mac-reviewers,spohl
Differential Revision: https://phabricator.services.mozilla.com/D207489
2024-06-18 18:01:50 +00:00
Brad Werth 1570d42b2d Bug 1895175: Make dispatched calls to nsCocoaWindow::ProcessTransitions cancellable. r=mac-reviewers,spohl
This prevents one more way that `ProcessTransitions` might be called
after we'd rather it didn't. The `CancelAllTransitions` method is
updated to also cancel a dispatched call to `ProcessTransitions`. This
will prevent these dispatches from arriving after the `nsCocoaWindow`
has been deallocated.

Differential Revision: https://phabricator.services.mozilla.com/D212972
2024-06-18 18:01:04 +00:00
Edgar Chen d3aed2f1a2 Bug 1875416 - Report deactivate/activate state properly when system print dialog is opened/closed; r=mac-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D206003
2024-06-17 21:45:19 +00:00
Masayuki Nakano d835b38b9f Bug 1675847 - part 5: Make `contextmenu` event dispatchers use `WidgetPointerEvent` or `PointerEvent` r=smaug,pip-reviewers,devtools-reviewers,nchevobbe,mconley
`eContextMenu` event may be fired from `widget`.  Therefore, different from
`ePointerClick` and `ePointerAuxClick`, they may cross the process boundary,
may be handled by APZ and may be dispatched into the DOM after a delay.
Therefore, this patch is complicated than the previous patch.  This adds
* New IPC message handlers for sending/receiving a `WidgetPointerEvent`
* New `DelayedPointerEvent` class and templated `MouseInput::ToWidgetEvent`
* `PresShell::EventHandler` handles `eContextMenu` as same as `WidgetMouseEvent`

Differential Revision: https://phabricator.services.mozilla.com/D213003
2024-06-14 00:18:48 +00:00
palashgo 66c1cabe15 Bug 1772233: Fix macOS screen recording permission check, skip StatusIndicator window. r=jib,spohl
Differential Revision: https://phabricator.services.mozilla.com/D208291
2024-06-10 17:04:04 +00:00
Brad Werth 51b4faa853 Bug 1781830: Prevent PiP windows from opening in fullscreen. r=mac-reviewers,mstange
Though this is standard behavior for other windows, we want to
special-case this for PiP windows, which users expect to open in
resizable popups. This patch also prevents other popups and
alerts/dialogs from opening in fullscreen mode, which would be a bad
user experience.

Differential Revision: https://phabricator.services.mozilla.com/D210382
2024-06-05 18:46:09 +00:00
Jan-Niklas Jaeschke db5d7e6f67 Bug 1867940 - Text Fragments: Implement sensible default colors. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D212378
2024-06-05 10:46:53 +00:00
Ting-Yu Lin 1e80f659a2 Bug 1896516 Part 11 - Remove nsIScrollableFrame usages under layout/, widget/, and toolkit/. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D211498
2024-05-30 06:32:22 +00:00
Sebastian Hengst ccb101be8f Backed out 15 changesets (bug 1896516) for causing scrolling crashes on macOS. a=backout
Backed out changeset fd6904338812 (bug 1896516)
Backed out changeset 2977ff81a23e (bug 1896516)
Backed out changeset c8a6b0e526d6 (bug 1896516)
Backed out changeset 3c06f22da72b (bug 1896516)
Backed out changeset f63b0c4335fe (bug 1896516)
Backed out changeset 6f7ab8adfa6e (bug 1896516)
Backed out changeset 997c9249dbed (bug 1896516)
Backed out changeset c964fccd5180 (bug 1896516)
Backed out changeset 7b481b747b7a (bug 1896516)
Backed out changeset 42e1bbe0ecb6 (bug 1896516)
Backed out changeset 717dac08b607 (bug 1896516)
Backed out changeset 2f0817331dbe (bug 1896516)
Backed out changeset b765169a7a8f (bug 1896516)
Backed out changeset a2d37b98273c (bug 1896516)
Backed out changeset ea9ecb543e66 (bug 1896516)
2024-05-29 11:22:52 +02:00
Ting-Yu Lin 6bd29e633d Bug 1896516 Part 11 - Remove nsIScrollableFrame usages under layout/, widget/, and toolkit/. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D211498
2024-05-28 04:46:20 +00:00
Emilio Cobos Álvarez 578dc97928 Bug 1895184 - Make macOS full keyboard access override accessibility.tabfocus when enabled. r=NeilDeakin,morgan
Maybe we should tweak the wording of the settings checkbox to more
strongly not implying that having it un-checked will not go through
links, but I'm not sure what wording could be best there.

Differential Revision: https://phabricator.services.mozilla.com/D209535
2024-05-15 13:48:36 +00:00
Brian Tsoi 52529f589f Bug 1787382 - Remove resolutionchange events firing r=win-reviewers,cmartin
Differential Revision: https://phabricator.services.mozilla.com/D209883
2024-05-09 14:37:04 +00:00
Emilio Cobos Álvarez fb06f366ae Bug 1889429 - Remove most native tree code. r=mac-reviewers,desktop-theme-reviewers,places-reviewers,win-reviewers,dao,handyman,mstange
Most of this code is already dead. The native appearance on macOS
doesn't work on dark mode, and on Windows and Linux we are already
overriding it.

Add a first-column tree property to be able to align the inner borders
on macOS properly.

Differential Revision: https://phabricator.services.mozilla.com/D206526
2024-05-06 19:22:35 +00:00
Brad Werth 0fa7bd5153 Bug 1891608: Make nsCocoaWindow::DestroyNativeWindow hide the window before destroying it. r=mac-reviewers,mstange
Differential Revision: https://phabricator.services.mozilla.com/D207486
2024-05-06 17:00:36 +00:00