Skip to content

Items in scrollable layers can be clipped incorrectly. #7153

Closed

Description

@glennw

The code that clips items is here:

https://github.com/servo/servo/blob/master/components/layout/display_list_builder.rs#L925

An example of what happens:

  • A scroll layer has height 2000, with visible height of 768.
  • The first tile paints at 512x512 correctly.
  • The second tile paints at 512x512 and correctly clips items in the code above that are outside the 768 pixel enclosing rect.
  • When you scroll, the compositor doesn't ask for the 2nd tile to be repainted, as it hasn't changed.

This means that items clipped during the first render never get added to the display list as you scroll.

We could potentially force a repaint, but isn't this what the display port code should be handling? Perhaps we should just remove the clipping above and rely on the display port clipping?

cc @pcwalton

Activity

  1. pcwalton commented on Aug 12, 2015

    @pcwalton
    Contributor

    I think that for display items that belong to an overflow:scroll layer, we should just remove that clipping "optimization", since we will need them if the scroll happens.

  2. added 2 commits that reference this issue on Aug 13, 2015
    38c6da4
    0458166
  3. added a commit that references this issue on Aug 13, 2015
    8f55af1
  4. added a commit that references this issue on Aug 14, 2015
    1a60467
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions