diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-11-06 22:51:46 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-11-06 22:51:46 +0000 |
commit | 8c2cfecfb5e83d023609914dd101c23777fd2906 (patch) | |
tree | df076fe2b22f0ecc6ec97d32a6b59f8ffa278d9b /render/html.c | |
parent | 46f369ca9ee79af5e7a121551fe9715101d27395 (diff) | |
download | netsurf-8c2cfecfb5e83d023609914dd101c23777fd2906.tar.gz netsurf-8c2cfecfb5e83d023609914dd101c23777fd2906.tar.bz2 |
Allow content handlers to have debug values set through API
Previously content handler debugging features were accessed by global
variables. This allows the setting of debugging parameters via a
content API giving per content control over debugging features.
Currently only used by the html content handler to toggle global
redraw debugging.
Diffstat (limited to 'render/html.c')
-rw-r--r-- | render/html.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/render/html.c b/render/html.c index d4ce3366f..4e9347aa5 100644 --- a/render/html.c +++ b/render/html.c @@ -1978,10 +1978,26 @@ static bool html_drop_file_at_point(struct content *c, int x, int y, char *file) /** + * set debug status. + * + * \param c The content to debug + * \param op The debug operation type + */ +static nserror +html_debug(struct content *c, enum content_debug op) +{ + html_redraw_debug = !html_redraw_debug; + + return NSERROR_OK; +} + + +/** * Dump debug info concerning the html_content * - * \param bw The browser window + * \param c The content to debug * \param f The file to dump to + * \param op The debug dump type */ static nserror html_debug_dump(struct content *c, FILE *f, enum content_debug op) @@ -2261,6 +2277,7 @@ static const content_handler html_content_handler = { .search = html_search, .search_clear = html_search_clear, .debug_dump = html_debug_dump, + .debug = html_debug, .clone = html_clone, .get_encoding = html_encoding, .type = html_content_type, |