Bug 121899 (nicer width/height display) and bug 121567 (strict warnings

on XML pages).  Both patches by db48x@yahoo.com (Daniel Brooks), both
r=bzbarsky, sr=alecf, a=asa
This commit is contained in:
bzbarsky%mit.edu 2006-09-14 06:04:42 +00:00
Родитель 80ddef6219
Коммит 58aacf6e65
4 изменённых файлов: 19 добавлений и 9 удалений

Просмотреть файл

@ -279,7 +279,10 @@ function grabAllForms(aWindow, aDocument)
}
}
return theList.concat(aDocument.forms);
if ("forms" in aDocument)
return theList.concat(aDocument.forms);
else
return theList.concat(aDocument.getElementsByTagNameNS(XHTMLNS, "form"));
}
function onFormSelect()
@ -460,7 +463,10 @@ function grabAllLinks(aWindow,aDocument)
if (inputList[i].type.toLowerCase() == "submit")
theList = theList.concat(inputList[i]);
return theList.concat(aDocument.links);
if ("links" in aDocument)
return theList.concat(aDocument.links);
else
return theList.concat(aDocument.getElementsByTagNameNS(XHTMLNS, "a");
}
function openURL(target)
@ -552,7 +558,10 @@ function grabAllMedia(aWindow, aDocument)
if(linkList[i].rel.match(/\bicon\b/i))
theList = theList.concat(linkList[i]);
return theList.concat(aDocument.images);
if ("images" in aDocument)
return theList.concat(aDocument.images);
else
return theList.concat(aDocument.getElementsByTagNameNS(XHTMLNS, "img"));
}
function onImageSelect()
@ -658,8 +667,11 @@ function makePreview(item)
//document.getElementById("imageplugintext").value = "--";
//document.getElementById("imagecharsettext").value = "--";
document.getElementById("imagewidth").value = ("width" in item && item.width) || unknown;
document.getElementById("imageheight").value = ("height" in item && item.height) || unknown;
var width = ("width" in item && item.width) || "";
var height = ("height" in item && item.height) || "";
document.getElementById("imagewidth").value = theBundle.getFormattedString("mediaWidth", [width]);
document.getElementById("imageheight").value = theBundle.getFormattedString("mediaHeight", [height]);
// also can't be done at the moment
//document.getElementById("imageencryptiontext").value = "--";

Просмотреть файл

@ -301,9 +301,7 @@
<label value="&mediaDimensions;"/>
<separator/>
<hbox>
<label value="&mediaWidth;"/>
<textbox readonly="true" crop="right" id="imagewidth"/>
<label value="&mediaHeight;"/>
<textbox readonly="true" crop="right" id="imageheight"/>
</hbox>
</row>

Просмотреть файл

@ -86,8 +86,6 @@
<!ENTITY mediaHeader "Images on this page">
<!ENTITY mediaURL "URL:">
<!ENTITY mediaBase "Base URL:">
<!ENTITY mediaWidth "W:">
<!ENTITY mediaHeight "H:">
<!ENTITY mediaAlt "Alternate Text:">
<!ENTITY mediaNo "No.">
<!ENTITY mediaName "Name">

Просмотреть файл

@ -56,6 +56,8 @@ mediaObject=Object
mediaEmbed=Embed
mediaLink=Icon
mediaInput=Input
mediaWidth=Width: %Spx
mediaHeight=Height: %Spx
generalNotCached=(not cached)
generalDiskCache=Disk Cache