mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
merge b2g-inbound to mozilla-central
This commit is contained in:
commit
9529a646f8
@ -1,3 +1,6 @@
|
||||
/* 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/. */
|
||||
|
||||
window.addEventListener("ContentStart", function(evt) {
|
||||
// Enable touch event shim on desktop that translates mouse events
|
||||
@ -5,6 +8,10 @@ window.addEventListener("ContentStart", function(evt) {
|
||||
let require = Cu.import("resource://gre/modules/devtools/Loader.jsm", {})
|
||||
.devtools.require;
|
||||
let { TouchEventHandler } = require("devtools/touch-events");
|
||||
let touchEventHandler = new TouchEventHandler(shell.contentBrowser);
|
||||
let chromeEventHandler = window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.QueryInterface(Ci.nsIDocShell)
|
||||
.chromeEventHandler || window;
|
||||
let touchEventHandler = new TouchEventHandler(chromeEventHandler);
|
||||
touchEventHandler.start();
|
||||
});
|
||||
|
@ -296,14 +296,22 @@ var shell = {
|
||||
.sessionHistory = Cc["@mozilla.org/browser/shistory;1"]
|
||||
.createInstance(Ci.nsISHistory);
|
||||
|
||||
// On firefox mulet, shell.html is loaded in a tab
|
||||
// and we have to listen on the chrome event handler
|
||||
// to catch key events
|
||||
let chromeEventHandler = window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIWebNavigation)
|
||||
.QueryInterface(Ci.nsIDocShell)
|
||||
.chromeEventHandler || window;
|
||||
// Capture all key events so we can filter out hardware buttons
|
||||
// And send them to Gaia via mozChromeEvents.
|
||||
// Ideally, hardware buttons wouldn't generate key events at all, or
|
||||
// if they did, they would use keycodes that conform to DOM 3 Events.
|
||||
// See discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=762362
|
||||
window.addEventListener('keydown', this, true);
|
||||
window.addEventListener('keypress', this, true);
|
||||
window.addEventListener('keyup', this, true);
|
||||
chromeEventHandler.addEventListener('keydown', this, true);
|
||||
chromeEventHandler.addEventListener('keypress', this, true);
|
||||
chromeEventHandler.addEventListener('keyup', this, true);
|
||||
|
||||
window.addEventListener('MozApplicationManifest', this);
|
||||
window.addEventListener('mozfullscreenchange', this);
|
||||
window.addEventListener('MozAfterPaint', this);
|
||||
|
@ -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="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<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="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="96d2d00165f4561fbde62d1062706eab74b3a01f"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4addd530e2dc1708745d11d81de21b5d1230ed41"/>
|
||||
|
@ -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="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<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": "806d5b997ec768914eaff1c46143c55de2612dbf",
|
||||
"revision": "630d27e5cff74e12e319572dff2b1acd632dc326",
|
||||
"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="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<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="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<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="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<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="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<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="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="96d2d00165f4561fbde62d1062706eab74b3a01f"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4addd530e2dc1708745d11d81de21b5d1230ed41"/>
|
||||
|
@ -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="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -1569,9 +1569,9 @@ int64_t MediaDecoder::VideoQueueMemoryInUse() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int64_t MediaDecoder::AudioQueueMemoryInUse() {
|
||||
size_t MediaDecoder::SizeOfAudioQueue() {
|
||||
if (mDecoderStateMachine) {
|
||||
return mDecoderStateMachine->AudioQueueMemoryInUse();
|
||||
return mDecoderStateMachine->SizeOfAudioQueue();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -1826,7 +1826,7 @@ MediaMemoryTracker::CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
DecodersArray& decoders = Decoders();
|
||||
for (size_t i = 0; i < decoders.Length(); ++i) {
|
||||
video += decoders[i]->VideoQueueMemoryInUse();
|
||||
audio += decoders[i]->AudioQueueMemoryInUse();
|
||||
audio += decoders[i]->SizeOfAudioQueue();
|
||||
}
|
||||
|
||||
#define REPORT(_path, _amount, _desc) \
|
||||
|
@ -642,7 +642,7 @@ public:
|
||||
// Returns the size, in bytes, of the heap memory used by the currently
|
||||
// queued decoded video and audio data.
|
||||
virtual int64_t VideoQueueMemoryInUse();
|
||||
virtual int64_t AudioQueueMemoryInUse();
|
||||
size_t SizeOfAudioQueue();
|
||||
|
||||
VideoFrameContainer* GetVideoFrameContainer() MOZ_FINAL MOZ_OVERRIDE
|
||||
{
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "AudioSampleFormat.h"
|
||||
#include "AbstractMediaDecoder.h"
|
||||
#include "ImageTypes.h"
|
||||
#include "nsIMemoryReporter.h"
|
||||
|
||||
struct nsIntRect;
|
||||
|
||||
@ -154,6 +155,14 @@ public:
|
||||
MOZ_COUNT_DTOR(AudioData);
|
||||
}
|
||||
|
||||
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const {
|
||||
size_t size = aMallocSizeOf(this) + aMallocSizeOf(mAudioData);
|
||||
if (mAudioBuffer) {
|
||||
size += mAudioBuffer->SizeOfIncludingThis(aMallocSizeOf);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
// If mAudioBuffer is null, creates it from mAudioData.
|
||||
void EnsureAudioBuffer();
|
||||
|
||||
@ -582,21 +591,23 @@ public:
|
||||
|
||||
class AudioQueueMemoryFunctor : public nsDequeFunctor {
|
||||
public:
|
||||
AudioQueueMemoryFunctor() : mResult(0) {}
|
||||
AudioQueueMemoryFunctor() : mSize(0) {}
|
||||
|
||||
MOZ_DEFINE_MALLOC_SIZE_OF(MallocSizeOf);
|
||||
|
||||
virtual void* operator()(void* anObject) {
|
||||
const AudioData* audioData = static_cast<const AudioData*>(anObject);
|
||||
mResult += audioData->mFrames * audioData->mChannels * sizeof(AudioDataValue);
|
||||
mSize += audioData->SizeOfIncludingThis(MallocSizeOf);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int64_t mResult;
|
||||
size_t mSize;
|
||||
};
|
||||
|
||||
virtual int64_t AudioQueueMemoryInUse() {
|
||||
size_t SizeOfAudioQueue() {
|
||||
AudioQueueMemoryFunctor functor;
|
||||
mAudioQueue.LockedForEach(functor);
|
||||
return functor.mResult;
|
||||
return functor.mSize;
|
||||
}
|
||||
|
||||
// Only used by WebMReader and MediaOmxReader for now, so stub here rather
|
||||
|
@ -267,9 +267,9 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
int64_t AudioQueueMemoryInUse() {
|
||||
size_t SizeOfAudioQueue() {
|
||||
if (mReader) {
|
||||
return mReader->AudioQueueMemoryInUse();
|
||||
return mReader->SizeOfAudioQueue();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -43,6 +43,10 @@ public:
|
||||
return p.forget();
|
||||
}
|
||||
|
||||
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const {
|
||||
return aMallocSizeOf(this);
|
||||
}
|
||||
|
||||
private:
|
||||
SharedBuffer() {}
|
||||
};
|
||||
|
@ -676,6 +676,14 @@ BluetoothA2dpManager::HandleSinkPropertyChanged(const BluetoothSignal& aSignal)
|
||||
BluetoothValue::TArrayOfBluetoothNamedValue);
|
||||
|
||||
const nsString& address = aSignal.path();
|
||||
/**
|
||||
* Update sink property only if
|
||||
* - mDeviceAddress is empty (A2dp is disconnected), or
|
||||
* - this property change is from the connected sink.
|
||||
*/
|
||||
NS_ENSURE_TRUE_VOID(mDeviceAddress.IsEmpty() ||
|
||||
mDeviceAddress.Equals(address));
|
||||
|
||||
const InfallibleTArray<BluetoothNamedValue>& arr =
|
||||
aSignal.value().get_ArrayOfBluetoothNamedValue();
|
||||
MOZ_ASSERT(arr.Length() == 1);
|
||||
|
@ -257,6 +257,14 @@ BluetoothA2dpManager::HandleSinkPropertyChanged(const BluetoothSignal& aSignal)
|
||||
MOZ_ASSERT(aSignal.value().type() == BluetoothValue::TArrayOfBluetoothNamedValue);
|
||||
|
||||
const nsString& address = aSignal.path();
|
||||
/**
|
||||
* Update sink property only if
|
||||
* - mDeviceAddress is empty (A2dp is disconnected), or
|
||||
* - this property change is from the connected sink.
|
||||
*/
|
||||
NS_ENSURE_TRUE_VOID(mDeviceAddress.IsEmpty() ||
|
||||
mDeviceAddress.Equals(address));
|
||||
|
||||
const InfallibleTArray<BluetoothNamedValue>& arr =
|
||||
aSignal.value().get_ArrayOfBluetoothNamedValue();
|
||||
MOZ_ASSERT(arr.Length() == 1);
|
||||
|
@ -293,8 +293,16 @@ void
|
||||
WifiProxyService::DispatchWifiEvent(const nsAString& aEvent, const nsACString& aInterface)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
nsAutoString event;
|
||||
if (StringBeginsWith(aEvent, NS_LITERAL_STRING("IFNAME"))) {
|
||||
// Jump over IFNAME for gonk-kk.
|
||||
event = Substring(aEvent, aEvent.FindChar(' ') + 1);
|
||||
}
|
||||
else {
|
||||
event = aEvent;
|
||||
}
|
||||
// Call the listener.
|
||||
mListener->OnWaitEvent(aEvent, aInterface);
|
||||
mListener->OnWaitEvent(event, aInterface);
|
||||
}
|
||||
|
||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(WifiProxyService,
|
||||
|
@ -12,6 +12,7 @@
|
||||
using namespace mozilla::dom;
|
||||
|
||||
#define BUFFER_SIZE 4096
|
||||
#define COMMAND_SIZE 256
|
||||
#define PROPERTY_VALUE_MAX 80
|
||||
|
||||
// Intentionally not trying to dlclose() this handle. That's playing
|
||||
@ -237,6 +238,20 @@ public:
|
||||
USE_DLFUNC(wifi_stop_supplicant)
|
||||
return wifi_stop_supplicant(arg);
|
||||
}
|
||||
|
||||
DEFINE_DLFUNC(wifi_command, int32_t, const char*, char*, size_t*)
|
||||
int32_t do_wifi_command(const char* iface, const char* cmd, char* buf, size_t* len) {
|
||||
char command[COMMAND_SIZE];
|
||||
if (!strcmp(iface, "p2p0")) {
|
||||
// Commands for p2p0 interface don't need prefix
|
||||
snprintf(command, COMMAND_SIZE, "%s", cmd);
|
||||
}
|
||||
else {
|
||||
snprintf(command, COMMAND_SIZE, "IFNAME=%s %s", iface, cmd);
|
||||
}
|
||||
USE_DLFUNC(wifi_command)
|
||||
return wifi_command(command, buf, len);
|
||||
}
|
||||
};
|
||||
|
||||
// Concrete class to use to access the wpa supplicant.
|
||||
|
Loading…
Reference in New Issue
Block a user