mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:07:44 +00:00
LibWeb: Ignore linked stylesheets with MIME types other than text/css
This makes the "Acid3" text on ACID3 not show up in red. :^)
This commit is contained in:
parent
2b7775118d
commit
02497888a6
1 changed files with 5 additions and 0 deletions
|
@ -90,6 +90,11 @@ void HTMLLinkElement::resource_did_load()
|
||||||
dbgln_if(CSS_LOADER_DEBUG, "HTMLLinkElement: Resource did load, no encoded data. URL: {}", resource()->url());
|
dbgln_if(CSS_LOADER_DEBUG, "HTMLLinkElement: Resource did load, no encoded data. URL: {}", resource()->url());
|
||||||
} else {
|
} else {
|
||||||
dbgln_if(CSS_LOADER_DEBUG, "HTMLLinkElement: Resource did load, has encoded data. URL: {}", resource()->url());
|
dbgln_if(CSS_LOADER_DEBUG, "HTMLLinkElement: Resource did load, has encoded data. URL: {}", resource()->url());
|
||||||
|
|
||||||
|
if (resource()->mime_type() != "text/css"sv) {
|
||||||
|
dbgln_if(CSS_LOADER_DEBUG, "HTMLLinkElement: Resource did load, but MIME type was {} instead of text/css. URL: {}", resource()->mime_type(), resource()->url());
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto sheet = parse_css(CSS::ParsingContext(document(), resource()->url()), resource()->encoded_data());
|
auto sheet = parse_css(CSS::ParsingContext(document(), resource()->url()), resource()->encoded_data());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue