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

573 Коммитов

Автор SHA1 Сообщение Дата
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
Jamie Nicol 9849a83f64 Bug 1762424 - Provide SurfaceControl to compositor and render in to child Surface. r=agi,gfx-reviewers,geckoview-reviewers,jrmuizel,owlish
This adds new version of the GeckoView API
GeckoDisplay.surfaceChanged(), which takes a single argument of a new
type GeckoDisplay.SurfaceInfo. As well as containing fields for each
the the existing surfaceChanged() arguments, this has an additional
SurfaceControl field. This must be provided when rendering in to a
SurfaceView on SDK level 29 or greater. On earlier SDK levels, or when
rendering in to a TextureView or SurfaceTexture, this can be
null. SurfaceViewWrapper and GeckoView classes are updated to handle
this correctly. The old surfaceChanged() methods have been deprecated,
and tests have been updated to use the new version.

When provided, the SurfaceControl is passed along with the Surface
through to the widget and, when enabled, over to the GPU process. The
compositor widget then creates a child Surface from that
SurfaceControl, and renders in to that child Surface rather than the
parent one.

This works around a bug on Android 12 where following the GPU process
dying the Surface was left in an unusable state, meaning subsequent
attempts to initialize a compositor would fail. Because the Surface is
now created by the GPU process it gets destroyed when the process
dies, therefore a new Surface can successfully be created when we
reinitialize the compositor.

Differential Revision: https://phabricator.services.mozilla.com/D143485
2022-04-18 18:11:07 +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
stransky 9cac822f97 Bug 1761435 [Wayland] Store only move-to-rect popup size r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D142048
2022-03-28 10:13:40 +00:00
stransky 588b7423e7 Bug 1760276 [Wayland] Fix loop in popup move-to-rect resizes r=emilio
Use mMoveToRectPopupRect popup constrains in nsMenuPopupFrame::SetPopupPosition only and make it pernament.
In such setup works as screen size constraints.

Don't call SetPopupPosition from move-to-rect callback and let layout code to handle that.

Remove MoveToRectPopupRectClear() as it's not needed, we keep mMoveToRectPopupRect
in nsMenuPopupFrame as well as we keep screen sizes there.

Differential Revision: https://phabricator.services.mozilla.com/D141602
2022-03-25 11:15:39 +00:00
Norisz Fay d29d98d869 Backed out 3 changesets (bug 1760276) for causing build bustages on nsMenuPopupFrame.cpp CLOSED TREE
Backed out changeset e98dce4c58db (bug 1760276)
Backed out changeset 3d351d90db7b (bug 1760276)
Backed out changeset e8e0571ab13b (bug 1760276)
2022-03-25 12:02:18 +02:00
stransky 0226068db9 Bug 1760276 [Wayland] Fix loop in popup move-to-rect resizes r=emilio
Use mMoveToRectPopupRect popup constrains in nsMenuPopupFrame::SetPopupPosition only and make it pernament.
In such setup works as screen size constraints.

Don't call SetPopupPosition from move-to-rect callback and let layout code to handle that.

Remove MoveToRectPopupRectClear() as it's not needed, we keep mMoveToRectPopupRect
in nsMenuPopupFrame as well as we keep screen sizes there.

Differential Revision: https://phabricator.services.mozilla.com/D141602
2022-03-25 09:33:18 +00:00
stransky 19c39f9ec2 Bug 1760172 [Wayland] Rename PreferredPopupRect to MoveToRectPopupRect r=emilio
Rename PreferredPopupRect* methods/attributes to MoveToRectPopupRect* ones as it holds info about coordinates received from move-to-rect popup placement done by Wayland compositor.

Differential Revision: https://phabricator.services.mozilla.com/D141425
2022-03-22 20:04:54 +00:00
Emilio Cobos Álvarez 4b49d8b1fa Bug 1757106 - Clean up menu popup rect handling. r=stransky
Store preferred rect in dev pixels, which simplifies a bit other calculations,
and ensures that the nsMenuPopupFrame code accounts for zoom etc.

