зеркало из https://github.com/mozilla/gecko-dev.git
Merge m-c to fx-team. a=merge
This commit is contained in:
Коммит
5af2fd23a7
|
@ -52,4 +52,8 @@ if CONFIG['MOZ_ENABLE_DBUS']:
|
||||||
|
|
||||||
include('/ipc/chromium/chromium-config.mozbuild')
|
include('/ipc/chromium/chromium-config.mozbuild')
|
||||||
|
|
||||||
|
if CONFIG['CLANG_CXX']:
|
||||||
|
# Suppress clang warning about unused function from gobject's RTTI macros.
|
||||||
|
CXXFLAGS += ['-Wno-unused-function']
|
||||||
|
|
||||||
FAIL_ON_WARNINGS = True
|
FAIL_ON_WARNINGS = True
|
||||||
|
|
|
@ -995,10 +995,10 @@ pref("apz.pan_repaint_interval", 16);
|
||||||
// APZ physics settings, tuned by UX designers
|
// APZ physics settings, tuned by UX designers
|
||||||
pref("apz.fling_curve_function_x1", "0.41");
|
pref("apz.fling_curve_function_x1", "0.41");
|
||||||
pref("apz.fling_curve_function_y1", "0.0");
|
pref("apz.fling_curve_function_y1", "0.0");
|
||||||
pref("apz.fling_curve_function_x2", "0.76");
|
pref("apz.fling_curve_function_x2", "0.80");
|
||||||
pref("apz.fling_curve_function_y2", "1.0");
|
pref("apz.fling_curve_function_y2", "1.0");
|
||||||
pref("apz.fling_curve_threshold_inches_per_ms", "0.01");
|
pref("apz.fling_curve_threshold_inches_per_ms", "0.01");
|
||||||
pref("apz.fling_friction", "0.0024");
|
pref("apz.fling_friction", "0.00238");
|
||||||
pref("apz.max_velocity_inches_per_ms", "0.07");
|
pref("apz.max_velocity_inches_per_ms", "0.07");
|
||||||
|
|
||||||
// Tweak default displayport values to reduce the risk of running out of
|
// Tweak default displayport values to reduce the risk of running out of
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<project name="platform_build" path="build" remote="b2g" revision="3ab0d9c70f0b2e1ededc679112c392303f037361">
|
<project name="platform_build" path="build" remote="b2g" revision="3ab0d9c70f0b2e1ededc679112c392303f037361">
|
||||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||||
</project>
|
</project>
|
||||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="2650bae535e15eef5f299cc80d4fab460f78ada7"/>
|
<project name="gaia" path="gaia" remote="mozillaorg" revision="994125f21ffc162e8fe02b3670380495b5390774"/>
|
||||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||||
</project>
|
</project>
|
||||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="2650bae535e15eef5f299cc80d4fab460f78ada7"/>
|
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="994125f21ffc162e8fe02b3670380495b5390774"/>
|
||||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d5d3f93914558b6f168447b805cd799c8233e300"/>
|
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d5d3f93914558b6f168447b805cd799c8233e300"/>
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
</project>
|
</project>
|
||||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="2650bae535e15eef5f299cc80d4fab460f78ada7"/>
|
<project name="gaia" path="gaia" remote="mozillaorg" revision="994125f21ffc162e8fe02b3670380495b5390774"/>
|
||||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8374a0d66ca9228269e860089c1535fcda9f9c5f"/>
|
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8374a0d66ca9228269e860089c1535fcda9f9c5f"/>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<project name="platform_build" path="build" remote="b2g" revision="3ab0d9c70f0b2e1ededc679112c392303f037361">
|
<project name="platform_build" path="build" remote="b2g" revision="3ab0d9c70f0b2e1ededc679112c392303f037361">
|
||||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||||
</project>
|
</project>
|
||||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="2650bae535e15eef5f299cc80d4fab460f78ada7"/>
|
<project name="gaia" path="gaia" remote="mozillaorg" revision="994125f21ffc162e8fe02b3670380495b5390774"/>
|
||||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||||
</project>
|
</project>
|
||||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="2650bae535e15eef5f299cc80d4fab460f78ada7"/>
|
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="994125f21ffc162e8fe02b3670380495b5390774"/>
|
||||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d5d3f93914558b6f168447b805cd799c8233e300"/>
|
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d5d3f93914558b6f168447b805cd799c8233e300"/>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<project name="platform_build" path="build" remote="b2g" revision="3ab0d9c70f0b2e1ededc679112c392303f037361">
|
<project name="platform_build" path="build" remote="b2g" revision="3ab0d9c70f0b2e1ededc679112c392303f037361">
|
||||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||||
</project>
|
</project>
|
||||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="2650bae535e15eef5f299cc80d4fab460f78ada7"/>
|
<project name="gaia" path="gaia" remote="mozillaorg" revision="994125f21ffc162e8fe02b3670380495b5390774"/>
|
||||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
</project>
|
</project>
|
||||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="2650bae535e15eef5f299cc80d4fab460f78ada7"/>
|
<project name="gaia" path="gaia" remote="mozillaorg" revision="994125f21ffc162e8fe02b3670380495b5390774"/>
|
||||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8374a0d66ca9228269e860089c1535fcda9f9c5f"/>
|
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8374a0d66ca9228269e860089c1535fcda9f9c5f"/>
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
"remote": "",
|
"remote": "",
|
||||||
"branch": ""
|
"branch": ""
|
||||||
},
|
},
|
||||||
"revision": "9e971d42c915f999f3e352fe43fca7ba0a5245b4",
|
"revision": "0928af6ba8010181592fc8eedae9550ac8597f53",
|
||||||
"repo_path": "integration/gaia-central"
|
"repo_path": "integration/gaia-central"
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||||
</project>
|
</project>
|
||||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="2650bae535e15eef5f299cc80d4fab460f78ada7"/>
|
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="994125f21ffc162e8fe02b3670380495b5390774"/>
|
||||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||||
</project>
|
</project>
|
||||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="2650bae535e15eef5f299cc80d4fab460f78ada7"/>
|
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="994125f21ffc162e8fe02b3670380495b5390774"/>
|
||||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
</project>
|
</project>
|
||||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="2650bae535e15eef5f299cc80d4fab460f78ada7"/>
|
<project name="gaia" path="gaia" remote="mozillaorg" revision="994125f21ffc162e8fe02b3670380495b5390774"/>
|
||||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8374a0d66ca9228269e860089c1535fcda9f9c5f"/>
|
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8374a0d66ca9228269e860089c1535fcda9f9c5f"/>
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||||
</project>
|
</project>
|
||||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="2650bae535e15eef5f299cc80d4fab460f78ada7"/>
|
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="994125f21ffc162e8fe02b3670380495b5390774"/>
|
||||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||||
|
|
|
@ -451,6 +451,8 @@
|
||||||
@BINPATH@/components/RILContentHelper.js
|
@BINPATH@/components/RILContentHelper.js
|
||||||
@BINPATH@/components/RILSystemMessengerHelper.js
|
@BINPATH@/components/RILSystemMessengerHelper.js
|
||||||
@BINPATH@/components/RILSystemMessengerHelper.manifest
|
@BINPATH@/components/RILSystemMessengerHelper.manifest
|
||||||
|
@BINPATH@/components/SmsService.js
|
||||||
|
@BINPATH@/components/SmsService.manifest
|
||||||
@BINPATH@/components/TelephonyAudioService.js
|
@BINPATH@/components/TelephonyAudioService.js
|
||||||
@BINPATH@/components/TelephonyAudioService.manifest
|
@BINPATH@/components/TelephonyAudioService.manifest
|
||||||
@BINPATH@/components/TelephonyService.js
|
@BINPATH@/components/TelephonyService.js
|
||||||
|
|
|
@ -1849,3 +1849,6 @@ pref("extensions.interposition.enabled", true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pref("browser.defaultbrowser.notificationbar", false);
|
pref("browser.defaultbrowser.notificationbar", false);
|
||||||
|
|
||||||
|
// How many milliseconds to wait for a CPOW response from the child process.
|
||||||
|
pref("dom.ipc.cpow.timeout", 0);
|
||||||
|
|
|
@ -6746,7 +6746,7 @@ function isTabEmpty(aTab) {
|
||||||
if (!gMultiProcessBrowser && browser.contentWindow.opener)
|
if (!gMultiProcessBrowser && browser.contentWindow.opener)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (browser.sessionHistory && browser.sessionHistory.count >= 2)
|
if (browser.canGoForward || browser.canGoBack)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -29,7 +29,7 @@ Cell.prototype = {
|
||||||
/**
|
/**
|
||||||
* The cell's DOM node.
|
* The cell's DOM node.
|
||||||
*/
|
*/
|
||||||
get node() this._node,
|
get node() { return this._node; },
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The cell's offset in the grid.
|
* The cell's offset in the grid.
|
||||||
|
|
|
@ -18,15 +18,15 @@ let gDrag = {
|
||||||
* The site that is dragged.
|
* The site that is dragged.
|
||||||
*/
|
*/
|
||||||
_draggedSite: null,
|
_draggedSite: null,
|
||||||
get draggedSite() this._draggedSite,
|
get draggedSite() { return this._draggedSite; },
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The cell width/height at the point the drag started.
|
* The cell width/height at the point the drag started.
|
||||||
*/
|
*/
|
||||||
_cellWidth: null,
|
_cellWidth: null,
|
||||||
_cellHeight: null,
|
_cellHeight: null,
|
||||||
get cellWidth() this._cellWidth,
|
get cellWidth() { return this._cellWidth; },
|
||||||
get cellHeight() this._cellHeight,
|
get cellHeight() { return this._cellHeight; },
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start a new drag operation.
|
* Start a new drag operation.
|
||||||
|
@ -146,6 +146,6 @@ let gDrag = {
|
||||||
|
|
||||||
// After the 'dragstart' event has been processed we can remove the
|
// After the 'dragstart' event has been processed we can remove the
|
||||||
// temporary drag element from the DOM.
|
// temporary drag element from the DOM.
|
||||||
setTimeout(function () scrollbox.removeChild(dragElement), 0);
|
setTimeout(() => scrollbox.removeChild(dragElement), 0);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -73,7 +73,7 @@ let gDrop = {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Re-pin all shifted pinned cells.
|
// Re-pin all shifted pinned cells.
|
||||||
pinnedSites.forEach(function (aSite) aSite.pin(sites.indexOf(aSite)), this);
|
pinnedSites.forEach(aSite => aSite.pin(sites.indexOf(aSite)));
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,7 +18,7 @@ let gGrid = {
|
||||||
* The DOM node of the grid.
|
* The DOM node of the grid.
|
||||||
*/
|
*/
|
||||||
_node: null,
|
_node: null,
|
||||||
get node() this._node,
|
get node() { return this._node; },
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The cached DOM fragment for sites.
|
* The cached DOM fragment for sites.
|
||||||
|
@ -29,18 +29,18 @@ let gGrid = {
|
||||||
* All cells contained in the grid.
|
* All cells contained in the grid.
|
||||||
*/
|
*/
|
||||||
_cells: [],
|
_cells: [],
|
||||||
get cells() this._cells,
|
get cells() { return this._cells; },
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All sites contained in the grid's cells. Sites may be empty.
|
* All sites contained in the grid's cells. Sites may be empty.
|
||||||
*/
|
*/
|
||||||
get sites() [for (cell of this.cells) cell.site],
|
get sites() { return [for (cell of this.cells) cell.site]; },
|
||||||
|
|
||||||
// Tells whether the grid has already been initialized.
|
// Tells whether the grid has already been initialized.
|
||||||
get ready() !!this._ready,
|
get ready() { return !!this._ready; },
|
||||||
|
|
||||||
// Returns whether the page has finished loading yet.
|
// Returns whether the page has finished loading yet.
|
||||||
get isDocumentLoaded() document.readyState == "complete",
|
get isDocumentLoaded() { return document.readyState == "complete"; },
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the grid.
|
* Initializes the grid.
|
||||||
|
|
|
@ -22,22 +22,22 @@ Site.prototype = {
|
||||||
/**
|
/**
|
||||||
* The site's DOM node.
|
* The site's DOM node.
|
||||||
*/
|
*/
|
||||||
get node() this._node,
|
get node() { return this._node; },
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The site's link.
|
* The site's link.
|
||||||
*/
|
*/
|
||||||
get link() this._link,
|
get link() { return this._link; },
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The url of the site's link.
|
* The url of the site's link.
|
||||||
*/
|
*/
|
||||||
get url() this.link.url,
|
get url() { return this.link.url; },
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The title of the site's link.
|
* The title of the site's link.
|
||||||
*/
|
*/
|
||||||
get title() this.link.title,
|
get title() { return this.link.title; },
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The site's parent cell.
|
* The site's parent cell.
|
||||||
|
|
|
@ -1067,7 +1067,7 @@ nsContextMenu.prototype = {
|
||||||
mm.removeMessageListener("ContextMenu:SaveVideoFrameAsImage:Result", onMessage);
|
mm.removeMessageListener("ContextMenu:SaveVideoFrameAsImage:Result", onMessage);
|
||||||
let dataURL = message.data.dataURL;
|
let dataURL = message.data.dataURL;
|
||||||
saveImageURL(dataURL, name, "SaveImageTitle", true, false,
|
saveImageURL(dataURL, name, "SaveImageTitle", true, false,
|
||||||
document.documentURIObject, this.target.ownerDocument);
|
document.documentURIObject, document);
|
||||||
};
|
};
|
||||||
mm.addMessageListener("ContextMenu:SaveVideoFrameAsImage:Result", onMessage);
|
mm.addMessageListener("ContextMenu:SaveVideoFrameAsImage:Result", onMessage);
|
||||||
},
|
},
|
||||||
|
|
|
@ -124,7 +124,7 @@ function restoreSession() {
|
||||||
if (gTreeData[t].checked === 0)
|
if (gTreeData[t].checked === 0)
|
||||||
// this window will be restored partially
|
// this window will be restored partially
|
||||||
gStateObject.windows[ix].tabs =
|
gStateObject.windows[ix].tabs =
|
||||||
gStateObject.windows[ix].tabs.filter(function(aTabData, aIx)
|
gStateObject.windows[ix].tabs.filter((aTabData, aIx) =>
|
||||||
gTreeData[t].tabs[aIx].checked);
|
gTreeData[t].tabs[aIx].checked);
|
||||||
else if (!gTreeData[t].checked)
|
else if (!gTreeData[t].checked)
|
||||||
// this window won't be restored at all
|
// this window won't be restored at all
|
||||||
|
@ -218,12 +218,14 @@ function getBrowserWindow() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleRowChecked(aIx) {
|
function toggleRowChecked(aIx) {
|
||||||
|
function isChecked(aItem) {
|
||||||
|
return aItem.checked;
|
||||||
|
}
|
||||||
|
|
||||||
var item = gTreeData[aIx];
|
var item = gTreeData[aIx];
|
||||||
item.checked = !item.checked;
|
item.checked = !item.checked;
|
||||||
treeView.treeBox.invalidateRow(aIx);
|
treeView.treeBox.invalidateRow(aIx);
|
||||||
|
|
||||||
function isChecked(aItem) aItem.checked;
|
|
||||||
|
|
||||||
if (treeView.isContainer(aIx)) {
|
if (treeView.isContainer(aIx)) {
|
||||||
// (un)check all tabs of this window as well
|
// (un)check all tabs of this window as well
|
||||||
for (let tab of item.tabs) {
|
for (let tab of item.tabs) {
|
||||||
|
|
|
@ -42,9 +42,9 @@ function checkState(tab) {
|
||||||
// deserialized in the content scope. And in this case, since RegExps are
|
// deserialized in the content scope. And in this case, since RegExps are
|
||||||
// not currently Xrayable (see bug 1014991), trying to pull |obj3| (a RegExp)
|
// not currently Xrayable (see bug 1014991), trying to pull |obj3| (a RegExp)
|
||||||
// off of an Xrayed Object won't work. So we need to waive.
|
// off of an Xrayed Object won't work. So we need to waive.
|
||||||
runInContent(tab.linkedBrowser, function(win, event) {
|
runInContent(tab.linkedBrowser, function(win, state) {
|
||||||
return Cu.waiveXrays(event.state).obj3.toString();
|
return Cu.waiveXrays(state).obj3.toString();
|
||||||
}, aEvent).then(function(stateStr) {
|
}, aEvent.state).then(function(stateStr) {
|
||||||
is(stateStr, '/^a$/', "second popstate object.");
|
is(stateStr, '/^a$/', "second popstate object.");
|
||||||
|
|
||||||
// Make sure that the new-elem node is present in the document. If it's
|
// Make sure that the new-elem node is present in the document. If it's
|
||||||
|
|
|
@ -154,12 +154,11 @@ def GeckoFramework(name, **kwargs):
|
||||||
|
|
||||||
|
|
||||||
@template
|
@template
|
||||||
def XPCOMBinaryComponent(name):
|
def XPCOMBinaryComponent(name, **kwargs):
|
||||||
'''Template defining an XPCOM binary component for Gecko.
|
'''Template defining an XPCOM binary component for Gecko.
|
||||||
|
|
||||||
`name` is the name of the component.
|
`name` is the name of the component.
|
||||||
'''
|
'''
|
||||||
GeckoSharedLibrary(name)
|
GeckoSharedLibrary(name, **kwargs)
|
||||||
|
|
||||||
IS_COMPONENT = True
|
IS_COMPONENT = True
|
||||||
|
|
||||||
|
|
|
@ -725,6 +725,18 @@ this.DOMApplicationRegistry = {
|
||||||
|
|
||||||
yield this.loadCurrentRegistry();
|
yield this.loadCurrentRegistry();
|
||||||
|
|
||||||
|
// Sanity check and roll back previous incomplete app updates.
|
||||||
|
for (let id in this.webapps) {
|
||||||
|
let oldDir = FileUtils.getDir(DIRECTORY_NAME, ["webapps", id + ".old"], false, true);
|
||||||
|
if (oldDir.exists()) {
|
||||||
|
let dir = FileUtils.getDir(DIRECTORY_NAME, ["webapps", id], false, true);
|
||||||
|
if (dir.exists()) {
|
||||||
|
dir.remove(true);
|
||||||
|
}
|
||||||
|
oldDir.moveTo(null, id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let systemManifestURL =
|
let systemManifestURL =
|
||||||
Services.prefs.getCharPref("b2g.system_manifest_url");
|
Services.prefs.getCharPref("b2g.system_manifest_url");
|
||||||
|
@ -1854,8 +1866,6 @@ this.DOMApplicationRegistry = {
|
||||||
app.readyToApplyDownload = true;
|
app.readyToApplyDownload = true;
|
||||||
app.updateTime = Date.now();
|
app.updateTime = Date.now();
|
||||||
|
|
||||||
yield this._saveApps();
|
|
||||||
|
|
||||||
this.broadcastMessage("Webapps:UpdateState", {
|
this.broadcastMessage("Webapps:UpdateState", {
|
||||||
app: app,
|
app: app,
|
||||||
id: app.id
|
id: app.id
|
||||||
|
@ -1890,18 +1900,33 @@ this.DOMApplicationRegistry = {
|
||||||
let appFile = tmpDir.clone();
|
let appFile = tmpDir.clone();
|
||||||
appFile.append("application.zip");
|
appFile.append("application.zip");
|
||||||
|
|
||||||
let dir = FileUtils.getDir(DIRECTORY_NAME, ["webapps", id], true, true);
|
// In order to better control the potential inconsistency due to unexpected
|
||||||
|
// shutdown during the update process, a separate folder is used to accommodate
|
||||||
|
// the updated files and to replace the current one. Some sanity check and
|
||||||
|
// correspondent rollback logic may be necessary during the initialization
|
||||||
|
// of this component to recover it at next system boot-up.
|
||||||
|
let oldDir = FileUtils.getDir(DIRECTORY_NAME, ["webapps", id], true, true);
|
||||||
|
let dir = FileUtils.getDir(DIRECTORY_NAME, ["webapps", id + ".new"], true, true);
|
||||||
appFile.moveTo(dir, "application.zip");
|
appFile.moveTo(dir, "application.zip");
|
||||||
manFile.moveTo(dir, "manifest.webapp");
|
manFile.moveTo(dir, "manifest.webapp");
|
||||||
|
|
||||||
// Move the staged update manifest to a non staged one.
|
// Copy the staged update manifest to a non staged one.
|
||||||
let staged = dir.clone();
|
let staged = oldDir.clone();
|
||||||
staged.append("staged-update.webapp");
|
staged.append("staged-update.webapp");
|
||||||
|
|
||||||
// If we are applying after a restarted download, we have no
|
// If we are applying after a restarted download, we have no
|
||||||
// staged update manifest.
|
// staged update manifest.
|
||||||
if (staged.exists()) {
|
if (staged.exists()) {
|
||||||
staged.moveTo(dir, "update.webapp");
|
staged.copyTo(dir, "update.webapp");
|
||||||
|
}
|
||||||
|
|
||||||
|
oldDir.moveTo(null, id + ".old");
|
||||||
|
dir.moveTo(null, id);
|
||||||
|
|
||||||
|
try {
|
||||||
|
oldDir.remove(true);
|
||||||
|
} catch(e) {
|
||||||
|
oldDir.moveTo(tmpDir, "old." + app.updateTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
|
var head = document.getElementById("header2");
|
||||||
|
head.innerHTML = "Customized content";
|
||||||
|
}, false);
|
|
@ -0,0 +1,3 @@
|
||||||
|
#header2 {
|
||||||
|
color: blue;
|
||||||
|
}
|
|
@ -1200,6 +1200,9 @@ Navigator::SendBeacon(const nsAString& aUrl,
|
||||||
principal,
|
principal,
|
||||||
true);
|
true);
|
||||||
|
|
||||||
|
rv = cors->Init(channel, true);
|
||||||
|
NS_ENSURE_SUCCESS(rv, false);
|
||||||
|
|
||||||
// Start a preflight if cross-origin and content type is not whitelisted
|
// Start a preflight if cross-origin and content type is not whitelisted
|
||||||
rv = secMan->CheckSameOriginURI(documentURI, uri, false);
|
rv = secMan->CheckSameOriginURI(documentURI, uri, false);
|
||||||
bool crossOrigin = NS_FAILED(rv);
|
bool crossOrigin = NS_FAILED(rv);
|
||||||
|
|
|
@ -197,6 +197,24 @@
|
||||||
let savedElement = null;
|
let savedElement = null;
|
||||||
function recvDomTest(message) {
|
function recvDomTest(message) {
|
||||||
savedElement = message.objects.element;
|
savedElement = message.objects.element;
|
||||||
|
|
||||||
|
// Test to ensure that we don't pass CPOWs to C++-implemented interfaces.
|
||||||
|
// See bug 1072980.
|
||||||
|
if (test_state == "remote") {
|
||||||
|
let walker = Components.classes["@mozilla.org/inspector/deep-tree-walker;1"]
|
||||||
|
.createInstance(Components.interfaces.inIDeepTreeWalker);
|
||||||
|
const SHOW_ELEMENT = Components.interfaces.nsIDOMNodeFilter.SHOW_ELEMENT;
|
||||||
|
walker.showAnonymousContent = true;
|
||||||
|
walker.showSubDocuments = false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
walker.init(savedElement, SHOW_ELEMENT);
|
||||||
|
ok(false, "expected exception passing CPOW to C++");
|
||||||
|
} catch (e) {
|
||||||
|
is(e.result, Components.results.NS_ERROR_XPC_CANT_PASS_CPOW_TO_NATIVE,
|
||||||
|
"got exception when passing CPOW to C++");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function recvDomTestAfterGC(message) {
|
function recvDomTestAfterGC(message) {
|
||||||
|
|
|
@ -6,8 +6,9 @@
|
||||||
|
|
||||||
#include "BluetoothReplyRunnable.h"
|
#include "BluetoothReplyRunnable.h"
|
||||||
#include "BluetoothService.h"
|
#include "BluetoothService.h"
|
||||||
#include "BluetoothUtils.h"
|
|
||||||
#include "DOMRequest.h"
|
#include "DOMRequest.h"
|
||||||
|
#include "nsIDocument.h"
|
||||||
|
#include "nsIPrincipal.h"
|
||||||
#include "nsTArrayHelpers.h"
|
#include "nsTArrayHelpers.h"
|
||||||
|
|
||||||
#include "mozilla/dom/BluetoothAdapter2Binding.h"
|
#include "mozilla/dom/BluetoothAdapter2Binding.h"
|
||||||
|
@ -193,11 +194,15 @@ BluetoothAdapter::BluetoothAdapter(nsPIDOMWindow* aWindow,
|
||||||
, mState(BluetoothAdapterState::Disabled)
|
, mState(BluetoothAdapterState::Disabled)
|
||||||
, mDiscoverable(false)
|
, mDiscoverable(false)
|
||||||
, mDiscovering(false)
|
, mDiscovering(false)
|
||||||
|
, mPairingReqs(nullptr)
|
||||||
, mDiscoveryHandleInUse(nullptr)
|
, mDiscoveryHandleInUse(nullptr)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(aWindow);
|
MOZ_ASSERT(aWindow);
|
||||||
|
|
||||||
mPairingReqs = BluetoothPairingListener::Create(aWindow);
|
// Only allow certified bluetooth application to receive pairing requests
|
||||||
|
if (IsBluetoothCertifiedApp()) {
|
||||||
|
mPairingReqs = BluetoothPairingListener::Create(aWindow);
|
||||||
|
}
|
||||||
|
|
||||||
const InfallibleTArray<BluetoothNamedValue>& values =
|
const InfallibleTArray<BluetoothNamedValue>& values =
|
||||||
aValue.get_ArrayOfBluetoothNamedValue();
|
aValue.get_ArrayOfBluetoothNamedValue();
|
||||||
|
@ -329,8 +334,6 @@ BluetoothAdapter::Notify(const BluetoothSignal& aData)
|
||||||
if (mDiscoveryHandleInUse) {
|
if (mDiscoveryHandleInUse) {
|
||||||
HandleDeviceFound(v);
|
HandleDeviceFound(v);
|
||||||
}
|
}
|
||||||
} else if (aData.name().EqualsLiteral("PairingRequest")) {
|
|
||||||
HandlePairingRequest(v);
|
|
||||||
} else if (aData.name().EqualsLiteral(DEVICE_PAIRED_ID)) {
|
} else if (aData.name().EqualsLiteral(DEVICE_PAIRED_ID)) {
|
||||||
HandleDevicePaired(aData.value());
|
HandleDevicePaired(aData.value());
|
||||||
} else if (aData.name().EqualsLiteral(DEVICE_UNPAIRED_ID)) {
|
} else if (aData.name().EqualsLiteral(DEVICE_UNPAIRED_ID)) {
|
||||||
|
@ -762,6 +765,23 @@ BluetoothAdapter::IsAdapterAttributeChanged(BluetoothAdapterAttribute aType,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
BluetoothAdapter::IsBluetoothCertifiedApp()
|
||||||
|
{
|
||||||
|
// Retrieve the app status and origin for permission checking
|
||||||
|
nsCOMPtr<nsIDocument> doc = GetOwner()->GetExtantDoc();
|
||||||
|
NS_ENSURE_TRUE(doc, false);
|
||||||
|
|
||||||
|
uint16_t appStatus = nsIPrincipal::APP_STATUS_NOT_INSTALLED;
|
||||||
|
nsAutoCString appOrigin;
|
||||||
|
|
||||||
|
doc->NodePrincipal()->GetAppStatus(&appStatus);
|
||||||
|
doc->NodePrincipal()->GetOrigin(getter_Copies(appOrigin));
|
||||||
|
|
||||||
|
return appStatus == nsIPrincipal::APP_STATUS_CERTIFIED &&
|
||||||
|
appOrigin.EqualsLiteral(BLUETOOTH_APP_ORIGIN);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
BluetoothAdapter::SetAdapterState(BluetoothAdapterState aState)
|
BluetoothAdapter::SetAdapterState(BluetoothAdapterState aState)
|
||||||
{
|
{
|
||||||
|
@ -831,42 +851,6 @@ BluetoothAdapter::HandleDeviceFound(const BluetoothValue& aValue)
|
||||||
mDiscoveryHandleInUse->DispatchDeviceEvent(discoveredDevice);
|
mDiscoveryHandleInUse->DispatchDeviceEvent(discoveredDevice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
BluetoothAdapter::HandlePairingRequest(const BluetoothValue& aValue)
|
|
||||||
{
|
|
||||||
MOZ_ASSERT(mPairingReqs);
|
|
||||||
MOZ_ASSERT(aValue.type() == BluetoothValue::TArrayOfBluetoothNamedValue);
|
|
||||||
|
|
||||||
const InfallibleTArray<BluetoothNamedValue>& arr =
|
|
||||||
aValue.get_ArrayOfBluetoothNamedValue();
|
|
||||||
|
|
||||||
MOZ_ASSERT(arr.Length() == 3 &&
|
|
||||||
arr[0].value().type() == BluetoothValue::TnsString && // address
|
|
||||||
arr[1].value().type() == BluetoothValue::TnsString && // passkey
|
|
||||||
arr[2].value().type() == BluetoothValue::TnsString); // type
|
|
||||||
|
|
||||||
nsString deviceAddress = arr[0].value().get_nsString();
|
|
||||||
nsString passkey = arr[1].value().get_nsString();
|
|
||||||
nsString type = arr[2].value().get_nsString();
|
|
||||||
|
|
||||||
// Create a temporary device with deviceAddress for searching
|
|
||||||
InfallibleTArray<BluetoothNamedValue> props;
|
|
||||||
BT_APPEND_NAMED_VALUE(props, "Address", deviceAddress);
|
|
||||||
nsRefPtr<BluetoothDevice> device =
|
|
||||||
BluetoothDevice::Create(GetOwner(), props);
|
|
||||||
|
|
||||||
// Find the remote device by address
|
|
||||||
size_t index = mDevices.IndexOf(device);
|
|
||||||
if (index == mDevices.NoIndex) {
|
|
||||||
BT_WARNING("Cannot find the remote device with address %s",
|
|
||||||
NS_ConvertUTF16toUTF8(deviceAddress).get());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Notify application of pairing requests
|
|
||||||
mPairingReqs->DispatchPairingEvent(mDevices[index], passkey, type);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BluetoothAdapter::DispatchAttributeEvent(const nsTArray<nsString>& aTypes)
|
BluetoothAdapter::DispatchAttributeEvent(const nsTArray<nsString>& aTypes)
|
||||||
{
|
{
|
||||||
|
|
|
@ -248,13 +248,6 @@ private:
|
||||||
*/
|
*/
|
||||||
void HandleDeviceFound(const BluetoothValue& aValue);
|
void HandleDeviceFound(const BluetoothValue& aValue);
|
||||||
|
|
||||||
/**
|
|
||||||
* Handle "PairingRequest" bluetooth signal.
|
|
||||||
*
|
|
||||||
* @param aValue [in] Array of information about the pairing request.
|
|
||||||
*/
|
|
||||||
void HandlePairingRequest(const BluetoothValue& aValue);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fire BluetoothAttributeEvent to trigger onattributechanged event handler.
|
* Fire BluetoothAttributeEvent to trigger onattributechanged event handler.
|
||||||
*/
|
*/
|
||||||
|
@ -287,6 +280,13 @@ private:
|
||||||
bool IsAdapterAttributeChanged(BluetoothAdapterAttribute aType,
|
bool IsAdapterAttributeChanged(BluetoothAdapterAttribute aType,
|
||||||
const BluetoothValue& aValue);
|
const BluetoothValue& aValue);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check whether this adapter is owned by Bluetooth certified app.
|
||||||
|
*
|
||||||
|
* @return a boolean value to indicate whether it's owned by Bluetooth app.
|
||||||
|
*/
|
||||||
|
bool IsBluetoothCertifiedApp();
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Variables
|
* Variables
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
|
@ -143,6 +143,7 @@ extern bool gBluetoothDebugFlag;
|
||||||
#define KEY_REMOTE_AGENT "/B2G/bluetooth/remote_device_agent"
|
#define KEY_REMOTE_AGENT "/B2G/bluetooth/remote_device_agent"
|
||||||
#define KEY_MANAGER "/B2G/bluetooth/manager"
|
#define KEY_MANAGER "/B2G/bluetooth/manager"
|
||||||
#define KEY_ADAPTER "/B2G/bluetooth/adapter"
|
#define KEY_ADAPTER "/B2G/bluetooth/adapter"
|
||||||
|
#define KEY_PAIRING_LISTENER "/B2G/bluetooth/pairing_listener"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When the connection status of a Bluetooth profile is changed, we'll notify
|
* When the connection status of a Bluetooth profile is changed, we'll notify
|
||||||
|
@ -170,6 +171,18 @@ extern bool gBluetoothDebugFlag;
|
||||||
#define PAIRING_REQ_TYPE_CONFIRMATION "pairingconfirmationreq"
|
#define PAIRING_REQ_TYPE_CONFIRMATION "pairingconfirmationreq"
|
||||||
#define PAIRING_REQ_TYPE_CONSENT "pairingconsentreq"
|
#define PAIRING_REQ_TYPE_CONSENT "pairingconsentreq"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* System message to launch bluetooth app if no pairing listener is ready to
|
||||||
|
* receive pairing requests.
|
||||||
|
*/
|
||||||
|
#define SYS_MSG_BT_PAIRING_REQ "bluetooth-pairing-request"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The app origin of bluetooth app, which is responsible for listening pairing
|
||||||
|
* requests.
|
||||||
|
*/
|
||||||
|
#define BLUETOOTH_APP_ORIGIN "app://bluetooth.gaiamobile.org"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When a remote device gets paired / unpaired with local bluetooth adapter,
|
* When a remote device gets paired / unpaired with local bluetooth adapter,
|
||||||
* we'll dispatch an event.
|
* we'll dispatch an event.
|
||||||
|
|
|
@ -6,8 +6,10 @@
|
||||||
|
|
||||||
#include "mozilla/dom/bluetooth/BluetoothPairingListener.h"
|
#include "mozilla/dom/bluetooth/BluetoothPairingListener.h"
|
||||||
#include "mozilla/dom/bluetooth/BluetoothPairingHandle.h"
|
#include "mozilla/dom/bluetooth/BluetoothPairingHandle.h"
|
||||||
|
#include "mozilla/dom/bluetooth/BluetoothTypes.h"
|
||||||
#include "mozilla/dom/BluetoothPairingEvent.h"
|
#include "mozilla/dom/BluetoothPairingEvent.h"
|
||||||
#include "mozilla/dom/BluetoothPairingListenerBinding.h"
|
#include "mozilla/dom/BluetoothPairingListenerBinding.h"
|
||||||
|
#include "BluetoothService.h"
|
||||||
|
|
||||||
USING_BLUETOOTH_NAMESPACE
|
USING_BLUETOOTH_NAMESPACE
|
||||||
|
|
||||||
|
@ -21,6 +23,11 @@ BluetoothPairingListener::BluetoothPairingListener(nsPIDOMWindow* aWindow)
|
||||||
: DOMEventTargetHelper(aWindow)
|
: DOMEventTargetHelper(aWindow)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(aWindow);
|
MOZ_ASSERT(aWindow);
|
||||||
|
|
||||||
|
BluetoothService* bs = BluetoothService::Get();
|
||||||
|
NS_ENSURE_TRUE_VOID(bs);
|
||||||
|
bs->RegisterBluetoothSignalHandler(NS_LITERAL_STRING(KEY_PAIRING_LISTENER),
|
||||||
|
this);
|
||||||
}
|
}
|
||||||
|
|
||||||
already_AddRefed<BluetoothPairingListener>
|
already_AddRefed<BluetoothPairingListener>
|
||||||
|
@ -37,6 +44,11 @@ BluetoothPairingListener::Create(nsPIDOMWindow* aWindow)
|
||||||
|
|
||||||
BluetoothPairingListener::~BluetoothPairingListener()
|
BluetoothPairingListener::~BluetoothPairingListener()
|
||||||
{
|
{
|
||||||
|
BluetoothService* bs = BluetoothService::Get();
|
||||||
|
// It can be nullptr on shutdown.
|
||||||
|
NS_ENSURE_TRUE_VOID(bs);
|
||||||
|
bs->UnregisterBluetoothSignalHandler(NS_LITERAL_STRING(KEY_PAIRING_LISTENER),
|
||||||
|
this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -67,8 +79,55 @@ BluetoothPairingListener::DispatchPairingEvent(BluetoothDevice* aDevice,
|
||||||
DispatchTrustedEvent(event);
|
DispatchTrustedEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
BluetoothPairingListener::Notify(const BluetoothSignal& aData)
|
||||||
|
{
|
||||||
|
InfallibleTArray<BluetoothNamedValue> arr;
|
||||||
|
|
||||||
|
BluetoothValue value = aData.value();
|
||||||
|
if (aData.name().EqualsLiteral("PairingRequest")) {
|
||||||
|
|
||||||
|
MOZ_ASSERT(value.type() == BluetoothValue::TArrayOfBluetoothNamedValue);
|
||||||
|
|
||||||
|
const InfallibleTArray<BluetoothNamedValue>& arr =
|
||||||
|
value.get_ArrayOfBluetoothNamedValue();
|
||||||
|
|
||||||
|
MOZ_ASSERT(arr.Length() == 3 &&
|
||||||
|
arr[0].value().type() == BluetoothValue::TnsString && // address
|
||||||
|
arr[1].value().type() == BluetoothValue::TnsString && // passkey
|
||||||
|
arr[2].value().type() == BluetoothValue::TnsString); // type
|
||||||
|
|
||||||
|
nsString deviceAddress = arr[0].value().get_nsString();
|
||||||
|
nsString passkey = arr[1].value().get_nsString();
|
||||||
|
nsString type = arr[2].value().get_nsString();
|
||||||
|
|
||||||
|
// Create a temporary device with deviceAddress for searching
|
||||||
|
InfallibleTArray<BluetoothNamedValue> props;
|
||||||
|
BT_APPEND_NAMED_VALUE(props, "Address", deviceAddress);
|
||||||
|
nsRefPtr<BluetoothDevice> device =
|
||||||
|
BluetoothDevice::Create(GetOwner(), props);
|
||||||
|
|
||||||
|
// Notify pairing listener of pairing requests
|
||||||
|
DispatchPairingEvent(device, passkey, type);
|
||||||
|
} else {
|
||||||
|
BT_WARNING("Not handling pairing listener signal: %s",
|
||||||
|
NS_ConvertUTF16toUTF8(aData.name()).get());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
JSObject*
|
JSObject*
|
||||||
BluetoothPairingListener::WrapObject(JSContext* aCx)
|
BluetoothPairingListener::WrapObject(JSContext* aCx)
|
||||||
{
|
{
|
||||||
return BluetoothPairingListenerBinding::Wrap(aCx, this);
|
return BluetoothPairingListenerBinding::Wrap(aCx, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
BluetoothPairingListener::DisconnectFromOwner()
|
||||||
|
{
|
||||||
|
DOMEventTargetHelper::DisconnectFromOwner();
|
||||||
|
|
||||||
|
BluetoothService* bs = BluetoothService::Get();
|
||||||
|
NS_ENSURE_TRUE_VOID(bs);
|
||||||
|
bs->UnregisterBluetoothSignalHandler(NS_LITERAL_STRING(KEY_PAIRING_LISTENER),
|
||||||
|
this);
|
||||||
|
}
|
||||||
|
|
|
@ -14,8 +14,10 @@
|
||||||
BEGIN_BLUETOOTH_NAMESPACE
|
BEGIN_BLUETOOTH_NAMESPACE
|
||||||
|
|
||||||
class BluetoothDevice;
|
class BluetoothDevice;
|
||||||
|
class BluetoothSignal;
|
||||||
|
|
||||||
class BluetoothPairingListener MOZ_FINAL : public DOMEventTargetHelper
|
class BluetoothPairingListener MOZ_FINAL : public DOMEventTargetHelper
|
||||||
|
, public BluetoothSignalObserver
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NS_DECL_ISUPPORTS_INHERITED
|
NS_DECL_ISUPPORTS_INHERITED
|
||||||
|
@ -27,12 +29,15 @@ public:
|
||||||
const nsAString& aPasskey,
|
const nsAString& aPasskey,
|
||||||
const nsAString& aType);
|
const nsAString& aType);
|
||||||
|
|
||||||
|
void Notify(const BluetoothSignal& aParam); // BluetoothSignalObserver
|
||||||
|
|
||||||
nsPIDOMWindow* GetParentObject() const
|
nsPIDOMWindow* GetParentObject() const
|
||||||
{
|
{
|
||||||
return GetOwner();
|
return GetOwner();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
|
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
|
||||||
|
virtual void DisconnectFromOwner() MOZ_OVERRIDE;
|
||||||
|
|
||||||
IMPL_EVENT_HANDLER(displaypasskeyreq);
|
IMPL_EVENT_HANDLER(displaypasskeyreq);
|
||||||
IMPL_EVENT_HANDLER(enterpincodereq);
|
IMPL_EVENT_HANDLER(enterpincodereq);
|
||||||
|
|
|
@ -273,6 +273,17 @@ BluetoothService::RegisterBluetoothSignalHandler(
|
||||||
}
|
}
|
||||||
|
|
||||||
ol->AddObserver(aHandler);
|
ol->AddObserver(aHandler);
|
||||||
|
|
||||||
|
// Distribute pending pairing requests when pairing listener has been added
|
||||||
|
// to signal observer table.
|
||||||
|
if (IsMainProcess() &&
|
||||||
|
!mPendingPairReqSignals.IsEmpty() &&
|
||||||
|
aNodeName.EqualsLiteral(KEY_PAIRING_LISTENER)) {
|
||||||
|
for (uint32_t i = 0; i < mPendingPairReqSignals.Length(); ++i) {
|
||||||
|
DistributeSignal(mPendingPairReqSignals[i]);
|
||||||
|
}
|
||||||
|
mPendingPairReqSignals.Clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -331,8 +342,19 @@ BluetoothService::DistributeSignal(const BluetoothSignal& aSignal)
|
||||||
|
|
||||||
BluetoothSignalObserverList* ol;
|
BluetoothSignalObserverList* ol;
|
||||||
if (!mBluetoothSignalObserverTable.Get(aSignal.path(), &ol)) {
|
if (!mBluetoothSignalObserverTable.Get(aSignal.path(), &ol)) {
|
||||||
BT_WARNING("No observer registered for path %s",
|
// If there is no BluetoohPairingListener in observer table, put the signal
|
||||||
NS_ConvertUTF16toUTF8(aSignal.path()).get());
|
// into a pending queue of pairing requests and send a system message to
|
||||||
|
// launch bluetooth certified app.
|
||||||
|
if (aSignal.path().EqualsLiteral(KEY_PAIRING_LISTENER)) {
|
||||||
|
mPendingPairReqSignals.AppendElement(aSignal);
|
||||||
|
|
||||||
|
BT_ENSURE_TRUE_VOID_BROADCAST_SYSMSG(
|
||||||
|
NS_LITERAL_STRING(SYS_MSG_BT_PAIRING_REQ),
|
||||||
|
BluetoothValue(EmptyString()));
|
||||||
|
} else {
|
||||||
|
BT_WARNING("No observer registered for path %s",
|
||||||
|
NS_ConvertUTF16toUTF8(aSignal.path()).get());
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#define mozilla_dom_bluetooth_bluetootheventservice_h__
|
#define mozilla_dom_bluetooth_bluetootheventservice_h__
|
||||||
|
|
||||||
#include "BluetoothCommon.h"
|
#include "BluetoothCommon.h"
|
||||||
|
#include "BluetoothInterface.h"
|
||||||
#include "BluetoothProfileManagerBase.h"
|
#include "BluetoothProfileManagerBase.h"
|
||||||
#include "nsAutoPtr.h"
|
#include "nsAutoPtr.h"
|
||||||
#include "nsClassHashtable.h"
|
#include "nsClassHashtable.h"
|
||||||
|
@ -401,6 +402,8 @@ protected:
|
||||||
|
|
||||||
BluetoothSignalObserverTable mBluetoothSignalObserverTable;
|
BluetoothSignalObserverTable mBluetoothSignalObserverTable;
|
||||||
|
|
||||||
|
nsTArray<BluetoothSignal> mPendingPairReqSignals;
|
||||||
|
|
||||||
bool mEnabled;
|
bool mEnabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1473,7 +1473,7 @@ BluetoothServiceBluedroid::PinRequestNotification(const nsAString& aRemoteBdAddr
|
||||||
NS_LITERAL_STRING(PAIRING_REQ_TYPE_ENTERPINCODE));
|
NS_LITERAL_STRING(PAIRING_REQ_TYPE_ENTERPINCODE));
|
||||||
|
|
||||||
DistributeSignal(BluetoothSignal(NS_LITERAL_STRING("PairingRequest"),
|
DistributeSignal(BluetoothSignal(NS_LITERAL_STRING("PairingRequest"),
|
||||||
NS_LITERAL_STRING(KEY_ADAPTER),
|
NS_LITERAL_STRING(KEY_PAIRING_LISTENER),
|
||||||
BluetoothValue(propertiesArray)));
|
BluetoothValue(propertiesArray)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1518,7 +1518,7 @@ BluetoothServiceBluedroid::SspRequestNotification(
|
||||||
BT_APPEND_NAMED_VALUE(propertiesArray, "type", pairingType);
|
BT_APPEND_NAMED_VALUE(propertiesArray, "type", pairingType);
|
||||||
|
|
||||||
DistributeSignal(BluetoothSignal(NS_LITERAL_STRING("PairingRequest"),
|
DistributeSignal(BluetoothSignal(NS_LITERAL_STRING("PairingRequest"),
|
||||||
NS_LITERAL_STRING(KEY_ADAPTER),
|
NS_LITERAL_STRING(KEY_PAIRING_LISTENER),
|
||||||
BluetoothValue(propertiesArray)));
|
BluetoothValue(propertiesArray)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ skip-if = buildapp == 'mulet'
|
||||||
skip-if = buildapp == 'mulet'
|
skip-if = buildapp == 'mulet'
|
||||||
[test_bug456273.html]
|
[test_bug456273.html]
|
||||||
[test_bug457672.html]
|
[test_bug457672.html]
|
||||||
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' #CRASH_DUMP, RANDOM
|
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e10s #CRASH_DUMP, RANDOM
|
||||||
[test_bug489671.html]
|
[test_bug489671.html]
|
||||||
[test_bug493251.html]
|
[test_bug493251.html]
|
||||||
skip-if = buildapp == 'mulet' || (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage
|
skip-if = buildapp == 'mulet' || (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop specific, initial triage
|
||||||
|
|
|
@ -17,7 +17,7 @@ interface nsIServiceWorkerUnregisterCallback : nsISupports
|
||||||
[noscript] void UnregisterFailed();
|
[noscript] void UnregisterFailed();
|
||||||
};
|
};
|
||||||
|
|
||||||
[builtinclass, uuid(79ad5b57-d65d-46d3-b5e9-32d27e16052d)]
|
[builtinclass, uuid(78fdfe7c-0e2c-4157-ac6e-3952b61df36a)]
|
||||||
interface nsIServiceWorkerManager : nsISupports
|
interface nsIServiceWorkerManager : nsISupports
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -83,6 +83,11 @@ interface nsIServiceWorkerManager : nsISupports
|
||||||
*/
|
*/
|
||||||
[noscript] nsISupports GetDocumentController(in nsIDOMWindow aWindow);
|
[noscript] nsISupports GetDocumentController(in nsIDOMWindow aWindow);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This implements the update algorithm.
|
||||||
|
*/
|
||||||
|
void update(in DOMString aScope);
|
||||||
|
|
||||||
// Testing
|
// Testing
|
||||||
DOMString getScopeForUrl(in DOMString path);
|
DOMString getScopeForUrl(in DOMString path);
|
||||||
};
|
};
|
||||||
|
|
|
@ -2458,7 +2458,7 @@ ContentChild::RecvStopProfiler()
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ContentChild::AnswerGetProfile(nsCString* aProfile)
|
ContentChild::RecvGetProfile(nsCString* aProfile)
|
||||||
{
|
{
|
||||||
char* profile = profiler_get_profile();
|
char* profile = profiler_get_profile();
|
||||||
if (profile) {
|
if (profile) {
|
||||||
|
|
|
@ -365,7 +365,7 @@ public:
|
||||||
const nsTArray<nsCString>& aFeatures,
|
const nsTArray<nsCString>& aFeatures,
|
||||||
const nsTArray<nsCString>& aThreadNameFilters) MOZ_OVERRIDE;
|
const nsTArray<nsCString>& aThreadNameFilters) MOZ_OVERRIDE;
|
||||||
virtual bool RecvStopProfiler() MOZ_OVERRIDE;
|
virtual bool RecvStopProfiler() MOZ_OVERRIDE;
|
||||||
virtual bool AnswerGetProfile(nsCString* aProfile) MOZ_OVERRIDE;
|
virtual bool RecvGetProfile(nsCString* aProfile) MOZ_OVERRIDE;
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
gfxIntSize GetScreenSize() { return mScreenSize; }
|
gfxIntSize GetScreenSize() { return mScreenSize; }
|
||||||
|
|
|
@ -927,7 +927,7 @@ ContentParent::RecvCreateChildProcess(const IPCTabContext& aContext,
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ContentParent::AnswerBridgeToChildProcess(const ContentParentId& aCpId)
|
ContentParent::RecvBridgeToChildProcess(const ContentParentId& aCpId)
|
||||||
{
|
{
|
||||||
ContentProcessManager *cpm = ContentProcessManager::GetSingleton();
|
ContentProcessManager *cpm = ContentProcessManager::GetSingleton();
|
||||||
ContentParent* cp = cpm->GetContentProcessById(aCpId);
|
ContentParent* cp = cpm->GetContentProcessById(aCpId);
|
||||||
|
@ -966,7 +966,7 @@ static nsIDocShell* GetOpenerDocShellHelper(Element* aFrameElement)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ContentParent::AnswerLoadPlugin(const uint32_t& aPluginId)
|
ContentParent::RecvLoadPlugin(const uint32_t& aPluginId)
|
||||||
{
|
{
|
||||||
return mozilla::plugins::SetupBridge(aPluginId, this);
|
return mozilla::plugins::SetupBridge(aPluginId, this);
|
||||||
}
|
}
|
||||||
|
@ -1219,7 +1219,7 @@ ContentParent::CreateContentBridgeParent(const TabContext& aContext,
|
||||||
if (cpId == 0) {
|
if (cpId == 0) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
if (!child->CallBridgeToChildProcess(cpId)) {
|
if (!child->SendBridgeToChildProcess(cpId)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
ContentBridgeParent* parent = child->GetLastBridge();
|
ContentBridgeParent* parent = child->GetLastBridge();
|
||||||
|
@ -2011,6 +2011,9 @@ ContentParent::ContentParent(mozIApplication* aApp,
|
||||||
true /* Send registered chrome */);
|
true /* Send registered chrome */);
|
||||||
|
|
||||||
ContentProcessManager::GetSingleton()->AddContentProcess(this);
|
ContentProcessManager::GetSingleton()->AddContentProcess(this);
|
||||||
|
|
||||||
|
// Set a reply timeout for CPOWs.
|
||||||
|
SetReplyTimeoutMs(Preferences::GetInt("dom.ipc.cpow.timeout", 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MOZ_NUWA_PROCESS
|
#ifdef MOZ_NUWA_PROCESS
|
||||||
|
@ -2866,7 +2869,7 @@ ContentParent::Observe(nsISupports* aSubject,
|
||||||
nsCOMPtr<nsIProfileSaveEvent> pse = do_QueryInterface(aSubject);
|
nsCOMPtr<nsIProfileSaveEvent> pse = do_QueryInterface(aSubject);
|
||||||
if (pse) {
|
if (pse) {
|
||||||
nsCString result;
|
nsCString result;
|
||||||
unused << CallGetProfile(&result);
|
unused << SendGetProfile(&result);
|
||||||
if (!result.IsEmpty()) {
|
if (!result.IsEmpty()) {
|
||||||
pse->AddSubProfile(result.get());
|
pse->AddSubProfile(result.get());
|
||||||
}
|
}
|
||||||
|
@ -4263,11 +4266,11 @@ ContentParent::RecvOpenAnonymousTemporaryFile(FileDescriptor *aFD)
|
||||||
static NS_DEFINE_CID(kFormProcessorCID, NS_FORMPROCESSOR_CID);
|
static NS_DEFINE_CID(kFormProcessorCID, NS_FORMPROCESSOR_CID);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ContentParent::RecvFormProcessValue(const nsString& oldValue,
|
ContentParent::RecvKeygenProcessValue(const nsString& oldValue,
|
||||||
const nsString& challenge,
|
const nsString& challenge,
|
||||||
const nsString& keytype,
|
const nsString& keytype,
|
||||||
const nsString& keyparams,
|
const nsString& keyparams,
|
||||||
nsString* newValue)
|
nsString* newValue)
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIFormProcessor> formProcessor =
|
nsCOMPtr<nsIFormProcessor> formProcessor =
|
||||||
do_GetService(kFormProcessorCID);
|
do_GetService(kFormProcessorCID);
|
||||||
|
@ -4282,8 +4285,8 @@ ContentParent::RecvFormProcessValue(const nsString& oldValue,
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ContentParent::RecvFormProvideContent(nsString* aAttribute,
|
ContentParent::RecvKeygenProvideContent(nsString* aAttribute,
|
||||||
nsTArray<nsString>* aContent)
|
nsTArray<nsString>* aContent)
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIFormProcessor> formProcessor =
|
nsCOMPtr<nsIFormProcessor> formProcessor =
|
||||||
do_GetService(kFormProcessorCID);
|
do_GetService(kFormProcessorCID);
|
||||||
|
|
|
@ -150,9 +150,9 @@ public:
|
||||||
bool* aIsForApp,
|
bool* aIsForApp,
|
||||||
bool* aIsForBrowser,
|
bool* aIsForBrowser,
|
||||||
TabId* aTabId) MOZ_OVERRIDE;
|
TabId* aTabId) MOZ_OVERRIDE;
|
||||||
virtual bool AnswerBridgeToChildProcess(const ContentParentId& aCpId) MOZ_OVERRIDE;
|
virtual bool RecvBridgeToChildProcess(const ContentParentId& aCpId) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual bool AnswerLoadPlugin(const uint32_t& aPluginId) MOZ_OVERRIDE;
|
virtual bool RecvLoadPlugin(const uint32_t& aPluginId) MOZ_OVERRIDE;
|
||||||
virtual bool RecvFindPlugins(const uint32_t& aPluginEpoch,
|
virtual bool RecvFindPlugins(const uint32_t& aPluginEpoch,
|
||||||
nsTArray<PluginTag>* aPlugins,
|
nsTArray<PluginTag>* aPlugins,
|
||||||
uint32_t* aNewPluginEpoch) MOZ_OVERRIDE;
|
uint32_t* aNewPluginEpoch) MOZ_OVERRIDE;
|
||||||
|
@ -722,13 +722,13 @@ private:
|
||||||
RecvOpenAnonymousTemporaryFile(FileDescriptor* aFD) MOZ_OVERRIDE;
|
RecvOpenAnonymousTemporaryFile(FileDescriptor* aFD) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
RecvFormProcessValue(const nsString& oldValue, const nsString& challenge,
|
RecvKeygenProcessValue(const nsString& oldValue, const nsString& challenge,
|
||||||
const nsString& keytype, const nsString& keyparams,
|
const nsString& keytype, const nsString& keyparams,
|
||||||
nsString* newValue) MOZ_OVERRIDE;
|
nsString* newValue) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual bool
|
virtual bool
|
||||||
RecvFormProvideContent(nsString* aAttribute,
|
RecvKeygenProvideContent(nsString* aAttribute,
|
||||||
nsTArray<nsString>* aContent) MOZ_OVERRIDE;
|
nsTArray<nsString>* aContent) MOZ_OVERRIDE;
|
||||||
|
|
||||||
virtual PFileDescriptorSetParent*
|
virtual PFileDescriptorSetParent*
|
||||||
AllocPFileDescriptorSetParent(const mozilla::ipc::FileDescriptor&) MOZ_OVERRIDE;
|
AllocPFileDescriptorSetParent(const mozilla::ipc::FileDescriptor&) MOZ_OVERRIDE;
|
||||||
|
|
|
@ -521,7 +521,7 @@ child:
|
||||||
async StartProfiler(uint32_t aEntries, double aInterval, nsCString[] aFeatures,
|
async StartProfiler(uint32_t aEntries, double aInterval, nsCString[] aFeatures,
|
||||||
nsCString[] aThreadNameFilters);
|
nsCString[] aThreadNameFilters);
|
||||||
async StopProfiler();
|
async StopProfiler();
|
||||||
intr GetProfile()
|
prio(high) sync GetProfile()
|
||||||
returns (nsCString aProfile);
|
returns (nsCString aProfile);
|
||||||
|
|
||||||
NuwaFreeze();
|
NuwaFreeze();
|
||||||
|
@ -557,7 +557,7 @@ parent:
|
||||||
ProcessPriority priority,
|
ProcessPriority priority,
|
||||||
TabId openerTabId)
|
TabId openerTabId)
|
||||||
returns (ContentParentId cpId, bool isForApp, bool isForBrowser, TabId tabId);
|
returns (ContentParentId cpId, bool isForApp, bool isForBrowser, TabId tabId);
|
||||||
intr BridgeToChildProcess(ContentParentId cpId);
|
sync BridgeToChildProcess(ContentParentId cpId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This call connects the content process to a plugin process. While this
|
* This call connects the content process to a plugin process. While this
|
||||||
|
@ -566,7 +566,7 @@ parent:
|
||||||
* process. We use intr semantics here to ensure that the PluginModuleParent
|
* process. We use intr semantics here to ensure that the PluginModuleParent
|
||||||
* allocation message is dispatched before LoadPlugin returns.
|
* allocation message is dispatched before LoadPlugin returns.
|
||||||
*/
|
*/
|
||||||
intr LoadPlugin(uint32_t pluginId);
|
sync LoadPlugin(uint32_t pluginId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This call returns the set of plugins loaded in the chrome
|
* This call returns the set of plugins loaded in the chrome
|
||||||
|
@ -798,16 +798,17 @@ parent:
|
||||||
* before one is submitted. This is urgent because an extension might use
|
* before one is submitted. This is urgent because an extension might use
|
||||||
* a CPOW to synchronously submit a keygen element.
|
* a CPOW to synchronously submit a keygen element.
|
||||||
*/
|
*/
|
||||||
prio(urgent) sync FormProcessValue(nsString oldValue,
|
prio(urgent) sync KeygenProcessValue(nsString oldValue,
|
||||||
nsString challenge,
|
nsString challenge,
|
||||||
nsString keytype,
|
nsString keytype,
|
||||||
nsString keyparams)
|
nsString keyparams)
|
||||||
returns (nsString newValue);
|
returns (nsString newValue);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called to provide the options for <keygen> elements.
|
* Called to provide the options for <keygen> elements.
|
||||||
*/
|
*/
|
||||||
sync FormProvideContent() returns (nsString aAttribute, nsString[] aContent);
|
sync KeygenProvideContent()
|
||||||
|
returns (nsString aAttribute, nsString[] aContent);
|
||||||
|
|
||||||
// Use only for testing!
|
// Use only for testing!
|
||||||
sync GetFileReferences(PersistenceType persistenceType,
|
sync GetFileReferences(PersistenceType persistenceType,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
/* vim: set sw=4 ts=8 et tw=80 : */
|
/* vim: set sw=4 ts=8 et tw=80 : */
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
@ -131,14 +131,18 @@ ScreenManagerParent::RecvScreenForBrowser(PBrowserParent* aBrowser,
|
||||||
// the nsIScreen it's on.
|
// the nsIScreen it's on.
|
||||||
TabParent* tabParent = static_cast<TabParent*>(aBrowser);
|
TabParent* tabParent = static_cast<TabParent*>(aBrowser);
|
||||||
nsCOMPtr<nsIWidget> widget = tabParent->GetWidget();
|
nsCOMPtr<nsIWidget> widget = tabParent->GetWidget();
|
||||||
if (!widget) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsCOMPtr<nsIScreen> screen;
|
nsCOMPtr<nsIScreen> screen;
|
||||||
if (widget->GetNativeData(NS_NATIVE_WINDOW)) {
|
if (widget) {
|
||||||
mScreenMgr->ScreenForNativeWidget(widget->GetNativeData(NS_NATIVE_WINDOW),
|
if (widget->GetNativeData(NS_NATIVE_WINDOW)) {
|
||||||
getter_AddRefs(screen));
|
mScreenMgr->ScreenForNativeWidget(widget->GetNativeData(NS_NATIVE_WINDOW),
|
||||||
|
getter_AddRefs(screen));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
nsresult rv = mScreenMgr->GetPrimaryScreen(getter_AddRefs(screen));
|
||||||
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_ENSURE_TRUE(screen, true);
|
NS_ENSURE_TRUE(screen, true);
|
||||||
|
|
|
@ -248,11 +248,10 @@ TabChildBase::InitializeRootMetrics()
|
||||||
mLastRootMetrics.SetDevPixelsPerCSSPixel(WebWidget()->GetDefaultScale());
|
mLastRootMetrics.SetDevPixelsPerCSSPixel(WebWidget()->GetDefaultScale());
|
||||||
// We use ParentLayerToLayerScale(1) below in order to turn the
|
// We use ParentLayerToLayerScale(1) below in order to turn the
|
||||||
// async zoom amount into the gecko zoom amount.
|
// async zoom amount into the gecko zoom amount.
|
||||||
mLastRootMetrics.mCumulativeResolution =
|
mLastRootMetrics.SetCumulativeResolution(mLastRootMetrics.GetZoom() / mLastRootMetrics.GetDevPixelsPerCSSPixel() * ParentLayerToLayerScale(1));
|
||||||
mLastRootMetrics.GetZoom() / mLastRootMetrics.GetDevPixelsPerCSSPixel() * ParentLayerToLayerScale(1);
|
|
||||||
// This is the root layer, so the cumulative resolution is the same
|
// This is the root layer, so the cumulative resolution is the same
|
||||||
// as the resolution.
|
// as the resolution.
|
||||||
mLastRootMetrics.mPresShellResolution = mLastRootMetrics.mCumulativeResolution.scale;
|
mLastRootMetrics.mPresShellResolution = mLastRootMetrics.GetCumulativeResolution().scale;
|
||||||
mLastRootMetrics.SetScrollOffset(CSSPoint(0, 0));
|
mLastRootMetrics.SetScrollOffset(CSSPoint(0, 0));
|
||||||
|
|
||||||
TABC_LOG("After InitializeRootMetrics, mLastRootMetrics is %s\n",
|
TABC_LOG("After InitializeRootMetrics, mLastRootMetrics is %s\n",
|
||||||
|
@ -430,12 +429,12 @@ TabChildBase::HandlePossibleViewportChange(const ScreenIntSize& aOldScreenSize)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
metrics.mCumulativeResolution = metrics.GetZoom()
|
metrics.SetCumulativeResolution(metrics.GetZoom()
|
||||||
/ metrics.GetDevPixelsPerCSSPixel()
|
/ metrics.GetDevPixelsPerCSSPixel()
|
||||||
* ParentLayerToLayerScale(1);
|
* ParentLayerToLayerScale(1));
|
||||||
// This is the root layer, so the cumulative resolution is the same
|
// This is the root layer, so the cumulative resolution is the same
|
||||||
// as the resolution.
|
// as the resolution.
|
||||||
metrics.mPresShellResolution = metrics.mCumulativeResolution.scale;
|
metrics.mPresShellResolution = metrics.GetCumulativeResolution().scale;
|
||||||
utils->SetResolution(metrics.mPresShellResolution, metrics.mPresShellResolution);
|
utils->SetResolution(metrics.mPresShellResolution, metrics.mPresShellResolution);
|
||||||
|
|
||||||
CSSSize scrollPort = metrics.CalculateCompositedSizeInCssPixels();
|
CSSSize scrollPort = metrics.CalculateCompositedSizeInCssPixels();
|
||||||
|
|
|
@ -216,6 +216,7 @@ namespace dom {
|
||||||
TabParent* sEventCapturer;
|
TabParent* sEventCapturer;
|
||||||
|
|
||||||
TabParent *TabParent::mIMETabParent = nullptr;
|
TabParent *TabParent::mIMETabParent = nullptr;
|
||||||
|
TabParent::LayerToTabParentTable* TabParent::sLayerToTabParentTable = nullptr;
|
||||||
|
|
||||||
NS_IMPL_ISUPPORTS(TabParent,
|
NS_IMPL_ISUPPORTS(TabParent,
|
||||||
nsITabParent,
|
nsITabParent,
|
||||||
|
@ -261,6 +262,37 @@ TabParent::~TabParent()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TabParent*
|
||||||
|
TabParent::GetTabParentFromLayersId(uint64_t aLayersId)
|
||||||
|
{
|
||||||
|
if (!sLayerToTabParentTable) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
return sLayerToTabParentTable->Get(aLayersId);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
TabParent::AddTabParentToTable(uint64_t aLayersId, TabParent* aTabParent)
|
||||||
|
{
|
||||||
|
if (!sLayerToTabParentTable) {
|
||||||
|
sLayerToTabParentTable = new LayerToTabParentTable();
|
||||||
|
}
|
||||||
|
sLayerToTabParentTable->Put(aLayersId, aTabParent);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
TabParent::RemoveTabParentFromTable(uint64_t aLayersId)
|
||||||
|
{
|
||||||
|
if (!sLayerToTabParentTable) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
sLayerToTabParentTable->Remove(aLayersId);
|
||||||
|
if (sLayerToTabParentTable->Count() == 0) {
|
||||||
|
delete sLayerToTabParentTable;
|
||||||
|
sLayerToTabParentTable = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
TabParent::SetOwnerElement(Element* aElement)
|
TabParent::SetOwnerElement(Element* aElement)
|
||||||
{
|
{
|
||||||
|
@ -306,6 +338,7 @@ TabParent::Destroy()
|
||||||
unused << SendDestroy();
|
unused << SendDestroy();
|
||||||
|
|
||||||
if (RenderFrameParent* frame = GetRenderFrame()) {
|
if (RenderFrameParent* frame = GetRenderFrame()) {
|
||||||
|
RemoveTabParentFromTable(frame->GetLayersId());
|
||||||
frame->Destroy();
|
frame->Destroy();
|
||||||
}
|
}
|
||||||
mIsDestroyed = true;
|
mIsDestroyed = true;
|
||||||
|
@ -600,6 +633,7 @@ TabParent::Show(const nsIntSize& size)
|
||||||
&layersId,
|
&layersId,
|
||||||
&success);
|
&success);
|
||||||
MOZ_ASSERT(success);
|
MOZ_ASSERT(success);
|
||||||
|
AddTabParentToTable(layersId, this);
|
||||||
unused << SendPRenderFrameConstructor(renderFrame);
|
unused << SendPRenderFrameConstructor(renderFrame);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2009,6 +2043,7 @@ TabParent::AllocPRenderFrameParent()
|
||||||
&layersId,
|
&layersId,
|
||||||
&success);
|
&success);
|
||||||
MOZ_ASSERT(success);
|
MOZ_ASSERT(success);
|
||||||
|
AddTabParentToTable(layersId, this);
|
||||||
return renderFrame;
|
return renderFrame;
|
||||||
} else {
|
} else {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
@ -2115,6 +2150,11 @@ TabParent::MaybeForwardEventToRenderFrame(WidgetInputEvent& aEvent,
|
||||||
if (aOutInputBlockId) {
|
if (aOutInputBlockId) {
|
||||||
*aOutInputBlockId = InputAPZContext::GetInputBlockId();
|
*aOutInputBlockId = InputAPZContext::GetInputBlockId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Let the widget know that the event will be sent to the child process,
|
||||||
|
// which will (hopefully) send a confirmation notice back to APZ.
|
||||||
|
InputAPZContext::SetRoutedToChildProcess();
|
||||||
|
|
||||||
return nsEventStatus_eIgnore;
|
return nsEventStatus_eIgnore;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -461,6 +461,18 @@ private:
|
||||||
nsCOMPtr<nsILoadContext> mLoadContext;
|
nsCOMPtr<nsILoadContext> mLoadContext;
|
||||||
|
|
||||||
TabId mTabId;
|
TabId mTabId;
|
||||||
|
|
||||||
|
private:
|
||||||
|
// This is used when APZ needs to find the TabParent associated with a layer
|
||||||
|
// to dispatch events.
|
||||||
|
typedef nsDataHashtable<nsUint64HashKey, TabParent*> LayerToTabParentTable;
|
||||||
|
static LayerToTabParentTable* sLayerToTabParentTable;
|
||||||
|
|
||||||
|
static void AddTabParentToTable(uint64_t aLayersId, TabParent* aTabParent);
|
||||||
|
static void RemoveTabParentFromTable(uint64_t aLayersId);
|
||||||
|
|
||||||
|
public:
|
||||||
|
static TabParent* GetTabParentFromLayersId(uint64_t aLayersId);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace dom
|
} // namespace dom
|
||||||
|
|
|
@ -194,6 +194,10 @@ public:
|
||||||
// This queues a call to Update() on the main thread.
|
// This queues a call to Update() on the main thread.
|
||||||
void QueueUpdate();
|
void QueueUpdate();
|
||||||
|
|
||||||
|
// Notify all streams for the resource ID that the suspended status changed
|
||||||
|
// at the end of MediaCache::Update.
|
||||||
|
void QueueSuspendedStatusUpdate(int64_t aResourceID);
|
||||||
|
|
||||||
// Updates the cache state asynchronously on the main thread:
|
// Updates the cache state asynchronously on the main thread:
|
||||||
// -- try to trim the cache back to its desired size, if necessary
|
// -- try to trim the cache back to its desired size, if necessary
|
||||||
// -- suspend channels that are going to read data that's lower priority
|
// -- suspend channels that are going to read data that's lower priority
|
||||||
|
@ -347,6 +351,8 @@ protected:
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
bool mInUpdate;
|
bool mInUpdate;
|
||||||
#endif
|
#endif
|
||||||
|
// A list of resource IDs to notify about the change in suspended status.
|
||||||
|
nsTArray<int64_t> mSuspendedStatusToNotify;
|
||||||
};
|
};
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
@ -1351,10 +1357,12 @@ MediaCache::Update()
|
||||||
case RESUME:
|
case RESUME:
|
||||||
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p Resumed", stream));
|
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p Resumed", stream));
|
||||||
rv = stream->mClient->CacheClientResume();
|
rv = stream->mClient->CacheClientResume();
|
||||||
|
QueueSuspendedStatusUpdate(stream->mResourceID);
|
||||||
break;
|
break;
|
||||||
case SUSPEND:
|
case SUSPEND:
|
||||||
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p Suspended", stream));
|
CACHE_LOG(PR_LOG_DEBUG, ("Stream %p Suspended", stream));
|
||||||
rv = stream->mClient->CacheClientSuspend();
|
rv = stream->mClient->CacheClientSuspend();
|
||||||
|
QueueSuspendedStatusUpdate(stream->mResourceID);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
rv = NS_OK;
|
rv = NS_OK;
|
||||||
|
@ -1369,6 +1377,15 @@ MediaCache::Update()
|
||||||
stream->CloseInternal(mon);
|
stream->CloseInternal(mon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Notify streams about the suspended status changes.
|
||||||
|
for (uint32_t i = 0; i < mSuspendedStatusToNotify.Length(); ++i) {
|
||||||
|
MediaCache::ResourceStreamIterator iter(mSuspendedStatusToNotify[i]);
|
||||||
|
while (MediaCacheStream* stream = iter.Next()) {
|
||||||
|
stream->mClient->CacheClientNotifySuspendedStatusChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mSuspendedStatusToNotify.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
class UpdateEvent : public nsRunnable
|
class UpdateEvent : public nsRunnable
|
||||||
|
@ -1399,6 +1416,15 @@ MediaCache::QueueUpdate()
|
||||||
NS_DispatchToMainThread(event);
|
NS_DispatchToMainThread(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
MediaCache::QueueSuspendedStatusUpdate(int64_t aResourceID)
|
||||||
|
{
|
||||||
|
NS_ASSERTION(NS_IsMainThread(), "Only call on main thread");
|
||||||
|
if (!mSuspendedStatusToNotify.Contains(aResourceID)) {
|
||||||
|
mSuspendedStatusToNotify.AppendElement(aResourceID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_VERIFY_CACHE
|
#ifdef DEBUG_VERIFY_CACHE
|
||||||
void
|
void
|
||||||
MediaCache::Verify()
|
MediaCache::Verify()
|
||||||
|
@ -1980,6 +2006,10 @@ MediaCacheStream::CloseInternal(ReentrantMonitorAutoEnter& aReentrantMonitor)
|
||||||
if (mClosed)
|
if (mClosed)
|
||||||
return;
|
return;
|
||||||
mClosed = true;
|
mClosed = true;
|
||||||
|
// Closing a stream will change the return value of
|
||||||
|
// MediaCacheStream::AreAllStreamsForResourceSuspended as well as
|
||||||
|
// ChannelMediaResource::IsSuspendedByCache. Let's notify it.
|
||||||
|
gMediaCache->QueueSuspendedStatusUpdate(mResourceID);
|
||||||
gMediaCache->ReleaseStreamBlocks(this);
|
gMediaCache->ReleaseStreamBlocks(this);
|
||||||
// Wake up any blocked readers
|
// Wake up any blocked readers
|
||||||
aReentrantMonitor.NotifyAll();
|
aReentrantMonitor.NotifyAll();
|
||||||
|
|
|
@ -1009,6 +1009,13 @@ ChannelMediaResource::CacheClientNotifyPrincipalChanged()
|
||||||
mDecoder->NotifyPrincipalChanged();
|
mDecoder->NotifyPrincipalChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ChannelMediaResource::CacheClientNotifySuspendedStatusChanged()
|
||||||
|
{
|
||||||
|
NS_ASSERTION(NS_IsMainThread(), "Don't call on non-main thread");
|
||||||
|
mDecoder->NotifySuspendedStatusChanged();
|
||||||
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
ChannelMediaResource::CacheClientSeek(int64_t aOffset, bool aResume)
|
ChannelMediaResource::CacheClientSeek(int64_t aOffset, bool aResume)
|
||||||
{
|
{
|
||||||
|
@ -1067,8 +1074,6 @@ nsresult
|
||||||
ChannelMediaResource::CacheClientSuspend()
|
ChannelMediaResource::CacheClientSuspend()
|
||||||
{
|
{
|
||||||
Suspend(false);
|
Suspend(false);
|
||||||
|
|
||||||
mDecoder->NotifySuspendedStatusChanged();
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1076,8 +1081,6 @@ nsresult
|
||||||
ChannelMediaResource::CacheClientResume()
|
ChannelMediaResource::CacheClientResume()
|
||||||
{
|
{
|
||||||
Resume();
|
Resume();
|
||||||
|
|
||||||
mDecoder->NotifySuspendedStatusChanged();
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -538,6 +538,8 @@ public:
|
||||||
void CacheClientNotifyDataEnded(nsresult aStatus);
|
void CacheClientNotifyDataEnded(nsresult aStatus);
|
||||||
// Notify that the principal for the cached resource changed.
|
// Notify that the principal for the cached resource changed.
|
||||||
void CacheClientNotifyPrincipalChanged();
|
void CacheClientNotifyPrincipalChanged();
|
||||||
|
// Notify the decoder that the cache suspended status changed.
|
||||||
|
void CacheClientNotifySuspendedStatusChanged();
|
||||||
|
|
||||||
// These are called on the main thread by MediaCache. These shouldn't block,
|
// These are called on the main thread by MediaCache. These shouldn't block,
|
||||||
// but they may grab locks --- the media cache is not holding its lock
|
// but they may grab locks --- the media cache is not holding its lock
|
||||||
|
|
|
@ -118,6 +118,7 @@ class GMPRecordClient {
|
||||||
class GMPRecordIterator {
|
class GMPRecordIterator {
|
||||||
public:
|
public:
|
||||||
// Retrieve the name for the current record.
|
// Retrieve the name for the current record.
|
||||||
|
// aOutName is null terminated at character at index (*aOutNameLength).
|
||||||
// Returns GMPNoErr if successful, or GMPEndOfEnumeration if iteration has
|
// Returns GMPNoErr if successful, or GMPEndOfEnumeration if iteration has
|
||||||
// reached the end.
|
// reached the end.
|
||||||
virtual GMPErr GetName(const char ** aOutName, uint32_t * aOutNameLength) = 0;
|
virtual GMPErr GetName(const char ** aOutName, uint32_t * aOutNameLength) = 0;
|
||||||
|
|
|
@ -327,6 +327,7 @@ MediaSourceReader::Shutdown()
|
||||||
void
|
void
|
||||||
MediaSourceReader::ContinueShutdown()
|
MediaSourceReader::ContinueShutdown()
|
||||||
{
|
{
|
||||||
|
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
|
||||||
if (mTrackBuffers.Length()) {
|
if (mTrackBuffers.Length()) {
|
||||||
mTrackBuffers[0]->Shutdown()->Then(GetTaskQueue(), __func__, this,
|
mTrackBuffers[0]->Shutdown()->Then(GetTaskQueue(), __func__, this,
|
||||||
&MediaSourceReader::ContinueShutdown,
|
&MediaSourceReader::ContinueShutdown,
|
||||||
|
|
|
@ -39,12 +39,14 @@ TrackBuffer::TrackBuffer(MediaSourceDecoder* aParentDecoder, const nsACString& a
|
||||||
: mParentDecoder(aParentDecoder)
|
: mParentDecoder(aParentDecoder)
|
||||||
, mType(aType)
|
, mType(aType)
|
||||||
, mLastStartTimestamp(0)
|
, mLastStartTimestamp(0)
|
||||||
|
, mShutdown(false)
|
||||||
{
|
{
|
||||||
MOZ_COUNT_CTOR(TrackBuffer);
|
MOZ_COUNT_CTOR(TrackBuffer);
|
||||||
mParser = ContainerParser::CreateForMIMEType(aType);
|
mParser = ContainerParser::CreateForMIMEType(aType);
|
||||||
mTaskQueue = new MediaTaskQueue(GetMediaDecodeThreadPool());
|
mTaskQueue = new MediaTaskQueue(GetMediaDecodeThreadPool());
|
||||||
aParentDecoder->AddTrackBuffer(this);
|
aParentDecoder->AddTrackBuffer(this);
|
||||||
mDecoderPerSegment = Preferences::GetBool("media.mediasource.decoder-per-segment", false);
|
mDecoderPerSegment = Preferences::GetBool("media.mediasource.decoder-per-segment", false);
|
||||||
|
MSE_DEBUG("TrackBuffer(%p) created for parent decoder %p", this, aParentDecoder);
|
||||||
}
|
}
|
||||||
|
|
||||||
TrackBuffer::~TrackBuffer()
|
TrackBuffer::~TrackBuffer()
|
||||||
|
@ -101,6 +103,9 @@ private:
|
||||||
nsRefPtr<ShutdownPromise>
|
nsRefPtr<ShutdownPromise>
|
||||||
TrackBuffer::Shutdown()
|
TrackBuffer::Shutdown()
|
||||||
{
|
{
|
||||||
|
mParentDecoder->GetReentrantMonitor().AssertCurrentThreadIn();
|
||||||
|
mShutdown = true;
|
||||||
|
|
||||||
MOZ_ASSERT(mShutdownPromise.IsEmpty());
|
MOZ_ASSERT(mShutdownPromise.IsEmpty());
|
||||||
nsRefPtr<ShutdownPromise> p = mShutdownPromise.Ensure(__func__);
|
nsRefPtr<ShutdownPromise> p = mShutdownPromise.Ensure(__func__);
|
||||||
|
|
||||||
|
@ -370,23 +375,42 @@ TrackBuffer::QueueInitializeDecoder(SourceBufferDecoder* aDecoder)
|
||||||
void
|
void
|
||||||
TrackBuffer::InitializeDecoder(SourceBufferDecoder* aDecoder)
|
TrackBuffer::InitializeDecoder(SourceBufferDecoder* aDecoder)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(mTaskQueue->IsCurrentThreadIn());
|
// ReadMetadata may block the thread waiting on data, so we must be able
|
||||||
|
// to leave the monitor while we call it. For the rest of this function
|
||||||
// ReadMetadata may block the thread waiting on data, so it must not be
|
// we want to hold the monitor though, since we run on a different task queue
|
||||||
// called with the monitor held.
|
// from the reader and interact heavily with it.
|
||||||
mParentDecoder->GetReentrantMonitor().AssertNotCurrentThreadIn();
|
mParentDecoder->GetReentrantMonitor().AssertNotCurrentThreadIn();
|
||||||
|
ReentrantMonitorAutoEnter mon(mParentDecoder->GetReentrantMonitor());
|
||||||
|
|
||||||
|
// We may be shut down at any time by the reader on another thread. So we need
|
||||||
|
// to check for this each time we acquire the monitor. If that happens, we
|
||||||
|
// need to abort immediately, because the reader has forgotten about us, and
|
||||||
|
// important pieces of our state (like mTaskQueue) have also been torn down.
|
||||||
|
if (mShutdown) {
|
||||||
|
MSE_DEBUG("TrackBuffer(%p) was shut down. Aborting initialization.", this);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MOZ_ASSERT(mTaskQueue->IsCurrentThreadIn());
|
||||||
MediaDecoderReader* reader = aDecoder->GetReader();
|
MediaDecoderReader* reader = aDecoder->GetReader();
|
||||||
MSE_DEBUG("TrackBuffer(%p): Initializing subdecoder %p reader %p",
|
MSE_DEBUG("TrackBuffer(%p): Initializing subdecoder %p reader %p",
|
||||||
this, aDecoder, reader);
|
this, aDecoder, reader);
|
||||||
|
|
||||||
MediaInfo mi;
|
MediaInfo mi;
|
||||||
nsAutoPtr<MetadataTags> tags; // TODO: Handle metadata.
|
nsAutoPtr<MetadataTags> tags; // TODO: Handle metadata.
|
||||||
nsresult rv = reader->ReadMetadata(&mi, getter_Transfers(tags));
|
nsresult rv;
|
||||||
|
{
|
||||||
|
ReentrantMonitorAutoExit mon(mParentDecoder->GetReentrantMonitor());
|
||||||
|
rv = reader->ReadMetadata(&mi, getter_Transfers(tags));
|
||||||
|
}
|
||||||
|
|
||||||
reader->SetIdle();
|
reader->SetIdle();
|
||||||
|
if (mShutdown) {
|
||||||
|
MSE_DEBUG("TrackBuffer(%p) was shut down while reading metadata. Aborting initialization.", this);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (NS_SUCCEEDED(rv) && reader->IsWaitingOnCDMResource()) {
|
if (NS_SUCCEEDED(rv) && reader->IsWaitingOnCDMResource()) {
|
||||||
ReentrantMonitorAutoEnter mon(mParentDecoder->GetReentrantMonitor());
|
|
||||||
mWaitingDecoders.AppendElement(aDecoder);
|
mWaitingDecoders.AppendElement(aDecoder);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -442,7 +466,7 @@ TrackBuffer::ValidateTrackFormats(const MediaInfo& aInfo)
|
||||||
bool
|
bool
|
||||||
TrackBuffer::RegisterDecoder(SourceBufferDecoder* aDecoder)
|
TrackBuffer::RegisterDecoder(SourceBufferDecoder* aDecoder)
|
||||||
{
|
{
|
||||||
ReentrantMonitorAutoEnter mon(mParentDecoder->GetReentrantMonitor());
|
mParentDecoder->GetReentrantMonitor().AssertCurrentThreadIn();
|
||||||
const MediaInfo& info = aDecoder->GetReader()->GetMediaInfo();
|
const MediaInfo& info = aDecoder->GetReader()->GetMediaInfo();
|
||||||
// Initialize the track info since this is the first decoder.
|
// Initialize the track info since this is the first decoder.
|
||||||
if (mInitializedDecoders.IsEmpty()) {
|
if (mInitializedDecoders.IsEmpty()) {
|
||||||
|
|
|
@ -163,6 +163,7 @@ private:
|
||||||
void ContinueShutdown();
|
void ContinueShutdown();
|
||||||
MediaPromiseHolder<ShutdownPromise> mShutdownPromise;
|
MediaPromiseHolder<ShutdownPromise> mShutdownPromise;
|
||||||
bool mDecoderPerSegment;
|
bool mDecoderPerSegment;
|
||||||
|
bool mShutdown;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
|
@ -3,9 +3,12 @@ const KEYSYSTEM_TYPE = "org.w3.clearkey";
|
||||||
function bail(message)
|
function bail(message)
|
||||||
{
|
{
|
||||||
return function(err) {
|
return function(err) {
|
||||||
|
if (err) {
|
||||||
|
message += "; " + String(err)
|
||||||
|
}
|
||||||
ok(false, message);
|
ok(false, message);
|
||||||
if (err) {
|
if (err) {
|
||||||
info(err);
|
info(String(err));
|
||||||
}
|
}
|
||||||
SimpleTest.finish();
|
SimpleTest.finish();
|
||||||
}
|
}
|
||||||
|
@ -70,13 +73,13 @@ function Log(token, msg) {
|
||||||
info(TimeStamp(token) + " " + msg);
|
info(TimeStamp(token) + " " + msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
function UpdateSessionFunc(test, token) {
|
function UpdateSessionFunc(test, token, sessionType) {
|
||||||
return function(ev) {
|
return function(ev) {
|
||||||
var msgStr = ArrayBufferToString(ev.message);
|
var msgStr = ArrayBufferToString(ev.message);
|
||||||
var msg = JSON.parse(msgStr);
|
var msg = JSON.parse(msgStr);
|
||||||
|
|
||||||
Log(token, "got message from CDM: " + msgStr);
|
Log(token, "got message from CDM: " + msgStr);
|
||||||
is(msg.type, test.sessionType, TimeStamp(token) + " key session type should match");
|
is(msg.type, sessionType, TimeStamp(token) + " key session type should match");
|
||||||
ok(msg.kids, TimeStamp(token) + " message event should contain key ID array");
|
ok(msg.kids, TimeStamp(token) + " message event should contain key ID array");
|
||||||
|
|
||||||
var outKeys = [];
|
var outKeys = [];
|
||||||
|
@ -211,24 +214,24 @@ function SetupEME(test, token, params)
|
||||||
.then(function(keySystemAccess) {
|
.then(function(keySystemAccess) {
|
||||||
return keySystemAccess.createMediaKeys();
|
return keySystemAccess.createMediaKeys();
|
||||||
}, bail(token + " Failed to request key system access."))
|
}, bail(token + " Failed to request key system access."))
|
||||||
|
|
||||||
.then(function(mediaKeys) {
|
.then(function(mediaKeys) {
|
||||||
Log(token, "created MediaKeys object ok");
|
Log(token, "created MediaKeys object ok");
|
||||||
mediaKeys.sessions = [];
|
mediaKeys.sessions = [];
|
||||||
return v.setMediaKeys(mediaKeys);
|
return v.setMediaKeys(mediaKeys);
|
||||||
}, bail("failed to create MediaKeys object"))
|
}, bail("failed to create MediaKeys object"))
|
||||||
|
|
||||||
.then(function() {
|
.then(function() {
|
||||||
Log(token, "set MediaKeys on <video> element ok");
|
Log(token, "set MediaKeys on <video> element ok");
|
||||||
|
var sessionType = (params && params.sessionType) ? params.sessionType : "temporary";
|
||||||
var session = v.mediaKeys.createSession(test.sessionType);
|
var session = v.mediaKeys.createSession(sessionType);
|
||||||
if (params && params.onsessioncreated) {
|
if (params && params.onsessioncreated) {
|
||||||
params.onsessioncreated(session);
|
params.onsessioncreated(session);
|
||||||
}
|
}
|
||||||
session.addEventListener("message", UpdateSessionFunc(test, token));
|
session.addEventListener("message", UpdateSessionFunc(test, token, sessionType));
|
||||||
return session.generateRequest(ev.initDataType, ev.initData);
|
return session.generateRequest(ev.initDataType, ev.initData);
|
||||||
}, onSetKeysFail)
|
}, onSetKeysFail)
|
||||||
|
|
||||||
.then(function() {
|
.then(function() {
|
||||||
Log(token, "generated request");
|
Log(token, "generated request");
|
||||||
}, bail(token + " Failed to request key system access2."));
|
}, bail(token + " Failed to request key system access2."));
|
||||||
|
|
|
@ -364,6 +364,8 @@ skip-if = (toolkit == 'android' && processor == 'x86') #x86 only bug 914439
|
||||||
skip-if = buildapp == 'b2g' && toolkit != 'gonk' # bug 1082984
|
skip-if = buildapp == 'b2g' && toolkit != 'gonk' # bug 1082984
|
||||||
[test_eme_canvas_blocked.html]
|
[test_eme_canvas_blocked.html]
|
||||||
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # bug 1043403, bug 1057908
|
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # bug 1043403, bug 1057908
|
||||||
|
[test_eme_persistent_sessions.html]
|
||||||
|
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # bug 1043403, bug 1057908
|
||||||
[test_eme_playback.html]
|
[test_eme_playback.html]
|
||||||
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # bug 1043403, bug 1057908
|
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # bug 1043403, bug 1057908
|
||||||
[test_eme_requestKeySystemAccess.html]
|
[test_eme_requestKeySystemAccess.html]
|
||||||
|
|
|
@ -0,0 +1,156 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Test Encrypted Media Extensions</title>
|
||||||
|
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||||
|
<script type="text/javascript" src="manifest.js"></script>
|
||||||
|
<script type="text/javascript" src="eme.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<pre id="test">
|
||||||
|
<script class="testbody" type="text/javascript">
|
||||||
|
var manager = new MediaTestManager;
|
||||||
|
|
||||||
|
function UsableKeyIdsMatch(usableKeyIds, expectedKeyIds) {
|
||||||
|
var hexKeyIds = usableKeyIds.map(function(keyId) {
|
||||||
|
return Base64ToHex(window.btoa(ArrayBufferToString(keyId)));
|
||||||
|
}).sort();
|
||||||
|
var expected = Object.keys(expectedKeyIds).sort();
|
||||||
|
if (expected.length != hexKeyIds.length) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for (var i = 0; i < hexKeyIds.length; i++) {
|
||||||
|
if (hexKeyIds[i] != expected[i]){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function AwaitAllKeysUsable(session, keys, token) {
|
||||||
|
return new Promise(function(resolve, reject) {
|
||||||
|
function listener(event) {
|
||||||
|
session.getUsableKeyIds().then(function(usableKeyIds) {
|
||||||
|
var u = UsableKeyIdsMatch(usableKeyIds, keys);
|
||||||
|
if (UsableKeyIdsMatch(usableKeyIds, keys)) {
|
||||||
|
Log(token, "resolving AwaitAllKeysUsable promise");
|
||||||
|
session.removeEventListener("keyschange", listener);
|
||||||
|
resolve();
|
||||||
|
}
|
||||||
|
}, bail(token + " failed to get usableKeyIds"));
|
||||||
|
}
|
||||||
|
session.addEventListener("keyschange", listener);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function AwaitAllKeysNotUsable(session, token) {
|
||||||
|
return new Promise(function(resolve, reject) {
|
||||||
|
function listener(event) {
|
||||||
|
session.getUsableKeyIds().then(function(usableKeyIds) {
|
||||||
|
if (usableKeyIds.length == 0) {
|
||||||
|
session.removeEventListener("keyschange", listener);
|
||||||
|
resolve();
|
||||||
|
}
|
||||||
|
}, bail(token + " failed to get usableKeyIds"));
|
||||||
|
}
|
||||||
|
session.addEventListener("keyschange", listener);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function startTest(test, token)
|
||||||
|
{
|
||||||
|
manager.started(token);
|
||||||
|
|
||||||
|
var recreatedSession; // will have remove() called on it.
|
||||||
|
|
||||||
|
var keySystemAccess;
|
||||||
|
|
||||||
|
var v = SetupEME(test, token,
|
||||||
|
{
|
||||||
|
onsessioncreated: function(session) {
|
||||||
|
Log(token, "Session created");
|
||||||
|
var sessionId;
|
||||||
|
initialSession = session;
|
||||||
|
|
||||||
|
// Once the session has loaded and has all its keys usable, close
|
||||||
|
// all sessions without calling remove() on them.
|
||||||
|
AwaitAllKeysUsable(session, test.keys, token).then(
|
||||||
|
function() {
|
||||||
|
sessionId = session.sessionId;
|
||||||
|
Log(token, "Closing session with id=" + sessionId);
|
||||||
|
session.close();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// Once the session is closed, reload the MediaKeys and reload the session
|
||||||
|
session.closed.then(function() {
|
||||||
|
return navigator.requestMediaKeySystemAccess(KEYSYSTEM_TYPE)
|
||||||
|
}, bail("close promise rejected"))
|
||||||
|
|
||||||
|
.then(function(requestedKeySystemAccess) {
|
||||||
|
keySystemAccess = requestedKeySystemAccess;
|
||||||
|
return keySystemAccess.createMediaKeys();
|
||||||
|
}, bail(token + " Failed to request key system access."))
|
||||||
|
|
||||||
|
.then(function(mediaKeys) {
|
||||||
|
Log(token, "re-created MediaKeys object ok");
|
||||||
|
recreatedSession = mediaKeys.createSession("persistent");
|
||||||
|
Log(token, "Created recreatedSession, loading sessionId=" + sessionId);
|
||||||
|
return Promise.all([AwaitAllKeysUsable(recreatedSession, test.keys, token), recreatedSession.load(sessionId)]);
|
||||||
|
}, bail(token + " failed to create mediaKeys"))
|
||||||
|
|
||||||
|
.then(function() {
|
||||||
|
Log(token, "re-loaded persistent session, all keys still usable");
|
||||||
|
return Promise.all([AwaitAllKeysNotUsable(recreatedSession, token), recreatedSession.remove()]);
|
||||||
|
}, bail(token + " failed to get reload session or keys"))
|
||||||
|
|
||||||
|
.then(function() {
|
||||||
|
Log(token, "removed session, all keys unusable.");
|
||||||
|
// Attempt to recreate the session, the attempt should fail.
|
||||||
|
return keySystemAccess.createMediaKeys();
|
||||||
|
}, bail(token + " failed to remove session"))
|
||||||
|
|
||||||
|
.then(function(mediaKeys) {
|
||||||
|
Log(token, "re-re-created MediaKeys object ok");
|
||||||
|
// Trying to load the removed persistent session should fail.
|
||||||
|
return mediaKeys.createSession("persistent").load(sessionId);
|
||||||
|
}, bail(token + " failed to create mediaKeys"))
|
||||||
|
|
||||||
|
.then(function(suceeded) {
|
||||||
|
is(suceeded, false, token + " we expect the third session creation to fail, as the session should have been removed.");
|
||||||
|
manager.finished(token);
|
||||||
|
}, bail(token + " failure to load session."));
|
||||||
|
|
||||||
|
},
|
||||||
|
sessionType: "persistent",
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
v.addEventListener("error", bail(token + " got error event"));
|
||||||
|
|
||||||
|
LoadTest(test, v, token);
|
||||||
|
}
|
||||||
|
|
||||||
|
function beginTest() {
|
||||||
|
manager.runTests(gEMETests, startTest);
|
||||||
|
}
|
||||||
|
|
||||||
|
var prefs = [
|
||||||
|
[ "media.mediasource.enabled", true ],
|
||||||
|
[ "media.mediasource.mp4.enabled", true ],
|
||||||
|
];
|
||||||
|
|
||||||
|
if (/Linux/.test(navigator.userAgent) ||
|
||||||
|
!document.createElement('video').canPlayType("video/mp4")) {
|
||||||
|
// XXX remove once we have mp4 PlatformDecoderModules on all platforms.
|
||||||
|
prefs.push([ "media.fragmented-mp4.exposed", true ]);
|
||||||
|
prefs.push([ "media.fragmented-mp4.use-blank-decoder", true ]);
|
||||||
|
}
|
||||||
|
|
||||||
|
SimpleTest.waitForExplicitFinish();
|
||||||
|
SpecialPowers.pushPrefEnv({ "set" : prefs }, beginTest);
|
||||||
|
</script>
|
||||||
|
</pre>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -22,6 +22,7 @@ function startTest() {
|
||||||
|
|
||||||
mStream = stream;
|
mStream = stream;
|
||||||
element.mozSrcObject = mStream;
|
element.mozSrcObject = mStream;
|
||||||
|
element.play();
|
||||||
})
|
})
|
||||||
.catch(function(reason) {
|
.catch(function(reason) {
|
||||||
ok(false, "unexpected error = " + reason.message);
|
ok(false, "unexpected error = " + reason.message);
|
||||||
|
|
|
@ -128,6 +128,7 @@ function runTest(aCallback) {
|
||||||
if (window.SimpleTest) {
|
if (window.SimpleTest) {
|
||||||
// Running as a Mochitest.
|
// Running as a Mochitest.
|
||||||
SimpleTest.waitForExplicitFinish();
|
SimpleTest.waitForExplicitFinish();
|
||||||
|
SimpleTest.requestFlakyTimeout("WebRTC inherently depends on timeouts");
|
||||||
SpecialPowers.pushPrefEnv({'set': [
|
SpecialPowers.pushPrefEnv({'set': [
|
||||||
['dom.messageChannel.enabled', true],
|
['dom.messageChannel.enabled', true],
|
||||||
['media.peerconnection.enabled', true],
|
['media.peerconnection.enabled', true],
|
||||||
|
|
|
@ -10,9 +10,6 @@
|
||||||
<body>
|
<body>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
|
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
createHTML({
|
createHTML({
|
||||||
title: "getIdentityAssertion Tests"
|
title: "getIdentityAssertion Tests"
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,9 +14,6 @@
|
||||||
<div id="display"></div>
|
<div id="display"></div>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
|
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
createHTML({
|
createHTML({
|
||||||
title: "setIdentityProvider leads to peerIdentity and assertions in SDP"
|
title: "setIdentityProvider leads to peerIdentity and assertions in SDP"
|
||||||
});
|
});
|
||||||
|
|
|
@ -12,9 +12,6 @@
|
||||||
<body>
|
<body>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
|
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
createHTML({
|
createHTML({
|
||||||
title: "setIdentityProvider leads to peerIdentity and assertions in SDP"
|
title: "setIdentityProvider leads to peerIdentity and assertions in SDP"
|
||||||
});
|
});
|
||||||
|
|
|
@ -11,9 +11,6 @@
|
||||||
<body>
|
<body>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
|
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
createHTML({
|
createHTML({
|
||||||
title: "Identity Provider returning errors is handled correctly"
|
title: "Identity Provider returning errors is handled correctly"
|
||||||
});
|
});
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
SimpleTest.waitForExplicitFinish();
|
SimpleTest.waitForExplicitFinish();
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
// This isn't a single test. It runs the entirety of the PeerConnection
|
// This isn't a single test. It runs the entirety of the PeerConnection
|
||||||
// tests. Each of those has a normal timeout handler, so there's no point in
|
// tests. Each of those has a normal timeout handler, so there's no point in
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
<body>
|
<body>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
createHTML({
|
createHTML({
|
||||||
bug: "796895",
|
bug: "796895",
|
||||||
title: "Basic data channel audio connection"
|
title: "Basic data channel audio connection"
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
<body>
|
<body>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
createHTML({
|
createHTML({
|
||||||
bug: "796891",
|
bug: "796891",
|
||||||
title: "Basic data channel audio/video connection"
|
title: "Basic data channel audio/video connection"
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
<body>
|
<body>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
createHTML({
|
createHTML({
|
||||||
bug: "796891",
|
bug: "796891",
|
||||||
title: "Basic data channel audio/video connection"
|
title: "Basic data channel audio/video connection"
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
<body>
|
<body>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
createHTML({
|
createHTML({
|
||||||
bug: "796894",
|
bug: "796894",
|
||||||
title: "Basic datachannel only connection"
|
title: "Basic datachannel only connection"
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
<body>
|
<body>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
createHTML({
|
createHTML({
|
||||||
bug: "796889",
|
bug: "796889",
|
||||||
title: "Basic data channel video connection"
|
title: "Basic data channel video connection"
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
<body>
|
<body>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
createHTML({
|
createHTML({
|
||||||
bug: "796895",
|
bug: "796895",
|
||||||
title: "Basic data channel audio connection"
|
title: "Basic data channel audio connection"
|
||||||
|
|
|
@ -19,8 +19,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=781534
|
||||||
</div>
|
</div>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run a test to verify that we can complete a start and stop media playback
|
* Run a test to verify that we can complete a start and stop media playback
|
||||||
* cycle for an audio LocalMediaStream on an audio HTMLMediaElement.
|
* cycle for an audio LocalMediaStream on an audio HTMLMediaElement.
|
||||||
|
|
|
@ -19,8 +19,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=983504
|
||||||
</div>
|
</div>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run a test to verify that we can complete a start and stop media playback
|
* Run a test to verify that we can complete a start and stop media playback
|
||||||
* cycle for an screenshare LocalMediaStream on a video HTMLMediaElement.
|
* cycle for an screenshare LocalMediaStream on a video HTMLMediaElement.
|
||||||
|
|
|
@ -19,8 +19,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=781534
|
||||||
</div>
|
</div>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run a test to verify that we can complete a start and stop media playback
|
* Run a test to verify that we can complete a start and stop media playback
|
||||||
* cycle for an video LocalMediaStream on a video HTMLMediaElement.
|
* cycle for an video LocalMediaStream on a video HTMLMediaElement.
|
||||||
|
|
|
@ -19,8 +19,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=781534
|
||||||
</div>
|
</div>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run a test to verify that we can complete a start and stop media playback
|
* Run a test to verify that we can complete a start and stop media playback
|
||||||
* cycle for a video and audio LocalMediaStream on a video HTMLMediaElement.
|
* cycle for a video and audio LocalMediaStream on a video HTMLMediaElement.
|
||||||
|
|
|
@ -19,8 +19,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=983504
|
||||||
</div>
|
</div>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run a test to verify that we can complete a start and stop media playback
|
* Run a test to verify that we can complete a start and stop media playback
|
||||||
* cycle for an screenshare LocalMediaStream on a video HTMLMediaElement.
|
* cycle for an screenshare LocalMediaStream on a video HTMLMediaElement.
|
||||||
|
|
|
@ -20,8 +20,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=822109
|
||||||
</div>
|
</div>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run a test that we can complete a playback cycle for a video,
|
* Run a test that we can complete a playback cycle for a video,
|
||||||
* then upon completion, do a playback cycle with audio, such that
|
* then upon completion, do a playback cycle with audio, such that
|
||||||
|
|
|
@ -19,8 +19,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=942367
|
||||||
</div>
|
</div>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
function theTest() {
|
function theTest() {
|
||||||
function testPeerIdentityConstraint(withConstraint, done) {
|
function testPeerIdentityConstraint(withConstraint, done) {
|
||||||
var config = { audio: true, video: true, fake: true };
|
var config = { audio: true, video: true, fake: true };
|
||||||
|
|
|
@ -19,8 +19,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=822109
|
||||||
</div>
|
</div>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run a test that we can complete an audio playback cycle twice in a row.
|
* Run a test that we can complete an audio playback cycle twice in a row.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -19,8 +19,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=822109
|
||||||
</div>
|
</div>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run a test that we can complete a video playback cycle twice in a row.
|
* Run a test that we can complete a video playback cycle twice in a row.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -19,8 +19,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=822109
|
||||||
</div>
|
</div>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run a test that we can complete a video playback cycle twice in a row.
|
* Run a test that we can complete a video playback cycle twice in a row.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -19,8 +19,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=822109
|
||||||
</div>
|
</div>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run a test to verify that we can start an audio stream in a media element,
|
* Run a test to verify that we can start an audio stream in a media element,
|
||||||
* call stop() on the stream, and successfully get an ended event fired.
|
* call stop() on the stream, and successfully get an ended event fired.
|
||||||
|
|
|
@ -19,8 +19,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=822109
|
||||||
</div>
|
</div>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run a test to verify that I can complete an audio gum playback in a media
|
* Run a test to verify that I can complete an audio gum playback in a media
|
||||||
* element, stop the stream, and then complete another audio gum playback
|
* element, stop the stream, and then complete another audio gum playback
|
||||||
|
|
|
@ -19,8 +19,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=822109
|
||||||
</div>
|
</div>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run a test to verify that we can start a video+audio stream in a
|
* Run a test to verify that we can start a video+audio stream in a
|
||||||
* media element, call stop() on the stream, and successfully get an
|
* media element, call stop() on the stream, and successfully get an
|
||||||
|
|
|
@ -19,8 +19,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=822109
|
||||||
</div>
|
</div>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run a test to verify that I can complete an video+audio gum playback in a
|
* Run a test to verify that I can complete an video+audio gum playback in a
|
||||||
* media element, stop the stream, and then complete another video+audio gum
|
* media element, stop the stream, and then complete another video+audio gum
|
||||||
|
|
|
@ -19,8 +19,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=822109
|
||||||
</div>
|
</div>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run a test to verify that we can start a video stream in a media element,
|
* Run a test to verify that we can start a video stream in a media element,
|
||||||
* call stop() on the stream, and successfully get an ended event fired.
|
* call stop() on the stream, and successfully get an ended event fired.
|
||||||
|
|
|
@ -19,8 +19,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=822109
|
||||||
</div>
|
</div>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run a test to verify that I can complete an audio gum playback in a media
|
* Run a test to verify that I can complete an audio gum playback in a media
|
||||||
* element, stop the stream, and then complete another audio gum playback
|
* element, stop the stream, and then complete another audio gum playback
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
<body>
|
<body>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
createHTML({
|
createHTML({
|
||||||
bug: "784519",
|
bug: "784519",
|
||||||
title: "addCandidate (answer) in 'have-local-offer'"
|
title: "addCandidate (answer) in 'have-local-offer'"
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
<body>
|
<body>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
createHTML({
|
createHTML({
|
||||||
bug: "796892",
|
bug: "796892",
|
||||||
title: "Basic audio-only peer connection"
|
title: "Basic audio-only peer connection"
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
<body>
|
<body>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
createHTML({
|
createHTML({
|
||||||
bug: "796890",
|
bug: "796890",
|
||||||
title: "Basic audio/video (separate) peer connection"
|
title: "Basic audio/video (separate) peer connection"
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
<body>
|
<body>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
createHTML({
|
createHTML({
|
||||||
bug: "796890",
|
bug: "796890",
|
||||||
title: "Basic audio/video (combined) peer connection"
|
title: "Basic audio/video (combined) peer connection"
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
<body>
|
<body>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript;version=1.8">
|
<script type="application/javascript;version=1.8">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
createHTML({
|
createHTML({
|
||||||
bug: "1040346",
|
bug: "1040346",
|
||||||
title: "Basic H.264 GMP video-only peer connection"
|
title: "Basic H.264 GMP video-only peer connection"
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
<body>
|
<body>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
createHTML({
|
createHTML({
|
||||||
bug: "1039666",
|
bug: "1039666",
|
||||||
title: "Basic screenshare-only peer connection"
|
title: "Basic screenshare-only peer connection"
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
<body>
|
<body>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
createHTML({
|
createHTML({
|
||||||
bug: "796888",
|
bug: "796888",
|
||||||
title: "Basic video-only peer connection"
|
title: "Basic video-only peer connection"
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
<body>
|
<body>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
createHTML({
|
createHTML({
|
||||||
bug: "1038926",
|
bug: "1038926",
|
||||||
title: "Basic windowshare-only peer connection"
|
title: "Basic windowshare-only peer connection"
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
<body>
|
<body>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
createHTML({
|
createHTML({
|
||||||
bug: "1013809",
|
bug: "1013809",
|
||||||
title: "Audio-only peer connection with swapped setLocal and setRemote steps"
|
title: "Audio-only peer connection with swapped setLocal and setRemote steps"
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
<body>
|
<body>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript;version=1.8">
|
<script type="application/javascript;version=1.8">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
createHTML({
|
createHTML({
|
||||||
bug: "1040346",
|
bug: "1040346",
|
||||||
title: "Basic H.264 GMP video-only peer connection"
|
title: "Basic H.264 GMP video-only peer connection"
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
<body>
|
<body>
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
SimpleTest.requestFlakyTimeout("untriaged");
|
|
||||||
|
|
||||||
createHTML({
|
createHTML({
|
||||||
bug: "827843",
|
bug: "827843",
|
||||||
title: "Ensure that localDescription and remoteDescription are null after close"
|
title: "Ensure that localDescription and remoteDescription are null after close"
|
||||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче