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

383 Коммитов

Автор SHA1 Сообщение Дата
Ray Kraesig ec80afc7a4 Bug 1776895 - [5/6] Save and restore original relative position r=cmartin,handyman
When entering fullscreen and saving the original position of a window,
also save the position to which it was moved.

When leaving fullscreen, keep the window on the same screen. Restore its
_screen-relative_ position, rather than its absolute position.

Differential Revision: https://phabricator.services.mozilla.com/D153410
2022-09-20 16:22:57 +00:00
Ray Kraesig 360f7f624e Bug 1776895 - [3/6] Cleanup: specialize further to desktop pixels r=cmartin
Use desktop pixels everywhere:
 - Store the old window position as a `DesktopRect`.
 - Since `GetRectDisplayPix` is infallible, use the convenience getter
   that hands us a `DesktopIntRect`.
 - Add a helper function that wraps `Resize()` and takes any `Rect`
   which uses `DesktopPixel`s.

No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D153409
2022-09-20 16:22:56 +00:00
Ray Kraesig 44d02f76a7 Bug 1776895 - [1/6] Cleanup: use UniquePtr rather than manual allocation r=cmartin
No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D153407
2022-09-20 16:22:56 +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
Ray Kraesig d37d1556d3 Bug 1786226 - Revert all patches for regressing bug 1776895 r=cmartin
This reverts the following commits:
- 21f1ada7ee6ad5839fc0d9bc98e1ff2d558ef6e7
- cde5393917c483a3516f4c883af02834ddbf11d8
- 3d2dc8de0e7147d0d991c16c29ad9a8678a25635
- 4b17fb88efc581522c0edf0740da4c54c539d39a
- 7b0893449764054af7795df66c0c2e83a370d620
- bcc0fa996f5fd7cc677ca2a5e97329dcd6b74a04
- 9547ab55535d9713c95bc3344d1cc1357520ba92

Differential Revision: https://phabricator.services.mozilla.com/D155237
2022-08-22 18:30:03 +00:00
Ray Kraesig c4d109da63 Bug 1776895 - [5/6] Save and restore original relative position r=cmartin
When entering fullscreen and saving the original position of a window,
also save the original position of its screen.

When leaving fullscreen, keep the window on the same screen. Restore its
_screen-relative_ position, rather than its absolute position.

Differential Revision: https://phabricator.services.mozilla.com/D153410
2022-08-17 18:51:32 +00:00
Ray Kraesig 3a0072feae Bug 1776895 - [3/6] Cleanup: specialize further to desktop pixels r=cmartin
Use desktop pixels everywhere:
 - Store the old window position as a `DesktopRect`.
 - Since `GetRectDisplayPix` is infallible, use the convenience getter
   that hands us a `DesktopIntRect`.
 - Add a helper function that wraps `Resize()` and takes any `Rect`
   which uses `DesktopPixel`s.

No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D153409
2022-08-17 18:51:31 +00:00
Ray Kraesig 4592637ee3 Bug 1776895 - [1/6] Cleanup: use UniquePtr rather than manual allocation r=cmartin
No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D153407
2022-08-17 18:51:30 +00:00
Sandor Molnar 11e0476cea Backed out 5 changesets (bug 1776895) for causing mochitest failures in widget/tests/test_bug522217.xhtml CLOSED TREE
Backed out changeset cda5c3ab282f (bug 1776895)
Backed out changeset 8a5b0ed7ccb6 (bug 1776895)
Backed out changeset 871f199ecca1 (bug 1776895)
Backed out changeset b0e8b9d7d2a4 (bug 1776895)
Backed out changeset 9a85cc74c6cc (bug 1776895)
2022-08-10 02:38:18 +03:00
Ray Kraesig 6dd316e070 Bug 1776895 - [4/5] Save and restore original relative position r=cmartin
When entering fullscreen and saving the original position of a window,
also save the original position of its screen.

When leaving fullscreen, keep the window on the same screen. Restore its
_screen-relative_ position, rather than its absolute position.

