From 107e12ab5689de76ec46755f79b37e8b0c22da6e Mon Sep 17 00:00:00 2001 From: "aaronleventhal%moonset.net" Date: Thu, 27 Jul 2006 16:54:55 +0000 Subject: [PATCH] Bug 340841. Infinite loop with some plugins when screen reader is runnng -- empty tabs keep opening. r=biesi, sr=jst --- docshell/base/nsWebNavigationInfo.cpp | 37 --------------------------- 1 file changed, 37 deletions(-) diff --git a/docshell/base/nsWebNavigationInfo.cpp b/docshell/base/nsWebNavigationInfo.cpp index ae0d52909c9..f52ef53841a 100644 --- a/docshell/base/nsWebNavigationInfo.cpp +++ b/docshell/base/nsWebNavigationInfo.cpp @@ -41,12 +41,6 @@ #include "nsServiceManagerUtils.h" #include "nsIDocumentLoaderFactory.h" #include "nsIPluginManager.h" -#include "nsILookAndFeel.h" -#include "nsWidgetsCID.h" -#include "nsIMIMEService.h" -#include "nsIMIMEInfo.h" - -static NS_DEFINE_CID(kLookAndFeelCID, NS_LOOKANDFEEL_CID); NS_IMPL_ISUPPORTS1(nsWebNavigationInfo, nsIWebNavigationInfo) @@ -149,37 +143,6 @@ nsWebNavigationInfo::IsTypeSupportedInternal(const nsCString& aType, } } else if (value.EqualsLiteral(PLUGIN_DLF_CONTRACT)) { -#ifdef ACCESSIBILITY - // If a screen reader is running, prefer external handlers over plugins - // because they are better at dealing with accessibility -- they don't - // have the keyboard navigation problems and are more likely to expose - // their content via MSAA. - // XXX Eventually we will remove this once the major content types are as - // screen reader accessible in plugins as in external apps. - nsCOMPtr lookAndFeel = do_GetService(kLookAndFeelCID); - if (lookAndFeel) { - PRInt32 isScreenReaderActive; - lookAndFeel->GetMetric(nsILookAndFeel::eMetric_IsScreenReaderActive, - isScreenReaderActive); - if (isScreenReaderActive) { - nsCOMPtr mimeService(do_GetService("@mozilla.org/mime;1")); - if (mimeService) { - nsCOMPtr mimeInfo; - mimeService->GetFromTypeAndExtension(aType, EmptyCString(), - getter_AddRefs(mimeInfo)); - if (mimeInfo) { - PRBool hasDefaultHandler; - mimeInfo->GetHasDefaultHandler(&hasDefaultHandler); - if (hasDefaultHandler) { - // External app exists to handle this type, so use it instead of PLUGIN - *aIsSupported = nsIWebNavigationInfo::UNSUPPORTED; - return NS_OK; - } - } - } - } - } -#endif *aIsSupported = nsIWebNavigationInfo::PLUGIN; } else {