mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:38:11 +00:00
LibWeb: Make StyleSheet and CSSStyleSheet GC-allocated
This commit is contained in:
parent
0fe923e355
commit
5d60212076
21 changed files with 166 additions and 96 deletions
|
@ -73,13 +73,13 @@ void CSSImportRule::resource_did_load()
|
|||
dbgln_if(CSS_LOADER_DEBUG, "CSSImportRule: Resource did load, has encoded data. URL: {}", resource()->url());
|
||||
}
|
||||
|
||||
auto sheet = parse_css_stylesheet(CSS::Parser::ParsingContext(*m_document, resource()->url()), resource()->encoded_data());
|
||||
auto* sheet = parse_css_stylesheet(CSS::Parser::ParsingContext(*m_document, resource()->url()), resource()->encoded_data());
|
||||
if (!sheet) {
|
||||
dbgln_if(CSS_LOADER_DEBUG, "CSSImportRule: Failed to parse stylesheet: {}", resource()->url());
|
||||
return;
|
||||
}
|
||||
|
||||
m_style_sheet = move(sheet);
|
||||
m_style_sheet = JS::make_handle(sheet);
|
||||
|
||||
m_document->style_computer().invalidate_rule_cache();
|
||||
m_document->invalidate_style();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue