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

65 Коммитов

Автор SHA1 Сообщение Дата
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
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
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 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
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
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
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
Marian-Vasile Laza bec56391bf Backed out 4 changesets (bug 1786048) for causing bc failures on browser_modal_resize.js. CLOSED TREE
Backed out changeset 318a2d2e6e39 (bug 1786048)
Backed out changeset 17a9990d6d19 (bug 1786048)
Backed out changeset 205f129c648a (bug 1786048)
Backed out changeset 0750c885a688 (bug 1786048)
2022-12-01 05:00:38 +02:00
Matthias Camenzind 1238151864 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-11-30 19:37:17 +00:00
Emilio Cobos Álvarez 00750e17e2 Bug 1799394 - Make dialog sizing code consistent between C++ and JS. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D161429
2022-11-11 10:08:56 +00:00
Emilio Cobos Álvarez 69fbb7c1bc Bug 1795804 - Move code around a little bit to avoid calling GetRestoredBounds when not using them. r=smaug
This _actually_ avoids the assertion that got me backed out, sigh.

Differential Revision: https://phabricator.services.mozilla.com/D159737
2022-10-20 08:05:33 +00:00
Emilio Cobos Álvarez fb8908b850 Bug 1795804 - Persist only what's requested sync. r=smaug
This fixes issues like the one that got me backed out, where we have a
dirty size request, and we want to synchronously persist sizemode.

With this patch, we'd persist sizemode sync, but size would still be
updated async, preserving the previous size behavior.

Differential Revision: https://phabricator.services.mozilla.com/D159644
2022-10-19 12:40:25 +00:00
Emilio Cobos Álvarez 0909519a3e Bug 1795804 - Centralize persistent attribute update code. r=smaug
This patch doesn't change behavior by itself, but it makes the
persistent attribute code a bit clearer by making it use typed enums
rather than raw integers for flags. Also centralizes the update.

Depends on D159577

Differential Revision: https://phabricator.services.mozilla.com/D159578
2022-10-18 13:13:33 +00:00
Emilio Cobos Álvarez 7881bdbb11 Bug 1795804 - Don't use lock to set persistent attribute timer. r=smaug
Drive-by, but this timer is main-thread only, I have no idea why it'd
need a lock.

Differential Revision: https://phabricator.services.mozilla.com/D159576
2022-10-18 13:13:32 +00:00
Emilio Cobos Álvarez fb6380190c Bug 1786525 - Don't update untransformed anchor rect when moved by move-to-rect. r=stransky
Otherwise, it changes the move-to-rect inputs, which can change the
output as well, making us move the anchor all the way to the right.

You could, I guess, consider this a mutter bug of sorts, because it
feels weird that you pass it an anchor that has been a `move-to-rect`
output and you get another rect as an output.

But also, it's kinda silly that we're doing that to begin with, so avoid
it by telling the popup frame whether it's been positioned / moved by
move-to-rect (and keeping the anchor in that case).

The reason this works on my setup without "Large text" is just dumb luck
(the front-end computes a max-height for the panel that is small enough
to fit on the screen).

Differential Revision: https://phabricator.services.mozilla.com/D155406
2022-08-30 09:30:27 +00:00
Sandor Molnar 9d7f9853a2 Backed out changeset bb1d2a4a5570 (bug 1786525) for causing build bustages in xpfe/appshell/AppWindow.cpp CLOSED TREE 2022-08-30 01:26:00 +03:00
Emilio Cobos Álvarez cf74fba975 Bug 1786525 - Don't update untransformed anchor rect when moved by move-to-rect. r=stransky
Otherwise, it changes the move-to-rect inputs, which can change the
output as well, making us move the anchor all the way to the right.

You could, I guess, consider this a mutter bug of sorts, because it
feels weird that you pass it an anchor that has been a `move-to-rect`
output and you get another rect as an output.

