Bug 309542 Fix a11y problems and crop="right" is deprecated in page info dialog

p=me r=db48x sr=neil.parkwaycc.co.uk
This commit is contained in:
bugzilla%arlen.demon.co.uk 2005-10-02 00:09:37 +00:00
parent 4632dfa33b
commit a2056d8b42
8 changed files with 72 additions and 77 deletions

View File

@ -43,10 +43,10 @@ var gIOService = null;
function initTopDocAndWin()
{
if ("arguments" in window && window.arguments.length > 0 &&
window.arguments[0])
window.arguments[0] && window.arguments[0].doc)
{
gTopWin = null;
gTopDoc = window.arguments[0];
gTopDoc = window.arguments[0].doc;
}
else
{

View File

@ -62,16 +62,10 @@
// Get the window for this information
var w;
#ifdef MOZ_PHOENIX
if (window.arguments[0] && window.arguments[0].doc)
{
w = window.arguments[0].doc;
#else
if ("arguments" in window && window.arguments.length > 0 && window.arguments[0])
if ("arguments" in window && window.arguments.length > 0 &&
window.arguments[0] && window.arguments[0].doc)
{
w = window.arguments[0];
#endif
// w = window.arguments[0].doc;
// We don't have separate info for a frame, return null until further notice
// (see bug 138479)
return null;

View File

@ -20,7 +20,7 @@ pippki.jar:
content/pippki/ssl2ciphers.xul (content/ssl2ciphers.xul)
content/pippki/ssl3tlsciphers.xul (content/ssl3tlsciphers.xul)
content/pippki/ssl3tlsciphers2.xul (content/ssl3tlsciphers2.xul)
* content/pippki/PageInfoOverlay.xul (content/PageInfoOverlay.xul)
content/pippki/PageInfoOverlay.xul (content/PageInfoOverlay.xul)
content/pippki/newserver.js (content/newserver.js)
* content/pippki/newserver.xul (content/newserver.xul)
content/pippki/downloadcert.js (content/downloadcert.js)

View File

@ -49,6 +49,7 @@ textbox > .textarea-internal-box {
-moz-appearance: none;
}
label.header,
textbox.header {
margin-left: 0;
}

View File

@ -48,6 +48,7 @@ textbox > .textarea-internal-box {
padding: 0px;
}
label.header,
textbox.header {
margin-left: 0;
}

View File

@ -1715,13 +1715,12 @@ function BrowserViewSourceOfURL(url, charset, pageCookie)
}
// doc=null for regular page info, doc=owner document for frame info.
function BrowserPageInfo(doc, tab)
function BrowserPageInfo(doc, initialTab)
{
window.openDialog("chrome://navigator/content/pageInfo.xul",
"_blank",
"chrome,dialog=no",
doc,
tab);
{doc: doc, initialTab: initialTab});
}
function hiddenWindowStartup()

View File

@ -245,9 +245,11 @@ const XHTMLre = RegExp(XHTMLNSre + "|" + XHTML2NSre, "");
var onLoadRegistry = [ ];
/* Called when PageInfo window is loaded. Arguments are:
* window.arguments[0] - document to use for source (null=Page Info, otherwise Frame Info)
* window.arguments[1] - tab name to display first (may be null)
*/
* window.arguments[0] - (optional) an object consisting of
* - doc: (optional) document to use for source. if not provided,
* the calling window's document will be used
* - initialTab: (optional) id of the inital tab to display
*/
function onLoadPageInfo()
{
//dump("===============================================================================\n");
@ -274,10 +276,11 @@ function onLoadPageInfo()
gStrings.mediaInput = theBundle.getString("mediaInput");
var docTitle = "";
if ("arguments" in window && window.arguments.length >= 1 && window.arguments[0])
if ("arguments" in window && window.arguments.length >= 1 &&
window.arguments[0] && window.arguments[0].doc)
{
theWindow = null;
theDocument = window.arguments[0];
theDocument = window.arguments[0].doc;
docTitle = theBundle.getString("frameInfo.title");
}
else
@ -305,21 +308,18 @@ function onLoadPageInfo()
onLoadRegistry[x]();
}
/* Select the requested tab, if the name is specified */
if ("arguments" in window && window.arguments.length > 1)
var tabControl = document.getElementById("tabbox");
if (tabControl)
{
var tabName = window.arguments[1];
if (tabName)
/* Select the requested tab, if the name is specified */
if ("arguments" in window && window.arguments.length >= 1 &&
window.arguments[0] && window.arguments[0].initialTab)
{
var tabControl = document.getElementById("tabbox");
var tab = document.getElementById(tabName);
if (tabControl && tab)
{
var tab = document.getElementById(window.arguments[0].initialTab);
if (tab)
tabControl.selectedTab = tab;
}
}
tabControl.selectedTab.focus();
}
}

View File

@ -102,7 +102,7 @@
<!-- General page information -->
<vbox>
<textbox class="header" readonly="true" crop="right" id="titletext"/>
<textbox class="header" readonly="true" id="titletext"/>
<grid>
<columns>
<column/>
@ -111,60 +111,60 @@
</columns>
<rows>
<row>
<label value="&generalURL;"/>
<label control="urltext" value="&generalURL;"/>
<separator/>
<textbox readonly="true" crop="right" id="urltext"/>
<textbox readonly="true" id="urltext"/>
</row>
<row>
<separator class="thin"/>
</row>
<row>
<label value="&generalType;"/>
<label control="typetext" value="&generalType;"/>
<separator/>
<textbox readonly="true" crop="right" id="typetext"/>
<textbox readonly="true" id="typetext"/>
</row>
<row>
<label value="&generalMode;"/>
<label control="modetext" value="&generalMode;"/>
<separator/>
<textbox readonly="true" crop="right" id="modetext"/>
<textbox readonly="true" id="modetext"/>
</row>
<row>
<label value="&generalSource;"/>
<label control="sourcetext" value="&generalSource;"/>
<separator/>
<textbox readonly="true" crop="right" id="sourcetext"/>
<textbox readonly="true" id="sourcetext"/>
</row>
<row>
<label value="&generalEncoding;"/>
<label control="encodingtext" value="&generalEncoding;"/>
<separator/>
<textbox readonly="true" crop="right" id="encodingtext"/>
<textbox readonly="true" id="encodingtext"/>
</row>
<row>
<label value="&generalSize;"/>
<label control="sizetext" value="&generalSize;"/>
<separator/>
<textbox readonly="true" crop="right" id="sizetext"/>
<textbox readonly="true" id="sizetext"/>
</row>
<row>
<label value="&generalReferrer;"/>
<label control="refertext" value="&generalReferrer;"/>
<separator/>
<textbox readonly="true" crop="right" id="refertext"/>
<textbox readonly="true" id="refertext"/>
</row>
<row>
<separator class="thin"/>
</row>
<row>
<label value="&generalModified;"/>
<label control="modifiedtext" value="&generalModified;"/>
<separator/>
<textbox readonly="true" crop="right" id="modifiedtext"/>
<textbox readonly="true" id="modifiedtext"/>
</row>
<row>
<label value="&generalExpires;"/>
<label control="expirestext" value="&generalExpires;"/>
<separator/>
<textbox readonly="true" crop="right" id="expirestext"/>
<textbox readonly="true" id="expirestext"/>
</row>
</rows>
</grid>
<separator class="thin"/>
<text id="metahead" class="header" value="&generalMeta;"/>
<label id="metahead" control="metatree" class="header" value="&generalMeta;"/>
<tree id="metatree" flex="1" contextmenu="picontext">
<treecols>
<treecol persist="hidden width" flex="1" id="meta-name" label="&generalMetaName;"/>
@ -202,18 +202,18 @@
</columns>
<rows>
<row>
<label value="&formEncoding;"/>
<label control="formenctype" value="&formEncoding;"/>
<separator/>
<textbox readonly="true" crop="right" id="formenctype"/>
<textbox readonly="true" id="formenctype"/>
</row>
<row>
<label value="&formTarget;"/>
<label control="formtarget" value="&formTarget;"/>
<separator/>
<textbox readonly="true" crop="right" class="label" id="formtarget"/>
<textbox readonly="true" class="label" id="formtarget"/>
</row>
</rows>
</grid>
<text class="header" value="&formFields;"/>
<label control="formpreview" class="header" value="&formFields;"/>
<tree id="formpreview" flex="1" contextmenu="picontext">
<treecols>
<treecol sortSeparators="true" persist="hidden width" flex="3"
@ -284,59 +284,59 @@
</columns>
<rows>
<row>
<label value="&mediaURL;"/>
<label control="imageurltext" value="&mediaURL;"/>
<separator/>
<textbox readonly="true" crop="right" id="imageurltext"/>
<textbox readonly="true" id="imageurltext"/>
</row>
<row>
<label value="&mediaTitle;"/>
<label control="imagetitletext" value="&mediaTitle;"/>
<separator/>
<textbox readonly="true" crop="right" id="imagetitletext"/>
<textbox readonly="true" id="imagetitletext"/>
</row>
<row>
<label value="&mediaAlt;"/>
<label control="imagealttext" value="&mediaAlt;"/>
<separator/>
<textbox readonly="true" crop="right" id="imagealttext"/>
<textbox readonly="true" id="imagealttext"/>
</row>
<row>
<label value="&mediaLongdesc;"/>
<label control="imagelongdesctext" value="&mediaLongdesc;"/>
<separator/>
<textbox readonly="true" crop="right" id="imagelongdesctext"/>
<textbox readonly="true" id="imagelongdesctext"/>
</row>
<row>
<label value="&generalType;"/>
<label control="imagetypetext" value="&generalType;"/>
<separator/>
<textbox readonly="true" crop="right" id="imagetypetext"/>
<textbox readonly="true" id="imagetypetext"/>
</row>
<row>
<label value="&generalSource;"/>
<label control="imagesourcetext" value="&generalSource;"/>
<separator/>
<textbox readonly="true" crop="right" id="imagesourcetext"/>
<textbox readonly="true" id="imagesourcetext"/>
</row>
<row>
<label value="&generalSize;"/>
<label control="imagesizetext" value="&generalSize;"/>
<separator/>
<textbox readonly="true" crop="right" id="imagesizetext"/>
<textbox readonly="true" id="imagesizetext"/>
</row>
<row>
<label value="&generalExpires;"/>
<label control="imageexpirestext" value="&generalExpires;"/>
<separator/>
<textbox readonly="true" crop="right" id="imageexpirestext"/>
<textbox readonly="true" id="imageexpirestext"/>
</row>
<row>
<label value="&mediaDimensions;"/>
<label control="imageSize" value="&mediaDimensions;"/>
<separator/>
<textbox readonly="true" crop="right" id="imageSize"/>
<textbox readonly="true" id="imageSize"/>
</row>
<row id="physRow" collapsed="true">
<label value="&mediaPhysDimensions;"/>
<label control="physSize" value="&mediaPhysDimensions;"/>
<separator/>
<textbox readonly="true" crop="right" id="physSize"/>
<textbox readonly="true" id="physSize"/>
</row>
</rows>
</grid>
<hbox align="end">
<label value="&mediaPreview;" class="header"/>
<label control="thepreviewimage" value="&mediaPreview;" class="header"/>
<spacer flex="1"/>
<button label="&mediaSaveAs;" accesskey="&mediaSaveAs.accesskey;"
id="imagesaveasbutton" disabled="true"