Use existing conversion methods for GDK <-> Device <-> CSS conversions.

Differential Revision: https://phabricator.services.mozilla.com/D139623
2022-03-01 01:06:37 +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
Masayuki Nakano d450beac6f Bug 1191862 - part 1: Make `nsIWidget::NativeKeyBindingsType` independent from `nsIWidget` and defined in an independent header file r=smaug
I'd like to use it in `IMEData.h`.  However, adding new include into it may
cause bustage with MinGW, and it's included by `nsIWidget.h` because `nsIWidget`
requires some classes defined in `IMEData.h`.  Therefore, I'd like to make a
new header file for avoiding the include hell.

Differential Revision: https://phabricator.services.mozilla.com/D138007
2022-02-15 08:00:05 +00:00
Masayuki Nakano 37e94b914c Bug 1754367 - Get rid of `WidgetGUIEvent::mPluginEvent` r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D138257
2022-02-10 00:39:42 +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
Emilio Cobos Álvarez 6e85ccca91 Bug 1742358 - Use non-blank paint rather than contentful paint to fix test_drawWindow_widget_layers.html, which relies on transparent clear.
MANUAL PUSH: Orange fix CLOSED TREE
2022-01-09 04:28:17 +01:00
Emilio Cobos Álvarez 7b3016409e Bug 1742358 - Set default clear color to widget window background on expose, and reset it on first contentful paint. r=jrmuizel,stransky
Differential Revision: https://phabricator.services.mozilla.com/D135075
2022-01-08 23:52:54 +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 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 f44b6d79db Bug 1736675 - Make sure to only override color-scheme on widgets if the color-scheme property says so. r=mstange
So that when the system changes appearance we respect that automatically.

Differential Revision: https://phabricator.services.mozilla.com/D128924
2021-10-19 19:22:35 +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
Emilio Cobos Álvarez 9ac5bbff6d Bug 1734716 - Make macOS menupopups follow color-scheme. r=mstange,mac-reviewers
They were following the global appearance of the window.

Differential Revision: https://phabricator.services.mozilla.com/D127931
2021-10-08 16:28:29 +00:00
Chris Martin 7a54387542 Bug 1730309: Part 1 - Use Windows behavior for minimize and close buttons r=emk,emilio
Bug 1718629 did this for the maximize button.  This patch does the same for minimize and close, which we are switching to for consistent tooltip styling.

Differential Revision: https://phabricator.services.mozilla.com/D125625
2021-10-05 17:54:47 +00:00
David Parks 45d0452571 Bug 1718629: Handle Windows WM_NCHITTEST message for maximize button r=emilio,cmartin
Windows 11's Snap Layouts feature generates a window of layout options when the maximize window button is moused over.  This requires the WM_NCHITTEST message to handle hit detection for the button.  Since WM_NCHITTEST messages are very common, although we limit them to no more than every 50ms, we don't want to do a full hit test each time.  Instead, we cache the maximize button rect in the widget when it is positioned during layout.

Differential Revision: https://phabricator.services.mozilla.com/D123982
2021-09-07 16:03:57 +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 d93d452a96 Bug 1727672 - Remove LayerManagerComposite. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D123708
2021-08-26 04:59:57 +00:00
Matt Woodrow d751b43176 Bug 1727489 - Remove PLayerTransaction. r=jrmuizel,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D123595
2021-08-26 04:59:57 +00:00
Butkovits Atila c83e348e26 Backed out 2 changesets (bug 1727488, bug 1727489) for causing bustages on KnowsCompositor.cpp. CLOSED TREE
Backed out changeset 5a00db1b7a6a (bug 1727489)
Backed out changeset 13686567e748 (bug 1727488)
2021-08-26 04:49:16 +03:00
Matt Woodrow 0d4e9aa48a Bug 1727489 - Remove PLayerTransaction. r=jrmuizel,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D123595
2021-08-26 00:25:21 +00:00
Nika Layzell 6d8a72603f Bug 1727422 - Support arbitrary integer keys in nsTHashMap, r=xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D123547
2021-08-25 16:31:08 +00:00
stransky 50cee5c326 Bug 1718727 [Wayland] Don't constrain popup size by screen size on Wayland, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D122102
2021-08-11 06:37:07 +00:00
Timothy Nikkel 5014725e77 Bug 1678771. Add test. r=hiro
We implement a new nsIDOMWindowUtils function sendNativeTouchpadPan to do this. It is only implemented on Windows here.

