merge mozilla-inbound to mozilla-central a=merge

This commit is contained in:
Carsten "Tomcat" Book 2015-04-24 14:37:13 +02:00
commit c76ef69f41
763 changed files with 2831 additions and 72266 deletions

View File

@ -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

View File

@ -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,

View File

@ -1,4 +1 @@
PURGECACHES_DIRS = $(DIST)/bin/browser
ifdef MOZ_METRO
PURGECACHES_DIRS += $(DIST)/bin/metro
endif

View File

@ -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',

View File

@ -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<nsIFile> 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<nsIFile> 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<nsIFile> greDir;
exeFile->GetParent(getter_AddRefs(greDir));
nsCOMPtr<nsIFile> greDir;
exeFile->GetParent(getter_AddRefs(greDir));
#ifdef XP_MACOSX
greDir->SetNativeLeafName(NS_LITERAL_CSTRING(kOSXResourcesFolder));
greDir->SetNativeLeafName(NS_LITERAL_CSTRING(kOSXResourcesFolder));
#endif
nsCOMPtr<nsIFile> appSubdir;
greDir->Clone(getter_AddRefs(appSubdir));
appSubdir->Append(NS_LITERAL_STRING(kDesktopFolder));
nsCOMPtr<nsIFile> appSubdir;
greDir->Clone(getter_AddRefs(appSubdir));
appSubdir->Append(NS_LITERAL_STRING(kDesktopFolder));
SetStrongPtr(appData.directory, static_cast<nsIFile*>(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<nsIFile> 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<nsIFile*>(appSubdir.get()));
SetStrongPtr(appData.directory, static_cast<nsIFile*>(appSubdir.get()));
// xreDirectory already has a refcount from NS_NewLocalFile
appData->xreDirectory = xreDirectory;
appData.xreDirectory = xreDirectory;
#ifdef XP_WIN
if (!metroOnDesktop) {
nsCOMPtr<nsIFile> 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

View File

@ -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);

View File

@ -48,15 +48,6 @@
command="Browser:OpenFile"
key="openFileKb"
accesskey="&openFileCmd.accesskey;"/>
#ifdef HAVE_SHELL_SERVICE
#ifdef XP_WIN
#ifdef MOZ_METRO
<menuitem id="menu_switchToMetro"
label="&switchToMetroCmd2.label;"
oncommand="SwitchToMetro()"/>
#endif
#endif
#endif
<menuitem id="menu_close"
class="show-only-for-keyboard"
label="&closeCmd.label;"

View File

@ -1393,11 +1393,6 @@ var gBrowserInit = {
Cu.reportError("Could not end startup crash tracking: " + ex);
}
if (typeof WindowsPrefSync !== 'undefined') {
// Pulls in Metro controlled prefs and pushes out Desktop controlled prefs
WindowsPrefSync.init();
}
// Delay this a minute because there's no rush
setTimeout(() => {
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;

View File

@ -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;
}

View File

@ -172,20 +172,6 @@
<label class="status" value=" "/>
</hbox>
</row>
#ifdef XP_WIN
#ifdef MOZ_METRO
<row id="metroRow" align="center">
<spacer/>
<hbox align="center">
<checkbox label="&setup.setupMetro.label;"
accesskey="&setup.setupMetro.accesskey;"
control="weavePasswordConfirm"
id="metroSetupCheckbox"
checked="true"/>
</hbox>
</row>
#endif
#endif
<row id="TOSRow" align="center">
<spacer/>
<hbox align="center">

View File

@ -5,23 +5,20 @@ function test()
{
waitForExplicitFinish();
let doc;
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.selectedBrowser.addEventListener("load", function onload() {
gBrowser.selectedBrowser.removeEventListener("load", onload, true);
doc = content.document;
waitForFocus(performTest, content);
}, true);
content.location = "data:text/html,<a href='%23xxx'><span>word1 <span> word2 </span></span><span> word3</span></a>";
content.location = "data:text/html;charset=utf-8,<a href='%23xxx'><span>word1 <span> word2 </span></span><span> word3</span></a>";
function performTest()
{
let doc = content.document;
let link = doc.querySelector("a");;
let text = gatherTextUnder(link);
is(text, "word1 word2 word3", "Text under link is correctly computed.");
doc = null;
gBrowser.removeCurrentTab();
finish();
}

View File

@ -4,8 +4,7 @@
include $(topsrcdir)/config/config.mk
# On Windows only do this step for browser, skip for metro.
ifeq ($(MOZ_WIDGET_TOOLKIT) $(DIST_SUBDIR),windows browser)
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
BRANDING_FILES := \
firefox.ico \
document.ico \
@ -47,10 +46,3 @@ endif
BRANDING_DEST := $(DIST)/branding
BRANDING_TARGET := export
INSTALL_TARGETS += BRANDING
ifeq ($(MOZ_WIDGET_TOOLKIT) $(DIST_SUBDIR),windows metro)
VISUALMANIFEST := VisualElementsManifest.xml
VISUALMANIFEST_FLAGS := -Fsubstitution -DMOZ_APP_DISPLAYNAME=${MOZ_APP_DISPLAYNAME}
VISUALMANIFEST_PATH := $(DIST)/bin
PP_TARGETS += VISUALMANIFEST
endif

View File

@ -1,16 +0,0 @@
<Application
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<VisualElements
DisplayName="@MOZ_APP_DISPLAYNAME@"
Logo="tileresources\VisualElements_logo.png"
SmallLogo="tileresources\VisualElements_smalllogo.png"
ForegroundText="light"
BackgroundColor="#1c112e">
<DefaultTile
ShortName="@MOZ_APP_DISPLAYNAME@"
ShowName="allLogos"
/>
<SplashScreen
Image="tileresources\VisualElements_splashscreen.png" />
</VisualElements>
</Application>

View File

@ -4,10 +4,3 @@
# Branding Makefile
# - jars chrome artwork
# resources needed for the metro tile interface
ifeq ($(MOZ_WIDGET_TOOLKIT) $(DIST_SUBDIR),windows metro)
TILE_FILES := $(wildcard $(srcdir)/VisualElements*)
TILE_DEST := $(DIST)/bin/tileresources
INSTALL_TARGETS += TILE
endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

View File

@ -18,11 +18,3 @@ browser.jar:
content/branding/identity-icons-brand@2x.png (identity-icons-brand@2x.png)
content/branding/silhouette-40.svg (silhouette-40.svg)
content/branding/aboutDialog.css (aboutDialog.css)
#ifdef MOZ_METRO
content/branding/metro-about.css (metro-about.css)
content/branding/metro-about-footer.png (metro-about-footer.png)
content/branding/metro-about-wordmark.png (metro-about-wordmark.png)
content/branding/metro_firstrun_logo.png (metro_firstrun_logo.png)
content/branding/metro_firstrun_logo@1.4x.png (metro_firstrun_logo@1.4x.png)
content/branding/metro_firstrun_logo@1.8x.png (metro_firstrun_logo@1.8x.png)
#endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -1,14 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#about-flyoutpanel {
background-color: #331e54;
color: white;
}
#about-policy-label:hover,
#about-policy-label:active {
background: #181327;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

View File

@ -4,8 +4,7 @@
include $(topsrcdir)/config/config.mk
# On Windows only do this step for browser, skip for metro.
ifeq ($(MOZ_WIDGET_TOOLKIT) $(DIST_SUBDIR),windows browser)
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
BRANDING_FILES := \
firefox.ico \
document.ico \
@ -47,10 +46,3 @@ endif
BRANDING_DEST := $(DIST)/branding
BRANDING_TARGET := export
INSTALL_TARGETS += BRANDING
ifeq ($(MOZ_WIDGET_TOOLKIT) $(DIST_SUBDIR),windows metro)
VISUALMANIFEST := VisualElementsManifest.xml
VISUALMANIFEST_FLAGS := -Fsubstitution -DMOZ_APP_DISPLAYNAME=${MOZ_APP_DISPLAYNAME}
VISUALMANIFEST_PATH := $(DIST)/bin
PP_TARGETS += VISUALMANIFEST
endif

View File

@ -1,16 +0,0 @@
<Application
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<VisualElements
DisplayName="@MOZ_APP_DISPLAYNAME@"
Logo="tileresources\VisualElements_logo.png"
SmallLogo="tileresources\VisualElements_smalllogo.png"
ForegroundText="light"
BackgroundColor="#001226">
<DefaultTile
ShortName="@MOZ_APP_DISPLAYNAME@"
ShowName="allLogos"
/>
<SplashScreen
Image="tileresources\VisualElements_splashscreen.png" />
</VisualElements>
</Application>

View File

@ -4,10 +4,3 @@
# Branding Makefile
# - jars chrome artwork
# resources needed for the metro tile interface
ifeq ($(MOZ_WIDGET_TOOLKIT) $(DIST_SUBDIR),windows metro)
TILE_FILES := $(wildcard $(srcdir)/VisualElements*)
TILE_DEST := $(DIST)/bin/tileresources
INSTALL_TARGETS += TILE
endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

View File

@ -18,11 +18,3 @@ browser.jar:
content/branding/identity-icons-brand@2x.png (identity-icons-brand@2x.png)
content/branding/silhouette-40.svg (silhouette-40.svg)
content/branding/aboutDialog.css (aboutDialog.css)
#ifdef MOZ_METRO
content/branding/metro-about.css (metro-about.css)
content/branding/metro-about-footer.png (metro-about-footer.png)
content/branding/metro-about-wordmark.png (metro-about-wordmark.png)
content/branding/metro_firstrun_logo.png (metro_firstrun_logo.png)
content/branding/metro_firstrun_logo@1.4x.png (metro_firstrun_logo@1.4x.png)
content/branding/metro_firstrun_logo@1.8x.png (metro_firstrun_logo@1.8x.png)
#endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -1,14 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#about-flyoutpanel {
background-color: #002147;
color: white;
}
#about-policy-label:hover,
#about-policy-label:active {
background: #0a111c;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

View File

@ -4,8 +4,7 @@
include $(topsrcdir)/config/config.mk
# On Windows only do this step for browser, skip for metro.
ifeq ($(MOZ_WIDGET_TOOLKIT) $(DIST_SUBDIR),windows browser)
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
BRANDING_FILES := \
firefox.ico \
document.ico \
@ -47,10 +46,3 @@ endif
BRANDING_DEST := $(DIST)/branding
BRANDING_TARGET := export
INSTALL_TARGETS += BRANDING
ifeq ($(MOZ_WIDGET_TOOLKIT) $(DIST_SUBDIR),windows metro)
VISUALMANIFEST := VisualElementsManifest.xml
VISUALMANIFEST_FLAGS := -Fsubstitution -DMOZ_APP_DISPLAYNAME=${MOZ_APP_DISPLAYNAME}
VISUALMANIFEST_PATH := $(DIST)/bin
PP_TARGETS += VISUALMANIFEST
endif

View File

@ -1,16 +0,0 @@
<Application
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<VisualElements
DisplayName="@MOZ_APP_DISPLAYNAME@"
Logo="tileresources\VisualElements_logo.png"
SmallLogo="tileresources\VisualElements_smalllogo.png"
ForegroundText="light"
BackgroundColor="#1895f5">
<DefaultTile
ShortName="@MOZ_APP_DISPLAYNAME@"
ShowName="allLogos"
/>
<SplashScreen
Image="tileresources\VisualElements_splashscreen.png" />
</VisualElements>
</Application>

View File

@ -4,10 +4,3 @@
# Branding Makefile
# - jars chrome artwork
# resources needed for the metro tile interface
ifeq ($(MOZ_WIDGET_TOOLKIT) $(DIST_SUBDIR),windows metro)
TILE_FILES := $(wildcard $(srcdir)/VisualElements*)
TILE_DEST := $(DIST)/bin/tileresources
INSTALL_TARGETS += TILE
endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

View File

@ -17,11 +17,3 @@ browser.jar:
content/branding/identity-icons-brand@2x.png (identity-icons-brand@2x.png)
content/branding/silhouette-40.svg (silhouette-40.svg)
content/branding/aboutDialog.css (aboutDialog.css)
#ifdef MOZ_METRO
content/branding/metro-about.css (metro-about.css)
content/branding/metro-about-footer.png (metro-about-footer.png)
content/branding/metro-about-wordmark.png (metro-about-wordmark.png)
content/branding/metro_firstrun_logo.png (metro_firstrun_logo.png)
content/branding/metro_firstrun_logo@1.4x.png (metro_firstrun_logo@1.4x.png)
content/branding/metro_firstrun_logo@1.8x.png (metro_firstrun_logo@1.8x.png)
#endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -1,14 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#about-flyoutpanel {
background-color: #0095dd;
color: white;
}
#about-policy-label:hover,
#about-policy-label:active {
background: #036fa4;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

View File

@ -4,8 +4,7 @@
include $(topsrcdir)/config/config.mk
# On Windows only do this step for browser, skip for metro.
ifeq ($(MOZ_WIDGET_TOOLKIT) $(DIST_SUBDIR),windows browser)
ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
BRANDING_FILES := \
firefox.ico \
document.ico \
@ -47,10 +46,3 @@ endif
BRANDING_DEST := $(DIST)/branding
BRANDING_TARGET := export
INSTALL_TARGETS += BRANDING
ifeq ($(MOZ_WIDGET_TOOLKIT) $(DIST_SUBDIR),windows metro)
VISUALMANIFEST := VisualElementsManifest.xml
VISUALMANIFEST_FLAGS := -Fsubstitution -DMOZ_APP_DISPLAYNAME=${MOZ_APP_DISPLAYNAME}
VISUALMANIFEST_PATH := $(DIST)/bin
PP_TARGETS += VISUALMANIFEST
endif

