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:
Sam Atkins 2025-04-08 13:18:56 +01:00 committed by Tim Ledbetter
parent 5cc371d54c
commit da1ff1ba40
Notes: github-actions[bot] 2025-04-09 17:48:14 +00:00
7 changed files with 20 additions and 12 deletions

View file

@ -492,7 +492,7 @@ void HTMLLinkElement::process_stylesheet_resource(bool success, Fetch::Infrastru
if (m_loaded_style_sheet) {
Optional<String> location;
if (!response.url_list().is_empty())
location = response.url_list().first().to_string();
location = response.url_list().first();
document_or_shadow_root_style_sheets().create_a_css_style_sheet(
"text/css"_string,