summaryrefslogtreecommitdiffstats
path: root/gfx/wr/wrench/reftests/scrolling/fixed-position-scrolling-clip.yaml
blob: 63573e5742f3e4021647a15c4ce97e100cc44e72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
root:
  items:
    - type: scroll-frame
      bounds: [10, 10, 100, 300]
      content-size: [100, 700]
      id: 41
      scroll-offset: [0, 50]
      items:
      # The rectangles below should stay in place even when the parent scroll area scrolls,
      # because they use the root reference frame as their scroll node (fixed position).
      # On the other hand, the clip item here will scroll with its parent scroll area. Normally
      # fixed position items  would only be clipped by their reference frame (in this case the
      # root), but since these items specify an auxiliary clip, they will be clipped by their
      # sibling clip (42).
        - type: clip
          bounds: [10, 60, 50, 50]
          id: 42
        - type: stacking-context
          bounds: [10, 10, 100, 100]
          items:
            - type: rect
              bounds: [0, 0, 100, 50]
              color: green
              clip-and-scroll: [root-reference-frame, 42]
            - type: rect
              bounds: [0, 50, 100, 50]
              color: red
              clip-and-scroll: [root-reference-frame, 42]