ladybird/Userland/Libraries/LibWeb/HTML/Parser
Shannon Booth 4135c3885c LibWeb: Only wait for document to be ready for scripts if executing one
HTML fragments are parsed with a temporary HTML document that never has
its flag set to say that it is ready to have scripts executed. For these
fragments, in the HTMLParser, these scripts are prepared, but
execute_script is never called on them.

This results in the HTMLParser waiting forever on the document to be
ready to have scripts executed.

To fix this, only wait for the document to be ready if we are definitely
going to execute a script.

This fixes a hang processing the HTML in the attached test, as seen on:
https://github.com/SerenityOS/serenity

Fixes: #22735
2024-01-14 11:27:58 +00:00
..
Entities.cpp Everywhere: Use nested namespace qualifiers 2023-07-12 10:05:42 +03:30
Entities.h Everywhere: Use nested namespace qualifiers 2023-07-12 10:05:42 +03:30
HTMLEncodingDetection.cpp LibWeb: Fix utf16-be check in HTMLEncodingDetection 2024-01-08 23:35:09 +01:00
HTMLEncodingDetection.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
HTMLParser.cpp LibWeb: Only wait for document to be ready for scripts if executing one 2024-01-14 11:27:58 +00:00
HTMLParser.h LibWeb: Make HTMLParser::the_end() callable from outside 2023-12-26 18:35:29 +01:00
HTMLToken.cpp LibWeb: Port HTMLToken::to_deprecated_string to new AK String 2023-11-06 11:37:08 +01:00
HTMLToken.h LibWeb: Return an Optional<String> from HTMLToken::attribute 2023-11-11 08:50:25 +01:00
HTMLTokenizer.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
HTMLTokenizer.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
ListOfActiveFormattingElements.cpp LibWeb: Port Element::local_name and TagNames from Deprecated String 2023-10-03 14:47:53 +01:00
ListOfActiveFormattingElements.h LibWeb: Port Element::local_name and TagNames from Deprecated String 2023-10-03 14:47:53 +01:00
StackOfOpenElements.cpp LibWeb: Pass DOM namespace strings as FlyString in more places 2023-11-04 21:28:30 +01:00
StackOfOpenElements.h LibWeb: Port Element::local_name and TagNames from Deprecated String 2023-10-03 14:47:53 +01:00