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/talos/talos/scripts/jszip.min.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/dromaeo/**
testing/talos/talos/tests/v8_7/**

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

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

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

@ -15,7 +15,6 @@ Cu.import("resource://gre/modules/AppConstants.jsm");
Cu.import("resource://gre/modules/AsyncPrefs.jsm");
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", () =>
Cc["@mozilla.org/weave/service;1"].getService().wrappedJSObject
);
@ -260,6 +259,7 @@ function BrowserGlue() {
});
XPCOMUtils.defineLazyModuleGetter(this, "fxAccounts", "resource://gre/modules/FxAccounts.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "AlertsService", "@mozilla.org/alerts-service;1", "nsIAlertsService");
this._init();
}
@ -366,6 +366,9 @@ BrowserGlue.prototype = {
case "fxaccounts:device_connected":
this._onDeviceConnected(data);
break;
case "fxaccounts:verify_login":
this._onVerifyLoginNotification(JSON.parse(data));
break;
case "fxaccounts:device_disconnected":
data = JSON.parse(data);
if (data.isLocalDevice) {
@ -425,6 +428,10 @@ BrowserGlue.prototype = {
Object.defineProperty(this, "fxAccounts", {
value: subject.wrappedJSObject
});
} else if (data == "mock-alerts-service") {
Object.defineProperty(this, "AlertsService", {
value: subject.wrappedJSObject
});
}
break;
case "initial-migration-will-import-default-bookmarks":
@ -523,6 +530,7 @@ BrowserGlue.prototype = {
os.addObserver(this, "weave:service:ready");
os.addObserver(this, "fxaccounts:onverified");
os.addObserver(this, "fxaccounts:device_connected");
os.addObserver(this, "fxaccounts:verify_login");
os.addObserver(this, "fxaccounts:device_disconnected");
os.addObserver(this, "weave:engine:clients:display-uris");
os.addObserver(this, "session-save");
@ -569,6 +577,7 @@ BrowserGlue.prototype = {
os.removeObserver(this, "weave:service:ready");
os.removeObserver(this, "fxaccounts:onverified");
os.removeObserver(this, "fxaccounts:device_connected");
os.removeObserver(this, "fxaccounts:verify_login");
os.removeObserver(this, "fxaccounts:device_disconnected");
os.removeObserver(this, "weave:engine:clients:display-uris");
os.removeObserver(this, "session-save");
@ -1445,7 +1454,7 @@ BrowserGlue.prototype = {
try {
// This will throw NS_ERROR_NOT_AVAILABLE if the notification cannot
// be displayed per the idl.
AlertsService.showAlertNotification(null, title, text,
this.AlertsService.showAlertNotification(null, title, text,
true, url, clickCallback);
} catch (e) {
Cu.reportError(e);
@ -1711,7 +1720,7 @@ BrowserGlue.prototype = {
return;
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
@ -2298,12 +2307,40 @@ BrowserGlue.prototype = {
if (AppConstants.platform == "win") {
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) {
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) {
let accountsBundle = Services.strings.createBundle(
"chrome://browser/locale/accounts.properties"
@ -2326,7 +2363,7 @@ BrowserGlue.prototype = {
};
try {
AlertsService.showAlertNotification(null, title, body, true, null, clickCallback);
this.AlertsService.showAlertNotification(null, title, body, true, null, clickCallback);
} catch (ex) {
Cu.reportError("Error notifying of a new Sync device: " + ex);
}
@ -2342,7 +2379,7 @@ BrowserGlue.prototype = {
return;
this._openPreferences("sync", { origin: "devDisconnectedAlert"});
}
AlertsService.showAlertNotification(null, title, body, true, null, clickCallback);
this.AlertsService.showAlertNotification(null, title, body, true, null, clickCallback);
},
_handleFlashHang() {

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

@ -1,5 +1,5 @@
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;
{
exports.version = version = '1.8.497';
exports.build = build = 'f2fcf2a5';
exports.version = version = '1.8.507';
exports.build = build = '9e4dcf15';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
@ -4752,8 +4752,8 @@ if (!_util.globalScope.PDFJS) {
}
var PDFJS = _util.globalScope.PDFJS;
{
PDFJS.version = '1.8.497';
PDFJS.build = 'f2fcf2a5';
PDFJS.version = '1.8.507';
PDFJS.build = '9e4dcf15';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {
@ -10100,8 +10100,8 @@ exports.TilingPattern = TilingPattern;
"use strict";
var pdfjsVersion = '1.8.497';
var pdfjsBuild = 'f2fcf2a5';
var pdfjsVersion = '1.8.507';
var pdfjsBuild = '9e4dcf15';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(8);
var pdfjsDisplayAPI = __w_pdfjs_require__(3);

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

@ -4296,7 +4296,7 @@ exports.ColorSpace = ColorSpace;
Object.defineProperty(exports, "__esModule", {
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 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'];
@ -24004,6 +24004,7 @@ var WorkerMessageHandler = {
handler.send('GetDoc', { pdfInfo: doc });
}
function onFailure(e) {
ensureNotTerminated();
if (e instanceof _util.PasswordException) {
var task = new WorkerTask('PasswordException: response ' + e.code);
startWorkerTask(task);
@ -39818,8 +39819,8 @@ exports.Type1Parser = Type1Parser;
"use strict";
var pdfjsVersion = '1.8.497';
var pdfjsBuild = 'f2fcf2a5';
var pdfjsVersion = '1.8.507';
var pdfjsBuild = '9e4dcf15';
var pdfjsCoreWorker = __w_pdfjs_require__(17);
;
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

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

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

@ -327,24 +327,13 @@ menuitem.bookmark-item {
-moz-appearance: none;
-moz-box-align: stretch;
}
.urlbar-input-box {
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 {
-moz-appearance: toolbarbutton-dropdown;
transition: opacity 0.15s ease;
}
#urlbar-wrapper[switchingtabs] > #urlbar > .urlbar-textbox-container > .urlbar-history-dropmarker {
transition: none;
}

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

@ -172,6 +172,12 @@ toolbar:-moz-lwtheme {
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) {
-moz-appearance: none;
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%);
}
}
%endif
#navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar):not(#nav-bar):not(#addon-bar) {
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;
}
%ifndef MOZ_PHOTON_THEME
#nav-bar {
-moz-appearance: none;
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%));
}
}
%endif
/* Draw the bottom border of the tabs toolbar when it's not using
-moz-appearance: toolbar. */
@ -273,10 +282,12 @@ toolbar:-moz-lwtheme {
min-height: 23px;
}
%ifndef MOZ_PHOTON_THEME
#navigator-toolbox > toolbar:not(#TabsToolbar):-moz-lwtheme {
background-color: @toolbarColorLWT@;
background-image: url(chrome://browser/skin/Toolbar-background-noise.png);
}
%endif
#PersonalToolbar: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;
padding-inline-end: 5px;
}
.urlbar-input-box {
margin: 0;
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 {
padding: 0 3px;
list-style-image: var(--urlbar-dropmarker-url);
-moz-image-region: var(--urlbar-dropmarker-region);
transition: opacity 0.15s ease;
}
#urlbar-wrapper[switchingtabs] > #urlbar > .urlbar-textbox-container > .urlbar-history-dropmarker {
transition: none;
}

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

@ -151,7 +151,9 @@ browser.jar:
skin/classic/browser/sync-mobileIcon.svg (../shared/sync-mobileIcon.svg)
skin/classic/browser/syncProgress-horizontalbar.png
skin/classic/browser/syncProgress-horizontalbar@2x.png
#ifndef MOZ_PHOTON_THEME
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@2x.png (menuPanel-customize-yosemite@2x.png)
skin/classic/browser/yosemite/menuPanel-exit.png (menuPanel-exit-yosemite.png)

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

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

До

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

После

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

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

@ -204,17 +204,17 @@
.identity-popup-warning-yellow:-moz-locale-dir(rtl) {
background-position: 100% 50%;
}
/* SECURITY */
.identity-popup-connection-secure {
%ifdef MOZ_PHOTON_THEME
color: #058B00;
%else
color: #418220;
%endif
}
.identity-popup-connection-not-secure {
color: #d74345;
}
#identity-popup-securityView {
overflow: hidden;
}
@ -228,12 +228,16 @@
#identity-popup[connection=chrome] #identity-popup-security-content {
background-image: url(chrome://branding/content/icon48.png);
}
#identity-popup[connection^=secure] #identity-popup-securityView,
#identity-popup[connection^=secure] #identity-popup-security-content {
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. */
#identity-popup[ciphers=weak] #identity-popup-securityView,
#identity-popup[ciphers=weak] #identity-popup-security-content,

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

@ -4,24 +4,16 @@
- 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"
width="16" height="16" viewBox="0 0 16 16">
<style>
.icon-default {
fill: #4d9a26;
}
</style>
<defs>
<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-base" x="3" y="7" width="10" height="7" rx="1" ry="1" />
<mask id="mask-clasp-cutout">
<rect width="16" height="16" fill="#000" />
<use xlink:href="#shape-lock-clasp-outer" fill="#fff" />
<use xlink:href="#shape-lock-clasp-inner" fill="#000" />
</mask>
</defs>
<use xlink:href="#shape-lock-clasp-outer" mask="url(#mask-clasp-cutout)" class="icon-default" />
<use xlink:href="#shape-lock-base" class="icon-default" />
<use xlink:href="#shape-lock-clasp-outer" mask="url(#mask-clasp-cutout)" class="icon-default" fill="context-fill"/>
<use xlink:href="#shape-lock-base" class="icon-default" fill="context-fill"/>
</svg>

До

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

После

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

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

@ -18,10 +18,21 @@
overflow: hidden;
}
#urlbar[pageproxystate="valid"] > #identity-box.verifiedIdentity > #identity-icon-labels {
color: hsl(92,100%,30%);
%ifdef MOZ_PHOTON_THEME
#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 {
%ifdef MOZ_OFFICIAL_BRANDING
color: rgb(229,115,0);
@ -33,16 +44,48 @@
#identity-icon-labels:-moz-locale-dir(ltr) {
padding-left: 2px;
}
#identity-icon-labels:-moz-locale-dir(rtl) {
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
@conditionalForwardWithUrlbar@ > #forward-button[disabled] + #urlbar > #identity-box {
padding-inline-start: calc(var(--backbutton-urlbar-overlap) + 5px);
}
@conditionalForwardWithUrlbar@:hover:not([switchingtabs]) > #forward-button[disabled] + #urlbar > #identity-box {
/* 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
@ -77,32 +120,28 @@
#extension-icon:-moz-lwtheme {
fill: rgba(0,0,0,.6);
}
/* MAIN IDENTITY ICON */
#identity-icon {
margin-inline-start: 0;
list-style-image: url(chrome://browser/skin/identity-icon.svg);
}
#identity-box:hover > #identity-icon:not(.no-hover),
%ifndef MOZ_PHOTON_THEME
#identity-box:not(.no-hover):hover > #identity-icon,
#identity-box[open=true] > #identity-icon {
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 {
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 {
list-style-image: url(chrome://branding/content/identity-icons-brand.svg);
}
#urlbar[pageproxystate="invalid"] > #identity-box > #identity-icon {
opacity: .3;
}
@ -193,14 +232,17 @@
#extension-icon {
visibility: collapse;
}
#urlbar[pageproxystate="valid"] > #identity-box.verifiedDomain > #connection-icon,
#urlbar[pageproxystate="valid"] > #identity-box.verifiedIdentity > #connection-icon,
#urlbar[pageproxystate="valid"] > #identity-box.mixedActiveBlocked > #connection-icon {
list-style-image: url(chrome://browser/skin/connection-secure.svg);
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.mixedDisplayContent > #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-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-hover.svg (../shared/identity-block/identity-icon-hover.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)
#endif
skin/classic/browser/info.svg (../shared/info.svg)
* skin/classic/browser/menuPanel.svg (../shared/menuPanel.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);
}
%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) {
background-clip: padding-box;
background-image: linear-gradient(@toolbarHighlight@, @toolbarHighlight@);
@ -154,6 +159,7 @@ toolbar[brighttext] {
#navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar):not(:-moz-lwtheme) {
background-color: -moz-Dialog;
}
%endif
#navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar):not(#nav-bar):not(#addon-bar) {
overflow: -moz-hidden-unscrollable;
@ -825,23 +831,12 @@ html|*.urlbar-input:-moz-lwtheme::placeholder,
.urlbar-textbox-container {
-moz-box-align: stretch;
}
.urlbar-input-box {
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 {
-moz-box-align: center;
}
.urlbar-icon {
padding: 0 3px;
/* 16x16 icon with border-box sizing */

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

@ -161,7 +161,8 @@ inline bool isInIgnoredNamespaceForImplicitCtor(const Decl *Declaration) {
Name == "dwarf2reader" || // dwarf2reader
Name == "arm_ex_to_module" || // arm_ex_to_module
Name == "testing" || // gtest
Name == "Json"; // jsoncpp
Name == "Json" || // jsoncpp
Name == "pdfium"; // upstream pdfium 'base' package
}
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("libcubeb")) == 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;
}
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("sfntly")) == 0 ||
// 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;
}
if (Begin->compare_lower(StringRef("webrtc")) == 0) {

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

@ -55,16 +55,19 @@ httpWin.onload = function() {
// ----------------------------------------------------------------------------
// Test 2: window.open(data:)
var dataWin = window.open("data:text/html,<html><body>data</body></html>", "_blank", "width=10,height=10");
dataWin.onload = function() {
var dataChannel = SpecialPowers.wrap(dataWin.document).docShell.currentDocumentChannel;
var dataWin = window.open("data:text/html,<html><script>opener.postMessage('loaded','*');<\/script></html>", "_blank", "width=10,height=10");
window.onmessage = function (evt) {
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 dataLoadingPrincipal = dataChannel.loadInfo.loadingPrincipal;
is(dataTriggeringPrincipal, TRIGGERING_PRINCIPAL_URI,
"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");
is(dataLoadingPrincipal, null,

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

@ -1441,7 +1441,13 @@ FireForgetSkippable(uint32_t aSuspected, bool aRemoveChildless,
FinishAnyIncrementalGC();
bool earlyForgetSkippable =
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();
++sCleanupsSinceLastGC;
PRTime delta = PR_Now() - startTime;

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

@ -218,6 +218,8 @@ var tests =
{ method: "GET", withUpload: none, testAbort: true, testRedirectError: false, testNetworkError: false,
expectedEvents: [{target: XHR, type: "loadstart", optional: false},
{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: "loadend", optional: 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,
expectedEvents: [{target: XHR, type: "loadstart", optional: false},
{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: "loadend", optional: 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,
expectedEvents: [{target: XHR, type: "loadstart", optional: false},
{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: "loadend", optional: 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,
expectedEvents: [{target: XHR, type: "loadstart", optional: false},
{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: "loadend", optional: 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,
expectedEvents: [{target: XHR, type: "loadstart", optional: false},
{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: "loadend", optional: false}]},
{ method: "POST", withUpload: none, testAbort: false, testRedirectError: true, testNetworkError: false,

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

@ -174,3 +174,6 @@ include filters/reftest.list
# Bug 1366027
== 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
bug322588-popup.html
bug426082.html
bug545268.html
bug574663.html
bug607464.html
bug656379-1.html
bug418986-3.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-up-css_touch-manual.html
[test_trigger_fullscreen_by_pointer_events.html]
support-files =
file_test_trigger_fullscreen.html
[test_trigger_popup_by_pointer_events.html]

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

@ -12,7 +12,7 @@
SimpleTest.waitForExplicitFinish();
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", () => {
let target = win.document.getElementById("target");
target.addEventListener("pointerdown", () => {

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

@ -132,7 +132,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=545268
SimpleTest.waitForExplicitFinish();
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;
</script>

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

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

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

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

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

@ -28,7 +28,7 @@ function runTest() {
</pre>
<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>
</body>

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

@ -24,7 +24,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=944011
ok(true, "Got onclick");
SimpleTest.finish();
}
$('ifr').setAttribute('src', 'data:text/html,<html><body>Second frame</body></html>');
$('ifr').setAttribute('srcdoc', '<html><body>Second frame</body></html>');
break;
case 2:
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>
<p id="display"></p>
<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>
<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>
<p id="display"></p>
<div id="content" style="display: none" onerror="">
<iframe src="data:text/html,<body onerror=''>"></iframe>
<iframe srcdoc="<body onerror=''>"></iframe>
</div>
<pre id="test">
</pre>

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

@ -10,7 +10,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=697636
</head>
<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>
<p id="display"></p>
@ -27,9 +27,10 @@ var e1;
function begin()
{
frameWin = document.getElementById("f").contentWindow;
var f = document.getElementById("f");
frameWin = f.contentWindow;
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()

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

@ -10,7 +10,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=685402
</head>
<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>
<p id="display"></p>
@ -29,11 +29,12 @@ var prevTrusted;
function begin()
{
frameWin = document.getElementById("f").contentWindow;
var f = document.getElementById("f");
frameWin = f.contentWindow;
e1 = frameWin.document.body;
document.addEventListener("fullscreenchange", function() {
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});
e1.requestFullscreen();

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

@ -26,7 +26,7 @@ Tests:
<div id="fse">
<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>

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

@ -9,7 +9,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=802895
<iframe id="iframe1" src="about:mozilla"
srcdoc="Goodbye World"></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>
</body>

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

@ -0,0 +1 @@
Gone

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

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

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

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

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

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

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

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

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

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

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

@ -25,12 +25,6 @@ nsresult
ConvertMethodData(const PaymentMethodData& aMethodData,
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
nsAutoString serializedData;
if (aMethodData.mData.WasPassed()) {
@ -42,7 +36,7 @@ ConvertMethodData(const PaymentMethodData& aMethodData,
return rv;
}
}
aIPCMethodData = IPCPaymentMethodData(supportedMethods, serializedData);
aIPCMethodData = IPCPaymentMethodData(aMethodData.mSupportedMethods, serializedData);
return NS_OK;
}
@ -65,12 +59,6 @@ nsresult
ConvertModifier(const PaymentDetailsModifier& aModifier,
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
nsAutoString serializedData;
if (aModifier.mData.WasPassed()) {
@ -94,11 +82,11 @@ ConvertModifier(const PaymentDetailsModifier& aModifier,
additionalDisplayItems.AppendElement(displayItem);
}
}
aIPCModifier = IPCPaymentDetailsModifier(supportedMethods,
total,
additionalDisplayItems,
serializedData,
aModifier.mAdditionalDisplayItems.WasPassed());
aIPCModifier = IPCPaymentDetailsModifier(aModifier.mSupportedMethods,
total,
additionalDisplayItems,
serializedData,
aModifier.mAdditionalDisplayItems.WasPassed());
return NS_OK;
}

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

@ -43,31 +43,5 @@ DeserializeToJSObject(const nsAString& aSerializedObject, JSContext* aCx, JS::Mu
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 mozilla

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

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

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

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

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

@ -22,10 +22,7 @@ function checkSimplestRequest(payRequest) {
if (!methodData) {
emitTestFail("Fail to get payment methodData.");
}
if (methodData.supportedMethods.length != 1) {
emitTestFail("supportedMethods' length should be 1.");
}
const supportedMethod = methodData.supportedMethods.queryElementAt(0, Ci.nsISupportsString);
const supportedMethod = methodData.supportedMethods;
if (supportedMethod != "basic-card") {
emitTestFail("supported method should be 'basic-card'.");
}
@ -80,10 +77,7 @@ function checkComplexRequest(payRequest) {
if (!methodData) {
emitTestFail("Fail to get payment methodData.");
}
if (methodData.supportedMethods.length != 1) {
emitTestFail("supportedMethods' length should be 1.");
}
let supportedMethod = methodData.supportedMethods.queryElementAt(0, Ci.nsISupportsString);
let supportedMethod = methodData.supportedMethods;
if (supportedMethod != "basic-card") {
emitTestFail("supported method should be 'basic-card'.");
}
@ -142,11 +136,7 @@ function checkComplexRequest(payRequest) {
emitTestFail("modifiers' length should be 1.");
}
const modifier = modifiers.queryElementAt(0, Ci.nsIPaymentDetailsModifier);
const modifierSupportedMethods = modifier.supportedMethods;
if (modifierSupportedMethods.length != 1) {
emitTestFail("modifier's supported methods length should be 1.");
}
supportedMethod = modifierSupportedMethods.queryElementAt(0, Ci.nsISupportsString);
const supportedMethods = modifier.supportedMethods;
if (supportedMethod != "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);
ok(methodData, "Fail to get payment methodData.");
is(methodData.supportedMethods.length, 2, "supportedMethods' length should be 2.");
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.supportedMethods, "MyPay", "supported method should be 'MyPay'.");
is(methodData.data, "", "method data should be empty");
// checking the passed PaymentDetails parameter
@ -40,11 +36,7 @@ function checkComplexPayment(aPayment) {
const methodData = aPayment.paymentMethods.queryElementAt(0, Ci.nsIPaymentMethodData);
ok(methodData, "Fail to get payment methodData.");
is(methodData.supportedMethods.length, 2, "supportedMethods' length should be 2.");
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.supportedMethods, "MyPay", "supported method should be 'MyPay'.");
is(methodData.data, "", "method data should be empty");
// checking the passed PaymentDetails parameter
@ -69,10 +61,7 @@ function checkComplexPayment(aPayment) {
is(modifiers.length, 1, "modifiers' length should be 1.");
const modifier = modifiers.queryElementAt(0, Ci.nsIPaymentDetailsModifier);
const modifierSupportedMethods = modifier.supportedMethods;
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.supportedMethods, "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.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'.");

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -8,12 +8,6 @@ const testPageURL =
add_task(async function testPermissionAllow() {
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 () {
ok(true, "prompt showing");
@ -26,7 +20,12 @@ add_task(async function testPermissionAllow() {
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"),
Components.interfaces.nsIPermissionManager.ALLOW_ACTION,
@ -37,13 +36,6 @@ add_task(async function testPermissionAllow() {
});
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 () {
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");
});
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"),
Components.interfaces.nsIPermissionManager.ALLOW_ACTION,

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

@ -8,12 +8,6 @@ const testPageURL =
add_task(async function testPermissionDenied() {
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 () {
ok(true, "prompt showing");
@ -26,7 +20,12 @@ add_task(async function testPermissionDenied() {
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"),
Components.interfaces.nsIPermissionManager.DENY_ACTION,
@ -37,13 +36,6 @@ add_task(async function testPermissionDenied() {
});
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 () {
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");
});
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"),
Components.interfaces.nsIPermissionManager.DENY_ACTION,
@ -65,13 +62,6 @@ add_task(async function testNoPermissionPrompt() {
});
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 () {
ok(true, "prompt showing");
});
@ -84,7 +74,12 @@ add_task(async function testPermissionDeniedDismiss() {
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"),
Components.interfaces.nsIPermissionManager.DENY_ACTION,

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

@ -11,13 +11,6 @@ add_task(async function testPermissionUnknownInPrivateWindow() {
info("Creating private window");
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 () {
ok(false, "Shouldn't show a popup this time");
}, win);
@ -28,7 +21,12 @@ add_task(async function testPermissionUnknownInPrivateWindow() {
ok(false, "Shouldn't show a popup this time");
}, 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"),
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) {
await new Promise((resolve, reject) => {
content.addEventListener("message", function(event) {
is(event.data, aMessage, "received " + aMessage);
if (event.data == aMessage)
resolve();
else
reject();
}, {once: true});
return new Promise((resolve, reject) => {
function contentScript() {
addEventListener("message", function(event) {
sendAsyncMessage("testLocal:persisted",
{persisted: event.data});
}, {once: true}, 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"
nsSMILTime nsSMILTimeValue::kUnresolvedMillis = INT64_MAX;
const nsSMILTime nsSMILTimeValue::kUnresolvedMillis = INT64_MAX;
//----------------------------------------------------------------------
// nsSMILTimeValue methods:

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

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

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

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

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

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

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

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

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

@ -436,7 +436,10 @@ public:
, mIsWorkerScript(aIsWorkerScript)
, mFailed(false)
{
MOZ_ASSERT(aWorkerPrivate);
MOZ_ASSERT(aWorkerPrivate->IsServiceWorker());
mMainThreadEventTarget = aWorkerPrivate->MainThreadEventTarget();
MOZ_ASSERT(mMainThreadEventTarget);
mBaseURI = GetBaseURI(mIsWorkerScript, aWorkerPrivate);
AssertIsOnMainThread();
}
@ -471,6 +474,7 @@ private:
nsCString mCSPHeaderValue;
nsCString mCSPReportOnlyHeaderValue;
nsCString mReferrerPolicyHeaderValue;
nsCOMPtr<nsIEventTarget> mMainThreadEventTarget;
};
NS_IMPL_ISUPPORTS(CacheScriptLoader, nsIStreamLoaderObserver)
@ -1701,7 +1705,14 @@ CacheScriptLoader::ResolvedCallback(JSContext* aCx,
}
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))) {
Fail(rv);
return;

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

@ -5,6 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "ServiceWorkerScriptCache.h"
#include "mozilla/SystemGroup.h"
#include "mozilla/Unused.h"
#include "mozilla/dom/CacheBinding.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(!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))) {
Finish(rv, false);
return;

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

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

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

@ -50,6 +50,9 @@
# define APZCTM_LOG(...)
#endif
// #define APZ_KEY_LOG(...) printf_stderr("APZKEY: " __VA_ARGS__)
#define APZ_KEY_LOG(...)
namespace mozilla {
namespace layers {
@ -185,7 +188,16 @@ public:
{
if (mMayChangeFocus) {
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();
}
@ -1249,6 +1261,7 @@ APZCTreeManager::ReceiveInputEvent(InputData& aEvent,
// Disable async keyboard scrolling when accessibility.browsewithcaret is enabled
if (!gfxPrefs::APZKeyboardEnabled() ||
gfxPrefs::AccessibilityBrowseWithCaret()) {
APZ_KEY_LOG("Skipping key input from invalid prefs\n");
return result;
}
@ -1258,6 +1271,8 @@ APZCTreeManager::ReceiveInputEvent(InputData& aEvent,
Maybe<KeyboardShortcut> shortcut = mKeyboardMap.FindMatch(keyInput);
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
// only if we know there are no key event listeners for this target
if (mFocusState.CanIgnoreKeyboardShortcutMisses()) {
@ -1269,6 +1284,7 @@ APZCTreeManager::ReceiveInputEvent(InputData& aEvent,
// Check if this shortcut needs to be dispatched to content. Anything matching
// this is assumed to be able to change focus.
if (shortcut->mDispatchToContent) {
APZ_KEY_LOG("Skipping key input with dispatch-to-content shortcut\n");
return result;
}
@ -1299,6 +1315,7 @@ APZCTreeManager::ReceiveInputEvent(InputData& aEvent,
// 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.
if (!targetGuid) {
APZ_KEY_LOG("Skipping key input with no current focus target\n");
return result;
}
@ -1306,6 +1323,7 @@ APZCTreeManager::ReceiveInputEvent(InputData& aEvent,
targetGuid->mScrollId);
if (!targetApzc) {
APZ_KEY_LOG("Skipping key input with focus target but no APZC\n");
return result;
}
@ -1313,6 +1331,9 @@ APZCTreeManager::ReceiveInputEvent(InputData& aEvent,
// by the input queue.
keyInput.mAction = action;
APZ_KEY_LOG("Dispatching key input with apzc=%p\n",
targetApzc.get());
// Dispatch the event to the input queue.
result = mInputQueue->ReceiveInputEvent(
targetApzc,

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

@ -5,6 +5,9 @@
#include "mozilla/layers/FocusState.h"
// #define FS_LOG(...) printf_stderr("FS: " __VA_ARGS__)
#define FS_LOG(...)
namespace mozilla {
namespace layers {
@ -21,6 +24,10 @@ FocusState::FocusState()
bool
FocusState::IsCurrent() const
{
FS_LOG("Checking IsCurrent() with cseq=%" PRIu64 ", aseq=%" PRIu64 "\n",
mLastContentProcessedEvent,
mLastAPZProcessedEvent);
MOZ_ASSERT(mLastContentProcessedEvent <= mLastAPZProcessedEvent);
return mLastContentProcessedEvent == mLastAPZProcessedEvent;
}
@ -36,6 +43,12 @@ FocusState::Update(uint64_t aRootLayerTreeId,
uint64_t aOriginatingLayersId,
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
mFocusTree[aOriginatingLayersId] = aState;
@ -51,6 +64,8 @@ FocusState::Update(uint64_t aRootLayerTreeId,
while (true) {
auto currentNode = mFocusTree.find(mFocusLayersId);
if (currentNode == mFocusTree.end()) {
FS_LOG("Setting target to nil (cannot find lt=%" PRIu64 ")\n",
mFocusLayersId);
return;
}
@ -64,14 +79,23 @@ FocusState::Update(uint64_t aRootLayerTreeId,
// Guard against infinite loops
MOZ_ASSERT(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;
}
FS_LOG("Looking for target in lt=%" PRIu64 "\n", target.mData.mRefLayerId);
// The focus target is in a child layer tree
mFocusLayersId = target.mData.mRefLayerId;
break;
}
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
mFocusHorizontalTarget = target.mData.mScrollTargets.mHorizontal;
mFocusVerticalTarget = target.mData.mScrollTargets.mVertical;
@ -82,6 +106,8 @@ FocusState::Update(uint64_t aRootLayerTreeId,
return;
}
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
// we can always accurately report on whether we are stale or not
mLastContentProcessedEvent = target.mSequenceNumber;

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

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

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

@ -460,6 +460,12 @@ D3D11TextureData::Create(IntSize aSize, SurfaceFormat aFormat, SourceSurface* aS
RefPtr<ID3D11Texture2D> 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()) {
D3D11_BOX box;
box.front = box.top = box.left = 0;
@ -474,11 +480,6 @@ D3D11TextureData::Create(IntSize aSize, SurfaceFormat aFormat, SourceSurface* aS
if (srcSurf) {
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
// 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);
if (mTextureFlags & TextureFlags::ORIGIN_BOTTOM_LEFT) {
textureCoords.y = textureCoords.YMost();
textureCoords.y = 1.0 - textureCoords.y;
textureCoords.height = -textureCoords.height;
}

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

@ -17,6 +17,33 @@ StackingContextHelper::StackingContextHelper()
// 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,
wr::DisplayListBuilder& aBuilder,
WebRenderLayer* aLayer,

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

@ -42,6 +42,15 @@ public:
float* aOpacityPtr,
gfx::Matrix4x4* aTransformPtr,
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
// 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

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

@ -45,7 +45,15 @@ WebRenderDisplayItemLayer::RenderLayer(wr::DisplayListBuilder& aBuilder,
wr::DisplayListBuilder builder(WrBridge()->GetPipeline(), contentSize);
// We might have recycled this layer. Throw away the old commands.
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);
} else {
// else we have an empty transaction and just use the

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

@ -20,6 +20,7 @@
#include "WebRenderPaintedLayerBlob.h"
#include "WebRenderTextLayer.h"
#include "WebRenderDisplayItemLayer.h"
#include "nsDisplayList.h"
namespace mozilla {
@ -32,6 +33,7 @@ WebRenderLayerManager::WebRenderLayerManager(nsIWidget* aWidget)
, mLatestTransactionId(0)
, mNeedsComposite(false)
, mIsFirstPaint(false)
, mEndTransactionWithoutLayers(false)
, mTarget(nullptr)
, mPaintSequenceNumber(0)
{
@ -173,11 +175,81 @@ PopulateScrollData(WebRenderScrollData& aTarget, Layer* aLayer)
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
WebRenderLayerManager::EndTransaction(DrawPaintedLayerCallback aCallback,
void* aCallbackData,
EndTransactionFlags aFlags)
{
mEndTransactionWithoutLayers = false;
DiscardImages();
WrBridge()->RemoveExpiredFontKeys();
EndTransactionInternal(aCallback, aCallbackData, aFlags);
@ -186,7 +258,9 @@ WebRenderLayerManager::EndTransaction(DrawPaintedLayerCallback aCallback,
bool
WebRenderLayerManager::EndTransactionInternal(DrawPaintedLayerCallback aCallback,
void* aCallbackData,
EndTransactionFlags aFlags)
EndTransactionFlags aFlags,
nsDisplayList* aDisplayList,
nsDisplayListBuilder* aDisplayListBuilder)
{
AutoProfilerTracing tracing("Paint", "RenderLayers");
mPaintedLayerCallback = aCallback;
@ -205,12 +279,29 @@ WebRenderLayerManager::EndTransactionInternal(DrawPaintedLayerCallback aCallback
return false;
}
DiscardCompositorAnimations();
mRoot->StartPendingAnimations(mAnimationReadyTime);
StackingContextHelper sc;
WrSize contentSize { (float)size.width, (float)size.height };
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);
WrBridge()->ClearReadLocks();

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

@ -10,10 +10,13 @@
#include "mozilla/MozPromise.h"
#include "mozilla/layers/APZTestData.h"
#include "mozilla/layers/FocusTarget.h"
#include "mozilla/layers/StackingContextHelper.h"
#include "mozilla/layers/TransactionIdAllocator.h"
#include "mozilla/webrender/WebRenderAPI.h"
#include "mozilla/webrender/WebRenderTypes.h"
class nsIWidget;
class nsDisplayList;
namespace mozilla {
namespace layers {
@ -22,6 +25,7 @@ class CompositorBridgeChild;
class KnowsCompositor;
class PCompositorBridgeChild;
class WebRenderBridgeChild;
class WebRenderParentCommand;
class WebRenderLayerManager final : public LayerManager
{
@ -48,6 +52,13 @@ public:
virtual bool BeginTransactionWithTarget(gfxContext* aTarget) override;
virtual bool BeginTransaction() 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,
void* aCallbackData,
EndTransactionFlags aFlags = END_DEFAULT) override;
@ -152,8 +163,9 @@ private:
bool EndTransactionInternal(DrawPaintedLayerCallback aCallback,
void* aCallbackData,
EndTransactionFlags aFlags);
EndTransactionFlags aFlags,
nsDisplayList* aDisplayList = nullptr,
nsDisplayListBuilder* aDisplayListBuilder = nullptr);
private:
nsIWidget* MOZ_NON_OWNING_REF mWidget;
@ -174,6 +186,11 @@ private:
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
// then a display item layer will no longer be valid
// if it was a mutated layers.
@ -185,6 +202,7 @@ private:
bool mNeedsComposite;
bool mIsFirstPaint;
FocusTarget mFocusTarget;
bool mEndTransactionWithoutLayers;
// 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

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

@ -473,6 +473,7 @@ private:
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_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);
// Use vsync events generated by hardware
DECL_GFX_PREF(Once, "gfx.work-around-driver-bugs", WorkAroundDriverBugs, bool, true);

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

@ -795,15 +795,16 @@ void
DisplayListBuilder::PushBorder(const WrRect& aBounds,
const WrRect& aClip,
const WrBorderWidths& aWidths,
const WrBorderSide& aTop,
const WrBorderSide& aRight,
const WrBorderSide& aBottom,
const WrBorderSide& aLeft,
const Range<const WrBorderSide>& aSides,
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);
wr_dp_push_border(mWrState, aBounds, tok,
aWidths, aTop, aRight, aBottom, aLeft, aRadius);
aWidths, aSides[0], aSides[1], aSides[2], aSides[3], aRadius);
}
void

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

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

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

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

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

@ -46,7 +46,6 @@ enum PairedBracketType {
enum IdentifierType {
IDTYPE_RESTRICTED = 0,
IDTYPE_ALLOWED = 1,
IDTYPE_ASPIRATIONAL = 2,
};
#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
# Date: 2016-06-20, 14:59:00 GMT [KW]
# © 2016 Unicode®, Inc.
# Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
# Date: 2017-06-18, 23:32:00 GMT [KW]
# © 2017 Unicode®, Inc.
# For terms of use, see http://www.unicode.org/terms_of_use.html
#
# For documentation, see the following:
@ -25,44 +24,41 @@
# UAX #38, "Unicode Han Database (Unihan)"
# 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
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
# Date: 2016-06-01, 10:34:37 GMT
# Scripts-10.0.0.txt
# Date: 2017-03-11, 06:40:37 GMT
# BidiMirroring-9.0.0.txt
# Date: 2016-01-21, 22:00:00 GMT [KW, LI]
# BidiMirroring-10.0.0.txt
# Date: 2017-04-12, 17:30:00 GMT [KW, LI]
# BidiBrackets-9.0.0.txt
# Date: 2016-06-07, 22:30:00 GMT [AG, LI, KW]
# BidiBrackets-10.0.0.txt
# Date: 2017-04-12, 17:30:00 GMT [AG, LI, KW]
# HangulSyllableType-9.0.0.txt
# Date: 2016-03-02, 18:55:01 GMT
# HangulSyllableType-10.0.0.txt
# Date: 2017-02-14, 04:26:11 GMT
# LineBreak-9.0.0.txt
# Date: 2016-05-26, 01:00:00 GMT [KW, LI]
# LineBreak-10.0.0.txt
# Date: 2017-03-08, 02:00:00 GMT [KW, LI]
# EastAsianWidth-9.0.0.txt
# Date: 2016-05-27, 17:00:00 GMT [KW, LI]
# EastAsianWidth-10.0.0.txt
# Date: 2017-03-08, 02:00:00 GMT [KW, LI]
# DerivedCoreProperties-9.0.0.txt
# Date: 2016-06-01, 10:34:24 GMT
# DerivedCoreProperties-10.0.0.txt
# Date: 2017-03-19, 00:05:15 GMT
# IdentifierStatus.txt
# Date: 2016-06-16, 13:41:30 GMT
# IdentifierType.txt
# Date: 2016-06-16, 13:41:30 GMT
# Date: 2017-04-08, 16:13:41 GMT
#
# Unihan_Variants.txt
# Date: 2016-06-01 07:01:48 GMT [JHJ]
# Date: 2017-05-14 07:01:48 GMT [JHJ]
# VerticalOrientation-16.txt
# Date: 2016-07-23, 01:00:00 GMT [EM, KI, LI]
# VerticalOrientation-17.txt
# Date: 2016-10-20, 07:00:00 GMT [EM, KI, LI]
*
* * * * * 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) {
masm.branchIfInterpreted(target, failure);
} else {
masm.branchIfFunctionHasNoScript(target, failure);
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.loadBaselineOrIonRaw(temp, temp, failure);
regs.add(temp);
@ -3940,6 +3942,8 @@ ICCall_ScriptedFunCall::Compiler::generateStubCode(MacroAssembler& masm)
masm.branchTestObjClass(Assembler::NotEqual, callee, regs.getAny(), &JSFunction::class_,
&failure);
masm.branchIfFunctionHasNoScript(callee, &failure);
masm.branchFunctionKind(Assembler::Equal, JSFunction::ClassConstructor,
callee, regs.getAny(), &failure);
masm.loadPtr(Address(callee, JSFunction::offsetOfNativeOrScript()), callee);
// 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.
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.
masm.loadPtr(Address(calleereg, JSFunction::offsetOfNativeOrScript()), objreg);

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

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

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

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

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

@ -50,6 +50,7 @@
#include "vm/SelfHosting.h"
#include "vm/Shape.h"
#include "vm/SharedImmutableStringsCache.h"
#include "vm/StringBuffer.h"
#include "vm/Xdr.h"
#include "vtune/VTuneWrapper.h"
@ -1486,11 +1487,11 @@ JSScript::sourceData(JSContext* cx, HandleScript script)
return script->scriptSource()->substring(cx, script->sourceStart(), script->sourceEnd());
}
/* static */ JSFlatString*
JSScript::sourceDataForToString(JSContext* cx, HandleScript script)
bool
JSScript::appendSourceDataForToString(JSContext* cx, StringBuffer& buf)
{
MOZ_ASSERT(script->scriptSource()->hasSourceData());
return script->scriptSource()->substring(cx, script->toStringStart(), script->toStringEnd());
MOZ_ASSERT(scriptSource()->hasSourceData());
return scriptSource()->appendSubstring(cx, buf, toStringStart(), toStringEnd());
}
UncompressedSourceCache::AutoHoldEntry::AutoHoldEntry()
@ -1796,6 +1797,22 @@ ScriptSource::substringDontDeflate(JSContext* cx, size_t start, size_t stop)
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*
ScriptSource::functionBodyString(JSContext* cx)
{

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

@ -567,6 +567,8 @@ class ScriptSource
JSFlatString* substring(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() {
return parameterListEnd_ != 0;
}
@ -1654,7 +1656,8 @@ class JSScript : public js::gc::TenuredCell
bool mayReadFrameArgsDirectly();
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);

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

@ -30,13 +30,16 @@ Wrapper::finalizeInBackground(const Value& priv) const
/*
* Make the 'background-finalized-ness' of the wrapper the same as the
* 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()))
return true;
return IsBackgroundFinalized(priv.toObject().asTenured().getAllocKind());
JSObject* wrapped = MaybeForwarded(&priv.toObject());
gc::AllocKind wrappedKind;
if (IsInsideNursery(wrapped)) {
JSRuntime *rt = wrapped->runtimeFromActiveCooperatingThread();
wrappedKind = wrapped->allocKindForTenure(rt->gc.nursery());
} else {
wrappedKind = wrapped->asTenured().getAllocKind();
}
return IsBackgroundFinalized(wrappedKind);
}
bool

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

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

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

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

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

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

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

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

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

@ -305,13 +305,21 @@ nsDisplayCanvasBackgroundColor::BuildLayer(nsDisplayListBuilder* aBuilder,
return layer.forget();
}
void
bool
nsDisplayCanvasBackgroundColor::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder,
const StackingContextHelper& aSc,
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();
nsRect bgClipRect = frame->CanvasArea() + offset;
int32_t appUnitsPerDevPixel = mFrame->PresContext()->AppUnitsPerDevPixel();
@ -323,6 +331,7 @@ nsDisplayCanvasBackgroundColor::CreateWebRenderCommands(mozilla::wr::DisplayList
aBuilder.PushRect(transformedRect,
transformedRect,
wr::ToWrColor(ToDeviceColor(mColor)));
return true;
}
#ifdef MOZ_DUMP_PAINTING

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