Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to send non-consumed scroll events back to the compositor? #424

Closed
paulrouget opened this issue Sep 28, 2016 · 2 comments
Closed

How to send non-consumed scroll events back to the compositor? #424

paulrouget opened this issue Sep 28, 2016 · 2 comments

Comments

@paulrouget
Copy link
Collaborator

@paulrouget paulrouget commented Sep 28, 2016

In BrowserHTML, we want to go back/forward in history when the user swipe right/left, like in Safari:

screen shot 2016-09-28 at 08 46 41

When the user scrolls horizontally, left to right, events are sent to WR, which will scroll layers. If scroll doesn't happen, we want the events to be sent back to the compositor. And then we might dispatch these events to the browserhtml script thread.

Also - thinking about it, we might want to do that too for regular - consumed - scroll events (window.onscroll).

@paulrouget
Copy link
Collaborator Author

@paulrouget paulrouget commented Sep 28, 2016

If I'm not mistaken, when frame.scroll() happens and nothing scroll, we end up here:

None => self.notify_compositor_of_new_scroll_frame(false),

So I imagine we could re-use new_scroll_frame_ready to pass non consumed events.

@paulrouget
Copy link
Collaborator Author

@paulrouget paulrouget commented Sep 28, 2016

I think I got it working. Closing.

I'll reopen a proper issue and/or PR to support this.

@paulrouget paulrouget closed this Sep 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.