mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +00:00
LibWeb: Execute the correct script in XMLDocumentBuilder::element_end()
We were mistakenly executing the current node's script instead of the document's pending parsing-blocking script. This caused ~1000 WPT tests to time out, since we never ended up firing a load event for XHTML pages that load multiple external scripts.
This commit is contained in:
committed by
Andreas Kling
parent
b011d47b86
commit
007c292af3
@@ -536,7 +536,7 @@ void HTMLScriptElement::prepare_script()
|
||||
// 5. Otherwise:
|
||||
else {
|
||||
// 1. Set el's parser document's pending parsing-blocking script to el.
|
||||
m_parser_document->set_pending_parsing_blocking_script({}, this);
|
||||
m_parser_document->set_pending_parsing_blocking_script(this);
|
||||
|
||||
// FIXME: 2. Block rendering on el.
|
||||
|
||||
@@ -563,7 +563,7 @@ void HTMLScriptElement::prepare_script()
|
||||
&& is_parser_inserted()
|
||||
&& m_parser_document->has_a_style_sheet_that_is_blocking_scripts()) {
|
||||
// 1. Set el's parser document's pending parsing-blocking script to el.
|
||||
m_parser_document->set_pending_parsing_blocking_script({}, this);
|
||||
m_parser_document->set_pending_parsing_blocking_script(this);
|
||||
|
||||
// 2. Set el's ready to be parser-executed to true. (The parser will handle executing the script.)
|
||||
m_ready_to_be_parser_executed = true;
|
||||
|
||||
Reference in New Issue
Block a user