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

243 Коммитов

Автор SHA1 Сообщение Дата
Timothy Nikkel 973c15735b 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
Kartikaya Gupta f1939bb3c0 Bug 1713485 - Remove code for completed migration. r=hiro
This is essentially dead-code removal. Since the GetNormalizedAppVersion()
now always returns 86, the value of the `migration` variable in
GetMouseWheelAnimationDurations() is always 100. And thus the function
always returns the unmodified minMS and maxMS values stored in the prefs.
We can therefore remove the function entirely and just use the pref
values directly in the callers.

Differential Revision: https://phabricator.services.mozilla.com/D116322
2021-05-31 21:36:36 +00:00
Botond Ballo c4afe56b89 Bug 1705826 - Apply the overscroll transform to content fixed to the root (non-WebRender). r=tnikkel
This is accomplished by the overscroll transform being part of the visual
component of the root content APZC's async transform.

We were already doing this right in AsyncPanZoomController (as of bug
1699868), but the call sites in AsyncCompositionManager needed to be
updated.

Differential Revision: https://phabricator.services.mozilla.com/D112221
2021-04-21 00:07:46 +00:00
Cosmin Sabou 62670a3baf Backed out changeset 3b729f0fb230 (bug 1705826) for reftest failures on skip-ink-multiline-position.html. 2021-04-19 13:36:30 +03:00
Botond Ballo 713db94540 Bug 1705826 - Apply the overscroll transform to content fixed to the root (non-WebRender). r=tnikkel
This is accomplished by the overscroll transform being part of the visual
component of the root content APZC's async transform.

We were already doing this right in AsyncPanZoomController (as of bug
1699868), but the call sites in AsyncCompositionManager needed to be
updated.

Differential Revision: https://phabricator.services.mozilla.com/D112221
2021-04-16 20:55:03 +00:00
Timothy Nikkel 56bb178351 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
Hiroyuki Ikezoe 9941b7e92f Bug 1696442 - Make ScrollingDownWillMoveDynamicToolbar return a pair of boolean and cont AsyncPanZoomController*. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D107291
2021-03-10 23:36:14 +00:00
Hiroyuki Ikezoe cc24f3fbe2 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 2b2d8e7195 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
Hiroyuki Ikezoe ac2cc6a253 Bug 1678505 - Make InputQueue::ReceiveInputEvent return APZEventResult. r=botond
Thus, we can easily get more information from ReceiveInputEvent calls by adding
the information into APZEventResult such as overscroll-behavior etc. (instead
of adding more arguments to ReceiveInputEvent)

Differential Revision: https://phabricator.services.mozilla.com/D103414
2021-03-02 08:06:26 +00:00
Csoregi Natalia b08394edf3 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 fe23faeb41 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 ddfe302394 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
Hiroyuki Ikezoe f9c427e1cd Bug 1678505 - Make InputQueue::ReceiveInputEvent return APZEventResult. r=botond
Thus, we can easily get more information from ReceiveInputEvent calls by adding
the information into APZEventResult such as overscroll-behavior etc. (instead
of adding more arguments to ReceiveInputEvent)

Differential Revision: https://phabricator.services.mozilla.com/D103414
2021-02-26 04:15:17 +00:00
Mats Palmgren b41a2b9d21 Bug 1687239 part 2 - Remove plugin support from layout/. r=emilio
Note that there's still a little plugin related code in
widget/ and gfx/ etc after this.  That can be removed
once we remove plugin support from dom/ etc.
The removal from layout/ should be pretty complete though.

Differential Revision: https://phabricator.services.mozilla.com/D102140
2021-01-25 11:53:49 +00:00
Andi-Bogdan Postelnicu 7b246e293f Bug 1683551 - Make `gfx` buildable outside of `unified-build` environment. r=sg,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D100209
2021-01-04 14:20:17 +00:00
Botond Ballo 6c367f7388 Bug 1487181 - Fix some include-what-you-use issues. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D99565
2020-12-13 21:02:25 +00:00
Markus Stange 84b150a119 Bug 1677929 - Stop passing aEpochsBeingRendered to WebRender's APZ sampling callback, because it's now unused. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D99144
2020-12-09 03:38:31 +00:00
Markus Stange 7b0ccf01a3 Bug 1677929 - Add a way to specify an ID for a generated frame, and propagate the ID to the APZSampler. r=gw,kats
This ID allows the compositor to track per-frame information from frame
generation, through APZ sampling, to the NotifyDidRender notification.

