Commit Graph

1010 Commits

Author SHA1 Message Date
Doug Thayer
2b9c40919a Bug 1656526 - Show blank window prior to loading xul on Windows r=mhowell
See bug for justification. This patch aims to display a blank window prior to
loading/prefetching xul.dll. It also has a placeholder for drawing a
skeleton UI into that window. Note that this is disabled by default based on
a registry value, as there are still kinks to work out (for instance, what
happens if we aren't actually going to display a window, because, say, Firefox
is already running.) This just gives a basic implementation to dogfood, and
facilitates distributing work across multiple contributors.

Onto the details. The patch achieves its goal by creating a window and
assigning its handle to a static variable, which will be consumed inside
nsWindow::Create by the first toplevel window we want to make. nsWindow::Create
will take ownership of the window handle, restyle it to its own liking, and
then proceed as if everything is normal and it had created the window itself.

Differential Revision: https://phabricator.services.mozilla.com/D86263
2020-09-15 14:50:19 +00:00
Dorel Luca
d2a7f8f4cb Backed out 4 changesets (bug 1656526) for Browser-chrome failures in toolkit/xre/test/browser_checkdllblockliststate.js. CLOSED TREE
Backed out changeset 24648c48a49c (bug 1656526)
Backed out changeset 472b724994eb (bug 1656526)
Backed out changeset 6fbb7e7ac121 (bug 1656526)
Backed out changeset 88ff36a4bcfb (bug 1656526)
2020-09-11 23:17:23 +03:00
Doug Thayer
2565fb48f2 Bug 1656526 - Show blank window prior to loading xul on Windows r=mhowell
See bug for justification. This patch aims to display a blank window prior to
loading/prefetching xul.dll. It also has a placeholder for drawing a
skeleton UI into that window. Note that this is disabled by default based on
a registry value, as there are still kinks to work out (for instance, what
happens if we aren't actually going to display a window, because, say, Firefox
is already running.) This just gives a basic implementation to dogfood, and
facilitates distributing work across multiple contributors.

Onto the details. The patch achieves its goal by creating a window and
assigning its handle to a static variable, which will be consumed inside
nsWindow::Create by the first toplevel window we want to make. nsWindow::Create
will take ownership of the window handle, restyle it to its own liking, and
then proceed as if everything is normal and it had created the window itself.

Differential Revision: https://phabricator.services.mozilla.com/D86263
2020-09-11 14:12:00 +00:00
Edgar Chen
d81e43a2d8 Bug 1653949 - Part 1: Change mExitFrom in WidgetMouseEvent to be Maybe<ExitFrom>; r=smaug
mExitFrom now contains a value only when mMessage is eMouseExitFromWidget

Differential Revision: https://phabricator.services.mozilla.com/D88225
2020-08-27 17:19:03 +00:00
Cosmin Sabou
1dbc50be82 Backed out 5 changesets (bug 1653949) for assertion failures on EventStateManager.cpp. CLOSED TREE
Backed out changeset ad7c35ab2a40 (bug 1653949)
Backed out changeset 31cb90ef998a (bug 1653949)
Backed out changeset 03e65cbd2a11 (bug 1653949)
Backed out changeset a87ac2a7db70 (bug 1653949)
Backed out changeset 390dd2c04cd4 (bug 1653949)
2020-08-27 20:13:20 +03:00
Edgar Chen
f695af7814 Bug 1653949 - Part 1: Change mExitFrom in WidgetMouseEvent to be Maybe<ExitFrom>; r=smaug
mExitFrom now contains a value only when mMessage is eMouseExitFromWidget

Differential Revision: https://phabricator.services.mozilla.com/D88225
2020-08-26 14:19:46 +00:00
Razvan Maries
2e5b12f085 Backed out 2 changesets (bug 1656526) for build bustages on EarlyBlankWindow.cpp. CLOSED TREE
Backed out changeset b6d3b254ae8c (bug 1656526)
Backed out changeset abdc9c22078c (bug 1656526)
2020-08-18 19:10:37 +03:00
Doug Thayer
ebf5989596 Bug 1656526 - Show blank window prior to loading xul on Windows r=mhowell
See bug for justification. This patch aims to display a blank window prior to
loading/prefetching xul.dll. It also has a placeholder for drawing a
skeleton UI into that window. Note that this is disabled by default based on
a registry value, as there are still kinks to work out (for instance, what
happens if we aren't actually going to display a window, because, say, Firefox
is already running.) This just gives a basic implementation to dogfood, and
facilitates distributing work across multiple contributors.

Onto the details. The patch achieves its goal by creating a window and
assigning its handle to a static variable, which will be consumed inside
nsWindow::Create by the first toplevel window we want to make. nsWindow::Create
will take ownership of the window handle, restyle it to its own liking, and
then proceed as if everything is normal and it had created the window itself.

Differential Revision: https://phabricator.services.mozilla.com/D86263
2020-08-18 15:31:28 +00:00
Kartikaya Gupta
62cb358404 Bug 1653576 - Don't let dmanip events roll up popups if the events are inside the popup. r=tnikkel
The existing rollup-handling code in SendAnAPZEvent was mostly copied from
the DealWithPopups function, so this patch removes that duplication and reuses
the existing codepath. And it adds some extra checking for dmanip events that
mirrors the checking we do for other events, so that events that are targeted
inside the popup don't cause the popup to get rolled up.

Differential Revision: https://phabricator.services.mozilla.com/D86603
2020-08-11 21:44:30 +00:00
Kartikaya Gupta
d3e8980163 Bug 1653576 - Generify EventIsInsideWindow to allow passing a point. r=tnikkel
This allows us to reuse this function and the GetPopupsToRollup function when
an event point is different than what comes out of GetMessagePos.

For instance, the WM_POINTERDOWN code can now reuse this functions properly.
This fixes a latent bug where it was calling GetPopupsToRollup which was using
an possibly-incorrect point internally.

Differential Revision: https://phabricator.services.mozilla.com/D86754
2020-08-11 22:15:51 +00:00
Timothy Nikkel
7ebf4d56fb Bug 1657073. Make sure to destroy direct manipulation objects before we clear our HWND pointer. r=kats
Otherwise when we try to call Deactivate on the direct manipulation manager (to balance the Activate call) we won't have the HWND pointer and so it won't balance and we will leak.

We call DestroyDirectManipulation in nsWindow::Destroy but it looks like nsWindow::OnDestroy can be called before nsWindow::Destroy.

Differential Revision: https://phabricator.services.mozilla.com/D85835
2020-08-04 12:13:50 +00:00
Kris Taeleman
bcce36c131 Bug 1651511 - Add Desktop zooming to experiments. r=botond,fluent-reviewers,preferences-reviewers,tnikkel,flod,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D83574
2020-07-24 20:16:40 +00:00
Doug Thayer
4db191dfe7 Bug 1651165 - Rename idle service r=Gijs,geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D83413
2020-07-20 16:06:59 +00:00
Edgar Chen
3a6dc4853e Bug 1649475 - Remove touch/precise-input-detected observers; r=jmathies
Differential Revision: https://phabricator.services.mozilla.com/D81719
2020-07-17 19:47:20 +00:00
Xidorn Quan
d7dffcd663 Bug 1350875 part 4 - Have windows notify fullscreen will change. r=jmathies
Differential Revision: https://phabricator.services.mozilla.com/D68681
2020-07-15 12:21:45 +00:00
Simon Giesecke
2dcd4de57b Bug 1652008 - Add some missing include directives in widget/windows. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D83102
2020-07-15 13:43:37 +00:00
Kagami Sascha Rosylight
fa52b89e00 Bug 1483448 - Use WinUtils::GetSystemMetricsForDpi() to get frame sizes r=cmartin
Currently `nsWindow::UpdateNonClientMargins()` calls DPI-unaware `GetSystemMetrics()` to get the window frame sizes and `nsWindow::ProcessMessage()` simply multiplies them by the screen scale ratio. This is wrong as the frame sizes do not increase in linear scale (8 in 100% scale while 13 in 200% scale). This patch uses DPI-aware `GetSystemMetricsForDpi()` to correct this.

Differential Revision: https://phabricator.services.mozilla.com/D81447
2020-07-10 18:13:42 +00:00
Simon Giesecke
a69d79b6db Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Marco Bonardo
300ede4077 Bug 1628948 - Dispatch a custom event for WM_NCLBUTTONDOWN in the draggable area. r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D77419
2020-06-25 17:37:03 +00:00
Chris Martin
39881e26c6 Bug 1400317 - Win32k Lockdown: Remote SPI_GETFLATMENU r=jmathies
SPI_GETFLATMENU uses the newly-added WinContentSystemParameters and adds
the ability to update theme-related variables when they change.

Differential Revision: https://phabricator.services.mozilla.com/D80071
2020-06-24 15:29:58 +00:00
Kagami Sascha Rosylight
9fc6449e98 Bug 1643464 - Part 2: Rename eLeft/eRightFlag to ePrimary/eSecondaryFlag r=masayuki,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D80332
2020-06-22 22:54:07 +00:00
Kagami Sascha Rosylight
413c249077 Bug 1643464 - Part 1: Rename eLeft/eRight to ePrimary/eSecondary r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D80331
2020-06-19 18:02:41 +00:00
Cosmin Sabou
8bac03a77c Backed out changeset 5777919cd214 (bug 1400317) for causing Windows MinGW all bustages on WinThemeData.cpp. CLOSED TREE 2020-06-16 02:08:51 +03:00
Chris Martin
920bd74372 Bug 1400317 - Centralize ThemeData-related calls r=jmathies
To enable Win32k lockdown, calls involving native theme will need to be
removed.

Currently these calls are scattered around several files. This class creates
a proxy for the Win32 calls. Whitelisting this class in awcw32ks makes it much
easier to track Win32k removal with themes removed.

As an added benefit, once non-native theming is done it will be easy to verify
by asserting that this class is never created in Content.

Differential Revision: https://phabricator.services.mozilla.com/D75946
2020-06-15 21:46:28 +00:00
Emilio Cobos Álvarez
f1bfd4a5c3 Bug 1640191 - Simplify system colors change notification. r=jmathies
The current notification enumerates all windows and calls
SysColorChanged on them.

The current implementation of SysColorChanged is not quite sound, as it
really needs most if not all of what ThemeChanged does: SVGs can use
system colors, so we need to also invalidate the image cache for
example.

It's also not clear it deals correctly with propagating system color
changes to other documents.

In some cases we were even firing both theme changes and system color
changes at the same time. Unify this code paths.

Differential Revision: https://phabricator.services.mozilla.com/D76487
2020-06-10 15:18:25 +00:00
sotaro
ca0cc7381f Bug 1633713 - Set WS_EX_COMPOSITED to PiP window on Windows7 r=jrmuizel
When window is PiP window on Windows7, WS_EX_COMPOSITED is set to suppress flickering during resizing with hardware acceleration as a workaround.

PiP window detection in nsAppShellService::JustCreateTopWindow() mimics Linux/Gtk implementation.

Differential Revision: https://phabricator.services.mozilla.com/D77663
2020-06-09 13:35:52 +00:00
Mike Conley
6bfffa0230 Bug 1641546 - Make sure alwaysontop windows don't pull focus when first opening on Windows. r=mhowell
Depends on D77503

Differential Revision: https://phabricator.services.mozilla.com/D77528
2020-06-08 18:01:12 +00:00
Coroiu Cristina
5622ff32da Backed out 6 changesets (bug 1641546) for permafailing browser-chrome at browser_devices_get_user_media_unprompted_access_tear_off_tab.js
Backed out changeset 2652e1c084a7 (bug 1641546)
Backed out changeset 72a62a455c47 (bug 1641546)
Backed out changeset 4746c37be3e6 (bug 1641546)
Backed out changeset a2b64d290c0b (bug 1641546)
Backed out changeset 2dc2a430c2e7 (bug 1641546)
Backed out changeset 041cd14e3893 (bug 1641546)
2020-06-06 19:13:06 +03:00
Dorel Luca
625f61b6a3 Backed out 2 changesets (bug 1628948) as requested by dev.
Backed out changeset 9e688ade8790 (bug 1628948)
Backed out changeset cb3bea25854a (bug 1628948)
2020-06-06 16:01:36 +03:00
Mike Conley
f40d9845cd Bug 1642800 - Don't enforce minimum window dimensions on non-popup windows if they're not resizable on Windows. r=mhowell
The enforcement is only important when users are able to resize the windows. Otherwise,
we let Gecko set the window dimensions to whatever dimensions they'd like.

Differential Revision: https://phabricator.services.mozilla.com/D78538
2020-06-05 17:09:58 +00:00
Mike Conley
327660f29e Bug 1641546 - Make sure alwaysontop windows don't pull focus when first opening on Windows. r=mhowell
Depends on D77503

Differential Revision: https://phabricator.services.mozilla.com/D77528
2020-06-05 02:35:54 +00:00
Marco Bonardo
3cf2bdbda4 Bug 1628948 - Dispatch mousedown asynchronously on a WM_NCLBUTTONDOWN. r=NeilDeakin
On other platforms we get a mousedown event when the non-client area is clicked,
but not on Windows, where handling the WM_NCLBUTTONDOWN message breaks dragging
the window. This dispatches the mousedown event like other platforms, but on
the next tick.

Differential Revision: https://phabricator.services.mozilla.com/D77419
2020-06-04 08:00:20 +00:00
Aaron Klotz
7ed9f1cafd Bug 1639391: Do not call nsWindow::GetAttention for top-level windows being shown during session restore; r=mhowell
When we call nsWindow::Show but Firefox is not foreground, we show the window
and also flash it on the taskbar to get the user's attention.

This is really annoying when restoring a session with `N` windows, as the
user's taskbar ends up with all `N` of them stuck in a flashed state until the
user goes through and manually activates every single window.

There are several ways I thought of to address this, but I think the
simplest one is just to track whether or not we're in the middle of restoring a
session and skip flashing when we are doing so.

Differential Revision: https://phabricator.services.mozilla.com/D76406
2020-05-22 01:49:11 +00:00
Mike Conley
31286848e2 Bug 1634703 - Add support for getting the window ID used by nsIMediaDevice for a shared window on Windows. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D73505
2020-05-12 14:50:47 +00:00
Bogdan Tara
c3097397e9 Backed out 7 changesets (bug 1634703) for testDeviceRecordingEventAudioAndVideo failures CLOSED TREE
Backed out changeset b982f5d74610 (bug 1634703)
Backed out changeset 59229853930e (bug 1634703)
Backed out changeset e017380f5539 (bug 1634703)
Backed out changeset 47a3a96b969b (bug 1634703)
Backed out changeset b4af76cfbdaf (bug 1634703)
Backed out changeset 7ef57434b09d (bug 1634703)
Backed out changeset 9df87d346b0f (bug 1634703)
2020-05-11 23:04:54 +03:00
Mike Conley
0dd4dc7ec6 Bug 1634703 - Add support for getting the window ID used by nsIMediaDevice for a shared window on Windows. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D73505
2020-05-08 22:32:24 +00:00
Timothy Nikkel
4274f73184 Bug 1636061. Rollup popups on direct manipulation event. r=NeilDeakin
Direct Manipulation uses a different input model from processing messages that Windows sends.

Windows asks us if we want to start a direct manipulation session by sending us the DM_POINTERHITTEST message, and we call SetContact if we do. After that Windows won't send us messages until the user ends the gesture. Instead Direct Manipulation will update a transform (that's invisible to the user). We pull that transform and turn it into pan and pinch gestures.

So DealWithPopups is not called and popups don't get rolled up. Instead I call it in the function where we send all events that come from dmanip.

Differential Revision: https://phabricator.services.mozilla.com/D74215
2020-05-08 23:20:38 +00:00
Timothy Nikkel
04e829194d Bug 1630912. Handle sending Direct Manipulation input events properly. r=kats
The old code didn't handle content prevent defaulting the input.

The pinch gesture code doesn't seem to fully work properly, it will allow a little pinch zooming before halting it if content is prevent defaulting it. Not sure what is up yet.

Differential Revision: https://phabricator.services.mozilla.com/D73220
2020-05-08 23:20:31 +00:00
Timothy Nikkel
08c31dfc6a Bug 1630912. Add a small state machine and code to send pinch and pan events from direct manipulation. r=kats
We can't just get pinch events, we need to handle both.

This state machine code is basically copied from Chrome's implementation.

Differential Revision: https://phabricator.services.mozilla.com/D71307
2020-05-08 23:20:23 +00:00
Timothy Nikkel
ba9dea927b Bug 1630912. Create the necessary direct manipulation objects. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D71305
2020-05-08 23:19:58 +00:00
Chris Martin
2dfaa2cbe0 Bug 1400317 - Use gfxVars to mirror DWM status to content processes r=jrmuizel
The only caveat here is that gfxVars are not atomic, but multiple threads can
query DWM status. To solve this, changes to the var are mirrored into an atomic
and that is read instead.

DWM status changes are indicated by Windows via a window message. We use that
window message to cause the update to propagate

Differential Revision: https://phabricator.services.mozilla.com/D73743
2020-05-06 14:16:21 +00:00
Chris Martin
7728e2a9a0 Bug 1400317 - Create single source of truth for DWM status r=jrmuizel
Currently, There are multiple places that call the Win32 APIs for DWM status.

Once Win32k lockdown is enabled, this API will be unavailable and will need
to be remoted. This new function will be made to work in both parent and
content processes, and therefore all DWM queries must be directed to it.

Also, some minor cleanup because... Why not?

Differential Revision: https://phabricator.services.mozilla.com/D73742
2020-05-06 14:15:58 +00:00
Razvan Maries
076359d55e Backed out 6 changesets (bug 1630912) for build bustages on gfxAndroidPlatform.cpp. CLOSED TREE
Backed out changeset 21dc02bc12b9 (bug 1630912)
Backed out changeset 08a6a1f1c4c7 (bug 1630912)
Backed out changeset 108b1a07929b (bug 1630912)
Backed out changeset e202ddeb4e40 (bug 1630912)
Backed out changeset f7d9852a3d09 (bug 1630912)
Backed out changeset e6cd2ceab183 (bug 1630912)
2020-05-05 09:04:37 +03:00
Timothy Nikkel
26ab026749 Bug 1630912. Handle sending Direct Manipulation input events properly. r=kats
The old code didn't handle content prevent defaulting the input.

The pinch gesture code doesn't seem to fully work properly, it will allow a little pinch zooming before halting it if content is prevent defaulting it. Not sure what is up yet.

Differential Revision: https://phabricator.services.mozilla.com/D73220
2020-05-01 23:33:25 +00:00
Timothy Nikkel
fbb0581f88 Bug 1630912. Add a small state machine and code to send pinch and pan events from direct manipulation. r=kats
We can't just get pinch events, we need to handle both.

This state machine code is basically copied from Chrome's implementation.

Differential Revision: https://phabricator.services.mozilla.com/D71307
2020-05-01 23:33:18 +00:00
Timothy Nikkel
b45f4cf549 Bug 1630912. Create the necessary direct manipulation objects. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D71305
2020-05-04 15:26:39 +00:00
Kris Taeleman
d2488e9df1 Bug 1626099 - Renewing FX_TOUCH_USED telemetry. r=chutten,botond
Differential Revision: https://phabricator.services.mozilla.com/D69840
2020-04-08 20:51:57 +00:00
Mike de Boer
06f5fc5217 Bug 890125 - Part 4 - Implement virtual desktop switching for Windows 10 and above. r=mhowell,emk
Differential Revision: https://phabricator.services.mozilla.com/D67825
2020-04-07 11:02:56 +00:00
Mihai Alexandru Michis
34859db9fb Backed out 6 changesets (bug 1350875) for causing failures in test.util.UiThreadUtils$TimeoutException
CLOSED TREE

Backed out changeset c65f2c0b6332 (bug 1350875)
Backed out changeset 5084623c0f83 (bug 1350875)
Backed out changeset 4eda0d89d8a2 (bug 1350875)
Backed out changeset 149058087816 (bug 1350875)
Backed out changeset 71ba43d7b2df (bug 1350875)
Backed out changeset e65ead196f4b (bug 1350875)
2020-04-07 16:13:53 +03:00
Xidorn Quan
1c8c5f2bda Bug 1350875 part 4 - Have windows notify fullscreen will change. r=jmathies
Differential Revision: https://phabricator.services.mozilla.com/D68681
2020-04-02 11:39:02 +00:00