Commit Graph

26252 Commits

Author SHA1 Message Date
Toshihito Kikuchi
fae0df7eaf Bug 1633718 - Make sure not to call OpenThemeData if it failed before. r=mstange
As bug 1544435, we blocked wbload.dll from being loaded in content processes.
Because that modules is injected via `user32!RegisterUserApiHook` and Windows
keeps trying to load hooking modules even if the previous attempt has failed,
blocking wbload.dll caused repetitive loading attempts in the tab process,
resulting in bad rendering performance.

This patch is to mitigate that performance issue by not calling `OpenThemeData`,
which is one of the entrypoints triggering user api hook, if the previous call
has failed.  With this patch, performance is still slower than with the default
theme.  We will seek out a long-term solution to solve the issue.

Differential Revision: https://phabricator.services.mozilla.com/D73344
2020-04-30 21:28:21 +00:00
Mike de Boer
95f38c631d Bug 1630732 - Disable moving windows to a different space when the 'screensHaveSeparateSpaces' configuration option is set in Mission Control on Mac OSX. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D72169
2020-04-30 16:40:11 +00:00
Makoto Kato
fc29e1e8e1 Bug 1596920 - Don't set selection on dispatching key event if unnecessary. r=geckoview-reviewers,snorp
Actually we emulate key event (down, press and up) from replace transaction of
`Editable`. When dispatching key press, we always update current caret position.

Most situations is the following.
1. Dispatch keypress
2. Dispatch another keypress
3. Receive merged text/selection change result by 1. and 2.
4. Sync shadow (Java's Editable) text with 3.'s result. It means selection is
   correct position now.
5. Dispatch keypress with correct position.

When this issue occurs, the following situation occurs.
1. Dispatch keypress
2. Dispatch another keypress
3. Receive text/selection change result of 1.
4. Sync shadow (Java's Editable) text with 3.'s result. It means selection is
   old position now.
5. Dispatch another keypress with old position.
6. Receive text/selection change result of 2.
7. Receive text/selection change result of 5.

So when dispatching key press, we shouldn't always update selection if unnecessary.
Because selection range is already often set before dispatching key press.

Differential Revision: https://phabricator.services.mozilla.com/D71179
2020-04-28 14:02:10 +00:00
Simon Giesecke
49eb05a114 Bug 1626570 - Improve handling of copying arrays in widget/. r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D72321
2020-04-30 09:38:38 +00:00
Gerald Squelart
22a7a23613 Bug 1530419 - Move PROFILER_AUTO_THREAD_SLEEP into WinUtils::WaitForMessage from callers - r=mstange
Both `nsAppShell::ProcessNextNativeEvent()` and `MessagePumpForUI::WaitForWork()` have a `PROFILER_AUTO_THREAD_SLEEP` surrounding the `mozilla::widget::WinUtils::WaitForMessage()` call.
However inside `WaitForMessage()` the call to `PeekMessageW()` may trigger a sequence of events (because the system delivers pending messages) that end in the initialization of a new thread, which invokes `ReentrantMonitor::Wait()` where there is a `PROFILER_AUTO_THREAD_SLEEP`.

To avoid this recursion, this patch moves `PROFILER_AUTO_THREAD_SLEEP` from both callers into `WaitForMessage()` to only enclose the actual potentially-sleeping operation `::MsgWaitForMultipleObjectsEx()`.

Differential Revision: https://phabricator.services.mozilla.com/D72850
2020-04-28 16:22:13 +00:00
Jeff Muizelaar
c2562601fe Bug 1633490 - Rollout WebRender to AMD Evergreen on Nightly. r=aosmond
Let's keep this Nightly only for now because it's an older set of
devices.

Differential Revision: https://phabricator.services.mozilla.com/D72709
2020-04-28 14:53:13 +00:00
Csoregi Natalia
b073baab86 Backed out 30 changesets (bug 1556556, bug 1631568) for multiple mochitest failures. CLOSED TREE
Backed out changeset edd529f7a9c5 (bug 1631568)
Backed out changeset 1cc0881e244b (bug 1631568)
Backed out changeset ed3c1e85d5e3 (bug 1556556)
Backed out changeset 38ffc6215bbf (bug 1556556)
Backed out changeset 03c2c25d8023 (bug 1556556)
Backed out changeset 9c717eb067b8 (bug 1556556)
Backed out changeset 98e26bc98b85 (bug 1556556)
Backed out changeset 05a6a581e755 (bug 1556556)
Backed out changeset 867946cf05bb (bug 1556556)
Backed out changeset 20d72a334530 (bug 1556556)
Backed out changeset 2c62e61d9054 (bug 1556556)
Backed out changeset 62a223d057d2 (bug 1556556)
Backed out changeset 2c5d55a1f0b1 (bug 1556556)
Backed out changeset 700447945b4e (bug 1556556)
Backed out changeset 93190ae4f5ff (bug 1556556)
Backed out changeset a7bd34d961bb (bug 1556556)
Backed out changeset fccd1d3c7189 (bug 1556556)
Backed out changeset 24056e47183d (bug 1556556)
Backed out changeset 204881474cc1 (bug 1556556)
Backed out changeset 387320881876 (bug 1556556)
Backed out changeset be8f5eb58460 (bug 1556556)
Backed out changeset 629c58a9166b (bug 1556556)
Backed out changeset 4312b2b5dda8 (bug 1556556)
Backed out changeset d11dbf6403a5 (bug 1556556)
Backed out changeset 95c54c023779 (bug 1556556)
Backed out changeset 80fcb7e71188 (bug 1556556)
Backed out changeset d75a4ecb0d47 (bug 1556556)
Backed out changeset 903c4de34e7a (bug 1556556)
Backed out changeset f15334a3e803 (bug 1556556)
Backed out changeset 9553e99137ea (bug 1556556)
2020-04-28 12:43:11 +03:00
Botond Ballo
219449f114 Bug 1556556 - Document WidgetEvent::mRefPoint as being in visual coordinates. r=kats
This is already the case for real input events since that's how they
arrive from APZ, and we are no longer changing the coordinates at
the process boundary.

For synthesized events, a future patch will add layout-to-visual
converions to code that sets mRefPoint as appropriate.

Differential Revision: https://phabricator.services.mozilla.com/D68917
2020-04-28 01:38:15 +00:00
Botond Ballo
b11a399d42 Bug 1556556 - Remove many uses of IgnoreRootScrollFrame. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D68913
2020-04-28 02:25:51 +00:00
Botond Ballo
f9e919a8f4 Bug 1556556 - Remove applications of the visual-to-layout transform at the process boundary (and equivalent places for non-e10s). r=kats
Note that the propagation of the target guid to places where the transform
will be applied is best-effort at the moment. In particular, the
InputAPZContext will result in the correct guid being available in places
that are called synchronously from the Recv*() functions, but not places
called asynhcronously (e.g. via DelayedFireSingleTapEvent).

To mitigate this, places where the transform is applied fall back on the
RCD-RSF if a guid is not available via InputAPZContext (added in a
subsequent patch).

The cases that this gets wrong are fairly edge casey (it requires (a) an
asynchronous codepath, (b) an event targeting a subframe, and (c) that
subframe having a "could not accept the APZ scroll position" transform),
so we just punt on them for now. If it turns out to be important to handle,
then options for doing so include (1) propagating the guid through each of
the affected asynchronous codepaths, or (2) attaching the guid to the event
itself.

Differential Revision: https://phabricator.services.mozilla.com/D68723
2020-04-28 01:34:22 +00:00
Jeff Muizelaar
951ea8e9b4 Bug 1628809. Allow WebRender on Nvidia+battery all screen sizes. r=aosmond
We want this to ride into 77. It's a very small population.

Differential Revision: https://phabricator.services.mozilla.com/D72761
2020-04-27 22:24:37 +00:00
Timothy Nikkel
38a1920e37 Bug 1633343. Also use the style WS_EX_TRANSPARENT on the compositor window. r=sotaro
The original workaround given by Microsoft was both WS_EX_TRANSPARENT and WS_EX_LAYERED. In bug 1627505 we tried to just add WS_EX_LAYERED because it was all that was needed to fix that bug and we hoped it wouldn't re-introduce the blank window problem. But it did. So we may as well go with both flags as recommended by Microsoft.

Differential Revision: https://phabricator.services.mozilla.com/D72598
2020-04-27 13:27:07 +00:00
Jeff Muizelaar
ad14a3ebc3 Bug 1633508 - Rollout WebRender to Coffeelake GT1 GPUs. r=aosmond
These aren't particularly common but there basically
the same as Skylake GT1.

Differential Revision: https://phabricator.services.mozilla.com/D72719
2020-04-27 18:14:27 +00:00
Jeff Muizelaar
fcce3abceb Bug 1633412 - Rollout WebRender to Intel Icelake r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D72660
2020-04-27 15:28:43 +00:00
Jeff Muizelaar
f9a64ef094 Bug 1633411 - Roll out WebRender to AMD Raven Ridge devices. r=aosmond
This is a modern AMD APU

Differential Revision: https://phabricator.services.mozilla.com/D72658
2020-04-27 15:05:21 +00:00
Jeff Muizelaar
2362f66489 Bug 1633290 - Enable WebRender on Skylake GT1. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D72571
2020-04-27 00:52:57 +00:00
Sylvestre Ledru
34acbb653a Bug 1619165 - Reformat recent changes to the Google coding style r=andi
First reformat with clang-format 10

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D68802
2020-04-25 09:40:08 +00:00
Chun-Min Chang
530a6c8ee6 Bug 1631608 - P6: Log error message when PropertiesChanged signal fails being emitted r=alwu
- Log error messages when `PropertiesChanged` signal fails being emitted
- Add some missing `':'` in error messages

Differential Revision: https://phabricator.services.mozilla.com/D72195
2020-04-24 22:39:20 +00:00
Chun-Min Chang
ec57fa6d2a Bug 1631608 - P5: Define mpris:trackid r=alwu
The `"mpris:trackid"` [1] is an unique dbus path identifying the track.
It's better to use a more specific path for `"mpria:trackid"` instead of
using a `"/valid/path"` that can appear on any example code. The
rythembox [2,3] and vlc [4,5] also uses their own special path for their
`"mpris:trackid"` so Firefox should do the same.

On the other hand, Chrome doesn't use `"mpris:trackid"` at all. That
indeed works but the spec [1] explicitly states `"mpris:trackid"` must
be defined if there is a current track.

Thus, to make sure the implementation meets the spec [1], the
`"mpris:trackid"` must be defined in MPRIS's `"Metadata"` field by an
unique path value that belongs to Firefox only.

[1] https://specifications.freedesktop.org/mpris-spec/2.2/Player_Interface.html#Property:Metadata
[2] 7542759eda/plugins/mpris/rb-mpris-plugin.c (L547)
[3] 7542759eda/plugins/mpris/rb-mpris-plugin.c (L55)
[4] 9ddf27caa7/modules/control/dbus/dbus.c (L1300)
[5] 9ddf27caa7/modules/control/dbus/dbus_common.h (L90)

Differential Revision: https://phabricator.services.mozilla.com/D71869
2020-04-24 22:39:12 +00:00
Chun-Min Chang
c9eafeca3c Bug 1631608 - P4: Define "org.mpris.MediaPlayer2.Player" in macro r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D71868
2020-04-24 22:39:10 +00:00
Chun-Min Chang
e3b7390390 Bug 1631608 - P3: Use %d for int r=alwu
Align the policy to get the dbus name in `MPRISServiceHandler::Open`
with the one in `MPRISServiceHandler::Close()`

Differential Revision: https://phabricator.services.mozilla.com/D71865
2020-04-24 22:39:08 +00:00
Chun-Min Chang
cff082955d Bug 1631608 - P2: Emit DBus signal once MPRIS Metadata is set r=alwu
According to spec [1], when the `Metadata` is changed, a signal with the
new `Metadata` value should be emitted.

[1] https://specifications.freedesktop.org/mpris-spec/2.2/Player_Interface.html#Property:Metadata

Differential Revision: https://phabricator.services.mozilla.com/D71864
2020-04-24 22:39:00 +00:00
Chun-Min Chang
9236093c78 Bug 1631608 - P1: Log messages when getting or setting metadata r=alwu
By monitoring the added logs, any access to the metadata can be watched.

Differential Revision: https://phabricator.services.mozilla.com/D71863
2020-04-24 22:38:58 +00:00
Jeff Muizelaar
e11b7fe8c4 Bug 1632961 - Fix up kabylake ids. r=aosmond
Remove duplicates and add back 0x5912

Differential Revision: https://phabricator.services.mozilla.com/D72441
2020-04-24 19:34:12 +00:00
Martin Stransky
42d551312e Bug 1628583 [Wayland] Use mutex to access mozcontainer wayland internals, r=jhorak
Mozcontainer is accessed from various threads - Main/Compositor/Renderer - which causes races
when wayland surfaces are created/deleted/updated so we need to control it.

Differential Revision: https://phabricator.services.mozilla.com/D71737
2020-04-24 17:19:15 +00:00
Simon Giesecke
191a830575 Bug 1628715 - Part 7: Add MOZ_NONNULL_RETURN to infallible nsTArray::AppendElements. r=xpcom-reviewers,necko-reviewers,nika,valentin
Differential Revision: https://phabricator.services.mozilla.com/D70831
2020-04-24 13:31:14 +00:00
Timothy Nikkel
ae8f3fddd1 Bug 1632357. Add a pref to disable adding the WS_EX_LAYERED style to the compositor window. r=sotaro
On older machines it creates a blank window and we only need the pref to direct manipulation (which hasn't landed yet and will be preffed off by default when it lands).

Differential Revision: https://phabricator.services.mozilla.com/D72283
2020-04-24 08:58:16 +00:00
Cosmin Sabou
16f21e6dae Backed out 1 changesets (bug 1632357) for build bustages. CLOSED TREE
Backed out changeset 428d3ada2cb2 (bug 1632357)
2020-04-24 11:21:31 +03:00
Timothy Nikkel
ea404ff352 Bug 1632357. Add a pref to disable adding the WS_EX_LAYERED style to the compositor window. r=sotaro
On older machines it creates a blank window and we only need the pref to direct manipulation (which hasn't landed yet and will be preffed off by default when it lands).

Differential Revision: https://phabricator.services.mozilla.com/D72283
2020-04-24 07:38:09 +00:00
Tom Schuster
7abdca1793 Bug 1631196 - Implement MPRIS Raise event by focusing the window playing media. r=alwu
Implement MPRIS Raise event by focusing the window playing media.

Differential Revision: https://phabricator.services.mozilla.com/D71450
2020-04-23 19:32:34 +00:00
Brindusan Cristian
42e680a4ef Merge mozilla-central to autoland on a CLOSED TREE 2020-04-24 00:44:23 +03:00
Brindusan Cristian
295d851672 Merge autoland to mozilla-central. a=merge 2020-04-24 00:42:24 +03:00
Noemi Erli
71ad949346 Backed out changeset 779722364805 (bug 1628583) per request a=backout 2020-04-23 17:54:42 +03:00
Martin Stransky
59c99a1b8c Bug 1632059 [Wayland] Use wayland display directly for va-api, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D72122
2020-04-23 16:06:54 +00:00
Martin Stransky
7112c02038 Bug 1603839 [Linux] Explicitly set Wayland/X11 backend for GtkCompositorWidget, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D71888
2020-04-23 17:26:17 +00:00
Jeff Muizelaar
4cefa44bc5 Bug 1632239 - Reduce AMD DirectComposition blocking. r=aosmond
Haven't seen any problems so lets be less conservative.
This uses the arbitrary broken version as a new minimum.

Differential Revision: https://phabricator.services.mozilla.com/D72018
2020-04-22 19:02:27 +00:00
Jeff Muizelaar
a158aafa00 Bug 1632240 - Add some more Kabylake ids. r=aosmond
This adds support for kabylake gt1 and gt1.5

Differential Revision: https://phabricator.services.mozilla.com/D72019
2020-04-22 19:02:44 +00:00
Emilio Cobos Álvarez
3e3dc71cba Bug 1631887 - Claim to support NonDisappearingScrollbarWidth on the non-native theme. r=spohl
This is used by platforms with overlay scrollbars, only in order to
reserve enough space for the chevron of the `<select>` element.

So our general min-widget-size, which is the same as for scrollbars
works.

Differential Revision: https://phabricator.services.mozilla.com/D71825
2020-04-22 17:45:39 +00:00
Kartikaya Gupta
763e05dece Bug 1627716 - Remove GeckoView API exposing the DynamicToolbarAnimator. r=geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D71776
2020-04-22 11:50:40 +00:00
Martin Stransky
bff4088157 Bug 1632100 [Wayland] Emulate window focus change by window hide/show when running in testsuite, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D71926
2020-04-22 15:54:06 +00:00
Martin Stransky
f5dbae2f0c Bug 1628583 [Wayland] Use mutex to access mozcontainer wayland internals, r=jhorak
Mozcontainer is accessed from various threads - Main/Compositor/Renderer - which causes races
when wayland surfaces are created/deleted/updated so we need to control it.

Differential Revision: https://phabricator.services.mozilla.com/D71737
2020-04-22 15:53:49 +00:00
Jeff Muizelaar
c0acfaa944 Bug 1632202. Enable WebRender on some Gen7 in Nightly. r=aosmond
Seems to work well enough.

Differential Revision: https://phabricator.services.mozilla.com/D71986
2020-04-22 15:28:14 +00:00
Makoto Kato
784bdca25f Bug 1626389 - Part 1. Use JNI to get password setting even if content process. r=geckoview-reviewers,snorp
Now we can use JNI on content process, so it is unnecessary to use sync IPC
to get password setting.

Differential Revision: https://phabricator.services.mozilla.com/D71707
2020-04-21 14:54:29 +00:00
Jeff Muizelaar
c575c3531c Bug 1632002. Re-enable WebRender on Gen7.5 in Nightly.
Scrolling on Youtube (Bug 1576637) has improved enough
that we can turn gen7 back on in Nightly

Differential Revision: https://phabricator.services.mozilla.com/D71859
2020-04-22 01:18:23 +00:00
Bogdan Tara
62d94d25d6 Backed out changeset c7623d3b49ec (bug 1631887) for foreignObject-img-form-theme.html CLOSED TREE 2020-04-22 02:14:37 +03:00
Haik Aftandilian
b6992791c8 Bug 1629313 - Part 1 - Set As Desktop Background fails on macOS r=spohl
Change the nsMacShellService::SetDesktopBackground() implementation (specifically code in the OnStateChange handler) to use the Apple setDesktopImageURL API instead of Apple Events to allow the "Set As Desktop Background..." context menu option to work again.

Alternatively, to allow the AppleEvent-base implementation to work again, Firefox could be signed with the com.apple.security.automation.apple-events entitlement but this would also require the user to grant Firefox permission to control Finder. setDesktopImageURL requires Mac OS 10.6 or newer and hence was not an option originally.

The implementation only changes the background of the focused screen in the current workspace (which matches the behavior of Safari).

Differential Revision: https://phabricator.services.mozilla.com/D71426
2020-04-21 19:57:29 +00:00
Emilio Cobos Álvarez
2368532cda Bug 1631887 - Claim to support NonDisappearingScrollbarWidth on the non-native theme. r=spohl
This is used by platforms with overlay scrollbars, only in order to
reserve enough space for the chevron of the `<select>` element.

So our general min-widget-size, which is the same as for scrollbars
works.

Differential Revision: https://phabricator.services.mozilla.com/D71825
2020-04-21 20:36:22 +00:00
Jan Horak
2cc879bea5 Bug 1623974 [wayland] Attach popups to anchor rects; r=stransky
If we want correct popup placement we need to use the right anchor rect
for gdk_window_move_to_rect under Wayland. Patch exports the anchor rect from the
nsMenuPopupFrame to be used in nsWindow.

This patch also fixes popup overflowing the screen by using the size returned from
gdk_window_move_to_rect for the nsMenuPopupFrame.

Differential Revision: https://phabricator.services.mozilla.com/D67810
2020-04-21 19:19:30 +00:00
Robert Mader
a000f064be Bug 1629140 - Enable frame callback based VsyncSource by default. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D70551
2020-04-21 11:34:14 +00:00
Chris Peterson
ce0c6b20bb Bug 1624786 - Replace "clang-format off" with semicolon workaround for clang-format bug 1629756. r=spohl
This semicolon workaround is tidier than the `// clang-format off/on` comments and avoids turning off all clang-format checks. The comment also links to clang-format bug 1629756 so future code readers can learn why this extra semicolon exists. And if we find a way to fix this in clang-format, then we can search for this bug number to find and remove these extra semicolons and comments.

Differential Revision: https://phabricator.services.mozilla.com/D71504
2020-04-20 12:18:48 +00:00