mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
06d185e815
- var-let (4514fc8c5f) - Bug 1191897, add a flag for popups which allow shortcut keys to not be consumed, fixes shortcuts not working when an e10s select popup is open, r=neil (c3d788f65c) - Bug 1181897 - Do not scale down <img> elements passed to setDragImage. r=roc (b9db4b2c2f) - Bug 1204442 nsIDragService::FireDragEventAtSource() shouldn't be available from script because it takes a value of mozilla::EventMessage r=smaug, sr=smaug (6d357d54a7) - Bug 1202176, adjust coordinates from device to css pixels when drag popup moves, r=tn (d6fa56dc59) - Bug 1204944, convert drag position coordinates properly, r=mstange (0ff3b815b4) - Bug 1205511 - Make nsBaseDragService::mImage[X|Y] strongly typed. r=enn (47d68b017a) - Bug 1205511 - Make nsMenuPopupFrame::MoveTo()'s arguments strongly typed. r=enn (c29c16b9ce) - Bug 1205511 - Give nsPresContext a method that returns the CSS to device pixel scale. r=dbaron (e91a754991) - Bug 1205511 - Add overloaded operators for multiplying and dividing an IntPointTyped by a ScaleFactor[2D]. r=kats (f857857c94) - Bug 1188172 - Don't update the resolution/SPCSPS for meta-viewport changes before the first-paint. r=botond (0d7eeda1c8) - Bug 1168487 - Update the last use site of ScrollbarAreaToExcludeFromCompositionBoundsFor to use LD pixels. r=tn (af1d65d14a) - Bug 1197592 - Don't set an SPCSPS in the mobile viewport manager if APZ zooming is not enabled. r=botond (eb2b3d3bf3) - Bug 1180267 - Don't set root displayport margins from the mobile viewport manager unless the C++ APZ is enabled. r=botond (982b57a6f3) - Bug 976616 - Part 1: Call ProcessViewportInfo when meta viewport is changed. r=bholley (0df9aaad5c) - Bug 976616 - Part 2: Update mobile viewport on DOMMetaChanged event. r=kats (97244f0a2f) - Bug 976616 - Part 3: Enable meta viewport tests for Fennec. r=kats (16de4304dc) - Bug 976616 - Part 4: Add test for dynamic meta viewport updates. r=kats (c3af1ba028) - Bug 1198839 - Don't update the displayport from the MVM unless there is already on the content. r=botond (a86c335313) - Bug 1205511 - Document that nsIDragService.dragMoved() takes its arguments in LayoutDevice pixels. r=enn IGNORE IDL (comment change only) (ea1f24c65e) - Bug 1180267 - Ensure that the desktop-mode viewport for Fennec is based on a 980 CSS pixel width rather than the screen size. r=snorp (365c12249c) - Bug 1200402 - Ignore desktop mode for about: pages. r=snorp,khuey (3d64772abe) - Bug 1197824 - Remove unused state and normalize others. r=botond (58ed2bb53b) - Bug 1197824 - Allow zooming in desktop mode. r=botond (dbded0fdf7) - Bug 1200303 - Support meta-viewport changes in ZoomConstraintsClient as well. r=miketaylr (bb5ebee8ed) - Bug 1197824 - Support the browser.ui.zoom.force-user-scalable pref in the gecko zoom-constraints codepath. r=botond (0292f794c6) - Bug 1197824 - Constrain the min/max zoom if zooming is not allowed. r=botond (26ae1656ba) - Bug 1197824 - Remove the mAllowDoubleTapZoom field from nsViewportInfo as it is not needed. r=botond (00455cf30c) - Bug 1189837 - Subtract scrollbars in LD pixels rather than CSS pixels. r=mstange (8801383234) - Bug 1210399 - IonMonkey: MIPS: Safe for races. r=lth (5be49e2198) - Bug 1202367 - reinitialize expected value in CAS loop. patch=hev, r=sstangl, push=lth (438272bb96) - Bug 1210733 - Record source filenames independently of the script coverage. r=terrence (3a90b1a660) - Bug 1211546 - Unbreak the non-unified build. (r=sfink, r=nbp, r=shu) (4b290fffac) - Bug 977338 - Remove AtomicOperations-inl.h, r=lth (0015c7a398) - Bug 1202713 - Fix the CSS viewport dimensions for desktop mode. r=snorp (763a55b6aa) - Bug 1024343: The document should not stop animations when it is being swapped. r=smaug (ba2d43f308) - Bug 1200093 - Don't rely on finding the widget for a document in order to get the css-to-ld scale. r=botond (bf359f6c76) - Bug 1205511 - Use nsPresContext::DevToCSSPixelScale() where appropriate. r=kats (631a8fe6ae) - Bug 1204994 - part 0 - separate debugging use counters check from value check; r=bz (d8771157eb) - Bug 1204994 - part 2 - rename all USE_COUNTER_* histograms to USE_COUNTER2_* histograms; r=bz,vladan (8a86ee4560) - Bug 1202895 - Fix shift-reload check for setting up service worker. r=bkelly (61309332e6) - let-var (315a834c4d) - Bug 1193469 - Make mozSettings more defensive. r=gwagner (9c4aeb2721) - Bug 1187419 - Make sure SettingsRequestManager is only loaded in parent. r=gwagner (98bfca7a44) - Bug 1156231 - enable data registration recovery. r=hsinyi (f886c81ce3) - Bug 1159591 - Part 1: Add MMI tests for call barring, call waiting, clip, clir, pin2, puk2 and ussd. r=aknow (96ba4e4a89) - Bug 1149433 - Set hangUpLocal in rejectCall. r=hsinyi (43aec5ea64) - Bug 1147842 - Fix defect of setting call started time. r=hsinyi (dbf6a5516a) - Bug 1145079 - Fix defect for calling isEmergencyOnly. r=hsinyi (8ba883d37e)
254 lines
7.7 KiB
JavaScript
254 lines
7.7 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";
|
|
|
|
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
|
|
|
|
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
|
Cu.import("resource://gre/modules/Services.jsm");
|
|
Cu.import("resource://gre/modules/DOMRequestHelper.jsm");
|
|
|
|
var debug = Services.prefs.getBoolPref("dom.system_update.debug")
|
|
? (aMsg) => dump("-*- SystemUpdateManager.js : " + aMsg + "\n")
|
|
: (aMsg) => {};
|
|
|
|
const SYSTEMUPDATEPROVIDER_CID = Components.ID("{11fbea3d-fd94-459a-b8fb-557fe19e473a}");
|
|
const SYSTEMUPDATEMANAGER_CID = Components.ID("{e8530001-ba5b-46ab-a306-7fbeb692d0fe}");
|
|
const SYSTEMUPDATEMANAGER_CONTRACTID = "@mozilla.org/system-update-manager;1";
|
|
|
|
XPCOMUtils.defineLazyServiceGetter(this, "cpmm",
|
|
"@mozilla.org/childprocessmessagemanager;1",
|
|
"nsISyncMessageSender");
|
|
|
|
function SystemUpdateProvider(win, provider) {
|
|
this.initDOMRequestHelper(win, [
|
|
{name: "SystemUpdate:OnUpdateAvailable", weakRef: true},
|
|
{name: "SystemUpdate:OnProgress", weakRef: true},
|
|
{name: "SystemUpdate:OnUpdateReady", weakRef: true},
|
|
{name: "SystemUpdate:OnError", weakRef: true},
|
|
]);
|
|
this._provider = Cu.cloneInto(provider, win);
|
|
}
|
|
|
|
SystemUpdateProvider.prototype = {
|
|
__proto__: DOMRequestIpcHelper.prototype,
|
|
|
|
classID: SYSTEMUPDATEPROVIDER_CID,
|
|
QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference,
|
|
Ci.nsIObserver]),
|
|
|
|
receiveMessage: function(aMsg) {
|
|
if (!aMsg || !aMsg.json) {
|
|
return;
|
|
}
|
|
|
|
let json = aMsg.json;
|
|
|
|
if (json.uuid !== this._provider.uuid) {
|
|
return;
|
|
}
|
|
|
|
debug("receive msg: " + aMsg.name);
|
|
switch (aMsg.name) {
|
|
case "SystemUpdate:OnUpdateAvailable": {
|
|
let detail = {
|
|
detail: {
|
|
packageInfo: json.packageInfo
|
|
}
|
|
};
|
|
let event = new this._window.CustomEvent("updateavailable",
|
|
Cu.cloneInto(detail, this._window));
|
|
this.__DOM_IMPL__.dispatchEvent(event);
|
|
break;
|
|
}
|
|
case "SystemUpdate:OnProgress": {
|
|
let event = new this._window.ProgressEvent("progress", {lengthComputable: true,
|
|
loaded: json.loaded,
|
|
total: json.total});
|
|
this.__DOM_IMPL__.dispatchEvent(event);
|
|
break;
|
|
}
|
|
case "SystemUpdate:OnUpdateReady": {
|
|
let event = new this._window.Event("updateready");
|
|
this.__DOM_IMPL__.dispatchEvent(event);
|
|
break;
|
|
}
|
|
case "SystemUpdate:OnError": {
|
|
let event = new this._window.ErrorEvent("error", {message: json.message});
|
|
this.__DOM_IMPL__.dispatchEvent(event);
|
|
break;
|
|
}
|
|
}
|
|
},
|
|
|
|
destroy: function() {
|
|
this.destroyDOMRequestHelper();
|
|
},
|
|
|
|
get name() {
|
|
return this._provider.name;
|
|
},
|
|
|
|
get uuid() {
|
|
return this._provider.uuid;
|
|
},
|
|
|
|
get onupdateavailable() {
|
|
return this.__DOM_IMPL__.getEventHandler("onupdateavailable");
|
|
},
|
|
set onupdateavailable(aHandler) {
|
|
this.__DOM_IMPL__.setEventHandler("onupdateavailable", aHandler);
|
|
},
|
|
get onprogress() {
|
|
return this.__DOM_IMPL__.getEventHandler("onprogress");
|
|
},
|
|
set onprogress(aHandler) {
|
|
this.__DOM_IMPL__.setEventHandler("onprogress", aHandler);
|
|
},
|
|
get onupdateready() {
|
|
return this.__DOM_IMPL__.getEventHandler("onupdateready");
|
|
},
|
|
set onupdateready(aHandler) {
|
|
this.__DOM_IMPL__.setEventHandler("onupdateready", aHandler);
|
|
},
|
|
get onerror() {
|
|
return this.__DOM_IMPL__.getEventHandler("onerror");
|
|
},
|
|
set onerror(aHandler) {
|
|
this.__DOM_IMPL__.setEventHandler("onerror", aHandler);
|
|
},
|
|
|
|
checkForUpdate: function() {
|
|
let self = this;
|
|
cpmm.sendAsyncMessage("SystemUpdate:CheckForUpdate", {
|
|
uuid: self._provider.uuid
|
|
});
|
|
},
|
|
startDownload: function() {
|
|
let self = this;
|
|
cpmm.sendAsyncMessage("SystemUpdate:StartDownload", {
|
|
uuid: self._provider.uuid
|
|
});
|
|
},
|
|
stopDownload: function() {
|
|
let self = this;
|
|
cpmm.sendAsyncMessage("SystemUpdate:StopDownload", {
|
|
uuid: self._provider.uuid
|
|
});
|
|
},
|
|
applyUpdate: function() {
|
|
let self = this;
|
|
cpmm.sendAsyncMessage("SystemUpdate:ApplyUpdate", {
|
|
uuid: self._provider.uuid
|
|
});
|
|
},
|
|
setParameter: function(aName, aValue) {
|
|
let self = this;
|
|
return cpmm.sendSyncMessage("SystemUpdate:SetParameter", {
|
|
uuid: self._provider.uuid,
|
|
name: aName,
|
|
value: aValue
|
|
})[0];
|
|
},
|
|
getParameter: function(aName) {
|
|
let self = this;
|
|
return cpmm.sendSyncMessage("SystemUpdate:GetParameter", {
|
|
uuid: self._provider.uuid,
|
|
name: aName
|
|
})[0];
|
|
},
|
|
};
|
|
|
|
function SystemUpdateManager() {}
|
|
|
|
SystemUpdateManager.prototype = {
|
|
__proto__: DOMRequestIpcHelper.prototype,
|
|
|
|
classID: SYSTEMUPDATEMANAGER_CID,
|
|
QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference,
|
|
Ci.nsIObserver,
|
|
Ci.nsIDOMGlobalPropertyInitializer]),
|
|
|
|
receiveMessage: function(aMsg) {
|
|
if (!aMsg || !aMsg.json) {
|
|
return;
|
|
}
|
|
|
|
let json = aMsg.json;
|
|
let resolver = this.takePromiseResolver(json.requestId);
|
|
|
|
if (!resolver) {
|
|
return;
|
|
}
|
|
|
|
debug("receive msg: " + aMsg.name);
|
|
switch (aMsg.name) {
|
|
case "SystemUpdate:GetProviders:Result:OK": {
|
|
resolver.resolve(Cu.cloneInto(json.providers, this._window));
|
|
break;
|
|
}
|
|
case "SystemUpdate:SetActiveProvider:Result:OK":
|
|
case "SystemUpdate:GetActiveProvider:Result:OK": {
|
|
let updateProvider = new SystemUpdateProvider(this._window, json.provider);
|
|
resolver.resolve(this._window.SystemUpdateProvider._create(this._window,
|
|
updateProvider));
|
|
break;
|
|
}
|
|
case "SystemUpdate:GetProviders:Result:Error":
|
|
case "SystemUpdate:GetActiveProvider:Result:Error":
|
|
case "SystemUpdate:SetActiveProvider:Result:Error": {
|
|
resolver.reject(json.error);
|
|
break;
|
|
}
|
|
}
|
|
},
|
|
|
|
init: function(aWindow) {
|
|
this.initDOMRequestHelper(aWindow, [
|
|
{name: "SystemUpdate:GetProviders:Result:OK", weakRef: true},
|
|
{name: "SystemUpdate:GetProviders:Result:Error", weakRef: true},
|
|
{name: "SystemUpdate:GetActiveProvider:Result:OK", weakRef: true},
|
|
{name: "SystemUpdate:GetActiveProvider:Result:Error", weakRef: true},
|
|
{name: "SystemUpdate:SetActiveProvider:Result:OK", weakRef: true},
|
|
{name: "SystemUpdate:SetActiveProvider:Result:Error", weakRef: true},
|
|
]);
|
|
},
|
|
|
|
uninit: function() {
|
|
let self = this;
|
|
|
|
this.forEachPromiseResolver(function(aKey) {
|
|
self.takePromiseResolver(aKey).reject("SystemUpdateManager got destroyed");
|
|
});
|
|
},
|
|
|
|
getProviders: function() {
|
|
return this.createPromiseWithId(function(aResolverId) {
|
|
cpmm.sendAsyncMessage("SystemUpdate:GetProviders", {
|
|
requestId: aResolverId,
|
|
});
|
|
});
|
|
},
|
|
|
|
getActiveProvider: function() {
|
|
return this.createPromiseWithId(function(aResolverId) {
|
|
cpmm.sendAsyncMessage("SystemUpdate:GetActiveProvider", {
|
|
requestId: aResolverId,
|
|
});
|
|
});
|
|
},
|
|
|
|
setActiveProvider: function(aUuid) {
|
|
return this.createPromiseWithId(function(aResolverId) {
|
|
cpmm.sendAsyncMessage("SystemUpdate:SetActiveProvider", {
|
|
requestId: aResolverId,
|
|
uuid: aUuid
|
|
});
|
|
});
|
|
}
|
|
};
|
|
|
|
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([SystemUpdateManager]);
|