summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2012-08-20 16:03:45 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2012-08-20 16:03:45 +0100
commitdaf10f00a6c19ac279f53190bfaa39d04772809a (patch)
tree7d55924cb651a8131eac8320ce0760d3b03b9151
parent400ce416234e37889e2f2410f86d115373f39c82 (diff)
downloadnetsurf-daf10f00a6c19ac279f53190bfaa39d04772809a.tar.gz
netsurf-daf10f00a6c19ac279f53190bfaa39d04772809a.tar.bz2
API for content debug dump.
-rw-r--r--content/content.c10
-rw-r--r--content/content.h2
-rw-r--r--content/content_protected.h1
3 files changed, 13 insertions, 0 deletions
diff --git a/content/content.c b/content/content.c
index 57d370848..b65e110ec 100644
--- a/content/content.c
+++ b/content/content.c
@@ -762,6 +762,16 @@ bool content_drop_file_at_point(struct hlcache_handle *h,
}
+void content_debug_dump(struct hlcache_handle *h, FILE *f)
+{
+ struct content *c = hlcache_handle_get_content(h);
+ assert(c != 0);
+
+ if (c->handler->debug_dump != NULL)
+ c->handler->debug_dump(c, f);
+}
+
+
void content_add_error(struct content *c, const char *token,
unsigned int line)
{
diff --git a/content/content.h b/content/content.h
index 562bcd798..b07af4fe1 100644
--- a/content/content.h
+++ b/content/content.h
@@ -27,6 +27,7 @@
#define _NETSURF_CONTENT_CONTENT_H_
#include <stdbool.h>
+#include <stdio.h>
#include <libwapcaplet/libwapcaplet.h>
@@ -226,6 +227,7 @@ bool content_scroll_at_point(struct hlcache_handle *h,
int x, int y, int scrx, int scry);
bool content_drop_file_at_point(struct hlcache_handle *h,
int x, int y, char *file);
+void content_debug_dump(struct hlcache_handle *h, FILE *f);
struct content_rfc5988_link *content_find_rfc5988_link(struct hlcache_handle *c,
lwc_string *rel);
diff --git a/content/content_protected.h b/content/content_protected.h
index a52a51be9..36a053b56 100644
--- a/content/content_protected.h
+++ b/content/content_protected.h
@@ -71,6 +71,7 @@ struct content_handler {
int scrx, int scry);
bool (*drop_file_at_point)(struct content *c, int x, int y,
char *file);
+ void (*debug_dump)(struct content *c, FILE *f);
nserror (*clone)(const struct content *old, struct content **newc);
bool (*matches_quirks)(const struct content *c, bool quirks);
content_type (*type)(void);