View File

@ -1,16 +0,0 @@
<Application
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<VisualElements
DisplayName="@MOZ_APP_DISPLAYNAME@"
Logo="tileresources\VisualElements_logo.png"
SmallLogo="tileresources\VisualElements_smalllogo.png"
ForegroundText="light"
BackgroundColor="#0a1833">
<DefaultTile
ShortName="@MOZ_APP_DISPLAYNAME@"
ShowName="allLogos"
/>
<SplashScreen
Image="tileresources\VisualElements_splashscreen.png" />
</VisualElements>
</Application>

View File

@ -4,10 +4,3 @@
# Branding Makefile
# - jars chrome artwork
# resources needed for the metro tile interface
ifeq ($(MOZ_WIDGET_TOOLKIT) $(DIST_SUBDIR),windows metro)
TILE_FILES := $(wildcard $(srcdir)/VisualElements*)
TILE_DEST := $(DIST)/bin/tileresources
INSTALL_TARGETS += TILE
endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

View File

@ -18,11 +18,3 @@ browser.jar:
content/branding/identity-icons-brand@2x.png (identity-icons-brand@2x.png)
content/branding/silhouette-40.svg (silhouette-40.svg)
content/branding/aboutDialog.css (aboutDialog.css)
#ifdef MOZ_METRO
content/branding/metro-about.css (metro-about.css)
content/branding/metro-about-footer.png (metro-about-footer.png)
content/branding/metro-about-wordmark.png (metro-about-wordmark.png)
content/branding/metro_firstrun_logo.png (metro_firstrun_logo.png)
content/branding/metro_firstrun_logo@1.4x.png (metro_firstrun_logo@1.4x.png)
content/branding/metro_firstrun_logo@1.8x.png (metro_firstrun_logo@1.8x.png)
#endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -1,14 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#about-flyoutpanel {
background-color: #002147;
color: white;
}
#about-policy-label:hover,
#about-policy-label:active {
background: #0a111c;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

View File

@ -52,9 +52,4 @@ mochitest:: mochitest-browser-chrome
.PHONY: mochitest-browser-chrome
mochitest-metro-chrome:
$(RUN_MOCHITEST) --metro-immersive --browser-chrome
$(CHECK_TEST_ERROR)
endif

View File

