From 1161029d2952e5e11062d750a0a681643574428e Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sat, 23 May 2020 22:16:27 +0100 Subject: remove unecessary content handler specific selection creation --- content/handlers/html/html.c | 1 - content/handlers/html/textselection.c | 16 ---------------- content/handlers/html/textselection.h | 5 ----- 3 files changed, 22 deletions(-) (limited to 'content/handlers/html') diff --git a/content/handlers/html/html.c b/content/handlers/html/html.c index 5ae6ee502..a133d15a9 100644 --- a/content/handlers/html/html.c +++ b/content/handlers/html/html.c @@ -2338,7 +2338,6 @@ static const content_handler html_content_handler = { .textselection_redraw = html_textselection_redraw, .textselection_copy = html_textselection_copy, .textselection_get_end = html_textselection_get_end, - .create_selection = html_create_selection, .no_share = true, }; diff --git a/content/handlers/html/textselection.c b/content/handlers/html/textselection.c index becebb882..c0b27eb33 100644 --- a/content/handlers/html/textselection.c +++ b/content/handlers/html/textselection.c @@ -258,22 +258,6 @@ coords_from_range(struct box *box, } -/** - * create a selection object suitable for this content - */ -nserror -html_create_selection(struct content *c, struct selection **sel_out) -{ - struct selection *sel; - sel = selection_create(c); - if (sel == NULL) { - return NSERROR_NOMEM; - } - - *sel_out = sel; - return NSERROR_OK; -} - /* exported interface documented in html/textselection.h */ nserror html_textselection_redraw(struct content *c, diff --git a/content/handlers/html/textselection.h b/content/handlers/html/textselection.h index 95d7078c5..46db045ef 100644 --- a/content/handlers/html/textselection.h +++ b/content/handlers/html/textselection.h @@ -27,11 +27,6 @@ struct content; struct selection; -/** - * create a selection object suitable for this content - */ -nserror html_create_selection(struct content *c, struct selection **sel_out); - nserror html_textselection_redraw(struct content *c, unsigned start_idx, unsigned end_idx); nserror html_textselection_copy(struct content *c, unsigned start_idx, unsigned end_idx, struct selection_string *selstr); -- cgit v1.2.3