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

1344 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 02cec2af35 Bug 1851577 - Remove support for the drawintitlebar attribute. r=smaug
It was replaced by chromemargin, but some leftovers remained in the
tree.

Differential Revision: https://phabricator.services.mozilla.com/D187440
2023-09-05 13:26:46 +00:00
Emilio Cobos Álvarez 6fd7a45c30 Bug 1757463 - Implement hide cursor while typing at the DOM+Editor level. r=handyman,masayuki
This only hides the cursor if it's on the page you're editing, but given
that the point of the feature is to move the cursor out of the way, that
seems acceptable (and honestly it feels more of a feature than a bug).

This should work across platforms (though non-windows platforms need
ui.hideCursorWhileTyping=1 in about:config to enable).

Differential Revision: https://phabricator.services.mozilla.com/D171155
2023-08-30 16:50:26 +00:00
Ray Kraesig a8c032f4df Bug 1842170 - attempt to avoid nested event loops at inconvenient times r=win-reviewers,mhowell
If we enter `SpinEventLoopUntil` while certain Windows events are
waiting for resolution, we may enter an unusable state.

Since removing all `SpinEventLoopUntil` instances -- or even the one
causing this problem -- isn't really an option at present, kick the can
down the road by kicking the can down the road [sic].

Differential Revision: https://phabricator.services.mozilla.com/D185969
2023-08-17 20:59:33 +00:00
Masatoshi Kimura f0c4d59167 Bug 1845746 - Stop using DwmCompositionEnabled in widget/windows/. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D184715
2023-08-10 18:58:03 +00:00
Ray Kraesig a43de70a1a Bug 1835851 - [3/3] cleanup: remove pre-Windows-10 checks from new code r=gstoll
Remove calls to `IsWin10OrLater()`.

The Windows 7 taskbar does not have this particular race condition, so
there is no need to perform it there. As Firefox no longer supports
Windows 7, there is no need for these checks in Nightly; they existed
solely to simplify uplift of that commit to ESR (which _does_ still
support Win7).

Differential Revision: https://phabricator.services.mozilla.com/D184774
2023-07-28 00:16:46 +00:00
Ray Kraesig d9c931ba57 Bug 1835851 - [1/3] signal taskbar after message has been processed r=handyman,gstoll
To work around a race condition involving unminimizing windows, post a
message to our own message queue, to notify the taskbar that fullscreen
state recalculation is potentially necessary. (This notification must
occur _after_ we have finished processing the `WM_WINDOWPOSCHANGING`
message.)

Differential Revision: https://phabricator.services.mozilla.com/D184762
2023-07-28 00:16:46 +00:00
Masatoshi Kimura 9ec38aeba1 Bug 1844908 - Remove pre-Win10-specific codepath from widget/. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D184307
2023-07-26 08:52:54 +00:00
Tooru Fujisawa 8df4c988ca Bug 1839102 - Use enum class for Task kind. r=bas
Differential Revision: https://phabricator.services.mozilla.com/D182980
2023-07-26 05:09:29 +00:00
Natalia Csoregi 72a7b95555 Backed out 19 changesets (bug 1844908) for causing win bustage on AvailableMemoryTracker.cpp. CLOSED TREE
Backed out changeset 44c66f2233cf (bug 1844908)
Backed out changeset a8010ff534bf (bug 1844908)
Backed out changeset 225dc3aeb220 (bug 1844908)
Backed out changeset a1414db64e33 (bug 1844908)
Backed out changeset 7f1e0a527839 (bug 1844908)
Backed out changeset 6dc7646d1ffa (bug 1844908)
Backed out changeset 8d715131510f (bug 1844908)
Backed out changeset 4b6fe8a4e7db (bug 1844908)
Backed out changeset 2b419fabf1e8 (bug 1844908)
Backed out changeset af84e701d616 (bug 1844908)
Backed out changeset 2fa203969ec5 (bug 1844908)
Backed out changeset 2b3d2df94db3 (bug 1844908)
Backed out changeset 7eca452f5fd7 (bug 1844908)
Backed out changeset 3d961cf25afe (bug 1844908)
Backed out changeset 3c59143f8dd7 (bug 1844908)
Backed out changeset ab50c6c5425a (bug 1844908)
Backed out changeset b2c5636df673 (bug 1844908)
Backed out changeset e9a0f1c6760c (bug 1844908)
Backed out changeset 945ccbedde0b (bug 1844908)
2023-07-25 19:55:35 +03:00
Ray Kraesig d058fed636 Bug 1844733 - Revert "Bug 1292701, 1366330 - Fix popup hiding while navigating file picker" r=cmartin
Backed out changeset 0c47c1159e0a (bug 1292701).

Differential Revision: https://phabricator.services.mozilla.com/D184418
2023-07-25 15:14:38 +00:00
Masatoshi Kimura 07e5081a48 Bug 1844908 - Remove pre-Win10-specific codepath from widget/. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D184307
2023-07-25 14:41:05 +00:00
Emilio Cobos Álvarez c3f9b3c775 Bug 1844242 - Clean-up windows titlebar set-up now that buttons are always non-native. r=dao,handyman
Differential Revision: https://phabricator.services.mozilla.com/D183986
2023-07-20 13:33:19 +00:00
Emilio Cobos Álvarez 9aa60b822a Bug 1844241 - Remove now-dead graphics glass code. r=tnikkel,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D183942
2023-07-19 12:44:34 +00:00
Emilio Cobos Álvarez 7e60f84b6e Bug 1843663 - Remove pre windows-10-specific media queries and styles. r=dao,Gijs,handyman,settings-reviewers
Some basic clean-up. I want to do this before doing bigger changes in
bug 1843044.

There's tons more code that can get cleaned-up on the widget side, but
let's start with this.

Differential Revision: https://phabricator.services.mozilla.com/D183622
2023-07-18 14:11:33 +00:00
Emilio Cobos Álvarez 6624cf8eea Bug 1843205 - Rollup tooltips on WM_KILLFOCUS. r=handyman
Just like we rollup menus.

This is needed because tooltips otherwise get hidden on mousedown and
don't flush the view manager.

This matches the similar hunk for GTK in bug 1569439.

Differential Revision: https://phabricator.services.mozilla.com/D183489
2023-07-14 22:28:14 +00:00
James Teh 6d32b64ab0 Bug 1838123: Update UI Automation client detection to work with modern versions of Windows. r=nlapre,handyman
The window message we previously hooked no longer gets sent and the associated shared memory no longer seems to be created either.
Also, we don't seem to be notified about the load of UIAutomationCore.dll until after it has already instantiated a11y, which is obviously too late for us to hook anything.
Instead, we block UIA instantiation via LazyInstantiator, just as we do for MSAA/IA2:

1. Refactor CompatibilityUIA so that rather than being called by a hook, it simply allows the caller to query the process ids of any UIA clients.
2. CompatibilityUIA now searches handles in our process for named pipes created by UIA for communication with the remote process and then uses GetNamedPipeServerProcessId to get the process id on the other end of each pipe.
3. Refactor LazyInstantiator so that it first tries to get the MSAA/IA2 client process id, then calls CompatibilityUIA to get any UIA client process ids.
4. LazyInstantiator now handles setting the instantiator and blocking of clients for UIA as well as MSAA/IA2 using the same code.
5. Because UIA client detection can be expensive if clients repeatedly query us, cache the result. Reset that cache only when one of our windows comes to the foreground.

Differential Revision: https://phabricator.services.mozilla.com/D181958
2023-07-13 05:25:20 +00:00
Iulian Moraru 1cfd3a3bc7 Backed out changeset 0724fde82b2f (bug 1838123) for causing build bustages. CLOSED TREE 2023-07-13 07:35:44 +03:00
James Teh b9171ec2f1 Bug 1838123: Update UI Automation client detection to work with modern versions of Windows. r=nlapre,handyman
The window message we previously hooked no longer gets sent and the associated shared memory no longer seems to be created either.
Also, we don't seem to be notified about the load of UIAutomationCore.dll until after it has already instantiated a11y, which is obviously too late for us to hook anything.
Instead, we block UIA instantiation via LazyInstantiator, just as we do for MSAA/IA2:

1. Refactor CompatibilityUIA so that rather than being called by a hook, it simply allows the caller to query the process ids of any UIA clients.
2. CompatibilityUIA now searches handles in our process for named pipes created by UIA for communication with the remote process and then uses GetNamedPipeServerProcessId to get the process id on the other end of each pipe.
3. Refactor LazyInstantiator so that it first tries to get the MSAA/IA2 client process id, then calls CompatibilityUIA to get any UIA client process ids.
4. LazyInstantiator now handles setting the instantiator and blocking of clients for UIA as well as MSAA/IA2 using the same code.
5. Because UIA client detection can be expensive if clients repeatedly query us, cache the result. Reset that cache only when one of our windows comes to the foreground.

Differential Revision: https://phabricator.services.mozilla.com/D181958
2023-07-13 03:57:30 +00:00
Aidan Welch 28ff69e182 Bug 1292701, 1366330 - Fix popup hiding while navigating file picker r=cmartin
Differential Revision: https://phabricator.services.mozilla.com/D172884
2023-07-11 13:30:21 +00:00
Edgar Chen 9e7c8f2274 Bug 1839079 - Activate the window only when it is the foreground window; r=rkraesig
Differential Revision: https://phabricator.services.mozilla.com/D182817
2023-07-07 15:23:42 +00:00
David Parks 45c39709be Bug 1841871: Rename PrintEvent to NativeEventLogger and add profiler markers r=gstoll
Differential Revision: https://phabricator.services.mozilla.com/D182818
2023-07-06 19:57:40 +00:00
Stanca Serban 5380681bb9 Backed out 2 changesets (bug 1841871) for causing bp-nu bustages in nsWindowDbg.cpp. CLOSED TREE
Backed out changeset 2ea8f3575620 (bug 1841871)
Backed out changeset faafc044fa2b (bug 1841871)
2023-07-06 02:06:52 +03:00
David Parks e91ec170b1 Bug 1841871: Rename PrintEvent to NativeEventLogger and add profiler markers r=gstoll
Differential Revision: https://phabricator.services.mozilla.com/D182818
2023-07-05 21:59:13 +00:00
Ray Kraesig 06d7f9c03e Bug 1834612 - [1/1] Restrict DComp-disabling mitigation to Windows 10 r=ahale,gfx-reviewers
Bug 1704954 disabled DirectComposition for users with NVIDIA graphics
hardware and mixed monitor refresh rates on Windows 10 and 11, as a
mitigation for bug 1638709. However, that bug is almost -- perhaps
entirely -- unknown on Windows 11 (q.v. for details), and the fallback
path it uses has been shown to cause issues there (bug 1763981).

Restrict the mitigation to only occur on Windows 10, where bug 1638709
is exhibited, but where no issues with the fallback path are known.

This also effectively reverts bug 1816001, which it obviates.

Differential Revision: https://phabricator.services.mozilla.com/D178848
2023-05-30 16:22:43 +00:00
Emilio Cobos Álvarez 1937b308ec Bug 1834042 - Make nsWindow::ConstrainPosition account for decorations. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D178545
2023-05-23 10:30:05 +00:00
Butkovits Atila 2fc1fdfb88 Backed out changeset ff1720f8fc34 (bug 1834042) for causing Android bustages at nsWindow.h. CLOSED TREE 2023-05-23 00:54:10 +03:00
Emilio Cobos Álvarez 56a0e2aa64 Bug 1834042 - Make nsWindow::ConstrainPosition account for decorations. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D178545
2023-05-22 20:36:27 +00:00
Emilio Cobos Álvarez e77d89c414 Bug 1832370 - Don't set WS_EX_TRANSPARENT from SetInputRegion. r=handyman
Tentative patch, as I don't have win7 to test.

We handle input region in WM_NCHITTEST, I don't see why we need to
change the window style...

Differential Revision: https://phabricator.services.mozilla.com/D178097
2023-05-16 13:13:00 +00:00
Emilio Cobos Álvarez 344bced3d6 Bug 1832384 - Don't rollup with animations in some cases. r=handyman
If we rollup with animations but get occluded right away, we might not
advance the refresh driver enough for the animation to finish.

Tentative patch, as I wasn't able to reproduce this... But we've seen
similar issues in other OSes, see bug 1810797.

Differential Revision: https://phabricator.services.mozilla.com/D177934
2023-05-12 22:39:38 +00:00
Emilio Cobos Álvarez 21bea21449 Bug 1832331 - Don't force WS_POPUP for windows without a titlebar. r=rkraesig
That's a rather obscure side effect, which causes the window not to be
recognized as toplevel in some tools.

Other platforms don't have such weirdness. You can still create windows
with WindowType::Popup for that.

Note: We also remove the WS_CHILD bit, which is there just because the
documentation mentions that it's exclusive with WS_POPUP, but I don't
think anything sets that bit earlier, so it's a no-op.

Differential Revision: https://phabricator.services.mozilla.com/D177673
2023-05-11 19:00:55 +00:00
Ray Kraesig bde5814318 Bug 1832168 - [3/3] Remove nsIWidget::SetNativeData() r=emilio,geckoview-reviewers,m_kato
Remove `nsIWidget::SetNativeData()` and all implementations thereof, as
none of them have had any functionality or use since bug 1338172.

No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D177568
2023-05-11 01:13:06 +00:00
Ray Kraesig e3b10722a9 Bug 1832168 - [2/3] Consolidate temporary-window responsibilities r=emilio
Rather than having `nsWindow::GetNativeData()` sometimes (argument-
dependently) create a new resource and requiring its various callers to
destroy that resource, consolidate its creation and destruction into a
single external class.

No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D177567
2023-05-11 01:13:05 +00:00
Edgar Chen cfcffdbafb Bug 1830721 - Update non-client margins before changing fullscreen mode; r=rkraesig
We were replying on the resize event fired for fullscreen mode change to
trigger reflow. But in
https://phabricator.services.mozilla.com/D175215,
we started notifying sizemodechange after fullscreen mode has changed,
which could result in the layout not being updated properly.

Differential Revision: https://phabricator.services.mozilla.com/D177103
2023-05-04 18:45:41 +00:00
Ray Kraesig 14431ef542 Bug 1830792 - [4/4] Flicker-resize the window on first fullscreen entry r=emilio
DWM doesn't update its cached nonclient region information when a window
changes its client area without changing its actual size.

This happens in Firefox when a maximized window becomes fullscreen. If
this happens, "flicker-resize" the window to force DWM to update.

Differential Revision: https://phabricator.services.mozilla.com/D176844
2023-05-03 14:24:35 +00:00
Ray Kraesig 8254d78ebc Bug 1830792 - [2/4] Assorted minor nsWindow cleanup r=emilio
Remove unused code:
 - nsWindow::AutoErase() (allegedly overridable but nonvirtual function)
 - nsWindow::mIsPainting (flag which is never set)

... and perform a very minor comment emendation, for clarity.

Differential Revision: https://phabricator.services.mozilla.com/D176842
2023-05-03 14:24:35 +00:00
Norisz Fay f78c2a2910 Backed out 4 changesets (bug 1830792) for causing gtest failures regarding WebRenderNvidiaHighMixedRefreshRateNightly CLOSED TREE
Backed out changeset 7b723ef8f45e (bug 1830792)
Backed out changeset dca34ff20fab (bug 1830792)
Backed out changeset 0fa7665b8ede (bug 1830792)
Backed out changeset ce5ed4bf2b1c (bug 1830792)
2023-05-03 02:27:51 +03:00
Ray Kraesig d75fbb178d Bug 1830792 - [4/4] Flicker-resize the window on first fullscreen entry r=emilio
DWM doesn't update its cached nonclient region information when a window
changes its client area without changing its actual size.

This happens in Firefox when a maximized window becomes fullscreen. If
this happens, "flicker-resize" the window to force DWM to update.

Differential Revision: https://phabricator.services.mozilla.com/D176844
2023-05-02 22:40:21 +00:00
Ray Kraesig cbb40773aa Bug 1830792 - [2/4] Assorted minor nsWindow cleanup r=emilio
Remove unused code:
 - nsWindow::AutoErase() (allegedly overridable but nonvirtual function)
 - nsWindow::mIsPainting (flag which is never set)

... and perform a very minor comment emendation, for clarity.

Depends on D176841

Differential Revision: https://phabricator.services.mozilla.com/D176842
2023-05-02 22:40:20 +00:00
David Parks bc3fe641ef Bug 642851: Clear autohidden taskbar region on Windows 10+ if drawing NC region r=cmartin
The unpainted non-client region leaves a white bar at the bottom of the window when maximized on Win11 with auto-hidden taskbar.  This region is where a user can mouse-over to expose the taskbar.  Painting it black eliminates the row of white pixels and fixes problems with exposing the hidden taskbar.  Windows 10 usually (correctly) paints a sliver of the taskbar in this region with or without this patch.  However, it also has similar (but more complex) failing edge cases discussed in the bug.

Additionally, bug 758280 used 1px for the autohidden region size but the real size is 2px so we switch to that here.

Differential Revision: https://phabricator.services.mozilla.com/D148834
2023-04-24 23:11:15 +00:00
David Parks 9bf532bbb3 Bug 642851: Allow identification of correct taskbar window for our screen on Windows r=cmartin
Since Windows 8, ABM_GETAUTOHIDEBAREX has provided a way to identify if/where the system taskbar is hidden, even in multi-monitor setups.  This adds a function to easily fetch that information.

Differential Revision: https://phabricator.services.mozilla.com/D148833
2023-04-24 23:11:15 +00:00
Natalia Csoregi 90c4ec5697 Backed out 2 changesets (bug 642851) for causing bustage on nsWindowGfx.cpp. CLOSED TREE
Backed out changeset 0ab04972b892 (bug 642851)
Backed out changeset bb07fcac8fea (bug 642851)
2023-04-24 07:03:07 +03:00
David Parks 7bc032896b Bug 642851: Clear autohidden taskbar region on Windows 10+ if drawing NC region r=cmartin
The unpainted non-client region leaves a white bar at the bottom of the window when maximized on Win11 with auto-hidden taskbar.  This region is where a user can mouse-over to expose the taskbar.  Painting it black eliminates the row of white pixels and fixes problems with exposing the hidden taskbar.  Windows 10 usually (correctly) paints a sliver of the taskbar in this region with or without this patch.  However, it also has similar (but more complex) failing edge cases discussed in the bug.

Additionally, bug 758280 used 1px for the autohidden region size but the real size is 2px so we switch to that here.

Differential Revision: https://phabricator.services.mozilla.com/D148834
2023-04-24 03:32:20 +00:00
David Parks b87ff0a627 Bug 642851: Allow identification of correct taskbar window for our screen on Windows r=cmartin
Since Windows 8, ABM_GETAUTOHIDEBAREX has provided a way to identify if/where the system taskbar is hidden, even in multi-monitor setups.  This adds a function to easily fetch that information.

Differential Revision: https://phabricator.services.mozilla.com/D148833
2023-04-24 03:32:19 +00:00
Edgar Chen 58bec5645b Bug 1823284 - Use `SizeModeChanged` notification to handle fullscreen change; r=geckoview-reviewers,rkraesig,stransky,bradwerth,smaug,m_kato
Depends on D175213

Differential Revision: https://phabricator.services.mozilla.com/D175215
2023-04-23 21:28:43 +00:00
Norisz Fay e14b74864b Backed out 2 changesets (bug 1823284) for causing failures on element-request-fullscreen-timing.html, test_fullscreen-api.html CLOSED TREE
Backed out changeset 54bce7b5d558 (bug 1823284)
Backed out changeset 65747f283949 (bug 1823284)
2023-04-20 17:14:12 +03:00
Edgar Chen b665ebfef0 Bug 1823284 - Use `SizeModeChanged` notification to handle fullscreen change; r=geckoview-reviewers,rkraesig,stransky,bradwerth,smaug,m_kato
Depends on D175213

Differential Revision: https://phabricator.services.mozilla.com/D175215
2023-04-20 08:17:57 +00:00
Jens Stutte 1d0d56d427 Bug 1827829 - Make WM_ENDSESSION independent from sCanQuit result and remove the now unneeded sCanQuit. r=cmartin,gstoll
It is not clear why checking sCanQuit here should be the right thing to
do. From the WM_ENDSESSION documentation it seems there are cases where
we just need to quit, always. Windows might even have ignored the
WM_QUERYENDSESSION result or sCanQuit might be unset if we did not pass
through WM_QUERYENDSESSION at all.

Differential Revision: https://phabricator.services.mozilla.com/D175244
2023-04-18 09:31:38 +00:00
Jens Stutte ca12388a58 Bug 1825917 - Have a ShutdownReason annotation and identify OS shutdown on Windows. r=xpcom-reviewers,gstoll,nika
Differential Revision: https://phabricator.services.mozilla.com/D174899
2023-04-17 14:03:48 +00:00
filips 20d7c9c0d8 Bug 1747722 - Allow changing window class hints using attributes. r=emilio,stransky
This patch adds two new attributes to the window's `html` element, `windowclass` and `windowname`, to allow directly controlling the window's class hints on Xorg/Wayland (`res_class` and `res_name`) from the chrome/JS code. When they are set, values are used as class hints for their window. When they are not set, the current behavior of determining `res_class` and `res_name` (using `gdk_get_program_class` for `res_class` and parsing `windowtype` for `res_name`) is preserved.

Changes in `widget/nsIWidget.h` and `widget/nsBaseWidget.h` are only interface changes so that `setWindowClass` can accept three attributes. Although this patch does not affect Windows, `widget/windows/nsWindow.h` and `widget/windows/nsWindow.cpp` have been updated to comply with the new interface. `xpfe/appshell/AppWindow.cpp` has been updated to get the additional attributes and call `setWindowClass` with them. The main changes are in `widget/gtk/nsWindow.h` and `widget/gtk/nsWindow.cpp`.

Differential Revision: https://phabricator.services.mozilla.com/D169720
2023-03-02 16:22:05 +00:00
Florian Quèze 3540a4910c Bug 834343 - [Windows] reset the idle time of the user idle service for mouse move events only if the mouse moved by at least 1 pixel, r=cmartin.
Differential Revision: https://phabricator.services.mozilla.com/D170904
2023-02-24 15:24:13 +00:00