summaryrefslogtreecommitdiff
path: root/render/box.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-07-13 18:07:12 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2014-07-13 18:07:12 +0100
commit0d3faeb4bd256883f4ec3fb4d391b9ceeec6866e (patch)
tree67d3bd7dc237b4b55fe24608f63e8b4e66452e40 /render/box.c
parent36411a2ba553d29e0805187c95d55e079bd2d9fe (diff)
downloadnetsurf-0d3faeb4bd256883f4ec3fb4d391b9ceeec6866e.tar.gz
netsurf-0d3faeb4bd256883f4ec3fb4d391b9ceeec6866e.tar.bz2
Allow suppression of style dump in box tree dumps.
Diffstat (limited to 'render/box.c')
-rw-r--r--render/box.c8
1 files changed, 4 insertions, 4 deletions
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);
}
}