This commit is contained in:
Lucas Rocha 2014-08-27 10:41:09 +01:00
Родитель d420ffd7f5 3bf1a97537
Коммит ad53a9c3fd
529 изменённых файлов: 8780 добавлений и 4727 удалений

Просмотреть файл

@ -1013,3 +1013,6 @@ pref("services.mobileid.server.uri", "https://msisdn.services.mozilla.com");
#ifndef XP_WIN
pref("dom.mapped_arraybuffer.enabled", true);
#endif
// UDPSocket API
pref("dom.udpsocket.enabled", true);

Просмотреть файл

@ -0,0 +1,98 @@
/* 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/. */
'use strict';
function debug(s) {
dump("-*- B2GAppMigrator.js: " + s + "\n");
}
const DEBUG = false;
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
const kMigrationMessageName = "webapps-before-update-merge";
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/FileUtils.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "appsService",
"@mozilla.org/AppsService;1",
"nsIAppsService");
function B2GAppMigrator() {
Services.obs.addObserver(this, kMigrationMessageName, false);
Services.obs.addObserver(this, "xpcom-shutdown", false);
}
B2GAppMigrator.prototype = {
classID: Components.ID('{7211ece0-b458-4635-9afc-f8d7f376ee95}'),
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
Ci.nsISupportsWeakReference]),
executeBrowserMigration: function() {
// The browser db name is hashed the same way everywhere, so it
// should be the same on all systems. We should be able to just
// hardcode it.
let browserDBFileName = "2959517650brreosw.sqlite";
// Storage directories need to be prefixed with the local id of
// the app
let browserLocalAppId = appsService.getAppLocalIdByManifestURL("app://browser.gaiamobile.org/manifest.webapp");
let browserAppStorageDirName = browserLocalAppId + "+f+app+++browser.gaiamobile.org";
let browserDBFile = FileUtils.getFile("ProfD",
["storage",
"persistent",
browserAppStorageDirName,
"idb",
browserDBFileName], true);
if (!browserDBFile.exists()) {
if (DEBUG) debug("Browser DB file does not exist, nothing to copy");
return;
}
let systemLocalAppId = appsService.getAppLocalIdByManifestURL("app://system.gaiamobile.org/manifest.webapp");
let systemAppStorageDirName = systemLocalAppId + "+f+app+++system.gaiamobile.org";
let systemDBDir = FileUtils.getDir("ProfD",
["storage",
"persistent",
systemAppStorageDirName,
"idb"], false, true);
if (DEBUG) {
debug("Browser DB file exists, copying");
debug("Browser local id: " + browserLocalAppId + "");
debug("System local id: " + systemLocalAppId + "");
debug("Browser DB file path: " + browserDBFile.path + "");
debug("System DB directory path: " + systemDBDir.path + "");
}
try {
browserDBFile.copyTo(systemDBDir, browserDBFileName);
} catch (e) {
debug("File copy caused error! " + e.name);
}
if (DEBUG) debug("Browser DB copied successfully");
},
observe: function(subject, topic, data) {
switch (topic) {
case kMigrationMessageName:
this.executeBrowserMigration();
Services.obs.removeObserver(this, kMigrationMessageName);
break;
case "xpcom-shutdown":
Services.obs.removeObserver(this, kMigrationMessageName);
Services.obs.removeObserver(this, "xpcom-shutdown");
break;
default:
debug("Unhandled topic: " + topic);
break;
}
}
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([B2GAppMigrator]);

Просмотреть файл

@ -101,3 +101,8 @@ category command-line-handler m-b2goop @mozilla.org/commandlinehandler/general-s
# MobileIdentityUIGlue.js
component {83dbe26a-81f3-4a75-9541-3d0b7ca496b5} MobileIdentityUIGlue.js
contract @mozilla.org/services/mobileid-ui-glue;1 {83dbe26a-81f3-4a75-9541-3d0b7ca496b5}
# B2GAppMigrator.js
component {7211ece0-b458-4635-9afc-f8d7f376ee95} B2GAppMigrator.js
contract @mozilla.org/b2g-app-migrator;1 {7211ece0-b458-4635-9afc-f8d7f376ee95}
category profile-after-change B2GAppMigrator @mozilla.org/b2g-app-migrator;1

Просмотреть файл

@ -10,6 +10,7 @@ EXTRA_COMPONENTS += [
'ActivitiesGlue.js',
'AlertsService.js',
'B2GAboutRedirector.js',
'B2GAppMigrator.js',
'ContentPermissionPrompt.js',
'FilePicker.js',
'FxAccountsUIGlue.js',

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="53a59364ce4f14068034c8d6fe01f4f6b9f78f23">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4d1d0ea5a82cddeeab497774cfa1703639e3c7d9"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="6e804a42ab90f4251c7fe8c68731dc1c6abd8006"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3bb61a27cd2941b2ba9b616a11aaa44269210396"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
@ -23,7 +23,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="d59843c1d66bd8d93c6012efda47fa447b99813c"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="1085a4b05f19f1c43def7e87362d4498ce20b70f"/>
<!-- Stock Android things -->
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>

Просмотреть файл

@ -19,13 +19,13 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="4d1d0ea5a82cddeeab497774cfa1703639e3c7d9"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="6e804a42ab90f4251c7fe8c68731dc1c6abd8006"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3bb61a27cd2941b2ba9b616a11aaa44269210396"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="a567a787b5ac3e0cb663aa6464b18a24ec764409"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c058843242068d0df7c107e09da31b53d2e08fa6"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="d59843c1d66bd8d93c6012efda47fa447b99813c"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="1085a4b05f19f1c43def7e87362d4498ce20b70f"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>

Просмотреть файл

@ -17,10 +17,10 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4d1d0ea5a82cddeeab497774cfa1703639e3c7d9"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="6e804a42ab90f4251c7fe8c68731dc1c6abd8006"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3bb61a27cd2941b2ba9b616a11aaa44269210396"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="d59843c1d66bd8d93c6012efda47fa447b99813c"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="1085a4b05f19f1c43def7e87362d4498ce20b70f"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="53a59364ce4f14068034c8d6fe01f4f6b9f78f23">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4d1d0ea5a82cddeeab497774cfa1703639e3c7d9"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="6e804a42ab90f4251c7fe8c68731dc1c6abd8006"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3bb61a27cd2941b2ba9b616a11aaa44269210396"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
@ -23,7 +23,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="d59843c1d66bd8d93c6012efda47fa447b99813c"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="1085a4b05f19f1c43def7e87362d4498ce20b70f"/>
<!-- Stock Android things -->
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="f92a936f2aa97526d4593386754bdbf02db07a12"/>
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="6e47ff2790f5656b5b074407829ceecf3e6188c4"/>

Просмотреть файл

@ -19,13 +19,13 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="4d1d0ea5a82cddeeab497774cfa1703639e3c7d9"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="6e804a42ab90f4251c7fe8c68731dc1c6abd8006"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3bb61a27cd2941b2ba9b616a11aaa44269210396"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="a567a787b5ac3e0cb663aa6464b18a24ec764409"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c058843242068d0df7c107e09da31b53d2e08fa6"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="d59843c1d66bd8d93c6012efda47fa447b99813c"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="1085a4b05f19f1c43def7e87362d4498ce20b70f"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>

Просмотреть файл

@ -17,10 +17,10 @@
</project>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4d1d0ea5a82cddeeab497774cfa1703639e3c7d9"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="6e804a42ab90f4251c7fe8c68731dc1c6abd8006"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3bb61a27cd2941b2ba9b616a11aaa44269210396"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="d59843c1d66bd8d93c6012efda47fa447b99813c"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="1085a4b05f19f1c43def7e87362d4498ce20b70f"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->

Просмотреть файл

@ -4,6 +4,6 @@
"remote": "",
"branch": ""
},
"revision": "0ce5a025c89f6120b55498528323a8a973dd117e",
"revision": "f2dfcf31b96b8ffdf3dda0bd7b7272a07643e916",
"repo_path": "/integration/gaia-central"
}

Просмотреть файл

@ -17,12 +17,12 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="4d1d0ea5a82cddeeab497774cfa1703639e3c7d9"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="6e804a42ab90f4251c7fe8c68731dc1c6abd8006"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3bb61a27cd2941b2ba9b616a11aaa44269210396"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="d59843c1d66bd8d93c6012efda47fa447b99813c"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="1085a4b05f19f1c43def7e87362d4498ce20b70f"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
<project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>

Просмотреть файл

@ -15,7 +15,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="4d1d0ea5a82cddeeab497774cfa1703639e3c7d9"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="6e804a42ab90f4251c7fe8c68731dc1c6abd8006"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3bb61a27cd2941b2ba9b616a11aaa44269210396"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

Просмотреть файл

@ -17,10 +17,10 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4d1d0ea5a82cddeeab497774cfa1703639e3c7d9"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="6e804a42ab90f4251c7fe8c68731dc1c6abd8006"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3bb61a27cd2941b2ba9b616a11aaa44269210396"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="d59843c1d66bd8d93c6012efda47fa447b99813c"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="1085a4b05f19f1c43def7e87362d4498ce20b70f"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->

Просмотреть файл

@ -17,12 +17,12 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="4d1d0ea5a82cddeeab497774cfa1703639e3c7d9"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="6e804a42ab90f4251c7fe8c68731dc1c6abd8006"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3bb61a27cd2941b2ba9b616a11aaa44269210396"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="d59843c1d66bd8d93c6012efda47fa447b99813c"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="1085a4b05f19f1c43def7e87362d4498ce20b70f"/>
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>

Просмотреть файл

@ -48,7 +48,6 @@ fi
MOZ_MEDIA_NAVIGATOR=1
MOZ_APP_ID={3c2e2abc-06d4-11e1-ac3b-374f68613e61}
MOZ_EXTENSION_MANAGER=1
MOZ_TIME_MANAGER=1

Просмотреть файл

@ -831,6 +831,7 @@ bin/components/@DLL_PREFIX@nkgnomevfs@DLL_SUFFIX@
@BINPATH@/components/DownloadsUI.js
@BINPATH@/components/InterAppCommUIGlue.js
@BINPATH@/components/SystemMessageGlue.js
@BINPATH@/components/B2GAppMigrator.js
#ifndef MOZ_WIDGET_GONK
@BINPATH@/components/SimulatorScreen.js

Просмотреть файл

