mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Hide servo internal shadow roots from the inspector by default (#35958)
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
4a9967725f
commit
e627ac5cfd
5 changed files with 27 additions and 4 deletions
|
@ -14,6 +14,7 @@ use devtools_traits::{
|
|||
use ipc_channel::ipc::IpcSender;
|
||||
use js::jsval::UndefinedValue;
|
||||
use js::rust::ToString;
|
||||
use servo_config::pref;
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::document_collection::DocumentCollection;
|
||||
|
@ -162,7 +163,11 @@ pub(crate) fn handle_get_children(
|
|||
|
||||
let mut children = vec![];
|
||||
if let Some(shadow_root) = parent.downcast::<Element>().and_then(Element::shadow_root) {
|
||||
children.push(shadow_root.upcast::<Node>().summarize());
|
||||
if !shadow_root.is_user_agent_widget() ||
|
||||
pref!(inspector_show_servo_internal_shadow_roots)
|
||||
{
|
||||
children.push(shadow_root.upcast::<Node>().summarize());
|
||||
}
|
||||
}
|
||||
let children_iter = parent.children().enumerate().filter_map(|(i, child)| {
|
||||
// Filter whitespace only text nodes that are not inline level
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue