mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-02 20:42:11 +02:00
LibWeb: Let HTML parser handle EOF inserted by document.close()
Before this change, the explicit EOF inserted by document.close() would instantly abort the parser. This meant that parsing algorithms that ran as part of the parser unwinding on EOF would never actually run. 591 new passes in WPT/html/syntax/parsing/ :^) This exposed a problem where the parser would try to insert a root <html> element on EOF in a document where someone already inserted such an element via direct DOM manipulation. The parser now gracefully handles this scenario. It's covered by existing tests (which would crash without this change.)
This commit is contained in:
committed by
Andreas Kling
parent
dc652aee75
commit
6f7b865cd1
Notes:
github-actions[bot]
2025-02-20 13:33:49 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/6f7b865cd1e Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3626 Reviewed-by: https://github.com/shannonbooth
@@ -2,9 +2,8 @@ Harness status: OK
|
||||
|
||||
Found 4 tests
|
||||
|
||||
3 Pass
|
||||
1 Fail
|
||||
Fail document.open() sets document to no-quirks mode (write no doctype)
|
||||
4 Pass
|
||||
Pass document.open() sets document to no-quirks mode (write no doctype)
|
||||
Pass document.open() sets document to no-quirks mode (write old doctype)
|
||||
Pass document.open() sets document to no-quirks mode (write new doctype)
|
||||
Pass document.open() sets document to no-quirks mode, not limited-quirks mode
|
||||
Reference in New Issue
Block a user