summaryrefslogtreecommitdiffstats
path: root/layout/reftests/css-scroll-snap
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 /layout/reftests/css-scroll-snap
parentInitial commit. (diff)
downloadfirefox-upstream.tar.xz
firefox-upstream.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--layout/reftests/css-scroll-snap/reftest.list2
-rw-r--r--layout/reftests/css-scroll-snap/scroll-margin-on-anchor-ref.html16
-rw-r--r--layout/reftests/css-scroll-snap/scroll-margin-on-anchor.html29
-rw-r--r--layout/reftests/css-scroll-snap/scroll-padding-on-anchor-ref.html16
-rw-r--r--layout/reftests/css-scroll-snap/scroll-padding-on-anchor.html31
5 files changed, 94 insertions, 0 deletions
diff --git a/layout/reftests/css-scroll-snap/reftest.list b/layout/reftests/css-scroll-snap/reftest.list
new file mode 100644
index 0000000000..e86e32c4cc
--- /dev/null
+++ b/layout/reftests/css-scroll-snap/reftest.list
@@ -0,0 +1,2 @@
+== scroll-margin-on-anchor.html#target scroll-margin-on-anchor-ref.html
+== scroll-padding-on-anchor.html#target scroll-padding-on-anchor-ref.html
diff --git a/layout/reftests/css-scroll-snap/scroll-margin-on-anchor-ref.html b/layout/reftests/css-scroll-snap/scroll-margin-on-anchor-ref.html
new file mode 100644
index 0000000000..f04ccfbbb1
--- /dev/null
+++ b/layout/reftests/css-scroll-snap/scroll-margin-on-anchor-ref.html
@@ -0,0 +1,16 @@
+<style>
+html,body {
+ overflow: hidden;
+ margin: 0px;
+ padding: 0px;
+}
+body {
+ margin-top: 100px;
+}
+#target {
+ background-color: blue;
+ width: 100%;
+ height: 100px;
+}
+</style>
+<div id="target"></div>
diff --git a/layout/reftests/css-scroll-snap/scroll-margin-on-anchor.html b/layout/reftests/css-scroll-snap/scroll-margin-on-anchor.html
new file mode 100644
index 0000000000..0116066808
--- /dev/null
+++ b/layout/reftests/css-scroll-snap/scroll-margin-on-anchor.html
@@ -0,0 +1,29 @@
+<!--
+ This reftest is a test case that scroll-margin value is propery handled when
+ navigating an anchor node, id="target" in this case, so the content scrolls
+ to the target element on loading.
+-->
+<style>
+html,body {
+ overflow: hidden;
+ margin: 0px;
+ padding: 0px;
+}
+.spacer {
+ height: 2000px;
+ width: 100%;
+ padding: 0px;
+ margin: 0px;
+}
+#target {
+ background-color: blue;
+ width: 100%;
+ height: 100px;
+ padding: 0px;
+ margin: 0px;
+ scroll-margin: 100px;
+}
+</style>
+<div class="spacer"></div>
+<div id="target"></div>
+<div class="spacer"></div>
diff --git a/layout/reftests/css-scroll-snap/scroll-padding-on-anchor-ref.html b/layout/reftests/css-scroll-snap/scroll-padding-on-anchor-ref.html
new file mode 100644
index 0000000000..845ed4e13c
--- /dev/null
+++ b/layout/reftests/css-scroll-snap/scroll-padding-on-anchor-ref.html
@@ -0,0 +1,16 @@
+<style>
+html,body {
+ overflow: hidden;
+ margin: 0px;
+ padding: 0px;
+}
+body {
+ padding-top: 100px;
+}
+#target {
+ background-color: blue;
+ width: 100%;
+ height: 100px;
+}
+</style>
+<div id="target"></div>
diff --git a/layout/reftests/css-scroll-snap/scroll-padding-on-anchor.html b/layout/reftests/css-scroll-snap/scroll-padding-on-anchor.html
new file mode 100644
index 0000000000..450a0cb0d7
--- /dev/null
+++ b/layout/reftests/css-scroll-snap/scroll-padding-on-anchor.html
@@ -0,0 +1,31 @@
+<!--
+ This reftest is a test case that scroll-padding value is propery handled when
+ navigating an anchor node, id="target" in this case, so the content scrolls
+ to the target element on loading.
+-->
+<style>
+html {
+ overflow: hidden;
+ scroll-padding: 100px;
+}
+body {
+ margin: 0px;
+ padding: 0px;
+}
+.spacer {
+ height: 2000px;
+ width: 100%;
+ padding: 0px;
+ margin: 0px;
+}
+#target {
+ background-color: blue;
+ width: 100%;
+ height: 100px;
+ padding: 0px;
+ margin: 0px;
+}
+</style>
+<div class="spacer"></div>
+<div id="target"></div>
+<div class="spacer"></div>