diff --git a/CLOBBER b/CLOBBER index e5e64eaa8f8..03223e952fc 100644 --- a/CLOBBER +++ b/CLOBBER @@ -22,8 +22,4 @@ # changes to stick? As of bug 928195, this shouldn't be necessary! Please # don't change CLOBBER for WebIDL changes any more. -Bug 1155718: Merge Bluetooth v1/v2 files for all simple cases - -This patch set renames source files. This requires updating the -build system's dependency information from scratch. The issue has -been reported in bug 1154232. +Bug 1039866: Removing the metro browser diff --git a/accessible/windows/msaa/AccessibleWrap.cpp b/accessible/windows/msaa/AccessibleWrap.cpp index 099dd425c51..05e4f958dcd 100644 --- a/accessible/windows/msaa/AccessibleWrap.cpp +++ b/accessible/windows/msaa/AccessibleWrap.cpp @@ -1180,13 +1180,6 @@ AccessibleWrap::HandleAccEvent(AccEvent* aEvent) nsresult rv = Accessible::HandleAccEvent(aEvent); NS_ENSURE_SUCCESS(rv, rv); - // Don't fire native MSAA events or mess with the system caret - // when running in metro mode. This confuses input focus tracking - // in metro's UIA implementation. - if (XRE_GetWindowsEnvironment() == WindowsEnvironmentType_Metro) { - return NS_OK; - } - uint32_t eventType = aEvent->GetEventType(); static_assert(sizeof(gWinEventMap)/sizeof(gWinEventMap[0]) == nsIAccessibleEvent::EVENT_LAST_ENTRY, diff --git a/browser/app-rules.mk b/browser/app-rules.mk index 9672782a2cd..2c31653046f 100644 --- a/browser/app-rules.mk +++ b/browser/app-rules.mk @@ -1,4 +1 @@ PURGECACHES_DIRS = $(DIST)/bin/browser -ifdef MOZ_METRO -PURGECACHES_DIRS += $(DIST)/bin/metro -endif diff --git a/browser/app/moz.build b/browser/app/moz.build index 626ccc0efc6..e085800f8d0 100644 --- a/browser/app/moz.build +++ b/browser/app/moz.build @@ -6,7 +6,7 @@ DIRS += ['profile/extensions'] -if CONFIG['OS_ARCH'] == 'WINNT' and (CONFIG['MOZ_METRO'] or CONFIG['MOZ_ASAN']): +if CONFIG['OS_ARCH'] == 'WINNT' and CONFIG['MOZ_ASAN']: GeckoProgram(CONFIG['MOZ_APP_NAME']) else: GeckoProgram(CONFIG['MOZ_APP_NAME'], msvcrt='static') @@ -43,10 +43,9 @@ LOCAL_INCLUDES += [ '/xpcom/build', ] -if not CONFIG['MOZ_METRO']: - DELAYLOAD_DLLS += [ - 'mozglue.dll', - ] +DELAYLOAD_DLLS += [ + 'mozglue.dll', +] USE_LIBS += [ 'mozglue', diff --git a/browser/app/nsBrowserApp.cpp b/browser/app/nsBrowserApp.cpp index 56fb4bb4587..33c75f020f9 100644 --- a/browser/app/nsBrowserApp.cpp +++ b/browser/app/nsBrowserApp.cpp @@ -31,10 +31,6 @@ #include "nsIFile.h" #include "nsStringGlue.h" -// Easy access to a five second startup delay used to get -// a debugger attached in the metro environment. -// #define DEBUG_delay_start_metro - #ifdef XP_WIN // we want a wmain entry point #ifdef MOZ_ASAN @@ -61,12 +57,6 @@ using namespace mozilla; #define kOSXResourcesFolder "Resources" #endif #define kDesktopFolder "browser" -#define kMetroFolder "metro" -#define kMetroAppIniFilename "metroapp.ini" -#ifdef XP_WIN -#define kMetroTestFile "tests.ini" -const char* kMetroConsoleIdParam = "testconsoleid="; -#endif static void Output(const char *fmt, ... ) { @@ -128,40 +118,6 @@ static bool IsArg(const char* arg, const char* s) return false; } -#if defined(XP_WIN) && defined(MOZ_METRO) -/* - * AttachToTestHarness - Windows helper for when we are running - * in the immersive environment. Firefox is launched by Windows in - * response to a request by metrotestharness, which is launched by - * runtests.py. As such stdout in fx doesn't point to the right - * stream. This helper touches up stdout such that test output gets - * routed to a named pipe metrotestharness creates and dumps to its - * stdout. - */ -static void AttachToTestHarness() -{ - // attach to the metrotestharness named logging pipe - HANDLE winOut = CreateFileA("\\\\.\\pipe\\metrotestharness", - GENERIC_WRITE, - FILE_SHARE_WRITE, 0, - OPEN_EXISTING, 0, 0); - - if (winOut == INVALID_HANDLE_VALUE) { - OutputDebugStringW(L"Could not create named logging pipe.\n"); - return; - } - - // Set the c runtime handle - int stdOut = _open_osfhandle((intptr_t)winOut, _O_APPEND); - if (stdOut == -1) { - OutputDebugStringW(L"Could not open c-runtime handle.\n"); - return; - } - FILE *fp = _fdopen(stdOut, "a"); - *stdout = *fp; -} -#endif - XRE_GetFileFromPathType XRE_GetFileFromPath; XRE_CreateAppDataType XRE_CreateAppData; XRE_FreeAppDataType XRE_FreeAppData; @@ -234,167 +190,28 @@ static int do_main(int argc, char* argv[], nsIFile *xreDirectory) return result; } - bool metroOnDesktop = false; - -#ifdef MOZ_METRO - if (argc > 1) { - // This command-line flag is passed to our executable when it is to be - // launched in metro mode (i.e. our EXE is registered as the default - // browser and the user has tapped our EXE's tile) - if (IsArg(argv[1], "ServerName:DefaultBrowserServer")) { - mainFlags = XRE_MAIN_FLAG_USE_METRO; - argv[1] = argv[0]; - argv++; - argc--; - } else if (IsArg(argv[1], "BackgroundSessionClosed")) { - // This command line flag is used for indirect shutdowns, the OS - // relaunches Metro Firefox with this command line arg. - mainFlags = XRE_MAIN_FLAG_USE_METRO; - } else { -#ifndef RELEASE_BUILD - // This command-line flag is used to test the metro browser in a desktop - // environment. - for (int idx = 1; idx < argc; idx++) { - if (IsArg(argv[idx], "metrodesktop")) { - metroOnDesktop = true; - // Disable crash reporting when running in metrodesktop mode. - char crashSwitch[] = "MOZ_CRASHREPORTER_DISABLE=1"; - putenv(crashSwitch); - break; - } - } -#endif - } + ScopedAppData appData(&sAppData); + nsCOMPtr exeFile; + rv = mozilla::BinaryPath::GetFile(argv[0], getter_AddRefs(exeFile)); + if (NS_FAILED(rv)) { + Output("Couldn't find the application directory.\n"); + return 255; } -#endif - // Desktop browser launch - if (mainFlags != XRE_MAIN_FLAG_USE_METRO && !metroOnDesktop) { - ScopedAppData appData(&sAppData); - nsCOMPtr exeFile; - rv = mozilla::BinaryPath::GetFile(argv[0], getter_AddRefs(exeFile)); - if (NS_FAILED(rv)) { - Output("Couldn't find the application directory.\n"); - return 255; - } - - nsCOMPtr greDir; - exeFile->GetParent(getter_AddRefs(greDir)); + nsCOMPtr greDir; + exeFile->GetParent(getter_AddRefs(greDir)); #ifdef XP_MACOSX - greDir->SetNativeLeafName(NS_LITERAL_CSTRING(kOSXResourcesFolder)); + greDir->SetNativeLeafName(NS_LITERAL_CSTRING(kOSXResourcesFolder)); #endif - nsCOMPtr appSubdir; - greDir->Clone(getter_AddRefs(appSubdir)); - appSubdir->Append(NS_LITERAL_STRING(kDesktopFolder)); + nsCOMPtr appSubdir; + greDir->Clone(getter_AddRefs(appSubdir)); + appSubdir->Append(NS_LITERAL_STRING(kDesktopFolder)); - SetStrongPtr(appData.directory, static_cast(appSubdir.get())); - // xreDirectory already has a refcount from NS_NewLocalFile - appData.xreDirectory = xreDirectory; - - return XRE_main(argc, argv, &appData, mainFlags); - } - - // Metro browser launch -#ifdef MOZ_METRO - nsCOMPtr iniFile, appSubdir; - - xreDirectory->Clone(getter_AddRefs(iniFile)); - xreDirectory->Clone(getter_AddRefs(appSubdir)); - - iniFile->Append(NS_LITERAL_STRING(kMetroFolder)); - iniFile->Append(NS_LITERAL_STRING(kMetroAppIniFilename)); - - appSubdir->Append(NS_LITERAL_STRING(kMetroFolder)); - - nsAutoCString path; - if (NS_FAILED(iniFile->GetNativePath(path))) { - Output("Couldn't get ini file path.\n"); - return 255; - } - - nsXREAppData *appData; - rv = XRE_CreateAppData(iniFile, &appData); - if (NS_FAILED(rv) || !appData) { - Output("Couldn't read application.ini"); - return 255; - } - - SetStrongPtr(appData->directory, static_cast(appSubdir.get())); + SetStrongPtr(appData.directory, static_cast(appSubdir.get())); // xreDirectory already has a refcount from NS_NewLocalFile - appData->xreDirectory = xreDirectory; + appData.xreDirectory = xreDirectory; -#ifdef XP_WIN - if (!metroOnDesktop) { - nsCOMPtr testFile; - - xreDirectory->Clone(getter_AddRefs(testFile)); - testFile->Append(NS_LITERAL_STRING(kMetroTestFile)); - - nsAutoCString path; - if (NS_FAILED(testFile->GetNativePath(path))) { - Output("Couldn't get test file path.\n"); - return 255; - } - - // Check for a metro test harness command line args file - HANDLE hTestFile = CreateFileA(path.get(), - GENERIC_READ, - 0, nullptr, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, - nullptr); - if (hTestFile != INVALID_HANDLE_VALUE) { - // Typical test harness command line args string is around 100 bytes. - char buffer[1024]; - memset(buffer, 0, sizeof(buffer)); - DWORD bytesRead = 0; - if (!ReadFile(hTestFile, (VOID*)buffer, sizeof(buffer)-1, - &bytesRead, nullptr) || !bytesRead) { - CloseHandle(hTestFile); - printf("failed to read test file '%s'", testFile); - return -1; - } - CloseHandle(hTestFile); - - // Build new args array - char* newArgv[20]; - int newArgc = 1; - - memset(newArgv, 0, sizeof(newArgv)); - - char* ptr = buffer; - newArgv[0] = ptr; - while (*ptr != '\0' && - (ptr - buffer) < sizeof(buffer) && - newArgc < ARRAYSIZE(newArgv)) { - if (isspace(*ptr)) { - *ptr = '\0'; - ptr++; - newArgv[newArgc] = ptr; - newArgc++; - continue; - } - ptr++; - } - if (ptr == newArgv[newArgc-1]) - newArgc--; - - // attach browser stdout to metrotestharness stdout - AttachToTestHarness(); - - int result = XRE_main(newArgc, newArgv, appData, mainFlags); - XRE_FreeAppData(appData); - return result; - } - } -#endif - - int result = XRE_main(argc, argv, appData, mainFlags); - XRE_FreeAppData(appData); - return result; -#endif - - NS_NOTREACHED("browser do_main failed to pickup proper initialization"); - return 255; + return XRE_main(argc, argv, &appData, mainFlags); } #ifdef XP_WIN @@ -572,11 +389,8 @@ InitXPCOMGlue(const char *argv0, nsIFile **xreDirectory) return rv; } -#ifndef MOZ_METRO - // This will set this thread as the main thread, which in metro land is - // wrong. We initialize this later from the right thread in nsAppRunner. + // This will set this thread as the main thread. NS_LogInit(); -#endif // chop XPCOM_DLL off exePath *lastSlash = '\0'; @@ -597,9 +411,6 @@ InitXPCOMGlue(const char *argv0, nsIFile **xreDirectory) int main(int argc, char* argv[]) { -#ifdef DEBUG_delay_start_metro - Sleep(5000); -#endif uint64_t start = TimeStamp_Now(); #ifdef XP_MACOSX diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js index 955e5824598..c603c60e7a3 100644 --- a/browser/app/profile/firefox.js +++ b/browser/app/profile/firefox.js @@ -140,7 +140,6 @@ pref("app.update.cert.maxErrors", 5); // |app.update.url.override| user preference has been set for testing updates or // when the |app.update.cert.checkAttributes| preference is set to false. Also, // the |app.update.url.override| preference should ONLY be used for testing. -// IMPORTANT! metro.js should also be updated for updates to certs.X.issuerName // IMPORTANT! media.gmp-manager.certs.* prefs should also be updated if these // are updated. @@ -162,17 +161,8 @@ pref("app.update.enabled", true); pref("app.update.auto", true); // See chart in nsUpdateService.js source for more details -// incompatibilities are ignored by updates in Metro pref("app.update.mode", 1); -#ifdef XP_WIN -#ifdef MOZ_METRO -// Enables update checking in the Metro environment. -// add-on incompatibilities are ignored by updates in Metro. -pref("app.update.metro.enabled", true); -#endif -#endif - // If set to true, the Update Service will present no UI for any event. pref("app.update.silent", false); diff --git a/browser/base/content/browser-menubar.inc b/browser/base/content/browser-menubar.inc index 53a3f1df11d..30b09d456d6 100644 --- a/browser/base/content/browser-menubar.inc +++ b/browser/base/content/browser-menubar.inc @@ -48,15 +48,6 @@ command="Browser:OpenFile" key="openFileKb" accesskey="&openFileCmd.accesskey;"/> -#ifdef HAVE_SHELL_SERVICE -#ifdef XP_WIN -#ifdef MOZ_METRO - -#endif -#endif -#endif { this.gmpInstallManager = new GMPInstallManager(); @@ -1561,9 +1556,6 @@ var gBrowserInit = { Cu.reportError(ex); } - if (typeof WindowsPrefSync !== 'undefined') { - WindowsPrefSync.uninit(); - } if (this.gmpInstallManager) { this.gmpInstallManager.uninit(); } @@ -3037,56 +3029,6 @@ function populateMirrorTabMenu(popup) { }); }; -function _checkDefaultAndSwitchToMetro() { -#ifdef HAVE_SHELL_SERVICE -#ifdef XP_WIN -#ifdef MOZ_METRO - let shell = Components.classes["@mozilla.org/browser/shell-service;1"]. - getService(Components.interfaces.nsIShellService); - let isDefault = shell.isDefaultBrowser(false, false); - - if (isDefault) { - let appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"]. - getService(Components.interfaces.nsIAppStartup); - - Services.prefs.setBoolPref('browser.sessionstore.resume_session_once', true); - - let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"] - .createInstance(Ci.nsISupportsPRBool); - Services.obs.notifyObservers(cancelQuit, "quit-application-requested", "restart"); - - if (!cancelQuit.data) { - appStartup.quit(Components.interfaces.nsIAppStartup.eAttemptQuit | - Components.interfaces.nsIAppStartup.eRestartTouchEnvironment); - } - return true; - } - return false; -#endif -#endif -#endif -} - -function SwitchToMetro() { -#ifdef HAVE_SHELL_SERVICE -#ifdef XP_WIN -#ifdef MOZ_METRO - if (this._checkDefaultAndSwitchToMetro()) { - return; - } - - let shell = Components.classes["@mozilla.org/browser/shell-service;1"]. - getService(Components.interfaces.nsIShellService); - - shell.setDefaultBrowser(false, false); - - let intervalID = window.setInterval(this._checkDefaultAndSwitchToMetro, 1000); - window.setTimeout(function() { window.clearInterval(intervalID); }, 10000); -#endif -#endif -#endif -} - function getWebNavigation() { return gBrowser.webNavigation; diff --git a/browser/base/content/sync/setup.js b/browser/base/content/sync/setup.js index d8092760b77..f81af7b86a6 100644 --- a/browser/base/content/sync/setup.js +++ b/browser/base/content/sync/setup.js @@ -472,13 +472,6 @@ var gSyncSetup = { Weave.Service.identity.syncKey = Weave.Utils.generatePassphrase(); this._handleNoScript(false); Weave.Svc.Prefs.set("firstSync", "newAccount"); -#ifdef XP_WIN -#ifdef MOZ_METRO - if (document.getElementById("metroSetupCheckbox").checked) { - Services.metro.storeSyncInfo(email, password, Weave.Service.identity.syncKey); - } -#endif -#endif this.wizardFinish(); return false; } diff --git a/browser/base/content/sync/setup.xul b/browser/base/content/sync/setup.xul index f01dad9f992..9b75a1dbf62 100644 --- a/browser/base/content/sync/setup.xul +++ b/browser/base/content/sync/setup.xul @@ -172,20 +172,6 @@