LibWeb/CSS: Backtrack the parser if a property does not accept a value

This commit is contained in:
Tim Ledbetter
2025-06-14 05:27:41 +01:00
committed by Jelle Raaijmakers
parent 26293114d8
commit 028bcd3d67
Notes: github-actions[bot] 2025-06-14 06:24:04 +00:00
11 changed files with 265 additions and 36 deletions

View File

@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Box Alignment Level 3: parsing grid-gap with invalid values</title>
<link rel="help" href="https://drafts.csswg.org/css-align/#grid-gap-legacy">
<link rel="author" title="Takuya Kurimoto" href="mailto:takuya004869@gmail.com">
<meta name="assert" content="grid-gap supports only the grammar '<grid-row-gap> <grid-column-gap>?'.">
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../../css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("grid-gap", "auto");
test_invalid_value("grid-gap", "-10px");
test_invalid_value("grid-gap", "10px 20% 30px");
test_invalid_value("grid-gap", "normal 10px normal");
</script>
</body>
</html>