diff options
author | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2006-03-26 23:06:18 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@netsurf-browser.org> | 2006-03-26 23:06:18 +0000 |
commit | d8576715d9a5fc3fb05c825989bc4d21f6d342d5 (patch) | |
tree | 7fb471894a61b353c30595119dd438aafb7be83b /desktop/browser.c | |
parent | aee810d4d32cb3f1c81e53902403524782f02cc9 (diff) | |
download | netsurf-d8576715d9a5fc3fb05c825989bc4d21f6d342d5.tar.gz netsurf-d8576715d9a5fc3fb05c825989bc4d21f6d342d5.tar.bz2 |
[project @ 2006-03-26 23:06:18 by dsilvers]
Consider the margins on the <html> object when calculating where a point is.
svn path=/import/netsurf/; revision=2189
Diffstat (limited to 'desktop/browser.c')
-rw-r--r-- | desktop/browser.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/desktop/browser.c b/desktop/browser.c index 031089b9d..af081e0fd 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -842,6 +842,11 @@ void browser_window_mouse_action_html(struct browser_window *bw, * box with scrollbars */ box = c->data.html.layout; + + /* Consider the margins of the html page now */ + box_x = box->margin[LEFT]; + box_y = box->margin[TOP]; + while ((next_box = box_at_point(box, x, y, &box_x, &box_y, &content)) != NULL) { box = next_box; @@ -2018,6 +2023,10 @@ struct box *browser_window_pick_text_box(struct browser_window *bw, int box_x = 0, box_y = 0; struct content *content; struct box *next_box; + + /* Consider the margins of the html page now */ + box_x = box->margin[LEFT]; + box_y = box->margin[TOP]; while ((next_box = box_at_point(box, x, y, &box_x, &box_y, &content)) != NULL) { |