mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 18:26:15 +00:00
Fix for bug #8357; approved by chofmann@netscape.com; reviewed by don@netscape.com
This commit is contained in:
parent
73c6743dbb
commit
dbcd4010aa
@ -20,6 +20,7 @@
|
||||
var prefwindow = null;
|
||||
var appCoreName = "";
|
||||
var defaultStatus = "default status text";
|
||||
var debugSecurity = false; // Set this true to enable Security chrome testing.
|
||||
|
||||
function Startup()
|
||||
{
|
||||
@ -695,19 +696,20 @@
|
||||
}
|
||||
|
||||
function securityOn() {
|
||||
// Set debugSecurity (at top of file) to turn this code on.
|
||||
if ( !debugSecurity ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var security = document.getElementById("Browser:Security");
|
||||
if ( security.getAttribute("secure") == "false" ) {
|
||||
security.setAttribute("secure","true");
|
||||
// Temporary till onchange handlers work.
|
||||
onSecurity();
|
||||
}
|
||||
}
|
||||
function securityOff() {
|
||||
var security = document.getElementById("Browser:Security");
|
||||
if ( security.getAttribute("secure") == "true" ) {
|
||||
security.setAttribute("secure","false");
|
||||
// Temporary till onchange handlers work.
|
||||
onSecurity();
|
||||
}
|
||||
}
|
||||
function doTests() {
|
||||
|
@ -40,6 +40,7 @@ function onLoad() {
|
||||
if ( !browser ) {
|
||||
dump( "unable to get browser app core\n" );
|
||||
toolkit.CloseWindow( window );
|
||||
return;
|
||||
}
|
||||
|
||||
/* Give input field the focus. */
|
||||
|
@ -1,13 +1,10 @@
|
||||
var coreName;
|
||||
|
||||
|
||||
function StartupViewSource() {
|
||||
// Generate unique name.
|
||||
coreName = "ViewSource." + ( new Date() ).getTime().toString();
|
||||
// Generate unique name (var appCoreName declared in navigator.js).
|
||||
appCoreName = "ViewSource." + ( new Date() ).getTime().toString();
|
||||
|
||||
// Create and initialize the browser app core.
|
||||
appCore = new BrowserAppCore();
|
||||
appCore.Init( coreName );
|
||||
appCore.Init( appCoreName );
|
||||
appCore.setContentWindow(window.frames[0]);
|
||||
appCore.setWebShellWindow(window);
|
||||
appCore.setToolbarWindow(window);
|
||||
@ -16,5 +13,5 @@
|
||||
var url = document.getElementById("args").getAttribute("value");
|
||||
|
||||
// Load the source (the app core will magically know what to do).
|
||||
XPAppCoresManager.Find( coreName ).loadUrl(url);
|
||||
appCore.loadUrl(url);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user