Commit Graph

186 Commits

Author SHA1 Message Date
Hiroyuki Ikezoe
5e685d5724 Bug 1312165 - Parse scroll-snap-stop style and propagate it to APZ side. r=emilio,botond
Depends on D146147

Differential Revision: https://phabricator.services.mozilla.com/D145850
2022-05-31 00:45:11 +00:00
Botond Ballo
0d02f65a11 Bug 1743731 - Disable the 'two layers that scroll together' assertion for content being presented in a paginated way. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D146972
2022-05-21 17:52:44 +00:00
sotaro
967d2eafd2 Bug 1768791 - Add overlay support information to about:support r=jrmuizel,gfx-reviewers
The information is similar to chromium's overlay support information.

Differential Revision: https://phabricator.services.mozilla.com/D146042
2022-05-11 15:10:30 +00:00
Hiroyuki Ikezoe
f089754755 Bug 1766192 - Introduce SnapTarget struct along with snap-area for each element. r=botond
In the next change we will use the snap-area to implement `snap-score`
properly.

Differential Revision: https://phabricator.services.mozilla.com/D144532
2022-05-10 08:51:37 +00:00
sotaro
38ea8eecd0 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
Andrew Osmond
1f65b6ffae Bug 1760663 - Add blocklist support for WebGPU. r=gfx-reviewers,nical
This patch just adds the plumbing to allow for baked in blocklist rules
or the downloadable blocklist to prevent certain configurations from
getting WebGPU. It does not add any rules.

It also changes us from allowing WebGPU only in nightly, including
tests, to not release and not beta. This allows try to run the WebGPU
tests as expected, since even try builds forked from mozilla-central are
not considered nightly builds by CI (or so it seems).

Differential Revision: https://phabricator.services.mozilla.com/D141682
2022-03-22 15:22:39 +00:00
Nika Layzell
6b07821859 Bug 1754037 - Part 3c: Automatically update all ParamTraits implementations, r=ipc-reviewers,media-playback-reviewers,bryce,mccr8
Automatically generated rewrites of all ParamTraits and IPDLParamTraits
implementations in-tree to use IPC::Message{Reader,Writer}.

Differential Revision: https://phabricator.services.mozilla.com/D140004
2022-03-04 15:39:41 +00:00
Andrew Osmond
16bded8b81 Bug 1754978 - Part 1. Refactor CompositableHandle infrastructure to allow in-process driven handles. r=sotaro
For WebGPU, we produce the textures in the compositor process and the
content process doesn't need to be that involved except for hooking up
the texture to the display list. Currently this is done via an external
image ID.

Given that WebGPU needs to work with OffscreenCanvas, it would be best
if its display pipeline was consistent whether it was gotten from an
HTMLCanvasElement, OffscreenCanvas on the main thread, or on a worker
thread. As such, using an AsyncImagePipeline would be best.

However there is no real need to bounce the handles across process
boundaries. Hence this patch which adds CompositableInProcessManager.
This static class is responsible for collecting WebRenderImageHost
objects backed by TextureHost objects which do not leave the compositor
process. This will allow WebGPUParent to schedule compositions directly
in future patches.

Differential Revision: https://phabricator.services.mozilla.com/D138588
2022-02-18 15:59:12 +00:00
Iulian Moraru
e38c48df42 Backed out 2 changesets (bug 1754978) for causing valgrind bustages.
Backed out changeset 491a985fc34a (bug 1754978)
Backed out changeset 98983bf9eaed (bug 1754978)
2022-02-18 00:36:31 +02:00
Andrew Osmond
e6c65476b6 Bug 1754978 - Part 1. Refactor CompositableHandle infrastructure to allow in-process driven handles. r=sotaro
For WebGPU, we produce the textures in the compositor process and the
content process doesn't need to be that involved except for hooking up
the texture to the display list. Currently this is done via an external
image ID.

Given that WebGPU needs to work with OffscreenCanvas, it would be best
if its display pipeline was consistent whether it was gotten from an
HTMLCanvasElement, OffscreenCanvas on the main thread, or on a worker
thread. As such, using an AsyncImagePipeline would be best.

However there is no real need to bounce the handles across process
boundaries. Hence this patch which adds CompositableInProcessManager.
This static class is responsible for collecting WebRenderImageHost
objects backed by TextureHost objects which do not leave the compositor
process. This will allow WebGPUParent to schedule compositions directly
in future patches.

Differential Revision: https://phabricator.services.mozilla.com/D138588
2022-02-16 22:23:19 +00:00
Hiroyuki Ikezoe
7f131be378 Bug 1571758 - Introduce scroll generation in APZC and SampledAPZCState and inform it to the scrollable frame on the main-thread via RepaintRequest. r=botond
The reason why the global ScrollGeneration::sCounter doesn't work for the APZ
case is the APZ sampler thread is per our top level browser window, so if
there are multiple browser windows at the same time, the sCounter will be muted
from different sampler threads.

Differential Revision: https://phabricator.services.mozilla.com/D133439
2022-01-31 09:40:33 +00:00
Mike Conley
6f3a7b3244 Bug 1749825 - Make it possible for privileged script to opt elements into mousewheel autodir/honour root behaviour. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D135914
2022-01-21 16:12:48 +00:00
Timothy Nikkel
68839eee29 Bug 1733747. Remove remaining critical display port code. r=botond
There is one thing to note in this patch that is a change: this patch changes the displayport that we log for test purposes from the critical display port to the display port.

This will only be different on android. If tests were checking this then they were broken because the critical display port has no significance. I did a quick survey of the tests I could find that used this. None of them seem like they really want the critical display port (given the new world where critical display port has no significance).

Depends on D127350

Differential Revision: https://phabricator.services.mozilla.com/D127351
2022-01-17 10:29:44 +00:00
Jeff Muizelaar
21fefb11cf Bug 1743955 - Remove SimpleLayerAttributes. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D132656
2021-12-02 14:37:20 +00:00
Nika Layzell
6aff4075e1 Bug 1734735 - Part 6: Remove dead TextureSync code, r=dthayer
Differential Revision: https://phabricator.services.mozilla.com/D128215
2021-11-23 16:15:22 +00:00
Botond Ballo
8ec4f02275 Bug 1740411 - Remove EventRegions. r=hiro
Depends on D131689

Differential Revision: https://phabricator.services.mozilla.com/D131690
2021-11-22 05:34:14 +00:00
Dzmitry Malyshau
0dec7a82a6 Bug 1740165 properly serialize mUseWebGPU r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D131448
2021-11-18 17:13:10 +00:00
Hiroyuki Ikezoe
d57b682fc1 Bug 1739541 - Introduce APZScrollAnimationType and use it in RepaintRequest and ScrollFrameHelopr instead of a boolean representing whether there's an animation or not. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D130421
2021-11-09 09:19:26 +00:00
sotaro
49d56465ab Bug 1739621 - Remove remaining UseAdvancedLayers() r=jrmuizel,gfx-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D130467
2021-11-07 12:44:53 +00:00
Timothy Nikkel
d6a5d9edd2 Bug 1721601. Move "zoom in if can't zoom out" from being a flag to part of ZoomTarget for AsyncPanZoomController::ZoomToRect. r=botond
Instead of passing this flag all of the time for double taps we want to decide to do this or not in CalculateRectToZoomTo. Moving it into ZoomTarget seems like a good way to do this (which is done in the next patch).

Differential Revision: https://phabricator.services.mozilla.com/D128435
2021-10-16 05:07:55 +00:00
Timothy Nikkel
f4d94b8338 Bug 1729784. Remove unused FrameMetrics::mExtraResolution. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D124978
2021-09-23 22:07:26 +00:00
Timothy Nikkel
ad2c1545bc Bug 1731929. Add transform to ancestor scale to FrameMetrics/RepaintRequest. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D126305
2021-09-23 10:29:44 +00:00
Timothy Nikkel
5a30c28cca Bug 1729606. Remove unused LayerClip, Layer::Get/SetScrolledClip, Layer::*AncestorMaskLayer* and related code. r=botond
Depends on D125473

Differential Revision: https://phabricator.services.mozilla.com/D125476
2021-09-14 00:05:49 +00:00
Timothy Nikkel
541f6bd9c8 Bug 1729606. Remove unused ScrollMetadata::mScrollClip. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D125473
2021-09-14 00:05:48 +00:00
Matt Woodrow
ed3765d185 Bug 1726063 - Remove support for non-WR compositor initialization. r=jrmuizel,aosmond
Depends on D122796