Differential Revision: https://phabricator.services.mozilla.com/D153410
2022-08-09 20:18:40 +00:00
Ray Kraesig 8182e508f5 Bug 1776895 - [3/5] Cleanup: specialize further to desktop pixels r=cmartin
Use desktop pixels everywhere:
 - Store the old window position as a `DesktopRect`.
 - Since `GetRectDisplayPix` is infallible, use the convenience getter
   that hands us a `DesktopIntRect`.
 - Add a helper function that wraps `Resize()` and takes any `Rect`
   which uses `DesktopPixel`s.

No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D153409
2022-08-09 20:18:40 +00:00
Ray Kraesig 7bb3ab29c0 Bug 1776895 - [1/5] Cleanup: use UniquePtr rather than manual allocation r=cmartin
No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D153407
2022-08-09 20:18:39 +00:00
Hiroyuki Ikezoe 4907d4f03c Bug 1742797 - Add a new IPC call to clear animation resources on WebRender, r=sotaro.
Differential Revision: https://phabricator.services.mozilla.com/D151481
2022-07-19 19:56:21 +00:00
Butkovits Atila 398eded3f1 Backed out 4 changesets (bug 1742797, bug 1748808) for causing crashes at mozilla::layers::APZCTreeManagerParent::RecvUpdateZoomConstraints.
Backed out changeset 23f2a369a5a7 (bug 1748808)
Backed out changeset 5b0edd03f698 (bug 1742797)
Backed out changeset 8ed69c2c1d49 (bug 1742797)
Backed out changeset 18e11e7ea9d0 (bug 1742797)
2022-07-19 08:12:04 +03:00
Hiroyuki Ikezoe 30a66f3945 Bug 1742797 - Add a new IPC call to clear animation resources on WebRender, r=sotaro.
Differential Revision: https://phabricator.services.mozilla.com/D151481
2022-07-18 18:01:52 +00:00
Csoregi Natalia c97011ab89 Backed out 4 changesets (bug 1742797) for causing failures on /browser_ext_getViews.js. CLOSED TREE
Backed out changeset c48ff146a33d (bug 1742797)
Backed out changeset a692ca1d8401 (bug 1742797)
Backed out changeset cfc1f440fb6d (bug 1742797)
Backed out changeset 88f60761e884 (bug 1742797)
2022-07-13 01:02:54 +03:00
Hiroyuki Ikezoe a576a80a90 Bug 1742797 - Add a new IPC call to clear animation resources on WebRender, r=sotaro.
Differential Revision: https://phabricator.services.mozilla.com/D151481
2022-07-12 14:46:53 +00:00
Emilio Cobos Álvarez 94ea7b0820 Bug 1772692 - AnimationInfo::EnumerateGenerationOnFrame shouldn't need to create a window renderer. r=hiro
There's no need to lazily create a renderer here. We already avoided
this in content processes, but there's no need to do so in the parent
process either.

This shouldn't change behavior, but might help with bug 1772691, and
generally seems cleaner.

Differential Revision: https://phabricator.services.mozilla.com/D148337
2022-06-05 23:20:45 +00:00
Emilio Cobos Álvarez b44d1c0376 Bug 1772432 - Clean up nsWidgetInitData. r=stransky
Use inline initializers, remove dead code, use consistent naming.

No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D148209
2022-06-03 09:41:39 +00:00
Karl Tomlinson b0862b31cc Bug 1771278 - remove unused nsIRollupListener::NotifyGeometryChange() r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D147408
2022-05-26 21:04:26 +00:00
Chris Martin 80881746de Bug 1763023 - Push nsBaseWidget::mSizeMode into child classes r=handyman
This member is no longer used on Windows, and having it in the
base class doesn't provide a real abstraction anyway since
the child classes will break if anything about it is changed.

Differential Revision: https://phabricator.services.mozilla.com/D145132
2022-05-02 14:06:17 +00:00
sotaro 0054e1bdb2 Bug 1736479 - Make gfx SanityTest.jsm work again r=gfx-reviewers,bradwerth
If we want to re-enable SanityTest.jsm test, we need to disable native compositor(DirectComposition) on the testing window, since taking snapshot of native compositor is very slow on Windows. Then CompositorOptions could be used to notice to disable native compositor(DirectComposition).
To notice it from SanityTest.jsm to gecko, nsIAppWindow::needFastSnaphot() is used.

Differential Revision: https://phabricator.services.mozilla.com/D130824
2022-04-20 01:08:52 +00:00
Timothy Nikkel 4cac1c7814 Bug 1763121. nsIDOMWindowUtils::sendNativeTouchpadPan should use an observer to notify when the event has been sent to the destination widget. r=hiro
Otherwise we can return without the widget even seeing the event. This is how other test functions are implemented.

We need this to make the test in bug 1757928 pass.

Differential Revision: https://phabricator.services.mozilla.com/D142943
2022-04-05 22:53:35 +00:00
Chris Martin 7e87f3a1d2 Bug 1756621 - Allow nsBaseWidget::mBorderStyle to be set via constructor r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D139741
2022-02-25 20:08:29 +00:00
Molly Howell 469e3fea9d Bug 1598312 - Support setting a custom resize margin, and apply that to Picture-in-Picture windows. r=cmartin,emilio
Differential Revision: https://phabricator.services.mozilla.com/D138725
2022-02-17 23:18:45 +00:00
Chris Martin 2f8ba0583d Bug 1752619 - Remove aTargetScreen from nsIWidget::MakeFullScreen() r=handyman,spohl,agi,emilio
Differential Revision: https://phabricator.services.mozilla.com/D137336
2022-01-31 22:07:23 +00:00
Hiroyuki Ikezoe 5414f6328c Bug 1348786 - Factor out functions to (may) trigger a swipe gesture into nsBaseWidget. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D134367
2022-01-05 09:08:07 +00:00
Hiroyuki Ikezoe b6f644b523 Bug 1348786 - Move SendMayStartSwipe() into nsBaseWidget. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D134365
2022-01-05 09:08:07 +00:00
Hiroyuki Ikezoe cc326dc6bf Bug 1348786 - Move ReportSwipeStarted() and TrackScrollEventAsSwipe() into nsBaseWidget. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D134364
2022-01-05 09:08:06 +00:00
Hiroyuki Ikezoe 78a54829f4 Bug 1348786 - Move mCurrentPanGestureBelongsToSwipe into nsBaseWidget. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D134363
2022-01-05 09:08:06 +00:00
Hiroyuki Ikezoe c0776e780a Bug 1348786 - Move mSwipeEventQueue from nsChildView into nsBaseWidget. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D134362
2022-01-05 09:08:06 +00:00
Hiroyuki Ikezoe 0f2ffcf2af Bug 1348786 - Move SwipeTracker class as reusable for other platforms. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D134361
2022-01-05 09:08:05 +00:00
Hiroyuki Ikezoe 6b5874286f Bug 1348786 - Move nsChildView::DispatchWindowEvent(WidgetGUIEvent&) into nsBaseWidget. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D134359
2022-01-05 09:08:04 +00:00
Emilio Cobos Álvarez 17025d2d80 Bug 1748174 - Clean-up a bit touch-action code. r=hiro
This shouldn't change behavior but makes following the code a bit
easier. There's no point in using callbacks for touch-action as:

 * We return the computed flags anyways.
 * Each caller wants to do something different.
 * (more importantly) The callback gets called synchronously.

So move the relevant code to TouchActionHelper and make the callers deal
with the flags as they please. I've preserved the behavior of only doing
the thing if the flags array is non-empty.

Differential Revision: https://phabricator.services.mozilla.com/D134933
2022-01-04 13:31:34 +00:00
Emilio Cobos Álvarez c9d4405306 Bug 1743310 - Remove paint flashing. r=gfx-reviewers,lsalzman
It's only meaningfully read in two places:

 * WebRender fallback code.
 * Some widget DEBUG-only code, which on Linux is ifdef'd and on Windows does
   some rather sketchy things like sleeping for 30ms

So I think it should be ok to remove, since WR fallback has its own flashing
pref as well, IIUC.

Differential Revision: https://phabricator.services.mozilla.com/D132313
2021-11-30 11:46:08 +00:00
Jamie Nicol 0155e30e96 Bug 1741156 - Reinitialize compositor and request repaint after GPU process restart. r=aosmond,geckoview-reviewers,agi
This patch ensures that, following a GPU process crash, we
re-initialize the compositor and resume painting on Android.

nsWindow::GetWindowRenderer() is made to always reinitialize the
window renderer if there is none, like on other platforms. We
therefore no longer need to track whether webrender is being disabled,
as this is no longer a special case.

