mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +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:
committed by
Alexander Kalenik
parent
8472b2b1fb
commit
74588a0a16
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user