Commit Graph
19 Commits
Author SHA1 Message Date
Hiroyuki Ikezoe 37ea7649a1 Bug 1871760 - Revert bug 1856088. r=botond
Two test cases attached in bug 1856088 now work with the previous commit and
work without `MergeableAbsolute`.

Differential Revision: https://phabricator.services.mozilla.com/D199841
2024-02-26 21:06:31 +00:00
Norisz Fay 909bfd0144 Backed out 2 changesets (bug 1871760) for causing Wr failures on window-scrollBy-display-change.html CLOSED TREE
Backed out changeset 0824e173f725 (bug 1871760)
Backed out changeset 4075109d54d0 (bug 1871760)
2024-02-09 14:46:05 +02:00
Hiroyuki Ikezoe 33fa42df0e Bug 1871760 - Revert bug 1856088. r=botond
Two test cases attached in bug 1856088 now work with the previous commit and
work without `MergeableAbsolute`.

Differential Revision: https://phabricator.services.mozilla.com/D199841
2024-02-09 08:44:41 +00:00
Hiroyuki Ikezoe 38e00cc500 Bug 1856088 - Handle scroll anchor adjustments as an absolute scroll position updates behind a pref. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D190888
2023-10-25 05:55:26 +00:00
Botond Ballo 1188cea83f Bug 1835600 - Hand off absolute non-MSD smooth scrolls to APZ. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D181419
2023-06-23 07:30:23 +00:00
Hiroyuki Ikezoe 818ef069bc Bug 1774537 - Propagate snap target ids for async scroll operations triggered on the main-thread, but will be processed in APZ. r=botond
Ideally we can write a wpt for this case, but it doesn't work due to
bug 1674687 and ClampAndAlignWithPixels [1] in our code. In the wpt we can use
waitForScrollTo [2] to wait for the end of an async scroll operation, say
a scrollBy call with `behavior: smooth`, at some point where it's close to the
final scroll destination APZ reports a fractional scroll offset close to the
destination, it will be clamped and rounded to the final destination value, thus
waitForScrollTo considers it reached to the end of the scroll operation. At the
moment APZ considers the async scroll is still in progress, which mean the snap
target ids haven't yet been reported to back the main-thread unfortunately.

[1] https://searchfox.org/mozilla-central/rev/170f06a720ddabee44c728b05ad30b18b066acca/layout/generic/nsGfxScrollFrame.cpp#2847
[2] https://searchfox.org/mozilla-central/rev/170f06a720ddabee44c728b05ad30b18b066acca/testing/web-platform/tests/css/css-scroll-snap/support/common.js#84

Depends on D149496

Differential Revision: https://phabricator.services.mozilla.com/D149497
2022-07-15 06:47:37 +00:00
Bogdan Szekely 039c4b8b95 Backed out 4 changesets (bug 1774537) for causing mochitest failures on test_group_wheelevents.html CLOSED TREE
Backed out changeset 8a52eb5b9043 (bug 1774537)
Backed out changeset 5fb8ccdcbfea (bug 1774537)
Backed out changeset 44f1a68c16f4 (bug 1774537)
Backed out changeset 1f32db09b9a8 (bug 1774537)
2022-07-14 10:23:31 +03:00
Hiroyuki Ikezoe 4c2d4eb88b Bug 1774537 - Propagate snap target ids for async scroll operations triggered on the main-thread, but will be processed in APZ. r=botond
Ideally we can write a wpt for this case, but it doesn't work due to
bug 1674687 and ClampAndAlignWithPixels [1] in our code. In the wpt we can use
waitForScrollTo [2] to wait for the end of an async scroll operation, say
a scrollBy call with `behavior: smooth`, at some point where it's close to the
final scroll destination APZ reports a fractional scroll offset close to the
destination, it will be clamped and rounded to the final destination value, thus
waitForScrollTo considers it reached to the end of the scroll operation. At the
moment APZ considers the async scroll is still in progress, which mean the snap
target ids haven't yet been reported to back the main-thread unfortunately.

[1] https://searchfox.org/mozilla-central/rev/170f06a720ddabee44c728b05ad30b18b066acca/layout/generic/nsGfxScrollFrame.cpp#2847
[2] https://searchfox.org/mozilla-central/rev/170f06a720ddabee44c728b05ad30b18b066acca/testing/web-platform/tests/css/css-scroll-snap/support/common.js#84

Depends on D149496

Differential Revision: https://phabricator.services.mozilla.com/D149497
2022-07-14 02:19:12 +00:00
criss ba52a13d3d Backed out 4 changesets (bug 1774537) for causing mochitest failures on test_group_scroll_snap.html
Backed out changeset 47bb66885515 (bug 1774537)
Backed out changeset 9bb536d111a7 (bug 1774537)
Backed out changeset e3ab56189fa0 (bug 1774537)
Backed out changeset 61b3c13db9ea (bug 1774537)
2022-07-12 08:59:19 +03:00
Hiroyuki Ikezoe 4ba6c22102 Bug 1774537 - Propagate snap target ids for async scroll operations triggered on the main-thread, but will be processed in APZ. r=botond
Ideally we can write a wpt for this case, but it doesn't work due to
bug 1674687 and ClampAndAlignWithPixels [1] in our code. In the wpt we can use
waitForScrollTo [2] to wait for the end of an async scroll operation, say
a scrollBy call with `behavior: smooth`, at some point where it's close to the
final scroll destination APZ reports a fractional scroll offset close to the
destination, it will be clamped and rounded to the final destination value, thus
waitForScrollTo considers it reached to the end of the scroll operation. At the
moment APZ considers the async scroll is still in progress, which mean the snap
target ids haven't yet been reported to back the main-thread unfortunately.

[1] https://searchfox.org/mozilla-central/rev/170f06a720ddabee44c728b05ad30b18b066acca/layout/generic/nsGfxScrollFrame.cpp#2847
[2] https://searchfox.org/mozilla-central/rev/170f06a720ddabee44c728b05ad30b18b066acca/testing/web-platform/tests/css/css-scroll-snap/support/common.js#84

Depends on D149496

Differential Revision: https://phabricator.services.mozilla.com/D149497
2022-07-12 03:01:14 +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
Hiroyuki Ikezoe 9369bb5446 Bug 1571758 - Split out ScrollGeneration into a new header. r=botond
We are going to use it in various places, APZC, SampledAPZState etc.

Differential Revision: https://phabricator.services.mozilla.com/D133437
2022-01-31 09:40:33 +00:00
Hiroyuki Ikezoe a2c0776657 Bug 1739541 - Introduce TriggeredByScript in ScrollPositionUpdate and set Yes for ScrollToCSSPixels and ScrollByCSSPixels. r=botond
Both ScrollToCSSPixels and ScrollByCSSPixels are called only from JS via
Element.scrollTo, Element.scrollTop, Element.scrollLeft, Window.scroll,
Window.scrollTo and Window.scrollBy.

Note that we don't target either Window.scrollByLines or Window.scrollByPages
(both end up calling ScrollFrameHelper::ScrollBy) because both are triggered by
user interactions for our XUL tree implementation, for example
Window.scrollByLines gets called in response to a DOMMouseScroll event in
tree.js [1].

[1] https://searchfox.org/mozilla-central/rev/a12c2c2e59c92d8f969d8f3f290ab16919449c9d/toolkit/content/widgets/tree.js#788

Differential Revision: https://phabricator.services.mozilla.com/D130418
2021-11-09 09:19:25 +00:00
Kartikaya Gupta 2639706e79 Bug 1662019 - Encapsulate the ScrollGeneration::New calls a bit more. r=tnikkel
Instead of the scrollframe manually calling ScrollGeneration::New this has the
ScrollPositionUpdate do it automatically. Just makes things a little more
encapsulated.

Note that this patch does contain a small functional change, which is that if
ScrollFrameHelper::ScrollToImpl is called with ScrollOrigin::apz, it will not
increment mScrollGeneration whereas it used to before. As far as I can tell
this should be a harmless change.

Depends on D97036

Differential Revision: https://phabricator.services.mozilla.com/D97037
2020-11-13 22:58:13 +00:00
Kartikaya Gupta f054f062a3 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
Kartikaya Gupta 69db343184 Bug 1662019 - Create a dedicated struct for the scroll generation. r=tnikkel
Note in particular the struct keeps its own static (per-process) counter value,
and uses a uint64_t.

Depends on D97034

Differential Revision: https://phabricator.services.mozilla.com/D97035
2020-11-13 22:57:53 +00:00
Kartikaya Gupta c0eafd4c2b Bug 1666802 - Modify the ScrollPositionUpdate serializer to write to an ostream directly. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D93142
2020-10-11 21:18:51 +00:00
Kartikaya Gupta 55f6363165 Bug 1664638 - Replace the ScrollPositionUpdate from scrollframe construction with one that has the scroll position. r=tnikkel
In some cases (in this scenario, with a RTL XUL scrollframe), the scrollframe
can have a nonzero scroll position upon construction or reconstruction, without
having executed the scrolling code in ScrollFrameHelper::RestoreState or
ScrollFrameHelper::ScrollToRestoredPosition. In such cases APZ is not properly
notified of the scroll position, and it can get into a state where it is out of
sync with the main thread scroll position (until a subsequent scroll).

To correct this, we replace the ScrollPositionUpdate that is created during
scrollframe construction with a new ScrollPositionUpdate that holds the correct
scroll position, so that APZ is properly notified of the scroll position.

Differential Revision: https://phabricator.services.mozilla.com/D90674
2020-09-19 00:30:22 +00:00
Kartikaya Gupta 95693a9601 Bug 1662013 - Introduce a ScrollPositionUpdate and plumb it in. r=tnikkel,botond
This adds a ScrollPositionUpdate class. Code in nsGfxScrollFrame creates
instances of these classes every time the scroll generation is incremented,
and saves them to an array. The array is sent in the scroll metadata to the
compositor as part of a paint transaction.

Currently this data is not used at all on the APZ side, and exists alongside
(independently of) the existing scroll fields, so this patch should not have
any functional effects.

Differential Revision: https://phabricator.services.mozilla.com/D88741
2020-09-12 13:05:53 +00:00