From 2ea577c47ecca38a0b2d15b15d242c771ce59e29 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sat, 23 May 2020 22:09:40 +0100 Subject: remove unused is_html parameter to text selection routines --- desktop/selection.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'desktop/selection.c') diff --git a/desktop/selection.c b/desktop/selection.c index 40edff885..1fac7e225 100644 --- a/desktop/selection.c +++ b/desktop/selection.c @@ -49,13 +49,6 @@ #include "netsurf/window.h" #include "desktop/gui_internal.h" -/** - * Text selection works by labelling each node in the box tree with its - * start index in the textual representation of the tree's content. - */ - -#define SPACE_LEN(b) ((b->space == 0) ? 0 : 1) - struct selection_string { char *buffer; @@ -67,8 +60,6 @@ struct selection_string { }; - - /** * Redraws the given range of text. * @@ -254,24 +245,24 @@ selection_string_append(const char *text, /* exported interface documented in desktop/selection.h */ -struct selection *selection_create(struct content *c, bool is_html) +struct selection *selection_create(struct content *c) { - struct selection *s; - s = calloc(1, sizeof(struct selection)); - if (s) { - selection_prepare(s, c, is_html); + struct selection *sel; + sel = calloc(1, sizeof(struct selection)); + if (sel) { + selection_prepare(sel, c); + selection_init(sel); } - return s; + return sel; } /* exported interface documented in desktop/selection.h */ -void selection_prepare(struct selection *s, struct content *c, bool is_html) +void selection_prepare(struct selection *s, struct content *c) { if (s) { s->c = c; - s->is_html = is_html; s->root = NULL; s->drag_state = DRAG_NONE; s->max_idx = 0; -- cgit v1.2.3