summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-01-05 01:26:29 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-01-05 01:26:29 +0000
commit027726c4324663f391f070a759b5c730fc04dfe7 (patch)
tree58d40e7bf8855bdfa4980abfe9da49ced86d7b54
parent426afc91e1ee77a819a673b44bb0615c56a1e631 (diff)
downloadnetsurf-027726c4324663f391f070a759b5c730fc04dfe7.tar.gz
netsurf-027726c4324663f391f070a759b5c730fc04dfe7.tar.bz2
Don't create iframes for hidden or non-displayed boxes.
svn path=/trunk/netsurf/; revision=11213
-rw-r--r--render/box_construct.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/render/box_construct.c b/render/box_construct.c
index 8bdd59491..5b6a96099 100644
--- a/render/box_construct.c
+++ b/render/box_construct.c
@@ -1695,6 +1695,17 @@ bool box_iframe(BOX_SPECIAL_PARAMS)
struct content_html_iframe *iframe;
int i;
+ if (box->style && css_computed_display(box->style,
+ n->parent == NULL) == CSS_DISPLAY_NONE)
+ return true;
+
+ if (box->style && css_computed_visibility(box->style) ==
+ CSS_VISIBILITY_HIDDEN)
+ /* Don't create iframe discriptors for invisible iframes
+ * TODO: handle hidden iframes at browser_window generation
+ * time instead? */
+ return true;
+
/* get frame URL */
if (!(s = (char *) xmlGetProp(n,
(const xmlChar *) "src")))