LibWeb: Add scroll-behavior CSS property

To quote the spec:
"User agents may ignore this property."
So that is what we do.
This commit is contained in:
Psychpsyo
2026-03-15 16:46:56 +01:00
committed by Sam Atkins
parent a141c2c492
commit 80a0a39b79
Notes: github-actions[bot] 2026-03-16 08:46:13 +00:00
14 changed files with 255 additions and 2 deletions

View File

@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSSOM View: getComputedStyle().scrollBehavior</title>
<link rel="help" href="https://drafts.csswg.org/cssom-view/#propdef-scroll-behavior">
<meta name="assert" content="scroll-behavior computed value is as specified.">
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../../css/support/computed-testcommon.js"></script>
</head>
<body>
<div id="target"></div>
<script>
test_computed_value("scroll-behavior", 'auto');
test_computed_value("scroll-behavior", 'smooth');
</script>
</body>
</html>

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSSOM View: parsing scroll-behavior with valid values</title>
<link rel="help" href="https://drafts.csswg.org/cssom-view/#propdef-scroll-behavior">
<meta name="assert" content="scroll-behavior supports the full grammar 'auto | smooth'.">
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../../css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("scroll-behavior", 'auto');
test_valid_value("scroll-behavior", 'smooth');
</script>
</body>
</html>