ladybird
ladybird copied to clipboard
LibWeb: Add fuzzing test for calc() usage
As can be seen from the output, we're missing full calc() support for the following properties:
- [ ] column-count
- [ ] grid-auto-columns
- [ ] grid-auto-rows
- [ ] grid-template-columns
- [ ] grid-template-rows
- [ ] line-height
- [ ] transform-origin
~~The grid-* ones seem to just be missing a getComputedStyle implementation, so it's hard to tell.~~ I found the bug, it's fixed in a commit here.
True. I also realised while having lunch that this doesn't properly test things, because anything with var() in (which I added to stop it immediately being simplified) has its calc()s resolved in a different code path. So I'll rewrite it to try each property multiple times with different values instead.
Removing that path doesn't make us fail any of our tests but does mean we serialise calc() values verbatim instead of simplified, so we'll fail a bunch of WPT tests. I really ought to get simplification done.
Changes:
- Add test cases that don't use
var(). - Rename the test.
- Add in a fix for
grid-template-*properties serializing to the empty string.
Rebased because I merge-conflicted myself with the grid-*-gap change. :laughing:
Just corrected the commit message, there were a couple more properties I hadn't noticed I'd fixed. :laughing: