Commit Graph
1409 Commits
Author SHA1 Message Date
Brian Tsoi bc7adc0b9f 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
acseh 57946aa87b Backed out 4 changesets (bug 1891063, bug 1894135) for causing regressions CLOSED TREE
Backed out changeset 4612b726c541 (bug 1894135)
Backed out changeset 717a883474be (bug 1891063)
Backed out changeset 1d666fbf5ef4 (bug 1891063)
Backed out changeset 24dc60b32e21 (bug 1891063)
2024-05-08 16:17:47 +03:00
Tamas Szentpeteri a512a0ae26 Backed out 4 changesets (bug 1894328) for causing crashtest failures. CLOSED TREE
Backed out changeset c1f3e1c3fd56 (bug 1894328)
Backed out changeset 42985219af6b (bug 1894328)
Backed out changeset 52318048424f (bug 1894328)
Backed out changeset 0f937693be1c (bug 1894328)
2024-05-08 00:09:44 +03:00
Emilio Cobos Álvarez c778e483ef Bug 1894328 - Add trivialish cast to deal with 32-bit builds.
MANUAL PUSH: Trivial fix CLOSED TREE
2024-05-07 20:07:45 +02:00
Emilio Cobos Álvarez ad96d7bee5 Bug 1894328 - Make titlebar=no on windows behave consistently with other platforms. r=win-reviewers,rkraesig
Make it remove all titlebar items.

With the previous code, the close button remains.

Differential Revision: https://phabricator.services.mozilla.com/D209503
2024-05-07 17:17:58 +00:00
Emilio Cobos Álvarez ea5e7f7f79 Bug 1894328 - Remove implicitly-added chrome window styles. r=win-reviewers,rkraesig
This prevents dialog windows created with no borders etc from ending up
with a border anyways, for example, which is relevant for things like
the non-native notifications.

Before this patch, for the non-native notifications case, this was
papered due to the fact window transparency implied HideWindowChrome(),
which unset these bits anyways. But that was pretty
action-at-a-distance...

Differential Revision: https://phabricator.services.mozilla.com/D209502
2024-05-07 17:17:57 +00:00
Emilio Cobos Álvarez 60ad5a157d Bug 1894328 - Remove obsolete dialog style flag. r=win-reviewers,rkraesig
This is completely obsolete according to MSDN, and it's better
not having to think about it. Doesn't seem needed for regular
dialogs.

Differential Revision: https://phabricator.services.mozilla.com/D209501
2024-05-07 16:09:23 +00:00
Brian Tsoi 0f27aa4a1b Bug 1894481 - Clean up nsWindow::RegisterWindowClass() r=win-reviewers,cmartin
Differential Revision: https://phabricator.services.mozilla.com/D209566
2024-05-06 21:19:15 +00:00
Emilio Cobos Álvarez b3d019571d Bug 1893918 - A not-yet-loaded browser window shouldn't stop being an early blank window. r=win-reviewers,rkraesig
Otherwise we start painting the window too early, which after
bug 1891063 causes the non-client area to be filled, but we don't paint
anything on top.

Differential Revision: https://phabricator.services.mozilla.com/D208898
2024-04-30 08:39:59 +00:00
Emilio Cobos Álvarez 20a35a4fc2 Bug 1891063 - Improve invalidation of top-level transparent windows. r=win-reviewers,rkraesig,handyman
This makes sure that the transparent area is cleared properly.

We move the clear to a point where Gecko has already informed us of
the opaque region for simplicity.

Differential Revision: https://phabricator.services.mozilla.com/D207302
2024-04-28 18:59:57 +00:00
Barret Rennie 0633e0cca7 Bug 1883673 - Remove majorRelease2022 Nimbus feature r=aminomancer,omc-reviewers,win-reviewers,gstoll,pbz,firefox-desktop-core-reviewers
This feature is no longer intended for experimentation and some of the things
it controls are no longer in product.

Differential Revision: https://phabricator.services.mozilla.com/D204514
2024-04-24 20:15:19 +00:00
Emilio Cobos Álvarez b6f8a18455 Bug 1891063 - Re-introduce some of the opaque region handling removed in bug 1844241. r=win-reviewers,rkraesig
Again, dead code for now because the windows are always opaque,
but will be useful later on since this allows restricting the
region that needs to have transparency.

Differential Revision: https://phabricator.services.mozilla.com/D207301
2024-04-22 23:17:51 +00:00
Iulian Moraru b2f394db04 Backed out changeset 89b76affef99 (bug 1883673) for causing multiple bc failures. CLOSED TREE 2024-04-22 22:12:59 +03:00
Emilio Cobos Álvarez 2f900fb9e4 Bug 1891063 - Allow transparent top level windows to be accelerated. r=win-reviewers,gfx-reviewers,rkraesig,nical
All the comments on this function are for platforms we don't support.

Right now we don't have any of these top-level transparent windows, but
we want to use DWM and Webrender for these just like for regular windows.

Differential Revision: https://phabricator.services.mozilla.com/D207299
2024-04-22 18:11:35 +00:00
Barret Rennie b288396795 Bug 1883673 - Remove majorRelease2022 Nimbus feature r=aminomancer,omc-reviewers,win-reviewers,gstoll,pbz,firefox-desktop-core-reviewers
This feature is no longer intended for experimentation and some of the things
it controls are no longer in product.

Differential Revision: https://phabricator.services.mozilla.com/D204514
2024-04-22 17:57:31 +00:00
James Teh c4bc79402d Bug 1886937: Support UIA in LazyInstantiator. r=nlapre
This allows UIA client detection and blocking to work with the native UIA implementation.

Differential Revision: https://phabricator.services.mozilla.com/D207673
2024-04-18 23:39:52 +00:00
Emilio Cobos Álvarez a1fb0556cc Bug 1891120 - Remove GetWindowInfo hook. r=win-reviewers,rkraesig
This was needed to get the right border status to paint (bug 586228).
That was a long time ago and nowadays all our windows don't have the
thick themed borders that we used to have.

There are two exceptions here where we draw OS-provided borders on Win
10+:

 * High Contrast Mode.
 * Accent color settings on windows to show the accent color on window
   borders and titlebar.

Both of them look good from here (though I only tested win 11).

Differential Revision: https://phabricator.services.mozilla.com/D207327
2024-04-18 02:07:00 +00:00
Aron Cseh 6c4de7f376 Backed out changeset 1f44d19bb3a9 (bug 1891063) for causing bc failures on browser_test_autoscrolling_in_extension_popup_window.js CLOSED TREE 2024-04-16 11:21:03 +03:00
Emilio Cobos Álvarez 56ee005367 Bug 1891063 - Allow transparent top level windows to be accelerated. r=win-reviewers,gfx-reviewers,rkraesig,nical
All the comments on this function are for platforms we don't support.

Right now we don't have any of these top-level transparent windows, but
we want to use DWM and Webrender for these just like for regular windows.

Depends on D207298

Differential Revision: https://phabricator.services.mozilla.com/D207299
2024-04-15 22:52:53 +00:00
Emilio Cobos Álvarez 6996776f74 Bug 1891063 - Remove unused code for transparency. r=win-reviewers,rkraesig
Right now, we don't use top level transparent windows (they're
completely unused).

This removes some code that causes trouble when reintroducing them.

Depends on D207297

Differential Revision: https://phabricator.services.mozilla.com/D207298
2024-04-15 15:31:23 +00:00
Emilio Cobos Álvarez def212e430 Bug 1891063 - Factor out some window style flags code. r=win-reviewers,rkraesig
No behavior change intended. I plan to use this to hide the titlebar
buttons when drawing to the titlebar (we currently draw on top of them).

But seems worth factoring out regardless.

Differential Revision: https://phabricator.services.mozilla.com/D207297
2024-04-15 15:31:23 +00:00
Ray Kraesig 6cb0c2d807 Bug 1887343 - Store only window-chrome style-flags when going fullscreen r=win-reviewers,handyman
When stripping and restoring window chrome, don't modify or retain any
style-flags other than window-chrome flags.

This also lets us remove, without further consideration, a tiny bit of
thirteen-year-old special-case logic (dating back to bug 629860) which
tried to fix up the then-improperly-cached `WS_VISIBLE` flag.

Differential Revision: https://phabricator.services.mozilla.com/D206081
2024-04-08 17:24:52 +00:00
Brad Werth 27a23aa4f3 Bug 1882358 Part 3: Remove nsIWidget::IsResizingNativeWidget, which is no longer used. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D202868
2024-03-28 16:01:54 +00:00
James Teh 6a60a54ecd Bug 1887584: Don't unintentionally instantiate the a11y engine if UIA is requested but the UIA pref is disabled. r=rkraesig,win-reviewers
I did consider the pref in my patches in bug 1886371.
nsWindow does a QI to IRawElementProviderSimple, which will deliberately fail if the UIA pref is disabled.
Unfortunately, i neglected to realise that it's already too late by that stage because we've already called nsWindow::GetAccessible, which instantiates the a11y engine.
Now, we check the UIA pref before we call GetAccessible.

Differential Revision: https://phabricator.services.mozilla.com/D205559
2024-03-25 22:49:35 +00:00
James Teh baba4cd437 Bug 1886371 part 1: Hook up our native UIA tree. r=nlapre,win-reviewers,rkraesig
1. Respond to WM_GETOBJECT with our IRawElementProviderSimple implementation for the root Accessible of the HWND.
2. Don't allow QueryInterface to UIA interfaces if the UIA pref is disabled. This stops WM_GETOBJECT from returning our UIA implementation in this case.
3. Specify the appropriate provider options.

Differential Revision: https://phabricator.services.mozilla.com/D205179
2024-03-25 03:28:03 +00:00
Emilio Cobos Álvarez dd54b32a32 Bug 1712669 - Make Windows tooltip margin depend on cursor size. r=yjuglaret,win-reviewers,desktop-theme-reviewers,dao
I think we should start off with this. Other platforms can implement
this too, but exposing this to content seems like quite the rabbit hole.

Differential Revision: https://phabricator.services.mozilla.com/D203405
2024-03-19 14:17:58 +00:00
Cristian Tuns 5615c46d74 Backed out changeset 21973e46f7ea (bug 1712669) for causing mochitest failures in test_tooltip.xhtml CLOSED TREE 2024-03-18 13:45:18 -04:00
Emilio Cobos Álvarez 715bda6e45 Bug 1712669 - Make Windows tooltip margin depend on cursor size. r=yjuglaret,win-reviewers,desktop-theme-reviewers,dao
I think we should start off with this. Other platforms can implement
this too, but exposing this to content seems like quite the rabbit hole.

Differential Revision: https://phabricator.services.mozilla.com/D203405
2024-03-18 13:44:00 +00:00
Cristian Tuns 27b7478f24 Backed out 4 changesets (bug 1882358, bug 1885376) for causing multiple regressions. CLOSED TREE
Backed out changeset b0450657a485 (bug 1885376)
Backed out changeset db166f0115c4 (bug 1882358)
Backed out changeset b36182f359d9 (bug 1882358)
Backed out changeset c9f15d31ac40 (bug 1882358)
2024-03-18 07:29:37 -04:00
Emilio Cobos Álvarez 494c63e551 Bug 1884631 - Remove macOS native sheet support. r=mac-reviewers,aleca,kaie,bradwerth
Firefox never uses this. TB could use the same approach Firefox uses,
but for now on macOS the sheets become regular modal dialogs, which is
the same as on Windows and Linux.

See bug 1755330 and bug 1737489 for more context.

Differential Revision: https://phabricator.services.mozilla.com/D204209
2024-03-18 10:06:26 +00:00
James Teh 31f75f88c6 Bug 1883568 part 2: Ignore our window being focused until we've enabled our window after a Windows picker has been dismissed. r=rkraesig,nlapre,win-reviewers
We disable the root window when a picker opens.
When the picker closes, our window will get focus, but it will still be disabled.
This confuses the focus system.
Therefore, we ignore this focus and explicitly notify the focus system once we re-enable the window.
Since Windows picker dialogs have regressed accessibility several times now, I also added a Windows accessibility test.

Differential Revision: https://phabricator.services.mozilla.com/D203717
2024-03-13 21:26:30 +00:00
Emilio Cobos Álvarez 22743f914c Bug 1884652 - Remove titlebars on panels and PopupLevel::Floating. r=mac-reviewers,bradwerth
These two features are totally unused and poorly supported.

Both were added in bug 552982, and Wayland doesn't support (nor have a
way of supporting) any of them.

Differential Revision: https://phabricator.services.mozilla.com/D204222
2024-03-11 19:42:58 +00:00
Brad Werth c1e7b4018c Bug 1882358 Part 3: Remove nsIWidget::IsResizingNativeWidget, which is no longer used. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D202868
2024-03-07 17:18:25 +00:00
Emilio Cobos Álvarez 2e41d24cce Bug 1883370 - Use WS_EX_TOPMOST for alerts. r=saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D203774
2024-03-06 17:56:58 +00:00
Emilio Cobos ÁlvarezandJames Teh 6d3be62ad4 Bug 1883132 - Respond to WM_GETTITLEBARINFOEX. r=win-reviewers,rkraesig
This might be useful for apps to find out the maximize button position
without having to enable UIAutomation. Though it seems Windows doesn't
use this, at least.

Co-authored-by: James Teh <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D203422
2024-03-06 15:15:51 +00:00
Emilio Cobos Álvarez 24bd1e4793 Bug 1883132 - Suppress a11y instantiation on Win11 for the snap layouts feature. r=Jamie
This is not ideal, because they fall back to position the popup under
the cursor, but it's probably better.

The right thing to do would be for Windows to use the TITLEBARINFOEX
message. We should probably still land that code just so they can
eventually use it, seems worth doing anyways.

Differential Revision: https://phabricator.services.mozilla.com/D203423
2024-03-06 15:13:58 +00:00
Iulian Moraru 02d336fe8e Backed out 3 changesets (bug 1882358) for causing Bug 1882836. CLOSED TREE
Backed out changeset abb5fda726a6 (bug 1882358)
Backed out changeset bdc09f867b60 (bug 1882358)
Backed out changeset d7c3cfb92ed8 (bug 1882358)
2024-03-01 11:36:23 +02:00
Brad Werth 9a5f436f4f Bug 1882358 Part 3: Remove nsIWidget::IsResizingNativeWidget, which is no longer used. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D202868
2024-02-28 17:50:39 +00:00
Álvaro Costa 6376e4719d Bug 1830667 - Update APZCTreeManager::mDPI when display DPI changes. r=dlrobertson,win-reviewers,handyman,emilio
Differential Revision: https://phabricator.services.mozilla.com/D202280
2024-02-24 19:25:30 +00:00
Ray Kraesig 2e3fe232fb Bug 1879608 - [1/1] also manually disable the root window when opening a file-dialog r=win-reviewers,handyman
Eliminate a possible race-condition wherein multiple file-dialogs fight
over disabling the root window, possibly reenabling it early.

Differential Revision: https://phabricator.services.mozilla.com/D201775
2024-02-20 16:37:09 +00:00
Emilio Cobos Álvarez 58693e0aa2 Bug 1880394 - Give the icon to the dialog window class, and revert bug 1880226. r=win-reviewers,handyman
This is to be landed after the merge. I think this is better / more
consistent, and avoids relying on mis-documented window style flags in
MSDN.

Differential Revision: https://phabricator.services.mozilla.com/D201894
2024-02-19 10:15:00 +00:00
Emilio Cobos Álvarez 0a3b5b5897 Bug 1880226 - Approach 1: Keep WS_EX_DLGMODALFRAME for dialogs. r=win-reviewers,rkraesig
This restores the behavior pre-patch.

Bug 1878037 removed this flag because it didn't affect borders, as
documented in MSDN:

  https://learn.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles

But apparently it has other side effects like suppressing the icon (?).

Differential Revision: https://phabricator.services.mozilla.com/D201889
2024-02-14 22:31:27 +00:00
Emilio Cobos Álvarez f549c33ac3 Bug 1878623 - Clean up some windows popup code. r=win-reviewers,rkraesig
We no longer have non-transparent popups nor set the window region to
get clipping, instead rendering our own shadows and decorations, so this
code is just not needed anymore.

Depends on D200508

Differential Revision: https://phabricator.services.mozilla.com/D200612
2024-02-12 19:45:49 +00:00
Emilio Cobos Álvarez c569628ce4 Bug 1878037 - Fix some regressions on alert windows. r=saschanaz,win-reviewers,rkraesig
Bug 1870512 removed top level windows with WindowType::Popup, instead
replacing it with an "alert" feature for the only use of them that we
had.

Turns out that on Windows they need a bit more special handling than I
thought, so this patch uses the alert boolean to fix two regressions
(that alerts now create taskbar icons, and that they steal focus).

Remove mIsForMenuPopupFrame since that is now a synonym with
WindowType::Popup.

Remove also the dialog vs. toplevel difference of using
WS_EX_DLGMODALFRAME, since that doesn't seem to have an effect at all on
windows 10+.

Differential Revision: https://phabricator.services.mozilla.com/D200508
2024-02-12 19:45:48 +00:00
Ray Kraesig 4a93979dbf Bug 1878568 - [2/2] Eliminate WindowEnabler r=win-reviewers,yjuglaret
Eliminate `WindowEnabler` by folding it into `nsWindow::PickerOpen()`
and `nsWindow::PickerClosed()`. This avoids the implicit assumption that
multiple instances are created and destroyed in LIFO order.

Differential Revision: https://phabricator.services.mozilla.com/D200742
2024-02-08 17:34:47 +00:00
Ray Kraesig 6692550dfb Bug 1878568 - [1/2] Drive-by cleanup: simplify AutoWidgetPickerState r=win-reviewers,yjuglaret
Remove an unnecessary member function from AutoWidgetPickerState.

Additionally, use a safer method of getting the underlying nsWindow than
`static_cast`, and add some thread-safety assertions in
nsWindow::Picker{Open,Closed}().

No functional changes on the happy path.

Differential Revision: https://phabricator.services.mozilla.com/D200741
2024-02-08 17:34:47 +00:00
Masayuki Nakano e09aa81dfb Bug 1878224 - Put it off to load keyboard layout when first needed r=m_kato
As far as I've tested on Win 11, we can put it off to load it when first needed
of the keyboard layout data.  `ToUnicodeEx` API changes the dead key state and
it's called a lot in `KeyboardLayout::LoadLayout`, however, this patch does
not newly call `LoadLayout` after `TranslateMessage` API at least while handling
a key message.  Therefore, this should be safe but regressions of this change
could be serious, so this makes it enabled only in early beta and earlier for
now.

Differential Revision: https://phabricator.services.mozilla.com/D200600
2024-02-07 00:24:16 +00:00
Stanca Serban 126ee455e4 Backed out changeset 26e3ad3bf78e (bug 1878224) for causing build bustages. CLOSED TREE 2024-02-06 11:45:20 +02:00
Masayuki Nakano 053db02855 Bug 1878224 - Put it off to load keyboard layout when first needed r=m_kato
As far as I've tested on Win 11, we can put it off to load it when first needed
of the keyboard layout data.  `ToUnicodeEx` API changes the dead key state and
it's called a lot in `KeyboardLayout::LoadLayout`, however, this patch does
not newly call `LoadLayout` after `TranslateMessage` API at least while handling
a key message.  Therefore, this should be safe but regressions of this change
could be serious, so this makes it enabled only in early beta and earlier for
now.

Differential Revision: https://phabricator.services.mozilla.com/D200600
2024-02-06 05:13:00 +00:00
Gijs Kruitbosch 67adf4dc07 Bug 1833814 - change nsIWidget's cursor logic, r=emilio,win-reviewers,mhowell
Differential Revision: https://phabricator.services.mozilla.com/D195549
2024-01-22 20:42:50 +00:00