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

295 Коммитов

Автор SHA1 Сообщение Дата
Botond Ballo f9a2c18bfe 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
Hiroyuki Ikezoe 9de4521753 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
Hiroyuki Ikezoe 562a98e9cc 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 038eb21cc2 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 0250d89cfa 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
Timothy Nikkel 20dbba5c10 Bug 1733363. Make FrameMetrics::mCumulativeResolution a 1d scale. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D127115
2021-10-09 12:49:40 +00:00
Timothy Nikkel 708b53f06a Bug 1732600. Pass down transform to ancestor scale to child processes. r=botond
In bug 1731929 we added this value, here we give it the value we want for child processes. I think the code comments should explain it.

Differential Revision: https://phabricator.services.mozilla.com/D126629
2021-10-05 09:28:57 +00:00
Timothy Nikkel 0a3e33230f Bug 1732600. Update a comment on FrameMetrics::mCumulativeResolution. r=botond
This is the conclusion we came to after some discussion.

Differential Revision: https://phabricator.services.mozilla.com/D126628
2021-10-05 09:28:56 +00:00
Timothy Nikkel c124ec64c9 Bug 1732423. Change units of FrameMetrics::mTransformToAncestorScale from unknown to ParentLayerToScreenScale2D. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D126577
2021-09-30 05:55:36 +00:00
Timothy Nikkel 44c1ebd71b 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 25781a327c Bug 1731929. Use mTransformToAncestorScale instead of mExtraResolution in DisplayportPixelsPerCSSPixel. r=botond
Some explanation in https://phabricator.services.mozilla.com/D126304

This should have no functional change since mExtraResolution = 1 / mTransformToAncestorScale.

Differential Revision: https://phabricator.services.mozilla.com/D126306
2021-09-23 10:29:45 +00:00
Timothy Nikkel 0b5eae3cc1 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 e0efc502a5 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 e913e150ed Bug 1729606. Remove unused ScrollMetadata::mScrollClip. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D125473
2021-09-14 00:05:48 +00:00
Botond Ballo 243b00a2fc Bug 1719913 - Fix the comment describing what FrameMetrics::mCompositionBounds is relative to. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D120564
2021-07-28 03:20:16 +00:00
Timothy Nikkel 21b227355e 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
Timothy Nikkel 6ec47c43ec Bug 1706865. Factor out a couple of FrameMetrics calculations so they can be used on variables outside the metrics. r=botond
We use this in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D113071
2021-04-28 03:08:08 +00:00
Botond Ballo 70d48281d5 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 97edf7f91e 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 d229ecb8e4 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
Simon Giesecke ad01a10a3b Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
Botond Ballo 3fe9749ca2 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 d2930b87f0 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 ddeb475085 Bug 1687927. Don't request a repaint for a scroll update of type NewScrollFrame that doesn't change the scroll offset. r=botond
https://searchfox.org/mozilla-central/rev/2c06b16a0c15ae340a0532e319cbf89ef9d21b68/gfx/layers/apz/src/AsyncPanZoomController.cpp#4866

scrollOffsetUpdated gets set to true if we get basically any scroll update, including a NewScrollFrame update that we create for every new scroll frame that just informs apzc the scroll offset is (0,0).

scrollOffsetUpdated being true means RequestContentRepaint gets called a little later. 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 1662013. Two other bugs also regressed this (bug 1627012 and bug 1667475), and we need to fix all of them to fix the problem. Bug 1687886 is filed for the regression from bug 1667475. Bug 1687926 is filed for the regression from bug 1627012.

Before https://hg.mozilla.org/integration/autoland/rev/b78646d59e32 we only set scrollOffsetUpdated to true if GetScrollOffsetUpdated() was set to true on the metrics, and it didn't get set to true for new scroll frames.

Differential Revision: https://phabricator.services.mozilla.com/D102587
2021-02-02 04:24:08 +00:00
Timothy Nikkel 26aa295c1e Bug 1687926. Don't request a repaint and set a display port if it's the first time for an azpc getting metrics always via the visualScrollOffsetUpdated path. r=botond
https://searchfox.org/mozilla-central/rev/2c06b16a0c15ae340a0532e319cbf89ef9d21b68/gfx/layers/apz/src/AsyncPanZoomController.cpp#5034

That RequestContentRepaint call gets executed every time isDefault is true (and ignoreVisualUpdate is false), 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 1627012. Two other bugs also regressed this (bug 1662013 and bug 1667475), and we need to fix all of them to fix the problem. Bug 1687886 is filed for the regression from bug 1667475. Bug 1687927 is filed for the regression from bug 1662013.

https://hg.mozilla.org/integration/autoland/rev/47328d6c1b40 made us request a repaint any time we have default metrics because we might get a new visual scroll offset, but if our visual scroll offset doesn't change we shouldn't need to do anything.

Differential Revision: https://phabricator.services.mozilla.com/D102586
2021-02-02 04:33:28 +00:00
Andreea Pavel fc3ef5c379 Backed out changeset 3a23af510b99 (bug 1687927) for build bustages at FrameMetrics.cpp on a CLOSED TREE 2021-02-02 06:20:11 +02:00
Timothy Nikkel 3d86f18bc1 Bug 1687927. Don't request a repaint for a scroll update of type NewScrollFrame that doesn't change the scroll offset. r=botond
https://searchfox.org/mozilla-central/rev/2c06b16a0c15ae340a0532e319cbf89ef9d21b68/gfx/layers/apz/src/AsyncPanZoomController.cpp#4866

scrollOffsetUpdated gets set to true if we get basically any scroll update, including a NewScrollFrame update that we create for every new scroll frame that just informs apzc the scroll offset is (0,0).

scrollOffsetUpdated being true means RequestContentRepaint gets called a little later. 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 1662013. Two other bugs also regressed this (bug 1627012 and bug 1667475), and we need to fix all of them to fix the problem. Bug 1687886 is filed for the regression from bug 1667475. Bug 1687926 is filed for the regression from bug 1627012.

Before https://hg.mozilla.org/integration/autoland/rev/b78646d59e32 we only set scrollOffsetUpdated to true if GetScrollOffsetUpdated() was set to true on the metrics, and it didn't get set to true for new scroll frames.

Differential Revision: https://phabricator.services.mozilla.com/D102587
2021-02-02 04:00:58 +00:00
Timothy Nikkel 8a6332429a 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 7f3dabf54f 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 9e597fb16e Backed out changeset 0d66f4dd10b6 (bug 1687872) for causing reftest failures CLOSED TREE 2021-01-26 03:31:59 +02:00
Timothy Nikkel 2812c1639a 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
Timothy Nikkel d70b8b4af4 Bug 1685009. Update the visual offset too when doing a paint skip transaction to keep it in sync with layout offset. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D101149
2021-01-10 01:52:24 +00:00
Mihai Alexandru Michis 14cf518abd Backed out changeset 24da67c3c956 (bug 1685009) for causing crashtest timeouts. 2021-01-09 04:21:14 +02:00
Timothy Nikkel b38ba95a2a Bug 1685009. Update the visual offset too when doing a paint skip transaction to keep it in sync with layout offset. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D101149
2021-01-08 20:20:48 +00:00
Kartikaya Gupta bebe87ee86 Bug 1662019 - Replace the uint32_t scroll generation with ScrollGeneration. r=tnikkel
Depends on D97035

Differential Revision: https://phabricator.services.mozilla.com/D97036
2020-11-13 22:58:06 +00:00
Sylvestre Ledru 9bfd4073b2 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D95434
2020-11-04 18:46:00 +00:00
Hiroyuki Ikezoe ea157cca7c Bug 1663000 - Send the composition size without the dynamic toolbar height to the compositor. r=botond
Also add AsyncPanZoomController::CanScrollDownwardsWithDynamicToolbar to tell
whether the root APZC is scrollable or there is room covered by the dynamic
toolbar so that we can tell GeckoView to move the dynamic toolbar in such cases.

