This commit is contained in:
Wes Kocher 2014-06-05 19:17:54 -07:00
Родитель c0a5d95f61 216b247057
Коммит bc2963fa3e
259 изменённых файлов: 4122 добавлений и 2994 удалений

Просмотреть файл

@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.
Preemptive clobber for a vm/Xdr.h change to evade bug 1019955 (should it have otherwise arisen, which is unclear).
Bug 989276 is the latest to incur the wrath of bug 1019955.

Просмотреть файл

@ -979,6 +979,9 @@ pref("dom.wakelock.enabled", true);
// Disable touch caret by default
pref("touchcaret.enabled", false);
// Disable selection caret by default
pref("selectioncaret.enabled", false);
// Enable sync and mozId with Firefox Accounts.
#ifdef MOZ_SERVICES_FXACCOUNTS
pref("services.sync.fxaccounts.enabled", true);

Просмотреть файл

@ -283,11 +283,9 @@ select[disabled] > button {
*:-moz-any-link:active,
*[role=button]:active,
button:active,
input:active,
option:active,
select:active,
label:active,
textarea:active {
label:active {
background-color: rgba(141, 184, 216, 0.5);
}

Просмотреть файл

@ -272,7 +272,14 @@ Target.prototype = {
},
_send: function target_send(data) {
shell.sendEvent(this.frame, 'developer-hud-update', Cu.cloneInto(data, this.frame));
let frame = this.frame;
let systemapp = document.querySelector('#systemapp');
if (this.frame === systemapp) {
frame = getContentWindow();
}
shell.sendEvent(frame, 'developer-hud-update', Cu.cloneInto(data, target));
}
};

Просмотреть файл

@ -420,7 +420,24 @@ ContentPermissionPrompt.prototype = {
if (isApp) {
details.manifestURL = DOMApplicationRegistry.getManifestURLByLocalId(principal.appId);
}
SystemAppProxy.dispatchEvent(details);
// request.element is defined for OOP content, while request.window
// is defined for In-Process content.
// In both cases the message needs to be dispatched to the top-level
// <iframe mozbrowser> container in the system app.
// So the above code iterates over window.realFrameElement in order
// to crosss mozbrowser iframes boundaries and find the top-level
// one in the system app.
// window.realFrameElement will be |null| if the code try to cross
// content -> chrome boundaries.
let targetElement = request.element;
let targetWindow = request.window || targetElement.ownerDocument.defaultView;
while (targetWindow.realFrameElement) {
targetElement = targetWindow.realFrameElement;
targetWindow = targetElement.ownerDocument.defaultView;
}
SystemAppProxy.dispatchEvent(details, targetElement);
},
classID: Components.ID("{8c719f03-afe0-4aac-91ff-6c215895d467}"),

Просмотреть файл

@ -58,7 +58,10 @@ let SystemAppProxy = {
* @param noPending Set to true to emit this event even before the system
* app is ready.
*/
_sendCustomEvent: function systemApp_sendCustomEvent(type, details, noPending) {
_sendCustomEvent: function systemApp_sendCustomEvent(type,
details,
noPending,
target) {
let content = this._frame ? this._frame.contentWindow : null;
// If the system app isn't ready yet,
@ -80,14 +83,14 @@ let SystemAppProxy = {
}
event.initCustomEvent(type, true, false, payload);
content.dispatchEvent(event);
(target || content).dispatchEvent(event);
return event;
},
// Now deprecated, use sendCustomEvent with a custom event name
dispatchEvent: function systemApp_sendChromeEvent(details) {
return this._sendCustomEvent('mozChromeEvent', details);
dispatchEvent: function systemApp_sendChromeEvent(details, target) {
return this._sendCustomEvent('mozChromeEvent', details, false, target);
},
// Listen for dom events on the system app

Просмотреть файл

@ -8,6 +8,7 @@ Services.scriptloader.loadSubScript("resource://gre/modules/SystemAppProxy.jsm",
const { SystemAppProxy } = scope;
let frame;
let customEventTarget;
let index = -1;
function next() {
@ -47,6 +48,10 @@ function listener(event) {
} else if (n == 4) {
assert.equal(event.type, "mozChromeEvent");
assert.equal(event.detail.name, "fourth");
} else if (n == 5) {
assert.equal(event.type, "custom");
assert.equal(event.detail.name, "fifth");
assert.equal(event.target, customEventTarget);
next(); // call checkEventListening();
} else {
@ -79,6 +84,8 @@ let steps = [
frame = doc.createElement("iframe");
doc.documentElement.appendChild(frame);
customEventTarget = frame.contentDocument.body;
// Ensure that events are correctly sent to the frame.
// `listener` is going to call next()
frame.contentWindow.addEventListener("mozChromeEvent", listener);
@ -118,7 +125,8 @@ let steps = [
// they should be dispatched right away
SystemAppProxy._sendCustomEvent("custom", { name: "third" });
SystemAppProxy.dispatchEvent({ name: "fourth" });
// Once this 4th event is received, we will run checkEventListening
SystemAppProxy._sendCustomEvent("custom", { name: "fifth" }, false, customEventTarget);
// Once this 5th event is received, we will run checkEventListening
},
function checkEventListening() {

Просмотреть файл

@ -19,13 +19,13 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="908f94fda04462001ece86e6b6c15ad8b05f7526"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="857129928b6e56a809cee9d5445effb8fa9f1c2c"/>
<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"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="9100fa82fc355f5201e23e400fc6b40e875304ed"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="994fa9a1f7ce0e63c880a48d571c3ab3e01884a3"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="89812422efe8df364ddf364b4740030496181277"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>

Просмотреть файл

@ -17,10 +17,10 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="908f94fda04462001ece86e6b6c15ad8b05f7526"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="857129928b6e56a809cee9d5445effb8fa9f1c2c"/>
<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"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="89812422efe8df364ddf364b4740030496181277"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->

Просмотреть файл

@ -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="908f94fda04462001ece86e6b6c15ad8b05f7526"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="857129928b6e56a809cee9d5445effb8fa9f1c2c"/>
<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"/>
@ -23,7 +23,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="994fa9a1f7ce0e63c880a48d571c3ab3e01884a3"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="89812422efe8df364ddf364b4740030496181277"/>
<!-- Stock Android things -->
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="f92a936f2aa97526d4593386754bdbf02db07a12"/>
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="6e47ff2790f5656b5b074407829ceecf3e6188c4"/>

Просмотреть файл

@ -19,13 +19,13 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="908f94fda04462001ece86e6b6c15ad8b05f7526"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="857129928b6e56a809cee9d5445effb8fa9f1c2c"/>
<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"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="9100fa82fc355f5201e23e400fc6b40e875304ed"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="994fa9a1f7ce0e63c880a48d571c3ab3e01884a3"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="89812422efe8df364ddf364b4740030496181277"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>

Просмотреть файл

@ -17,10 +17,10 @@
</project>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="908f94fda04462001ece86e6b6c15ad8b05f7526"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="857129928b6e56a809cee9d5445effb8fa9f1c2c"/>
<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"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="89812422efe8df364ddf364b4740030496181277"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->

Просмотреть файл

@ -4,6 +4,6 @@
"remote": "",
"branch": ""
},
"revision": "c3d40600c0090c5ca6ca4427f3a870ff443a109d",
"revision": "e32dee285e41ff8be7779ab4adb3db81a5b36570",
"repo_path": "/integration/gaia-central"
}

Просмотреть файл

@ -17,12 +17,12 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="908f94fda04462001ece86e6b6c15ad8b05f7526"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="857129928b6e56a809cee9d5445effb8fa9f1c2c"/>
<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"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="994fa9a1f7ce0e63c880a48d571c3ab3e01884a3"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="89812422efe8df364ddf364b4740030496181277"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
<project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>

Просмотреть файл

@ -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="908f94fda04462001ece86e6b6c15ad8b05f7526"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="857129928b6e56a809cee9d5445effb8fa9f1c2c"/>
<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,10 +17,10 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="908f94fda04462001ece86e6b6c15ad8b05f7526"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="857129928b6e56a809cee9d5445effb8fa9f1c2c"/>
<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"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="89812422efe8df364ddf364b4740030496181277"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->

Просмотреть файл

@ -17,12 +17,12 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="908f94fda04462001ece86e6b6c15ad8b05f7526"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="857129928b6e56a809cee9d5445effb8fa9f1c2c"/>
<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"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="994fa9a1f7ce0e63c880a48d571c3ab3e01884a3"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="89812422efe8df364ddf364b4740030496181277"/>
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>

Просмотреть файл

@ -671,6 +671,18 @@
@BINPATH@/res/table-remove-row-active.gif
@BINPATH@/res/table-remove-row-hover.gif
@BINPATH@/res/table-remove-row.gif
@BINPATH@/res/text_caret.png
@BINPATH@/res/text_caret@1.5x.png
@BINPATH@/res/text_caret@2.25x.png
@BINPATH@/res/text_caret@2x.png
@BINPATH@/res/text_caret_tilt_left.png
@BINPATH@/res/text_caret_tilt_left@1.5x.png
@BINPATH@/res/text_caret_tilt_left@2.25x.png
@BINPATH@/res/text_caret_tilt_left@2x.png
@BINPATH@/res/text_caret_tilt_right.png
@BINPATH@/res/text_caret_tilt_right@1.5x.png
@BINPATH@/res/text_caret_tilt_right@2.25x.png
@BINPATH@/res/text_caret_tilt_right@2x.png
@BINPATH@/res/text_selection_handle.png
@BINPATH@/res/text_selection_handle@1.5.png
@BINPATH@/res/text_selection_handle@2.png

Просмотреть файл

@ -18,6 +18,7 @@
*/
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
let {LoadContextInfo} = Cu.import("resource://gre/modules/LoadContextInfo.jsm", {});
XPCOMUtils.defineLazyModuleGetter(this, "FormHistory",
"resource://gre/modules/FormHistory.jsm");
@ -567,10 +568,14 @@ var gAllTests = [
pm.addFromPrincipal(principal, "offline-app", Ci.nsIOfflineCacheUpdateService.ALLOW_NO_WARN);
// Store something to the offline cache
const nsICache = Components.interfaces.nsICache;
var cs = Components.classes["@mozilla.org/network/cache-service;1"]
.getService(Components.interfaces.nsICacheService);
var session = cs.createSession(URL + "/manifest", nsICache.STORE_OFFLINE, nsICache.STREAM_BASED);
var appcacheserv = Cc["@mozilla.org/network/application-cache-service;1"]
.getService(Ci.nsIApplicationCacheService);
var appcachegroupid = appcacheserv.buildGroupID(makeURI(URL + "/manifest"), LoadContextInfo.default);
var appcache = appcacheserv.createApplicationCache(appcachegroupid);
var cacheserv = Cc["@mozilla.org/netwerk/cache-storage-service;1"]
.getService(Ci.nsICacheStorageService);
var storage = cacheserv.appCacheStorage(LoadContextInfo.default, appcache);
// Open the dialog
let wh = new WindowHelper();
@ -587,27 +592,19 @@ var gAllTests = [
// Check if the cache has been deleted
var size = -1;
var visitor = {
visitDevice: function (deviceID, deviceInfo)
onCacheStorageInfo: function (aEntryCount, aConsumption, aCapacity, aDiskDirectory)
{
if (deviceID == "offline")
size = deviceInfo.totalSize;
// Do not enumerate entries
return false;
},
visitEntry: function (deviceID, entryInfo)
{
// Do not enumerate entries.
return false;
size = aConsumption;
}
};
cs.visitEntries(visitor);
storage.asyncVisitStorage(visitor, false);
// Offline cache visit happens synchronously, since it's forwarded to the old code
is(size, 0, "offline application cache entries evicted");
};
var cacheListener = {
onCacheEntryAvailable: function (entry, access, status) {
onCacheEntryCheck: function() { return Ci.nsICacheEntryOpenCallback.ENTRY_WANTED; },
onCacheEntryAvailable: function (entry, isnew, appcache, status) {
is(status, Cr.NS_OK);
var stream = entry.openOutputStream(0);
var content = "content";
@ -618,7 +615,7 @@ var gAllTests = [
}
};
session.asyncOpenCacheEntry(URL, nsICache.ACCESS_READ_WRITE, cacheListener);
storage.asyncOpenURI(makeURI(URL), "", Ci.nsICacheStorage.OPEN_TRUNCATE, cacheListener);
},
function () {
// Test for offline apps permission deletion

Просмотреть файл

@ -329,30 +329,21 @@ var gAdvancedPane = {
updateActualAppCacheSize: function ()
{
var visitor = {
visitDevice: function (deviceID, deviceInfo)
onCacheStorageInfo: function (aEntryCount, aConsumption, aCapacity, aDiskDirectory)
{
if (deviceID == "offline") {
var actualSizeLabel = document.getElementById("actualAppCacheSize");
var sizeStrings = DownloadUtils.convertByteUnits(deviceInfo.totalSize);
var prefStrBundle = document.getElementById("bundlePreferences");
var sizeStr = prefStrBundle.getFormattedString("actualAppCacheSize", sizeStrings);
actualSizeLabel.value = sizeStr;
}
// Do not enumerate entries
return false;
},
visitEntry: function (deviceID, entryInfo)
{
// Do not enumerate entries.
return false;
var actualSizeLabel = document.getElementById("actualAppCacheSize");
var sizeStrings = DownloadUtils.convertByteUnits(aConsumption);
var prefStrBundle = document.getElementById("bundlePreferences");
var sizeStr = prefStrBundle.getFormattedString("actualAppCacheSize", sizeStrings);
actualSizeLabel.value = sizeStr;
}
};
var cacheService =
Components.classes["@mozilla.org/network/cache-service;1"]
.getService(Components.interfaces.nsICacheService);
cacheService.visitEntries(visitor);
Components.classes["@mozilla.org/netwerk/cache-storage-service;1"]
.getService(Components.interfaces.nsICacheStorageService);
var storage = cacheService.appCacheStorage(LoadContextInfo.default, null);
storage.asyncVisitStorage(visitor, false);
},
updateCacheSizeUI: function (smartSizeEnabled)

Просмотреть файл

@ -314,30 +314,21 @@ var gAdvancedPane = {
updateActualAppCacheSize: function ()
{
var visitor = {
visitDevice: function (deviceID, deviceInfo)
onCacheStorageInfo: function (aEntryCount, aConsumption, aCapacity, aDiskDirectory)
{
if (deviceID == "offline") {
var actualSizeLabel = document.getElementById("actualAppCacheSize");
var sizeStrings = DownloadUtils.convertByteUnits(deviceInfo.totalSize);
var prefStrBundle = document.getElementById("bundlePreferences");
var sizeStr = prefStrBundle.getFormattedString("actualAppCacheSize", sizeStrings);
actualSizeLabel.textContent = sizeStr;
}
// Do not enumerate entries
return false;
},
visitEntry: function (deviceID, entryInfo)
{
// Do not enumerate entries.
return false;
var actualSizeLabel = document.getElementById("actualAppCacheSize");
var sizeStrings = DownloadUtils.convertByteUnits(aConsumption);
var prefStrBundle = document.getElementById("bundlePreferences");
var sizeStr = prefStrBundle.getFormattedString("actualAppCacheSize", sizeStrings);
actualSizeLabel.value = sizeStr;
}
};
var cacheService =
Components.classes["@mozilla.org/network/cache-service;1"]
.getService(Components.interfaces.nsICacheService);
cacheService.visitEntries(visitor);
Components.classes["@mozilla.org/netwerk/cache-storage-service;1"]
.getService(Components.interfaces.nsICacheStorageService);
var storage = cacheService.appCacheStorage(LoadContextInfo.default, null);
storage.asyncVisitStorage(visitor, false);
},
updateCacheSizeUI: function (smartSizeEnabled)

Просмотреть файл

@ -156,9 +156,16 @@ this.BingTranslation.prototype = {
let error = false;
for (let i = 0; i < len; i++) {
try {
bingRequest.translationData[i][0].parseResult(
results[i].firstChild.nodeValue
);
let result = results[i].firstChild.nodeValue;
let root = bingRequest.translationData[i][0];
if (root.isSimpleRoot) {
// Workaround for Bing's service problem in which "&" chars in
// plain-text TranslationItems are double-escaped.
result = result.replace("&amp;", "&", "g");
}
root.parseResult(result);
} catch (e) { error = true; }
}

Просмотреть файл

@ -29,6 +29,7 @@ const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
let { XPCOMUtils } = Cu.import("resource://gre/modules/XPCOMUtils.jsm", {});
let { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
let { LoadContextInfo } = Cu.import("resource://gre/modules/LoadContextInfo.jsm", {});
let { Promise: promise } = Cu.import("resource://gre/modules/Promise.jsm", {});
this.EXPORTED_SYMBOLS = ["AppCacheUtils"];
@ -247,37 +248,35 @@ AppCacheUtils.prototype = {
let entries = [];
Services.cache.visitEntries({
visitDevice: function(deviceID, deviceInfo) {
return true;
},
let appCacheStorage = Services.cache2.appCacheStorage(LoadContextInfo.default, null);
appCacheStorage.asyncVisitStorage({
onCacheStorageInfo: function() {},
visitEntry: function(deviceID, entryInfo) {
if (entryInfo.deviceID == "offline") {
let entry = {};
let lowerKey = entryInfo.key.toLowerCase();
onCacheEntryInfo: function(aURI, aIdEnhance, aDataSize, aFetchCount, aLastModifiedTime, aExpirationTime) {
let lowerKey = aURI.asciiSpec.toLowerCase();
if (searchTerm && lowerKey.indexOf(searchTerm.toLowerCase()) == -1) {
return true;
}
for (let [key, value] of Iterator(entryInfo)) {
if (key == "QueryInterface") {
continue;
}
if (key == "clientID") {
entry.key = entryInfo.key;
}
if (key == "expirationTime" || key == "lastFetched" || key == "lastModified") {
value = new Date(value * 1000);
}
entry[key] = value;
}
entries.push(entry);
if (searchTerm && lowerKey.indexOf(searchTerm.toLowerCase()) == -1) {
return;
}
if (aIdEnhance) {
aIdEnhance += ":";
}
let entry = {
"deviceID": "offline",
"key": aIdEnhance + aURI.asciiSpec,
"fetchCount": aFetchCount,
"lastFetched": null,
"lastModified": new Date(aLastModifiedTime * 1000),
"expirationTime": new Date(aExpirationTime * 1000),
"dataSize": aDataSize
};
entries.push(entry);
return true;
}
});
}, true);
if (entries.length === 0) {
throw new Error(l10n.GetStringFromName("noResults"));
@ -286,31 +285,11 @@ AppCacheUtils.prototype = {
},
viewEntry: function ACU_viewEntry(key) {
let uri;
Services.cache.visitEntries({
visitDevice: function(deviceID, deviceInfo) {
return true;
},
visitEntry: function(deviceID, entryInfo) {
if (entryInfo.deviceID == "offline" && entryInfo.key == key) {
uri = "about:cache-entry?client=" + entryInfo.clientID +
"&sb=1&key=" + entryInfo.key;
return false;
}
return true;
}
});
if (uri) {
let wm = Cc["@mozilla.org/appshell/window-mediator;1"]
.getService(Ci.nsIWindowMediator);
let win = wm.getMostRecentWindow("navigator:browser");
win.gBrowser.selectedTab = win.gBrowser.addTab(uri);
} else {
return l10n.GetStringFromName("entryNotFound");
}
let wm = Cc["@mozilla.org/appshell/window-mediator;1"]
.getService(Ci.nsIWindowMediator);
let win = wm.getMostRecentWindow("navigator:browser");
win.gBrowser.selectedTab = win.gBrowser.addTab(
"about:cache-entry?storage=appcache&context=&eid=&uri=" + key);
},
clearAll: function ACU_clearAll() {

Просмотреть файл

@ -3470,7 +3470,7 @@ MOZ_ARG_WITH_BOOL(system-nspr,
_USE_SYSTEM_NSPR=1 )
if test -n "$_USE_SYSTEM_NSPR"; then
AM_PATH_NSPR(4.10.3, [MOZ_NATIVE_NSPR=1], [AC_MSG_ERROR([your don't have NSPR installed or your version is too old])])
AM_PATH_NSPR(4.10.6, [MOZ_NATIVE_NSPR=1], [AC_MSG_ERROR([your don't have NSPR installed or your version is too old])])
fi
if test -n "$MOZ_NATIVE_NSPR"; then
@ -6323,17 +6323,13 @@ if test "$MOZ_WEBAPP_RUNTIME"; then
AC_DEFINE(MOZ_WEBAPP_RUNTIME)
fi
AC_MSG_CHECKING([for tar archiver])
AC_CHECK_PROGS(TAR, gnutar gtar tar, "")
if test -z "$TAR"; then
AC_MSG_ERROR([no tar archiver found in \$PATH])
fi
AC_MSG_RESULT([$TAR])
AC_SUBST(TAR)
AC_MSG_CHECKING([for wget])
AC_CHECK_PROGS(WGET, wget, "")
AC_MSG_RESULT([$WGET])
AC_SUBST(WGET)
dnl ========================================================

Просмотреть файл

@ -440,6 +440,11 @@ TraceActiveWindowGlobal(const uint64_t& aId, nsGlobalWindow*& aWindow, void* aCl
if (aWindow->GetDocShell() && aWindow->IsOuterWindow()) {
TraceClosure* closure = static_cast<TraceClosure*>(aClosure);
aWindow->TraceGlobalJSObject(closure->mTrc);
EventListenerManager* elm = aWindow->GetExistingListenerManager();
if (elm) {
elm->TraceListeners(closure->mTrc);
}
#ifdef MOZ_XUL
nsIDocument* doc = aWindow->GetExtantDoc();
if (doc && doc->IsXUL()) {

Просмотреть файл

@ -3951,17 +3951,6 @@ nsDocument::InsertChildAt(nsIContent* aKid, uint32_t aIndex,
return doInsertChildAt(aKid, aIndex, aNotify, mChildren);
}
nsresult
nsDocument::AppendChildTo(nsIContent* aKid, bool aNotify)
{
// Make sure to _not_ call the subclass InsertChildAt here. If
// subclasses wanted to hook into this stuff, they would have
// overridden AppendChildTo.
// XXXbz maybe this should just be a non-virtual method on nsINode?
// Feels that way to me...
return nsDocument::InsertChildAt(aKid, GetChildCount(), aNotify);
}
void
nsDocument::RemoveChildAt(uint32_t aIndex, bool aNotify)
{

Просмотреть файл

@ -889,7 +889,6 @@ public:
virtual uint32_t GetChildCount() const MOZ_OVERRIDE;
virtual nsresult InsertChildAt(nsIContent* aKid, uint32_t aIndex,
bool aNotify) MOZ_OVERRIDE;
virtual nsresult AppendChildTo(nsIContent* aKid, bool aNotify);
virtual void RemoveChildAt(uint32_t aIndex, bool aNotify) MOZ_OVERRIDE;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE
{

Просмотреть файл

@ -23,7 +23,6 @@
#include "nsGkAtoms.h"
#include "nsContentUtils.h"
#include "nsGenericDOMDataNode.h"
#include "nsLayoutUtils.h"
#include "nsTextFrame.h"
#include "nsFontFaceList.h"
#include "mozilla/dom/DocumentFragment.h"
@ -2792,10 +2791,11 @@ static nsresult GetPartialTextRect(nsLayoutUtils::RectCallback* aCallback,
return NS_OK;
}
static void CollectClientRects(nsLayoutUtils::RectCallback* aCollector,
nsRange* aRange,
nsINode* aStartParent, int32_t aStartOffset,
nsINode* aEndParent, int32_t aEndOffset)
/* static */ void
nsRange::CollectClientRects(nsLayoutUtils::RectCallback* aCollector,
nsRange* aRange,
nsINode* aStartParent, int32_t aStartOffset,
nsINode* aEndParent, int32_t aEndOffset)
{
// Hold strong pointers across the flush
nsCOMPtr<nsINode> startContainer = aStartParent;
@ -2826,7 +2826,7 @@ static void CollectClientRects(nsLayoutUtils::RectCallback* aCollector,
if (textFrame) {
int32_t outOffset;
nsIFrame* outFrame;
textFrame->GetChildFrameContainingOffset(aStartOffset, false,
textFrame->GetChildFrameContainingOffset(aStartOffset, false,
&outOffset, &outFrame);
if (outFrame) {
nsIFrame* relativeTo =

Просмотреть файл

@ -15,6 +15,7 @@
#include "nsINode.h"
#include "nsIDocument.h"
#include "nsIDOMNode.h"
#include "nsLayoutUtils.h"
#include "prmon.h"
#include "nsStubMutationObserver.h"
#include "nsWrapperCache.h"
@ -254,6 +255,11 @@ public:
static bool IsNodeSelected(nsINode* aNode, uint32_t aStartOffset,
uint32_t aEndOffset);
static void CollectClientRects(nsLayoutUtils::RectCallback* aCollector,
nsRange* aRange,
nsINode* aStartParent, int32_t aStartOffset,
nsINode* aEndParent, int32_t aEndOffset);
typedef nsTHashtable<nsPtrHashKey<nsRange> > RangeHashTable;
protected:
void RegisterCommonAncestor(nsINode* aNode);

Просмотреть файл

@ -15,6 +15,7 @@
#include "mozilla/css/Loader.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/ShadowRoot.h"
#include "mozilla/Preferences.h"
#include "nsCSSStyleSheet.h"
#include "nsIContent.h"
#include "nsIDocument.h"
@ -120,6 +121,21 @@ nsStyleLinkElement::SetLineNumber(uint32_t aLineNumber)
mLineNumber = aLineNumber;
}
/* static */ bool
nsStyleLinkElement::IsImportEnabled()
{
static bool sAdded = false;
static bool sImportEnabled;
if (!sAdded) {
// This part runs only once because of the static flag.
Preferences::AddBoolVarCache(&sImportEnabled,
"dom.webcomponents.enabled",
false);
sAdded = true;
}
return sImportEnabled;
}
static uint32_t ToLinkMask(const nsAString& aLink)
{
if (aLink.EqualsLiteral("prefetch"))
@ -132,7 +148,7 @@ static uint32_t ToLinkMask(const nsAString& aLink)
return nsStyleLinkElement::eNEXT;
else if (aLink.EqualsLiteral("alternate"))
return nsStyleLinkElement::eALTERNATE;
else if (aLink.EqualsLiteral("import"))
else if (aLink.EqualsLiteral("import") && nsStyleLinkElement::IsImportEnabled())
return nsStyleLinkElement::eHTMLIMPORT;
else
return 0;

Просмотреть файл

@ -64,6 +64,8 @@ public:
// The return value is a bitwise or of 0 or more RelValues
static uint32_t ParseLinkTypes(const nsAString& aTypes);
static bool IsImportEnabled();
void UpdateStyleSheetInternal()
{
UpdateStyleSheetInternal(nullptr, nullptr);

Просмотреть файл

@ -72,6 +72,11 @@ WebGLBuffer::Validate(GLenum type, uint32_t max_allowed,
return mCache->Validate(type, max_allowed, first, count, out_upperBound);
}
bool
WebGLBuffer::IsElementArrayUsedWithMultipleTypes() const
{
return mCache->BeenUsedWithMultipleTypes();
}
JSObject*
WebGLBuffer::WrapObject(JSContext *cx) {

Просмотреть файл

@ -49,6 +49,8 @@ public:
bool Validate(GLenum type, uint32_t max_allowed, size_t first, size_t count,
uint32_t* out_upperBound);
bool IsElementArrayUsedWithMultipleTypes() const;
WebGLContext *GetParentObject() const {
return Context();
}

Просмотреть файл

@ -213,6 +213,14 @@ public:
void ErrorOutOfMemory(const char *fmt = 0, ...);
const char *ErrorName(GLenum error);
/**
* Return displayable name for GLenum.
* This version is like gl::GLenumToStr but with out the GL_ prefix to
* keep consistency with how errors are reported from WebGL.
*/
static const char *EnumName(GLenum glenum);
bool IsTextureFormatCompressed(GLenum format);
void DummyFramebufferOperation(const char *info);

Просмотреть файл

@ -260,6 +260,14 @@ WebGLContext::DrawElements_check(GLsizei count, GLenum type,
return false;
}
// Bug 1008310 - Check if buffer has been used with a different previous type
if (elemArrayBuffer.IsElementArrayUsedWithMultipleTypes()) {
GenerateWarning("%s: bound element array buffer previously used with a type other than "
"%s, this will affect performance.",
info,
WebGLContext::EnumName(type));
}
MakeContextCurrent();
if (mBoundFramebuffer) {

Просмотреть файл

@ -362,6 +362,64 @@ WebGLContext::ErrorName(GLenum error)
}
}
const char*
WebGLContext::EnumName(GLenum glenum)
{
switch (glenum) {
#define XX(x) case LOCAL_GL_##x: return #x
XX(ALPHA);
XX(ATC_RGB);
XX(ATC_RGBA_EXPLICIT_ALPHA);
XX(ATC_RGBA_INTERPOLATED_ALPHA);
XX(COMPRESSED_RGBA_PVRTC_2BPPV1);
XX(COMPRESSED_RGBA_PVRTC_4BPPV1);
XX(COMPRESSED_RGBA_S3TC_DXT1_EXT);
XX(COMPRESSED_RGBA_S3TC_DXT3_EXT);
XX(COMPRESSED_RGBA_S3TC_DXT5_EXT);
XX(COMPRESSED_RGB_PVRTC_2BPPV1);
XX(COMPRESSED_RGB_PVRTC_4BPPV1);
XX(COMPRESSED_RGB_S3TC_DXT1_EXT);
XX(DEPTH_COMPONENT);
XX(DEPTH_COMPONENT16);
XX(DEPTH_COMPONENT32);
XX(DEPTH_STENCIL);
XX(DEPTH24_STENCIL8);
XX(ETC1_RGB8_OES);
XX(FLOAT);
XX(HALF_FLOAT);
XX(LUMINANCE);
XX(LUMINANCE_ALPHA);
XX(RGB);
XX(RGB16F);
XX(RGB32F);
XX(RGBA);
XX(RGBA16F);
XX(RGBA32F);
XX(SRGB);
XX(SRGB_ALPHA);
XX(TEXTURE_2D);
XX(TEXTURE_3D);
XX(TEXTURE_CUBE_MAP);
XX(TEXTURE_CUBE_MAP_NEGATIVE_X);
XX(TEXTURE_CUBE_MAP_NEGATIVE_Y);
XX(TEXTURE_CUBE_MAP_NEGATIVE_Z);
XX(TEXTURE_CUBE_MAP_POSITIVE_X);
XX(TEXTURE_CUBE_MAP_POSITIVE_Y);
XX(TEXTURE_CUBE_MAP_POSITIVE_Z);
XX(UNSIGNED_BYTE);
XX(UNSIGNED_INT);
XX(UNSIGNED_INT_24_8);
XX(UNSIGNED_SHORT);
XX(UNSIGNED_SHORT_4_4_4_4);
XX(UNSIGNED_SHORT_5_5_5_1);
XX(UNSIGNED_SHORT_5_6_5);
#undef XX
}
return "[Unknown enum name]";
}
bool
WebGLContext::IsTextureFormatCompressed(GLenum format)
{

Просмотреть файл

@ -82,75 +82,13 @@ InfoFrom(WebGLTexImageFunc func)
}
/**
* Return displayable name for GLenum.
* This version is like gl::GLenumToStr but with out the GL_ prefix to
* keep consistency with how errors are reported from WebGL.
*/
static const char*
NameFrom(GLenum glenum)
{
switch (glenum) {
#define XX(x) case LOCAL_GL_##x: return #x
XX(ALPHA);
XX(ATC_RGB);
XX(ATC_RGBA_EXPLICIT_ALPHA);
XX(ATC_RGBA_INTERPOLATED_ALPHA);
XX(COMPRESSED_RGBA_PVRTC_2BPPV1);
XX(COMPRESSED_RGBA_PVRTC_4BPPV1);
XX(COMPRESSED_RGBA_S3TC_DXT1_EXT);
XX(COMPRESSED_RGBA_S3TC_DXT3_EXT);
XX(COMPRESSED_RGBA_S3TC_DXT5_EXT);
XX(COMPRESSED_RGB_PVRTC_2BPPV1);
XX(COMPRESSED_RGB_PVRTC_4BPPV1);
XX(COMPRESSED_RGB_S3TC_DXT1_EXT);
XX(DEPTH_COMPONENT);
XX(DEPTH_COMPONENT16);
XX(DEPTH_COMPONENT32);
XX(DEPTH_STENCIL);
XX(DEPTH24_STENCIL8);
XX(ETC1_RGB8_OES);
XX(FLOAT);
XX(HALF_FLOAT);
XX(LUMINANCE);
XX(LUMINANCE_ALPHA);
XX(RGB);
XX(RGB16F);
XX(RGB32F);
XX(RGBA);
XX(RGBA16F);
XX(RGBA32F);
XX(SRGB);
XX(SRGB_ALPHA);
XX(TEXTURE_2D);
XX(TEXTURE_3D);
XX(TEXTURE_CUBE_MAP);
XX(TEXTURE_CUBE_MAP_NEGATIVE_X);
XX(TEXTURE_CUBE_MAP_NEGATIVE_Y);
XX(TEXTURE_CUBE_MAP_NEGATIVE_Z);
XX(TEXTURE_CUBE_MAP_POSITIVE_X);
XX(TEXTURE_CUBE_MAP_POSITIVE_Y);
XX(TEXTURE_CUBE_MAP_POSITIVE_Z);
XX(UNSIGNED_BYTE);
XX(UNSIGNED_INT);
XX(UNSIGNED_INT_24_8);
XX(UNSIGNED_SHORT);
XX(UNSIGNED_SHORT_4_4_4_4);
XX(UNSIGNED_SHORT_5_5_5_1);
XX(UNSIGNED_SHORT_5_6_5);
#undef XX
}
return nullptr;
}
/**
* Same as ErrorInvalidEnum but uses NameFrom to print displayable
* Same as ErrorInvalidEnum but uses WebGLContext::EnumName to print displayable
* name for \a glenum.
*/
static void
ErrorInvalidEnumWithName(WebGLContext* ctx, const char* msg, GLenum glenum, WebGLTexImageFunc func)
{
const char* name = NameFrom(glenum);
const char* name = WebGLContext::EnumName(glenum);
if (name)
ctx->ErrorInvalidEnum("%s: %s %s", InfoFrom(func), msg, name);
else
@ -604,7 +542,7 @@ WebGLContext::ValidateTexImageFormat(GLenum format, WebGLTexImageFunc func)
bool validFormat = IsExtensionEnabled(WebGLExtensionID::WEBGL_depth_texture);
if (!validFormat)
ErrorInvalidEnum("%s: invalid format %s: need WEBGL_depth_texture enabled",
InfoFrom(func), NameFrom(format));
InfoFrom(func), WebGLContext::EnumName(format));
return validFormat;
}
@ -615,7 +553,7 @@ WebGLContext::ValidateTexImageFormat(GLenum format, WebGLTexImageFunc func)
bool validFormat = IsExtensionEnabled(WebGLExtensionID::EXT_sRGB);
if (!validFormat)
ErrorInvalidEnum("%s: invalid format %s: need EXT_sRGB enabled",
InfoFrom(func), NameFrom(format));
InfoFrom(func), WebGLContext::EnumName(format));
return validFormat;
}
@ -627,7 +565,7 @@ WebGLContext::ValidateTexImageFormat(GLenum format, WebGLTexImageFunc func)
bool validFormat = IsExtensionEnabled(WebGLExtensionID::WEBGL_compressed_texture_atc);
if (!validFormat)
ErrorInvalidEnum("%s: invalid format %s: need WEBGL_compressed_texture_atc enabled",
InfoFrom(func), NameFrom(format));
InfoFrom(func), WebGLContext::EnumName(format));
return validFormat;
}
@ -636,7 +574,7 @@ WebGLContext::ValidateTexImageFormat(GLenum format, WebGLTexImageFunc func)
bool validFormat = IsExtensionEnabled(WebGLExtensionID::WEBGL_compressed_texture_etc1);
if (!validFormat)
ErrorInvalidEnum("%s: invalid format %s: need WEBGL_compressed_texture_etc1 enabled",
InfoFrom(func), NameFrom(format));
InfoFrom(func), WebGLContext::EnumName(format));
return validFormat;
}
@ -649,7 +587,7 @@ WebGLContext::ValidateTexImageFormat(GLenum format, WebGLTexImageFunc func)
bool validFormat = IsExtensionEnabled(WebGLExtensionID::WEBGL_compressed_texture_pvrtc);
if (!validFormat)
ErrorInvalidEnum("%s: invalid format %s: need WEBGL_compressed_texture_pvrtc enabled",
InfoFrom(func), NameFrom(format));
InfoFrom(func), WebGLContext::EnumName(format));
return validFormat;
}
@ -662,7 +600,7 @@ WebGLContext::ValidateTexImageFormat(GLenum format, WebGLTexImageFunc func)
bool validFormat = IsExtensionEnabled(WebGLExtensionID::WEBGL_compressed_texture_s3tc);
if (!validFormat)
ErrorInvalidEnum("%s: invalid format %s: need WEBGL_compressed_texture_s3tc enabled",
InfoFrom(func), NameFrom(format));
InfoFrom(func), WebGLContext::EnumName(format));
return validFormat;
}
@ -716,7 +654,7 @@ WebGLContext::ValidateTexImageType(GLenum type, WebGLTexImageFunc func)
bool validType = IsExtensionEnabled(WebGLExtensionID::OES_texture_float);
if (!validType)
ErrorInvalidEnum("%s: invalid type %s: need OES_texture_float enabled",
InfoFrom(func), NameFrom(type));
InfoFrom(func), WebGLContext::EnumName(type));
return validType;
}
@ -725,7 +663,7 @@ WebGLContext::ValidateTexImageType(GLenum type, WebGLTexImageFunc func)
bool validType = IsExtensionEnabled(WebGLExtensionID::OES_texture_half_float);
if (!validType)
ErrorInvalidEnum("%s: invalid type %s: need OES_texture_half_float enabled",
InfoFrom(func), NameFrom(type));
InfoFrom(func), WebGLContext::EnumName(type));
return validType;
}
@ -737,7 +675,7 @@ WebGLContext::ValidateTexImageType(GLenum type, WebGLTexImageFunc func)
bool validType = IsExtensionEnabled(WebGLExtensionID::WEBGL_depth_texture);
if (!validType)
ErrorInvalidEnum("%s: invalid type %s: need WEBGL_depth_texture enabled",
InfoFrom(func), NameFrom(type));
InfoFrom(func), WebGLContext::EnumName(type));
return validType;
}
@ -1244,7 +1182,7 @@ WebGLContext::ValidateTexImageFormatAndType(GLenum format, GLenum type, WebGLTex
if (!validCombo)
ErrorInvalidOperation("%s: invalid combination of format %s and type %s",
InfoFrom(func), NameFrom(format), NameFrom(type));
InfoFrom(func), WebGLContext::EnumName(format), WebGLContext::EnumName(type));
return validCombo;
}
@ -1366,14 +1304,14 @@ WebGLContext::ValidateTexImage(GLuint dims, GLenum target,
WebGLTexture* tex = activeBoundTextureForTarget(target);
if (!tex) {
ErrorInvalidOperation("%s: no texture is bound to target %s",
info, NameFrom(target));
info, WebGLContext::EnumName(target));
return false;
}
if (IsSubFunc(func)) {
if (!tex->HasImageInfoAt(target, level)) {
ErrorInvalidOperation("%s: no texture image previously defined for target %s at level %d",
info, NameFrom(target), level);
info, WebGLContext::EnumName(target), level);
return false;
}
@ -1404,14 +1342,14 @@ WebGLContext::ValidateTexImage(GLuint dims, GLenum target,
format == LOCAL_GL_DEPTH_STENCIL))
{
ErrorInvalidOperation("%s: with format of %s target must be TEXTURE_2D",
info, NameFrom(format));
info, WebGLContext::EnumName(format));
return false;
}
/* Additional checks for compressed textures */
if (!IsAllowedFromSource(format, func)) {
ErrorInvalidOperation("%s: Invalid format %s for this operation",
info, NameFrom(format));
info, WebGLContext::EnumName(format));
return false;
}

Просмотреть файл

@ -604,4 +604,16 @@ WebGLElementArrayCache::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
uint32TreeSize;
}
bool
WebGLElementArrayCache::BeenUsedWithMultipleTypes() const
{
// C++ Standard ($4.7)
// "If the source type is bool, the value false is converted to zero and
// the value true is converted to one."
const int num_types_used = (mUint8Tree != nullptr) +
(mUint16Tree != nullptr) +
(mUint32Tree != nullptr);
return num_types_used > 1;
}
} // end namespace mozilla

Просмотреть файл

@ -47,6 +47,8 @@ public:
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
bool BeenUsedWithMultipleTypes() const;
private:
template<typename T>

Просмотреть файл

@ -289,7 +289,7 @@ HTMLLinkElement::UpdateImport()
return;
}
if (!Preferences::GetBool("dom.webcomponents.enabled")) {
if (!nsStyleLinkElement::IsImportEnabled()) {
// For now imports are hidden behind a pref...
return;
}

Просмотреть файл

@ -213,6 +213,7 @@ static const char* const gOmxTypes[] = {
"audio/amr",
"video/mp4",
"video/3gpp",
"video/3gpp2",
"video/quicktime",
#ifdef MOZ_OMX_WEBM_DECODER
"video/webm",

Просмотреть файл

@ -3,4 +3,4 @@ skip-if = e10s
support-files = seek.webm seek.webm^headers^
[test_MediaSource.html]
skip-if = buildapp == 'b2g' # b2g( ReferenceError: MediaSource is not defined) b2g-debug( ReferenceError: MediaSource is not defined) b2g-desktop( ReferenceError: MediaSource is not defined)
skip-if = buildapp == 'b2g' # b2g( ReferenceError: MediaSource is not defined)

Просмотреть файл

@ -18,6 +18,18 @@ var gSmallTests = [
{ name:"bogus.duh", type:"bogus/duh" }
];
if (SpecialPowers.Services.appinfo.name != "B2G") {
// We only run mochitests on b2g desktop and b2g emulator. The 3gp codecs
// aren't present on desktop, and the emulator codecs (which are different
// from the real device codecs) don't pass all of our tests, so we need
// to disable them.
gSmallTests = gSmallTests.concat([
{ name:"sample.3gp", type:"video/3gpp", duration:4.933 },
{ name:"sample.3g2", type:"video/3gpp2", duration:4.933 }
]);
}
// Used by test_bug654550.html, for videoStats preference
var gVideoTests = [
{ name:"320x240.ogv", type:"video/ogg", width:320, height:240, duration:0.266 },

Просмотреть файл

@ -22,8 +22,7 @@
# do ok(true, "Type not supported") and stop the test.
[DEFAULT]
#bug 918299
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug))
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug,b2g-desktop(bug 918299)
support-files =
320x240.ogv
320x240.ogv^headers^
@ -204,6 +203,8 @@ support-files =
redirect.sjs
referer.sjs
region.vtt
sample.3gp
sample.3g2
seek.ogv
seek.ogv^headers^
seek.webm
@ -298,28 +299,43 @@ support-files =
[test_aspectratio_mp4.html]
[test_audio1.html]
[test_audio2.html]
[test_audioDocumentTitle.html]
skip-if = true # bug 475110
[test_autoplay.html]
[test_autoplay_contentEditable.html]
skip-if = buildapp == 'b2g' # bug 899074 - timeouts
[test_buffered.html]
skip-if = toolkit == 'android' || os == "win" || (toolkit == 'gonk' && !debug) # See bug 832768 and 864682, b2g(assertion failures)
[test_bug448534.html]
skip-if = buildapp == 'b2g' # b2g(Timed out, bug 894922? Bug 902677 is for the timing out of a lot of media tests) b2g-debug(Timed out, bug 894922? Bug 902677 is for the timing out of a lot of media tests) b2g-desktop(Timed out, bug 894922? Bug 902677 is for the timing out of a lot of media tests)
skip-if = buildapp == 'b2g' # b2g(Timed out, bug 894922? Bug 902677 is for the timing out of a lot of media tests)
[test_bug463162.xhtml]
[test_bug465498.html]
skip-if = os == "win" || (toolkit == 'gonk' && !debug) # See bug 832768 and 864682
[test_bug493187.html]
skip-if = os == "win" || (toolkit == 'gonk' && !debug) # See bug 707777
[test_bug495145.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(timed out) b2g-desktop(timed out)
[test_bug495300.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug))
[test_bug654550.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(timed out) b2g-desktop(timed out)
[test_bug686942.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(timed out) b2g-desktop(timed out)
# [test_bug726904.html] # disabled - See bug 754860
[test_bug726904.html]
skip-if = true # bug 754860
[test_bug874897.html]
[test_bug883173.html]
[test_bug895305.html]
[test_bug895091.html]
[test_bug895305.html]
[test_bug919265.html]
[test_bug957847.html]
[test_can_play_type.html]
[test_can_play_type_mpeg.html]
skip-if = buildapp == 'b2g' # b2g(7 failures out of 27)
[test_can_play_type_no_ogg.html]
[test_can_play_type_ogg.html]
skip-if = buildapp == 'b2g' || e10s
[test_chaining.html]
skip-if = buildapp == 'b2g' # b2g(timed out) b2g-debug(timed out) b2g-desktop(timed out)
skip-if = buildapp == 'b2g' # timeouts
[test_clone_media_element.html]
[test_closing_connections.html]
[test_constants.html]
[test_contentDuration1.html]
[test_contentDuration2.html]
[test_contentDuration3.html]
@ -327,169 +343,132 @@ skip-if = buildapp == 'b2g' # b2g(timed out) b2g-debug(timed out) b2g-desktop(ti
[test_contentDuration5.html]
[test_contentDuration6.html]
[test_contentDuration7.html]
[test_can_play_type.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(timed out) b2g-desktop(timed out)
[test_can_play_type_mpeg.html]
skip-if = buildapp == 'b2g' # b2g(7 failures out of 27) b2g-debug(7 failures out of 27) b2g-desktop(7 failures out of 27)
[test_can_play_type_ogg.html]
skip-if = buildapp == 'b2g' || e10s
[test_can_play_type_no_ogg.html]
[test_closing_connections.html]
[test_constants.html]
[test_controls.html]
[test_currentTime.html]
[test_decode_error.html]
[test_decoder_disable.html]
[test_defaultMuted.html]
[test_delay_load.html]
skip-if = buildapp == 'b2g' # b2g(6 failures) b2g-debug(6 failures) b2g-desktop(6 failures)
skip-if = buildapp == 'b2g' # b2g(6 failures)
[test_error_in_video_document.html]
skip-if = true # bug 608634
[test_error_on_404.html]
skip-if = buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(timed out) b2g-desktop(timed out)
[test_fastSeek.html]
[test_info_leak.html]
skip-if = buildapp == 'b2g' # b2g(2 failures) b2g-debug(2 failures) b2g-desktop(2 failures)
skip-if = buildapp == 'b2g' # b2g(2 failures)
[test_invalid_reject.html]
[test_load.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(Timed out after gizmo.mp4) b2g-desktop(Timed out after gizmo.mp4)
[test_load_candidates.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(timed out) b2g-desktop(timed out)
[test_load_same_resource.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug))
[test_load_source.html]
[test_loop.html]
[test_media_selection.html]
skip-if = os == "win" || (toolkit == 'gonk' && !debug) # See bug 897843, b2g(timed out)
[test_media_sniffer.html]
[test_mediarecorder_avoid_recursion.html]
[test_mediarecorder_creation.html]
[test_mediarecorder_creation_fail.html]
[test_mediarecorder_getencodeddata.html]
[test_mediarecorder_record_4ch_audiocontext.html]
skip-if = (toolkit == 'gonk' && !debug)
[test_mediarecorder_record_audiocontext.html]
[test_mediarecorder_record_audiocontext_mlk.html]
[test_mediarecorder_record_gum_video_timeslice.html]
skip-if = buildapp == 'b2g' || (toolkit == 'android') # mimetype check, bug 969289
[test_mediarecorder_record_immediate_stop.html]
[test_mediarecorder_record_no_timeslice.html]
[test_mediarecorder_record_nosrc.html]
[test_mediarecorder_record_session.html]
[test_mediarecorder_record_startstopstart.html]
[test_mediarecorder_record_stopms.html]
[test_mediarecorder_record_timeslice.html]
[test_mediarecorder_reload_crash.html]
[test_mediarecorder_unsupported_src.html]
[test_metadata.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug))
[test_no_load_event.html]
[test_mixed_principals.html]
skip-if = true # bug 567954 and 574586
[test_mozHasAudio.html]
[test_networkState.html]
[test_new_audio.html]
[test_no_load_event.html]
[test_paused.html]
[test_paused_after_ended.html]
[test_play_events.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(Last event should be canplaythrough for gizmo.mp4 - got playing, expected canplaythrough) b2g-desktop(Last event should be canplaythrough for gizmo.mp4 - got playing, expected canplaythrough)
[test_play_events_2.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(Last event should be canplaythrough for gizmo.mp4 - got playing, expected canplaythrough) b2g-desktop(Last event should be canplaythrough for gizmo.mp4 - got playing, expected canplaythrough)
[test_playback_errors.html]
[test_seekable1.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug))
[test_preload_actions.html]
[test_preload_attribute.html]
[test_progress.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(bug 901716 - timeouts) b2g-desktop(bug 901716 - timeouts)
[test_reactivate.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) # b2g-debug(timed out in small-shot.mp3) b2g-desktop(timed out in small-shot.mp3)
[test_readyState.html]
[test_referer.html]
[test_reset_events_async.html]
[test_replay_metadata.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug))
[test_seek2.html]
[test_seek_out_of_range.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug))
[test_seekable2.html]
[test_seekable3.html]
skip-if = buildapp == 'b2g' # b2g(timed out) b2g-debug(timed out) b2g-desktop(timed out)
[test_source.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug))
[test_source_write.html]
[test_source_null.html]
[test_standalone.html]
[test_volume.html]
[test_video_to_canvas.html]
[test_mediarecorder_creation.html]
[test_mediarecorder_creation_fail.html]
[test_mediarecorder_avoid_recursion.html]
[test_mediarecorder_record_timeslice.html]
[test_mediarecorder_record_audiocontext.html]
[test_mediarecorder_record_audiocontext_mlk.html]
[test_mediarecorder_record_4ch_audiocontext.html]
skip-if = (toolkit == 'gonk' && !debug)
[test_mediarecorder_record_stopms.html]
[test_mediarecorder_record_nosrc.html]
[test_mozHasAudio.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug))
[test_source_media.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug))
[test_autoplay_contentEditable.html]
skip-if = buildapp == 'b2g' # b2g(bug 899074 - timeouts) b2g-debug(bug 899074 - timeouts) b2g-desktop(bug 899074 - timeouts)
[test_decoder_disable.html]
[test_mediarecorder_record_no_timeslice.html]
[test_mediarecorder_reload_crash.html]
[test_mediarecorder_record_immediate_stop.html]
[test_mediarecorder_record_session.html]
[test_mediarecorder_record_startstopstart.html]
[test_mediarecorder_getencodeddata.html]
[test_mediarecorder_unsupported_src.html]
[test_mediarecorder_record_gum_video_timeslice.html]
skip-if = buildapp == 'b2g' || (toolkit == 'android') # mimetype check, bug 969289
[test_playback.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' # Disabled on Android & B2G due to bug 668973
[test_seekLies.html]
[test_media_sniffer.html]
[test_streams_srcObject.html]
[test_reset_src.html]
[test_streams_autoplay.html]
[test_streams_element_capture.html]
[test_streams_element_capture_reset.html]
skip-if = buildapp == 'b2g' # b2g(bug 901102) b2g-debug(bug 901102) b2g-desktop(bug 901102)
[test_streams_element_capture_createObjectURL.html]
[test_streams_element_capture_playback.html]
[test_streams_gc.html]
skip-if = buildapp == 'b2g' # b2g(Value being assigned to HTMLMediaElement.currentTime is not a finite floating-point value) b2g-debug(Value being assigned to HTMLMediaElement.currentTime is not a finite floating-point value) b2g-desktop(Value being assigned to HTMLMediaElement.currentTime is not a finite floating-point value)
[test_streams_tracks.html]
[test_trackelementevent.html]
[test_texttrack.html]
[test_texttrackcue.html]
[test_trackevent.html]
[test_texttrackregion.html]
[test_texttracklist.html]
[test_timeupdate_small_files.html]
[test_unseekable.html]
skip-if = buildapp == 'b2g'
[test_VideoPlaybackQuality.html]
[test_VideoPlaybackQuality_disabled.html]
[test_webvtt_disabled.html]
# [test_audioDocumentTitle.html] # disabled - See bug 475110
# [test_error_in_video_document.html] # disabled - See bug 608634
# [test_mixed_principals.html] # disabled - See bug 567954 and 574586
# [test_playback_rate_playpause.html] # disabled - See bug 897108
# [test_played.html] # disabled - See bug 751539
# [test_preload_suspend.html] # disabled - See bug 493692
# [test_resume.html] # disabled - No bug :-(
# [test_videoDocumentTitle.html] # disabled - See bug 492821
# [test_playback_rate.html] # disabled - See bug 921622
# Disabled since it causes random memory corruption, bug 921622, so
# the best-case scenario is that it results in random crashes while it
# runs, like bug 918417, bug 920827, bug 923996, bug 928225, bug 929521
# bug 930982, bug 932193. Worst-case but quite likely, it causes random
# crashes and failures in other tests which run after it. Don't even think
# about reenabling it on any platform unless you *know* that you have fixed
# that. Then don't think about reenabling it on Windows until you know that
# you have fixed the timeouts of bug 832768, bug 814533, bug 840742
[test_play_twice.html]
# Seamonkey: Bug 598252, B2G: Bug 982100, Android: Bug 758476, bug 981086
skip-if = appname == "seamonkey" || toolkit == 'gonk' || toolkit == 'android'
[test_buffered.html]
skip-if = toolkit == 'android' || os == "win" || (toolkit == 'gonk' && !debug) # See bug 832768 and 864682, b2g(assertion failures)
[test_bug465498.html]
skip-if = os == "win" || (toolkit == 'gonk' && !debug) # See bug 832768 and 864682
[test_bug493187.html]
skip-if = os == "win" || (buildapp=='b2g'&&debug) || (toolkit == 'gonk' && !debug) # See bug 707777, #b2g-emulator-debug - process crash
[test_media_selection.html]
skip-if = os == "win" || (toolkit == 'gonk' && !debug) # See bug 897843, b2g(timed out)
[test_playback.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' # Disabled on Android & B2G due to bug 668973
[test_playback_errors.html]
[test_playback_rate.html]
# Win: Bug 814533, B2G & Android Debug: Bug 1020538
skip-if = os == 'win' || buildapp == 'b2g' || (toolkit == 'android' && debug)
[test_playback_rate_playpause.html]
skip-if = true # bug 897108
[test_played.html]
skip-if = true # bug 751539
[test_preload_actions.html]
[test_preload_attribute.html]
[test_preload_suspend.html]
skip-if = true # bug 493692
[test_progress.html]
[test_reactivate.html]
[test_readyState.html]
[test_referer.html]
[test_replay_metadata.html]
[test_reset_events_async.html]
[test_reset_src.html]
[test_resume.html]
skip-if = true # disabled - No bug :-(
[test_seek_out_of_range.html]
[test_seek.html]
skip-if = toolkit == 'android' || (toolkit == 'gonk' && !debug) # See bug 832678, 795271, and 857424 # android(bug 845162) androidx86(bug 845162)
[test_seek2.html]
[test_seekable1.html]
[test_seekable2.html]
[test_seekable3.html]
skip-if = buildapp == 'b2g' # timeouts
[test_seekLies.html]
[test_source.html]
[test_source_media.html]
[test_source_null.html]
[test_source_write.html]
[test_standalone.html]
[test_streams_autoplay.html]
[test_streams_element_capture.html]
[test_streams_element_capture_createObjectURL.html]
[test_streams_element_capture_playback.html]
[test_streams_element_capture_reset.html]
skip-if = buildapp == 'b2g' # bug 901102
[test_streams_gc.html]
skip-if = buildapp == 'b2g' # Value being assigned to HTMLMediaElement.currentTime is not a finite floating-point value
[test_streams_srcObject.html]
[test_streams_tracks.html]
[test_texttrack.html]
[test_texttrackcue.html]
[test_texttracklist.html]
[test_texttrackregion.html]
[test_timeupdate_small_files.html]
[test_trackelementevent.html]
[test_trackevent.html]
[test_unseekable.html]
skip-if = buildapp == 'b2g'
[test_video_to_canvas.html]
[test_videoDocumentTitle.html]
skip-if = true # bug 492821
[test_VideoPlaybackQuality.html]
[test_VideoPlaybackQuality_disabled.html]
[test_volume.html]
[test_webvtt_disabled.html]
# The tests below contain backend-specific tests. Write backend independent
# tests rather than adding to this list.
[test_can_play_type_webm.html]
run-if = webm
[test_can_play_type_no_webm.html]
skip-if = webm
[test_can_play_type_wave.html]
run-if = wave
[test_can_play_type_no_wave.html]

Двоичные данные
content/media/test/sample.3g2 Normal file

Двоичный файл не отображается.

Двоичные данные
content/media/test/sample.3gp Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -10,12 +10,19 @@
<pre id="test">
<script class="testbody" type='application/javascript;version=1.8'>
SimpleTest.expectAssertions(0, 2);
// In varying quantities:
// ASSERTION: Should be on state machine or decode thread.:
// 'OnStateMachineThread() || OnDecodeThread()',
// file MediaDecoderStateMachine.cpp, line 559
// ASSERTION: Clock should go forwards if the playback rate is > 0.:
// 'mCurrentFrameTime <= clock_time || mPlaybackRate <= 0',
// file MediaDecoderStateMachine.cpp, line 2379
// This test is currently disabled on Android debug for wildly-varying numbers of the above.
SimpleTest.expectAssertions(5, 9);
if (navigator.platform.startsWith("Win")) {
SimpleTest.expectAssertions(0, 1);
SimpleTest.expectAssertions(4, 5);
} else if (navigator.platform.startsWith("Mac")) {
SimpleTest.expectAssertions(0, 2);
SimpleTest.expectAssertions(5, 7);
}
let manager = new MediaTestManager;

Просмотреть файл

@ -1,5 +1,5 @@
[DEFAULT]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) #b2g-debug(bug 916135) b2g-desktop(bug 916135)
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) #b2g-debug,b2g-desktop(bug 916135)
support-files =
audio-expected.wav
audio-mono-expected-2.wav
@ -23,11 +23,8 @@ support-files =
ting-48k-2ch.wav
webaudio.js
[test_AudioBuffer.html]
[test_AudioContext.html]
[test_AudioListener.html]
[test_OfflineAudioContext.html]
[test_analyserNode.html]
[test_AudioBuffer.html]
[test_audioBufferSourceNode.html]
[test_audioBufferSourceNodeEnded.html]
[test_audioBufferSourceNodeLazyLoopParam.html]
@ -39,14 +36,17 @@ support-files =
[test_audioBufferSourceNodeNullBuffer.html]
[test_audioBufferSourceNodeOffset.html]
skip-if = (toolkit == 'gonk' && !debug) #bug 906752
[test_AudioContext.html]
[test_audioDestinationNode.html]
[test_AudioListener.html]
[test_audioParamExponentialRamp.html]
[test_audioParamGain.html]
[test_audioParamLinearRamp.html]
[test_audioParamSetCurveAtTime.html]
[test_audioParamSetCurveAtTimeZeroDuration.html]
[test_audioParamSetTargetAtTime.html]
[test_audioParamSetValueAtTime.html]
[test_audioParamTimelineDestinationOffset.html]
[test_audioParamGain.html]
[test_badConnect.html]
[test_biquadFilterNode.html]
[test_biquadFilterNodeWithGain.html]
@ -72,9 +72,9 @@ skip-if = (toolkit == 'gonk' && !debug) #bug 906752
[test_channelSplitterNode.html]
[test_channelSplitterNodeWithVolume.html]
[test_convolverNode.html]
[test_convolverNode_mono_mono.html]
[test_convolverNodeChannelCount.html]
[test_convolverNodeWithGain.html]
[test_convolverNode_mono_mono.html]
[test_currentTime.html]
[test_decodeMultichannel.html]
[test_delayNode.html]
@ -98,7 +98,10 @@ skip-if = (toolkit == 'gonk' && !debug) #bug 906752
[test_mediaStreamAudioSourceNodeCrossOrigin.html]
[test_mediaStreamAudioSourceNodeResampling.html]
[test_mixingRules.html]
[test_mozaudiochannel.html]
skip-if = (toolkit == 'gonk' && !debug)
[test_nodeToParamConnection.html]
[test_OfflineAudioContext.html]
[test_offlineDestinationChannelCountLess.html]
[test_offlineDestinationChannelCountMore.html]
[test_oscillatorNode.html]
@ -106,22 +109,19 @@ skip-if = (toolkit == 'gonk' && !debug) #bug 906752
[test_oscillatorNodeStart.html]
[test_oscillatorTypeChange.html]
[test_pannerNode.html]
[test_pannerNode_equalPower.html]
[test_pannerNodeAbove.html]
[test_pannerNodeChannelCount.html]
[test_pannerNodeHRTFSymmetry.html]
[test_pannerNodeTail.html]
[test_pannerNode_equalPower.html]
[test_periodicWave.html]
[test_scriptProcessorNode.html]
[test_scriptProcessorNodeChannelCount.html]
[test_scriptProcessorNodeZeroInputOutput.html]
[test_scriptProcessorNodeNotConnected.html]
[test_stereoPanningWithGain.html]
[test_singleSourceDest.html]
[test_stereoPanningWithGain.html]
[test_waveDecoder.html]
[test_waveShaper.html]
[test_waveShaperNoCurve.html]
[test_waveShaperZeroLengthCurve.html]
[test_audioDestinationNode.html]
[test_mozaudiochannel.html]
skip-if = (toolkit == 'gonk' && !debug)
[test_waveDecoder.html]

Просмотреть файл

@ -10,10 +10,10 @@ support-files =
[test_audio_capture_error.html]
[test_call_start_from_end_handler.html]
[test_nested_eventloop.html]
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(showmodaldialog) b2g-debug(showmodaldialog) b2g-desktop(showmodaldialog)
skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s # b2g(showmodaldialog)
[test_preference_enable.html]
[test_recognition_service_error.html]
skip-if = buildapp == 'b2g' # b2g(timed out) b2g-debug(timed out) b2g-desktop(timed out)
skip-if = buildapp == 'b2g' # b2g(timed out)
[test_success_without_recognition_service.html]
[test_timeout.html]
skip-if = os == "win"

Просмотреть файл

@ -8,6 +8,6 @@ support-files =
[test_setup.html]
[test_speech_queue.html]
skip-if = buildapp == 'b2g' # b2g(Test timed out) b2g-debug(Test timed out) b2g-desktop(Test timed out)
skip-if = buildapp == 'b2g' # b2g(Test timed out)
[test_speech_simple.html]
skip-if = buildapp == 'b2g' # b2g(Test timed out) b2g-debug(Test timed out) b2g-desktop(Test timed out)
skip-if = buildapp == 'b2g' # b2g(Test timed out)

Просмотреть файл

@ -65,6 +65,21 @@ SVGDocument::GetRootElement(ErrorResult& aRv)
return static_cast<nsSVGElement*>(root);
}
nsresult
SVGDocument::InsertChildAt(nsIContent* aKid, uint32_t aIndex, bool aNotify)
{
nsresult rv = XMLDocument::InsertChildAt(aKid, aIndex, aNotify);
if (NS_SUCCEEDED(rv) && aKid->IsElement() && !aKid->IsSVG()) {
// We can get here when well formed XML with a non-SVG root element is
// served with the SVG MIME type, for example. In that case we need to load
// the non-SVG UA sheets or else we can get bugs like bug 1016145.
EnsureNonSVGUserAgentStyleSheetsLoaded();
}
return rv;
}
nsresult
SVGDocument::Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const
{

Просмотреть файл

@ -28,6 +28,8 @@ public:
mType = eSVG;
}
virtual nsresult InsertChildAt(nsIContent* aKid, uint32_t aIndex,
bool aNotify) MOZ_OVERRIDE;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
// WebIDL API

Просмотреть файл

@ -19,7 +19,6 @@
#include "nsIDocShellTreeItem.h"
#include "nsIURI.h"
#include "nsIContentViewer.h"
#include "nsICacheService.h"
#include "nsIObserverService.h"
#include "prclist.h"
#include "mozilla/Services.h"
@ -190,7 +189,7 @@ nsSHistoryObserver::Observe(nsISupports *aSubject, const char *aTopic,
if (!strcmp(aTopic, NS_PREFBRANCH_PREFCHANGE_TOPIC_ID)) {
nsSHistory::UpdatePrefs();
nsSHistory::GloballyEvictContentViewers();
} else if (!strcmp(aTopic, NS_CACHESERVICE_EMPTYCACHE_TOPIC_ID) ||
} else if (!strcmp(aTopic, "cacheservice:empty-cache") ||
!strcmp(aTopic, "memory-pressure")) {
nsSHistory::GloballyEvictAllContentViewers();
}
@ -370,7 +369,7 @@ nsSHistory::Startup()
// Observe empty-cache notifications so tahat clearing the disk/memory
// cache will also evict all content viewers.
obsSvc->AddObserver(gObserver,
NS_CACHESERVICE_EMPTYCACHE_TOPIC_ID, false);
"cacheservice:empty-cache", false);
// Same for memory-pressure notifications
obsSvc->AddObserver(gObserver, "memory-pressure", false);
@ -391,7 +390,7 @@ nsSHistory::Shutdown()
nsCOMPtr<nsIObserverService> obsSvc =
mozilla::services::GetObserverService();
if (obsSvc) {
obsSvc->RemoveObserver(gObserver, NS_CACHESERVICE_EMPTYCACHE_TOPIC_ID);
obsSvc->RemoveObserver(gObserver, "cacheservice:empty-cache");
obsSvc->RemoveObserver(gObserver, "memory-pressure");
}
NS_RELEASE(gObserver);

Просмотреть файл

@ -4,6 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "MessageChannel.h"
#include "mozilla/Preferences.h"
#include "mozilla/dom/MessageChannelBinding.h"
#include "mozilla/dom/MessagePort.h"
@ -28,16 +29,38 @@ namespace {
}
/* static */ bool
MessageChannel::PrefEnabled()
MessageChannel::Enabled(JSContext* aCx, JSObject* aObj)
{
if (!gPrefInitialized) {
Preferences::AddBoolVarCache(&gPrefEnabled, "dom.messageChannel.enabled");
gPrefInitialized = true;
}
return gPrefEnabled;
// Enabled by pref
if (gPrefEnabled) {
return true;
}
// Chrome callers are allowed.
if (nsContentUtils::ThreadsafeIsCallerChrome()) {
return true;
}
nsCOMPtr<nsIPrincipal> principal = nsContentUtils::SubjectPrincipal();
MOZ_ASSERT(principal);
nsCOMPtr<nsIURI> uri;
if (NS_FAILED(principal->GetURI(getter_AddRefs(uri))) || !uri) {
return false;
}
bool isResource = false;
if (NS_FAILED(uri->SchemeIs("resource", &isResource))) {
return false;
}
return isResource;
}
MessageChannel::MessageChannel(nsPIDOMWindow* aWindow)

Просмотреть файл

@ -28,7 +28,7 @@ public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MessageChannel)
static bool PrefEnabled();
static bool Enabled(JSContext* aCx, JSObject* aGlobal);
public:
MessageChannel(nsPIDOMWindow* aWindow);

Просмотреть файл

@ -7905,7 +7905,7 @@ PostMessageReadTransferStructuredClone(JSContext* aCx,
StructuredCloneInfo* scInfo = static_cast<StructuredCloneInfo*>(aClosure);
NS_ASSERTION(scInfo, "Must have scInfo!");
if (MessageChannel::PrefEnabled() && tag == SCTAG_DOM_MAP_MESSAGEPORT) {
if (tag == SCTAG_DOM_MAP_MESSAGEPORT) {
MessagePort* port = static_cast<MessagePort*>(aData);
port->BindToOwner(scInfo->window);
scInfo->ports.Put(port, nullptr);
@ -7934,26 +7934,24 @@ PostMessageTransferStructuredClone(JSContext* aCx,
StructuredCloneInfo* scInfo = static_cast<StructuredCloneInfo*>(aClosure);
NS_ASSERTION(scInfo, "Must have scInfo!");
if (MessageChannel::PrefEnabled()) {
MessagePortBase* port = nullptr;
nsresult rv = UNWRAP_OBJECT(MessagePort, aObj, port);
if (NS_SUCCEEDED(rv)) {
nsRefPtr<MessagePortBase> newPort;
if (scInfo->ports.Get(port, getter_AddRefs(newPort))) {
// No duplicate.
return false;
}
newPort = port->Clone();
scInfo->ports.Put(port, newPort);
*aTag = SCTAG_DOM_MAP_MESSAGEPORT;
*aOwnership = JS::SCTAG_TMO_CUSTOM;
*aContent = newPort;
*aExtraData = 0;
return true;
MessagePortBase* port = nullptr;
nsresult rv = UNWRAP_OBJECT(MessagePort, aObj, port);
if (NS_SUCCEEDED(rv)) {
nsRefPtr<MessagePortBase> newPort;
if (scInfo->ports.Get(port, getter_AddRefs(newPort))) {
// No duplicate.
return false;
}
newPort = port->Clone();
scInfo->ports.Put(port, newPort);
*aTag = SCTAG_DOM_MAP_MESSAGEPORT;
*aOwnership = JS::SCTAG_TMO_CUSTOM;
*aContent = newPort;
*aExtraData = 0;
return true;
}
return false;
@ -7966,7 +7964,7 @@ PostMessageFreeTransferStructuredClone(uint32_t aTag, JS::TransferableOwnership
StructuredCloneInfo* scInfo = static_cast<StructuredCloneInfo*>(aClosure);
NS_ASSERTION(scInfo, "Must have scInfo!");
if (MessageChannel::PrefEnabled() && aTag == SCTAG_DOM_MAP_MESSAGEPORT) {
if (aTag == SCTAG_DOM_MAP_MESSAGEPORT) {
nsRefPtr<MessagePortBase> port(static_cast<MessagePort*>(aContent));
scInfo->ports.Remove(port);
}

Просмотреть файл

@ -967,6 +967,7 @@ public:
void SizeToContent(mozilla::ErrorResult& aError);
nsIDOMCrypto* GetCrypto(mozilla::ErrorResult& aError);
nsIControllers* GetControllers(mozilla::ErrorResult& aError);
mozilla::dom::Element* GetRealFrameElement(mozilla::ErrorResult& aError);
float GetMozInnerScreenX(mozilla::ErrorResult& aError);
float GetMozInnerScreenY(mozilla::ErrorResult& aError);
float GetDevicePixelRatio(mozilla::ErrorResult& aError);
@ -1374,8 +1375,6 @@ protected:
nsGlobalWindow* InnerForSetTimeoutOrInterval(mozilla::ErrorResult& aError);
mozilla::dom::Element* GetRealFrameElement(mozilla::ErrorResult& aError);
void PostMessageMoz(JSContext* aCx, JS::Handle<JS::Value> aMessage,
const nsAString& aTargetOrigin,
JS::Handle<JS::Value> aTransfer,

Просмотреть файл

@ -8,6 +8,7 @@ support-files =
[test_domrequesthelper.xul]
[test_url.xul]
[test_console.xul]
[test_messageChannel.xul]
[test_navigator_resolve_identity_xrays.xul]
[test_sendQueryContentAndSelectionSetEvent.html]
[test_bug1016960.html]

Просмотреть файл

@ -0,0 +1,11 @@
<!DOCTYPE HTML>
<html>
<body>
<script type="application/javascript">
window.addEventListener('message', receiveMessage, false);
function receiveMessage(evt) {
evt.data.postMessage("Hello world");
}
</script>
</body>

Просмотреть файл

@ -2,6 +2,7 @@
support-files =
audio.ogg
iframe_messageChannel_cloning.html
iframe_messageChannel_chrome.html
iframe_messageChannel_pingpong.html
iframe_messageChannel_post.html
file_empty.html

Просмотреть файл

@ -0,0 +1,38 @@
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
<window title="Test for MessageChannel API"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<!-- test results are displayed in the html:body -->
<body xmlns="http://www.w3.org/1999/xhtml" id="body">
</body>
<!-- test code goes here -->
<script type="application/javascript"><![CDATA[
ok("MessageChannel" in window, "Should MessageChannel exist?");
var channel = new MessageChannel();
ok(channel, "MessageChannel is created");
channel.port1.onmessage = function(evt) {
ok(true, "message received!");
SimpleTest.finish();
}
var ifr = document.createElement('browser');
ifr.setAttribute("src", "http://mochi.test:8888/tests/dom/base/test/iframe_messageChannel_chrome.html");
ifr.setAttribute("flex", "1");
ifr.addEventListener('load', function() {
ifr.contentWindow.postMessage(channel.port2, '*', [channel.port2]);
});
var body = document.getElementById("body");
body.appendChild(ifr);
SimpleTest.waitForExplicitFinish();
]]></script>
</window>

Просмотреть файл

@ -424,57 +424,6 @@ nsDOMCameraControl::SetFocusAreas(const Optional<Sequence<CameraRegion> >& aFocu
mCurrentConfiguration->mMaxFocusAreas);
}
static nsresult
GetSize(JSContext* aCx, JS::Value* aValue, const ICameraControl::Size& aSize)
{
JS::Rooted<JSObject*> o(aCx, JS_NewObject(aCx, nullptr, JS::NullPtr(), JS::NullPtr()));
if (!o) {
return NS_ERROR_OUT_OF_MEMORY;
}
JS::Rooted<JS::Value> v(aCx);
v = INT_TO_JSVAL(aSize.width);
if (!JS_SetProperty(aCx, o, "width", v)) {
return NS_ERROR_FAILURE;
}
v = INT_TO_JSVAL(aSize.height);
if (!JS_SetProperty(aCx, o, "height", v)) {
return NS_ERROR_FAILURE;
}
*aValue = JS::ObjectValue(*o);
return NS_OK;
}
/* attribute any pictureSize, deprecated */
JS::Value
nsDOMCameraControl::GetPictureSize(JSContext* cx, ErrorResult& aRv)
{
JS::Rooted<JS::Value> value(cx);
ICameraControl::Size size;
aRv = mCameraControl->Get(CAMERA_PARAM_PICTURE_SIZE, size);
if (aRv.Failed()) {
return value;
}
aRv = GetSize(cx, value.address(), size);
return value;
}
void
nsDOMCameraControl::SetPictureSize(JSContext* aCx, JS::Handle<JS::Value> aSize, ErrorResult& aRv)
{
CameraSize size;
if (!size.Init(aCx, aSize)) {
aRv = NS_ERROR_FAILURE;
return;
}
ICameraControl::Size s = { size.mWidth, size.mHeight };
aRv = mCameraControl->Set(CAMERA_PARAM_PICTURE_SIZE, s);
}
void
nsDOMCameraControl::GetPictureSize(CameraSize& aSize, ErrorResult& aRv)
{
@ -487,6 +436,7 @@ nsDOMCameraControl::GetPictureSize(CameraSize& aSize, ErrorResult& aRv)
aSize.mWidth = size.width;
aSize.mHeight = size.height;
}
void
nsDOMCameraControl::SetPictureSize(const CameraSize& aSize, ErrorResult& aRv)
{
@ -494,34 +444,6 @@ nsDOMCameraControl::SetPictureSize(const CameraSize& aSize, ErrorResult& aRv)
aRv = mCameraControl->Set(CAMERA_PARAM_PICTURE_SIZE, s);
}
/* attribute any thumbnailSize, deprecated */
JS::Value
nsDOMCameraControl::GetThumbnailSize(JSContext* aCx, ErrorResult& aRv)
{
JS::Rooted<JS::Value> value(aCx);
ICameraControl::Size size;
aRv = mCameraControl->Get(CAMERA_PARAM_THUMBNAILSIZE, size);
if (aRv.Failed()) {
return value;
}
aRv = GetSize(aCx, value.address(), size);
return value;
}
void
nsDOMCameraControl::SetThumbnailSize(JSContext* aCx, JS::Handle<JS::Value> aSize, ErrorResult& aRv)
{
CameraSize size;
if (!size.Init(aCx, aSize)) {
aRv = NS_ERROR_FAILURE;
return;
}
ICameraControl::Size s = { size.mWidth, size.mHeight };
aRv = mCameraControl->Set(CAMERA_PARAM_THUMBNAILSIZE, s);
}
void
nsDOMCameraControl::GetThumbnailSize(CameraSize& aSize, ErrorResult& aRv)
{
@ -534,6 +456,7 @@ nsDOMCameraControl::GetThumbnailSize(CameraSize& aSize, ErrorResult& aRv)
aSize.mWidth = size.width;
aSize.mHeight = size.height;
}
void
nsDOMCameraControl::SetThumbnailSize(const CameraSize& aSize, ErrorResult& aRv)
{

Просмотреть файл

@ -72,10 +72,6 @@ public:
void SetFocusMode(const nsAString& aMode, ErrorResult& aRv);
double GetZoom(ErrorResult& aRv);
void SetZoom(double aZoom, ErrorResult& aRv);
JS::Value GetPictureSize(JSContext* aCx, ErrorResult& aRv);
void SetPictureSize(JSContext* aCx, JS::Handle<JS::Value> aSize, ErrorResult& aRv);
JS::Value GetThumbnailSize(JSContext* aCx, ErrorResult& aRv);
void SetThumbnailSize(JSContext* aCx, JS::Handle<JS::Value> aSize, ErrorResult& aRv);
double GetFocalLength(ErrorResult& aRv);
double GetFocusDistanceNear(ErrorResult& aRv);
double GetFocusDistanceOptimum(ErrorResult& aRv);

Просмотреть файл

@ -317,7 +317,8 @@ public:
mStrength = SECKEY_PublicKeyStrength(mPubKey);
// Verify that the data input is not too big
// (as required by PKCS#1 / RFC 3447)
// (as required by PKCS#1 / RFC 3447, Section 7.2)
// http://tools.ietf.org/html/rfc3447#section-7.2
if (mData.Length() > mStrength - 11) {
mEarlyRv = NS_ERROR_DOM_DATA_ERR;
return;
@ -448,10 +449,12 @@ private:
// Compare the MAC to the provided signature
// No truncation allowed
bool equal = (mResult.Length() == mSignature.Length());
int cmp = NSS_SecureMemcmp(mSignature.Elements(),
mResult.Elements(),
mSignature.Length());
equal = equal && (cmp == 0);
if (equal) {
int cmp = NSS_SecureMemcmp(mSignature.Elements(),
mResult.Elements(),
mSignature.Length());
equal = (cmp == 0);
}
mResultPromise->MaybeResolve(equal);
}
}
@ -535,9 +538,13 @@ private:
rv = MapSECStatus(SGN_End(ctx, signature));
NS_ENSURE_SUCCESS(rv, NS_ERROR_DOM_OPERATION_ERR);
mSignature.Assign(signature);
ATTEMPT_BUFFER_ASSIGN(mSignature, signature);
} else {
ScopedSECItem signature(mSignature.ToSECItem());
if (!signature) {
return NS_ERROR_DOM_UNKNOWN_ERR;
}
ScopedVFYContext ctx(VFY_CreateContext(mPubKey, signature,
mOidTag, nullptr));
if (!ctx) {
@ -585,6 +592,7 @@ public:
nsString algName;
mEarlyRv = GetAlgorithmName(aCx, aAlgorithm, algName);
if (NS_FAILED(mEarlyRv)) {
mEarlyRv = NS_ERROR_DOM_SYNTAX_ERR;
return;
}
@ -937,32 +945,31 @@ private:
if (mResult.Length() == 0) {
return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
}
return NS_OK;
} else if (mFormat.EqualsLiteral(WEBCRYPTO_KEY_FORMAT_PKCS8)) {
if (!mPrivateKey) {
mEarlyRv = NS_ERROR_DOM_NOT_SUPPORTED_ERR;
return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
}
switch (mPrivateKey->keyType) {
case rsaKey:
Key::PrivateKeyToPkcs8(mPrivateKey.get(), mResult, locker);
mEarlyRv = NS_OK;
break;
return NS_OK;
default:
mEarlyRv = NS_ERROR_DOM_NOT_SUPPORTED_ERR;
return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
}
} else if (mFormat.EqualsLiteral(WEBCRYPTO_KEY_FORMAT_SPKI)) {
if (!mPublicKey) {
return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
}
mEarlyRv = Key::PublicKeyToSpki(mPublicKey.get(), mResult, locker);
return Key::PublicKeyToSpki(mPublicKey.get(), mResult, locker);
} else if (mFormat.EqualsLiteral(WEBCRYPTO_KEY_FORMAT_JWK)) {
mEarlyRv = NS_ERROR_DOM_NOT_SUPPORTED_ERR;
} else {
mEarlyRv = NS_ERROR_DOM_SYNTAX_ERR;
return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
}
return NS_OK;
return NS_ERROR_DOM_SYNTAX_ERR;
}
};
@ -988,6 +995,7 @@ public:
nsString algName;
mEarlyRv = GetAlgorithmName(aCx, aAlgorithm, algName);
if (NS_FAILED(mEarlyRv)) {
mEarlyRv = NS_ERROR_DOM_SYNTAX_ERR;
return;
}
@ -1001,6 +1009,7 @@ public:
mEarlyRv = Coerce(aCx, params, aAlgorithm);
if (NS_FAILED(mEarlyRv) || !params.mLength.WasPassed()) {
mEarlyRv = NS_ERROR_DOM_SYNTAX_ERR;
return;
}
mLength = params.mLength.Value();
@ -1026,6 +1035,7 @@ public:
Algorithm hashAlg;
mEarlyRv = Coerce(aCx, hashAlg, params.mHash.Value());
if (NS_FAILED(mEarlyRv) || !hashAlg.mName.WasPassed()) {
mEarlyRv = NS_ERROR_DOM_SYNTAX_ERR;
return;
}
hashName.Assign(hashAlg.mName.Value());
@ -1052,8 +1062,6 @@ public:
mMechanism = algorithm->Mechanism();
mKey->SetAlgorithm(algorithm);
// SetSymKey done in Resolve, after we've done the keygen
return;
}
private:
@ -1115,6 +1123,7 @@ public:
nsString algName;
mEarlyRv = GetAlgorithmName(aCx, aAlgorithm, algName);
if (NS_FAILED(mEarlyRv)) {
mEarlyRv = NS_ERROR_DOM_SYNTAX_ERR;
return;
}
@ -1127,8 +1136,8 @@ public:
if (NS_FAILED(mEarlyRv) || !params.mModulusLength.WasPassed() ||
!params.mPublicExponent.WasPassed() ||
!params.mHash.WasPassed()) {
// TODO fix error and handle default values
mEarlyRv = NS_ERROR_DOM_SYNTAX_ERR;
return;
}
// Pull relevant info
@ -1138,6 +1147,7 @@ public:
nsString hashName;
mEarlyRv = GetAlgorithmName(aCx, params.mHash.Value(), hashName);
if (NS_FAILED(mEarlyRv)) {
mEarlyRv = NS_ERROR_DOM_SYNTAX_ERR;
return;
}
@ -1163,8 +1173,8 @@ public:
mEarlyRv = Coerce(aCx, params, aAlgorithm);
if (NS_FAILED(mEarlyRv) || !params.mModulusLength.WasPassed() ||
!params.mPublicExponent.WasPassed()) {
// TODO fix error and handle default values
mEarlyRv = NS_ERROR_DOM_SYNTAX_ERR;
return;
}
// Pull relevant info
@ -1215,8 +1225,6 @@ public:
return;
}
}
return;
}
private:

Просмотреть файл

@ -7,6 +7,7 @@
#undef CreateEvent
#include "mozilla/BasicEvents.h"
#include "mozilla/CycleCollectedJSRuntime.h"
#include "mozilla/EventDispatcher.h"
#include "mozilla/EventListenerManager.h"
#ifdef MOZ_B2G
@ -1329,6 +1330,27 @@ EventListenerManager::MarkForCC()
}
}
void
EventListenerManager::TraceListeners(JSTracer* aTrc)
{
uint32_t count = mListeners.Length();
for (uint32_t i = 0; i < count; ++i) {
const Listener& listener = mListeners.ElementAt(i);
JSEventHandler* jsEventHandler = listener.GetJSEventHandler();
if (jsEventHandler) {
const TypedEventHandler& typedHandler =
jsEventHandler->GetTypedEventHandler();
if (typedHandler.HasEventHandler()) {
mozilla::TraceScriptHolder(typedHandler.Ptr(), aTrc);
}
} else if (listener.mListenerType == Listener::eWebIDLListener) {
mozilla::TraceScriptHolder(listener.mListener.GetWebIDLCallback(), aTrc);
}
// We might have eWrappedJSListener, but that is the legacy type for
// JS implemented event listeners, and trickier to handle here.
}
}
already_AddRefed<nsIScriptGlobalObject>
EventListenerManager::GetScriptGlobalAndDocument(nsIDocument** aDoc)
{

Просмотреть файл

@ -20,6 +20,7 @@ class nsIDOMEvent;
class nsIEventListenerInfo;
class nsIScriptContext;
class nsPIDOMWindow;
class JSTracer;
struct EventTypeData;
@ -404,6 +405,8 @@ public:
void MarkForCC();
void TraceListeners(JSTracer* aTrc);
dom::EventTarget* GetTarget() { return mTarget; }
protected:

Просмотреть файл

@ -479,7 +479,7 @@ TabChildBase::DispatchSynthesizedMouseEvent(uint32_t aMsg, uint64_t aTime,
nsIWidget* aWidget)
{
MOZ_ASSERT(aMsg == NS_MOUSE_MOVE || aMsg == NS_MOUSE_BUTTON_DOWN ||
aMsg == NS_MOUSE_BUTTON_UP);
aMsg == NS_MOUSE_BUTTON_UP || aMsg == NS_MOUSE_MOZLONGTAP);
WidgetMouseEvent event(true, aMsg, nullptr,
WidgetMouseEvent::eReal, WidgetMouseEvent::eNormal);
@ -691,6 +691,7 @@ TabChild::TabChild(ContentChild* aManager, const TabContext& aContext, uint32_t
, mOrientation(eScreenOrientation_PortraitPrimary)
, mUpdateHitRegion(false)
, mContextMenuHandled(false)
, mLongTapEventHandled(false)
, mWaitingTouchListeners(false)
, mIgnoreKeyPressEvent(false)
, mActiveElementManager(new ActiveElementManager())
@ -1739,7 +1740,17 @@ TabChild::RecvHandleLongTap(const CSSPoint& aPoint, const ScrollableLayerGuid& a
2, 1, 0, false,
nsIDOMMouseEvent::MOZ_SOURCE_TOUCH);
SendContentReceivedTouch(aGuid, mContextMenuHandled);
// If no one handle context menu, fire MOZLONGTAP event
if (!mContextMenuHandled) {
LayoutDevicePoint currentPoint =
APZCCallbackHelper::ApplyCallbackTransform(aPoint, aGuid) * mWidget->GetDefaultScale();
int time = 0;
nsEventStatus status =
DispatchSynthesizedMouseEvent(NS_MOUSE_MOZLONGTAP, time, currentPoint, mWidget);
mLongTapEventHandled = (status == nsEventStatus_eConsumeNoDefault);
}
SendContentReceivedTouch(aGuid, mContextMenuHandled || mLongTapEventHandled);
return true;
}
@ -1752,6 +1763,11 @@ TabChild::RecvHandleLongTapUp(const CSSPoint& aPoint, const ScrollableLayerGuid&
return true;
}
if (mLongTapEventHandled) {
mLongTapEventHandled = false;
return true;
}
RecvHandleSingleTap(aPoint, aGuid);
return true;
}

Просмотреть файл

@ -561,6 +561,7 @@ private:
ScreenOrientation mOrientation;
bool mUpdateHitRegion;
bool mContextMenuHandled;
bool mLongTapEventHandled;
bool mWaitingTouchListeners;
void FireSingleTapEvent(LayoutDevicePoint aPoint);

Просмотреть файл

@ -12,6 +12,11 @@ if CONFIG['MOZ_WEBRTC']:
'/media/webrtc/trunk',
]
if CONFIG['GNU_CXX']:
CXXFLAGS += [
'-Wno-unused-local-typedefs', # Workaround until we fix bug 1020661
]
TEST_DIRS += ['tests/mochitest', 'tests/ipc', 'tests/identity']
XPIDL_SOURCES += [

Просмотреть файл

@ -1,23 +1,19 @@
[DEFAULT]
skip-if = e10s
# All tests are disabled on android&b2g due to lack of https support in
# mochitests (Bug 907770)
# Tests are also disabled on b2g due to lack of e10s support in WebRTC identity
# (Bug 975144)
skip-if = e10s || os == "android" || appname == "b2g"
support-files =
/.well-known/idp-proxy/idp.html
/.well-known/idp-proxy/idp-proxy.js
identityevent.js
# All tests are disabled on android&b2g due to lack of https support in
# mochitests (Bug 907770)
# All tests are disabled on b2g due to lack of e10s support in WebRTC identity
# (Bug 975144)
[test_idpproxy.html]
skip-if = os == "android" || appname == "b2g"
[test_getIdentityAssertion.html]
skip-if = os == "android" || appname == "b2g"
[test_setIdentityProvider.html]
skip-if = os == "android" || appname == "b2g"
[test_setIdentityProviderWithErrors.html]
skip-if = os == "android" || appname == "b2g"
[test_peerConnection_peerIdentity.html]
skip-if = os == "android" || appname == "b2g"
# Bug 950317: Hack for making a cleanup hook after finishing all WebRTC cases
[../mochitest/test_zmedia_cleanup.html]
skip-if = os == "android" || appname == "b2g"

Просмотреть файл

@ -13,15 +13,15 @@ support-files =
skip-if = toolkit == 'gonk' #Bug 962984 for debug, bug 963244 for opt
[test_dataChannel_basicAudioVideo.html]
# Disabled on OS X for bug 930481 timeouts
skip-if = os == 'mac' || toolkit=='gonk' # b2g(Bug 960442, video support for WebRTC is disabled on b2g) b2g-debug(Bug 960442, video support for WebRTC is disabled on b2g)
skip-if = os == 'mac' || toolkit=='gonk' # b2g(Bug 960442, video support for WebRTC is disabled on b2g)
[test_dataChannel_basicAudioVideoCombined.html]
# Disabled on OS X for bug 930481 timeouts
skip-if = os == 'mac' || toolkit=='gonk' # b2g(Bug 960442, video support for WebRTC is disabled on b2g) b2g-debug(Bug 960442, video support for WebRTC is disabled on b2g)
skip-if = os == 'mac' || toolkit=='gonk' # b2g(Bug 960442, video support for WebRTC is disabled on b2g)
[test_dataChannel_basicDataOnly.html]
[test_dataChannel_basicVideo.html]
skip-if = toolkit=='gonk' # b2g emulator seems to bee too slow (Bug 1016498 and 1008080)
[test_dataChannel_bug1013809.html]
skip-if = toolkit=='gonk' # b2g(Bug 960442, video support for WebRTC is disabled on b2g) b2g-debug(Bug 960442, video support for WebRTC is disabled on b2g)
skip-if = toolkit=='gonk' # b2g(Bug 960442, video support for WebRTC is disabled on b2g)
[test_dataChannel_noOffer.html]
[test_getUserMedia_basicAudio.html]
skip-if = (toolkit == 'gonk' && debug) #debug-only failure
@ -51,15 +51,15 @@ skip-if = (toolkit == 'gonk' && debug) #debug-only failure
[test_peerConnection_basicAudio.html]
skip-if = (toolkit == 'gonk' && debug) #Bug 962984, test fail on b2g debug build
[test_peerConnection_basicAudioVideo.html]
skip-if = toolkit=='gonk' # b2g(Bug 960442, video support for WebRTC is disabled on b2g) b2g-debug(Bug 960442, video support for WebRTC is disabled on b2g)
skip-if = toolkit=='gonk' # b2g(Bug 960442, video support for WebRTC is disabled on b2g)
[test_peerConnection_basicAudioVideoCombined.html]
skip-if = toolkit=='gonk' # b2g(Bug 960442, video support for WebRTC is disabled on b2g) b2g-debug(Bug 960442, video support for WebRTC is disabled on b2g)
skip-if = toolkit=='gonk' # b2g(Bug 960442, video support for WebRTC is disabled on b2g)
[test_peerConnection_basicVideo.html]
skip-if = toolkit=='gonk' # b2g(Bug 960442, video support for WebRTC is disabled on b2g) b2g-debug(Bug 960442, video support for WebRTC is disabled on b2g)
skip-if = toolkit=='gonk' # b2g(Bug 960442, video support for WebRTC is disabled on b2g)
[test_peerConnection_bug822674.html]
[test_peerConnection_bug825703.html]
[test_peerConnection_bug827843.html]
skip-if = toolkit=='gonk' # b2g(Bug 960442, video support for WebRTC is disabled on b2g) b2g-debug(Bug 960442, video support for WebRTC is disabled on b2g)
skip-if = toolkit=='gonk' # b2g(Bug 960442, video support for WebRTC is disabled on b2g)
[test_peerConnection_bug834153.html]
[test_peerConnection_bug835370.html]
skip-if = toolkit=='gonk' # b2g emulator seems to bee too slow (Bug 1016498 and 1008080)
@ -67,11 +67,11 @@ skip-if = toolkit=='gonk' # b2g emulator seems to bee too slow (Bug 1016498 and
[test_peerConnection_close.html]
[test_peerConnection_errorCallbacks.html]
[test_peerConnection_offerRequiresReceiveAudio.html]
skip-if = toolkit=='gonk' # b2g(Bug 960442, video support for WebRTC is disabled on b2g) b2g-debug(Bug 960442, video support for WebRTC is disabled on b2g)
skip-if = toolkit=='gonk' # b2g(Bug 960442, video support for WebRTC is disabled on b2g)
[test_peerConnection_offerRequiresReceiveVideo.html]
skip-if = toolkit=='gonk' # b2g(Bug 960442, video support for WebRTC is disabled on b2g) b2g-debug(Bug 960442, video support for WebRTC is disabled on b2g)
skip-if = toolkit=='gonk' # b2g(Bug 960442, video support for WebRTC is disabled on b2g)
[test_peerConnection_offerRequiresReceiveVideoAudio.html]
skip-if = toolkit=='gonk' # b2g(Bug 960442, video support for WebRTC is disabled on b2g) b2g-debug(Bug 960442, video support for WebRTC is disabled on b2g)
skip-if = toolkit=='gonk' # b2g(Bug 960442, video support for WebRTC is disabled on b2g)
[test_peerConnection_setLocalAnswerInHaveLocalOffer.html]
[test_peerConnection_setLocalAnswerInStable.html]
[test_peerConnection_setLocalOfferInHaveRemoteOffer.html]
@ -79,7 +79,8 @@ skip-if = toolkit=='gonk' # b2g(Bug 960442, video support for WebRTC is disabled
[test_peerConnection_setRemoteAnswerInStable.html]
[test_peerConnection_setRemoteOfferInHaveLocalOffer.html]
[test_peerConnection_throwInCallbacks.html]
skip-if = toolkit=='gonk' # b2g(Bug 960442, video support for WebRTC is disabled on b2g) b2g-debug(Bug 960442, video support for WebRTC is disabled on b2g)
skip-if = toolkit=='gonk' # b2g(Bug 960442, video support for WebRTC is disabled on b2g)
[test_peerConnection_toJSON.html]
# Bug950317: Hack for making a cleanup hook after finishing all WebRTC cases
# Bug 950317: Hack for making a cleanup hook after finishing all WebRTC cases
[test_zmedia_cleanup.html]

Просмотреть файл

@ -421,6 +421,62 @@ var commandsDataChannel = [
});
}
],
[
'PC_LOCAL_WAIT_FOR_ICE_CONNECTED',
function (test) {
var myTest = test;
var myPc = myTest.pcLocal;
function onIceConnectedSuccess () {
ok(true, "pc_local: ICE switched to 'connected' state");
myTest.next();
};
function onIceConnectedFailed () {
dumpSdp(myTest);
ok(false, "pc_local: ICE failed to switch to 'connected' state: " + myPc.iceConnectionState);
myTest.next();
};
if (myPc.isIceConnected()) {
ok(true, "pc_local: ICE is in connected state");
myTest.next();
} else if (myPc.isIceConnectionPending()) {
myPc.waitForIceConnected(onIceConnectedSuccess, onIceConnectedFailed);
} else {
dumpSdp(myTest);
ok(false, "pc_local: ICE is already in bad state: " + myPc.iceConnectionState);
myTest.next();
}
}
],
[
'PC_REMOTE_WAIT_FOR_ICE_CONNECTED',
function (test) {
var myTest = test;
var myPc = myTest.pcRemote;
function onIceConnectedSuccess () {
ok(true, "pc_remote: ICE switched to 'connected' state");
myTest.next();
};
function onIceConnectedFailed () {
dumpSdp(myTest);
ok(false, "pc_remote: ICE failed to switch to 'connected' state: " + myPc.iceConnectionState);
myTest.next();
};
if (myPc.isIceConnected()) {
ok(true, "pc_remote: ICE is in connected state");
myTest.next();
} else if (myPc.isIceConnectionPending()) {
myPc.waitForIceConnected(onIceConnectedSuccess, onIceConnectedFailed);
} else {
dumpSdp(myTest);
ok(false, "pc_remote: ICE is already in bad state: " + myPc.iceConnectionState);
myTest.next();
}
}
],
[
'PC_LOCAL_VERIFY_DATA_CHANNEL_STATE',
function (test) {

Просмотреть файл

@ -1208,9 +1208,11 @@ Promise::RunResolveTask(JS::Handle<JS::Value> aValue,
mFeature = new PromiseReportRejectFeature(this);
if (NS_WARN_IF(!worker->AddFeature(worker->GetJSContext(), mFeature))) {
// To avoid a false RemoveFeature().
mFeature = nullptr;
// Worker is shutting down, report rejection immediately since it is
// unlikely that reject callbacks will be added after this point.
MaybeReportRejected();
MaybeReportRejectedOnce();
}
}

Просмотреть файл

@ -13,7 +13,6 @@
#include "nsNetUtil.h"
#include "nsNetCID.h"
#include "nsICacheSession.h"
#include "nsICacheService.h"
#include "nsIOfflineCacheUpdate.h"
#include "nsAutoPtr.h"
#include "nsContentUtils.h"

Просмотреть файл

@ -3,6 +3,7 @@ var Cc = SpecialPowers.Cc;
var Ci = SpecialPowers.Ci;
var Cu = SpecialPowers.Cu;
var LoadContextInfo = Cu.import("resource://gre/modules/LoadContextInfo.jsm", {}).LoadContextInfo;
var CommonUtils = Cu.import("resource://services-common/utils.js", {}).CommonUtils;
const kNetBase = 2152398848; // 0x804B0000
var NS_ERROR_CACHE_KEY_NOT_FOUND = kNetBase + 61;
@ -22,13 +23,14 @@ QueryInterface: function(iid) {
}
return this;
},
onCacheEntryAvailable: function(desc, accessGranted, status) {
onCacheEntryCheck: function() { return Ci.nsICacheEntryOpenCallback.ENTRY_WANTED; },
onCacheEntryAvailable: function(desc, isnew, applicationCache, status) {
if (!desc) {
this.fetch(this.callback);
return;
}
var stream = desc.QueryInterface(Ci.nsICacheEntryDescriptor).openInputStream(0);
var stream = desc.openInputStream(0);
var sstream = Cc["@mozilla.org/scriptableinputstream;1"]
.createInstance(SpecialPowers.Ci.nsIScriptableInputStream);
sstream.init(stream);
@ -49,8 +51,8 @@ fetch: function(callback)
var url = this.urls.shift();
var self = this;
var cacheSession = OfflineTest.getActiveSession();
cacheSession.asyncOpenCacheEntry(url, Ci.nsICache.ACCESS_READ, this);
var cacheStorage = OfflineTest.getActiveStorage();
cacheStorage.asyncOpenURI(CommonUtils.makeURI(url), "", Ci.nsICacheStorage.OPEN_READONLY, this);
}
};
@ -255,7 +257,8 @@ waitForAdd: function(url, onFinished) {
var numChecks = 20;
var waitForAddListener = {
onCacheEntryAvailable: function(entry, access, status) {
onCacheEntryCheck: function() { return Ci.nsICacheEntryOpenCallback.ENTRY_WANTED; },
onCacheEntryAvailable: function(entry, isnew, applicationCache, status) {
if (entry) {
entry.close();
onFinished();
@ -272,10 +275,8 @@ waitForAdd: function(url, onFinished) {
};
var waitFunc = function() {
var cacheSession = OfflineTest.getActiveSession();
cacheSession.asyncOpenCacheEntry(url,
Ci.nsICache.ACCESS_READ,
waitForAddListener);
var cacheStorage = OfflineTest.getActiveStorage();
cacheStorage.asyncOpenURI(CommonUtils.makeURI(url), "", Ci.nsICacheStorage.OPEN_READONLY, waitForAddListener);
}
setTimeout(this.priv(waitFunc), 500);
@ -327,18 +328,16 @@ getActiveCache: function(overload)
return serv.getActiveCache(groupID);
},
getActiveSession: function()
getActiveStorage: function()
{
var cache = this.getActiveCache();
if (!cache) {
return null;
}
var cacheService = Cc["@mozilla.org/network/cache-service;1"]
.getService(Ci.nsICacheService);
return cacheService.createSession(cache.clientID,
Ci.nsICache.STORE_OFFLINE,
true);
var cacheService = Cc["@mozilla.org/netwerk/cache-storage-service;1"]
.getService(Ci.nsICacheStorageService);
return cacheService.appCacheStorage(LoadContextInfo.default, cache);
},
priv: function(func)
@ -365,13 +364,13 @@ checkCacheEntries: function(entries, callback)
checkCache: function(url, expectEntry, callback)
{
var cacheSession = this.getActiveSession();
this._checkCache(cacheSession, url, expectEntry, callback);
var cacheStorage = this.getActiveStorage();
this._checkCache(cacheStorage, url, expectEntry, callback);
},
_checkCache: function(cacheSession, url, expectEntry, callback)
_checkCache: function(cacheStorage, url, expectEntry, callback)
{
if (!cacheSession) {
if (!cacheStorage) {
if (expectEntry) {
this.ok(false, url + " should exist in the offline cache (no session)");
} else {
@ -382,7 +381,8 @@ _checkCache: function(cacheSession, url, expectEntry, callback)
}
var _checkCacheListener = {
onCacheEntryAvailable: function(entry, access, status) {
onCacheEntryCheck: function() { return Ci.nsICacheEntryOpenCallback.ENTRY_WANTED; },
onCacheEntryAvailable: function(entry, isnew, applicationCache, status) {
if (entry) {
if (expectEntry) {
OfflineTest.ok(true, url + " should exist in the offline cache");
@ -412,10 +412,7 @@ _checkCache: function(cacheSession, url, expectEntry, callback)
}
};
cacheSession.asyncOpenCacheEntry(url,
Ci.nsICache.ACCESS_READ,
_checkCacheListener,
false);
cacheStorage.asyncOpenURI(CommonUtils.makeURI(url), "", Ci.nsICacheStorage.OPEN_READONLY, _checkCacheListener);
},
setSJSState: function(sjsPath, stateQuery)

Просмотреть файл

@ -155,7 +155,7 @@
ok(notif.dbId.match(uuidRegEx), "Notification dbId is valid: " + notif.dbId);
is(notif.dir, "ltr", "Notification dir is valid: " + notif.dir);
is(notif.tag, "fakeTag", "Notification tag is valid: " + notif.tag);
ok((notif.timestamp > now), "Notification timestamp is valid: " + notif.timestamp);
ok((notif.timestamp >= now), "Notification timestamp is valid: (" + notif.timestamp + " >= " + now + ")");
notif2.close();
});
}

Просмотреть файл

@ -252,21 +252,15 @@ interface CameraControl : MediaStream
useful for synchronizing other UI elements. */
attribute CameraPreviewStateChange? onPreviewStateChange;
/* the attribute is deprecated in favour of get/setPictureSize.
the size of the picture to be returned by a call to takePicture();
/* the size of the picture to be returned by a call to takePicture();
an object with 'height' and 'width' properties that corresponds to
one of the options returned by capabilities.pictureSizes. */
[Throws]
attribute any pictureSize;
[Throws]
CameraSize getPictureSize();
[Throws]
void setPictureSize(optional CameraSize size);
/* the attribute is deprecated in favour of get/setThumbnailSize.
the size of the thumbnail to be included in the picture returned
/* the size of the thumbnail to be included in the picture returned
by a call to takePicture(), assuming the chosen fileFormat supports
one; an object with 'height' and 'width' properties that corresponds
to one of the options returned by capabilities.pictureSizes.
@ -274,8 +268,6 @@ interface CameraControl : MediaStream
this setting should be considered a hint: the implementation will
respect it when possible, and override it if necessary. */
[Throws]
attribute any thumbnailSize;
[Throws]
CameraSize getThumbnailSize();
[Throws]
void setThumbnailSize(optional CameraSize size);

Просмотреть файл

@ -44,6 +44,7 @@ partial interface HTMLLinkElement {
// http://w3c.github.io/webcomponents/spec/imports/#interface-import
partial interface HTMLLinkElement {
[Pref="dom.webcomponents.enabled"]
readonly attribute Document? import;
};

Просмотреть файл

@ -7,7 +7,7 @@
* http://www.whatwg.org/specs/web-apps/current-work/#channel-messaging
*/
[Constructor, Pref="dom.messageChannel.enabled"]
[Constructor, Func="MessageChannel::Enabled"]
interface MessageChannel {
readonly attribute MessagePort port1;
readonly attribute MessagePort port2;

Просмотреть файл

@ -55,6 +55,7 @@ dictionary NetworkProperties {
DOMString pin;
boolean dontConnect;
DOMString serverCertificate;
DOMString subjectMatch;
};
[Constructor(optional NetworkProperties properties),
@ -90,6 +91,7 @@ interface MozWifiNetwork {
attribute DOMString? pin;
attribute boolean? dontConnect;
attribute DOMString? serverCertificate;
attribute DOMString? subjectMatch;
};
[JSImplementation="@mozilla.org/mozwificonnection;1",

Просмотреть файл

@ -285,6 +285,8 @@ partial interface Window {
// XXX Shouldn't this be in nsIDOMChromeWindow?
[ChromeOnly, Replaceable, Throws] readonly attribute MozControllers controllers;
[ChromeOnly, Throws] readonly attribute Element? realFrameElement;
[Throws] readonly attribute float mozInnerScreenX;
[Throws] readonly attribute float mozInnerScreenY;
[Throws] readonly attribute float devicePixelRatio;

Просмотреть файл

@ -1153,7 +1153,7 @@ var WifiManager = (function() {
"ssid", "bssid", "psk", "wep_key0", "wep_key1", "wep_key2", "wep_key3",
"wep_tx_keyidx", "priority", "key_mgmt", "scan_ssid", "disabled",
"identity", "password", "auth_alg", "phase1", "phase2", "eap", "pin",
"pcsc", "ca_cert"
"pcsc", "ca_cert", "subject_match"
];
manager.getNetworkConfiguration = function(config, callback) {
@ -1860,6 +1860,9 @@ function WifiWorker() {
net.ca_cert.indexOf("keystore://WIFI_SERVERCERT_" === 0)) {
pub.serverCertificate = net.ca_cert.substr(27);
}
if(net.subject_match) {
pub.subjectMatch = net.subject_match;
}
return pub;
};
@ -1944,6 +1947,9 @@ function WifiWorker() {
if (hasValidProperty("serverCertificate"))
net.ca_cert = quote("keystore://WIFI_SERVERCERT_" + net.serverCertificate);
if (hasValidProperty("subjectMatch"))
net.subject_match = quote(net.subjectMatch);
}
return net;

Просмотреть файл

@ -0,0 +1,20 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1020226
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 1020226</title>
</head>
<body>
<script type="application/javascript">
var worker = new Worker("bug1020226_worker.js");
worker.onmessage = function(e) {
window.parent.postMessage("loaded", "*");
}
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,11 @@
var p = new Promise(function(resolve, reject) {
// This causes a runnable to be queued.
reject(new Error());
postMessage("loaded");
// This prevents that runnable from running until the window calls terminate(),
// at which point the worker goes into the Canceling state and then an
// AddFeature() is attempted, which fails, which used to result in multiple
// calls to the error reporter, one after the worker's context had been GCed.
while (true);
});

Просмотреть файл

@ -2,6 +2,8 @@
support-files =
WorkerTest_badworker.js
atob_worker.js
bug1020226_worker.js
bug1020226_frame.html
clearTimeouts_worker.js
closeOnGC_server.sjs
closeOnGC_worker.js
@ -78,6 +80,7 @@ support-files =
[test_blobWorkers.html]
[test_bug949946.html]
[test_bug1010784.html]
[test_bug1020226.html]
[test_chromeWorker.html]
[test_clearTimeouts.html]
[test_close.html]

Просмотреть файл

@ -0,0 +1,38 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1020226
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 1020226</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1020226">Mozilla Bug 1020226</a>
<p id="display"></p>
<div id="content" style="display: none">
<iframe id="iframe" src="bug1020226_frame.html" onload="finishTest();">
</iframe>
</div>
<pre id="test">
<script type="application/javascript">
function finishTest() {
document.getElementById("iframe").onload = null;
window.onmessage = function(e) {
info("Got message");
document.getElementById("iframe").src = "about:blank";
// We aren't really interested in the test, it shouldn't crash when the
// worker is GCed later.
ok(true, "Should not crash");
SimpleTest.finish();
};
}
SimpleTest.waitForExplicitFinish();
</script>
</pre>
</body>
</html>

Просмотреть файл

@ -39,6 +39,18 @@ RESOURCE_FILES += [
'res/table-remove-row-active.gif',
'res/table-remove-row-hover.gif',
'res/table-remove-row.gif',
'res/text_caret.png',
'res/text_caret@1.5x.png',
'res/text_caret@2.25x.png',
'res/text_caret@2x.png',
'res/text_caret_tilt_left.png',
'res/text_caret_tilt_left@1.5x.png',
'res/text_caret_tilt_left@2.25x.png',
'res/text_caret_tilt_left@2x.png',
'res/text_caret_tilt_right.png',
'res/text_caret_tilt_right@1.5x.png',
'res/text_caret_tilt_right@2.25x.png',
'res/text_caret_tilt_right@2x.png',
'res/text_selection_handle.png',
'res/text_selection_handle@1.5.png',
'res/text_selection_handle@2.png',

Двоичные данные
editor/composer/src/res/text_caret.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.6 KiB

Двоичные данные
editor/composer/src/res/text_caret@1.5x.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.9 KiB

Двоичные данные
editor/composer/src/res/text_caret@2.25x.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.4 KiB

Двоичные данные
editor/composer/src/res/text_caret@2x.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.5 KiB

Двоичные данные
editor/composer/src/res/text_caret_tilt_left.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.5 KiB

Двоичные данные
editor/composer/src/res/text_caret_tilt_left@1.5x.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.0 KiB

Двоичные данные
editor/composer/src/res/text_caret_tilt_left@2.25x.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.3 KiB

Двоичные данные
editor/composer/src/res/text_caret_tilt_left@2x.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.4 KiB

Двоичные данные
editor/composer/src/res/text_caret_tilt_right.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.5 KiB

Двоичные данные
editor/composer/src/res/text_caret_tilt_right@1.5x.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.0 KiB

Двоичные данные
editor/composer/src/res/text_caret_tilt_right@2.25x.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.3 KiB

Двоичные данные
editor/composer/src/res/text_caret_tilt_right@2x.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 2.4 KiB

Просмотреть файл

@ -176,7 +176,7 @@ CanvasClientSurfaceStream::Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer)
if (mBuffer && CompositorChild::ChildProcessHasCompositor()) {
// remove old buffer from CompositableHost
RefPtr<AsyncTransactionTracker> tracker = new RemoveTextureFromCompositableTracker(this);
RefPtr<AsyncTransactionTracker> tracker = new RemoveTextureFromCompositableTracker();
// Hold TextureClient until transaction complete.
tracker->SetTextureClient(mBuffer);
mBuffer->SetRemoveFromCompositableTracker(tracker);

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше