mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
LibWeb: Compute math-depth in line with other font properties
The main change here is that we now properly absolutize values which
means we now support `random()` and `sibling-{count,index}()`
We are also more consistent with how we handle computation for the other
font properties
This commit is contained in:
Notes:
github-actions[bot]
2026-01-15 12:04:17 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/2c3ddc294f3 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7464 Reviewed-by: https://github.com/AtkinsSJ ✅
21
Tests/LibWeb/Text/input/css/math-depth-absolutization.html
Normal file
21
Tests/LibWeb/Text/input/css/math-depth-absolutization.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<style>
|
||||
#foo {
|
||||
math-depth: sibling-count();
|
||||
}
|
||||
|
||||
#bar {
|
||||
math-depth: random(fixed 0.5, 0, 10);
|
||||
}
|
||||
</style>
|
||||
<div id="foo"></div>
|
||||
<div id="bar"></div>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
println(getComputedStyle(foo).mathDepth);
|
||||
println(getComputedStyle(bar).mathDepth);
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
Reference in New Issue
Block a user