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

29388 Коммитов

Автор SHA1 Сообщение Дата
Cristian Tuns 71486b8924 Backed out changeset 7e8e3747c3f8 (bug 1603127) for causing toolchains build bustages (Bug 1739589). CLOSED TREE 2021-11-05 07:23:45 -04:00
Cristian Tuns cbd178830f Backed out 10 changesets (bug 1732343) for causing coverage build bustages (Bug 1739590).
Backed out changeset bba94c79f3e1 (bug 1732343)
Backed out changeset d30fa1e1f605 (bug 1732343)
Backed out changeset ed0b4f757c4b (bug 1732343)
Backed out changeset a272da134c34 (bug 1732343)
Backed out changeset ccb259d73843 (bug 1732343)
Backed out changeset a292990b62de (bug 1732343)
Backed out changeset 7d1854782ca8 (bug 1732343)
Backed out changeset 29eaabd9ffb3 (bug 1732343)
Backed out changeset 1aa26657a7a6 (bug 1732343)
Backed out changeset 7a6708dc620a (bug 1732343)
2021-11-05 07:21:04 -04:00
ssummar 508562cc85 Bug 1603127 - Replaced mozilla::Tuple with std::tuple and applied structured bindings in mozilla/Encoding.h. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D129920
2021-11-05 05:33:58 +00:00
Nika Layzell 6fb92ec807 Bug 1732343 - Part 9: Directly use DuplicateHandle in RemoteBackbuffer, r=cmartin
Previously this code was using ipc::DuplicateHandle, which was unnecessary, as
the code is being run in the parent process which has access to perform direct
handle transfers. After this patch we'd like to remove ipc::DuplicateHandle and
rely only on attached handles for serialization, so the code is converted to
instead directly use DuplicateHandle.

Differential Revision: https://phabricator.services.mozilla.com/D126571
2021-11-04 19:20:20 +00:00
Nika Layzell 7b9b550a9c Bug 1732343 - Part 8: Use attached handles for Windows RemoteBackbufferHandles serialization, r=cmartin
Differential Revision: https://phabricator.services.mozilla.com/D126570
2021-11-04 19:20:20 +00:00
Emilio Cobos Alvarez eaf8c1e314 Bug 1696786 - Fix a couple bugs in Windows rollup code. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D130310
2021-11-04 17:53:43 +00:00
ssummar c7c477296e Bug 1738840 - Replaces mozilla::Tuple with std::tuple in accessible/ r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D130152
2021-11-04 13:39:19 +00:00
sotaro c92b63066f Bug 1739310 - Fix WindowOcclusionCalculator::ComputeNativeWindowOcclusionStatus() r=nical,gfx-reviewers
Fix a mistake during porting the ComputeNativeWindowOcclusionStatus() from chromium to gecko. chromium uses (left, top right, bottom), but gecko needs to use (x, y, width, height).

Differential Revision: https://phabricator.services.mozilla.com/D130331
2021-11-04 10:41:52 +00:00
Cristian Tuns 7863a1ef75 Backed out changeset 6a408466ecb6 (bug 1731504) for causing bug 1739045 CLOSED TREE 2021-11-03 12:10:03 -04:00
Agi Sferro 58998fbef1 Bug 1715036 - Always detach compositor. r=calu,owlish
Most of our JNI code either holds strong references to Java objects, i.e. the
Gecko Garbage Collector is responsible for clearning the object, or weak
references to Java code, i.e. the Java GC is responsible for clearing the
object.

Some objects, however, are special and need manual care. These objects
implement the `onWeakNonIntrusiveDetach` method, which is manually triggered by
calling `Detach`.

My understanding is that these objects need to be cleared from either the Java
side (when the GC destroys the GeckoSession) or from the C++ side, when the
window associated to a GeckoSession is closed.

This is done to avoid holding off to a window for longer than necessary, since
it's very expensive to do so.

The intermittent subject of this bug was caused by us not clearing the
Compositor object when the window closes on the Gecko side, letting the Java
side call `syncPauseCompositor` on a dead JNI object.

This is the before code of the Compositor's `onWeakNonIntrusiveDetach`:

```
  void OnWeakNonIntrusiveDetach(already_AddRefed<Runnable> aDisposer) {
    RefPtr<Runnable> disposer = aDisposer;
    if (RefPtr<nsThread> uiThread = GetAndroidUiThread()) {
      // ...
      uiThread->Dispatch(NS_NewRunnableFunction(
          "LayerViewSupport::OnWeakNonIntrusiveDetach",
          [compositor, disposer = std::move(disposer),
           results = &mCapturePixelsResults, window = mWindow]() mutable {
            if (auto accWindow = window.Access()) {
	      // ...
              compositor->OnCompositorDetached();
            }

            disposer->Run();
          }));
    }
```

As you can see from the above, the `OnCompositorDetached` method, which informs
the Java layer that the compositor should not be called anymore, was only
invoked when `window.Access()` returns successfully, i.e.  when we have a
window that is alive.

Normally, a Compositor object always has a window associated to it, as there's
a strong link between the GeckoSession and the Compositor object on the Java
side.

There are, however, some edge cases (mostly during shutdown) where the Java
code holds a reference to the Compositor but not the GeckoSession. In those
cases, we would fail the following check

```
if (auto accWindow = window.Access()) {
```

And fail to call `OnCompositorDetached`.

We don't really need the window to call `OnCompositorDetached`, as explained
above, so we can just move the call outside the `if` statement to fix this
problem.

Differential Revision: https://phabricator.services.mozilla.com/D130101
2021-11-02 18:28:12 +00:00
Harry Twyford 6cd788487b Bug 1525788 - Support sending Handoff. r=mstange,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D129406
2021-11-02 18:08:08 +00:00
Emilio Cobos Álvarez c308704902 Bug 1738614 - Remove other Widget* colors. r=mstange
These are only used for frameset painting and the non-e10s <select>
dropdown focus codepath. We have other more appropriate standard
colors for this.

Differential Revision: https://phabricator.services.mozilla.com/D129992
2021-11-02 18:08:07 +00:00
Emilio Cobos Álvarez 923cf5df84 Bug 1738614 - Remove TextForeground/Background system colors. r=mstange
Same thing, there's nor reason these should be different from other
CSS-exposed colors.

Differential Revision: https://phabricator.services.mozilla.com/D129991
2021-11-02 18:08:07 +00:00
Emilio Cobos Álvarez ac14d7e42d Bug 1738614 - Remove WindowBackground/Foreground system colors. r=mstange
There's no reason for these to be different to the CSS-exposed
Window/WindowText.

Differential Revision: https://phabricator.services.mozilla.com/D129990
2021-11-02 18:08:07 +00:00
David Parks 08989409e1 Bug 1661127: Cache Windows IVirtualDesktopManager::GetWindowDesktopId value r=cmartin
GetWindowDesktopId is a slow function and is called on the UI thread during WM_CLOSE message handing (as part of SessionStore). This was causing Windows to assume we are stalled and it abandons some messages, namely future WM_CLOSE messages sent for other windows during a "Close All Windows" operation.

In this patch, GetWorkspaceId uses a cached value for GetWindowDesktopId (if available) but also queues an update for that cache value if one isn't already in progress. Since SessionStore already regularly calls GetWorkspaceId in response to window moves, this keeps the value fresh in plases where it might change. (The SessionStore architecture is designed that way because Windows does not notify the application if the user moves the window to another virtual desktop.)

Differential Revision: https://phabricator.services.mozilla.com/D128955
2021-11-02 17:18:23 +00:00
Robert Mader e8ada91b1c Bug 1736761 - Do not try to initialize GBM on Nvidia < 495, r=gfx-reviewers,jgilbert
It causes unnecessary error messages - and we do have the blocklist
already, so make use of it.

Differential Revision: https://phabricator.services.mozilla.com/D130133
2021-11-02 15:05:59 +00:00
Masayuki Nakano 4341d6fb0c Bug 1455514 - part 1: Add accessors and static helper methods to retrieve `nsINode` or its concrete classes from `EventTarget` r=smaug
Currently, checking whether an `EventTarget` is `nsINode` (or its concrete
classes) or not requires a QI, but it's expensive and used a lot while we
handle each event.  Therefore, it'd be nicer for creating a virtual method,
`EventTarget::IsNode()` and use it for the check.

