You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Scrolling to end of element should start scrolling the parent element. #13249
It 'works', however not sure if it's right way to approach the problem. For example, if we had more levels of nesting, the scrolling would 'jump' to scrolling the root layer, as opposed to going up the chain of child layers...
To me it seems the concept of 'overscrolling' is implemented, however what we want do is limit it to the root layer, while in the case of a child layer, the nearest parent should 'take over' the scrolling when the end of the child element is reached....
What I did now is, in the case of a child layer ovescrolling, simply switching to scrolling the root layer instead, since the root_scroll_layer_id is readily available.
Probably best to get @pcwalton to look at this - he did the overscroll implementation and is able to test on mac (overscroll is not implemented for linux yet).
Once we have overscroll in Firefox on macOS, we're going to enable it for all scrollable elements. If a new scroll gesture starts while you're already scrolled all the way to the edge of the scrollable element under the mouse, then the scroll will be handed off to the next outer scrollable element which is actually scrollable in that direction. We don't do handoff in the middle of a scroll gesture.
By the way, I noticed that when you scroll and you encounter a scrollable child layer, the scroll switches to that layer, which is the opposite of the behaviour we want as per @mstange. This doesn't relate to my changes, yet we might want to try to tackle both at the same time?
This might be a more general problem 'what layer to scroll' and 'when to switch layer, and when not to'...
The problem I'm trying to solve now is 'switch to the parent layer, when you've reached the end of the current one(and it's not the root layer), and a new scroll gesture starts'.
The other problem would be 'do not switch to a child layer you might encounter, while scrolling the parent layer'.
Ok, added another commit, which implements 'keeping the currently scrolling layer, unless a new scroll gesture started'. Also keeping the other part which implements 'switching to the parent layer, when the child has scrolled to the end, and a new scroll is started, unless we're dealing with the root scroll layer'.
I have one question: Now that webrender has been updated to version 0.7, and after rebasing my fork, I'm having troubles building Servo with my local fork, since Servo still expects webrender 0.6.
How can I update my local Servo to use my local webrender 0.7?
@gterzian Servo should be all updated with latest WR now. You may find your local [replace] override in Cargo.toml needs to change the version number (to 0.8.0 I think) to select that local override when building.
Wanted to point out that this issue has moved somewhat deeper then the stuff we initially discussed here, and there is more info in the PR itself(not sure if we should move that discussion in here btw) see servo/webrender#599
Activity
gterzian commentedon Oct 2, 2016
Could I give this one a try?
jdm commentedon Oct 2, 2016
@mrobinson Would you be able to provide any pointers here?
paulrouget commentedon Oct 3, 2016
scroll events lands in compositor.rs here: https://github.com/servo/servo/blob/master/components/compositing/compositor.rs#L1617 then WebRender performs scrolling here: https://github.com/servo/webrender/blob/master/webrender/src/frame.rs#L284 … there, a layer is picked (see
get_scroll_layer). I guess the wrong layer is picked (if any). It probably has to do with the ScrollEventPhase.gterzian commentedon Oct 3, 2016
@paulrouget thanks
gterzian commentedon Oct 3, 2016
removed my comment above which refered to older scroll code...
gterzian commentedon Oct 8, 2016
Hi everyone, I'm trying to build Servo with my local fork of webrender, seeing this error:
paulrouget commentedon Oct 8, 2016
It's because of: servo/webrender#430
@nox what needs to done on Servo's side?
nox commentedon Oct 8, 2016
@gterzian For now you can base your work on the
rustupbranch of this repository. It will get merged tomorrow.gterzian commentedon Oct 9, 2016
@nox thanks, builds fine now 👍
gterzian commentedon Oct 9, 2016
Quick proof of concept here: servo/webrender#436
It 'works', however not sure if it's right way to approach the problem. For example, if we had more levels of nesting, the scrolling would 'jump' to scrolling the root layer, as opposed to going up the chain of child layers...
To me it seems the concept of 'overscrolling' is implemented, however what we want do is limit it to the root layer, while in the case of a child layer, the nearest parent should 'take over' the scrolling when the end of the child element is reached....
What I did now is, in the case of a child layer ovescrolling, simply switching to scrolling the root layer instead, since the
root_scroll_layer_idis readily available.Please let me know what you think
paulrouget commentedon Oct 9, 2016
/cc @glennw @pcwalton
glennw commentedon Oct 11, 2016
Probably best to get @pcwalton to look at this - he did the overscroll implementation and is able to test on mac (overscroll is not implemented for linux yet).
mstange commentedon Oct 11, 2016
Once we have overscroll in Firefox on macOS, we're going to enable it for all scrollable elements. If a new scroll gesture starts while you're already scrolled all the way to the edge of the scrollable element under the mouse, then the scroll will be handed off to the next outer scrollable element which is actually scrollable in that direction. We don't do handoff in the middle of a scroll gesture.
10 remaining items
gterzian commentedon Oct 24, 2016
By the way, I noticed that when you scroll and you encounter a scrollable child layer, the scroll switches to that layer, which is the opposite of the behaviour we want as per @mstange. This doesn't relate to my changes, yet we might want to try to tackle both at the same time?
This might be a more general problem 'what layer to scroll' and 'when to switch layer, and when not to'...
The problem I'm trying to solve now is 'switch to the parent layer, when you've reached the end of the current one(and it's not the root layer), and a new scroll gesture starts'.
The other problem would be 'do not switch to a child layer you might encounter, while scrolling the parent layer'.
paulrouget commentedon Oct 24, 2016
That's because layer is picked in
fn scrollno matter the phase.I would say yes. It's very much related. Both problems are about which layer is chosen on scroll.
gterzian commentedon Oct 29, 2016
Ok, added another commit, which implements 'keeping the currently scrolling layer, unless a new scroll gesture started'. Also keeping the other part which implements 'switching to the parent layer, when the child has scrolled to the end, and a new scroll is started, unless we're dealing with the root scroll layer'.
Please have a look: servo/webrender#465
gterzian commentedon Oct 31, 2016
I have one question: Now that webrender has been updated to version 0.7, and after rebasing my fork, I'm having troubles building Servo with my local fork, since Servo still expects webrender 0.6.
How can I update my local Servo to use my local webrender 0.7?
paulrouget commentedon Oct 31, 2016
Wait until @glennw updates servo, or try yourself by doing
./mach update-cargo -p webrender.glennw commentedon Nov 1, 2016
@gterzian Servo should be all updated with latest WR now. You may find your local [replace] override in Cargo.toml needs to change the version number (to 0.8.0 I think) to select that local override when building.
gterzian commentedon Nov 1, 2016
@glennw thank you, yes it all works fine now :)
gterzian commentedon Nov 30, 2016
Wanted to point out that this issue has moved somewhat deeper then the stuff we initially discussed here, and there is more info in the PR itself(not sure if we should move that discussion in here btw) see servo/webrender#599
Auto merge of #14470 - gterzian:implement_scroll_transactions, r=mbru…
Auto merge of #14470 - gterzian:implement_scroll_transactions, r=mbru…
Auto merge of #14470 - gterzian:implement_scroll_transactions, r=mbru…
Auto merge of #14470 - gterzian:implement_scroll_transactions, r=mbru…
Auto merge of #600 - gterzian:keep_scrolling_layer, r=glennw
Auto merge of #599 - gterzian:handoff_scroll_when_end_of_layer_reache…