1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:38:12 +00:00

LibWeb: Make StyleSheet and CSSStyleSheet GC-allocated

This commit is contained in:
Andreas Kling 2022-08-07 13:14:54 +02:00
parent 0fe923e355
commit 5d60212076
21 changed files with 166 additions and 96 deletions

View file

@ -126,14 +126,14 @@ void HTMLLinkElement::resource_did_load_stylesheet()
}
}
auto sheet = parse_css_stylesheet(CSS::Parser::ParsingContext(document(), resource()->url()), resource()->encoded_data());
auto* sheet = parse_css_stylesheet(CSS::Parser::ParsingContext(document(), resource()->url()), resource()->encoded_data());
if (!sheet) {
dbgln_if(CSS_LOADER_DEBUG, "HTMLLinkElement: Failed to parse stylesheet: {}", resource()->url());
return;
}
sheet->set_owner_node(this);
document().style_sheets().add_sheet(sheet.release_nonnull());
document().style_sheets().add_sheet(*sheet);
}
void HTMLLinkElement::resource_did_load_favicon()