mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-11 21:39:56 +03:00
box_construct: Check error return from dom_has_attribute
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
parent
54daff0e97
commit
182c4ddefe
@ -2229,8 +2229,13 @@ bool box_create_frameset(struct content_html_frames *f, dom_node *n,
|
|||||||
dom_string_unref(s);
|
dom_string_unref(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
dom_element_has_attribute(c, corestring_dom_noresize,
|
if (dom_element_has_attribute(c, corestring_dom_noresize,
|
||||||
&frame->no_resize);
|
&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,
|
err = dom_element_get_attribute(c, corestring_dom_frameborder,
|
||||||
&s);
|
&s);
|
||||||
@ -2849,7 +2854,10 @@ bool box_select_add_option(struct form_control *control, dom_node *n)
|
|||||||
if (value == NULL)
|
if (value == NULL)
|
||||||
goto no_memory;
|
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 */
|
/* replace spaces/TABs with hard spaces to prevent line wrapping */
|
||||||
text_nowrap = cnv_space2nbsp(text);
|
text_nowrap = cnv_space2nbsp(text);
|
||||||
|
Loading…
Reference in New Issue
Block a user