author | Wes Kocher <wkocher@mozilla.com> |
Mon, 27 Oct 2014 14:49:05 -0700 | |
changeset 212471 | d0cd2665184a9e9c6e58f7f94c5a8e14e20e5c6f |
parent 212450 | da125623d9cb2840648ecdbe8af26cb634a25123 (current diff) |
parent 212470 | c0e72ece890147c291882aa411044a9343fd58a5 (diff) |
child 212480 | 2c94c22f3a2961917b27bf8f3830769fafab52ed |
push id | 27713 |
push user | kwierso@gmail.com |
push date | Mon, 27 Oct 2014 21:49:10 +0000 |
treeherder | mozilla-central@d0cd2665184a [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | merge |
milestone | 36.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -10,17 +10,17 @@ <!--original fetch url was git://codeaurora.org/--> <remote fetch="https://git.mozilla.org/external/caf" name="caf"/> <!--original fetch url was https://git.mozilla.org/releases--> <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/> <!-- B2G specific things. --> <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="0888735b2c5932624808147b85a60d698d9d7352"/> + <project name="gaia" path="gaia" remote="mozillaorg" revision="f98b53d7c8c0f827dc580b687244c50c844bee4b"/> <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"/> <project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/> <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="be8b952fde51d8c83748b41ce232f02b2218451d"/>
--- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -14,17 +14,17 @@ <!--original fetch url was git://github.com/apitrace/--> <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/> <default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/> <!-- Gonk specific things and forks --> <project name="platform_build" path="build" remote="b2g" revision="70eb0cb0977d6295e7da8896f9efb9f3ca1c13ea"> <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="0888735b2c5932624808147b85a60d698d9d7352"/> + <project name="gaia.git" path="gaia" remote="mozillaorg" revision="f98b53d7c8c0f827dc580b687244c50c844bee4b"/> <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="be8b952fde51d8c83748b41ce232f02b2218451d"/> <!-- Stock Android things --> <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
--- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -12,17 +12,17 @@ <!--original fetch url was https://git.mozilla.org/releases--> <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/> <!-- B2G specific things. --> <project name="platform_build" path="build" remote="b2g" revision="8986df0f82e15ac2798df0b6c2ee3435400677ac"> <copyfile dest="Makefile" src="core/root.mk"/> </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="0888735b2c5932624808147b85a60d698d9d7352"/> + <project name="gaia" path="gaia" remote="mozillaorg" revision="f98b53d7c8c0f827dc580b687244c50c844bee4b"/> <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="be8b952fde51d8c83748b41ce232f02b2218451d"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/> <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/> <!-- Stock Android things --> <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="5c45f43419d5582949284eee9cef0c43d866e03b"/> <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="3748b4168e7bd8d46457d4b6786003bc6a5223ce"/>
--- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -10,17 +10,17 @@ <!--original fetch url was git://codeaurora.org/--> <remote fetch="https://git.mozilla.org/external/caf" name="caf"/> <!--original fetch url was https://git.mozilla.org/releases--> <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/> <!-- B2G specific things. --> <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="0888735b2c5932624808147b85a60d698d9d7352"/> + <project name="gaia" path="gaia" remote="mozillaorg" revision="f98b53d7c8c0f827dc580b687244c50c844bee4b"/> <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"/> <project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/> <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="be8b952fde51d8c83748b41ce232f02b2218451d"/>
--- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -14,17 +14,17 @@ <!--original fetch url was git://github.com/apitrace/--> <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/> <default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/> <!-- Gonk specific things and forks --> <project name="platform_build" path="build" remote="b2g" revision="70eb0cb0977d6295e7da8896f9efb9f3ca1c13ea"> <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="0888735b2c5932624808147b85a60d698d9d7352"/> + <project name="gaia.git" path="gaia" remote="mozillaorg" revision="f98b53d7c8c0f827dc580b687244c50c844bee4b"/> <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="be8b952fde51d8c83748b41ce232f02b2218451d"/> <!-- Stock Android things --> <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
--- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -10,17 +10,17 @@ <!--original fetch url was git://codeaurora.org/--> <remote fetch="https://git.mozilla.org/external/caf" name="caf"/> <!--original fetch url was https://git.mozilla.org/releases--> <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/> <!-- B2G specific things. --> <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="0888735b2c5932624808147b85a60d698d9d7352"/> + <project name="gaia" path="gaia" remote="mozillaorg" revision="f98b53d7c8c0f827dc580b687244c50c844bee4b"/> <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"/> <project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/> <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="be8b952fde51d8c83748b41ce232f02b2218451d"/>
--- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -12,17 +12,17 @@ <!--original fetch url was https://git.mozilla.org/releases--> <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/> <!-- B2G specific things. --> <project name="platform_build" path="build" remote="b2g" revision="8986df0f82e15ac2798df0b6c2ee3435400677ac"> <copyfile dest="Makefile" src="core/root.mk"/> </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="0888735b2c5932624808147b85a60d698d9d7352"/> + <project name="gaia" path="gaia" remote="mozillaorg" revision="f98b53d7c8c0f827dc580b687244c50c844bee4b"/> <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="be8b952fde51d8c83748b41ce232f02b2218451d"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/> <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/> <!-- Stock Android things --> <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="e95b4ce22c825da44d14299e1190ea39a5260bde"/> <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="471afab478649078ad7c75ec6b252481a59e19b8"/>
--- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { "git_revision": "", "remote": "", "branch": "" }, - "revision": "9f4db6bcede8557cb8ac746fc977bc50bff2278b", + "revision": "d5fca04c54d8ff6751cd1265e3a0f1a669f6fdc4", "repo_path": "/integration/gaia-central" }
--- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -12,17 +12,17 @@ <!--original fetch url was git://github.com/apitrace/--> <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/> <default remote="caf" revision="b2g/ics_strawberry" sync-j="4"/> <!-- Gonk specific things and forks --> <project name="platform_build" path="build" remote="b2g" revision="70eb0cb0977d6295e7da8896f9efb9f3ca1c13ea"> <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="0888735b2c5932624808147b85a60d698d9d7352"/> + <project name="gaia.git" path="gaia" remote="mozillaorg" revision="f98b53d7c8c0f827dc580b687244c50c844bee4b"/> <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="be8b952fde51d8c83748b41ce232f02b2218451d"/> <!-- Stock Android things --> <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/> <project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>
--- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -10,17 +10,17 @@ <!--original fetch url was https://git.mozilla.org/releases--> <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/> <default remote="caf" revision="b2g/ics_strawberry" sync-j="4"/> <!-- Gonk specific things and forks --> <project name="platform_build" path="build" remote="b2g" revision="70eb0cb0977d6295e7da8896f9efb9f3ca1c13ea"> <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="0888735b2c5932624808147b85a60d698d9d7352"/> + <project name="gaia.git" path="gaia" remote="mozillaorg" revision="f98b53d7c8c0f827dc580b687244c50c844bee4b"/> <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="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/> <!-- Stock Android things --> <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/> <project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>
--- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -12,17 +12,17 @@ <!--original fetch url was https://git.mozilla.org/releases--> <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/> <!-- B2G specific things. --> <project name="platform_build" path="build" remote="b2g" revision="8986df0f82e15ac2798df0b6c2ee3435400677ac"> <copyfile dest="Makefile" src="core/root.mk"/> </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="0888735b2c5932624808147b85a60d698d9d7352"/> + <project name="gaia" path="gaia" remote="mozillaorg" revision="f98b53d7c8c0f827dc580b687244c50c844bee4b"/> <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="be8b952fde51d8c83748b41ce232f02b2218451d"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/> <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/> <!-- Stock Android things --> <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="5c45f43419d5582949284eee9cef0c43d866e03b"/> <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="3748b4168e7bd8d46457d4b6786003bc6a5223ce"/>
--- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -12,17 +12,17 @@ <!--original fetch url was git://github.com/apitrace/--> <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/> <default remote="caf" revision="ics_chocolate_rb4.2" sync-j="4"/> <!-- Gonk specific things and forks --> <project name="platform_build" path="build" remote="b2g" revision="70eb0cb0977d6295e7da8896f9efb9f3ca1c13ea"> <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="0888735b2c5932624808147b85a60d698d9d7352"/> + <project name="gaia.git" path="gaia" remote="mozillaorg" revision="f98b53d7c8c0f827dc580b687244c50c844bee4b"/> <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="be8b952fde51d8c83748b41ce232f02b2218451d"/> <project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/> <!-- Stock Android things --> <project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
--- a/dom/apps/AppsUtils.jsm +++ b/dom/apps/AppsUtils.jsm @@ -103,16 +103,17 @@ function _setAppProperties(aObj, aApp) { aObj.installerIsBrowser = !!aApp.installerIsBrowser; aObj.storeId = aApp.storeId || ""; aObj.storeVersion = aApp.storeVersion || 0; aObj.role = aApp.role || ""; aObj.redirects = aApp.redirects; aObj.widgetPages = aApp.widgetPages || []; aObj.kind = aApp.kind; aObj.enabled = aApp.enabled !== undefined ? aApp.enabled : true; + aObj.sideloaded = aApp.sideloaded; } this.AppsUtils = { // Clones a app, without the manifest. cloneAppObject: function(aApp) { let obj = {}; _setAppProperties(obj, aApp); return obj;
--- a/dom/bluetooth/BluetoothRilListener.cpp +++ b/dom/bluetooth/BluetoothRilListener.cpp @@ -110,18 +110,17 @@ MobileConnectionListener::NotifyUssdRece NS_IMETHODIMP MobileConnectionListener::NotifyDataError(const nsAString & message) { return NS_OK; } NS_IMETHODIMP -MobileConnectionListener::NotifyCFStateChanged(bool success, - uint16_t action, +MobileConnectionListener::NotifyCFStateChanged(uint16_t action, uint16_t reason, const nsAString& number, uint16_t timeSeconds, uint16_t serviceClass) { return NS_OK; }
--- a/dom/bluetooth2/BluetoothRilListener.cpp +++ b/dom/bluetooth2/BluetoothRilListener.cpp @@ -110,18 +110,17 @@ MobileConnectionListener::NotifyUssdRece NS_IMETHODIMP MobileConnectionListener::NotifyDataError(const nsAString & message) { return NS_OK; } NS_IMETHODIMP -MobileConnectionListener::NotifyCFStateChanged(bool success, - uint16_t action, +MobileConnectionListener::NotifyCFStateChanged(uint16_t action, uint16_t reason, const nsAString& number, uint16_t timeSeconds, uint16_t serviceClass) { return NS_OK; }
--- a/dom/html/test/forms/test_input_color_picker_popup.html +++ b/dom/html/test/forms/test_input_color_picker_popup.html @@ -4,16 +4,17 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=885996 --> <head> <meta charset="utf-8"> <title>Test for Bug 1234567</title> <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script> <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> + <style> label { display: block } </style> <script type="application/javascript;version=1.8"> /** Test the behaviour of the <input type='color'> when clicking on it from different ways. **/ SimpleTest.waitForExplicitFinish(); var MockColorPicker = SpecialPowers.MockColorPicker;
--- a/dom/mobileconnection/MobileConnection.cpp +++ b/dom/mobileconnection/MobileConnection.cpp @@ -1036,31 +1036,29 @@ MobileConnection::NotifyDataError(const nsRefPtr<DataErrorEvent> event = DataErrorEvent::Constructor(this, NS_LITERAL_STRING("dataerror"), init); return DispatchTrustedEvent(event); } NS_IMETHODIMP -MobileConnection::NotifyCFStateChanged(bool aSuccess, - unsigned short aAction, +MobileConnection::NotifyCFStateChanged(unsigned short aAction, unsigned short aReason, const nsAString& aNumber, unsigned short aSeconds, unsigned short aServiceClass) { if (!CheckPermission("mobileconnection")) { return NS_OK; } CFStateChangeEventInit init; init.mBubbles = false; init.mCancelable = false; - init.mSuccess = aSuccess; init.mAction = aAction; init.mReason = aReason; init.mNumber = aNumber; init.mTimeSeconds = aSeconds; init.mServiceClass = aServiceClass; nsRefPtr<CFStateChangeEvent> event = CFStateChangeEvent::Constructor(this, NS_LITERAL_STRING("cfstatechange"), init);
--- a/dom/mobileconnection/gonk/MobileConnectionService.js +++ b/dom/mobileconnection/gonk/MobileConnectionService.js @@ -660,18 +660,18 @@ MobileConnectionProvider.prototype = { this.radioState = aRadioState; this.deliverListenerEvent("notifyRadioStateChanged"); }, notifyCFStateChanged: function(aAction, aReason, aNumber, aTimeSeconds, aServiceClass) { this.deliverListenerEvent("notifyCFStateChanged", - [true, aAction, aReason, aNumber, aTimeSeconds, - aServiceClass]); + [aAction, aReason, aNumber, aTimeSeconds, + aServiceClass]); }, getSupportedNetworkTypes: function(aTypes) { aTypes.value = this.supportedNetworkTypes.slice(); return aTypes.value.length; }, getNetworks: function(aCallback) {
--- a/dom/mobileconnection/interfaces/nsIMobileConnectionService.idl +++ b/dom/mobileconnection/interfaces/nsIMobileConnectionService.idl @@ -7,17 +7,17 @@ interface nsICellInfoListCallback; interface nsIMobileCallForwardingOptions; interface nsIMobileConnection; interface nsIMobileConnectionInfo; interface nsIMobileNetworkInfo; interface nsINeighboringCellIdsCallback; interface nsIVariant; -[scriptable, uuid(823d935e-8262-47ed-8429-8203096b2ff4)] +[scriptable, uuid(c00abd30-5b2e-11e4-8ed6-0800200c9a66)] interface nsIMobileConnectionListener : nsISupports { /** * Notify when voice info is changed. */ void notifyVoiceChanged(); /** @@ -42,31 +42,28 @@ interface nsIMobileConnectionListener : * @param message * Error message from RIL. */ void notifyDataError(in DOMString message); /** * Notify when call forwarding state is changed. * - * @param success - * Indicates whether the set call forwarding request is success. * @param action * One of the nsIMobileConnection.CALL_FORWARD_ACTION_* values. * @param reason * One of the nsIMobileConnection.CALL_FORWARD_REASON_* values. * @param number * Phone number of forwarding address. * @param timeSeconds * The time in seconds should wait before call is forwarded. * @param serviceClass * One of the nsIMobileConnection.ICC_SERVICE_CLASS_* values. */ - void notifyCFStateChanged(in boolean success, - in unsigned short action, + void notifyCFStateChanged(in unsigned short action, in unsigned short reason, in DOMString number, in unsigned short timeSeconds, in unsigned short serviceClass); /** * Notify when emergency callback mode is changed. *
--- a/dom/mobileconnection/ipc/MobileConnectionChild.cpp +++ b/dom/mobileconnection/ipc/MobileConnectionChild.cpp @@ -434,26 +434,25 @@ MobileConnectionChild::RecvNotifyDataErr for (int32_t i = 0; i < mListeners.Count(); i++) { mListeners[i]->NotifyDataError(aMessage); } return true; } bool -MobileConnectionChild::RecvNotifyCFStateChanged(const bool& aSuccess, - const uint16_t& aAction, +MobileConnectionChild::RecvNotifyCFStateChanged(const uint16_t& aAction, const uint16_t& aReason, const nsString& aNumber, const uint16_t& aTimeSeconds, const uint16_t& aServiceClass) { for (int32_t i = 0; i < mListeners.Count(); i++) { - mListeners[i]->NotifyCFStateChanged(aSuccess, aAction, aReason, aNumber, - aTimeSeconds, aServiceClass); + mListeners[i]->NotifyCFStateChanged(aAction, aReason, aNumber, aTimeSeconds, + aServiceClass); } return true; } bool MobileConnectionChild::RecvNotifyEmergencyCbModeChanged(const bool& aActive, const uint32_t& aTimeoutMs)
--- a/dom/mobileconnection/ipc/MobileConnectionChild.h +++ b/dom/mobileconnection/ipc/MobileConnectionChild.h @@ -72,19 +72,19 @@ protected: virtual bool RecvNotifyUssdReceived(const nsString& aMessage, const bool& aSessionEnd) MOZ_OVERRIDE; virtual bool RecvNotifyDataError(const nsString& aMessage) MOZ_OVERRIDE; virtual bool - RecvNotifyCFStateChanged(const bool& aSuccess, const uint16_t& aAction, - const uint16_t& aReason, const nsString& aNumber, - const uint16_t& aTimeSeconds, const uint16_t& aServiceClass) MOZ_OVERRIDE; + RecvNotifyCFStateChanged(const uint16_t& aAction, const uint16_t& aReason, + const nsString& aNumber, const uint16_t& aTimeSeconds, + const uint16_t& aServiceClass) MOZ_OVERRIDE; virtual bool RecvNotifyEmergencyCbModeChanged(const bool& aActive, const uint32_t& aTimeoutMs) MOZ_OVERRIDE; virtual bool RecvNotifyOtaStatusChanged(const nsString& aStatus) MOZ_OVERRIDE;
--- a/dom/mobileconnection/ipc/MobileConnectionParent.cpp +++ b/dom/mobileconnection/ipc/MobileConnectionParent.cpp @@ -207,28 +207,26 @@ NS_IMETHODIMP MobileConnectionParent::NotifyDataError(const nsAString& aMessage) { NS_ENSURE_TRUE(mLive, NS_ERROR_FAILURE); return SendNotifyDataError(nsAutoString(aMessage)) ? NS_OK : NS_ERROR_FAILURE; } NS_IMETHODIMP -MobileConnectionParent::NotifyCFStateChanged(bool aSuccess, - uint16_t aAction, +MobileConnectionParent::NotifyCFStateChanged(uint16_t aAction, uint16_t aReason, const nsAString &aNumber, uint16_t aTimeSeconds, uint16_t aServiceClass) { NS_ENSURE_TRUE(mLive, NS_ERROR_FAILURE); - return SendNotifyCFStateChanged(aSuccess, aAction, aReason, - nsAutoString(aNumber), aTimeSeconds, - aServiceClass) ? NS_OK : NS_ERROR_FAILURE; + return SendNotifyCFStateChanged(aAction, aReason, nsAutoString(aNumber), + aTimeSeconds, aServiceClass) ? NS_OK : NS_ERROR_FAILURE; } NS_IMETHODIMP MobileConnectionParent::NotifyEmergencyCbModeChanged(bool aActive, uint32_t aTimeoutMs) { NS_ENSURE_TRUE(mLive, NS_ERROR_FAILURE);
--- a/dom/mobileconnection/ipc/PMobileConnection.ipdl +++ b/dom/mobileconnection/ipc/PMobileConnection.ipdl @@ -17,19 +17,18 @@ sync protocol PMobileConnection manager PContent; manages PMobileConnectionRequest; child: NotifyVoiceInfoChanged(nsMobileConnectionInfo aInfo); NotifyDataInfoChanged(nsMobileConnectionInfo aInfo); NotifyUssdReceived(nsString aMessage, bool aSessionEnd); NotifyDataError(nsString aMessage); - NotifyCFStateChanged(bool aSuccess, uint16_t aAction, uint16_t aReason, - nsString aNumber, uint16_t aTimeSeconds, - uint16_t aServiceClass); + NotifyCFStateChanged(uint16_t aAction, uint16_t aReason, nsString aNumber, + uint16_t aTimeSeconds, uint16_t aServiceClass); NotifyEmergencyCbModeChanged(bool aActive, uint32_t aTimeoutMs); NotifyOtaStatusChanged(nsString aStatus); NotifyIccChanged(nsString aIccId); NotifyRadioStateChanged(int32_t aRadioState); NotifyClirModeChanged(uint32_t aMode); NotifyLastNetworkChanged(nsString aNetwork); NotifyLastHomeNetworkChanged(nsString aNetwork); NotifyNetworkSelectionModeChanged(int32_t aMode);
--- a/dom/mobileconnection/tests/marionette/test_mobile_call_forwarding.js +++ b/dom/mobileconnection/tests/marionette/test_mobile_call_forwarding.js @@ -24,17 +24,16 @@ const TEST_DATA = [ function testSetCallForwardingOption(aOptions) { log("Test setting call forwarding to " + JSON.stringify(aOptions)); let promises = []; // Check cfstatechange event. promises.push(waitForManagerEvent("cfstatechange").then(function(aEvent) { - is(aEvent.success, true, "check success"); is(aEvent.action, aOptions.action, "check action"); is(aEvent.reason, aOptions.reason, "check reason"); is(aEvent.number, aOptions.number, "check number"); is(aEvent.timeSeconds, aOptions.timeSeconds, "check timeSeconds"); is(aEvent.serviceClass, aOptions.serviceClass, "check serviceClass"); })); // Check DOMRequest's result. promises.push(setCallForwardingOption(aOptions).then(null, (aError) => {
--- a/dom/mobileconnection/tests/marionette/test_mobile_mmi_call_forwarding.js +++ b/dom/mobileconnection/tests/marionette/test_mobile_mmi_call_forwarding.js @@ -55,17 +55,16 @@ function testSetCallForwarding(aData) { let MMI_CODE = "**" + CF_REASON_TO_MMI[aData.reason] + "*" + aData.number + "*" + SERVICE_CLASS_TO_MMI[aData.serviceClass] + "*" + aData.timeSeconds + "#"; log("Test " + MMI_CODE); let promises = []; // Check cfstatechange event. promises.push(waitForManagerEvent("cfstatechange").then(function(aEvent) { - is(aEvent.success, true, "check success"); is(aEvent.action, MozMobileConnection.CALL_FORWARD_ACTION_REGISTRATION, "check action"); is(aEvent.reason, aData.reason, "check reason"); is(aEvent.number, aData.number, "check number"); is(aEvent.timeSeconds, aData.timeSeconds, "check timeSeconds"); is(aEvent.serviceClass, aData.serviceClass, "check serviceClass"); })); // Check DOMRequest's result.
--- a/dom/telephony/test/marionette/test_mmi_call_forwarding.js +++ b/dom/telephony/test/marionette/test_mmi_call_forwarding.js @@ -100,17 +100,16 @@ function testSetCallForwarding(aData) { let MMI_CODE = "**" + CF_REASON_TO_MMI[aData.reason] + "*" + aData.number + "*" + SERVICE_CLASS_TO_MMI[aData.serviceClass] + "*" + aData.timeSeconds + "#"; log("Test " + MMI_CODE); let promises = []; // Check cfstatechange event. promises.push(waitForManagerEvent("cfstatechange").then(function(aEvent) { - is(aEvent.success, true, "check success"); is(aEvent.action, MozMobileConnection.CALL_FORWARD_ACTION_REGISTRATION, "check action"); is(aEvent.reason, aData.reason, "check reason"); is(aEvent.number, aData.number, "check number"); is(aEvent.timeSeconds, aData.timeSeconds, "check timeSeconds"); is(aEvent.serviceClass, aData.serviceClass, "check serviceClass"); })); // Check DOMRequest's result.
--- a/dom/webidl/CFStateChangeEvent.webidl +++ b/dom/webidl/CFStateChangeEvent.webidl @@ -4,21 +4,16 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ [Pref="dom.mobileconnection.enabled", Constructor(DOMString type, optional CFStateChangeEventInit eventInitDict)] interface CFStateChangeEvent : Event { /** - * Indicates about errors while setting up the Call forwarding rule. - */ - readonly attribute boolean success; - - /** * Indicates what to do with the rule. * * One of the CALL_FORWARD_ACTION_* constants. It will be either disable (0), * enable (1), query status (2), registration (3), or erasure (4). * * @see 3GPP MozMobileConnection.CALL_FORWARD_ACTION_* values. * @see 3GPP TS 27.007 7.11 "mode". */ @@ -51,15 +46,14 @@ interface CFStateChangeEvent : Event * Service for which the call forward is set up. It should be one of the * MozMobileConnection.ICC_SERVICE_CLASS_* values. */ readonly attribute unsigned short serviceClass; }; dictionary CFStateChangeEventInit : EventInit { - boolean success = false; unsigned short action = 0; unsigned short reason = 0; DOMString number = ""; unsigned short timeSeconds = 0; unsigned short serviceClass = 0; };
--- a/dom/wifi/WifiWorker.js +++ b/dom/wifi/WifiWorker.js @@ -1210,16 +1210,22 @@ var WifiManager = (function() { var done = 0; for (var n = 0; n < networkConfigurationFields.length; ++n) { let fieldName = networkConfigurationFields[n].name; let fieldType = networkConfigurationFields[n].type; wifiCommand.getNetworkVariable(netId, fieldName, function(value) { if (value !== null) { if (fieldType === "integer") { config[fieldName] = parseInt(value, 10); + } else if ( fieldName == "ssid" && value[0] != '"' ) { + // SET_NETWORK will set a quoted ssid to wpa_supplicant. + // But if ssid contains non-ascii char, it will be converted into utf-8. + // For example: "Test的wifi" --> 54657374e79a8477696669 + // When GET_NETWORK receive a un-quoted utf-8 ssid, it must be decoded and quoted. + config[fieldName] = quote(decodeURIComponent(value.replace(/[0-9a-f]{2}/g, '%$&'))); } else { // value is string type by default. config[fieldName] = value; } } if (++done == networkConfigurationFields.length) callback(config); });
--- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -1735,17 +1735,17 @@ pref("intl.hyphenation-alias.nb-*", "nb" pref("intl.hyphenation-alias.nn-*", "nn"); pref("font.mathfont-family", "Latin Modern Math, XITS Math, STIX Math, Cambria Math, Asana Math, TeX Gyre Bonum Math, TeX Gyre Pagella Math, TeX Gyre Termes Math, Neo Euler, Lucida Bright Math, MathJax_Main, STIXNonUnicode, STIXSizeOneSym, STIXGeneral, Standard Symbols L, DejaVu Sans"); // Some CJK fonts have bad underline offset, their CJK character glyphs are overlapped (or adjoined) to its underline. // These fonts are ignored the underline offset, instead of it, the underline is lowered to bottom of its em descent. pref("font.blacklist.underline_offset", "FangSong,Gulim,GulimChe,MingLiU,MingLiU-ExtB,MingLiU_HKSCS,MingLiU-HKSCS-ExtB,MS Gothic,MS Mincho,MS PGothic,MS PMincho,MS UI Gothic,PMingLiU,PMingLiU-ExtB,SimHei,SimSun,SimSun-ExtB,Hei,Kai,Apple LiGothic,Apple LiSung,Osaka"); -#ifdef MOZ_WIDGET_GONK +#ifdef MOZ_B2G // Whitelist of fonts that ship with B2G that do not include space lookups in // default features. This allows us to skip analyzing the GSUB/GPOS tables // unless features are explicitly enabled. // Use NSPR_LOG_MODULES=fontinit:5 to dump out details of space lookups pref("font.whitelist.skip_default_features_space_check", "Fira Sans,Fira Mono"); #endif pref("images.dither", "auto"); @@ -3293,178 +3293,16 @@ pref("print.print_reversed", false); pref("print.print_color", true); pref("print.print_landscape", false); pref("print.print_paper_size", 0); // print_extra_margin enables platforms to specify an extra gap or margin // around the content of the page for Print Preview only pref("print.print_extra_margin", 0); // twips -# ANDROID -#endif - -#if defined(ANDROID) || defined(FXOS_SIMULATOR) -// font names - -pref("font.alias-list", "sans,sans-serif,serif,monospace"); - -// Gonk (along with FxOS Simulator) and Android ship different sets of fonts -#if defined(MOZ_WIDGET_GONK) || defined(FXOS_SIMULATOR) - -// TODO: some entries could probably be cleaned up. - -// ar - -pref("font.name.serif.el", "Droid Serif"); // not Charis SIL Compact, only has a few Greek chars -pref("font.name.sans-serif.el", "Roboto"); // To be updated once the Greek letters in Fira are revised -pref("font.name.monospace.el", "Droid Sans Mono"); - -pref("font.name.serif.he", "Charis SIL Compact"); -pref("font.name.sans-serif.he", "Fira Sans"); -pref("font.name.monospace.he", "Fira Mono"); -pref("font.name-list.sans-serif.he", "Droid Sans Hebrew, Fira Sans"); - -pref("font.name.serif.ja", "Charis SIL Compact"); -pref("font.name.sans-serif.ja", "Fira Sans"); -pref("font.name.monospace.ja", "MotoyaLMaru"); -pref("font.name-list.sans-serif.ja", "Fira Sans, MotoyaLMaru, MotoyaLCedar, Droid Sans Japanese"); -pref("font.name-list.monospace.ja", "MotoyaLMaru, MotoyaLCedar, Fira Mono"); - -pref("font.name.serif.ko", "Charis SIL Compact"); -pref("font.name.sans-serif.ko", "Fira Sans"); -pref("font.name.monospace.ko", "Fira Mono"); - -pref("font.name.serif.th", "Charis SIL Compact"); -pref("font.name.sans-serif.th", "Fira Sans"); -pref("font.name.monospace.th", "Fira Mono"); -pref("font.name-list.sans-serif.th", "Fira Sans, Noto Sans Thai, Droid Sans Thai"); - -pref("font.name.serif.x-cyrillic", "Charis SIL Compact"); -pref("font.name.sans-serif.x-cyrillic", "Fira Sans"); -pref("font.name.monospace.x-cyrillic", "Fira Mono"); - -pref("font.name.serif.x-unicode", "Charis SIL Compact"); -pref("font.name.sans-serif.x-unicode", "Fira Sans"); -pref("font.name.monospace.x-unicode", "Fira Mono"); - -pref("font.name.serif.x-western", "Charis SIL Compact"); -pref("font.name.sans-serif.x-western", "Fira Sans"); -pref("font.name.monospace.x-western", "Fira Mono"); - -pref("font.name.serif.zh-CN", "Charis SIL Compact"); -pref("font.name.sans-serif.zh-CN", "Fira Sans"); -pref("font.name.monospace.zh-CN", "Fira Mono"); - -pref("font.name.serif.zh-HK", "Charis SIL Compact"); -pref("font.name.sans-serif.zh-HK", "Fira Sans"); -pref("font.name.monospace.zh-HK", "Fira Mono"); - -pref("font.name.serif.zh-TW", "Charis SIL Compact"); -pref("font.name.sans-serif.zh-TW", "Fira Sans"); -pref("font.name.monospace.zh-TW", "Fira Mono"); - -#else - -// not MOZ_WIDGET_GONK / FXOS_SIMULATOR -// (i.e. this is Firefox for Android) - here, we use the bundled fonts - -// ar - -pref("font.name.serif.el", "Droid Serif"); // not Charis SIL Compact, only has a few Greek chars -pref("font.name.sans-serif.el", "Clear Sans"); -pref("font.name.monospace.el", "Droid Sans Mono"); -pref("font.name-list.sans-serif.el", "Clear Sans, Roboto, Droid Sans"); - -pref("font.name.serif.he", "Droid Serif"); -pref("font.name.sans-serif.he", "Clear Sans"); -pref("font.name.monospace.he", "Droid Sans Mono"); -pref("font.name-list.sans-serif.he", "Droid Sans Hebrew, Clear Sans, Droid Sans"); - -pref("font.name.serif.ja", "Charis SIL Compact"); -pref("font.name.sans-serif.ja", "Clear Sans"); -pref("font.name.monospace.ja", "MotoyaLMaru"); -pref("font.name-list.serif.ja", "Droid Serif"); -pref("font.name-list.sans-serif.ja", "Clear Sans, Roboto, Droid Sans, MotoyaLMaru, MotoyaLCedar, Droid Sans Japanese"); -pref("font.name-list.monospace.ja", "MotoyaLMaru, MotoyaLCedar, Droid Sans Mono"); - -pref("font.name.serif.ko", "Charis SIL Compact"); -pref("font.name.sans-serif.ko", "Clear Sans"); -pref("font.name.monospace.ko", "Droid Sans Mono"); -pref("font.name-list.serif.ko", "Droid Serif, HYSerif"); -pref("font.name-list.sans-serif.ko", "SmartGothic, NanumGothic, DroidSansFallback, Droid Sans Fallback"); - -pref("font.name.serif.th", "Charis SIL Compact"); -pref("font.name.sans-serif.th", "Clear Sans"); -pref("font.name.monospace.th", "Droid Sans Mono"); -pref("font.name-list.serif.th", "Droid Serif"); -pref("font.name-list.sans-serif.th", "Droid Sans Thai, Clear Sans, Droid Sans"); - -pref("font.name.serif.x-cyrillic", "Charis SIL Compact"); -pref("font.name.sans-serif.x-cyrillic", "Clear Sans"); -pref("font.name.monospace.x-cyrillic", "Droid Sans Mono"); -pref("font.name-list.serif.x-cyrillic", "Droid Serif"); -pref("font.name-list.sans-serif.x-cyrillic", "Clear Sans, Roboto, Droid Sans"); - -pref("font.name.serif.x-unicode", "Charis SIL Compact"); -pref("font.name.sans-serif.x-unicode", "Clear Sans"); -pref("font.name.monospace.x-unicode", "Droid Sans Mono"); -pref("font.name-list.serif.x-unicode", "Droid Serif"); -pref("font.name-list.sans-serif.x-unicode", "Clear Sans, Roboto, Droid Sans"); - -pref("font.name.serif.x-western", "Charis SIL Compact"); -pref("font.name.sans-serif.x-western", "Clear Sans"); -pref("font.name.monospace.x-western", "Droid Sans Mono"); -pref("font.name-list.serif.x-western", "Droid Serif"); -pref("font.name-list.sans-serif.x-western", "Clear Sans, Roboto, Droid Sans"); - -pref("font.name.serif.zh-CN", "Charis SIL Compact"); -pref("font.name.sans-serif.zh-CN", "Clear Sans"); -pref("font.name.monospace.zh-CN", "Droid Sans Mono"); -pref("font.name-list.serif.zh-CN", "Droid Serif, Droid Sans Fallback"); -pref("font.name-list.sans-serif.zh-CN", "Roboto, Droid Sans, Droid Sans Fallback"); -pref("font.name-list.monospace.zh-CN", "Droid Sans Fallback"); - -pref("font.name.serif.zh-HK", "Charis SIL Compact"); -pref("font.name.sans-serif.zh-HK", "Clear Sans"); -pref("font.name.monospace.zh-HK", "Droid Sans Mono"); -pref("font.name-list.serif.zh-HK", "Droid Serif, Droid Sans Fallback"); -pref("font.name-list.sans-serif.zh-HK", "Roboto, Droid Sans, Droid Sans Fallback"); -pref("font.name-list.monospace.zh-HK", "Droid Sans Fallback"); - -pref("font.name.serif.zh-TW", "Charis SIL Compact"); -pref("font.name.sans-serif.zh-TW", "Clear Sans"); -pref("font.name.monospace.zh-TW", "Droid Sans Mono"); -pref("font.name-list.serif.zh-TW", "Droid Serif, Droid Sans Fallback"); -pref("font.name-list.sans-serif.zh-TW", "Roboto, Droid Sans, Droid Sans Fallback"); -pref("font.name-list.monospace.zh-TW", "Droid Sans Fallback"); - -// end ! (MOZ_WIDGET_GONK || FXOS_SIMULATOR) - -#endif - -pref("font.size.fixed.ar", 12); - -pref("font.default.el", "sans-serif"); -pref("font.size.fixed.el", 12); - -pref("font.size.fixed.he", 12); - -pref("font.default.x-cyrillic", "sans-serif"); -pref("font.size.fixed.x-cyrillic", 12); - -pref("font.default.x-unicode", "sans-serif"); -pref("font.size.fixed.x-unicode", 12); - -pref("font.default.x-western", "sans-serif"); -pref("font.size.fixed.x-western", 12); - -# ANDROID || FXOS_SIMUALTOR -#endif - -#ifdef ANDROID /* PostScript print module prefs */ // pref("print.postscript.enabled", true); pref("print.postscript.paper_size", "letter"); pref("print.postscript.orientation", "portrait"); pref("print.postscript.print_command", "lpr ${MOZ_PRINTER_NAME:+-P\"$MOZ_PRINTER_NAME\"}"); // Setting default_level_parent to true makes the default level for popup // windows "top" instead of "parent". On GTK2 platform, this is implemented @@ -3607,16 +3445,169 @@ pref("intl.ime.use_simple_context_on_pas pref("intl.ime.use_simple_context_on_password_field", false); #endif # XP_UNIX #endif #endif #endif +#if defined(ANDROID) || defined(MOZ_B2G) + +pref("font.alias-list", "sans,sans-serif,serif,monospace"); + +pref("font.size.fixed.ar", 12); + +pref("font.default.el", "sans-serif"); +pref("font.size.fixed.el", 12); + +pref("font.size.fixed.he", 12); + +pref("font.default.x-cyrillic", "sans-serif"); +pref("font.size.fixed.x-cyrillic", 12); + +pref("font.default.x-unicode", "sans-serif"); +pref("font.size.fixed.x-unicode", 12); + +pref("font.default.x-western", "sans-serif"); +pref("font.size.fixed.x-western", 12); + +# ANDROID || MOZ_B2G +#endif + +#if defined(MOZ_B2G) +// Gonk, FxOS Simulator and B2G Desktop. + +// TODO: some entries could probably be cleaned up. + +// ar + +pref("font.name.serif.el", "Droid Serif"); // not Charis SIL Compact, only has a few Greek chars +pref("font.name.sans-serif.el", "Roboto"); // To be updated once the Greek letters in Fira are revised +pref("font.name.monospace.el", "Droid Sans Mono"); + +pref("font.name.serif.he", "Charis SIL Compact"); +pref("font.name.sans-serif.he", "Fira Sans"); +pref("font.name.monospace.he", "Fira Mono"); +pref("font.name-list.sans-serif.he", "Droid Sans Hebrew, Fira Sans"); + +pref("font.name.serif.ja", "Charis SIL Compact"); +pref("font.name.sans-serif.ja", "Fira Sans"); +pref("font.name.monospace.ja", "MotoyaLMaru"); +pref("font.name-list.sans-serif.ja", "Fira Sans, MotoyaLMaru, MotoyaLCedar, Droid Sans Japanese"); +pref("font.name-list.monospace.ja", "MotoyaLMaru, MotoyaLCedar, Fira Mono"); + +pref("font.name.serif.ko", "Charis SIL Compact"); +pref("font.name.sans-serif.ko", "Fira Sans"); +pref("font.name.monospace.ko", "Fira Mono"); + +pref("font.name.serif.th", "Charis SIL Compact"); +pref("font.name.sans-serif.th", "Fira Sans"); +pref("font.name.monospace.th", "Fira Mono"); +pref("font.name-list.sans-serif.th", "Fira Sans, Noto Sans Thai, Droid Sans Thai"); + +pref("font.name.serif.x-cyrillic", "Charis SIL Compact"); +pref("font.name.sans-serif.x-cyrillic", "Fira Sans"); +pref("font.name.monospace.x-cyrillic", "Fira Mono"); + +pref("font.name.serif.x-unicode", "Charis SIL Compact"); +pref("font.name.sans-serif.x-unicode", "Fira Sans"); +pref("font.name.monospace.x-unicode", "Fira Mono"); + +pref("font.name.serif.x-western", "Charis SIL Compact"); +pref("font.name.sans-serif.x-western", "Fira Sans"); +pref("font.name.monospace.x-western", "Fira Mono"); + +pref("font.name.serif.zh-CN", "Charis SIL Compact"); +pref("font.name.sans-serif.zh-CN", "Fira Sans"); +pref("font.name.monospace.zh-CN", "Fira Mono"); + +pref("font.name.serif.zh-HK", "Charis SIL Compact"); +pref("font.name.sans-serif.zh-HK", "Fira Sans"); +pref("font.name.monospace.zh-HK", "Fira Mono"); + +pref("font.name.serif.zh-TW", "Charis SIL Compact"); +pref("font.name.sans-serif.zh-TW", "Fira Sans"); +pref("font.name.monospace.zh-TW", "Fira Mono"); + +#elif defined(ANDROID) +// We use the bundled fonts for Firefox for Android. + +// ar + +pref("font.name.serif.el", "Droid Serif"); // not Charis SIL Compact, only has a few Greek chars +pref("font.name.sans-serif.el", "Clear Sans"); +pref("font.name.monospace.el", "Droid Sans Mono"); +pref("font.name-list.sans-serif.el", "Clear Sans, Roboto, Droid Sans"); + +pref("font.name.serif.he", "Droid Serif"); +pref("font.name.sans-serif.he", "Clear Sans"); +pref("font.name.monospace.he", "Droid Sans Mono"); +pref("font.name-list.sans-serif.he", "Droid Sans Hebrew, Clear Sans, Droid Sans"); + +pref("font.name.serif.ja", "Charis SIL Compact"); +pref("font.name.sans-serif.ja", "Clear Sans"); +pref("font.name.monospace.ja", "MotoyaLMaru"); +pref("font.name-list.serif.ja", "Droid Serif"); +pref("font.name-list.sans-serif.ja", "Clear Sans, Roboto, Droid Sans, MotoyaLMaru, MotoyaLCedar, Droid Sans Japanese"); +pref("font.name-list.monospace.ja", "MotoyaLMaru, MotoyaLCedar, Droid Sans Mono"); + +pref("font.name.serif.ko", "Charis SIL Compact"); +pref("font.name.sans-serif.ko", "Clear Sans"); +pref("font.name.monospace.ko", "Droid Sans Mono"); +pref("font.name-list.serif.ko", "Droid Serif, HYSerif"); +pref("font.name-list.sans-serif.ko", "SmartGothic, NanumGothic, DroidSansFallback, Droid Sans Fallback"); + +pref("font.name.serif.th", "Charis SIL Compact"); +pref("font.name.sans-serif.th", "Clear Sans"); +pref("font.name.monospace.th", "Droid Sans Mono"); +pref("font.name-list.serif.th", "Droid Serif"); +pref("font.name-list.sans-serif.th", "Droid Sans Thai, Clear Sans, Droid Sans"); + +pref("font.name.serif.x-cyrillic", "Charis SIL Compact"); +pref("font.name.sans-serif.x-cyrillic", "Clear Sans"); +pref("font.name.monospace.x-cyrillic", "Droid Sans Mono"); +pref("font.name-list.serif.x-cyrillic", "Droid Serif"); +pref("font.name-list.sans-serif.x-cyrillic", "Clear Sans, Roboto, Droid Sans"); + +pref("font.name.serif.x-unicode", "Charis SIL Compact"); +pref("font.name.sans-serif.x-unicode", "Clear Sans"); +pref("font.name.monospace.x-unicode", "Droid Sans Mono"); +pref("font.name-list.serif.x-unicode", "Droid Serif"); +pref("font.name-list.sans-serif.x-unicode", "Clear Sans, Roboto, Droid Sans"); + +pref("font.name.serif.x-western", "Charis SIL Compact"); +pref("font.name.sans-serif.x-western", "Clear Sans"); +pref("font.name.monospace.x-western", "Droid Sans Mono"); +pref("font.name-list.serif.x-western", "Droid Serif"); +pref("font.name-list.sans-serif.x-western", "Clear Sans, Roboto, Droid Sans"); + +pref("font.name.serif.zh-CN", "Charis SIL Compact"); +pref("font.name.sans-serif.zh-CN", "Clear Sans"); +pref("font.name.monospace.zh-CN", "Droid Sans Mono"); +pref("font.name-list.serif.zh-CN", "Droid Serif, Droid Sans Fallback"); +pref("font.name-list.sans-serif.zh-CN", "Roboto, Droid Sans, Droid Sans Fallback"); +pref("font.name-list.monospace.zh-CN", "Droid Sans Fallback"); + +pref("font.name.serif.zh-HK", "Charis SIL Compact"); +pref("font.name.sans-serif.zh-HK", "Clear Sans"); +pref("font.name.monospace.zh-HK", "Droid Sans Mono"); +pref("font.name-list.serif.zh-HK", "Droid Serif, Droid Sans Fallback"); +pref("font.name-list.sans-serif.zh-HK", "Roboto, Droid Sans, Droid Sans Fallback"); +pref("font.name-list.monospace.zh-HK", "Droid Sans Fallback"); + +pref("font.name.serif.zh-TW", "Charis SIL Compact"); +pref("font.name.sans-serif.zh-TW", "Clear Sans"); +pref("font.name.monospace.zh-TW", "Droid Sans Mono"); +pref("font.name-list.serif.zh-TW", "Droid Serif, Droid Sans Fallback"); +pref("font.name-list.sans-serif.zh-TW", "Roboto, Droid Sans, Droid Sans Fallback"); +pref("font.name-list.monospace.zh-TW", "Droid Sans Fallback"); + +#endif + #if OS_ARCH==AIX // Override default Japanese fonts pref("font.name.serif.ja", "dt-interface system-jisx0208.1983-0"); pref("font.name.sans-serif.ja", "dt-interface system-jisx0208.1983-0"); pref("font.name.monospace.ja", "dt-interface user-jisx0208.1983-0"); // Override default Cyrillic fonts
new file mode 100644 index 0000000000000000000000000000000000000000..ab0a190de825a50c53aa157b612337a9b9f7d679 GIT binary patch literal 526 zc$^FHW@Zs#U|`^2IFdTgi7D`)iaU@O3&dOuG7On{DXA5D86~+np&^_M%pVri2ZC^E z1vdjD%L`@(1~9QX(C4JT-bx*h&=VRb&u)CYsWEV6r)HU%>P%J3m1SnX45V~UrB0qQ zKPdC~(ghD@#7v4`5-=$$X3>O*fCa}>7xPbK)MA;<#1H^?ipOLl*RZ+KhwFj7RY1%S zbV_bwUS?Wqafx1eYEoiB0oXmu*`-537|lJZz21C>6?j;`&tclQE@6K5mfxosr$;dL z9Qf-J`u?84w$E;#_jzRpD=d!Ovh!W6LH3HPF>L%dY8PuANj+o!#!2;+`MUN?rWFs( z&a#|;w7r`3X4}gZEPrnJ7R}oI=4;J|8!d7ziAi}PFLUG%9<{7X^yWF}rf_0Ukke^h ztHpJ%_yfEdndF#p1*!xC2rvTimPQZ@Ifz*yL5$`dWb-gX2HCuBAc+x9tdMZRFqD-I Pq>%{-mjdZvkO>R`jew>Y
new file mode 100644 index 0000000000000000000000000000000000000000..3dbdedb8cafbc21377cecd74db25d8bea24cdda6 GIT binary patch literal 501 zc$^FHW@Zs#U|`^2IFdTgi7D`)iaU@O3&dOuG7On{DXA5D86~+np&^_M%pVri2ZC^E z1vdjD%L`@(1~9QX(C4JT-bx*h&=VRb&u)CYsWEV6r)HU%>P%J3m1SnX45V~UrB0qQ zKPdC~(ghD@#7v4`5-=$$X3>O*fCa}>7xPbK)MA;<#1H^?N&{1X^TH1+W~Tvp^+3!I zbV_bwUS?Wqafx1eYEoiB0oXkg_QwW+Fq(Tz&l++aHsEo%cz3zLEa%<nXGM33Uk%H4 zT*MKr%DJ@Mf9{2!_CMw`G<XRo^IH@YR&uE;7{7_~ib)nMp1HMCI$XT=;Gur`l@1r5 z7oD1TPwMmC6UCFmFCKZV`rBmQU2|)-kM;*Y@LC6WGcw6B;|e<o1`uEb;w_CJ7IH|k oLP8SF)yU>y1^}{o-9Qo}I9MUUfng{s8%QG)5H1DMRv;4?03J-2=>Px#
--- a/toolkit/devtools/apps/tests/data/mochitest.ini +++ b/toolkit/devtools/apps/tests/data/mochitest.ini @@ -1,6 +1,8 @@ [DEFAULT] support-files = app-redirect.zip app-updated.zip app.zip app-certified.zip + app-overload.zip + app-system.zip
--- a/toolkit/devtools/apps/tests/debugger-protocol-helper.js +++ b/toolkit/devtools/apps/tests/debugger-protocol-helper.js @@ -140,16 +140,28 @@ addMessageListener("addFrame", function if (aMessage.src) { frame.setAttribute("src", aMessage.src); } doc.documentElement.appendChild(frame); Frames.push(frame); sendAsyncMessage("frameAdded"); }); +addMessageListener("tweak-app-object", function (aMessage) { + let appId = aMessage.appId; + Cu.import('resource://gre/modules/Webapps.jsm'); + let reg = DOMApplicationRegistry; + if ("removable" in aMessage) { + reg.webapps[appId].removable = aMessage.removable; + } + if ("sideloaded" in aMessage) { + reg.webapps[appId].sideloaded = aMessage.sideloaded; + } +}); + addMessageListener("cleanup", function () { webappActorRequest({type: "unwatchApps"}, function () { gClient.close(); }); }); let FramesMock = { list: function () {
--- a/toolkit/devtools/apps/tests/test_webapps_actor.html +++ b/toolkit/devtools/apps/tests/test_webapps_actor.html @@ -60,16 +60,17 @@ SimpleTest.waitForExplicitFinish(); var installTestApp, mm; const PACKAGED_APP_ID = "test-app-id"; const PACKAGED_APP_ORIGIN = "app://" + PACKAGED_APP_ID; const PACKAGED_APP_MANIFEST = PACKAGED_APP_ORIGIN + "/manifest.webapp"; const CERTIFIED_APP_ID = "test-certified-id"; const CERTIFIED_APP_ORIGIN = "app://" + CERTIFIED_APP_ID; const CERTIFIED_APP_MANIFEST = CERTIFIED_APP_ORIGIN + "/manifest.webapp"; +const SYSTEM_APP_ID = "test-system-id"; var steps = [ function() { info("== SETUP =="); // Set up SpecialPowers.setAllAppsLaunchable(true); SpecialPowers.addPermission("webapps-manage", true, document); SpecialPowers.addPermission("browser", true, document); @@ -91,36 +92,41 @@ var steps = [ // Because of wrapping issues, we can't use SpecialPowers.Cu.import to load // devtools jsm into mochitest scope. We end up not receiving // DebuggerClient.addListener callback arguments... let scriptUrl = SimpleTest.getTestFileURL("debugger-protocol-helper.js"); mm = SpecialPowers.loadChromeScript(scriptUrl); installTestApp = function (url, appId, callback) { let installResponse, appObject; let installedEvent = false; - mm.addMessageListener("installed", function onInstalled(aResponse) { - mm.removeMessageListener("installed", onInstalled); + function onInstalled(aResponse) { ok(true, "install request replied"); installResponse = aResponse; checkEnd(); - }); - mm.addMessageListener("installed-event", function onInstalledEvent(aResponse) { - mm.removeMessageListener("installed-event", onInstalledEvent); + } + mm.addMessageListener("installed", onInstalled); + function onInstalledEvent(aResponse) { ok(true, "received appInstall actor event"); installedEvent = true; checkEnd(); - }); + } + mm.addMessageListener("installed-event", onInstalledEvent); navigator.mozApps.mgmt.oninstall = function(evt) { appObject = evt.application; ok(true, "mozApps.mgmt install event fired"); checkEnd(); }; function checkEnd() { - if (appObject && installResponse && installedEvent) + if ( (appObject && installResponse && installedEvent) || + (installResponse && installResponse.error) ) { + mm.removeMessageListener("installed", onInstalled); + mm.removeMessageListener("installed-event", onInstalledEvent); + navigator.mozApps.mgmt.oninstall = null; callback(installResponse, appObject); + } } mm.sendAsyncMessage("install", {url: url, appId: appId}); }; SpecialPowers.autoConfirmAppInstall(next); }, function() { info("== TEST == Install packaged app"); let url = SimpleTest.getTestFileURL("data/app.zip"); @@ -174,32 +180,63 @@ var steps = [ } ok(!("error" in aResponse), "app installed without any error"); is(aApp.manifest.name, "Certified app", "app name is correct"); next(); } ); }, function() { + info("== TEST == Try overloading non-removable app"); + let url = SimpleTest.getTestFileURL("data/app-overload.zip"); + installTestApp(url, CERTIFIED_APP_ID, + function (aResponse, aApp) { + // First time we install the app, it works just fine + ok(true, "Installed"); + is(aResponse.appId, "overload.gaiamobile.org", "Got overloaded app id"); + if ("error" in aResponse) { + ok(false, "Error: " + aResponse.error); + } + if ("message" in aResponse) { + ok(false, "Error message: " + aResponse.message); + } + ok(!("error" in aResponse), "app installed without any error"); + is(aApp.manifest.name, "System app", "app name is correct"); + + // Then use some magic to make it non-removable + mm.sendAsyncMessage("tweak-app-object", {appId: CERTIFIED_APP_ID, removable: false}); + + // Then when trying to install it again, it will be rejected + installTestApp(url, CERTIFIED_APP_ID, + function (aResponse, aApp) { + is(aResponse.error, "installationFailed", "Overloading non-removable app without the pref is rejected"); + is(aResponse.message, "The application " + CERTIFIED_APP_ID + " can't be overridden."); + next(); + }); + + } + ); + }, + function() { info("== TEST == Get all apps"); - getAll(false); + getAll(true); }, function() { info("== TEST == Get packaged app"); getApp({ id: PACKAGED_APP_ID, manifestURL: PACKAGED_APP_MANIFEST }, true); }, function() { info("== TEST == Get certified app"); getApp({ id: CERTIFIED_APP_ID, manifestURL: CERTIFIED_APP_MANIFEST - }, false); + }, true); }, function() { info("== SETUP == Enable certified app access"); SpecialPowers.pushPrefEnv({ "set": [["devtools.debugger.forbid-certified-apps", false]] }, next); }, function() { @@ -216,16 +253,35 @@ var steps = [ function() { info("== TEST == Get certified app (CERTIFIED ENABLED)"); getApp({ id: CERTIFIED_APP_ID, manifestURL: CERTIFIED_APP_MANIFEST }, true); }, function() { + info("== TEST == Overload of non-removable apps is allowed with CERTIFIED ENABLE"); + let url = SimpleTest.getTestFileURL("data/app-overload.zip"); + installTestApp(url, SYSTEM_APP_ID, + function (aResponse, aApp) { + ok(true, "Installed"); + is(aResponse.appId, "overload.gaiamobile.org", "Got overloaded app id"); + if ("error" in aResponse) { + ok(false, "Error: " + aResponse.error); + } + if ("message" in aResponse) { + ok(false, "Error message: " + aResponse.message); + } + ok(!("error" in aResponse), "app installed without any error"); + is(aApp.manifest.name, "System app", "app name is correct"); + next(); + } + ); + }, + function() { info("== SETUP == Disable certified app access"); SpecialPowers.popPrefEnv(next); }, function() { info("== TEST == Get packaged app actor"); addFrame( { mozapp: PACKAGED_APP_MANIFEST, remote: true }, function () { @@ -240,17 +296,29 @@ var steps = [ }, function() { info("== TEST == Uninstall packaged app"); uninstall(PACKAGED_APP_MANIFEST); }, function() { info("== TEST == Uninstall certified app"); - uninstall(CERTIFIED_APP_MANIFEST); + // Make the app removable again, but make it appear as a regular app (not being pushed via devtools) + mm.sendAsyncMessage("tweak-app-object", {appId: CERTIFIED_APP_ID, removable: true, sideloaded: false}); + + mm.addMessageListener("appActorResponse", function onResponse(response) { + mm.removeMessageListener("appActorResponse", onResponse); + is(response.error, "forbidden", "Uninstalling apps that have not being sideloaded is forbidden"); + next(); + }); + + mm.sendAsyncMessage("appActorRequest", { + type: "uninstall", + manifestURL: CERTIFIED_APP_MANIFEST + }); }, function() { ok(true, "all done!\n"); mm.sendAsyncMessage("cleanup"); SpecialPowers.flushPrefEnv(finish); } ];
--- a/toolkit/devtools/apps/tests/unit/test_webappsActor.js +++ b/toolkit/devtools/apps/tests/unit/test_webappsActor.js @@ -265,13 +265,29 @@ add_test(function testCheckHostedApp() { run_next_test(); return; } } do_throw("Unable to find the test app by its id"); }); }); +add_test(function testInstallOverrideSystem() { + let appId = "actor-test"; // Match app.zip id + + // Make the test app non-removable, like system apps + DOMApplicationRegistry.webapps[appId].removable = false; + + let packageFile = do_get_file("data/app.zip"); + gActorFront.installPackaged(packageFile.path, appId) + .then(function ({ appId }) { + do_throw("Override of a non-removable app has been accepted."); + }, function (e) { + do_check_eq(e.message, "The application " + appId + " can't be overridden."); + run_next_test(); + }); +}); + function run_test() { setup(); run_next_test(); }
--- a/toolkit/devtools/server/actors/webapps.js +++ b/toolkit/devtools/server/actors/webapps.js @@ -239,28 +239,34 @@ WebappsActor.prototype = { this.conn = null; }, _registerApp: function wa_actorRegisterApp(aDeferred, aApp, aId, aDir) { debug("registerApp"); let reg = DOMApplicationRegistry; let self = this; + if (aId in reg.webapps && !reg.webapps[aId].sideloaded && + !this._isUnrestrictedAccessAllowed()) { + throw new Error("Replacing non-sideloaded apps is not permitted."); + } + // Clean up the deprecated manifest cache if needed. if (aId in reg._manifestCache) { delete reg._manifestCache[aId]; } aApp.installTime = Date.now(); aApp.installState = "installed"; aApp.removable = true; aApp.id = aId; aApp.basePath = reg.getWebAppsBasePath(); aApp.localId = (aId in reg.webapps) ? reg.webapps[aId].localId : reg._nextLocalId(); + aApp.sideloaded = true; reg.webapps[aId] = aApp; reg.updatePermissionsForApp(aId); reg._readManifests([{ id: aId }]).then((aResult) => { let manifest = aResult[0].manifest; aApp.name = manifest.name; aApp.csp = manifest.csp || ""; @@ -378,71 +384,69 @@ WebappsActor.prototype = { function readManifest() { if (aManifest) { return promise.resolve(aManifest); } else { let manFile = OS.Path.join(aDir.path, "manifest.webapp"); return AppsUtils.loadJSONAsync(manFile); } } - function checkSideloading(aManifest) { - return self._getAppType(aManifest.type); - } - function writeManifest(aAppType) { + function writeManifest(resolution) { // Move manifest.webapp to the destination directory. // The destination directory for this app. let installDir = DOMApplicationRegistry._getAppDir(aId); if (aManifest) { let manFile = OS.Path.join(installDir.path, "manifest.webapp"); return DOMApplicationRegistry._writeFile(manFile, JSON.stringify(aManifest)).then(() => { - return aAppType; + return resolution; }); } else { let manFile = aDir.clone(); manFile.append("manifest.webapp"); manFile.moveTo(installDir, "manifest.webapp"); } - return null; + return promise.resolve(resolution); } function readMetadata(aAppType) { if (aMetadata) { return { metadata: aMetadata, appType: aAppType }; } // Read the origin and manifest url from metadata.json let metaFile = OS.Path.join(aDir.path, "metadata.json"); return AppsUtils.loadJSONAsync(metaFile).then((aMetadata) => { if (!aMetadata) { throw("Error parsing metadata.json."); } if (!aMetadata.origin) { - throw("Missing 'origin' property in metadata.json"); + throw("Missing 'origin' property in metadata.json."); } return { metadata: aMetadata, appType: aAppType }; }); } let runnable = { run: function run() { try { + let metadata, appType; readManifest(). - then(writeManifest). - then(checkSideloading). then(readMetadata). then(function ({ metadata, appType }) { let origin = metadata.origin; let manifestURL = metadata.manifestURL || origin + "/manifest.webapp"; // Create a fake app object with the minimum set of properties we need. let app = { origin: origin, installOrigin: metadata.installOrigin || origin, manifestURL: manifestURL, appStatus: appType, receipts: aReceipts, }; + return writeManifest(app); + }).then(function (app) { self._registerApp(deferred, app, aId, aDir); }, function (error) { self._sendError(deferred, error, aId); }); } catch(e) { // If anything goes wrong, just send it back. self._sendError(deferred, e.toString(), aId); } @@ -478,16 +482,17 @@ WebappsActor.prototype = { NetUtil.readInputStreamToString(istream, istream.available()) ); let manifest; try { manifest = JSON.parse(jsonString); } catch(e) { self._sendError(deferred, "Error Parsing manifest.webapp: " + e, aId); + return; } let appType = self._getAppType(manifest.type); // Privileged and certified packaged apps can setup a custom origin // via `origin` manifest property let id = aId; if (appType >= Ci.nsIPrincipal.APP_STATUS_PRIVILEGED && @@ -500,16 +505,24 @@ WebappsActor.prototype = { } if (uri.scheme != "app") { self._sendError(deferred, "Invalid origin in webapp's manifest", aId); } id = uri.prePath.substring(6); } + // Prevent overriding preinstalled apps + if (id in DOMApplicationRegistry.webapps && + DOMApplicationRegistry.webapps[id].removable === false && + !self._isUnrestrictedAccessAllowed()) { + self._sendError(deferred, "The application " + id + " can't be overridden."); + return; + } + // Only after security checks are made and after final app id is computed // we can move application.zip to the destination directory, and // extract manifest.webapp there. let installDir = DOMApplicationRegistry._getAppDir(id); let manFile = installDir.clone(); manFile.append("manifest.webapp"); zipReader.extract("manifest.webapp", manFile); zipReader.close(); @@ -581,19 +594,19 @@ WebappsActor.prototype = { let appId = aRequest.appId; let reg = DOMApplicationRegistry; if (!appId) { appId = reg.makeAppId(); } // Check that we are not overriding a preinstalled application. if (appId in reg.webapps && reg.webapps[appId].removable === false) { - return { error: "badParameterType", - message: "The application " + appId + " can't be overriden." - } + return { error: "installationFailed", + message: "The application " + appId + " can't be overridden." + }; } let appDir = FileUtils.getDir("TmpD", ["b2g", appId], false, false); if (aRequest.upload) { // Ensure creating the directory (recursively) appDir = FileUtils.getDir("TmpD", ["b2g", appId], true, false); let actor = this.conn.getActor(aRequest.upload); @@ -675,57 +688,59 @@ WebappsActor.prototype = { } let reg = DOMApplicationRegistry; let app = reg.getAppByManifestURL(manifestURL); if (!app) { return { error: "appNotFound" }; } - return this._isAppAllowedForURL(app.manifestURL).then(allowed => { - if (!allowed) { - return { error: "forbidden" }; - } - return reg.getManifestFor(manifestURL).then(function (manifest) { - app.manifest = manifest; - return { app: app }; - }); + if (!this._isAppAllowedForURL(app.manifestURL)) { + return { error: "forbidden" }; + } + + return reg.getManifestFor(manifestURL).then(function (manifest) { + app.manifest = manifest; + return { app: app }; }); }, - _areCertifiedAppsAllowed: function wa__areCertifiedAppsAllowed() { + _isUnrestrictedAccessAllowed: function() { let pref = "devtools.debugger.forbid-certified-apps"; return !Services.prefs.getBoolPref(pref); }, - _isAppAllowedForManifest: function wa__isAppAllowedForManifest(aManifest) { - if (this._areCertifiedAppsAllowed()) { + _isAppAllowed: function(aApp) { + if (this._isUnrestrictedAccessAllowed()) { return true; } - let type = this._getAppType(aManifest.type); - return type !== Ci.nsIPrincipal.APP_STATUS_CERTIFIED; + return aApp.sideloaded; }, _filterAllowedApps: function wa__filterAllowedApps(aApps) { - return aApps.filter(app => this._isAppAllowedForManifest(app.manifest)); + return aApps.filter(app => this._isAppAllowed(app)); }, _isAppAllowedForURL: function wa__isAppAllowedForURL(aManifestURL) { - return this._findManifestByURL(aManifestURL).then(manifest => { - return this._isAppAllowedForManifest(manifest); - }); + let reg = DOMApplicationRegistry; + let app = reg.getAppByManifestURL(aManifestURL); + return this._isAppAllowed(app); }, uninstall: function wa_actorUninstall(aRequest) { debug("uninstall"); let manifestURL = aRequest.manifestURL; if (!manifestURL) { - return Promise.resolve({ error: "missingParameter", - message: "missing parameter manifestURL" }); + return { error: "missingParameter", + message: "missing parameter manifestURL" }; + } + + if (!this._isAppAllowedForURL(manifestURL)) { + return { error: "forbidden" }; } return DOMApplicationRegistry.uninstall(manifestURL); }, _findManifestByURL: function wa__findManifestByURL(aManifestURL) { let deferred = promise.defer(); @@ -877,27 +892,22 @@ WebappsActor.prototype = { for (let frame of this._appFrames()) { let manifestURL = frame.getAttribute("mozapp"); // _appFrames can return more than one frame with the same manifest url if (apps.indexOf(manifestURL) != -1) { continue; } - - appPromises.push(this._isAppAllowedForURL(manifestURL).then(allowed => { - if (allowed) { - apps.push(manifestURL); - } - })); + if (this._isAppAllowedForURL(manifestURL)) { + apps.push(manifestURL); + } } - return promise.all(appPromises).then(() => { - return { apps: apps }; - }); + return { apps: apps }; }, getAppActor: function ({ manifestURL }) { debug("getAppActor\n"); // Connects to the main app frame, whose `name` attribute // is set to 'main' by gaia. If for any reason, gaia doesn't set any // frame as main, no frame matches, then we connect arbitrary @@ -922,42 +932,40 @@ WebappsActor.prototype = { message: "Unable to find any opened app whose manifest " + "is '" + manifestURL + "'" }; if (!appFrame) { return notFoundError; } - return this._isAppAllowedForURL(manifestURL).then(allowed => { - if (!allowed) { - return notFoundError; - } + if (!this._isAppAllowedForURL(manifestURL)) { + return notFoundError; + } - // Only create a new actor, if we haven't already - // instanciated one for this connection. - let map = this._appActorsMap; - let mm = appFrame.QueryInterface(Ci.nsIFrameLoaderOwner) - .frameLoader - .messageManager; - let actor = map.get(mm); - if (!actor) { - let onConnect = actor => { - map.set(mm, actor); - return { actor: actor }; - }; - let onDisconnect = mm => { - map.delete(mm); - }; - return DebuggerServer.connectToChild(this.conn, appFrame, onDisconnect) - .then(onConnect); - } + // Only create a new actor, if we haven't already + // instanciated one for this connection. + let map = this._appActorsMap; + let mm = appFrame.QueryInterface(Ci.nsIFrameLoaderOwner) + .frameLoader + .messageManager; + let actor = map.get(mm); + if (!actor) { + let onConnect = actor => { + map.set(mm, actor); + return { actor: actor }; + }; + let onDisconnect = mm => { + map.delete(mm); + }; + return DebuggerServer.connectToChild(this.conn, appFrame, onDisconnect) + .then(onConnect); + } - return { actor: actor }; - }); + return { actor: actor }; }, watchApps: function () { // For now, app open/close events are only implement on b2g if (Frames) { Frames.addObserver(this); } Services.obs.addObserver(this, "webapps-installed", false); @@ -983,46 +991,42 @@ WebappsActor.prototype = { } let manifestURL = frame.appManifestURL; // Only track app frames if (!manifestURL) { return; } - this._isAppAllowedForURL(manifestURL).then(allowed => { - if (allowed) { - this.conn.send({ from: this.actorID, - type: "appOpen", - manifestURL: manifestURL - }); - } - }); + if (this._isAppAllowedForURL(manifestURL)) { + this.conn.send({ from: this.actorID, + type: "appOpen", + manifestURL: manifestURL + }); + } }, onFrameDestroyed: function (frame, isLastAppFrame) { let mozapp = frame.getAttribute('mozapp'); if (!mozapp || !isLastAppFrame) { return; } let manifestURL = frame.appManifestURL; // Only track app frames if (!manifestURL) { return; } - this._isAppAllowedForURL(manifestURL).then(allowed => { - if (allowed) { - this.conn.send({ from: this.actorID, - type: "appClose", - manifestURL: manifestURL - }); - } - }); + if (this._isAppAllowedForURL(manifestURL)) { + this.conn.send({ from: this.actorID, + type: "appClose", + manifestURL: manifestURL + }); + } }, observe: function (subject, topic, data) { let app = JSON.parse(data); if (topic == "webapps-installed") { this.conn.send({ from: this.actorID, type: "appInstall", manifestURL: app.manifestURL