diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /layout/reftests/css-scroll-snap | |
parent | Initial commit. (diff) | |
download | firefox-esr-upstream.tar.xz firefox-esr-upstream.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/css-scroll-snap')
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..8a0082b6d0 --- /dev/null +++ b/layout/reftests/css-scroll-snap/reftest.list @@ -0,0 +1,2 @@ +fails-if(useDrawSnapshot) == scroll-margin-on-anchor.html#target scroll-margin-on-anchor-ref.html +fails-if(useDrawSnapshot) == 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..9a86be4070 --- /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 properly 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> |