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
f069e531e6
@ -223,6 +223,7 @@ let AdbController = {
|
||||
lockEnabled: undefined,
|
||||
disableAdbTimer: null,
|
||||
disableAdbTimeoutHours: 12,
|
||||
umsActive: false,
|
||||
|
||||
debug: function(str) {
|
||||
dump("AdbController: " + str + "\n");
|
||||
@ -304,6 +305,51 @@ let AdbController = {
|
||||
},
|
||||
|
||||
updateState: function() {
|
||||
this.umsActive = false;
|
||||
this.storages = navigator.getDeviceStorages('sdcard');
|
||||
this.updateStorageState(0);
|
||||
},
|
||||
|
||||
updateStorageState: function(storageIndex) {
|
||||
if (storageIndex >= this.storages.length) {
|
||||
// We've iterated through all of the storage objects, now we can
|
||||
// really do updateStateInternal.
|
||||
this.updateStateInternal();
|
||||
return;
|
||||
}
|
||||
let storage = this.storages[storageIndex];
|
||||
if (this.DEBUG) {
|
||||
this.debug("Checking availability of storage: '" +
|
||||
storage.storageName);
|
||||
}
|
||||
|
||||
let req = storage.available();
|
||||
req.onsuccess = function(e) {
|
||||
if (this.DEBUG) {
|
||||
this.debug("Storage: '" + storage.storageName + "' is '" +
|
||||
e.target.result);
|
||||
}
|
||||
if (e.target.result == 'shared') {
|
||||
// We've found a storage area that's being shared with the PC.
|
||||
// We can stop looking now.
|
||||
this.umsActive = true;
|
||||
this.updateStateInternal();
|
||||
return;
|
||||
}
|
||||
this.updateStorageState(storageIndex + 1);
|
||||
}.bind(this);
|
||||
req.onerror = function(e) {
|
||||
dump("AdbController: error querying storage availability for '" +
|
||||
this.storages[storageIndex].storageName + "' (ignoring)\n");
|
||||
this.updateStorageState(storageIndex + 1);
|
||||
}.bind(this);
|
||||
},
|
||||
|
||||
updateStateInternal: function() {
|
||||
if (this.DEBUG) {
|
||||
this.debug("updateStateInternal: called");
|
||||
}
|
||||
|
||||
if (this.remoteDebuggerEnabled === undefined ||
|
||||
this.lockEnabled === undefined ||
|
||||
this.locked === undefined) {
|
||||
@ -338,8 +384,15 @@ let AdbController = {
|
||||
this.debug("isDebugging=" + isDebugging);
|
||||
}
|
||||
|
||||
// If USB Mass Storage, USB tethering, or a debug session is active,
|
||||
// then we don't want to disable adb in an automatic fashion (i.e.
|
||||
// when the screen locks or due to timeout).
|
||||
let sysUsbConfig = libcutils.property_get("sys.usb.config");
|
||||
let rndisActive = (sysUsbConfig.split(",").indexOf("rndis") >= 0);
|
||||
let usbFuncActive = rndisActive || this.umsActive || isDebugging;
|
||||
|
||||
let enableAdb = this.remoteDebuggerEnabled &&
|
||||
(!(this.lockEnabled && this.locked) || isDebugging);
|
||||
(!(this.lockEnabled && this.locked) || usbFuncActive);
|
||||
|
||||
let useDisableAdbTimer = true;
|
||||
try {
|
||||
@ -359,7 +412,8 @@ let AdbController = {
|
||||
this.debug("updateState: enableAdb = " + enableAdb +
|
||||
" remoteDebuggerEnabled = " + this.remoteDebuggerEnabled +
|
||||
" lockEnabled = " + this.lockEnabled +
|
||||
" locked = " + this.locked);
|
||||
" locked = " + this.locked +
|
||||
" usbFuncActive = " + usbFuncActive);
|
||||
}
|
||||
|
||||
// Configure adb.
|
||||
@ -391,7 +445,7 @@ let AdbController = {
|
||||
}
|
||||
}
|
||||
if (useDisableAdbTimer) {
|
||||
if (enableAdb && !isDebugging) {
|
||||
if (enableAdb && !usbFuncActive) {
|
||||
this.startDisableAdbTimer();
|
||||
} else {
|
||||
this.stopDisableAdbTimer();
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"revision": "62c0ad5b88f15d5da1cc2496b9534087dbc5d015",
|
||||
"revision": "f63fa4e31cea664886f43504529d96bc046506fc",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
@ -2958,8 +2958,15 @@ onInstallSuccessAck: function onInstallSuccessAck(aManifestURL,
|
||||
|
||||
if (Components.isSuccessCode(result)) {
|
||||
isSigned = true;
|
||||
} else if (result == Cr.NS_ERROR_FILE_CORRUPTED) {
|
||||
} else if (result == Cr.NS_ERROR_SIGNED_JAR_MODIFIED_ENTRY ||
|
||||
result == Cr.NS_ERROR_SIGNED_JAR_UNSIGNED_ENTRY ||
|
||||
result == Cr.NS_ERROR_SIGNED_JAR_ENTRY_MISSING) {
|
||||
throw "APP_PACKAGE_CORRUPTED";
|
||||
} else if (result == Cr.NS_ERROR_FILE_CORRUPTED ||
|
||||
result == Cr.NS_ERROR_SIGNED_JAR_ENTRY_TOO_LARGE ||
|
||||
result == Cr.NS_ERROR_SIGNED_JAR_ENTRY_INVALID ||
|
||||
result == Cr.NS_ERROR_SIGNED_JAR_MANIFEST_INVALID) {
|
||||
throw "APP_PACKAGE_INVALID";
|
||||
} else if ((!aIsLocalFileInstall || isLaterThanBuildTime) &&
|
||||
(result != Cr.NS_ERROR_SIGNED_JAR_NOT_SIGNED)) {
|
||||
throw "INVALID_SIGNATURE";
|
||||
|
@ -206,9 +206,9 @@ function DOMDownloadImpl() {
|
||||
this.path = null;
|
||||
this.state = "stopped";
|
||||
this.contentType = null;
|
||||
this.error = null;
|
||||
|
||||
/* fields that require getters/setters */
|
||||
this._error = null;
|
||||
this._startTime = new Date();
|
||||
|
||||
/* private fields */
|
||||
@ -247,6 +247,14 @@ DOMDownloadImpl.prototype = {
|
||||
return this.__DOM_IMPL__.getEventHandler("onstatechange");
|
||||
},
|
||||
|
||||
get error() {
|
||||
return this._error;
|
||||
},
|
||||
|
||||
set error(aError) {
|
||||
this._error = aError;
|
||||
},
|
||||
|
||||
get startTime() {
|
||||
return this._startTime;
|
||||
},
|
||||
|
@ -51,14 +51,10 @@ function checkConsistentDownloadAttributes(download) {
|
||||
todo(download.path === expectedDownloadPath,
|
||||
"Download path = " + expectedDownloadPath);
|
||||
|
||||
// bug 948287: Accessing startTime attribute at download start fires
|
||||
// NS_ERROR_UNEXPECTED in emulator
|
||||
//ok(download.startTime >= todayDate,
|
||||
// "Download start time should be greater than or equal to today");
|
||||
ok(download.startTime >= todayDate,
|
||||
"Download start time should be greater than or equal to today");
|
||||
|
||||
// bug 945366: Accessing error attribute at download start fires
|
||||
// NS_ERROR_UNEXPECTED in emulator
|
||||
//is(download.error, null, "Download does not have an error");
|
||||
is(download.error, null, "Download does not have an error");
|
||||
|
||||
is(download.url, expectedServeURL,
|
||||
"Download URL = " + expectedServeURL);
|
||||
|
@ -415,7 +415,7 @@ let FormAssistant = {
|
||||
this.scrollIntoViewTimeout = content.setTimeout(function () {
|
||||
this.scrollIntoViewTimeout = null;
|
||||
if (this.focusedElement && !FormVisibility.isVisible(this.focusedElement)) {
|
||||
this.focusedElement.scrollIntoView(false);
|
||||
scrollSelectionOrElementIntoView(this.focusedElement);
|
||||
}
|
||||
}.bind(this), RESIZE_SCROLL_DELAY);
|
||||
}
|
||||
@ -1017,6 +1017,23 @@ function setSelectionRange(element, start, end) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Scroll the given element into view.
|
||||
*
|
||||
* Calls scrollSelectionIntoView for contentEditable elements.
|
||||
*/
|
||||
function scrollSelectionOrElementIntoView(element) {
|
||||
let editor = getPlaintextEditor(element);
|
||||
if (editor) {
|
||||
editor.selectionController.scrollSelectionIntoView(
|
||||
Ci.nsISelectionController.SELECTION_NORMAL,
|
||||
Ci.nsISelectionController.SELECTION_FOCUS_REGION,
|
||||
Ci.nsISelectionController.SCROLL_SYNCHRONOUS);
|
||||
} else {
|
||||
element.scrollIntoView(false);
|
||||
}
|
||||
}
|
||||
|
||||
// Get nsIPlaintextEditor object from an input field
|
||||
function getPlaintextEditor(element) {
|
||||
let editor = null;
|
||||
|
@ -138,8 +138,12 @@ MozNFCPeer.prototype = {
|
||||
*/
|
||||
function mozNfc() {
|
||||
debug("In mozNfc Constructor");
|
||||
this._nfcContentHelper = Cc["@mozilla.org/nfc/content-helper;1"]
|
||||
.getService(Ci.nsINfcContentHelper);
|
||||
try {
|
||||
this._nfcContentHelper = Cc["@mozilla.org/nfc/content-helper;1"]
|
||||
.getService(Ci.nsINfcContentHelper);
|
||||
} catch(e) {
|
||||
debug("No NFC support.")
|
||||
}
|
||||
}
|
||||
mozNfc.prototype = {
|
||||
_nfcContentHelper: null,
|
||||
|
@ -25,6 +25,9 @@ Cu.import("resource://gre/modules/Services.jsm");
|
||||
let NFC = {};
|
||||
Cu.import("resource://gre/modules/nfc_consts.js", NFC);
|
||||
|
||||
Cu.import("resource://gre/modules/systemlibs.js");
|
||||
const NFC_ENABLED = libcutils.property_get("ro.moz.nfc.enabled", "false") === "true";
|
||||
|
||||
// set to true in nfc_consts.js to see debug messages
|
||||
let DEBUG = NFC.DEBUG_NFC;
|
||||
|
||||
@ -627,4 +630,6 @@ Nfc.prototype = {
|
||||
}
|
||||
};
|
||||
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([Nfc]);
|
||||
if (NFC_ENABLED) {
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([Nfc]);
|
||||
}
|
||||
|
@ -26,6 +26,9 @@ Cu.import("resource://gre/modules/DOMRequestHelper.jsm");
|
||||
let NFC = {};
|
||||
Cu.import("resource://gre/modules/nfc_consts.js", NFC);
|
||||
|
||||
Cu.import("resource://gre/modules/systemlibs.js");
|
||||
const NFC_ENABLED = libcutils.property_get("ro.moz.nfc.enabled", "false") === "true";
|
||||
|
||||
// set to true to in nfc_consts.js to see debug messages
|
||||
let DEBUG = NFC.DEBUG_CONTENT_HELPER;
|
||||
|
||||
@ -384,4 +387,6 @@ NfcContentHelper.prototype = {
|
||||
},
|
||||
};
|
||||
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([NfcContentHelper]);
|
||||
if (NFC_ENABLED) {
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([NfcContentHelper]);
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ interface DOMDownload : EventTarget {
|
||||
|
||||
// A DOM error object, that will be not null when a download is stopped
|
||||
// because something failed.
|
||||
readonly attribute DOMError error;
|
||||
readonly attribute DOMError? error;
|
||||
|
||||
// Pauses the download.
|
||||
Promise pause();
|
||||
|
@ -294,33 +294,6 @@
|
||||
|
||||
"dom/imptests/editing/conformancetest/test_runtest.html":"takes too long",
|
||||
|
||||
"dom/media/tests/mochitest/test_dataChannel_basicAudio.html":"bug 908473",
|
||||
"dom/media/tests/mochitest/test_dataChannel_basicAudioVideo.html":"",
|
||||
"dom/media/tests/mochitest/test_dataChannel_basicAudioVideoCombined.html":"",
|
||||
"dom/media/tests/mochitest/test_dataChannel_basicDataOnly.html":"",
|
||||
"dom/media/tests/mochitest/test_dataChannel_basicVideo.html":"",
|
||||
"dom/media/tests/mochitest/test_dataChannel_noOffer.html":"",
|
||||
"dom/media/tests/mochitest/test_peerConnection_addCandidateInHaveLocalOffer.html":"",
|
||||
"dom/media/tests/mochitest/test_peerConnection_basicAudio.html":"",
|
||||
"dom/media/tests/mochitest/test_peerConnection_basicAudioVideo.html":"",
|
||||
"dom/media/tests/mochitest/test_peerConnection_basicAudioVideoCombined.html":"",
|
||||
"dom/media/tests/mochitest/test_peerConnection_basicVideo.html":"",
|
||||
"dom/media/tests/mochitest/test_peerConnection_bug822674.html":"",
|
||||
"dom/media/tests/mochitest/test_peerConnection_bug825703.html":"",
|
||||
"dom/media/tests/mochitest/test_peerConnection_bug827843.html":"",
|
||||
"dom/media/tests/mochitest/test_peerConnection_bug834153.html":"",
|
||||
"dom/media/tests/mochitest/test_peerConnection_bug835370.html":"",
|
||||
"dom/media/tests/mochitest/test_peerConnection_errorCallbacks.html":"",
|
||||
"dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveAudio.html":"",
|
||||
"dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideo.html":"",
|
||||
"dom/media/tests/mochitest/test_peerConnection_offerRequiresReceiveVideoAudio.html":"",
|
||||
"dom/media/tests/mochitest/test_peerConnection_setLocalAnswerInHaveLocalOffer.html":"",
|
||||
"dom/media/tests/mochitest/test_peerConnection_setLocalAnswerInStable.html":"",
|
||||
"dom/media/tests/mochitest/test_peerConnection_setLocalOfferInHaveRemoteOffer.html":"",
|
||||
"dom/media/tests/mochitest/test_peerConnection_setRemoteAnswerInHaveRemoteOffer.html":"",
|
||||
"dom/media/tests/mochitest/test_peerConnection_setRemoteAnswerInStable.html":"",
|
||||
"dom/media/tests/mochitest/test_peerConnection_setRemoteOfferInHaveLocalOffer.html":"",
|
||||
"dom/media/tests/mochitest/test_peerConnection_throwInCallbacks.html":"",
|
||||
"dom/media/tests/ipc/test_ipc.html":"nested ipc not working",
|
||||
|
||||
"dom/network/tests/test_networkstats_basics.html":"Will be fixed in bug 858005",
|
||||
|
Loading…
Reference in New Issue
Block a user