summaryrefslogtreecommitdiffstats
path: root/gfx/wr/wrench/reftests/scrolling/sticky-nested.yaml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /gfx/wr/wrench/reftests/scrolling/sticky-nested.yaml
parentInitial commit. (diff)
downloadfirefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz
firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--gfx/wr/wrench/reftests/scrolling/sticky-nested.yaml215
1 files changed, 215 insertions, 0 deletions
diff --git a/gfx/wr/wrench/reftests/scrolling/sticky-nested.yaml b/gfx/wr/wrench/reftests/scrolling/sticky-nested.yaml
new file mode 100644
index 0000000000..d52821efeb
--- /dev/null
+++ b/gfx/wr/wrench/reftests/scrolling/sticky-nested.yaml
@@ -0,0 +1,215 @@
+root:
+ items:
+ # This is a scroll frame with an out-of-viewport rect that should be pushed into the
+ # viewport by its "bottom" sticky constraint.
+ - type: scroll-frame
+ bounds: [10, 10, 50, 50]
+ content-size: [200, 200]
+ items:
+ - type: sticky-frame
+ bounds: [10, 60, 50, 50]
+ margin-bottom: 0
+ vertical-offset-bounds: [-500, 0]
+ items:
+ - type: clip
+ bounds: [10, 60, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [10, 60, 50, 50]
+ color: green
+ # Do the same thing, but now for the "top" constraint.
+ - type: scroll-frame
+ bounds: [70, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 50]
+ items:
+ - type: sticky-frame
+ bounds: [70, 10, 50, 50]
+ margin-top: 0
+ vertical-offset-bounds: [0, 500]
+ items:
+ - type: clip
+ bounds: [70, 10, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [70, 10, 50, 50]
+ color: green
+ # Do the same thing, but now for the "right" constraint.
+ - type: scroll-frame
+ bounds: [10, 70, 50, 50]
+ content-size: [200, 200]
+ items:
+ - type: sticky-frame
+ bounds: [60, 70, 50, 50]
+ margin-right: 0
+ horizontal-offset-bounds: [-500, 0]
+ items:
+ - type: clip
+ bounds: [60, 70, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [60, 70, 50, 50]
+ color: green
+ # Do the same thing, but now for the "left" constraint.
+ - type: scroll-frame
+ bounds: [70, 70, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [50, 0]
+ items:
+ - type: sticky-frame
+ bounds: [70, 70, 50, 50]
+ margin-left: 0
+ horizontal-offset-bounds: [0, 500]
+ items:
+ - type: clip
+ bounds: [70, 70, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [70, 70, 50, 50]
+ color: green
+
+ # The same tests, but this time with a margin.
+ - type: scroll-frame
+ bounds: [130, 10, 50, 50]
+ content-size: [200, 200]
+ items:
+ - type: sticky-frame
+ bounds: [130, 60, 50, 50]
+ margin-bottom: 10
+ vertical-offset-bounds: [-500, 0]
+ items:
+ - type: clip
+ bounds: [130, 60, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [130, 60, 50, 50]
+ color: green
+ # Do the same thing, but now for the "top" constraint.
+ - type: scroll-frame
+ bounds: [190, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 50]
+ items:
+ - type: sticky-frame
+ bounds: [190, 10, 50, 50]
+ margin-top: 10
+ vertical-offset-bounds: [0, 500]
+ items:
+ - type: clip
+ bounds: [190, 10, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [190, 10, 50, 50]
+ color: green
+ # Do the same thing, but now for the "right" constraint.
+ - type: scroll-frame
+ bounds: [130, 70, 50, 50]
+ content-size: [200, 200]
+ items:
+ - type: sticky-frame
+ bounds: [180, 70, 50, 50]
+ margin-right: 10
+ horizontal-offset-bounds: [-500, 0]
+ items:
+ - type: clip
+ bounds: [180, 70, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [180, 70, 50, 50]
+ color: green
+ # Do the same thing, but now for the "left" constraint.
+ - type: scroll-frame
+ bounds: [190, 70, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [50, 0]
+ items:
+ - type: sticky-frame
+ bounds: [190, 70, 50, 50]
+ margin-left: 10
+ horizontal-offset-bounds: [0, 500]
+ items:
+ - type: clip
+ bounds: [190, 70, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [190, 70, 50, 50]
+ color: green
+
+ # The same tests, but this time with a limit.
+ - type: scroll-frame
+ bounds: [250, 10, 50, 50]
+ content-size: [200, 200]
+ items:
+ - type: sticky-frame
+ bounds: [250, 60, 50, 50]
+ margin-bottom: 0
+ vertical-offset-bounds: [-25, 0]
+ items:
+ - type: clip
+ bounds: [250, 60, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [250, 60, 50, 50]
+ color: green
+ # Do the same thing, but now for the "top" constraint.
+ - type: scroll-frame
+ bounds: [310, 10, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [0, 50]
+ items:
+ - type: sticky-frame
+ bounds: [310, 10, 50, 50]
+ margin-top: 0
+ vertical-offset-bounds: [0, 25]
+ items:
+ - type: clip
+ bounds: [310, 10, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [310, 10, 50, 50]
+ color: green
+ # Do the same thing, but now for the "right" constraint.
+ - type: scroll-frame
+ bounds: [250, 70, 50, 50]
+ content-size: [200, 200]
+ items:
+ - type: sticky-frame
+ bounds: [300, 70, 50, 50]
+ margin-right: 0
+ horizontal-offset-bounds: [-25, 0]
+ items:
+ - type: clip
+ bounds: [300, 70, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [300, 70, 50, 50]
+ color: green
+ # Do the same thing, but now for the "left" constraint.
+ - type: scroll-frame
+ bounds: [310, 70, 50, 50]
+ content-size: [200, 200]
+ scroll-offset: [50, 0]
+ items:
+ - type: sticky-frame
+ bounds: [310, 70, 50, 50]
+ margin-left: 0
+ horizontal-offset-bounds: [0, 25]
+ items:
+ - type: clip
+ bounds: [310, 70, 50, 50]
+ content-size: [100, 100]
+ items:
+ - type: rect
+ bounds: [310, 70, 50, 50]
+ color: green