@ -80,7 +80,8 @@
};
replaceWithHost(intro);
if (getCSSClass() == "expertBadCert") {
var cssClass = getCSSClass();
if (cssClass == "expertBadCert") {
toggle('technicalContent');
toggle('expertContent');
}
@ -88,8 +89,12 @@
// Disallow overrides if this is a Strict-Transport-Security
// host and the cert is bad (STS Spec section 7.3) or if the
// certerror is in a frame (bug 633691).
if (getCSSClass() == "badStsCert" || window != top)
if (cssClass == "badStsCert" || window != top) {
document.getElementById("expertContent").setAttribute("hidden", "true");
}
if (cssClass != "badStsCert") {
document.getElementById("badStsCertExplanation").setAttribute("hidden", "true");
}
var tech = document.getElementById("technicalContentText");
if (tech)
@ -214,6 +219,7 @@
<h2>&certerror.whatShouldIDo.heading;</h2>
<div id="whatShouldIDoContentText">
<p>&certerror.whatShouldIDo.content;</p>
<p id="badStsCertExplanation">&certerror.whatShouldIDo.badStsCertExplanation;</p>
<button id='getMeOutOfHereButton'>&certerror.getMeOutOfHere.label;</button>
</div>
</div>

Просмотреть файл

@ -368,7 +368,7 @@
<menuitem id="context-viewsource"
label="&viewPageSourceCmd.label;"
accesskey="&viewPageSourceCmd.accesskey;"
oncommand="BrowserViewSourceOfDocument(gContextMenu.browser.contentDocument);"
oncommand="BrowserViewSourceOfDocument(gContextMenu.browser.contentDocumentAsCPOW);"
observes="isImage"/>
<menuitem id="context-viewinfo"
label="&viewPageInfoCmd.label;"

Просмотреть файл

@ -80,7 +80,23 @@ addEventListener("blur", function(event) {
if (Services.appinfo.processType == Services.appinfo.PROCESS_TYPE_CONTENT) {
addEventListener("contextmenu", function (event) {
sendSyncMessage("contextmenu", {}, { event: event });
let defaultPrevented = event.defaultPrevented;
if (!Services.prefs.getBoolPref("dom.event.contextmenu.enabled")) {
let plugin = null;
try {
plugin = event.target.QueryInterface(Ci.nsIObjectLoadingContent);
} catch (e) {}
if (plugin && plugin.displayedType == Ci.nsIObjectLoadingContent.TYPE_PLUGIN) {
// Don't open a context menu for plugins.
return;
}
defaultPrevented = false;
}
if (!defaultPrevented) {
sendSyncMessage("contextmenu", {}, { event: event });
}
}, false);
} else {
addEventListener("mozUITour", function(event) {
@ -616,4 +632,4 @@ let DOMFullscreenHandler = {
}
}
};
DOMFullscreenHandler.init();
DOMFullscreenHandler.init();

Просмотреть файл

@ -779,7 +779,9 @@
<handler event="dragstart" phase="capturing"><![CDATA[
// Drag only if the gesture starts from the input field.
if (event.originalTarget != this.inputField)
if (this.inputField != event.originalTarget &&
!(this.inputField.compareDocumentPosition(event.originalTarget) &
Node.DOCUMENT_POSITION_CONTAINED_BY))
return;
// Drag only if the entire value is selected and it's a valid URI.

Просмотреть файл

@ -489,6 +489,9 @@ let LoopContactsInternal = Object.freeze({
* finished. The first argument passed will be an
* `Error` object or `null`. The second argument will
* be the contact object, if successful.
* If no object matching guid could be found,
* then the callback is called with both arguments
* set to `null`.
*/
get: function(guid, callback) {
LoopStorage.getStore(kObjectStoreName, (err, store) => {
@ -507,8 +510,7 @@ let LoopContactsInternal = Object.freeze({
request.onsuccess = event => {
if (!event.target.result) {
callback(new Error("Contact with " + kKeyPath + " '" +
guid + "' could not be found"));;
callback(null, null);
return;
}
let contact = extend({}, event.target.result);
@ -528,6 +530,9 @@ let LoopContactsInternal = Object.freeze({
* finished. The first argument passed will be an
* `Error` object or `null`. The second argument will
* be the contact object, if successfull.
* If no object matching serviceId could be found,
* then the callback is called with both arguments
* set to `null`.
*/
getByServiceId: function(serviceId, callback) {
LoopStorage.getStore(kObjectStoreName, (err, store) => {
@ -547,8 +552,7 @@ let LoopContactsInternal = Object.freeze({
request.onsuccess = event => {
if (!event.target.result) {
callback(new Error("Contact with " + kServiceIdIndex + " '" +
serviceId + "' could not be found"));
callback(null, null);
return;
}
@ -658,6 +662,11 @@ let LoopContactsInternal = Object.freeze({
return;
}
if (!contact) {
callback(new Error("Contact with " + kKeyPath + " '" +
guid + "' could not be found"));
}
LoopStorage.getStore(kObjectStoreName, (err, store) => {
if (err) {
callback(err);
@ -702,6 +711,11 @@ let LoopContactsInternal = Object.freeze({
return;
}
if (!contact) {
callback(new Error("Contact with " + kKeyPath + " '" +
guid + "' could not be found"));
}
contact.blocked = true;
this.update(contact, callback);
});
@ -723,6 +737,11 @@ let LoopContactsInternal = Object.freeze({
return;
}
if (!contact) {
callback(new Error("Contact with " + kKeyPath + " '" +
guid + "' could not be found"));
}
contact.blocked = false;
this.update(contact, callback);
});

Просмотреть файл

@ -60,6 +60,7 @@ let gLocalizedStrings = null;
let gInitializeTimer = null;
let gFxAOAuthClientPromise = null;
let gFxAOAuthClient = null;
let gFxAOAuthTokenData = null;
/**
* Internal helper methods and state
@ -195,7 +196,10 @@ let MozLoopServiceInternal = {
2 * 32, true);
}
return gHawkClient.request(path, method, credentials, payloadObj);
return gHawkClient.request(path, method, credentials, payloadObj).catch(error => {
console.error("Loop hawkRequest error:", error);
throw error;
});
},
/**
@ -291,6 +295,11 @@ let MozLoopServiceInternal = {
return;
}
// We set this here as it is assumed that once the user receives an incoming
// call, they'll have had enough time to see the terms of service. See
// bug 1046039 for background.
Services.prefs.setCharPref("loop.seenToS", "seen");
this.openChatWindow(null,
this.localizedStrings["incoming_call_title"].textContent,
"about:loopconversation#incoming/" + version);
@ -492,7 +501,7 @@ let MozLoopServiceInternal = {
},
error => {
gFxAOAuthClientPromise = null;
return error;
throw error;
}
);
@ -500,7 +509,9 @@ let MozLoopServiceInternal = {
}),
/**
* Params => web flow => code
* Get the OAuth client and do the authorization web flow to get an OAuth code.
*
* @return {Promise}
*/
promiseFxAOAuthAuthorization: function() {
let deferred = Promise.defer();
@ -510,13 +521,38 @@ let MozLoopServiceInternal = {
client.launchWebFlow();
},
error => {
Cu.reportError(error);
console.error(error);
deferred.reject(error);
}
);
return deferred.promise;
},
/**
* Get the OAuth token using the OAuth code and state.
*
* The caller should approperiately handle 4xx errors (which should lead to a logout)
* and 5xx or connectivity issues with messaging to try again later.
*
* @param {String} code
* @param {String} state
*
* @return {Promise} resolving with OAuth token data.
*/
promiseFxAOAuthToken: function(code, state) {
if (!code || !state) {
throw new Error("promiseFxAOAuthToken: code and state are required.");
}
let payload = {
code: code,
state: state,
};
return this.hawkRequest("/fxa-oauth/token", "POST", payload).then(response => {
return JSON.parse(response.body);
});
},
/**
* Called once gFxAOAuthClient fires onComplete.
*
@ -558,8 +594,14 @@ this.MozLoopService = {
return MozLoopServiceInternal;
},
get gFxAOAuthTokenData() {
return gFxAOAuthTokenData;
},
resetFxA: function() {
gFxAOAuthClientPromise = null;
gFxAOAuthClient = null;
gFxAOAuthTokenData = null;
},
#endif
@ -740,6 +782,13 @@ this.MozLoopService = {
logInToFxA: function() {
return MozLoopServiceInternal.promiseFxAOAuthAuthorization().then(response => {
return MozLoopServiceInternal.promiseFxAOAuthToken(response.code, response.state);
}).then(tokenData => {
gFxAOAuthTokenData = tokenData;
return tokenData;
},
error => {
gFxAOAuthTokenData = null;
throw error;
});
},

Просмотреть файл

@ -123,7 +123,6 @@ loop.panel = (function(_, mozL10n) {
)
),
});
navigator.mozLoop.setLoopCharPref('seenToS', 'seen');
return React.DOM.p({className: "terms-service",
dangerouslySetInnerHTML: {__html: tosHTML}});
} else {
@ -207,7 +206,7 @@ loop.panel = (function(_, mozL10n) {
_generateMailTo: function() {
return encodeURI([
"mailto:?subject=" + __("share_email_subject2") + "&",
"body=" + __("share_email_body", {callUrl: this.state.callUrl})
"body=" + __("share_email_body2", {callUrl: this.state.callUrl})
].join(""));
},

Просмотреть файл

@ -123,7 +123,6 @@ loop.panel = (function(_, mozL10n) {
</a>
),
});
navigator.mozLoop.setLoopCharPref('seenToS', 'seen');
return <p className="terms-service"
dangerouslySetInnerHTML={{__html: tosHTML}}></p>;
} else {
@ -207,7 +206,7 @@ loop.panel = (function(_, mozL10n) {
_generateMailTo: function() {
return encodeURI([
"mailto:?subject=" + __("share_email_subject2") + "&",
"body=" + __("share_email_body", {callUrl: this.state.callUrl})
"body=" + __("share_email_body2", {callUrl: this.state.callUrl})
].join(""));
},

Просмотреть файл

@ -169,7 +169,7 @@ loop.shared.router = (function(l10n) {
* @param {Object} event
*/
_onPeerHungup: function() {
this._notifier.warnL10n("peer_ended_conversation");
this._notifier.warnL10n("peer_ended_conversation2");
this.endCall();
},

Просмотреть файл

@ -203,6 +203,7 @@ loop.webapp = (function($, _, OT, webL10n) {
componentWillUnmount: function() {
window.removeEventListener("click", this.clickHandler);
localStorage.setItem("has-seen-tos", "true");
},
clickHandler: function(e) {
@ -236,6 +237,10 @@ loop.webapp = (function($, _, OT, webL10n) {
"standalone-dropdown-menu": true,
"visually-hidden": !this.state.showCallOptionsMenu
});
var tosClasses = React.addons.classSet({
"terms-service": true,
hide: (localStorage.getItem("has-seen-tos") === "true")
});
return (
/* jshint ignore:start */
@ -288,7 +293,7 @@ loop.webapp = (function($, _, OT, webL10n) {
React.DOM.div({className: "flex-padding-1"})
),
React.DOM.p({className: "terms-service",
React.DOM.p({className: tosClasses,
dangerouslySetInnerHTML: {__html: tosHTML}})
),

Просмотреть файл

@ -203,6 +203,7 @@ loop.webapp = (function($, _, OT, webL10n) {
componentWillUnmount: function() {
window.removeEventListener("click", this.clickHandler);
localStorage.setItem("has-seen-tos", "true");
},
clickHandler: function(e) {
@ -236,6 +237,10 @@ loop.webapp = (function($, _, OT, webL10n) {
"standalone-dropdown-menu": true,
"visually-hidden": !this.state.showCallOptionsMenu
});
var tosClasses = React.addons.classSet({
"terms-service": true,
hide: (localStorage.getItem("has-seen-tos") === "true")
});
return (
/* jshint ignore:start */
@ -288,7 +293,7 @@ loop.webapp = (function($, _, OT, webL10n) {
<div className="flex-padding-1"></div>
</div>
<p className="terms-service"
<p className={tosClasses}
dangerouslySetInnerHTML={{__html: tosHTML}}></p>
</div>

Просмотреть файл

@ -4,11 +4,11 @@ call_has_ended=Your call has ended.
call_timeout_notification_text=Your call did not go through.
missing_conversation_info=Missing conversation information.
network_disconnected=The network connection terminated abruptly.
peer_ended_conversation=Your peer ended the conversation.
peer_ended_conversation2=The person you were calling has ended the conversation.
unable_retrieve_call_info=Unable to retrieve conversation information.
hangup_button_title=Hangup
hangup_button_title=Hang up
mute_local_audio_button_title=Mute your audio
unmute_local_audio_button_title=Unute your audio
unmute_local_audio_button_title=Unmute your audio
mute_local_video_button_title=Mute your video
unmute_local_video_button_title=Unmute your video
start_call=Start the call
@ -42,7 +42,6 @@ call_has_ended=L'appel est terminé.
call_timeout_notification_text=Votre appel n'a pas abouti.
missing_conversation_info=Informations de communication manquantes.
network_disconnected=La connexion réseau semble avoir été interrompue.
peer_ended_conversation=Votre correspondant a mis fin à la communication.
unable_retrieve_call_info=Impossible de récupérer les informations liées à cet appel.
hangup_button_title=Terminer l'appel
mute_local_audio_button_title=Couper la diffusion audio

Просмотреть файл

@ -255,7 +255,7 @@ describe("loop.panel", function() {
if (key === "share_email_subject2")
text = "email-subject";
else if (key === "share_email_body")
else if (key === "share_email_body2")
text = "{{callUrl}}";
return JSON.stringify({textContent: text});
@ -357,26 +357,6 @@ describe("loop.panel", function() {
describe('loop.panel.ToSView', function() {
it("should set the value of the loop.seenToS preference to 'seen'",
function() {
TestUtils.renderIntoDocument(loop.panel.ToSView());
sinon.assert.calledOnce(navigator.mozLoop.setLoopCharPref);
sinon.assert.calledWithExactly(navigator.mozLoop.setLoopCharPref,
'seenToS', 'seen');
});
it("should not set the value of loop.seenToS when it's already set",
function() {
navigator.mozLoop.getLoopCharPref = function() {
return "seen";
};
TestUtils.renderIntoDocument(loop.panel.ToSView());
sinon.assert.notCalled(navigator.mozLoop.setLoopCharPref);
});
it("should render when the value of loop.seenToS is not set", function() {
var view = TestUtils.renderIntoDocument(loop.panel.ToSView());

Просмотреть файл

@ -32,6 +32,7 @@ LOOP_SERVER_ENV = os.environ.copy()
# development server that might be running
LOOP_SERVER_ENV.update({"NODE_ENV": "dev",
"PORT": str(LOOP_SERVER_PORT),
"SERVER_ADDRESS": "localhost:" + str(LOOP_SERVER_PORT),
"WEB_APP_URL": WEB_APP_URL})

Просмотреть файл

@ -230,10 +230,9 @@ add_task(function* () {
// Get a non-existent contact.
deferred = Promise.defer();
LoopContacts.get(1000, err => {
Assert.ok(err, "There should be an error");
Assert.equal(err.message, "Contact with _guid '1000' could not be found",
"Error message should be correct");
LoopContacts.get(1000, (err, contact) => {
Assert.ok(!err, "There shouldn't be an error");
Assert.ok(!contact, "There shouldn't be a contact");
deferred.resolve();
});
yield deferred.promise;
@ -250,10 +249,9 @@ add_task(function* () {
LoopContacts.remove(toRemove, err => {
Assert.ok(!err, "There shouldn't be an error");
LoopContacts.get(toRemove, err => {
Assert.ok(err, "There should be an error");
Assert.equal(err.message, "Contact with _guid '" + toRemove + "' could not be found",
"Error message should be correct");
LoopContacts.get(toRemove, (err, contact) => {
Assert.ok(!err, "There shouldn't be an error");
Assert.ok(!contact, "There shouldn't be a contact");
deferred.resolve();
});
});
@ -261,10 +259,9 @@ add_task(function* () {
// Remove a non-existing contact.
deferred = Promise.defer();
LoopContacts.remove(1000, err => {
Assert.ok(err, "There should be an error");
Assert.equal(err.message, "Contact with _guid '1000' could not be found",
"Error message should be correct");
LoopContacts.remove(1000, (err, contact) => {
Assert.ok(!err, "There shouldn't be an error");
Assert.ok(!contact, "There shouldn't be a contact");
deferred.resolve();
});
yield deferred.promise;
@ -323,7 +320,7 @@ add_task(function* () {
_guid: 1000,
bday: newBday
};
LoopContacts.update(toUpdate, err => {
LoopContacts.update(toUpdate, (err, contact) => {
Assert.ok(err, "There should be an error");
Assert.equal(err.message, "Contact with _guid '1000' could not be found",
"Error message should be correct");

Просмотреть файл

@ -90,3 +90,122 @@ add_task(function* invalidState() {
ok(error, "The login promise should be rejected due to invalid state");
});
});
add_task(function* basicRegistration() {
MozLoopService.resetFxA();
let params = {
client_id: "client_id",
content_uri: BASE_URL + "/content",
oauth_uri: BASE_URL + "/oauth",
profile_uri: BASE_URL + "/profile",
state: "state",
};
yield promiseOAuthParamsSetup(BASE_URL, params);
let tokenData = yield MozLoopService.internal.promiseFxAOAuthToken("code1", "state");
is(tokenData.access_token, "code1_access_token", "Check access_token");
is(tokenData.scope, "profile", "Check scope");
is(tokenData.token_type, "bearer", "Check token_type");
});
add_task(function* registrationWithInvalidState() {
MozLoopService.resetFxA();
let params = {
client_id: "client_id",
content_uri: BASE_URL + "/content",
oauth_uri: BASE_URL + "/oauth",
profile_uri: BASE_URL + "/profile",
state: "invalid_state",
};
yield promiseOAuthParamsSetup(BASE_URL, params);
let tokenPromise = MozLoopService.internal.promiseFxAOAuthToken("code1", "state");
yield tokenPromise.then(body => {
ok(false, "Promise should have rejected");
},
error => {
is(error.code, 400, "Check error code");
});
});
add_task(function* registrationWith401() {
MozLoopService.resetFxA();
let params = {
client_id: "client_id",
content_uri: BASE_URL + "/content",
oauth_uri: BASE_URL + "/oauth",
profile_uri: BASE_URL + "/profile",
state: "state",
test_error: "token_401",
};
yield promiseOAuthParamsSetup(BASE_URL, params);
let tokenPromise = MozLoopService.internal.promiseFxAOAuthToken("code1", "state");
yield tokenPromise.then(body => {
ok(false, "Promise should have rejected");
},
error => {
is(error.code, 401, "Check error code");
});
});
add_task(function* basicAuthorizationAndRegistration() {
MozLoopService.resetFxA();
let params = {
client_id: "client_id",
content_uri: BASE_URL + "/content",
oauth_uri: BASE_URL + "/oauth",
profile_uri: BASE_URL + "/profile",
state: "state",
};
yield promiseOAuthParamsSetup(BASE_URL, params);
let tokenData = yield MozLoopService.logInToFxA();
ise(tokenData.access_token, "code1_access_token", "Check access_token");
ise(tokenData.scope, "profile", "Check scope");
ise(tokenData.token_type, "bearer", "Check token_type");
});
add_task(function* loginWithParams401() {
MozLoopService.resetFxA();
let params = {
client_id: "client_id",
content_uri: BASE_URL + "/content",
oauth_uri: BASE_URL + "/oauth",
profile_uri: BASE_URL + "/profile",
state: "state",
test_error: "params_401",
};
yield promiseOAuthParamsSetup(BASE_URL, params);
let loginPromise = MozLoopService.logInToFxA();
yield loginPromise.then(tokenData => {
ok(false, "Promise should have rejected");
},
error => {
ise(error.code, 401, "Check error code");
ise(MozLoopService.gFxAOAuthTokenData, null, "Check there is no saved token data");
});
});
add_task(function* loginWithRegistration401() {
MozLoopService.resetFxA();
let params = {
client_id: "client_id",
content_uri: BASE_URL + "/content",
oauth_uri: BASE_URL + "/oauth",
profile_uri: BASE_URL + "/profile",
state: "state",
test_error: "token_401",
};
yield promiseOAuthParamsSetup(BASE_URL, params);
let loginPromise = MozLoopService.logInToFxA();
yield loginPromise.then(tokenData => {
ok(false, "Promise should have rejected");
},
error => {
ise(error.code, 401, "Check error code");
ise(MozLoopService.gFxAOAuthTokenData, null, "Check there is no saved token data");
});
});

Просмотреть файл

@ -69,7 +69,7 @@ add_task(function* token_request() {
let request = yield promiseToken("my_code", params.state);
ise(request.status, 200, "Check token response status");
ise(request.response.access_token, "my_code_access_token", "Check access_token");
ise(request.response.scopes, "", "Check scopes");
ise(request.response.scope, "profile", "Check scope");
ise(request.response.token_type, "bearer", "Check token_type");
});

Просмотреть файл

@ -76,10 +76,14 @@ function params(request, response) {
return;
}
let origin = request.scheme + "://" + request.host + ":" + request.port;
let params = JSON.parse(getSharedState("/fxa-oauth/params") || "{}");
if (params.test_error && params.test_error == "params_401") {
response.setStatusLine(request.httpVersion, 401, "Unauthorized");
response.write("401 Unauthorized");
return;
}
// Warn if required parameters are missing.
for (let paramName of REQUIRED_PARAMS) {
if (!(paramName in params)) {
@ -113,6 +117,13 @@ function oauth_authorization(request, response) {
*/
function token(request, response) {
let params = JSON.parse(getSharedState("/fxa-oauth/params") || "{}");
if (params.test_error && params.test_error == "token_401") {
response.setStatusLine(request.httpVersion, 401, "Unauthorized");
response.write("401 Unauthorized");
return;
}
let body = NetUtil.readInputStreamToString(request.bodyInputStream,
request.bodyInputStream.available());
let payload = JSON.parse(body);
@ -124,7 +135,7 @@ function token(request, response) {
let tokenData = {
access_token: payload.code + "_access_token",
scopes: "",
scope: "profile",
token_type: "bearer",
};
response.setHeader("Content-Type", "application/json; charset=utf-8", false);

Просмотреть файл

@ -60,9 +60,8 @@ class BaseTestFrontendUnits(MarionetteTestCase):
def setUp(self):
super(BaseTestFrontendUnits, self).setUp()
# This extends the timeout for find_element to 10 seconds.
# We need this as the tests take an amount of time to run after loading,
# which we have to wait for.
# This extends the timeout for find_element. We need this as the tests
# take an amount of time to run after loading, which we have to wait for.
self.marionette.set_search_timeout(60000)
# srcdir_path should be the directory relative to this file.

Просмотреть файл

@ -165,7 +165,7 @@ describe("loop.shared.router", function() {
sinon.assert.calledOnce(notifier.warnL10n);
sinon.assert.calledWithExactly(notifier.warnL10n,
"peer_ended_conversation");
"peer_ended_conversation2");
});

Просмотреть файл

@ -491,14 +491,6 @@ describe("loop.webapp", function() {
});
describe("StartConversationView", function() {
var conversation;
beforeEach(function() {
conversation = new sharedModels.ConversationModel({}, {
sdk: {},
pendingCallTimeout: 1000});
});
describe("#initialize", function() {
it("should require a conversation option", function() {
expect(function() {
@ -648,6 +640,60 @@ describe("loop.webapp", function() {
"unable_retrieve_call_info");
});
});
describe("#render", function() {
var conversation, view, requestCallUrlInfo, oldLocalStorageValue;
beforeEach(function() {
oldLocalStorageValue = localStorage.getItem("has-seen-tos");
localStorage.removeItem("has-seen-tos");
conversation = new sharedModels.ConversationModel({
loopToken: "fake"
}, {
sdk: {},
pendingCallTimeout: 1000
});
requestCallUrlInfo = sandbox.stub();
});
afterEach(function() {
if (oldLocalStorageValue !== null)
localStorage.setItem("has-seen-tos", oldLocalStorageValue);
});
it("should show the TOS", function() {
var tos;
view = React.addons.TestUtils.renderIntoDocument(
loop.webapp.StartConversationView({
model: conversation,
notifier: notifier,
client: {requestCallUrlInfo: requestCallUrlInfo}
})
);
tos = view.getDOMNode().querySelector(".terms-service");
expect(tos.classList.contains("hide")).to.equal(false);
});
it("should not show the TOS if it has already been seen", function() {
var tos;
localStorage.setItem("has-seen-tos", "true");
view = React.addons.TestUtils.renderIntoDocument(
loop.webapp.StartConversationView({
model: conversation,
notifier: notifier,
client: {requestCallUrlInfo: requestCallUrlInfo}
})
);
tos = view.getDOMNode().querySelector(".terms-service");
expect(tos.classList.contains("hide")).to.equal(true);
});
});
});
describe("PromoteFirefoxView", function() {
@ -703,4 +749,5 @@ describe("loop.webapp", function() {
});
});
});
});

Просмотреть файл

@ -0,0 +1,49 @@
/* 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/. */
XPCOMUtils.defineLazyModuleGetter(this, "Chat",
"resource:///modules/Chat.jsm");
let openChatOrig = Chat.open;
add_test(function test_openChatWindow_on_notification() {
Services.prefs.setCharPref("loop.seenToS", "unseen");
MozLoopService.register(mockPushHandler).then(() => {
let opened = false;
Chat.open = function() {
opened = true;
};
mockPushHandler.notify(1);
do_check_true(opened, "should open a chat window");
do_check_eq(Services.prefs.getCharPref("loop.seenToS"), "seen",
"should set the pref to 'seen'");
run_next_test();
});
});
function run_test()
{
setupFakeLoopServer();
loopServer.registerPathHandler("/registration", (request, response) => {
response.setStatusLine(null, 200, "OK");
response.processAsync();
response.finish();
});
do_register_cleanup(function() {
// Revert original Chat.open implementation
Chat.open = openChatOrig;
// clear test pref
Services.prefs.clearUserPref("loop.seenToS");
});
run_next_test();
}

Просмотреть файл

@ -9,6 +9,7 @@ firefox-appdir = browser
[test_loopservice_loop_prefs.js]
[test_loopservice_initialize.js]
[test_loopservice_locales.js]
[test_loopservice_notification.js]
[test_loopservice_registration.js]
[test_loopservice_token_invalid.js]
[test_loopservice_token_save.js]

Просмотреть файл

@ -1097,29 +1097,20 @@ var gApplicationsPane = {
_loadPluginHandlers: function() {
"use strict";
let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
let pluginTags = pluginHost.getPluginTags();
let mimeTypes = navigator.mimeTypes;
for (let i = 0; i < pluginTags.length; ++i) {
let pluginTag = pluginTags[i];
let mimeTypes = pluginTag.getMimeTypes();
for (let j = 0; j < mimeTypes.length; ++j) {
let type = mimeTypes[j];
let handlerInfoWrapper;
if (type in this._handledTypes)
handlerInfoWrapper = this._handledTypes[type];
else {
let wrappedHandlerInfo =
this._mimeSvc.getFromTypeAndExtension(type, null);
handlerInfoWrapper = new HandlerInfoWrapper(type, wrappedHandlerInfo);
handlerInfoWrapper.handledOnlyByPlugin = true;
this._handledTypes[type] = handlerInfoWrapper;
}
handlerInfoWrapper.pluginName = pluginTag.name;
for (let mimeType of mimeTypes) {
let handlerInfoWrapper;
if (mimeType.type in this._handledTypes) {
handlerInfoWrapper = this._handledTypes[mimeType.type];
} else {
let wrappedHandlerInfo =
this._mimeSvc.getFromTypeAndExtension(mimeType.type, null);
handlerInfoWrapper = new HandlerInfoWrapper(mimeType.type, wrappedHandlerInfo);
handlerInfoWrapper.handledOnlyByPlugin = true;
this._handledTypes[mimeType.type] = handlerInfoWrapper;
}
handlerInfoWrapper.pluginName = mimeType.enabledPlugin.name;
}
},

Просмотреть файл

@ -1089,29 +1089,20 @@ var gApplicationsPane = {
_loadPluginHandlers: function() {
"use strict";
let pluginHost = Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
let pluginTags = pluginHost.getPluginTags();
let mimeTypes = navigator.mimeTypes;
for (let i = 0; i < pluginTags.length; ++i) {
let pluginTag = pluginTags[i];
let mimeTypes = pluginTag.getMimeTypes();
for (let j = 0; j < mimeTypes.length; ++j) {
let type = mimeTypes[j];
let handlerInfoWrapper;
if (type in this._handledTypes)
handlerInfoWrapper = this._handledTypes[type];
else {
let wrappedHandlerInfo =
this._mimeSvc.getFromTypeAndExtension(type, null);
handlerInfoWrapper = new HandlerInfoWrapper(type, wrappedHandlerInfo);
handlerInfoWrapper.handledOnlyByPlugin = true;
this._handledTypes[type] = handlerInfoWrapper;
}
handlerInfoWrapper.pluginName = pluginTag.name;
for (let mimeType of mimeTypes) {
let handlerInfoWrapper;
if (mimeType.type in this._handledTypes) {
handlerInfoWrapper = this._handledTypes[mimeType.type];
} else {
let wrappedHandlerInfo =
this._mimeSvc.getFromTypeAndExtension(mimeType.type, null);
handlerInfoWrapper = new HandlerInfoWrapper(mimeType.type, wrappedHandlerInfo);
handlerInfoWrapper.handledOnlyByPlugin = true;
this._handledTypes[mimeType.type] = handlerInfoWrapper;
}
handlerInfoWrapper.pluginName = mimeType.enabledPlugin.name;
}
},

Просмотреть файл

@ -0,0 +1,61 @@
%if 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/. */
%endif
@import url("chrome://global/skin/in-content/common.css");
body {
display: flex;
box-sizing: padding-box;
min-height: 100vh;
padding: 0 48px;
align-items: center;
justify-content: center;
}
body.normal .showPrivate,
body.private .showNormal {
display: none;
}
#pageContainer {
min-width: 320px;
max-width: 512px;
}
.titleText {
background: url("chrome://browser/skin/mask.png") left 0 no-repeat;
background-size: 45px;
-moz-margin-start: -2em;
-moz-padding-start: 2em;
}
.titleText:-moz-dir(rtl) {
background-position: right 0;
}
@media (min-resolution: 2dppx) {
.titleText {
background-image: url("chrome://browser/skin/mask@2x.png");
}
}
@media (max-width: 675px) {
.titleText {
padding-top: 0;
background-image: none;
-moz-margin-start: 0;
-moz-padding-start: 0;
}
}
a {
font-size: 1rem;
}
button {
margin-top: 1.2em;
-moz-margin-start: 0;
}

Просмотреть файл

@ -13,32 +13,24 @@
%brandDTD;
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
%browserDTD;
<!ENTITY % privatebrowsingpageDTD SYSTEM "chrome://browser/locale/aboutPrivateBrowsing.dtd">
%privatebrowsingpageDTD;
<!ENTITY % aboutPrivateBrowsingDTD SYSTEM "chrome://browser/locale/aboutPrivateBrowsing.dtd">
%aboutPrivateBrowsingDTD;
]>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="chrome://global/skin/netError.css" type="text/css" media="all"/>
<link rel="stylesheet" href="chrome://browser/skin/aboutPrivateBrowsing.css" type="text/css" media="all"/>
<style type="text/css"><![CDATA[
body.normal .showPrivate,
body.private .showNormal {
display: none;
}
]]></style>
<link rel="stylesheet" href="chrome://browser/content/aboutPrivateBrowsing.css" type="text/css" media="all"/>
<script type="application/javascript;version=1.7"><![CDATA[
const Cc = Components.classes;
const Ci = Components.interfaces;
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
if (!PrivateBrowsingUtils.isWindowPrivate(window)) {
document.title = "]]>&privatebrowsingpage.title.normal;<![CDATA[";
document.title = "]]>&aboutPrivateBrowsing.title.normal;<![CDATA[";
setFavIcon("chrome://global/skin/icons/question-16.png");
} else {
#ifndef XP_MACOSX
document.title = "]]>&privatebrowsingpage.title;<![CDATA[";
document.title = "]]>&aboutPrivateBrowsing.title;<![CDATA[";
#endif
setFavIcon("chrome://browser/skin/Privacy-16.png");
}
@ -65,12 +57,13 @@
}
// Set up the help link
let moreInfoURL = Cc["@mozilla.org/toolkit/URLFormatterService;1"].
getService(Ci.nsIURLFormatter).
formatURLPref("app.support.baseURL");
let moreInfoLink = document.getElementById("moreInfoLink");
if (moreInfoLink)
moreInfoLink.setAttribute("href", moreInfoURL + "private-browsing");
let learnMoreURL = Cc["@mozilla.org/toolkit/URLFormatterService;1"]
.getService(Ci.nsIURLFormatter)
.formatURLPref("app.support.baseURL");
let learnMore = document.getElementById("learnMore");
if (learnMore) {
learnMore.setAttribute("href", learnMoreURL + "private-browsing");
}
}, false);
function openPrivateWindow() {
@ -79,57 +72,27 @@
]]></script>
</head>
<body dir="&locale.dir;"
class="private">
<body dir="&locale.dir;" class="private">
<div id="pageContainer">
<h1 class="titleText showPrivate">&aboutPrivateBrowsing.title;</h1>
<h1 class="titleText showNormal">&aboutPrivateBrowsing.title.normal;</h1>
<!-- PAGE CONTAINER (for styling purposes only) -->
<div id="errorPageContainer">
<p class="showPrivate">&aboutPrivateBrowsing.subtitle;</p>
<p class="showNormal">&aboutPrivateBrowsing.subtitle.normal;</p>
<!-- Error Title -->
<div id="errorTitle">
<h1 id="errorTitleText" class="showPrivate">&privatebrowsingpage.title;</h1>
<h1 id="errorTitleTextNormal" class="showNormal">&privatebrowsingpage.title.normal;</h1>
</div>
<p>&aboutPrivateBrowsing.description;</p>
<!-- LONG CONTENT (the section most likely to require scrolling) -->
<div id="errorLongContent">
<p class="showNormal">&aboutPrivateBrowsing.notPrivate;</p>
<!-- Short Description -->
<div id="errorShortDesc">
<p id="errorShortDescText" class="showPrivate">&privatebrowsingpage.perwindow.issueDesc;</p>
<p id="errorShortDescTextNormal" class="showNormal">&privatebrowsingpage.perwindow.issueDesc.normal;</p>
</div>
<!-- Long Description -->
<div id="errorLongDesc">
<p id="errorLongDescText">&privatebrowsingpage.perwindow.description;</p>
</div>
<!-- Start Private Browsing -->
<div id="startPrivateBrowsingDesc" class="showNormal">
<button xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="startPrivateBrowsing" label="&privatebrowsingpage.openPrivateWindow.label;"
accesskey="&privatebrowsingpage.openPrivateWindow.accesskey;"
oncommand="openPrivateWindow();"/>
</div>
<!-- Footer -->
<div id="footerDesc">
<p id="footerText" class="showPrivate">&privatebrowsingpage.howToStop3;</p>
<p id="footerTextNormal" class="showNormal">&privatebrowsingpage.howToStart4;</p>
</div>
<!-- More Info -->
<div id="moreInfo" class="showPrivate">
<p id="moreInfoText">
&privatebrowsingpage.moreInfo;
</p>
<p id="moreInfoLinkContainer">
<a id="moreInfoLink" target="_blank">&privatebrowsingpage.learnMore;</a>
</p>
</div>
<button xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="showNormal"
label="&privatebrowsingpage.openPrivateWindow.label;"
accesskey="&privatebrowsingpage.openPrivateWindow.accesskey;"
oncommand="openPrivateWindow();"/>
<div class="showPrivate">
<p>&aboutPrivateBrowsing.moreInfo;</p>
<p><a id="learnMore" target="_blank">&aboutPrivateBrowsing.learnMore;</a></p>
</div>
</div>
</body>
</html>

Просмотреть файл

@ -3,4 +3,5 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
browser.jar:
* content/browser/aboutPrivateBrowsing.css (content/aboutPrivateBrowsing.css)
* content/browser/aboutPrivateBrowsing.xhtml (content/aboutPrivateBrowsing.xhtml)

Просмотреть файл

@ -24,7 +24,7 @@ function test() {
if (isOSX) {
page_with_title = test_title;
page_without_title = app_name;
about_pb_title = "Would you like to start Private Browsing?";
about_pb_title = "Open a private window?";
pb_page_with_title = test_title + " - (Private Browsing)";
pb_page_without_title = app_name + " - (Private Browsing)";
pb_about_pb_title = pb_page_without_title;
@ -32,10 +32,10 @@ function test() {
else {
page_with_title = test_title + " - " + app_name;
page_without_title = app_name;
about_pb_title = "Would you like to start Private Browsing?" + " - " + app_name;
about_pb_title = "Open a private window?" + " - " + app_name;
pb_page_with_title = test_title + " - " + app_name + " (Private Browsing)";
pb_page_without_title = app_name + " (Private Browsing)";
pb_about_pb_title = "Private Browsing - " + app_name + " (Private Browsing)";
pb_about_pb_title = "You're browsing privately - " + app_name + " (Private Browsing)";
}
function testTabTitle(aWindow, url, insidePB, expected_title, funcNext) {

Просмотреть файл

@ -27,18 +27,12 @@ MozSelfSupportInterface.prototype = {
classDescription: "MozSelfSupport",
classID: Components.ID("{d30aae8b-f352-4de3-b936-bb9d875df0bb}"),
contractID: "@mozilla.org/mozselfsupport;1",
QueryInterface: XPCOMUtils.generateQI([Ci.nsIDOMGlobalPropertyInitializer,
Ci.nsIObserver]),
QueryInterface: XPCOMUtils.generateQI([Ci.nsIDOMGlobalPropertyInitializer]),
_window: null,
init: function (window) {
this._window = window;
// FIXME: Remove this hack after static attributes work for JS-implemented
// WebIDL (see bug 863952). For a detailed description of how this works,
// see the comment accompanying the init function of amInstallTrigger.js.
return window.MozSelfSupportImpl._create(this._window, this);
},
get healthReportDataSubmissionEnabled() {

Просмотреть файл

@ -1,4 +1,2 @@
component {d30aae8b-f352-4de3-b936-bb9d875df0bb} SelfSupportService.js
contract @mozilla.org/mozselfsupport;1 {d30aae8b-f352-4de3-b936-bb9d875df0bb}
category JavaScript-global-privileged-property MozSelfSupport @mozilla.org/mozselfsupport;1

Просмотреть файл

@ -51,7 +51,6 @@ ACCEPTED_MAR_CHANNEL_IDS=firefox-mozilla-central
# The MAR_CHANNEL_ID must not contain the following 3 characters: ",\t "
MAR_CHANNEL_ID=firefox-mozilla-central
MOZ_PROFILE_MIGRATOR=1
MOZ_EXTENSION_MANAGER=1
MOZ_APP_STATIC_INI=1
MOZ_WEBAPP_RUNTIME=1
MOZ_MEDIA_NAVIGATOR=1

Просмотреть файл

@ -58,7 +58,7 @@ function clickTraceLog() {
}
function testCorrectLine() {
is(gDebugger.DebuggerView.editor.getCursor().line, 19,
is(gDebugger.DebuggerView.editor.getCursor().line, 18,
"The editor should have the function definition site's line selected.");
}

Просмотреть файл

@ -857,29 +857,33 @@ MarkupView.prototype = {
},
/**
* Retrieve the index of a child within its parent's children collection.
* @param aNode The NodeFront to find the index of.
* Replace the outerHTML of any node displayed in the inspector with
* some other HTML code
* @param aNode node which outerHTML will be replaced.
* @param newValue The new outerHTML to set on the node.
* @param oldValue The old outerHTML that will be reverted to find the index of.
* @returns A promise that will be resolved with the integer index.
* If the child cannot be found, returns -1
* @param oldValue The old outerHTML that will be used if the user undos the update.
* @returns A promise that will resolve when the outer HTML has been updated.
*/
updateNodeOuterHTML: function(aNode, newValue, oldValue) {
let container = this.getContainer(aNode);
let container = this._containers.get(aNode);
if (!container) {
return;
return promise.reject();
}
let def = promise.defer();
this.getNodeChildIndex(aNode).then((i) => {
this._outerHTMLChildIndex = i;
this._outerHTMLNode = aNode;
container.undo.do(() => {
this.walker.setOuterHTML(aNode, newValue);
this.walker.setOuterHTML(aNode, newValue).then(def.resolve, def.reject);
}, () => {
this.walker.setOuterHTML(aNode, oldValue);
this.walker.setOuterHTML(aNode, oldValue).then(def.resolve, def.reject);
});
});
return def.promise;
},
/**

Просмотреть файл

@ -3209,6 +3209,7 @@ VariablesView.isPrimitive = function(aDescriptor) {
type == "-Infinity" ||
type == "NaN" ||
type == "-0" ||
type == "symbol" ||
type == "longString") {
return true;
}
@ -3426,6 +3427,11 @@ VariablesView.stringifiers.byType = {
}
return null;
},
symbol: function(aGrip, aOptions) {
const name = aGrip.name || "";
return "Symbol(" + name + ")";
},
}; // VariablesView.stringifiers.byType
VariablesView.stringifiers.byObjectClass = {

Просмотреть файл

@ -488,6 +488,11 @@ Messages.BaseMessage.prototype = {
let container = doc.createElementNS(XHTML_NS, "div");
container.id = "console-msg-" + gSequenceId();
container.className = "message";
if (this.category == "input") {
// Assistive technology tools shouldn't echo input to the user,
// as the user knows what they've just typed.
container.setAttribute("aria-live", "off");
}
container.category = this._categoryCompat;
container.severity = this._severityCompat;
container.setAttribute("category", this._categoryNameCompat);
@ -1124,6 +1129,7 @@ Messages.Extended.prototype = Heritage.extend(Messages.Simple.prototype,
"infinity": "cm-atom",
"null": "cm-atom",
"undefined": "cm-comment",
"symbol": "cm-atom"
};
let className = map[typeof grip];

Просмотреть файл

@ -75,6 +75,24 @@ let inputTests = [
output: "/foobar/",
inspectable: true,
},
// 9
{
input: "Symbol()",
output: "Symbol()"
},
// 10
{
input: "Symbol('foo')",
output: "Symbol(foo)"
},
// 11
{
input: "Symbol.iterator",
output: "Symbol(Symbol.iterator)"
},
];
longString = initialString = null;

Просмотреть файл

@ -174,7 +174,8 @@ function goUpdateConsoleCommands() {
</toolbar>
<hbox id="output-wrapper" flex="1" context="output-contextmenu" tooltip="aHTMLTooltip">
<div xmlns="http://www.w3.org/1999/xhtml" id="output-container" tabindex="1" />
<div xmlns="http://www.w3.org/1999/xhtml" id="output-container"
tabindex="0" role="document" aria-live="polite" />
</hbox>
<notificationbox id="webconsole-notificationbox">
<hbox class="jsterm-input-container" style="direction:ltr">

Просмотреть файл

@ -0,0 +1,107 @@
=======================
UITelemetry data format
=======================
UI Telemetry sends its data as a JSON blob. This document describes the different parts
of the JSON blob.
``toolbars``
------------
This tracks the state of the user's UI customizations. It has the following properties:
- ``sizemode`` - string indicating whether the window is in maximized, normal (restored) or
fullscreen mode;
- ``bookmarksBarEnabled`` - boolean indicating whether the bookmarks bar is visible;
- ``menuBarEnabled`` - boolean indicating whether the menu bar is visible (always false on OS X);
- ``titleBarEnabled`` - boolean indicating whether the (real) titlebar is visible (rather than
having tabs in the titlebar);
- ``defaultKept`` - list of strings identifying toolbar buttons and items that are still in their
default position. Only the IDs of builtin widgets are sent (ie not add-on widgets);
- ``defaultMoved`` - list of strings identifying toolbar buttons and items that are no longer in
their default position, but have not been removed to the palette. Only the IDs of builtin widgets
are sent (ie not add-on widgets);
- ``nondefaultAdded`` - list of strings identifying toolbar buttons and items that have been added
from the palette. Only the IDs of builtin widgets are sent (ie not add-on widgets);
- ``defaultRemoved`` - list of strings identifying toolbar buttons and items that are in the
palette that are elsewhere by default. Only the IDs of builtin widgets are sent
(ie not add-on widgets);
- ``addonToolbars`` - the number of non-default toolbars that are customizable. 1 by default
because it counts the add-on bar shim;
- ``visibleTabs`` - array of the number of visible tabs per window;
- ``hiddenTabs`` - array of the number of hidden tabs per window (ie tabs in panorama groups which
are not the current group);
- ``countableEvents`` - please refer to the next section.
- ``durations`` - an object mapping descriptions to duration records, which records the amount of
time a user spent doing something. Currently only has one property:
- ``customization`` - how long a user spent customizing the browser. This is an array of
objects, where each object has a ``duration`` property indicating the time in milliseconds,
and a ``bucket`` property indicating a bucket in which the duration info falls.
``countableEvents``
-------------------
Countable events are stored under the ``toolbars`` section. They count the number of times certain
events happen. No timing or other correlating information is stored - purely the number of times
things happen.
``countableEvents`` is an object with properties representing buckets. In each bucket, there is an
object with the following properties:
- ``click-builtin-item`` is an object tracking clicks on builtin customizable toolbar items, keyed
off the item IDs, with an object for each item with keys ``left``, ``middle`` and ``right`` each
storing a number indicating how often the respective type of click has happened.
- ``click-menu-button`` is the same, except the item ID is always 'button'.
- ``click-bookmarks-bar`` is the same, with the item IDs being replaced by either ``container`` for
clicks on bookmark or livemark folders, and ``item`` for individual bookmarks.
- ``click-menubar`` is similar, with the item IDs being replaced by one of ``menu``, ``menuitem``
or ``other``, depending on the kind of item clicked. Note that this is not tracked on OS X, where
we can't listen for these events because of the global menubar.
- ``click-bookmarks-menu-button`` is also similar, with the item IDs being replaced by:
- ``menu`` for clicks on the 'menu' part of the item;
- ``add`` for clicks that add a bookmark;
- ``edit`` for clicks that open the panel to edit an existing bookmark;
- ``in-panel`` for clicks when the button is in the menu panel, and clicking it does none of the
above;
- ``customize`` tracks different types of customization events without the ``left``, ``middle`` and
``right`` distinctions. The different events are the following, with each storing a count of the
number of times they occurred:
- ``start`` counts the number of times the user starts customizing;
- ``add`` counts the number of times an item is added somewhere from the palette;
- ``move`` counts the number of times an item is moved somewhere else (but not to the palette);
- ``remove`` counts the number of times an item is removed to the palette;
- ``reset`` counts the number of times the 'restore defaults' button is used;
``UITour``
----------
The UI Tour has its own section in the UI Telemetry output, outside of the ``toolbars`` section.
It has a single property ``seenPageIDs`` which tracks which UI Tour pages have been run.
``contextmenu``
---------------
We track context menu interactions to figure out which ones are most often used and/or how
effective they are. In the ``contextmenu`` object, we first store things per-bucket. Next, we
divide the following different context menu situations:
- ``selection`` if there is content on the page that's selected on which the user clicks;
- ``link`` if the user opened the context menu for a link
- ``image-link`` if the user opened the context menu on an image or canvas that's a link;
- ``image`` if the user opened the context menu on an image (that isn't a link);
- ``canvas`` if the user opened the context menu on a canvas (that isn't a link);
- ``media`` if the user opened the context menu on an HTML video or audio element;
- ``input`` if the user opened the context menu on a text input element;
- ``social`` if the user opened the context menu inside a social frame;
- ``other`` for all other openings of the content menu;
Each of these objects (if they exist) then gets a "withcustom" and/or a "withoutcustom" property
for context menus opened with custom page-created items and without them, and each of those
properties holds an object with IDs corresponding to a count of how often an item with that ID was
activated in the context menu. Only builtin context menu items are tracked, and besides those items
there are four special items which get counts:
- ``close-without-interaction`` is incremented when the user closes the context menu without interacting with it;
- ``custom-page-item`` is incremented when the user clicks an item that was created by the page;
- ``unknown`` is incremented when an item without an ID was clicked;
- ``other-item`` is incremented when an add-on-provided menuitem is clicked.

9
browser/docs/index.rst Normal file
Просмотреть файл

@ -0,0 +1,9 @@
=======
Firefox
=======
This is the nascent documentation of the Firefox front-end code.
.. toctree::
:maxdepth: 1

Просмотреть файл

@ -26,6 +26,10 @@ going to the right place. However, this site's identity can't be verified.">
<!ENTITY certerror.whatShouldIDo.content "If you usually connect to
this site without problems, this error could mean that someone is
trying to impersonate the site, and you shouldn't continue.">
<!ENTITY certerror.whatShouldIDo.badStsCertExplanation "This site uses HTTP
Strict Transport Security (HSTS) to specify that &brandShortName; only connect
to it securely. As a result, it is not possible to add an exception for this
certificate.">
<!ENTITY certerror.getMeOutOfHere.label "Get me out of here!">
<!ENTITY certerror.expert.heading "I Understand the Risks">

Просмотреть файл

@ -2,25 +2,22 @@
- 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/. -->
<!ENTITY privatebrowsingpage.title "Private Browsing">
<!ENTITY privatebrowsingpage.title.normal "Would you like to start Private Browsing?">
<!ENTITY aboutPrivateBrowsing.title "You're browsing privately">
<!ENTITY aboutPrivateBrowsing.title.normal "Open a private window?">
<!ENTITY privatebrowsingpage.perwindow.issueDesc "&brandShortName; won't remember any history for this window.">
<!ENTITY privatebrowsingpage.perwindow.issueDesc.normal "You are not currently in a private window.">
<!ENTITY aboutPrivateBrowsing.subtitle "&brandShortName; won't remember any history for this window.">
<!ENTITY aboutPrivateBrowsing.subtitle.normal "&brandShortName; won't remember any history for private windows.">
<!ENTITY privatebrowsingpage.perwindow.description "In a Private Browsing window, &brandShortName; won't keep any browser history, search history, download history, web form history, cookies, or temporary internet files. However, files you download and bookmarks you make will be kept.">
<!ENTITY aboutPrivateBrowsing.description "That includes browsing history, search history, download history, web form history, cookies, and temporary internet files. However, files you download and bookmarks you make will be kept.">
<!ENTITY aboutPrivateBrowsing.notPrivate "You are currently not in a private window.">
<!ENTITY aboutPrivateBrowsing.moreInfo "While this computer won't have a record of your browsing history, your employer or internet service provider can still track the pages you visit.">
<!ENTITY aboutPrivateBrowsing.learnMore "Learn More.">
<!ENTITY privatebrowsingpage.openPrivateWindow.label "Open a Private Window">
<!ENTITY privatebrowsingpage.openPrivateWindow.accesskey "P">
<!-- LOCALIZATION NOTE (privatebrowsingpage.howToStart4): please leave &newPrivateWindow.label; intact in the translation -->
<!ENTITY privatebrowsingpage.howToStart4 "To start Private Browsing, you can also select &newPrivateWindow.label; from the menu.">
<!ENTITY privatebrowsingpage.howToStop3 "To stop Private Browsing, you can close this window.">
<!ENTITY privatebrowsingpage.moreInfo "While this computer won't have a record of your browsing history, your internet service provider or employer can still track the pages you visit.">
<!ENTITY privatebrowsingpage.learnMore "Learn More">
<!-- TO BE REMOVED POST-AUSTRALIS -->
<!-- LOCALIZATION NOTE (privatebrowsingpage.howToStart3): please leave &basePBMenu.label; intact in the translation -->
<!ENTITY privatebrowsingpage.howToStart3 "To start Private Browsing, you can also select &basePBMenu.label; &gt; &newPrivateWindow.label;.">

Просмотреть файл

@ -21,13 +21,13 @@ incoming_call_answer_audio_only_tooltip=Answer with voice
incoming_call_decline_button=Decline
incoming_call_decline_and_block_button=Decline and Block
incoming_call_block_button=Block
hangup_button_title=Hangup
hangup_button_title=Hang up
mute_local_audio_button_title=Mute your audio
unmute_local_audio_button_title=Unmute your audio
mute_local_video_button_title=Mute your video
unmute_local_video_button_title=Unmute your video
peer_ended_conversation=Your peer ended the conversation.
peer_ended_conversation2=The person you were calling has ended the conversation.
call_has_ended=Your call has ended.
cannot_start_call_session_not_ready=Can't start call, session is not ready.
@ -59,9 +59,9 @@ feedback_back_button=Back
feedback_window_will_close_in=This window will close in {{countdown}} seconds
share_email_subject2=Invitation to chat
## LOCALIZATION NOTE (share_email_body): In this item, don't translate the
## part between {{..}} and let the \r\n\r\n part
share_email_body=Please click that link to call me back:\r\n\r\n{{callUrl}}
## LOCALIZATION NOTE (share_email_body2): In this item, don't translate the
## part between {{..}} and leave the \r\n\r\n part alone
share_email_body2=Please click this link to call me:\r\n\r\n{{callUrl}}
share_button=Email
copy_url_button=Copy
copied_url_button=Copied!

Просмотреть файл

@ -12,7 +12,6 @@ MinVersion=@GRE_MILESTONE@
MaxVersion=@GRE_MILESTONE@
[XRE]
EnableExtensionManager=0
EnableProfileMigrator=0
[Crash Reporter]

Просмотреть файл

@ -6,6 +6,8 @@
CONFIGURE_SUBST_FILES += ['installer/Makefile']
SPHINX_TREES['browser'] = 'docs'
DIRS += [
'base',
'components',

Просмотреть файл

@ -1,47 +0,0 @@
%if 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/. */
%endif
body.private > #errorPageContainer {
background-image: url("chrome://browser/skin/Privacy-48.png");
}
body.normal > #errorPageContainer {
background-image: url("moz-icon://stock/gtk-dialog-question?size=dialog");
}
#clearRecentHistoryDesc {
margin-top: 2em;
}
#clearRecentHistoryDesc > p {
font-size: 110%; /* to match the value set in chrome://global/skin/netError.css */
}
#startPrivateBrowsingDesc > button {
-moz-margin-start: 0;
}
#footerDesc > p {
font-size: 110%; /* to match the value set in chrome://global/skin/netError.css */
}
#moreInfo {
font-size: 110%; /* to match the value set in chrome://global/skin/netError.css */
-moz-padding-start: 25px;
background: url("moz-icon://stock/gtk-dialog-info?size=menu") no-repeat top left;
}
#moreInfo:-moz-dir(rtl) {
background-position: top right;
}
#moreInfoText {
margin-bottom: 0;
}
#moreInfoLinkContainer {
margin-top: 0.5em;
}

Просмотреть файл

@ -6,7 +6,6 @@ browser.jar:
% skin browser classic/1.0 %skin/classic/browser/
% override chrome://global/skin/icons/warning-16.png moz-icon://stock/gtk-dialog-warning?size=menu
skin/classic/browser/sanitizeDialog.css
* skin/classic/browser/aboutPrivateBrowsing.css
* skin/classic/browser/aboutSessionRestore.css
skin/classic/browser/aboutSessionRestore-window-icon.png
skin/classic/browser/aboutWelcomeBack.css (../shared/aboutWelcomeBack.css)
@ -35,6 +34,8 @@ browser.jar:
skin/classic/browser/identity-icons-https-mixed-active.png
skin/classic/browser/identity-icons-https-mixed-display.png
skin/classic/browser/Info.png
skin/classic/browser/mask.png (../shared/mask.png)
skin/classic/browser/mask@2x.png (../shared/mask@2x.png)
skin/classic/browser/menuPanel.png
skin/classic/browser/menuPanel-customize.png
skin/classic/browser/menuPanel-exit.png
@ -55,7 +56,6 @@ browser.jar:
skin/classic/browser/pointerLock-16.png
skin/classic/browser/pointerLock-64.png
skin/classic/browser/Privacy-16.png
skin/classic/browser/Privacy-48.png
skin/classic/browser/privatebrowsing-mask.png
skin/classic/browser/reload-stop-go.png
skin/classic/browser/searchbar.css

Просмотреть файл

@ -74,18 +74,6 @@ label.small {
-moz-box-flex: 1;
}
/* Privacy Pane */
/* styles for the link elements copied from .text-link in global.css */
.inline-link {
color: -moz-nativehyperlinktext;
text-decoration: none;
}
.inline-link:hover {
text-decoration: underline;
}
/* Modeless Window Dialogs */
.windowDialog,
.windowDialog prefpane {

Просмотреть файл

@ -1,47 +0,0 @@
%if 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/. */
%endif
body.private > #errorPageContainer {
background-image: url("chrome://browser/skin/Privacy-48.png");
}
body.normal > #errorPageContainer {
background-image: url("chrome://global/skin/icons/question-64.png");
}
#clearRecentHistoryDesc {
margin-top: 2em;
}
#clearRecentHistoryDesc > p {
font-size: 110%; /* to match the value set in chrome://global/skin/netError.css */
}
#startPrivateBrowsingDesc > button {
-moz-margin-start: 0;
}
#footerDesc > p {
font-size: 110%; /* to match the value set in chrome://global/skin/netError.css */
}
#moreInfo {
font-size: 110%; /* to match the value set in chrome://global/skin/netError.css */
-moz-padding-start: 25px;
background: url("chrome://global/skin/icons/information-16.png") no-repeat top left;
}
#moreInfo:-moz-dir(rtl) {
background-position: top right;
}
#moreInfoText {
margin-bottom: 0;
}
#moreInfoLinkContainer {
margin-top: 0.5em;
}

Просмотреть файл

@ -5,7 +5,6 @@
browser.jar:
% skin browser classic/1.0 %skin/classic/browser/
skin/classic/browser/sanitizeDialog.css (sanitizeDialog.css)
* skin/classic/browser/aboutPrivateBrowsing.css (aboutPrivateBrowsing.css)
* skin/classic/browser/aboutSessionRestore.css (aboutSessionRestore.css)
skin/classic/browser/aboutSessionRestore-window-icon.png
skin/classic/browser/aboutWelcomeBack.css (../shared/aboutWelcomeBack.css)
@ -53,6 +52,8 @@ browser.jar:
skin/classic/browser/notification-16@2x.png
skin/classic/browser/notification-64.png
skin/classic/browser/notification-64@2x.png
skin/classic/browser/mask.png (../shared/mask.png)
skin/classic/browser/mask@2x.png (../shared/mask@2x.png)
skin/classic/browser/menuPanel.png
skin/classic/browser/menuPanel@2x.png
skin/classic/browser/menuPanel-customize.png
@ -86,7 +87,6 @@ browser.jar:
skin/classic/browser/pointerLock-64.png
skin/classic/browser/pointerLock-64@2x.png
skin/classic/browser/Privacy-16.png
skin/classic/browser/Privacy-48.png
skin/classic/browser/privatebrowsing-mask.png
skin/classic/browser/privatebrowsing-mask@2x.png
skin/classic/browser/privatebrowsing-mask-short.png

Просмотреть файл

@ -173,24 +173,6 @@ caption {
font-weight: bold;
}
/**
* Privacy Pane
*/
html|a.inline-link {
color: -moz-nativehyperlinktext;
text-decoration: none;
}
html|a.inline-link:hover {
text-decoration: underline;
}
html|a.inline-link:-moz-focusring {
outline-width: 0;
box-shadow: @focusRingShadow@;
}
/**
* Update Preferences
*/

Двоичные данные
browser/themes/shared/mask.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.3 KiB

Двоичные данные
browser/themes/shared/mask@2x.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.4 KiB

Просмотреть файл

@ -1,47 +0,0 @@
%if 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/. */
%endif
body.private > #errorPageContainer {
background-image: url("chrome://browser/skin/Privacy-48.png");
}
body.normal > #errorPageContainer {
background-image: url("chrome://global/skin/icons/question-48.png");
}
#clearRecentHistoryDesc {
margin-top: 2em;
}
#clearRecentHistoryDesc > p {
font-size: 110%; /* to match the value set in chrome://global/skin/netError.css */
}
#startPrivateBrowsingDesc > button {
-moz-margin-start: 0;
}
#footerDesc > p {
font-size: 110%; /* to match the value set in chrome://global/skin/netError.css */
}
#moreInfo {
font-size: 110%; /* to match the value set in chrome://global/skin/netError.css */
-moz-padding-start: 25px;
background: url("chrome://global/skin/icons/information-16.png") no-repeat top left;
}
#moreInfo:-moz-dir(rtl) {
background-position: top right;
}
#moreInfoText {
margin-bottom: 0;
}
#moreInfoLinkContainer {
margin-top: 0.5em;
}

Просмотреть файл

@ -41,14 +41,6 @@
padding-top: 4px;
}
#BMB_bookmarksPopup .menu-text {
color: #000;
}
#BMB_bookmarksPopup .subviewbutton[disabled=true] > .menu-text {
color: #6d6d6d;
}
/* bookmark panel separator */
#BMB_bookmarksPopup menuseparator {
padding-top: 0;

Просмотреть файл

@ -8,7 +8,6 @@ browser.jar:
# NOTE: If you add a new file here, you'll need to add it to the aero
# section at the bottom of this file
skin/classic/browser/sanitizeDialog.css
* skin/classic/browser/aboutPrivateBrowsing.css
* skin/classic/browser/aboutSessionRestore.css
skin/classic/browser/aboutSessionRestore-window-icon.png (preferences/application.png)
skin/classic/browser/aboutWelcomeBack.css (../shared/aboutWelcomeBack.css)
@ -40,6 +39,8 @@ browser.jar:
skin/classic/browser/keyhole-forward-mask.svg
skin/classic/browser/KUI-background.png
skin/classic/browser/livemark-folder.png
skin/classic/browser/mask.png (../shared/mask.png)
skin/classic/browser/mask@2x.png (../shared/mask@2x.png)
skin/classic/browser/menu-back.png
skin/classic/browser/menu-forward.png
skin/classic/browser/menuPanel.png
@ -416,7 +417,6 @@ browser.jar:
browser.jar:
% skin browser classic/1.0 %skin/classic/aero/browser/ os=WINNT osversion>=6
skin/classic/aero/browser/sanitizeDialog.css (sanitizeDialog.css)
* skin/classic/aero/browser/aboutPrivateBrowsing.css (aboutPrivateBrowsing.css)
* skin/classic/aero/browser/aboutSessionRestore.css (aboutSessionRestore.css)
skin/classic/aero/browser/aboutSessionRestore-window-icon.png (aboutSessionRestore-window-icon-aero.png)
skin/classic/aero/browser/aboutCertError.css
@ -448,6 +448,8 @@ browser.jar:
skin/classic/aero/browser/keyhole-forward-mask.svg
skin/classic/aero/browser/KUI-background.png
skin/classic/aero/browser/livemark-folder.png (livemark-folder-aero.png)
skin/classic/aero/browser/mask.png (../shared/mask.png)
skin/classic/aero/browser/mask@2x.png (../shared/mask@2x.png)
skin/classic/aero/browser/menu-back.png (menu-back-aero.png)
skin/classic/aero/browser/menu-forward.png (menu-forward-aero.png)
skin/classic/aero/browser/menuPanel.png
@ -476,7 +478,6 @@ browser.jar:
skin/classic/aero/browser/pointerLock-64.png
skin/classic/aero/browser/Privacy-16.png (Privacy-16-aero.png)
skin/classic/aero/browser/Privacy-32.png (Privacy-32-aero.png)
skin/classic/aero/browser/Privacy-48.png (Privacy-48-aero.png)
skin/classic/aero/browser/privatebrowsing-mask-tabstrip.png
skin/classic/aero/browser/privatebrowsing-mask-tabstrip-XPVista7.png
skin/classic/aero/browser/privatebrowsing-mask-titlebar.png

Просмотреть файл

@ -74,18 +74,6 @@ label.small {
-moz-box-flex: 1;
}
/* Privacy Pane */
/* styles for the link elements copied from .text-link in global.css */
.inline-link {
color: -moz-nativehyperlinktext;
text-decoration: none;
}
.inline-link:hover {
text-decoration: underline;
}
/* Modeless Window Dialogs */
.windowDialog,
.windowDialog prefpane {

Просмотреть файл

@ -12,10 +12,6 @@ def main(file):
config = ConfigParser.RawConfigParser()
config.read(file)
flags = set()
try:
if config.getint('XRE', 'EnableExtensionManager') == 1:
flags.add('NS_XRE_ENABLE_EXTENSION_MANAGER')
except: pass
try:
if config.getint('XRE', 'EnableProfileMigrator') == 1:
flags.add('NS_XRE_ENABLE_PROFILE_MIGRATOR')

Просмотреть файл

@ -42,9 +42,6 @@ MaxVersion=@GRE_MILESTONE@
#ifdef MOZ_PROFILE_MIGRATOR
EnableProfileMigrator=1
#endif
#ifdef MOZ_EXTENSION_MANAGER
EnableExtensionManager=1
#endif
#if MOZ_CRASHREPORTER
[Crash Reporter]

Просмотреть файл

@ -40,7 +40,7 @@ if CONFIG['MOZ_APP_PROFILE']:
DEFINES['MOZ_APP_PROFILE'] = CONFIG['MOZ_APP_PROFILE']
for var in ('MOZ_CRASHREPORTER', 'MOZ_PROFILE_MIGRATOR',
'MOZ_EXTENSION_MANAGER', 'MOZ_APP_STATIC_INI'):
'MOZ_APP_STATIC_INI'):
if CONFIG[var]:
DEFINES[var] = True

Просмотреть файл

@ -60,4 +60,5 @@ if CONFIG['GNU_CXX']:
CXXFLAGS += [
'-Wno-empty-body',
'-Wno-type-limits',
'-Wno-unused-local-typedefs',
]

2
config/external/ffi/moz.build поставляемый
Просмотреть файл

@ -9,7 +9,7 @@ LIBRARY_NAME = 'ffi'
if CONFIG['MOZ_NATIVE_FFI']:
OS_LIBS += CONFIG['MOZ_FFI_LIBS']
else:
if CONFIG['OS_ARCH'] == 'WINNT':
if CONFIG['_MSC_VER']:
prefix = 'lib'
else:
prefix = ''

Просмотреть файл

@ -150,6 +150,10 @@ endef
$(foreach subtier,export libs tools,$(eval $(call CREATE_SUBTIER_TRAVERSAL_RULE,$(subtier))))
ifndef TOPLEVEL_BUILD
libs:: target host
endif
endif # ifdef TIERS
endif # ifeq ($(NO_RECURSE_MAKELEVEL),$(MAKELEVEL))

Просмотреть файл

@ -697,7 +697,7 @@ ifdef MOZ_PROFILE_GENERATE
touch -t `date +%Y%m%d%H%M.%S -d 'now+5seconds'` pgo.relink
endif
else # !WINNT || GNU_CC
$(EXPAND_CCC) -o $@ $(CXXFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(EXTRA_LIBS) $(OS_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE) $(STLPORT_LIBS)
$(EXPAND_CCC) -o $@ $(CXXFLAGS) $(PROGOBJS) $(RESFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(STATIC_LIBS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(EXTRA_LIBS) $(OS_LIBS) $(BIN_FLAGS) $(EXE_DEF_FILE) $(STLPORT_LIBS)
$(call CHECK_BINARY,$@)
endif # WINNT && !GNU_CC
@ -753,7 +753,7 @@ ifdef MSMANIFEST_TOOL
fi
endif # MSVC with manifest tool
else
$(EXPAND_CCC) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(EXTRA_LIBS) $(OS_LIBS) $(BIN_FLAGS) $(STLPORT_LIBS)
$(EXPAND_CCC) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(WRAP_LDFLAGS) $(STATIC_LIBS) $(MOZ_GLUE_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(EXTRA_LIBS) $(OS_LIBS) $(BIN_FLAGS) $(STLPORT_LIBS)
$(call CHECK_BINARY,$@)
endif # WINNT && !GNU_CC

Просмотреть файл

@ -8485,7 +8485,6 @@ AC_SUBST(MOZ_CHILD_PROCESS_BUNDLE)
# - MOZ_APP_ID: When set, used for application.ini's "ID" field, and
# crash reporter server url.
# - MOZ_PROFILE_MIGRATOR: When set, enables profile migrator.
# - MOZ_EXTENSION_MANAGER: When set, enabled extension manager.
if test -z "$MOZ_APP_NAME"; then
MOZ_APP_NAME=`echo $MOZ_APP_BASENAME | tr A-Z a-z`
@ -8518,7 +8517,6 @@ AC_SUBST(MOZ_APP_ID)
AC_SUBST(MAR_CHANNEL_ID)
AC_SUBST(ACCEPTED_MAR_CHANNEL_IDS)
AC_SUBST(MOZ_PROFILE_MIGRATOR)
AC_SUBST(MOZ_EXTENSION_MANAGER)
AC_DEFINE_UNQUOTED(MOZ_APP_UA_NAME, "$MOZ_APP_UA_NAME")
AC_SUBST(MOZ_APP_UA_NAME)
AC_DEFINE_UNQUOTED(MOZ_APP_UA_VERSION, "$MOZ_APP_VERSION")

Просмотреть файл

@ -35,6 +35,7 @@
#include "nsAttrValue.h"
#include "mozilla/EventForwards.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/WindowBinding.h"
#include "Units.h"
class nsIDOMEventListener;
@ -720,11 +721,8 @@ public:
already_AddRefed<ShadowRoot> CreateShadowRoot(ErrorResult& aError);
already_AddRefed<DestinationInsertionPointList> GetDestinationInsertionPoints();
void ScrollIntoView()
{
ScrollIntoView(true);
}
void ScrollIntoView(bool aTop);
void ScrollIntoView();
void ScrollIntoView(bool aTop, const ScrollOptions &aOptions);
int32_t ScrollTop()
{
nsIScrollableFrame* sf = GetScrollFrame();

Просмотреть файл

@ -103,7 +103,7 @@ NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_END
// QueryInterface implementation for Attr
NS_INTERFACE_TABLE_HEAD(Attr)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_WRAPPERCACHE_INTERFACE_TABLE_ENTRY
NS_INTERFACE_TABLE(Attr, nsINode, nsIDOMAttr, nsIAttribute, nsIDOMNode,
nsIDOMEventTarget, EventTarget)
NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(Attr)

Просмотреть файл

@ -75,7 +75,7 @@ DOMRect::Constructor(const GlobalObject& aGlobal, double aX, double aY,
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(DOMRectList, mParent, mArray)
NS_INTERFACE_TABLE_HEAD(DOMRectList)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_WRAPPERCACHE_INTERFACE_TABLE_ENTRY
NS_INTERFACE_TABLE(DOMRectList, nsIDOMClientRectList)
NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(DOMRectList)
NS_INTERFACE_MAP_END

Просмотреть файл

@ -586,7 +586,13 @@ Element::GetScrollFrame(nsIFrame **aStyledFrame, bool aFlushLayout)
}
void
Element::ScrollIntoView(bool aTop)
Element::ScrollIntoView()
{
ScrollIntoView(true, ScrollOptions());
}
void
Element::ScrollIntoView(bool aTop, const ScrollOptions &aOptions)
{
nsIDocument *document = GetCurrentDoc();
if (!document) {
@ -602,12 +608,17 @@ Element::ScrollIntoView(bool aTop)
int16_t vpercent = aTop ? nsIPresShell::SCROLL_TOP :
nsIPresShell::SCROLL_BOTTOM;
uint32_t flags = nsIPresShell::SCROLL_OVERFLOW_HIDDEN;
if (aOptions.mBehavior == ScrollBehavior::Smooth) {
flags |= nsIPresShell::SCROLL_SMOOTH;
}
presShell->ScrollContentIntoView(this,
nsIPresShell::ScrollAxis(
vpercent,
nsIPresShell::SCROLL_ALWAYS),
nsIPresShell::ScrollAxis(),
nsIPresShell::SCROLL_OVERFLOW_HIDDEN);
flags);
}
bool

Просмотреть файл

@ -394,7 +394,7 @@ NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(nsChildContentList)
NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_END
NS_INTERFACE_TABLE_HEAD(nsChildContentList)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_WRAPPERCACHE_INTERFACE_TABLE_ENTRY
NS_INTERFACE_TABLE(nsChildContentList, nsINodeList, nsIDOMNodeList)
NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(nsChildContentList)
NS_INTERFACE_MAP_END

Просмотреть файл

@ -85,7 +85,7 @@ NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_END
// QueryInterface implementation for nsBaseContentList
NS_INTERFACE_TABLE_HEAD(nsBaseContentList)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_WRAPPERCACHE_INTERFACE_TABLE_ENTRY
NS_INTERFACE_TABLE(nsBaseContentList, nsINodeList, nsIDOMNodeList)
NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(nsBaseContentList)
NS_INTERFACE_MAP_END

Просмотреть файл

@ -116,7 +116,7 @@ NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_END
NS_INTERFACE_TABLE_HEAD(nsDOMAttributeMap)
NS_INTERFACE_TABLE(nsDOMAttributeMap, nsIDOMMozNamedAttrMap)
NS_INTERFACE_TABLE_TO_MAP_SEGUE
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_WRAPPERCACHE_INTERFACE_TABLE_ENTRY
NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION(nsDOMAttributeMap)
NS_INTERFACE_MAP_END

Просмотреть файл

@ -1737,7 +1737,7 @@ nsDocument::~nsDocument()
}
NS_INTERFACE_TABLE_HEAD(nsDocument)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_WRAPPERCACHE_INTERFACE_TABLE_ENTRY
NS_INTERFACE_TABLE_BEGIN
NS_INTERFACE_TABLE_ENTRY_AMBIGUOUS(nsDocument, nsISupports, nsINode)
NS_INTERFACE_TABLE_ENTRY(nsDocument, nsINode)

Просмотреть файл

@ -467,13 +467,6 @@ nsFrameLoader::ReallyStartLoadingInternal()
mPendingFrameSent = true;
}
}
if (Preferences::GetBool("dom.ipc.processPrelaunch.enabled", false) &&
!ContentParent::PreallocatedProcessReady()) {
ContentParent::RunAfterPreallocatedProcessReady(
new DelayedStartLoadingRunnable(this));
return NS_ERROR_FAILURE;
}
TryRemoteBrowser();

Просмотреть файл

@ -136,7 +136,7 @@ NS_IMPL_CYCLE_COLLECTION_TRACE_END
// XPConnect interface list for HTMLFormControlsCollection
NS_INTERFACE_TABLE_HEAD(HTMLFormControlsCollection)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_WRAPPERCACHE_INTERFACE_TABLE_ENTRY
NS_INTERFACE_TABLE(HTMLFormControlsCollection,
nsIHTMLCollection,
nsIDOMHTMLCollection)

Просмотреть файл

@ -95,7 +95,7 @@ NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(HTMLOptionsCollection, mElements)
// QueryInterface implementation for HTMLOptionsCollection
NS_INTERFACE_TABLE_HEAD(HTMLOptionsCollection)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_WRAPPERCACHE_INTERFACE_TABLE_ENTRY
NS_INTERFACE_TABLE(HTMLOptionsCollection,
nsIHTMLCollection,
nsIDOMHTMLOptionsCollection,

Просмотреть файл

@ -61,7 +61,7 @@ HTMLPropertiesCollection::~HTMLPropertiesCollection()
}
NS_INTERFACE_TABLE_HEAD(HTMLPropertiesCollection)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_WRAPPERCACHE_INTERFACE_TABLE_ENTRY
NS_INTERFACE_TABLE(HTMLPropertiesCollection,
nsIDOMHTMLCollection,
nsIHTMLCollection,
@ -408,7 +408,7 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(PropertyNodeList)
NS_IMPL_CYCLE_COLLECTING_RELEASE(PropertyNodeList)
NS_INTERFACE_TABLE_HEAD(PropertyNodeList)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_WRAPPERCACHE_INTERFACE_TABLE_ENTRY
NS_INTERFACE_TABLE(PropertyNodeList,
nsIDOMNodeList,
nsINodeList,

Просмотреть файл

@ -95,7 +95,7 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(TableRowsCollection)
NS_IMPL_CYCLE_COLLECTING_RELEASE(TableRowsCollection)
NS_INTERFACE_TABLE_HEAD(TableRowsCollection)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_WRAPPERCACHE_INTERFACE_TABLE_ENTRY
NS_INTERFACE_TABLE(TableRowsCollection, nsIHTMLCollection,
nsIDOMHTMLCollection)
NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(TableRowsCollection)

Просмотреть файл

@ -469,7 +469,7 @@ public:
if (!_argc) {
top = true;
}
mozilla::dom::Element::ScrollIntoView(top);
mozilla::dom::Element::ScrollIntoView(top, mozilla::dom::ScrollOptions());
return NS_OK;
}
NS_IMETHOD GetOffsetParent(nsIDOMElement** aOffsetParent) MOZ_FINAL {

Просмотреть файл

@ -94,10 +94,6 @@ nsHTMLDNSPrefetch::Shutdown()
bool
nsHTMLDNSPrefetch::IsAllowed (nsIDocument *aDocument)
{
if (NS_IsAppOffline(aDocument->NodePrincipal())) {
return false;
}
// There is no need to do prefetch on non UI scenarios such as XMLHttpRequest.
return aDocument->IsDNSPrefetchAllowed() && aDocument->GetWindow();
}

Просмотреть файл

@ -36,6 +36,7 @@ const gPropertyTestDecls = {
"opacity": "opacity: 0.8",
"mask": "mask: url(#mymask)",
"clip": "clip: rect(0 0 0 0)",
"clipPath": "clip-path: url(#mypath)",
"filter": "filter: url(#myfilter)",
"transform": "transform: translate(0)",
// XXXdholbert The "will-change" line in full-screen-override.css is only

Просмотреть файл

@ -180,7 +180,7 @@ MediaDecoderStateMachine::MediaDecoderStateMachine(MediaDecoder* aDecoder,
aDecoder->GetReentrantMonitor(),
&MediaDecoderStateMachine::TimeoutExpired,
MOZ_THIS_IN_INITIALIZER_LIST(), aRealTime)),
mState(DECODER_STATE_DECODING_METADATA),
mState(DECODER_STATE_DECODING_NONE),
mSyncPointInMediaStream(-1),
mSyncPointInDecodedStream(-1),
mPlayDuration(0),
@ -209,7 +209,6 @@ MediaDecoderStateMachine::MediaDecoderStateMachine(MediaDecoder* aDecoder,
mQuickBuffering(false),
mMinimizePreroll(false),
mDecodeThreadWaiting(false),
mDispatchedDecodeMetadataTask(false),
mDropAudioUntilNextDiscontinuity(false),
mDropVideoUntilNextDiscontinuity(false),
mDecodeToSeekTarget(false),
@ -358,22 +357,26 @@ static const TrackRate RATE_VIDEO = USECS_PER_S;
void MediaDecoderStateMachine::SendStreamData()
{
NS_ASSERTION(OnDecodeThread() ||
OnStateMachineThread(), "Should be on decode thread or state machine thread");
NS_ASSERTION(OnDecodeThread() || OnStateMachineThread(),
"Should be on decode thread or state machine thread");
AssertCurrentThreadInMonitor();
MOZ_ASSERT(mState != DECODER_STATE_DECODING_NONE);
DecodedStreamData* stream = mDecoder->GetDecodedStream();
if (!stream)
if (!stream) {
return;
}
if (mState == DECODER_STATE_DECODING_METADATA)
if (mState == DECODER_STATE_DECODING_METADATA) {
return;
}
// If there's still an audio sink alive, then we can't send any stream
// data yet since both SendStreamData and the audio sink want to be in
// charge of popping the audio queue. We're waiting for the audio sink
if (mAudioSink)
if (mAudioSink) {
return;
}
int64_t minLastAudioPacketTime = INT64_MAX;
bool finished =
@ -1330,7 +1333,7 @@ void MediaDecoderStateMachine::SetDormant(bool aDormant)
ScheduleStateMachine();
mStartTime = 0;
mCurrentFrameTime = 0;
mState = DECODER_STATE_DECODING_METADATA;
mState = DECODER_STATE_DECODING_NONE;
mDecoder->GetReentrantMonitor().NotifyAll();
}
}
@ -1399,8 +1402,8 @@ void MediaDecoderStateMachine::NotifyWaitingForResourcesStatusChanged()
DECODER_LOG("NotifyWaitingForResourcesStatusChanged");
// The reader is no longer waiting for resources (say a hardware decoder),
// we can now proceed to decode metadata.
mState = DECODER_STATE_DECODING_METADATA;
EnqueueDecodeMetadataTask();
mState = DECODER_STATE_DECODING_NONE;
ScheduleStateMachine();
}
void MediaDecoderStateMachine::Play()
@ -1531,21 +1534,13 @@ nsresult
MediaDecoderStateMachine::EnqueueDecodeMetadataTask()
{
AssertCurrentThreadInMonitor();
MOZ_ASSERT(mState == DECODER_STATE_DECODING_METADATA);
if (mState != DECODER_STATE_DECODING_METADATA ||
mDispatchedDecodeMetadataTask) {
return NS_OK;
}
mDispatchedDecodeMetadataTask = true;
RefPtr<nsIRunnable> task(
NS_NewRunnableMethod(this, &MediaDecoderStateMachine::CallDecodeMetadata));
nsresult rv = mDecodeTaskQueue->Dispatch(task);
if (NS_FAILED(rv)) {
DECODER_WARN("Dispatch ReadMetadata task failed.");
mDispatchedDecodeMetadataTask = false;
}
return rv;
NS_ENSURE_SUCCESS(rv, rv);
return NS_OK;
}
void
@ -1872,10 +1867,8 @@ nsresult MediaDecoderStateMachine::DecodeMetadata()
{
AssertCurrentThreadInMonitor();
NS_ASSERTION(OnDecodeThread(), "Should be on decode thread.");
MOZ_ASSERT(mState == DECODER_STATE_DECODING_METADATA);
DECODER_LOG("Decoding Media Headers");
if (mState != DECODER_STATE_DECODING_METADATA) {
return NS_ERROR_FAILURE;
}
nsresult res;
MediaInfo info;
@ -1890,7 +1883,6 @@ nsresult MediaDecoderStateMachine::DecodeMetadata()
// change state to DECODER_STATE_WAIT_FOR_RESOURCES
StartWaitForResources();
// affect values only if ReadMetadata succeeds
mDispatchedDecodeMetadataTask = false;
return NS_OK;
}
}
@ -2012,7 +2004,6 @@ MediaDecoderStateMachine::FinishDecodeMetadata()
StartPlayback();
}
mDispatchedDecodeMetadataTask = false;
return NS_OK;
}
@ -2143,6 +2134,8 @@ MediaDecoderStateMachine::SeekCompleted()
}
}
MOZ_ASSERT(mState != DECODER_STATE_DECODING_NONE);
mDecoder->StartProgressUpdates();
if (mState == DECODER_STATE_DECODING_METADATA ||
mState == DECODER_STATE_DORMANT ||
@ -2329,11 +2322,16 @@ nsresult MediaDecoderStateMachine::RunStateMachine()
return NS_OK;
}
case DECODER_STATE_DECODING_METADATA: {
case DECODER_STATE_DECODING_NONE: {
mState = DECODER_STATE_DECODING_METADATA;
// Ensure we have a decode thread to decode metadata.
return EnqueueDecodeMetadataTask();
}
case DECODER_STATE_DECODING_METADATA: {
return NS_OK;
}
case DECODER_STATE_DECODING: {
if (mDecoder->GetState() != MediaDecoder::PLAY_STATE_PLAYING &&
IsPlaying())

Просмотреть файл

@ -135,6 +135,7 @@ public:
// Enumeration for the valid decoding states
enum State {
DECODER_STATE_DECODING_NONE,
DECODER_STATE_DECODING_METADATA,
DECODER_STATE_WAIT_FOR_RESOURCES,
DECODER_STATE_DORMANT,
@ -893,11 +894,6 @@ protected:
// by the decoder monitor.
bool mDecodeThreadWaiting;
// True if we've dispatched a task to the decode task queue to call
// ReadMetadata on the reader. We maintain a flag to ensure that we don't
// dispatch multiple tasks to re-do the metadata loading.
bool mDispatchedDecodeMetadataTask;
// These two flags are true when we need to drop decoded samples that
// we receive up to the next discontinuity. We do this when we seek;
// the first sample in each stream after the seek is marked as being

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше