servo/components
Tim van der Lippe 4164f76769
Implement all trusted sinks in HTMLScriptElement (#36668)
As a follow-up to the recent introduction of `script.src`
as trusted sink, this PR refactors machinery to also
support `TrustedScript`. In doing so, all trusted sinks
in `HTMLScriptElement` are now covered.

Instead of calling the callbacks in `policy.createX`,
we now have a `TrustedType` enum that specifies which callback
to invoke. Unfortunately we still have the `USVString` vs
`DOMString` problem, which is why we need to `.map` twice
to retrieve the backing `String` and avoid two different
types.

Additionally, I saw that `script.text` should have called
the "String replace all" algorithm rather than setting the
child contents. So that's also now fixed.

Part of #36258
Requires servo/html5ever#608

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
2025-05-03 08:35:46 +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 canvas: rename snapshot(_data) to surface() -> SourceSurface/bytes() -> AsRef<[u8]> (#36793) 2025-05-01 14:18:56 +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 Fix build when webgpu feature is not enabled (#36804) 2025-05-02 11:33:28 +00:00
deny_public_fields Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
devtools Send info about the DocumentType node to the devtools inspector (#36787) 2025-05-01 06:37:23 +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: Simplify PositioningContext by having it hold a single Vec (#36795) 2025-05-02 12:20:11 +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 Remove lock around tokio-rt handle (#36762) 2025-04-30 07:09:38 +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 Implement all trusted sinks in HTMLScriptElement (#36668) 2025-05-03 08:35:46 +00:00
script_bindings Implement all trusted sinks in HTMLScriptElement (#36668) 2025-05-03 08:35:46 +00:00
servo libservo: Add a basic WebView API test (#36791) 2025-05-02 16:06:26 +00:00
servo_tracing [tracing] Add convenience macro for function tracing (#36573) 2025-04-22 19:58:20 +00:00
shared Remove HTMLCanvasDataSource and CanvasSource (#36794) 2025-05-01 17:49:59 +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 Establish baseline webdriver conformance results (#35024) 2025-05-01 21:13:27 +00:00
webgl Split webgl into separate crate (#36718) 2025-04-30 05:27:44 +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