If trying to convert `EventTarget` to a concrete class, it may require two
virtual method calls.  I'm not sure whether it's cheaper than a QI, but at
least, it won't depend on the UUID check order of `QueryInterface()` when
multiple interfaces are implemented.

Differential Revision: https://phabricator.services.mozilla.com/D129781
2021-11-02 13:03:43 +00:00
Emilio Cobos Álvarez f9f04528a1 Bug 1738613 - Implement MozNativevisitedhyperlinktext on GTK. r=stransky
This is just drive-by, I noticed we implement one color but not the
other which is unfortunate.

Depends on D129993

Differential Revision: https://phabricator.services.mozilla.com/D129994
2021-11-02 10:45:05 +00:00
Emilio Cobos Álvarez 88397b3a00 Bug 1738613 - Provide generic dark hyperlink system colors. r=dholbert
This will make sure they're used on Windows for the dark color scheme.

Differential Revision: https://phabricator.services.mozilla.com/D129993
2021-11-02 10:45:04 +00:00
stransky 1701b68173 Bug 1730533 [Linux] Use Drag and Drop popups on Gtk >= 3.24 r=rmader
Differential Revision: https://phabricator.services.mozilla.com/D129494
2021-11-02 07:34:35 +00:00
stransky 74c0beb525 Bug 1738729 [Linux] Check mGdkWindow before we get a scale factor of it, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D130108
2021-11-02 07:34:24 +00:00
Makoto Kato 1be11f4ee1 Bug 1556983 - Primary pointer capability should be coarse when having touch screen. r=geckoview-reviewers,agi
Many users report that GeckoView returns non-coarse value for primary pointer
capabilities. Actually, we assume that primary pointer device is 1st device by
`InputDevice.getDeviceIds`, but some mobile devices seems not to return touch
screen as 1st item according to user reports.

Also, Android's `InputDevice` API doesn't define what is primary pointer
device, so we cannot assume primary pointer device well.

Other implements are,

- Chrome returns coarse if something input device has coarse capability.
- Firefox for Windows seems to return coarse if it is tablet mode.

So we should return coarse as primary pointer capability when having touch
screen, like Chrome.

But there is still another issue.

When I check some devices (including Android VM on Chrome OS), even if no touch
screen, the `InputDevice`'s source may has `SOURCE_TOUCHSCREEN`. Chrome checks
that fine pointer at first, then it checks coarse pointer. But current GV is
coarse pointer at first. Since the `InputDevice`'s source may have both
`SOURCE_MOUSE` and `SOURCE_TOUCHSCREEN` on touchpad/mouse, GV returns different
result. So we shouldn't check `SOURCE_TOUCHSCREEN` at first.

Differential Revision: https://phabricator.services.mozilla.com/D129901
2021-11-02 02:04:06 +00:00
stransky 333dc73d8c Bug 1738639 [Wayland] Don't disable draw update for D&D widgets, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D130092
2021-11-01 17:30:19 +00:00
stransky c2ee50d259 Bug 1738482 [Linux] Force-resize mShell container for D&D popups, r=jhorak
DND window is placed inside container so we need to make hard size
request to ensure parent container is resized too.

Differential Revision: https://phabricator.services.mozilla.com/D130016
2021-11-01 11:26:10 +00:00
Emilio Cobos Álvarez 71e6f9ec23 Bug 1738616 - Enable color-scheme for nightly and early beta. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D129995
2021-11-01 10:53:36 +00:00
stransky 4c8765b06d Bug 1736949 [Linux] Implement child popup windows support, r=emilio
Child windows are not supported correctly now as we don't tie them to parent windows. It's because we removed child widget hierarchy
and use popups to draw them. In this patch we revert some changes to manage child popups appropriately:

- Introduce 'mIsChildWindow' flag to mark child popups.
- Use GdkWindow hierarchy to connect chid popup to its parent.
- Destroy all child popups when parent it also destroyed.
- Implement nsWindow::SetParent() and nsWindow::ReparentNativeWidget() for child popups.
- Fix GrabPointer() to ignore destroyed windows.

Differential Revision: https://phabricator.services.mozilla.com/D129964
2021-11-01 09:57:16 +00:00
Butkovits Atila 8f156aae82 Backed out changeset 811ddc8525f3 (bug 1730533) for causing regressions (Bug 1738639, Bug 1738482). CLOSED TREE 2021-11-01 12:05:29 +02:00
Emilio Cobos Álvarez e09c109ab2 Bug 1738608 - Allow customizing dark system colors by pref as well. r=mstange
Just noticed we don't quite have that capability, but it seems useful.

Differential Revision: https://phabricator.services.mozilla.com/D129989
2021-10-31 21:29:21 +00:00
Emilio Cobos Álvarez 69eeb9cb6c Bug 1738608 - Make autofill background configurable via system color prefs. r=mstange
And remove the autofill.background pref for 95 (or 96, depending on
when this lands) assuming nothing terrible causes us to turn it off on
94.

Differential Revision: https://phabricator.services.mozilla.com/D129988
2021-10-31 21:28:58 +00:00
Emilio Cobos Álvarez 2fad84276c Bug 1525107 - Move mozilla::ColorScheme definition to its own header. r=dholbert
No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D129745
2021-10-29 19:58:25 +00:00
stransky c5e7ceef0c Bug 1738026 [Wayland] Implement EnableRenderingToWindow()/DisableRenderingToWindow() to unify window rendering management, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D129948
2021-10-29 19:56:57 +00:00
Lukas Bernhard add789c413 Bug 1679076 - Recognize sway as desktop environment. r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D127986
2021-10-29 12:23:58 +00:00
Gabriele Svelto b49d7a0b90 Bug 1722208 - Fix automatically displaying the on-screen keyboard on Windows 11 when running on convertible slates r=cmartin
This fix simply ignores tablet mode when running on Windows 11. The
reasoning behind this is that per Microsoft documentation tablet mode
is specific to Windows 10 and not supported anymore on Windows 11. This
seems consistent in the behavior of the APIs we use to detect the
presence of a keyboard: Windows 10-specific APIs return unexpected
results while APIs that predate them return values that seem consistent
and reliable.

Differential Revision: https://phabricator.services.mozilla.com/D128229
2021-10-28 21:08:12 +00:00
Doug Thayer 90b2905a58 Bug 1737501 - Allow contextmenu option on Windows SystemStatusBar r=mconley
We want to be able to have a different behavior for interactions with an entry
in the Windows system tray - specifically, we want to be able to open a window
on left click, and show a menu on right click. This patch allows us to control
this with a "contextmenu" attribute on the menu passed in to `AddItem`, and
receive a "systemstatusbarclick" event in the case of a left click.

Regarding tests, I don't know that we have a good way of testing this?
Suggestions are of course welcome here.

Differential Revision: https://phabricator.services.mozilla.com/D129413
2021-10-28 16:07:31 +00:00
Harry Twyford 8035b857db Bug 1737620 - Fix misc errors in unified builds. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D129405
2021-10-28 14:31:54 +00:00
Jonathan Kew 2a3d097e41 Bug 1737751 - Account for macOS cursor scaling. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D129521
2021-10-28 12:25:23 +00:00
Emilio Cobos Álvarez 5b31eea4fd Bug 1737676 - Use GTK menu radius on native context menus and panels. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D129439
2021-10-28 10:52:31 +00:00
Markus Stange b0068bfe22 Bug 1737869 - Fix build with the macOS 12 SDK, by using AXTextMarker(Range)Ref instead of id and by ifdefing the declarations that are now public in the new SDK. r=eeejay
I think this patch is functionally neutral.
I'm not completely sure about the best way to do these casts - the __bridge may not be
necessary since we don't use ARC yet. But it's probably fine to add it anyway.
Also, returning autoreleased CFTypeRef objects seems a bit weird, but it's what we've
already been doing and it's probably fine.
And some of these nils should maybe be nullptrs, but the compiler doesn't seem to care.

Differential Revision: https://phabricator.services.mozilla.com/D129559
2021-10-27 20:38:07 +00:00
Emilio Cobos Álvarez 0e591e3574 Bug 1737352 - Make some more system colors respect the requested color-scheme on macOS. r=mac-reviewers,harry
This makes me think that pre-10.13 macOS is the only platform without dark
system colors...