Differential Revision: https://phabricator.services.mozilla.com/D122798
2021-08-17 23:19:44 +00:00
Timothy Nikkel
b40a442614 Bug 1713589. If double tap zoom can't find a rect to zoom in to and we are zoomed out then zoom in some small default amount. r=botond
This provides feedback to the user, otherwise nothing happens and the user doesn't know if their input was accepted or not. This matches what Chrome does.

We add a new flag for ZoomToRect that only double tap uses. We also need to add the cursor position to the ZoomTarget struct as that is what we will be zooming in on. (CalculateRectToZoomTo has a little bit of refactoring to calculate this point sooner and without an intermediate variable.)

The rest of the patch is some logic in ZoomToRect to decide when to do this, and some math to compute the zoom to rect (which is similar to the zoom out code).

Differential Revision: https://phabricator.services.mozilla.com/D116370
2021-06-03 09:51:50 +00:00
Timothy Nikkel
4f0e1b9953 Bug 1707417. Look at the composition width _ignoring_ scrollbars when looking for resolution changes. r=botond
Because adding or removing a scrollbar can change without the resolution changing (in particular, when zooming in we can add scrollbars) and we don't want to detect that content has updated it's resolution and override our (apz) resolution in that case.

This happens when double tapping creates a scrollbar and the resulting repaint updates the apz resolution while the zoom animation is ongoing, messing it up for a frame.

Adding a field for frame metrics just for this is kind of gross, but it can go away when that todo is fixed in NotifyLayersUpdated.

Differential Revision: https://phabricator.services.mozilla.com/D113303
2021-04-29 04:43:05 +00:00
Botond Ballo
b1a4b0137c Bug 1705927 - Make GenericOverscrollEffect a no-op if prefers-reduced-motion is set. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D112660
2021-04-21 02:25:11 +00:00
imoraru
3f404f0a1b Backed out changeset 30af8f80e275 (bug 1705927)for causing failures at test_group_hittest-2.html. CLOSED TREE 2021-04-20 12:03:21 +03:00
Botond Ballo
913a3f0e28 Bug 1705927 - Make GenericOverscrollEffect a no-op if prefers-reduced-motion is set. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D112660
2021-04-20 01:50:53 +00:00
Timothy Nikkel
3d0b08b8af Bug 1705622. Make sure the async zoom container id gets passed all the way through to the HitTestingTreeNode. r=botond
Also rename IsAsyncZoomContainer to GetAsyncZoomContainerId, since it returns a maybe this serves both purposes.

We need this for the next patches.

Differential Revision: https://phabricator.services.mozilla.com/D112484
2021-04-19 15:57:03 +00:00
smolnar
237d2a736a Backed out 4 changesets (bug 1705622) for causing dt failures in browser_touch_simulation.js CLOSED TREE
Backed out changeset 44277989aa32 (bug 1705622)
Backed out changeset 5a374b87bffb (bug 1705622)
Backed out changeset 8eab73ad3b4b (bug 1705622)
Backed out changeset dfcbcfbe0e47 (bug 1705622)
2021-04-19 10:21:09 +03:00
Timothy Nikkel
c5cf61cc88 Bug 1705622. Make sure the async zoom container id gets passed all the way through to the HitTestingTreeNode. r=botond
Also rename IsAsyncZoomContainer to GetAsyncZoomContainerId, since it returns a maybe this serves both purposes.

We need this for the next patches.

Differential Revision: https://phabricator.services.mozilla.com/D112484
2021-04-19 01:14:09 +00:00
Timothy Nikkel
133ad31f19 Bug 1702467. Double tap zoom can make us zoom to a part of an element when we could fit the entire element at the same zoom. r=botond
If we double tap on an element that is narrower than the viewport at maximum we can get into a situation where we zoom on part (say the bottom half) of that element but we could easily fit the entire element.

This happens because the code that calculate the rect to zoom to (CalculateRectToZoomTo) doesn't know about the maximum zoom. So it proceeds as though we will fit the width of the element. Under that assumption we will have to cut off part of the element vertically, so the code centers the rect on the users tap point.

This ends up cutting off part of the element vertically when it is clear that the whole element can fit on screen, which is a pretty ugly result.

This is not my favourite patch. This seemed to make the most sense. Another option I considered was passing the tap point through to AsyncPanZoomController::ZoomToRect but I think this approach came out better: the calculation all happens in one place at one time.

Differential Revision: https://phabricator.services.mozilla.com/D110538
2021-04-13 10:41:51 +00:00
sotaro
3a028b8127 Bug 1697155 - Add AllowSoftwareWebRenderOGL() to CompositorOptions to allow Software WebRender with CompositorOGL on a per widget basis r=aosmond
This is preparation of bug 1697096.

Differential Revision: https://phabricator.services.mozilla.com/D107638
2021-03-09 22:24:15 +00:00
Hiroyuki Ikezoe
9f727bae2a Bug 1678505 - Add overscroll-behavior and scrollable directions into APZHandledResult. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D103419
2021-03-02 08:06:28 +00:00
Hiroyuki Ikezoe
367ef9ceec Bug 1678505 - Make APZEventResult::mStatus and mHandledResult private. r=botond
We do want APZEventResult to have a valid mHandledResult in the case of
nsEventStatus_eConsumeDoDefault.

Note that when we call SetStatusAsConsumeDoDefault() with a InputBlockState,
in ReceiveScrollWheelInput() for example, we need to keep the block alive there,
so each block is now RefPtr-ed instead of a raw pointer in such functions (the
raw pointer is sometimes the active one (mActiveWheelBlock etc.) which will be
discarded in ProcessQueue()).

Differential Revision: https://phabricator.services.mozilla.com/D103417
2021-03-02 08:06:27 +00:00
Csoregi Natalia
250c3e40fc Backed out 11 changesets (bug 1678505) for causing crashes. a=backout
Backed out changeset 7cd5f2c1c3f4 (bug 1678505)
Backed out changeset 09f4c4093c07 (bug 1678505)
Backed out changeset 76e3f391b7dd (bug 1678505)
Backed out changeset 6a0e949d4a2d (bug 1678505)
Backed out changeset 69c7b98ac8f6 (bug 1678505)
Backed out changeset 63608c5df1b0 (bug 1678505)
Backed out changeset a4532c4a1768 (bug 1678505)
Backed out changeset 09aab64b89cd (bug 1678505)
Backed out changeset e832d2bfe7a6 (bug 1678505)
Backed out changeset e0898b4f9fe6 (bug 1678505)
Backed out changeset 04a759c327cd (bug 1678505)
2021-02-27 11:26:46 +02:00
Hiroyuki Ikezoe
12b1f82bd6 Bug 1678505 - Add overscroll-behavior and scrollable directions into APZHandledResult. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D103419
2021-02-26 04:15:18 +00:00
Hiroyuki Ikezoe
01b1d58072 Bug 1678505 - Make APZEventResult::mStatus and mHandledResult private. r=botond
We do want APZEventResult to have a valid mHandledResult in the case of
nsEventStatus_eConsumeDoDefault.

Note that when we call SetStatusAsConsumeDoDefault() with a InputBlockState,
in ReceiveScrollWheelInput() for example, we need to keep the block alive there,
so each block is now RefPtr-ed instead of a raw pointer in such functions (the
raw pointer is sometimes the active one (mActiveWheelBlock etc.) which will be
discarded in ProcessQueue()).

Differential Revision: https://phabricator.services.mozilla.com/D103417
2021-02-26 04:15:18 +00:00
Andrew Osmond
293ca6b311 Bug 1688096 - Part 2. Add flag to CompositorOptions to allow SW-WR on a per widget basis. r=mattwoodrow
The pref gfx.webrender.software.unaccelerated-widget.allow may be used
to allow software WebRender to be used with new windows/popups that have
transparency on Windows. Otherwise they would fallback to basic layers.

Similarly, the pref gfx.webrender.software.unaccelerated-widget.force
may be used to force software WebRender for all windows that would
fallback to basic layers.

