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

2784 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 687211c219 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
Nika Layzell a48079cd72 Bug 1881863 - Part 1: Standardize on boolean over bool in xpidl, r=xpcom-reviewers,necko-reviewers,valentin,extension-reviewers,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,search-reviewers,anti-tracking-reviewers,places-reviewers,nalexander,emilio,zombie,sgalich,karlt,lina,Standard8
Previously the `boolean` type was also declared using a `bool` typedef in
xpidl, meaning that both were used in various places. This patch standardizes
on the built-in `boolean` type, removing the typedef.

Differential Revision: https://phabricator.services.mozilla.com/D206382
2024-04-04 18:45:21 +00:00
Emilio Cobos Álvarez 6bfd255000 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
Cristian Tuns 6169ac57de Backed out 8 changesets (bug 1081542) for causing Bug 1885050
Backed out changeset 38614c34e575 (bug 1081542)
Backed out changeset 7571e95ed78c (bug 1081542)
Backed out changeset 29f139450ccc (bug 1081542)
Backed out changeset 058d5712354b (bug 1081542)
Backed out changeset 7f46e8820023 (bug 1081542)
Backed out changeset d29d7e9c38bd (bug 1081542)
Backed out changeset 0a6b3d90e636 (bug 1081542)
Backed out changeset 27dae926668f (bug 1081542)
2024-03-13 06:15:27 -04:00
Emilio Cobos Álvarez df18f24cf0 Bug 1883287 - Don't wait for the hidden window to be created on Linux to load the native menus. r=smaug
The hidden window is created lazily on Linux, and it's not needed like
on macOS:

  https://searchfox.org/mozilla-central/rev/6b1e306175c2284958fb185bab388021e2890ed0/toolkit/xre/nsAppRunner.cpp#5537-5556

Differential Revision: https://phabricator.services.mozilla.com/D203904
2024-03-07 14:26:32 +00:00
Björn Bidar 182fe12e8b Bug 1883184 - Initial pass at unity menubar support r=emilio
This implements the basic infrastructure to use use libdbusmenu to
export the Linux menubar.

For now, this is not integrated with the front-end, and there are some
remaining bugs, so it lands disabled by default behind the
widget.gtk.global-menu.enabled pref.

Differential Revision: https://phabricator.services.mozilla.com/D200259
2024-03-02 11:38:02 +00:00
Tooru Fujisawa 86d5bc7bde Bug 1081542 - Part 1: Add nsIBrowserDOMWindow.OPEN_NEWTAB_FOREGROUND. r=smaug,geckoview-reviewers,Gijs,amejiamarmol
Given meta/ctrl key should use browser.tabs.loadInBackground pref instead of
browser.tabs.loadDivertedInBackground pref, the existing
nsIBrowserDOMWindow.OPEN_NEWTAB behavior doesn't match the requirement.

Add dedicate flag for "open in foreground tab" to make it controllable from
nsWindowWatcher::IsWindowOpenLocationModified.

Differential Revision: https://phabricator.services.mozilla.com/D201929
2024-02-27 14:12:09 +00:00
Cristian Tuns 4e97787e18 Backed out 8 changesets (bug 1081542) for causing bc failures in browser_cancel_starting_autoscrolling_requested_by_background_tab.js CLOSED TREE
Backed out changeset 3cc96704d17f (bug 1081542)
Backed out changeset 9f3fe37b77ca (bug 1081542)
Backed out changeset 8d495120e6d2 (bug 1081542)
Backed out changeset ade6db42285d (bug 1081542)
Backed out changeset 56fb245cd38e (bug 1081542)
Backed out changeset c4530ae2b9e3 (bug 1081542)
Backed out changeset 758ad04a330e (bug 1081542)
Backed out changeset deb46de7b01c (bug 1081542)
2024-02-27 04:05:22 -05:00
Tooru Fujisawa e3f5d5c722 Bug 1081542 - Part 1: Add nsIBrowserDOMWindow.OPEN_NEWTAB_FOREGROUND. r=smaug,geckoview-reviewers,Gijs,amejiamarmol
Given meta/ctrl key should use browser.tabs.loadInBackground pref instead of
browser.tabs.loadDivertedInBackground pref, the existing
nsIBrowserDOMWindow.OPEN_NEWTAB behavior doesn't match the requirement.

Add dedicate flag for "open in foreground tab" to make it controllable from
nsWindowWatcher::IsWindowOpenLocationModified.

Differential Revision: https://phabricator.services.mozilla.com/D201929
2024-02-27 07:28:18 +00:00
Emilio Cobos Álvarez f56dca9254 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
Greg Tatum 44b676d37a Bug 1873772 - Only report XULStore load errors in the parent process; r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D198086
2024-01-17 17:18:47 +00:00
Tooru Fujisawa 7d70fa67b0 Bug 1873330 - Part 6: Reflect UserActivation::Modifiers to window.open location. r=smaug
Reflect modifiers to chromeFlags and nsIBrowserDOMWindow::OPEN_* location,
to perform the equivalent of BrowserUtils.whereToOpenLink in window.open with
modifier keys.

Differential Revision: https://phabricator.services.mozilla.com/D197864
2024-01-11 17:24:03 +00:00
Tooru Fujisawa f38e7a292f Bug 1873330 - Part 5: Add UserActivation::Modifiers parameters for window.open-related functions. r=smaug
Pass UserActivation::Modifiers from nsGlobalWindowOuter::OpenInternal
to nsPIWindowWatcher.openWindowWithRemoteTab, through the following interfaces
and protocol:
  * nsPIWindowWatcher.openWindow2
  * nsIWindowProvider.provideWindow
  * PContent.CreateWindow or PContent.CreateWindowInDifferentProcess
  * nsPIWindowWatcher.openWindowWithRemoteTab

Differential Revision: https://phabricator.services.mozilla.com/D197863
2024-01-11 17:24:03 +00:00
Tooru Fujisawa 7eb60cfbdc Bug 1873330 - Part 1: Add nsIBrowserDOMWindow.OPEN_NEWTAB_BACKGROUND. r=smaug,geckoview-reviewers,amejiamarmol
In order to achieve "load in a new background tab" operation in `window.open`,
add OPEN_NEWTAB_BACKGROUND which is equivalent to OPEN_NEWTAB except for
not selecting the tab.

Differential Revision: https://phabricator.services.mozilla.com/D197859
2024-01-11 17:24:01 +00:00
Ray Kraesig 973287f3eb Bug 1575635 - [1/1] Only use parent window's fullscreen state r=win-reviewers,mhowell
When we open a new window on top of a fullscreen window, we deliberately
make that window "normal" (non-fullscreen, non-maximized), which was
documented as having been "a standard [W]indows convention" [1].
Chromium does the same (with fiddly differences involving the window
size).

Unfortunately, we do this by checking if there are _any_ fullscreen
windows open -- which produces false positives on multimonitor or
multi-virtual-desktop setups.

Therefore, adjust the code to match the original comment, and only take
the parent window into account. This seems likely to better match user
expectations.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=575195#c5

Differential Revision: https://phabricator.services.mozilla.com/D197823
2024-01-09 22:54:46 +00:00
Emilio Cobos Álvarez d55d0f229d Bug 1869796 - Make xul alert windows have the appropriate type hint. r=stransky
Before bug 1869796 they had an utility type hint, now they have a
toplevel type hint, after the patch they have a notification type hint,
which seems more appropriate.

Differential Revision: https://phabricator.services.mozilla.com/D197872
2024-01-09 12:38:33 +00:00
Emilio Cobos Álvarez 7a3790164f Bug 1869796 - Fix some clang-tidy warnings in nsAppShellService. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D197868
2024-01-09 00:36:09 +00:00
Stephen A Pohl 513c99e0bb Bug 1871527: Fix a crash in headless mode due to the creation of native menu bars for modals. r=mac-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D197197
2023-12-22 18:51:10 +00:00
Emilio Cobos Álvarez 8d837fe97f Bug 1870512 - Remove top-level windows with WindowType::Popup. r=tnikkel,sessionstore-reviewers,dao
These are only used right now for XUL notifications. They are extremely
weird (I bet there's tons of code that assume that WindowType::Popup
corresponds to nsMenuPopupFrame), and afaict there's no good reason why
these have to be this way.

They no longer are on Linux (because Wayland doesn't support such
thing for example).

XUL alerts work fine with this patch on all platforms after some basic
testing.

The other usage of this for the gfx sanity test can use type=dialog.
Actually it can just be a toplevel, but that breaks the XUL skeleton UI.

Differential Revision: https://phabricator.services.mozilla.com/D196665
2023-12-20 18:38:57 +00:00
Norisz Fay 12d5bd6705 Backed out 3 changesets (bug 1870512) as part of previous backout since issues are still present CLOSED TREE
Backed out changeset c909d207f316 (bug 1870512)
Backed out changeset cf0bda3b4253 (bug 1870512)
Backed out changeset 39cc9d155c12 (bug 1870512)
2023-12-18 23:37:42 +02:00
Emilio Cobos Álvarez af00d61151 Bug 1870512 - Remove top-level windows with WindowType::Popup. r=tnikkel,sessionstore-reviewers,dao
These are only used right now for XUL notifications. They are extremely
weird (I bet there's tons of code that assume that WindowType::Popup
corresponds to nsMenuPopupFrame), and afaict there's no good reason why
these have to be this way.

They no longer are on Linux (because Wayland doesn't support such
thing for example).

XUL alerts work fine with this patch on all platforms after some basic
testing.

Depends on D196664

Differential Revision: https://phabricator.services.mozilla.com/D196665
2023-12-18 17:56:41 +00:00
Emilio Cobos Álvarez 93b01a971d Bug 1870336 - Remove unused nsIAppWindow.add/removeChildWindow. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D196599
2023-12-16 10:47:01 +00:00
Jonathan Watt 15c1a58822 Bug 1866011 p2. Rename nsIDocShell.contentViewer. r=emilio,credential-management-reviewers,devtools-reviewers,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D194370
2023-11-24 09:10:52 +00:00
Jonathan Watt 43215ef984 Bug 1865995 p6. Rename createAboutBlankContentViewer to match nsIDocumentViewer's new name. r=emilio,webdriver-reviewers,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D194340
2023-11-23 21:35:21 +00:00
Jonathan Watt c96a66c3de Bug 1865480. Rename nsIContentViewer to nsIDocumentViewer. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D193987
2023-11-21 12:45:59 +00:00
Magnus Melin 4c9b7306a1 Bug 1819882 - Fix crash in [@ nsBaseWidget::NotifyLiveResizeStarted] via nsWindow::ProcessMessageInternal. r=edgar
Don't allow nullptr into mLiveResizeListeners

Differential Revision: https://phabricator.services.mozilla.com/D193358
2023-11-13 14:03:27 +00:00
Emilio Cobos Álvarez 44ec0247df Bug 1858977 - Don't throw on screen getters. r=smaug,webidl
The screen lifetime seems like it was a lot more complicated
in the past (looking at the comments in Window.webidl).

But nowadays it seems it can be more similar to the other
objects like VisualViewport etc.

Differential Revision: https://phabricator.services.mozilla.com/D193212
2023-11-10 09:29:14 +00:00
seb 6a9c6e99fa Bug 1107433 - macOS: Add fallback menu bar for early startup modals. r=mac-reviewers,spohl
This adds a native fallback menu for early startup modals (e.g.
ProfileManager/ProfileDowngrade) which consists of a "Quit" menu item only,
allowing users to quit the app in a regular way (cmd+Q).

According to the bug report the "Quit" menu item used to exist but caused a
crash. With this patch crash doesn't repro anymore.

Differential Revision: https://phabricator.services.mozilla.com/D191525
2023-10-26 16:55:11 +00:00
Sylvestre Ledru d0f6c7fc66 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-15 15:29:02 +00:00
Cristina Horotan 6a90f5eded Backed out 2 changesets (bug 1856795) for causing build bustage at BasicEvents.h CLOSED TREE
Backed out changeset 1d98b028923a (bug 1856795)
Backed out changeset eae2ac93e17c (bug 1856795)
2023-10-14 21:42:14 +03:00
Sylvestre Ledru cc8a0ee742 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-14 17:34:26 +00:00
Jan Varga c458754592 Bug 1855134 - Move existing MOZ_TRY macros to a dedicated header file; r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D189226
2023-09-28 20:46:07 +00:00
Tom Marble 9e40a719f2 Bug 1850545 - convert .ini manifests to .toml: batch 3 chrome.ini (bis) r=jmaher,geckoview-reviewers,extension-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,places-reviewers,profiler-reviewers,m_kato,mak,mtigley
Differential Revision: https://phabricator.services.mozilla.com/D187597
2023-09-13 18:28:32 +00:00
Peter Van der Beken 9fba1d5220 Bug 1846277 - Remove nsGlobalWindow.h. r=dom-core,necko-reviewers,jesup,farre
Differential Revision: https://phabricator.services.mozilla.com/D184973
2023-08-02 20:41:48 +00:00
Peter Van der Beken dfce7f40b3 Bug 1843968 - Hold some strong references. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D184803
2023-08-01 12:09:36 +00:00
Tom Schuster 47164ea0eb Bug 1838415 - Introduce RFPTarget::RoundWindowSize. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D181239
2023-06-26 07:17:38 +00:00
Peter Van der Beken b52a207bb0 Bug 1522052 - remove nsIDOMChromeWindow. r=dom-core,webdriver-reviewers,devtools-reviewers,whimboo,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D34310
2023-06-23 14:21:05 +00:00
Brad Werth c03417c284 Bug 1838330: Make AppWindow::FullscreenWillChange correctly compare window to screen using device scale. r=edgar
The implementation of AppWindow::ForceRoundedDimensions makes clear that
the window size from GetSize` is unscaled. This patch updates the math in
FullscreenWillChange to also consider devices pixels per css pixel.

Differential Revision: https://phabricator.services.mozilla.com/D180886
2023-06-14 18:53:34 +00:00
Tom Schuster fec8e2b942 Bug 1837153 - Make RFPTarget parameter of ShouldResistFingerprinting with justification non-optional. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D180667
2023-06-14 13:34:59 +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
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
Edgar Chen 65bc134ff8 Bug 1823284 - Avoid waiting for window resizing if it is already at expected dimensions; r=smaug
Depends on D175384

Differential Revision: https://phabricator.services.mozilla.com/D175213
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
Edgar Chen 576851773a Bug 1823284 - Avoid waiting for window resizing if it is already at expected dimensions; r=smaug
Depends on D175384

Differential Revision: https://phabricator.services.mozilla.com/D175213
2023-04-20 08:17:57 +00:00
Brad Werth 80e8eb7818 Bug 1826645 Part 2: Make Document hold fullscreen requests while an exit is being processed. r=edgar
This change makes the parent process delay a fullscreen request if there
is a pending fullscreen exit. It also changes the DOMFullscreenParent
actor listener lifecycle. Once it has started handling a fullscreen
request, it will remain a listener to the Document until it receives an
exit event when the manager is out of fullscreen.

Differential Revision: https://phabricator.services.mozilla.com/D175186
2023-04-18 16:10:03 +00:00
serge-sans-paille dd9aff0466 Bug 1824514 - Make xpfe/appshell buildable outside of a unified build environment r=andi
Differential Revision: https://phabricator.services.mozilla.com/D173614
2023-03-30 13:48:33 +00:00
Emilio Cobos Álvarez 6eec2e9f70 Bug 1823350 - Unify how we identify PiP windows on Linux/Windows. r=mconley,stransky
Also explicitly use titlebar=no on the PIP window, since we really don't
want a titlebar.

This way we don't end up without titlebars in other alwaysontop windows.

Differential Revision: https://phabricator.services.mozilla.com/D172992
2023-03-21 14:36:19 +00:00