From 21ff78c8b17a5b13311e9f9bdcce62abbbcdb222 Mon Sep 17 00:00:00 2001 From: "neil%parkwaycc.co.uk" Date: Sat, 9 Jul 2005 00:14:48 +0000 Subject: [PATCH] Disable error pages in composer (webpage editor) b=300022 r=biesi sr=darin a=asa git-svn-id: svn://10.0.0.236/trunk@175861 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsDocShell.cpp | 14 ++++++++++++++ mozilla/docshell/base/nsIDocShell.idl | 5 ++++- mozilla/editor/ui/composer/content/editor.js | 1 + mozilla/extensions/help/resources/content/help.js | 1 + 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index 4e6b5ad8877..c3eb13fb9e3 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -1697,6 +1697,20 @@ nsDocShell::SetSecurityUI(nsISecureBrowserUI *aSecurityUI) return NS_OK; } +NS_IMETHODIMP +nsDocShell::GetUseErrorPages(PRBool *aUseErrorPages) +{ + *aUseErrorPages = mUseErrorPages; + return NS_OK; +} + +NS_IMETHODIMP +nsDocShell::SetUseErrorPages(PRBool aUseErrorPages) +{ + mUseErrorPages = aUseErrorPages; + return NS_OK; +} + //***************************************************************************** // nsDocShell::nsIDocShellTreeItem //***************************************************************************** diff --git a/mozilla/docshell/base/nsIDocShell.idl b/mozilla/docshell/base/nsIDocShell.idl index 770c399ea97..3e4f13d5d22 100644 --- a/mozilla/docshell/base/nsIDocShell.idl +++ b/mozilla/docshell/base/nsIDocShell.idl @@ -66,7 +66,7 @@ interface nsISHEntry; interface nsILayoutHistoryState; interface nsISecureBrowserUI; -[scriptable, uuid(5d1529b3-f825-45af-a2ee-1ae4bc2b2b2a)] +[scriptable, uuid(1c9bcef6-98ef-4a3e-9df2-beda50fce980)] interface nsIDocShell : nsISupports { /** @@ -382,5 +382,8 @@ interface nsIDocShell : nsISupports /* Track whether we're currently restoring a document presentation. */ readonly attribute boolean restoringDocument; + + /* attribute to access whether error pages are enabled */ + attribute boolean useErrorPages; }; diff --git a/mozilla/editor/ui/composer/content/editor.js b/mozilla/editor/ui/composer/content/editor.js index d17c8ccb314..7e8c50cb1a2 100644 --- a/mozilla/editor/ui/composer/content/editor.js +++ b/mozilla/editor/ui/composer/content/editor.js @@ -527,6 +527,7 @@ function SetFocusOnStartup() function EditorStartup() { var ds = GetCurrentEditorElement().docShell; + ds.useErrorPages = false; var root = ds.QueryInterface(Components.interfaces.nsIDocShellTreeItem). rootTreeItem.QueryInterface(Components.interfaces.nsIDocShell); diff --git a/mozilla/extensions/help/resources/content/help.js b/mozilla/extensions/help/resources/content/help.js index 818112eca6a..68f49f0b48c 100644 --- a/mozilla/extensions/help/resources/content/help.js +++ b/mozilla/extensions/help/resources/content/help.js @@ -144,6 +144,7 @@ function init() { helpGlossaryPanel = document.getElementById("help-glossary-panel"); helpBrowser = document.getElementById("help-content"); helpExternal = document.getElementById("help-external"); + helpExternal.docShell.useErrorPages = false; helpExternal .docShell .QueryInterface(Components.interfaces.nsIInterfaceRequestor)