Bug 402255 - "View Page Source broken from the sidebar" [p=florian r=Mano a1.9=schrep]
authorreed@reedloden.com
Tue, 13 Nov 2007 08:14:14 -0800
changeset 7961 e827ab8ac7190ba17c929ed92649fe4918e571b8
parent 7960 3e81c5258dc29b9cd72d28b98440ada87528104f
child 7962 5dac8c8e6359fc49e1b8b069c86f336183a469a7
push id1
push userbsmedberg@mozilla.com
push dateThu, 20 Mar 2008 16:49:24 +0000
treeherdermozilla-central@61007906a1f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMano
bugs402255
milestone1.9b2pre
Bug 402255 - "View Page Source broken from the sidebar" [p=florian r=Mano a1.9=schrep]
browser/base/content/browser-context.inc
browser/base/content/browser.js
browser/base/content/browser.xul
--- a/browser/base/content/browser-context.inc
+++ b/browser/base/content/browser-context.inc
@@ -221,17 +221,17 @@
       <menuitem id="context-viewpartialsource-mathml"
                 label="&viewPartialSourceForMathMLCmd.label;"
                 accesskey="&viewPartialSourceCmd.accesskey;"
                 oncommand="gContextMenu.viewPartialSource('mathml');"
                 observes="isImage"/>
       <menuitem id="context-viewsource"
                 label="&viewPageSourceCmd.label;"
                 accesskey="&viewPageSourceCmd.accesskey;"
-                oncommand="BrowserViewSourceOfDocument(content.document);"
+                oncommand="BrowserViewSourceOfDocument(gContextMenu.browser.contentDocument);"
                 observes="isImage"/>
       <menuitem id="context-viewinfo"
                 label="&viewPageInfoCmd.label;"
                 accesskey="&viewPageInfoCmd.accesskey;"
                 oncommand="gContextMenu.viewInfo();"/>
       <menuitem id="context-metadata"
                 label="&metadataCmd.label;"
                 accesskey="&metadataCmd.accesskey;"
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1958,21 +1958,22 @@ function BrowserViewSourceOfDocument(aDo
     // If no page descriptor is available, just use the view-source URL...
   }
 
   ViewSourceOfURL(webNav.currentURI.spec, pageCookie, aDocument);
 }
 
 function ViewSourceOfURL(aURL, aPageDescriptor, aDocument)
 {
+  var utils = window.top.gViewSourceUtils;
   if (getBoolPref("view_source.editor.external", false)) {
-    gViewSourceUtils.openInExternalEditor(aURL, aPageDescriptor, aDocument);
+    utils.openInExternalEditor(aURL, aPageDescriptor, aDocument);
   }
   else {
-    gViewSourceUtils.openInInternalViewer(aURL, aPageDescriptor, aDocument);
+    utils.openInInternalViewer(aURL, aPageDescriptor, aDocument);
   }
 }
 
 // doc - document to use for source, or null for this window's document
 // initialTab - name of the initial tab to display, or null for the first tab
 function BrowserPageInfo(doc, initialTab)
 {
   var args = {doc: doc, initialTab: initialTab};
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -59,18 +59,18 @@
 # hiddenWindow.xul.
 #include browser-doctype.inc
 
 <window id="main-window"
         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         onload="BrowserStartup()" onunload="BrowserShutdown()" onclose="return WindowIsClosing();"
         contenttitlesetting="true"
-        title="&mainWindow.title;"
-        titlemodifier="&mainWindow.title;"
+        title="&mainWindow.title; 3 Beta 1"
+        titlemodifier="&mainWindow.title; 3 Beta 1"
         titlemenuseparator="&mainWindow.titlemodifiermenuseparator;"
         windowtype="navigator:browser"
         screenX="4" screenY="4"
         persist="screenX screenY width height sizemode"> 
 
 # All JS files which are not content (only) dependent that browser.xul
 # wishes to include *must* go into the global-scripts.inc file
 # so that they can be shared by macBrowserOverlay.xul.