diff options
author | Simon Wanner <skyrising@pvpctutorials.de> | 2022-03-20 19:11:03 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-20 19:57:09 +0100 |
commit | 69fc7009bfdaec1f52be7d2f072fb6742e45e64e (patch) | |
tree | 741f392fa4b9acbbdad3b4955f26034990396d33 /Userland/Libraries/LibWeb/DOMTreeModel.cpp | |
parent | a128d4931d11a8e14c52011946be125452616f1f (diff) | |
download | serenity-69fc7009bfdaec1f52be7d2f072fb6742e45e64e.zip |
LibWeb: Grey out invisible nodes in the DOM inspector
This makes it easier to navigate large DOM trees where
some nodes have display: none
Diffstat (limited to 'Userland/Libraries/LibWeb/DOMTreeModel.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/DOMTreeModel.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/DOMTreeModel.cpp b/Userland/Libraries/LibWeb/DOMTreeModel.cpp index cd8a9302f5..dbfca80b34 100644 --- a/Userland/Libraries/LibWeb/DOMTreeModel.cpp +++ b/Userland/Libraries/LibWeb/DOMTreeModel.cpp @@ -126,6 +126,8 @@ GUI::Variant DOMTreeModel::data(const GUI::ModelIndex& index, GUI::ModelRole rol return m_tree_view.palette().syntax_comment(); if (type == "pseudo-element"sv) return m_tree_view.palette().syntax_type(); + if (!node.get("visible").to_bool(true)) + return m_tree_view.palette().syntax_comment(); return {}; } |