Commit Graph
1424 Commits
Author SHA1 Message Date
Makoto Kato 1c0209f5f5 Bug 1902949 - button and buttons property of contextmenu should be touch contact. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D220508
2024-09-02 02:50:04 +00:00
Gregory Pappas 53b8148c7b Bug 1914578 - Remove EventTracer r=perftest-reviewers,geckoview-reviewers,win-reviewers,profiler-reviewers,mstange,sparky,gstoll,owlish
Differential Revision: https://phabricator.services.mozilla.com/D219955
2024-08-31 03:39:50 +00:00
Florian Quèze cf5f0b0ad6 Bug 1915228 - Remove expired telemetry scalar startup.skeleton_ui_disabled_reason, r=win-reviewers,TravisLong,gstoll.
Depends on D220334

Differential Revision: https://phabricator.services.mozilla.com/D220335
2024-08-28 19:44:36 +00:00
Nipun Shukla 5d442069c0 Bug 1904436 - Implement private browser pinning using new Windows taskbar APIs r=nrishel,win-reviewers,rkraesig
Differential Revision: https://phabricator.services.mozilla.com/D214757
2024-08-07 13:12:20 +00:00
Emilio Cobos Álvarez 3ac8840d92 Bug 1911773 - Simplify nsWindow::SetWindowTranslucencyInner. r=rkraesig,win-reviewers
We no longer have the parent/child window set-up for popups, so we can
just use mWnd.

Remove the HideWindowChrome() stuff. That landed once already in [1],
but was backed out along with other stuff, due to it causing buttons to
show up on non-native notifications (which is the only top level that
hits this code-path).

Eventually, I want to handle this more like other platforms (via D209502
and D207303) but until those land, just explicitly set hidechrome="true"
on that window in order to be able to land this simplification
separately.

Bug 1454589 doesn't happen with this change, and there's no reason to
apply size mode in SetWindowTranslucencyInner, so remove that chunk of
code too.

[1]: https://hg.mozilla.org/mozilla-central/rev/24dc60b32e21

Differential Revision: https://phabricator.services.mozilla.com/D218635
2024-08-07 11:02:21 +00:00
Stanca Serban 973a3fec8c Backed out changeset 0218b28ab8ed (bug 1904436) for crashes related to taskbar pinning. a=backout 2024-07-25 17:28:14 +03:00
Nipun Shukla 627adad1af Bug 1904436 - Implement private browser pinning using new Windows taskbar APIs r=nrishel,win-reviewers,rkraesig
Differential Revision: https://phabricator.services.mozilla.com/D214757
2024-07-24 18:40:33 +00:00
Ray Kraesig 53af40dcff Bug 1903452 - [2/2] Normalize some argument names in nsWindow.cpp r=emilio
... removing some minor nitpicks from the clang-tidy output.

No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D214335
2024-06-25 18:19:42 +00:00
Ray Kraesig 7cb9a0ebe5 Bug 1903452 - [1/2] Correct coordinate conversion when cloaking and clearing window r=emilio
The previous patchset failed to properly convert the RECT to be cleared
from screen- to window-coordinates. (This wasn't noticed because the two
only differ when nontrivial chrome such as the titlebar is present,
which by default it's not.)

Differential Revision: https://phabricator.services.mozilla.com/D214334
2024-06-25 18:19:42 +00:00
Emilio Cobos Álvarez e5de6363a8 Bug 1902315 - Remove other widget z-level fiction. r=win-reviewers,rkraesig,geckoview-reviewers,spohl,m_kato
This comes back to bug 42557 and co. It only does something
half-reasonable on Windows (on macOS we just lie and make z-order
tracking be latest-active tracking), and given we don't use the special
zorder flags elsewhere I'm pretty sure we should be able to just rip
this off... On some DEs like Wayland we can't re-stack toplevel windows.

Differential Revision: https://phabricator.services.mozilla.com/D213602
2024-06-19 07:47:36 +00:00
Ray Kraesig c01d783a87 Bug 1824053 - [2/4] Cloak and clear new windows on creation r=win-reviewers,handyman
DWM will draw our window's surface before we get a chance to clear it:
specifically it will draw the window immediately upon ::ShowWindow(),
and we cannot draw to the window surface before that.

We can, however, _cloak_ the window before showing it; this causes DWM
not to composite it until it's uncloaked. A cloaked window still has a
drawable surface, though, so we just manually clear the window with an
appropriate color before its uncloaking.

Differential Revision: https://phabricator.services.mozilla.com/D212762
2024-06-17 14:17:49 +00:00
Ray Kraesig 891e5140eb Bug 1824053 - [1/4] Remove Win32 implementation of nsIWidget::SetBackgroundColor() r=win-reviewers,handyman
This never worked according to its description: it merely set the
_window-class_ background-color. We neither have nor need any mechanism
to give individual windows their own per-widget background color under
Win32.

Instead, we just set the background color to be dark grey, which is
probably good enough for the few purposes for which the background brush
is actually used. (Alas, this does not _quite_ include the initial white
flash.)

The comment in this bug about this being important for Windows dates
from bug 574638, and is no longer relevant -- at least, not in the
particular way it used to be.

Differential Revision: https://phabricator.services.mozilla.com/D212761
2024-06-17 14:17:48 +00:00
Eric Chen 35224d47a5 Bug 1901840 - restore browser.privateWindowSeparation.enabled pref r=nshukla,firefox-desktop-core-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D213651
2024-06-14 14:47:04 +00:00
Masayuki Nakano b3c5045ec1 Bug 1675847 - part 5: Make contextmenu event dispatchers use WidgetPointerEvent or PointerEvent r=smaug,pip-reviewers,devtools-reviewers,nchevobbe,mconley
`eContextMenu` event may be fired from `widget`.  Therefore, different from
`ePointerClick` and `ePointerAuxClick`, they may cross the process boundary,
may be handled by APZ and may be dispatched into the DOM after a delay.
Therefore, this patch is complicated than the previous patch.  This adds
* New IPC message handlers for sending/receiving a `WidgetPointerEvent`
* New `DelayedPointerEvent` class and templated `MouseInput::ToWidgetEvent`
* `PresShell::EventHandler` handles `eContextMenu` as same as `WidgetMouseEvent`

Differential Revision: https://phabricator.services.mozilla.com/D213003
2024-06-14 00:18:48 +00:00
Emilio Cobos Álvarez 17f924a32a Bug 1892835 - Remove delayed NCACTIVATE hack. r=masayuki,win-reviewers,rkraesig
See comment in the bug.

This was needed for bogus mouse drivers back in the XP/Vista era.
However Win10/11 sends wheel messages to the window under the cursor
instead of focused window, so these kinds of issues shouldn't arise
there. Try to remove this legacy hack.

Differential Revision: https://phabricator.services.mozilla.com/D210302
2024-06-04 16:24:44 +00:00
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