зеркало из https://github.com/mozilla/gecko-dev.git
Merge b2g-inbound to mozilla-central a=merge
This commit is contained in:
Коммит
78b1f0de54
|
@ -19,7 +19,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="a38a6a5c6fabc97dd16d5360632b5ac5c7e06241"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d2cfef555dabab415085e548ed44c48a99be5c32"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="8e4420c0c5c8e8c8e58a000278a7129403769f96"/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a38a6a5c6fabc97dd16d5360632b5ac5c7e06241"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="d2cfef555dabab415085e548ed44c48a99be5c32"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="994fa9a1f7ce0e63c880a48d571c3ab3e01884a3"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="276ce45e78b09c4a4ee643646f691d22804754c1">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a38a6a5c6fabc97dd16d5360632b5ac5c7e06241"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="d2cfef555dabab415085e548ed44c48a99be5c32"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="a38a6a5c6fabc97dd16d5360632b5ac5c7e06241"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d2cfef555dabab415085e548ed44c48a99be5c32"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="8e4420c0c5c8e8c8e58a000278a7129403769f96"/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</project>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a38a6a5c6fabc97dd16d5360632b5ac5c7e06241"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="d2cfef555dabab415085e548ed44c48a99be5c32"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="994fa9a1f7ce0e63c880a48d571c3ab3e01884a3"/>
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"remote": "",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "cd1a16d6212a1867ecf1d1cfcd62f80abf9ae0b1",
|
||||
"revision": "7f0af1e164a39efb732c0c341c2a8e51f681d913",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="a38a6a5c6fabc97dd16d5360632b5ac5c7e06241"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d2cfef555dabab415085e548ed44c48a99be5c32"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="a38a6a5c6fabc97dd16d5360632b5ac5c7e06241"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d2cfef555dabab415085e548ed44c48a99be5c32"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="a38a6a5c6fabc97dd16d5360632b5ac5c7e06241"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="d2cfef555dabab415085e548ed44c48a99be5c32"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="994fa9a1f7ce0e63c880a48d571c3ab3e01884a3"/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="a38a6a5c6fabc97dd16d5360632b5ac5c7e06241"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d2cfef555dabab415085e548ed44c48a99be5c32"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="531cf670e485649c69746e46d567929fcd54cbc5"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
|
|
@ -133,8 +133,8 @@ static cubeb_stream_type ConvertChannelToCubebType(dom::AudioChannel aChannel)
|
|||
return CUBEB_STREAM_TYPE_VOICE_CALL;
|
||||
case dom::AudioChannel::Ringer:
|
||||
return CUBEB_STREAM_TYPE_RING;
|
||||
// Currently Android openSLES library doesn't support FORCE_AUDIBLE yet.
|
||||
case dom::AudioChannel::Publicnotification:
|
||||
return CUBEB_STREAM_TYPE_SYSTEM_ENFORCED;
|
||||
default:
|
||||
NS_ERROR("The value of AudioChannel is invalid");
|
||||
return CUBEB_STREAM_TYPE_MAX;
|
||||
|
|
|
@ -664,22 +664,29 @@ this.DOMApplicationRegistry = {
|
|||
}
|
||||
|
||||
let manifest = new ManifestHelper(aManifest, aApp.origin);
|
||||
let launchPath = Services.io.newURI(manifest.fullLaunchPath(aEntryPoint), null, null);
|
||||
let manifestURL = Services.io.newURI(aApp.manifestURL, null, null);
|
||||
let launchPathURI = Services.io.newURI(manifest.fullLaunchPath(aEntryPoint), null, null);
|
||||
let manifestURI = Services.io.newURI(aApp.manifestURL, null, null);
|
||||
root.messages.forEach(function registerPages(aMessage) {
|
||||
let href = launchPath;
|
||||
let handlerPageURI = launchPathURI;
|
||||
let messageName;
|
||||
if (typeof(aMessage) === "object" && Object.keys(aMessage).length === 1) {
|
||||
messageName = Object.keys(aMessage)[0];
|
||||
let uri;
|
||||
let handlerPath = aMessage[messageName];
|
||||
// Resolve the handler path from origin. If |handler_path| is absent,
|
||||
// simply skip.
|
||||
let fullHandlerPath;
|
||||
try {
|
||||
uri = manifest.resolveFromOrigin(aMessage[messageName]);
|
||||
if (handlerPath && handlerPath.trim()) {
|
||||
fullHandlerPath = manifest.resolveFromOrigin(handlerPath);
|
||||
} else {
|
||||
throw new Error("Empty or blank handler path.");
|
||||
}
|
||||
} catch(e) {
|
||||
debug("system message url (" + aMessage[messageName] + ") is invalid, skipping. " +
|
||||
"Error is: " + e);
|
||||
debug("system message handler path (" + handlerPath + ") is " +
|
||||
"invalid, skipping. Error is: " + e);
|
||||
return;
|
||||
}
|
||||
href = Services.io.newURI(uri, null, null);
|
||||
handlerPageURI = Services.io.newURI(fullHandlerPath, null, null);
|
||||
} else {
|
||||
messageName = aMessage;
|
||||
}
|
||||
|
@ -688,7 +695,7 @@ this.DOMApplicationRegistry = {
|
|||
.isSystemMessagePermittedToRegister(messageName,
|
||||
aApp.origin,
|
||||
aManifest)) {
|
||||
msgmgr.registerPage(messageName, href, manifestURL);
|
||||
msgmgr.registerPage(messageName, handlerPageURI, manifestURI);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -827,14 +834,14 @@ this.DOMApplicationRegistry = {
|
|||
"description": newDesc });
|
||||
}
|
||||
|
||||
let launchPath = Services.io.newURI(href, null, null);
|
||||
let manifestURL = Services.io.newURI(aApp.manifestURL, null, null);
|
||||
let launchPathURI = Services.io.newURI(href, null, null);
|
||||
let manifestURI = Services.io.newURI(aApp.manifestURL, null, null);
|
||||
|
||||
if (SystemMessagePermissionsChecker
|
||||
.isSystemMessagePermittedToRegister("activity",
|
||||
aApp.origin,
|
||||
aManifest)) {
|
||||
msgmgr.registerPage("activity", launchPath, manifestURL);
|
||||
msgmgr.registerPage("activity", launchPathURI, manifestURI);
|
||||
}
|
||||
}
|
||||
return activitiesToRegister;
|
||||
|
|
|
@ -24,7 +24,7 @@ USING_BLUETOOTH_NAMESPACE
|
|||
* BluetoothRequestParent::ReplyRunnable
|
||||
******************************************************************************/
|
||||
|
||||
class BluetoothRequestParent::ReplyRunnable : public BluetoothReplyRunnable
|
||||
class BluetoothRequestParent::ReplyRunnable MOZ_FINAL : public BluetoothReplyRunnable
|
||||
{
|
||||
BluetoothRequestParent* mRequest;
|
||||
|
||||
|
@ -59,8 +59,7 @@ public:
|
|||
void
|
||||
Revoke()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
mRequest = nullptr;
|
||||
ReleaseMembers();
|
||||
}
|
||||
|
||||
virtual bool
|
||||
|
@ -68,6 +67,14 @@ public:
|
|||
{
|
||||
MOZ_CRASH("This should never be called!");
|
||||
}
|
||||
|
||||
virtual void
|
||||
ReleaseMembers() MOZ_OVERRIDE
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
mRequest = nullptr;
|
||||
BluetoothReplyRunnable::ReleaseMembers();
|
||||
}
|
||||
};
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
|
@ -138,6 +138,7 @@ GonkCameraParameters::GonkCameraParameters()
|
|||
: mLock(PR_NewRWLock(PR_RWLOCK_RANK_NONE, "GonkCameraParameters.Lock"))
|
||||
, mDirty(false)
|
||||
, mInitialized(false)
|
||||
, mExposureCompensationStep(0.0)
|
||||
{
|
||||
MOZ_COUNT_CTOR(GonkCameraParameters);
|
||||
if (!mLock) {
|
||||
|
@ -199,15 +200,20 @@ GonkCameraParameters::Initialize()
|
|||
{
|
||||
nsresult rv;
|
||||
|
||||
rv = GetImpl(CAMERA_PARAM_SUPPORTED_MINEXPOSURECOMPENSATION, mExposureCompensationMin);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Failed to initialize minimum exposure compensation");
|
||||
mExposureCompensationMin = 0;
|
||||
}
|
||||
rv = GetImpl(CAMERA_PARAM_SUPPORTED_EXPOSURECOMPENSATIONSTEP, mExposureCompensationStep);
|
||||
rv = GetImpl(Parameters::KEY_EXPOSURE_COMPENSATION_STEP, mExposureCompensationStep);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Failed to initialize exposure compensation step size");
|
||||
mExposureCompensationStep = 0;
|
||||
mExposureCompensationStep = 0.0;
|
||||
}
|
||||
rv = GetImpl(Parameters::KEY_MIN_EXPOSURE_COMPENSATION, mExposureCompensationMinIndex);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Failed to initialize minimum exposure compensation index");
|
||||
mExposureCompensationMinIndex = 0;
|
||||
}
|
||||
rv = GetImpl(Parameters::KEY_MAX_EXPOSURE_COMPENSATION, mExposureCompensationMaxIndex);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Failed to initialize maximum exposure compensation index");
|
||||
mExposureCompensationMaxIndex = 0;
|
||||
}
|
||||
|
||||
rv = GetListAsArray(CAMERA_PARAM_SUPPORTED_ZOOMRATIOS, mZoomRatios);
|
||||
|
@ -540,8 +546,8 @@ GonkCameraParameters::SetTranslated(uint32_t aKey, const double& aValue)
|
|||
|
||||
switch (aKey) {
|
||||
case CAMERA_PARAM_EXPOSURECOMPENSATION:
|
||||
if (mExposureCompensationStep == 0) {
|
||||
DOM_CAMERA_LOGE("Exposure compensation not supported, can't set %f\n", aValue);
|
||||
if (mExposureCompensationStep == 0.0) {
|
||||
DOM_CAMERA_LOGE("Exposure compensation not supported, can't set EV=%f\n", aValue);
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
|
@ -549,9 +555,16 @@ GonkCameraParameters::SetTranslated(uint32_t aKey, const double& aValue)
|
|||
* Convert from real value to a Gonk index, round
|
||||
* to the nearest step; index is 1-based.
|
||||
*/
|
||||
index =
|
||||
(aValue - mExposureCompensationMin + mExposureCompensationStep / 2) /
|
||||
mExposureCompensationStep + 1;
|
||||
{
|
||||
double i = round(aValue / mExposureCompensationStep);
|
||||
if (i < mExposureCompensationMinIndex) {
|
||||
index = mExposureCompensationMinIndex;
|
||||
} else if (i > mExposureCompensationMaxIndex) {
|
||||
index = mExposureCompensationMaxIndex;
|
||||
} else {
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
DOM_CAMERA_LOGI("Exposure compensation = %f --> index = %d\n", aValue, index);
|
||||
return SetImpl(CAMERA_PARAM_EXPOSURECOMPENSATION, index);
|
||||
|
||||
|
@ -643,15 +656,16 @@ GonkCameraParameters::GetTranslated(uint32_t aKey, double& aValue)
|
|||
break;
|
||||
|
||||
case CAMERA_PARAM_EXPOSURECOMPENSATION:
|
||||
case CAMERA_PARAM_SUPPORTED_MINEXPOSURECOMPENSATION:
|
||||
case CAMERA_PARAM_SUPPORTED_MAXEXPOSURECOMPENSATION:
|
||||
if (mExposureCompensationStep == 0.0) {
|
||||
DOM_CAMERA_LOGE("Exposure compensation not supported, can't get EV\n");
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
rv = GetImpl(aKey, index);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
if (!index) {
|
||||
// NaN indicates automatic exposure compensation
|
||||
val = NAN;
|
||||
} else {
|
||||
val = (index - 1) * mExposureCompensationStep + mExposureCompensationMin;
|
||||
DOM_CAMERA_LOGI("index = %d --> compensation = %f\n", index, val);
|
||||
}
|
||||
val = index * mExposureCompensationStep;
|
||||
DOM_CAMERA_LOGI("exposure compensation (aKey=%d): index=%d --> EV=%f\n", aKey, index, val);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -95,8 +95,9 @@ protected:
|
|||
bool mInitialized;
|
||||
|
||||
// Required internal properties
|
||||
double mExposureCompensationMin;
|
||||
double mExposureCompensationStep;
|
||||
int32_t mExposureCompensationMinIndex;
|
||||
int32_t mExposureCompensationMaxIndex;
|
||||
nsTArray<int> mZoomRatios;
|
||||
nsTArray<nsString> mIsoModes;
|
||||
|
||||
|
|
|
@ -207,6 +207,67 @@ var tests = [
|
|||
ok(areas[0].right == 504, "area[0] right = " + areas[0].right);
|
||||
ok(areas[0].weight == 105, "area[0] weight = " + areas[0].weight);
|
||||
|
||||
next();
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "fake-exposure-compensation",
|
||||
prep: function setupFakeExposureCompensation(test) {
|
||||
test.setFakeParameters("exposure-compensation=-1;max-exposure-compensation=6;min-exposure-compensation=-6;exposure-compensation-step=0.5", function () {
|
||||
run();
|
||||
});
|
||||
},
|
||||
test: function testFakeFocusAreas(cam, cap) {
|
||||
ok(cap.exposureCompensationStep == 0.5,
|
||||
"exposureCompensationStep = " + cap.exposureCompensationStep);
|
||||
ok(cap.minExposureCompensation == -3.0,
|
||||
"minExposureCompensation = " + cap.minExposureCompensation);
|
||||
ok(cap.maxExposureCompensation == 3.0,
|
||||
"maxExposureCompensation = " + cap.maxExposureCompensation);
|
||||
ok(cam.exposureCompensation == -0.5,
|
||||
"exposureCompensation = " + cam.exposureCompensation);
|
||||
|
||||
// Check normal values
|
||||
cam.setExposureCompensation(0.0);
|
||||
ok(cam.exposureCompensation == 0.0,
|
||||
"exposureCompensation = " + cam.exposureCompensation);
|
||||
cam.setExposureCompensation(cap.minExposureCompensation);
|
||||
ok(cam.exposureCompensation == cap.minExposureCompensation,
|
||||
"exposureCompensation(min) = " + cam.exposureCompensation);
|
||||
cam.setExposureCompensation(cap.maxExposureCompensation);
|
||||
ok(cam.exposureCompensation == cap.maxExposureCompensation,
|
||||
"exposureCompensation(max) = " + cam.exposureCompensation);
|
||||
|
||||
// Rounding
|
||||
cam.setExposureCompensation(1.24);
|
||||
ok(cam.exposureCompensation == 1.0,
|
||||
"exposureCompensation(1.24) = " + cam.exposureCompensation);
|
||||
cam.setExposureCompensation(1.25);
|
||||
ok(cam.exposureCompensation == 1.5,
|
||||
"exposureCompensation(1.25) = " + cam.exposureCompensation);
|
||||
cam.setExposureCompensation(-1.24);
|
||||
ok(cam.exposureCompensation == -1.0,
|
||||
"exposureCompensation(-1.24) = " + cam.exposureCompensation);
|
||||
cam.setExposureCompensation(-1.25);
|
||||
ok(cam.exposureCompensation == -1.5,
|
||||
"exposureCompensation(-1.25) = " + cam.exposureCompensation);
|
||||
|
||||
// Check out-of-bounds values
|
||||
cam.setExposureCompensation(cap.minExposureCompensation - 1.0);
|
||||
ok(cam.exposureCompensation == cap.minExposureCompensation,
|
||||
"exposureCompensation(min - 1.0) = " + cam.exposureCompensation);
|
||||
cam.setExposureCompensation(cap.maxExposureCompensation + 1.0);
|
||||
ok(cam.exposureCompensation == cap.maxExposureCompensation,
|
||||
"exposureCompensation(max + 1.0) = " + cam.exposureCompensation);
|
||||
|
||||
// Check extreme values
|
||||
cam.setExposureCompensation(-1 * Math.pow(2, 32));
|
||||
ok(cam.exposureCompensation == cap.minExposureCompensation,
|
||||
"exposureCompensation(-2^32) = " + cam.exposureCompensation);
|
||||
cam.setExposureCompensation(Math.pow(2, 32));
|
||||
ok(cam.exposureCompensation == cap.maxExposureCompensation,
|
||||
"exposureCompensation(2^32) = " + cam.exposureCompensation);
|
||||
|
||||
next();
|
||||
},
|
||||
},
|
||||
|
|
|
@ -99,14 +99,17 @@ MozNDEFRecord::MozNDEFRecord(JSContext* aCx, nsPIDOMWindow* aWindow,
|
|||
mWindow = aWindow; // For GetParentObject()
|
||||
|
||||
if (aType.WasPassed()) {
|
||||
aType.Value().ComputeLengthAndData();
|
||||
mType = Uint8Array::Create(aCx, this, aType.Value().Length(), aType.Value().Data());
|
||||
}
|
||||
|
||||
if (aId.WasPassed()) {
|
||||
aId.Value().ComputeLengthAndData();
|
||||
mId = Uint8Array::Create(aCx, this, aId.Value().Length(), aId.Value().Data());
|
||||
}
|
||||
|
||||
if (aPayload.WasPassed()) {
|
||||
aPayload.Value().ComputeLengthAndData();
|
||||
mPayload = Uint8Array::Create(aCx, this, aPayload.Value().Length(), aPayload.Value().Data());
|
||||
}
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
|
||||
#include <algorithm> // for std::stable_sort
|
||||
|
||||
#define APZC_LOG(...)
|
||||
// #define APZC_LOG(...) printf_stderr("APZC: " __VA_ARGS__)
|
||||
#define APZCTM_LOG(...)
|
||||
// #define APZCTM_LOG(...) printf_stderr("APZCTM: " __VA_ARGS__)
|
||||
|
||||
namespace mozilla {
|
||||
namespace layers {
|
||||
|
@ -149,7 +149,7 @@ APZCTreeManager::UpdatePanZoomControllerTree(CompositorParent* aCompositor,
|
|||
}
|
||||
|
||||
for (size_t i = 0; i < apzcsToDestroy.Length(); i++) {
|
||||
APZC_LOG("Destroying APZC at %p\n", apzcsToDestroy[i].get());
|
||||
APZCTM_LOG("Destroying APZC at %p\n", apzcsToDestroy[i].get());
|
||||
apzcsToDestroy[i]->Destroy();
|
||||
}
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ APZCTreeManager::UpdatePanZoomControllerTree(CompositorParent* aCompositor,
|
|||
apzc->SetPrevSibling(nullptr);
|
||||
apzc->SetLastChild(nullptr);
|
||||
}
|
||||
APZC_LOG("Using APZC %p for layer %p with identifiers %lld %lld\n", apzc, aLayer, aLayersId, container->GetFrameMetrics().GetScrollId());
|
||||
APZCTM_LOG("Using APZC %p for layer %p with identifiers %lld %lld\n", apzc, aLayer, aLayersId, container->GetFrameMetrics().GetScrollId());
|
||||
|
||||
apzc->NotifyLayersUpdated(metrics,
|
||||
aIsFirstPaint && (aLayersId == aOriginatingLayersId));
|
||||
|
@ -251,7 +251,7 @@ APZCTreeManager::UpdatePanZoomControllerTree(CompositorParent* aCompositor,
|
|||
gfx::To3DMatrix(aLayer->GetTransform(), transform);
|
||||
|
||||
apzc->SetLayerHitTestData(visible, aTransform, transform);
|
||||
APZC_LOG("Setting rect(%f %f %f %f) as visible region for APZC %p\n", visible.x, visible.y,
|
||||
APZCTM_LOG("Setting rect(%f %f %f %f) as visible region for APZC %p\n", visible.x, visible.y,
|
||||
visible.width, visible.height,
|
||||
apzc);
|
||||
|
||||
|
@ -394,11 +394,11 @@ APZCTreeManager::ReceiveInputEvent(const InputData& aEvent,
|
|||
nsRefPtr<AsyncPanZoomController> apzc2 = GetTargetAPZC(ScreenPoint(multiTouchInput.mTouches[i].mScreenPoint),
|
||||
&mInOverscrolledApzc);
|
||||
mApzcForInputBlock = CommonAncestor(mApzcForInputBlock.get(), apzc2.get());
|
||||
APZC_LOG("Using APZC %p as the common ancestor\n", mApzcForInputBlock.get());
|
||||
APZCTM_LOG("Using APZC %p as the common ancestor\n", mApzcForInputBlock.get());
|
||||
// For now, we only ever want to do pinching on the root APZC for a given layers id. So
|
||||
// when we find the common ancestor of multiple points, also walk up to the root APZC.
|
||||
mApzcForInputBlock = RootAPZCForLayersId(mApzcForInputBlock);
|
||||
APZC_LOG("Using APZC %p as the root APZC for multi-touch\n", mApzcForInputBlock.get());
|
||||
APZCTM_LOG("Using APZC %p as the root APZC for multi-touch\n", mApzcForInputBlock.get());
|
||||
}
|
||||
|
||||
if (mApzcForInputBlock) {
|
||||
|
@ -410,7 +410,7 @@ APZCTreeManager::ReceiveInputEvent(const InputData& aEvent,
|
|||
mCachedTransformToApzcForInputBlock = gfx3DMatrix();
|
||||
}
|
||||
} else if (mApzcForInputBlock) {
|
||||
APZC_LOG("Re-using APZC %p as continuation of event block\n", mApzcForInputBlock.get());
|
||||
APZCTM_LOG("Re-using APZC %p as continuation of event block\n", mApzcForInputBlock.get());
|
||||
}
|
||||
if (mApzcForInputBlock) {
|
||||
mApzcForInputBlock->GetGuid(aOutTargetGuid);
|
||||
|
@ -498,11 +498,11 @@ APZCTreeManager::GetTouchInputBlockAPZC(const WidgetTouchEvent& aEvent,
|
|||
point = ScreenPoint(aEvent.touches[i]->mRefPoint.x, aEvent.touches[i]->mRefPoint.y);
|
||||
nsRefPtr<AsyncPanZoomController> apzc2 = GetTargetAPZC(point, aOutInOverscrolledApzc);
|
||||
apzc = CommonAncestor(apzc.get(), apzc2.get());
|
||||
APZC_LOG("Using APZC %p as the common ancestor\n", apzc.get());
|
||||
APZCTM_LOG("Using APZC %p as the common ancestor\n", apzc.get());
|
||||
// For now, we only ever want to do pinching on the root APZC for a given layers id. So
|
||||
// when we find the common ancestor of multiple points, also walk up to the root APZC.
|
||||
apzc = RootAPZCForLayersId(apzc);
|
||||
APZC_LOG("Using APZC %p as the root APZC for multi-touch\n", apzc.get());
|
||||
APZCTM_LOG("Using APZC %p as the root APZC for multi-touch\n", apzc.get());
|
||||
}
|
||||
return apzc.forget();
|
||||
}
|
||||
|
@ -1067,7 +1067,7 @@ APZCTreeManager::GetAPZCAtPoint(AsyncPanZoomController* aApzc,
|
|||
// since the composition bounds (used to initialize the visible rect against
|
||||
// which we hit test are in those coordinates).
|
||||
gfxPoint hitTestPointForThisLayer = ancestorUntransform.ProjectPoint(aHitTestPoint);
|
||||
APZC_LOG("Untransformed %f %f to transient coordinates %f %f for hit-testing APZC %p\n",
|
||||
APZCTM_LOG("Untransformed %f %f to transient coordinates %f %f for hit-testing APZC %p\n",
|
||||
aHitTestPoint.x, aHitTestPoint.y,
|
||||
hitTestPointForThisLayer.x, hitTestPointForThisLayer.y, aApzc);
|
||||
|
||||
|
@ -1079,7 +1079,7 @@ APZCTreeManager::GetAPZCAtPoint(AsyncPanZoomController* aApzc,
|
|||
* aApzc->GetCSSTransform().Inverse()
|
||||
* gfx3DMatrix(aApzc->GetCurrentAsyncTransform()).Inverse();
|
||||
gfxPoint hitTestPointForChildLayers = childUntransform.ProjectPoint(aHitTestPoint);
|
||||
APZC_LOG("Untransformed %f %f to layer coordinates %f %f for APZC %p\n",
|
||||
APZCTM_LOG("Untransformed %f %f to layer coordinates %f %f for APZC %p\n",
|
||||
aHitTestPoint.x, aHitTestPoint.y,
|
||||
hitTestPointForChildLayers.x, hitTestPointForChildLayers.y, aApzc);
|
||||
|
||||
|
@ -1094,7 +1094,7 @@ APZCTreeManager::GetAPZCAtPoint(AsyncPanZoomController* aApzc,
|
|||
}
|
||||
}
|
||||
if (!result && aApzc->VisibleRegionContains(ViewAs<ParentLayerPixel>(hitTestPointForThisLayer))) {
|
||||
APZC_LOG("Successfully matched untransformed point %f %f to visible region for APZC %p\n",
|
||||
APZCTM_LOG("Successfully matched untransformed point %f %f to visible region for APZC %p\n",
|
||||
hitTestPointForThisLayer.x, hitTestPointForThisLayer.y, aApzc);
|
||||
result = aApzc;
|
||||
}
|
||||
|
|
|
@ -764,6 +764,7 @@ SwitchState GetCurrentSwitchState(SwitchDevice aDevice)
|
|||
|
||||
void NotifySwitchStateFromInputDevice(SwitchDevice aDevice, SwitchState aState)
|
||||
{
|
||||
AssertMainThread();
|
||||
PROXY_IF_SANDBOXED(NotifySwitchStateFromInputDevice(aDevice, aState));
|
||||
}
|
||||
|
||||
|
|
|
@ -175,7 +175,6 @@ parent:
|
|||
DisableSwitchNotifications(SwitchDevice aDevice);
|
||||
sync GetCurrentSwitchState(SwitchDevice aDevice)
|
||||
returns (SwitchState aState);
|
||||
NotifySwitchStateFromInputDevice(SwitchDevice aDevice, SwitchState aState);
|
||||
|
||||
FactoryReset();
|
||||
|
||||
|
|
|
@ -344,7 +344,9 @@ GetCurrentSwitchState(SwitchDevice aDevice)
|
|||
void
|
||||
NotifySwitchStateFromInputDevice(SwitchDevice aDevice, SwitchState aState)
|
||||
{
|
||||
Hal()->SendNotifySwitchStateFromInputDevice(aDevice, aState);
|
||||
unused << aDevice;
|
||||
unused << aState;
|
||||
NS_RUNTIMEABORT("Only the main process may notify switch state change.");
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -862,14 +864,6 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
virtual bool
|
||||
RecvNotifySwitchStateFromInputDevice(const SwitchDevice& aDevice,
|
||||
const SwitchState& aState) MOZ_OVERRIDE
|
||||
{
|
||||
hal::NotifySwitchStateFromInputDevice(aDevice, aState);
|
||||
return true;
|
||||
}
|
||||
|
||||
void Notify(const int64_t& aClockDeltaMS)
|
||||
{
|
||||
unused << SendNotifySystemClockChange(aClockDeltaMS);
|
||||
|
|
|
@ -109,7 +109,7 @@ typedef enum {
|
|||
CUBEB_STREAM_TYPE_ALARM = 4,
|
||||
CUBEB_STREAM_TYPE_NOTIFICATION = 5,
|
||||
CUBEB_STREAM_TYPE_BLUETOOTH_SCO = 6,
|
||||
CUBEB_STREAM_TYPE_ENFORCED_AUDIBLE = 7,
|
||||
CUBEB_STREAM_TYPE_SYSTEM_ENFORCED = 7,
|
||||
CUBEB_STREAM_TYPE_DTMF = 8,
|
||||
CUBEB_STREAM_TYPE_TTS = 9,
|
||||
CUBEB_STREAM_TYPE_FM = 10,
|
||||
|
|
|
@ -63,5 +63,9 @@
|
|||
#define SL_ANDROID_STREAM_ALARM ((SLint32) 0x00000004)
|
||||
/* same as android.media.AudioManager.STREAM_NOTIFICATION */
|
||||
#define SL_ANDROID_STREAM_NOTIFICATION ((SLint32) 0x00000005)
|
||||
/* same as android.media.AudioManager.STREAM_BLUETOOTH_SCO */
|
||||
#define SL_ANDROID_STREAM_BLUETOOTH_SCO ((SLint32) 0x00000006)
|
||||
/* same as android.media.AudioManager.STREAM_SYSTEM_ENFORCED */
|
||||
#define SL_ANDROID_STREAM_SYSTEM_ENFORCED ((SLint32) 0x00000007)
|
||||
|
||||
#endif /* OPENSL_ES_ANDROIDCONFIGURATION_H_ */
|
||||
|
|
|
@ -117,7 +117,8 @@ convert_stream_type_to_sl_stream(cubeb_stream_type stream_type)
|
|||
return SL_ANDROID_STREAM_VOICE;
|
||||
case CUBEB_STREAM_TYPE_RING:
|
||||
return SL_ANDROID_STREAM_RING;
|
||||
case CUBEB_STREAM_TYPE_ENFORCED_AUDIBLE:
|
||||
case CUBEB_STREAM_TYPE_SYSTEM_ENFORCED:
|
||||
return SL_ANDROID_STREAM_SYSTEM_ENFORCED;
|
||||
default:
|
||||
return 0xFFFFFFFF;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче