From f6e67df7d5ca9be36c0be24c665d96df4a8270f3 Mon Sep 17 00:00:00 2001 From: "mozilla.mano%sent.com" Date: Wed, 7 Mar 2007 22:25:24 +0000 Subject: [PATCH] Bug 370771 - 'Send Link' (to page) doesn't work in web panels. r=gavin. git-svn-id: svn://10.0.0.236/trunk@221487 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/browser/base/content/browser-context.inc | 2 +- mozilla/browser/base/content/browser-sets.inc | 3 ++- mozilla/browser/base/content/browser.js | 6 +++--- mozilla/browser/base/content/nsContextMenu.js | 8 ++++++-- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/mozilla/browser/base/content/browser-context.inc b/mozilla/browser/base/content/browser-context.inc index c928fbb251a..6e423cc2a54 100644 --- a/mozilla/browser/base/content/browser-context.inc +++ b/mozilla/browser/base/content/browser-context.inc @@ -133,7 +133,7 @@ + oncommand="gContextMenu.sendPage();"/> - + diff --git a/mozilla/browser/base/content/browser.js b/mozilla/browser/base/content/browser.js index 8e36fdca57e..ca711764b57 100644 --- a/mozilla/browser/base/content/browser.js +++ b/mozilla/browser/base/content/browser.js @@ -5060,9 +5060,9 @@ function WindowIsClosing() } var MailIntegration = { - sendLinkForContent: function () { - this.sendMessage(window.content.location.href, - window.content.document.title); + sendLinkForWindow: function (aWindow) { + this.sendMessage(aWindow.location.href, + aWindow.document.title); }, sendMessage: function (aBody, aSubject) { diff --git a/mozilla/browser/base/content/nsContextMenu.js b/mozilla/browser/base/content/nsContextMenu.js index 460aafaf7ba..95b673c16e9 100644 --- a/mozilla/browser/base/content/nsContextMenu.js +++ b/mozilla/browser/base/content/nsContextMenu.js @@ -1126,11 +1126,15 @@ nsContextMenu.prototype = { }, #endif - savePageAs: function() { + savePageAs: function CM_savePageAs() { saveDocument(this.browser.contentDocument); }, - printFrame: function() { + sendPage: function CM_sendPage() { + MailIntegration.sendLinkForWindow(this.browser.contentWindow); + }, + + printFrame: function CM_printFrame() { PrintUtils.print(this.target.ownerDocument.defaultView); } };