Previously we started the compositor as initially paused in
nsBaseWidget::CreateCompositorSession only if the widget did not yet
have a surface. Now we must unconditionally (re)start it as initially
paused, as even though the widget in the parent process may have a
surface, we will not have been able to send it to the GPU process
yet. We will send the surface to the compositor once control flow
returns to nsWindow::CreateLayerManager, where we will also now resume
the compositor if required.

Finally, we must ensure that we manually trigger a paint, both in the
parent and content processes. On other platforms this occurs
automatically following a GPU process loss through various refresh
driver events. On Android, however, nothing causes the refresh driver
to paint by itself, and we cannot receive input without first
initializing our APZ controllers, which does not happen until the
compositor receives a display list. We therefore must manually
schedule a paint. We do so from nsWindow::NotifyCompositorSessionLost
for the parent process, and BrowserChild::ReinitRendering for content
processes.

Differential Revision: https://phabricator.services.mozilla.com/D131232
2021-11-29 20:52:31 +00:00
Emilio Cobos Álvarez c818031a2d Bug 1737044 - Include pointer and frame in nsWindow logging. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D129160
2021-10-21 14:02:30 +00:00
Emilio Cobos Álvarez 6c858f9e0c Bug 1736441 - Remove a bunch of dead plugins code from widget/. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D128863
2021-10-19 11:19:13 +00:00
Marian-Vasile Laza 0f2876e6ca Backed out changeset 115b43608ec1 (bug 1736441) for causing build bustages on nsWindow.cpp. CLOSED TREE 2021-10-19 13:54:23 +03:00
Emilio Cobos Álvarez c70d201838 Bug 1736441 - Remove a bunch of dead plugins code from widget/. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D128863
2021-10-19 10:06:50 +00:00
Jeff Muizelaar 6ff665fec1 Bug 1736086 - Rename CreateBasicLayerManager to CreateFallbackRenderer. r=gfx-reviewers,mstange
That's what it actually does now

Differential Revision: https://phabricator.services.mozilla.com/D128634
2021-10-16 00:02:45 +00:00
sotaro bbbd304278 Bug 1732733 - Add support of window occlusion on Windows by disabling it by pref r=jrmuizel,gfx-reviewers
Implementation is basically borrowed from chromium's NativeWindowOcclusionTrackerWin. For now, window occlusion could be applied only to toplevel window with compositor. Overview of current implementation is the following.
https://github.com/sotaroikeda/firefox-diagrams/blob/master/widget/widget_WinWindowOcclusionTracker_94.pdf

Capability of window occlusion is disabled by pref. VirtualDesktop handling is going to be handled by Bug 1732737.
nsPrintDialogUtil.cpp is moved to non-unified source to avoid build failure.

Differential Revision: https://phabricator.services.mozilla.com/D126710
2021-10-06 07:21:59 +00:00
Kagami Sascha Rosylight 6c8d3ce28a Bug 1728171 - Part 2: Add button parameter to utils.sendNativePenInput r=cmartin,edgar
Differential Revision: https://phabricator.services.mozilla.com/D124172
2021-09-06 11:50:34 +00:00
Matt Woodrow d41e38aec0 Bug 1727682 - Make WebRenderLayerManager not inherit LayerManager. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D124433
2021-09-05 22:36:45 +00:00
Matt Woodrow 7755c29fd8 Bug 1727423 - Remove BasicLayerManager. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123555
2021-08-25 07:35:17 +00:00
criss 58591696b7 Backed out 2 changesets (bug 1727423) for causing build bustages
Backed out changeset 9b2ca95a6527 (bug 1727423)
Backed out changeset 1f01fcbd46a8 (bug 1727423)
2021-08-25 04:41:35 +03:00
Matt Woodrow 59e71b6c78 Bug 1727423 - Remove BasicLayerManager. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123555
2021-08-25 01:04:26 +00:00
stransky 9faae4a7f3 Bug 1722450 Make nsBaseWidget class thread safe, r=emilio
nsWindow on Linux is accessed from Compositor thread so we need to make it thread safe.

Depends on D121650

Differential Revision: https://phabricator.services.mozilla.com/D122072
2021-08-11 07:48:53 +00:00