Differential Revision: https://phabricator.services.mozilla.com/D97535
2020-12-09 03:35:50 +00:00
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Hiroyuki Ikezoe 7087f97a39 Bug 1674694 - Change APZEventResult::mHandledByRootApzc to Maybe<APZHandledResult>. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D96331
2020-11-11 00:33:20 +00:00
Hiroyuki Ikezoe 9a544e618f Bug 1663000 - Return UNHANDLED even if there's no event handler which uses preventDefault() and the root content is not covered by the dynamic toolbar. r=botond,geckoview-reviewers,snorp
This change has a couple of tests but they are for scrollable/non-scrollable
contents, they are not for non-scrollable contents but covered by the dynamic
toolbar cases, e.g. 100vh body element.  Those cases will be introduced in the
subsequent change.

Differential Revision: https://phabricator.services.mozilla.com/D93915
2020-11-04 03:16:07 +00:00
Joey Salazar 86a4685f78 Bug 1662985 - Move the ExternalPixel types r=kats
Moving the ExternalPixel types from APZPublicUtils.h to Units.h to
reduce the transitive include graph from that dependency.

Signed-off-by: Joey Salazar <grey.lila@yahoo.com>

Differential Revision: https://phabricator.services.mozilla.com/D94932
2020-10-28 21:55:49 +00:00
Kartikaya Gupta 02a191588c Bug 1671048 - Reduce places that include RepaintRequest.h. r=botond
Depends on D93437

Differential Revision: https://phabricator.services.mozilla.com/D93547
2020-10-14 19:23:45 +00:00
Sylvestre Ledru ec8859e69e Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D90793
2020-09-20 10:14:09 +00:00
Kartikaya Gupta fb97ec2e40 Bug 1654836 - Redo how we expand displayport alignment for webrender. r=nical
The displayport is aligned to screen pixels by an alignment number; there was
code to increase that alignment number for the WebRender codepath. This is
desirable because it causes the displayport to move less frequently, which
provides better performance characteristics with WebRender. However, the
way that was implemented, it was possible for the aligned displayport to not
completely enclose the unaligned displayport, which could then result in
perma-checkerboarding.

This patch removes that code and replaces it with a simpler approach to scale
up the existing alignment number by a factor based on the size of the scroller's
base rect (roughly how much of the scroller is visible to the user).

This does make the displayports larger, more so for scrollers with more visible
area. This has negative performance implications, so we mitigate that by also
scaling down the displayport margin multiplier by the same scaling factor. This
isn't perfect, but seems to work well enough in practice.

Differential Revision: https://phabricator.services.mozilla.com/D90503
2020-09-18 12:40:08 +00:00
Kartikaya Gupta 6ea98dfe88 Bug 1658169 - Move the origin-based physics computation to APZPublicUtils. r=tnikkel
This is just moving code to make it reusable in APZ. As part of this, I replace
use of Preferences::* with the StaticPrefs::* API, because we can't use
Preferences:: in the GPU process and we'll want to be able to invoke this code
from there.

Differential Revision: https://phabricator.services.mozilla.com/D89665
2020-09-12 14:08:10 +00:00
Kartikaya Gupta d046d2b406 Bug 1660933 - Respect wheel migration value. r=botond
This introduces a linear interpolation when computing the wheel animation
durations, based on the migration percentage of the user. Initially the
migration percentage defaults to 100 (fully migrated) for new users and for
existing users who have customized these prefs. The migration percentage
defaults to zero for existing users without customizations, so they will
still get the old default values of min=200,max=400. Over time we can adjust
the migration pref clamping to move that percentage up and migrate those
users to get the new values.

Differential Revision: https://phabricator.services.mozilla.com/D88163
2020-08-26 20:31:20 +00:00
Botond Ballo f92b30262c Bug 1635256 - Avoid unnecessary array copies in NotifyLayerTransforms and SetConfirmedTargetAPZC. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D88083
2020-08-25 02:17:06 +00:00
Botond Ballo e008dd3885 Bug 1633322 - Add an input block callback facility to allow senders of input events to receive a delayed notification of whether the event was processed by the root APZC. r=kats
This facility is only implemented for in-process senders of
input events (i.e. not for GPU process setups).

Differential Revision: https://phabricator.services.mozilla.com/D79931
2020-08-20 20:40:51 +00:00
Botond Ballo 6651ba71a3 Bug 1633322 - Turn APZEventResult::mHandledByRootApzc into a Maybe. r=kats,geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D79930
2020-08-20 00:10:09 +00:00
Botond Ballo 66380a8ca4 Bug 1633322 - Combine APZEventResult::mTargetIsRoot and mHitRegionWithApzAwareListeners into a single flag. r=kats,geckoview-reviewers,snorp
GeckoView uses these flags for the same purpose: to determine
whether or not to allow certain effects, such as pull to refresh
or dynamic toolbar movement, that should be limited to cases
where an event manipulates the root scrollable.

In a subsequent patch, we will enhance the API between APZ and
GeckoView such that in cases where we don't know for sure whether
an event will manipulate the root scrollable until it is
dispatched to content, we tell GV the answer asynchronously.
This is easier if there is only one flag to report.

Differential Revision: https://phabricator.services.mozilla.com/D79929
2020-08-20 00:10:12 +00:00
Botond Ballo 14424bce96 Bug 1659636 - Use the effective scroll offset and zoom in NotifyUpdateScreenMetrics. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D87666
2020-08-20 01:16:14 +00:00
Bogdan Tara 6d322bffe4 Backed out 5 changesets (bug 1633322, bug 1634504) for touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset 3f866663b0aa (bug 1634504)
Backed out changeset 953d128f4c51 (bug 1633322)
Backed out changeset 84454fa520be (bug 1633322)
Backed out changeset 1aa6be497177 (bug 1633322)
Backed out changeset 9be548b05e86 (bug 1633322)
2020-08-20 03:01:02 +03:00
Botond Ballo 176a6fb1f9 Bug 1633322 - Add an input block callback facility to allow senders of input events to receive a delayed notification of whether the event was processed by the root APZC. r=kats
This facility is only implemented for in-process senders of
input events (i.e. not for GPU process setups).

Differential Revision: https://phabricator.services.mozilla.com/D79931
2020-08-19 21:31:47 +00:00
Botond Ballo 6a80e2975c Bug 1633322 - Turn APZEventResult::mHandledByRootApzc into a Maybe. r=kats,geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D79930
2020-08-18 21:14:32 +00:00
Botond Ballo 619b447463 Bug 1633322 - Combine APZEventResult::mTargetIsRoot and mHitRegionWithApzAwareListeners into a single flag. r=kats,geckoview-reviewers,snorp
GeckoView uses these flags for the same purpose: to determine
whether or not to allow certain effects, such as pull to refresh
or dynamic toolbar movement, that should be limited to cases
where an event manipulates the root scrollable.

In a subsequent patch, we will enhance the API between APZ and
GeckoView such that in cases where we don't know for sure whether
an event will manipulate the root scrollable until it is
dispatched to content, we tell GV the answer asynchronously.
This is easier if there is only one flag to report.

Differential Revision: https://phabricator.services.mozilla.com/D79929
2020-08-18 21:14:35 +00:00
Botond Ballo 4471aa5c0f Bug 1659642 - Move AsyncTransform from AsyncCompositionManager.h to APZUtils.h. r=kats
AsyncCompositionManager is a Layers-only component, and a bunch of
APZ code common to Layers and WR was including it for this one
utility.

Differential Revision: https://phabricator.services.mozilla.com/D87405
2020-08-19 00:51:50 +00:00
Botond Ballo eff3b083d0 Bug 1659642 - Split out a new file APZPublicUtils.h from APZUtils.h. r=kats
By moving the few things that need to be exposed to other components
to APZPublicUtils.h, APZUtils.h becomes much less widely included
(and thus changing it triggers a quicker recompile) while retaining
most of its utilities.

Differential Revision: https://phabricator.services.mozilla.com/D87404
2020-08-19 00:51:46 +00:00
Csoregi Natalia 15818e2195 Backed out 4 changesets (bug 1633322) for android failures e.g. test_group_checkerboarding.html. CLOSED TREE
Backed out changeset ffa257a29649 (bug 1633322)
Backed out changeset 8271d4e51f25 (bug 1633322)
Backed out changeset 21c0baa65724 (bug 1633322)
Backed out changeset 193fa2a0b926 (bug 1633322)
2020-08-18 23:45:49 +03:00
Botond Ballo 260f84556d Bug 1633322 - Add an input block callback facility to allow senders of input events to receive a delayed notification of whether the event was processed by the root APZC. r=kats
This facility is only implemented for in-process senders of
input events (i.e. not for GPU process setups).

Differential Revision: https://phabricator.services.mozilla.com/D79931
2020-08-18 18:39:17 +00:00
Botond Ballo 3c9ac87c17 Bug 1633322 - Turn APZEventResult::mHandledByRootApzc into a Maybe. r=kats,geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D79930
2020-08-14 16:43:32 +00:00
Botond Ballo 0182e8b4de Bug 1633322 - Combine APZEventResult::mTargetIsRoot and mHitRegionWithApzAwareListeners into a single flag. r=kats,geckoview-reviewers,snorp
GeckoView uses these flags for the same purpose: to determine
whether or not to allow certain effects, such as pull to refresh
or dynamic toolbar movement, that should be limited to cases
where an event manipulates the root scrollable.

In a subsequent patch, we will enhance the API between APZ and
GeckoView such that in cases where we don't know for sure whether
an event will manipulate the root scrollable until it is
dispatched to content, we tell GV the answer asynchronously.
This is easier if there is only one flag to report.

Differential Revision: https://phabricator.services.mozilla.com/D79929
2020-08-14 16:43:32 +00:00
Kartikaya Gupta ec6babfeb0 Bug 1653796 - Introduce a SampleTime class. r=botond
This makes the sample time more "strongly typed" by using a variant-style
class instead of a raw TimeStamp. The sample time can come from different
sources (vsync, testing, Now()) and it is useful to save that information
as we pass around the sample time. It would have been helpful with some
of the debugging I did recently, and it also is needed for the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D86244
2020-08-10 20:14:05 +00:00
Hiroyuki Ikezoe ba018e2355 Bug 1638152 - Jank partial prerender transform animations and report the janked animations to the main-thread in each process on WebRender. r=botond,kats
Differential Revision: https://phabricator.services.mozilla.com/D83202
2020-07-21 10:03:34 +00:00
Kartikaya Gupta 2c7f65ff19 Bug 1646891 - Ensure the pinch gesture inputs dispatched to gecko have a refpoint set. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D83376
2020-07-15 22:41:10 +00:00
Hiroyuki Ikezoe 80fc56a28e Bug 1324591 - Add APZSampler::GetCompositionBounds to get the composition bounds for a given pair of LayersId and scrollId. r=botond
Depends on D75730

Differential Revision: https://phabricator.services.mozilla.com/D81481
2020-07-05 11:43:45 +00:00
Brindusan Cristian 7f75410fd7 Backed out 9 changesets (bug 1324591) for linux build bustages on central on nsDisplayList.h.
Backed out changeset 75966ee1fe65 (bug 1324591)
Backed out changeset d6a01c6bc40e (bug 1324591)
Backed out changeset fef36ff2ea3d (bug 1324591)
Backed out changeset 4a4ae4bd95d1 (bug 1324591)
Backed out changeset 732804c83add (bug 1324591)
Backed out changeset 84657a3522fb (bug 1324591)
Backed out changeset e6c74ba41007 (bug 1324591)
Backed out changeset 8e6d4e9f5aa0 (bug 1324591)
Backed out changeset 6bc284863aff (bug 1324591)
2020-07-05 13:45:35 +03:00
Hiroyuki Ikezoe efee5d73c6 Bug 1324591 - Add APZSampler::GetCompositionBounds to get the composition bounds for a given pair of LayersId and scrollId. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D81481
2020-07-05 02:19:45 +00:00