diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2013-05-07 15:06:33 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2013-05-07 15:06:33 +0100 |
commit | a0fde060e8b11b55ea70c2d71565a4f4e326b768 (patch) | |
tree | ffa2ae68c2f87f19cbbd13b7e79a632a682202ee /desktop/selection.c | |
parent | f4af0d86e240948bb37a1d318d4e2559f04c6a79 (diff) | |
parent | 8b6665fe0383fd565ac7d7cd6a2bf6243ebc9937 (diff) | |
download | netsurf-a0fde060e8b11b55ea70c2d71565a4f4e326b768.tar.gz netsurf-a0fde060e8b11b55ea70c2d71565a4f4e326b768.tar.bz2 |
Merge branch 'tlsa/selection-search-refactor'
Diffstat (limited to 'desktop/selection.c')
-rw-r--r-- | desktop/selection.c | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/desktop/selection.c b/desktop/selection.c index 6a93c6133..1b85a090c 100644 --- a/desktop/selection.c +++ b/desktop/selection.c @@ -83,7 +83,7 @@ static bool traverse_tree(struct box *box, unsigned start_idx, unsigned end_idx, seln_traverse_handler handler, void *handle, save_text_whitespace *before, bool *first, bool do_marker); - +static unsigned selection_label_subtree(struct box *box, unsigned idx); /** * Get the browser window containing the content a selection object belongs to. @@ -211,19 +211,6 @@ void selection_init(struct selection *s, struct box *root) /** - * Indicate whether the selected text is read only, ie. cannot be modified. - * - * \param s selection object - * \return true iff the selection is read only - */ - -bool selection_read_only(struct selection *s) -{ - return true; -} - - -/** * Label each text box in the given box subtree with its position * in a textual representation of the content. * @@ -990,29 +977,3 @@ bool selection_highlighted(const struct selection *s, return true; } - - -/** - * Adjust the selection to reflect a change in the selected text, - * eg. editing in a text area/input field. - * - * \param s selection object - * \param byte_offset byte offset of insertion/removal point - * \param change byte size of change, +ve = insertion, -ve = removal - * \param redraw true iff the screen should be updated - */ - -void selection_update(struct selection *s, size_t byte_offset, - int change, bool redraw) -{ - if (selection_defined(s) && - byte_offset >= s->start_idx && - byte_offset < s->end_idx) - { - if (change > 0) - s->end_idx += change; - else - s->end_idx += - max(change, (int)(byte_offset - s->end_idx)); - } -} |