From ebcc27c330654d4408bd3aec34795f849c07e02f Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 26 Apr 2017 15:20:31 +0100 Subject: Box tree dump: If box has element, include element name in dump. --- render/box.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'render') 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) { -- cgit v1.2.3