summaryrefslogtreecommitdiff
path: root/render/html_interaction.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2015-11-06 14:23:36 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2015-11-06 14:23:36 +0000
commit2f27852229d1aaa0bc1db0093e4b4218a97da976 (patch)
treed04c7cb85d34c3449428f9634d0165e7394712de /render/html_interaction.c
parent718f17a57f592a524bfba4e0fb3053db799024e1 (diff)
downloadnetsurf-2f27852229d1aaa0bc1db0093e4b4218a97da976.tar.gz
netsurf-2f27852229d1aaa0bc1db0093e4b4218a97da976.tar.bz2
Always consider the root element's box.
Previously we didn't consider it at all.
Diffstat (limited to 'render/html_interaction.c')
-rw-r--r--render/html_interaction.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/render/html_interaction.c b/render/html_interaction.c
index a2160de5d..76e0311b1 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -319,7 +319,6 @@ void html_mouse_action(struct content *c, struct browser_window *bw,
hlcache_handle *object = NULL;
struct box *html_object_box = NULL;
struct browser_window *iframe = NULL;
- struct box *next_box;
struct box *drag_candidate = NULL;
struct scrollbar *scrollbar = NULL;
plot_font_style_t fstyle;
@@ -527,9 +526,7 @@ void html_mouse_action(struct content *c, struct browser_window *bw,
* text_box - text box
* text_box_x - text_box
*/
- while ((next_box = box_at_point(box, x, y, &box_x, &box_y)) != NULL) {
- box = next_box;
-
+ do {
if ((box->style != NULL) &&
(css_computed_visibility(box->style) ==
CSS_VISIBILITY_HIDDEN)) {
@@ -635,7 +632,7 @@ void html_mouse_action(struct content *c, struct browser_window *bw,
text_box = box;
text_box_x = box_x;
}
- }
+ } while ((box = box_at_point(box, x, y, &box_x, &box_y)) != NULL);
/* use of box_x, box_y, or content below this point is probably a
* mistake; they will refer to the last box returned by box_at_point */