Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/4776f05430e1b8002e6ca...
...commit
http://git.netsurf-browser.org/netsurf.git/commit/4776f05430e1b8002e6ca6e...
...tree
http://git.netsurf-browser.org/netsurf.git/tree/4776f05430e1b8002e6ca6eec...
The branch, master has been updated
via 4776f05430e1b8002e6ca6eec3e69f84fa130eda (commit)
from 6b29a697b9879c03146cca24bb30c64d25810cb8 (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/commit/?id=4776f05430e1b8002e6...
commit 4776f05430e1b8002e6ca6eec3e69f84fa130eda
Author: Vincent Sanders <vince(a)netsurf-browser.org>
Commit: Vincent Sanders <vince(a)netsurf-browser.org>
fix potential division by zero by only computing width and height when content is
valid and hence will return content width and height not zero. coverity 110986[23]
diff --git a/render/html_object.c b/render/html_object.c
index f7ed3bd..e66667b 100644
--- a/render/html_object.c
+++ b/render/html_object.c
@@ -293,10 +293,12 @@ html_object_callback(hlcache_handle *object,
} else {
/* Non-background case */
- int w = content_get_width(object);
- int h = content_get_height(object);
if (hlcache_handle_get_content(object) ==
event->data.redraw.object) {
+
+ int w = content_get_width(object);
+ int h = content_get_height(object);
+
data.redraw.x = data.redraw.x *
box->width / w;
data.redraw.y = data.redraw.y *
-----------------------------------------------------------------------
Summary of changes:
render/html_object.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/render/html_object.c b/render/html_object.c
index f7ed3bd..e66667b 100644
--- a/render/html_object.c
+++ b/render/html_object.c
@@ -293,10 +293,12 @@ html_object_callback(hlcache_handle *object,
} else {
/* Non-background case */
- int w = content_get_width(object);
- int h = content_get_height(object);
if (hlcache_handle_get_content(object) ==
event->data.redraw.object) {
+
+ int w = content_get_width(object);
+ int h = content_get_height(object);
+
data.redraw.x = data.redraw.x *
box->width / w;
data.redraw.y = data.redraw.y *
--
NetSurf Browser