[Bug 350693] "Character Encoding" in "View Source" window doesn't work
p=Simon Montagu <smontagu@smontagu.org>, r=neil, sr=mscott, approval1.9=mtschrep git-svn-id: svn://10.0.0.236/trunk@251477 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -181,12 +181,16 @@ function viewSource(url)
|
||||
}
|
||||
|
||||
if (loadFromURL) {
|
||||
// We need to set up session history to give us a page descriptor.
|
||||
//
|
||||
var webNavigation = getBrowser().webNavigation;
|
||||
webNavigation.sessionHistory = Components.classes["@mozilla.org/browser/shistory;1"].createInstance();
|
||||
//
|
||||
// Currently, an exception is thrown if the URL load fails...
|
||||
//
|
||||
var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE;
|
||||
var viewSrcUrl = "view-source:" + url;
|
||||
getBrowser().webNavigation.loadURI(viewSrcUrl, loadFlags, null, null, null);
|
||||
webNavigation.loadURI(viewSrcUrl, loadFlags, null, null, null);
|
||||
}
|
||||
|
||||
//check the view_source.wrap_long_lines pref and set the menuitem's checked attribute accordingly
|
||||
|
||||
Reference in New Issue
Block a user