зеркало из https://github.com/mozilla/gecko-dev.git
[Bug 350693] "Character Encoding" in "View Source" window doesn't work p=Simon Montagu <smontagu@smontagu.org>, r=neil, sr=mscott, approval1.9=mtschrep
This commit is contained in:
Родитель
2dad60395e
Коммит
31060b4b05
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче