From cfe57002febe0f58dfc87f0173ad42126f1362f4 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sat, 23 May 2020 21:17:42 +0100 Subject: remove unused css length usage in selection --- desktop/selection.c | 11 +---------- desktop/selection.h | 4 +--- 2 files changed, 2 insertions(+), 13 deletions(-) (limited to 'desktop') 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 #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, -- cgit v1.2.3