mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:38:11 +00:00
LibWeb: Fix resolving relative URLs in style sheets
Relative URLs in style sheets should be resolved relative to the style sheet they're in instead of the document.
This commit is contained in:
parent
a37bee919a
commit
1ed5e79478
4 changed files with 14 additions and 3 deletions
|
@ -90,7 +90,7 @@ void HTMLLinkElement::resource_did_load()
|
|||
dbgln_if(CSS_LOADER_DEBUG, "HTMLLinkElement: Resource did load, has encoded data. URL: {}", resource()->url());
|
||||
}
|
||||
|
||||
auto sheet = parse_css(CSS::ParsingContext(document()), resource()->encoded_data());
|
||||
auto sheet = parse_css(CSS::ParsingContext(document(), resource()->url()), resource()->encoded_data());
|
||||
if (!sheet) {
|
||||
dbgln_if(CSS_LOADER_DEBUG, "HTMLLinkElement: Failed to parse stylesheet: {}", resource()->url());
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue