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

Scroll offsets are sometimes lost when updating WebRender display list #31807

Closed
delan opened this issue Mar 21, 2024 · 1 comment · Fixed by #31892
Closed

Scroll offsets are sometimes lost when updating WebRender display list #31807

delan opened this issue Mar 21, 2024 · 1 comment · Fixed by #31892
Assignees
Labels
A-gfx/compositing C-untriaged New issues that haven't been triaged yet

Comments

@delan
Copy link
Sponsor Member

delan commented Mar 21, 2024

To reproduce:

  1. Create test.html as below (and iframe.html with enough text to scroll)
  2. Scroll the iframe down to some non-zero y
  3. Observe that the iframe appears to scroll back to the top
<!doctype html><meta charset="utf-8">
<style>
    div {
        transform: translateY(7em) rotate(15deg);
    }
    .toggle {
        transform: translateY(7em) rotate(30deg);
    }
</style>
<div><iframe src="iframe.html"></iframe></div>
<script>
    setInterval(() => {
        document.querySelector("div").classList.toggle("toggle");
    }, 500);
</script>
@delan delan added C-untriaged New issues that haven't been triaged yet A-gfx/compositing labels Mar 21, 2024
@delan
Copy link
Sponsor Member Author

delan commented Mar 21, 2024

  • Send scroll offsets for descendant pipelines when sending display lists?
  • Or, find out why sending display list blows away scroll offsets for descendant pipelines
  • Maybe it’s that Gecko synchronises scroll offsets from APZ to layout and uses them to set initial WebRender scroll offsets, whereas we don’t (stacking_context.rs:205)?

@mrobinson mrobinson self-assigned this Mar 21, 2024
mrobinson added a commit to mrobinson/servo that referenced this issue Mar 27, 2024
…r display lists

WebRender does not preserve spatial tree offsets when updating the
spatial tree. Updating the spatial tree of a pipeline can also
update the spatial tree of child pipelines. This change ensures that
WebRender always gets the scroll offsets of the entire scene when
modifying display lists in a way that may rebuild the spatial tree.

Fixes servo#31807.
mrobinson added a commit to mrobinson/servo that referenced this issue Mar 29, 2024
…r display lists

WebRender does not preserve spatial tree offsets when updating the
spatial tree. Updating the spatial tree of a pipeline can also
update the spatial tree of child pipelines. This change ensures that
WebRender always gets the scroll offsets of the entire scene when
modifying display lists in a way that may rebuild the spatial tree.

Fixes servo#31807.
github-merge-queue bot pushed a commit that referenced this issue Apr 3, 2024
…r display lists (#31892)

WebRender does not preserve spatial tree offsets when updating the
spatial tree. Updating the spatial tree of a pipeline can also
update the spatial tree of child pipelines. This change ensures that
WebRender always gets the scroll offsets of the entire scene when
modifying display lists in a way that may rebuild the spatial tree.

Fixes #31807.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-gfx/compositing C-untriaged New issues that haven't been triaged yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants