merge mozilla-central to autoland. r=merge a=merge

This commit is contained in:
Sebastian Hengst 2017-09-21 15:28:11 +02:00
Родитель d7384ffbb5 7eec7a0a11
Коммит 0f2ed2d557
98 изменённых файлов: 1070 добавлений и 505 удалений

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

@ -673,6 +673,10 @@ pref("accessibility.typeaheadfind.timeout", 5000);
pref("accessibility.typeaheadfind.linksonly", false);
pref("accessibility.typeaheadfind.flashBar", 1);
// Accessibility indicator preferences such as support URL, enabled flag.
pref("accessibility.support.url", "https://support.mozilla.org/%LOCALE%/kb/accessibility-services");
pref("accessibility.indicator.enabled", true);
pref("plugins.click_to_play", true);
pref("plugins.testmode", false);

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

@ -300,7 +300,8 @@ toolbarpaletteitem {
%endif
%if !defined(MOZ_WIDGET_GTK)
#TabsToolbar > .private-browsing-indicator {
#TabsToolbar > .private-browsing-indicator,
#TabsToolbar > .accessibility-indicator {
-moz-box-ordinal-group: 1000;
}
%endif

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

@ -1362,6 +1362,7 @@ var gBrowserInit = {
CombinedStopReload.init();
gPrivateBrowsingUI.init();
BrowserPageActions.init();
gAccessibilityServiceIndicator.init();
if (window.matchMedia("(-moz-os-version: windows-win8)").matches &&
window.matchMedia("(-moz-windows-default-theme)").matches) {
@ -1865,6 +1866,8 @@ var gBrowserInit = {
DownloadsButton.uninit();
gAccessibilityServiceIndicator.uninit();
// Now either cancel delayedStartup, or clean up the services initialized from
// it.
if (this._boundDelayedStartup) {
@ -8044,6 +8047,63 @@ function getBrowser() {
return gBrowser;
}
const gAccessibilityServiceIndicator = {
init() {
// Pref to enable accessibility service indicator.
gPrefService.addObserver("accessibility.indicator.enabled", this);
// Accessibility service init/shutdown event.
Services.obs.addObserver(this, "a11y-init-or-shutdown");
this.update(Services.appinfo.accessibilityEnabled);
},
update(accessibilityEnabled = false) {
if (this.enabled && accessibilityEnabled) {
this._active = true;
document.documentElement.setAttribute("accessibilitymode", "true");
[...document.querySelectorAll(".accessibility-indicator")].forEach(
indicator => ["click", "keypress"].forEach(type =>
indicator.addEventListener(type, this)));
TabsInTitlebar.updateAppearance(true);
} else if (this._active) {
this._active = false;
document.documentElement.removeAttribute("accessibilitymode");
[...document.querySelectorAll(".accessibility-indicator")].forEach(
indicator => ["click", "keypress"].forEach(type =>
indicator.removeEventListener(type, this)));
TabsInTitlebar.updateAppearance(true);
}
},
observe(subject, topic, data) {
if (topic == "nsPref:changed" && data === "accessibility.indicator.enabled") {
this.update(Services.appinfo.accessibilityEnabled);
} else if (topic === "a11y-init-or-shutdown") {
// When "a11y-init-or-shutdown" event is fired, "1" indicates that
// accessibility service is started and "0" that it is shut down.
this.update(data === "1");
}
},
get enabled() {
return gPrefService.getBoolPref("accessibility.indicator.enabled");
},
handleEvent({ key, type }) {
if ((type === "keypress" && [" ", "Enter"].includes(key)) ||
type === "click") {
let a11yServicesSupportURL =
Services.urlFormatter.formatURLPref("accessibility.support.url");
gBrowser.selectedTab = gBrowser.addTab(a11yServicesSupportURL);
}
},
uninit() {
gPrefService.removeObserver("accessibility.indicator.enabled", this);
Services.obs.removeObserver(this, "a11y-init-or-shutdown");
this.update();
}
};
var gPrivateBrowsingUI = {
init: function PBUI_init() {
// Do nothing for normal windows

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

@ -573,9 +573,8 @@
<spacer id="titlebar-spacer" flex="1"/>
<hbox id="titlebar-buttonbox-container">
#ifdef XP_WIN
<hbox id="private-browsing-indicator-titlebar">
<hbox class="private-browsing-indicator"/>
</hbox>
<button class="accessibility-indicator" tooltiptext="&accessibilityIndicator.tooltip;" aria-live="polite"/>
<hbox class="private-browsing-indicator"/>
#endif
<hbox id="titlebar-buttonbox">
<toolbarbutton class="titlebar-button" id="titlebar-min" oncommand="window.minimize();"/>
@ -587,6 +586,7 @@
<!-- OS X does not natively support RTL for its titlebar items, so we prevent this secondary
buttonbox from reversing order in RTL by forcing an LTR direction. -->
<hbox id="titlebar-secondary-buttonbox" dir="ltr">
<button class="accessibility-indicator" tooltiptext="&accessibilityIndicator.tooltip;" aria-live="polite"/>
<hbox class="private-browsing-indicator"/>
<hbox id="titlebar-fullscreen-button"/>
</hbox>
@ -633,8 +633,12 @@
collapsed="true">
#if defined(MOZ_WIDGET_GTK)
<hbox id="private-browsing-indicator"
<hbox class="private-browsing-indicator"
skipintoolbarset="true"/>
<button class="accessibility-indicator"
tooltiptext="&accessibilityIndicator.tooltip;"
aria-live="polite"
skipintoolbarset="true"/>
#endif
<tabs id="tabbrowser-tabs"
@ -682,6 +686,8 @@
</toolbarbutton>
#if !defined(MOZ_WIDGET_GTK)
<button class="accessibility-indicator" tooltiptext="&accessibilityIndicator.tooltip;"
aria-live="polite" skipintoolbarset="true"/>
<hbox class="private-browsing-indicator" skipintoolbarset="true"/>
#endif
#ifdef CAN_DRAW_IN_TITLEBAR

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

@ -25,6 +25,7 @@ const EXPECTED_REFLOWS_FIRST_OPEN = [
"_appendCurrentResult/<@chrome://global/content/bindings/autocomplete.xml",
],
times: 18, // This number should only ever go down - never up.
minTimes: 12,
},
{

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

@ -23,9 +23,6 @@ const EXPECTED_REFLOWS_FIRST_OPEN = [
"handleOverUnderflow@chrome://global/content/bindings/autocomplete.xml",
"_onChanged@chrome://global/content/bindings/autocomplete.xml",
"_appendCurrentResult/<@chrome://global/content/bindings/autocomplete.xml",
"setTimeout handler*_appendCurrentResult@chrome://global/content/bindings/autocomplete.xml",
"_invalidate@chrome://global/content/bindings/autocomplete.xml",
"invalidate@chrome://global/content/bindings/autocomplete.xml"
],
times: 6, // This number should only ever go down - never up.
minTimes: 0, // Sometimes this is not hit.

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

@ -4,6 +4,7 @@ support-files =
test_bug1358314.html
[browser_abandonment_telemetry.js]
[browser_accessibility_indicator.js]
[browser_allow_process_switches_despite_related_browser.js]
[browser_contextmenu_openlink_after_tabnavigated.js]
[browser_isLocalAboutURI.js]

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

@ -0,0 +1,124 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
const A11Y_INDICATOR_ENABLED_PREF = "accessibility.indicator.enabled";
/**
* Test various pref and UI properties based on whether the accessibility
* indicator is enabled and the accessibility service is initialized.
* @param {Object} win browser window to check the indicator in.
* @param {Boolean} enabled pref flag for accessibility indicator.
* @param {Boolean} active whether accessibility service is started or not.
*/
function testIndicatorState(win, enabled, active) {
is(Services.prefs.getBoolPref(A11Y_INDICATOR_ENABLED_PREF), enabled,
`Indicator is ${enabled ? "enabled" : "disabled"}.`);
is(Services.appinfo.accessibilityEnabled, active,
`Accessibility service is ${active ? "enabled" : "disabled"}.`);
let visible = enabled && active;
is(win.document.documentElement.hasAttribute("accessibilitymode"), visible,
`accessibilitymode flag is ${visible ? "set" : "unset"}.`);
// Browser UI has 2 indicators in markup for OSX and Windows but only 1 is
// shown depending on whether the titlebar is enabled.
let expectedVisibleCount = visible ? 1 : 0;
let visibleCount = 0;
[...win.document.querySelectorAll(".accessibility-indicator")].forEach(indicator =>
win.getComputedStyle(indicator).getPropertyValue("display") !== "none" &&
visibleCount++);
is(expectedVisibleCount, visibleCount,
`Indicator is ${visible ? "visible" : "invisible"}.`);
}
/**
* Instantiate accessibility service and wait for event associated with its
* startup, if necessary.
*/
async function initAccessibilityService() {
let accService = Cc["@mozilla.org/accessibilityService;1"].getService(
Ci.nsIAccessibilityService);
if (!Services.appinfo.accessibilityEnabled) {
await new Promise(resolve => {
let observe = (subject, topic, data) => {
Services.obs.removeObserver(observe, "a11y-init-or-shutdown");
// "1" indicates that the accessibility service is initialized.
data === "1" && resolve();
};
Services.obs.addObserver(observe, "a11y-init-or-shutdown");
})
}
return accService;
}
/**
* If accessibility service is not yet disabled, wait for the event associated
* with its shutdown.
*/
async function shutdownAccessibilityService() {
if (Services.appinfo.accessibilityEnabled) {
await new Promise(resolve => {
let observe = (subject, topic, data) => {
Services.obs.removeObserver(observe, "a11y-init-or-shutdown");
// "1" indicates that the accessibility service is shutdown.
data === "0" && resolve();
};
Services.obs.addObserver(observe, "a11y-init-or-shutdown");
})
}
}
/**
* Force garbage collection.
*/
function forceGC() {
SpecialPowers.gc();
SpecialPowers.forceShrinkingGC();
SpecialPowers.forceCC();
}
add_task(async function test_accessibility_indicator() {
info("Test default accessibility indicator state.");
let newWin = await BrowserTestUtils.openNewBrowserWindow();
testIndicatorState(window, true, false);
testIndicatorState(newWin, true, false);
info("Enable accessibility and ensure the indicator is shown in all windows.");
let accService = await initAccessibilityService(); // eslint-disable-line no-unused-vars
testIndicatorState(window, true, true);
testIndicatorState(newWin, true, true);
info("Open a new window and ensure the indicator is shown there by default.");
let dynamicWin = await BrowserTestUtils.openNewBrowserWindow({ private: true });
testIndicatorState(dynamicWin, true, true);
await BrowserTestUtils.closeWindow(dynamicWin);
info("Preff off accessibility indicator.");
Services.prefs.setBoolPref(A11Y_INDICATOR_ENABLED_PREF, false);
testIndicatorState(window, false, true);
testIndicatorState(newWin, false, true);
dynamicWin = await BrowserTestUtils.openNewBrowserWindow({ private: true });
testIndicatorState(dynamicWin, false, true);
info("Preff on accessibility indicator.");
Services.prefs.setBoolPref(A11Y_INDICATOR_ENABLED_PREF, true);
testIndicatorState(window, true, true);
testIndicatorState(newWin, true, true);
testIndicatorState(dynamicWin, true, true);
info("Disable accessibility and ensure the indicator is hidden in all windows.");
accService = undefined;
forceGC();
await shutdownAccessibilityService();
testIndicatorState(window, true, false);
testIndicatorState(newWin, true, false);
testIndicatorState(dynamicWin, true, false);
Services.prefs.clearUserPref(A11Y_INDICATOR_ENABLED_PREF);
await BrowserTestUtils.closeWindow(newWin);
await BrowserTestUtils.closeWindow(dynamicWin);
});

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

@ -1641,8 +1641,7 @@ var gPrivacyPane = {
_initA11yString() {
let a11yLearnMoreLink =
Services.urlFormatter.formatURLPref("app.support.baseURL") +
"accessibility";
Services.urlFormatter.formatURLPref("accessibility.support.url");
document.getElementById("a11yLearnMoreLink")
.setAttribute("href", a11yLearnMoreLink);
},

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

@ -476,23 +476,6 @@ this.FormAutofillHeuristics = {
];
let regexps = isAutoCompleteOff ? FIELDNAMES_IGNORING_AUTOCOMPLETE_OFF : Object.keys(this.RULES);
if (!FormAutofillUtils.isAutofillCreditCardsAvailable) {
if (isAutoCompleteOff) {
if (!this._regexpListOf_CcUnavailable_AcOff) {
this._regexpListOf_CcUnavailable_AcOff = regexps.filter(name => !FormAutofillUtils.isCreditCardField(name));
}
regexps = this._regexpListOf_CcUnavailable_AcOff;
} else {
if (!this._regexpListOf_CcUnavailable_AcOn) {
this._regexpListOf_CcUnavailable_AcOn = regexps.filter(name => !FormAutofillUtils.isCreditCardField(name));
}
regexps = this._regexpListOf_CcUnavailable_AcOn;
}
}
if (regexps.length == 0) {
return null;
}
let labelStrings;
let getElementStrings = {};
getElementStrings[Symbol.iterator] = function* () {

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

@ -1,5 +1,5 @@
This is the PDF.js project output, https://github.com/mozilla/pdf.js
Current extension version is: 1.9.562
Current extension version is: 1.9.583
Taken from upstream commit: 31a34335
Taken from upstream commit: d7b37ae7

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

@ -1459,7 +1459,7 @@ exports.unreachable = unreachable;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DOMSVGFactory = exports.DOMCMapReaderFactory = exports.DOMCanvasFactory = exports.DEFAULT_LINK_REL = exports.getDefaultSetting = exports.LinkTarget = exports.getFilenameFromUrl = exports.isValidUrl = exports.isExternalLinkTargetSet = exports.addLinkAttributes = exports.RenderingCancelledException = exports.CustomStyle = undefined;
exports.SimpleXMLParser = exports.DOMSVGFactory = exports.DOMCMapReaderFactory = exports.DOMCanvasFactory = exports.DEFAULT_LINK_REL = exports.getDefaultSetting = exports.LinkTarget = exports.getFilenameFromUrl = exports.isValidUrl = exports.isExternalLinkTargetSet = exports.addLinkAttributes = exports.RenderingCancelledException = exports.CustomStyle = undefined;
var _util = __w_pdfjs_require__(0);
@ -1562,6 +1562,107 @@ class DOMSVGFactory {
return document.createElementNS(SVG_NS, type);
}
}
class SimpleDOMNode {
constructor(nodeName, nodeValue) {
this.nodeName = nodeName;
this.nodeValue = nodeValue;
Object.defineProperty(this, 'parentNode', {
value: null,
writable: true
});
}
get firstChild() {
return this.childNodes[0];
}
get nextSibling() {
let index = this.parentNode.childNodes.indexOf(this);
return this.parentNode.childNodes[index + 1];
}
get textContent() {
if (!this.childNodes) {
return this.nodeValue || '';
}
return this.childNodes.map(function (child) {
return child.textContent;
}).join('');
}
hasChildNodes() {
return this.childNodes && this.childNodes.length > 0;
}
}
class SimpleXMLParser {
parseFromString(data) {
let nodes = [];
data = data.replace(/<\?[\s\S]*?\?>|<!--[\s\S]*?-->/g, '').trim();
data = data.replace(/<!DOCTYPE[^>\[]+(\[[^\]]+)?[^>]+>/g, '').trim();
data = data.replace(/>([^<][\s\S]*?)</g, (all, text) => {
let length = nodes.length;
let node = new SimpleDOMNode('#text', this._decodeXML(text));
nodes.push(node);
if (node.textContent.trim().length === 0) {
return '><';
}
return '>' + length + ',<';
});
data = data.replace(/<!\[CDATA\[([\s\S]*?)\]\]>/g, function (all, text) {
let length = nodes.length;
let node = new SimpleDOMNode('#text', text);
nodes.push(node);
return length + ',';
});
let regex = /<([\w\:]+)((?:[\s\w:=]|'[^']*'|"[^"]*")*)(?:\/>|>([\d,]*)<\/[^>]+>)/g;
let lastLength;
do {
lastLength = nodes.length;
data = data.replace(regex, function (all, name, attrs, data) {
let length = nodes.length;
let node = new SimpleDOMNode(name);
let children = [];
if (data) {
data = data.split(',');
data.pop();
data.forEach(function (child) {
let childNode = nodes[+child];
childNode.parentNode = node;
children.push(childNode);
});
}
node.childNodes = children;
nodes.push(node);
return length + ',';
});
} while (lastLength < nodes.length);
return { documentElement: nodes.pop() };
}
_decodeXML(text) {
if (text.indexOf('&') < 0) {
return text;
}
return text.replace(/&(#(x[0-9a-f]+|\d+)|\w+);/gi, function (all, entityName, number) {
if (number) {
if (number[0] === 'x') {
number = parseInt(number.substring(1), 16);
} else {
number = +number;
}
return String.fromCharCode(number);
}
switch (entityName) {
case 'amp':
return '&';
case 'lt':
return '<';
case 'gt':
return '>';
case 'quot':
return '\"';
case 'apos':
return '\'';
}
return '&' + entityName + ';';
});
}
}
var CustomStyle = function CustomStyleClosure() {
var prefixes = ['ms', 'Moz', 'Webkit', 'O'];
var _cache = Object.create(null);
@ -1723,6 +1824,7 @@ exports.DEFAULT_LINK_REL = DEFAULT_LINK_REL;
exports.DOMCanvasFactory = DOMCanvasFactory;
exports.DOMCMapReaderFactory = DOMCMapReaderFactory;
exports.DOMSVGFactory = DOMSVGFactory;
exports.SimpleXMLParser = SimpleXMLParser;
/***/ }),
/* 2 */
@ -1911,7 +2013,8 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
postMessageTransfers: (0, _dom_utils.getDefaultSetting)('postMessageTransfers') && !isPostMessageTransfersDisabled,
docBaseUrl: source.docBaseUrl,
nativeImageDecoderSupport: source.nativeImageDecoderSupport,
ignoreErrors: source.ignoreErrors
ignoreErrors: source.ignoreErrors,
isEvalSupported: (0, _dom_utils.getDefaultSetting)('isEvalSupported')
}).then(function (workerId) {
if (worker.destroyed) {
throw new Error('Worker was destroyed');
@ -3206,8 +3309,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}();
var version, build;
{
exports.version = version = '1.9.562';
exports.build = build = '31a34335';
exports.version = version = '1.9.583';
exports.build = build = 'd7b37ae7';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
@ -3597,74 +3700,79 @@ exports.WebGLUtils = WebGLUtils;
Object.defineProperty(exports, "__esModule", {
value: true
});
function fixMetadata(meta) {
return meta.replace(/>\\376\\377([^<]+)/g, function (all, codes) {
var bytes = codes.replace(/\\([0-3])([0-7])([0-7])/g, function (code, d1, d2, d3) {
return String.fromCharCode(d1 * 64 + d2 * 8 + d3 * 1);
});
var chars = '';
for (var i = 0; i < bytes.length; i += 2) {
var code = bytes.charCodeAt(i) * 256 + bytes.charCodeAt(i + 1);
chars += code >= 32 && code < 127 && code !== 60 && code !== 62 && code !== 38 ? String.fromCharCode(code) : '&#x' + (0x10000 + code).toString(16).substring(1) + ';';
}
return '>' + chars;
});
}
function Metadata(meta) {
if (typeof meta === 'string') {
meta = fixMetadata(meta);
var parser = new DOMParser();
meta = parser.parseFromString(meta, 'application/xml');
} else if (!(meta instanceof Document)) {
throw new Error('Metadata: Invalid metadata object');
exports.Metadata = undefined;
var _util = __w_pdfjs_require__(0);
var _dom_utils = __w_pdfjs_require__(1);
class Metadata {
constructor(data) {
(0, _util.assert)(typeof data === 'string', 'Metadata: input is not a string');
data = this._repair(data);
let parser = new _dom_utils.SimpleXMLParser();
data = parser.parseFromString(data);
this._metadata = Object.create(null);
this._parse(data);
}
this.metaDocument = meta;
this.metadata = Object.create(null);
this.parse();
}
Metadata.prototype = {
parse: function Metadata_parse() {
var doc = this.metaDocument;
var rdf = doc.documentElement;
_repair(data) {
return data.replace(/>\\376\\377([^<]+)/g, function (all, codes) {
let bytes = codes.replace(/\\([0-3])([0-7])([0-7])/g, function (code, d1, d2, d3) {
return String.fromCharCode(d1 * 64 + d2 * 8 + d3 * 1);
});
let chars = '';
for (let i = 0, ii = bytes.length; i < ii; i += 2) {
let code = bytes.charCodeAt(i) * 256 + bytes.charCodeAt(i + 1);
if (code >= 32 && code < 127 && code !== 60 && code !== 62 && code !== 38) {
chars += String.fromCharCode(code);
} else {
chars += '&#x' + (0x10000 + code).toString(16).substring(1) + ';';
}
}
return '>' + chars;
});
}
_parse(domDocument) {
let rdf = domDocument.documentElement;
if (rdf.nodeName.toLowerCase() !== 'rdf:rdf') {
rdf = rdf.firstChild;
while (rdf && rdf.nodeName.toLowerCase() !== 'rdf:rdf') {
rdf = rdf.nextSibling;
}
}
var nodeName = rdf ? rdf.nodeName.toLowerCase() : null;
let nodeName = rdf ? rdf.nodeName.toLowerCase() : null;
if (!rdf || nodeName !== 'rdf:rdf' || !rdf.hasChildNodes()) {
return;
}
var children = rdf.childNodes,
desc,
entry,
name,
i,
ii,
length,
iLength;
for (i = 0, length = children.length; i < length; i++) {
desc = children[i];
let children = rdf.childNodes;
for (let i = 0, ii = children.length; i < ii; i++) {
let desc = children[i];
if (desc.nodeName.toLowerCase() !== 'rdf:description') {
continue;
}
for (ii = 0, iLength = desc.childNodes.length; ii < iLength; ii++) {
if (desc.childNodes[ii].nodeName.toLowerCase() !== '#text') {
entry = desc.childNodes[ii];
name = entry.nodeName.toLowerCase();
this.metadata[name] = entry.textContent.trim();
for (let j = 0, jj = desc.childNodes.length; j < jj; j++) {
if (desc.childNodes[j].nodeName.toLowerCase() !== '#text') {
let entry = desc.childNodes[j];
let name = entry.nodeName.toLowerCase();
this._metadata[name] = entry.textContent.trim();
}
}
}
},
get: function Metadata_get(name) {
return this.metadata[name] || null;
},
has: function Metadata_has(name) {
return typeof this.metadata[name] !== 'undefined';
}
};
get(name) {
return this._metadata[name] || null;
}
getAll() {
return this._metadata;
}
has(name) {
return typeof this._metadata[name] !== 'undefined';
}
get metadata() {
(0, _util.deprecated)('`metadata` getter; use `getAll()` instead.');
return this.getAll();
}
}
exports.Metadata = Metadata;
/***/ }),
@ -3724,6 +3832,8 @@ class AnnotationElementFactory {
return new SquigglyAnnotationElement(parameters);
case _util.AnnotationType.STRIKEOUT:
return new StrikeOutAnnotationElement(parameters);
case _util.AnnotationType.STAMP:
return new StampAnnotationElement(parameters);
case _util.AnnotationType.FILEATTACHMENT:
return new FileAttachmentAnnotationElement(parameters);
default:
@ -4247,6 +4357,19 @@ class StrikeOutAnnotationElement extends AnnotationElement {
return this.container;
}
}
class StampAnnotationElement extends AnnotationElement {
constructor(parameters) {
let isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents);
super(parameters, isRenderable, true);
}
render() {
this.container.className = 'stampAnnotation';
if (!this.data.hasPopup) {
this._createPopup(this.container, null, this.data);
}
return this.container;
}
}
class FileAttachmentAnnotationElement extends AnnotationElement {
constructor(parameters) {
super(parameters, true);
@ -4882,8 +5005,8 @@ exports.SVGGraphics = SVGGraphics;
"use strict";
var pdfjsVersion = '1.9.562';
var pdfjsBuild = '31a34335';
var pdfjsVersion = '1.9.583';
var pdfjsBuild = 'd7b37ae7';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(13);
var pdfjsDisplayAPI = __w_pdfjs_require__(3);
@ -8009,8 +8132,8 @@ if (!_global_scope2.default.PDFJS) {
}
var PDFJS = _global_scope2.default.PDFJS;
{
PDFJS.version = '1.9.562';
PDFJS.build = '31a34335';
PDFJS.version = '1.9.583';
PDFJS.build = 'd7b37ae7';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {

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

@ -2244,6 +2244,16 @@ var PredictorStream = function PredictorStreamClosure() {
buffer[pos] = buffer[pos - colors] + rawBytes[i];
pos++;
}
} else if (bits === 16) {
var bytesPerPixel = colors * 2;
for (i = 0; i < bytesPerPixel; ++i) {
buffer[pos++] = rawBytes[i];
}
for (; i < rowBytes; i += 2) {
var sum = ((rawBytes[i] & 0xFF) << 8) + (rawBytes[i + 1] & 0xFF) + ((buffer[pos - bytesPerPixel] & 0xFF) << 8) + (buffer[pos - bytesPerPixel + 1] & 0xFF);
buffer[pos++] = sum >> 8 & 0xFF;
buffer[pos++] = sum & 0xFF;
}
} else {
var compArray = new Uint8Array(colors + 1);
var bitMask = (1 << bits) - 1;
@ -2740,7 +2750,9 @@ var CCITTFaxStream = function CCITTFaxStreamClosure() {
function CCITTFaxStream(str, maybeLength, params) {
this.str = str;
this.dict = str.dict;
params = params || _primitives.Dict.empty;
if (!(0, _primitives.isDict)(params)) {
params = _primitives.Dict.empty;
}
this.encoding = params.get('K') || 0;
this.eoline = params.get('EndOfLine') || false;
this.byteAlign = params.get('EncodedByteAlign') || false;
@ -2761,6 +2773,7 @@ var CCITTFaxStream = function CCITTFaxStreamClosure() {
this.inputBits = 0;
this.inputBuf = 0;
this.outputBits = 0;
this.rowsDone = false;
var code1;
while ((code1 = this.lookBits(12)) === 0) {
this.eatBits(1);
@ -2830,6 +2843,9 @@ var CCITTFaxStream = function CCITTFaxStreamClosure() {
var columns = this.columns;
var refPos, blackPixels, bits, i;
if (this.outputBits === 0) {
if (this.rowsDone) {
this.eof = true;
}
if (this.eof) {
return null;
}
@ -2995,7 +3011,7 @@ var CCITTFaxStream = function CCITTFaxStreamClosure() {
this.inputBits &= ~7;
}
if (!this.eoblock && this.row === this.rows - 1) {
this.eof = true;
this.rowsDone = true;
} else {
code1 = this.lookBits(12);
if (this.eoline) {
@ -3016,7 +3032,7 @@ var CCITTFaxStream = function CCITTFaxStreamClosure() {
this.eof = true;
}
}
if (!this.eof && this.encoding > 0) {
if (!this.eof && this.encoding > 0 && !this.rowsDone) {
this.nextLine2D = !this.lookBits(1);
this.eatBits(1);
}
@ -4796,7 +4812,7 @@ var Parser = function ParserClosure() {
var params = dict.get('DecodeParms', 'DP');
if ((0, _primitives.isName)(filter)) {
if (Array.isArray(params)) {
params = this.xref.fetchIfRef(params[0]);
(0, _util.warn)('/DecodeParms should not contain an Array, ' + 'when /Filter contains a Name.');
}
return this.makeFilter(stream, filter.name, length, params);
}
@ -5333,12 +5349,21 @@ var _primitives = __w_pdfjs_require__(1);
var _ps_parser = __w_pdfjs_require__(26);
let IsEvalSupportedCached = {
get value() {
return (0, _util.shadow)(this, 'value', (0, _util.isEvalSupported)());
}
};
var PDFFunction = function PDFFunctionClosure() {
var CONSTRUCT_SAMPLED = 0;
var CONSTRUCT_INTERPOLATED = 2;
var CONSTRUCT_STICHED = 3;
var CONSTRUCT_POSTSCRIPT = 4;
let isEvalSupported = true;
return {
setIsEvalSupported(support = true) {
isEvalSupported = support !== false;
},
getSampleArray: function PDFFunction_getSampleArray(size, outputSize, bps, str) {
var i, ii;
var length = 1;
@ -5610,9 +5635,11 @@ var PDFFunction = function PDFFunctionClosure() {
var domain = IR[1];
var range = IR[2];
var code = IR[3];
var compiled = new PostScriptCompiler().compile(code, domain, range);
if (compiled) {
return new Function('src', 'srcOffset', 'dest', 'destOffset', compiled);
if (isEvalSupported && IsEvalSupportedCached.value) {
let compiled = new PostScriptCompiler().compile(code, domain, range);
if (compiled) {
return new Function('src', 'srcOffset', 'dest', 'destOffset', compiled);
}
}
(0, _util.info)('Unable to compile PS function');
var numOutputs = range.length >> 1;
@ -16705,7 +16732,8 @@ var PartialEvaluator = function PartialEvaluatorClosure() {
maxImageSize: -1,
disableFontFace: false,
nativeImageDecoderSupport: _util.NativeImageDecoding.DECODE,
ignoreErrors: false
ignoreErrors: false,
isEvalSupported: true
};
function NativeImageDecoder(xref, resources, handler, forceDataSchema) {
this.xref = xref;
@ -18270,7 +18298,7 @@ var PartialEvaluator = function PartialEvaluatorClosure() {
var defaultVMetrics;
var i, ii, j, jj, start, code, widths;
if (properties.composite) {
defaultWidth = dict.get('DW') || 1000;
defaultWidth = dict.has('DW') ? dict.get('DW') : 1000;
widths = dict.get('W');
if (widths) {
for (i = 0, ii = widths.length; i < ii; i++) {
@ -23702,8 +23730,8 @@ exports.getUnicodeForGlyph = getUnicodeForGlyph;
"use strict";
var pdfjsVersion = '1.9.562';
var pdfjsBuild = '31a34335';
var pdfjsVersion = '1.9.583';
var pdfjsBuild = 'd7b37ae7';
var pdfjsCoreWorker = __w_pdfjs_require__(18);
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;
@ -24088,7 +24116,8 @@ var WorkerMessageHandler = {
maxImageSize: data.maxImageSize === undefined ? -1 : data.maxImageSize,
disableFontFace: data.disableFontFace,
nativeImageDecoderSupport: data.nativeImageDecoderSupport,
ignoreErrors: data.ignoreErrors
ignoreErrors: data.ignoreErrors,
isEvalSupported: data.isEvalSupported
};
getPdfManager(data, evaluatorOptions).then(function (newPdfManager) {
if (terminated) {
@ -27541,6 +27570,8 @@ var _crypto = __w_pdfjs_require__(12);
var _parser = __w_pdfjs_require__(5);
var _function = __w_pdfjs_require__(6);
var Page = function PageClosure() {
var DEFAULT_USER_UNIT = 1.0;
var LETTER_SIZE_MEDIABOX = [0, 0, 612, 792];
@ -27948,6 +27979,8 @@ var PDFDocument = function PDFDocumentClosure() {
}
};
this.catalog = new _obj.Catalog(this.pdfManager, this.xref, pageFactory);
let evaluatorOptions = this.pdfManager.evaluatorOptions;
_function.PDFFunction.setIsEvalSupported(evaluatorOptions.isEvalSupported);
},
get numPages() {
var linearization = this.linearization;
@ -39522,6 +39555,8 @@ class AnnotationFactory {
return new SquigglyAnnotation(parameters);
case 'StrikeOut':
return new StrikeOutAnnotation(parameters);
case 'Stamp':
return new StampAnnotation(parameters);
case 'FileAttachment':
return new FileAttachmentAnnotation(parameters);
default:
@ -40048,6 +40083,13 @@ class StrikeOutAnnotation extends Annotation {
this._preparePopup(parameters.dict);
}
}
class StampAnnotation extends Annotation {
constructor(parameters) {
super(parameters);
this.data.annotationType = _util.AnnotationType.STAMP;
this._preparePopup(parameters.dict);
}
}
class FileAttachmentAnnotation extends Annotation {
constructor(parameters) {
super(parameters);

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

@ -249,6 +249,7 @@
.annotationLayer .lineAnnotation svg line,
.annotationLayer .squareAnnotation svg rect,
.annotationLayer .circleAnnotation svg ellipse,
.annotationLayer .stampAnnotation,
.annotationLayer .fileAttachmentAnnotation {
cursor: pointer;
}

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

@ -2006,10 +2006,7 @@ let webViewerFileInputChange;
function webViewerPresentationMode() {
PDFViewerApplication.requestPresentationMode();
}
function webViewerOpenFile() {
let openFileInputName = PDFViewerApplication.appConfig.openFileInputName;
document.getElementById(openFileInputName).click();
}
function webViewerOpenFile() {}
function webViewerPrint() {
window.print();
}

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

@ -982,3 +982,9 @@ you can use these alternative items. Otherwise, their values should be empty. -
<!ENTITY sendToDevice.syncNotReady.label "Syncing Devices…">
<!ENTITY libraryButton.tooltip "View history, saved bookmarks, and more">
<!-- LOCALIZATION NOTE: (accessibilityIndicator.tooltip): This is used to
display a tooltip for accessibility indicator in toolbar/tabbar. It is also
used as a textual label for the indicator used by assistive technology
users. -->
<!ENTITY accessibilityIndicator.tooltip "Accessibility Features Enabled">

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

@ -704,12 +704,6 @@ html|span.ac-emphasize-text-url {
/* End customization mode */
#main-window[privatebrowsingmode=temporary] #private-browsing-indicator {
background: url("chrome://browser/skin/privatebrowsing-mask.png") center no-repeat;
width: 40px;
}
%include ../shared/UITour.inc.css
#UITourHighlight {

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

@ -22,7 +22,6 @@ browser.jar:
* skin/classic/browser/pageInfo.css
skin/classic/browser/pageInfo.png
skin/classic/browser/page-livemarks.png
skin/classic/browser/privatebrowsing-mask.png
skin/classic/browser/searchbar.css
skin/classic/browser/setDesktopBackground.css
skin/classic/browser/slowStartup-16.png

Двоичные данные
browser/themes/linux/privatebrowsing-mask.png

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

До

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

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

@ -55,6 +55,11 @@
/** Begin titlebar **/
#titlebar-content {
/* Ensure the the content part of the titlebar does not shrink. */
min-height: inherit;
}
#titlebar-buttonbox > .titlebar-button {
display: none;
}
@ -66,6 +71,10 @@
z-index: 1;
}
#titlebar-buttonbox-container {
-moz-box-align: center;
}
/* These would be margin-inline-start/end if it wasn't for the fact that OS X
* doesn't reverse the order of the items in the titlebar in RTL mode. */
.titlebar-placeholder[type="caption-buttons"],
@ -73,10 +82,8 @@
margin-left: 7px;
}
.titlebar-placeholder[type="fullscreen-button"],
#titlebar-secondary-buttonbox {
margin-right: 7px;
margin-left: 7px;
.titlebar-placeholder[type="fullscreen-button"] {
margin-right: 4px;
}
#main-window:not(:-moz-lwtheme) > #titlebar {
@ -1231,67 +1238,22 @@ html|*.addon-webext-perm-list {
/* End customization mode */
.private-browsing-indicator {
background-image: url("chrome://browser/skin/privatebrowsing-mask.png");
background-repeat: no-repeat;
background-size: 100% auto;
width: 38px;
height: 28px;
/**
* The private browsing mask graphic has a 3px flare at the top. The distance
* we want between the mask and items on either side is 7px, so we use 4px,
* since the other 3px is accounted for by the empty space on either side.
*/
margin-left: 4px;
margin-right: 4px;
}
/* Private browsing and accessibility indicators */
#titlebar-secondary-buttonbox > .private-browsing-indicator {
position: relative;
}
#main-window[privatebrowsingmode=temporary]:not([tabsintitlebar]) > #titlebar > #titlebar-content > #titlebar-secondary-buttonbox > .private-browsing-indicator {
background-image: url("chrome://browser/skin/privatebrowsing-mask-short.png");
height: 20px;
}
#main-window:not([privatebrowsingmode=temporary]) .private-browsing-indicator,
#main-window[privatebrowsingmode=temporary][inFullscreen] > #titlebar > #titlebar-content > #titlebar-secondary-buttonbox > .private-browsing-indicator,
#main-window[privatebrowsingmode=temporary]:not([inFullscreen]) > #tab-view-deck > #browser-panel > #navigator-toolbox > #TabsToolbar > .private-browsing-indicator {
:root[accessibilitymode][tabsintitlebar]:not([inFullscreen]) > #tab-view-deck > #browser-panel > #navigator-toolbox > #TabsToolbar > .accessibility-indicator,
:root[privatebrowsingmode=temporary][tabsintitlebar]:not([inFullscreen]) > #tab-view-deck > #browser-panel > #navigator-toolbox > #TabsToolbar > .private-browsing-indicator,
:root[accessibilitymode]:not([tabsintitlebar]) > #titlebar > #titlebar-content > #titlebar-secondary-buttonbox > .accessibility-indicator,
:root[privatebrowsingmode=temporary]:not([tabsintitlebar]) > #titlebar > #titlebar-content > #titlebar-secondary-buttonbox > .private-browsing-indicator {
display: none;
}
@media (min-resolution: 2dppx) {
.private-browsing-indicator {
background-image: url("chrome://browser/skin/privatebrowsing-mask@2x.png");
}
#main-window[privatebrowsingmode=temporary]:not([tabsintitlebar]) > #titlebar > #titlebar-content > #titlebar-secondary-buttonbox > .private-browsing-indicator {
background-image: url("chrome://browser/skin/privatebrowsing-mask-short@2x.png");
}
}
#TabsToolbar > .private-browsing-indicator {
/* We offset by 38px for mask graphic, plus 4px to account for the
* margin-left, which sums to 42px.
*/
margin-right: -42px;
}
#main-window[privatebrowsingmode=temporary] .titlebar-placeholder[type="fullscreen-button"],
#main-window[privatebrowsingmode=temporary] > #titlebar > #titlebar-content > #titlebar-secondary-buttonbox > #titlebar-fullscreen-button {
margin-left: 0px;
}
#main-window[privatebrowsingmode=temporary][inFullscreen] .titlebar-placeholder[type="fullscreen-button"] {
/* Override display:none for .titlebar-placeholder in fullscreen so we can have consistent
position and padding for the private browsing indicator. */
display: -moz-box;
}
#TabsToolbar > .private-browsing-indicator:-moz-locale-dir(rtl) {
#TabsToolbar > .private-browsing-indicator:-moz-locale-dir(rtl),
#TabsToolbar > .accessibility-indicator:-moz-locale-dir(rtl) {
-moz-box-ordinal-group: 0;
}
/* End private browsing and accessibility indicators */
%include ../shared/UITour.inc.css
#UITourTooltipDescription {

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

@ -25,10 +25,6 @@ browser.jar:
skin/classic/browser/page-livemarks.png
skin/classic/browser/page-livemarks@2x.png
skin/classic/browser/pageInfo.css
skin/classic/browser/privatebrowsing-mask.png
skin/classic/browser/privatebrowsing-mask@2x.png
skin/classic/browser/privatebrowsing-mask-short.png
skin/classic/browser/privatebrowsing-mask-short@2x.png
skin/classic/browser/searchbar.css
skin/classic/browser/slowStartup-16.png
skin/classic/browser/toolbarbutton-dropmarker.png

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

До

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

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

До

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

Двоичные данные
browser/themes/osx/privatebrowsing-mask.png

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

До

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

Двоичные данные
browser/themes/osx/privatebrowsing-mask@2x.png

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

До

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

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

@ -94,3 +94,48 @@
-moz-context-properties: fill;
fill: currentColor;
}
/* Private browsing and accessibility indicators */
.accessibility-indicator,
.private-browsing-indicator {
background-repeat: no-repeat;
background-size: 100% auto;
background-position: center;
width: 24px;
height: 24px;
margin-left: 8px;
margin-right: 8px;
position: relative;
/* Need to ensure this gets positioned on top of the position:relative #navigator-toolbox
* in case the dark/light themes give that item a background. */
z-index: 1;
}
.accessibility-indicator {
background-image: url("chrome://browser/skin/accessibility.svg");
-moz-user-focus: normal;
/* Clear default button styling */
-moz-appearance: none;
margin-top: unset;
margin-bottom: unset;
min-width: unset;
color: unset;
text-shadow: unset;
}
.accessibility-indicator:-moz-any(:hover, :active, :focus, :-moz-focusring) {
background-image: url("chrome://browser/skin/accessibility-active.svg");
outline: 0;
}
.private-browsing-indicator {
background-image: url("chrome://browser/skin/private-browsing.svg");
}
:root:not([accessibilitymode]) .accessibility-indicator,
:root:not([privatebrowsingmode=temporary]) .private-browsing-indicator {
display: none;
}
/* End private browsing and accessibility indicators */

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

@ -0,0 +1,10 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px">
<path fill="#008EA4" fill-opacity="0.9886" d="M12,24L12,24C5.4,24,0,18.6,0,12l0,0C0,5.4,5.4,0,12,0l0,0c6.6,0,12,5.4,12,12l0,0 C24,18.6,18.6,24,12,24z"/>
<g>
<circle fill="#FFFFFF" cx="12" cy="6" r="2"/>
<path fill="#FFFFFF" d="M18.1,8.5h-3.6l0,0h-5l0,0H6c-0.6,0-1,0.4-1,1s0.4,1,1,1h3.5v0.6l0,0v7.8c0,0.6,0.4,1.1,1,1.1s1-0.5,1-1.1 v-4.1h1v4.1c0,0.6,0.4,1.1,1,1.1s1-0.5,1-1.1v-4.1l0,0v-4.5H18c0.6,0,1-0.4,1-1C19,8.8,18.6,8.5,18.1,8.5z"/>
</g>
</svg>

После

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

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

@ -0,0 +1,11 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px">
<path fill="#00C8D7" fill-opacity="0.9886" d="M12,24L12,24C5.4,24,0,18.6,0,12l0,0C0,5.4,5.4,0,12,0l0,0c6.6,0,12,5.4,12,12l0,0 C24,18.6,18.6,24,12,24z"/>
<g>
<circle fill="#FFFFFF" cx="12" cy="6" r="2"/>
<path fill="#FFFFFF" d="M18.1,8.5h-3.6l0,0h-5l0,0H6c-0.6,0-1,0.4-1,1c0,0.6,0.4,1,1,1h3.5v0.6l0,0v7.8c0,0.6,0.4,1.1,1,1.1s1-0.5,1-1.1
v-4.1h1v4.1c0,0.6,0.4,1.1,1,1.1s1-0.5,1-1.1v-4.1l0,0v-4.5H18c0.6,0,1-0.4,1-1C19,8.8,18.6,8.5,18.1,8.5z"/>
</g>
</svg>

После

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

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

@ -0,0 +1,11 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px">
<path fill="#8000D7" d="M12,24L12,24C5.4,24,0,18.6,0,12l0,0C0,5.4,5.4,0,12,0l0,0c6.6,0,12,5.4,12,12l0,0
C24,18.6,18.6,24,12,24z"/>
<path fill="#FFFFFF" d="M15.4,11c-1-0.1-1.9,0.5-2.1,1.5c0,0.3,1.2,0.7,2.3,0.7s2.1-0.7,2.1-0.9C17.7,12.1,17,11.1,15.4,11
L15.4,11z M8.6,11c-1.6,0.1-2.3,1-2.3,1.3c0,0.2,1.1,0.9,2.1,0.9c1,0,2.3-0.4,2.3-0.7C10.5,11.5,9.5,10.9,8.6,11L8.6,11z M16.4,16.5
c-1.7,0-2.8-2-4.4-2c-1.6,0-2.8,2-4.4,2c-2.1,0-3.6-1.9-3.6-5.3c0-2.1,0.6-2.7,3.3-2.7s3.4,1.1,4.7,1.1s2.1-1.1,4.7-1.1
S20,9.2,20,11.2C20,14.6,18.5,16.5,16.4,16.5L16.4,16.5z"/>
</svg>

После

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

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

@ -114,6 +114,8 @@
skin/classic/browser/fxa/sync-illustration.svg (../shared/fxa/sync-illustration.svg)
skin/classic/browser/accessibility.svg (../shared/icons/accessibility.svg)
skin/classic/browser/accessibility-active.svg (../shared/icons/accessibility-active.svg)
skin/classic/browser/arrow-left.svg (../shared/icons/arrow-left.svg)
skin/classic/browser/back.svg (../shared/icons/back.svg)
skin/classic/browser/back-12.svg (../shared/icons/back-12.svg)
@ -155,6 +157,7 @@
skin/classic/browser/open.svg (../shared/icons/open.svg)
skin/classic/browser/page-action.svg (../shared/icons/page-action.svg)
skin/classic/browser/print.svg (../shared/icons/print.svg)
skin/classic/browser/private-browsing.svg (../shared/icons/private-browsing.svg)
skin/classic/browser/privateBrowsing.svg (../shared/icons/privateBrowsing.svg)
skin/classic/browser/restore-session.svg (../shared/icons/restore-session.svg)
skin/classic/browser/quit.svg (../shared/icons/quit.svg)

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

@ -284,6 +284,17 @@
z-index: 1;
}
#titlebar-buttonbox-container {
-moz-box-align: center;
}
@media (-moz-os-version: windows-win7) {
/* Preserve window control buttons position at the top of the button box. */
#titlebar-buttonbox-container {
-moz-box-align: start;
}
}
.titlebar-placeholder[type="caption-buttons"] {
margin-left: 22px; /* space needed for Aero Snap */
}
@ -1107,92 +1118,39 @@ notification[value="translation"] {
/* End customization mode */
/* Private browsing indicators */
/**
* Currently, we have two places where we put private browsing indicators on
* Windows. When tabsintitlebar is enabled, we draw the indicator in the titlebar.
* When tabsintitlebar is disabled, we draw the indicator at the end of the
* tabstrip. The titlebar indicator is the fiddliest of the bunch, since we
* want the bottom border of the image to line up with the bottom of the window
* caption buttons. That's why there's so much special-casing going on in here.
*/
.private-browsing-indicator {
display: none;
pointer-events: none;
}
#private-browsing-indicator-titlebar {
display: block;
position: absolute;
/* Need to ensure this gets positioned on top of the position:relative #navigator-toolbox
* in case the dark/light themes give that item a background. */
z-index: 1;
}
#main-window[privatebrowsingmode=temporary][tabsintitlebar] #private-browsing-indicator-titlebar > .private-browsing-indicator {
display: block;
}
#main-window[privatebrowsingmode=temporary]:-moz-any([inFullscreen],:not([tabsintitlebar])) #TabsToolbar > .private-browsing-indicator {
display: -moz-box;
}
#TabsToolbar > .private-browsing-indicator {
background: url("chrome://browser/skin/privatebrowsing-mask-tabstrip.png") no-repeat center -3px;
margin-inline-start: 4px;
width: 48px;
}
/* Bug 1008183: We're intentionally using the titlebar asset here for fullscreen
* mode, since the tabstrip "mimics" the titlebar in that case with its own
* min/max/close window buttons.
*/
#private-browsing-indicator-titlebar > .private-browsing-indicator,
#main-window[inFullscreen] #TabsToolbar > .private-browsing-indicator {
background: url("chrome://browser/skin/privatebrowsing-mask-titlebar.png") no-repeat center 0px;
margin-inline-end: 4px;
width: 40px;
height: 20px;
position: relative;
}
@media (-moz-windows-classic) {
/**
* We have to use top instead of background-position in this case, otherwise
* the bottom of the indicator would get cut off by the bounds of the
* private-browsing-indicator element.
*/
#main-window[sizemode="normal"] > #titlebar > #titlebar-content > #titlebar-buttonbox-container > #private-browsing-indicator-titlebar > .private-browsing-indicator {
top: 4px;
}
}
/* Private browsing and accessibility indicators */
@media (-moz-os-version: windows-win7) {
@media (-moz-windows-glass) {
#main-window[sizemode="normal"] > #titlebar > #titlebar-content > #titlebar-buttonbox-container > #private-browsing-indicator-titlebar > .private-browsing-indicator {
top: 1px;
}
#main-window[sizemode="maximized"] > #titlebar > #titlebar-content > #titlebar-buttonbox-container > #private-browsing-indicator-titlebar > .private-browsing-indicator {
top: -1px;
}
/* Making sure that indicators take up all available vertical space. */
:root[tabsintitlebar]:not([inFullscreen]) .private-browsing-indicator,
:root[tabsintitlebar]:not([inFullscreen]) .accessibility-indicator {
height: var(--tab-min-height);
}
/**
* This next block targets Aero Basic, which has different positioning for the
* window caption buttons, and therefore needs to be special-cased.
*/
@media (-moz-windows-default-theme) {
@media (-moz-windows-compositor: 0) {
#main-window[sizemode="normal"] > #titlebar > #titlebar-content > #titlebar-buttonbox-container > #private-browsing-indicator-titlebar > .private-browsing-indicator {
background-image: url("chrome://browser/skin/privatebrowsing-mask-titlebar-win7-tall.png");
height: 28px;
}
}
:root[tabsintitlebar][sizemode="normal"]:not([inFullscreen]) .private-browsing-indicator,
:root[tabsintitlebar][sizemode="normal"]:not([inFullscreen]) .accessibility-indicator {
height: calc(var(--tab-min-height) + 4px);
}
}
/* End private browsing indicators */
:root:-moz-any([tabsintitlebar], [inFullscreen]):not([privatebrowsingmode=temporary]) .accessibility-indicator,
:root:-moz-any([tabsintitlebar], [inFullscreen]) .private-browsing-indicator {
margin-inline-end: 12px;
}
:root:not([accessibilitymode]) .private-browsing-indicator,
.accessibility-indicator {
margin-inline-start: 12px;
}
:root[accessibilitymode][tabsintitlebar]:not([inFullscreen]) > #tab-view-deck > #browser-panel > #navigator-toolbox > #TabsToolbar > .accessibility-indicator,
:root[privatebrowsingmode=temporary][tabsintitlebar]:not([inFullscreen]) > #tab-view-deck > #browser-panel > #navigator-toolbox > #TabsToolbar > .private-browsing-indicator,
:root[accessibilitymode]:not([tabsintitlebar]) > #titlebar > #titlebar-content > #titlebar-secondary-buttonbox > .accessibility-indicator,
:root[privatebrowsingmode=temporary]:not([tabsintitlebar]) > #titlebar > #titlebar-content > #titlebar-secondary-buttonbox > .private-browsing-indicator {
display: none;
}
/* End private browsing and accessibility indicators */
%include ../shared/UITour.inc.css

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

@ -21,11 +21,6 @@ browser.jar:
skin/classic/browser/monitor_16-10.png
skin/classic/browser/pageInfo.css
skin/classic/browser/pageInfo.png
skin/classic/browser/privatebrowsing-mask-tabstrip.png
skin/classic/browser/privatebrowsing-mask-tabstrip-win7.png
skin/classic/browser/privatebrowsing-mask-titlebar.png
skin/classic/browser/privatebrowsing-mask-titlebar-win7.png
skin/classic/browser/privatebrowsing-mask-titlebar-win7-tall.png
skin/classic/browser/searchbar.css
skin/classic/browser/setDesktopBackground.css
skin/classic/browser/slowStartup-16.png
@ -89,6 +84,4 @@ browser.jar:
% override chrome://browser/skin/feeds/videoFeedIcon.png chrome://browser/skin/feeds/feedIcon.png
% override chrome://browser/skin/feeds/videoFeedIcon16.png chrome://browser/skin/feeds/feedIcon16.png
% override chrome://browser/skin/privatebrowsing-mask-tabstrip.png chrome://browser/skin/privatebrowsing-mask-tabstrip-win7.png os=WINNT osversion<=6.1
% override chrome://browser/skin/privatebrowsing-mask-titlebar.png chrome://browser/skin/privatebrowsing-mask-titlebar-win7.png os=WINNT osversion<=6.1
% override chrome://browser/skin/toolbarbutton-dropdown-arrow.png chrome://browser/skin/toolbarbutton-dropdown-arrow-win7.png os=WINNT osversion<=6.1

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

До

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

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

До

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

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

До

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

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

До

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

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

До

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

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

@ -9,7 +9,6 @@
#include "base/task.h"
#include "gfxPrefs.h"
#include "mozilla/layers/CompositorBridgeChild.h"
#include "mozilla/layers/ContentClient.h"
#include "mozilla/layers/ShadowLayers.h"
#include "mozilla/layers/SyncObject.h"
#include "mozilla/gfx/2D.h"
@ -145,37 +144,6 @@ PaintThread::IsOnPaintThread()
return sThreadId == PlatformThread::CurrentId();
}
void
PaintThread::CopyFrontToBack(ContentClientRemoteBuffer* aContentClient,
nsIntRegion aRegionToDraw)
{
MOZ_ASSERT(PaintThread::IsOnPaintThread());
aContentClient->FinalizeFrameOnPaintThread(aRegionToDraw);
}
void
PaintThread::CopyFrontBufferToBackBuffer(ContentClientRemoteBuffer* aContentClient,
nsIntRegion aRegionToDraw)
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(aContentClient);
RefPtr<ContentClientRemoteBuffer> cc(aContentClient);
RefPtr<PaintThread> self = this;
RefPtr<Runnable> task = NS_NewRunnableFunction("PaintThread::CopyFrontToBack",
[self, cc, aRegionToDraw]() -> void
{
self->CopyFrontToBack(cc, aRegionToDraw);
});
if (!gfxPrefs::LayersOMTPForceSync()) {
sThread->Dispatch(task.forget());
} else {
SyncRunnable::DispatchToThread(sThread, task);
}
}
void
PaintThread::PaintContents(CapturedPaintState* aState,
PrepDrawTargetForPaintingCallback aCallback)

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

@ -21,7 +21,6 @@ class DrawTargetCapture;
};
namespace layers {
class ContentClientRemoteBuffer;
// Holds the key parts from a RotatedBuffer::PaintState
// required to draw the captured paint state
@ -72,9 +71,6 @@ public:
// Helper for asserts.
static bool IsOnPaintThread();
void CopyFrontBufferToBackBuffer(ContentClientRemoteBuffer* aContentClient,
nsIntRegion aRegionToDraw);
void PaintContents(CapturedPaintState* aState,
PrepDrawTargetForPaintingCallback aCallback);
@ -102,8 +98,6 @@ private:
bool Init();
void ShutdownOnPaintThread();
void InitOnPaintThread();
void CopyFrontToBack(ContentClientRemoteBuffer* aContentClient,
nsIntRegion aRegionToDraw);
void AsyncPaintContents(CompositorBridgeChild* aBridge,
CapturedPaintState* aState,

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

@ -434,8 +434,7 @@ RotatedContentBuffer::FlushBuffers()
RotatedContentBuffer::PaintState
RotatedContentBuffer::BeginPaint(PaintedLayer* aLayer,
uint32_t aFlags,
bool aCopyToBackBuffer)
uint32_t aFlags)
{
PaintState result;
// We need to disable rotation if we're going to be resampled when
@ -556,7 +555,7 @@ RotatedContentBuffer::BeginPaint(PaintedLayer* aLayer,
return result;
if (HaveBuffer()) {
if (aCopyToBackBuffer && LockBuffers()) {
if (LockBuffers()) {
// Do not modify result.mRegionToDraw or result.mContentType after this call.
// Do not modify mBufferRect, mBufferRotation, or mDidSelfCopy,
// or call CreateBuffer before this call.
@ -663,7 +662,6 @@ RotatedContentBuffer::BeginPaint(PaintedLayer* aLayer,
destBufferRect = ComputeBufferRect(neededRegion.GetBounds());
CreateBuffer(result.mContentType, destBufferRect, bufferFlags,
&destDTBuffer, &destDTBufferOnWhite);
result.mFinalizeOnPaintThread = false;
if (!destDTBuffer ||
(!destDTBufferOnWhite && (bufferFlags & BUFFER_COMPONENT_ALPHA))) {
if (Factory::ReasonableSurfaceSize(IntSize(destBufferRect.Width(), destBufferRect.Height()))) {
@ -688,7 +686,6 @@ RotatedContentBuffer::BeginPaint(PaintedLayer* aLayer,
// The buffer's not big enough, so allocate a new one
CreateBuffer(result.mContentType, destBufferRect, bufferFlags,
&destDTBuffer, &destDTBufferOnWhite);
result.mFinalizeOnPaintThread = false;
if (!destDTBuffer ||
(!destDTBufferOnWhite && (bufferFlags & BUFFER_COMPONENT_ALPHA))) {
if (Factory::ReasonableSurfaceSize(IntSize(destBufferRect.Width(), destBufferRect.Height()))) {

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

@ -225,8 +225,6 @@ public:
* opaque to transparent or vice versa, since the details of rendering can
* depend on the buffer type. mDidSelfCopy is true if we kept our buffer
* but used MovePixels() to shift its content.
* mFinalizeOnPaintThread is true if we need to copy the front
* to back buffer and we didn't destroy the buffer during BeginPaint.
*/
struct PaintState {
PaintState()
@ -236,7 +234,6 @@ public:
, mClip(DrawRegionClip::NONE)
, mContentType(gfxContentType::SENTINEL)
, mDidSelfCopy(false)
, mFinalizeOnPaintThread(true)
{}
nsIntRegion mRegionToDraw;
@ -245,7 +242,6 @@ public:
DrawRegionClip mClip;
ContentType mContentType;
bool mDidSelfCopy;
bool mFinalizeOnPaintThread;
};
enum {
@ -272,13 +268,9 @@ public:
* rotated content that crosses the physical buffer boundary. The caller
* will need to call BorrowDrawTargetForPainting multiple times to achieve
* this.
* @param aCopyToBackBuffer Whether to copy the front buffer to back buffer
* This should generally be true unless OMTP is enabled where we want to do
* this on the paint thread instead.
*/
PaintState BeginPaint(PaintedLayer* aLayer,
uint32_t aFlags,
bool aCopyToBackbuffer = true);
uint32_t aFlags);
struct DrawIterator {
friend class RotatedContentBuffer;

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

@ -82,7 +82,7 @@ ClientPaintedLayer::UpdateContentClient(PaintState& aState)
AddToValidRegion(aState.mRegionToDraw);
ContentClientRemote *contentClientRemote =
static_cast<ContentClientRemote*>(mContentClient.get());
static_cast<ContentClientRemote *>(mContentClient.get());
MOZ_ASSERT(contentClientRemote->GetIPCHandle());
// Hold(this) ensures this layer is kept alive through the current transaction
@ -213,13 +213,7 @@ ClientPaintedLayer::PaintOffMainThread()
uint32_t flags = GetPaintFlags();
PaintState state = mContentClient->BeginPaintBuffer(this, flags, false);
MOZ_ASSERT(mContentClient->IsRemoteBuffer());
if (state.mFinalizeOnPaintThread) {
PaintThread::Get()->CopyFrontBufferToBackBuffer(static_cast<ContentClientRemoteBuffer*>(mContentClient.get()),
state.mRegionToDraw);
}
PaintState state = mContentClient->BeginPaintBuffer(this, flags);
if (!UpdatePaintRegion(state)) {
return false;
}

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

@ -23,7 +23,6 @@
#include "mozilla/layers/LayerManagerComposite.h"
#include "mozilla/layers/LayersMessages.h" // for ThebesBufferData
#include "mozilla/layers/LayersTypes.h"
#include "mozilla/layers/PaintThread.h"
#include "nsDebug.h" // for NS_ASSERTION, NS_WARNING, etc
#include "nsISupportsImpl.h" // for gfxContext::Release, etc
#include "nsIWidget.h" // for nsIWidget
@ -613,11 +612,6 @@ ContentClientDoubleBuffered::BeginAsyncPaint()
void
ContentClientDoubleBuffered::FinalizeFrame(const nsIntRegion& aRegionToDraw)
{
MOZ_ASSERT(NS_IsMainThread() || PaintThread::IsOnPaintThread());
if (!HaveBuffer()) {
return;
}
if (!mFrontAndBackBufferDiffer) {
MOZ_ASSERT(!mDidSelfCopy, "If we have to copy the world, then our buffers are different, right?");
return;
@ -649,14 +643,6 @@ ContentClientDoubleBuffered::FinalizeFrame(const nsIntRegion& aRegionToDraw)
return;
}
CopyFrontBufferToBackBuffer(updateRegion);
}
void
ContentClientDoubleBuffered::CopyFrontBufferToBackBuffer(nsIntRegion& aUpdateRegion)
{
MOZ_ASSERT(NS_IsMainThread() || PaintThread::IsOnPaintThread());
// We need to ensure that we lock these two buffers in the same
// order as the compositor to prevent deadlocks.
TextureClientAutoLock frontLock(mFrontClient, OpenMode::OPEN_READ_ONLY);
@ -683,7 +669,7 @@ ContentClientDoubleBuffered::CopyFrontBufferToBackBuffer(nsIntRegion& aUpdateReg
surfOnWhite,
mFrontBufferRect,
mFrontBufferRotation);
UpdateDestinationFrom(frontBuffer, aUpdateRegion);
UpdateDestinationFrom(frontBuffer, updateRegion);
} else {
// We know this can happen, but we want to track it somewhat, in case it leads
// to other problems.

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

@ -17,7 +17,6 @@
#include "mozilla/layers/CompositableClient.h" // for CompositableClient
#include "mozilla/layers/CompositableForwarder.h"
#include "mozilla/layers/CompositorTypes.h" // for TextureInfo, etc
#include "mozilla/layers/PaintThread.h"
#include "mozilla/layers/ISurfaceAllocator.h"
#include "mozilla/layers/LayersSurfaces.h" // for SurfaceDescriptor
#include "mozilla/layers/LayersTypes.h" // for TextureDumpMode
@ -94,8 +93,7 @@ public:
virtual void Clear() = 0;
virtual RotatedContentBuffer::PaintState BeginPaintBuffer(PaintedLayer* aLayer,
uint32_t aFlags,
bool aCopyFrontToBack = true) = 0;
uint32_t aFlags) = 0;
virtual gfx::DrawTarget* BorrowDrawTargetForPainting(RotatedContentBuffer::PaintState& aPaintState,
RotatedContentBuffer::DrawIterator* aIter = nullptr) = 0;
virtual void ReturnDrawTargetToBuffer(gfx::DrawTarget*& aReturned) = 0;
@ -112,7 +110,6 @@ public:
virtual void BeginPaint() {}
virtual void BeginAsyncPaint();
virtual void EndPaint(nsTArray<ReadbackProcessor::Update>* aReadbackUpdates = nullptr);
virtual bool IsRemoteBuffer() { return false; }
protected:
bool mInAsyncPaint;
@ -149,10 +146,9 @@ public:
virtual void Clear() override { RotatedContentBuffer::Clear(); }
virtual PaintState BeginPaintBuffer(PaintedLayer* aLayer,
uint32_t aFlags,
bool aCopyFrontToBack = true) override
uint32_t aFlags) override
{
return RotatedContentBuffer::BeginPaint(aLayer, aFlags, aCopyFrontToBack);
return RotatedContentBuffer::BeginPaint(aLayer, aFlags);
}
virtual gfx::DrawTarget* BorrowDrawTargetForPainting(PaintState& aPaintState,
RotatedContentBuffer::DrawIterator* aIter = nullptr) override
@ -236,10 +232,9 @@ public:
TextureDumpMode aCompress=TextureDumpMode::Compress) override;
virtual PaintState BeginPaintBuffer(PaintedLayer* aLayer,
uint32_t aFlags,
bool aCopyFrontToBack = true) override
uint32_t aFlags) override
{
return RotatedContentBuffer::BeginPaint(aLayer, aFlags, aCopyFrontToBack);
return RotatedContentBuffer::BeginPaint(aLayer, aFlags);
}
virtual gfx::DrawTarget* BorrowDrawTargetForPainting(PaintState& aPaintState,
RotatedContentBuffer::DrawIterator* aIter = nullptr) override
@ -290,12 +285,6 @@ public:
return TextureFlags::IMMEDIATE_UPLOAD;
}
virtual bool IsRemoteBuffer() override { return true; }
virtual void FinalizeFrameOnPaintThread(nsIntRegion aRegionToDraw) {
MOZ_ASSERT(PaintThread::IsOnPaintThread());
FinalizeFrame(aRegionToDraw);
}
protected:
void DestroyBuffers();
@ -396,8 +385,6 @@ private:
void UpdateDestinationFrom(const RotatedBuffer& aSource,
const nsIntRegion& aUpdateRegion);
void CopyFrontBufferToBackBuffer(nsIntRegion& aUpdateRegion);
virtual void AbortTextureClientCreation() override
{
mTextureClient = nullptr;

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

@ -630,11 +630,12 @@ BufferTextureHost::PushExternalImage(wr::DisplayListBuilder& aBuilder,
{
if (GetFormat() != gfx::SurfaceFormat::YUV) {
MOZ_ASSERT(aImageKeys.length() == 1);
aBuilder.PushImage(aBounds, aClip, aFilter, aImageKeys[0]);
aBuilder.PushImage(aBounds, aClip, true, aFilter, aImageKeys[0]);
} else {
MOZ_ASSERT(aImageKeys.length() == 3);
aBuilder.PushYCbCrPlanarImage(aBounds,
aClip,
true,
aImageKeys[0],
aImageKeys[1],
aImageKeys[2],

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

@ -1129,13 +1129,14 @@ DXGITextureHostD3D11::PushExternalImage(wr::DisplayListBuilder& aBuilder,
case gfx::SurfaceFormat::B8G8R8A8:
case gfx::SurfaceFormat::B8G8R8X8: {
MOZ_ASSERT(aImageKeys.length() == 1);
aBuilder.PushImage(aBounds, aClip, aFilter, aImageKeys[0]);
aBuilder.PushImage(aBounds, aClip, true, aFilter, aImageKeys[0]);
break;
}
case gfx::SurfaceFormat::NV12: {
MOZ_ASSERT(aImageKeys.length() == 2);
aBuilder.PushNV12Image(aBounds,
aClip,
true,
aImageKeys[0],
aImageKeys[1],
wr::WrYuvColorSpace::Rec601,
@ -1364,7 +1365,7 @@ DXGIYCbCrTextureHostD3D11::PushExternalImage(wr::DisplayListBuilder& aBuilder,
{
// 1 image key
MOZ_ASSERT(aImageKeys.length() == 1);
aBuilder.PushImage(aBounds, aClip, aFilter, aImageKeys[0]);
aBuilder.PushImage(aBounds, aClip, true, aFilter, aImageKeys[0]);
}
bool

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

@ -236,7 +236,7 @@ MacIOSurfaceTextureHostOGL::PushExternalImage(wr::DisplayListBuilder& aBuilder,
case gfx::SurfaceFormat::B8G8R8X8: {
MOZ_ASSERT(aImageKeys.length() == 1);
MOZ_ASSERT(mSurface->GetPlaneCount() == 0);
aBuilder.PushImage(aBounds, aClip, aFilter, aImageKeys[0]);
aBuilder.PushImage(aBounds, aClip, true, aFilter, aImageKeys[0]);
break;
}
case gfx::SurfaceFormat::YUV422: {
@ -244,6 +244,7 @@ MacIOSurfaceTextureHostOGL::PushExternalImage(wr::DisplayListBuilder& aBuilder,
MOZ_ASSERT(mSurface->GetPlaneCount() == 0);
aBuilder.PushYCbCrInterleavedImage(aBounds,
aClip,
true,
aImageKeys[0],
wr::WrYuvColorSpace::Rec601,
aFilter);
@ -254,6 +255,7 @@ MacIOSurfaceTextureHostOGL::PushExternalImage(wr::DisplayListBuilder& aBuilder,
MOZ_ASSERT(mSurface->GetPlaneCount() == 2);
aBuilder.PushNV12Image(aBounds,
aClip,
true,
aImageKeys[0],
aImageKeys[1],
wr::WrYuvColorSpace::Rec601,

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

@ -291,7 +291,8 @@ AsyncImagePipelineManager::ApplyAsyncImages()
wr::TransformStyle::Flat,
nullptr,
pipeline->mMixBlendMode,
nsTArray<wr::WrFilterOp>());
nsTArray<wr::WrFilterOp>(),
true);
LayerRect rect(0, 0, pipeline->mCurrentTexture->GetSize().width, pipeline->mCurrentTexture->GetSize().height);
if (pipeline->mScaleToSize.isSome()) {
@ -311,6 +312,7 @@ AsyncImagePipelineManager::ApplyAsyncImages()
MOZ_ASSERT(keys.Length() == 1);
builder.PushImage(wr::ToLayoutRect(rect),
wr::ToLayoutRect(rect),
true,
pipeline->mFilter,
keys[0]);
}

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

@ -35,7 +35,8 @@ StackingContextHelper::StackingContextHelper(const StackingContextHelper& aParen
wr::TransformStyle::Flat,
nullptr,
wr::ToMixBlendMode(layer->GetMixBlendMode()),
aFilters);
aFilters,
true);
mOrigin = aLayer->Bounds().TopLeft();
}
@ -60,7 +61,8 @@ StackingContextHelper::StackingContextHelper(const StackingContextHelper& aParen
wr::TransformStyle::Flat,
nullptr,
wr::ToMixBlendMode(aLayer->GetLayer()->GetMixBlendMode()),
aFilters);
aFilters,
true);
mOrigin = aLayer->Bounds().TopLeft();
}
@ -75,7 +77,8 @@ StackingContextHelper::StackingContextHelper(const StackingContextHelper& aParen
gfx::Matrix4x4* aTransformPtr,
gfx::Matrix4x4* aPerspectivePtr,
const nsTArray<wr::WrFilterOp>& aFilters,
const gfx::CompositionOp& aMixBlendMode)
const gfx::CompositionOp& aMixBlendMode,
bool aBackfaceVisible)
: mBuilder(&aBuilder)
{
bool is2d = !aTransformPtr || (aTransformPtr->Is2D() && !aPerspectivePtr);
@ -90,7 +93,8 @@ StackingContextHelper::StackingContextHelper(const StackingContextHelper& aParen
is2d ? wr::TransformStyle::Flat : wr::TransformStyle::Preserve3D,
aPerspectivePtr,
wr::ToMixBlendMode(aMixBlendMode),
aFilters);
aFilters,
aBackfaceVisible);
}
StackingContextHelper::~StackingContextHelper()

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

@ -58,7 +58,8 @@ public:
gfx::Matrix4x4* aTransformPtr,
gfx::Matrix4x4* aPerspectivePtr = nullptr,
const nsTArray<wr::WrFilterOp>& aFilters = nsTArray<wr::WrFilterOp>(),
const gfx::CompositionOp& aMixBlendMode = gfx::CompositionOp::OP_OVER);
const gfx::CompositionOp& aMixBlendMode = gfx::CompositionOp::OP_OVER,
bool aBackfaceVisible = true);
// 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

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

@ -163,6 +163,8 @@ WebRenderBridgeChild::EndTransaction(wr::DisplayListBuilder &aBuilder,
void
WebRenderBridgeChild::ProcessWebRenderParentCommands()
{
MOZ_ASSERT(!mDestroyed);
if (mParentCommands.IsEmpty()) {
return;
}
@ -174,6 +176,7 @@ void
WebRenderBridgeChild::AddPipelineIdForAsyncCompositable(const wr::PipelineId& aPipelineId,
const CompositableHandle& aHandle)
{
MOZ_ASSERT(!mDestroyed);
SendAddPipelineIdForCompositable(aPipelineId, aHandle, true);
}
@ -181,12 +184,16 @@ void
WebRenderBridgeChild::AddPipelineIdForCompositable(const wr::PipelineId& aPipelineId,
const CompositableHandle& aHandle)
{
MOZ_ASSERT(!mDestroyed);
SendAddPipelineIdForCompositable(aPipelineId, aHandle, false);
}
void
WebRenderBridgeChild::RemovePipelineIdForCompositable(const wr::PipelineId& aPipelineId)
{
if (!IPCOpen()) {
return;
}
SendRemovePipelineIdForCompositable(aPipelineId);
}
@ -243,7 +250,7 @@ WriteFontFileData(const uint8_t* aData, uint32_t aLength, uint32_t aIndex,
void
WebRenderBridgeChild::PushGlyphs(wr::DisplayListBuilder& aBuilder, const nsTArray<gfx::Glyph>& aGlyphs,
gfx::ScaledFont* aFont, const gfx::Color& aColor, const StackingContextHelper& aSc,
const LayerRect& aBounds, const LayerRect& aClip)
const LayerRect& aBounds, const LayerRect& aClip, bool aBackfaceVisible)
{
MOZ_ASSERT(aFont);
MOZ_ASSERT(!aGlyphs.IsEmpty());
@ -262,6 +269,7 @@ WebRenderBridgeChild::PushGlyphs(wr::DisplayListBuilder& aBuilder, const nsTArra
aBuilder.PushText(aSc.ToRelativeLayoutRect(aBounds),
aSc.ToRelativeLayoutRect(aClip),
aBackfaceVisible,
aColor,
key,
Range<const wr::GlyphInstance>(wr_glyph_instances.Elements(), wr_glyph_instances.Length()));
@ -362,6 +370,7 @@ void
WebRenderBridgeChild::Connect(CompositableClient* aCompositable,
ImageContainer* aImageContainer)
{
MOZ_ASSERT(!mDestroyed);
MOZ_ASSERT(aCompositable);
static uint64_t sNextID = 1;
@ -528,6 +537,10 @@ WebRenderBridgeChild::BeginClearCachedResources()
void
WebRenderBridgeChild::EndClearCachedResources()
{
if (!IPCOpen()) {
mIsInClearCachedResources = false;
return;
}
ProcessWebRenderParentCommands();
SendClearCachedResources();
mIsInClearCachedResources = false;

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

@ -116,7 +116,8 @@ public:
void PushGlyphs(wr::DisplayListBuilder& aBuilder, const nsTArray<gfx::Glyph>& aGlyphs,
gfx::ScaledFont* aFont, const gfx::Color& aColor,
const StackingContextHelper& aSc,
const LayerRect& aBounds, const LayerRect& aClip);
const LayerRect& aBounds, const LayerRect& aClip,
bool aBackfaceVisible);
wr::FontInstanceKey GetFontKeyForScaledFont(gfx::ScaledFont* aScaledFont);

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

@ -73,7 +73,7 @@ WebRenderCanvasLayer::RenderLayer(wr::DisplayListBuilder& aBuilder,
WrManager()->AddImageKeyForDiscard(key);
wr::LayoutRect r = sc.ToRelativeLayoutRect(rect);
aBuilder.PushImage(r, r, filter, key);
aBuilder.PushImage(r, r, true, filter, key);
}
void

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

@ -30,7 +30,7 @@ WebRenderColorLayer::RenderLayer(wr::DisplayListBuilder& aBuilder,
DumpLayerInfo("ColorLayer", rect);
wr::LayoutRect r = sc.ToRelativeLayoutRect(rect);
aBuilder.PushRect(r, r, wr::ToColorF(mColor));
aBuilder.PushRect(r, r, true, wr::ToColorF(mColor));
}
} // namespace layers

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

@ -140,7 +140,7 @@ WebRenderRefLayer::RenderLayer(wr::DisplayListBuilder& aBuilder,
DumpLayerInfo("RefLayer", rect);
wr::LayoutRect r = aSc.ToRelativeLayoutRect(rect);
aBuilder.PushIFrame(r, wr::AsPipelineId(mId));
aBuilder.PushIFrame(r, true, wr::AsPipelineId(mId));
}
} // namespace layers

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

@ -208,7 +208,7 @@ WebRenderImageLayer::RenderLayer(wr::DisplayListBuilder& aBuilder,
DumpLayerInfo("Image Layer async", rect);
wr::LayoutRect r = aSc.ToRelativeLayoutRect(rect);
aBuilder.PushIFrame(r, mPipelineId.ref());
aBuilder.PushIFrame(r, true, mPipelineId.ref());
gfx::Matrix4x4 scTransform = GetTransform();
// Translate is applied as part of PushIFrame()
@ -273,7 +273,7 @@ WebRenderImageLayer::RenderLayer(wr::DisplayListBuilder& aBuilder,
Stringify(filter).c_str());
}
wr::LayoutRect r = sc.ToRelativeLayoutRect(rect);
aBuilder.PushImage(r, r, filter, mKey.value());
aBuilder.PushImage(r, r, true, filter, mKey.value());
}
Maybe<wr::WrImageMask>

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

@ -257,11 +257,6 @@ WebRenderLayerManager::CreateWebRenderCommandsFromDisplayList(nsDisplayList* aDi
continue;
}
if (item->BackfaceIsHidden() && aSc.IsBackfaceVisible()) {
item->Destroy(aDisplayListBuilder);
continue;
}
savedItems.AppendToTop(item);
bool forceNewLayerData = false;
@ -421,7 +416,8 @@ WebRenderLayerManager::CreateImageKey(nsDisplayItem* aItem,
gfx::Matrix4x4(),
scaleToSize,
wr::ImageRendering::Auto,
wr::MixBlendMode::Normal);
wr::MixBlendMode::Normal,
!aItem->BackfaceIsHidden());
return Nothing();
}
@ -458,7 +454,7 @@ WebRenderLayerManager::PushImage(nsDisplayItem* aItem,
auto r = aSc.ToRelativeLayoutRect(aRect);
SamplingFilter sampleFilter = nsLayoutUtils::GetSamplingFilterForFrame(aItem->Frame());
aBuilder.PushImage(r, r, wr::ToImageRendering(sampleFilter), key.value());
aBuilder.PushImage(r, r, !aItem->BackfaceIsHidden(), wr::ToImageRendering(sampleFilter), key.value());
return true;
}
@ -684,6 +680,7 @@ WebRenderLayerManager::PushItemAsImage(nsDisplayItem* aItem,
SamplingFilter sampleFilter = nsLayoutUtils::GetSamplingFilterForFrame(aItem->Frame());
aBuilder.PushImage(dest,
dest,
!aItem->BackfaceIsHidden(),
wr::ToImageRendering(sampleFilter),
fallbackData->GetKey().value());
return true;
@ -973,7 +970,8 @@ WebRenderLayerManager::KeepCompositorAnimationsIdAlive(uint64_t aId)
void
WebRenderLayerManager::DiscardCompositorAnimations()
{
if (WrBridge()->IPCOpen() && !mDiscardedCompositorAnimationsIds.IsEmpty()) {
if (WrBridge()->IPCOpen() &&
!mDiscardedCompositorAnimationsIds.IsEmpty()) {
WrBridge()->
SendDeleteCompositorAnimations(mDiscardedCompositorAnimationsIds);
}

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

@ -107,7 +107,7 @@ WebRenderPaintedLayer::CreateWebRenderDisplayList(wr::DisplayListBuilder& aBuild
WrManager()->AddImageKeyForDiscard(key);
wr::LayoutRect r = sc.ToRelativeLayoutRect(rect);
aBuilder.PushImage(r, r, wr::ImageRendering::Auto, key);
aBuilder.PushImage(r, r, true, wr::ImageRendering::Auto, key);
}
void

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

@ -93,6 +93,7 @@ WebRenderPaintedLayerBlob::RenderLayer(wr::DisplayListBuilder& aBuilder,
aBuilder.PushImage(sc.ToRelativeLayoutRect(LayerRect(mImageBounds)),
sc.ToRelativeLayoutRect(rect),
true,
wr::ImageRendering::Auto, mImageKey.value());
}

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

@ -43,7 +43,7 @@ WebRenderTextLayer::RenderLayer(wr::DisplayListBuilder& aBuilder,
for (GlyphArray& glyphs : mGlyphs) {
WrBridge()->PushGlyphs(aBuilder, glyphs.glyphs(), mFont,
glyphs.color().value(), aSc, rect, rect);
glyphs.color().value(), aSc, rect, rect, true);
}
}

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

@ -135,7 +135,8 @@ WebRenderImageData::CreateAsyncImageWebRenderCommands(mozilla::wr::DisplayListBu
const gfx::Matrix4x4& aSCTransform,
const gfx::MaybeIntSize& aScaleToSize,
const wr::ImageRendering& aFilter,
const wr::MixBlendMode& aMixBlendMode)
const wr::MixBlendMode& aMixBlendMode,
bool aIsBackfaceVisible)
{
MOZ_ASSERT(aContainer->IsAsync());
if (!mPipelineId) {
@ -156,7 +157,7 @@ WebRenderImageData::CreateAsyncImageWebRenderCommands(mozilla::wr::DisplayListBu
// where it will be done when we build the display list for the iframe.
// That happens in AsyncImagePipelineManager.
wr::LayoutRect r = aSc.ToRelativeLayoutRect(aBounds);
aBuilder.PushIFrame(r, mPipelineId.ref());
aBuilder.PushIFrame(r, aIsBackfaceVisible, mPipelineId.ref());
WrBridge()->AddWebRenderParentCommand(OpUpdateAsyncImagePipeline(mPipelineId.value(),
aSCBounds,

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

@ -95,7 +95,8 @@ public:
const gfx::Matrix4x4& aSCTransform,
const gfx::MaybeIntSize& aScaleToSize,
const wr::ImageRendering& aFilter,
const wr::MixBlendMode& aMixBlendMode);
const wr::MixBlendMode& aMixBlendMode,
bool aIsBackfaceVisible);
void CreateImageClientIfNeeded();

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

@ -610,7 +610,7 @@ private:
DECL_GFX_PREF(Live, "layers.shared-buffer-provider.enabled", PersistentBufferProviderSharedEnabled, bool, false);
DECL_GFX_PREF(Live, "layers.single-tile.enabled", LayersSingleTileEnabled, bool, true);
DECL_GFX_PREF(Once, "layers.stereo-video.enabled", StereoVideoEnabled, bool, false);
DECL_GFX_PREF(Live, "layers.force-synchronous-resize", LayersForceSynchronousResize, bool, false);
DECL_GFX_PREF(Live, "layers.force-synchronous-resize", LayersForceSynchronousResize, bool, true);
// We allow for configurable and rectangular tile size to avoid wasting memory on devices whose
// screen size does not align nicely to the default tile size. Although layers can be any size,

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

@ -663,7 +663,8 @@ DisplayListBuilder::PushStackingContext(const wr::LayoutRect& aBounds,
wr::TransformStyle aTransformStyle,
const gfx::Matrix4x4* aPerspective,
const wr::MixBlendMode& aMixBlendMode,
const nsTArray<wr::WrFilterOp>& aFilters)
const nsTArray<wr::WrFilterOp>& aFilters,
bool aIsBackfaceVisible)
{
wr::LayoutTransform matrix;
if (aTransform) {
@ -679,7 +680,7 @@ DisplayListBuilder::PushStackingContext(const wr::LayoutRect& aBounds,
aTransform ? Stringify(*aTransform).c_str() : "none");
wr_dp_push_stacking_context(mWrState, aBounds, aAnimationId, aOpacity,
maybeTransform, aTransformStyle, maybePerspective,
aMixBlendMode, aFilters.Elements(), aFilters.Length());
aMixBlendMode, aFilters.Elements(), aFilters.Length(), aIsBackfaceVisible);
}
void
@ -800,18 +801,20 @@ DisplayListBuilder::PopClipAndScrollInfo()
void
DisplayListBuilder::PushRect(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const wr::ColorF& aColor)
{
WRDL_LOG("PushRect b=%s cl=%s c=%s\n", mWrState,
Stringify(aBounds).c_str(),
Stringify(aClip).c_str(),
Stringify(aColor).c_str());
wr_dp_push_rect(mWrState, aBounds, aClip, aColor);
wr_dp_push_rect(mWrState, aBounds, aClip, aIsBackfaceVisible, aColor);
}
void
DisplayListBuilder::PushLinearGradient(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const wr::LayoutPoint& aStartPoint,
const wr::LayoutPoint& aEndPoint,
const nsTArray<wr::GradientStop>& aStops,
@ -820,7 +823,7 @@ DisplayListBuilder::PushLinearGradient(const wr::LayoutRect& aBounds,
const wr::LayoutSize aTileSpacing)
{
wr_dp_push_linear_gradient(mWrState,
aBounds, aClip,
aBounds, aClip, aIsBackfaceVisible,
aStartPoint, aEndPoint,
aStops.Elements(), aStops.Length(),
aExtendMode,
@ -830,6 +833,7 @@ DisplayListBuilder::PushLinearGradient(const wr::LayoutRect& aBounds,
void
DisplayListBuilder::PushRadialGradient(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const wr::LayoutPoint& aCenter,
const wr::LayoutSize& aRadius,
const nsTArray<wr::GradientStop>& aStops,
@ -838,7 +842,7 @@ DisplayListBuilder::PushRadialGradient(const wr::LayoutRect& aBounds,
const wr::LayoutSize aTileSpacing)
{
wr_dp_push_radial_gradient(mWrState,
aBounds, aClip,
aBounds, aClip, aIsBackfaceVisible,
aCenter, aRadius,
aStops.Elements(), aStops.Length(),
aExtendMode,
@ -848,18 +852,20 @@ DisplayListBuilder::PushRadialGradient(const wr::LayoutRect& aBounds,
void
DisplayListBuilder::PushImage(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
wr::ImageRendering aFilter,
wr::ImageKey aImage)
{
wr::LayoutSize size;
size.width = aBounds.size.width;
size.height = aBounds.size.height;
PushImage(aBounds, aClip, size, size, aFilter, aImage);
PushImage(aBounds, aClip, aIsBackfaceVisible, size, size, aFilter, aImage);
}
void
DisplayListBuilder::PushImage(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const wr::LayoutSize& aStretchSize,
const wr::LayoutSize& aTileSpacing,
wr::ImageRendering aFilter,
@ -869,12 +875,13 @@ DisplayListBuilder::PushImage(const wr::LayoutRect& aBounds,
Stringify(aBounds).c_str(),
Stringify(aClip).c_str(), Stringify(aStretchSize).c_str(),
Stringify(aTileSpacing).c_str());
wr_dp_push_image(mWrState, aBounds, aClip, aStretchSize, aTileSpacing, aFilter, aImage);
wr_dp_push_image(mWrState, aBounds, aClip, aIsBackfaceVisible, aStretchSize, aTileSpacing, aFilter, aImage);
}
void
DisplayListBuilder::PushYCbCrPlanarImage(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
wr::ImageKey aImageChannel0,
wr::ImageKey aImageChannel1,
wr::ImageKey aImageChannel2,
@ -884,6 +891,7 @@ DisplayListBuilder::PushYCbCrPlanarImage(const wr::LayoutRect& aBounds,
wr_dp_push_yuv_planar_image(mWrState,
aBounds,
aClip,
aIsBackfaceVisible,
aImageChannel0,
aImageChannel1,
aImageChannel2,
@ -894,6 +902,7 @@ DisplayListBuilder::PushYCbCrPlanarImage(const wr::LayoutRect& aBounds,
void
DisplayListBuilder::PushNV12Image(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
wr::ImageKey aImageChannel0,
wr::ImageKey aImageChannel1,
wr::WrYuvColorSpace aColorSpace,
@ -902,6 +911,7 @@ DisplayListBuilder::PushNV12Image(const wr::LayoutRect& aBounds,
wr_dp_push_yuv_NV12_image(mWrState,
aBounds,
aClip,
aIsBackfaceVisible,
aImageChannel0,
aImageChannel1,
aColorSpace,
@ -911,6 +921,7 @@ DisplayListBuilder::PushNV12Image(const wr::LayoutRect& aBounds,
void
DisplayListBuilder::PushYCbCrInterleavedImage(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
wr::ImageKey aImageChannel0,
wr::WrYuvColorSpace aColorSpace,
wr::ImageRendering aRendering)
@ -918,6 +929,7 @@ DisplayListBuilder::PushYCbCrInterleavedImage(const wr::LayoutRect& aBounds,
wr_dp_push_yuv_interleaved_image(mWrState,
aBounds,
aClip,
aIsBackfaceVisible,
aImageChannel0,
aColorSpace,
aRendering);
@ -925,14 +937,16 @@ DisplayListBuilder::PushYCbCrInterleavedImage(const wr::LayoutRect& aBounds,
void
DisplayListBuilder::PushIFrame(const wr::LayoutRect& aBounds,
bool aIsBackfaceVisible,
PipelineId aPipeline)
{
wr_dp_push_iframe(mWrState, aBounds, aPipeline);
wr_dp_push_iframe(mWrState, aBounds, aIsBackfaceVisible, aPipeline);
}
void
DisplayListBuilder::PushBorder(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const wr::BorderWidths& aWidths,
const Range<const wr::BorderSide>& aSides,
const wr::BorderRadius& aRadius)
@ -941,13 +955,14 @@ DisplayListBuilder::PushBorder(const wr::LayoutRect& aBounds,
if (aSides.length() != 4) {
return;
}
wr_dp_push_border(mWrState, aBounds, aClip,
wr_dp_push_border(mWrState, aBounds, aClip, aIsBackfaceVisible,
aWidths, aSides[0], aSides[1], aSides[2], aSides[3], aRadius);
}
void
DisplayListBuilder::PushBorderImage(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const wr::BorderWidths& aWidths,
wr::ImageKey aImage,
const wr::NinePatchDescriptor& aPatch,
@ -955,7 +970,7 @@ DisplayListBuilder::PushBorderImage(const wr::LayoutRect& aBounds,
const wr::RepeatMode& aRepeatHorizontal,
const wr::RepeatMode& aRepeatVertical)
{
wr_dp_push_border_image(mWrState, aBounds, aClip,
wr_dp_push_border_image(mWrState, aBounds, aClip, aIsBackfaceVisible,
aWidths, aImage, aPatch, aOutset,
aRepeatHorizontal, aRepeatVertical);
}
@ -963,6 +978,7 @@ DisplayListBuilder::PushBorderImage(const wr::LayoutRect& aBounds,
void
DisplayListBuilder::PushBorderGradient(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const wr::BorderWidths& aWidths,
const wr::LayoutPoint& aStartPoint,
const wr::LayoutPoint& aEndPoint,
@ -970,7 +986,7 @@ DisplayListBuilder::PushBorderGradient(const wr::LayoutRect& aBounds,
wr::ExtendMode aExtendMode,
const wr::SideOffsets2D_f32& aOutset)
{
wr_dp_push_border_gradient(mWrState, aBounds, aClip,
wr_dp_push_border_gradient(mWrState, aBounds, aClip, aIsBackfaceVisible,
aWidths, aStartPoint, aEndPoint,
aStops.Elements(), aStops.Length(),
aExtendMode, aOutset);
@ -979,6 +995,7 @@ DisplayListBuilder::PushBorderGradient(const wr::LayoutRect& aBounds,
void
DisplayListBuilder::PushBorderRadialGradient(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const wr::BorderWidths& aWidths,
const wr::LayoutPoint& aCenter,
const wr::LayoutSize& aRadius,
@ -987,7 +1004,7 @@ DisplayListBuilder::PushBorderRadialGradient(const wr::LayoutRect& aBounds,
const wr::SideOffsets2D_f32& aOutset)
{
wr_dp_push_border_radial_gradient(
mWrState, aBounds, aClip, aWidths, aCenter,
mWrState, aBounds, aClip, aIsBackfaceVisible, aWidths, aCenter,
aRadius, aStops.Elements(), aStops.Length(),
aExtendMode, aOutset);
}
@ -995,12 +1012,13 @@ DisplayListBuilder::PushBorderRadialGradient(const wr::LayoutRect& aBounds,
void
DisplayListBuilder::PushText(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const gfx::Color& aColor,
wr::FontInstanceKey aFontKey,
Range<const wr::GlyphInstance> aGlyphBuffer,
const wr::GlyphOptions* aGlyphOptions)
{
wr_dp_push_text(mWrState, aBounds, aClip,
wr_dp_push_text(mWrState, aBounds, aClip, aIsBackfaceVisible,
ToColorF(aColor),
aFontKey,
&aGlyphBuffer[0], aGlyphBuffer.length(),
@ -1009,9 +1027,10 @@ DisplayListBuilder::PushText(const wr::LayoutRect& aBounds,
void
DisplayListBuilder::PushLine(const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const wr::Line& aLine)
{
wr_dp_push_line(mWrState, aClip, aLine.baseline, aLine.start, aLine.end,
wr_dp_push_line(mWrState, aClip, aIsBackfaceVisible, aLine.baseline, aLine.start, aLine.end,
aLine.orientation, aLine.width, aLine.color, aLine.style);
/* TODO(Gankro): remove this
@ -1035,9 +1054,10 @@ DisplayListBuilder::PushLine(const wr::LayoutRect& aClip,
void
DisplayListBuilder::PushTextShadow(const wr::LayoutRect& aRect,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const wr::TextShadow& aShadow)
{
wr_dp_push_text_shadow(mWrState, aRect, aClip, aShadow);
wr_dp_push_text_shadow(mWrState, aRect, aClip, aIsBackfaceVisible, aShadow);
}
void
@ -1049,6 +1069,7 @@ DisplayListBuilder::PopTextShadow()
void
DisplayListBuilder::PushBoxShadow(const wr::LayoutRect& aRect,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const wr::LayoutRect& aBoxBounds,
const wr::LayoutVector2D& aOffset,
const wr::ColorF& aColor,
@ -1057,7 +1078,7 @@ DisplayListBuilder::PushBoxShadow(const wr::LayoutRect& aRect,
const float& aBorderRadius,
const wr::BoxShadowClipMode& aClipMode)
{
wr_dp_push_box_shadow(mWrState, aRect, aClip,
wr_dp_push_box_shadow(mWrState, aRect, aClip, aIsBackfaceVisible,
aBoxBounds, aOffset, aColor,
aBlurRadius, aSpreadRadius, aBorderRadius,
aClipMode);

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

@ -219,7 +219,8 @@ public:
wr::TransformStyle aTransformStyle,
const gfx::Matrix4x4* aPerspective,
const wr::MixBlendMode& aMixBlendMode,
const nsTArray<wr::WrFilterOp>& aFilters);
const nsTArray<wr::WrFilterOp>& aFilters,
bool aIsBackfaceVisible);
void PopStackingContext();
wr::WrClipId DefineClip(const wr::LayoutRect& aClipRect,
@ -243,10 +244,12 @@ public:
void PushRect(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const wr::ColorF& aColor);
void PushLinearGradient(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const wr::LayoutPoint& aStartPoint,
const wr::LayoutPoint& aEndPoint,
const nsTArray<wr::GradientStop>& aStops,
@ -256,6 +259,7 @@ public:
void PushRadialGradient(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const wr::LayoutPoint& aCenter,
const wr::LayoutSize& aRadius,
const nsTArray<wr::GradientStop>& aStops,
@ -265,11 +269,13 @@ public:
void PushImage(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
wr::ImageRendering aFilter,
wr::ImageKey aImage);
void PushImage(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const wr::LayoutSize& aStretchSize,
const wr::LayoutSize& aTileSpacing,
wr::ImageRendering aFilter,
@ -277,6 +283,7 @@ public:
void PushYCbCrPlanarImage(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
wr::ImageKey aImageChannel0,
wr::ImageKey aImageChannel1,
wr::ImageKey aImageChannel2,
@ -285,6 +292,7 @@ public:
void PushNV12Image(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
wr::ImageKey aImageChannel0,
wr::ImageKey aImageChannel1,
wr::WrYuvColorSpace aColorSpace,
@ -292,23 +300,27 @@ public:
void PushYCbCrInterleavedImage(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
wr::ImageKey aImageChannel0,
wr::WrYuvColorSpace aColorSpace,
wr::ImageRendering aFilter);
void PushIFrame(const wr::LayoutRect& aBounds,
bool aIsBackfaceVisible,
wr::PipelineId aPipeline);
// XXX WrBorderSides are passed with Range.
// It is just to bypass compiler bug. See Bug 1357734.
void PushBorder(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const wr::BorderWidths& aWidths,
const Range<const wr::BorderSide>& aSides,
const wr::BorderRadius& aRadius);
void PushBorderImage(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const wr::BorderWidths& aWidths,
wr::ImageKey aImage,
const wr::NinePatchDescriptor& aPatch,
@ -318,6 +330,7 @@ public:
void PushBorderGradient(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const wr::BorderWidths& aWidths,
const wr::LayoutPoint& aStartPoint,
const wr::LayoutPoint& aEndPoint,
@ -327,6 +340,7 @@ public:
void PushBorderRadialGradient(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const wr::BorderWidths& aWidths,
const wr::LayoutPoint& aCenter,
const wr::LayoutSize& aRadius,
@ -336,16 +350,19 @@ public:
void PushText(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const gfx::Color& aColor,
wr::FontInstanceKey aFontKey,
Range<const wr::GlyphInstance> aGlyphBuffer,
const wr::GlyphOptions* aGlyphOptions = nullptr);
void PushLine(const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const wr::Line& aLine);
void PushTextShadow(const wr::LayoutRect& aBounds,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const wr::TextShadow& aShadow);
void PopTextShadow();
@ -354,6 +371,7 @@ public:
void PushBoxShadow(const wr::LayoutRect& aRect,
const wr::LayoutRect& aClip,
bool aIsBackfaceVisible,
const wr::LayoutRect& aBoxBounds,
const wr::LayoutVector2D& aOffset,
const wr::ColorF& aColor,

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

@ -1080,7 +1080,7 @@ pub extern "C" fn wr_state_delete(state: *mut WrState) {
pub extern "C" fn wr_dp_begin(state: &mut WrState,
width: u32,
height: u32) {
assert!(unsafe { !is_in_render_thread() });
debug_assert!(unsafe { !is_in_render_thread() });
state.frame_builder.dl_builder.data.clear();
let bounds = LayoutRect::new(LayoutPoint::new(0.0, 0.0),
@ -1100,7 +1100,7 @@ pub extern "C" fn wr_dp_begin(state: &mut WrState,
#[no_mangle]
pub extern "C" fn wr_dp_end(state: &mut WrState) {
assert!(unsafe { !is_in_render_thread() });
debug_assert!(unsafe { !is_in_render_thread() });
state.frame_builder.dl_builder.pop_stacking_context();
}
@ -1114,8 +1114,9 @@ pub extern "C" fn wr_dp_push_stacking_context(state: &mut WrState,
perspective: *const LayoutTransform,
mix_blend_mode: MixBlendMode,
filters: *const WrFilterOp,
filter_count: usize) {
assert!(unsafe { !is_in_render_thread() });
filter_count: usize,
is_backface_visible: bool) {
debug_assert!(unsafe { !is_in_render_thread() });
let c_filters = make_slice(filters, filter_count);
let mut filters : Vec<FilterOp> = c_filters.iter().map(|c_filter| {
@ -1156,7 +1157,9 @@ pub extern "C" fn wr_dp_push_stacking_context(state: &mut WrState,
None => None,
};
let prim_info = LayoutPrimitiveInfo::new(bounds);
let mut prim_info = LayoutPrimitiveInfo::new(bounds);
prim_info.is_backface_visible = is_backface_visible;
state.frame_builder
.dl_builder
.push_stacking_context(&prim_info,
@ -1170,7 +1173,7 @@ pub extern "C" fn wr_dp_push_stacking_context(state: &mut WrState,
#[no_mangle]
pub extern "C" fn wr_dp_pop_stacking_context(state: &mut WrState) {
assert!(unsafe { !is_in_render_thread() });
debug_assert!(unsafe { !is_in_render_thread() });
state.frame_builder.dl_builder.pop_stacking_context();
}
@ -1181,7 +1184,7 @@ pub extern "C" fn wr_dp_define_clip(state: &mut WrState,
complex_count: usize,
mask: *const WrImageMask)
-> u64 {
assert!(unsafe { is_in_main_thread() });
debug_assert!(unsafe { is_in_main_thread() });
let complex_slice = make_slice(complex, complex_count);
let complex_iter = complex_slice.iter().map(|x| x.into());
let mask : Option<ImageMask> = unsafe { mask.as_ref() }.map(|x| x.into());
@ -1201,13 +1204,13 @@ pub extern "C" fn wr_dp_define_clip(state: &mut WrState,
#[no_mangle]
pub extern "C" fn wr_dp_push_clip(state: &mut WrState,
clip_id: u64) {
assert!(unsafe { is_in_main_thread() });
debug_assert!(unsafe { is_in_main_thread() });
state.frame_builder.dl_builder.push_clip_id(ClipId::Clip(clip_id, 0, state.pipeline_id));
}
#[no_mangle]
pub extern "C" fn wr_dp_pop_clip(state: &mut WrState) {
assert!(unsafe { !is_in_render_thread() });
debug_assert!(unsafe { !is_in_render_thread() });
state.frame_builder.dl_builder.pop_clip_id();
}
@ -1226,14 +1229,14 @@ pub extern "C" fn wr_dp_define_scroll_layer(state: &mut WrState,
#[no_mangle]
pub extern "C" fn wr_dp_push_scroll_layer(state: &mut WrState,
scroll_id: u64) {
assert!(unsafe { is_in_main_thread() });
debug_assert!(unsafe { is_in_main_thread() });
let clip_id = ClipId::new(scroll_id, state.pipeline_id);
state.frame_builder.dl_builder.push_clip_id(clip_id);
}
#[no_mangle]
pub extern "C" fn wr_dp_pop_scroll_layer(state: &mut WrState) {
assert!(unsafe { is_in_main_thread() });
debug_assert!(unsafe { is_in_main_thread() });
state.frame_builder.dl_builder.pop_clip_id();
}
@ -1251,7 +1254,7 @@ pub extern "C" fn wr_scroll_layer_with_id(dh: &mut DocumentHandle,
pub extern "C" fn wr_dp_push_clip_and_scroll_info(state: &mut WrState,
scroll_id: u64,
clip_id: *const u64) {
assert!(unsafe { is_in_main_thread() });
debug_assert!(unsafe { is_in_main_thread() });
let scroll_id = ClipId::new(scroll_id, state.pipeline_id);
let info = if let Some(&id) = unsafe { clip_id.as_ref() } {
ClipAndScrollInfo::new(
@ -1265,17 +1268,19 @@ pub extern "C" fn wr_dp_push_clip_and_scroll_info(state: &mut WrState,
#[no_mangle]
pub extern "C" fn wr_dp_pop_clip_and_scroll_info(state: &mut WrState) {
assert!(unsafe { is_in_main_thread() });
debug_assert!(unsafe { is_in_main_thread() });
state.frame_builder.dl_builder.pop_clip_id();
}
#[no_mangle]
pub extern "C" fn wr_dp_push_iframe(state: &mut WrState,
rect: LayoutRect,
is_backface_visible: bool,
pipeline_id: WrPipelineId) {
assert!(unsafe { is_in_main_thread() });
debug_assert!(unsafe { is_in_main_thread() });
let prim_info = LayoutPrimitiveInfo::new(rect);
let mut prim_info = LayoutPrimitiveInfo::new(rect);
prim_info.is_backface_visible = is_backface_visible;
state.frame_builder.dl_builder.push_iframe(&prim_info, pipeline_id);
}
@ -1283,10 +1288,12 @@ pub extern "C" fn wr_dp_push_iframe(state: &mut WrState,
pub extern "C" fn wr_dp_push_rect(state: &mut WrState,
rect: LayoutRect,
clip: LayoutRect,
is_backface_visible: bool,
color: ColorF) {
assert!(unsafe { !is_in_render_thread() });
debug_assert!(unsafe { !is_in_render_thread() });
let prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
prim_info.is_backface_visible = is_backface_visible;
state.frame_builder.dl_builder.push_rect(&prim_info,
color);
}
@ -1295,13 +1302,15 @@ pub extern "C" fn wr_dp_push_rect(state: &mut WrState,
pub extern "C" fn wr_dp_push_image(state: &mut WrState,
bounds: LayoutRect,
clip: LayoutRect,
is_backface_visible: bool,
stretch_size: LayoutSize,
tile_spacing: LayoutSize,
image_rendering: ImageRendering,
key: WrImageKey) {
assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
debug_assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
let prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
prim_info.is_backface_visible = is_backface_visible;
state.frame_builder
.dl_builder
.push_image(&prim_info,
@ -1316,14 +1325,16 @@ pub extern "C" fn wr_dp_push_image(state: &mut WrState,
pub extern "C" fn wr_dp_push_yuv_planar_image(state: &mut WrState,
bounds: LayoutRect,
clip: LayoutRect,
is_backface_visible: bool,
image_key_0: WrImageKey,
image_key_1: WrImageKey,
image_key_2: WrImageKey,
color_space: WrYuvColorSpace,
image_rendering: ImageRendering) {
assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
debug_assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
let prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
prim_info.is_backface_visible = is_backface_visible;
state.frame_builder
.dl_builder
.push_yuv_image(&prim_info,
@ -1337,13 +1348,15 @@ pub extern "C" fn wr_dp_push_yuv_planar_image(state: &mut WrState,
pub extern "C" fn wr_dp_push_yuv_NV12_image(state: &mut WrState,
bounds: LayoutRect,
clip: LayoutRect,
is_backface_visible: bool,
image_key_0: WrImageKey,
image_key_1: WrImageKey,
color_space: WrYuvColorSpace,
image_rendering: ImageRendering) {
assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
debug_assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
let prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
prim_info.is_backface_visible = is_backface_visible;
state.frame_builder
.dl_builder
.push_yuv_image(&prim_info,
@ -1357,12 +1370,14 @@ pub extern "C" fn wr_dp_push_yuv_NV12_image(state: &mut WrState,
pub extern "C" fn wr_dp_push_yuv_interleaved_image(state: &mut WrState,
bounds: LayoutRect,
clip: LayoutRect,
is_backface_visible: bool,
image_key_0: WrImageKey,
color_space: WrYuvColorSpace,
image_rendering: ImageRendering) {
assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
debug_assert!(unsafe { is_in_main_thread() || is_in_compositor_thread() });
let prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
prim_info.is_backface_visible = is_backface_visible;
state.frame_builder
.dl_builder
.push_yuv_image(&prim_info,
@ -1375,16 +1390,18 @@ pub extern "C" fn wr_dp_push_yuv_interleaved_image(state: &mut WrState,
pub extern "C" fn wr_dp_push_text(state: &mut WrState,
bounds: LayoutRect,
clip: LayoutRect,
is_backface_visible: bool,
color: ColorF,
font_key: WrFontInstanceKey,
glyphs: *const GlyphInstance,
glyph_count: u32,
glyph_options: *const GlyphOptions) {
assert!(unsafe { is_in_main_thread() });
debug_assert!(unsafe { is_in_main_thread() });
let glyph_slice = make_slice(glyphs, glyph_count as usize);
let prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
prim_info.is_backface_visible = is_backface_visible;
state.frame_builder
.dl_builder
.push_text(&prim_info,
@ -1398,16 +1415,18 @@ pub extern "C" fn wr_dp_push_text(state: &mut WrState,
pub extern "C" fn wr_dp_push_text_shadow(state: &mut WrState,
bounds: LayoutRect,
clip: LayoutRect,
is_backface_visible: bool,
shadow: TextShadow) {
assert!(unsafe { is_in_main_thread() });
debug_assert!(unsafe { is_in_main_thread() });
let prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(bounds, clip.into());
prim_info.is_backface_visible = is_backface_visible;
state.frame_builder.dl_builder.push_text_shadow(&prim_info, shadow.into());
}
#[no_mangle]
pub extern "C" fn wr_dp_pop_text_shadow(state: &mut WrState) {
assert!(unsafe { is_in_main_thread() });
debug_assert!(unsafe { is_in_main_thread() });
state.frame_builder.dl_builder.pop_text_shadow();
}
@ -1415,6 +1434,7 @@ pub extern "C" fn wr_dp_pop_text_shadow(state: &mut WrState) {
#[no_mangle]
pub extern "C" fn wr_dp_push_line(state: &mut WrState,
clip: LayoutRect,
is_backface_visible: bool,
baseline: f32,
start: f32,
end: f32,
@ -1422,9 +1442,10 @@ pub extern "C" fn wr_dp_push_line(state: &mut WrState,
width: f32,
color: ColorF,
style: LineStyle) {
assert!(unsafe { is_in_main_thread() });
debug_assert!(unsafe { is_in_main_thread() });
let prim_info = LayoutPrimitiveInfo::with_clip_rect(LayoutRect::zero(), clip.into());
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(LayoutRect::zero(), clip.into());
prim_info.is_backface_visible = is_backface_visible;
state.frame_builder
.dl_builder
.push_line(&prim_info,
@ -1442,13 +1463,14 @@ pub extern "C" fn wr_dp_push_line(state: &mut WrState,
pub extern "C" fn wr_dp_push_border(state: &mut WrState,
rect: LayoutRect,
clip: LayoutRect,
is_backface_visible: bool,
widths: BorderWidths,
top: BorderSide,
right: BorderSide,
bottom: BorderSide,
left: BorderSide,
radius: BorderRadius) {
assert!(unsafe { is_in_main_thread() });
debug_assert!(unsafe { is_in_main_thread() });
let border_details = BorderDetails::Normal(NormalBorder {
left: left.into(),
@ -1457,7 +1479,8 @@ pub extern "C" fn wr_dp_push_border(state: &mut WrState,
bottom: bottom.into(),
radius: radius.into(),
});
let prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
prim_info.is_backface_visible = is_backface_visible;
state.frame_builder
.dl_builder
.push_border(&prim_info,
@ -1469,13 +1492,14 @@ pub extern "C" fn wr_dp_push_border(state: &mut WrState,
pub extern "C" fn wr_dp_push_border_image(state: &mut WrState,
rect: LayoutRect,
clip: LayoutRect,
is_backface_visible: bool,
widths: BorderWidths,
image: WrImageKey,
patch: NinePatchDescriptor,
outset: SideOffsets2D<f32>,
repeat_horizontal: RepeatMode,
repeat_vertical: RepeatMode) {
assert!(unsafe { is_in_main_thread() });
debug_assert!(unsafe { is_in_main_thread() });
let border_details =
BorderDetails::Image(ImageBorder {
image_key: image,
@ -1485,7 +1509,8 @@ pub extern "C" fn wr_dp_push_border_image(state: &mut WrState,
repeat_horizontal: repeat_horizontal.into(),
repeat_vertical: repeat_vertical.into(),
});
let prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
prim_info.is_backface_visible = is_backface_visible;
state.frame_builder
.dl_builder
.push_border(&prim_info,
@ -1497,6 +1522,7 @@ pub extern "C" fn wr_dp_push_border_image(state: &mut WrState,
pub extern "C" fn wr_dp_push_border_gradient(state: &mut WrState,
rect: LayoutRect,
clip: LayoutRect,
is_backface_visible: bool,
widths: BorderWidths,
start_point: LayoutPoint,
end_point: LayoutPoint,
@ -1504,7 +1530,7 @@ pub extern "C" fn wr_dp_push_border_gradient(state: &mut WrState,
stops_count: usize,
extend_mode: ExtendMode,
outset: SideOffsets2D<f32>) {
assert!(unsafe { is_in_main_thread() });
debug_assert!(unsafe { is_in_main_thread() });
let stops_slice = make_slice(stops, stops_count);
let stops_vector = stops_slice.to_owned();
@ -1519,7 +1545,8 @@ pub extern "C" fn wr_dp_push_border_gradient(state: &mut WrState,
extend_mode.into()),
outset: outset.into(),
});
let prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
prim_info.is_backface_visible = is_backface_visible;
state.frame_builder
.dl_builder
.push_border(&prim_info,
@ -1531,6 +1558,7 @@ pub extern "C" fn wr_dp_push_border_gradient(state: &mut WrState,
pub extern "C" fn wr_dp_push_border_radial_gradient(state: &mut WrState,
rect: LayoutRect,
clip: LayoutRect,
is_backface_visible: bool,
widths: BorderWidths,
center: LayoutPoint,
radius: LayoutSize,
@ -1538,7 +1566,7 @@ pub extern "C" fn wr_dp_push_border_radial_gradient(state: &mut WrState,
stops_count: usize,
extend_mode: ExtendMode,
outset: SideOffsets2D<f32>) {
assert!(unsafe { is_in_main_thread() });
debug_assert!(unsafe { is_in_main_thread() });
let stops_slice = make_slice(stops, stops_count);
let stops_vector = stops_slice.to_owned();
@ -1554,7 +1582,8 @@ pub extern "C" fn wr_dp_push_border_radial_gradient(state: &mut WrState,
extend_mode.into()),
outset: outset.into(),
});
let prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
prim_info.is_backface_visible = is_backface_visible;
state.frame_builder
.dl_builder
.push_border(&prim_info,
@ -1566,6 +1595,7 @@ pub extern "C" fn wr_dp_push_border_radial_gradient(state: &mut WrState,
pub extern "C" fn wr_dp_push_linear_gradient(state: &mut WrState,
rect: LayoutRect,
clip: LayoutRect,
is_backface_visible: bool,
start_point: LayoutPoint,
end_point: LayoutPoint,
stops: *const GradientStop,
@ -1573,7 +1603,7 @@ pub extern "C" fn wr_dp_push_linear_gradient(state: &mut WrState,
extend_mode: ExtendMode,
tile_size: LayoutSize,
tile_spacing: LayoutSize) {
assert!(unsafe { is_in_main_thread() });
debug_assert!(unsafe { is_in_main_thread() });
let stops_slice = make_slice(stops, stops_count);
let stops_vector = stops_slice.to_owned();
@ -1584,7 +1614,8 @@ pub extern "C" fn wr_dp_push_linear_gradient(state: &mut WrState,
end_point.into(),
stops_vector,
extend_mode.into());
let prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
prim_info.is_backface_visible = is_backface_visible;
state.frame_builder
.dl_builder
.push_gradient(&prim_info,
@ -1597,6 +1628,7 @@ pub extern "C" fn wr_dp_push_linear_gradient(state: &mut WrState,
pub extern "C" fn wr_dp_push_radial_gradient(state: &mut WrState,
rect: LayoutRect,
clip: LayoutRect,
is_backface_visible: bool,
center: LayoutPoint,
radius: LayoutSize,
stops: *const GradientStop,
@ -1604,7 +1636,7 @@ pub extern "C" fn wr_dp_push_radial_gradient(state: &mut WrState,
extend_mode: ExtendMode,
tile_size: LayoutSize,
tile_spacing: LayoutSize) {
assert!(unsafe { is_in_main_thread() });
debug_assert!(unsafe { is_in_main_thread() });
let stops_slice = make_slice(stops, stops_count);
let stops_vector = stops_slice.to_owned();
@ -1615,7 +1647,8 @@ pub extern "C" fn wr_dp_push_radial_gradient(state: &mut WrState,
radius.into(),
stops_vector,
extend_mode.into());
let prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
prim_info.is_backface_visible = is_backface_visible;
state.frame_builder
.dl_builder
.push_radial_gradient(&prim_info,
@ -1628,6 +1661,7 @@ pub extern "C" fn wr_dp_push_radial_gradient(state: &mut WrState,
pub extern "C" fn wr_dp_push_box_shadow(state: &mut WrState,
rect: LayoutRect,
clip: LayoutRect,
is_backface_visible: bool,
box_bounds: LayoutRect,
offset: LayoutVector2D,
color: ColorF,
@ -1635,9 +1669,10 @@ pub extern "C" fn wr_dp_push_box_shadow(state: &mut WrState,
spread_radius: f32,
border_radius: f32,
clip_mode: BoxShadowClipMode) {
assert!(unsafe { is_in_main_thread() });
debug_assert!(unsafe { is_in_main_thread() });
let prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
let mut prim_info = LayoutPrimitiveInfo::with_clip_rect(rect, clip.into());
prim_info.is_backface_visible = is_backface_visible;
state.frame_builder
.dl_builder
.push_box_shadow(&prim_info,

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

@ -886,6 +886,7 @@ WR_INLINE
void wr_dp_push_border(WrState *aState,
LayoutRect aRect,
LayoutRect aClip,
bool aIsBackfaceVisible,
BorderWidths aWidths,
BorderSide aTop,
BorderSide aRight,
@ -898,6 +899,7 @@ WR_INLINE
void wr_dp_push_border_gradient(WrState *aState,
LayoutRect aRect,
LayoutRect aClip,
bool aIsBackfaceVisible,
BorderWidths aWidths,
LayoutPoint aStartPoint,
LayoutPoint aEndPoint,
@ -911,6 +913,7 @@ WR_INLINE
void wr_dp_push_border_image(WrState *aState,
LayoutRect aRect,
LayoutRect aClip,
bool aIsBackfaceVisible,
BorderWidths aWidths,
WrImageKey aImage,
NinePatchDescriptor aPatch,
@ -923,6 +926,7 @@ WR_INLINE
void wr_dp_push_border_radial_gradient(WrState *aState,
LayoutRect aRect,
LayoutRect aClip,
bool aIsBackfaceVisible,
BorderWidths aWidths,
LayoutPoint aCenter,
LayoutSize aRadius,
@ -936,6 +940,7 @@ WR_INLINE
void wr_dp_push_box_shadow(WrState *aState,
LayoutRect aRect,
LayoutRect aClip,
bool aIsBackfaceVisible,
LayoutRect aBoxBounds,
LayoutVector2D aOffset,
ColorF aColor,
@ -965,6 +970,7 @@ WR_FUNC;
WR_INLINE
void wr_dp_push_iframe(WrState *aState,
LayoutRect aRect,
bool aIsBackfaceVisible,
WrPipelineId aPipelineId)
WR_FUNC;
@ -972,6 +978,7 @@ WR_INLINE
void wr_dp_push_image(WrState *aState,
LayoutRect aBounds,
LayoutRect aClip,
bool aIsBackfaceVisible,
LayoutSize aStretchSize,
LayoutSize aTileSpacing,
ImageRendering aImageRendering,
@ -981,6 +988,7 @@ WR_FUNC;
WR_INLINE
void wr_dp_push_line(WrState *aState,
LayoutRect aClip,
bool aIsBackfaceVisible,
float aBaseline,
float aStart,
float aEnd,
@ -994,6 +1002,7 @@ WR_INLINE
void wr_dp_push_linear_gradient(WrState *aState,
LayoutRect aRect,
LayoutRect aClip,
bool aIsBackfaceVisible,
LayoutPoint aStartPoint,
LayoutPoint aEndPoint,
const GradientStop *aStops,
@ -1007,6 +1016,7 @@ WR_INLINE
void wr_dp_push_radial_gradient(WrState *aState,
LayoutRect aRect,
LayoutRect aClip,
bool aIsBackfaceVisible,
LayoutPoint aCenter,
LayoutSize aRadius,
const GradientStop *aStops,
@ -1020,6 +1030,7 @@ WR_INLINE
void wr_dp_push_rect(WrState *aState,
LayoutRect aRect,
LayoutRect aClip,
bool aIsBackfaceVisible,
ColorF aColor)
WR_FUNC;
@ -1038,13 +1049,15 @@ void wr_dp_push_stacking_context(WrState *aState,
const LayoutTransform *aPerspective,
MixBlendMode aMixBlendMode,
const WrFilterOp *aFilters,
size_t aFilterCount)
size_t aFilterCount,
bool aIsBackfaceVisible)
WR_FUNC;
WR_INLINE
void wr_dp_push_text(WrState *aState,
LayoutRect aBounds,
LayoutRect aClip,
bool aIsBackfaceVisible,
ColorF aColor,
WrFontInstanceKey aFontKey,
const GlyphInstance *aGlyphs,
@ -1056,6 +1069,7 @@ WR_INLINE
void wr_dp_push_text_shadow(WrState *aState,
LayoutRect aBounds,
LayoutRect aClip,
bool aIsBackfaceVisible,
TextShadow aShadow)
WR_FUNC;
@ -1064,6 +1078,7 @@ WR_INLINE
void wr_dp_push_yuv_NV12_image(WrState *aState,
LayoutRect aBounds,
LayoutRect aClip,
bool aIsBackfaceVisible,
WrImageKey aImageKey0,
WrImageKey aImageKey1,
WrYuvColorSpace aColorSpace,
@ -1075,6 +1090,7 @@ WR_INLINE
void wr_dp_push_yuv_interleaved_image(WrState *aState,
LayoutRect aBounds,
LayoutRect aClip,
bool aIsBackfaceVisible,
WrImageKey aImageKey0,
WrYuvColorSpace aColorSpace,
ImageRendering aImageRendering)
@ -1085,6 +1101,7 @@ WR_INLINE
void wr_dp_push_yuv_planar_image(WrState *aState,
LayoutRect aBounds,
LayoutRect aClip,
bool aIsBackfaceVisible,
WrImageKey aImageKey0,
WrImageKey aImageKey1,
WrImageKey aImageKey2,

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

@ -251,6 +251,7 @@ nsDisplayButtonBoxShadowOuter::CreateWebRenderCommands(
aBuilder.PushBoxShadow(deviceBoxRect,
deviceClipRect,
!BackfaceIsHidden(),
deviceBoxRect,
wr::ToLayoutVector2D(shadowOffset),
wr::ToColorF(shadowColor),

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

@ -483,6 +483,7 @@ BulletRenderer::CreateWebRenderCommandsForImage(nsDisplayItem* aItem,
aBuilder.PushImage(dest,
dest,
!aItem->BackfaceIsHidden(),
wr::ImageRendering::Auto,
key.value());
}
@ -524,7 +525,7 @@ BulletRenderer::CreateWebRenderCommandsForText(nsDisplayItem* aItem,
for (layers::GlyphArray& glyphs : mGlyphs) {
aManager->WrBridge()->PushGlyphs(aBuilder, glyphs.glyphs(), mFont,
glyphs.color().value(),
aSc, destRect, destRect);
aSc, destRect, destRect, !aItem->BackfaceIsHidden());
}
}

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

@ -330,6 +330,7 @@ nsDisplayCanvasBackgroundColor::CreateWebRenderCommands(mozilla::wr::DisplayList
wr::LayoutRect transformedRect = aSc.ToRelativeLayoutRect(rect);
aBuilder.PushRect(transformedRect,
transformedRect,
!BackfaceIsHidden(),
wr::ToColorF(ToDeviceColor(mColor)));
return true;
}

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

@ -175,7 +175,7 @@ public:
// That happens in WebRenderCompositableHolder.
wr::LayoutRect r = aSc.ToRelativeLayoutRect(bounds);
aBuilder.PushIFrame(r, data->GetPipelineId().ref());
aBuilder.PushIFrame(r, !BackfaceIsHidden(), data->GetPipelineId().ref());
gfx::Matrix4x4 scTransform;
if (data->NeedsYFlip()) {

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

@ -5202,6 +5202,7 @@ nsDisplayText::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder
LayerRect clipRect = LayerRect::FromUnknownRect(layoutClipRect.ToUnknownRect());
wr::LayoutRect wrClipRect = aSc.ToRelativeLayoutRect(clipRect); // wr::ToLayoutRect(clipRect);
wr::LayoutRect wrBoundsRect = aSc.ToRelativeLayoutRect(boundsRect); //wr::ToLayoutRect(boundsRect);
bool backfaceVisible = !BackfaceIsHidden();
// Drawing order: selections, shadows,
// underline, overline, [grouped in one array]
@ -5211,7 +5212,7 @@ nsDisplayText::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder
for (auto& part : mTextDrawer->GetParts()) {
if (part.selection) {
auto selection = part.selection.value();
aBuilder.PushRect(selection.rect, wrClipRect, selection.color);
aBuilder.PushRect(selection.rect, wrClipRect, backfaceVisible, selection.color);
}
}
@ -5219,11 +5220,11 @@ nsDisplayText::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder
// WR takes the shadows in CSS-order (reverse of rendering order),
// because the drawing of a shadow actually occurs when it's popped.
for (const wr::TextShadow& shadow : part.shadows) {
aBuilder.PushTextShadow(wrBoundsRect, wrClipRect, shadow);
aBuilder.PushTextShadow(wrBoundsRect, wrClipRect, backfaceVisible, shadow);
}
for (const wr::Line& decoration : part.beforeDecorations) {
aBuilder.PushLine(wrClipRect, decoration);
aBuilder.PushLine(wrClipRect, backfaceVisible, decoration);
}
for (const mozilla::layout::TextRunFragment& text : part.text) {
@ -5234,11 +5235,12 @@ nsDisplayText::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder
color.a *= mOpacity;
aManager->WrBridge()->PushGlyphs(aBuilder, text.glyphs, text.font,
color, aSc, boundsRect, clipRect);
color, aSc, boundsRect, clipRect,
backfaceVisible);
}
for (const wr::Line& decoration : part.afterDecorations) {
aBuilder.PushLine(wrClipRect, decoration);
aBuilder.PushLine(wrClipRect, backfaceVisible, decoration);
}
for (size_t i = 0; i < part.shadows.Length(); ++i) {

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

@ -397,6 +397,7 @@ nsDisplayRemote::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuild
visible += mOffset;
aBuilder.PushIFrame(aSc.ToRelativeLayoutRect(visible),
!BackfaceIsHidden(),
mozilla::wr::AsPipelineId(GetRemoteLayersId()));
return true;

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

@ -786,7 +786,8 @@ ConstructBorderRenderer(nsPresContext* aPresContext,
bgRadii,
borderColors,
aStyleBorder.mBorderColors.get(),
bgColor);
bgColor,
!aForFrame->BackfaceIsHidden());
}
@ -1065,7 +1066,8 @@ nsCSSRendering::CreateBorderRendererForOutline(nsPresContext* aPresContext,
outlineRadii,
outlineColors,
nullptr,
bgColor);
bgColor,
!aForFrame->BackfaceIsHidden());
return Some(br);
}
@ -1127,6 +1129,9 @@ nsCSSRendering::PaintFocus(nsPresContext* aPresContext,
// something that CSS can style, this function will then have access
// to a style context and can use the same logic that PaintBorder
// and PaintOutline do.)
//
// WebRender layers-free mode don't use PaintFocus function. Just assign
// the backface-visibility to true for this case.
nsCSSBorderRenderer br(aPresContext,
nullptr,
aDrawTarget,
@ -1137,7 +1142,8 @@ nsCSSRendering::PaintFocus(nsPresContext* aPresContext,
focusRadii,
focusColors,
nullptr,
NS_RGB(255, 0, 0));
NS_RGB(255, 0, 0),
true);
br.DrawBorders();
PrintAsStringNewline();

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

@ -176,14 +176,16 @@ nsCSSBorderRenderer::nsCSSBorderRenderer(nsPresContext* aPresContext,
RectCornerRadii& aBorderRadii,
const nscolor* aBorderColors,
const nsBorderColors* aCompositeColors,
nscolor aBackgroundColor)
nscolor aBackgroundColor,
bool aBackfaceIsVisible)
: mPresContext(aPresContext),
mDocument(aDocument),
mDrawTarget(aDrawTarget),
mDirtyRect(aDirtyRect),
mOuterRect(aOuterRect),
mBorderRadii(aBorderRadii),
mBackgroundColor(aBackgroundColor)
mBackgroundColor(aBackgroundColor),
mBackfaceIsVisible(aBackfaceIsVisible)
{
PodCopy(mBorderStyles, aBorderStyles, 4);
PodCopy(mBorderWidths, aBorderWidths, 4);
@ -3617,6 +3619,7 @@ nsCSSBorderRenderer::CreateWebRenderCommands(wr::DisplayListBuilder& aBuilder,
Range<const wr::BorderSide> wrsides(side, 4);
aBuilder.PushBorder(transformedRect,
transformedRect,
mBackfaceIsVisible,
wr::ToBorderWidths(mBorderWidths[0], mBorderWidths[1], mBorderWidths[2], mBorderWidths[3]),
wrsides,
borderRadius);

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

@ -101,7 +101,8 @@ public:
RectCornerRadii& aBorderRadii,
const nscolor* aBorderColors,
const nsBorderColors* aCompositeColors,
nscolor aBackgroundColor);
nscolor aBackgroundColor,
bool aBackfaceIsVisible);
// draw the entire border
void DrawBorders();
@ -164,6 +165,7 @@ private:
bool mOneUnitBorder;
bool mNoBorderRadius;
bool mAvoidStroke;
bool mBackfaceIsVisible;
// For all the sides in the bitmask, would they be rendered
// in an identical color and style?

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

@ -1031,6 +1031,7 @@ nsCSSGradientRenderer::BuildWebRenderDisplayItems(wr::DisplayListBuilder& aBuild
const nsRect& aFillArea,
const nsSize& aRepeatSize,
const CSSIntRect& aSrc,
bool aIsBackfaceVisible,
float aOpacity)
{
if (aDest.IsEmpty() || aFillArea.IsEmpty()) {
@ -1085,6 +1086,7 @@ nsCSSGradientRenderer::BuildWebRenderDisplayItems(wr::DisplayListBuilder& aBuild
aBuilder.PushLinearGradient(
wrGradientBounds,
wrClipBounds,
aIsBackfaceVisible,
mozilla::wr::ToLayoutPoint(lineStart),
mozilla::wr::ToLayoutPoint(lineEnd),
stops,
@ -1098,6 +1100,7 @@ nsCSSGradientRenderer::BuildWebRenderDisplayItems(wr::DisplayListBuilder& aBuild
aBuilder.PushRadialGradient(
wrGradientBounds,
wrClipBounds,
aIsBackfaceVisible,
mozilla::wr::ToLayoutPoint(lineStart),
mozilla::wr::ToLayoutSize(gradientRadius),
stops,

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

@ -87,6 +87,7 @@ public:
const nsRect& aFill,
const nsSize& aRepeatSize,
const mozilla::CSSIntRect& aSrc,
bool aIsBackfaceVisible,
float aOpacity = 1.0);
private:

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

@ -2946,6 +2946,7 @@ nsDisplaySolidColor::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aB
aBuilder.PushRect(transformedRect,
transformedRect,
!BackfaceIsHidden(),
wr::ToColorF(ToDeviceColor(mColor)));
return true;
@ -2997,6 +2998,7 @@ nsDisplaySolidColorRegion::CreateWebRenderCommands(mozilla::wr::DisplayListBuild
wr::LayoutRect transformedRect = aSc.ToRelativeLayoutRect(layerRects);
aBuilder.PushRect(transformedRect,
transformedRect,
!BackfaceIsHidden(),
wr::ToColorF(ToDeviceColor(mColor)));
}
@ -4266,6 +4268,7 @@ nsDisplayBackgroundColor::CreateWebRenderCommands(mozilla::wr::DisplayListBuilde
aBuilder.PushRect(transformedRect,
transformedRect,
!BackfaceIsHidden(),
wr::ToColorF(ToDeviceColor(mColor)));
return true;
@ -4785,11 +4788,13 @@ nsDisplayCaret::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilde
// Note, WR will pixel snap anything that is layout aligned.
aBuilder.PushRect(caret,
caret,
!BackfaceIsHidden(),
wr::ToColorF(color));
if (!devHookRect.IsEmpty()) {
aBuilder.PushRect(hook,
hook,
!BackfaceIsHidden(),
wr::ToColorF(color));
}
return true;
@ -5088,6 +5093,7 @@ nsDisplayBorder::CreateBorderImageWebRenderCommands(mozilla::wr::DisplayListBuil
aBuilder.PushBorderImage(dest,
clip,
!BackfaceIsHidden(),
wr::ToBorderWidths(widths[0], widths[1], widths[2], widths[3]),
key.value(),
wr::ToNinePatchDescriptor(
@ -5121,6 +5127,7 @@ nsDisplayBorder::CreateBorderImageWebRenderCommands(mozilla::wr::DisplayListBuil
aBuilder.PushBorderGradient(dest,
clip,
!BackfaceIsHidden(),
wr::ToBorderWidths(widths[0], widths[1], widths[2], widths[3]),
wr::ToLayoutPoint(startPoint),
wr::ToLayoutPoint(endPoint),
@ -5130,6 +5137,7 @@ nsDisplayBorder::CreateBorderImageWebRenderCommands(mozilla::wr::DisplayListBuil
} else {
aBuilder.PushBorderRadialGradient(dest,
clip,
!BackfaceIsHidden(),
wr::ToBorderWidths(widths[0], widths[1], widths[2], widths[3]),
wr::ToLayoutPoint(lineStart),
wr::ToLayoutSize(gradientRadius),
@ -5452,6 +5460,7 @@ nsDisplayBoxShadowOuter::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder
aBuilder.PushBoxShadow(deviceBoxRect,
deviceClipRect,
!BackfaceIsHidden(),
deviceBoxRect,
wr::ToLayoutVector2D(shadowOffset),
wr::ToColorF(shadowColor),
@ -5624,6 +5633,7 @@ nsDisplayBoxShadowInner::CreateInsetBoxShadowWebRenderCommands(mozilla::wr::Disp
aBuilder.PushBoxShadow(wr::ToLayoutRect(deviceBoxRect),
deviceClipRect,
!aFrame->BackfaceIsHidden(),
wr::ToLayoutRect(deviceBoxRect),
wr::ToLayoutVector2D(shadowOffset),
wr::ToColorF(shadowColor),
@ -7943,7 +7953,9 @@ nsDisplayTransform::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBu
nullptr,
transformForSC,
nullptr,
filters);
filters,
gfx::CompositionOp::OP_OVER,
!BackfaceIsHidden());
return mStoredList.CreateWebRenderCommands(aBuilder, aResources, sc,
aManager, aDisplayListBuilder);
@ -8548,7 +8560,9 @@ nsDisplayPerspective::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& a
nullptr,
&transformForSC,
&perspectiveMatrix,
filters);
filters,
gfx::CompositionOp::OP_OVER,
!BackfaceIsHidden());
return mList.CreateWebRenderCommands(aBuilder, aResources, sc,
aManager, aDisplayListBuilder);

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

@ -615,7 +615,8 @@ nsImageRenderer::BuildWebRenderDisplayItems(nsPresContext* aPresContext,
nsCSSGradientRenderer renderer =
nsCSSGradientRenderer::Create(aPresContext, mGradientData, mSize);
renderer.BuildWebRenderDisplayItems(aBuilder, aSc, aLayer, aDest, aFill, aRepeatSize, aSrc, aOpacity);
renderer.BuildWebRenderDisplayItems(aBuilder, aSc, aLayer, aDest, aFill,
aRepeatSize, aSrc, !aItem->BackfaceIsHidden(), aOpacity);
break;
}
case eStyleImageType_Image:
@ -659,7 +660,7 @@ nsImageRenderer::BuildWebRenderDisplayItems(nsPresContext* aPresContext,
aRepeatSize - aDest.Size(), appUnitsPerDevPixel);
SamplingFilter samplingFilter = nsLayoutUtils::GetSamplingFilterForFrame(mForFrame);
aBuilder.PushImage(fill, clip,
aBuilder.PushImage(fill, clip, !aItem->BackfaceIsHidden(),
wr::ToLayoutSize(destRect.Size()), wr::ToLayoutSize(gapSize),
wr::ToImageRendering(samplingFilter), key.value());
break;

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

@ -0,0 +1,63 @@
<!DOCTYPE html>
<html>
<head>
<title>Table border collapse</title>
<style>
table {
border-collapse: collapse;
}
tr.odd {
background-color: LightCyan;
}
tr.even {
background-color: LightSkyBlue;
}
td {
border: 5px solid DarkBlue;
}
.inner td {
border: 5px solid red;
}
.inner tr:first-child td {
border-top: 5px solid DarkBlue;
}
.inner tr td:first-child {
border-left: 5px solid DarkBlue;
}
.inner tr:last-child td {
border-bottom: 5px solid DarkBlue;
}
.inner tr td:last-child {
border-right: 5px solid DarkBlue;
}
div {
height: 10px;
}
</style>
</head>
<body>
<div></div>
<table>
<caption></caption>
<tr class="odd">
<td>Cell 1-1</td>
<td>Cell 1-2</td>
</tr>
<tr class="even">
<td>Cell 2-1</td>
<td>Cell 2-2
<table class="inner">
<tr class="odd">
<td>Cell 2-2/1-1</td>
<td>Cell 2-2/1-2</td>
</tr>
<tr class="even">
<td>Cell 2-2/2-1</td>
<td>Cell 2-2/2-2</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

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

@ -0,0 +1,47 @@
<!DOCTYPE html>
<html>
<head>
<title>Table border collapse</title>
<style>
table {
border-collapse: collapse;
}
tr.odd {
background-color: LightCyan;
}
tr.even {
background-color: LightSkyBlue;
}
td {
border: 5px solid DarkBlue;
}
div {
height: 10px;
}
</style>
</head>
<body>
<div></div>
<table>
<tr class="odd">
<td>Cell 1-1</td>
<td>Cell 1-2</td>
</tr>
<tr class="even">
<td>Cell 2-1</td>
<td>Cell 2-2
<table>
<tr class="odd">
<td>Cell 2-2/1-1</td>
<td>Cell 2-2/1-2</td>
</tr>
<tr class="even">
<td>Cell 2-2/2-1</td>
<td>Cell 2-2/2-2</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

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

@ -0,0 +1,47 @@
<!DOCTYPE html>
<html>
<head>
<title>Table border collapse</title>
<style>
table {
border-collapse: collapse;
}
tr.odd {
background-color: LightCyan;
}
tr.even {
background-color: LightSkyBlue;
}
td {
border: 5px solid DarkBlue;
}
caption {
height: 10px
}
</style>
</head>
<body>
<table>
<caption></caption>
<tr class="odd">
<td>Cell 1-1</td>
<td>Cell 1-2</td>
</tr>
<tr class="even">
<td>Cell 2-1</td>
<td>Cell 2-2
<table>
<tr class="odd">
<td>Cell 2-2/1-1</td>
<td>Cell 2-2/1-2</td>
</tr>
<tr class="even">
<td>Cell 2-2/2-1</td>
<td>Cell 2-2/2-2</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>

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

@ -4,6 +4,8 @@
== bug1375518-4.html bug1375518-4-ref.html
== bug1375518-5.html bug1375518-5-ref.html
== bug1379306.html bug1379306-ref.html
== bug1394226.html bug1394226-ref.html
!= bug1394226.html bug1394226-notref.html
== bc_dyn_cell1.html bc_dyn_cell1_ref.html
== bc_dyn_cell2.html bc_dyn_cell2_ref.html
== bc_dyn_cell3.html bc_dyn_cell3_ref.html

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

@ -39,9 +39,9 @@ fuzzy-if(skiaContent,1,4) == matrix3d-1a.html matrix3d-1-ref.html
== rotate3d-1a.html rotatex-1-ref.html
== rotate3d-2a.html rotatey-1-ref.html
!= backface-visibility-1a.html about:blank
fails-if(webrender) == backface-visibility-1b.html about:blank
fails-if(webrender) == backface-visibility-1c.html about:blank
fuzzy-if(winWidget&&!layersGPUAccelerated,1,251) fails-if(webrender) == backface-visibility-2.html backface-visibility-2-ref.html
== backface-visibility-1b.html about:blank
== backface-visibility-1c.html about:blank
fuzzy-if(winWidget&&!layersGPUAccelerated,1,251) == backface-visibility-2.html backface-visibility-2-ref.html
== backface-visibility-3.html backface-visibility-3-ref.html
fails-if(webrender) == perspective-clipping-1.html perspective-clipping-1-ref.html
== perspective-clipping-2.html perspective-clipping-2-ref.html

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

@ -1605,6 +1605,8 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
}
}
aFrame->DisplayOutline(aBuilder, aLists);
aTraversal(aBuilder, aFrame, aLists);
if (isVisible) {
@ -1625,8 +1627,6 @@ nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
}
}
}
aFrame->DisplayOutline(aBuilder, aLists);
}
// table paint code is concerned primarily with borders and bg color
@ -6499,6 +6499,7 @@ struct BCBorderParameters
nscoord mStartBevelOffset;
mozilla::Side mEndBevelSide;
nscoord mEndBevelOffset;
bool mBackfaceIsVisible;
};
struct BCBlockDirSeg
@ -7326,6 +7327,7 @@ BCBlockDirSeg::BuildBorderParameters(BCPaintBorderIterator& aIter,
result.mBorderStyle = NS_STYLE_BORDER_STYLE_SOLID;
result.mBorderColor = 0xFFFFFFFF;
result.mBGColor = aIter.mTableBgColor;
result.mBackfaceIsVisible = true;
// All the tables frames have the same presContext, so we just use any one
// that exists here:
@ -7382,6 +7384,7 @@ BCBlockDirSeg::BuildBorderParameters(BCPaintBorderIterator& aIter,
}
if (owner) {
::GetPaintStyleInfo(owner, aIter.mTableWM, side, &result.mBorderStyle, &result.mBorderColor);
result.mBackfaceIsVisible = !owner->BackfaceIsHidden();
}
BCPixelSize smallHalf, largeHalf;
DivideBCBorderSize(mWidth, smallHalf, largeHalf);
@ -7482,6 +7485,7 @@ BCBlockDirSeg::CreateWebRenderCommands(BCPaintBorderIterator& aIter,
Range<const wr::BorderSide> wrsides(wrSide, 4);
aBuilder.PushBorder(transformedRect,
transformedRect,
param->mBackfaceIsVisible,
borderWidths,
wrsides,
borderRadii);
@ -7594,6 +7598,7 @@ BCInlineDirSeg::BuildBorderParameters(BCPaintBorderIterator& aIter)
nsIFrame* cell = mFirstCell;
nsIFrame* col;
nsIFrame* owner = nullptr;
result.mBackfaceIsVisible = true;
// All the tables frames have the same presContext, so we just use any one
// that exists here:
@ -7652,6 +7657,7 @@ BCInlineDirSeg::BuildBorderParameters(BCPaintBorderIterator& aIter)
}
if (owner) {
::GetPaintStyleInfo(owner, aIter.mTableWM, side, &result.mBorderStyle, &result.mBorderColor);
result.mBackfaceIsVisible = !owner->BackfaceIsHidden();
}
BCPixelSize smallHalf, largeHalf;
DivideBCBorderSize(mWidth, smallHalf, largeHalf);
@ -7740,6 +7746,7 @@ BCInlineDirSeg::CreateWebRenderCommands(BCPaintBorderIterator& aIter,
Range<const wr::BorderSide> wrsides(wrSide, 4);
aBuilder.PushBorder(transformedRect,
transformedRect,
param->mBackfaceIsVisible,
borderWidths,
wrsides,
borderRadii);

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

@ -187,8 +187,11 @@ nsTableWrapperFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
BuildDisplayListForChild(aBuilder, mCaptionFrames.FirstChild(), captionSet);
// Now we have to sort everything by content order, since the caption
// may be somewhere inside the table
set.BlockBorderBackgrounds()->SortByContentOrder(GetContent());
// may be somewhere inside the table.
// We don't sort BlockBorderBackgrounds and BorderBackgrounds because the
// display items in those lists should stay out of content order in order to
// follow the rules in https://www.w3.org/TR/CSS21/zindex.html#painting-order
// and paint the caption background after all of the rest.
set.Floats()->SortByContentOrder(GetContent());
set.Content()->SortByContentOrder(GetContent());
set.PositionedDescendants()->SortByContentOrder(GetContent());

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

@ -460,7 +460,7 @@ nsImageBoxFrame::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuild
LayoutDeviceSize gapSize(0, 0);
SamplingFilter sampleFilter = nsLayoutUtils::GetSamplingFilterForFrame(aItem->Frame());
aBuilder.PushImage(fill, fill,
aBuilder.PushImage(fill, fill, !BackfaceIsHidden(),
wr::ToLayoutSize(fillRect.Size()), wr::ToLayoutSize(gapSize),
wr::ToImageRendering(sampleFilter), key.value());

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

@ -236,7 +236,12 @@
'defines': [
"DONT_HAVE_ETHTOOL_SPEED_HI",
]
}]
}],
['libfuzzer == 1', {
'cflags_mozilla': [
'-fsanitize-coverage=trace-pc-guard',
],
}],
],
}]
}

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

@ -303,10 +303,8 @@ printf_stderr(const char *fmt, ...)
}
#ifdef _M_IX86
typedef MOZ_NORETURN_PTR void (__fastcall* BaseThreadInitThunk_func)(BOOL aIsInitialThread, void* aStartAddress, void* aThreadParam);
static BaseThreadInitThunk_func stub_BaseThreadInitThunk = nullptr;
#endif
typedef NTSTATUS (NTAPI *LdrLoadDll_func) (PWCHAR filePath, PULONG flags, PUNICODE_STRING moduleFileName, PHANDLE handle);
static LdrLoadDll_func stub_LdrLoadDll;
@ -788,7 +786,6 @@ continue_loading:
return stub_LdrLoadDll(filePath, flags, moduleFileName, handle);
}
#ifdef _M_IX86
static bool
ShouldBlockThread(void* aStartAddress)
{
@ -824,8 +821,6 @@ patched_BaseThreadInitThunk(BOOL aIsInitialThread, void* aStartAddress,
stub_BaseThreadInitThunk(aIsInitialThread, aStartAddress, aThreadParam);
}
#endif // _M_IX86
static WindowsDllInterceptor NtDllIntercept;
static WindowsDllInterceptor Kernel32Intercept;
@ -875,8 +870,6 @@ DllBlocklist_Initialize(uint32_t aInitFlags)
}
#endif
#ifdef _M_IX86 // Minimize impact. Crashes in BaseThreadInitThunk are more frequent on x86
// Bug 1361410: WRusr.dll will overwrite our hook and cause a crash.
// Workaround: If we detect WRusr.dll, don't hook.
if (!GetModuleHandleW(L"WRusr.dll")) {
@ -888,7 +881,6 @@ DllBlocklist_Initialize(uint32_t aInitFlags)
#endif
}
}
#endif // _M_IX86
}
MFBT_API void

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

@ -91,8 +91,7 @@ BHRTelemetryService.prototype = Object.freeze({
// when running tests so that we run as much of BHR as possible (to catch
// errors) while avoiding timeouts caused by invoking `pingsender` during
// testing.
if (Services.prefs.getBoolPref("toolkit.telemetry.bhrPing.enabled", false) &&
this.payload.hangs.length > 0) {
if (Services.prefs.getBoolPref("toolkit.telemetry.bhrPing.enabled", false)) {
this.payload.timeSinceLastPing = new Date() - this.startTime;
TelemetryController.submitExternalPing("bhr", this.payload, {
addEnvironment: true,

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

@ -2481,7 +2481,7 @@
},
"TLS_EARLY_DATA_NEGOTIATED": {
"record_in_processes": ["main", "content"],
"expires_in_version": "58",
"expires_in_version": "62",
"kind": "enumerated",
"n_values": 3,
"description": "Sending TLS early data was possible: 0 - not possible, 1 - possible but not used, 2 - possible and used.",
@ -2490,7 +2490,7 @@
},
"TLS_EARLY_DATA_ACCEPTED": {
"record_in_processes": ["main", "content"],
"expires_in_version": "58",
"expires_in_version": "62",
"kind": "boolean",
"description": "TLS early data was used and it was accepted (true) or rejected (false) by the remote host.",
"alert_emails": ["necko@mozilla.com"],
@ -2498,7 +2498,7 @@
},
"TLS_EARLY_DATA_BYTES_WRITTEN": {
"record_in_processes": ["main", "content"],
"expires_in_version": "58",
"expires_in_version": "62",
"kind": "exponential",
"high": 60000,
"n_buckets": 100,

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

@ -13,7 +13,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset='utf-8' />
<title>&mozilla.title.15.1;</title>
<title>&mozilla.title.11.14;</title>
<style>
html {
@ -54,11 +54,11 @@ a {
<section>
<p id="moztext">
&mozilla.quote.15.1;
&mozilla.quote.11.14;
</p>
<p id="from">
&mozilla.from.15.1;
&mozilla.from.11.14;
</p>
</section>

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

@ -2,13 +2,14 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!ENTITY mozilla.title.15.1
'The Book of Mozilla, 15:1'>
<!ENTITY mozilla.title.11.14
'The Book of Mozilla, 11:14'>
<!ENTITY mozilla.quote.15.1
'The <em>twins</em> of Mammon quarrelled. Their warring plunged the world into a <em>new darkness</em>, and the beast
abhorred the darkness. So it began to move <em>swiftly</em>, and grew more powerful, and went forth and multiplied.
And the beasts brought <em>fire</em> and light to the darkness.'>
<!ENTITY mozilla.quote.11.14
'The Beast adopted <em>new raiment</em> and studied the ways of <em>Time</em> and <em>Space</em>
and <em>Light</em> and the <em>Flow</em> of energy through the Universe. From its studies,
the Beast fashioned new structures from <em>oxidised metal</em> and proclaimed their glories.
And the Beasts followers rejoiced, finding renewed purpose in these <em>teachings</em>.'>
<!ENTITY mozilla.from.15.1
'from <strong>The Book of Mozilla,</strong> 15:1'>
<!ENTITY mozilla.from.11.14
'from <strong>The Book of Mozilla,</strong> 11:14'>

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

@ -548,9 +548,7 @@ int main()
TestHook(TestSetCursorPos, "user32.dll", "SetCursorPos") &&
TestHook(TestTlsAlloc, "kernel32.dll", "TlsAlloc") &&
TestHook(TestTlsFree, "kernel32.dll", "TlsFree") &&
#ifdef _M_IX86
TestDetour("kernel32.dll", "BaseThreadInitThunk") &&
#endif
TestDetour("ntdll.dll", "LdrLoadDll")) {
printf("TEST-PASS | WindowsDllInterceptor | all checks passed\n");
return 0;

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

@ -2122,7 +2122,7 @@ nsChildView::AddWindowOverlayWebRenderCommands(layers::WebRenderBridgeChild* aWr
wr::LayoutRect rect = wr::ToLayoutRect(mTitlebarRect);
aBuilder.PushImage(wr::LayoutRect{ rect.origin, { float(size.width), float(size.height) } },
rect, wr::ImageRendering::Auto, *mTitlebarImageKey);
rect, true, wr::ImageRendering::Auto, *mTitlebarImageKey);
}
}

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

@ -105,6 +105,13 @@ NS_IMPL_CI_INTERFACE_GETTER(nsThreadManager, nsIThreadManager)
//-----------------------------------------------------------------------------
/*static*/ nsThreadManager&
nsThreadManager::get()
{
static nsThreadManager sInstance;
return sInstance;
}
nsresult
nsThreadManager::Init()
{

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

@ -20,11 +20,7 @@ public:
NS_DECL_ISUPPORTS
NS_DECL_NSITHREADMANAGER
static nsThreadManager& get()
{
static nsThreadManager sInstance;
return sInstance;
}
static nsThreadManager& get();
nsresult Init();