mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57:35 +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
|
@ -9,14 +9,13 @@
|
|||
|
||||
namespace Web::CSS {
|
||||
|
||||
void StyleSheetList::add_sheet(NonnullRefPtr<CSSStyleSheet> sheet)
|
||||
void StyleSheetList::add_sheet(CSSStyleSheet& sheet)
|
||||
{
|
||||
VERIFY(!m_sheets.contains_slow(sheet));
|
||||
sheet->set_style_sheet_list({}, this);
|
||||
m_sheets.append(sheet);
|
||||
sheet.set_style_sheet_list({}, this);
|
||||
m_sheets.append(JS::make_handle(sheet));
|
||||
|
||||
m_document.style_computer().invalidate_rule_cache();
|
||||
m_document.style_computer().load_fonts_from_sheet(*sheet);
|
||||
m_document.style_computer().load_fonts_from_sheet(sheet);
|
||||
m_document.invalidate_style();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue