mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
c4388cb7dc
- Bug 1229987: P2. Drain decoder when encountering gap. r=cpearce This allows for all buffered frames to be playable. (7ac0b2ddec) - Bug 1229987: P3. Update mochitests and add new one verifying behavior. r=cpearce (f4a231e9c8) - Bug 1229987: P4. Stop pre-rolling when encountering WAITING_FOR_DATA. r=cpearce (721df00361) - Bug 1205470: [MSE] Remove assertion. r=cpearce (857f4bfcd0) - fix comment (2e6e5f800c) - Bug 1226707: P2 Ensure we won't operate on a decoder that failed to initialize. r=cpearce (fa86fc1bb3) - Bug 1226707: P3. Only create the type of decoder we will need. r=cpearce (49a3d28e6c) - Bug 1229987: P5. Drop frames during internal seeking early. r=cpearce (9aeb23d3e6) - Bug 1197075: P4. Reject skip promise on cancellation or shutdown. r=edwin (b3d7af2cdd) - remove ifdef (3524eedb5a) - Bug 1229028 - remove #ifdef NS_BUILD_REFCNT_LOGGING methods from nsXULPrototypeNode; r=bz (5b87939fd6) - Bug 1214295 - Fix up entry points for ClickWithInputSource. r=bz (d7fda37d34) - Bug 1217307 - Remove some unnecessary null checks in rest of dom/xul/. r=njn (87486950c6) - Bug 1186811 (part 1) - Replace nsBaseHashtable::EnumerateRead() calls in dom/storage/ with iterators. r=baku. (0c35317169) - Bug 1186811 (part 2) - Replace nsBaseHashtable::EnumerateRead() calls in dom/storage/ with iterators. r=baku. (4a367a23e8) - Bug 1186811 (part 3) - Replace nsBaseHashtable::EnumerateRead() calls in dom/storage/ with iterators. r=baku. (e9861ab1ab) - Bug 1186811 (part 4) - Replace nsBaseHashtable::EnumerateRead() calls in dom/storage/ with iterators. r=baku. (34037caa14) - Bug 1189426 - Don't assert false in DOMStorageDBThread::InsertDBOp when we failed to open the database. r=smaug (b40612f549) - Bug 1192194 - Make DOMStorageDBThead::mDBReady atomic. r=smaug (ce34bfd1a6) - Bug 1208897 - Fix an initialization order bug in DOMStorageDBThread; r=baku (7efba6dea3) - Bug 1209349 - Audit the callers of the two-argument OriginAttributes. r=janv (5bdc041a87) - Bug 1189998, Part 1 - Consolidate Push client interfaces. r=mt,dragana (bd0eec93cb) - Bug 1222619 - about:serviceworkers should show the correct cache entries, r=bkelly (ee9b3f1740) - Bug 1189998, Part 2 - Migrate Push service callers. r=mt (392d6aa21d) - Bug 1230672 part 1 - Make '-moz-column-fill:auto' work also when 'overflow' isn't 'visible'. r=bz (c10d71c206) - Bug 1230672 part 2 - Add reftest with -moz-column-fill:auto and overflow:hidden. (8062b9e222) - Bug 1227162 - [css-grid][css-align] Make the scrolled pseudo frame inherit more CSS Align / Grid properties. r=dholbert (2f6e04f3f8) - Bug 1164783 - Removing trailing spaces. r=dbaron (980a19fb5d) - Bug 1230207 - Add support for display:grid/flex layout on <fieldset> elements. r=bz,dholbert (9e1ba66f34) - bug 1230025 remove declaration of non-existant NS_NewThumbFrame r=dholbert (8b1f7cba54) - Bug 1230672 part 3 - Add support for multicol layout on <fieldset> elements. r=bz (475f8b329f) - Bug 1232271 - initialize local scalar mSolidColor with default value - NS_RGBA(0, 0, 0, 0). r=matt.woodrow (7b8cd28617) - Bug 1144534 - If we have tiling, don't reduce layer resolution for large transforms. r=mattwoodrow (96785125bb) - Bug 1221842 - Don't reallocate DLBI geometry objects if nothing has changed. r=roc (69cbb41714) - Bug 1232635 - since presContext is always a valid pointer remove the useless null check that also confused Coverity. r=bz (8426c6a2ff)
182 lines
5.8 KiB
JavaScript
182 lines
5.8 KiB
JavaScript
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
'use strict';
|
|
|
|
var {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
|
|
|
Cu.import("resource://gre/modules/Services.jsm");
|
|
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
|
|
|
|
XPCOMUtils.defineLazyServiceGetter(
|
|
this,
|
|
"PushService",
|
|
"@mozilla.org/push/Service;1",
|
|
"nsIPushService"
|
|
);
|
|
|
|
const bundle = Services.strings.createBundle(
|
|
"chrome://global/locale/aboutServiceWorkers.properties");
|
|
|
|
const brandBundle = Services.strings.createBundle(
|
|
"chrome://branding/locale/brand.properties");
|
|
|
|
var gSWM;
|
|
var gSWCount = 0;
|
|
|
|
function init() {
|
|
let enabled = Services.prefs.getBoolPref("dom.serviceWorkers.enabled");
|
|
if (!enabled) {
|
|
let div = document.getElementById("warning_not_enabled");
|
|
div.classList.add("active");
|
|
return;
|
|
}
|
|
|
|
gSWM = Cc["@mozilla.org/serviceworkers/manager;1"]
|
|
.getService(Ci.nsIServiceWorkerManager);
|
|
if (!gSWM) {
|
|
dump("AboutServiceWorkers: Failed to get the ServiceWorkerManager service!\n");
|
|
return;
|
|
}
|
|
|
|
let data = gSWM.getAllRegistrations();
|
|
if (!data) {
|
|
dump("AboutServiceWorkers: Failed to retrieve the registrations.\n");
|
|
return;
|
|
}
|
|
|
|
let length = data.length;
|
|
if (!length) {
|
|
let div = document.getElementById("warning_no_serviceworkers");
|
|
div.classList.add("active");
|
|
return;
|
|
}
|
|
|
|
for (let i = 0; i < length; ++i) {
|
|
let info = data.queryElementAt(i, Ci.nsIServiceWorkerRegistrationInfo);
|
|
if (!info) {
|
|
dump("AboutServiceWorkers: Invalid nsIServiceWorkerRegistrationInfo interface.\n");
|
|
continue;
|
|
}
|
|
|
|
display(info);
|
|
}
|
|
}
|
|
|
|
function display(info) {
|
|
let parent = document.getElementById("serviceworkers");
|
|
|
|
let div = document.createElement('div');
|
|
parent.appendChild(div);
|
|
|
|
let title = document.createElement('h2');
|
|
let titleStr = bundle.formatStringFromName('title', [info.principal.origin], 1);
|
|
title.appendChild(document.createTextNode(titleStr));
|
|
div.appendChild(title);
|
|
|
|
if (info.principal.appId) {
|
|
let b2gtitle = document.createElement('h3');
|
|
let trueFalse = bundle.GetStringFromName(info.principal.isInBrowserElement ? 'true' : 'false');
|
|
|
|
let b2gtitleStr =
|
|
bundle.formatStringFromName('b2gtitle', [ brandBundle.getString("brandShortName"),
|
|
info.principal.appId,
|
|
trueFalse], 2);
|
|
b2gtitle.appendChild(document.createTextNode(b2gtitleStr));
|
|
div.appendChild(b2gtitle);
|
|
}
|
|
|
|
let list = document.createElement('ul');
|
|
div.appendChild(list);
|
|
|
|
function createItem(title, value, makeLink) {
|
|
let item = document.createElement('li');
|
|
list.appendChild(item);
|
|
|
|
let bold = document.createElement('strong');
|
|
bold.appendChild(document.createTextNode(title + " "));
|
|
item.appendChild(bold);
|
|
|
|
let textNode = document.createTextNode(value);
|
|
|
|
if (makeLink) {
|
|
let link = document.createElement("a");
|
|
link.href = value;
|
|
link.target = "_blank";
|
|
link.appendChild(textNode);
|
|
item.appendChild(link);
|
|
} else {
|
|
item.appendChild(textNode);
|
|
}
|
|
|
|
return textNode;
|
|
}
|
|
|
|
createItem(bundle.GetStringFromName('scope'), info.scope);
|
|
createItem(bundle.GetStringFromName('scriptSpec'), info.scriptSpec, true);
|
|
let currentWorkerURL = info.activeWorker ? info.activeWorker.scriptSpec : "";
|
|
createItem(bundle.GetStringFromName('currentWorkerURL'), currentWorkerURL, true);
|
|
let activeCacheName = info.activeWorker ? info.activeWorker.cacheName : "";
|
|
createItem(bundle.GetStringFromName('activeCacheName'), info.activeCacheName);
|
|
let waitingCacheName = info.waitingWorker ? info.waitingWorker.cacheName : "";
|
|
createItem(bundle.GetStringFromName('waitingCacheName'), info.waitingCacheName);
|
|
|
|
let pushItem = createItem(bundle.GetStringFromName('pushEndpoint'), bundle.GetStringFromName('waiting'));
|
|
PushService.getRegistration(info.scope, info.principal.originAttributes), (status, pushRecord) => {
|
|
if (Components.isSuccessCode(status)) {
|
|
pushItem.data = JSON.stringify(pushRecord);
|
|
} else {
|
|
dump("about:serviceworkers - retrieving push registration failed\n");
|
|
}
|
|
});
|
|
|
|
let updateButton = document.createElement("button");
|
|
updateButton.appendChild(document.createTextNode(bundle.GetStringFromName('update')));
|
|
updateButton.onclick = function() {
|
|
gSWM.propagateSoftUpdate(info.principal.originAttributes, info.scope);
|
|
};
|
|
div.appendChild(updateButton);
|
|
|
|
let unregisterButton = document.createElement("button");
|
|
unregisterButton.appendChild(document.createTextNode(bundle.GetStringFromName('unregister')));
|
|
div.appendChild(unregisterButton);
|
|
|
|
let loadingMessage = document.createElement('span');
|
|
loadingMessage.appendChild(document.createTextNode(bundle.GetStringFromName('waiting')));
|
|
loadingMessage.classList.add('inactive');
|
|
div.appendChild(loadingMessage);
|
|
|
|
unregisterButton.onclick = function() {
|
|
let cb = {
|
|
unregisterSucceeded: function() {
|
|
parent.removeChild(div);
|
|
|
|
if (!--gSWCount) {
|
|
let div = document.getElementById("warning_no_serviceworkers");
|
|
div.classList.add("active");
|
|
}
|
|
},
|
|
|
|
unregisterFailed: function() {
|
|
alert(bundle.GetStringFromName('unregisterError'));
|
|
},
|
|
|
|
QueryInterface: XPCOMUtils.generateQI([Ci.nsIServiceWorkerUnregisterCallback])
|
|
};
|
|
|
|
loadingMessage.classList.remove('inactive');
|
|
gSWM.propagateUnregister(info.principal, cb, info.scope);
|
|
};
|
|
|
|
let sep = document.createElement('hr');
|
|
div.appendChild(sep);
|
|
|
|
++gSWCount;
|
|
}
|
|
|
|
window.addEventListener("DOMContentLoaded", function load() {
|
|
window.removeEventListener("DOMContentLoaded", load);
|
|
init();
|
|
});
|