mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 01:29:17 +00:00
LibWeb: Remove all font loaders linked to a StyleSheet when it's deleted
When a style sheet is removed, all font loaders created from that style sheet should also be removed.
This commit is contained in:
parent
8472b2b1fb
commit
74588a0a16
Notes:
github-actions[bot]
2024-09-22 18:11:26 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 74588a0a16
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1486
Reviewed-by: https://github.com/awesomekling
5 changed files with 35 additions and 3 deletions
|
@ -123,6 +123,7 @@ void StyleSheetList::remove_sheet(CSSStyleSheet& sheet)
|
|||
return;
|
||||
}
|
||||
|
||||
m_document_or_shadow_root->document().style_computer().unload_fonts_from_sheet(sheet);
|
||||
m_document_or_shadow_root->document().style_computer().invalidate_rule_cache();
|
||||
document_or_shadow_root().invalidate_style(DOM::StyleInvalidationReason::StyleSheetListRemoveSheet);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue