mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-05 00:21:52 +00:00
LibWeb: Remember when HTML parser should ignore next line feed character
There's a quirk in HTML where the parser should ignore any line feed character immediately following a `pre` or `textarea` start tag. This was working fine when we could peek ahead in the input stream and see the next token, but didn't work in character-at-a-time parsing with document.write(). This commit adds the "can ignore next line feed character" as a parser flag that is maintained across invocations, making it work in this parsing mode as well. 20 new passes in WPT/html/syntax/parsing/ :^)
This commit is contained in:
parent
611833429a
commit
550613e526
Notes:
github-actions[bot]
2025-02-20 13:33:19 +00:00
Author: https://github.com/awesomekling
Commit: 550613e526
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3626
Reviewed-by: https://github.com/shannonbooth
11 changed files with 51 additions and 61 deletions
|
@ -187,6 +187,8 @@ private:
|
|||
|
||||
HTMLTokenizer m_tokenizer;
|
||||
|
||||
bool m_next_line_feed_can_be_ignored { false };
|
||||
|
||||
bool m_foster_parenting { false };
|
||||
bool m_frameset_ok { true };
|
||||
bool m_parsing_fragment { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue