bug 11632 - save page with images, stylesheets, objects and applets.

r=hewitt, brade, sr=hyatt
This commit is contained in:
ben%netscape.com 2006-09-14 06:01:45 +00:00
parent 3ece579b81
commit dbdebbd272
2 changed files with 4 additions and 2 deletions

@ -62,6 +62,7 @@ var gBrowser = null;
// focused frame URL // focused frame URL
var gFocusedURL = null; var gFocusedURL = null;
var gFocusedDocument = null;
/** /**
* We can avoid adding multiple load event listeners and save some time by adding * We can avoid adding multiple load event listeners and save some time by adding
@ -98,6 +99,7 @@ function contentAreaFrameFocus()
var focusedWindow = document.commandDispatcher.focusedWindow; var focusedWindow = document.commandDispatcher.focusedWindow;
if (isDocumentFrame(focusedWindow)) { if (isDocumentFrame(focusedWindow)) {
gFocusedURL = focusedWindow.location.href; gFocusedURL = focusedWindow.location.href;
gFocusedDocument = focusedWindow.document;
} }
} }

@ -106,7 +106,7 @@
<command id="cmd_newEditorTemplate"/> <command id="cmd_newEditorTemplate"/>
<command id="cmd_newEditorDraft"/> --> <command id="cmd_newEditorDraft"/> -->
<command id="Browser:OpenFile" oncommand="BrowserOpenFileWindow();"/> <command id="Browser:OpenFile" oncommand="BrowserOpenFileWindow();"/>
<command id="Browser:SavePage" oncommand="savePage();"/> <command id="Browser:SavePage" oncommand="saveDocument(window._content.document);"/>
<command id="Browser:EditPage" oncommand="editPage(window._content.location.href,window, false);"/> <command id="Browser:EditPage" oncommand="editPage(window._content.location.href,window, false);"/>
<command id="Browser:Open" oncommand="BrowserOpenWindow();"/> <command id="Browser:Open" oncommand="BrowserOpenWindow();"/>
<command id="cmd_printSetup" oncommand="goPageSetup();"/> <command id="cmd_printSetup" oncommand="goPageSetup();"/>
@ -186,7 +186,7 @@
<menuitem id="menu_closeWindow" hidden="true" command="cmd_closeWindow" key="key_closeWindow" label="&closeWindow.label;"/> <menuitem id="menu_closeWindow" hidden="true" command="cmd_closeWindow" key="key_closeWindow" label="&closeWindow.label;"/>
<menuseparator id="menu_closeSeparator" hidden="true"/> <menuseparator id="menu_closeSeparator" hidden="true"/>
<menuitem label="&savePageCmd.label;" accesskey="&savePageCmd.accesskey;" key="key_savePage" command="Browser:SavePage"/> <menuitem label="&savePageCmd.label;" accesskey="&savePageCmd.accesskey;" key="key_savePage" command="Browser:SavePage"/>
<menuitem id="savepage" label="&saveFrameCmd.label;" accesskey="&saveFrameCmd.accesskey;" oncommand="savePage(gFocusedURL);" hidden="true"/> <menuitem id="savepage" label="&saveFrameCmd.label;" accesskey="&saveFrameCmd.accesskey;" oncommand="savePage(gFocusedURL, gFocusedDocument);" hidden="true"/>
<menuseparator/> <menuseparator/>
<menuitem label="&editPageCmd.label;" accesskey="&editPageCmd.accesskey;" key="key_editPage" command="Browser:EditPage" /> <menuitem label="&editPageCmd.label;" accesskey="&editPageCmd.accesskey;" key="key_editPage" command="Browser:EditPage" />
<menuseparator/> <menuseparator/>