Depends on D122048

Differential Revision: https://phabricator.services.mozilla.com/D122049
2021-08-08 22:04:18 +00:00
Timothy Nikkel 5eefc2666f Bug 1678771. Rename TouchpadPinchPhase to TouchpadGesturePhase. r=hiro
So we can use it for sending pan gestures too.

Depends on D114358

Differential Revision: https://phabricator.services.mozilla.com/D122048
2021-08-08 22:04:17 +00:00
Kashav Madan f090aabc96 Bug 1718761 - Move {Start,Stop}ApzAutoscroll to CanonicalBrowsingContext, r=Gijs,hiro
This accomplishes 2 things:

1. Allows us to directly fetch the layersId of the process that is
   autoscrolling, which avoids having to fetch it in AutoScrollChild and pass it
   around. This fixes autoscrolling out-of-process frames with Fission enabled.
2. Makes it easier to handle autoscrolling of in-process documents, since that
   can't happen through PBrowser.

Differential Revision: https://phabricator.services.mozilla.com/D120766
2021-07-31 01:39:09 +00:00
Sandor Molnar ca94997814 Backed out changeset 4593c3d66951 (bug 1718761) for causing clang build bustages. CLOSED TREE 2021-07-31 03:44:56 +03:00
Kashav Madan c84c4eb9d7 Bug 1718761 - Move {Start,Stop}ApzAutoscroll to CanonicalBrowsingContext, r=Gijs,hiro
This accomplishes 2 things:

1. Allows us to directly fetch the layersId of the process that is
   autoscrolling, which avoids having to fetch it in AutoScrollChild and pass it
   around. This fixes autoscrolling out-of-process frames with Fission enabled.
2. Makes it easier to handle autoscrolling of in-process documents, since that
   can't happen through PBrowser.

Differential Revision: https://phabricator.services.mozilla.com/D120766
2021-07-30 23:39:32 +00:00
Matt Woodrow 912b7f8ef1 Bug 1721537 - Split out WindowRenderer base class from LayerManager. r=miko
Depends on D120439

Differential Revision: https://phabricator.services.mozilla.com/D120440
2021-07-22 22:58:57 +00:00
Matt Woodrow da45121505 Bug 1721537 - Simplify nsIWidget::GetLayerManager by removing unused parameters. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D120439
2021-07-22 22:58:57 +00:00
Markus Stange a36e8a2b81 Bug 1715145 - Remove now-unnecessary per-window appearance override. This reverts bug 1700371. r=emilio
Depends on D117098

Differential Revision: https://phabricator.services.mozilla.com/D117099
2021-06-08 02:01:10 +00:00
sotaro c94f215c05 Bug 1710533 - Apply the widget size constraints to newBounds r=mstange,gfx-reviewers
When nsView::CalcWidgetBounds() size might be applied to widget with modification. And next widget->GetClientBounds() could be different than nsView::CalcWidgetBounds() again with several reasons. But it seems OK to apply widget->ConstrainSize() in nsView::DoResetWidgetBounds(). It could remove repaint because of widget->ConstrainSize() call in the Resize().

Differential Revision: https://phabricator.services.mozilla.com/D114814
2021-05-13 09:34:26 +00:00
Butkovits Atila fed10644e6 Backed out changeset 64abec51f1cb (bug 1710533) for causing failures at test_panel.xhtml. CLOSED TREE 2021-05-12 21:22:16 +03:00
sotaro f00fe575af Bug 1710533 - Apply the widget size constraints to newBounds r=mstange,gfx-reviewers
When nsView::CalcWidgetBounds() size might be applied to widget with modification. And next widget->GetClientBounds() could be different than nsView::CalcWidgetBounds() again with several reasons. But it seems OK to apply widget->ConstrainSize() in nsView::DoResetWidgetBounds(). It could remove repaint because of widget->ConstrainSize() call in the Resize().

Differential Revision: https://phabricator.services.mozilla.com/D114814
2021-05-12 16:34:54 +00:00
Emilio Cobos Álvarez 1cdf344860 Bug 1680387 - Apply intrinsic image resolution as appropriate in layout/style/dom, and update test expectations. r=tnikkel
This should be mostly straight-forward, since we have code for this
anyways for image-set() and srcset.

The only thing is that we were using floats for resolution, but since
EXIF allows you to scale each axis separately, we now need to pass an
image::Resolution instead.

The main outstanding issue is the spec comment mentioned in the previous
patch, about what happens if you have srcset/image-set and the image
density specified together. For now I've implemented what the
image-set() spec says, but this is subject to change before shipping of
course.

Differential Revision: https://phabricator.services.mozilla.com/D113265
2021-05-05 09:41:24 +00:00
Iulian Moraru b21df91635 Backed out 3 changesets (bug 1680387) for causing browser chrome failures on browser_bug592641.js. CLOSED TREE
Backed out changeset 65616921e520 (bug 1680387)
Backed out changeset 51531850a9a2 (bug 1680387)
Backed out changeset 0c1c5e1f901b (bug 1680387)
2021-05-04 16:28:17 +03:00
Emilio Cobos Álvarez 11ad9c7bcd Bug 1680387 - Apply intrinsic image resolution as appropriate in layout/style/dom, and update test expectations. r=tnikkel
This should be mostly straight-forward, since we have code for this
anyways for image-set() and srcset.

The only thing is that we were using floats for resolution, but since
EXIF allows you to scale each axis separately, we now need to pass an
image::Resolution instead.

The main outstanding issue is the spec comment mentioned in the previous
patch, about what happens if you have srcset/image-set and the image
density specified together. For now I've implemented what the
image-set() spec says, but this is subject to change before shipping of
course.

Differential Revision: https://phabricator.services.mozilla.com/D113265
2021-05-04 10:24:07 +00:00
Greg V c34911209c Bug 1580595 - [Wayland] Add support for pointer lock via relative-pointer and pointer-constraints r=stransky,rmader,emilio
On Wayland, it is not possible to warp the pointer.
To use the appropriate protocols, new IPC messages were added for supporting
a platform's native pointer locking mechanism.

Differential Revision: https://phabricator.services.mozilla.com/D102114
2021-04-22 14:56:43 +00:00
Emilio Cobos Álvarez 127b46abb1 Bug 1705877 - Apply image-set resolution for cursors on Windows and Mac. r=dholbert
This required more refactoring so it seemed sensible to split it out. GTK
doesn't seem to provide an API for scaled cursors so we get pixelated cursors
instead.

Differential Revision: https://phabricator.services.mozilla.com/D112676
2021-04-20 14:21:25 +00:00
Emilio Cobos Álvarez 294d0f244e Bug 1705877 - Introduce nsIWidget::Cursor. r=dholbert
This removes some sketchy non-caching of cursors on windows while at it,
now that plugins are gone, but otherwise shouldn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D112475
2021-04-20 09:47:32 +00:00
Emilio Cobos Álvarez a5f0e8f83c Bug 1706051 - Remove some IPC messages that are unused. r=smaug
Seems they were for plugins, but now they're just dead code.

Differential Revision: https://phabricator.services.mozilla.com/D112539
2021-04-19 13:02:33 +00:00