We might want to do something like D127645 for pre-10.14 macs?

Differential Revision: https://phabricator.services.mozilla.com/D129575
2021-10-27 14:11:59 +00:00
Olli Pettay 7938f41dae WIP: Bug 1731504, explicitly call capturing listeners before bubbling listeners at target r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D128956
2021-10-27 12:37:50 +00:00
Kai Engert 9a31bd4c81 Bug 1737489 - Application specific backout of bug 1691171, only for MOZ_THUNDERBIRD. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D129503
2021-10-26 16:48:51 +00:00
stransky 7c6573e619 Bug 1730533 [Linux] Use Drag and Drop popups on Gtk >= 3.24 r=rmader
Differential Revision: https://phabricator.services.mozilla.com/D129494
2021-10-26 11:50:16 +00:00
sotaro e58ea79f59 Bug 1737526 - Add support of dynamic enabling/disabling window occlusion by pref r=jrmuizel,gfx-reviewers
For Bug 1733955, we need a support of dynamic enabling/disabling window occlusion by pref. It is for enabling/disabling window occlusion for some mochitests by pref.

Differential Revision: https://phabricator.services.mozilla.com/D129369
2021-10-26 02:37:42 +00:00
sotaro d346bc61a7 Bug 1737236 - Add WinWindowOcclusionTracker::DumpOccludingWindows() r=gfx-reviewers,jrmuizel
WinWindowOcclusionTracker::DumpOccludingWindows() could be used to check occluding windows.

Differential Revision: https://phabricator.services.mozilla.com/D129238
2021-10-26 02:35:25 +00:00
Emilio Cobos Álvarez 6b058cc559 Bug 1737322 - Use a semi-transparent dark color for middle of the focus outline in dark mode. r=mstange
Make both the light and dark colors less opaque too, since even in light
mode it looks very off IMO for stuff like:

  data:text/html,<body bgcolor=grey><input>

Differential Revision: https://phabricator.services.mozilla.com/D129302
2021-10-25 16:44:04 +00:00
ssummar 51c0ff21e5 Bug 1626517 - Replaced mozilla::Unused with mozilla::Ignore in mozilla::Decoder/mozilla::Encoder calls. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D129022
2021-10-25 12:31:41 +00:00
stransky 81a77bea90 Bug 1737069 [Linux] Remove widget hierarchy from nsWindow::SetFocus() r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D129241
2021-10-25 09:52:26 +00:00
stransky 3830834255 Bug 1737069 [Linux] mShell is always toplevel so don't walk GdkWidget hierarchy for toplevel windows, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D129240
2021-10-25 09:32:08 +00:00
stransky 81deda2863 Bug 1737068 [Linux] Grab pointer when window is mapped and there's an active request for it, r=rmader
Depends on D127542

Differential Revision: https://phabricator.services.mozilla.com/D129316
2021-10-25 09:30:07 +00:00
stransky c04b8374fd Bug 1737068 [Linux] Postpone compositor rendering until widget window is ready, r=rmader
- When GtkCompositorWidget is created, make suspended rendering state as initial one as we can't render to widget window.
  Enable rendering when underlying window is visible (nsWindow::ConfigureGdkWindow) or GtkCompositorWidget is assigned (nsWindow::SetCompositorWidgetDelegate).
- Use moz_container_wayland_add_initial_draw_callback() at nsWindow::ConfigureGdkWindow() to set Wayland EGL window as it was before.
- Make moz_container_wayland_add_initial_draw_callback() to run callbacks instantly when mozcontainer is already visible.
- Implement and use moz_container_wayland_clear_initial_draw_callback() to clear mozcontainer callbacks when it becomes hidden.
- Rename COMPOSITOR_PAUSED_MISSING_EGL_WINDOW to COMPOSITOR_PAUSED_MISSING_WINDOW as it's used for GLX too.
- Initially pause rendering for GLX too.

Differential Revision: https://phabricator.services.mozilla.com/D127542
2021-10-25 09:30:07 +00:00