@ -172,10 +172,6 @@ let CustomizableUIInternal = {
#endif
];
if (gPalette.has("switch-to-metro-button")) {
panelPlacements.push("switch-to-metro-button");
}
#ifdef E10S_TESTING_ONLY
if (gPalette.has("e10s-button")) {
let newWindowIndex = panelPlacements.indexOf("new-window-button");

View File

@ -993,30 +993,6 @@ const CustomizableWidgets = [
}
}];
#ifdef XP_WIN
#ifdef MOZ_METRO
if (Services.metro && Services.metro.supported) {
let widgetArgs = {tooltiptext: "switch-to-metro-button2.tooltiptext"};
let brandShortName = BrandBundle.GetStringFromName("brandShortName");
let metroTooltip = CustomizableUI.getLocalizedProperty(widgetArgs, "tooltiptext",
[brandShortName]);
CustomizableWidgets.push({
id: "switch-to-metro-button",
label: "switch-to-metro-button2.label",
tooltiptext: metroTooltip,
defaultArea: CustomizableUI.AREA_PANEL,
showInPrivateBrowsing: false, /* See bug 928068 */
onCommand: function(aEvent) {
let win = aEvent.view;
if (win && typeof win.SwitchToMetro == "function") {
win.SwitchToMetro();
}
}
});
}
#endif
#endif
if (Services.prefs.getBoolPref("privacy.panicButton.enabled")) {
CustomizableWidgets.push({
id: "panic-button",

View File

@ -27,7 +27,7 @@ add_task(function testWrapUnwrap() {
// Creating and destroying a widget should correctly deal with panel placeholders
add_task(function testPanelPlaceholders() {
let panel = document.getElementById(CustomizableUI.AREA_PANEL);
let expectedPlaceholders = (isInWin8() ? 1 : 2) + (isInDevEdition() ? 1 : 0);
let expectedPlaceholders = 2 + (isInDevEdition() ? 1 : 0);
is(panel.querySelectorAll(".panel-customization-placeholder").length, expectedPlaceholders, "The number of placeholders should be correct.");
CustomizableUI.createWidget({id: kTestWidget2, label: 'Pretty label', tooltiptext: 'Pretty tooltip', defaultArea: CustomizableUI.AREA_PANEL});
let elem = document.getElementById(kTestWidget2);
@ -36,7 +36,7 @@ add_task(function testPanelPlaceholders() {
ok(wrapper, "There should be a wrapper");
is(wrapper.firstChild.id, kTestWidget2, "Wrapper should have test widget");
is(wrapper.parentNode, panel, "Wrapper should be in panel");
expectedPlaceholders = (isInWin8() ? 3 : 1) + (isInDevEdition() ? 1 : 0);
expectedPlaceholders = 1 + (isInDevEdition() ? 1 : 0);
is(panel.querySelectorAll(".panel-customization-placeholder").length, expectedPlaceholders, "The number of placeholders should be correct.");
CustomizableUI.destroyWidget(kTestWidget2);
wrapper = document.getElementById("wrapper-" + kTestWidget2);

View File

@ -24,7 +24,6 @@ add_task(function() {
"add-ons-button",
"developer-button"];
removeDeveloperButtonIfDevEdition(placementsAfterMove);
addSwitchToMetroButtonInWindows8(placementsAfterMove);
simulateItemDrag(zoomControls, printButton);
assertAreaPlacements(CustomizableUI.AREA_PANEL, placementsAfterMove);
ok(!CustomizableUI.inDefaultState, "Should no longer be in default state.");
@ -51,7 +50,6 @@ add_task(function() {
"add-ons-button",
"developer-button"];
removeDeveloperButtonIfDevEdition(placementsAfterMove);
addSwitchToMetroButtonInWindows8(placementsAfterMove);
simulateItemDrag(zoomControls, savePageButton);
assertAreaPlacements(CustomizableUI.AREA_PANEL, placementsAfterMove);
ok(CustomizableUI.inDefaultState, "Should be in default state.");
@ -76,7 +74,6 @@ add_task(function() {
"add-ons-button",
"developer-button"];
removeDeveloperButtonIfDevEdition(placementsAfterMove);
addSwitchToMetroButtonInWindows8(placementsAfterMove);
simulateItemDrag(zoomControls, newWindowButton);
assertAreaPlacements(CustomizableUI.AREA_PANEL, placementsAfterMove);
ok(CustomizableUI.inDefaultState, "Should still be in default state.");
@ -100,7 +97,6 @@ add_task(function() {
"add-ons-button",
"developer-button"];
removeDeveloperButtonIfDevEdition(placementsAfterMove);
addSwitchToMetroButtonInWindows8(placementsAfterMove);
simulateItemDrag(zoomControls, historyPanelMenu);
assertAreaPlacements(CustomizableUI.AREA_PANEL, placementsAfterMove);
ok(!CustomizableUI.inDefaultState, "Should no longer be in default state.");
@ -128,7 +124,6 @@ add_task(function() {
"add-ons-button",
"developer-button"];
removeDeveloperButtonIfDevEdition(placementsAfterMove);
addSwitchToMetroButtonInWindows8(placementsAfterMove);
simulateItemDrag(zoomControls, preferencesButton);
assertAreaPlacements(CustomizableUI.AREA_PANEL, placementsAfterMove);
ok(!CustomizableUI.inDefaultState, "Should no longer be in default state.");
@ -156,7 +151,6 @@ add_task(function() {
"add-ons-button",
"developer-button"];
removeDeveloperButtonIfDevEdition(placementsAfterInsert);
addSwitchToMetroButtonInWindows8(placementsAfterInsert);
simulateItemDrag(openFileButton, zoomControls);
assertAreaPlacements(CustomizableUI.AREA_PANEL, placementsAfterInsert);
ok(!CustomizableUI.inDefaultState, "Should no longer be in default state.");
@ -196,7 +190,6 @@ add_task(function() {
"add-ons-button",
"developer-button"];
removeDeveloperButtonIfDevEdition(placementsAfterInsert);
addSwitchToMetroButtonInWindows8(placementsAfterInsert);
simulateItemDrag(openFileButton, editControls);
assertAreaPlacements(CustomizableUI.AREA_PANEL, placementsAfterInsert);
ok(!CustomizableUI.inDefaultState, "Should no longer be in default state.");
@ -233,7 +226,6 @@ add_task(function() {
"add-ons-button",
"developer-button"];
removeDeveloperButtonIfDevEdition(placementsAfterMove);
addSwitchToMetroButtonInWindows8(placementsAfterMove);
simulateItemDrag(editControls, zoomControls);
assertAreaPlacements(CustomizableUI.AREA_PANEL, placementsAfterMove);
ok(CustomizableUI.inDefaultState, "Should still be in default state.");
@ -258,7 +250,6 @@ add_task(function() {
"add-ons-button",
"developer-button"];
removeDeveloperButtonIfDevEdition(placementsAfterMove);
addSwitchToMetroButtonInWindows8(placementsAfterMove);
simulateItemDrag(editControls, newWindowButton);
assertAreaPlacements(CustomizableUI.AREA_PANEL, placementsAfterMove);
let zoomControls = document.getElementById("zoom-controls");
@ -286,7 +277,6 @@ add_task(function() {
"add-ons-button",
"developer-button"];
removeDeveloperButtonIfDevEdition(placementsAfterMove);
addSwitchToMetroButtonInWindows8(placementsAfterMove);
simulateItemDrag(editControls, privateBrowsingButton);
assertAreaPlacements(CustomizableUI.AREA_PANEL, placementsAfterMove);
let zoomControls = document.getElementById("zoom-controls");
@ -314,7 +304,6 @@ add_task(function() {
"add-ons-button",
"developer-button"];
removeDeveloperButtonIfDevEdition(placementsAfterMove);
addSwitchToMetroButtonInWindows8(placementsAfterMove);
simulateItemDrag(editControls, savePageButton);
assertAreaPlacements(CustomizableUI.AREA_PANEL, placementsAfterMove);
let zoomControls = document.getElementById("zoom-controls");
@ -341,7 +330,6 @@ add_task(function() {
"edit-controls",
"developer-button"];
removeDeveloperButtonIfDevEdition(placementsAfterMove);
addSwitchToMetroButtonInWindows8(placementsAfterMove);
simulateItemDrag(editControls, panel);
assertAreaPlacements(CustomizableUI.AREA_PANEL, placementsAfterMove);
let zoomControls = document.getElementById("zoom-controls");
@ -367,7 +355,6 @@ add_task(function() {
"add-ons-button",
"developer-button"];
removeDeveloperButtonIfDevEdition(placementsAfterMove);
addSwitchToMetroButtonInWindows8(placementsAfterMove);
let paletteChildElementCount = palette.childElementCount;
simulateItemDrag(editControls, palette);
assertAreaPlacements(CustomizableUI.AREA_PANEL, placementsAfterMove);
@ -390,7 +377,7 @@ add_task(function() {
yield startCustomizing();
let editControls = document.getElementById("edit-controls");
let panel = document.getElementById(CustomizableUI.AREA_PANEL);
let numPlaceholders = isInWin8() ? 1 : 2;
let numPlaceholders = 2;
for (let i = 0; i < numPlaceholders; i++) {
// NB: We can't just iterate over all of the placeholders
// because each drag-drop action recreates them.
@ -408,7 +395,6 @@ add_task(function() {
"edit-controls",
"developer-button"];
removeDeveloperButtonIfDevEdition(placementsAfterMove);
addSwitchToMetroButtonInWindows8(placementsAfterMove);
simulateItemDrag(editControls, placeholder);
assertAreaPlacements(CustomizableUI.AREA_PANEL, placementsAfterMove);
let zoomControls = document.getElementById("zoom-controls");
@ -451,18 +437,11 @@ add_task(function() {
"edit-controls",
"developer-button"];
removeDeveloperButtonIfDevEdition(placementsAfterMove);
addSwitchToMetroButtonInWindows8(placementsAfterMove);
simulateItemDrag(editControls, target);
assertAreaPlacements(CustomizableUI.AREA_PANEL, placementsAfterMove);
let itemToDrag = "sync-button";
let button = document.getElementById(itemToDrag);
placementsAfterMove.splice(11, 0, itemToDrag);
if (isInWin8()) {
placementsAfterMove[10] = placementsAfterMove[11];
placementsAfterMove[11] = placementsAfterMove[12];
placementsAfterMove[12] = placementsAfterMove[13];
placementsAfterMove[13] = "edit-controls";
}
simulateItemDrag(button, editControls);
assertAreaPlacements(CustomizableUI.AREA_PANEL, placementsAfterMove);

View File

@ -10,18 +10,14 @@ requestLongerTimeout(2);
add_task(function() {
yield startCustomizing();
if (isInWin8()) {
CustomizableUI.removeWidgetFromArea("switch-to-metro-button");
ok(!CustomizableUI.inDefaultState, "Should no longer be in default state.");
}
if (isInDevEdition()) {
CustomizableUI.addWidgetToArea("developer-button", CustomizableUI.AREA_PANEL);
ok(!CustomizableUI.inDefaultState, "Should no longer be in default state.");
}
if (!isInWin8() && !isInDevEdition()) {
if (!isInDevEdition()) {
ok(CustomizableUI.inDefaultState, "Should be in default state.");
} else {
ok(!CustomizableUI.inDefaultState, "Should not be in default state if on Win8 or DevEdition.");
ok(!CustomizableUI.inDefaultState, "Should not be in default state if on DevEdition.");
}
let btn = document.getElementById("open-file-button");
@ -35,9 +31,6 @@ add_task(function() {
yield startCustomizing();
is(getVisiblePlaceholderCount(panel), 2, "Should only have 2 visible placeholders after re-entering");
if (isInWin8()) {
CustomizableUI.addWidgetToArea("switch-to-metro-button", CustomizableUI.AREA_PANEL);
}
if (isInDevEdition()) {
CustomizableUI.addWidgetToArea("developer-button", CustomizableUI.AREA_NAVBAR, 2);
}
@ -58,18 +51,12 @@ add_task(function() {
let placements = getAreaWidgetIds(CustomizableUI.AREA_PANEL);
let placementsAfterAppend = placements;
if (!isInWin8()) {
placementsAfterAppend = placements.concat(["open-file-button"]);
simulateItemDrag(btn, panel);
}
placementsAfterAppend = placements.concat(["open-file-button"]);
simulateItemDrag(btn, panel);
assertAreaPlacements(CustomizableUI.AREA_PANEL, placementsAfterAppend);
if (isInWin8() && !isInDevEdition()) {
ok(CustomizableUI.inDefaultState, "Should be in default state if on Win8 and not on DevEdition.");
} else {
ok(!CustomizableUI.inDefaultState, "Should not be in default state if not Win8 or on DevEdition.");
}
ok(!CustomizableUI.inDefaultState, "Should not be in default state.");
is(getVisiblePlaceholderCount(panel), 1, "Should only have 1 visible placeholder before exiting");
@ -80,10 +67,9 @@ add_task(function() {
let palette = document.getElementById("customization-palette");
simulateItemDrag(btn, palette);
if (!isInWin8()) {
btn = document.getElementById("open-file-button");
simulateItemDrag(btn, palette);
}
btn = document.getElementById("open-file-button");
simulateItemDrag(btn, palette);
if (isInDevEdition()) {
CustomizableUI.addWidgetToArea("developer-button", CustomizableUI.AREA_NAVBAR, 2);
}
@ -101,7 +87,6 @@ add_task(function() {
let btn = document.getElementById("add-ons-button");
let btn2 = document.getElementById("developer-button");
let btn3 = document.getElementById("switch-to-metro-button");
let panel = document.getElementById(CustomizableUI.AREA_PANEL);
let palette = document.getElementById("customization-palette");
let placements = getAreaWidgetIds(CustomizableUI.AREA_PANEL);
@ -110,11 +95,6 @@ add_task(function() {
simulateItemDrag(btn, palette);
simulateItemDrag(btn2, palette);
if (isInWin8()) {
placementsAfterAppend = placementsAfterAppend.filter(p => p != btn3.id);
simulateItemDrag(btn3, palette);
}
assertAreaPlacements(CustomizableUI.AREA_PANEL, placementsAfterAppend);
ok(!CustomizableUI.inDefaultState, "Should no longer be in default state.");
is(getVisiblePlaceholderCount(panel), 1, "Should only have 1 visible placeholder before exiting");
@ -126,10 +106,6 @@ add_task(function() {
simulateItemDrag(btn, panel);
simulateItemDrag(btn2, panel);
if (isInWin8()) {
simulateItemDrag(btn3, panel);
}
assertAreaPlacements(CustomizableUI.AREA_PANEL, placements);
if (isInDevEdition()) {
@ -149,7 +125,6 @@ add_task(function() {
let btn = document.getElementById("edit-controls");
let btn2 = document.getElementById("developer-button");
let btn3 = document.getElementById("switch-to-metro-button");
let panel = document.getElementById(CustomizableUI.AREA_PANEL);
let palette = document.getElementById("customization-palette");
let placements = getAreaWidgetIds(CustomizableUI.AREA_PANEL);
@ -157,12 +132,6 @@ add_task(function() {
placements.pop();
simulateItemDrag(btn2, palette);
if (isInWin8()) {
// Remove switch-to-metro-button
placements.pop();
simulateItemDrag(btn3, palette);
}
let placementsAfterAppend = placements.concat([placements.shift()]);
simulateItemDrag(btn, panel);
assertAreaPlacements(CustomizableUI.AREA_PANEL, placementsAfterAppend);
@ -175,10 +144,6 @@ add_task(function() {
simulateItemDrag(btn2, panel);
if (isInWin8()) {
simulateItemDrag(btn3, panel);
}
let zoomControls = document.getElementById("zoom-controls");
simulateItemDrag(btn, zoomControls);
@ -194,18 +159,10 @@ add_task(function() {
yield startCustomizing();
let numPlaceholders = -1;
if (isInWin8()) {
if (isInDevEdition()) {
numPlaceholders = 2;
} else {
numPlaceholders = 1;
}
if (isInDevEdition()) {
numPlaceholders = 3;
} else {
if (isInDevEdition()) {
numPlaceholders = 3;
} else {
numPlaceholders = 2;
}
numPlaceholders = 2;
}
let panel = document.getElementById(CustomizableUI.AREA_PANEL);

View File

@ -127,18 +127,6 @@ function removeDeveloperButtonIfDevEdition(areaPanelPlacements) {
}
}
function isInWin8() {
if (!Services.metro)
return false;
return Services.metro.supported;
}
function addSwitchToMetroButtonInWindows8(areaPanelPlacements) {
if (isInWin8()) {
areaPanelPlacements.push("switch-to-metro-button");
}
}
function assertAreaPlacements(areaId, expectedPlacements) {
let actualPlacements = getAreaWidgetIds(areaId);
placementArraysEqual(areaId, actualPlacements, expectedPlacements);

View File

@ -625,22 +625,10 @@ var gAdvancedPane = {
{
var enabledPref = document.getElementById("app.update.enabled");
var autoPref = document.getElementById("app.update.auto");
#ifdef XP_WIN
#ifdef MOZ_METRO
var metroEnabledPref = document.getElementById("app.update.metro.enabled");
#endif
#endif
var radiogroup = document.getElementById("updateRadioGroup");
if (!enabledPref.value) // Don't care for autoPref.value in this case.
radiogroup.value="manual"; // 3. Never check for updates.
#ifdef XP_WIN
#ifdef MOZ_METRO
// enabledPref.value && autoPref.value && metroEnabledPref.value
else if (metroEnabledPref.value && this._showingWin8Prefs)
radiogroup.value="autoMetro"; // 0. Automatically install updates for both Metro and Desktop
#endif
#endif
else if (autoPref.value) // enabledPref.value && autoPref.value
radiogroup.value="auto"; // 1. Automatically install updates for Desktop only
else // enabledPref.value && !autoPref.value
@ -659,14 +647,6 @@ var gAdvancedPane = {
// the warnIncompatible checkbox value is set by readAddonWarn
warnIncompatible.disabled = radiogroup.disabled || modePref.locked ||
!enabledPref.value || !autoPref.value;
#ifdef XP_WIN
#ifdef MOZ_METRO
if (this._showingWin8Prefs) {
warnIncompatible.disabled |= metroEnabledPref.value;
warnIncompatible.checked |= metroEnabledPref.value;
}
#endif
#endif
#ifdef MOZ_MAINTENANCE_SERVICE
// Check to see if the maintenance service is installed.
@ -715,31 +695,12 @@ var gAdvancedPane = {
var enabledPref = document.getElementById("app.update.enabled");
var autoPref = document.getElementById("app.update.auto");
var modePref = document.getElementById("app.update.mode");
#ifdef XP_WIN
#ifdef MOZ_METRO
var metroEnabledPref = document.getElementById("app.update.metro.enabled");
// Initialize the pref to false only if we're showing the option
if (this._showingWin8Prefs) {
metroEnabledPref.value = false;
}
#endif
#endif
var radiogroup = document.getElementById("updateRadioGroup");
switch (radiogroup.value) {
case "auto": // 1. Automatically install updates for Desktop only
enabledPref.value = true;
autoPref.value = true;
break;
#ifdef XP_WIN
#ifdef MOZ_METRO
case "autoMetro": // 0. Automatically install updates for both Metro and Desktop
enabledPref.value = true;
autoPref.value = true;
metroEnabledPref.value = true;
modePref.value = 1;
break;
#endif
#endif
case "checkOnly": // 2. Check, but let me choose
enabledPref.value = true;
autoPref.value = false;
@ -753,15 +714,6 @@ var gAdvancedPane = {
warnIncompatible.disabled = enabledPref.locked || !enabledPref.value ||
autoPref.locked || !autoPref.value ||
modePref.locked;
#ifdef XP_WIN
#ifdef MOZ_METRO
if (this._showingWin8Prefs) {
warnIncompatible.disabled |= metroEnabledPref.value;
warnIncompatible.checked |= metroEnabledPref.value;
}
#endif
#endif
},
/**

View File

@ -61,11 +61,6 @@
#ifdef MOZ_UPDATER
<preference id="app.update.enabled" name="app.update.enabled" type="bool"/>
<preference id="app.update.auto" name="app.update.auto" type="bool"/>
#ifdef XP_WIN
#ifdef MOZ_METRO
<preference id="app.update.metro.enabled" name="app.update.metro.enabled" type="bool"/>
#endif
#endif
<preference id="app.update.mode" name="app.update.mode" type="int"/>
<preference id="app.update.disable_button.showUpdateHistory"
@ -310,18 +305,6 @@
<caption label="&updateApp.label;"/>
<radiogroup id="updateRadioGroup"
oncommand="gAdvancedPane.updateWritePrefs();">
#ifdef XP_WIN
#ifdef MOZ_METRO
<radio id="autoMetro"
value="autoMetro"
label="&updateAutoMetro.label;"
accesskey="&updateAutoMetro.accesskey;"/>
<hbox id="autoMetroIndent"
class="indent">
<label value="&updateAutoMetroWarn.label;"/>
</hbox>
#endif
#endif
<radio id="autoDesktop"
value="auto"
label="&updateAuto1.label;"

View File

@ -663,22 +663,10 @@ var gAdvancedPane = {
{
var enabledPref = document.getElementById("app.update.enabled");
var autoPref = document.getElementById("app.update.auto");
#ifdef XP_WIN
#ifdef MOZ_METRO
var metroEnabledPref = document.getElementById("app.update.metro.enabled");
#endif
#endif
var radiogroup = document.getElementById("updateRadioGroup");
if (!enabledPref.value) // Don't care for autoPref.value in this case.
radiogroup.value="manual"; // 3. Never check for updates.
#ifdef XP_WIN
#ifdef MOZ_METRO
// enabledPref.value && autoPref.value && metroEnabledPref.value
else if (metroEnabledPref.value && this._showingWin8Prefs)
radiogroup.value="autoMetro"; // 0. Automatically install updates
#endif
#endif
else if (autoPref.value) // enabledPref.value && autoPref.value
radiogroup.value="auto"; // 1. Automatically install updates
else // enabledPref.value && !autoPref.value
@ -697,14 +685,6 @@ var gAdvancedPane = {
// the warnIncompatible checkbox value is set by readAddonWarn
warnIncompatible.disabled = radiogroup.disabled || modePref.locked ||
!enabledPref.value || !autoPref.value;
#ifdef XP_WIN
#ifdef MOZ_METRO
if (this._showingWin8Prefs) {
warnIncompatible.disabled |= metroEnabledPref.value;
warnIncompatible.checked |= metroEnabledPref.value;
}
#endif
#endif
#ifdef MOZ_MAINTENANCE_SERVICE
// Check to see if the maintenance service is installed.
@ -735,31 +715,12 @@ var gAdvancedPane = {
var enabledPref = document.getElementById("app.update.enabled");
var autoPref = document.getElementById("app.update.auto");
var modePref = document.getElementById("app.update.mode");
#ifdef XP_WIN
#ifdef MOZ_METRO
var metroEnabledPref = document.getElementById("app.update.metro.enabled");
// Initialize the pref to false only if we're showing the option
if (this._showingWin8Prefs) {
metroEnabledPref.value = false;
}
#endif
#endif
var radiogroup = document.getElementById("updateRadioGroup");
switch (radiogroup.value) {
case "auto": // 1. Automatically install updates for Desktop only
enabledPref.value = true;
autoPref.value = true;
break;
#ifdef XP_WIN
#ifdef MOZ_METRO
case "autoMetro": // 0. Automatically install updates for both Metro and Desktop
enabledPref.value = true;
autoPref.value = true;
metroEnabledPref.value = true;
modePref.value = 1;
break;
#endif
#endif
case "checkOnly": // 2. Check, but let me choose
enabledPref.value = true;
autoPref.value = false;
@ -773,14 +734,6 @@ var gAdvancedPane = {
warnIncompatible.disabled = enabledPref.locked || !enabledPref.value ||
autoPref.locked || !autoPref.value ||
modePref.locked;
#ifdef XP_WIN
#ifdef MOZ_METRO
if (this._showingWin8Prefs) {
warnIncompatible.disabled |= metroEnabledPref.value;
warnIncompatible.checked |= metroEnabledPref.value;
}
#endif
#endif
},
/**

View File

@ -70,13 +70,6 @@
<preference id="app.update.auto"
name="app.update.auto"
type="bool"/>
#ifdef XP_WIN
#ifdef MOZ_METRO
<preference id="app.update.metro.enabled"
name="app.update.metro.enabled"
type="bool"/>
#endif
#endif
<preference id="app.update.mode"
name="app.update.mode"
type="int"/>
@ -329,18 +322,6 @@
<groupbox id="updateApp" align="start">
<caption><label>&updateApp.label;</label></caption>
<radiogroup id="updateRadioGroup" align="start">
#ifdef XP_WIN
#ifdef MOZ_METRO
<radio id="autoMetro"
value="autoMetro"
label="&updateAutoMetro.label;"
accesskey="&updateAutoMetro.accesskey;"/>
<hbox id="autoMetroIndent"
class="indent">
<label>&updateAutoMetroWarn.label;</label>
</hbox>
#endif
#endif
<radio id="autoDesktop"
value="auto"
label="&updateAuto1.label;"

View File

@ -27,31 +27,6 @@ var gMainPane = {
// in case the default changes. On other Windows OS's defaults can also
// be set while the prefs are open.
window.setInterval(this.updateSetDefaultBrowser, 1000);
#ifdef MOZ_METRO
// Pre Windows 8, we should hide the update related settings
// for the Metro browser
let version = Components.classes["@mozilla.org/system-info;1"].
getService(Components.interfaces.nsIPropertyBag2).
getProperty("version");
let preWin8 = parseFloat(version) < 6.2;
this._showingWin8Prefs = !preWin8;
if (preWin8) {
["autoMetro", "autoMetroIndent"].forEach(
function(id) document.getElementById(id).collapsed = true
);
} else {
let brandShortName =
document.getElementById("bundleBrand").getString("brandShortName");
let bundlePrefs = document.getElementById("bundlePreferences");
let autoDesktop = document.getElementById("autoDesktop");
autoDesktop.label =
bundlePrefs.getFormattedString("updateAutoDesktop.label",
[brandShortName]);
autoDesktop.accessKey =
bundlePrefs.getString("updateAutoDesktop.accessKey");
}
#endif
#endif
#endif

View File

@ -26,31 +26,6 @@ var gMainPane = {
// in case the default changes. On other Windows OS's defaults can also
// be set while the prefs are open.
window.setInterval(this.updateSetDefaultBrowser, 1000);
#ifdef MOZ_METRO
// Pre Windows 8, we should hide the update related settings
// for the Metro browser
let version = Components.classes["@mozilla.org/system-info;1"].
getService(Components.interfaces.nsIPropertyBag2).
getProperty("version");
let preWin8 = parseFloat(version) < 6.2;
this._showingWin8Prefs = !preWin8;
if (preWin8) {
["autoMetro", "autoMetroIndent"].forEach(
function(id) document.getElementById(id).collapsed = true
);
} else {
let brandShortName =
document.getElementById("bundleBrand").getString("brandShortName");
let bundlePrefs = document.getElementById("bundlePreferences");
let autoDesktop = document.getElementById("autoDesktop");
autoDesktop.label =
bundlePrefs.getFormattedString("updateAutoDesktop.label",
[brandShortName]);
autoDesktop.accessKey =
bundlePrefs.getString("updateAutoDesktop.accessKey");
}
#endif
#endif
#endif

View File

@ -2,10 +2,6 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
ifdef MOZ_METRO
GENERATED_DIRS = $(DIST)/bin/metro/chrome
endif
include $(topsrcdir)/config/rules.mk
exclude_files = \
@ -34,27 +30,3 @@ libs:: $(FINAL_TARGET)/chrome/shumway.manifest
$(FINAL_TARGET)/chrome
$(call py_action,buildlist,$(FINAL_TARGET)/chrome.manifest 'manifest chrome/shumway.manifest')
endif
ifdef MOZ_METRO
ifdef NIGHTLY_BUILD
$(DIST)/bin/metro/chrome/pdfjs.manifest: $(GLOBAL_DEPS)
printf 'manifest pdfjs/chrome.manifest' > $@
libs:: $(DIST)/bin/metro/chrome/pdfjs.manifest
$(PYTHON) $(topsrcdir)/config/nsinstall.py \
$(srcdir)/pdfjs \
$(foreach exclude,$(exclude_files), -X $(srcdir)/pdfjs/$(exclude)) \
$(DIST)/bin/metro/chrome
$(call py_action,buildlist,$(DIST)/bin/metro/chrome.manifest 'manifest chrome/pdfjs.manifest')
$(DIST)/bin/metro/chrome/shumway.manifest: $(GLOBAL_DEPS)
printf 'manifest shumway/chrome.manifest' > $@
libs:: $(DIST)/bin/metro/chrome/shumway.manifest
$(PYTHON) $(topsrcdir)/config/nsinstall.py \
$(srcdir)/shumway \
$(foreach exclude,$(exclude_files), -X $(srcdir)/shumway/$(exclude)) \
$(DIST)/bin/metro/chrome
$(call py_action,buildlist,$(DIST)/bin/metro/chrome.manifest 'manifest chrome/shumway.manifest')
endif
endif

View File

@ -886,36 +886,6 @@ bin/libfreebl_32int64_3.so
@RESPATH@/webapprt/modules/WebRTCHandler.jsm
#endif
#ifdef MOZ_METRO
@RESPATH@/components/MetroUIUtils.js
@RESPATH@/components/MetroUIUtils.manifest
[metro]
; gre resources
@BINPATH@/CommandExecuteHandler@BIN_SUFFIX@
@RESPATH@/resources.pri
@RESPATH@/VisualElementsManifest.xml
@RESPATH@/tileresources
; app dir resources
@RESPATH@/metro/chrome.manifest
@RESPATH@/metro/searchplugins
@RESPATH@/metro/metroapp.ini
@RESPATH@/metro/chrome/browser@JAREXT@
@RESPATH@/metro/chrome/browser.manifest
@RESPATH@/metro/chrome/chrome@JAREXT@
@RESPATH@/metro/chrome/chrome.manifest
@RESPATH@/metro/chrome/@AB_CD@@JAREXT@
@RESPATH@/metro/chrome/@AB_CD@.manifest
#ifdef NIGHTLY_BUILD
@RESPATH@/metro/chrome/shumway.manifest
@RESPATH@/metro/chrome/shumway/*
@RESPATH@/metro/chrome/pdfjs.manifest
@RESPATH@/metro/chrome/pdfjs/*
#endif
@RESPATH@/metro/components
@RESPATH@/metro/defaults
@RESPATH@/metro/modules
#endif
@RESPATH@/components/DataStore.manifest
@RESPATH@/components/DataStoreImpl.js
@RESPATH@/components/dom_datastore.xpt

View File

@ -74,10 +74,6 @@
!define MOZ_MAINTENANCE_SERVICE
#endif
#ifdef MOZ_METRO
!define MOZ_METRO
#endif
# File details shared by both the installer and uninstaller
VIProductVersion "1.0.0.0"
VIAddVersionKey "ProductName" "${BrandShortName}"

View File

@ -100,9 +100,6 @@ VIAddVersionKey "OriginalFilename" "setup.exe"
!insertmacro RegCleanAppHandler
!insertmacro RegCleanMain
!insertmacro RegCleanUninstall
!ifdef MOZ_METRO
!insertmacro RemoveDEHRegistrationIfMatching
!endif
!insertmacro RemovePrecompleteEntries
!insertmacro SetAppLSPCategories
!insertmacro SetBrandNameVars
@ -340,9 +337,6 @@ Section "-Application" APP_IDX
SetShellVarContext current ; Set SHCTX to HKCU
${RegCleanMain} "Software\Mozilla"
${RegCleanUninstall}
!ifdef MOZ_METRO
${ResetWin8PromptKeys} "HKCU" ""
!endif
${UpdateProtocolHandlers}
ClearErrors
@ -428,24 +422,12 @@ Section "-Application" APP_IDX
${Else}
WriteRegDWORD HKCU "$0" "IconsVisible" 0
${EndIf}
!ifdef MOZ_METRO
${CleanupMetroBrowserHandlerValues} ${DELEGATE_EXECUTE_HANDLER_ID} \
"FirefoxURL" \
"FirefoxHTML"
${AddMetroBrowserHandlerValues} ${DELEGATE_EXECUTE_HANDLER_ID} \
"$INSTDIR\CommandExecuteHandler.exe" \
$AppUserModelID \
"FirefoxURL" \
"FirefoxHTML"
!else
; The metro browser is not enabled by the mozconfig.
${If} ${AtLeastWin8}
${RemoveDEHRegistration} ${DELEGATE_EXECUTE_HANDLER_ID} \
$AppUserModelID \
"FirefoxURL" \
"FirefoxHTML"
${EndIf}
!endif
${EndIf}
!ifdef MOZ_MAINTENANCE_SERVICE
@ -815,21 +797,7 @@ Function LaunchApp
${If} ${Errors}
StrCpy $1 "0"
StrCpy $2 "0"
!ifdef MOZ_METRO
; Check to see if this install location is currently set as the
; default browser.
AppAssocReg::QueryAppIsDefaultAll "${AppRegName}" "effective"
Pop $1
; Check for a last run type to see if metro was the last browser
; front end in use.
ReadRegDWORD $2 HKCU "Software\Mozilla\Firefox" "MetroLastAHE"
!endif
${If} $1 == "1"
${AndIf} $2 == "1" ; 1 equals AHE_IMMERSIVE
; Launch into metro
Exec "$\"$INSTDIR\CommandExecuteHandler.exe$\" --launchmetro"
${Else}
; Launch into desktop
Exec "$\"$INSTDIR\${FileMainEXE}$\""
${EndIf}
${Else}
@ -850,20 +818,7 @@ Function LaunchAppFromElevatedProcess
SetOutPath "$1"
StrCpy $2 "0"
StrCpy $3 "0"
!ifdef MOZ_METRO
; Check to see if this install location is currently set as the
; default browser.
AppAssocReg::QueryAppIsDefaultAll "${AppRegName}" "effective"
Pop $2
; Check for a last run type to see if metro was the last browser
; front end in use.
ReadRegDWORD $3 HKCU "Software\Mozilla\Firefox" "MetroLastAHE"
!endif
${If} $2 == "1"
${AndIf} $3 == "1" ; 1 equals AHE_IMMERSIVE
; Launch into metro
Exec "$\"$1\CommandExecuteHandler.exe$\" --launchmetro"
${Else}
; Launch into desktop
Exec "$\"$0$\""
${EndIf}
@ -950,15 +905,7 @@ Function leaveShortcuts
Abort
${EndIf}
${MUI_INSTALLOPTIONS_READ} $AddDesktopSC "shortcuts.ini" "Field 2" "State"
; If we have a Metro browser and are Win8, then we don't have a Field 3
!ifdef MOZ_METRO
${Unless} ${AtLeastWin8}
!endif
${MUI_INSTALLOPTIONS_READ} $AddStartMenuSC "shortcuts.ini" "Field 3" "State"
!ifdef MOZ_METRO
${EndIf}
!endif
${MUI_INSTALLOPTIONS_READ} $AddStartMenuSC "shortcuts.ini" "Field 3" "State"
; Don't install the quick launch shortcut on Windows 7
${Unless} ${AtLeastWin7}
@ -1237,21 +1184,13 @@ Function .onInit
WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 2" State "1"
WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 2" Flags "GROUP"
; Don't offer to install the start menu shortcut on Windows 8
; for Metro builds.
!ifdef MOZ_METRO
${Unless} ${AtLeastWin8}
!endif
WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Type "checkbox"
WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Text "$(ICONS_STARTMENU)"
WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Left "0"
WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Right "-1"
WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Top "40"
WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Bottom "50"
WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" State "1"
!ifdef MOZ_METRO
${EndIf}
!endif
WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Type "checkbox"
WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Text "$(ICONS_STARTMENU)"
WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Left "0"
WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Right "-1"
WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Top "40"
WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" Bottom "50"
WriteINIStr "$PLUGINSDIR\shortcuts.ini" "Field 3" State "1"
; Don't offer to install the quick launch shortcut on Windows 7
${Unless} ${AtLeastWin7}

View File

@ -23,39 +23,6 @@
!define HKEY_USERS 0x80000003
!endif
; Does metro registration for the command execute handler
Function RegisterCEH
!ifdef MOZ_METRO
${If} ${AtLeastWin8}
${CleanupMetroBrowserHandlerValues} ${DELEGATE_EXECUTE_HANDLER_ID} \
"FirefoxURL" \
"FirefoxHTML"
${AddMetroBrowserHandlerValues} ${DELEGATE_EXECUTE_HANDLER_ID} \
"$INSTDIR\CommandExecuteHandler.exe" \
$AppUserModelID \
"FirefoxURL" \
"FirefoxHTML"
${EndIf}
!endif
FunctionEnd
; If we're in Win8 make sure we have a start menu shortcut and that it has
; the correct AppuserModelID so that the Metro browser has a Metro tile.
Function RegisterStartMenuTile
!ifdef MOZ_METRO
${If} ${AtLeastWin8}
CreateShortCut "$SMPROGRAMS\${BrandFullName}.lnk" "$INSTDIR\${FileMainEXE}"
${If} ${FileExists} "$SMPROGRAMS\${BrandFullName}.lnk"
ShellLink::SetShortCutWorkingDirectory "$SMPROGRAMS\${BrandFullName}.lnk" \
"$INSTDIR"
${If} "$AppUserModelID" != ""
ApplicationID::Set "$SMPROGRAMS\${BrandFullName}.lnk" "$AppUserModelID" "true"
${EndIf}
${EndIf}
${EndIf}
!endif
FunctionEnd
!macro PostUpdate
; PostUpdate is called from both session 0 and from the user session
@ -76,10 +43,6 @@ FunctionEnd
${If} ${FileExists} "$0"
${GetLongPath} "$0" $0
${EndIf}
${If} "$0" == "$INSTDIR"
; Win8 specific registration
Call RegisterStartMenuTile
${EndIf}
${EndIf}
${CreateShortcutsLog}
@ -223,28 +186,12 @@ FunctionEnd
!endif
; Register the DEH
!ifdef MOZ_METRO
${If} ${AtLeastWin8}
${AndIf} $9 != 0 ; We're not running in session 0
; If RegisterCEH is called too close to changing the shortcut AppUserModelID
; and if the tile image is not already in cache. Then Windows won't refresh
; the tile image on the start screen. So wait before calling RegisterCEH.
; We only need to do this when the DEH doesn't already exist.
ReadRegStr $0 HKCU "Software\Classes\FirefoxURL\shell\open\command" "DelegateExecute"
${If} $0 != ${DELEGATE_EXECUTE_HANDLER_ID}
Sleep 3000
${EndIf}
Call RegisterCEH
${EndIf}
!else
; The metro browser is not enabled by the mozconfig.
${If} ${AtLeastWin8}
${RemoveDEHRegistration} ${DELEGATE_EXECUTE_HANDLER_ID} \
$AppUserModelID \
"FirefoxURL" \
"FirefoxHTML"
${EndIf}
!endif
${If} ${AtLeastWin8}
${RemoveDEHRegistration} ${DELEGATE_EXECUTE_HANDLER_ID} \
$AppUserModelID \
"FirefoxURL" \
"FirefoxHTML"
${EndIf}
!macroend
!define PostUpdate "!insertmacro PostUpdate"
@ -456,8 +403,6 @@ FunctionEnd
${AddDisabledDDEHandlerValues} "FirefoxURL" "$2" "$8,1" "${AppRegName} URL" \
"true"
Call RegisterCEH
; An empty string is used for the 4th & 5th params because the following
; protocol handlers already have a display name and the additional keys
; required for a protocol handler.
@ -889,18 +834,6 @@ FunctionEnd
!macroend
!define ResetWin8PromptKeys "!insertmacro ResetWin8PromptKeys"
!ifdef MOZ_METRO
; Resets Win8+ Metro specific splash screen info. Relies
; on AppUserModelID.
!macro ResetWin8MetroSplash
${If} ${AtLeastWin8}
${AndIf} "$AppUserModelID" != ""
DeleteRegKey HKCR "Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\DefaultBrowser_NOPUBLISHERID\SplashScreen\DefaultBrowser_NOPUBLISHERID!$AppUserModelID"
${EndIf}
!macroend
!define ResetWin8MetroSplash "!insertmacro ResetWin8MetroSplash"
!endif
; Adds SE_RESTORE_NAME privs
!macro AcquireSERestoreName
StrCpy $R1 0
@ -1655,7 +1588,6 @@ Function SetAsDefaultAppUserHKCU
${SetStartMenuInternet} "HKCU"
${FixShellIconHandler} "HKCU"
${FixClassKeys} ; Does not use SHCTX
Call RegisterStartMenuTile
${EndIf}
${SetHandlers}

View File

@ -84,9 +84,6 @@ VIAddVersionKey "OriginalFilename" "helper.exe"
!insertmacro RegCleanAppHandler
!insertmacro RegCleanMain
!insertmacro RegCleanUninstall
!ifdef MOZ_METRO
!insertmacro RemoveDEHRegistrationIfMatching
!endif
!insertmacro SetAppLSPCategories
!insertmacro SetBrandNameVars
!insertmacro UpdateShortcutAppModelIDs
@ -108,9 +105,6 @@ VIAddVersionKey "OriginalFilename" "helper.exe"
!insertmacro un.RegCleanMain
!insertmacro un.RegCleanUninstall
!insertmacro un.RegCleanProtocolHandler
!ifdef MOZ_METRO
!insertmacro un.RemoveDEHRegistrationIfMatching
!endif
!insertmacro un.RemoveQuotesFromPath
!insertmacro un.RemovePrecompleteEntries
!insertmacro un.SetAppLSPCategories
@ -284,23 +278,12 @@ Section "Uninstall"
${un.SetAppLSPCategories}
${EndIf}
!ifdef MOZ_METRO
${If} ${AtLeastWin8}
${un.CleanupMetroBrowserHandlerValues} ${DELEGATE_EXECUTE_HANDLER_ID} \
"FirefoxURL" \
"FirefoxHTML"
${EndIf}
${ResetWin8PromptKeys} "HKCU" ""
${ResetWin8MetroSplash}
!else
; The metro browser is not enabled by the mozconfig.
${If} ${AtLeastWin8}
${RemoveDEHRegistration} ${DELEGATE_EXECUTE_HANDLER_ID} \
$AppUserModelID \
"FirefoxURL" \
"FirefoxHTML"
${EndIf}
!endif
${un.RegCleanAppHandler} "FirefoxURL"
${un.RegCleanAppHandler} "FirefoxHTML"

View File

@ -71,14 +71,8 @@ STUB_HOOK = $(NSINSTALL) -D '$(_ABS_DIST)/$(PKG_INST_PATH)'; \
$(NULL)
endif
ifeq ($(MOZ_WIDGET_TOOLKIT) $(DIST_SUBDIR),windows metro)
SEARCHPLUGINS_NAMES = $(shell cat $(call MERGE_FILE,/searchplugins/metrolist.txt))
else
SEARCHPLUGINS_NAMES = $(shell cat $(call MERGE_FILE,/searchplugins/list.txt)) ddg
endif
SEARCHPLUGINS_PATH := $(FINAL_TARGET)/searchplugins
# metro build call a searchplugins target for search engine plugins
.PHONY: searchplugins
SEARCHPLUGINS_TARGET := libs searchplugins
SEARCHPLUGINS := $(foreach plugin,$(addsuffix .xml,$(SEARCHPLUGINS_NAMES)),$(or $(wildcard $(call EN_US_OR_L10N_FILE,searchplugins/$(plugin))),$(info Missing searchplugin: $(plugin))))
# Some locale-specific search plugins may have preprocessor directives, but the
@ -88,12 +82,7 @@ PP_TARGETS += SEARCHPLUGINS
# Required for l10n.mk - defines a list of app sub dirs that should
# be included in langpack xpis.
ifdef MOZ_METRO
# metro build, include both app folders
DIST_SUBDIRS = browser metro
else
DIST_SUBDIRS = $(DIST_SUBDIR)
endif
include $(topsrcdir)/config/rules.mk
@ -138,9 +127,6 @@ endif
@$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$*
@$(MAKE) -C ../../intl/locales AB_CD=$* XPI_NAME=locale-$*
@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=$(PREF_DIR)
ifdef MOZ_METRO
@$(MAKE) -C ../metro/locales AB_CD=$* XPI_NAME=locale-$*
endif
@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$*
repackage-win32-installer: WIN32_INSTALLER_OUT=$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe

View File

@ -812,8 +812,6 @@ just addresses the organization to follow, e.g. "This site is run by " -->
<!ENTITY appMenuSidebars.label "Sidebars">
<!ENTITY switchToMetroCmd2.label "Relaunch in &brandShortName; for Windows 8 Touch">
<!-- LOCALIZATION NOTE: (panicButton.view.mainTimeframeDesc, panicButton.view.5min, panicButton.view.2hr, panicButton.view.day):
The .mainTimeframeDesc string combined with any of the 3 others is meant to form a complete sentence, e.g. "Forget the last: Five minutes".
Please ensure that this remains the case in the translation. -->

View File

@ -33,10 +33,6 @@ add-ons-button.label = Add-ons
# LOCALIZATION NOTE(add-ons-button.tooltiptext3): %S is the keyboard shortcut
add-ons-button.tooltiptext3 = Manage your add-ons (%S)
switch-to-metro-button2.label = Windows 8 Touch
# LOCALIZATION NOTE(switch-to-metro-button2.tooltiptext): %S is the brand short name
switch-to-metro-button2.tooltiptext = Relaunch in %S for Windows 8 Touch
preferences-button.label = Preferences
preferences-button.tooltiptext2 = Open preferences
preferences-button.tooltiptext.withshortcut = Open preferences (%S)

View File

@ -74,13 +74,8 @@
<!ENTITY updateTab.label "Update">
<!ENTITY updateApp.label "&brandShortName; updates:">
<!-- Note either updateAuto1 is used or (updateAutoMetro and updateAutoDesktop),
so re-using accesss key in updateAuto1 is OK. updateAutoDesktop can be found
in preferences.properties -->
<!ENTITY updateAuto1.label "Automatically install updates (recommended: improved security)">
<!ENTITY updateAuto1.accesskey "A">
<!ENTITY updateAutoMetro.label "Automatically update from desktop and Windows 8 style &brandShortName;">
<!ENTITY updateAutoMetro.accesskey "s">
<!ENTITY updateCheck.label "Check for updates, but let me choose whether to install them">
<!ENTITY updateCheck.accesskey "C">
<!ENTITY updateManual.label "Never check for updates (not recommended: security risk)">
@ -89,8 +84,6 @@
<!ENTITY updateAutoAddonWarn.label "Warn me if this will disable any of my add-ons">
<!ENTITY updateAutoAddonWarn.accesskey "W">
<!ENTITY updateAutoMetroWarn.label "(Windows 8 style &brandShortName; does not check add-on compatibility)">
<!ENTITY updateHistory.label "Show Update History">
<!ENTITY updateHistory.accesskey "p">

View File

@ -136,11 +136,6 @@ actualDiskCacheSizeCalculated=Calculating web content cache size…
# %2$S = unit (MB, KB, etc.)
actualAppCacheSize=Your application cache is currently using %1$S %2$S of disk space
###Preferences::Advanced::Update
#LOCALIZATION NOTE: The next string is for updating in Windows 8 only instead of updateAuto1.label. %S = brandShortName
updateAutoDesktop.label=Automatically install updates from desktop %S
updateAutoDesktop.accessKey=A
syncUnlink.title=Do you want to unlink your device?
syncUnlink.label=This device will no longer be associated with your Sync account. All of your personal data, both on this device and in your Sync account, will remain intact.
syncUnlinkConfirm.label=Unlink

View File

@ -33,8 +33,6 @@
<!ENTITY setup.choosePassword.accesskey "P">
<!ENTITY setup.confirmPassword.label "Confirm Password">
<!ENTITY setup.confirmPassword.accesskey "m">
<!ENTITY setup.setupMetro.label "Sync with Windows 8 style &brandShortName;">
<!ENTITY setup.setupMetro.accesskey "S">
<!-- LOCALIZATION NOTE: tosAgree1, tosLink, tosAgree2, ppLink, tosAgree3 are
joined with implicit white space, so spaces in the strings aren't necessary -->

View File

@ -37,9 +37,4 @@
# link title for https://www.mozilla.org/en-US/about/
#define firefox_about About Us
# LOCALIZATION NOTE (firefox_feedback):
# link title for browser feedback page
# currently used by Metro only: https://input.mozilla.org/feedback/metrofirefox
#define firefox_feedback Give Feedback
#unfilter emptyLines

File diff suppressed because one or more lines are too long

View File

@ -1,19 +0,0 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>Google</ShortName>
<Description>Google Search</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">data:image/x-icon;base64,AAABAAIAEBAAAAAAAAB9AQAAJgAAACAgAAAAAAAA8gIAAKMBAACJUE5HDQoaCgAAAA1JSERSAAAAEAAAABAIBgAAAB/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wESV6hEg4gfW8CfIMMTlmDg7Bd/iTNRhIlRZE5Hg6+W2+DE2zC7B5oXwCNlPG/YzjcdFR5T7rggBBcCuSorjHPzAB4k4OGuxXZUzfviIyLqb/VMp8QbTgsbht3u4F0QOFgaMKCdAGgYt8eBBABaxOBiLl8ib8wvRdRgpmbAwKETdiKgSFRBVogKiSlRAVIkKiCpRAeEgCgFWCbh2vvoH70ndWWrEB3aJo64iJHDETx51FviyMtIyP1vF5fVl97iq8YFf5jNFZC6uyoFS80azqfhrw9HAF1zv28S7V4E+4ydnXZkMfFl5Z199leDuww38h6Uq/R+mjexaMP/pdwAAAABJRU5ErkJggg==</Image>
<Url type="application/x-suggestions+json" method="GET" template="https://www.google.com/complete/search?client=metrofirefox&amp;q={searchTerms}"/>
<Url type="text/html" method="GET" template="https://www.google.com/search">
<Param name="q" value="{searchTerms}"/>
<Param name="ie" value="utf-8"/>
<Param name="oe" value="utf-8"/>
<Param name="client" value="metrofirefox"/>
</Url>
<SearchForm>https://www.google.com/</SearchForm>
</SearchPlugin>

View File

@ -1,4 +0,0 @@
bingmetrofx
googlemetrofx
wikipediametrofx
yahoometrofx

View File

@ -1,20 +0,0 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>Wikipedia (en)</ShortName>
<Description>Wikipedia, the free encyclopedia</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">data:image/x-icon;base64,AAABAAIAEBAAAAAAAAA4AQAAJgAAACAgAAAAAAAAJAMAAGQBAACJUE5HDQoaCgAAAA1JSERSAAAAEAAAABAIBgAAAB/z/2EAAAEFSURBVDjLxZPRDYJAEESJoQjpgBoM/9IBtoAl4KcUQQlSAjYgJWAH0gPmyNtkzEEuxkQTPzawc3Ozc3MQTc/JfVPR/wW6a+eKQ+Hyfe54B2wvrfX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5+fnQ1NfX/zE8REFBAfHt5ubGJSstLSWyhISE+Ph4NIaHh7n0SImoAVRVVVG+/Em8w8NDdu5GuSRVhioMdtlKX19fGdM2NzdDk5eX90l7n8VjijViOioqikuWm5vLruBQo8qY08bGBrKDg4M/jzczM8NeFtTEUmXHx8eob0ihg+qZa8KpqSlowsPDP+9NAXgIdg2dk5PDJSsuLiaysLAw2QUDNh/fBa+7u5u9LeBK8bW1tex1XlpaktRgu4AhV1dXhRhTDB7C1NSU+AaGpABbPuzr2HgRERGSsuzsbAxhy/e98MrLy4lvbAslBWlpaRhCNkOlQpSrq6tsDXYeKND19fUV5UpheOfn5+rq6sR3T08Pe/To6Aidjo6OaCclJXG9aRsbG9FZU1Pz7fAQqampXNVzdHQ0yYpzc3PsW3RjY4PIzM3N0YNi6DviIZWxfc/OzjL9W1tbOAwICCBKtNlFDNM5Pj4udVP/XfAQ5NsBAumeDbO9vU1k2DdIpkrm48rnU/kX4g0ODop9pzo9PUUjOTlZTOnl5UVkhYWFuCHRCA4OVqwfBeMh7O3tie+ysrLIyEg0kBXEZKiniQyPHMDQEAqF3x2voaFB7DtaSUmJVKWLiwtb5u3trXAzisfDXk5HR4eYRpZ7fX39ba2D6O3t/QvwENjIENOtra0ylDwej5FZW1t/hZMvwROJRIxpPp8vWwl4RllXV/fX4CGCgoJgemRk5PcOfsXd3d1X2FD9op9mioqKUIIxkLJDIBBgy6+lpfUVNpTe6L+KUzyKR/EoHsWjeBSP4lE8ikfxKB7Fo3gUj+JRvHfFTwEGAAgMbrUkfQalAAAAAElFTkSuQmCC</Image>
<Url type="application/x-suggestions+json" method="GET" template="http://en.wikipedia.org/w/api.php">
<Param name="action" value="opensearch"/>
<Param name="search" value="{searchTerms}"/>
</Url>
<Url type="text/html" method="GET" template="http://en.wikipedia.org/wiki/Special:Search">
<Param name="search" value="{searchTerms}"/>
<Param name="sourceid" value="Mozilla-search"/>
</Url>
<SearchForm>http://en.wikipedia.org/wiki/Special:Search</SearchForm>
</SearchPlugin>

File diff suppressed because one or more lines are too long

View File

@ -20,8 +20,7 @@ def test(mod, path, entity = None):
if mod == "extensions/spellcheck":
return "ignore"
# browser
if (re.match(r"searchplugins\/.+\.xml", path) or
path == "searchplugins/metrolist.txt"):
if (re.match(r"searchplugins\/.+\.xml", path):
return "ignore"
return "error"
if mod == "extensions/spellcheck":

View File

@ -1,23 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
include $(topsrcdir)/config/rules.mk
#########################################
# application.ini
GRE_BUILDID := $(shell cat $(DEPTH)/config/buildid)
DEFINES += -DGRE_BUILDID=$(GRE_BUILDID) -DMOZ_APP_BASENAME=$(MOZ_APP_BASENAME)
# 'application.ini' breaks firefox build config. So we use something different.
metroapp.ini: metroapp.ini.in $(DEPTH)/config/buildid $(topsrcdir)/config/milestone.txt
$(RM) metroapp.ini
$(call py_action,preprocessor,$(DEFINES) $< -o $@)
libs:: metroapp.ini
$(INSTALL) metroapp.ini $(FINAL_TARGET)
#########################################
GARBAGE += metroapp.ini

View File

@ -1,97 +0,0 @@
/*
* BrowserTouchHandler
*
* Receives touch events from our input event capturing in input.js
* and relays appropriate events to content. Also handles requests
* from content for UI.
*/
const BrowserTouchHandler = {
_debugEvents: false,
init: function init() {
// Misc. events we catch during the bubbling phase
document.addEventListener("PopupChanged", this, false);
document.addEventListener("CancelTouchSequence", this, false);
// Messages sent from content.js
messageManager.addMessageListener("Content:ContextMenu", this);
messageManager.addMessageListener("Content:SelectionCaret", this);
},
// Content forwarding the contextmenu command
_onContentContextMenu: function _onContentContextMenu(aMessage) {
// Note, target here is the target of the message manager message,
// usually the browser.
// Touch input selection handling
if (!InputSourceHelper.isPrecise &&
!SelectionHelperUI.isActive &&
SelectionHelperUI.canHandleContextMenuMsg(aMessage)) {
SelectionHelperUI.openEditSession(aMessage.target,
aMessage.json.xPos,
aMessage.json.yPos);
return;
}
// Check to see if we have context menu item(s) that apply to what
// was clicked on.
let contextInfo = { name: aMessage.name,
json: aMessage.json,
target: aMessage.target };
if (ContextMenuUI.showContextMenu(contextInfo)) {
let event = document.createEvent("Events");
event.initEvent("CancelTouchSequence", true, false);
document.dispatchEvent(event);
} else {
// Send the MozEdgeUIGesture to input.js to
// toggle the context ui.
let event = document.createEvent("Events");
event.initEvent("MozEdgeUICompleted", true, false);
window.dispatchEvent(event);
}
},
/*
* Called when Content wants to initiate selection management
* due to a tap in a form input.
*/
_onCaretSelectionStarted: function _onCaretSelectionStarted(aMessage) {
SelectionHelperUI.attachToCaret(aMessage.target,
aMessage.json.xPos,
aMessage.json.yPos);
},
/*
* Events
*/
handleEvent: function handleEvent(aEvent) {
// ignore content events we generate
if (aEvent.target == document)
return;
if (this._debugEvents)
Util.dumpLn("BrowserTouchHandler:", aEvent.type);
switch (aEvent.type) {
case "PopupChanged":
case "CancelTouchSequence":
if (!aEvent.detail)
ContextMenuUI.reset();
break;
}
},
receiveMessage: function receiveMessage(aMessage) {
if (this._debugEvents) Util.dumpLn("BrowserTouchHandler:", aMessage.name);
switch (aMessage.name) {
// Content forwarding the contextmenu command
case "Content:ContextMenu":
this._onContentContextMenu(aMessage);
break;
case "Content:SelectionCaret":
this._onCaretSelectionStarted(aMessage);
break;
}
},
};

View File

@ -1,361 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* ContentAreaObserver manages tracking the viewable area within the browser.
* It also handles certain tasks like positioning of input elements within
* content when the viewable area changes.
*
* ContentAreaObserver creates styles that content can apply and also fires
* events when things change. The 'width' and 'height' properties of the
* styles are updated whenever various parts of the UI are resized.
*
* styles: window-width, window-height
* events: SizeChanged
*
* The innerWidth/innerHeight of the main chrome window.
*
* styles: content-width, content-height
* events: ContentSizeChanged
*
* The area of the window dedicated to web content; this is equal to the
* innerWidth/Height minus any toolbars or similar chrome.
*
* styles: viewable-width, viewable-height
* events: ViewableSizeChanged
*
* The portion of the content area that is not obscured by the on-screen
* keyboard.
*
* ContentAreaObserver also manages soft keyboard related events. Events
* fired include:
*
* KeyboardChanged - fired after the visibility of the soft keyboard changes
* and after any view related changes are made to accomidate view dim
* changes as a result.
*
* MozDeckOffsetChanging, MozDeckOffsetChanged - interim events fired when
* the browser deck is being repositioned to move focused elements out of
* the way of the keyboard.
*/
var ContentAreaObserver = {
styles: {},
_shiftAmount: 0,
_deckTransitioning: false,
/*
* Properties
*/
get width() {
return window.innerWidth || 1366;
},
get height() {
return window.innerHeight || 768;
},
get contentHeight() {
return this._getContentHeightForWindow(this.height);
},
get viewableHeight() {
return this._getViewableHeightForContent(this.contentHeight);
},
get isKeyboardOpened() {
return Services.metro.keyboardVisible;
},
get isKeyboardTransitioning() {
return this._deckTransitioning;
},
get viewstate() {
if (this.width < Services.prefs.getIntPref("browser.ui.snapped.maxWidth")) {
return "snapped";
}
return (this.height > this.width) ? "portrait" : "landscape";
},
/*
* Public apis
*/
init: function init() {
window.addEventListener("resize", this, false);
// Message manager msgs we listen for
messageManager.addMessageListener("Content:RepositionInfoResponse", this);
// Observer msgs we listen for
Services.obs.addObserver(this, "metro_softkeyboard_shown", false);
Services.obs.addObserver(this, "metro_softkeyboard_hidden", false);
// setup initial values for browser form repositioning
this.shiftBrowserDeck(0);
// initialize our custom width and height styles
this._initStyles();
// apply default styling
this.update();
},
shutdown: function shutdown() {
messageManager.removeMessageListener("Content:RepositionInfoResponse", this);
Services.obs.removeObserver(this, "metro_softkeyboard_shown");
Services.obs.removeObserver(this, "metro_softkeyboard_hidden");
},
update: function cao_update (width, height) {
let oldWidth = parseInt(this.styles["window-width"].width);
let oldHeight = parseInt(this.styles["window-height"].height);
let newWidth = width || this.width;
let newHeight = height || this.height;
if (newHeight == oldHeight && newWidth == oldWidth) {
return;
}
this.styles["window-width"].width = newWidth + "px";
this.styles["window-width"].maxWidth = newWidth + "px";
this.styles["window-height"].height = newHeight + "px";
this.styles["window-height"].maxHeight = newHeight + "px";
this._updateViewState();
this.updateContentArea(newWidth, this._getContentHeightForWindow(newHeight));
this._dispatchBrowserEvent("SizeChanged");
},
updateContentArea: function cao_updateContentArea (width, height) {
let oldHeight = parseInt(this.styles["content-height"].height);
let oldWidth = parseInt(this.styles["content-width"].width);
let newWidth = width || this.width;
let newHeight = height || this.contentHeight;
if (newHeight == oldHeight && newWidth == oldWidth) {
return;
}
this.styles["content-height"].height = newHeight + "px";
this.styles["content-height"].maxHeight = newHeight + "px";
this.styles["content-width"].width = newWidth + "px";
this.styles["content-width"].maxWidth = newWidth + "px";
this.updateViewableArea(newWidth, this._getViewableHeightForContent(newHeight));
this._dispatchBrowserEvent("ContentSizeChanged");
},
updateViewableArea: function cao_updateViewableArea (width, height) {
let oldHeight = parseInt(this.styles["viewable-height"].height);
let oldWidth = parseInt(this.styles["viewable-width"].width);
let newWidth = width || this.width;
let newHeight = height || this.viewableHeight;
if (newHeight == oldHeight && newWidth == oldWidth) {
return;
}
this.styles["viewable-height"].height = newHeight + "px";
this.styles["viewable-height"].maxHeight = newHeight + "px";
this.styles["viewable-width"].width = newWidth + "px";
this.styles["viewable-width"].maxWidth = newWidth + "px";
this.updateAppBarPosition();
// Update the back/tab button states. If the keyboard is up
// these are hidden.
BrowserUI._updateButtons();
this._dispatchBrowserEvent("ViewableSizeChanged");
},
updateAppBarPosition: function updateAppBarPosition(aForceDown) {
// Adjust the app and find bar position above the soft keyboard
let keyboardHeight = aForceDown ? 0 : Services.metro.keyboardHeight;
Elements.navbar.style.bottom = keyboardHeight + "px";
Elements.contextappbar.style.bottom = keyboardHeight + "px";
Elements.findbar.style.bottom = keyboardHeight + "px";
},
/*
* Called by BrowserUI right before we blur the nav bar edit. We use
* this to get a head start on shuffling app bars around before the
* soft keyboard transitions down.
*/
navBarWillBlur: function navBarWillBlur() {
this.updateAppBarPosition(true);
},
onBrowserCreated: function onBrowserCreated(aBrowser) {
let notificationBox = aBrowser.parentNode.parentNode;
notificationBox.classList.add("content-width");
notificationBox.classList.add("content-height");
},
/*
* Event handling
*/
_onKeyboardDisplayChanging: function _onKeyboardDisplayChanging(aNewState) {
if (aNewState) {
Elements.stack.setAttribute("keyboardVisible", true);
} else {
Elements.stack.removeAttribute("keyboardVisible");
}
this.updateViewableArea();
if (!aNewState) {
this.shiftBrowserDeck(0);
return;
}
// Request info about the target form element to see if we
// need to reposition the browser above the keyboard.
if (SelectionHelperUI.layerMode === 2 /*kContentLayer*/) {
Browser.selectedBrowser.messageManager.sendAsyncMessage("Browser:RepositionInfoRequest", {
viewHeight: this.viewableHeight,
});
}
},
_onRepositionResponse: function _onRepositionResponse(aJsonMsg) {
if (!aJsonMsg.reposition || !this.isKeyboardOpened) {
this.shiftBrowserDeck(0);
return;
}
this.shiftBrowserDeck(aJsonMsg.raiseContent);
},
observe: function cao_observe(aSubject, aTopic, aData) {
// Note these are fired before the transition starts. Also per MS specs
// we should not do anything "heavy" here. We have about 100ms before
// windows just ignores the event and starts the animation.
switch (aTopic) {
case "metro_softkeyboard_hidden":
case "metro_softkeyboard_shown":
// Mark that we are in a transition state. Auto-complete and other
// popups will wait for an event before displaying anything.
this._deckTransitioning = true;
// This also insures tap events are delivered before we fire
// this event. Form repositioning requires the selection handler
// be running before we send this.
let self = this;
let state = aTopic == "metro_softkeyboard_shown";
Util.executeSoon(function () {
self._onKeyboardDisplayChanging(state);
});
break;
}
},
handleEvent: function cao_handleEvent(aEvent) {
switch (aEvent.type) {
case 'resize':
if (aEvent.target != window)
return;
ContentAreaObserver.update();
break;
}
},
receiveMessage: function sh_receiveMessage(aMessage) {
switch (aMessage.name) {
case "Content:RepositionInfoResponse":
this._onRepositionResponse(aMessage.json);
break;
}
},
/*
* Internal helpers
*/
_updateViewState: function (aState) {
let oldViewstate = Elements.windowState.getAttribute("viewstate");
let viewstate = aState || this.viewstate;
if (viewstate != oldViewstate) {
Elements.windowState.setAttribute("viewstate", viewstate);
Services.obs.notifyObservers(null, "metro_viewstate_changed", viewstate);
}
},
shiftBrowserDeck: function (aAmount) {
if (aAmount == 0) {
this._deckTransitioning = false;
this._dispatchWindowEvent("KeyboardChanged", this.isKeyboardOpened);
}
if (this._shiftAmount == aAmount)
return;
this._shiftAmount = aAmount;
this._dispatchWindowEvent("MozDeckOffsetChanging", aAmount);
// Elements.browsers is the deck all browsers sit in
let self = this;
Elements.browsers.addEventListener("transitionend", function () {
Elements.browsers.removeEventListener("transitionend", arguments.callee, true);
self._deckTransitioning = false;
self._dispatchWindowEvent("MozDeckOffsetChanged", aAmount);
self._dispatchWindowEvent("KeyboardChanged", self.isKeyboardOpened);
}, true);
// selectAtPoint bug 858471
//Elements.browsers.style.transform = "translateY(" + (-1 * aAmount) + "px)";
Elements.browsers.style.marginTop = "" + (-1 * aAmount) + "px";
},
_dispatchWindowEvent: function _dispatchWindowEvent(aEventName, aDetail) {
let event = document.createEvent("UIEvents");
event.initUIEvent(aEventName, true, false, window, aDetail);
window.dispatchEvent(event);
},
_dispatchBrowserEvent: function (aName, aDetail) {
setTimeout(function() {
let event = document.createEvent("Events");
event.initEvent(aName, true, false);
Elements.browsers.dispatchEvent(event);
}, 0);
},
_initStyles: function _initStyles() {
let stylesheet = document.styleSheets[0];
for (let style of ["window-width", "window-height",
"content-height", "content-width",
"viewable-height", "viewable-width"]) {
let index = stylesheet.insertRule("." + style + " {}", stylesheet.cssRules.length);
this.styles[style] = stylesheet.cssRules[index].style;
}
},
_getContentHeightForWindow: function (windowHeight) {
return windowHeight;
},
_getViewableHeightForContent: function (contentHeight) {
let keyboardHeight = Services.metro.keyboardHeight;
return contentHeight - keyboardHeight;
},
_debugDumpDims: function _debugDumpDims() {
let width = parseInt(this.styles["window-width"].width);
let height = parseInt(this.styles["window-height"].height);
Util.dumpLn("window:", width, height);
width = parseInt(this.styles["content-width"].width);
height = parseInt(this.styles["content-height"].height);
Util.dumpLn("content:", width, height);
width = parseInt(this.styles["viewable-width"].width);
height = parseInt(this.styles["viewable-height"].height);
Util.dumpLn("viewable:", width, height);
}
};

View File

@ -1,436 +0,0 @@
// -*- indent-tabs-mode: nil; js-indent-level: 2 -*-
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* context menu command handlers
*/
var ContextCommands = {
_picker: null,
get _ellipsis() {
delete this._ellipsis;
this._ellipsis = "\u2026";
try {
this._ellipsis = Services.prefs.getComplexValue("intl.ellipsis", Ci.nsIPrefLocalizedString).data;
} catch (ex) { }
return this._ellipsis;
},
get clipboard() {
return Cc["@mozilla.org/widget/clipboardhelper;1"]
.getService(Ci.nsIClipboardHelper);
},
get docRef() {
return Browser.selectedBrowser.contentWindow.document;
},
/*
* Context menu handlers
*/
// Text specific
cut: function cc_cut() {
let target = ContextMenuUI.popupState.target;
if (!target) {
return;
}
if (target.localName === "browser") {
// content
if (ContextMenuUI.popupState.string) {
this.sendCommand("cut");
SelectionHelperUI.closeEditSession(true);
}
} else {
// chrome
CommandUpdater.doCommand("cmd_cut");
}
target.focus();
},
copy: function cc_copy() {
let target = ContextMenuUI.popupState.target;
if (!target) {
return;
}
if (target.localName == "browser") {
// content
if (ContextMenuUI.popupState.string) {
this.sendCommand("copy");
}
} else if (ContextMenuUI.popupState.string) {
this.clipboard.copyString(ContextMenuUI.popupState.string, this.docRef);
} else {
// chrome
CommandUpdater.doCommand("cmd_copy");
}
target.focus();
},
paste: function cc_paste() {
let target = ContextMenuUI.popupState.target;
if (!target) {
return;
}
if (target.localName == "browser") {
// content
let x = ContextMenuUI.popupState.x;
let y = ContextMenuUI.popupState.y;
let json = {x: x, y: y, command: "paste" };
target.messageManager.sendAsyncMessage("Browser:ContextCommand", json);
} else {
// chrome
CommandUpdater.doCommand("cmd_paste");
target.focus();
}
SelectionHelperUI.closeEditSession();
},
pasteAndGo: function cc_pasteAndGo() {
let target = ContextMenuUI.popupState.target;
target.editor.selectAll();
target.editor.paste(Ci.nsIClipboard.kGlobalClipboard);
BrowserUI.goToURI();
},
select: function cc_select() {
SelectionHelperUI.openEditSession(ContextMenuUI.popupState.target,
ContextMenuUI.popupState.xPos,
ContextMenuUI.popupState.yPos,
true);
},
selectAll: function cc_selectAll() {
let target = ContextMenuUI.popupState.target;
if (target.localName == "browser") {
// content
let x = ContextMenuUI.popupState.xPos;
let y = ContextMenuUI.popupState.yPos;
let json = {x: x, y: y, command: "select-all" };
target.messageManager.sendAsyncMessage("Browser:ContextCommand", json);
SelectionHelperUI.attachEditSession(target, x, y);
} else {
// chrome
target.editor.selectAll();
target.focus();
}
},
// called on display of the search text menu item
searchTextSetup: function cc_searchTextSetup(aRichListItem, aSearchString) {
let defaultURI;
let defaultName;
aSearchString = aSearchString.trim();
try {
let defaultPB = Services.prefs.getDefaultBranch(null);
const nsIPLS = Ci.nsIPrefLocalizedString;
defaultName = defaultPB.getComplexValue("browser.search.defaultenginename", nsIPLS).data;
let defaultEngine = Services.search.getEngineByName(defaultName);
defaultURI = defaultEngine.getSubmission(aSearchString).uri.spec;
} catch (ex) {
Cu.reportError(ex);
return false;
}
let displayString = aSearchString;
if (displayString.length > 15) {
displayString = displayString.substring(0, 15) + this._ellipsis;
}
// label child node
let label = Services.strings
.createBundle("chrome://browser/locale/browser.properties")
.formatStringFromName("browser.search.contextTextSearchLabel2",
[defaultName, displayString], 2);
aRichListItem.childNodes[0].setAttribute("value", label);
aRichListItem.setAttribute("searchString", defaultURI);
return true;
},
searchText: function cc_searchText(aRichListItem) {
let defaultURI = aRichListItem.getAttribute("searchString");
aRichListItem.childNodes[0].setAttribute("value", "");
aRichListItem.setAttribute("searchString", "");
BrowserUI.addAndShowTab(defaultURI, Browser.selectedTab);
},
// Link specific
openLinkInNewTab: function cc_openLinkInNewTab() {
let url = ContextMenuUI.popupState.linkURL;
BrowserUI.openLinkInNewTab(url, false, Browser.selectedTab);
},
copyLink: function cc_copyLink() {
this.clipboard.copyString(ContextMenuUI.popupState.linkURL,
this.docRef);
},
bookmarkLink: function cc_bookmarkLink() {
let state = ContextMenuUI.popupState;
let uri = Util.makeURI(state.linkURL);
let title = state.linkTitle || state.linkURL;
try {
Bookmarks.addForURI(uri, title);
} catch (e) {
return;
}
},
// Image specific
saveImageToLib: function cc_saveImageToLib() {
this.saveToWinLibrary("Pict");
},
copyImage: function cc_copyImage() {
// copy to clibboard
this.sendCommand("copy-image-contents");
},
copyImageSrc: function cc_copyImageSrc() {
this.clipboard.copyString(ContextMenuUI.popupState.mediaURL,
this.docRef);
},
openImageInNewTab: function cc_openImageInNewTab() {
BrowserUI.addAndShowTab(ContextMenuUI.popupState.mediaURL, Browser.selectedTab);
},
// Video specific
saveVideoToLib: function cc_saveVideoToLib() {
this.saveToWinLibrary("Vids");
},
copyVideoSrc: function cc_copyVideoSrc() {
this.clipboard.copyString(ContextMenuUI.popupState.mediaURL,
this.docRef);
},
openVideoInNewTab: function cc_openVideoInNewTab() {
BrowserUI.addAndShowTab(ContextMenuUI.popupState.mediaURL, Browser.selectedTab);
},
// Bookmarks
editBookmark: function cc_editBookmark() {
let target = ContextMenuUI.popupState.target;
target.startEditing();
},
removeBookmark: function cc_removeBookmark() {
let target = ContextMenuUI.popupState.target;
target.remove();
},
// App bar
errorConsole: function cc_errorConsole() {
PanelUI.show("console-container");
},
jsShell: function cc_jsShell() {
// XXX for debugging, this only works when running on the desktop.
if (!Services.metro.immersive)
window.openDialog("chrome://browser/content/shell.xul", "_blank",
"all=no,scrollbars=yes,resizable=yes,dialog=no");
},
findInPage: function cc_findInPage() {
FindHelperUI.show();
},
viewOnDesktop: function cc_viewOnDesktop() {
Appbar.onViewOnDesktop();
},
// Checks for MS app store specific meta data, and if present opens
// the Windows Store to the appropriate app
openWindowsStoreLink: function cc_openWindowsStoreLink() {
let storeLink = this.getStoreLink();
if (storeLink) {
Browser.selectedBrowser.contentWindow.document.location = storeLink;
}
},
getStoreLink: function cc_getStoreLink() {
let metaData = Browser.selectedBrowser.contentWindow.document.getElementsByTagName("meta");
let msApplicationName = metaData.namedItem("msApplication-PackageFamilyName");
if (msApplicationName) {
return "ms-windows-store:PDP?PFN=" + msApplicationName.getAttribute("content");
}
return null;
},
getPageSource: function cc_getPageSource() {
let uri = Services.io.newURI(Browser.selectedBrowser.currentURI.spec, null, null);
if (!uri.schemeIs("view-source")) {
return "view-source:" + Browser.selectedBrowser.currentURI.spec;
}
return null;
},
viewPageSource: function cc_viewPageSource() {
let uri = this.getPageSource();
if (uri) {
BrowserUI.addAndShowTab(uri, Browser.selectedTab);
}
},
/*
* Utilities
*/
saveToWinLibrary: function cc_saveToWinLibrary(aType) {
let popupState = ContextMenuUI.popupState;
let browser = popupState.target;
// ContentAreaUtils internalSave relies on various desktop related prefs,
// values, and functionality. We want to be more direct by saving the
// image to the users Windows Library. If users want to specify the
// save location they can use the context menu option 'Save (type) To'.
let dirSvc = Components.classes["@mozilla.org/file/directory_service;1"]
.getService(Components.interfaces.nsIProperties);
let saveLocationPath = dirSvc.get(aType, Components.interfaces.nsIFile);
let fileInfo = new ContentAreaUtils.FileInfo();
ContentAreaUtils.initFileInfo(fileInfo, popupState.mediaURL,
browser.documentURI.originCharset,
null, null, null);
let filename =
ContentAreaUtils.getNormalizedLeafName(fileInfo.fileName, fileInfo.fileExt);
saveLocationPath.append(filename);
// Start the background save process
ContentAreaUtils.internalPersist({
sourceURI : fileInfo.uri,
sourceDocument : null,
sourceReferrer : browser.documentURI,
targetContentType : popupState.contentType,
targetFile : saveLocationPath,
sourceCacheKey : null,
sourcePostData : null,
bypassCache : false,
initiatingWindow : this.docRef.defaultView
});
},
sendCommand: function sendCommand(aCommand) {
// Send via message manager over to ContextMenuHandler
let browser = ContextMenuUI.popupState.target;
browser.messageManager.sendAsyncMessage("Browser:ContextCommand", { command: aCommand });
},
/*
* isAccessibleDirectory
*
* Test to see if the directory exists and is writable.
*/
isAccessibleDirectory: function isAccessibleDirectory(aDirectory) {
return aDirectory && aDirectory.exists() && aDirectory.isDirectory() &&
aDirectory.isWritable();
},
/*
* saveFileAs
*
* Browse for a location and then save a file to the local system using
* standard download prefs.
*
* @param aFileUriString path to file
*/
saveFileAs: function saveFileAs(aPopupState) {
let srcUri = null;
let mediaURL = aPopupState.mediaURL;
try {
srcUri = Util.makeURI(mediaURL, null, null);
} catch (ex) {
Util.dumpLn("could not parse:", mediaURL);
return;
}
let picker = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
let windowTitle = Strings.browser.GetStringFromName("browserForSaveLocation");
picker.init(window, windowTitle, Ci.nsIFilePicker.modeSave);
// prefered filename
let fileName = mediaURL.substring(mediaURL.lastIndexOf("/") + 1);
if (fileName.length)
picker.defaultString = fileName;
// prefered file extension
let fileExtension = mediaURL.substring(mediaURL.lastIndexOf(".") + 1);
if (fileExtension.length)
picker.defaultExtension = fileExtension;
picker.appendFilters(Ci.nsIFilePicker.filterImages);
// prefered save location
Task.spawn(function() {
let preferredDir = yield Downloads.getPreferredDownloadsDirectory();
picker.displayDirectory = new FileUtils.File(preferredDir);
try {
let lastDir = Services.prefs.getComplexValue("browser.download.lastDir", Ci.nsILocalFile);
if (this.isAccessibleDirectory(lastDir))
picker.displayDirectory = lastDir;
}
catch (e) { }
this._picker = picker;
this._pickerUrl = mediaURL;
this._pickerContentDisp = aPopupState.contentDisposition;
this._contentType = aPopupState.contentType;
picker.open(ContextCommands);
}.bind(this));
},
/*
* Filepicker callback
*/
done: function done(aSuccess) {
let picker = this._picker;
this._picker = null;
if (aSuccess == Ci.nsIFilePicker.returnCancel)
return;
let file = picker.file;
if (file == null)
return;
try {
if (file.exists())
file.remove(false);
} catch (e) {}
ContentAreaUtils.internalSave(this._pickerUrl, null, null,
this._pickerContentDisp,
this._contentType, false, "SaveImageTitle",
new AutoChosen(file, Util.makeURI(this._pickerUrl, null, null)),
getBrowser().documentURI, this.docRef, true, null);
var newDir = file.parent.QueryInterface(Ci.nsILocalFile);
Services.prefs.setComplexValue("browser.download.lastDir", Ci.nsILocalFile, newDir);
},
};
function AutoChosen(aFileAutoChosen, aUriAutoChosen) {
this.file = aFileAutoChosen;
this.uri = aUriAutoChosen;
}

View File

@ -1,399 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// Fired when the tabtray is displayed
const kContextUITabsShowEvent = "MozContextUITabsShow";
// add more as needed...
/*
* Manages context UI (navbar, tabbar, appbar) and track visibility. Also
* tracks events that summon and hide the context UI.
*/
var ContextUI = {
_expandable: true,
_hidingId: 0,
/*******************************************
* init
*/
init: function init() {
Elements.browsers.addEventListener('URLChanged', this, true);
Elements.browsers.addEventListener("AlertActive", this, true);
Elements.browsers.addEventListener("AlertClose", this, true);
Elements.tabList.addEventListener('TabSelect', this, true);
Elements.panelUI.addEventListener('ToolPanelShown', this, false);
Elements.panelUI.addEventListener('ToolPanelHidden', this, false);
Elements.tray.addEventListener("mousemove", this, false);
Elements.tray.addEventListener("mouseleave", this, false);
window.addEventListener("touchstart", this, true);
window.addEventListener("mousedown", this, true);
window.addEventListener("MozEdgeUIStarted", this, true);
window.addEventListener("MozEdgeUICanceled", this, true);
window.addEventListener("MozEdgeUICompleted", this, true);
window.addEventListener("keypress", this, true);
window.addEventListener("KeyboardChanged", this, false);
window.addEventListener("MozFlyoutPanelShowing", this, false);
Elements.tray.addEventListener("transitionend", this, true);
Appbar.init();
},
/*******************************************
* Context UI state getters & setters
*/
// any visiblilty
get isVisible() {
return this.navbarVisible || this.tabbarVisible || this.contextAppbarVisible;
},
// navbar visiblilty
get navbarVisible() {
return (Elements.navbar.hasAttribute("visible") ||
Elements.navbar.hasAttribute("startpage"));
},
// tabbar visiblilty
get tabbarVisible() {
return Elements.tray.hasAttribute("expanded");
},
// appbar visiblilty
get contextAppbarVisible() {
return Elements.contextappbar.isShowing;
},
// currently not in use, for the always show tabs feature
get isExpandable() { return this._expandable; },
set isExpandable(aFlag) {
this._expandable = aFlag;
if (!this._expandable)
this.dismiss();
},
/*******************************************
* Public api
*/
/*
* Toggle the current nav UI state. Fires context ui events.
*/
toggleNavUI: function () {
// The navbar is forced open when the start page is visible. appbar.js
// controls the "visible" property, and browser-ui controls the "startpage"
// property. Hence we rely on the tabbar for current toggle state.
if (this.tabbarVisible) {
this.dismiss();
} else {
this.displayNavUI();
}
},
/*
* Show the nav and tabs bar. Returns true if any non-visible UI
* was shown. Fires context ui events.
*/
displayNavUI: function () {
let shown = false;
if (!this.navbarVisible) {
BrowserUI.updateURI();
this.displayNavbar();
shown = true;
}
if (!this.tabbarVisible) {
this.displayTabs();
shown = true;
}
if (shown) {
ContentAreaObserver.updateContentArea();
}
return shown;
},
/*
* Dismiss any context UI currently visible. Returns true if any
* visible UI was dismissed. Fires context ui events.
*/
dismiss: function () {
let dismissed = false;
this._clearDelayedTimeout();
// No assurances this will hide the nav bar. It may have the
// 'startpage' property set. This removes the 'visible' property.
if (this.navbarVisible) {
BrowserUI.blurNavBar();
this.dismissNavbar();
dismissed = true;
}
if (this.tabbarVisible) {
this.dismissTabs();
dismissed = true;
}
if (Elements.contextappbar.isShowing) {
this.dismissContextAppbar();
dismissed = true;
}
if (dismissed) {
ContentAreaObserver.updateContentArea();
}
return dismissed;
},
/*
* Briefly show the tab bar and then hide it. Fires context ui events.
*/
peekTabs: function peekTabs(aDelay) {
if (!this.tabbarVisible)
this.displayTabs();
ContextUI.dismissTabsWithDelay(aDelay);
},
/*
* Dismiss tab bar after a delay. Fires context ui events.
*/
dismissTabsWithDelay: function (aDelay) {
aDelay = aDelay || kForegroundTabAnimationDelay;
this._clearDelayedTimeout();
this._lastTimeoutDelay = aDelay;
this._hidingId = setTimeout(function () {
ContextUI.dismissTabs();
}, aDelay);
},
/*
* Display the nav bar.
*
* @return false if we were already visible, and didn't do anything.
*/
displayNavbar: function () {
if (Elements.chromeState.getAttribute("navbar") == "visible") {
return false;
}
Elements.navbar.show();
Elements.chromeState.setAttribute("navbar", "visible");
ContentAreaObserver.updateContentArea();
return true;
},
// Display the tab tray
displayTabs: function () {
this._clearDelayedTimeout();
this._setIsExpanded(true);
},
// Dismiss the navbar if visible.
dismissNavbar: function dismissNavbar() {
if (!BrowserUI.isStartTabVisible) {
Elements.autocomplete.closePopup();
Elements.navbar.dismiss();
Elements.chromeState.removeAttribute("navbar");
ContentAreaObserver.updateContentArea();
}
},
// Dismiss the tabstray if visible.
dismissTabs: function dimissTabs() {
this._clearDelayedTimeout();
this._setIsExpanded(false);
},
// Dismiss the appbar if visible.
dismissContextAppbar: function dismissContextAppbar() {
Elements.contextappbar.dismiss();
},
/*******************************************
* Internal utils
*/
// tabtray state
_setIsExpanded: function _setIsExpanded(aFlag, setSilently) {
// if the tray can't be expanded, don't expand it.
if (!this.isExpandable || this.tabbarVisible == aFlag)
return;
if (aFlag)
Elements.tray.setAttribute("expanded", "true");
else
Elements.tray.removeAttribute("expanded");
if (!setSilently)
this._fire(kContextUITabsShowEvent);
},
_clearDelayedTimeout: function _clearDelayedTimeout() {
if (this._hidingId) {
clearTimeout(this._hidingId);
this._hidingId = 0;
this._delayedHide = false;
}
},
_resetDelayedTimeout: function () {
this._hidingId = setTimeout(function () {
ContextUI.dismissTabs();
}, this._lastTimeoutDelay);
},
/*******************************************
* Events
*/
_onEdgeUIStarted: function(aEvent) {
this._hasEdgeSwipeStarted = true;
this._clearDelayedTimeout();
this.toggleNavUI();
},
_onEdgeUICanceled: function(aEvent) {
this._hasEdgeSwipeStarted = false;
this.dismiss();
},
_onEdgeUICompleted: function(aEvent) {
if (this._hasEdgeSwipeStarted) {
this._hasEdgeSwipeStarted = false;
return;
}
this._clearDelayedTimeout();
this.toggleNavUI();
},
onDownInput: function onDownInput(aEvent) {
if (!this.isVisible) {
return;
}
// Various ui element containers we do not update context ui for.
let whitelist = [
// Clicks on tab bar elements should not close the tab bar. the tabbar
// handles this.
Elements.tabs,
// Don't let a click on an infobar button dismiss the appbar or navbar.
// Note the notification box should always hover above these other two
// bars.
Browser.getNotificationBox()
];
if (whitelist.some(elem => elem.contains(aEvent.target))) {
return;
}
// If a start tab is visible only dismiss the tab bar.
if (BrowserUI.isStartTabVisible) {
ContextUI.dismissTabs();
return;
}
// content, dismiss anything visible
if (aEvent.target.ownerDocument.defaultView.top == getBrowser().contentWindow) {
this.dismiss();
return;
}
// dismiss tabs and context app bar if visible
this.dismissTabs();
this.dismissContextAppbar();
},
onMouseMove: function (aEvent) {
if (this._hidingId) {
this._clearDelayedTimeout();
this._delayedHide = true;
}
},
onMouseLeave: function (aEvent) {
if (this._delayedHide) {
this._delayedHide = false;
this._resetDelayedTimeout();
}
},
handleEvent: function handleEvent(aEvent) {
switch (aEvent.type) {
case "URLChanged":
// "aEvent.detail" is a boolean value that indicates whether actual URL
// has changed ignoring URL fragment changes.
if (aEvent.target == Browser.selectedBrowser && aEvent.detail) {
this.displayNavbar();
}
break;
case "MozEdgeUIStarted":
this._onEdgeUIStarted(aEvent);
break;
case "MozEdgeUICanceled":
this._onEdgeUICanceled(aEvent);
break;
case "MozEdgeUICompleted":
this._onEdgeUICompleted(aEvent);
break;
case "keypress":
if (String.fromCharCode(aEvent.which) == "z" &&
aEvent.getModifierState("Win"))
this.toggleNavUI();
break;
case "transitionend":
setTimeout(function () {
ContentAreaObserver.updateContentArea();
}, 0);
break;
case "KeyboardChanged":
this.dismissTabs();
break;
case "mousedown":
if (aEvent.button != 0) {
break;
}
this.onDownInput(aEvent);
break;
case "mousemove":
this.onMouseMove(aEvent);
break;
case "mouseleave":
this.onMouseLeave(aEvent);
break;
case "touchstart":
this.onDownInput(aEvent);
break;
case "ToolPanelShown":
case "ToolPanelHidden":
this.dismiss();
break;
case "AlertActive":
case "AlertClose":
case "TabSelect":
ContentAreaObserver.updateContentArea();
break;
case "MozFlyoutPanelShowing":
if (BrowserUI.isStartTabVisible) {
this.dismissTabs();
this.dismissContextAppbar();
} else {
this.dismiss();
}
break;
}
},
_fire: function (name) {
let event = document.createEvent("Events");
event.initEvent(name, true, true);
window.dispatchEvent(event);
}
};

Some files were not shown because too many files have changed in this diff Show More