Inform the devtools about shadow roots on a node (#35294)

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-02-05 14:16:36 +01:00 committed by GitHub
parent 2bd96633d4
commit 09bfaf51b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 108 additions and 35 deletions

View file

@ -11,6 +11,7 @@ use style::shared_lock::SharedRwLockReadGuard;
use style::stylesheets::Stylesheet;
use style::stylist::{CascadeData, Stylist};
use crate::conversions::Convert;
use crate::dom::bindings::cell::DomRefCell;
use crate::dom::bindings::codegen::Bindings::ShadowRootBinding::ShadowRoot_Binding::ShadowRootMethods;
use crate::dom::bindings::codegen::Bindings::ShadowRootBinding::{
@ -421,3 +422,12 @@ impl<'dom> LayoutShadowRootHelpers<'dom> for LayoutDom<'dom, ShadowRoot> {
}
}
}
impl Convert<devtools_traits::ShadowRootMode> for ShadowRootMode {
fn convert(self) -> devtools_traits::ShadowRootMode {
match self {
ShadowRootMode::Open => devtools_traits::ShadowRootMode::Open,
ShadowRootMode::Closed => devtools_traits::ShadowRootMode::Closed,
}
}
}