mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge mozilla-central to mozilla-inbound
This commit is contained in:
commit
8295d8b8b0
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="3a2947df41a480de1457a6dcdbf46ad0af70d8e0">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="1daf2dadcd0d554c733661a4c0be1b82001e9da0"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="dc496d04907dd314f9736ff78bab3bd27156f79a"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cc1f362ce43dce92ac786187ff4abf39060094bd"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
@ -35,7 +35,7 @@
|
||||
<project name="device/sample" path="device/sample" revision="1a3d8efa0ad32ec8f145367a3cf0f54b97385c3c"/>
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="18f1b5e28734183ff8073fe86dc46bc4ebba8a59"/>
|
||||
<project name="platform/bionic" path="bionic" revision="86b1f589c313422a7da1812512b9ec8d1cf9ba3c"/>
|
||||
<project name="platform/bootable/recovery" path="bootable/recovery" revision="4eece0d80928a2b5266b78421ebf0c8686d4ad2c"/>
|
||||
<project name="platform/bootable/recovery" path="bootable/recovery" revision="67978bf5ecdd59441296436677b3729b4142e2ff"/>
|
||||
<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="c8e99ca7e11c00f8124196fe1726a15e6e976587"/>
|
||||
|
@ -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="1daf2dadcd0d554c733661a4c0be1b82001e9da0"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="dc496d04907dd314f9736ff78bab3bd27156f79a"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cc1f362ce43dce92ac786187ff4abf39060094bd"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="1daf2dadcd0d554c733661a4c0be1b82001e9da0"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="dc496d04907dd314f9736ff78bab3bd27156f79a"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cc1f362ce43dce92ac786187ff4abf39060094bd"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="9f6b7471c881ee689183d681658cf2ba3dfc5610"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="3a2947df41a480de1457a6dcdbf46ad0af70d8e0">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="1daf2dadcd0d554c733661a4c0be1b82001e9da0"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="dc496d04907dd314f9736ff78bab3bd27156f79a"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cc1f362ce43dce92ac786187ff4abf39060094bd"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -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="1daf2dadcd0d554c733661a4c0be1b82001e9da0"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="dc496d04907dd314f9736ff78bab3bd27156f79a"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cc1f362ce43dce92ac786187ff4abf39060094bd"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="3a2947df41a480de1457a6dcdbf46ad0af70d8e0">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="1daf2dadcd0d554c733661a4c0be1b82001e9da0"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="dc496d04907dd314f9736ff78bab3bd27156f79a"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cc1f362ce43dce92ac786187ff4abf39060094bd"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</project>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="1daf2dadcd0d554c733661a4c0be1b82001e9da0"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="dc496d04907dd314f9736ff78bab3bd27156f79a"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cc1f362ce43dce92ac786187ff4abf39060094bd"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="9f6b7471c881ee689183d681658cf2ba3dfc5610"/>
|
||||
|
@ -4,6 +4,6 @@
|
||||
"remote": "",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "934b8c3014a3e20dd5d90ecf95f4b6b704dddb1e",
|
||||
"revision": "f486771c1a2a76bfea1a5c7eac8debe14f29927b",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
@ -17,7 +17,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="1daf2dadcd0d554c733661a4c0be1b82001e9da0"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="dc496d04907dd314f9736ff78bab3bd27156f79a"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cc1f362ce43dce92ac786187ff4abf39060094bd"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="1daf2dadcd0d554c733661a4c0be1b82001e9da0"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="dc496d04907dd314f9736ff78bab3bd27156f79a"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cc1f362ce43dce92ac786187ff4abf39060094bd"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="1daf2dadcd0d554c733661a4c0be1b82001e9da0"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="dc496d04907dd314f9736ff78bab3bd27156f79a"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cc1f362ce43dce92ac786187ff4abf39060094bd"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="9f6b7471c881ee689183d681658cf2ba3dfc5610"/>
|
||||
|
@ -17,7 +17,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="1daf2dadcd0d554c733661a4c0be1b82001e9da0"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="dc496d04907dd314f9736ff78bab3bd27156f79a"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="cc1f362ce43dce92ac786187ff4abf39060094bd"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1412711894000">
|
||||
<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1413590290000">
|
||||
<emItems>
|
||||
<emItem blockID="i454" id="sqlmoz@facebook.com">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="3">
|
||||
@ -27,8 +27,8 @@
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i404" id="{a9bb9fa0-4122-4c75-bd9a-bc27db3f9155}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
<emItem blockID="i734" id="profsites@pr.com">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="3">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
@ -84,7 +84,7 @@
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i527" id="/^({bfec236d-e122-4102-864f-f5f19d897f5e}|{3f842035-47f4-4f10-846b-6199b07f09b8}|{92ed4bbd-83f2-4c70-bb4e-f8d3716143fe})$/">
|
||||
<emItem blockID="i762" id="/^({2d7886a0-85bb-4bf2-b684-ba92b4b21d23}|{2fab2e94-d6f9-42de-8839-3510cef6424b}|{c02397f7-75b0-446e-a8fa-6ef70cfbf12b}|{8b337819-d1e8-48d3-8178-168ae8c99c36}|firefox@neurowise.info|firefox@allgenius.info)$/">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
@ -96,10 +96,12 @@
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i105" id="{95ff02bc-ffc6-45f0-a5c8-619b8226a9de}">
|
||||
<versionRange minVersion="0" maxVersion="*">
|
||||
<emItem blockID="i758" id="toolbar10853@findwide.com">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
<pref>browser.startup.homepage</pref>
|
||||
<pref>browser.search.defaultenginename</pref>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i626" id="{20AD702C-661E-4534-8CE9-BA4EC9AD6ECC}">
|
||||
@ -108,8 +110,8 @@
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i20" id="{AB2CE124-6272-4b12-94A9-7303C7397BD1}">
|
||||
<versionRange minVersion="0.1" maxVersion="5.2.0.7164" severity="1">
|
||||
<emItem blockID="i732" id=" {e935dd68-f90d-46a6-b89e-c4657534b353}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="3">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
@ -294,6 +296,12 @@
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i461" id="{8E9E3331-D360-4f87-8803-52DE43566502}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i7" id="{2224e955-00e9-4613-a844-ce69fccaae91}">
|
||||
<prefs>
|
||||
@ -354,7 +362,19 @@
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i467" id="plugin@analytic-s.com">
|
||||
<emItem blockID="i20" id="{AB2CE124-6272-4b12-94A9-7303C7397BD1}">
|
||||
<versionRange minVersion="0.1" maxVersion="5.2.0.7164" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i364" id="{FE1DEEEA-DB6D-44b8-83F0-34FC0F9D1052}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i740" id="ascsurfingprotection@iobit.com">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
@ -409,6 +429,12 @@
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i722" id="{9802047e-5a84-4da3-b103-c55995d147d1}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="3">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i11" id="yslow@yahoo-inc.com">
|
||||
<versionRange minVersion="2.0.5" maxVersion="2.0.5">
|
||||
@ -443,8 +469,8 @@
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i66" id="youtubeer@youtuber.com">
|
||||
<versionRange minVersion="0" maxVersion="*">
|
||||
<emItem blockID="i527" id="/^({bfec236d-e122-4102-864f-f5f19d897f5e}|{3f842035-47f4-4f10-846b-6199b07f09b8}|{92ed4bbd-83f2-4c70-bb4e-f8d3716143fe})$/">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
@ -520,6 +546,18 @@
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i754" id="{bb7b7a60-f574-47c2-8a0b-4c56f2da9802}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i105" id="{95ff02bc-ffc6-45f0-a5c8-619b8226a9de}">
|
||||
<versionRange minVersion="0" maxVersion="*">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i668" id="/^(matchersite(pro(srcs?)?)?\@matchersite(pro(srcs?)?)?\.com)|((pro)?sitematcher(_srcs?|pro|site|sitesrc|-generic)?\@(pro)?sitematcher(_srcs?|pro|site|sitesrc|-generic)?\.com)$/">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
@ -580,6 +618,12 @@
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i433" id="{c95a4e8e-816d-4655-8c79-d736da1adb6d}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i39" id="{c2d64ff7-0ab8-4263-89c9-ea3b0f8f050c}">
|
||||
<versionRange minVersion="0.1" maxVersion="4.3.1.00" severity="1">
|
||||
@ -592,6 +636,14 @@
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i760" id="toolbar11093@freshy.com">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
<pref>browser.startup.homepage</pref>
|
||||
<pref>browser.search.defaultenginename</pref>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i628" id="ffxtlbr@iminent.com">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
@ -743,8 +795,12 @@
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i364" id="{FE1DEEEA-DB6D-44b8-83F0-34FC0F9D1052}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
<emItem blockID="i10" id="{8CE11043-9A15-4207-A565-0C94C42D590D}">
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i726" id="{d87d56b2-1379-49f4-b081-af2850c79d8e}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="3">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
@ -767,8 +823,8 @@
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i433" id="{c95a4e8e-816d-4655-8c79-d736da1adb6d}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
<emItem blockID="i473" id="{81b13b5d-fba1-49fd-9a6b-189483ac548a}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="3">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
@ -851,10 +907,12 @@
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i370" id="happylyrics@hpyproductions.net">
|
||||
<emItem name="/Astromenda/" blockID="i738">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
<pref>browser.startup.homepage</pref>
|
||||
<pref>browser.search.defaultenginename</pref>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i440" id="{2d069a16-fca1-4e81-81ea-5d5086dcbd0c}">
|
||||
@ -919,8 +977,10 @@
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i10" id="{8CE11043-9A15-4207-A565-0C94C42D590D}">
|
||||
<prefs>
|
||||
<emItem blockID="i370" id="happylyrics@hpyproductions.net">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i548" id="/^firefox@(jumpflip|webconnect|browsesmart|mybuzzsearch|outobox|greygray|lemurleap|divapton|secretsauce|batbrowse|whilokii|linkswift|qualitink|browsefox|kozaka|diamondata|glindorus|saltarsmart|bizzybolt|websparkle)\.(com?|net|org|info|biz)$/">
|
||||
@ -987,6 +1047,13 @@
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i730" id="25p@9eAkaLq.net">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
<pref>browser.startup.homepage</pref>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i692" id="/^(j003-lqgrmgpcekslhg|SupraSavings|j003-dkqonnnthqjnkq|j003-kaggrpmirxjpzh)@jetpack$/">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
@ -1000,7 +1067,7 @@
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i722" id="{9802047e-5a84-4da3-b103-c55995d147d1}">
|
||||
<emItem blockID="i510" id="{3c9a72a0-b849-40f3-8c84-219109c27554}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="3">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
@ -1194,7 +1261,7 @@
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i461" id="{8E9E3331-D360-4f87-8803-52DE43566502}">
|
||||
<emItem blockID="i748" id="{32da2f20-827d-40aa-a3b4-2fc4a294352e}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
@ -1205,6 +1272,12 @@
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i750" id="{46eddf51-a4f6-4476-8d6c-31c5187b2a2f}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i493" id="12x3q@3244516.com">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="3">
|
||||
@ -1235,6 +1308,13 @@
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i728" id="l@AdLJ7uz.net">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
<pref>browser.startup.homepage</pref>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i694" id="59D317DB041748fdB89B47E6F96058F3@jetpack">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
@ -1278,8 +1358,8 @@
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i91" id="crossriderapp4926@crossrider.com">
|
||||
<versionRange minVersion="0" maxVersion="0.81.43" severity="1">
|
||||
<emItem blockID="i528" id="008abed2-b43a-46c9-9a5b-a771c87b82da@1ad61d53-2bdc-4484-a26b-b888ecae1906.com">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
@ -1539,6 +1619,12 @@
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i744" id="{84a93d51-b7a9-431e-8ff8-d60e5d7f5df1}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i318" id="ffxtlbr@incredibar.com">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
@ -1557,6 +1643,12 @@
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i404" id="{a9bb9fa0-4122-4c75-bd9a-bc27db3f9155}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i490" id="now.msn.com@services.mozilla.org">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="3">
|
||||
@ -1575,6 +1667,12 @@
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i756" id="{5eeb83d0-96ea-4249-942c-beead6847053}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i545" id="superlrcs@svenyor.net">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
@ -1624,8 +1722,8 @@
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i528" id="008abed2-b43a-46c9-9a5b-a771c87b82da@1ad61d53-2bdc-4484-a26b-b888ecae1906.com">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
<emItem blockID="i91" id="crossriderapp4926@crossrider.com">
|
||||
<versionRange minVersion="0" maxVersion="0.81.43" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
@ -1705,6 +1803,12 @@
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i746" id="{58d2a791-6199-482f-a9aa-9b725ec61362}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i224" id="{336D0C35-8A85-403a-B9D2-65C292C39087}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
@ -1768,8 +1872,8 @@
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i473" id="{81b13b5d-fba1-49fd-9a6b-189483ac548a}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="3">
|
||||
<emItem blockID="i66" id="youtubeer@youtuber.com">
|
||||
<versionRange minVersion="0" maxVersion="*">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
@ -1779,6 +1883,12 @@
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i742" id="{f894a29a-f065-40c3-bb19-da6057778493}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i437" id="{4933189D-C7F7-4C6E-834B-A29F087BFD23}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="3">
|
||||
@ -1805,6 +1915,12 @@
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i736" id="{c5e48979-bd7f-4cf7-9b73-2482a67a4f37}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i60" id="youtb3@youtb3.com">
|
||||
<versionRange minVersion="0" maxVersion="*">
|
||||
@ -1824,7 +1940,7 @@
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i510" id="{3c9a72a0-b849-40f3-8c84-219109c27554}">
|
||||
<emItem blockID="i724" id="{1cdbda58-45f8-4d91-b566-8edce18f8d0a}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="3">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
@ -1943,6 +2059,12 @@
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i467" id="plugin@analytic-s.com">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i380" id="{cc8f597b-0765-404e-a575-82aefbd81daf}">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="3">
|
||||
@ -2013,6 +2135,12 @@
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i752" id="savingsslider@mybrowserbar.com">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
</versionRange>
|
||||
<prefs>
|
||||
</prefs>
|
||||
</emItem>
|
||||
<emItem blockID="i314" id="crossriderapp8812@crossrider.com">
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1">
|
||||
|
@ -240,6 +240,11 @@
|
||||
label="&emailVideoCmd.label;"
|
||||
accesskey="&emailVideoCmd.accesskey;"
|
||||
oncommand="gContextMenu.sendMedia();"/>
|
||||
<menu id="context-castvideo"
|
||||
label="&castVideoCmd.label;"
|
||||
accesskey="&castVideoCmd.accesskey;">
|
||||
<menupopup id="context-castvideo-popup" onpopupshowing="gContextMenu.populateCastVideoMenu(this)"/>
|
||||
</menu>
|
||||
<menuitem id="context-sendaudio"
|
||||
label="&emailAudioCmd.label;"
|
||||
accesskey="&emailAudioCmd.accesskey;"
|
||||
|
@ -47,10 +47,6 @@ var tabPreviews = {
|
||||
},
|
||||
|
||||
capture: function tabPreviews_capture(aTab, aShouldCache) {
|
||||
// Bug 863512 - Make page thumbnails work in electrolysis
|
||||
if (gMultiProcessBrowser)
|
||||
return new Image();
|
||||
|
||||
let browser = aTab.linkedBrowser;
|
||||
let uri = browser.currentURI.spec;
|
||||
|
||||
@ -77,7 +73,7 @@ var tabPreviews = {
|
||||
aTab.__thumbnail_lastURI = uri;
|
||||
}
|
||||
|
||||
PageThumbs.captureToCanvas(aTab.linkedBrowser.contentWindow, canvas);
|
||||
PageThumbs.captureToCanvas(browser, canvas);
|
||||
return canvas;
|
||||
},
|
||||
|
||||
|
@ -33,10 +33,6 @@ let gBrowserThumbnails = {
|
||||
_tabEvents: ["TabClose", "TabSelect"],
|
||||
|
||||
init: function Thumbnails_init() {
|
||||
// Bug 863512 - Make page thumbnails work in electrolysis
|
||||
if (gMultiProcessBrowser)
|
||||
return;
|
||||
|
||||
PageThumbs.addExpirationFilter(this);
|
||||
gBrowser.addTabsProgressListener(this);
|
||||
Services.prefs.addObserver(this.PREF_DISK_CACHE_SSL, this, false);
|
||||
@ -52,10 +48,6 @@ let gBrowserThumbnails = {
|
||||
},
|
||||
|
||||
uninit: function Thumbnails_uninit() {
|
||||
// Bug 863512 - Make page thumbnails work in electrolysis
|
||||
if (gMultiProcessBrowser)
|
||||
return;
|
||||
|
||||
PageThumbs.removeExpirationFilter(this);
|
||||
gBrowser.removeTabsProgressListener(this);
|
||||
Services.prefs.removeObserver(this.PREF_DISK_CACHE_SSL, this);
|
||||
@ -125,10 +117,6 @@ let gBrowserThumbnails = {
|
||||
|
||||
// FIXME: This should be part of the PageThumbs API. (bug 1062414)
|
||||
_shouldCapture: function Thumbnails_shouldCapture(aBrowser) {
|
||||
// Don't try to capture in e10s yet (because of bug 698371)
|
||||
if (gMultiProcessBrowser)
|
||||
return false;
|
||||
|
||||
// Capture only if it's the currently selected tab.
|
||||
if (aBrowser != gBrowser.selectedBrowser)
|
||||
return false;
|
||||
@ -144,14 +132,18 @@ let gBrowserThumbnails = {
|
||||
if (doc instanceof SVGDocument || doc instanceof XMLDocument)
|
||||
return false;
|
||||
|
||||
// There's no point in taking screenshot of loading pages.
|
||||
if (aBrowser.docShell.busyFlags != Ci.nsIDocShell.BUSY_FLAGS_NONE)
|
||||
return false;
|
||||
|
||||
// Don't take screenshots of about: pages.
|
||||
if (aBrowser.currentURI.schemeIs("about"))
|
||||
return false;
|
||||
|
||||
// FIXME e10s work around, we need channel information. bug 1073957
|
||||
if (!aBrowser.docShell)
|
||||
return true;
|
||||
|
||||
// There's no point in taking screenshot of loading pages.
|
||||
if (aBrowser.docShell.busyFlags != Ci.nsIDocShell.BUSY_FLAGS_NONE)
|
||||
return false;
|
||||
|
||||
let channel = aBrowser.docShell.currentDocumentChannel;
|
||||
|
||||
// No valid document channel. We shouldn't take a screenshot.
|
||||
|
@ -188,6 +188,12 @@ XPCOMUtils.defineLazyModuleGetter(this, "FormValidationHandler",
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "UITour",
|
||||
"resource:///modules/UITour.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "CastingApps",
|
||||
"resource:///modules/CastingApps.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "SimpleServiceDiscovery",
|
||||
"resource://gre/modules/SimpleServiceDiscovery.jsm");
|
||||
|
||||
let gInitialPages = [
|
||||
"about:blank",
|
||||
"about:newtab",
|
||||
|
@ -208,9 +208,19 @@ nsContextMenu.prototype = {
|
||||
// Send media URL (but not for canvas, since it's a big data: URL)
|
||||
this.showItem("context-sendimage", this.onImage);
|
||||
this.showItem("context-sendvideo", this.onVideo);
|
||||
this.showItem("context-castvideo", this.onVideo);
|
||||
this.showItem("context-sendaudio", this.onAudio);
|
||||
this.setItemAttr("context-sendvideo", "disabled", !this.mediaURL);
|
||||
this.setItemAttr("context-sendaudio", "disabled", !this.mediaURL);
|
||||
// getServicesForVideo alone would be sufficient here (it depends on
|
||||
// SimpleServiceDiscovery.services), but SimpleServiceDiscovery is garanteed
|
||||
// to be already loaded, since we load it on startup, and CastingApps isn't,
|
||||
// so check SimpleServiceDiscovery.services first to avoid needing to load
|
||||
// CastingApps.jsm if we don't need to.
|
||||
let shouldShowCast = this.mediaURL &&
|
||||
SimpleServiceDiscovery.services.length > 0 &&
|
||||
CastingApps.getServicesForVideo(this.target).length > 0;
|
||||
this.setItemAttr("context-castvideo", "disabled", !shouldShowCast);
|
||||
},
|
||||
|
||||
initViewItems: function CM_initViewItems() {
|
||||
@ -1316,6 +1326,25 @@ nsContextMenu.prototype = {
|
||||
MailIntegration.sendMessage(this.mediaURL, "");
|
||||
},
|
||||
|
||||
castVideo: function() {
|
||||
CastingApps.openExternal(this.target, window);
|
||||
},
|
||||
|
||||
populateCastVideoMenu: function(popup) {
|
||||
let videoEl = this.target;
|
||||
popup.innerHTML = null;
|
||||
let doc = popup.ownerDocument;
|
||||
let services = CastingApps.getServicesForVideo(videoEl);
|
||||
services.forEach(service => {
|
||||
let item = doc.createElement("menuitem");
|
||||
item.setAttribute("label", service.friendlyName);
|
||||
item.addEventListener("command", event => {
|
||||
CastingApps.sendVideoToService(videoEl, service);
|
||||
});
|
||||
popup.appendChild(item);
|
||||
});
|
||||
},
|
||||
|
||||
playPlugin: function() {
|
||||
gPluginHandler.contextMenuCommand(this.browser, this.target, "play");
|
||||
},
|
||||
|
@ -707,7 +707,7 @@
|
||||
canvas.mozOpaque = true;
|
||||
canvas.width = 160 * scale;
|
||||
canvas.height = 90 * scale;
|
||||
PageThumbs.captureToCanvas(chatbox.contentWindow, canvas);
|
||||
PageThumbs.captureToCanvas(chatbox, canvas);
|
||||
dt.setDragImage(canvas, -16 * scale, -16 * scale);
|
||||
|
||||
event.stopPropagation();
|
||||
|
@ -4530,7 +4530,7 @@
|
||||
canvas.height = 90 * scale;
|
||||
if (!gMultiProcessBrowser) {
|
||||
// Bug 863512 - Make page thumbnails work in e10s
|
||||
PageThumbs.captureToCanvas(browser.contentWindow, canvas);
|
||||
PageThumbs.captureToCanvas(browser, canvas);
|
||||
}
|
||||
dt.setDragImage(canvas, -16 * scale, -16 * scale);
|
||||
|
||||
|
@ -174,7 +174,9 @@ function runTest(testNum) {
|
||||
"---", null,
|
||||
"context-savevideo", true,
|
||||
"context-video-saveimage", true,
|
||||
"context-sendvideo", true
|
||||
"context-sendvideo", true,
|
||||
"context-castvideo", null,
|
||||
[], null
|
||||
].concat(inspectItems));
|
||||
closeContextMenu();
|
||||
openContextMenuFor(audio_in_video); // Invoke context menu for next test.
|
||||
@ -218,7 +220,9 @@ function runTest(testNum) {
|
||||
"---", null,
|
||||
"context-savevideo", true,
|
||||
"context-video-saveimage", false,
|
||||
"context-sendvideo", true
|
||||
"context-sendvideo", true,
|
||||
"context-castvideo", null,
|
||||
[], null
|
||||
].concat(inspectItems));
|
||||
closeContextMenu();
|
||||
openContextMenuFor(video_bad2); // Invoke context menu for next test.
|
||||
@ -242,7 +246,9 @@ function runTest(testNum) {
|
||||
"---", null,
|
||||
"context-savevideo", false,
|
||||
"context-video-saveimage", false,
|
||||
"context-sendvideo", false
|
||||
"context-sendvideo", false,
|
||||
"context-castvideo", null,
|
||||
[], null
|
||||
].concat(inspectItems));
|
||||
closeContextMenu();
|
||||
openContextMenuFor(iframe); // Invoke context menu for next test.
|
||||
@ -301,6 +307,8 @@ function runTest(testNum) {
|
||||
"context-savevideo", true,
|
||||
"context-video-saveimage", true,
|
||||
"context-sendvideo", true,
|
||||
"context-castvideo", null,
|
||||
[], null,
|
||||
"frame", null,
|
||||
["context-showonlythisframe", true,
|
||||
"context-openframeintab", true,
|
||||
|
@ -924,7 +924,7 @@ const CustomizableWidgets = [
|
||||
id: "loop-call-button",
|
||||
type: "custom",
|
||||
label: "loop-call-button3.label",
|
||||
tooltiptext: "loop-call-button2.tooltiptext",
|
||||
tooltiptext: "loop-call-button3.tooltiptext",
|
||||
defaultArea: CustomizableUI.AREA_NAVBAR,
|
||||
introducedInVersion: 1,
|
||||
onBuild: function(aDocument) {
|
||||
|
@ -99,6 +99,9 @@ XPCOMUtils.defineLazyModuleGetter(this, "AsyncShutdown",
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "LoginManagerParent",
|
||||
"resource://gre/modules/LoginManagerParent.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "SimpleServiceDiscovery",
|
||||
"resource://gre/modules/SimpleServiceDiscovery.jsm");
|
||||
|
||||
#ifdef NIGHTLY_BUILD
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "SignInToWebsiteUX",
|
||||
"resource:///modules/SignInToWebsite.jsm");
|
||||
@ -747,8 +750,30 @@ BrowserGlue.prototype = {
|
||||
FormValidationHandler.uninit();
|
||||
},
|
||||
|
||||
_initServiceDiscovery: function () {
|
||||
var rokuDevice = {
|
||||
id: "roku:ecp",
|
||||
target: "roku:ecp",
|
||||
factory: function(aService) {
|
||||
Cu.import("resource://gre/modules/RokuApp.jsm");
|
||||
return new RokuApp(aService);
|
||||
},
|
||||
mirror: false,
|
||||
types: ["video/mp4"],
|
||||
extensions: ["mp4"]
|
||||
};
|
||||
|
||||
// Register targets
|
||||
SimpleServiceDiscovery.registerDevice(rokuDevice);
|
||||
|
||||
// Search for devices continuously every 120 seconds
|
||||
SimpleServiceDiscovery.search(120 * 1000);
|
||||
},
|
||||
|
||||
// All initial windows have opened.
|
||||
_onWindowsRestored: function BG__onWindowsRestored() {
|
||||
this._initServiceDiscovery();
|
||||
|
||||
// Show update notification, if needed.
|
||||
if (Services.prefs.prefHasUserValue("app.update.postupdate"))
|
||||
this._showUpdateNotification();
|
||||
@ -1344,7 +1369,7 @@ BrowserGlue.prototype = {
|
||||
},
|
||||
|
||||
_migrateUI: function BG__migrateUI() {
|
||||
const UI_VERSION = 23;
|
||||
const UI_VERSION = 24;
|
||||
const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
|
||||
let currentUIVersion = 0;
|
||||
try {
|
||||
@ -1422,15 +1447,6 @@ BrowserGlue.prototype = {
|
||||
}
|
||||
}
|
||||
|
||||
if (currentUIVersion < 8) {
|
||||
// Reset homepage pref for users who have it set to google.com/firefox
|
||||
let uri = Services.prefs.getComplexValue("browser.startup.homepage",
|
||||
Ci.nsIPrefLocalizedString).data;
|
||||
if (uri && /^https?:\/\/(www\.)?google(\.\w{2,3}){1,2}\/firefox\/?$/.test(uri)) {
|
||||
Services.prefs.clearUserPref("browser.startup.homepage");
|
||||
}
|
||||
}
|
||||
|
||||
if (currentUIVersion < 9) {
|
||||
// This code adds the customizable downloads buttons.
|
||||
let currentset = xulStore.getValue(BROWSER_DOCURL, "nav-bar", "currentset");
|
||||
@ -1495,10 +1511,6 @@ BrowserGlue.prototype = {
|
||||
}
|
||||
}
|
||||
|
||||
if (currentUIVersion < 13) {
|
||||
/* Obsolete */
|
||||
}
|
||||
|
||||
if (currentUIVersion < 14) {
|
||||
// DOM Storage doesn't specially handle about: pages anymore.
|
||||
let path = OS.Path.join(OS.Constants.Path.profileDir,
|
||||
@ -1593,6 +1605,18 @@ BrowserGlue.prototype = {
|
||||
}
|
||||
}
|
||||
|
||||
if (currentUIVersion < 24) {
|
||||
// Reset homepage pref for users who have it set to start.mozilla.org
|
||||
// or google.com/firefox.
|
||||
const HOMEPAGE_PREF = "browser.startup.homepage";
|
||||
let uri = Services.prefs.getComplexValue(HOMEPAGE_PREF,
|
||||
Ci.nsIPrefLocalizedString).data;
|
||||
if (uri && (uri.startsWith("http://start.mozilla.org") ||
|
||||
/^https?:\/\/(www\.)?google\.[a-z.]+\/firefox/i.test(uri))) {
|
||||
Services.prefs.clearUserPref(HOMEPAGE_PREF);
|
||||
}
|
||||
}
|
||||
|
||||
// Update the migration version.
|
||||
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
|
||||
},
|
||||
|
@ -313,6 +313,11 @@ nsGNOMEShellService::SetDefaultBrowser(bool aClaimAllTypes,
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
if (prefs) {
|
||||
(void) prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, true);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -326,29 +331,25 @@ nsGNOMEShellService::GetShouldCheckDefaultBrowser(bool* aResult)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPrefBranch> prefs;
|
||||
nsCOMPtr<nsIPrefService> pserve(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
if (pserve)
|
||||
pserve->GetBranch("", getter_AddRefs(prefs));
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
if (prefs)
|
||||
prefs->GetBoolPref(PREF_CHECKDEFAULTBROWSER, aResult);
|
||||
|
||||
return NS_OK;
|
||||
return prefs->GetBoolPref(PREF_CHECKDEFAULTBROWSER, aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGNOMEShellService::SetShouldCheckDefaultBrowser(bool aShouldCheck)
|
||||
{
|
||||
nsCOMPtr<nsIPrefBranch> prefs;
|
||||
nsCOMPtr<nsIPrefService> pserve(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
if (pserve)
|
||||
pserve->GetBranch("", getter_AddRefs(prefs));
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
if (prefs)
|
||||
prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, aShouldCheck);
|
||||
|
||||
return NS_OK;
|
||||
return prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, aShouldCheck);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -90,7 +90,12 @@ nsMacShellService::SetDefaultBrowser(bool aClaimAllTypes, bool aForAllUsers)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
if (prefs) {
|
||||
(void) prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, true);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -104,27 +109,25 @@ nsMacShellService::GetShouldCheckDefaultBrowser(bool* aResult)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPrefBranch> prefs;
|
||||
nsCOMPtr<nsIPrefService> pserve(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
if (pserve)
|
||||
pserve->GetBranch("", getter_AddRefs(prefs));
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
prefs->GetBoolPref(PREF_CHECKDEFAULTBROWSER, aResult);
|
||||
|
||||
return NS_OK;
|
||||
return prefs->GetBoolPref(PREF_CHECKDEFAULTBROWSER, aResult);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsMacShellService::SetShouldCheckDefaultBrowser(bool aShouldCheck)
|
||||
{
|
||||
nsCOMPtr<nsIPrefBranch> prefs;
|
||||
nsCOMPtr<nsIPrefService> pserve(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
if (pserve)
|
||||
pserve->GetBranch("", getter_AddRefs(prefs));
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, aShouldCheck);
|
||||
|
||||
return NS_OK;
|
||||
return prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, aShouldCheck);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -275,20 +275,15 @@ nsWindowsShellService::ShortcutMaintenance()
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
NS_NAMED_LITERAL_CSTRING(prefName, "browser.taskbar.lastgroupid");
|
||||
nsCOMPtr<nsIPrefService> prefs =
|
||||
nsCOMPtr<nsIPrefBranch> prefs =
|
||||
do_GetService(NS_PREFSERVICE_CONTRACTID);
|
||||
if (!prefs)
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
nsCOMPtr<nsIPrefBranch> prefBranch;
|
||||
prefs->GetBranch(nullptr, getter_AddRefs(prefBranch));
|
||||
if (!prefBranch)
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
nsCOMPtr<nsISupportsString> prefString;
|
||||
rv = prefBranch->GetComplexValue(prefName.get(),
|
||||
NS_GET_IID(nsISupportsString),
|
||||
getter_AddRefs(prefString));
|
||||
rv = prefs->GetComplexValue(prefName.get(),
|
||||
NS_GET_IID(nsISupportsString),
|
||||
getter_AddRefs(prefString));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
nsAutoString version;
|
||||
prefString->GetData(version);
|
||||
@ -304,9 +299,9 @@ nsWindowsShellService::ShortcutMaintenance()
|
||||
return rv;
|
||||
|
||||
prefString->SetData(appId);
|
||||
rv = prefBranch->SetComplexValue(prefName.get(),
|
||||
NS_GET_IID(nsISupportsString),
|
||||
prefString);
|
||||
rv = prefs->SetComplexValue(prefName.get(),
|
||||
NS_GET_IID(nsISupportsString),
|
||||
prefString);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Couldn't set last user model id!");
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
@ -707,6 +702,11 @@ nsWindowsShellService::SetDefaultBrowser(bool aClaimAllTypes, bool aForAllUsers)
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID));
|
||||
if (prefs) {
|
||||
(void) prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, true);
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
@ -722,13 +722,11 @@ nsWindowsShellService::GetShouldCheckDefaultBrowser(bool* aResult)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPrefBranch> prefs;
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIPrefService> pserve(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = pserve->GetBranch("", getter_AddRefs(prefs));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
return prefs->GetBoolPref(PREF_CHECKDEFAULTBROWSER, aResult);
|
||||
}
|
||||
@ -736,14 +734,11 @@ nsWindowsShellService::GetShouldCheckDefaultBrowser(bool* aResult)
|
||||
NS_IMETHODIMP
|
||||
nsWindowsShellService::SetShouldCheckDefaultBrowser(bool aShouldCheck)
|
||||
{
|
||||
nsCOMPtr<nsIPrefBranch> prefs;
|
||||
nsresult rv;
|
||||
|
||||
nsCOMPtr<nsIPrefService> pserve(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = pserve->GetBranch("", getter_AddRefs(prefs));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsCOMPtr<nsIPrefBranch> prefs(do_GetService(NS_PREFSERVICE_CONTRACTID, &rv));
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
return prefs->SetBoolPref(PREF_CHECKDEFAULTBROWSER, aShouldCheck);
|
||||
}
|
||||
|
@ -1383,15 +1383,9 @@ TabCanvas.prototype = Utils.extend(new Subscribable(), {
|
||||
if (!w || !h)
|
||||
return;
|
||||
|
||||
if (!this.tab.linkedBrowser.contentWindow) {
|
||||
Utils.log('no tab.linkedBrowser.contentWindow in TabCanvas.paint()');
|
||||
return;
|
||||
}
|
||||
|
||||
let win = this.tab.linkedBrowser.contentWindow;
|
||||
gPageThumbnails.captureToCanvas(win, this.canvas);
|
||||
|
||||
this._sendToSubscribers("painted");
|
||||
gPageThumbnails.captureToCanvas(this.tab.linkedBrowser, this.canvas, () => {
|
||||
this._sendToSubscribers("painted");
|
||||
});
|
||||
},
|
||||
|
||||
// ----------
|
||||
|
@ -29,7 +29,7 @@ let test = Task.async(function*() {
|
||||
let selection = TimelineView.overview.getSelection();
|
||||
|
||||
is((selection.start) | 0,
|
||||
(markers[0].start * TimelineView.overview.dataScaleX) | 0,
|
||||
((markers[0].start - markers.startTime) * TimelineView.overview.dataScaleX) | 0,
|
||||
"The initial selection start is correct.");
|
||||
|
||||
is((selection.end - selection.start) | 0,
|
||||
|
@ -107,13 +107,19 @@ let TimelineController = {
|
||||
* Starts the recording, updating the UI as needed.
|
||||
*/
|
||||
_startRecording: function*() {
|
||||
this._markers = [];
|
||||
this._markers.startTime = performance.now();
|
||||
this._markers.endTime = performance.now();
|
||||
this._updateId = setInterval(this._onRecordingTick, OVERVIEW_UPDATE_INTERVAL);
|
||||
|
||||
TimelineView.handleRecordingStarted();
|
||||
yield gFront.start();
|
||||
let startTime = yield gFront.start();
|
||||
// Times must come from the actor in order to be self-consistent.
|
||||
// However, we also want to update the view with the elapsed time
|
||||
// even when the actor is not generating data. To do this we get
|
||||
// the local time and use it to compute a reasonable elapsed time.
|
||||
// See _onRecordingTick.
|
||||
this._localStartTime = performance.now();
|
||||
|
||||
this._markers = [];
|
||||
this._markers.startTime = startTime;
|
||||
this._markers.endTime = startTime;
|
||||
this._updateId = setInterval(this._onRecordingTick, OVERVIEW_UPDATE_INTERVAL);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -142,9 +148,12 @@ let TimelineController = {
|
||||
* @param array markers
|
||||
* A list of new markers collected since the last time this
|
||||
* function was invoked.
|
||||
* @param number endTime
|
||||
* A time after the last marker in markers was collected.
|
||||
*/
|
||||
_onMarkers: function(markers) {
|
||||
_onMarkers: function(markers, endTime) {
|
||||
Array.prototype.push.apply(this._markers, markers);
|
||||
this._markers.endTime = endTime;
|
||||
},
|
||||
|
||||
/**
|
||||
@ -152,7 +161,13 @@ let TimelineController = {
|
||||
* Updates the markers store with the current time and the timeline overview.
|
||||
*/
|
||||
_onRecordingTick: function() {
|
||||
this._markers.endTime = performance.now();
|
||||
// Compute an approximate ending time for the view. This is
|
||||
// needed to ensure that the view updates even when new data is
|
||||
// not being generated.
|
||||
let fakeTime = this._markers.startTime + (performance.now() - this._localStartTime);
|
||||
if (fakeTime > this._markers.endTime) {
|
||||
this._markers.endTime = fakeTime;
|
||||
}
|
||||
TimelineView.handleMarkersUpdate(this._markers);
|
||||
}
|
||||
};
|
||||
@ -214,12 +229,12 @@ let TimelineView = {
|
||||
|
||||
let markers = TimelineController.getMarkers();
|
||||
if (markers.length) {
|
||||
let start = markers[0].start * this.overview.dataScaleX;
|
||||
let start = (markers[0].start - markers.startTime) * this.overview.dataScaleX;
|
||||
let end = start + this.overview.width * OVERVIEW_INITIAL_SELECTION_RATIO;
|
||||
this.overview.setSelection({ start, end });
|
||||
} else {
|
||||
let duration = markers.endTime - markers.startTime;
|
||||
this.waterfall.setData(markers, 0, duration);
|
||||
this.waterfall.setData(markers, markers.startTime, markers.endTime);
|
||||
}
|
||||
|
||||
window.emit(EVENTS.RECORDING_ENDED);
|
||||
@ -251,8 +266,8 @@ let TimelineView = {
|
||||
let end = selection.end / this.overview.dataScaleX;
|
||||
|
||||
let markers = TimelineController.getMarkers();
|
||||
let timeStart = Math.min(start, end);
|
||||
let timeEnd = Math.max(start, end);
|
||||
let timeStart = markers.startTime + Math.min(start, end);
|
||||
let timeEnd = markers.startTime + Math.max(start, end);
|
||||
this.waterfall.setData(markers, timeStart, timeEnd);
|
||||
},
|
||||
|
||||
|
@ -170,6 +170,9 @@ Overview.prototype = Heritage.extend(AbstractCanvasGraph.prototype, {
|
||||
ctx.beginPath();
|
||||
|
||||
for (let { start, end } of batch) {
|
||||
start -= this._data.startTime;
|
||||
end -= this._data.startTime;
|
||||
|
||||
let left = start * dataScale;
|
||||
let duration = Math.max(end - start, OVERVIEW_MARKER_DURATION_MIN);
|
||||
let width = Math.max(duration * dataScale, this._pixelRatio);
|
||||
|
@ -76,16 +76,17 @@ Waterfall.prototype = {
|
||||
* @param array markers
|
||||
* A list of markers received from the controller.
|
||||
* @param number timeStart
|
||||
* The delta time (in milliseconds) to start drawing from.
|
||||
* The time (in milliseconds) to start drawing from.
|
||||
* @param number timeEnd
|
||||
* The delta time (in milliseconds) to end drawing at.
|
||||
* The time (in milliseconds) to end drawing at.
|
||||
*/
|
||||
setData: function(markers, timeStart, timeEnd) {
|
||||
this.clearView();
|
||||
|
||||
let dataScale = this._waterfallWidth / (timeEnd - timeStart);
|
||||
this._drawWaterfallBackground(dataScale);
|
||||
this._buildHeader(this._headerContents, timeStart, dataScale);
|
||||
// Label the header as if the first possible marker was at T=0.
|
||||
this._buildHeader(this._headerContents, timeStart - markers.startTime, dataScale);
|
||||
this._buildMarkers(this._listContents, markers, timeStart, timeEnd, dataScale);
|
||||
},
|
||||
|
||||
|
@ -23,6 +23,7 @@ support-files =
|
||||
[browser_audionode-actor-is-source.js]
|
||||
[browser_audionode-actor-bypass.js]
|
||||
[browser_audionode-actor-connectnode-disconnect.js]
|
||||
[browser_audionode-actor-connectparam.js]
|
||||
[browser_webaudio-actor-simple.js]
|
||||
[browser_webaudio-actor-destroy-node.js]
|
||||
[browser_webaudio-actor-connect-param.js]
|
||||
|
@ -0,0 +1,35 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
/**
|
||||
* Tests that AudioNodeActor#connectParam() work.
|
||||
* Uses the editor front as the actors do not retain connect state.
|
||||
*/
|
||||
|
||||
function spawnTest() {
|
||||
let { target, panel } = yield initWebAudioEditor(SIMPLE_CONTEXT_URL);
|
||||
let { panelWin } = panel;
|
||||
let { gFront, $, $$, EVENTS, gAudioNodes } = panelWin;
|
||||
|
||||
reload(target);
|
||||
|
||||
let [actors] = yield Promise.all([
|
||||
get3(gFront, "create-node"),
|
||||
waitForGraphRendered(panelWin, 3, 2)
|
||||
]);
|
||||
|
||||
let [dest, osc, gain] = actors;
|
||||
|
||||
yield osc.disconnect();
|
||||
|
||||
osc.connectParam(gain, "gain");
|
||||
yield Promise.all([
|
||||
waitForGraphRendered(panelWin, 3, 1, 1),
|
||||
once(gAudioNodes, "connect")
|
||||
]);
|
||||
ok(true, "Oscillator connect to Gain's Gain AudioParam, event emitted.");
|
||||
|
||||
yield teardown(panel);
|
||||
finish();
|
||||
}
|
||||
|
@ -30,13 +30,14 @@ function CloseUI() {
|
||||
}
|
||||
|
||||
function BuildUI(addons) {
|
||||
BuildItem(addons.adb, true /* is adb */);
|
||||
BuildItem(addons.adb, "adb");
|
||||
BuildItem(addons.adapters, "adapters");
|
||||
for (let addon of addons.simulators) {
|
||||
BuildItem(addon, false /* is adb */);
|
||||
BuildItem(addon, "simulator");
|
||||
}
|
||||
}
|
||||
|
||||
function BuildItem(addon, isADB) {
|
||||
function BuildItem(addon, type) {
|
||||
|
||||
function onAddonUpdate(event, arg) {
|
||||
switch (event) {
|
||||
@ -73,20 +74,29 @@ function BuildItem(addon, isADB) {
|
||||
let li = document.createElement("li");
|
||||
li.setAttribute("status", addon.status);
|
||||
|
||||
// Used in tests
|
||||
if (isADB) {
|
||||
li.setAttribute("addon", "adb");
|
||||
} else {
|
||||
li.setAttribute("addon", "simulator-" + addon.version);
|
||||
}
|
||||
|
||||
let name = document.createElement("span");
|
||||
name.className = "name";
|
||||
if (isADB) {
|
||||
name.textContent = Strings.GetStringFromName("addons_adb_label");
|
||||
} else {
|
||||
let stability = Strings.GetStringFromName("addons_" + addon.stability);
|
||||
name.textContent = Strings.formatStringFromName("addons_simulator_label", [addon.version, stability], 2);
|
||||
|
||||
switch (type) {
|
||||
case "adb":
|
||||
li.setAttribute("addon", type);
|
||||
name.textContent = Strings.GetStringFromName("addons_adb_label");
|
||||
break;
|
||||
case "adapters":
|
||||
li.setAttribute("addon", type);
|
||||
try {
|
||||
name.textContent = Strings.GetStringFromName("addons_adapters_label");
|
||||
} catch(e) {
|
||||
// This code (bug 1081093) will be backported to Aurora, which doesn't
|
||||
// contain this string.
|
||||
name.textContent = "Tools Adapters Add-on";
|
||||
}
|
||||
break;
|
||||
case "simulator":
|
||||
li.setAttribute("addon", "simulator-" + addon.version);
|
||||
let stability = Strings.GetStringFromName("addons_" + addon.stability);
|
||||
name.textContent = Strings.formatStringFromName("addons_simulator_label", [addon.version, stability], 2);
|
||||
break;
|
||||
}
|
||||
|
||||
li.appendChild(name);
|
||||
@ -111,7 +121,7 @@ function BuildItem(addon, isADB) {
|
||||
let progress = document.createElement("progress");
|
||||
li.appendChild(progress);
|
||||
|
||||
if (isADB) {
|
||||
if (type == "adb") {
|
||||
let warning = document.createElement("p");
|
||||
warning.textContent = Strings.GetStringFromName("addons_adb_warning");
|
||||
warning.className = "warning";
|
||||
|
@ -69,15 +69,22 @@ let UI = {
|
||||
this.autoSelectProject();
|
||||
});
|
||||
|
||||
// Auto install the ADB Addon Helper. Only once.
|
||||
// If the user decides to uninstall the addon, we won't install it again.
|
||||
let autoInstallADBHelper = Services.prefs.getBoolPref("devtools.webide.autoinstallADBHelper");
|
||||
if (autoInstallADBHelper && !Devices.helperAddonInstalled) {
|
||||
// Auto install the ADB Addon Helper and Tools Adapters. Only once.
|
||||
// If the user decides to uninstall any of this addon, we won't install it again.
|
||||
let autoinstallADBHelper = Services.prefs.getBoolPref("devtools.webide.autoinstallADBHelper");
|
||||
let autoinstallFxdtAdapters = Services.prefs.getBoolPref("devtools.webide.autoinstallFxdtAdapters");
|
||||
if (autoinstallADBHelper) {
|
||||
GetAvailableAddons().then(addons => {
|
||||
addons.adb.install();
|
||||
}, console.error);
|
||||
}
|
||||
if (autoinstallFxdtAdapters) {
|
||||
GetAvailableAddons().then(addons => {
|
||||
addons.adapters.install();
|
||||
}, console.error);
|
||||
}
|
||||
Services.prefs.setBoolPref("devtools.webide.autoinstallADBHelper", false);
|
||||
Services.prefs.setBoolPref("devtools.webide.autoinstallFxdtAdapters", false);
|
||||
|
||||
this.lastConnectedRuntime = Services.prefs.getCharPref("devtools.webide.lastConnectedRuntime");
|
||||
|
||||
|
@ -13,8 +13,10 @@ const {GetAddonsJSON} = require("devtools/webide/remote-resources");
|
||||
|
||||
let SIMULATOR_LINK = Services.prefs.getCharPref("devtools.webide.simulatorAddonsURL");
|
||||
let ADB_LINK = Services.prefs.getCharPref("devtools.webide.adbAddonURL");
|
||||
let ADAPTERS_LINK = Services.prefs.getCharPref("devtools.webide.adaptersAddonURL");
|
||||
let SIMULATOR_ADDON_ID = Services.prefs.getCharPref("devtools.webide.simulatorAddonID");
|
||||
let ADB_ADDON_ID = Services.prefs.getCharPref("devtools.webide.adbAddonID");
|
||||
let ADAPTERS_ADDON_ID = Services.prefs.getCharPref("devtools.webide.adaptersAddonID");
|
||||
|
||||
let platform = Services.appShell.hiddenDOMWindow.navigator.platform;
|
||||
let OS = "";
|
||||
@ -26,36 +28,24 @@ if (platform.indexOf("Win") != -1) {
|
||||
if (platform.indexOf("x86_64") != -1) {
|
||||
OS = "linux64";
|
||||
} else {
|
||||
OS = "linux";
|
||||
OS = "linux32";
|
||||
}
|
||||
}
|
||||
|
||||
Simulator.on("unregister", updateSimulatorAddons);
|
||||
Simulator.on("register", updateSimulatorAddons);
|
||||
Devices.on("addon-status-updated", updateAdbAddon);
|
||||
|
||||
function updateSimulatorAddons(event, version) {
|
||||
let addonsListener = {};
|
||||
addonsListener.onEnabled =
|
||||
addonsListener.onDisabled =
|
||||
addonsListener.onInstalled =
|
||||
addonsListener.onUninstalled = (updatedAddon) => {
|
||||
GetAvailableAddons().then(addons => {
|
||||
let foundAddon = null;
|
||||
for (let addon of addons.simulators) {
|
||||
if (addon.version == version) {
|
||||
foundAddon = addon;
|
||||
break;
|
||||
for (let a of [...addons.simulators, addons.adb, addons.adapters]) {
|
||||
if (a.addonID == updatedAddon.id) {
|
||||
a.updateInstallStatus();
|
||||
}
|
||||
}
|
||||
if (!foundAddon) {
|
||||
console.warn("An unknown simulator (un)registered", version);
|
||||
return;
|
||||
}
|
||||
foundAddon.updateInstallStatus();
|
||||
});
|
||||
}
|
||||
|
||||
function updateAdbAddon() {
|
||||
GetAvailableAddons().then(addons => {
|
||||
addons.adb.updateInstallStatus();
|
||||
});
|
||||
}
|
||||
AddonManager.addAddonListener(addonsListener);
|
||||
|
||||
let GetAvailableAddons_promise = null;
|
||||
let GetAvailableAddons = exports.GetAvailableAddons = function() {
|
||||
@ -73,6 +63,7 @@ let GetAvailableAddons = exports.GetAvailableAddons = function() {
|
||||
}
|
||||
}
|
||||
addons.adb = new ADBAddon();
|
||||
addons.adapters = new AdaptersAddon();
|
||||
deferred.resolve(addons);
|
||||
}, e => {
|
||||
GetAvailableAddons_promise = null;
|
||||
@ -99,13 +90,23 @@ Addon.prototype = {
|
||||
return this._status;
|
||||
},
|
||||
|
||||
install: function() {
|
||||
if (this.status != "uninstalled") {
|
||||
throw new Error("Not uninstalled");
|
||||
}
|
||||
this.status = "preparing";
|
||||
|
||||
updateInstallStatus: function() {
|
||||
AddonManager.getAddonByID(this.addonID, (addon) => {
|
||||
if (addon && !addon.userDisabled) {
|
||||
this.status = "installed";
|
||||
} else {
|
||||
this.status = "uninstalled";
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
install: function() {
|
||||
AddonManager.getAddonByID(this.addonID, (addon) => {
|
||||
if (addon && !addon.userDisabled) {
|
||||
this.status = "installed";
|
||||
return;
|
||||
}
|
||||
this.status = "preparing";
|
||||
if (addon && addon.userDisabled) {
|
||||
addon.userDisabled = false;
|
||||
} else {
|
||||
@ -115,7 +116,6 @@ Addon.prototype = {
|
||||
}, "application/x-xpinstall");
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
uninstall: function() {
|
||||
@ -167,44 +167,30 @@ function SimulatorAddon(stability, version) {
|
||||
EventEmitter.decorate(this);
|
||||
this.stability = stability;
|
||||
this.version = version;
|
||||
this.xpiLink = SIMULATOR_LINK.replace(/#OS#/g, OS)
|
||||
// This addon uses the string "linux" for "linux32"
|
||||
let fixedOS = OS == "linux32" ? "linux" : OS;
|
||||
this.xpiLink = SIMULATOR_LINK.replace(/#OS#/g, fixedOS)
|
||||
.replace(/#VERSION#/g, version)
|
||||
.replace(/#SLASHED_VERSION#/g, version.replace(/\./g, "_"));
|
||||
this.addonID = SIMULATOR_ADDON_ID.replace(/#SLASHED_VERSION#/g, version.replace(/\./g, "_"));
|
||||
this.updateInstallStatus();
|
||||
}
|
||||
|
||||
SimulatorAddon.prototype = Object.create(Addon.prototype, {
|
||||
updateInstallStatus: {
|
||||
enumerable: true,
|
||||
value: function() {
|
||||
let sim = Simulator.getByVersion(this.version);
|
||||
if (sim) {
|
||||
this.status = "installed";
|
||||
} else {
|
||||
this.status = "uninstalled";
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
SimulatorAddon.prototype = Object.create(Addon.prototype);
|
||||
|
||||
function ADBAddon() {
|
||||
EventEmitter.decorate(this);
|
||||
this.xpiLink = ADB_LINK.replace(/#OS#/g, OS);
|
||||
// This addon uses the string "linux" for "linux32"
|
||||
let fixedOS = OS == "linux32" ? "linux" : OS;
|
||||
this.xpiLink = ADB_LINK.replace(/#OS#/g, fixedOS);
|
||||
this.addonID = ADB_ADDON_ID;
|
||||
this.updateInstallStatus();
|
||||
}
|
||||
ADBAddon.prototype = Object.create(Addon.prototype);
|
||||
|
||||
ADBAddon.prototype = Object.create(Addon.prototype, {
|
||||
updateInstallStatus: {
|
||||
enumerable: true,
|
||||
value: function() {
|
||||
if (Devices.helperAddonInstalled) {
|
||||
this.status = "installed";
|
||||
} else {
|
||||
this.status = "uninstalled";
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
function AdaptersAddon() {
|
||||
EventEmitter.decorate(this);
|
||||
this.xpiLink = ADAPTERS_LINK.replace(/#OS#/g, OS);
|
||||
this.addonID = ADAPTERS_ADDON_ID;
|
||||
this.updateInstallStatus();
|
||||
}
|
||||
AdaptersAddon.prototype = Object.create(Addon.prototype);
|
||||
|
BIN
browser/devtools/webide/test/addons/fxdt-adapters-linux32.xpi
Normal file
BIN
browser/devtools/webide/test/addons/fxdt-adapters-linux32.xpi
Normal file
Binary file not shown.
BIN
browser/devtools/webide/test/addons/fxdt-adapters-linux64.xpi
Normal file
BIN
browser/devtools/webide/test/addons/fxdt-adapters-linux64.xpi
Normal file
Binary file not shown.
BIN
browser/devtools/webide/test/addons/fxdt-adapters-mac64.xpi
Normal file
BIN
browser/devtools/webide/test/addons/fxdt-adapters-mac64.xpi
Normal file
Binary file not shown.
BIN
browser/devtools/webide/test/addons/fxdt-adapters-win32.xpi
Normal file
BIN
browser/devtools/webide/test/addons/fxdt-adapters-win32.xpi
Normal file
Binary file not shown.
@ -20,6 +20,10 @@ support-files =
|
||||
addons/adbhelper-linux64.xpi
|
||||
addons/adbhelper-win32.xpi
|
||||
addons/adbhelper-mac64.xpi
|
||||
addons/fxdt-adapters-linux32.xpi
|
||||
addons/fxdt-adapters-linux64.xpi
|
||||
addons/fxdt-adapters-win32.xpi
|
||||
addons/fxdt-adapters-mac64.xpi
|
||||
head.js
|
||||
hosted_app.manifest
|
||||
templates.json
|
||||
|
@ -27,25 +27,22 @@ Services.prefs.setBoolPref("devtools.webide.enableLocalRuntime", true);
|
||||
Services.prefs.setCharPref("devtools.webide.addonsURL", TEST_BASE + "addons/simulators.json");
|
||||
Services.prefs.setCharPref("devtools.webide.simulatorAddonsURL", TEST_BASE + "addons/fxos_#SLASHED_VERSION#_simulator-#OS#.xpi");
|
||||
Services.prefs.setCharPref("devtools.webide.adbAddonURL", TEST_BASE + "addons/adbhelper-#OS#.xpi");
|
||||
Services.prefs.setCharPref("devtools.webide.adaptersAddonURL", TEST_BASE + "addons/fxdt-adapters-#OS#.xpi");
|
||||
Services.prefs.setCharPref("devtools.webide.templatesURL", TEST_BASE + "templates.json");
|
||||
|
||||
|
||||
SimpleTest.registerCleanupFunction(() => {
|
||||
Services.prefs.clearUserPref("devtools.webide.templatesURL");
|
||||
Services.prefs.clearUserPref("devtools.webide.enabled");
|
||||
Services.prefs.clearUserPref("devtools.webide.enableLocalRuntime");
|
||||
Services.prefs.clearUserPref("devtools.webide.addonsURL");
|
||||
Services.prefs.clearUserPref("devtools.webide.simulatorAddonsURL");
|
||||
Services.prefs.clearUserPref("devtools.webide.adbAddonURL");
|
||||
Services.prefs.clearUserPref("devtools.webide.autoInstallADBHelper", false);
|
||||
Services.prefs.clearUserPref("devtools.webide.autoinstallADBHelper");
|
||||
Services.prefs.clearUserPref("devtools.webide.autoinstallFxdtAdapters");
|
||||
});
|
||||
|
||||
function openWebIDE(autoInstallADBHelper) {
|
||||
function openWebIDE(autoInstallAddons) {
|
||||
info("opening WebIDE");
|
||||
|
||||
if (!autoInstallADBHelper) {
|
||||
Services.prefs.setBoolPref("devtools.webide.autoinstallADBHelper", false);
|
||||
}
|
||||
Services.prefs.setBoolPref("devtools.webide.autoinstallADBHelper", !!autoInstallAddons);
|
||||
Services.prefs.setBoolPref("devtools.webide.autoinstallFxdtAdapters", !!autoInstallAddons);
|
||||
|
||||
let deferred = promise.defer();
|
||||
|
||||
|
@ -109,10 +109,10 @@
|
||||
let lis;
|
||||
|
||||
lis = addonDoc.querySelectorAll("li");
|
||||
is(lis.length, 4, "4 addons listed");
|
||||
is(lis.length, 5, "5 addons listed");
|
||||
|
||||
lis = addonDoc.querySelectorAll('li[status="installed"]');
|
||||
is(lis.length, 2, "2 addons installed");
|
||||
is(lis.length, 3, "3 addons installed");
|
||||
|
||||
lis = addonDoc.querySelectorAll('li[status="uninstalled"]');
|
||||
is(lis.length, 2, "2 addons uninstalled");
|
||||
|
@ -6,6 +6,7 @@
|
||||
pref("devtools.webide.showProjectEditor", true);
|
||||
pref("devtools.webide.templatesURL", "https://code.cdn.mozilla.net/templates/list.json");
|
||||
pref("devtools.webide.autoinstallADBHelper", true);
|
||||
pref("devtools.webide.autoinstallFxdtAdapters", false);
|
||||
pref("devtools.webide.restoreLastProject", true);
|
||||
pref("devtools.webide.enableLocalRuntime", true);
|
||||
pref("devtools.webide.addonsURL", "https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/index.json");
|
||||
@ -13,6 +14,8 @@ pref("devtools.webide.simulatorAddonsURL", "https://ftp.mozilla.org/pub/mozilla.
|
||||
pref("devtools.webide.simulatorAddonID", "fxos_#SLASHED_VERSION#_simulator@mozilla.org");
|
||||
pref("devtools.webide.adbAddonURL", "https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/adb-helper/#OS#/adbhelper-#OS#-latest.xpi");
|
||||
pref("devtools.webide.adbAddonID", "adbhelper@mozilla.org");
|
||||
pref("devtools.webide.adaptersAddonURL", "https://ftp.mozilla.org/pub/mozilla.org/labs/fxdt-adapters/#OS#/fxdt-adapters-#OS#-latest.xpi");
|
||||
pref("devtools.webide.adaptersAddonID", "fxdevtools-adapters@mozilla.org");
|
||||
pref("devtools.webide.monitorWebSocketURL", "ws://localhost:9000");
|
||||
pref("devtools.webide.lastConnectedRuntime", "");
|
||||
pref("devtools.webide.lastSelectedProject", "");
|
||||
|
@ -127,7 +127,7 @@ function test() {
|
||||
is(Application.prefs.root, "", "Check the Application preference root");
|
||||
|
||||
// test for user changed preferences
|
||||
ok(Application.prefs.get("browser.shell.checkDefaultBrowser").modified, "A single preference is marked as modified.");
|
||||
ok(Application.prefs.get("browser.dom.window.dump.enabled").modified, "A single preference is marked as modified.");
|
||||
ok(!Application.prefs.get(testdata.string).modified, "A single preference is marked as not modified.");
|
||||
|
||||
// test for a locked preference
|
||||
|
@ -484,6 +484,8 @@ These should match what Safari and other Apple applications use on OS X Lion. --
|
||||
<!ENTITY emailImageCmd.accesskey "g">
|
||||
<!ENTITY emailVideoCmd.label "Email Video…">
|
||||
<!ENTITY emailVideoCmd.accesskey "a">
|
||||
<!ENTITY castVideoCmd.label "Send Video To Device">
|
||||
<!ENTITY castVideoCmd.accesskey "e">
|
||||
<!ENTITY emailAudioCmd.label "Email Audio…">
|
||||
<!ENTITY emailAudioCmd.accesskey "a">
|
||||
<!ENTITY playPluginCmd.label "Activate this plugin">
|
||||
|
@ -100,7 +100,7 @@ quit-button.tooltiptext.mac = Quit %1$S (%2$S)
|
||||
# LOCALIZATION NOTE(loop-call-button3.label): This is a brand name, request
|
||||
# approval before you change it.
|
||||
loop-call-button3.label = Hello
|
||||
loop-call-button2.tooltiptext = Start a conversation
|
||||
loop-call-button3.tooltiptext = Start a conversation
|
||||
|
||||
social-share-button.label = Share This Page
|
||||
social-share-button.tooltiptext = Share This Page
|
||||
|
@ -52,6 +52,7 @@ addons_simulator_label=Firefox OS %1$S Simulator (%2$S)
|
||||
addons_install_button=install
|
||||
addons_uninstall_button=uninstall
|
||||
addons_adb_label=ADB Helper Add-on
|
||||
addons_adapters_label=Tools Adapters Add-on
|
||||
addons_adb_warning=USB devices won't be detected without this add-on
|
||||
addons_status_unknown=?
|
||||
addons_status_installed=Installed
|
||||
|
160
browser/modules/CastingApps.jsm
Normal file
160
browser/modules/CastingApps.jsm
Normal file
@ -0,0 +1,160 @@
|
||||
// -*- Mode: js; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*-
|
||||
/* 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/. */
|
||||
"use strict";
|
||||
this.EXPORTED_SYMBOLS = ["CastingApps"];
|
||||
|
||||
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
|
||||
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/SimpleServiceDiscovery.jsm");
|
||||
|
||||
|
||||
var CastingApps = {
|
||||
_sendEventToVideo: function (element, data) {
|
||||
let event = element.ownerDocument.createEvent("CustomEvent");
|
||||
event.initCustomEvent("media-videoCasting", false, true, JSON.stringify(data));
|
||||
element.dispatchEvent(event);
|
||||
},
|
||||
|
||||
makeURI: function (url, charset, baseURI) {
|
||||
return Services.io.newURI(url, charset, baseURI);
|
||||
},
|
||||
|
||||
getVideo: function (element) {
|
||||
if (!element) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let extensions = SimpleServiceDiscovery.getSupportedExtensions();
|
||||
let types = SimpleServiceDiscovery.getSupportedMimeTypes();
|
||||
|
||||
// Grab the poster attribute from the <video>
|
||||
let posterURL = element.poster;
|
||||
|
||||
// First, look to see if the <video> has a src attribute
|
||||
let sourceURL = element.src;
|
||||
|
||||
// If empty, try the currentSrc
|
||||
if (!sourceURL) {
|
||||
sourceURL = element.currentSrc;
|
||||
}
|
||||
|
||||
if (sourceURL) {
|
||||
// Use the file extension to guess the mime type
|
||||
let sourceURI = this.makeURI(sourceURL, null, this.makeURI(element.baseURI));
|
||||
if (this.allowableExtension(sourceURI, extensions)) {
|
||||
return { element: element, source: sourceURI.spec, poster: posterURL, sourceURI: sourceURI};
|
||||
}
|
||||
}
|
||||
|
||||
// Next, look to see if there is a <source> child element that meets
|
||||
// our needs
|
||||
let sourceNodes = element.getElementsByTagName("source");
|
||||
for (let sourceNode of sourceNodes) {
|
||||
let sourceURI = this.makeURI(sourceNode.src, null, this.makeURI(sourceNode.baseURI));
|
||||
|
||||
// Using the type attribute is our ideal way to guess the mime type. Otherwise,
|
||||
// fallback to using the file extension to guess the mime type
|
||||
if (this.allowableMimeType(sourceNode.type, types) || this.allowableExtension(sourceURI, extensions)) {
|
||||
return { element: element, source: sourceURI.spec, poster: posterURL, sourceURI: sourceURI, type: sourceNode.type };
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
|
||||
sendVideoToService: function (videoElement, service) {
|
||||
if (!service)
|
||||
return;
|
||||
|
||||
let video = this.getVideo(videoElement);
|
||||
if (!video) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Make sure we have a player app for the given service
|
||||
let app = SimpleServiceDiscovery.findAppForService(service);
|
||||
if (!app)
|
||||
return;
|
||||
|
||||
video.title = videoElement.ownerDocument.defaultView.top.document.title;
|
||||
if (video.element) {
|
||||
// If the video is currently playing on the device, pause it
|
||||
if (!video.element.paused) {
|
||||
video.element.pause();
|
||||
}
|
||||
}
|
||||
|
||||
app.stop(() => {
|
||||
app.start(started => {
|
||||
if (!started) {
|
||||
Cu.reportError("CastingApps: Unable to start app");
|
||||
return;
|
||||
}
|
||||
|
||||
app.remoteMedia(remoteMedia => {
|
||||
if (!remoteMedia) {
|
||||
Cu.reportError("CastingApps: Failed to create remotemedia");
|
||||
return;
|
||||
}
|
||||
|
||||
this.session = {
|
||||
service: service,
|
||||
app: app,
|
||||
remoteMedia: remoteMedia,
|
||||
data: {
|
||||
title: video.title,
|
||||
source: video.source,
|
||||
poster: video.poster
|
||||
},
|
||||
videoRef: Cu.getWeakReference(video.element)
|
||||
};
|
||||
}, this);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
getServicesForVideo: function (videoElement) {
|
||||
let video = this.getVideo(videoElement);
|
||||
if (!video) {
|
||||
return {};
|
||||
}
|
||||
|
||||
let filteredServices = SimpleServiceDiscovery.services.filter(service => {
|
||||
return this.allowableExtension(video.sourceURI, service.extensions) ||
|
||||
this.allowableMimeType(video.type, service.types);
|
||||
});
|
||||
|
||||
return filteredServices;
|
||||
},
|
||||
|
||||
// RemoteMedia callback API methods
|
||||
onRemoteMediaStart: function (remoteMedia) {
|
||||
if (!this.session) {
|
||||
return;
|
||||
}
|
||||
|
||||
remoteMedia.load(this.session.data);
|
||||
|
||||
let video = this.session.videoRef.get();
|
||||
if (video) {
|
||||
this._sendEventToVideo(video, { active: true });
|
||||
}
|
||||
},
|
||||
|
||||
onRemoteMediaStop: function (remoteMedia) {
|
||||
},
|
||||
|
||||
onRemoteMediaStatus: function (remoteMedia) {
|
||||
},
|
||||
|
||||
allowableExtension: function (uri, extensions) {
|
||||
return (uri instanceof Ci.nsIURL) && extensions.indexOf(uri.fileExtension) != -1;
|
||||
},
|
||||
|
||||
allowableMimeType: function (type, types) {
|
||||
return types.indexOf(type) != -1;
|
||||
}
|
||||
};
|
@ -14,6 +14,7 @@ XPCSHELL_TESTS_MANIFESTS += [
|
||||
EXTRA_JS_MODULES += [
|
||||
'BrowserNewTabPreloader.jsm',
|
||||
'BrowserUITelemetry.jsm',
|
||||
'CastingApps.jsm',
|
||||
'Chat.jsm',
|
||||
'ContentClick.jsm',
|
||||
'ContentLinkHandler.jsm',
|
||||
|
@ -165,9 +165,11 @@
|
||||
}
|
||||
|
||||
/* Vertical toolbar border */
|
||||
#main-window[sizemode=normal] #navigator-toolbox:not(:-moz-lwtheme)::after,
|
||||
#main-window[sizemode=normal] #navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar):not(:-moz-lwtheme),
|
||||
#main-window[sizemode=normal] #navigator-toolbox:-moz-lwtheme {
|
||||
#main-window:not([customizing])[sizemode=normal] #navigator-toolbox:not(:-moz-lwtheme)::after,
|
||||
#main-window:not([customizing])[sizemode=normal] #navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar):not(:-moz-lwtheme),
|
||||
#main-window:not([customizing])[sizemode=normal] #navigator-toolbox:-moz-lwtheme,
|
||||
#main-window[customizing] #navigator-toolbox::after,
|
||||
#main-window[customizing] #navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar) {
|
||||
border-left: 1px solid @toolbarShadowColor@;
|
||||
border-right: 1px solid @toolbarShadowColor@;
|
||||
background-clip: padding-box;
|
||||
|
@ -386,6 +386,19 @@ public:
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult RequestData()
|
||||
{
|
||||
LOG(PR_LOG_DEBUG, ("Session.RequestData"));
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (NS_FAILED(NS_DispatchToMainThread(new PushBlobRunnable(this)))) {
|
||||
MOZ_ASSERT(false, "RequestData NS_DispatchToMainThread failed");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
already_AddRefed<nsIDOMBlob> GetEncodedData()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
@ -816,25 +829,6 @@ MediaRecorder::Resume(ErrorResult& aResult)
|
||||
mState = RecordingState::Recording;
|
||||
}
|
||||
|
||||
class CreateAndDispatchBlobEventRunnable : public nsRunnable {
|
||||
nsCOMPtr<nsIDOMBlob> mBlob;
|
||||
nsRefPtr<MediaRecorder> mRecorder;
|
||||
public:
|
||||
CreateAndDispatchBlobEventRunnable(already_AddRefed<nsIDOMBlob>&& aBlob,
|
||||
MediaRecorder* aRecorder)
|
||||
: mBlob(aBlob), mRecorder(aRecorder)
|
||||
{ }
|
||||
|
||||
NS_IMETHOD
|
||||
Run();
|
||||
};
|
||||
|
||||
NS_IMETHODIMP
|
||||
CreateAndDispatchBlobEventRunnable::Run()
|
||||
{
|
||||
return mRecorder->CreateAndDispatchBlobEvent(mBlob.forget());
|
||||
}
|
||||
|
||||
void
|
||||
MediaRecorder::RequestData(ErrorResult& aResult)
|
||||
{
|
||||
@ -843,10 +837,9 @@ MediaRecorder::RequestData(ErrorResult& aResult)
|
||||
return;
|
||||
}
|
||||
MOZ_ASSERT(mSessions.Length() > 0);
|
||||
if (NS_FAILED(NS_DispatchToMainThread(
|
||||
new CreateAndDispatchBlobEventRunnable(
|
||||
mSessions.LastElement()->GetEncodedData(), this)))) {
|
||||
MOZ_ASSERT(false, "NS_DispatchToMainThread CreateAndDispatchBlobEventRunnable failed");
|
||||
nsresult rv = mSessions.LastElement()->RequestData();
|
||||
if (NS_FAILED(rv)) {
|
||||
NotifyError(rv);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,6 @@ class MediaRecorder : public DOMEventTargetHelper,
|
||||
public nsIDocumentActivity
|
||||
{
|
||||
class Session;
|
||||
friend class CreateAndDispatchBlobEventRunnable;
|
||||
|
||||
public:
|
||||
MediaRecorder(DOMMediaStream& aSourceMediaStream, nsPIDOMWindow* aOwnerWindow);
|
||||
|
@ -2834,10 +2834,10 @@ nsDocShell::SetRecordProfileTimelineMarkers(bool aValue)
|
||||
if (currentValue != aValue) {
|
||||
if (aValue) {
|
||||
++gProfileTimelineRecordingsCount;
|
||||
mProfileTimelineStartTime = TimeStamp::Now();
|
||||
mProfileTimelineRecording = true;
|
||||
} else {
|
||||
--gProfileTimelineRecordingsCount;
|
||||
mProfileTimelineStartTime = TimeStamp();
|
||||
mProfileTimelineRecording = false;
|
||||
ClearProfileTimelineMarkers();
|
||||
}
|
||||
}
|
||||
@ -2851,7 +2851,7 @@ nsDocShell::SetRecordProfileTimelineMarkers(bool aValue)
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetRecordProfileTimelineMarkers(bool* aValue)
|
||||
{
|
||||
*aValue = !mProfileTimelineStartTime.IsNull();
|
||||
*aValue = mProfileTimelineRecording;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -2939,10 +2939,12 @@ nsDocShell::PopProfileTimelineMarkers(JSContext* aCx,
|
||||
#endif
|
||||
}
|
||||
|
||||
float
|
||||
nsDocShell::GetProfileTimelineDelta()
|
||||
nsresult
|
||||
nsDocShell::Now(DOMHighResTimeStamp* aWhen)
|
||||
{
|
||||
return (TimeStamp::Now() - mProfileTimelineStartTime).ToMilliseconds();
|
||||
bool ignore;
|
||||
*aWhen = (TimeStamp::Now() - TimeStamp::ProcessCreation(ignore)).ToMilliseconds();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
@ -2950,8 +2952,9 @@ nsDocShell::AddProfileTimelineMarker(const char* aName,
|
||||
TracingMetadata aMetaData)
|
||||
{
|
||||
#ifdef MOZ_ENABLE_PROFILER_SPS
|
||||
if (!mProfileTimelineStartTime.IsNull()) {
|
||||
float delta = GetProfileTimelineDelta();
|
||||
if (mProfileTimelineRecording) {
|
||||
DOMHighResTimeStamp delta;
|
||||
Now(&delta);
|
||||
ProfilerMarkerTracing* payload = new ProfilerMarkerTracing("Timeline",
|
||||
aMetaData);
|
||||
mProfileTimelineMarkers.AppendElement(
|
||||
@ -2966,8 +2969,9 @@ nsDocShell::AddProfileTimelineMarker(const char* aName,
|
||||
TracingMetadata aMetaData)
|
||||
{
|
||||
#ifdef MOZ_ENABLE_PROFILER_SPS
|
||||
if (!mProfileTimelineStartTime.IsNull()) {
|
||||
float delta = GetProfileTimelineDelta();
|
||||
if (mProfileTimelineRecording) {
|
||||
DOMHighResTimeStamp delta;
|
||||
Now(&delta);
|
||||
ProfilerMarkerTracing* payload = new ProfilerMarkerTracing("Timeline",
|
||||
aMetaData,
|
||||
aCause);
|
||||
|
@ -951,15 +951,15 @@ private:
|
||||
nsWeakPtr mOpener;
|
||||
nsWeakPtr mOpenedRemote;
|
||||
|
||||
// Storing profile timeline markers and if/when recording started
|
||||
mozilla::TimeStamp mProfileTimelineStartTime;
|
||||
// True if recording profiles.
|
||||
bool mProfileTimelineRecording;
|
||||
|
||||
#ifdef MOZ_ENABLE_PROFILER_SPS
|
||||
struct InternalProfileTimelineMarker
|
||||
{
|
||||
InternalProfileTimelineMarker(const char* aName,
|
||||
ProfilerMarkerTracing* aPayload,
|
||||
float aTime)
|
||||
DOMHighResTimeStamp aTime)
|
||||
: mName(aName)
|
||||
, mPayload(aPayload)
|
||||
, mTime(aTime)
|
||||
@ -972,15 +972,11 @@ private:
|
||||
|
||||
const char* mName;
|
||||
ProfilerMarkerTracing* mPayload;
|
||||
float mTime;
|
||||
DOMHighResTimeStamp mTime;
|
||||
};
|
||||
nsTArray<InternalProfileTimelineMarker*> mProfileTimelineMarkers;
|
||||
#endif
|
||||
|
||||
// Get the elapsed time (in millis) since the profile timeline recording
|
||||
// started
|
||||
float GetProfileTimelineDelta();
|
||||
|
||||
// Get rid of all the timeline markers accumulated so far
|
||||
void ClearProfileTimelineMarkers();
|
||||
|
||||
|
@ -54,7 +54,7 @@ interface nsITabParent;
|
||||
|
||||
typedef unsigned long nsLoadFlags;
|
||||
|
||||
[scriptable, builtinclass, uuid(23157a63-26fd-44a0-a0f9-fdc64dcc004c)]
|
||||
[scriptable, builtinclass, uuid(da8f78f1-8f20-4d6d-be56-fe53e177b630)]
|
||||
interface nsIDocShell : nsIDocShellTreeItem
|
||||
{
|
||||
/**
|
||||
@ -672,6 +672,14 @@ interface nsIDocShell : nsIDocShellTreeItem
|
||||
*/
|
||||
[infallible] attribute boolean recordProfileTimelineMarkers;
|
||||
|
||||
/**
|
||||
* Return a DOMHighResTimeStamp representing the number of
|
||||
* milliseconds from an arbitrary point in time. The reference
|
||||
* point is shared by all DocShells and is also used by timestamps
|
||||
* on markers.
|
||||
*/
|
||||
DOMHighResTimeStamp now();
|
||||
|
||||
/**
|
||||
* Returns and flushes the profile timeline markers gathered by the docShell
|
||||
*/
|
||||
|
@ -276,6 +276,11 @@ DOMRequestIpcHelper.prototype = {
|
||||
},
|
||||
|
||||
createRequest: function() {
|
||||
// If we don't have a valid window object, throw.
|
||||
if (!this._window) {
|
||||
Cu.reportError("DOMRequestHelper trying to create a DOMRequest without a valid window, failing.");
|
||||
throw Cr.NS_ERROR_FAILURE;
|
||||
}
|
||||
return Services.DOMRequest.createRequest(this._window);
|
||||
},
|
||||
|
||||
@ -285,6 +290,11 @@ DOMRequestIpcHelper.prototype = {
|
||||
* reference to window owned by this DOMRequestIPCHelper.
|
||||
*/
|
||||
createPromise: function(aPromiseInit) {
|
||||
// If we don't have a valid window object, throw.
|
||||
if (!this._window) {
|
||||
Cu.reportError("DOMRequestHelper trying to create a Promise without a valid window, failing.");
|
||||
throw Cr.NS_ERROR_FAILURE;
|
||||
}
|
||||
return new this._window.Promise(aPromiseInit);
|
||||
},
|
||||
|
||||
|
@ -105,7 +105,7 @@ NS_CreateMobileConnectionService()
|
||||
service = new mozilla::dom::mobileconnection::MobileConnectionIPCService();
|
||||
} else {
|
||||
#if defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_RIL)
|
||||
service = do_CreateInstance(GONK_MOBILECONNECTION_SERVICE_CONTRACTID);
|
||||
service = do_GetService(GONK_MOBILECONNECTION_SERVICE_CONTRACTID);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -86,14 +86,6 @@ SettingsLock.prototype = {
|
||||
|
||||
_closeHelper: function() {
|
||||
if (DEBUG) debug("closing lock " + this._id);
|
||||
// sendMessage can get queued to run later in a thread via
|
||||
// _closeHelper, but the SettingsManager may have died in between
|
||||
// the time it was scheduled and the time it runs. Make sure our
|
||||
// window is valid before sending, otherwise just ignore.
|
||||
if (!this._settingsManager._window) {
|
||||
if (DEBUG) debug("SettingsManager died, cannot send " + aMessageName + " message window principal.");
|
||||
return;
|
||||
}
|
||||
this._open = false;
|
||||
this._closeCalled = false;
|
||||
if (!this._requests || Object.keys(this._requests).length == 0) {
|
||||
@ -112,6 +104,18 @@ SettingsLock.prototype = {
|
||||
},
|
||||
|
||||
sendMessage: function(aMessageName, aData) {
|
||||
// sendMessage can be called after our window has died, or get
|
||||
// queued to run later in a thread via _closeHelper, but the
|
||||
// SettingsManager may have died in between the time it was
|
||||
// scheduled and the time it runs. Make sure our window is valid
|
||||
// before sending, otherwise just ignore.
|
||||
if (!this._settingsManager._window) {
|
||||
Cu.reportError(
|
||||
"SettingsManager window died, cannot run settings transaction." +
|
||||
" SettingsMessage: " + aMessageName +
|
||||
" SettingsData: " + JSON.stringify(aData));
|
||||
return;
|
||||
}
|
||||
cpmm.sendAsyncMessage(aMessageName,
|
||||
aData,
|
||||
undefined,
|
||||
|
@ -1972,6 +1972,9 @@ RadioInterface.prototype = {
|
||||
handleUnsolicitedWorkerMessage: function(message) {
|
||||
let connHandler = gDataConnectionManager.getConnectionHandler(this.clientId);
|
||||
switch (message.rilMessageType) {
|
||||
case "audioStateChanged":
|
||||
gTelephonyService.notifyAudioStateChanged(this.clientId, message.state);
|
||||
break;
|
||||
case "callRing":
|
||||
gTelephonyService.notifyCallRing();
|
||||
break;
|
||||
|
@ -470,6 +470,11 @@ this.CELL_INFO_TYPE_CDMA = 2;
|
||||
this.CELL_INFO_TYPE_LTE = 3;
|
||||
this.CELL_INFO_TYPE_WCDMA = 4;
|
||||
|
||||
// Order matters.
|
||||
this.AUDIO_STATE_NO_CALL = 0;
|
||||
this.AUDIO_STATE_INCOMING = 1;
|
||||
this.AUDIO_STATE_IN_CALL = 2;
|
||||
|
||||
this.CALL_STATE_UNKNOWN = -1;
|
||||
this.CALL_STATE_ACTIVE = 0;
|
||||
this.CALL_STATE_HOLDING = 1;
|
||||
|
@ -3993,6 +3993,26 @@ RilObject.prototype = {
|
||||
if (conferenceChanged) {
|
||||
this._ensureConference();
|
||||
}
|
||||
|
||||
// Update audio state.
|
||||
let message = {rilMessageType: "audioStateChanged",
|
||||
state: this._detectAudioState()};
|
||||
this.sendChromeMessage(message);
|
||||
},
|
||||
|
||||
_detectAudioState: function() {
|
||||
let callNum = Object.keys(this.currentCalls).length;
|
||||
if (!callNum) {
|
||||
return AUDIO_STATE_NO_CALL;
|
||||
}
|
||||
|
||||
let firstIndex = Object.keys(this.currentCalls)[0];
|
||||
if (callNum == 1 &&
|
||||
this.currentCalls[firstIndex].state == CALL_STATE_INCOMING) {
|
||||
return AUDIO_STATE_INCOMING;
|
||||
}
|
||||
|
||||
return AUDIO_STATE_IN_CALL;
|
||||
},
|
||||
|
||||
_addNewVoiceCall: function(newCall) {
|
||||
|
@ -43,9 +43,6 @@ const DIAL_ERROR_INVALID_STATE_ERROR = "InvalidStateError";
|
||||
const DIAL_ERROR_OTHER_CONNECTION_IN_USE = "OtherConnectionInUse";
|
||||
const DIAL_ERROR_BAD_NUMBER = RIL.GECKO_CALL_ERROR_BAD_NUMBER;
|
||||
|
||||
const AUDIO_STATE_NO_CALL = 0;
|
||||
const AUDIO_STATE_INCOMING = 1;
|
||||
const AUDIO_STATE_IN_CALL = 2;
|
||||
const AUDIO_STATE_NAME = [
|
||||
"PHONE_STATE_NORMAL",
|
||||
"PHONE_STATE_RINGTONE",
|
||||
@ -156,6 +153,7 @@ function TelephonyService() {
|
||||
this._isDialing = false;
|
||||
this._cachedDialRequest = null;
|
||||
this._currentCalls = {};
|
||||
this._audioStates = {};
|
||||
|
||||
this._cdmaCallWaitingNumber = null;
|
||||
|
||||
@ -174,6 +172,7 @@ function TelephonyService() {
|
||||
for (let i = 0; i < this._numClients; ++i) {
|
||||
this._enumerateCallsForClient(i);
|
||||
this._isActiveCall[i] = {};
|
||||
this._audioStates[i] = RIL.AUDIO_STATE_NO_CALL;
|
||||
}
|
||||
}
|
||||
TelephonyService.prototype = {
|
||||
@ -277,28 +276,19 @@ TelephonyService.prototype = {
|
||||
this._numActiveCall--;
|
||||
}
|
||||
this._isActiveCall[aCall.clientId][aCall.callIndex] = active;
|
||||
|
||||
if (incoming && !this._numActiveCall) {
|
||||
// Change the phone state into RINGTONE only when there's no active call.
|
||||
this._updateCallAudioState(AUDIO_STATE_INCOMING);
|
||||
} else if (this._numActiveCall) {
|
||||
this._updateCallAudioState(AUDIO_STATE_IN_CALL);
|
||||
} else {
|
||||
this._updateCallAudioState(AUDIO_STATE_NO_CALL);
|
||||
}
|
||||
},
|
||||
|
||||
_updateCallAudioState: function(aAudioState) {
|
||||
_updateAudioState: function(aAudioState) {
|
||||
switch (aAudioState) {
|
||||
case AUDIO_STATE_NO_CALL:
|
||||
case RIL.AUDIO_STATE_NO_CALL:
|
||||
gAudioManager.phoneState = nsIAudioManager.PHONE_STATE_NORMAL;
|
||||
break;
|
||||
|
||||
case AUDIO_STATE_INCOMING:
|
||||
case RIL.AUDIO_STATE_INCOMING:
|
||||
gAudioManager.phoneState = nsIAudioManager.PHONE_STATE_RINGTONE;
|
||||
break;
|
||||
|
||||
case AUDIO_STATE_IN_CALL:
|
||||
case RIL.AUDIO_STATE_IN_CALL:
|
||||
gAudioManager.phoneState = nsIAudioManager.PHONE_STATE_IN_CALL;
|
||||
if (this.speakerEnabled) {
|
||||
gAudioManager.setForceForUse(nsIAudioManager.USE_COMMUNICATION,
|
||||
@ -309,7 +299,7 @@ TelephonyService.prototype = {
|
||||
|
||||
if (DEBUG) {
|
||||
debug("Put audio system into " + AUDIO_STATE_NAME[aAudioState] + ": " +
|
||||
gAudioManager.phoneState);
|
||||
aAudioState + ", result is: " + gAudioManager.phoneState);
|
||||
}
|
||||
},
|
||||
|
||||
@ -1097,6 +1087,17 @@ TelephonyService.prototype = {
|
||||
* nsIGonkTelephonyService interface.
|
||||
*/
|
||||
|
||||
notifyAudioStateChanged: function(aClientId, aState) {
|
||||
this._audioStates[aClientId] = aState;
|
||||
|
||||
let audioState = aState;
|
||||
for (let i = 0; i < this._numClients; ++i) {
|
||||
audioState = Math.max(audioState, this._audioStates[i]);
|
||||
}
|
||||
|
||||
this._updateAudioState(audioState);
|
||||
},
|
||||
|
||||
/**
|
||||
* Handle call disconnects by updating our current state and the audio system.
|
||||
*/
|
||||
|
@ -10,9 +10,11 @@
|
||||
"@mozilla.org/telephony/gonktelephonyservice;1"
|
||||
%}
|
||||
|
||||
[scriptable, uuid(79eec3c3-2dfc-4bbf-b106-af5457651ae0)]
|
||||
[scriptable, uuid(068d7bf2-1773-48ef-95f8-bd835115fed7)]
|
||||
interface nsIGonkTelephonyService : nsITelephonyService
|
||||
{
|
||||
void notifyAudioStateChanged(in unsigned long clientId, in short state);
|
||||
|
||||
void notifyCallDisconnected(in unsigned long clientId, in jsval call);
|
||||
|
||||
void notifyCallRing();
|
||||
|
@ -2,7 +2,7 @@
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
// Emulate Promise.jsm semantics.
|
||||
Promise.defer = function() { return new Deferred(); }
|
||||
Promise.defer = function() { return new Deferred(); };
|
||||
function Deferred() {
|
||||
this.promise = new Promise(function(resolve, reject) {
|
||||
this.resolve = resolve;
|
||||
@ -619,6 +619,38 @@ let emulator = (function() {
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resume a call.
|
||||
*
|
||||
* @param call
|
||||
* A TelephonyCall object.
|
||||
* @return A deferred promise.
|
||||
*/
|
||||
function resume(call) {
|
||||
log("Resuming the held call.");
|
||||
|
||||
let deferred = Promise.defer();
|
||||
|
||||
let gotResuming = false;
|
||||
call.onresuming = function onresuming(event) {
|
||||
log("Received 'resuming' call event");
|
||||
call.onresuming = null;
|
||||
checkEventCallState(event, call, "resuming");
|
||||
gotResuming = true;
|
||||
};
|
||||
|
||||
call.onconnected = function onconnected(event) {
|
||||
log("Received 'connected' call event");
|
||||
call.onconnected = null;
|
||||
checkEventCallState(event, call, "connected");
|
||||
ok(gotResuming);
|
||||
deferred.resolve(call);
|
||||
};
|
||||
call.resume();
|
||||
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
/**
|
||||
* Locally hang up a call.
|
||||
*
|
||||
@ -1203,6 +1235,7 @@ let emulator = (function() {
|
||||
this.gAnswer = answer;
|
||||
this.gHangUp = hangUp;
|
||||
this.gHold = hold;
|
||||
this.gResume = resume;
|
||||
this.gRemoteDial = remoteDial;
|
||||
this.gRemoteAnswer = remoteAnswer;
|
||||
this.gRemoteHangUp = remoteHangUp;
|
||||
|
@ -83,6 +83,10 @@ startTest(function() {
|
||||
.then(() => check(PHONE_STATE_IN_CALL, PHONE_STATE_IN_CALL))
|
||||
.then(() => gRemoteAnswer(outCall))
|
||||
.then(() => check(PHONE_STATE_IN_CALL, PHONE_STATE_IN_CALL))
|
||||
.then(() => gHold(outCall))
|
||||
.then(() => check(PHONE_STATE_IN_CALL, PHONE_STATE_IN_CALL))
|
||||
.then(() => gResume(outCall))
|
||||
.then(() => check(PHONE_STATE_IN_CALL, PHONE_STATE_IN_CALL))
|
||||
// Dial out and dial in
|
||||
.then(() => gRemoteDial(inNumber))
|
||||
.then(call => { inCall = call; })
|
||||
|
@ -6,6 +6,6 @@
|
||||
|
||||
dictionary ProfileTimelineMarker {
|
||||
DOMString name = "";
|
||||
DOMTimeStamp start = 0;
|
||||
DOMTimeStamp end = 0;
|
||||
DOMHighResTimeStamp start = 0;
|
||||
DOMHighResTimeStamp end = 0;
|
||||
};
|
||||
|
@ -437,7 +437,8 @@ nsPermissionManager::Init()
|
||||
// will end up as now()) is fine.
|
||||
uint64_t modificationTime = 0;
|
||||
AddInternal(principal, perm.type, perm.capability, 0, perm.expireType,
|
||||
perm.expireTime, modificationTime, eNotify, eNoDBOperation);
|
||||
perm.expireTime, modificationTime, eNotify, eNoDBOperation,
|
||||
true /* ignoreSessionPermissions */);
|
||||
}
|
||||
|
||||
// Stop here; we don't need the DB in the child process
|
||||
@ -717,7 +718,8 @@ nsPermissionManager::AddInternal(nsIPrincipal* aPrincipal,
|
||||
int64_t aExpireTime,
|
||||
int64_t aModificationTime,
|
||||
NotifyOperationType aNotifyOperation,
|
||||
DBOperationType aDBOperation)
|
||||
DBOperationType aDBOperation,
|
||||
const bool aIgnoreSessionPermissions)
|
||||
{
|
||||
nsAutoCString host;
|
||||
nsresult rv = GetHostForPrincipal(aPrincipal, host);
|
||||
@ -739,6 +741,12 @@ nsPermissionManager::AddInternal(nsIPrincipal* aPrincipal,
|
||||
ContentParent::GetAll(cplist);
|
||||
for (uint32_t i = 0; i < cplist.Length(); ++i) {
|
||||
ContentParent* cp = cplist[i];
|
||||
// On platforms where we use a preallocated template process we don't
|
||||
// want to notify this process about session specific permissions so
|
||||
// new tabs or apps created on it won't inherit the session permissions.
|
||||
if (cp->IsPreallocated() &&
|
||||
aExpireType == nsIPermissionManager::EXPIRE_SESSION)
|
||||
continue;
|
||||
if (cp->NeedsPermissionsUpdate())
|
||||
unused << cp->SendAddPermission(permission);
|
||||
}
|
||||
@ -824,6 +832,16 @@ nsPermissionManager::AddInternal(nsIPrincipal* aPrincipal,
|
||||
id = aID;
|
||||
}
|
||||
|
||||
// When we do the initial addition of the permissions we don't want to
|
||||
// inherit session specific permissions from other tabs or apps
|
||||
// so we ignore them and set the permission to PROMPT_ACTION if it was
|
||||
// previously allowed or denied by the user.
|
||||
if (aIgnoreSessionPermissions &&
|
||||
aExpireType == nsIPermissionManager::EXPIRE_SESSION) {
|
||||
aPermission = nsIPermissionManager::PROMPT_ACTION;
|
||||
aExpireType = nsIPermissionManager::EXPIRE_NEVER;
|
||||
}
|
||||
|
||||
entry->GetPermissions().AppendElement(PermissionEntry(id, typeIndex, aPermission,
|
||||
aExpireType, aExpireTime,
|
||||
aModificationTime));
|
||||
|
@ -155,7 +155,7 @@ public:
|
||||
if (mPermissions[i].mType == aType)
|
||||
return mPermissions[i];
|
||||
|
||||
// unknown permission... return relevant data
|
||||
// unknown permission... return relevant data
|
||||
return PermissionEntry(-1, aType, nsIPermissionManager::UNKNOWN_ACTION,
|
||||
nsIPermissionManager::EXPIRE_NEVER, 0, 0);
|
||||
}
|
||||
@ -205,7 +205,8 @@ public:
|
||||
int64_t aExpireTime,
|
||||
int64_t aModificationTime,
|
||||
NotifyOperationType aNotifyOperation,
|
||||
DBOperationType aDBOperation);
|
||||
DBOperationType aDBOperation,
|
||||
const bool aIgnoreSessionPermissions = false);
|
||||
|
||||
/**
|
||||
* Initialize the "webapp-uninstall" observing.
|
||||
|
@ -31,7 +31,7 @@ function run_test() {
|
||||
case "TESTING:Stage2A":
|
||||
// Permissions created after the child is present
|
||||
do_check_eq(pm.testPermissionFromPrincipal(getPrincipalForURI("http://mozilla.org"), "cookie1"), pm.ALLOW_ACTION);
|
||||
do_check_eq(pm.testPermissionFromPrincipal(getPrincipalForURI("http://mozilla.com"), "cookie2"), pm.DENY_ACTION);
|
||||
do_check_eq(pm.testPermissionFromPrincipal(getPrincipalForURI("http://mozilla.com"), "cookie2"), pm.PROMPT_ACTION);
|
||||
do_check_eq(pm.testPermissionFromPrincipal(getPrincipalForURI("http://mozilla.net"), "cookie3"), pm.ALLOW_ACTION);
|
||||
do_check_eq(pm.testPermissionFromPrincipal(getPrincipalForURI("http://firefox.org"), "cookie1"), pm.ALLOW_ACTION);
|
||||
do_check_eq(pm.testPermissionFromPrincipal(getPrincipalForURI("http://firefox.com"), "cookie2"), pm.DENY_ACTION);
|
||||
@ -47,9 +47,10 @@ function run_test() {
|
||||
|
||||
mM.addMessageListener("TESTING:Stage2A", messageListener);
|
||||
|
||||
// Permissions created before the child is present
|
||||
var pm = Cc["@mozilla.org/permissionmanager;1"].getService(Ci.nsIPermissionManager);
|
||||
do_check_eq(pm.testPermissionFromPrincipal(getPrincipalForURI("http://mozilla.org"), "cookie1"), pm.ALLOW_ACTION);
|
||||
do_check_eq(pm.testPermissionFromPrincipal(getPrincipalForURI("http://mozilla.com"), "cookie2"), pm.DENY_ACTION);
|
||||
do_check_eq(pm.testPermissionFromPrincipal(getPrincipalForURI("http://mozilla.com"), "cookie2"), pm.PROMPT_ACTION);
|
||||
do_check_eq(pm.testPermissionFromPrincipal(getPrincipalForURI("http://mozilla.net"), "cookie3"), pm.ALLOW_ACTION);
|
||||
|
||||
mM.sendAsyncMessage("TESTING:Stage2");
|
||||
|
@ -1258,7 +1258,6 @@ static const mozilla::Module::CategoryEntry kLayoutCategories[] = {
|
||||
#ifdef MOZ_B2G_BT
|
||||
{ "profile-after-change", "Bluetooth Service", BLUETOOTHSERVICE_CONTRACTID },
|
||||
#endif
|
||||
{ "profile-after-change", "MobileConnection Service", NS_MOBILE_CONNECTION_SERVICE_CONTRACTID },
|
||||
{ nullptr }
|
||||
};
|
||||
|
||||
|
@ -21,10 +21,10 @@ import org.mozilla.gecko.AppConstants.Versions;
|
||||
import org.mozilla.gecko.DynamicToolbar.PinReason;
|
||||
import org.mozilla.gecko.DynamicToolbar.VisibilityTransition;
|
||||
import org.mozilla.gecko.GeckoProfileDirectories.NoMozillaDirectoryException;
|
||||
import org.mozilla.gecko.ReadingListHelper;
|
||||
import org.mozilla.gecko.animation.PropertyAnimator;
|
||||
import org.mozilla.gecko.animation.ViewHelper;
|
||||
import org.mozilla.gecko.db.BrowserContract.Combined;
|
||||
import org.mozilla.gecko.db.BrowserContract.ReadingListItems;
|
||||
import org.mozilla.gecko.db.BrowserContract.SearchHistory;
|
||||
import org.mozilla.gecko.db.BrowserDB;
|
||||
import org.mozilla.gecko.db.SuggestedSites;
|
||||
@ -146,10 +146,6 @@ public class BrowserApp extends GeckoApp
|
||||
|
||||
private static final int TABS_ANIMATION_DURATION = 450;
|
||||
|
||||
private static final int READER_ADD_SUCCESS = 0;
|
||||
private static final int READER_ADD_FAILED = 1;
|
||||
private static final int READER_ADD_DUPLICATE = 2;
|
||||
|
||||
private static final String ADD_SHORTCUT_TOAST = "add_shortcut_toast";
|
||||
public static final String GUEST_BROWSING_ARG = "--guest";
|
||||
|
||||
@ -229,6 +225,8 @@ public class BrowserApp extends GeckoApp
|
||||
|
||||
private BrowserHealthReporter mBrowserHealthReporter;
|
||||
|
||||
private ReadingListHelper mReadingListHelper;
|
||||
|
||||
private SystemBarTintManager mTintManager;
|
||||
|
||||
// The tab to be selected on editing mode exit.
|
||||
@ -433,90 +431,6 @@ public class BrowserApp extends GeckoApp
|
||||
return super.onKeyUp(keyCode, event);
|
||||
}
|
||||
|
||||
void handleReaderListStatusRequest(final String url) {
|
||||
ThreadUtils.postToBackgroundThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
final int inReadingList = BrowserDB.isReadingListItem(getContentResolver(), url) ? 1 : 0;
|
||||
|
||||
final JSONObject json = new JSONObject();
|
||||
try {
|
||||
json.put("url", url);
|
||||
json.put("inReadingList", inReadingList);
|
||||
} catch (JSONException e) {
|
||||
Log.e(LOGTAG, "JSON error - failed to return inReadingList status", e);
|
||||
return;
|
||||
}
|
||||
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Reader:ListStatusReturn", json.toString()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void handleReaderAdded(int result, final ContentValues values) {
|
||||
if (result != READER_ADD_SUCCESS) {
|
||||
if (result == READER_ADD_FAILED) {
|
||||
showToast(R.string.reading_list_failed, Toast.LENGTH_SHORT);
|
||||
} else if (result == READER_ADD_DUPLICATE) {
|
||||
showToast(R.string.reading_list_duplicate, Toast.LENGTH_SHORT);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
ThreadUtils.postToBackgroundThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
BrowserDB.addReadingListItem(getContentResolver(), values);
|
||||
showToast(R.string.reading_list_added, Toast.LENGTH_SHORT);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private ContentValues messageToReadingListContentValues(JSONObject message) {
|
||||
final ContentValues values = new ContentValues();
|
||||
values.put(ReadingListItems.URL, message.optString("url"));
|
||||
values.put(ReadingListItems.TITLE, message.optString("title"));
|
||||
values.put(ReadingListItems.LENGTH, message.optInt("length"));
|
||||
values.put(ReadingListItems.EXCERPT, message.optString("excerpt"));
|
||||
return values;
|
||||
}
|
||||
|
||||
void handleReaderRemoved(final String url) {
|
||||
ThreadUtils.postToBackgroundThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
BrowserDB.removeReadingListItemWithURL(getContentResolver(), url);
|
||||
showToast(R.string.page_removed, Toast.LENGTH_SHORT);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void handleReaderFaviconRequest(final String url) {
|
||||
(new UIAsyncTask.WithoutParams<String>(ThreadUtils.getBackgroundHandler()) {
|
||||
@Override
|
||||
public String doInBackground() {
|
||||
return Favicons.getFaviconURLForPageURL(getContext(), url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPostExecute(String faviconUrl) {
|
||||
JSONObject args = new JSONObject();
|
||||
|
||||
if (faviconUrl != null) {
|
||||
try {
|
||||
args.put("url", url);
|
||||
args.put("faviconUrl", faviconUrl);
|
||||
} catch (JSONException e) {
|
||||
Log.w(LOGTAG, "Error building JSON favicon arguments.", e);
|
||||
}
|
||||
}
|
||||
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Reader:FaviconReturn", args.toString()));
|
||||
}
|
||||
}).execute();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
mAboutHomeStartupTimer = new Telemetry.UptimeTimer("FENNEC_STARTUP_TIME_ABOUTHOME");
|
||||
@ -600,8 +514,6 @@ public class BrowserApp extends GeckoApp
|
||||
|
||||
EventDispatcher.getInstance().registerGeckoThreadListener((GeckoEventListener)this,
|
||||
"Menu:Update",
|
||||
"Reader:Added",
|
||||
"Reader:FaviconRequest",
|
||||
"Search:Keyword",
|
||||
"Prompt:ShowTop",
|
||||
"Accounts:Exist");
|
||||
@ -615,8 +527,6 @@ public class BrowserApp extends GeckoApp
|
||||
"Feedback:OpenPlayStore",
|
||||
"Menu:Add",
|
||||
"Menu:Remove",
|
||||
"Reader:ListStatusRequest",
|
||||
"Reader:Removed",
|
||||
"Reader:Share",
|
||||
"Settings:Show",
|
||||
"Telemetry:Gather",
|
||||
@ -633,6 +543,7 @@ public class BrowserApp extends GeckoApp
|
||||
mSharedPreferencesHelper = new SharedPreferencesHelper(appContext);
|
||||
mOrderedBroadcastHelper = new OrderedBroadcastHelper(appContext);
|
||||
mBrowserHealthReporter = new BrowserHealthReporter();
|
||||
mReadingListHelper = new ReadingListHelper(appContext);
|
||||
|
||||
if (AppConstants.MOZ_ANDROID_BEAM) {
|
||||
NfcAdapter nfc = NfcAdapter.getDefaultAdapter(this);
|
||||
@ -1142,10 +1053,13 @@ public class BrowserApp extends GeckoApp
|
||||
mBrowserHealthReporter = null;
|
||||
}
|
||||
|
||||
if (mReadingListHelper != null) {
|
||||
mReadingListHelper.uninit();
|
||||
mReadingListHelper = null;
|
||||
}
|
||||
|
||||
EventDispatcher.getInstance().unregisterGeckoThreadListener((GeckoEventListener)this,
|
||||
"Menu:Update",
|
||||
"Reader:Added",
|
||||
"Reader:FaviconRequest",
|
||||
"Search:Keyword",
|
||||
"Prompt:ShowTop",
|
||||
"Accounts:Exist");
|
||||
@ -1159,8 +1073,6 @@ public class BrowserApp extends GeckoApp
|
||||
"Feedback:OpenPlayStore",
|
||||
"Menu:Add",
|
||||
"Menu:Remove",
|
||||
"Reader:ListStatusRequest",
|
||||
"Reader:Removed",
|
||||
"Reader:Share",
|
||||
"Settings:Show",
|
||||
"Telemetry:Gather",
|
||||
@ -1519,13 +1431,6 @@ public class BrowserApp extends GeckoApp
|
||||
}
|
||||
});
|
||||
|
||||
} else if ("Reader:ListStatusRequest".equals(event)) {
|
||||
handleReaderListStatusRequest(message.getString("url"));
|
||||
|
||||
} else if ("Reader:Removed".equals(event)) {
|
||||
final String url = message.getString("url");
|
||||
handleReaderRemoved(url);
|
||||
|
||||
} else if ("Reader:Share".equals(event)) {
|
||||
final String title = message.getString("title");
|
||||
final String url = message.getString("url");
|
||||
@ -1640,12 +1545,6 @@ public class BrowserApp extends GeckoApp
|
||||
DataReportingNotification.checkAndNotifyPolicy(GeckoAppShell.getContext());
|
||||
}
|
||||
|
||||
} else if (event.equals("Reader:Added")) {
|
||||
final int result = message.getInt("result");
|
||||
handleReaderAdded(result, messageToReadingListContentValues(message));
|
||||
} else if (event.equals("Reader:FaviconRequest")) {
|
||||
final String url = message.getString("url");
|
||||
handleReaderFaviconRequest(url);
|
||||
} else if (event.equals("Search:Keyword")) {
|
||||
storeSearchQuery(message.getString("query"));
|
||||
} else if (event.equals("Prompt:ShowTop")) {
|
||||
|
@ -1835,7 +1835,7 @@ public class GeckoAppShell
|
||||
true, // Media scanner should scan this
|
||||
mimeType,
|
||||
f.getAbsolutePath(),
|
||||
Math.max(0, f.length()),
|
||||
Math.max(1, f.length()), // Some versions of Android require downloads to be at least length 1
|
||||
false); // Don't show a notification.
|
||||
} else {
|
||||
Context context = getContext();
|
||||
|
195
mobile/android/base/ReadingListHelper.java
Normal file
195
mobile/android/base/ReadingListHelper.java
Normal file
@ -0,0 +1,195 @@
|
||||
/* 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/. */
|
||||
|
||||
package org.mozilla.gecko;
|
||||
|
||||
import org.mozilla.gecko.db.BrowserContract.ReadingListItems;
|
||||
import org.mozilla.gecko.db.BrowserDB;
|
||||
import org.mozilla.gecko.favicons.Favicons;
|
||||
import org.mozilla.gecko.util.EventCallback;
|
||||
import org.mozilla.gecko.util.GeckoEventListener;
|
||||
import org.mozilla.gecko.util.NativeEventListener;
|
||||
import org.mozilla.gecko.util.NativeJSObject;
|
||||
import org.mozilla.gecko.util.ThreadUtils;
|
||||
import org.mozilla.gecko.util.UIAsyncTask;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
public final class ReadingListHelper implements GeckoEventListener, NativeEventListener {
|
||||
private static final String LOGTAG = "ReadingListHelper";
|
||||
|
||||
private static final int READER_ADD_SUCCESS = 0;
|
||||
private static final int READER_ADD_FAILED = 1;
|
||||
private static final int READER_ADD_DUPLICATE = 2;
|
||||
|
||||
protected final Context context;
|
||||
|
||||
|
||||
public ReadingListHelper(Context context) {
|
||||
this.context = context;
|
||||
|
||||
EventDispatcher.getInstance().registerGeckoThreadListener((GeckoEventListener) this,
|
||||
"Reader:Added", "Reader:FaviconRequest");
|
||||
EventDispatcher.getInstance().registerGeckoThreadListener((NativeEventListener) this,
|
||||
"Reader:ListStatusRequest", "Reader:Removed");
|
||||
}
|
||||
|
||||
public void uninit() {
|
||||
EventDispatcher.getInstance().unregisterGeckoThreadListener((GeckoEventListener) this,
|
||||
"Reader:Added", "Reader:FaviconRequest");
|
||||
EventDispatcher.getInstance().unregisterGeckoThreadListener((NativeEventListener) this,
|
||||
"Reader:ListStatusRequest", "Reader:Removed");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleMessage(String event, JSONObject message) {
|
||||
switch(event) {
|
||||
case "Reader:Added": {
|
||||
handleReadingListAdded(message);
|
||||
break;
|
||||
}
|
||||
|
||||
case "Reader:FaviconRequest": {
|
||||
handleReaderModeFaviconRequest(message.optString("url"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleMessage(final String event, final NativeJSObject message,
|
||||
final EventCallback callback) {
|
||||
switch(event) {
|
||||
case "Reader:Removed": {
|
||||
handleReadingListRemoved(message.getString("url"));
|
||||
break;
|
||||
}
|
||||
|
||||
case "Reader:ListStatusRequest": {
|
||||
handleReadingListStatusRequest(message.getString("url"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A page can be added to the ReadingList by long-tap of the page-action
|
||||
* icon, or by tapping the readinglist-add icon in the ReaderMode banner.
|
||||
*/
|
||||
private void handleReadingListAdded(JSONObject message) {
|
||||
final int result = message.optInt("result", READER_ADD_FAILED);
|
||||
if (result != READER_ADD_SUCCESS) {
|
||||
if (result == READER_ADD_FAILED) {
|
||||
showToast(R.string.reading_list_failed, Toast.LENGTH_SHORT);
|
||||
} else if (result == READER_ADD_DUPLICATE) {
|
||||
showToast(R.string.reading_list_duplicate, Toast.LENGTH_SHORT);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
final ContentValues values = new ContentValues();
|
||||
values.put(ReadingListItems.URL, message.optString("url"));
|
||||
values.put(ReadingListItems.TITLE, message.optString("title"));
|
||||
values.put(ReadingListItems.LENGTH, message.optInt("length"));
|
||||
values.put(ReadingListItems.EXCERPT, message.optString("excerpt"));
|
||||
|
||||
ThreadUtils.postToBackgroundThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
BrowserDB.addReadingListItem(context.getContentResolver(), values);
|
||||
showToast(R.string.reading_list_added, Toast.LENGTH_SHORT);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gecko (ReaderMode) requests the page favicon to append to the
|
||||
* document head for display.
|
||||
*/
|
||||
private void handleReaderModeFaviconRequest(final String url) {
|
||||
(new UIAsyncTask.WithoutParams<String>(ThreadUtils.getBackgroundHandler()) {
|
||||
@Override
|
||||
public String doInBackground() {
|
||||
return Favicons.getFaviconURLForPageURL(context, url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPostExecute(String faviconUrl) {
|
||||
JSONObject args = new JSONObject();
|
||||
|
||||
if (faviconUrl != null) {
|
||||
try {
|
||||
args.put("url", url);
|
||||
args.put("faviconUrl", faviconUrl);
|
||||
} catch (JSONException e) {
|
||||
Log.w(LOGTAG, "Error building JSON favicon arguments.", e);
|
||||
}
|
||||
}
|
||||
|
||||
GeckoAppShell.sendEventToGecko(
|
||||
GeckoEvent.createBroadcastEvent("Reader:FaviconReturn", args.toString()));
|
||||
}
|
||||
}).execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* A page can be removed from the ReadingList by panel context menu,
|
||||
* or by tapping the readinglist-remove icon in the ReaderMode banner.
|
||||
*/
|
||||
private void handleReadingListRemoved(final String url) {
|
||||
ThreadUtils.postToBackgroundThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
BrowserDB.removeReadingListItemWithURL(context.getContentResolver(), url);
|
||||
showToast(R.string.page_removed, Toast.LENGTH_SHORT);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gecko (ReaderMode) requests the page ReadingList status, to display
|
||||
* the proper ReaderMode banner icon (readinglist-add / readinglist-remove).
|
||||
*/
|
||||
private void handleReadingListStatusRequest(final String url) {
|
||||
ThreadUtils.postToBackgroundThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
final int inReadingList =
|
||||
BrowserDB.isReadingListItem(context.getContentResolver(), url) ? 1 : 0;
|
||||
|
||||
final JSONObject json = new JSONObject();
|
||||
try {
|
||||
json.put("url", url);
|
||||
json.put("inReadingList", inReadingList);
|
||||
} catch (JSONException e) {
|
||||
Log.e(LOGTAG, "JSON error - failed to return inReadingList status", e);
|
||||
return;
|
||||
}
|
||||
|
||||
GeckoAppShell.sendEventToGecko(
|
||||
GeckoEvent.createBroadcastEvent("Reader:ListStatusReturn", json.toString()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Show various status toasts.
|
||||
*/
|
||||
private void showToast(final int resId, final int duration) {
|
||||
ThreadUtils.postToUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(context, resId, duration).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -82,7 +82,7 @@ public class LocalBrowserDB {
|
||||
private final HashMap<String, Long> mFolderIdMap;
|
||||
|
||||
// Use wrapped Boolean so that we can have a null state
|
||||
private Boolean mDesktopBookmarksExist;
|
||||
private volatile Boolean mDesktopBookmarksExist;
|
||||
|
||||
private final Uri mBookmarksUriWithProfile;
|
||||
private final Uri mParentsUriWithProfile;
|
||||
@ -759,12 +759,13 @@ public class LocalBrowserDB {
|
||||
null);
|
||||
|
||||
try {
|
||||
mDesktopBookmarksExist = c.getCount() > 0;
|
||||
// Don't read back out of the cache to avoid races with invalidation.
|
||||
final boolean e = c.getCount() > 0;
|
||||
mDesktopBookmarksExist = e;
|
||||
return e;
|
||||
} finally {
|
||||
c.close();
|
||||
}
|
||||
|
||||
return mDesktopBookmarksExist;
|
||||
}
|
||||
|
||||
@RobocopTarget
|
||||
|
@ -6,13 +6,14 @@ package org.mozilla.gecko.menu;
|
||||
|
||||
import org.mozilla.gecko.NewTabletUI;
|
||||
import org.mozilla.gecko.R;
|
||||
import org.mozilla.gecko.widget.ThemedImageButton;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.ImageButton;
|
||||
|
||||
public class MenuItemActionBar extends ImageButton
|
||||
public class MenuItemActionBar extends ThemedImageButton
|
||||
implements GeckoMenuItem.Layout {
|
||||
private static final String LOGTAG = "GeckoMenuItemActionBar";
|
||||
|
||||
|
@ -368,6 +368,7 @@ gbjar.sources += [
|
||||
'prompts/PromptService.java',
|
||||
'prompts/TabInput.java',
|
||||
'ReaderModeUtils.java',
|
||||
'ReadingListHelper.java',
|
||||
'RemoteClientsDialogFragment.java',
|
||||
'RemoteTabsExpandableListAdapter.java',
|
||||
'Restarter.java',
|
||||
|
@ -3,7 +3,40 @@
|
||||
- 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/. -->
|
||||
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:gecko="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item gecko:state_private="true"
|
||||
android:state_pressed="true"
|
||||
android:state_enabled="true">
|
||||
|
||||
<inset android:insetTop="@dimen/new_tablet_browser_toolbar_menu_item_inset_vertical"
|
||||
android:insetBottom="@dimen/new_tablet_browser_toolbar_menu_item_inset_vertical"
|
||||
android:insetLeft="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal"
|
||||
android:insetRight="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/new_tablet_highlight_pb"/>
|
||||
<corners android:radius="@dimen/new_tablet_browser_toolbar_menu_item_corner_radius"/>
|
||||
</shape>
|
||||
</inset>
|
||||
|
||||
</item>
|
||||
|
||||
<item gecko:state_private="true"
|
||||
android:state_focused="true"
|
||||
android:state_pressed="false">
|
||||
|
||||
<inset android:insetTop="@dimen/new_tablet_browser_toolbar_menu_item_inset_vertical"
|
||||
android:insetBottom="@dimen/new_tablet_browser_toolbar_menu_item_inset_vertical"
|
||||
android:insetLeft="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal"
|
||||
android:insetRight="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/new_tablet_highlight_focused_pb"/>
|
||||
<corners android:radius="@dimen/new_tablet_browser_toolbar_menu_item_corner_radius"/>
|
||||
</shape>
|
||||
</inset>
|
||||
|
||||
</item>
|
||||
|
||||
<item android:state_pressed="true"
|
||||
android:state_enabled="true">
|
||||
|
@ -11,7 +11,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignLeft="@+id/back"
|
||||
android:layout_toLeftOf="@id/menu_items"
|
||||
android:layout_marginLeft="@dimen/back_button_width_half"
|
||||
android:layout_marginLeft="@dimen/new_tablet_nav_button_width_half"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:duplicateParentState="true"
|
||||
@ -25,8 +25,8 @@
|
||||
|
||||
<org.mozilla.gecko.toolbar.BackButton android:id="@id/back"
|
||||
style="@style/UrlBar.ImageButton.NewTablet"
|
||||
android:layout_width="@dimen/back_button_width"
|
||||
android:layout_height="@dimen/back_button_width"
|
||||
android:layout_width="@dimen/new_tablet_nav_button_width"
|
||||
android:layout_height="@dimen/new_tablet_nav_button_width"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="12dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
@ -43,8 +43,7 @@
|
||||
android:layout_toRightOf="@id/back"
|
||||
android:layout_toLeftOf="@id/menu_items"/>
|
||||
|
||||
<!-- Note: * Values of marginLeft are used to animate the forward button so don't change its value.
|
||||
* We set the padding on the site security icon to increase its tappable area. -->
|
||||
<!-- Note: we set the padding on the site security icon to increase its tappable area. -->
|
||||
<org.mozilla.gecko.toolbar.ToolbarDisplayLayout android:id="@+id/display_layout"
|
||||
style="@style/UrlBar.Button.Container"
|
||||
android:layout_toRightOf="@id/back"
|
||||
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 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/. -->
|
||||
|
||||
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:src="@null"/>
|
@ -8,10 +8,6 @@
|
||||
<dimen name="browser_toolbar_height">56dp</dimen>
|
||||
<dimen name="browser_toolbar_button_padding">16dp</dimen>
|
||||
|
||||
<!-- If you update one of these values, update the other. -->
|
||||
<dimen name="back_button_width">42dp</dimen>
|
||||
<dimen name="back_button_width_half">21dp</dimen>
|
||||
|
||||
<dimen name="tabs_counter_size">26sp</dimen>
|
||||
<dimen name="panel_grid_view_column_width">200dp</dimen>
|
||||
|
||||
|
@ -25,8 +25,9 @@
|
||||
<item name="android:layout_marginLeft">@dimen/forward_default_offset</item>
|
||||
</style>
|
||||
|
||||
<!-- Note: this style is for the visible and expanded forward button. We translate/hide
|
||||
the forward button in code - see BrowserToolbarNewTablet.animateForwardButton. -->
|
||||
<style name="UrlBar.ImageButton.Forward.NewTablet">
|
||||
<item name="android:layout_marginLeft">@dimen/new_tablet_forward_default_offset</item>
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
<item name="android:paddingTop">0dp</item>
|
||||
<item name="android:paddingBottom">0dp</item>
|
||||
@ -34,6 +35,20 @@
|
||||
<item name="android:layout_marginBottom">11.5dp</item>
|
||||
<item name="android:src">@drawable/new_tablet_ic_menu_forward</item>
|
||||
<item name="android:background">@drawable/new_tablet_url_bar_nav_button</item>
|
||||
|
||||
<!-- The visible area of the forward button is a nav_button_width and the
|
||||
non-visible area slides halfway under the back button. This non-visible
|
||||
area is used to ensure the forward button background fully
|
||||
covers the space to the right of the back button. -->
|
||||
<item name="android:layout_width">@dimen/new_tablet_nav_button_width_plus_half</item>
|
||||
|
||||
<!-- (See note above) We left align with back,
|
||||
but only need to hide halfway underneath. -->
|
||||
<item name="android:layout_marginLeft">@dimen/new_tablet_nav_button_width_half</item>
|
||||
|
||||
<!-- We use left padding to center the arrow in the
|
||||
visible area as opposed to the true width. -->
|
||||
<item name="android:paddingLeft">18dp</item>
|
||||
</style>
|
||||
|
||||
<style name="UrlBar.ImageButton.TabCount.NewTablet">
|
||||
|
@ -17,11 +17,15 @@
|
||||
<dimen name="browser_toolbar_favicon_size">21.33dip</dimen>
|
||||
<dimen name="browser_toolbar_shadow_size">2dp</dimen>
|
||||
|
||||
<!-- If you update one of these values, update the others. -->
|
||||
<dimen name="new_tablet_nav_button_width">42dp</dimen>
|
||||
<dimen name="new_tablet_nav_button_width_half">21dp</dimen>
|
||||
<dimen name="new_tablet_nav_button_width_plus_half">63dp</dimen>
|
||||
|
||||
<dimen name="new_tablet_tab_strip_height">48dp</dimen>
|
||||
<dimen name="new_tablet_tab_strip_item_width">250dp</dimen>
|
||||
<dimen name="new_tablet_tab_strip_item_margin">-30dp</dimen>
|
||||
<dimen name="new_tablet_tab_strip_favicon_size">16dp</dimen>
|
||||
<dimen name="new_tablet_forward_default_offset">-6dp</dimen>
|
||||
<dimen name="new_tablet_site_security_height">60dp</dimen>
|
||||
<dimen name="new_tablet_site_security_width">34dp</dimen>
|
||||
<!-- We primarily use padding (instead of margins) to increase the hit area. -->
|
||||
|
@ -10,7 +10,6 @@ import org.mozilla.gecko.animation.PropertyAnimator;
|
||||
import org.mozilla.gecko.animation.ViewHelper;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
/**
|
||||
@ -21,15 +20,18 @@ class BrowserToolbarNewTablet extends BrowserToolbarTabletBase {
|
||||
|
||||
private static final int FORWARD_ANIMATION_DURATION = 450;
|
||||
|
||||
private final int urlBarViewOffset;
|
||||
private final int defaultForwardMargin;
|
||||
private final int forwardButtonTranslationWidth;
|
||||
|
||||
public BrowserToolbarNewTablet(final Context context, final AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
|
||||
final Resources res = getResources();
|
||||
urlBarViewOffset = res.getDimensionPixelSize(R.dimen.url_bar_offset_left);
|
||||
defaultForwardMargin = res.getDimensionPixelSize(R.dimen.new_tablet_forward_default_offset);
|
||||
forwardButtonTranslationWidth =
|
||||
getResources().getDimensionPixelOffset(R.dimen.new_tablet_nav_button_width);
|
||||
|
||||
// The forward button is initially expanded (in the layout file)
|
||||
// so translate it for start of the expansion animation; future
|
||||
// iterations translate it to this position when hiding and will already be set up.
|
||||
ViewHelper.setTranslationX(forwardButton, -forwardButtonTranslationWidth);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -49,25 +51,24 @@ class BrowserToolbarNewTablet extends BrowserToolbarTabletBase {
|
||||
|
||||
@Override
|
||||
protected void animateForwardButton(final ForwardButtonAnimation animation) {
|
||||
final boolean showing = (animation == ForwardButtonAnimation.SHOW);
|
||||
final boolean willShowForward = (animation == ForwardButtonAnimation.SHOW);
|
||||
|
||||
// if the forward button's margin is non-zero, this means it has already
|
||||
// been animated to be visible¸ and vice-versa.
|
||||
MarginLayoutParams fwdParams = (MarginLayoutParams) forwardButton.getLayoutParams();
|
||||
if ((fwdParams.leftMargin > defaultForwardMargin && showing) ||
|
||||
(fwdParams.leftMargin == defaultForwardMargin && !showing)) {
|
||||
// If we're not in the appropriate state to start a particular animation,
|
||||
// then we must be in the opposite state and do not need to animate.
|
||||
final float forwardOffset = ViewHelper.getTranslationX(forwardButton);
|
||||
if ((forwardOffset >= 0 && willShowForward) ||
|
||||
forwardOffset < 0 && !willShowForward) {
|
||||
return;
|
||||
}
|
||||
|
||||
// We want the forward button to show immediately when switching tabs
|
||||
final PropertyAnimator forwardAnim =
|
||||
new PropertyAnimator(isSwitchingTabs ? 10 : FORWARD_ANIMATION_DURATION);
|
||||
final int width = Math.round(forwardButton.getWidth() * .75f);
|
||||
|
||||
forwardAnim.addPropertyAnimationListener(new PropertyAnimator.PropertyAnimationListener() {
|
||||
@Override
|
||||
public void onPropertyAnimationStart() {
|
||||
if (!showing) {
|
||||
if (!willShowForward) {
|
||||
// Set the margin before the transition when hiding the forward button. We
|
||||
// have to do this so that the favicon isn't clipped during the transition
|
||||
MarginLayoutParams layoutParams =
|
||||
@ -87,26 +88,23 @@ class BrowserToolbarNewTablet extends BrowserToolbarTabletBase {
|
||||
|
||||
@Override
|
||||
public void onPropertyAnimationEnd() {
|
||||
if (showing) {
|
||||
if (willShowForward) {
|
||||
// Increase the margins to ensure the text does not run outside the View.
|
||||
MarginLayoutParams layoutParams =
|
||||
(MarginLayoutParams) urlDisplayLayout.getLayoutParams();
|
||||
layoutParams.leftMargin = urlBarViewOffset;
|
||||
layoutParams.leftMargin = forwardButtonTranslationWidth;
|
||||
|
||||
layoutParams = (MarginLayoutParams) urlEditLayout.getLayoutParams();
|
||||
layoutParams.leftMargin = urlBarViewOffset;
|
||||
layoutParams.leftMargin = forwardButtonTranslationWidth;
|
||||
}
|
||||
|
||||
urlDisplayLayout.finishForwardAnimation();
|
||||
|
||||
MarginLayoutParams layoutParams = (MarginLayoutParams) forwardButton.getLayoutParams();
|
||||
layoutParams.leftMargin = defaultForwardMargin + (showing ? width : 0);
|
||||
ViewHelper.setTranslationX(forwardButton, 0);
|
||||
|
||||
requestLayout();
|
||||
}
|
||||
});
|
||||
|
||||
prepareForwardAnimation(forwardAnim, animation, width);
|
||||
prepareForwardAnimation(forwardAnim, animation, forwardButtonTranslationWidth);
|
||||
forwardAnim.start();
|
||||
}
|
||||
|
||||
@ -122,7 +120,7 @@ class BrowserToolbarNewTablet extends BrowserToolbarTabletBase {
|
||||
} else {
|
||||
anim.attach(forwardButton,
|
||||
PropertyAnimator.Property.TRANSLATION_X,
|
||||
width);
|
||||
0);
|
||||
anim.attach(forwardButton,
|
||||
PropertyAnimator.Property.ALPHA,
|
||||
1);
|
||||
|
@ -10,6 +10,7 @@ import java.util.Arrays;
|
||||
import org.mozilla.gecko.R;
|
||||
import org.mozilla.gecko.Tab;
|
||||
import org.mozilla.gecko.Tabs;
|
||||
import org.mozilla.gecko.menu.MenuItemActionBar;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
@ -121,8 +122,13 @@ abstract class BrowserToolbarTabletBase extends BrowserToolbar {
|
||||
@Override
|
||||
public void setPrivateMode(final boolean isPrivate) {
|
||||
super.setPrivateMode(isPrivate);
|
||||
|
||||
backButton.setPrivateMode(isPrivate);
|
||||
forwardButton.setPrivateMode(isPrivate);
|
||||
for (int i = 0; i < actionItemBar.getChildCount(); ++i) {
|
||||
final MenuItemActionBar child = (MenuItemActionBar) actionItemBar.getChildAt(i);
|
||||
child.setPrivateMode(isPrivate);
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean canDoBack(final Tab tab) {
|
||||
|
@ -535,6 +535,8 @@ public class ToolbarDisplayLayout extends ThemedLinearLayout
|
||||
mForwardAnim = anim;
|
||||
|
||||
if (animation == ForwardButtonAnimation.HIDE) {
|
||||
// We animate these items individually, rather than this entire view,
|
||||
// so that we don't animate certain views, e.g. the stop button.
|
||||
anim.attach(mTitle,
|
||||
PropertyAnimator.Property.TRANSLATION_X,
|
||||
0);
|
||||
|
@ -1,4 +1,5 @@
|
||||
//#filter substitution
|
||||
//#define VIEW_NAME_SUFFIX EditText
|
||||
//#define BASE_TYPE android.widget.EditText
|
||||
//#define STYLE_CONSTRUCTOR 1
|
||||
//#include ThemedView.java.frag
|
||||
|
@ -1,4 +1,5 @@
|
||||
//#filter substitution
|
||||
//#define VIEW_NAME_SUFFIX ImageButton
|
||||
//#define BASE_TYPE android.widget.ImageButton
|
||||
//#define STYLE_CONSTRUCTOR 1
|
||||
//#include ThemedView.java.frag
|
||||
|
@ -1,4 +1,5 @@
|
||||
//#filter substitution
|
||||
//#define VIEW_NAME_SUFFIX ImageView
|
||||
//#define BASE_TYPE android.widget.ImageView
|
||||
//#define STYLE_CONSTRUCTOR 1
|
||||
//#include ThemedView.java.frag
|
||||
|
@ -1,4 +1,5 @@
|
||||
//#filter substitution
|
||||
//#define VIEW_NAME_SUFFIX RelativeLayout
|
||||
//#define BASE_TYPE android.widget.RelativeLayout
|
||||
//#define STYLE_CONSTRUCTOR 1
|
||||
//#include ThemedView.java.frag
|
||||
|
@ -1,4 +1,5 @@
|
||||
//#filter substitution
|
||||
//#define VIEW_NAME_SUFFIX TextView
|
||||
//#define BASE_TYPE android.widget.TextView
|
||||
//#define STYLE_CONSTRUCTOR 1
|
||||
//#include ThemedView.java.frag
|
||||
|
@ -15,7 +15,7 @@ import android.util.AttributeSet;
|
||||
|
||||
public class Themed@VIEW_NAME_SUFFIX@ extends @BASE_TYPE@
|
||||
implements LightweightTheme.OnChangeListener {
|
||||
private final LightweightTheme mTheme;
|
||||
private LightweightTheme mTheme;
|
||||
|
||||
private static final int[] STATE_PRIVATE_MODE = { R.attr.state_private };
|
||||
private static final int[] STATE_LIGHT = { R.attr.state_light };
|
||||
@ -32,9 +32,20 @@ public class Themed@VIEW_NAME_SUFFIX@ extends @BASE_TYPE@
|
||||
|
||||
public Themed@VIEW_NAME_SUFFIX@(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
initialize(context, attrs);
|
||||
}
|
||||
|
||||
//#ifdef STYLE_CONSTRUCTOR
|
||||
public Themed@VIEW_NAME_SUFFIX@(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
initialize(context, attrs);
|
||||
}
|
||||
|
||||
//#endif
|
||||
private void initialize(final Context context, final AttributeSet attrs) {
|
||||
mTheme = ((GeckoApplication) context.getApplicationContext()).getLightweightTheme();
|
||||
|
||||
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.LightweightTheme);
|
||||
final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.LightweightTheme);
|
||||
mAutoUpdateTheme = a.getBoolean(R.styleable.LightweightTheme_autoUpdateTheme, true);
|
||||
a.recycle();
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
//#filter substitution
|
||||
//#define VIEW_NAME_SUFFIX View
|
||||
//#define BASE_TYPE android.view.View
|
||||
//#define STYLE_CONSTRUCTOR 1
|
||||
//#include ThemedView.java.frag
|
||||
|
@ -142,6 +142,10 @@ public final class Reporter extends BroadcastReceiver {
|
||||
|
||||
Map<String, ScanResult> currentWifiData = mBundle.getWifiData();
|
||||
for (ScanResult result : results) {
|
||||
if (currentWifiData.size() > MAX_WIFIS_PER_LOCATION) {
|
||||
return;
|
||||
}
|
||||
|
||||
String key = result.BSSID;
|
||||
if (!currentWifiData.containsKey(key)) {
|
||||
currentWifiData.put(key, result);
|
||||
@ -156,6 +160,9 @@ public final class Reporter extends BroadcastReceiver {
|
||||
|
||||
Map<String, CellInfo> currentCellData = mBundle.getCellData();
|
||||
for (CellInfo result : cells) {
|
||||
if (currentCellData.size() > MAX_CELLS_PER_LOCATION) {
|
||||
return;
|
||||
}
|
||||
String key = result.getCellIdentity();
|
||||
if (!currentCellData.containsKey(key)) {
|
||||
currentCellData.put(key, result);
|
||||
@ -191,7 +198,9 @@ public final class Reporter extends BroadcastReceiver {
|
||||
Log.d(LOG_TAG, "Received bundle: " + mlsObj.toString());
|
||||
}
|
||||
|
||||
AppGlobals.guiLogInfo(mlsObj.toString());
|
||||
if (wifiCount + cellCount < 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
DataStorageManager.getInstance().insert(mlsObj.toString(), wifiCount, cellCount);
|
||||
|
@ -1092,4 +1092,4 @@ static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = {
|
||||
|
||||
static const int32_t kUnknownId = -1;
|
||||
|
||||
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1421489353719000);
|
||||
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1422094197058000);
|
||||
|
@ -8,13 +8,14 @@ apis.google.com: did not receive HSTS header (error ignored - included regardles
|
||||
app.manilla.com: could not connect to host
|
||||
appengine.google.com: did not receive HSTS header (error ignored - included regardless)
|
||||
appseccalifornia.org: did not receive HSTS header
|
||||
auf-feindgebiet.de: could not connect to host
|
||||
azprep.us: did not receive HSTS header
|
||||
bassh.net: did not receive HSTS header
|
||||
bccx.com: could not connect to host
|
||||
bedeta.de: could not connect to host
|
||||
betnet.fr: could not connect to host
|
||||
bigshinylock.minazo.net: could not connect to host
|
||||
blog.lookout.com: did not receive HSTS header
|
||||
boxcryptor.com: could not connect to host
|
||||
braintreegateway.com: did not receive HSTS header
|
||||
braintreepayments.com: did not receive HSTS header
|
||||
browserid.org: did not receive HSTS header
|
||||
@ -90,7 +91,7 @@ m.gparent.org: could not connect to host
|
||||
mail.google.com: did not receive HSTS header (error ignored - included regardless)
|
||||
market.android.com: did not receive HSTS header (error ignored - included regardless)
|
||||
markusueberallassetmanagement.de: could not connect to host
|
||||
matteomarescotti.name: could not connect to host
|
||||
matteomarescotti.name: max-age too low: 0
|
||||
mobilethreat.net: could not connect to host
|
||||
mobilethreatnetwork.net: could not connect to host
|
||||
mudcrab.us: could not connect to host
|
||||
@ -117,12 +118,12 @@ profiles.google.com: did not receive HSTS header (error ignored - included regar
|
||||
promecon-gmbh.de: did not receive HSTS header
|
||||
rapidresearch.me: could not connect to host
|
||||
riseup.net: did not receive HSTS header
|
||||
rme.li: did not receive HSTS header
|
||||
robteix.com: did not receive HSTS header
|
||||
sah3.net: could not connect to host
|
||||
saturngames.co.uk: did not receive HSTS header
|
||||
script.google.com: did not receive HSTS header (error ignored - included regardless)
|
||||
security.google.com: did not receive HSTS header (error ignored - included regardless)
|
||||
secuvera.de: could not connect to host
|
||||
semenkovich.com: did not receive HSTS header
|
||||
serverdensity.io: did not receive HSTS header
|
||||
shops.neonisi.com: could not connect to host
|
||||
@ -148,8 +149,6 @@ translate.googleapis.com: did not receive HSTS header (error ignored - included
|
||||
uprotect.it: could not connect to host
|
||||
wallet.google.com: did not receive HSTS header (error ignored - included regardless)
|
||||
webmail.mayfirst.org: did not receive HSTS header
|
||||
wf-training-master.appspot.com: could not connect to host
|
||||
wf-training-master.appspot.com: could not connect to host (error ignored - included regardless)
|
||||
whonix.org: did not receive HSTS header
|
||||
wiz.biz: did not receive HSTS header
|
||||
www.calyxinstitute.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 126" data: no]
|
||||
|
@ -8,7 +8,7 @@
|
||||
/*****************************************************************************/
|
||||
|
||||
#include <stdint.h>
|
||||
const PRTime gPreloadListExpirationTime = INT64_C(1423908549615000);
|
||||
const PRTime gPreloadListExpirationTime = INT64_C(1424513391772000);
|
||||
|
||||
class nsSTSPreload
|
||||
{
|
||||
@ -270,7 +270,6 @@ static const nsSTSPreload kSTSPreloadList[] = {
|
||||
{ "market.android.com", true },
|
||||
{ "markusueberallassetmanagement.de", true },
|
||||
{ "mathiasbynens.be", true },
|
||||
{ "matteomarescotti.name", true },
|
||||
{ "mattmccutchen.net", true },
|
||||
{ "mbp.banking.co.at", false },
|
||||
{ "mediacru.sh", true },
|
||||
@ -352,7 +351,6 @@ static const nsSTSPreload kSTSPreloadList[] = {
|
||||
{ "riccy.org", true },
|
||||
{ "riesenmagnete.de", true },
|
||||
{ "rippleunion.com", true },
|
||||
{ "rme.li", false },
|
||||
{ "roddis.net", false },
|
||||
{ "romab.com", true },
|
||||
{ "rosenkeller.org", true },
|
||||
|
@ -47,7 +47,8 @@ this.SearchSuggestionController = function SearchSuggestionController(callback =
|
||||
|
||||
this.SearchSuggestionController.prototype = {
|
||||
/**
|
||||
* The maximum number of local form history results to return.
|
||||
* The maximum number of local form history results to return. This limit is
|
||||
* only enforced if remote results are also returned.
|
||||
*/
|
||||
maxLocalResults: 7,
|
||||
|
||||
@ -200,8 +201,7 @@ this.SearchSuggestionController.prototype = {
|
||||
return;
|
||||
}
|
||||
let fhEntries = [];
|
||||
let maxHistoryItems = Math.min(result.matchCount, this.maxLocalResults);
|
||||
for (let i = 0; i < maxHistoryItems; ++i) {
|
||||
for (let i = 0; i < result.matchCount; ++i) {
|
||||
fhEntries.push(result.getValueAt(i));
|
||||
}
|
||||
deferredFormHistory.resolve({
|
||||
@ -335,8 +335,13 @@ this.SearchSuggestionController.prototype = {
|
||||
}
|
||||
}
|
||||
|
||||
// If we have remote results, cap the number of local results
|
||||
if (results.remote.length) {
|
||||
results.local = results.local.slice(0, this.maxLocalResults);
|
||||
}
|
||||
|
||||
// We don't want things to appear in both history and suggestions so remove entries from
|
||||
// remote results that are alrady in local.
|
||||
// remote results that are already in local.
|
||||
if (results.remote.length && results.local.length) {
|
||||
for (let i = 0; i < results.local.length; ++i) {
|
||||
let term = results.local[i];
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user