diff --git a/mozilla/content/xml/content/src/nsXMLElement.cpp b/mozilla/content/xml/content/src/nsXMLElement.cpp index a725c57c172..dd9a3508d94 100644 --- a/mozilla/content/xml/content/src/nsXMLElement.cpp +++ b/mozilla/content/xml/content/src/nsXMLElement.cpp @@ -62,6 +62,7 @@ #include "nsIPresShell.h" #include "nsGUIEvent.h" #include "nsPresContext.h" +#include "nsIBrowserDOMWindow.h" #include "nsIDOMCSSStyleDeclaration.h" #include "nsIDOMViewCSS.h" #include "nsIXBLService.h" @@ -232,8 +233,9 @@ nsXMLElement::MaybeTriggerAutoLink(nsIDocShell *aShell) return NS_OK; } - if (!nsContentUtils::GetBoolPref("browser.block.target_new_window")) { - // not blocking new windows + if (nsContentUtils::GetIntPref("browser.link.open_newwindow", + nsIBrowserDOMWindow::OPEN_NEWWINDOW) == + nsIBrowserDOMWindow::OPEN_NEWWINDOW) { verb = eLinkVerb_New; } } else if (value.EqualsLiteral("replace")) { @@ -325,7 +327,9 @@ nsXMLElement::HandleDOMEvent(nsPresContext* aPresContext, // XXX Should probably do this using atoms if (show.EqualsLiteral("new")) { - if (!nsContentUtils::GetBoolPref("browser.block.target_new_window")) { + if (nsContentUtils::GetIntPref("browser.link.open_newwindow", + nsIBrowserDOMWindow::OPEN_NEWWINDOW) == + nsIBrowserDOMWindow::OPEN_NEWWINDOW) { verb = eLinkVerb_New; } } else if (show.EqualsLiteral("replace")) { diff --git a/mozilla/docshell/base/nsDocShell.h b/mozilla/docshell/base/nsDocShell.h index 094ca7da35a..350f15e7c10 100644 --- a/mozilla/docshell/base/nsDocShell.h +++ b/mozilla/docshell/base/nsDocShell.h @@ -355,9 +355,6 @@ protected: PRPackedBool mIsBeingDestroyed; - // Disallow popping up new windows with target= - PRPackedBool mDisallowPopupWindows; - // Validate window targets to prevent frameset spoofing PRPackedBool mValidateOrigin; diff --git a/mozilla/dom/public/idl/base/Makefile.in b/mozilla/dom/public/idl/base/Makefile.in index d70b5f2f8ec..f530fa09914 100644 --- a/mozilla/dom/public/idl/base/Makefile.in +++ b/mozilla/dom/public/idl/base/Makefile.in @@ -56,6 +56,7 @@ SDK_XPIDLSRCS = \ $(NULL) XPIDLSRCS = \ + nsIBrowserDOMWindow.idl \ nsIDOMCRMFObject.idl \ nsIDOMCrypto.idl \ nsIDOMHistory.idl \ diff --git a/mozilla/modules/libpref/src/init/all.js b/mozilla/modules/libpref/src/init/all.js index f032ec28686..507d0865a0f 100644 --- a/mozilla/modules/libpref/src/init/all.js +++ b/mozilla/modules/libpref/src/init/all.js @@ -147,6 +147,12 @@ pref("browser.tabs.loadGroup", 1); pref("browser.tabs.loadOnNewTab", 0); pref("browser.windows.loadOnNewWindow", 1); +// link handling in tabbed browsers. values from nsIBrowserDOMWindow. +pref("browser.link.open_external", 1); +pref("browser.link.open_newwindow", 2); +pref("browser.link.open_newwindow.ui", 3); // prefs UI version +pref("browser.link.open_newwindow.restriction", 0); // values from GlobalWindow + // view source pref("view_source.syntax_highlight", true); pref("view_source.wrap_long_lines", false); @@ -391,7 +397,6 @@ pref("capability.policy.default.Clipboard.cutcopy", "noAccess"); pref("capability.policy.default.Clipboard.paste", "noAccess"); // Scripts & Windows prefs -pref("browser.block.target_new_window", false); pref("dom.disable_image_src_set", false); pref("dom.disable_window_flip", false); pref("dom.disable_window_move_resize", false); @@ -1072,9 +1077,6 @@ pref("intl.jis0208.map", "CP932"); pref("browser.drag_out_of_frame_style", 1); pref("ui.key.saveLink.shift", false); // true = shift, false = meta -// should a GURL event open a new window or re-use (4.x compat) -pref("browser.always_reuse_window", false); - // default font name (in UTF8) pref("font.name.serif.ar", "Lucida Grande");