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

2745 Коммитов

Автор SHA1 Сообщение Дата
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
Marian-Vasile Laza 1763910579 Backed out changeset 9125aacdb96b (bug 1823350) for bc failures on browser_changePiPSrcInFullscreen.js. 2023-03-20 21:08:13 +02:00
Emilio Cobos Álvarez 28387809e8 Bug 1823350 - Unify how we identify PiP windows on Linux/Windows. r=mconley,stransky
This way we don't end up without titlebars in other alwaysontop windows.

Differential Revision: https://phabricator.services.mozilla.com/D172992
2023-03-20 17:21:38 +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
Andreas Pehrson e821f0c6db Bug 1816436 - Narrow down the pipMask on GTK. r=stransky,mconley
With this patch the webrtcIndicator is no longer considered a PIP window on GTK.
This makes the webrtcIndicator *not* show a resize cursor over most of its
surface.

Differential Revision: https://phabricator.services.mozilla.com/D169783
2023-02-16 14:50:23 +00:00
Matthias Camenzind a36aa2e14f Bug 1814834 - Maintain client size in SyncAttributesToWidget() depending on the last resize. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D169633
2023-02-13 21:00:02 +00:00
Stephen A Pohl c28258d54c Bug 1814889: Ensure that opening private windows continues to display a private browsing icon on the Windows taskbar. r=bhearsum,mstange
Differential Revision: https://phabricator.services.mozilla.com/D168821
2023-02-03 18:10:09 +00:00
Stephen A Pohl bd3d2eacb3 Bug 639707 - Back out changeset 5c2c9bbf9fcc and replace with a patch to restore the ability to open new windows in new spaces when a window is already in fullscreen mode on macOS that supports macOS session restore. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D167445
2023-02-03 03:28:06 +00:00
Iulian Moraru 890afccca9 Backed out 3 changesets (bug 639707) for causing macOS build bustages on nsCocoaUtils.mm. CLOSED TREE
Backed out changeset 0e733d6ed42d (bug 639707)
Backed out changeset 23c4048448bf (bug 639707)
Backed out changeset a3f8bdd9e837 (bug 639707)
2023-02-03 01:06:48 +02:00
Stephen A Pohl df2997399f Bug 639707 - Back out changeset 5c2c9bbf9fcc and replace with a patch to restore the ability to open new windows in new spaces when a window is already in fullscreen mode on macOS that supports macOS session restore. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D167445
2023-02-02 22:18:32 +00:00
Emilio Cobos Álvarez 0e964b716b Bug 1813303 - Tweak order of operations in AppWindow::BeforeStartLayout. r=smaug
Sync the chromemargin attribute to the widget before restoring the
sizes, since the later depend on the former.

This is the same order we use when sizing the shell in OnChromeLoaded,
so it should be more consistent.

Differential Revision: https://phabricator.services.mozilla.com/D168200
2023-01-31 12:53:56 +00:00
Emilio Cobos Álvarez e7fa71f013 Bug 1813303 - Clean up nsIWidget::SetNonClientMargins usage. r=spohl
Make it take a const reference and simplify callers.

No behavior change, but noticed while looking through this code.

Differential Revision: https://phabricator.services.mozilla.com/D168199
2023-01-28 21:43:47 +00:00
Matthias Camenzind 4826171f08 Bug 1803611 - Part 2: Implement AppWindow::Set/GetDimensions. r=emilio
Depends on D166877

Differential Revision: https://phabricator.services.mozilla.com/D166878
2023-01-27 11:33:37 +00:00
Matthias Camenzind b18531098d Bug 1803611 - Part 1: Use shared code for AppWindow::SetPosition/And/Size. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D166877
2023-01-27 11:33:37 +00:00
Emilio Cobos Álvarez f057dfb6db Bug 1810614 - Simplify AppWindow::SizeShellTo when sizing to the window shell. r=smaug
In this case we can do easier things than going through the shell and
assuming all sizes go through the window.

Depends on D167027

Differential Revision: https://phabricator.services.mozilla.com/D166367
2023-01-26 12:48:22 +00:00
Emilio Cobos Álvarez 95520cabbd Bug 1809430 - Clean up ClientToWindowRect. r=cmartin,mstange
Make it return a margin from client area to window area, and add an
explicit function to get the size difference.

No behavior change.

Depends on D166428

Differential Revision: https://phabricator.services.mozilla.com/D166431
2023-01-26 11:19:16 +00:00
Emilio Cobos Álvarez 9e530f224a Bug 1811834 - Clean up nsWidgetInitData. r=cmartin,geckoview-reviewers,calu
Move it to the mozilla::widget namespace.

Use enum classes for transparency, popup type, popup level, etc.

Mostly automated with sed, but there were a few manual changes required
as well in windows code because they relied on Atomic<TransparencyMode>
working (which now doesn't because TransparencyMode is 1 byte instead of
4 bytes).

Differential Revision: https://phabricator.services.mozilla.com/D167537
2023-01-23 23:58:41 +00:00
Emilio Cobos Álvarez fb2c879af9 Bug 1569439 - Rollup tooltips on window blur. r=stransky
This ensures that tooltips don't stick around if the window manager
doesn't send correct leave-notify events.

Differential Revision: https://phabricator.services.mozilla.com/D166945
2023-01-19 10:49:56 +00:00
Sandor Molnar fbafccd735 Backed out changeset 27045cd56940 (bug 1810614) for causing bc failures in browser/base/content/test/popups/browser_popup_resize.js CLOSED TREE 2023-01-17 03:22:58 +02:00
Sandor Molnar e16941d56b Backed out changeset 0f2913c81558 (bug 1809430) for causing multiple failures. 2023-01-17 03:13:06 +02:00
Emilio Cobos Álvarez bf6597ccd4 Bug 1810614 - Simplify AppWindow::SizeShellTo when sizing to the window shell. r=smaug
In this case we can do easier things than going through the shell and
assuming all sizes go through the window.

Differential Revision: https://phabricator.services.mozilla.com/D166367
2023-01-16 23:42:40 +00:00
Emilio Cobos Álvarez 5077bb750f Bug 1809430 - Clean up ClientToWindowRect. r=cmartin,mstange
Make it return a margin from client area to window area, and add an
explicit function to get the size difference.

No behavior change.

Depends on D166428

Differential Revision: https://phabricator.services.mozilla.com/D166431
2023-01-16 23:35:34 +00:00
Dave Townsend 1135edff9e Bug 1777973: Remove MOZ_NEW_XULSTORE implementation. r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D166786
2023-01-16 19:21:23 +00:00
Marian-Vasile Laza 2b766fde32 Backed out changeset 7f9088d3354d (bug 1807838) for causing bc failures on browser_modal_resize.js. CLOSED TREE 2023-01-10 07:14:04 +02:00
Emilio Cobos Álvarez 469fad0ea4 Bug 1807838 - Simplify AppWindow::SizeShellTo when sizing to the window shell. r=smaug
In this case we can do easier things than going through the shell and
assuming all sizes go through the window.

Differential Revision: https://phabricator.services.mozilla.com/D166367
2023-01-09 23:01:07 +00:00
Emilio Cobos Álvarez aedb1cbcd6 Bug 1808748 - Add a browsing context flag to force the top level chrome browsing context to remain active. r=nika
This will be useful for bug 1770429.

Differential Revision: https://phabricator.services.mozilla.com/D166105
2023-01-09 16:38:47 +00:00
Sylvestre Ledru 1f8d23143a Bug 1802288 - remove trailing whitespaces in idl/webidl files r=credential-management-reviewers,webidl,smaug,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D165559
2022-12-28 09:52:44 +00:00
Edgar Chen 1e0a194368 Bug 1801391 - Avoid handling multiple widget fullscreen at the same time; r=smaug
We had some protection in https://searchfox.org/mozilla-central/rev/2fc2ccf960c2f7c419262ac7215715c5235948db/dom/base/nsGlobalWindowOuter.cpp#4259-4265,
but it isn't enough, it is still possible that fullscreen state get confused if
there are multiple request happens at a short time.

This patch tries to improve how we handle multiple request, we don't need to
track each request, but need to ensure widget matches with the latest fullscreen
state specified.

