mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
LibWeb: Map logical aliases at compute rather than cascade time
This requires us to front load computation of writing-mode and direction
before we encounter any logical aliases or their physical counterparts
so that we can create a mapping context.
Doing this at compute rather than cascade time achieves a few things:
1) Brings us into line with the spec
2) Avoids the double cascade that was previously required to compute
mapping contexts
3) We now compute values of logical aliases, while
`style_value_for_computed_property` maps logical aliases to their
physical counterparts, this didn't account for all cases (i.e. if
there was no layout node, Typed OM, etc).
4) Removes a hurdle to moving other upstream processes (i.e. arbitrary
substitution function resolution, custom property computation) to
compute time as the spec requires.
This commit is contained in:
Notes:
github-actions[bot]
2026-03-25 12:54:31 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/500ca417ce9 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8446 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -0,0 +1,14 @@
|
||||
<!doctype html>
|
||||
<script src="../include.js"></script>
|
||||
<style>
|
||||
#target {
|
||||
display: none;
|
||||
padding-inline-start: 12px;
|
||||
}
|
||||
</style>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test(() => {
|
||||
println(getComputedStyle(target).paddingInlineStart);
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user