From 0d3faeb4bd256883f4ec3fb4d391b9ceeec6866e Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sun, 13 Jul 2014 18:07:12 +0100 Subject: Allow suppression of style dump in box tree dumps. --- render/box.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'render/box.c') diff --git a/render/box.c b/render/box.c index 53f6c75d0..dd7c31f69 100644 --- a/render/box.c +++ b/render/box.c @@ -880,7 +880,7 @@ bool box_visible(struct box *box) * Print a box tree to a file. */ -void box_dump(FILE *stream, struct box *box, unsigned int depth) +void box_dump(FILE *stream, struct box *box, unsigned int depth, bool style) { unsigned int i; struct box *c, *prev; @@ -935,7 +935,7 @@ void box_dump(FILE *stream, struct box *box, unsigned int depth) } if (box->gadget) fprintf(stream, "(gadget) "); - if (box->style) + if (style && box->style) nscss_dump_computed_style(stream, box->style); if (box->href) fprintf(stream, " -> '%s'", nsurl_access(box->href)); @@ -971,7 +971,7 @@ void box_dump(FILE *stream, struct box *box, unsigned int depth) for (i = 0; i != depth; i++) fprintf(stream, " "); fprintf(stream, "list_marker:\n"); - box_dump(stream, box->list_marker, depth + 1); + box_dump(stream, box->list_marker, depth + 1, style); } for (c = box->children; c && c->next; c = c->next) @@ -988,7 +988,7 @@ void box_dump(FILE *stream, struct box *box, unsigned int depth) fprintf(stream, "warning: box->prev %p (should be " "%p) (box on next line)\n", c->prev, prev); - box_dump(stream, c, depth + 1); + box_dump(stream, c, depth + 1, style); } } -- cgit v1.2.3