LibHTML: Make the CSS parser return RefPtr's

It should be possible for the CSS parser to fail, and we'll know it
failed if it returns nullptr. Returning RefPtr's makes it actually
possible to return nullptr. :^)
This commit is contained in:
Andreas Kling 2019-11-07 17:58:54 +01:00
commit b88ff97537
Notes: sideshowbarker 2024-07-19 11:20:25 +09:00
3 changed files with 7 additions and 7 deletions

View file

@ -22,7 +22,7 @@ static StyleSheet& default_stylesheet()
if (!sheet) {
extern const char default_stylesheet_source[];
String css = default_stylesheet_source;
sheet = &parse_css(css).leak_ref();
sheet = parse_css(css).leak_ref();
}
return *sheet;
}