But also, it's kinda silly that we're doing that to begin with, so avoid
it by telling the popup frame whether it's been positioned / moved by
move-to-rect (and keeping the anchor in that case).

The reason this works on my setup without "Large text" is just dumb luck
(the front-end computes a max-height for the panel that is small enough
to fit on the screen).

Differential Revision: https://phabricator.services.mozilla.com/D155406
2022-08-29 21:47:34 +00:00
Fabrice Desré c50cb528fc Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 16:39:41 +00:00
Andreea Pavel 3ccd75af8d Backed out changeset b9d2965591b9 (bug 1761040) for landing with wrong author CLOSED TREE DONTBUILD 2022-08-03 18:55:00 +03:00
Andreea Pavel fdb7cb2ecd Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 15:27:43 +00:00
Andreea Pavel 89d63c91e6 Backed out changeset a907159a482f (bug 1761040) for causing build bustages on a CLOSED TREE 2022-08-02 04:59:08 +03:00
Fabrice Desré 0f4ac7ad97 Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-02 00:49:41 +00:00
Emilio Cobos Álvarez 0170e759f8 Bug 1779559 - Do this in toolkit instead. r=Gijs
This simplifies a bit the tabbrowser/tab switcher code, and makes it
work in all windows.

The WPT failures are due to bug 1780212.

Differential Revision: https://phabricator.services.mozilla.com/D151822
2022-07-19 19:25:48 +00:00
Cristian Tuns 02571b9d37 Backed out 5 changesets (bug 1779559) for causing wpt failures on unload-bubbles.html CLOSED TREE
Backed out changeset fbb29df4aa9e (bug 1779559)
Backed out changeset eab896a61170 (bug 1779559)
Backed out changeset 645bdd59bb99 (bug 1779559)
Backed out changeset 23fe4f24d483 (bug 1779559)
Backed out changeset a68a015349ed (bug 1779559)
2022-07-19 13:27:32 -04:00
Emilio Cobos Álvarez e08e5475c4 Bug 1779559 - Do this in toolkit instead. r=Gijs
This simplifies a bit the tabbrowser/tab switcher code, and makes it
work in all windows.

Differential Revision: https://phabricator.services.mozilla.com/D151822
2022-07-19 09:43:06 +00:00
Bogdan Szekely d3c2f51d89 Merge autoland to mozilla-central. a=merge 2022-06-16 12:29:41 +03:00
Emilio Cobos Álvarez 7397449189 Bug 1774511 - Use more typed units in AppWindow. r=tnikkel
Doesn't change behavior but hopefully makes code easier to follow /
prove correct.

Differential Revision: https://phabricator.services.mozilla.com/D149462
2022-06-16 05:03:04 +00:00
Emilio Cobos Álvarez ee23efc9b5 Bug 1773813 - Incorporate OS zoom factor in window sizing calculations. r=tnikkel
In bug 1773342 I made OS text scale factor behave like a full zoom
factor which applies to all pages (including the browser chrome). That's
generally straight forward but it makes some callsites that use unzoomed
CSS coordinates misbehave (or behave correctly accidentally actually in
some other cases).

The main fix here is making
nsIBaseWindow::UnscaledDevicePixelsPerCSSPixel() and
nsIScreen::GetDefaultCSSScaleFactor() account for OS zoom as necessary.
However, I also went through the relevant code and cleaned it up to use
typed units and operations when possible.

The setup means:

 * nsIWidget::GetDefaultScale() doesn't account for OS full zoom.
 * nsIBaseWindow and nsIScreen does.

These are the places where this should matter and stuff can get
confused, but this works surprisingly well for all callers (except one
nsDeviceContext one which we use only for PuppetWidget and we can
remove by falling back to 1.0 like all other widgets until the update
comes).

