mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Merge b2g-inbound to m-c.
This commit is contained in:
commit
612a51c419
@ -874,6 +874,7 @@ pref("identity.fxaccounts.auth.uri", "https://api-accounts.dev.lcip.org/v1");
|
||||
// Gaia relies heavily on scroll events for now, so lets fire them
|
||||
// more often than the default value (100).
|
||||
pref("apz.asyncscroll.throttle", 40);
|
||||
pref("apz.pan_repaint_interval", 40);
|
||||
|
||||
// This preference allows FirefoxOS apps (and content, I think) to force
|
||||
// the use of software (instead of hardware accelerated) 2D canvases by
|
||||
|
@ -12,7 +12,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="743afeb3a5a3e354b5cf20f64bd57f65dcccd995"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ea4a1f0d94a995486ed219f47132949071ecc172"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eda08beb3ba9a159843c70ffde0f9660ec351eb9"/>
|
||||
|
@ -11,7 +11,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="743afeb3a5a3e354b5cf20f64bd57f65dcccd995"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="ea4a1f0d94a995486ed219f47132949071ecc172"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="e33ea242b4328fb0d1824c951f379332b5021512"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="788d9ce293a9b44f64536130cf4ad577e8101dbe"/>
|
||||
@ -124,7 +124,7 @@
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="8f7c9ac889ae2c778197b4a4c0529d60530f480b"/>
|
||||
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="0e56e450367cd802241b27164a2979188242b95f"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="2838a77ce4b8c09fa6a46fe25410bb3a4474cbd4"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="f995ccdb7c023b7edd8064c9d06fbea8f7108c45"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="5af419c0af0650066c0c58a5e99125b1002a62c5"/>
|
||||
<project name="platform/development" path="development" revision="1f18cfe031ce23b7fb838fe3d4379dd802b49e71"/>
|
||||
<project name="android-sdk" path="sdk" remote="b2g" revision="8b1365af38c9a653df97349ee53a3f5d64fd590a"/>
|
||||
</manifest>
|
||||
|
@ -12,7 +12,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="743afeb3a5a3e354b5cf20f64bd57f65dcccd995"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ea4a1f0d94a995486ed219f47132949071ecc172"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eda08beb3ba9a159843c70ffde0f9660ec351eb9"/>
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"revision": "9e58b7068dc8cc4883ed092c8599ece51ebb2575",
|
||||
"revision": "b82f9138def9e1b0ce69667ca29069cd8b785d5e",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
@ -11,7 +11,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="743afeb3a5a3e354b5cf20f64bd57f65dcccd995"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ea4a1f0d94a995486ed219f47132949071ecc172"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -10,7 +10,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="743afeb3a5a3e354b5cf20f64bd57f65dcccd995"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ea4a1f0d94a995486ed219f47132949071ecc172"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -12,7 +12,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="743afeb3a5a3e354b5cf20f64bd57f65dcccd995"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ea4a1f0d94a995486ed219f47132949071ecc172"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -11,7 +11,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="743afeb3a5a3e354b5cf20f64bd57f65dcccd995"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ea4a1f0d94a995486ed219f47132949071ecc172"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -11,7 +11,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="743afeb3a5a3e354b5cf20f64bd57f65dcccd995"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="ea4a1f0d94a995486ed219f47132949071ecc172"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="e33ea242b4328fb0d1824c951f379332b5021512"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="788d9ce293a9b44f64536130cf4ad577e8101dbe"/>
|
||||
@ -121,7 +121,7 @@
|
||||
<project name="device-mako" path="device/lge/mako" remote="b2g" revision="78d17f0c117f0c66dd55ee8d5c5dde8ccc93ecba"/>
|
||||
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="3a9a17613cc685aa232432566ad6cc607eab4ec1"/>
|
||||
<project name="device/lge/mako-kernel" path="device/lge/mako-kernel" revision="d1729e53d71d711c8fde25eab8728ff2b9b4df0e"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="f995ccdb7c023b7edd8064c9d06fbea8f7108c45"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="5af419c0af0650066c0c58a5e99125b1002a62c5"/>
|
||||
<project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="7d33aaf740bbf6c7c6e9c34a92b371eda311b66b"/>
|
||||
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="0e56e450367cd802241b27164a2979188242b95f"/>
|
||||
<project name="platform/hardware/broadcom/wlan" path="hardware/broadcom/wlan" revision="0e1929fa3aa38bf9d40e9e953d619fab8164c82e"/>
|
||||
|
@ -11,7 +11,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="743afeb3a5a3e354b5cf20f64bd57f65dcccd995"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ea4a1f0d94a995486ed219f47132949071ecc172"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="49c722fa1a5e1873fa0010829fd97d0b74009ca5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -40,33 +40,40 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=654550
|
||||
|
||||
}
|
||||
|
||||
function ontimeupdate(event) {
|
||||
function ontimeupdate_statsEnabled(event) {
|
||||
var v = event.target;
|
||||
if (SpecialPowers.getBoolPref("media.video_stats.enabled")) {
|
||||
checkStats(v, true);
|
||||
SpecialPowers.setBoolPref("media.video_stats.enabled", false);
|
||||
} else {
|
||||
checkStats(v, false);
|
||||
SpecialPowers.setBoolPref("media.video_stats.enabled", true);
|
||||
v.removeEventListener("timeupdate", ontimeupdate);
|
||||
SpecialPowers.clearUserPref("media.video_stats.enabled");
|
||||
removeNodeAndSource(v);
|
||||
manager.finished(v.token);
|
||||
}
|
||||
v.removeEventListener('timeupdate', ontimeupdate_statsEnabled, false);
|
||||
checkStats(v, true);
|
||||
SpecialPowers.popPrefEnv(
|
||||
function() {
|
||||
v.addEventListener("timeupdate", ontimeupdate_statsDisabled);
|
||||
});
|
||||
}
|
||||
|
||||
function ontimeupdate_statsDisabled(event) {
|
||||
var v = event.target;
|
||||
v.removeEventListener('timeupdate', ontimeupdate_statsDisabled, false);
|
||||
checkStats(v, false);
|
||||
removeNodeAndSource(v);
|
||||
manager.finished(v.token);
|
||||
}
|
||||
|
||||
function startTest(test, token) {
|
||||
var v = document.createElement('video');
|
||||
v.token = token;
|
||||
v.src = test.name;
|
||||
manager.started(token);
|
||||
v.play();
|
||||
SpecialPowers.setBoolPref("media.video_stats.enabled", true);
|
||||
v.addEventListener("timeupdate", ontimeupdate);
|
||||
SpecialPowers.pushPrefEnv({"set": [["media.video_stats.enabled", true]]},
|
||||
function() {
|
||||
v.play();
|
||||
v.addEventListener("timeupdate", ontimeupdate_statsEnabled);
|
||||
});
|
||||
}
|
||||
|
||||
manager.runTests(gVideoTests, startTest);
|
||||
SpecialPowers.pushPrefEnv({"set": [["media.video_stats.enabled", false]]},
|
||||
function() {
|
||||
manager.runTests(gVideoTests, startTest);
|
||||
});
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
|
@ -11,16 +11,13 @@
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
function startTest() {
|
||||
var element = document.createElement('audio');
|
||||
|
||||
element.src = 'detodos.opus';
|
||||
element.stream = element.mozCaptureStream();
|
||||
// the expect sequence should be
|
||||
// 1. onerror
|
||||
// 2. ondataavailable
|
||||
// 3. onstop
|
||||
var callbackStep = 0;
|
||||
var mediaRecorder = new MediaRecorder(element.stream);
|
||||
var stream = new AudioContext().createMediaStreamDestination().stream;
|
||||
var mediaRecorder = new MediaRecorder(stream);
|
||||
|
||||
mediaRecorder.onerror = function (e) {
|
||||
is(callbackStep, 0, 'should fired onstop callback');
|
||||
@ -28,7 +25,6 @@ function startTest() {
|
||||
is(mediaRecorder.mimeType, '', 'mimetype should be empty');
|
||||
is(mediaRecorder.state, 'recording', 'state is recording');
|
||||
info('onerror callback fired');
|
||||
SpecialPowers.setBoolPref('media.ogg.enabled', true);
|
||||
callbackStep = 1;
|
||||
};
|
||||
|
||||
@ -54,20 +50,16 @@ function startTest() {
|
||||
callbackStep = 2;
|
||||
};
|
||||
|
||||
// Start recording once canplaythrough fires
|
||||
element.oncanplaythrough = function() {
|
||||
SpecialPowers.setBoolPref("media.ogg.enabled", false);
|
||||
mediaRecorder.start(250);
|
||||
is(mediaRecorder.state, 'recording', 'Media recorder should be recording');
|
||||
is(mediaRecorder.stream, element.stream,
|
||||
'Media recorder stream = element stream at the start of recording');
|
||||
};
|
||||
|
||||
element.play();
|
||||
// Start recording
|
||||
mediaRecorder.start(250);
|
||||
is(mediaRecorder.state, 'recording', 'Media recorder should be recording');
|
||||
is(mediaRecorder.stream, stream,
|
||||
'Media recorder stream = element stream at the start of recording');
|
||||
}
|
||||
|
||||
startTest();
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SpecialPowers.pushPrefEnv({"set": [["media.ogg.enabled", false]]}, startTest);
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
|
@ -602,6 +602,9 @@ MediaEngineWebRTCVideoSource::HandleEvent(const nsAString& error) {
|
||||
void
|
||||
MediaEngineWebRTCVideoSource::OnNewFrame(const gfxIntSize& aIntrinsicSize, layers::Image* aImage) {
|
||||
MonitorAutoLock enter(mMonitor);
|
||||
if (mState == kStopped) {
|
||||
return;
|
||||
}
|
||||
mImage = aImage;
|
||||
if (mWidth != aIntrinsicSize.width || mHeight != aIntrinsicSize.height) {
|
||||
mWidth = aIntrinsicSize.width;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -24,6 +24,23 @@ BEGIN_BLUETOOTH_NAMESPACE
|
||||
class BluetoothDBusService : public BluetoothService
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* For DBus Control method of "UpdateNotification", event id should be
|
||||
* specified as following:
|
||||
* (Please see specification of AVRCP 1.3, Table 5.28 for more details.)
|
||||
*/
|
||||
enum ControlEventId {
|
||||
EVENT_PLAYBACK_STATUS_CHANGED = 0x01,
|
||||
EVENT_TRACK_CHANGED = 0x02,
|
||||
EVENT_TRACK_REACHED_END = 0x03,
|
||||
EVENT_TRACK_REACHED_START = 0x04,
|
||||
EVENT_PLAYBACK_POS_CHANGED = 0x05,
|
||||
EVENT_BATT_STATUS_CHANGED = 0x06,
|
||||
EVENT_SYSTEM_STATUS_CHANGED = 0x07,
|
||||
EVENT_PLAYER_APPLICATION_SETTING_CHANGED = 0x08,
|
||||
EVENT_UNKNOWN
|
||||
};
|
||||
|
||||
BluetoothDBusService();
|
||||
~BluetoothDBusService();
|
||||
|
||||
@ -159,23 +176,6 @@ public:
|
||||
SendInputMessage(const nsAString& aDeviceAddresses,
|
||||
const nsAString& aMessage) MOZ_OVERRIDE;
|
||||
private:
|
||||
/**
|
||||
* For DBus Control method of "UpdateNotification", event id should be
|
||||
* specified as following:
|
||||
* (Please see specification of AVRCP 1.3, Table 5.28 for more details.)
|
||||
*/
|
||||
enum ControlEventId {
|
||||
EVENT_PLAYBACK_STATUS_CHANGED = 0x01,
|
||||
EVENT_TRACK_CHANGED = 0x02,
|
||||
EVENT_TRACK_REACHED_END = 0x03,
|
||||
EVENT_TRACK_REACHED_START = 0x04,
|
||||
EVENT_PLAYBACK_POS_CHANGED = 0x05,
|
||||
EVENT_BATT_STATUS_CHANGED = 0x06,
|
||||
EVENT_SYSTEM_STATUS_CHANGED = 0x07,
|
||||
EVENT_PLAYER_APPLICATION_SETTING_CHANGED = 0x08,
|
||||
EVENT_UNKNOWN
|
||||
};
|
||||
|
||||
nsresult SendGetPropertyMessage(const nsAString& aPath,
|
||||
const char* aInterface,
|
||||
void (*aCB)(DBusMessage *, void *),
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
/* Copyright © 2013 Deutsche Telekom, Inc. */
|
||||
|
||||
#include "MozNdefRecord.h"
|
||||
#include "mozilla/dom/MozNdefRecordBinding.h"
|
||||
#include "MozNDEFRecord.h"
|
||||
#include "mozilla/dom/MozNDEFRecordBinding.h"
|
||||
#include "mozilla/HoldDropJSObjects.h"
|
||||
#include "nsContentUtils.h"
|
||||
|
||||
@ -16,40 +16,40 @@ namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(MozNdefRecord)
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(MozNDEFRecord)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(MozNdefRecord)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(MozNDEFRecord)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mWindow)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(MozNdefRecord)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(MozNDEFRecord)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mWindow)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(MozNdefRecord)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(MozNDEFRecord)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mType)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mId)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mPayload)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(MozNdefRecord)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(MozNdefRecord)
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(MozNdefRecord)
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(MozNDEFRecord)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(MozNDEFRecord)
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(MozNDEFRecord)
|
||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
void
|
||||
MozNdefRecord::HoldData()
|
||||
MozNDEFRecord::HoldData()
|
||||
{
|
||||
mozilla::HoldJSObjects(this);
|
||||
}
|
||||
|
||||
void
|
||||
MozNdefRecord::DropData()
|
||||
MozNDEFRecord::DropData()
|
||||
{
|
||||
if (mType) {
|
||||
mType = nullptr;
|
||||
@ -64,8 +64,8 @@ MozNdefRecord::DropData()
|
||||
}
|
||||
|
||||
/* static */
|
||||
already_AddRefed<MozNdefRecord>
|
||||
MozNdefRecord::Constructor(const GlobalObject& aGlobal,
|
||||
already_AddRefed<MozNDEFRecord>
|
||||
MozNDEFRecord::Constructor(const GlobalObject& aGlobal,
|
||||
uint8_t aTnf, const Uint8Array& aType,
|
||||
const Uint8Array& aId, const Uint8Array& aPayload,
|
||||
ErrorResult& aRv)
|
||||
@ -76,7 +76,7 @@ MozNdefRecord::Constructor(const GlobalObject& aGlobal,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsRefPtr<MozNdefRecord> ndefrecord = new MozNdefRecord(aGlobal.GetContext(),
|
||||
nsRefPtr<MozNDEFRecord> ndefrecord = new MozNDEFRecord(aGlobal.GetContext(),
|
||||
win, aTnf, aType, aId,
|
||||
aPayload);
|
||||
if (!ndefrecord) {
|
||||
@ -86,7 +86,7 @@ MozNdefRecord::Constructor(const GlobalObject& aGlobal,
|
||||
return ndefrecord.forget();
|
||||
}
|
||||
|
||||
MozNdefRecord::MozNdefRecord(JSContext* aCx, nsPIDOMWindow* aWindow,
|
||||
MozNDEFRecord::MozNDEFRecord(JSContext* aCx, nsPIDOMWindow* aWindow,
|
||||
uint8_t aTnf, const Uint8Array& aType,
|
||||
const Uint8Array& aId, const Uint8Array& aPayload)
|
||||
: mTnf(aTnf)
|
||||
@ -101,15 +101,15 @@ MozNdefRecord::MozNdefRecord(JSContext* aCx, nsPIDOMWindow* aWindow,
|
||||
HoldData();
|
||||
}
|
||||
|
||||
MozNdefRecord::~MozNdefRecord()
|
||||
MozNDEFRecord::~MozNDEFRecord()
|
||||
{
|
||||
DropData();
|
||||
}
|
||||
|
||||
JSObject*
|
||||
MozNdefRecord::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
|
||||
MozNDEFRecord::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope)
|
||||
{
|
||||
return MozNdefRecordBinding::Wrap(aCx, aScope, this);
|
||||
return MozNDEFRecordBinding::Wrap(aCx, aScope, this);
|
||||
}
|
||||
|
||||
} // namespace dom
|
@ -6,8 +6,8 @@
|
||||
|
||||
/* Copyright © 2013 Deutsche Telekom, Inc. */
|
||||
|
||||
#ifndef mozilla_dom_MozNdefRecord_h__
|
||||
#define mozilla_dom_MozNdefRecord_h__
|
||||
#ifndef mozilla_dom_MozNDEFRecord_h__
|
||||
#define mozilla_dom_MozNDEFRecord_h__
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
@ -26,20 +26,20 @@ struct JSContext;
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class MozNdefRecord MOZ_FINAL : public nsISupports,
|
||||
class MozNDEFRecord MOZ_FINAL : public nsISupports,
|
||||
public nsWrapperCache
|
||||
{
|
||||
public:
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MozNdefRecord)
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MozNDEFRecord)
|
||||
|
||||
public:
|
||||
|
||||
MozNdefRecord(JSContext* aCx, nsPIDOMWindow* aWindow, uint8_t aTnf,
|
||||
MozNDEFRecord(JSContext* aCx, nsPIDOMWindow* aWindow, uint8_t aTnf,
|
||||
const Uint8Array& aType, const Uint8Array& aId,
|
||||
const Uint8Array& aPlayload);
|
||||
|
||||
~MozNdefRecord();
|
||||
~MozNDEFRecord();
|
||||
|
||||
nsIDOMWindow* GetParentObject() const
|
||||
{
|
||||
@ -49,7 +49,7 @@ public:
|
||||
virtual JSObject* WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
|
||||
|
||||
static already_AddRefed<MozNdefRecord>
|
||||
static already_AddRefed<MozNDEFRecord>
|
||||
Constructor(const GlobalObject& aGlobal, uint8_t aTnf,
|
||||
const Uint8Array& aType, const Uint8Array& aId,
|
||||
const Uint8Array& aPayload, ErrorResult& aRv);
|
||||
@ -90,7 +90,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
MozNdefRecord() MOZ_DELETE;
|
||||
MozNDEFRecord() MOZ_DELETE;
|
||||
nsRefPtr<nsPIDOMWindow> mWindow;
|
||||
void HoldData();
|
||||
void DropData();
|
||||
@ -104,4 +104,4 @@ private:
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // mozilla_dom_MozNdefRecord_h__
|
||||
#endif // mozilla_dom_MozNDEFRecord_h__
|
@ -7,10 +7,10 @@
|
||||
|
||||
if CONFIG['MOZ_NFC']:
|
||||
EXPORTS.mozilla.dom += [
|
||||
'MozNdefRecord.h',
|
||||
'MozNDEFRecord.h',
|
||||
]
|
||||
SOURCES += [
|
||||
'MozNdefRecord.cpp',
|
||||
'MozNDEFRecord.cpp',
|
||||
]
|
||||
EXTRA_COMPONENTS += [
|
||||
'nsNfc.js',
|
||||
|
@ -19,7 +19,7 @@ function debug(s) {
|
||||
}
|
||||
|
||||
this.SETTINGSDB_NAME = "settings";
|
||||
this.SETTINGSDB_VERSION = 2;
|
||||
this.SETTINGSDB_VERSION = 3;
|
||||
this.SETTINGSSTORE_NAME = "settings";
|
||||
|
||||
Cu.import("resource://gre/modules/IndexedDBHelper.jsm");
|
||||
|
@ -92,7 +92,7 @@ NfcContentHelper.prototype = {
|
||||
* Strings such as 'type', 'id' 'payload' will not be acccessible to NfcWorker.
|
||||
* Therefore this function exists till the bug is addressed.
|
||||
*/
|
||||
encodeNdefRecords: function encodeNdefRecords(records) {
|
||||
encodeNDEFRecords: function encodeNDEFRecords(records) {
|
||||
let encodedRecords = [];
|
||||
for (let i = 0; i < records.length; i++) {
|
||||
let record = records[i];
|
||||
@ -161,7 +161,7 @@ NfcContentHelper.prototype = {
|
||||
let requestId = btoa(this.getRequestId(request));
|
||||
this._requestMap[requestId] = window;
|
||||
|
||||
let encodedRecords = this.encodeNdefRecords(records);
|
||||
let encodedRecords = this.encodeNDEFRecords(records);
|
||||
cpmm.sendAsyncMessage("NFC:WriteNDEF", {
|
||||
requestId: requestId,
|
||||
sessionToken: sessionToken,
|
||||
@ -390,7 +390,7 @@ NfcContentHelper.prototype = {
|
||||
let ndefMsg = [];
|
||||
for (let i = 0; i < records.length; i++) {
|
||||
let record = records[i];
|
||||
ndefMsg.push(new requester.MozNdefRecord(record.tnf,
|
||||
ndefMsg.push(new requester.MozNDEFRecord(record.tnf,
|
||||
record.type,
|
||||
record.id,
|
||||
record.payload));
|
||||
|
@ -643,7 +643,7 @@ var interfaceNamesInGlobalScope =
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
"MozNamedAttrMap",
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "MozNdefRecord", b2g: true},
|
||||
{name: "MozNDEFRecord", b2g: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "MozNFCPeer", b2g: true},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* Copyright © 2013 Deutsche Telekom, Inc. */
|
||||
|
||||
[Constructor(octet tnf, Uint8Array type, Uint8Array id, Uint8Array payload)]
|
||||
interface MozNdefRecord
|
||||
interface MozNDEFRecord
|
||||
{
|
||||
/**
|
||||
* Type Name Field (3-bits) - Specifies the NDEF record type in general.
|
@ -10,7 +10,7 @@
|
||||
|
||||
[JSImplementation="@mozilla.org/nfc/NFCPeer;1"]
|
||||
interface MozNFCPeer {
|
||||
DOMRequest sendNDEF(sequence<MozNdefRecord> records);
|
||||
DOMRequest sendNDEF(sequence<MozNDEFRecord> records);
|
||||
DOMRequest sendFile(Blob blob);
|
||||
};
|
||||
|
||||
|
@ -27,7 +27,7 @@ enum NFCTechType {
|
||||
interface MozNFCTag {
|
||||
DOMRequest getDetailsNDEF();
|
||||
DOMRequest readNDEF();
|
||||
DOMRequest writeNDEF(sequence<MozNdefRecord> records);
|
||||
DOMRequest writeNDEF(sequence<MozNDEFRecord> records);
|
||||
DOMRequest makeReadOnlyNDEF();
|
||||
|
||||
DOMRequest connect(NFCTechType techType);
|
||||
|
@ -529,7 +529,7 @@ if CONFIG['MOZ_B2G_RIL']:
|
||||
|
||||
if CONFIG['MOZ_NFC']:
|
||||
WEBIDL_FILES += [
|
||||
'MozNdefRecord.webidl',
|
||||
'MozNDEFRecord.webidl',
|
||||
'MozNfc.webidl',
|
||||
'MozNFCPeer.webidl',
|
||||
'MozNFCTag.webidl',
|
||||
|
@ -6,10 +6,7 @@
|
||||
|
||||
#include <dbus/dbus.h>
|
||||
#include "base/message_loop.h"
|
||||
#include "mozilla/Monitor.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "DBusThread.h"
|
||||
#include "DBusUtils.h"
|
||||
#include "RawDBusConnection.h"
|
||||
|
||||
#ifdef CHROMIUM_LOG
|
||||
@ -26,8 +23,6 @@
|
||||
/* TODO: Remove BlueZ constant */
|
||||
#define BLUEZ_DBUS_BASE_IFC "org.bluez"
|
||||
|
||||
using namespace mozilla::ipc;
|
||||
|
||||
//
|
||||
// Runnables
|
||||
//
|
||||
@ -35,93 +30,28 @@ using namespace mozilla::ipc;
|
||||
namespace mozilla {
|
||||
namespace ipc {
|
||||
|
||||
class DBusConnectionSendTaskBase : public Task
|
||||
class Notification
|
||||
{
|
||||
public:
|
||||
virtual ~DBusConnectionSendTaskBase()
|
||||
Notification(DBusReplyCallback aCallback, void* aData)
|
||||
: mCallback(aCallback),
|
||||
mData(aData)
|
||||
{ }
|
||||
|
||||
protected:
|
||||
DBusConnectionSendTaskBase(DBusConnection* aConnection,
|
||||
DBusMessage* aMessage)
|
||||
: mConnection(aConnection),
|
||||
mMessage(aMessage)
|
||||
{
|
||||
MOZ_ASSERT(mConnection);
|
||||
MOZ_ASSERT(mMessage);
|
||||
}
|
||||
|
||||
DBusConnection* mConnection;
|
||||
DBusMessageRefPtr mMessage;
|
||||
};
|
||||
|
||||
//
|
||||
// Sends a message and returns the message's serial number to the
|
||||
// disaptching thread. Only run it in DBus thread.
|
||||
//
|
||||
class DBusConnectionSendTask : public DBusConnectionSendTaskBase
|
||||
{
|
||||
public:
|
||||
DBusConnectionSendTask(DBusConnection* aConnection,
|
||||
DBusMessage* aMessage)
|
||||
: DBusConnectionSendTaskBase(aConnection, aMessage)
|
||||
{ }
|
||||
|
||||
virtual ~DBusConnectionSendTask()
|
||||
{ }
|
||||
|
||||
void Run() MOZ_OVERRIDE
|
||||
{
|
||||
MOZ_ASSERT(MessageLoop::current());
|
||||
|
||||
dbus_bool_t success = dbus_connection_send(mConnection,
|
||||
mMessage,
|
||||
nullptr);
|
||||
NS_ENSURE_TRUE_VOID(success == TRUE);
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
// Sends a message and executes a callback function for the reply. Only
|
||||
// run it in DBus thread.
|
||||
//
|
||||
class DBusConnectionSendWithReplyTask : public DBusConnectionSendTaskBase
|
||||
{
|
||||
private:
|
||||
class NotifyData
|
||||
{
|
||||
public:
|
||||
NotifyData(DBusReplyCallback aCallback, void* aData)
|
||||
: mCallback(aCallback),
|
||||
mData(aData)
|
||||
{ }
|
||||
|
||||
void RunNotifyCallback(DBusMessage* aMessage)
|
||||
{
|
||||
if (mCallback) {
|
||||
mCallback(aMessage, mData);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
DBusReplyCallback mCallback;
|
||||
void* mData;
|
||||
};
|
||||
|
||||
// Callback function for DBus replies. Only run it in DBus thread.
|
||||
// Callback function for DBus replies. Only run it on I/O thread.
|
||||
//
|
||||
static void Notify(DBusPendingCall* aCall, void* aData)
|
||||
static void Handle(DBusPendingCall* aCall, void* aData)
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
MOZ_ASSERT(MessageLoop::current());
|
||||
|
||||
nsAutoPtr<NotifyData> data(static_cast<NotifyData*>(aData));
|
||||
nsAutoPtr<Notification> ntfn(static_cast<Notification*>(aData));
|
||||
|
||||
// The reply can be non-null if the timeout
|
||||
// has been reached.
|
||||
// The reply can be non-null if the timeout has been reached.
|
||||
DBusMessage* reply = dbus_pending_call_steal_reply(aCall);
|
||||
|
||||
if (reply) {
|
||||
data->RunNotifyCallback(reply);
|
||||
ntfn->RunCallback(reply);
|
||||
dbus_message_unref(reply);
|
||||
}
|
||||
|
||||
@ -129,53 +59,18 @@ private:
|
||||
dbus_pending_call_unref(aCall);
|
||||
}
|
||||
|
||||
public:
|
||||
DBusConnectionSendWithReplyTask(DBusConnection* aConnection,
|
||||
DBusMessage* aMessage,
|
||||
int aTimeout,
|
||||
DBusReplyCallback aCallback,
|
||||
void* aData)
|
||||
: DBusConnectionSendTaskBase(aConnection, aMessage),
|
||||
mCallback(aCallback),
|
||||
mData(aData),
|
||||
mTimeout(aTimeout)
|
||||
{ }
|
||||
|
||||
virtual ~DBusConnectionSendWithReplyTask()
|
||||
{ }
|
||||
|
||||
void Run() MOZ_OVERRIDE
|
||||
{
|
||||
MOZ_ASSERT(MessageLoop::current());
|
||||
|
||||
// Freed at end of Notify
|
||||
nsAutoPtr<NotifyData> data(new NotifyData(mCallback, mData));
|
||||
NS_ENSURE_TRUE_VOID(data);
|
||||
|
||||
DBusPendingCall* call;
|
||||
|
||||
dbus_bool_t success = dbus_connection_send_with_reply(mConnection,
|
||||
mMessage,
|
||||
&call,
|
||||
mTimeout);
|
||||
NS_ENSURE_TRUE_VOID(success == TRUE);
|
||||
|
||||
success = dbus_pending_call_set_notify(call, Notify, data, nullptr);
|
||||
NS_ENSURE_TRUE_VOID(success == TRUE);
|
||||
|
||||
data.forget();
|
||||
dbus_message_unref(mMessage);
|
||||
};
|
||||
|
||||
private:
|
||||
void RunCallback(DBusMessage* aMessage)
|
||||
{
|
||||
if (mCallback) {
|
||||
mCallback(aMessage, mData);
|
||||
}
|
||||
}
|
||||
|
||||
DBusReplyCallback mCallback;
|
||||
void* mData;
|
||||
int mTimeout;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// RawDBusConnection
|
||||
//
|
||||
@ -218,19 +113,17 @@ void RawDBusConnection::ScopedDBusConnectionPtrTraits::release(DBusConnection* p
|
||||
|
||||
bool RawDBusConnection::Send(DBusMessage* aMessage)
|
||||
{
|
||||
DBusConnectionSendTask* t =
|
||||
new DBusConnectionSendTask(mConnection, aMessage);
|
||||
MOZ_ASSERT(t);
|
||||
MOZ_ASSERT(aMessage);
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
MOZ_ASSERT(MessageLoop::current());
|
||||
|
||||
nsresult rv = DispatchToDBusThread(t);
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
if (aMessage) {
|
||||
dbus_message_unref(aMessage);
|
||||
}
|
||||
dbus_bool_t success = dbus_connection_send(mConnection,
|
||||
aMessage,
|
||||
nullptr);
|
||||
if (success != TRUE) {
|
||||
dbus_message_unref(aMessage);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -239,19 +132,27 @@ bool RawDBusConnection::SendWithReply(DBusReplyCallback aCallback,
|
||||
int aTimeout,
|
||||
DBusMessage* aMessage)
|
||||
{
|
||||
DBusConnectionSendWithReplyTask* t =
|
||||
new DBusConnectionSendWithReplyTask(mConnection, aMessage, aTimeout,
|
||||
aCallback, aData);
|
||||
MOZ_ASSERT(t);
|
||||
MOZ_ASSERT(aMessage);
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
MOZ_ASSERT(MessageLoop::current());
|
||||
|
||||
nsresult rv = DispatchToDBusThread(t);
|
||||
nsAutoPtr<Notification> ntfn(new Notification(aCallback, aData));
|
||||
NS_ENSURE_TRUE(ntfn, false);
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
if (aMessage) {
|
||||
dbus_message_unref(aMessage);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
DBusPendingCall* call;
|
||||
|
||||
dbus_bool_t success = dbus_connection_send_with_reply(mConnection,
|
||||
aMessage,
|
||||
&call,
|
||||
aTimeout);
|
||||
NS_ENSURE_TRUE(success == TRUE, false);
|
||||
|
||||
success = dbus_pending_call_set_notify(call, Notification::Handle,
|
||||
ntfn, nullptr);
|
||||
NS_ENSURE_TRUE(success == TRUE, false);
|
||||
|
||||
ntfn.forget();
|
||||
dbus_message_unref(aMessage);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -265,6 +166,7 @@ bool RawDBusConnection::SendWithReply(DBusReplyCallback aCallback,
|
||||
int aFirstArgType,
|
||||
...)
|
||||
{
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
va_list args;
|
||||
|
||||
va_start(args, aFirstArgType);
|
||||
@ -301,3 +203,6 @@ DBusMessage* RawDBusConnection::BuildDBusMessage(const char* aPath,
|
||||
|
||||
return msg;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -7,14 +7,7 @@
|
||||
#ifndef mozilla_ipc_dbus_gonk_rawdbusconnection_h__
|
||||
#define mozilla_ipc_dbus_gonk_rawdbusconnection_h__
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string>
|
||||
#include "nscore.h"
|
||||
#include "mozilla/Scoped.h"
|
||||
#include <mozilla/Mutex.h>
|
||||
|
||||
struct DBusConnection;
|
||||
struct DBusError;
|
||||
|
@ -30,7 +30,6 @@
|
||||
"content/media/test/test_info_leak.html": "2 failures",
|
||||
"content/media/test/test_media_selection.html": "timed out",
|
||||
"content/media/test/test_mediarecorder_record_4ch_audiocontext.html": "",
|
||||
"content/media/test/test_mediarecorder_creation_fail.html": "",
|
||||
"content/media/test/test_playback.html": "Test timed out, bug 668973?",
|
||||
"content/media/test/test_playback_rate.html": "",
|
||||
"content/media/test/test_playback_rate_playpause.html": "",
|
||||
@ -176,7 +175,6 @@
|
||||
"content/html/document/test/test_bug741266.html":"needs control of popup window size",
|
||||
"docshell/test/navigation/test_popup-navigates-children.html":"Needs multiple window.open support, also uses docshelltreenode",
|
||||
"docshell/test/test_bug590573.html":"queryinterfaces into webnavigation, might suffer from something similar as bug 823022",
|
||||
"docshell/test/navigation/test_bug430723.html":"apz race condition, see bug 965351",
|
||||
"dom/devicestorage/ipc/test_ipc.html":"nested ipc not working",
|
||||
|
||||
"dom/indexedDB/ipc/test_ipc.html":"nested ipc not working",
|
||||
@ -271,7 +269,6 @@
|
||||
"dom/events/test/test_bug574663.html":"",
|
||||
"dom/events/test/test_bug607464.html":"",
|
||||
"dom/events/test/test_wheel_default_action.html":"",
|
||||
"dom/events/test/test_bug946632.html":"apz race condition, see bug 965351",
|
||||
|
||||
"dom/file/test/test_progress_events.html":"All of these fail fairly regularly with: UnknownError: The operation failed for reasons unrelated to the database itself and not covered by any other error code. at http://mochi.test:8888/tests/dom/file/test/helpers.js:126",
|
||||
"dom/file/test/test_request_readyState.html":"",
|
||||
@ -383,7 +380,6 @@
|
||||
"layout/forms/test/test_bug571352.html":"shift-click multi-select not working?",
|
||||
"layout/forms/test/test_textarea_resize.html":"resizing textarea not available in b2g",
|
||||
"layout/forms/test/test_bug903715.html":"select elements don't use an in-page popup in B2G",
|
||||
"layout/forms/test/test_bug564115.html":"apz race condition, see bug 965351",
|
||||
"layout/generic/test/test_bug392746.html":"ctrl mouse select not working in b2g",
|
||||
"layout/generic/test/test_bug791616.html":"Target should not have scrolled - got 114.10000610351562, expected 115.39999389648438",
|
||||
"layout/generic/test/test_invalidate_during_plugin_paint.html":"plugins not supported",
|
||||
|
@ -146,6 +146,23 @@ HwcComposer2D::ReallocLayerList()
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
HwcComposer2D::setCrop(HwcLayer* layer, hwc_rect_t srcCrop)
|
||||
{
|
||||
#if ANDROID_VERSION >= 19
|
||||
if (mHwc->common.version >= HWC_DEVICE_API_VERSION_1_3) {
|
||||
layer->sourceCropf.left = srcCrop.left;
|
||||
layer->sourceCropf.top = srcCrop.top;
|
||||
layer->sourceCropf.right = srcCrop.right;
|
||||
layer->sourceCropf.bottom = srcCrop.bottom;
|
||||
} else {
|
||||
layer->sourceCrop = srcCrop;
|
||||
}
|
||||
#else
|
||||
layer->sourceCrop = srcCrop;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool
|
||||
HwcComposer2D::PrepareLayerList(Layer* aLayer,
|
||||
const nsIntRect& aClip,
|
||||
@ -264,17 +281,19 @@ HwcComposer2D::PrepareLayerList(Layer* aLayer,
|
||||
}
|
||||
|
||||
HwcLayer& hwcLayer = mList->hwLayers[current];
|
||||
hwc_rect_t sourceCrop;
|
||||
|
||||
if(!HwcUtils::PrepareLayerRects(visibleRect,
|
||||
transform * aGLWorldTransform,
|
||||
clip,
|
||||
bufferRect,
|
||||
&(hwcLayer.sourceCrop),
|
||||
&(sourceCrop),
|
||||
&(hwcLayer.displayFrame)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
setCrop(&hwcLayer, sourceCrop);
|
||||
buffer_handle_t handle = fillColor ? nullptr : state.mSurface->getNativeBuffer()->handle;
|
||||
hwcLayer.handle = handle;
|
||||
|
||||
@ -603,10 +622,10 @@ HwcComposer2D::Prepare(buffer_handle_t fbHandle, int fence)
|
||||
mList->hwLayers[idx].handle = fbHandle;
|
||||
mList->hwLayers[idx].blending = HWC_BLENDING_PREMULT;
|
||||
mList->hwLayers[idx].compositionType = HWC_FRAMEBUFFER_TARGET;
|
||||
mList->hwLayers[idx].sourceCrop = r;
|
||||
setCrop(&mList->hwLayers[idx], r);
|
||||
mList->hwLayers[idx].displayFrame = r;
|
||||
mList->hwLayers[idx].visibleRegionScreen.numRects = 1;
|
||||
mList->hwLayers[idx].visibleRegionScreen.rects = &mList->hwLayers[idx].sourceCrop;
|
||||
mList->hwLayers[idx].visibleRegionScreen.rects = &mList->hwLayers[idx].displayFrame;
|
||||
mList->hwLayers[idx].acquireFenceFd = fence;
|
||||
mList->hwLayers[idx].releaseFenceFd = -1;
|
||||
mList->hwLayers[idx].planeAlpha = 0xFF;
|
||||
|
@ -70,6 +70,7 @@ private:
|
||||
bool ReallocLayerList();
|
||||
bool PrepareLayerList(layers::Layer* aContainer, const nsIntRect& aClip,
|
||||
const gfxMatrix& aParentTransform, const gfxMatrix& aGLWorldTransform);
|
||||
void setCrop(HwcLayer* layer, hwc_rect_t srcCrop);
|
||||
|
||||
HwcDevice* mHwc;
|
||||
HwcList* mList;
|
||||
|
@ -249,10 +249,21 @@ GonkDisplayJB::Post(buffer_handle_t buf, int fence)
|
||||
mList->hwLayers[1].handle = buf;
|
||||
mList->hwLayers[1].transform = 0;
|
||||
mList->hwLayers[1].blending = HWC_BLENDING_PREMULT;
|
||||
#if ANDROID_VERSION >= 19
|
||||
if (mHwc->common.version >= HWC_DEVICE_API_VERSION_1_3) {
|
||||
mList->hwLayers[1].sourceCropf.left = 0;
|
||||
mList->hwLayers[1].sourceCropf.top = 0;
|
||||
mList->hwLayers[1].sourceCropf.right = mWidth;
|
||||
mList->hwLayers[1].sourceCropf.bottom = mHeight;
|
||||
} else {
|
||||
mList->hwLayers[1].sourceCrop = r;
|
||||
}
|
||||
#else
|
||||
mList->hwLayers[1].sourceCrop = r;
|
||||
#endif
|
||||
mList->hwLayers[1].displayFrame = r;
|
||||
mList->hwLayers[1].visibleRegionScreen.numRects = 1;
|
||||
mList->hwLayers[1].visibleRegionScreen.rects = &mList->hwLayers[1].sourceCrop;
|
||||
mList->hwLayers[1].visibleRegionScreen.rects = &mList->hwLayers[1].displayFrame;
|
||||
mList->hwLayers[1].acquireFenceFd = fence;
|
||||
mList->hwLayers[1].releaseFenceFd = -1;
|
||||
#if ANDROID_VERSION == 18
|
||||
|
@ -345,7 +345,7 @@ private:
|
||||
GetReporterNameAndDescription(path, perms, name, description, &kind);
|
||||
|
||||
while (true) {
|
||||
size_t pss;
|
||||
size_t pss = 0;
|
||||
nsresult rv = ParseMapBody(aFile, aProcessName, name, description,
|
||||
aHandleReport, aData, &pss);
|
||||
if (NS_FAILED(rv))
|
||||
|
@ -638,7 +638,7 @@ public:
|
||||
NS_METHOD CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
nsISupports* aData)
|
||||
{
|
||||
int64_t amount;
|
||||
int64_t amount = 0;
|
||||
nsresult rv = PageFaultsHardDistinguishedAmount(&amount);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
@ -124,7 +124,6 @@ public:
|
||||
int32_t nfds;
|
||||
bool stdoutOpen = true, stderrOpen = true;
|
||||
char buf[4096];
|
||||
int32_t len;
|
||||
|
||||
PRIntervalTime now = PR_IntervalNow();
|
||||
PRIntervalTime deadline = now + PR_MillisecondsToInterval(aWaitMs);
|
||||
@ -158,15 +157,13 @@ public:
|
||||
continue;
|
||||
|
||||
bool isStdout = mStdoutfd == pollfds[i].fd;
|
||||
|
||||
int32_t len = 0;
|
||||
|
||||
if (PR_POLL_READ & pollfds[i].out_flags) {
|
||||
len = PR_Read(pollfds[i].fd, buf, sizeof(buf) - 1);
|
||||
NS_ASSERTION(0 <= len, PR_ErrorToName(PR_GetError()));
|
||||
}
|
||||
else if (PR_POLL_HUP & pollfds[i].out_flags) {
|
||||
len = 0;
|
||||
}
|
||||
else {
|
||||
else if (!(PR_POLL_HUP & pollfds[i].out_flags)) {
|
||||
NS_ERROR(PR_ErrorToName(PR_GetError()));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user