diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2019-08-03 15:52:42 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2019-08-03 15:57:23 +0100 |
commit | 3938d5340b4d44dfe9c7839d1dc2bd790607f8ff (patch) | |
tree | 9d534645860dea8134a24d5cebb9338bc24fafb6 /desktop/treeview.c | |
parent | 8cff4b79d602b4437a81f3e008f22caf276d102a (diff) | |
download | netsurf-3938d5340b4d44dfe9c7839d1dc2bd790607f8ff.tar.gz netsurf-3938d5340b4d44dfe9c7839d1dc2bd790607f8ff.tar.bz2 |
Corewindow: Sanitise scrolling API.
Now the core has a helper so that all the front ends don't need
to implement the scroll to show area API.
Now they simply have get and set scroll APIs.
Diffstat (limited to 'desktop/treeview.c')
-rw-r--r-- | desktop/treeview.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/desktop/treeview.c b/desktop/treeview.c index a54f4cee8..807366422 100644 --- a/desktop/treeview.c +++ b/desktop/treeview.c @@ -39,11 +39,12 @@ #include "content/hlcache.h" #include "css/utils.h" -#include "desktop/system_colour.h" #include "desktop/knockout.h" #include "desktop/textarea.h" #include "desktop/treeview.h" +#include "desktop/cw_helper.h" #include "desktop/gui_internal.h" +#include "desktop/system_colour.h" /** * The maximum horizontal size a treeview can possibly be. @@ -404,9 +405,7 @@ static inline void treeview__cw_scroll_top( .y1 = tree_g.line_height, }; - if (tree->cw_t != NULL) { - tree->cw_t->scroll_visible(tree->cw_h, &r); - } + cw_helper_scroll_visible(tree->cw_t, tree->cw_h, &r); } @@ -584,9 +583,7 @@ static inline void treeview__cw_scroll_to_node( r.y1 += r.y0; /* Apply the Y offset to the second Y coordinate */ - if (tree->cw_t != NULL) { - tree->cw_t->scroll_visible(tree->cw_h, &r); - } + cw_helper_scroll_visible(tree->cw_t, tree->cw_h, &r); } |