diff options
author | Vincent Sanders <vince@kyllikki.org> | 2020-05-23 18:39:25 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2020-05-23 23:00:08 +0100 |
commit | 36b9262e1481fc24d302b58f03006e733b2e6d16 (patch) | |
tree | a2189e438023c837d8b8949b7c38e54fa143cab1 /content/handlers/html/html.c | |
parent | 0432d9556187d00fd7f78963afcefc4b7dd71f2a (diff) | |
download | netsurf-36b9262e1481fc24d302b58f03006e733b2e6d16.tar.gz netsurf-36b9262e1481fc24d302b58f03006e733b2e6d16.tar.bz2 |
split selection redraw into content handler specific implementations
Diffstat (limited to 'content/handlers/html/html.c')
-rw-r--r-- | content/handlers/html/html.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/content/handlers/html/html.c b/content/handlers/html/html.c index 33320aa7b..2a3cb1774 100644 --- a/content/handlers/html/html.c +++ b/content/handlers/html/html.c @@ -70,6 +70,7 @@ #include "html/form_internal.h" #include "html/imagemap.h" #include "html/layout.h" +#include "html/textselection.h" #define CHUNK 4096 @@ -2304,26 +2305,6 @@ html_textsearch_bounds(struct content *c, /** - * create a selection object suitable for this content - */ -static nserror -html_create_selection(struct content *c, struct selection **sel_out) -{ - html_content *html = (html_content *)c; - struct selection *sel; - sel = selection_create(c, true); - if (sel == NULL) { - return NSERROR_NOMEM; - } - - selection_init(sel, html->layout, &html->len_ctx); - - *sel_out = sel; - return NSERROR_OK; -} - - -/** * HTML content handler function table */ static const content_handler html_content_handler = { @@ -2354,6 +2335,7 @@ static const content_handler html_content_handler = { .saw_insecure_objects = html_saw_insecure_objects, .textsearch_find = html_textsearch_find, .textsearch_bounds = html_textsearch_bounds, + .textselection_redraw = html_textselection_redraw, .create_selection = html_create_selection, .no_share = true, }; |