Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibWeb: Always flush character insertions before exiting HTML parser #1469

Conversation

awesomekling
Copy link
Member

@awesomekling awesomekling commented Sep 21, 2024

This fixes an issue where document.write() with only text input would leave all the character data as unflushed text in the parser.

This fixes many of the WPT tests for document.write().

Tested with Meta/WPT.sh run html/webappapis/dynamic-markup-insertion/document-write

Before:

Ran 87 tests finished in 44.4 seconds.
  • 37 ran as expected. 0 tests skipped.
  • 1 tests crashed unexpectedly
  • 5 tests timed out unexpectedly
  • 48 tests had unexpected subtest results

After:

Ran 87 tests finished in 41.6 seconds.
  • 49 ran as expected. 0 tests skipped.
  • 2 tests crashed unexpectedly
  • 5 tests timed out unexpectedly
  • 35 tests had unexpected subtest results

Fixes #970

This fixes an issue where document.write() with only text input would
leave all the character data as unflushed text in the parser.

This fixes many of the WPT tests for document.write().
@AtkinsSJ
Copy link
Member

Fixes #970

@awesomekling awesomekling merged commit a0ed12e into LadybirdBrowser:master Sep 21, 2024
5 of 6 checks passed
@awesomekling awesomekling deleted the document-write-flush-character-insertions branch September 21, 2024 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

document.write does not write the text from the DevTools
2 participants