summaryrefslogtreecommitdiff
path: root/content/handlers
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2020-05-23 22:16:27 +0100
committerVincent Sanders <vince@kyllikki.org>2020-05-23 23:00:08 +0100
commit1161029d2952e5e11062d750a0a681643574428e (patch)
tree0ae814b5a3776b30ee37f5f8cbaa2cdb2b59809e /content/handlers
parent2ea577c47ecca38a0b2d15b15d242c771ce59e29 (diff)
downloadnetsurf-1161029d2952e5e11062d750a0a681643574428e.tar.gz
netsurf-1161029d2952e5e11062d750a0a681643574428e.tar.bz2
remove unecessary content handler specific selection creation
Diffstat (limited to 'content/handlers')
-rw-r--r--content/handlers/html/html.c1
-rw-r--r--content/handlers/html/textselection.c16
-rw-r--r--content/handlers/html/textselection.h5
-rw-r--r--content/handlers/text/textplain.c18
4 files changed, 0 insertions, 40 deletions
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);
diff --git a/content/handlers/text/textplain.c b/content/handlers/text/textplain.c
index c91b81dbd..6f034669a 100644
--- a/content/handlers/text/textplain.c
+++ b/content/handlers/text/textplain.c
@@ -1569,23 +1569,6 @@ textplain_textsearch_bounds(struct content *c,
/**
- * create a selection object suitable for this content
- */
-static nserror
-textplain_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;
-}
-
-
-/**
* invalidate a region based on offsets into the text cauing a redraw
*/
static nserror
@@ -1655,7 +1638,6 @@ static const content_handler textplain_content_handler = {
.textselection_redraw = textplain_textselection_redraw,
.textselection_copy = textplain_textselection_copy,
.textselection_get_end = textplain_textselection_get_end,
- .create_selection = textplain_create_selection,
.no_share = true,
};