servo/components/script/dom/servoparser
elomscansio 085ad9ea48
script_thread: HTML parser doesn't set relevant option (#36622)
This patch ensures that the Servo HTML parser uses the appropriate
`TreeBuilderOpts` settings
as specified by the HTML specification.

Changes:
- **iframe_srcdoc:** Detect if the parsed document's URL scheme is
`about:srcdoc`, and set the parser’s iframe_srcdoc option accordingly.
- **quirks_mode:** Use the associated Document's quirks mode to set the
parser’s quirks mode flag, improving fragment parsing behavior.
- **scripting_enabled:** Add a `scripting_enabled` method to Document,
based on whether it has a browsing context, and set this flag for the
parser.

These updates align Servo's parsing behavior more closely with the
specification:

https://html.spec.whatwg.org/multipage/parsing.html#the-initial-insertion-mode

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by
`[X]` when the step is complete, and replace `___` with appropriate
data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #35478

<!-- Either: -->
- [ ] There are tests for these changes

Signed-off-by: Emmanuel Elom <elomemmanuel007@gmail.com>
2025-04-27 20:23:22 +00:00
..
async_html.rs Use version of markup5ever with web_atoms crate (#36542) 2025-04-19 11:49:37 +00:00
html.rs script_thread: HTML parser doesn't set relevant option (#36622) 2025-04-27 20:23:22 +00:00
mod.rs Set correct policy-container for worker construction (#36603) 2025-04-21 12:47:06 +00:00
prefetch.rs Update FetchTaskTarget to propagate CSP violations. (#36409) 2025-04-13 20:54:59 +00:00
xml.rs Unify the way html5ever and xml5ever block on script elements (#36284) 2025-04-08 16:40:14 +00:00