• Tien-Ren Chen's avatar
    [Blink/SPv175] Fix background-attachment:fixed for SPv175 · 6bfdf66c
    Tien-Ren Chen authored
    This CL fixes two bugs with background-attachment:fixed computation:
    
    1. Since CL 827671 we switch root layer in PaintInfo whenever the
    current transform node changes. This has a side effect that the painting
    root layer is no longer guaranteed to be a containing block ancestor of
    the current layout object, and AccumulatedScrollOffsetForFixedBackground()
    may skip over the painting root all the way to the root. This CL adds
    the skipping check to ensure we only collect scroll offsets up to the
    painting root.
    
    2. FixedAttachmentPositioningArea() converts the viewport rect to the
    space of the current paint context. Prior to SPv175 the border box space
    of the painting root is always equivalent to the space of the current
    paint context, so FixedAttachmentPositioningArea() did just that. In
    SPv175 the painting root may not always create a paint offset
    translation in case of a squashed layer, thus can induce an offset from
    its transform node. This CL ensures the paint offset taken into account.
    
    BUG=529963,849854
    
    Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
    Change-Id: Ib2f84a619235ab4ec6a9bfc695b57aae9d41b808
    Reviewed-on: https://chromium-review.googlesource.com/1098313
    Commit-Queue: Tien-Ren Chen <trchen@chromium.org>
    Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#567030}
    6bfdf66c
background-attachment-fixed-on-abs-pos.html 300 Bytes