MozReview-Commit-ID: HINQtggBLDr
This commit is contained in:
Phil Ringnalda 2017-07-01 17:36:09 -07:00
Родитель 68f5ce100a 15925cc551
Коммит 915412e692
1122 изменённых файлов: 343962 добавлений и 1357 удалений

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

@ -317,6 +317,7 @@ testing/modules/sinon-2.3.2.js
testing/mozbase/mozprofile/tests/files/prefs_with_comments.js testing/mozbase/mozprofile/tests/files/prefs_with_comments.js
testing/talos/talos/scripts/jszip.min.js testing/talos/talos/scripts/jszip.min.js
testing/talos/talos/startup_test/sessionrestore/profile/sessionstore.js testing/talos/talos/startup_test/sessionrestore/profile/sessionstore.js
testing/talos/talos/startup_test/sessionrestore/profile-manywindows/sessionstore.js
testing/talos/talos/tests/canvasmark/** testing/talos/talos/tests/canvasmark/**
testing/talos/talos/tests/dromaeo/** testing/talos/talos/tests/dromaeo/**
testing/talos/talos/tests/v8_7/** testing/talos/talos/tests/v8_7/**

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

@ -850,8 +850,8 @@
</box> </box>
<box id="notification-popup-box" <box id="notification-popup-box"
hidden="true" hidden="true"
onmouseover="document.getElementById('identity-icon').classList.add('no-hover');" onmouseover="document.getElementById('identity-box').classList.add('no-hover');"
onmouseout="document.getElementById('identity-icon').classList.remove('no-hover');" onmouseout="document.getElementById('identity-box').classList.remove('no-hover');"
align="center"> align="center">
<image id="default-notification-icon" class="notification-anchor-icon" role="button" <image id="default-notification-icon" class="notification-anchor-icon" role="button"
tooltiptext="&urlbar.defaultNotificationAnchor.tooltip;"/> tooltiptext="&urlbar.defaultNotificationAnchor.tooltip;"/>

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

@ -15,7 +15,6 @@ Cu.import("resource://gre/modules/AppConstants.jsm");
Cu.import("resource://gre/modules/AsyncPrefs.jsm"); Cu.import("resource://gre/modules/AsyncPrefs.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "WindowsUIUtils", "@mozilla.org/windows-ui-utils;1", "nsIWindowsUIUtils"); XPCOMUtils.defineLazyServiceGetter(this, "WindowsUIUtils", "@mozilla.org/windows-ui-utils;1", "nsIWindowsUIUtils");
XPCOMUtils.defineLazyServiceGetter(this, "AlertsService", "@mozilla.org/alerts-service;1", "nsIAlertsService");
XPCOMUtils.defineLazyGetter(this, "WeaveService", () => XPCOMUtils.defineLazyGetter(this, "WeaveService", () =>
Cc["@mozilla.org/weave/service;1"].getService().wrappedJSObject Cc["@mozilla.org/weave/service;1"].getService().wrappedJSObject
); );
@ -260,6 +259,7 @@ function BrowserGlue() {
}); });
XPCOMUtils.defineLazyModuleGetter(this, "fxAccounts", "resource://gre/modules/FxAccounts.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "fxAccounts", "resource://gre/modules/FxAccounts.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "AlertsService", "@mozilla.org/alerts-service;1", "nsIAlertsService");
this._init(); this._init();
} }
@ -366,6 +366,9 @@ BrowserGlue.prototype = {
case "fxaccounts:device_connected": case "fxaccounts:device_connected":
this._onDeviceConnected(data); this._onDeviceConnected(data);
break; break;
case "fxaccounts:verify_login":
this._onVerifyLoginNotification(JSON.parse(data));
break;
case "fxaccounts:device_disconnected": case "fxaccounts:device_disconnected":
data = JSON.parse(data); data = JSON.parse(data);
if (data.isLocalDevice) { if (data.isLocalDevice) {
@ -425,6 +428,10 @@ BrowserGlue.prototype = {
Object.defineProperty(this, "fxAccounts", { Object.defineProperty(this, "fxAccounts", {
value: subject.wrappedJSObject value: subject.wrappedJSObject
}); });
} else if (data == "mock-alerts-service") {
Object.defineProperty(this, "AlertsService", {
value: subject.wrappedJSObject
});
} }
break; break;
case "initial-migration-will-import-default-bookmarks": case "initial-migration-will-import-default-bookmarks":
@ -523,6 +530,7 @@ BrowserGlue.prototype = {
os.addObserver(this, "weave:service:ready"); os.addObserver(this, "weave:service:ready");
os.addObserver(this, "fxaccounts:onverified"); os.addObserver(this, "fxaccounts:onverified");
os.addObserver(this, "fxaccounts:device_connected"); os.addObserver(this, "fxaccounts:device_connected");
os.addObserver(this, "fxaccounts:verify_login");
os.addObserver(this, "fxaccounts:device_disconnected"); os.addObserver(this, "fxaccounts:device_disconnected");
os.addObserver(this, "weave:engine:clients:display-uris"); os.addObserver(this, "weave:engine:clients:display-uris");
os.addObserver(this, "session-save"); os.addObserver(this, "session-save");
@ -569,6 +577,7 @@ BrowserGlue.prototype = {
os.removeObserver(this, "weave:service:ready"); os.removeObserver(this, "weave:service:ready");
os.removeObserver(this, "fxaccounts:onverified"); os.removeObserver(this, "fxaccounts:onverified");
os.removeObserver(this, "fxaccounts:device_connected"); os.removeObserver(this, "fxaccounts:device_connected");
os.removeObserver(this, "fxaccounts:verify_login");
os.removeObserver(this, "fxaccounts:device_disconnected"); os.removeObserver(this, "fxaccounts:device_disconnected");
os.removeObserver(this, "weave:engine:clients:display-uris"); os.removeObserver(this, "weave:engine:clients:display-uris");
os.removeObserver(this, "session-save"); os.removeObserver(this, "session-save");
@ -1445,7 +1454,7 @@ BrowserGlue.prototype = {
try { try {
// This will throw NS_ERROR_NOT_AVAILABLE if the notification cannot // This will throw NS_ERROR_NOT_AVAILABLE if the notification cannot
// be displayed per the idl. // be displayed per the idl.
AlertsService.showAlertNotification(null, title, text, this.AlertsService.showAlertNotification(null, title, text,
true, url, clickCallback); true, url, clickCallback);
} catch (e) { } catch (e) {
Cu.reportError(e); Cu.reportError(e);
@ -1711,7 +1720,7 @@ BrowserGlue.prototype = {
return; return;
this._openPreferences("sync", { origin: "doorhanger" }); this._openPreferences("sync", { origin: "doorhanger" });
} }
AlertsService.showAlertNotification(null, title, body, true, null, clickCallback); this.AlertsService.showAlertNotification(null, title, body, true, null, clickCallback);
}, },
// eslint-disable-next-line complexity // eslint-disable-next-line complexity
@ -2298,12 +2307,40 @@ BrowserGlue.prototype = {
if (AppConstants.platform == "win") { if (AppConstants.platform == "win") {
imageURL = "chrome://branding/content/icon64.png"; imageURL = "chrome://branding/content/icon64.png";
} }
AlertsService.showAlertNotification(imageURL, title, body, true, null, clickCallback); this.AlertsService.showAlertNotification(imageURL, title, body, true, null, clickCallback);
} catch (ex) { } catch (ex) {
Cu.reportError("Error displaying tab(s) received by Sync: " + ex); Cu.reportError("Error displaying tab(s) received by Sync: " + ex);
} }
}, },
async _onVerifyLoginNotification({body, title, url}) {
let tab;
let imageURL;
if (AppConstants.platform == "win") {
imageURL = "chrome://branding/content/icon64.png";
}
let win = RecentWindow.getMostRecentBrowserWindow({private: false});
if (!win) {
win = await this._openURLInNewWindow(url);
let tabs = win.gBrowser.tabs;
tab = tabs[tabs.length - 1];
} else {
tab = win.gBrowser.addTab(url);
}
tab.setAttribute("attention", true);
let clickCallback = (subject, topic, data) => {
if (topic != "alertclickcallback")
return;
win.gBrowser.selectedTab = tab;
};
try {
this.AlertsService.showAlertNotification(imageURL, title, body, true, null, clickCallback);
} catch (ex) {
Cu.reportError("Error notifying of a verify login event: " + ex);
}
},
_onDeviceConnected(deviceName) { _onDeviceConnected(deviceName) {
let accountsBundle = Services.strings.createBundle( let accountsBundle = Services.strings.createBundle(
"chrome://browser/locale/accounts.properties" "chrome://browser/locale/accounts.properties"
@ -2326,7 +2363,7 @@ BrowserGlue.prototype = {
}; };
try { try {
AlertsService.showAlertNotification(null, title, body, true, null, clickCallback); this.AlertsService.showAlertNotification(null, title, body, true, null, clickCallback);
} catch (ex) { } catch (ex) {
Cu.reportError("Error notifying of a new Sync device: " + ex); Cu.reportError("Error notifying of a new Sync device: " + ex);
} }
@ -2342,7 +2379,7 @@ BrowserGlue.prototype = {
return; return;
this._openPreferences("sync", { origin: "devDisconnectedAlert"}); this._openPreferences("sync", { origin: "devDisconnectedAlert"});
} }
AlertsService.showAlertNotification(null, title, body, true, null, clickCallback); this.AlertsService.showAlertNotification(null, title, body, true, null, clickCallback);
}, },
_handleFlashHang() { _handleFlashHang() {

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

@ -1,5 +1,5 @@
This is the PDF.js project output, https://github.com/mozilla/pdf.js This is the PDF.js project output, https://github.com/mozilla/pdf.js
Current extension version is: 1.8.497 Current extension version is: 1.8.507
Taken from upstream commit: f2fcf2a5 Taken from upstream commit: 9e4dcf15

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

@ -3698,8 +3698,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}(); }();
var version, build; var version, build;
{ {
exports.version = version = '1.8.497'; exports.version = version = '1.8.507';
exports.build = build = 'f2fcf2a5'; exports.build = build = '9e4dcf15';
} }
exports.getDocument = getDocument; exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort; exports.LoopbackPort = LoopbackPort;
@ -4752,8 +4752,8 @@ if (!_util.globalScope.PDFJS) {
} }
var PDFJS = _util.globalScope.PDFJS; var PDFJS = _util.globalScope.PDFJS;
{ {
PDFJS.version = '1.8.497'; PDFJS.version = '1.8.507';
PDFJS.build = 'f2fcf2a5'; PDFJS.build = '9e4dcf15';
} }
PDFJS.pdfBug = false; PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) { if (PDFJS.verbosity !== undefined) {
@ -10100,8 +10100,8 @@ exports.TilingPattern = TilingPattern;
"use strict"; "use strict";
var pdfjsVersion = '1.8.497'; var pdfjsVersion = '1.8.507';
var pdfjsBuild = 'f2fcf2a5'; var pdfjsBuild = '9e4dcf15';
var pdfjsSharedUtil = __w_pdfjs_require__(0); var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(8); var pdfjsDisplayGlobal = __w_pdfjs_require__(8);
var pdfjsDisplayAPI = __w_pdfjs_require__(3); var pdfjsDisplayAPI = __w_pdfjs_require__(3);

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

@ -4296,7 +4296,7 @@ exports.ColorSpace = ColorSpace;
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
}); });
var ExpertEncoding = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'space', 'exclamsmall', 'Hungarumlautsmall', '', 'dollaroldstyle', 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'questionsmall', '', 'asuperior', 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', '', '', 'isuperior', '', '', 'lsuperior', 'msuperior', 'nsuperior', 'osuperior', '', '', 'rsuperior', 'ssuperior', 'tsuperior', '', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', '', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'exclamdownsmall', 'centoldstyle', 'Lslashsmall', '', '', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', 'Brevesmall', 'Caronsmall', '', 'Dotaccentsmall', '', '', 'Macronsmall', '', '', 'figuredash', 'hypheninferior', '', '', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', '', '', '', 'onequarter', 'onehalf', 'threequarters', 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', '', '', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall', 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall', 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall']; var ExpertEncoding = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'space', 'exclamsmall', 'Hungarumlautsmall', '', 'dollaroldstyle', 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'questionsmall', '', 'asuperior', 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', '', '', '', 'isuperior', '', '', 'lsuperior', 'msuperior', 'nsuperior', 'osuperior', '', '', 'rsuperior', 'ssuperior', 'tsuperior', '', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', '', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'exclamdownsmall', 'centoldstyle', 'Lslashsmall', '', '', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', 'Brevesmall', 'Caronsmall', '', 'Dotaccentsmall', '', '', 'Macronsmall', '', '', 'figuredash', 'hypheninferior', '', '', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', '', '', '', 'onequarter', 'onehalf', 'threequarters', 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', '', '', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall', 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall', 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall'];
var MacExpertEncoding = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'space', 'exclamsmall', 'Hungarumlautsmall', 'centoldstyle', 'dollaroldstyle', 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', '', 'threequartersemdash', '', 'questionsmall', '', '', '', '', 'Ethsmall', '', '', 'onequarter', 'onehalf', 'threequarters', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', '', '', '', '', '', '', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', '', 'parenrightinferior', 'Circumflexsmall', 'hypheninferior', 'Gravesmall', 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', '', '', 'asuperior', 'centsuperior', '', '', '', '', 'Aacutesmall', 'Agravesmall', 'Acircumflexsmall', 'Adieresissmall', 'Atildesmall', 'Aringsmall', 'Ccedillasmall', 'Eacutesmall', 'Egravesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Iacutesmall', 'Igravesmall', 'Icircumflexsmall', 'Idieresissmall', 'Ntildesmall', 'Oacutesmall', 'Ogravesmall', 'Ocircumflexsmall', 'Odieresissmall', 'Otildesmall', 'Uacutesmall', 'Ugravesmall', 'Ucircumflexsmall', 'Udieresissmall', '', 'eightsuperior', 'fourinferior', 'threeinferior', 'sixinferior', 'eightinferior', 'seveninferior', 'Scaronsmall', '', 'centinferior', 'twoinferior', '', 'Dieresissmall', '', 'Caronsmall', 'osuperior', 'fiveinferior', '', 'commainferior', 'periodinferior', 'Yacutesmall', '', 'dollarinferior', '', 'Thornsmall', '', 'nineinferior', 'zeroinferior', 'Zcaronsmall', 'AEsmall', 'Oslashsmall', 'questiondownsmall', 'oneinferior', 'Lslashsmall', '', '', '', '', '', '', 'Cedillasmall', '', '', '', '', '', 'OEsmall', 'figuredash', 'hyphensuperior', '', '', '', '', 'exclamdownsmall', '', 'Ydieresissmall', '', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', 'sixsuperior', 'sevensuperior', 'ninesuperior', 'zerosuperior', '', 'esuperior', 'rsuperior', 'tsuperior', '', '', 'isuperior', 'ssuperior', 'dsuperior', '', '', '', '', '', 'lsuperior', 'Ogoneksmall', 'Brevesmall', 'Macronsmall', 'bsuperior', 'nsuperior', 'msuperior', 'commasuperior', 'periodsuperior', 'Dotaccentsmall', 'Ringsmall']; var MacExpertEncoding = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'space', 'exclamsmall', 'Hungarumlautsmall', 'centoldstyle', 'dollaroldstyle', 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', '', 'threequartersemdash', '', 'questionsmall', '', '', '', '', 'Ethsmall', '', '', 'onequarter', 'onehalf', 'threequarters', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', '', '', '', '', '', '', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', '', 'parenrightinferior', 'Circumflexsmall', 'hypheninferior', 'Gravesmall', 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', '', '', 'asuperior', 'centsuperior', '', '', '', '', 'Aacutesmall', 'Agravesmall', 'Acircumflexsmall', 'Adieresissmall', 'Atildesmall', 'Aringsmall', 'Ccedillasmall', 'Eacutesmall', 'Egravesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Iacutesmall', 'Igravesmall', 'Icircumflexsmall', 'Idieresissmall', 'Ntildesmall', 'Oacutesmall', 'Ogravesmall', 'Ocircumflexsmall', 'Odieresissmall', 'Otildesmall', 'Uacutesmall', 'Ugravesmall', 'Ucircumflexsmall', 'Udieresissmall', '', 'eightsuperior', 'fourinferior', 'threeinferior', 'sixinferior', 'eightinferior', 'seveninferior', 'Scaronsmall', '', 'centinferior', 'twoinferior', '', 'Dieresissmall', '', 'Caronsmall', 'osuperior', 'fiveinferior', '', 'commainferior', 'periodinferior', 'Yacutesmall', '', 'dollarinferior', '', 'Thornsmall', '', 'nineinferior', 'zeroinferior', 'Zcaronsmall', 'AEsmall', 'Oslashsmall', 'questiondownsmall', 'oneinferior', 'Lslashsmall', '', '', '', '', '', '', 'Cedillasmall', '', '', '', '', '', 'OEsmall', 'figuredash', 'hyphensuperior', '', '', '', '', 'exclamdownsmall', '', 'Ydieresissmall', '', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', 'sixsuperior', 'sevensuperior', 'ninesuperior', 'zerosuperior', '', 'esuperior', 'rsuperior', 'tsuperior', '', '', 'isuperior', 'ssuperior', 'dsuperior', '', '', '', '', '', 'lsuperior', 'Ogoneksmall', 'Brevesmall', 'Macronsmall', 'bsuperior', 'nsuperior', 'msuperior', 'commasuperior', 'periodsuperior', 'Dotaccentsmall', 'Ringsmall'];
var MacRomanEncoding = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quotesingle', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', 'grave', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', '', 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde', 'Odieresis', 'Udieresis', 'aacute', 'agrave', 'acircumflex', 'adieresis', 'atilde', 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis', 'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute', 'ograve', 'ocircumflex', 'odieresis', 'otilde', 'uacute', 'ugrave', 'ucircumflex', 'udieresis', 'dagger', 'degree', 'cent', 'sterling', 'section', 'bullet', 'paragraph', 'germandbls', 'registered', 'copyright', 'trademark', 'acute', 'dieresis', 'notequal', 'AE', 'Oslash', 'infinity', 'plusminus', 'lessequal', 'greaterequal', 'yen', 'mu', 'partialdiff', 'summation', 'product', 'pi', 'integral', 'ordfeminine', 'ordmasculine', 'Omega', 'ae', 'oslash', 'questiondown', 'exclamdown', 'logicalnot', 'radical', 'florin', 'approxequal', 'Delta', 'guillemotleft', 'guillemotright', 'ellipsis', 'space', 'Agrave', 'Atilde', 'Otilde', 'OE', 'oe', 'endash', 'emdash', 'quotedblleft', 'quotedblright', 'quoteleft', 'quoteright', 'divide', 'lozenge', 'ydieresis', 'Ydieresis', 'fraction', 'currency', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'daggerdbl', 'periodcentered', 'quotesinglbase', 'quotedblbase', 'perthousand', 'Acircumflex', 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute', 'Icircumflex', 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'apple', 'Ograve', 'Uacute', 'Ucircumflex', 'Ugrave', 'dotlessi', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut', 'ogonek', 'caron']; var MacRomanEncoding = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quotesingle', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', 'grave', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', '', 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde', 'Odieresis', 'Udieresis', 'aacute', 'agrave', 'acircumflex', 'adieresis', 'atilde', 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis', 'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute', 'ograve', 'ocircumflex', 'odieresis', 'otilde', 'uacute', 'ugrave', 'ucircumflex', 'udieresis', 'dagger', 'degree', 'cent', 'sterling', 'section', 'bullet', 'paragraph', 'germandbls', 'registered', 'copyright', 'trademark', 'acute', 'dieresis', 'notequal', 'AE', 'Oslash', 'infinity', 'plusminus', 'lessequal', 'greaterequal', 'yen', 'mu', 'partialdiff', 'summation', 'product', 'pi', 'integral', 'ordfeminine', 'ordmasculine', 'Omega', 'ae', 'oslash', 'questiondown', 'exclamdown', 'logicalnot', 'radical', 'florin', 'approxequal', 'Delta', 'guillemotleft', 'guillemotright', 'ellipsis', 'space', 'Agrave', 'Atilde', 'Otilde', 'OE', 'oe', 'endash', 'emdash', 'quotedblleft', 'quotedblright', 'quoteleft', 'quoteright', 'divide', 'lozenge', 'ydieresis', 'Ydieresis', 'fraction', 'currency', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'daggerdbl', 'periodcentered', 'quotesinglbase', 'quotedblbase', 'perthousand', 'Acircumflex', 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute', 'Icircumflex', 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'apple', 'Ograve', 'Uacute', 'Ucircumflex', 'Ugrave', 'dotlessi', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut', 'ogonek', 'caron'];
var StandardEncoding = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'exclamdown', 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', '', 'endash', 'dagger', 'daggerdbl', 'periodcentered', '', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis', 'perthousand', '', 'questiondown', '', 'grave', 'acute', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'dieresis', '', 'ring', 'cedilla', '', 'hungarumlaut', 'ogonek', 'caron', 'emdash', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'AE', '', 'ordfeminine', '', '', '', '', 'Lslash', 'Oslash', 'OE', 'ordmasculine', '', '', '', '', '', 'ae', '', '', '', 'dotlessi', '', '', 'lslash', 'oslash', 'oe', 'germandbls']; var StandardEncoding = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'exclamdown', 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', '', 'endash', 'dagger', 'daggerdbl', 'periodcentered', '', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis', 'perthousand', '', 'questiondown', '', 'grave', 'acute', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'dieresis', '', 'ring', 'cedilla', '', 'hungarumlaut', 'ogonek', 'caron', 'emdash', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'AE', '', 'ordfeminine', '', '', '', '', 'Lslash', 'Oslash', 'OE', 'ordmasculine', '', '', '', '', '', 'ae', '', '', '', 'dotlessi', '', '', 'lslash', 'oslash', 'oe', 'germandbls'];
@ -24004,6 +24004,7 @@ var WorkerMessageHandler = {
handler.send('GetDoc', { pdfInfo: doc }); handler.send('GetDoc', { pdfInfo: doc });
} }
function onFailure(e) { function onFailure(e) {
ensureNotTerminated();
if (e instanceof _util.PasswordException) { if (e instanceof _util.PasswordException) {
var task = new WorkerTask('PasswordException: response ' + e.code); var task = new WorkerTask('PasswordException: response ' + e.code);
startWorkerTask(task); startWorkerTask(task);
@ -39818,8 +39819,8 @@ exports.Type1Parser = Type1Parser;
"use strict"; "use strict";
var pdfjsVersion = '1.8.497'; var pdfjsVersion = '1.8.507';
var pdfjsBuild = 'f2fcf2a5'; var pdfjsBuild = '9e4dcf15';
var pdfjsCoreWorker = __w_pdfjs_require__(17); var pdfjsCoreWorker = __w_pdfjs_require__(17);
; ;
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler; exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -327,24 +327,13 @@ menuitem.bookmark-item {
-moz-appearance: none; -moz-appearance: none;
-moz-box-align: stretch; -moz-box-align: stretch;
} }
.urlbar-input-box { .urlbar-input-box {
margin: 0; margin: 0;
} }
.urlbar-input-box,
#urlbar-display-box {
padding-inline-start: 4px;
border-inline-start: 1px solid var(--urlbar-separator-color);
border-image: linear-gradient(transparent 15%, var(--urlbar-separator-color) 15%, var(--urlbar-separator-color) 85%, transparent 85%);
border-image-slice: 1;
}
.urlbar-history-dropmarker { .urlbar-history-dropmarker {
-moz-appearance: toolbarbutton-dropdown; -moz-appearance: toolbarbutton-dropdown;
transition: opacity 0.15s ease; transition: opacity 0.15s ease;
} }
#urlbar-wrapper[switchingtabs] > #urlbar > .urlbar-textbox-container > .urlbar-history-dropmarker { #urlbar-wrapper[switchingtabs] > #urlbar > .urlbar-textbox-container > .urlbar-history-dropmarker {
transition: none; transition: none;
} }

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

@ -172,6 +172,12 @@ toolbar:-moz-lwtheme {
border-top: 1px solid rgba(0,0,0,0.65); border-top: 1px solid rgba(0,0,0,0.65);
} }
%ifdef MOZ_PHOTON_THEME
#navigator-toolbox > toolbar:not(#TabsToolbar):not(:-moz-lwtheme) {
-moz-appearance: none;
background: var(--toolbar-background-color);
}
%else
#navigator-toolbox > toolbar:not(#TabsToolbar):not(#nav-bar):not(:-moz-lwtheme) { #navigator-toolbox > toolbar:not(#TabsToolbar):not(#nav-bar):not(:-moz-lwtheme) {
-moz-appearance: none; -moz-appearance: none;
background: url(chrome://browser/skin/Toolbar-background-noise.png) hsl(0,0%,83%); background: url(chrome://browser/skin/Toolbar-background-noise.png) hsl(0,0%,83%);
@ -187,6 +193,7 @@ toolbar:-moz-lwtheme {
background-color: hsl(0,0%,95%); background-color: hsl(0,0%,95%);
} }
} }
%endif
#navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar):not(#nav-bar):not(#addon-bar) { #navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar):not(#nav-bar):not(#addon-bar) {
overflow: -moz-hidden-unscrollable; overflow: -moz-hidden-unscrollable;
@ -200,6 +207,7 @@ toolbar:-moz-lwtheme {
transition: min-height 170ms ease-out, max-height 170ms ease-out, visibility 170ms linear; transition: min-height 170ms ease-out, max-height 170ms ease-out, visibility 170ms linear;
} }
%ifndef MOZ_PHOTON_THEME
#nav-bar { #nav-bar {
-moz-appearance: none; -moz-appearance: none;
background: url(chrome://browser/skin/Toolbar-background-noise.png), background: url(chrome://browser/skin/Toolbar-background-noise.png),
@ -233,6 +241,7 @@ toolbar:-moz-lwtheme {
background: linear-gradient(hsl(0,0%,97%), hsl(0,0%,95%)); background: linear-gradient(hsl(0,0%,97%), hsl(0,0%,95%));
} }
} }
%endif
/* Draw the bottom border of the tabs toolbar when it's not using /* Draw the bottom border of the tabs toolbar when it's not using
-moz-appearance: toolbar. */ -moz-appearance: toolbar. */
@ -273,10 +282,12 @@ toolbar:-moz-lwtheme {
min-height: 23px; min-height: 23px;
} }
%ifndef MOZ_PHOTON_THEME
#navigator-toolbox > toolbar:not(#TabsToolbar):-moz-lwtheme { #navigator-toolbox > toolbar:not(#TabsToolbar):-moz-lwtheme {
background-color: @toolbarColorLWT@; background-color: @toolbarColorLWT@;
background-image: url(chrome://browser/skin/Toolbar-background-noise.png); background-image: url(chrome://browser/skin/Toolbar-background-noise.png);
} }
%endif
#PersonalToolbar:not(:-moz-lwtheme):-moz-window-inactive, #PersonalToolbar:not(:-moz-lwtheme):-moz-window-inactive,
#nav-bar:not(:-moz-lwtheme):-moz-window-inactive { #nav-bar:not(:-moz-lwtheme):-moz-window-inactive {
@ -661,27 +672,16 @@ toolbarpaletteitem[place="palette"] > #personal-bookmarks > #bookmarks-toolbar-p
border-inline-end-style: none; border-inline-end-style: none;
padding-inline-end: 5px; padding-inline-end: 5px;
} }
.urlbar-input-box { .urlbar-input-box {
margin: 0; margin: 0;
padding: 3px 0 2px; padding: 3px 0 2px;
} }
.urlbar-input-box,
#urlbar-display-box {
padding-inline-start: 4px;
border-inline-start: 1px solid var(--urlbar-separator-color);
border-image: linear-gradient(transparent 15%, var(--urlbar-separator-color) 15%, var(--urlbar-separator-color) 85%, transparent 85%);
border-image-slice: 1;
}
.urlbar-history-dropmarker { .urlbar-history-dropmarker {
padding: 0 3px; padding: 0 3px;
list-style-image: var(--urlbar-dropmarker-url); list-style-image: var(--urlbar-dropmarker-url);
-moz-image-region: var(--urlbar-dropmarker-region); -moz-image-region: var(--urlbar-dropmarker-region);
transition: opacity 0.15s ease; transition: opacity 0.15s ease;
} }
#urlbar-wrapper[switchingtabs] > #urlbar > .urlbar-textbox-container > .urlbar-history-dropmarker { #urlbar-wrapper[switchingtabs] > #urlbar > .urlbar-textbox-container > .urlbar-history-dropmarker {
transition: none; transition: none;
} }

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

@ -151,7 +151,9 @@ browser.jar:
skin/classic/browser/sync-mobileIcon.svg (../shared/sync-mobileIcon.svg) skin/classic/browser/sync-mobileIcon.svg (../shared/sync-mobileIcon.svg)
skin/classic/browser/syncProgress-horizontalbar.png skin/classic/browser/syncProgress-horizontalbar.png
skin/classic/browser/syncProgress-horizontalbar@2x.png skin/classic/browser/syncProgress-horizontalbar@2x.png
#ifndef MOZ_PHOTON_THEME
skin/classic/browser/Toolbar-background-noise.png (Toolbar-background-noise.png) skin/classic/browser/Toolbar-background-noise.png (Toolbar-background-noise.png)
#endif
skin/classic/browser/yosemite/menuPanel-customize.png (menuPanel-customize-yosemite.png) skin/classic/browser/yosemite/menuPanel-customize.png (menuPanel-customize-yosemite.png)
skin/classic/browser/yosemite/menuPanel-customize@2x.png (menuPanel-customize-yosemite@2x.png) skin/classic/browser/yosemite/menuPanel-customize@2x.png (menuPanel-customize-yosemite@2x.png)
skin/classic/browser/yosemite/menuPanel-exit.png (menuPanel-exit-yosemite.png) skin/classic/browser/yosemite/menuPanel-exit.png (menuPanel-exit-yosemite.png)

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

@ -9,29 +9,21 @@
svg > rect:not(:target) { svg > rect:not(:target) {
display: none; display: none;
} }
#connection-secure {
fill: #4d9a26;
}
</style> </style>
<defs> <defs>
<rect id="shape-lock-clasp-outer" x="5" y="1" width="14" height="20" rx="7" ry="7" /> <rect id="shape-lock-clasp-outer" x="5" y="1" width="14" height="20" rx="7" ry="7" />
<rect id="shape-lock-clasp-inner" x="8" y="4" width="8" height="14" rx="4" ry="4" /> <rect id="shape-lock-clasp-inner" x="8" y="4" width="8" height="14" rx="4" ry="4" />
<rect id="shape-lock-base" x="3" y="10" width="18" height="13" rx="1.5" ry="1.5" /> <rect id="shape-lock-base" x="3" y="10" width="18" height="13" rx="1.5" ry="1.5" />
<mask id="mask-clasp-cutout"> <mask id="mask-clasp-cutout">
<rect width="24" height="24" fill="#000" /> <rect width="24" height="24" fill="#000" />
<use xlink:href="#shape-lock-clasp-outer" fill="#fff" /> <use xlink:href="#shape-lock-clasp-outer" fill="#fff" />
<use xlink:href="#shape-lock-clasp-inner" fill="#000" /> <use xlink:href="#shape-lock-clasp-inner" fill="#000" />
</mask> </mask>
<mask id="mask-lock"> <mask id="mask-lock">
<use xlink:href="#shape-lock-clasp-outer" mask="url(#mask-clasp-cutout)" fill="#fff"/> <use xlink:href="#shape-lock-clasp-outer" mask="url(#mask-clasp-cutout)" fill="#fff"/>
<use xlink:href="#shape-lock-base" fill="#fff"/> <use xlink:href="#shape-lock-base" fill="#fff"/>
</mask> </mask>
</defs> </defs>
<rect id="connection-degraded" class="fieldtext" width="24" height="24" mask="url(#mask-lock)"/> <rect id="connection-degraded" class="fieldtext" width="24" height="24" mask="url(#mask-lock)"/>
<rect id="connection-secure" width="24" height="24" mask="url(#mask-lock)"/> <rect id="connection-secure" width="24" height="24" mask="url(#mask-lock)" fill="context-fill"/>
</svg> </svg>

До

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

После

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

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

@ -204,17 +204,17 @@
.identity-popup-warning-yellow:-moz-locale-dir(rtl) { .identity-popup-warning-yellow:-moz-locale-dir(rtl) {
background-position: 100% 50%; background-position: 100% 50%;
} }
/* SECURITY */ /* SECURITY */
.identity-popup-connection-secure { .identity-popup-connection-secure {
%ifdef MOZ_PHOTON_THEME
color: #058B00;
%else
color: #418220; color: #418220;
%endif
} }
.identity-popup-connection-not-secure { .identity-popup-connection-not-secure {
color: #d74345; color: #d74345;
} }
#identity-popup-securityView { #identity-popup-securityView {
overflow: hidden; overflow: hidden;
} }
@ -228,12 +228,16 @@
#identity-popup[connection=chrome] #identity-popup-security-content { #identity-popup[connection=chrome] #identity-popup-security-content {
background-image: url(chrome://branding/content/icon48.png); background-image: url(chrome://branding/content/icon48.png);
} }
#identity-popup[connection^=secure] #identity-popup-securityView, #identity-popup[connection^=secure] #identity-popup-securityView,
#identity-popup[connection^=secure] #identity-popup-security-content { #identity-popup[connection^=secure] #identity-popup-security-content {
background-image: url(chrome://browser/skin/controlcenter/connection.svg#connection-secure); background-image: url(chrome://browser/skin/controlcenter/connection.svg#connection-secure);
-moz-context-properties: fill;
%ifdef MOZ_PHOTON_THEME
fill: #12BC00;
%else
fill: #4d9a26;
%endif
} }
/* Use [isbroken] to make sure we don't show a lock on an http page. See Bug 1192162. */ /* Use [isbroken] to make sure we don't show a lock on an http page. See Bug 1192162. */
#identity-popup[ciphers=weak] #identity-popup-securityView, #identity-popup[ciphers=weak] #identity-popup-securityView,
#identity-popup[ciphers=weak] #identity-popup-security-content, #identity-popup[ciphers=weak] #identity-popup-security-content,

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

@ -4,24 +4,16 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="16" height="16" viewBox="0 0 16 16"> width="16" height="16" viewBox="0 0 16 16">
<style>
.icon-default {
fill: #4d9a26;
}
</style>
<defs> <defs>
<rect id="shape-lock-clasp-outer" x="4" y="2" width="8" height="10" rx="4" ry="4" /> <rect id="shape-lock-clasp-outer" x="4" y="2" width="8" height="10" rx="4" ry="4" />
<rect id="shape-lock-clasp-inner" x="6" y="4" width="4" height="6" rx="2" ry="2" /> <rect id="shape-lock-clasp-inner" x="6" y="4" width="4" height="6" rx="2" ry="2" />
<rect id="shape-lock-base" x="3" y="7" width="10" height="7" rx="1" ry="1" /> <rect id="shape-lock-base" x="3" y="7" width="10" height="7" rx="1" ry="1" />
<mask id="mask-clasp-cutout"> <mask id="mask-clasp-cutout">
<rect width="16" height="16" fill="#000" /> <rect width="16" height="16" fill="#000" />
<use xlink:href="#shape-lock-clasp-outer" fill="#fff" /> <use xlink:href="#shape-lock-clasp-outer" fill="#fff" />
<use xlink:href="#shape-lock-clasp-inner" fill="#000" /> <use xlink:href="#shape-lock-clasp-inner" fill="#000" />
</mask> </mask>
</defs> </defs>
<use xlink:href="#shape-lock-clasp-outer" mask="url(#mask-clasp-cutout)" class="icon-default" fill="context-fill"/>
<use xlink:href="#shape-lock-clasp-outer" mask="url(#mask-clasp-cutout)" class="icon-default" /> <use xlink:href="#shape-lock-base" class="icon-default" fill="context-fill"/>
<use xlink:href="#shape-lock-base" class="icon-default" />
</svg> </svg>

До

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

После

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

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

@ -18,10 +18,21 @@
overflow: hidden; overflow: hidden;
} }
#urlbar[pageproxystate="valid"] > #identity-box.verifiedIdentity > #identity-icon-labels { %ifdef MOZ_PHOTON_THEME
color: hsl(92,100%,30%); #identity-box:hover:not(.no-hover),
#identity-box[open=true],
#identity-box.grantedPermissions[open=true] {
background-color: hsla(240, 5%, 5%, .05);
} }
%endif
#urlbar[pageproxystate="valid"] > #identity-box.verifiedIdentity > #identity-icon-labels {
%ifdef MOZ_PHOTON_THEME
color: #058B00;
%else
color: hsl(92,100%,30%);
%endif
}
#urlbar[pageproxystate="valid"] > #identity-box.chromeUI > #identity-icon-labels { #urlbar[pageproxystate="valid"] > #identity-box.chromeUI > #identity-icon-labels {
%ifdef MOZ_OFFICIAL_BRANDING %ifdef MOZ_OFFICIAL_BRANDING
color: rgb(229,115,0); color: rgb(229,115,0);
@ -33,16 +44,48 @@
#identity-icon-labels:-moz-locale-dir(ltr) { #identity-icon-labels:-moz-locale-dir(ltr) {
padding-left: 2px; padding-left: 2px;
} }
#identity-icon-labels:-moz-locale-dir(rtl) { #identity-icon-labels:-moz-locale-dir(rtl) {
padding-right: 2px; padding-right: 2px;
} }
%ifdef MOZ_PHOTON_THEME
#identity-box:not(.chromeUI) {
--urlbar-separator-color: transparent;
}
#urlbar[pageproxystate=valid] > #identity-box.verifiedIdentity {
--urlbar-separator-color: rgba(18, 188, 0, .5);
}
%endif
#identity-box {
padding-inline-end: 2px;
margin-inline-end: 2px;
}
#urlbar[pageproxystate=valid] > #identity-box.verifiedIdentity,
#urlbar[pageproxystate=valid] > #identity-box.chromeUI,
#urlbar-display-box {
margin-inline-end: 4px;
border-inline-end: 1px solid var(--urlbar-separator-color);
border-image: linear-gradient(transparent 15%, var(--urlbar-separator-color) 15%, var(--urlbar-separator-color) 85%, transparent 85%);
border-image-slice: 1;
}
#urlbar[pageproxystate=valid] > #identity-box.verifiedIdentity,
#urlbar[pageproxystate=valid] > #identity-box.chromeUI {
padding-inline-end: 4px;
}
#urlbar-display-box {
padding-inline-start: 4px;
border-inline-start: 1px solid var(--urlbar-separator-color);
border-image: linear-gradient(transparent 15%, var(--urlbar-separator-color) 15%, var(--urlbar-separator-color) 85%, transparent 85%);
border-image-slice: 1;
}
%ifndef MOZ_PHOTON_THEME %ifndef MOZ_PHOTON_THEME
@conditionalForwardWithUrlbar@ > #forward-button[disabled] + #urlbar > #identity-box { @conditionalForwardWithUrlbar@ > #forward-button[disabled] + #urlbar > #identity-box {
padding-inline-start: calc(var(--backbutton-urlbar-overlap) + 5px); padding-inline-start: calc(var(--backbutton-urlbar-overlap) + 5px);
} }
@conditionalForwardWithUrlbar@:hover:not([switchingtabs]) > #forward-button[disabled] + #urlbar > #identity-box { @conditionalForwardWithUrlbar@:hover:not([switchingtabs]) > #forward-button[disabled] + #urlbar > #identity-box {
/* Forward button hiding is delayed when hovered, so we should use the same /* Forward button hiding is delayed when hovered, so we should use the same
delay for the identity box. We handle both horizontal paddings (for LTR and delay for the identity box. We handle both horizontal paddings (for LTR and
@ -77,32 +120,28 @@
#extension-icon:-moz-lwtheme { #extension-icon:-moz-lwtheme {
fill: rgba(0,0,0,.6); fill: rgba(0,0,0,.6);
} }
/* MAIN IDENTITY ICON */ /* MAIN IDENTITY ICON */
#identity-icon { #identity-icon {
margin-inline-start: 0; margin-inline-start: 0;
list-style-image: url(chrome://browser/skin/identity-icon.svg); list-style-image: url(chrome://browser/skin/identity-icon.svg);
} }
%ifndef MOZ_PHOTON_THEME
#identity-box:hover > #identity-icon:not(.no-hover), #identity-box:not(.no-hover):hover > #identity-icon,
#identity-box[open=true] > #identity-icon { #identity-box[open=true] > #identity-icon {
list-style-image: url(chrome://browser/skin/identity-icon-hover.svg); list-style-image: url(chrome://browser/skin/identity-icon-hover.svg);
} }
#identity-box.grantedPermissions:not(.no-hover):hover > #identity-icon,
#identity-box.grantedPermissions[open=true] > #identity-icon {
list-style-image: url(chrome://browser/skin/identity-icon-notice-hover.svg);
}
%endif
#identity-box.grantedPermissions > #identity-icon { #identity-box.grantedPermissions > #identity-icon {
list-style-image: url(chrome://browser/skin/identity-icon-notice.svg); list-style-image: url(chrome://browser/skin/identity-icon-notice.svg);
} }
#identity-box.grantedPermissions:hover > #identity-icon:not(.no-hover),
#identity-box.grantedPermissions[open=true] > #identity-icon {
list-style-image: url(chrome://browser/skin/identity-icon-notice-hover.svg);
}
#urlbar[pageproxystate="valid"] > #identity-box.chromeUI > #identity-icon { #urlbar[pageproxystate="valid"] > #identity-box.chromeUI > #identity-icon {
list-style-image: url(chrome://branding/content/identity-icons-brand.svg); list-style-image: url(chrome://branding/content/identity-icons-brand.svg);
} }
#urlbar[pageproxystate="invalid"] > #identity-box > #identity-icon { #urlbar[pageproxystate="invalid"] > #identity-box > #identity-icon {
opacity: .3; opacity: .3;
} }
@ -193,14 +232,17 @@
#extension-icon { #extension-icon {
visibility: collapse; visibility: collapse;
} }
#urlbar[pageproxystate="valid"] > #identity-box.verifiedDomain > #connection-icon, #urlbar[pageproxystate="valid"] > #identity-box.verifiedDomain > #connection-icon,
#urlbar[pageproxystate="valid"] > #identity-box.verifiedIdentity > #connection-icon, #urlbar[pageproxystate="valid"] > #identity-box.verifiedIdentity > #connection-icon,
#urlbar[pageproxystate="valid"] > #identity-box.mixedActiveBlocked > #connection-icon { #urlbar[pageproxystate="valid"] > #identity-box.mixedActiveBlocked > #connection-icon {
list-style-image: url(chrome://browser/skin/connection-secure.svg); list-style-image: url(chrome://browser/skin/connection-secure.svg);
visibility: visible; visibility: visible;
%ifdef MOZ_PHOTON_THEME
fill: #12BC00;
%else
fill: #4d9a26;
%endif
} }
#urlbar[pageproxystate="valid"] > #identity-box.weakCipher > #connection-icon, #urlbar[pageproxystate="valid"] > #identity-box.weakCipher > #connection-icon,
#urlbar[pageproxystate="valid"] > #identity-box.mixedDisplayContent > #connection-icon, #urlbar[pageproxystate="valid"] > #identity-box.mixedDisplayContent > #connection-icon,
#urlbar[pageproxystate="valid"] > #identity-box.mixedDisplayContentLoadedActiveBlocked > #connection-icon, #urlbar[pageproxystate="valid"] > #identity-box.mixedDisplayContentLoadedActiveBlocked > #connection-icon,

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

@ -71,9 +71,11 @@
skin/classic/browser/connection-mixed-passive-loaded.svg (../shared/identity-block/connection-mixed-passive-loaded.svg) skin/classic/browser/connection-mixed-passive-loaded.svg (../shared/identity-block/connection-mixed-passive-loaded.svg)
skin/classic/browser/connection-mixed-active-loaded.svg (../shared/identity-block/connection-mixed-active-loaded.svg) skin/classic/browser/connection-mixed-active-loaded.svg (../shared/identity-block/connection-mixed-active-loaded.svg)
skin/classic/browser/identity-icon.svg (../shared/identity-block/identity-icon.svg) skin/classic/browser/identity-icon.svg (../shared/identity-block/identity-icon.svg)
skin/classic/browser/identity-icon-hover.svg (../shared/identity-block/identity-icon-hover.svg)
skin/classic/browser/identity-icon-notice.svg (../shared/identity-block/identity-icon-notice.svg) skin/classic/browser/identity-icon-notice.svg (../shared/identity-block/identity-icon-notice.svg)
#ifndef MOZ_PHOTON_THEME
skin/classic/browser/identity-icon-hover.svg (../shared/identity-block/identity-icon-hover.svg)
skin/classic/browser/identity-icon-notice-hover.svg (../shared/identity-block/identity-icon-notice-hover.svg) skin/classic/browser/identity-icon-notice-hover.svg (../shared/identity-block/identity-icon-notice-hover.svg)
#endif
skin/classic/browser/info.svg (../shared/info.svg) skin/classic/browser/info.svg (../shared/info.svg)
* skin/classic/browser/menuPanel.svg (../shared/menuPanel.svg) * skin/classic/browser/menuPanel.svg (../shared/menuPanel.svg)
* skin/classic/browser/menuPanel-small.svg (../shared/menuPanel-small.svg) * skin/classic/browser/menuPanel-small.svg (../shared/menuPanel-small.svg)

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

