ladybird
ladybird copied to clipboard
LibWeb: Check font family is present to avoid NPD when serializing CSS
Issue
When serializing CSS with missing Font-Family the current implementation would crash due to a Null Pointer Dereference on missing attribute
Fix
Ensure presence of Font-Family is checked to avoid the occurrence of the NPD
Additional
Refactor comments to stay coherent with the current spec
Fixes: #6259
I think this also probably warrants a spec bug be filed over at https://github.com/w3c/csswg-drafts/labels/cssom-1, since the spec is telling us to do things that seem impossible.
It looks like this got a little bit mangled. Can you please combine this into a single commit as it's a single change, and also correct the comments?
The way to handle the spec being wrong (as it is here) is:
- Keep the spec comments themselves as they are.
- Report a spec issue if there isn't one already.
- Add some
// AD-HOC: ...comments of your own to the parts where you had to ignore what the spec currently says.
(I see Cameron has commented already while I was writing this, but I'll keep it anyway for emphasis.)
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!
Hi, sorry I was on vacation, will be completing this soon
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!