summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2017-04-26 15:20:31 +0100
committerMichael Drake <michael.drake@codethink.co.uk>2017-04-26 15:20:31 +0100
commitebcc27c330654d4408bd3aec34795f849c07e02f (patch)
treeb45384c6569163de9f2083c1f2d0799798f434bd /render
parent4b76d2096d4622fed8641b24f9dfe4ce782e307e (diff)
downloadnetsurf-ebcc27c330654d4408bd3aec34795f849c07e02f.tar.gz
netsurf-ebcc27c330654d4408bd3aec34795f849c07e02f.tar.bz2
Box tree dump: If box has element, include element name in dump.
Diffstat (limited to 'render')
-rw-r--r--render/box.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/render/box.c b/render/box.c
index 11a24e797..77cc15bc3 100644
--- a/render/box.c
+++ b/render/box.c
@@ -1048,7 +1048,7 @@ void box_dump(FILE *stream, struct box *box, unsigned int depth, bool style)
if (box->title)
fprintf(stream, " [%s]", box->title);
if (box->id)
- fprintf(stream, " <%s>", lwc_string_data(box->id));
+ fprintf(stream, " ID:%s", lwc_string_data(box->id));
if (box->type == BOX_INLINE || box->type == BOX_INLINE_END)
fprintf(stream, " inline_end %p", box->inline_end);
if (box->float_children)
@@ -1071,6 +1071,13 @@ void box_dump(FILE *stream, struct box *box, unsigned int depth, bool style)
box->col[i].min, box->col[i].max);
fprintf(stream, ")");
}
+ if (box->node != NULL) {
+ dom_string *name;
+ if (dom_node_get_node_name(box->node, &name) == DOM_NO_ERR) {
+ fprintf(stream, " <%s>", dom_string_data(name));
+ dom_string_unref(name);
+ }
+ }
fprintf(stream, "\n");
if (box->list_marker) {