Differential Revision: https://phabricator.services.mozilla.com/D163311
2022-12-21 12:49:18 +00:00
Marian-Vasile Laza b3bfaeb915 Backed out changeset 903719ec824e (bug 1801391) for causing wpt failures on element-request-fullscreen-timing.html. 2022-12-21 04:18:53 +02:00
Edgar Chen 9b2d8200a8 Bug 1801391 - Avoid handling multiple widget fullscreen at the same time; r=smaug
We had some protection in https://searchfox.org/mozilla-central/rev/2fc2ccf960c2f7c419262ac7215715c5235948db/dom/base/nsGlobalWindowOuter.cpp#4259-4265,
but it isn't enough, it is still possible that fullscreen state get confused if
there are multiple request happens at a short time.

This patch tries to improve how we handle multiple request, we don't need to
track each request, but need to ensure widget matches with the latest fullscreen
state specified.

Differential Revision: https://phabricator.services.mozilla.com/D163311
2022-12-20 20:17:33 +00:00
Matthias Camenzind c341905d11 Bug 1786048 - Part 4: Remove cross process SizeShellTo. r=emilio
Because the parent process lacks information about the current shell
size, the child has to send both the current and the new shell size to
the parent. The parent then applies the delta to the window size. This
can produce different results for calls with the same arguments,
whenever a previous call did not have enough time to update the child
with its new size.

The implementation is replaced by applying the delta in the child.

Differential Revision: https://phabricator.services.mozilla.com/D160261
2022-12-15 23:13:01 +00:00
Matthias Camenzind c9300fab1e Bug 1786048 - Part 3: Merge nsIEmbeddingSiteWindow into nsIBaseWindow. r=emilio
Implementations of nsIEmbeddingSiteWindow and nsIBaseWindow largely
overlap, and where they don't, the nsIEmbeddingSiteWindow implementation
of the otherwise shared interface is primarily stubbed out with the
exception of Get/SetDimensions().

This patch moves a reimplementation of Get/SetDimensions() from
nsIEmbeddingSiteWindow to nsIBaseWindow. The other methods of
nsIEmbeddingSiteWindow remain covered by nsIBaseWindow.
Get/SetDimensions() can be implemented as part of nsIWebBrowserChrome
where nsIBaseWindow is not necessary. This removes the need for
nsIEmbeddingSiteWindow.

Blur() has also been moved to nsIWebBrowserChrome, as only
nsContentTreeOwner has an actual implementation which we in theory also
want to call from BrowserChild/Parent, but the spec suggests to
"selectively or uniformly ignore calls".

GetVisibility() had an implementation in BrowserChild that pretended to
always be visible. Instead of providing an interface for that,
nsDocShell now handles the not implemented case for tree owners.

nsIEmbeddingSiteWindow::GetSiteWindow() used to call through to
nsIBaseWindow::GetParentNativeWindow().

The Get/SetDimensions() implementation has been replaced with a strongly
typed setter, which is now also used directly from nsGlobalWindowOuter
to avoid problems that come with autodetecting unchanged dimensions,
when the current dimensions are outdated (e.g. immediately reverting a
change can be ignored).

Differential Revision: https://phabricator.services.mozilla.com/D160260
2022-12-15 23:13:00 +00:00
Matthias Camenzind 5ca3ed6b88 Bug 1786048 - Part 2: Use layout device pixels for AppWindow primary content size. r=emilio
The getter used to return CSS pixels, while the setter expected layout
device pixels. The nsIDocShellTreeOwner documentation used to suggest that
CSS pixels are used for getters and setters of the primary content and
the root shell size. Only the getter for the primary content size
happend to match that documentation.

Differential Revision: https://phabricator.services.mozilla.com/D161944
2022-12-15 23:13:00 +00:00
Matthias Camenzind 5d9dfb1656 Bug 1786048 - Part 1: AppWindow can't skip SetSize calls, HeadlessWidget has to notify when moved. r=emilio
Two minor changes that otherwise might go unnoticed in the following
parts:

- AppWindow can't skip SetSize calls that match the current size. On
  Linux a previous call might not have changed the size yet. If the
  current call is skipped, the previous call can ultimately dictate the
  resulting size.

- BrowserParent should not have to call UpdatePosition when receiving
  new dimensions from BrowserChild. But HeadlessWidget needs to call
  NotifyWindowMoved when moved.

Differential Revision: https://phabricator.services.mozilla.com/D160259
2022-12-15 23:12:59 +00:00
Cosmin Sabou 441a13eec1 Backed out changeset 337925bb04cf (bug 1801391) for causing fullscreen related wpt failures. CLOSED TREE 2022-12-15 14:31:57 +02:00
Edgar Chen 2e047ca037 Bug 1801391 - Avoid handling multiple widget fullscreen at the same time; r=smaug
We had some protection in https://searchfox.org/mozilla-central/rev/2fc2ccf960c2f7c419262ac7215715c5235948db/dom/base/nsGlobalWindowOuter.cpp#4259-4265,
but it isn't enough, it is still possible that fullscreen state get confused if
there are multiple request happens at a short time.

This patch tries to improve how we handle multiple request, we don't need to
track each request, but need to ensure widget matches with the latest fullscreen
state specified.

Differential Revision: https://phabricator.services.mozilla.com/D163311
2022-12-15 10:19:24 +00:00
Sandor Molnar a1e9c1d43b Backed out 4 changesets (bug 1786048) for causing multiple failures. CLOSED TREE
Backed out changeset ae94135e68ef (bug 1786048)
Backed out changeset f505df8a481a (bug 1786048)
Backed out changeset 999a18d6f33e (bug 1786048)
Backed out changeset e71e8644b8a9 (bug 1786048)
2022-12-02 20:30:07 +02:00
Matthias Camenzind 2d534f1a5a Bug 1786048 - Part 4: Remove cross process SizeShellTo. r=emilio
Because the parent process lacks information about the current shell
size, the child has to send both the current and the new shell size to
the parent. The parent then applies the delta to the window size. This
can produce different results for calls with the same arguments,
whenever a previous call did not have enough time to update the child
with its new size.

The implementation is replaced by applying the delta in the child.

Differential Revision: https://phabricator.services.mozilla.com/D160261
2022-12-02 16:47:46 +00:00
Matthias Camenzind 562af0a9b4 Bug 1786048 - Part 3: Merge nsIEmbeddingSiteWindow into nsIBaseWindow. r=emilio
Implementations of nsIEmbeddingSiteWindow and nsIBaseWindow largely
overlap, and where they don't, the nsIEmbeddingSiteWindow implementation
of the otherwise shared interface is primarily stubbed out with the
exception of Get/SetDimensions().

This patch moves a reimplementation of Get/SetDimensions() from
nsIEmbeddingSiteWindow to nsIBaseWindow. The other methods of
nsIEmbeddingSiteWindow remain covered by nsIBaseWindow.
Get/SetDimensions() can be implemented as part of nsIWebBrowserChrome
where nsIBaseWindow is not necessary. This removes the need for
nsIEmbeddingSiteWindow.

Blur() has also been moved to nsIWebBrowserChrome, as only
nsContentTreeOwner has an actual implementation which we in theory also
want to call from BrowserChild/Parent, but the spec suggests to
"selectively or uniformly ignore calls".

GetVisibility() had an implementation in BrowserChild that pretended to
always be visible. Instead of providing an interface for that,
nsDocShell now handles the not implemented case for tree owners.

nsIEmbeddingSiteWindow::GetSiteWindow() used to call through to
nsIBaseWindow::GetParentNativeWindow().

The Get/SetDimensions() implementation has been replaced with a strongly
typed setter, which is now also used directly from nsGlobalWindowOuter
to avoid problems that come with autodetecting unchanged dimensions,
when the current dimensions are outdated (e.g. immediately reverting a
change can be ignored).

Differential Revision: https://phabricator.services.mozilla.com/D160260
2022-12-02 16:47:46 +00:00
Matthias Camenzind d5275b050e Bug 1786048 - Part 2: Use layout device pixels for AppWindow primary content size. r=emilio
The getter used to return CSS pixels, while the setter expected layout
device pixels. The nsIDocShellTreeOwner documentation used to suggest that
CSS pixels are used for getters and setters of the primary content and
the root shell size. Only the getter for the primary content size
happend to match that documentation.

Differential Revision: https://phabricator.services.mozilla.com/D161944
2022-12-02 16:47:45 +00:00