Merge m-c to inbound. a=merge

This commit is contained in:
Ryan VanderMeulen 2014-10-23 14:11:40 -04:00
commit 61b93984c8
31 changed files with 130 additions and 218 deletions

View File

@ -176,7 +176,7 @@ Components.utils.import('resource://gre/modules/ctypes.jsm');
}
})();
// =================== DevTools HUD ====================
// =================== DevTools ====================
let developerHUD;
SettingsListener.observe('devtools.overlay', false, (value) => {
@ -282,6 +282,36 @@ function setUpdateTrackingId() {
}
setUpdateTrackingId();
(function syncUpdatePrefs() {
// The update service reads the prefs from the default branch. This is by
// design, as explained in bug 302721 comment 43. If we are to successfully
// modify them, that's where we need to make our changes.
let defaultBranch = Services.prefs.getDefaultBranch(null);
function syncCharPref(prefName) {
SettingsListener.observe(prefName, null, function(value) {
// If set, propagate setting value to pref.
if (value) {
defaultBranch.setCharPref(prefName, value);
return;
}
// If unset, initialize setting to pref value.
try {
let value = defaultBranch.getCharPref(prefName);
if (value) {
let setting = {};
setting[prefName] = value;
window.navigator.mozSettings.createLock().set(setting);
}
} catch(e) {
console.log('Unable to read pref ' + prefName + ': ' + e);
}
});
}
syncCharPref('app.update.url');
syncCharPref('app.update.channel');
})();
// ================ Debug ================
(function Composer2DSettingToPref() {
@ -467,13 +497,7 @@ let settingsToObserve = {
resetToPref: true,
defaultValue: 0
},
'app.update.channel': {
resetToPref: true
},
'app.update.interval': 86400,
'app.update.url': {
resetToPref: true
},
'apz.force-enable': {
prefName: 'dom.browser_frames.useAsyncPanZoom',
defaultValue: false

View File

@ -58,10 +58,6 @@ contract @mozilla.org/network/protocol;1?name=sms {81ca20cb-0dad-4e32-8566-979c8
component {50777e53-0331-4366-a191-900999be386c} MailtoProtocolHandler.js
contract @mozilla.org/network/protocol;1?name=mailto {50777e53-0331-4366-a191-900999be386c}
# YoutubeProtocolHandler.js
component {c3f1b945-7e71-49c8-95c7-5ae9cc9e2bad} YoutubeProtocolHandler.js
contract @mozilla.org/network/protocol;1?name=vnd.youtube {c3f1b945-7e71-49c8-95c7-5ae9cc9e2bad}
# RecoveryService.js
component {b3caca5d-0bb0-48c6-912b-6be6cbf08832} RecoveryService.js
contract @mozilla.org/recovery-service;1 {b3caca5d-0bb0-48c6-912b-6be6cbf08832}

View File

@ -1,64 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
XPCOMUtils.defineLazyGetter(this, "cpmm", function() {
return Cc["@mozilla.org/childprocessmessagemanager;1"]
.getService(Ci.nsIMessageSender);
});
function YoutubeProtocolHandler() {
}
YoutubeProtocolHandler.prototype = {
classID: Components.ID("{c3f1b945-7e71-49c8-95c7-5ae9cc9e2bad}"),
QueryInterface: XPCOMUtils.generateQI([Ci.nsIProtocolHandler]),
scheme: "vnd.youtube",
defaultPort: -1,
protocolFlags: Ci.nsIProtocolHandler.URI_NORELATIVE |
Ci.nsIProtocolHandler.URI_NOAUTH |
Ci.nsIProtocolHandler.URI_LOADABLE_BY_ANYONE,
// Sample URL:
// vnd.youtube:iNuKL2Gy_QM?vndapp=youtube_mobile&vndclient=mv-google&vndel=watch&vnddnc=1
// Note that there is no hostname, so we use URLTYPE_NO_AUTHORITY
newURI: function yt_phNewURI(aSpec, aOriginCharset, aBaseURI) {
let uri = Cc["@mozilla.org/network/standard-url;1"]
.createInstance(Ci.nsIStandardURL);
uri.init(Ci.nsIStandardURL.URLTYPE_NO_AUTHORITY, this.defaultPort,
aSpec, aOriginCharset, aBaseURI);
return uri.QueryInterface(Ci.nsIURI);
},
newChannel: function yt_phNewChannel(aURI) {
/*
* This isn't a real protocol handler. Instead of creating a channel
* we just send a message and throw an exception. This 'content-handler'
* message is handled in b2g/chrome/content/shell.js where it starts
* an activity request that will open the Video app. The video app
* includes code to handle this fake 'video/youtube' mime type
*/
cpmm.sendAsyncMessage("content-handler", {
type: 'video/youtube', // A fake MIME type for the activity handler
url: aURI.spec // The path component of this URL is the video id
});
throw Components.results.NS_ERROR_ILLEGAL_VALUE;
},
allowPort: function yt_phAllowPort(aPort, aScheme) {
return false;
}
};
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([YoutubeProtocolHandler]);

View File

@ -25,7 +25,6 @@ EXTRA_COMPONENTS += [
'SystemMessageGlue.js',
'TelProtocolHandler.js',
'WebappsUpdateTimer.js',
'YoutubeProtocolHandler.js',
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="3a2947df41a480de1457a6dcdbf46ad0af70d8e0">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="27a1d1baaa8e375b70e043efee67d5f2206c330b"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="f46d56d812480bff7f3b35e8cacbedfa4d49edc5"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="314f305d3163cc094e6fe7701d95a98fc180b639"/>
<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="a7631963e5f702a0c6027f5575e5e0deeededea6"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="b9fe09fe470f7c22d70c98cc0458e49fdd4618c2"/>
<!-- 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"/>

View File

@ -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="27a1d1baaa8e375b70e043efee67d5f2206c330b"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="f46d56d812480bff7f3b35e8cacbedfa4d49edc5"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="314f305d3163cc094e6fe7701d95a98fc180b639"/>
<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="c058843242068d0df7c107e09da31b53d2e08fa6"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a7631963e5f702a0c6027f5575e5e0deeededea6"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="b9fe09fe470f7c22d70c98cc0458e49fdd4618c2"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>

View File

@ -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="27a1d1baaa8e375b70e043efee67d5f2206c330b"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="f46d56d812480bff7f3b35e8cacbedfa4d49edc5"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="314f305d3163cc094e6fe7701d95a98fc180b639"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a7631963e5f702a0c6027f5575e5e0deeededea6"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="b9fe09fe470f7c22d70c98cc0458e49fdd4618c2"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="3a2947df41a480de1457a6dcdbf46ad0af70d8e0">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="27a1d1baaa8e375b70e043efee67d5f2206c330b"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="f46d56d812480bff7f3b35e8cacbedfa4d49edc5"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="314f305d3163cc094e6fe7701d95a98fc180b639"/>
<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="a7631963e5f702a0c6027f5575e5e0deeededea6"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="b9fe09fe470f7c22d70c98cc0458e49fdd4618c2"/>
<!-- 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"/>

View File

@ -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="27a1d1baaa8e375b70e043efee67d5f2206c330b"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="f46d56d812480bff7f3b35e8cacbedfa4d49edc5"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="314f305d3163cc094e6fe7701d95a98fc180b639"/>
<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="c058843242068d0df7c107e09da31b53d2e08fa6"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a7631963e5f702a0c6027f5575e5e0deeededea6"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="b9fe09fe470f7c22d70c98cc0458e49fdd4618c2"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="3a2947df41a480de1457a6dcdbf46ad0af70d8e0">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="27a1d1baaa8e375b70e043efee67d5f2206c330b"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="f46d56d812480bff7f3b35e8cacbedfa4d49edc5"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="314f305d3163cc094e6fe7701d95a98fc180b639"/>
<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="a7631963e5f702a0c6027f5575e5e0deeededea6"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="b9fe09fe470f7c22d70c98cc0458e49fdd4618c2"/>
<!-- 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"/>

View File

@ -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="27a1d1baaa8e375b70e043efee67d5f2206c330b"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="f46d56d812480bff7f3b35e8cacbedfa4d49edc5"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="314f305d3163cc094e6fe7701d95a98fc180b639"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a7631963e5f702a0c6027f5575e5e0deeededea6"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="b9fe09fe470f7c22d70c98cc0458e49fdd4618c2"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->

View File

@ -4,6 +4,6 @@
"remote": "",
"branch": ""
},
"revision": "8d483aad9a257678544e70bdfadee0e576cc3239",
"revision": "9420e20475daffd4ff3f8e4b1537a4800346bcb6",
"repo_path": "/integration/gaia-central"
}

View File

@ -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="27a1d1baaa8e375b70e043efee67d5f2206c330b"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="f46d56d812480bff7f3b35e8cacbedfa4d49edc5"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="314f305d3163cc094e6fe7701d95a98fc180b639"/>
<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="a7631963e5f702a0c6027f5575e5e0deeededea6"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="b9fe09fe470f7c22d70c98cc0458e49fdd4618c2"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
<project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>

View File

@ -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="27a1d1baaa8e375b70e043efee67d5f2206c330b"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="f46d56d812480bff7f3b35e8cacbedfa4d49edc5"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="314f305d3163cc094e6fe7701d95a98fc180b639"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

View File

@ -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="27a1d1baaa8e375b70e043efee67d5f2206c330b"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="f46d56d812480bff7f3b35e8cacbedfa4d49edc5"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="314f305d3163cc094e6fe7701d95a98fc180b639"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a7631963e5f702a0c6027f5575e5e0deeededea6"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="b9fe09fe470f7c22d70c98cc0458e49fdd4618c2"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->

View File

@ -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="27a1d1baaa8e375b70e043efee67d5f2206c330b"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="f46d56d812480bff7f3b35e8cacbedfa4d49edc5"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="314f305d3163cc094e6fe7701d95a98fc180b639"/>
<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="a7631963e5f702a0c6027f5575e5e0deeededea6"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="b9fe09fe470f7c22d70c98cc0458e49fdd4618c2"/>
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>

View File

@ -843,7 +843,6 @@ bin/components/@DLL_PREFIX@nkgnomevfs@DLL_SUFFIX@
@BINPATH@/components/ProcessGlobal.js
@BINPATH@/components/OMAContentHandler.js
@BINPATH@/components/PaymentGlue.js
@BINPATH@/components/YoutubeProtocolHandler.js
@BINPATH@/components/RecoveryService.js
@BINPATH@/components/MailtoProtocolHandler.js
@BINPATH@/components/SmsProtocolHandler.js

View File

@ -944,7 +944,7 @@ ContactDB.prototype = {
if (DEBUG) debug("No object ID passed");
return;
}
this.newTxn("readwrite", SAVED_GETALL_STORE_NAME, function(txn, store) {
this.newTxn("readwrite", STORE_NAME, function(txn, store) {
store.openCursor().onsuccess = function(e) {
let cursor = e.target.result;
if (cursor) {
@ -958,7 +958,7 @@ ContactDB.prototype = {
}
cursor.continue();
} else {
aCallback();
aCallback(txn);
}
}.bind(this);
}.bind(this), null,
@ -967,15 +967,6 @@ ContactDB.prototype = {
});
},
// Invalidate the entire cache. It will be incrementally regenerated on demand
// See getCacheForQuery
invalidateCache: function CDB_invalidateCache(aErrorCb) {
if (DEBUG) debug("invalidate cache");
this.newTxn("readwrite", SAVED_GETALL_STORE_NAME, function (txn, store) {
store.clear();
}, null, aErrorCb);
},
incrementRevision: function CDB_incrementRevision(txn) {
let revStore = txn.objectStore(REVISION_STORE);
revStore.get(REVISION_KEY).onsuccess = function(e) {
@ -985,8 +976,9 @@ ContactDB.prototype = {
saveContact: function CDB_saveContact(aContact, successCb, errorCb) {
let contact = this.makeImport(aContact);
this.newTxn("readwrite", STORE_NAME, function (txn, store) {
this.newTxn("readwrite", this.dbStoreNames, function (txn, stores) {
if (DEBUG) debug("Going to update" + JSON.stringify(contact));
let store = txn.objectStore(STORE_NAME);
// Look up the existing record and compare the update timestamp.
// If no record exists, just add the new entry.
@ -1009,7 +1001,11 @@ ContactDB.prototype = {
store.put(contact);
}
}
this.invalidateCache(errorCb);
// Invalidate the entire cache. It will be incrementally regenerated on demand
// See getCacheForQuery
let (getAllStore = txn.objectStore(SAVED_GETALL_STORE_NAME)) {
getAllStore.clear().onerror = errorCb;
}
}.bind(this);
this.incrementRevision(txn);
@ -1018,13 +1014,12 @@ ContactDB.prototype = {
removeContact: function removeContact(aId, aSuccessCb, aErrorCb) {
if (DEBUG) debug("removeContact: " + aId);
this.removeObjectFromCache(aId, function() {
this.newTxn("readwrite", STORE_NAME, function(txn, store) {
store.delete(aId).onsuccess = function() {
aSuccessCb();
};
this.incrementRevision(txn);
}.bind(this), null, aErrorCb);
this.removeObjectFromCache(aId, function(txn) {
let store = txn.objectStore(STORE_NAME)
store.delete(aId).onsuccess = function() {
aSuccessCb();
};
this.incrementRevision(txn);
}.bind(this), aErrorCb);
},

View File

@ -26,21 +26,17 @@ XPCOMUtils.defineLazyServiceGetter(this,
/**
* NFCTag
*/
function MozNFCTag() {
function MozNFCTag(aWindow, aSessionToken) {
debug("In MozNFCTag Constructor");
this._nfcContentHelper = Cc["@mozilla.org/nfc/content-helper;1"]
.getService(Ci.nsINfcContentHelper);
this.session = null;
this._window = aWindow;
this.session = aSessionToken;
}
MozNFCTag.prototype = {
_nfcContentHelper: null,
_window: null,
initialize: function(aWindow, aSessionToken) {
this._window = aWindow;
this.session = aSessionToken;
},
// NFCTag interface:
readNDEF: function readNDEF() {
return this._nfcContentHelper.readNDEF(this._window, this.session);
@ -61,22 +57,19 @@ MozNFCTag.prototype = {
/**
* NFCPeer
*/
function MozNFCPeer() {
function MozNFCPeer(aWindow, aSessionToken) {
debug("In MozNFCPeer Constructor");
this._nfcContentHelper = Cc["@mozilla.org/nfc/content-helper;1"]
.getService(Ci.nsINfcContentHelper);
this.session = null;
this._window = aWindow;
this.session = aSessionToken;
}
MozNFCPeer.prototype = {
_nfcContentHelper: null,
_window: null,
_isLost: false,
initialize: function(aWindow, aSessionToken) {
this._window = aWindow;
this.session = aSessionToken;
},
// NFCPeer interface:
sendNDEF: function sendNDEF(records) {
if (this._isLost) {
@ -170,8 +163,7 @@ mozNfc.prototype = {
},
getNFCTag: function getNFCTag(sessionToken) {
let obj = new MozNFCTag();
obj.initialize(this._window, sessionToken);
let obj = new MozNFCTag(this._window, sessionToken);
if (this._nfcContentHelper.checkSessionToken(sessionToken)) {
return this._window.MozNFCTag._create(this._window, obj);
}
@ -184,8 +176,7 @@ mozNfc.prototype = {
}
if (!this.nfcObject || this.nfcObject.session != sessionToken) {
let obj = new MozNFCPeer();
obj.initialize(this._window, sessionToken);
let obj = new MozNFCPeer(this._window, sessionToken);
this.nfcObject = obj;
this.nfcObject.contentObject = this._window.MozNFCPeer._create(this._window, obj);
}

View File

@ -115,6 +115,7 @@ IccInfo.prototype = {
function GsmIccInfo() {}
GsmIccInfo.prototype = {
__proto__: IccInfo.prototype,
QueryInterface: XPCOMUtils.generateQI([Ci.nsIGsmIccInfo,
Ci.nsIIccInfo]),
@ -125,6 +126,7 @@ GsmIccInfo.prototype = {
function CdmaIccInfo() {}
CdmaIccInfo.prototype = {
__proto__: IccInfo.prototype,
QueryInterface: XPCOMUtils.generateQI([Ci.nsICdmaIccInfo,
Ci.nsIIccInfo]),
@ -208,8 +210,6 @@ RILContentHelper.prototype = {
rilContext.iccInfo = new IccInfo();
}
}
let changed = (rilContext.iccInfo.iccid != newInfo.iccid) ?
true : false;
this.updateInfo(newInfo, rilContext.iccInfo);
},

View File

@ -1987,7 +1987,7 @@ RilObject.prototype = {
call.hangUpLocal = true;
this.sendHangUpRequest(1);
} else {
if (this.currentConference.state === CALL_STATE_ACTIVE) {
if (this.currentConferenceState === CALL_STATE_ACTIVE) {
this.sendHangUpForegroundRequest(options);
} else {
this.sendHangUpBackgroundRequest(options);

View File

@ -65,18 +65,17 @@ public:
class Telephony::EnumerationAck : public nsRunnable
{
nsRefPtr<Telephony> mTelephony;
nsString mType;
public:
EnumerationAck(Telephony* aTelephony, const nsAString& aType)
: mTelephony(aTelephony), mType(aType)
EnumerationAck(Telephony* aTelephony)
: mTelephony(aTelephony)
{
MOZ_ASSERT(mTelephony);
}
NS_IMETHOD Run()
{
mTelephony->NotifyEvent(mType);
mTelephony->NotifyEvent(NS_LITERAL_STRING("ready"));
return NS_OK;
}
};
@ -468,11 +467,8 @@ Telephony::ConferenceGroup() const
void
Telephony::EventListenerAdded(nsIAtom* aType)
{
if (aType == nsGkAtoms::oncallschanged) {
// Fire oncallschanged on the next tick if the calls array is ready.
EnqueueEnumerationAck(NS_LITERAL_STRING("callschanged"));
} else if (aType == nsGkAtoms::onready) {
EnqueueEnumerationAck(NS_LITERAL_STRING("ready"));
if (aType == nsGkAtoms::onready) {
EnqueueEnumerationAck();
}
}
@ -573,10 +569,6 @@ Telephony::EnumerateCallStateComplete()
NS_WARNING("Failed to notify ready!");
}
if (NS_FAILED(NotifyCallsChanged(nullptr))) {
NS_WARNING("Failed to notify calls changed!");
}
if (NS_FAILED(mService->RegisterListener(mListener))) {
NS_WARNING("Failed to register listener!");
}
@ -704,13 +696,13 @@ Telephony::DispatchCallEvent(const nsAString& aType,
}
void
Telephony::EnqueueEnumerationAck(const nsAString& aType)
Telephony::EnqueueEnumerationAck()
{
if (!mEnumerated) {
return;
}
nsCOMPtr<nsIRunnable> task = new EnumerationAck(this, aType);
nsCOMPtr<nsIRunnable> task = new EnumerationAck(this);
if (NS_FAILED(NS_DispatchToCurrentThread(task))) {
NS_WARNING("Failed to dispatch to current thread!");
}

View File

@ -199,7 +199,7 @@ private:
DispatchCallEvent(const nsAString& aType, TelephonyCall* aCall);
void
EnqueueEnumerationAck(const nsAString& aType);
EnqueueEnumerationAck();
already_AddRefed<TelephonyCall>
GetCall(uint32_t aServiceId, uint32_t aCallIndex);

View File

@ -276,15 +276,16 @@ let emulator = (function() {
callback) {
container.oncallschanged = function(event) {
log("Received 'callschanged' event for the " + containerName);
if (event.call) {
let index = expectedCalls.indexOf(event.call);
ok(index != -1);
expectedCalls.splice(index, 1);
if (expectedCalls.length === 0) {
container.oncallschanged = null;
callback();
}
ok(event.call);
let index = expectedCalls.indexOf(event.call);
ok(index != -1);
expectedCalls.splice(index, 1);
if (expectedCalls.length === 0) {
container.oncallschanged = null;
callback();
}
};
}

View File

@ -13,10 +13,8 @@ function simulateIncoming() {
telephony.oncallschanged = function oncallschanged(event) {
log("Received 'callschanged' event.");
if (!event.call) {
log("Notifying calls array is loaded. No call information accompanies.");
return;
}
// Check whether the 'calls' array has changed
ok(event.call, "undesired callschanged event");
telephony.oncallschanged = null;
@ -87,10 +85,8 @@ function hangUp() {
telephony.oncallschanged = function oncallschanged(event) {
log("Received 'callschanged' event.");
if (!event.call) {
log("Notifying calls array is loaded. No call information accompanies.");
return;
}
// Check whether the 'calls' array has changed
ok(event.call, "undesired callschanged event");
is(incoming, event.call);
is(incoming.state, "disconnected");

View File

@ -13,10 +13,8 @@ function dial() {
telephony.oncallschanged = function oncallschanged(event) {
log("Received 'callschanged' call event.");
if (!event.call) {
log("Notifying calls array is loaded. No call information accompanies.");
return;
}
// Check whether the 'calls' array has changed
ok(event.call, "undesired callschanged event");
let expected_states = ["dialing", "disconnected"];
ok(expected_states.indexOf(event.call.state) != -1,

View File

@ -356,9 +356,6 @@ public:
// resolution.
CSSToLayoutDeviceScale mDevPixelsPerCSSPixel;
// Whether or not this frame may have touch listeners.
bool mMayHaveTouchListeners;
public:
void SetIsRoot(bool aIsRoot)
{
@ -537,10 +534,23 @@ public:
mMayHaveTouchCaret = aMayHaveTouchCaret;
}
bool GetMayHaveTouchListeners() const
{
return mMayHaveTouchListeners;
}
void SetMayHaveTouchListeners(bool aMayHaveTouchListeners)
{
mMayHaveTouchListeners = aMayHaveTouchListeners;
}
private:
// New fields from now on should be made private and old fields should
// be refactored to be private.
// Whether or not this frame may have a touch listeners.
bool mMayHaveTouchListeners;
// Whether or not this frame may have a touch caret.
bool mMayHaveTouchCaret;

View File

@ -1036,7 +1036,7 @@ nsEventStatus AsyncPanZoomController::ReceiveInputEvent(const InputData& aEvent)
block->GetOverscrollHandoffChain()->CancelAnimations();
}
if (mFrameMetrics.mMayHaveTouchListeners || mFrameMetrics.GetMayHaveTouchCaret()) {
if (mFrameMetrics.GetMayHaveTouchListeners() || mFrameMetrics.GetMayHaveTouchCaret()) {
// Content may intercept the touch events and prevent-default them. So we schedule
// a timeout to give content time to do that.
ScheduleContentResponseTimeout();
@ -2676,7 +2676,7 @@ void AsyncPanZoomController::NotifyLayersUpdated(const FrameMetrics& aLayerMetri
mLastContentPaintMetrics = aLayerMetrics;
UpdateTransformScale();
mFrameMetrics.mMayHaveTouchListeners = aLayerMetrics.mMayHaveTouchListeners;
mFrameMetrics.SetMayHaveTouchListeners(aLayerMetrics.GetMayHaveTouchListeners());
mFrameMetrics.SetMayHaveTouchCaret(aLayerMetrics.GetMayHaveTouchCaret());
mFrameMetrics.SetScrollParentId(aLayerMetrics.GetScrollParentId());
APZC_LOG_FM(aLayerMetrics, "%p got a NotifyLayersUpdated with aIsFirstPaint=%d", this, aIsFirstPaint);

View File

@ -214,7 +214,7 @@ protected:
void SetMayHaveTouchListeners()
{
apzc->GetFrameMetrics().mMayHaveTouchListeners = true;
apzc->GetFrameMetrics().SetMayHaveTouchListeners(true);
}
void MakeApzcZoomable()
@ -2176,7 +2176,7 @@ TEST_F(APZOverscrollHandoffTester, DeferredInputEventProcessing) {
// Enable touch-listeners so that we can separate the queueing of input
// events from them being processed.
childApzc->GetFrameMetrics().mMayHaveTouchListeners = true;
childApzc->GetFrameMetrics().SetMayHaveTouchListeners(true);
// Queue input events for a pan.
int time = 0;
@ -2203,7 +2203,7 @@ TEST_F(APZOverscrollHandoffTester, LayerStructureChangesWhileEventsArePending) {
// Enable touch-listeners so that we can separate the queueing of input
// events from them being processed.
childApzc->GetFrameMetrics().mMayHaveTouchListeners = true;
childApzc->GetFrameMetrics().SetMayHaveTouchListeners(true);
// Queue input events for a pan.
int time = 0;
@ -2213,7 +2213,7 @@ TEST_F(APZOverscrollHandoffTester, LayerStructureChangesWhileEventsArePending) {
// between the child and the root.
CreateOverscrollHandoffLayerTree2();
nsRefPtr<Layer> middle = layers[1];
childApzc->GetFrameMetrics().mMayHaveTouchListeners = true;
childApzc->GetFrameMetrics().SetMayHaveTouchListeners(true);
TestAsyncPanZoomController* middleApzc = ApzcOf(middle);
// Queue input events for another pan.

View File

@ -758,7 +758,7 @@ nsDisplayScrollLayer::ComputeFrameMetrics(nsIFrame* aForFrame,
if (document) {
nsCOMPtr<nsPIDOMWindow> innerWin(document->GetInnerWindow());
if (innerWin) {
metrics.mMayHaveTouchListeners = innerWin->HasTouchEventListeners();
metrics.SetMayHaveTouchListeners(innerWin->HasTouchEventListeners());
}
}
metrics.SetMayHaveTouchCaret(presShell->MayHaveTouchCaret());

View File

@ -37,7 +37,7 @@ function TouchEventHandler (window) {
let TouchEventHandler = {
enabled: false,
events: ['mousedown', 'mousemove', 'mouseup', 'touchstart', 'touchend'],
events: ['mousedown', 'mousemove', 'mouseup'],
start: function teh_start() {
if (this.enabled)
return false;
@ -61,43 +61,18 @@ function TouchEventHandler (window) {
}).bind(this));
},
handleEvent: function teh_handleEvent(evt) {
// The gaia system window use an hybrid system even on the device which is
// a mix of mouse/touch events. So let's not cancel *all* mouse events
// if it is the current target.
let content = this.getContent(evt.target);
let isSystemWindow = content.location.toString().indexOf("system.gaiamobile.org") != -1;
// App touchstart & touchend should also be dispatched on the system app
// to match on-device behavior.
if (evt.type.startsWith('touch') && !isSystemWindow) {
let sysFrame = content.realFrameElement;
let sysDocument = sysFrame.ownerDocument;
let sysWindow = sysDocument.defaultView;
let touchEvent = sysDocument.createEvent('touchevent');
let touch = evt.touches[0] || evt.changedTouches[0];
let point = sysDocument.createTouch(sysWindow, sysFrame, 0,
touch.pageX, touch.pageY,
touch.screenX, touch.screenY,
touch.clientX, touch.clientY,
1, 1, 0, 0);
let touches = sysDocument.createTouchList(point);
let targetTouches = touches;
let changedTouches = touches;
touchEvent.initTouchEvent(evt.type, true, true, sysWindow, 0,
false, false, false, false,
touches, targetTouches, changedTouches);
sysFrame.dispatchEvent(touchEvent);
return;
}
// Ignore all but real mouse event coming from physical mouse
// (especially ignore mouse event being dispatched from a touch event)
if (evt.button || evt.mozInputSource != Ci.nsIDOMMouseEvent.MOZ_SOURCE_MOUSE || evt.isSynthesized) {
return;
}
// The gaia system window use an hybrid system even on the device which is
// a mix of mouse/touch events. So let's not cancel *all* mouse events
// if it is the current target.
let content = this.getContent(evt.target);
let isSystemWindow = content.location.toString().indexOf("system.gaiamobile.org") != -1;
let eventTarget = this.target;
let type = '';
switch (evt.type) {