Differential Revision: https://phabricator.services.mozilla.com/D149033
2022-06-14 15:01:52 +00:00
Norisz Fay 60ea7706bd Backed out changeset da5c71190673 (bug 1773813) for causing build bustages CLOSED TREE 2022-06-14 15:13:58 +03:00
Emilio Cobos Álvarez c64d0fcaa6 Bug 1773813 - Incorporate OS zoom factor in window sizing calculations. r=tnikkel
In bug 1773342 I made OS text scale factor behave like a full zoom
factor which applies to all pages (including the browser chrome). That's
generally straight forward but it makes some callsites that use unzoomed
CSS coordinates misbehave (or behave correctly accidentally actually in
some other cases).

The main fix here is making
nsIBaseWindow::UnscaledDevicePixelsPerCSSPixel() and
nsIScreen::GetDefaultCSSScaleFactor() account for OS zoom as necessary.
However, I also went through the relevant code and cleaned it up to use
typed units and operations when possible.

The setup means:

 * nsIWidget::GetDefaultScale() doesn't account for OS full zoom.
 * nsIBaseWindow and nsIScreen does.

These are the places where this should matter and stuff can get
confused, but this works surprisingly well for all callers (except one
nsDeviceContext one which we use only for PuppetWidget and we can
remove by falling back to 1.0 like all other widgets until the update
comes).

Differential Revision: https://phabricator.services.mozilla.com/D149033
2022-06-14 11:37:25 +00:00
Randell Jesup 6779a7c1c2 Bug 1207753 - Smaller xpcom/threads & xpfe thread-safety annotations r=nika
Differential Revision: https://phabricator.services.mozilla.com/D130575
2022-03-21 23:04:07 +00:00
Randell Jesup fcaf70841e Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 18:47:08 +00:00
Noemi Erli 2390d257e6 Backed out changeset 12a59e5a50bf (bug 1207753) for causing build bustage CLOSED TREE 2022-03-16 18:32:51 +02:00
Randell Jesup 4b033a5256 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 16:16:14 +00:00
Butkovits Atila 927ad62c6a Backed out changeset a68ee4b09f92 (bug 1207753) for causing Hazard bustages. CLOSED TREE 2022-03-16 14:38:14 +02:00
Randell Jesup 7d4b5fae04 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 12:01:14 +00:00
Kagami Sascha Rosylight 496a0d78cc Bug 1539884 - Part 36: Mark AppWindow::ExecuteCloseHandler as CAN_RUN_SCRIPT r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D134474
2021-12-23 16:27:26 +00:00
criss 6c589aa7bd Backed out changeset da5a7c4478d9 (bug 1727815) for causing assertion failures on nsGlobalWindowOuter.cpp. CLOSED TREE 2021-10-12 12:45:26 +03:00
Alexander Taylor 38c27d5663 Bug 1727815 Toggle internal fullscreen even if window widget fullscreen not achieved r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D123830
2021-10-12 07:57:48 +00:00
harry 036ded43ac Bug 1699506 - Part 1 - Add a NSTitlebarAccessoryViewController to ToolbarWindow to track when the titlebar is shown in fullscreen. r=mac-reviewers,mstange
Differential Revision: https://phabricator.services.mozilla.com/D106846
2021-03-18 20:20:39 +00:00
Mike Conley 43cabec511 Bug 1568133 - Wait to load MacOS app menu until l10n is ready. r=mstange
Original patch by Brendan Dahl <bdahl@mozilla.com>.

The change to nsCocoaWindow appears to be necessary because the nsMenuBarX
only seems to get created _after_ nsCocoaWindow::paintMenubarForWindow runs
for the created window, which is too late to Paint the native menu bar, but
also happens before nsCocoaWindow::sendToplevelActivateEvents runs, which
is too early for the nsCocoaWindow::SetMenuBar code's check for
toplevelActiveState on the WindowDelegate to return true.

So instead of checking for the toplevelActiveState, we now check if the
window for the newly created nsMenuBarX is the main window, and if so,
then we Paint it.

Differential Revision: https://phabricator.services.mozilla.com/D46202
2021-01-18 18:25:51 +00:00
Doug Thayer fa7b10106a Bug 1656526 - Show blank window prior to loading xul on Windows r=mhowell
See bug for justification. This patch aims to display a blank window prior to
loading/prefetching xul.dll. It also has a placeholder for drawing a
skeleton UI into that window. Note that this is disabled by default based on
a registry value, as there are still kinks to work out (for instance, what
happens if we aren't actually going to display a window, because, say, Firefox
is already running.) This just gives a basic implementation to dogfood, and
facilitates distributing work across multiple contributors.

Onto the details. The patch achieves its goal by creating a window and
assigning its handle to a static variable, which will be consumed inside
nsWindow::Create by the first toplevel window we want to make. nsWindow::Create
will take ownership of the window handle, restyle it to its own liking, and
then proceed as if everything is normal and it had created the window itself.

Differential Revision: https://phabricator.services.mozilla.com/D86263
2020-09-15 14:50:19 +00:00
Dorel Luca 634b687351 Backed out 4 changesets (bug 1656526) for Browser-chrome failures in toolkit/xre/test/browser_checkdllblockliststate.js. CLOSED TREE
Backed out changeset 24648c48a49c (bug 1656526)
Backed out changeset 472b724994eb (bug 1656526)
Backed out changeset 6fbb7e7ac121 (bug 1656526)
Backed out changeset 88ff36a4bcfb (bug 1656526)
2020-09-11 23:17:23 +03:00
Doug Thayer efe700e222 Bug 1656526 - Show blank window prior to loading xul on Windows r=mhowell
See bug for justification. This patch aims to display a blank window prior to
loading/prefetching xul.dll. It also has a placeholder for drawing a
skeleton UI into that window. Note that this is disabled by default based on
a registry value, as there are still kinks to work out (for instance, what
happens if we aren't actually going to display a window, because, say, Firefox
is already running.) This just gives a basic implementation to dogfood, and
facilitates distributing work across multiple contributors.

Onto the details. The patch achieves its goal by creating a window and
assigning its handle to a static variable, which will be consumed inside
nsWindow::Create by the first toplevel window we want to make. nsWindow::Create
will take ownership of the window handle, restyle it to its own liking, and
then proceed as if everything is normal and it had created the window itself.

Differential Revision: https://phabricator.services.mozilla.com/D86263
2020-09-11 14:12:00 +00:00
Razvan Maries 6742cf83d7 Backed out 2 changesets (bug 1656526) for build bustages on EarlyBlankWindow.cpp. CLOSED TREE
Backed out changeset b6d3b254ae8c (bug 1656526)
Backed out changeset abdc9c22078c (bug 1656526)
2020-08-18 19:10:37 +03:00
Doug Thayer b5e46bb95c Bug 1656526 - Show blank window prior to loading xul on Windows r=mhowell
See bug for justification. This patch aims to display a blank window prior to
loading/prefetching xul.dll. It also has a placeholder for drawing a
skeleton UI into that window. Note that this is disabled by default based on
a registry value, as there are still kinks to work out (for instance, what
happens if we aren't actually going to display a window, because, say, Firefox
is already running.) This just gives a basic implementation to dogfood, and
facilitates distributing work across multiple contributors.

Onto the details. The patch achieves its goal by creating a window and
assigning its handle to a static variable, which will be consumed inside
nsWindow::Create by the first toplevel window we want to make. nsWindow::Create
will take ownership of the window handle, restyle it to its own liking, and
then proceed as if everything is normal and it had created the window itself.

Differential Revision: https://phabricator.services.mozilla.com/D86263
2020-08-18 15:31:28 +00:00
Edgar Chen 992cce2a73 Bug 1653124 - Use nsDocShell directly in AppWindow; r=nika
Differential Revision: https://phabricator.services.mozilla.com/D83714
2020-07-16 20:41:45 +00:00