mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1317110 - Remove QuickTime plugin quirks handling. r=jimm
This commit is contained in:
parent
c331fa9ecb
commit
cd071486d0
@ -211,47 +211,7 @@ nsPluginDirServiceProvider::GetFile(const char *charProp, bool *persistant,
|
||||
do_CreateInstance("@mozilla.org/windows-registry-key;1");
|
||||
NS_ENSURE_TRUE(regKey, NS_ERROR_FAILURE);
|
||||
|
||||
if (nsCRT::strcmp(charProp, NS_WIN_QUICKTIME_SCAN_KEY) == 0) {
|
||||
nsAdoptingCString strVer = Preferences::GetCString(charProp);
|
||||
if (!strVer) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
verBlock minVer;
|
||||
TranslateVersionStr(NS_ConvertASCIItoUTF16(strVer).get(), &minVer);
|
||||
|
||||
// Look for the Quicktime system installation plugins directory
|
||||
verBlock qtVer;
|
||||
ClearVersion(&qtVer);
|
||||
|
||||
// First we need to check the version of Quicktime via checking
|
||||
// the EXE's version table
|
||||
rv = regKey->Open(nsIWindowsRegKey::ROOT_KEY_LOCAL_MACHINE,
|
||||
NS_LITERAL_STRING("software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\QuickTimePlayer.exe"),
|
||||
nsIWindowsRegKey::ACCESS_READ);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsAutoString path;
|
||||
rv = regKey->ReadStringValue(NS_LITERAL_STRING(""), path);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
GetFileVersion(path.get(), &qtVer);
|
||||
}
|
||||
regKey->Close();
|
||||
}
|
||||
if (CompareVersion(qtVer, minVer) < 0)
|
||||
return rv;
|
||||
|
||||
rv = regKey->Open(nsIWindowsRegKey::ROOT_KEY_LOCAL_MACHINE,
|
||||
NS_LITERAL_STRING("software\\Apple Computer, Inc.\\QuickTime"),
|
||||
nsIWindowsRegKey::ACCESS_READ);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsAutoString path;
|
||||
rv = regKey->ReadStringValue(NS_LITERAL_STRING("InstallDir"), path);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
path += NS_LITERAL_STRING("\\Plugins");
|
||||
rv = NS_NewLocalFile(path, true,
|
||||
getter_AddRefs(localFile));
|
||||
}
|
||||
}
|
||||
} else if (nsCRT::strcmp(charProp, NS_WIN_WMP_SCAN_KEY) == 0) {
|
||||
if (nsCRT::strcmp(charProp, NS_WIN_WMP_SCAN_KEY) == 0) {
|
||||
nsAdoptingCString strVer = Preferences::GetCString(charProp);
|
||||
if (!strVer) {
|
||||
return NS_ERROR_FAILURE;
|
||||
|
@ -16,7 +16,6 @@ class nsISimpleEnumerator;
|
||||
|
||||
// Note: Our directory service provider scan keys are prefs which are check
|
||||
// for minimum versions compatibility
|
||||
#define NS_WIN_QUICKTIME_SCAN_KEY "plugin.scan.Quicktime"
|
||||
#define NS_WIN_WMP_SCAN_KEY "plugin.scan.WindowsMediaPlayer"
|
||||
|
||||
//*****************************************************************************
|
||||
|
@ -2555,8 +2555,7 @@ nsresult nsPluginHost::FindPlugins(bool aCreatePluginList, bool * aPluginsChange
|
||||
// Scan the installation paths of our popular plugins if the prefs are enabled
|
||||
|
||||
// This table controls the order of scanning
|
||||
const char* const prefs[] = {NS_WIN_QUICKTIME_SCAN_KEY,
|
||||
NS_WIN_WMP_SCAN_KEY};
|
||||
const char* const prefs[] = {NS_WIN_WMP_SCAN_KEY};
|
||||
|
||||
uint32_t size = sizeof(prefs) / sizeof(prefs[0]);
|
||||
|
||||
|
@ -1357,11 +1357,6 @@ PluginInstanceChild::AnswerNPP_SetWindow(const NPRemoteWindow& aWindow)
|
||||
switch (aWindow.type) {
|
||||
case NPWindowTypeWindow:
|
||||
{
|
||||
// This check is now done in PluginInstanceParent before this call, so
|
||||
// we should never see it here.
|
||||
MOZ_ASSERT(!(GetQuirks() & QUIRK_QUICKTIME_AVOID_SETWINDOW) ||
|
||||
aWindow.width != 0 || aWindow.height != 0);
|
||||
|
||||
MOZ_ASSERT(mPluginWindowHWND,
|
||||
"Child plugin window must exist before call to SetWindow");
|
||||
|
||||
|
@ -1337,12 +1337,6 @@ PluginInstanceParent::NPP_SetWindow(const NPWindow* aWindow)
|
||||
} else {
|
||||
SubclassPluginWindow(reinterpret_cast<HWND>(aWindow->window));
|
||||
|
||||
// Skip SetWindow call for hidden QuickTime plugins.
|
||||
if ((mParent->GetQuirks() & QUIRK_QUICKTIME_AVOID_SETWINDOW) &&
|
||||
aWindow->width == 0 && aWindow->height == 0) {
|
||||
return NPERR_NO_ERROR;
|
||||
}
|
||||
|
||||
window.window = reinterpret_cast<uint64_t>(aWindow->window);
|
||||
window.x = aWindow->x;
|
||||
window.y = aWindow->y;
|
||||
|
@ -41,21 +41,10 @@ int GetQuirksFromMimeTypeAndFilename(const nsCString& aMimeType,
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef OS_WIN
|
||||
// QuickTime plugin usually loaded with audio/mpeg mimetype
|
||||
NS_NAMED_LITERAL_CSTRING(quicktime, "npqtplugin");
|
||||
if (FindInReadable(quicktime, aPluginFilename)) {
|
||||
quirks |= QUIRK_QUICKTIME_AVOID_SETWINDOW;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
// Whitelist Flash and Quicktime to support offline renderer
|
||||
NS_NAMED_LITERAL_CSTRING(quicktime, "QuickTime Plugin.plugin");
|
||||
// Whitelist Flash to support offline renderer.
|
||||
if (specialType == nsPluginHost::eSpecialType_Flash) {
|
||||
quirks |= QUIRK_ALLOW_OFFLINE_RENDERER;
|
||||
} else if (FindInReadable(quicktime, aPluginFilename)) {
|
||||
quirks |= QUIRK_ALLOW_OFFLINE_RENDERER;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -37,9 +37,6 @@ enum PluginQuirks {
|
||||
// Win: Addresses a flash bug with mouse capture and full screen
|
||||
// windows.
|
||||
QUIRK_FLASH_FIXUP_MOUSE_CAPTURE = 1 << 6,
|
||||
// Win: QuickTime steals focus on SetWindow calls even if it's hidden.
|
||||
// Avoid calling SetWindow in that case.
|
||||
QUIRK_QUICKTIME_AVOID_SETWINDOW = 1 << 7,
|
||||
// Win: Check to make sure the parent window has focus before calling
|
||||
// set focus on the child. Addresses a full screen dialog prompt
|
||||
// problem in Silverlight.
|
||||
|
@ -494,10 +494,8 @@ WindowIsDeferredWindow(HWND hWnd)
|
||||
|
||||
// Plugin windows that can trigger ipc calls in child:
|
||||
// 'ShockwaveFlashFullScreen' - flash fullscreen window
|
||||
// 'QTNSHIDDEN' - QuickTime
|
||||
// 'AGFullScreenWinClass' - silverlight fullscreen window
|
||||
if (className.EqualsLiteral("ShockwaveFlashFullScreen") ||
|
||||
className.EqualsLiteral("QTNSHIDDEN") ||
|
||||
className.EqualsLiteral("AGFullScreenWinClass")) {
|
||||
SetPropW(hWnd, k3rdPartyWindowProp, (HANDLE)1);
|
||||
return true;
|
||||
|
@ -3435,9 +3435,6 @@ pref("print.print_extra_margin", 90); // twips (90 twips is an eigth of an inch)
|
||||
// Whether to extend the native dialog with information on printing frames.
|
||||
pref("print.extend_native_print_dialog", true);
|
||||
|
||||
// Locate plugins by scanning the Quicktime installation directory with a minimum version
|
||||
pref("plugin.scan.Quicktime", "5.0");
|
||||
|
||||
// Locate and scan the Window Media Player installation directory for plugins with a minimum version
|
||||
pref("plugin.scan.WindowsMediaPlayer", "7.0");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user