servo/components/script
Simon Wülker 5a5d796988
Implement ServoLayoutNode::traversal_parent (#35338)
This fixes common crash related to slottables, currently present on wpt.fyi.

Previously, the traversal parent of `Text` nodes was incorrectly
assumed to always be the parent or shadow host. That caused crashes
inside stylo's bloom filter. Now the traversal parent is the slot
that the node is assigned to, if any, and the parent/shadow host otherwise.

The slottable data for Text/Element nodes is now stored in NodeRareData.
This is very cheap, because NodeRareData will already be instantiated
for assigned slottables anyways, because the containing_shadow_root
field will be set (since assigned slottables are always in a shadow
tree). This change is necessary because we need to hand out references
to the assigned slot to stylo and that is not possible to do (without
unsafe code) if we need to downcast the node first.

As a side effect, this reduces the size of `Text` from 256 to 232 bytes,
because the slottable data is no longer stored there.

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-02-07 01:05:27 +00:00
..
docs Update branch name to main (#30877) 2023-12-16 09:32:20 +00:00
dom Implement ServoLayoutNode::traversal_parent (#35338) 2025-02-07 01:05:27 +00:00
layout_dom Implement ServoLayoutNode::traversal_parent (#35338) 2025-02-07 01:05:27 +00:00
xpath script: Limit public exports. (#34915) 2025-01-10 08:19:19 +00:00
animation_timeline.rs script: Limit public exports. (#34915) 2025-01-10 08:19:19 +00:00
animations.rs Implement Event propagation across shadow roots (#34884) 2025-01-22 15:25:16 +00:00
body.rs Move various reflector types and traits to script_bindings (#35279) 2025-02-04 06:58:08 +00:00
build.rs script: Move code generation and webidl files to new script_bindings crate. (#35157) 2025-01-24 20:47:43 +00:00
canvas_state.rs Update pixels::unmultiply_inplace to support RB swap and use it in canvas_state (#35313) 2025-02-06 05:02:49 +00:00
Cargo.toml Use aws-lc-rs as rust-tls provider (#35106) 2025-01-30 19:10:49 +00:00
clipboard_provider.rs Include WebViewId into EmbedderMsg variants where possible (#35211) 2025-01-30 11:15:35 +00:00
conversions.rs script: Limit public exports. (#34915) 2025-01-10 08:19:19 +00:00
devtools.rs Inform the devtools about shadow roots on a node (#35294) 2025-02-05 13:16:36 +00:00
document_collection.rs script: Feature-gate all crown support. (#35055) 2025-01-18 21:36:15 +00:00
document_loader.rs script: Feature-gate all crown support. (#35055) 2025-01-18 21:36:15 +00:00
drag_data_store.rs DataTransfer: propagate CanGc argument (#35062) 2025-01-18 18:24:49 +00:00
fetch.rs Add support for Upgrade request to a potentially trustworthy URL. (#34986) 2025-02-05 12:49:56 +00:00
iframe_collection.rs script: Feature-gate all crown support. (#35055) 2025-01-18 21:36:15 +00:00
init.rs Make generated bindings generic over DOM types (#35169) 2025-01-25 05:08:49 +00:00
layout_image.rs Move various reflector types and traits to script_bindings (#35279) 2025-02-04 06:58:08 +00:00
lib.rs Update pixels::unmultiply_inplace to support RB swap and use it in canvas_state (#35313) 2025-02-06 05:02:49 +00:00
links.rs Add support for Upgrade request to a potentially trustworthy URL. (#34986) 2025-02-05 12:49:56 +00:00
mem.rs script: Limit public exports. (#34915) 2025-01-10 08:19:19 +00:00
messaging.rs script_traits: Rename ConstellationControlMsg to ScriptThreadMessage (#35226) 2025-01-30 22:46:17 +00:00
microtask.rs Fire slot change events when the slot content changes (#35137) 2025-01-27 14:13:22 +00:00
navigation.rs Add support for Upgrade request to a potentially trustworthy URL. (#34986) 2025-02-05 12:49:56 +00:00
network_listener.rs script: Limit public exports. (#34915) 2025-01-10 08:19:19 +00:00
realms.rs script: Limit public exports. (#34915) 2025-01-10 08:19:19 +00:00
script_module.rs Move various reflector types and traits to script_bindings (#35279) 2025-02-04 06:58:08 +00:00
script_runtime.rs Move more foundational types to script_bindings (#35280) 2025-02-04 10:36:30 +00:00
script_thread.rs Add support for Upgrade request to a potentially trustworthy URL. (#34986) 2025-02-05 12:49:56 +00:00
security_manager.rs Move various reflector types and traits to script_bindings (#35279) 2025-02-04 06:58:08 +00:00
serviceworker_manager.rs api: Flatten and simplify Servo preferences (#34966) 2025-01-14 13:54:06 +00:00
stylesheet_loader.rs Add support for Upgrade request to a potentially trustworthy URL. (#34986) 2025-02-05 12:49:56 +00:00
stylesheet_set.rs script: Limit public exports. (#34915) 2025-01-10 08:19:19 +00:00
task.rs script: Limit public exports. (#34915) 2025-01-10 08:19:19 +00:00
task_manager.rs Implement HTMLCanvasElement.toBlob (#34938) 2025-01-10 19:04:42 +00:00
task_queue.rs script: Limit public exports. (#34915) 2025-01-10 08:19:19 +00:00
task_source.rs Implement HTMLCanvasElement.toBlob (#34938) 2025-01-10 19:04:42 +00:00
test.rs script: Limit public exports. (#34915) 2025-01-10 08:19:19 +00:00
textinput.rs Include WebViewId into EmbedderMsg variants where possible (#35211) 2025-01-30 11:15:35 +00:00
timers.rs Move various reflector types and traits to script_bindings (#35279) 2025-02-04 06:58:08 +00:00
unminify.rs script: Limit public exports. (#34915) 2025-01-10 08:19:19 +00:00
webdriver_handlers.rs Move various reflector types and traits to script_bindings (#35279) 2025-02-04 06:58:08 +00:00
window_named_properties.rs script: Limit public exports. (#34915) 2025-01-10 08:19:19 +00:00