зеркало из https://github.com/mozilla/pjs.git
Bug 105057 images used as form controls doesn't appear on Page Info | Images
patch by db48x@yahoo.com r=bzbarsky@mit.edu sr=jag
This commit is contained in:
Родитель
8b8f5d8483
Коммит
60b41d389f
|
@ -482,6 +482,7 @@ function makeMediaTab()
|
||||||
var mediaObject = theBundle.getString("mediaObject");
|
var mediaObject = theBundle.getString("mediaObject");
|
||||||
var mediaEmbed = theBundle.getString("mediaEmbed");
|
var mediaEmbed = theBundle.getString("mediaEmbed");
|
||||||
var mediaLink = theBundle.getString("mediaLink");
|
var mediaLink = theBundle.getString("mediaLink");
|
||||||
|
var mediaInput = theBundle.getString("mediaInput");
|
||||||
|
|
||||||
var row = null;
|
var row = null;
|
||||||
var length = imageList.length;
|
var length = imageList.length;
|
||||||
|
@ -495,6 +496,9 @@ function makeMediaTab()
|
||||||
case "img":
|
case "img":
|
||||||
imageView.addRow([++imageIndex, elem.src, mediaImg]);
|
imageView.addRow([++imageIndex, elem.src, mediaImg]);
|
||||||
break;
|
break;
|
||||||
|
case "input":
|
||||||
|
imageView.addRow([++imageIndex, elem.src, mediaInput]);
|
||||||
|
break;
|
||||||
case "applet":
|
case "applet":
|
||||||
imageView.addRow([++imageIndex, elem.code || elem.object, mediaApplet]);
|
imageView.addRow([++imageIndex, elem.code || elem.object, mediaApplet]);
|
||||||
break;
|
break;
|
||||||
|
@ -542,7 +546,7 @@ function grabAllMedia(aWindow, aDocument)
|
||||||
var linkList = aDocument.getElementsByTagName("link");
|
var linkList = aDocument.getElementsByTagName("link");
|
||||||
length = linkList.length;
|
length = linkList.length;
|
||||||
for (i = 0; i < length; i++)
|
for (i = 0; i < length; i++)
|
||||||
if(linkList[i].rel.toLowerCase() == "icon")
|
if(linkList[i].rel.match(/\bicon\b/i))
|
||||||
theList = theList.concat(linkList[i]);
|
theList = theList.concat(linkList[i]);
|
||||||
|
|
||||||
return theList.concat(aDocument.images);
|
return theList.concat(aDocument.images);
|
||||||
|
@ -660,10 +664,11 @@ function makePreview(item)
|
||||||
var oldImage = document.getElementById("thepreviewimage");
|
var oldImage = document.getElementById("thepreviewimage");
|
||||||
|
|
||||||
var newImage = null;
|
var newImage = null;
|
||||||
if (item.nodeName.toLowerCase() == "link")
|
var nn = item.nodeName.toLowerCase();
|
||||||
|
if (nn == "link" || nn == "input")
|
||||||
{
|
{
|
||||||
newImage = document.createElementNS("http://www.w3.org/1999/xhtml", "IMG");
|
newImage = new Image();
|
||||||
newImage.src = getAbsoluteURL(item.href, item);
|
newImage.src = getAbsoluteURL(item.href || item.src, item);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -672,8 +677,10 @@ function makePreview(item)
|
||||||
}
|
}
|
||||||
|
|
||||||
newImage.setAttribute("id", "thepreviewimage");
|
newImage.setAttribute("id", "thepreviewimage");
|
||||||
newImage.width = ("width" in item && item.width) || unknown;
|
if ("width" in item && item.width)
|
||||||
newImage.height = ("height" in item && item.height) || unknown;
|
newImage.width = item.width;
|
||||||
|
if ("height" in item && item.height)
|
||||||
|
newImage.height = item.height;
|
||||||
newImage.removeAttribute("align"); // just in case.
|
newImage.removeAttribute("align"); // just in case.
|
||||||
|
|
||||||
imageContainer.removeChild(oldImage);
|
imageContainer.removeChild(oldImage);
|
||||||
|
|
|
@ -52,7 +52,8 @@ mediaImg=Image
|
||||||
mediaApplet=Applet
|
mediaApplet=Applet
|
||||||
mediaObject=Object
|
mediaObject=Object
|
||||||
mediaEmbed=Embed
|
mediaEmbed=Embed
|
||||||
mediaLink=icon
|
mediaLink=Icon
|
||||||
|
mediaInput=Input
|
||||||
|
|
||||||
generalNotCached=(not cached)
|
generalNotCached=(not cached)
|
||||||
generalDiskCache=Disk Cache
|
generalDiskCache=Disk Cache
|
||||||
|
|
Загрузка…
Ссылка в новой задаче