mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 08:10:02 +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
|
@ -402,4 +402,13 @@ Optional<String> CSSStyleSheet::source_text(Badge<DOM::Document>) const
|
|||
return m_source_text;
|
||||
}
|
||||
|
||||
bool CSSStyleSheet::has_associated_font_loader(FontLoader& font_loader) const
|
||||
{
|
||||
for (auto& loader : m_associated_font_loaders) {
|
||||
if (loader.ptr() == &font_loader)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue