Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/182c4ddefe6c1cd050361febb344ccd8cd5d1c96
...commit
http://git.netsurf-browser.org/netsurf.git/commit/182c4ddefe6c1cd050361febb344ccd8cd5d1c96
...tree
http://git.netsurf-browser.org/netsurf.git/tree/182c4ddefe6c1cd050361febb344ccd8cd5d1c96
The branch, master has been updated
via 182c4ddefe6c1cd050361febb344ccd8cd5d1c96 (commit)
from 54daff0e979a17984d66b06db2adc292f55b7b14 (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=182c4ddefe6c1cd050361febb344ccd8cd5d1c96
commit 182c4ddefe6c1cd050361febb344ccd8cd5d1c96
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>
box_construct: Check error return from dom_has_attribute
Signed-off-by: Daniel Silverstone <[email protected]>
diff --git a/content/handlers/html/box_construct.c
b/content/handlers/html/box_construct.c
index 4d0cba7..a0eb69e 100644
--- a/content/handlers/html/box_construct.c
+++ b/content/handlers/html/box_construct.c
@@ -2229,8 +2229,13 @@ bool box_create_frameset(struct content_html_frames *f,
dom_node *n,
dom_string_unref(s);
}
- dom_element_has_attribute(c, corestring_dom_noresize,
- &frame->no_resize);
+ if (dom_element_has_attribute(c,
corestring_dom_noresize,
+ &frame->no_resize) !=
DOM_NO_ERR) {
+ /* If we can't read the attribute for some
reason,
+ * assume we didn't have it.
+ */
+ frame->no_resize = false;
+ }
err = dom_element_get_attribute(c,
corestring_dom_frameborder,
&s);
@@ -2849,7 +2854,10 @@ bool box_select_add_option(struct form_control *control,
dom_node *n)
if (value == NULL)
goto no_memory;
- dom_element_has_attribute(n, corestring_dom_selected, &selected);
+ if (dom_element_has_attribute(n, corestring_dom_selected, &selected) !=
DOM_NO_ERR) {
+ /* Assume not selected if we can't read the attribute presence
*/
+ selected = false;
+ }
/* replace spaces/TABs with hard spaces to prevent line wrapping */
text_nowrap = cnv_space2nbsp(text);
-----------------------------------------------------------------------
Summary of changes:
content/handlers/html/box_construct.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/content/handlers/html/box_construct.c
b/content/handlers/html/box_construct.c
index 4d0cba7..a0eb69e 100644
--- a/content/handlers/html/box_construct.c
+++ b/content/handlers/html/box_construct.c
@@ -2229,8 +2229,13 @@ bool box_create_frameset(struct content_html_frames *f,
dom_node *n,
dom_string_unref(s);
}
- dom_element_has_attribute(c, corestring_dom_noresize,
- &frame->no_resize);
+ if (dom_element_has_attribute(c,
corestring_dom_noresize,
+ &frame->no_resize) !=
DOM_NO_ERR) {
+ /* If we can't read the attribute for some
reason,
+ * assume we didn't have it.
+ */
+ frame->no_resize = false;
+ }
err = dom_element_get_attribute(c,
corestring_dom_frameborder,
&s);
@@ -2849,7 +2854,10 @@ bool box_select_add_option(struct form_control *control,
dom_node *n)
if (value == NULL)
goto no_memory;
- dom_element_has_attribute(n, corestring_dom_selected, &selected);
+ if (dom_element_has_attribute(n, corestring_dom_selected, &selected) !=
DOM_NO_ERR) {
+ /* Assume not selected if we can't read the attribute presence
*/
+ selected = false;
+ }
/* replace spaces/TABs with hard spaces to prevent line wrapping */
text_nowrap = cnv_space2nbsp(text);
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org