LibWeb: Map logical aliases at cascade time

Previously we would incorrectly map these in
`CSSStyleProperties::convert_declarations_to_specified_order`, aside
from being too early (as it meant we didn't maintain them as distinct
from their physical counterparts in CSSStyleProperties), this meant
that we didn't yet have the required context to map them correctly.

We now map them as part of the cascade process. To compute the mapping
context we do a cascade without mapping, and extract the relevant
properties (writing-direction and direction).
This commit is contained in:
Callum Law
2025-06-18 17:45:26 +12:00
committed by Sam Atkins
parent 4e87f85458
commit cfc8d3031b
Notes: github-actions[bot] 2025-06-23 14:20:40 +00:00
14 changed files with 848 additions and 141 deletions

View File

@@ -0,0 +1,15 @@
<!DOCTYPE html>
<meta charset="utf-8" />
<title>CSS Logical Properties: Flow-Relative Padding</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com" />
<link rel="help" href="https://drafts.csswg.org/css-logical/#padding-properties">
<meta name="assert" content="This test checks the interaction of the flow-relative padding-* properties with the physical ones in different writing modes." />
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<div id="log"></div>
<script type="module">
import {runTests, createBoxPropertyGroup} from "./resources/test-box-properties.js";
runTests(createBoxPropertyGroup("padding-*", {type: "length"}));
</script>