mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 01:59:31 +00:00
LibWeb+WebContent: Include rule count in listed CSS style sheets
This commit is contained in:
parent
576eede2b1
commit
cf601a49bb
Notes:
github-actions[bot]
2025-03-13 20:57:30 +00:00
Author: https://github.com/trflynn89
Commit: cf601a49bb
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3920
3 changed files with 12 additions and 3 deletions
|
@ -896,6 +896,7 @@ static void gather_style_sheets(Vector<Web::CSS::StyleSheetIdentifier>& results,
|
|||
if (auto location = sheet.location(); location.has_value())
|
||||
identifier.url = location.release_value();
|
||||
|
||||
identifier.rule_count = sheet.rules().length();
|
||||
results.append(move(identifier));
|
||||
}
|
||||
|
||||
|
@ -904,8 +905,10 @@ static void gather_style_sheets(Vector<Web::CSS::StyleSheetIdentifier>& results,
|
|||
gather_style_sheets(results, *import_rule->loaded_style_sheet());
|
||||
} else {
|
||||
// We can gather this anyway, and hope it loads later
|
||||
results.append({ .type = Web::CSS::StyleSheetIdentifier::Type::ImportRule,
|
||||
.url = import_rule->url().to_string() });
|
||||
results.append({
|
||||
.type = Web::CSS::StyleSheetIdentifier::Type::ImportRule,
|
||||
.url = import_rule->url().to_string(),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue