mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibWeb: Make StyleSheet and CSSStyleSheet GC-allocated
This commit is contained in:
parent
0fe923e355
commit
5d60212076
Notes:
sideshowbarker
2024-07-17 07:29:15 +09:00
Author: https://github.com/awesomekling
Commit: 5d60212076
Pull-request: https://github.com/SerenityOS/serenity/pull/14816
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/linusg ✅
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