DevTools: Inline text and clean whitespace (#32884)

* feat: inline text contents

Signed-off-by: eri <eri@inventati.org>

* feat: filter whitespace only nodes

Signed-off-by: eri <eri@inventati.org>

* chore: cleanup

Signed-off-by: eri <eri@inventati.org>

* fix: url fix

Signed-off-by: eri <eri@inventati.org>

* fix: review fixes

Signed-off-by: eri <eri@inventati.org>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>

---------

Signed-off-by: eri <eri@inventati.org>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
eri 2024-07-30 12:18:21 +02:00 committed by GitHub
parent e23dc0bf6f
commit c06a6a764e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 86 additions and 5 deletions

View file

@ -1123,6 +1123,7 @@ impl Node {
node_type,
is_top_level_document: node_type == NodeConstants::DOCUMENT_NODE,
node_name: String::from(self.NodeName()),
node_value: self.GetNodeValue().map(|v| v.into()),
num_children: self.ChildNodes().Length() as usize,
attrs: self.downcast().map(Element::summarize).unwrap_or(vec![]),
}