LibWeb: Calculate the correct resolved value for inset properties

This improves the output of `getComputedStyle()` for the `top`,
`bottom`, `left` and `right` properties, where the used value is now
returned rather than the computed value, where applicable."
This commit is contained in:
Tim Ledbetter
2025-03-17 16:12:50 +00:00
committed by Sam Atkins
parent 2022c9e679
commit 01d1a9528b
Notes: github-actions[bot] 2025-03-18 09:28:52 +00:00
6 changed files with 1045 additions and 9 deletions

View File

@@ -0,0 +1,21 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSSOM: resolved values of the inset properties for absolute positioning</title>
<link rel="help" href="https://drafts.csswg.org/cssom/#resolved-value">
<link rel="help" href="https://drafts.csswg.org/css-position/#pos-sch">
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<script src=../../resources/testharness.js></script>
<script src=../../resources/testharnessreport.js></script>
<script type="module">
import {runTests, containerForAbspos} from "./support/getComputedStyle-insets.js";
runTests({
style: "position: absolute",
containingBlockElement: containerForAbspos,
containingBlockArea: "padding",
preservesPercentages: false,
preservesAuto: false,
canStretchAutoSize: true,
staticPositionY: 1 + 2 + 4 + 8,
staticPositionX: 2 + 4 + 8 + 16,
});
</script>