@ -136,6 +136,11 @@ toolbar[brighttext] {
border-bottom-color: rgba(0,0,0,.3); border-bottom-color: rgba(0,0,0,.3);
} }
%ifdef MOZ_PHOTON_THEME
#navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar):not(:-moz-lwtheme) {
background-color: var(--toolbar-background-color);
}
%else
#navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar) { #navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar) {
background-clip: padding-box; background-clip: padding-box;
background-image: linear-gradient(@toolbarHighlight@, @toolbarHighlight@); background-image: linear-gradient(@toolbarHighlight@, @toolbarHighlight@);
@ -154,6 +159,7 @@ toolbar[brighttext] {
#navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar):not(:-moz-lwtheme) { #navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar):not(:-moz-lwtheme) {
background-color: -moz-Dialog; background-color: -moz-Dialog;
} }
%endif
#navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar):not(#nav-bar):not(#addon-bar) { #navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar):not(#nav-bar):not(#addon-bar) {
overflow: -moz-hidden-unscrollable; overflow: -moz-hidden-unscrollable;
@ -825,23 +831,12 @@ html|*.urlbar-input:-moz-lwtheme::placeholder,
.urlbar-textbox-container { .urlbar-textbox-container {
-moz-box-align: stretch; -moz-box-align: stretch;
} }
.urlbar-input-box { .urlbar-input-box {
margin: 0; margin: 0;
} }
.urlbar-input-box,
#urlbar-display-box {
padding-inline-start: 4px;
border-inline-start: 1px solid var(--urlbar-separator-color);
border-image: linear-gradient(transparent 15%, var(--urlbar-separator-color) 15%, var(--urlbar-separator-color) 85%, transparent 85%);
border-image-slice: 1;
}
#urlbar-icons { #urlbar-icons {
-moz-box-align: center; -moz-box-align: center;
} }
.urlbar-icon { .urlbar-icon {
padding: 0 3px; padding: 0 3px;
/* 16x16 icon with border-box sizing */ /* 16x16 icon with border-box sizing */

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

@ -161,7 +161,8 @@ inline bool isInIgnoredNamespaceForImplicitCtor(const Decl *Declaration) {
Name == "dwarf2reader" || // dwarf2reader Name == "dwarf2reader" || // dwarf2reader
Name == "arm_ex_to_module" || // arm_ex_to_module Name == "arm_ex_to_module" || // arm_ex_to_module
Name == "testing" || // gtest Name == "testing" || // gtest
Name == "Json"; // jsoncpp Name == "Json" || // jsoncpp
Name == "pdfium"; // upstream pdfium 'base' package
} }
inline bool isInIgnoredNamespaceForImplicitConversion(const Decl *Declaration) { inline bool isInIgnoredNamespaceForImplicitConversion(const Decl *Declaration) {
@ -194,7 +195,8 @@ inline bool isIgnoredPathForImplicitCtor(const Decl *Declaration) {
Begin->compare_lower(StringRef("icu")) == 0 || Begin->compare_lower(StringRef("icu")) == 0 ||
Begin->compare_lower(StringRef("libcubeb")) == 0 || Begin->compare_lower(StringRef("libcubeb")) == 0 ||
Begin->compare_lower(StringRef("libstagefright")) == 0 || Begin->compare_lower(StringRef("libstagefright")) == 0 ||
Begin->compare_lower(StringRef("cairo")) == 0) { Begin->compare_lower(StringRef("cairo")) == 0 ||
Begin->compare_lower(StringRef("pdfium")) == 0) {
return true; return true;
} }
if (Begin->compare_lower(StringRef("chromium")) == 0) { if (Begin->compare_lower(StringRef("chromium")) == 0) {
@ -247,7 +249,8 @@ inline bool isIgnoredPathForSprintfLiteral(const CallExpr *Call, const SourceMan
Begin->compare_lower(StringRef("skia")) == 0 || Begin->compare_lower(StringRef("skia")) == 0 ||
Begin->compare_lower(StringRef("sfntly")) == 0 || Begin->compare_lower(StringRef("sfntly")) == 0 ||
// Gtest uses snprintf as GTEST_SNPRINTF_ with sizeof // Gtest uses snprintf as GTEST_SNPRINTF_ with sizeof
Begin->compare_lower(StringRef("testing")) == 0) { Begin->compare_lower(StringRef("testing")) == 0 ||
Begin->compare_lower(StringRef("pdfium")) == 0) {
return true; return true;
} }
if (Begin->compare_lower(StringRef("webrtc")) == 0) { if (Begin->compare_lower(StringRef("webrtc")) == 0) {

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

@ -55,16 +55,19 @@ httpWin.onload = function() {
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Test 2: window.open(data:) // Test 2: window.open(data:)
var dataWin = window.open("data:text/html,<html><body>data</body></html>", "_blank", "width=10,height=10"); var dataWin = window.open("data:text/html,<html><script>opener.postMessage('loaded','*');<\/script></html>", "_blank", "width=10,height=10");
dataWin.onload = function() { window.onmessage = function (evt) {
var dataChannel = SpecialPowers.wrap(dataWin.document).docShell.currentDocumentChannel; is(evt.data, "loaded", "message should be loaded");
var doc = SpecialPowers.wrap(dataWin).document;
var dataChannel = doc.docShell.currentDocumentChannel;
var dataTriggeringPrincipal = dataChannel.loadInfo.triggeringPrincipal.URI.asciiSpec; var dataTriggeringPrincipal = dataChannel.loadInfo.triggeringPrincipal.URI.asciiSpec;
var dataLoadingPrincipal = dataChannel.loadInfo.loadingPrincipal; var dataLoadingPrincipal = dataChannel.loadInfo.loadingPrincipal;
is(dataTriggeringPrincipal, TRIGGERING_PRINCIPAL_URI, is(dataTriggeringPrincipal, TRIGGERING_PRINCIPAL_URI,
"TriggeringPrincipal for window.open(data:) should be the principal of the document"); "TriggeringPrincipal for window.open(data:) should be the principal of the document");
is(dataWin.document.referrer, "", is(doc.referrer, "",
"Referrer for window.open(data:) should be empty"); "Referrer for window.open(data:) should be empty");
is(dataLoadingPrincipal, null, is(dataLoadingPrincipal, null,

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

@ -1441,7 +1441,13 @@ FireForgetSkippable(uint32_t aSuspected, bool aRemoveChildless,
FinishAnyIncrementalGC(); FinishAnyIncrementalGC();
bool earlyForgetSkippable = bool earlyForgetSkippable =
sCleanupsSinceLastGC < NS_MAJOR_FORGET_SKIPPABLE_CALLS; sCleanupsSinceLastGC < NS_MAJOR_FORGET_SKIPPABLE_CALLS;
nsCycleCollector_forgetSkippable(aRemoveChildless, earlyForgetSkippable);
int64_t budgetMs = aDeadline.IsNull() ?
kForgetSkippableSliceDuration :
int64_t((aDeadline - TimeStamp::Now()).ToMilliseconds());
js::SliceBudget budget = js::SliceBudget(js::TimeBudget(budgetMs));
nsCycleCollector_forgetSkippable(budget, aRemoveChildless, earlyForgetSkippable);
sPreviousSuspectedCount = nsCycleCollector_suspectedCount(); sPreviousSuspectedCount = nsCycleCollector_suspectedCount();
++sCleanupsSinceLastGC; ++sCleanupsSinceLastGC;
PRTime delta = PR_Now() - startTime; PRTime delta = PR_Now() - startTime;

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

@ -218,6 +218,8 @@ var tests =
{ method: "GET", withUpload: none, testAbort: true, testRedirectError: false, testNetworkError: false, { method: "GET", withUpload: none, testAbort: true, testRedirectError: false, testNetworkError: false,
expectedEvents: [{target: XHR, type: "loadstart", optional: false}, expectedEvents: [{target: XHR, type: "loadstart", optional: false},
{target: XHR, type: "progress", optional: true}, {target: XHR, type: "progress", optional: true},
{target: UPLOAD, type: "abort", optional: false},
{target: UPLOAD, type: "loadend", optional: false},
{target: XHR, type: "abort", optional: false}, {target: XHR, type: "abort", optional: false},
{target: XHR, type: "loadend", optional: false}]}, {target: XHR, type: "loadend", optional: false}]},
{ method: "GET", withUpload: none, testAbort: false, testRedirectError: true, testNetworkError: false, { method: "GET", withUpload: none, testAbort: false, testRedirectError: true, testNetworkError: false,
@ -237,6 +239,8 @@ var tests =
{ method: "GET", withUpload: small, testAbort: true, testRedirectError: false, testNetworkError: false, { method: "GET", withUpload: small, testAbort: true, testRedirectError: false, testNetworkError: false,
expectedEvents: [{target: XHR, type: "loadstart", optional: false}, expectedEvents: [{target: XHR, type: "loadstart", optional: false},
{target: XHR, type: "progress", optional: true}, {target: XHR, type: "progress", optional: true},
{target: UPLOAD, type: "abort", optional: false},
{target: UPLOAD, type: "loadend", optional: false},
{target: XHR, type: "abort", optional: false}, {target: XHR, type: "abort", optional: false},
{target: XHR, type: "loadend", optional: false}]}, {target: XHR, type: "loadend", optional: false}]},
{ method: "GET", withUpload: small, testAbort: false, testRedirectError: true, testNetworkError: false, { method: "GET", withUpload: small, testAbort: false, testRedirectError: true, testNetworkError: false,
@ -256,6 +260,8 @@ var tests =
{ method: "GET", withUpload: mid, testAbort: true, testRedirectError: false, testNetworkError: false, { method: "GET", withUpload: mid, testAbort: true, testRedirectError: false, testNetworkError: false,
expectedEvents: [{target: XHR, type: "loadstart", optional: false}, expectedEvents: [{target: XHR, type: "loadstart", optional: false},
{target: XHR, type: "progress", optional: true}, {target: XHR, type: "progress", optional: true},
{target: UPLOAD, type: "abort", optional: false},
{target: UPLOAD, type: "loadend", optional: false},
{target: XHR, type: "abort", optional: false}, {target: XHR, type: "abort", optional: false},
{target: XHR, type: "loadend", optional: false}]}, {target: XHR, type: "loadend", optional: false}]},
{ method: "GET", withUpload: mid, testAbort: false, testRedirectError: true, testNetworkError: false, { method: "GET", withUpload: mid, testAbort: false, testRedirectError: true, testNetworkError: false,
@ -275,6 +281,8 @@ var tests =
{ method: "GET", withUpload: large, testAbort: true, testRedirectError: false, testNetworkError: false, { method: "GET", withUpload: large, testAbort: true, testRedirectError: false, testNetworkError: false,
expectedEvents: [{target: XHR, type: "loadstart", optional: false}, expectedEvents: [{target: XHR, type: "loadstart", optional: false},
{target: XHR, type: "progress", optional: true}, {target: XHR, type: "progress", optional: true},
{target: UPLOAD, type: "abort", optional: false},
{target: UPLOAD, type: "loadend", optional: false},
{target: XHR, type: "abort", optional: false}, {target: XHR, type: "abort", optional: false},
{target: XHR, type: "loadend", optional: false}]}, {target: XHR, type: "loadend", optional: false}]},
{ method: "GET", withUpload: large, testAbort: false, testRedirectError: true, testNetworkError: false, { method: "GET", withUpload: large, testAbort: false, testRedirectError: true, testNetworkError: false,
@ -294,6 +302,8 @@ var tests =
{ method: "POST", withUpload: none, testAbort: true, testRedirectError: false, testNetworkError: false, { method: "POST", withUpload: none, testAbort: true, testRedirectError: false, testNetworkError: false,
expectedEvents: [{target: XHR, type: "loadstart", optional: false}, expectedEvents: [{target: XHR, type: "loadstart", optional: false},
{target: XHR, type: "progress", optional: true}, {target: XHR, type: "progress", optional: true},
{target: UPLOAD, type: "abort", optional: false},
{target: UPLOAD, type: "loadend", optional: false},
{target: XHR, type: "abort", optional: false}, {target: XHR, type: "abort", optional: false},
{target: XHR, type: "loadend", optional: false}]}, {target: XHR, type: "loadend", optional: false}]},
{ method: "POST", withUpload: none, testAbort: false, testRedirectError: true, testNetworkError: false, { method: "POST", withUpload: none, testAbort: false, testRedirectError: true, testNetworkError: false,

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

@ -174,3 +174,6 @@ include filters/reftest.list
# Bug 1366027 # Bug 1366027
== clipped-dash-stroke-rect.html clipped-dash-stroke-rect-ref.html == clipped-dash-stroke-rect.html clipped-dash-stroke-rect-ref.html
# Bug 1377303
== visible-occluded.html visible-occluded-ref.html

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

@ -0,0 +1,127 @@
<!DOCTYPE html>
<meta charset='UTF-8'>
<!--
Color Test
Clear the four quadrants of the canvas as follows:
+------+------+
| blue |black |
| | |
+------+------+
| red |green |
| | |
+------+------+
Clear with a given alpha value. What effect this has depends on the
context-creation args passed to this page.
-->
<html class='reftest-wait'>
<head>
<script type='text/javascript' src='webgl-utils.js'></script>
<script type='text/javascript'>
'use strict';
var COLOR_VALUE = 127.0 / 255.0;
var ALPHA_VALUE = 127.0 / 255.0;
function renderFrame(gl) {
gl.enable(gl.SCISSOR_TEST);
gl.scissor(0, 0, 100, 100);
gl.clearColor(COLOR_VALUE, 0.0, 0.0, ALPHA_VALUE);
gl.clear(gl.COLOR_BUFFER_BIT);
gl.scissor(100, 0, 100, 100);
gl.clearColor(0.0, COLOR_VALUE, 0.0, ALPHA_VALUE);
gl.clear(gl.COLOR_BUFFER_BIT);
gl.scissor(0, 100, 100, 100);
gl.clearColor(0.0, 0.0, COLOR_VALUE, ALPHA_VALUE);
gl.clear(gl.COLOR_BUFFER_BIT);
gl.scissor(100, 100, 100, 100);
gl.clearColor(0.0, 0.0, 0.0, ALPHA_VALUE);
gl.clear(gl.COLOR_BUFFER_BIT);
gl.scissor(0, 75, 50, 50);
gl.clearColor(0.0, 0.0, 1.0, 1.0);
gl.clear(gl.COLOR_BUFFER_BIT);
}
////////////////////////////////////////////////////////////////////////////////
// Boilerplate
var TIMEOUT_MS = 30 * 1000;
function setStatus(text) {
var elem = document.getElementById('status');
elem.innerHTML = text;
}
var gIsComplete = false;
function markComplete(statusText) {
if (!statusText)
statusText = '';
if (gIsComplete)
return;
gIsComplete = true;
setStatus(statusText);
document.documentElement.removeAttribute('class');
}
function markError(text) {
markComplete('Error: ' + text);
}
function markTimedOut() {
markError('Timed out waiting on test completion.');
}
function runFrame(gl, frameCount, maxFrameCount) {
renderFrame(gl);
frameCount++;
if (frameCount >= maxFrameCount) {
console.log('Rendered ' + frameCount + ' frames.');
markComplete();
return;
}
requestAnimationFrame(function(){
runFrame(gl, frameCount, maxFrameCount);
});
}
function runTest() {
var canvas = document.getElementById('canvas');
var gl = initGL(canvas);
if (!gl) {
markError('WebGL context creation failed.');
return;
}
var maxFrameCount = arg('frame', 1);
if (maxFrameCount < 1) {
markError('Invalid `frame` arg: ' + maxFrameCount);
return;
}
setStatus('Waiting...');
runFrame(gl, 0, maxFrameCount);
setTimeout(markTimedOut, TIMEOUT_MS);
}
</script>
</head>
<body onload='runTest();'>
<canvas style="position:fixed; left: 0px; top: 0px;" id='canvas' width='200' height='200'></canvas>
<div id='status'></div>
</body>
</html>

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

@ -0,0 +1,124 @@
<!DOCTYPE html>
<meta charset='UTF-8'>
<!--
Color Test
Clear the four quadrants of the canvas as follows:
+------+------+
| blue |black |
| | |
+------+------+
| red |green |
| | |
+------+------+
Clear with a given alpha value. What effect this has depends on the
context-creation args passed to this page.
-->
<html class='reftest-wait'>
<head>
<script type='text/javascript' src='webgl-utils.js'></script>
<script type='text/javascript'>
'use strict';
var COLOR_VALUE = 127.0 / 255.0;
var ALPHA_VALUE = 127.0 / 255.0;
function renderFrame(gl) {
gl.enable(gl.SCISSOR_TEST);
gl.scissor(0, 0, 100, 100);
gl.clearColor(COLOR_VALUE, 0.0, 0.0, ALPHA_VALUE);
gl.clear(gl.COLOR_BUFFER_BIT);
gl.scissor(100, 0, 100, 100);
gl.clearColor(0.0, COLOR_VALUE, 0.0, ALPHA_VALUE);
gl.clear(gl.COLOR_BUFFER_BIT);
gl.scissor(0, 100, 100, 100);
gl.clearColor(0.0, 0.0, COLOR_VALUE, ALPHA_VALUE);
gl.clear(gl.COLOR_BUFFER_BIT);
gl.scissor(100, 100, 100, 100);
gl.clearColor(0.0, 0.0, 0.0, ALPHA_VALUE);
gl.clear(gl.COLOR_BUFFER_BIT);
}
////////////////////////////////////////////////////////////////////////////////
// Boilerplate
var TIMEOUT_MS = 30 * 1000;
function setStatus(text) {
var elem = document.getElementById('status');
elem.innerHTML = text;
}
var gIsComplete = false;
function markComplete(statusText) {
if (!statusText)
statusText = '';
if (gIsComplete)
return;
gIsComplete = true;
setStatus(statusText);
document.documentElement.removeAttribute('class');
}
function markError(text) {
markComplete('Error: ' + text);
}
function markTimedOut() {
markError('Timed out waiting on test completion.');
}
function runFrame(gl, frameCount, maxFrameCount) {
renderFrame(gl);
frameCount++;
if (frameCount >= maxFrameCount) {
console.log('Rendered ' + frameCount + ' frames.');
markComplete();
return;
}
requestAnimationFrame(function(){
runFrame(gl, frameCount, maxFrameCount);
});
}
function runTest() {
var canvas = document.getElementById('canvas');
var gl = initGL(canvas);
if (!gl) {
markError('WebGL context creation failed.');
return;
}
var maxFrameCount = arg('frame', 1);
if (maxFrameCount < 1) {
markError('Invalid `frame` arg: ' + maxFrameCount);
return;
}
setStatus('Waiting...');
runFrame(gl, 0, maxFrameCount);
setTimeout(markTimedOut, TIMEOUT_MS);
}
</script>
</head>
<body onload='runTest();'>
<canvas style="position:fixed; left: 0px; top: 0px;" id='canvas' width='200' height='200'></canvas>
<div style="display:block; background-color: blue; position: fixed; top: 75px; left: 0px; width: 50px; height: 50px;"></div>
<div id='status'></div>
</body>
</html>

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

@ -0,0 +1 @@
<iframe id='f' style='position:absolute; border:none; width:100%; height:100%; left:0; top:0' srcdoc='<input>'>

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

@ -0,0 +1,3 @@
<!DOCTYPE html>
<div id="scrollbox" style="height: 100px; overflow: auto;">
<div style="height: 1000px;"></div></div>

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

@ -0,0 +1,3 @@
<!DOCTYPE html>
<div id="scrollbox" style="height: 100px; overflow: auto;">
<div style="height: 1000px;"></div> </div>

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

@ -5,6 +5,9 @@ support-files =
bug299673.js bug299673.js
bug322588-popup.html bug322588-popup.html
bug426082.html bug426082.html
bug545268.html
bug574663.html
bug607464.html
bug656379-1.html bug656379-1.html
bug418986-3.js bug418986-3.js
error_event_worker.js error_event_worker.js

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

@ -0,0 +1 @@
<body><div id='target' style='width: 50px; height: 50px; background: green'></div></body>

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

@ -129,4 +129,6 @@ support-files =
pointerevent_touch-action-pan-right-css_touch-manual.html pointerevent_touch-action-pan-right-css_touch-manual.html
pointerevent_touch-action-pan-up-css_touch-manual.html pointerevent_touch-action-pan-up-css_touch-manual.html
[test_trigger_fullscreen_by_pointer_events.html] [test_trigger_fullscreen_by_pointer_events.html]
support-files =
file_test_trigger_fullscreen.html
[test_trigger_popup_by_pointer_events.html] [test_trigger_popup_by_pointer_events.html]

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

@ -12,7 +12,7 @@
SimpleTest.waitForExplicitFinish(); SimpleTest.waitForExplicitFinish();
function startTest() { function startTest() {
let win = window.open("data:text/html,<body><div id='target' style='width: 50px; height: 50px; background: green'></div></body>", "_blank"); let win = window.open("file_test_trigger_fullscreen.html", "_blank");
win.addEventListener("load", () => { win.addEventListener("load", () => {
let target = win.document.getElementById("target"); let target = win.document.getElementById("target");
target.addEventListener("pointerdown", () => { target.addEventListener("pointerdown", () => {

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

@ -132,7 +132,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=545268
SimpleTest.waitForExplicitFinish(); SimpleTest.waitForExplicitFinish();
SimpleTest.requestFlakyTimeout("untriaged"); SimpleTest.requestFlakyTimeout("untriaged");
win = window.open("data:text/html,<iframe id='f' style='position:absolute; border:none; width:100%; height:100%; left:0; top:0' src='data:text/html,&lt;input&gt;'>", "" , ""); win = window.open("bug545268.html", "" , "");
win.onload = doTest; win.onload = doTest;
</script> </script>

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

@ -97,10 +97,7 @@ function sendTouchpadScrollMotion(scrollbox, direction, ctrl, momentum, callback
} }
function runTest() { function runTest() {
var win = open('data:text/html,<!DOCTYPE html>\n' + var win = open('bug574663.html', '_blank', 'width=300,height=300');
'<div id="scrollbox" style="height: 100px; overflow: auto;">' +
' <div style="height: 1000px;"></div>' +
'</div>', '_blank', 'width=300,height=300');
SimpleTest.waitForFocus(function () { SimpleTest.waitForFocus(function () {
var scrollbox = win.document.getElementById("scrollbox"); var scrollbox = win.document.getElementById("scrollbox");
let winUtils = SpecialPowers.getDOMWindowUtils(win); let winUtils = SpecialPowers.getDOMWindowUtils(win);

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

@ -45,10 +45,7 @@ function scrollDown150PxWithPixelScrolling(scrollbox) {
} }
function runTest() { function runTest() {
var win = open('data:text/html,<!DOCTYPE html>\n' + var win = open('bug607464.html', '_blank', 'width=300,height=300');
'<div id="scrollbox" style="height: 100px; overflow: auto;">' +
' <div style="height: 1000px;"></div>' +
'</div>', '_blank', 'width=300,height=300');
SimpleTest.waitForFocus(function () { SimpleTest.waitForFocus(function () {
var scrollbox = win.document.getElementById("scrollbox"); var scrollbox = win.document.getElementById("scrollbox");
let scrollTopBefore = scrollbox.scrollTop; let scrollTopBefore = scrollbox.scrollTop;

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

@ -28,7 +28,7 @@ function runTest() {
</pre> </pre>
<p id="text">Normal text</p> <p id="text">Normal text</p>
<iframe src="data:text/plain,text in iframe"></iframe> <iframe srcdoc="text in iframe"></iframe>
<p id="text2">Normal text</p> <p id="text2">Normal text</p>
</body> </body>

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

@ -24,7 +24,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=944011
ok(true, "Got onclick"); ok(true, "Got onclick");
SimpleTest.finish(); SimpleTest.finish();
} }
$('ifr').setAttribute('src', 'data:text/html,<html><body>Second frame</body></html>'); $('ifr').setAttribute('srcdoc', '<html><body>Second frame</body></html>');
break; break;
case 2: case 2:
ok(true, "Got second load"); ok(true, "Got second load");
@ -43,7 +43,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=944011
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=944011">Mozilla Bug 944011</a> <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=944011">Mozilla Bug 944011</a>
<p id="display"></p> <p id="display"></p>
<div id="content" style="display: none"> <div id="content" style="display: none">
<iframe id="ifr" onload="loaded();" src="data:text/html,<html><body>foo</body></html>"></iframe> <iframe id="ifr" onload="loaded();" srcdoc="<html><body>foo</body></html>"></iframe>
<div name="testTarget"></div> <div name="testTarget"></div>
</div> </div>
<pre id="test"> <pre id="test">

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

@ -28,7 +28,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1007790
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1007790">Mozilla Bug 1007790</a> <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1007790">Mozilla Bug 1007790</a>
<p id="display"></p> <p id="display"></p>
<div id="content" style="display: none" onerror=""> <div id="content" style="display: none" onerror="">
<iframe src="data:text/html,<body onerror=''>"></iframe> <iframe srcdoc="<body onerror=''>"></iframe>
</div> </div>
<pre id="test"> <pre id="test">
</pre> </pre>

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

@ -10,7 +10,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=697636
</head> </head>
<body> <body>
<iframe id="f" src="data:text/html,<body text=green>1" allowfullscreen></iframe> <iframe id="f" srcdoc="<body text=green>1" allowfullscreen></iframe>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=697636">Mozilla Bug 697636</a> <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=697636">Mozilla Bug 697636</a>
<p id="display"></p> <p id="display"></p>
@ -27,9 +27,10 @@ var e1;
function begin() function begin()
{ {
frameWin = document.getElementById("f").contentWindow; var f = document.getElementById("f");
frameWin = f.contentWindow;
e1 = frameWin.document.documentElement; e1 = frameWin.document.documentElement;
frameWin.location = "data:text/html,<body text=blue onload='parent.b2()'>2"; f.srcdoc = "<body text=blue onload='parent.b2()'>2";
} }
function b2() function b2()

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

@ -10,7 +10,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=685402
</head> </head>
<body style="background-color: gray;"> <body style="background-color: gray;">
<iframe id="f" src="data:text/html,<body text=green>1" allowfullscreen></iframe> <iframe id="f" srcdoc="<body text=green>1" allowfullscreen></iframe>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=685402">Mozilla Bug 685402</a> <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=685402">Mozilla Bug 685402</a>
<p id="display"></p> <p id="display"></p>
@ -29,11 +29,12 @@ var prevTrusted;
function begin() function begin()
{ {
frameWin = document.getElementById("f").contentWindow; var f = document.getElementById("f");
frameWin = f.contentWindow;
e1 = frameWin.document.body; e1 = frameWin.document.body;
document.addEventListener("fullscreenchange", function() { document.addEventListener("fullscreenchange", function() {
opener.ok(document.fullscreenElement, "[navigation] Request should be granted"); opener.ok(document.fullscreenElement, "[navigation] Request should be granted");
frameWin.location = "data:text/html,<body text=blue onload='parent.b2()'>2"; f.srcdoc = "<body text=blue onload='parent.b2()'>2";
}, {once: true}); }, {once: true});
e1.requestFullscreen(); e1.requestFullscreen();

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

@ -26,7 +26,7 @@ Tests:
<div id="fse"> <div id="fse">
<div id="fse-inner"> <div id="fse-inner">
<iframe id="subdoc" allowfullscreen src="data:text/html,<html><body bgcolor='black'></body></html>"></iframe> <iframe id="subdoc" allowfullscreen srcdoc="<html><body bgcolor='black'></body></html>"></iframe>
</div> </div>
</div> </div>

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

@ -9,7 +9,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=802895
<iframe id="iframe1" src="about:mozilla" <iframe id="iframe1" src="about:mozilla"
srcdoc="Goodbye World"></iframe> srcdoc="Goodbye World"></iframe>
<iframe id="iframe2" srcdoc="Peeking test" sandbox=""></iframe> <iframe id="iframe2" srcdoc="Peeking test" sandbox=""></iframe>
<iframe id="iframe3" src="data:text/html;charset=US-ASCII,Gone" <iframe id="iframe3" src="file_srcdoc_iframe3.html"
srcdoc="Going"></iframe> srcdoc="Going"></iframe>
</body> </body>

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

@ -0,0 +1 @@
Gone

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

@ -169,6 +169,7 @@ support-files =
file_iframe_sandbox_worker.js file_iframe_sandbox_worker.js
file_srcdoc-2.html file_srcdoc-2.html
file_srcdoc.html file_srcdoc.html
file_srcdoc_iframe3.html
file_window_open_close_outer.html file_window_open_close_outer.html
file_window_open_close_inner.html file_window_open_close_inner.html
formSubmission_chrome.js formSubmission_chrome.js

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

@ -84,7 +84,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=802895
// Test srcdoc attribute removal // Test srcdoc attribute removal
iframe3.onload = function () { iframe3.onload = function () {
var innerDoc3 = iframe3.contentDocument; var innerDoc3 = iframe3.contentDocument;
is(innerDoc3.body.innerHTML, "Gone", "Bad srcdoc attribute removal"); is(innerDoc3.body.innerText, "Gone", "Bad srcdoc attribute removal");
finish3 = true; finish3 = true;
if (finish && finish1 && finish3) { if (finish && finish1 && finish3) {
SimpleTest.finish(); SimpleTest.finish();

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

@ -11,7 +11,7 @@ interface nsIArray;
[scriptable, builtinclass, uuid(2fe296cc-d917-4820-b492-aa42df23f9b4)] [scriptable, builtinclass, uuid(2fe296cc-d917-4820-b492-aa42df23f9b4)]
interface nsIPaymentMethodData : nsISupports interface nsIPaymentMethodData : nsISupports
{ {
readonly attribute nsIArray supportedMethods; readonly attribute AString supportedMethods;
readonly attribute AString data; readonly attribute AString data;
}; };
@ -33,7 +33,7 @@ interface nsIPaymentItem : nsISupports
[scriptable, builtinclass, uuid(74259861-c318-40e8-b3d5-518e701bed80)] [scriptable, builtinclass, uuid(74259861-c318-40e8-b3d5-518e701bed80)]
interface nsIPaymentDetailsModifier : nsISupports interface nsIPaymentDetailsModifier : nsISupports
{ {
readonly attribute nsIArray supportedMethods; readonly attribute AString supportedMethods;
readonly attribute nsIPaymentItem total; readonly attribute nsIPaymentItem total;
readonly attribute nsIArray additionalDisplayItems; readonly attribute nsIArray additionalDisplayItems;
readonly attribute AString data; readonly attribute AString data;

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

@ -18,7 +18,7 @@ namespace payments {
NS_IMPL_ISUPPORTS(PaymentMethodData, NS_IMPL_ISUPPORTS(PaymentMethodData,
nsIPaymentMethodData) nsIPaymentMethodData)
PaymentMethodData::PaymentMethodData(nsIArray* aSupportedMethods, PaymentMethodData::PaymentMethodData(const nsAString& aSupportedMethods,
const nsAString& aData) const nsAString& aData)
: mSupportedMethods(aSupportedMethods) : mSupportedMethods(aSupportedMethods)
, mData(aData) , mData(aData)
@ -30,25 +30,16 @@ PaymentMethodData::Create(const IPCPaymentMethodData& aIPCMethodData,
nsIPaymentMethodData** aMethodData) nsIPaymentMethodData** aMethodData)
{ {
NS_ENSURE_ARG_POINTER(aMethodData); NS_ENSURE_ARG_POINTER(aMethodData);
nsCOMPtr<nsIArray> supportedMethods;
nsresult rv = ConvertStringstoISupportsStrings(aIPCMethodData.supportedMethods(),
getter_AddRefs(supportedMethods));
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
nsCOMPtr<nsIPaymentMethodData> methodData = nsCOMPtr<nsIPaymentMethodData> methodData =
new PaymentMethodData(supportedMethods, aIPCMethodData.data()); new PaymentMethodData(aIPCMethodData.supportedMethods(), aIPCMethodData.data());
methodData.forget(aMethodData); methodData.forget(aMethodData);
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP NS_IMETHODIMP
PaymentMethodData::GetSupportedMethods(nsIArray** aSupportedMethods) PaymentMethodData::GetSupportedMethods(nsAString& aSupportedMethods)
{ {
NS_ENSURE_ARG_POINTER(aSupportedMethods); aSupportedMethods = mSupportedMethods;
MOZ_ASSERT(mSupportedMethods);
nsCOMPtr<nsIArray> supportedMethods = mSupportedMethods;
supportedMethods.forget(aSupportedMethods);
return NS_OK; return NS_OK;
} }
@ -156,7 +147,7 @@ PaymentItem::GetPending(bool* aPending)
NS_IMPL_ISUPPORTS(PaymentDetailsModifier, NS_IMPL_ISUPPORTS(PaymentDetailsModifier,
nsIPaymentDetailsModifier) nsIPaymentDetailsModifier)
PaymentDetailsModifier::PaymentDetailsModifier(nsIArray* aSupportedMethods, PaymentDetailsModifier::PaymentDetailsModifier(const nsAString& aSupportedMethods,
nsIPaymentItem* aTotal, nsIPaymentItem* aTotal,
nsIArray* aAdditionalDisplayItems, nsIArray* aAdditionalDisplayItems,
const nsAString& aData) const nsAString& aData)
@ -178,13 +169,6 @@ PaymentDetailsModifier::Create(const IPCPaymentDetailsModifier& aIPCModifier,
return rv; return rv;
} }
nsCOMPtr<nsIArray> supportedMethods;
rv = ConvertStringstoISupportsStrings(aIPCModifier.supportedMethods(),
getter_AddRefs(supportedMethods));
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
nsCOMPtr<nsIArray> displayItems; nsCOMPtr<nsIArray> displayItems;
if (aIPCModifier.additionalDisplayItemsPassed()) { if (aIPCModifier.additionalDisplayItemsPassed()) {
nsCOMPtr<nsIMutableArray> items = do_CreateInstance(NS_ARRAY_CONTRACTID); nsCOMPtr<nsIMutableArray> items = do_CreateInstance(NS_ARRAY_CONTRACTID);
@ -203,18 +187,18 @@ PaymentDetailsModifier::Create(const IPCPaymentDetailsModifier& aIPCModifier,
displayItems = items.forget(); displayItems = items.forget();
} }
nsCOMPtr<nsIPaymentDetailsModifier> modifier = nsCOMPtr<nsIPaymentDetailsModifier> modifier =
new PaymentDetailsModifier(supportedMethods, total, displayItems, aIPCModifier.data()); new PaymentDetailsModifier(aIPCModifier.supportedMethods(),
total,
displayItems,
aIPCModifier.data());
modifier.forget(aModifier); modifier.forget(aModifier);
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP NS_IMETHODIMP
PaymentDetailsModifier::GetSupportedMethods(nsIArray** aSupportedMethods) PaymentDetailsModifier::GetSupportedMethods(nsAString& aSupportedMethods)
{ {
NS_ENSURE_ARG_POINTER(aSupportedMethods); aSupportedMethods = mSupportedMethods;
MOZ_ASSERT(mSupportedMethods);
nsCOMPtr<nsIArray> supportedMethods = mSupportedMethods;
supportedMethods.forget(aSupportedMethods);
return NS_OK; return NS_OK;
} }
@ -659,7 +643,7 @@ PaymentRequest::UpdatePaymentDetails(nsIPaymentDetails* aPaymentDetails)
NS_IMPL_ISUPPORTS(PaymentAddress, nsIPaymentAddress) NS_IMPL_ISUPPORTS(PaymentAddress, nsIPaymentAddress)
nsresult NS_IMETHODIMP
PaymentAddress::Init(const nsAString& aCountry, PaymentAddress::Init(const nsAString& aCountry,
nsIArray* aAddressLine, nsIArray* aAddressLine,
const nsAString& aRegion, const nsAString& aRegion,
@ -686,14 +670,14 @@ PaymentAddress::Init(const nsAString& aCountry,
return NS_OK; return NS_OK;
} }
nsresult NS_IMETHODIMP
PaymentAddress::GetCountry(nsAString& aCountry) PaymentAddress::GetCountry(nsAString& aCountry)
{ {
aCountry = mCountry; aCountry = mCountry;
return NS_OK; return NS_OK;
} }
nsresult NS_IMETHODIMP
PaymentAddress::GetAddressLine(nsIArray** aAddressLine) PaymentAddress::GetAddressLine(nsIArray** aAddressLine)
{ {
NS_ENSURE_ARG_POINTER(aAddressLine); NS_ENSURE_ARG_POINTER(aAddressLine);
@ -702,63 +686,63 @@ PaymentAddress::GetAddressLine(nsIArray** aAddressLine)
return NS_OK; return NS_OK;
} }
nsresult NS_IMETHODIMP
PaymentAddress::GetRegion(nsAString& aRegion) PaymentAddress::GetRegion(nsAString& aRegion)
{ {
aRegion = mRegion; aRegion = mRegion;
return NS_OK; return NS_OK;
} }
nsresult NS_IMETHODIMP
PaymentAddress::GetCity(nsAString& aCity) PaymentAddress::GetCity(nsAString& aCity)
{ {
aCity = mCity; aCity = mCity;
return NS_OK; return NS_OK;
} }
nsresult NS_IMETHODIMP
PaymentAddress::GetDependentLocality(nsAString& aDependentLocality) PaymentAddress::GetDependentLocality(nsAString& aDependentLocality)
{ {
aDependentLocality = mDependentLocality; aDependentLocality = mDependentLocality;
return NS_OK; return NS_OK;
} }
nsresult NS_IMETHODIMP
PaymentAddress::GetPostalCode(nsAString& aPostalCode) PaymentAddress::GetPostalCode(nsAString& aPostalCode)
{ {
aPostalCode = mPostalCode; aPostalCode = mPostalCode;
return NS_OK; return NS_OK;
} }
nsresult NS_IMETHODIMP
PaymentAddress::GetSortingCode(nsAString& aSortingCode) PaymentAddress::GetSortingCode(nsAString& aSortingCode)
{ {
aSortingCode = mSortingCode; aSortingCode = mSortingCode;
return NS_OK; return NS_OK;
} }
nsresult NS_IMETHODIMP
PaymentAddress::GetLanguageCode(nsAString& aLanguageCode) PaymentAddress::GetLanguageCode(nsAString& aLanguageCode)
{ {
aLanguageCode = mLanguageCode; aLanguageCode = mLanguageCode;
return NS_OK; return NS_OK;
} }
nsresult NS_IMETHODIMP
PaymentAddress::GetOrganization(nsAString& aOrganization) PaymentAddress::GetOrganization(nsAString& aOrganization)
{ {
aOrganization = mOrganization; aOrganization = mOrganization;
return NS_OK; return NS_OK;
} }
nsresult NS_IMETHODIMP
PaymentAddress::GetRecipient(nsAString& aRecipient) PaymentAddress::GetRecipient(nsAString& aRecipient)
{ {
aRecipient = mRecipient; aRecipient = mRecipient;
return NS_OK; return NS_OK;
} }
nsresult NS_IMETHODIMP
PaymentAddress::GetPhone(nsAString& aPhone) PaymentAddress::GetPhone(nsAString& aPhone)
{ {
aPhone = mPhone; aPhone = mPhone;

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

@ -26,12 +26,12 @@ public:
nsIPaymentMethodData** aMethodData); nsIPaymentMethodData** aMethodData);
private: private:
PaymentMethodData(nsIArray* aSupportedMethods, PaymentMethodData(const nsAString& aSupportedMethods,
const nsAString& aData); const nsAString& aData);
~PaymentMethodData() = default; ~PaymentMethodData() = default;
nsCOMPtr<nsIArray> mSupportedMethods; nsString mSupportedMethods;
nsString mData; nsString mData;
}; };
@ -84,14 +84,14 @@ public:
nsIPaymentDetailsModifier** aModifier); nsIPaymentDetailsModifier** aModifier);
private: private:
PaymentDetailsModifier(nsIArray* aSupportedMethods, PaymentDetailsModifier(const nsAString& aSupportedMethods,
nsIPaymentItem* aTotal, nsIPaymentItem* aTotal,
nsIArray* aAdditionalDisplayItems, nsIArray* aAdditionalDisplayItems,
const nsAString& aData); const nsAString& aData);
~PaymentDetailsModifier() = default; ~PaymentDetailsModifier() = default;
nsCOMPtr<nsIArray> mSupportedMethods; nsString mSupportedMethods;
nsCOMPtr<nsIPaymentItem> mTotal; nsCOMPtr<nsIPaymentItem> mTotal;
nsCOMPtr<nsIArray> mAdditionalDisplayItems; nsCOMPtr<nsIArray> mAdditionalDisplayItems;
nsString mData; nsString mData;

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

@ -25,12 +25,6 @@ nsresult
ConvertMethodData(const PaymentMethodData& aMethodData, ConvertMethodData(const PaymentMethodData& aMethodData,
IPCPaymentMethodData& aIPCMethodData) IPCPaymentMethodData& aIPCMethodData)
{ {
// Convert Sequence<nsString> to nsTArray<nsString>
nsTArray<nsString> supportedMethods;
for (const nsString& method : aMethodData.mSupportedMethods) {
supportedMethods.AppendElement(method);
}
// Convert JSObject to a serialized string // Convert JSObject to a serialized string
nsAutoString serializedData; nsAutoString serializedData;
if (aMethodData.mData.WasPassed()) { if (aMethodData.mData.WasPassed()) {
@ -42,7 +36,7 @@ ConvertMethodData(const PaymentMethodData& aMethodData,
return rv; return rv;
} }
} }
aIPCMethodData = IPCPaymentMethodData(supportedMethods, serializedData); aIPCMethodData = IPCPaymentMethodData(aMethodData.mSupportedMethods, serializedData);
return NS_OK; return NS_OK;
} }
@ -65,12 +59,6 @@ nsresult
ConvertModifier(const PaymentDetailsModifier& aModifier, ConvertModifier(const PaymentDetailsModifier& aModifier,
IPCPaymentDetailsModifier& aIPCModifier) IPCPaymentDetailsModifier& aIPCModifier)
{ {
// Convert Sequence<nsString> to nsTArray<nsString>
nsTArray<nsString> supportedMethods;
for (const nsString& method : aModifier.mSupportedMethods) {
supportedMethods.AppendElement(method);
}
// Convert JSObject to a serialized string // Convert JSObject to a serialized string
nsAutoString serializedData; nsAutoString serializedData;
if (aModifier.mData.WasPassed()) { if (aModifier.mData.WasPassed()) {
@ -94,11 +82,11 @@ ConvertModifier(const PaymentDetailsModifier& aModifier,
additionalDisplayItems.AppendElement(displayItem); additionalDisplayItems.AppendElement(displayItem);
} }
} }
aIPCModifier = IPCPaymentDetailsModifier(supportedMethods, aIPCModifier = IPCPaymentDetailsModifier(aModifier.mSupportedMethods,
total, total,
additionalDisplayItems, additionalDisplayItems,
serializedData, serializedData,
aModifier.mAdditionalDisplayItems.WasPassed()); aModifier.mAdditionalDisplayItems.WasPassed());
return NS_OK; return NS_OK;
} }

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

@ -43,31 +43,5 @@ DeserializeToJSObject(const nsAString& aSerializedObject, JSContext* aCx, JS::Mu
return NS_OK; return NS_OK;
} }
nsresult
ConvertStringstoISupportsStrings(const nsTArray<nsString>& aStrings,
nsIArray** aIStrings)
{
NS_ENSURE_ARG_POINTER(aIStrings);
*aIStrings = nullptr;
nsCOMPtr<nsIMutableArray> iStrings = do_CreateInstance(NS_ARRAY_CONTRACTID);
for (const nsString& string : aStrings) {
nsCOMPtr<nsISupportsString> iString =
do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID);
if (NS_WARN_IF(!iString)) {
return NS_ERROR_FAILURE;
}
nsresult rv = iString->SetData(string);
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
rv = iStrings->AppendElement(iString, false);
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
}
iStrings.forget(aIStrings);
return NS_OK;
}
} // end of namespace dom } // end of namespace dom
} // end of namespace mozilla } // end of namespace mozilla

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

@ -23,10 +23,6 @@ DeserializeToJSObject(const nsAString& aSerializedObject,
JSContext* aCx, JSContext* aCx,
JS::MutableHandleObject aObject); JS::MutableHandleObject aObject);
nsresult
ConvertStringstoISupportsStrings(const nsTArray<nsString>& aStrings,
nsIArray** aIStrings);
} // end of namespace dom } // end of namespace dom
} // end of namespace mozilla } // end of namespace mozilla

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

@ -11,7 +11,7 @@ namespace dom {
struct IPCPaymentMethodData struct IPCPaymentMethodData
{ {
nsString[] supportedMethods; nsString supportedMethods;
nsString data; nsString data;
}; };
@ -30,7 +30,7 @@ struct IPCPaymentItem
struct IPCPaymentDetailsModifier struct IPCPaymentDetailsModifier
{ {
nsString[] supportedMethods; nsString supportedMethods;
IPCPaymentItem total; IPCPaymentItem total;
IPCPaymentItem[] additionalDisplayItems; IPCPaymentItem[] additionalDisplayItems;
nsString data; nsString data;

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

@ -22,10 +22,7 @@ function checkSimplestRequest(payRequest) {
if (!methodData) { if (!methodData) {
emitTestFail("Fail to get payment methodData."); emitTestFail("Fail to get payment methodData.");
} }
if (methodData.supportedMethods.length != 1) { const supportedMethod = methodData.supportedMethods;
emitTestFail("supportedMethods' length should be 1.");
}
const supportedMethod = methodData.supportedMethods.queryElementAt(0, Ci.nsISupportsString);
if (supportedMethod != "basic-card") { if (supportedMethod != "basic-card") {
emitTestFail("supported method should be 'basic-card'."); emitTestFail("supported method should be 'basic-card'.");
} }
@ -80,10 +77,7 @@ function checkComplexRequest(payRequest) {
if (!methodData) { if (!methodData) {
emitTestFail("Fail to get payment methodData."); emitTestFail("Fail to get payment methodData.");
} }
if (methodData.supportedMethods.length != 1) { let supportedMethod = methodData.supportedMethods;
emitTestFail("supportedMethods' length should be 1.");
}
let supportedMethod = methodData.supportedMethods.queryElementAt(0, Ci.nsISupportsString);
if (supportedMethod != "basic-card") { if (supportedMethod != "basic-card") {
emitTestFail("supported method should be 'basic-card'."); emitTestFail("supported method should be 'basic-card'.");
} }
@ -142,11 +136,7 @@ function checkComplexRequest(payRequest) {
emitTestFail("modifiers' length should be 1."); emitTestFail("modifiers' length should be 1.");
} }
const modifier = modifiers.queryElementAt(0, Ci.nsIPaymentDetailsModifier); const modifier = modifiers.queryElementAt(0, Ci.nsIPaymentDetailsModifier);
const modifierSupportedMethods = modifier.supportedMethods; const supportedMethods = modifier.supportedMethods;
if (modifierSupportedMethods.length != 1) {
emitTestFail("modifier's supported methods length should be 1.");
}
supportedMethod = modifierSupportedMethods.queryElementAt(0, Ci.nsISupportsString);
if (supportedMethod != "basic-card") { if (supportedMethod != "basic-card") {
emitTestFail("modifier's supported method name should be 'basic-card'."); emitTestFail("modifier's supported method name should be 'basic-card'.");
} }

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

@ -7,11 +7,7 @@ function checkSimplePayment(aSimplePayment) {
const methodData = aSimplePayment.paymentMethods.queryElementAt(0, Ci.nsIPaymentMethodData); const methodData = aSimplePayment.paymentMethods.queryElementAt(0, Ci.nsIPaymentMethodData);
ok(methodData, "Fail to get payment methodData."); ok(methodData, "Fail to get payment methodData.");
is(methodData.supportedMethods.length, 2, "supportedMethods' length should be 2."); is(methodData.supportedMethods, "MyPay", "supported method should be 'MyPay'.");
let supportedMethod = methodData.supportedMethods.queryElementAt(0, Ci.nsISupportsString);
is(supportedMethod, "MyPay", "1st supported method should be 'MyPay'.");
supportedMethod = methodData.supportedMethods.queryElementAt(1, Ci.nsISupportsString);
is(supportedMethod, "TestPay", "2nd supported method should be 'TestPay'.");
is(methodData.data, "", "method data should be empty"); is(methodData.data, "", "method data should be empty");
// checking the passed PaymentDetails parameter // checking the passed PaymentDetails parameter
@ -40,11 +36,7 @@ function checkComplexPayment(aPayment) {
const methodData = aPayment.paymentMethods.queryElementAt(0, Ci.nsIPaymentMethodData); const methodData = aPayment.paymentMethods.queryElementAt(0, Ci.nsIPaymentMethodData);
ok(methodData, "Fail to get payment methodData."); ok(methodData, "Fail to get payment methodData.");
is(methodData.supportedMethods.length, 2, "supportedMethods' length should be 2."); is(methodData.supportedMethods, "MyPay", "supported method should be 'MyPay'.");
let supportedMethod = methodData.supportedMethods.queryElementAt(0, Ci.nsISupportsString);
is(supportedMethod, "MyPay", "1st supported method should be 'MyPay'.");
supportedMethod = methodData.supportedMethods.queryElementAt(1, Ci.nsISupportsString);
is(supportedMethod, "TestPay", "2nd supported method should be 'TestPay'.");
is(methodData.data, "", "method data should be empty"); is(methodData.data, "", "method data should be empty");
// checking the passed PaymentDetails parameter // checking the passed PaymentDetails parameter
@ -69,10 +61,7 @@ function checkComplexPayment(aPayment) {
is(modifiers.length, 1, "modifiers' length should be 1."); is(modifiers.length, 1, "modifiers' length should be 1.");
const modifier = modifiers.queryElementAt(0, Ci.nsIPaymentDetailsModifier); const modifier = modifiers.queryElementAt(0, Ci.nsIPaymentDetailsModifier);
const modifierSupportedMethods = modifier.supportedMethods; is(modifier.supportedMethods, "MyPay", "modifier's supported method name should be 'MyPay'.");
is(modifierSupportedMethods.length, 1, "modifier's supported methods length should be 1.");
supportedMethod = modifierSupportedMethods.queryElementAt(0, Ci.nsISupportsString);
is(supportedMethod, "MyPay", "modifier's supported method name should be 'MyPay'.");
is(modifier.total.label, "Discounted donation", "modifier's total label should be 'Discounted donation'."); is(modifier.total.label, "Discounted donation", "modifier's total label should be 'Discounted donation'.");
is(modifier.total.amount.currency, "USD", "modifier's total currency should be 'USD'."); is(modifier.total.amount.currency, "USD", "modifier's total currency should be 'USD'.");
is(modifier.total.amount.value, "45.00", "modifier's total value should be '45.00'."); is(modifier.total.amount.value, "45.00", "modifier's total value should be '45.00'.");

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

@ -8,7 +8,7 @@
<body> <body>
<script type="text/javascript"> <script type="text/javascript">
const supportedInstruments = [{ const supportedInstruments = [{
supportedMethods: [ "MyPay", "TestPay" ] supportedMethods: "MyPay"
}]; }];
const complexDetails = { const complexDetails = {
id: "complex details", id: "complex details",
@ -28,7 +28,7 @@
], ],
modifiers: [ modifiers: [
{ {
supportedMethods: ["MyPay"], supportedMethods: "MyPay",
total: { total: {
label: "Discounted donation", label: "Discounted donation",
amount: { currency: "USD", value: "45.00", } amount: { currency: "USD", value: "45.00", }

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

@ -8,7 +8,7 @@
<body> <body>
<script type="text/javascript"> <script type="text/javascript">
const supportedInstruments = [{ const supportedInstruments = [{
supportedMethods: [ "MyPay", "TestPay" ] supportedMethods: "MyPay",
}]; }];
const details = { const details = {
id: "simple details", id: "simple details",

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

@ -14,7 +14,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1345367
SimpleTest.waitForExplicitFinish(); SimpleTest.waitForExplicitFinish();
const defaultMethods = [{ const defaultMethods = [{
supportedMethods: ["basic-card"], supportedMethods: "basic-card",
}]; }];
const defaultDetails = { const defaultDetails = {
total: { total: {

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

@ -17,7 +17,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1345365
var gScript = SpecialPowers.loadChromeScript(gUrl); var gScript = SpecialPowers.loadChromeScript(gUrl);
const defaultMethods = [{ const defaultMethods = [{
supportedMethods: ["basic-card"], supportedMethods: "basic-card",
}]; }];
const defaultDetails = { const defaultDetails = {
total: { total: {

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

@ -22,7 +22,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1345361
gScript.addMessageListener("test-fail", testFailHandler); gScript.addMessageListener("test-fail", testFailHandler);
const simplestMethods = [{ const simplestMethods = [{
supportedMethods: [ "basic-card" ], supportedMethods: "basic-card",
}]; }];
const simplestDetails = { const simplestDetails = {
total: { total: {
@ -35,7 +35,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1345361
}; };
const complexMethods = [{ const complexMethods = [{
supportedMethods: [ "basic-card" ], supportedMethods: "basic-card",
data: { data: {
supportedNetworks: ['unionpay', 'visa', 'mastercard', 'amex', 'discover', supportedNetworks: ['unionpay', 'visa', 'mastercard', 'amex', 'discover',
'diners', 'jcb', 'mir', 'diners', 'jcb', 'mir',
@ -71,7 +71,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1345361
], ],
modifiers: [ modifiers: [
{ {
supportedMethods: ["basic-card"], supportedMethods: "basic-card",
total: { total: {
label: "Discounted Total", label: "Discounted Total",
amount: { amount: {

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

@ -22,7 +22,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1345366
gScript.addMessageListener("test-fail", testFailHandler); gScript.addMessageListener("test-fail", testFailHandler);
const defaultMethods = [{ const defaultMethods = [{
supportedMethods: ["basic-card"], supportedMethods: "basic-card",
data: { data: {
supportedNetworks: ['unionpay', 'visa', 'mastercard', 'amex', 'discover', supportedNetworks: ['unionpay', 'visa', 'mastercard', 'amex', 'discover',
'diners', 'jcb', 'mir', 'diners', 'jcb', 'mir',

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

@ -8,12 +8,6 @@ const testPageURL =
add_task(async function testPermissionAllow() { add_task(async function testPermissionAllow() {
removePermission(testPageURL, "persistent-storage"); removePermission(testPageURL, "persistent-storage");
info("Creating tab");
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
info("Loading test page: " + testPageURL);
gBrowser.selectedBrowser.loadURI(testPageURL);
await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
registerPopupEventHandler("popupshowing", function () { registerPopupEventHandler("popupshowing", function () {
ok(true, "prompt showing"); ok(true, "prompt showing");
@ -26,7 +20,12 @@ add_task(async function testPermissionAllow() {
ok(true, "prompt hidden"); ok(true, "prompt hidden");
}); });
await promiseMessage(true, gBrowser); info("Creating tab");
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
info("Loading test page: " + testPageURL);
gBrowser.selectedBrowser.loadURI(testPageURL);
await waitForMessage(true, gBrowser);
is(getPermission(testPageURL, "persistent-storage"), is(getPermission(testPageURL, "persistent-storage"),
Components.interfaces.nsIPermissionManager.ALLOW_ACTION, Components.interfaces.nsIPermissionManager.ALLOW_ACTION,
@ -37,13 +36,6 @@ add_task(async function testPermissionAllow() {
}); });
add_task(async function testNoPermissionPrompt() { add_task(async function testNoPermissionPrompt() {
info("Creating tab");
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
info("Loading test page: " + testPageURL);
gBrowser.selectedBrowser.loadURI(testPageURL);
await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
registerPopupEventHandler("popupshowing", function () { registerPopupEventHandler("popupshowing", function () {
ok(false, "Shouldn't show a popup this time"); ok(false, "Shouldn't show a popup this time");
}); });
@ -54,7 +46,12 @@ add_task(async function testNoPermissionPrompt() {
ok(false, "Shouldn't show a popup this time"); ok(false, "Shouldn't show a popup this time");
}); });
await promiseMessage(true, gBrowser); info("Creating tab");
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
info("Loading test page: " + testPageURL);
gBrowser.selectedBrowser.loadURI(testPageURL);
await waitForMessage(true, gBrowser);
is(getPermission(testPageURL, "persistent-storage"), is(getPermission(testPageURL, "persistent-storage"),
Components.interfaces.nsIPermissionManager.ALLOW_ACTION, Components.interfaces.nsIPermissionManager.ALLOW_ACTION,

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

@ -8,12 +8,6 @@ const testPageURL =
add_task(async function testPermissionDenied() { add_task(async function testPermissionDenied() {
removePermission(testPageURL, "persistent-storage"); removePermission(testPageURL, "persistent-storage");
info("Creating tab");
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
info("Loading test page: " + testPageURL);
gBrowser.selectedBrowser.loadURI(testPageURL);
await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
registerPopupEventHandler("popupshowing", function () { registerPopupEventHandler("popupshowing", function () {
ok(true, "prompt showing"); ok(true, "prompt showing");
@ -26,7 +20,12 @@ add_task(async function testPermissionDenied() {
ok(true, "prompt hidden"); ok(true, "prompt hidden");
}); });
await promiseMessage(false, gBrowser); info("Creating tab");
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
info("Loading test page: " + testPageURL);
gBrowser.selectedBrowser.loadURI(testPageURL);
await waitForMessage(false, gBrowser);
is(getPermission(testPageURL, "persistent-storage"), is(getPermission(testPageURL, "persistent-storage"),
Components.interfaces.nsIPermissionManager.DENY_ACTION, Components.interfaces.nsIPermissionManager.DENY_ACTION,
@ -37,13 +36,6 @@ add_task(async function testPermissionDenied() {
}); });
add_task(async function testNoPermissionPrompt() { add_task(async function testNoPermissionPrompt() {
info("Creating tab");
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
info("Loading test page: " + testPageURL);
gBrowser.selectedBrowser.loadURI(testPageURL);
await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
registerPopupEventHandler("popupshowing", function () { registerPopupEventHandler("popupshowing", function () {
ok(false, "Shouldn't show a popup this time"); ok(false, "Shouldn't show a popup this time");
}); });
@ -54,7 +46,12 @@ add_task(async function testNoPermissionPrompt() {
ok(false, "Shouldn't show a popup this time"); ok(false, "Shouldn't show a popup this time");
}); });
await promiseMessage(false, gBrowser); info("Creating tab");
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
info("Loading test page: " + testPageURL);
gBrowser.selectedBrowser.loadURI(testPageURL);
await waitForMessage(false, gBrowser);
is(getPermission(testPageURL, "persistent-storage"), is(getPermission(testPageURL, "persistent-storage"),
Components.interfaces.nsIPermissionManager.DENY_ACTION, Components.interfaces.nsIPermissionManager.DENY_ACTION,
@ -65,13 +62,6 @@ add_task(async function testNoPermissionPrompt() {
}); });
add_task(async function testPermissionDeniedDismiss() { add_task(async function testPermissionDeniedDismiss() {
info("Creating tab");
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
info("Loading test page: " + testPageURL);
gBrowser.selectedBrowser.loadURI(testPageURL);
await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
registerPopupEventHandler("popupshowing", function () { registerPopupEventHandler("popupshowing", function () {
ok(true, "prompt showing"); ok(true, "prompt showing");
}); });
@ -84,7 +74,12 @@ add_task(async function testPermissionDeniedDismiss() {
ok(true, "prompt hidden"); ok(true, "prompt hidden");
}); });
await promiseMessage(false, gBrowser); info("Creating tab");
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
info("Loading test page: " + testPageURL);
gBrowser.selectedBrowser.loadURI(testPageURL);
await waitForMessage(false, gBrowser);
is(getPermission(testPageURL, "persistent-storage"), is(getPermission(testPageURL, "persistent-storage"),
Components.interfaces.nsIPermissionManager.DENY_ACTION, Components.interfaces.nsIPermissionManager.DENY_ACTION,

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

@ -11,13 +11,6 @@ add_task(async function testPermissionUnknownInPrivateWindow() {
info("Creating private window"); info("Creating private window");
let win = await BrowserTestUtils.openNewBrowserWindow({ private : true }); let win = await BrowserTestUtils.openNewBrowserWindow({ private : true });
info("Creating private tab");
win.gBrowser.selectedTab = win.gBrowser.addTab();
info("Loading test page: " + testPageURL);
win.gBrowser.selectedBrowser.loadURI(testPageURL);
await BrowserTestUtils.browserLoaded(win.gBrowser.selectedBrowser);
registerPopupEventHandler("popupshowing", function () { registerPopupEventHandler("popupshowing", function () {
ok(false, "Shouldn't show a popup this time"); ok(false, "Shouldn't show a popup this time");
}, win); }, win);
@ -28,7 +21,12 @@ add_task(async function testPermissionUnknownInPrivateWindow() {
ok(false, "Shouldn't show a popup this time"); ok(false, "Shouldn't show a popup this time");
}, win); }, win);
await promiseMessage(false, win.gBrowser); info("Creating private tab");
win.gBrowser.selectedTab = win.gBrowser.addTab();
info("Loading test page: " + testPageURL);
win.gBrowser.selectedBrowser.loadURI(testPageURL);
await waitForMessage(false, win.gBrowser);
is(getPermission(testPageURL, "persistent-storage"), is(getPermission(testPageURL, "persistent-storage"),
Components.interfaces.nsIPermissionManager.UNKNOWN_ACTION, Components.interfaces.nsIPermissionManager.UNKNOWN_ACTION,

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

@ -77,18 +77,32 @@ function dismissNotification(popup, win)
}); });
} }
function promiseMessage(aMessage, browser) function waitForMessage(aMessage, browser)
{ {
return ContentTask.spawn(browser.selectedBrowser, aMessage, async function(aMessage) { return new Promise((resolve, reject) => {
await new Promise((resolve, reject) => { function contentScript() {
content.addEventListener("message", function(event) { addEventListener("message", function(event) {
is(event.data, aMessage, "received " + aMessage); sendAsyncMessage("testLocal:persisted",
if (event.data == aMessage) {persisted: event.data});
resolve(); }, {once: true}, true);
else }
reject();
}, {once: true}); let script = "data:,(" + contentScript.toString() + ")();";
let mm = browser.selectedBrowser.messageManager;
mm.addMessageListener("testLocal:persisted", function listener(msg) {
mm.removeMessageListener("testLocal:persisted", listener);
mm.removeDelayedFrameScript(script);
is(msg.data.persisted, aMessage, "received " + aMessage);
if (msg.data.persisted == aMessage) {
resolve();
} else {
reject();
}
}); });
mm.loadFrameScript(script, true);
}); });
} }

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

@ -6,7 +6,7 @@
#include "nsSMILTimeValue.h" #include "nsSMILTimeValue.h"
nsSMILTime nsSMILTimeValue::kUnresolvedMillis = INT64_MAX; const nsSMILTime nsSMILTimeValue::kUnresolvedMillis = INT64_MAX;
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// nsSMILTimeValue methods: // nsSMILTimeValue methods:

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

@ -122,7 +122,7 @@ public:
{ return CompareTo(aOther) >= 0; } { return CompareTo(aOther) >= 0; }
private: private:
static nsSMILTime kUnresolvedMillis; static const nsSMILTime kUnresolvedMillis;
nsSMILTime mMilliseconds; nsSMILTime mMilliseconds;
enum { enum {

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

@ -216,13 +216,13 @@ nsSMILTimedElement::RemoveInstanceTimes(InstanceTimeList& aArray,
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// Static members // Static members
nsAttrValue::EnumTable nsSMILTimedElement::sFillModeTable[] = { const nsAttrValue::EnumTable nsSMILTimedElement::sFillModeTable[] = {
{"remove", FILL_REMOVE}, {"remove", FILL_REMOVE},
{"freeze", FILL_FREEZE}, {"freeze", FILL_FREEZE},
{nullptr, 0} {nullptr, 0}
}; };
nsAttrValue::EnumTable nsSMILTimedElement::sRestartModeTable[] = { const nsAttrValue::EnumTable nsSMILTimedElement::sRestartModeTable[] = {
{"always", RESTART_ALWAYS}, {"always", RESTART_ALWAYS},
{"whenNotActive", RESTART_WHENNOTACTIVE}, {"whenNotActive", RESTART_WHENNOTACTIVE},
{"never", RESTART_NEVER}, {"never", RESTART_NEVER},

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

@ -584,7 +584,7 @@ protected:
FILL_FREEZE FILL_FREEZE
}; };
nsSMILFillMode mFillMode; nsSMILFillMode mFillMode;
static nsAttrValue::EnumTable sFillModeTable[]; static const nsAttrValue::EnumTable sFillModeTable[];
enum nsSMILRestartMode : uint8_t enum nsSMILRestartMode : uint8_t
{ {
@ -593,7 +593,7 @@ protected:
RESTART_NEVER RESTART_NEVER
}; };
nsSMILRestartMode mRestartMode; nsSMILRestartMode mRestartMode;
static nsAttrValue::EnumTable sRestartModeTable[]; static const nsAttrValue::EnumTable sRestartModeTable[];
InstanceTimeList mBeginInstances; InstanceTimeList mBeginInstances;
InstanceTimeList mEndInstances; InstanceTimeList mEndInstances;

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

@ -8,7 +8,7 @@
*/ */
dictionary PaymentMethodData { dictionary PaymentMethodData {
required sequence<DOMString> supportedMethods; required DOMString supportedMethods;
object data; object data;
}; };
@ -32,7 +32,7 @@ dictionary PaymentShippingOption {
}; };
dictionary PaymentDetailsModifier { dictionary PaymentDetailsModifier {
required sequence<DOMString> supportedMethods; required DOMString supportedMethods;
PaymentItem total; PaymentItem total;
sequence<PaymentItem> additionalDisplayItems; sequence<PaymentItem> additionalDisplayItems;
object data; object data;

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

@ -436,7 +436,10 @@ public:
, mIsWorkerScript(aIsWorkerScript) , mIsWorkerScript(aIsWorkerScript)
, mFailed(false) , mFailed(false)
{ {
MOZ_ASSERT(aWorkerPrivate);
MOZ_ASSERT(aWorkerPrivate->IsServiceWorker()); MOZ_ASSERT(aWorkerPrivate->IsServiceWorker());
mMainThreadEventTarget = aWorkerPrivate->MainThreadEventTarget();
MOZ_ASSERT(mMainThreadEventTarget);
mBaseURI = GetBaseURI(mIsWorkerScript, aWorkerPrivate); mBaseURI = GetBaseURI(mIsWorkerScript, aWorkerPrivate);
AssertIsOnMainThread(); AssertIsOnMainThread();
} }
@ -471,6 +474,7 @@ private:
nsCString mCSPHeaderValue; nsCString mCSPHeaderValue;
nsCString mCSPReportOnlyHeaderValue; nsCString mCSPReportOnlyHeaderValue;
nsCString mReferrerPolicyHeaderValue; nsCString mReferrerPolicyHeaderValue;
nsCOMPtr<nsIEventTarget> mMainThreadEventTarget;
}; };
NS_IMPL_ISUPPORTS(CacheScriptLoader, nsIStreamLoaderObserver) NS_IMPL_ISUPPORTS(CacheScriptLoader, nsIStreamLoaderObserver)
@ -1701,7 +1705,14 @@ CacheScriptLoader::ResolvedCallback(JSContext* aCx,
} }
MOZ_ASSERT(!mPump); MOZ_ASSERT(!mPump);
rv = NS_NewInputStreamPump(getter_AddRefs(mPump), inputStream); rv = NS_NewInputStreamPump(getter_AddRefs(mPump),
inputStream,
-1, /* default streamPos */
-1, /* default streamLen */
0, /* default segsize */
0, /* default segcount */
false, /* default closeWhenDone */
mMainThreadEventTarget);
if (NS_WARN_IF(NS_FAILED(rv))) { if (NS_WARN_IF(NS_FAILED(rv))) {
Fail(rv); Fail(rv);
return; return;

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

@ -5,6 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "ServiceWorkerScriptCache.h" #include "ServiceWorkerScriptCache.h"
#include "mozilla/SystemGroup.h"
#include "mozilla/Unused.h" #include "mozilla/Unused.h"
#include "mozilla/dom/CacheBinding.h" #include "mozilla/dom/CacheBinding.h"
#include "mozilla/dom/cache/CacheStorage.h" #include "mozilla/dom/cache/CacheStorage.h"
@ -1136,7 +1137,14 @@ CompareCache::ManageValueResult(JSContext* aCx, JS::Handle<JS::Value> aValue)
MOZ_ASSERT(inputStream); MOZ_ASSERT(inputStream);
MOZ_ASSERT(!mPump); MOZ_ASSERT(!mPump);
rv = NS_NewInputStreamPump(getter_AddRefs(mPump), inputStream); rv = NS_NewInputStreamPump(getter_AddRefs(mPump),
inputStream,
-1, /* default streamPos */
-1, /* default streamLen */
0, /* default segsize */
0, /* default segcount */
false, /* default closeWhenDone */
SystemGroup::EventTargetFor(TaskCategory::Other));
if (NS_WARN_IF(NS_FAILED(rv))) { if (NS_WARN_IF(NS_FAILED(rv))) {
Finish(rv, false); Finish(rv, false);
return; return;

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

@ -1106,10 +1106,12 @@ XMLHttpRequestMainThread::RequestErrorSteps(const ProgressEventType aEventType,
FireReadystatechangeEvent(); FireReadystatechangeEvent();
// Step 6 // Step 6
if (mUpload && !mUploadComplete) { if (mUpload) {
// Step 6-1 // Step 6-1
mUploadComplete = true; if (!mUploadComplete) {
mUploadComplete = true;
}
// Step 6-2 // Step 6-2
if (mFlagHadUploadListenersOnSend) { if (mFlagHadUploadListenersOnSend) {

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

@ -50,6 +50,9 @@
# define APZCTM_LOG(...) # define APZCTM_LOG(...)
#endif #endif
// #define APZ_KEY_LOG(...) printf_stderr("APZKEY: " __VA_ARGS__)
#define APZ_KEY_LOG(...)
namespace mozilla { namespace mozilla {
namespace layers { namespace layers {
@ -185,7 +188,16 @@ public:
{ {
if (mMayChangeFocus) { if (mMayChangeFocus) {
mFocusState.ReceiveFocusChangingEvent(); mFocusState.ReceiveFocusChangingEvent();
APZ_KEY_LOG("Marking input with type=%d as focus changing with seq=%" PRIu64 "\n",
(int)mEvent.mInputType,
mFocusState.LastAPZProcessedEvent());
} else {
APZ_KEY_LOG("Marking input with type=%d as non focus changing with seq=%" PRIu64 "\n",
(int)mEvent.mInputType,
mFocusState.LastAPZProcessedEvent());
} }
mEvent.mFocusSequenceNumber = mFocusState.LastAPZProcessedEvent(); mEvent.mFocusSequenceNumber = mFocusState.LastAPZProcessedEvent();
} }
@ -1249,6 +1261,7 @@ APZCTreeManager::ReceiveInputEvent(InputData& aEvent,
// Disable async keyboard scrolling when accessibility.browsewithcaret is enabled // Disable async keyboard scrolling when accessibility.browsewithcaret is enabled
if (!gfxPrefs::APZKeyboardEnabled() || if (!gfxPrefs::APZKeyboardEnabled() ||
gfxPrefs::AccessibilityBrowseWithCaret()) { gfxPrefs::AccessibilityBrowseWithCaret()) {
APZ_KEY_LOG("Skipping key input from invalid prefs\n");
return result; return result;
} }
@ -1258,6 +1271,8 @@ APZCTreeManager::ReceiveInputEvent(InputData& aEvent,
Maybe<KeyboardShortcut> shortcut = mKeyboardMap.FindMatch(keyInput); Maybe<KeyboardShortcut> shortcut = mKeyboardMap.FindMatch(keyInput);
if (!shortcut) { if (!shortcut) {
APZ_KEY_LOG("Skipping key input with no shortcut\n");
// If we don't have a shortcut for this key event, then we can keep our focus // If we don't have a shortcut for this key event, then we can keep our focus
// only if we know there are no key event listeners for this target // only if we know there are no key event listeners for this target
if (mFocusState.CanIgnoreKeyboardShortcutMisses()) { if (mFocusState.CanIgnoreKeyboardShortcutMisses()) {
@ -1269,6 +1284,7 @@ APZCTreeManager::ReceiveInputEvent(InputData& aEvent,
// Check if this shortcut needs to be dispatched to content. Anything matching // Check if this shortcut needs to be dispatched to content. Anything matching
// this is assumed to be able to change focus. // this is assumed to be able to change focus.
if (shortcut->mDispatchToContent) { if (shortcut->mDispatchToContent) {
APZ_KEY_LOG("Skipping key input with dispatch-to-content shortcut\n");
return result; return result;
} }
@ -1299,6 +1315,7 @@ APZCTreeManager::ReceiveInputEvent(InputData& aEvent,
// the focused element has event listeners, or the focused element doesn't have a // the focused element has event listeners, or the focused element doesn't have a
// layerized scroll frame. In any case we need to dispatch to content. // layerized scroll frame. In any case we need to dispatch to content.
if (!targetGuid) { if (!targetGuid) {
APZ_KEY_LOG("Skipping key input with no current focus target\n");
return result; return result;
} }
@ -1306,6 +1323,7 @@ APZCTreeManager::ReceiveInputEvent(InputData& aEvent,
targetGuid->mScrollId); targetGuid->mScrollId);
if (!targetApzc) { if (!targetApzc) {
APZ_KEY_LOG("Skipping key input with focus target but no APZC\n");
return result; return result;
} }
@ -1313,6 +1331,9 @@ APZCTreeManager::ReceiveInputEvent(InputData& aEvent,
// by the input queue. // by the input queue.
keyInput.mAction = action; keyInput.mAction = action;
APZ_KEY_LOG("Dispatching key input with apzc=%p\n",
targetApzc.get());
// Dispatch the event to the input queue. // Dispatch the event to the input queue.
result = mInputQueue->ReceiveInputEvent( result = mInputQueue->ReceiveInputEvent(
targetApzc, targetApzc,

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

@ -5,6 +5,9 @@
#include "mozilla/layers/FocusState.h" #include "mozilla/layers/FocusState.h"
// #define FS_LOG(...) printf_stderr("FS: " __VA_ARGS__)
#define FS_LOG(...)
namespace mozilla { namespace mozilla {
namespace layers { namespace layers {
@ -21,6 +24,10 @@ FocusState::FocusState()
bool bool
FocusState::IsCurrent() const FocusState::IsCurrent() const
{ {
FS_LOG("Checking IsCurrent() with cseq=%" PRIu64 ", aseq=%" PRIu64 "\n",
mLastContentProcessedEvent,
mLastAPZProcessedEvent);
MOZ_ASSERT(mLastContentProcessedEvent <= mLastAPZProcessedEvent); MOZ_ASSERT(mLastContentProcessedEvent <= mLastAPZProcessedEvent);
return mLastContentProcessedEvent == mLastAPZProcessedEvent; return mLastContentProcessedEvent == mLastAPZProcessedEvent;
} }
@ -36,6 +43,12 @@ FocusState::Update(uint64_t aRootLayerTreeId,
uint64_t aOriginatingLayersId, uint64_t aOriginatingLayersId,
const FocusTarget& aState) const FocusTarget& aState)
{ {
FS_LOG("Update with rlt=%" PRIu64 ", olt=%" PRIu64 ", ft=(%d, %" PRIu64 ")\n",
aRootLayerTreeId,
aOriginatingLayersId,
(int)aState.mType,
aState.mSequenceNumber);
// Update the focus tree with the latest target // Update the focus tree with the latest target
mFocusTree[aOriginatingLayersId] = aState; mFocusTree[aOriginatingLayersId] = aState;
@ -51,6 +64,8 @@ FocusState::Update(uint64_t aRootLayerTreeId,
while (true) { while (true) {
auto currentNode = mFocusTree.find(mFocusLayersId); auto currentNode = mFocusTree.find(mFocusLayersId);
if (currentNode == mFocusTree.end()) { if (currentNode == mFocusTree.end()) {
FS_LOG("Setting target to nil (cannot find lt=%" PRIu64 ")\n",
mFocusLayersId);
return; return;
} }
@ -64,14 +79,23 @@ FocusState::Update(uint64_t aRootLayerTreeId,
// Guard against infinite loops // Guard against infinite loops
MOZ_ASSERT(mFocusLayersId != target.mData.mRefLayerId); MOZ_ASSERT(mFocusLayersId != target.mData.mRefLayerId);
if (mFocusLayersId == target.mData.mRefLayerId) { if (mFocusLayersId == target.mData.mRefLayerId) {
FS_LOG("Setting target to nil (bailing out of infinite loop, lt=%" PRIu64 ")\n",
mFocusLayersId);
return; return;
} }
FS_LOG("Looking for target in lt=%" PRIu64 "\n", target.mData.mRefLayerId);
// The focus target is in a child layer tree // The focus target is in a child layer tree
mFocusLayersId = target.mData.mRefLayerId; mFocusLayersId = target.mData.mRefLayerId;
break; break;
} }
case FocusTarget::eScrollLayer: { case FocusTarget::eScrollLayer: {
FS_LOG("Setting target to h=%" PRIu64 ", v=%" PRIu64 ", and seq=%" PRIu64 "\n",
target.mData.mScrollTargets.mHorizontal,
target.mData.mScrollTargets.mVertical,
target.mSequenceNumber);
// This is the global focus target // This is the global focus target
mFocusHorizontalTarget = target.mData.mScrollTargets.mHorizontal; mFocusHorizontalTarget = target.mData.mScrollTargets.mHorizontal;
mFocusVerticalTarget = target.mData.mScrollTargets.mVertical; mFocusVerticalTarget = target.mData.mScrollTargets.mVertical;
@ -82,6 +106,8 @@ FocusState::Update(uint64_t aRootLayerTreeId,
return; return;
} }
case FocusTarget::eNone: { case FocusTarget::eNone: {
FS_LOG("Setting target to nil (reached a nil target)\n");
// Mark what sequence number this target has for debugging purposes so // Mark what sequence number this target has for debugging purposes so
// we can always accurately report on whether we are stale or not // we can always accurately report on whether we are stale or not
mLastContentProcessedEvent = target.mSequenceNumber; mLastContentProcessedEvent = target.mSequenceNumber;

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

@ -12,6 +12,17 @@
#include "nsIPresShell.h" // for nsIPresShell #include "nsIPresShell.h" // for nsIPresShell
#include "nsLayoutUtils.h" // for nsLayoutUtils #include "nsLayoutUtils.h" // for nsLayoutUtils
#define ENABLE_FT_LOGGING 0
// #define ENABLE_FT_LOGGING 1
#if ENABLE_FT_LOGGING
# define FT_LOG(FMT, ...) printf_stderr("FT (%s): " FMT, \
XRE_IsParentProcess() ? "chrome" : "content", \
__VA_ARGS__)
#else
# define FT_LOG(...)
#endif
using namespace mozilla::dom; using namespace mozilla::dom;
using namespace mozilla::layout; using namespace mozilla::layout;
@ -85,6 +96,9 @@ FocusTarget::FocusTarget(nsIPresShell* aRootPresShell,
nsCOMPtr<nsIPresShell> presShell = GetRetargetEventPresShell(aRootPresShell); nsCOMPtr<nsIPresShell> presShell = GetRetargetEventPresShell(aRootPresShell);
if (!presShell) { if (!presShell) {
FT_LOG("Creating nil target with seq=%" PRIu64 " (can't find retargeted presshell)\n",
aFocusSequenceNumber);
mType = FocusTarget::eNone; mType = FocusTarget::eNone;
return; return;
} }
@ -103,11 +117,18 @@ FocusTarget::FocusTarget(nsIPresShell* aRootPresShell,
// The globally focused element for scrolling is in a remote layer tree // The globally focused element for scrolling is in a remote layer tree
if (rfp) { if (rfp) {
FT_LOG("Creating reflayer target with seq=%" PRIu64 ", lt=%" PRIu64 "\n",
aFocusSequenceNumber,
rfp->GetLayersId());
mType = FocusTarget::eRefLayer; mType = FocusTarget::eRefLayer;
mData.mRefLayerId = rfp->GetLayersId(); mData.mRefLayerId = rfp->GetLayersId();
return; return;
} }
FT_LOG("Creating nil target with seq=%" PRIu64 " (remote browser missing layers id)\n",
aFocusSequenceNumber);
mType = FocusTarget::eNone; mType = FocusTarget::eNone;
return; return;
} }
@ -115,6 +136,9 @@ FocusTarget::FocusTarget(nsIPresShell* aRootPresShell,
// If the focus isn't on a remote browser then check for scrollable targets // If the focus isn't on a remote browser then check for scrollable targets
if (IsEditableNode(scrollTarget) || if (IsEditableNode(scrollTarget) ||
IsEditableNode(presShell->GetDocument())) { IsEditableNode(presShell->GetDocument())) {
FT_LOG("Creating nil target with seq=%" PRIu64 " (disabling for editable node)\n",
aFocusSequenceNumber);
mType = FocusTarget::eNone; mType = FocusTarget::eNone;
return; return;
} }
@ -135,6 +159,11 @@ FocusTarget::FocusTarget(nsIPresShell* aRootPresShell,
nsLayoutUtils::FindIDForScrollableFrame(horizontal); nsLayoutUtils::FindIDForScrollableFrame(horizontal);
mData.mScrollTargets.mVertical = mData.mScrollTargets.mVertical =
nsLayoutUtils::FindIDForScrollableFrame(vertical); nsLayoutUtils::FindIDForScrollableFrame(vertical);
FT_LOG("Creating scroll target with seq=%" PRIu64 ", h=%" PRIu64 ", v=%" PRIu64 "\n",
aFocusSequenceNumber,
mData.mScrollTargets.mHorizontal,
mData.mScrollTargets.mVertical);
} }
bool bool

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

@ -460,6 +460,12 @@ D3D11TextureData::Create(IntSize aSize, SurfaceFormat aFormat, SourceSurface* aS
RefPtr<ID3D11Texture2D> texture11; RefPtr<ID3D11Texture2D> texture11;
HRESULT hr = device->CreateTexture2D(&newDesc, uploadDataPtr, getter_AddRefs(texture11)); HRESULT hr = device->CreateTexture2D(&newDesc, uploadDataPtr, getter_AddRefs(texture11));
if (FAILED(hr) || !texture11) {
gfxCriticalNote << "[D3D11] 2 CreateTexture2D failure Size: " << aSize
<< "texture11: " << texture11 << " Code: " << gfx::hexa(hr);
return nullptr;
}
if (srcSurf && DeviceManagerDx::Get()->HasCrashyInitData()) { if (srcSurf && DeviceManagerDx::Get()->HasCrashyInitData()) {
D3D11_BOX box; D3D11_BOX box;
box.front = box.top = box.left = 0; box.front = box.top = box.left = 0;
@ -474,11 +480,6 @@ D3D11TextureData::Create(IntSize aSize, SurfaceFormat aFormat, SourceSurface* aS
if (srcSurf) { if (srcSurf) {
srcSurf->Unmap(); srcSurf->Unmap();
} }
if (FAILED(hr)) {
gfxCriticalError(CriticalLog::DefaultOptions(Factory::ReasonableSurfaceSize(aSize)))
<< "[D3D11] 2 CreateTexture2D failure " << aSize << " Code: " << gfx::hexa(hr);
return nullptr;
}
// If we created the texture with a keyed mutex, then we expect all operations // If we created the texture with a keyed mutex, then we expect all operations
// on it to be synchronized using it. If we did an initial upload using aSurface // on it to be synchronized using it. If we did an initial upload using aSurface

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

@ -552,7 +552,7 @@ TexturedRenderPass::AddClippedItem(Txn& aTxn,
Rect textureCoords = TextureRectToCoords(textureRect, aTextureSize); Rect textureCoords = TextureRectToCoords(textureRect, aTextureSize);
if (mTextureFlags & TextureFlags::ORIGIN_BOTTOM_LEFT) { if (mTextureFlags & TextureFlags::ORIGIN_BOTTOM_LEFT) {
textureCoords.y = textureCoords.YMost(); textureCoords.y = 1.0 - textureCoords.y;
textureCoords.height = -textureCoords.height; textureCoords.height = -textureCoords.height;
} }

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

@ -17,6 +17,33 @@ StackingContextHelper::StackingContextHelper()
// mOrigin remains at 0,0 // mOrigin remains at 0,0
} }
StackingContextHelper::StackingContextHelper(const StackingContextHelper& aParentSC,
wr::DisplayListBuilder& aBuilder,
LayerRect aBoundForSC,
LayerPoint aOrigin,
uint64_t aAnimationsId,
float* aOpacityPtr,
gfx::Matrix4x4* aTransformPtr,
const nsTArray<WrFilterOp>& aFilters)
: mBuilder(&aBuilder)
{
WrRect scBounds = aParentSC.ToRelativeWrRect(aBoundForSC);
if (aTransformPtr) {
mTransform = *aTransformPtr;
}
mBuilder->PushStackingContext(scBounds,
aAnimationsId,
aOpacityPtr,
aTransformPtr,
WrTransformStyle::Flat,
// TODO: set correct blend mode.
wr::ToWrMixBlendMode(gfx::CompositionOp::OP_OVER),
aFilters);
mOrigin = aOrigin;
}
StackingContextHelper::StackingContextHelper(const StackingContextHelper& aParentSC, StackingContextHelper::StackingContextHelper(const StackingContextHelper& aParentSC,
wr::DisplayListBuilder& aBuilder, wr::DisplayListBuilder& aBuilder,
WebRenderLayer* aLayer, WebRenderLayer* aLayer,

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

@ -42,6 +42,15 @@ public:
float* aOpacityPtr, float* aOpacityPtr,
gfx::Matrix4x4* aTransformPtr, gfx::Matrix4x4* aTransformPtr,
const nsTArray<WrFilterOp>& aFilters = nsTArray<WrFilterOp>()); const nsTArray<WrFilterOp>& aFilters = nsTArray<WrFilterOp>());
// The constructor for layers-free mode.
StackingContextHelper(const StackingContextHelper& aParentSC,
wr::DisplayListBuilder& aBuilder,
LayerRect aBoundForSC,
LayerPoint aOrigin,
uint64_t aAnimationsId,
float* aOpacityPtr,
gfx::Matrix4x4* aTransformPtr,
const nsTArray<WrFilterOp>& aFilters = nsTArray<WrFilterOp>());
// This version of the constructor should only be used at the root level // This version of the constructor should only be used at the root level
// of the tree, so that we have a StackingContextHelper to pass down into // of the tree, so that we have a StackingContextHelper to pass down into
// the RenderLayer traversal, but don't actually want it to push a stacking // the RenderLayer traversal, but don't actually want it to push a stacking

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

@ -45,7 +45,15 @@ WebRenderDisplayItemLayer::RenderLayer(wr::DisplayListBuilder& aBuilder,
wr::DisplayListBuilder builder(WrBridge()->GetPipeline(), contentSize); wr::DisplayListBuilder builder(WrBridge()->GetPipeline(), contentSize);
// We might have recycled this layer. Throw away the old commands. // We might have recycled this layer. Throw away the old commands.
mParentCommands.Clear(); mParentCommands.Clear();
mItem->CreateWebRenderCommands(builder, aSc, mParentCommands, this);
// TODO: Remove the old interface once we add support for image type display items.
if (mItem->GetType() == nsDisplayItem::TYPE_BACKGROUND ||
mItem->GetType() == nsDisplayItem::TYPE_BULLET) {
mItem->CreateWebRenderCommand(builder, aSc, mParentCommands, this);
} else {
mItem->CreateWebRenderCommands(builder, aSc, mParentCommands, WrManager(),
GetDisplayListBuilder());
}
builder.Finalize(contentSize, mBuiltDisplayList); builder.Finalize(contentSize, mBuiltDisplayList);
} else { } else {
// else we have an empty transaction and just use the // else we have an empty transaction and just use the

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

@ -20,6 +20,7 @@
#include "WebRenderPaintedLayerBlob.h" #include "WebRenderPaintedLayerBlob.h"
#include "WebRenderTextLayer.h" #include "WebRenderTextLayer.h"
#include "WebRenderDisplayItemLayer.h" #include "WebRenderDisplayItemLayer.h"
#include "nsDisplayList.h"
namespace mozilla { namespace mozilla {
@ -32,6 +33,7 @@ WebRenderLayerManager::WebRenderLayerManager(nsIWidget* aWidget)
, mLatestTransactionId(0) , mLatestTransactionId(0)
, mNeedsComposite(false) , mNeedsComposite(false)
, mIsFirstPaint(false) , mIsFirstPaint(false)
, mEndTransactionWithoutLayers(false)
, mTarget(nullptr) , mTarget(nullptr)
, mPaintSequenceNumber(0) , mPaintSequenceNumber(0)
{ {
@ -173,11 +175,81 @@ PopulateScrollData(WebRenderScrollData& aTarget, Layer* aLayer)
return descendants + 1; return descendants + 1;
} }
void
WebRenderLayerManager::CreateWebRenderCommandsFromDisplayList(nsDisplayList* aDisplayList,
nsDisplayListBuilder* aDisplayListBuilder,
StackingContextHelper& aSc,
wr::DisplayListBuilder& aBuilder)
{
nsDisplayList savedItems;
nsDisplayItem* item;
while ((item = aDisplayList->RemoveBottom()) != nullptr) {
nsDisplayItem::Type itemType = item->GetType();
// If the item is a event regions item, but is empty (has no regions in it)
// then we should just throw it out
if (itemType == nsDisplayItem::TYPE_LAYER_EVENT_REGIONS) {
nsDisplayLayerEventRegions* eventRegions =
static_cast<nsDisplayLayerEventRegions*>(item);
if (eventRegions->IsEmpty()) {
item->~nsDisplayItem();
continue;
}
}
// Peek ahead to the next item and try merging with it or swapping with it
// if necessary.
nsDisplayItem* aboveItem;
while ((aboveItem = aDisplayList->GetBottom()) != nullptr) {
if (aboveItem->TryMerge(item)) {
aDisplayList->RemoveBottom();
item->~nsDisplayItem();
item = aboveItem;
itemType = item->GetType();
} else {
break;
}
}
nsDisplayList* itemSameCoordinateSystemChildren
= item->GetSameCoordinateSystemChildren();
if (item->ShouldFlattenAway(aDisplayListBuilder)) {
aDisplayList->AppendToBottom(itemSameCoordinateSystemChildren);
item->~nsDisplayItem();
continue;
}
savedItems.AppendToTop(item);
if (!item->CreateWebRenderCommands(aBuilder, aSc, mParentCommands, this,
aDisplayListBuilder)) {
// TODO: fallback
}
}
aDisplayList->AppendToTop(&savedItems);
}
void
WebRenderLayerManager::EndTransactionWithoutLayer(nsDisplayList* aDisplayList,
nsDisplayListBuilder* aDisplayListBuilder)
{
MOZ_ASSERT(aDisplayList && aDisplayListBuilder);
mEndTransactionWithoutLayers = true;
DiscardImages();
WrBridge()->RemoveExpiredFontKeys();
EndTransactionInternal(nullptr,
nullptr,
EndTransactionFlags::END_DEFAULT,
aDisplayList,
aDisplayListBuilder);
}
void void
WebRenderLayerManager::EndTransaction(DrawPaintedLayerCallback aCallback, WebRenderLayerManager::EndTransaction(DrawPaintedLayerCallback aCallback,
void* aCallbackData, void* aCallbackData,
EndTransactionFlags aFlags) EndTransactionFlags aFlags)
{ {
mEndTransactionWithoutLayers = false;
DiscardImages(); DiscardImages();
WrBridge()->RemoveExpiredFontKeys(); WrBridge()->RemoveExpiredFontKeys();
EndTransactionInternal(aCallback, aCallbackData, aFlags); EndTransactionInternal(aCallback, aCallbackData, aFlags);
@ -186,7 +258,9 @@ WebRenderLayerManager::EndTransaction(DrawPaintedLayerCallback aCallback,
bool bool
WebRenderLayerManager::EndTransactionInternal(DrawPaintedLayerCallback aCallback, WebRenderLayerManager::EndTransactionInternal(DrawPaintedLayerCallback aCallback,
void* aCallbackData, void* aCallbackData,
EndTransactionFlags aFlags) EndTransactionFlags aFlags,
nsDisplayList* aDisplayList,
nsDisplayListBuilder* aDisplayListBuilder)
{ {
AutoProfilerTracing tracing("Paint", "RenderLayers"); AutoProfilerTracing tracing("Paint", "RenderLayers");
mPaintedLayerCallback = aCallback; mPaintedLayerCallback = aCallback;
@ -205,12 +279,29 @@ WebRenderLayerManager::EndTransactionInternal(DrawPaintedLayerCallback aCallback
return false; return false;
} }
DiscardCompositorAnimations(); DiscardCompositorAnimations();
mRoot->StartPendingAnimations(mAnimationReadyTime);
StackingContextHelper sc;
WrSize contentSize { (float)size.width, (float)size.height }; WrSize contentSize { (float)size.width, (float)size.height };
wr::DisplayListBuilder builder(WrBridge()->GetPipeline(), contentSize); wr::DisplayListBuilder builder(WrBridge()->GetPipeline(), contentSize);
WebRenderLayer::ToWebRenderLayer(mRoot)->RenderLayer(builder, sc);
if (mEndTransactionWithoutLayers) {
// aDisplayList being null here means this is an empty transaction following a layers-free
// transaction, so we reuse the previously built displaylist.
if (aDisplayList && aDisplayListBuilder) {
StackingContextHelper sc;
mParentCommands.Clear();
CreateWebRenderCommandsFromDisplayList(aDisplayList, aDisplayListBuilder, sc, builder);
builder.Finalize(contentSize, mBuiltDisplayList);
}
builder.PushBuiltDisplayList(mBuiltDisplayList);
WrBridge()->AddWebRenderParentCommands(mParentCommands);
} else {
mRoot->StartPendingAnimations(mAnimationReadyTime);
StackingContextHelper sc;
WebRenderLayer::ToWebRenderLayer(mRoot)->RenderLayer(builder, sc);
}
mWidget->AddWindowOverlayWebRenderCommands(WrBridge(), builder); mWidget->AddWindowOverlayWebRenderCommands(WrBridge(), builder);
WrBridge()->ClearReadLocks(); WrBridge()->ClearReadLocks();

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

@ -10,10 +10,13 @@
#include "mozilla/MozPromise.h" #include "mozilla/MozPromise.h"
#include "mozilla/layers/APZTestData.h" #include "mozilla/layers/APZTestData.h"
#include "mozilla/layers/FocusTarget.h" #include "mozilla/layers/FocusTarget.h"
#include "mozilla/layers/StackingContextHelper.h"
#include "mozilla/layers/TransactionIdAllocator.h" #include "mozilla/layers/TransactionIdAllocator.h"
#include "mozilla/webrender/WebRenderAPI.h"
#include "mozilla/webrender/WebRenderTypes.h" #include "mozilla/webrender/WebRenderTypes.h"
class nsIWidget; class nsIWidget;
class nsDisplayList;
namespace mozilla { namespace mozilla {
namespace layers { namespace layers {
@ -22,6 +25,7 @@ class CompositorBridgeChild;
class KnowsCompositor; class KnowsCompositor;
class PCompositorBridgeChild; class PCompositorBridgeChild;
class WebRenderBridgeChild; class WebRenderBridgeChild;
class WebRenderParentCommand;
class WebRenderLayerManager final : public LayerManager class WebRenderLayerManager final : public LayerManager
{ {
@ -48,6 +52,13 @@ public:
virtual bool BeginTransactionWithTarget(gfxContext* aTarget) override; virtual bool BeginTransactionWithTarget(gfxContext* aTarget) override;
virtual bool BeginTransaction() override; virtual bool BeginTransaction() override;
virtual bool EndEmptyTransaction(EndTransactionFlags aFlags = END_DEFAULT) override; virtual bool EndEmptyTransaction(EndTransactionFlags aFlags = END_DEFAULT) override;
void CreateWebRenderCommandsFromDisplayList(nsDisplayList* aDisplayList,
nsDisplayListBuilder* aDisplayListBuilder,
StackingContextHelper& aSc,
wr::DisplayListBuilder& aBuilder);
void EndTransactionWithoutLayer(nsDisplayList* aDisplayList,
nsDisplayListBuilder* aDisplayListBuilder);
bool IsLayersFreeTransaction() { return mEndTransactionWithoutLayers; }
virtual void EndTransaction(DrawPaintedLayerCallback aCallback, virtual void EndTransaction(DrawPaintedLayerCallback aCallback,
void* aCallbackData, void* aCallbackData,
EndTransactionFlags aFlags = END_DEFAULT) override; EndTransactionFlags aFlags = END_DEFAULT) override;
@ -152,8 +163,9 @@ private:
bool EndTransactionInternal(DrawPaintedLayerCallback aCallback, bool EndTransactionInternal(DrawPaintedLayerCallback aCallback,
void* aCallbackData, void* aCallbackData,
EndTransactionFlags aFlags); EndTransactionFlags aFlags,
nsDisplayList* aDisplayList = nullptr,
nsDisplayListBuilder* aDisplayListBuilder = nullptr);
private: private:
nsIWidget* MOZ_NON_OWNING_REF mWidget; nsIWidget* MOZ_NON_OWNING_REF mWidget;
@ -174,6 +186,11 @@ private:
LayerRefArray mKeepAlive; LayerRefArray mKeepAlive;
// These fields are used to save a copy of the display list for
// empty transactions in layers-free mode.
wr::BuiltDisplayList mBuiltDisplayList;
nsTArray<WebRenderParentCommand> mParentCommands;
// Layers that have been mutated. If we have an empty transaction // Layers that have been mutated. If we have an empty transaction
// then a display item layer will no longer be valid // then a display item layer will no longer be valid
// if it was a mutated layers. // if it was a mutated layers.
@ -185,6 +202,7 @@ private:
bool mNeedsComposite; bool mNeedsComposite;
bool mIsFirstPaint; bool mIsFirstPaint;
FocusTarget mFocusTarget; FocusTarget mFocusTarget;
bool mEndTransactionWithoutLayers;
// When we're doing a transaction in order to draw to a non-default // When we're doing a transaction in order to draw to a non-default
// target, the layers transaction is only performed in order to send // target, the layers transaction is only performed in order to send

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

@ -473,6 +473,7 @@ private:
DECL_GFX_PREF(Once, "gfx.vsync.compositor.unobserve-count", CompositorUnobserveCount, int32_t, 10); DECL_GFX_PREF(Once, "gfx.vsync.compositor.unobserve-count", CompositorUnobserveCount, int32_t, 10);
DECL_OVERRIDE_PREF(Live, "gfx.webrender.omta.enabled", WebRenderOMTAEnabled, gfxPrefs::OverrideBase_WebRender()); DECL_OVERRIDE_PREF(Live, "gfx.webrender.omta.enabled", WebRenderOMTAEnabled, gfxPrefs::OverrideBase_WebRender());
DECL_GFX_PREF(Live, "gfx.webrender.profiler.enabled", WebRenderProfilerEnabled, bool, false); DECL_GFX_PREF(Live, "gfx.webrender.profiler.enabled", WebRenderProfilerEnabled, bool, false);
DECL_GFX_PREF(Live, "gfx.webrender.layers-free", WebRenderLayersFree, bool, false);
DECL_GFX_PREF(Live, "gfx.webrendest.enabled", WebRendestEnabled, bool, false); DECL_GFX_PREF(Live, "gfx.webrendest.enabled", WebRendestEnabled, bool, false);
// Use vsync events generated by hardware // Use vsync events generated by hardware
DECL_GFX_PREF(Once, "gfx.work-around-driver-bugs", WorkAroundDriverBugs, bool, true); DECL_GFX_PREF(Once, "gfx.work-around-driver-bugs", WorkAroundDriverBugs, bool, true);

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

@ -795,15 +795,16 @@ void
DisplayListBuilder::PushBorder(const WrRect& aBounds, DisplayListBuilder::PushBorder(const WrRect& aBounds,
const WrRect& aClip, const WrRect& aClip,
const WrBorderWidths& aWidths, const WrBorderWidths& aWidths,
const WrBorderSide& aTop, const Range<const WrBorderSide>& aSides,
const WrBorderSide& aRight,
const WrBorderSide& aBottom,
const WrBorderSide& aLeft,
const WrBorderRadius& aRadius) const WrBorderRadius& aRadius)
{ {
MOZ_ASSERT(aSides.length() == 4);
if (aSides.length() != 4) {
return;
}
WrClipRegionToken tok = wr_dp_push_clip_region(mWrState, aClip, nullptr, 0, nullptr); WrClipRegionToken tok = wr_dp_push_clip_region(mWrState, aClip, nullptr, 0, nullptr);
wr_dp_push_border(mWrState, aBounds, tok, wr_dp_push_border(mWrState, aBounds, tok,
aWidths, aTop, aRight, aBottom, aLeft, aRadius); aWidths, aSides[0], aSides[1], aSides[2], aSides[3], aRadius);
} }
void void

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

@ -232,13 +232,12 @@ public:
const WrRect& aClip, const WrRect& aClip,
wr::PipelineId aPipeline); wr::PipelineId aPipeline);
// XXX WrBorderSides are passed with Range.
// It is just to bypass compiler bug. See Bug 1357734.
void PushBorder(const WrRect& aBounds, void PushBorder(const WrRect& aBounds,
const WrRect& aClip, const WrRect& aClip,
const WrBorderWidths& aWidths, const WrBorderWidths& aWidths,
const WrBorderSide& aTop, const Range<const WrBorderSide>& aSides,
const WrBorderSide& aRight,
const WrBorderSide& aBbottom,
const WrBorderSide& aLeft,
const WrBorderRadius& aRadius); const WrBorderRadius& aRadius);
void PushBorderImage(const WrRect& aBounds, void PushBorderImage(const WrRect& aBounds,

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

@ -30,14 +30,13 @@
# #
# The Unicode data files listed above should be together in one directory. # The Unicode data files listed above should be together in one directory.
# #
# We also require the files # We also require the file
# http://www.unicode.org/Public/security/latest/IdentifierStatus.txt # http://www.unicode.org/Public/security/latest/IdentifierStatus.txt
# http://www.unicode.org/Public/security/latest/IdentifierType.txt # This file should be in a sub-directory "security" immediately below the
# These files should be in a sub-directory "security" immediately below the
# directory containing the other Unicode data files. # directory containing the other Unicode data files.
# #
# We also require the latest data file for UTR50, currently revision-16: # We also require the latest data file for UTR50, currently revision-17:
# http://www.unicode.org/Public/vertical/revision-16/VerticalOrientation-16.txt # http://www.unicode.org/Public/vertical/revision-17/VerticalOrientation-17.txt
# This file should be in a sub-directory "vertical" immediately below the # This file should be in a sub-directory "vertical" immediately below the
# directory containing the other Unicode data files. # directory containing the other Unicode data files.
# #
@ -168,9 +167,7 @@ my %idType = (
# These match the IdentifierType enum in nsUnicodeProperties.h. # These match the IdentifierType enum in nsUnicodeProperties.h.
my %mappedIdType = ( my %mappedIdType = (
"Restricted" => 0, "Restricted" => 0,
"Allowed" => 1, "Allowed" => 1
"Aspirational" => 2 # for Aspirational characters that are not excluded
# by another attribute.
); );
my %bidicategoryCode = ( my %bidicategoryCode = (
@ -441,8 +438,11 @@ while (<FH>) {
while (<FH>) { while (<FH>) {
if (m/([0-9A-F]{4,6})(?:\.\.([0-9A-F]{4,6}))*\s+;\s+([^ ]+)/) { if (m/([0-9A-F]{4,6})(?:\.\.([0-9A-F]{4,6}))*\s+;\s+([^ ]+)/) {
my $script = uc($3); my $script = uc($3);
warn "unknown ICU script $script" unless exists $scriptCode{$script}; unless (exists $scriptCode{$script}) {
my $script = $scriptCode{$script}; warn "unknown ICU script $script";
$scriptCode{$script} = $scriptCode{"UNKNOWN"};
}
$script = $scriptCode{$script};
my $start = hex "0x$1"; my $start = hex "0x$1";
my $end = (defined $2) ? hex "0x$2" : $start; my $end = (defined $2) ? hex "0x$2" : $start;
for (my $i = $start; $i <= $end; ++$i) { for (my $i = $start; $i <= $end; ++$i) {
@ -619,32 +619,6 @@ while (<FH>) {
} }
close FH; close FH;
# read IdentifierType.txt, to find Aspirational characters
open FH, "< $UNICODE/security/IdentifierType.txt" or die "can't open UCD file IdentifierType.txt\n";
push @versionInfo, "";
while (<FH>) {
chomp;
s/\xef\xbb\xbf//;
push @versionInfo, $_;
last if /Date:/;
}
while (<FH>) {
if (m/([0-9A-F]{4,6})(?:\.\.([0-9A-F]{4,6}))*\s+;\s+([^#]+)/) {
my $idtype = $3;
foreach (split(/ /, $idtype)) {
warn "unknown Identifier Type $_" unless exists $idType{$_};
}
my $start = hex "0x$1";
my $end = (defined $2) ? hex "0x$2" : $start;
if ($idtype =~ /Aspirational/ and (not $idtype =~ /Exclusion|Not_XID|Not_NFKC/)) {
for (my $i = $start; $i <= $end; ++$i) {
$idtype[$i] = $mappedIdType{'Aspirational'};
}
}
}
}
close FH;
open FH, "< $UNICODE/Unihan_Variants.txt" or die "can't open UCD file Unihan_Variants.txt (from Unihan.zip)\n"; open FH, "< $UNICODE/Unihan_Variants.txt" or die "can't open UCD file Unihan_Variants.txt (from Unihan.zip)\n";
push @versionInfo, ""; push @versionInfo, "";
while (<FH>) { while (<FH>) {
@ -681,8 +655,8 @@ while (<FH>) {
} }
close FH; close FH;
# read VerticalOrientation-16.txt # read VerticalOrientation-17.txt
open FH, "< $UNICODE/vertical/VerticalOrientation-16.txt" or die "can't open UTR50 data file VerticalOrientation-16.txt\n"; open FH, "< $UNICODE/vertical/VerticalOrientation-17.txt" or die "can't open UTR50 data file VerticalOrientation-17.txt\n";
push @versionInfo, ""; push @versionInfo, "";
while (<FH>) { while (<FH>) {
chomp; chomp;

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

@ -46,7 +46,6 @@ enum PairedBracketType {
enum IdentifierType { enum IdentifierType {
IDTYPE_RESTRICTED = 0, IDTYPE_RESTRICTED = 0,
IDTYPE_ALLOWED = 1, IDTYPE_ALLOWED = 1,
IDTYPE_ASPIRATIONAL = 2,
}; };
#if ENABLE_INTL_API // ICU is available, so simply forward to its API #if ENABLE_INTL_API // ICU is available, so simply forward to its API

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

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

@ -11,13 +11,12 @@
*/ */
/* /*
* Created on Tue Apr 4 21:22:17 2017 from UCD data files with version info: * Created on Wed Jun 28 17:08:23 2017 from UCD data files with version info:
* *
# Unicode Character Database # Unicode Character Database
# Date: 2016-06-20, 14:59:00 GMT [KW] # Date: 2017-06-18, 23:32:00 GMT [KW]
# © 2016 Unicode®, Inc. # © 2017 Unicode®, Inc.
# Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
# For terms of use, see http://www.unicode.org/terms_of_use.html # For terms of use, see http://www.unicode.org/terms_of_use.html
# #
# For documentation, see the following: # For documentation, see the following:
@ -25,44 +24,41 @@
# UAX #38, "Unicode Han Database (Unihan)" # UAX #38, "Unicode Han Database (Unihan)"
# UAX #44, "Unicode Character Database." # UAX #44, "Unicode Character Database."
# #
# The UAXes can be accessed at http://www.unicode.org/versions/Unicode9.0.0/ # The UAXes can be accessed at http://www.unicode.org/versions/Unicode10.0.0/
This directory contains the final data files This directory contains the final data files
for the Unicode Character Database, for Version 9.0.0 of the Unicode Standard. for the Unicode Character Database, for Version 10.0.0 of the Unicode Standard.
# Scripts-9.0.0.txt # Scripts-10.0.0.txt
# Date: 2016-06-01, 10:34:37 GMT # Date: 2017-03-11, 06:40:37 GMT
# BidiMirroring-9.0.0.txt # BidiMirroring-10.0.0.txt
# Date: 2016-01-21, 22:00:00 GMT [KW, LI] # Date: 2017-04-12, 17:30:00 GMT [KW, LI]
# BidiBrackets-9.0.0.txt # BidiBrackets-10.0.0.txt
# Date: 2016-06-07, 22:30:00 GMT [AG, LI, KW] # Date: 2017-04-12, 17:30:00 GMT [AG, LI, KW]
# HangulSyllableType-9.0.0.txt # HangulSyllableType-10.0.0.txt
# Date: 2016-03-02, 18:55:01 GMT # Date: 2017-02-14, 04:26:11 GMT
# LineBreak-9.0.0.txt # LineBreak-10.0.0.txt
# Date: 2016-05-26, 01:00:00 GMT [KW, LI] # Date: 2017-03-08, 02:00:00 GMT [KW, LI]
# EastAsianWidth-9.0.0.txt # EastAsianWidth-10.0.0.txt
# Date: 2016-05-27, 17:00:00 GMT [KW, LI] # Date: 2017-03-08, 02:00:00 GMT [KW, LI]
# DerivedCoreProperties-9.0.0.txt # DerivedCoreProperties-10.0.0.txt
# Date: 2016-06-01, 10:34:24 GMT # Date: 2017-03-19, 00:05:15 GMT
# IdentifierStatus.txt # IdentifierStatus.txt
# Date: 2016-06-16, 13:41:30 GMT # Date: 2017-04-08, 16:13:41 GMT
# IdentifierType.txt
# Date: 2016-06-16, 13:41:30 GMT
# #
# Unihan_Variants.txt # Unihan_Variants.txt
# Date: 2016-06-01 07:01:48 GMT [JHJ] # Date: 2017-05-14 07:01:48 GMT [JHJ]
# VerticalOrientation-16.txt # VerticalOrientation-17.txt
# Date: 2016-07-23, 01:00:00 GMT [EM, KI, LI] # Date: 2016-10-20, 07:00:00 GMT [EM, KI, LI]
* *
* * * * * This file contains MACHINE-GENERATED DATA, do not edit! * * * * * * * * * * This file contains MACHINE-GENERATED DATA, do not edit! * * * * *

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

@ -0,0 +1,77 @@
// Count constructor calls
var cnt = 0;
class Base { constructor() { ++cnt; } }
// Force |JSFunction->hasScript()|
new Base();
assertEq(cnt, 1);
// Calling a ClassConstructor must throw
(function() {
function f() { Base(); }
try { f() } catch (e) {}
try { f() } catch (e) {}
assertEq(cnt, 1);
})();
// Spread-calling a ClassConstructor must throw
(function() {
function f() { Base(...[]); }
try { f() } catch (e) {}
try { f() } catch (e) {}
assertEq(cnt, 1);
})();
// Function.prototype.call must throw on ClassConstructor
(function() {
function f() { Base.call(null); }
try { f() } catch (e) {}
try { f() } catch (e) {}
assertEq(cnt, 1);
})();
// Function.prototype.apply must throw on ClassConstructor
(function() {
function f() { Base.apply(null, []); }
try { f() } catch (e) {}
try { f() } catch (e) {}
assertEq(cnt, 1);
})();
// Getter must throw if it is a ClassConstructor
(function() {
var o = {};
Object.defineProperty(o, "prop", { get: Base });
function f() { o.prop };
try { f() } catch (e) {}
try { f() } catch (e) {}
assertEq(cnt, 1);
})();
// Setter must throw if it is a ClassConstructor
(function() {
var o = {};
Object.defineProperty(o, "prop", { set: Base });
function f() { o.prop = 1 };
try { f() } catch (e) {}
try { f() } catch (e) {}
assertEq(cnt, 1);
})();
// Proxy apply must throw if it is a ClassConstructor
(function() {
var o = new Proxy(function() { }, { apply: Base });
function f() { o() };
try { f() } catch (e) {}
try { f() } catch (e) {}
assertEq(cnt, 1);
})();
// Proxy get must throw if it is a ClassConstructor
(function() {
var o = new Proxy({}, { get: Base });
function f() { o.x }
try { f() } catch (e) {}
try { f() } catch (e) {}
assertEq(cnt, 1);
})();

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

@ -2877,8 +2877,10 @@ ICCallStubCompiler::guardFunApply(MacroAssembler& masm, AllocatableGeneralRegist
if (checkNative) { if (checkNative) {
masm.branchIfInterpreted(target, failure); masm.branchIfInterpreted(target, failure);
} else { } else {
masm.branchIfFunctionHasNoScript(target, failure);
Register temp = regs.takeAny(); Register temp = regs.takeAny();
masm.branchIfFunctionHasNoScript(target, failure);
masm.branchFunctionKind(Assembler::Equal, JSFunction::ClassConstructor,
callee, temp, failure);
masm.loadPtr(Address(target, JSFunction::offsetOfNativeOrScript()), temp); masm.loadPtr(Address(target, JSFunction::offsetOfNativeOrScript()), temp);
masm.loadBaselineOrIonRaw(temp, temp, failure); masm.loadBaselineOrIonRaw(temp, temp, failure);
regs.add(temp); regs.add(temp);
@ -3940,6 +3942,8 @@ ICCall_ScriptedFunCall::Compiler::generateStubCode(MacroAssembler& masm)
masm.branchTestObjClass(Assembler::NotEqual, callee, regs.getAny(), &JSFunction::class_, masm.branchTestObjClass(Assembler::NotEqual, callee, regs.getAny(), &JSFunction::class_,
&failure); &failure);
masm.branchIfFunctionHasNoScript(callee, &failure); masm.branchIfFunctionHasNoScript(callee, &failure);
masm.branchFunctionKind(Assembler::Equal, JSFunction::ClassConstructor,
callee, regs.getAny(), &failure);
masm.loadPtr(Address(callee, JSFunction::offsetOfNativeOrScript()), callee); masm.loadPtr(Address(callee, JSFunction::offsetOfNativeOrScript()), callee);
// Load the start of the target JitCode. // Load the start of the target JitCode.

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

@ -4567,6 +4567,10 @@ CodeGenerator::emitApplyGeneric(T* apply)
// Guard that calleereg is an interpreted function with a JSScript. // Guard that calleereg is an interpreted function with a JSScript.
masm.branchIfFunctionHasNoScript(calleereg, &invoke); masm.branchIfFunctionHasNoScript(calleereg, &invoke);
// Guard that calleereg is not a class constrcuctor
masm.branchFunctionKind(Assembler::Equal, JSFunction::ClassConstructor,
calleereg, objreg, &invoke);
// Knowing that calleereg is a non-native function, load the JSScript. // Knowing that calleereg is a non-native function, load the JSScript.
masm.loadPtr(Address(calleereg, JSFunction::offsetOfNativeOrScript()), objreg); masm.loadPtr(Address(calleereg, JSFunction::offsetOfNativeOrScript()), objreg);

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

@ -151,6 +151,9 @@ jit::IsCacheableGetPropCallNative(JSObject* obj, JSObject* holder, Shape* shape)
if (!getter.isNative()) if (!getter.isNative())
return false; return false;
if (getter.isClassConstructor())
return false;
// Check for a getter that has jitinfo and whose jitinfo says it's // Check for a getter that has jitinfo and whose jitinfo says it's
// OK with both inner and outer objects. // OK with both inner and outer objects.
if (getter.jitInfo() && !getter.jitInfo()->needsOuterizedThisObject()) if (getter.jitInfo() && !getter.jitInfo()->needsOuterizedThisObject())
@ -189,6 +192,9 @@ jit::IsCacheableGetPropCallScripted(JSObject* obj, JSObject* holder, Shape* shap
return false; return false;
} }
if (getter.isClassConstructor())
return false;
return true; return true;
} }
@ -235,6 +241,9 @@ jit::IsCacheableSetPropCallNative(JSObject* obj, JSObject* holder, Shape* shape)
if (!setter.isNative()) if (!setter.isNative())
return false; return false;
if (setter.isClassConstructor())
return false;
if (setter.jitInfo() && !setter.jitInfo()->needsOuterizedThisObject()) if (setter.jitInfo() && !setter.jitInfo()->needsOuterizedThisObject())
return true; return true;
@ -267,6 +276,9 @@ jit::IsCacheableSetPropCallScripted(JSObject* obj, JSObject* holder, Shape* shap
return false; return false;
} }
if (setter.isClassConstructor())
return false;
return true; return true;
} }

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

@ -1078,11 +1078,7 @@ js::FunctionToString(JSContext* cx, HandleFunction fun, bool prettyPrint)
}; };
if (haveSource) { if (haveSource) {
Rooted<JSFlatString*> src(cx, JSScript::sourceDataForToString(cx, script)); if (!script->appendSourceDataForToString(cx, out))
if (!src)
return nullptr;
if (!out.append(src))
return nullptr; return nullptr;
if (!prettyPrint && funIsNonArrowLambda) { if (!prettyPrint && funIsNonArrowLambda) {

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

@ -50,6 +50,7 @@
#include "vm/SelfHosting.h" #include "vm/SelfHosting.h"
#include "vm/Shape.h" #include "vm/Shape.h"
#include "vm/SharedImmutableStringsCache.h" #include "vm/SharedImmutableStringsCache.h"
#include "vm/StringBuffer.h"
#include "vm/Xdr.h" #include "vm/Xdr.h"
#include "vtune/VTuneWrapper.h" #include "vtune/VTuneWrapper.h"
@ -1486,11 +1487,11 @@ JSScript::sourceData(JSContext* cx, HandleScript script)
return script->scriptSource()->substring(cx, script->sourceStart(), script->sourceEnd()); return script->scriptSource()->substring(cx, script->sourceStart(), script->sourceEnd());
} }
/* static */ JSFlatString* bool
JSScript::sourceDataForToString(JSContext* cx, HandleScript script) JSScript::appendSourceDataForToString(JSContext* cx, StringBuffer& buf)
{ {
MOZ_ASSERT(script->scriptSource()->hasSourceData()); MOZ_ASSERT(scriptSource()->hasSourceData());
return script->scriptSource()->substring(cx, script->toStringStart(), script->toStringEnd()); return scriptSource()->appendSubstring(cx, buf, toStringStart(), toStringEnd());
} }
UncompressedSourceCache::AutoHoldEntry::AutoHoldEntry() UncompressedSourceCache::AutoHoldEntry::AutoHoldEntry()
@ -1796,6 +1797,22 @@ ScriptSource::substringDontDeflate(JSContext* cx, size_t start, size_t stop)
return NewStringCopyNDontDeflate<CanGC>(cx, chars.get(), len); return NewStringCopyNDontDeflate<CanGC>(cx, chars.get(), len);
} }
bool
ScriptSource::appendSubstring(JSContext* cx, StringBuffer& buf, size_t start, size_t stop)
{
MOZ_ASSERT(start <= stop);
size_t len = stop - start;
UncompressedSourceCache::AutoHoldEntry holder;
PinnedChars chars(cx, this, holder, start, len);
if (!chars.get())
return false;
// Sources can be large and we don't want to check "is this char Latin1"
// for each source code character, so inflate the buffer here.
if (len > 100 && !buf.ensureTwoByteChars())
return false;
return buf.append(chars.get(), len);
}
JSFlatString* JSFlatString*
ScriptSource::functionBodyString(JSContext* cx) ScriptSource::functionBodyString(JSContext* cx)
{ {

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

@ -567,6 +567,8 @@ class ScriptSource
JSFlatString* substring(JSContext* cx, size_t start, size_t stop); JSFlatString* substring(JSContext* cx, size_t start, size_t stop);
JSFlatString* substringDontDeflate(JSContext* cx, size_t start, size_t stop); JSFlatString* substringDontDeflate(JSContext* cx, size_t start, size_t stop);
MOZ_MUST_USE bool appendSubstring(JSContext* cx, js::StringBuffer& buf, size_t start, size_t stop);
bool isFunctionBody() { bool isFunctionBody() {
return parameterListEnd_ != 0; return parameterListEnd_ != 0;
} }
@ -1654,7 +1656,8 @@ class JSScript : public js::gc::TenuredCell
bool mayReadFrameArgsDirectly(); bool mayReadFrameArgsDirectly();
static JSFlatString* sourceData(JSContext* cx, JS::HandleScript script); static JSFlatString* sourceData(JSContext* cx, JS::HandleScript script);
static JSFlatString* sourceDataForToString(JSContext* cx, JS::HandleScript script);
MOZ_MUST_USE bool appendSourceDataForToString(JSContext* cx, js::StringBuffer& buf);
static bool loadSource(JSContext* cx, js::ScriptSource* ss, bool* worked); static bool loadSource(JSContext* cx, js::ScriptSource* ss, bool* worked);

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

@ -30,13 +30,16 @@ Wrapper::finalizeInBackground(const Value& priv) const
/* /*
* Make the 'background-finalized-ness' of the wrapper the same as the * Make the 'background-finalized-ness' of the wrapper the same as the
* wrapped object, to allow transplanting between them. * wrapped object, to allow transplanting between them.
*
* If the wrapped object is in the nursery then we know it doesn't have a
* finalizer, and so background finalization is ok.
*/ */
if (IsInsideNursery(&priv.toObject())) JSObject* wrapped = MaybeForwarded(&priv.toObject());
return true; gc::AllocKind wrappedKind;
return IsBackgroundFinalized(priv.toObject().asTenured().getAllocKind()); if (IsInsideNursery(wrapped)) {
JSRuntime *rt = wrapped->runtimeFromActiveCooperatingThread();
wrappedKind = wrapped->allocKindForTenure(rt->gc.nursery());
} else {
wrappedKind = wrapped->asTenured().getAllocKind();
}
return IsBackgroundFinalized(wrappedKind);
} }
bool bool

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

@ -72,8 +72,7 @@ ProxyObject::New(JSContext* cx, const BaseProxyHandler* handler, HandleValue pri
MOZ_ASSERT(priv.isNull() || (priv.isGCThing() && priv.toGCThing()->isTenured())); MOZ_ASSERT(priv.isNull() || (priv.isGCThing() && priv.toGCThing()->isTenured()));
newKind = SingletonObject; newKind = SingletonObject;
} else if ((priv.isGCThing() && priv.toGCThing()->isTenured()) || } else if ((priv.isGCThing() && priv.toGCThing()->isTenured()) ||
!handler->canNurseryAllocate() || !handler->canNurseryAllocate())
!handler->finalizeInBackground(priv))
{ {
newKind = TenuredObject; newKind = TenuredObject;
} }

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

@ -875,7 +875,8 @@ GlobalSegment::create(uint32_t globalDataLength)
GlobalSegment::~GlobalSegment() GlobalSegment::~GlobalSegment()
{ {
js_free(tlsData_->allocatedBase); if (tlsData_)
js_free(tlsData_->allocatedBase);
} }
size_t size_t

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

@ -140,10 +140,11 @@ public:
virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder, virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
LayerManager* aManager, LayerManager* aManager,
const ContainerLayerParameters& aContainerParameters) override; const ContainerLayerParameters& aContainerParameters) override;
virtual void CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder, virtual bool CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder,
const StackingContextHelper& aSc, const StackingContextHelper& aSc,
nsTArray<WebRenderParentCommand>& aParentCommands, nsTArray<WebRenderParentCommand>& aParentCommands,
WebRenderDisplayItemLayer* aLayer) override; mozilla::layers::WebRenderLayerManager* aManager,
nsDisplayListBuilder* aDisplayListBuilder) override;
NS_DISPLAY_DECL_NAME("ButtonBorderBackground", TYPE_BUTTON_BORDER_BACKGROUND) NS_DISPLAY_DECL_NAME("ButtonBorderBackground", TYPE_BUTTON_BORDER_BACKGROUND)
private: private:
nsButtonFrameRenderer* mBFR; nsButtonFrameRenderer* mBFR;
@ -205,22 +206,35 @@ nsDisplayButtonBorder::BuildLayer(nsDisplayListBuilder* aBuilder,
return BuildDisplayItemLayer(aBuilder, aManager, aContainerParameters); return BuildDisplayItemLayer(aBuilder, aManager, aContainerParameters);
} }
void bool
nsDisplayButtonBorder::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder, nsDisplayButtonBorder::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder,
const StackingContextHelper& aSc, const StackingContextHelper& aSc,
nsTArray<WebRenderParentCommand>& aCommands, nsTArray<WebRenderParentCommand>& aParentCommands,
WebRenderDisplayItemLayer* aLayer) mozilla::layers::WebRenderLayerManager* aManager,
nsDisplayListBuilder* aDisplayListBuilder)
{ {
if (aManager->IsLayersFreeTransaction()) {
ContainerLayerParameters parameter;
if (GetLayerState(aDisplayListBuilder, aManager, parameter) != LAYER_ACTIVE) {
return false;
}
}
MOZ_ASSERT(mBorderRenderer); MOZ_ASSERT(mBorderRenderer);
// This is really a combination of paint box shadow inner + // This is really a combination of paint box shadow inner +
// paint border. // paint border.
nsRect buttonRect = nsRect(ToReferenceFrame(), mFrame->GetSize()); nsRect buttonRect = nsRect(ToReferenceFrame(), mFrame->GetSize());
bool snap;
nsRegion visible = GetBounds(aDisplayListBuilder, &snap);
nsDisplayBoxShadowInner::CreateInsetBoxShadowWebRenderCommands(aBuilder, nsDisplayBoxShadowInner::CreateInsetBoxShadowWebRenderCommands(aBuilder,
aSc, aSc,
aLayer, visible,
mFrame, mFrame,
buttonRect); buttonRect);
mBorderRenderer->CreateWebRenderCommands(aBuilder, aSc, aLayer); mBorderRenderer->CreateWebRenderCommands(aBuilder, aSc);
return true;
} }
void void
@ -288,10 +302,11 @@ public:
virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder, virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
LayerManager* aManager, LayerManager* aManager,
const ContainerLayerParameters& aContainerParameters) override; const ContainerLayerParameters& aContainerParameters) override;
virtual void CreateWebRenderCommands(wr::DisplayListBuilder& aBuilder, virtual bool CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder,
const StackingContextHelper& aSc, const StackingContextHelper& aSc,
nsTArray<WebRenderParentCommand>& aParentCommands, nsTArray<WebRenderParentCommand>& aParentCommands,
WebRenderDisplayItemLayer* aLayer) override; mozilla::layers::WebRenderLayerManager* aManager,
nsDisplayListBuilder* aDisplayListBuilder) override;
NS_DISPLAY_DECL_NAME("ButtonForeground", TYPE_BUTTON_FOREGROUND) NS_DISPLAY_DECL_NAME("ButtonForeground", TYPE_BUTTON_FOREGROUND)
private: private:
nsButtonFrameRenderer* mBFR; nsButtonFrameRenderer* mBFR;
@ -373,14 +388,22 @@ nsDisplayButtonForeground::BuildLayer(nsDisplayListBuilder* aBuilder,
return BuildDisplayItemLayer(aBuilder, aManager, aContainerParameters); return BuildDisplayItemLayer(aBuilder, aManager, aContainerParameters);
} }
void bool
nsDisplayButtonForeground::CreateWebRenderCommands(wr::DisplayListBuilder& aBuilder, nsDisplayButtonForeground::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder,
const StackingContextHelper& aSc, const StackingContextHelper& aSc,
nsTArray<WebRenderParentCommand>& aParentCommands, nsTArray<WebRenderParentCommand>& aParentCommands,
mozilla::layers::WebRenderDisplayItemLayer* aLayer) mozilla::layers::WebRenderLayerManager* aManager,
nsDisplayListBuilder* aDisplayListBuilder)
{ {
MOZ_ASSERT(mBorderRenderer.isSome()); if (aManager->IsLayersFreeTransaction()) {
mBorderRenderer->CreateWebRenderCommands(aBuilder, aSc, aLayer); ContainerLayerParameters parameter;
if (GetLayerState(aDisplayListBuilder, aManager, parameter) != LAYER_ACTIVE) {
return false;
}
}
mBorderRenderer->CreateWebRenderCommands(aBuilder, aSc);
return true;
} }
nsresult nsresult

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

@ -538,10 +538,10 @@ public:
LayerManager* aManager, LayerManager* aManager,
const ContainerLayerParameters& aParameters) override; const ContainerLayerParameters& aParameters) override;
virtual void CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder, virtual void CreateWebRenderCommand(mozilla::wr::DisplayListBuilder& aBuilder,
const StackingContextHelper& aSc, const StackingContextHelper& aSc,
nsTArray<layers::WebRenderParentCommand>& aParentCommands, nsTArray<layers::WebRenderParentCommand>& aParentCommands,
layers::WebRenderDisplayItemLayer* aLayer) override; layers::WebRenderDisplayItemLayer* aLayer) override;
virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect, virtual void HitTest(nsDisplayListBuilder* aBuilder, const nsRect& aRect,
HitTestState* aState, HitTestState* aState,
@ -647,10 +647,10 @@ nsDisplayBullet::BuildLayer(nsDisplayListBuilder* aBuilder,
} }
void void
nsDisplayBullet::CreateWebRenderCommands(wr::DisplayListBuilder& aBuilder, nsDisplayBullet::CreateWebRenderCommand(wr::DisplayListBuilder& aBuilder,
const StackingContextHelper& aSc, const StackingContextHelper& aSc,
nsTArray<layers::WebRenderParentCommand>& aParentCommands, nsTArray<layers::WebRenderParentCommand>& aParentCommands,
layers::WebRenderDisplayItemLayer* aLayer) layers::WebRenderDisplayItemLayer* aLayer)
{ {
if (!mBulletRenderer) if (!mBulletRenderer)
return; return;

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

@ -305,13 +305,21 @@ nsDisplayCanvasBackgroundColor::BuildLayer(nsDisplayListBuilder* aBuilder,
return layer.forget(); return layer.forget();
} }
void bool
nsDisplayCanvasBackgroundColor::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder, nsDisplayCanvasBackgroundColor::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder,
const StackingContextHelper& aSc, const StackingContextHelper& aSc,
nsTArray<WebRenderParentCommand>& aParentCommands, nsTArray<WebRenderParentCommand>& aParentCommands,
WebRenderDisplayItemLayer* aLayer) WebRenderLayerManager* aManager,
nsDisplayListBuilder* aDisplayListBuilder)
{ {
nsCanvasFrame* frame = static_cast<nsCanvasFrame*>(mFrame); if (aManager->IsLayersFreeTransaction()) {
ContainerLayerParameters parameter;
if (GetLayerState(aDisplayListBuilder, aManager, parameter) != LAYER_ACTIVE) {
return false;
}
}
nsCanvasFrame *frame = static_cast<nsCanvasFrame *>(mFrame);
nsPoint offset = ToReferenceFrame(); nsPoint offset = ToReferenceFrame();
nsRect bgClipRect = frame->CanvasArea() + offset; nsRect bgClipRect = frame->CanvasArea() + offset;
int32_t appUnitsPerDevPixel = mFrame->PresContext()->AppUnitsPerDevPixel(); int32_t appUnitsPerDevPixel = mFrame->PresContext()->AppUnitsPerDevPixel();
@ -323,6 +331,7 @@ nsDisplayCanvasBackgroundColor::CreateWebRenderCommands(mozilla::wr::DisplayList
aBuilder.PushRect(transformedRect, aBuilder.PushRect(transformedRect,
transformedRect, transformedRect,
wr::ToWrColor(ToDeviceColor(mColor))); wr::ToWrColor(ToDeviceColor(mColor)));
return true;
} }
#ifdef MOZ_DUMP_PAINTING #ifdef MOZ_DUMP_PAINTING

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