1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:18:13 +00:00

LibWeb: Remove for_first_not_loaded_import_rule() :^)

This was only used for making sure `@import` rules got loaded, and since
they handle that themselves now, we can get rid of all this code!
This commit is contained in:
Sam Atkins 2021-11-18 17:53:03 +00:00 committed by Andreas Kling
parent 9d72815deb
commit 6fc1810190
8 changed files with 0 additions and 45 deletions

View file

@ -103,29 +103,6 @@ void CSSRuleList::for_each_effective_style_rule(Function<void(CSSStyleRule const
}
}
bool CSSRuleList::for_first_not_loaded_import_rule(Function<void(CSSImportRule&)> const& callback)
{
for (auto& rule : m_rules) {
if (rule.type() == CSSRule::Type::Import) {
auto& import_rule = verify_cast<CSSImportRule>(rule);
if (!import_rule.has_import_result()) {
callback(import_rule);
return true;
}
if (import_rule.loaded_style_sheet()->for_first_not_loaded_import_rule(callback)) {
return true;
}
} else if (rule.type() == CSSRule::Type::Media) {
return verify_cast<CSSMediaRule>(rule).for_first_not_loaded_import_rule(callback);
} else if (rule.type() == CSSRule::Type::Supports) {
return verify_cast<CSSSupportsRule>(rule).for_first_not_loaded_import_rule(callback);
}
}
return false;
}
void CSSRuleList::evaluate_media_queries(DOM::Window const& window)
{
for (auto& rule : m_rules) {