Merge m-c to fx-team, a=merge

This commit is contained in:
Wes Kocher 2015-11-24 16:56:56 -08:00
commit 43a9d51b08
478 changed files with 30393 additions and 7472 deletions

View File

@ -20,6 +20,10 @@ const base64png = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYA" +
const { base64jpeg } = require("./fixtures");
const { platform } = require("sdk/system");
// For Windows, Mac and Linux, platform returns the following: winnt, darwin and linux.
var isWindows = platform.toLowerCase().indexOf("win") == 0;
const canvasHTML = "data:text/html," + encodeURIComponent(
"<html>\
<body>\
@ -99,6 +103,13 @@ exports["test With No Flavor"] = function(assert) {
exports["test With Flavor"] = function(assert) {
var contents = "<b>hello there</b>";
var contentsText = "hello there";
// On windows, HTML clipboard includes extra data.
// The values are from widget/windows/nsDataObj.cpp.
var contentsWindowsHtml = "<html><body>\n<!--StartFragment-->" +
contents +
"<!--EndFragment-->\n</body>\n</html>";
var flavor = "html";
var fullFlavor = "text/html";
var unicodeFlavor = "text";
@ -110,8 +121,8 @@ exports["test With Flavor"] = function(assert) {
assert.equal(clip.currentFlavors[0], unicodeFlavor);
assert.equal(clip.currentFlavors[1], flavor);
assert.equal(clip.get(), contentsText);
assert.equal(clip.get(flavor), contents);
assert.equal(clip.get(fullFlavor), contents);
assert.equal(clip.get(flavor), isWindows ? contentsWindowsHtml : contents);
assert.equal(clip.get(fullFlavor), isWindows ? contentsWindowsHtml : contents);
assert.equal(clip.get(unicodeFlavor), contentsText);
assert.equal(clip.get(unicodeFullFlavor), contentsText);
};

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="ea673b5c4cc19c3daca072691a659c68e4c6937f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="37250b125e0db6966875d3b37b117f6d9b76cbc0"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9a58f2e395da17c252f61f28900b5b09aeb813bd"/>
@ -24,7 +24,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0e781b61e61b065ca9f3b05ed01b0ef1d9855010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ce651a7711042301cbc9c6866be0eeb9e1ceab66"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<!-- Stock Android things -->
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="ea673b5c4cc19c3daca072691a659c68e4c6937f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="37250b125e0db6966875d3b37b117f6d9b76cbc0"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9a58f2e395da17c252f61f28900b5b09aeb813bd"/>
@ -24,7 +24,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0e781b61e61b065ca9f3b05ed01b0ef1d9855010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ce651a7711042301cbc9c6866be0eeb9e1ceab66"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<!-- Stock Android things -->
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>

View File

@ -1,39 +1,48 @@
<?xml version="1.0" ?><manifest>
<!--original fetch url was https://android.googlesource.com/-->
<remote fetch="https://git.mozilla.org/external/aosp" name="aosp"/>
<!--original fetch url was git://codeaurora.org/-->
<remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
<!--original fetch url was https://git.mozilla.org/b2g-->
<remote fetch="https://git.mozilla.org/b2g" name="b2gmozilla"/>
<!--original fetch url was git://github.com/apitrace/-->
<remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
<!--original fetch url was git://github.com/mozilla-b2g/-->
<remote fetch="https://git.mozilla.org/b2g" name="b2g"/>
<!--original fetch url was https://git.mozilla.org/b2g-->
<remote fetch="https://git.mozilla.org/b2g" name="b2gmozilla"/>
<!--original fetch url was git://codeaurora.org/-->
<remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
<!--original fetch url was git://github.com/mozilla/-->
<remote fetch="https://git.mozilla.org/b2g" name="mozilla"/>
<!--original fetch url was https://git.mozilla.org/releases-->
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
<!--original fetch url was git://github.com/apitrace/-->
<remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
<default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
<!-- Gonk specific things and forks -->
<!-- Gecko and Gaia -->
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="37250b125e0db6966875d3b37b117f6d9b76cbc0"/>
<!-- Gonk-specific things and forks -->
<project name="platform_bionic" path="bionic" remote="b2g" revision="e2b3733ba3fa5e3f404e983d2e4142b1f6b1b846"/>
<project name="platform_build" path="build" remote="b2g" revision="1b0db93fb6b870b03467aff50d6419771ba0d88c">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ea673b5c4cc19c3daca072691a659c68e4c6937f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9a58f2e395da17c252f61f28900b5b09aeb813bd"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cb4604d5a578efd027277059ce3e0f6e3af59bd1"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c72c9278ddc2f442d193474993d36e7f2cfb08c4"/>
<project name="android-development" path="development" remote="b2g" revision="2bdf22305b523af644e1891b4ddfd9229336d0ce"/>
<project name="platform_external_apriori" path="external/apriori" remote="b2g" revision="11816ad0406744f963537b23d68ed9c2afb412bd"/>
<project name="platform_external_elfcopy" path="external/elfcopy" remote="b2g" revision="62c1bed1c4505369cac2e72fbe30452a598fb690"/>
<project name="platform_external_elfutils" path="external/elfutils" remote="b2g" revision="72940dec691fa3255e13df01f8c53b620e446066"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="ac7e9ae8a24ab4a3f3da801ca53f95f39a32b89f"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
<project name="platform_external_opensans" path="external/opensans" remote="b2g" revision="b5b4c226ca1d71e936153cf679dda6d3d60e2354"/>
<project name="screencap-gonk" path="external/screencap-gonk" remote="b2g" revision="e6403c71e9eca8cb943739d5a0a192deac60fc51"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c72c9278ddc2f442d193474993d36e7f2cfb08c4"/>
<project name="platform_frameworks_base" path="frameworks/base" remote="b2g" revision="6afc63abe52776ae6a1d32a2d927e630a743a86a"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9a58f2e395da17c252f61f28900b5b09aeb813bd"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cb4604d5a578efd027277059ce3e0f6e3af59bd1"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="android-sdk" path="sdk" remote="b2g" revision="4f46930827957afbce500a4a920755a218bf3155"/>
<project name="darwinstreamingserver" path="system/darwinstreamingserver" remote="b2g" revision="cf85968c7f85e0ec36e72c87ceb4837a943b8af6"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
<project name="platform_bionic" path="bionic" remote="b2g" revision="e2b3733ba3fa5e3f404e983d2e4142b1f6b1b846"/>
<project name="platform/bootable/recovery" path="bootable/recovery" revision="425f8b5fadf5889834c5acd27d23c9e0b2129c28"/>
<project name="device/common" path="device/common" revision="42b808b7e93d0619286ae8e59110b176b7732389"/>
<project name="device/sample" path="device/sample" revision="237bd668d0f114d801a8d6455ef5e02cc3577587"/>
<project name="platform_external_apriori" path="external/apriori" remote="b2g" revision="11816ad0406744f963537b23d68ed9c2afb412bd"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
<project name="platform/external/bluetooth/bluez" path="external/bluetooth/bluez" revision="52a1a862a8bac319652b8f82d9541ba40bfa45ce"/>
<project name="platform/external/bluetooth/glib" path="external/bluetooth/glib" revision="0febbc94a1c40c0227958b7f27764145ec6297bc"/>
<project name="platform/external/bluetooth/hcidump" path="external/bluetooth/hcidump" revision="03c410e4f80e73d2650b2d6973a11984d096100e"/>
@ -42,8 +51,6 @@
<project name="platform/external/dbus" path="external/dbus" revision="07274c4eed41f20d79265f049710b5bf08a3ef20"/>
<project name="platform/external/dhcpcd" path="external/dhcpcd" revision="c543c0f363dee48a80ef17cff1d5b98fd426b01a"/>
<project name="platform/external/dnsmasq" path="external/dnsmasq" revision="4e6e5ea3872facb3ad2d84784c108865cc8d536d"/>
<project name="platform_external_elfcopy" path="external/elfcopy" remote="b2g" revision="62c1bed1c4505369cac2e72fbe30452a598fb690"/>
<project name="platform_external_elfutils" path="external/elfutils" remote="b2g" revision="72940dec691fa3255e13df01f8c53b620e446066"/>
<project name="platform/external/expat" path="external/expat" revision="728203a4d1c40de1a5fa5dcfa68057faaf3aac50"/>
<project name="platform/external/fdlibm" path="external/fdlibm" revision="6d128260b94c366d4066c8452e6a8d23533db244"/>
<project name="platform/external/flac" path="external/flac" revision="e3b0a1fcadcfd1cfd2ebe217ada8ae12ceb3e292"/>
@ -53,6 +60,7 @@
<project name="platform/external/harfbuzz" path="external/harfbuzz" revision="6b66309486b04d2107ab745a48d37c659da468fd"/>
<!-- icu4c is missing the default tag in caf, that's the *only* reason for the hardcode -->
<project name="platform/external/icu4c" path="external/icu4c" revision="0fa67b93b831c6636ca18b152a1b1b14cc99b034"/>
<project name="platform/external/iproute2" path="external/iproute2" revision="c66c5716d5335e450f7a7b71ccc6a604fb2f41d2"/>
<project name="platform/external/iptables" path="external/iptables" revision="32e954f4bcb000ce8f3d8be13bce435eef0cb725"/>
<project name="platform/external/jpeg" path="external/jpeg" revision="3d70825f75a11a0e625c7be4f5889571e7509456"/>
<project name="platform/external/libgsm" path="external/libgsm" revision="45b9af864cff193c98605d3fb8fb88d01e209e4a"/>
@ -62,11 +70,9 @@
<project name="platform/external/libpng" path="external/libpng" revision="b994ba2e3e54734c34f624926e5fbfbca5735cde"/>
<project name="platform/external/libvpx" path="external/libvpx" revision="7513a8f86d594184f9ac6250289d22817fe5d740"/>
<project name="platform/external/mksh" path="external/mksh" revision="2aa9dc166c783c3afbaa90dd8b5b334031c4ad4d"/>
<project name="platform_external_opensans" path="external/opensans" remote="b2g" revision="b5b4c226ca1d71e936153cf679dda6d3d60e2354"/>
<project name="platform/external/openssl" path="external/openssl" revision="95c40b11e6d98ad944d64c38e30693ac025e2c88"/>
<project name="platform/external/protobuf" path="external/protobuf" revision="046e97ace354aa350845465635e4816fb27c9994"/>
<project name="platform/external/safe-iop" path="external/safe-iop" revision="6282e9cd4c1eb3dc16bfb3592eff58fb6bd13022"/>
<project name="screencap-gonk" path="external/screencap-gonk" remote="b2g" revision="e6403c71e9eca8cb943739d5a0a192deac60fc51"/>
<project name="platform/external/skia" path="external/skia" revision="8c1c7cfacd82a174c65fcbf839d7037e3692aee8"/>
<project name="platform/external/sonivox" path="external/sonivox" revision="7839a53c7c252fc5f8b1ab685a00cfcf0c7d0c39"/>
<project name="platform/external/speex" path="external/speex" revision="863479d6859d3cae16e76db5f97ea3e35b7f2bd8"/>
@ -81,9 +87,8 @@
<project name="platform/external/webrtc" path="external/webrtc" revision="117f1940fa0f4529783bdefe5bf3ac255e707ace"/>
<project name="platform/external/wpa_supplicant" path="external/wpa_supplicant" revision="550e9f4ace79b684e246f6a17d3b8d30999afc4e"/>
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="7a182ff25e44f2bc66448a9b9738a97ab43aaaaf"/>
<project name="platform/external/zlib" path="external/zlib" revision="d381d56e7dd4572a47935b353c8893727f5f50cb"/>
<project name="platform/external/yaffs2" path="external/yaffs2" revision="ccb649c33105a3f537dd4e71111d7afe0dd5e95c"/>
<project name="platform_frameworks_base" path="frameworks/base" remote="b2g" revision="6afc63abe52776ae6a1d32a2d927e630a743a86a"/>
<project name="platform/external/zlib" path="external/zlib" revision="d381d56e7dd4572a47935b353c8893727f5f50cb"/>
<project name="platform/frameworks/opt/emoji" path="frameworks/opt/emoji" revision="7f2253709fc8ec200997a684b44ad946ba813f16"/>
<project name="platform/frameworks/support" path="frameworks/support" revision="b0d785331d7dc80ac06daa12434830ddcea7cc52"/>
<project name="platform/hardware/libhardware" path="hardware/libhardware" revision="8d951a39a693d00e90e3d8c4d64fe619d0a1e72f"/>
@ -91,21 +96,17 @@
<project name="platform/libcore" path="libcore" revision="027162a7afeec9f68a8e0b25bbf3c574ee4ed66d"/>
<project name="platform/ndk" path="ndk" revision="ffbb37a4985ca4aa9ae11f5593e79efcabce5515"/>
<project name="platform/prebuilt" path="prebuilt" revision="a4062cc40fcaa0776dc880ce591b4c515d36f420"/>
<project name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="d2685281e2e54ca14d1df304867aa82c37b27162"/>
<project name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="627f9b20fc518937b93747a7ff1ed4f5ed46e06f"/>
<project name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" revision="d9735fc81434f2af2c44d86ca57740c673c8d9bc"/>
<project name="platform/prebuilts/tools" path="prebuilts/tools" revision="acba00cdb4596c6dcb61ed06f14cf4ec89623539"/>
<project name="platform/system/bluetooth" path="system/bluetooth" revision="507e46e553586bec971551322f20d066c80a0788"/>
<project name="platform/system/core" path="system/core" revision="91e5551f88aea5aa64e1b4f8b4b52d7be2b28b64"/>
<project name="platform/system/extras" path="system/extras" revision="0205c49fedf29620165c6b4e6db3d13739c93396"/>
<project name="platform/system/media" path="system/media" revision="7f17e3995d1588cfcc309b56525652794b6513ef"/>
<project name="platform/system/netd" path="system/netd" revision="3d298fde142bee3fc4f07f63f16f2d8ce42339c0"/>
<project name="platform/system/vold" path="system/vold" revision="919829940468066a32f403980b43f6ebfee5d314"/>
<!-- Emulator specific things -->
<project name="android-development" path="development" remote="b2g" revision="2bdf22305b523af644e1891b4ddfd9229336d0ce"/>
<!-- Emulator-specific things -->
<project name="device_generic_goldfish" path="device/generic/goldfish" remote="b2g" revision="fc5f390fa314385e2a84629ea88284a60b40f7c4"/>
<project name="platform/external/iproute2" path="external/iproute2" revision="c66c5716d5335e450f7a7b71ccc6a604fb2f41d2"/>
<project name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="d2685281e2e54ca14d1df304867aa82c37b27162"/>
<project name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="627f9b20fc518937b93747a7ff1ed4f5ed46e06f"/>
<project name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" revision="d9735fc81434f2af2c44d86ca57740c673c8d9bc"/>
<project name="platform/prebuilts/tools" path="prebuilts/tools" revision="acba00cdb4596c6dcb61ed06f14cf4ec89623539"/>
<project name="platform_prebuilts_qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="02c32feb2fe97037be0ac4dace3a6a5025ac895d"/>
<project name="android-sdk" path="sdk" remote="b2g" revision="4f46930827957afbce500a4a920755a218bf3155"/>
<project name="darwinstreamingserver" path="system/darwinstreamingserver" remote="b2g" revision="cf85968c7f85e0ec36e72c87ceb4837a943b8af6"/>
</manifest>

View File

@ -17,10 +17,10 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="ea673b5c4cc19c3daca072691a659c68e4c6937f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="37250b125e0db6966875d3b37b117f6d9b76cbc0"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9a58f2e395da17c252f61f28900b5b09aeb813bd"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="ac7e9ae8a24ab4a3f3da801ca53f95f39a32b89f"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0e781b61e61b065ca9f3b05ed01b0ef1d9855010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ce651a7711042301cbc9c6866be0eeb9e1ceab66"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="ea673b5c4cc19c3daca072691a659c68e4c6937f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="37250b125e0db6966875d3b37b117f6d9b76cbc0"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9a58f2e395da17c252f61f28900b5b09aeb813bd"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
@ -23,7 +23,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0e781b61e61b065ca9f3b05ed01b0ef1d9855010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ce651a7711042301cbc9c6866be0eeb9e1ceab66"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<!-- Stock Android things -->
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="f92a936f2aa97526d4593386754bdbf02db07a12"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="c9d4fe680662ee44a4bdea42ae00366f5df399cf">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="ea673b5c4cc19c3daca072691a659c68e4c6937f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="37250b125e0db6966875d3b37b117f6d9b76cbc0"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9a58f2e395da17c252f61f28900b5b09aeb813bd"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
@ -23,7 +23,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0e781b61e61b065ca9f3b05ed01b0ef1d9855010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ce651a7711042301cbc9c6866be0eeb9e1ceab66"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<!-- Stock Android things -->
<project groups="pdk,linux" name="platform/prebuilts/clang/linux-x86/host/3.5" path="prebuilts/clang/linux-x86/host/3.5" revision="ffc05a232799fe8fcb3e47b7440b52b1fb4244c0"/>

View File

@ -1,39 +1,48 @@
<?xml version="1.0" ?><manifest>
<!--original fetch url was https://android.googlesource.com/-->
<remote fetch="https://git.mozilla.org/external/aosp" name="aosp"/>
<!--original fetch url was git://codeaurora.org/-->
<remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
<!--original fetch url was https://git.mozilla.org/b2g-->
<remote fetch="https://git.mozilla.org/b2g" name="b2gmozilla"/>
<!--original fetch url was git://github.com/apitrace/-->
<remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
<!--original fetch url was git://github.com/mozilla-b2g/-->
<remote fetch="https://git.mozilla.org/b2g" name="b2g"/>
<!--original fetch url was https://git.mozilla.org/b2g-->
<remote fetch="https://git.mozilla.org/b2g" name="b2gmozilla"/>
<!--original fetch url was git://codeaurora.org/-->
<remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
<!--original fetch url was git://github.com/mozilla/-->
<remote fetch="https://git.mozilla.org/b2g" name="mozilla"/>
<!--original fetch url was https://git.mozilla.org/releases-->
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
<!--original fetch url was git://github.com/apitrace/-->
<remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
<default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
<!-- Gonk specific things and forks -->
<!-- Gecko and Gaia -->
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="37250b125e0db6966875d3b37b117f6d9b76cbc0"/>
<!-- Gonk-specific things and forks -->
<project name="platform_bionic" path="bionic" remote="b2g" revision="e2b3733ba3fa5e3f404e983d2e4142b1f6b1b846"/>
<project name="platform_build" path="build" remote="b2g" revision="1b0db93fb6b870b03467aff50d6419771ba0d88c">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ea673b5c4cc19c3daca072691a659c68e4c6937f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9a58f2e395da17c252f61f28900b5b09aeb813bd"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cb4604d5a578efd027277059ce3e0f6e3af59bd1"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c72c9278ddc2f442d193474993d36e7f2cfb08c4"/>
<project name="android-development" path="development" remote="b2g" revision="2bdf22305b523af644e1891b4ddfd9229336d0ce"/>
<project name="platform_external_apriori" path="external/apriori" remote="b2g" revision="11816ad0406744f963537b23d68ed9c2afb412bd"/>
<project name="platform_external_elfcopy" path="external/elfcopy" remote="b2g" revision="62c1bed1c4505369cac2e72fbe30452a598fb690"/>
<project name="platform_external_elfutils" path="external/elfutils" remote="b2g" revision="72940dec691fa3255e13df01f8c53b620e446066"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="ac7e9ae8a24ab4a3f3da801ca53f95f39a32b89f"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
<project name="platform_external_opensans" path="external/opensans" remote="b2g" revision="b5b4c226ca1d71e936153cf679dda6d3d60e2354"/>
<project name="screencap-gonk" path="external/screencap-gonk" remote="b2g" revision="e6403c71e9eca8cb943739d5a0a192deac60fc51"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c72c9278ddc2f442d193474993d36e7f2cfb08c4"/>
<project name="platform_frameworks_base" path="frameworks/base" remote="b2g" revision="6afc63abe52776ae6a1d32a2d927e630a743a86a"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9a58f2e395da17c252f61f28900b5b09aeb813bd"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cb4604d5a578efd027277059ce3e0f6e3af59bd1"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="android-sdk" path="sdk" remote="b2g" revision="4f46930827957afbce500a4a920755a218bf3155"/>
<project name="darwinstreamingserver" path="system/darwinstreamingserver" remote="b2g" revision="cf85968c7f85e0ec36e72c87ceb4837a943b8af6"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
<project name="platform_bionic" path="bionic" remote="b2g" revision="e2b3733ba3fa5e3f404e983d2e4142b1f6b1b846"/>
<project name="platform/bootable/recovery" path="bootable/recovery" revision="425f8b5fadf5889834c5acd27d23c9e0b2129c28"/>
<project name="device/common" path="device/common" revision="42b808b7e93d0619286ae8e59110b176b7732389"/>
<project name="device/sample" path="device/sample" revision="237bd668d0f114d801a8d6455ef5e02cc3577587"/>
<project name="platform_external_apriori" path="external/apriori" remote="b2g" revision="11816ad0406744f963537b23d68ed9c2afb412bd"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
<project name="platform/external/bluetooth/bluez" path="external/bluetooth/bluez" revision="52a1a862a8bac319652b8f82d9541ba40bfa45ce"/>
<project name="platform/external/bluetooth/glib" path="external/bluetooth/glib" revision="0febbc94a1c40c0227958b7f27764145ec6297bc"/>
<project name="platform/external/bluetooth/hcidump" path="external/bluetooth/hcidump" revision="03c410e4f80e73d2650b2d6973a11984d096100e"/>
@ -42,8 +51,6 @@
<project name="platform/external/dbus" path="external/dbus" revision="07274c4eed41f20d79265f049710b5bf08a3ef20"/>
<project name="platform/external/dhcpcd" path="external/dhcpcd" revision="c543c0f363dee48a80ef17cff1d5b98fd426b01a"/>
<project name="platform/external/dnsmasq" path="external/dnsmasq" revision="4e6e5ea3872facb3ad2d84784c108865cc8d536d"/>
<project name="platform_external_elfcopy" path="external/elfcopy" remote="b2g" revision="62c1bed1c4505369cac2e72fbe30452a598fb690"/>
<project name="platform_external_elfutils" path="external/elfutils" remote="b2g" revision="72940dec691fa3255e13df01f8c53b620e446066"/>
<project name="platform/external/expat" path="external/expat" revision="728203a4d1c40de1a5fa5dcfa68057faaf3aac50"/>
<project name="platform/external/fdlibm" path="external/fdlibm" revision="6d128260b94c366d4066c8452e6a8d23533db244"/>
<project name="platform/external/flac" path="external/flac" revision="e3b0a1fcadcfd1cfd2ebe217ada8ae12ceb3e292"/>
@ -53,6 +60,7 @@
<project name="platform/external/harfbuzz" path="external/harfbuzz" revision="6b66309486b04d2107ab745a48d37c659da468fd"/>
<!-- icu4c is missing the default tag in caf, that's the *only* reason for the hardcode -->
<project name="platform/external/icu4c" path="external/icu4c" revision="0fa67b93b831c6636ca18b152a1b1b14cc99b034"/>
<project name="platform/external/iproute2" path="external/iproute2" revision="c66c5716d5335e450f7a7b71ccc6a604fb2f41d2"/>
<project name="platform/external/iptables" path="external/iptables" revision="32e954f4bcb000ce8f3d8be13bce435eef0cb725"/>
<project name="platform/external/jpeg" path="external/jpeg" revision="3d70825f75a11a0e625c7be4f5889571e7509456"/>
<project name="platform/external/libgsm" path="external/libgsm" revision="45b9af864cff193c98605d3fb8fb88d01e209e4a"/>
@ -62,11 +70,9 @@
<project name="platform/external/libpng" path="external/libpng" revision="b994ba2e3e54734c34f624926e5fbfbca5735cde"/>
<project name="platform/external/libvpx" path="external/libvpx" revision="7513a8f86d594184f9ac6250289d22817fe5d740"/>
<project name="platform/external/mksh" path="external/mksh" revision="2aa9dc166c783c3afbaa90dd8b5b334031c4ad4d"/>
<project name="platform_external_opensans" path="external/opensans" remote="b2g" revision="b5b4c226ca1d71e936153cf679dda6d3d60e2354"/>
<project name="platform/external/openssl" path="external/openssl" revision="95c40b11e6d98ad944d64c38e30693ac025e2c88"/>
<project name="platform/external/protobuf" path="external/protobuf" revision="046e97ace354aa350845465635e4816fb27c9994"/>
<project name="platform/external/safe-iop" path="external/safe-iop" revision="6282e9cd4c1eb3dc16bfb3592eff58fb6bd13022"/>
<project name="screencap-gonk" path="external/screencap-gonk" remote="b2g" revision="e6403c71e9eca8cb943739d5a0a192deac60fc51"/>
<project name="platform/external/skia" path="external/skia" revision="8c1c7cfacd82a174c65fcbf839d7037e3692aee8"/>
<project name="platform/external/sonivox" path="external/sonivox" revision="7839a53c7c252fc5f8b1ab685a00cfcf0c7d0c39"/>
<project name="platform/external/speex" path="external/speex" revision="863479d6859d3cae16e76db5f97ea3e35b7f2bd8"/>
@ -81,9 +87,8 @@
<project name="platform/external/webrtc" path="external/webrtc" revision="117f1940fa0f4529783bdefe5bf3ac255e707ace"/>
<project name="platform/external/wpa_supplicant" path="external/wpa_supplicant" revision="550e9f4ace79b684e246f6a17d3b8d30999afc4e"/>
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="7a182ff25e44f2bc66448a9b9738a97ab43aaaaf"/>
<project name="platform/external/zlib" path="external/zlib" revision="d381d56e7dd4572a47935b353c8893727f5f50cb"/>
<project name="platform/external/yaffs2" path="external/yaffs2" revision="ccb649c33105a3f537dd4e71111d7afe0dd5e95c"/>
<project name="platform_frameworks_base" path="frameworks/base" remote="b2g" revision="6afc63abe52776ae6a1d32a2d927e630a743a86a"/>
<project name="platform/external/zlib" path="external/zlib" revision="d381d56e7dd4572a47935b353c8893727f5f50cb"/>
<project name="platform/frameworks/opt/emoji" path="frameworks/opt/emoji" revision="7f2253709fc8ec200997a684b44ad946ba813f16"/>
<project name="platform/frameworks/support" path="frameworks/support" revision="b0d785331d7dc80ac06daa12434830ddcea7cc52"/>
<project name="platform/hardware/libhardware" path="hardware/libhardware" revision="8d951a39a693d00e90e3d8c4d64fe619d0a1e72f"/>
@ -91,21 +96,17 @@
<project name="platform/libcore" path="libcore" revision="027162a7afeec9f68a8e0b25bbf3c574ee4ed66d"/>
<project name="platform/ndk" path="ndk" revision="ffbb37a4985ca4aa9ae11f5593e79efcabce5515"/>
<project name="platform/prebuilt" path="prebuilt" revision="a4062cc40fcaa0776dc880ce591b4c515d36f420"/>
<project name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="d2685281e2e54ca14d1df304867aa82c37b27162"/>
<project name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="627f9b20fc518937b93747a7ff1ed4f5ed46e06f"/>
<project name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" revision="d9735fc81434f2af2c44d86ca57740c673c8d9bc"/>
<project name="platform/prebuilts/tools" path="prebuilts/tools" revision="acba00cdb4596c6dcb61ed06f14cf4ec89623539"/>
<project name="platform/system/bluetooth" path="system/bluetooth" revision="507e46e553586bec971551322f20d066c80a0788"/>
<project name="platform/system/core" path="system/core" revision="91e5551f88aea5aa64e1b4f8b4b52d7be2b28b64"/>
<project name="platform/system/extras" path="system/extras" revision="0205c49fedf29620165c6b4e6db3d13739c93396"/>
<project name="platform/system/media" path="system/media" revision="7f17e3995d1588cfcc309b56525652794b6513ef"/>
<project name="platform/system/netd" path="system/netd" revision="3d298fde142bee3fc4f07f63f16f2d8ce42339c0"/>
<project name="platform/system/vold" path="system/vold" revision="919829940468066a32f403980b43f6ebfee5d314"/>
<!-- Emulator specific things -->
<project name="android-development" path="development" remote="b2g" revision="2bdf22305b523af644e1891b4ddfd9229336d0ce"/>
<!-- Emulator-specific things -->
<project name="device_generic_goldfish" path="device/generic/goldfish" remote="b2g" revision="fc5f390fa314385e2a84629ea88284a60b40f7c4"/>
<project name="platform/external/iproute2" path="external/iproute2" revision="c66c5716d5335e450f7a7b71ccc6a604fb2f41d2"/>
<project name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="d2685281e2e54ca14d1df304867aa82c37b27162"/>
<project name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="627f9b20fc518937b93747a7ff1ed4f5ed46e06f"/>
<project name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" revision="d9735fc81434f2af2c44d86ca57740c673c8d9bc"/>
<project name="platform/prebuilts/tools" path="prebuilts/tools" revision="acba00cdb4596c6dcb61ed06f14cf4ec89623539"/>
<project name="platform_prebuilts_qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="02c32feb2fe97037be0ac4dace3a6a5025ac895d"/>
<project name="android-sdk" path="sdk" remote="b2g" revision="4f46930827957afbce500a4a920755a218bf3155"/>
<project name="darwinstreamingserver" path="system/darwinstreamingserver" remote="b2g" revision="cf85968c7f85e0ec36e72c87ceb4837a943b8af6"/>
</manifest>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="ea673b5c4cc19c3daca072691a659c68e4c6937f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="37250b125e0db6966875d3b37b117f6d9b76cbc0"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9a58f2e395da17c252f61f28900b5b09aeb813bd"/>
@ -24,7 +24,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0e781b61e61b065ca9f3b05ed01b0ef1d9855010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ce651a7711042301cbc9c6866be0eeb9e1ceab66"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<!-- Stock Android things -->
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>

View File

@ -1,9 +1,9 @@
{
"git": {
"git_revision": "ea673b5c4cc19c3daca072691a659c68e4c6937f",
"git_revision": "37250b125e0db6966875d3b37b117f6d9b76cbc0",
"remote": "https://git.mozilla.org/releases/gaia.git",
"branch": ""
},
"revision": "f5fc1ed93387c0ff18811fb306e061b8ca77bd40",
"revision": "e094d698a05cd04c90815dd11579326f43f02a6b",
"repo_path": "integration/gaia-central"
}

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="ea673b5c4cc19c3daca072691a659c68e4c6937f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="37250b125e0db6966875d3b37b117f6d9b76cbc0"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9a58f2e395da17c252f61f28900b5b09aeb813bd"/>
@ -24,7 +24,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0e781b61e61b065ca9f3b05ed01b0ef1d9855010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ce651a7711042301cbc9c6866be0eeb9e1ceab66"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<!-- Stock Android things -->
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="f92a936f2aa97526d4593386754bdbf02db07a12"/>

View File

@ -18,10 +18,10 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="ea673b5c4cc19c3daca072691a659c68e4c6937f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="37250b125e0db6966875d3b37b117f6d9b76cbc0"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9a58f2e395da17c252f61f28900b5b09aeb813bd"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="ac7e9ae8a24ab4a3f3da801ca53f95f39a32b89f"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0e781b61e61b065ca9f3b05ed01b0ef1d9855010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ce651a7711042301cbc9c6866be0eeb9e1ceab66"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="c9d4fe680662ee44a4bdea42ae00366f5df399cf">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="ea673b5c4cc19c3daca072691a659c68e4c6937f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="37250b125e0db6966875d3b37b117f6d9b76cbc0"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9a58f2e395da17c252f61f28900b5b09aeb813bd"/>
@ -24,7 +24,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
<project name="vex" path="external/VEX" remote="b2g" revision="48d8c7c950745f1b166b42125e6f0d3293d71636"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0e781b61e61b065ca9f3b05ed01b0ef1d9855010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ce651a7711042301cbc9c6866be0eeb9e1ceab66"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<!-- Stock Android things -->
<project groups="pdk,linux" name="platform/prebuilts/clang/linux-x86/host/3.5" path="prebuilts/clang/linux-x86/host/3.5" revision="ffc05a232799fe8fcb3e47b7440b52b1fb4244c0"/>

73
b2g/installer/flash.bat Executable file
View File

@ -0,0 +1,73 @@
@ECHO OFF
REM read config file
setlocal ENABLEDELAYEDEXPANSION
set loop=0
for /F "tokens=*" %%A in (.config) do (
SET /A loop=!loop! + 1
set %%A
)
set DEVICE_FOUND=0
REM nexus has device instead of product name
IF [%PRODUCT_NAME%]==[] (
set PRODUCT_NAME=%DEVICE%
)
REM if nexus 4 assume you are in fastboot mode, can't seem to find drivers
IF [%DEVICE%]==[mako] (
call :flash
)
REM push device from adb to fastboot mode
win_adb kill-server
win_adb devices
win_adb get-state > devicestate.txt
set /p DEVICE_STATE= < devicestate.txt
IF NOT "%DEVICE_STATE%"=="device" (
ECHO Please check :
ECHO 1. to make sure that only one device is connected to the computer
ECHO 2. the device is turned on with the screen showing
ECHO 3. the device is set to debugging via USB : ADB Only or ADB and Devtools
ECHO 4. the device drivers are installed on the computer.
Del devicestate.txt
PAUSE
EXIT /b
)
Del devicestate.txt
win_adb reboot bootloader
TIMEOUT 5
:flash
win_fastboot devices 2> fastboot_state.txt
set /p FASTBOOT_STATE= < fastboot_state.txt
IF NOT [%FASTBOOT_STATE%]==[] (
ECHO Please check :
ECHO 1. to make sure that only one device is connected to the computer
ECHO 2. the device is turned on with an indication that the device is in fastboot mode
ECHO 3. the fastboot drivers are installed on the computer.
Del fastboot_state.txt
PAUSE
EXIT /b
)
Del fastboot_state.txt
ECHO "Flashing build. If nothing mentions that it flashed anything and it looks stuck, make sure you have the drivers installed."
win_fastboot flash boot out/target/product/%PRODUCT_NAME%/boot.img
win_fastboot flash system out/target/product/%PRODUCT_NAME%/system.img
win_fastboot flash persist out/target/product/%PRODUCT_NAME%/persist.img
win_fastboot flash recovery out/target/product/%PRODUCT_NAME%/recovery.img
win_fastboot flash cache out/target/product/%PRODUCT_NAME%/cache.img
win_fastboot flash userdata out/target/product/%PRODUCT_NAME%/userdata.img
ECHO "Done..."
win_fastboot reboot
echo "Just close the windows as you wish."
TIMEOUT 5

View File

@ -1,3 +0,0 @@
browser.jar:
% resource app %
defaults/permissions (permissions)

View File

@ -21,6 +21,7 @@ SOURCES += [
FINAL_TARGET_FILES += ['blocklist.xml']
FINAL_TARGET_FILES.defaults.profile += ['profile/prefs.js']
FINAL_TARGET_FILES.defaults += ['permissions']
DEFINES['APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
@ -70,7 +71,5 @@ if CONFIG['MOZ_LINKER']:
if CONFIG['HAVE_CLOCK_MONOTONIC']:
OS_LIBS += CONFIG['REALTIME_LIBS']
JAR_MANIFESTS += ['jar.mn']
if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wshadow']

View File

@ -22,8 +22,9 @@
<script type="application/javascript"><![CDATA[
// Error url MUST be formatted like this:
// about:blocked?e=error_code&u=url
// about:blocked?e=error_code&u=url(&o=1)?
// (o=1 when user overrides are allowed)
// Note that this file uses document.documentURI to get
// the URL (with the format from above). This is because
// document.location.href gets the current URI off the docshell,
@ -55,7 +56,18 @@
url = url.slice(12);
return url;
}
/**
* Check whether this warning page should be overridable or whether
* the "ignore warning" button should be hidden.
*/
function getOverride()
{
var url = document.documentURI;
var match = url.match(/&o=1&/);
return !!match;
}
/**
* Attempt to get the hostname via document.location. Fail back
* to getURL so that we always return something meaningful.
@ -135,6 +147,13 @@
document.title = document.getElementById("errorTitleText_" + error)
.innerHTML;
if (!getOverride()) {
var btn = document.getElementById("ignoreWarningButton");
if (btn) {
btn.parentNode.removeChild(btn);
}
}
// Inform the test harness that we're done loading the page
var event = new CustomEvent("AboutBlockedLoaded");
document.dispatchEvent(event);

View File

@ -2983,10 +2983,12 @@ var BrowserOnClick = {
break;
case "ignoreWarningButton":
if (sendTelemetry) {
secHistogram.add(nsISecTel[bucketName + "IGNORE_WARNING"]);
if (gPrefService.getBoolPref("browser.safebrowsing.allowOverride")) {
if (sendTelemetry) {
secHistogram.add(nsISecTel[bucketName + "IGNORE_WARNING"]);
}
this.ignoreWarningButton(reason);
}
this.ignoreWarningButton(reason);
break;
}
},

View File

@ -192,7 +192,7 @@ function* test_swapped_browser(oldTab, newBrowser, isPlaying) {
});
let AudioPlaybackPromise = new Promise(resolve => {
let observer = (subject, topic, data) => {
ok(false, "Should not see an audio-playback notification");
ok(true, "Should see an audio-playback notification");
};
Services.obs.addObserver(observer, "audio-playback", false);
setTimeout(() => {
@ -207,7 +207,7 @@ function* test_swapped_browser(oldTab, newBrowser, isPlaying) {
ok(newTab.hasAttribute("muted"), "Expected the correct muted attribute on the new tab");
is(newTab.hasAttribute("soundplaying"), isPlaying, "Expected the correct soundplaying attribute on the new tab");
// Wait to see if an audio-playback event is dispatched. This should not happen!
// Wait to see if an audio-playback event is dispatched.
yield AudioPlaybackPromise;
ok(newTab.hasAttribute("muted"), "Expected the correct muted attribute on the new tab");

View File

@ -14,11 +14,16 @@ add_task(function*() {
yield promiseTabLoadEvent(tab, "data:text/html," + escape(testPage));
yield SimpleTest.promiseFocus(browser.contentWindowAsCPOW);
const modifier = (content.navigator.platform.indexOf("Mac") >= 0) ?
const modifier = (navigator.platform.indexOf("Mac") >= 0) ?
Components.interfaces.nsIDOMWindowUtils.MODIFIER_META :
Components.interfaces.nsIDOMWindowUtils.MODIFIER_CONTROL;
let results = yield ContentTask.spawn(browser, { modifier: modifier },
// On windows, HTML clipboard includes extra data.
// The values are from widget/windows/nsDataObj.cpp.
const htmlPrefix = (navigator.platform.indexOf("Win") >= 0) ? "<html><body>\n<!--StartFragment-->" : "";
const htmlPostfix = (navigator.platform.indexOf("Win") >= 0) ? "<!--EndFragment-->\n</body>\n</html>" : "";
let results = yield ContentTask.spawn(browser, { modifier: modifier, htmlPrefix: htmlPrefix, htmlPostfix: htmlPostfix },
function* (arg) {
var doc = content.document;
var main = doc.getElementById("main");
@ -71,7 +76,7 @@ add_task(function*() {
is(clipboardData.types.length, 2, "Two types on clipboard");
is(clipboardData.types[0], "text/html", "text/html on clipboard");
is(clipboardData.types[1], "text/plain", "text/plain on clipboard");
is(clipboardData.getData("text/html"), "t <b>Bold</b>", "text/html value");
is(clipboardData.getData("text/html"), arg.htmlPrefix + "t <b>Bold</b>" + arg.htmlPostfix, "text/html value");
is(clipboardData.getData("text/plain"), "t Bold", "text/plain value");
resolve();
}, true)
@ -106,7 +111,7 @@ add_task(function*() {
is(clipboardData.types.length, 2, "Two types on clipboard 2");
is(clipboardData.types[0], "text/html", "text/html on clipboard 2");
is(clipboardData.types[1], "text/plain", "text/plain on clipboard 2");
is(clipboardData.getData("text/html"), "<i>Italic</i> ", "text/html value 2");
is(clipboardData.getData("text/html"), arg.htmlPrefix + "<i>Italic</i> " + arg.htmlPostfix, "text/html value 2");
is(clipboardData.getData("text/plain"), "Some text", "text/plain value 2");
resolve();
}, true)
@ -140,7 +145,7 @@ add_task(function*() {
// Focus the content again
yield SimpleTest.promiseFocus(browser.contentWindowAsCPOW);
let expectedContent = yield ContentTask.spawn(browser, { modifier: modifier },
let expectedContent = yield ContentTask.spawn(browser, { modifier: modifier, htmlPrefix: htmlPrefix, htmlPostfix: htmlPostfix },
function* (arg) {
var doc = content.document;
var main = doc.getElementById("main");
@ -153,9 +158,10 @@ add_task(function*() {
// DataTransfer doesn't support the image types yet, so only text/html
// will be present.
if (clipboardData.getData("text/html") !=
'<img id="img" tabindex="1" src="http://example.org/browser/browser/base/content/test/general/moz.png">') {
reject();
if (clipboardData.getData("text/html") !== arg.htmlPrefix +
'<img id="img" tabindex="1" src="http://example.org/browser/browser/base/content/test/general/moz.png">' +
arg.htmlPostfix) {
reject('Clipboard Data did not contain an image, was ' + clipboardData.getData("text/html"));
}
resolve();
}, true)

View File

@ -1,12 +1,17 @@
/* globals ok, equal, RemoteNewTabLocation, NewTabPrefsProvider, Services, Preferences */
/* globals ok, equal, RemoteNewTabLocation, NewTabPrefsProvider, Services, Preferences, XPCOMUtils, UpdateUtils */
/* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */
"use strict";
Components.utils.import("resource:///modules/RemoteNewTabLocation.jsm");
Components.utils.import("resource:///modules/NewTabPrefsProvider.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/Preferences.jsm");
Components.utils.importGlobalProperties(["URL"]);
const {utils: Cu} = Components;
Cu.import("resource:///modules/RemoteNewTabLocation.jsm");
Cu.import("resource:///modules/NewTabPrefsProvider.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/Preferences.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.importGlobalProperties(["URL"]);
XPCOMUtils.defineLazyModuleGetter(this, "UpdateUtils",
"resource://gre/modules/UpdateUtils.jsm");
RemoteNewTabLocation.init();
const DEFAULT_HREF = RemoteNewTabLocation.href;
@ -52,9 +57,11 @@ add_task(function* test_overrides() {
add_task(function* test_updates() {
RemoteNewTabLocation.init();
let notificationPromise;
let release = RemoteNewTabLocation._releaseFromUpdateChannel(
UpdateUtils.UpdateChannel);
let expectedHref = "https://newtab.cdn.mozilla.net" +
`/v${RemoteNewTabLocation.version}` +
"/nightly" +
`/${release}` +
"/en-GB" +
"/index.html";
Preferences.set("intl.locale.matchOS", true);

View File

@ -33,7 +33,9 @@ function testMalware(event) {
var style = content.getComputedStyle(el, null);
is(style.display, "inline-block", "Ignore Warning button should be display:inline-block for malware");
Services.prefs.setBoolPref("browser.safebrowsing.allowOverride", false);
// Now launch the unwanted software test
window.addEventListener("DOMContentLoaded", testUnwanted, true);
content.location = "http://www.itisatrap.org/firefox/unwanted.html";
@ -48,10 +50,9 @@ function testUnwanted(event) {
// Confirm that "Ignore this warning" is visible - bug 422410
var el = content.document.getElementById("ignoreWarningButton");
ok(el, "Ignore warning button should be present for unwanted software");
ok(!el, "Ignore warning button should be missing for unwanted software");
var style = content.getComputedStyle(el, null);
is(style.display, "inline-block", "Ignore Warning button should be display:inline-block for unwanted software");
Services.prefs.setBoolPref("browser.safebrowsing.allowOverride", true);
// Now launch the phishing test
window.addEventListener("DOMContentLoaded", testPhishing, true);

View File

@ -706,6 +706,7 @@
@RESPATH@/greprefs.js
@RESPATH@/defaults/autoconfig/prefcalls.js
@RESPATH@/browser/defaults/profile/prefs.js
@RESPATH@/browser/defaults/permissions
; Warning: changing the path to channel-prefs.js can cause bugs (Bug 756325)
; Technically this is an app pref file, but we are keeping it in the original

View File

@ -61,7 +61,6 @@ SEARCH_PATHS = [
'python/requests',
'python/slugid',
'build',
'build/pymake',
'config',
'dom/bindings',
'dom/bindings/parser',

View File

@ -89,10 +89,6 @@ leak:MessageLoop::MessageLoop
leak:base::WaitableEvent::TimedWait
leak:MessageLoop::PostTask_Helper
# Bug 1189430 - DNS leaks in mochitest-chrome.
leak:nsDNSService::AsyncResolveExtended
leak:_GetAddrInfo_Portable
# Bug 1189568 - Indirect leaks of IMContextWrapper and nsIntRect.
leak:nsWindow::Create
leak:nsBaseWidget::StoreWindowClipRegion

View File

@ -51,7 +51,7 @@ _SUBDIR_CONFIG_ARGS="$ac_configure_args"
dnl Set the version number of the libs included with mozilla
dnl ========================================================
MOZJPEG=62
MOZPNG=10617
MOZPNG=10619
NSPR_VERSION=4
NSPR_MINVER=4.11
NSS_VERSION=3

View File

@ -5131,6 +5131,8 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
return NS_OK;
}
#define PREF_SAFEBROWSING_ALLOWOVERRIDE "browser.safebrowsing.allowOverride"
NS_IMETHODIMP
nsDocShell::LoadErrorPage(nsIURI* aURI, const char16_t* aURL,
const char* aErrorPage,
@ -5209,6 +5211,10 @@ nsDocShell::LoadErrorPage(nsIURI* aURI, const char16_t* aURL,
errorPageUrl.AppendASCII(escapedError.get());
errorPageUrl.AppendLiteral("&u=");
errorPageUrl.AppendASCII(escapedUrl.get());
if ((strcmp(aErrorPage, "blocked") == 0) &&
Preferences::GetBool(PREF_SAFEBROWSING_ALLOWOVERRIDE, true)) {
errorPageUrl.AppendLiteral("&o=1");
}
if (!escapedCSSClass.IsEmpty()) {
errorPageUrl.AppendLiteral("&s=");
errorPageUrl.AppendASCII(escapedCSSClass.get());

View File

@ -11,9 +11,11 @@
namespace mozilla {
AutoGlobalTimelineMarker::AutoGlobalTimelineMarker(const char* aName
AutoGlobalTimelineMarker::AutoGlobalTimelineMarker(const char* aName,
MarkerStackRequest aStackRequest /* = STACK */
MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)
: mName(aName)
, mStackRequest(aStackRequest)
{
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
MOZ_ASSERT(NS_IsMainThread());
@ -23,7 +25,7 @@ AutoGlobalTimelineMarker::AutoGlobalTimelineMarker(const char* aName
return;
}
timelines->AddMarkerForAllObservedDocShells(mName, MarkerTracingType::START);
timelines->AddMarkerForAllObservedDocShells(mName, MarkerTracingType::START, mStackRequest);
}
AutoGlobalTimelineMarker::~AutoGlobalTimelineMarker()
@ -35,7 +37,7 @@ AutoGlobalTimelineMarker::~AutoGlobalTimelineMarker()
return;
}
timelines->AddMarkerForAllObservedDocShells(mName, MarkerTracingType::END);
timelines->AddMarkerForAllObservedDocShells(mName, MarkerTracingType::END, mStackRequest);
}
} // namespace mozilla

View File

@ -8,6 +8,7 @@
#define mozilla_AutoGlobalTimelineMarker_h_
#include "mozilla/GuardObjects.h"
#include "TimelineMarkerEnums.h"
namespace mozilla {
@ -32,9 +33,12 @@ class MOZ_RAII AutoGlobalTimelineMarker
// The name of the marker we are adding.
const char* mName;
// Whether to capture the JS stack or not.
MarkerStackRequest mStackRequest;
public:
explicit AutoGlobalTimelineMarker(const char* aName
explicit AutoGlobalTimelineMarker(const char* aName,
MarkerStackRequest aStackRequest = MarkerStackRequest::STACK
MOZ_GUARD_OBJECT_NOTIFIER_PARAM);
~AutoGlobalTimelineMarker();

View File

@ -235,7 +235,8 @@ TimelineConsumers::AddMarkerForDocShell(nsIDocShell* aDocShell,
void
TimelineConsumers::AddMarkerForAllObservedDocShells(const char* aName,
MarkerTracingType aTracingType)
MarkerTracingType aTracingType,
MarkerStackRequest aStackRequest /* = STACK */)
{
bool isMainThread = NS_IsMainThread();
StaticMutexAutoLock lock(sMutex); // for `mMarkersStores`.
@ -244,7 +245,7 @@ TimelineConsumers::AddMarkerForAllObservedDocShells(const char* aName,
storage != nullptr;
storage = storage->getNext()) {
UniquePtr<AbstractTimelineMarker> marker =
MakeUnique<TimelineMarker>(aName, aTracingType);
MakeUnique<TimelineMarker>(aName, aTracingType, aStackRequest);
if (isMainThread) {
storage->AddMarker(Move(marker));
} else {
@ -256,7 +257,8 @@ TimelineConsumers::AddMarkerForAllObservedDocShells(const char* aName,
void
TimelineConsumers::AddMarkerForAllObservedDocShells(const char* aName,
const TimeStamp& aTime,
MarkerTracingType aTracingType)
MarkerTracingType aTracingType,
MarkerStackRequest aStackRequest /* = STACK */)
{
bool isMainThread = NS_IsMainThread();
StaticMutexAutoLock lock(sMutex); // for `mMarkersStores`.
@ -265,7 +267,7 @@ TimelineConsumers::AddMarkerForAllObservedDocShells(const char* aName,
storage != nullptr;
storage = storage->getNext()) {
UniquePtr<AbstractTimelineMarker> marker =
MakeUnique<TimelineMarker>(aName, aTime, aTracingType);
MakeUnique<TimelineMarker>(aName, aTime, aTracingType, aStackRequest);
if (isMainThread) {
storage->AddMarker(Move(marker));
} else {

View File

@ -92,10 +92,12 @@ public:
// which doesn't have to be relevant to a specific docshell.
// May be called from any thread.
void AddMarkerForAllObservedDocShells(const char* aName,
MarkerTracingType aTracingType);
MarkerTracingType aTracingType,
MarkerStackRequest aStackRequest = MarkerStackRequest::STACK);
void AddMarkerForAllObservedDocShells(const char* aName,
const TimeStamp& aTime,
MarkerTracingType aTracingType);
MarkerTracingType aTracingType,
MarkerStackRequest aStackRequest = MarkerStackRequest::STACK);
// This method clones and registers an already instantiated marker,
// which doesn't have to be relevant to a specific docshell.

View File

@ -5,6 +5,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/dom/KeyframeEffect.h"
#include "mozilla/dom/AnimationEffectReadOnlyBinding.h"
#include "mozilla/dom/KeyframeEffectBinding.h"
#include "mozilla/dom/PropertyIndexedKeyframesBinding.h"
@ -22,43 +23,21 @@
namespace mozilla {
bool
AnimationTiming::FillsForwards() const
{
return mFillMode == dom::FillMode::Both ||
mFillMode == dom::FillMode::Forwards;
}
bool
AnimationTiming::FillsBackwards() const
{
return mFillMode == dom::FillMode::Both ||
mFillMode == dom::FillMode::Backwards;
}
// Helper functions for generating a ComputedTimingProperties dictionary
static dom::FillMode
ConvertFillMode(uint8_t aFill)
{
switch (aFill) {
case NS_STYLE_ANIMATION_FILL_MODE_NONE:
return dom::FillMode::None;
case NS_STYLE_ANIMATION_FILL_MODE_FORWARDS:
return dom::FillMode::Forwards;
case NS_STYLE_ANIMATION_FILL_MODE_BACKWARDS:
return dom::FillMode::Backwards;
case NS_STYLE_ANIMATION_FILL_MODE_BOTH:
return dom::FillMode::Both;
default:
MOZ_ASSERT(false, "The mapping of FillMode is not correct");
return dom::FillMode::None;
}
}
static dom::PlaybackDirection
ConvertPlaybackDirection(uint8_t aDirection)
{
switch (aDirection) {
case NS_STYLE_ANIMATION_DIRECTION_NORMAL:
return dom::PlaybackDirection::Normal;
case NS_STYLE_ANIMATION_DIRECTION_REVERSE:
return dom::PlaybackDirection::Reverse;
case NS_STYLE_ANIMATION_DIRECTION_ALTERNATE:
return dom::PlaybackDirection::Alternate;
case NS_STYLE_ANIMATION_DIRECTION_ALTERNATE_REVERSE:
return dom::PlaybackDirection::Alternate_reverse;
default:
MOZ_ASSERT(false, "The mapping of PlaybackDirection is not correct");
return dom::PlaybackDirection::Normal;
}
}
static void
GetComputedTimingDictionary(const ComputedTiming& aComputedTiming,
const Nullable<TimeDuration>& aLocalTime,
@ -67,10 +46,10 @@ GetComputedTimingDictionary(const ComputedTiming& aComputedTiming,
{
// AnimationEffectTimingProperties
aRetVal.mDelay = aTiming.mDelay.ToMilliseconds();
aRetVal.mFill = ConvertFillMode(aTiming.mFillMode);
aRetVal.mFill = aTiming.mFillMode;
aRetVal.mIterations = aTiming.mIterationCount;
aRetVal.mDuration.SetAsUnrestrictedDouble() = aTiming.mIterationDuration.ToMilliseconds();
aRetVal.mDirection = ConvertPlaybackDirection(aTiming.mDirection);
aRetVal.mDirection = aTiming.mDirection;
// ComputedTimingProperties
aRetVal.mActiveDuration = aComputedTiming.mActiveDuration.ToMilliseconds();
@ -126,6 +105,18 @@ KeyframeEffectReadOnly::WrapObject(JSContext* aCx,
return KeyframeEffectReadOnlyBinding::Wrap(aCx, this, aGivenProto);
}
IterationCompositeOperation
KeyframeEffectReadOnly::IterationComposite() const
{
return IterationCompositeOperation::Replace;
}
CompositeOperation
KeyframeEffectReadOnly::Composite() const
{
return CompositeOperation::Replace;
}
void
KeyframeEffectReadOnly::SetTiming(const AnimationTiming& aTiming)
{
@ -271,18 +262,20 @@ KeyframeEffectReadOnly::GetComputedTimingAt(
bool thisIterationReverse = false;
switch (aTiming.mDirection) {
case NS_STYLE_ANIMATION_DIRECTION_NORMAL:
case PlaybackDirection::Normal:
thisIterationReverse = false;
break;
case NS_STYLE_ANIMATION_DIRECTION_REVERSE:
case PlaybackDirection::Reverse:
thisIterationReverse = true;
break;
case NS_STYLE_ANIMATION_DIRECTION_ALTERNATE:
case PlaybackDirection::Alternate:
thisIterationReverse = (result.mCurrentIteration & 1) == 1;
break;
case NS_STYLE_ANIMATION_DIRECTION_ALTERNATE_REVERSE:
case PlaybackDirection::Alternate_reverse:
thisIterationReverse = (result.mCurrentIteration & 1) == 0;
break;
default:
MOZ_ASSERT(true, "Unknown PlaybackDirection type");
}
if (thisIterationReverse) {
result.mProgress.SetValue(1.0 - result.mProgress.Value());
@ -554,25 +547,52 @@ DumpAnimationProperties(nsTArray<AnimationProperty>& aAnimationProperties)
}
#endif
// Extract an iteration duration from an UnrestrictedDoubleOrXXX object.
template <typename T>
static TimeDuration
GetIterationDuration(const T& aDuration) {
// Always return the same object to benefit from return-value optimization.
TimeDuration result;
if (aDuration.IsUnrestrictedDouble()) {
double durationMs = aDuration.GetAsUnrestrictedDouble();
if (!IsNaN(durationMs) && durationMs >= 0.0f) {
result = TimeDuration::FromMilliseconds(durationMs);
}
}
// else, aDuration should be zero
return result;
}
/* static */ AnimationTiming
KeyframeEffectReadOnly::ConvertKeyframeEffectOptions(
const Optional<double>& aOptions)
const UnrestrictedDoubleOrKeyframeEffectOptions& aOptions)
{
AnimationTiming animationTiming;
// The spec says to treat auto durations as 0 until a later version of
// the spec says otherwise. Bug 1215406 is for handling a
// KeyframeEffectOptions object and not just an offset.
if (aOptions.WasPassed()) {
animationTiming.mIterationDuration =
TimeDuration::FromMilliseconds(aOptions.Value());
} else {
animationTiming.mIterationDuration = TimeDuration(0);
}
animationTiming.mIterationCount = 1.0f;
animationTiming.mDirection = NS_STYLE_ANIMATION_DIRECTION_NORMAL;
animationTiming.mFillMode = NS_STYLE_ANIMATION_FILL_MODE_NONE;
if (aOptions.IsKeyframeEffectOptions()) {
const KeyframeEffectOptions& opt = aOptions.GetAsKeyframeEffectOptions();
animationTiming.mIterationDuration = GetIterationDuration(opt.mDuration);
animationTiming.mDelay = TimeDuration::FromMilliseconds(opt.mDelay);
// FIXME: Covert mIterationCount to a valid value.
// Bug 1214536 should revise this and keep the original value, so
// AnimationTimingEffectReadOnly can get the original iterations.
animationTiming.mIterationCount = (IsNaN(opt.mIterations) ||
opt.mIterations < 0.0f) ?
1.0f :
opt.mIterations;
animationTiming.mDirection = opt.mDirection;
// FIXME: We should store original value.
animationTiming.mFillMode = (opt.mFill == FillMode::Auto) ?
FillMode::None :
opt.mFill;
} else {
animationTiming.mIterationDuration = GetIterationDuration(aOptions);
animationTiming.mDelay = TimeDuration(0);
animationTiming.mIterationCount = 1.0f;
animationTiming.mDirection = PlaybackDirection::Normal;
animationTiming.mFillMode = FillMode::None;
}
return animationTiming;
}
@ -1600,7 +1620,7 @@ KeyframeEffectReadOnly::Constructor(
const GlobalObject& aGlobal,
Element* aTarget,
const Optional<JS::Handle<JSObject*>>& aFrames,
const Optional<double>& aOptions,
const UnrestrictedDoubleOrKeyframeEffectOptions& aOptions,
ErrorResult& aRv)
{
if (!aTarget) {

View File

@ -37,6 +37,9 @@ class AnimValuesStyleRule;
namespace dom {
struct ComputedTimingProperties;
class UnrestrictedDoubleOrKeyframeEffectOptions;
enum class IterationCompositeOperation : uint32_t;
enum class CompositeOperation : uint32_t;
}
/**
@ -51,17 +54,11 @@ struct AnimationTiming
TimeDuration mIterationDuration;
TimeDuration mDelay;
float mIterationCount; // mozilla::PositiveInfinity<float>() means infinite
uint8_t mDirection;
uint8_t mFillMode;
dom::PlaybackDirection mDirection;
dom::FillMode mFillMode;
bool FillsForwards() const {
return mFillMode == NS_STYLE_ANIMATION_FILL_MODE_BOTH ||
mFillMode == NS_STYLE_ANIMATION_FILL_MODE_FORWARDS;
}
bool FillsBackwards() const {
return mFillMode == NS_STYLE_ANIMATION_FILL_MODE_BOTH ||
mFillMode == NS_STYLE_ANIMATION_FILL_MODE_BACKWARDS;
}
bool FillsForwards() const;
bool FillsBackwards() const;
bool operator==(const AnimationTiming& aOther) const {
return mIterationDuration == aOther.mIterationDuration &&
mDelay == aOther.mDelay &&
@ -190,7 +187,7 @@ public:
Constructor(const GlobalObject& aGlobal,
Element* aTarget,
const Optional<JS::Handle<JSObject*>>& aFrames,
const Optional<double>& aOptions,
const UnrestrictedDoubleOrKeyframeEffectOptions& aOptions,
ErrorResult& aRv);
Element* GetTarget() const {
// Currently we never return animations from the API whose effect
@ -213,12 +210,14 @@ public:
aPseudoType = mPseudoType;
}
const AnimationTiming& Timing() const {
return mTiming;
}
AnimationTiming& Timing() {
return mTiming;
IterationCompositeOperation IterationComposite() const;
CompositeOperation Composite() const;
void GetSpacing(nsString& aRetVal) const {
aRetVal.AssignLiteral("distribute");
}
const AnimationTiming& Timing() const { return mTiming; }
AnimationTiming& Timing() { return mTiming; }
void SetTiming(const AnimationTiming& aTiming);
Nullable<TimeDuration> GetLocalTime() const;
@ -299,13 +298,14 @@ protected:
void ResetIsRunningOnCompositor();
static AnimationTiming ConvertKeyframeEffectOptions(
const Optional<double>& aOptions);
const UnrestrictedDoubleOrKeyframeEffectOptions& aOptions);
static void BuildAnimationPropertyList(
JSContext* aCx,
Element* aTarget,
const Optional<JS::Handle<JSObject*>>& aFrames,
InfallibleTArray<AnimationProperty>& aResult,
ErrorResult& aRv);
JSContext* aCx,
Element* aTarget,
const Optional<JS::Handle<JSObject*>>& aFrames,
InfallibleTArray<AnimationProperty>& aResult,
ErrorResult& aRv);
nsCOMPtr<Element> mTarget;
RefPtr<Animation> mAnimation;

View File

@ -309,7 +309,9 @@ private:
MOZ_ASSERT(aWindow->IsInnerWindow());
nsPIDOMWindow* outerWindow = aWindow->GetOuterWindow();
MOZ_ASSERT(outerWindow);
if (NS_WARN_IF(!outerWindow)) {
return;
}
RunConsole(jsapi.cx(), outerWindow, aWindow);
}
@ -695,9 +697,13 @@ Console::Console(nsPIDOMWindow* aWindow)
MOZ_ASSERT(mWindow->IsInnerWindow());
mInnerID = mWindow->WindowID();
// Without outerwindow any console message coming from this object will not
// shown in the devtools webconsole. But this should be fine because
// probably we are shutting down, or the window is CCed/GCed.
nsPIDOMWindow* outerWindow = mWindow->GetOuterWindow();
MOZ_ASSERT(outerWindow);
mOuterID = outerWindow->WindowID();
if (outerWindow) {
mOuterID = outerWindow->WindowID();
}
}
if (NS_IsMainThread()) {

View File

@ -130,7 +130,7 @@ Link::GetURI() const
}
void
Link::SetProtocol(const nsAString &aProtocol, ErrorResult& aError)
Link::SetProtocol(const nsAString &aProtocol)
{
nsCOMPtr<nsIURI> uri(GetURIToMutate());
if (!uri) {
@ -149,7 +149,7 @@ Link::SetProtocol(const nsAString &aProtocol, ErrorResult& aError)
}
void
Link::SetPassword(const nsAString &aPassword, ErrorResult& aError)
Link::SetPassword(const nsAString &aPassword)
{
nsCOMPtr<nsIURI> uri(GetURIToMutate());
if (!uri) {
@ -162,7 +162,7 @@ Link::SetPassword(const nsAString &aPassword, ErrorResult& aError)
}
void
Link::SetUsername(const nsAString &aUsername, ErrorResult& aError)
Link::SetUsername(const nsAString &aUsername)
{
nsCOMPtr<nsIURI> uri(GetURIToMutate());
if (!uri) {
@ -175,7 +175,7 @@ Link::SetUsername(const nsAString &aUsername, ErrorResult& aError)
}
void
Link::SetHost(const nsAString &aHost, ErrorResult& aError)
Link::SetHost(const nsAString &aHost)
{
nsCOMPtr<nsIURI> uri(GetURIToMutate());
if (!uri) {
@ -188,7 +188,7 @@ Link::SetHost(const nsAString &aHost, ErrorResult& aError)
}
void
Link::SetHostname(const nsAString &aHostname, ErrorResult& aError)
Link::SetHostname(const nsAString &aHostname)
{
nsCOMPtr<nsIURI> uri(GetURIToMutate());
if (!uri) {
@ -201,7 +201,7 @@ Link::SetHostname(const nsAString &aHostname, ErrorResult& aError)
}
void
Link::SetPathname(const nsAString &aPathname, ErrorResult& aError)
Link::SetPathname(const nsAString &aPathname)
{
nsCOMPtr<nsIURI> uri(GetURIToMutate());
nsCOMPtr<nsIURL> url(do_QueryInterface(uri));
@ -215,14 +215,7 @@ Link::SetPathname(const nsAString &aPathname, ErrorResult& aError)
}
void
Link::SetSearch(const nsAString& aSearch, ErrorResult& aError)
{
SetSearchInternal(aSearch);
UpdateURLSearchParams();
}
void
Link::SetSearchInternal(const nsAString& aSearch)
Link::SetSearch(const nsAString& aSearch)
{
nsCOMPtr<nsIURI> uri(GetURIToMutate());
nsCOMPtr<nsIURL> url(do_QueryInterface(uri));
@ -236,7 +229,7 @@ Link::SetSearchInternal(const nsAString& aSearch)
}
void
Link::SetPort(const nsAString &aPort, ErrorResult& aError)
Link::SetPort(const nsAString &aPort)
{
nsCOMPtr<nsIURI> uri(GetURIToMutate());
if (!uri) {
@ -261,7 +254,7 @@ Link::SetPort(const nsAString &aPort, ErrorResult& aError)
}
void
Link::SetHash(const nsAString &aHash, ErrorResult& aError)
Link::SetHash(const nsAString &aHash)
{
nsCOMPtr<nsIURI> uri(GetURIToMutate());
if (!uri) {
@ -274,7 +267,7 @@ Link::SetHash(const nsAString &aHash, ErrorResult& aError)
}
void
Link::GetOrigin(nsAString &aOrigin, ErrorResult& aError)
Link::GetOrigin(nsAString &aOrigin)
{
aOrigin.Truncate();
@ -289,7 +282,7 @@ Link::GetOrigin(nsAString &aOrigin, ErrorResult& aError)
}
void
Link::GetProtocol(nsAString &_protocol, ErrorResult& aError)
Link::GetProtocol(nsAString &_protocol)
{
nsCOMPtr<nsIURI> uri(GetURI());
if (!uri) {
@ -301,11 +294,10 @@ Link::GetProtocol(nsAString &_protocol, ErrorResult& aError)
CopyASCIItoUTF16(scheme, _protocol);
}
_protocol.Append(char16_t(':'));
return;
}
void
Link::GetUsername(nsAString& aUsername, ErrorResult& aError)
Link::GetUsername(nsAString& aUsername)
{
aUsername.Truncate();
@ -320,7 +312,7 @@ Link::GetUsername(nsAString& aUsername, ErrorResult& aError)
}
void
Link::GetPassword(nsAString &aPassword, ErrorResult& aError)
Link::GetPassword(nsAString &aPassword)
{
aPassword.Truncate();
@ -335,7 +327,7 @@ Link::GetPassword(nsAString &aPassword, ErrorResult& aError)
}
void
Link::GetHost(nsAString &_host, ErrorResult& aError)
Link::GetHost(nsAString &_host)
{
_host.Truncate();
@ -353,7 +345,7 @@ Link::GetHost(nsAString &_host, ErrorResult& aError)
}
void
Link::GetHostname(nsAString &_hostname, ErrorResult& aError)
Link::GetHostname(nsAString &_hostname)
{
_hostname.Truncate();
@ -367,7 +359,7 @@ Link::GetHostname(nsAString &_hostname, ErrorResult& aError)
}
void
Link::GetPathname(nsAString &_pathname, ErrorResult& aError)
Link::GetPathname(nsAString &_pathname)
{
_pathname.Truncate();
@ -387,7 +379,7 @@ Link::GetPathname(nsAString &_pathname, ErrorResult& aError)
}
void
Link::GetSearch(nsAString &_search, ErrorResult& aError)
Link::GetSearch(nsAString &_search)
{
_search.Truncate();
@ -407,7 +399,7 @@ Link::GetSearch(nsAString &_search, ErrorResult& aError)
}
void
Link::GetPort(nsAString &_port, ErrorResult& aError)
Link::GetPort(nsAString &_port)
{
_port.Truncate();
@ -429,7 +421,7 @@ Link::GetPort(nsAString &_port, ErrorResult& aError)
}
void
Link::GetHash(nsAString &_hash, ErrorResult& aError)
Link::GetHash(nsAString &_hash)
{
_hash.Truncate();
@ -482,7 +474,6 @@ Link::ResetLinkState(bool aNotify, bool aHasHref)
// If we've cached the URI, reset always invalidates it.
mCachedURI = nullptr;
UpdateURLSearchParams();
// Update our state back to the default.
mLinkState = defaultState;
@ -571,67 +562,5 @@ Link::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
return n;
}
URLSearchParams*
Link::SearchParams()
{
CreateSearchParamsIfNeeded();
return mSearchParams;
}
void
Link::URLSearchParamsUpdated(URLSearchParams* aSearchParams)
{
MOZ_ASSERT(mSearchParams);
MOZ_ASSERT(mSearchParams == aSearchParams);
nsString search;
mSearchParams->Serialize(search);
SetSearchInternal(search);
}
void
Link::UpdateURLSearchParams()
{
if (!mSearchParams) {
return;
}
nsAutoCString search;
nsCOMPtr<nsIURI> uri(GetURI());
nsCOMPtr<nsIURL> url(do_QueryInterface(uri));
if (url) {
nsresult rv = url->GetQuery(search);
if (NS_FAILED(rv)) {
NS_WARNING("Failed to get the query from a nsIURL.");
}
}
mSearchParams->ParseInput(search);
}
void
Link::CreateSearchParamsIfNeeded()
{
if (!mSearchParams) {
mSearchParams = new URLSearchParams(this, this);
UpdateURLSearchParams();
}
}
void
Link::Unlink()
{
if (mSearchParams) {
mSearchParams = nullptr;
}
}
void
Link::Traverse(nsCycleCollectionTraversalCallback &cb)
{
Link* tmp = this;
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSearchParams);
}
} // namespace dom
} // namespace mozilla

View File

@ -13,7 +13,6 @@
#include "mozilla/IHistory.h"
#include "mozilla/MemoryReporting.h"
#include "mozilla/dom/URLSearchParams.h"
#include "nsIContent.h" // for nsLinkState
namespace mozilla {
@ -28,7 +27,7 @@ class Element;
{ 0xb25edee6, 0xdd35, 0x4f8b, \
{ 0xab, 0x90, 0x66, 0xd0, 0xbd, 0x3c, 0x22, 0xd5 } }
class Link : public URLSearchParamsObserver
class Link : public nsISupports
{
public:
NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOM_LINK_IMPLEMENTATION_IID)
@ -57,26 +56,25 @@ public:
/**
* Helper methods for modifying and obtaining parts of the URI of the Link.
*/
void SetProtocol(const nsAString &aProtocol, ErrorResult& aError);
void SetUsername(const nsAString &aUsername, ErrorResult& aError);
void SetPassword(const nsAString &aPassword, ErrorResult& aError);
void SetHost(const nsAString &aHost, ErrorResult& aError);
void SetHostname(const nsAString &aHostname, ErrorResult& aError);
void SetPathname(const nsAString &aPathname, ErrorResult& aError);
void SetSearch(const nsAString &aSearch, ErrorResult& aError);
void SetPort(const nsAString &aPort, ErrorResult& aError);
void SetHash(const nsAString &aHash, ErrorResult& aError);
void GetOrigin(nsAString &aOrigin, ErrorResult& aError);
void GetProtocol(nsAString &_protocol, ErrorResult& aError);
void GetUsername(nsAString &aUsername, ErrorResult& aError);
void GetPassword(nsAString &aPassword, ErrorResult& aError);
void GetHost(nsAString &_host, ErrorResult& aError);
void GetHostname(nsAString &_hostname, ErrorResult& aError);
void GetPathname(nsAString &_pathname, ErrorResult& aError);
void GetSearch(nsAString &_search, ErrorResult& aError);
URLSearchParams* SearchParams();
void GetPort(nsAString &_port, ErrorResult& aError);
void GetHash(nsAString &_hash, ErrorResult& aError);
void SetProtocol(const nsAString &aProtocol);
void SetUsername(const nsAString &aUsername);
void SetPassword(const nsAString &aPassword);
void SetHost(const nsAString &aHost);
void SetHostname(const nsAString &aHostname);
void SetPathname(const nsAString &aPathname);
void SetSearch(const nsAString &aSearch);
void SetPort(const nsAString &aPort);
void SetHash(const nsAString &aHash);
void GetOrigin(nsAString &aOrigin);
void GetProtocol(nsAString &_protocol);
void GetUsername(nsAString &aUsername);
void GetPassword(nsAString &aPassword);
void GetHost(nsAString &_host);
void GetHostname(nsAString &_hostname);
void GetPathname(nsAString &_pathname);
void GetSearch(nsAString &_search);
void GetPort(nsAString &_port);
void GetHash(nsAString &_hash);
/**
* Invalidates any link caching, and resets the state to the default.
@ -113,9 +111,6 @@ public:
bool ElementHasHref() const;
// URLSearchParamsObserver
void URLSearchParamsUpdated(URLSearchParams* aSearchParams) override;
protected:
virtual ~Link();
@ -134,12 +129,6 @@ protected:
nsIURI* GetCachedURI() const { return mCachedURI; }
bool HasCachedURI() const { return !!mCachedURI; }
void UpdateURLSearchParams();
// CC methods
void Unlink();
void Traverse(nsCycleCollectionTraversalCallback &cb);
private:
/**
* Unregisters from History so this node no longer gets notifications about
@ -150,10 +139,6 @@ private:
already_AddRefed<nsIURI> GetURIToMutate();
void SetHrefAttribute(nsIURI *aURI);
void CreateSearchParamsIfNeeded();
void SetSearchInternal(const nsAString& aSearch);
mutable nsCOMPtr<nsIURI> mCachedURI;
Element * const mElement;
@ -167,9 +152,6 @@ private:
bool mNeedsRegistration;
bool mRegistered;
protected:
RefPtr<URLSearchParams> mSearchParams;
};
NS_DEFINE_STATIC_IID_ACCESSOR(Link, MOZILLA_DOM_LINK_IMPLEMENTATION_IID)

View File

@ -774,13 +774,25 @@ NS_IMPL_ISUPPORTS(VibrateWindowListener, nsIDOMEventListener)
StaticRefPtr<VibrateWindowListener> gVibrateWindowListener;
static bool
MayVibrate(nsIDocument* doc) {
#if MOZ_WIDGET_GONK
if (XRE_IsParentProcess()) {
return true; // The system app can always vibrate
}
#endif // MOZ_WIDGET_GONK
// Hidden documents cannot start or stop a vibration.
return (doc && !doc->Hidden());
}
NS_IMETHODIMP
VibrateWindowListener::HandleEvent(nsIDOMEvent* aEvent)
{
nsCOMPtr<nsIDocument> doc =
do_QueryInterface(aEvent->InternalDOMEvent()->GetTarget());
if (!doc || doc->Hidden()) {
if (!MayVibrate(doc)) {
// It's important that we call CancelVibrate(), not Vibrate() with an
// empty list, because Vibrate() will fail if we're no longer focused, but
// CancelVibrate() will succeed, so long as nobody else has started a new
@ -853,12 +865,8 @@ Navigator::Vibrate(const nsTArray<uint32_t>& aPattern)
}
nsCOMPtr<nsIDocument> doc = mWindow->GetExtantDoc();
if (!doc) {
return false;
}
if (doc->Hidden()) {
// Hidden documents cannot start or stop a vibration.
if (!MayVibrate(doc)) {
return false;
}
@ -2506,13 +2514,13 @@ Navigator::HasDataStoreSupport(nsIPrincipal* aPrincipal)
// A WorkerMainThreadRunnable to synchronously dispatch the call of
// HasDataStoreSupport() from the worker thread to the main thread.
class HasDataStoreSupportRunnable final
: public workers::WorkerMainThreadRunnable
: public workers::WorkerCheckAPIExposureOnMainThreadRunnable
{
public:
bool mResult;
explicit HasDataStoreSupportRunnable(workers::WorkerPrivate* aWorkerPrivate)
: workers::WorkerMainThreadRunnable(aWorkerPrivate)
: workers::WorkerCheckAPIExposureOnMainThreadRunnable(aWorkerPrivate)
, mResult(false)
{
MOZ_ASSERT(aWorkerPrivate);
@ -2543,9 +2551,7 @@ Navigator::HasDataStoreSupport(JSContext* aCx, JSObject* aGlobal)
RefPtr<HasDataStoreSupportRunnable> runnable =
new HasDataStoreSupportRunnable(workerPrivate);
runnable->Dispatch(aCx);
return runnable->mResult;
return runnable->Dispatch() && runnable->mResult;
}
workers::AssertIsOnMainThread();

View File

@ -23,7 +23,7 @@ NS_IMPL_ISUPPORTS(ThirdPartyUtil, mozIThirdPartyUtil)
//
// NSPR_LOG_MODULES=thirdPartyUtil:5
//
static PRLogModuleInfo *gThirdPartyLog;
static mozilla::LazyLogModule gThirdPartyLog("thirdPartyUtil");
#undef LOG
#define LOG(args) MOZ_LOG(gThirdPartyLog, mozilla::LogLevel::Debug, args)
@ -35,9 +35,6 @@ ThirdPartyUtil::Init()
nsresult rv;
mTLDService = do_GetService(NS_EFFECTIVETLDSERVICE_CONTRACTID, &rv);
if (!gThirdPartyLog)
gThirdPartyLog = PR_NewLogModule("thirdPartyUtil");
return rv;
}

View File

@ -203,7 +203,7 @@ URL::RevokeObjectURL(const GlobalObject& aGlobal, const nsAString& aURL,
}
void
URL::GetHref(nsAString& aHref, ErrorResult& aRv) const
URL::GetHref(nsAString& aHref) const
{
aHref.Truncate();
@ -238,13 +238,13 @@ URL::SetHref(const nsAString& aHref, ErrorResult& aRv)
}
void
URL::GetOrigin(nsAString& aOrigin, ErrorResult& aRv) const
URL::GetOrigin(nsAString& aOrigin) const
{
nsContentUtils::GetUTFOrigin(mURI, aOrigin);
}
void
URL::GetProtocol(nsAString& aProtocol, ErrorResult& aRv) const
URL::GetProtocol(nsAString& aProtocol) const
{
nsAutoCString protocol;
if (NS_SUCCEEDED(mURI->GetScheme(protocol))) {
@ -256,7 +256,7 @@ URL::GetProtocol(nsAString& aProtocol, ErrorResult& aRv) const
}
void
URL::SetProtocol(const nsAString& aProtocol, ErrorResult& aRv)
URL::SetProtocol(const nsAString& aProtocol)
{
nsAString::const_iterator start, end;
aProtocol.BeginReading(start);
@ -303,37 +303,37 @@ URL::SetProtocol(const nsAString& aProtocol, ErrorResult& aRv)
}
void
URL::GetUsername(nsAString& aUsername, ErrorResult& aRv) const
URL::GetUsername(nsAString& aUsername) const
{
URL_GETTER(aUsername, GetUsername);
}
void
URL::SetUsername(const nsAString& aUsername, ErrorResult& aRv)
URL::SetUsername(const nsAString& aUsername)
{
mURI->SetUsername(NS_ConvertUTF16toUTF8(aUsername));
}
void
URL::GetPassword(nsAString& aPassword, ErrorResult& aRv) const
URL::GetPassword(nsAString& aPassword) const
{
URL_GETTER(aPassword, GetPassword);
}
void
URL::SetPassword(const nsAString& aPassword, ErrorResult& aRv)
URL::SetPassword(const nsAString& aPassword)
{
mURI->SetPassword(NS_ConvertUTF16toUTF8(aPassword));
}
void
URL::GetHost(nsAString& aHost, ErrorResult& aRv) const
URL::GetHost(nsAString& aHost) const
{
URL_GETTER(aHost, GetHostPort);
}
void
URL::SetHost(const nsAString& aHost, ErrorResult& aRv)
URL::SetHost(const nsAString& aHost)
{
mURI->SetHostPort(NS_ConvertUTF16toUTF8(aHost));
}
@ -369,14 +369,14 @@ URL::UpdateURLSearchParams()
}
void
URL::GetHostname(nsAString& aHostname, ErrorResult& aRv) const
URL::GetHostname(nsAString& aHostname) const
{
aHostname.Truncate();
nsContentUtils::GetHostOrIPv6WithBrackets(mURI, aHostname);
}
void
URL::SetHostname(const nsAString& aHostname, ErrorResult& aRv)
URL::SetHostname(const nsAString& aHostname)
{
// nsStandardURL returns NS_ERROR_UNEXPECTED for an empty hostname
// The return code is silently ignored
@ -384,7 +384,7 @@ URL::SetHostname(const nsAString& aHostname, ErrorResult& aRv)
}
void
URL::GetPort(nsAString& aPort, ErrorResult& aRv) const
URL::GetPort(nsAString& aPort) const
{
aPort.Truncate();
@ -398,7 +398,7 @@ URL::GetPort(nsAString& aPort, ErrorResult& aRv) const
}
void
URL::SetPort(const nsAString& aPort, ErrorResult& aRv)
URL::SetPort(const nsAString& aPort)
{
nsresult rv;
nsAutoString portStr(aPort);
@ -416,7 +416,7 @@ URL::SetPort(const nsAString& aPort, ErrorResult& aRv)
}
void
URL::GetPathname(nsAString& aPathname, ErrorResult& aRv) const
URL::GetPathname(nsAString& aPathname) const
{
aPathname.Truncate();
@ -442,7 +442,7 @@ URL::GetPathname(nsAString& aPathname, ErrorResult& aRv) const
}
void
URL::SetPathname(const nsAString& aPathname, ErrorResult& aRv)
URL::SetPathname(const nsAString& aPathname)
{
nsCOMPtr<nsIURL> url(do_QueryInterface(mURI));
if (!url) {
@ -454,7 +454,7 @@ URL::SetPathname(const nsAString& aPathname, ErrorResult& aRv)
}
void
URL::GetSearch(nsAString& aSearch, ErrorResult& aRv) const
URL::GetSearch(nsAString& aSearch) const
{
aSearch.Truncate();
@ -473,7 +473,7 @@ URL::GetSearch(nsAString& aSearch, ErrorResult& aRv) const
}
void
URL::SetSearch(const nsAString& aSearch, ErrorResult& aRv)
URL::SetSearch(const nsAString& aSearch)
{
SetSearchInternal(aSearch);
UpdateURLSearchParams();
@ -499,7 +499,7 @@ URL::SearchParams()
}
void
URL::GetHash(nsAString& aHash, ErrorResult& aRv) const
URL::GetHash(nsAString& aHash) const
{
aHash.Truncate();
@ -515,7 +515,7 @@ URL::GetHash(nsAString& aHash, ErrorResult& aRv) const
}
void
URL::SetHash(const nsAString& aHash, ErrorResult& aRv)
URL::SetHash(const nsAString& aHash)
{
mURI->SetRef(NS_ConvertUTF16toUTF8(aHash));
}

View File

@ -88,53 +88,53 @@ public:
const nsAString& aURL,
ErrorResult& aRv);
void GetHref(nsAString& aHref, ErrorResult& aRv) const;
void GetHref(nsAString& aHref) const;
void SetHref(const nsAString& aHref, ErrorResult& aRv);
void GetOrigin(nsAString& aOrigin, ErrorResult& aRv) const;
void GetOrigin(nsAString& aOrigin) const;
void GetProtocol(nsAString& aProtocol, ErrorResult& aRv) const;
void GetProtocol(nsAString& aProtocol) const;
void SetProtocol(const nsAString& aProtocol, ErrorResult& aRv);
void SetProtocol(const nsAString& aProtocol);
void GetUsername(nsAString& aUsername, ErrorResult& aRv) const;
void GetUsername(nsAString& aUsername) const;
void SetUsername(const nsAString& aUsername, ErrorResult& aRv);
void SetUsername(const nsAString& aUsername);
void GetPassword(nsAString& aPassword, ErrorResult& aRv) const;
void GetPassword(nsAString& aPassword) const;
void SetPassword(const nsAString& aPassword, ErrorResult& aRv);
void SetPassword(const nsAString& aPassword);
void GetHost(nsAString& aHost, ErrorResult& aRv) const;
void GetHost(nsAString& aHost) const;
void SetHost(const nsAString& aHost, ErrorResult& aRv);
void SetHost(const nsAString& aHost);
void GetHostname(nsAString& aHostname, ErrorResult& aRv) const;
void GetHostname(nsAString& aHostname) const;
void SetHostname(const nsAString& aHostname, ErrorResult& aRv);
void SetHostname(const nsAString& aHostname);
void GetPort(nsAString& aPort, ErrorResult& aRv) const;
void GetPort(nsAString& aPort) const;
void SetPort(const nsAString& aPort, ErrorResult& aRv);
void SetPort(const nsAString& aPort);
void GetPathname(nsAString& aPathname, ErrorResult& aRv) const;
void GetPathname(nsAString& aPathname) const;
void SetPathname(const nsAString& aPathname, ErrorResult& aRv);
void SetPathname(const nsAString& aPathname);
void GetSearch(nsAString& aRetval, ErrorResult& aRv) const;
void GetSearch(nsAString& aRetval) const;
void SetSearch(const nsAString& aArg, ErrorResult& aRv);
void SetSearch(const nsAString& aArg);
URLSearchParams* SearchParams();
void GetHash(nsAString& aRetval, ErrorResult& aRv) const;
void GetHash(nsAString& aRetval) const;
void SetHash(const nsAString& aArg, ErrorResult& aRv);
void SetHash(const nsAString& aArg);
void Stringify(nsAString& aRetval, ErrorResult& aRv) const
void Stringify(nsAString& aRetval) const
{
GetHref(aRetval, aRv);
GetHref(aRetval);
}
// URLSearchParamsObserver

View File

@ -138,14 +138,14 @@ public:
const nsACString& aReasonString = EmptyCString());
nsresult CloseConnection(uint16_t reasonCode,
const nsACString& aReasonString = EmptyCString());
nsresult Disconnect();
void Disconnect();
void DisconnectInternal();
nsresult ConsoleError();
nsresult PrintErrorOnConsole(const char* aBundleURI,
const char16_t* aError,
const char16_t** aFormatStrings,
uint32_t aFormatStringsLen);
void PrintErrorOnConsole(const char* aBundleURI,
const char16_t* aError,
const char16_t** aFormatStrings,
uint32_t aFormatStringsLen);
nsresult DoOnMessageAvailable(const nsACString& aMsg,
bool isBinary);
@ -301,21 +301,15 @@ public:
, mError(aError)
, mFormatStrings(aFormatStrings)
, mFormatStringsLen(aFormatStringsLen)
, mRv(NS_ERROR_FAILURE)
{ }
bool MainThreadRun() override
{
mRv = mImpl->PrintErrorOnConsole(mBundleURI, mError, mFormatStrings,
mFormatStringsLen);
mImpl->PrintErrorOnConsole(mBundleURI, mError, mFormatStrings,
mFormatStringsLen);
return true;
}
nsresult ErrorCode() const
{
return mRv;
}
private:
// Raw pointer because this runnable is sync.
WebSocketImpl* mImpl;
@ -324,12 +318,11 @@ private:
const char16_t* mError;
const char16_t** mFormatStrings;
uint32_t mFormatStringsLen;
nsresult mRv;
};
} // namespace
nsresult
void
WebSocketImpl::PrintErrorOnConsole(const char *aBundleURI,
const char16_t *aError,
const char16_t **aFormatStrings,
@ -343,26 +336,32 @@ WebSocketImpl::PrintErrorOnConsole(const char *aBundleURI,
RefPtr<PrintErrorOnConsoleRunnable> runnable =
new PrintErrorOnConsoleRunnable(this, aBundleURI, aError, aFormatStrings,
aFormatStringsLen);
runnable->Dispatch(mWorkerPrivate->GetJSContext());
return runnable->ErrorCode();
ErrorResult rv;
runnable->Dispatch(rv);
// XXXbz this seems totally broken. We should be propagating this out, but
// none of our callers really propagate anything usefully. Come to think of
// it, why is this a syncrunnable anyway? Can't this be a fire-and-forget
// runnable??
rv.SuppressException();
return;
}
nsresult rv;
nsCOMPtr<nsIStringBundleService> bundleService =
do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
NS_ENSURE_SUCCESS_VOID(rv);
nsCOMPtr<nsIStringBundle> strBundle;
rv = bundleService->CreateBundle(aBundleURI, getter_AddRefs(strBundle));
NS_ENSURE_SUCCESS(rv, rv);
NS_ENSURE_SUCCESS_VOID(rv);
nsCOMPtr<nsIConsoleService> console(
do_GetService(NS_CONSOLESERVICE_CONTRACTID, &rv));
NS_ENSURE_SUCCESS(rv, rv);
NS_ENSURE_SUCCESS_VOID(rv);
nsCOMPtr<nsIScriptError> errorObject(
do_CreateInstance(NS_SCRIPTERROR_CONTRACTID, &rv));
NS_ENSURE_SUCCESS(rv, rv);
NS_ENSURE_SUCCESS_VOID(rv);
// Localize the error message
nsXPIDLString message;
@ -373,7 +372,7 @@ WebSocketImpl::PrintErrorOnConsole(const char *aBundleURI,
} else {
rv = strBundle->GetStringFromName(aError, getter_Copies(message));
}
NS_ENSURE_SUCCESS(rv, rv);
NS_ENSURE_SUCCESS_VOID(rv);
if (mInnerWindowID) {
rv = errorObject->InitWithWindowID(message,
@ -389,13 +388,11 @@ WebSocketImpl::PrintErrorOnConsole(const char *aBundleURI,
nsIScriptError::errorFlag, "Web Socket");
}
NS_ENSURE_SUCCESS(rv, rv);
NS_ENSURE_SUCCESS_VOID(rv);
// print the error message directly to the JS console
rv = console->LogMessage(errorObject);
NS_ENSURE_SUCCESS(rv, rv);
return NS_OK;
NS_ENSURE_SUCCESS_VOID(rv);
}
namespace {
@ -603,11 +600,11 @@ private:
} // namespace
nsresult
void
WebSocketImpl::Disconnect()
{
if (mDisconnectingOrDisconnected) {
return NS_OK;
return;
}
AssertIsOnTargetThread();
@ -626,7 +623,11 @@ WebSocketImpl::Disconnect()
} else {
RefPtr<DisconnectInternalRunnable> runnable =
new DisconnectInternalRunnable(this);
runnable->Dispatch(mWorkerPrivate->GetJSContext());
ErrorResult rv;
runnable->Dispatch(rv);
// XXXbz this seems totally broken. We should be propagating this out, but
// where to, exactly?
rv.SuppressException();
}
// DontKeepAliveAnyMore() can release the object. So hold a reference to this
@ -645,8 +646,6 @@ WebSocketImpl::Disconnect()
// We want to release the WebSocket in the correct thread.
mWebSocket = nullptr;
return NS_OK;
}
void
@ -1270,7 +1269,7 @@ WebSocket::Constructor(const GlobalObject& aGlobal,
new InitRunnable(webSocket->mImpl, aUrl, protocolArray,
nsAutoCString(file.get()), lineno, column, aRv,
&connectionFailed);
runnable->Dispatch(aGlobal.Context());
runnable->Dispatch(aRv);
}
if (NS_WARN_IF(aRv.Failed())) {
@ -1350,7 +1349,7 @@ WebSocket::Constructor(const GlobalObject& aGlobal,
} else {
RefPtr<AsyncOpenRunnable> runnable =
new AsyncOpenRunnable(webSocket->mImpl, aRv);
runnable->Dispatch(aGlobal.Context());
runnable->Dispatch(aRv);
}
if (NS_WARN_IF(aRv.Failed())) {

View File

@ -30,7 +30,7 @@ using mozilla::LogLevel;
NS_IMPL_ISUPPORTS(nsContentPolicy, nsIContentPolicy)
static PRLogModuleInfo* gConPolLog;
static mozilla::LazyLogModule gConPolLog("nsContentPolicy");
nsresult
NS_NewContentPolicy(nsIContentPolicy **aResult)
@ -44,9 +44,6 @@ nsContentPolicy::nsContentPolicy()
: mPolicies(NS_CONTENTPOLICY_CATEGORY)
, mSimplePolicies(NS_SIMPLECONTENTPOLICY_CATEGORY)
{
if (! gConPolLog) {
gConPolLog = PR_NewLogModule("nsContentPolicy");
}
}
nsContentPolicy::~nsContentPolicy()

View File

@ -51,19 +51,16 @@
#include "nsParserConstants.h"
#include "nsSandboxFlags.h"
static PRLogModuleInfo*
using namespace mozilla;
static LogModule*
GetSriLog()
{
static PRLogModuleInfo *gSriPRLog;
if (!gSriPRLog) {
gSriPRLog = PR_NewLogModule("SRI");
}
static LazyLogModule gSriPRLog("SRI");
return gSriPRLog;
}
using namespace mozilla;
PRLogModuleInfo* gContentSinkLogModuleInfo;
LazyLogModule gContentSinkLogModuleInfo("nscontentsink");
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsContentSink)
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsContentSink)
@ -110,12 +107,6 @@ nsContentSink::nsContentSink()
NS_ASSERTION(mInMonolithicContainer == 0, "What?");
NS_ASSERTION(mInNotification == 0, "What?");
NS_ASSERTION(!mDeferredLayoutStart, "What?");
#ifdef DEBUG
if (!gContentSinkLogModuleInfo) {
gContentSinkLogModuleInfo = PR_NewLogModule("nscontentsink");
}
#endif
}
nsContentSink::~nsContentSink()
@ -963,8 +954,10 @@ nsContentSink::SelectDocAppCache(nsIApplicationCache *aLoadApplicationCache,
nsAutoCString docURISpec, clientID;
mDocumentURI->GetAsciiSpec(docURISpec);
aLoadApplicationCache->GetClientID(clientID);
SINK_TRACE(gContentSinkLogModuleInfo, SINK_TRACE_CALLS,
("Selection: assigning app cache %s to document %s", clientID.get(), docURISpec.get()));
SINK_TRACE(static_cast<LogModule*>(gContentSinkLogModuleInfo),
SINK_TRACE_CALLS,
("Selection: assigning app cache %s to document %s",
clientID.get(), docURISpec.get()));
#endif
rv = applicationCacheDocument->SetApplicationCache(aLoadApplicationCache);
@ -1017,8 +1010,10 @@ nsContentSink::SelectDocAppCacheNoManifest(nsIApplicationCache *aLoadApplication
nsAutoCString docURISpec, clientID;
mDocumentURI->GetAsciiSpec(docURISpec);
aLoadApplicationCache->GetClientID(clientID);
SINK_TRACE(gContentSinkLogModuleInfo, SINK_TRACE_CALLS,
("Selection, no manifest: assigning app cache %s to document %s", clientID.get(), docURISpec.get()));
SINK_TRACE(static_cast<LogModule*>(gContentSinkLogModuleInfo),
SINK_TRACE_CALLS,
("Selection, no manifest: assigning app cache %s to document %s",
clientID.get(), docURISpec.get()));
#endif
rv = applicationCacheDocument->SetApplicationCache(aLoadApplicationCache);
@ -1332,7 +1327,8 @@ nsContentSink::WillInterruptImpl()
{
nsresult result = NS_OK;
SINK_TRACE(gContentSinkLogModuleInfo, SINK_TRACE_CALLS,
SINK_TRACE(static_cast<LogModule*>(gContentSinkLogModuleInfo),
SINK_TRACE_CALLS,
("nsContentSink::WillInterrupt: this=%p", this));
#ifndef SINK_NO_INCREMENTAL
if (WaitForPendingSheets()) {
@ -1346,7 +1342,8 @@ nsContentSink::WillInterruptImpl()
// If it's already time for us to have a notification
if (diff > interval || mDroppedTimer) {
mBackoffCount--;
SINK_TRACE(gContentSinkLogModuleInfo, SINK_TRACE_REFLOW,
SINK_TRACE(static_cast<LogModule*>(gContentSinkLogModuleInfo),
SINK_TRACE_REFLOW,
("nsContentSink::WillInterrupt: flushing tags since we've "
"run out time; backoff count: %d", mBackoffCount));
result = FlushTags();
@ -1364,7 +1361,8 @@ nsContentSink::WillInterruptImpl()
mNotificationTimer = do_CreateInstance("@mozilla.org/timer;1",
&result);
if (NS_SUCCEEDED(result)) {
SINK_TRACE(gContentSinkLogModuleInfo, SINK_TRACE_REFLOW,
SINK_TRACE(static_cast<LogModule*>(gContentSinkLogModuleInfo),
SINK_TRACE_REFLOW,
("nsContentSink::WillInterrupt: setting up timer with "
"delay %d", delay));
@ -1378,7 +1376,8 @@ nsContentSink::WillInterruptImpl()
}
}
} else {
SINK_TRACE(gContentSinkLogModuleInfo, SINK_TRACE_REFLOW,
SINK_TRACE(static_cast<LogModule*>(gContentSinkLogModuleInfo),
SINK_TRACE_REFLOW,
("nsContentSink::WillInterrupt: flushing tags "
"unconditionally"));
result = FlushTags();
@ -1393,7 +1392,8 @@ nsContentSink::WillInterruptImpl()
nsresult
nsContentSink::WillResumeImpl()
{
SINK_TRACE(gContentSinkLogModuleInfo, SINK_TRACE_CALLS,
SINK_TRACE(static_cast<LogModule*>(gContentSinkLogModuleInfo),
SINK_TRACE_CALLS,
("nsContentSink::WillResume: this=%p", this));
mParsing = true;
@ -1513,7 +1513,8 @@ nsContentSink::DidBuildModelImpl(bool aTerminated)
// Cancel a timer if we had one out there
if (mNotificationTimer) {
SINK_TRACE(gContentSinkLogModuleInfo, SINK_TRACE_REFLOW,
SINK_TRACE(static_cast<LogModule*>(gContentSinkLogModuleInfo),
SINK_TRACE_REFLOW,
("nsContentSink::DidBuildModel: canceling notification "
"timeout"));
mNotificationTimer->Cancel();

View File

@ -47,13 +47,13 @@ class Loader;
#ifdef DEBUG
extern PRLogModuleInfo* gContentSinkLogModuleInfo;
extern mozilla::LazyLogModule gContentSinkLogModuleInfo;
#define SINK_TRACE_CALLS 0x1
#define SINK_TRACE_REFLOW 0x2
#define SINK_ALWAYS_REFLOW 0x4
#define SINK_LOG_TEST(_lm, _bit) (int((_lm)->level) & (_bit))
#define SINK_LOG_TEST(_lm, _bit) (int((_lm)->Level()) & (_bit))
#define SINK_TRACE(_lm, _bit, _args) \
PR_BEGIN_MACRO \

View File

@ -2116,14 +2116,6 @@ nsContentUtils::IsCallerContentXBL()
return xpc::IsContentXBLScope(c);
}
bool
nsContentUtils::IsImageSrcSetDisabled()
{
return Preferences::GetBool("dom.disable_image_src_set") &&
!IsCallerChrome();
}
// static
bool
nsContentUtils::LookupBindingMember(JSContext* aCx, nsIContent *aContent,

View File

@ -236,8 +236,6 @@ public:
return SubjectPrincipal();
}
static bool IsImageSrcSetDisabled();
static bool LookupBindingMember(JSContext* aCx, nsIContent *aContent,
JS::Handle<jsid> aId,
JS::MutableHandle<JSPropertyDescriptor> aDesc);

View File

@ -471,11 +471,7 @@ nsDOMWindowUtils::SetResolution(float aResolution)
return NS_ERROR_FAILURE;
}
nsIScrollableFrame* sf = presShell->GetRootScrollFrameAsScrollable();
if (sf) {
sf->SetResolution(aResolution);
presShell->SetResolution(aResolution);
}
presShell->SetResolution(aResolution);
return NS_OK;
}
@ -488,7 +484,7 @@ nsDOMWindowUtils::SetResolutionAndScaleTo(float aResolution)
return NS_ERROR_FAILURE;
}
nsLayoutUtils::SetResolutionAndScaleTo(presShell, aResolution);
presShell->SetResolutionAndScaleTo(aResolution);
return NS_OK;
}
@ -501,7 +497,7 @@ nsDOMWindowUtils::GetResolution(float* aResolution)
return NS_ERROR_FAILURE;
}
*aResolution = nsLayoutUtils::GetResolution(presShell);
*aResolution = presShell->GetResolution();
return NS_OK;
}
@ -513,8 +509,7 @@ nsDOMWindowUtils::GetIsResolutionSet(bool* aIsResolutionSet) {
return NS_ERROR_FAILURE;
}
const nsIScrollableFrame* sf = presShell->GetRootScrollFrameAsScrollable();
*aIsResolutionSet = sf && sf->IsResolutionSet();
*aIsResolutionSet = presShell->IsResolutionSet();
return NS_OK;
}

View File

@ -257,8 +257,8 @@ using namespace mozilla::dom;
typedef nsTArray<Link*> LinkArray;
static PRLogModuleInfo* gDocumentLeakPRLog;
static PRLogModuleInfo* gCspPRLog;
static LazyLogModule gDocumentLeakPRLog("DocumentLeak");
static LazyLogModule gCspPRLog("CSP");
#define NAME_NOT_VALID ((nsSimpleContentList*)1)
@ -1459,16 +1459,10 @@ nsDocument::nsDocument(const char* aContentType)
{
SetContentTypeInternal(nsDependentCString(aContentType));
if (!gDocumentLeakPRLog)
gDocumentLeakPRLog = PR_NewLogModule("DocumentLeak");
if (gDocumentLeakPRLog)
MOZ_LOG(gDocumentLeakPRLog, LogLevel::Debug,
("DOCUMENT %p created", this));
if (!gCspPRLog)
gCspPRLog = PR_NewLogModule("CSP");
// Start out mLastStyleSheetSet as null, per spec
SetDOMStringToNull(mLastStyleSheetSet);
@ -2653,23 +2647,12 @@ nsDocument::ApplySettingsFromCSP(bool aSpeculative)
}
// 2) apply settings from speculative csp
nsCOMPtr<nsIContentSecurityPolicy> preloadCsp;
rv = NodePrincipal()->GetPreloadCsp(getter_AddRefs(preloadCsp));
if (preloadCsp) {
// Set up any Referrer Policy specified by CSP
bool hasReferrerPolicy = false;
uint32_t referrerPolicy = mozilla::net::RP_Default;
rv = preloadCsp->GetReferrerPolicy(&referrerPolicy, &hasReferrerPolicy);
if (!mUpgradeInsecurePreloads) {
nsCOMPtr<nsIContentSecurityPolicy> preloadCsp;
rv = NodePrincipal()->GetPreloadCsp(getter_AddRefs(preloadCsp));
NS_ENSURE_SUCCESS_VOID(rv);
if (hasReferrerPolicy) {
// please note that referrer policy spec defines that the latest
// policy awlays wins, hence we can safely overwrite the policy here.
mReferrerPolicy = static_cast<ReferrerPolicy>(referrerPolicy);
mReferrerPolicySet = true;
}
if (!mUpgradeInsecurePreloads) {
rv = preloadCsp->GetUpgradeInsecureRequests(&mUpgradeInsecurePreloads);
NS_ENSURE_SUCCESS_VOID(rv);
if (preloadCsp) {
preloadCsp->GetUpgradeInsecureRequests(&mUpgradeInsecurePreloads);
}
}
}

View File

@ -77,8 +77,8 @@ using namespace mozilla::widget;
// Two types of focus pr logging are available:
// 'Focus' for normal focus manager calls
// 'FocusNavigation' for tab and document navigation
PRLogModuleInfo* gFocusLog;
PRLogModuleInfo* gFocusNavigationLog;
LazyLogModule gFocusLog("Focus");
LazyLogModule gFocusNavigationLog("FocusNavigation");
#define LOGFOCUS(args) MOZ_LOG(gFocusLog, mozilla::LogLevel::Debug, args)
#define LOGFOCUSNAVIGATION(args) MOZ_LOG(gFocusNavigationLog, mozilla::LogLevel::Debug, args)
@ -193,9 +193,6 @@ nsFocusManager::Init()
NS_ADDREF(fm);
sInstance = fm;
gFocusLog = PR_NewLogModule("Focus");
gFocusNavigationLog = PR_NewLogModule("FocusNavigation");
nsIContent::sTabFocusModelAppliesToXUL =
Preferences::GetBool("accessibility.tabfocus_applies_to_xul",
nsIContent::sTabFocusModelAppliesToXUL);

View File

@ -248,8 +248,6 @@ class nsIScriptTimeoutHandler;
#include <android/log.h>
#endif
static PRLogModuleInfo* gDOMLeakPRLog;
#ifdef XP_WIN
#include <process.h>
#define getpid _getpid
@ -269,6 +267,8 @@ using mozilla::TimeDuration;
using mozilla::dom::cache::CacheStorage;
using mozilla::dom::indexedDB::IDBFactory;
static LazyLogModule gDOMLeakPRLog("DOMLeak");
nsGlobalWindow::WindowByIdTable *nsGlobalWindow::sWindowsById = nullptr;
bool nsGlobalWindow::sWarnedAboutWindowInternal = false;
bool nsGlobalWindow::sIdleObserversAPIFuzzTimeDisabled = false;
@ -1278,7 +1278,6 @@ nsGlobalWindow::Init()
NS_ASSERTION(gEntropyCollector,
"gEntropyCollector should have been initialized!");
gDOMLeakPRLog = PR_NewLogModule("DOMLeak");
NS_ASSERTION(gDOMLeakPRLog, "gDOMLeakPRLog should have been initialized!");
sWindowsById = new WindowByIdTable();
@ -8132,6 +8131,7 @@ void
nsGlobalWindow::ForceClose()
{
MOZ_ASSERT(IsOuterWindow());
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
if (IsFrame() || !mDocShell) {
// This may be a frame in a frameset, or a window that's already closed.
@ -8160,6 +8160,12 @@ nsGlobalWindow::FinalClose()
// Flag that we were closed.
mIsClosed = true;
// If we get here from CloseOuter then it means that the parent process is
// going to close our window for us. It's just important to set mIsClosed.
if (XRE_GetProcessType() == GeckoProcessType_Content) {
return;
}
// This stuff is non-sensical but incredibly fragile. The reasons for the
// behavior here don't make sense today and may not have ever made sense,
// but various bits of frontend code break when you change them. If you need

View File

@ -36,7 +36,7 @@ using mozilla::dom::NodeInfo;
#include "mozilla/Logging.h"
static PRLogModuleInfo* gNodeInfoManagerLeakPRLog;
static LazyLogModule gNodeInfoManagerLeakPRLog("NodeInfoManagerLeak");
PLHashNumber
nsNodeInfoManager::GetNodeInfoInnerHashValue(const void *key)
@ -115,9 +115,6 @@ nsNodeInfoManager::nsNodeInfoManager()
{
nsLayoutStatics::AddRef();
if (!gNodeInfoManagerLeakPRLog)
gNodeInfoManagerLeakPRLog = PR_NewLogModule("NodeInfoManagerLeak");
if (gNodeInfoManagerLeakPRLog)
MOZ_LOG(gNodeInfoManagerLeakPRLog, LogLevel::Debug,
("NODEINFOMANAGER %p created", this));

View File

@ -107,12 +107,10 @@ static const char *kPrefJavaMIME = "plugin.java.mime";
using namespace mozilla;
using namespace mozilla::dom;
static PRLogModuleInfo*
static LogModule*
GetObjectLog()
{
static PRLogModuleInfo *sLog;
if (!sLog)
sLog = PR_NewLogModule("objlc");
static LazyLogModule sLog("objlc");
return sLog;
}

View File

@ -705,12 +705,12 @@ public:
}
};
class PrefEnabledRunnable final : public WorkerMainThreadRunnable
class PrefEnabledRunnable final : public WorkerCheckAPIExposureOnMainThreadRunnable
{
public:
PrefEnabledRunnable(WorkerPrivate* aWorkerPrivate,
const nsCString& aPrefName)
: WorkerMainThreadRunnable(aWorkerPrivate)
: WorkerCheckAPIExposureOnMainThreadRunnable(aWorkerPrivate)
, mEnabled(false)
, mPrefName(aPrefName)
{ }
@ -748,9 +748,7 @@ nsPerformance::IsEnabled(JSContext* aCx, JSObject* aGlobal)
RefPtr<PrefEnabledRunnable> runnable =
new PrefEnabledRunnable(workerPrivate,
NS_LITERAL_CSTRING("dom.enable_user_timing"));
runnable->Dispatch(workerPrivate->GetJSContext());
return runnable->IsEnabled();
return runnable->Dispatch() && runnable->IsEnabled();
}
/* static */ bool
@ -767,9 +765,8 @@ nsPerformance::IsObserverEnabled(JSContext* aCx, JSObject* aGlobal)
RefPtr<PrefEnabledRunnable> runnable =
new PrefEnabledRunnable(workerPrivate,
NS_LITERAL_CSTRING("dom.enable_performance_observer"));
runnable->Dispatch(workerPrivate->GetJSContext());
return runnable->IsEnabled();
return runnable->Dispatch() && runnable->IsEnabled();
}
void

View File

@ -57,21 +57,18 @@
#include "mozilla/dom/SRICheck.h"
#include "nsIScriptError.h"
static PRLogModuleInfo* gCspPRLog;
static PRLogModuleInfo*
GetSriLog()
{
static PRLogModuleInfo *gSriPRLog;
if (!gSriPRLog) {
gSriPRLog = PR_NewLogModule("SRI");
}
return gSriPRLog;
}
using namespace mozilla;
using namespace mozilla::dom;
static LazyLogModule gCspPRLog("CSP");
static LogModule*
GetSriLog()
{
static LazyLogModule gSriPRLog("SRI");
return gSriPRLog;
}
// The nsScriptLoadRequest is passed as the context to necko, and thus
// it needs to be threadsafe. Necko won't do anything with this
// context, but it will AddRef and Release it on other threads.
@ -120,9 +117,6 @@ nsScriptLoader::nsScriptLoader(nsIDocument *aDocument)
mDocumentParsingDone(false),
mBlockingDOMContentLoaded(false)
{
// enable logging for CSP
if (!gCspPRLog)
gCspPRLog = PR_NewLogModule("CSP");
}
nsScriptLoader::~nsScriptLoader()

View File

@ -31,19 +31,16 @@
#include "nsStyleUtil.h"
#include "nsQueryObject.h"
static PRLogModuleInfo*
GetSriLog()
{
static PRLogModuleInfo *gSriPRLog;
if (!gSriPRLog) {
gSriPRLog = PR_NewLogModule("SRI");
}
return gSriPRLog;
}
using namespace mozilla;
using namespace mozilla::dom;
static LogModule*
GetSriLog()
{
static LazyLogModule gSriPRLog("SRI");
return gSriPRLog;
}
nsStyleLinkElement::nsStyleLinkElement()
: mDontLoadStyle(false)
, mUpdatesEnabled(true)

View File

@ -92,6 +92,17 @@ function testCopyPaste (isXHTML) {
transferable.getTransferData(mime, data, {}) ;
return data;
}
function testHtmlClipboardValue(mime, expected) {
// For Windows, navigator.platform returns "Win32".
var expectedValue = expected;
if (navigator.platform.indexOf("Win") >= 0) {
// Windows has extra content.
var expectedValue = "<html><body>\n<!--StartFragment-->" +
expected.replace(/\n/g, '\n') +
"<!--EndFragment-->\n</body>\n</html>";
}
testClipboardValue(mime, expectedValue);
}
function testClipboardValue(mime, expected) {
if (suppressHTMLCheck && mime == "text/html")
return null;
@ -133,37 +144,37 @@ function testCopyPaste (isXHTML) {
testSelectionToString("This is a draggable bit of text.");
testClipboardValue("text/unicode",
"This is a draggable bit of text.");
testClipboardValue("text/html",
testHtmlClipboardValue("text/html",
"<div id=\"draggable\" title=\"title to have a long HTML line\">This is a <em>draggable</em> bit of text.</div>");
testPasteText("This is a draggable bit of text.");
copyChildrenToClipboard("alist");
testSelectionToString(" bla\n\n foo\n bar\n\n");
testClipboardValue("text/unicode", " bla\n\n foo\n bar\n\n");
testClipboardValue("text/html", "<div id=\"alist\">\n bla\n <ul>\n <li>foo</li>\n \n <li>bar</li>\n </ul>\n </div>");
testHtmlClipboardValue("text/html", "<div id=\"alist\">\n bla\n <ul>\n <li>foo</li>\n \n <li>bar</li>\n </ul>\n </div>");
testPasteText(" bla\n\n foo\n bar\n\n");
copyChildrenToClipboard("blist");
testSelectionToString(" mozilla\n\n foo\n bar\n\n");
testClipboardValue("text/unicode", " mozilla\n\n foo\n bar\n\n");
testClipboardValue("text/html", "<div id=\"blist\">\n mozilla\n <ol>\n <li>foo</li>\n \n <li>bar</li>\n </ol>\n </div>");
testHtmlClipboardValue("text/html", "<div id=\"blist\">\n mozilla\n <ol>\n <li>foo</li>\n \n <li>bar</li>\n </ol>\n </div>");
testPasteText(" mozilla\n\n foo\n bar\n\n");
copyChildrenToClipboard("clist");
testSelectionToString(" mzla\n\n foo\n bazzinga!\n bar\n\n");
testClipboardValue("text/unicode", " mzla\n\n foo\n bazzinga!\n bar\n\n");
testClipboardValue("text/html", "<div id=\"clist\">\n mzla\n <ul>\n <li>foo<ul>\n <li>bazzinga!</li>\n </ul></li>\n \n <li>bar</li>\n </ul>\n </div>");
testHtmlClipboardValue("text/html", "<div id=\"clist\">\n mzla\n <ul>\n <li>foo<ul>\n <li>bazzinga!</li>\n </ul></li>\n \n <li>bar</li>\n </ul>\n </div>");
testPasteText(" mzla\n\n foo\n bazzinga!\n bar\n\n");
copyChildrenToClipboard("div4");
testSelectionToString(" Tt t t ");
testClipboardValue("text/unicode", " Tt t t ");
if (isXHTML) {
testClipboardValue("text/html", "<div id=\"div4\">\n T<textarea xmlns=\"http://www.w3.org/1999/xhtml\">t t t</textarea>\n</div>");
testHtmlClipboardValue("text/html", "<div id=\"div4\">\n T<textarea xmlns=\"http://www.w3.org/1999/xhtml\">t t t</textarea>\n</div>");
testInnerHTML("div4", "\n T<textarea xmlns=\"http://www.w3.org/1999/xhtml\">t t t</textarea>\n");
}
else {
testClipboardValue("text/html", "<div id=\"div4\">\n T<textarea>t t t</textarea>\n</div>");
testHtmlClipboardValue("text/html", "<div id=\"div4\">\n T<textarea>t t t</textarea>\n</div>");
testInnerHTML("div4", "\n T<textarea>t t t</textarea>\n");
}
testPasteText(" Tt t t ");
@ -172,11 +183,11 @@ function testCopyPaste (isXHTML) {
testSelectionToString(" T ");
testClipboardValue("text/unicode", " T ");
if (isXHTML) {
testClipboardValue("text/html", "<div id=\"div5\">\n T<textarea xmlns=\"http://www.w3.org/1999/xhtml\"> </textarea>\n</div>");
testHtmlClipboardValue("text/html", "<div id=\"div5\">\n T<textarea xmlns=\"http://www.w3.org/1999/xhtml\"> </textarea>\n</div>");
testInnerHTML("div5", "\n T<textarea xmlns=\"http://www.w3.org/1999/xhtml\"> </textarea>\n");
}
else {
testClipboardValue("text/html", "<div id=\"div5\">\n T<textarea> </textarea>\n</div>");
testHtmlClipboardValue("text/html", "<div id=\"div5\">\n T<textarea> </textarea>\n</div>");
testInnerHTML("div5", "\n T<textarea> </textarea>\n");
}
testPasteText(" T ");
@ -214,7 +225,7 @@ if (false) {
copyRangeToClipboard($("div9").childNodes[0],0, $("div9").childNodes[0],4,suppressUnicodeCheckIfHidden);
testSelectionToString("div9");
testClipboardValue("text/unicode", "div9");
testClipboardValue("text/html", "div9");
testHtmlClipboardValue("text/html", "div9");
testInnerHTML("div9", "div9");
copyToClipboard($("div10"), suppressUnicodeCheckIfHidden);
@ -357,7 +368,7 @@ if (false) {
copyChildrenToClipboard("div13");
testSelectionToString("__");
testClipboardValue("text/unicode", "__");
testClipboardValue("text/html", "<div id=\"div13\">__</div>");
testHtmlClipboardValue("text/html", "<div id=\"div13\">__</div>");
testPasteText("__");
// ============ converting cell boundaries to tabs in tables
@ -370,7 +381,7 @@ if (false) {
copyRangeToClipboard($("tr2"),0,$("tr3"),0);
testClipboardValue("text/unicode", "1\t2\n3\t4\n");
testClipboardValue("text/html", '<table><tbody><tr id="tr2"><tr id="tr2"><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr><tr id="tr3"></tr></tr></tbody></table>');
testHtmlClipboardValue("text/html", '<table><tbody><tr id="tr2"><tr id="tr2"><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr><tr id="tr3"></tr></tr></tbody></table>');
// ============ spanning multiple rows in multi-range selection
@ -379,20 +390,20 @@ if (false) {
addRange($("tr3"),0,$("tr3"),2);
copySelectionToClipboard();
testClipboardValue("text/unicode", "1\t2\n5\t6");
testClipboardValue("text/html", '<table><tbody><tr id="tr2"><td>1</td><td>2</td></tr><tr id="tr3"><td>5</td><td>6</td></tr></tbody></table>');
testHtmlClipboardValue("text/html", '<table><tbody><tr id="tr2"><td>1</td><td>2</td></tr><tr id="tr3"><td>5</td><td>6</td></tr></tbody></table>');
}
// ============ manipulating Selection in oncopy
copyRangeToClipboard($("div11").childNodes[0],0, $("div11").childNodes[1],2);
testClipboardValue("text/unicode", "Xdiv11");
testClipboardValue("text/html", "<div><p>X<span>div</span>11</p></div>");
testHtmlClipboardValue("text/html", "<div><p>X<span>div</span>11</p></div>");
setTimeout(function(){testSelectionToString("div11")},0);
setTimeout(function(){
copyRangeToClipboard($("div12").childNodes[0],0, $("div12").childNodes[1],2);
testClipboardValue("text/unicode", "Xdiv12");
testClipboardValue("text/html", "<div><p>X<span>div</span>12</p></div>");
testHtmlClipboardValue("text/html", "<div><p>X<span>div</span>12</p></div>");
setTimeout(function(){
testSelectionToString("div12");
setTimeout(SimpleTest.finish,0);

View File

@ -67,6 +67,14 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=816298
transferable.getTransferData(mime, data, {}) ;
return SpecialPowers.wrap(data);
}
function testHtmlClipboardValue(mime, expected, test) {
var expectedValue = expected;
// For Windows, navigator.platform returns "Win32".
if (navigator.platform.indexOf("Win") >= 0) {
expectedValue = "<html><body>\n<!--StartFragment-->" + expected + "<!--EndFragment-->\n</body>\n</html>";
}
testClipboardValue(mime, expectedValue, test);
}
function testClipboardValue(mime, expected, test) {
var data = getClipboardData(mime);
is (data.value == null ? data.value :
@ -140,7 +148,7 @@ for (var i = 0; i < originalStrings.length; i++) {
var id = 'test' + i;
copyChildrenToClipboard(id);
is(window.getSelection().toString(), originalStrings[i], id + ' Selection.toString()');
testClipboardValue("text/html", clipboardHTML[i], id);
testHtmlClipboardValue("text/html", clipboardHTML[i], id);
testClipboardValue("text/unicode", clipboardUnicode[i], id);
testInnerHTML(id, innerHTMLStrings[i]);
testPasteText(textareaStrings[i], id + '.innerHTML');

View File

@ -71,7 +71,11 @@ function testCopyImage () {
// Is the text/uncodie data correct ?
testClipboardValue('text/unicode', 'about:logo');
// Is the text/html data correct ?
testClipboardValue('text/html', '<img id="logo" src="about:logo">');
var expected = '<img id="logo" src="about:logo">';
if (navigator.platform.indexOf("Win") >= 0) {
expected = "<html><body>\n<!--StartFragment-->" + expected + "<!--EndFragment-->\n</body>\n</html>";
}
testClipboardValue('text/html', expected);
SimpleTest.finish();
}

View File

@ -19,8 +19,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=887836
</div>
<pre id="test">
</pre>
<a href="http://www.example.net?a=b&c=d" id="anchor">foobar</a>
<area href="http://www.example.net?a=b&c=d" id="area">foobar</area>
<script type="application/javascript">
/** Test for Bug 887836 **/
@ -127,20 +125,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=887836
runTest();
}
function testElement(e) {
ok(e, 'element exists');
ok(e.searchParams, "e.searchParams exists!");
ok(e.searchParams.has('a'), "e.searchParams.has('a')");
is(e.searchParams.get('a'), 'b', "e.searchParams.get('a')");
ok(e.searchParams.has('c'), "e.searchParams.has('c')");
is(e.searchParams.get('c'), 'd', "e.searchParams.get('c')");
e.searchParams.set('e', 'f');
ok(e.href.indexOf('e=f') != 1, 'e is right');
runTest();
}
function testEncoding() {
var encoding = [ [ '1', '1' ],
[ 'a b', 'a+b' ],
@ -319,8 +303,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=887836
testCopyURLSearchParams,
testParserURLSearchParams,
testURL,
function() { testElement(document.getElementById('anchor')) },
function() { testElement(document.getElementById('area')) },
testEncoding,
testOrdering,
testDelete,

View File

@ -1549,7 +1549,7 @@ XrayResolveOwnProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
// For non-global instance Xrays there are no other properties, so return
// here for them.
if (type != eGlobalInstance || !GlobalPropertiesAreOwn()) {
if (type != eGlobalInstance) {
return true;
}
} else if (type == eInterface) {
@ -1572,7 +1572,7 @@ XrayResolveOwnProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
// The properties for globals live on the instance, so return here as there
// are no properties on their interface prototype object.
if (type == eGlobalInterfacePrototype && GlobalPropertiesAreOwn()) {
if (type == eGlobalInterfacePrototype) {
return true;
}
}
@ -1659,14 +1659,14 @@ XrayOwnPropertyKeys(JSContext* cx, JS::Handle<JSObject*> wrapper,
if (IsInstance(type)) {
ADD_KEYS_IF_DEFINED(unforgeableMethod);
ADD_KEYS_IF_DEFINED(unforgeableAttribute);
if (type == eGlobalInstance && GlobalPropertiesAreOwn()) {
if (type == eGlobalInstance) {
ADD_KEYS_IF_DEFINED(method);
ADD_KEYS_IF_DEFINED(attribute);
}
} else if (type == eInterface) {
ADD_KEYS_IF_DEFINED(staticMethod);
ADD_KEYS_IF_DEFINED(staticAttribute);
} else if (type != eGlobalInterfacePrototype || !GlobalPropertiesAreOwn()) {
} else if (type != eGlobalInterfacePrototype) {
MOZ_ASSERT(IsInterfacePrototype(type));
ADD_KEYS_IF_DEFINED(method);
ADD_KEYS_IF_DEFINED(attribute);
@ -1757,7 +1757,7 @@ XrayOwnPropertyKeys(JSContext* cx, JS::Handle<JSObject*> wrapper,
}
}
return (type == eGlobalInterfacePrototype && GlobalPropertiesAreOwn()) ||
return type == eGlobalInterfacePrototype ||
XrayOwnNativePropertyKeys(cx, wrapper, nativePropertyHooks, type,
obj, flags, props);
}

View File

@ -3154,15 +3154,6 @@ ConvertExceptionToPromise(JSContext* cx,
JSObject* promiseScope,
JS::MutableHandle<JS::Value> rval);
// While we wait for the outcome of spec discussions on whether properties for
// DOM global objects live on the object or the prototype, we supply this one
// place to switch the behaviour, so we can easily turn this off on branches.
inline bool
GlobalPropertiesAreOwn()
{
return true;
}
#ifdef DEBUG
void
AssertReturnTypeMatchesJitinfo(const JSJitInfo* aJitinfo,

View File

@ -742,10 +742,6 @@ DOMInterfaces = {
'implicitJSContext': [ 'createSession']
},
'MediaKeyStatusMap' : {
'implicitJSContext': [ 'size', 'get', 'has' ]
},
'MediaStream': {
'headerFile': 'DOMMediaStream.h',
'nativeType': 'mozilla::DOMMediaStream'

View File

@ -2822,14 +2822,10 @@ class CGCreateInterfaceObjectsMethod(CGAbstractMethod):
isGlobal = self.descriptor.isGlobal() is not None
if not isGlobal and self.properties.hasNonChromeOnly():
properties = "&sNativeProperties"
elif self.properties.hasNonChromeOnly():
properties = "!GlobalPropertiesAreOwn() ? &sNativeProperties : nullptr"
else:
properties = "nullptr"
if not isGlobal and self.properties.hasChromeOnly():
chromeProperties = "nsContentUtils::ThreadsafeIsCallerChrome() ? &sChromeOnlyNativeProperties : nullptr"
elif self.properties.hasChromeOnly():
chromeProperties = "!GlobalPropertiesAreOwn() && nsContentUtils::ThreadsafeIsCallerChrome() ? &sChromeOnlyNativeProperties : nullptr"
else:
chromeProperties = "nullptr"
@ -3687,11 +3683,11 @@ class CGWrapGlobalMethod(CGAbstractMethod):
def definition_body(self):
if self.properties.hasNonChromeOnly():
properties = "GlobalPropertiesAreOwn() ? &sNativeProperties : nullptr"
properties = "&sNativeProperties"
else:
properties = "nullptr"
if self.properties.hasChromeOnly():
chromeProperties = "GlobalPropertiesAreOwn() && nsContentUtils::ThreadsafeIsCallerChrome() ? &sChromeOnlyNativeProperties : nullptr"
chromeProperties = "nsContentUtils::ThreadsafeIsCallerChrome() ? &sChromeOnlyNativeProperties : nullptr"
else:
chromeProperties = "nullptr"

View File

@ -388,7 +388,7 @@ BroadcastChannel::Constructor(const GlobalObject& aGlobal,
RefPtr<InitializeRunnable> runnable =
new InitializeRunnable(workerPrivate, origin, principalInfo,
privateBrowsing, aRv);
runnable->Dispatch(cx);
runnable->Dispatch(aRv);
}
if (aRv.Failed()) {

View File

@ -9,7 +9,7 @@
#include "mozilla/Logging.h"
extern PRLogModuleInfo* GetCameraLog();
extern mozilla::LogModule* GetCameraLog();
#define DOM_CAMERA_LOG( type, ... ) MOZ_LOG(GetCameraLog(), (mozilla::LogLevel)type, ( __VA_ARGS__ ))
#define DOM_CAMERA_LOGA( ... ) DOM_CAMERA_LOG( mozilla::LogLevel::Error, __VA_ARGS__ )

View File

@ -42,13 +42,10 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(nsDOMCameraManager)
* Set the NSPR_LOG_MODULES environment variable to enable logging
* in a debug build, e.g. NSPR_LOG_MODULES=Camera:5
*/
PRLogModuleInfo*
LogModule*
GetCameraLog()
{
static PRLogModuleInfo *sLog;
if (!sLog) {
sLog = PR_NewLogModule("Camera");
}
static LazyLogModule sLog("Camera");
return sLog;
}

View File

@ -273,8 +273,16 @@ public:
} else {
mode = ExtendMode::REPEAT;
}
Filter filter;
if (state.imageSmoothingEnabled) {
filter = Filter::GOOD;
} else {
filter = Filter::POINT;
}
mPattern.InitSurfacePattern(state.patternStyles[aStyle]->mSurface, mode,
state.patternStyles[aStyle]->mTransform);
state.patternStyles[aStyle]->mTransform, filter);
}
return *mPattern.GetPattern();

View File

@ -679,7 +679,7 @@ ImageBitmap::CreateInternal(nsIGlobalObject* aGlobal, ImageData& aImageData,
aCropRect,
aRv,
getter_AddRefs(data));
task->Dispatch(GetCurrentThreadWorkerPrivate()->GetJSContext());
task->Dispatch(aRv);
}
if (NS_WARN_IF(aRv.Failed())) {
@ -1023,7 +1023,7 @@ class CreateImageBitmapFromBlobWorkerTask final : public WorkerSameThreadRunnabl
RefPtr<layers::Image> image = DecodeAndCropBlob(mBlob, mCropRect, mError);
if (NS_WARN_IF(mError.Failed())) {
return false;
return true;
}
image.forget(mImage);
@ -1062,9 +1062,10 @@ private:
RefPtr<DecodeBlobInMainThreadSyncTask> task =
new DecodeBlobInMainThreadSyncTask(mWorkerPrivate, *mBlob, mCropRect,
rv, getter_AddRefs(data));
task->Dispatch(mWorkerPrivate->GetJSContext()); // This is a synchronous call.
task->Dispatch(rv); // This is a synchronous call.
if (NS_WARN_IF(rv.Failed())) {
// XXXbz does this really make sense if we're shutting down? Ah, well.
mPromise->MaybeReject(rv);
return nullptr;
}

View File

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script>
function boom() {
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d');
ctx.shadowColor = "green";
ctx.rotate(0.9923);
ctx.transform(6, 0.13807760834183488, 256, -0.39007851257689263, 0.5767177072299453, 64);
ctx.transform(0.61, 0.08697788582345888, 6, 6, 64, 128);
ctx.scale(0.36690500480283633, 6);
ctx.shadowOffsetY = -1.7976931348623157e+308;
ctx.fillText("A",32,0.848476537933684);
}
</script>
</head>
<body onload="boom();"></body>
</html>

View File

@ -23,5 +23,6 @@ load 1099143-1.html
load 1161277-1.html
load 1183363.html
load 1190705.html
load 1223740-1.html
load 1225381-1.html
load texImage2D.html

View File

@ -161,6 +161,7 @@ skip-if = toolkit != 'cocoa'
skip-if = toolkit != 'cocoa'
[test_2d.drawImage.zerocanvas.html]
[test_2d.fill.winding.html]
[test_2d.fill.pattern.imageSmoothingEnabled.html]
# These tests do not pass on any platform; Quartz backend won't pass them
# because we fall back to pixman when one circle doesn't contain the other.
# See bug 512647.

View File

@ -0,0 +1,81 @@
<!DOCTYPE HTML>
<title>Canvas test: 2d.fill.pattern.imageSmoothingEnabled</title>
<!-- Testing: That imageSmoothingEnabled is taken into account when doing pattern fills-->
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" href="/tests/SimpleTest/test.css">
<body>
<canvas id="c" width="128" height="128"><p class="fallback">FAIL (fallback content)</p></canvas>
<img id="img">
<script>
function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
var pixel = ctx.getImageData(x, y, 1, 1);
var pr = pixel.data[0],
pg = pixel.data[1],
pb = pixel.data[2],
pa = pixel.data[3];
ok(r-d <= pr && pr <= r+d &&
g-d <= pg && pg <= g+d &&
b-d <= pb && pb <= b+d &&
a-d <= pa && pa <= a+d,
"pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
}
function isNotPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
var pixel = ctx.getImageData(x, y, 1, 1);
var pr = pixel.data[0],
pg = pixel.data[1],
pb = pixel.data[2],
pa = pixel.data[3];
ok(!(r-d <= pr && pr <= r+d &&
g-d <= pg && pg <= g+d &&
b-d <= pb && pb <= b+d &&
a-d <= pa && pa <= a+d),
"pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; did not expect "+colour+" +/- "+d);
}
SimpleTest.waitForExplicitFinish();
addLoadEvent(function () {
var canvas = document.getElementById('c');
var ctx = canvas.getContext('2d');
var img = document.getElementById("img");
img.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==";
img.onload = function () {
ctx.mozImageSmoothingEnabled = false;
ctx.save();
ctx.fillStyle = "rgb(127, 127, 127);";
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.scale(16, 16);
ctx.fillStyle = ctx.createPattern(img, 'no-repeat');
ctx.fillRect(0, 0, 8, 8);
ctx.restore();
// Check for nearest filtering.
isPixel(ctx, 0,0, 0,0,0,255, "0,0", "0,0,0,255", 0);
isPixel(ctx, 14,14, 0,0,0,255, "14,14", "0,0,0,255", 0);
isPixel(ctx, 15,15, 0,0,0,255, "15,15", "0,0,0,255", 0);
isPixel(ctx, 16,16, 255,0,0,255, "16,16", "255,0,0,255", 0);
ctx.mozImageSmoothingEnabled = true;
ctx.save();
ctx.fillStyle = "rgb(127, 127, 127);";
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.scale(16, 16);
ctx.fillStyle = ctx.createPattern(img, 'no-repeat');
ctx.fillRect(0, 0, 8, 8);
ctx.restore();
// Check that nearest filtering is not happening.
isPixel(ctx, 0,0, 0,0,0,255, "0,0", "0,0,0,255", 0);
isNotPixel(ctx, 14,14, 0,0,0,255, "14,14", "0,0,0,255", 0);
isNotPixel(ctx, 15,15, 0,0,0,255, "15,15", "0,0,0,255", 0);
isNotPixel(ctx, 16,16, 255,0,0,255, "16,16", "255,0,0,255", 0);
isPixel(ctx, 32,32, 255,0,0,255, "32,32", "255,0,0,255", 0);
SimpleTest.finish();
}
});
</script>

View File

@ -1237,7 +1237,7 @@ DataTransfer::CacheExternalDragFormats()
// there isn't a way to get a list of the formats that might be available on
// all platforms, so just check for the types that can actually be imported
// XXXndeakin there are some other formats but those are platform specific.
const char* formats[] = { kFileMime, kHTMLMime, kURLMime, kURLDataMime, kUnicodeMime };
const char* formats[] = { kFileMime, kHTMLMime, kRTFMime, kURLMime, kURLDataMime, kUnicodeMime };
uint32_t count;
dragSession->GetNumDropItems(&count);
@ -1279,7 +1279,7 @@ DataTransfer::CacheExternalClipboardFormats()
// there isn't a way to get a list of the formats that might be available on
// all platforms, so just check for the types that can actually be imported
const char* formats[] = { kFileMime, kHTMLMime, kURLMime, kURLDataMime, kUnicodeMime };
const char* formats[] = { kFileMime, kHTMLMime, kRTFMime, kURLMime, kURLDataMime, kUnicodeMime };
for (uint32_t f = 0; f < mozilla::ArrayLength(formats); ++f) {
// check each format one at a time
@ -1361,7 +1361,14 @@ DataTransfer::FillInExternalData(TransferItem& aItem, uint32_t aIndex)
variant->SetAsAString(str);
}
else {
variant->SetAsISupports(data);
nsCOMPtr<nsISupportsCString> supportscstr = do_QueryInterface(data);
if (supportscstr) {
nsAutoCString str;
supportscstr->GetData(str);
variant->SetAsACString(str);
} else {
variant->SetAsISupports(data);
}
}
aItem.mData = variant;

View File

@ -288,6 +288,7 @@ EventStateManager::DeltaAccumulator*
EventStateManager::EventStateManager()
: mLockCursor(0)
, mLastFrameConsumedSetCursor(false)
, mPreLockPoint(0,0)
, mCurrentTarget(nullptr)
// init d&d gesture state machine variables
@ -3527,8 +3528,19 @@ EventStateManager::UpdateCursor(nsPresContext* aPresContext,
nsIFrame::Cursor framecursor;
nsPoint pt = nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent,
aTargetFrame);
if (NS_FAILED(aTargetFrame->GetCursor(pt, framecursor)))
return; // don't update the cursor if we failed to get it from the frame see bug 118877
// Avoid setting cursor when the mouse is over a windowless pluign.
if (NS_FAILED(aTargetFrame->GetCursor(pt, framecursor))) {
if (XRE_IsContentProcess()) {
mLastFrameConsumedSetCursor = true;
}
return;
}
// Make sure cursors get reset after the mouse leaves a
// windowless plugin frame.
if (mLastFrameConsumedSetCursor) {
ClearCachedWidgetCursor(aTargetFrame);
mLastFrameConsumedSetCursor = false;
}
cursor = framecursor.mCursor;
container = framecursor.mContainer;
haveHotspot = framecursor.mHaveHotspot;

View File

@ -861,6 +861,7 @@ private:
bool dispatchedToContentProcess);
int32_t mLockCursor;
bool mLastFrameConsumedSetCursor;
// Last mouse event refPoint (the offset from the widget's origin in
// device pixels) when mouse was locked, used to restore mouse position

View File

@ -40,7 +40,7 @@ namespace mozilla {
using namespace widget;
PRLogModuleInfo* sIMECOLog = nullptr;
LazyLogModule sIMECOLog("IMEContentObserver");
static const char*
ToChar(bool aBool)
@ -207,9 +207,6 @@ IMEContentObserver::IMEContentObserver()
#ifdef DEBUG
mTextChangeData.Test();
#endif
if (!sIMECOLog) {
sIMECOLog = PR_NewLogModule("IMEContentObserver");
}
}
void

View File

@ -57,7 +57,7 @@ using namespace widget;
* for debug, log the information with LogLevel::Debug. In this case, the log
* should start with "ISM: <method name>(),".
*/
PRLogModuleInfo* sISMLog = nullptr;
LazyLogModule sISMLog("IMEStateManager");
static const char*
GetBoolName(bool aBool)
@ -175,10 +175,6 @@ bool IMEStateManager::sRemoteHasFocus = false;
void
IMEStateManager::Init()
{
if (!sISMLog) {
sISMLog = PR_NewLogModule("IMEStateManager");
}
Preferences::AddBoolVarCache(
&sCheckForIMEUnawareWebApps,
"intl.ime.hack.on_ime_unaware_apps.fire_key_events_for_composition",

View File

@ -976,8 +976,14 @@ FetchBody<Derived>::ContinueConsumeBody(nsresult aStatus, uint32_t aResultLength
// FetchBody on the main thread.
RefPtr<CancelPumpRunnable<Derived>> r =
new CancelPumpRunnable<Derived>(this);
if (!r->Dispatch(mWorkerPrivate->GetJSContext())) {
ErrorResult rv;
r->Dispatch(rv);
if (rv.Failed()) {
NS_WARNING("Could not dispatch CancelPumpRunnable. Nothing we can do here");
// None of our callers are callled directly from JS, so there is no
// point in trying to propagate this failure out of here. And
// localPromise is already rejected. Just suppress the failure.
rv.SuppressException();
}
}
}

View File

@ -29,6 +29,7 @@
#include "nsPrintfCString.h"
#include "nsStreamUtils.h"
#include "nsStringStream.h"
#include "nsHttpChannel.h"
#include "mozilla/dom/File.h"
#include "mozilla/dom/workers/Workers.h"
@ -51,7 +52,6 @@ FetchDriver::FetchDriver(InternalRequest* aRequest, nsIPrincipal* aPrincipal,
, mLoadGroup(aLoadGroup)
, mRequest(aRequest)
, mHasBeenCrossSite(false)
, mFoundOpaqueRedirect(false)
, mResponseAvailableCalled(false)
, mFetchCalled(false)
{
@ -236,6 +236,10 @@ FetchDriver::HttpFetch()
return NS_ERROR_UNEXPECTED;
}
if (mRequest->GetRedirectMode() != RequestRedirect::Follow) {
secFlags |= nsILoadInfo::SEC_DONT_FOLLOW_REDIRECTS;
}
// From here on we create a channel and set its properties with the
// information from the InternalRequest. This is an implementation detail.
MOZ_ASSERT(mLoadGroup);
@ -441,7 +445,9 @@ FetchDriver::IsUnsafeRequest()
}
already_AddRefed<InternalResponse>
FetchDriver::BeginAndGetFilteredResponse(InternalResponse* aResponse, nsIURI* aFinalURI)
FetchDriver::BeginAndGetFilteredResponse(InternalResponse* aResponse,
nsIURI* aFinalURI,
bool aFoundOpaqueRedirect)
{
MOZ_ASSERT(aResponse);
nsAutoCString reqURL;
@ -454,7 +460,7 @@ FetchDriver::BeginAndGetFilteredResponse(InternalResponse* aResponse, nsIURI* aF
MOZ_ASSERT(NS_SUCCEEDED(rv));
RefPtr<InternalResponse> filteredResponse;
if (mFoundOpaqueRedirect) {
if (aFoundOpaqueRedirect) {
filteredResponse = aResponse->OpaqueRedirectResponse();
} else {
switch (mRequest->GetResponseTainting()) {
@ -551,10 +557,22 @@ FetchDriver::OnStartRequest(nsIRequest* aRequest,
nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aRequest);
nsCOMPtr<nsIJARChannel> jarChannel = do_QueryInterface(aRequest);
bool foundOpaqueRedirect = false;
if (httpChannel) {
uint32_t responseStatus;
httpChannel->GetResponseStatus(&responseStatus);
if (mozilla::net::nsHttpChannel::IsRedirectStatus(responseStatus)) {
if (mRequest->GetRedirectMode() == RequestRedirect::Error) {
FailWithNetworkError();
return NS_BINDING_FAILED;
}
if (mRequest->GetRedirectMode() == RequestRedirect::Manual) {
foundOpaqueRedirect = true;
}
}
nsAutoCString statusText;
httpChannel->GetResponseStatusText(statusText);
@ -660,7 +678,8 @@ FetchDriver::OnStartRequest(nsIRequest* aRequest,
// Resolves fetch() promise which may trigger code running in a worker. Make
// sure the Response is fully initialized before calling this.
mResponse = BeginAndGetFilteredResponse(response, channelURI);
mResponse = BeginAndGetFilteredResponse(response, channelURI,
foundOpaqueRedirect);
nsCOMPtr<nsIEventTarget> sts = do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID, &rv);
if (NS_WARN_IF(NS_FAILED(rv))) {
@ -743,6 +762,12 @@ FetchDriver::AsyncOnChannelRedirect(nsIChannel* aOldChannel,
return NS_OK;
}
// We should only ever get here if we use a "follow" redirect policy,
// or if if we set an "error" policy as a result of a CORS policy.
MOZ_ASSERT(mRequest->GetRedirectMode() == RequestRedirect::Follow ||
(mRequest->GetRedirectMode() == RequestRedirect::Error &&
IsUnsafeRequest()));
// HTTP Fetch step 5, "redirect status", step 1
if (NS_WARN_IF(mRequest->GetRedirectMode() == RequestRedirect::Error)) {
aOldChannel->Cancel(NS_BINDING_FAILED);
@ -763,33 +788,10 @@ FetchDriver::AsyncOnChannelRedirect(nsIChannel* aOldChannel,
// HTTP Fetch step 5, "redirect status", step 10 requires us to halt the
// redirect, but successfully return an opaqueredirect Response to the
// initiating Fetch.
if (mRequest->GetRedirectMode() == RequestRedirect::Manual) {
// Ideally we would simply not cancel the old channel and allow it to
// be processed as normal. Unfortunately this is quite fragile and
// other redirect handlers can easily break it for certain use cases.
//
// For example, nsCORSListenerProxy cancels vetoed redirect channels.
// The HTTP cache will also error on vetoed redirects when the
// redirect has been previously cached.
//
// Therefore simulate the completion of the channel to produce the
// opaqueredirect Response and then cancel the original channel. This
// will result in OnStartRequest() getting called twice, but the second
// time will be with an error response (from the Cancel) which will
// be ignored.
MOZ_ASSERT(!mFoundOpaqueRedirect);
mFoundOpaqueRedirect = true;
Unused << OnStartRequest(aOldChannel, nullptr);
Unused << OnStopRequest(aOldChannel, nullptr, NS_OK);
aOldChannel->Cancel(NS_BINDING_FAILED);
return NS_BINDING_FAILED;
}
// The following steps are from HTTP Fetch step 5, "redirect status", step 11
// which requires the RequestRedirect to be "follow".
MOZ_ASSERT(mRequest->GetRedirectMode() == RequestRedirect::Follow);
// which requires the RequestRedirect to be "follow". We asserted that we're
// in either "follow" or "error" mode here.
// HTTP Fetch step 5, "redirect status", steps 11.1 and 11.2 block redirecting
// to a URL with credentials in CORS mode. This is implemented in

View File

@ -83,7 +83,6 @@ private:
RefPtr<FetchDriverObserver> mObserver;
nsCOMPtr<nsIDocument> mDocument;
bool mHasBeenCrossSite;
bool mFoundOpaqueRedirect;
DebugOnly<bool> mResponseAvailableCalled;
DebugOnly<bool> mFetchCalled;
@ -100,7 +99,8 @@ private:
// Returns the filtered response sent to the observer.
// Callers who don't have access to a channel can pass null for aFinalURI.
already_AddRefed<InternalResponse>
BeginAndGetFilteredResponse(InternalResponse* aResponse, nsIURI* aFinalURI);
BeginAndGetFilteredResponse(InternalResponse* aResponse, nsIURI* aFinalURI,
bool aFoundOpaqueRedirect);
// Utility since not all cases need to do any post processing of the filtered
// response.
nsresult FailWithNetworkError();

View File

@ -63,13 +63,11 @@ NS_IMPL_CYCLE_COLLECTION_CLASS(HTMLAnchorElement)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(HTMLAnchorElement,
nsGenericHTMLElement)
tmp->Link::Traverse(cb);
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mRelList)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLAnchorElement,
nsGenericHTMLElement)
tmp->Link::Unlink();
NS_IMPL_CYCLE_COLLECTION_UNLINK(mRelList)
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
@ -324,17 +322,13 @@ HTMLAnchorElement::RelList()
NS_IMETHODIMP \
HTMLAnchorElement::Get##_part(nsAString& a##_part) \
{ \
ErrorResult rv; \
Link::Get##_part(a##_part, rv); \
MOZ_ASSERT(!rv.Failed()); \
Link::Get##_part(a##_part); \
return NS_OK; \
} \
NS_IMETHODIMP \
HTMLAnchorElement::Set##_part(const nsAString& a##_part) \
{ \
ErrorResult rv; \
Link::Set##_part(a##_part, rv); \
MOZ_ASSERT(!rv.Failed()); \
Link::Set##_part(a##_part); \
return NS_OK; \
}

View File

@ -89,10 +89,8 @@ public:
virtual bool HasDeferredDNSPrefetchRequest() override;
// WebIDL API
void GetHref(nsAString& aValue, ErrorResult& rv)
{
GetHTMLURIAttr(nsGkAtoms::href, aValue);
}
// The XPCOM GetHref is OK for us
void SetHref(const nsAString& aValue, mozilla::ErrorResult& rv)
{
SetHTMLAttr(nsGkAtoms::href, aValue, rv);
@ -156,8 +154,8 @@ public:
// Link::GetOrigin is OK for us
using Link::GetProtocol;
using Link::SetProtocol;
// Link::GetProtocol is OK for us
// Link::SetProtocol is OK for us
// Link::GetUsername is OK for us
// Link::SetUsername is OK for us
@ -165,23 +163,23 @@ public:
// Link::GetPassword is OK for us
// Link::SetPassword is OK for us
using Link::GetHost;
using Link::SetHost;
// Link::Link::GetHost is OK for us
// Link::Link::SetHost is OK for us
using Link::GetHostname;
using Link::SetHostname;
// Link::Link::GetHostname is OK for us
// Link::Link::SetHostname is OK for us
using Link::GetPort;
using Link::SetPort;
// Link::Link::GetPort is OK for us
// Link::Link::SetPort is OK for us
using Link::GetPathname;
using Link::SetPathname;
// Link::Link::GetPathname is OK for us
// Link::Link::SetPathname is OK for us
using Link::GetSearch;
using Link::SetSearch;
// Link::Link::GetSearch is OK for us
// Link::Link::SetSearch is OK for us
using Link::GetHash;
using Link::SetHash;
// Link::Link::GetHash is OK for us
// Link::Link::SetHash is OK for us
// The XPCOM URI decomposition attributes are fine for us
void GetCoords(DOMString& aValue)
@ -224,9 +222,9 @@ public:
{
SetHTMLAttr(nsGkAtoms::shape, aValue, rv);
}
void Stringify(nsAString& aResult, ErrorResult& aError)
void Stringify(nsAString& aResult)
{
GetHref(aResult, aError);
GetHref(aResult);
}
protected:

View File

@ -40,13 +40,11 @@ NS_IMPL_CYCLE_COLLECTION_CLASS(HTMLAreaElement)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(HTMLAreaElement,
nsGenericHTMLElement)
tmp->Link::Traverse(cb);
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mRelList)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLAreaElement,
nsGenericHTMLElement)
tmp->Link::Unlink();
NS_IMPL_CYCLE_COLLECTION_UNLINK(mRelList)
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
@ -207,17 +205,13 @@ HTMLAreaElement::UnsetAttr(int32_t aNameSpaceID, nsIAtom* aAttribute,
NS_IMETHODIMP \
HTMLAreaElement::Get##_part(nsAString& a##_part) \
{ \
ErrorResult rv; \
Link::Get##_part(a##_part, rv); \
MOZ_ASSERT(!rv.Failed()); \
Link::Get##_part(a##_part); \
return NS_OK; \
} \
NS_IMETHODIMP \
HTMLAreaElement::Set##_part(const nsAString& a##_part) \
{ \
ErrorResult rv; \
Link::Set##_part(a##_part, rv); \
MOZ_ASSERT(!rv.Failed()); \
Link::Set##_part(a##_part); \
return NS_OK; \
}

View File

@ -90,10 +90,7 @@ public:
SetHTMLAttr(nsGkAtoms::shape, aShape, aError);
}
void GetHref(nsAString& aHref, ErrorResult& aError)
{
aError = GetHref(aHref);
}
// The XPCOM GetHref is OK for us
void SetHref(const nsAString& aHref, ErrorResult& aError)
{
aError = SetHref(aHref);
@ -139,8 +136,8 @@ public:
// The Link::GetOrigin is OK for us
using Link::GetProtocol;
using Link::SetProtocol;
// Link::Link::GetProtocol is OK for us
// Link::Link::SetProtocol is OK for us
// The Link::GetUsername is OK for us
// The Link::SetUsername is OK for us
@ -148,23 +145,23 @@ public:
// The Link::GetPassword is OK for us
// The Link::SetPassword is OK for us
using Link::GetHost;
using Link::SetHost;
// Link::Link::GetHost is OK for us
// Link::Link::SetHost is OK for us
using Link::GetHostname;
using Link::SetHostname;
// Link::Link::GetHostname is OK for us
// Link::Link::SetHostname is OK for us
using Link::GetPort;
using Link::SetPort;
// Link::Link::GetPort is OK for us
// Link::Link::SetPort is OK for us
using Link::GetPathname;
using Link::SetPathname;
// Link::Link::GetPathname is OK for us
// Link::Link::SetPathname is OK for us
using Link::GetSearch;
using Link::SetSearch;
// Link::Link::GetSearch is OK for us
// Link::Link::SetSearch is OK for us
using Link::GetHash;
using Link::SetHash;
// Link::Link::GetHash is OK for us
// Link::Link::SetHash is OK for us
// The Link::GetSearchParams is OK for us
@ -178,9 +175,9 @@ public:
SetHTMLBoolAttr(nsGkAtoms::nohref, aValue, aError);
}
void Stringify(nsAString& aResult, ErrorResult& aError)
void Stringify(nsAString& aResult)
{
GetHref(aResult, aError);
GetHref(aResult);
}
protected:

View File

@ -535,12 +535,6 @@ HTMLImageElement::SetAttr(int32_t aNameSpaceID, nsIAtom* aName,
if (aNameSpaceID == kNameSpaceID_None &&
aName == nsGkAtoms::src) {
// This is for dom.disable_image_src_set, which predates "srcset"
// as an attribute. See Bug 773429
if (nsContentUtils::IsImageSrcSetDisabled()) {
return NS_OK;
}
if (InResponsiveMode()) {
if (mResponsiveSelector &&
mResponsiveSelector->Content() == this) {

View File

@ -48,7 +48,6 @@ NS_IMPL_CYCLE_COLLECTION_CLASS(HTMLLinkElement)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(HTMLLinkElement,
nsGenericHTMLElement)
tmp->nsStyleLinkElement::Traverse(cb);
tmp->Link::Traverse(cb);
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mRelList)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mImportLoader)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
@ -56,7 +55,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLLinkElement,
nsGenericHTMLElement)
tmp->nsStyleLinkElement::Unlink();
tmp->Link::Unlink();
NS_IMPL_CYCLE_COLLECTION_UNLINK(mRelList)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mImportLoader)
NS_IMPL_CYCLE_COLLECTION_UNLINK_END

View File

@ -91,8 +91,9 @@
#include <algorithm>
#include <cmath>
static PRLogModuleInfo* gMediaElementLog;
static PRLogModuleInfo* gMediaElementEventsLog;
static mozilla::LazyLogModule gMediaElementLog("nsMediaElement");
static mozilla::LazyLogModule gMediaElementEventsLog("nsMediaElementEvents");
#define LOG(type, msg) MOZ_LOG(gMediaElementLog, type, msg)
#define LOG_EVENT(type, msg) MOZ_LOG(gMediaElementEventsLog, type, msg)
@ -107,12 +108,6 @@ static PRLogModuleInfo* gMediaElementEventsLog;
#include "mozilla/EventStateManager.h"
#if defined(MOZ_B2G) && !defined(MOZ_GRAPHENE)
// This controls the b2g specific of pausing the media element when the
// AudioChannel tells us to mute it.
#define PAUSE_MEDIA_ELEMENT_FROM_AUDIOCHANNEL
#endif
using namespace mozilla::layers;
using mozilla::net::nsMediaFragmentURIParser;
@ -578,6 +573,7 @@ void
HTMLMediaElement::SetSrcObject(DOMMediaStream* aValue)
{
mSrcAttrStream = aValue;
UpdateAudioChannelPlayingState();
DoLoad();
}
@ -602,6 +598,7 @@ void
HTMLMediaElement::SetMozSrcObject(DOMMediaStream* aValue)
{
mSrcAttrStream = aValue;
UpdateAudioChannelPlayingState();
DoLoad();
}
@ -768,6 +765,7 @@ void HTMLMediaElement::AbortExistingLoads()
FireTimeUpdate(false);
}
DispatchAsyncEvent(NS_LITERAL_STRING("emptied"));
UpdateAudioChannelPlayingState();
}
// We may have changed mPaused, mAutoplaying, and other
@ -1711,6 +1709,7 @@ HTMLMediaElement::Pause(ErrorResult& aRv)
// We changed mPaused and mAutoplaying which can affect AddRemoveSelfReference
AddRemoveSelfReference();
UpdateSrcMediaStreamPlaying();
UpdateAudioChannelPlayingState();
if (!oldPaused) {
FireTimeUpdate(false);
@ -2113,13 +2112,6 @@ HTMLMediaElement::HTMLMediaElement(already_AddRefed<mozilla::dom::NodeInfo>& aNo
mFirstFrameLoaded(false),
mDefaultPlaybackStartPosition(0.0)
{
if (!gMediaElementLog) {
gMediaElementLog = PR_NewLogModule("nsMediaElement");
}
if (!gMediaElementEventsLog) {
gMediaElementEventsLog = PR_NewLogModule("nsMediaElementEvents");
}
mAudioChannel = AudioChannelService::GetDefaultAudioChannel();
mPaused.SetOuter(this);
@ -2317,6 +2309,7 @@ HTMLMediaElement::PlayInternal(bool aCallerIsChrome)
AddRemoveSelfReference();
UpdatePreloadAction();
UpdateSrcMediaStreamPlaying();
UpdateAudioChannelPlayingState();
return NS_OK;
}
@ -2897,6 +2890,7 @@ nsresult HTMLMediaElement::FinishDecoderSetup(MediaDecoder* aDecoder,
// We may want to suspend the new stream now.
// This will also do an AddRemoveSelfReference.
NotifyOwnerDocumentActivityChangedInternal();
UpdateAudioChannelPlayingState();
if (!mPaused) {
SetPlayedOrSeeked(true);
@ -3993,6 +3987,7 @@ void HTMLMediaElement::CheckAutoplayDataReady()
// We changed mPaused which can affect AddRemoveSelfReference
AddRemoveSelfReference();
UpdateSrcMediaStreamPlaying();
UpdateAudioChannelPlayingState();
if (mDecoder) {
SetPlayedOrSeeked(true);
@ -4007,13 +4002,13 @@ void HTMLMediaElement::CheckAutoplayDataReady()
}
bool HTMLMediaElement::IsActive()
bool HTMLMediaElement::IsActive() const
{
nsIDocument* ownerDoc = OwnerDoc();
return ownerDoc && ownerDoc->IsActive() && ownerDoc->IsVisible();
}
bool HTMLMediaElement::IsHidden()
bool HTMLMediaElement::IsHidden() const
{
if (mElementInTreeState == ELEMENT_NOT_INTREE_HAD_INTREE) {
return true;
@ -4192,6 +4187,7 @@ void HTMLMediaElement::SuspendOrResumeElement(bool aPauseElement, bool aSuspendE
if (aPauseElement != mPausedForInactiveDocumentOrChannel) {
mPausedForInactiveDocumentOrChannel = aPauseElement;
UpdateSrcMediaStreamPlaying();
UpdateAudioChannelPlayingState();
if (aPauseElement) {
if (mMediaSource) {
ReportMSETelemetry();
@ -4251,15 +4247,12 @@ bool HTMLMediaElement::IsBeingDestroyed()
void HTMLMediaElement::NotifyOwnerDocumentActivityChanged()
{
bool pauseElement = NotifyOwnerDocumentActivityChangedInternal();
if (pauseElement && mAudioChannelAgent
#ifdef PAUSE_MEDIA_ELEMENT_FROM_AUDIOCHANNEL
if (pauseElement && mAudioChannelAgent &&
// On B2G, NotifyOwnerDocumentActivityChangedInternal may return true for
// two reasons: the document no longer being active, or the element being
// paused by the audio channel. However we are only interested in the
// first case here, so we need to filter out the second case.
&& !ComputedMuted()
#endif
) {
(!UseAudioChannelAPI() || !ComputedMuted())) {
// If the element is being paused since we are navigating away from the
// document, notify the audio channel agent.
// Be careful to ignore this event during a docshell frame swap.
@ -4283,15 +4276,13 @@ HTMLMediaElement::NotifyOwnerDocumentActivityChangedInternal()
}
bool pauseElement = !IsActive();
#ifdef PAUSE_MEDIA_ELEMENT_FROM_AUDIOCHANNEL
// Only pause the element when we start playing. If we pause without playing
// audio, the resource loading would be affected unexpectedly. For example,
// the media element is muted by default, but we don't want this behavior
// interrupting the loading process.
if (mAudioChannelAgent) {
if (UseAudioChannelAPI() && mAudioChannelAgent) {
pauseElement |= ComputedMuted();
}
#endif
SuspendOrResumeElement(pauseElement, !IsActive());
@ -4725,9 +4716,10 @@ nsresult HTMLMediaElement::UpdateChannelMuteState(float aVolume, bool aMuted)
}
}
#ifdef PAUSE_MEDIA_ELEMENT_FROM_AUDIOCHANNEL
SuspendOrResumeElement(ComputedMuted(), false);
#endif
if (UseAudioChannelAPI()) {
SuspendOrResumeElement(ComputedMuted(), false);
}
return NS_OK;
}
@ -4761,6 +4753,11 @@ HTMLMediaElement::IsPlayingThroughTheAudioChannel() const
return false;
}
// We should consider any bfcached page or inactive document as non-playing.
if (!IsActive()) {
return false;
}
// A loop always is playing
if (HasAttr(kNameSpaceID_None, nsGkAtoms::loop)) {
return true;
@ -4837,9 +4834,9 @@ NS_IMETHODIMP HTMLMediaElement::WindowVolumeChanged(float aVolume, bool aMuted)
UpdateChannelMuteState(aVolume, aMuted);
#ifdef PAUSE_MEDIA_ELEMENT_FROM_AUDIOCHANNEL
mPaused.SetCanPlay(!aMuted);
#endif
if (UseAudioChannelAPI()) {
mPaused.SetCanPlay(!aMuted);
}
return NS_OK;
}

View File

@ -214,9 +214,9 @@ public:
// suspended the channel.
virtual void NotifySuspendedByCache(bool aIsSuspended) final override;
virtual bool IsActive() final override;
virtual bool IsActive() const final override;
virtual bool IsHidden() final override;
virtual bool IsHidden() const final override;
// In order to create overlayImageContainer to support DOMHwMediaStream.
VideoFrameContainer* GetOverlayImageVideoFrameContainer();

View File

@ -40,7 +40,7 @@
#include "nsThreadUtils.h"
#include "nsVideoFrame.h"
static PRLogModuleInfo* gTrackElementLog;
static mozilla::LazyLogModule gTrackElementLog("nsTrackElement");
#define LOG(type, msg) MOZ_LOG(gTrackElementLog, type, msg)
// Replace the usual NS_IMPL_NS_NEW_HTML_ELEMENT(Track) so
@ -76,9 +76,6 @@ static MOZ_CONSTEXPR const char* kKindTableDefaultString = kKindTable[0].tag;
HTMLTrackElement::HTMLTrackElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
: nsGenericHTMLElement(aNodeInfo)
{
if (!gTrackElementLog) {
gTrackElementLog = PR_NewLogModule("nsTrackElement");
}
}
HTMLTrackElement::~HTMLTrackElement()

View File

@ -182,8 +182,7 @@ nsHTMLDNSPrefetch::CancelPrefetch(Link *aElement,
return NS_ERROR_NOT_AVAILABLE;
nsAutoString hostname;
ErrorResult rv;
aElement->GetHostname(hostname, rv);
aElement->GetHostname(hostname);
return CancelPrefetch(hostname, flags, aReason);
}

View File

@ -20994,80 +20994,33 @@ OpenDatabaseOp::MetadataToSpec(DatabaseSpec& aSpec)
AssertIsOnOwningThread();
MOZ_ASSERT(mMetadata);
class MOZ_STACK_CLASS Helper final
{
DatabaseSpec& mSpec;
ObjectStoreSpec* mCurrentObjectStoreSpec;
aSpec.metadata() = mMetadata->mCommonMetadata;
public:
static void
CopyToSpec(const FullDatabaseMetadata* aMetadata, DatabaseSpec& aSpec)
{
AssertIsOnBackgroundThread();
MOZ_ASSERT(aMetadata);
for (auto objectStoreIter = mMetadata->mObjectStores.ConstIter();
!objectStoreIter.Done();
objectStoreIter.Next()) {
FullObjectStoreMetadata* metadata = objectStoreIter.UserData();
MOZ_ASSERT(objectStoreIter.Key());
MOZ_ASSERT(metadata);
aSpec.metadata() = aMetadata->mCommonMetadata;
// XXX This should really be fallible...
ObjectStoreSpec* objectStoreSpec = aSpec.objectStores().AppendElement();
objectStoreSpec->metadata() = metadata->mCommonMetadata;
Helper helper(aSpec);
aMetadata->mObjectStores.EnumerateRead(Enumerate, &helper);
}
private:
explicit Helper(DatabaseSpec& aSpec)
: mSpec(aSpec)
, mCurrentObjectStoreSpec(nullptr)
{ }
static PLDHashOperator
Enumerate(const uint64_t& aKey,
FullObjectStoreMetadata* aValue,
void* aClosure)
{
MOZ_ASSERT(aKey);
MOZ_ASSERT(aValue);
MOZ_ASSERT(aClosure);
auto* helper = static_cast<Helper*>(aClosure);
MOZ_ASSERT(!helper->mCurrentObjectStoreSpec);
for (auto indexIter = metadata->mIndexes.Iter();
!indexIter.Done();
indexIter.Next()) {
FullIndexMetadata* indexMetadata = indexIter.UserData();
MOZ_ASSERT(indexIter.Key());
MOZ_ASSERT(indexMetadata);
// XXX This should really be fallible...
ObjectStoreSpec* objectStoreSpec =
helper->mSpec.objectStores().AppendElement();
objectStoreSpec->metadata() = aValue->mCommonMetadata;
AutoRestore<ObjectStoreSpec*> ar(helper->mCurrentObjectStoreSpec);
helper->mCurrentObjectStoreSpec = objectStoreSpec;
aValue->mIndexes.EnumerateRead(Enumerate, helper);
return PL_DHASH_NEXT;
IndexMetadata* metadata = objectStoreSpec->indexes().AppendElement();
*metadata = indexMetadata->mCommonMetadata;
}
static PLDHashOperator
Enumerate(const uint64_t& aKey, FullIndexMetadata* aValue, void* aClosure)
{
MOZ_ASSERT(aKey);
MOZ_ASSERT(aValue);
MOZ_ASSERT(aClosure);
auto* helper = static_cast<Helper*>(aClosure);
MOZ_ASSERT(helper->mCurrentObjectStoreSpec);
// XXX This should really be fallible...
IndexMetadata* metadata =
helper->mCurrentObjectStoreSpec->indexes().AppendElement();
*metadata = aValue->mCommonMetadata;
return PL_DHASH_NEXT;
}
};
Helper::CopyToSpec(mMetadata, aSpec);
}
}
#ifdef DEBUG
void
@ -21075,110 +21028,6 @@ OpenDatabaseOp::AssertMetadataConsistency(const FullDatabaseMetadata* aMetadata)
{
AssertIsOnBackgroundThread();
class MOZ_STACK_CLASS Helper final
{
const ObjectStoreTable& mOtherObjectStores;
IndexTable* mCurrentOtherIndexTable;
public:
static void
AssertConsistent(const ObjectStoreTable& aThisObjectStores,
const ObjectStoreTable& aOtherObjectStores)
{
Helper helper(aOtherObjectStores);
aThisObjectStores.EnumerateRead(Enumerate, &helper);
}
private:
explicit Helper(const ObjectStoreTable& aOtherObjectStores)
: mOtherObjectStores(aOtherObjectStores)
, mCurrentOtherIndexTable(nullptr)
{ }
static PLDHashOperator
Enumerate(const uint64_t& /* aKey */,
FullObjectStoreMetadata* aThisObjectStore,
void* aClosure)
{
MOZ_ASSERT(aThisObjectStore);
MOZ_ASSERT(!aThisObjectStore->mDeleted);
MOZ_ASSERT(aClosure);
auto* helper = static_cast<Helper*>(aClosure);
MOZ_ASSERT(!helper->mCurrentOtherIndexTable);
auto* otherObjectStore =
MetadataNameOrIdMatcher<FullObjectStoreMetadata>::Match(
helper->mOtherObjectStores, aThisObjectStore->mCommonMetadata.id());
MOZ_ASSERT(otherObjectStore);
MOZ_ASSERT(aThisObjectStore != otherObjectStore);
MOZ_ASSERT(aThisObjectStore->mCommonMetadata.id() ==
otherObjectStore->mCommonMetadata.id());
MOZ_ASSERT(aThisObjectStore->mCommonMetadata.name() ==
otherObjectStore->mCommonMetadata.name());
MOZ_ASSERT(aThisObjectStore->mCommonMetadata.autoIncrement() ==
otherObjectStore->mCommonMetadata.autoIncrement());
MOZ_ASSERT(aThisObjectStore->mCommonMetadata.keyPath() ==
otherObjectStore->mCommonMetadata.keyPath());
// mNextAutoIncrementId and mComittedAutoIncrementId may be modified
// concurrently with this OpenOp, so it is not possible to assert equality
// here.
MOZ_ASSERT(aThisObjectStore->mNextAutoIncrementId <=
otherObjectStore->mNextAutoIncrementId);
MOZ_ASSERT(aThisObjectStore->mComittedAutoIncrementId <=
otherObjectStore->mComittedAutoIncrementId);
MOZ_ASSERT(!otherObjectStore->mDeleted);
MOZ_ASSERT(aThisObjectStore->mIndexes.Count() ==
otherObjectStore->mIndexes.Count());
AutoRestore<IndexTable*> ar(helper->mCurrentOtherIndexTable);
helper->mCurrentOtherIndexTable = &otherObjectStore->mIndexes;
aThisObjectStore->mIndexes.EnumerateRead(Enumerate, helper);
return PL_DHASH_NEXT;
}
static PLDHashOperator
Enumerate(const uint64_t& /* aKey */,
FullIndexMetadata* aThisIndex,
void* aClosure)
{
MOZ_ASSERT(aThisIndex);
MOZ_ASSERT(!aThisIndex->mDeleted);
MOZ_ASSERT(aClosure);
auto* helper = static_cast<Helper*>(aClosure);
MOZ_ASSERT(helper->mCurrentOtherIndexTable);
auto* otherIndex =
MetadataNameOrIdMatcher<FullIndexMetadata>::Match(
*helper->mCurrentOtherIndexTable, aThisIndex->mCommonMetadata.id());
MOZ_ASSERT(otherIndex);
MOZ_ASSERT(aThisIndex != otherIndex);
MOZ_ASSERT(aThisIndex->mCommonMetadata.id() ==
otherIndex->mCommonMetadata.id());
MOZ_ASSERT(aThisIndex->mCommonMetadata.name() ==
otherIndex->mCommonMetadata.name());
MOZ_ASSERT(aThisIndex->mCommonMetadata.keyPath() ==
otherIndex->mCommonMetadata.keyPath());
MOZ_ASSERT(aThisIndex->mCommonMetadata.unique() ==
otherIndex->mCommonMetadata.unique());
MOZ_ASSERT(aThisIndex->mCommonMetadata.multiEntry() ==
otherIndex->mCommonMetadata.multiEntry());
MOZ_ASSERT(!otherIndex->mDeleted);
return PL_DHASH_NEXT;
}
};
const FullDatabaseMetadata* thisDB = mMetadata;
const FullDatabaseMetadata* otherDB = aMetadata;
@ -21203,7 +21052,67 @@ OpenDatabaseOp::AssertMetadataConsistency(const FullDatabaseMetadata* aMetadata)
MOZ_ASSERT(thisDB->mObjectStores.Count() == otherDB->mObjectStores.Count());
Helper::AssertConsistent(thisDB->mObjectStores, otherDB->mObjectStores);
for (auto objectStoreIter = thisDB->mObjectStores.ConstIter();
!objectStoreIter.Done();
objectStoreIter.Next()) {
FullObjectStoreMetadata* thisObjectStore = objectStoreIter.UserData();
MOZ_ASSERT(thisObjectStore);
MOZ_ASSERT(!thisObjectStore->mDeleted);
auto* otherObjectStore =
MetadataNameOrIdMatcher<FullObjectStoreMetadata>::Match(
otherDB->mObjectStores, thisObjectStore->mCommonMetadata.id());
MOZ_ASSERT(otherObjectStore);
MOZ_ASSERT(thisObjectStore != otherObjectStore);
MOZ_ASSERT(thisObjectStore->mCommonMetadata.id() ==
otherObjectStore->mCommonMetadata.id());
MOZ_ASSERT(thisObjectStore->mCommonMetadata.name() ==
otherObjectStore->mCommonMetadata.name());
MOZ_ASSERT(thisObjectStore->mCommonMetadata.autoIncrement() ==
otherObjectStore->mCommonMetadata.autoIncrement());
MOZ_ASSERT(thisObjectStore->mCommonMetadata.keyPath() ==
otherObjectStore->mCommonMetadata.keyPath());
// mNextAutoIncrementId and mComittedAutoIncrementId may be modified
// concurrently with this OpenOp, so it is not possible to assert equality
// here.
MOZ_ASSERT(thisObjectStore->mNextAutoIncrementId <=
otherObjectStore->mNextAutoIncrementId);
MOZ_ASSERT(thisObjectStore->mComittedAutoIncrementId <=
otherObjectStore->mComittedAutoIncrementId);
MOZ_ASSERT(!otherObjectStore->mDeleted);
MOZ_ASSERT(thisObjectStore->mIndexes.Count() ==
otherObjectStore->mIndexes.Count());
for (auto indexIter = thisObjectStore->mIndexes.Iter();
!indexIter.Done();
indexIter.Next()) {
FullIndexMetadata* thisIndex = indexIter.UserData();
MOZ_ASSERT(thisIndex);
MOZ_ASSERT(!thisIndex->mDeleted);
auto* otherIndex =
MetadataNameOrIdMatcher<FullIndexMetadata>::
Match(otherObjectStore->mIndexes, thisIndex->mCommonMetadata.id());
MOZ_ASSERT(otherIndex);
MOZ_ASSERT(thisIndex != otherIndex);
MOZ_ASSERT(thisIndex->mCommonMetadata.id() ==
otherIndex->mCommonMetadata.id());
MOZ_ASSERT(thisIndex->mCommonMetadata.name() ==
otherIndex->mCommonMetadata.name());
MOZ_ASSERT(thisIndex->mCommonMetadata.keyPath() ==
otherIndex->mCommonMetadata.keyPath());
MOZ_ASSERT(thisIndex->mCommonMetadata.unique() ==
otherIndex->mCommonMetadata.unique());
MOZ_ASSERT(thisIndex->mCommonMetadata.multiEntry() ==
otherIndex->mCommonMetadata.multiEntry());
MOZ_ASSERT(!otherIndex->mDeleted);
}
}
}
#endif // DEBUG

View File

@ -262,7 +262,7 @@ IndexedDatabaseManager::~IndexedDatabaseManager()
bool IndexedDatabaseManager::sIsMainProcess = false;
bool IndexedDatabaseManager::sFullSynchronousMode = false;
PRLogModuleInfo* IndexedDatabaseManager::sLoggingModule;
mozilla::LazyLogModule IndexedDatabaseManager::sLoggingModule("IndexedDB");
Atomic<IndexedDatabaseManager::LoggingMode>
IndexedDatabaseManager::sLoggingMode(
@ -284,10 +284,6 @@ IndexedDatabaseManager::GetOrCreate()
if (!gDBManager) {
sIsMainProcess = XRE_IsParentProcess();
if (!sLoggingModule) {
sLoggingModule = PR_NewLogModule("IndexedDB");
}
if (sIsMainProcess && Preferences::GetBool("disk_space_watcher.enabled", false)) {
// See if we're starting up in low disk space conditions.
nsCOMPtr<nsIDiskSpaceWatcher> watcher =
@ -674,7 +670,7 @@ IndexedDatabaseManager::GetLoggingMode()
}
// static
PRLogModuleInfo*
mozilla::LogModule*
IndexedDatabaseManager::GetLoggingModule()
{
MOZ_ASSERT(gDBManager,

View File

@ -19,7 +19,6 @@
#include "nsITimer.h"
class nsIEventTarget;
struct PRLogModuleInfo;
namespace mozilla {
@ -101,7 +100,7 @@ public:
}
#endif
static PRLogModuleInfo*
static mozilla::LogModule*
GetLoggingModule()
#ifdef DEBUG
;
@ -226,7 +225,7 @@ private:
static bool sIsMainProcess;
static bool sFullSynchronousMode;
static PRLogModuleInfo* sLoggingModule;
static LazyLogModule sLoggingModule;
static Atomic<LoggingMode> sLoggingMode;
static mozilla::Atomic<bool> sLowDiskSpaceMode;
};

View File

@ -279,7 +279,7 @@ LoggingHelper(bool aUseProfiler, const char* aFmt, ...)
IndexedDatabaseManager::Logging_Disabled);
MOZ_ASSERT(aFmt);
PRLogModuleInfo* logModule = IndexedDatabaseManager::GetLoggingModule();
mozilla::LogModule* logModule = IndexedDatabaseManager::GetLoggingModule();
MOZ_ASSERT(logModule);
static const mozilla::LogLevel logLevel = LogLevel::Warning;

View File

@ -28,6 +28,10 @@
#include "nsComponentManagerUtils.h"
#include "nsCRT.h"
using namespace mozilla;
using namespace mozilla::dom;
using namespace mozilla::hal;
#ifdef XP_WIN
#include <process.h>
#define getpid _getpid
@ -69,12 +73,10 @@
NameWithComma().get(), \
static_cast<uint64_t>(ChildID()), Pid(), ##__VA_ARGS__)
#else
static PRLogModuleInfo*
static LogModule*
GetPPMLog()
{
static PRLogModuleInfo *sLog;
if (!sLog)
sLog = PR_NewLogModule("ProcessPriorityManager");
static LazyLogModule sLog("ProcessPriorityManager");
return sLog;
}
# define LOG(fmt, ...) \
@ -87,10 +89,6 @@
static_cast<uint64_t>(ChildID()), Pid(), ##__VA_ARGS__))
#endif
using namespace mozilla;
using namespace mozilla::dom;
using namespace mozilla::hal;
namespace {
class ParticularProcessPriorityManager;

View File

@ -142,11 +142,9 @@ ScreenManagerParent::RecvScreenForBrowser(const TabId& aTabId,
nsCOMPtr<nsIWidget> widget = tabParent->GetWidget();
nsCOMPtr<nsIScreen> screen;
if (widget) {
if (widget->GetNativeData(NS_NATIVE_WINDOW)) {
mScreenMgr->ScreenForNativeWidget(widget->GetNativeData(NS_NATIVE_WINDOW),
getter_AddRefs(screen));
}
if (widget && widget->GetNativeData(NS_NATIVE_WINDOW)) {
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))) {

View File

@ -161,7 +161,11 @@ MP3TrackDemuxer::DemuxSample() {
media::TimeUnit
MP3TrackDemuxer::SeekPosition() const {
return Duration(mFrameIndex);
TimeUnit pos = Duration(mFrameIndex);
if (Duration() > TimeUnit()) {
pos = std::min(Duration(), pos);
}
return pos;
}
#endif
@ -199,22 +203,22 @@ MP3TrackDemuxer::FastSeek(const TimeUnit& aTime) {
const auto& vbr = mParser.VBRInfo();
if (!aTime.ToMicroseconds()) {
// Quick seek to the beginning of the stream.
mOffset = mFirstFrameOffset;
mFrameIndex = 0;
} else if (vbr.IsTOCPresent()) {
// Use TOC for more precise seeking.
const float durationFrac = static_cast<float>(aTime.ToMicroseconds()) /
Duration().ToMicroseconds();
mOffset = vbr.Offset(durationFrac);
mFrameIndex = FrameIndexFromOffset(vbr.Offset(durationFrac));
} else if (AverageFrameLength() > 0) {
mOffset = mFirstFrameOffset + FrameIndexFromTime(aTime) *
AverageFrameLength();
mFrameIndex = FrameIndexFromTime(aTime);
}
mOffset = OffsetFromFrameIndex(mFrameIndex);
if (mOffset > mFirstFrameOffset && StreamLength() > 0) {
mOffset = std::min(StreamLength() - 1, mOffset);
}
mFrameIndex = FrameIndexFromOffset(mOffset);
mParser.EndFrameSession();
MP3LOG("FastSeek End TOC=%d avgFrameLen=%f mNumParsedFrames=%" PRIu64
@ -240,6 +244,10 @@ MP3TrackDemuxer::ScanUntil(const TimeUnit& aTime) {
FastSeek(aTime);
}
if (Duration(mFrameIndex + 1) > aTime) {
return SeekPosition();
}
MediaByteRange nextRange = FindNextFrame();
while (SkipNextFrame(nextRange) && Duration(mFrameIndex + 1) < aTime) {
nextRange = FindNextFrame();
@ -253,7 +261,7 @@ MP3TrackDemuxer::ScanUntil(const TimeUnit& aTime) {
" mFrameIndex=%" PRId64 " mOffset=%" PRIu64,
aTime, AverageFrameLength(), mNumParsedFrames, mFrameIndex, mOffset);
return Duration(mFrameIndex);
return SeekPosition();
}
RefPtr<MP3TrackDemuxer::SamplesPromise>
@ -363,10 +371,26 @@ MP3TrackDemuxer::Duration(int64_t aNumFrames) const {
return TimeUnit::FromMicroseconds(aNumFrames * usPerFrame);
}
static bool
VerifyFrameConsistency(
const FrameParser::Frame& aFrame1, const FrameParser::Frame& aFrame2) {
const auto& h1 = aFrame1.Header();
const auto& h2 = aFrame2.Header();
return h1.IsValid() && h2.IsValid() &&
h1.Layer() == h2.Layer() &&
h1.SlotSize() == h2.SlotSize() &&
h1.SamplesPerFrame() == h2.SamplesPerFrame() &&
h1.Channels() == h2.Channels() &&
h1.SampleRate() == h2.SampleRate() &&
h1.RawVersion() == h2.RawVersion() &&
h1.RawProtection() == h2.RawProtection();
}
MediaByteRange
MP3TrackDemuxer::FindNextFrame() {
static const int BUFFER_SIZE = 4096;
static const int MAX_SKIPPED_BYTES = 10 * BUFFER_SIZE;
static const int BUFFER_SIZE = 64;
static const int MAX_SKIPPED_BYTES = 1024 * BUFFER_SIZE;
MP3LOGV("FindNext() Begin mOffset=%" PRIu64 " mNumParsedFrames=%" PRIu64
" mFrameIndex=%" PRId64 " mTotalFrameLen=%" PRIu64
@ -400,10 +424,20 @@ MP3TrackDemuxer::FindNextFrame() {
MOZ_ASSERT(foundFrame || bytesToSkip || !reader.Remaining());
reader.DiscardRemaining();
// Advance mOffset by the amount of bytes read and if necessary,
// skip an ID3v2 tag which stretches beyond the current buffer.
NS_ENSURE_TRUE(mOffset + read + bytesToSkip > mOffset, MediaByteRange(0, 0));
mOffset += read + bytesToSkip;
if (foundFrame && mParser.FirstFrame().Length() &&
!VerifyFrameConsistency(mParser.FirstFrame(), mParser.CurrentFrame())) {
// We've likely hit a false-positive, ignore it and proceed with the
// search for the next valid frame.
foundFrame = false;
mOffset = frameHeaderOffset + 1;
mParser.EndFrameSession();
} else {
// Advance mOffset by the amount of bytes read and if necessary,
// skip an ID3v2 tag which stretches beyond the current buffer.
NS_ENSURE_TRUE(mOffset + read + bytesToSkip > mOffset,
MediaByteRange(0, 0));
mOffset += read + bytesToSkip;
}
}
if (!foundFrame || !mParser.CurrentFrame().Length()) {
@ -493,6 +527,22 @@ MP3TrackDemuxer::GetNextFrame(const MediaByteRange& aRange) {
return frame.forget();
}
int64_t
MP3TrackDemuxer::OffsetFromFrameIndex(int64_t aFrameIndex) const {
int64_t offset = 0;
const auto& vbr = mParser.VBRInfo();
if (vbr.NumBytes() && vbr.NumAudioFrames()) {
offset = mFirstFrameOffset + aFrameIndex * vbr.NumBytes().value() /
vbr.NumAudioFrames().value();
} else if (AverageFrameLength() > 0) {
offset = mFirstFrameOffset + aFrameIndex * AverageFrameLength();
}
MP3LOGV("OffsetFromFrameIndex(%" PRId64 ") -> %" PRId64, aFrameIndex, offset);
return std::max<int64_t>(mFirstFrameOffset, offset);
}
int64_t
MP3TrackDemuxer::FrameIndexFromOffset(int64_t aOffset) const {
int64_t frameIndex = 0;
@ -846,7 +896,7 @@ FrameParser::FrameHeader::IsValid(int aPos) const {
if (aPos == frame_header::SYNC2_VERSION_LAYER_PROTECTION) {
return Sync2() == 7 &&
RawVersion() != 1 &&
RawLayer() != 0;
Layer() == 3;
}
if (aPos == frame_header::BITRATE_SAMPLERATE_PADDING_PRIVATE) {
return RawBitrate() != 0xF && RawBitrate() != 0 &&
@ -1135,6 +1185,9 @@ ID3Parser::ID3Header::Flags() const {
uint32_t
ID3Parser::ID3Header::Size() const {
if (!IsValid()) {
return 0;
}
return mSize;
}

View File

@ -411,10 +411,13 @@ private:
// Updates post-read meta data.
void UpdateState(const MediaByteRange& aRange);
// Returns the frame index for the given offset.
// Returns the estimated offset for the given frame index.
int64_t OffsetFromFrameIndex(int64_t aFrameIndex) const;
// Returns the estimated frame index for the given offset.
int64_t FrameIndexFromOffset(int64_t aOffset) const;
// Returns the frame index for the given time.
// Returns the estimated frame index for the given time.
int64_t FrameIndexFromTime(const media::TimeUnit& aTime) const;
// Reads aSize bytes into aBuffer from the source starting at aOffset.

View File

@ -117,10 +117,10 @@ public:
};
// Check if the decoder owner is active.
virtual bool IsActive() = 0;
virtual bool IsActive() const = 0;
// Check if the decoder owner is hidden.
virtual bool IsHidden() = 0;
virtual bool IsHidden() const = 0;
// Called by the media decoder and the video frame to get the
// ImageContainer containing the video data.

View File

@ -5,6 +5,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/EMEUtils.h"
#include "mozilla/dom/UnionTypes.h"
namespace mozilla {
@ -112,4 +113,32 @@ ConstructKeySystem(const nsAString& aKeySystem,
aOutKeySystem.Append(aCDMVersion);
}
ArrayData
GetArrayBufferViewOrArrayBufferData(const dom::ArrayBufferViewOrArrayBuffer& aBufferOrView)
{
MOZ_ASSERT(aBufferOrView.IsArrayBuffer() || aBufferOrView.IsArrayBufferView());
if (aBufferOrView.IsArrayBuffer()) {
const dom::ArrayBuffer& buffer = aBufferOrView.GetAsArrayBuffer();
buffer.ComputeLengthAndData();
return ArrayData(buffer.Data(), buffer.Length());
} else if (aBufferOrView.IsArrayBufferView()) {
const dom::ArrayBufferView& bufferview = aBufferOrView.GetAsArrayBufferView();
bufferview.ComputeLengthAndData();
return ArrayData(bufferview.Data(), bufferview.Length());
}
return ArrayData(nullptr, 0);
}
void
CopyArrayBufferViewOrArrayBufferData(const dom::ArrayBufferViewOrArrayBuffer& aBufferOrView,
nsTArray<uint8_t>& aOutData)
{
ArrayData data = GetArrayBufferViewOrArrayBufferData(aBufferOrView);
aOutData.Clear();
if (!data.IsValid()) {
return;
}
aOutData.AppendElements(data.mData, data.mLength);
}
} // namespace mozilla

Some files were not shown because too many files have changed in this diff Show More