Detect position change from requestAnimationFrame callback as scroll-linked effect

RESOLVED WONTFIX

Status

()

Core
Panning and Zooming
RESOLVED WONTFIX
2 years ago
2 years ago

People

(Reporter: botond, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox49 wontfix)

Details

(Whiteboard: [gfx-noted])

(Reporter)

Description

2 years ago
In bug 1229052, we implemented detection of "scroll-linked effects", that is, effects that update a positioning property of an element in response to a "scroll" event. In bug 1246290, we then leveraged this to optionally disable APZ for pages with scroll-linked effects.

Some pages have scroll-linked effects where a positioning property of an element is updated not in response to a "scroll" event, but in response to an input event, such as "mousewheel", that triggers a "scroll" event. From a user's point of view, these are still scroll-linked effects.
(Reporter)

Comment 1

2 years ago
Kats, was it a conscious decision not to include events such as "mousewheel", or was this an oversight / something we just didn't get to yet?
Depends on: 1246290
Flags: needinfo?(bugmail.mozilla)
Whiteboard: [gfx-noted]
It hadn't really occurred to me, honestly. Thinking about now I'm not sure how valuable it would be - in most cases when pages listen to the wheel events they are also doing preventDefault on them and reimplementing scrolling, so there shouldn't be any APZ lag in those cases. If there are sites that do element repositioning based on wheel events, does the APZ lag that results also manifest in other browsers?
Flags: needinfo?(bugmail.mozilla)
(Reporter)

Updated

2 years ago
Blocks: 1243385
See Also: bug 1243385
(Reporter)

Comment 3

2 years ago
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #2)
> It hadn't really occurred to me, honestly. Thinking about now I'm not sure
> how valuable it would be - in most cases when pages listen to the wheel
> events they are also doing preventDefault on them and reimplementing
> scrolling, so there shouldn't be any APZ lag in those cases. If there are
> sites that do element repositioning based on wheel events, does the APZ lag
> that results also manifest in other browsers?

Deeper investigation revealed that the site in question is not changin the position from a wheel event handler after all; it's doing so from a requestAnimationFrame callback.

Kats suggested on IRC detecting a scroll-linked effect if a position is changed from a requestAnimationCallback. I'm going to re-purpose this bug for that.
Summary: Scroll-linked effect not detected for events that are not "scroll" but can cause scrolling (such as "mousewheel") → Detect position change from requestAnimationFrame callback as scroll-linked effect
Considering the scroll-linked effect stuff is disabled by default I'm going to wontfix this for now. We can come back to if it things change.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
status-firefox49: affected → wontfix
You need to log in before you can comment on or make changes to this bug.