summaryrefslogtreecommitdiff
path: root/render/html.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2010-04-07 13:12:27 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2010-04-07 13:12:27 +0000
commit9e52f105293de75402f76266ac6987e1c839965e (patch)
treed21c6320b843cd23eec8235d0ce0a2ff65805041 /render/html.c
parent4b54cca8b9abbc607cd146e31998cd62e9bfc80b (diff)
downloadnetsurf-9e52f105293de75402f76266ac6987e1c839965e.tar.gz
netsurf-9e52f105293de75402f76266ac6987e1c839965e.tar.bz2
Add encoding source getter.
svn path=/trunk/netsurf/; revision=10269
Diffstat (limited to 'render/html.c')
-rw-r--r--render/html.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/render/html.c b/render/html.c
index 760df52b9..880a92a3a 100644
--- a/render/html.c
+++ b/render/html.c
@@ -2036,6 +2036,22 @@ const char *html_get_encoding(hlcache_handle *h)
}
/**
+ * Retrieve the charset of an HTML document
+ *
+ * \param h Content to retrieve charset from
+ * \return Pointer to charset, or NULL
+ */
+binding_encoding_source html_get_encoding_source(hlcache_handle *h)
+{
+ struct content *c = hlcache_handle_get_content(h);
+
+ assert(c != NULL);
+ assert(c->type == CONTENT_HTML);
+
+ return c->data.html.encoding_source;
+}
+
+/**
* Retrieve framesets used in an HTML document
*
* \param h Content to inspect