Differential Revision: https://phabricator.services.mozilla.com/D93914
2020-11-04 03:16:04 +00:00
Kartikaya Gupta b5d18c1d64 Bug 1668921 - Move ScrollMetadata serializer into a friend function. r=mattwoodrow
Depends on D92844

Differential Revision: https://phabricator.services.mozilla.com/D92845
2020-10-08 12:39:27 +00:00
Kartikaya Gupta 9472c5ba04 Bug 1668921 - Move FrameMetrics serializer into a friend function. r=mattwoodrow
Depends on D92843

Differential Revision: https://phabricator.services.mozilla.com/D92844
2020-10-08 12:39:12 +00:00
Kartikaya Gupta 52e0d3e0ee Bug 1662017 - Allow paint-skip transactions to have multiple scroll position updates. r=botond
Sometimes the main thread has multiple scroll position changes that could
individually be propagated to the compositor via paint-skip transactions.
Currently the code doesn't support that; on the second scroll position change
for a given scrollframe it bails out and falls back to a full transaction. This
patch allows this behaviour. The main change is just upgrade the data structure
to store an array of ScrollPositionUpdate instances instead of a single one,
and then plumbing that through. Care is taken to avoid unnecessary copies, by
moving the array where possible.

Differential Revision: https://phabricator.services.mozilla.com/D92446
2020-10-05 18:19:40 +00:00
Kartikaya Gupta 83bb3063e2 Bug 1667863 - Move the stringification for OverscrollBehavior and OverscrollBehaviorInfo into ostream operators. r=mattwoodrow
Depends on D91652

Differential Revision: https://phabricator.services.mozilla.com/D91653
2020-09-29 02:56:47 +00:00
Kartikaya Gupta 1672cfac76 Bug 1667863 - Move OverscrollBehaviorInfo method bodies to .cpp file. r=mattwoodrow
Depends on D91651

Differential Revision: https://phabricator.services.mozilla.com/D91652
2020-09-29 02:56:32 +00:00
Botond Ballo 4d6bf32e3a Bug 1667475 - Document that FrameMetrics::mDisplayPort is relative to GetLayoutScrollOffset(). r=kats
It stopped being relative to mScrollOffset in bug 1519285, when that
patched change the value stored in mScrollOffset to be the visual
scroll offset even for the Layers copy of the metrics.

Depends on D91479

Differential Revision: https://phabricator.services.mozilla.com/D91480
2020-09-26 17:44:31 +00:00
Botond Ballo 90420069cc Bug 1667475 - Remove FrameMetrics::mDisplayPortMargins. r=kats
The two existing uses were inconsistent in whether the margins
were relative to the visual viewport or the layout viewport.

We could fix this, but it turns out both uses are readily
refactored to not need the field, so this patch removes the
field.

Differential Revision: https://phabricator.services.mozilla.com/D91479
2020-09-26 17:44:03 +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 0a8f544bee Bug 1664626 - Delete now-unused code. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D90724
2020-09-19 00:36:20 +00:00
Kartikaya Gupta 8b60cda1f4 Bug 1664626 - Remove last usage of FrameMetrics::mScrollUpdateType. r=botond
The only remaining use site only cares about whether or not the transaction
was a paint-skip transaction or not, so this patch adds a dedicated bool for
that, which unlocks some cleanup.

Depends on D90722

Differential Revision: https://phabricator.services.mozilla.com/D90723
2020-09-18 20:31:49 +00:00
Timothy Nikkel ad56527f09 Bug 1655130. Handle non-smooth scrolling with desktop zooming scrollbars. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D89408
2020-09-13 08:31:54 +00:00
Kartikaya Gupta 8b10d15d15 Bug 1662014 - Remove unused fields/APIs. r=botond,tnikkel
These things are all unused now.

Differential Revision: https://phabricator.services.mozilla.com/D88750
2020-09-12 13:06:39 +00:00
Kartikaya Gupta 0863c04a4d Bug 1662013 - Move some function bodies into .cpp files. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D88746
2020-09-12 13:06:20 +00:00