mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +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
Notes:
sideshowbarker
2024-07-17 18:46:30 +09:00
Author: https://github.com/skyrising 🔰
Commit: 1ed5e79478
Pull-request: https://github.com/SerenityOS/serenity/pull/13048
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