diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-02-07 00:50:37 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-02-07 00:50:37 +0000 |
commit | 2c2ac87e37c2098421b83f9e684e29c7e01b24f4 (patch) | |
tree | 76acd14375d2f5b329440932bb4594550fd10a0d /render/box_construct.c | |
parent | 5c1f3bd8c899ec79a504d74023143bb4594cfd6c (diff) | |
download | netsurf-2c2ac87e37c2098421b83f9e684e29c7e01b24f4.tar.gz netsurf-2c2ac87e37c2098421b83f9e684e29c7e01b24f4.tar.bz2 |
Prevent tabbing into textfields whose styling is display: none;
svn path=/trunk/netsurf/; revision=3849
Diffstat (limited to 'render/box_construct.c')
-rw-r--r-- | render/box_construct.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/render/box_construct.c b/render/box_construct.c index 9519f8ff8..391999aa7 100644 --- a/render/box_construct.c +++ b/render/box_construct.c @@ -355,7 +355,17 @@ bool box_construct_element(xmlNode *n, struct content *content, target = box->target; } if (style->display == CSS_DISPLAY_NONE) { + /* Free style and invalidate box's style pointer */ talloc_free(style); + box->style = NULL; + + /* If this box has an associated gadget, invalidate the + * gadget's box pointer and our pointer to the gadget. */ + if (box->gadget) { + box->gadget->box = NULL; + box->gadget = NULL; + } + /* We can't do this, as it will destroy any gadget * associated with the box, thus making any form usage * access freed memory. The box is in the talloc context, |