mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 09:39:39 +00:00
LibWeb/CSS: Store CSSStyleSheet location as a URL
We already have a URL when we construct these, and we want a URL later, so avoid serializing and re-parsing it.
This commit is contained in:
parent
5cc371d54c
commit
da1ff1ba40
Notes:
github-actions[bot]
2025-04-09 17:48:14 +00:00
Author: https://github.com/AtkinsSJ
Commit: da1ff1ba40
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4285
Reviewed-by: https://github.com/tcl3 ✅
7 changed files with 20 additions and 12 deletions
|
@ -834,8 +834,8 @@ static void gather_style_sheets(Vector<Web::CSS::StyleSheetIdentifier>& results,
|
|||
}
|
||||
|
||||
if (valid) {
|
||||
if (auto location = sheet.location(); location.has_value())
|
||||
identifier.url = location.release_value();
|
||||
if (auto sheet_url = sheet.href(); sheet_url.has_value())
|
||||
identifier.url = sheet_url.release_value();
|
||||
|
||||
identifier.rule_count = sheet.rules().length();
|
||||
results.append(move(identifier));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue