ladybird icon indicating copy to clipboard operation
ladybird copied to clipboard

LibWeb: Check font family is present to avoid NPD when serializing CSS

Open vedant-pandey opened this issue 2 months ago • 5 comments

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

vedant-pandey avatar Sep 28 '25 16:09 vedant-pandey

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.

Psychpsyo avatar Sep 30 '25 10:09 Psychpsyo

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.)

AtkinsSJ avatar Sep 30 '25 10:09 AtkinsSJ

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!

github-actions[bot] avatar Oct 22 '25 02:10 github-actions[bot]

Hi, sorry I was on vacation, will be completing this soon

vedant-pandey avatar Oct 22 '25 05:10 vedant-pandey

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!

github-actions[bot] avatar Nov 13 '25 02:11 github-actions[bot]