зеркало из https://github.com/mozilla/pjs.git
Nodes in display:none iframes have no computed style. Bug 309050, patch by
Florian QUEZE <f.qu@laposte.net>, r=db48x, sr=bzbarsky
This commit is contained in:
Родитель
61b1af62c5
Коммит
7156b6f655
|
@ -521,7 +521,8 @@ function addImage(url, type, alt, elem, isBg)
|
||||||
function grabAll(elem)
|
function grabAll(elem)
|
||||||
{
|
{
|
||||||
// check for background images, any node may have one
|
// 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)
|
if (url && url.primitiveType == CSSPrimitiveValue.CSS_URI)
|
||||||
addImage(url.getStringValue(), gStrings.mediaBGImg, gStrings.notSet, elem, true);
|
addImage(url.getStringValue(), gStrings.mediaBGImg, gStrings.notSet, elem, true);
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче