mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
Previously we would generate the calculation context based on the current value parsing context. The main problem with this was that contexts were defined per property by default and had to be overriden per component value using "special" contexts, which was easy to forget. We now generate the calculation context per component value in the relevant `parse_foo_value` methods. The new failures in `typed_arithmetic.html` are because we no longer treat percentages as resolving to their property-level type when computing what the resolved type of a calculation is i.e. when we are parsing the `<number>` portion of `line-height` we treat percentages as raw percentages, not lengths. This brings us in line with WebKit but no longer with Chrome and WPT, I am not sure what the correct behavior is.
25 KiB
25 KiB