LibWeb/CSS: Support text-justify: distribute legacy value alias

...for `text-justify: inter-character`.

We previously had this mapped in Enums.json, but the behaviour is
different: `a=b` in Enums.json keeps `a` around but makes it behave the
same as `b`. A legacy name alias is instead expected to replace `a`
with `b`, so we have to do that separately.
This commit is contained in:
Sam Atkins
2025-07-17 10:50:35 +01:00
parent db75405881
commit 11e2dbb555
Notes: github-actions[bot] 2025-07-21 09:05:50 +00:00
5 changed files with 35 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
<!doctype html>
<link rel=author href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
<link rel=author href="https://mozilla.org" title="Mozilla">
<link rel=help href="https://github.com/w3c/csswg-drafts/issues/6156">
<title>text-justify: distribute is a parse-time alias of inter-character</title>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script>
test(function() {
let style = document.createElement("div").style;
style.textJustify = "distribute";
assert_equals(style.textJustify, "inter-character");
});
</script>