Closed
Bug 2045219
Opened 4 months ago
Closed 4 months ago
Improve the dump result of `nsINode`
Categories
(Core :: DOM: Core & HTML, task)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
153 Branch
| Tracking | Status | |
|---|---|---|
| firefox153 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(1 file)
The current result is not enough for me and its reference cannot be used with fmt::format directly.
| Assignee | ||
Comment 1•4 months ago
|
||
Currently, operator<<(std::ostram&, const nsINode&) prints the path
of the node with some attribute information of each node. However, there
are some issues:
- It's unclear if the reached root is a
DocumentFragmentor
ShadowRootdue to the same node name,#document-fragment. - Do not print the host's path.
- Cannot print only in a specific node such as a
contenteditable. - It's hard to consider which
Textif a node has multipleText
nodes. - No information about the assigned
<slot>. - No information about
EditContext.
This patch appends these information to each node. Additionally, adding
format_as() for avoiding to use mozilla::ToString for fmt::format
and MOZ_LOG_FMT.
Finally, to test the new data, this makes Selection and SelectionAPI
log use MOZ_LOG_FMT.
Pushed by masayuki@d-toybox.com:
https://github.com/mozilla-firefox/firefox/commit/821c05533a2b
https://hg.mozilla.org/integration/autoland/rev/290c377062c6
Improve the debug print of `nsINode` r=smaug,dom-core-reviewers
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
status-firefox153:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch
Updated•3 months ago
|
QA Whiteboard: [qa-triage-done-c154/b153]
You need to log in
before you can comment on or make changes to this bug.
Description
•