diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2003-10-11 14:33:35 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2003-10-11 14:33:35 +0000 |
commit | 5e2fee7fd66836bab8d6f74788917ffb4bb5c01b (patch) | |
tree | ca862c08f96b14a9473affdf3bc0c3ffcb44f8fb /desktop | |
parent | e826c7348512783f461a8cbeae074a7c9a457fc3 (diff) | |
download | netsurf-5e2fee7fd66836bab8d6f74788917ffb4bb5c01b.tar.gz netsurf-5e2fee7fd66836bab8d6f74788917ffb4bb5c01b.tar.bz2 |
[project @ 2003-10-11 14:33:35 by jmb]
Prevent lnks and form items being clicked on when they are hidden
svn path=/import/netsurf/; revision=364
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/browser.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/desktop/browser.c b/desktop/browser.c index 5fdf29639..f3b403a80 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -17,6 +17,7 @@ #include "libxml/debugXML.h" #include "netsurf/content/cache.h" #include "netsurf/content/fetchcache.h" +#include "netsurf/css/css.h" #include "netsurf/desktop/browser.h" #include "netsurf/render/box.h" #include "netsurf/render/font.h" @@ -526,6 +527,9 @@ int browser_window_gadget_click(struct browser_window* bw, unsigned long click_x for (i = found - 1; i >= 0; i--) { + if (click_boxes[i].box->style->visibility == CSS_VISIBILITY_HIDDEN) + continue; + if (click_boxes[i].box->gadget) { struct gui_gadget* g = click_boxes[i].box->gadget; @@ -1214,6 +1218,8 @@ void browser_window_follow_link(struct browser_window* bw, for (i = found - 1; i >= 0; i--) { + if (click_boxes[i].box->style->visibility == CSS_VISIBILITY_HIDDEN) + continue; if (click_boxes[i].box->href != NULL) { if (click_type == 1) |