mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Exit process_stylesheet_resource if document isn't fully active
This change is required to fix crashing in `link-re-enable-crash.html` that is going to be introduced by switching to unbuffered fetching.
This commit is contained in:
parent
a79c995d8a
commit
fa46efae48
Notes:
github-actions[bot]
2025-11-20 11:31:30 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: fa46efae48
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6839
Reviewed-by: https://github.com/trflynn89 ✅
1 changed files with 3 additions and 0 deletions
|
|
@ -772,6 +772,9 @@ void HTMLLinkElement::process_icon_resource(bool success, Fetch::Infrastructure:
|
|||
// https://html.spec.whatwg.org/multipage/links.html#link-type-stylesheet:process-the-linked-resource
|
||||
void HTMLLinkElement::process_stylesheet_resource(bool success, Fetch::Infrastructure::Response const& response, ByteBuffer body_bytes)
|
||||
{
|
||||
if (!document().is_fully_active())
|
||||
return;
|
||||
|
||||
// 1. If the resource's Content-Type metadata is not text/css, then set success to false.
|
||||
auto mime_type_string = m_mime_type;
|
||||
Optional<String> mime_type_charset;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue