mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 494808 - Page Info > Media doesn't list background images anymore. r=mano
This commit is contained in:
parent
e1d2f48c79
commit
82b4513da7
@ -596,11 +596,14 @@ function addImage(url, type, alt, elem, isBg)
|
||||
|
||||
function grabAll(elem)
|
||||
{
|
||||
// check for background images, any node may have one
|
||||
var ComputedStyle = elem.ownerDocument.defaultView.getComputedStyle(elem, "");
|
||||
var url = ComputedStyle && ComputedStyle.getPropertyCSSValue("background-image");
|
||||
if (url && url.primitiveType == CSSPrimitiveValue.CSS_URI)
|
||||
// check for background images, any node may have multiple
|
||||
var computedStyle = elem.ownerDocument.defaultView.getComputedStyle(elem, "");
|
||||
if (computedStyle) {
|
||||
Array.forEach(computedStyle.getPropertyCSSValue("background-image"), function (url) {
|
||||
if (url.primitiveType == CSSPrimitiveValue.CSS_URI)
|
||||
addImage(url.getStringValue(), gStrings.mediaBGImg, gStrings.notSet, elem, true);
|
||||
});
|
||||
}
|
||||
|
||||
// one swi^H^H^Hif-else to rule them all
|
||||
if (elem instanceof HTMLImageElement)
|
||||
|
Loading…
Reference in New Issue
Block a user