mirror of
https://github.com/servo/servo
synced 2026-05-09 08:32:31 +02:00
This change makes it so that `<iframe>` sanboxing is equivalent to the one used for Content Security Policy, which is how the specification is written. In addition, these sandboxing flags are passed through to `<iframe>` `Document`s via `LoadData` and stored as `Document::creation_sandboxing_flag_set`. The flags are used to calculate the final `Document::active_sandboxing_flag_set` when loading a `Document`. This change makes it so that `<iframe>`s actually behave in a sandboxed way, the same way that `Document`s with CSP configurations do. For instance, now scripts and popups are blocked by default in `<iframe>`s with the `sandbox` attribute. Testing: This causes many WPT tests to start to pass or to move from ERROR to TIMEOUT or failing later. Some tests start to fail: - `/html/semantics/embedded-content/the-canvas-element/canvas-descendants-focusability-005.html`: This test uses a combination of `<iframe allow>` and Canvas fallback content, which we do not support. - `/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_other_frame_popup.sub.html`: This test is now failing because the iframe is sanboxed but in the ScriptThread now due to `allow-same-origin`. More implementation is needed to add support for the "one permitted sandbox navigator concept." Fixes: This is part of #31973. --------- Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
51 lines
1.5 KiB
TOML
51 lines
1.5 KiB
TOML
[package]
|
|
name = "script_traits"
|
|
version.workspace = true
|
|
authors.workspace = true
|
|
license.workspace = true
|
|
edition.workspace = true
|
|
publish.workspace = true
|
|
rust-version.workspace = true
|
|
|
|
[lib]
|
|
name = "script_traits"
|
|
path = "lib.rs"
|
|
|
|
[features]
|
|
bluetooth = ["bluetooth_traits"]
|
|
webgpu = ["webgpu_traits"]
|
|
|
|
[dependencies]
|
|
background_hang_monitor_api = { workspace = true }
|
|
base = { workspace = true }
|
|
bluetooth_traits = { workspace = true, optional = true }
|
|
canvas_traits = { workspace = true }
|
|
compositing_traits = { workspace = true }
|
|
constellation_traits = { workspace = true }
|
|
content-security-policy = { workspace = true }
|
|
crossbeam-channel = { workspace = true }
|
|
devtools_traits = { workspace = true }
|
|
embedder_traits = { workspace = true }
|
|
euclid = { workspace = true }
|
|
ipc-channel = { workspace = true }
|
|
keyboard-types = { workspace = true }
|
|
log = { workspace = true }
|
|
malloc_size_of = { workspace = true }
|
|
malloc_size_of_derive = { workspace = true }
|
|
media = { path = "../../media" }
|
|
net_traits = { workspace = true }
|
|
pixels = { path = "../../pixels" }
|
|
profile_traits = { workspace = true }
|
|
rustc-hash = { workspace = true }
|
|
serde = { workspace = true }
|
|
servo_config = { path = "../../config" }
|
|
servo_url = { path = "../../url" }
|
|
storage_traits = { workspace = true }
|
|
strum = { workspace = true, features = ["derive"] }
|
|
strum_macros = { workspace = true }
|
|
stylo_atoms = { workspace = true }
|
|
stylo_traits = { workspace = true }
|
|
webgpu_traits = { workspace = true, optional = true }
|
|
webrender_api = { workspace = true }
|
|
webxr-api = { workspace = true, features = ["ipc"] }
|