From 7156b6f655a38cfa4d2513e8a843960750bbf772 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Thu, 14 Sep 2006 06:11:09 +0000 Subject: [PATCH] Nodes in display:none iframes have no computed style. Bug 309050, patch by Florian QUEZE , r=db48x, sr=bzbarsky --- suite/browser/pageInfo.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/suite/browser/pageInfo.js b/suite/browser/pageInfo.js index a5920ca74c9..b218a9f1e4d 100644 --- a/suite/browser/pageInfo.js +++ b/suite/browser/pageInfo.js @@ -521,7 +521,8 @@ function addImage(url, type, alt, elem, isBg) function grabAll(elem) { // check for background images, any node may have one - var url = elem.ownerDocument.defaultView.getComputedStyle(elem, "").getPropertyCSSValue("background-image"); + var ComputedStyle = elem.ownerDocument.defaultView.getComputedStyle(elem, ""); + var url = ComputedStyle && ComputedStyle.getPropertyCSSValue("background-image"); if (url && url.primitiveType == CSSPrimitiveValue.CSS_URI) addImage(url.getStringValue(), gStrings.mediaBGImg, gStrings.notSet, elem, true);