Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWhere to store pipeline specific options for scrolling behavior #425
Comments
|
Instead of a new message, could you pass it through as an extra parameter to SetRootStackingContext message? (This is called once per pipeline here - https://github.com/servo/webrender/blob/master/webrender/src/render_backend.rs#L152) Then, you can easily store it in the scene pipeline struct here: Would that work for your requirements? |
I could, but I want to be able to change the overscroll options anytime. When is |
|
I stored the overscroll options in
I'm stuck. Should I pass |
|
In general the idea is that there is a step which takes the relevant information from the Scene structure and builds the Frame from it. This is mostly handled in the flatten() method in frame.rs. There is a step in this recursive function where it encounters a new iframe / pipeline and extracts the information from the scene. This is probably the right place to put it. Is your code in a branch pushed to GH? It might be useful to take a look and see how it's being used - how often will these overscroll options be changed? What is it that controls / defines the overscroll options? |
See:
No often. Usually, after the user navigated (clicked on link or went back/fwd).
For now, the option tells where the user can overscroll (top, right, bottom, left). Later, we want to introduce some more complex options:
|
|
@paulrouget I think this can be closed now? |
|
Yes. I might get back to this later. But as of now, it's not relevant anymore. |
We want to implement something like this:
iframe.setOverscrollOptions(options);.I managed to send this information to WebRender.
In render_backend.rs, I get this message:
ApiMsg::SetOverscrollOptions(pipeline_id, options).Later, in frame.rs, in
scroll(), I want to access these options.I don't know in which struct I should store the options in render_backend.rs to make it accessible in frame.rs.
I only want these options to affect how the document of the pipeline scroll within the iframe. Not pipeline's inner scrollable layers.