зеркало из https://github.com/mozilla/gecko-dev.git
Adding view page info for pages, frames (41443). patch=matthew wilsom, r=mcafee, sr=ben
This commit is contained in:
Родитель
9fbee055cc
Коммит
a6f550ce32
|
@ -1028,11 +1028,13 @@ function BrowserViewSource()
|
|||
_content.location, docCharset);
|
||||
}
|
||||
|
||||
function BrowserPageInfo()
|
||||
// doc=null for regular page, doc=owner document for frame.
|
||||
function BrowserPageInfo(doc)
|
||||
{
|
||||
window.openDialog("chrome://navigator/content/pageInfo.xul",
|
||||
"_blank",
|
||||
"chrome,dialog=no");
|
||||
"chrome,dialog=no",
|
||||
doc);
|
||||
}
|
||||
|
||||
function hiddenWindowStartup()
|
||||
|
|
|
@ -26,8 +26,11 @@ var onLoadRegistry = [ ];
|
|||
|
||||
function onLoadPageInfo()
|
||||
{
|
||||
var page = window.opener.frames[0].document;
|
||||
//var page = window.frames.content.document;
|
||||
var page;
|
||||
if ((window.arguments.length >= 1) && window.arguments[0])
|
||||
page = window.arguments[0];
|
||||
else
|
||||
page = window.opener.frames[0].document;
|
||||
var root = document.getElementById("cont");
|
||||
|
||||
makeDocument(page, root);
|
||||
|
|
|
@ -134,11 +134,11 @@ nsContextMenu.prototype = {
|
|||
// View frame source depends on whether we're in a frame.
|
||||
this.showItem( "context-viewframesource", this.inFrame );
|
||||
|
||||
// View Info don't work no way no how.
|
||||
this.showItem( "context-viewinfo", false );
|
||||
// View Info is available, unless in directory listing
|
||||
this.showItem( "context-viewinfo", !this.inDirList );
|
||||
|
||||
// View Frame Info isn't working, either.
|
||||
this.showItem( "context-viewframeinfo", false );
|
||||
// View Frame Info depends on whether we're in a frame
|
||||
this.showItem( "context-viewframeinfo", this.inFrame );
|
||||
|
||||
// View Image depends on whether an image was clicked on.
|
||||
this.showItem( "context-viewimage", this.onImage );
|
||||
|
@ -392,10 +392,10 @@ nsContextMenu.prototype = {
|
|||
this.target.ownerDocument.location.href);
|
||||
},
|
||||
viewInfo : function () {
|
||||
// XXX not implemented
|
||||
BrowserPageInfo();
|
||||
},
|
||||
viewFrameInfo : function () {
|
||||
// XXX not implemented
|
||||
BrowserPageInfo(this.target.ownerDocument);
|
||||
},
|
||||
// Open new window with the URL of the image.
|
||||
viewImage : function () {
|
||||
|
|
Загрузка…
Ссылка в новой задаче