mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 10:41:30 +00:00
LibWeb: Add flow relative values for the clear
property
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Currently `inline-start` and `inline-end` are always treated as `left` and `right` respectively.
This commit is contained in:
parent
28b24b72bc
commit
30cdacc05a
Notes:
github-actions[bot]
2025-06-17 07:27:43 +00:00
Author: https://github.com/tcl3
Commit: 30cdacc05a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5109
Reviewed-by: https://github.com/gmta ✅
6 changed files with 78 additions and 3 deletions
|
@ -101,7 +101,9 @@
|
||||||
"none",
|
"none",
|
||||||
"left",
|
"left",
|
||||||
"right",
|
"right",
|
||||||
"both"
|
"both",
|
||||||
|
"inline-start",
|
||||||
|
"inline-end"
|
||||||
],
|
],
|
||||||
"column-span": [
|
"column-span": [
|
||||||
"none",
|
"none",
|
||||||
|
|
|
@ -939,9 +939,10 @@ BlockFormattingContext::DidIntroduceClearance BlockFormattingContext::clear_floa
|
||||||
float_side.clear();
|
float_side.clear();
|
||||||
};
|
};
|
||||||
|
|
||||||
if (computed_values.clear() == CSS::Clear::Left || computed_values.clear() == CSS::Clear::Both)
|
// FIXME: Honor writing-mode, direction and text-orientation.
|
||||||
|
if (first_is_one_of(computed_values.clear(), CSS::Clear::Left, CSS::Clear::Both, CSS::Clear::InlineStart))
|
||||||
clear_floating_boxes(m_left_floats);
|
clear_floating_boxes(m_left_floats);
|
||||||
if (computed_values.clear() == CSS::Clear::Right || computed_values.clear() == CSS::Clear::Both)
|
if (first_is_one_of(computed_values.clear(), CSS::Clear::Right, CSS::Clear::Both, CSS::Clear::InlineEnd))
|
||||||
clear_floating_boxes(m_right_floats);
|
clear_floating_boxes(m_right_floats);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
Harness status: OK
|
||||||
|
|
||||||
|
Found 6 tests
|
||||||
|
|
||||||
|
6 Pass
|
||||||
|
Pass Property clear value 'none'
|
||||||
|
Pass Property clear value 'left'
|
||||||
|
Pass Property clear value 'right'
|
||||||
|
Pass Property clear value 'both'
|
||||||
|
Pass Property clear value 'inline-start'
|
||||||
|
Pass Property clear value 'inline-end'
|
|
@ -0,0 +1,11 @@
|
||||||
|
Harness status: OK
|
||||||
|
|
||||||
|
Found 6 tests
|
||||||
|
|
||||||
|
6 Pass
|
||||||
|
Pass e.style['clear'] = "none" should set the property value
|
||||||
|
Pass e.style['clear'] = "left" should set the property value
|
||||||
|
Pass e.style['clear'] = "right" should set the property value
|
||||||
|
Pass e.style['clear'] = "both" should set the property value
|
||||||
|
Pass e.style['clear'] = "inline-start" should set the property value
|
||||||
|
Pass e.style['clear'] = "inline-end" should set the property value
|
|
@ -0,0 +1,24 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>CSS basic box model: getComputedStyle().clear</title>
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-box-3/#propdef-clear">
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-logical/#float-clear">
|
||||||
|
<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("clear", "none");
|
||||||
|
test_computed_value("clear", "left");
|
||||||
|
test_computed_value("clear", "right");
|
||||||
|
test_computed_value("clear", "both");
|
||||||
|
|
||||||
|
test_computed_value("clear", "inline-start");
|
||||||
|
test_computed_value("clear", "inline-end");
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,26 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>CSS basic box model: parsing clear with valid values</title>
|
||||||
|
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-box-3/#propdef-clear">
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-logical/#float-clear">
|
||||||
|
<meta name="assert" content="clear supports the full grammar 'none | left | right | both'.">
|
||||||
|
<meta name="assert" content="clear also supports inline-start and inline-end.">
|
||||||
|
<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("clear", "none");
|
||||||
|
test_valid_value("clear", "left");
|
||||||
|
test_valid_value("clear", "right");
|
||||||
|
test_valid_value("clear", "both");
|
||||||
|
|
||||||
|
test_valid_value("clear", "inline-start");
|
||||||
|
test_valid_value("clear", "inline-end");
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Add table
Add a link
Reference in a new issue