summaryrefslogtreecommitdiff
path: root/desktop/textinput.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-06-27 22:21:15 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-06-27 22:21:15 +0000
commitc9fe1b604e98e02391aecfda2923130f09407453 (patch)
tree06e6691591781b4041e3e504291572b8032cca30 /desktop/textinput.c
parent6f215b1f029e144d98bf39f19e5d142d52621ac7 (diff)
downloadnetsurf-c9fe1b604e98e02391aecfda2923130f09407453.tar.gz
netsurf-c9fe1b604e98e02391aecfda2923130f09407453.tar.bz2
HTML contents manage box scrollbars, rather than browser_windows.
svn path=/trunk/netsurf/; revision=12519
Diffstat (limited to 'desktop/textinput.c')
-rw-r--r--desktop/textinput.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/desktop/textinput.c b/desktop/textinput.c
index 4f5d771e3..b5163b375 100644
--- a/desktop/textinput.c
+++ b/desktop/textinput.c
@@ -37,6 +37,7 @@
#include "render/box.h"
#include "render/font.h"
#include "render/form.h"
+#include "render/html_internal.h"
#include "render/layout.h"
#include "utils/log.h"
#include "utils/talloc.h"
@@ -2168,7 +2169,7 @@ void textarea_reflow(struct browser_window *bw, struct box *textarea,
textarea->width = width;
textarea->height = height;
layout_calculate_descendant_bboxes(textarea);
- box_handle_scrollbars(bw, textarea,
+ box_handle_scrollbars(c, textarea,
box_hscrollbar_present(textarea),
box_vscrollbar_present(textarea));
}
@@ -2263,6 +2264,8 @@ bool word_right(const char *text, size_t len, size_t *poffset, size_t *pchars)
bool ensure_caret_visible(struct browser_window *bw, struct box *textarea)
{
+ html_content *html = (html_content *)
+ hlcache_handle_get_content(bw->current_content);
int cx, cy;
int scrollx, scrolly;
@@ -2302,14 +2305,14 @@ bool ensure_caret_visible(struct browser_window *bw, struct box *textarea)
return false;
if (textarea->scroll_x != NULL) {
- bw->scrollbar = textarea->scroll_x;
+ html->scrollbar = textarea->scroll_x;
scrollbar_set(textarea->scroll_x, scrollx, false);
- bw->scrollbar = NULL;
+ html->scrollbar = NULL;
}
if (textarea->scroll_y != NULL) {
- bw->scrollbar = textarea->scroll_x;
+ html->scrollbar = textarea->scroll_x;
scrollbar_set(textarea->scroll_y, scrolly, false);
- bw->scrollbar = NULL;
+ html->scrollbar = NULL;
}
return true;