Differential Revision: https://phabricator.services.mozilla.com/D104855
2021-02-24 19:40:00 +00:00
Cosmin Sabou
9ef271b5ba Backed out 2 changesets (bug 1688096) for win webrender sw_compositor related crashes. CLOSED TREE
Backed out changeset aa0d1698aff8 (bug 1688096)
Backed out changeset 3ad2f4d0c317 (bug 1688096)
2021-02-18 19:52:29 +02:00
Andrew Osmond
2a2d062f3f Bug 1688096 - Part 2. Add/use flag to CompositorOptions to allow SW-WR on a per widget basis. r=mattwoodrow
The pref gfx.webrender.software.unaccelerated-widget.allow may be used
to allow software WebRender to be used with new windows/popups that have
transparency on Windows. Otherwise they would fallback to basic layers.

Similarly, the pref gfx.webrender.software.unaccelerated-widget.force
may be used to force software WebRender for all windows that would
fallback to basic layers.

Differential Revision: https://phabricator.services.mozilla.com/D104855
2021-02-18 15:37:47 +00:00
smolnar
f7ba61e1f9 Backed out 2 changesets (bug 1688096) for linux debug build bustage in KnowsCompositor. CLOSED TREE
Backed out changeset 6cdfa0af2278 (bug 1688096)
Backed out changeset 6471b0910f45 (bug 1688096)
2021-02-18 14:34:49 +02:00
Andrew Osmond
399ec6964e Bug 1688096 - Part 2. Add/use flag to CompositorOptions to allow SW-WR on a per widget basis. r=mattwoodrow
The pref gfx.webrender.software.unaccelerated-widget.allow may be used
to allow software WebRender to be used with new windows/popups that have
transparency on Windows. Otherwise they would fallback to basic layers.

Similarly, the pref gfx.webrender.software.unaccelerated-widget.force
may be used to force software WebRender for all windows that would
fallback to basic layers.

Differential Revision: https://phabricator.services.mozilla.com/D104855
2021-02-18 11:50:06 +00:00
Botond Ballo
a45e3dfcab Bug 1691572 - Rename CalculateRootCompositionSize() to CalculateBoundingCompositionSize(). r=tnikkel
Since bug 1650183, the value returned by this function is not
necessarily the composition size of the RCD-RSF, but may be
a smaller size suitable for bounding the composited size of
scroll frames in a given process.

Differential Revision: https://phabricator.services.mozilla.com/D104463
2021-02-08 23:31:53 +00:00
Timothy Nikkel
a339cde1e2 Bug 1690433. Prefer to jank minimal display ports until we can set a proper display port over checkerboarding them. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D103857
2021-02-04 11:17:06 +00:00
Timothy Nikkel
b9bbe8cf35 Bug 1687886. Don't request a repaint and set a display port if it's the first time for an azpc getting metrics always. r=botond
https://searchfox.org/mozilla-central/rev/2c06b16a0c15ae340a0532e319cbf89ef9d21b68/gfx/layers/apz/src/AsyncPanZoomController.cpp#4741

That RequestContentRepaint call gets executed every time isDefault is true, ie whenever the azpc gets metrics for the first time. RequestContentRepaint causes a full display port to be set on the content. That is undesirable because we set zero margin display ports (via SetZeroMarginDisplayPortOnAsyncScrollableAncestors) and we don't want to expand them to full display ports.

This bug is to fix the regression caused by bug 1667475. Two other bugs also regressed this (bug 1662013 and bug 1627012), and we need to fix all of them to fix the problem. Bug 1687926 and bug 1687927 are filed to fix those.

See https://phabricator.services.mozilla.com/D91479#inline-517695 for the rationale for the original change.

Differential Revision: https://phabricator.services.mozilla.com/D102529
2021-02-01 11:15:04 +00:00
Timothy Nikkel
0f6cada9ea Bug 1687872. Actually remove FrameMetrics::mDisplayPortMargins. r=botond
They are unused and were meant to be removed in https://hg.mozilla.org/mozilla-central/rev/600c18995b01 bug 1667475.

Differential Revision: https://phabricator.services.mozilla.com/D102528
2021-01-23 06:29:31 +00:00
Noemi Erli
b1a631ee4d Backed out changeset 0d66f4dd10b6 (bug 1687872) for causing reftest failures CLOSED TREE 2021-01-26 03:31:59 +02:00