servo/components
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
..
allocator Organize component Cargo.toml dependencies (#36224) 2025-03-30 19:03:54 +00:00
background_hang_monitor Organize component Cargo.toml dependencies (#36224) 2025-03-30 19:03:54 +00:00
bluetooth Replace bluetooth Readme with corrected version from devices repository (#36429) 2025-04-10 18:02:45 +00:00
canvas Introduce snapshot concept of canvas (#36119) 2025-04-23 07:32:47 +00:00
compositing compositor: Tick animations for an entire WebView at once (#36662) 2025-04-24 19:03:14 +00:00
config Remove unused pref: dom_forcetouch_enabled (#36524) 2025-04-15 02:18:11 +00:00
constellation compositor: Tick animations for an entire WebView at once (#36662) 2025-04-24 19:03:14 +00:00
deny_public_fields Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
devtools DevTools: Move Source related code to dedicated source.rs file (#36667) 2025-04-24 07:50:56 +00:00
dom_struct script: Feature-gate all crown support. (#35055) 2025-01-18 21:36:15 +00:00
domobject_derive Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
fonts layout: Report memory usage for fragment and box trees. (#36553) 2025-04-18 20:05:15 +00:00
geometry servoshell: Allow overriding screen resolution with a command-line argument (#34038) 2024-10-30 11:54:13 +00:00
hyper_serde Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
jstraceable_derive Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
layout layout: Use box tree Fragments for offset parent queries (#36681) 2025-04-25 20:25:10 +00:00
malloc_size_of script: Measure stored layout data memory usage. (#36664) 2025-04-24 12:01:51 +00:00
media compositing: Combine webrender_traits and compositing_traits (#36372) 2025-04-06 17:34:18 +00:00
metrics Move ScriptToConstellationMsg to constellation_traits (#36364) 2025-04-05 22:13:29 +00:00
net Support CSP report-only header (#36623) 2025-04-25 19:59:44 +00:00
pixels Introduce snapshot concept of canvas (#36119) 2025-04-23 07:32:47 +00:00
profile Make the memory reporting multi-process aware (#35863) 2025-04-05 05:42:12 +00:00
rand Migrate to the 2024 edition (#35755) 2025-03-13 10:28:11 +00:00
range Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
script script_thread: HTML parser doesn't set relevant option (#36622) 2025-04-27 20:23:22 +00:00
script_bindings Implement static Response.json (#36589) 2025-04-25 08:49:21 +00:00
servo [tracing] Add convenience macro for function tracing (#36573) 2025-04-22 19:58:20 +00:00
servo_tracing [tracing] Add convenience macro for function tracing (#36573) 2025-04-22 19:58:20 +00:00
shared layout: Use box tree Fragments for offset parent queries (#36681) 2025-04-25 20:25:10 +00:00
timers Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
url Check all ancestor navigable trustworthiness for mixed content (#36157) 2025-04-05 05:38:24 +00:00
webdriver_server Report exceptions for async script executions to webdriver (#27041) 2025-04-25 06:50:00 +00:00
webgpu Introduce snapshot concept of canvas (#36119) 2025-04-23 07:32:47 +00:00
webxr libservo: Expose a ServoBuilder (#36549) 2025-04-16 16:58:52 +00:00