From 027726c4324663f391f070a759b5c730fc04dfe7 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 5 Jan 2011 01:26:29 +0000 Subject: Don't create iframes for hidden or non-displayed boxes. svn path=/trunk/netsurf/; revision=11213 --- render/box_construct.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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"))) -- cgit v1.2.3