mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 02:25:34 +00:00
Merge mozilla-central to fx-team
This commit is contained in:
commit
d45cd5fea2
2
CLOBBER
2
CLOBBER
@ -22,4 +22,4 @@
|
||||
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
|
||||
# don't change CLOBBER for WebIDL changes any more.
|
||||
|
||||
Bug 1186748 needed a CLOBBER again
|
||||
Bug 1190180 - need clobber for backouts
|
||||
|
@ -47,11 +47,6 @@ LOCAL_INCLUDES += [
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
# The midl generated code include Windows headers which defines min and max
|
||||
# macros which conflicts with std::min/max. Suppress the macros:
|
||||
if CONFIG['OS_ARCH'] == 'WINNT':
|
||||
DEFINES['NOMINMAX'] = True
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
@ -19,10 +19,6 @@ LOCAL_INCLUDES += [
|
||||
'/accessible/xul',
|
||||
]
|
||||
|
||||
# The midl generated code include Windows headers which defines min and max
|
||||
# macros which conflicts with std::min/max. Suppress the macros:
|
||||
DEFINES['NOMINMAX'] = True
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
@ -19,9 +19,4 @@ LOCAL_INCLUDES += [
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
# The midl generated code include Windows headers which defines min and max
|
||||
# macros which conflicts with std::min/max. Suppress the macros:
|
||||
if CONFIG['OS_ARCH'] == 'WINNT':
|
||||
DEFINES['NOMINMAX'] = True
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
@ -7,7 +7,7 @@
|
||||
["/home/cltbld/.ssh", "/home/mock_mozilla/.ssh"],
|
||||
["/builds/crash-stats-api.token", "/builds/crash-stats-api.token"]
|
||||
],
|
||||
"build_targets": [],
|
||||
"build_targets": ["", "blobfree"],
|
||||
"upload_files": [
|
||||
"{objdir}/dist/b2g-*.crashreporter-symbols.zip",
|
||||
"{objdir}/dist/b2g-*.tar.gz",
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="2ca27bbdd84526c6a3b198d9cf10f2caff1dadde"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8dba2077f5e7137253fbb3faf10cd0b5f7da25c2"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="2ca27bbdd84526c6a3b198d9cf10f2caff1dadde"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8dba2077f5e7137253fbb3faf10cd0b5f7da25c2"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
@ -38,7 +38,7 @@
|
||||
<project name="platform/bootable/recovery" path="bootable/recovery" revision="286354e69491f7cba5b9ec6b551831fe6f85ad0d"/>
|
||||
<project name="platform/external/aac" path="external/aac" revision="fa3eba16446cc8f2f5e2dfc20d86a49dbd37299e"/>
|
||||
<project name="platform/external/bison" path="external/bison" revision="c2418b886165add7f5a31fc5609f0ce2d004a90e"/>
|
||||
<project name="platform/external/bluetooth/bluedroid" path="external/bluetooth/bluedroid" revision="d6cfe067653ee2625827b08b3e8b3662c51f575b"/>
|
||||
<project name="platform/external/bluetooth/bluedroid" path="external/bluetooth/bluedroid" revision="c93b7fd610b050178fade814ea88f00a682ff8b4"/>
|
||||
<project name="platform/external/bsdiff" path="external/bsdiff" revision="23e322ab19fb7d74c2c37e40ce364d9f709bdcee"/>
|
||||
<project name="platform/external/bzip2" path="external/bzip2" revision="1cb636bd8e9e5cdfd5d5b2909a122f6e80db62de"/>
|
||||
<project name="platform/external/checkpolicy" path="external/checkpolicy" revision="0d73ef7049feee794f14cf1af88d05dae8139914"/>
|
||||
@ -105,7 +105,7 @@
|
||||
<project name="platform/frameworks/native" path="frameworks/native" revision="8d54940d9bdad8fec3208ff58ddab590be9fe0d4"/>
|
||||
<project name="platform/frameworks/opt/emoji" path="frameworks/opt/emoji" revision="dbbe673145107e99883f62bafd70c5f43f11065c"/>
|
||||
<project name="platform/frameworks/wilhelm" path="frameworks/wilhelm" revision="aac6c4bb59a6577c97cbda68699829b507b7490d"/>
|
||||
<project name="platform/hardware/libhardware" path="hardware/libhardware" revision="264e408d639c94a922965e3cbee5b1819674992b"/>
|
||||
<project name="platform/hardware/libhardware" path="hardware/libhardware" revision="61e39189aee90fbd49b4ef6fc2102d48e9279209"/>
|
||||
<project name="platform/hardware/libhardware_legacy" path="hardware/libhardware_legacy" revision="68b0c269fd1889f47ecfb9119c05281e9b6db0af"/>
|
||||
<project name="platform/libcore" path="libcore" revision="e195beab082c09217318fc19250caeaf4c1bd800"/>
|
||||
<project name="platform/libnativehelper" path="libnativehelper" revision="feeb36c2bd4adfe285f98f5de92e0f3771b2c115"/>
|
||||
|
@ -19,7 +19,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="2ca27bbdd84526c6a3b198d9cf10f2caff1dadde"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="8dba2077f5e7137253fbb3faf10cd0b5f7da25c2"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="8bc59310552179f9a8bc6cdd0188e2475df52fb7"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="2ca27bbdd84526c6a3b198d9cf10f2caff1dadde"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8dba2077f5e7137253fbb3faf10cd0b5f7da25c2"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="5bb657ada461be666c35f419dbe072ed2ce632fc"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="2ca27bbdd84526c6a3b198d9cf10f2caff1dadde"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8dba2077f5e7137253fbb3faf10cd0b5f7da25c2"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="07c383a786f188904311a37f6062c2cb84c9b61d">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="2ca27bbdd84526c6a3b198d9cf10f2caff1dadde"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8dba2077f5e7137253fbb3faf10cd0b5f7da25c2"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
@ -19,7 +19,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="2ca27bbdd84526c6a3b198d9cf10f2caff1dadde"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="8dba2077f5e7137253fbb3faf10cd0b5f7da25c2"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="8bc59310552179f9a8bc6cdd0188e2475df52fb7"/>
|
||||
|
@ -7,7 +7,7 @@
|
||||
["/home/cltbld/.ssh", "/home/mock_mozilla/.ssh"],
|
||||
["/builds/crash-stats-api.token", "/builds/crash-stats-api.token"]
|
||||
],
|
||||
"build_targets": [],
|
||||
"build_targets": ["", "blobfree"],
|
||||
"upload_files": [
|
||||
"{objdir}/dist/b2g-*.crashreporter-symbols.zip",
|
||||
"{objdir}/dist/b2g-*.tar.gz",
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="2ca27bbdd84526c6a3b198d9cf10f2caff1dadde"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8dba2077f5e7137253fbb3faf10cd0b5f7da25c2"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
@ -126,7 +126,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="2501e5940ba69ece7654ff85611c76ae5bda299c"/>
|
||||
<project name="device-flame" path="device/t2m/flame" remote="b2g" revision="41d3e221039d1c4486fc13ff26793a7a39226423"/>
|
||||
<project name="codeaurora_kernel_msm" path="kernel" remote="b2g" revision="0865bc4134b67220df4058625fba29305d6b10c3"/>
|
||||
<project name="codeaurora_kernel_msm" path="kernel" remote="b2g" revision="47aac20dbffea5874cbbbdc6556558855c38dce4"/>
|
||||
<project name="kernel_lk" path="bootable/bootloader/lk" remote="b2g" revision="fda40423ffa573dc6cafd3780515010cb2a086be"/>
|
||||
<project name="platform_bootable_recovery" path="bootable/recovery" remote="b2g" revision="d5e53ed6f22fa06052351dc03510af9473af01ea"/>
|
||||
<project name="platform/external/bluetooth/bluedroid" path="external/bluetooth/bluedroid" revision="d61fc97258c8b0c362430dd2eb195dcc4d266f14"/>
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"git": {
|
||||
"git_revision": "2ca27bbdd84526c6a3b198d9cf10f2caff1dadde",
|
||||
"git_revision": "8dba2077f5e7137253fbb3faf10cd0b5f7da25c2",
|
||||
"remote": "https://git.mozilla.org/releases/gaia.git",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "b5e9a95e8f13e775ae2e3828a6e389e5231bef32",
|
||||
"revision": "4a0216037684d9f9299e8ca7470ca05c2ead4ab5",
|
||||
"repo_path": "integration/gaia-central"
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="2ca27bbdd84526c6a3b198d9cf10f2caff1dadde"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8dba2077f5e7137253fbb3faf10cd0b5f7da25c2"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="5bb657ada461be666c35f419dbe072ed2ce632fc"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="07c383a786f188904311a37f6062c2cb84c9b61d">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="2ca27bbdd84526c6a3b198d9cf10f2caff1dadde"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8dba2077f5e7137253fbb3faf10cd0b5f7da25c2"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="9f45c1988fe72749f0659409e6e3320fabf7b79a"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
@ -142,7 +142,7 @@
|
||||
<!-- Nexus 5 specific things -->
|
||||
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="fe7df1bc8dd0fd71571505d7be1c31a4ad1e40fb"/>
|
||||
<project name="device-hammerhead" path="device/lge/hammerhead" remote="b2g" revision="1ad7478309fd43981973e297f5a68a480f3a3c07"/>
|
||||
<project name="device_lge_hammerhead-kernel" path="device/lge/hammerhead-kernel" remote="b2g" revision="1d42cfba2e91a07b1bea1d1591b8aed4db9cb9a5"/>
|
||||
<project name="device_lge_hammerhead-kernel" path="device/lge/hammerhead-kernel" remote="b2g" revision="8b3ffcfdd3d3852eca5488628f8bb2a08acbffa7"/>
|
||||
<project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="5d0ae53d9588c3d70c005aec9be94af9a534de16"/>
|
||||
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="c15b6e266136cd0cdd9b94d0bbed1962d9dd6672"/>
|
||||
<project name="platform/hardware/broadcom/libbt" path="hardware/broadcom/libbt" revision="399fe3d3c8f38c599a56becddc456133e62a5d70"/>
|
||||
|
@ -7,14 +7,6 @@
|
||||
"unpack": true
|
||||
},
|
||||
{
|
||||
"size": 11179576,
|
||||
"digest": "91567ce8e2bb8ab0ebc60c31e90731d88a1ea889fb71bcf55c735746a60fa7610b7e040ea3d8f727b6f692ae3ee703d6f3b30cdbd76fdf5617f77d9c38aa20ed",
|
||||
"algorithm": "sha512",
|
||||
"filename": "gtk3.tar.xz",
|
||||
"setup": "setup.sh",
|
||||
"unpack": true
|
||||
},
|
||||
{
|
||||
"size": 167175,
|
||||
"digest": "0b71a936edf5bd70cf274aaa5d7abc8f77fe8e7b5593a208f805cc9436fac646b9c4f0b43c2b10de63ff3da671497d35536077ecbc72dba7f8159a38b580f831",
|
||||
"algorithm": "sha512",
|
||||
|
@ -7,14 +7,6 @@
|
||||
"unpack": true
|
||||
},
|
||||
{
|
||||
"size": 12057960,
|
||||
"digest": "6105d6432943141cffb40020dc5ba3a793650bdeb3af9bd5e56d3796c5f03df9962a73e521646cd71fbfb5e266c1e74716ad722fb6055589dfb7d35175bca89e",
|
||||
"algorithm": "sha512",
|
||||
"filename": "gtk3.tar.xz",
|
||||
"setup": "setup.sh",
|
||||
"unpack": true
|
||||
},
|
||||
{
|
||||
"size": 167175,
|
||||
"digest": "0b71a936edf5bd70cf274aaa5d7abc8f77fe8e7b5593a208f805cc9436fac646b9c4f0b43c2b10de63ff3da671497d35536077ecbc72dba7f8159a38b580f831",
|
||||
"algorithm": "sha512",
|
||||
|
@ -7,13 +7,15 @@
|
||||
%htmlDTD;
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
|
||||
%brandDTD;
|
||||
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
|
||||
%globalDTD;
|
||||
<!ENTITY % aboutAccountsDTD SYSTEM "chrome://browser/locale/aboutAccounts.dtd">
|
||||
%aboutAccountsDTD;
|
||||
<!ENTITY % syncBrandDTD SYSTEM "chrome://browser/locale/syncBrand.dtd">
|
||||
%syncBrandDTD;
|
||||
]>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" dir="&locale.dir;">
|
||||
<head>
|
||||
<title>&syncBrand.fullName.label;</title>
|
||||
<meta name="viewport" content="width=device-width"/>
|
||||
|
@ -5885,20 +5885,24 @@
|
||||
<handlers>
|
||||
<handler event="mouseover"><![CDATA[
|
||||
let anonid = event.originalTarget.getAttribute("anonid");
|
||||
let iconVisible = this.hasAttribute("soundplaying") ||
|
||||
this.hasAttribute("muted");
|
||||
if (anonid == "close-button")
|
||||
this.mOverCloseButton = true;
|
||||
else if ((anonid == "soundplaying-icon") ||
|
||||
((anonid == "overlay-icon") && this.hasAttribute("soundplaying")))
|
||||
((anonid == "overlay-icon") && iconVisible))
|
||||
this._overPlayingIcon = true;
|
||||
|
||||
this._mouseenter();
|
||||
]]></handler>
|
||||
<handler event="mouseout"><![CDATA[
|
||||
let anonid = event.originalTarget.getAttribute("anonid");
|
||||
let iconVisible = this.hasAttribute("soundplaying") ||
|
||||
this.hasAttribute("muted");
|
||||
if (anonid == "close-button")
|
||||
this.mOverCloseButton = false;
|
||||
else if ((anonid == "soundplaying-icon") ||
|
||||
((anonid == "overlay-icon") && this.hasAttribute("soundplaying")))
|
||||
((anonid == "overlay-icon") && iconVisible))
|
||||
this._overPlayingIcon = false;
|
||||
|
||||
this._mouseleave();
|
||||
@ -5928,8 +5932,10 @@
|
||||
}
|
||||
|
||||
let anonid = event.originalTarget.getAttribute("anonid");
|
||||
let iconVisible = this.hasAttribute("soundplaying") ||
|
||||
this.hasAttribute("muted");
|
||||
if ((anonid == "soundplaying-icon") ||
|
||||
((anonid == "overlay-icon") && this.hasAttribute("soundplaying"))) {
|
||||
((anonid == "overlay-icon") && iconVisible)) {
|
||||
this._toggleMuteAudio();
|
||||
}
|
||||
]]>
|
||||
|
@ -473,7 +473,6 @@ skip-if = buildapp == 'mulet'
|
||||
[browser_zbug569342.js]
|
||||
skip-if = e10s # Bug 1094240 - has findbar-related failures
|
||||
[browser_registerProtocolHandler_notification.js]
|
||||
skip-if = e10s # Bug 940206 - nsIWebContentHandlerRegistrar::registerProtocolHandler doesn't work in e10s
|
||||
[browser_no_mcb_on_http_site.js]
|
||||
[browser_bug1104165-switchtab-decodeuri.js]
|
||||
[browser_bug1003461-switchtab-override.js]
|
||||
|
@ -87,11 +87,23 @@ function* test_playing_icon_on_tab(tab, browser, isPinned) {
|
||||
|
||||
yield test_tooltip(icon, "This tab is playing audio");
|
||||
|
||||
yield test_mute_tab(tab, icon, true);
|
||||
|
||||
yield ContentTask.spawn(browser, {}, function* () {
|
||||
let audio = content.document.querySelector("audio");
|
||||
audio.pause();
|
||||
});
|
||||
yield wait_for_tab_playing_event(tab, false);
|
||||
|
||||
ok(tab.hasAttribute("muted") &&
|
||||
!tab.hasAttribute("soundplaying"), "Tab should still be muted but not playing");
|
||||
|
||||
yield test_tooltip(icon, "This tab has been muted");
|
||||
|
||||
yield test_mute_tab(tab, icon, false);
|
||||
|
||||
ok(!tab.hasAttribute("muted") &&
|
||||
!tab.hasAttribute("soundplaying"), "Tab should not be be muted or playing");
|
||||
}
|
||||
|
||||
function* test_on_browser(browser) {
|
||||
|
@ -3,6 +3,7 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
|
||||
|
||||
@ -132,6 +133,83 @@ ServiceInfo.prototype = {
|
||||
}
|
||||
};
|
||||
|
||||
const Utils = {
|
||||
makeURI(aURL, aOriginCharset, aBaseURI) {
|
||||
return Services.io.newURI(aURL, aOriginCharset, aBaseURI);
|
||||
},
|
||||
|
||||
checkAndGetURI(aURIString, aContentWindow) {
|
||||
try {
|
||||
let baseURI = aContentWindow.document.baseURIObject;
|
||||
var uri = this.makeURI(aURIString, null, baseURI);
|
||||
} catch (ex) {
|
||||
throw NS_ERROR_DOM_SYNTAX_ERR;
|
||||
}
|
||||
|
||||
// For security reasons we reject non-http(s) urls (see bug 354316),
|
||||
// we may need to revise this once we support more content types
|
||||
// XXX this should be a "security exception" according to spec, but that
|
||||
// isn't defined yet.
|
||||
if (uri.scheme != "http" && uri.scheme != "https")
|
||||
throw("Permission denied to add " + uri.spec + " as a content or protocol handler");
|
||||
|
||||
// We also reject handlers registered from a different host (see bug 402287)
|
||||
// The pref allows us to test the feature
|
||||
var pb = Services.prefs;
|
||||
if ((!pb.prefHasUserValue(PREF_ALLOW_DIFFERENT_HOST) ||
|
||||
!pb.getBoolPref(PREF_ALLOW_DIFFERENT_HOST)) &&
|
||||
aContentWindow.location.hostname != uri.host)
|
||||
throw("Permission denied to add " + uri.spec + " as a content or protocol handler");
|
||||
|
||||
// If the uri doesn't contain '%s', it won't be a good handler
|
||||
if (uri.spec.indexOf("%s") < 0)
|
||||
throw NS_ERROR_DOM_SYNTAX_ERR;
|
||||
|
||||
return uri;
|
||||
},
|
||||
|
||||
// NB: Throws if aProtocol is not allowed.
|
||||
checkProtocolHandlerAllowed(aProtocol, aURIString) {
|
||||
// First, check to make sure this isn't already handled internally (we don't
|
||||
// want to let them take over, say "chrome").
|
||||
var handler = Services.io.getProtocolHandler(aProtocol);
|
||||
if (!(handler instanceof Ci.nsIExternalProtocolHandler)) {
|
||||
// This is handled internally, so we don't want them to register
|
||||
// XXX this should be a "security exception" according to spec, but that
|
||||
// isn't defined yet.
|
||||
throw(`Permission denied to add ${aURIString} as a protocol handler`);
|
||||
}
|
||||
|
||||
// check if it is in the black list
|
||||
var pb = Services.prefs;
|
||||
var allowed;
|
||||
try {
|
||||
allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "." + aProtocol);
|
||||
}
|
||||
catch (e) {
|
||||
allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "-default");
|
||||
}
|
||||
if (!allowed) {
|
||||
// XXX this should be a "security exception" according to spec
|
||||
throw(`Not allowed to register a protocol handler for ${aProtocol}`);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Mappings from known feed types to our internal content type.
|
||||
*/
|
||||
_mappings: {
|
||||
"application/rss+xml": TYPE_MAYBE_FEED,
|
||||
"application/atom+xml": TYPE_MAYBE_FEED,
|
||||
},
|
||||
|
||||
resolveContentType(aContentType) {
|
||||
if (aContentType in this._mappings)
|
||||
return this._mappings[aContentType];
|
||||
return aContentType;
|
||||
}
|
||||
};
|
||||
|
||||
function WebContentConverterRegistrar() {
|
||||
this._contentTypes = { };
|
||||
this._autoHandleContentTypes = { };
|
||||
@ -139,9 +217,7 @@ function WebContentConverterRegistrar() {
|
||||
|
||||
WebContentConverterRegistrar.prototype = {
|
||||
get stringBundle() {
|
||||
var sb = Cc["@mozilla.org/intl/stringbundle;1"].
|
||||
getService(Ci.nsIStringBundleService).
|
||||
createBundle(STRING_BUNDLE_URI);
|
||||
var sb = Services.strings.createBundle(STRING_BUNDLE_URI);
|
||||
delete WebContentConverterRegistrar.prototype.stringBundle;
|
||||
return WebContentConverterRegistrar.prototype.stringBundle = sb;
|
||||
},
|
||||
@ -159,7 +235,7 @@ WebContentConverterRegistrar.prototype = {
|
||||
*/
|
||||
getAutoHandler:
|
||||
function WCCR_getAutoHandler(contentType) {
|
||||
contentType = this._resolveContentType(contentType);
|
||||
contentType = Utils.resolveContentType(contentType);
|
||||
if (contentType in this._autoHandleContentTypes)
|
||||
return this._autoHandleContentTypes[contentType];
|
||||
return null;
|
||||
@ -172,19 +248,17 @@ WebContentConverterRegistrar.prototype = {
|
||||
function WCCR_setAutoHandler(contentType, handler) {
|
||||
if (handler && !this._typeIsRegistered(contentType, handler.uri))
|
||||
throw Cr.NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
contentType = this._resolveContentType(contentType);
|
||||
|
||||
contentType = Utils.resolveContentType(contentType);
|
||||
this._setAutoHandler(contentType, handler);
|
||||
|
||||
var ps =
|
||||
Cc["@mozilla.org/preferences-service;1"].
|
||||
getService(Ci.nsIPrefService);
|
||||
|
||||
var ps = Services.prefs;
|
||||
var autoBranch = ps.getBranch(PREF_CONTENTHANDLERS_AUTO);
|
||||
if (handler)
|
||||
autoBranch.setCharPref(contentType, handler.uri);
|
||||
else if (autoBranch.prefHasUserValue(contentType))
|
||||
autoBranch.clearUserPref(contentType);
|
||||
|
||||
|
||||
ps.savePrefFile(null);
|
||||
},
|
||||
|
||||
@ -218,7 +292,7 @@ WebContentConverterRegistrar.prototype = {
|
||||
loadPreferredHandler:
|
||||
function WCCR_loadPreferredHandler(request) {
|
||||
var channel = request.QueryInterface(Ci.nsIChannel);
|
||||
var contentType = this._resolveContentType(channel.contentType);
|
||||
var contentType = Utils.resolveContentType(channel.contentType);
|
||||
var handler = this.getAutoHandler(contentType);
|
||||
if (handler) {
|
||||
request.cancel(Cr.NS_ERROR_FAILURE);
|
||||
@ -268,15 +342,7 @@ WebContentConverterRegistrar.prototype = {
|
||||
this._contentTypes[contentType].filter(notURI);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
_mappings: {
|
||||
"application/rss+xml": TYPE_MAYBE_FEED,
|
||||
"application/atom+xml": TYPE_MAYBE_FEED,
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* These are types for which there is a separate content converter aside
|
||||
* from our built in generic one. We should not automatically register
|
||||
@ -285,57 +351,6 @@ WebContentConverterRegistrar.prototype = {
|
||||
_blockedTypes: {
|
||||
"application/vnd.mozilla.maybe.feed": true,
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines the "internal" content type based on the _mappings.
|
||||
* @param contentType
|
||||
* @returns The resolved contentType value.
|
||||
*/
|
||||
_resolveContentType:
|
||||
function WCCR__resolveContentType(contentType) {
|
||||
if (contentType in this._mappings)
|
||||
return this._mappings[contentType];
|
||||
return contentType;
|
||||
},
|
||||
|
||||
_makeURI: function(aURL, aOriginCharset, aBaseURI) {
|
||||
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService);
|
||||
return ioService.newURI(aURL, aOriginCharset, aBaseURI);
|
||||
},
|
||||
|
||||
_checkAndGetURI:
|
||||
function WCCR_checkAndGetURI(aURIString, aContentWindow)
|
||||
{
|
||||
try {
|
||||
let baseURI = aContentWindow.document.baseURIObject;
|
||||
var uri = this._makeURI(aURIString, null, baseURI);
|
||||
} catch (ex) {
|
||||
// not supposed to throw according to spec
|
||||
return;
|
||||
}
|
||||
|
||||
// For security reasons we reject non-http(s) urls (see bug 354316),
|
||||
// we may need to revise this once we support more content types
|
||||
// XXX this should be a "security exception" according to spec, but that
|
||||
// isn't defined yet.
|
||||
if (uri.scheme != "http" && uri.scheme != "https")
|
||||
throw("Permission denied to add " + uri.spec + " as a content or protocol handler");
|
||||
|
||||
// We also reject handlers registered from a different host (see bug 402287)
|
||||
// The pref allows us to test the feature
|
||||
var pb = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
|
||||
if ((!pb.prefHasUserValue(PREF_ALLOW_DIFFERENT_HOST) ||
|
||||
!pb.getBoolPref(PREF_ALLOW_DIFFERENT_HOST)) &&
|
||||
aContentWindow.location.hostname != uri.host)
|
||||
throw("Permission denied to add " + uri.spec + " as a content or protocol handler");
|
||||
|
||||
// If the uri doesn't contain '%s', it won't be a good handler
|
||||
if (uri.spec.indexOf("%s") < 0)
|
||||
throw NS_ERROR_DOM_SYNTAX_ERR;
|
||||
|
||||
return uri;
|
||||
},
|
||||
|
||||
/**
|
||||
* Determines if a web handler is already registered.
|
||||
@ -366,52 +381,41 @@ WebContentConverterRegistrar.prototype = {
|
||||
* See nsIWebContentHandlerRegistrar
|
||||
*/
|
||||
registerProtocolHandler:
|
||||
function WCCR_registerProtocolHandler(aProtocol, aURIString, aTitle, aContentWindow) {
|
||||
function WCCR_registerProtocolHandler(aProtocol, aURIString, aTitle, aBrowserOrWindow) {
|
||||
LOG("registerProtocolHandler(" + aProtocol + "," + aURIString + "," + aTitle + ")");
|
||||
|
||||
var uri = this._checkAndGetURI(aURIString, aContentWindow);
|
||||
var haveWindow = (aBrowserOrWindow instanceof Ci.nsIDOMWindow);
|
||||
var uri;
|
||||
if (haveWindow) {
|
||||
uri = Utils.checkAndGetURI(aURIString, aBrowserOrWindow);
|
||||
} else {
|
||||
// aURIString must not be a relative URI.
|
||||
uri = Utils.makeURI(aURIString, null);
|
||||
}
|
||||
|
||||
// If the protocol handler is already registered, just return early.
|
||||
if (this._protocolHandlerRegistered(aProtocol, uri.spec)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var browserWindow = this._getBrowserWindowForContentWindow(aContentWindow);
|
||||
if (PrivateBrowsingUtils.isWindowPrivate(browserWindow)) {
|
||||
var browser;
|
||||
if (haveWindow) {
|
||||
let browserWindow =
|
||||
this._getBrowserWindowForContentWindow(aBrowserOrWindow);
|
||||
browser = this._getBrowserForContentWindow(browserWindow,
|
||||
aBrowserOrWindow);
|
||||
} else {
|
||||
browser = aBrowserOrWindow;
|
||||
}
|
||||
if (PrivateBrowsingUtils.isBrowserPrivate(browser)) {
|
||||
// Inside the private browsing mode, we don't want to alert the user to save
|
||||
// a protocol handler. We log it to the error console so that web developers
|
||||
// would have some way to tell what's going wrong.
|
||||
Cc["@mozilla.org/consoleservice;1"].
|
||||
getService(Ci.nsIConsoleService).
|
||||
Services.console.
|
||||
logStringMessage("Web page denied access to register a protocol handler inside private browsing mode");
|
||||
return;
|
||||
}
|
||||
|
||||
// First, check to make sure this isn't already handled internally (we don't
|
||||
// want to let them take over, say "chrome").
|
||||
var ios = Cc["@mozilla.org/network/io-service;1"].
|
||||
getService(Ci.nsIIOService);
|
||||
var handler = ios.getProtocolHandler(aProtocol);
|
||||
if (!(handler instanceof Ci.nsIExternalProtocolHandler)) {
|
||||
// This is handled internally, so we don't want them to register
|
||||
// XXX this should be a "security exception" according to spec, but that
|
||||
// isn't defined yet.
|
||||
throw("Permission denied to add " + aURIString + "as a protocol handler");
|
||||
}
|
||||
|
||||
// check if it is in the black list
|
||||
var pb = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
|
||||
var allowed;
|
||||
try {
|
||||
allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "." + aProtocol);
|
||||
}
|
||||
catch (e) {
|
||||
allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "-default");
|
||||
}
|
||||
if (!allowed) {
|
||||
// XXX this should be a "security exception" according to spec
|
||||
throw("Not allowed to register a protocol handler for " + aProtocol);
|
||||
}
|
||||
Utils.checkProtocolHandlerAllowed(aProtocol, aURIString);
|
||||
|
||||
// Now Ask the user and provide the proper callback
|
||||
var message = this._getFormattedString("addProtocolHandler",
|
||||
@ -451,8 +455,7 @@ WebContentConverterRegistrar.prototype = {
|
||||
hs.store(handlerInfo);
|
||||
}
|
||||
};
|
||||
var browserElement = this._getBrowserForContentWindow(browserWindow, aContentWindow);
|
||||
var notificationBox = browserWindow.gBrowser.getNotificationBox(browserElement);
|
||||
var notificationBox = browser.getTabBrowser().getNotificationBox(browser);
|
||||
notificationBox.appendNotification(message,
|
||||
notificationValue,
|
||||
notificationIcon,
|
||||
@ -465,23 +468,34 @@ WebContentConverterRegistrar.prototype = {
|
||||
* If a DOM window is provided, then the request came from content, so we
|
||||
* prompt the user to confirm the registration.
|
||||
*/
|
||||
registerContentHandler:
|
||||
function WCCR_registerContentHandler(aContentType, aURIString, aTitle, aContentWindow) {
|
||||
registerContentHandler:
|
||||
function WCCR_registerContentHandler(aContentType, aURIString, aTitle, aWindowOrBrowser) {
|
||||
LOG("registerContentHandler(" + aContentType + "," + aURIString + "," + aTitle + ")");
|
||||
|
||||
// We only support feed types at present.
|
||||
// XXX this should be a "security exception" according to spec, but that
|
||||
// isn't defined yet.
|
||||
var contentType = this._resolveContentType(aContentType);
|
||||
var contentType = Utils.resolveContentType(aContentType);
|
||||
if (contentType != TYPE_MAYBE_FEED)
|
||||
return;
|
||||
|
||||
if (aContentWindow) {
|
||||
var uri = this._checkAndGetURI(aURIString, aContentWindow);
|
||||
|
||||
var browserWindow = this._getBrowserWindowForContentWindow(aContentWindow);
|
||||
var browserElement = this._getBrowserForContentWindow(browserWindow, aContentWindow);
|
||||
var notificationBox = browserWindow.gBrowser.getNotificationBox(browserElement);
|
||||
if (aWindowOrBrowser) {
|
||||
var haveWindow = (aWindowOrBrowser instanceof Ci.nsIDOMWindow);
|
||||
var uri;
|
||||
var notificationBox;
|
||||
if (haveWindow) {
|
||||
uri = Utils.checkAndGetURI(aURIString, aWindowOrBrowser);
|
||||
|
||||
var browserWindow = this._getBrowserWindowForContentWindow(aWindowOrBrowser);
|
||||
var browserElement = this._getBrowserForContentWindow(browserWindow, aWindowOrBrowser);
|
||||
notificationBox = browserElement.getTabBrowser().getNotificationBox(browserElement);
|
||||
} else {
|
||||
// uri was vetted in the content process.
|
||||
uri = Utils.makeURI(aURIString, null);
|
||||
notificationBox = aWindowOrBrowser.getTabBrowser()
|
||||
.getNotificationBox(aWindowOrBrowser);
|
||||
}
|
||||
|
||||
this._appendFeedReaderNotification(uri, aTitle, notificationBox);
|
||||
}
|
||||
else
|
||||
@ -612,9 +626,7 @@ WebContentConverterRegistrar.prototype = {
|
||||
*/
|
||||
_saveContentHandlerToPrefs:
|
||||
function WCCR__saveContentHandlerToPrefs(contentType, uri, title) {
|
||||
var ps =
|
||||
Cc["@mozilla.org/preferences-service;1"].
|
||||
getService(Ci.nsIPrefService);
|
||||
var ps = Services.prefs;
|
||||
var i = 0;
|
||||
var typeBranch = null;
|
||||
while (true) {
|
||||
@ -694,8 +706,7 @@ WebContentConverterRegistrar.prototype = {
|
||||
if (contentType == TYPE_MAYBE_FEED) {
|
||||
// Make the new handler the last-selected reader in the preview page
|
||||
// and make sure the preview page is shown the next time a feed is visited
|
||||
var pb = Cc["@mozilla.org/preferences-service;1"].
|
||||
getService(Ci.nsIPrefService).getBranch(null);
|
||||
var pb = Services.prefs.getBranch(null);
|
||||
pb.setCharPref(PREF_SELECTED_READER, "web");
|
||||
|
||||
var supportsString =
|
||||
@ -800,9 +811,7 @@ WebContentConverterRegistrar.prototype = {
|
||||
* preferences.
|
||||
*/
|
||||
_init: function WCCR__init() {
|
||||
var ps =
|
||||
Cc["@mozilla.org/preferences-service;1"].
|
||||
getService(Ci.nsIPrefService);
|
||||
var ps = Services.prefs;
|
||||
|
||||
var kids = ps.getBranch(PREF_CONTENTHANDLERS_BRANCH)
|
||||
.getChildList("");
|
||||
@ -850,9 +859,7 @@ WebContentConverterRegistrar.prototype = {
|
||||
* See nsIObserver
|
||||
*/
|
||||
observe: function WCCR_observe(subject, topic, data) {
|
||||
var os =
|
||||
Cc["@mozilla.org/observer-service;1"].
|
||||
getService(Ci.nsIObserverService);
|
||||
var os = Services.obs;
|
||||
switch (topic) {
|
||||
case "app-startup":
|
||||
os.addObserver(this, "browser-ui-startup-complete", false);
|
||||
@ -890,4 +897,71 @@ WebContentConverterRegistrar.prototype = {
|
||||
}]
|
||||
};
|
||||
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([WebContentConverterRegistrar]);
|
||||
function WebContentConverterRegistrarContent() {
|
||||
}
|
||||
|
||||
WebContentConverterRegistrarContent.prototype = {
|
||||
/**
|
||||
* See nsIWebContentHandlerRegistrar
|
||||
*/
|
||||
registerContentHandler(aContentType, aURIString, aTitle, aBrowserOrWindow) {
|
||||
// aBrowserOrWindow must be a window.
|
||||
let messageManager = aBrowserOrWindow.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.QueryInterface(Ci.nsIDocShell)
|
||||
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsITabChild)
|
||||
.messageManager;
|
||||
|
||||
let uri = Utils.checkAndGetURI(aURIString, aBrowserOrWindow);
|
||||
if (Utils.resolveContentType(aContentType) != TYPE_MAYBE_FEED) {
|
||||
return;
|
||||
}
|
||||
|
||||
messageManager.sendAsyncMessage("WCCR:registerContentHandler",
|
||||
{ contentType: aContentType,
|
||||
uri: uri.spec,
|
||||
title: aTitle });
|
||||
},
|
||||
|
||||
registerProtocolHandler(aProtocol, aURIString, aTitle, aBrowserOrWindow) {
|
||||
// aBrowserOrWindow must be a window.
|
||||
let messageManager = aBrowserOrWindow.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.QueryInterface(Ci.nsIDocShell)
|
||||
.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsITabChild)
|
||||
.messageManager;
|
||||
|
||||
let uri = Utils.checkAndGetURI(aURIString, aBrowserOrWindow);
|
||||
Utils.checkProtocolHandlerAllowed(aProtocol, aURIString);
|
||||
|
||||
messageManager.sendAsyncMessage("WCCR:registerProtocolHandler",
|
||||
{ protocol: aProtocol,
|
||||
uri: uri.spec,
|
||||
title: aTitle });
|
||||
},
|
||||
|
||||
/**
|
||||
* See nsIFactory
|
||||
*/
|
||||
createInstance: function WCCR_createInstance(outer, iid) {
|
||||
if (outer != null)
|
||||
throw Cr.NS_ERROR_NO_AGGREGATION;
|
||||
return this.QueryInterface(iid);
|
||||
},
|
||||
|
||||
classID: WCCR_CLASSID,
|
||||
|
||||
/**
|
||||
* See nsISupports
|
||||
*/
|
||||
QueryInterface: XPCOMUtils.generateQI(
|
||||
[Ci.nsIWebContentHandlerRegistrar,
|
||||
Ci.nsIFactory])
|
||||
};
|
||||
|
||||
this.NSGetFactory =
|
||||
(Services.appinfo.processType === Services.appinfo.PROCESS_TYPE_CONTENT) ?
|
||||
XPCOMUtils.generateNSGetFactory([WebContentConverterRegistrarContent]) :
|
||||
XPCOMUtils.generateNSGetFactory([WebContentConverterRegistrar]);
|
||||
|
@ -1,5 +1,5 @@
|
||||
[DEFAULT]
|
||||
skip-if = buildapp == 'mulet' || buildapp == 'b2g' || e10s
|
||||
skip-if = buildapp == 'mulet' || buildapp == 'b2g'
|
||||
support-files =
|
||||
bug368464-data.xml
|
||||
bug408328-data.xml
|
||||
@ -10,6 +10,9 @@ support-files =
|
||||
valid-unsniffable-feed.xml
|
||||
|
||||
[test_bug436801.html]
|
||||
skip-if = e10s
|
||||
[test_bug494328.html]
|
||||
skip-if = e10s
|
||||
[test_bug589543.html]
|
||||
skip-if = e10s
|
||||
[test_registerHandler.html]
|
||||
|
@ -39,45 +39,45 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=402788
|
||||
ok(navigator.registerContentHandler, "navigator.registerContentHandler should be defined");
|
||||
|
||||
// testing a generic case
|
||||
is(true, testRegisterHandler(true, "foo", "http://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler should work");
|
||||
is(true, testRegisterHandler(false, "application/rss+xml", "http://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler should work");
|
||||
is(testRegisterHandler(true, "foo", "http://mochi.test:8888/%s", "Foo handler"), true, "registering a foo protocol handler should work");
|
||||
is(testRegisterHandler(false, "application/rss+xml", "http://mochi.test:8888/%s", "Foo handler"), true, "registering a foo content handler should work");
|
||||
|
||||
// testing with wrong uris
|
||||
is(false, testRegisterHandler(true, "foo", "http://mochi.test:8888/", "Foo handler"), "a protocol handler uri should contain %s");
|
||||
is(false, testRegisterHandler(false, "application/rss+xml", "http://mochi.test:8888/", "Foo handler"), "a content handler uri should contain %s");
|
||||
is(testRegisterHandler(true, "foo", "http://mochi.test:8888/", "Foo handler"), false, "a protocol handler uri should contain %s");
|
||||
is(testRegisterHandler(false, "application/rss+xml", "http://mochi.test:8888/", "Foo handler"), false, "a content handler uri should contain %s");
|
||||
|
||||
// the spec explicitly allows relative urls to be passed
|
||||
is(true, testRegisterHandler(true, "foo", "foo/%s", "Foo handler"), "a protocol handler uri should be valid");
|
||||
is(true, testRegisterHandler(false, "application/rss+xml", "foo/%s", "Foo handler"), "a content handler uri should be valid");
|
||||
is(testRegisterHandler(true, "foo", "foo/%s", "Foo handler"), true, "a protocol handler uri should be valid");
|
||||
is(testRegisterHandler(false, "application/rss+xml", "foo/%s", "Foo handler"), true, "a content handler uri should be valid");
|
||||
|
||||
// we should only accept to register when the handler has the same host as the current page (bug 402287)
|
||||
is(false, testRegisterHandler(true, "foo", "http://remotehost:8888/%s", "Foo handler"), "registering a foo protocol handler with a different host should not work");
|
||||
is(false, testRegisterHandler(false, "application/rss+xml", "http://remotehost:8888/%s", "Foo handler"), "registering a foo content handler with a different host should not work");
|
||||
is(testRegisterHandler(true, "foo", "http://remotehost:8888/%s", "Foo handler"), false, "registering a foo protocol handler with a different host should not work");
|
||||
is(testRegisterHandler(false, "application/rss+xml", "http://remotehost:8888/%s", "Foo handler"), false, "registering a foo content handler with a different host should not work");
|
||||
|
||||
// restriction to http(s) for the uri of the handler (bug 401343)
|
||||
// https should work (http already tested in the generic case)
|
||||
is(true, testRegisterHandler(true, "foo", "https://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler with https scheme should work");
|
||||
is(true, testRegisterHandler(false, "application/rss+xml", "https://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler with https scheme should work");
|
||||
is(testRegisterHandler(true, "foo", "https://mochi.test:8888/%s", "Foo handler"), true, "registering a foo protocol handler with https scheme should work");
|
||||
is(testRegisterHandler(false, "application/rss+xml", "https://mochi.test:8888/%s", "Foo handler"), true, "registering a foo content handler with https scheme should work");
|
||||
// ftp should not work
|
||||
is(false, testRegisterHandler(true, "foo", "ftp://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler with ftp scheme should not work");
|
||||
is(false, testRegisterHandler(false, "application/rss+xml", "ftp://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler with ftp scheme should not work");
|
||||
is(testRegisterHandler(true, "foo", "ftp://mochi.test:8888/%s", "Foo handler"), false, "registering a foo protocol handler with ftp scheme should not work");
|
||||
is(testRegisterHandler(false, "application/rss+xml", "ftp://mochi.test:8888/%s", "Foo handler"), false, "registering a foo content handler with ftp scheme should not work");
|
||||
// chrome should not work
|
||||
is(false, testRegisterHandler(true, "foo", "chrome://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler with chrome scheme should not work");
|
||||
is(false, testRegisterHandler(false, "application/rss+xml", "chrome://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler with chrome scheme should not work");
|
||||
is(testRegisterHandler(true, "foo", "chrome://mochi.test:8888/%s", "Foo handler"), false, "registering a foo protocol handler with chrome scheme should not work");
|
||||
is(testRegisterHandler(false, "application/rss+xml", "chrome://mochi.test:8888/%s", "Foo handler"), false, "registering a foo content handler with chrome scheme should not work");
|
||||
// foo should not work
|
||||
is(false, testRegisterHandler(true, "foo", "foo://mochi.test:8888/%s", "Foo handler"), "registering a foo protocol handler with foo scheme should not work");
|
||||
is(false, testRegisterHandler(false, "application/rss+xml", "foo://mochi.test:8888/%s", "Foo handler"), "registering a foo content handler with foo scheme should not work");
|
||||
is(testRegisterHandler(true, "foo", "foo://mochi.test:8888/%s", "Foo handler"), false, "registering a foo protocol handler with foo scheme should not work");
|
||||
is(testRegisterHandler(false, "application/rss+xml", "foo://mochi.test:8888/%s", "Foo handler"), false, "registering a foo content handler with foo scheme should not work");
|
||||
|
||||
// for security reasons, protocol handlers should never be registered for some schemes (chrome, vbscript, ...) (bug 402788)
|
||||
is(false, testRegisterHandler(true, "chrome", "http://mochi.test:8888/%s", "chrome handler"), "registering a chrome protocol handler should not work");
|
||||
is(false, testRegisterHandler(true, "vbscript", "http://mochi.test:8888/%s", "vbscript handler"), "registering a vbscript protocol handler should not work");
|
||||
is(false, testRegisterHandler(true, "javascript", "http://mochi.test:8888/%s", "javascript handler"), "registering a javascript protocol handler should not work");
|
||||
is(false, testRegisterHandler(true, "moz-icon", "http://mochi.test:8888/%s", "moz-icon handler"), "registering a moz-icon protocol handler should not work");
|
||||
is(testRegisterHandler(true, "chrome", "http://mochi.test:8888/%s", "chrome handler"), false, "registering a chrome protocol handler should not work");
|
||||
is(testRegisterHandler(true, "vbscript", "http://mochi.test:8888/%s", "vbscript handler"), false, "registering a vbscript protocol handler should not work");
|
||||
is(testRegisterHandler(true, "javascript", "http://mochi.test:8888/%s", "javascript handler"), false, "registering a javascript protocol handler should not work");
|
||||
is(testRegisterHandler(true, "moz-icon", "http://mochi.test:8888/%s", "moz-icon handler"), false, "registering a moz-icon protocol handler should not work");
|
||||
|
||||
// for security reasons, content handlers should never be registered for some types (html, ...)
|
||||
is(true, testRegisterHandler(false, "application/rss+xml", "http://mochi.test:8888/%s", "Foo handler"), "registering rss content handlers should work");
|
||||
is(true, testRegisterHandler(false, "application/atom+xml", "http://mochi.test:8888/%s", "Foo handler"), "registering atom content handlers should work");
|
||||
todo(false, testRegisterHandler(false, "text/html", "http://mochi.test:8888/%s", "Foo handler"), "registering html content handlers should not work"); // bug 403798
|
||||
is(testRegisterHandler(false, "application/rss+xml", "http://mochi.test:8888/%s", "Foo handler"), true, "registering rss content handlers should work");
|
||||
is(testRegisterHandler(false, "application/atom+xml", "http://mochi.test:8888/%s", "Foo handler"), true, "registering atom content handlers should work");
|
||||
todo_is(testRegisterHandler(false, "text/html", "http://mochi.test:8888/%s", "Foo handler"), false, "registering html content handlers should not work"); // bug 403798
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
|
@ -94,6 +94,9 @@ XPCOMUtils.defineLazyModuleGetter(this, "RemotePrompt",
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "ContentPrefServiceParent",
|
||||
"resource://gre/modules/ContentPrefServiceParent.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Feeds",
|
||||
"resource:///modules/Feeds.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "SelfSupportBackend",
|
||||
"resource:///modules/SelfSupportBackend.jsm");
|
||||
|
||||
@ -762,6 +765,7 @@ BrowserGlue.prototype = {
|
||||
|
||||
ContentClick.init();
|
||||
RemotePrompt.init();
|
||||
Feeds.init();
|
||||
ContentPrefServiceParent.init();
|
||||
|
||||
LoginManagerParent.init();
|
||||
|
@ -38,7 +38,6 @@ support-files =
|
||||
[browser_privatebrowsing_placestitle.js]
|
||||
[browser_privatebrowsing_popupblocker.js]
|
||||
[browser_privatebrowsing_protocolhandler.js]
|
||||
skip-if = e10s # Bug 940206 - nsIWebContentHandlerRegistrar::registerProtocolHandler doesn't work in e10s
|
||||
[browser_privatebrowsing_sidebar.js]
|
||||
[browser_privatebrowsing_theming.js]
|
||||
[browser_privatebrowsing_ui.js]
|
||||
|
@ -26,7 +26,6 @@ CFLAGS="$CFLAGS -Wno-attributes"
|
||||
CPPFLAGS="$CPPFLAGS -Wno-attributes"
|
||||
CXXFLAGS="$CXXFLAGS -Wno-attributes"
|
||||
|
||||
TOOLTOOL_DIR="$(dirname $topsrcdir)"
|
||||
export PKG_CONFIG_LIBDIR=/usr/lib64/pkgconfig:/usr/share/pkgconfig
|
||||
. $topsrcdir/build/unix/mozconfig.gtk
|
||||
|
||||
|
@ -7,11 +7,10 @@
|
||||
"unpack": true
|
||||
},
|
||||
{
|
||||
"size": 11179576,
|
||||
"digest": "91567ce8e2bb8ab0ebc60c31e90731d88a1ea889fb71bcf55c735746a60fa7610b7e040ea3d8f727b6f692ae3ee703d6f3b30cdbd76fdf5617f77d9c38aa20ed",
|
||||
"size": 4079256,
|
||||
"digest": "bb5238558bcf6db2ca395513c8dccaa15dd61b3c375598eb6a685356b0c1a2d9840e3bf81bc00242b872fd798541f53d723777c754412abf0e772b7cc284937c",
|
||||
"algorithm": "sha512",
|
||||
"filename": "gtk3.tar.xz",
|
||||
"setup": "setup.sh",
|
||||
"unpack": true
|
||||
},
|
||||
{
|
||||
|
16
browser/config/tooltool-manifests/linux32/valgrind.manifest
Normal file
16
browser/config/tooltool-manifests/linux32/valgrind.manifest
Normal file
@ -0,0 +1,16 @@
|
||||
[
|
||||
{
|
||||
"size": 80458572,
|
||||
"digest": "e5101f9dee1e462f6cbd3897ea57eede41d23981825c7b20d91d23ab461875d54d3dfc24999aa58a31e8b01f49fb3140e05ffe5af2957ef1d1afb89fd0dfe1ad",
|
||||
"algorithm": "sha512",
|
||||
"filename": "gcc.tar.xz",
|
||||
"unpack": true
|
||||
},
|
||||
{
|
||||
"size": 167175,
|
||||
"digest": "0b71a936edf5bd70cf274aaa5d7abc8f77fe8e7b5593a208f805cc9436fac646b9c4f0b43c2b10de63ff3da671497d35536077ecbc72dba7f8159a38b580f831",
|
||||
"algorithm": "sha512",
|
||||
"filename": "sccache.tar.bz2",
|
||||
"unpack": true
|
||||
}
|
||||
]
|
@ -8,13 +8,5 @@
|
||||
"algorithm": "sha512",
|
||||
"filename": "clang.tar.bz2",
|
||||
"unpack": true
|
||||
},
|
||||
{
|
||||
"size": 12057960,
|
||||
"digest": "6105d6432943141cffb40020dc5ba3a793650bdeb3af9bd5e56d3796c5f03df9962a73e521646cd71fbfb5e266c1e74716ad722fb6055589dfb7d35175bca89e",
|
||||
"algorithm": "sha512",
|
||||
"filename": "gtk3.tar.xz",
|
||||
"setup": "setup.sh",
|
||||
"unpack": true
|
||||
}
|
||||
]
|
||||
|
@ -7,11 +7,10 @@
|
||||
"unpack": true
|
||||
},
|
||||
{
|
||||
"size": 12057960,
|
||||
"digest": "6105d6432943141cffb40020dc5ba3a793650bdeb3af9bd5e56d3796c5f03df9962a73e521646cd71fbfb5e266c1e74716ad722fb6055589dfb7d35175bca89e",
|
||||
"size": 4431740,
|
||||
"digest": "68fc56b0fb0cdba629b95683d6649ff76b00dccf97af90960c3d7716f6108b2162ffd5ffcd5c3a60a21b28674df688fe4dabc67345e2da35ec5abeae3d48c8e3",
|
||||
"algorithm": "sha512",
|
||||
"filename": "gtk3.tar.xz",
|
||||
"setup": "setup.sh",
|
||||
"unpack": true
|
||||
},
|
||||
{
|
||||
|
@ -10,11 +10,10 @@
|
||||
"unpack": true
|
||||
},
|
||||
{
|
||||
"size": 12057960,
|
||||
"digest": "6105d6432943141cffb40020dc5ba3a793650bdeb3af9bd5e56d3796c5f03df9962a73e521646cd71fbfb5e266c1e74716ad722fb6055589dfb7d35175bca89e",
|
||||
"size": 4431740,
|
||||
"digest": "68fc56b0fb0cdba629b95683d6649ff76b00dccf97af90960c3d7716f6108b2162ffd5ffcd5c3a60a21b28674df688fe4dabc67345e2da35ec5abeae3d48c8e3",
|
||||
"algorithm": "sha512",
|
||||
"filename": "gtk3.tar.xz",
|
||||
"setup": "setup.sh",
|
||||
"unpack": true
|
||||
}
|
||||
]
|
||||
|
16
browser/config/tooltool-manifests/linux64/valgrind.manifest
Normal file
16
browser/config/tooltool-manifests/linux64/valgrind.manifest
Normal file
@ -0,0 +1,16 @@
|
||||
[
|
||||
{
|
||||
"size": 80458572,
|
||||
"digest": "e5101f9dee1e462f6cbd3897ea57eede41d23981825c7b20d91d23ab461875d54d3dfc24999aa58a31e8b01f49fb3140e05ffe5af2957ef1d1afb89fd0dfe1ad",
|
||||
"algorithm": "sha512",
|
||||
"filename": "gcc.tar.xz",
|
||||
"unpack": true
|
||||
},
|
||||
{
|
||||
"size": 167175,
|
||||
"digest": "0b71a936edf5bd70cf274aaa5d7abc8f77fe8e7b5593a208f805cc9436fac646b9c4f0b43c2b10de63ff3da671497d35536077ecbc72dba7f8159a38b580f831",
|
||||
"algorithm": "sha512",
|
||||
"filename": "sccache.tar.bz2",
|
||||
"unpack": true
|
||||
}
|
||||
]
|
@ -12,9 +12,35 @@ Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "BrowserUtils",
|
||||
"resource://gre/modules/BrowserUtils.jsm");
|
||||
|
||||
const Ci = Components.interfaces;
|
||||
const { interfaces: Ci, classes: Cc } = Components;
|
||||
|
||||
this.Feeds = {
|
||||
init() {
|
||||
let mm = Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
|
||||
mm.addMessageListener("WCCR:registerProtocolHandler", this);
|
||||
},
|
||||
|
||||
receiveMessage(aMessage) {
|
||||
switch (aMessage.name) {
|
||||
case "WCCR:registerProtocolHandler": {
|
||||
let data = aMessage.data;
|
||||
let registrar = Cc["@mozilla.org/embeddor.implemented/web-content-handler-registrar;1"].
|
||||
getService(Ci.nsIWebContentHandlerRegistrar);
|
||||
registrar.registerProtocolHandler(data.protocol, data.uri, data.title,
|
||||
aMessage.target);
|
||||
break;
|
||||
}
|
||||
|
||||
case "WCCR:registerContentHandler": {
|
||||
let data = aMessage.data;
|
||||
let registrar = Cc["@mozilla.org/embeddor.implemented/web-content-handler-registrar;1"].
|
||||
getService(Ci.nsIWebContentHandlerRegistrar);
|
||||
registrar.registerContentHandler(data.contentType, data.uri, data.title,
|
||||
aMessage.target);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* isValidFeed: checks whether the given data represents a valid feed.
|
||||
|
@ -101,20 +101,27 @@
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/crashed.svg");
|
||||
}
|
||||
|
||||
.tab-icon-overlay[soundplaying][pinned] {
|
||||
.tab-icon-overlay[soundplaying][pinned],
|
||||
.tab-icon-overlay[muted][pinned] {
|
||||
display: -moz-box;
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio");
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.tab-icon-overlay[soundplaying][pinned]:hover,
|
||||
.tab-icon-overlay[muted][pinned]:hover {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.tab-icon-overlay[soundplaying][pinned] {
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio");
|
||||
}
|
||||
|
||||
.tab-icon-overlay[soundplaying][pinned]:hover {
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-hover");
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.tab-icon-overlay[soundplaying][pinned]:hover:active {
|
||||
list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-small.svg#tab-audio-pressed");
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.tab-icon-overlay[muted][pinned] {
|
||||
@ -179,7 +186,7 @@
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.tab-icon-sound:not([soundplaying]),
|
||||
.tab-icon-sound:not([soundplaying]):not([muted]),
|
||||
.tab-icon-sound[pinned] {
|
||||
display: none;
|
||||
}
|
||||
@ -414,6 +421,7 @@
|
||||
.tab-background-middle,
|
||||
.tabs-newtab-button,
|
||||
.tab-icon-overlay[soundplaying],
|
||||
.tab-icon-overlay[muted],
|
||||
.tab-icon-sound,
|
||||
.tab-close-button {
|
||||
pointer-events: auto;
|
||||
|
@ -57,7 +57,7 @@ build() {
|
||||
cd build/$name
|
||||
eval ../../$name-$version/configure --disable-static $* $configure_args
|
||||
make $make_flags
|
||||
make install DESTDIR=$root_dir/gtk3
|
||||
make install-strip DESTDIR=$root_dir/gtk3
|
||||
find $root_dir/gtk3 -name \*.la -delete
|
||||
cd ../..
|
||||
}
|
||||
@ -103,44 +103,5 @@ build gtk+
|
||||
rm -rf $root_dir/gtk3/usr/local/share/gtk-doc
|
||||
rm -rf $root_dir/gtk3/usr/local/share/locale
|
||||
|
||||
# mock build environment doesn't have fonts in /usr/share/fonts, but
|
||||
# has some in /usr/share/X11/fonts. Add this directory to the
|
||||
# fontconfig configuration without changing the gtk3 tooltool package.
|
||||
cat << EOF > $root_dir/gtk3/usr/local/etc/fonts/local.conf
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<fontconfig>
|
||||
<dir>/usr/share/X11/fonts</dir>
|
||||
</fontconfig>
|
||||
EOF
|
||||
|
||||
cat <<EOF > $root_dir/gtk3/setup.sh
|
||||
#!/bin/sh
|
||||
|
||||
cd \$(dirname \$0)
|
||||
|
||||
# pango expects absolute paths in pango.modules, and TOOLTOOL_DIR may vary...
|
||||
LD_LIBRARY_PATH=./usr/local/lib \
|
||||
PANGO_SYSCONFDIR=./usr/local/etc \
|
||||
PANGO_LIBDIR=./usr/local/lib \
|
||||
./usr/local/bin/pango-querymodules > ./usr/local/etc/pango/pango.modules
|
||||
|
||||
# same with gdb-pixbuf and loaders.cache
|
||||
LD_LIBRARY_PATH=./usr/local/lib \
|
||||
GDK_PIXBUF_MODULE_FILE=./usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache \
|
||||
GDK_PIXBUF_MODULEDIR=./usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders \
|
||||
./usr/local/bin/gdk-pixbuf-query-loaders > ./usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
|
||||
|
||||
# The fontconfig version in the tooltool package has known uses of
|
||||
# uninitialized memory when creating its cache, and while most users
|
||||
# will already have an existing cache, running Firefox on automation
|
||||
# will create it. Combined with valgrind, this generates irrelevant
|
||||
# errors.
|
||||
# So create the fontconfig cache beforehand.
|
||||
./usr/local/bin/fc-cache
|
||||
EOF
|
||||
|
||||
chmod +x $root_dir/gtk3/setup.sh
|
||||
|
||||
cd $cwd
|
||||
tar -C $root_dir -Jcf gtk3.tar.xz gtk3
|
||||
|
@ -1,28 +1,48 @@
|
||||
TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
|
||||
|
||||
# $TOOLTOOL_DIR/gtk3 comes from tooltool, when the tooltool manifest contains it.
|
||||
if [ -d "$TOOLTOOL_DIR/gtk3" ]; then
|
||||
# $topsrcdir/gtk3 comes from tooltool, when the tooltool manifest contains it.
|
||||
if [ -d "$topsrcdir/gtk3" ]; then
|
||||
if [ -z "$PKG_CONFIG_LIBDIR" ]; then
|
||||
echo PKG_CONFIG_LIBDIR must be set >&2
|
||||
exit 1
|
||||
fi
|
||||
export PKG_CONFIG_SYSROOT_DIR="$TOOLTOOL_DIR/gtk3"
|
||||
export PKG_CONFIG_PATH="$TOOLTOOL_DIR/gtk3/usr/local/lib/pkgconfig"
|
||||
export PATH="$TOOLTOOL_DIR/gtk3/usr/local/bin:${PATH}"
|
||||
export PKG_CONFIG_SYSROOT_DIR="$topsrcdir/gtk3"
|
||||
export PKG_CONFIG_PATH="$topsrcdir/gtk3/usr/local/lib/pkgconfig"
|
||||
export PATH="$topsrcdir/gtk3/usr/local/bin:${PATH}"
|
||||
# Ensure cairo, gdk-pixbuf, etc. are not taken from the system installed packages.
|
||||
LDFLAGS="-L$TOOLTOOL_DIR/gtk3/usr/local/lib ${LDFLAGS}"
|
||||
LDFLAGS="-L$topsrcdir/gtk3/usr/local/lib ${LDFLAGS}"
|
||||
mk_add_options "export LD_LIBRARY_PATH=$topsrcdir/gtk3/usr/local/lib"
|
||||
ac_add_options --enable-default-toolkit=cairo-gtk3
|
||||
|
||||
# Set things up to use Gtk+3 from the tooltool package
|
||||
mk_add_options "export FONTCONFIG_PATH=$TOOLTOOL_DIR/gtk3/usr/local/etc/fonts"
|
||||
mk_add_options "export PANGO_SYSCONFDIR=$TOOLTOOL_DIR/gtk3/usr/local/etc"
|
||||
mk_add_options "export PANGO_LIBDIR=$TOOLTOOL_DIR/gtk3/usr/local/lib"
|
||||
mk_add_options "export GDK_PIXBUF_MODULE_FILE=$TOOLTOOL_DIR/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"
|
||||
mk_add_options "export GDK_PIXBUF_MODULEDIR=$TOOLTOOL_DIR/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders"
|
||||
mk_add_options "export LD_LIBRARY_PATH=$TOOLTOOL_DIR/gtk3/usr/local/lib"
|
||||
mk_add_options "export FONTCONFIG_PATH=$topsrcdir/gtk3/usr/local/etc/fonts"
|
||||
mk_add_options "export PANGO_SYSCONFDIR=$topsrcdir/gtk3/usr/local/etc"
|
||||
mk_add_options "export PANGO_LIBDIR=$topsrcdir/gtk3/usr/local/lib"
|
||||
mk_add_options "export GDK_PIXBUF_MODULE_FILE=$topsrcdir/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"
|
||||
mk_add_options "export GDK_PIXBUF_MODULEDIR=$topsrcdir/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders"
|
||||
mk_add_options "export LD_LIBRARY_PATH=$topsrcdir/gtk3/usr/local/lib"
|
||||
|
||||
# pango expects absolute paths in pango.modules, and topsrcdir may vary...
|
||||
LD_LIBRARY_PATH=$topsrcdir/gtk3/usr/local/lib \
|
||||
PANGO_SYSCONFDIR=$topsrcdir/gtk3/usr/local/etc \
|
||||
PANGO_LIBDIR=$topsrcdir/gtk3/usr/local/lib \
|
||||
$topsrcdir/gtk3/usr/local/bin/pango-querymodules > $topsrcdir/gtk3/usr/local/etc/pango/pango.modules
|
||||
|
||||
# same with gdb-pixbuf and loaders.cache
|
||||
LD_LIBRARY_PATH=$topsrcdir/gtk3/usr/local/lib \
|
||||
GDK_PIXBUF_MODULE_FILE=$topsrcdir/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache \
|
||||
GDK_PIXBUF_MODULEDIR=$topsrcdir/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders \
|
||||
$topsrcdir/gtk3/usr/local/bin/gdk-pixbuf-query-loaders > $topsrcdir/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
|
||||
|
||||
# mock build environment doesn't have fonts in /usr/share/fonts, but
|
||||
# has some in /usr/share/X11/fonts. Add this directory to the
|
||||
# fontconfig configuration without changing the gtk3 tooltool package.
|
||||
cat << EOF > $topsrcdir/gtk3/usr/local/etc/fonts/local.conf
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||
<fontconfig>
|
||||
<dir>/usr/share/X11/fonts</dir>
|
||||
</fontconfig>
|
||||
EOF
|
||||
|
||||
# Until a tooltool with bug 1188571 landed is available everywhere
|
||||
$TOOLTOOL_DIR/gtk3/setup.sh
|
||||
else
|
||||
ac_add_options --enable-default-toolkit=cairo-gtk2
|
||||
fi
|
||||
|
@ -111,13 +111,6 @@ class MachCommands(MachCommandBase):
|
||||
'--show-possibly-lost=no',
|
||||
'--track-origins=yes',
|
||||
'--trace-children=yes',
|
||||
# The gstreamer plugin scanner can run as part of executing
|
||||
# firefox, but is an external program. In some weird cases,
|
||||
# valgrind finds errors while executing __libc_freeres when
|
||||
# it runs, but those are not relevant, as it's related to
|
||||
# executing third party code. So don't trace
|
||||
# gst-plugin-scanner.
|
||||
'--trace-children-skip=*/gst-plugin-scanner',
|
||||
'-v', # Enable verbosity to get the list of used suppressions
|
||||
]
|
||||
|
||||
|
@ -25,7 +25,7 @@ else
|
||||
_arch=32
|
||||
fi
|
||||
|
||||
TOOLTOOL_MANIFEST=browser/config/tooltool-manifests/linux${_arch}/releng.manifest
|
||||
TOOLTOOL_MANIFEST=browser/config/tooltool-manifests/linux${_arch}/valgrind.manifest
|
||||
TOOLTOOL_SERVER=https://api.pub.build.mozilla.org/tooltool/
|
||||
(cd $srcdir; python /builds/tooltool.py --url $TOOLTOOL_SERVER --overwrite -m $TOOLTOOL_MANIFEST fetch ${TOOLTOOL_CACHE:+ -c ${TOOLTOOL_CACHE}}) || exit 2
|
||||
|
||||
|
@ -17,11 +17,6 @@
|
||||
// Silence "warning: #include_next is a GCC extension"
|
||||
#pragma GCC system_header
|
||||
|
||||
#ifdef _WIN32
|
||||
// Suppress windef.h min and max macros - they make std::min/max not compile.
|
||||
#define NOMINMAX 1
|
||||
#endif
|
||||
|
||||
// mozalloc.h wants <new>; break the cycle by always explicitly
|
||||
// including <new> here. NB: this is a tad sneaky. Sez the gcc docs:
|
||||
//
|
||||
|
@ -12,9 +12,6 @@
|
||||
# error "STL code can only be used with -fno-exceptions"
|
||||
#endif
|
||||
|
||||
// Suppress windef.h min and max macros - they make std::min/max not compile.
|
||||
#define NOMINMAX 1
|
||||
|
||||
// Code built with !_HAS_EXCEPTIONS calls std::_Throw(), but the win2k
|
||||
// CRT doesn't export std::_Throw(). So we define it.
|
||||
#ifndef mozilla_Throw_h
|
||||
|
@ -2332,6 +2332,8 @@ ia64*-hpux*)
|
||||
AC_DEFINE(HW_THREADS)
|
||||
AC_DEFINE(STDC_HEADERS)
|
||||
AC_DEFINE(WIN32_LEAN_AND_MEAN)
|
||||
dnl See http://support.microsoft.com/kb/143208 to use STL
|
||||
AC_DEFINE(NOMINMAX)
|
||||
TARGET_MD_ARCH=win32
|
||||
_PLATFORM_DEFAULT_TOOLKIT='cairo-windows'
|
||||
BIN_SUFFIX='.exe'
|
||||
|
@ -1134,12 +1134,14 @@ nsFocusManager::ActivateOrDeactivate(nsPIDOMWindow* aWindow, bool aActive)
|
||||
aWindow->ActivateOrDeactivate(aActive);
|
||||
|
||||
// Send the activate event.
|
||||
nsContentUtils::DispatchEventOnlyToChrome(aWindow->GetExtantDoc(),
|
||||
aWindow,
|
||||
aActive ?
|
||||
NS_LITERAL_STRING("activate") :
|
||||
NS_LITERAL_STRING("deactivate"),
|
||||
true, true, nullptr);
|
||||
if (aWindow->GetExtantDoc()) {
|
||||
nsContentUtils::DispatchEventOnlyToChrome(aWindow->GetExtantDoc(),
|
||||
aWindow,
|
||||
aActive ?
|
||||
NS_LITERAL_STRING("activate") :
|
||||
NS_LITERAL_STRING("deactivate"),
|
||||
true, true, nullptr);
|
||||
}
|
||||
|
||||
// Look for any remote child frames, iterate over them and send the activation notification.
|
||||
nsContentUtils::CallOnAllRemoteChildren(aWindow, ActivateOrDeactivateChild,
|
||||
|
@ -2694,136 +2694,128 @@ protected:
|
||||
mozilla::dom::VisibilityState mVisibilityState;
|
||||
|
||||
// True if BIDI is enabled.
|
||||
bool mBidiEnabled;
|
||||
bool mBidiEnabled : 1;
|
||||
// True if a MathML element has ever been owned by this document.
|
||||
bool mMathMLEnabled;
|
||||
bool mMathMLEnabled : 1;
|
||||
|
||||
// True if this document is the initial document for a window. This should
|
||||
// basically be true only for documents that exist in newly-opened windows or
|
||||
// documents created to satisfy a GetDocument() on a window when there's no
|
||||
// document in it.
|
||||
bool mIsInitialDocumentInWindow;
|
||||
bool mIsInitialDocumentInWindow : 1;
|
||||
|
||||
// True if we're loaded as data and therefor has any dangerous stuff, such
|
||||
// as scripts and plugins, disabled.
|
||||
bool mLoadedAsData;
|
||||
bool mLoadedAsData : 1;
|
||||
|
||||
// This flag is only set in XMLDocument, for e.g. documents used in XBL. We
|
||||
// don't want animations to play in such documents, so we need to store the
|
||||
// flag here so that we can check it in nsDocument::GetAnimationController.
|
||||
bool mLoadedAsInteractiveData;
|
||||
bool mLoadedAsInteractiveData : 1;
|
||||
|
||||
// If true, whoever is creating the document has gotten it to the
|
||||
// point where it's safe to start layout on it.
|
||||
bool mMayStartLayout;
|
||||
bool mMayStartLayout : 1;
|
||||
|
||||
// True iff we've ever fired a DOMTitleChanged event for this document
|
||||
bool mHaveFiredTitleChange;
|
||||
bool mHaveFiredTitleChange : 1;
|
||||
|
||||
// True iff IsShowing() should be returning true
|
||||
bool mIsShowing;
|
||||
bool mIsShowing : 1;
|
||||
|
||||
// True iff the document "page" is not hidden (i.e. currently in the
|
||||
// bfcache)
|
||||
bool mVisible;
|
||||
bool mVisible : 1;
|
||||
|
||||
// True if our content viewer has been removed from the docshell
|
||||
// (it may still be displayed, but in zombie state). Form control data
|
||||
// has been saved.
|
||||
bool mRemovedFromDocShell;
|
||||
bool mRemovedFromDocShell : 1;
|
||||
|
||||
// True iff DNS prefetch is allowed for this document. Note that if the
|
||||
// document has no window, DNS prefetch won't be performed no matter what.
|
||||
bool mAllowDNSPrefetch;
|
||||
bool mAllowDNSPrefetch : 1;
|
||||
|
||||
// True when this document is a static clone of a normal document
|
||||
bool mIsStaticDocument;
|
||||
bool mIsStaticDocument : 1;
|
||||
|
||||
// True while this document is being cloned to a static document.
|
||||
bool mCreatingStaticClone;
|
||||
bool mCreatingStaticClone : 1;
|
||||
|
||||
// True iff the document is being unlinked or deleted.
|
||||
bool mInUnlinkOrDeletion;
|
||||
bool mInUnlinkOrDeletion : 1;
|
||||
|
||||
// True if document has ever had script handling object.
|
||||
bool mHasHadScriptHandlingObject;
|
||||
bool mHasHadScriptHandlingObject : 1;
|
||||
|
||||
// True if we're an SVG document being used as an image.
|
||||
bool mIsBeingUsedAsImage;
|
||||
bool mIsBeingUsedAsImage : 1;
|
||||
|
||||
// True is this document is synthetic : stand alone image, video, audio
|
||||
// file, etc.
|
||||
bool mIsSyntheticDocument;
|
||||
bool mIsSyntheticDocument : 1;
|
||||
|
||||
// True if this document has links whose state needs updating
|
||||
bool mHasLinksToUpdate;
|
||||
bool mHasLinksToUpdate : 1;
|
||||
|
||||
// True if a layout flush might not be a no-op
|
||||
bool mNeedLayoutFlush;
|
||||
bool mNeedLayoutFlush : 1;
|
||||
|
||||
// True if a style flush might not be a no-op
|
||||
bool mNeedStyleFlush;
|
||||
bool mNeedStyleFlush : 1;
|
||||
|
||||
// True if a DOMMutationObserver is perhaps attached to a node in the document.
|
||||
bool mMayHaveDOMMutationObservers;
|
||||
bool mMayHaveDOMMutationObservers : 1;
|
||||
|
||||
// True if an nsIAnimationObserver is perhaps attached to a node in the document.
|
||||
bool mMayHaveAnimationObservers;
|
||||
bool mMayHaveAnimationObservers : 1;
|
||||
|
||||
// True if a document has loaded Mixed Active Script (see nsMixedContentBlocker.cpp)
|
||||
bool mHasMixedActiveContentLoaded;
|
||||
bool mHasMixedActiveContentLoaded : 1;
|
||||
|
||||
// True if a document has blocked Mixed Active Script (see nsMixedContentBlocker.cpp)
|
||||
bool mHasMixedActiveContentBlocked;
|
||||
bool mHasMixedActiveContentBlocked : 1;
|
||||
|
||||
// True if a document has loaded Mixed Display/Passive Content (see nsMixedContentBlocker.cpp)
|
||||
bool mHasMixedDisplayContentLoaded;
|
||||
bool mHasMixedDisplayContentLoaded : 1;
|
||||
|
||||
// True if a document has blocked Mixed Display/Passive Content (see nsMixedContentBlocker.cpp)
|
||||
bool mHasMixedDisplayContentBlocked;
|
||||
bool mHasMixedDisplayContentBlocked : 1;
|
||||
|
||||
// True if a document has blocked Tracking Content
|
||||
bool mHasTrackingContentBlocked;
|
||||
bool mHasTrackingContentBlocked : 1;
|
||||
|
||||
// True if a document has loaded Tracking Content
|
||||
bool mHasTrackingContentLoaded;
|
||||
bool mHasTrackingContentLoaded : 1;
|
||||
|
||||
// True if DisallowBFCaching has been called on this document.
|
||||
bool mBFCacheDisallowed;
|
||||
bool mBFCacheDisallowed : 1;
|
||||
|
||||
// If true, we have an input encoding. If this is false, then the
|
||||
// document was created entirely in memory
|
||||
bool mHaveInputEncoding;
|
||||
bool mHaveInputEncoding : 1;
|
||||
|
||||
bool mHasHadDefaultView;
|
||||
bool mHasHadDefaultView : 1;
|
||||
|
||||
// Whether style sheet change events will be dispatched for this document
|
||||
bool mStyleSheetChangeEventsEnabled;
|
||||
bool mStyleSheetChangeEventsEnabled : 1;
|
||||
|
||||
// Whether the document was created by a srcdoc iframe.
|
||||
bool mIsSrcdocDocument;
|
||||
bool mIsSrcdocDocument : 1;
|
||||
|
||||
// Records whether we've done a document.open. If this is true, it's possible
|
||||
// for nodes from this document to have outdated wrappers in their wrapper
|
||||
// caches.
|
||||
bool mDidDocumentOpen;
|
||||
|
||||
#ifdef DEBUG
|
||||
/**
|
||||
* This is true while FlushPendingLinkUpdates executes. Calls to
|
||||
* [Un]RegisterPendingLinkUpdate will assert when this is true.
|
||||
*/
|
||||
bool mIsLinkUpdateRegistrationsForbidden;
|
||||
#endif
|
||||
bool mDidDocumentOpen : 1;
|
||||
|
||||
// Is the current mFontFaceSet valid?
|
||||
bool mFontFaceSetDirty;
|
||||
bool mFontFaceSetDirty : 1;
|
||||
|
||||
// Has GetUserFontSet() been called?
|
||||
bool mGetUserFontSetCalled;
|
||||
bool mGetUserFontSetCalled : 1;
|
||||
|
||||
// Do we currently have an event posted to call FlushUserFontSet?
|
||||
bool mPostedFlushUserFontSet;
|
||||
bool mPostedFlushUserFontSet : 1;
|
||||
|
||||
enum Type {
|
||||
eUnknown, // should never be used
|
||||
@ -2834,17 +2826,25 @@ protected:
|
||||
eXUL
|
||||
};
|
||||
|
||||
uint8_t mType;
|
||||
Type mType;
|
||||
|
||||
uint8_t mDefaultElementType;
|
||||
|
||||
enum {
|
||||
enum Tri {
|
||||
eTriUnset = 0,
|
||||
eTriFalse,
|
||||
eTriTrue
|
||||
};
|
||||
|
||||
uint8_t mAllowXULXBL;
|
||||
Tri mAllowXULXBL;
|
||||
|
||||
#ifdef DEBUG
|
||||
/**
|
||||
* This is true while FlushPendingLinkUpdates executes. Calls to
|
||||
* [Un]RegisterPendingLinkUpdate will assert when this is true.
|
||||
*/
|
||||
bool mIsLinkUpdateRegistrationsForbidden;
|
||||
#endif
|
||||
|
||||
// The document's script global object, the object from which the
|
||||
// document can get its script context and scope. This is the
|
||||
|
@ -95,6 +95,24 @@ nsStructuredCloneContainer::InitFromBase64(const nsAString &aData,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsStructuredCloneContainer::DeserializeToJsval(JSContext* aCx,
|
||||
JS::MutableHandle<JS::Value> aValue)
|
||||
{
|
||||
aValue.setNull();
|
||||
JS::Rooted<JS::Value> jsStateObj(aCx);
|
||||
bool hasTransferable = false;
|
||||
bool success = JS_ReadStructuredClone(aCx, mData, mSize, mVersion,
|
||||
&jsStateObj, nullptr, nullptr) &&
|
||||
JS_StructuredCloneHasTransferables(mData, mSize,
|
||||
&hasTransferable);
|
||||
// We want to be sure that mData doesn't contain transferable objects
|
||||
MOZ_ASSERT(!hasTransferable);
|
||||
NS_ENSURE_STATE(success && !hasTransferable);
|
||||
|
||||
aValue.set(jsStateObj);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsStructuredCloneContainer::DeserializeToVariant(JSContext *aCx,
|
||||
@ -106,14 +124,8 @@ nsStructuredCloneContainer::DeserializeToVariant(JSContext *aCx,
|
||||
|
||||
// Deserialize to a JS::Value.
|
||||
JS::Rooted<JS::Value> jsStateObj(aCx);
|
||||
bool hasTransferable = false;
|
||||
bool success = JS_ReadStructuredClone(aCx, mData, mSize, mVersion,
|
||||
&jsStateObj, nullptr, nullptr) &&
|
||||
JS_StructuredCloneHasTransferables(mData, mSize,
|
||||
&hasTransferable);
|
||||
// We want to be sure that mData doesn't contain transferable objects
|
||||
MOZ_ASSERT(!hasTransferable);
|
||||
NS_ENSURE_STATE(success && !hasTransferable);
|
||||
nsresult rv = DeserializeToJsval(aCx, &jsStateObj);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Now wrap the JS::Value as an nsIVariant.
|
||||
nsCOMPtr<nsIVariant> varStateObj;
|
||||
|
1
dom/cache/PCacheStorage.ipdl
vendored
1
dom/cache/PCacheStorage.ipdl
vendored
@ -6,6 +6,7 @@ include protocol PBackground;
|
||||
include protocol PBlob; // FIXME: bug 792908
|
||||
include protocol PCache;
|
||||
include protocol PCacheOp;
|
||||
include protocol PCachePushStream;
|
||||
include protocol PCacheStreamControl;
|
||||
include protocol PFileDescriptorSet;
|
||||
|
||||
|
@ -4,9 +4,6 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
# http://support.microsoft.com/kb/143208
|
||||
DEFINES['NOMINMAX'] = True
|
||||
|
||||
GeckoCppUnitTests([
|
||||
'TestWebGLElementArrayCache',
|
||||
])
|
||||
|
@ -36,9 +36,6 @@ EXPORTS.mozilla.dom += [
|
||||
'WebGLVertexArrayObject.h',
|
||||
]
|
||||
|
||||
# http://support.microsoft.com/kb/143208
|
||||
DEFINES['NOMINMAX'] = True
|
||||
|
||||
# Canvas 2D and common sources
|
||||
UNIFIED_SOURCES += [
|
||||
'CanvasImageCache.cpp',
|
||||
|
@ -499,29 +499,29 @@ interface nsIDOMWindowUtils : nsISupports {
|
||||
* scroll.
|
||||
* @param aOptions Set following flags.
|
||||
*/
|
||||
const unsigned long WHEEL_EVENT_CAUSED_BY_NO_LINE_OR_PAGE_DELTA_DEVICE = 0x0001;
|
||||
// @deprecated Use WHEEL_EVENT_CAUSED_BY_NO_LINE_OR_PAGE_DELTA_DEVICE.
|
||||
const unsigned long WHEEL_EVENT_CAUSED_BY_PIXEL_ONLY_DEVICE = 0x0001;
|
||||
const unsigned long WHEEL_EVENT_CAUSED_BY_MOMENTUM = 0x0002;
|
||||
const unsigned long WHEEL_EVENT_CUSTOMIZED_BY_USER_PREFS = 0x0004;
|
||||
// If any of the following flags is specified this method will throw an
|
||||
// exception in case the relevant overflowDelta has an unexpected value.
|
||||
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_X_ZERO = 0x0010;
|
||||
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_X_POSITIVE = 0x0020;
|
||||
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_X_NEGATIVE = 0x0040;
|
||||
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_Y_ZERO = 0x0100;
|
||||
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_Y_POSITIVE = 0x0200;
|
||||
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_Y_NEGATIVE = 0x0400;
|
||||
void sendWheelEvent(in float aX,
|
||||
in float aY,
|
||||
in double aDeltaX,
|
||||
in double aDeltaY,
|
||||
in double aDeltaZ,
|
||||
in unsigned long aDeltaMode,
|
||||
in long aModifiers,
|
||||
in long aLineOrPageDeltaX,
|
||||
in long aLineOrPageDeltaY,
|
||||
in unsigned long aOptions);
|
||||
const unsigned long WHEEL_EVENT_CAUSED_BY_NO_LINE_OR_PAGE_DELTA_DEVICE = 0x0001;
|
||||
// @deprecated Use WHEEL_EVENT_CAUSED_BY_NO_LINE_OR_PAGE_DELTA_DEVICE.
|
||||
const unsigned long WHEEL_EVENT_CAUSED_BY_PIXEL_ONLY_DEVICE = 0x0001;
|
||||
const unsigned long WHEEL_EVENT_CAUSED_BY_MOMENTUM = 0x0002;
|
||||
const unsigned long WHEEL_EVENT_CUSTOMIZED_BY_USER_PREFS = 0x0004;
|
||||
// If any of the following flags is specified this method will throw an
|
||||
// exception in case the relevant overflowDelta has an unexpected value.
|
||||
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_X_ZERO = 0x0010;
|
||||
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_X_POSITIVE = 0x0020;
|
||||
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_X_NEGATIVE = 0x0040;
|
||||
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_Y_ZERO = 0x0100;
|
||||
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_Y_POSITIVE = 0x0200;
|
||||
const unsigned long WHEEL_EVENT_EXPECTED_OVERFLOW_DELTA_Y_NEGATIVE = 0x0400;
|
||||
void sendWheelEvent(in float aX,
|
||||
in float aY,
|
||||
in double aDeltaX,
|
||||
in double aDeltaY,
|
||||
in double aDeltaZ,
|
||||
in unsigned long aDeltaMode,
|
||||
in long aModifiers,
|
||||
in long aLineOrPageDeltaX,
|
||||
in long aLineOrPageDeltaY,
|
||||
in unsigned long aOptions);
|
||||
|
||||
/**
|
||||
* Synthesize a key event to the window. The event types supported are:
|
||||
@ -1359,16 +1359,16 @@ interface nsIDOMWindowUtils : nsISupports {
|
||||
/**
|
||||
* Returns a handle which represents current recording start position.
|
||||
*/
|
||||
void startFrameTimeRecording([retval] out unsigned long startIndex);
|
||||
void startFrameTimeRecording([retval] out unsigned long startIndex);
|
||||
|
||||
/**
|
||||
* Returns number of recorded frames since startIndex was issued,
|
||||
* and allocates+populates 2 arraye with the recorded data.
|
||||
* - Allocation is infallible. Should be released even if size is 0.
|
||||
*/
|
||||
void stopFrameTimeRecording(in unsigned long startIndex,
|
||||
[optional] out unsigned long frameCount,
|
||||
[retval, array, size_is(frameCount)] out float frameIntervals);
|
||||
void stopFrameTimeRecording(in unsigned long startIndex,
|
||||
[optional] out unsigned long frameCount,
|
||||
[retval, array, size_is(frameCount)] out float frameIntervals);
|
||||
|
||||
/**
|
||||
* Signals that we're begining to tab switch. This is used by painting code to
|
||||
@ -1697,7 +1697,7 @@ interface nsIDOMWindowUtils : nsISupports {
|
||||
* After calling the method, the window for which this DOMWindowUtils
|
||||
* was created can be closed using scripts.
|
||||
*/
|
||||
void allowScriptsToClose();
|
||||
void allowScriptsToClose();
|
||||
|
||||
/**
|
||||
* Is the parent window's main widget visible? If it isn't, we probably
|
||||
@ -1710,109 +1710,109 @@ interface nsIDOMWindowUtils : nsISupports {
|
||||
*/
|
||||
readonly attribute boolean isParentWindowMainWidgetVisible;
|
||||
|
||||
/**
|
||||
* In certain cases the event handling of nodes, form controls in practice,
|
||||
* may be disabled. Such cases are for example the existence of disabled
|
||||
* attribute or -moz-user-input: none/disabled.
|
||||
*/
|
||||
boolean isNodeDisabledForEvents(in nsIDOMNode aNode);
|
||||
/**
|
||||
* In certain cases the event handling of nodes, form controls in practice,
|
||||
* may be disabled. Such cases are for example the existence of disabled
|
||||
* attribute or -moz-user-input: none/disabled.
|
||||
*/
|
||||
boolean isNodeDisabledForEvents(in nsIDOMNode aNode);
|
||||
|
||||
/**
|
||||
* Setting paintFlashing to true will flash newly painted area.
|
||||
*/
|
||||
attribute boolean paintFlashing;
|
||||
/**
|
||||
* Setting paintFlashing to true will flash newly painted area.
|
||||
*/
|
||||
attribute boolean paintFlashing;
|
||||
|
||||
/**
|
||||
* Add a "synchronous section", in the form of an nsIRunnable run once the
|
||||
* event loop has reached a "stable state". |runnable| must not cause any
|
||||
* queued events to be processed (i.e. must not spin the event loop).
|
||||
* We've reached a stable state when the currently executing task/event has
|
||||
* finished, see:
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#synchronous-section
|
||||
* In practice this runs aRunnable once the currently executing event
|
||||
* finishes. If called multiple times per task/event, all the runnables will
|
||||
* be executed, in the order in which runInStableState() was called.
|
||||
*
|
||||
* XXX - This can wreak havoc if you're not using this for very simple
|
||||
* purposes, eg testing or setting a flag.
|
||||
*/
|
||||
void runInStableState(in nsIRunnable runnable);
|
||||
/**
|
||||
* Add a "synchronous section", in the form of an nsIRunnable run once the
|
||||
* event loop has reached a "stable state". |runnable| must not cause any
|
||||
* queued events to be processed (i.e. must not spin the event loop).
|
||||
* We've reached a stable state when the currently executing task/event has
|
||||
* finished, see:
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#synchronous-section
|
||||
* In practice this runs aRunnable once the currently executing event
|
||||
* finishes. If called multiple times per task/event, all the runnables will
|
||||
* be executed, in the order in which runInStableState() was called.
|
||||
*
|
||||
* XXX - This can wreak havoc if you're not using this for very simple
|
||||
* purposes, eg testing or setting a flag.
|
||||
*/
|
||||
void runInStableState(in nsIRunnable runnable);
|
||||
|
||||
/**
|
||||
* Run the given runnable before the next iteration of the event loop (this
|
||||
* includes native events too). If a nested loop is spawned within the current
|
||||
* event then the runnable will not be run until that loop has terminated.
|
||||
*
|
||||
* XXX - This can wreak havoc if you're not using this for very simple
|
||||
* purposes, eg testing or setting a flag.
|
||||
*/
|
||||
void runBeforeNextEvent(in nsIRunnable runnable);
|
||||
/**
|
||||
* Run the given runnable before the next iteration of the event loop (this
|
||||
* includes native events too). If a nested loop is spawned within the current
|
||||
* event then the runnable will not be run until that loop has terminated.
|
||||
*
|
||||
* XXX - This can wreak havoc if you're not using this for very simple
|
||||
* purposes, eg testing or setting a flag.
|
||||
*/
|
||||
void runBeforeNextEvent(in nsIRunnable runnable);
|
||||
|
||||
/*
|
||||
* Returns the value of a given property animated on the compositor thread.
|
||||
* If the property is NOT currently being animated on the compositor thread,
|
||||
* returns an empty string.
|
||||
*/
|
||||
AString getOMTAStyle(in nsIDOMElement aElement, in AString aProperty,
|
||||
[optional] in AString aPseudoElement);
|
||||
/*
|
||||
* Returns the value of a given property animated on the compositor thread.
|
||||
* If the property is NOT currently being animated on the compositor thread,
|
||||
* returns an empty string.
|
||||
*/
|
||||
AString getOMTAStyle(in nsIDOMElement aElement, in AString aProperty,
|
||||
[optional] in AString aPseudoElement);
|
||||
|
||||
/**
|
||||
* Special function that gets a property syncronously from the last composite
|
||||
* that occured.
|
||||
*
|
||||
* Supported properties:
|
||||
* "overdraw": Report a percentage between 0 and 999 indicate how many times
|
||||
* each pixels on the destination window have been touched.
|
||||
* "missed_hwc": Report a bool if hardware composer is supported but was
|
||||
* not used for the last frame.
|
||||
*/
|
||||
float requestCompositorProperty(in AString aProperty);
|
||||
/**
|
||||
* Special function that gets a property syncronously from the last composite
|
||||
* that occured.
|
||||
*
|
||||
* Supported properties:
|
||||
* "overdraw": Report a percentage between 0 and 999 indicate how many times
|
||||
* each pixels on the destination window have been touched.
|
||||
* "missed_hwc": Report a bool if hardware composer is supported but was
|
||||
* not used for the last frame.
|
||||
*/
|
||||
float requestCompositorProperty(in AString aProperty);
|
||||
|
||||
/**
|
||||
* If aHandlingInput is true, this informs the event state manager that
|
||||
* we're handling user input. Otherwise, this is a no-op (as by default
|
||||
* we're not handling user input).
|
||||
* Remember to call destruct() on the return value!
|
||||
* See also nsIDOMWindowUtils::isHandlingUserInput.
|
||||
*/
|
||||
nsIJSRAIIHelper setHandlingUserInput(in boolean aHandlingInput);
|
||||
/**
|
||||
* If aHandlingInput is true, this informs the event state manager that
|
||||
* we're handling user input. Otherwise, this is a no-op (as by default
|
||||
* we're not handling user input).
|
||||
* Remember to call destruct() on the return value!
|
||||
* See also nsIDOMWindowUtils::isHandlingUserInput.
|
||||
*/
|
||||
nsIJSRAIIHelper setHandlingUserInput(in boolean aHandlingInput);
|
||||
|
||||
/**
|
||||
* Get the content- and compositor-side APZ test data instances.
|
||||
* The return values are of type APZTestData (see APZTestData.webidl).
|
||||
*/
|
||||
[implicit_jscontext] jsval getContentAPZTestData();
|
||||
[implicit_jscontext] jsval getCompositorAPZTestData();
|
||||
/**
|
||||
* Get the content- and compositor-side APZ test data instances.
|
||||
* The return values are of type APZTestData (see APZTestData.webidl).
|
||||
*/
|
||||
[implicit_jscontext] jsval getContentAPZTestData();
|
||||
[implicit_jscontext] jsval getCompositorAPZTestData();
|
||||
|
||||
/**
|
||||
* Posts an eRestyle_Self restyle event for the given element.
|
||||
*/
|
||||
void postRestyleSelfEvent(in nsIDOMElement aElement);
|
||||
/**
|
||||
* Posts an eRestyle_Self restyle event for the given element.
|
||||
*/
|
||||
void postRestyleSelfEvent(in nsIDOMElement aElement);
|
||||
|
||||
/**
|
||||
* With this it's possible to mute all the MediaElements in this window.
|
||||
* We have audioMuted and audioVolume to preserve the volume across
|
||||
* mute/umute.
|
||||
*/
|
||||
attribute boolean audioMuted;
|
||||
/**
|
||||
* With this it's possible to mute all the MediaElements in this window.
|
||||
* We have audioMuted and audioVolume to preserve the volume across
|
||||
* mute/umute.
|
||||
*/
|
||||
attribute boolean audioMuted;
|
||||
|
||||
/**
|
||||
* range: greater or equal to 0. The real volume level is affected by the
|
||||
* volume of all ancestor windows.
|
||||
*/
|
||||
attribute float audioVolume;
|
||||
/**
|
||||
* range: greater or equal to 0. The real volume level is affected by the
|
||||
* volume of all ancestor windows.
|
||||
*/
|
||||
attribute float audioVolume;
|
||||
|
||||
/**
|
||||
* This method doesn't do anything useful. It was solely added for the
|
||||
* purpose of the test for bug 503926.
|
||||
*/
|
||||
void xpconnectArgument(in nsIDOMWindowUtils aThis);
|
||||
/**
|
||||
* This method doesn't do anything useful. It was solely added for the
|
||||
* purpose of the test for bug 503926.
|
||||
*/
|
||||
void xpconnectArgument(in nsIDOMWindowUtils aThis);
|
||||
|
||||
/**
|
||||
* Helper for JS components that need to send permission requests with
|
||||
* e10s support properly.
|
||||
*/
|
||||
void askPermission(in nsIContentPermissionRequest aRequest);
|
||||
/**
|
||||
* Helper for JS components that need to send permission requests with
|
||||
* e10s support properly.
|
||||
*/
|
||||
void askPermission(in nsIContentPermissionRequest aRequest);
|
||||
|
||||
/**
|
||||
* Number of frames constructed (excluding breaking) for the curent
|
||||
|
@ -27,7 +27,7 @@ interface nsIDocument;
|
||||
* string containing a copy of the container's serialized data, using
|
||||
* getDataAsBase64.
|
||||
*/
|
||||
[scriptable, uuid(63eeafec-63f5-42c3-aea9-5c04678784e7)]
|
||||
[scriptable, uuid(c664aae7-0d67-4155-a2dd-a3861778626f)]
|
||||
interface nsIStructuredCloneContainer : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -45,9 +45,17 @@ interface nsIStructuredCloneContainer : nsISupports
|
||||
[implicit_jscontext]
|
||||
void initFromBase64(in AString aData,in unsigned long aFormatVersion);
|
||||
|
||||
/**
|
||||
* Deserializes this structured clone container returning it as a jsval.
|
||||
* Can be called on main and worker threads.
|
||||
*/
|
||||
[implicit_jscontext]
|
||||
jsval deserializeToJsval();
|
||||
|
||||
/**
|
||||
* Deserialize the object this container holds, returning it wrapped as
|
||||
* an nsIVariant.
|
||||
* Main thread only!
|
||||
*/
|
||||
[implicit_jscontext]
|
||||
nsIVariant deserializeToVariant();
|
||||
|
@ -11,7 +11,7 @@
|
||||
* uses service workers to notify applications. This interface exists to allow
|
||||
* privileged code to receive messages without migrating to service workers.
|
||||
*/
|
||||
[scriptable, uuid(abde228b-7d14-4cab-b1f9-9f87750ede0f)]
|
||||
[scriptable, uuid(74586476-d73f-4867-bece-87c1dea35750)]
|
||||
interface nsIPushNotificationService : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -48,7 +48,12 @@ interface nsIPushNotificationService : nsISupports
|
||||
jsval registration(in string scope, in jsval originAttributes);
|
||||
|
||||
/**
|
||||
* Clear all subscriptions
|
||||
* Clear all subscriptions.
|
||||
*/
|
||||
jsval clearAll();
|
||||
jsval clearAll();
|
||||
|
||||
/**
|
||||
* Clear subscriptions for a domain.
|
||||
*/
|
||||
jsval clearForDomain(in string domain);
|
||||
};
|
||||
|
@ -6,8 +6,6 @@
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
interface nsIDOMWindow;
|
||||
|
||||
/**
|
||||
* nsIWebContentHandlerRegistrar
|
||||
*
|
||||
@ -19,7 +17,7 @@ interface nsIDOMWindow;
|
||||
* can invoke it.
|
||||
*/
|
||||
|
||||
[scriptable, uuid(e6a75410-c93e-42bf-84ca-a5c3ec34a2f1)]
|
||||
[scriptable, uuid(65a3fafd-0e4a-4b06-8b4e-6a611da63d98)]
|
||||
interface nsIWebContentHandlerRegistrar : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -30,11 +28,11 @@ interface nsIWebContentHandlerRegistrar : nsISupports
|
||||
void registerContentHandler(in DOMString mimeType,
|
||||
in DOMString uri,
|
||||
in DOMString title,
|
||||
in nsIDOMWindow contentWindow);
|
||||
in nsISupports windowOrBrowser);
|
||||
void registerProtocolHandler(in DOMString protocol,
|
||||
in DOMString uri,
|
||||
in DOMString title,
|
||||
in nsIDOMWindow contentWindow);
|
||||
in nsISupports windowOrBrowser);
|
||||
};
|
||||
|
||||
%{ C++
|
||||
|
@ -193,6 +193,7 @@
|
||||
#include "mozilla/RemoteSpellCheckEngineChild.h"
|
||||
#include "GMPServiceChild.h"
|
||||
#include "gfxPlatform.h"
|
||||
#include "nscore.h" // for NS_FREE_PERMANENT_DATA
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::docshell;
|
||||
@ -762,6 +763,14 @@ ContentChild::AppendProcessId(nsACString& aName)
|
||||
aName.Append(nsPrintfCString("(pid %u)", pid));
|
||||
}
|
||||
|
||||
void
|
||||
ContentChild::InitGraphicsDeviceData()
|
||||
{
|
||||
// Initialize the graphics platform. This may contact the parent process
|
||||
// to read device preferences.
|
||||
gfxPlatform::GetPlatform();
|
||||
}
|
||||
|
||||
void
|
||||
ContentChild::InitXPCOM()
|
||||
{
|
||||
@ -1897,7 +1906,7 @@ ContentChild::ActorDestroy(ActorDestroyReason why)
|
||||
QuickExit();
|
||||
}
|
||||
|
||||
#if !defined(DEBUG) && !defined(MOZ_ASAN)
|
||||
#ifndef NS_FREE_PERMANENT_DATA
|
||||
// In release builds, there's no point in the content process
|
||||
// going through the full XPCOM shutdown path, because it doesn't
|
||||
// keep persistent state.
|
||||
|
@ -76,6 +76,7 @@ public:
|
||||
IPC::Channel* aChannel);
|
||||
void InitProcessAttributes();
|
||||
void InitXPCOM();
|
||||
void InitGraphicsDeviceData();
|
||||
|
||||
static ContentChild* GetSingleton() {
|
||||
return sSingleton;
|
||||
|
@ -5148,6 +5148,13 @@ ContentParent::RecvProfile(const nsCString& aProfile)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
ContentParent::RecvGetGraphicsDeviceInitData(DeviceInitData* aOut)
|
||||
{
|
||||
gfxPlatform::GetPlatform()->GetDeviceInitData(aOut);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
|
@ -862,6 +862,7 @@ private:
|
||||
virtual bool RecvGamepadListenerAdded() override;
|
||||
virtual bool RecvGamepadListenerRemoved() override;
|
||||
virtual bool RecvProfile(const nsCString& aProfile) override;
|
||||
virtual bool RecvGetGraphicsDeviceInitData(DeviceInitData* aOut) override;
|
||||
|
||||
// If you add strong pointers to cycle collected objects here, be sure to
|
||||
// release these objects in ShutDownProcess. See the comment there for more
|
||||
|
@ -76,10 +76,11 @@ bool
|
||||
ContentProcess::Init()
|
||||
{
|
||||
mContent.Init(IOThreadChild::message_loop(),
|
||||
ParentPid(),
|
||||
IOThreadChild::channel());
|
||||
ParentPid(),
|
||||
IOThreadChild::channel());
|
||||
mXREEmbed.Start();
|
||||
mContent.InitXPCOM();
|
||||
mContent.InitGraphicsDeviceData();
|
||||
|
||||
#if defined(XP_WIN) && defined(MOZ_CONTENT_SANDBOX)
|
||||
SetUpSandboxEnvironment();
|
||||
|
@ -60,6 +60,7 @@ include PluginTypes;
|
||||
include ProtocolTypes;
|
||||
include PContentPermission;
|
||||
include BrowserConfiguration;
|
||||
include GraphicsMessages;
|
||||
|
||||
// Workaround to prevent error if PContentChild.cpp & PContentBridgeParent.cpp
|
||||
// are put into different UnifiedProtocolsXX.cpp files.
|
||||
@ -1053,6 +1054,12 @@ parent:
|
||||
|
||||
async Profile(nsCString aProfile);
|
||||
|
||||
/**
|
||||
* Request graphics initialization information from the parent.
|
||||
*/
|
||||
sync GetGraphicsDeviceInitData()
|
||||
returns (DeviceInitData aData);
|
||||
|
||||
both:
|
||||
AsyncMessage(nsString aMessage, ClonedMessageData aData,
|
||||
CpowEntry[] aCpows, Principal aPrincipal);
|
||||
|
@ -3237,9 +3237,15 @@ TabParent::RecvInvokeDragSession(nsTArray<IPCDataTransfer>&& aTransfers,
|
||||
const int32_t& aDragAreaX, const int32_t& aDragAreaY)
|
||||
{
|
||||
mInitialDataTransferItems.Clear();
|
||||
nsPresContext* pc = mFrameElement->OwnerDoc()->GetShell()->GetPresContext();
|
||||
EventStateManager* esm = pc->EventStateManager();
|
||||
nsIPresShell* shell = mFrameElement->OwnerDoc()->GetShell();
|
||||
if (!shell) {
|
||||
if (Manager()->IsContentParent()) {
|
||||
unused << Manager()->AsContentParent()->SendEndDragSession(true, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
EventStateManager* esm = shell->GetPresContext()->EventStateManager();
|
||||
for (uint32_t i = 0; i < aTransfers.Length(); ++i) {
|
||||
auto& items = aTransfers[i].items();
|
||||
nsTArray<DataTransferItem>* itemArray = mInitialDataTransferItems.AppendElement();
|
||||
|
@ -6,7 +6,6 @@ BlockMixedActiveContent = Blocked loading mixed active content "%1$S"
|
||||
# CORS
|
||||
# LOCALIZATION NOTE: Do not translate "Access-Control-Allow-Origin", Access-Control-Allow-Credentials, Access-Control-Allow-Methods, Access-Control-Allow-Headers
|
||||
CORSDisabled=Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at %1$S. (Reason: CORS disabled).
|
||||
CORSRequestFailed=Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at %1$S. (Reason: CORS request failed).
|
||||
CORSRequestNotHttp=Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at %1$S. (Reason: CORS request not http).
|
||||
CORSMissingAllowOrigin=Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at %1$S. (Reason: CORS header 'Access-Control-Allow-Origin' missing).
|
||||
CORSAllowOriginNotMatchingOrigin=Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at %1$S. (Reason: CORS header 'Access-Control-Allow-Origin' does not match '%2$S').
|
||||
|
@ -41,6 +41,3 @@ FINAL_LIBRARY = 'xul'
|
||||
LOCAL_INCLUDES += [
|
||||
'/media/webrtc/trunk/webrtc/modules/video_capture/windows',
|
||||
]
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'WINNT':
|
||||
DEFINES['NOMINMAX'] = True
|
||||
|
@ -23,8 +23,5 @@ FINAL_LIBRARY = 'xul'
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'WINNT':
|
||||
DEFINES['NOMINMAX'] = True
|
||||
|
||||
if CONFIG['MOZ_GONK_MEDIACODEC']:
|
||||
DEFINES['MOZ_GONK_MEDIACODEC'] = True
|
||||
|
@ -177,6 +177,16 @@ public:
|
||||
(*aData)[3] == 0x6b) {
|
||||
return true;
|
||||
}
|
||||
// 0xa3 // SimpleBlock
|
||||
if (aData->Length() >= 1 &&
|
||||
(*aData)[0] == 0xa3) {
|
||||
return true;
|
||||
}
|
||||
// 0xa1 // Block
|
||||
if (aData->Length() >= 1 &&
|
||||
(*aData)[0] == 0xa1) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -99,8 +99,7 @@ IsTypeSupported(const nsAString& aType)
|
||||
}
|
||||
return NS_OK;
|
||||
} else if (DecoderTraits::IsWebMType(mimeTypeUTF8)) {
|
||||
if (!Preferences::GetBool("media.mediasource.webm.enabled", false) ||
|
||||
Preferences::GetBool("media.mediasource.format-reader", false)) {
|
||||
if (!Preferences::GetBool("media.mediasource.webm.enabled", false)) {
|
||||
return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
|
||||
}
|
||||
if (hasCodecs &&
|
||||
|
@ -23,6 +23,3 @@ include('/ipc/chromium/chromium-config.mozbuild')
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'WINNT':
|
||||
DEFINES['NOMINMAX'] = True
|
||||
|
@ -82,6 +82,3 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'WINNT':
|
||||
DEFINES['NOMINMAX'] = True
|
||||
|
@ -31,9 +31,6 @@ include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'WINNT':
|
||||
DEFINES['NOMINMAX'] = True
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
||||
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
|
||||
|
@ -133,47 +133,6 @@ public:
|
||||
}
|
||||
#endif
|
||||
}
|
||||
// Inverse-transform the FFTSize()/2+1 points of data in each
|
||||
// of aRealDataIn and aImagDataIn and store the resulting
|
||||
// FFTSize() points in aRealDataOut.
|
||||
void PerformInverseFFT(float* aRealDataIn,
|
||||
float *aImagDataIn,
|
||||
float *aRealDataOut)
|
||||
{
|
||||
EnsureIFFT();
|
||||
const uint32_t inputSize = mFFTSize / 2 + 1;
|
||||
#if defined(MOZ_LIBAV_FFT)
|
||||
AlignedTArray<FFTSample> inputBuffer(inputSize * 2);
|
||||
for (uint32_t i = 0; i < inputSize; ++i) {
|
||||
inputBuffer[2*i] = aRealDataIn[i];
|
||||
inputBuffer[(2*i)+1] = aImagDataIn[i];
|
||||
}
|
||||
av_rdft_calc(mAvIRDFT, inputBuffer.Elements());
|
||||
PodCopy(aRealDataOut, inputBuffer.Elements(), FFTSize());
|
||||
// TODO: Once bug 877662 lands, change this to use SSE.
|
||||
for (uint32_t i = 0; i < mFFTSize; ++i) {
|
||||
aRealDataOut[i] /= mFFTSize;
|
||||
}
|
||||
#else
|
||||
AlignedTArray<ComplexU> inputBuffer(inputSize);
|
||||
for (uint32_t i = 0; i < inputSize; ++i) {
|
||||
inputBuffer[i].r = aRealDataIn[i];
|
||||
inputBuffer[i].i = aImagDataIn[i];
|
||||
}
|
||||
#if defined(BUILD_ARM_NEON)
|
||||
if (mozilla::supports_neon()) {
|
||||
omxSP_FFTInv_CCSToR_F32_Sfs(inputBuffer.Elements()->f,
|
||||
aRealDataOut, mOmxIFFT);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
kiss_fftri(mKissIFFT, &(inputBuffer.Elements()->c), aRealDataOut);
|
||||
for (uint32_t i = 0; i < mFFTSize; ++i) {
|
||||
aRealDataOut[i] /= mFFTSize;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void Multiply(const FFTBlock& aFrame)
|
||||
{
|
||||
@ -217,10 +176,18 @@ public:
|
||||
{
|
||||
return mOutputBuffer[aIndex].r;
|
||||
}
|
||||
float& RealData(uint32_t aIndex)
|
||||
{
|
||||
return mOutputBuffer[aIndex].r;
|
||||
}
|
||||
float ImagData(uint32_t aIndex) const
|
||||
{
|
||||
return mOutputBuffer[aIndex].i;
|
||||
}
|
||||
float& ImagData(uint32_t aIndex)
|
||||
{
|
||||
return mOutputBuffer[aIndex].i;
|
||||
}
|
||||
|
||||
size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
|
||||
{
|
||||
|
@ -178,9 +178,11 @@ void PeriodicWave::createBandLimitedTables(const float* realData, const float* i
|
||||
float normalizationScale = 1;
|
||||
|
||||
unsigned fftSize = m_periodicWaveSize;
|
||||
unsigned halfSize = fftSize / 2 + 1;
|
||||
unsigned halfSize = fftSize / 2;
|
||||
unsigned i;
|
||||
|
||||
// Limit the number of components used to those for frequencies below the
|
||||
// Nyquist of the fixed length inverse FFT.
|
||||
numberOfComponents = std::min(numberOfComponents, halfSize);
|
||||
|
||||
m_bandLimitedTables.SetCapacity(m_numberOfRanges);
|
||||
@ -188,46 +190,27 @@ void PeriodicWave::createBandLimitedTables(const float* realData, const float* i
|
||||
for (unsigned rangeIndex = 0; rangeIndex < m_numberOfRanges; ++rangeIndex) {
|
||||
// This FFTBlock is used to cull partials (represented by frequency bins).
|
||||
FFTBlock frame(fftSize);
|
||||
nsAutoArrayPtr<float> realP(new float[halfSize]);
|
||||
nsAutoArrayPtr<float> imagP(new float[halfSize]);
|
||||
|
||||
// Copy from loaded frequency data and scale.
|
||||
float scale = fftSize;
|
||||
AudioBufferCopyWithScale(realData, scale, realP, numberOfComponents);
|
||||
AudioBufferCopyWithScale(imagData, scale, imagP, numberOfComponents);
|
||||
|
||||
// If fewer components were provided than 1/2 FFT size,
|
||||
// then clear the remaining bins.
|
||||
for (i = numberOfComponents; i < halfSize; ++i) {
|
||||
realP[i] = 0;
|
||||
imagP[i] = 0;
|
||||
}
|
||||
|
||||
// Generate complex conjugate because of the way the
|
||||
// inverse FFT is defined.
|
||||
float minusOne = -1;
|
||||
AudioBufferInPlaceScale(imagP, minusOne, halfSize);
|
||||
|
||||
// Find the starting bin where we should start culling.
|
||||
// We need to clear out the highest frequencies to band-limit
|
||||
// the waveform.
|
||||
// Find the starting bin where we should start culling the aliasing
|
||||
// partials for this pitch range. We need to clear out the highest
|
||||
// frequencies to band-limit the waveform.
|
||||
unsigned numberOfPartials = numberOfPartialsForRange(rangeIndex);
|
||||
// Also limit to the number of components that are provided.
|
||||
numberOfPartials = std::min(numberOfPartials, numberOfComponents - 1);
|
||||
|
||||
// Cull the aliasing partials for this pitch range.
|
||||
for (i = numberOfPartials + 1; i < halfSize; ++i) {
|
||||
realP[i] = 0;
|
||||
imagP[i] = 0;
|
||||
// Copy from loaded frequency data and generate complex conjugate
|
||||
// because of the way the inverse FFT is defined.
|
||||
// The coefficients of higher partials remain zero, as initialized in
|
||||
// the FFTBlock constructor.
|
||||
for (i = 0; i < numberOfPartials + 1; ++i) {
|
||||
frame.RealData(i) = realData[i];
|
||||
frame.ImagData(i) = -imagData[i];
|
||||
}
|
||||
// Clear nyquist if necessary.
|
||||
if (numberOfPartials < halfSize)
|
||||
realP[halfSize-1] = 0;
|
||||
|
||||
// Clear any DC-offset.
|
||||
realP[0] = 0;
|
||||
|
||||
// Clear values which have no effect.
|
||||
imagP[0] = 0;
|
||||
imagP[halfSize-1] = 0;
|
||||
frame.RealData(0) = 0;
|
||||
// Clear value which has no effect.
|
||||
frame.ImagData(0) = 0;
|
||||
|
||||
// Create the band-limited table.
|
||||
AlignedAudioFloatArray* table = new AlignedAudioFloatArray(m_periodicWaveSize);
|
||||
@ -235,7 +218,7 @@ void PeriodicWave::createBandLimitedTables(const float* realData, const float* i
|
||||
|
||||
// Apply an inverse FFT to generate the time-domain table data.
|
||||
float* data = m_bandLimitedTables[rangeIndex]->Elements();
|
||||
frame.PerformInverseFFT(realP, imagP, data);
|
||||
frame.GetInverseWithoutScaling(data);
|
||||
|
||||
// For the first range (which has the highest power), calculate
|
||||
// its peak value then compute normalization scale.
|
||||
@ -256,18 +239,16 @@ void PeriodicWave::generateBasicWaveform(OscillatorType shape)
|
||||
{
|
||||
const float piFloat = M_PI;
|
||||
unsigned fftSize = periodicWaveSize();
|
||||
unsigned halfSize = fftSize / 2 + 1;
|
||||
unsigned halfSize = fftSize / 2;
|
||||
|
||||
AudioFloatArray real(halfSize);
|
||||
AudioFloatArray imag(halfSize);
|
||||
float* realP = real.Elements();
|
||||
float* imagP = imag.Elements();
|
||||
|
||||
// Clear DC and Nyquist.
|
||||
// Clear DC and imag value which is ignored.
|
||||
realP[0] = 0;
|
||||
imagP[0] = 0;
|
||||
realP[halfSize-1] = 0;
|
||||
imagP[halfSize-1] = 0;
|
||||
|
||||
for (unsigned n = 1; n < halfSize; ++n) {
|
||||
float omega = 2 * piFloat * n;
|
||||
|
@ -83,9 +83,6 @@ if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
if CONFIG['OS_ARCH'] == 'WINNT':
|
||||
DEFINES['NOMINMAX'] = True
|
||||
|
||||
|
||||
if CONFIG['_MSC_VER']:
|
||||
CXXFLAGS += [
|
||||
|
@ -696,8 +696,8 @@ Notification::Notification(nsIGlobalObject* aGlobal, const nsAString& aID,
|
||||
: DOMEventTargetHelper(),
|
||||
mWorkerPrivate(nullptr), mObserver(nullptr),
|
||||
mID(aID), mTitle(aTitle), mBody(aBody), mDir(aDir), mLang(aLang),
|
||||
mTag(aTag), mIconUrl(aIconUrl), mBehavior(aBehavior), mIsClosed(false),
|
||||
mIsStored(false), mTaskCount(0)
|
||||
mTag(aTag), mIconUrl(aIconUrl), mBehavior(aBehavior), mData(JS::NullValue()),
|
||||
mIsClosed(false), mIsStored(false), mTaskCount(0)
|
||||
{
|
||||
if (NS_IsMainThread()) {
|
||||
// We can only call this on the main thread because
|
||||
@ -827,13 +827,6 @@ Notification::PersistNotification()
|
||||
nsString alertName;
|
||||
GetAlertName(alertName);
|
||||
|
||||
nsString dataString;
|
||||
nsCOMPtr<nsIStructuredCloneContainer> scContainer;
|
||||
scContainer = GetDataCloneContainer();
|
||||
if (scContainer) {
|
||||
scContainer->GetDataAsBase64(dataString);
|
||||
}
|
||||
|
||||
nsAutoString behavior;
|
||||
if (!mBehavior.ToJSON(behavior)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
@ -848,7 +841,7 @@ Notification::PersistNotification()
|
||||
mTag,
|
||||
mIconUrl,
|
||||
alertName,
|
||||
dataString,
|
||||
mDataAsBase64,
|
||||
behavior,
|
||||
mScope);
|
||||
|
||||
@ -913,6 +906,8 @@ Notification::CreateInternal(nsIGlobalObject* aGlobal,
|
||||
|
||||
Notification::~Notification()
|
||||
{
|
||||
mData.setUndefined();
|
||||
mozilla::DropJSObjects(this);
|
||||
AssertIsOnTargetThread();
|
||||
MOZ_ASSERT(!mFeature);
|
||||
MOZ_ASSERT(!mTempRef);
|
||||
@ -920,15 +915,16 @@ Notification::~Notification()
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(Notification)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(Notification, DOMEventTargetHelper)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mData)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mDataObjectContainer)
|
||||
tmp->mData.setUndefined();
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(Notification, DOMEventTargetHelper)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mData)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDataObjectContainer)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(Notification, DOMEventTargetHelper)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_JSVAL_MEMBER_CALLBACK(mData);
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_END
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(Notification, DOMEventTargetHelper)
|
||||
NS_IMPL_RELEASE_INHERITED(Notification, DOMEventTargetHelper)
|
||||
|
||||
@ -1394,13 +1390,6 @@ Notification::ShowInternal()
|
||||
}
|
||||
MOZ_ASSERT(observer);
|
||||
|
||||
// mDataObjectContainer might be uninitialized here because the notification
|
||||
// was constructed with an undefined data property.
|
||||
nsString dataStr;
|
||||
if (mDataObjectContainer) {
|
||||
mDataObjectContainer->GetDataAsBase64(dataStr);
|
||||
}
|
||||
|
||||
#ifdef MOZ_B2G
|
||||
nsCOMPtr<nsIAppNotificationService> appNotifier =
|
||||
do_GetService("@mozilla.org/system-alerts-service;1");
|
||||
@ -1428,7 +1417,7 @@ Notification::ShowInternal()
|
||||
ops.mDir = DirectionToString(mDir);
|
||||
ops.mLang = mLang;
|
||||
ops.mTag = mTag;
|
||||
ops.mData = dataStr;
|
||||
ops.mData = mDataAsBase64;
|
||||
ops.mMozbehavior = mBehavior;
|
||||
ops.mMozbehavior.mSoundFile = soundUrl;
|
||||
|
||||
@ -1471,7 +1460,7 @@ Notification::ShowInternal()
|
||||
alertService->ShowAlertNotification(iconUrl, mTitle, mBody, true,
|
||||
uniqueCookie, observer, alertName,
|
||||
DirectionToString(mDir), mLang,
|
||||
dataStr, GetPrincipal(),
|
||||
mDataAsBase64, GetPrincipal(),
|
||||
inPrivateBrowsing);
|
||||
}
|
||||
|
||||
@ -1977,52 +1966,76 @@ Notification::GetOrigin(nsIPrincipal* aPrincipal, nsString& aOrigin)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIStructuredCloneContainer* Notification::GetDataCloneContainer()
|
||||
{
|
||||
return mDataObjectContainer;
|
||||
}
|
||||
|
||||
void
|
||||
Notification::GetData(JSContext* aCx,
|
||||
JS::MutableHandle<JS::Value> aRetval)
|
||||
{
|
||||
if (!mData && mDataObjectContainer) {
|
||||
if (mData.isNull() && !mDataAsBase64.IsEmpty()) {
|
||||
nsresult rv;
|
||||
rv = mDataObjectContainer->DeserializeToVariant(aCx, getter_AddRefs(mData));
|
||||
nsRefPtr<nsStructuredCloneContainer> container =
|
||||
new nsStructuredCloneContainer();
|
||||
rv = container->InitFromBase64(mDataAsBase64, JS_STRUCTURED_CLONE_VERSION,
|
||||
aCx);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
aRetval.setNull();
|
||||
return;
|
||||
}
|
||||
|
||||
JS::Rooted<JS::Value> data(aCx);
|
||||
rv = container->DeserializeToJsval(aCx, &data);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
aRetval.setNull();
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.isGCThing()) {
|
||||
mozilla::HoldJSObjects(this);
|
||||
}
|
||||
mData = data;
|
||||
}
|
||||
if (!mData) {
|
||||
if (mData.isNull()) {
|
||||
aRetval.setNull();
|
||||
return;
|
||||
}
|
||||
VariantToJsval(aCx, mData, aRetval);
|
||||
|
||||
JS::ExposeValueToActiveJS(mData);
|
||||
aRetval.set(mData);
|
||||
}
|
||||
|
||||
void
|
||||
Notification::InitFromJSVal(JSContext* aCx, JS::Handle<JS::Value> aData,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
if (mDataObjectContainer || aData.isNull()) {
|
||||
if (!mDataAsBase64.IsEmpty() || aData.isNull()) {
|
||||
return;
|
||||
}
|
||||
mDataObjectContainer = new nsStructuredCloneContainer();
|
||||
aRv = mDataObjectContainer->InitFromJSVal(aData, aCx);
|
||||
nsRefPtr<nsStructuredCloneContainer> dataObjectContainer =
|
||||
new nsStructuredCloneContainer();
|
||||
aRv = dataObjectContainer->InitFromJSVal(aData, aCx);
|
||||
if (NS_WARN_IF(aRv.Failed())) {
|
||||
return;
|
||||
}
|
||||
|
||||
dataObjectContainer->GetDataAsBase64(mDataAsBase64);
|
||||
}
|
||||
|
||||
void Notification::InitFromBase64(JSContext* aCx, const nsAString& aData,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
if (mDataObjectContainer || aData.IsEmpty()) {
|
||||
if (!mDataAsBase64.IsEmpty() || aData.IsEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto container = new nsStructuredCloneContainer();
|
||||
// To and fro to ensure it is valid base64.
|
||||
nsRefPtr<nsStructuredCloneContainer> container =
|
||||
new nsStructuredCloneContainer();
|
||||
aRv = container->InitFromBase64(aData, JS_STRUCTURED_CLONE_VERSION,
|
||||
aCx);
|
||||
mDataObjectContainer = container;
|
||||
if (NS_WARN_IF(aRv.Failed())) {
|
||||
return;
|
||||
}
|
||||
|
||||
container->GetDataAsBase64(mDataAsBase64);
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
|
||||
class nsIPrincipal;
|
||||
class nsIStructuredCloneContainer;
|
||||
class nsIVariant;
|
||||
|
||||
namespace mozilla {
|
||||
@ -126,7 +125,7 @@ public:
|
||||
IMPL_EVENT_HANDLER(close)
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(Notification, DOMEventTargetHelper)
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(Notification, DOMEventTargetHelper)
|
||||
|
||||
static bool PrefEnabled(JSContext* aCx, JSObject* aObj);
|
||||
// Returns if Notification.get() is allowed for the current global.
|
||||
@ -205,8 +204,6 @@ public:
|
||||
return mIsStored;
|
||||
}
|
||||
|
||||
nsIStructuredCloneContainer* GetDataCloneContainer();
|
||||
|
||||
static bool RequestPermissionEnabledForScope(JSContext* aCx, JSObject* /* unused */);
|
||||
|
||||
static void RequestPermission(const GlobalObject& aGlobal,
|
||||
@ -359,11 +356,11 @@ protected:
|
||||
const nsString mLang;
|
||||
const nsString mTag;
|
||||
const nsString mIconUrl;
|
||||
nsCOMPtr<nsIStructuredCloneContainer> mDataObjectContainer;
|
||||
nsString mDataAsBase64;
|
||||
const NotificationBehavior mBehavior;
|
||||
|
||||
// It's null until GetData is first called
|
||||
nsCOMPtr<nsIVariant> mData;
|
||||
JS::Heap<JS::Value> mData;
|
||||
|
||||
nsString mAlertName;
|
||||
nsString mScope;
|
||||
|
@ -154,6 +154,36 @@ this.PushDB.prototype = {
|
||||
);
|
||||
},
|
||||
|
||||
// testFn(record) is called with a database record and should return true if
|
||||
// that record should be deleted.
|
||||
clearIf: function(testFn) {
|
||||
debug("clearIf()");
|
||||
return new Promise((resolve, reject) =>
|
||||
this.newTxn(
|
||||
"readwrite",
|
||||
this._dbStoreName,
|
||||
(aTxn, aStore) => {
|
||||
aTxn.result = undefined;
|
||||
|
||||
aStore.openCursor().onsuccess = event => {
|
||||
let cursor = event.target.result;
|
||||
if (cursor) {
|
||||
if (testFn(this.toPushRecord(cursor.value))) {
|
||||
let deleteRequest = cursor.delete();
|
||||
deleteRequest.onerror = e => {
|
||||
debug("Failed to delete entry even when test succeeded!");
|
||||
}
|
||||
}
|
||||
cursor.continue();
|
||||
}
|
||||
}
|
||||
},
|
||||
resolve,
|
||||
reject
|
||||
)
|
||||
);
|
||||
},
|
||||
|
||||
getByPushEndpoint: function(aPushEndpoint) {
|
||||
debug("getByPushEndpoint()");
|
||||
|
||||
|
@ -58,6 +58,10 @@ PushNotificationService.prototype = {
|
||||
return PushService._clearAll();
|
||||
},
|
||||
|
||||
clearForDomain: function(domain) {
|
||||
return PushService._clearForDomain(domain);
|
||||
},
|
||||
|
||||
observe: function observe(subject, topic, data) {
|
||||
switch (topic) {
|
||||
case "app-startup":
|
||||
|
@ -1027,7 +1027,47 @@ this.PushService = {
|
||||
_clearAll: function _clearAll() {
|
||||
return this._checkActivated()
|
||||
.then(_ => this._db.clearAll())
|
||||
.catch(_ => {
|
||||
.catch(_ => Promise.resolve());
|
||||
},
|
||||
|
||||
_clearForDomain: function(domain) {
|
||||
/**
|
||||
* Copied from ForgetAboutSite.jsm.
|
||||
*
|
||||
* Returns true if the string passed in is part of the root domain of the
|
||||
* current string. For example, if this is "www.mozilla.org", and we pass in
|
||||
* "mozilla.org", this will return true. It would return false the other way
|
||||
* around.
|
||||
*/
|
||||
function hasRootDomain(str, aDomain)
|
||||
{
|
||||
let index = str.indexOf(aDomain);
|
||||
// If aDomain is not found, we know we do not have it as a root domain.
|
||||
if (index == -1)
|
||||
return false;
|
||||
|
||||
// If the strings are the same, we obviously have a match.
|
||||
if (str == aDomain)
|
||||
return true;
|
||||
|
||||
// Otherwise, we have aDomain as our root domain iff the index of aDomain is
|
||||
// aDomain.length subtracted from our length and (since we do not have an
|
||||
// exact match) the character before the index is a dot or slash.
|
||||
let prevChar = str[index - 1];
|
||||
return (index == (str.length - aDomain.length)) &&
|
||||
(prevChar == "." || prevChar == "/");
|
||||
}
|
||||
|
||||
let clear = (db, domain) => {
|
||||
db.clearIf(record => {
|
||||
return hasRootDomain(record.origin, domain);
|
||||
});
|
||||
}
|
||||
|
||||
return this._checkActivated()
|
||||
.then(_ => clear(this._db, domain))
|
||||
.catch(e => {
|
||||
debug("Error forgetting about domain! " + e);
|
||||
return Promise.resolve();
|
||||
});
|
||||
},
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
let {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
||||
|
||||
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
|
||||
Cu.import('resource://gre/modules/Services.jsm');
|
||||
|
@ -538,14 +538,8 @@ nsCORSListenerProxy::CheckRequestApproved(nsIRequest* aRequest)
|
||||
// Check if the request failed
|
||||
nsresult status;
|
||||
nsresult rv = aRequest->GetStatus(&status);
|
||||
if (NS_FAILED(rv)) {
|
||||
LogBlockedRequest(aRequest, "CORSRequestFailed", nullptr);
|
||||
return rv;
|
||||
}
|
||||
if (NS_FAILED(status)) {
|
||||
LogBlockedRequest(aRequest, "CORSRequestFailed", nullptr);
|
||||
return status;
|
||||
}
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
NS_ENSURE_SUCCESS(status, status);
|
||||
|
||||
// Test that things worked on a HTTP level
|
||||
nsCOMPtr<nsIHttpChannel> http = do_QueryInterface(aRequest);
|
||||
|
@ -20,7 +20,9 @@ if (self.Notification) {
|
||||
lang: "",
|
||||
body: "This is a notification body",
|
||||
tag: "sometag",
|
||||
icon: "icon.png"
|
||||
icon: "icon.png",
|
||||
data: ["a complex object that should be", { "structured": "cloned" }],
|
||||
mozbehavior: { vibrationPattern: [30, 200, 30] },
|
||||
};
|
||||
var notification = new Notification("This is a title", options);
|
||||
|
||||
@ -36,6 +38,8 @@ if (self.Notification) {
|
||||
is(notification.body, options.body, "body should get set");
|
||||
is(notification.tag, options.tag, "tag should get set");
|
||||
is(notification.icon, options.icon, "icon should get set");
|
||||
is(notification.data[0], "a complex object that should be", "data item 0 should be a matching string");
|
||||
is(notification.data[1]["structured"], "cloned", "data item 1 should be a matching object literal");
|
||||
|
||||
// store notification in test context
|
||||
this.notification = notification;
|
||||
|
@ -13,11 +13,11 @@
|
||||
}
|
||||
|
||||
navigator.serviceWorker.ready.then(function(swr) {
|
||||
swr.showNotification("Hi there. The ServiceWorker should receive a click event for this.");
|
||||
swr.showNotification("Hi there. The ServiceWorker should receive a click event for this.", { data: { complex: ["jsval", 5] }});
|
||||
});
|
||||
|
||||
navigator.serviceWorker.onmessage = function(msg) {
|
||||
testWindow.callback();
|
||||
testWindow.callback(msg.data.result);
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -9,7 +9,11 @@ onnotificationclick = function(e) {
|
||||
}
|
||||
|
||||
clients.forEach(function(client) {
|
||||
client.postMessage("done");
|
||||
client.postMessage({ result: e.notification.data &&
|
||||
e.notification.data['complex'] &&
|
||||
e.notification.data['complex'][0] == "jsval" &&
|
||||
e.notification.data['complex'][1] == 5 });
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -23,11 +23,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=916893
|
||||
function testFrame(src) {
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.src = src;
|
||||
window.callback = function() {
|
||||
window.callback = function(result) {
|
||||
window.callback = null;
|
||||
document.body.removeChild(iframe);
|
||||
iframe = null;
|
||||
ok(true, "Got notificationclick event.");
|
||||
ok(result, "Got notificationclick event with correct data.");
|
||||
MockServices.unregister();
|
||||
SimpleTest.finish();
|
||||
};
|
||||
|
@ -20,8 +20,6 @@ WIN_LIBS= \
|
||||
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
#define NOMINMAX 1
|
||||
|
||||
#include "plstr.h"
|
||||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
|
@ -98,7 +98,6 @@ if CONFIG['GNU_CXX']:
|
||||
if CONFIG['MOZ_DIRECTX_SDK_PATH'] and not CONFIG['MOZ_HAS_WINSDK_WITH_D3D']:
|
||||
CXXFLAGS += ['-I\'%s/include/\'' % CONFIG['MOZ_DIRECTX_SDK_PATH']]
|
||||
|
||||
DEFINES['NOMINMAX'] = True
|
||||
DEFINES['_CRT_SECURE_NO_DEPRECATE'] = True
|
||||
DEFINES['_HAS_EXCEPTIONS'] = 0
|
||||
|
||||
|
@ -30,7 +30,6 @@ if CONFIG['GNU_CXX']:
|
||||
if CONFIG['MOZ_DIRECTX_SDK_PATH'] and not CONFIG['MOZ_HAS_WINSDK_WITH_D3D']:
|
||||
CXXFLAGS += ['-I\'%s/include/\'' % CONFIG['MOZ_DIRECTX_SDK_PATH']]
|
||||
|
||||
DEFINES['NOMINMAX'] = True
|
||||
DEFINES['_CRT_SECURE_NO_DEPRECATE'] = True
|
||||
DEFINES['_HAS_EXCEPTIONS'] = 0
|
||||
|
||||
|
@ -193,7 +193,6 @@ if CONFIG['GNU_CXX']:
|
||||
if CONFIG['MOZ_DIRECTX_SDK_PATH'] and not CONFIG['MOZ_HAS_WINSDK_WITH_D3D']:
|
||||
CXXFLAGS += ['-I\'%s/include/\'' % CONFIG['MOZ_DIRECTX_SDK_PATH']]
|
||||
|
||||
DEFINES['NOMINMAX'] = True
|
||||
DEFINES['_CRT_SECURE_NO_DEPRECATE'] = True
|
||||
DEFINES['_HAS_EXCEPTIONS'] = 0
|
||||
|
||||
|
25
gfx/ipc/GraphicsMessages.ipdlh
Normal file
25
gfx/ipc/GraphicsMessages.ipdlh
Normal file
@ -0,0 +1,25 @@
|
||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
* vim: sw=2 ts=8 et :
|
||||
*/
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
namespace mozilla {
|
||||
namespace gfx {
|
||||
|
||||
struct DeviceInitData
|
||||
{
|
||||
bool useAcceleration;
|
||||
|
||||
// Windows only.
|
||||
bool useD3D11;
|
||||
bool useD3D11WARP;
|
||||
bool useD3D11ImageBridge;
|
||||
bool d3d11TextureSharingWorks;
|
||||
bool useD2D;
|
||||
bool useD2D1;
|
||||
};
|
||||
|
||||
} // namespace gfx
|
||||
} // namespace mozilla
|
@ -26,6 +26,10 @@ SOURCES += [
|
||||
'SharedDIB.cpp',
|
||||
]
|
||||
|
||||
IPDL_SOURCES = [
|
||||
'GraphicsMessages.ipdlh',
|
||||
]
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -496,17 +496,20 @@ public:
|
||||
}
|
||||
void SetCompositionTime(TimeStamp aTimeStamp) {
|
||||
mCompositionTime = aTimeStamp;
|
||||
mCompositeAgainTime = TimeStamp();
|
||||
}
|
||||
|
||||
void CompositeAgainAt(TimeStamp aTimeStamp) {
|
||||
if (mCompositeAgainTime.IsNull() ||
|
||||
mCompositeAgainTime > aTimeStamp) {
|
||||
mCompositeAgainTime = aTimeStamp;
|
||||
if (!mCompositionTime.IsNull() && !mCompositeUntilTime.IsNull() &&
|
||||
mCompositionTime >= mCompositeUntilTime) {
|
||||
mCompositeUntilTime = TimeStamp();
|
||||
}
|
||||
}
|
||||
TimeStamp GetCompositeAgainTime() const {
|
||||
return mCompositeAgainTime;
|
||||
|
||||
void CompositeUntil(TimeStamp aTimeStamp) {
|
||||
if (mCompositeUntilTime.IsNull() ||
|
||||
mCompositeUntilTime < aTimeStamp) {
|
||||
mCompositeUntilTime = aTimeStamp;
|
||||
}
|
||||
}
|
||||
TimeStamp GetCompositeUntilTime() const {
|
||||
return mCompositeUntilTime;
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -529,9 +532,10 @@ protected:
|
||||
TimeStamp mCompositionTime;
|
||||
/**
|
||||
* When nonnull, during rendering, some compositable indicated that it will
|
||||
* change its rendering at this time (and this is the earliest such time).
|
||||
* change its rendering at this time. In order not to miss it, we composite
|
||||
* on every vsync until this time occurs (this is the latest such time).
|
||||
*/
|
||||
TimeStamp mCompositeAgainTime;
|
||||
TimeStamp mCompositeUntilTime;
|
||||
|
||||
uint32_t mCompositorID;
|
||||
DiagnosticTypes mDiagnosticTypes;
|
||||
|
@ -152,11 +152,7 @@ already_AddRefed<PaintedLayer>
|
||||
ClientLayerManager::CreatePaintedLayerWithHint(PaintedLayerCreationHint aHint)
|
||||
{
|
||||
NS_ASSERTION(InConstruction(), "Only allowed in construction phase");
|
||||
if (
|
||||
#ifdef MOZ_B2G
|
||||
aHint == SCROLLABLE &&
|
||||
#endif
|
||||
gfxPrefs::LayersTilesEnabled()
|
||||
if (gfxPrefs::LayersTilesEnabled()
|
||||
#ifndef MOZ_X11
|
||||
&& (AsShadowForwarder()->GetCompositorBackendType() == LayersBackend::LAYERS_OPENGL ||
|
||||
AsShadowForwarder()->GetCompositorBackendType() == LayersBackend::LAYERS_D3D9 ||
|
||||
|
@ -69,15 +69,6 @@ public:
|
||||
|
||||
virtual void RenderLayerWithReadback(ReadbackProcessor *aReadback) override;
|
||||
|
||||
virtual bool IsOptimizedFor(LayerManager::PaintedLayerCreationHint aCreationHint) override
|
||||
{
|
||||
#ifdef MOZ_B2G
|
||||
return aCreationHint == GetCreationHint();
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual void ClearCachedResources() override
|
||||
{
|
||||
if (mContentClient) {
|
||||
|
@ -186,7 +186,7 @@ ClientSingleTiledLayerBuffer::PaintThebes(const nsIntRegion& aNewValidRegion,
|
||||
|
||||
// Mark the area we just drew into the back buffer as invalid in the front buffer as they're
|
||||
// now out of sync.
|
||||
mTile.mInvalidFront.OrWith(paintRegion);
|
||||
mTile.mInvalidFront.OrWith(tileDirtyRegion);
|
||||
|
||||
// The new buffer is now validated, remove the dirty region from it.
|
||||
mTile.mInvalidBack.SubOut(tileDirtyRegion);
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
class nsIntRegion;
|
||||
|
||||
#define BIAS_TIME_MS 1.0
|
||||
|
||||
namespace mozilla {
|
||||
namespace gfx {
|
||||
class Matrix4x4;
|
||||
@ -102,6 +104,22 @@ ImageHost::UseTextureHost(const nsTArray<TimedTexture>& aTextures)
|
||||
img.mFrontBuffer->PrepareTextureSource(img.mTextureSource);
|
||||
}
|
||||
mImages.SwapElements(newImages);
|
||||
|
||||
// Video producers generally send replacement images with the same frameID but
|
||||
// slightly different timestamps in order to sync with the audio clock. This
|
||||
// means that any CompositeUntil() call we made in Composite() may no longer
|
||||
// guarantee that we'll composite until the next frame is ready. Fix that here.
|
||||
if (GetCompositor() && mLastFrameID >= 0) {
|
||||
for (size_t i = 0; i < mImages.Length(); ++i) {
|
||||
bool frameComesAfter = mImages[i].mFrameID > mLastFrameID ||
|
||||
mImages[i].mProducerID != mLastProducerID;
|
||||
if (frameComesAfter && !mImages[i].mTimeStamp.IsNull()) {
|
||||
GetCompositor()->CompositeUntil(mImages[i].mTimeStamp +
|
||||
TimeDuration::FromMilliseconds(BIAS_TIME_MS));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -124,9 +142,9 @@ GetBiasedTime(const TimeStamp& aInput, ImageHost::Bias aBias)
|
||||
{
|
||||
switch (aBias) {
|
||||
case ImageHost::BIAS_NEGATIVE:
|
||||
return aInput - TimeDuration::FromMilliseconds(1.0);
|
||||
return aInput - TimeDuration::FromMilliseconds(BIAS_TIME_MS);
|
||||
case ImageHost::BIAS_POSITIVE:
|
||||
return aInput + TimeDuration::FromMilliseconds(1.0);
|
||||
return aInput + TimeDuration::FromMilliseconds(BIAS_TIME_MS);
|
||||
default:
|
||||
return aInput;
|
||||
}
|
||||
@ -257,7 +275,7 @@ ImageHost::Composite(LayerComposite* aLayer,
|
||||
}
|
||||
|
||||
if (uint32_t(imageIndex) + 1 < mImages.Length()) {
|
||||
GetCompositor()->CompositeAgainAt(mImages[imageIndex + 1].mTimeStamp);
|
||||
GetCompositor()->CompositeUntil(mImages[imageIndex + 1].mTimeStamp + TimeDuration::FromMilliseconds(BIAS_TIME_MS));
|
||||
}
|
||||
|
||||
TimedImage* img = &mImages[imageIndex];
|
||||
|
@ -195,14 +195,17 @@ public:
|
||||
TextureHost* host = mTiledBuffer.GetTile(0).mTextureHost;
|
||||
if (host) {
|
||||
MOZ_ASSERT(!mTiledBuffer.GetTile(0).mTextureHostOnWhite, "Component alpha not supported!");
|
||||
LayerRenderState state = host->GetRenderState();
|
||||
|
||||
// Offset by the distance between the start of the valid (visible) region and the top-left
|
||||
// of the tile.
|
||||
gfx::IntPoint offset = mTiledBuffer.GetTileOffset(mTiledBuffer.GetPlacement().TilePosition(0));
|
||||
|
||||
state.SetOffset(offset - GetValidRegion().GetBounds().TopLeft());
|
||||
return host->GetRenderState();
|
||||
// Don't try to use HWC if the content doesn't start at the top-left of the tile.
|
||||
if (offset != GetValidRegion().GetBounds().TopLeft()) {
|
||||
return LayerRenderState();
|
||||
}
|
||||
|
||||
LayerRenderState state = host->GetRenderState();
|
||||
state.SetOffset(offset);
|
||||
return state;
|
||||
}
|
||||
}
|
||||
return LayerRenderState();
|
||||
|
@ -1180,8 +1180,9 @@ CompositorParent::CompositeToTarget(DrawTarget* aTarget, const gfx::IntRect* aRe
|
||||
// We're not really taking advantage of the stored composite-again-time here.
|
||||
// We might be able to skip the next few composites altogether. However,
|
||||
// that's a bit complex to implement and we'll get most of the advantage
|
||||
// by skipping compositing when we detect there's nothing invalid.
|
||||
if (!mCompositor->GetCompositeAgainTime().IsNull() ||
|
||||
// by skipping compositing when we detect there's nothing invalid. This is why
|
||||
// we do "composite until" rather than "composite again at".
|
||||
if (!mCompositor->GetCompositeUntilTime().IsNull() ||
|
||||
mLayerManager->DebugOverlayWantsNextFrame()) {
|
||||
ScheduleComposition();
|
||||
}
|
||||
|
@ -54,7 +54,6 @@ FINAL_LIBRARY = 'gkmedias'
|
||||
|
||||
DEFINES['PACKAGE_VERSION'] = '"moz"'
|
||||
DEFINES['PACKAGE_BUGREPORT'] = '"http://bugzilla.mozilla.org/"'
|
||||
DEFINES['NOMINMAX'] = True
|
||||
|
||||
if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
|
||||
DEFINES['OTS_DLL'] = True
|
||||
|
@ -111,6 +111,8 @@ class mozilla::gl::SkiaGLGlue : public GenericAtomicRefCounted {
|
||||
#include "nsIXULRuntime.h"
|
||||
#include "VsyncSource.h"
|
||||
#include "SoftwareVsyncSource.h"
|
||||
#include "nscore.h" // for NS_FREE_PERMANENT_DATA
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
@ -259,7 +261,7 @@ void CrashStatsLogForwarder::UpdateCrashReport()
|
||||
mCrashCriticalKey.get(), message.str().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CrashStatsLogForwarder::Log(const std::string& aString)
|
||||
{
|
||||
MutexAutoLock lock(mMutex);
|
||||
@ -645,7 +647,7 @@ gfxPlatform::Shutdown()
|
||||
#endif
|
||||
|
||||
// This is a bit iffy - we're assuming that we were the ones that set the
|
||||
// log forwarder in the Factory, so that it's our responsibility to
|
||||
// log forwarder in the Factory, so that it's our responsibility to
|
||||
// delete it.
|
||||
delete mozilla::gfx::Factory::GetLogForwarder();
|
||||
mozilla::gfx::Factory::SetLogForwarder(nullptr);
|
||||
@ -714,7 +716,7 @@ gfxPlatform::~gfxPlatform()
|
||||
// cairo_debug_* function unconditionally.
|
||||
//
|
||||
// because cairo can assert and thus crash on shutdown, don't do this in release builds
|
||||
#if defined(DEBUG) || defined(NS_BUILD_REFCNT_LOGGING) || defined(MOZ_VALGRIND)
|
||||
#ifdef NS_FREE_PERMANENT_DATA
|
||||
#ifdef USE_SKIA
|
||||
// must do Skia cleanup before Cairo cleanup, because Skia may be referencing
|
||||
// Cairo objects e.g. through SkCairoFTTypeface
|
||||
@ -1201,7 +1203,7 @@ gfxPlatform::CreateDrawTargetForData(unsigned char* aData, const IntSize& aSize,
|
||||
NS_ASSERTION(mContentBackend != BackendType::NONE, "No backend.");
|
||||
|
||||
BackendType backendType = mContentBackend;
|
||||
|
||||
|
||||
if (!Factory::DoesBackendSupportDataDrawtarget(mContentBackend)) {
|
||||
backendType = BackendType::CAIRO;
|
||||
}
|
||||
@ -2487,3 +2489,24 @@ gfxPlatform::NotifyCompositorCreated(LayersBackend aBackend)
|
||||
obsvc->NotifyObservers(nullptr, "compositor:created", nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gfxPlatform::GetDeviceInitData(mozilla::gfx::DeviceInitData* aOut)
|
||||
{
|
||||
MOZ_ASSERT(XRE_IsParentProcess());
|
||||
aOut->useAcceleration() = ShouldUseLayersAcceleration();
|
||||
}
|
||||
|
||||
void
|
||||
gfxPlatform::UpdateDeviceInitData()
|
||||
{
|
||||
if (XRE_IsParentProcess()) {
|
||||
// The parent process figures out device initialization on its own.
|
||||
return;
|
||||
}
|
||||
|
||||
mozilla::gfx::DeviceInitData data;
|
||||
mozilla::dom::ContentChild::GetSingleton()->SendGetGraphicsDeviceInitData(&data);
|
||||
|
||||
SetDeviceInitData(data);
|
||||
}
|
||||
|
@ -49,6 +49,7 @@ class DataSourceSurface;
|
||||
class ScaledFont;
|
||||
class DrawEventRecorder;
|
||||
class VsyncSource;
|
||||
class DeviceInitData;
|
||||
|
||||
inline uint32_t
|
||||
BackendTypeBit(BackendType b)
|
||||
@ -485,7 +486,8 @@ public:
|
||||
virtual bool CanUseHardwareVideoDecoding();
|
||||
static bool CanUseDirect3D11ANGLE();
|
||||
|
||||
// Returns whether or not layers acceleration should be used.
|
||||
// Returns whether or not layers acceleration should be used. This should
|
||||
// only be called on the parent process.
|
||||
bool ShouldUseLayersAcceleration();
|
||||
|
||||
// Returns a prioritized list of all available compositor backends.
|
||||
@ -646,6 +648,10 @@ public:
|
||||
virtual void TestDeviceReset(DeviceResetReason aReason)
|
||||
{}
|
||||
|
||||
// Return information on how child processes should initialize graphics
|
||||
// devices. Currently this is only used on Windows.
|
||||
virtual void GetDeviceInitData(mozilla::gfx::DeviceInitData* aOut);
|
||||
|
||||
protected:
|
||||
gfxPlatform();
|
||||
virtual ~gfxPlatform();
|
||||
@ -678,6 +684,17 @@ protected:
|
||||
void InitBackendPrefs(uint32_t aCanvasBitmask, mozilla::gfx::BackendType aCanvasDefault,
|
||||
uint32_t aContentBitmask, mozilla::gfx::BackendType aContentDefault);
|
||||
|
||||
/**
|
||||
* If in a child process, triggers a refresh of device preferences.
|
||||
*/
|
||||
void UpdateDeviceInitData();
|
||||
|
||||
/**
|
||||
* Called when new device preferences are available.
|
||||
*/
|
||||
virtual void SetDeviceInitData(mozilla::gfx::DeviceInitData& aData)
|
||||
{}
|
||||
|
||||
/**
|
||||
* returns the first backend named in the pref gfx.canvas.azure.backends
|
||||
* which is a component of aBackendBitmask, a bitmask of backend types
|
||||
|
@ -373,6 +373,16 @@ public:
|
||||
|
||||
NS_IMPL_ISUPPORTS(D3D9SharedTextureReporter, nsIMemoryReporter)
|
||||
|
||||
// Device init data should only be used on child processes, so we protect it
|
||||
// behind a getter here.
|
||||
static DeviceInitData sDeviceInitDataDoNotUseDirectly;
|
||||
static inline DeviceInitData&
|
||||
GetParentDevicePrefs()
|
||||
{
|
||||
MOZ_ASSERT(XRE_IsContentProcess());
|
||||
return sDeviceInitDataDoNotUseDirectly;
|
||||
}
|
||||
|
||||
gfxWindowsPlatform::gfxWindowsPlatform()
|
||||
: mRenderMode(RENDER_GDI)
|
||||
, mIsWARP(false)
|
||||
@ -403,6 +413,7 @@ gfxWindowsPlatform::gfxWindowsPlatform()
|
||||
mFeatureLevels.AppendElement(D3D_FEATURE_LEVEL_10_0);
|
||||
mFeatureLevels.AppendElement(D3D_FEATURE_LEVEL_9_3);
|
||||
|
||||
UpdateDeviceInitData();
|
||||
InitializeDevices();
|
||||
UpdateRenderMode();
|
||||
|
||||
@ -518,6 +529,9 @@ gfxWindowsPlatform::HandleDeviceReset()
|
||||
imgLoader::Singleton()->ClearCache(false);
|
||||
gfxAlphaBoxBlur::ShutdownBlurCache();
|
||||
|
||||
// Since we got a device reset, we must ask the parent process for an updated
|
||||
// list of which devices to create.
|
||||
UpdateDeviceInitData();
|
||||
InitializeDevices();
|
||||
return true;
|
||||
}
|
||||
@ -1900,6 +1914,12 @@ CanUseWARP()
|
||||
return true;
|
||||
}
|
||||
|
||||
// The child process can only use WARP if the parent process is also using
|
||||
// WARP.
|
||||
if (XRE_IsContentProcess()) {
|
||||
return GetParentDevicePrefs().useD3D11WARP();
|
||||
}
|
||||
|
||||
// It seems like nvdxgiwrap makes a mess of WARP. See bug 1154703.
|
||||
if (!IsWin8OrLater() ||
|
||||
gfxPrefs::LayersD3D11DisableWARP() ||
|
||||
@ -1918,6 +1938,14 @@ gfxWindowsPlatform::CheckD3D11Support(bool* aCanUseHardware)
|
||||
return mD3D11Status;
|
||||
}
|
||||
|
||||
if (XRE_IsContentProcess()) {
|
||||
if (!GetParentDevicePrefs().useD3D11()) {
|
||||
return FeatureStatus::Blocked;
|
||||
}
|
||||
*aCanUseHardware = !GetParentDevicePrefs().useD3D11WARP();
|
||||
return FeatureStatus::Available;
|
||||
}
|
||||
|
||||
if (gfxPrefs::LayersD3D11ForceWARP()) {
|
||||
*aCanUseHardware = false;
|
||||
return FeatureStatus::Available;
|
||||
@ -1982,6 +2010,12 @@ gfxWindowsPlatform::AttemptD3D11DeviceCreation()
|
||||
// Only test this when not using WARP since it can fail and cause
|
||||
// GetDeviceRemovedReason to return weird values.
|
||||
mDoesD3D11TextureSharingWork = ::DoesD3D11TextureSharingWork(mD3D11Device);
|
||||
|
||||
// Assert that the child and parent process both computed texture sharing
|
||||
// properly.
|
||||
MOZ_ASSERT_IF(XRE_IsContentProcess(),
|
||||
mDoesD3D11TextureSharingWork == GetParentDevicePrefs().d3d11TextureSharingWorks());
|
||||
|
||||
mD3D11Device->SetExceptionMode(0);
|
||||
mIsWARP = false;
|
||||
}
|
||||
@ -2078,31 +2112,31 @@ gfxWindowsPlatform::AttemptD3D11ImageBridgeDeviceCreation()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gfxWindowsPlatform::SetDeviceInitData(mozilla::gfx::DeviceInitData& aData)
|
||||
{
|
||||
MOZ_ASSERT(XRE_IsContentProcess());
|
||||
sDeviceInitDataDoNotUseDirectly = aData;
|
||||
}
|
||||
|
||||
void
|
||||
gfxWindowsPlatform::InitializeDevices()
|
||||
{
|
||||
// Don't retry acceleration if it failed earlier.
|
||||
// If acceleration is disabled, we refuse to initialize anything.
|
||||
mAcceleration = CheckAccelerationSupport();
|
||||
if (IsFeatureStatusFailure(mAcceleration)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If we previously crashed initializing devices, or if we're in safe mode,
|
||||
// bail out now.
|
||||
// If we previously crashed initializing devices, bail out now. This is
|
||||
// effectively a parent-process only check, since the content process
|
||||
// cannot create a lock file.
|
||||
DriverInitCrashDetection detectCrashes;
|
||||
if (detectCrashes.DisableAcceleration() || InSafeMode()) {
|
||||
if (detectCrashes.DisableAcceleration()) {
|
||||
mAcceleration = FeatureStatus::Blocked;
|
||||
return;
|
||||
}
|
||||
|
||||
// If acceleration is disabled, we refuse to initialize anything.
|
||||
if (!ShouldUseLayersAcceleration()) {
|
||||
mAcceleration = FeatureStatus::Disabled;
|
||||
return;
|
||||
}
|
||||
|
||||
// At this point, as far as we know, we can probably accelerate.
|
||||
mAcceleration = FeatureStatus::Available;
|
||||
|
||||
// If we're going to prefer D3D9, stop here. The rest of this function
|
||||
// attempts to use D3D11 features.
|
||||
if (gfxPrefs::LayersPreferD3D9()) {
|
||||
@ -2117,6 +2151,38 @@ gfxWindowsPlatform::InitializeDevices()
|
||||
}
|
||||
}
|
||||
|
||||
FeatureStatus
|
||||
gfxWindowsPlatform::CheckAccelerationSupport()
|
||||
{
|
||||
// Don't retry acceleration if it failed earlier.
|
||||
if (IsFeatureStatusFailure(mAcceleration)) {
|
||||
return mAcceleration;
|
||||
}
|
||||
if (XRE_IsContentProcess()) {
|
||||
return GetParentDevicePrefs().useAcceleration()
|
||||
? FeatureStatus::Available
|
||||
: FeatureStatus::Blocked;
|
||||
}
|
||||
if (InSafeMode()) {
|
||||
return FeatureStatus::Blocked;
|
||||
}
|
||||
if (!ShouldUseLayersAcceleration()) {
|
||||
return FeatureStatus::Disabled;
|
||||
}
|
||||
return FeatureStatus::Available;
|
||||
}
|
||||
|
||||
bool
|
||||
gfxWindowsPlatform::CanUseD3D11ImageBridge()
|
||||
{
|
||||
if (XRE_IsContentProcess()) {
|
||||
if (!GetParentDevicePrefs().useD3D11ImageBridge()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return !mIsWARP;
|
||||
}
|
||||
|
||||
void
|
||||
gfxWindowsPlatform::InitializeD3D11()
|
||||
{
|
||||
@ -2170,7 +2236,7 @@ gfxWindowsPlatform::InitializeD3D11()
|
||||
mD3D11Status = FeatureStatus::Available;
|
||||
MOZ_ASSERT(mD3D11Device);
|
||||
|
||||
if (!mIsWARP) {
|
||||
if (CanUseD3D11ImageBridge()) {
|
||||
AttemptD3D11ImageBridgeDeviceCreation();
|
||||
}
|
||||
|
||||
@ -2206,6 +2272,12 @@ gfxWindowsPlatform::CheckD2DSupport()
|
||||
return mD2DStatus;
|
||||
}
|
||||
|
||||
if (XRE_IsContentProcess()) {
|
||||
return GetParentDevicePrefs().useD2D()
|
||||
? FeatureStatus::Available
|
||||
: FeatureStatus::Blocked;
|
||||
}
|
||||
|
||||
if (!gfxPrefs::Direct2DForceEnabled() && IsD2DBlacklisted()) {
|
||||
return FeatureStatus::Blacklisted;
|
||||
}
|
||||
@ -2266,6 +2338,11 @@ gfxWindowsPlatform::CheckD2D1Support()
|
||||
if (!Factory::SupportsD2D1()) {
|
||||
return FeatureStatus::Unavailable;
|
||||
}
|
||||
if (XRE_IsContentProcess()) {
|
||||
return GetParentDevicePrefs().useD2D1()
|
||||
? FeatureStatus::Available
|
||||
: FeatureStatus::Blocked;
|
||||
}
|
||||
if (!gfxPrefs::Direct2DUse1_1()) {
|
||||
return FeatureStatus::Disabled;
|
||||
}
|
||||
@ -2609,3 +2686,24 @@ gfxWindowsPlatform::GetD3D11Version()
|
||||
}
|
||||
return device->GetFeatureLevel();
|
||||
}
|
||||
|
||||
void
|
||||
gfxWindowsPlatform::GetDeviceInitData(DeviceInitData* aOut)
|
||||
{
|
||||
// Check for device resets before giving back new graphics information.
|
||||
UpdateRenderMode();
|
||||
|
||||
gfxPlatform::GetDeviceInitData(aOut);
|
||||
|
||||
// IPDL initializes each field to false for us so we can early return.
|
||||
if (GetD3D11Status() != FeatureStatus::Available) {
|
||||
return;
|
||||
}
|
||||
|
||||
aOut->useD3D11() = true;
|
||||
aOut->useD3D11ImageBridge() = !!mD3D11ImageBridgeDevice;
|
||||
aOut->d3d11TextureSharingWorks() = mDoesD3D11TextureSharingWork;
|
||||
aOut->useD3D11WARP() = mIsWARP;
|
||||
aOut->useD2D() = (GetD2DStatus() == FeatureStatus::Available);
|
||||
aOut->useD2D1() = (GetD2D1Status() == FeatureStatus::Available);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user