Merge mozilla-central to mozilla-inbound
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8a1e4ae522c121c5cacd39b20a5386ec9055db82"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="0b166043ef2a1f235a4d7d4f40a51b625784195a"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3477513bcd385571aa01c0d074849e35bd5e2376"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
@ -23,7 +23,7 @@
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0a749b6475889d1f7db8da4385c77aadfe5b06d5"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="1ec161cddbdc631508816d74b0978a7aeba56e78"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8a1e4ae522c121c5cacd39b20a5386ec9055db82"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="0b166043ef2a1f235a4d7d4f40a51b625784195a"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3477513bcd385571aa01c0d074849e35bd5e2376"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
@ -23,7 +23,7 @@
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0a749b6475889d1f7db8da4385c77aadfe5b06d5"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="1ec161cddbdc631508816d74b0978a7aeba56e78"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>
|
||||
|
@ -19,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="8a1e4ae522c121c5cacd39b20a5386ec9055db82"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="0b166043ef2a1f235a4d7d4f40a51b625784195a"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3477513bcd385571aa01c0d074849e35bd5e2376"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="87a2d8ab9248540910e56921654367b78a587095"/>
|
||||
|
@ -17,10 +17,10 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8a1e4ae522c121c5cacd39b20a5386ec9055db82"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="0b166043ef2a1f235a4d7d4f40a51b625784195a"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3477513bcd385571aa01c0d074849e35bd5e2376"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0a749b6475889d1f7db8da4385c77aadfe5b06d5"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="1ec161cddbdc631508816d74b0978a7aeba56e78"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8a1e4ae522c121c5cacd39b20a5386ec9055db82"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="0b166043ef2a1f235a4d7d4f40a51b625784195a"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3477513bcd385571aa01c0d074849e35bd5e2376"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
@ -23,7 +23,7 @@
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0a749b6475889d1f7db8da4385c77aadfe5b06d5"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="1ec161cddbdc631508816d74b0978a7aeba56e78"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="f92a936f2aa97526d4593386754bdbf02db07a12"/>
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="6e47ff2790f5656b5b074407829ceecf3e6188c4"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="61e82f99bb8bc78d52b5717e9a2481ec7267fa33">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8a1e4ae522c121c5cacd39b20a5386ec9055db82"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="0b166043ef2a1f235a4d7d4f40a51b625784195a"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3477513bcd385571aa01c0d074849e35bd5e2376"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
@ -23,7 +23,7 @@
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0a749b6475889d1f7db8da4385c77aadfe5b06d5"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="1ec161cddbdc631508816d74b0978a7aeba56e78"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="pdk,linux" name="platform/prebuilts/clang/linux-x86/host/3.5" path="prebuilts/clang/linux-x86/host/3.5" revision="ffc05a232799fe8fcb3e47b7440b52b1fb4244c0"/>
|
||||
<project groups="pdk,linux,arm" name="platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" path="prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" revision="337e0ef5e40f02a1ae59b90db0548976c70a7226"/>
|
||||
|
@ -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="8a1e4ae522c121c5cacd39b20a5386ec9055db82"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="0b166043ef2a1f235a4d7d4f40a51b625784195a"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3477513bcd385571aa01c0d074849e35bd5e2376"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="87a2d8ab9248540910e56921654367b78a587095"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8a1e4ae522c121c5cacd39b20a5386ec9055db82"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="0b166043ef2a1f235a4d7d4f40a51b625784195a"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3477513bcd385571aa01c0d074849e35bd5e2376"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
@ -23,7 +23,7 @@
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0a749b6475889d1f7db8da4385c77aadfe5b06d5"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="1ec161cddbdc631508816d74b0978a7aeba56e78"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"git": {
|
||||
"git_revision": "8a1e4ae522c121c5cacd39b20a5386ec9055db82",
|
||||
"git_revision": "0b166043ef2a1f235a4d7d4f40a51b625784195a",
|
||||
"remote": "https://git.mozilla.org/releases/gaia.git",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "155bda717bccdcab21d76d66aeebe400d887fb39",
|
||||
"revision": "8fc4e30c525ad4801000e23bb739fe794c397cd6",
|
||||
"repo_path": "integration/gaia-central"
|
||||
}
|
||||
|
@ -17,10 +17,10 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8a1e4ae522c121c5cacd39b20a5386ec9055db82"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="0b166043ef2a1f235a4d7d4f40a51b625784195a"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3477513bcd385571aa01c0d074849e35bd5e2376"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0a749b6475889d1f7db8da4385c77aadfe5b06d5"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="1ec161cddbdc631508816d74b0978a7aeba56e78"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="61e82f99bb8bc78d52b5717e9a2481ec7267fa33">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8a1e4ae522c121c5cacd39b20a5386ec9055db82"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="0b166043ef2a1f235a4d7d4f40a51b625784195a"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3477513bcd385571aa01c0d074849e35bd5e2376"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
@ -23,7 +23,7 @@
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0a749b6475889d1f7db8da4385c77aadfe5b06d5"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="1ec161cddbdc631508816d74b0978a7aeba56e78"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="pdk,linux" name="platform/prebuilts/clang/linux-x86/host/3.5" path="prebuilts/clang/linux-x86/host/3.5" revision="ffc05a232799fe8fcb3e47b7440b52b1fb4244c0"/>
|
||||
<project groups="pdk,linux,arm" name="platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" path="prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" revision="337e0ef5e40f02a1ae59b90db0548976c70a7226"/>
|
||||
|
@ -1665,8 +1665,6 @@ pref("prompts.tab_modal.enabled", true);
|
||||
// Whether the Panorama should animate going in/out of tabs
|
||||
pref("browser.panorama.animate_zoom", true);
|
||||
|
||||
// Defines the url to be used for new tabs.
|
||||
pref("browser.newtab.url", "about:newtab");
|
||||
// Activates preloading of the new tab url.
|
||||
pref("browser.newtab.preload", true);
|
||||
|
||||
@ -1733,7 +1731,7 @@ pref("shumway.swf.whitelist", "http://www.areweflashyet.com/*.swf");
|
||||
pref("image.mem.max_decoded_image_kb", 256000);
|
||||
|
||||
pref("loop.enabled", true);
|
||||
pref("loop.textChat.enabled", false);
|
||||
pref("loop.textChat.enabled", true);
|
||||
pref("loop.server", "https://loop.services.mozilla.com/v0");
|
||||
pref("loop.seenToS", "unseen");
|
||||
pref("loop.showPartnerLogo", true);
|
||||
|
@ -54,6 +54,8 @@ XPCOMUtils.defineLazyModuleGetter(this, "LightweightThemeManager",
|
||||
"resource://gre/modules/LightweightThemeManager.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Pocket",
|
||||
"resource:///modules/Pocket.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "NewTabURL",
|
||||
"resource:///modules/NewTabURL.jsm");
|
||||
|
||||
// Can't use XPCOMUtils for these because the scripts try to define the variables
|
||||
// on window, and so the defineProperty inside defineLazyGetter fails.
|
||||
@ -4091,6 +4093,10 @@ var XULBrowserWindow = {
|
||||
return true;
|
||||
},
|
||||
|
||||
shouldAddToSessionHistory: function(aDocShell, aURI) {
|
||||
return aURI.spec != NewTabURL.get();
|
||||
},
|
||||
|
||||
onProgressChange: function (aWebProgress, aRequest,
|
||||
aCurSelfProgress, aMaxSelfProgress,
|
||||
aCurTotalProgress, aMaxTotalProgress) {
|
||||
@ -6958,6 +6964,10 @@ var gIdentityHandler = {
|
||||
host = this.getEffectiveHost();
|
||||
} catch (e) {
|
||||
// Some URIs might have no hosts.
|
||||
}
|
||||
|
||||
if (!host) {
|
||||
// Fallback for special protocols.
|
||||
host = this._lastUri.specIgnoringRef;
|
||||
}
|
||||
|
||||
|
@ -1241,13 +1241,18 @@
|
||||
|
||||
<svg:svg height="0">
|
||||
#include tab-shape.inc.svg
|
||||
<svg:clipPath id="urlbar-back-button-clip-path" clipPathUnits="userSpaceOnUse">
|
||||
<svg:clipPath id="urlbar-back-button-clip-path">
|
||||
#ifndef XP_MACOSX
|
||||
<svg:path d="m 1,-5 l 0,7.8 c 2.5,3.2 4,6.2 4,10.2 c 0,4 -1.5,7 -4,10 l 0,22l10000,0 l 0,-50 l -10000,0 z"/>
|
||||
<svg:path d="M -9,-4 l 0,1 a 15 15 0 0,1 0,30 l 0,1 l 10000,0 l 0,-32 l -10000,0 z" />
|
||||
#else
|
||||
<svg:path d="M -11,-5 a 16 16 0 0 1 0,34 l 10000,0 l 0,-34 l -10000,0 z"/>
|
||||
#endif
|
||||
</svg:clipPath>
|
||||
#ifdef XP_WIN
|
||||
<svg:clipPath id="urlbar-back-button-clip-path-win10">
|
||||
<svg:path d="M -6,-2 l 0,1 a 15 15 0 0,1 0,30 l 0,1 l 10000,0 l 0,-32 l -10000,0 z" />
|
||||
</svg:clipPath>
|
||||
#endif
|
||||
</svg:svg>
|
||||
|
||||
</vbox>
|
||||
|
@ -56,6 +56,9 @@ addEventListener("DOMFormHasPassword", function(event) {
|
||||
LoginManagerContent.onDOMFormHasPassword(event, content);
|
||||
InsecurePasswordUtils.checkForInsecurePasswords(event.target);
|
||||
});
|
||||
addEventListener("DOMInputPasswordAdded", function(event) {
|
||||
LoginManagerContent.onDOMInputPasswordAdded(event, content);
|
||||
});
|
||||
addEventListener("pageshow", function(event) {
|
||||
LoginManagerContent.onPageShow(event, content);
|
||||
});
|
||||
|
@ -1609,7 +1609,7 @@
|
||||
// and the URL is "about:newtab". We do not support preloading for
|
||||
// custom newtab URLs.
|
||||
return Services.prefs.getBoolPref("browser.newtab.preload") &&
|
||||
!Services.prefs.prefHasUserValue("browser.newtab.url");
|
||||
!NewTabURL.overridden;
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
@ -3487,16 +3487,18 @@
|
||||
|
||||
let b = tab.linkedBrowser;
|
||||
|
||||
if (!b.isRemoteBrowser) {
|
||||
// non-remote browsers are not the problem.
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!b._alive) {
|
||||
// The browser binding has been removed. Dump a bunch of
|
||||
// diagnostic information to the browser console.
|
||||
err("The tabbrowser-remote-browser binding has been removed " +
|
||||
"from the tab being switched to.");
|
||||
let utils = Cc["@mozilla.org/inspector/dom-utils;1"].getService(Ci.inIDOMUtils);
|
||||
let results = utils.getBindingURLs(b);
|
||||
let urls = [];
|
||||
|
||||
for (let i = 0; i < results.length; ++i) {
|
||||
urls.push(results.queryElementAt(i, Ci.nsIURI).spec);
|
||||
}
|
||||
err("The browser has the following bindings:");
|
||||
err(urls);
|
||||
err("MozBinding is currently: " +
|
||||
window.getComputedStyle(b).MozBinding);
|
||||
if (!b.parentNode) {
|
||||
@ -6161,8 +6163,6 @@
|
||||
<binding id="tabbrowser-remote-browser"
|
||||
extends="chrome://global/content/bindings/remote-browser.xml#remote-browser">
|
||||
<implementation>
|
||||
<!-- This will go away if the binding has been removed for some reason. -->
|
||||
<field name="_alive">true</field>
|
||||
<!-- throws exception for unknown schemes -->
|
||||
<method name="loadURIWithFlags">
|
||||
<parameter name="aURI"/>
|
||||
|
@ -8,7 +8,6 @@ function test() {
|
||||
waitForExplicitFinish();
|
||||
let windowsToClose = [];
|
||||
let newTab;
|
||||
let newTabPrefName = "browser.newtab.url";
|
||||
let newTabURL;
|
||||
let mode;
|
||||
|
||||
@ -19,7 +18,7 @@ function test() {
|
||||
newTabURL = "about:privatebrowsing";
|
||||
} else {
|
||||
mode = "normal";
|
||||
newTabURL = Services.prefs.getCharPref(newTabPrefName) || "about:blank";
|
||||
newTabURL = NewTabURL.get();
|
||||
}
|
||||
|
||||
is(aWindow.gBrowser.currentURI.spec, newTabURL,
|
||||
|
@ -5,7 +5,6 @@
|
||||
function test() {
|
||||
//initialization
|
||||
waitForExplicitFinish();
|
||||
let newTabPrefName = "browser.newtab.url";
|
||||
let newTabURL;
|
||||
let testURL = "http://example.com/";
|
||||
let mode;
|
||||
@ -17,24 +16,24 @@ function test() {
|
||||
newTabURL = "about:privatebrowsing";
|
||||
} else {
|
||||
mode = "normal";
|
||||
newTabURL = Services.prefs.getCharPref(newTabPrefName) || "about:blank";
|
||||
newTabURL = NewTabURL.get();
|
||||
}
|
||||
|
||||
// Check the new tab opened while in normal/private mode
|
||||
is(aWindow.gBrowser.selectedBrowser.currentURI.spec, newTabURL,
|
||||
"URL of NewTab should be " + newTabURL + " in " + mode + " mode");
|
||||
// Set the custom newtab url
|
||||
Services.prefs.setCharPref(newTabPrefName, testURL);
|
||||
ok(Services.prefs.prefHasUserValue(newTabPrefName), "Custom newtab url is set");
|
||||
NewTabURL.override(testURL);
|
||||
is(NewTabURL.get(), testURL, "Custom newtab url is set");
|
||||
|
||||
// Open a newtab after setting the custom newtab url
|
||||
openNewTab(aWindow, function () {
|
||||
is(aWindow.gBrowser.selectedBrowser.currentURI.spec, testURL,
|
||||
"URL of NewTab should be the custom url");
|
||||
|
||||
// clear the custom url preference
|
||||
Services.prefs.clearUserPref(newTabPrefName);
|
||||
ok(!Services.prefs.prefHasUserValue(newTabPrefName), "No custom newtab url is set");
|
||||
// Clear the custom url.
|
||||
NewTabURL.reset();
|
||||
is(NewTabURL.get(), "about:newtab", "No custom newtab url is set");
|
||||
|
||||
aWindow.gBrowser.removeTab(aWindow.gBrowser.selectedTab);
|
||||
aWindow.gBrowser.removeTab(aWindow.gBrowser.selectedTab);
|
||||
@ -51,7 +50,7 @@ function test() {
|
||||
}
|
||||
|
||||
// check whether any custom new tab url has been configured
|
||||
ok(!Services.prefs.prefHasUserValue(newTabPrefName), "No custom newtab url is set");
|
||||
ok(!NewTabURL.overridden, "No custom newtab url is set");
|
||||
|
||||
// test normal mode
|
||||
testOnWindow(false, function(aWindow) {
|
||||
|
@ -330,7 +330,9 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
url = action.params.url;
|
||||
} else if (action.type == "searchengine") {
|
||||
let engine = Services.search.getEngineByName(action.params.engineName);
|
||||
let submission = engine.getSubmission(action.params.searchQuery);
|
||||
let query = action.params.searchSuggestion ||
|
||||
action.params.searchQuery;
|
||||
let submission = engine.getSubmission(query);
|
||||
|
||||
url = submission.uri.spec;
|
||||
postData = submission.postData;
|
||||
@ -790,12 +792,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
try {
|
||||
action.params = JSON.parse(params);
|
||||
if (action.params.input) {
|
||||
action.params.input = decodeURIComponent(action.params.input);
|
||||
}
|
||||
if (action.params.searchQuery) {
|
||||
action.params.searchQuery = decodeURIComponent(action.params.searchQuery);
|
||||
}
|
||||
} catch (e) {
|
||||
// If this failed, we assume that params is not a JSON object, and
|
||||
// is instead just a flat string. This will happen when
|
||||
@ -804,6 +800,17 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
action.params = {
|
||||
url: params,
|
||||
}
|
||||
return action;
|
||||
}
|
||||
|
||||
for (let key of [
|
||||
"input",
|
||||
"searchQuery",
|
||||
"searchSuggestion",
|
||||
]) {
|
||||
if (action.params[key]) {
|
||||
action.params[key] = decodeURIComponent(action.params[key]);
|
||||
}
|
||||
}
|
||||
|
||||
return action;
|
||||
@ -1577,7 +1584,9 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
}
|
||||
case "searchengine": {
|
||||
let engine = Services.search.getEngineByName(action.params.engineName);
|
||||
let submission = engine.getSubmission(action.params.searchQuery);
|
||||
let query = action.params.searchSuggestion ||
|
||||
action.params.searchQuery;
|
||||
let submission = engine.getSubmission(query);
|
||||
url = submission.uri.spec;
|
||||
options.postData = submission.postData;
|
||||
break;
|
||||
|
@ -9,32 +9,16 @@ Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
|
||||
Components.utils.import("resource:///modules/RecentWindow.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "BROWSER_NEW_TAB_URL", function () {
|
||||
const PREF = "browser.newtab.url";
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "NewTabURL",
|
||||
"resource:///modules/NewTabURL.jsm");
|
||||
|
||||
function getNewTabPageURL() {
|
||||
if (PrivateBrowsingUtils.isWindowPrivate(window) &&
|
||||
!PrivateBrowsingUtils.permanentPrivateBrowsing &&
|
||||
!Services.prefs.prefHasUserValue(PREF)) {
|
||||
return "about:privatebrowsing";
|
||||
}
|
||||
|
||||
let url = Services.prefs.getComplexValue(PREF, Ci.nsISupportsString).data;
|
||||
return url || "about:blank";
|
||||
this.__defineGetter__("BROWSER_NEW_TAB_URL", () => {
|
||||
if (PrivateBrowsingUtils.isWindowPrivate(window) &&
|
||||
!PrivateBrowsingUtils.permanentPrivateBrowsing &&
|
||||
!NewTabURL.overridden) {
|
||||
return "about:privatebrowsing";
|
||||
}
|
||||
|
||||
function update() {
|
||||
BROWSER_NEW_TAB_URL = getNewTabPageURL();
|
||||
}
|
||||
|
||||
Services.prefs.addObserver(PREF, update, false);
|
||||
|
||||
addEventListener("unload", function onUnload() {
|
||||
removeEventListener("unload", onUnload);
|
||||
Services.prefs.removeObserver(PREF, update);
|
||||
});
|
||||
|
||||
return getNewTabPageURL();
|
||||
return NewTabURL.get();
|
||||
});
|
||||
|
||||
var TAB_DROP_TYPE = "application/x-moz-tabbrowser-tab";
|
||||
|
@ -69,6 +69,9 @@
|
||||
value="&identity.connectionInternal;"/>
|
||||
</vbox>
|
||||
|
||||
<description id="identity-popup-content-verifier"
|
||||
class="identity-popup-text"/>
|
||||
|
||||
<description id="identity-popup-securityView-connection"
|
||||
class="identity-popup-text">&identity.connectionVerified;</description>
|
||||
|
||||
@ -76,8 +79,6 @@
|
||||
class="identity-popup-text"/>
|
||||
<description id="identity-popup-content-supplemental"
|
||||
class="identity-popup-text"/>
|
||||
<description id="identity-popup-content-verifier"
|
||||
class="identity-popup-text"/>
|
||||
</panelview>
|
||||
</panelmultiview>
|
||||
</panel>
|
||||
|
@ -7,4 +7,3 @@ window.OTProperties = {
|
||||
};
|
||||
window.OTProperties.assetURL = window.OTProperties.cdnURL + "sdk-content/";
|
||||
window.OTProperties.configURL = window.OTProperties.assetURL + "js/dynamic_config.min.js";
|
||||
window.OTProperties.cssURL = window.OTProperties.assetURL + "css/ot.css";
|
||||
|
@ -344,6 +344,11 @@ loop.OTSdkDriver = (function() {
|
||||
_onSessionConnectionCompleted: function(error) {
|
||||
if (error) {
|
||||
console.error("Failed to complete connection", error);
|
||||
// We log this here before the connection failure to ensure the metrics
|
||||
// event gets to the server before the leave action occurs. Otherwise
|
||||
// the server won't log the metrics event because the user is no longer
|
||||
// in the room.
|
||||
this._notifyMetricsEvent("sdk.exception." + error.code);
|
||||
this.dispatcher.dispatch(new sharedActions.ConnectionFailure({
|
||||
reason: FAILURE_DETAILS.COULD_NOT_CONNECT
|
||||
}));
|
||||
@ -399,6 +404,7 @@ loop.OTSdkDriver = (function() {
|
||||
|
||||
this._noteConnectionLengthIfNeeded(this._getTwoWayMediaStartTime(),
|
||||
performance.now());
|
||||
this._notifyMetricsEvent("Session." + event.reason);
|
||||
this.dispatcher.dispatch(new sharedActions.ConnectionFailure({
|
||||
reason: reason
|
||||
}));
|
||||
@ -485,9 +491,14 @@ loop.OTSdkDriver = (function() {
|
||||
case "Session.streamDestroyed":
|
||||
this._metrics.recvStreams--;
|
||||
break;
|
||||
case "Session.networkDisconnected":
|
||||
case "Session.forceDisconnected":
|
||||
break;
|
||||
default:
|
||||
console.error("Unexpected event name", eventName);
|
||||
return;
|
||||
if (eventName.indexOf("sdk.exception") === -1) {
|
||||
console.error("Unexpected event name", eventName);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!state) {
|
||||
state = this._getConnectionState();
|
||||
@ -910,6 +921,8 @@ loop.OTSdkDriver = (function() {
|
||||
this.dispatcher.dispatch(new sharedActions.ConnectionFailure({
|
||||
reason: FAILURE_DETAILS.UNABLE_TO_PUBLISH_MEDIA
|
||||
}));
|
||||
} else {
|
||||
this._notifyMetricsEvent("sdk.exception." + event.code);
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -118,18 +118,4 @@ browser.jar:
|
||||
|
||||
# Partner SDK assets
|
||||
content/browser/loop/libs/sdk.js (content/shared/libs/sdk.js)
|
||||
content/browser/loop/sdk-content/css/ot.css (content/shared/libs/sdk-content/css/ot.css)
|
||||
content/browser/loop/sdk-content/js/dynamic_config.min.js (content/shared/libs/sdk-content/js/dynamic_config.min.js)
|
||||
content/browser/loop/sdk-content/images/rtc/access-denied-chrome.png (content/shared/libs/sdk-content/images/rtc/access-denied-chrome.png)
|
||||
content/browser/loop/sdk-content/images/rtc/access-denied-copy-firefox.png (content/shared/libs/sdk-content/images/rtc/access-denied-copy-firefox.png)
|
||||
content/browser/loop/sdk-content/images/rtc/access-denied-firefox.png (content/shared/libs/sdk-content/images/rtc/access-denied-firefox.png)
|
||||
content/browser/loop/sdk-content/images/rtc/access-predenied-chrome.png (content/shared/libs/sdk-content/images/rtc/access-predenied-chrome.png)
|
||||
content/browser/loop/sdk-content/images/rtc/access-prompt-chrome.png (content/shared/libs/sdk-content/images/rtc/access-prompt-chrome.png)
|
||||
content/browser/loop/sdk-content/images/rtc/audioonly-publisher.png (content/shared/libs/sdk-content/images/rtc/audioonly-publisher.png)
|
||||
content/browser/loop/sdk-content/images/rtc/audioonly-subscriber.png (content/shared/libs/sdk-content/images/rtc/audioonly-subscriber.png)
|
||||
content/browser/loop/sdk-content/images/rtc/buttons.png (content/shared/libs/sdk-content/images/rtc/buttons.png)
|
||||
content/browser/loop/sdk-content/images/rtc/loader.gif (content/shared/libs/sdk-content/images/rtc/loader.gif)
|
||||
content/browser/loop/sdk-content/images/rtc/mic-off.png (content/shared/libs/sdk-content/images/rtc/mic-off.png)
|
||||
content/browser/loop/sdk-content/images/rtc/mic-on.png (content/shared/libs/sdk-content/images/rtc/mic-on.png)
|
||||
content/browser/loop/sdk-content/images/rtc/speaker-off.png (content/shared/libs/sdk-content/images/rtc/speaker-off.png)
|
||||
content/browser/loop/sdk-content/images/rtc/speaker-on.png (content/shared/libs/sdk-content/images/rtc/speaker-on.png)
|
||||
|
@ -109,7 +109,6 @@
|
||||
};
|
||||
window.OTProperties.assetURL = window.OTProperties.cdnURL + "sdk-content/";
|
||||
window.OTProperties.configURL = window.OTProperties.assetURL + "js/dynamic_config.min.js";
|
||||
window.OTProperties.cssURL = window.OTProperties.assetURL + "css/ot.css";
|
||||
</script>
|
||||
<script type="text/javascript" src="js/multiplexGum.js"></script>
|
||||
<script type="text/javascript" src="shared/libs/sdk.js"></script>
|
||||
|
@ -67,6 +67,7 @@ describe("loop.OTSdkDriver", function () {
|
||||
|
||||
window.OT = {
|
||||
ExceptionCodes: {
|
||||
CONNECT_FAILED: 1006,
|
||||
UNABLE_TO_PUBLISH: 1500
|
||||
}
|
||||
};
|
||||
@ -388,12 +389,31 @@ describe("loop.OTSdkDriver", function () {
|
||||
sinon.assert.calledOnce(session.publish);
|
||||
});
|
||||
|
||||
it("should notify metrics", function() {
|
||||
session.connect.callsArgWith(2, {
|
||||
title: "Fake",
|
||||
code: OT.ExceptionCodes.CONNECT_FAILED
|
||||
});
|
||||
|
||||
driver.connectSession(sessionData);
|
||||
|
||||
sinon.assert.calledTwice(dispatcher.dispatch);
|
||||
sinon.assert.calledWithExactly(dispatcher.dispatch,
|
||||
new sharedActions.ConnectionStatus({
|
||||
event: "sdk.exception." + OT.ExceptionCodes.CONNECT_FAILED,
|
||||
state: "starting",
|
||||
connections: 0,
|
||||
sendStreams: 0,
|
||||
recvStreams: 0
|
||||
}));
|
||||
});
|
||||
|
||||
it("should dispatch connectionFailure if connecting failed", function() {
|
||||
session.connect.callsArgWith(2, new Error("Failure"));
|
||||
|
||||
driver.connectSession(sessionData);
|
||||
|
||||
sinon.assert.calledOnce(dispatcher.dispatch);
|
||||
sinon.assert.calledTwice(dispatcher.dispatch);
|
||||
sinon.assert.calledWithMatch(dispatcher.dispatch,
|
||||
sinon.match.hasOwn("name", "connectionFailure"));
|
||||
sinon.assert.calledWithMatch(dispatcher.dispatch,
|
||||
@ -723,13 +743,29 @@ describe("loop.OTSdkDriver", function () {
|
||||
});
|
||||
|
||||
describe("sessionDisconnected", function() {
|
||||
it("should notify metrics", function() {
|
||||
session.trigger("sessionDisconnected", {
|
||||
reason: "networkDisconnected"
|
||||
});
|
||||
|
||||
sinon.assert.calledTwice(dispatcher.dispatch);
|
||||
sinon.assert.calledWithExactly(dispatcher.dispatch,
|
||||
new sharedActions.ConnectionStatus({
|
||||
event: "Session.networkDisconnected",
|
||||
state: "starting",
|
||||
connections: 0,
|
||||
sendStreams: 0,
|
||||
recvStreams: 0
|
||||
}));
|
||||
});
|
||||
|
||||
it("should dispatch a connectionFailure action if the session was disconnected",
|
||||
function() {
|
||||
session.trigger("sessionDisconnected", {
|
||||
reason: "networkDisconnected"
|
||||
});
|
||||
|
||||
sinon.assert.calledOnce(dispatcher.dispatch);
|
||||
sinon.assert.calledTwice(dispatcher.dispatch);
|
||||
sinon.assert.calledWithMatch(dispatcher.dispatch,
|
||||
sinon.match.hasOwn("name", "connectionFailure"));
|
||||
sinon.assert.calledWithMatch(dispatcher.dispatch,
|
||||
@ -742,7 +778,7 @@ describe("loop.OTSdkDriver", function () {
|
||||
reason: "forceDisconnected"
|
||||
});
|
||||
|
||||
sinon.assert.calledOnce(dispatcher.dispatch);
|
||||
sinon.assert.calledTwice(dispatcher.dispatch);
|
||||
sinon.assert.calledWithMatch(dispatcher.dispatch,
|
||||
sinon.match.hasOwn("name", "connectionFailure"));
|
||||
sinon.assert.calledWithMatch(dispatcher.dispatch,
|
||||
@ -1368,6 +1404,24 @@ describe("loop.OTSdkDriver", function () {
|
||||
});
|
||||
|
||||
describe("exception", function() {
|
||||
it("should notify metrics", function() {
|
||||
sdk.trigger("exception", {
|
||||
code: OT.ExceptionCodes.CONNECT_FAILED,
|
||||
message: "Fake",
|
||||
title: "Connect Failed"
|
||||
});
|
||||
|
||||
sinon.assert.calledOnce(dispatcher.dispatch);
|
||||
sinon.assert.calledWithExactly(dispatcher.dispatch,
|
||||
new sharedActions.ConnectionStatus({
|
||||
event: "sdk.exception." + OT.ExceptionCodes.CONNECT_FAILED,
|
||||
state: "starting",
|
||||
connections: 0,
|
||||
sendStreams: 0,
|
||||
recvStreams: 0
|
||||
}));
|
||||
});
|
||||
|
||||
describe("Unable to publish (GetUserMedia)", function() {
|
||||
it("should destroy the publisher", function() {
|
||||
sdk.trigger("exception", {
|
||||
@ -1378,6 +1432,25 @@ describe("loop.OTSdkDriver", function () {
|
||||
sinon.assert.calledOnce(publisher.destroy);
|
||||
});
|
||||
|
||||
// XXX We should remove this when we stop being unable to publish as a
|
||||
// workaround for knowing if the user has video as well as audio devices
|
||||
// installed (bug 1138851).
|
||||
it("should not notify metrics", function() {
|
||||
sdk.trigger("exception", {
|
||||
code: OT.ExceptionCodes.UNABLE_TO_PUBLISH,
|
||||
message: "GetUserMedia"
|
||||
});
|
||||
|
||||
sinon.assert.neverCalledWith(dispatcher.dispatch,
|
||||
new sharedActions.ConnectionStatus({
|
||||
event: "sdk.exception." + OT.ExceptionCodes.UNABLE_TO_PUBLISH,
|
||||
state: "starting",
|
||||
connections: 0,
|
||||
sendStreams: 0,
|
||||
recvStreams: 0
|
||||
}));
|
||||
});
|
||||
|
||||
it("should dispatch a ConnectionFailure action", function() {
|
||||
sdk.trigger("exception", {
|
||||
code: OT.ExceptionCodes.UNABLE_TO_PUBLISH,
|
||||
|
@ -35,7 +35,6 @@
|
||||
};
|
||||
window.OTProperties.assetURL = window.OTProperties.cdnURL + 'sdk-content/';
|
||||
window.OTProperties.configURL = window.OTProperties.assetURL + 'js/dynamic_config.min.js';
|
||||
window.OTProperties.cssURL = window.OTProperties.assetURL + 'css/ot.css';
|
||||
</script>
|
||||
<script src="../content/js/multiplexGum.js"></script>
|
||||
<script src="../content/shared/libs/sdk.js"></script>
|
||||
|
@ -28,14 +28,14 @@ add_task(function* () {
|
||||
});
|
||||
|
||||
add_task(function* () {
|
||||
Services.prefs.setCharPref("browser.newtab.url", "about:blank");
|
||||
NewTabURL.override("about:blank");
|
||||
registerCleanupFunction(() => {
|
||||
Services.prefs.clearUserPref("browser.newtab.url");
|
||||
NewTabURL.reset();
|
||||
});
|
||||
|
||||
let win = yield openNewPrivateWindow();
|
||||
checkUrlbarFocus(win);
|
||||
win.close();
|
||||
|
||||
Services.prefs.clearUserPref("browser.newtab.url");
|
||||
NewTabURL.reset();
|
||||
});
|
||||
|
@ -686,6 +686,19 @@ InspectorPanel.prototype = {
|
||||
let copyInnerHTML = this.panelDoc.getElementById("node-menu-copyinner");
|
||||
let copyOuterHTML = this.panelDoc.getElementById("node-menu-copyouter");
|
||||
let scrollIntoView = this.panelDoc.getElementById("node-menu-scrollnodeintoview");
|
||||
let expandAll = this.panelDoc.getElementById("node-menu-expand");
|
||||
let collapse = this.panelDoc.getElementById("node-menu-collapse");
|
||||
|
||||
expandAll.setAttribute("disabled", "true");
|
||||
collapse.setAttribute("disabled", "true");
|
||||
|
||||
let markUpContainer = this.markup.importNode(this.selection.nodeFront, false);
|
||||
if (this.selection.isNode() && markUpContainer.hasChildren) {
|
||||
if (markUpContainer.expanded) {
|
||||
collapse.removeAttribute("disabled");
|
||||
}
|
||||
expandAll.removeAttribute("disabled");
|
||||
}
|
||||
|
||||
this._target.actorHasMethod("domnode", "scrollIntoView").then(value => {
|
||||
scrollIntoView.hidden = !value;
|
||||
@ -1121,6 +1134,14 @@ InspectorPanel.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
expandNode: function() {
|
||||
this.markup.expandAll(this.selection.nodeFront);
|
||||
},
|
||||
|
||||
collapseNode: function() {
|
||||
this.markup.collapseNode(this.selection.nodeFront);
|
||||
},
|
||||
|
||||
/**
|
||||
* This method is here for the benefit of the node-menu-link-follow menu item
|
||||
* in the inspector contextual-menu. It's behavior depends on which node was
|
||||
|
@ -55,6 +55,12 @@
|
||||
<menuitem id="node-menu-showdomproperties"
|
||||
label="&inspectorShowDOMProperties.label;"
|
||||
oncommand="inspector.showDOMProperties()"/>
|
||||
<menuitem id="node-menu-expand"
|
||||
label="&inspectorExpandNode.label;"
|
||||
oncommand="inspector.expandNode()"/>
|
||||
<menuitem id="node-menu-collapse"
|
||||
label="&inspectorCollapseNode.label;"
|
||||
oncommand="inspector.collapseNode()"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="node-menu-pasteinnerhtml"
|
||||
label="&inspectorHTMLPasteInner.label;"
|
||||
|
@ -45,8 +45,7 @@
|
||||
type="search" placeholder="&filterStylesPlaceholder;"/>
|
||||
<button id="ruleview-searchinput-clear" class="devtools-searchinput-clear"></button>
|
||||
</div>
|
||||
<!-- TODO : Bug 1165122 : Show this button by default -->
|
||||
<button hidden="true" id="ruleview-add-rule-button" title="&addRuleButtonTooltip;" class="devtools-button"></button>
|
||||
<button id="ruleview-add-rule-button" title="&addRuleButtonTooltip;" class="devtools-button"></button>
|
||||
<button id="pseudo-class-panel-toggle" title="&togglePseudoClassPanel;" class="devtools-button"></button>
|
||||
</div>
|
||||
<div id="pseudo-class-panel" class="devtools-toolbar" hidden="true">
|
||||
|
@ -47,6 +47,8 @@ body {
|
||||
#pseudo-class-panel > label {
|
||||
-moz-user-select: none;
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.ruleview {
|
||||
|
@ -105,6 +105,16 @@
|
||||
opens the split Console and displays the properties in its side panel. -->
|
||||
<!ENTITY inspectorShowDOMProperties.label "Show DOM Properties">
|
||||
|
||||
<!-- LOCALIZATION NOTE (inspectorExpandNode.label): This is the label
|
||||
shown in the inspector contextual-menu for recursively expanding
|
||||
mark-up elements -->
|
||||
<!ENTITY inspectorExpandNode.label "Expand All">
|
||||
|
||||
<!-- LOCALIZATION NOTE (inspectorCollapseNode.label): This is the label
|
||||
shown in the inspector contextual-menu for recursively collapsing
|
||||
mark-up elements -->
|
||||
<!ENTITY inspectorCollapseNode.label "Collapse">
|
||||
|
||||
<!-- LOCALIZATION NOTE (inspectorScreenshotNode.label): This is the label
|
||||
shown in the inspector contextual-menu for the item that lets users take
|
||||
a screenshot of the currently selected node. -->
|
||||
|
@ -296,6 +296,7 @@ feedback_rejoin_button=Rejoin
|
||||
## LOCALIZATION NOTE (feedback_report_user_button): Used to report a user in the case of
|
||||
## an abusive user.
|
||||
feedback_report_user_button=Report User
|
||||
feedback_request_button=Leave Feedback
|
||||
|
||||
help_label=Help
|
||||
tour_label=Tour
|
||||
|
@ -41,11 +41,11 @@
|
||||
|
||||
<!-- Device Settings -->
|
||||
<!ENTITY syncDeviceName.label "Device Name:">
|
||||
<!ENTITY syncDeviceName.accesskey "c">
|
||||
<!ENTITY fxaSyncDeviceName.label "Device Name">
|
||||
<!ENTITY changeSyncDeviceName.label "Change Device Name...">
|
||||
<!ENTITY changeSyncDeviceName.label "Change Device Name…">
|
||||
<!ENTITY cancelChangeSyncDeviceName.label "Cancel">
|
||||
<!ENTITY saveChangeSyncDeviceName.label "Save">
|
||||
<!ENTITY syncDeviceName.accesskey "c">
|
||||
<!ENTITY unlinkDevice.label "Unlink This Device">
|
||||
|
||||
<!-- Footer stuff -->
|
||||
|
34
browser/modules/NewTabURL.jsm
Normal file
@ -0,0 +1,34 @@
|
||||
/* 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";
|
||||
|
||||
let Cc = Components.classes;
|
||||
let Ci = Components.interfaces;
|
||||
let Cu = Components.utils;
|
||||
|
||||
this.EXPORTED_SYMBOLS = [ "NewTabURL" ];
|
||||
|
||||
this.NewTabURL = {
|
||||
_url: "about:newtab",
|
||||
_overridden: false,
|
||||
|
||||
get: function() {
|
||||
return this._url;
|
||||
},
|
||||
|
||||
get overridden() {
|
||||
return this._overridden;
|
||||
},
|
||||
|
||||
override: function(newURL) {
|
||||
this._url = newURL;
|
||||
this._overridden = true;
|
||||
},
|
||||
|
||||
reset: function() {
|
||||
this._url = "about:newtab";
|
||||
this._overridden = false;
|
||||
}
|
||||
};
|
@ -30,6 +30,7 @@ EXTRA_JS_MODULES += [
|
||||
'FormValidationHandler.jsm',
|
||||
'HiddenFrame.jsm',
|
||||
'NetworkPrioritizer.jsm',
|
||||
'NewTabURL.jsm',
|
||||
'offlineAppCache.jsm',
|
||||
'PanelFrame.jsm',
|
||||
'PluginContent.jsm',
|
||||
|
17
browser/modules/test/xpcshell/test_NewTabURL.js
Normal file
@ -0,0 +1,17 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
"use strict";
|
||||
|
||||
Components.utils.import("resource:///modules/NewTabURL.jsm");
|
||||
|
||||
function run_test() {
|
||||
Assert.equal(NewTabURL.get(), "about:newtab", "Default newtab URL should be about:newtab");
|
||||
let url = "http://example.com/";
|
||||
NewTabURL.override(url);
|
||||
Assert.ok(NewTabURL.overridden, "Newtab URL should be overridden");
|
||||
Assert.equal(NewTabURL.get(), url, "Newtab URL should be the custom URL");
|
||||
NewTabURL.reset();
|
||||
Assert.ok(!NewTabURL.overridden, "Newtab URL should not be overridden");
|
||||
Assert.equal(NewTabURL.get(), "about:newtab", "Newtab URL should be the about:newtab");
|
||||
}
|
@ -5,3 +5,4 @@ firefox-appdir = browser
|
||||
skip-if = toolkit == 'android' || toolkit == 'gonk'
|
||||
|
||||
[test_DirectoryLinksProvider.js]
|
||||
[test_NewTabURL.js]
|
||||
|
@ -2615,10 +2615,8 @@ toolbarbutton.chevron > .toolbarbutton-menu-dropmarker {
|
||||
}
|
||||
|
||||
/* Background tab separators */
|
||||
#tabbrowser-tabs[movingtab] > .tabbrowser-tab[beforeselected]:not([last-visible-tab])::after,
|
||||
.tabbrowser-tab:not([visuallyselected]):not([afterselected-visible]):not([afterhovered]):not([first-visible-tab]):not(:hover)::before,
|
||||
#tabbrowser-tabs:not([overflow]) > .tabbrowser-tab[last-visible-tab]:not([visuallyselected]):not([beforehovered]):not(:hover)::after {
|
||||
background-image: url(chrome://browser/skin/tabbrowser/tab-separator@2x.png);
|
||||
#TabsToolbar:not([brighttext]) {
|
||||
--tab-separator-image: url(chrome://browser/skin/tabbrowser/tab-separator@2x.png);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -191,8 +191,12 @@
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
#identity-popup-content-verifier {
|
||||
color: #636363;
|
||||
}
|
||||
|
||||
#identity-popup-content-owner,
|
||||
#identity-popup-securityView:not(.verifiedDomain) > #identity-popup-content-verifier {
|
||||
#identity-popup-securityView > #identity-popup-securityView-connection.identity-popup-text {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
|
@ -283,6 +283,7 @@ searchbar:not([oneoffui]) .search-go-button {
|
||||
.tabbrowser-tab:not([visuallyselected]):not([afterselected-visible]):not([afterhovered]):not([first-visible-tab]):not(:hover)::before,
|
||||
#tabbrowser-tabs:not([overflow]) > .tabbrowser-tab[last-visible-tab]:not([visuallyselected]):not([beforehovered]):not(:hover)::after {
|
||||
background: var(--tab-separator-color);
|
||||
opacity: 1;
|
||||
width: 1px;
|
||||
-moz-margin-start: 0;
|
||||
-moz-margin-end: -1px;
|
||||
|
@ -280,4 +280,27 @@
|
||||
}
|
||||
#pseudo-class-panel-toggle[checked]::before {
|
||||
background-image: url("chrome://browser/skin/devtools/pseudo-class.svg#pseudo-class-checked");
|
||||
filter: none !important;
|
||||
}
|
||||
|
||||
/**
|
||||
* These buttons are using opacity instead of background color to indicate
|
||||
* the state
|
||||
*/
|
||||
#ruleview-add-rule-button,
|
||||
#pseudo-class-panel-toggle {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
#ruleview-add-rule-button:not([disabled]):hover,
|
||||
#pseudo-class-panel-toggle:hover,
|
||||
#pseudo-class-panel-toggle[checked] {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#ruleview-add-rule-button,
|
||||
#pseudo-class-panel-toggle,
|
||||
#pseudo-class-panel-toggle:hover,
|
||||
#pseudo-class-panel-toggle[checked]::before {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
@ -145,3 +145,11 @@
|
||||
-moz-image-region: rect(0, 96px, 32px, 64px);
|
||||
}
|
||||
}
|
||||
|
||||
#urlbar[actiontype="searchengine"] > #identity-box > #page-proxy-favicon {
|
||||
-moz-image-region: inherit;
|
||||
list-style-image: url(chrome://global/skin/icons/autocomplete-search.svg#search-icon);
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
opacity: 1;
|
||||
}
|
||||
|
@ -8,6 +8,11 @@
|
||||
--tab-toolbar-navbar-overlap: 1px;
|
||||
--tab-min-height: 31px;
|
||||
}
|
||||
#TabsToolbar {
|
||||
--tab-separator-image: url(chrome://browser/skin/tabbrowser/tab-separator.png);
|
||||
--tab-separator-size: 3px 100%;
|
||||
--tab-separator-opacity: 1;
|
||||
}
|
||||
|
||||
%define tabCurveWidth 30px
|
||||
%define tabCurveHalfWidth 15px
|
||||
@ -321,15 +326,22 @@
|
||||
#tabbrowser-tabs:not([overflow]) > .tabbrowser-tab[last-visible-tab]:not([visuallyselected]):not([beforehovered]):not(:hover)::after {
|
||||
-moz-margin-start: -1.5px;
|
||||
-moz-margin-end: -1.5px;
|
||||
background-image: url(chrome://browser/skin/tabbrowser/tab-separator.png);
|
||||
background-image: var(--tab-separator-image);
|
||||
background-position: left bottom var(--tab-toolbar-navbar-overlap);
|
||||
background-repeat: no-repeat;
|
||||
background-size: 3px 100%;
|
||||
background-size: var(--tab-separator-size);
|
||||
opacity: var(--tab-separator-opacity);
|
||||
content: "";
|
||||
display: -moz-box;
|
||||
width: 3px;
|
||||
}
|
||||
|
||||
#TabsToolbar[brighttext] {
|
||||
--tab-separator-image: linear-gradient(transparent 0%, transparent 15%, currentColor 15%, currentColor 90%, transparent 90%);
|
||||
--tab-separator-size: 1px 100%;
|
||||
--tab-separator-opacity: 0.4;
|
||||
}
|
||||
|
||||
/* New tab button */
|
||||
|
||||
.tabs-newtab-button {
|
||||
|
BIN
browser/themes/windows/Toolbar-win8.png
Normal file
After Width: | Height: | Size: 6.9 KiB |
BIN
browser/themes/windows/Toolbar-win8@2x.png
Normal file
After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
@ -335,14 +335,3 @@
|
||||
-moz-appearance: -moz-win-browsertabbar-toolbox;
|
||||
}
|
||||
}
|
||||
|
||||
/* Win8 and beyond. */
|
||||
@media not all and (-moz-os-version: windows-vista) {
|
||||
@media not all and (-moz-os-version: windows-win7) {
|
||||
/* Introducing an additional hover state for the Bookmark button */
|
||||
#nav-bar .toolbarbutton-1[buttonover] > .toolbarbutton-menubutton-button:hover > .toolbarbutton-icon {
|
||||
background-color: hsla(210,4%,10%,.08);
|
||||
border-color: hsla(210,4%,10%,.1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1187,6 +1187,14 @@ toolbarbutton[constrain-size="true"][cui-areatype="toolbar"] > .toolbarbutton-ba
|
||||
}
|
||||
}
|
||||
|
||||
@media (-moz-os-version: windows-win10) {
|
||||
#urlbar,
|
||||
.searchbar-textbox {
|
||||
font-size: 1.15em;
|
||||
min-height: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
#urlbar {
|
||||
-moz-padding-end: 2px;
|
||||
}
|
||||
@ -1235,6 +1243,13 @@ toolbarbutton[constrain-size="true"][cui-areatype="toolbar"] > .toolbarbutton-ba
|
||||
-moz-margin-start: -5px;
|
||||
}
|
||||
|
||||
@media (-moz-os-version: windows-win10) {
|
||||
@conditionalForwardWithUrlbar@ {
|
||||
clip-path: url("chrome://browser/content/browser.xul#urlbar-back-button-clip-path-win10");
|
||||
-moz-margin-start: -8px;
|
||||
}
|
||||
}
|
||||
|
||||
@conditionalForwardWithUrlbar@:-moz-locale-dir(rtl),
|
||||
@conditionalForwardWithUrlbar@ > #urlbar:-moz-locale-dir(rtl) {
|
||||
/* let urlbar-back-button-clip-path clip the urlbar's right side for RTL */
|
||||
@ -1438,6 +1453,12 @@ html|*.urlbar-input:-moz-lwtheme::-moz-placeholder,
|
||||
-moz-margin-end: 1px;
|
||||
}
|
||||
|
||||
@media (-moz-os-version: windows-win10) {
|
||||
#page-proxy-favicon {
|
||||
-moz-margin-start: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
/* autocomplete */
|
||||
|
||||
#treecolAutoCompleteImage {
|
||||
@ -1936,12 +1957,23 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
|
||||
}
|
||||
}
|
||||
|
||||
/* Use solid tab separators for Windows 8+ */
|
||||
@media not all and (-moz-os-version: windows-xp) {
|
||||
@media not all and (-moz-os-version: windows-vista) {
|
||||
@media not all and (-moz-os-version: windows-win7) {
|
||||
#TabsToolbar:not([brighttext]) {
|
||||
--tab-separator-image: linear-gradient(transparent 0%, transparent 15%, currentColor 15%, currentColor 90%, transparent 90%);
|
||||
--tab-separator-size: 1px 100%;
|
||||
--tab-separator-opacity: 0.2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Use lighter colors of buttons and text in the titlebar on luna-blue */
|
||||
@media (-moz-windows-theme: luna-blue) {
|
||||
#tabbrowser-tabs[movingtab] > .tabbrowser-tab[beforeselected]:not([last-visible-tab])::after,
|
||||
.tabbrowser-tab:not([visuallyselected]):not([afterselected-visible]):not([afterhovered]):not([first-visible-tab]):not(:hover)::before,
|
||||
#tabbrowser-tabs:not([overflow]) > .tabbrowser-tab[last-visible-tab]:not([visuallyselected]):not([beforehovered]):not(:hover)::after {
|
||||
background-image: url("chrome://browser/skin/tabbrowser/tab-separator-luna-blue.png");
|
||||
#TabsToolbar:not([brighttext]) {
|
||||
--tab-separator-image: url("chrome://browser/skin/tabbrowser/tab-separator-luna-blue.png");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -129,6 +129,8 @@ browser.jar:
|
||||
skin/classic/browser/Toolbar-inverted.png
|
||||
skin/classic/browser/Toolbar-inverted@2x.png
|
||||
skin/classic/browser/Toolbar-lunaSilver.png
|
||||
skin/classic/browser/Toolbar-win8.png
|
||||
skin/classic/browser/Toolbar-win8@2x.png
|
||||
skin/classic/browser/Toolbar-XP.png
|
||||
skin/classic/browser/toolbarbutton-dropdown-arrow.png
|
||||
skin/classic/browser/toolbarbutton-dropdown-arrow-XPVista7.png
|
||||
@ -211,6 +213,7 @@ browser.jar:
|
||||
skin/classic/browser/customizableui/panelarrow-customizeTip.png (../shared/customizableui/panelarrow-customizeTip.png)
|
||||
* skin/classic/browser/customizableui/panelUIOverlay.css (customizableui/panelUIOverlay.css)
|
||||
skin/classic/browser/customizableui/subView-arrow-back-inverted.png (../shared/customizableui/subView-arrow-back-inverted.png)
|
||||
skin/classic/browser/customizableui/subView-arrow-back-inverted@2x.png (../shared/customizableui/subView-arrow-back-inverted@2x.png)
|
||||
skin/classic/browser/customizableui/subView-arrow-back-inverted-rtl.png (../shared/customizableui/subView-arrow-back-inverted-rtl.png)
|
||||
skin/classic/browser/customizableui/whimsy.png (../shared/customizableui/whimsy.png)
|
||||
skin/classic/browser/customizableui/whimsy@2x.png (../shared/customizableui/whimsy@2x.png)
|
||||
@ -645,20 +648,24 @@ browser.jar:
|
||||
% override chrome://browser/skin/menuPanel-small@2x.png chrome://browser/skin/menuPanel-small-aero@2x.png os=WINNT osversion=6.1
|
||||
% override chrome://browser/skin/Toolbar@2x.png chrome://browser/skin/Toolbar-aero@2x.png os=WINNT osversion=6
|
||||
% override chrome://browser/skin/Toolbar@2x.png chrome://browser/skin/Toolbar-aero@2x.png os=WINNT osversion=6.1
|
||||
% override chrome://browser/skin/Toolbar@2x.png chrome://browser/skin/Toolbar-win8@2x.png os=WINNT osversion=6.2
|
||||
% override chrome://browser/skin/Toolbar@2x.png chrome://browser/skin/Toolbar-win8@2x.png os=WINNT osversion=6.3
|
||||
% override chrome://browser/skin/loop/menuPanel.png chrome://browser/skin/loop/menuPanel-aero.png os=WINNT osversion=6
|
||||
% override chrome://browser/skin/loop/menuPanel.png chrome://browser/skin/loop/menuPanel-aero.png os=WINNT osversion=6.1
|
||||
% override chrome://browser/skin/loop/menuPanel@2x.png chrome://browser/skin/loop/menuPanel-aero@2x.png os=WINNT osversion=6
|
||||
% override chrome://browser/skin/loop/menuPanel@2x.png chrome://browser/skin/loop/menuPanel-aero@2x.png os=WINNT osversion=6.1
|
||||
|
||||
% override chrome://browser/skin/Toolbar.png chrome://browser/skin/Toolbar-XP.png os=WINNT osversion<6
|
||||
% override chrome://browser/skin/Toolbar.png chrome://browser/skin/Toolbar-aero.png os=WINNT osversion=6
|
||||
% override chrome://browser/skin/Toolbar.png chrome://browser/skin/Toolbar-aero.png os=WINNT osversion=6.1
|
||||
% override chrome://browser/skin/Toolbar.png chrome://browser/skin/Toolbar-XP.png os=WINNT osversion<6
|
||||
% override chrome://browser/skin/Toolbar.png chrome://browser/skin/Toolbar-win8.png os=WINNT osversion=6.2
|
||||
% override chrome://browser/skin/Toolbar.png chrome://browser/skin/Toolbar-win8.png os=WINNT osversion=6.3
|
||||
% override chrome://browser/skin/loop/toolbar.png chrome://browser/skin/loop/toolbar-XP.png os=WINNT osversion<6
|
||||
% override chrome://browser/skin/loop/toolbar.png chrome://browser/skin/loop/toolbar-aero.png os=WINNT osversion=6
|
||||
% override chrome://browser/skin/loop/toolbar.png chrome://browser/skin/loop/toolbar-aero.png os=WINNT osversion=6.1
|
||||
% override chrome://browser/skin/loop/toolbar.png chrome://browser/skin/loop/toolbar-XP.png os=WINNT osversion<6
|
||||
% override chrome://browser/skin/loop/toolbar@2x.png chrome://browser/skin/loop/toolbar-XP@2x.png os=WINNT osversion<6
|
||||
% override chrome://browser/skin/loop/toolbar@2x.png chrome://browser/skin/loop/toolbar-aero@2x.png os=WINNT osversion=6
|
||||
% override chrome://browser/skin/loop/toolbar@2x.png chrome://browser/skin/loop/toolbar-aero@2x.png os=WINNT osversion=6.1
|
||||
% override chrome://browser/skin/loop/toolbar@2x.png chrome://browser/skin/loop/toolbar-XP@2x.png os=WINNT osversion<6
|
||||
% override chrome://browser/skin/preferences/checkbox.png chrome://browser/skin/preferences/checkbox-aero.png os=WINNT osversion=6
|
||||
% override chrome://browser/skin/preferences/checkbox.png chrome://browser/skin/preferences/checkbox-aero.png os=WINNT osversion=6.1
|
||||
% override chrome://browser/skin/preferences/checkbox.png chrome://browser/skin/preferences/checkbox-xp.png os=WINNT osversion<6
|
||||
|
@ -11732,7 +11732,7 @@ nsDocShell::ShouldAddToSessionHistory(nsIURI* aURI)
|
||||
// should just do a spec compare, rather than two gets of the scheme and
|
||||
// then the path. -Gagan
|
||||
nsresult rv;
|
||||
nsAutoCString buf, pref;
|
||||
nsAutoCString buf;
|
||||
|
||||
rv = aURI->GetScheme(buf);
|
||||
if (NS_FAILED(rv)) {
|
||||
@ -11750,16 +11750,17 @@ nsDocShell::ShouldAddToSessionHistory(nsIURI* aURI)
|
||||
}
|
||||
}
|
||||
|
||||
rv = Preferences::GetDefaultCString("browser.newtab.url", &pref);
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
return true;
|
||||
// Check if the webbrowser chrome wants us to proceed - by default it ensures
|
||||
// aURI is not the newtab URI.
|
||||
nsCOMPtr<nsIWebBrowserChrome3> browserChrome3 = do_GetInterface(mTreeOwner);
|
||||
if (browserChrome3) {
|
||||
bool shouldAdd;
|
||||
rv = browserChrome3->ShouldAddToSessionHistory(this, aURI, &shouldAdd);
|
||||
NS_ENSURE_SUCCESS(rv, true);
|
||||
return shouldAdd;
|
||||
}
|
||||
|
||||
rv = aURI->GetSpec(buf);
|
||||
NS_ENSURE_SUCCESS(rv, true);
|
||||
|
||||
return !buf.Equals(pref);
|
||||
return true;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -27,6 +27,13 @@ DOMCursor::DOMCursor(nsPIDOMWindow* aWindow, nsICursorContinueCallback* aCallbac
|
||||
{
|
||||
}
|
||||
|
||||
DOMCursor::DOMCursor(nsIGlobalObject* aGlobal, nsICursorContinueCallback* aCallback)
|
||||
: DOMRequest(aGlobal)
|
||||
, mCallback(aCallback)
|
||||
, mFinished(false)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
DOMCursor::Reset()
|
||||
{
|
||||
|
@ -26,6 +26,7 @@ public:
|
||||
DOMRequest)
|
||||
|
||||
DOMCursor(nsPIDOMWindow* aWindow, nsICursorContinueCallback *aCallback);
|
||||
DOMCursor(nsIGlobalObject* aGlobal, nsICursorContinueCallback *aCallback);
|
||||
|
||||
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
||||
|
@ -20,7 +20,7 @@ using mozilla::dom::DOMRequest;
|
||||
using mozilla::dom::DOMRequestService;
|
||||
using mozilla::dom::DOMCursor;
|
||||
using mozilla::dom::Promise;
|
||||
using mozilla::AutoSafeJSContext;
|
||||
using mozilla::dom::AutoJSAPI;
|
||||
|
||||
DOMRequest::DOMRequest(nsPIDOMWindow* aWindow)
|
||||
: DOMEventTargetHelper(aWindow->IsInnerWindow() ?
|
||||
@ -30,6 +30,13 @@ DOMRequest::DOMRequest(nsPIDOMWindow* aWindow)
|
||||
{
|
||||
}
|
||||
|
||||
DOMRequest::DOMRequest(nsIGlobalObject* aGlobal)
|
||||
: DOMEventTargetHelper(aGlobal)
|
||||
, mResult(JS::UndefinedValue())
|
||||
, mDone(false)
|
||||
{
|
||||
}
|
||||
|
||||
DOMRequest::~DOMRequest()
|
||||
{
|
||||
mResult.setUndefined();
|
||||
@ -235,6 +242,7 @@ NS_IMETHODIMP
|
||||
DOMRequestService::CreateRequest(nsIDOMWindow* aWindow,
|
||||
nsIDOMDOMRequest** aRequest)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
nsCOMPtr<nsPIDOMWindow> win(do_QueryInterface(aWindow));
|
||||
NS_ENSURE_STATE(win);
|
||||
NS_ADDREF(*aRequest = new DOMRequest(win));
|
||||
@ -306,13 +314,9 @@ public:
|
||||
Dispatch(DOMRequest* aRequest,
|
||||
const JS::Value& aResult)
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||
mozilla::ThreadsafeAutoSafeJSContext cx;
|
||||
nsRefPtr<FireSuccessAsyncTask> asyncTask = new FireSuccessAsyncTask(cx, aRequest, aResult);
|
||||
if (NS_FAILED(NS_DispatchToMainThread(asyncTask))) {
|
||||
NS_WARNING("Failed to dispatch to main thread!");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
MOZ_ALWAYS_TRUE(NS_SUCCEEDED(NS_DispatchToCurrentThread(asyncTask)));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -323,11 +327,6 @@ public:
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
~FireSuccessAsyncTask()
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||
}
|
||||
|
||||
private:
|
||||
nsRefPtr<DOMRequest> mReq;
|
||||
JS::PersistentRooted<JS::Value> mResult;
|
||||
@ -369,10 +368,7 @@ DOMRequestService::FireErrorAsync(nsIDOMDOMRequest* aRequest,
|
||||
NS_ENSURE_STATE(aRequest);
|
||||
nsCOMPtr<nsIRunnable> asyncTask =
|
||||
new FireErrorAsyncTask(static_cast<DOMRequest*>(aRequest), aError);
|
||||
if (NS_FAILED(NS_DispatchToMainThread(asyncTask))) {
|
||||
NS_WARNING("Failed to dispatch to main thread!");
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
MOZ_ALWAYS_TRUE(NS_SUCCEEDED(NS_DispatchToCurrentThread(asyncTask)));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -84,6 +84,7 @@ public:
|
||||
void FireDetailedError(DOMError* aError);
|
||||
|
||||
explicit DOMRequest(nsPIDOMWindow* aWindow);
|
||||
explicit DOMRequest(nsIGlobalObject* aGlobal);
|
||||
|
||||
protected:
|
||||
virtual ~DOMRequest();
|
||||
|
@ -1243,8 +1243,11 @@ MozMtpDatabase::getObjectInfo(MtpObjectHandle aHandle,
|
||||
aInfo.mAssociationDesc = 0;
|
||||
aInfo.mSequenceNumber = 0;
|
||||
aInfo.mName = ::strdup(entry->mObjectName.get());
|
||||
aInfo.mDateCreated = entry->mDateCreated;
|
||||
aInfo.mDateModified = entry->mDateModified;
|
||||
|
||||
// entry->mDateXxxx is a PRTime stores the time as microseconds from the epoch.
|
||||
// aInfo.mDateXxxx is time_t which stores the time as seconds from the epoch.
|
||||
aInfo.mDateCreated = entry->mDateCreated / PR_USEC_PER_SEC;
|
||||
aInfo.mDateModified = entry->mDateModified / PR_USEC_PER_SEC;
|
||||
aInfo.mKeywords = ::strdup("fxos,touch");
|
||||
|
||||
return MTP_RESPONSE_OK;
|
||||
|
@ -3,6 +3,7 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface DOMCursor : EventTarget {
|
||||
readonly attribute boolean done;
|
||||
[Throws]
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
enum DOMRequestReadyState { "pending", "done" };
|
||||
|
||||
[NoInterfaceObject]
|
||||
[Exposed=(Window,Worker), NoInterfaceObject]
|
||||
interface DOMRequestShared {
|
||||
readonly attribute DOMRequestReadyState readyState;
|
||||
|
||||
@ -16,6 +16,7 @@ interface DOMRequestShared {
|
||||
attribute EventHandler onerror;
|
||||
};
|
||||
|
||||
[Exposed=(Window,Worker)]
|
||||
interface DOMRequest : EventTarget {
|
||||
// The [TreatNonCallableAsNull] annotation is required since then() should do
|
||||
// nothing instead of throwing errors when non-callable arguments are passed.
|
||||
|
@ -102,10 +102,14 @@ var interfaceNamesInGlobalScope =
|
||||
{ name: "DataStore", b2g: true },
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{ name: "DataStoreCursor", b2g: true },
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
"DOMCursor",
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
"DOMError",
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
"DOMException",
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
"DOMRequest",
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
"DOMStringList",
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
|
@ -98,10 +98,14 @@ var interfaceNamesInGlobalScope =
|
||||
{ name: "DataStore", b2g: true },
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{ name: "DataStoreCursor", b2g: true },
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
"DOMCursor",
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
"DOMError",
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
"DOMException",
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
"DOMRequest",
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
"DOMStringList",
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
|
@ -12,7 +12,7 @@ interface nsIInputStream;
|
||||
/**
|
||||
* nsIWebBrowserChrome3 is an extension to nsIWebBrowserChrome2.
|
||||
*/
|
||||
[scriptable, uuid(9e6c2372-5d9d-4ce8-ab9e-c5df1494dc84)]
|
||||
[scriptable, uuid(da646a9c-5788-4860-88a4-bd5d0ad853da)]
|
||||
interface nsIWebBrowserChrome3 : nsIWebBrowserChrome2
|
||||
{
|
||||
/**
|
||||
@ -47,4 +47,7 @@ interface nsIWebBrowserChrome3 : nsIWebBrowserChrome2
|
||||
bool shouldLoadURI(in nsIDocShell aDocShell,
|
||||
in nsIURI aURI,
|
||||
in nsIURI aReferrer);
|
||||
|
||||
bool shouldAddToSessionHistory(in nsIDocShell aDocShell,
|
||||
in nsIURI aURI);
|
||||
};
|
||||
|
24
mobile/android/.eslintignore
Normal file
@ -0,0 +1,24 @@
|
||||
chrome/content
|
||||
tests/
|
||||
|
||||
# Uses `#filter substitution`
|
||||
app/mobile.js
|
||||
chrome/content/healthreport-prefs.js
|
||||
|
||||
# Uses `#expand`
|
||||
chrome/content/about.js
|
||||
|
||||
# Not much JS to lint and non-standard at that
|
||||
installer/
|
||||
locales/
|
||||
|
||||
# Pretty sure we're disabling this one anyway
|
||||
modules/ContactService.jsm
|
||||
|
||||
# es7 proposed: array comprehensions
|
||||
# https://github.com/eslint/espree/issues/125
|
||||
modules/WebappManager.jsm
|
||||
|
||||
# Non-standard `(catch ex if ...)`
|
||||
components/Snippets.js
|
||||
modules/MatchstickApp.jsm
|
112
mobile/android/.eslintrc
Normal file
@ -0,0 +1,112 @@
|
||||
env:
|
||||
browser: true
|
||||
es6: true
|
||||
|
||||
globals:
|
||||
Components: false
|
||||
|
||||
# TODO: Create custom rule for `Cu.import`
|
||||
AddonManager: false
|
||||
AppConstants: false
|
||||
Downloads: false
|
||||
File: false
|
||||
FileUtils: false
|
||||
HelperApps: true # TODO: Can be more specific here.
|
||||
JNI: true # TODO: Can be more specific here.
|
||||
LightweightThemeManager: false
|
||||
Messaging: false
|
||||
Notifications: false
|
||||
OS: false
|
||||
ParentalControls: false
|
||||
PrivateBrowsingUtils: false
|
||||
Prompt: false
|
||||
Services: false
|
||||
SharedPreferences: false
|
||||
strings: false
|
||||
Strings: false
|
||||
Task: false
|
||||
TelemetryStopwatch: false
|
||||
UITelemetry: false
|
||||
UserAgentOverrides: 0
|
||||
WebappManager: false
|
||||
XPCOMUtils: false
|
||||
ctypes: false
|
||||
dump: false
|
||||
exports: false
|
||||
importScripts: false
|
||||
module: false
|
||||
require: false
|
||||
uuidgen: false
|
||||
|
||||
Iterator: false # TODO: Remove - deprecated!
|
||||
|
||||
rules:
|
||||
global-strict: 0 # Overridden by "strict"
|
||||
no-underscore-dangle: 0 # We allow trailing underscores in names.
|
||||
|
||||
# We disable everything to get all files to pass w/o updating them.
|
||||
# We'll re-enable one by one.
|
||||
camelcase: 0
|
||||
comma-dangle: 0
|
||||
comma-spacing: 0
|
||||
consistent-return: 0
|
||||
curly: 0
|
||||
dot-notation: 0
|
||||
eqeqeq: 0
|
||||
key-spacing: 0
|
||||
new-cap: 0
|
||||
no-caller: 0
|
||||
no-constant-condition: 0
|
||||
no-empty: 0
|
||||
no-extra-bind: 0
|
||||
no-extra-semi: 0
|
||||
no-loop-func: 0
|
||||
no-multi-spaces: 0
|
||||
no-new-object: 0
|
||||
no-octal: 0
|
||||
no-return-assign: 0
|
||||
no-shadow: 0
|
||||
no-trailing-spaces: 0
|
||||
no-unused-vars: 0
|
||||
no-use-before-define: 0
|
||||
quotes: 0 # [2, "double"]
|
||||
semi: 0
|
||||
space-infix-ops: 0
|
||||
space-unary-ops: 0 # 2: https://github.com/eslint/eslint/issues/2764
|
||||
strict: 0
|
||||
|
||||
#"ecmaFeatures": {
|
||||
# "forOf": true,
|
||||
# "jsx": true,
|
||||
#},
|
||||
#"rules": {
|
||||
# // turn off all kinds of stuff that we actually do want, because
|
||||
# // right now, we're bootstrapping the linting infrastructure. We'll
|
||||
# // want to audit these rules, and start turning them on and fixing the
|
||||
# // problems they find, one at a time.
|
||||
|
||||
# // Eslint built-in rules are documented at <http://eslint.org/docs/rules/>
|
||||
# "camelcase": 0, // TODO: Remove (use default)
|
||||
# "consistent-return": 0, // TODO: Remove (use default)
|
||||
# dot-location: 0, // [2, property],
|
||||
# "eqeqeq": 0, // TBD. Might need to be separate for content & chrome
|
||||
# "global-strict": 0, // Leave as zero (this will be unsupported in eslint 1.0.0)
|
||||
# "linebreak-style": [2, "unix"],
|
||||
# "new-cap": 0, // TODO: Remove (use default)
|
||||
# "no-catch-shadow": 0, // TODO: Remove (use default)
|
||||
# "no-console": 0, // Leave as 0. We use console logging in content code.
|
||||
# "no-empty": 0, // TODO: Remove (use default)
|
||||
# "no-extra-bind": 0, // Leave as 0
|
||||
# "no-extra-boolean-cast": 0, // TODO: Remove (use default)
|
||||
# "no-multi-spaces": 0, // TBD.
|
||||
# "no-new": 0, // TODO: Remove (use default)
|
||||
# "no-redeclare": 0, // TODO: Remove (use default)
|
||||
# "no-return-assign": 0, // TODO: Remove (use default)
|
||||
# "no-underscore-dangle": 0, // Leave as 0. Commonly used for private variables.
|
||||
# "no-unneeded-ternary": 2,
|
||||
# "no-unused-expressions": 0, // TODO: Remove (use default)
|
||||
# "no-unused-vars": 0, // TODO: Remove (use default)
|
||||
# "no-use-before-define": 0, // TODO: Remove (use default)
|
||||
# "quotes": [2, "double", "avoid-escape"],
|
||||
# "strict": 0, // [2, "function"],
|
||||
#}
|
@ -206,10 +206,6 @@
|
||||
<data android:scheme="https" />
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEARCH" />
|
||||
</intent-filter>
|
||||
|
||||
<!-- For XPI installs from websites and the download manager. -->
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
@ -238,9 +234,6 @@
|
||||
</intent-filter>
|
||||
#endif
|
||||
|
||||
<meta-data android:name="android.app.searchable"
|
||||
android:resource="@xml/searchable" />
|
||||
|
||||
<!-- For debugging -->
|
||||
<intent-filter>
|
||||
<action android:name="org.mozilla.gecko.DEBUG" />
|
||||
|
@ -477,6 +477,8 @@ public class BrowserApp extends GeckoApp
|
||||
}
|
||||
|
||||
mHideDynamicToolbarOnActionModeEnd = false;
|
||||
|
||||
mProgressView.setPrivateMode(tab.isPrivate());
|
||||
break;
|
||||
case START:
|
||||
if (Tabs.getInstance().isSelectedTab(tab)) {
|
||||
@ -1083,6 +1085,12 @@ public class BrowserApp extends GeckoApp
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Sending a message to the toolbar when the browser window gains focus
|
||||
// This is needed for qr code input
|
||||
if (hasFocus) {
|
||||
mBrowserToolbar.onParentFocus();
|
||||
}
|
||||
}
|
||||
|
||||
private void setBrowserToolbarListeners() {
|
||||
|
@ -15,7 +15,7 @@ public class PrivateTab extends Tab {
|
||||
|
||||
// Init background to private_toolbar_grey to ensure flicker-free
|
||||
// private tab creation. Page loads will reset it to white as expected.
|
||||
final int bgColor = context.getResources().getColor(R.color.private_toolbar_grey);
|
||||
final int bgColor = context.getResources().getColor(R.color.tabs_tray_grey_pressed);
|
||||
setBackgroundColor(bgColor);
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
package org.mozilla.gecko.background.preferences;
|
||||
|
||||
import org.mozilla.gecko.R;
|
||||
import org.mozilla.gecko.util.WeakReferenceHandler;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
@ -49,21 +50,28 @@ public abstract class PreferenceFragment extends Fragment implements PreferenceM
|
||||
|
||||
private static final int MSG_BIND_PREFERENCES = 1;
|
||||
|
||||
// This triggers "This Handler class should be static or leaks might occur".
|
||||
// The issue is that the Handler references the Fragment; messages targeting
|
||||
// the Handler reference it; and if such messages are long lived, the Fragment
|
||||
// cannot be GCed. This is not an issue for us; our messages are short-lived.
|
||||
private final Handler mHandler = new Handler() {
|
||||
private static class PreferenceFragmentHandler extends WeakReferenceHandler<PreferenceFragment> {
|
||||
public PreferenceFragmentHandler(final PreferenceFragment that) {
|
||||
super(that);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleMessage(Message msg) {
|
||||
final PreferenceFragment that = mTarget.get();
|
||||
if (that == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (msg.what) {
|
||||
|
||||
case MSG_BIND_PREFERENCES:
|
||||
bindPreferences();
|
||||
that.bindPreferences();
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private final Handler mHandler = new PreferenceFragmentHandler(this);
|
||||
|
||||
final private Runnable mRequestFocus = new Runnable() {
|
||||
@Override
|
||||
|
@ -687,7 +687,7 @@ public class LayerRenderer implements Tabs.OnTabsChangedListener {
|
||||
if (msg == Tabs.TabEvents.SELECTED) {
|
||||
if (mView != null) {
|
||||
final int overscrollColor =
|
||||
(tab.isPrivate() ? R.color.private_toolbar_grey : R.color.toolbar_grey);
|
||||
(tab.isPrivate() ? R.color.tabs_tray_grey_pressed : R.color.toolbar_grey);
|
||||
setOverscrollColor(overscrollColor);
|
||||
|
||||
if (mView.getChildAt(0) != null) {
|
||||
|
@ -46,6 +46,9 @@ public class TopSitesGridView extends GridView {
|
||||
// Measured height of this view.
|
||||
private int mMeasuredHeight;
|
||||
|
||||
// A dummy View used to measure the required size of the child Views.
|
||||
private final TopSitesGridItemView dummyChildView;
|
||||
|
||||
// Context menu info.
|
||||
private TopSitesGridContextMenuInfo mContextMenuInfo;
|
||||
|
||||
@ -72,6 +75,15 @@ public class TopSitesGridView extends GridView {
|
||||
mHorizontalSpacing = a.getDimensionPixelOffset(R.styleable.TopSitesGridView_android_horizontalSpacing, 0x00);
|
||||
mVerticalSpacing = a.getDimensionPixelOffset(R.styleable.TopSitesGridView_android_verticalSpacing, 0x00);
|
||||
a.recycle();
|
||||
|
||||
dummyChildView = new TopSitesGridItemView(context);
|
||||
// Set a default LayoutParams on the child, if it doesn't have one on its own.
|
||||
AbsListView.LayoutParams params = (AbsListView.LayoutParams) dummyChildView.getLayoutParams();
|
||||
if (params == null) {
|
||||
params = new AbsListView.LayoutParams(AbsListView.LayoutParams.WRAP_CONTENT,
|
||||
AbsListView.LayoutParams.WRAP_CONTENT);
|
||||
dummyChildView.setLayoutParams(params);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -110,27 +122,16 @@ public class TopSitesGridView extends GridView {
|
||||
|
||||
final int columnWidth = getColumnWidth();
|
||||
|
||||
// Get the first child from the adapter.
|
||||
final TopSitesGridItemView child = new TopSitesGridItemView(getContext());
|
||||
|
||||
// Set a default LayoutParams on the child, if it doesn't have one on its own.
|
||||
AbsListView.LayoutParams params = (AbsListView.LayoutParams) child.getLayoutParams();
|
||||
if (params == null) {
|
||||
params = new AbsListView.LayoutParams(AbsListView.LayoutParams.WRAP_CONTENT,
|
||||
AbsListView.LayoutParams.WRAP_CONTENT);
|
||||
child.setLayoutParams(params);
|
||||
}
|
||||
|
||||
// Measure the exact width of the child, and the height based on the width.
|
||||
// Note: the child (and TopSitesThumbnailView) takes care of calculating its height.
|
||||
int childWidthSpec = MeasureSpec.makeMeasureSpec(columnWidth, MeasureSpec.EXACTLY);
|
||||
int childHeightSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
|
||||
child.measure(childWidthSpec, childHeightSpec);
|
||||
final int childHeight = child.getMeasuredHeight();
|
||||
dummyChildView.measure(childWidthSpec, childHeightSpec);
|
||||
final int childHeight = dummyChildView.getMeasuredHeight();
|
||||
|
||||
// This is the maximum width of the contents of each child in the grid.
|
||||
// Use this as the target width for thumbnails.
|
||||
final int thumbnailWidth = child.getMeasuredWidth() - child.getPaddingLeft() - child.getPaddingRight();
|
||||
final int thumbnailWidth = dummyChildView.getMeasuredWidth() - dummyChildView.getPaddingLeft() - dummyChildView.getPaddingRight();
|
||||
ThumbnailHelper.getInstance().setThumbnailWidth(thumbnailWidth);
|
||||
|
||||
// Number of rows required to show these top sites.
|
||||
|
@ -30,6 +30,13 @@ public class TopSitesThumbnailView extends ImageView {
|
||||
// 27.34% opacity filter for the dominant color.
|
||||
private static final int COLOR_FILTER = 0x46FFFFFF;
|
||||
|
||||
// Cache variables used in onMeasure.
|
||||
//
|
||||
// Note: we have two matrices because we can't change it in place - see ImageView.getImageMatrix docs.
|
||||
private final RectF mLayoutRect = new RectF();
|
||||
private Matrix mLayoutCurrentMatrix = new Matrix();
|
||||
private Matrix mLayoutNextMatrix = new Matrix();
|
||||
|
||||
// Default filter color for "Add a bookmark" views.
|
||||
private final int mDefaultColor = getResources().getColor(R.color.top_site_default);
|
||||
|
||||
@ -68,6 +75,34 @@ public class TopSitesThumbnailView extends ImageView {
|
||||
public void setImageBitmap(Bitmap bm, boolean resize) {
|
||||
super.setImageBitmap(bm);
|
||||
mResize = resize;
|
||||
clearLayoutVars();
|
||||
|
||||
updateImageMatrix();
|
||||
}
|
||||
|
||||
private void clearLayoutVars() {
|
||||
mLayoutRect.setEmpty();
|
||||
}
|
||||
|
||||
private void updateImageMatrix() {
|
||||
if (!HardwareUtils.isTablet() || !mResize) {
|
||||
return;
|
||||
}
|
||||
|
||||
// No work to be done here - assumes the rect gets reset when a new bitmap is set.
|
||||
if (mLayoutRect.right == mWidth && mLayoutRect.bottom == mHeight) {
|
||||
return;
|
||||
}
|
||||
|
||||
setScaleType(ScaleType.MATRIX);
|
||||
|
||||
mLayoutRect.set(0, 0, mWidth, mHeight);
|
||||
mLayoutNextMatrix.setRectToRect(mLayoutRect, mLayoutRect, Matrix.ScaleToFit.CENTER);
|
||||
setImageMatrix(mLayoutNextMatrix);
|
||||
|
||||
final Matrix swapReferenceMatrix = mLayoutCurrentMatrix;
|
||||
mLayoutCurrentMatrix = mLayoutNextMatrix;
|
||||
mLayoutNextMatrix = swapReferenceMatrix;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -82,18 +117,6 @@ public class TopSitesThumbnailView extends ImageView {
|
||||
mResize = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
|
||||
super.onLayout(changed, left, top, right, bottom);
|
||||
if (HardwareUtils.isTablet() && mResize) {
|
||||
setScaleType(ScaleType.MATRIX);
|
||||
RectF rect = new RectF(0, 0, mWidth, mHeight);
|
||||
Matrix matrix = new Matrix();
|
||||
matrix.setRectToRect(rect, rect, Matrix.ScaleToFit.CENTER);
|
||||
setImageMatrix(matrix);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Measure the view to determine the measured width and height.
|
||||
* The height is constrained by the measured width.
|
||||
@ -110,6 +133,8 @@ public class TopSitesThumbnailView extends ImageView {
|
||||
mWidth = getMeasuredWidth();
|
||||
mHeight = (int) (mWidth * ThumbnailHelper.THUMBNAIL_ASPECT_RATIO);
|
||||
setMeasuredDimension(mWidth, mHeight);
|
||||
|
||||
updateImageMatrix();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -81,6 +81,7 @@
|
||||
|
||||
<!ENTITY settings "Settings">
|
||||
<!ENTITY settings_title "Settings">
|
||||
<!ENTITY pref_category_input_options "Input options">
|
||||
<!ENTITY pref_category_advanced "Advanced">
|
||||
<!ENTITY pref_category_customize "Customize">
|
||||
<!ENTITY pref_category_customize_summary "Home, search, tabs, import">
|
||||
@ -136,7 +137,7 @@
|
||||
<!ENTITY pref_category_display "Display">
|
||||
<!ENTITY pref_category_display_summary "Text, title bar, full-screen browsing">
|
||||
<!ENTITY pref_category_privacy_short "Privacy">
|
||||
<!ENTITY pref_category_privacy_summary "Control passwords, cookies, tracking, data">
|
||||
<!ENTITY pref_category_privacy_summary2 "Control logins, cookies, tracking, data">
|
||||
<!ENTITY pref_category_vendor "&vendorShortName;">
|
||||
<!ENTITY pref_category_vendor_summary "About &brandShortName;, FAQs, data choices">
|
||||
<!ENTITY pref_category_datareporting "Data choices">
|
||||
@ -155,7 +156,7 @@
|
||||
<!ENTITY pref_category_devtools "Developer tools">
|
||||
<!ENTITY pref_developer_remotedebugging "Remote debugging">
|
||||
<!ENTITY pref_category_logins "Logins">
|
||||
<!ENTITY pref_remember_signons "Remember passwords">
|
||||
<!ENTITY pref_remember_signons2 "Remember logins">
|
||||
<!ENTITY pref_open_external_urls_privately_title "Open links in Private browsing">
|
||||
<!ENTITY pref_open_external_urls_privately_summary "For all external links opened in &brandShortName;">
|
||||
<!ENTITY pref_manage_logins "Manage logins">
|
||||
@ -250,10 +251,14 @@ size. -->
|
||||
<!ENTITY pref_media_autoplay_enabled_summary "Control if websites can autoplay videos and other media content">
|
||||
<!ENTITY pref_zoom_force_enabled "Always enable zoom">
|
||||
<!ENTITY pref_zoom_force_enabled_summary "Force override so you can zoom any page">
|
||||
<!ENTITY pref_voice_input "Voice input">
|
||||
<!ENTITY pref_voice_input_summary "Allow voice dictation in the title bar">
|
||||
<!ENTITY pref_qrcode_enabled "QR code reader">
|
||||
<!ENTITY pref_qrcode_enabled_summary "Allow QR scanner in the title bar">
|
||||
|
||||
<!ENTITY pref_use_master_password "Use master password">
|
||||
<!ENTITY pref_sync "Sync">
|
||||
<!ENTITY pref_sync_summary "Sync your tabs, bookmarks, passwords, history">
|
||||
<!ENTITY pref_sync_summary2 "Sync your tabs, bookmarks, logins, history">
|
||||
<!ENTITY pref_search_suggestions "Show search suggestions">
|
||||
<!ENTITY pref_import_android "Import from Android">
|
||||
<!ENTITY pref_import_android_summary "Import bookmarks and history from the native browser">
|
||||
@ -261,7 +266,7 @@ size. -->
|
||||
<!ENTITY pref_private_data_searchHistory "Search history">
|
||||
<!ENTITY pref_private_data_formdata2 "Form history">
|
||||
<!ENTITY pref_private_data_cookies2 "Cookies & active logins">
|
||||
<!ENTITY pref_private_data_passwords "Saved passwords">
|
||||
<!ENTITY pref_private_data_passwords2 "Saved logins">
|
||||
<!ENTITY pref_private_data_cache "Cache">
|
||||
<!ENTITY pref_private_data_offlineApps "Offline website data">
|
||||
<!ENTITY pref_private_data_siteSettings2 "Site settings">
|
||||
@ -610,7 +615,7 @@ just addresses the organization to follow, e.g. "This site is run by " -->
|
||||
<!ENTITY guest_session_dialog_continue "Continue">
|
||||
<!ENTITY guest_session_dialog_cancel "Cancel">
|
||||
<!ENTITY new_guest_session_title "&brandShortName; will now restart">
|
||||
<!ENTITY new_guest_session_text "The person using it will not be able to see any of your personal browsing data (like saved passwords, history or bookmarks).\n\nWhen your guest is done, their browsing data will be deleted and your session will be restored.">
|
||||
<!ENTITY new_guest_session_text2 "The person using it will not be able to see any of your personal browsing data (like saved logins, history or bookmarks).\n\nWhen your guest is done, their browsing data will be deleted and your session will be restored.">
|
||||
<!ENTITY guest_browsing_notification_title "Guest browsing is enabled">
|
||||
<!ENTITY guest_browsing_notification_text "Tap to exit">
|
||||
|
||||
|
@ -62,7 +62,7 @@
|
||||
<!ENTITY sync.configure.engines.title.label 'What to sync'>
|
||||
<!ENTITY sync.configure.engines.sync.my.title.label 'Sync your…'>
|
||||
<!ENTITY sync.configure.engines.title.bookmarks 'Bookmarks'>
|
||||
<!ENTITY sync.configure.engines.title.passwords 'Passwords'>
|
||||
<!ENTITY sync.configure.engines.title.passwords2 'Logins'>
|
||||
<!ENTITY sync.configure.engines.title.history 'History'>
|
||||
<!ENTITY sync.configure.engines.title.tabs 'Tabs'>
|
||||
|
||||
@ -141,7 +141,7 @@
|
||||
<!ENTITY fxaccount_policy_linkprivacy 'Privacy Notice'>
|
||||
|
||||
<!ENTITY fxaccount_getting_started_welcome_to_sync 'Welcome to &syncBrand.shortName.label;'>
|
||||
<!ENTITY fxaccount_getting_started_description 'Sign in to sync your tabs, bookmarks, passwords & more.'>
|
||||
<!ENTITY fxaccount_getting_started_description2 'Sign in to sync your tabs, bookmarks, logins & more.'>
|
||||
<!ENTITY fxaccount_getting_started_get_started 'Get started'>
|
||||
<!ENTITY fxaccount_getting_started_old_firefox 'Using an older version of &syncBrand.shortName.label;?'>
|
||||
|
||||
@ -212,7 +212,7 @@
|
||||
<!ENTITY fxaccount_status_needs_finish_migrating 'Tap to sign in to your new Firefox Account.'>
|
||||
<!ENTITY fxaccount_status_bookmarks 'Bookmarks'>
|
||||
<!ENTITY fxaccount_status_history 'History'>
|
||||
<!ENTITY fxaccount_status_passwords 'Passwords'>
|
||||
<!ENTITY fxaccount_status_passwords2 'Logins'>
|
||||
<!ENTITY fxaccount_status_tabs 'Open tabs'>
|
||||
<!ENTITY fxaccount_status_legal 'Legal' >
|
||||
<!-- Localization note: when tapped, the following two strings link to
|
||||
|
@ -86,6 +86,7 @@ gujar.sources += [
|
||||
'util/HardwareUtils.java',
|
||||
'util/INIParser.java',
|
||||
'util/INISection.java',
|
||||
'util/InputOptionsUtils.java',
|
||||
'util/IOUtils.java',
|
||||
'util/JSONUtils.java',
|
||||
'util/MenuUtils.java',
|
||||
@ -99,6 +100,7 @@ gujar.sources += [
|
||||
'util/StringUtils.java',
|
||||
'util/ThreadUtils.java',
|
||||
'util/UIAsyncTask.java',
|
||||
'util/WeakReferenceHandler.java',
|
||||
'util/WebActivityMapper.java',
|
||||
'util/WindowUtils.java',
|
||||
]
|
||||
|
@ -26,7 +26,6 @@ import org.mozilla.gecko.GeckoApplication;
|
||||
import org.mozilla.gecko.GeckoEvent;
|
||||
import org.mozilla.gecko.GeckoProfile;
|
||||
import org.mozilla.gecko.GeckoSharedPrefs;
|
||||
import org.mozilla.gecko.GuestSession;
|
||||
import org.mozilla.gecko.LocaleManager;
|
||||
import org.mozilla.gecko.Locales;
|
||||
import org.mozilla.gecko.PrefsHelper;
|
||||
@ -43,10 +42,10 @@ import org.mozilla.gecko.updater.UpdateServiceHelper;
|
||||
import org.mozilla.gecko.util.GeckoEventListener;
|
||||
import org.mozilla.gecko.util.HardwareUtils;
|
||||
import org.mozilla.gecko.util.ThreadUtils;
|
||||
import org.mozilla.gecko.util.InputOptionsUtils;
|
||||
import org.mozilla.gecko.widget.FloatingHintEditText;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.app.Fragment;
|
||||
@ -128,6 +127,8 @@ OnSharedPreferenceChangeListener
|
||||
private static final String PREFS_TRACKING_PROTECTION = "privacy.trackingprotection.enabled";
|
||||
private static final String PREFS_TRACKING_PROTECTION_LEARN_MORE = NON_PREF_PREFIX + "trackingprotection.learn_more";
|
||||
public static final String PREFS_OPEN_URLS_IN_PRIVATE = NON_PREF_PREFIX + "openExternalURLsPrivately";
|
||||
public static final String PREFS_VOICE_INPUT_ENABLED = NON_PREF_PREFIX + "voice_input_enabled";
|
||||
public static final String PREFS_QRCODE_ENABLED = NON_PREF_PREFIX + "qrcode_enabled";
|
||||
|
||||
private static final String ACTION_STUMBLER_UPLOAD_PREF = AppConstants.ANDROID_PACKAGE_NAME + ".STUMBLER_PREF";
|
||||
|
||||
@ -685,6 +686,14 @@ OnSharedPreferenceChangeListener
|
||||
// Only change the customize pref screen summary on nightly builds with the tab queue build flag.
|
||||
pref.setSummary(getString(R.string.pref_category_customize_alt_summary));
|
||||
}
|
||||
if (getResources().getString(R.string.pref_category_input_options).equals(key)) {
|
||||
if (!AppConstants.NIGHTLY_BUILD || (!InputOptionsUtils.supportsVoiceRecognizer(getApplicationContext(), getResources().getString(R.string.voicesearch_prompt)) &&
|
||||
!InputOptionsUtils.supportsQrCodeReader(getApplicationContext()))) {
|
||||
preferences.removePreference(pref);
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
setupPreferences((PreferenceGroup) pref, prefs);
|
||||
} else {
|
||||
pref.setOnPreferenceChangeListener(this);
|
||||
@ -787,6 +796,18 @@ OnSharedPreferenceChangeListener
|
||||
preferences.removePreference(pref);
|
||||
i--;
|
||||
continue;
|
||||
} else if (PREFS_VOICE_INPUT_ENABLED.equals(key) &&
|
||||
(!AppConstants.NIGHTLY_BUILD || !InputOptionsUtils.supportsVoiceRecognizer(getApplicationContext(), getResources().getString(R.string.voicesearch_prompt)))) {
|
||||
// Remove UI for voice input on non nightly builds.
|
||||
preferences.removePreference(pref);
|
||||
i--;
|
||||
continue;
|
||||
} else if (PREFS_QRCODE_ENABLED.equals(key) &&
|
||||
(!AppConstants.NIGHTLY_BUILD || !InputOptionsUtils.supportsQrCodeReader(getApplicationContext()))) {
|
||||
// Remove UI for qr code input on non nightly builds
|
||||
preferences.removePreference(pref);
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Some Preference UI elements are not actually preferences,
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
<item android:state_checked="true"
|
||||
gecko:state_private="true"
|
||||
android:color="@color/private_toolbar_grey" />
|
||||
android:color="@color/tabs_tray_grey_pressed" />
|
||||
|
||||
<item android:state_pressed="true"
|
||||
gecko:state_private="true"
|
||||
|
BIN
mobile/android/base/resources/drawable-hdpi/ab_qrcode.png
Normal file
After Width: | Height: | Size: 169 B |
Before Width: | Height: | Size: 249 B After Width: | Height: | Size: 252 B |
Before Width: | Height: | Size: 255 B After Width: | Height: | Size: 259 B |
@ -28,7 +28,7 @@
|
||||
|
||||
<!-- private browsing mode -->
|
||||
<item gecko:state_private="true"
|
||||
android:drawable="@color/private_toolbar_grey"/>
|
||||
android:drawable="@color/tabs_tray_grey_pressed"/>
|
||||
|
||||
<!-- normal mode -->
|
||||
<item android:drawable="@color/toolbar_grey"/>
|
||||
|
BIN
mobile/android/base/resources/drawable-mdpi/ab_qrcode.png
Normal file
After Width: | Height: | Size: 113 B |
Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 219 B |
Before Width: | Height: | Size: 220 B After Width: | Height: | Size: 213 B |
BIN
mobile/android/base/resources/drawable-xhdpi/ab_qrcode.png
Normal file
After Width: | Height: | Size: 177 B |
Before Width: | Height: | Size: 310 B After Width: | Height: | Size: 320 B |
Before Width: | Height: | Size: 313 B After Width: | Height: | Size: 313 B |
BIN
mobile/android/base/resources/drawable-xxhdpi/ab_qrcode.png
Normal file
After Width: | Height: | Size: 230 B |
Before Width: | Height: | Size: 413 B After Width: | Height: | Size: 418 B |
Before Width: | Height: | Size: 420 B After Width: | Height: | Size: 426 B |
@ -7,7 +7,7 @@
|
||||
xmlns:gecko="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<!-- private browsing mode -->
|
||||
<item gecko:state_private="true" android:drawable="@color/private_toolbar_grey"/>
|
||||
<item gecko:state_private="true" android:drawable="@color/tabs_tray_grey_pressed"/>
|
||||
|
||||
<!-- normal mode -->
|
||||
<item android:drawable="@color/toolbar_grey"/>
|
||||
|
@ -5,16 +5,12 @@
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<!-- Serves to position the content on the screen (bottom, centered) and provide the drop-shadow -->
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:gecko="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/sharedialog"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false">
|
||||
|
||||
<merge
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:gecko="http://schemas.android.com/apk/res-auto">
|
||||
<LinearLayout
|
||||
android:id="@+id/sharedialog"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center"
|
||||
@ -79,5 +75,4 @@
|
||||
gecko:disabledText="@string/overlay_share_bookmark_btn_label_already"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
</merge>
|
||||
|
@ -4,19 +4,17 @@
|
||||
- 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/. -->
|
||||
|
||||
<!-- (lint: UselessParent) The second-outermost layout doesn't have a parent to position itself
|
||||
against and would take up the whole screen without the outermost layout. -->
|
||||
<FrameLayout
|
||||
<merge
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/tab_queue_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
tools:ignore="UselessParent">
|
||||
android:clipToPadding="false">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/tab_queue_container"
|
||||
android:layout_width="@dimen/tab_queue_container_width"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center"
|
||||
@ -119,5 +117,4 @@
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
</merge>
|
||||
|
@ -21,9 +21,20 @@
|
||||
android:imeOptions="actionGo|flagNoExtractUi|flagNoFullscreen"
|
||||
android:selectAllOnFocus="true"
|
||||
android:contentDescription="@string/url_bar_default_text"
|
||||
android:drawableRight="@drawable/ab_mic"
|
||||
android:drawablePadding="12dp"
|
||||
android:paddingRight="8dp"
|
||||
gecko:autoUpdateTheme="false"/>
|
||||
|
||||
<ImageButton android:id="@+id/qrcode"
|
||||
android:layout_width="@dimen/page_action_button_width"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ab_qrcode"
|
||||
android:background="@android:color/transparent"/>
|
||||
|
||||
<ImageButton android:id="@+id/mic"
|
||||
android:layout_width="@dimen/page_action_button_width"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/ab_mic"
|
||||
android:background="@android:color/transparent"/>
|
||||
|
||||
</merge>
|
||||
|
@ -27,11 +27,14 @@
|
||||
<color name="toolbar_grey">#EBEBF0</color>
|
||||
<color name="about_page_header_grey">#F5F5F5</color>
|
||||
|
||||
<color name="url_bar_shadow_private">#7878A5</color>
|
||||
|
||||
<!-- Non-palette colors -->
|
||||
|
||||
<!-- Synced w/ toolbar_grey -->
|
||||
<color name="background_normal_lwt">#DDEBEBF0</color>
|
||||
|
||||
<color name="background_tabs">#FF363B40</color>
|
||||
<color name="highlight">#33000000</color>
|
||||
<color name="highlight_focused">#1A000000</color>
|
||||
<color name="highlight_dark">#33FFFFFF</color>
|
||||
|
@ -33,6 +33,21 @@
|
||||
android:title="@string/pref_zoom_force_enabled"
|
||||
android:summary="@string/pref_zoom_force_enabled_summary" />
|
||||
|
||||
<PreferenceCategory android:title="@string/pref_category_input_options"
|
||||
android:key="@string/pref_category_input_options">
|
||||
|
||||
<CheckBoxPreference android:key="android.not_a_preference.voice_input_enabled"
|
||||
android:title="@string/pref_voice_input"
|
||||
android:summary="@string/pref_voice_input_summary"
|
||||
android:defaultValue="true"/>
|
||||
|
||||
<CheckBoxPreference android:key="android.not_a_preference.qrcode_enabled"
|
||||
android:title="@string/pref_qrcode_enabled"
|
||||
android:summary="@string/pref_qrcode_enabled_summary"
|
||||
android:defaultValue="true"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/pref_category_advanced">
|
||||
|
||||
<CheckBoxPreference
|
||||
|
@ -124,6 +124,7 @@
|
||||
|
||||
<string name="settings">&settings;</string>
|
||||
<string name="settings_title">&settings_title;</string>
|
||||
<string name="pref_category_input_options">&pref_category_input_options;</string>
|
||||
<string name="pref_category_advanced">&pref_category_advanced;</string>
|
||||
<string name="pref_category_customize">&pref_category_customize;</string>
|
||||
<string name="pref_category_customize_summary">&pref_category_customize_summary;</string>
|
||||
@ -134,7 +135,7 @@
|
||||
<string name="pref_category_display">&pref_category_display;</string>
|
||||
<string name="pref_category_display_summary">&pref_category_display_summary;</string>
|
||||
<string name="pref_category_privacy_short">&pref_category_privacy_short;</string>
|
||||
<string name="pref_category_privacy_summary">&pref_category_privacy_summary;</string>
|
||||
<string name="pref_category_privacy_summary">&pref_category_privacy_summary2;</string>
|
||||
<string name="pref_category_vendor">&pref_category_vendor;</string>
|
||||
<string name="pref_category_vendor_summary">&pref_category_vendor_summary;</string>
|
||||
<string name="pref_category_datareporting">&pref_category_datareporting;</string>
|
||||
@ -176,7 +177,7 @@
|
||||
<string name="pref_learn_more">&pref_learn_more;</string>
|
||||
|
||||
<string name="pref_category_logins">&pref_category_logins;</string>
|
||||
<string name="pref_remember_signons">&pref_remember_signons;</string>
|
||||
<string name="pref_remember_signons">&pref_remember_signons2;</string>
|
||||
|
||||
<string name="pref_open_external_urls_privately_title">&pref_open_external_urls_privately_title;</string>
|
||||
<string name="pref_open_external_urls_privately_summary">&pref_open_external_urls_privately_summary;</string>
|
||||
@ -218,18 +219,22 @@
|
||||
<string name="pref_media_autoplay_enabled_summary">&pref_media_autoplay_enabled_summary;</string>
|
||||
<string name="pref_zoom_force_enabled">&pref_zoom_force_enabled;</string>
|
||||
<string name="pref_zoom_force_enabled_summary">&pref_zoom_force_enabled_summary;</string>
|
||||
<string name="pref_voice_input">&pref_voice_input;</string>
|
||||
<string name="pref_voice_input_summary">&pref_voice_input_summary;</string>
|
||||
<string name="pref_qrcode_enabled">&pref_qrcode_enabled;</string>
|
||||
<string name="pref_qrcode_enabled_summary">&pref_qrcode_enabled_summary;</string>
|
||||
<string name="pref_reflow_on_zoom">&pref_reflow_on_zoom4;</string>
|
||||
<string name="pref_restore">&pref_restore;</string>
|
||||
<string name="pref_restore_always">&pref_restore_always;</string>
|
||||
<string name="pref_restore_quit">&pref_restore_quit;</string>
|
||||
<string name="pref_sync">&pref_sync;</string>
|
||||
<string name="pref_sync_summary">&pref_sync_summary;</string>
|
||||
<string name="pref_sync_summary">&pref_sync_summary2;</string>
|
||||
<string name="pref_search_suggestions">&pref_search_suggestions;</string>
|
||||
<string name="pref_private_data_history2">&pref_private_data_history2;</string>
|
||||
<string name="pref_private_data_searchHistory">&pref_private_data_searchHistory;</string>
|
||||
<string name="pref_private_data_formdata2">&pref_private_data_formdata2;</string>
|
||||
<string name="pref_private_data_cookies2">&pref_private_data_cookies2;</string>
|
||||
<string name="pref_private_data_passwords">&pref_private_data_passwords;</string>
|
||||
<string name="pref_private_data_passwords">&pref_private_data_passwords2;</string>
|
||||
<string name="pref_private_data_cache">&pref_private_data_cache;</string>
|
||||
<string name="pref_private_data_offlineApps">&pref_private_data_offlineApps;</string>
|
||||
<string name="pref_private_data_siteSettings">&pref_private_data_siteSettings2;</string>
|
||||
@ -513,7 +518,7 @@
|
||||
<string name="guest_session_dialog_continue">&guest_session_dialog_continue;</string>
|
||||
<string name="guest_session_dialog_cancel">&guest_session_dialog_cancel;</string>
|
||||
<string name="new_guest_session_title">&new_guest_session_title;</string>
|
||||
<string name="new_guest_session_text">&new_guest_session_text;</string>
|
||||
<string name="new_guest_session_text">&new_guest_session_text2;</string>
|
||||
<string name="guest_browsing_notification_title">&guest_browsing_notification_title;</string>
|
||||
<string name="guest_browsing_notification_text">&guest_browsing_notification_text;</string>
|
||||
|
||||
|
@ -133,6 +133,8 @@ public abstract class BrowserToolbar extends ThemedRelativeLayout
|
||||
protected TabHistoryController tabHistoryController;
|
||||
|
||||
private final Paint shadowPaint;
|
||||
private final int shadowColor;
|
||||
private final int shadowPrivateColor;
|
||||
private final int shadowSize;
|
||||
|
||||
private final ToolbarPrefs prefs;
|
||||
@ -200,7 +202,9 @@ public abstract class BrowserToolbar extends ThemedRelativeLayout
|
||||
shadowSize = res.getDimensionPixelSize(R.dimen.browser_toolbar_shadow_size);
|
||||
|
||||
shadowPaint = new Paint();
|
||||
shadowPaint.setColor(res.getColor(R.color.url_bar_shadow));
|
||||
shadowColor = res.getColor(R.color.url_bar_shadow);
|
||||
shadowPrivateColor = res.getColor(R.color.url_bar_shadow_private);
|
||||
shadowPaint.setColor(shadowColor);
|
||||
shadowPaint.setStrokeWidth(0.0f);
|
||||
|
||||
setUIMode(UIMode.DISPLAY);
|
||||
@ -347,6 +351,10 @@ public abstract class BrowserToolbar extends ThemedRelativeLayout
|
||||
canvas.drawRect(0, height - shadowSize, getWidth(), height, shadowPaint);
|
||||
}
|
||||
|
||||
public void onParentFocus() {
|
||||
urlEditLayout.onParentFocus();
|
||||
}
|
||||
|
||||
public void setProgressBar(ToolbarProgressView progressBar) {
|
||||
this.progressBar = progressBar;
|
||||
}
|
||||
@ -837,6 +845,8 @@ public abstract class BrowserToolbar extends ThemedRelativeLayout
|
||||
tabsButton.setPrivateMode(isPrivate);
|
||||
menuButton.setPrivateMode(isPrivate);
|
||||
urlEditLayout.setPrivateMode(isPrivate);
|
||||
|
||||
shadowPaint.setColor(isPrivate ? shadowPrivateColor : shadowColor);
|
||||
}
|
||||
|
||||
public void show() {
|
||||
@ -903,7 +913,7 @@ public abstract class BrowserToolbar extends ThemedRelativeLayout
|
||||
}
|
||||
|
||||
final StateListDrawable stateList = new StateListDrawable();
|
||||
stateList.addState(PRIVATE_STATE_SET, getColorDrawable(R.color.private_toolbar_grey));
|
||||
stateList.addState(PRIVATE_STATE_SET, getColorDrawable(R.color.tabs_tray_grey_pressed));
|
||||
stateList.addState(EMPTY_STATE_SET, drawable);
|
||||
|
||||
setBackgroundDrawable(stateList);
|
||||
|
@ -72,7 +72,7 @@ abstract class NavButton extends ShapedButton {
|
||||
stateList.addState(PRESSED_ENABLED_STATE_SET, getColorDrawable(R.color.toolbar_grey_pressed));
|
||||
stateList.addState(PRIVATE_FOCUSED_STATE_SET, getColorDrawable(R.color.text_and_tabs_tray_grey));
|
||||
stateList.addState(FOCUSED_STATE_SET, getColorDrawable(R.color.new_tablet_highlight_focused));
|
||||
stateList.addState(PRIVATE_STATE_SET, getColorDrawable(R.color.private_toolbar_grey));
|
||||
stateList.addState(PRIVATE_STATE_SET, getColorDrawable(R.color.tabs_tray_grey_pressed));
|
||||
stateList.addState(EMPTY_STATE_SET, drawable);
|
||||
|
||||
setBackgroundDrawable(stateList);
|
||||
|
@ -5,22 +5,38 @@
|
||||
|
||||
package org.mozilla.gecko.toolbar;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.speech.RecognizerIntent;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageButton;
|
||||
import org.mozilla.gecko.ActivityHandlerHelper;
|
||||
import org.mozilla.gecko.AppConstants;
|
||||
import org.mozilla.gecko.GeckoAppShell;
|
||||
import org.mozilla.gecko.GeckoSharedPrefs;
|
||||
import org.mozilla.gecko.R;
|
||||
import org.mozilla.gecko.animation.PropertyAnimator;
|
||||
import org.mozilla.gecko.animation.PropertyAnimator.PropertyAnimationListener;
|
||||
import org.mozilla.gecko.preferences.GeckoPreferences;
|
||||
import org.mozilla.gecko.toolbar.BrowserToolbar.OnCommitListener;
|
||||
import org.mozilla.gecko.toolbar.BrowserToolbar.OnDismissListener;
|
||||
import org.mozilla.gecko.toolbar.BrowserToolbar.OnFilterListener;
|
||||
import org.mozilla.gecko.toolbar.BrowserToolbar.TabEditingState;
|
||||
import org.mozilla.gecko.util.ActivityResultHandler;
|
||||
import org.mozilla.gecko.util.StringUtils;
|
||||
import org.mozilla.gecko.util.InputOptionsUtils;
|
||||
import org.mozilla.gecko.widget.ThemedLinearLayout;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* {@code ToolbarEditLayout} is the UI for when the toolbar is in
|
||||
* edit state. It controls a text entry ({@code ToolbarEditText})
|
||||
@ -31,8 +47,13 @@ public class ToolbarEditLayout extends ThemedLinearLayout {
|
||||
|
||||
private final ToolbarEditText mEditText;
|
||||
|
||||
private final ImageButton mVoiceInput;
|
||||
private final ImageButton mQrCode;
|
||||
|
||||
private OnFocusChangeListener mFocusChangeListener;
|
||||
|
||||
private boolean showKeyboardOnFocus = false; // Indicates if we need to show the keyboard after the app resumes
|
||||
|
||||
public ToolbarEditLayout(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
|
||||
@ -40,6 +61,9 @@ public class ToolbarEditLayout extends ThemedLinearLayout {
|
||||
|
||||
LayoutInflater.from(context).inflate(R.layout.toolbar_edit_layout, this);
|
||||
mEditText = (ToolbarEditText) findViewById(R.id.url_edit_text);
|
||||
|
||||
mVoiceInput = (ImageButton) findViewById(R.id.mic);
|
||||
mQrCode = (ImageButton) findViewById(R.id.qrcode);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -49,9 +73,38 @@ public class ToolbarEditLayout extends ThemedLinearLayout {
|
||||
public void onFocusChange(View v, boolean hasFocus) {
|
||||
if (mFocusChangeListener != null) {
|
||||
mFocusChangeListener.onFocusChange(ToolbarEditLayout.this, hasFocus);
|
||||
|
||||
// Checking if voice and QR code input are enabled each time the user taps on the title bar
|
||||
if (hasFocus) {
|
||||
if (voiceIsEnabled(getContext(), getResources().getString(R.string.voicesearch_prompt))) {
|
||||
mVoiceInput.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mVoiceInput.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (qrCodeIsEnabled(getContext())) {
|
||||
mQrCode.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mQrCode.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
mVoiceInput.setOnClickListener(new Button.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
launchVoiceRecognizer();
|
||||
}
|
||||
});
|
||||
|
||||
mQrCode.setOnClickListener(new Button.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
launchQRCodeReader();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -71,6 +124,30 @@ public class ToolbarEditLayout extends ThemedLinearLayout {
|
||||
mEditText.setPrivateMode(isPrivate);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the parent gains focus (on app launch and resume)
|
||||
*/
|
||||
public void onParentFocus() {
|
||||
if (showKeyboardOnFocus) {
|
||||
showKeyboardOnFocus = false;
|
||||
|
||||
Activity activity = GeckoAppShell.getGeckoInterface().getActivity();
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
mEditText.requestFocus();
|
||||
showSoftInput();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Checking if qr code is supported after resuming the app
|
||||
if (qrCodeIsEnabled(getContext())) {
|
||||
mQrCode.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mQrCode.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
void setToolbarPrefs(final ToolbarPrefs prefs) {
|
||||
mEditText.setToolbarPrefs(prefs);
|
||||
}
|
||||
@ -139,4 +216,125 @@ public class ToolbarEditLayout extends ThemedLinearLayout {
|
||||
mEditText.setText(editingState.lastEditingText);
|
||||
mEditText.setSelection(editingState.selectionStart, editingState.selectionEnd);
|
||||
}
|
||||
|
||||
private boolean voiceIsEnabled(Context context, String prompt) {
|
||||
// Voice input is enabled for nightly only
|
||||
if(!AppConstants.NIGHTLY_BUILD) {
|
||||
return false;
|
||||
}
|
||||
final boolean voiceIsSupported = InputOptionsUtils.supportsVoiceRecognizer(context, prompt);
|
||||
if (!voiceIsSupported) {
|
||||
return false;
|
||||
}
|
||||
return GeckoSharedPrefs.forApp(context)
|
||||
.getBoolean(GeckoPreferences.PREFS_VOICE_INPUT_ENABLED, true);
|
||||
}
|
||||
|
||||
private void launchVoiceRecognizer() {
|
||||
final Intent intent = InputOptionsUtils.createVoiceRecognizerIntent(getResources().getString(R.string.voicesearch_prompt));
|
||||
|
||||
Activity activity = GeckoAppShell.getGeckoInterface().getActivity();
|
||||
ActivityHandlerHelper.startIntentForActivity(activity, intent, new ActivityResultHandler() {
|
||||
@Override
|
||||
public void onActivityResult(int resultCode, Intent data) {
|
||||
switch (resultCode) {
|
||||
case RecognizerIntent.RESULT_CLIENT_ERROR:
|
||||
case RecognizerIntent.RESULT_NETWORK_ERROR:
|
||||
case RecognizerIntent.RESULT_SERVER_ERROR:
|
||||
// We have an temporarily unrecoverable error.
|
||||
handleVoiceSearchError(false);
|
||||
break;
|
||||
case RecognizerIntent.RESULT_AUDIO_ERROR:
|
||||
case RecognizerIntent.RESULT_NO_MATCH:
|
||||
// Maybe the user can say it differently?
|
||||
handleVoiceSearchError(true);
|
||||
break;
|
||||
case Activity.RESULT_CANCELED:
|
||||
break;
|
||||
}
|
||||
|
||||
if (resultCode != Activity.RESULT_OK) {
|
||||
return;
|
||||
}
|
||||
|
||||
// We have RESULT_OK, not RESULT_NO_MATCH so it should be safe to assume that
|
||||
// we have at least one match. We only need one: this will be
|
||||
// used for showing the user search engines with this search term in it.
|
||||
List<String> voiceStrings = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
|
||||
String text = voiceStrings.get(0);
|
||||
mEditText.setText(text);
|
||||
mEditText.setSelection(0, text.length());
|
||||
|
||||
final InputMethodManager imm =
|
||||
(InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.showSoftInput(mEditText, InputMethodManager.SHOW_IMPLICIT);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void handleVoiceSearchError(boolean offerRetry) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(getContext())
|
||||
.setTitle(R.string.voicesearch_failed_title)
|
||||
.setIcon(R.drawable.icon).setNeutralButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
if (offerRetry) {
|
||||
builder.setMessage(R.string.voicesearch_failed_message_recoverable)
|
||||
.setNegativeButton(R.string.voicesearch_failed_retry, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
launchVoiceRecognizer();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
builder.setMessage(R.string.voicesearch_failed_message);
|
||||
}
|
||||
|
||||
AlertDialog dialog = builder.create();
|
||||
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
private boolean qrCodeIsEnabled(Context context) {
|
||||
// QR code is enabled for nightly only
|
||||
if(!AppConstants.NIGHTLY_BUILD) {
|
||||
return false;
|
||||
}
|
||||
final boolean qrCodeIsSupported = InputOptionsUtils.supportsQrCodeReader(context);
|
||||
if (!qrCodeIsSupported) {
|
||||
return false;
|
||||
}
|
||||
return GeckoSharedPrefs.forApp(context)
|
||||
.getBoolean(GeckoPreferences.PREFS_QRCODE_ENABLED, true);
|
||||
}
|
||||
|
||||
private void launchQRCodeReader() {
|
||||
final Intent intent = InputOptionsUtils.createQRCodeReaderIntent();
|
||||
|
||||
Activity activity = GeckoAppShell.getGeckoInterface().getActivity();
|
||||
ActivityHandlerHelper.startIntentForActivity(activity, intent, new ActivityResultHandler() {
|
||||
@Override
|
||||
public void onActivityResult(int resultCode, Intent intent) {
|
||||
if (resultCode == Activity.RESULT_OK) {
|
||||
String text = intent.getStringExtra("SCAN_RESULT");
|
||||
if (!StringUtils.isSearchQuery(text, false)) {
|
||||
mEditText.setText(text);
|
||||
mEditText.selectAll();
|
||||
|
||||
// Queuing up the keyboard show action.
|
||||
// At this point the app has not resumed yet, and trying to show
|
||||
// the keyboard will fail.
|
||||
showKeyboardOnFocus = true;
|
||||
}
|
||||
}
|
||||
// We can get the SCAN_RESULT_FORMAT, SCAN_RESULT_BYTES,
|
||||
// SCAN_RESULT_ORIENTATION and SCAN_RESULT_ERROR_CORRECTION_LEVEL
|
||||
// as well as the actual result, which may hold a URL.
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|