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

2653 Коммитов

Автор SHA1 Сообщение Дата
Botond Ballo 98c8fdcd38 Bug 1634206 - Change the default value of InputAPZContext::sApzResponse to nsEventStatus_eSentinel. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D70084
2020-05-05 17:22:01 +00:00
Simon Giesecke f87a1f858f Bug 1626570 - Improve handling of copying arrays in gfx/layers/. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D73633
2020-05-05 12:59:26 +00:00
Timothy Nikkel 005270cdd1 Bug 1619187. Handle content prevent defaulting pinch gestures. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D73217
2020-05-02 23:03:20 +00:00
Cosmin Sabou b9a814e53b Backed out changeset 70d9a096070b (bug 1619187) for causing Gtest failures. CLOSED TREE 2020-05-02 03:29:43 +03:00
Timothy Nikkel f9e267a4a7 Bug 1619187. Handle content prevent defaulting pinch gestures. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D73217
2020-05-01 23:21:08 +00:00
Kartikaya Gupta 4e454e564a Bug 1633103 - Use SetState to ensure we dispatch appropriate state change notifications. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D72945
2020-04-30 00:56:01 +00:00
Kartikaya Gupta 57f8684aec Bug 1625249 - Do a better job of setting hit-test info on blobs. r=jrmuizel
In particular this will pick up any hit-test flags set on individual items
inside a blob, and ensure the hit-test info emitted to APZ for the blob includes
those flags.

Differential Revision: https://phabricator.services.mozilla.com/D69205
2020-04-28 21:46:26 +00:00
Brindusan Cristian 7cee26a500 Backed out 3 changesets (bug 1625249) for bc failures at browser_test_hittest_svg_over_iframe.js. CLOSED TREE
Backed out changeset 5d9701c4fb3b (bug 1625249)
Backed out changeset 8c02d6099aa3 (bug 1625249)
Backed out changeset 7b3b764a0e4d (bug 1625249)
2020-04-29 00:41:31 +03:00
Yura Zenevich 1e609ab653 Bug 1625249 - test hittest with SVG in parent over OOP iframe. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D69664
2020-04-15 19:43:05 +00:00
Kartikaya Gupta 234654725c Bug 1625249 - Do a better job of setting hit-test info on blobs. r=jrmuizel
In particular this will pick up any hit-test flags set on individual items
inside a blob, and ensure the hit-test info emitted to APZ for the blob includes
those flags.

Differential Revision: https://phabricator.services.mozilla.com/D69205
2020-04-28 18:43:13 +00:00
Csoregi Natalia b073baab86 Backed out 30 changesets (bug 1556556, bug 1631568) for multiple mochitest failures. CLOSED TREE
Backed out changeset edd529f7a9c5 (bug 1631568)
Backed out changeset 1cc0881e244b (bug 1631568)
Backed out changeset ed3c1e85d5e3 (bug 1556556)
Backed out changeset 38ffc6215bbf (bug 1556556)
Backed out changeset 03c2c25d8023 (bug 1556556)
Backed out changeset 9c717eb067b8 (bug 1556556)
Backed out changeset 98e26bc98b85 (bug 1556556)
Backed out changeset 05a6a581e755 (bug 1556556)
Backed out changeset 867946cf05bb (bug 1556556)
Backed out changeset 20d72a334530 (bug 1556556)
Backed out changeset 2c62e61d9054 (bug 1556556)
Backed out changeset 62a223d057d2 (bug 1556556)
Backed out changeset 2c5d55a1f0b1 (bug 1556556)
Backed out changeset 700447945b4e (bug 1556556)
Backed out changeset 93190ae4f5ff (bug 1556556)
Backed out changeset a7bd34d961bb (bug 1556556)
Backed out changeset fccd1d3c7189 (bug 1556556)
Backed out changeset 24056e47183d (bug 1556556)
Backed out changeset 204881474cc1 (bug 1556556)
Backed out changeset 387320881876 (bug 1556556)
Backed out changeset be8f5eb58460 (bug 1556556)
Backed out changeset 629c58a9166b (bug 1556556)
Backed out changeset 4312b2b5dda8 (bug 1556556)
Backed out changeset d11dbf6403a5 (bug 1556556)
Backed out changeset 95c54c023779 (bug 1556556)
Backed out changeset 80fcb7e71188 (bug 1556556)
Backed out changeset d75a4ecb0d47 (bug 1556556)
Backed out changeset 903c4de34e7a (bug 1556556)
Backed out changeset f15334a3e803 (bug 1556556)
Backed out changeset 9553e99137ea (bug 1556556)
2020-04-28 12:43:11 +03:00
Botond Ballo 2cb46cfa4b Bug 1631568 - Have nsLayoutUtils::GetFrameForPoint() and GetFramesForArea() take a RelativeTo parameter. r=tnikkel
This removes the need for FrameForPointOptions::IsRelativeToLayoutViewport,
and makes sure each call site of these functions indicates whether the
input point/rect is in visual or layout coordinates.

Several call sites were passing in layout coordinates without setting the
IsRelativeToLayoutViewport flag, which this patch corrects.

Differential Revision: https://phabricator.services.mozilla.com/D71705
2020-04-28 01:44:43 +00:00
Botond Ballo 42e78685e5 Bug 1556556 - Run helper_drag_root_scrollbar.html with zooming enabled as well. r=kats
This is the anti-climactic end of the patch series.

I set out in this bug to get this test case to pass with apz.allow_zooming.
It took all these changes to do so without regressing other tests.

Differential Revision: https://phabricator.services.mozilla.com/D69644
2020-04-28 07:22:59 +00:00
Botond Ballo 405c8807cd Bug 1556556 - Propagate RelativeTo far and wide. r=kats,mattwoodrow
This "upgrades" various nsLayoutUtils functions which take as inputs
a set of coordinates and a frame that the coordinates are relative to,
to accept a RelativeTo object instead of a frame.

Most of the patch is just dumb propagation, but the few places where
we use an explicit ViewportType::Visual are important. There are
probably a few other places I've overlooked, but this seems to cover
the important ones that come up commonly.

There are undoubtedly other functions into which we can propagate
RelativeTo, in this patch I've propagated it as far as necessary
for my needs in this bug (mainly GetTransformToAncestor() and
GetEventCoordinatesRelativeTo()).

Differential Revision: https://phabricator.services.mozilla.com/D68919
2020-04-28 01:40:35 +00:00
Botond Ballo b11a399d42 Bug 1556556 - Remove many uses of IgnoreRootScrollFrame. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D68913
2020-04-28 02:25:51 +00:00
Botond Ballo 20522092c5 Bug 1556556 - Move GetCallbackTransform() into a new ViewportUtils class. r=kats
This function (and helper functions that wrap it) will be used extensively
throughout layout code, so keeping it in APZCCallbackHelper seems awkward.

nsLayoutUtils would also be a reasonable place but has the downside that
adding a new function to it triggers recompiling the world.

Differential Revision: https://phabricator.services.mozilla.com/D68296
2020-04-28 01:35:05 +00:00
Botond Ballo 92101bb12f Bug 1556556 - Have GetCallbackTransform take just a scroll id rather than an entire guid. r=kats
The implementation was already only using the scroll id, so there is no
functional change, but this change will make it easier to new call sites
to come up with the function's inputs.

Differential Revision: https://phabricator.services.mozilla.com/D68277
2020-04-28 01:34:48 +00:00
Botond Ballo 09e7b83dc2 Bug 1556556 - Remove APZCCallbackHelper::ApplyCallbackTransform(). r=kats
It has no more callers.

Differential Revision: https://phabricator.services.mozilla.com/D68276
2020-04-28 01:34:35 +00:00
Botond Ballo f9e919a8f4 Bug 1556556 - Remove applications of the visual-to-layout transform at the process boundary (and equivalent places for non-e10s). r=kats
Note that the propagation of the target guid to places where the transform
will be applied is best-effort at the moment. In particular, the
InputAPZContext will result in the correct guid being available in places
that are called synchronously from the Recv*() functions, but not places
called asynhcronously (e.g. via DelayedFireSingleTapEvent).

To mitigate this, places where the transform is applied fall back on the
RCD-RSF if a guid is not available via InputAPZContext (added in a
subsequent patch).

The cases that this gets wrong are fairly edge casey (it requires (a) an
asynchronous codepath, (b) an event targeting a subframe, and (c) that
subframe having a "could not accept the APZ scroll position" transform),
so we just punt on them for now. If it turns out to be important to handle,
then options for doing so include (1) propagating the guid through each of
the affected asynchronous codepaths, or (2) attaching the guid to the event
itself.

Differential Revision: https://phabricator.services.mozilla.com/D68723
2020-04-28 01:34:22 +00:00
Botond Ballo ac1f44da5d Bug 1556556 - Change the default value of InputAPZContext::sApzResponse to nsEventStatus_eSentinel. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D70084
2020-04-28 01:34:05 +00:00
Botond Ballo 2290774510 Bug 1556556 - Factor out an APZCCallbackHelper::GetCallbackTransform() helper. r=kats
This is to facilitate call sites that need to incorporate the transform into
a larger transform matrix rather than immediately applying the callback
transform to a point.

Differential Revision: https://phabricator.services.mozilla.com/D68275
2020-04-28 01:33:57 +00:00
Botond Ballo 2037608c4a Bug 1556556 - Clarify the documentation of APZCCallbackHelper::ApplyCallbackTransform(). r=kats
Differential Revision: https://phabricator.services.mozilla.com/D68274
2020-04-28 01:33:40 +00:00
Botond Ballo 5e9a66a3de Bug 1556556 - Remove some cruft related to handling the resolution in non-e10s setups. r=tnikkel
Prior to this bug, it was necessary to handle non-e10s specially, because the
resolution was being unapplied at the process boundary, and in non-e10s there
was no process boundary.

The remaining patches in this bug move the resolution unapplication away from
the process boundary in all cases, making special handling for non-e10s
unnecessary.

Differential Revision: https://phabricator.services.mozilla.com/D68273
2020-04-28 02:03:18 +00:00
Kartikaya Gupta bd8d6597c2 Bug 1630781 - Reorder operations to increase idempotency of sampling APZ state during a vsync interval. r=botond
Refer to bug 1630781 comment 11 for a more detailed explanation of the problem.
A quick summary is that prior to this patch, the sampling operation involved
these steps:
- sample stored APZ state for composition
- advance animations to next vsync
- update stored APZ state to the one just computed
When sampling occured twice within a vsync interval, the stored APZ state
calculated at the end of the first sampling would be produced in the second
sampling, resulting in non-smooth scrolling. Note that the second and third
steps would only run once per vsync interval, but that was sufficient to cause
the problem.

With this patch, the order of the steps is reordered:
- update stored APZ state to that computed in the last vsync interval
- advance animations to next vsync and save it in the queue
- sample stored APZ state for composition
With this ordering (and with the first two steps only running once per vsync
interval), the third step now emits consistent data even if the steps are run
multiple times in a vsync interval. It does mean that the mSampledState deque
can have up to two items in it (front() being the state for the current vsync
interval, and back() being the state computed for the next vsync interval).

Although this problem only affected the WR codepath in practice, it could in
theory occur with the non-WR codepath too, if we for some reason ran the
TransformShadowTree code multiple times in a vsync interval. This patch updates
both codepaths with the new order of steps.

Differential Revision: https://phabricator.services.mozilla.com/D72046
2020-04-26 17:06:37 +00:00
Kartikaya Gupta 7a46942dee Bug 1630781 - Adjust test to account for extra composite required for WR hit-test. r=botond
We have had to apply this same fix in other tests in the past, for example in
helper_hittest_basic.html.

Differential Revision: https://phabricator.services.mozilla.com/D72045
2020-04-26 17:05:21 +00:00
Kartikaya Gupta ead6b2732c Bug 1630781 - Allow mSampledState to temporarily hold more than one state. r=botond
Again, functionally this is a no-op since instead of replacing the back()
element, we do an emplace_back() followed by a pop_front().

Differential Revision: https://phabricator.services.mozilla.com/D72044
2020-04-27 01:02:34 +00:00
Kartikaya Gupta 6041ceee66 Bug 1630781 - Expand mSampledState into a deque. r=botond
The deque always has size 1, so this patch is functionally a no-op. It sets up
the usage of front() and back() to allow holding more than one item in a future
patch.

Depends on D72042

Differential Revision: https://phabricator.services.mozilla.com/D72043
2020-04-25 22:04:59 +00:00
Kartikaya Gupta dba00154a9 Bug 1630781 - Encapsulate the mComposited* variables into a class. r=botond
No functional changes intended here, just code getting moved into a helper
class. Note that this patch folds RecalculateCompositedLayoutViewport into
ClampCompositedScrollOffset since there are no longer any independent callers
of the former function (as of bug 1627716).

Depends on D72041

Differential Revision: https://phabricator.services.mozilla.com/D72042
2020-04-25 01:00:07 +00:00
Kartikaya Gupta 5475382650 Bug 1630781 - Ensure the mComposited* fields are accessed safely across threads. r=botond
No functional change, since everything was safe already. But this propagates
the proof-of-lock a little further to make it more obvious that fields are
safely accessed.

Depends on D72040

Differential Revision: https://phabricator.services.mozilla.com/D72041
2020-04-25 00:49:23 +00:00
Kartikaya Gupta 5adfc0b92b Bug 1630781 - Eliminate the frame_delay pref, assume it true everywhere. r=botond,mstange
Having to think about multiple codepaths adds complexity and it doesn't seem
like we're going to turn this pref back off anytime soon.

Differential Revision: https://phabricator.services.mozilla.com/D72040
2020-04-25 00:47:54 +00:00
Sylvestre Ledru 34acbb653a Bug 1619165 - Reformat recent changes to the Google coding style r=andi
First reformat with clang-format 10

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D68802
2020-04-25 09:40:08 +00:00
Simon Giesecke c0341c3791 Bug 1628715 - Part 10: Activate nodiscard attributes on AppendElement(s). r=xpcom-reviewers,nika,peterv
Differential Revision: https://phabricator.services.mozilla.com/D70834
2020-04-24 14:34:15 +00:00
Kartikaya Gupta 2f35aa94fe Bug 1627716 - Remove APZ/composition code related to DynamicToolbarAnimator. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D71778
2020-04-22 17:30:50 +00:00
Botond Ballo 74925f0fa3 Bug 1632042 - Fix inclusion of APZUtils.h in APZInputBridge.h. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D71880
2020-04-22 08:16:15 +00:00
Coroiu Cristina 43be71277d Backed out 2 changesets (bug 1625500) for multiple failures on a CLOSED TREE
Backed out changeset 7d80233bcfcd (bug 1625500)
Backed out changeset 0a35b13dfcde (bug 1625500)
2020-04-17 15:36:05 +03:00
Gijs Kruitbosch cc39a339a0 Bug 1625500 - fix use of .then(x, x) in the tree, r=marionette-reviewers,Standard8,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D68614
2020-04-17 11:41:49 +00:00
Kartikaya Gupta 96ccdc9b83 Bug 1627362 - Fix WR codepath. r=botond
This patch just ensures the changes in the previous patches get applied
to the WR codepath, and is sufficient to make all the remaining sticky
tests pass on Android+WR.

Differential Revision: https://phabricator.services.mozilla.com/D70911

--HG--
extra : moz-landing-system : lando
2020-04-15 21:05:26 +00:00
Kartikaya Gupta bbdeafdcdb Bug 1627362 - Properly support items stuck to both bottom and top. r=botond
The semantics of sticky items are somewhat different from the semantics of
fixed items. For fixed items, if an item is fixed to eTop or eBottom or
eTopBottom, it is *always* fixed to those sides. For sticky items, however,
the sides actively stuck to are dependent on the scroll position. So we need
a mechanism to dynamically figure out which sides are stuck, and use those
sides when computing the fixed margins to apply. This patch implements that
by modifying the IsStuckToRootContentAtBottom method into a
SidesStuckToRootContent method.

Differential Revision: https://phabricator.services.mozilla.com/D70910

--HG--
extra : moz-landing-system : lando
2020-04-15 21:05:12 +00:00
Kartikaya Gupta 952f78e233 Bug 1627362 - Rewrite IsStuckAtBottom to be simpler and clearer. r=botond
I couldn't understand what it was doing before, but conceptually it should
be pretty simple.

Differential Revision: https://phabricator.services.mozilla.com/D70909

--HG--
extra : moz-landing-system : lando
2020-04-15 21:04:56 +00:00
Kartikaya Gupta 62383abdc6 Bug 1627362 - Allow calling fixed/sticky helpers with (Fixed|Sticky)PositionInfo. r=botond
This sets us up to be able to use these helper methods on WR sampling codepath.

Depends on D70907

Differential Revision: https://phabricator.services.mozilla.com/D70908

--HG--
extra : moz-landing-system : lando
2020-04-15 19:15:44 +00:00
Kartikaya Gupta 41034c6ca7 Bug 1627362 - Have (Fixed|Sticky)PositionInfo take a HTTN in the constructor. r=botond
This will make future patches simpler, as we can now create these info objects
more easily for the non-WR codepath as well.

Depends on D70906

Differential Revision: https://phabricator.services.mozilla.com/D70907

--HG--
extra : moz-landing-system : lando
2020-04-15 19:14:12 +00:00
Kartikaya Gupta 483cd1925d Bug 1627362 - Remove the tree lock requirement for a couple of functions. r=botond
We can use the map lock to do a lookup in mApzcMap, instead of requiring the
tree lock to call GetTargetAPZC.

Differential Revision: https://phabricator.services.mozilla.com/D70906

--HG--
extra : moz-landing-system : lando
2020-04-15 19:11:31 +00:00
Kartikaya Gupta 6be377b59b Bug 1566599 - Add a test for the ForceEmptyHitRegion flag. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D70397

--HG--
extra : moz-landing-system : lando
2020-04-14 00:16:41 +00:00
Kartikaya Gupta 8699a4459c Bug 1566599 - Ensure we still check the flags on the node for the NULL_SCROLL_ID case. r=botond
For the case where we got a hit-result with a NULL_SCROLL_ID, we wouldn't
get a node, and would fall back to the root APZC for the layers id. But we
should actually still find the HTTN so that we can check the override flags.

Differential Revision: https://phabricator.services.mozilla.com/D70396

--HG--
extra : moz-landing-system : lando
2020-04-14 00:44:38 +00:00
Kartikaya Gupta 7aa5fb4be6 Bug 1566599 - Ensure EventRegionOverride flags don't end up on the HTTNs for reflayers. r=botond
We need to propagate the flags from the reflayer into the descendant subtree,
but remove the flag from the HTTN corresponding to the reflayer itself. See
comments in the patch for why.

Differential Revision: https://phabricator.services.mozilla.com/D70395

--HG--
extra : moz-landing-system : lando
2020-04-14 00:11:09 +00:00
Kartikaya Gupta dddcd82d24 Bug 1566599 - Add support for ForceEmptyHitRegion on the WR hit-test. r=botond
This is a "naive" implementation that will be refined in the next couple of
patches.

Differential Revision: https://phabricator.services.mozilla.com/D69203

--HG--
extra : moz-landing-system : lando
2020-04-14 00:43:35 +00:00
Kartikaya Gupta 442f54f533 Bug 1566599 - Have the WR hit-test return all results to the caller. r=botond
No functional changes here, just plumbing to allow the caller to
access all the results instead of just the one picked out by
bindings.rs.

Differential Revision: https://phabricator.services.mozilla.com/D69202

--HG--
extra : moz-landing-system : lando
2020-04-14 00:43:18 +00:00
James Willcox 3ed4ef71c1 Bug 1627737 - Add `mTargetIsRoot` to `APZEventResult` r=botond
This allows us to determine if the event was handled in the
toplevel frame or not.

Differential Revision: https://phabricator.services.mozilla.com/D69871

--HG--
extra : moz-landing-system : lando
2020-04-08 16:13:50 +00:00
Andreas Farre 25ca8d7890 Bug 1620594 - Part 7: Remove TabGroup and SystemGroup. r=nika,bas
TabGroup never really made any difference in which thread something go
dispatched to. This was the intended use, but development of TabGroups
with abstract main threads never made it that far. The good thing is
that thish makes it safe to also remove to the SystemGroup and instead
switch all SystemGroup dispatches to dispatches to main thread.

Timers for setTimeout and workers were the sole users of wrapped and
throttled event targets, that those throttled queues have been moved
to the BrowsingContextGroup and are now accessed explicitly.

The SchedulerEventTarget has been removed, since there are no longer a
separate event target for every TaskCategory. Instead a
LabellingEventTarget has been added to DocGroup to handle the case
where an event is dispatched do DocGroup or when an AbstractThread is
created using a DocGroup. This means that we'll actually label more
events correctly with the DocGroup that they belong to.

DocGroups have also been moved to BrowsingContextGroup.

Depends on D67636

Differential Revision: https://phabricator.services.mozilla.com/D65936

--HG--
extra : moz-landing-system : lando
2020-04-07 15:17:47 +00:00
Kartikaya Gupta 721e617cf9 Bug 1589046 - Terminate momentum panning once we reach a point where there is uncomsumed scroll. r=botond
This prevents OS-produced momentum panning events from having an effect after
the user sees the momentum panning "end" due to scrolling as far as possible.

Differential Revision: https://phabricator.services.mozilla.com/D69624

--HG--
extra : moz-landing-system : lando
2020-04-06 17:18:20 +00:00