mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-02 20:42:11 +02:00
LibWeb: Parse widows CSS property
This commit is contained in:
Notes:
github-actions[bot]
2025-09-26 15:36:06 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/c4d6deb5c75 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6313 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Fragmentation Module Level 3: getComputedStyle().widows</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-break/#propdef-widows">
|
||||
<meta name="assert" content="widows computed value is specified integer.">
|
||||
<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("widows", "1");
|
||||
test_computed_value("widows", "234");
|
||||
test_computed_value("widows", "calc(1 + 234)", "235");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Fragmentation Module Level 3: parsing widows with invalid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-break/#propdef-widows">
|
||||
<meta name="assert" content="widows supports only the grammar '<integer>'.">
|
||||
<meta name="assert" content="Negative values and zero are invalid.">
|
||||
<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("widows", "auto");
|
||||
test_invalid_value("widows", "1 234");
|
||||
test_invalid_value("widows", "-234");
|
||||
test_invalid_value("widows", "-1");
|
||||
test_invalid_value("widows", "0");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Fragmentation Module Level 3: parsing widows with valid values</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-break/#propdef-widows">
|
||||
<meta name="assert" content="widows supports the full grammar '<integer>'.">
|
||||
<meta name="assert" content="Negative values and zero are invalid.">
|
||||
<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("widows", "1");
|
||||
test_valid_value("widows", "234");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user