--- a/b2g/config/aries/sources.xml
+++ b/b2g/config/aries/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="e862ab9177af664f00b4522e2350f4cb13866d73">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
- <project name="gaia" path="gaia" remote="mozillaorg" revision="7cd4130d4f988562a77d126860408ada65bb95ef"/>
+ <project name="gaia" path="gaia" remote="mozillaorg" revision="0d67eb545b2f4342525d14e1a10e80c91c87ada0"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<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="53517af1f57810bef745f03602f407161a475d76"/>
--- 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="e862ab9177af664f00b4522e2350f4cb13866d73">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
- <project name="gaia" path="gaia" remote="mozillaorg" revision="7cd4130d4f988562a77d126860408ada65bb95ef"/>
+ <project name="gaia" path="gaia" remote="mozillaorg" revision="0d67eb545b2f4342525d14e1a10e80c91c87ada0"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<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="53517af1f57810bef745f03602f407161a475d76"/>
@@ -116,29 +116,29 @@
<project name="platform/prebuilts/sdk" path="prebuilts/sdk" revision="cfcef469537869947abb9aa1d656774cc2678d4c"/>
<project name="platform/prebuilts/tools" path="prebuilts/tools" revision="5a48c04c4bb5f079bc757e29864a42427378e051"/>
<project name="platform_system_bluetoothd" path="system/bluetoothd" remote="b2g" revision="48d2332e6d8400cdc0de273ceff2abe8aaababf8"/>
<project name="platform/system/extras" path="system/extras" revision="10e78a05252b3de785f88c2d0b9ea8a428009c50"/>
<project name="platform/system/media" path="system/media" revision="7ff72c2ea2496fa50b5e8a915e56e901c3ccd240"/>
<project name="platform_system_libfdio" path="system/libfdio" remote="b2g" revision="3c5405863d2002f665ef2b901abb3853c420129b"/>
<project name="platform/system/netd" path="system/netd" revision="3ae56364946d4a5bf5a5f83f12f9a45a30398e33"/>
<project name="platform/system/security" path="system/security" revision="ee8068b9e7bfb2770635062fc9c2035be2142bd8"/>
- <project name="platform/system/vold" path="system/vold" revision="bb33b1ce8ad9cd3fc4311801b4d56db1d5c8175b"/>
+ <project name="platform/system/vold" path="system/vold" revision="fe12a9e2268da653d1cd4c39ec89a42211d22f25"/>
<!--original fetch url was http://sprdsource.spreadtrum.com:8085/b2g/android-->
<remote fetch="https://git.mozilla.org/external/sprd-aosp" name="sprd-aosp"/>
<default remote="sprd-aosp" revision="sprdb2g_gonk4.4" sync-j="4"/>
<!-- Stock Android things -->
<project name="platform/external/icu4c" path="external/icu4c" revision="2bb01561780583cc37bc667f0ea79f48a122d8a2"/>
<!-- dolphin specific things -->
<project name="device/sprd" path="device/sprd" revision="e73ddda9fede64134d949050e3fc53bd4121cb30"/>
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="39a5b5bcadad745df3e6882316fce426f98b1669"/>
<project name="platform/frameworks/av" path="frameworks/av" revision="8bb69db127112fc66da75f8ca7a1158614b919f6"/>
<project name="platform/hardware/akm" path="hardware/akm" revision="6d3be412647b0eab0adff8a2768736cf4eb68039"/>
<project groups="invensense" name="platform/hardware/invensense" path="hardware/invensense" revision="e6d9ab28b4f4e7684f6c07874ee819c9ea0002a2"/>
<project name="platform/hardware/ril" path="hardware/ril" revision="865ce3b4a2ba0b3a31421ca671f4d6c5595f8690"/>
<project name="kernel/common" path="kernel" revision="0f36762ab0c1d8ce10c6a5eda948b05d5d6cc379"/>
- <project name="platform/system/core" path="system/core" revision="7992618bd4ee33ce96897675a5c0a9b619122f13"/>
+ <project name="platform/system/core" path="system/core" revision="21aded5b180f7bcc9e2cefbe6e570b1d51b6065b"/>
<project name="u-boot" path="u-boot" revision="f1502910977ac88f43da7bf9277c3523ad4b0b2f"/>
<project name="vendor/sprd/gps" path="vendor/sprd/gps" revision="7d6e1269be7186b2073fa568958b357826692c4b"/>
<project name="vendor/sprd/open-source" path="vendor/sprd/open-source" revision="e503b1d14d7fdee532b8f391407299da193c1b2d"/>
<project name="vendor/sprd/partner" path="vendor/sprd/partner" revision="8649c7145972251af11b0639997edfecabfc7c2e"/>
<project name="vendor/sprd/proprietories" path="vendor/sprd/proprietories" revision="d2466593022f7078aaaf69026adf3367c2adb7bb"/>
</manifest>
--- 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="173b3104bfcbd23fc9dccd4b0035fc49aae3d444">
<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="7cd4130d4f988562a77d126860408ada65bb95ef"/>
+ <project name="gaia.git" path="gaia" remote="mozillaorg" revision="0d67eb545b2f4342525d14e1a10e80c91c87ada0"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="22664edc4c73e5fe8f5095ff1d5549db78a2bc10"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="218a5637399d023f4326e12c8a486dad95403b6c"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
<!-- 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="4efd19d199ae52656604f794c5a77518400220fd">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
- <project name="gaia" path="gaia" remote="mozillaorg" revision="7cd4130d4f988562a77d126860408ada65bb95ef"/>
+ <project name="gaia" path="gaia" remote="mozillaorg" revision="0d67eb545b2f4342525d14e1a10e80c91c87ada0"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="53517af1f57810bef745f03602f407161a475d76"/>
<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="e862ab9177af664f00b4522e2350f4cb13866d73">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
- <project name="gaia" path="gaia" remote="mozillaorg" revision="7cd4130d4f988562a77d126860408ada65bb95ef"/>
+ <project name="gaia" path="gaia" remote="mozillaorg" revision="0d67eb545b2f4342525d14e1a10e80c91c87ada0"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<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="53517af1f57810bef745f03602f407161a475d76"/>
--- a/b2g/config/emulator-l/sources.xml
+++ b/b2g/config/emulator-l/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="61e82f99bb8bc78d52b5717e9a2481ec7267fa33">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
- <project name="gaia" path="gaia" remote="mozillaorg" revision="7cd4130d4f988562a77d126860408ada65bb95ef"/>
+ <project name="gaia" path="gaia" remote="mozillaorg" revision="0d67eb545b2f4342525d14e1a10e80c91c87ada0"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<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="53517af1f57810bef745f03602f407161a475d76"/>
--- 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="173b3104bfcbd23fc9dccd4b0035fc49aae3d444">
<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="7cd4130d4f988562a77d126860408ada65bb95ef"/>
+ <project name="gaia.git" path="gaia" remote="mozillaorg" revision="0d67eb545b2f4342525d14e1a10e80c91c87ada0"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="22664edc4c73e5fe8f5095ff1d5549db78a2bc10"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="218a5637399d023f4326e12c8a486dad95403b6c"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
<!-- 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="e862ab9177af664f00b4522e2350f4cb13866d73">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
- <project name="gaia" path="gaia" remote="mozillaorg" revision="7cd4130d4f988562a77d126860408ada65bb95ef"/>
+ <project name="gaia" path="gaia" remote="mozillaorg" revision="0d67eb545b2f4342525d14e1a10e80c91c87ada0"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<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="53517af1f57810bef745f03602f407161a475d76"/>
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -1,9 +1,9 @@
{
"git": {
- "git_revision": "7cd4130d4f988562a77d126860408ada65bb95ef",
+ "git_revision": "0d67eb545b2f4342525d14e1a10e80c91c87ada0",
"remote": "https://git.mozilla.org/releases/gaia.git",
"branch": ""
},
- "revision": "70c21fc8fb4b014e751d1442161c4beabbfaa6bd",
+ "revision": "da5a1b63adc3322a73c57d22690472857fed353a",
"repo_path": "integration/gaia-central"
}
--- 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="4efd19d199ae52656604f794c5a77518400220fd">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
- <project name="gaia" path="gaia" remote="mozillaorg" revision="7cd4130d4f988562a77d126860408ada65bb95ef"/>
+ <project name="gaia" path="gaia" remote="mozillaorg" revision="0d67eb545b2f4342525d14e1a10e80c91c87ada0"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="53517af1f57810bef745f03602f407161a475d76"/>
<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/nexus-5-l/sources.xml
+++ b/b2g/config/nexus-5-l/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="61e82f99bb8bc78d52b5717e9a2481ec7267fa33">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
- <project name="gaia" path="gaia" remote="mozillaorg" revision="7cd4130d4f988562a77d126860408ada65bb95ef"/>
+ <project name="gaia" path="gaia" remote="mozillaorg" revision="0d67eb545b2f4342525d14e1a10e80c91c87ada0"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<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="53517af1f57810bef745f03602f407161a475d76"/>
--- a/browser/base/content/test/general/browser_bug839103.js
+++ b/browser/base/content/test/general/browser_bug839103.js
@@ -1,9 +1,9 @@
-const gTestRoot = getRootDirectory(gTestPath);
+const gTestRoot = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://127.0.0.1:8888/");
const gStyleSheet = "bug839103.css";
var gTab = null;
var needsInitialApplicableStateEvent = false;
var needsInitialApplicableStateEventFor = null;
function test() {
waitForExplicitFinish();
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -4237,17 +4237,17 @@ nsDocument::AddStyleSheetToStyleSets(nsI
init.memberName = argName; \
\
nsRefPtr<className> event = \
className::Constructor(this, NS_LITERAL_STRING(type), init); \
event->SetTrusted(true); \
event->SetTarget(this); \
nsRefPtr<AsyncEventDispatcher> asyncDispatcher = \
new AsyncEventDispatcher(this, event); \
- asyncDispatcher->mDispatchChromeOnly = true; \
+ asyncDispatcher->mOnlyChromeDispatch = true; \
asyncDispatcher->PostDOMEvent(); \
} while (0);
void
nsDocument::NotifyStyleSheetAdded(nsIStyleSheet* aSheet, bool aDocumentSheet)
{
NS_DOCUMENT_NOTIFY_OBSERVERS(StyleSheetAdded, (this, aSheet, aDocumentSheet));
--- a/dom/bluetooth/bluetooth2/BluetoothAdapter.cpp
+++ b/dom/bluetooth/bluetooth2/BluetoothAdapter.cpp
@@ -139,18 +139,17 @@ public:
NS_ENSURE_TRUE(v.type() == BluetoothValue::TnsString, false);
/**
* Create a new discovery handle and wrap it to return. Each
* discovery handle is one-time-use only.
*/
nsRefPtr<BluetoothDiscoveryHandle> discoveryHandle =
BluetoothDiscoveryHandle::Create(mAdapter->GetParentObject(),
- mServiceUuids, v.get_nsString(),
- mAdapter);
+ mServiceUuids, v.get_nsString());
if (!ToJSValue(cx, discoveryHandle, aValue)) {
JS_ClearPendingException(cx);
return false;
}
// Append a BluetoothDiscoveryHandle to LeScan handle array.
mAdapter->AppendLeScanHandle(discoveryHandle);
@@ -329,25 +328,45 @@ BluetoothAdapter::BluetoothAdapter(nsPID
SetPropertyByValue(values[i]);
}
RegisterBluetoothSignalHandler(NS_LITERAL_STRING(KEY_ADAPTER), this);
}
BluetoothAdapter::~BluetoothAdapter()
{
- UnregisterBluetoothSignalHandler(NS_LITERAL_STRING(KEY_ADAPTER), this);
+ Cleanup();
}
void
BluetoothAdapter::DisconnectFromOwner()
{
DOMEventTargetHelper::DisconnectFromOwner();
+ Cleanup();
+}
+void
+BluetoothAdapter::Cleanup()
+{
UnregisterBluetoothSignalHandler(NS_LITERAL_STRING(KEY_ADAPTER), this);
+
+ // Stop ongoing LE scans and clear the LeScan handle array
+ if (!mLeScanHandleArray.IsEmpty()) {
+ BluetoothService* bs = BluetoothService::Get();
+ NS_ENSURE_TRUE_VOID(bs);
+
+ nsString uuid;
+ for (uint32_t i = 0; i < mLeScanHandleArray.Length(); ++i) {
+ mLeScanHandleArray[i]->GetLeScanUuid(uuid);
+ nsRefPtr<BluetoothVoidReplyRunnable> results =
+ new BluetoothVoidReplyRunnable(nullptr);
+ bs->StopLeScanInternal(uuid, results);
+ }
+ mLeScanHandleArray.Clear();
+ }
}
void
BluetoothAdapter::GetPairedDeviceProperties(
const nsTArray<nsString>& aDeviceAddresses)
{
BluetoothService* bs = BluetoothService::Get();
NS_ENSURE_TRUE_VOID(bs);
--- a/dom/bluetooth/bluetooth2/BluetoothAdapter.h
+++ b/dom/bluetooth/bluetooth2/BluetoothAdapter.h
@@ -200,16 +200,21 @@ public:
*/
void RemoveLeScanHandle(const nsAString& aScanUuid);
private:
BluetoothAdapter(nsPIDOMWindow* aOwner, const BluetoothValue& aValue);
~BluetoothAdapter();
/**
+ * Unregister signal handler and clean up LE scan handles.
+ */
+ void Cleanup();
+
+ /**
* Set adapter properties according to properties array.
*
* @param aValue [in] Properties array to set with
*/
void SetPropertyByValue(const BluetoothNamedValue& aValue);
/**
* Set adapter state and fire BluetoothAttributeEvent if state changed.
--- a/dom/bluetooth/bluetooth2/BluetoothDiscoveryHandle.cpp
+++ b/dom/bluetooth/bluetooth2/BluetoothDiscoveryHandle.cpp
@@ -10,63 +10,48 @@
#include "mozilla/dom/bluetooth/BluetoothCommon.h"
#include "mozilla/dom/bluetooth/BluetoothDiscoveryHandle.h"
#include "mozilla/dom/bluetooth/BluetoothLeDeviceEvent.h"
#include "mozilla/dom/bluetooth/BluetoothTypes.h"
#include "nsThreadUtils.h"
USING_BLUETOOTH_NAMESPACE
-NS_IMPL_CYCLE_COLLECTION_INHERITED(BluetoothDiscoveryHandle,
- DOMEventTargetHelper,
- mAdapter)
-
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(BluetoothDiscoveryHandle)
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(BluetoothDiscoveryHandle, DOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(BluetoothDiscoveryHandle, DOMEventTargetHelper)
BluetoothDiscoveryHandle::BluetoothDiscoveryHandle(nsPIDOMWindow* aWindow)
: DOMEventTargetHelper(aWindow)
, mLeScanUuid(EmptyString())
{
MOZ_ASSERT(aWindow);
}
BluetoothDiscoveryHandle::BluetoothDiscoveryHandle(
nsPIDOMWindow* aWindow,
const nsTArray<nsString>& aServiceUuids,
- const nsAString& aLeScanUuid,
- BluetoothAdapter* aAdapter)
+ const nsAString& aLeScanUuid)
: DOMEventTargetHelper(aWindow)
, mLeScanUuid(aLeScanUuid)
, mServiceUuids(aServiceUuids)
- , mAdapter(aAdapter)
{
MOZ_ASSERT(aWindow);
}
BluetoothDiscoveryHandle::~BluetoothDiscoveryHandle()
{
- // Remove itself from the adapter's mLeScanHandleArray
- if (!mLeScanUuid.IsEmpty() && mAdapter != nullptr) {
- mAdapter->RemoveLeScanHandle(mLeScanUuid);
- }
}
void
BluetoothDiscoveryHandle::DisconnectFromOwner()
{
DOMEventTargetHelper::DisconnectFromOwner();
-
- // Remove itself from the adapter's mLeScanHandleArray
- if (!mLeScanUuid.IsEmpty() && mAdapter != nullptr) {
- mAdapter->RemoveLeScanHandle(mLeScanUuid);
- }
}
// static
already_AddRefed<BluetoothDiscoveryHandle>
BluetoothDiscoveryHandle::Create(nsPIDOMWindow* aWindow)
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(aWindow);
@@ -75,25 +60,23 @@ BluetoothDiscoveryHandle::Create(nsPIDOM
new BluetoothDiscoveryHandle(aWindow);
return handle.forget();
}
already_AddRefed<BluetoothDiscoveryHandle>
BluetoothDiscoveryHandle::Create(
nsPIDOMWindow* aWindow,
const nsTArray<nsString>& aServiceUuids,
- const nsAString& aLeScanUuid,
- BluetoothAdapter* aAdapter)
+ const nsAString& aLeScanUuid)
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(aWindow);
- MOZ_ASSERT(aAdapter);
nsRefPtr<BluetoothDiscoveryHandle> handle =
- new BluetoothDiscoveryHandle(aWindow, aServiceUuids, aLeScanUuid, aAdapter);
+ new BluetoothDiscoveryHandle(aWindow, aServiceUuids, aLeScanUuid);
return handle.forget();
}
void
BluetoothDiscoveryHandle::DispatchDeviceEvent(BluetoothDevice* aDevice)
{
MOZ_ASSERT(aDevice);
--- a/dom/bluetooth/bluetooth2/BluetoothDiscoveryHandle.h
+++ b/dom/bluetooth/bluetooth2/BluetoothDiscoveryHandle.h
@@ -17,27 +17,24 @@
BEGIN_BLUETOOTH_NAMESPACE
class BluetoothDevice;
class BluetoothDiscoveryHandle final : public DOMEventTargetHelper
{
public:
NS_DECL_ISUPPORTS_INHERITED
- NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(BluetoothDiscoveryHandle,
- DOMEventTargetHelper)
static already_AddRefed<BluetoothDiscoveryHandle>
Create(nsPIDOMWindow* aWindow);
static already_AddRefed<BluetoothDiscoveryHandle>
Create(nsPIDOMWindow* aWindow,
const nsTArray<nsString>& aServiceUuids,
- const nsAString& aLeScanUuid,
- BluetoothAdapter* aAdapter);
+ const nsAString& aLeScanUuid);
void DispatchDeviceEvent(BluetoothDevice* aDevice);
void DispatchLeDeviceEvent(BluetoothDevice* aLeDevice,
int32_t aRssi,
nsTArray<uint8_t>& aScanRecord);
IMPL_EVENT_HANDLER(devicefound);
@@ -52,18 +49,17 @@ public:
virtual void DisconnectFromOwner() override;
private:
BluetoothDiscoveryHandle(nsPIDOMWindow* aWindow);
BluetoothDiscoveryHandle(nsPIDOMWindow* aWindow,
const nsTArray<nsString>& aServiceUuids,
- const nsAString& aLeScanUuid,
- BluetoothAdapter* aAdapter);
+ const nsAString& aLeScanUuid);
~BluetoothDiscoveryHandle();
/**
* Random generated UUID of LE scan
*
* This UUID is used only when the handle is built for LE scan.
* If BluetoothDiscoveryHandle is built for classic discovery, the value would
@@ -73,21 +69,13 @@ private:
/**
* A DOMString array of service UUIDs to discover / scan for.
*
* This array is only used by LE scan. If BluetoothDiscoveryHandle is built
* for classic discovery, the array should be empty.
*/
nsTArray<nsString> mServiceUuids;
-
- /**
- * The adapter which called startLeScan and created this discovery handle
- *
- * If BluetoothDiscoveryHandle is built for classic discovery, this value
- * should be nullptr.
- */
- nsRefPtr<BluetoothAdapter> mAdapter;
};
END_BLUETOOTH_NAMESPACE
#endif // mozilla_dom_bluetooth_bluetoothdiscoveryhandle_h
--- a/dom/events/AsyncEventDispatcher.cpp
+++ b/dom/events/AsyncEventDispatcher.cpp
@@ -18,67 +18,42 @@ using namespace dom;
/******************************************************************************
* mozilla::AsyncEventDispatcher
******************************************************************************/
AsyncEventDispatcher::AsyncEventDispatcher(EventTarget* aTarget,
WidgetEvent& aEvent)
: mTarget(aTarget)
- , mDispatchChromeOnly(false)
+ , mOnlyChromeDispatch(false)
{
MOZ_ASSERT(mTarget);
EventDispatcher::CreateEvent(aTarget, nullptr, &aEvent, EmptyString(),
getter_AddRefs(mEvent));
NS_ASSERTION(mEvent, "Should never fail to create an event");
mEvent->DuplicatePrivateData();
mEvent->SetTrusted(aEvent.mFlags.mIsTrusted);
}
NS_IMETHODIMP
AsyncEventDispatcher::Run()
{
- if (mEvent) {
- if (mDispatchChromeOnly) {
- MOZ_ASSERT(mEvent->InternalDOMEvent()->IsTrusted());
-
- nsCOMPtr<nsINode> node = do_QueryInterface(mTarget);
- MOZ_ASSERT(node, "ChromeOnly dispatch supported with Node targets only!");
- nsPIDOMWindow* window = node->OwnerDoc()->GetWindow();
- if (!window) {
- return NS_ERROR_INVALID_ARG;
- }
-
- nsCOMPtr<EventTarget> target = window->GetParentTarget();
- if (!target) {
- return NS_ERROR_INVALID_ARG;
- }
- EventDispatcher::DispatchDOMEvent(target, nullptr, mEvent,
- nullptr, nullptr);
- } else {
- bool defaultActionEnabled; // This is not used because the caller is async
- mTarget->DispatchEvent(mEvent, &defaultActionEnabled);
- }
- } else {
- if (mDispatchChromeOnly) {
- nsCOMPtr<nsINode> node = do_QueryInterface(mTarget);
- MOZ_ASSERT(node, "ChromeOnly dispatch supported with Node targets only!");
- nsContentUtils::DispatchChromeEvent(node->OwnerDoc(), node, mEventType,
- mBubbles, false);
- } else {
- nsCOMPtr<nsIDOMEvent> event;
- NS_NewDOMEvent(getter_AddRefs(event), mTarget, nullptr, nullptr);
- nsresult rv = event->InitEvent(mEventType, mBubbles, false);
- NS_ENSURE_SUCCESS(rv, rv);
- event->SetTrusted(true);
- bool dummy;
- mTarget->DispatchEvent(event, &dummy);
- }
+ nsCOMPtr<nsIDOMEvent> event = mEvent;
+ if (!event) {
+ NS_NewDOMEvent(getter_AddRefs(event), mTarget, nullptr, nullptr);
+ nsresult rv = event->InitEvent(mEventType, mBubbles, false);
+ NS_ENSURE_SUCCESS(rv, rv);
+ event->SetTrusted(true);
}
-
+ if (mOnlyChromeDispatch) {
+ MOZ_ASSERT(event->InternalDOMEvent()->IsTrusted());
+ event->GetInternalNSEvent()->mFlags.mOnlyChromeDispatch = true;
+ }
+ bool dummy;
+ mTarget->DispatchEvent(event, &dummy);
return NS_OK;
}
nsresult
AsyncEventDispatcher::PostDOMEvent()
{
nsRefPtr<AsyncEventDispatcher> ensureDeletionWhenFailing = this;
return NS_DispatchToCurrentThread(this);
--- a/dom/events/AsyncEventDispatcher.h
+++ b/dom/events/AsyncEventDispatcher.h
@@ -23,52 +23,58 @@ namespace mozilla {
* For example, you may need to fire an event from within layout, but
* want to ensure that the event handler doesn't mutate the DOM at
* the wrong time, in order to avoid resulting instability.
*/
class AsyncEventDispatcher : public nsRunnable
{
public:
+ /**
+ * If aOnlyChromeDispatch is true, the event is dispatched to only
+ * chrome node. In that case, if aTarget is already a chrome node,
+ * the event is dispatched to it, otherwise the dispatch path starts
+ * at the first chrome ancestor of that target.
+ */
AsyncEventDispatcher(nsINode* aTarget, const nsAString& aEventType,
- bool aBubbles, bool aDispatchChromeOnly)
+ bool aBubbles, bool aOnlyChromeDispatch)
: mTarget(aTarget)
, mEventType(aEventType)
, mBubbles(aBubbles)
- , mDispatchChromeOnly(aDispatchChromeOnly)
+ , mOnlyChromeDispatch(aOnlyChromeDispatch)
{
}
AsyncEventDispatcher(dom::EventTarget* aTarget, const nsAString& aEventType,
bool aBubbles)
: mTarget(aTarget)
, mEventType(aEventType)
, mBubbles(aBubbles)
- , mDispatchChromeOnly(false)
+ , mOnlyChromeDispatch(false)
{
}
AsyncEventDispatcher(dom::EventTarget* aTarget, nsIDOMEvent* aEvent)
: mTarget(aTarget)
, mEvent(aEvent)
- , mDispatchChromeOnly(false)
+ , mOnlyChromeDispatch(false)
{
}
AsyncEventDispatcher(dom::EventTarget* aTarget, WidgetEvent& aEvent);
NS_IMETHOD Run() override;
nsresult PostDOMEvent();
void RunDOMEventWhenSafe();
nsCOMPtr<dom::EventTarget> mTarget;
nsCOMPtr<nsIDOMEvent> mEvent;
nsString mEventType;
bool mBubbles;
- bool mDispatchChromeOnly;
+ bool mOnlyChromeDispatch;
};
class LoadBlockingAsyncEventDispatcher final : public AsyncEventDispatcher
{
public:
LoadBlockingAsyncEventDispatcher(nsINode* aEventNode,
const nsAString& aEventType,
bool aBubbles, bool aDispatchChromeOnly)
--- a/dom/events/Event.cpp
+++ b/dom/events/Event.cpp
@@ -477,16 +477,23 @@ NS_IMETHODIMP
Event::StopImmediatePropagation()
{
mEvent->mFlags.mPropagationStopped = true;
mEvent->mFlags.mImmediatePropagationStopped = true;
return NS_OK;
}
NS_IMETHODIMP
+Event::StopCrossProcessForwarding()
+{
+ mEvent->mFlags.mNoCrossProcessBoundaryForwarding = true;
+ return NS_OK;
+}
+
+NS_IMETHODIMP
Event::GetIsTrusted(bool* aIsTrusted)
{
*aIsTrusted = IsTrusted();
return NS_OK;
}
NS_IMETHODIMP
Event::PreventDefault()
--- a/dom/events/Event.h
+++ b/dom/events/Event.h
@@ -304,16 +304,17 @@ private:
NS_IMETHOD GetType(nsAString& aType) override { return _to GetType(aType); } \
NS_IMETHOD GetTarget(nsIDOMEventTarget** aTarget) override { return _to GetTarget(aTarget); } \
NS_IMETHOD GetCurrentTarget(nsIDOMEventTarget** aCurrentTarget) override { return _to GetCurrentTarget(aCurrentTarget); } \
NS_IMETHOD GetEventPhase(uint16_t* aEventPhase) override { return _to GetEventPhase(aEventPhase); } \
NS_IMETHOD GetBubbles(bool* aBubbles) override { return _to GetBubbles(aBubbles); } \
NS_IMETHOD GetCancelable(bool* aCancelable) override { return _to GetCancelable(aCancelable); } \
NS_IMETHOD GetTimeStamp(DOMTimeStamp* aTimeStamp) override { return _to GetTimeStamp(aTimeStamp); } \
NS_IMETHOD StopPropagation(void) override { return _to StopPropagation(); } \
+ NS_IMETHOD StopCrossProcessForwarding(void) override { return _to StopCrossProcessForwarding(); } \
NS_IMETHOD PreventDefault(void) override { return _to PreventDefault(); } \
NS_IMETHOD InitEvent(const nsAString& eventTypeArg, bool canBubbleArg, bool cancelableArg) override { return _to InitEvent(eventTypeArg, canBubbleArg, cancelableArg); } \
NS_IMETHOD GetDefaultPrevented(bool* aDefaultPrevented) override { return _to GetDefaultPrevented(aDefaultPrevented); } \
NS_IMETHOD StopImmediatePropagation(void) override { return _to StopImmediatePropagation(); } \
NS_IMETHOD GetOriginalTarget(nsIDOMEventTarget** aOriginalTarget) override { return _to GetOriginalTarget(aOriginalTarget); } \
NS_IMETHOD GetExplicitOriginalTarget(nsIDOMEventTarget** aExplicitOriginalTarget) override { return _to GetExplicitOriginalTarget(aExplicitOriginalTarget); } \
NS_IMETHOD GetPreventDefault(bool* aRetval) override { return _to GetPreventDefault(aRetval); } \
NS_IMETHOD GetIsTrusted(bool* aIsTrusted) override { return _to GetIsTrusted(aIsTrusted); } \
--- a/dom/interfaces/events/nsIDOMEvent.idl
+++ b/dom/interfaces/events/nsIDOMEvent.idl
@@ -35,17 +35,17 @@ class EventTarget;
* The nsIDOMEvent interface is the primary datatype for all events in
* the Document Object Model.
*
* For more information on this interface please see
* http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html and
* http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
*/
-[builtinclass, uuid(02d54f52-a1f5-4ad2-b560-36f14012935e)]
+[builtinclass, uuid(63857daf-c084-4ea6-a8b9-6812e3176991)]
interface nsIDOMEvent : nsISupports
{
// PhaseType
/**
* The event isn't being dispatched.
*/
const unsigned short NONE = 0;
/**
@@ -208,16 +208,17 @@ interface nsIDOMEvent : nsISupports
[notxpcom] boolean IsDispatchStopped();
[notxpcom] WidgetEventPtr GetInternalNSEvent();
[noscript,notxpcom] void SetTrusted(in boolean aTrusted);
[notxpcom] void Serialize(in IPCMessagePtr aMsg,
in boolean aSerializeInterfaceType);
[notxpcom] boolean Deserialize(in ConstIPCMessagePtr aMsg, out voidPtr aIter);
[noscript,notxpcom] void SetOwner(in EventTargetPtr aOwner);
[notxpcom] DOMEventPtr InternalDOMEvent();
+ [noscript] void stopCrossProcessForwarding();
};
%{C++
nsresult
NS_NewDOMEvent(nsIDOMEvent** aInstancePtrResult,
mozilla::dom::EventTarget* aOwner,
nsPresContext* aPresContext,
--- a/dom/manifest/ManifestProcessor.jsm
+++ b/dom/manifest/ManifestProcessor.jsm
@@ -16,17 +16,17 @@
* icons and splash_screens.
*
* TODO: The constructor should accept the UA's supported orientations.
* TODO: The constructor should accept the UA's supported display modes.
* TODO: hook up developer tools to console. (1086997).
*/
/*exported EXPORTED_SYMBOLS */
/*JSLint options in comment below: */
-/*globals Components, XPCOMUtils*/
+/*globals Components, XPCOMUtils, Intl*/
'use strict';
this.EXPORTED_SYMBOLS = ['ManifestProcessor']; // jshint ignore:line
const imports = {};
const {
utils: Cu
} = Components;
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
Cu.importGlobalProperties(['URL']);
@@ -95,16 +95,17 @@ ManifestProcessor.prototype = {
if (typeof rawManifest !== 'object' || rawManifest === null) {
let msg = 'Manifest needs to be an object.';
console.warn(msg);
rawManifest = {};
}
const extractor = new ManifestValueExtractor(console);
const imgObjProcessor = new ImgObjProcessor(console, extractor);
const processedManifest = {
+ 'lang': processLangMember(rawManifest),
'start_url': processStartURLMember(rawManifest, manifestURL, docURL),
'display': processDisplayMember(rawManifest),
'orientation': processOrientationMember(rawManifest),
'name': processNameMember(rawManifest),
'icons': imgObjProcessor.process(
rawManifest, manifestURL, 'icons'
),
'splash_screens': imgObjProcessor.process(
@@ -241,12 +242,31 @@ ManifestProcessor.prototype = {
objectName: 'manifest',
object: aManifest,
property: 'theme_color',
expectedType: 'string',
trim: true
};
return extractor.extractColorValue(spec);
}
+
+ function processLangMember(aManifest) {
+ const spec = {
+ objectName: 'manifest',
+ object: aManifest,
+ property: 'lang',
+ expectedType: 'string',
+ trim: true
+ };
+ let tag = extractor.extractValue(spec);
+ // TODO: Check if tag is structurally valid.
+ // Cannot do this because we don't support Intl API on Android.
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=864843
+ // https://github.com/tc39/ecma402/issues/5
+ // TODO: perform canonicalization on the tag.
+ // Can't do this today because there is no direct means to
+ // access canonicalization algorithms through Intl API.
+ // https://github.com/tc39/ecma402/issues/5
+ return tag;
+ }
}
};
-
this.ManifestProcessor = ManifestProcessor; // jshint ignore:line
--- a/dom/manifest/test/mochitest.ini
+++ b/dom/manifest/test/mochitest.ini
@@ -1,19 +1,19 @@
[DEFAULT]
support-files =
common.js
resource.sjs
manifestLoader.html
-
[test_ImageObjectProcessor_background_color.html]
[test_ImageObjectProcessor_density.html]
[test_ImageObjectProcessor_sizes.html]
[test_ImageObjectProcessor_src.html]
[test_ImageObjectProcessor_type.html]
[test_ManifestProcessor_display.html]
[test_ManifestProcessor_icons.html]
[test_ManifestProcessor_JSON.html]
+[test_ManifestProcessor_lang.html]
[test_ManifestProcessor_name_and_short_name.html]
[test_ManifestProcessor_orientation.html]
-[test_ManifestProcessor_start_url.html]
[test_ManifestProcessor_scope.html]
[test_ManifestProcessor_splash_screens.html]
+[test_ManifestProcessor_start_url.html]
new file mode 100644
--- /dev/null
+++ b/dom/manifest/test/test_ManifestProcessor_lang.html
@@ -0,0 +1,112 @@
+<!DOCTYPE HTML>
+<!--
+Bug 1143879 - Implement lang member of Web manifest
+https://bugzilla.mozilla.org/show_bug.cgi?id=1143879
+-->
+<meta charset="utf-8">
+<title>Test for Bug 1143879 - Implement lang member of Web manifest</title>
+<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+<script src="common.js"></script>
+<script>
+/**
+ * lang member
+ * https://w3c.github.io/manifest/#lang-member
+ **/
+/*globals is, typeTests, data, processor, seperators, lineTerminators, todo_is*/
+'use strict';
+// Type checks: checks that only strings are accepted.
+for (var type of typeTests) {
+ var expected = `Expect non-string to be undefined.`;
+ data.jsonText = JSON.stringify({
+ lang: type
+ });
+ var result = processor.process(data);
+ is(result.lang, undefined, expected);
+}
+
+// Test valid language tags - derived from IANA and BCP-47 spec
+// and our Intl.js implementation.
+var validTags = [
+ 'aa', 'ab', 'ae', 'af', 'ak', 'am', 'an', 'ar', 'as', 'av', 'ay', 'az',
+ 'ba', 'be', 'bg', 'bh', 'bi', 'bm', 'bn', 'bo', 'br', 'bs', 'ca', 'ce',
+ 'ch', 'co', 'cr', 'cs', 'cu', 'cv', 'cy', 'da', 'de', 'dv', 'dz', 'ee',
+ 'el', 'en', 'eo', 'es', 'et', 'eu', 'fa', 'ff', 'fi', 'fj', 'fo', 'fr',
+ 'fy', 'ga', 'gd', 'gl', 'gn', 'gu', 'gv', 'ha', 'he', 'hi', 'ho', 'hr',
+ 'ht', 'hu', 'hy', 'hz', 'ia', 'id', 'ie', 'ig', 'ik', 'in', 'io',
+ 'is', 'it', 'iu', 'iw', 'ja', 'ji', 'jv', 'jw', 'ka', 'kg', 'ki', 'kj',
+ 'kk', 'kl', 'km', 'kn', 'ko', 'kr', 'ks', 'ku', 'kv', 'kw', 'ky', 'la',
+ 'lb', 'lg', 'li', 'ln', 'lo', 'lt', 'lu', 'lv', 'mg', 'mh', 'mi', 'mk',
+ 'ml', 'mn', 'mo', 'mr', 'ms', 'mt', 'my', 'na', 'nb', 'nd', 'ne', 'ng',
+ 'nl', 'nn', 'no', 'nr', 'nv', 'ny', 'oc', 'oj', 'om', 'or', 'os', 'pa',
+ 'pi', 'pl', 'ps', 'pt', 'qu', 'rm', 'rn', 'ro', 'ru', 'rw', 'sa', 'sc',
+ 'sd', 'se', 'sg', 'sh', 'si', 'sk', 'sl', 'sm', 'sn', 'so', 'sq', 'sr',
+ 'ss', 'st', 'su', 'sv', 'sw', 'ta', 'te', 'tg', 'th', 'ti', 'tk', 'tl',
+ 'tn', 'to', 'tr', 'ts', 'tt', 'tw', 'ty', 'ug', 'uk', 'ur', 'uz', 've',
+ 'vi', 'vo', 'wa', 'wo', 'xh', 'yi', 'yo', 'za', 'zh', 'zu', 'en-US',
+ 'jp-JS', 'pt-PT', 'pt-BR', 'de-CH', 'de-DE-1901', 'es-419', 'sl-IT-nedis',
+ 'en-US-boont', 'mn-Cyrl-MN', 'x-fr-CH', 'sr-Cyrl', 'sr-Latn',
+ 'hy-Latn-IT-arevela', 'zh-TW', 'en-GB-boont-r-extended-sequence-x-private',
+ 'zh-nan-hans-bu-variant2-variant1-u-ca-chinese-t-zh-latn-x-private',
+ 'zh-cmn-Hans-CN', 'cmn-Hans-CN', 'zh-yue-HK', 'yue-HK',
+ 'de-CH-x-phonebk', 'az-Arab-x-AZE-derbend', 'x-whatever',
+ 'qaa-Qaaa-QM-x-southern'
+];
+for (var tag of validTags) {
+ var expected = `Expect lang to be ${tag}.`;
+ data.jsonText = JSON.stringify({
+ lang: tag
+ });
+ var result = processor.process(data);
+ is(result.lang, tag, expected);
+}
+
+// trim tests - check that language tags get trimmed properly.
+for (var tag of validTags) {
+ var expected = `Expect trimmed tag to be returned.`;
+ var expandedtag = seperators + lineTerminators + tag;
+ expandedtag += lineTerminators + seperators;
+ data.jsonText = JSON.stringify({
+ lang: expandedtag
+ });
+ var result = processor.process(data);
+ is(result.lang, tag, expected);
+}
+
+//Invalid language tags, derived from BCP-47 and made up.
+var invalidTags = [
+ 'de-419-DE', ' a-DE ', 'ar-a-aaa-b-bbb-a-ccc', 'sdafsdfaadsfdsf', 'i',
+ 'i-phone', 'en US', 'EN-*-US-JP', 'JA-INVALID-TAG', '123123123'
+];
+for (var item of invalidTags) {
+ var expected = `Expect invalid tag (${item}) to be treated as undefined.`;
+ data.jsonText = JSON.stringify({
+ lang: item
+ });
+ var result = processor.process(data);
+ todo_is(result.lang, undefined, expected);
+}
+
+// Canonical form conversion tests. We convert the following tags, which are in
+// canonical form, to upper case and expect the processor to return them
+// in canonical form.
+var canonicalTags = [
+ 'jp-JS', 'pt-PT', 'pt-BR', 'de-CH', 'de-DE-1901', 'es-419', 'sl-IT-nedis',
+ 'en-US-boont', 'mn-Cyrl-MN', 'x-fr-CH', 'sr-Cyrl', 'sr-Latn',
+ 'hy-Latn-IT-arevela', 'zh-TW', 'en-GB-boont-r-extended-sequence-x-private',
+ 'zh-cmn-Hans-CN', 'cmn-Hans-CN', 'zh-yue-HK', 'yue-HK',
+ 'de-CH-x-phonebk', 'az-Arab-x-AZE-derbend', 'x-whatever',
+ 'qaa-Qaaa-QM-x-southern'
+];
+
+for (var tag of canonicalTags) {
+ var uppedTag = tag.toUpperCase();
+ var expected = `Expect tag (${uppedTag}) to be in canonical form (${tag}).`;
+ data.jsonText = JSON.stringify({
+ lang: uppedTag
+ });
+ var result = processor.process(data);
+ todo_is(result.lang, tag, expected);
+}
+
+</script>
--- a/dom/media/DecodedStream.cpp
+++ b/dom/media/DecodedStream.cpp
@@ -154,21 +154,16 @@ private:
}
}
// Main thread only
DecodedStream* mDecodedStream;
nsRefPtr<MediaStream> mStream;
};
-OutputStreamData::OutputStreamData()
-{
- //
-}
-
OutputStreamData::~OutputStreamData()
{
mListener->Forget();
}
void
OutputStreamData::Init(DecodedStream* aDecodedStream, ProcessedMediaStream* aStream)
{
@@ -190,34 +185,103 @@ DecodedStream::GetData()
return mData.get();
}
void
DecodedStream::DestroyData()
{
MOZ_ASSERT(NS_IsMainThread());
GetReentrantMonitor().AssertCurrentThreadIn();
+
+ // Avoid the redundant blocking to output stream.
+ if (!mData) {
+ return;
+ }
+
+ // All streams are having their SourceMediaStream disconnected, so they
+ // need to be explicitly blocked again.
+ auto& outputStreams = OutputStreams();
+ for (int32_t i = outputStreams.Length() - 1; i >= 0; --i) {
+ OutputStreamData& os = outputStreams[i];
+ // Explicitly remove all existing ports.
+ // This is not strictly necessary but it's good form.
+ MOZ_ASSERT(os.mPort, "Double-delete of the ports!");
+ os.mPort->Destroy();
+ os.mPort = nullptr;
+ // During cycle collection, nsDOMMediaStream can be destroyed and send
+ // its Destroy message before this decoder is destroyed. So we have to
+ // be careful not to send any messages after the Destroy().
+ if (os.mStream->IsDestroyed()) {
+ // Probably the DOM MediaStream was GCed. Clean up.
+ outputStreams.RemoveElementAt(i);
+ } else {
+ os.mStream->ChangeExplicitBlockerCount(1);
+ }
+ }
+
mData = nullptr;
}
void
DecodedStream::RecreateData(int64_t aInitialTime, SourceMediaStream* aStream)
{
MOZ_ASSERT(NS_IsMainThread());
GetReentrantMonitor().AssertCurrentThreadIn();
MOZ_ASSERT(!mData);
+
mData.reset(new DecodedStreamData(aInitialTime, aStream));
+
+ // Note that the delay between removing ports in DestroyDecodedStream
+ // and adding new ones won't cause a glitch since all graph operations
+ // between main-thread stable states take effect atomically.
+ auto& outputStreams = OutputStreams();
+ for (int32_t i = outputStreams.Length() - 1; i >= 0; --i) {
+ OutputStreamData& os = outputStreams[i];
+ MOZ_ASSERT(!os.mStream->IsDestroyed(), "Should've been removed in DestroyData()");
+ Connect(&os);
+ }
}
nsTArray<OutputStreamData>&
DecodedStream::OutputStreams()
{
GetReentrantMonitor().AssertCurrentThreadIn();
return mOutputStreams;
}
ReentrantMonitor&
DecodedStream::GetReentrantMonitor()
{
return mMonitor;
}
+void
+DecodedStream::Connect(OutputStreamData* aStream)
+{
+ MOZ_ASSERT(NS_IsMainThread());
+ GetReentrantMonitor().AssertCurrentThreadIn();
+ NS_ASSERTION(!aStream->mPort, "Already connected?");
+
+ // The output stream must stay in sync with the decoded stream, so if
+ // either stream is blocked, we block the other.
+ aStream->mPort = aStream->mStream->AllocateInputPort(mData->mStream,
+ MediaInputPort::FLAG_BLOCK_INPUT | MediaInputPort::FLAG_BLOCK_OUTPUT);
+ // Unblock the output stream now. While it's connected to DecodedStream,
+ // DecodedStream is responsible for controlling blocking.
+ aStream->mStream->ChangeExplicitBlockerCount(-1);
+}
+
+void
+DecodedStream::Connect(ProcessedMediaStream* aStream, bool aFinishWhenEnded)
+{
+ MOZ_ASSERT(NS_IsMainThread());
+ GetReentrantMonitor().AssertCurrentThreadIn();
+
+ OutputStreamData* os = OutputStreams().AppendElement();
+ os->Init(this, aStream);
+ Connect(os);
+ if (aFinishWhenEnded) {
+ // Ensure that aStream finishes the moment mDecodedStream does.
+ aStream->SetAutofinish(true);
+ }
+}
+
} // namespace mozilla
--- a/dom/media/DecodedStream.h
+++ b/dom/media/DecodedStream.h
@@ -14,17 +14,16 @@
namespace mozilla {
class MediaInputPort;
class SourceMediaStream;
class ProcessedMediaStream;
class DecodedStream;
class DecodedStreamGraphListener;
-class OutputStreamData;
class OutputStreamListener;
class ReentrantMonitor;
namespace layers {
class Image;
}
/*
@@ -77,39 +76,37 @@ public:
bool mHaveBlockedForStateMachineNotPlaying;
// True if we need to send a compensation video frame to ensure the
// StreamTime going forward.
bool mEOSVideoCompensation;
};
class OutputStreamData {
public:
- // Compiler-generated default constructor needs the complete definition
- // of OutputStreamListener when constructing OutputStreamData. Provide our
- // own default constructor for forward declaration of OutputStreamListener
- // to work.
- OutputStreamData();
~OutputStreamData();
void Init(DecodedStream* aDecodedStream, ProcessedMediaStream* aStream);
nsRefPtr<ProcessedMediaStream> mStream;
// mPort connects DecodedStreamData::mStream to our mStream.
nsRefPtr<MediaInputPort> mPort;
nsRefPtr<OutputStreamListener> mListener;
};
class DecodedStream {
public:
explicit DecodedStream(ReentrantMonitor& aMonitor);
DecodedStreamData* GetData();
void DestroyData();
void RecreateData(int64_t aInitialTime, SourceMediaStream* aStream);
nsTArray<OutputStreamData>& OutputStreams();
ReentrantMonitor& GetReentrantMonitor();
+ void Connect(ProcessedMediaStream* aStream, bool aFinishWhenEnded);
private:
+ void Connect(OutputStreamData* aStream);
+
UniquePtr<DecodedStreamData> mData;
// Data about MediaStreams that are being fed by the decoder.
nsTArray<OutputStreamData> mOutputStreams;
ReentrantMonitor& mMonitor;
};
} // namespace mozilla
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -284,77 +284,30 @@ void MediaDecoder::Pause()
}
void MediaDecoder::SetVolume(double aVolume)
{
MOZ_ASSERT(NS_IsMainThread());
mVolume = aVolume;
}
-void MediaDecoder::ConnectDecodedStreamToOutputStream(OutputStreamData* aStream)
-{
- NS_ASSERTION(!aStream->mPort, "Already connected?");
-
- // The output stream must stay in sync with the decoded stream, so if
- // either stream is blocked, we block the other.
- aStream->mPort = aStream->mStream->AllocateInputPort(GetDecodedStream()->mStream,
- MediaInputPort::FLAG_BLOCK_INPUT | MediaInputPort::FLAG_BLOCK_OUTPUT);
- // Unblock the output stream now. While it's connected to mDecodedStream,
- // mDecodedStream is responsible for controlling blocking.
- aStream->mStream->ChangeExplicitBlockerCount(-1);
-}
-
void MediaDecoder::UpdateDecodedStream()
{
MOZ_ASSERT(NS_IsMainThread());
GetReentrantMonitor().AssertCurrentThreadIn();
if (GetDecodedStream()) {
bool blockForPlayState = mPlayState != PLAY_STATE_PLAYING || mLogicallySeeking;
if (GetDecodedStream()->mHaveBlockedForPlayState != blockForPlayState) {
GetDecodedStream()->mStream->ChangeExplicitBlockerCount(blockForPlayState ? 1 : -1);
GetDecodedStream()->mHaveBlockedForPlayState = blockForPlayState;
}
}
}
-void MediaDecoder::DestroyDecodedStream()
-{
- MOZ_ASSERT(NS_IsMainThread());
- GetReentrantMonitor().AssertCurrentThreadIn();
-
- // Avoid the redundant blocking to output stream.
- if (!GetDecodedStream()) {
- return;
- }
-
- // All streams are having their SourceMediaStream disconnected, so they
- // need to be explicitly blocked again.
- auto& outputStreams = OutputStreams();
- for (int32_t i = outputStreams.Length() - 1; i >= 0; --i) {
- OutputStreamData& os = outputStreams[i];
- // Explicitly remove all existing ports.
- // This is not strictly necessary but it's good form.
- MOZ_ASSERT(os.mPort, "Double-delete of the ports!");
- os.mPort->Destroy();
- os.mPort = nullptr;
- // During cycle collection, nsDOMMediaStream can be destroyed and send
- // its Destroy message before this decoder is destroyed. So we have to
- // be careful not to send any messages after the Destroy().
- if (os.mStream->IsDestroyed()) {
- // Probably the DOM MediaStream was GCed. Clean up.
- outputStreams.RemoveElementAt(i);
- } else {
- os.mStream->ChangeExplicitBlockerCount(1);
- }
- }
-
- mDecodedStream.DestroyData();
-}
-
void MediaDecoder::UpdateStreamBlockingForStateMachinePlaying()
{
GetReentrantMonitor().AssertCurrentThreadIn();
if (!GetDecodedStream()) {
return;
}
bool blockForStateMachineNotPlaying =
mDecoderStateMachine && !mDecoderStateMachine->IsPlaying();
@@ -377,30 +330,20 @@ void MediaDecoder::RecreateDecodedStream
{
MOZ_ASSERT(NS_IsMainThread());
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
DECODER_LOG("RecreateDecodedStream aStartTimeUSecs=%lld!", aStartTimeUSecs);
if (!aGraph) {
aGraph = GetDecodedStream()->mStream->Graph();
}
- DestroyDecodedStream();
+ mDecodedStream.DestroyData();
mDecodedStream.RecreateData(aStartTimeUSecs, aGraph->CreateSourceStream(nullptr));
- // Note that the delay between removing ports in DestroyDecodedStream
- // and adding new ones won't cause a glitch since all graph operations
- // between main-thread stable states take effect atomically.
- auto& outputStreams = OutputStreams();
- for (int32_t i = outputStreams.Length() - 1; i >= 0; --i) {
- OutputStreamData& os = outputStreams[i];
- MOZ_ASSERT(!os.mStream->IsDestroyed(),
- "Should've been removed in DestroyDecodedStream()");
- ConnectDecodedStreamToOutputStream(&os);
- }
UpdateStreamBlockingForStateMachinePlaying();
GetDecodedStream()->mHaveBlockedForPlayState = mPlayState != PLAY_STATE_PLAYING;
if (GetDecodedStream()->mHaveBlockedForPlayState) {
GetDecodedStream()->mStream->ChangeExplicitBlockerCount(1);
}
}
@@ -413,23 +356,17 @@ void MediaDecoder::AddOutputStream(Proce
{
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
if (mDecoderStateMachine) {
mDecoderStateMachine->DispatchAudioCaptured();
}
if (!GetDecodedStream()) {
RecreateDecodedStream(mLogicalPosition, aStream->Graph());
}
- OutputStreamData* os = OutputStreams().AppendElement();
- os->Init(&mDecodedStream, aStream);
- ConnectDecodedStreamToOutputStream(os);
- if (aFinishWhenEnded) {
- // Ensure that aStream finishes the moment mDecodedStream does.
- aStream->SetAutofinish(true);
- }
+ mDecodedStream.Connect(aStream, aFinishWhenEnded);
}
// This can be called before Load(), in which case our mDecoderStateMachine
// won't have been created yet and we can rely on Load() to schedule it
// once it is created.
if (mDecoderStateMachine) {
// Make sure the state machine thread runs so that any buffered data
// is fed into our stream.
@@ -570,17 +507,17 @@ void MediaDecoder::Shutdown()
MediaDecoder::~MediaDecoder()
{
MOZ_ASSERT(NS_IsMainThread());
{
// Don't destroy the decoded stream until destructor in order to keep the
// invariant that the decoded stream is always available in capture mode.
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
- DestroyDecodedStream();
+ mDecodedStream.DestroyData();
}
MediaMemoryTracker::RemoveMediaDecoder(this);
UnpinForSeek();
MOZ_COUNT_DTOR(MediaDecoder);
}
nsresult MediaDecoder::OpenResource(nsIStreamListener** aStreamListener)
{
--- a/dom/media/MediaDecoder.h
+++ b/dom/media/MediaDecoder.h
@@ -390,48 +390,32 @@ public:
// All MediaStream-related data is protected by mReentrantMonitor.
// We have at most one DecodedStreamData per MediaDecoder. Its stream
// is used as the input for each ProcessedMediaStream created by calls to
// captureStream(UntilEnded). Seeking creates a new source stream, as does
// replaying after the input as ended. In the latter case, the new source is
// not connected to streams created by captureStreamUntilEnded.
- /**
- * Connects mDecodedStream->mStream to aStream->mStream.
- */
- void ConnectDecodedStreamToOutputStream(OutputStreamData* aStream);
-
void UpdateDecodedStream();
/**
- * Disconnects mDecodedStream->mStream from all outputs and clears
- * mDecodedStream.
- */
- void DestroyDecodedStream();
- /**
* Recreates mDecodedStream. Call this to create mDecodedStream at first,
* and when seeking, to ensure a new stream is set up with fresh buffers.
* aStartTimeUSecs is relative to the state machine's mStartTime.
* Decoder monitor must be held.
*/
void RecreateDecodedStream(int64_t aStartTimeUSecs,
MediaStreamGraph* aGraph = nullptr);
/**
* Call this when mDecoderStateMachine or mDecoderStateMachine->IsPlaying() changes.
* Decoder monitor must be held.
*/
void UpdateStreamBlockingForStateMachinePlaying();
- nsTArray<OutputStreamData>& OutputStreams()
- {
- GetReentrantMonitor().AssertCurrentThreadIn();
- return mDecodedStream.OutputStreams();
- }
-
DecodedStreamData* GetDecodedStream()
{
GetReentrantMonitor().AssertCurrentThreadIn();
return mDecodedStream.GetData();
}
// Add an output stream. All decoder output will be sent to the stream.
// The stream is initially blocked. The decoder is responsible for unblocking
--- a/dom/media/omx/MediaOmxCommonDecoder.cpp
+++ b/dom/media/omx/MediaOmxCommonDecoder.cpp
@@ -42,17 +42,17 @@ MediaOmxCommonDecoder::SetPlatformCanOff
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
mCanOffloadAudio = aCanOffloadAudio;
}
bool
MediaOmxCommonDecoder::CheckDecoderCanOffloadAudio()
{
return (mCanOffloadAudio && !mFallbackToStateMachine &&
- !OutputStreams().Length() && mPlaybackRate == 1.0);
+ !GetDecodedStream() && mPlaybackRate == 1.0);
}
void
MediaOmxCommonDecoder::FirstFrameLoaded(nsAutoPtr<MediaInfo> aInfo,
MediaDecoderEventVisibility aEventVisibility)
{
MOZ_ASSERT(NS_IsMainThread());
--- a/gfx/layers/IMFYCbCrImage.cpp
+++ b/gfx/layers/IMFYCbCrImage.cpp
@@ -203,19 +203,19 @@ IMFYCbCrImage::GetD3D9TextureClient(Comp
mData.mCbCrSize);
return mTextureClient;
}
TextureClient*
IMFYCbCrImage::GetTextureClient(CompositableClient* aClient)
{
- ID3D11Device* device = gfxWindowsPlatform::GetPlatform()->GetD3D11MediaDevice();
+ ID3D11Device* device = gfxWindowsPlatform::GetPlatform()->GetD3D11ImageBridgeDevice();
if (!device ||
- aClient->GetForwarder()->GetCompositorBackendType() != LayersBackend::LAYERS_D3D11) {
+ aClient->GetForwarder()->GetCompositorBackendType() != LayersBackend::LAYERS_D3D11) {
IDirect3DDevice9* d3d9device = gfxWindowsPlatform::GetPlatform()->GetD3D9Device();
if (d3d9device && aClient->GetForwarder()->GetCompositorBackendType() == LayersBackend::LAYERS_D3D9) {
return GetD3D9TextureClient(aClient);
}
return nullptr;
}
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -406,17 +406,16 @@ public:
}
};
NS_IMPL_ISUPPORTS(D3D9SharedTextureReporter, nsIMemoryReporter)
gfxWindowsPlatform::gfxWindowsPlatform()
: mD3D11DeviceInitialized(false)
, mIsWARP(false)
- , mCanInitMediaDevice(false)
, mHasDeviceReset(false)
{
mUseClearTypeForDownloadableFonts = UNINITIALIZED_VALUE;
mUseClearTypeAlways = UNINITIALIZED_VALUE;
mUsingGDIFonts = false;
/*
@@ -1595,65 +1594,25 @@ gfxWindowsPlatform::GetD3D11ContentDevic
}
InitD3D11Devices();
return mD3D11ContentDevice;
}
ID3D11Device*
-gfxWindowsPlatform::GetD3D11MediaDevice()
+gfxWindowsPlatform::GetD3D11ImageBridgeDevice()
{
- if (mD3D11MediaDevice) {
- return mD3D11MediaDevice;
- }
-
- if (!mCanInitMediaDevice) {
- return nullptr;
+ if (mD3D11DeviceInitialized) {
+ return mD3D11ImageBridgeDevice;
}
- mCanInitMediaDevice = false;
-
- nsModuleHandle d3d11Module(LoadLibrarySystem32(L"d3d11.dll"));
- decltype(D3D11CreateDevice)* d3d11CreateDevice = (decltype(D3D11CreateDevice)*)
- GetProcAddress(d3d11Module, "D3D11CreateDevice");
- MOZ_ASSERT(d3d11CreateDevice);
-
- nsTArray<D3D_FEATURE_LEVEL> featureLevels;
- if (IsWin8OrLater()) {
- featureLevels.AppendElement(D3D_FEATURE_LEVEL_11_1);
- }
- featureLevels.AppendElement(D3D_FEATURE_LEVEL_11_0);
- featureLevels.AppendElement(D3D_FEATURE_LEVEL_10_1);
- featureLevels.AppendElement(D3D_FEATURE_LEVEL_10_0);
- featureLevels.AppendElement(D3D_FEATURE_LEVEL_9_3);
-
- RefPtr<IDXGIAdapter1> adapter = GetDXGIAdapter();
- MOZ_ASSERT(adapter);
+ InitD3D11Devices();
- HRESULT hr = E_INVALIDARG;
-
- MOZ_SEH_TRY{
- hr = d3d11CreateDevice(adapter, D3D_DRIVER_TYPE_UNKNOWN, nullptr,
- D3D11_CREATE_DEVICE_BGRA_SUPPORT,
- featureLevels.Elements(), featureLevels.Length(),
- D3D11_SDK_VERSION, byRef(mD3D11MediaDevice), nullptr, nullptr);
- } MOZ_SEH_EXCEPT(EXCEPTION_EXECUTE_HANDLER) {
- mD3D11MediaDevice = nullptr;
- }
-
- d3d11Module.disown();
-
- if (FAILED(hr)) {
- return nullptr;
- }
-
- mD3D11MediaDevice->SetExceptionMode(0);
-
- return mD3D11MediaDevice;
+ return mD3D11ImageBridgeDevice;
}
ReadbackManagerD3D11*
gfxWindowsPlatform::GetReadbackManager()
{
if (!mD3D11ReadbackManager) {
mD3D11ReadbackManager = new ReadbackManagerD3D11();
@@ -1771,29 +1730,21 @@ bool DoesD3D11DeviceWork(ID3D11Device *d
}
}
result = true;
return true;
}
// See bug 1083071. On some drivers, Direct3D 11 CreateShaderResourceView fails
// with E_OUTOFMEMORY.
-bool DoesD3D11TextureSharingWork(ID3D11Device *device)
+bool DoesD3D11TextureSharingWorkInternal(ID3D11Device *device, DXGI_FORMAT format, UINT bindflags)
{
- static bool checked = false;
- static bool result = false;
-
- if (checked)
- return result;
- checked = true;
-
if (gfxPrefs::Direct2DForceEnabled() ||
gfxPrefs::LayersAccelerationForceEnabled())
{
- result = true;
return true;
}
if (GetModuleHandleW(L"atidxx32.dll")) {
nsCOMPtr<nsIGfxInfo> gfxInfo = do_GetService("@mozilla.org/gfx/info;1");
if (gfxInfo) {
nsString vendorID, vendorID2;
gfxInfo->GetAdapterVendorID(vendorID);
@@ -1808,23 +1759,23 @@ bool DoesD3D11TextureSharingWork(ID3D11D
}
RefPtr<ID3D11Texture2D> texture;
D3D11_TEXTURE2D_DESC desc;
desc.Width = 32;
desc.Height = 32;
desc.MipLevels = 1;
desc.ArraySize = 1;
- desc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
+ desc.Format = format;
desc.SampleDesc.Count = 1;
desc.SampleDesc.Quality = 0;
desc.Usage = D3D11_USAGE_DEFAULT;
desc.CPUAccessFlags = 0;
desc.MiscFlags = D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX;
- desc.BindFlags = D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE;
+ desc.BindFlags = bindflags;
if (FAILED(device->CreateTexture2D(&desc, NULL, byRef(texture)))) {
return false;
}
HANDLE shareHandle;
nsRefPtr<IDXGIResource> otherResource;
if (FAILED(texture->QueryInterface(__uuidof(IDXGIResource),
getter_AddRefs(otherResource))))
@@ -1855,20 +1806,32 @@ bool DoesD3D11TextureSharingWork(ID3D11D
// This if(FAILED()) is the one that actually fails on systems affected by bug 1083071.
if (FAILED(device->CreateShaderResourceView(sharedTexture, NULL, byRef(sharedView)))) {
#if defined(MOZ_CRASHREPORTER)
CrashReporter::AppendAppNotesToCrashReport(NS_LITERAL_CSTRING("CreateShaderResourceView failed\n"));
#endif
return false;
}
- result = true;
return true;
}
+bool DoesD3D11TextureSharingWork(ID3D11Device *device)
+{
+ static bool checked;
+ static bool result;
+
+ if (checked)
+ return result;
+ checked = true;
+
+ result = DoesD3D11TextureSharingWorkInternal(device, DXGI_FORMAT_B8G8R8A8_UNORM, D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE);
+ return result;
+}
+
void
gfxWindowsPlatform::InitD3D11Devices()
{
// This function attempts to initialize our D3D11 devices. If the hardware
// is not blacklisted for D3D11 layers. This will first attempt to create a
// hardware accelerated device. If this creation fails or the hardware is
// blacklisted, then this function will abort if WARP is disabled, causing us
// to fallback to D3D9 or Basic layers. If WARP is not disabled it will use
@@ -2030,17 +1993,37 @@ gfxWindowsPlatform::InitD3D11Devices()
}
mD3D11ContentDevice->SetExceptionMode(0);
Factory::SetDirect3D11Device(mD3D11ContentDevice);
}
if (!useWARP) {
- mCanInitMediaDevice = true;
+ hr = E_INVALIDARG;
+
+ MOZ_SEH_TRY{
+ hr = d3d11CreateDevice(adapter, D3D_DRIVER_TYPE_UNKNOWN, nullptr,
+ D3D11_CREATE_DEVICE_BGRA_SUPPORT,
+ featureLevels.Elements(), featureLevels.Length(),
+ D3D11_SDK_VERSION, byRef(mD3D11ImageBridgeDevice), nullptr, nullptr);
+ } MOZ_SEH_EXCEPT(EXCEPTION_EXECUTE_HANDLER) {
+ mD3D11ImageBridgeDevice = nullptr;
+ }
+
+ if (FAILED(hr)) {
+ d3d11Module.disown();
+ return;
+ }
+
+ mD3D11ImageBridgeDevice->SetExceptionMode(0);
+
+ if (!DoesD3D11TextureSharingWorkInternal(mD3D11ImageBridgeDevice, DXGI_FORMAT_A8_UNORM, D3D11_BIND_SHADER_RESOURCE)) {
+ mD3D11ImageBridgeDevice = nullptr;
+ }
}
// We leak these everywhere and we need them our entire runtime anyway, let's
// leak it here as well.
d3d11Module.disown();
}
TemporaryRef<ID3D11Device>
--- a/gfx/thebes/gfxWindowsPlatform.h
+++ b/gfx/thebes/gfxWindowsPlatform.h
@@ -239,17 +239,18 @@ public:
mozilla::layers::DeviceManagerD3D9* GetD3D9DeviceManager();
IDirect3DDevice9* GetD3D9Device();
#ifdef CAIRO_HAS_D2D_SURFACE
cairo_device_t *GetD2DDevice() { return mD2DDevice; }
ID3D10Device1 *GetD3D10Device() { return mD2DDevice ? cairo_d2d_device_get_device(mD2DDevice) : nullptr; }
#endif
ID3D11Device *GetD3D11Device();
ID3D11Device *GetD3D11ContentDevice();
- ID3D11Device *GetD3D11MediaDevice();
+ // Device to be used on the ImageBridge thread
+ ID3D11Device *GetD3D11ImageBridgeDevice();
// Create a D3D11 device to be used for DXVA decoding.
mozilla::TemporaryRef<ID3D11Device> CreateD3D11DecoderDevice();
mozilla::layers::ReadbackManagerD3D11* GetReadbackManager();
static bool IsOptimus();
@@ -289,21 +290,20 @@ private:
#endif
#ifdef CAIRO_HAS_D2D_SURFACE
cairo_device_t *mD2DDevice;
#endif
mozilla::RefPtr<IDXGIAdapter1> mAdapter;
nsRefPtr<mozilla::layers::DeviceManagerD3D9> mDeviceManager;
mozilla::RefPtr<ID3D11Device> mD3D11Device;
mozilla::RefPtr<ID3D11Device> mD3D11ContentDevice;
- mozilla::RefPtr<ID3D11Device> mD3D11MediaDevice;
+ mozilla::RefPtr<ID3D11Device> mD3D11ImageBridgeDevice;
bool mD3D11DeviceInitialized;
mozilla::RefPtr<mozilla::layers::ReadbackManagerD3D11> mD3D11ReadbackManager;
bool mIsWARP;
- bool mCanInitMediaDevice;
bool mHasDeviceReset;
DeviceResetReason mDeviceResetReason;
virtual void GetPlatformCMSOutputProfile(void* &mem, size_t &size);
};
bool DoesD3D11TextureSharingWork(ID3D11Device *device);
bool DoesD3D11DeviceWork(ID3D11Device *device);
--- a/hal/gonk/GonkDiskSpaceWatcher.cpp
+++ b/hal/gonk/GonkDiskSpaceWatcher.cpp
@@ -175,22 +175,24 @@ void
GonkDiskSpaceWatcher::DoStart()
{
NS_ASSERTION(XRE_GetIOMessageLoop() == MessageLoopForIO::current(),
"Not on the correct message loop");
mFd = fanotify_init(FAN_CLASS_NOTIF, FAN_CLOEXEC | O_LARGEFILE);
if (mFd == -1) {
if (errno == ENOSYS) {
- NS_WARNING("Warning: No fanotify support in this device's kernel.\n");
+ // Don't change these printf_stderr since we need these logs even
+ // in opt builds.
+ printf_stderr("Warning: No fanotify support in this device's kernel.\n");
#if ANDROID_VERSION >= 19
MOZ_CRASH("Fanotify support must be enabled in the kernel.");
#endif
} else {
- NS_WARNING("Error calling fanotify_init()");
+ printf_stderr("Error calling fanotify_init()");
}
return;
}
if (fanotify_mark(mFd, FAN_MARK_ADD | FAN_MARK_MOUNT, FAN_CLOSE,
0, kWatchedPath) < 0) {
NS_WARNING("Error calling fanotify_mark");
close(mFd);
--- a/layout/xul/nsXULPopupManager.cpp
+++ b/layout/xul/nsXULPopupManager.cpp
@@ -2173,16 +2173,17 @@ nsXULPopupManager::HandleKeyboardEventWi
aKeyEvent->GetKeyCode(&keyCode);
// Escape should close panels, but the other keys should have no effect.
if (aTopVisibleMenuItem &&
aTopVisibleMenuItem->PopupType() != ePopupTypeMenu) {
if (keyCode == nsIDOMKeyEvent::DOM_VK_ESCAPE) {
HidePopup(aTopVisibleMenuItem->Content(), false, false, false, true);
aKeyEvent->StopPropagation();
+ aKeyEvent->StopCrossProcessForwarding();
aKeyEvent->PreventDefault();
}
return true;
}
bool consume = (mPopups || mActiveMenuBar);
switch (keyCode) {
case nsIDOMKeyEvent::DOM_VK_LEFT:
@@ -2244,16 +2245,17 @@ nsXULPopupManager::HandleKeyboardEventWi
}
default:
return false;
}
if (consume) {
aKeyEvent->StopPropagation();
+ aKeyEvent->StopCrossProcessForwarding();
aKeyEvent->PreventDefault();
}
return true;
}
nsMenuFrame*
nsXULPopupManager::GetNextMenuItem(nsContainerFrame* aParent,
nsMenuFrame* aStart,
@@ -2444,16 +2446,17 @@ nsXULPopupManager::KeyUp(nsIDOMKeyEvent*
// don't do anything if a menu isn't open or a menubar isn't active
if (!mActiveMenuBar) {
nsMenuChainItem* item = GetTopVisibleMenu();
if (!item || item->PopupType() != ePopupTypeMenu)
return NS_OK;
}
aKeyEvent->StopPropagation();
+ aKeyEvent->StopCrossProcessForwarding();
aKeyEvent->PreventDefault();
return NS_OK; // I am consuming event
}
nsresult
nsXULPopupManager::KeyDown(nsIDOMKeyEvent* aKeyEvent)
{
@@ -2502,16 +2505,17 @@ nsXULPopupManager::KeyDown(nsIDOMKeyEven
}
aKeyEvent->PreventDefault();
}
}
// Since a menu was open, stop propagation of the event to keep other event
// listeners from becoming confused.
aKeyEvent->StopPropagation();
+ aKeyEvent->StopCrossProcessForwarding();
return NS_OK;
}
nsresult
nsXULPopupManager::KeyPress(nsIDOMKeyEvent* aKeyEvent)
{
// Don't check prevent default flag -- menus always get first shot at key events.
@@ -2523,16 +2527,17 @@ nsXULPopupManager::KeyPress(nsIDOMKeyEve
nsCOMPtr<nsIDOMKeyEvent> keyEvent = do_QueryInterface(aKeyEvent);
NS_ENSURE_TRUE(keyEvent, NS_ERROR_UNEXPECTED);
// if a menu is open or a menubar is active, it consumes the key event
bool consume = (mPopups || mActiveMenuBar);
HandleShortcutNavigation(keyEvent, nullptr);
if (consume) {
aKeyEvent->StopPropagation();
+ aKeyEvent->StopCrossProcessForwarding();
aKeyEvent->PreventDefault();
}
return NS_OK; // I am consuming event
}
NS_IMETHODIMP
nsXULPopupShowingEvent::Run()