mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge latest green fx-team changeset and mozilla-central; a=merge
This commit is contained in:
commit
60a8c08d6b
@ -491,7 +491,6 @@ let settingsToObserve = {
|
||||
'layers.draw-tile-borders': false,
|
||||
'layers.dump': false,
|
||||
'layers.enable-tiles': true,
|
||||
'layers.simple-tiles': false,
|
||||
'layers.effect.invert': false,
|
||||
'layers.effect.grayscale': false,
|
||||
'layers.effect.contrast': "0.0",
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="3a2947df41a480de1457a6dcdbf46ad0af70d8e0">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="d711d1e469eeeecf25a02b2407a542a598918b2c"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a8a6eed2ba9d66239aac789b9ee4900f911c73cb"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="5883a99b6528ced9dafaed8d3ca2405fb285537e"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
@ -23,7 +23,7 @@
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4f9042d3a705307849a6f63961eaaaa2e1d85d77"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4bc3cfde42118081268690217172d7b577867c65"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>
|
||||
|
@ -19,13 +19,13 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d711d1e469eeeecf25a02b2407a542a598918b2c"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="a8a6eed2ba9d66239aac789b9ee4900f911c73cb"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="5883a99b6528ced9dafaed8d3ca2405fb285537e"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c058843242068d0df7c107e09da31b53d2e08fa6"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4f9042d3a705307849a6f63961eaaaa2e1d85d77"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4bc3cfde42118081268690217172d7b577867c65"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
|
||||
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>
|
||||
|
@ -17,10 +17,10 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="d711d1e469eeeecf25a02b2407a542a598918b2c"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a8a6eed2ba9d66239aac789b9ee4900f911c73cb"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="5883a99b6528ced9dafaed8d3ca2405fb285537e"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4f9042d3a705307849a6f63961eaaaa2e1d85d77"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4bc3cfde42118081268690217172d7b577867c65"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="3a2947df41a480de1457a6dcdbf46ad0af70d8e0">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="d711d1e469eeeecf25a02b2407a542a598918b2c"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a8a6eed2ba9d66239aac789b9ee4900f911c73cb"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="5883a99b6528ced9dafaed8d3ca2405fb285537e"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
@ -23,7 +23,7 @@
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4f9042d3a705307849a6f63961eaaaa2e1d85d77"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4bc3cfde42118081268690217172d7b577867c65"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="f92a936f2aa97526d4593386754bdbf02db07a12"/>
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="6e47ff2790f5656b5b074407829ceecf3e6188c4"/>
|
||||
|
@ -19,13 +19,13 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d711d1e469eeeecf25a02b2407a542a598918b2c"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="a8a6eed2ba9d66239aac789b9ee4900f911c73cb"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="5883a99b6528ced9dafaed8d3ca2405fb285537e"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c058843242068d0df7c107e09da31b53d2e08fa6"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4f9042d3a705307849a6f63961eaaaa2e1d85d77"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4bc3cfde42118081268690217172d7b577867c65"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
|
||||
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="3a2947df41a480de1457a6dcdbf46ad0af70d8e0">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="d711d1e469eeeecf25a02b2407a542a598918b2c"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a8a6eed2ba9d66239aac789b9ee4900f911c73cb"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="5883a99b6528ced9dafaed8d3ca2405fb285537e"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
@ -23,7 +23,7 @@
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4f9042d3a705307849a6f63961eaaaa2e1d85d77"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4bc3cfde42118081268690217172d7b577867c65"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>
|
||||
@ -133,7 +133,7 @@
|
||||
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="1bb28abbc215f45220620af5cd60a8ac1be93722"/>
|
||||
<project name="device/qcom/common" path="device/qcom/common" revision="54c32c2ddef066fbdf611d29e4b7c47e0363599e"/>
|
||||
<project name="device-flame" path="device/t2m/flame" remote="b2g" revision="52c909e821d107d414f851e267dedcd7aae2cebf"/>
|
||||
<project name="codeaurora_kernel_msm" path="kernel" remote="b2g" revision="893238eb1215f8fd4f3747169170cc5e1cc33969"/>
|
||||
<project name="codeaurora_kernel_msm" path="kernel" remote="b2g" revision="1072f7d31dc0bf3a2adc64177b1104da9f4ce4b6"/>
|
||||
<project name="kernel_lk" path="bootable/bootloader/lk" remote="b2g" revision="fda40423ffa573dc6cafd3780515010cb2a086be"/>
|
||||
<project name="platform/external/bluetooth/bluedroid" path="external/bluetooth/bluedroid" revision="30b96dfca99cb384bf520a16b81f3aba56f09907"/>
|
||||
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="5b71e40213f650459e95d35b6f14af7e88d8ab62"/>
|
||||
|
@ -17,10 +17,10 @@
|
||||
</project>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="d711d1e469eeeecf25a02b2407a542a598918b2c"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a8a6eed2ba9d66239aac789b9ee4900f911c73cb"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="5883a99b6528ced9dafaed8d3ca2405fb285537e"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4f9042d3a705307849a6f63961eaaaa2e1d85d77"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4bc3cfde42118081268690217172d7b577867c65"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
@ -4,6 +4,6 @@
|
||||
"remote": "",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "3e43be9b8c24802b40fdfbcf17895c4355e6d238",
|
||||
"revision": "736a08de0dd46c283137a289a484a6b404cb0dd1",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
@ -17,12 +17,12 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d711d1e469eeeecf25a02b2407a542a598918b2c"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="a8a6eed2ba9d66239aac789b9ee4900f911c73cb"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="5883a99b6528ced9dafaed8d3ca2405fb285537e"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4f9042d3a705307849a6f63961eaaaa2e1d85d77"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4bc3cfde42118081268690217172d7b577867c65"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
|
||||
<project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d711d1e469eeeecf25a02b2407a542a598918b2c"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="a8a6eed2ba9d66239aac789b9ee4900f911c73cb"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="5883a99b6528ced9dafaed8d3ca2405fb285537e"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -17,10 +17,10 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="d711d1e469eeeecf25a02b2407a542a598918b2c"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a8a6eed2ba9d66239aac789b9ee4900f911c73cb"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="5883a99b6528ced9dafaed8d3ca2405fb285537e"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4f9042d3a705307849a6f63961eaaaa2e1d85d77"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4bc3cfde42118081268690217172d7b577867c65"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
@ -17,12 +17,12 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d711d1e469eeeecf25a02b2407a542a598918b2c"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="a8a6eed2ba9d66239aac789b9ee4900f911c73cb"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="5883a99b6528ced9dafaed8d3ca2405fb285537e"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4f9042d3a705307849a6f63961eaaaa2e1d85d77"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4bc3cfde42118081268690217172d7b577867c65"/>
|
||||
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
|
||||
|
25
b2g/dev/config/mozconfigs/macosx64/mulet
Normal file
25
b2g/dev/config/mozconfigs/macosx64/mulet
Normal file
@ -0,0 +1,25 @@
|
||||
MOZ_AUTOMATION_TALOS_SENDCHANGE=0
|
||||
. $topsrcdir/build/macosx/mozconfig.common
|
||||
|
||||
ac_add_options --enable-application=b2g/dev
|
||||
ac_add_options --disable-install-strip
|
||||
ac_add_options --enable-signmar
|
||||
ac_add_options --enable-profiling
|
||||
ac_add_options --enable-instruments
|
||||
ac_add_options --enable-dtrace
|
||||
|
||||
# Nightlies only since this has a cost in performance
|
||||
ac_add_options --enable-js-diagnostics
|
||||
|
||||
# Needed to enable breakpad in application.ini
|
||||
export MOZILLA_OFFICIAL=1
|
||||
|
||||
ac_add_options --with-macbundlename-prefix=Firefox
|
||||
|
||||
# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
|
||||
ac_add_options --enable-warnings-as-errors
|
||||
|
||||
# Package js shell.
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
@ -4,10 +4,10 @@
|
||||
# location which also work on other platforms.
|
||||
#
|
||||
# @DIR_MACOS@
|
||||
# Equals Contents/MacOS/ on Mac OX X and is an empty string on other platforms.
|
||||
# Equals Contents/MacOS/ on Mac OS X and is an empty string on other platforms.
|
||||
#
|
||||
# @DIR_RESOURCES@
|
||||
# Equals Contents/Resources/ on Mac OX X and is an empty string on other
|
||||
# Equals Contents/Resources/ on Mac OS X and is an empty string on other
|
||||
# platforms.
|
||||
|
||||
# Mac OS X v2 signing removals
|
||||
|
@ -46,7 +46,7 @@ const gXPInstallObserver = {
|
||||
}
|
||||
// Note that the above try/catch will pass through dead object proxies and
|
||||
// other degenerate objects. Make sure the browser is bonafide.
|
||||
if (!browser || !gBrowser.browsers.contains(browser))
|
||||
if (!browser || gBrowser.browsers.indexOf(browser) == -1)
|
||||
return;
|
||||
|
||||
const anchorID = "addons-notification-icon";
|
||||
|
@ -1371,7 +1371,7 @@ let BookmarkingUI = {
|
||||
// calls back. For such an edge case, retain all unique entries from both
|
||||
// arrays.
|
||||
this._itemIds = this._itemIds.filter(
|
||||
function (id) !aItemIds.contains(id)
|
||||
function (id) aItemIds.indexOf(id) == -1
|
||||
).concat(aItemIds);
|
||||
|
||||
this._updateStar();
|
||||
@ -1592,7 +1592,7 @@ let BookmarkingUI = {
|
||||
aURI) {
|
||||
if (aURI && aURI.equals(this._uri)) {
|
||||
// If a new bookmark has been added to the tracked uri, register it.
|
||||
if (!this._itemIds.contains(aItemId)) {
|
||||
if (this._itemIds.indexOf(aItemId) == -1) {
|
||||
this._itemIds.push(aItemId);
|
||||
// Only need to update the UI if it wasn't marked as starred before:
|
||||
if (this._itemIds.length == 1) {
|
||||
|
@ -2233,7 +2233,7 @@ function URLBarSetURI(aURI) {
|
||||
// Replace initial page URIs with an empty string
|
||||
// only if there's no opener (bug 370555).
|
||||
// Bug 863515 - Make content.opener checks work in electrolysis.
|
||||
if (gInitialPages.contains(uri.spec))
|
||||
if (gInitialPages.indexOf(uri.spec) != -1)
|
||||
value = !gMultiProcessBrowser && content.opener ? uri.spec : "";
|
||||
else
|
||||
value = losslessDecodeURI(uri);
|
||||
|
@ -129,7 +129,7 @@ let gUpdater = {
|
||||
// Delete sites that were removed from the grid.
|
||||
gGrid.sites.forEach(function (aSite) {
|
||||
// The site must be valid and not in the current grid.
|
||||
if (!aSite || aSites.contains(aSite))
|
||||
if (!aSite || aSites.indexOf(aSite) != -1)
|
||||
return;
|
||||
|
||||
batch.push(new Promise(resolve => {
|
||||
|
@ -18,7 +18,7 @@ var permissionObserver = {
|
||||
if (aTopic == "perm-changed") {
|
||||
var permission = aSubject.QueryInterface(Components.interfaces.nsIPermission);
|
||||
if (permission.host == gPermURI.host) {
|
||||
if (gPermissions.contains(permission.type))
|
||||
if (gPermissions.indexOf(permission.type) > -1)
|
||||
initRow(permission.type);
|
||||
else if (permission.type.startsWith("plugin"))
|
||||
setPluginsRadioState();
|
||||
|
@ -152,9 +152,9 @@ var gSyncSetup = {
|
||||
|
||||
// Only open the dialog if username + password are actually correct.
|
||||
Weave.Service.login();
|
||||
if (![Weave.LOGIN_FAILED_INVALID_PASSPHRASE,
|
||||
Weave.LOGIN_FAILED_NO_PASSPHRASE,
|
||||
Weave.LOGIN_SUCCEEDED].contains(Weave.Status.login)) {
|
||||
if ([Weave.LOGIN_FAILED_INVALID_PASSPHRASE,
|
||||
Weave.LOGIN_FAILED_NO_PASSPHRASE,
|
||||
Weave.LOGIN_SUCCEEDED].indexOf(Weave.Status.login) == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1668,7 +1668,7 @@
|
||||
if (!docShellsSwapped && !uriIsAboutBlank) {
|
||||
// pretend the user typed this so it'll be available till
|
||||
// the document successfully loads
|
||||
if (aURI && !gInitialPages.contains(aURI))
|
||||
if (aURI && gInitialPages.indexOf(aURI) == -1)
|
||||
b.userTypedValue = aURI;
|
||||
|
||||
let flags = Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
|
||||
@ -2167,14 +2167,14 @@
|
||||
var tab = aTab;
|
||||
do {
|
||||
tab = tab.nextSibling;
|
||||
} while (tab && !remainingTabs.contains(tab));
|
||||
} while (tab && remainingTabs.indexOf(tab) == -1);
|
||||
|
||||
if (!tab) {
|
||||
tab = aTab;
|
||||
|
||||
do {
|
||||
tab = tab.previousSibling;
|
||||
} while (tab && !remainingTabs.contains(tab));
|
||||
} while (tab && remainingTabs.indexOf(tab) == -1);
|
||||
}
|
||||
|
||||
this.selectedTab = tab;
|
||||
@ -2422,10 +2422,10 @@
|
||||
<body>
|
||||
<![CDATA[
|
||||
Array.forEach(this.tabs, function(tab) {
|
||||
if (aTabs.contains(tab))
|
||||
this.showTab(tab);
|
||||
else
|
||||
if (aTabs.indexOf(tab) == -1)
|
||||
this.hideTab(tab);
|
||||
else
|
||||
this.showTab(tab);
|
||||
}, this);
|
||||
|
||||
this.tabContainer._handleTabSelect(false);
|
||||
|
@ -69,23 +69,17 @@ let successfulPinningPageListener = {
|
||||
// The browser should load about:neterror, when this happens, proceed
|
||||
// to load the pinning domain again, this time removing the pinning information
|
||||
let certErrorProgressListener = {
|
||||
buttonClicked: false,
|
||||
onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) {
|
||||
if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP) {
|
||||
let self = this;
|
||||
// Can't directly call button.click() in onStateChange
|
||||
executeSoon(function() {
|
||||
let button = content.document.getElementById("errorTryAgain");
|
||||
// If about:neterror hasn't fully loaded, the button won't be present.
|
||||
// It will eventually be there, however.
|
||||
if (button && !self.buttonClicked) {
|
||||
gBrowser.removeProgressListener(self);
|
||||
gBrowser.selectedBrowser.addEventListener("load",
|
||||
successfulPinningRemovalPageListener,
|
||||
true);
|
||||
gBrowser.selectedBrowser.loadURI("https://" + kPinningDomain + kURLPath + "zeromaxagevalid");
|
||||
}
|
||||
});
|
||||
let textElement = content.document.getElementById("errorShortDescText");
|
||||
let text = textElement.innerHTML;
|
||||
ok(text.indexOf("mozilla_pkix_error_key_pinning_failure") > 0,
|
||||
"Got a pinning error page");
|
||||
gBrowser.removeProgressListener(this);
|
||||
gBrowser.selectedBrowser.addEventListener("load",
|
||||
successfulPinningRemovalPageListener,
|
||||
true);
|
||||
gBrowser.selectedBrowser.loadURI("https://" + kPinningDomain + kURLPath + "zeromaxagevalid");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -13,7 +13,7 @@ function test() {
|
||||
|
||||
function record(aName) {
|
||||
info("got " + aName);
|
||||
if (!actual.contains(aName))
|
||||
if (actual.indexOf(aName) == -1)
|
||||
actual.push(aName);
|
||||
if (actual.length == expected.length) {
|
||||
is(actual.toString(), expected.toString(),
|
||||
|
@ -212,8 +212,8 @@ let gClickHandler = {
|
||||
|
||||
// Check that all required methods have been called.
|
||||
gCurrentTest.expectedInvokedMethods.forEach(function(aExpectedMethodName) {
|
||||
ok(gInvokedMethods.contains(aExpectedMethodName),
|
||||
gCurrentTest.desc + ":" + aExpectedMethodName + " was invoked");
|
||||
isnot(gInvokedMethods.indexOf(aExpectedMethodName), -1,
|
||||
gCurrentTest.desc + ":" + aExpectedMethodName + " was invoked");
|
||||
});
|
||||
|
||||
if (gInvokedMethods.length != gCurrentTest.expectedInvokedMethods.length) {
|
||||
|
@ -33,7 +33,7 @@ function promiseObserverCalled(aTopic, aAction) {
|
||||
ok(true, "got " + aTopic + " notification");
|
||||
Services.obs.removeObserver(observer, aTopic);
|
||||
|
||||
if (kObservedTopics.contains(aTopic)) {
|
||||
if (kObservedTopics.indexOf(aTopic) != -1) {
|
||||
if (!(aTopic in gObservedTopics))
|
||||
gObservedTopics[aTopic] = -1;
|
||||
else
|
||||
@ -827,7 +827,7 @@ let gTests = [
|
||||
if (node.localName == "menuitem")
|
||||
labels.push(node.getAttribute("label"));
|
||||
}
|
||||
ok(!labels.contains(alwaysLabel), "The 'Always Allow' item isn't shown");
|
||||
is(labels.indexOf(alwaysLabel), -1, "The 'Always Allow' item isn't shown");
|
||||
|
||||
// Cleanup.
|
||||
yield closeStream(true);
|
||||
|
@ -38,7 +38,7 @@ function promiseObserverCalled(aTopic, aAction) {
|
||||
info("Message: " + aData);
|
||||
Services.obs.removeObserver(observer, aTopic);
|
||||
|
||||
if (kObservedTopics.contains(aTopic)) {
|
||||
if (kObservedTopics.indexOf(aTopic) != -1) {
|
||||
if (!(aTopic in gObservedTopics))
|
||||
gObservedTopics[aTopic] = -1;
|
||||
else
|
||||
|
@ -691,7 +691,7 @@ function is_hidden(element) {
|
||||
if (style.visibility != "visible")
|
||||
return true;
|
||||
if (style.display == "-moz-popup")
|
||||
return ["hiding","closed"].contains(element.state);
|
||||
return ["hiding","closed"].indexOf(element.state) != -1;
|
||||
|
||||
// Hiding a parent element will hide all its children
|
||||
if (element.parentNode != element.ownerDocument)
|
||||
|
@ -891,7 +891,7 @@ function waitForEvents(event)
|
||||
}
|
||||
}
|
||||
|
||||
const isOSXMtnLion = navigator.userAgent.contains("Mac OS X 10.8");
|
||||
const isOSXMtnLion = navigator.userAgent.indexOf("Mac OS X 10.8") != -1;
|
||||
|
||||
if (isOSXMtnLion) {
|
||||
todo(false, "Mountain Lion doesn't like this test (bug 792304)");
|
||||
|
@ -199,7 +199,7 @@
|
||||
|
||||
let protocol = value.match(/^[a-z\d.+\-]+:(?=[^\d])/);
|
||||
if (protocol &&
|
||||
!["http:", "https:", "ftp:"].contains(protocol[0]))
|
||||
["http:", "https:", "ftp:"].indexOf(protocol[0]) == -1)
|
||||
return;
|
||||
let matchedURL = value.match(/^((?:[a-z]+:\/\/)?(?:[^\/]+@)?)(.+?)(?::\d+)?(?:\/|$)/);
|
||||
if (!matchedURL)
|
||||
|
@ -58,10 +58,10 @@
|
||||
# location which also work on other platforms.
|
||||
#
|
||||
# @DIR_MACOS@
|
||||
# Equals Contents/MacOS/ on Mac OX X and is an empty string on other platforms.
|
||||
# Equals Contents/MacOS/ on Mac OS X and is an empty string on other platforms.
|
||||
#
|
||||
# @DIR_RESOURCES@
|
||||
# Equals Contents/Resources/ on Mac OX X and is an empty string on other
|
||||
# Equals Contents/Resources/ on Mac OS X and is an empty string on other
|
||||
# platforms.
|
||||
|
||||
# Common File Removals
|
||||
|
@ -77,9 +77,18 @@ public:
|
||||
void BufferFilled() {
|
||||
// It's okay to have exactly zero samples here, it can happen we have an
|
||||
// audio callback driver because of a hint on MSG creation, but the
|
||||
// AudioOutputStream has not been created yet.
|
||||
// AudioOutputStream has not been created yet, or if all the streams have finished
|
||||
// but we're still running.
|
||||
// Note: it's also ok if we had data in the scratch buffer - and we usually do - and
|
||||
// all the streams were ended (no mixer callback occured).
|
||||
// XXX Remove this warning, or find a way to avoid it if the mixer callback
|
||||
// isn't called.
|
||||
NS_WARN_IF_FALSE(Available() == 0 || mSampleWriteOffset == 0,
|
||||
"Audio Buffer is not full by the end of the callback.");
|
||||
// Make sure the data returned is always set and not random!
|
||||
if (Available()) {
|
||||
PodZero(mBuffer + mSampleWriteOffset, FramesToSamples(CHANNELS, Available()));
|
||||
}
|
||||
MOZ_ASSERT(mSamples, "Buffer not set.");
|
||||
mSamples = 0;
|
||||
mSampleWriteOffset = 0;
|
||||
|
@ -6,7 +6,6 @@
|
||||
#include "mozilla/dom/SVGCircleElement.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "gfxContext.h"
|
||||
#include "mozilla/dom/SVGCircleElementBinding.h"
|
||||
|
||||
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Circle)
|
||||
@ -82,17 +81,6 @@ SVGCircleElement::GetLengthInfo()
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGPathGeometryElement methods
|
||||
|
||||
void
|
||||
SVGCircleElement::ConstructPath(gfxContext *aCtx)
|
||||
{
|
||||
float x, y, r;
|
||||
|
||||
GetAnimatedLengthValues(&x, &y, &r, nullptr);
|
||||
|
||||
if (r > 0.0f)
|
||||
aCtx->Arc(gfxPoint(x, y), r, 0, 2*M_PI);
|
||||
}
|
||||
|
||||
TemporaryRef<Path>
|
||||
SVGCircleElement::BuildPath(PathBuilder* aBuilder)
|
||||
{
|
||||
|
@ -30,7 +30,6 @@ public:
|
||||
virtual bool HasValidDimensions() const MOZ_OVERRIDE;
|
||||
|
||||
// nsSVGPathGeometryElement methods:
|
||||
virtual void ConstructPath(gfxContext *aCtx) MOZ_OVERRIDE;
|
||||
virtual TemporaryRef<Path> BuildPath(PathBuilder* aBuilder = nullptr) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
|
||||
|
@ -159,7 +159,8 @@ void
|
||||
SVGContentUtils::GetStrokeOptions(AutoStrokeOptions* aStrokeOptions,
|
||||
nsSVGElement* aElement,
|
||||
nsStyleContext* aStyleContext,
|
||||
gfxTextContextPaint *aContextPaint)
|
||||
gfxTextContextPaint *aContextPaint,
|
||||
StrokeOptionFlags aFlags)
|
||||
{
|
||||
nsRefPtr<nsStyleContext> styleContext;
|
||||
if (aStyleContext) {
|
||||
@ -176,17 +177,19 @@ SVGContentUtils::GetStrokeOptions(AutoStrokeOptions* aStrokeOptions,
|
||||
|
||||
const nsStyleSVG* styleSVG = styleContext->StyleSVG();
|
||||
|
||||
DashState dashState =
|
||||
GetStrokeDashData(aStrokeOptions, aElement, styleSVG, aContextPaint);
|
||||
if (aFlags != eIgnoreStrokeDashing) {
|
||||
DashState dashState =
|
||||
GetStrokeDashData(aStrokeOptions, aElement, styleSVG, aContextPaint);
|
||||
|
||||
if (dashState == eNoStroke) {
|
||||
// Hopefully this will shortcircuit any stroke operations:
|
||||
aStrokeOptions->mLineWidth = 0;
|
||||
return;
|
||||
}
|
||||
if (dashState == eContinuousStroke && aStrokeOptions->mDashPattern) {
|
||||
// Prevent our caller from wasting time looking at a pattern without gaps:
|
||||
aStrokeOptions->DiscardDashPattern();
|
||||
if (dashState == eNoStroke) {
|
||||
// Hopefully this will shortcircuit any stroke operations:
|
||||
aStrokeOptions->mLineWidth = 0;
|
||||
return;
|
||||
}
|
||||
if (dashState == eContinuousStroke && aStrokeOptions->mDashPattern) {
|
||||
// Prevent our caller from wasting time looking at a pattern without gaps:
|
||||
aStrokeOptions->DiscardDashPattern();
|
||||
}
|
||||
}
|
||||
|
||||
aStrokeOptions->mLineWidth =
|
||||
|
@ -128,10 +128,15 @@ public:
|
||||
Float mSmallArray[16];
|
||||
};
|
||||
|
||||
enum StrokeOptionFlags {
|
||||
eAllStrokeOptions,
|
||||
eIgnoreStrokeDashing
|
||||
};
|
||||
static void GetStrokeOptions(AutoStrokeOptions* aStrokeOptions,
|
||||
nsSVGElement* aElement,
|
||||
nsStyleContext* aStyleContext,
|
||||
gfxTextContextPaint *aContextPaint);
|
||||
gfxTextContextPaint *aContextPaint,
|
||||
StrokeOptionFlags aFlags = eAllStrokeOptions);
|
||||
|
||||
/**
|
||||
* Returns the current computed value of the CSS property 'stroke-width' for
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/gfx/PathHelpers.h"
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "gfxContext.h"
|
||||
|
||||
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Ellipse)
|
||||
|
||||
@ -93,17 +92,6 @@ SVGEllipseElement::GetLengthInfo()
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGPathGeometryElement methods
|
||||
|
||||
void
|
||||
SVGEllipseElement::ConstructPath(gfxContext *aCtx)
|
||||
{
|
||||
RefPtr<DrawTarget> dt = aCtx->GetDrawTarget();
|
||||
RefPtr<PathBuilder> builder = dt->CreatePathBuilder(aCtx->CurrentFillRule());
|
||||
RefPtr<Path> path = BuildPath(builder);
|
||||
if (path) {
|
||||
aCtx->SetPath(path);
|
||||
}
|
||||
}
|
||||
|
||||
TemporaryRef<Path>
|
||||
SVGEllipseElement::BuildPath(PathBuilder* aBuilder)
|
||||
{
|
||||
|
@ -30,7 +30,6 @@ public:
|
||||
virtual bool HasValidDimensions() const MOZ_OVERRIDE;
|
||||
|
||||
// nsSVGPathGeometryElement methods:
|
||||
virtual void ConstructPath(gfxContext *aCtx) MOZ_OVERRIDE;
|
||||
virtual TemporaryRef<Path> BuildPath(PathBuilder* aBuilder = nullptr) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include "nsIURI.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "imgINotificationObserver.h"
|
||||
#include "gfxContext.h"
|
||||
#include "mozilla/dom/SVGImageElementBinding.h"
|
||||
#include "nsContentUtils.h"
|
||||
|
||||
@ -227,19 +226,6 @@ SVGImageElement::IsAttributeMapped(const nsIAtom* name) const
|
||||
|
||||
/* For the purposes of the update/invalidation logic pretend to
|
||||
be a rectangle. */
|
||||
void
|
||||
SVGImageElement::ConstructPath(gfxContext *aCtx)
|
||||
{
|
||||
float x, y, width, height;
|
||||
|
||||
GetAnimatedLengthValues(&x, &y, &width, &height, nullptr);
|
||||
|
||||
if (width <= 0 || height <= 0)
|
||||
return;
|
||||
|
||||
aCtx->Rectangle(gfxRect(x, y, width, height));
|
||||
}
|
||||
|
||||
TemporaryRef<Path>
|
||||
SVGImageElement::BuildPath(PathBuilder* aBuilder)
|
||||
{
|
||||
|
@ -53,7 +53,6 @@ public:
|
||||
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* name) const MOZ_OVERRIDE;
|
||||
|
||||
// nsSVGPathGeometryElement methods:
|
||||
virtual void ConstructPath(gfxContext *aCtx) MOZ_OVERRIDE;
|
||||
virtual TemporaryRef<Path> BuildPath(PathBuilder* aBuilder = nullptr) MOZ_OVERRIDE;
|
||||
|
||||
// nsSVGSVGElement methods:
|
||||
|
@ -6,7 +6,6 @@
|
||||
#include "mozilla/dom/SVGLineElement.h"
|
||||
#include "mozilla/dom/SVGLineElementBinding.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "gfxContext.h"
|
||||
|
||||
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Line)
|
||||
|
||||
@ -107,17 +106,6 @@ SVGLineElement::GetMarkPoints(nsTArray<nsSVGMark> *aMarks) {
|
||||
aMarks->AppendElement(nsSVGMark(x2, y2, angle, nsSVGMark::eEnd));
|
||||
}
|
||||
|
||||
void
|
||||
SVGLineElement::ConstructPath(gfxContext *aCtx)
|
||||
{
|
||||
float x1, y1, x2, y2;
|
||||
|
||||
GetAnimatedLengthValues(&x1, &y1, &x2, &y2, nullptr);
|
||||
|
||||
aCtx->MoveTo(gfxPoint(x1, y1));
|
||||
aCtx->LineTo(gfxPoint(x2, y2));
|
||||
}
|
||||
|
||||
TemporaryRef<Path>
|
||||
SVGLineElement::BuildPath(PathBuilder* aBuilder)
|
||||
{
|
||||
|
@ -32,7 +32,6 @@ public:
|
||||
// nsSVGPathGeometryElement methods:
|
||||
virtual bool IsMarkable() MOZ_OVERRIDE { return true; }
|
||||
virtual void GetMarkPoints(nsTArray<nsSVGMark> *aMarks) MOZ_OVERRIDE;
|
||||
virtual void ConstructPath(gfxContext *aCtx) MOZ_OVERRIDE;
|
||||
virtual TemporaryRef<Path> BuildPath(PathBuilder* aBuilder = nullptr) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const;
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "nsStyleConsts.h"
|
||||
#include "SVGContentUtils.h"
|
||||
#include "SVGPathSegUtils.h"
|
||||
#include "gfxContext.h"
|
||||
#include <algorithm>
|
||||
|
||||
using namespace mozilla;
|
||||
@ -260,47 +259,22 @@ ApproximateZeroLengthSubpathSquareCaps(PathBuilder* aPB,
|
||||
// line is rather arbitrary, other than being chosen to meet the requirements
|
||||
// described in the comment above.
|
||||
|
||||
Float tinyLength = aStrokeWidth / 32;
|
||||
Float tinyLength = aStrokeWidth / 512;
|
||||
|
||||
aPB->MoveTo(aPoint);
|
||||
aPB->LineTo(aPoint + Point(tinyLength, 0));
|
||||
aPB->MoveTo(aPoint);
|
||||
}
|
||||
|
||||
static void
|
||||
ApproximateZeroLengthSubpathSquareCaps(const gfxPoint &aPoint, gfxContext *aCtx)
|
||||
{
|
||||
// Cairo's fixed point fractional part is 8 bits wide, so its device space
|
||||
// coordinate granularity is 1/256 pixels. However, to prevent user space
|
||||
// |aPoint| and |aPoint + tinyAdvance| being rounded to the same device
|
||||
// coordinates, we double this for |tinyAdvance|:
|
||||
|
||||
const gfxSize tinyAdvance = aCtx->DeviceToUser(gfxSize(2.0/256.0, 0.0));
|
||||
|
||||
aCtx->MoveTo(aPoint);
|
||||
aCtx->LineTo(aPoint + gfxPoint(tinyAdvance.width, tinyAdvance.height));
|
||||
aCtx->MoveTo(aPoint);
|
||||
}
|
||||
|
||||
#define MAYBE_APPROXIMATE_ZERO_LENGTH_SUBPATH_SQUARE_CAPS_TO_DT \
|
||||
do { \
|
||||
if (capsAreSquare && !subpathHasLength && aStrokeWidth > 0 && \
|
||||
subpathContainsNonArc && SVGPathSegUtils::IsValidType(prevSegType) && \
|
||||
if (!subpathHasLength && hasLineCaps && aStrokeWidth > 0 && \
|
||||
subpathContainsNonMoveTo && \
|
||||
SVGPathSegUtils::IsValidType(prevSegType) && \
|
||||
(!IsMoveto(prevSegType) || segType == PATHSEG_CLOSEPATH)) { \
|
||||
ApproximateZeroLengthSubpathSquareCaps(builder, segStart, aStrokeWidth);\
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#define MAYBE_APPROXIMATE_ZERO_LENGTH_SUBPATH_SQUARE_CAPS \
|
||||
do { \
|
||||
if (capsAreSquare && !subpathHasLength && subpathContainsNonArc && \
|
||||
SVGPathSegUtils::IsValidType(prevSegType) && \
|
||||
(!IsMoveto(prevSegType) || \
|
||||
segType == PATHSEG_CLOSEPATH)) { \
|
||||
ApproximateZeroLengthSubpathSquareCaps(segStart, aCtx); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
TemporaryRef<Path>
|
||||
SVGPathData::BuildPath(PathBuilder* builder,
|
||||
uint8_t aStrokeLineCap,
|
||||
@ -310,9 +284,9 @@ SVGPathData::BuildPath(PathBuilder* builder,
|
||||
return nullptr; // paths without an initial moveto are invalid
|
||||
}
|
||||
|
||||
bool capsAreSquare = aStrokeLineCap == NS_STYLE_STROKE_LINECAP_SQUARE;
|
||||
bool hasLineCaps = aStrokeLineCap != NS_STYLE_STROKE_LINECAP_BUTT;
|
||||
bool subpathHasLength = false; // visual length
|
||||
bool subpathContainsNonArc = false;
|
||||
bool subpathContainsNonMoveTo = false;
|
||||
|
||||
uint32_t segType = PATHSEG_UNKNOWN;
|
||||
uint32_t prevSegType = PATHSEG_UNKNOWN;
|
||||
@ -335,7 +309,7 @@ SVGPathData::BuildPath(PathBuilder* builder,
|
||||
{
|
||||
case PATHSEG_CLOSEPATH:
|
||||
// set this early to allow drawing of square caps for "M{x},{y} Z":
|
||||
subpathContainsNonArc = true;
|
||||
subpathContainsNonMoveTo = true;
|
||||
MAYBE_APPROXIMATE_ZERO_LENGTH_SUBPATH_SQUARE_CAPS_TO_DT;
|
||||
segEnd = pathStart;
|
||||
builder->Close();
|
||||
@ -346,7 +320,6 @@ SVGPathData::BuildPath(PathBuilder* builder,
|
||||
pathStart = segEnd = Point(mData[i], mData[i+1]);
|
||||
builder->MoveTo(segEnd);
|
||||
subpathHasLength = false;
|
||||
subpathContainsNonArc = false;
|
||||
break;
|
||||
|
||||
case PATHSEG_MOVETO_REL:
|
||||
@ -354,47 +327,42 @@ SVGPathData::BuildPath(PathBuilder* builder,
|
||||
pathStart = segEnd = segStart + Point(mData[i], mData[i+1]);
|
||||
builder->MoveTo(segEnd);
|
||||
subpathHasLength = false;
|
||||
subpathContainsNonArc = false;
|
||||
break;
|
||||
|
||||
case PATHSEG_LINETO_ABS:
|
||||
segEnd = Point(mData[i], mData[i+1]);
|
||||
builder->LineTo(segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart);
|
||||
if (segEnd != segStart) {
|
||||
subpathHasLength = true;
|
||||
builder->LineTo(segEnd);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_LINETO_REL:
|
||||
segEnd = segStart + Point(mData[i], mData[i+1]);
|
||||
builder->LineTo(segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart);
|
||||
if (segEnd != segStart) {
|
||||
subpathHasLength = true;
|
||||
builder->LineTo(segEnd);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_CURVETO_CUBIC_ABS:
|
||||
cp1 = Point(mData[i], mData[i+1]);
|
||||
cp2 = Point(mData[i+2], mData[i+3]);
|
||||
segEnd = Point(mData[i+4], mData[i+5]);
|
||||
builder->BezierTo(cp1, cp2, segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart || segEnd != cp1 || segEnd != cp2);
|
||||
if (segEnd != segStart || segEnd != cp1 || segEnd != cp2) {
|
||||
subpathHasLength = true;
|
||||
builder->BezierTo(cp1, cp2, segEnd);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_CURVETO_CUBIC_REL:
|
||||
cp1 = segStart + Point(mData[i], mData[i+1]);
|
||||
cp2 = segStart + Point(mData[i+2], mData[i+3]);
|
||||
segEnd = segStart + Point(mData[i+4], mData[i+5]);
|
||||
builder->BezierTo(cp1, cp2, segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart || segEnd != cp1 || segEnd != cp2);
|
||||
if (segEnd != segStart || segEnd != cp1 || segEnd != cp2) {
|
||||
subpathHasLength = true;
|
||||
builder->BezierTo(cp1, cp2, segEnd);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_CURVETO_QUADRATIC_ABS:
|
||||
@ -403,11 +371,10 @@ SVGPathData::BuildPath(PathBuilder* builder,
|
||||
tcp1 = segStart + (cp1 - segStart) * 2 / 3;
|
||||
segEnd = Point(mData[i+2], mData[i+3]); // set before setting tcp2!
|
||||
tcp2 = cp1 + (segEnd - cp1) / 3;
|
||||
builder->BezierTo(tcp1, tcp2, segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart || segEnd != cp1);
|
||||
if (segEnd != segStart || segEnd != cp1) {
|
||||
subpathHasLength = true;
|
||||
builder->BezierTo(tcp1, tcp2, segEnd);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_CURVETO_QUADRATIC_REL:
|
||||
@ -416,11 +383,10 @@ SVGPathData::BuildPath(PathBuilder* builder,
|
||||
tcp1 = segStart + (cp1 - segStart) * 2 / 3;
|
||||
segEnd = segStart + Point(mData[i+2], mData[i+3]); // set before setting tcp2!
|
||||
tcp2 = cp1 + (segEnd - cp1) / 3;
|
||||
builder->BezierTo(tcp1, tcp2, segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart || segEnd != cp1);
|
||||
if (segEnd != segStart || segEnd != cp1) {
|
||||
subpathHasLength = true;
|
||||
builder->BezierTo(tcp1, tcp2, segEnd);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_ARC_ABS:
|
||||
@ -432,6 +398,7 @@ SVGPathData::BuildPath(PathBuilder* builder,
|
||||
segEnd += segStart;
|
||||
}
|
||||
if (segEnd != segStart) {
|
||||
subpathHasLength = true;
|
||||
if (radii.x == 0.0f || radii.y == 0.0f) {
|
||||
builder->LineTo(segEnd);
|
||||
} else {
|
||||
@ -442,68 +409,59 @@ SVGPathData::BuildPath(PathBuilder* builder,
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case PATHSEG_LINETO_HORIZONTAL_ABS:
|
||||
segEnd = Point(mData[i], segStart.y);
|
||||
builder->LineTo(segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart);
|
||||
if (segEnd != segStart) {
|
||||
subpathHasLength = true;
|
||||
builder->LineTo(segEnd);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_LINETO_HORIZONTAL_REL:
|
||||
segEnd = segStart + Point(mData[i], 0.0f);
|
||||
builder->LineTo(segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart);
|
||||
if (segEnd != segStart) {
|
||||
subpathHasLength = true;
|
||||
builder->LineTo(segEnd);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_LINETO_VERTICAL_ABS:
|
||||
segEnd = Point(segStart.x, mData[i]);
|
||||
builder->LineTo(segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart);
|
||||
if (segEnd != segStart) {
|
||||
subpathHasLength = true;
|
||||
builder->LineTo(segEnd);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_LINETO_VERTICAL_REL:
|
||||
segEnd = segStart + Point(0.0f, mData[i]);
|
||||
builder->LineTo(segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart);
|
||||
if (segEnd != segStart) {
|
||||
subpathHasLength = true;
|
||||
builder->LineTo(segEnd);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:
|
||||
cp1 = SVGPathSegUtils::IsCubicType(prevSegType) ? segStart * 2 - cp2 : segStart;
|
||||
cp2 = Point(mData[i], mData[i+1]);
|
||||
segEnd = Point(mData[i+2], mData[i+3]);
|
||||
builder->BezierTo(cp1, cp2, segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart || segEnd != cp1 || segEnd != cp2);
|
||||
if (segEnd != segStart || segEnd != cp1 || segEnd != cp2) {
|
||||
subpathHasLength = true;
|
||||
builder->BezierTo(cp1, cp2, segEnd);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_CURVETO_CUBIC_SMOOTH_REL:
|
||||
cp1 = SVGPathSegUtils::IsCubicType(prevSegType) ? segStart * 2 - cp2 : segStart;
|
||||
cp2 = segStart + Point(mData[i], mData[i+1]);
|
||||
segEnd = segStart + Point(mData[i+2], mData[i+3]);
|
||||
builder->BezierTo(cp1, cp2, segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart || segEnd != cp1 || segEnd != cp2);
|
||||
if (segEnd != segStart || segEnd != cp1 || segEnd != cp2) {
|
||||
subpathHasLength = true;
|
||||
builder->BezierTo(cp1, cp2, segEnd);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:
|
||||
@ -512,11 +470,10 @@ SVGPathData::BuildPath(PathBuilder* builder,
|
||||
tcp1 = segStart + (cp1 - segStart) * 2 / 3;
|
||||
segEnd = Point(mData[i], mData[i+1]); // set before setting tcp2!
|
||||
tcp2 = cp1 + (segEnd - cp1) / 3;
|
||||
builder->BezierTo(tcp1, tcp2, segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart || segEnd != cp1);
|
||||
if (segEnd != segStart || segEnd != cp1) {
|
||||
subpathHasLength = true;
|
||||
builder->BezierTo(tcp1, tcp2, segEnd);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:
|
||||
@ -525,17 +482,19 @@ SVGPathData::BuildPath(PathBuilder* builder,
|
||||
tcp1 = segStart + (cp1 - segStart) * 2 / 3;
|
||||
segEnd = segStart + Point(mData[i], mData[i+1]); // changed before setting tcp2!
|
||||
tcp2 = cp1 + (segEnd - cp1) / 3;
|
||||
builder->BezierTo(tcp1, tcp2, segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart || segEnd != cp1);
|
||||
if (segEnd != segStart || segEnd != cp1) {
|
||||
subpathHasLength = true;
|
||||
builder->BezierTo(tcp1, tcp2, segEnd);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
NS_NOTREACHED("Bad path segment type");
|
||||
return nullptr; // according to spec we'd use everything up to the bad seg anyway
|
||||
}
|
||||
|
||||
subpathContainsNonMoveTo = segType != PATHSEG_MOVETO_ABS &&
|
||||
segType != PATHSEG_MOVETO_REL;
|
||||
i += argCount;
|
||||
prevSegType = segType;
|
||||
segStart = segEnd;
|
||||
@ -550,258 +509,6 @@ SVGPathData::BuildPath(PathBuilder* builder,
|
||||
return builder->Finish();
|
||||
}
|
||||
|
||||
void
|
||||
SVGPathData::ConstructPath(gfxContext *aCtx) const
|
||||
{
|
||||
if (mData.IsEmpty() || !IsMoveto(SVGPathSegUtils::DecodeType(mData[0]))) {
|
||||
return; // paths without an initial moveto are invalid
|
||||
}
|
||||
|
||||
bool capsAreSquare = aCtx->CurrentLineCap() == gfxContext::LINE_CAP_SQUARE;
|
||||
bool subpathHasLength = false; // visual length
|
||||
bool subpathContainsNonArc = false;
|
||||
|
||||
uint32_t segType = PATHSEG_UNKNOWN;
|
||||
uint32_t prevSegType = PATHSEG_UNKNOWN;
|
||||
gfxPoint pathStart(0.0, 0.0); // start point of [sub]path
|
||||
gfxPoint segStart(0.0, 0.0);
|
||||
gfxPoint segEnd;
|
||||
gfxPoint cp1, cp2; // previous bezier's control points
|
||||
gfxPoint tcp1, tcp2; // temporaries
|
||||
|
||||
// Regarding cp1 and cp2: If the previous segment was a cubic bezier curve,
|
||||
// then cp2 is its second control point. If the previous segment was a
|
||||
// quadratic curve, then cp1 is its (only) control point.
|
||||
|
||||
uint32_t i = 0;
|
||||
while (i < mData.Length()) {
|
||||
segType = SVGPathSegUtils::DecodeType(mData[i++]);
|
||||
uint32_t argCount = SVGPathSegUtils::ArgCountForType(segType);
|
||||
|
||||
switch (segType)
|
||||
{
|
||||
case PATHSEG_CLOSEPATH:
|
||||
// set this early to allow drawing of square caps for "M{x},{y} Z":
|
||||
subpathContainsNonArc = true;
|
||||
MAYBE_APPROXIMATE_ZERO_LENGTH_SUBPATH_SQUARE_CAPS;
|
||||
segEnd = pathStart;
|
||||
aCtx->ClosePath();
|
||||
break;
|
||||
|
||||
case PATHSEG_MOVETO_ABS:
|
||||
MAYBE_APPROXIMATE_ZERO_LENGTH_SUBPATH_SQUARE_CAPS;
|
||||
pathStart = segEnd = gfxPoint(mData[i], mData[i+1]);
|
||||
aCtx->MoveTo(segEnd);
|
||||
subpathHasLength = false;
|
||||
subpathContainsNonArc = false;
|
||||
break;
|
||||
|
||||
case PATHSEG_MOVETO_REL:
|
||||
MAYBE_APPROXIMATE_ZERO_LENGTH_SUBPATH_SQUARE_CAPS;
|
||||
pathStart = segEnd = segStart + gfxPoint(mData[i], mData[i+1]);
|
||||
aCtx->MoveTo(segEnd);
|
||||
subpathHasLength = false;
|
||||
subpathContainsNonArc = false;
|
||||
break;
|
||||
|
||||
case PATHSEG_LINETO_ABS:
|
||||
segEnd = gfxPoint(mData[i], mData[i+1]);
|
||||
aCtx->LineTo(segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_LINETO_REL:
|
||||
segEnd = segStart + gfxPoint(mData[i], mData[i+1]);
|
||||
aCtx->LineTo(segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_CURVETO_CUBIC_ABS:
|
||||
cp1 = gfxPoint(mData[i], mData[i+1]);
|
||||
cp2 = gfxPoint(mData[i+2], mData[i+3]);
|
||||
segEnd = gfxPoint(mData[i+4], mData[i+5]);
|
||||
aCtx->CurveTo(cp1, cp2, segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart || segEnd != cp1 || segEnd != cp2);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_CURVETO_CUBIC_REL:
|
||||
cp1 = segStart + gfxPoint(mData[i], mData[i+1]);
|
||||
cp2 = segStart + gfxPoint(mData[i+2], mData[i+3]);
|
||||
segEnd = segStart + gfxPoint(mData[i+4], mData[i+5]);
|
||||
aCtx->CurveTo(cp1, cp2, segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart || segEnd != cp1 || segEnd != cp2);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_CURVETO_QUADRATIC_ABS:
|
||||
cp1 = gfxPoint(mData[i], mData[i+1]);
|
||||
// Convert quadratic curve to cubic curve:
|
||||
tcp1 = segStart + (cp1 - segStart) * 2 / 3;
|
||||
segEnd = gfxPoint(mData[i+2], mData[i+3]); // set before setting tcp2!
|
||||
tcp2 = cp1 + (segEnd - cp1) / 3;
|
||||
aCtx->CurveTo(tcp1, tcp2, segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart || segEnd != cp1);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_CURVETO_QUADRATIC_REL:
|
||||
cp1 = segStart + gfxPoint(mData[i], mData[i+1]);
|
||||
// Convert quadratic curve to cubic curve:
|
||||
tcp1 = segStart + (cp1 - segStart) * 2 / 3;
|
||||
segEnd = segStart + gfxPoint(mData[i+2], mData[i+3]); // set before setting tcp2!
|
||||
tcp2 = cp1 + (segEnd - cp1) / 3;
|
||||
aCtx->CurveTo(tcp1, tcp2, segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart || segEnd != cp1);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_ARC_ABS:
|
||||
case PATHSEG_ARC_REL:
|
||||
{
|
||||
gfxPoint radii(mData[i], mData[i+1]);
|
||||
segEnd = gfxPoint(mData[i+5], mData[i+6]);
|
||||
if (segType == PATHSEG_ARC_REL) {
|
||||
segEnd += segStart;
|
||||
}
|
||||
if (segEnd != segStart) {
|
||||
if (radii.x == 0.0f || radii.y == 0.0f) {
|
||||
aCtx->LineTo(segEnd);
|
||||
} else {
|
||||
nsSVGArcConverter converter(ToPoint(segStart), ToPoint(segEnd),
|
||||
ToPoint(radii), mData[i+2],
|
||||
mData[i+3] != 0, mData[i+4] != 0);
|
||||
Point cp1, cp2, segEnd_;
|
||||
while (converter.GetNextSegment(&cp1, &cp2, &segEnd_)) {
|
||||
aCtx->CurveTo(ThebesPoint(cp1), ThebesPoint(cp2), ThebesPoint(segEnd_));
|
||||
}
|
||||
segEnd = ThebesPoint(segEnd_);
|
||||
}
|
||||
}
|
||||
if (!subpathHasLength) {
|
||||
// Round to make sure the current comparison doesn't fail due to
|
||||
// precision issues:
|
||||
// XXX kill after all code is converted to float precision
|
||||
segStart = ThebesPoint(ToPoint(segStart));
|
||||
subpathHasLength = (segEnd != segStart);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case PATHSEG_LINETO_HORIZONTAL_ABS:
|
||||
segEnd = gfxPoint(mData[i], segStart.y);
|
||||
aCtx->LineTo(segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_LINETO_HORIZONTAL_REL:
|
||||
segEnd = segStart + gfxPoint(mData[i], 0.0f);
|
||||
aCtx->LineTo(segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_LINETO_VERTICAL_ABS:
|
||||
segEnd = gfxPoint(segStart.x, mData[i]);
|
||||
aCtx->LineTo(segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_LINETO_VERTICAL_REL:
|
||||
segEnd = segStart + gfxPoint(0.0f, mData[i]);
|
||||
aCtx->LineTo(segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:
|
||||
cp1 = SVGPathSegUtils::IsCubicType(prevSegType) ? segStart * 2 - cp2 : segStart;
|
||||
cp2 = gfxPoint(mData[i], mData[i+1]);
|
||||
segEnd = gfxPoint(mData[i+2], mData[i+3]);
|
||||
aCtx->CurveTo(cp1, cp2, segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart || segEnd != cp1 || segEnd != cp2);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_CURVETO_CUBIC_SMOOTH_REL:
|
||||
cp1 = SVGPathSegUtils::IsCubicType(prevSegType) ? segStart * 2 - cp2 : segStart;
|
||||
cp2 = segStart + gfxPoint(mData[i], mData[i+1]);
|
||||
segEnd = segStart + gfxPoint(mData[i+2], mData[i+3]);
|
||||
aCtx->CurveTo(cp1, cp2, segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart || segEnd != cp1 || segEnd != cp2);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:
|
||||
cp1 = SVGPathSegUtils::IsQuadraticType(prevSegType) ? segStart * 2 - cp1 : segStart;
|
||||
// Convert quadratic curve to cubic curve:
|
||||
tcp1 = segStart + (cp1 - segStart) * 2 / 3;
|
||||
segEnd = gfxPoint(mData[i], mData[i+1]); // set before setting tcp2!
|
||||
tcp2 = cp1 + (segEnd - cp1) / 3;
|
||||
aCtx->CurveTo(tcp1, tcp2, segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart || segEnd != cp1);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
case PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:
|
||||
cp1 = SVGPathSegUtils::IsQuadraticType(prevSegType) ? segStart * 2 - cp1 : segStart;
|
||||
// Convert quadratic curve to cubic curve:
|
||||
tcp1 = segStart + (cp1 - segStart) * 2 / 3;
|
||||
segEnd = segStart + gfxPoint(mData[i], mData[i+1]); // changed before setting tcp2!
|
||||
tcp2 = cp1 + (segEnd - cp1) / 3;
|
||||
aCtx->CurveTo(tcp1, tcp2, segEnd);
|
||||
if (!subpathHasLength) {
|
||||
subpathHasLength = (segEnd != segStart || segEnd != cp1);
|
||||
}
|
||||
subpathContainsNonArc = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
NS_NOTREACHED("Bad path segment type");
|
||||
return; // according to spec we'd use everything up to the bad seg anyway
|
||||
}
|
||||
i += argCount;
|
||||
prevSegType = segType;
|
||||
segStart = segEnd;
|
||||
}
|
||||
|
||||
NS_ABORT_IF_FALSE(i == mData.Length(), "Very, very bad - mData corrupt");
|
||||
NS_ABORT_IF_FALSE(prevSegType == segType,
|
||||
"prevSegType should be left at the final segType");
|
||||
|
||||
MAYBE_APPROXIMATE_ZERO_LENGTH_SUBPATH_SQUARE_CAPS;
|
||||
}
|
||||
|
||||
TemporaryRef<Path>
|
||||
SVGPathData::ToPathForLengthOrPositionMeasuring() const
|
||||
{
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
class gfxContext;
|
||||
class nsSVGPathDataParser; // IWYU pragma: keep
|
||||
|
||||
struct nsSVGMark;
|
||||
@ -166,7 +165,6 @@ public:
|
||||
*/
|
||||
TemporaryRef<Path> ToPathForLengthOrPositionMeasuring() const;
|
||||
|
||||
void ConstructPath(gfxContext *aCtx) const;
|
||||
TemporaryRef<Path> BuildPath(PathBuilder* aBuilder,
|
||||
uint8_t aCapStyle,
|
||||
Float aStrokeWidth) const;
|
||||
|
@ -22,8 +22,6 @@
|
||||
#include "nsStyleStruct.h"
|
||||
#include "SVGContentUtils.h"
|
||||
|
||||
class gfxContext;
|
||||
|
||||
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Path)
|
||||
|
||||
using namespace mozilla::gfx;
|
||||
@ -334,12 +332,6 @@ SVGPathElement::GetMarkPoints(nsTArray<nsSVGMark> *aMarks)
|
||||
mD.GetAnimValue().GetMarkerPositioningData(aMarks);
|
||||
}
|
||||
|
||||
void
|
||||
SVGPathElement::ConstructPath(gfxContext *aCtx)
|
||||
{
|
||||
mD.GetAnimValue().ConstructPath(aCtx);
|
||||
}
|
||||
|
||||
float
|
||||
SVGPathElement::GetPathLengthScale(PathLengthScaleForType aFor)
|
||||
{
|
||||
@ -392,7 +384,7 @@ SVGPathElement::BuildPath(PathBuilder* aBuilder)
|
||||
// exposes hit-testing of strokes that are not actually painted. For that
|
||||
// reason we do not check for eStyleSVGPaintType_None or check the stroke
|
||||
// opacity here.
|
||||
if (style->mStrokeLinecap == NS_STYLE_STROKE_LINECAP_SQUARE) {
|
||||
if (style->mStrokeLinecap != NS_STYLE_STROKE_LINECAP_BUTT) {
|
||||
strokeLineCap = style->mStrokeLinecap;
|
||||
strokeWidth = SVGContentUtils::GetStrokeWidth(this, styleContext, nullptr);
|
||||
}
|
||||
|
@ -16,8 +16,6 @@
|
||||
nsresult NS_NewSVGPathElement(nsIContent **aResult,
|
||||
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
||||
|
||||
class gfxContext;
|
||||
|
||||
typedef nsSVGPathGeometryElement SVGPathElementBase;
|
||||
|
||||
namespace mozilla {
|
||||
@ -52,7 +50,6 @@ public:
|
||||
virtual bool AttributeDefinesGeometry(const nsIAtom *aName) MOZ_OVERRIDE;
|
||||
virtual bool IsMarkable() MOZ_OVERRIDE;
|
||||
virtual void GetMarkPoints(nsTArray<nsSVGMark> *aMarks) MOZ_OVERRIDE;
|
||||
virtual void ConstructPath(gfxContext *aCtx) MOZ_OVERRIDE;
|
||||
virtual TemporaryRef<Path> BuildPath(PathBuilder* aBuilder = nullptr) MOZ_OVERRIDE;
|
||||
|
||||
/**
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include "SVGPathSegUtils.h"
|
||||
|
||||
#include "gfx2DGlue.h"
|
||||
#include "gfxPoint.h"
|
||||
#include "nsSVGPathDataParser.h"
|
||||
#include "nsTextFormatter.h"
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
#include "mozilla/dom/SVGPolygonElement.h"
|
||||
#include "mozilla/dom/SVGPolygonElementBinding.h"
|
||||
#include "gfxContext.h"
|
||||
#include "SVGContentUtils.h"
|
||||
|
||||
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(Polygon)
|
||||
@ -58,14 +57,5 @@ SVGPolygonElement::GetMarkPoints(nsTArray<nsSVGMark> *aMarks)
|
||||
nsSVGMark::eEnd));
|
||||
}
|
||||
|
||||
void
|
||||
SVGPolygonElement::ConstructPath(gfxContext *aCtx)
|
||||
{
|
||||
SVGPolygonElementBase::ConstructPath(aCtx);
|
||||
// the difference between a polyline and a polygon is that the
|
||||
// polygon is closed:
|
||||
aCtx->ClosePath();
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
@ -28,7 +28,6 @@ protected:
|
||||
public:
|
||||
// nsSVGPathGeometryElement methods:
|
||||
virtual void GetMarkPoints(nsTArray<nsSVGMark> *aMarks) MOZ_OVERRIDE;
|
||||
virtual void ConstructPath(gfxContext *aCtx) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const;
|
||||
};
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
#include "mozilla/dom/SVGRectElement.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "gfxContext.h"
|
||||
#include "mozilla/dom/SVGRectElementBinding.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/gfx/PathHelpers.h"
|
||||
@ -109,49 +108,6 @@ SVGRectElement::GetLengthInfo()
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGPathGeometryElement methods
|
||||
|
||||
void
|
||||
SVGRectElement::ConstructPath(gfxContext *aCtx)
|
||||
{
|
||||
float x, y, width, height, rx, ry;
|
||||
|
||||
GetAnimatedLengthValues(&x, &y, &width, &height, &rx, &ry, nullptr);
|
||||
|
||||
/* In a perfect world, this would be handled by the DOM, and
|
||||
return a DOM exception. */
|
||||
if (width <= 0 || height <= 0)
|
||||
return;
|
||||
|
||||
rx = std::max(rx, 0.0f);
|
||||
ry = std::max(ry, 0.0f);
|
||||
|
||||
/* optimize the no rounded corners case */
|
||||
if (rx == 0 && ry == 0) {
|
||||
aCtx->Rectangle(gfxRect(x, y, width, height));
|
||||
return;
|
||||
}
|
||||
|
||||
/* If either the 'rx' or the 'ry' attribute isn't set, then we
|
||||
have to set it to the value of the other. */
|
||||
bool hasRx = mLengthAttributes[ATTR_RX].IsExplicitlySet();
|
||||
bool hasRy = mLengthAttributes[ATTR_RY].IsExplicitlySet();
|
||||
if (hasRx && !hasRy)
|
||||
ry = rx;
|
||||
else if (hasRy && !hasRx)
|
||||
rx = ry;
|
||||
|
||||
/* Clamp rx and ry to half the rect's width and height respectively. */
|
||||
float halfWidth = width/2;
|
||||
float halfHeight = height/2;
|
||||
if (rx > halfWidth)
|
||||
rx = halfWidth;
|
||||
if (ry > halfHeight)
|
||||
ry = halfHeight;
|
||||
|
||||
gfxSize corner(rx, ry);
|
||||
aCtx->RoundedRectangle(gfxRect(x, y, width, height),
|
||||
gfxCornerSizes(corner, corner, corner, corner));
|
||||
}
|
||||
|
||||
TemporaryRef<Path>
|
||||
SVGRectElement::BuildPath(PathBuilder* aBuilder)
|
||||
{
|
||||
|
@ -30,7 +30,6 @@ public:
|
||||
virtual bool HasValidDimensions() const MOZ_OVERRIDE;
|
||||
|
||||
// nsSVGPathGeometryElement methods:
|
||||
virtual void ConstructPath(gfxContext *aCtx) MOZ_OVERRIDE;
|
||||
virtual TemporaryRef<Path> BuildPath(PathBuilder* aBuilder = nullptr) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
|
||||
|
@ -259,6 +259,7 @@ LOCAL_INCLUDES += [
|
||||
'/dom/smil',
|
||||
'/dom/xbl',
|
||||
'/dom/xml',
|
||||
'/layout/base',
|
||||
'/layout/generic',
|
||||
'/layout/style',
|
||||
'/layout/svg',
|
||||
|
@ -51,6 +51,7 @@
|
||||
#include "nsSMILAnimationController.h"
|
||||
#include "mozilla/dom/SVGElementBinding.h"
|
||||
#include "mozilla/unused.h"
|
||||
#include "RestyleManager.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
@ -916,17 +917,18 @@ nsSVGElement::WalkAnimatedContentStyleRules(nsRuleWalker* aRuleWalker)
|
||||
// whether this is a "no-animation restyle". (This should match the check
|
||||
// in nsHTMLCSSStyleSheet::RulesMatching(), where we determine whether to
|
||||
// apply the SMILOverrideStyle.)
|
||||
nsIDocument* doc = OwnerDoc();
|
||||
nsIPresShell* shell = doc->GetShell();
|
||||
nsPresContext* context = shell ? shell->GetPresContext() : nullptr;
|
||||
if (context && context->IsProcessingRestyles() &&
|
||||
!context->IsProcessingAnimationStyleChange()) {
|
||||
// Any style changes right now could trigger CSS Transitions. We don't
|
||||
// want that to happen from SMIL-animated value of mapped attrs, so
|
||||
// ignore animated value for now, and request an animation restyle to
|
||||
// get our animated value noticed.
|
||||
shell->RestyleForAnimation(this,
|
||||
eRestyle_SVGAttrAnimations | eRestyle_ChangeAnimationPhase);
|
||||
nsPresContext* context = aRuleWalker->PresContext();
|
||||
nsIPresShell* shell = context->PresShell();
|
||||
RestyleManager* restyleManager = context->RestyleManager();
|
||||
if (restyleManager->SkipAnimationRules()) {
|
||||
if (restyleManager->PostAnimationRestyles()) {
|
||||
// Any style changes right now could trigger CSS Transitions. We don't
|
||||
// want that to happen from SMIL-animated value of mapped attrs, so
|
||||
// ignore animated value for now, and request an animation restyle to
|
||||
// get our animated value noticed.
|
||||
shell->RestyleForAnimation(this,
|
||||
eRestyle_SVGAttrAnimations | eRestyle_ChangeAnimationPhase);
|
||||
}
|
||||
} else {
|
||||
// Ok, this is an animation restyle -- go ahead and update/walk the
|
||||
// animated content style rule.
|
||||
|
@ -26,8 +26,6 @@ struct nsSVGMark {
|
||||
x(aX), y(aY), angle(aAngle), type(aType) {}
|
||||
};
|
||||
|
||||
class gfxContext;
|
||||
|
||||
typedef mozilla::dom::SVGGraphicsElement nsSVGPathGeometryElementBase;
|
||||
|
||||
class nsSVGPathGeometryElement : public nsSVGPathGeometryElementBase
|
||||
@ -56,7 +54,6 @@ public:
|
||||
|
||||
virtual bool IsMarkable();
|
||||
virtual void GetMarkPoints(nsTArray<nsSVGMark> *aMarks);
|
||||
virtual void ConstructPath(gfxContext *aCtx) = 0;
|
||||
|
||||
/**
|
||||
* Returns a Path that can be used to paint, hit-test or calculate bounds for
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
#include "nsSVGPolyElement.h"
|
||||
#include "DOMSVGPointList.h"
|
||||
#include "gfxContext.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "SVGContentUtils.h"
|
||||
|
||||
@ -121,20 +120,6 @@ nsSVGPolyElement::GetMarkPoints(nsTArray<nsSVGMark> *aMarks)
|
||||
aMarks->LastElement().type = nsSVGMark::eEnd;
|
||||
}
|
||||
|
||||
void
|
||||
nsSVGPolyElement::ConstructPath(gfxContext *aCtx)
|
||||
{
|
||||
const SVGPointList &points = mPoints.GetAnimValue();
|
||||
|
||||
if (!points.Length())
|
||||
return;
|
||||
|
||||
aCtx->MoveTo(points[0]);
|
||||
for (uint32_t i = 1; i < points.Length(); ++i) {
|
||||
aCtx->LineTo(points[i]);
|
||||
}
|
||||
}
|
||||
|
||||
TemporaryRef<Path>
|
||||
nsSVGPolyElement::BuildPath(PathBuilder* aBuilder)
|
||||
{
|
||||
|
@ -12,8 +12,6 @@
|
||||
|
||||
typedef nsSVGPathGeometryElement nsSVGPolyElementBase;
|
||||
|
||||
class gfxContext;
|
||||
|
||||
namespace mozilla {
|
||||
class DOMSVGPointList;
|
||||
}
|
||||
@ -47,7 +45,6 @@ public:
|
||||
virtual bool AttributeDefinesGeometry(const nsIAtom *aName) MOZ_OVERRIDE;
|
||||
virtual bool IsMarkable() MOZ_OVERRIDE { return true; }
|
||||
virtual void GetMarkPoints(nsTArray<nsSVGMark> *aMarks) MOZ_OVERRIDE;
|
||||
virtual void ConstructPath(gfxContext *aCtx) MOZ_OVERRIDE;
|
||||
virtual mozilla::TemporaryRef<Path> BuildPath(PathBuilder* aBuilder = nullptr) MOZ_OVERRIDE;
|
||||
|
||||
// WebIDL
|
||||
|
@ -114,9 +114,9 @@ nsSVGTransform::SetRotate(float aAngle, float aCx, float aCy)
|
||||
{
|
||||
mType = SVG_TRANSFORM_ROTATE;
|
||||
mMatrix.Reset();
|
||||
mMatrix.Translate(gfxPoint(aCx, aCy));
|
||||
mMatrix.Translate(aCx, aCy);
|
||||
mMatrix.Rotate(aAngle*kRadPerDegree);
|
||||
mMatrix.Translate(gfxPoint(-aCx, -aCy));
|
||||
mMatrix.Translate(-aCx, -aCy);
|
||||
mAngle = aAngle;
|
||||
mOriginX = aCx;
|
||||
mOriginY = aCy;
|
||||
|
@ -612,7 +612,7 @@ WebappsApplication.prototype = {
|
||||
case "Webapps:Connect:Return:OK":
|
||||
this.removeMessageListeners(["Webapps:Connect:Return:OK",
|
||||
"Webapps:Connect:Return:KO"]);
|
||||
let messagePorts = [];
|
||||
let messagePorts = new this._window.Array();
|
||||
msg.messagePortIDs.forEach((aPortID) => {
|
||||
let port = new this._window.MozInterAppMessagePort(aPortID);
|
||||
messagePorts.push(port);
|
||||
@ -626,7 +626,7 @@ WebappsApplication.prototype = {
|
||||
break;
|
||||
case "Webapps:GetConnections:Return:OK":
|
||||
this.removeMessageListeners(aMessage.name);
|
||||
let connections = [];
|
||||
let connections = new this._window.Array();
|
||||
msg.connections.forEach((aConnection) => {
|
||||
let connection =
|
||||
new this._window.MozInterAppConnection(aConnection.keyword,
|
||||
|
@ -2117,7 +2117,14 @@ nsDOMWindowUtils::SendCompositionEvent(const nsAString& aType,
|
||||
} else if (aType.EqualsLiteral("compositionend")) {
|
||||
msg = NS_COMPOSITION_END;
|
||||
} else if (aType.EqualsLiteral("compositionupdate")) {
|
||||
msg = NS_COMPOSITION_UPDATE;
|
||||
// Now we don't support manually dispatching composition update with this
|
||||
// API. compositionupdate is dispatched when text event modifies
|
||||
// composition string automatically. For backward compatibility, this
|
||||
// shouldn't return error in this case.
|
||||
NS_WARNING("Don't call nsIDOMWindowUtils.sendCompositionEvent() for "
|
||||
"compositionupdate since it's ignored and the event is "
|
||||
"fired automatically when it's necessary");
|
||||
return NS_OK;
|
||||
} else {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -123,8 +123,10 @@ public:
|
||||
*/
|
||||
void UpdateWrapper(JSObject* aNewObject, const JSObject* aOldObject)
|
||||
{
|
||||
MOZ_ASSERT(mWrapper == aOldObject);
|
||||
mWrapper = aNewObject;
|
||||
if (mWrapper) {
|
||||
MOZ_ASSERT(mWrapper == aOldObject);
|
||||
mWrapper = aNewObject;
|
||||
}
|
||||
}
|
||||
|
||||
bool PreservingWrapper()
|
||||
|
@ -1595,17 +1595,10 @@ bool
|
||||
HasPropertyOnPrototype(JSContext* cx, JS::Handle<JSObject*> proxy,
|
||||
JS::Handle<jsid> id)
|
||||
{
|
||||
JS::Rooted<JSObject*> obj(cx, proxy);
|
||||
Maybe<JSAutoCompartment> ac;
|
||||
if (xpc::WrapperFactory::IsXrayWrapper(obj)) {
|
||||
obj = js::UncheckedUnwrap(obj);
|
||||
ac.emplace(cx, obj);
|
||||
}
|
||||
|
||||
bool found;
|
||||
// We ignore an error from GetPropertyOnPrototype. We pass nullptr
|
||||
// for vp so that GetPropertyOnPrototype won't actually do a get.
|
||||
return !GetPropertyOnPrototype(cx, obj, id, &found, nullptr) || found;
|
||||
return !GetPropertyOnPrototype(cx, proxy, id, &found, nullptr) || found;
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -43,8 +43,15 @@ const BT_PAIRING_REQ = "bluetooth-pairing-request";
|
||||
const BT_PAIRING_PASSKEY = 123456;
|
||||
const BT_PAIRING_PINCODE = "ABCDEFG";
|
||||
|
||||
let Promise =
|
||||
SpecialPowers.Cu.import("resource://gre/modules/Promise.jsm").Promise;
|
||||
// Emulate Promise.jsm semantics.
|
||||
Promise.defer = function() { return new Deferred(); }
|
||||
function Deferred() {
|
||||
this.promise = new Promise(function(resolve, reject) {
|
||||
this.resolve = resolve;
|
||||
this.reject = reject;
|
||||
}.bind(this));
|
||||
Object.freeze(this);
|
||||
}
|
||||
|
||||
let bluetoothManager;
|
||||
|
||||
|
@ -36,8 +36,15 @@ const BDADDR_LOCAL = "ff:ff:ff:00:00:00";
|
||||
// A user friendly name for remote BT device.
|
||||
const REMOTE_DEVICE_NAME = "Remote_BT_Device";
|
||||
|
||||
let Promise =
|
||||
SpecialPowers.Cu.import("resource://gre/modules/Promise.jsm").Promise;
|
||||
// Emulate Promise.jsm semantics.
|
||||
Promise.defer = function() { return new Deferred(); }
|
||||
function Deferred() {
|
||||
this.promise = new Promise(function(resolve, reject) {
|
||||
this.resolve = resolve;
|
||||
this.reject = reject;
|
||||
}.bind(this));
|
||||
Object.freeze(this);
|
||||
}
|
||||
|
||||
let bluetoothManager;
|
||||
|
||||
|
@ -3,7 +3,15 @@
|
||||
|
||||
const {Cc: Cc, Ci: Ci, Cr: Cr, Cu: Cu} = SpecialPowers;
|
||||
|
||||
let Promise = Cu.import("resource://gre/modules/Promise.jsm").Promise;
|
||||
// Emulate Promise.jsm semantics.
|
||||
Promise.defer = function() { return new Deferred(); }
|
||||
function Deferred() {
|
||||
this.promise = new Promise(function(resolve, reject) {
|
||||
this.resolve = resolve;
|
||||
this.reject = reject;
|
||||
}.bind(this));
|
||||
Object.freeze(this);
|
||||
}
|
||||
|
||||
const PDU_DCS_CODING_GROUP_BITS = 0xF0;
|
||||
const PDU_DCS_MSG_CODING_7BITS_ALPHABET = 0x00;
|
||||
|
@ -820,7 +820,6 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
|
||||
compositionEvent->data = selectedText.mReply.mString;
|
||||
}
|
||||
// through to compositionend handling
|
||||
case NS_COMPOSITION_UPDATE:
|
||||
case NS_COMPOSITION_END:
|
||||
{
|
||||
WidgetCompositionEvent* compositionEvent = aEvent->AsCompositionEvent();
|
||||
|
@ -908,6 +908,9 @@ IMEStateManager::DispatchCompositionEvent(nsINode* aEventTargetNode,
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(aEvent->message != NS_COMPOSITION_UPDATE,
|
||||
"compositionupdate event shouldn't be dispatched manually");
|
||||
|
||||
EnsureTextCompositionArray();
|
||||
|
||||
WidgetGUIEvent* GUIEvent = aEvent->AsGUIEvent();
|
||||
|
@ -81,16 +81,9 @@ TextComposition::MaybeDispatchCompositionUpdate(const WidgetTextEvent* aEvent)
|
||||
aEvent->mFlags.mIsSynthesizedForTests;
|
||||
|
||||
nsEventStatus status = nsEventStatus_eConsumeNoDefault;
|
||||
if (aEvent->mFlags.mIsSynthesizedForTests &&
|
||||
(mIsRequestingCommit || mIsRequestingCancel)) {
|
||||
// At emulating commit/cancel request, compositionupdate should be
|
||||
// dispatched via widget since it's more similar path to native event.
|
||||
aEvent->widget->DispatchEvent(&compositionUpdate, status);
|
||||
} else {
|
||||
mLastData = compositionUpdate.data;
|
||||
EventDispatcher::Dispatch(mNode, mPresContext,
|
||||
&compositionUpdate, nullptr, &status, nullptr);
|
||||
}
|
||||
mLastData = compositionUpdate.data;
|
||||
EventDispatcher::Dispatch(mNode, mPresContext,
|
||||
&compositionUpdate, nullptr, &status, nullptr);
|
||||
return !Destroyed();
|
||||
}
|
||||
|
||||
@ -152,7 +145,6 @@ TextComposition::DispatchEvent(WidgetGUIEvent* aEvent,
|
||||
if (!aIsSynthesized && (mIsRequestingCommit || mIsRequestingCancel)) {
|
||||
nsString* committingData = nullptr;
|
||||
switch (aEvent->message) {
|
||||
case NS_COMPOSITION_UPDATE:
|
||||
case NS_COMPOSITION_END:
|
||||
committingData = &aEvent->AsCompositionEvent()->data;
|
||||
break;
|
||||
@ -171,26 +163,13 @@ TextComposition::DispatchEvent(WidgetGUIEvent* aEvent,
|
||||
} else if (mIsRequestingCancel && !committingData->IsEmpty()) {
|
||||
committingData->Truncate();
|
||||
}
|
||||
|
||||
if (aEvent->message == NS_COMPOSITION_UPDATE) {
|
||||
// If committing string is not different from the last data,
|
||||
// we don't need to dispatch this.
|
||||
if (committingData->Equals(mLastData)) {
|
||||
return;
|
||||
}
|
||||
} else if (aEvent->message == NS_TEXT_TEXT) {
|
||||
// If committing string is different from the last data,
|
||||
// we need to dispatch compositionupdate before dispatching text event.
|
||||
if (!MaybeDispatchCompositionUpdate(aEvent->AsTextEvent())) {
|
||||
NS_WARNING("Dispatching compositionupdate caused destroying");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (aEvent->message == NS_COMPOSITION_UPDATE) {
|
||||
mLastData = aEvent->AsCompositionEvent()->data;
|
||||
if (aEvent->message == NS_TEXT_TEXT) {
|
||||
if (!MaybeDispatchCompositionUpdate(aEvent->AsTextEvent())) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
EventDispatcher::Dispatch(mNode, mPresContext,
|
||||
@ -341,15 +320,11 @@ TextComposition::RequestToCommit(nsIWidget* aWidget, bool aDiscard)
|
||||
|
||||
// Otherwise, synthesize the commit in content.
|
||||
nsAutoString data(aDiscard ? EmptyString() : lastData);
|
||||
bool changingData = lastData != data;
|
||||
if (changingData) {
|
||||
DispatchCompositionEventRunnable(NS_COMPOSITION_UPDATE, data, true);
|
||||
}
|
||||
// If the last composition string and new data are different, we need to
|
||||
// dispatch text event for removing IME selection. However, if the commit
|
||||
// string is empty string and it's not changed from the last data, we don't
|
||||
// need to dispatch text event.
|
||||
if (changingData || !data.IsEmpty()) {
|
||||
if (lastData != data || !data.IsEmpty()) {
|
||||
DispatchCompositionEventRunnable(NS_TEXT_TEXT, data, true);
|
||||
}
|
||||
DispatchCompositionEventRunnable(NS_COMPOSITION_END, data, true);
|
||||
@ -468,7 +443,6 @@ TextComposition::CompositionEventDispatcher::Run()
|
||||
mIsSynthesizedEvent);
|
||||
break;
|
||||
}
|
||||
case NS_COMPOSITION_UPDATE:
|
||||
case NS_COMPOSITION_END: {
|
||||
WidgetCompositionEvent compEvent(true, mEventMessage, widget);
|
||||
compEvent.data = mData;
|
||||
|
@ -314,7 +314,7 @@ private:
|
||||
*
|
||||
* @param aEventMessage Must be one of composition event or text event.
|
||||
* @param aData Used for data value if aEventMessage is
|
||||
* NS_COMPOSITION_UPDATE or NS_COMPOSITION_END.
|
||||
* NS_COMPOSITION_END.
|
||||
* Used for theText value if aEventMessage is
|
||||
* NS_TEXT_TEXT.
|
||||
* @param aIsSynthesizingCommit true if this is called for synthesizing
|
||||
|
@ -1180,7 +1180,6 @@ function replaceSurroundingText(element, text, selectionStart, selectionEnd,
|
||||
|
||||
let CompositionManager = {
|
||||
_isStarted: false,
|
||||
_text: '',
|
||||
_clauseAttrMap: {
|
||||
'raw-input':
|
||||
Ci.nsICompositionStringSynthesizer.ATTR_RAWINPUT,
|
||||
@ -1233,14 +1232,9 @@ let CompositionManager = {
|
||||
if (!this._isStarted) {
|
||||
this._isStarted = true;
|
||||
domWindowUtils.sendCompositionEvent('compositionstart', '', '');
|
||||
this._text = '';
|
||||
}
|
||||
|
||||
// Update the composing text.
|
||||
if (this._text !== text) {
|
||||
this._text = text;
|
||||
domWindowUtils.sendCompositionEvent('compositionupdate', text, '');
|
||||
}
|
||||
let compositionString = domWindowUtils.createCompositionStringSynthesizer();
|
||||
compositionString.setString(text);
|
||||
for (var i = 0; i < clauseLens.length; i++) {
|
||||
@ -1257,9 +1251,6 @@ let CompositionManager = {
|
||||
return;
|
||||
}
|
||||
// Update the composing text.
|
||||
if (this._text !== text) {
|
||||
domWindowUtils.sendCompositionEvent('compositionupdate', text, '');
|
||||
}
|
||||
let compositionString = domWindowUtils.createCompositionStringSynthesizer();
|
||||
compositionString.setString(text);
|
||||
// Set the cursor position to |text.length| so that the text will be
|
||||
@ -1267,7 +1258,6 @@ let CompositionManager = {
|
||||
compositionString.setCaret(text.length, 0);
|
||||
compositionString.dispatchEvent();
|
||||
domWindowUtils.sendCompositionEvent('compositionend', text, '');
|
||||
this._text = '';
|
||||
this._isStarted = false;
|
||||
},
|
||||
|
||||
@ -1277,7 +1267,6 @@ let CompositionManager = {
|
||||
return;
|
||||
}
|
||||
|
||||
this._text = '';
|
||||
this._isStarted = false;
|
||||
}
|
||||
};
|
||||
|
@ -55,10 +55,10 @@ SpecialPowers.pushPrefEnv({'set':[
|
||||
// Finally, poll for the new crash record.
|
||||
function tryGetCrash() {
|
||||
info("Waiting for getCrashes");
|
||||
crashMan.getCrashes().then(function (crashes) {
|
||||
crashMan.getCrashes().then(SpecialPowers.wrapCallback(function (crashes) {
|
||||
if (crashes.length) {
|
||||
is(crashes.length, 1, "There should be only one record");
|
||||
var crash = SpecialPowers.wrap(crashes[0]);
|
||||
var crash = crashes[0];
|
||||
ok(crash.isOfType(crashMan.PROCESS_TYPE_CONTENT,
|
||||
crashMan.CRASH_TYPE_CRASH),
|
||||
"Record should be a content crash");
|
||||
@ -75,7 +75,7 @@ SpecialPowers.pushPrefEnv({'set':[
|
||||
else {
|
||||
setTimeout(tryGetCrash, 1000);
|
||||
}
|
||||
}, function (err) {
|
||||
}), function (err) {
|
||||
ok(false, "Error getting crashes: " + err);
|
||||
SimpleTest.finish();
|
||||
});
|
||||
|
@ -3,7 +3,15 @@
|
||||
|
||||
const {Cc: Cc, Ci: Ci, Cr: Cr, Cu: Cu} = SpecialPowers;
|
||||
|
||||
let Promise = Cu.import("resource://gre/modules/Promise.jsm").Promise;
|
||||
// Emulate Promise.jsm semantics.
|
||||
Promise.defer = function() { return new Deferred(); }
|
||||
function Deferred() {
|
||||
this.promise = new Promise(function(resolve, reject) {
|
||||
this.resolve = resolve;
|
||||
this.reject = reject;
|
||||
}.bind(this));
|
||||
Object.freeze(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Push a list of preference settings. Never reject.
|
||||
|
@ -168,11 +168,9 @@ function expandPermissions(aPerms) {
|
||||
var perms = [];
|
||||
aPerms.forEach(function(el) {
|
||||
var access = permTable[el].access ? "readwrite" : null;
|
||||
var expanded = SpecialPowers.unwrap(expand(el, access));
|
||||
// COW arrays don't behave array-like enough, to allow
|
||||
// using expanded.slice(0) here.
|
||||
var expanded = expand(el, access);
|
||||
for (let i = 0; i < expanded.length; i++) {
|
||||
perms.push(expanded[i]);
|
||||
perms.push(SpecialPowers.unwrap(expanded[i]));
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -69,7 +69,7 @@ function crashAndGetCrashServiceRecord(crashMethodName, callback) {
|
||||
// the new record.
|
||||
function tryGetCrash() {
|
||||
info("Waiting for getCrashes");
|
||||
crashMan.getCrashes().then(function (crashes) {
|
||||
crashMan.getCrashes().then(SpecialPowers.wrapCallback(function (crashes) {
|
||||
if (crashes.length) {
|
||||
is(crashes.length, 1, "There should be only one record");
|
||||
var crash = SpecialPowers.wrap(crashes[0]);
|
||||
@ -86,7 +86,7 @@ function crashAndGetCrashServiceRecord(crashMethodName, callback) {
|
||||
else {
|
||||
setTimeout(tryGetCrash, 1000);
|
||||
}
|
||||
}, function (err) {
|
||||
}), function (err) {
|
||||
ok(false, "Error getting crashes: " + err);
|
||||
SimpleTest.finish();
|
||||
});
|
||||
|
@ -415,8 +415,8 @@ WifiGeoPositionProvider.prototype = {
|
||||
.getService(Ci.nsIMobileConnectionService);
|
||||
|
||||
let result = [];
|
||||
for (let i = 0; i < service.length; i++) {
|
||||
LOG("Looking for SIM in slot:" + i + " of " + service.length);
|
||||
for (let i = 0; i < service.numItems; i++) {
|
||||
LOG("Looking for SIM in slot:" + i + " of " + service.numItems);
|
||||
let connection = service.getItemByServiceId(i);
|
||||
let voice = connection && connection.voice;
|
||||
let cell = voice && voice.cell;
|
||||
@ -424,12 +424,26 @@ WifiGeoPositionProvider.prototype = {
|
||||
let network = voice && voice.network;
|
||||
|
||||
if (network && cell && type) {
|
||||
if (type === "gsm" || type === "gprs" || type === "edge") {
|
||||
type = "gsm";
|
||||
} else {
|
||||
type = "wcdma";
|
||||
}
|
||||
result.push({ radio: type,
|
||||
let radioTechFamily;
|
||||
switch (type) {
|
||||
case "gsm":
|
||||
case "gprs":
|
||||
case "edge":
|
||||
radioTechFamily = "gsm";
|
||||
break;
|
||||
case "umts":
|
||||
case "hsdpa":
|
||||
case "hsupa":
|
||||
case "hspa":
|
||||
case "hspa+":
|
||||
radioTechFamily = "wcdma";
|
||||
break;
|
||||
case "lte":
|
||||
radioTechFamily = "lte";
|
||||
break;
|
||||
// CDMA cases to be handled in bug 1010282
|
||||
};
|
||||
result.push({ radio: radioTechFamily,
|
||||
mobileCountryCode: voice.network.mcc,
|
||||
mobileNetworkCode: voice.network.mnc,
|
||||
locationAreaCode: cell.gsmLocationAreaCode,
|
||||
|
@ -799,7 +799,8 @@ RILContentHelper.prototype = {
|
||||
let window = this._windowsMap[message.requestId];
|
||||
delete this._windowsMap[message.requestId];
|
||||
let contacts = message.contacts;
|
||||
let result = contacts.map(function(c) {
|
||||
let result = new window.Array();
|
||||
contacts.forEach(function(c) {
|
||||
let prop = {name: [c.alphaId], tel: [{value: c.number}]};
|
||||
|
||||
if (c.email) {
|
||||
@ -814,7 +815,7 @@ RILContentHelper.prototype = {
|
||||
|
||||
let contact = new window.mozContact(prop);
|
||||
contact.id = c.contactId;
|
||||
return contact;
|
||||
result.push(contact);
|
||||
});
|
||||
|
||||
this.fireRequestSuccess(message.requestId, result);
|
||||
|
@ -1,7 +1,16 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
let Promise = SpecialPowers.Cu.import("resource://gre/modules/Promise.jsm").Promise;
|
||||
// Emulate Promise.jsm semantics.
|
||||
Promise.defer = function() { return new Deferred(); }
|
||||
function Deferred() {
|
||||
this.promise = new Promise(function(resolve, reject) {
|
||||
this.resolve = resolve;
|
||||
this.reject = reject;
|
||||
}.bind(this));
|
||||
Object.freeze(this);
|
||||
}
|
||||
|
||||
let telephony;
|
||||
let conference;
|
||||
|
||||
|
@ -25,8 +25,15 @@ const TETHERING_SETTING_KEY = "1234567890";
|
||||
|
||||
const SETTINGS_RIL_DATA_ENABLED = 'ril.data.enabled';
|
||||
|
||||
let Promise =
|
||||
SpecialPowers.Cu.import("resource://gre/modules/Promise.jsm").Promise;
|
||||
// Emulate Promise.jsm semantics.
|
||||
Promise.defer = function() { return new Deferred(); }
|
||||
function Deferred() {
|
||||
this.promise = new Promise(function(resolve, reject) {
|
||||
this.resolve = resolve;
|
||||
this.reject = reject;
|
||||
}.bind(this));
|
||||
Object.freeze(this);
|
||||
}
|
||||
|
||||
let gTestSuite = (function() {
|
||||
let suite = {};
|
||||
|
@ -5,10 +5,18 @@
|
||||
|
||||
const {Cc: Cc, Ci: Ci, Cr: Cr, Cu: Cu} = SpecialPowers;
|
||||
|
||||
let RIL = {};
|
||||
Cu.import("resource://gre/modules/ril_consts.js", RIL);
|
||||
let RIL = SpecialPowers.wrap(SpecialPowers.createBlankObject());
|
||||
SpecialPowers.Cu.import("resource://gre/modules/ril_consts.js", RIL);
|
||||
|
||||
let Promise = Cu.import("resource://gre/modules/Promise.jsm").Promise;
|
||||
// Emulate Promise.jsm semantics.
|
||||
Promise.defer = function() { return new Deferred(); }
|
||||
function Deferred() {
|
||||
this.promise = new Promise(function(resolve, reject) {
|
||||
this.resolve = resolve;
|
||||
this.reject = reject;
|
||||
}.bind(this));
|
||||
Object.freeze(this);
|
||||
}
|
||||
|
||||
const MWI_PDU_PREFIX = "0000";
|
||||
const MWI_PDU_UDH_PREFIX = "0040";
|
||||
|
@ -160,7 +160,7 @@ DOMWifiManager.prototype = {
|
||||
},
|
||||
|
||||
_convertWifiNetworks: function(aNetworks) {
|
||||
let networks = [];
|
||||
let networks = new this._window.Array();
|
||||
for (let i in aNetworks) {
|
||||
networks.push(this._convertWifiNetwork(aNetworks[i]));
|
||||
}
|
||||
|
@ -1,7 +1,15 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
let Promise = SpecialPowers.Cu.import('resource://gre/modules/Promise.jsm').Promise;
|
||||
// Emulate Promise.jsm semantics.
|
||||
Promise.defer = function() { return new Deferred(); }
|
||||
function Deferred() {
|
||||
this.promise = new Promise(function(resolve, reject) {
|
||||
this.resolve = resolve;
|
||||
this.reject = reject;
|
||||
}.bind(this));
|
||||
Object.freeze(this);
|
||||
}
|
||||
|
||||
const STOCK_HOSTAPD_NAME = 'goldfish-hostapd';
|
||||
const HOSTAPD_CONFIG_PATH = '/data/misc/wifi/remote-hostapd/';
|
||||
|
@ -47,7 +47,6 @@ function runTests()
|
||||
}
|
||||
|
||||
synthesizeComposition({ type: "compositionstart" });
|
||||
synthesizeComposition({ type: "compositionupdate", data: aInsertString });
|
||||
synthesizeText(
|
||||
{ "composition":
|
||||
{ "string": aInsertString,
|
||||
|
@ -53,7 +53,6 @@ function runTests()
|
||||
|
||||
// input first character
|
||||
composingString = "\u306B";
|
||||
synthesizeComposition({ type: "compositionupdate", data: composingString });
|
||||
synthesizeText(
|
||||
{ "composition":
|
||||
{ "string": composingString,
|
||||
@ -67,7 +66,6 @@ function runTests()
|
||||
|
||||
// input second character
|
||||
composingString = "\u306B\u3085";
|
||||
synthesizeComposition({ type: "compositionupdate", data: composingString });
|
||||
synthesizeText(
|
||||
{ "composition":
|
||||
{ "string": composingString,
|
||||
|
@ -122,7 +122,6 @@ function doCompositionTest(aElement, aElementDescription, aCallback)
|
||||
"\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u3088\u308a" +
|
||||
"\u77ed\u6642\u9593\u3067\u7c21\u5358\u306b\u4f5c\u6210\u3067" +
|
||||
"\u304d\u307e\u3059\u3002";
|
||||
synthesizeComposition({ type: "compositionupdate", data: str });
|
||||
synthesizeText({
|
||||
composition: {
|
||||
string: str,
|
||||
@ -135,7 +134,6 @@ function doCompositionTest(aElement, aElementDescription, aCallback)
|
||||
hitEventLoop(function () {
|
||||
isnot(aElement.scrollTop, 0,
|
||||
aElementDescription + " was not scrolled by composition");
|
||||
synthesizeComposition({ type: "compositionupdate", data: "" });
|
||||
synthesizeText({
|
||||
composition: { string: "", clauses: [ { length: 0, attr: 0 } ] },
|
||||
caret: { start: 0, length: 0 }
|
||||
|
@ -222,7 +222,6 @@ function runTests()
|
||||
// start composition
|
||||
synthesizeComposition({ type: "compositionstart" });
|
||||
// input first character
|
||||
synthesizeComposition({ type: "compositionupdate", data: "\u3089" });
|
||||
synthesizeText(
|
||||
{ "composition":
|
||||
{ "string": "\u3089",
|
||||
|
@ -2367,7 +2367,9 @@ DrawTargetD2D::CreateBrushForPattern(const Pattern &aPattern, Float aAlpha)
|
||||
|
||||
RefPtr<SourceSurface> source = pat->mSurface;
|
||||
|
||||
if (!pat->mSamplingRect.IsEmpty()) {
|
||||
if (!pat->mSamplingRect.IsEmpty() &&
|
||||
(source->GetType() == SurfaceType::D2D1_BITMAP ||
|
||||
source->GetType() == SurfaceType::D2D1_DRAWTARGET)) {
|
||||
IntRect samplingRect = pat->mSamplingRect;
|
||||
|
||||
RefPtr<DrawTargetD2D> dt = new DrawTargetD2D();
|
||||
@ -2411,7 +2413,12 @@ DrawTargetD2D::CreateBrushForPattern(const Pattern &aPattern, Float aAlpha)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bitmap = CreatePartialBitmapForSurface(dataSurf, mTransform, mSize, pat->mExtendMode, mat, mRT);
|
||||
IntRect sourceRect = pat->mSamplingRect;
|
||||
if (sourceRect.IsEmpty()) {
|
||||
sourceRect = IntRect(0, 0, source->GetSize().width, source->GetSize().height);
|
||||
}
|
||||
|
||||
bitmap = CreatePartialBitmapForSurface(dataSurf, mTransform, mSize, pat->mExtendMode, mat, mRT, &sourceRect);
|
||||
if (!bitmap) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -513,7 +513,8 @@ CreateStrokeStyleForOptions(const StrokeOptions &aStrokeOptions)
|
||||
static TemporaryRef<ID2D1Bitmap>
|
||||
CreatePartialBitmapForSurface(DataSourceSurface *aSurface, const Matrix &aDestinationTransform,
|
||||
const IntSize &aDestinationSize, ExtendMode aExtendMode,
|
||||
Matrix &aSourceTransform, ID2D1RenderTarget *aRT)
|
||||
Matrix &aSourceTransform, ID2D1RenderTarget *aRT,
|
||||
const IntRect* aSourceRect = nullptr)
|
||||
{
|
||||
RefPtr<ID2D1Bitmap> bitmap;
|
||||
|
||||
@ -538,6 +539,9 @@ CreatePartialBitmapForSurface(DataSourceSurface *aSurface, const Matrix &aDestin
|
||||
IntSize size = aSurface->GetSize();
|
||||
|
||||
Rect uploadRect(0, 0, Float(size.width), Float(size.height));
|
||||
if (aSourceRect) {
|
||||
uploadRect = Rect(aSourceRect->x, aSourceRect->y, aSourceRect->width, aSourceRect->height);
|
||||
}
|
||||
|
||||
// Limit the uploadRect as much as possible without supporting discontiguous uploads
|
||||
//
|
||||
|
@ -114,7 +114,7 @@ struct LayerPropertiesBase : public LayerProperties
|
||||
if (mUseClipRect) {
|
||||
mClipRect = *aLayer->GetClipRect();
|
||||
}
|
||||
mTransform = aLayer->GetTransform();
|
||||
mTransform = aLayer->GetLocalTransform();
|
||||
}
|
||||
LayerPropertiesBase()
|
||||
: mLayer(nullptr)
|
||||
@ -136,7 +136,7 @@ struct LayerPropertiesBase : public LayerProperties
|
||||
nsIntRegion ComputeChange(NotifySubDocInvalidationFunc aCallback,
|
||||
bool& aGeometryChanged)
|
||||
{
|
||||
bool transformChanged = !mTransform.FuzzyEqual(mLayer->GetTransform()) ||
|
||||
bool transformChanged = !mTransform.FuzzyEqual(mLayer->GetLocalTransform()) ||
|
||||
mLayer->GetPostXScale() != mPostXScale ||
|
||||
mLayer->GetPostYScale() != mPostYScale;
|
||||
Layer* otherMask = mLayer->GetMaskLayer();
|
||||
@ -183,7 +183,7 @@ struct LayerPropertiesBase : public LayerProperties
|
||||
|
||||
nsIntRect NewTransformedBounds()
|
||||
{
|
||||
return TransformRect(mLayer->GetVisibleRegion().GetBounds(), mLayer->GetTransform());
|
||||
return TransformRect(mLayer->GetVisibleRegion().GetBounds(), mLayer->GetLocalTransform());
|
||||
}
|
||||
|
||||
nsIntRect OldTransformedBounds()
|
||||
@ -290,7 +290,7 @@ struct ContainerLayerProperties : public LayerPropertiesBase
|
||||
}
|
||||
if (invalidateChildsCurrentArea) {
|
||||
aGeometryChanged = true;
|
||||
AddTransformedRegion(result, child->GetVisibleRegion(), child->GetTransform());
|
||||
AddTransformedRegion(result, child->GetVisibleRegion(), child->GetLocalTransform());
|
||||
if (aCallback) {
|
||||
NotifySubdocumentInvalidationRecursive(child, aCallback);
|
||||
} else {
|
||||
@ -309,7 +309,7 @@ struct ContainerLayerProperties : public LayerPropertiesBase
|
||||
aCallback(container, result);
|
||||
}
|
||||
|
||||
result.Transform(gfx::To3DMatrix(mLayer->GetTransform()));
|
||||
result.Transform(gfx::To3DMatrix(mLayer->GetLocalTransform()));
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -448,7 +448,7 @@ LayerPropertiesBase::ComputeDifferences(Layer* aRoot, NotifySubDocInvalidationFu
|
||||
ClearInvalidations(aRoot);
|
||||
}
|
||||
nsIntRect result = TransformRect(aRoot->GetVisibleRegion().GetBounds(),
|
||||
aRoot->GetTransform());
|
||||
aRoot->GetLocalTransform());
|
||||
result = result.Union(OldTransformedBounds());
|
||||
if (aGeometryChanged != nullptr) {
|
||||
*aGeometryChanged = true;
|
||||
|
@ -92,6 +92,8 @@ CompositingRenderTargetOGL::InitializeImpl()
|
||||
NS_ERROR(msg.get());
|
||||
}
|
||||
|
||||
mInitParams.mStatus = InitParams::INITIALIZED;
|
||||
|
||||
mCompositor->PrepareViewport(mInitParams.mSize);
|
||||
mGL->fScissor(0, 0, mInitParams.mSize.width, mInitParams.mSize.height);
|
||||
if (mInitParams.mInit == INIT_MODE_CLEAR) {
|
||||
@ -99,7 +101,6 @@ CompositingRenderTargetOGL::InitializeImpl()
|
||||
mGL->fClear(LOCAL_GL_COLOR_BUFFER_BIT);
|
||||
}
|
||||
|
||||
mInitParams.mStatus = InitParams::INITIALIZED;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ public:
|
||||
const gfx::IntSize& aSize)
|
||||
{
|
||||
RefPtr<CompositingRenderTargetOGL> result
|
||||
= new CompositingRenderTargetOGL(aCompositor, gfx::IntPoint(0, 0), 0, 0);
|
||||
= new CompositingRenderTargetOGL(aCompositor, gfx::IntPoint(), 0, 0);
|
||||
result->mInitParams = InitParams(aSize, 0, INIT_MODE_NONE);
|
||||
result->mInitParams.mStatus = InitParams::INITIALIZED;
|
||||
return result.forget();
|
||||
@ -112,6 +112,8 @@ public:
|
||||
*/
|
||||
void BindRenderTarget();
|
||||
|
||||
bool IsWindow() { return GetFBO() == 0; }
|
||||
|
||||
GLuint GetFBO() const
|
||||
{
|
||||
MOZ_ASSERT(mInitParams.mStatus == InitParams::INITIALIZED);
|
||||
|
@ -593,7 +593,10 @@ CompositorOGL::PrepareViewport(const gfx::IntSize& aSize)
|
||||
viewMatrix.PreScale(1.0f, -1.0f);
|
||||
}
|
||||
|
||||
if (!mTarget) {
|
||||
MOZ_ASSERT(mCurrentRenderTarget, "No destination");
|
||||
// If we're drawing directly to the window then we want to offset
|
||||
// drawing by the render offset.
|
||||
if (!mTarget && mCurrentRenderTarget->IsWindow()) {
|
||||
viewMatrix.PreTranslate(mRenderOffset.x, mRenderOffset.y);
|
||||
}
|
||||
|
||||
@ -660,8 +663,8 @@ CompositorOGL::SetRenderTarget(CompositingRenderTarget *aSurface)
|
||||
CompositingRenderTargetOGL* surface
|
||||
= static_cast<CompositingRenderTargetOGL*>(aSurface);
|
||||
if (mCurrentRenderTarget != surface) {
|
||||
surface->BindRenderTarget();
|
||||
mCurrentRenderTarget = surface;
|
||||
surface->BindRenderTarget();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1019,9 +1022,14 @@ CompositorOGL::DrawQuad(const Rect& aRect,
|
||||
js::ProfileEntry::Category::GRAPHICS);
|
||||
|
||||
MOZ_ASSERT(mFrameInProgress, "frame not started");
|
||||
MOZ_ASSERT(mCurrentRenderTarget, "No destination");
|
||||
|
||||
Rect clipRect = aClipRect;
|
||||
if (!mTarget) {
|
||||
// aClipRect is in destination coordinate space (after all
|
||||
// transforms and offsets have been applied) so if our
|
||||
// drawing is going to be shifted by mRenderOffset then we need
|
||||
// to shift the clip rect by the same amount.
|
||||
if (!mTarget && mCurrentRenderTarget->IsWindow()) {
|
||||
clipRect.MoveBy(mRenderOffset.x, mRenderOffset.y);
|
||||
}
|
||||
IntRect intClipRect;
|
||||
|
@ -856,20 +856,7 @@ gfxContext::SetColor(const gfxRGBA& c)
|
||||
CurrentState().pattern = nullptr;
|
||||
CurrentState().sourceSurfCairo = nullptr;
|
||||
CurrentState().sourceSurface = nullptr;
|
||||
|
||||
if (gfxPlatform::GetCMSMode() == eCMSMode_All) {
|
||||
|
||||
gfxRGBA cms;
|
||||
qcms_transform *transform = gfxPlatform::GetCMSRGBTransform();
|
||||
if (transform)
|
||||
gfxPlatform::TransformPixel(c, cms, transform);
|
||||
|
||||
// Use the original alpha to avoid unnecessary float->byte->float
|
||||
// conversion errors
|
||||
CurrentState().color = ToColor(cms);
|
||||
}
|
||||
else
|
||||
CurrentState().color = ToColor(c);
|
||||
CurrentState().color = gfxPlatform::MaybeTransformColor(c);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1631,6 +1631,26 @@ gfxPlatform::TransformPixel(const gfxRGBA& in, gfxRGBA& out, qcms_transform *tra
|
||||
out = in;
|
||||
}
|
||||
|
||||
Color
|
||||
gfxPlatform::MaybeTransformColor(const gfxRGBA& aColor)
|
||||
{
|
||||
// We only return this object to get some return value optimization goodness:
|
||||
Color color;
|
||||
if (GetCMSMode() == eCMSMode_All) {
|
||||
gfxRGBA cms;
|
||||
qcms_transform *transform = GetCMSRGBTransform();
|
||||
if (transform) {
|
||||
TransformPixel(aColor, cms, transform);
|
||||
// Use the original alpha to avoid unnecessary float->byte->float
|
||||
// conversion errors
|
||||
color = ToColor(cms);
|
||||
return color;
|
||||
}
|
||||
}
|
||||
color = ToColor(aColor);
|
||||
return color;
|
||||
}
|
||||
|
||||
void
|
||||
gfxPlatform::GetPlatformCMSOutputProfile(void *&mem, size_t &size)
|
||||
{
|
||||
|
@ -7,6 +7,7 @@
|
||||
#define GFX_PLATFORM_H
|
||||
|
||||
#include "prlog.h"
|
||||
#include "mozilla/gfx/Types.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsString.h"
|
||||
#include "nsCOMPtr.h"
|
||||
@ -158,6 +159,7 @@ GetBackendName(mozilla::gfx::BackendType aBackend)
|
||||
|
||||
class gfxPlatform {
|
||||
public:
|
||||
typedef mozilla::gfx::Color Color;
|
||||
typedef mozilla::gfx::DataSourceSurface DataSourceSurface;
|
||||
typedef mozilla::gfx::DrawTarget DrawTarget;
|
||||
typedef mozilla::gfx::IntSize IntSize;
|
||||
@ -493,6 +495,12 @@ public:
|
||||
*/
|
||||
static void TransformPixel(const gfxRGBA& in, gfxRGBA& out, qcms_transform *transform);
|
||||
|
||||
/**
|
||||
* Converts the color using the GetCMSRGBTransform() transform if the
|
||||
* CMS mode is eCMSMode_All, else just returns the color.
|
||||
*/
|
||||
static Color MaybeTransformColor(const gfxRGBA& aColor);
|
||||
|
||||
/**
|
||||
* Return the output device ICC profile.
|
||||
*/
|
||||
|
@ -593,17 +593,6 @@ gfxUtils::DrawPixelSnapped(gfxContext* aContext,
|
||||
imageRect.Width(), imageRect.Height(),
|
||||
region.Width(), region.Height());
|
||||
|
||||
if (aRegion.IsRestricted() &&
|
||||
aContext->CurrentMatrix().HasNonIntegerTranslation() &&
|
||||
drawable->DrawWithSamplingRect(aContext, aRegion.Rect(), aRegion.Restriction(),
|
||||
doTile, aFilter, aOpacity)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// On Mobile, we don't ever want to do this; it has the potential for
|
||||
// allocating very large temporary surfaces, especially since we'll
|
||||
// do full-page snapshots often (see bug 749426).
|
||||
#ifndef MOZ_GFX_OPTIMIZE_MOBILE
|
||||
// OK now, the hard part left is to account for the subimage sampling
|
||||
// restriction. If all the transforms involved are just integer
|
||||
// translations, then we assume no resampling will occur so there's
|
||||
@ -611,19 +600,29 @@ gfxUtils::DrawPixelSnapped(gfxContext* aContext,
|
||||
// XXX if only we had source-clipping in cairo!
|
||||
if (aContext->CurrentMatrix().HasNonIntegerTranslation()) {
|
||||
if (doTile || !aRegion.RestrictionContains(imageRect)) {
|
||||
if (drawable->DrawWithSamplingRect(aContext, aRegion.Rect(), aRegion.Restriction(),
|
||||
doTile, aFilter, aOpacity)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// On Mobile, we don't ever want to do this; it has the potential for
|
||||
// allocating very large temporary surfaces, especially since we'll
|
||||
// do full-page snapshots often (see bug 749426).
|
||||
#ifndef MOZ_GFX_OPTIMIZE_MOBILE
|
||||
nsRefPtr<gfxDrawable> restrictedDrawable =
|
||||
CreateSamplingRestrictedDrawable(aDrawable, aContext,
|
||||
aRegion, aFormat);
|
||||
if (restrictedDrawable) {
|
||||
drawable.swap(restrictedDrawable);
|
||||
}
|
||||
}
|
||||
// We no longer need to tile: Either we never needed to, or we already
|
||||
// filled a surface with the tiled pattern; this surface can now be
|
||||
// drawn without tiling.
|
||||
doTile = false;
|
||||
}
|
||||
|
||||
// We no longer need to tile: Either we never needed to, or we already
|
||||
// filled a surface with the tiled pattern; this surface can now be
|
||||
// drawn without tiling.
|
||||
doTile = false;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
drawable->Draw(aContext, aRegion.Rect(), doTile, aFilter, aOpacity);
|
||||
}
|
||||
|
@ -90,6 +90,11 @@ ScopedXREEmbed::Start()
|
||||
|
||||
localFile = do_QueryInterface(parent);
|
||||
NS_ENSURE_TRUE_VOID(localFile);
|
||||
|
||||
rv = localFile->SetNativeLeafName(NS_LITERAL_CSTRING("Resources"));
|
||||
if (NS_FAILED(rv)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -885,6 +885,24 @@ class RootedBase<JSObject*>
|
||||
JS::Handle<U*> as() const;
|
||||
};
|
||||
|
||||
/*
|
||||
* Augment the generic Handle<T> interface when T = JSObject* with
|
||||
* downcasting operations.
|
||||
*
|
||||
* Given a Handle<JSObject*> obj, one can view
|
||||
* Handle<StringObject*> h = obj.as<StringObject*>();
|
||||
* as an optimization of
|
||||
* Rooted<StringObject*> rooted(cx, &obj->as<StringObject*>());
|
||||
* Handle<StringObject*> h = rooted;
|
||||
*/
|
||||
template <>
|
||||
class HandleBase<JSObject*>
|
||||
{
|
||||
public:
|
||||
template <class U>
|
||||
JS::Handle<U*> as() const;
|
||||
};
|
||||
|
||||
/* Interface substitute for Rooted<T> which does not root the variable's memory. */
|
||||
template <typename T>
|
||||
class FakeRooted : public RootedBase<T>
|
||||
@ -1003,6 +1021,11 @@ template <typename T> class MaybeRooted<T, CanGC>
|
||||
static inline JS::MutableHandle<T> toMutableHandle(MutableHandleType v) {
|
||||
return v;
|
||||
}
|
||||
|
||||
template <typename T2>
|
||||
static inline JS::Handle<T2*> downcastHandle(HandleType v) {
|
||||
return v.template as<T2>();
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T> class MaybeRooted<T, NoGC>
|
||||
@ -1019,6 +1042,11 @@ template <typename T> class MaybeRooted<T, NoGC>
|
||||
static JS::MutableHandle<T> toMutableHandle(MutableHandleType v) {
|
||||
MOZ_CRASH("Bad conversion");
|
||||
}
|
||||
|
||||
template <typename T2>
|
||||
static inline T2* downcastHandle(HandleType v) {
|
||||
return &v->template as<T2>();
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace js */
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include "jsobjinlines.h"
|
||||
|
||||
#include "vm/ArrayBufferObject-inl.h"
|
||||
#include "vm/ObjectImpl-inl.h"
|
||||
|
||||
using namespace js;
|
||||
using namespace js::jit;
|
||||
@ -117,7 +118,7 @@ HasPureCoercion(JSContext *cx, HandleValue v)
|
||||
jsid toString = NameToId(cx->names().toString);
|
||||
if (v.toObject().is<JSFunction>() &&
|
||||
HasObjectValueOf(&v.toObject(), cx) &&
|
||||
ClassMethodIsNative(cx, &v.toObject(), &JSFunction::class_, toString, fun_toString))
|
||||
ClassMethodIsNative(cx, &v.toObject().as<JSFunction>(), &JSFunction::class_, toString, fun_toString))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@ -897,7 +898,7 @@ CreateExportObject(JSContext *cx, Handle<AsmJSModuleObject*> moduleObj)
|
||||
}
|
||||
|
||||
gc::AllocKind allocKind = gc::GetGCObjectKind(module.numExportedFunctions());
|
||||
RootedObject obj(cx, NewBuiltinClassInstance(cx, &JSObject::class_, allocKind));
|
||||
RootedNativeObject obj(cx, NewNativeBuiltinClassInstance(cx, &JSObject::class_, allocKind));
|
||||
if (!obj)
|
||||
return nullptr;
|
||||
|
||||
|
@ -868,9 +868,10 @@ AsmJSModuleObject::create(ExclusiveContext *cx, ScopedJSDeletePtr<AsmJSModule> *
|
||||
JSObject *obj = NewObjectWithGivenProto(cx, &AsmJSModuleObject::class_, nullptr, nullptr);
|
||||
if (!obj)
|
||||
return nullptr;
|
||||
AsmJSModuleObject *nobj = &obj->as<AsmJSModuleObject>();
|
||||
|
||||
obj->setReservedSlot(MODULE_SLOT, PrivateValue(module->forget()));
|
||||
return &obj->as<AsmJSModuleObject>();
|
||||
nobj->setReservedSlot(MODULE_SLOT, PrivateValue(module->forget()));
|
||||
return nobj;
|
||||
}
|
||||
|
||||
AsmJSModule &
|
||||
|
@ -1437,7 +1437,7 @@ LookupAsmJSModuleInCache(ExclusiveContext *cx,
|
||||
// directly to user script) which manages the lifetime of an AsmJSModule. A
|
||||
// JSObject is necessary since we want LinkAsmJS/CallAsmJS JSFunctions to be
|
||||
// able to point to their module via their extended slots.
|
||||
class AsmJSModuleObject : public JSObject
|
||||
class AsmJSModuleObject : public NativeObject
|
||||
{
|
||||
static const unsigned MODULE_SLOT = 0;
|
||||
|
||||
|
@ -581,54 +581,6 @@ function ArrayFill(value, start = 0, end = undefined) {
|
||||
return O;
|
||||
}
|
||||
|
||||
// Proposed for ES7:
|
||||
// https://github.com/domenic/Array.prototype.contains/blob/master/spec.md
|
||||
function ArrayContains(searchElement, fromIndex = 0) {
|
||||
// Steps 1-2.
|
||||
var O = ToObject(this);
|
||||
|
||||
// Steps 3-4.
|
||||
var len = ToLength(O.length);
|
||||
|
||||
// Step 5.
|
||||
if (len === 0)
|
||||
return false;
|
||||
|
||||
// Steps 6-7.
|
||||
var n = ToInteger(fromIndex);
|
||||
|
||||
// Step 8.
|
||||
if (n >= len)
|
||||
return false;
|
||||
|
||||
// Step 9.
|
||||
var k;
|
||||
if (n >= 0) {
|
||||
k = n;
|
||||
}
|
||||
// Step 10.
|
||||
else {
|
||||
// Step a.
|
||||
k = len + n;
|
||||
// Step b.
|
||||
if (k < 0)
|
||||
k = 0;
|
||||
}
|
||||
|
||||
// Step 11.
|
||||
while (k < len) {
|
||||
// Steps a-c.
|
||||
if (SameValueZero(searchElement, O[k]))
|
||||
return true;
|
||||
|
||||
// Step d.
|
||||
k++;
|
||||
}
|
||||
|
||||
// Step 12.
|
||||
return false;
|
||||
}
|
||||
|
||||
#define ARRAY_ITERATOR_SLOT_ITERATED_OBJECT 0
|
||||
#define ARRAY_ITERATOR_SLOT_NEXT_INDEX 1
|
||||
#define ARRAY_ITERATOR_SLOT_ITEM_KIND 2
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user