summaryrefslogtreecommitdiff
path: root/content/handlers
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2019-07-10 16:42:52 +0100
committerVincent Sanders <vince@kyllikki.org>2019-07-10 16:42:52 +0100
commitc2fa6af0ff4098501560bd48f78dfbf9173f4021 (patch)
treeffceab0862b8c5e59c74a5ef26b38e051ec0ce50 /content/handlers
parentf46b77160a0244b83ccd486df82ce14f7a4df59e (diff)
downloadnetsurf-c2fa6af0ff4098501560bd48f78dfbf9173f4021.tar.gz
netsurf-c2fa6af0ff4098501560bd48f78dfbf9173f4021.tar.bz2
make content close check the content status itself
make content handler open and close return error status
Diffstat (limited to 'content/handlers')
-rw-r--r--content/handlers/html/html.c8
-rw-r--r--content/handlers/javascript/content.c5
-rw-r--r--content/handlers/text/textplain.c8
3 files changed, 15 insertions, 6 deletions
diff --git a/content/handlers/html/html.c b/content/handlers/html/html.c
index 57f2e42da..a27ebd79a 100644
--- a/content/handlers/html/html.c
+++ b/content/handlers/html/html.c
@@ -1774,7 +1774,7 @@ static nserror html_clone(const struct content *old, struct content **newc)
* Handle a window containing a CONTENT_HTML being opened.
*/
-static void
+static nserror
html_open(struct content *c,
struct browser_window *bw,
struct content *page,
@@ -1794,6 +1794,8 @@ html_open(struct content *c,
html->selection_owner.none = true;
html_object_open_objects(html, bw);
+
+ return NSERROR_OK;
}
@@ -1801,7 +1803,7 @@ html_open(struct content *c,
* Handle a window containing a CONTENT_HTML being closed.
*/
-static void html_close(struct content *c)
+static nserror html_close(struct content *c)
{
html_content *htmlc = (html_content *) c;
@@ -1822,6 +1824,8 @@ static void html_close(struct content *c)
/* remove all object references from the html content */
html_object_close_objects(htmlc);
+
+ return NSERROR_OK;
}
diff --git a/content/handlers/javascript/content.c b/content/handlers/javascript/content.c
index ef5614094..2cb5ecd6f 100644
--- a/content/handlers/javascript/content.c
+++ b/content/handlers/javascript/content.c
@@ -16,8 +16,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/** \file
- * Content for javascript (implementation)
+/**
+ * \file
+ * javascript content implementation
*/
#include <assert.h>
diff --git a/content/handlers/text/textplain.c b/content/handlers/text/textplain.c
index 9e9e3e9e0..546301ffd 100644
--- a/content/handlers/text/textplain.c
+++ b/content/handlers/text/textplain.c
@@ -1204,7 +1204,7 @@ textplain_redraw(struct content *c,
/**
* Handle a window containing a CONTENT_TEXTPLAIN being opened.
*/
-static void
+static nserror
textplain_open(struct content *c,
struct browser_window *bw,
struct content *page,
@@ -1216,13 +1216,15 @@ textplain_open(struct content *c,
/* text selection */
selection_init(&text->sel, NULL, NULL);
+
+ return NSERROR_OK;
}
/**
* Handle a window containing a CONTENT_TEXTPLAIN being closed.
*/
-static void textplain_close(struct content *c)
+static nserror textplain_close(struct content *c)
{
textplain_content *text = (textplain_content *) c;
@@ -1231,6 +1233,8 @@ static void textplain_close(struct content *c)
}
text->bw = NULL;
+
+ return NSERROR_OK;
}