diff options
author | Andreas Kling <kling@serenityos.org> | 2021-11-02 19:20:57 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-02 22:30:06 +0100 |
commit | 5db51d85a3d8503766f84a092252439510986357 (patch) | |
tree | 4991a427d82bf8c4529ac1c3a10de254801d6e09 /Userland/Libraries/LibWeb/DOM/Node.h | |
parent | b83e3fd01d9415f092cb0f46eceebb27a04d6a04 (diff) | |
download | serenity-5db51d85a3d8503766f84a092252439510986357.zip |
LibWeb: Hide uninteresting whitespace text nodes from DOM inspector
Use a simple heuristic to exclude uninteresting whitespace and
de-clutter the inspector's DOM tree.
Uninteresting whitespace is currently one of these:
- Non-rendered whitespace-only text nodes
- Rendered whitespace-only text nodes between block-level elements
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM/Node.h')
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/Node.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Node.h b/Userland/Libraries/LibWeb/DOM/Node.h index cc4fa09e84..c8a85b88a6 100644 --- a/Userland/Libraries/LibWeb/DOM/Node.h +++ b/Userland/Libraries/LibWeb/DOM/Node.h @@ -202,6 +202,8 @@ public: NonnullRefPtr<Node> get_root_node(GetRootNodeOptions const& options = {}); + bool is_uninteresting_whitespace_node() const; + protected: Node(Document&, NodeType); |