Merge b2g-inbound to m-c a=merge

This commit is contained in:
Wes Kocher 2014-12-12 16:43:37 -08:00
commit 9b1ff9a408
30 changed files with 197 additions and 98 deletions

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="3ab0d9c70f0b2e1ededc679112c392303f037361">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0de95b4017de73e72c897e2dcb87564d8f3756eb"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e2a3e606675c346b6e6f35351a458040be599b09"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="50ad16a280fe9cfa0716f8c6ba16afdf7f266b49"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
@ -23,7 +23,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="58aee9864c193acfd03fa196af399d0659ba506d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="04e95f6fbe74ff8627d3a80b5967b794388e75ff"/>
<!-- 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"/>

View File

@ -19,13 +19,13 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="0de95b4017de73e72c897e2dcb87564d8f3756eb"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e2a3e606675c346b6e6f35351a458040be599b09"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="50ad16a280fe9cfa0716f8c6ba16afdf7f266b49"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d5d3f93914558b6f168447b805cd799c8233e300"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="6fa7a4936414ceb4055fd27f7a30e76790f834fb"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="58aee9864c193acfd03fa196af399d0659ba506d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="04e95f6fbe74ff8627d3a80b5967b794388e75ff"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>

View File

@ -17,10 +17,10 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0de95b4017de73e72c897e2dcb87564d8f3756eb"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e2a3e606675c346b6e6f35351a458040be599b09"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="50ad16a280fe9cfa0716f8c6ba16afdf7f266b49"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="58aee9864c193acfd03fa196af399d0659ba506d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="04e95f6fbe74ff8627d3a80b5967b794388e75ff"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="3ab0d9c70f0b2e1ededc679112c392303f037361">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0de95b4017de73e72c897e2dcb87564d8f3756eb"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e2a3e606675c346b6e6f35351a458040be599b09"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="50ad16a280fe9cfa0716f8c6ba16afdf7f266b49"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
@ -23,7 +23,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="58aee9864c193acfd03fa196af399d0659ba506d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="04e95f6fbe74ff8627d3a80b5967b794388e75ff"/>
<!-- 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"/>

View File

@ -19,13 +19,13 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="0de95b4017de73e72c897e2dcb87564d8f3756eb"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e2a3e606675c346b6e6f35351a458040be599b09"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="50ad16a280fe9cfa0716f8c6ba16afdf7f266b49"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d5d3f93914558b6f168447b805cd799c8233e300"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="6fa7a4936414ceb4055fd27f7a30e76790f834fb"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="58aee9864c193acfd03fa196af399d0659ba506d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="04e95f6fbe74ff8627d3a80b5967b794388e75ff"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="3ab0d9c70f0b2e1ededc679112c392303f037361">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0de95b4017de73e72c897e2dcb87564d8f3756eb"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e2a3e606675c346b6e6f35351a458040be599b09"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="50ad16a280fe9cfa0716f8c6ba16afdf7f266b49"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
@ -23,7 +23,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="58aee9864c193acfd03fa196af399d0659ba506d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="04e95f6fbe74ff8627d3a80b5967b794388e75ff"/>
<!-- 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"/>
@ -138,7 +138,7 @@
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="1bb28abbc215f45220620af5cd60a8ac1be93722"/>
<project name="device/qcom/common" path="device/qcom/common" revision="54c32c2ddef066fbdf611d29e4b7c47e0363599e"/>
<project name="device-flame" path="device/t2m/flame" remote="b2g" revision="263b5f41f7733c5577fb101eb4dc8ac5c11cfa8d"/>
<project name="codeaurora_kernel_msm" path="kernel" remote="b2g" revision="3d986de16450c382c97e092e7579df16928e35d5"/>
<project name="codeaurora_kernel_msm" path="kernel" remote="b2g" revision="48b6a2c9fde18f2f7d9abddf05261c498c2bb2ba"/>
<project name="kernel_lk" path="bootable/bootloader/lk" remote="b2g" revision="fda40423ffa573dc6cafd3780515010cb2a086be"/>
<project name="platform/external/bluetooth/bluedroid" path="external/bluetooth/bluedroid" revision="30b96dfca99cb384bf520a16b81f3aba56f09907"/>
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="5b71e40213f650459e95d35b6f14af7e88d8ab62"/>

View File

@ -17,10 +17,10 @@
</project>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0de95b4017de73e72c897e2dcb87564d8f3756eb"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e2a3e606675c346b6e6f35351a458040be599b09"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="50ad16a280fe9cfa0716f8c6ba16afdf7f266b49"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="58aee9864c193acfd03fa196af399d0659ba506d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="04e95f6fbe74ff8627d3a80b5967b794388e75ff"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->

View File

@ -4,6 +4,6 @@
"remote": "",
"branch": ""
},
"revision": "21a79199c8869df69769148db45cf08aff37e315",
"revision": "f741dca42f03f16982c026484be42126a60a8adc",
"repo_path": "integration/gaia-central"
}

View File

@ -17,11 +17,11 @@
<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="0de95b4017de73e72c897e2dcb87564d8f3756eb"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e2a3e606675c346b6e6f35351a458040be599b09"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="50ad16a280fe9cfa0716f8c6ba16afdf7f266b49"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="58aee9864c193acfd03fa196af399d0659ba506d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="04e95f6fbe74ff8627d3a80b5967b794388e75ff"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
<project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>

View File

@ -15,7 +15,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="0de95b4017de73e72c897e2dcb87564d8f3756eb"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e2a3e606675c346b6e6f35351a458040be599b09"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="50ad16a280fe9cfa0716f8c6ba16afdf7f266b49"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

View File

@ -17,10 +17,10 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0de95b4017de73e72c897e2dcb87564d8f3756eb"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e2a3e606675c346b6e6f35351a458040be599b09"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="50ad16a280fe9cfa0716f8c6ba16afdf7f266b49"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="58aee9864c193acfd03fa196af399d0659ba506d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="04e95f6fbe74ff8627d3a80b5967b794388e75ff"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->

View File

@ -17,12 +17,12 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="0de95b4017de73e72c897e2dcb87564d8f3756eb"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e2a3e606675c346b6e6f35351a458040be599b09"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="50ad16a280fe9cfa0716f8c6ba16afdf7f266b49"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="58aee9864c193acfd03fa196af399d0659ba506d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="04e95f6fbe74ff8627d3a80b5967b794388e75ff"/>
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>

View File

@ -75,6 +75,8 @@ struct ShowInfo
nsString name;
bool fullscreenAllowed;
bool isPrivate;
float dpi;
double defaultScale;
};
prio(normal upto urgent) intr protocol PBrowser

View File

@ -889,6 +889,8 @@ TabChild::TabChild(nsIContentChild* aManager,
, mHasValidInnerSize(false)
, mDestroyed(false)
, mUniqueId(aTabId)
, mDPI(0)
, mDefaultScale(0)
{
if (!sActiveDurationMsSet) {
Preferences::AddIntVarCache(&sActiveDurationMs,
@ -1881,7 +1883,7 @@ TabChild::DoFakeShow(const ScrollingBehavior& aScrolling,
const uint64_t& aLayersId,
PRenderFrameChild* aRenderFrame)
{
ShowInfo info(EmptyString(), false, false);
ShowInfo info(EmptyString(), false, false, 0, 0);
RecvShow(nsIntSize(0, 0), info, aScrolling, aTextureFactoryIdentifier, aLayersId, aRenderFrame);
mDidFakeShow = true;
}
@ -1909,6 +1911,8 @@ TabChild::ApplyShowInfo(const ShowInfo& aInfo)
}
}
}
mDPI = aInfo.dpi();
mDefaultScale = aInfo.defaultScale();
}
#ifdef MOZ_WIDGET_GONK
@ -3176,6 +3180,12 @@ TabChild::GetDPI(float* aDPI)
return;
}
if (mDPI > 0) {
*aDPI = mDPI;
return;
}
// Fallback to a sync call if needed.
SendGetDPI(aDPI);
}
@ -3187,6 +3197,12 @@ TabChild::GetDefaultScale(double* aScale)
return;
}
if (mDefaultScale > 0) {
*aScale = mDefaultScale;
return;
}
// Fallback to a sync call if needed.
SendGetDefaultScale(aScale);
}

View File

@ -659,6 +659,8 @@ private:
// Position of tab, relative to parent widget (typically the window)
nsIntPoint mChromeDisp;
TabId mUniqueId;
float mDPI;
double mDefaultScale;
DISALLOW_EVIL_CONSTRUCTORS(TabChild);
};

View File

@ -603,7 +603,9 @@ TabParent::Show(const nsIntSize& size)
}
}
ShowInfo info(EmptyString(), false, false);
TryCacheDPIAndScale();
ShowInfo info(EmptyString(), false, false, mDPI, mDefaultScale.scale);
if (mFrameElement) {
nsAutoString name;
mFrameElement->GetAttr(kNameSpaceID_None, nsGkAtoms::name, name);
@ -611,7 +613,7 @@ TabParent::Show(const nsIntSize& size)
mFrameElement->HasAttr(kNameSpaceID_None, nsGkAtoms::allowfullscreen) ||
mFrameElement->HasAttr(kNameSpaceID_None, nsGkAtoms::mozallowfullscreen);
bool isPrivate = mFrameElement->HasAttr(kNameSpaceID_None, nsGkAtoms::mozprivatebrowsing);
info = ShowInfo(name, allowFullscreen, isPrivate);
info = ShowInfo(name, allowFullscreen, isPrivate, mDPI, mDefaultScale.scale);
}
unused << SendShow(size, info, scrolling, textureFactoryIdentifier, layersId, renderFrame);

View File

@ -476,7 +476,10 @@ Nfc.prototype = {
gMessageManager.onTagFound(message);
}
gSystemMessenger.broadcastMessage("nfc-manager-tech-discovered", message);
let sysMsg = new NfcTechDiscoveredSysMsg(message.sessionToken,
message.isP2P,
message.records);
gSystemMessenger.broadcastMessage("nfc-manager-tech-discovered", sysMsg);
break;
case "TechLostNotification":
message.type = "techLost";
@ -581,8 +584,11 @@ Nfc.prototype = {
// the data to alternate carrier's (BT / WiFi) 'sendFile' interface.
// Notify system app to initiate BT send file operation
let sysMsg = new NfcSendFileSysMsg(message.data.requestId,
message.data.sessionToken,
message.data.blob);
gSystemMessenger.broadcastMessage("nfc-manager-send-file",
message.data);
sysMsg);
break;
case "NFC:QueryInfo":
return {rfState: this.rfState};
@ -630,6 +636,32 @@ Nfc.prototype = {
}
};
function NfcTechDiscoveredSysMsg(sessionToken, isP2P, records) {
this.sessionToken = sessionToken;
this.isP2P = isP2P;
this.records = records;
}
NfcTechDiscoveredSysMsg.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsINfcTechDiscoveredSysMsg]),
sessionToken: null,
isP2P: null,
records: null
};
function NfcSendFileSysMsg(requestId, sessionToken, blob) {
this.requestId = requestId;
this.sessionToken = sessionToken;
this.blob = blob;
}
NfcSendFileSysMsg.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsINfcSendFileSysMsg]),
requestId: null,
sessionToken: null,
blob: null
};
if (NFC_ENABLED) {
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([Nfc]);
}

View File

@ -0,0 +1,25 @@
/* 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/. */
#include "nsISupports.idl"
interface nsIDOMBlob ;
interface nsIVariant;
[scriptable, uuid(ff0b1622-0e79-4d97-8153-6244a2410eee)]
interface nsINfcTechDiscoveredSysMsg : nsISupports
{
readonly attribute DOMString sessionToken;
readonly attribute boolean isP2P;
readonly attribute nsIVariant records;
};
[scriptable, uuid(31c334f5-f072-451f-9405-19d0ac7ae7d1)]
interface nsINfcSendFileSysMsg : nsISupports
{
readonly attribute DOMString requestId;
readonly attribute DOMString sessionToken;
readonly attribute nsIDOMBlob blob;
};

View File

@ -30,6 +30,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['MOZ_NFC']:
]
XPIDL_SOURCES += [
'gonk/nsINfcService.idl',
'gonk/nsINfcSystemMessage.idl',
]
EXTRA_COMPONENTS += [
'gonk/Nfc.js',

View File

@ -4,6 +4,14 @@
"use strict";
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/DOMRequestHelper.jsm");
let DEBUG = false;
let VERBOSE = false;
@ -18,14 +26,6 @@ function debug(s) {
dump("-*- SettingsManager: " + s + "\n");
}
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/DOMRequestHelper.jsm");
XPCOMUtils.defineLazyServiceGetter(Services, "DOMRequest",
"@mozilla.org/dom/dom-request-service;1",
"nsIDOMRequestService");

View File

@ -4,18 +4,6 @@
"use strict";
let DEBUG = false;
let VERBOSE = false;
try {
DEBUG =
Services.prefs.getBoolPref("dom.mozSettings.SettingsRequestManager.debug.enabled");
VERBOSE =
Services.prefs.getBoolPref("dom.mozSettings.SettingsRequestManager.verbose.enabled");
} catch (ex) { }
function debug(s) { dump("-*- SettingsRequestManager: " + s + "\n"); }
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cu = Components.utils;
@ -27,6 +15,20 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/PermissionsTable.jsm");
let DEBUG = false;
let VERBOSE = false;
try {
DEBUG =
Services.prefs.getBoolPref("dom.mozSettings.SettingsRequestManager.debug.enabled");
VERBOSE =
Services.prefs.getBoolPref("dom.mozSettings.SettingsRequestManager.verbose.enabled");
} catch (ex) { }
function debug(s) {
dump("-*- SettingsRequestManager: " + s + "\n");
}
const kXpcomShutdownObserverTopic = "xpcom-shutdown";
const kInnerWindowDestroyed = "inner-window-destroyed";
const kMozSettingsChangedObserverTopic = "mozsettings-changed";

View File

@ -2,7 +2,14 @@
* 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"
"use strict";
const Ci = Components.interfaces;
const Cu = Components.utils;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import('resource://gre/modules/SettingsRequestManager.jsm');
/* static functions */
let DEBUG = false;
@ -19,13 +26,6 @@ function debug(s) {
dump("-*- SettingsService: " + s + "\n");
}
const Ci = Components.interfaces;
const Cu = Components.utils;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import('resource://gre/modules/SettingsRequestManager.jsm');
XPCOMUtils.defineLazyServiceGetter(this, "uuidgen",
"@mozilla.org/uuid-generator;1",
"nsIUUIDGenerator");

View File

@ -6924,7 +6924,14 @@ RilObject.prototype[UNSOLICITED_RIL_CONNECTED] = function UNSOLICITED_RIL_CONNEC
// Reset radio in the case that b2g restart (or crash).
this.setRadioEnabled({enabled: false});
};
RilObject.prototype[UNSOLICITED_VOICE_RADIO_TECH_CHANGED] = null;
RilObject.prototype[UNSOLICITED_VOICE_RADIO_TECH_CHANGED] = function UNSOLICITED_VOICE_RADIO_TECH_CHANGED(length) {
// This unsolicited response will be sent when the technology of a multi-tech
// modem is changed, ex. switch between gsm and cdma.
// TODO: We may need to do more on updating data when switching between gsm
// and cdma mode, e.g. IMEI, ESN, iccInfo, iccType ... etc.
// See Bug 866038.
this._processRadioTech(this.context.Buf.readInt32List()[0]);
};
/**
* This object exposes the functionality to parse and serialize PDU strings

View File

@ -98,12 +98,12 @@ skip-if(Android||B2G) needs-focus == 462758-grabbers-resizers.html 462758-grabbe
== 388980-1.html 388980-1-ref.html
needs-focus == spellcheck-superscript-1.html spellcheck-superscript-1-ref.html
skip-if(B2G) fails-if(Android) needs-focus != spellcheck-superscript-2.html spellcheck-superscript-2-ref.html # bug 783658
needs-focus == 824080-1.html 824080-1-ref.html
needs-focus pref(selectioncaret.enabled,false) == 824080-1.html 824080-1-ref.html
needs-focus == 824080-2.html 824080-2-ref.html
needs-focus test-pref(selectioncaret.enabled,false) == 824080-3.html 824080-3-ref.html
needs-focus pref(selectioncaret.enabled,false) == 824080-3.html 824080-3-ref.html
needs-focus != 824080-2.html 824080-3.html
needs-focus == 824080-4.html 824080-4-ref.html
needs-focus test-pref(selectioncaret.enabled,false) == 824080-5.html 824080-5-ref.html
needs-focus pref(selectioncaret.enabled,false) == 824080-4.html 824080-4-ref.html
needs-focus pref(selectioncaret.enabled,false) == 824080-5.html 824080-5-ref.html
needs-focus != 824080-4.html 824080-5.html
needs-focus == 824080-6.html 824080-6-ref.html
needs-focus pref(selectioncaret.enabled,false) == 824080-7.html 824080-7-ref.html

View File

@ -63,13 +63,6 @@ static const char* kSelectionCaretsLogModuleName = "SelectionCarets";
static const int32_t kMoveStartTolerancePx = 5;
// Time for trigger scroll end event, in miliseconds.
static const int32_t kScrollEndTimerDelay = 300;
// Read from preference "selectioncaret.noneditable". Indicate whether support
// non-editable fields selection or not. We have stable state for editable
// fields selection now. And we don't want to break this stable state when
// enabling non-editable support. So I add a pref to control to support or
// not. Once non-editable fields support is stable. We should remove this
// pref.
static bool kSupportNonEditableFields = false;
NS_IMPL_ISUPPORTS(SelectionCarets,
nsIReflowObserver,
@ -104,8 +97,6 @@ SelectionCarets::SelectionCarets(nsIPresShell* aPresShell)
if (!addedPref) {
Preferences::AddIntVarCache(&sSelectionCaretsInflateSize,
"selectioncaret.inflatesize.threshold");
Preferences::AddBoolVarCache(&kSupportNonEditableFields,
"selectioncaret.noneditable");
addedPref = true;
}
}
@ -460,6 +451,11 @@ SelectionCarets::UpdateSelectionCarets()
// Check start and end frame is rtl or ltr text
nsRefPtr<nsFrameSelection> fs = GetFrameSelection();
if (!fs) {
SetVisibility(false);
return;
}
int32_t startOffset;
nsIFrame* startFrame = FindFirstNodeWithFrame(mPresShell->GetDocument(),
firstRange, fs, false, startOffset);
@ -473,14 +469,6 @@ SelectionCarets::UpdateSelectionCarets()
return;
}
// If frame isn't editable and we don't support non-editable fields, bail
// out.
if (!kSupportNonEditableFields &&
(!startFrame->GetContent()->IsEditable() ||
!endFrame->GetContent()->IsEditable())) {
return;
}
// Check if startFrame is after endFrame.
if (nsLayoutUtils::CompareTreePosition(startFrame, endFrame) > 0) {
SetVisibility(false);
@ -556,12 +544,6 @@ SelectionCarets::SelectWord()
return NS_OK;
}
// If frame isn't editable and we don't support non-editable fields, bail
// out.
if (!kSupportNonEditableFields && !ptFrame->GetContent()->IsEditable()) {
return NS_OK;
}
bool selectable;
ptFrame->IsSelectable(&selectable, nullptr);
if (!selectable) {
@ -607,7 +589,9 @@ SelectionCarets::SelectWord()
// Clear maintain selection otherwise we cannot select less than a word
nsRefPtr<nsFrameSelection> fs = GetFrameSelection();
fs->MaintainSelection();
if (fs) {
fs->MaintainSelection();
}
return rs;
}
@ -697,6 +681,9 @@ SelectionCarets::DragSelection(const nsPoint &movePoint)
}
nsRefPtr<nsFrameSelection> fs = GetFrameSelection();
if (!fs) {
return nsEventStatus_eConsumeNoDefault;
}
nsresult result;
nsIFrame *newFrame = nullptr;
@ -721,6 +708,10 @@ SelectionCarets::DragSelection(const nsPoint &movePoint)
}
nsRefPtr<dom::Selection> selection = GetSelection();
if (!selection) {
return nsEventStatus_eConsumeNoDefault;
}
int32_t rangeCount = selection->GetRangeCount();
if (rangeCount <= 0) {
return nsEventStatus_eConsumeNoDefault;
@ -771,12 +762,19 @@ SelectionCarets::GetCaretYCenterPosition()
}
nsRefPtr<dom::Selection> selection = GetSelection();
if (!selection) {
return 0;
}
int32_t rangeCount = selection->GetRangeCount();
if (rangeCount <= 0) {
return 0;
}
nsRefPtr<nsFrameSelection> fs = GetFrameSelection();
if (!fs) {
return 0;
}
MOZ_ASSERT(mDragMode != NONE);
nsCOMPtr<nsIContent> node;
@ -809,14 +807,18 @@ void
SelectionCarets::SetSelectionDragState(bool aState)
{
nsRefPtr<nsFrameSelection> fs = GetFrameSelection();
fs->SetDragState(aState);
if (fs) {
fs->SetDragState(aState);
}
}
void
SelectionCarets::SetSelectionDirection(bool aForward)
{
nsRefPtr<dom::Selection> selection = GetSelection();
selection->SetDirection(aForward ? eDirNext : eDirPrevious);
if (selection) {
selection->SetDirection(aForward ? eDirNext : eDirPrevious);
}
}
static void

View File

@ -7,6 +7,7 @@ from by import By
from marionette import Actions
from marionette_test import MarionetteTestCase
from selection import SelectionManager
from gestures import long_press_without_contextmenu
class SelectionCaretsTest(MarionetteTestCase):
@ -48,7 +49,7 @@ class SelectionCaretsTest(MarionetteTestCase):
# Long press the caret position. Selection carets should appear, and the
# first word will be selected. On Windows, those spaces after the word
# will also be selected.
self.actions.long_press(el, self._long_press_time, x, y).perform()
long_press_without_contextmenu(self.marionette, el, self._long_press_time, x, y)
def _test_long_press_to_select_a_word(self, el, assertFunc):
sel = SelectionManager(el)
@ -216,5 +217,4 @@ class SelectionCaretsTest(MarionetteTestCase):
########################################################################
def test_content_non_editable_minimum_select_one_character_by_selection(self):
self.openTestHtml(enabled=True)
# Currently, selection carets do not show on non-editable elements.
self._test_minimum_select_one_character(self._content, self.assertNotEqual)
self._test_minimum_select_one_character(self._content, self.assertEqual)

View File

@ -7,6 +7,7 @@ from by import By
from marionette import Actions
from marionette_test import MarionetteTestCase
from selection import SelectionManager
from gestures import long_press_without_contextmenu
class SelectionCaretsMultipleRangeTest(MarionetteTestCase):
@ -36,10 +37,6 @@ class SelectionCaretsMultipleRangeTest(MarionetteTestCase):
self._sel6 = self.marionette.find_element(By.ID, 'sel6')
self._nonsel1 = self.marionette.find_element(By.ID, 'nonsel1')
def _long_press_without_contextmenu(self, el, x, y):
return self.actions.press(el, x, y).move_by_offset(0, 0).\
wait(self._long_press_time).release()
def _long_press_to_select_word(self, el, wordOrdinal):
sel = SelectionManager(el)
original_content = sel.content
@ -61,7 +58,7 @@ class SelectionCaretsMultipleRangeTest(MarionetteTestCase):
# Long press the caret position. Selection carets should appear, and the
# word will be selected. On Windows, those spaces after the word
# will also be selected.
self._long_press_without_contextmenu(el, x, y).perform()
long_press_without_contextmenu(self.marionette, el, self._long_press_time, x, y)
def _to_unix_line_ending(self, s):
"""Changes all Windows/Mac line endings in s to UNIX line endings."""
@ -74,7 +71,7 @@ class SelectionCaretsMultipleRangeTest(MarionetteTestCase):
self.openTestHtml(enabled=True)
halfY = self._nonsel1.size['height'] / 2
self._long_press_without_contextmenu(self._nonsel1, 0, halfY).perform()
long_press_without_contextmenu(self.marionette, self._nonsel1, self._long_press_time, 0, halfY)
sel = SelectionManager(self._nonsel1)
range_count = sel.range_count()
self.assertEqual(range_count, 0)

View File

@ -4378,7 +4378,6 @@ pref("touchcaret.expiration.time", 3000);
// Turn off selection caret by default
pref("selectioncaret.enabled", false);
pref("selectioncaret.noneditable", false);
// This will inflate size of selection caret frame when we checking if
// user click on selection caret or not. In app units.

View File

@ -169,7 +169,7 @@ __wrap_PR_SetEnv(const char *string)
if ( !strchr(string, '=')) return(-1);
pthread_mutex_lock(&_pr_envLock);
result = putenv(string);
result = putenv(const_cast<char*>(string));
pthread_mutex_unlock(&_pr_envLock);
return (result)? -1 : 0;
}

View File

@ -69,3 +69,15 @@ def pinch(marionette_session, element, x1, y1, x2, y2, x3, y3, x4, y4, duration=
action1.release()
action2.release()
multiAction.add(action1).add(action2).perform()
#element: The element to press.
#time_in_seconds: Time in seconds to wait before releasing the press.
#x: Optional, x-coordinate to tap, relative to the top-left corner of the element.
#y: Optional, y-coordinate to tap, relative to the top-leftcorner of the element.
def long_press_without_contextmenu(marionette_session, element, time_in_seconds, x=None, y=None):
action = Actions(marionette_session)
action.press(element, x, y)
action.move_by_offset(0, 0)
action.wait(time_in_seconds)
action.release()
action.perform()