diff options
author | Vincent Sanders <vince@kyllikki.org> | 2020-05-23 21:17:42 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2020-05-23 23:00:08 +0100 |
commit | cfe57002febe0f58dfc87f0173ad42126f1362f4 (patch) | |
tree | bf77d4096f3d2c8339d20f8efef6ece8130eab8a /desktop | |
parent | e65e41e2d6efccba983cd63aadfb10b5b4a935b2 (diff) | |
download | netsurf-cfe57002febe0f58dfc87f0173ad42126f1362f4.tar.gz netsurf-cfe57002febe0f58dfc87f0173ad42126f1362f4.tar.bz2 |
remove unused css length usage in selection
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/selection.c | 11 | ||||
-rw-r--r-- | desktop/selection.h | 4 |
2 files changed, 2 insertions, 13 deletions
diff --git a/desktop/selection.c b/desktop/selection.c index d4fa7ca7d..6839724f8 100644 --- a/desktop/selection.c +++ b/desktop/selection.c @@ -355,9 +355,7 @@ void selection_reinit(struct selection *s, struct box *root) /* exported interface documented in desktop/selection.h */ void -selection_init(struct selection *s, - struct box *root, - const nscss_len_ctx *len_ctx) +selection_init(struct selection *s, struct box *root) { if (s->defined) { selection_clear(s, true); @@ -367,13 +365,6 @@ selection_init(struct selection *s, s->start_idx = 0; s->end_idx = 0; s->drag_state = DRAG_NONE; - if (len_ctx != NULL) { - s->len_ctx = *len_ctx; - } else { - s->len_ctx.vw = 0; - s->len_ctx.vh = 0; - s->len_ctx.root_style = NULL; - } selection_reinit(s, root); } diff --git a/desktop/selection.h b/desktop/selection.h index cc8d8da4e..cb9289ac7 100644 --- a/desktop/selection.h +++ b/desktop/selection.h @@ -25,7 +25,6 @@ #include <stdbool.h> #include "netsurf/mouse.h" -#include "content/handlers/css/utils.h" struct box; struct browser_window; @@ -47,7 +46,6 @@ struct selection { struct content *c; struct box *root; - nscss_len_ctx len_ctx; unsigned max_idx; /* total bytes in text representation */ @@ -112,7 +110,7 @@ void selection_destroy(struct selection *s); * \param s selection object * \param root the root box for html document or NULL for text/plain */ -void selection_init(struct selection *s, struct box *root, const nscss_len_ctx *len_ctx); +void selection_init(struct selection *s, struct box *root); /** * Initialise the selection object to use the given box subtree as its root, |