Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/892aee8070750372c9b0c9e4b34f8a75f04ebd98
...commit
http://git.netsurf-browser.org/netsurf.git/commit/892aee8070750372c9b0c9e4b34f8a75f04ebd98
...tree
http://git.netsurf-browser.org/netsurf.git/tree/892aee8070750372c9b0c9e4b34f8a75f04ebd98
The branch, master has been updated
via 892aee8070750372c9b0c9e4b34f8a75f04ebd98 (commit)
via 02afe314afdfa3e795117e2ade21969ad9fb9992 (commit)
from bc6087f9b60496c30c1dad488a13fd35994a69c0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/892aee8070750372c9b0c9e4b34f8a75f04ebd98
commit 892aee8070750372c9b0c9e4b34f8a75f04ebd98
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Improve interaction with html objects.
diff --git a/render/html_interaction.c b/render/html_interaction.c
index 4a96554..2b6bc9a 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -305,6 +305,7 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
bool imagemap = false;
int box_x = 0, box_y = 0;
int gadget_box_x = 0, gadget_box_y = 0;
+ int html_object_pos_x = 0, html_object_pos_y = 0;
int text_box_x = 0;
struct box *url_box = 0;
struct box *gadget_box = 0;
@@ -312,7 +313,7 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
struct box *box;
struct form_control *gadget = 0;
hlcache_handle *object = NULL;
- hlcache_handle *html_object = NULL;
+ struct box *html_object_box = NULL;
struct browser_window *iframe = NULL;
struct box *next_box;
struct box *drag_candidate = NULL;
@@ -405,10 +406,13 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
continue;
if (box->object) {
- if (content_get_type(box->object) == CONTENT_HTML)
- html_object = box->object;
- else
+ if (content_get_type(box->object) == CONTENT_HTML) {
+ html_object_box = box;
+ html_object_pos_x = box_x;
+ html_object_pos_y = box_y;
+ } else {
object = box->object;
+ }
}
if (box->iframe)
@@ -681,22 +685,18 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
browser_window_mouse_track(iframe, mouse,
x - pos_x, y - pos_y);
}
- } else if (html_object) {
- int pos_x, pos_y;
- float scale = browser_window_get_scale(bw);
-
- browser_window_get_position(iframe, false, &pos_x, &pos_y);
-
- pos_x /= scale;
- pos_y /= scale;
-
+ } else if (html_object_box) {
if (mouse & BROWSER_MOUSE_CLICK_1 ||
mouse & BROWSER_MOUSE_CLICK_2) {
- content_mouse_action(html_object, bw, mouse,
- x - pos_x, y - pos_y);
+ content_mouse_action(html_object_box->object,
+ bw, mouse,
+ x - html_object_pos_x,
+ y - html_object_pos_y);
} else {
- content_mouse_track(html_object, bw, mouse,
- x - pos_x, y - pos_y);
+ content_mouse_track(html_object_box->object,
+ bw, mouse,
+ x - html_object_pos_x,
+ y - html_object_pos_y);
}
} else if (url) {
if (title) {
@@ -834,7 +834,7 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
}
}
- if (!iframe) {
+ if (!iframe && !html_object_box) {
msg_data.explicit_status_text = status;
content_broadcast(c, CONTENT_MSG_STATUS, msg_data);
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/02afe314afdfa3e795117e2ade21969ad9fb9992
commit 02afe314afdfa3e795117e2ade21969ad9fb9992
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Fix object box construction.
diff --git a/render/box_construct.c b/render/box_construct.c
index e103d44..fe0cc2a 100644
--- a/render/box_construct.c
+++ b/render/box_construct.c
@@ -1852,7 +1852,7 @@ bool box_object(BOX_SPECIAL_PARAMS)
err = dom_element_get_attribute(n, kstr_data, &data);
if (err == DOM_NO_ERR && data != NULL) {
if (box_extract_link(dom_string_data(data), params->codebase,
- ¶ms->data)) {
+ ¶ms->data) == false) {
dom_string_unref(data);
return false;
}
-----------------------------------------------------------------------
Summary of changes:
render/box_construct.c | 2 +-
render/html_interaction.c | 36 ++++++++++++++++++------------------
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/render/box_construct.c b/render/box_construct.c
index e103d44..fe0cc2a 100644
--- a/render/box_construct.c
+++ b/render/box_construct.c
@@ -1852,7 +1852,7 @@ bool box_object(BOX_SPECIAL_PARAMS)
err = dom_element_get_attribute(n, kstr_data, &data);
if (err == DOM_NO_ERR && data != NULL) {
if (box_extract_link(dom_string_data(data), params->codebase,
- ¶ms->data)) {
+ ¶ms->data) == false) {
dom_string_unref(data);
return false;
}
diff --git a/render/html_interaction.c b/render/html_interaction.c
index 4a96554..2b6bc9a 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -305,6 +305,7 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
bool imagemap = false;
int box_x = 0, box_y = 0;
int gadget_box_x = 0, gadget_box_y = 0;
+ int html_object_pos_x = 0, html_object_pos_y = 0;
int text_box_x = 0;
struct box *url_box = 0;
struct box *gadget_box = 0;
@@ -312,7 +313,7 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
struct box *box;
struct form_control *gadget = 0;
hlcache_handle *object = NULL;
- hlcache_handle *html_object = NULL;
+ struct box *html_object_box = NULL;
struct browser_window *iframe = NULL;
struct box *next_box;
struct box *drag_candidate = NULL;
@@ -405,10 +406,13 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
continue;
if (box->object) {
- if (content_get_type(box->object) == CONTENT_HTML)
- html_object = box->object;
- else
+ if (content_get_type(box->object) == CONTENT_HTML) {
+ html_object_box = box;
+ html_object_pos_x = box_x;
+ html_object_pos_y = box_y;
+ } else {
object = box->object;
+ }
}
if (box->iframe)
@@ -681,22 +685,18 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
browser_window_mouse_track(iframe, mouse,
x - pos_x, y - pos_y);
}
- } else if (html_object) {
- int pos_x, pos_y;
- float scale = browser_window_get_scale(bw);
-
- browser_window_get_position(iframe, false, &pos_x, &pos_y);
-
- pos_x /= scale;
- pos_y /= scale;
-
+ } else if (html_object_box) {
if (mouse & BROWSER_MOUSE_CLICK_1 ||
mouse & BROWSER_MOUSE_CLICK_2) {
- content_mouse_action(html_object, bw, mouse,
- x - pos_x, y - pos_y);
+ content_mouse_action(html_object_box->object,
+ bw, mouse,
+ x - html_object_pos_x,
+ y - html_object_pos_y);
} else {
- content_mouse_track(html_object, bw, mouse,
- x - pos_x, y - pos_y);
+ content_mouse_track(html_object_box->object,
+ bw, mouse,
+ x - html_object_pos_x,
+ y - html_object_pos_y);
}
} else if (url) {
if (title) {
@@ -834,7 +834,7 @@ void html_mouse_action(struct content *c, struct
browser_window *bw,
}
}
- if (!iframe) {
+ if (!iframe && !html_object_box) {
msg_data.explicit_status_text = status;
content_broadcast(c, CONTENT_MSG_STATUS, msg_data);
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org