diff --git a/.hgignore b/.hgignore index a79e9f56435d..62b64d72e658 100644 --- a/.hgignore +++ b/.hgignore @@ -136,6 +136,7 @@ GPATH ^testing/talos/talos/tests/tp5n ^testing/talos/talos/tests/devtools/damp.manifest.develop ^talos-venv +^py3venv # Ignore files created when running a reftest. ^lextab.py$ diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js index c23d9676aa4c..3b33a7e40a99 100644 --- a/browser/components/nsBrowserGlue.js +++ b/browser/components/nsBrowserGlue.js @@ -2490,8 +2490,6 @@ ContentPermissionPrompt.prototype = { var DefaultBrowserCheck = { get OPTIONPOPUP() { return "defaultBrowserNotificationPopup" }, - _setAsDefaultTimer: null, - _setAsDefaultButtonClickStartTime: 0, closePrompt(aNode) { if (this._notification) { @@ -2514,33 +2512,6 @@ var DefaultBrowserCheck = { } try { ShellService.setDefaultBrowser(claimAllTypes, false); - - if (this._setAsDefaultTimer) { - this._setAsDefaultTimer.cancel(); - } - - this._setAsDefaultButtonClickStartTime = Math.floor(Date.now() / 1000); - this._setAsDefaultTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); - this._setAsDefaultTimer.init(() => { - let isDefault = false; - let isDefaultError = false; - try { - isDefault = ShellService.isDefaultBrowser(true, false); - } catch (ex) { - isDefaultError = true; - } - - let now = Math.floor(Date.now() / 1000); - let runTime = now - this._setAsDefaultButtonClickStartTime; - if (isDefault || runTime > 600) { - this._setAsDefaultTimer.cancel(); - this._setAsDefaultTimer = null; - Services.telemetry.getHistogramById("BROWSER_SET_DEFAULT_TIME_TO_COMPLETION_SECONDS") - .add(runTime); - } - Services.telemetry.getHistogramById("BROWSER_IS_USER_DEFAULT_ERROR") - .add(isDefaultError); - }, 1000, Ci.nsITimer.TYPE_REPEATING_SLACK); } catch (ex) { setAsDefaultError = true; Cu.reportError(ex); diff --git a/browser/components/preferences/in-content-new/preferences.xul b/browser/components/preferences/in-content-new/preferences.xul index 6b5466597f4e..0748e3688c54 100644 --- a/browser/components/preferences/in-content-new/preferences.xul +++ b/browser/components/preferences/in-content-new/preferences.xul @@ -217,23 +217,22 @@ - - - - - + - - diff --git a/devtools/client/storage/test/browser.ini b/devtools/client/storage/test/browser.ini index 93f0ae64afac..761d261a1e29 100644 --- a/devtools/client/storage/test/browser.ini +++ b/devtools/client/storage/test/browser.ini @@ -24,7 +24,8 @@ support-files = !/devtools/client/framework/test/shared-head.js [browser_storage_basic.js] -[browser_storage_basic_usercontextid.js] +[browser_storage_basic_usercontextid_1.js] +[browser_storage_basic_usercontextid_2.js] tags = usercontextid [browser_storage_basic_with_fragment.js] [browser_storage_cache_delete.js] diff --git a/devtools/client/storage/test/browser_storage_basic_usercontextid_1.js b/devtools/client/storage/test/browser_storage_basic_usercontextid_1.js new file mode 100644 index 000000000000..0c24be26bc35 --- /dev/null +++ b/devtools/client/storage/test/browser_storage_basic_usercontextid_1.js @@ -0,0 +1,118 @@ +/* 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/. */ + +// A test to check that the storage inspector is working correctly without +// userContextId. + +"use strict"; + +const testCases = [ + [ + ["cookies", "http://test1.example.org"], + [ + getCookieId("c1", "test1.example.org", "/browser"), + getCookieId("cs2", ".example.org", "/"), + getCookieId("c3", "test1.example.org", "/"), + getCookieId("uc1", ".example.org", "/") + ] + ], + [ + ["cookies", "https://sectest1.example.org"], + [ + getCookieId("uc1", ".example.org", "/"), + getCookieId("cs2", ".example.org", "/"), + getCookieId("sc1", "sectest1.example.org", "/browser/devtools/client/storage/test/") + ] + ], + [["localStorage", "http://test1.example.org"], + ["ls1", "ls2"]], + [["localStorage", "http://sectest1.example.org"], + ["iframe-u-ls1"]], + [["localStorage", "https://sectest1.example.org"], + ["iframe-s-ls1"]], + [["sessionStorage", "http://test1.example.org"], + ["ss1"]], + [["sessionStorage", "http://sectest1.example.org"], + ["iframe-u-ss1", "iframe-u-ss2"]], + [["sessionStorage", "https://sectest1.example.org"], + ["iframe-s-ss1"]], + [["indexedDB", "http://test1.example.org"], + ["idb1 (default)", "idb2 (default)"]], + [["indexedDB", "http://test1.example.org", "idb1 (default)"], + ["obj1", "obj2"]], + [["indexedDB", "http://test1.example.org", "idb2 (default)"], + ["obj3"]], + [["indexedDB", "http://test1.example.org", "idb1 (default)", "obj1"], + [1, 2, 3]], + [["indexedDB", "http://test1.example.org", "idb1 (default)", "obj2"], + [1]], + [["indexedDB", "http://test1.example.org", "idb2 (default)", "obj3"], + []], + [["indexedDB", "http://sectest1.example.org"], + []], + [["indexedDB", "https://sectest1.example.org"], + ["idb-s1 (default)", "idb-s2 (default)"]], + [["indexedDB", "https://sectest1.example.org", "idb-s1 (default)"], + ["obj-s1"]], + [["indexedDB", "https://sectest1.example.org", "idb-s2 (default)"], + ["obj-s2"]], + [["indexedDB", "https://sectest1.example.org", "idb-s1 (default)", "obj-s1"], + [6, 7]], + [["indexedDB", "https://sectest1.example.org", "idb-s2 (default)", "obj-s2"], + [16]], + [["Cache", "http://test1.example.org", "plop"], + [MAIN_DOMAIN + "404_cached_file.js", + MAIN_DOMAIN + "browser_storage_basic.js"]], +]; + +/** + * Test that the desired number of tree items are present + */ +function testTree(tests) { + let doc = gPanelWindow.document; + for (let [item] of tests) { + ok(doc.querySelector("[data-id='" + JSON.stringify(item) + "']"), + "Tree item " + item[0] + " should be present in the storage tree"); + } +} + +/** + * Test that correct table entries are shown for each of the tree item + */ +function* testTables(tests) { + let doc = gPanelWindow.document; + // Expand all nodes so that the synthesized click event actually works + gUI.tree.expandAll(); + + // First tree item is already selected so no clicking and waiting for update + for (let id of tests[0][1]) { + ok(doc.querySelector(".table-widget-cell[data-id='" + id + "']"), + "Table item " + id + " should be present"); + } + + // Click rest of the tree items and wait for the table to be updated + for (let [treeItem, items] of tests.slice(1)) { + yield selectTreeItem(treeItem); + + // Check whether correct number of items are present in the table + is(doc.querySelectorAll( + ".table-widget-wrapper:first-of-type .table-widget-cell" + ).length, items.length, "Number of items in table is correct"); + + // Check if all the desired items are present in the table + for (let id of items) { + ok(doc.querySelector(".table-widget-cell[data-id='" + id + "']"), + "Table item " + id + " should be present"); + } + } +} + +add_task(function* () { + yield openTabAndSetupStorage(MAIN_DOMAIN + "storage-listings.html"); + + testTree(testCases); + yield testTables(testCases); + + yield finishTests(); +}); diff --git a/devtools/client/storage/test/browser_storage_basic_usercontextid.js b/devtools/client/storage/test/browser_storage_basic_usercontextid_2.js similarity index 65% rename from devtools/client/storage/test/browser_storage_basic_usercontextid.js rename to devtools/client/storage/test/browser_storage_basic_usercontextid_2.js index 88e1a24b6012..80a7b937b34e 100644 --- a/devtools/client/storage/test/browser_storage_basic_usercontextid.js +++ b/devtools/client/storage/test/browser_storage_basic_usercontextid_2.js @@ -7,65 +7,6 @@ "use strict"; -const testCases = [ - [ - ["cookies", "http://test1.example.org"], - [ - getCookieId("c1", "test1.example.org", "/browser"), - getCookieId("cs2", ".example.org", "/"), - getCookieId("c3", "test1.example.org", "/"), - getCookieId("uc1", ".example.org", "/") - ] - ], - [ - ["cookies", "https://sectest1.example.org"], - [ - getCookieId("uc1", ".example.org", "/"), - getCookieId("cs2", ".example.org", "/"), - getCookieId("sc1", "sectest1.example.org", "/browser/devtools/client/storage/test/") - ] - ], - [["localStorage", "http://test1.example.org"], - ["ls1", "ls2"]], - [["localStorage", "http://sectest1.example.org"], - ["iframe-u-ls1"]], - [["localStorage", "https://sectest1.example.org"], - ["iframe-s-ls1"]], - [["sessionStorage", "http://test1.example.org"], - ["ss1"]], - [["sessionStorage", "http://sectest1.example.org"], - ["iframe-u-ss1", "iframe-u-ss2"]], - [["sessionStorage", "https://sectest1.example.org"], - ["iframe-s-ss1"]], - [["indexedDB", "http://test1.example.org"], - ["idb1 (default)", "idb2 (default)"]], - [["indexedDB", "http://test1.example.org", "idb1 (default)"], - ["obj1", "obj2"]], - [["indexedDB", "http://test1.example.org", "idb2 (default)"], - ["obj3"]], - [["indexedDB", "http://test1.example.org", "idb1 (default)", "obj1"], - [1, 2, 3]], - [["indexedDB", "http://test1.example.org", "idb1 (default)", "obj2"], - [1]], - [["indexedDB", "http://test1.example.org", "idb2 (default)", "obj3"], - []], - [["indexedDB", "http://sectest1.example.org"], - []], - [["indexedDB", "https://sectest1.example.org"], - ["idb-s1 (default)", "idb-s2 (default)"]], - [["indexedDB", "https://sectest1.example.org", "idb-s1 (default)"], - ["obj-s1"]], - [["indexedDB", "https://sectest1.example.org", "idb-s2 (default)"], - ["obj-s2"]], - [["indexedDB", "https://sectest1.example.org", "idb-s1 (default)", "obj-s1"], - [6, 7]], - [["indexedDB", "https://sectest1.example.org", "idb-s2 (default)", "obj-s2"], - [16]], - [["Cache", "http://test1.example.org", "plop"], - [MAIN_DOMAIN + "404_cached_file.js", - MAIN_DOMAIN + "browser_storage_basic.js"]], -]; - const testCasesUserContextId = [ [ ["cookies", "http://test1.example.org"], @@ -169,11 +110,6 @@ function* testTables(tests) { } add_task(function* () { - yield openTabAndSetupStorage(MAIN_DOMAIN + "storage-listings.html"); - - testTree(testCases); - yield testTables(testCases); - yield openTabAndSetupStorage(MAIN_DOMAIN + "storage-listings-usercontextid.html", {userContextId: 1}); diff --git a/devtools/client/storage/test/head.js b/devtools/client/storage/test/head.js index bc698e3bf3e8..368c277ca19e 100644 --- a/devtools/client/storage/test/head.js +++ b/devtools/client/storage/test/head.js @@ -201,9 +201,10 @@ var openStoragePanel = Task.async(function* (cb) { */ function waitForToolboxFrameFocus(toolbox) { info("Making sure that the toolbox's frame is focused"); - let def = promise.defer(); - waitForFocus(def.resolve, toolbox.win); - return def.promise; + + return new Promise(resolve => { + waitForFocus(resolve, toolbox.win); + }); } /** @@ -274,18 +275,16 @@ function* finishTests() { // Sends a click event on the passed DOM node in an async manner function* click(node) { - let def = promise.defer(); - node.scrollIntoView(); - // We need setTimeout here to allow any scrolling to complete before clicking - // the node. - setTimeout(() => { - node.click(); - def.resolve(); - }, 200); - - return def; + return new Promise(resolve => { + // We need setTimeout here to allow any scrolling to complete before clicking + // the node. + setTimeout(() => { + node.click(); + resolve(); + }, 200); + }); } /** @@ -306,35 +305,34 @@ function* click(node) { function variablesViewExpandTo(options) { let root = options.rootVariable; let expandTo = options.expandTo.split("."); - let lastDeferred = promise.defer(); - function getNext(prop) { - let name = expandTo.shift(); - let newProp = prop.get(name); + return new Promise((resolve, reject) => { + function getNext(prop) { + let name = expandTo.shift(); + let newProp = prop.get(name); - if (expandTo.length > 0) { - ok(newProp, "found property " + name); - if (newProp && newProp.expand) { - newProp.expand(); - getNext(newProp); + if (expandTo.length > 0) { + ok(newProp, "found property " + name); + if (newProp && newProp.expand) { + newProp.expand(); + getNext(newProp); + } else { + reject(prop); + } + } else if (newProp) { + resolve(newProp); } else { - lastDeferred.reject(prop); + reject(prop); } - } else if (newProp) { - lastDeferred.resolve(newProp); - } else { - lastDeferred.reject(prop); } - } - if (root && root.expand) { - root.expand(); - getNext(root); - } else { - lastDeferred.resolve(root); - } - - return lastDeferred.promise; + if (root && root.expand) { + root.expand(); + getNext(root); + } else { + resolve(root); + } + }); } /** @@ -412,33 +410,32 @@ function findVariableViewProperties(ruleArray, parsed) { } function processExpandRules(rules) { - let rule = rules.shift(); - if (!rule) { - return promise.resolve(null); - } + return new Promise(resolve => { + let rule = rules.shift(); + if (!rule) { + resolve(null); + } - let deferred = promise.defer(); - let expandOptions = { - rootVariable: gUI.view.getScopeAtIndex(parsed ? 1 : 0), - expandTo: rule.name - }; + let expandOptions = { + rootVariable: gUI.view.getScopeAtIndex(parsed ? 1 : 0), + expandTo: rule.name + }; - variablesViewExpandTo(expandOptions).then(function onSuccess(prop) { - let name = rule.name; - let lastName = name.split(".").pop(); - rule.name = lastName; + variablesViewExpandTo(expandOptions).then(function onSuccess(prop) { + let name = rule.name; + let lastName = name.split(".").pop(); + rule.name = lastName; - let matched = matchVariablesViewProperty(prop, rule); - return matched.then(onMatch.bind(null, prop, rule)).then(function () { - rule.name = name; + let matched = matchVariablesViewProperty(prop, rule); + return matched.then(onMatch.bind(null, prop, rule)).then(function () { + rule.name = name; + }); + }, function onFailure() { + resolve(null); + }).then(processExpandRules.bind(null, rules)).then(function () { + resolve(null); }); - }, function onFailure() { - return promise.resolve(null); - }).then(processExpandRules.bind(null, rules)).then(function () { - deferred.resolve(null); }); - - return deferred.promise; } function onAllRulesMatched(rules) { @@ -545,8 +542,10 @@ function* selectTableItem(id) { showAvailableIds(); } + let updated = gUI.once("sidebar-updated"); + yield click(target); - yield gUI.once("sidebar-updated"); + yield updated; } /** @@ -554,29 +553,28 @@ function* selectTableItem(id) { * @param {Object} target An observable object that either supports on/off or * addEventListener/removeEventListener * @param {String} eventName - * @param {Boolean} [useCapture] for addEventListener/removeEventListener + * @param {Boolean} useCapture Optional, for addEventListener/removeEventListener * @return A promise that resolves when the event has been handled */ function once(target, eventName, useCapture = false) { info("Waiting for event: '" + eventName + "' on " + target + "."); - let deferred = promise.defer(); - - for (let [add, remove] of [ - ["addEventListener", "removeEventListener"], - ["addListener", "removeListener"], - ["on", "off"] - ]) { - if ((add in target) && (remove in target)) { - target[add](eventName, function onEvent(...aArgs) { - target[remove](eventName, onEvent, useCapture); - deferred.resolve.apply(deferred, aArgs); - }, useCapture); - break; + return new Promise(resolve => { + for (let [add, remove] of [ + ["addEventListener", "removeEventListener"], + ["addListener", "removeListener"], + ["on", "off"] + ]) { + if ((add in target) && (remove in target)) { + target[add](eventName, function onEvent(...aArgs) { + info("Got event: '" + eventName + "' on " + target + "."); + target[remove](eventName, onEvent, useCapture); + resolve(...aArgs); + }, useCapture); + break; + } } - } - - return deferred.promise; + }); } /** diff --git a/devtools/server/actors/highlighters/css-grid.js b/devtools/server/actors/highlighters/css-grid.js index f35f6683dd00..95c65578f958 100644 --- a/devtools/server/actors/highlighters/css-grid.js +++ b/devtools/server/actors/highlighters/css-grid.js @@ -99,6 +99,77 @@ const CANVAS_SIZE = 4096; // the viewport's edges, therefore the lines won't looks as "infinite"). const CANVAS_INFINITY = CANVAS_SIZE << 8; +/** + * Returns an array containing the four coordinates of a rectangle, given its diagonal + * as input; optionally applying a matrix, and a function to each of the coordinates' + * value. + * + * @param {Number} x1 + * The x-axis coordinate of the rectangle's diagonal start point. + * @param {Number} y1 + * The y-axis coordinate of the rectangle's diagonal start point. + * @param {Number} x2 + * The x-axis coordinate of the rectangle's diagonal end point. + * @param {Number} y2 + * The y-axis coordinate of the rectangle's diagonal end point. + * @param {Array} [matrix=identity()] + * A transformation matrix to apply. + * @return {Array} + * The rect four corners' points transformed by the matrix given. + */ +function getPointsFromDiagonal(x1, y1, x2, y2, matrix = identity()) { + return [ + [x1, y1], + [x2, y1], + [x2, y2], + [x1, y2] + ].map(point => { + let transformedPoint = apply(matrix, point); + + return {x: transformedPoint[0], y: transformedPoint[1]}; + }); +} + +/** + * Takes an array of four points and returns a DOMRect-like object, represent the + * boundaries defined by the points given. + * + * @param {Array} points + * The four points. + * @return {Object} + * A DOMRect-like object. + */ +function getBoundsFromPoints(points) { + let bounds = {}; + + bounds.left = Math.min(points[0].x, points[1].x, points[2].x, points[3].x); + bounds.right = Math.max(points[0].x, points[1].x, points[2].x, points[3].x); + bounds.top = Math.min(points[0].y, points[1].y, points[2].y, points[3].y); + bounds.bottom = Math.max(points[0].y, points[1].y, points[2].y, points[3].y); + + bounds.x = bounds.left; + bounds.y = bounds.top; + bounds.width = bounds.right - bounds.left; + bounds.height = bounds.bottom - bounds.top; + + return bounds; +} + +/** + * Takes an array of four points and returns a string represent a path description. + * + * @param {Array} points + * The four points. + * @return {String} + * A Path Description that can be used in svg's element. + */ +function getPathDescriptionFromPoints(points) { + return "M" + points[0].x + "," + points[0].y + " " + + "L" + points[1].x + "," + points[1].y + " " + + "L" + points[2].x + "," + points[2].y + " " + + "L" + points[3].x + "," + points[3].y; +} + /** * Draws a line to the context given, applying a transformation matrix if passed. * @@ -141,18 +212,13 @@ function drawLine(ctx, x1, y1, x2, y2, matrix = identity()) { * The transformation matrix to apply. */ function drawRect(ctx, x1, y1, x2, y2, matrix = identity()) { - let p = [ - [x1, y1], - [x2, y1], - [x2, y2], - [x1, y2] - ].map(point => apply(matrix, point).map(Math.round)); + let p = getPointsFromDiagonal(x1, y1, x2, y2, matrix); ctx.beginPath(); - ctx.moveTo(p[0][0], p[0][1]); - ctx.lineTo(p[1][0], p[1][1]); - ctx.lineTo(p[2][0], p[2][1]); - ctx.lineTo(p[3][0], p[3][1]); + ctx.moveTo(Math.round(p[0].x), Math.round(p[0].y)); + ctx.lineTo(Math.round(p[1].x), Math.round(p[1].y)); + ctx.lineTo(Math.round(p[2].x), Math.round(p[2].y)); + ctx.lineTo(Math.round(p[3].x), Math.round(p[3].y)); ctx.closePath(); } @@ -808,18 +874,11 @@ CssGridHighlighter.prototype = extend(AutoRefreshHighlighter.prototype, { * * @param {GridArea} area * The grid area object. - * @param {Number} x1 - * The first x-coordinate of the grid area rectangle. - * @param {Number} x2 - * The second x-coordinate of the grid area rectangle. - * @param {Number} y1 - * The first y-coordinate of the grid area rectangle. - * @param {Number} y2 - * The second y-coordinate of the grid area rectangle. + * @param {Object} bounds + * A DOMRect-like object represent the grid area rectangle. */ - _updateGridAreaInfobar(area, x1, x2, y1, y2) { - let width = x2 - x1; - let height = y2 - y1; + _updateGridAreaInfobar(area, bounds) { + let { width, height } = bounds; let dim = parseFloat(width.toPrecision(6)) + " \u00D7 " + parseFloat(height.toPrecision(6)); @@ -828,15 +887,24 @@ CssGridHighlighter.prototype = extend(AutoRefreshHighlighter.prototype, { this.getElement("area-infobar-dimensions").setTextContent(dim); let container = this.getElement("area-infobar-container"); - this._moveInfobar(container, x1, x2, y1, y2, { + moveInfobar(container, bounds, this.win, { position: "bottom", hideIfOffscreen: true }); }, - _updateGridCellInfobar(rowNumber, columnNumber, x1, x2, y1, y2) { - let width = x2 - x1; - let height = y2 - y1; + /** + * Update the grid information displayed in the grid cell info bar. + * + * @param {Number} rowNumber + * The grid cell's row number. + * @param {Number} columnNumber + * The grid cell's column number. + * @param {Object} bounds + * A DOMRect-like object represent the grid cell rectangle. + */ + _updateGridCellInfobar(rowNumber, columnNumber, bounds) { + let { width, height } = bounds; let dim = parseFloat(width.toPrecision(6)) + " \u00D7 " + parseFloat(height.toPrecision(6)); @@ -847,7 +915,7 @@ CssGridHighlighter.prototype = extend(AutoRefreshHighlighter.prototype, { this.getElement("cell-infobar-dimensions").setTextContent(dim); let container = this.getElement("cell-infobar-container"); - this._moveInfobar(container, x1, x2, y1, y2, { + moveInfobar(container, bounds, this.win, { position: "top", hideIfOffscreen: true }); @@ -870,34 +938,8 @@ CssGridHighlighter.prototype = extend(AutoRefreshHighlighter.prototype, { this.getElement("line-infobar-names").setTextContent(gridLineNames); let container = this.getElement("line-infobar-container"); - this._moveInfobar(container, x, x, y, y); - }, - - /** - * Move the given grid infobar to the right place in the highlighter. - * - * @param {Number} x1 - * The first x-coordinate of the grid rectangle. - * @param {Number} x2 - * The second x-coordinate of the grid rectangle. - * @param {Number} y1 - * The first y-coordinate of the grid rectangle. - * @param {Number} y2 - * The second y-coordinate of the grid rectangle. - */ - _moveInfobar(container, x1, x2, y1, y2, options) { - let bounds = { - bottom: y2, - height: y2 - y1, - left: x1, - right: x2, - top: y1, - width: x2 - x1, - x: x1, - y: y1, - }; - - moveInfobar(container, bounds, this.win, options); + moveInfobar(container, + getBoundsFromPoints([{x, y}, {x, y}, {x, y}, {x, y}]), this.win); }, /** @@ -991,8 +1033,8 @@ CssGridHighlighter.prototype = extend(AutoRefreshHighlighter.prototype, { }, /** - * Updates the current matrix taking in account the following transformations, in this - * order: + * Updates the current matrices for both canvas drawing and SVG, taking in account the + * following transformations, in this order: * 1. The scale given by the display pixel ratio. * 2. The translation to the top left corner of the element. * 3. The scale given by the current zoom. @@ -1502,11 +1544,11 @@ CssGridHighlighter.prototype = extend(AutoRefreshHighlighter.prototype, { */ renderGridArea(areaName) { let paths = []; - let currentZoom = getCurrentZoom(this.win); + let { devicePixelRatio } = this.win; + let displayPixelRatio = getDisplayPixelRatio(this.win); for (let i = 0; i < this.gridData.length; i++) { let fragment = this.gridData[i]; - let {bounds} = this.currentQuads.content[i]; for (let area of fragment.areas) { if (areaName && areaName != area.name) { @@ -1518,23 +1560,33 @@ CssGridHighlighter.prototype = extend(AutoRefreshHighlighter.prototype, { let columnStart = fragment.cols.lines[area.columnStart - 1]; let columnEnd = fragment.cols.lines[area.columnEnd - 1]; - let x1 = columnStart.start + columnStart.breadth + - (bounds.left / currentZoom); - let x2 = columnEnd.start + (bounds.left / currentZoom); - let y1 = rowStart.start + rowStart.breadth + - (bounds.top / currentZoom); - let y2 = rowEnd.start + (bounds.top / currentZoom); + let x1 = columnStart.start + columnStart.breadth; + let y1 = rowStart.start + rowStart.breadth; + let x2 = columnEnd.start; + let y2 = rowEnd.start; - let path = "M" + x1 + "," + y1 + " " + - "L" + x2 + "," + y1 + " " + - "L" + x2 + "," + y2 + " " + - "L" + x1 + "," + y2; - paths.push(path); + let points = getPointsFromDiagonal(x1, y1, x2, y2, this.currentMatrix); + + // Scale down by `devicePixelRatio` since SVG element already take them into + // account. + let svgPoints = points.map(point => ({ + x: Math.round(point.x / devicePixelRatio), + y: Math.round(point.y / devicePixelRatio) + })); + + // Scale down by `displayPixelRatio` since infobar's HTML elements already take it + // into account; and the zoom scaling is handled by `moveInfobar`. + let bounds = getBoundsFromPoints(points.map(point => ({ + x: Math.round(point.x / displayPixelRatio), + y: Math.round(point.y / displayPixelRatio) + }))); + + paths.push(getPathDescriptionFromPoints(svgPoints)); // Update and show the info bar when only displaying a single grid area. if (areaName) { this._showGridAreaInfoBar(); - this._updateGridAreaInfobar(area, x1, x2, y1, y2); + this._updateGridAreaInfobar(area, bounds); } } } @@ -1568,23 +1620,34 @@ CssGridHighlighter.prototype = extend(AutoRefreshHighlighter.prototype, { return; } - let currentZoom = getCurrentZoom(this.win); - let {bounds} = this.currentQuads.content[gridFragmentIndex]; + let x1 = column.start; + let y1 = row.start; + let x2 = column.start + column.breadth; + let y2 = row.start + row.breadth; - let x1 = column.start + (bounds.left / currentZoom); - let x2 = column.start + column.breadth + (bounds.left / currentZoom); - let y1 = row.start + (bounds.top / currentZoom); - let y2 = row.start + row.breadth + (bounds.top / currentZoom); + let { devicePixelRatio } = this.win; + let displayPixelRatio = getDisplayPixelRatio(this.win); + + let points = getPointsFromDiagonal(x1, y1, x2, y2, this.currentMatrix); + + // Scale down by `devicePixelRatio` since SVG element already take them into account. + let svgPoints = points.map(point => ({ + x: Math.round(point.x / devicePixelRatio), + y: Math.round(point.y / devicePixelRatio) + })); + + // Scale down by `displayPixelRatio` since infobar's HTML elements already take it + // into account, and the zoom scaling is handled by `moveInfobar`. + let bounds = getBoundsFromPoints(points.map(point => ({ + x: Math.round(point.x / displayPixelRatio), + y: Math.round(point.y / displayPixelRatio) + }))); - let path = "M" + x1 + "," + y1 + " " + - "L" + x2 + "," + y1 + " " + - "L" + x2 + "," + y2 + " " + - "L" + x1 + "," + y2; let cells = this.getElement("cells"); - cells.setAttribute("d", path); + cells.setAttribute("d", getPathDescriptionFromPoints(svgPoints)); this._showGridCellInfoBar(); - this._updateGridCellInfobar(rowNumber, columnNumber, x1, x2, y1, y2); + this._updateGridCellInfobar(rowNumber, columnNumber, bounds); }, /** diff --git a/dom/animation/test/chrome/test_animation_performance_warning.html b/dom/animation/test/chrome/test_animation_performance_warning.html index c89557a24853..cf38d94dc02f 100644 --- a/dom/animation/test/chrome/test_animation_performance_warning.html +++ b/dom/animation/test/chrome/test_animation_performance_warning.html @@ -1180,7 +1180,7 @@ function start() { }).then(function() { // viewport depends on test environment. var expectedWarning = new RegExp( - "Animation cannot be run on the compositor because the area of the frame size " + + "Animation cannot be run on the compositor because the area of the frame " + "\\(\\d+\\) is too large relative to the viewport " + "\\(larger than \\d+\\)"); assert_animation_property_state_equals( diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp index 5117805aa518..6a502b1ecd3a 100644 --- a/dom/base/nsDocument.cpp +++ b/dom/base/nsDocument.cpp @@ -10089,17 +10089,12 @@ nsIDocument::CreateStaticClone(nsIDocShell* aCloneContainer) RefPtr sheet = GetStyleSheetAt(i); if (sheet) { if (sheet->IsApplicable()) { - // XXXheycam Need to make ServoStyleSheet cloning work. - if (sheet->IsGecko()) { - RefPtr clonedSheet = - sheet->Clone(nullptr, nullptr, clonedDoc, nullptr); - NS_WARNING_ASSERTION(clonedSheet, - "Cloning a stylesheet didn't work!"); - if (clonedSheet) { - clonedDoc->AddStyleSheet(clonedSheet); - } - } else { - NS_ERROR("stylo: ServoStyleSheet doesn't support cloning"); + RefPtr clonedSheet = + sheet->Clone(nullptr, nullptr, clonedDoc, nullptr); + NS_WARNING_ASSERTION(clonedSheet, + "Cloning a stylesheet didn't work!"); + if (clonedSheet) { + clonedDoc->AddStyleSheet(clonedSheet); } } } @@ -10109,17 +10104,12 @@ nsIDocument::CreateStaticClone(nsIDocShell* aCloneContainer) for (StyleSheet* sheet : Reversed(thisAsDoc->mOnDemandBuiltInUASheets)) { if (sheet) { if (sheet->IsApplicable()) { - // XXXheycam Need to make ServoStyleSheet cloning work. - if (sheet->IsGecko()) { - RefPtr clonedSheet = - sheet->Clone(nullptr, nullptr, clonedDoc, nullptr); - NS_WARNING_ASSERTION(clonedSheet, - "Cloning a stylesheet didn't work!"); - if (clonedSheet) { - clonedDoc->AddOnDemandBuiltInUASheet(clonedSheet); - } - } else { - NS_ERROR("stylo: ServoStyleSheet doesn't support cloning"); + RefPtr clonedSheet = + sheet->Clone(nullptr, nullptr, clonedDoc, nullptr); + NS_WARNING_ASSERTION(clonedSheet, + "Cloning a stylesheet didn't work!"); + if (clonedSheet) { + clonedDoc->AddOnDemandBuiltInUASheet(clonedSheet); } } } diff --git a/dom/canvas/CanvasRenderingContext2D.cpp b/dom/canvas/CanvasRenderingContext2D.cpp index 98eabb1969df..c646c9c5a885 100644 --- a/dom/canvas/CanvasRenderingContext2D.cpp +++ b/dom/canvas/CanvasRenderingContext2D.cpp @@ -133,6 +133,7 @@ #ifdef USE_SKIA #include "SurfaceTypes.h" #include "GLBlitHelper.h" +#include "ScopedGLHelpers.h" #endif using mozilla::gl::GLContext; @@ -5232,46 +5233,49 @@ CanvasRenderingContext2D::DrawImage(const CanvasImageSource& aImage, return; } - gl->MakeCurrent(); - GLuint videoTexture = 0; - gl->fGenTextures(1, &videoTexture); - // skiaGL expect upload on drawing, and uses texture 0 for texturing, - // so we must active texture 0 and bind the texture for it. - gl->fActiveTexture(LOCAL_GL_TEXTURE0); - gl->fBindTexture(LOCAL_GL_TEXTURE_2D, videoTexture); + { + gl->MakeCurrent(); + GLuint videoTexture = 0; + gl->fGenTextures(1, &videoTexture); + // skiaGL expect upload on drawing, and uses texture 0 for texturing, + // so we must active texture 0 and bind the texture for it. + gl->fActiveTexture(LOCAL_GL_TEXTURE0); + const gl::ScopedBindTexture scopeBindTexture(gl, videoTexture); - gl->fTexImage2D(LOCAL_GL_TEXTURE_2D, 0, LOCAL_GL_RGB, srcImage->GetSize().width, srcImage->GetSize().height, 0, LOCAL_GL_RGB, LOCAL_GL_UNSIGNED_SHORT_5_6_5, nullptr); - gl->fTexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_WRAP_S, LOCAL_GL_CLAMP_TO_EDGE); - gl->fTexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_WRAP_T, LOCAL_GL_CLAMP_TO_EDGE); - gl->fTexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_MAG_FILTER, LOCAL_GL_LINEAR); - gl->fTexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_MIN_FILTER, LOCAL_GL_LINEAR); + gl->fTexImage2D(LOCAL_GL_TEXTURE_2D, 0, LOCAL_GL_RGB, srcImage->GetSize().width, srcImage->GetSize().height, 0, LOCAL_GL_RGB, LOCAL_GL_UNSIGNED_SHORT_5_6_5, nullptr); + gl->fTexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_WRAP_S, LOCAL_GL_CLAMP_TO_EDGE); + gl->fTexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_WRAP_T, LOCAL_GL_CLAMP_TO_EDGE); + gl->fTexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_MAG_FILTER, LOCAL_GL_LINEAR); + gl->fTexParameteri(LOCAL_GL_TEXTURE_2D, LOCAL_GL_TEXTURE_MIN_FILTER, LOCAL_GL_LINEAR); - const gl::OriginPos destOrigin = gl::OriginPos::TopLeft; - bool ok = gl->BlitHelper()->BlitImageToTexture(srcImage, srcImage->GetSize(), - videoTexture, LOCAL_GL_TEXTURE_2D, - destOrigin); - if (ok) { - NativeSurface texSurf; - texSurf.mType = NativeSurfaceType::OPENGL_TEXTURE; - texSurf.mFormat = SurfaceFormat::R5G6B5_UINT16; - texSurf.mSize.width = srcImage->GetSize().width; - texSurf.mSize.height = srcImage->GetSize().height; - texSurf.mSurface = (void*)((uintptr_t)videoTexture); + const gl::OriginPos destOrigin = gl::OriginPos::TopLeft; + bool ok = gl->BlitHelper()->BlitImageToTexture(srcImage, srcImage->GetSize(), + videoTexture, LOCAL_GL_TEXTURE_2D, + destOrigin); + if (ok) { + NativeSurface texSurf; + texSurf.mType = NativeSurfaceType::OPENGL_TEXTURE; + texSurf.mFormat = SurfaceFormat::R5G6B5_UINT16; + texSurf.mSize.width = srcImage->GetSize().width; + texSurf.mSize.height = srcImage->GetSize().height; + texSurf.mSurface = (void*)((uintptr_t)videoTexture); - srcSurf = mTarget->CreateSourceSurfaceFromNativeSurface(texSurf); - if (!srcSurf) { + srcSurf = mTarget->CreateSourceSurfaceFromNativeSurface(texSurf); + if (!srcSurf) { + gl->fDeleteTextures(1, &videoTexture); + } + imgSize.width = srcImage->GetSize().width; + imgSize.height = srcImage->GetSize().height; + + int32_t displayWidth = video->VideoWidth(); + int32_t displayHeight = video->VideoHeight(); + aSw *= (double)imgSize.width / (double)displayWidth; + aSh *= (double)imgSize.height / (double)displayHeight; + } else { gl->fDeleteTextures(1, &videoTexture); } - imgSize.width = srcImage->GetSize().width; - imgSize.height = srcImage->GetSize().height; - - int32_t displayWidth = video->VideoWidth(); - int32_t displayHeight = video->VideoHeight(); - aSw *= (double)imgSize.width / (double)displayWidth; - aSh *= (double)imgSize.height / (double)displayHeight; - } else { - gl->fDeleteTextures(1, &videoTexture); } + srcImage = nullptr; if (mCanvasElement) { diff --git a/dom/locales/en-US/chrome/layout/layout_errors.properties b/dom/locales/en-US/chrome/layout/layout_errors.properties index 3ef63f86fceb..2756912c2295 100644 --- a/dom/locales/en-US/chrome/layout/layout_errors.properties +++ b/dom/locales/en-US/chrome/layout/layout_errors.properties @@ -12,9 +12,9 @@ TablePartRelPosWarning=Relative positioning of table rows and row groups is now ScrollLinkedEffectFound2=This site appears to use a scroll-linked positioning effect. This may not work well with asynchronous panning; see https://developer.mozilla.org/docs/Mozilla/Performance/ScrollLinkedEffects for further details and to join the discussion on related tools and features! ## LOCALIZATION NOTE(CompositorAnimationWarningContentTooLargeArea): -## %1$S is an integer value of the area of the frame size +## %1$S is an integer value of the area of the frame ## %2$S is an integer value of the area of a limit based on the viewport size -CompositorAnimationWarningContentTooLargeArea=Animation cannot be run on the compositor because the area of the frame size (%1$S) is too large relative to the viewport (larger than %2$S) +CompositorAnimationWarningContentTooLargeArea=Animation cannot be run on the compositor because the area of the frame (%1$S) is too large relative to the viewport (larger than %2$S) ## LOCALIZATION NOTE(CompositorAnimationWarningContentTooLarge2): ## (%1$S, %2$S) is a pair of integer values of the frame size ## (%3$S, %4$S) is a pair of integer values of a limit based on the viewport size diff --git a/dom/media/DecoderTraits.cpp b/dom/media/DecoderTraits.cpp index 3a4864f296aa..055437d9327d 100644 --- a/dom/media/DecoderTraits.cpp +++ b/dom/media/DecoderTraits.cpp @@ -22,10 +22,6 @@ #include "AndroidMediaReader.h" #include "AndroidMediaPluginHost.h" #endif -#ifdef MOZ_DIRECTSHOW -#include "DirectShowDecoder.h" -#include "DirectShowReader.h" -#endif #ifdef MOZ_FMP4 #include "MP4Decoder.h" #include "MP4Demuxer.h" @@ -146,9 +142,6 @@ CanHandleCodecsType(const MediaContainerType& aType, } MediaCodecs supportedCodecs; -#ifdef MOZ_DIRECTSHOW - DirectShowDecoder::GetSupportedCodecs(aType, &supportedCodecs); -#endif #ifdef MOZ_ANDROID_OMX if (MediaDecoder::IsAndroidMediaPluginEnabled()) { EnsureAndroidMediaPluginHost()->FindDecoder(aType, &supportedCodecs); @@ -211,11 +204,6 @@ CanHandleMediaType(const MediaContainerType& aType, if (FlacDecoder::IsSupportedType(mimeType)) { return CANPLAY_MAYBE; } -#ifdef MOZ_DIRECTSHOW - if (DirectShowDecoder::GetSupportedCodecs(mimeType, nullptr)) { - return CANPLAY_MAYBE; - } -#endif #ifdef MOZ_ANDROID_OMX if (MediaDecoder::IsAndroidMediaPluginEnabled() && EnsureAndroidMediaPluginHost()->FindDecoder(mimeType, nullptr)) { @@ -314,15 +302,6 @@ InstantiateDecoder(const MediaContainerType& aType, return decoder.forget(); } -#ifdef MOZ_DIRECTSHOW - // Note: DirectShow should come before WMF, so that we prefer DirectShow's - // MP3 support over WMF's. - if (DirectShowDecoder::GetSupportedCodecs(aType, nullptr)) { - decoder = new DirectShowDecoder(aOwner); - return decoder.forget(); - } -#endif - if (IsHttpLiveStreamingType(aType)) { // We don't have an HLS decoder. Telemetry::Accumulate(Telemetry::MEDIA_HLS_DECODER_SUCCESS, false); @@ -387,13 +366,7 @@ DecoderTraits::CreateReader(const MediaContainerType& aType, if (WebMDecoder::IsSupportedType(aType)) { decoderReader = new MediaFormatReader(aDecoder, new WebMDemuxer(aDecoder->GetResource())); - } else -#ifdef MOZ_DIRECTSHOW - if (DirectShowDecoder::GetSupportedCodecs(aType, nullptr)) { - decoderReader = new DirectShowReader(aDecoder); - } else -#endif - if (false) {} // dummy if to take care of the dangling else + } return decoderReader; } @@ -426,9 +399,6 @@ bool DecoderTraits::IsSupportedInVideoDocument(const nsACString& aType) MP3Decoder::IsSupportedType(*type) || ADTSDecoder::IsSupportedType(*type) || FlacDecoder::IsSupportedType(*type) || -#ifdef MOZ_DIRECTSHOW - DirectShowDecoder::GetSupportedCodecs(*type, nullptr) || -#endif false; } diff --git a/dom/media/GraphDriver.cpp b/dom/media/GraphDriver.cpp index 4a4ec136ecfa..d7c92a089039 100644 --- a/dom/media/GraphDriver.cpp +++ b/dom/media/GraphDriver.cpp @@ -738,9 +738,7 @@ AudioCallbackDriver::Init() return true; } } - bool aec; - Unused << mGraphImpl->AudioTrackPresent(aec); - SetMicrophoneActive(aec); + SetMicrophoneActive(mGraphImpl->mInputWanted); cubeb_stream_register_device_changed_callback(mAudioStream, AudioCallbackDriver::DeviceChangedCallback_s); diff --git a/dom/media/ThreadPoolCOMListener.h b/dom/media/ThreadPoolCOMListener.h index 881013a78f69..b5d1d147af47 100644 --- a/dom/media/ThreadPoolCOMListener.h +++ b/dom/media/ThreadPoolCOMListener.h @@ -13,8 +13,8 @@ namespace mozilla { // Thread pool listener which ensures that MSCOM is initialized and -// deinitialized on the thread pool thread. We may call into WMF or -// DirectShow on this thread, so we need MSCOM working. +// deinitialized on the thread pool thread. We may call into WMF on this thread, +// so we need MSCOM working. class MSCOMInitThreadPoolListener final : public nsIThreadPoolListener { ~MSCOMInitThreadPoolListener() {} public: diff --git a/dom/media/directshow/AudioSinkFilter.cpp b/dom/media/directshow/AudioSinkFilter.cpp deleted file mode 100644 index 9f23c0e00acb..000000000000 --- a/dom/media/directshow/AudioSinkFilter.cpp +++ /dev/null @@ -1,285 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim:set ts=2 sw=2 sts=2 et cindent: */ -/* 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/. */ - -#include "SampleSink.h" -#include "AudioSinkFilter.h" -#include "AudioSinkInputPin.h" -#include "VideoUtils.h" -#include "mozilla/Logging.h" - - -#include -#include - -#define DELETE_RESET(p) { delete (p) ; (p) = nullptr ;} - -DEFINE_GUID(CLSID_MozAudioSinkFilter, 0x1872d8c8, 0xea8d, 0x4c34, 0xae, 0x96, 0x69, 0xde, - 0xf1, 0x33, 0x7b, 0x33); - -using namespace mozilla::media; - -namespace mozilla { - -static LazyLogModule gDirectShowLog("DirectShowDecoder"); -#define LOG(...) MOZ_LOG(gDirectShowLog, mozilla::LogLevel::Debug, (__VA_ARGS__)) - -AudioSinkFilter::AudioSinkFilter(const wchar_t* aObjectName, HRESULT* aOutResult) - : BaseFilter(aObjectName, CLSID_MozAudioSinkFilter), - mFilterCritSec("AudioSinkFilter::mFilterCritSec") -{ - (*aOutResult) = S_OK; - mInputPin = new AudioSinkInputPin(L"AudioSinkInputPin", - this, - &mFilterCritSec, - aOutResult); -} - -AudioSinkFilter::~AudioSinkFilter() -{ -} - -int -AudioSinkFilter::GetPinCount() -{ - return 1; -} - -BasePin* -AudioSinkFilter::GetPin(int aIndex) -{ - CriticalSectionAutoEnter lockFilter(mFilterCritSec); - return (aIndex == 0) ? static_cast(mInputPin) : nullptr; -} - -HRESULT -AudioSinkFilter::Pause() -{ - CriticalSectionAutoEnter lockFilter(mFilterCritSec); - if (mState == State_Stopped) { - // Change the state, THEN activate the input pin. - mState = State_Paused; - if (mInputPin && mInputPin->IsConnected()) { - mInputPin->Active(); - } - } else if (mState == State_Running) { - mState = State_Paused; - } - return S_OK; -} - -HRESULT -AudioSinkFilter::Stop() -{ - CriticalSectionAutoEnter lockFilter(mFilterCritSec); - mState = State_Stopped; - if (mInputPin) { - mInputPin->Inactive(); - } - - GetSampleSink()->Flush(); - - return S_OK; -} - -HRESULT -AudioSinkFilter::Run(REFERENCE_TIME tStart) -{ - LOG("AudioSinkFilter::Run(%lld) [%4.2lf]", - RefTimeToUsecs(tStart), - double(RefTimeToUsecs(tStart)) / USECS_PER_S); - return media::BaseFilter::Run(tStart); -} - -HRESULT -AudioSinkFilter::GetClassID( OUT CLSID * pCLSID ) -{ - (* pCLSID) = CLSID_MozAudioSinkFilter; - return S_OK; -} - -HRESULT -AudioSinkFilter::QueryInterface(REFIID aIId, void **aInterface) -{ - if (aIId == IID_IMediaSeeking) { - *aInterface = static_cast(this); - AddRef(); - return S_OK; - } - return mozilla::media::BaseFilter::QueryInterface(aIId, aInterface); -} - -ULONG -AudioSinkFilter::AddRef() -{ - return ::InterlockedIncrement(&mRefCnt); -} - -ULONG -AudioSinkFilter::Release() -{ - unsigned long newRefCnt = ::InterlockedDecrement(&mRefCnt); - if (!newRefCnt) { - delete this; - } - return newRefCnt; -} - -SampleSink* -AudioSinkFilter::GetSampleSink() -{ - return mInputPin->GetSampleSink(); -} - - -// IMediaSeeking implementation. -// -// Calls to IMediaSeeking are forwarded to the output pin that the -// AudioSinkInputPin is connected to, i.e. upstream towards the parser and -// source filters, which actually implement seeking. -#define ENSURE_CONNECTED_PIN_SEEKING \ - if (!mInputPin) { \ - return E_NOTIMPL; \ - } \ - RefPtr pinSeeking = mInputPin->GetConnectedPinSeeking(); \ - if (!pinSeeking) { \ - return E_NOTIMPL; \ - } - -HRESULT -AudioSinkFilter::GetCapabilities(DWORD* aCapabilities) -{ - ENSURE_CONNECTED_PIN_SEEKING - return pinSeeking->GetCapabilities(aCapabilities); -} - -HRESULT -AudioSinkFilter::CheckCapabilities(DWORD* aCapabilities) -{ - ENSURE_CONNECTED_PIN_SEEKING - return pinSeeking->CheckCapabilities(aCapabilities); -} - -HRESULT -AudioSinkFilter::IsFormatSupported(const GUID* aFormat) -{ - ENSURE_CONNECTED_PIN_SEEKING - return pinSeeking->IsFormatSupported(aFormat); -} - -HRESULT -AudioSinkFilter::QueryPreferredFormat(GUID* aFormat) -{ - ENSURE_CONNECTED_PIN_SEEKING - return pinSeeking->QueryPreferredFormat(aFormat); -} - -HRESULT -AudioSinkFilter::GetTimeFormat(GUID* aFormat) -{ - ENSURE_CONNECTED_PIN_SEEKING - return pinSeeking->GetTimeFormat(aFormat); -} - -HRESULT -AudioSinkFilter::IsUsingTimeFormat(const GUID* aFormat) -{ - ENSURE_CONNECTED_PIN_SEEKING - return pinSeeking->IsUsingTimeFormat(aFormat); -} - -HRESULT -AudioSinkFilter::SetTimeFormat(const GUID* aFormat) -{ - ENSURE_CONNECTED_PIN_SEEKING - return pinSeeking->SetTimeFormat(aFormat); -} - -HRESULT -AudioSinkFilter::GetDuration(LONGLONG* aDuration) -{ - ENSURE_CONNECTED_PIN_SEEKING - return pinSeeking->GetDuration(aDuration); -} - -HRESULT -AudioSinkFilter::GetStopPosition(LONGLONG* aStop) -{ - ENSURE_CONNECTED_PIN_SEEKING - return pinSeeking->GetStopPosition(aStop); -} - -HRESULT -AudioSinkFilter::GetCurrentPosition(LONGLONG* aCurrent) -{ - ENSURE_CONNECTED_PIN_SEEKING - return pinSeeking->GetCurrentPosition(aCurrent); -} - -HRESULT -AudioSinkFilter::ConvertTimeFormat(LONGLONG* aTarget, - const GUID* aTargetFormat, - LONGLONG aSource, - const GUID* aSourceFormat) -{ - ENSURE_CONNECTED_PIN_SEEKING - return pinSeeking->ConvertTimeFormat(aTarget, - aTargetFormat, - aSource, - aSourceFormat); -} - -HRESULT -AudioSinkFilter::SetPositions(LONGLONG* aCurrent, - DWORD aCurrentFlags, - LONGLONG* aStop, - DWORD aStopFlags) -{ - ENSURE_CONNECTED_PIN_SEEKING - return pinSeeking->SetPositions(aCurrent, - aCurrentFlags, - aStop, - aStopFlags); -} - -HRESULT -AudioSinkFilter::GetPositions(LONGLONG* aCurrent, - LONGLONG* aStop) -{ - ENSURE_CONNECTED_PIN_SEEKING - return pinSeeking->GetPositions(aCurrent, aStop); -} - -HRESULT -AudioSinkFilter::GetAvailable(LONGLONG* aEarliest, - LONGLONG* aLatest) -{ - ENSURE_CONNECTED_PIN_SEEKING - return pinSeeking->GetAvailable(aEarliest, aLatest); -} - -HRESULT -AudioSinkFilter::SetRate(double aRate) -{ - ENSURE_CONNECTED_PIN_SEEKING - return pinSeeking->SetRate(aRate); -} - -HRESULT -AudioSinkFilter::GetRate(double* aRate) -{ - ENSURE_CONNECTED_PIN_SEEKING - return pinSeeking->GetRate(aRate); -} - -HRESULT -AudioSinkFilter::GetPreroll(LONGLONG* aPreroll) -{ - ENSURE_CONNECTED_PIN_SEEKING - return pinSeeking->GetPreroll(aPreroll); -} - -} // namespace mozilla - diff --git a/dom/media/directshow/AudioSinkFilter.h b/dom/media/directshow/AudioSinkFilter.h deleted file mode 100644 index 85abdfccf7bc..000000000000 --- a/dom/media/directshow/AudioSinkFilter.h +++ /dev/null @@ -1,95 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim:set ts=2 sw=2 sts=2 et cindent: */ -/* 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/. */ - -#if !defined(AudioSinkFilter_h_) -#define AudioSinkFilter_h_ - -#include "BaseFilter.h" -#include "DirectShowUtils.h" -#include "nsAutoPtr.h" -#include "mozilla/RefPtr.h" - -namespace mozilla { - -class AudioSinkInputPin; -class SampleSink; - -// Filter that acts as the end of the graph. Audio samples input into -// this filter block the calling thread, and the calling thread is -// unblocked when the decode thread extracts the sample. The samples -// input into this filter are stored in the SampleSink, where the blocking -// is implemented. The input pin owns the SampleSink. -class AudioSinkFilter: public mozilla::media::BaseFilter, - public IMediaSeeking -{ - -public: - AudioSinkFilter(const wchar_t* aObjectName, HRESULT* aOutResult); - virtual ~AudioSinkFilter(); - - // Gets the input pin's sample sink. - SampleSink* GetSampleSink(); - - // IUnknown implementation. - STDMETHODIMP QueryInterface(REFIID aIId, void **aInterface); - STDMETHODIMP_(ULONG) AddRef(); - STDMETHODIMP_(ULONG) Release(); - - // -------------------------------------------------------------------- - // CBaseFilter methods - int GetPinCount (); - mozilla::media::BasePin* GetPin ( IN int Index); - STDMETHODIMP Pause (); - STDMETHODIMP Stop (); - STDMETHODIMP GetClassID ( OUT CLSID * pCLSID); - STDMETHODIMP Run(REFERENCE_TIME tStart); - // IMediaSeeking Methods... - - // We defer to SourceFilter, but we must expose the interface on - // the output pins. Seeking commands come upstream from the renderers, - // but they must be actioned at the source filters. - STDMETHODIMP GetCapabilities(DWORD* aCapabilities); - STDMETHODIMP CheckCapabilities(DWORD* aCapabilities); - STDMETHODIMP IsFormatSupported(const GUID* aFormat); - STDMETHODIMP QueryPreferredFormat(GUID* aFormat); - STDMETHODIMP GetTimeFormat(GUID* aFormat); - STDMETHODIMP IsUsingTimeFormat(const GUID* aFormat); - STDMETHODIMP SetTimeFormat(const GUID* aFormat); - STDMETHODIMP GetDuration(LONGLONG* pDuration); - STDMETHODIMP GetStopPosition(LONGLONG* pStop); - STDMETHODIMP GetCurrentPosition(LONGLONG* aCurrent); - STDMETHODIMP ConvertTimeFormat(LONGLONG* aTarget, - const GUID* aTargetFormat, - LONGLONG aSource, - const GUID* aSourceFormat); - STDMETHODIMP SetPositions(LONGLONG* aCurrent, - DWORD aCurrentFlags, - LONGLONG* aStop, - DWORD aStopFlags); - STDMETHODIMP GetPositions(LONGLONG* aCurrent, - LONGLONG* aStop); - STDMETHODIMP GetAvailable(LONGLONG* aEarliest, - LONGLONG* aLatest); - STDMETHODIMP SetRate(double aRate); - STDMETHODIMP GetRate(double* aRate); - STDMETHODIMP GetPreroll(LONGLONG* aPreroll); - - // -------------------------------------------------------------------- - // class factory calls this - static IUnknown * CreateInstance (IN LPUNKNOWN punk, OUT HRESULT * phr); - -private: - CriticalSection mFilterCritSec; - - // Note: The input pin defers its refcounting to the sink filter, so when - // the input pin is addrefed, what actually happens is the sink filter is - // addrefed. - nsAutoPtr mInputPin; -}; - -} // namespace mozilla - -#endif // AudioSinkFilter_h_ diff --git a/dom/media/directshow/AudioSinkInputPin.cpp b/dom/media/directshow/AudioSinkInputPin.cpp deleted file mode 100644 index 85a6e3da3e68..000000000000 --- a/dom/media/directshow/AudioSinkInputPin.cpp +++ /dev/null @@ -1,195 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim:set ts=2 sw=2 sts=2 et cindent: */ -/* 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/. */ - -#include "AudioSinkInputPin.h" -#include "AudioSinkFilter.h" -#include "SampleSink.h" -#include "mozilla/Logging.h" - -#include - -using namespace mozilla::media; - -namespace mozilla { - -static LazyLogModule gDirectShowLog("DirectShowDecoder"); -#define LOG(...) MOZ_LOG(gDirectShowLog, mozilla::LogLevel::Debug, (__VA_ARGS__)) - -AudioSinkInputPin::AudioSinkInputPin(wchar_t* aObjectName, - AudioSinkFilter* aFilter, - mozilla::CriticalSection* aLock, - HRESULT* aOutResult) - : BaseInputPin(aObjectName, aFilter, aLock, aOutResult, aObjectName), - mSegmentStartTime(0) -{ - MOZ_COUNT_CTOR(AudioSinkInputPin); - mSampleSink = new SampleSink(); -} - -AudioSinkInputPin::~AudioSinkInputPin() -{ - MOZ_COUNT_DTOR(AudioSinkInputPin); -} - -HRESULT -AudioSinkInputPin::GetMediaType(int aPosition, MediaType* aOutMediaType) -{ - NS_ENSURE_TRUE(aPosition >= 0, E_INVALIDARG); - NS_ENSURE_TRUE(aOutMediaType, E_POINTER); - - if (aPosition > 0) { - return S_FALSE; - } - - // Note: We set output as PCM, as IEEE_FLOAT only works when using the - // MP3 decoder as an MFT, and we can't do that while using DirectShow. - aOutMediaType->SetType(&MEDIATYPE_Audio); - aOutMediaType->SetSubtype(&MEDIASUBTYPE_PCM); - aOutMediaType->SetType(&FORMAT_WaveFormatEx); - aOutMediaType->SetTemporalCompression(FALSE); - - return S_OK; -} - -HRESULT -AudioSinkInputPin::CheckMediaType(const MediaType* aMediaType) -{ - if (!aMediaType) { - return E_INVALIDARG; - } - - GUID majorType = *aMediaType->Type(); - if (majorType != MEDIATYPE_Audio && majorType != WMMEDIATYPE_Audio) { - return E_INVALIDARG; - } - - if (*aMediaType->Subtype() != MEDIASUBTYPE_PCM) { - return E_INVALIDARG; - } - - if (*aMediaType->FormatType() != FORMAT_WaveFormatEx) { - return E_INVALIDARG; - } - - // We accept the media type, stash its layout format! - WAVEFORMATEX* wfx = (WAVEFORMATEX*)(aMediaType->pbFormat); - GetSampleSink()->SetAudioFormat(wfx); - - return S_OK; -} - -AudioSinkFilter* -AudioSinkInputPin::GetAudioSinkFilter() -{ - return reinterpret_cast(mFilter); -} - -SampleSink* -AudioSinkInputPin::GetSampleSink() -{ - return mSampleSink; -} - -HRESULT -AudioSinkInputPin::SetAbsoluteMediaTime(IMediaSample* aSample) -{ - HRESULT hr; - REFERENCE_TIME start = 0, end = 0; - hr = aSample->GetTime(&start, &end); - NS_ENSURE_TRUE(SUCCEEDED(hr), E_FAIL); - { - CriticalSectionAutoEnter lock(*mLock); - start += mSegmentStartTime; - end += mSegmentStartTime; - } - hr = aSample->SetMediaTime(&start, &end); - NS_ENSURE_TRUE(SUCCEEDED(hr), E_FAIL); - return S_OK; -} - -HRESULT -AudioSinkInputPin::Receive(IMediaSample* aSample ) -{ - HRESULT hr; - NS_ENSURE_TRUE(aSample, E_POINTER); - - hr = BaseInputPin::Receive(aSample); - if (SUCCEEDED(hr) && hr != S_FALSE) { // S_FALSE == flushing - // Set the timestamp of the sample after being adjusted for - // seeking/segments in the "media time" attribute. When we seek, - // DirectShow starts a new "segment", and starts labeling samples - // from time=0 again, so we need to correct for this to get the - // actual timestamps after seeking. - hr = SetAbsoluteMediaTime(aSample); - NS_ENSURE_TRUE(SUCCEEDED(hr), hr); - hr = GetSampleSink()->Receive(aSample); - NS_ENSURE_TRUE(SUCCEEDED(hr), hr); - } - return S_OK; -} - -already_AddRefed -AudioSinkInputPin::GetConnectedPinSeeking() -{ - RefPtr peer = GetConnected(); - if (!peer) - return nullptr; - RefPtr seeking; - peer->QueryInterface(static_cast(getter_AddRefs(seeking))); - return seeking.forget(); -} - -HRESULT -AudioSinkInputPin::BeginFlush() -{ - HRESULT hr = media::BaseInputPin::BeginFlush(); - NS_ENSURE_TRUE(SUCCEEDED(hr), hr); - - GetSampleSink()->Flush(); - - return S_OK; -} - -HRESULT -AudioSinkInputPin::EndFlush() -{ - HRESULT hr = media::BaseInputPin::EndFlush(); - NS_ENSURE_TRUE(SUCCEEDED(hr), hr); - - // Reset the EOS flag, so that if we're called after a seek we still work. - GetSampleSink()->Reset(); - - return S_OK; -} - -HRESULT -AudioSinkInputPin::EndOfStream(void) -{ - HRESULT hr = media::BaseInputPin::EndOfStream(); - if (FAILED(hr) || hr == S_FALSE) { - // Pin is stil flushing. - return hr; - } - GetSampleSink()->SetEOS(); - - return S_OK; -} - - -HRESULT -AudioSinkInputPin::NewSegment(REFERENCE_TIME tStart, - REFERENCE_TIME tStop, - double dRate) -{ - CriticalSectionAutoEnter lock(*mLock); - // Record the start time of the new segment, so that we can store the - // correct absolute timestamp in the "media time" each incoming sample. - mSegmentStartTime = tStart; - return S_OK; -} - -} // namespace mozilla - diff --git a/dom/media/directshow/AudioSinkInputPin.h b/dom/media/directshow/AudioSinkInputPin.h deleted file mode 100644 index 80503c641ee3..000000000000 --- a/dom/media/directshow/AudioSinkInputPin.h +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim:set ts=2 sw=2 sts=2 et cindent: */ -/* 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/. */ - -#if !defined(AudioSinkInputPin_h_) -#define AudioSinkInputPin_h_ - -#include "BaseInputPin.h" -#include "DirectShowUtils.h" -#include "mozilla/RefPtr.h" -#include "nsAutoPtr.h" - -namespace mozilla { - -namespace media { - class MediaType; -} - -class AudioSinkFilter; -class SampleSink; - - -// Input pin for capturing audio output of a DirectShow filter graph. -// This is the input pin for the AudioSinkFilter. -class AudioSinkInputPin: public mozilla::media::BaseInputPin -{ -public: - AudioSinkInputPin(wchar_t* aObjectName, - AudioSinkFilter* aFilter, - mozilla::CriticalSection* aLock, - HRESULT* aOutResult); - virtual ~AudioSinkInputPin(); - - HRESULT GetMediaType (IN int iPos, OUT mozilla::media::MediaType * pmt); - HRESULT CheckMediaType (IN const mozilla::media::MediaType * pmt); - STDMETHODIMP Receive (IN IMediaSample *); - STDMETHODIMP BeginFlush() override; - STDMETHODIMP EndFlush() override; - - // Called when we start decoding a new segment, that happens directly after - // a seek. This captures the segment's start time. Samples decoded by the - // MP3 decoder have their timestamps offset from the segment start time. - // Storing the segment start time enables us to set each sample's MediaTime - // as an offset in the stream relative to the start of the stream, rather - // than the start of the segment, i.e. its absolute time in the stream. - STDMETHODIMP NewSegment(REFERENCE_TIME tStart, - REFERENCE_TIME tStop, - double dRate) override; - - STDMETHODIMP EndOfStream() override; - - // Returns the IMediaSeeking interface of the connected output pin. - // We forward seeking requests upstream from the sink to the source - // filters. - already_AddRefed GetConnectedPinSeeking(); - - SampleSink* GetSampleSink(); - -private: - AudioSinkFilter* GetAudioSinkFilter(); - - // Sets the media time on the media sample, relative to the segment - // start time. - HRESULT SetAbsoluteMediaTime(IMediaSample* aSample); - - nsAutoPtr mSampleSink; - - // Synchronized by the filter lock; BaseInputPin::mLock. - REFERENCE_TIME mSegmentStartTime; -}; - -} // namespace mozilla - -#endif // AudioSinkInputPin_h_ diff --git a/dom/media/directshow/DirectShowDecoder.cpp b/dom/media/directshow/DirectShowDecoder.cpp deleted file mode 100644 index c9e1ff416f96..000000000000 --- a/dom/media/directshow/DirectShowDecoder.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim:set ts=2 sw=2 sts=2 et cindent: */ -/* 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/. */ - -#include "DirectShowDecoder.h" -#include "DirectShowReader.h" -#include "DirectShowUtils.h" -#include "MediaContainerType.h" -#include "MediaDecoderStateMachine.h" -#include "mozilla/Preferences.h" -#include "mozilla/WindowsVersion.h" - -namespace mozilla { - -MediaDecoderStateMachine* DirectShowDecoder::CreateStateMachine() -{ - return new MediaDecoderStateMachine(this, new DirectShowReader(this)); -} - -/* static */ -bool -DirectShowDecoder::GetSupportedCodecs(const MediaContainerType& aType, - MediaCodecs* aOutCodecs) -{ - if (!IsEnabled()) { - return false; - } - - if (aType.Type() == MEDIAMIMETYPE("audio/mpeg") - || aType.Type() == MEDIAMIMETYPE("audio/mp3")) { - if (aOutCodecs) { - *aOutCodecs = MediaCodecs("mp3"); - } - return true; - } - - return false; -} - -/* static */ -bool -DirectShowDecoder::IsEnabled() -{ - return CanDecodeMP3UsingDirectShow() && - Preferences::GetBool("media.directshow.enabled"); -} - -DirectShowDecoder::DirectShowDecoder(MediaDecoderOwner* aOwner) - : MediaDecoder(aOwner) -{ -} - -DirectShowDecoder::~DirectShowDecoder() = default; - -} // namespace mozilla - diff --git a/dom/media/directshow/DirectShowDecoder.h b/dom/media/directshow/DirectShowDecoder.h deleted file mode 100644 index 2d67870b6816..000000000000 --- a/dom/media/directshow/DirectShowDecoder.h +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim:set ts=2 sw=2 sts=2 et cindent: */ -/* 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/. */ - -#if !defined(DirectShowDecoder_h_) -#define DirectShowDecoder_h_ - -#include "MediaDecoder.h" - -namespace mozilla { - -class MediaCodecs; -class MediaContainerType; - -// Decoder that uses DirectShow to playback MP3 files only. -class DirectShowDecoder : public MediaDecoder -{ -public: - - explicit DirectShowDecoder(MediaDecoderOwner* aOwner); - virtual ~DirectShowDecoder(); - - MediaDecoder* Clone(MediaDecoderOwner* aOwner) override { - if (!IsEnabled()) { - return nullptr; - } - return new DirectShowDecoder(aOwner); - } - - MediaDecoderStateMachine* CreateStateMachine() override; - - // Returns true if aType is a MIME type that we render with the - // DirectShow backend. If aCodecList is non null, - // it is filled with a (static const) null-terminated list of strings - // denoting the codecs we'll playback. Note that playback is strictly - // limited to MP3 only. - static bool GetSupportedCodecs(const MediaContainerType& aType, - MediaCodecs* aOutCodecs); - - // Returns true if the DirectShow backend is preffed on. - static bool IsEnabled(); -}; - -} // namespace mozilla - -#endif diff --git a/dom/media/directshow/DirectShowReader.cpp b/dom/media/directshow/DirectShowReader.cpp deleted file mode 100644 index 853fb08dc3a0..000000000000 --- a/dom/media/directshow/DirectShowReader.cpp +++ /dev/null @@ -1,360 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim: set ts=8 sts=2 et sw=2 tw=80: */ -/* 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/. */ - -#include "DirectShowReader.h" -#include "MediaDecoderReader.h" -#include "mozilla/RefPtr.h" -#include "DirectShowUtils.h" -#include "AudioSinkFilter.h" -#include "SourceFilter.h" -#include "SampleSink.h" -#include "VideoUtils.h" - -using namespace mozilla::media; - -namespace mozilla { - -// Windows XP's MP3 decoder filter. This is available on XP only, on Vista -// and later we can use the DMO Wrapper filter and MP3 decoder DMO. -const GUID DirectShowReader::CLSID_MPEG_LAYER_3_DECODER_FILTER = -{ 0x38BE3000, 0xDBF4, 0x11D0, {0x86, 0x0E, 0x00, 0xA0, 0x24, 0xCF, 0xEF, 0x6D} }; - - -static LazyLogModule gDirectShowLog("DirectShowDecoder"); -#define LOG(...) MOZ_LOG(gDirectShowLog, mozilla::LogLevel::Debug, (__VA_ARGS__)) - -DirectShowReader::DirectShowReader(AbstractMediaDecoder* aDecoder) - : MediaDecoderReader(aDecoder), - mMP3FrameParser(aDecoder->GetResource()->GetLength()), -#ifdef DIRECTSHOW_REGISTER_GRAPH - mRotRegister(0), -#endif - mNumChannels(0), - mAudioRate(0), - mBytesPerSample(0) -{ - MOZ_ASSERT(NS_IsMainThread(), "Must be on main thread."); - MOZ_COUNT_CTOR(DirectShowReader); -} - -DirectShowReader::~DirectShowReader() -{ - MOZ_ASSERT(NS_IsMainThread(), "Must be on main thread."); - MOZ_COUNT_DTOR(DirectShowReader); -#ifdef DIRECTSHOW_REGISTER_GRAPH - if (mRotRegister) { - RemoveGraphFromRunningObjectTable(mRotRegister); - } -#endif -} - -// Try to parse the MP3 stream to make sure this is indeed an MP3, get the -// estimated duration of the stream, and find the offset of the actual MP3 -// frames in the stream, as DirectShow doesn't like large ID3 sections. -static nsresult -ParseMP3Headers(MP3FrameParser *aParser, MediaResource *aResource) -{ - const uint32_t MAX_READ_SIZE = 4096; - - uint64_t offset = 0; - while (aParser->NeedsData() && !aParser->ParsedHeaders()) { - uint32_t bytesRead; - char buffer[MAX_READ_SIZE]; - nsresult rv = aResource->ReadAt(offset, buffer, - MAX_READ_SIZE, &bytesRead); - NS_ENSURE_SUCCESS(rv, rv); - - if (!bytesRead) { - // End of stream. - return NS_ERROR_FAILURE; - } - - aParser->Parse(reinterpret_cast(buffer), bytesRead, offset); - offset += bytesRead; - } - - return aParser->IsMP3() ? NS_OK : NS_ERROR_FAILURE; -} - -nsresult -DirectShowReader::ReadMetadata(MediaInfo* aInfo, - MetadataTags** aTags) -{ - MOZ_ASSERT(OnTaskQueue()); - HRESULT hr; - nsresult rv; - - // Create the filter graph, reference it by the GraphBuilder interface, - // to make graph building more convenient. - hr = CoCreateInstance(CLSID_FilterGraph, - nullptr, - CLSCTX_INPROC_SERVER, - IID_IGraphBuilder, - reinterpret_cast(static_cast(getter_AddRefs(mGraph)))); - NS_ENSURE_TRUE(SUCCEEDED(hr) && mGraph, NS_ERROR_FAILURE); - - rv = ParseMP3Headers(&mMP3FrameParser, mDecoder->GetResource()); - NS_ENSURE_SUCCESS(rv, rv); - - #ifdef DIRECTSHOW_REGISTER_GRAPH - hr = AddGraphToRunningObjectTable(mGraph, &mRotRegister); - NS_ENSURE_TRUE(SUCCEEDED(hr), NS_ERROR_FAILURE); - #endif - - // Extract the interface pointers we'll need from the filter graph. - hr = mGraph->QueryInterface(static_cast(getter_AddRefs(mControl))); - NS_ENSURE_TRUE(SUCCEEDED(hr) && mControl, NS_ERROR_FAILURE); - - hr = mGraph->QueryInterface(static_cast(getter_AddRefs(mMediaSeeking))); - NS_ENSURE_TRUE(SUCCEEDED(hr) && mMediaSeeking, NS_ERROR_FAILURE); - - // Build the graph. Create the filters we need, and connect them. We - // build the entire graph ourselves to prevent other decoders installed - // on the system being created and used. - - // Our source filters, wraps the MediaResource. - mSourceFilter = new SourceFilter(MEDIATYPE_Stream, MEDIASUBTYPE_MPEG1Audio); - NS_ENSURE_TRUE(mSourceFilter, NS_ERROR_FAILURE); - - rv = mSourceFilter->Init(mDecoder->GetResource(), mMP3FrameParser.GetMP3Offset()); - NS_ENSURE_SUCCESS(rv, rv); - - hr = mGraph->AddFilter(mSourceFilter, L"MozillaDirectShowSource"); - NS_ENSURE_TRUE(SUCCEEDED(hr), NS_ERROR_FAILURE); - - // The MPEG demuxer. - RefPtr demuxer; - hr = CreateAndAddFilter(mGraph, - CLSID_MPEG1Splitter, - L"MPEG1Splitter", - getter_AddRefs(demuxer)); - NS_ENSURE_TRUE(SUCCEEDED(hr), NS_ERROR_FAILURE); - - // Platform MP3 decoder. - RefPtr decoder; - // Firstly try to create the MP3 decoder filter that ships with WinXP - // directly. This filter doesn't normally exist on later versions of - // Windows. - hr = CreateAndAddFilter(mGraph, - CLSID_MPEG_LAYER_3_DECODER_FILTER, - L"MPEG Layer 3 Decoder", - getter_AddRefs(decoder)); - if (FAILED(hr)) { - // Failed to create MP3 decoder filter. Try to instantiate - // the MP3 decoder DMO. - hr = AddMP3DMOWrapperFilter(mGraph, getter_AddRefs(decoder)); - NS_ENSURE_TRUE(SUCCEEDED(hr), NS_ERROR_FAILURE); - } - - // Sink, captures audio samples and inserts them into our pipeline. - static const wchar_t* AudioSinkFilterName = L"MozAudioSinkFilter"; - mAudioSinkFilter = new AudioSinkFilter(AudioSinkFilterName, &hr); - NS_ENSURE_TRUE(mAudioSinkFilter && SUCCEEDED(hr), NS_ERROR_FAILURE); - hr = mGraph->AddFilter(mAudioSinkFilter, AudioSinkFilterName); - NS_ENSURE_TRUE(SUCCEEDED(hr), NS_ERROR_FAILURE); - - // Join the filters. - hr = ConnectFilters(mGraph, mSourceFilter, demuxer); - NS_ENSURE_TRUE(SUCCEEDED(hr), NS_ERROR_FAILURE); - - hr = ConnectFilters(mGraph, demuxer, decoder); - NS_ENSURE_TRUE(SUCCEEDED(hr), NS_ERROR_FAILURE); - - hr = ConnectFilters(mGraph, decoder, mAudioSinkFilter); - NS_ENSURE_TRUE(SUCCEEDED(hr), NS_ERROR_FAILURE); - - WAVEFORMATEX format; - mAudioSinkFilter->GetSampleSink()->GetAudioFormat(&format); - NS_ENSURE_TRUE(format.wFormatTag == WAVE_FORMAT_PCM, NS_ERROR_FAILURE); - - mInfo.mAudio.mChannels = mNumChannels = format.nChannels; - mInfo.mAudio.mRate = mAudioRate = format.nSamplesPerSec; - mInfo.mAudio.mBitDepth = format.wBitsPerSample; - mBytesPerSample = format.wBitsPerSample / 8; - - // Begin decoding! - hr = mControl->Run(); - NS_ENSURE_TRUE(SUCCEEDED(hr), NS_ERROR_FAILURE); - - DWORD seekCaps = 0; - hr = mMediaSeeking->GetCapabilities(&seekCaps); - mInfo.mMediaSeekable = SUCCEEDED(hr) && (AM_SEEKING_CanSeekAbsolute & seekCaps); - - int64_t duration = mMP3FrameParser.GetDuration(); - if (SUCCEEDED(hr)) { - mInfo.mMetadataDuration.emplace(TimeUnit::FromMicroseconds(duration)); - } - - LOG("Successfully initialized DirectShow MP3 decoder."); - LOG("Channels=%u Hz=%u duration=%lld bytesPerSample=%d", - mInfo.mAudio.mChannels, - mInfo.mAudio.mRate, - RefTimeToUsecs(duration), - mBytesPerSample); - - *aInfo = mInfo; - // Note: The SourceFilter strips ID3v2 tags out of the stream. - *aTags = nullptr; - - return NS_OK; -} - -inline float -UnsignedByteToAudioSample(uint8_t aValue) -{ - return aValue * (2.0f / UINT8_MAX) - 1.0f; -} - -bool -DirectShowReader::Finish(HRESULT aStatus) -{ - MOZ_ASSERT(OnTaskQueue()); - - LOG("DirectShowReader::Finish(0x%x)", aStatus); - // Notify the filter graph of end of stream. - RefPtr eventSink; - HRESULT hr = mGraph->QueryInterface(static_cast(getter_AddRefs(eventSink))); - if (SUCCEEDED(hr) && eventSink) { - eventSink->Notify(EC_COMPLETE, aStatus, 0); - } - return false; -} - -class DirectShowCopy -{ -public: - DirectShowCopy(uint8_t *aSource, uint32_t aBytesPerSample, - uint32_t aSamples, uint32_t aChannels) - : mSource(aSource) - , mBytesPerSample(aBytesPerSample) - , mSamples(aSamples) - , mChannels(aChannels) - , mNextSample(0) - { } - - uint32_t operator()(AudioDataValue *aBuffer, uint32_t aSamples) - { - uint32_t maxSamples = std::min(aSamples, mSamples - mNextSample); - uint32_t frames = maxSamples / mChannels; - size_t byteOffset = mNextSample * mBytesPerSample; - if (mBytesPerSample == 1) { - for (uint32_t i = 0; i < maxSamples; ++i) { - uint8_t *sample = mSource + byteOffset; - aBuffer[i] = UnsignedByteToAudioSample(*sample); - byteOffset += mBytesPerSample; - } - } else if (mBytesPerSample == 2) { - for (uint32_t i = 0; i < maxSamples; ++i) { - int16_t *sample = reinterpret_cast(mSource + byteOffset); - aBuffer[i] = AudioSampleToFloat(*sample); - byteOffset += mBytesPerSample; - } - } - mNextSample += maxSamples; - return frames; - } - -private: - uint8_t * const mSource; - const uint32_t mBytesPerSample; - const uint32_t mSamples; - const uint32_t mChannels; - uint32_t mNextSample; -}; - -bool -DirectShowReader::DecodeAudioData() -{ - MOZ_ASSERT(OnTaskQueue()); - HRESULT hr; - - SampleSink* sink = mAudioSinkFilter->GetSampleSink(); - if (sink->AtEOS()) { - // End of stream. - return Finish(S_OK); - } - - // Get the next chunk of audio samples. This blocks until the sample - // arrives, or an error occurs (like the stream is shutdown). - RefPtr sample; - hr = sink->Extract(sample); - if (FAILED(hr) || hr == S_FALSE) { - return Finish(hr); - } - - int64_t start = 0, end = 0; - sample->GetMediaTime(&start, &end); - LOG("DirectShowReader::DecodeAudioData [%4.2lf-%4.2lf]", - RefTimeToSeconds(start), - RefTimeToSeconds(end)); - - LONG length = sample->GetActualDataLength(); - LONG numSamples = length / mBytesPerSample; - LONG numFrames = length / mBytesPerSample / mNumChannels; - - BYTE* data = nullptr; - hr = sample->GetPointer(&data); - NS_ENSURE_TRUE(SUCCEEDED(hr), Finish(hr)); - - mAudioCompactor.Push(mDecoder->GetResource()->Tell(), - RefTimeToUsecs(start), - mInfo.mAudio.mRate, - numFrames, - mNumChannels, - DirectShowCopy(reinterpret_cast(data), - mBytesPerSample, - numSamples, - mNumChannels)); - return true; -} - -bool -DirectShowReader::DecodeVideoFrame(bool& aKeyframeSkip, - const media::TimeUnit& aTimeThreshold) -{ - MOZ_ASSERT(OnTaskQueue()); - return false; -} - -RefPtr -DirectShowReader::Seek(const SeekTarget& aTarget) -{ - nsresult res = SeekInternal(aTarget.GetTime().ToMicroseconds()); - if (NS_FAILED(res)) { - return SeekPromise::CreateAndReject(res, __func__); - } else { - return SeekPromise::CreateAndResolve(aTarget.GetTime(), __func__); - } -} - -nsresult -DirectShowReader::SeekInternal(int64_t aTargetUs) -{ - HRESULT hr; - MOZ_ASSERT(OnTaskQueue()); - - LOG("DirectShowReader::Seek() target=%lld", aTargetUs); - - hr = mControl->Pause(); - NS_ENSURE_TRUE(SUCCEEDED(hr), NS_ERROR_FAILURE); - - nsresult rv = ResetDecode(); - NS_ENSURE_SUCCESS(rv, rv); - - LONGLONG seekPosition = UsecsToRefTime(aTargetUs); - hr = mMediaSeeking->SetPositions(&seekPosition, - AM_SEEKING_AbsolutePositioning, - nullptr, - AM_SEEKING_NoPositioning); - NS_ENSURE_TRUE(SUCCEEDED(hr), NS_ERROR_FAILURE); - - hr = mControl->Run(); - NS_ENSURE_TRUE(SUCCEEDED(hr), NS_ERROR_FAILURE); - - return NS_OK; -} - -} // namespace mozilla diff --git a/dom/media/directshow/DirectShowReader.h b/dom/media/directshow/DirectShowReader.h deleted file mode 100644 index 9559fa4b05bf..000000000000 --- a/dom/media/directshow/DirectShowReader.h +++ /dev/null @@ -1,109 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim:set ts=2 sw=2 sts=2 et cindent: */ -/* 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/. */ - -#if !defined(DirectShowReader_h_) -#define DirectShowReader_h_ - -#include "windows.h" // HRESULT, DWORD -#include "MediaDecoderReader.h" -#include "MediaResource.h" -#include "mozilla/RefPtr.h" -#include "MP3FrameParser.h" - -// Add the graph to the Running Object Table so that we can connect -// to this graph with GraphEdit/GraphStudio. Note: on Vista and up you must -// also regsvr32 proppage.dll from the Windows SDK. -// See: http://msdn.microsoft.com/en-us/library/ms787252(VS.85).aspx -// #define DIRECTSHOW_REGISTER_GRAPH - -struct IGraphBuilder; -struct IMediaControl; -struct IMediaSeeking; - -namespace mozilla { - -class AudioSinkFilter; -class SourceFilter; - -// Decoder backend for decoding MP3 using DirectShow. DirectShow operates as -// a filter graph. The basic design of the DirectShowReader is that we have -// a SourceFilter that wraps the MediaResource that connects to the -// MP3 decoder filter. The MP3 decoder filter "pulls" data as it requires it -// downstream on its own thread. When the MP3 decoder has produced a block of -// decoded samples, its thread calls downstream into our AudioSinkFilter, -// passing the decoded buffer in. The AudioSinkFilter inserts the samples into -// a SampleSink object. The SampleSink blocks the MP3 decoder's thread until -// the decode thread calls DecodeAudioData(), whereupon the SampleSink -// releases the decoded samples to the decode thread, and unblocks the MP3 -// decoder's thread. The MP3 decoder can then request more data from the -// SourceFilter, and decode more data. If the decode thread calls -// DecodeAudioData() and there's no decoded samples waiting to be extracted -// in the SampleSink, the SampleSink blocks the decode thread until the MP3 -// decoder produces a decoded sample. -class DirectShowReader : public MediaDecoderReader -{ -public: - explicit DirectShowReader(AbstractMediaDecoder* aDecoder); - - virtual ~DirectShowReader(); - - bool DecodeAudioData() override; - bool DecodeVideoFrame(bool& aKeyframeSkip, - const media::TimeUnit& aTimeThreshold) override; - - nsresult ReadMetadata(MediaInfo* aInfo, - MetadataTags** aTags) override; - - RefPtr Seek(const SeekTarget& aTarget) override; - - static const GUID CLSID_MPEG_LAYER_3_DECODER_FILTER; - -private: - // Notifies the filter graph that playback is complete. aStatus is - // the code to send to the filter graph. Always returns false, so - // that we can just "return Finish()" from DecodeAudioData(). - bool Finish(HRESULT aStatus); - - nsresult SeekInternal(int64_t aTime); - - // DirectShow filter graph, and associated playback and seeking - // control interfaces. - RefPtr mGraph; - RefPtr mControl; - RefPtr mMediaSeeking; - - // Wraps the MediaResource, and feeds undecoded data into the filter graph. - RefPtr mSourceFilter; - - // Sits at the end of the graph, removing decoded samples from the graph. - // The graph will block while this is blocked, i.e. it will pause decoding. - RefPtr mAudioSinkFilter; - - // Some MP3s are variable bitrate, so DirectShow's duration estimation - // can make its duration estimation based on the wrong bitrate. So we parse - // the MP3 frames to get a more accuate estimate of the duration. - MP3FrameParser mMP3FrameParser; - -#ifdef DIRECTSHOW_REGISTER_GRAPH - // Used to add/remove the filter graph to the Running Object Table. You can - // connect GraphEdit/GraphStudio to the graph to observe and/or debug its - // topology and state. - DWORD mRotRegister; -#endif - - // Number of channels in the audio stream. - uint32_t mNumChannels; - - // Samples per second in the audio stream. - uint32_t mAudioRate; - - // Number of bytes per sample. Can be either 1 or 2. - uint32_t mBytesPerSample; -}; - -} // namespace mozilla - -#endif diff --git a/dom/media/directshow/DirectShowUtils.cpp b/dom/media/directshow/DirectShowUtils.cpp deleted file mode 100644 index b2afa7528c98..000000000000 --- a/dom/media/directshow/DirectShowUtils.cpp +++ /dev/null @@ -1,369 +0,0 @@ -/* vim:set ts=2 sw=2 sts=2 et cindent: */ -/* 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/. */ - -#include "DirectShowUtils.h" -#include "dmodshow.h" -#include "wmcodecdsp.h" -#include "dmoreg.h" -#include "mozilla/ArrayUtils.h" -#include "mozilla/RefPtr.h" -#include "nsPrintfCString.h" - -#define WARN(...) NS_WARNING(nsPrintfCString(__VA_ARGS__).get()) - -namespace mozilla { - -// Create a table which maps GUIDs to a string representation of the GUID. -// This is useful for debugging purposes, for logging the GUIDs of media types. -// This is only available when logging is enabled, i.e. not in release builds. -struct GuidToName { - const char* name; - const GUID guid; -}; - -#pragma push_macro("OUR_GUID_ENTRY") -#undef OUR_GUID_ENTRY -#define OUR_GUID_ENTRY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ - { #name, {l, w1, w2, {b1, b2, b3, b4, b5, b6, b7, b8}} }, - -static const GuidToName GuidToNameTable[] = { -#include -}; - -#pragma pop_macro("OUR_GUID_ENTRY") - -const char* -GetDirectShowGuidName(const GUID& aGuid) -{ - const size_t len = ArrayLength(GuidToNameTable); - for (unsigned i = 0; i < len; i++) { - if (IsEqualGUID(aGuid, GuidToNameTable[i].guid)) { - return GuidToNameTable[i].name; - } - } - return "Unknown"; -} - -void -RemoveGraphFromRunningObjectTable(DWORD aRotRegister) -{ - RefPtr runningObjectTable; - if (SUCCEEDED(GetRunningObjectTable(0, getter_AddRefs(runningObjectTable)))) { - runningObjectTable->Revoke(aRotRegister); - } -} - -HRESULT -AddGraphToRunningObjectTable(IUnknown *aUnkGraph, DWORD *aOutRotRegister) -{ - HRESULT hr; - - RefPtr moniker; - RefPtr runningObjectTable; - - hr = GetRunningObjectTable(0, getter_AddRefs(runningObjectTable)); - NS_ENSURE_TRUE(SUCCEEDED(hr), hr); - - const size_t STRING_LENGTH = 256; - WCHAR wsz[STRING_LENGTH]; - - StringCchPrintfW(wsz, - STRING_LENGTH, - L"FilterGraph %08x pid %08x", - (DWORD_PTR)aUnkGraph, - GetCurrentProcessId()); - - hr = CreateItemMoniker(L"!", wsz, getter_AddRefs(moniker)); - NS_ENSURE_TRUE(SUCCEEDED(hr), hr); - - hr = runningObjectTable->Register(ROTFLAGS_REGISTRATIONKEEPSALIVE, - aUnkGraph, - moniker, - aOutRotRegister); - NS_ENSURE_TRUE(SUCCEEDED(hr), hr); - - return S_OK; -} - -const char* -GetGraphNotifyString(long evCode) -{ -#define CASE(x) case x: return #x - switch(evCode) { - CASE(EC_ACTIVATE); // A video window is being activated or deactivated. - CASE(EC_BANDWIDTHCHANGE); // Not supported. - CASE(EC_BUFFERING_DATA); // The graph is buffering data, or has stopped buffering data. - CASE(EC_BUILT); // Send by the Video Control when a graph has been built. Not forwarded to applications. - CASE(EC_CLOCK_CHANGED); // The reference clock has changed. - CASE(EC_CLOCK_UNSET); // The clock provider was disconnected. - CASE(EC_CODECAPI_EVENT); // Sent by an encoder to signal an encoding event. - CASE(EC_COMPLETE); // All data from a particular stream has been rendered. - CASE(EC_CONTENTPROPERTY_CHANGED); // Not supported. - CASE(EC_DEVICE_LOST); // A Plug and Play device was removed or has become available again. - CASE(EC_DISPLAY_CHANGED); // The display mode has changed. - CASE(EC_END_OF_SEGMENT); // The end of a segment has been reached. - CASE(EC_EOS_SOON); // Not supported. - CASE(EC_ERROR_STILLPLAYING); // An asynchronous command to run the graph has failed. - CASE(EC_ERRORABORT); // An operation was aborted because of an error. - CASE(EC_ERRORABORTEX); // An operation was aborted because of an error. - CASE(EC_EXTDEVICE_MODE_CHANGE); // Not supported. - CASE(EC_FILE_CLOSED); // The source file was closed because of an unexpected event. - CASE(EC_FULLSCREEN_LOST); // The video renderer is switching out of full-screen mode. - CASE(EC_GRAPH_CHANGED); // The filter graph has changed. - CASE(EC_LENGTH_CHANGED); // The length of a source has changed. - CASE(EC_LOADSTATUS); // Notifies the application of progress when opening a network file. - CASE(EC_MARKER_HIT); // Not supported. - CASE(EC_NEED_RESTART); // A filter is requesting that the graph be restarted. - CASE(EC_NEW_PIN); // Not supported. - CASE(EC_NOTIFY_WINDOW); // Notifies a filter of the video renderer's window. - CASE(EC_OLE_EVENT); // A filter is passing a text string to the application. - CASE(EC_OPENING_FILE); // The graph is opening a file, or has finished opening a file. - CASE(EC_PALETTE_CHANGED); // The video palette has changed. - CASE(EC_PAUSED); // A pause request has completed. - CASE(EC_PLEASE_REOPEN); // The source file has changed. - CASE(EC_PREPROCESS_COMPLETE); // Sent by the WM ASF Writer filter when it completes the pre-processing for multipass encoding. - CASE(EC_PROCESSING_LATENCY); // Indicates the amount of time that a component is taking to process each sample. - CASE(EC_QUALITY_CHANGE); // The graph is dropping samples, for quality control. - //CASE(EC_RENDER_FINISHED); // Not supported. - CASE(EC_REPAINT); // A video renderer requires a repaint. - CASE(EC_SAMPLE_LATENCY); // Specifies how far behind schedule a component is for processing samples. - //CASE(EC_SAMPLE_NEEDED); // Requests a new input sample from the Enhanced Video Renderer (EVR) filter. - CASE(EC_SCRUB_TIME); // Specifies the time stamp for the most recent frame step. - CASE(EC_SEGMENT_STARTED); // A new segment has started. - CASE(EC_SHUTTING_DOWN); // The filter graph is shutting down, prior to being destroyed. - CASE(EC_SNDDEV_IN_ERROR); // A device error has occurred in an audio capture filter. - CASE(EC_SNDDEV_OUT_ERROR); // A device error has occurred in an audio renderer filter. - CASE(EC_STARVATION); // A filter is not receiving enough data. - CASE(EC_STATE_CHANGE); // The filter graph has changed state. - CASE(EC_STATUS); // Contains two arbitrary status strings. - CASE(EC_STEP_COMPLETE); // A filter performing frame stepping has stepped the specified number of frames. - CASE(EC_STREAM_CONTROL_STARTED); // A stream-control start command has taken effect. - CASE(EC_STREAM_CONTROL_STOPPED); // A stream-control stop command has taken effect. - CASE(EC_STREAM_ERROR_STILLPLAYING); // An error has occurred in a stream. The stream is still playing. - CASE(EC_STREAM_ERROR_STOPPED); // A stream has stopped because of an error. - CASE(EC_TIMECODE_AVAILABLE); // Not supported. - CASE(EC_UNBUILT); // Send by the Video Control when a graph has been torn down. Not forwarded to applications. - CASE(EC_USERABORT); // The user has terminated playback. - CASE(EC_VIDEO_SIZE_CHANGED); // The native video size has changed. - CASE(EC_VIDEOFRAMEREADY); // A video frame is ready for display. - CASE(EC_VMR_RECONNECTION_FAILED); // Sent by the VMR-7 and the VMR-9 when it was unable to accept a dynamic format change request from the upstream decoder. - CASE(EC_VMR_RENDERDEVICE_SET); // Sent when the VMR has selected its rendering mechanism. - CASE(EC_VMR_SURFACE_FLIPPED); // Sent when the VMR-7's allocator presenter has called the DirectDraw Flip method on the surface being presented. - CASE(EC_WINDOW_DESTROYED); // The video renderer was destroyed or removed from the graph. - CASE(EC_WMT_EVENT); // Sent by the WM ASF Reader filter when it reads ASF files protected by digital rights management (DRM). - CASE(EC_WMT_INDEX_EVENT); // Sent when an application uses the WM ASF Writer to index Windows Media Video files. - CASE(S_OK); // Success. - CASE(VFW_S_AUDIO_NOT_RENDERED); // Partial success; the audio was not rendered. - CASE(VFW_S_DUPLICATE_NAME); // Success; the Filter Graph Manager modified a filter name to avoid duplication. - CASE(VFW_S_PARTIAL_RENDER); // Partial success; some of the streams in this movie are in an unsupported format. - CASE(VFW_S_VIDEO_NOT_RENDERED); // Partial success; the video was not rendered. - CASE(E_ABORT); // Operation aborted. - CASE(E_OUTOFMEMORY); // Insufficient memory. - CASE(E_POINTER); // Null pointer argument. - CASE(VFW_E_CANNOT_CONNECT); // No combination of intermediate filters could be found to make the connection. - CASE(VFW_E_CANNOT_RENDER); // No combination of filters could be found to render the stream. - CASE(VFW_E_NO_ACCEPTABLE_TYPES); // There is no common media type between these pins. - CASE(VFW_E_NOT_IN_GRAPH); - - default: - return "Unknown Code"; - }; -#undef CASE -} - -HRESULT -CreateAndAddFilter(IGraphBuilder* aGraph, - REFGUID aFilterClsId, - LPCWSTR aFilterName, - IBaseFilter **aOutFilter) -{ - NS_ENSURE_TRUE(aGraph, E_POINTER); - NS_ENSURE_TRUE(aOutFilter, E_POINTER); - HRESULT hr; - - RefPtr filter; - hr = CoCreateInstance(aFilterClsId, - nullptr, - CLSCTX_INPROC_SERVER, - IID_IBaseFilter, - getter_AddRefs(filter)); - if (FAILED(hr)) { - // Object probably not available on this system. - WARN("CoCreateInstance failed, hr=%x", hr); - return hr; - } - - hr = aGraph->AddFilter(filter, aFilterName); - if (FAILED(hr)) { - WARN("AddFilter failed, hr=%x", hr); - return hr; - } - - filter.forget(aOutFilter); - - return S_OK; -} - -HRESULT -CreateMP3DMOWrapperFilter(IBaseFilter **aOutFilter) -{ - NS_ENSURE_TRUE(aOutFilter, E_POINTER); - HRESULT hr; - - // Create the wrapper filter. - RefPtr filter; - hr = CoCreateInstance(CLSID_DMOWrapperFilter, - nullptr, - CLSCTX_INPROC_SERVER, - IID_IBaseFilter, - getter_AddRefs(filter)); - if (FAILED(hr)) { - WARN("CoCreateInstance failed, hr=%x", hr); - return hr; - } - - // Query for IDMOWrapperFilter. - RefPtr dmoWrapper; - hr = filter->QueryInterface(IID_IDMOWrapperFilter, - getter_AddRefs(dmoWrapper)); - if (FAILED(hr)) { - WARN("QueryInterface failed, hr=%x", hr); - return hr; - } - - hr = dmoWrapper->Init(CLSID_CMP3DecMediaObject, DMOCATEGORY_AUDIO_DECODER); - if (FAILED(hr)) { - // Can't instantiate MP3 DMO. It doesn't exist on Windows XP, we're - // probably hitting that. Don't log warning to console, this is an - // expected error. - WARN("dmoWrapper Init failed, hr=%x", hr); - return hr; - } - - filter.forget(aOutFilter); - - return S_OK; -} - -HRESULT -AddMP3DMOWrapperFilter(IGraphBuilder* aGraph, - IBaseFilter **aOutFilter) -{ - NS_ENSURE_TRUE(aGraph, E_POINTER); - NS_ENSURE_TRUE(aOutFilter, E_POINTER); - HRESULT hr; - - // Create the wrapper filter. - RefPtr filter; - hr = CreateMP3DMOWrapperFilter(getter_AddRefs(filter)); - NS_ENSURE_TRUE(SUCCEEDED(hr), hr); - - // Add the wrapper filter to graph. - hr = aGraph->AddFilter(filter, L"MP3 Decoder DMO"); - if (FAILED(hr)) { - WARN("AddFilter failed, hr=%x", hr); - return hr; - } - - filter.forget(aOutFilter); - - return S_OK; -} - -bool -CanDecodeMP3UsingDirectShow() -{ - RefPtr filter; - - // Can we create the MP3 demuxer filter? - if (FAILED(CoCreateInstance(CLSID_MPEG1Splitter, - nullptr, - CLSCTX_INPROC_SERVER, - IID_IBaseFilter, - getter_AddRefs(filter)))) { - return false; - } - - // Can we create either the WinXP MP3 decoder filter or the MP3 DMO decoder? - if (FAILED(CoCreateInstance(DirectShowReader::CLSID_MPEG_LAYER_3_DECODER_FILTER, - nullptr, - CLSCTX_INPROC_SERVER, - IID_IBaseFilter, - getter_AddRefs(filter))) && - FAILED(CreateMP3DMOWrapperFilter(getter_AddRefs(filter)))) { - return false; - } - - // Else, we can create all of the components we need. Assume - // DirectShow is going to work... - return true; -} - -// Match a pin by pin direction and connection state. -HRESULT -MatchUnconnectedPin(IPin* aPin, - PIN_DIRECTION aPinDir, - bool *aOutMatches) -{ - NS_ENSURE_TRUE(aPin, E_POINTER); - NS_ENSURE_TRUE(aOutMatches, E_POINTER); - - // Ensure the pin is unconnected. - RefPtr peer; - HRESULT hr = aPin->ConnectedTo(getter_AddRefs(peer)); - if (hr != VFW_E_NOT_CONNECTED) { - *aOutMatches = false; - return hr; - } - - // Ensure the pin is of the specified direction. - PIN_DIRECTION pinDir; - hr = aPin->QueryDirection(&pinDir); - NS_ENSURE_TRUE(SUCCEEDED(hr), hr); - - *aOutMatches = (pinDir == aPinDir); - return S_OK; -} - -// Return the first unconnected input pin or output pin. -already_AddRefed -GetUnconnectedPin(IBaseFilter* aFilter, PIN_DIRECTION aPinDir) -{ - RefPtr enumPins; - - HRESULT hr = aFilter->EnumPins(getter_AddRefs(enumPins)); - NS_ENSURE_TRUE(SUCCEEDED(hr), nullptr); - - // Test each pin to see if it matches the direction we're looking for. - RefPtr pin; - while (S_OK == enumPins->Next(1, getter_AddRefs(pin), nullptr)) { - bool matches = FALSE; - if (SUCCEEDED(MatchUnconnectedPin(pin, aPinDir, &matches)) && - matches) { - return pin.forget(); - } - } - - return nullptr; -} - -HRESULT -ConnectFilters(IGraphBuilder* aGraph, - IBaseFilter* aOutputFilter, - IBaseFilter* aInputFilter) -{ - RefPtr output = GetUnconnectedPin(aOutputFilter, PINDIR_OUTPUT); - NS_ENSURE_TRUE(output, E_FAIL); - - RefPtr input = GetUnconnectedPin(aInputFilter, PINDIR_INPUT); - NS_ENSURE_TRUE(output, E_FAIL); - - return aGraph->Connect(output, input); -} - -} // namespace mozilla - -// avoid redefined macro in unified build -#undef WARN diff --git a/dom/media/directshow/DirectShowUtils.h b/dom/media/directshow/DirectShowUtils.h deleted file mode 100644 index dc0432817046..000000000000 --- a/dom/media/directshow/DirectShowUtils.h +++ /dev/null @@ -1,125 +0,0 @@ -/* vim:set ts=2 sw=2 sts=2 et cindent: */ -/* 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/. */ - -#ifndef _DirectShowUtils_h_ -#define _DirectShowUtils_h_ - -#include -#include "dshow.h" - -// XXXbz windowsx.h defines GetFirstChild, GetNextSibling, -// GetPrevSibling are macros, apparently... Eeevil. We have functions -// called that on some classes, so undef them. -#undef GetFirstChild -#undef GetNextSibling -#undef GetPrevSibling - -#include "DShowTools.h" -#include "mozilla/Logging.h" - -namespace mozilla { - -// Win32 "Event" wrapper. Must be paired with a CriticalSection to create a -// Java-style "monitor". -class Signal { -public: - - explicit Signal(CriticalSection* aLock) - : mLock(aLock) - { - CriticalSectionAutoEnter lock(*mLock); - mEvent = CreateEvent(nullptr, FALSE, FALSE, nullptr); - } - - ~Signal() { - CriticalSectionAutoEnter lock(*mLock); - CloseHandle(mEvent); - } - - // Lock must be held. - void Notify() { - SetEvent(mEvent); - } - - // Lock must be held. Check the wait condition before waiting! - HRESULT Wait() { - mLock->Leave(); - DWORD result = WaitForSingleObject(mEvent, INFINITE); - mLock->Enter(); - return result == WAIT_OBJECT_0 ? S_OK : E_FAIL; - } - -private: - CriticalSection* mLock; - HANDLE mEvent; -}; - -HRESULT -AddGraphToRunningObjectTable(IUnknown *aUnkGraph, DWORD *aOutRotRegister); - -void -RemoveGraphFromRunningObjectTable(DWORD aRotRegister); - -const char* -GetGraphNotifyString(long evCode); - -// Creates a filter and adds it to a graph. -HRESULT -CreateAndAddFilter(IGraphBuilder* aGraph, - REFGUID aFilterClsId, - LPCWSTR aFilterName, - IBaseFilter **aOutFilter); - -HRESULT -AddMP3DMOWrapperFilter(IGraphBuilder* aGraph, - IBaseFilter **aOutFilter); - -// Connects the output pin on aOutputFilter to an input pin on -// aInputFilter, in aGraph. -HRESULT -ConnectFilters(IGraphBuilder* aGraph, - IBaseFilter* aOutputFilter, - IBaseFilter* aInputFilter); - -HRESULT -MatchUnconnectedPin(IPin* aPin, - PIN_DIRECTION aPinDir, - bool *aOutMatches); - -// Converts from microseconds to DirectShow "Reference Time" -// (hundreds of nanoseconds). -inline int64_t -UsecsToRefTime(const int64_t aUsecs) -{ - return aUsecs * 10; -} - -// Converts from DirectShow "Reference Time" (hundreds of nanoseconds) -// to microseconds. -inline int64_t -RefTimeToUsecs(const int64_t hRefTime) -{ - return hRefTime / 10; -} - -// Converts from DirectShow "Reference Time" (hundreds of nanoseconds) -// to seconds. -inline double -RefTimeToSeconds(const REFERENCE_TIME aRefTime) -{ - return double(aRefTime) / 10000000; -} - -const char* -GetDirectShowGuidName(const GUID& aGuid); - -// Returns true if we can instantiate an MP3 demuxer and decoder filters. -// Use this to detect whether MP3 support is installed. -bool -CanDecodeMP3UsingDirectShow(); - -} // namespace mozilla - -#endif diff --git a/dom/media/directshow/SampleSink.cpp b/dom/media/directshow/SampleSink.cpp deleted file mode 100644 index fa5dc8d19c23..000000000000 --- a/dom/media/directshow/SampleSink.cpp +++ /dev/null @@ -1,159 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim:set ts=2 sw=2 sts=2 et cindent: */ -/* 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/. */ - -#include "SampleSink.h" -#include "AudioSinkFilter.h" -#include "AudioSinkInputPin.h" -#include "VideoUtils.h" -#include "mozilla/Logging.h" - -using namespace mozilla::media; - -namespace mozilla { - -static LazyLogModule gDirectShowLog("DirectShowDecoder"); -#define LOG(...) MOZ_LOG(gDirectShowLog, mozilla::LogLevel::Debug, (__VA_ARGS__)) - -SampleSink::SampleSink() - : mMonitor("SampleSink"), - mIsFlushing(false), - mAtEOS(false) -{ - MOZ_COUNT_CTOR(SampleSink); -} - -SampleSink::~SampleSink() -{ - MOZ_COUNT_DTOR(SampleSink); -} - -void -SampleSink::SetAudioFormat(const WAVEFORMATEX* aInFormat) -{ - NS_ENSURE_TRUE(aInFormat, ); - ReentrantMonitorAutoEnter mon(mMonitor); - memcpy(&mAudioFormat, aInFormat, sizeof(WAVEFORMATEX)); -} - -void -SampleSink::GetAudioFormat(WAVEFORMATEX* aOutFormat) -{ - MOZ_ASSERT(aOutFormat); - ReentrantMonitorAutoEnter mon(mMonitor); - memcpy(aOutFormat, &mAudioFormat, sizeof(WAVEFORMATEX)); -} - -HRESULT -SampleSink::Receive(IMediaSample* aSample) -{ - ReentrantMonitorAutoEnter mon(mMonitor); - - while (true) { - if (mIsFlushing) { - return S_FALSE; - } - if (!mSample) { - break; - } - if (mAtEOS) { - return E_UNEXPECTED; - } - // Wait until the consumer thread consumes the sample. - mon.Wait(); - } - - if (MOZ_LOG_TEST(gDirectShowLog, LogLevel::Debug)) { - REFERENCE_TIME start = 0, end = 0; - HRESULT hr = aSample->GetMediaTime(&start, &end); - LOG("SampleSink::Receive() [%4.2lf-%4.2lf]", - (double)RefTimeToUsecs(start) / USECS_PER_S, - (double)RefTimeToUsecs(end) / USECS_PER_S); - } - - mSample = aSample; - // Notify the signal, to awaken the consumer thread in WaitForSample() - // if necessary. - mon.NotifyAll(); - return S_OK; -} - -HRESULT -SampleSink::Extract(RefPtr& aOutSample) -{ - ReentrantMonitorAutoEnter mon(mMonitor); - // Loop until we have a sample, or we should abort. - while (true) { - if (mIsFlushing) { - return S_FALSE; - } - if (mSample) { - break; - } - if (mAtEOS) { - // Order is important here, if we have a sample, we should return it - // before reporting EOS. - return E_UNEXPECTED; - } - // Wait until the producer thread gives us a sample. - mon.Wait(); - } - aOutSample = mSample; - - if (MOZ_LOG_TEST(gDirectShowLog, LogLevel::Debug)) { - int64_t start = 0, end = 0; - mSample->GetMediaTime(&start, &end); - LOG("SampleSink::Extract() [%4.2lf-%4.2lf]", - (double)RefTimeToUsecs(start) / USECS_PER_S, - (double)RefTimeToUsecs(end) / USECS_PER_S); - } - - mSample = nullptr; - // Notify the signal, to awaken the producer thread in Receive() - // if necessary. - mon.NotifyAll(); - return S_OK; -} - -void -SampleSink::Flush() -{ - LOG("SampleSink::Flush()"); - ReentrantMonitorAutoEnter mon(mMonitor); - mIsFlushing = true; - mSample = nullptr; - mon.NotifyAll(); -} - -void -SampleSink::Reset() -{ - LOG("SampleSink::Reset()"); - ReentrantMonitorAutoEnter mon(mMonitor); - mIsFlushing = false; - mAtEOS = false; -} - -void -SampleSink::SetEOS() -{ - LOG("SampleSink::SetEOS()"); - ReentrantMonitorAutoEnter mon(mMonitor); - mAtEOS = true; - // Notify to unblock any threads waiting for samples in - // Extract() or Receive(). Now that we're at EOS, no more samples - // will come! - mon.NotifyAll(); -} - -bool -SampleSink::AtEOS() -{ - ReentrantMonitorAutoEnter mon(mMonitor); - return mAtEOS && !mSample; -} - -} // namespace mozilla - diff --git a/dom/media/directshow/SampleSink.h b/dom/media/directshow/SampleSink.h deleted file mode 100644 index 6a1af9fee475..000000000000 --- a/dom/media/directshow/SampleSink.h +++ /dev/null @@ -1,67 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim:set ts=2 sw=2 sts=2 et cindent: */ -/* 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/. */ - -#if !defined(SampleSink_h_) -#define SampleSink_h_ - -#include "BaseFilter.h" -#include "DirectShowUtils.h" -#include "mozilla/RefPtr.h" -#include "mozilla/ReentrantMonitor.h" - -namespace mozilla { - -class SampleSink { -public: - SampleSink(); - virtual ~SampleSink(); - - // Sets the audio format of the incoming samples. The upstream filter - // calls this. This makes a copy. - void SetAudioFormat(const WAVEFORMATEX* aInFormat); - - // Copies the format of incoming audio samples into into *aOutFormat. - void GetAudioFormat(WAVEFORMATEX* aOutFormat); - - // Called when a sample is delivered by the DirectShow graph to the sink. - // The decode thread retrieves the sample by calling WaitForSample(). - // Blocks if there's already a sample waiting to be consumed by the decode - // thread. - HRESULT Receive(IMediaSample* aSample); - - // Retrieves a sample from the sample queue, blocking until one becomes - // available, or until an error occurs. Returns S_FALSE on EOS. - HRESULT Extract(RefPtr& aOutSample); - - // Unblocks any threads waiting in GetSample(). - // Clears mSample, which unblocks upstream stream. - void Flush(); - - // Opens up the sink to receive more samples in PutSample(). - // Clears EOS flag. - void Reset(); - - // Marks that we've reacehd the end of stream. - void SetEOS(); - - // Returns whether we're at end of stream. - bool AtEOS(); - -private: - // All data in this class is syncronized by mMonitor. - ReentrantMonitor mMonitor; - RefPtr mSample; - - // Format of the audio stream we're receiving. - WAVEFORMATEX mAudioFormat; - - bool mIsFlushing; - bool mAtEOS; -}; - -} // namespace mozilla - -#endif // SampleSink_h_ diff --git a/dom/media/directshow/SourceFilter.cpp b/dom/media/directshow/SourceFilter.cpp deleted file mode 100644 index 4c5a0882c3e1..000000000000 --- a/dom/media/directshow/SourceFilter.cpp +++ /dev/null @@ -1,683 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim:set ts=2 sw=2 sts=2 et cindent: */ -/* 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/. */ - -#include "SourceFilter.h" -#include "MediaResource.h" -#include "mozilla/RefPtr.h" -#include "DirectShowUtils.h" -#include "MP3FrameParser.h" -#include "mozilla/Logging.h" -#include - -using namespace mozilla::media; - -namespace mozilla { - -// Define to trace what's on... -//#define DEBUG_SOURCE_TRACE 1 - -#if defined (DEBUG_SOURCE_TRACE) -static LazyLogModule gDirectShowLog("DirectShowDecoder"); -#define DIRECTSHOW_LOG(...) MOZ_LOG(gDirectShowLog, mozilla::LogLevel::Debug, (__VA_ARGS__)) -#else -#define DIRECTSHOW_LOG(...) -#endif - -static HRESULT -DoGetInterface(IUnknown* aUnknown, void** aInterface) -{ - if (!aInterface) - return E_POINTER; - *aInterface = aUnknown; - aUnknown->AddRef(); - return S_OK; -} - -// Stores details of IAsyncReader::Request(). -class ReadRequest { -public: - - ReadRequest(IMediaSample* aSample, - DWORD_PTR aDwUser, - uint32_t aOffset, - uint32_t aCount) - : mSample(aSample), - mDwUser(aDwUser), - mOffset(aOffset), - mCount(aCount) - { - MOZ_COUNT_CTOR(ReadRequest); - } - - ~ReadRequest() { - MOZ_COUNT_DTOR(ReadRequest); - } - - RefPtr mSample; - DWORD_PTR mDwUser; - uint32_t mOffset; - uint32_t mCount; -}; - -// A wrapper around media resource that presents only a partition of the -// underlying resource to the caller to use. The partition returned is from -// an offset to the end of stream, and this object deals with ensuring -// the offsets and lengths etc are translated from the reduced partition -// exposed to the caller, to the absolute offsets of the underlying stream. -class MediaResourcePartition { -public: - MediaResourcePartition(MediaResource* aResource, - int64_t aDataStart) - : mResource(aResource), - mDataOffset(aDataStart) - {} - - int64_t GetLength() { - int64_t len = mResource.GetLength(); - if (len == -1) { - return len; - } - return std::max(0, len - mDataOffset); - } - nsresult ReadAt(int64_t aOffset, char* aBuffer, - uint32_t aCount, uint32_t* aBytes) - { - return mResource.ReadAt(aOffset + mDataOffset, - aBuffer, - aCount, - aBytes); - } - int64_t GetCachedDataEnd() { - int64_t tell = mResource.GetResource()->Tell(); - int64_t dataEnd = - mResource.GetResource()->GetCachedDataEnd(tell) - mDataOffset; - return dataEnd; - } -private: - // MediaResource from which we read data. - MediaResourceIndex mResource; - int64_t mDataOffset; -}; - - -// Output pin for SourceFilter, which implements IAsyncReader, to -// allow downstream filters to pull/read data from it. Downstream pins -// register to read data using Request(), and asynchronously wait for the -// reads to complete using WaitForNext(). They may also synchronously read -// using SyncRead(). This class is a delegate (tear off) of -// SourceFilter. -// -// We can expose only a segment of the MediaResource to the filter graph. -// This is used to strip off the ID3v2 tags from the stream, as DirectShow -// has trouble parsing some headers. -// -// Implements: -// * IAsyncReader -// * IPin -// * IQualityControl -// * IUnknown -// -class DECLSPEC_UUID("18e5cfb2-1015-440c-a65c-e63853235894") -OutputPin : public IAsyncReader, - public BasePin -{ -public: - - OutputPin(MediaResource* aMediaResource, - SourceFilter* aParent, - CriticalSection& aFilterLock, - int64_t aMP3DataStart); - virtual ~OutputPin(); - - // IUnknown - // Defer to ref counting to BasePin, which defers to owning nsBaseFilter. - STDMETHODIMP_(ULONG) AddRef() override { return BasePin::AddRef(); } - STDMETHODIMP_(ULONG) Release() override { return BasePin::Release(); } - STDMETHODIMP QueryInterface(REFIID iid, void** ppv) override; - - // BasePin Overrides. - // Determines if the pin accepts a specific media type. - HRESULT CheckMediaType(const MediaType* aMediaType) override; - - // Retrieves a preferred media type, by index value. - HRESULT GetMediaType(int aPosition, MediaType* aMediaType) override; - - // Releases the pin from a connection. - HRESULT BreakConnect(void) override; - - // Determines whether a pin connection is suitable. - HRESULT CheckConnect(IPin* aPin) override; - - - // IAsyncReader overrides - - // The RequestAllocator method requests an allocator during the - // pin connection. - STDMETHODIMP RequestAllocator(IMemAllocator* aPreferred, - ALLOCATOR_PROPERTIES* aProps, - IMemAllocator** aActual) override; - - // The Request method queues an asynchronous request for data. Downstream - // will call WaitForNext() when they want to retrieve the result. - STDMETHODIMP Request(IMediaSample* aSample, DWORD_PTR aUserData) override; - - // The WaitForNext method waits for the next pending read request - // to complete. This method fails if the graph is flushing. - // Defers to SyncRead/5. - STDMETHODIMP WaitForNext(DWORD aTimeout, - IMediaSample** aSamples, - DWORD_PTR* aUserData) override; - - // The SyncReadAligned method performs a synchronous read. The method - // blocks until the request is completed. Defers to SyncRead/5. This - // method does not fail if the graph is flushing. - STDMETHODIMP SyncReadAligned(IMediaSample* aSample) override; - - // The SyncRead method performs a synchronous read. The method blocks - // until the request is completed. Defers to SyncRead/5. This - // method does not fail if the graph is flushing. - STDMETHODIMP SyncRead(LONGLONG aPosition, LONG aLength, BYTE* aBuffer) override; - - // The Length method retrieves the total length of the stream. - STDMETHODIMP Length(LONGLONG* aTotal, LONGLONG* aAvailable) override; - - // IPin Overrides - STDMETHODIMP BeginFlush(void) override; - STDMETHODIMP EndFlush(void) override; - - uint32_t GetAndResetBytesConsumedCount(); - -private: - - // Protects thread-shared data/structures (mFlushCount, mPendingReads). - // WaitForNext() also waits on this monitor - CriticalSection& mPinLock; - - // Signal used with mPinLock to implement WaitForNext(). - Signal mSignal; - - // The filter that owns us. Weak reference, as we're a delegate (tear off). - SourceFilter* mParentSource; - - MediaResourcePartition mResource; - - // Counter, inc'd in BeginFlush(), dec'd in EndFlush(). Calls to this can - // come from multiple threads and can interleave, hence the counter. - int32_t mFlushCount; - - // Number of bytes that have been read from the output pin since the last - // time GetAndResetBytesConsumedCount() was called. - uint32_t mBytesConsumed; - - // Deque of ReadRequest* for reads that are yet to be serviced. - // nsReadRequest's are stored on the heap, popper must delete them. - nsDeque mPendingReads; - - // Flags if the downstream pin has QI'd for IAsyncReader. We refuse - // connection if they don't query, as it means they're assuming that we're - // a push filter, and we're not. - bool mQueriedForAsyncReader; - -}; - -// For mingw __uuidof support -#ifdef __CRT_UUID_DECL -} -__CRT_UUID_DECL(mozilla::OutputPin, 0x18e5cfb2,0x1015,0x440c,0xa6,0x5c,0xe6,0x38,0x53,0x23,0x58,0x94); -namespace mozilla { -#endif - -OutputPin::OutputPin(MediaResource* aResource, - SourceFilter* aParent, - CriticalSection& aFilterLock, - int64_t aMP3DataStart) - : BasePin(static_cast(aParent), - &aFilterLock, - L"MozillaOutputPin", - PINDIR_OUTPUT), - mPinLock(aFilterLock), - mSignal(&mPinLock), - mParentSource(aParent), - mResource(aResource, aMP3DataStart), - mFlushCount(0), - mBytesConsumed(0), - mQueriedForAsyncReader(false) -{ - MOZ_COUNT_CTOR(OutputPin); - DIRECTSHOW_LOG("OutputPin::OutputPin()"); -} - -OutputPin::~OutputPin() -{ - MOZ_COUNT_DTOR(OutputPin); - DIRECTSHOW_LOG("OutputPin::~OutputPin()"); -} - -HRESULT -OutputPin::BreakConnect() -{ - mQueriedForAsyncReader = false; - return BasePin::BreakConnect(); -} - -STDMETHODIMP -OutputPin::QueryInterface(REFIID aIId, void** aInterface) -{ - if (aIId == IID_IAsyncReader) { - mQueriedForAsyncReader = true; - return DoGetInterface(static_cast(this), aInterface); - } - - if (aIId == __uuidof(OutputPin)) { - AddRef(); - *aInterface = this; - return S_OK; - } - - return BasePin::QueryInterface(aIId, aInterface); -} - -HRESULT -OutputPin::CheckConnect(IPin* aPin) -{ - // Our connection is only suitable if the downstream pin knows - // that we're asynchronous (i.e. it queried for IAsyncReader). - return mQueriedForAsyncReader ? S_OK : S_FALSE; -} - -HRESULT -OutputPin::CheckMediaType(const MediaType* aMediaType) -{ - const MediaType *myMediaType = mParentSource->GetMediaType(); - - if (IsEqualGUID(aMediaType->majortype, myMediaType->majortype) && - IsEqualGUID(aMediaType->subtype, myMediaType->subtype) && - IsEqualGUID(aMediaType->formattype, myMediaType->formattype)) - { - DIRECTSHOW_LOG("OutputPin::CheckMediaType() Match: major=%s minor=%s TC=%d FSS=%d SS=%u", - GetDirectShowGuidName(aMediaType->majortype), - GetDirectShowGuidName(aMediaType->subtype), - aMediaType->TemporalCompression(), - aMediaType->bFixedSizeSamples, - aMediaType->SampleSize()); - return S_OK; - } - - DIRECTSHOW_LOG("OutputPin::CheckMediaType() Failed to match: major=%s minor=%s TC=%d FSS=%d SS=%u", - GetDirectShowGuidName(aMediaType->majortype), - GetDirectShowGuidName(aMediaType->subtype), - aMediaType->TemporalCompression(), - aMediaType->bFixedSizeSamples, - aMediaType->SampleSize()); - return S_FALSE; -} - -HRESULT -OutputPin::GetMediaType(int aPosition, MediaType* aMediaType) -{ - if (!aMediaType) - return E_POINTER; - - if (aPosition == 0) { - aMediaType->Assign(mParentSource->GetMediaType()); - return S_OK; - } - return VFW_S_NO_MORE_ITEMS; -} - -static inline bool -IsPowerOf2(int32_t x) { - return ((-x & x) != x); -} - -STDMETHODIMP -OutputPin::RequestAllocator(IMemAllocator* aPreferred, - ALLOCATOR_PROPERTIES* aProps, - IMemAllocator** aActual) -{ - // Require the downstream pin to suggest what they want... - if (!aPreferred) return E_POINTER; - if (!aProps) return E_POINTER; - if (!aActual) return E_POINTER; - - // We only care about alignment - our allocator will reject anything - // which isn't power-of-2 aligned, so so try a 4-byte aligned allocator. - ALLOCATOR_PROPERTIES props; - memcpy(&props, aProps, sizeof(ALLOCATOR_PROPERTIES)); - if (aProps->cbAlign == 0 || IsPowerOf2(aProps->cbAlign)) { - props.cbAlign = 4; - } - - // Limit allocator's number of buffers. We know that the media will most - // likely be bound by network speed, not by decoding speed. We also - // store the incoming data in a Gecko stream, if we don't limit buffers - // here we'll end up duplicating a lot of storage. We must have enough - // space for audio key frames to fit in the first batch of buffers however, - // else pausing may fail for some downstream decoders. - if (props.cBuffers > BaseFilter::sMaxNumBuffers) { - props.cBuffers = BaseFilter::sMaxNumBuffers; - } - - // The allocator properties that are actually used. We don't store - // this, we need it for SetProperties() below to succeed. - ALLOCATOR_PROPERTIES actualProps; - HRESULT hr; - - if (aPreferred) { - // Play nice and prefer the downstream pin's preferred allocator. - hr = aPreferred->SetProperties(&props, &actualProps); - if (SUCCEEDED(hr)) { - aPreferred->AddRef(); - *aActual = aPreferred; - return S_OK; - } - } - - // Else downstream hasn't requested a specific allocator, so create one... - - // Just create a default allocator. It's highly unlikely that we'll use - // this anyway, as most parsers insist on using their own allocators. - RefPtr allocator; - hr = CoCreateInstance(CLSID_MemoryAllocator, - 0, - CLSCTX_INPROC_SERVER, - IID_IMemAllocator, - getter_AddRefs(allocator)); - if(FAILED(hr) || (allocator == nullptr)) { - NS_WARNING("Can't create our own DirectShow allocator."); - return hr; - } - - // See if we can make it suitable - hr = allocator->SetProperties(&props, &actualProps); - if (SUCCEEDED(hr)) { - // We need to release our refcount on pAlloc, and addref - // it to pass a refcount to the caller - this is a net nothing. - allocator.forget(aActual); - return S_OK; - } - - NS_WARNING("Failed to pick an allocator"); - return hr; -} - -STDMETHODIMP -OutputPin::Request(IMediaSample* aSample, DWORD_PTR aDwUser) -{ - if (!aSample) return E_FAIL; - - CriticalSectionAutoEnter lock(*mLock); - NS_ASSERTION(!mFlushCount, "Request() while flushing"); - - if (mFlushCount) - return VFW_E_WRONG_STATE; - - REFERENCE_TIME refStart = 0, refEnd = 0; - if (FAILED(aSample->GetTime(&refStart, &refEnd))) { - NS_WARNING("Sample incorrectly timestamped"); - return VFW_E_SAMPLE_TIME_NOT_SET; - } - - // Convert reference time to bytes. - uint32_t start = (uint32_t)(refStart / 10000000); - uint32_t end = (uint32_t)(refEnd / 10000000); - - uint32_t numBytes = end - start; - - ReadRequest* request = new ReadRequest(aSample, - aDwUser, - start, - numBytes); - // Memory for |request| is free when it's popped from the completed - // reads list. - - // Push this onto the queue of reads to be serviced. - mPendingReads.Push(request); - - // Notify any threads blocked in WaitForNext() which are waiting for mPendingReads - // to become non-empty. - mSignal.Notify(); - - return S_OK; -} - -STDMETHODIMP -OutputPin::WaitForNext(DWORD aTimeout, - IMediaSample** aOutSample, - DWORD_PTR* aOutDwUser) -{ - NS_ASSERTION(aTimeout == 0 || aTimeout == INFINITE, - "Oops, we don't handle this!"); - - *aOutSample = nullptr; - *aOutDwUser = 0; - - LONGLONG offset = 0; - LONG count = 0; - BYTE* buf = nullptr; - - { - CriticalSectionAutoEnter lock(*mLock); - - // Wait until there's a pending read to service. - while (aTimeout && mPendingReads.GetSize() == 0 && !mFlushCount) { - // Note: No need to guard against shutdown-during-wait here, as - // typically the thread doing the pull will have already called - // Request(), so we won't Wait() here anyway. SyncRead() will fail - // on shutdown. - mSignal.Wait(); - } - - nsAutoPtr request(reinterpret_cast(mPendingReads.PopFront())); - if (!request) - return VFW_E_WRONG_STATE; - - *aOutSample = request->mSample; - *aOutDwUser = request->mDwUser; - - offset = request->mOffset; - count = request->mCount; - buf = nullptr; - request->mSample->GetPointer(&buf); - NS_ASSERTION(buf != nullptr, "Invalid buffer!"); - - if (mFlushCount) { - return VFW_E_TIMEOUT; - } - } - - return SyncRead(offset, count, buf); -} - -STDMETHODIMP -OutputPin::SyncReadAligned(IMediaSample* aSample) -{ - { - // Ignore reads while flushing. - CriticalSectionAutoEnter lock(*mLock); - if (mFlushCount) { - return S_FALSE; - } - } - - if (!aSample) - return E_FAIL; - - REFERENCE_TIME lStart = 0, lEnd = 0; - if (FAILED(aSample->GetTime(&lStart, &lEnd))) { - NS_WARNING("Sample incorrectly timestamped"); - return VFW_E_SAMPLE_TIME_NOT_SET; - } - - // Convert reference time to bytes. - int32_t start = (int32_t)(lStart / 10000000); - int32_t end = (int32_t)(lEnd / 10000000); - - int32_t numBytes = end - start; - - // If the range extends off the end of stream, truncate to the end of stream - // as per IAsyncReader specificiation. - int64_t streamLength = mResource.GetLength(); - if (streamLength != -1) { - // We know the exact length of the stream, fail if the requested offset - // is beyond it. - if (start > streamLength) { - return VFW_E_BADALIGN; - } - - // If the end of the chunk to read is off the end of the stream, - // truncate it to the end of the stream. - if ((start + numBytes) > streamLength) { - numBytes = (uint32_t)(streamLength - start); - } - } - - BYTE* buf=0; - aSample->GetPointer(&buf); - - return SyncRead(start, numBytes, buf); -} - -STDMETHODIMP -OutputPin::SyncRead(LONGLONG aPosition, - LONG aLength, - BYTE* aBuffer) -{ - MOZ_ASSERT(!NS_IsMainThread()); - NS_ENSURE_TRUE(aPosition >= 0, E_FAIL); - NS_ENSURE_TRUE(aLength > 0, E_FAIL); - NS_ENSURE_TRUE(aBuffer, E_POINTER); - - DIRECTSHOW_LOG("OutputPin::SyncRead(%lld, %d)", aPosition, aLength); - { - // Ignore reads while flushing. - CriticalSectionAutoEnter lock(*mLock); - if (mFlushCount) { - return S_FALSE; - } - } - - uint32_t totalBytesRead = 0; - nsresult rv = mResource.ReadAt(aPosition, - reinterpret_cast(aBuffer), - aLength, - &totalBytesRead); - if (NS_FAILED(rv)) { - return E_FAIL; - } - if (totalBytesRead > 0) { - CriticalSectionAutoEnter lock(*mLock); - mBytesConsumed += totalBytesRead; - } - return (totalBytesRead == aLength) ? S_OK : S_FALSE; -} - -STDMETHODIMP -OutputPin::Length(LONGLONG* aTotal, LONGLONG* aAvailable) -{ - HRESULT hr = S_OK; - int64_t length = mResource.GetLength(); - if (length == -1) { - hr = VFW_S_ESTIMATED; - // Don't have a length. Just lie, it seems to work... - *aTotal = INT32_MAX; - } else { - *aTotal = length; - } - if (aAvailable) { - *aAvailable = mResource.GetCachedDataEnd(); - } - - DIRECTSHOW_LOG("OutputPin::Length() len=%lld avail=%lld", *aTotal, *aAvailable); - - return hr; -} - -STDMETHODIMP -OutputPin::BeginFlush() -{ - CriticalSectionAutoEnter lock(*mLock); - mFlushCount++; - mSignal.Notify(); - return S_OK; -} - -STDMETHODIMP -OutputPin::EndFlush(void) -{ - CriticalSectionAutoEnter lock(*mLock); - mFlushCount--; - return S_OK; -} - -uint32_t -OutputPin::GetAndResetBytesConsumedCount() -{ - CriticalSectionAutoEnter lock(*mLock); - uint32_t bytesConsumed = mBytesConsumed; - mBytesConsumed = 0; - return bytesConsumed; -} - -SourceFilter::SourceFilter(const GUID& aMajorType, - const GUID& aSubType) - : BaseFilter(L"MozillaDirectShowSource", __uuidof(SourceFilter)) -{ - MOZ_COUNT_CTOR(SourceFilter); - mMediaType.majortype = aMajorType; - mMediaType.subtype = aSubType; - - DIRECTSHOW_LOG("SourceFilter Constructor(%s, %s)", - GetDirectShowGuidName(aMajorType), - GetDirectShowGuidName(aSubType)); -} - -SourceFilter::~SourceFilter() -{ - MOZ_COUNT_DTOR(SourceFilter); - DIRECTSHOW_LOG("SourceFilter Destructor()"); -} - -BasePin* -SourceFilter::GetPin(int n) -{ - if (n == 0) { - NS_ASSERTION(mOutputPin != 0, "GetPin with no pin!"); - return static_cast(mOutputPin); - } else { - return nullptr; - } -} - -// Get's the media type we're supplying. -const MediaType* -SourceFilter::GetMediaType() const -{ - return &mMediaType; -} - -nsresult -SourceFilter::Init(MediaResource* aResource, int64_t aMP3Offset) -{ - DIRECTSHOW_LOG("SourceFilter::Init()"); - - mOutputPin = new OutputPin(aResource, - this, - mLock, - aMP3Offset); - NS_ENSURE_TRUE(mOutputPin != nullptr, NS_ERROR_FAILURE); - - return NS_OK; -} - -uint32_t -SourceFilter::GetAndResetBytesConsumedCount() -{ - return mOutputPin->GetAndResetBytesConsumedCount(); -} - - -} // namespace mozilla diff --git a/dom/media/directshow/SourceFilter.h b/dom/media/directshow/SourceFilter.h deleted file mode 100644 index d5ce2770e9a6..000000000000 --- a/dom/media/directshow/SourceFilter.h +++ /dev/null @@ -1,75 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* vim:set ts=2 sw=2 sts=2 et cindent: */ -/* 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/. */ - -#if !defined(nsDirectShowSource_h___) -#define nsDirectShowSource_h___ - -#include "BaseFilter.h" -#include "BasePin.h" -#include "MediaType.h" - -#include "nsDeque.h" -#include "nsAutoPtr.h" -#include "DirectShowUtils.h" -#include "mozilla/RefPtr.h" - -namespace mozilla { - -class MediaResource; -class OutputPin; - - -// SourceFilter is an asynchronous DirectShow source filter which -// reads from an MediaResource, and supplies data via a pull model downstream -// using OutputPin. It us used to supply a generic byte stream into -// DirectShow. -// -// Implements: -// * IBaseFilter -// * IMediaFilter -// * IPersist -// * IUnknown -// -class DECLSPEC_UUID("5c2a7ad0-ba82-4659-9178-c4719a2765d6") -SourceFilter : public media::BaseFilter -{ -public: - - // Constructs source filter to deliver given media type. - SourceFilter(const GUID& aMajorType, const GUID& aSubType); - ~SourceFilter(); - - nsresult Init(MediaResource *aResource, int64_t aMP3Offset); - - // BaseFilter overrides. - // Only one output - the byte stream. - int GetPinCount() override { return 1; } - - media::BasePin* GetPin(int n) override; - - // Get's the media type we're supplying. - const media::MediaType* GetMediaType() const; - - uint32_t GetAndResetBytesConsumedCount(); - -protected: - - // Our async pull output pin. - nsAutoPtr mOutputPin; - - // Type of byte stream we output. - media::MediaType mMediaType; - -}; - -} // namespace mozilla - -// For mingw __uuidof support -#ifdef __CRT_UUID_DECL -__CRT_UUID_DECL(mozilla::SourceFilter, 0x5c2a7ad0,0xba82,0x4659,0x91,0x78,0xc4,0x71,0x9a,0x27,0x65,0xd6); -#endif - -#endif diff --git a/dom/media/directshow/moz.build b/dom/media/directshow/moz.build deleted file mode 100644 index 8a9b76200011..000000000000 --- a/dom/media/directshow/moz.build +++ /dev/null @@ -1,41 +0,0 @@ -# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- -# vim: set filetype=python: -# 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/. - -EXPORTS += [ - 'AudioSinkFilter.h', - 'AudioSinkInputPin.h', - 'DirectShowDecoder.h', - 'DirectShowReader.h', - 'DirectShowUtils.h', -] - -UNIFIED_SOURCES += [ - 'DirectShowDecoder.cpp', - 'DirectShowUtils.cpp', - 'SourceFilter.cpp', -] - -SOURCES += [ - 'AudioSinkFilter.cpp', - 'AudioSinkInputPin.cpp', - 'DirectShowReader.cpp', - 'SampleSink.cpp', -] - -# If WebRTC isn't being built, we need to compile the DirectShow base classes so that -# they're available at link time. -if not CONFIG['MOZ_WEBRTC']: - SOURCES += [ - '/media/webrtc/trunk/webrtc/modules/video_capture/windows/BaseFilter.cpp', - '/media/webrtc/trunk/webrtc/modules/video_capture/windows/BaseInputPin.cpp', - '/media/webrtc/trunk/webrtc/modules/video_capture/windows/BasePin.cpp', - '/media/webrtc/trunk/webrtc/modules/video_capture/windows/MediaType.cpp', - ] - -FINAL_LIBRARY = 'xul' -LOCAL_INCLUDES += [ - '/media/webrtc/trunk/webrtc/modules/video_capture/windows', -] diff --git a/dom/media/moz.build b/dom/media/moz.build index aa13d3138498..bfee1c11029c 100644 --- a/dom/media/moz.build +++ b/dom/media/moz.build @@ -50,9 +50,6 @@ DIRS += [ 'webvtt', ] -if CONFIG['MOZ_DIRECTSHOW']: - DIRS += ['directshow'] - if CONFIG['MOZ_ANDROID_OMX']: DIRS += ['android'] @@ -297,11 +294,6 @@ LOCAL_INCLUDES += [ '/netwerk/base', ] -if CONFIG['MOZ_DIRECTSHOW']: - LOCAL_INCLUDES += [ - '/media/webrtc/trunk/webrtc/modules/video_capture/windows', - ] - if CONFIG['MOZ_WEBRTC']: LOCAL_INCLUDES += [ '/media/webrtc/signaling/src/common', diff --git a/dom/media/platforms/wrappers/H264Converter.cpp b/dom/media/platforms/wrappers/H264Converter.cpp index 5f0663ca86f1..948794856804 100644 --- a/dom/media/platforms/wrappers/H264Converter.cpp +++ b/dom/media/platforms/wrappers/H264Converter.cpp @@ -132,14 +132,47 @@ RefPtr H264Converter::Flush() { mDecodePromiseRequest.DisconnectIfExists(); - mFlushRequest.DisconnectIfExists(); - mShutdownRequest.DisconnectIfExists(); mDecodePromise.RejectIfExists(NS_ERROR_DOM_MEDIA_CANCELED, __func__); mNeedKeyframe = true; + + /* + When we detect a change of content in the H264 stream, we first flush the + current decoder (1), then shut it down (2). + It is possible possible for H264Converter::Flush to be called during any of + those time. + If during (1): + - mFlushRequest and mFlushPromise will not be empty. + - The old decoder can still be used, with the current extradata as stored + in mCurrentConfig.mExtraData. + + If during (2): + - mShutdownRequest and mShutdownPromise won't be empty. + - mDecoder is empty. + - The old decoder is no longer referenced by the H264Converter. + */ + if (mFlushPromise) { + // Flush in progress, hijack that one. + mFlushRequest.Disconnect(); + return mFlushPromise.forget(); + } if (mDecoder) { return mDecoder->Flush(); } - return FlushPromise::CreateAndResolve(true, __func__); + if (!mShutdownPromise) { + return FlushPromise::CreateAndResolve(true, __func__); + } + + mShutdownRequest.Disconnect(); + // Let's continue when the the current shutdown completes. + RefPtr shutdownPromise = mShutdownPromise.forget(); + return shutdownPromise->Then( + AbstractThread::GetCurrent()->AsTaskQueue(), + __func__, + [](bool) { return FlushPromise::CreateAndResolve(true, __func__); }, + [](bool) { + MOZ_ASSERT_UNREACHABLE("Shutdown promises are always resolved"); + return FlushPromise::CreateAndResolve(true, __func__); + }); } RefPtr @@ -158,8 +191,11 @@ H264Converter::Shutdown() mInitPromiseRequest.DisconnectIfExists(); mDecodePromiseRequest.DisconnectIfExists(); mFlushRequest.DisconnectIfExists(); + mFlushPromise = nullptr; mShutdownRequest.DisconnectIfExists(); mPendingSample = nullptr; + mNeedAVCC.reset(); + if (mShutdownPromise) { // We have a shutdown in progress, return that promise instead as we can't // shutdown a decoder twice. @@ -347,6 +383,8 @@ H264Converter::CheckForSPSChange(MediaRawData* aSample) } // This sample doesn't contain inband SPS/PPS // We now check if the out of band one has changed. + // This scenario can only occur on Android with devices that can recycle a + // decoder. if (mp4_demuxer::AnnexB::HasSPS(aSample->mExtraData) && !mp4_demuxer::AnnexB::CompareExtraData(aSample->mExtraData, mOriginalExtraData)) { @@ -373,7 +411,8 @@ H264Converter::CheckForSPSChange(MediaRawData* aSample) // The SPS has changed, signal to flush the current decoder and create a // new one. RefPtr self = this; - mDecoder->Flush() + mFlushPromise = mDecoder->Flush(); + mFlushPromise ->Then(AbstractThread::GetCurrent()->AsTaskQueue(), __func__, [self, sample, this]() { @@ -385,7 +424,6 @@ H264Converter::CheckForSPSChange(MediaRawData* aSample) [self, sample, this]() { mShutdownRequest.Complete(); mShutdownPromise = nullptr; - mNeedAVCC.reset(); nsresult rv = CreateDecoderAndInit(sample); if (rv == NS_ERROR_DOM_MEDIA_INITIALIZING_DECODER) { // All good so far, will continue later. @@ -400,6 +438,7 @@ H264Converter::CheckForSPSChange(MediaRawData* aSample) }, [self, this](const MediaResult& aError) { mFlushRequest.Complete(); + mFlushPromise = nullptr; mDecodePromise.Reject(aError, __func__); }) ->Track(mFlushRequest); diff --git a/dom/media/platforms/wrappers/H264Converter.h b/dom/media/platforms/wrappers/H264Converter.h index f2fa1846c6bf..918843139c02 100644 --- a/dom/media/platforms/wrappers/H264Converter.h +++ b/dom/media/platforms/wrappers/H264Converter.h @@ -92,6 +92,7 @@ private: MozPromiseRequestHolder mDecodePromiseRequest; MozPromiseHolder mDecodePromise; MozPromiseRequestHolder mFlushRequest; + RefPtr mFlushPromise; MozPromiseRequestHolder mShutdownRequest; RefPtr mShutdownPromise; diff --git a/dom/media/test/manifest.js b/dom/media/test/manifest.js index e5ce50b9312b..c6b06640387b 100644 --- a/dom/media/test/manifest.js +++ b/dom/media/test/manifest.js @@ -263,10 +263,10 @@ var gPlayTests = [ { name:"small-shot.mp3", type:"audio/mpeg", duration:0.27 }, { name:"owl.mp3", type:"audio/mpeg", duration:3.343 }, // owl.mp3 as above, but with something funny going on in the ID3v2 tag - // that causes DirectShow to fail. + // that caused DirectShow to fail. { name:"owl-funny-id3.mp3", type:"audio/mpeg", duration:3.343 }, // owl.mp3 as above, but with something even funnier going on in the ID3v2 tag - // that causes DirectShow to fail. + // that caused DirectShow to fail. { name:"owl-funnier-id3.mp3", type:"audio/mpeg", duration:3.343 }, // One second of silence with ~140KB of ID3 tags. Usually when the first MP3 // frame is at such a high offset into the file, MP3FrameParser will give up diff --git a/dom/media/test/test_can_play_type_mpeg.html b/dom/media/test/test_can_play_type_mpeg.html index 744d2237d397..933272327c55 100644 --- a/dom/media/test/test_can_play_type_mpeg.html +++ b/dom/media/test/test_can_play_type_mpeg.html @@ -162,8 +162,7 @@ var haveMp4 = getPref("media.wmf.enabled") || check_mp4(document.getElementById('v'), haveMp4); -var haveMp3 = getPref("media.directshow.enabled") || - getPref("media.wmf.enabled") || +var haveMp3 = getPref("media.wmf.enabled") || (IsLinux() && getPref("media.ffmpeg.enabled")) || (IsSupportedAndroid() && ((IsJellyBeanOrLater() && getPref("media.android-media-codec.enabled")) || diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index d0a1085bf537..5307f9269f18 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -1939,7 +1939,7 @@ WorkerLoadInfo::SetPrincipalFromChannel(nsIChannel* aChannel) return SetPrincipalOnMainThread(principal, loadGroup); } -#if defined(DEBUG) || !defined(RELEASE_OR_BETA) +#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED bool WorkerLoadInfo::FinalChannelPrincipalIsValid(nsIChannel* aChannel) { @@ -2027,7 +2027,7 @@ WorkerLoadInfo::PrincipalURIMatchesScriptURL() return equal; } -#endif // defined(DEBUG) || !defined(RELEASE_OR_BETA) +#endif // MOZ_DIAGNOSTIC_ASSERT_ENABLED bool WorkerLoadInfo::ProxyReleaseMainThreadObjects(WorkerPrivate* aWorkerPrivate) @@ -3922,7 +3922,7 @@ WorkerPrivateParent::SetPrincipalFromChannel(nsIChannel* aChannel) return mLoadInfo.SetPrincipalFromChannel(aChannel); } -#if defined(DEBUG) || !defined(RELEASE_OR_BETA) +#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED template bool WorkerPrivateParent::FinalChannelPrincipalIsValid(nsIChannel* aChannel) @@ -4071,7 +4071,7 @@ WorkerPrivateParent::AssertInnerWindowIsCorrect() const #endif -#if defined(DEBUG) || !defined(RELEASE_OR_BETA) +#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED template bool WorkerPrivateParent::PrincipalIsValid() const diff --git a/editor/libeditor/HTMLEditor.cpp b/editor/libeditor/HTMLEditor.cpp index d7088b081cad..c8692c0e1924 100644 --- a/editor/libeditor/HTMLEditor.cpp +++ b/editor/libeditor/HTMLEditor.cpp @@ -2967,12 +2967,7 @@ HTMLEditor::EnableStyleSheet(const nsAString& aURL, nsCOMPtr doc = do_QueryReferent(mDocWeak); sheet->SetAssociatedDocument(doc, StyleSheet::NotOwnedByDocument); - if (sheet->IsServo()) { - // XXXheycam ServoStyleSheets don't support being enabled/disabled yet. - NS_ERROR("stylo: ServoStyleSheets can't be disabled yet"); - return NS_ERROR_FAILURE; - } - return sheet->AsGecko()->SetDisabled(!aEnable); + return sheet->SetDisabled(!aEnable); } bool diff --git a/gfx/2d/ScaledFontMac.cpp b/gfx/2d/ScaledFontMac.cpp index 1345dcb14a29..5244a9cae751 100644 --- a/gfx/2d/ScaledFontMac.cpp +++ b/gfx/2d/ScaledFontMac.cpp @@ -207,7 +207,7 @@ struct writeBuf this->offset = 0; } ~writeBuf() { - delete this->data; + delete[] this->data; } template diff --git a/gfx/cairo/cairo/src/moz.build b/gfx/cairo/cairo/src/moz.build index 8a4288cdc6bf..da8c9ec1f037 100644 --- a/gfx/cairo/cairo/src/moz.build +++ b/gfx/cairo/cairo/src/moz.build @@ -235,6 +235,26 @@ if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']: '-Wno-error=uninitialized', ] +if CONFIG['_MSC_VER'] and not CONFIG['CLANG_CL']: + CFLAGS += [ + '-wd4005', # 'WIN32_LEAN_AND_MEAN' : macro redefinition + '-wd4018', # '>' : signed/unsigned mismatch + '-wd4047', # different levels of indirection + '-wd4101', # unreferenced local variable + '-wd4133', # 'function' : incompatible types + '-wd4146', # unary minus operator applied to unsigned type + '-wd4311', # 'variable' : pointer truncation from 'type' to 'type' + '-wd4477', # format string '%s' requires an argument of type 'type' + '-wd4996', # The compiler encountered a deprecated declaration. + ] + CXXFLAGS += [ + '-wd4005', # 'WIN32_LEAN_AND_MEAN' : macro redefinition + '-wd4018', # '>' : signed/unsigned mismatch + '-wd4146', # unary minus operator applied to unsigned type + '-wd4828', # illegal in the current source character set + '-wd4838', # requires a narrowing conversion + ] + # See bug 386897. if CONFIG['GNU_CC'] and CONFIG['OS_TARGET'] == 'Android' and CONFIG['MOZ_OPTIMIZE']: CFLAGS += ['-O2'] diff --git a/gfx/cairo/libpixman/src/moz.build b/gfx/cairo/libpixman/src/moz.build index 3ffeddf661b3..09d2f6857be7 100644 --- a/gfx/cairo/libpixman/src/moz.build +++ b/gfx/cairo/libpixman/src/moz.build @@ -154,6 +154,14 @@ if CONFIG['CLANG_CL']: CFLAGS += [ '-Wno-unused-variable', ] +if CONFIG['_MSC_VER'] and not CONFIG['CLANG_CL']: + CFLAGS += [ + '-wd4047', # different levels of indirection + '-wd4101', # unreferenced local variable + '-wd4133', # 'function' : incompatible types + '-wd4146', # unary minus operator applied to unsigned type + '-wd4311', # 'variable' : pointer truncation from 'type' to 'type' + ] # See bug 386897. if CONFIG['OS_TARGET'] == 'Android' and CONFIG['MOZ_OPTIMIZE']: diff --git a/layout/base/ServoRestyleManager.cpp b/layout/base/ServoRestyleManager.cpp index aab6f151dc24..8edb8fbc00b5 100644 --- a/layout/base/ServoRestyleManager.cpp +++ b/layout/base/ServoRestyleManager.cpp @@ -751,6 +751,17 @@ ServoRestyleManager::ContentStateChanged(nsIContent* aContent, PostRestyleEvent(aElement, restyleHint, changeHint); } +static inline bool +AttributeInfluencesOtherPseudoClassState(Element* aElement, nsIAtom* aAttribute) +{ + // We must record some state for :-moz-browser-frame and + // :-moz-table-border-nonzero. + return (aAttribute == nsGkAtoms::mozbrowser && + aElement->IsAnyOfHTMLElements(nsGkAtoms::iframe, nsGkAtoms::frame)) || + (aAttribute == nsGkAtoms::border && + aElement->IsHTMLElement(nsGkAtoms::table)); +} + void ServoRestyleManager::AttributeWillChange(Element* aElement, int32_t aNameSpaceID, @@ -766,6 +777,10 @@ ServoRestyleManager::AttributeWillChange(Element* aElement, ServoElementSnapshot& snapshot = SnapshotFor(aElement); snapshot.AddAttrs(aElement); + if (AttributeInfluencesOtherPseudoClassState(aElement, aAttribute)) { + snapshot.AddOtherPseudoClassState(aElement); + } + if (Element* parent = aElement->GetFlattenedTreeParentElementForStyle()) { parent->NoteDirtyDescendantsForServo(); } diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 35c145abb498..e46ed972732f 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -153,7 +153,6 @@ using namespace mozilla::gfx; #define GRID_ENABLED_PREF_NAME "layout.css.grid.enabled" #define GRID_TEMPLATE_SUBGRID_ENABLED_PREF_NAME "layout.css.grid-template-subgrid-value.enabled" #define WEBKIT_PREFIXES_ENABLED_PREF_NAME "layout.css.prefixes.webkit" -#define DISPLAY_FLOW_ROOT_ENABLED_PREF_NAME "layout.css.display-flow-root.enabled" #define TEXT_ALIGN_UNSAFE_ENABLED_PREF_NAME "layout.css.text-align-unsafe-value.enabled" #define FLOAT_LOGICAL_VALUES_ENABLED_PREF_NAME "layout.css.float-logical-values.enabled" @@ -320,36 +319,6 @@ WebkitPrefixEnabledPrefChangeCallback(const char* aPrefName, void* aClosure) } } -// When the pref "layout.css.display-flow-root.enabled" changes, this function is -// invoked to let us update kDisplayKTable, to selectively disable or restore -// the entries for "flow-root" in that table. -static void -DisplayFlowRootEnabledPrefChangeCallback(const char* aPrefName, void* aClosure) -{ - NS_ASSERTION(strcmp(aPrefName, DISPLAY_FLOW_ROOT_ENABLED_PREF_NAME) == 0, - "Did you misspell " DISPLAY_FLOW_ROOT_ENABLED_PREF_NAME " ?"); - - static bool sIsDisplayFlowRootKeywordIndexInitialized; - static int32_t sIndexOfFlowRootInDisplayTable; - bool isDisplayFlowRootEnabled = - Preferences::GetBool(DISPLAY_FLOW_ROOT_ENABLED_PREF_NAME, false); - - if (!sIsDisplayFlowRootKeywordIndexInitialized) { - // First run: find the position of "flow-root" in kDisplayKTable. - sIndexOfFlowRootInDisplayTable = - nsCSSProps::FindIndexOfKeyword(eCSSKeyword_flow_root, - nsCSSProps::kDisplayKTable); - sIsDisplayFlowRootKeywordIndexInitialized = true; - } - - // OK -- now, stomp on or restore the "flow-root" entry in kDisplayKTable, - // depending on whether the pref is enabled vs. disabled. - if (sIndexOfFlowRootInDisplayTable >= 0) { - nsCSSProps::kDisplayKTable[sIndexOfFlowRootInDisplayTable].mKeyword = - isDisplayFlowRootEnabled ? eCSSKeyword_flow_root : eCSSKeyword_UNKNOWN; - } -} - // When the pref "layout.css.text-align-unsafe-value.enabled" changes, this // function is called to let us update kTextAlignKTable & kTextAlignLastKTable, // to selectively disable or restore the entries for "unsafe" in those tables. @@ -7780,8 +7749,6 @@ static const PrefCallbacks kPrefCallbacks[] = { WebkitPrefixEnabledPrefChangeCallback }, { TEXT_ALIGN_UNSAFE_ENABLED_PREF_NAME, TextAlignUnsafeEnabledPrefChangeCallback }, - { DISPLAY_FLOW_ROOT_ENABLED_PREF_NAME, - DisplayFlowRootEnabledPrefChangeCallback }, { FLOAT_LOGICAL_VALUES_ENABLED_PREF_NAME, FloatLogicalValuesEnabledPrefChangeCallback }, }; diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp index 477491f351c6..e50d66994420 100644 --- a/layout/generic/nsImageFrame.cpp +++ b/layout/generic/nsImageFrame.cpp @@ -800,7 +800,7 @@ nsImageFrame::EnsureIntrinsicSizeAndRatio() // image request is null or image size not known, probably an // invalid image specified if (!(GetStateBits() & NS_FRAME_GENERATED_CONTENT)) { - bool imageBroken = false; + bool imageInvalid = false; // check for broken images. valid null images (eg. img src="") are // not considered broken because they have no image requests nsCOMPtr imageLoader = do_QueryInterface(mContent); @@ -808,14 +808,21 @@ nsImageFrame::EnsureIntrinsicSizeAndRatio() nsCOMPtr currentRequest; imageLoader->GetRequest(nsIImageLoadingContent::CURRENT_REQUEST, getter_AddRefs(currentRequest)); - uint32_t imageStatus; - imageBroken = - currentRequest && - NS_SUCCEEDED(currentRequest->GetImageStatus(&imageStatus)) && - (imageStatus & imgIRequest::STATUS_ERROR); + if (currentRequest) { + uint32_t imageStatus; + imageInvalid = + NS_SUCCEEDED(currentRequest->GetImageStatus(&imageStatus)) && + (imageStatus & imgIRequest::STATUS_ERROR); + } else { + // check if images are user-disabled (or blocked for other + // reasons) + int16_t imageBlockingStatus; + imageLoader->GetImageBlockingStatus(&imageBlockingStatus); + imageInvalid = imageBlockingStatus != nsIContentPolicy::ACCEPT; + } } // invalid image specified. make the image big enough for the "broken" icon - if (imageBroken) { + if (imageInvalid) { nscoord edgeLengthToUse = nsPresContext::CSSPixelsToAppUnits( ICON_SIZE + (2 * (ICON_PADDING + ALT_BORDER_WIDTH))); diff --git a/layout/reftests/bugs/1365159-1-ref.html b/layout/reftests/bugs/1365159-1-ref.html new file mode 100644 index 000000000000..2e57a292c306 --- /dev/null +++ b/layout/reftests/bugs/1365159-1-ref.html @@ -0,0 +1,5 @@ + + + + +
There should be
no borders visible
diff --git a/layout/reftests/bugs/1365159-1.html b/layout/reftests/bugs/1365159-1.html new file mode 100644 index 000000000000..b7583ffeb3ae --- /dev/null +++ b/layout/reftests/bugs/1365159-1.html @@ -0,0 +1,8 @@ + + + + +
There should be
no borders visible
+ diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index 2328082cdeaa..7d34ae5c94e3 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -2008,3 +2008,4 @@ fails-if(styloVsGecko) == 1322512-1.html 1322512-1-ref.html == 1369584-1a.html 1369584-1-ref.html == 1369584-1b.html 1369584-1-ref.html == 1367592-1.html 1367592-1-ref.html +== 1365159-1.html 1365159-1-ref.html diff --git a/layout/reftests/css-display/display-flow-root-disabled-001-ref.html b/layout/reftests/css-display/display-flow-root-disabled-001-ref.html deleted file mode 100644 index 15f99ceb0c6b..000000000000 --- a/layout/reftests/css-display/display-flow-root-disabled-001-ref.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - Reference: display:flow-root (disabled) - - - - - -
- -
x
-
-
- -
-
-
- -
-
- x -
- - -
x
-
- -
- - - - - - diff --git a/layout/reftests/css-display/reftest.list b/layout/reftests/css-display/reftest.list index 60e97d3d9ca4..d09842c55eff 100644 --- a/layout/reftests/css-display/reftest.list +++ b/layout/reftests/css-display/reftest.list @@ -28,5 +28,4 @@ asserts(1) asserts-if(styloVsGecko,2) == display-contents-xbl-5.xul display-cont == display-contents-writing-mode-1.html display-contents-writing-mode-1-ref.html == display-contents-writing-mode-2.html display-contents-writing-mode-2-ref.html needs-focus == display-contents-state-change.html display-contents-state-change-ref.html -pref(layout.css.display-flow-root.enabled,true) == display-flow-root-001.html display-flow-root-001-ref.html -pref(layout.css.display-flow-root.enabled,false) fails-if(styloVsGecko||stylo) == display-flow-root-001.html display-flow-root-disabled-001-ref.html +== display-flow-root-001.html display-flow-root-001-ref.html \ No newline at end of file diff --git a/layout/reftests/svg/smil/container/reftest.list b/layout/reftests/svg/smil/container/reftest.list index 0fe56d6c52b3..d58a3e839695 100644 --- a/layout/reftests/svg/smil/container/reftest.list +++ b/layout/reftests/svg/smil/container/reftest.list @@ -5,8 +5,8 @@ random == enveloped-tree-1.xhtml enveloped-tree-1-ref.xhtml # bug 470868 fuzzy-if(cocoaWidget&&layersGPUAccelerated,1,3) fuzzy-if(skiaContent,1,810) == promoted-tree-1.xhtml promoted-tree-1-ref.xhtml random == moved-tree-1.xhtml moved-tree-1-ref.xhtml # bug 470868 -random-if(cocoaWidget||d2d) fails-if(styloVsGecko||stylo) == deferred-anim-1.xhtml deferred-anim-1-ref.xhtml # bug 470868, bug 585484 -random-if(cocoaWidget&&layersGPUAccelerated) fails-if(styloVsGecko||stylo) == deferred-tree-1.xhtml deferred-tree-1-ref.xhtml # bug 470868 +random-if(cocoaWidget||d2d) == deferred-anim-1.xhtml deferred-anim-1-ref.xhtml # bug 470868, bug 585484 +random-if(cocoaWidget&&layersGPUAccelerated) == deferred-tree-1.xhtml deferred-tree-1-ref.xhtml # bug 470868 random-if(cocoaWidget&&layersGPUAccelerated) fuzzy-if(skiaContent,1,530) == deferred-tree-2a.xhtml deferred-tree-2-ref.xhtml # bug 470868 random-if(cocoaWidget&&layersGPUAccelerated) fuzzy-if(skiaContent,1,530) == deferred-tree-2b.xhtml deferred-tree-2-ref.xhtml # bug 470868 fuzzy-if(cocoaWidget&&layersGPUAccelerated,1,16) fuzzy-if(skiaContent,1,410) == deferred-tree-3a.xhtml deferred-tree-3-ref.xhtml diff --git a/layout/reftests/svg/smil/event/reftest.list b/layout/reftests/svg/smil/event/reftest.list index 84463e19703d..02b845b076c6 100644 --- a/layout/reftests/svg/smil/event/reftest.list +++ b/layout/reftests/svg/smil/event/reftest.list @@ -1,32 +1,32 @@ # Tests related to SVG Animation (using SMIL) that use event timing. -fails-if(styloVsGecko||stylo) == event-begin-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == event-begin-offset-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == event-begin-offset-2.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == event-begin-timeevent-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == event-begin-timeevent-2.svg green-box-ref.svg -random-if(Android) fails-if(styloVsGecko||stylo) == event-begin-timeevent-3.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == event-begin-load-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == event-bubble-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == event-custom-1.svg green-box-ref.svg +== event-begin-1.svg green-box-ref.svg +== event-begin-offset-1.svg green-box-ref.svg +== event-begin-offset-2.svg green-box-ref.svg +== event-begin-timeevent-1.svg green-box-ref.svg +== event-begin-timeevent-2.svg green-box-ref.svg +random-if(Android) == event-begin-timeevent-3.svg green-box-ref.svg +== event-begin-load-1.svg green-box-ref.svg +== event-bubble-1.svg green-box-ref.svg +== event-custom-1.svg green-box-ref.svg == event-end-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == event-end-2.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == event-end-open-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == event-end-trimmed-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == event-preventDefault-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == event-seek-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == event-target-default-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == event-target-default-2.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == event-target-id-change-1.svg green-box-ref.svg +== event-end-2.svg green-box-ref.svg +== event-end-open-1.svg green-box-ref.svg +== event-end-trimmed-1.svg green-box-ref.svg +== event-preventDefault-1.svg green-box-ref.svg +== event-seek-1.svg green-box-ref.svg +== event-target-default-1.svg green-box-ref.svg +== event-target-default-2.svg green-box-ref.svg +== event-target-id-change-1.svg green-box-ref.svg == event-target-id-change-2.svg green-box-ref.svg == event-target-id-change-3.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == event-target-xlink-change-1.svg green-box-ref.svg +== event-target-xlink-change-1.svg green-box-ref.svg == event-target-xlink-change-2.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == event-target-xlink-change-3.svg green-box-ref.svg +== event-target-xlink-change-3.svg green-box-ref.svg == event-target-xlink-change-4.svg green-box-ref.svg == event-target-surgery-1.svg green-box-ref.svg == event-target-surgery-2.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == event-target-surgery-3.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == event-target-non-svg-1.xhtml green-box-ref.xhtml -fails-if(styloVsGecko||stylo) == accesskey-entity-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == accesskey-entity-2.svg green-box-ref.svg +== event-target-surgery-3.svg green-box-ref.svg +== event-target-non-svg-1.xhtml green-box-ref.xhtml +== accesskey-entity-1.svg green-box-ref.svg +== accesskey-entity-2.svg green-box-ref.svg diff --git a/layout/reftests/svg/smil/reftest.list b/layout/reftests/svg/smil/reftest.list index 42f644e8c2a0..e3d4316ae0aa 100644 --- a/layout/reftests/svg/smil/reftest.list +++ b/layout/reftests/svg/smil/reftest.list @@ -168,8 +168,8 @@ fails-if(styloVsGecko||stylo) == anim-paintserver-1.svg anim-paintserver-1-ref.s == anim-text-attr-01.svg anim-text-attr-01-ref.svg # animate where the base value is non-interpolatable but will be replaced anyway -fails-if(styloVsGecko||stylo) == anim-fill-overpaintserver-1.svg lime.svg -fails-if(styloVsGecko||stylo) == anim-fill-overpaintserver-2.svg lime.svg +== anim-fill-overpaintserver-1.svg lime.svg +== anim-fill-overpaintserver-2.svg lime.svg # animate where we fallback from 'additive' animation to non-additive fails-if(styloVsGecko||stylo) == anim-additive-fallback-1.svg anim-standard-ref.svg @@ -183,7 +183,7 @@ fails-if(styloVsGecko||stylo) == anim-additive-fallback-1.svg anim-standard-ref. == anim-remove-7.svg anim-standard-ref.svg == anim-remove-8css.svg anim-standard-ref.svg == anim-remove-8xml.svg anim-standard-ref.svg -fails-if(styloVsGecko||stylo) == anim-remove-9.svg anim-standard-ref.svg +== anim-remove-9.svg anim-standard-ref.svg == anim-retarget-1.svg anim-standard-ref.svg == anim-retarget-2.svg anim-standard-ref.svg == anim-retarget-3.svg anim-standard-ref.svg @@ -248,18 +248,18 @@ fuzzy-if(cocoaWidget&&layersGPUAccelerated,1,2) == anim-gradient-attr-presence-0 == freeze-applied-late-4.svg anim-standard-ref.svg == frozen-to-anim-1.svg lime.svg -fails-if(styloVsGecko||stylo) == inactivate-with-active-unchanged-1.svg anim-standard-ref.svg -fails-if(styloVsGecko||stylo) == inactivate-with-active-unchanged-2.svg anim-standard-ref.svg +== inactivate-with-active-unchanged-1.svg anim-standard-ref.svg +== inactivate-with-active-unchanged-2.svg anim-standard-ref.svg -fails-if(styloVsGecko||stylo) == mapped-attr-long-url-1.svg lime.svg -fails-if(styloVsGecko||stylo) == mapped-attr-long-url-2.svg lime.svg +== mapped-attr-long-url-1.svg lime.svg +== mapped-attr-long-url-2.svg lime.svg == min-1.svg lime.svg -fails-if(styloVsGecko||stylo) == smil-transitions-interaction-1a.svg lime.svg -fails-if(styloVsGecko||stylo) == smil-transitions-interaction-1b.svg lime.svg -fails-if(styloVsGecko||stylo) == smil-transitions-interaction-2a.svg lime.svg -fails-if(styloVsGecko||stylo) == smil-transitions-interaction-2b.svg lime.svg +== smil-transitions-interaction-1a.svg lime.svg +== smil-transitions-interaction-1b.svg lime.svg +== smil-transitions-interaction-2a.svg lime.svg +== smil-transitions-interaction-2b.svg lime.svg == smil-transitions-interaction-3a.svg lime.svg == smil-transitions-interaction-3b.svg lime.svg == smil-transitions-interaction-4a.svg lime.svg @@ -271,7 +271,7 @@ fails-if(styloVsGecko||stylo) == smil-transitions-interaction-2b.svg lime.svg # Test animation using defs element fails-if(styloVsGecko||stylo) == anim-defs-gradient-property.svg lime.svg == anim-defs-gradient-attribute.svg lime.svg -fails-if(styloVsGecko||stylo) == anim-defs-fill.svg lime.svg +== anim-defs-fill.svg lime.svg == anim-defs-width.svg lime.svg # Test animation that changes 'display' attribute diff --git a/layout/reftests/svg/smil/repeat/reftest.list b/layout/reftests/svg/smil/repeat/reftest.list index a54b7d22aec4..9249500c7c45 100644 --- a/layout/reftests/svg/smil/repeat/reftest.list +++ b/layout/reftests/svg/smil/repeat/reftest.list @@ -1,3 +1,3 @@ # Tests for repeat behaviour -fails-if(styloVsGecko||stylo) == indefinite-repeat-1.svg green-box-ref.svg +== indefinite-repeat-1.svg green-box-ref.svg == init-repeat-1.svg init-repeat-1-ref.svg diff --git a/layout/reftests/svg/smil/restart/reftest.list b/layout/reftests/svg/smil/restart/reftest.list index 77e913a2e977..98ed6d4b13bf 100644 --- a/layout/reftests/svg/smil/restart/reftest.list +++ b/layout/reftests/svg/smil/restart/reftest.list @@ -1,8 +1,8 @@ # Tests for restart behaviour == reset-1.svg reset-1-ref.svg == reset-2.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == reset-3.svg green-box-ref.svg +== reset-3.svg green-box-ref.svg == reset-4.svg green-box-ref.svg # reset-5.svg is no longer valid and has been removed -fails-if(styloVsGecko||stylo) == reset-6.svg green-box-ref.svg +== reset-6.svg green-box-ref.svg == reset-7.svg green-box-ref.svg diff --git a/layout/reftests/svg/smil/style/reftest.list b/layout/reftests/svg/smil/style/reftest.list index d96c309c0dff..363022b843de 100644 --- a/layout/reftests/svg/smil/style/reftest.list +++ b/layout/reftests/svg/smil/style/reftest.list @@ -22,28 +22,28 @@ fuzzy-if(skiaContent,1,580) == anim-css-color-3-from-by-rgb-ident.svg anim-cs # 'fill' property, from/to/by with named colors & hex values fuzzy-if(skiaContent,1,550) fails-if(styloVsGecko||stylo) == anim-css-fill-1-by-ident-hex.svg anim-css-fill-1-ref.svg -fuzzy-if(skiaContent,1,550) fails-if(styloVsGecko||stylo) == anim-css-fill-1-from-by-hex-hex.svg anim-css-fill-1-ref.svg -fuzzy-if(skiaContent,1,550) fails-if(styloVsGecko||stylo) == anim-css-fill-1-from-by-ident-hex.svg anim-css-fill-1-ref.svg -fuzzy-if(skiaContent,1,550) fails-if(styloVsGecko||stylo) == anim-css-fill-1-from-to-hex-hex.svg anim-css-fill-1-ref.svg -fuzzy-if(skiaContent,1,550) fails-if(styloVsGecko||stylo) == anim-css-fill-1-from-to-ident-ident.svg anim-css-fill-1-ref.svg -fuzzy-if(skiaContent,1,550) fails-if(styloVsGecko||stylo) == anim-css-fill-1-to-ident-hex.svg anim-css-fill-1-ref.svg -fuzzy-if(skiaContent,1,550) fails-if(styloVsGecko||stylo) == anim-css-fill-1-to-ident-ident.svg anim-css-fill-1-ref.svg +fuzzy-if(skiaContent,1,550) == anim-css-fill-1-from-by-hex-hex.svg anim-css-fill-1-ref.svg +fuzzy-if(skiaContent,1,550) == anim-css-fill-1-from-by-ident-hex.svg anim-css-fill-1-ref.svg +fuzzy-if(skiaContent,1,550) == anim-css-fill-1-from-to-hex-hex.svg anim-css-fill-1-ref.svg +fuzzy-if(skiaContent,1,550) == anim-css-fill-1-from-to-ident-ident.svg anim-css-fill-1-ref.svg +fuzzy-if(skiaContent,1,550) == anim-css-fill-1-to-ident-hex.svg anim-css-fill-1-ref.svg +fuzzy-if(skiaContent,1,550) == anim-css-fill-1-to-ident-ident.svg anim-css-fill-1-ref.svg # 'fill' property, from/to/by, with 'currentColor' keyword fuzzy-if(skiaContent,1,550) fails-if(styloVsGecko||stylo) == anim-css-fill-1-by-ident-curcol.svg anim-css-fill-1-ref.svg -fuzzy-if(skiaContent,1,550) fails-if(styloVsGecko||stylo) == anim-css-fill-1-from-by-curcol-hex.svg anim-css-fill-1-ref.svg -fuzzy-if(skiaContent,1,550) fails-if(styloVsGecko||stylo) == anim-css-fill-1-from-by-hex-curcol.svg anim-css-fill-1-ref.svg -fuzzy-if(skiaContent,1,550) fails-if(styloVsGecko||stylo) == anim-css-fill-1-from-to-curcol-hex.svg anim-css-fill-1-ref.svg -fuzzy-if(skiaContent,1,550) fails-if(styloVsGecko||stylo) == anim-css-fill-1-from-to-hex-curcol.svg anim-css-fill-1-ref.svg -fuzzy-if(skiaContent,1,550) fails-if(styloVsGecko||stylo) == anim-css-fill-1-to-ident-curcol.svg anim-css-fill-1-ref.svg +fuzzy-if(skiaContent,1,550) == anim-css-fill-1-from-by-curcol-hex.svg anim-css-fill-1-ref.svg +fuzzy-if(skiaContent,1,550) == anim-css-fill-1-from-by-hex-curcol.svg anim-css-fill-1-ref.svg +fuzzy-if(skiaContent,1,550) == anim-css-fill-1-from-to-curcol-hex.svg anim-css-fill-1-ref.svg +fuzzy-if(skiaContent,1,550) == anim-css-fill-1-from-to-hex-curcol.svg anim-css-fill-1-ref.svg +fuzzy-if(skiaContent,1,550) == anim-css-fill-1-to-ident-curcol.svg anim-css-fill-1-ref.svg # 'fill' property, paced calcMode fails-if(styloVsGecko||stylo) == anim-css-fill-2-paced-rgb.svg anim-css-fill-2-ref.svg # 'fill' property, animating *by* a named color fuzzy-if(skiaContent,1,580) fails-if(styloVsGecko||stylo) == anim-css-fill-3-by-ident-ident.svg anim-css-fill-3-ref.svg -fuzzy-if(skiaContent,1,580) fails-if(styloVsGecko||stylo) == anim-css-fill-3-from-by-ident-ident.svg anim-css-fill-3-ref.svg -fuzzy-if(skiaContent,1,580) fails-if(styloVsGecko||stylo) == anim-css-fill-3-from-by-rgb-ident.svg anim-css-fill-3-ref.svg +fuzzy-if(skiaContent,1,580) == anim-css-fill-3-from-by-ident-ident.svg anim-css-fill-3-ref.svg +fuzzy-if(skiaContent,1,580) == anim-css-fill-3-from-by-rgb-ident.svg anim-css-fill-3-ref.svg # check handling of overflowing color values # NOTE: The second test fails because we compute "from + by" as the animation @@ -52,7 +52,7 @@ fuzzy-if(skiaContent,1,580) fails-if(styloVsGecko||stylo) == anim-css-fill-3-fro # us to clamp -- we're only supposed to clamp *final presentation values*. # (Reference: SVG 1.1 Appendix F.4) fails-if(styloVsGecko||stylo) == anim-css-fill-overflow-1-by.svg anim-css-fill-overflow-1-ref.svg -fails == anim-css-fill-overflow-1-from-by.svg anim-css-fill-overflow-1-ref.svg +fails-if(!stylo) == anim-css-fill-overflow-1-from-by.svg anim-css-fill-overflow-1-ref.svg # 'fill-opacity' property fuzzy-if(skiaContent,1,885) fails-if(styloVsGecko||stylo) == anim-css-fillopacity-1-by.svg anim-css-fillopacity-1-ref.svg diff --git a/layout/reftests/svg/smil/syncbase/reftest.list b/layout/reftests/svg/smil/syncbase/reftest.list index d08c82b2432d..52728b2a538c 100644 --- a/layout/reftests/svg/smil/syncbase/reftest.list +++ b/layout/reftests/svg/smil/syncbase/reftest.list @@ -1,48 +1,48 @@ # Tests related to SVG Animation (using SMIL) that use syncbase timing. # New intervals -fails-if(styloVsGecko||stylo) == new-interval-simple-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-simple-2.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-negative-offset-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-negative-offset-2.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-negative-offset-3.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-negative-offset-4.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-negative-syncbase-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-restart-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-restart-2.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-restart-3.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-early-end-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-early-end-2.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-early-end-3.svg green-box-ref.svg +== new-interval-simple-1.svg green-box-ref.svg +== new-interval-simple-2.svg green-box-ref.svg +== new-interval-negative-offset-1.svg green-box-ref.svg +== new-interval-negative-offset-2.svg green-box-ref.svg +== new-interval-negative-offset-3.svg green-box-ref.svg +== new-interval-negative-offset-4.svg green-box-ref.svg +== new-interval-negative-syncbase-1.svg green-box-ref.svg +== new-interval-restart-1.svg green-box-ref.svg +== new-interval-restart-2.svg green-box-ref.svg +== new-interval-restart-3.svg green-box-ref.svg +== new-interval-early-end-1.svg green-box-ref.svg +== new-interval-early-end-2.svg green-box-ref.svg +== new-interval-early-end-3.svg green-box-ref.svg == new-interval-early-end-4.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-early-end-5.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-early-end-6.svg green-box-ref.svg +== new-interval-early-end-5.svg green-box-ref.svg +== new-interval-early-end-6.svg green-box-ref.svg == new-interval-early-end-7.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-doubly-dependent-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-doubly-dependent-2.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-doubly-dependent-3.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-triply-dependent-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-triply-dependent-2.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-end-negative-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-end-negative-2.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-end-dep-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-chain-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-chain-2.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-sample-order-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == new-interval-freeze-begin-1.svg green-box-ref.svg +== new-interval-doubly-dependent-1.svg green-box-ref.svg +== new-interval-doubly-dependent-2.svg green-box-ref.svg +== new-interval-doubly-dependent-3.svg green-box-ref.svg +== new-interval-triply-dependent-1.svg green-box-ref.svg +== new-interval-triply-dependent-2.svg green-box-ref.svg +== new-interval-end-negative-1.svg green-box-ref.svg +== new-interval-end-negative-2.svg green-box-ref.svg +== new-interval-end-dep-1.svg green-box-ref.svg +== new-interval-chain-1.svg green-box-ref.svg +== new-interval-chain-2.svg green-box-ref.svg +== new-interval-sample-order-1.svg green-box-ref.svg +== new-interval-freeze-begin-1.svg green-box-ref.svg # Changing intervals -fails-if(styloVsGecko||stylo) == changed-interval-simple-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == changed-interval-simple-2.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == changed-interval-simple-3.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == changed-interval-simple-4.svg green-box-ref.svg +== changed-interval-simple-1.svg green-box-ref.svg +== changed-interval-simple-2.svg green-box-ref.svg +== changed-interval-simple-3.svg green-box-ref.svg +== changed-interval-simple-4.svg green-box-ref.svg == changed-interval-simple-5.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == changed-interval-resolved-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == changed-interval-resolved-2.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == changed-interval-sort-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == changed-interval-change-spec-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == changed-interval-change-spec-2.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == changed-interval-change-spec-3.svg green-box-ref.svg +== changed-interval-resolved-1.svg green-box-ref.svg +== changed-interval-resolved-2.svg green-box-ref.svg +== changed-interval-sort-1.svg green-box-ref.svg +== changed-interval-change-spec-1.svg green-box-ref.svg +== changed-interval-change-spec-2.svg green-box-ref.svg +== changed-interval-change-spec-3.svg green-box-ref.svg == changed-interval-change-spec-4.svg green-box-ref.svg # Deleted intervals @@ -53,47 +53,47 @@ fails-if(styloVsGecko||stylo) == changed-interval-change-spec-3.svg green-box-re == deleted-interval-simple-5.svg green-box-ref.svg # Trimmed intervals -fails-if(styloVsGecko||stylo) == trimmed-interval-1.svg green-box-ref.svg +== trimmed-interval-1.svg green-box-ref.svg # Cyclic dependencies -fails-if(styloVsGecko||stylo) == cycle-ok-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == cycle-ok-2.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == cycle-ok-3.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == cycle-ok-4.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == cycle-ok-5.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == cycle-self-ref-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == cycle-self-ref-2.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == cycle-self-ref-3.svg green-box-ref.svg +== cycle-ok-1.svg green-box-ref.svg +== cycle-ok-2.svg green-box-ref.svg +== cycle-ok-3.svg green-box-ref.svg +== cycle-ok-4.svg green-box-ref.svg +== cycle-ok-5.svg green-box-ref.svg +== cycle-self-ref-1.svg green-box-ref.svg +== cycle-self-ref-2.svg green-box-ref.svg +== cycle-self-ref-3.svg green-box-ref.svg == cycle-self-ref-4.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == cycle-self-ref-5.svg green-box-ref.svg +== cycle-self-ref-5.svg green-box-ref.svg == cycle-invalid-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == cycle-invalid-2.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == cycle-invalid-3.svg green-box-ref.svg +== cycle-invalid-2.svg green-box-ref.svg +== cycle-invalid-3.svg green-box-ref.svg == cycle-invalid-4.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == cycle-change-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == cycle-change-2.svg green-box-ref.svg +== cycle-change-1.svg green-box-ref.svg +== cycle-change-2.svg green-box-ref.svg == cycle-delete-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == cycle-recursion-1.svg green-box-ref.svg +== cycle-recursion-1.svg green-box-ref.svg == cycle-recursion-2.svg green-box-ref.svg # Animation sandwich priority -fails-if(styloVsGecko||stylo) == sandwich-priority-1.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == sandwich-priority-2.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == sandwich-priority-3.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == sandwich-priority-4.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == sandwich-priority-5.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == sandwich-priority-6.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == sandwich-priority-7.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == sandwich-priority-8.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == sandwich-priority-9.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == sandwich-priority-10.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == sandwich-priority-11.svg green-box-ref.svg -fails-if(styloVsGecko||stylo) == sandwich-priority-12.svg green-box-ref.svg +== sandwich-priority-1.svg green-box-ref.svg +== sandwich-priority-2.svg green-box-ref.svg +== sandwich-priority-3.svg green-box-ref.svg +== sandwich-priority-4.svg green-box-ref.svg +== sandwich-priority-5.svg green-box-ref.svg +== sandwich-priority-6.svg green-box-ref.svg +== sandwich-priority-7.svg green-box-ref.svg +== sandwich-priority-8.svg green-box-ref.svg +== sandwich-priority-9.svg green-box-ref.svg +== sandwich-priority-10.svg green-box-ref.svg +== sandwich-priority-11.svg green-box-ref.svg +== sandwich-priority-12.svg green-box-ref.svg # Cross-time container dependencies -fails-if(styloVsGecko||stylo) == cross-container-1.xhtml green-box-ref.xhtml +== cross-container-1.xhtml green-box-ref.xhtml == cross-container-2.xhtml green-box-ref.xhtml -fails-if(styloVsGecko||stylo) == cross-container-3.xhtml green-box-ref.xhtml +== cross-container-3.xhtml green-box-ref.xhtml # Filtering -fails-if(styloVsGecko||stylo) == filtered-interval-1.svg green-box-ref.svg +== filtered-interval-1.svg green-box-ref.svg diff --git a/layout/style/Loader.cpp b/layout/style/Loader.cpp index 0da5ef549f2a..62755fddaa2a 100644 --- a/layout/style/Loader.cpp +++ b/layout/style/Loader.cpp @@ -1412,10 +1412,10 @@ Loader::InsertChildSheet(StyleSheet* aSheet, MOZ_ASSERT(aParentSheet, "Need a parent to insert into"); MOZ_ASSERT_IF(aSheet->IsGecko(), aGeckoParentRule && !aServoChildSheet); MOZ_ASSERT_IF(aSheet->IsServo(), aServoChildSheet && !aGeckoParentRule); + // child sheets should always start out enabled, even if they got + // cloned off of top-level sheets which were disabled + aSheet->SetEnabled(true); if (aSheet->IsGecko()) { - // child sheets should always start out enabled, even if they got - // cloned off of top-level sheets which were disabled - aSheet->AsGecko()->SetEnabled(true); aGeckoParentRule->SetSheet(aSheet->AsGecko()); // This sets the ownerRule on the sheet } else { if (!aSheet->AsServo()->RawSheet()) { @@ -1900,8 +1900,7 @@ Loader::DoSheetComplete(SheetLoadData* aLoadData, nsresult aStatus, // If mSheetAlreadyComplete, then the sheet could well be modified between // when we posted the async call to SheetComplete and now, since the sheet // was page-accessible during that whole time. - MOZ_ASSERT(!(data->mSheet->IsGecko() && - data->mSheet->AsGecko()->IsModified()), + MOZ_ASSERT(!data->mSheet->IsModified(), "should not get marked modified during parsing"); data->mSheet->SetComplete(); data->ScheduleLoadEventIfNeeded(aStatus); diff --git a/layout/style/ServoBindings.toml b/layout/style/ServoBindings.toml index 6370cf0862ec..baad9246d7c0 100644 --- a/layout/style/ServoBindings.toml +++ b/layout/style/ServoBindings.toml @@ -281,7 +281,7 @@ opaque-types = [ "nsTObserverArray", # <- Inherits from nsAutoTObserverArray "nsTHashtable", # <- Inheriting from inner typedefs that clang # doesn't expose properly. - "nsRefPtrHashtable", "nsDataHashtable", "nsClassHashtable", # <- Ditto + "nsBaseHashtable", "nsRefPtrHashtable", "nsDataHashtable", "nsClassHashtable", # <- Ditto "nsInterfaceHashtable", # <- Ditto "nsIDocument_SelectorCache", # <- Inherits from nsExpirationTracker<.., 4> "nsIPresShell_ScrollAxis", # <- For some reason the alignment of this is 4 diff --git a/layout/style/ServoElementSnapshot.cpp b/layout/style/ServoElementSnapshot.cpp index bb1987388aca..b404caa98e6b 100644 --- a/layout/style/ServoElementSnapshot.cpp +++ b/layout/style/ServoElementSnapshot.cpp @@ -14,6 +14,8 @@ namespace mozilla { ServoElementSnapshot::ServoElementSnapshot(const Element* aElement) : mState(0) , mContains(Flags(0)) + , mIsTableBorderNonzero(false) + , mIsMozBrowserFrame(false) { MOZ_COUNT_CTOR(ServoElementSnapshot); mIsHTMLElementInHTMLDocument = @@ -53,4 +55,23 @@ ServoElementSnapshot::AddAttrs(Element* aElement) } } +void +ServoElementSnapshot::AddOtherPseudoClassState(Element* aElement) +{ + MOZ_ASSERT(aElement); + + if (HasOtherPseudoClassState()) { + return; + } + + mIsTableBorderNonzero = + *nsCSSPseudoClasses::MatchesElement(CSSPseudoClassType::mozTableBorderNonzero, + aElement); + mIsMozBrowserFrame = + *nsCSSPseudoClasses::MatchesElement(CSSPseudoClassType::mozBrowserFrame, + aElement); + + mContains |= Flags::OtherPseudoClassState; +} + } // namespace mozilla diff --git a/layout/style/ServoElementSnapshot.h b/layout/style/ServoElementSnapshot.h index bee003fab7d6..ebcc14dd7b7b 100644 --- a/layout/style/ServoElementSnapshot.h +++ b/layout/style/ServoElementSnapshot.h @@ -48,6 +48,7 @@ enum class ServoElementSnapshotFlags : uint8_t Attributes = 1 << 1, Id = 1 << 2, MaybeClass = 1 << 3, + OtherPseudoClassState = 1 << 4, }; MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(ServoElementSnapshotFlags) @@ -75,6 +76,11 @@ public: bool HasState() const { return HasAny(Flags::State); } + bool HasOtherPseudoClassState() const + { + return HasAny(Flags::OtherPseudoClassState); + } + /** * Captures the given state (if not previously captured). */ @@ -91,6 +97,12 @@ public: */ void AddAttrs(Element* aElement); + /** + * Captures some other pseudo-class matching state not included in + * EventStates. + */ + void AddOtherPseudoClassState(Element* aElement); + /** * Needed methods for attribute matching. */ @@ -140,6 +152,18 @@ public: bool HasAny(Flags aFlags) const { return bool(mContains & aFlags); } + bool IsTableBorderNonzero() const + { + MOZ_ASSERT(HasOtherPseudoClassState()); + return mIsTableBorderNonzero; + } + + bool IsMozBrowserFrame() const + { + MOZ_ASSERT(HasOtherPseudoClassState()); + return mIsMozBrowserFrame; + } + private: // TODO: Profile, a 1 or 2 element AutoTArray could be worth it, given we know // we're dealing with attribute changes when we take snapshots of attributes, @@ -148,8 +172,10 @@ private: nsTArray mAttrs; ServoStateType mState; Flags mContains; - bool mIsHTMLElementInHTMLDocument; - bool mIsInChromeDocument; + bool mIsHTMLElementInHTMLDocument : 1; + bool mIsInChromeDocument : 1; + bool mIsTableBorderNonzero : 1; + bool mIsMozBrowserFrame : 1; }; } // namespace mozilla diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index 74ac7114e847..17a169ea750c 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -6695,6 +6695,33 @@ GetEnumColorValue(nsCSSKeyword aKeyword, bool aIsChrome) return Some(value); } +/// Returns the number of digits in a positive number +/// assuming it has <= 6 digits +static uint32_t +CountNumbersForHashlessColor(uint32_t number) { + /// Just use a simple match instead of calculating a log + /// or dividing in a loop to be more efficient. + if (number < 10) { + return 1; + } else if (number < 100) { + return 2; + } else if (number < 1000) { + return 3; + } else if (number < 10000) { + return 4; + } else if (number < 100000) { + return 5; + } else if (number < 1000000) { + return 6; + } else { + // we don't care about numbers with more than 6 digits other + // than the fact that they have more than 6 digits, so just return something + // larger than 6 here. This is incorrect in the general case. + return 100; + } +} + + CSSParseResult CSSParserImpl::ParseColor(nsCSSValue& aValue) { @@ -6804,16 +6831,20 @@ CSSParserImpl::ParseColor(nsCSSValue& aValue) // try 'xxyyzz' without '#' prefix for compatibility with IE and Nav4x (bug 23236 and 45804) if (mHashlessColorQuirk) { + // https://quirks.spec.whatwg.org/#the-hashless-hex-color-quirk + // // - If the string starts with 'a-f', the nsCSSScanner builds the // token as a eCSSToken_Ident and we can parse the string as a // 'xxyyzz' RGB color. - // - If it only contains '0-9' digits, the token is a + // - If it only contains up to six '0-9' digits, the token is a // eCSSToken_Number and it must be converted back to a 6 - // characters string to be parsed as a RGB color. + // characters string to be parsed as a RGB color. The number cannot + // be specified as more than six digits. // - If it starts with '0-9' and contains any 'a-f', the token is a // eCSSToken_Dimension, the mNumber part must be converted back to // a string and the mIdent part must be appended to that string so - // that the resulting string has 6 characters. + // that the resulting string has 6 characters. The combined + // dimension cannot be longer than 6 characters. // Note: This is a hack for Nav compatibility. Do not attempt to // simplify it by hacking into the ncCSSScanner. This would be very // bad. @@ -6825,15 +6856,17 @@ CSSParserImpl::ParseColor(nsCSSValue& aValue) break; case eCSSToken_Number: - if (tk->mIntegerValid) { + if (tk->mIntegerValid && tk->mInteger < 1000000 && tk->mInteger >= 0) { SprintfLiteral(buffer, "%06d", tk->mInteger); str.AssignWithConversion(buffer); } break; case eCSSToken_Dimension: - if (tk->mIdent.Length() <= 6) { - SprintfLiteral(buffer, "%06.0f", tk->mNumber); + if (tk->mIntegerValid && + tk->mIdent.Length() + CountNumbersForHashlessColor(tk->mInteger) <= 6 && + tk->mInteger >= 0) { + SprintfLiteral(buffer, "%06d", tk->mInteger); nsAutoString temp; temp.AssignWithConversion(buffer); temp.Right(str, 6 - tk->mIdent.Length()); diff --git a/layout/style/nsCSSProps.cpp b/layout/style/nsCSSProps.cpp index 2079b118a163..b92a14833931 100644 --- a/layout/style/nsCSSProps.cpp +++ b/layout/style/nsCSSProps.cpp @@ -1294,7 +1294,6 @@ KTableEntry nsCSSProps::kDisplayKTable[] = { { eCSSKeyword__webkit_flex, StyleDisplay::Flex }, { eCSSKeyword__webkit_inline_flex, StyleDisplay::InlineFlex }, { eCSSKeyword_contents, StyleDisplay::Contents }, - // The next entry is controlled by the layout.css.display-flow-root.enabled pref. { eCSSKeyword_flow_root, StyleDisplay::FlowRoot }, { eCSSKeyword_UNKNOWN, -1 } }; diff --git a/layout/style/nsLayoutStylesheetCache.cpp b/layout/style/nsLayoutStylesheetCache.cpp index 2e4a45eb45a9..275e6fc61d29 100644 --- a/layout/style/nsLayoutStylesheetCache.cpp +++ b/layout/style/nsLayoutStylesheetCache.cpp @@ -256,10 +256,10 @@ nsLayoutStylesheetCache::Shutdown() { gCSSLoader_Gecko = nullptr; gCSSLoader_Servo = nullptr; - MOZ_ASSERT(!gStyleCache_Gecko || !gUserContentSheetURL_Gecko, - "Got the URL but never used by Gecko?"); - MOZ_ASSERT(!gStyleCache_Servo || !gUserContentSheetURL_Servo, - "Got the URL but never used by Servo?"); + NS_WARNING_ASSERTION(!gStyleCache_Gecko || !gUserContentSheetURL_Gecko, + "Got the URL but never used by Gecko?"); + NS_WARNING_ASSERTION(!gStyleCache_Servo || !gUserContentSheetURL_Servo, + "Got the URL but never used by Servo?"); gStyleCache_Gecko = nullptr; gStyleCache_Servo = nullptr; gUserContentSheetURL_Gecko = nullptr; diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index 8559616344b7..6632e9a8139b 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -7852,9 +7852,7 @@ if (IsCSSPropertyPrefEnabled("layout.css.float-logical-values.enabled")) { gCSSProperties["clear"].invalid_values.push("inline-end"); } -if (IsCSSPropertyPrefEnabled("layout.css.display-flow-root.enabled")) { - gCSSProperties["display"].other_values.push("flow-root"); -} +gCSSProperties["display"].other_values.push("flow-root"); // Copy aliased properties' fields from their alias targets. for (var prop in gCSSProperties) { diff --git a/layout/style/test/stylo-failures.md b/layout/style/test/stylo-failures.md index 1a8b032645dc..dcf34b062403 100644 --- a/layout/style/test/stylo-failures.md +++ b/layout/style/test/stylo-failures.md @@ -113,7 +113,7 @@ to mochitest command. * getComputedStyle style doesn't contain custom properties bug 1336891 * test_variable_serialization_computed.html [35] * test_variables.html `custom property name` [2] -* test_css_supports.html: issues around @supports syntax servo/servo#15482 [7] +* test_css_supports.html: issues around @supports syntax servo/servo#15482 [2] * test_author_specified_style.html: support serializing color as author specified bug 1348165 [27] * browser_newtab_share_rule_processors.js: agent style sheet sharing [1] * :visited support (bug 1328509) diff --git a/mfbt/Assertions.h b/mfbt/Assertions.h index bf1a0e534d21..2910d10cb9b5 100644 --- a/mfbt/Assertions.h +++ b/mfbt/Assertions.h @@ -315,7 +315,11 @@ MOZ_CrashPrintf(const char* aFilename, int aLine, const char* aFormat, ...); #define MOZ_CRASH_UNSAFE_PRINTF(format, ...) \ do { \ static_assert( \ - MOZ_PASTE_PREFIX_AND_ARG_COUNT(, __VA_ARGS__) <= sPrintfMaxArgs, \ + MOZ_ARG_COUNT(__VA_ARGS__) > 0, \ + "Did you forget arguments to MOZ_CRASH_UNSAFE_PRINTF? " \ + "Or maybe you want MOZ_CRASH instead?"); \ + static_assert( \ + MOZ_ARG_COUNT(__VA_ARGS__) <= sPrintfMaxArgs, \ "Only up to 4 additional arguments are allowed!"); \ static_assert(sizeof(format) <= sPrintfCrashReasonSize, \ "The supplied format string is too long!"); \ @@ -446,14 +450,14 @@ struct AssertionConditionType # define MOZ_ASSERT(...) do { } while (0) #endif /* DEBUG */ -#ifdef RELEASE_OR_BETA +#if defined(NIGHTLY_BUILD) || defined(MOZ_DEV_EDITION) +# define MOZ_DIAGNOSTIC_ASSERT MOZ_RELEASE_ASSERT +# define MOZ_DIAGNOSTIC_ASSERT_ENABLED 1 +#else # define MOZ_DIAGNOSTIC_ASSERT MOZ_ASSERT # ifdef DEBUG # define MOZ_DIAGNOSTIC_ASSERT_ENABLED 1 # endif -#else -# define MOZ_DIAGNOSTIC_ASSERT MOZ_RELEASE_ASSERT -# define MOZ_DIAGNOSTIC_ASSERT_ENABLED 1 #endif /* diff --git a/mfbt/MacroArgs.h b/mfbt/MacroArgs.h index 1f77dd0c43ad..7f55cc7f0326 100644 --- a/mfbt/MacroArgs.h +++ b/mfbt/MacroArgs.h @@ -16,44 +16,35 @@ #define MOZ_CONCAT(x, y) MOZ_CONCAT2(x, y) /* - * MOZ_PASTE_PREFIX_AND_ARG_COUNT(aPrefix, ...) counts the number of variadic - * arguments and prefixes it with |aPrefix|. For example: + * MOZ_ARG_COUNT(...) counts the number of variadic arguments. + * You must pass in between 0 and 50 (inclusive) variadic arguments. + * For example: * - * MOZ_PASTE_PREFIX_AND_ARG_COUNT(, foo, 42) expands to 2 - * MOZ_PASTE_PREFIX_AND_ARG_COUNT(A, foo, 42, bar) expands to A3 - * MOZ_PASTE_PREFIX_AND_ARG_COUNT(A) expands to A0 - * MOZ_PASTE_PREFIX_AND_ARG_COUNT() expands to 0, but MSVC warns there - * aren't enough arguments given. - * - * You must pass in between 0 and 50 (inclusive) variadic arguments, past - * |aPrefix|. + * MOZ_ARG_COUNT() expands to 0 + * MOZ_ARG_COUNT(a) expands to 1 + * MOZ_ARG_COUNT(a, b) expands to 2 * + * Implementation notes: * The `##__VA_ARGS__` form is a GCC extension that removes the comma if * __VA_ARGS__ is empty. It is supported by Clang too. MSVC ignores ##, * and its default behavior is already to strip the comma when __VA_ARGS__ * is empty. * - * So MOZ_MACROARGS_ARG_COUNT_HELPER(prefix) expands to - * (_, prefix50, prefix49, ...) - * MOZ_MACROARGS_ARG_COUNT_HELPER(prefix, a) expands to - * (_, a, prefix50, prefix49, ...) + * So MOZ_MACROARGS_ARG_COUNT_HELPER() expands to + * (_, 50, 49, ...) + * MOZ_MACROARGS_ARG_COUNT_HELPER(a) expands to + * (_, a, 50, 49, ...) * etc. */ -#define MOZ_PASTE_PREFIX_AND_ARG_COUNT(aPrefix, ...) \ - MOZ_MACROARGS_ARG_COUNT_HELPER2( \ - MOZ_MACROARGS_ARG_COUNT_HELPER(aPrefix, ##__VA_ARGS__)) +#define MOZ_ARG_COUNT(...) \ + MOZ_MACROARGS_ARG_COUNT_HELPER2(MOZ_MACROARGS_ARG_COUNT_HELPER(__VA_ARGS__)) -#define MOZ_MACROARGS_ARG_COUNT_HELPER(aPrefix, ...) (_, ##__VA_ARGS__, \ - aPrefix##50, aPrefix##49, aPrefix##48, aPrefix##47, aPrefix##46, \ - aPrefix##45, aPrefix##44, aPrefix##43, aPrefix##42, aPrefix##41, \ - aPrefix##40, aPrefix##39, aPrefix##38, aPrefix##37, aPrefix##36, \ - aPrefix##35, aPrefix##34, aPrefix##33, aPrefix##32, aPrefix##31, \ - aPrefix##30, aPrefix##29, aPrefix##28, aPrefix##27, aPrefix##26, \ - aPrefix##25, aPrefix##24, aPrefix##23, aPrefix##22, aPrefix##21, \ - aPrefix##20, aPrefix##19, aPrefix##18, aPrefix##17, aPrefix##16, \ - aPrefix##15, aPrefix##14, aPrefix##13, aPrefix##12, aPrefix##11, \ - aPrefix##10, aPrefix##9, aPrefix##8, aPrefix##7, aPrefix##6, \ - aPrefix##5, aPrefix##4, aPrefix##3, aPrefix##2, aPrefix##1, aPrefix##0) +#define MOZ_MACROARGS_ARG_COUNT_HELPER(...) (_, ##__VA_ARGS__, \ + 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, \ + 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, \ + 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, \ + 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, \ + 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0) #define MOZ_MACROARGS_ARG_COUNT_HELPER2(aArgs) \ MOZ_MACROARGS_ARG_COUNT_HELPER3 aArgs @@ -66,6 +57,24 @@ a41, a42, a43, a44, a45, a46, a47, a48, a49, a50, \ a51, ...) a51 +/* + * MOZ_PASTE_PREFIX_AND_ARG_COUNT(aPrefix, ...) counts the number of variadic + * arguments and prefixes it with |aPrefix|. For example: + * + * MOZ_PASTE_PREFIX_AND_ARG_COUNT(, foo, 42) expands to 2 + * MOZ_PASTE_PREFIX_AND_ARG_COUNT(A, foo, 42, bar) expands to A3 + * MOZ_PASTE_PREFIX_AND_ARG_COUNT(A) expands to A0 + * MOZ_PASTE_PREFIX_AND_ARG_COUNT() expands to 0, but MSVC warns there + * aren't enough arguments given. + * + * You must pass in between 0 and 50 (inclusive) variadic arguments, past + * |aPrefix|. + */ +#define MOZ_PASTE_PREFIX_AND_ARG_COUNT_GLUE(a, b) a b +#define MOZ_PASTE_PREFIX_AND_ARG_COUNT(aPrefix, ...) \ + MOZ_PASTE_PREFIX_AND_ARG_COUNT_GLUE( \ + MOZ_CONCAT, (aPrefix, MOZ_ARG_COUNT(__VA_ARGS__))) + /* * MOZ_ARGS_AFTER_N expands to its arguments excluding the first |N| * arguments. For example: diff --git a/mfbt/Variant.h b/mfbt/Variant.h index cf8d1046f905..71ed4722c908 100644 --- a/mfbt/Variant.h +++ b/mfbt/Variant.h @@ -234,7 +234,7 @@ struct VariantImplementation if (aRhs.template is()) { ::new (KnownNotNull, aLhs) T(aRhs.template extract()); } else { - Next::moveConstruct(aLhs, aRhs); + Next::moveConstruct(aLhs, Move(aRhs)); } } diff --git a/mfbt/tests/TestMacroArgs.cpp b/mfbt/tests/TestMacroArgs.cpp index 235170d27f0c..f9d1a0fd9062 100644 --- a/mfbt/tests/TestMacroArgs.cpp +++ b/mfbt/tests/TestMacroArgs.cpp @@ -6,6 +6,11 @@ #include "mozilla/MacroArgs.h" +static_assert(MOZ_ARG_COUNT() == 0, ""); +static_assert(MOZ_ARG_COUNT(a) == 1, ""); +static_assert(MOZ_ARG_COUNT(a, b) == 2, ""); +static_assert(MOZ_ARG_COUNT(a, b, c) == 3, ""); + static_assert(MOZ_PASTE_PREFIX_AND_ARG_COUNT(100) == 1000, ""); static_assert(MOZ_PASTE_PREFIX_AND_ARG_COUNT(100, a) == 1001, ""); static_assert(MOZ_PASTE_PREFIX_AND_ARG_COUNT(100, a, b) == 1002, ""); diff --git a/mfbt/tests/TestMacroForEach.cpp b/mfbt/tests/TestMacroForEach.cpp index 2379add7f712..c9c8b88bbe00 100644 --- a/mfbt/tests/TestMacroForEach.cpp +++ b/mfbt/tests/TestMacroForEach.cpp @@ -16,6 +16,9 @@ static_assert(MOZ_FOR_EACH_SEPARATED(HELPER_IDENTITY, (+), static_assert(MOZ_FOR_EACH_SEPARATED(HELPER_IDENTITY, (+), (), (1, 1, 1)) == 3, ""); +#define HELPER_ONE_PLUS(x) HELPER_IDENTITY_PLUS(1) +static_assert(MOZ_FOR_EACH(HELPER_ONE_PLUS, (), ()) 0 == 0, ""); + #define HELPER_DEFINE_VAR(x) const int test1_##x = x; MOZ_FOR_EACH(HELPER_DEFINE_VAR, (), (10, 20)) static_assert(test1_10 == 10 && test1_20 == 20, ""); diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 2db1be804dc6..27c2617cad32 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -354,9 +354,6 @@ pref("media.play-stand-alone", true); pref("media.hardware-video-decoding.enabled", true); pref("media.hardware-video-decoding.force-enabled", false); -#ifdef MOZ_DIRECTSHOW -pref("media.directshow.enabled", true); -#endif #ifdef MOZ_FMP4 pref("media.mp4.enabled", true); // Specifies whether the PDMFactory can create a test decoder that @@ -2889,9 +2886,6 @@ pref("layout.css.grid-template-subgrid-value.enabled", false); // Is support for CSS contain enabled? pref("layout.css.contain.enabled", false); -// Is support for CSS display:flow-root enabled? -pref("layout.css.display-flow-root.enabled", true); - // Is support for CSS box-decoration-break enabled? pref("layout.css.box-decoration-break.enabled", true); diff --git a/old-configure.in b/old-configure.in index 7f29bb483ea0..db7ac3c90e2f 100644 --- a/old-configure.in +++ b/old-configure.in @@ -2185,7 +2185,6 @@ MOZ_VORBIS= MOZ_TREMOR= MOZ_SAMPLE_TYPE_FLOAT32= MOZ_SAMPLE_TYPE_S16= -MOZ_DIRECTSHOW= MOZ_WEBRTC=1 MOZ_PEERCONNECTION= MOZ_SRTP= @@ -2793,23 +2792,6 @@ if test -n "$MOZ_APPLEMEDIA"; then fi fi # COMPILE_ENVIRONMENT -dnl ======================================================== -dnl = DirectShow support -dnl ======================================================== -if test "$OS_ARCH" = "WINNT"; then - dnl Enable DirectShow support by default. - MOZ_DIRECTSHOW=1 -fi - -MOZ_ARG_DISABLE_BOOL(directshow, -[ --disable-directshow Disable support for DirectShow], - MOZ_DIRECTSHOW=, - MOZ_DIRECTSHOW=1) - -if test -n "$MOZ_DIRECTSHOW"; then - AC_DEFINE(MOZ_DIRECTSHOW) -fi; - dnl ======================================================== dnl = Built-in fragmented MP4 support. dnl ======================================================== @@ -5335,7 +5317,6 @@ AC_SUBST(MOZ_VORBIS) AC_SUBST(MOZ_TREMOR) AC_SUBST(MOZ_FFVPX) AC_SUBST_LIST(FFVPX_ASFLAGS) -AC_SUBST(MOZ_DIRECTSHOW) AC_SUBST(MOZ_ANDROID_OMX) AC_SUBST(MOZ_OMX_PLUGIN) AC_SUBST(VPX_USE_YASM) diff --git a/services/common/blocklist-clients.js b/services/common/blocklist-clients.js index a2e1188d92be..84600f93c45f 100644 --- a/services/common/blocklist-clients.js +++ b/services/common/blocklist-clients.js @@ -27,6 +27,8 @@ XPCOMUtils.defineLazyModuleGetter(this, "FirefoxAdapter", "resource://services-common/kinto-storage-adapter.js"); XPCOMUtils.defineLazyModuleGetter(this, "CanonicalJSON", "resource://gre/modules/CanonicalJSON.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "UptakeTelemetry", + "resource://services-common/uptake-telemetry.js"); const KEY_APPDIR = "XCurProcD"; const PREF_SETTINGS_SERVER = "services.settings.server"; @@ -203,6 +205,7 @@ class BlocklistClient { } let sqliteHandle; + let reportStatus = null; try { // Synchronize remote data into a local Sqlite DB. sqliteHandle = await FirefoxAdapter.openConnection({path: KINTO_STORAGE_PATH}); @@ -233,6 +236,7 @@ class BlocklistClient { // to record the fact that a check happened. if (lastModified <= collectionLastModified) { this.updateLastCheck(serverTime); + reportStatus = UptakeTelemetry.STATUS.UP_TO_DATE; return; } @@ -240,16 +244,25 @@ class BlocklistClient { try { const {ok} = await collection.sync({remote}); if (!ok) { + // Some synchronization conflicts occured. + reportStatus = UptakeTelemetry.STATUS.CONFLICT_ERROR; throw new Error("Sync failed"); } } catch (e) { if (e.message == INVALID_SIGNATURE) { + // Signature verification failed during synchronzation. + reportStatus = UptakeTelemetry.STATUS.SIGNATURE_ERROR; // if sync fails with a signature error, it's likely that our // local data has been modified in some way. // We will attempt to fix this by retrieving the whole // remote collection. const payload = await fetchRemoteCollection(remote, collection); - await this.validateCollectionSignature(remote, payload, collection, {ignoreLocal: true}); + try { + await this.validateCollectionSignature(remote, payload, collection, {ignoreLocal: true}); + } catch (e) { + reportStatus = UptakeTelemetry.STATUS.SIGNATURE_RETRY_ERROR; + throw e; + } // if the signature is good (we haven't thrown), and the remote // last_modified is newer than the local last_modified, replace the // local data @@ -259,18 +272,46 @@ class BlocklistClient { await collection.loadDump(payload.data); } } else { + // The sync has thrown, it can be a network or a general error. + if (/NetworkError/.test(e.message)) { + reportStatus = UptakeTelemetry.STATUS.NETWORK_ERROR; + } else if (/Backoff/.test(e.message)) { + reportStatus = UptakeTelemetry.STATUS.BACKOFF; + } else { + reportStatus = UptakeTelemetry.STATUS.SYNC_ERROR; + } throw e; } } // Read local collection of records. const {data} = await collection.list(); - await this.processCallback(data); + // Handle the obtained records (ie. apply locally). + try { + await this.processCallback(data); + } catch (e) { + reportStatus = UptakeTelemetry.STATUS.APPLY_ERROR; + throw e; + } // Track last update. this.updateLastCheck(serverTime); + } catch (e) { + // No specific error was tracked, mark it as unknown. + if (reportStatus === null) { + reportStatus = UptakeTelemetry.STATUS.UNKNOWN_ERROR; + } + throw e; } finally { - await sqliteHandle.close(); + if (sqliteHandle) { + await sqliteHandle.close(); + } + // No error was reported, this is a success! + if (reportStatus === null) { + reportStatus = UptakeTelemetry.STATUS.SUCCESS; + } + // Report success/error status to Telemetry. + UptakeTelemetry.report(this.identifier, reportStatus); } } diff --git a/services/common/blocklist-updater.js b/services/common/blocklist-updater.js index 78c72d777433..8dbb89870382 100644 --- a/services/common/blocklist-updater.js +++ b/services/common/blocklist-updater.js @@ -9,6 +9,8 @@ const { classes: Cc, Constructor: CC, interfaces: Ci, utils: Cu } = Components; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); Cu.importGlobalProperties(["fetch"]); +XPCOMUtils.defineLazyModuleGetter(this, "UptakeTelemetry", + "resource://services-common/uptake-telemetry.js"); const PREF_SETTINGS_SERVER = "services.settings.server"; const PREF_SETTINGS_SERVER_BACKOFF = "services.settings.server.backoff"; @@ -17,6 +19,9 @@ const PREF_BLOCKLIST_LAST_UPDATE = "services.blocklist.last_update_second const PREF_BLOCKLIST_LAST_ETAG = "services.blocklist.last_etag"; const PREF_BLOCKLIST_CLOCK_SKEW_SECONDS = "services.blocklist.clock_skew_seconds"; +// Telemetry update source identifier. +const TELEMETRY_HISTOGRAM_KEY = "settings-changes-monitoring"; + XPCOMUtils.defineLazyGetter(this, "gBlocklistClients", function() { const BlocklistClients = Cu.import("resource://services-common/blocklist-clients.js", {}); @@ -33,6 +38,56 @@ XPCOMUtils.defineLazyGetter(this, "gBlocklistClients", function() { this.addTestBlocklistClient = (name, client) => { gBlocklistClients[name] = client; } +async function pollChanges(url, lastEtag) { + // + // Fetch a versionInfo object from the server that looks like: + // {"data":[ + // { + // "host":"kinto-ota.dev.mozaws.net", + // "last_modified":1450717104423, + // "bucket":"blocklists", + // "collection":"certificates" + // }]} + + // Use ETag to obtain a `304 Not modified` when no change occurred. + const headers = {}; + if (lastEtag) { + headers["If-None-Match"] = lastEtag; + } + const response = await fetch(url, {headers}); + + let versionInfo = []; + // If no changes since last time, go on with empty list of changes. + if (response.status != 304) { + let payload; + try { + payload = await response.json(); + } catch (e) {} + if (!payload.hasOwnProperty("data")) { + // If the server is failing, the JSON response might not contain the + // expected data (e.g. error response - Bug 1259145) + throw new Error(`Server error response ${JSON.stringify(payload)}`); + } + versionInfo = payload.data; + } + // The server should always return ETag. But we've had situations where the CDN + // was interfering. + const currentEtag = response.headers.has("ETag") ? response.headers.get("ETag") : undefined; + const serverTimeMillis = Date.parse(response.headers.get("Date")); + + // Check if the server asked the clients to back off. + let backoffSeconds; + if (response.headers.has("Backoff")) { + const value = parseInt(response.headers.get("Backoff"), 10); + if (!isNaN(value)) { + backoffSeconds = value; + } + } + + return {versionInfo, currentEtag, serverTimeMillis, backoffSeconds}; +} + + // This is called by the ping mechanism. // returns a promise that rejects if something goes wrong this.checkVersions = async function() { @@ -41,69 +96,66 @@ this.checkVersions = async function() { const backoffReleaseTime = Services.prefs.getCharPref(PREF_SETTINGS_SERVER_BACKOFF); const remainingMilliseconds = parseInt(backoffReleaseTime, 10) - Date.now(); if (remainingMilliseconds > 0) { + // Backoff time has not elapsed yet. + UptakeTelemetry.report(TELEMETRY_HISTOGRAM_KEY, + UptakeTelemetry.STATUS.BACKOFF); throw new Error(`Server is asking clients to back off; retry in ${Math.ceil(remainingMilliseconds / 1000)}s.`); } else { Services.prefs.clearUserPref(PREF_SETTINGS_SERVER_BACKOFF); } } - // Fetch a versionInfo object that looks like: - // {"data":[ - // { - // "host":"kinto-ota.dev.mozaws.net", - // "last_modified":1450717104423, - // "bucket":"blocklists", - // "collection":"certificates" - // }]} // Right now, we only use the collection name and the last modified info const kintoBase = Services.prefs.getCharPref(PREF_SETTINGS_SERVER); const changesEndpoint = kintoBase + Services.prefs.getCharPref(PREF_BLOCKLIST_CHANGES_PATH); - // Use ETag to obtain a `304 Not modified` when no change occurred. - const headers = {}; + let lastEtag; if (Services.prefs.prefHasUserValue(PREF_BLOCKLIST_LAST_ETAG)) { - const lastEtag = Services.prefs.getCharPref(PREF_BLOCKLIST_LAST_ETAG); - if (lastEtag) { - headers["If-None-Match"] = lastEtag; + lastEtag = Services.prefs.getCharPref(PREF_BLOCKLIST_LAST_ETAG); + } + + let pollResult; + try { + pollResult = await pollChanges(changesEndpoint, lastEtag); + } catch (e) { + // Report polling error to Uptake Telemetry. + let report; + if (/Server/.test(e.message)) { + report = UptakeTelemetry.STATUS.SERVER_ERROR; + } else if (/NetworkError/.test(e.message)) { + report = UptakeTelemetry.STATUS.NETWORK_ERROR; + } else { + report = UptakeTelemetry.STATUS.UNKNOWN_ERROR; } + UptakeTelemetry.report(TELEMETRY_HISTOGRAM_KEY, report); + // No need to go further. + throw new Error(`Polling for changes failed: ${e.message}.`); } - const response = await fetch(changesEndpoint, {headers}); + const {serverTimeMillis, versionInfo, currentEtag, backoffSeconds} = pollResult; - // Check if the server asked the clients to back off. - if (response.headers.has("Backoff")) { - const backoffSeconds = parseInt(response.headers.get("Backoff"), 10); - if (!isNaN(backoffSeconds)) { - const backoffReleaseTime = Date.now() + backoffSeconds * 1000; - Services.prefs.setCharPref(PREF_SETTINGS_SERVER_BACKOFF, backoffReleaseTime); - } + // Report polling success to Uptake Telemetry. + const report = versionInfo.length == 0 ? UptakeTelemetry.STATUS.UP_TO_DATE + : UptakeTelemetry.STATUS.SUCCESS; + UptakeTelemetry.report(TELEMETRY_HISTOGRAM_KEY, report); + + // Check if the server asked the clients to back off (for next poll). + if (backoffSeconds) { + const backoffReleaseTime = Date.now() + backoffSeconds * 1000; + Services.prefs.setCharPref(PREF_SETTINGS_SERVER_BACKOFF, backoffReleaseTime); } - let versionInfo; - // No changes since last time. Go on with empty list of changes. - if (response.status == 304) { - versionInfo = {data: []}; - } else { - versionInfo = await response.json(); - } - - // If the server is failing, the JSON response might not contain the - // expected data (e.g. error response - Bug 1259145) - if (!versionInfo.hasOwnProperty("data")) { - throw new Error("Polling for changes failed."); - } - - // Record new update time and the difference between local and server time - const serverTimeMillis = Date.parse(response.headers.get("Date")); - - // negative clockDifference means local time is behind server time + // Record new update time and the difference between local and server time. + // Negative clockDifference means local time is behind server time // by the absolute of that value in seconds (positive means it's ahead) const clockDifference = Math.floor((Date.now() - serverTimeMillis) / 1000); Services.prefs.setIntPref(PREF_BLOCKLIST_CLOCK_SKEW_SECONDS, clockDifference); Services.prefs.setIntPref(PREF_BLOCKLIST_LAST_UPDATE, serverTimeMillis / 1000); + // Iterate through the collections version info and initiate a synchronization + // on the related blocklist client. let firstError; - for (let collectionInfo of versionInfo.data) { + for (const collectionInfo of versionInfo) { const {bucket, collection, last_modified: lastModified} = collectionInfo; const client = gBlocklistClients[collection]; if (client && client.bucketName == bucket) { @@ -122,8 +174,7 @@ this.checkVersions = async function() { } // Save current Etag for next poll. - if (response.headers.has("ETag")) { - const currentEtag = response.headers.get("ETag"); + if (currentEtag) { Services.prefs.setCharPref(PREF_BLOCKLIST_LAST_ETAG, currentEtag); } }; diff --git a/services/common/moz.build b/services/common/moz.build index d543cc9ac4f9..3f5e43cd8fc7 100644 --- a/services/common/moz.build +++ b/services/common/moz.build @@ -23,6 +23,7 @@ EXTRA_JS_MODULES['services-common'] += [ 'logmanager.js', 'observers.js', 'rest.js', + 'uptake-telemetry.js', 'utils.js', ] diff --git a/services/common/tests/unit/head_helpers.js b/services/common/tests/unit/head_helpers.js index 98adde009183..69bee9c38e23 100644 --- a/services/common/tests/unit/head_helpers.js +++ b/services/common/tests/unit/head_helpers.js @@ -159,3 +159,22 @@ function uninstallFakePAC() { _("Uninstalling fake PAC."); MockRegistrar.unregister(fakePACCID); } + + +function getUptakeTelemetrySnapshot(key) { + Cu.import("resource://gre/modules/Services.jsm"); + const TELEMETRY_HISTOGRAM_ID = "UPTAKE_REMOTE_CONTENT_RESULT_1"; + return Services.telemetry + .getKeyedHistogramById(TELEMETRY_HISTOGRAM_ID) + .snapshot(key); +} + +function checkUptakeTelemetry(snapshot1, snapshot2, expectedIncrements) { + const LABELS = ["up_to_date", "success", "backoff", "pref_disabled", "parse_error", "content_error", "sign_error", "sign_retry_error", "conflict_error", "sync_error", "apply_error", "server_error", "certificate_error", "download_error", "timeout_error", "network_error", "offline_error", "cleanup_error", "unknown_error", "custom_1_error", "custom_2_error", "custom_3_error", "custom_4_error", "custom_5_error"]; + for (const label of LABELS) { + const key = LABELS.indexOf(label); + const expected = expectedIncrements[label] || 0; + const actual = snapshot2.counts[key] - snapshot1.counts[key]; + equal(expected, actual, `check histogram count for ${label}`); + } +} diff --git a/services/common/tests/unit/test_blocklist_clients.js b/services/common/tests/unit/test_blocklist_clients.js index 1ea00dcb927c..0c99e8b49f81 100644 --- a/services/common/tests/unit/test_blocklist_clients.js +++ b/services/common/tests/unit/test_blocklist_clients.js @@ -9,6 +9,7 @@ const { OS } = Cu.import("resource://gre/modules/osfile.jsm", {}); const { Kinto } = Cu.import("resource://services-common/kinto-offline-client.js", {}); const { FirefoxAdapter } = Cu.import("resource://services-common/kinto-storage-adapter.js", {}); const BlocklistClients = Cu.import("resource://services-common/blocklist-clients.js", {}); +const { UptakeTelemetry } = Cu.import("resource://services-common/uptake-telemetry.js", {}); const BinaryInputStream = CC("@mozilla.org/binaryinputstream;1", "nsIBinaryInputStream", "setInputStream"); @@ -190,13 +191,14 @@ add_task(function* test_sends_reload_message_when_blocklist_has_changes() { }); add_task(clear_state); -add_task(function* test_do_nothing_when_blocklist_is_up_to_date() { +add_task(function* test_telemetry_reports_up_to_date() { for (let {client} of gBlocklistClients) { yield client.maybeSync(2000, Date.now() - 1000, {loadDump: false}); const filePath = OS.Path.join(OS.Constants.Path.profileDir, client.filename); const profFile = new FileUtils.File(filePath); const fileLastModified = profFile.lastModifiedTime = profFile.lastModifiedTime - 1000; const serverTime = Date.now(); + const startHistogram = getUptakeTelemetrySnapshot(client.identifier); yield client.maybeSync(3000, serverTime); @@ -205,11 +207,86 @@ add_task(function* test_do_nothing_when_blocklist_is_up_to_date() { // Server time was updated. const after = Services.prefs.getIntPref(client.lastCheckTimePref); equal(after, Math.round(serverTime / 1000)); + // No Telemetry was sent. + const endHistogram = getUptakeTelemetrySnapshot(client.identifier); + const expectedIncrements = {[UptakeTelemetry.STATUS.UP_TO_DATE]: 1}; + checkUptakeTelemetry(startHistogram, endHistogram, expectedIncrements); } }); add_task(clear_state); +add_task(function* test_telemetry_if_sync_succeeds() { + // We test each client because Telemetry requires preleminary declarations. + for (let {client} of gBlocklistClients) { + const serverTime = Date.now(); + const startHistogram = getUptakeTelemetrySnapshot(client.identifier); + yield client.maybeSync(2000, serverTime, {loadDump: false}); + + const endHistogram = getUptakeTelemetrySnapshot(client.identifier); + const expectedIncrements = {[UptakeTelemetry.STATUS.SUCCESS]: 1}; + checkUptakeTelemetry(startHistogram, endHistogram, expectedIncrements); + } +}); +add_task(clear_state); + +add_task(function* test_telemetry_reports_if_application_fails() { + const {client} = gBlocklistClients[0]; + const serverTime = Date.now(); + const startHistogram = getUptakeTelemetrySnapshot(client.identifier); + const backup = client.processCallback; + client.processCallback = () => { throw new Error("boom"); }; + + try { + yield client.maybeSync(2000, serverTime, {loadDump: false}); + } catch (e) {} + + client.processCallback = backup; + + const endHistogram = getUptakeTelemetrySnapshot(client.identifier); + const expectedIncrements = {[UptakeTelemetry.STATUS.APPLY_ERROR]: 1}; + checkUptakeTelemetry(startHistogram, endHistogram, expectedIncrements); +}); +add_task(clear_state); + +add_task(function* test_telemetry_reports_if_sync_fails() { + const {client} = gBlocklistClients[0]; + const serverTime = Date.now(); + + const sqliteHandle = yield FirefoxAdapter.openConnection({path: kintoFilename}); + const collection = kintoCollection(client.collectionName, sqliteHandle); + yield collection.db.saveLastModified(9999); + yield sqliteHandle.close(); + + const startHistogram = getUptakeTelemetrySnapshot(client.identifier); + + try { + yield client.maybeSync(10000, serverTime); + } catch (e) {} + + const endHistogram = getUptakeTelemetrySnapshot(client.identifier); + const expectedIncrements = {[UptakeTelemetry.STATUS.SYNC_ERROR]: 1}; + checkUptakeTelemetry(startHistogram, endHistogram, expectedIncrements); +}); +add_task(clear_state); + +add_task(function* test_telemetry_reports_unknown_errors() { + const {client} = gBlocklistClients[0]; + const serverTime = Date.now(); + const backup = FirefoxAdapter.openConnection; + FirefoxAdapter.openConnection = () => { throw new Error("Internal"); }; + const startHistogram = getUptakeTelemetrySnapshot(client.identifier); + + try { + yield client.maybeSync(2000, serverTime); + } catch (e) {} + + FirefoxAdapter.openConnection = backup; + const endHistogram = getUptakeTelemetrySnapshot(client.identifier); + const expectedIncrements = {[UptakeTelemetry.STATUS.UNKNOWN_ERROR]: 1}; + checkUptakeTelemetry(startHistogram, endHistogram, expectedIncrements); +}); +add_task(clear_state); // get a response for a given request from sample data function getSampleResponse(req, port) { @@ -406,6 +483,20 @@ function getSampleResponse(req, port) { "os": "Darwin 11", "featureStatus": "BLOCKED_DEVICE" }]}) + }, + "GET:/v1/buckets/blocklists/collections/addons/records?_sort=-last_modified&_since=9999": { + "sampleHeaders": [ + "Access-Control-Allow-Origin: *", + "Access-Control-Expose-Headers: Retry-After, Content-Length, Alert, Backoff", + "Content-Type: application/json; charset=UTF-8", + "Server: waitress", + ], + "status": {status: 503, statusText: "Service Unavailable"}, + "responseBody": JSON.stringify({ + code: 503, + errno: 999, + error: "Service Unavailable", + }) } }; return responses[`${req.method}:${req.path}?${req.queryString}`] || diff --git a/services/common/tests/unit/test_blocklist_signatures.js b/services/common/tests/unit/test_blocklist_signatures.js index 43528b8c5242..9289f3c66c98 100644 --- a/services/common/tests/unit/test_blocklist_signatures.js +++ b/services/common/tests/unit/test_blocklist_signatures.js @@ -7,6 +7,7 @@ const { Kinto } = Cu.import("resource://services-common/kinto-offline-client.js" const { FirefoxAdapter } = Cu.import("resource://services-common/kinto-storage-adapter.js", {}); const { NetUtil } = Cu.import("resource://gre/modules/NetUtil.jsm", {}); const { OneCRLBlocklistClient } = Cu.import("resource://services-common/blocklist-clients.js", {}); +const { UptakeTelemetry } = Cu.import("resource://services-common/uptake-telemetry.js", {}); let server; @@ -16,6 +17,9 @@ const PREF_BLOCKLIST_ONECRL_COLLECTION = "services.blocklist.onecrl.collection"; const PREF_SETTINGS_SERVER = "services.settings.server"; const PREF_SIGNATURE_ROOT = "security.content.signature.root_hash"; +// Telemetry reports. +const TELEMETRY_HISTOGRAM_KEY = OneCRLBlocklistClient.identifier; + const kintoFilename = "kinto.sqlite"; const CERT_DIR = "test_blocklist_signatures/"; @@ -301,11 +305,19 @@ add_task(function* test_check_signatures() { // .. and use this map to register handlers for each path registerHandlers(emptyCollectionResponses); + let startHistogram = getUptakeTelemetrySnapshot(TELEMETRY_HISTOGRAM_KEY); + // With all of this set up, we attempt a sync. This will resolve if all is // well and throw if something goes wrong. // We don't want to load initial json dumps in this test suite. yield OneCRLBlocklistClient.maybeSync(1000, startTime, {loadDump: false}); + let endHistogram = getUptakeTelemetrySnapshot(TELEMETRY_HISTOGRAM_KEY); + + // ensure that a success histogram is tracked when a succesful sync occurs. + let expectedIncrements = {[UptakeTelemetry.STATUS.SUCCESS]: 1}; + checkUptakeTelemetry(startHistogram, endHistogram, expectedIncrements); + // Check that some additions (2 records) to the collection have a valid // signature. @@ -442,8 +454,19 @@ add_task(function* test_check_signatures() { }; registerHandlers(badSigGoodSigResponses); + + startHistogram = getUptakeTelemetrySnapshot(TELEMETRY_HISTOGRAM_KEY); + yield OneCRLBlocklistClient.maybeSync(5000, startTime); + endHistogram = getUptakeTelemetrySnapshot(TELEMETRY_HISTOGRAM_KEY); + + // ensure that the failure count is incremented for a succesful sync with an + // (initial) bad signature - only SERVICES_SETTINGS_SYNC_SIG_FAIL should + // increment. + expectedIncrements = {[UptakeTelemetry.STATUS.SIGNATURE_ERROR]: 1}; + checkUptakeTelemetry(startHistogram, endHistogram, expectedIncrements); + const badSigGoodOldResponses = { // In this test, we deliberately serve a bad signature initially. The // subsequent sitnature returned is a valid one for the three item @@ -483,6 +506,7 @@ add_task(function* test_check_signatures() { [RESPONSE_COMPLETE_INITIAL_SORTED_BY_ID] }; + startHistogram = getUptakeTelemetrySnapshot(TELEMETRY_HISTOGRAM_KEY); registerHandlers(allBadSigResponses); try { yield OneCRLBlocklistClient.maybeSync(6000, startTime); @@ -490,6 +514,11 @@ add_task(function* test_check_signatures() { } catch (e) { yield checkRecordCount(2); } + + // Ensure that the failure is reflected in the accumulated telemetry: + endHistogram = getUptakeTelemetrySnapshot(TELEMETRY_HISTOGRAM_KEY); + expectedIncrements = {[UptakeTelemetry.STATUS.SIGNATURE_RETRY_ERROR]: 1}; + checkUptakeTelemetry(startHistogram, endHistogram, expectedIncrements); }); function run_test() { diff --git a/services/common/tests/unit/test_blocklist_updater.js b/services/common/tests/unit/test_blocklist_updater.js index 888f465f96d5..aa4791d1d2f9 100644 --- a/services/common/tests/unit/test_blocklist_updater.js +++ b/services/common/tests/unit/test_blocklist_updater.js @@ -1,4 +1,5 @@ Cu.import("resource://testing-common/httpd.js"); +const { UptakeTelemetry } = Cu.import("resource://services-common/uptake-telemetry.js", {}); var server; @@ -8,6 +9,9 @@ const PREF_LAST_UPDATE = "services.blocklist.last_update_seconds"; const PREF_LAST_ETAG = "services.blocklist.last_etag"; const PREF_CLOCK_SKEW_SECONDS = "services.blocklist.clock_skew_seconds"; +// Telemetry report result. +const TELEMETRY_HISTOGRAM_KEY = "settings-changes-monitoring"; + // Check to ensure maybeSync is called with correct values when a changes // document contains information on when a collection was last modified add_task(function* test_check_maybeSync() { @@ -64,6 +68,9 @@ add_task(function* test_check_maybeSync() { do_check_eq(serverTime, 2000); } }); + + const startHistogram = getUptakeTelemetrySnapshot(TELEMETRY_HISTOGRAM_KEY); + yield updater.checkVersions(); // check the last_update is updated @@ -102,6 +109,7 @@ add_task(function* test_check_maybeSync() { response.setStatusLine(null, 503, "Service Unavailable"); } server.registerPathHandler(changesPath, simulateErrorResponse); + // checkVersions() fails with adequate error. let error; try { @@ -109,7 +117,7 @@ add_task(function* test_check_maybeSync() { } catch (e) { error = e; } - do_check_eq(error.message, "Polling for changes failed."); + do_check_true(/Polling for changes failed/.test(error.message)); // When an error occurs, last update was not overwritten (see Date header above). do_check_eq(Services.prefs.getIntPref(PREF_LAST_UPDATE), 2); @@ -150,6 +158,25 @@ add_task(function* test_check_maybeSync() { yield updater.checkVersions(); // Backoff tracking preference was cleared. do_check_false(Services.prefs.prefHasUserValue(PREF_SETTINGS_SERVER_BACKOFF)); + + + // Simulate a network error (to check telemetry report). + Services.prefs.setCharPref(PREF_SETTINGS_SERVER, "http://localhost:42/v1"); + try { + yield updater.checkVersions(); + } catch (e) {} + + const endHistogram = getUptakeTelemetrySnapshot(TELEMETRY_HISTOGRAM_KEY); + // ensure that we've accumulated the correct telemetry + const expectedIncrements = { + [UptakeTelemetry.STATUS.UP_TO_DATE]: 4, + [UptakeTelemetry.STATUS.SUCCESS]: 1, + [UptakeTelemetry.STATUS.BACKOFF]: 1, + [UptakeTelemetry.STATUS.SERVER_ERROR]: 1, + [UptakeTelemetry.STATUS.NETWORK_ERROR]: 1, + [UptakeTelemetry.STATUS.UNKNOWN_ERROR]: 0, + }; + checkUptakeTelemetry(startHistogram, endHistogram, expectedIncrements); }); function run_test() { diff --git a/services/common/tests/unit/test_uptake_telemetry.js b/services/common/tests/unit/test_uptake_telemetry.js new file mode 100644 index 000000000000..3111b92e94ea --- /dev/null +++ b/services/common/tests/unit/test_uptake_telemetry.js @@ -0,0 +1,32 @@ +const { UptakeTelemetry } = Cu.import("resource://services-common/uptake-telemetry.js", {}); + + +function run_test() { + run_next_test(); +} + +add_task(function* test_unknown_status_is_not_reported() { + const source = "update-source"; + const startHistogram = getUptakeTelemetrySnapshot(source); + + UptakeTelemetry.report(source, "unknown-status"); + + const endHistogram = getUptakeTelemetrySnapshot(source); + const expectedIncrements = {}; + checkUptakeTelemetry(startHistogram, endHistogram, expectedIncrements); +}); + +add_task(function* test_each_status_can_be_caught_in_snapshot() { + const source = "some-source"; + const startHistogram = getUptakeTelemetrySnapshot(source); + + const expectedIncrements = {}; + for (const label of Object.keys(UptakeTelemetry.STATUS)) { + const status = UptakeTelemetry.STATUS[label]; + UptakeTelemetry.report(source, status); + expectedIncrements[status] = 1; + } + + const endHistogram = getUptakeTelemetrySnapshot(source); + checkUptakeTelemetry(startHistogram, endHistogram, expectedIncrements); +}); diff --git a/services/common/tests/unit/xpcshell.ini b/services/common/tests/unit/xpcshell.ini index 0fce5fedae86..af7fef13b596 100644 --- a/services/common/tests/unit/xpcshell.ini +++ b/services/common/tests/unit/xpcshell.ini @@ -60,3 +60,5 @@ skip-if = os == "android" [test_storage_server.js] skip-if = os == "android" + +[test_uptake_telemetry.js] diff --git a/services/common/uptake-telemetry.js b/services/common/uptake-telemetry.js new file mode 100644 index 000000000000..cac7051f3c65 --- /dev/null +++ b/services/common/uptake-telemetry.js @@ -0,0 +1,94 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +"use strict"; + + +this.EXPORTED_SYMBOLS = ["UptakeTelemetry"]; + +const { utils: Cu } = Components; +const { Services } = Cu.import("resource://gre/modules/Services.jsm", {}); + + +// Telemetry report results. +const TELEMETRY_HISTOGRAM_ID = "UPTAKE_REMOTE_CONTENT_RESULT_1"; + +/** + * A Telemetry helper to report uptake of remote content. + */ +class UptakeTelemetry { + + /** + * Supported uptake statuses: + * + * - `UP_TO_DATE`: Local content was already up-to-date with remote content. + * - `SUCCESS`: Local content was updated successfully. + * - `BACKOFF`: Remote server asked clients to backoff. + * - `PARSE_ERROR`: Parsing server response has failed. + * - `CONTENT_ERROR`: Server response has unexpected content. + * - `PREF_DISABLED`: Update is disabled in user preferences. + * - `SIGNATURE_ERROR`: Signature verification after diff-based sync has failed. + * - `SIGNATURE_RETRY_ERROR`: Signature verification after full fetch has failed. + * - `CONFLICT_ERROR`: Some remote changes are in conflict with local changes. + * - `SYNC_ERROR`: Synchronization of remote changes has failed. + * - `APPLY_ERROR`: Application of changes locally has failed. + * - `SERVER_ERROR`: Server failed to respond. + * - `CERTIFICATE_ERROR`: Server certificate verification has failed. + * - `DOWNLOAD_ERROR`: Data could not be fully retrieved. + * - `TIMEOUT_ERROR`: Server response has timed out. + * - `NETWORK_ERROR`: Communication with server has failed. + * - `NETWORK_OFFLINE_ERROR`: Network not available. + * - `UNKNOWN_ERROR`: Uncategorized error. + * - `CLEANUP_ERROR`: Clean-up of temporary files has failed. + * - `CUSTOM_1_ERROR`: Update source specific error #1. + * - `CUSTOM_2_ERROR`: Update source specific error #2. + * - `CUSTOM_3_ERROR`: Update source specific error #3. + * - `CUSTOM_4_ERROR`: Update source specific error #4. + * - `CUSTOM_5_ERROR`: Update source specific error #5. + * + * @type {Object} + */ + static get STATUS() { + return { + UP_TO_DATE: "up_to_date", + SUCCESS: "success", + BACKOFF: "backoff", + PREF_DISABLED: "pref_disabled", + PARSE_ERROR: "parse_error", + CONTENT_ERROR: "content_error", + SIGNATURE_ERROR: "sign_error", + SIGNATURE_RETRY_ERROR: "sign_retry_error", + CONFLICT_ERROR: "conflict_error", + SYNC_ERROR: "sync_error", + APPLY_ERROR: "apply_error", + SERVER_ERROR: "server_error", + CERTIFICATE_ERROR: "certificate_error", + DOWNLOAD_ERROR: "download_error", + TIMEOUT_ERROR: "timeout_error", + NETWORK_ERROR: "network_error", + NETWORK_OFFLINE_ERROR: "offline_error", + CLEANUP_ERROR: "cleanup_error", + UNKNOWN_ERROR: "unknown_error", + CUSTOM_1_ERROR: "custom_1_error", + CUSTOM_2_ERROR: "custom_2_error", + CUSTOM_3_ERROR: "custom_3_error", + CUSTOM_4_ERROR: "custom_4_error", + CUSTOM_5_ERROR: "custom_5_error", + }; + } + + /** + * Reports the uptake status for the specified source. + * + * @param {string} source the identifier of the update source. + * @param {string} status the uptake status. + */ + static report(source, status) { + Services.telemetry + .getKeyedHistogramById(TELEMETRY_HISTOGRAM_ID) + .add(source, status); + } +} + +this.UptakeTelemetry = UptakeTelemetry; diff --git a/servo/Cargo.lock b/servo/Cargo.lock index b5981a9cf6bf..4f18fb7386d5 100644 --- a/servo/Cargo.lock +++ b/servo/Cargo.lock @@ -1456,9 +1456,7 @@ dependencies = [ name = "layout_tests" version = "0.0.1" dependencies = [ - "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "layout 0.0.1", - "script_layout_interface 0.0.1", "size_of_test 0.0.1", ] diff --git a/servo/components/selectors/matching.rs b/servo/components/selectors/matching.rs index 3a2ddfd998ad..3c269427421d 100644 --- a/servo/components/selectors/matching.rs +++ b/servo/components/selectors/matching.rs @@ -519,17 +519,6 @@ fn matches_simple_selector( where E: Element, F: FnMut(&E, ElementSelectorFlags), { - macro_rules! relation_if { - ($ex:expr, $flag:ident) => { - if $ex { - context.relations |= $flag; - true - } else { - false - } - } - } - match *selector { Component::Combinator(_) => unreachable!(), Component::PseudoElement(ref pseudo) => { diff --git a/servo/components/style/gecko/generated/atom_macro.rs b/servo/components/style/gecko/generated/atom_macro.rs index fc228e585f9e..6dcc03e4ffbb 100644 --- a/servo/components/style/gecko/generated/atom_macro.rs +++ b/servo/components/style/gecko/generated/atom_macro.rs @@ -786,6 +786,8 @@ cfg_if! { pub static nsGkAtoms_field: *mut nsIAtom; #[link_name = "_ZN9nsGkAtoms8fieldsetE"] pub static nsGkAtoms_fieldset: *mut nsIAtom; + #[link_name = "_ZN9nsGkAtoms4fileE"] + pub static nsGkAtoms_file: *mut nsIAtom; #[link_name = "_ZN9nsGkAtoms10figcaptionE"] pub static nsGkAtoms_figcaption: *mut nsIAtom; #[link_name = "_ZN9nsGkAtoms6figureE"] @@ -3938,6 +3940,14 @@ cfg_if! { pub static nsGkAtoms_ondevicechange: *mut nsIAtom; #[link_name = "_ZN9nsGkAtoms33mozinputrangeignorepreventdefaultE"] pub static nsGkAtoms_mozinputrangeignorepreventdefault: *mut nsIAtom; + #[link_name = "_ZN9nsGkAtoms13moz_extensionE"] + pub static nsGkAtoms_moz_extension: *mut nsIAtom; + #[link_name = "_ZN9nsGkAtoms18all_urlsPermissionE"] + pub static nsGkAtoms_all_urlsPermission: *mut nsIAtom; + #[link_name = "_ZN9nsGkAtoms4httpE"] + pub static nsGkAtoms_http: *mut nsIAtom; + #[link_name = "_ZN9nsGkAtoms5httpsE"] + pub static nsGkAtoms_https: *mut nsIAtom; #[link_name = "_ZN9nsGkAtoms12cdataTagNameE"] pub static nsGkAtoms_cdataTagName: *mut nsIAtom; #[link_name = "_ZN9nsGkAtoms14commentTagNameE"] @@ -5809,6 +5819,8 @@ cfg_if! { pub static nsGkAtoms_field: *mut nsIAtom; #[link_name = "?fieldset@nsGkAtoms@@2PEAVnsIAtom@@EA"] pub static nsGkAtoms_fieldset: *mut nsIAtom; + #[link_name = "?file@nsGkAtoms@@2PEAVnsIAtom@@EA"] + pub static nsGkAtoms_file: *mut nsIAtom; #[link_name = "?figcaption@nsGkAtoms@@2PEAVnsIAtom@@EA"] pub static nsGkAtoms_figcaption: *mut nsIAtom; #[link_name = "?figure@nsGkAtoms@@2PEAVnsIAtom@@EA"] @@ -8961,6 +8973,14 @@ cfg_if! { pub static nsGkAtoms_ondevicechange: *mut nsIAtom; #[link_name = "?mozinputrangeignorepreventdefault@nsGkAtoms@@2PEAVnsIAtom@@EA"] pub static nsGkAtoms_mozinputrangeignorepreventdefault: *mut nsIAtom; + #[link_name = "?moz_extension@nsGkAtoms@@2PEAVnsIAtom@@EA"] + pub static nsGkAtoms_moz_extension: *mut nsIAtom; + #[link_name = "?all_urlsPermission@nsGkAtoms@@2PEAVnsIAtom@@EA"] + pub static nsGkAtoms_all_urlsPermission: *mut nsIAtom; + #[link_name = "?http@nsGkAtoms@@2PEAVnsIAtom@@EA"] + pub static nsGkAtoms_http: *mut nsIAtom; + #[link_name = "?https@nsGkAtoms@@2PEAVnsIAtom@@EA"] + pub static nsGkAtoms_https: *mut nsIAtom; #[link_name = "?cdataTagName@nsGkAtoms@@2PEAVnsIAtom@@EA"] pub static nsGkAtoms_cdataTagName: *mut nsIAtom; #[link_name = "?commentTagName@nsGkAtoms@@2PEAVnsIAtom@@EA"] @@ -10832,6 +10852,8 @@ cfg_if! { pub static nsGkAtoms_field: *mut nsIAtom; #[link_name = "\x01?fieldset@nsGkAtoms@@2PAVnsIAtom@@A"] pub static nsGkAtoms_fieldset: *mut nsIAtom; + #[link_name = "\x01?file@nsGkAtoms@@2PAVnsIAtom@@A"] + pub static nsGkAtoms_file: *mut nsIAtom; #[link_name = "\x01?figcaption@nsGkAtoms@@2PAVnsIAtom@@A"] pub static nsGkAtoms_figcaption: *mut nsIAtom; #[link_name = "\x01?figure@nsGkAtoms@@2PAVnsIAtom@@A"] @@ -13984,6 +14006,14 @@ cfg_if! { pub static nsGkAtoms_ondevicechange: *mut nsIAtom; #[link_name = "\x01?mozinputrangeignorepreventdefault@nsGkAtoms@@2PAVnsIAtom@@A"] pub static nsGkAtoms_mozinputrangeignorepreventdefault: *mut nsIAtom; + #[link_name = "\x01?moz_extension@nsGkAtoms@@2PAVnsIAtom@@A"] + pub static nsGkAtoms_moz_extension: *mut nsIAtom; + #[link_name = "\x01?all_urlsPermission@nsGkAtoms@@2PAVnsIAtom@@A"] + pub static nsGkAtoms_all_urlsPermission: *mut nsIAtom; + #[link_name = "\x01?http@nsGkAtoms@@2PAVnsIAtom@@A"] + pub static nsGkAtoms_http: *mut nsIAtom; + #[link_name = "\x01?https@nsGkAtoms@@2PAVnsIAtom@@A"] + pub static nsGkAtoms_https: *mut nsIAtom; #[link_name = "\x01?cdataTagName@nsGkAtoms@@2PAVnsIAtom@@A"] pub static nsGkAtoms_cdataTagName: *mut nsIAtom; #[link_name = "\x01?commentTagName@nsGkAtoms@@2PAVnsIAtom@@A"] @@ -15858,6 +15888,8 @@ macro_rules! atom { { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_field as *mut _) } }; ("fieldset") => { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_fieldset as *mut _) } }; +("file") => + { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_file as *mut _) } }; ("figcaption") => { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_figcaption as *mut _) } }; ("figure") => @@ -19010,6 +19042,14 @@ macro_rules! atom { { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_ondevicechange as *mut _) } }; ("mozinputrangeignorepreventdefault") => { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_mozinputrangeignorepreventdefault as *mut _) } }; +("moz-extension") => + { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_moz_extension as *mut _) } }; +("") => + { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_all_urlsPermission as *mut _) } }; +("http") => + { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_http as *mut _) } }; +("https") => + { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_https as *mut _) } }; ("#cdata-section") => { unsafe { $crate::string_cache::atom_macro::atom_from_static($crate::string_cache::atom_macro::nsGkAtoms_cdataTagName as *mut _) } }; ("#comment") => diff --git a/servo/components/style/gecko/generated/structs_debug.rs b/servo/components/style/gecko/generated/structs_debug.rs index 6ce08212a1d1..1709aa24417c 100644 --- a/servo/components/style/gecko/generated/structs_debug.rs +++ b/servo/components/style/gecko/generated/structs_debug.rs @@ -975,7 +975,6 @@ pub mod root { pub const NS_STYLE_DISPLAY_MODE_BROWSER: ::std::os::raw::c_uint = 0; pub const NS_STYLE_DISPLAY_MODE_MINIMAL_UI: ::std::os::raw::c_uint = 1; pub const NS_STYLE_DISPLAY_MODE_STANDALONE: ::std::os::raw::c_uint = 2; - pub const NS_STYLE_DISPLAY_MODE_FULLSCREEN: ::std::os::raw::c_uint = 3; pub const CSS_PSEUDO_ELEMENT_IS_CSS2: ::std::os::raw::c_uint = 1; pub const CSS_PSEUDO_ELEMENT_CONTAINS_ELEMENTS: ::std::os::raw::c_uint = 2; @@ -1046,19 +1045,6 @@ pub mod root { } pub type pair_first_type<_T1> = _T1; pub type pair_second_type<_T2> = _T2; - pub type pair__EnableB = u8; - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct pair__CheckArgs { - pub _address: u8, - } - pub type pair__CheckArgsDep = u8; - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct pair__CheckTupleLikeConstructor { - pub _address: u8, - } - pub type pair__CheckTLC = u8; #[repr(C)] #[derive(Debug, Copy)] pub struct input_iterator_tag { @@ -1078,101 +1064,54 @@ pub mod root { fn clone(&self) -> Self { *self } } #[repr(C)] - #[derive(Debug, Copy)] - pub struct forward_iterator_tag { + #[derive(Debug, Copy, Clone)] + pub struct iterator { pub _address: u8, } - #[test] - fn bindgen_test_layout_forward_iterator_tag() { - assert_eq!(::std::mem::size_of::() , 1usize - , concat ! ( - "Size of: " , stringify ! ( forward_iterator_tag ) )); - assert_eq! (::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of " , stringify ! ( forward_iterator_tag ) - )); - } - impl Clone for forward_iterator_tag { - fn clone(&self) -> Self { *self } - } + pub type iterator_iterator_category<_Category> = _Category; + pub type iterator_value_type<_Tp> = _Tp; + pub type iterator_difference_type<_Distance> = _Distance; + pub type iterator_pointer<_Pointer> = _Pointer; + pub type iterator_reference<_Reference> = _Reference; #[repr(C)] - #[derive(Debug, Copy)] - pub struct bidirectional_iterator_tag { + #[derive(Debug, Copy, Clone)] + pub struct __iterator_traits { pub _address: u8, } - #[test] - fn bindgen_test_layout_bidirectional_iterator_tag() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of: " , stringify ! ( bidirectional_iterator_tag - ) )); - assert_eq! (::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of " , stringify ! ( - bidirectional_iterator_tag ) )); - } - impl Clone for bidirectional_iterator_tag { - fn clone(&self) -> Self { *self } - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct random_access_iterator_tag { - pub _address: u8, - } - #[test] - fn bindgen_test_layout_random_access_iterator_tag() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of: " , stringify ! ( random_access_iterator_tag - ) )); - assert_eq! (::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of " , stringify ! ( - random_access_iterator_tag ) )); - } - impl Clone for random_access_iterator_tag { - fn clone(&self) -> Self { *self } - } #[repr(C)] + #[derive(Debug, Copy, Clone)] pub struct iterator_traits { pub _address: u8, } #[repr(C)] #[derive(Debug, Copy, Clone)] - pub struct iterator { - pub _address: u8, + pub struct reverse_iterator<_Iterator> { + pub current: _Iterator, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<_Iterator>>, } - pub type iterator_value_type<_Tp> = _Tp; - pub type iterator_difference_type<_Distance> = _Distance; - pub type iterator_pointer<_Pointer> = _Pointer; - pub type iterator_reference<_Reference> = _Reference; - pub type iterator_iterator_category<_Category> = _Category; - #[repr(C)] - pub struct reverse_iterator<_Iter> { - pub __t: _Iter, - pub current: _Iter, - pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<_Iter>>, - } - pub type reverse_iterator_iterator_type<_Iter> = _Iter; + pub type reverse_iterator___traits_type = root::std::iterator_traits; + pub type reverse_iterator_iterator_type<_Iterator> = _Iterator; pub type reverse_iterator_difference_type = - root::std::iterator_traits; - pub type reverse_iterator_reference = root::std::iterator_traits; - pub type reverse_iterator_pointer = root::std::iterator_traits; + root::std::reverse_iterator___traits_type; + pub type reverse_iterator_pointer = + root::std::reverse_iterator___traits_type; + pub type reverse_iterator_reference = + root::std::reverse_iterator___traits_type; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct atomic { } - pub type atomic___base = u8; - #[repr(C)] - pub struct __bit_const_reference { - pub __seg_: root::std::__bit_const_reference___storage_pointer, - pub __mask_: root::std::__bit_const_reference___storage_type, + pub mod chrono { + #[allow(unused_imports)] + use self::super::super::super::root; } - pub type __bit_const_reference___storage_type = [u8; 0usize]; - pub type __bit_const_reference___storage_pointer = [u8; 0usize]; } - pub type __int64_t = ::std::os::raw::c_longlong; - pub type __darwin_off_t = root::__int64_t; + pub mod __gnu_cxx { + #[allow(unused_imports)] + use self::super::super::root; + } + pub type __off_t = ::std::os::raw::c_long; + pub type __off64_t = ::std::os::raw::c_long; pub mod mozilla { #[allow(unused_imports)] use self::super::super::root; @@ -1215,9 +1154,8 @@ pub mod root { root::nsSubstringTuple; pub type nsStringRepr_string_type = ::nsstring::nsStringRepr; pub type nsStringRepr_const_iterator = - root::nsReadingIterator; - pub type nsStringRepr_iterator = - root::nsWritingIterator; + root::nsReadingIterator; + pub type nsStringRepr_iterator = root::nsWritingIterator; pub type nsStringRepr_comparator_type = root::nsStringComparator; pub type nsStringRepr_char_iterator = *mut root::mozilla::detail::nsStringRepr_char_type; @@ -1307,9 +1245,9 @@ pub mod root { root::nsCSubstringTuple; pub type nsCStringRepr_string_type = root::nsCString; pub type nsCStringRepr_const_iterator = - root::nsReadingIterator; + root::nsReadingIterator<::std::os::raw::c_char>; pub type nsCStringRepr_iterator = - root::nsWritingIterator; + root::nsWritingIterator<::std::os::raw::c_char>; pub type nsCStringRepr_comparator_type = root::nsCStringComparator; pub type nsCStringRepr_char_iterator = @@ -1457,7 +1395,7 @@ pub mod root { #[repr(C)] #[derive(Debug)] pub struct MutexImpl { - pub platformData_: [*mut ::std::os::raw::c_void; 8usize], + pub platformData_: [*mut ::std::os::raw::c_void; 5usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1466,7 +1404,7 @@ pub mod root { } #[test] fn bindgen_test_layout_MutexImpl() { - assert_eq!(::std::mem::size_of::() , 64usize , + assert_eq!(::std::mem::size_of::() , 40usize , concat ! ( "Size of: " , stringify ! ( MutexImpl ) )); assert_eq! (::std::mem::align_of::() , 8usize , @@ -2296,7 +2234,7 @@ pub mod root { } } #[repr(C)] - #[derive(Debug, Copy)] + #[derive(Debug)] pub struct ThreadSafeAutoRefCnt { pub mValue: u64, } @@ -2317,9 +2255,6 @@ pub mod root { ThreadSafeAutoRefCnt ) , "::" , stringify ! ( mValue ) )); } - impl Clone for ThreadSafeAutoRefCnt { - fn clone(&self) -> Self { *self } - } #[repr(C)] #[derive(Debug)] pub struct OwningNonNull { @@ -8304,7 +8239,7 @@ pub mod root { } #[test] fn bindgen_test_layout_OffTheBooksMutex() { - assert_eq!(::std::mem::size_of::() , 96usize , + assert_eq!(::std::mem::size_of::() , 72usize , concat ! ( "Size of: " , stringify ! ( OffTheBooksMutex ) )); assert_eq! (::std::mem::align_of::() , 8usize , @@ -8312,7 +8247,7 @@ pub mod root { "Alignment of " , stringify ! ( OffTheBooksMutex ) )); assert_eq! (unsafe { & ( * ( 0 as * const OffTheBooksMutex ) ) . - mOwningThread as * const _ as usize } , 88usize , + mOwningThread as * const _ as usize } , 64usize , concat ! ( "Alignment of field: " , stringify ! ( OffTheBooksMutex ) , "::" , stringify ! ( @@ -8330,7 +8265,7 @@ pub mod root { } #[test] fn bindgen_test_layout_Mutex() { - assert_eq!(::std::mem::size_of::() , 96usize , concat ! ( + assert_eq!(::std::mem::size_of::() , 72usize , concat ! ( "Size of: " , stringify ! ( Mutex ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( Mutex ) )); @@ -9149,8 +9084,8 @@ pub mod root { pub mAttrs: root::nsTArray, pub mState: root::mozilla::ServoElementSnapshot_ServoStateType, pub mContains: root::mozilla::ServoElementSnapshot_Flags, - pub mIsHTMLElementInHTMLDocument: bool, - pub mIsInChromeDocument: bool, + pub _bitfield_1: u8, + pub __bindgen_padding_0: [u16; 3usize], } pub type ServoElementSnapshot_BorrowedAttrInfo = root::mozilla::dom::BorrowedAttrInfo; @@ -9187,20 +9122,105 @@ pub mod root { "Alignment of field: " , stringify ! ( ServoElementSnapshot ) , "::" , stringify ! ( mContains ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const ServoElementSnapshot ) ) . - mIsHTMLElementInHTMLDocument as * const _ as usize } , - 17usize , concat ! ( - "Alignment of field: " , stringify ! ( - ServoElementSnapshot ) , "::" , stringify ! ( - mIsHTMLElementInHTMLDocument ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const ServoElementSnapshot ) ) . - mIsInChromeDocument as * const _ as usize } , 18usize - , concat ! ( - "Alignment of field: " , stringify ! ( - ServoElementSnapshot ) , "::" , stringify ! ( - mIsInChromeDocument ) )); + } + impl ServoElementSnapshot { + #[inline] + pub fn mIsHTMLElementInHTMLDocument(&self) -> bool { + let mask = 1usize as u8; + let unit_field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + let val = (unit_field_val & mask) >> 0usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_mIsHTMLElementInHTMLDocument(&mut self, val: bool) { + let mask = 1usize as u8; + let val = val as u8 as u8; + let mut unit_field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + unit_field_val &= !mask; + unit_field_val |= (val << 0usize) & mask; + self._bitfield_1 = + unsafe { ::std::mem::transmute(unit_field_val) }; + } + #[inline] + pub fn mIsInChromeDocument(&self) -> bool { + let mask = 2usize as u8; + let unit_field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + let val = (unit_field_val & mask) >> 1usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_mIsInChromeDocument(&mut self, val: bool) { + let mask = 2usize as u8; + let val = val as u8 as u8; + let mut unit_field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + unit_field_val &= !mask; + unit_field_val |= (val << 1usize) & mask; + self._bitfield_1 = + unsafe { ::std::mem::transmute(unit_field_val) }; + } + #[inline] + pub fn mIsTableBorderNonzero(&self) -> bool { + let mask = 4usize as u8; + let unit_field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + let val = (unit_field_val & mask) >> 2usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_mIsTableBorderNonzero(&mut self, val: bool) { + let mask = 4usize as u8; + let val = val as u8 as u8; + let mut unit_field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + unit_field_val &= !mask; + unit_field_val |= (val << 2usize) & mask; + self._bitfield_1 = + unsafe { ::std::mem::transmute(unit_field_val) }; + } + #[inline] + pub fn mIsMozBrowserFrame(&self) -> bool { + let mask = 8usize as u8; + let unit_field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + let val = (unit_field_val & mask) >> 3usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_mIsMozBrowserFrame(&mut self, val: bool) { + let mask = 8usize as u8; + let val = val as u8 as u8; + let mut unit_field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + unit_field_val &= !mask; + unit_field_val |= (val << 3usize) & mask; + self._bitfield_1 = + unsafe { ::std::mem::transmute(unit_field_val) }; + } + #[inline] + pub fn new_bitfield_1(mIsHTMLElementInHTMLDocument: bool, + mIsInChromeDocument: bool, + mIsTableBorderNonzero: bool, + mIsMozBrowserFrame: bool) -> u8 { + ({ + ({ + ({ + ({ 0 } | + ((mIsHTMLElementInHTMLDocument as u8 as + u8) << 0usize) & (1usize as u8)) + } | + ((mIsInChromeDocument as u8 as u8) << 1usize) & + (2usize as u8)) + } | + ((mIsTableBorderNonzero as u8 as u8) << 2usize) & + (4usize as u8)) + } | + ((mIsMozBrowserFrame as u8 as u8) << 3usize) & + (8usize as u8)) + } } #[repr(C)] #[derive(Debug)] @@ -9454,8 +9474,6 @@ pub mod root { PropertyStyleAnimationValuePair ) , "::" , stringify ! ( mValue ) )); } - pub type ComputedKeyframeValues = - root::nsTArray; #[test] fn __bindgen_test_layout_DefaultDelete_instantiation_3() { assert_eq!(::std::mem::size_of::() , @@ -9992,6 +10010,7 @@ pub mod root { Attributes = 2, Id = 4, MaybeClass = 8, + OtherPseudoClassState = 16, } #[repr(C)] #[derive(Debug, Copy)] @@ -10652,194 +10671,196 @@ pub mod root { pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell>, } } - pub type va_list = root::__builtin_va_list; - pub type fpos_t = root::__darwin_off_t; #[repr(C)] #[derive(Debug, Copy)] - pub struct __sbuf { - pub _base: *mut ::std::os::raw::c_uchar, - pub _size: ::std::os::raw::c_int, + pub struct _IO_FILE { + pub _flags: ::std::os::raw::c_int, + pub _IO_read_ptr: *mut ::std::os::raw::c_char, + pub _IO_read_end: *mut ::std::os::raw::c_char, + pub _IO_read_base: *mut ::std::os::raw::c_char, + pub _IO_write_base: *mut ::std::os::raw::c_char, + pub _IO_write_ptr: *mut ::std::os::raw::c_char, + pub _IO_write_end: *mut ::std::os::raw::c_char, + pub _IO_buf_base: *mut ::std::os::raw::c_char, + pub _IO_buf_end: *mut ::std::os::raw::c_char, + pub _IO_save_base: *mut ::std::os::raw::c_char, + pub _IO_backup_base: *mut ::std::os::raw::c_char, + pub _IO_save_end: *mut ::std::os::raw::c_char, + pub _markers: *mut root::_IO_marker, + pub _chain: *mut root::_IO_FILE, + pub _fileno: ::std::os::raw::c_int, + pub _flags2: ::std::os::raw::c_int, + pub _old_offset: root::__off_t, + pub _cur_column: ::std::os::raw::c_ushort, + pub _vtable_offset: ::std::os::raw::c_schar, + pub _shortbuf: [::std::os::raw::c_char; 1usize], + pub _lock: *mut root::_IO_lock_t, + pub _offset: root::__off64_t, + pub __pad1: *mut ::std::os::raw::c_void, + pub __pad2: *mut ::std::os::raw::c_void, + pub __pad3: *mut ::std::os::raw::c_void, + pub __pad4: *mut ::std::os::raw::c_void, + pub __pad5: usize, + pub _mode: ::std::os::raw::c_int, + pub _unused2: [::std::os::raw::c_char; 20usize], } #[test] - fn bindgen_test_layout___sbuf() { - assert_eq!(::std::mem::size_of::<__sbuf>() , 16usize , concat ! ( - "Size of: " , stringify ! ( __sbuf ) )); - assert_eq! (::std::mem::align_of::<__sbuf>() , 8usize , concat ! ( - "Alignment of " , stringify ! ( __sbuf ) )); + fn bindgen_test_layout__IO_FILE() { + assert_eq!(::std::mem::size_of::<_IO_FILE>() , 216usize , concat ! ( + "Size of: " , stringify ! ( _IO_FILE ) )); + assert_eq! (::std::mem::align_of::<_IO_FILE>() , 8usize , concat ! ( + "Alignment of " , stringify ! ( _IO_FILE ) )); assert_eq! (unsafe { - & ( * ( 0 as * const __sbuf ) ) . _base as * const _ as + & ( * ( 0 as * const _IO_FILE ) ) . _flags as * const _ as usize } , 0usize , concat ! ( - "Alignment of field: " , stringify ! ( __sbuf ) , "::" , - stringify ! ( _base ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const __sbuf ) ) . _size as * const _ as - usize } , 8usize , concat ! ( - "Alignment of field: " , stringify ! ( __sbuf ) , "::" , - stringify ! ( _size ) )); - } - impl Clone for __sbuf { - fn clone(&self) -> Self { *self } - } - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct __sFILEX { - _unused: [u8; 0], - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct __sFILE { - pub _p: *mut ::std::os::raw::c_uchar, - pub _r: ::std::os::raw::c_int, - pub _w: ::std::os::raw::c_int, - pub _flags: ::std::os::raw::c_short, - pub _file: ::std::os::raw::c_short, - pub _bf: root::__sbuf, - pub _lbfsize: ::std::os::raw::c_int, - pub _cookie: *mut ::std::os::raw::c_void, - pub _close: ::std::option::Option ::std::os::raw::c_int>, - pub _read: ::std::option::Option ::std::os::raw::c_int>, - pub _seek: ::std::option::Option root::fpos_t>, - pub _write: ::std::option::Option ::std::os::raw::c_int>, - pub _ub: root::__sbuf, - pub _extra: *mut root::__sFILEX, - pub _ur: ::std::os::raw::c_int, - pub _ubuf: [::std::os::raw::c_uchar; 3usize], - pub _nbuf: [::std::os::raw::c_uchar; 1usize], - pub _lb: root::__sbuf, - pub _blksize: ::std::os::raw::c_int, - pub _offset: root::fpos_t, - } - #[test] - fn bindgen_test_layout___sFILE() { - assert_eq!(::std::mem::size_of::<__sFILE>() , 152usize , concat ! ( - "Size of: " , stringify ! ( __sFILE ) )); - assert_eq! (::std::mem::align_of::<__sFILE>() , 8usize , concat ! ( - "Alignment of " , stringify ! ( __sFILE ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const __sFILE ) ) . _p as * const _ as - usize } , 0usize , concat ! ( - "Alignment of field: " , stringify ! ( __sFILE ) , "::" , - stringify ! ( _p ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const __sFILE ) ) . _r as * const _ as - usize } , 8usize , concat ! ( - "Alignment of field: " , stringify ! ( __sFILE ) , "::" , - stringify ! ( _r ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const __sFILE ) ) . _w as * const _ as - usize } , 12usize , concat ! ( - "Alignment of field: " , stringify ! ( __sFILE ) , "::" , - stringify ! ( _w ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const __sFILE ) ) . _flags as * const _ as - usize } , 16usize , concat ! ( - "Alignment of field: " , stringify ! ( __sFILE ) , "::" , + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _flags ) )); assert_eq! (unsafe { - & ( * ( 0 as * const __sFILE ) ) . _file as * const _ as - usize } , 18usize , concat ! ( - "Alignment of field: " , stringify ! ( __sFILE ) , "::" , - stringify ! ( _file ) )); + & ( * ( 0 as * const _IO_FILE ) ) . _IO_read_ptr as * + const _ as usize } , 8usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( _IO_read_ptr ) )); assert_eq! (unsafe { - & ( * ( 0 as * const __sFILE ) ) . _bf as * const _ as - usize } , 24usize , concat ! ( - "Alignment of field: " , stringify ! ( __sFILE ) , "::" , - stringify ! ( _bf ) )); + & ( * ( 0 as * const _IO_FILE ) ) . _IO_read_end as * + const _ as usize } , 16usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( _IO_read_end ) )); assert_eq! (unsafe { - & ( * ( 0 as * const __sFILE ) ) . _lbfsize as * const _ - as usize } , 40usize , concat ! ( - "Alignment of field: " , stringify ! ( __sFILE ) , "::" , - stringify ! ( _lbfsize ) )); + & ( * ( 0 as * const _IO_FILE ) ) . _IO_read_base as * + const _ as usize } , 24usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( _IO_read_base ) )); assert_eq! (unsafe { - & ( * ( 0 as * const __sFILE ) ) . _cookie as * const _ as - usize } , 48usize , concat ! ( - "Alignment of field: " , stringify ! ( __sFILE ) , "::" , - stringify ! ( _cookie ) )); + & ( * ( 0 as * const _IO_FILE ) ) . _IO_write_base as * + const _ as usize } , 32usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( _IO_write_base ) )); assert_eq! (unsafe { - & ( * ( 0 as * const __sFILE ) ) . _close as * const _ as - usize } , 56usize , concat ! ( - "Alignment of field: " , stringify ! ( __sFILE ) , "::" , - stringify ! ( _close ) )); + & ( * ( 0 as * const _IO_FILE ) ) . _IO_write_ptr as * + const _ as usize } , 40usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( _IO_write_ptr ) )); assert_eq! (unsafe { - & ( * ( 0 as * const __sFILE ) ) . _read as * const _ as - usize } , 64usize , concat ! ( - "Alignment of field: " , stringify ! ( __sFILE ) , "::" , - stringify ! ( _read ) )); + & ( * ( 0 as * const _IO_FILE ) ) . _IO_write_end as * + const _ as usize } , 48usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( _IO_write_end ) )); assert_eq! (unsafe { - & ( * ( 0 as * const __sFILE ) ) . _seek as * const _ as - usize } , 72usize , concat ! ( - "Alignment of field: " , stringify ! ( __sFILE ) , "::" , - stringify ! ( _seek ) )); + & ( * ( 0 as * const _IO_FILE ) ) . _IO_buf_base as * + const _ as usize } , 56usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( _IO_buf_base ) )); assert_eq! (unsafe { - & ( * ( 0 as * const __sFILE ) ) . _write as * const _ as - usize } , 80usize , concat ! ( - "Alignment of field: " , stringify ! ( __sFILE ) , "::" , - stringify ! ( _write ) )); + & ( * ( 0 as * const _IO_FILE ) ) . _IO_buf_end as * const + _ as usize } , 64usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( _IO_buf_end ) )); assert_eq! (unsafe { - & ( * ( 0 as * const __sFILE ) ) . _ub as * const _ as - usize } , 88usize , concat ! ( - "Alignment of field: " , stringify ! ( __sFILE ) , "::" , - stringify ! ( _ub ) )); + & ( * ( 0 as * const _IO_FILE ) ) . _IO_save_base as * + const _ as usize } , 72usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( _IO_save_base ) )); assert_eq! (unsafe { - & ( * ( 0 as * const __sFILE ) ) . _extra as * const _ as + & ( * ( 0 as * const _IO_FILE ) ) . _IO_backup_base as * + const _ as usize } , 80usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( _IO_backup_base ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const _IO_FILE ) ) . _IO_save_end as * + const _ as usize } , 88usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( _IO_save_end ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const _IO_FILE ) ) . _markers as * const _ + as usize } , 96usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( _markers ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const _IO_FILE ) ) . _chain as * const _ as usize } , 104usize , concat ! ( - "Alignment of field: " , stringify ! ( __sFILE ) , "::" , - stringify ! ( _extra ) )); + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( _chain ) )); assert_eq! (unsafe { - & ( * ( 0 as * const __sFILE ) ) . _ur as * const _ as - usize } , 112usize , concat ! ( - "Alignment of field: " , stringify ! ( __sFILE ) , "::" , - stringify ! ( _ur ) )); + & ( * ( 0 as * const _IO_FILE ) ) . _fileno as * const _ + as usize } , 112usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( _fileno ) )); assert_eq! (unsafe { - & ( * ( 0 as * const __sFILE ) ) . _ubuf as * const _ as - usize } , 116usize , concat ! ( - "Alignment of field: " , stringify ! ( __sFILE ) , "::" , - stringify ! ( _ubuf ) )); + & ( * ( 0 as * const _IO_FILE ) ) . _flags2 as * const _ + as usize } , 116usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( _flags2 ) )); assert_eq! (unsafe { - & ( * ( 0 as * const __sFILE ) ) . _nbuf as * const _ as - usize } , 119usize , concat ! ( - "Alignment of field: " , stringify ! ( __sFILE ) , "::" , - stringify ! ( _nbuf ) )); + & ( * ( 0 as * const _IO_FILE ) ) . _old_offset as * const + _ as usize } , 120usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( _old_offset ) )); assert_eq! (unsafe { - & ( * ( 0 as * const __sFILE ) ) . _lb as * const _ as - usize } , 120usize , concat ! ( - "Alignment of field: " , stringify ! ( __sFILE ) , "::" , - stringify ! ( _lb ) )); + & ( * ( 0 as * const _IO_FILE ) ) . _cur_column as * const + _ as usize } , 128usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( _cur_column ) )); assert_eq! (unsafe { - & ( * ( 0 as * const __sFILE ) ) . _blksize as * const _ - as usize } , 136usize , concat ! ( - "Alignment of field: " , stringify ! ( __sFILE ) , "::" , - stringify ! ( _blksize ) )); + & ( * ( 0 as * const _IO_FILE ) ) . _vtable_offset as * + const _ as usize } , 130usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( _vtable_offset ) )); assert_eq! (unsafe { - & ( * ( 0 as * const __sFILE ) ) . _offset as * const _ as - usize } , 144usize , concat ! ( - "Alignment of field: " , stringify ! ( __sFILE ) , "::" , + & ( * ( 0 as * const _IO_FILE ) ) . _shortbuf as * const _ + as usize } , 131usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( _shortbuf ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const _IO_FILE ) ) . _lock as * const _ as + usize } , 136usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( _lock ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const _IO_FILE ) ) . _offset as * const _ + as usize } , 144usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , stringify ! ( _offset ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const _IO_FILE ) ) . __pad1 as * const _ as + usize } , 152usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( __pad1 ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const _IO_FILE ) ) . __pad2 as * const _ as + usize } , 160usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( __pad2 ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const _IO_FILE ) ) . __pad3 as * const _ as + usize } , 168usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( __pad3 ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const _IO_FILE ) ) . __pad4 as * const _ as + usize } , 176usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( __pad4 ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const _IO_FILE ) ) . __pad5 as * const _ as + usize } , 184usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( __pad5 ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const _IO_FILE ) ) . _mode as * const _ as + usize } , 192usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( _mode ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const _IO_FILE ) ) . _unused2 as * const _ + as usize } , 196usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_FILE ) , "::" , + stringify ! ( _unused2 ) )); } - impl Clone for __sFILE { + impl Clone for _IO_FILE { fn clone(&self) -> Self { *self } } - pub type FILE = root::__sFILE; + pub type FILE = root::_IO_FILE; + pub type va_list = root::__builtin_va_list; #[repr(C)] #[derive(Debug, Copy)] pub struct InfallibleAllocPolicy { @@ -11396,6 +11417,39 @@ pub mod root { NS_OK_NO_NAME_CLAUSE_HANDLED = 7864354, } pub type nsrefcnt = root::MozRefCountType; + pub type _IO_lock_t = ::std::os::raw::c_void; + #[repr(C)] + #[derive(Debug, Copy)] + pub struct _IO_marker { + pub _next: *mut root::_IO_marker, + pub _sbuf: *mut root::_IO_FILE, + pub _pos: ::std::os::raw::c_int, + } + #[test] + fn bindgen_test_layout__IO_marker() { + assert_eq!(::std::mem::size_of::<_IO_marker>() , 24usize , concat ! ( + "Size of: " , stringify ! ( _IO_marker ) )); + assert_eq! (::std::mem::align_of::<_IO_marker>() , 8usize , concat ! ( + "Alignment of " , stringify ! ( _IO_marker ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const _IO_marker ) ) . _next as * const _ + as usize } , 0usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_marker ) , "::" + , stringify ! ( _next ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const _IO_marker ) ) . _sbuf as * const _ + as usize } , 8usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_marker ) , "::" + , stringify ! ( _sbuf ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const _IO_marker ) ) . _pos as * const _ as + usize } , 16usize , concat ! ( + "Alignment of field: " , stringify ! ( _IO_marker ) , "::" + , stringify ! ( _pos ) )); + } + impl Clone for _IO_marker { + fn clone(&self) -> Self { *self } + } #[repr(C)] pub struct nsQueryFrame__bindgen_vtable(::std::os::raw::c_void); #[repr(C)] @@ -13343,11 +13397,6 @@ pub mod root { AutoSetAsyncStackForNewCalls ) , "::" , stringify ! ( oldAsyncCallIsExplicit ) )); } - pub type WarningReporter = - ::std::option::Option; #[repr(C)] #[derive(Debug)] pub struct AutoHideScriptedCaller { @@ -13509,103 +13558,6 @@ pub mod root { pub struct JSCompartment { _unused: [u8; 0], } - /** - * Describes a single error or warning that occurs in the execution of script. - */ - #[repr(C)] - pub struct JSErrorReport { - pub _base: root::JSErrorBase, - pub linebuf_: *const u16, - pub linebufLength_: usize, - pub tokenOffset_: usize, - pub notes: root::mozilla::UniquePtr, - pub flags: ::std::os::raw::c_uint, - pub exnType: i16, - pub _bitfield_1: u8, - pub __bindgen_padding_0: u8, - } - #[test] - fn bindgen_test_layout_JSErrorReport() { - assert_eq!(::std::mem::size_of::() , 72usize , concat ! - ( "Size of: " , stringify ! ( JSErrorReport ) )); - assert_eq! (::std::mem::align_of::() , 8usize , concat - ! ( "Alignment of " , stringify ! ( JSErrorReport ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . linebuf_ as * - const _ as usize } , 32usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( linebuf_ ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . linebufLength_ as - * const _ as usize } , 40usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( linebufLength_ ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . tokenOffset_ as * - const _ as usize } , 48usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( tokenOffset_ ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . notes as * const - _ as usize } , 56usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( notes ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . flags as * const - _ as usize } , 64usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( flags ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . exnType as * - const _ as usize } , 68usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( exnType ) )); - } - impl JSErrorReport { - #[inline] - pub fn isMuted(&self) -> bool { - let mask = 1usize as u8; - let unit_field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - let val = (unit_field_val & mask) >> 0usize; - unsafe { ::std::mem::transmute(val as u8) } - } - #[inline] - pub fn set_isMuted(&mut self, val: bool) { - let mask = 1usize as u8; - let val = val as u8 as u8; - let mut unit_field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - unit_field_val &= !mask; - unit_field_val |= (val << 0usize) & mask; - self._bitfield_1 = - unsafe { ::std::mem::transmute(unit_field_val) }; - } - #[inline] - pub fn ownsLinebuf_(&self) -> bool { - let mask = 2usize as u8; - let unit_field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - let val = (unit_field_val & mask) >> 1usize; - unsafe { ::std::mem::transmute(val as u8) } - } - #[inline] - pub fn set_ownsLinebuf_(&mut self, val: bool) { - let mask = 2usize as u8; - let val = val as u8 as u8; - let mut unit_field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - unit_field_val &= !mask; - unit_field_val |= (val << 1usize) & mask; - self._bitfield_1 = - unsafe { ::std::mem::transmute(unit_field_val) }; - } - #[inline] - pub fn new_bitfield_1(isMuted: bool, ownsLinebuf_: bool) -> u8 { - ({ ({ 0 } | ((isMuted as u8 as u8) << 0usize) & (1usize as u8)) } - | ((ownsLinebuf_ as u8 as u8) << 1usize) & (2usize as u8)) - } - } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct JSRuntime { @@ -14452,7 +14404,7 @@ pub mod root { #[derive(Debug)] pub struct gfxFontFeatureValueSet_ValueList { pub name: ::nsstring::nsStringRepr, - pub featureSelectors: root::nsTArray, + pub featureSelectors: root::nsTArray<::std::os::raw::c_uint>, } #[test] fn bindgen_test_layout_gfxFontFeatureValueSet_ValueList() { @@ -14557,7 +14509,7 @@ pub mod root { pub struct gfxFontFeatureValueSet_FeatureValueHashEntry { pub _base: root::PLDHashEntryHdr, pub mKey: root::gfxFontFeatureValueSet_FeatureValueHashKey, - pub mValues: root::nsTArray, + pub mValues: root::nsTArray<::std::os::raw::c_uint>, } pub type gfxFontFeatureValueSet_FeatureValueHashEntry_KeyType = *const root::gfxFontFeatureValueSet_FeatureValueHashKey; @@ -14667,7 +14619,7 @@ pub mod root { pub alternateValues: root::nsTArray, pub featureValueLookup: root::RefPtr, pub fontFeatureSettings: root::nsTArray, - pub fontVariationSettings: root::nsTArray, + pub fontVariationSettings: root::nsTArray, pub languageOverride: u32, } #[test] @@ -15347,7 +15299,7 @@ pub mod root { * count is 1. */ #[repr(C)] - #[derive(Debug, Copy)] + #[derive(Debug)] pub struct nsStringBuffer { pub mRefCount: u32, pub mStorageSize: u32, @@ -15369,9 +15321,6 @@ pub mod root { "Alignment of field: " , stringify ! ( nsStringBuffer ) , "::" , stringify ! ( mStorageSize ) )); } - impl Clone for nsStringBuffer { - fn clone(&self) -> Self { *self } - } #[repr(C)] #[derive(Debug, Copy)] pub struct nsIAtom { @@ -17116,7 +17065,7 @@ pub mod root { */ pub mFrameRequestCallbackCounter: i32, pub mStaticCloneCount: u32, - pub mBlockedTrackingNodes: root::nsTArray, + pub mBlockedTrackingNodes: root::nsTArray>, pub mWindow: *mut root::nsPIDOMWindowInner, pub mCachedEncoder: root::nsCOMPtr, pub mFrameRequestCallbacks: root::nsTArray, @@ -21329,7 +21278,7 @@ pub mod root { pub _base_1: root::nsWrapperCache, pub mRefCnt: root::nsCycleCollectingAutoRefCnt, pub _mOwningThread: root::nsAutoOwningThread, - pub mContent: root::nsCOMPtr, + pub mContent: root::nsCOMPtr, /** * Cache of Attrs. */ @@ -22430,57 +22379,57 @@ pub mod root { pub struct nsDOMMutationObserver { _unused: [u8; 0], } - pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_HAS_LISTENERMANAGER; - pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_HAS_PROPERTIES; - pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_IS_ANONYMOUS_ROOT; - pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; - pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_IS_NATIVE_ANONYMOUS_ROOT; - pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_FORCE_XBL_BINDINGS; - pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_MAY_BE_IN_BINDING_MNGR; - pub const NODE_IS_EDITABLE: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_IS_EDITABLE; - pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_IS_NATIVE_ANONYMOUS; - pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_IS_IN_SHADOW_TREE; - pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_HAS_EMPTY_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_HAS_SLOW_SELECTOR; - pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_HAS_EDGE_CHILD_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; - pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_ALL_SELECTOR_FLAGS; - pub const NODE_NEEDS_FRAME: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_NEEDS_FRAME; - pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_DESCENDANTS_NEED_FRAMES; - pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_HAS_ACCESSKEY; - pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_HAS_DIRECTION_RTL; - pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_HAS_DIRECTION_LTR; - pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_ALL_DIRECTION_FLAGS; - pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_CHROME_ONLY_ACCESS; - pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; - pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_TYPE_SPECIFIC_BITS_OFFSET; + pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_HAS_LISTENERMANAGER; + pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_HAS_PROPERTIES; + pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_IS_ANONYMOUS_ROOT; + pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; + pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_IS_NATIVE_ANONYMOUS_ROOT; + pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_FORCE_XBL_BINDINGS; + pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_MAY_BE_IN_BINDING_MNGR; + pub const NODE_IS_EDITABLE: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_IS_EDITABLE; + pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_IS_NATIVE_ANONYMOUS; + pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_IS_IN_SHADOW_TREE; + pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_HAS_EMPTY_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_HAS_SLOW_SELECTOR; + pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_HAS_EDGE_CHILD_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; + pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_ALL_SELECTOR_FLAGS; + pub const NODE_NEEDS_FRAME: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_NEEDS_FRAME; + pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_DESCENDANTS_NEED_FRAMES; + pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_HAS_ACCESSKEY; + pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_HAS_DIRECTION_RTL; + pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_HAS_DIRECTION_LTR; + pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_ALL_DIRECTION_FLAGS; + pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_CHROME_ONLY_ACCESS; + pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; + pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_88 = + _bindgen_ty_88::NODE_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_17 { + pub enum _bindgen_ty_88 { NODE_HAS_LISTENERMANAGER = 4, NODE_HAS_PROPERTIES = 8, NODE_IS_ANONYMOUS_ROOT = 16, @@ -23265,6 +23214,7 @@ pub mod root { NS_FRAME_IS_NONDISPLAY = 9007199254740992, NS_FRAME_HAS_LAYER_ACTIVITY_PROPERTY = 18014398509481984, NS_FRAME_OWNS_ANON_BOXES = 36028797018963968, + NS_FRAME_HAS_CSS_COUNTER_STYLE = 72057594037927936, NS_FRAME_SIMPLE_DISPLAYLIST = 144115188075855872, NS_FRAME_MATHML_SCRIPT_DESCENDANT = 288230376151711744, NS_FRAME_IS_IN_SINGLE_CHAR_MI = 576460752303423488, @@ -27651,7 +27601,7 @@ pub mod root { pub mRefCnt: root::nsAutoRefCnt, pub _mOwningThread: root::nsAutoOwningThread, pub mBehaviour: root::mozilla::UniquePtr, - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mListener: *mut root::imgINotificationObserver, pub mLoadGroup: root::nsCOMPtr, pub mLoadFlags: root::nsLoadFlags, @@ -28883,7 +28833,7 @@ pub mod root { pub _mOwningThread: root::nsAutoOwningThread, pub mLoader: *mut root::imgLoader, pub mRequest: root::nsCOMPtr, - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mCurrentURI: root::nsCOMPtr, pub mLoadingPrincipal: root::nsCOMPtr, pub mPrincipal: root::nsCOMPtr, @@ -28910,8 +28860,8 @@ pub mod root { pub mImageErrorCode: root::nsresult, pub mBoostCategoriesRequested: u32, pub mMutex: root::mozilla::Mutex, - pub mProgressTracker: root::RefPtr, - pub mImage: root::RefPtr, + pub mProgressTracker: root::RefPtr, + pub mImage: root::RefPtr, pub _bitfield_1: u8, pub __bindgen_padding_0: [u8; 7usize], } @@ -28925,7 +28875,7 @@ pub mod root { pub type imgRequest_HasThreadSafeRefCnt = root::mozilla::TrueType; #[test] fn bindgen_test_layout_imgRequest() { - assert_eq!(::std::mem::size_of::() , 440usize , concat ! ( + assert_eq!(::std::mem::size_of::() , 416usize , concat ! ( "Size of: " , stringify ! ( imgRequest ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( imgRequest ) )); @@ -30376,7 +30326,7 @@ pub mod root { ) , "::" , stringify ! ( mQuotePairs ) )); } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_20() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_91() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -30387,7 +30337,7 @@ pub mod root { root::mozilla::StaticRefPtr ) )); } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_21() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_92() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32565,7 +32515,7 @@ pub mod root { pub type RawGeckoURLExtraData = root::mozilla::URLExtraData; pub type RawGeckoKeyframeList = root::nsTArray; pub type RawGeckoComputedKeyframeValuesList = - root::nsTArray; + root::nsTArray>; pub type RawGeckoAnimationValueList = root::nsTArray; pub type RawGeckoStyleAnimationList = @@ -33323,48 +33273,48 @@ pub mod root { pub struct nsAttrValueOrString { _unused: [u8; 0], } - pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_90 = + _bindgen_ty_90::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_90 = + _bindgen_ty_90::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_90 = + _bindgen_ty_90::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_90 = + _bindgen_ty_90::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_90 = + _bindgen_ty_90::ELEMENT_SHARED_RESTYLE_BIT_1; pub const ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO: - root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_19 + root::_bindgen_ty_90 = + _bindgen_ty_90::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_90 = + _bindgen_ty_90::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_90 = + _bindgen_ty_90::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_90 = + _bindgen_ty_90::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_90 = + _bindgen_ty_90::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_90 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_3; + _bindgen_ty_90::ELEMENT_SHARED_RESTYLE_BIT_3; pub const ELEMENT_IS_POTENTIAL_ANIMATION_ONLY_RESTYLE_ROOT: - root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; - pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_PENDING_RESTYLE_FLAGS; - pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; - pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_ALL_RESTYLE_FLAGS; - pub const ELEMENT_HAS_SCROLLGRAB: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_HAS_SCROLLGRAB; - pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; + root::_bindgen_ty_90 = + _bindgen_ty_90::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_90 = + _bindgen_ty_90::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; + pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_90 = + _bindgen_ty_90::ELEMENT_PENDING_RESTYLE_FLAGS; + pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_90 = + _bindgen_ty_90::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; + pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_90 = + _bindgen_ty_90::ELEMENT_ALL_RESTYLE_FLAGS; + pub const ELEMENT_HAS_SCROLLGRAB: root::_bindgen_ty_90 = + _bindgen_ty_90::ELEMENT_HAS_SCROLLGRAB; + pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_90 = + _bindgen_ty_90::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_19 { + pub enum _bindgen_ty_90 { ELEMENT_SHARED_RESTYLE_BIT_1 = 8388608, ELEMENT_SHARED_RESTYLE_BIT_2 = 16777216, ELEMENT_SHARED_RESTYLE_BIT_3 = 33554432, @@ -34017,7 +33967,7 @@ pub mod root { } pub type __builtin_va_list = [root::__va_list_tag; 1usize]; #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_22() { + fn __bindgen_test_layout_IntegralConstant_instantiation_93() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -34026,7 +33976,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_23() { + fn __bindgen_test_layout_IntegralConstant_instantiation_94() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -34035,7 +33985,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_24() { + fn __bindgen_test_layout_nsCharTraits_instantiation_95() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34046,33 +33996,29 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_25() { - assert_eq!(::std::mem::size_of::>() - , 24usize , concat ! ( + fn __bindgen_test_layout_nsReadingIterator_instantiation_96() { + assert_eq!(::std::mem::size_of::>() , + 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsReadingIterator - ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsReadingIterator ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator - ) )); + root::nsReadingIterator ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_26() { - assert_eq!(::std::mem::size_of::>() - , 24usize , concat ! ( + fn __bindgen_test_layout_nsWritingIterator_instantiation_97() { + assert_eq!(::std::mem::size_of::>() , + 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsWritingIterator - ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsWritingIterator ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator - ) )); + root::nsWritingIterator ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_27() { + fn __bindgen_test_layout_nsCharTraits_instantiation_98() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34083,33 +34029,29 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_28() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsReadingIterator_instantiation_99() { + assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsReadingIterator - ) )); - assert_eq!(::std::mem::align_of::>() + root::nsReadingIterator<::std::os::raw::c_char> ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator - ) )); + root::nsReadingIterator<::std::os::raw::c_char> ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_29() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsWritingIterator_instantiation_100() { + assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsWritingIterator - ) )); - assert_eq!(::std::mem::align_of::>() + root::nsWritingIterator<::std::os::raw::c_char> ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator - ) )); + root::nsWritingIterator<::std::os::raw::c_char> ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_30() { + fn __bindgen_test_layout_nsCharTraits_instantiation_101() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34120,7 +34062,7 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_31() { + fn __bindgen_test_layout_nsCharTraits_instantiation_102() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34131,7 +34073,7 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout__bindgen_ty_id_188182_instantiation_32() { + fn __bindgen_test_layout__bindgen_ty_id_214445_instantiation_103() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -34140,7 +34082,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout__bindgen_ty_id_188218_instantiation_33() { + fn __bindgen_test_layout__bindgen_ty_id_214481_instantiation_104() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -34149,7 +34091,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_34() { + fn __bindgen_test_layout_nsTArray_instantiation_105() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34160,7 +34102,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_35() { + fn __bindgen_test_layout_Handle_instantiation_106() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34171,7 +34113,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_36() { + fn __bindgen_test_layout_Handle_instantiation_107() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34182,7 +34124,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_37() { + fn __bindgen_test_layout_MutableHandle_instantiation_108() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34193,7 +34135,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Rooted_instantiation_38() { + fn __bindgen_test_layout_Rooted_instantiation_109() { assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34204,7 +34146,7 @@ pub mod root { [u64; 3usize] ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_39() { + fn __bindgen_test_layout_DeletePolicy_instantiation_110() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34215,7 +34157,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_40() { + fn __bindgen_test_layout_nsTArray_instantiation_111() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34226,7 +34168,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_41() { + fn __bindgen_test_layout_nsTArray_instantiation_112() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34237,29 +34179,29 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_42() { - assert_eq!(::std::mem::size_of::>() , 8usize , - concat ! ( + fn __bindgen_test_layout_nsTArray_instantiation_113() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() , 8usize , - concat ! ( + root::nsTArray<::std::os::raw::c_uint> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); + root::nsTArray<::std::os::raw::c_uint> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_43() { - assert_eq!(::std::mem::size_of::>() , 8usize , - concat ! ( + fn __bindgen_test_layout_nsTArray_instantiation_114() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() , 8usize , - concat ! ( + root::nsTArray<::std::os::raw::c_uint> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); + root::nsTArray<::std::os::raw::c_uint> ) )); } #[test] - fn __bindgen_test_layout_BaseTimeDuration_instantiation_44() { + fn __bindgen_test_layout_BaseTimeDuration_instantiation_115() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34270,7 +34212,7 @@ pub mod root { root::mozilla::BaseTimeDuration ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_45() { + fn __bindgen_test_layout_nsTArray_instantiation_116() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34281,7 +34223,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_46() { + fn __bindgen_test_layout_TErrorResult_instantiation_117() { assert_eq!(::std::mem::size_of::() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34292,7 +34234,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_47() { + fn __bindgen_test_layout_TErrorResult_instantiation_118() { assert_eq!(::std::mem::size_of::() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34303,7 +34245,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_48() { + fn __bindgen_test_layout_already_AddRefed_instantiation_119() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34314,7 +34256,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_49() { + fn __bindgen_test_layout_Handle_instantiation_120() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34325,7 +34267,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_50() { + fn __bindgen_test_layout_MutableHandle_instantiation_121() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34336,7 +34278,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_51() { + fn __bindgen_test_layout_Handle_instantiation_122() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34347,7 +34289,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_52() { + fn __bindgen_test_layout_nsTArray_instantiation_123() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34358,7 +34300,7 @@ pub mod root { root::nsTArray<*mut root::mozilla::StyleSheet> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_53() { + fn __bindgen_test_layout_Handle_instantiation_124() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34369,7 +34311,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_54() { + fn __bindgen_test_layout_RefPtr_instantiation_125() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34380,7 +34322,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_55() { + fn __bindgen_test_layout_Handle_instantiation_126() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34391,7 +34333,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_56() { + fn __bindgen_test_layout_Handle_instantiation_127() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34402,7 +34344,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_57() { + fn __bindgen_test_layout_already_AddRefed_instantiation_128() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34413,7 +34355,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_58() { + fn __bindgen_test_layout_already_AddRefed_instantiation_129() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34424,7 +34366,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_59() { + fn __bindgen_test_layout_already_AddRefed_instantiation_130() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34435,7 +34377,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_60() { + fn __bindgen_test_layout_Handle_instantiation_131() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34446,7 +34388,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_61() { + fn __bindgen_test_layout_MutableHandle_instantiation_132() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34457,7 +34399,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_62() { + fn __bindgen_test_layout_MutableHandle_instantiation_133() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34468,7 +34410,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_63() { + fn __bindgen_test_layout_DeletePolicy_instantiation_134() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34479,7 +34421,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_64() { + fn __bindgen_test_layout_UniquePtr_instantiation_135() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34490,7 +34432,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_65() { + fn __bindgen_test_layout_DeletePolicy_instantiation_136() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34501,7 +34443,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_66() { + fn __bindgen_test_layout_UniquePtr_instantiation_137() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34512,7 +34454,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_67() { + fn __bindgen_test_layout_DeletePolicy_instantiation_138() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34523,7 +34465,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_68() { + fn __bindgen_test_layout_UniquePtr_instantiation_139() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34534,7 +34476,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_69() { + fn __bindgen_test_layout_DeletePolicy_instantiation_140() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34545,7 +34487,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_70() { + fn __bindgen_test_layout_UniquePtr_instantiation_141() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34556,7 +34498,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_71() { + fn __bindgen_test_layout_DeletePolicy_instantiation_142() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34567,7 +34509,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_72() { + fn __bindgen_test_layout_UniquePtr_instantiation_143() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34578,7 +34520,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_iterator_instantiation_73() { + fn __bindgen_test_layout_iterator_instantiation_144() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34589,7 +34531,7 @@ pub mod root { root::std::iterator ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_74() { + fn __bindgen_test_layout_DeletePolicy_instantiation_145() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34600,7 +34542,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_75() { + fn __bindgen_test_layout_UniquePtr_instantiation_146() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34611,7 +34553,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_76() { + fn __bindgen_test_layout_DeletePolicy_instantiation_147() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34622,7 +34564,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_77() { + fn __bindgen_test_layout_UniquePtr_instantiation_148() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34633,7 +34575,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_78() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_149() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34644,7 +34586,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_79() { + fn __bindgen_test_layout_Handle_instantiation_150() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34655,7 +34597,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_80() { + fn __bindgen_test_layout_MutableHandle_instantiation_151() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34666,7 +34608,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_81() { + fn __bindgen_test_layout_nsTArray_instantiation_152() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34677,7 +34619,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_82() { + fn __bindgen_test_layout_nsTArray_instantiation_153() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34688,7 +34630,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_83() { + fn __bindgen_test_layout_Heap_instantiation_154() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34699,7 +34641,7 @@ pub mod root { root::JS::Heap ) )); } #[test] - fn __bindgen_test_layout_Heap_instantiation_84() { + fn __bindgen_test_layout_Heap_instantiation_155() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34710,7 +34652,7 @@ pub mod root { root::JS::Heap<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_TenuredHeap_instantiation_85() { + fn __bindgen_test_layout_TenuredHeap_instantiation_156() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34721,7 +34663,7 @@ pub mod root { root::JS::TenuredHeap ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_86() { + fn __bindgen_test_layout_already_AddRefed_instantiation_157() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34732,7 +34674,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_87() { + fn __bindgen_test_layout_nsTArray_instantiation_158() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34745,7 +34687,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_88() { + fn __bindgen_test_layout_RefPtr_instantiation_159() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34756,7 +34698,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_89() { + fn __bindgen_test_layout_nsTArray_instantiation_160() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34769,7 +34711,7 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_90() { + fn __bindgen_test_layout_RefPtr_instantiation_161() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34780,7 +34722,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_91() { + fn __bindgen_test_layout_nsTArray_instantiation_162() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34793,7 +34735,7 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_92() { + fn __bindgen_test_layout_RefPtr_instantiation_163() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34804,7 +34746,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_93() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_164() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34815,7 +34757,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_94() { + fn __bindgen_test_layout_nsTArray_instantiation_165() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34826,7 +34768,7 @@ pub mod root { root::nsTArray> ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_95() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_166() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34837,7 +34779,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_96() { + fn __bindgen_test_layout_already_AddRefed_instantiation_167() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34848,7 +34790,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_97() { + fn __bindgen_test_layout_already_AddRefed_instantiation_168() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34859,7 +34801,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_98() { + fn __bindgen_test_layout_RefPtr_instantiation_169() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34870,7 +34812,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_99() { + fn __bindgen_test_layout_already_AddRefed_instantiation_170() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34881,7 +34823,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_100() { + fn __bindgen_test_layout_MutableHandle_instantiation_171() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34892,7 +34834,7 @@ pub mod root { root::JS::MutableHandle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_101() { + fn __bindgen_test_layout_already_AddRefed_instantiation_172() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34903,7 +34845,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_102() { + fn __bindgen_test_layout_already_AddRefed_instantiation_173() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34914,7 +34856,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_103() { + fn __bindgen_test_layout_already_AddRefed_instantiation_174() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34925,7 +34867,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_104() { + fn __bindgen_test_layout_RefPtr_instantiation_175() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34936,7 +34878,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_105() { + fn __bindgen_test_layout_Handle_instantiation_176() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34947,7 +34889,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_106() { + fn __bindgen_test_layout_already_AddRefed_instantiation_177() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34958,7 +34900,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_107() { + fn __bindgen_test_layout_already_AddRefed_instantiation_178() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34969,7 +34911,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_108() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_179() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34980,7 +34922,18 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_109() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_180() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_181() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34991,7 +34944,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_110() { + fn __bindgen_test_layout_nsTArray_instantiation_182() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35004,7 +34957,7 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_111() { + fn __bindgen_test_layout_Handle_instantiation_183() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35015,7 +34968,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_112() { + fn __bindgen_test_layout_DefaultDelete_instantiation_184() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35026,7 +34979,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_113() { + fn __bindgen_test_layout_UniquePtr_instantiation_185() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35037,7 +34990,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_114() { + fn __bindgen_test_layout_already_AddRefed_instantiation_186() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35048,7 +35001,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_115() { + fn __bindgen_test_layout_nsTArray_instantiation_187() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35059,7 +35012,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_116() { + fn __bindgen_test_layout_Handle_instantiation_188() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35070,7 +35023,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_117() { + fn __bindgen_test_layout_Handle_instantiation_189() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35081,7 +35034,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_118() { + fn __bindgen_test_layout_Handle_instantiation_190() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35092,7 +35045,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_119() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_191() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35105,7 +35058,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_120() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_192() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35116,7 +35069,7 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_121() { + fn __bindgen_test_layout_Handle_instantiation_193() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35127,7 +35080,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_122() { + fn __bindgen_test_layout_nsTArray_instantiation_194() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35138,7 +35091,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_123() { + fn __bindgen_test_layout_nsTArray_instantiation_195() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35149,7 +35102,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_124() { + fn __bindgen_test_layout_already_AddRefed_instantiation_196() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35160,7 +35113,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_125() { + fn __bindgen_test_layout_already_AddRefed_instantiation_197() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35171,7 +35124,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_126() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_198() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -35180,7 +35133,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_127() { + fn __bindgen_test_layout_already_AddRefed_instantiation_199() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35191,7 +35144,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_128() { + fn __bindgen_test_layout_nsTArray_instantiation_200() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35202,7 +35155,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_129() { + fn __bindgen_test_layout_already_AddRefed_instantiation_201() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35213,7 +35166,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_130() { + fn __bindgen_test_layout_DefaultDelete_instantiation_202() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35224,7 +35177,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_131() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_203() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35235,7 +35188,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_132() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_204() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35246,7 +35199,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_133() { + fn __bindgen_test_layout_nsTArray_instantiation_205() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35257,7 +35210,7 @@ pub mod root { root::nsTArray> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_134() { + fn __bindgen_test_layout_already_AddRefed_instantiation_206() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35268,800 +35221,6 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_135() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_136() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_137() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_138() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_139() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_140() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_141() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_142() { - assert_eq!(::std::mem::size_of::<[u64; 29usize]>() , 232usize , concat - ! ( - "Size of template specialization: " , stringify ! ( - [u64; 29usize] ) )); - assert_eq!(::std::mem::align_of::<[u64; 29usize]>() , 8usize , concat - ! ( - "Alignment of template specialization: " , stringify ! ( - [u64; 29usize] ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_143() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_144() { - assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u64; 6usize] ) )); - assert_eq!(::std::mem::align_of::<[u64; 6usize]>() , 8usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u64; 6usize] ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_145() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_146() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_147() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_148() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_149() { - assert_eq!(::std::mem::size_of::>>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - assert_eq!(::std::mem::align_of::>>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_150() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_151() { - assert_eq!(::std::mem::size_of::>>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - assert_eq!(::std::mem::align_of::>>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - } - #[test] - fn __bindgen_test_layout_WeakPtr_instantiation_152() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( u64 ) - )); - assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - u64 ) )); - } - #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_153() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsPtrHashKey<::std::os::raw::c_void> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsPtrHashKey<::std::os::raw::c_void> ) )); - } - #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_154() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsPtrHashKey ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsPtrHashKey ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_155() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_156() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::OwningNonNull ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::OwningNonNull ) )); - } - #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_157() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::OwningNonNull ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::OwningNonNull ) )); - } - #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_158() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::OwningNonNull ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::OwningNonNull ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_159() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_160() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_161() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_162() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_163() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - } - #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_164() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsPtrHashKey<::std::os::raw::c_void> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsPtrHashKey<::std::os::raw::c_void> ) )); - } - #[test] - fn __bindgen_test_layout_PointTyped_instantiation_165() { - assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - } - #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_166() { - assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - } - #[test] - fn __bindgen_test_layout_SizeTyped_instantiation_167() { - assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - } - #[test] - fn __bindgen_test_layout_RectTyped_instantiation_168() { - assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - } - #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_169() { - assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - } - #[test] - fn __bindgen_test_layout_IntSizeTyped_instantiation_170() { - assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - } - #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_171() { - assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - } - #[test] - fn __bindgen_test_layout_MarginTyped_instantiation_172() { - assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - } - #[test] - fn __bindgen_test_layout_RectTyped_instantiation_173() { - assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - } - #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_174() { - assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - } - #[test] - fn __bindgen_test_layout_ScaleFactor_instantiation_175() { - assert_eq!(::std::mem::size_of::() , 4usize , concat ! ( - "Size of template specialization: " , stringify ! ( u32 ) - )); - assert_eq!(::std::mem::align_of::() , 4usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - u32 ) )); - } - #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_176() { - assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - } - #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_177() { - assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - } - #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_178() { - assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_179() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_180() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_181() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_182() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_183() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_184() { - assert_eq!(::std::mem::size_of::<[u64; 29usize]>() , 232usize , concat - ! ( - "Size of template specialization: " , stringify ! ( - [u64; 29usize] ) )); - assert_eq!(::std::mem::align_of::<[u64; 29usize]>() , 8usize , concat - ! ( - "Alignment of template specialization: " , stringify ! ( - [u64; 29usize] ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_185() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_186() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_187() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_188() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_189() { - assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u64; 6usize] ) )); - assert_eq!(::std::mem::align_of::<[u64; 6usize]>() , 8usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u64; 6usize] ) )); - } - #[test] - fn __bindgen_test_layout_Rooted_instantiation_190() { - assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u64; 3usize] ) )); - assert_eq!(::std::mem::align_of::<[u64; 3usize]>() , 8usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u64; 3usize] ) )); - } - #[test] - fn __bindgen_test_layout_Rooted_instantiation_191() { - assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u64; 3usize] ) )); - assert_eq!(::std::mem::align_of::<[u64; 3usize]>() , 8usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u64; 3usize] ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_192() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_193() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - } - #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_194() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_195() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_196() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_197() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_198() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_199() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_200() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_201() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_202() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_203() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_204() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_205() { - assert_eq!(::std::mem::size_of::>>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray> - ) )); - assert_eq!(::std::mem::align_of::>>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray> - ) )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_206() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] fn __bindgen_test_layout_already_AddRefed_instantiation_207() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -36074,17 +35233,39 @@ pub mod root { } #[test] fn __bindgen_test_layout_already_AddRefed_instantiation_208() { - assert_eq!(::std::mem::size_of::>() + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); + root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_209() { + fn __bindgen_test_layout_already_AddRefed_instantiation_209() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_210() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_211() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36095,7 +35276,779 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_210() { + fn __bindgen_test_layout_Handle_instantiation_212() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_213() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_214() { + assert_eq!(::std::mem::size_of::<[u64; 29usize]>() , 232usize , concat + ! ( + "Size of template specialization: " , stringify ! ( + [u64; 29usize] ) )); + assert_eq!(::std::mem::align_of::<[u64; 29usize]>() , 8usize , concat + ! ( + "Alignment of template specialization: " , stringify ! ( + [u64; 29usize] ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_215() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_216() { + assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u64; 6usize] ) )); + assert_eq!(::std::mem::align_of::<[u64; 6usize]>() , 8usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u64; 6usize] ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_217() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_218() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_219() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_220() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_221() { + assert_eq!(::std::mem::size_of::>>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray> ) + )); + assert_eq!(::std::mem::align_of::>>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray> ) + )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_222() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_223() { + assert_eq!(::std::mem::size_of::>>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray> ) + )); + assert_eq!(::std::mem::align_of::>>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray> ) + )); + } + #[test] + fn __bindgen_test_layout_WeakPtr_instantiation_224() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( u64 ) + )); + assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + u64 ) )); + } + #[test] + fn __bindgen_test_layout_nsPtrHashKey_instantiation_225() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsPtrHashKey<::std::os::raw::c_void> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsPtrHashKey<::std::os::raw::c_void> ) )); + } + #[test] + fn __bindgen_test_layout_nsPtrHashKey_instantiation_226() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsPtrHashKey ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsPtrHashKey ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_227() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_OwningNonNull_instantiation_228() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::OwningNonNull ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::OwningNonNull ) )); + } + #[test] + fn __bindgen_test_layout_OwningNonNull_instantiation_229() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::OwningNonNull ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::OwningNonNull ) )); + } + #[test] + fn __bindgen_test_layout_OwningNonNull_instantiation_230() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::OwningNonNull ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::OwningNonNull ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_231() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_232() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_233() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_MutableHandle_instantiation_234() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_instantiation_235() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsPtrHashKey_instantiation_236() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsPtrHashKey<::std::os::raw::c_void> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsPtrHashKey<::std::os::raw::c_void> ) )); + } + #[test] + fn __bindgen_test_layout_PointTyped_instantiation_237() { + assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + } + #[test] + fn __bindgen_test_layout_IntPointTyped_instantiation_238() { + assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + } + #[test] + fn __bindgen_test_layout_SizeTyped_instantiation_239() { + assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + } + #[test] + fn __bindgen_test_layout_RectTyped_instantiation_240() { + assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + } + #[test] + fn __bindgen_test_layout_IntPointTyped_instantiation_241() { + assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + } + #[test] + fn __bindgen_test_layout_IntSizeTyped_instantiation_242() { + assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + } + #[test] + fn __bindgen_test_layout_IntRectTyped_instantiation_243() { + assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + } + #[test] + fn __bindgen_test_layout_MarginTyped_instantiation_244() { + assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + } + #[test] + fn __bindgen_test_layout_RectTyped_instantiation_245() { + assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + } + #[test] + fn __bindgen_test_layout_IntRectTyped_instantiation_246() { + assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + } + #[test] + fn __bindgen_test_layout_ScaleFactor_instantiation_247() { + assert_eq!(::std::mem::size_of::() , 4usize , concat ! ( + "Size of template specialization: " , stringify ! ( u32 ) + )); + assert_eq!(::std::mem::align_of::() , 4usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + u32 ) )); + } + #[test] + fn __bindgen_test_layout_ScaleFactors2D_instantiation_248() { + assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + } + #[test] + fn __bindgen_test_layout_ScaleFactors2D_instantiation_249() { + assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + } + #[test] + fn __bindgen_test_layout_ScaleFactors2D_instantiation_250() { + assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_251() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_252() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_253() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_254() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_255() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_256() { + assert_eq!(::std::mem::size_of::<[u64; 29usize]>() , 232usize , concat + ! ( + "Size of template specialization: " , stringify ! ( + [u64; 29usize] ) )); + assert_eq!(::std::mem::align_of::<[u64; 29usize]>() , 8usize , concat + ! ( + "Alignment of template specialization: " , stringify ! ( + [u64; 29usize] ) )); + } + #[test] + fn __bindgen_test_layout_MutableHandle_instantiation_257() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + } + #[test] + fn __bindgen_test_layout_MutableHandle_instantiation_258() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_259() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_DefaultDelete_instantiation_260() { + assert_eq!(::std::mem::size_of::() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_261() { + assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u64; 6usize] ) )); + assert_eq!(::std::mem::align_of::<[u64; 6usize]>() , 8usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u64; 6usize] ) )); + } + #[test] + fn __bindgen_test_layout_Rooted_instantiation_262() { + assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u64; 3usize] ) )); + assert_eq!(::std::mem::align_of::<[u64; 3usize]>() , 8usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u64; 3usize] ) )); + } + #[test] + fn __bindgen_test_layout_Rooted_instantiation_263() { + assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u64; 3usize] ) )); + assert_eq!(::std::mem::align_of::<[u64; 3usize]>() , 8usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u64; 3usize] ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_264() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_instantiation_265() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_instantiation_266() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_267() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_268() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle ) )); + } + #[test] + fn __bindgen_test_layout_MutableHandle_instantiation_269() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_270() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_MutableHandle_instantiation_271() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_272() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_273() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_274() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_275() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_276() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_277() { + assert_eq!(::std::mem::size_of::>>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray> + ) )); + assert_eq!(::std::mem::align_of::>>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray> + ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_278() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_279() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_280() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_281() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_282() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36106,7 +36059,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_211() { + fn __bindgen_test_layout_RefPtr_instantiation_283() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36119,7 +36072,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_212() { + fn __bindgen_test_layout_nsTArray_instantiation_284() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36132,7 +36085,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_213() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_285() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36143,7 +36096,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_214() { + fn __bindgen_test_layout_RefPtr_instantiation_286() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36156,7 +36109,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_215() { + fn __bindgen_test_layout_UniquePtr_instantiation_287() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36167,7 +36120,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_216() { + fn __bindgen_test_layout_nsTArray_instantiation_288() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36178,830 +36131,26 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_217() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_218() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_219() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_220() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_221() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_222() { - assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u64; 6usize] ) )); - assert_eq!(::std::mem::align_of::<[u64; 6usize]>() , 8usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u64; 6usize] ) )); - } - #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_223() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::OwningNonNull - ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::OwningNonNull - ) )); - } - #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_224() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsRefPtrHashKey ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsRefPtrHashKey ) )); - } - #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_225() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsRefPtrHashKey ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsRefPtrHashKey ) )); - } - #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_226() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - } - #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_227() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_228() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_229() { - assert_eq!(::std::mem::size_of::>() - , 32usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsMainThreadPtrHolder ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsMainThreadPtrHolder ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_230() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_231() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_232() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_233() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_234() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_235() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsPtrHashKey ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsPtrHashKey ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_236() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_237() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_238() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - } - #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_239() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_240() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_241() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_242() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( u64 ) - )); - assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - u64 ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_243() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_244() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_245() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_246() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_Maybe_instantiation_247() { - assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 3usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 3usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 3usize] ) )); - } - #[test] - fn __bindgen_test_layout_Maybe_instantiation_248() { - assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 3usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 3usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 3usize] ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_249() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_250() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_251() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_252() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - } - #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_253() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_254() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_255() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_Maybe_instantiation_256() { - assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 3usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 3usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 3usize] ) )); - } - #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_257() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_258() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_pair_instantiation_259() { - assert_eq!(::std::mem::size_of::>() - , 32usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr> ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_260() { - assert_eq!(::std::mem::size_of::>>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray> - ) )); - assert_eq!(::std::mem::align_of::>>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray> - ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_261() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_262() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_263() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_264() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); - } - #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_265() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - } - #[test] - fn __bindgen_test_layout_nsStyleAutoArray_instantiation_266() { - assert_eq!(::std::mem::size_of::>() - , 64usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsStyleAutoArray ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsStyleAutoArray ) )); - } - #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_267() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_268() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - } - #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_269() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_270() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_271() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_272() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_NonNull_instantiation_273() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::dom::NonNull ) - )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::dom::NonNull ) - )); - } - #[test] - fn __bindgen_test_layout_NonNull_instantiation_274() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::dom::NonNull - ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::dom::NonNull - ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_275() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_276() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_Maybe_instantiation_277() { - assert_eq!(::std::mem::size_of::<[u64; 18usize]>() , 144usize , concat - ! ( - "Size of template specialization: " , stringify ! ( - [u64; 18usize] ) )); - assert_eq!(::std::mem::align_of::<[u64; 18usize]>() , 8usize , concat - ! ( - "Alignment of template specialization: " , stringify ! ( - [u64; 18usize] ) )); - } - #[test] - fn __bindgen_test_layout_Maybe_instantiation_278() { - assert_eq!(::std::mem::size_of::<[u64; 18usize]>() , 144usize , concat - ! ( - "Size of template specialization: " , stringify ! ( - [u64; 18usize] ) )); - assert_eq!(::std::mem::align_of::<[u64; 18usize]>() , 8usize , concat - ! ( - "Alignment of template specialization: " , stringify ! ( - [u64; 18usize] ) )); - } - #[test] - fn __bindgen_test_layout_BaseTimeDuration_instantiation_279() { - assert_eq!(::std::mem::size_of::() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::BaseTimeDuration ) )); - assert_eq!(::std::mem::align_of::() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::BaseTimeDuration ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_280() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_281() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_282() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray<*mut root::nsIContent> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray<*mut root::nsIContent> ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_283() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray<*mut root::nsIContent> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray<*mut root::nsIContent> ) )); - } - #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_284() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - } - #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_285() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsRefPtrHashKey - ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsRefPtrHashKey - ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_286() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_287() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray - ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray - ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_288() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] fn __bindgen_test_layout_Handle_instantiation_289() { - assert_eq!(::std::mem::size_of::>() + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() + root::JS::Handle ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); + root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_290() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_MutableHandle_instantiation_290() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); + root::JS::MutableHandle ) )); } #[test] fn __bindgen_test_layout_Handle_instantiation_291() { @@ -37026,122 +36175,18 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Sequence_instantiation_293() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( u64 ) - )); - assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - u64 ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_294() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_already_AddRefed_instantiation_293() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::JS::Handle ) )); - assert_eq!(::std::mem::align_of::>() + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::JS::Handle ) )); + root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_Sequence_instantiation_295() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( u64 ) - )); - assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - u64 ) )); - } - #[test] - fn __bindgen_test_layout_Sequence_instantiation_296() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( u64 ) - )); - assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - u64 ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_297() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_298() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_299() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_300() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_301() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_302() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_303() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsRefPtrHashKey ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsRefPtrHashKey ) )); - } - #[test] - fn __bindgen_test_layout_nsClassHashtable_instantiation_304() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_294() { assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37152,18 +36197,227 @@ pub mod root { [u64; 6usize] ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_305() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_OwningNonNull_instantiation_295() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() + root::mozilla::OwningNonNull + ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); + root::mozilla::OwningNonNull + ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_306() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_296() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsRefPtrHashKey ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsRefPtrHashKey ) )); + } + #[test] + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_297() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsRefPtrHashKey ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsRefPtrHashKey ) )); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_instantiation_298() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + } + #[test] + fn __bindgen_test_layout_DefaultDelete_instantiation_299() { + assert_eq!(::std::mem::size_of::() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_300() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_301() { + assert_eq!(::std::mem::size_of::>() + , 32usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsMainThreadPtrHolder ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsMainThreadPtrHolder ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_302() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_303() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_304() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_305() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_306() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_nsPtrHashKey_instantiation_307() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsPtrHashKey ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsPtrHashKey ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_308() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_DefaultDelete_instantiation_309() { + assert_eq!(::std::mem::size_of::() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_310() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + } + #[test] + fn __bindgen_test_layout_DefaultDelete_instantiation_311() { + assert_eq!(::std::mem::size_of::() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_312() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_313() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_314() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( u64 ) + )); + assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + u64 ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_315() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37174,18 +36428,356 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_307() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( + fn __bindgen_test_layout_nsTArray_instantiation_316() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); + root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_308() { + fn __bindgen_test_layout_already_AddRefed_instantiation_317() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_318() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_Maybe_instantiation_319() { + assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 3usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 3usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 3usize] ) )); + } + #[test] + fn __bindgen_test_layout_Maybe_instantiation_320() { + assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 3usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 3usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 3usize] ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_321() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_322() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_DefaultDelete_instantiation_323() { + assert_eq!(::std::mem::size_of::() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_324() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + } + #[test] + fn __bindgen_test_layout_DefaultDelete_instantiation_325() { + assert_eq!(::std::mem::size_of::() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_326() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_327() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_Maybe_instantiation_328() { + assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 3usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 3usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 3usize] ) )); + } + #[test] + fn __bindgen_test_layout_DefaultDelete_instantiation_329() { + assert_eq!(::std::mem::size_of::() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_DefaultDelete_instantiation_330() { + assert_eq!(::std::mem::size_of::() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_pair_instantiation_331() { + assert_eq!(::std::mem::size_of::>() + , 32usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr> ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_332() { + assert_eq!(::std::mem::size_of::>>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray> + ) )); + assert_eq!(::std::mem::align_of::>>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray> + ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_333() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_334() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_335() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_336() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray ) )); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_instantiation_337() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsStyleAutoArray_instantiation_338() { + assert_eq!(::std::mem::size_of::>() + , 64usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsStyleAutoArray ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsStyleAutoArray ) )); + } + #[test] + fn __bindgen_test_layout_DefaultDelete_instantiation_339() { + assert_eq!(::std::mem::size_of::() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_340() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + } + #[test] + fn __bindgen_test_layout_DefaultDelete_instantiation_341() { + assert_eq!(::std::mem::size_of::() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_342() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_343() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_344() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_NonNull_instantiation_345() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::dom::NonNull ) + )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::dom::NonNull ) + )); + } + #[test] + fn __bindgen_test_layout_NonNull_instantiation_346() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::dom::NonNull + ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::dom::NonNull + ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_347() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37196,7 +36788,368 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_309() { + fn __bindgen_test_layout_MutableHandle_instantiation_348() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + } + #[test] + fn __bindgen_test_layout_Maybe_instantiation_349() { + assert_eq!(::std::mem::size_of::<[u64; 18usize]>() , 144usize , concat + ! ( + "Size of template specialization: " , stringify ! ( + [u64; 18usize] ) )); + assert_eq!(::std::mem::align_of::<[u64; 18usize]>() , 8usize , concat + ! ( + "Alignment of template specialization: " , stringify ! ( + [u64; 18usize] ) )); + } + #[test] + fn __bindgen_test_layout_Maybe_instantiation_350() { + assert_eq!(::std::mem::size_of::<[u64; 18usize]>() , 144usize , concat + ! ( + "Size of template specialization: " , stringify ! ( + [u64; 18usize] ) )); + assert_eq!(::std::mem::align_of::<[u64; 18usize]>() , 8usize , concat + ! ( + "Alignment of template specialization: " , stringify ! ( + [u64; 18usize] ) )); + } + #[test] + fn __bindgen_test_layout_BaseTimeDuration_instantiation_351() { + assert_eq!(::std::mem::size_of::() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::BaseTimeDuration ) )); + assert_eq!(::std::mem::align_of::() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::BaseTimeDuration ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_352() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_353() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_354() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray<*mut root::nsIContent> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray<*mut root::nsIContent> ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_355() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray<*mut root::nsIContent> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray<*mut root::nsIContent> ) )); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_instantiation_356() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_357() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsRefPtrHashKey + ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsRefPtrHashKey + ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_358() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_359() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray + ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray + ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_360() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_361() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_362() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_363() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle ) )); + } + #[test] + fn __bindgen_test_layout_MutableHandle_instantiation_364() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + } + #[test] + fn __bindgen_test_layout_Sequence_instantiation_365() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( u64 ) + )); + assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + u64 ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_366() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle ) )); + } + #[test] + fn __bindgen_test_layout_Sequence_instantiation_367() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( u64 ) + )); + assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + u64 ) )); + } + #[test] + fn __bindgen_test_layout_Sequence_instantiation_368() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( u64 ) + )); + assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + u64 ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_369() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_370() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_MutableHandle_instantiation_371() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_372() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle ) )); + } + #[test] + fn __bindgen_test_layout_MutableHandle_instantiation_373() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_374() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_375() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsRefPtrHashKey ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsRefPtrHashKey ) )); + } + #[test] + fn __bindgen_test_layout_nsClassHashtable_instantiation_376() { + assert_eq!(::std::mem::size_of::<[u64; 6usize]>() , 48usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u64; 6usize] ) )); + assert_eq!(::std::mem::align_of::<[u64; 6usize]>() , 8usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u64; 6usize] ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_377() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_378() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_379() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_380() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_381() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -37207,7 +37160,7 @@ pub mod root { root::nsTArray<*mut root::mozilla::css::DocumentRule> ) )); } #[test] - fn __bindgen_test_layout_nsAutoPtr_instantiation_310() { + fn __bindgen_test_layout_nsAutoPtr_instantiation_382() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( diff --git a/servo/components/style/gecko/generated/structs_release.rs b/servo/components/style/gecko/generated/structs_release.rs index 32e1272f0956..d197eacc6bd7 100644 --- a/servo/components/style/gecko/generated/structs_release.rs +++ b/servo/components/style/gecko/generated/structs_release.rs @@ -975,7 +975,6 @@ pub mod root { pub const NS_STYLE_DISPLAY_MODE_BROWSER: ::std::os::raw::c_uint = 0; pub const NS_STYLE_DISPLAY_MODE_MINIMAL_UI: ::std::os::raw::c_uint = 1; pub const NS_STYLE_DISPLAY_MODE_STANDALONE: ::std::os::raw::c_uint = 2; - pub const NS_STYLE_DISPLAY_MODE_FULLSCREEN: ::std::os::raw::c_uint = 3; pub const CSS_PSEUDO_ELEMENT_IS_CSS2: ::std::os::raw::c_uint = 1; pub const CSS_PSEUDO_ELEMENT_CONTAINS_ELEMENTS: ::std::os::raw::c_uint = 2; @@ -1046,19 +1045,6 @@ pub mod root { } pub type pair_first_type<_T1> = _T1; pub type pair_second_type<_T2> = _T2; - pub type pair__EnableB = u8; - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct pair__CheckArgs { - pub _address: u8, - } - pub type pair__CheckArgsDep = u8; - #[repr(C)] - #[derive(Debug, Copy, Clone)] - pub struct pair__CheckTupleLikeConstructor { - pub _address: u8, - } - pub type pair__CheckTLC = u8; #[repr(C)] #[derive(Debug, Copy)] pub struct input_iterator_tag { @@ -1078,98 +1064,47 @@ pub mod root { fn clone(&self) -> Self { *self } } #[repr(C)] - #[derive(Debug, Copy)] - pub struct forward_iterator_tag { + #[derive(Debug, Copy, Clone)] + pub struct iterator { pub _address: u8, } - #[test] - fn bindgen_test_layout_forward_iterator_tag() { - assert_eq!(::std::mem::size_of::() , 1usize - , concat ! ( - "Size of: " , stringify ! ( forward_iterator_tag ) )); - assert_eq! (::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of " , stringify ! ( forward_iterator_tag ) - )); - } - impl Clone for forward_iterator_tag { - fn clone(&self) -> Self { *self } - } + pub type iterator_iterator_category<_Category> = _Category; + pub type iterator_value_type<_Tp> = _Tp; + pub type iterator_difference_type<_Distance> = _Distance; + pub type iterator_pointer<_Pointer> = _Pointer; + pub type iterator_reference<_Reference> = _Reference; #[repr(C)] - #[derive(Debug, Copy)] - pub struct bidirectional_iterator_tag { + #[derive(Debug, Copy, Clone)] + pub struct __iterator_traits { pub _address: u8, } - #[test] - fn bindgen_test_layout_bidirectional_iterator_tag() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of: " , stringify ! ( bidirectional_iterator_tag - ) )); - assert_eq! (::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of " , stringify ! ( - bidirectional_iterator_tag ) )); - } - impl Clone for bidirectional_iterator_tag { - fn clone(&self) -> Self { *self } - } - #[repr(C)] - #[derive(Debug, Copy)] - pub struct random_access_iterator_tag { - pub _address: u8, - } - #[test] - fn bindgen_test_layout_random_access_iterator_tag() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of: " , stringify ! ( random_access_iterator_tag - ) )); - assert_eq! (::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of " , stringify ! ( - random_access_iterator_tag ) )); - } - impl Clone for random_access_iterator_tag { - fn clone(&self) -> Self { *self } - } #[repr(C)] + #[derive(Debug, Copy, Clone)] pub struct iterator_traits { pub _address: u8, } #[repr(C)] #[derive(Debug, Copy, Clone)] - pub struct iterator { - pub _address: u8, + pub struct reverse_iterator<_Iterator> { + pub current: _Iterator, + pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<_Iterator>>, } - pub type iterator_value_type<_Tp> = _Tp; - pub type iterator_difference_type<_Distance> = _Distance; - pub type iterator_pointer<_Pointer> = _Pointer; - pub type iterator_reference<_Reference> = _Reference; - pub type iterator_iterator_category<_Category> = _Category; - #[repr(C)] - pub struct reverse_iterator<_Iter> { - pub __t: _Iter, - pub current: _Iter, - pub _phantom_0: ::std::marker::PhantomData<::std::cell::UnsafeCell<_Iter>>, - } - pub type reverse_iterator_iterator_type<_Iter> = _Iter; + pub type reverse_iterator___traits_type = root::std::iterator_traits; + pub type reverse_iterator_iterator_type<_Iterator> = _Iterator; pub type reverse_iterator_difference_type = - root::std::iterator_traits; - pub type reverse_iterator_reference = root::std::iterator_traits; - pub type reverse_iterator_pointer = root::std::iterator_traits; + root::std::reverse_iterator___traits_type; + pub type reverse_iterator_pointer = + root::std::reverse_iterator___traits_type; + pub type reverse_iterator_reference = + root::std::reverse_iterator___traits_type; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct atomic { } - pub type atomic___base = u8; - #[repr(C)] - pub struct __bit_const_reference { - pub __seg_: root::std::__bit_const_reference___storage_pointer, - pub __mask_: root::std::__bit_const_reference___storage_type, - } - pub type __bit_const_reference___storage_type = [u8; 0usize]; - pub type __bit_const_reference___storage_pointer = [u8; 0usize]; + } + pub mod __gnu_cxx { + #[allow(unused_imports)] + use self::super::super::root; } pub mod mozilla { #[allow(unused_imports)] @@ -1213,9 +1148,8 @@ pub mod root { root::nsSubstringTuple; pub type nsStringRepr_string_type = ::nsstring::nsStringRepr; pub type nsStringRepr_const_iterator = - root::nsReadingIterator; - pub type nsStringRepr_iterator = - root::nsWritingIterator; + root::nsReadingIterator; + pub type nsStringRepr_iterator = root::nsWritingIterator; pub type nsStringRepr_comparator_type = root::nsStringComparator; pub type nsStringRepr_char_iterator = *mut root::mozilla::detail::nsStringRepr_char_type; @@ -1305,9 +1239,9 @@ pub mod root { root::nsCSubstringTuple; pub type nsCStringRepr_string_type = root::nsCString; pub type nsCStringRepr_const_iterator = - root::nsReadingIterator; + root::nsReadingIterator<::std::os::raw::c_char>; pub type nsCStringRepr_iterator = - root::nsWritingIterator; + root::nsWritingIterator<::std::os::raw::c_char>; pub type nsCStringRepr_comparator_type = root::nsCStringComparator; pub type nsCStringRepr_char_iterator = @@ -1403,7 +1337,7 @@ pub mod root { #[repr(C)] #[derive(Debug)] pub struct MutexImpl { - pub platformData_: [*mut ::std::os::raw::c_void; 8usize], + pub platformData_: [*mut ::std::os::raw::c_void; 5usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1412,7 +1346,7 @@ pub mod root { } #[test] fn bindgen_test_layout_MutexImpl() { - assert_eq!(::std::mem::size_of::() , 64usize , + assert_eq!(::std::mem::size_of::() , 40usize , concat ! ( "Size of: " , stringify ! ( MutexImpl ) )); assert_eq! (::std::mem::align_of::() , 8usize , @@ -2195,7 +2129,7 @@ pub mod root { } } #[repr(C)] - #[derive(Debug, Copy)] + #[derive(Debug)] pub struct ThreadSafeAutoRefCnt { pub mValue: u64, } @@ -2216,9 +2150,6 @@ pub mod root { ThreadSafeAutoRefCnt ) , "::" , stringify ! ( mValue ) )); } - impl Clone for ThreadSafeAutoRefCnt { - fn clone(&self) -> Self { *self } - } #[repr(C)] #[derive(Debug)] pub struct OwningNonNull { @@ -8056,7 +7987,7 @@ pub mod root { } #[test] fn bindgen_test_layout_OffTheBooksMutex() { - assert_eq!(::std::mem::size_of::() , 64usize , + assert_eq!(::std::mem::size_of::() , 40usize , concat ! ( "Size of: " , stringify ! ( OffTheBooksMutex ) )); assert_eq! (::std::mem::align_of::() , 8usize , @@ -8075,7 +8006,7 @@ pub mod root { } #[test] fn bindgen_test_layout_Mutex() { - assert_eq!(::std::mem::size_of::() , 64usize , concat ! ( + assert_eq!(::std::mem::size_of::() , 40usize , concat ! ( "Size of: " , stringify ! ( Mutex ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( Mutex ) )); @@ -8894,8 +8825,8 @@ pub mod root { pub mAttrs: root::nsTArray, pub mState: root::mozilla::ServoElementSnapshot_ServoStateType, pub mContains: root::mozilla::ServoElementSnapshot_Flags, - pub mIsHTMLElementInHTMLDocument: bool, - pub mIsInChromeDocument: bool, + pub _bitfield_1: u8, + pub __bindgen_padding_0: [u16; 3usize], } pub type ServoElementSnapshot_BorrowedAttrInfo = root::mozilla::dom::BorrowedAttrInfo; @@ -8932,20 +8863,105 @@ pub mod root { "Alignment of field: " , stringify ! ( ServoElementSnapshot ) , "::" , stringify ! ( mContains ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const ServoElementSnapshot ) ) . - mIsHTMLElementInHTMLDocument as * const _ as usize } , - 17usize , concat ! ( - "Alignment of field: " , stringify ! ( - ServoElementSnapshot ) , "::" , stringify ! ( - mIsHTMLElementInHTMLDocument ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const ServoElementSnapshot ) ) . - mIsInChromeDocument as * const _ as usize } , 18usize - , concat ! ( - "Alignment of field: " , stringify ! ( - ServoElementSnapshot ) , "::" , stringify ! ( - mIsInChromeDocument ) )); + } + impl ServoElementSnapshot { + #[inline] + pub fn mIsHTMLElementInHTMLDocument(&self) -> bool { + let mask = 1usize as u8; + let unit_field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + let val = (unit_field_val & mask) >> 0usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_mIsHTMLElementInHTMLDocument(&mut self, val: bool) { + let mask = 1usize as u8; + let val = val as u8 as u8; + let mut unit_field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + unit_field_val &= !mask; + unit_field_val |= (val << 0usize) & mask; + self._bitfield_1 = + unsafe { ::std::mem::transmute(unit_field_val) }; + } + #[inline] + pub fn mIsInChromeDocument(&self) -> bool { + let mask = 2usize as u8; + let unit_field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + let val = (unit_field_val & mask) >> 1usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_mIsInChromeDocument(&mut self, val: bool) { + let mask = 2usize as u8; + let val = val as u8 as u8; + let mut unit_field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + unit_field_val &= !mask; + unit_field_val |= (val << 1usize) & mask; + self._bitfield_1 = + unsafe { ::std::mem::transmute(unit_field_val) }; + } + #[inline] + pub fn mIsTableBorderNonzero(&self) -> bool { + let mask = 4usize as u8; + let unit_field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + let val = (unit_field_val & mask) >> 2usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_mIsTableBorderNonzero(&mut self, val: bool) { + let mask = 4usize as u8; + let val = val as u8 as u8; + let mut unit_field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + unit_field_val &= !mask; + unit_field_val |= (val << 2usize) & mask; + self._bitfield_1 = + unsafe { ::std::mem::transmute(unit_field_val) }; + } + #[inline] + pub fn mIsMozBrowserFrame(&self) -> bool { + let mask = 8usize as u8; + let unit_field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + let val = (unit_field_val & mask) >> 3usize; + unsafe { ::std::mem::transmute(val as u8) } + } + #[inline] + pub fn set_mIsMozBrowserFrame(&mut self, val: bool) { + let mask = 8usize as u8; + let val = val as u8 as u8; + let mut unit_field_val: u8 = + unsafe { ::std::mem::transmute(self._bitfield_1) }; + unit_field_val &= !mask; + unit_field_val |= (val << 3usize) & mask; + self._bitfield_1 = + unsafe { ::std::mem::transmute(unit_field_val) }; + } + #[inline] + pub fn new_bitfield_1(mIsHTMLElementInHTMLDocument: bool, + mIsInChromeDocument: bool, + mIsTableBorderNonzero: bool, + mIsMozBrowserFrame: bool) -> u8 { + ({ + ({ + ({ + ({ 0 } | + ((mIsHTMLElementInHTMLDocument as u8 as + u8) << 0usize) & (1usize as u8)) + } | + ((mIsInChromeDocument as u8 as u8) << 1usize) & + (2usize as u8)) + } | + ((mIsTableBorderNonzero as u8 as u8) << 2usize) & + (4usize as u8)) + } | + ((mIsMozBrowserFrame as u8 as u8) << 3usize) & + (8usize as u8)) + } } #[repr(C)] #[derive(Debug)] @@ -9199,8 +9215,6 @@ pub mod root { PropertyStyleAnimationValuePair ) , "::" , stringify ! ( mValue ) )); } - pub type ComputedKeyframeValues = - root::nsTArray; #[test] fn __bindgen_test_layout_DefaultDelete_instantiation_3() { assert_eq!(::std::mem::size_of::() , @@ -9729,6 +9743,7 @@ pub mod root { Attributes = 2, Id = 4, MaybeClass = 8, + OtherPseudoClassState = 16, } #[repr(C)] #[derive(Debug, Copy)] @@ -12881,11 +12896,6 @@ pub mod root { AutoSetAsyncStackForNewCalls ) , "::" , stringify ! ( oldAsyncCallIsExplicit ) )); } - pub type WarningReporter = - ::std::option::Option; #[repr(C)] #[derive(Debug)] pub struct AutoHideScriptedCaller { @@ -13039,103 +13049,6 @@ pub mod root { pub struct JSCompartment { _unused: [u8; 0], } - /** - * Describes a single error or warning that occurs in the execution of script. - */ - #[repr(C)] - pub struct JSErrorReport { - pub _base: root::JSErrorBase, - pub linebuf_: *const u16, - pub linebufLength_: usize, - pub tokenOffset_: usize, - pub notes: root::mozilla::UniquePtr, - pub flags: ::std::os::raw::c_uint, - pub exnType: i16, - pub _bitfield_1: u8, - pub __bindgen_padding_0: u8, - } - #[test] - fn bindgen_test_layout_JSErrorReport() { - assert_eq!(::std::mem::size_of::() , 72usize , concat ! - ( "Size of: " , stringify ! ( JSErrorReport ) )); - assert_eq! (::std::mem::align_of::() , 8usize , concat - ! ( "Alignment of " , stringify ! ( JSErrorReport ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . linebuf_ as * - const _ as usize } , 32usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( linebuf_ ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . linebufLength_ as - * const _ as usize } , 40usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( linebufLength_ ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . tokenOffset_ as * - const _ as usize } , 48usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( tokenOffset_ ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . notes as * const - _ as usize } , 56usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( notes ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . flags as * const - _ as usize } , 64usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( flags ) )); - assert_eq! (unsafe { - & ( * ( 0 as * const JSErrorReport ) ) . exnType as * - const _ as usize } , 68usize , concat ! ( - "Alignment of field: " , stringify ! ( JSErrorReport ) , - "::" , stringify ! ( exnType ) )); - } - impl JSErrorReport { - #[inline] - pub fn isMuted(&self) -> bool { - let mask = 1usize as u8; - let unit_field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - let val = (unit_field_val & mask) >> 0usize; - unsafe { ::std::mem::transmute(val as u8) } - } - #[inline] - pub fn set_isMuted(&mut self, val: bool) { - let mask = 1usize as u8; - let val = val as u8 as u8; - let mut unit_field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - unit_field_val &= !mask; - unit_field_val |= (val << 0usize) & mask; - self._bitfield_1 = - unsafe { ::std::mem::transmute(unit_field_val) }; - } - #[inline] - pub fn ownsLinebuf_(&self) -> bool { - let mask = 2usize as u8; - let unit_field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - let val = (unit_field_val & mask) >> 1usize; - unsafe { ::std::mem::transmute(val as u8) } - } - #[inline] - pub fn set_ownsLinebuf_(&mut self, val: bool) { - let mask = 2usize as u8; - let val = val as u8 as u8; - let mut unit_field_val: u8 = - unsafe { ::std::mem::transmute(self._bitfield_1) }; - unit_field_val &= !mask; - unit_field_val |= (val << 1usize) & mask; - self._bitfield_1 = - unsafe { ::std::mem::transmute(unit_field_val) }; - } - #[inline] - pub fn new_bitfield_1(isMuted: bool, ownsLinebuf_: bool) -> u8 { - ({ ({ 0 } | ((isMuted as u8 as u8) << 0usize) & (1usize as u8)) } - | ((ownsLinebuf_ as u8 as u8) << 1usize) & (2usize as u8)) - } - } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct JSRuntime { @@ -14134,7 +14047,7 @@ pub mod root { #[derive(Debug)] pub struct gfxFontFeatureValueSet_ValueList { pub name: ::nsstring::nsStringRepr, - pub featureSelectors: root::nsTArray, + pub featureSelectors: root::nsTArray<::std::os::raw::c_uint>, } #[test] fn bindgen_test_layout_gfxFontFeatureValueSet_ValueList() { @@ -14239,7 +14152,7 @@ pub mod root { pub struct gfxFontFeatureValueSet_FeatureValueHashEntry { pub _base: root::PLDHashEntryHdr, pub mKey: root::gfxFontFeatureValueSet_FeatureValueHashKey, - pub mValues: root::nsTArray, + pub mValues: root::nsTArray<::std::os::raw::c_uint>, } pub type gfxFontFeatureValueSet_FeatureValueHashEntry_KeyType = *const root::gfxFontFeatureValueSet_FeatureValueHashKey; @@ -14342,7 +14255,7 @@ pub mod root { pub alternateValues: root::nsTArray, pub featureValueLookup: root::RefPtr, pub fontFeatureSettings: root::nsTArray, - pub fontVariationSettings: root::nsTArray, + pub fontVariationSettings: root::nsTArray, pub languageOverride: u32, } #[test] @@ -15022,7 +14935,7 @@ pub mod root { * count is 1. */ #[repr(C)] - #[derive(Debug, Copy)] + #[derive(Debug)] pub struct nsStringBuffer { pub mRefCount: u32, pub mStorageSize: u32, @@ -15044,9 +14957,6 @@ pub mod root { "Alignment of field: " , stringify ! ( nsStringBuffer ) , "::" , stringify ! ( mStorageSize ) )); } - impl Clone for nsStringBuffer { - fn clone(&self) -> Self { *self } - } #[repr(C)] #[derive(Debug, Copy)] pub struct nsIAtom { @@ -16764,7 +16674,7 @@ pub mod root { */ pub mFrameRequestCallbackCounter: i32, pub mStaticCloneCount: u32, - pub mBlockedTrackingNodes: root::nsTArray, + pub mBlockedTrackingNodes: root::nsTArray, pub mWindow: *mut root::nsPIDOMWindowInner, pub mCachedEncoder: root::nsCOMPtr, pub mFrameRequestCallbacks: root::nsTArray, @@ -22025,57 +21935,57 @@ pub mod root { pub struct nsDOMMutationObserver { _unused: [u8; 0], } - pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_HAS_LISTENERMANAGER; - pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_HAS_PROPERTIES; - pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_IS_ANONYMOUS_ROOT; - pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; - pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_IS_NATIVE_ANONYMOUS_ROOT; - pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_FORCE_XBL_BINDINGS; - pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_MAY_BE_IN_BINDING_MNGR; - pub const NODE_IS_EDITABLE: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_IS_EDITABLE; - pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_IS_NATIVE_ANONYMOUS; - pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_IS_IN_SHADOW_TREE; - pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_HAS_EMPTY_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_HAS_SLOW_SELECTOR; - pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_HAS_EDGE_CHILD_SELECTOR; - pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; - pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_ALL_SELECTOR_FLAGS; - pub const NODE_NEEDS_FRAME: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_NEEDS_FRAME; - pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_DESCENDANTS_NEED_FRAMES; - pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_HAS_ACCESSKEY; - pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_HAS_DIRECTION_RTL; - pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_HAS_DIRECTION_LTR; - pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_ALL_DIRECTION_FLAGS; - pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_CHROME_ONLY_ACCESS; - pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; - pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_17 = - _bindgen_ty_17::NODE_TYPE_SPECIFIC_BITS_OFFSET; + pub const NODE_HAS_LISTENERMANAGER: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_HAS_LISTENERMANAGER; + pub const NODE_HAS_PROPERTIES: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_HAS_PROPERTIES; + pub const NODE_IS_ANONYMOUS_ROOT: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_IS_ANONYMOUS_ROOT; + pub const NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE; + pub const NODE_IS_NATIVE_ANONYMOUS_ROOT: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_IS_NATIVE_ANONYMOUS_ROOT; + pub const NODE_FORCE_XBL_BINDINGS: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_FORCE_XBL_BINDINGS; + pub const NODE_MAY_BE_IN_BINDING_MNGR: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_MAY_BE_IN_BINDING_MNGR; + pub const NODE_IS_EDITABLE: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_IS_EDITABLE; + pub const NODE_IS_NATIVE_ANONYMOUS: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_IS_NATIVE_ANONYMOUS; + pub const NODE_IS_IN_SHADOW_TREE: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_IS_IN_SHADOW_TREE; + pub const NODE_HAS_EMPTY_SELECTOR: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_HAS_EMPTY_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_HAS_SLOW_SELECTOR; + pub const NODE_HAS_EDGE_CHILD_SELECTOR: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_HAS_EDGE_CHILD_SELECTOR; + pub const NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_HAS_SLOW_SELECTOR_LATER_SIBLINGS; + pub const NODE_ALL_SELECTOR_FLAGS: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_ALL_SELECTOR_FLAGS; + pub const NODE_NEEDS_FRAME: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_NEEDS_FRAME; + pub const NODE_DESCENDANTS_NEED_FRAMES: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_DESCENDANTS_NEED_FRAMES; + pub const NODE_HAS_ACCESSKEY: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_HAS_ACCESSKEY; + pub const NODE_HAS_DIRECTION_RTL: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_HAS_DIRECTION_RTL; + pub const NODE_HAS_DIRECTION_LTR: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_HAS_DIRECTION_LTR; + pub const NODE_ALL_DIRECTION_FLAGS: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_ALL_DIRECTION_FLAGS; + pub const NODE_CHROME_ONLY_ACCESS: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_CHROME_ONLY_ACCESS; + pub const NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS; + pub const NODE_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_83 = + _bindgen_ty_83::NODE_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_17 { + pub enum _bindgen_ty_83 { NODE_HAS_LISTENERMANAGER = 4, NODE_HAS_PROPERTIES = 8, NODE_IS_ANONYMOUS_ROOT = 16, @@ -22858,6 +22768,7 @@ pub mod root { NS_FRAME_IS_NONDISPLAY = 9007199254740992, NS_FRAME_HAS_LAYER_ACTIVITY_PROPERTY = 18014398509481984, NS_FRAME_OWNS_ANON_BOXES = 36028797018963968, + NS_FRAME_HAS_CSS_COUNTER_STYLE = 72057594037927936, NS_FRAME_SIMPLE_DISPLAYLIST = 144115188075855872, NS_FRAME_MATHML_SCRIPT_DESCENDANT = 288230376151711744, NS_FRAME_IS_IN_SINGLE_CHAR_MI = 576460752303423488, @@ -27243,7 +27154,7 @@ pub mod root { pub _base_4: root::nsITimedChannel, pub mRefCnt: root::nsAutoRefCnt, pub mBehaviour: root::mozilla::UniquePtr, - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mListener: *mut root::imgINotificationObserver, pub mLoadGroup: root::nsCOMPtr, pub mLoadFlags: root::nsLoadFlags, @@ -28383,7 +28294,7 @@ pub mod root { pub mRefCnt: root::mozilla::ThreadSafeAutoRefCnt, pub mLoader: *mut root::imgLoader, pub mRequest: root::nsCOMPtr, - pub mURI: root::RefPtr, + pub mURI: root::RefPtr, pub mCurrentURI: root::nsCOMPtr, pub mLoadingPrincipal: root::nsCOMPtr, pub mPrincipal: root::nsCOMPtr, @@ -28410,8 +28321,8 @@ pub mod root { pub mImageErrorCode: root::nsresult, pub mBoostCategoriesRequested: u32, pub mMutex: root::mozilla::Mutex, - pub mProgressTracker: root::RefPtr, - pub mImage: root::RefPtr, + pub mProgressTracker: root::RefPtr, + pub mImage: root::RefPtr, pub _bitfield_1: u8, pub __bindgen_padding_0: [u8; 7usize], } @@ -28425,7 +28336,7 @@ pub mod root { pub type imgRequest_HasThreadSafeRefCnt = root::mozilla::TrueType; #[test] fn bindgen_test_layout_imgRequest() { - assert_eq!(::std::mem::size_of::() , 400usize , concat ! ( + assert_eq!(::std::mem::size_of::() , 376usize , concat ! ( "Size of: " , stringify ! ( imgRequest ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( imgRequest ) )); @@ -29876,7 +29787,7 @@ pub mod root { ) , "::" , stringify ! ( mQuotePairs ) )); } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_20() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_86() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -29887,7 +29798,7 @@ pub mod root { root::mozilla::StaticRefPtr ) )); } #[test] - fn __bindgen_test_layout_StaticRefPtr_instantiation_21() { + fn __bindgen_test_layout_StaticRefPtr_instantiation_87() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -32065,7 +31976,7 @@ pub mod root { pub type RawGeckoURLExtraData = root::mozilla::URLExtraData; pub type RawGeckoKeyframeList = root::nsTArray; pub type RawGeckoComputedKeyframeValuesList = - root::nsTArray; + root::nsTArray>; pub type RawGeckoAnimationValueList = root::nsTArray; pub type RawGeckoStyleAnimationList = @@ -32823,48 +32734,48 @@ pub mod root { pub struct nsAttrValueOrString { _unused: [u8; 0], } - pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_SHARED_RESTYLE_BIT_1: root::_bindgen_ty_85 = + _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_SHARED_RESTYLE_BIT_2: root::_bindgen_ty_85 = + _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_SHARED_RESTYLE_BIT_3: root::_bindgen_ty_85 = + _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_SHARED_RESTYLE_BIT_4: root::_bindgen_ty_85 = + _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO: root::_bindgen_ty_85 = + _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_1; pub const ELEMENT_HAS_ANIMATION_ONLY_DIRTY_DESCENDANTS_FOR_SERVO: - root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_3; - pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_1; - pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_2; - pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_19 + root::_bindgen_ty_85 = + _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_HAS_SNAPSHOT: root::_bindgen_ty_85 = + _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_3; + pub const ELEMENT_HANDLED_SNAPSHOT: root::_bindgen_ty_85 = + _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_HAS_PENDING_RESTYLE: root::_bindgen_ty_85 = + _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_1; + pub const ELEMENT_IS_POTENTIAL_RESTYLE_ROOT: root::_bindgen_ty_85 = + _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_2; + pub const ELEMENT_HAS_PENDING_ANIMATION_ONLY_RESTYLE: root::_bindgen_ty_85 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_3; + _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_3; pub const ELEMENT_IS_POTENTIAL_ANIMATION_ONLY_RESTYLE_ROOT: - root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_SHARED_RESTYLE_BIT_4; - pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; - pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_PENDING_RESTYLE_FLAGS; - pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; - pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_ALL_RESTYLE_FLAGS; - pub const ELEMENT_HAS_SCROLLGRAB: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_HAS_SCROLLGRAB; - pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_19 = - _bindgen_ty_19::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; + root::_bindgen_ty_85 = + _bindgen_ty_85::ELEMENT_SHARED_RESTYLE_BIT_4; + pub const ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR: root::_bindgen_ty_85 = + _bindgen_ty_85::ELEMENT_IS_CONDITIONAL_RESTYLE_ANCESTOR; + pub const ELEMENT_PENDING_RESTYLE_FLAGS: root::_bindgen_ty_85 = + _bindgen_ty_85::ELEMENT_PENDING_RESTYLE_FLAGS; + pub const ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS: root::_bindgen_ty_85 = + _bindgen_ty_85::ELEMENT_POTENTIAL_RESTYLE_ROOT_FLAGS; + pub const ELEMENT_ALL_RESTYLE_FLAGS: root::_bindgen_ty_85 = + _bindgen_ty_85::ELEMENT_ALL_RESTYLE_FLAGS; + pub const ELEMENT_HAS_SCROLLGRAB: root::_bindgen_ty_85 = + _bindgen_ty_85::ELEMENT_HAS_SCROLLGRAB; + pub const ELEMENT_TYPE_SPECIFIC_BITS_OFFSET: root::_bindgen_ty_85 = + _bindgen_ty_85::ELEMENT_TYPE_SPECIFIC_BITS_OFFSET; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] - pub enum _bindgen_ty_19 { + pub enum _bindgen_ty_85 { ELEMENT_SHARED_RESTYLE_BIT_1 = 8388608, ELEMENT_SHARED_RESTYLE_BIT_2 = 16777216, ELEMENT_SHARED_RESTYLE_BIT_3 = 33554432, @@ -33517,7 +33428,7 @@ pub mod root { } pub type __builtin_va_list = [root::__va_list_tag; 1usize]; #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_22() { + fn __bindgen_test_layout_IntegralConstant_instantiation_88() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -33526,7 +33437,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_IntegralConstant_instantiation_23() { + fn __bindgen_test_layout_IntegralConstant_instantiation_89() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -33535,7 +33446,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_24() { + fn __bindgen_test_layout_nsCharTraits_instantiation_90() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33546,33 +33457,29 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_25() { - assert_eq!(::std::mem::size_of::>() - , 24usize , concat ! ( + fn __bindgen_test_layout_nsReadingIterator_instantiation_91() { + assert_eq!(::std::mem::size_of::>() , + 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsReadingIterator - ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsReadingIterator ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator - ) )); + root::nsReadingIterator ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_26() { - assert_eq!(::std::mem::size_of::>() - , 24usize , concat ! ( + fn __bindgen_test_layout_nsWritingIterator_instantiation_92() { + assert_eq!(::std::mem::size_of::>() , + 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsWritingIterator - ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( + root::nsWritingIterator ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator - ) )); + root::nsWritingIterator ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_27() { + fn __bindgen_test_layout_nsCharTraits_instantiation_93() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33583,33 +33490,29 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsReadingIterator_instantiation_28() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsReadingIterator_instantiation_94() { + assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsReadingIterator - ) )); - assert_eq!(::std::mem::align_of::>() + root::nsReadingIterator<::std::os::raw::c_char> ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsReadingIterator - ) )); + root::nsReadingIterator<::std::os::raw::c_char> ) )); } #[test] - fn __bindgen_test_layout_nsWritingIterator_instantiation_29() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_nsWritingIterator_instantiation_95() { + assert_eq!(::std::mem::size_of::>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsWritingIterator - ) )); - assert_eq!(::std::mem::align_of::>() + root::nsWritingIterator<::std::os::raw::c_char> ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsWritingIterator - ) )); + root::nsWritingIterator<::std::os::raw::c_char> ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_30() { + fn __bindgen_test_layout_nsCharTraits_instantiation_96() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33620,7 +33523,7 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout_nsCharTraits_instantiation_31() { + fn __bindgen_test_layout_nsCharTraits_instantiation_97() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33631,7 +33534,7 @@ pub mod root { root::nsCharTraits ) )); } #[test] - fn __bindgen_test_layout__bindgen_ty_id_185873_instantiation_32() { + fn __bindgen_test_layout__bindgen_ty_id_210609_instantiation_98() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -33640,7 +33543,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout__bindgen_ty_id_185909_instantiation_33() { + fn __bindgen_test_layout__bindgen_ty_id_210645_instantiation_99() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( u8 ) )); @@ -33649,7 +33552,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_34() { + fn __bindgen_test_layout_nsTArray_instantiation_100() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33660,7 +33563,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_35() { + fn __bindgen_test_layout_Handle_instantiation_101() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33671,7 +33574,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_36() { + fn __bindgen_test_layout_Handle_instantiation_102() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33682,7 +33585,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_37() { + fn __bindgen_test_layout_MutableHandle_instantiation_103() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33693,7 +33596,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Rooted_instantiation_38() { + fn __bindgen_test_layout_Rooted_instantiation_104() { assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33704,7 +33607,7 @@ pub mod root { [u64; 3usize] ) )); } #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_39() { + fn __bindgen_test_layout_DeletePolicy_instantiation_105() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33715,7 +33618,7 @@ pub mod root { root::JS::DeletePolicy ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_40() { + fn __bindgen_test_layout_nsTArray_instantiation_106() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33726,7 +33629,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_41() { + fn __bindgen_test_layout_nsTArray_instantiation_107() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33737,29 +33640,29 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_42() { - assert_eq!(::std::mem::size_of::>() , 8usize , - concat ! ( + fn __bindgen_test_layout_nsTArray_instantiation_108() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() , 8usize , - concat ! ( + root::nsTArray<::std::os::raw::c_uint> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); + root::nsTArray<::std::os::raw::c_uint> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_43() { - assert_eq!(::std::mem::size_of::>() , 8usize , - concat ! ( + fn __bindgen_test_layout_nsTArray_instantiation_109() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() , 8usize , - concat ! ( + root::nsTArray<::std::os::raw::c_uint> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); + root::nsTArray<::std::os::raw::c_uint> ) )); } #[test] - fn __bindgen_test_layout_BaseTimeDuration_instantiation_44() { + fn __bindgen_test_layout_BaseTimeDuration_instantiation_110() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33770,7 +33673,7 @@ pub mod root { root::mozilla::BaseTimeDuration ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_45() { + fn __bindgen_test_layout_nsTArray_instantiation_111() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33781,7 +33684,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_46() { + fn __bindgen_test_layout_TErrorResult_instantiation_112() { assert_eq!(::std::mem::size_of::() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33792,7 +33695,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_TErrorResult_instantiation_47() { + fn __bindgen_test_layout_TErrorResult_instantiation_113() { assert_eq!(::std::mem::size_of::() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33803,7 +33706,7 @@ pub mod root { root::mozilla::binding_danger::TErrorResult ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_48() { + fn __bindgen_test_layout_already_AddRefed_instantiation_114() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33814,7 +33717,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_49() { + fn __bindgen_test_layout_Handle_instantiation_115() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33825,7 +33728,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_50() { + fn __bindgen_test_layout_MutableHandle_instantiation_116() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -33836,740 +33739,6 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_51() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_52() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray<*mut root::mozilla::StyleSheet> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray<*mut root::mozilla::StyleSheet> ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_53() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_54() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_55() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_56() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_57() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_58() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_59() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_60() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_61() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_62() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_63() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_64() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - } - #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_65() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_66() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - } - #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_67() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_68() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - } - #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_69() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_70() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - } - #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_71() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_72() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - } - #[test] - fn __bindgen_test_layout_iterator_instantiation_73() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::std::iterator ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::std::iterator ) )); - } - #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_74() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_75() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - } - #[test] - fn __bindgen_test_layout_DeletePolicy_instantiation_76() { - assert_eq!(::std::mem::size_of::() , 1usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - assert_eq!(::std::mem::align_of::() , 1usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::DeletePolicy ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_77() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - } - #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_78() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::() , 8usize , concat - ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_79() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_80() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_81() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_82() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); - } - #[test] - fn __bindgen_test_layout_Heap_instantiation_83() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Heap ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Heap ) )); - } - #[test] - fn __bindgen_test_layout_Heap_instantiation_84() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Heap<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Heap<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_TenuredHeap_instantiation_85() { - assert_eq!(::std::mem::size_of::() , 8usize , - concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::TenuredHeap ) )); - assert_eq!(::std::mem::align_of::() , 8usize , - concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::TenuredHeap ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_86() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_87() { - assert_eq!(::std::mem::size_of::>>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray> - ) )); - assert_eq!(::std::mem::align_of::>>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray> - ) )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_88() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_89() { - assert_eq!(::std::mem::size_of::>>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - assert_eq!(::std::mem::align_of::>>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_90() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_91() { - assert_eq!(::std::mem::size_of::>>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - assert_eq!(::std::mem::align_of::>>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_92() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_93() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::() , 8usize , concat - ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_94() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); - } - #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_95() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::() , 8usize , concat - ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_96() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_97() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_98() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_99() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_100() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_101() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_102() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_103() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_104() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_105() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_106() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_107() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_108() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::() , 8usize , concat - ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_109() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_110() { - assert_eq!(::std::mem::size_of::>>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - assert_eq!(::std::mem::align_of::>>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_111() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_112() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_113() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::UniquePtr ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_114() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_115() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_116() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] fn __bindgen_test_layout_Handle_instantiation_117() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -34581,7 +33750,18 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_118() { + fn __bindgen_test_layout_nsTArray_instantiation_118() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray<*mut root::mozilla::StyleSheet> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray<*mut root::mozilla::StyleSheet> ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_119() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34592,28 +33772,15 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_119() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( + fn __bindgen_test_layout_RefPtr_instantiation_120() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsRefPtrHashKey - ) )); - assert_eq!(::std::mem::align_of::>() + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsRefPtrHashKey - ) )); - } - #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_120() { - assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u64; 5usize] ) )); - assert_eq!(::std::mem::align_of::<[u64; 5usize]>() , 8usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u64; 5usize] ) )); + root::RefPtr ) )); } #[test] fn __bindgen_test_layout_Handle_instantiation_121() { @@ -34627,26 +33794,26 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_122() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_Handle_instantiation_122() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<*mut root::nsIContent> ) )); - assert_eq!(::std::mem::align_of::>() + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<*mut root::nsIContent> ) )); + root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_123() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_already_AddRefed_instantiation_123() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsTArray<*mut root::nsIContent> ) )); - assert_eq!(::std::mem::align_of::>() + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsTArray<*mut root::nsIContent> ) )); + root::already_AddRefed ) )); } #[test] fn __bindgen_test_layout_already_AddRefed_instantiation_124() { @@ -34661,81 +33828,215 @@ pub mod root { } #[test] fn __bindgen_test_layout_already_AddRefed_instantiation_125() { - assert_eq!(::std::mem::size_of::>() + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); + root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_126() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( u64 ) - )); - assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - u64 ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_127() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_Handle_instantiation_126() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() + root::JS::Handle ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); + root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_128() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_129() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_MutableHandle_instantiation_127() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); + root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_130() { - assert_eq!(::std::mem::size_of::() , - 1usize , concat ! ( + fn __bindgen_test_layout_MutableHandle_instantiation_128() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - assert_eq!(::std::mem::align_of::() , - 1usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::DefaultDelete ) )); - } - #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_131() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsRefPtrHashKey ) )); - assert_eq!(::std::mem::align_of::>() + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsRefPtrHashKey ) )); + root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_132() { + fn __bindgen_test_layout_DeletePolicy_instantiation_129() { + assert_eq!(::std::mem::size_of::() , 1usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + assert_eq!(::std::mem::align_of::() , 1usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_130() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + } + #[test] + fn __bindgen_test_layout_DeletePolicy_instantiation_131() { + assert_eq!(::std::mem::size_of::() , 1usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + assert_eq!(::std::mem::align_of::() , 1usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_132() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + } + #[test] + fn __bindgen_test_layout_DeletePolicy_instantiation_133() { + assert_eq!(::std::mem::size_of::() , 1usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + assert_eq!(::std::mem::align_of::() , 1usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_134() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + } + #[test] + fn __bindgen_test_layout_DeletePolicy_instantiation_135() { + assert_eq!(::std::mem::size_of::() , 1usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + assert_eq!(::std::mem::align_of::() , 1usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_136() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + } + #[test] + fn __bindgen_test_layout_DeletePolicy_instantiation_137() { + assert_eq!(::std::mem::size_of::() , 1usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + assert_eq!(::std::mem::align_of::() , 1usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_138() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + } + #[test] + fn __bindgen_test_layout_iterator_instantiation_139() { + assert_eq!(::std::mem::size_of::() , 1usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::std::iterator ) )); + assert_eq!(::std::mem::align_of::() , 1usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::std::iterator ) )); + } + #[test] + fn __bindgen_test_layout_DeletePolicy_instantiation_140() { + assert_eq!(::std::mem::size_of::() , 1usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + assert_eq!(::std::mem::align_of::() , 1usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_141() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + } + #[test] + fn __bindgen_test_layout_DeletePolicy_instantiation_142() { + assert_eq!(::std::mem::size_of::() , 1usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + assert_eq!(::std::mem::align_of::() , 1usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::DeletePolicy ) )); + } + #[test] + fn __bindgen_test_layout_UniquePtr_instantiation_143() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::UniquePtr ) )); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_instantiation_144() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34746,7 +34047,178 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_133() { + fn __bindgen_test_layout_Handle_instantiation_145() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle ) )); + } + #[test] + fn __bindgen_test_layout_MutableHandle_instantiation_146() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_147() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_148() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray ) )); + } + #[test] + fn __bindgen_test_layout_Heap_instantiation_149() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Heap ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Heap ) )); + } + #[test] + fn __bindgen_test_layout_Heap_instantiation_150() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Heap<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Heap<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_TenuredHeap_instantiation_151() { + assert_eq!(::std::mem::size_of::() , 8usize , + concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::TenuredHeap ) )); + assert_eq!(::std::mem::align_of::() , 8usize , + concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::TenuredHeap ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_152() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_153() { + assert_eq!(::std::mem::size_of::>>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray> + ) )); + assert_eq!(::std::mem::align_of::>>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray> + ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_154() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_155() { + assert_eq!(::std::mem::size_of::>>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray> ) + )); + assert_eq!(::std::mem::align_of::>>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray> ) + )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_156() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_157() { + assert_eq!(::std::mem::size_of::>>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray> ) + )); + assert_eq!(::std::mem::align_of::>>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray> ) + )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_158() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_instantiation_159() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::() , 8usize , concat + ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_160() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -34757,317 +34229,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_134() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_135() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_136() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_137() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_138() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_139() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_140() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_141() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_142() { - assert_eq!(::std::mem::size_of::<[u64; 28usize]>() , 224usize , concat - ! ( - "Size of template specialization: " , stringify ! ( - [u64; 28usize] ) )); - assert_eq!(::std::mem::align_of::<[u64; 28usize]>() , 8usize , concat - ! ( - "Alignment of template specialization: " , stringify ! ( - [u64; 28usize] ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_143() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_144() { - assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u64; 5usize] ) )); - assert_eq!(::std::mem::align_of::<[u64; 5usize]>() , 8usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u64; 5usize] ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_145() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_146() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_147() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_148() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_149() { - assert_eq!(::std::mem::size_of::>>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - assert_eq!(::std::mem::align_of::>>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_150() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_151() { - assert_eq!(::std::mem::size_of::>>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - assert_eq!(::std::mem::align_of::>>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray> ) - )); - } - #[test] - fn __bindgen_test_layout_WeakPtr_instantiation_152() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( u64 ) - )); - assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - u64 ) )); - } - #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_153() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsPtrHashKey ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsPtrHashKey ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_154() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_155() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::OwningNonNull ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::OwningNonNull ) )); - } - #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_156() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::OwningNonNull ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::OwningNonNull ) )); - } - #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_157() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::mozilla::OwningNonNull ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::mozilla::OwningNonNull ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_158() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_159() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_160() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_161() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_162() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_161() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35078,269 +34240,196 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_163() { - assert_eq!(::std::mem::size_of::>() - , 16usize , concat ! ( + fn __bindgen_test_layout_already_AddRefed_instantiation_162() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::nsPtrHashKey<::std::os::raw::c_void> ) )); - assert_eq!(::std::mem::align_of::>() + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::nsPtrHashKey<::std::os::raw::c_void> ) )); + root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_PointTyped_instantiation_164() { - assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! + fn __bindgen_test_layout_already_AddRefed_instantiation_163() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_164() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_165() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_MutableHandle_instantiation_166() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::MutableHandle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::MutableHandle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_167() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_168() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_169() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_170() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_171() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_172() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_173() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_instantiation_174() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! - ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::() , 8usize , concat + ! ( "Alignment of template specialization: " , stringify ! ( - [u32; 2usize] ) )); + root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_165() { - assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! + fn __bindgen_test_layout_nsCOMPtr_instantiation_175() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! - ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::() , 8usize , concat + ! ( "Alignment of template specialization: " , stringify ! ( - [u32; 2usize] ) )); + root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_SizeTyped_instantiation_166() { - assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! - ( + fn __bindgen_test_layout_RefPtr_instantiation_176() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! - ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - [u32; 2usize] ) )); + root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_RectTyped_instantiation_167() { - assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! - ( + fn __bindgen_test_layout_nsTArray_instantiation_177() { + assert_eq!(::std::mem::size_of::>>() + , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - } - #[test] - fn __bindgen_test_layout_IntPointTyped_instantiation_168() { - assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - } - #[test] - fn __bindgen_test_layout_IntSizeTyped_instantiation_169() { - assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - } - #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_170() { - assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - } - #[test] - fn __bindgen_test_layout_MarginTyped_instantiation_171() { - assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - } - #[test] - fn __bindgen_test_layout_RectTyped_instantiation_172() { - assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - } - #[test] - fn __bindgen_test_layout_IntRectTyped_instantiation_173() { - assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 4usize] ) )); - } - #[test] - fn __bindgen_test_layout_ScaleFactor_instantiation_174() { - assert_eq!(::std::mem::size_of::() , 4usize , concat ! ( - "Size of template specialization: " , stringify ! ( u32 ) + root::nsTArray> ) )); - assert_eq!(::std::mem::align_of::() , 4usize , concat ! ( + assert_eq!(::std::mem::align_of::>>() + , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - u32 ) )); + root::nsTArray> ) + )); } #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_175() { - assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - } - #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_176() { - assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - } - #[test] - fn __bindgen_test_layout_ScaleFactors2D_instantiation_177() { - assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u32; 2usize] ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_178() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_Handle_instantiation_178() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); + root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_179() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_180() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_181() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_182() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_nsPIDOMWindow_instantiation_183() { - assert_eq!(::std::mem::size_of::<[u64; 28usize]>() , 224usize , concat - ! ( - "Size of template specialization: " , stringify ! ( - [u64; 28usize] ) )); - assert_eq!(::std::mem::align_of::<[u64; 28usize]>() , 8usize , concat - ! ( - "Alignment of template specialization: " , stringify ! ( - [u64; 28usize] ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_184() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_185() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_186() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - } - #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_187() { + fn __bindgen_test_layout_DefaultDelete_instantiation_179() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35351,207 +34440,18 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_188() { - assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u64; 5usize] ) )); - assert_eq!(::std::mem::align_of::<[u64; 5usize]>() , 8usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u64; 5usize] ) )); - } - #[test] - fn __bindgen_test_layout_Rooted_instantiation_189() { - assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u64; 3usize] ) )); - assert_eq!(::std::mem::align_of::<[u64; 3usize]>() , 8usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u64; 3usize] ) )); - } - #[test] - fn __bindgen_test_layout_Rooted_instantiation_190() { - assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - [u64; 3usize] ) )); - assert_eq!(::std::mem::align_of::<[u64; 3usize]>() , 8usize , concat ! - ( - "Alignment of template specialization: " , stringify ! ( - [u64; 3usize] ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_191() { - assert_eq!(::std::mem::size_of::>() + fn __bindgen_test_layout_UniquePtr_instantiation_180() { + assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( - root::already_AddRefed ) )); - assert_eq!(::std::mem::align_of::>() + root::mozilla::UniquePtr ) )); + assert_eq!(::std::mem::align_of::>() , 8usize , concat ! ( "Alignment of template specialization: " , stringify ! ( - root::already_AddRefed ) )); + root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_192() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::() , 8usize , concat - ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - } - #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_193() { - assert_eq!(::std::mem::size_of::() , 8usize , concat ! - ( - "Size of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - assert_eq!(::std::mem::align_of::() , 8usize , concat - ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsCOMPtr ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_194() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_195() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_196() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_197() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_198() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::MutableHandle ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_199() { - assert_eq!(::std::mem::size_of::>() , - 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - assert_eq!(::std::mem::align_of::>() , - 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray<::nsstring::nsStringRepr> ) )); - } - #[test] - fn __bindgen_test_layout_Handle_instantiation_200() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::JS::Handle<*mut root::JSObject> ) )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_201() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_202() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_203() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_nsTArray_instantiation_204() { - assert_eq!(::std::mem::size_of::>>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::nsTArray> - ) )); - assert_eq!(::std::mem::align_of::>>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::nsTArray> - ) )); - } - #[test] - fn __bindgen_test_layout_RefPtr_instantiation_205() { - assert_eq!(::std::mem::size_of::>() - , 8usize , concat ! ( - "Size of template specialization: " , stringify ! ( - root::RefPtr ) )); - assert_eq!(::std::mem::align_of::>() - , 8usize , concat ! ( - "Alignment of template specialization: " , stringify ! ( - root::RefPtr ) )); - } - #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_206() { + fn __bindgen_test_layout_already_AddRefed_instantiation_181() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35562,7 +34462,108 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_207() { + fn __bindgen_test_layout_nsTArray_instantiation_182() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_183() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_184() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_185() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_186() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsRefPtrHashKey + ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsRefPtrHashKey + ) )); + } + #[test] + fn __bindgen_test_layout_nsDataHashtable_instantiation_187() { + assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u64; 5usize] ) )); + assert_eq!(::std::mem::align_of::<[u64; 5usize]>() , 8usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u64; 5usize] ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_188() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_189() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray<*mut root::nsIContent> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray<*mut root::nsIContent> ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_190() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray<*mut root::nsIContent> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray<*mut root::nsIContent> ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_191() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35573,6 +34574,180 @@ pub mod root { root::already_AddRefed ) )); } #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_192() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_193() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( u64 ) + )); + assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + u64 ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_194() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_195() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_196() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_DefaultDelete_instantiation_197() { + assert_eq!(::std::mem::size_of::() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_198() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsRefPtrHashKey ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsRefPtrHashKey ) )); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_instantiation_199() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::() , 8usize , concat + ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_200() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_201() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_202() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_203() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_204() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_205() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_206() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_207() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] fn __bindgen_test_layout_Handle_instantiation_208() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( @@ -35584,7 +34759,746 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_209() { + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_209() { + assert_eq!(::std::mem::size_of::<[u64; 28usize]>() , 224usize , concat + ! ( + "Size of template specialization: " , stringify ! ( + [u64; 28usize] ) )); + assert_eq!(::std::mem::align_of::<[u64; 28usize]>() , 8usize , concat + ! ( + "Alignment of template specialization: " , stringify ! ( + [u64; 28usize] ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_210() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_211() { + assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u64; 5usize] ) )); + assert_eq!(::std::mem::align_of::<[u64; 5usize]>() , 8usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u64; 5usize] ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_212() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_213() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_214() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_215() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_216() { + assert_eq!(::std::mem::size_of::>>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray> ) + )); + assert_eq!(::std::mem::align_of::>>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray> ) + )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_217() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_218() { + assert_eq!(::std::mem::size_of::>>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray> ) + )); + assert_eq!(::std::mem::align_of::>>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray> ) + )); + } + #[test] + fn __bindgen_test_layout_WeakPtr_instantiation_219() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( u64 ) + )); + assert_eq!(::std::mem::align_of::() , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + u64 ) )); + } + #[test] + fn __bindgen_test_layout_nsPtrHashKey_instantiation_220() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsPtrHashKey ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsPtrHashKey ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_221() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_OwningNonNull_instantiation_222() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::OwningNonNull ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::OwningNonNull ) )); + } + #[test] + fn __bindgen_test_layout_OwningNonNull_instantiation_223() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::OwningNonNull ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::OwningNonNull ) )); + } + #[test] + fn __bindgen_test_layout_OwningNonNull_instantiation_224() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::OwningNonNull ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::OwningNonNull ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_225() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_226() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_227() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_MutableHandle_instantiation_228() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_instantiation_229() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::() , 8usize , concat + ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsPtrHashKey_instantiation_230() { + assert_eq!(::std::mem::size_of::>() + , 16usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsPtrHashKey<::std::os::raw::c_void> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsPtrHashKey<::std::os::raw::c_void> ) )); + } + #[test] + fn __bindgen_test_layout_PointTyped_instantiation_231() { + assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + } + #[test] + fn __bindgen_test_layout_IntPointTyped_instantiation_232() { + assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + } + #[test] + fn __bindgen_test_layout_SizeTyped_instantiation_233() { + assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + } + #[test] + fn __bindgen_test_layout_RectTyped_instantiation_234() { + assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + } + #[test] + fn __bindgen_test_layout_IntPointTyped_instantiation_235() { + assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + } + #[test] + fn __bindgen_test_layout_IntSizeTyped_instantiation_236() { + assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + } + #[test] + fn __bindgen_test_layout_IntRectTyped_instantiation_237() { + assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + } + #[test] + fn __bindgen_test_layout_MarginTyped_instantiation_238() { + assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + } + #[test] + fn __bindgen_test_layout_RectTyped_instantiation_239() { + assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + } + #[test] + fn __bindgen_test_layout_IntRectTyped_instantiation_240() { + assert_eq!(::std::mem::size_of::<[u32; 4usize]>() , 16usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 4usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 4usize] ) )); + } + #[test] + fn __bindgen_test_layout_ScaleFactor_instantiation_241() { + assert_eq!(::std::mem::size_of::() , 4usize , concat ! ( + "Size of template specialization: " , stringify ! ( u32 ) + )); + assert_eq!(::std::mem::align_of::() , 4usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + u32 ) )); + } + #[test] + fn __bindgen_test_layout_ScaleFactors2D_instantiation_242() { + assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + } + #[test] + fn __bindgen_test_layout_ScaleFactors2D_instantiation_243() { + assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + } + #[test] + fn __bindgen_test_layout_ScaleFactors2D_instantiation_244() { + assert_eq!(::std::mem::size_of::<[u32; 2usize]>() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + assert_eq!(::std::mem::align_of::<[u32; 2usize]>() , 4usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u32; 2usize] ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_245() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_246() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_247() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_248() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_249() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_nsPIDOMWindow_instantiation_250() { + assert_eq!(::std::mem::size_of::<[u64; 28usize]>() , 224usize , concat + ! ( + "Size of template specialization: " , stringify ! ( + [u64; 28usize] ) )); + assert_eq!(::std::mem::align_of::<[u64; 28usize]>() , 8usize , concat + ! ( + "Alignment of template specialization: " , stringify ! ( + [u64; 28usize] ) )); + } + #[test] + fn __bindgen_test_layout_MutableHandle_instantiation_251() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + } + #[test] + fn __bindgen_test_layout_MutableHandle_instantiation_252() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_253() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_DefaultDelete_instantiation_254() { + assert_eq!(::std::mem::size_of::() , + 1usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + assert_eq!(::std::mem::align_of::() , + 1usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::mozilla::DefaultDelete ) )); + } + #[test] + fn __bindgen_test_layout_nsRefPtrHashtable_instantiation_255() { + assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u64; 5usize] ) )); + assert_eq!(::std::mem::align_of::<[u64; 5usize]>() , 8usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u64; 5usize] ) )); + } + #[test] + fn __bindgen_test_layout_Rooted_instantiation_256() { + assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u64; 3usize] ) )); + assert_eq!(::std::mem::align_of::<[u64; 3usize]>() , 8usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u64; 3usize] ) )); + } + #[test] + fn __bindgen_test_layout_Rooted_instantiation_257() { + assert_eq!(::std::mem::size_of::<[u64; 3usize]>() , 24usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + [u64; 3usize] ) )); + assert_eq!(::std::mem::align_of::<[u64; 3usize]>() , 8usize , concat ! + ( + "Alignment of template specialization: " , stringify ! ( + [u64; 3usize] ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_258() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_instantiation_259() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::() , 8usize , concat + ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsCOMPtr_instantiation_260() { + assert_eq!(::std::mem::size_of::() , 8usize , concat ! + ( + "Size of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + assert_eq!(::std::mem::align_of::() , 8usize , concat + ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsCOMPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_261() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_262() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle ) )); + } + #[test] + fn __bindgen_test_layout_MutableHandle_instantiation_263() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_264() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_MutableHandle_instantiation_265() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::MutableHandle ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_266() { + assert_eq!(::std::mem::size_of::>() , + 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + assert_eq!(::std::mem::align_of::>() , + 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray<::nsstring::nsStringRepr> ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_267() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_268() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_269() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_270() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_271() { + assert_eq!(::std::mem::size_of::>>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::nsTArray> + ) )); + assert_eq!(::std::mem::align_of::>>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::nsTArray> + ) )); + } + #[test] + fn __bindgen_test_layout_RefPtr_instantiation_272() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::RefPtr ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::RefPtr ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_273() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_already_AddRefed_instantiation_274() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::already_AddRefed ) )); + } + #[test] + fn __bindgen_test_layout_Handle_instantiation_275() { + assert_eq!(::std::mem::size_of::>() + , 8usize , concat ! ( + "Size of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + assert_eq!(::std::mem::align_of::>() + , 8usize , concat ! ( + "Alignment of template specialization: " , stringify ! ( + root::JS::Handle<*mut root::JSObject> ) )); + } + #[test] + fn __bindgen_test_layout_nsTArray_instantiation_276() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35595,7 +35509,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_210() { + fn __bindgen_test_layout_RefPtr_instantiation_277() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35608,7 +35522,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_211() { + fn __bindgen_test_layout_nsTArray_instantiation_278() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35621,7 +35535,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_212() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_279() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35632,7 +35546,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_213() { + fn __bindgen_test_layout_RefPtr_instantiation_280() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35645,7 +35559,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_214() { + fn __bindgen_test_layout_UniquePtr_instantiation_281() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35656,7 +35570,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_215() { + fn __bindgen_test_layout_nsTArray_instantiation_282() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35667,7 +35581,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_216() { + fn __bindgen_test_layout_Handle_instantiation_283() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35678,7 +35592,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_217() { + fn __bindgen_test_layout_MutableHandle_instantiation_284() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35689,7 +35603,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_218() { + fn __bindgen_test_layout_Handle_instantiation_285() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35700,7 +35614,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_219() { + fn __bindgen_test_layout_MutableHandle_instantiation_286() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35711,7 +35625,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_220() { + fn __bindgen_test_layout_already_AddRefed_instantiation_287() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35722,7 +35636,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsDataHashtable_instantiation_221() { + fn __bindgen_test_layout_nsDataHashtable_instantiation_288() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35733,7 +35647,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_OwningNonNull_instantiation_222() { + fn __bindgen_test_layout_OwningNonNull_instantiation_289() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35746,7 +35660,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_223() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_290() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35757,7 +35671,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_224() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_291() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35768,7 +35682,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_225() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_292() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35779,7 +35693,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_226() { + fn __bindgen_test_layout_DefaultDelete_instantiation_293() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35790,7 +35704,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_227() { + fn __bindgen_test_layout_already_AddRefed_instantiation_294() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35801,7 +35715,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_228() { + fn __bindgen_test_layout_nsMainThreadPtrHolder_instantiation_295() { assert_eq!(::std::mem::size_of::>() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35812,7 +35726,7 @@ pub mod root { root::nsMainThreadPtrHolder ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_229() { + fn __bindgen_test_layout_already_AddRefed_instantiation_296() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35823,7 +35737,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_230() { + fn __bindgen_test_layout_already_AddRefed_instantiation_297() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35834,7 +35748,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_231() { + fn __bindgen_test_layout_already_AddRefed_instantiation_298() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35845,7 +35759,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_232() { + fn __bindgen_test_layout_already_AddRefed_instantiation_299() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35856,7 +35770,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_233() { + fn __bindgen_test_layout_already_AddRefed_instantiation_300() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35867,7 +35781,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsPtrHashKey_instantiation_234() { + fn __bindgen_test_layout_nsPtrHashKey_instantiation_301() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35878,7 +35792,7 @@ pub mod root { root::nsPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_235() { + fn __bindgen_test_layout_already_AddRefed_instantiation_302() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35889,7 +35803,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_236() { + fn __bindgen_test_layout_DefaultDelete_instantiation_303() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35900,7 +35814,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_237() { + fn __bindgen_test_layout_UniquePtr_instantiation_304() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35911,7 +35825,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_238() { + fn __bindgen_test_layout_DefaultDelete_instantiation_305() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35922,7 +35836,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_239() { + fn __bindgen_test_layout_UniquePtr_instantiation_306() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35933,7 +35847,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_240() { + fn __bindgen_test_layout_already_AddRefed_instantiation_307() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35944,7 +35858,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_SupportsWeakPtr_instantiation_241() { + fn __bindgen_test_layout_SupportsWeakPtr_instantiation_308() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -35953,7 +35867,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_242() { + fn __bindgen_test_layout_nsTArray_instantiation_309() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35964,7 +35878,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_243() { + fn __bindgen_test_layout_nsTArray_instantiation_310() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35975,7 +35889,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_244() { + fn __bindgen_test_layout_already_AddRefed_instantiation_311() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35986,7 +35900,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_245() { + fn __bindgen_test_layout_already_AddRefed_instantiation_312() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -35997,7 +35911,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_246() { + fn __bindgen_test_layout_Maybe_instantiation_313() { assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36008,7 +35922,7 @@ pub mod root { [u32; 3usize] ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_247() { + fn __bindgen_test_layout_Maybe_instantiation_314() { assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36019,7 +35933,7 @@ pub mod root { [u32; 3usize] ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_248() { + fn __bindgen_test_layout_already_AddRefed_instantiation_315() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36030,7 +35944,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_249() { + fn __bindgen_test_layout_already_AddRefed_instantiation_316() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36041,7 +35955,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_250() { + fn __bindgen_test_layout_DefaultDelete_instantiation_317() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36052,7 +35966,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_251() { + fn __bindgen_test_layout_UniquePtr_instantiation_318() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36063,7 +35977,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_252() { + fn __bindgen_test_layout_DefaultDelete_instantiation_319() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36074,7 +35988,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_253() { + fn __bindgen_test_layout_UniquePtr_instantiation_320() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36085,7 +35999,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_254() { + fn __bindgen_test_layout_already_AddRefed_instantiation_321() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36096,7 +36010,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_255() { + fn __bindgen_test_layout_Maybe_instantiation_322() { assert_eq!(::std::mem::size_of::<[u32; 3usize]>() , 12usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36107,7 +36021,7 @@ pub mod root { [u32; 3usize] ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_256() { + fn __bindgen_test_layout_DefaultDelete_instantiation_323() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36118,7 +36032,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_257() { + fn __bindgen_test_layout_DefaultDelete_instantiation_324() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36129,7 +36043,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_pair_instantiation_258() { + fn __bindgen_test_layout_pair_instantiation_325() { assert_eq!(::std::mem::size_of::>() , 32usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36140,7 +36054,7 @@ pub mod root { root::std::pair<::nsstring::nsStringRepr, ::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_259() { + fn __bindgen_test_layout_nsTArray_instantiation_326() { assert_eq!(::std::mem::size_of::>>() , 8usize , concat ! ( @@ -36155,7 +36069,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_260() { + fn __bindgen_test_layout_already_AddRefed_instantiation_327() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36166,7 +36080,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_261() { + fn __bindgen_test_layout_nsTArray_instantiation_328() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36177,7 +36091,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_262() { + fn __bindgen_test_layout_nsTArray_instantiation_329() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36188,7 +36102,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_263() { + fn __bindgen_test_layout_nsTArray_instantiation_330() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36199,7 +36113,7 @@ pub mod root { root::nsTArray ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_264() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_331() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36210,7 +36124,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsStyleAutoArray_instantiation_265() { + fn __bindgen_test_layout_nsStyleAutoArray_instantiation_332() { assert_eq!(::std::mem::size_of::>() , 64usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36221,7 +36135,7 @@ pub mod root { root::nsStyleAutoArray ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_266() { + fn __bindgen_test_layout_DefaultDelete_instantiation_333() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36232,7 +36146,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_267() { + fn __bindgen_test_layout_UniquePtr_instantiation_334() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36243,7 +36157,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_DefaultDelete_instantiation_268() { + fn __bindgen_test_layout_DefaultDelete_instantiation_335() { assert_eq!(::std::mem::size_of::() , 1usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36254,7 +36168,7 @@ pub mod root { root::mozilla::DefaultDelete ) )); } #[test] - fn __bindgen_test_layout_UniquePtr_instantiation_269() { + fn __bindgen_test_layout_UniquePtr_instantiation_336() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36265,7 +36179,7 @@ pub mod root { root::mozilla::UniquePtr ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_270() { + fn __bindgen_test_layout_RefPtr_instantiation_337() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36276,7 +36190,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_271() { + fn __bindgen_test_layout_RefPtr_instantiation_338() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36287,7 +36201,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_NonNull_instantiation_272() { + fn __bindgen_test_layout_NonNull_instantiation_339() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36300,7 +36214,7 @@ pub mod root { )); } #[test] - fn __bindgen_test_layout_NonNull_instantiation_273() { + fn __bindgen_test_layout_NonNull_instantiation_340() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36313,7 +36227,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_274() { + fn __bindgen_test_layout_Handle_instantiation_341() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36324,7 +36238,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_275() { + fn __bindgen_test_layout_MutableHandle_instantiation_342() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36335,7 +36249,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_276() { + fn __bindgen_test_layout_Maybe_instantiation_343() { assert_eq!(::std::mem::size_of::<[u64; 18usize]>() , 144usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36346,7 +36260,7 @@ pub mod root { [u64; 18usize] ) )); } #[test] - fn __bindgen_test_layout_Maybe_instantiation_277() { + fn __bindgen_test_layout_Maybe_instantiation_344() { assert_eq!(::std::mem::size_of::<[u64; 18usize]>() , 144usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36357,7 +36271,7 @@ pub mod root { [u64; 18usize] ) )); } #[test] - fn __bindgen_test_layout_BaseTimeDuration_instantiation_278() { + fn __bindgen_test_layout_BaseTimeDuration_instantiation_345() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36368,7 +36282,7 @@ pub mod root { root::mozilla::BaseTimeDuration ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_279() { + fn __bindgen_test_layout_already_AddRefed_instantiation_346() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36379,7 +36293,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_280() { + fn __bindgen_test_layout_already_AddRefed_instantiation_347() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36390,7 +36304,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_281() { + fn __bindgen_test_layout_nsTArray_instantiation_348() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36401,7 +36315,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_282() { + fn __bindgen_test_layout_nsTArray_instantiation_349() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36412,7 +36326,7 @@ pub mod root { root::nsTArray<*mut root::nsIContent> ) )); } #[test] - fn __bindgen_test_layout_nsCOMPtr_instantiation_283() { + fn __bindgen_test_layout_nsCOMPtr_instantiation_350() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36423,7 +36337,7 @@ pub mod root { root::nsCOMPtr ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_284() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_351() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36436,7 +36350,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_285() { + fn __bindgen_test_layout_already_AddRefed_instantiation_352() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36447,7 +36361,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_286() { + fn __bindgen_test_layout_nsTArray_instantiation_353() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36460,7 +36374,7 @@ pub mod root { ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_287() { + fn __bindgen_test_layout_Handle_instantiation_354() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36471,7 +36385,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_288() { + fn __bindgen_test_layout_Handle_instantiation_355() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36482,7 +36396,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_RefPtr_instantiation_289() { + fn __bindgen_test_layout_RefPtr_instantiation_356() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36493,7 +36407,7 @@ pub mod root { root::RefPtr ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_290() { + fn __bindgen_test_layout_Handle_instantiation_357() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36504,7 +36418,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_291() { + fn __bindgen_test_layout_MutableHandle_instantiation_358() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36515,7 +36429,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Sequence_instantiation_292() { + fn __bindgen_test_layout_Sequence_instantiation_359() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -36524,7 +36438,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_293() { + fn __bindgen_test_layout_Handle_instantiation_360() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36535,7 +36449,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_Sequence_instantiation_294() { + fn __bindgen_test_layout_Sequence_instantiation_361() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -36544,7 +36458,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_Sequence_instantiation_295() { + fn __bindgen_test_layout_Sequence_instantiation_362() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( u64 ) )); @@ -36553,7 +36467,7 @@ pub mod root { u64 ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_296() { + fn __bindgen_test_layout_Handle_instantiation_363() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36564,7 +36478,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_297() { + fn __bindgen_test_layout_Handle_instantiation_364() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36575,7 +36489,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_298() { + fn __bindgen_test_layout_MutableHandle_instantiation_365() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36586,7 +36500,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_299() { + fn __bindgen_test_layout_Handle_instantiation_366() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36597,7 +36511,7 @@ pub mod root { root::JS::Handle ) )); } #[test] - fn __bindgen_test_layout_MutableHandle_instantiation_300() { + fn __bindgen_test_layout_MutableHandle_instantiation_367() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36608,7 +36522,7 @@ pub mod root { root::JS::MutableHandle ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_301() { + fn __bindgen_test_layout_Handle_instantiation_368() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36619,7 +36533,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_302() { + fn __bindgen_test_layout_nsRefPtrHashKey_instantiation_369() { assert_eq!(::std::mem::size_of::>() , 16usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36630,7 +36544,7 @@ pub mod root { root::nsRefPtrHashKey ) )); } #[test] - fn __bindgen_test_layout_nsClassHashtable_instantiation_303() { + fn __bindgen_test_layout_nsClassHashtable_instantiation_370() { assert_eq!(::std::mem::size_of::<[u64; 5usize]>() , 40usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36641,7 +36555,7 @@ pub mod root { [u64; 5usize] ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_304() { + fn __bindgen_test_layout_Handle_instantiation_371() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36652,7 +36566,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_305() { + fn __bindgen_test_layout_nsTArray_instantiation_372() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36663,7 +36577,7 @@ pub mod root { root::nsTArray<::nsstring::nsStringRepr> ) )); } #[test] - fn __bindgen_test_layout_already_AddRefed_instantiation_306() { + fn __bindgen_test_layout_already_AddRefed_instantiation_373() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36674,7 +36588,7 @@ pub mod root { root::already_AddRefed ) )); } #[test] - fn __bindgen_test_layout_Handle_instantiation_307() { + fn __bindgen_test_layout_Handle_instantiation_374() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36685,7 +36599,7 @@ pub mod root { root::JS::Handle<*mut root::JSObject> ) )); } #[test] - fn __bindgen_test_layout_nsTArray_instantiation_308() { + fn __bindgen_test_layout_nsTArray_instantiation_375() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( @@ -36696,7 +36610,7 @@ pub mod root { root::nsTArray<*mut root::mozilla::css::DocumentRule> ) )); } #[test] - fn __bindgen_test_layout_nsAutoPtr_instantiation_309() { + fn __bindgen_test_layout_nsAutoPtr_instantiation_376() { assert_eq!(::std::mem::size_of::>() , 8usize , concat ! ( "Size of template specialization: " , stringify ! ( diff --git a/servo/components/style/gecko/selector_parser.rs b/servo/components/style/gecko/selector_parser.rs index 90d503f58ab2..bbf2142ffc64 100644 --- a/servo/components/style/gecko/selector_parser.rs +++ b/servo/components/style/gecko/selector_parser.rs @@ -206,6 +206,14 @@ impl NonTSPseudoClass { } apply_non_ts_list!(pseudo_class_geckotype) } + + /// Returns true if the evaluation of the pseudo-class depends on the + /// element's attributes. + pub fn is_attr_based(&self) -> bool { + matches!(*self, + NonTSPseudoClass::MozTableBorderNonzero | + NonTSPseudoClass::MozBrowserFrame) + } } /// The dummy struct we use to implement our selector parsing. diff --git a/servo/components/style/gecko/snapshot.rs b/servo/components/style/gecko/snapshot.rs index 4a79b492996d..4c8fe00e6024 100644 --- a/servo/components/style/gecko/snapshot.rs +++ b/servo/components/style/gecko/snapshot.rs @@ -55,6 +55,13 @@ impl GeckoElementSnapshot { self } + /// Returns true if the snapshot has stored state for pseudo-classes + /// that depend on things other than `ElementState`. + #[inline] + pub fn has_other_pseudo_class_state(&self) -> bool { + self.has_any(Flags::OtherPseudoClassState) + } + /// selectors::Element::attr_matches pub fn attr_matches(&self, ns: &NamespaceConstraint<&Namespace>, diff --git a/servo/components/style/properties/gecko.mako.rs b/servo/components/style/properties/gecko.mako.rs index c041e23c0494..2186967279a1 100644 --- a/servo/components/style/properties/gecko.mako.rs +++ b/servo/components/style/properties/gecko.mako.rs @@ -416,7 +416,7 @@ fn color_to_nscolor_zero_currentcolor(color: Color) -> structs::nscolor { <%def name="impl_svg_paint(ident, gecko_ffi_name, need_clone=False, complex_color=True)"> #[allow(non_snake_case)] pub fn set_${ident}(&mut self, mut v: longhands::${ident}::computed_value::T) { - use values::computed::SVGPaintKind; + use values::generics::SVGPaintKind; use self::structs::nsStyleSVGPaintType; use self::structs::nsStyleSVGFallbackType; @@ -461,6 +461,35 @@ fn color_to_nscolor_zero_currentcolor(color: Color) -> structs::nscolor { ); } } + + #[allow(non_snake_case)] + pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T { + use values::generics::{SVGPaint, SVGPaintKind}; + use self::structs::nsStyleSVGPaintType; + use self::structs::nsStyleSVGFallbackType; + let ref paint = ${get_gecko_property(gecko_ffi_name)}; + let fallback = if let nsStyleSVGFallbackType::eStyleSVGFallbackType_Color = paint.mFallbackType { + Some(Color::RGBA(convert_nscolor_to_rgba(paint.mFallbackColor))) + } else { + None + }; + let kind = match paint.mType { + nsStyleSVGPaintType::eStyleSVGPaintType_None => SVGPaintKind::None, + nsStyleSVGPaintType::eStyleSVGPaintType_ContextFill => SVGPaintKind::ContextFill, + nsStyleSVGPaintType::eStyleSVGPaintType_ContextStroke => SVGPaintKind::ContextStroke, + nsStyleSVGPaintType::eStyleSVGPaintType_Server => { + // FIXME (bug 1353966) this should animate + SVGPaintKind::None + } + nsStyleSVGPaintType::eStyleSVGPaintType_Color => { + unsafe { SVGPaintKind::Color(Color::RGBA(convert_nscolor_to_rgba(*paint.mPaint.mColor.as_ref()))) } + } + }; + SVGPaint { + kind: kind, + fallback: fallback, + } + } <%def name="impl_app_units(ident, gecko_ffi_name, need_clone, inherit_from=None, round_to_pixels=False)"> diff --git a/servo/components/style/properties/helpers/animated_properties.mako.rs b/servo/components/style/properties/helpers/animated_properties.mako.rs index e76c0caabbb2..f018967fb9a2 100644 --- a/servo/components/style/properties/helpers/animated_properties.mako.rs +++ b/servo/components/style/properties/helpers/animated_properties.mako.rs @@ -42,6 +42,7 @@ use values::computed::{BorderCornerRadius, ClipRect}; use values::computed::{CalcLengthOrPercentage, Context, LengthOrPercentage}; use values::computed::{MaxLength, MozLength}; use values::computed::ToComputedValue; +use values::generics::{SVGPaint, SVGPaintKind}; use values::generics::border::BorderCornerRadius as GenericBorderCornerRadius; use values::generics::position as generic_position; @@ -2849,6 +2850,75 @@ impl From for CSSParserColor { } } +/// Animatable SVGPaint +pub type IntermediateSVGPaint = SVGPaint; +/// Animatable SVGPaintKind +pub type IntermediateSVGPaintKind = SVGPaintKind; + +impl From<::values::computed::SVGPaint> for IntermediateSVGPaint { + fn from(paint: ::values::computed::SVGPaint) -> IntermediateSVGPaint { + paint.convert(|color| (*color).into()) + } +} + +impl From for ::values::computed::SVGPaint { + fn from(paint: IntermediateSVGPaint) -> ::values::computed::SVGPaint { + paint.convert(|color| (*color).into()) + } +} + + +impl Animatable for IntermediateSVGPaint { + #[inline] + fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64) -> Result { + Ok(IntermediateSVGPaint { + kind: self.kind.add_weighted(&other.kind, self_portion, other_portion)?, + fallback: self.fallback.add_weighted(&other.fallback, self_portion, other_portion)?, + }) + } + + #[inline] + fn compute_distance(&self, other: &Self) -> Result { + self.compute_squared_distance(other).map(|sq| sq.sqrt()) + } + + #[inline] + fn compute_squared_distance(&self, other: &Self) -> Result { + Ok(self.kind.compute_squared_distance(&other.kind)? + + self.fallback.compute_squared_distance(&other.fallback)?) + } +} + +impl Animatable for IntermediateSVGPaintKind { + #[inline] + fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64) -> Result { + match (self, other) { + (&SVGPaintKind::Color(ref self_color), &SVGPaintKind::Color(ref other_color)) => { + Ok(SVGPaintKind::Color(self_color.add_weighted(other_color, self_portion, other_portion)?)) + } + // FIXME context values should be interpolable with colors + // Gecko doesn't implement this behavior either. + (&SVGPaintKind::None, &SVGPaintKind::None) => Ok(SVGPaintKind::None), + (&SVGPaintKind::ContextFill, &SVGPaintKind::ContextFill) => Ok(SVGPaintKind::ContextFill), + (&SVGPaintKind::ContextStroke, &SVGPaintKind::ContextStroke) => Ok(SVGPaintKind::ContextStroke), + _ => Err(()) + } + } + + #[inline] + fn compute_distance(&self, other: &Self) -> Result { + match (self, other) { + (&SVGPaintKind::Color(ref self_color), &SVGPaintKind::Color(ref other_color)) => { + self_color.compute_distance(other_color) + } + (&SVGPaintKind::None, &SVGPaintKind::None) | + (&SVGPaintKind::ContextFill, &SVGPaintKind::ContextFill) | + (&SVGPaintKind::ContextStroke, &SVGPaintKind::ContextStroke)=> Ok(0.0), + _ => Err(()) + } + } +} + <%def name="impl_intermediate_type_for_shadow(type)"> #[derive(Copy, Clone, Debug, PartialEq)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] diff --git a/servo/components/style/properties/longhand/inherited_svg.mako.rs b/servo/components/style/properties/longhand/inherited_svg.mako.rs index 2dfa696c2dc0..4c57a13f43ca 100644 --- a/servo/components/style/properties/longhand/inherited_svg.mako.rs +++ b/servo/components/style/properties/longhand/inherited_svg.mako.rs @@ -35,7 +35,7 @@ ${helpers.predefined_type( "fill", "SVGPaint", "::values::computed::SVGPaint::black()", products="gecko", - animation_value_type="none", + animation_value_type="IntermediateSVGPaint", boxed=True, spec="https://www.w3.org/TR/SVG2/painting.html#SpecifyingFillPaint")} @@ -59,7 +59,7 @@ ${helpers.predefined_type( "stroke", "SVGPaint", "Default::default()", products="gecko", - animation_value_type="none", + animation_value_type="IntermediateSVGPaint", boxed=True, spec="https://www.w3.org/TR/SVG2/painting.html#SpecifyingStrokePaint")} diff --git a/servo/components/style/restyle_hints.rs b/servo/components/style/restyle_hints.rs index 9c62fbe01b5e..53e33608967c 100644 --- a/servo/components/style/restyle_hints.rs +++ b/servo/components/style/restyle_hints.rs @@ -636,30 +636,27 @@ impl<'a, E> Element for ElementWrapper<'a, E> -> bool where F: FnMut(&Self, ElementSelectorFlags), { - // :moz-any is quite special, because we need to keep matching as a - // snapshot. - #[cfg(feature = "gecko")] - { - use selectors::matching::matches_complex_selector; - if let NonTSPseudoClass::MozAny(ref selectors) = *pseudo_class { + // Some pseudo-classes need special handling to evaluate them against + // the snapshot. + match *pseudo_class { + #[cfg(feature = "gecko")] + NonTSPseudoClass::MozAny(ref selectors) => { + use selectors::matching::matches_complex_selector; return selectors.iter().any(|s| { matches_complex_selector(s, 0, self, context, _setter) }) } - } - // :dir needs special handling. It's implemented in terms of state - // flags, but which state flag it maps to depends on the argument to - // :dir. That means we can't just add its state flags to the - // NonTSPseudoClass, because if we added all of them there, and tested - // via intersects() here, we'd get incorrect behavior for :not(:dir()) - // cases. - // - // FIXME(bz): How can I set this up so once Servo adds :dir() support we - // don't forget to update this code? - #[cfg(feature = "gecko")] - { - if let NonTSPseudoClass::Dir(ref s) = *pseudo_class { + // :dir is implemented in terms of state flags, but which state flag + // it maps to depends on the argument to :dir. That means we can't + // just add its state flags to the NonTSPseudoClass, because if we + // added all of them there, and tested via intersects() here, we'd + // get incorrect behavior for :not(:dir()) cases. + // + // FIXME(bz): How can I set this up so once Servo adds :dir() + // support we don't forget to update this code? + #[cfg(feature = "gecko")] + NonTSPseudoClass::Dir(ref s) => { let selector_flag = dir_selector_to_state(s); if selector_flag.is_empty() { // :dir() with some random argument; does not match. @@ -671,16 +668,36 @@ impl<'a, E> Element for ElementWrapper<'a, E> }; return state.contains(selector_flag); } - } - // For :link and :visited, we don't actually want to test the element - // state directly. Instead, we use the `relevant_link` to determine if - // they match. - if *pseudo_class == NonTSPseudoClass::Link { - return relevant_link.is_unvisited(self, context) - } - if *pseudo_class == NonTSPseudoClass::Visited { - return relevant_link.is_visited(self, context) + // For :link and :visited, we don't actually want to test the element + // state directly. Instead, we use the `relevant_link` to determine if + // they match. + NonTSPseudoClass::Link => { + return relevant_link.is_unvisited(self, context); + } + NonTSPseudoClass::Visited => { + return relevant_link.is_visited(self, context); + } + + #[cfg(feature = "gecko")] + NonTSPseudoClass::MozTableBorderNonzero => { + if let Some(snapshot) = self.snapshot() { + if snapshot.has_other_pseudo_class_state() { + return snapshot.mIsTableBorderNonzero(); + } + } + } + + #[cfg(feature = "gecko")] + NonTSPseudoClass::MozBrowserFrame => { + if let Some(snapshot) = self.snapshot() { + if snapshot.has_other_pseudo_class_state() { + return snapshot.mIsMozBrowserFrame(); + } + } + } + + _ => {} } let flag = pseudo_class.state_flag(); @@ -808,24 +825,25 @@ fn selector_to_state(sel: &Component) -> ElementState { } } -fn is_attr_selector(sel: &Component) -> bool { +fn is_attr_based_selector(sel: &Component) -> bool { match *sel { Component::ID(_) | Component::Class(_) | Component::AttributeInNoNamespaceExists { .. } | Component::AttributeInNoNamespace { .. } | Component::AttributeOther(_) => true, + Component::NonTSPseudoClass(ref pc) => pc.is_attr_based(), _ => false, } } #[derive(Clone, Debug)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] -/// The aspects of an selector which are sensitive. +/// The characteristics that a selector is sensitive to. pub struct Sensitivities { - /// The states which are sensitive. + /// The states which the selector is sensitive to. pub states: ElementState, - /// Whether attributes are sensitive. + /// Whether the selector is sensitive to attributes. pub attrs: bool, } @@ -903,7 +921,7 @@ impl SelectorVisitor for SensitivitiesVisitor { type Impl = SelectorImpl; fn visit_simple_selector(&mut self, s: &Component) -> bool { self.sensitivities.states.insert(selector_to_state(s)); - self.sensitivities.attrs |= is_attr_selector(s); + self.sensitivities.attrs |= is_attr_based_selector(s); true } } diff --git a/servo/components/style/servo/selector_parser.rs b/servo/components/style/servo/selector_parser.rs index c6f56a09b12a..dbc0e7c1eee1 100644 --- a/servo/components/style/servo/selector_parser.rs +++ b/servo/components/style/servo/selector_parser.rs @@ -268,6 +268,12 @@ impl NonTSPseudoClass { pub fn needs_cache_revalidation(&self) -> bool { self.state_flag().is_empty() } + + /// Returns true if the evaluation of the pseudo-class depends on the + /// element's attributes. + pub fn is_attr_based(&self) -> bool { + false + } } /// The abstract struct we implement the selector parser implementation on top diff --git a/servo/components/style/stylesheets/supports_rule.rs b/servo/components/style/stylesheets/supports_rule.rs index 2049bbce7ec0..7d87f0f4aec7 100644 --- a/servo/components/style/stylesheets/supports_rule.rs +++ b/servo/components/style/stylesheets/supports_rule.rs @@ -4,7 +4,7 @@ //! [@supports rules](https://drafts.csswg.org/css-conditional-3/#at-supports) -use cssparser::{parse_important, Parser, SourceLocation, Token}; +use cssparser::{Delimiter, parse_important, Parser, SourceLocation, Token}; use parser::ParserContext; use properties::{PropertyId, PropertyDeclaration, SourcePropertyDeclaration}; use shared_lock::{DeepCloneWithLock, Locked, SharedRwLock, SharedRwLockReadGuard, ToCssWithGuard}; @@ -263,7 +263,10 @@ impl Declaration { let mut input = Parser::new(&self.val); let context = ParserContext::new_with_rule_type(cx, Some(CssRuleType::Style)); let mut declarations = SourcePropertyDeclaration::new(); - let res = PropertyDeclaration::parse_into(&mut declarations, id, &context, &mut input); + let res = input.parse_until_before(Delimiter::Bang, |input| { + PropertyDeclaration::parse_into(&mut declarations, id, &context, input) + .map_err(|_| ()) + }); let _ = input.try(parse_important); res.is_ok() && input.is_exhausted() } diff --git a/servo/components/style/values/computed/mod.rs b/servo/components/style/values/computed/mod.rs index 3548a045d9c9..26165dc4e136 100644 --- a/servo/components/style/values/computed/mod.rs +++ b/servo/components/style/values/computed/mod.rs @@ -532,23 +532,15 @@ impl IntegerOrAuto { } } - -/// An SVG paint value -/// -/// https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint -#[derive(Debug, Clone, PartialEq)] -#[cfg_attr(feature = "servo", derive(HeapSizeOf))] -pub struct SVGPaint { - /// The paint source - pub kind: SVGPaintKind, - /// The fallback color - pub fallback: Option, -} +/// Computed SVG Paint value +pub type SVGPaint = ::values::generics::SVGPaint; +/// Computed SVG Paint Kind value +pub type SVGPaintKind = ::values::generics::SVGPaintKind; impl Default for SVGPaint { fn default() -> Self { SVGPaint { - kind: SVGPaintKind::None, + kind: ::values::generics::SVGPaintKind::None, fallback: None, } } @@ -559,54 +551,12 @@ impl SVGPaint { pub fn black() -> Self { let rgba = RGBA::from_floats(0., 0., 0., 1.); SVGPaint { - kind: SVGPaintKind::Color(CSSColor::RGBA(rgba)), + kind: ::values::generics::SVGPaintKind::Color(CSSColor::RGBA(rgba)), fallback: None, } } } -/// An SVG paint value without the fallback -/// -/// Whereas the spec only allows PaintServer -/// to have a fallback, Gecko lets the context -/// properties have a fallback as well. -#[derive(Debug, Clone, PartialEq)] -#[cfg_attr(feature = "servo", derive(HeapSizeOf))] -pub enum SVGPaintKind { - /// `none` - None, - /// `` - Color(CSSColor), - /// `url(...)` - PaintServer(SpecifiedUrl), - /// `context-fill` - ContextFill, - /// `context-stroke` - ContextStroke, -} - -impl ToCss for SVGPaintKind { - fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { - match *self { - SVGPaintKind::None => dest.write_str("none"), - SVGPaintKind::ContextStroke => dest.write_str("context-stroke"), - SVGPaintKind::ContextFill => dest.write_str("context-fill"), - SVGPaintKind::Color(ref color) => color.to_css(dest), - SVGPaintKind::PaintServer(ref server) => server.to_css(dest), - } - } -} - -impl ToCss for SVGPaint { - fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { - self.kind.to_css(dest)?; - if let Some(ref fallback) = self.fallback { - fallback.to_css(dest)?; - } - Ok(()) - } -} - /// | | pub type LengthOrPercentageOrNumber = Either; diff --git a/servo/components/style/values/generics/mod.rs b/servo/components/style/values/generics/mod.rs index 7cbadffe10a2..3ff55fda6c82 100644 --- a/servo/components/style/values/generics/mod.rs +++ b/servo/components/style/values/generics/mod.rs @@ -11,6 +11,7 @@ use parser::{Parse, ParserContext}; use std::fmt; use style_traits::{OneOrMoreCommaSeparated, ToCss}; use super::CustomIdent; +use values::specified::url::SpecifiedUrl; pub mod background; pub mod basic_shape; @@ -268,3 +269,133 @@ impl ToCss for FontSettingTagFloat { self.0.to_css(dest) } } + + +/// An SVG paint value +/// +/// https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint +#[derive(Debug, Clone, PartialEq)] +#[cfg_attr(feature = "servo", derive(HeapSizeOf))] +pub struct SVGPaint { + /// The paint source + pub kind: SVGPaintKind, + /// The fallback color + pub fallback: Option, +} + +/// An SVG paint value without the fallback +/// +/// Whereas the spec only allows PaintServer +/// to have a fallback, Gecko lets the context +/// properties have a fallback as well. +#[derive(Debug, Clone, PartialEq)] +#[cfg_attr(feature = "servo", derive(HeapSizeOf))] +pub enum SVGPaintKind { + /// `none` + None, + /// `` + Color(ColorType), + /// `url(...)` + PaintServer(SpecifiedUrl), + /// `context-fill` + ContextFill, + /// `context-stroke` + ContextStroke, +} + +impl SVGPaintKind { + /// Convert to a value with a different kind of color + pub fn convert(&self, f: F) -> SVGPaintKind + where F: Fn(&ColorType) -> OtherColor { + match *self { + SVGPaintKind::None => SVGPaintKind::None, + SVGPaintKind::ContextStroke => SVGPaintKind::ContextStroke, + SVGPaintKind::ContextFill => SVGPaintKind::ContextFill, + SVGPaintKind::Color(ref color) => { + SVGPaintKind::Color(f(color)) + } + SVGPaintKind::PaintServer(ref server) => { + SVGPaintKind::PaintServer(server.clone()) + } + } + } +} + +impl SVGPaint { + /// Convert to a value with a different kind of color + pub fn convert(&self, f: F) -> SVGPaint + where F: Fn(&ColorType) -> OtherColor { + SVGPaint { + kind: self.kind.convert(&f), + fallback: self.fallback.as_ref().map(|color| f(color)) + } + } +} + +impl SVGPaintKind { + /// Parse a keyword value only + fn parse_ident(input: &mut Parser) -> Result { + Ok(match_ignore_ascii_case! { &input.expect_ident()?, + "none" => SVGPaintKind::None, + "context-fill" => SVGPaintKind::ContextFill, + "context-stroke" => SVGPaintKind::ContextStroke, + _ => return Err(()) + }) + } +} + +impl Parse for SVGPaint { + fn parse(context: &ParserContext, input: &mut Parser) -> Result { + if let Ok(url) = input.try(|i| SpecifiedUrl::parse(context, i)) { + let fallback = input.try(|i| ColorType::parse(context, i)); + Ok(SVGPaint { + kind: SVGPaintKind::PaintServer(url), + fallback: fallback.ok(), + }) + } else if let Ok(kind) = input.try(SVGPaintKind::parse_ident) { + if let SVGPaintKind::None = kind { + Ok(SVGPaint { + kind: kind, + fallback: None, + }) + } else { + let fallback = input.try(|i| ColorType::parse(context, i)); + Ok(SVGPaint { + kind: kind, + fallback: fallback.ok(), + }) + } + } else if let Ok(color) = input.try(|i| ColorType::parse(context, i)) { + Ok(SVGPaint { + kind: SVGPaintKind::Color(color), + fallback: None, + }) + } else { + Err(()) + } + } +} + +impl ToCss for SVGPaintKind { + fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { + match *self { + SVGPaintKind::None => dest.write_str("none"), + SVGPaintKind::ContextStroke => dest.write_str("context-stroke"), + SVGPaintKind::ContextFill => dest.write_str("context-fill"), + SVGPaintKind::Color(ref color) => color.to_css(dest), + SVGPaintKind::PaintServer(ref server) => server.to_css(dest), + } + } +} + +impl ToCss for SVGPaint { + fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { + self.kind.to_css(dest)?; + if let Some(ref fallback) = self.fallback { + fallback.to_css(dest)?; + } + Ok(()) + } +} + + diff --git a/servo/components/style/values/specified/mod.rs b/servo/components/style/values/specified/mod.rs index 71008d4e1d18..2299362f6ded 100644 --- a/servo/components/style/values/specified/mod.rs +++ b/servo/components/style/values/specified/mod.rs @@ -933,103 +933,11 @@ impl Shadow { no_viewport_percentage!(SVGPaint); -/// An SVG paint value -/// -/// https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint -#[derive(Debug, Clone, PartialEq)] -#[cfg_attr(feature = "servo", derive(HeapSizeOf))] -pub struct SVGPaint { - /// The paint source - pub kind: SVGPaintKind, - /// The fallback color - pub fallback: Option, -} - -/// An SVG paint value without the fallback -/// -/// Whereas the spec only allows PaintServer -/// to have a fallback, Gecko lets the context -/// properties have a fallback as well. -#[derive(Debug, Clone, PartialEq)] -#[cfg_attr(feature = "servo", derive(HeapSizeOf))] -pub enum SVGPaintKind { - /// `none` - None, - /// `` - Color(CSSColor), - /// `url(...)` - PaintServer(SpecifiedUrl), - /// `context-fill` - ContextFill, - /// `context-stroke` - ContextStroke, -} - -impl SVGPaintKind { - fn parse_ident(input: &mut Parser) -> Result { - Ok(match_ignore_ascii_case! { &input.expect_ident()?, - "none" => SVGPaintKind::None, - "context-fill" => SVGPaintKind::ContextFill, - "context-stroke" => SVGPaintKind::ContextStroke, - _ => return Err(()) - }) - } -} - -impl Parse for SVGPaint { - fn parse(context: &ParserContext, input: &mut Parser) -> Result { - if let Ok(url) = input.try(|i| SpecifiedUrl::parse(context, i)) { - let fallback = input.try(|i| CSSColor::parse(context, i)); - Ok(SVGPaint { - kind: SVGPaintKind::PaintServer(url), - fallback: fallback.ok(), - }) - } else if let Ok(kind) = input.try(SVGPaintKind::parse_ident) { - if kind == SVGPaintKind::None { - Ok(SVGPaint { - kind: kind, - fallback: None, - }) - } else { - let fallback = input.try(|i| CSSColor::parse(context, i)); - Ok(SVGPaint { - kind: kind, - fallback: fallback.ok(), - }) - } - } else if let Ok(color) = input.try(|i| CSSColor::parse(context, i)) { - Ok(SVGPaint { - kind: SVGPaintKind::Color(color), - fallback: None, - }) - } else { - Err(()) - } - } -} - -impl ToCss for SVGPaintKind { - fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { - match *self { - SVGPaintKind::None => dest.write_str("none"), - SVGPaintKind::ContextStroke => dest.write_str("context-stroke"), - SVGPaintKind::ContextFill => dest.write_str("context-fill"), - SVGPaintKind::Color(ref color) => color.to_css(dest), - SVGPaintKind::PaintServer(ref server) => server.to_css(dest), - } - } -} - -impl ToCss for SVGPaint { - fn to_css(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { - self.kind.to_css(dest)?; - if let Some(ref fallback) = self.fallback { - fallback.to_css(dest)?; - } - Ok(()) - } -} +/// Specified SVG Paint value +pub type SVGPaint = ::values::generics::SVGPaint; +/// Specified SVG Paint Kind value +pub type SVGPaintKind = ::values::generics::SVGPaintKind; impl ToComputedValue for SVGPaint { type ComputedValue = super::computed::SVGPaint; @@ -1056,36 +964,17 @@ impl ToComputedValue for SVGPaintKind { #[inline] fn to_computed_value(&self, context: &Context) -> Self::ComputedValue { - match *self { - SVGPaintKind::None => super::computed::SVGPaintKind::None, - SVGPaintKind::ContextStroke => super::computed::SVGPaintKind::ContextStroke, - SVGPaintKind::ContextFill => super::computed::SVGPaintKind::ContextFill, - SVGPaintKind::Color(ref color) => { - let color = match color.parsed { - Color::CurrentColor => cssparser::Color::RGBA(context.style().get_color().clone_color()), - _ => color.to_computed_value(context), - }; - super::computed::SVGPaintKind::Color(color) + self.convert(|color| { + match color.parsed { + Color::CurrentColor => cssparser::Color::RGBA(context.style().get_color().clone_color()), + _ => color.to_computed_value(context), } - SVGPaintKind::PaintServer(ref server) => { - super::computed::SVGPaintKind::PaintServer(server.to_computed_value(context)) - } - } + }) } #[inline] fn from_computed_value(computed: &Self::ComputedValue) -> Self { - match *computed { - super::computed::SVGPaintKind::None => SVGPaintKind::None, - super::computed::SVGPaintKind::ContextStroke => SVGPaintKind::ContextStroke, - super::computed::SVGPaintKind::ContextFill => SVGPaintKind::ContextFill, - super::computed::SVGPaintKind::Color(ref color) => { - SVGPaintKind::Color(ToComputedValue::from_computed_value(color)) - } - super::computed::SVGPaintKind::PaintServer(ref server) => { - SVGPaintKind::PaintServer(ToComputedValue::from_computed_value(server)) - } - } + computed.convert(ToComputedValue::from_computed_value) } } diff --git a/servo/ports/geckolib/glue.rs b/servo/ports/geckolib/glue.rs index 6937d4fff105..9c32761a9fe9 100644 --- a/servo/ports/geckolib/glue.rs +++ b/servo/ports/geckolib/glue.rs @@ -2298,7 +2298,7 @@ pub extern "C" fn Servo_CSSSupports2(property: *const nsACString, pub extern "C" fn Servo_CSSSupports(cond: *const nsACString) -> bool { let condition = unsafe { cond.as_ref().unwrap().as_str_unchecked() }; let mut input = Parser::new(&condition); - let cond = parse_condition_or_declaration(&mut input); + let cond = input.parse_entirely(|i| parse_condition_or_declaration(i)); if let Ok(cond) = cond { let url_data = unsafe { dummy_url_data() }; let reporter = RustLogReporter; diff --git a/servo/tests/unit/layout/Cargo.toml b/servo/tests/unit/layout/Cargo.toml index 358d5054ca0b..d84754912dbd 100644 --- a/servo/tests/unit/layout/Cargo.toml +++ b/servo/tests/unit/layout/Cargo.toml @@ -10,7 +10,5 @@ path = "lib.rs" doctest = false [dependencies] -atomic_refcell = "0.1" layout = {path = "../../../components/layout"} -script_layout_interface = {path = "../../../components/script_layout_interface"} size_of_test = {path = "../../../components/size_of_test"} diff --git a/servo/tests/unit/layout/lib.rs b/servo/tests/unit/layout/lib.rs index 9ad412739936..a763135260a5 100644 --- a/servo/tests/unit/layout/lib.rs +++ b/servo/tests/unit/layout/lib.rs @@ -2,9 +2,7 @@ * 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/. */ -extern crate atomic_refcell; extern crate layout; -extern crate script_layout_interface; #[macro_use] extern crate size_of_test; #[cfg(all(test, target_pointer_width = "64"))] mod size_of; diff --git a/servo/tests/unit/net/lib.rs b/servo/tests/unit/net/lib.rs index 236432e009ed..2116fa3dd83b 100644 --- a/servo/tests/unit/net/lib.rs +++ b/servo/tests/unit/net/lib.rs @@ -34,7 +34,7 @@ extern crate url; use devtools_traits::DevtoolsControlMsg; use hyper::server::{Handler, Listening, Server}; -use net::connector::{create_http_connector, create_ssl_client}; +use net::connector::create_ssl_client; use net::fetch::cors_cache::CorsCache; use net::fetch::methods::{self, FetchContext}; use net::filemanager_thread::FileManager; diff --git a/taskcluster/taskgraph/transforms/job/spidermonkey.py b/taskcluster/taskgraph/transforms/job/spidermonkey.py index b42685f0211f..c18761b30e07 100644 --- a/taskcluster/taskgraph/transforms/job/spidermonkey.py +++ b/taskcluster/taskgraph/transforms/job/spidermonkey.py @@ -28,10 +28,11 @@ sm_run_schema = Schema({ }) -@run_job_using("docker-worker", "spidermonkey") -@run_job_using("docker-worker", "spidermonkey-package") -@run_job_using("docker-worker", "spidermonkey-mozjs-crate") -def docker_worker_spidermonkey(config, job, taskdesc, schema=sm_run_schema): +@run_job_using("docker-worker", "spidermonkey", schema=sm_run_schema) +@run_job_using("docker-worker", "spidermonkey-package", schema=sm_run_schema) +@run_job_using("docker-worker", "spidermonkey-mozjs-crate", + schema=sm_run_schema) +def docker_worker_spidermonkey(config, job, taskdesc): run = job['run'] worker = taskdesc['worker'] diff --git a/testing/geckodriver/Cargo.lock b/testing/geckodriver/Cargo.lock index 29a0d5d83011..c1005b9e0513 100644 --- a/testing/geckodriver/Cargo.lock +++ b/testing/geckodriver/Cargo.lock @@ -7,8 +7,8 @@ dependencies = [ "hyper 0.10.10 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mozprofile 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "mozrunner 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "mozprofile 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "mozrunner 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "mozversion 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", @@ -288,20 +288,19 @@ dependencies = [ [[package]] name = "mozprofile" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "mozrunner" -version = "0.3.4" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mozprofile 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "mozprofile 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "winreg 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -718,8 +717,8 @@ dependencies = [ "checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4" "checksum mime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9d69889cdc6336ed56b174514ce876c4c3dc564cc23dd872e7bca589bb2a36c8" "checksum miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "28eaee17666671fa872e567547e8428e83308ebe5808cdf6a0e28397dbe2c726" -"checksum mozprofile 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4981de229fba7d949465a2f564e2b46906c6e876516040416956a54021a84165" -"checksum mozrunner 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "91c54a746e7430326d2bc48a5b10ba7e9cd2294306773cb9f232835abe791f02" +"checksum mozprofile 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a17b8bbde1dc0fbf1c8b073192d7c6f89baa932173ece7c1447de5e9cc7cd7e" +"checksum mozrunner 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a568168329fc285ad6d04dfbe058ea20ff842f4301fe9205c6cbd4ed3be85378" "checksum mozversion 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9fb3a40135553611560d3eb4a49479beaf0c91c5a93f723338c5b0edddf08f26" "checksum msdos_time 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "65ba9d75bcea84e07812618fedf284a64776c2f2ea0cad6bca7f69739695a958" "checksum num 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "98b15ba84e910ea7a1973bccd3df7b31ae282bf9d8bd2897779950c9b8303d40" diff --git a/testing/geckodriver/Cargo.toml b/testing/geckodriver/Cargo.toml index b028fde43caa..a098056b36e8 100644 --- a/testing/geckodriver/Cargo.toml +++ b/testing/geckodriver/Cargo.toml @@ -17,8 +17,8 @@ clap = {version = "^2.19", default-features = false, features = ["suggestions", hyper = "0.10" lazy_static = "0.1" log = "0.3" -mozprofile = "0.2" -mozrunner = "0.3" +mozprofile = "0.3" +mozrunner = "0.4" mozversion = "0.1" regex = "0.2" rustc-serialize = "0.3" diff --git a/testing/mozharness/mozharness/mozilla/testing/talos.py b/testing/mozharness/mozharness/mozilla/testing/talos.py index ee015ed98405..096a564bffce 100755 --- a/testing/mozharness/mozharness/mozilla/testing/talos.py +++ b/testing/mozharness/mozharness/mozilla/testing/talos.py @@ -575,13 +575,13 @@ class Talos(TestingMixin, MercurialScript, BlobUploadMixin, TooltoolMixin, self.talos_path, 'talos', 'mitmproxy', - self.config['python3_manifest'][self.platform_name()]) + self.config.get('python3_manifest')[self.platform_name()]) output_dir = self.query_abs_dirs()['abs_work_dir'] # Slowdown: The unzipped Python3 installation gets deleted every time self.tooltool_fetch( manifest_file, output_dir=output_dir, - cache=self.config['tooltool_cache'] + cache=self.config.get('tooltool_cache') ) python3_path = os.path.join(output_dir, 'python3.6', 'python') self.run_command([python3_path, '--version'], env=self.query_env()) diff --git a/testing/talos/mach_commands.py b/testing/talos/mach_commands.py index 55f2d35f38c1..4c8ca68701b0 100644 --- a/testing/talos/mach_commands.py +++ b/testing/talos/mach_commands.py @@ -69,6 +69,10 @@ class TalosRunner(MozbuildObject): ], 'download_tooltool': True, 'talos_extra_options': ['--develop'] + self.talos_args, + 'python3_manifest': { + 'win32': 'python3.manifest', + 'win64': 'python3_x64.manifest', + } } def make_args(self): diff --git a/testing/web-platform/meta/quirks-mode/hashless-hex-color.html.ini b/testing/web-platform/meta/quirks-mode/hashless-hex-color.html.ini index 1b44156b35f3..d5fe7f135f60 100644 --- a/testing/web-platform/meta/quirks-mode/hashless-hex-color.html.ini +++ b/testing/web-platform/meta/quirks-mode/hashless-hex-color.html.ini @@ -1,185 +1,5 @@ [hashless-hex-color.html] type: testharness - [1abcdef (quirks)] - expected: FAIL - - [+123456a (quirks)] - expected: FAIL - - [+1234567a (quirks)] - expected: FAIL - - [-1a (quirks)] - expected: FAIL - - [-12a (quirks)] - expected: FAIL - - [-123a (quirks)] - expected: FAIL - - [-1234a (quirks)] - expected: FAIL - - [-12345a (quirks)] - expected: FAIL - - [-123456a (quirks)] - expected: FAIL - - [-1234567a (quirks)] - expected: FAIL - - [-12345678a (quirks)] - expected: FAIL - - [+123456A (quirks)] - expected: FAIL - - [+1234567A (quirks)] - expected: FAIL - - [-1A (quirks)] - expected: FAIL - - [-12A (quirks)] - expected: FAIL - - [-123A (quirks)] - expected: FAIL - - [-1234A (quirks)] - expected: FAIL - - [-12345A (quirks)] - expected: FAIL - - [-123456A (quirks)] - expected: FAIL - - [-1234567A (quirks)] - expected: FAIL - - [-12345678A (quirks)] - expected: FAIL - - [1.1a (quirks)] - expected: FAIL - - [1.11a (quirks)] - expected: FAIL - - [1.111a (quirks)] - expected: FAIL - - [1.1111a (quirks)] - expected: FAIL - - [1.11111a (quirks)] - expected: FAIL - - [1.111111a (quirks)] - expected: FAIL - - [+1.1a (quirks)] - expected: FAIL - - [+1.11a (quirks)] - expected: FAIL - - [+1.111a (quirks)] - expected: FAIL - - [+1.1111a (quirks)] - expected: FAIL - - [+1.11111a (quirks)] - expected: FAIL - - [+1.111111a (quirks)] - expected: FAIL - - [-1.1a (quirks)] - expected: FAIL - - [-1.11a (quirks)] - expected: FAIL - - [-1.111a (quirks)] - expected: FAIL - - [-1.1111a (quirks)] - expected: FAIL - - [-1.11111a (quirks)] - expected: FAIL - - [-1.111111a (quirks)] - expected: FAIL - - [1.0a (quirks)] - expected: FAIL - - [11.0a (quirks)] - expected: FAIL - - [111.0a (quirks)] - expected: FAIL - - [1111.0a (quirks)] - expected: FAIL - - [11111.0a (quirks)] - expected: FAIL - - [111111.0a (quirks)] - expected: FAIL - - [1111111.0a (quirks)] - expected: FAIL - - [+1.0a (quirks)] - expected: FAIL - - [+11.0a (quirks)] - expected: FAIL - - [+111.0a (quirks)] - expected: FAIL - - [+1111.0a (quirks)] - expected: FAIL - - [+11111.0a (quirks)] - expected: FAIL - - [+111111.0a (quirks)] - expected: FAIL - - [+1111111.0a (quirks)] - expected: FAIL - - [-1.0a (quirks)] - expected: FAIL - - [-11.0a (quirks)] - expected: FAIL - - [-111.0a (quirks)] - expected: FAIL - - [-1111.0a (quirks)] - expected: FAIL - - [-11111.0a (quirks)] - expected: FAIL - - [-111111.0a (quirks)] - expected: FAIL - - [-1111111.0a (quirks)] - expected: FAIL - [rgb(calc(100 + 155), 255, 255) (quirks)] expected: FAIL @@ -239,22 +59,3 @@ [rgb(calc(/**/100/**/ + /**/155/**/), 255, 255) (SVG)] expected: FAIL - - [1e1a (quirks)] - expected: FAIL - - [11e1a (quirks)] - expected: FAIL - - [111e1a (quirks)] - expected: FAIL - - [1111e1a (quirks)] - expected: FAIL - - [11111e1a (quirks)] - expected: FAIL - - [111111e1a (quirks)] - expected: FAIL - diff --git a/third_party/rust/mozprofile/.cargo-checksum.json b/third_party/rust/mozprofile/.cargo-checksum.json index 4ffa693e85e6..44ff4ba3b6ac 100644 --- a/third_party/rust/mozprofile/.cargo-checksum.json +++ b/third_party/rust/mozprofile/.cargo-checksum.json @@ -1 +1 @@ -{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"c1e953ee360e77de57f7b02f1b7880bd6a3dc22d1a69e953c2ac2c52cc52d247","Cargo.toml":"1e814cdffc5c7c21f30adb6baab40494c1697821baa95b6f15b14b81731fe689","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","src/lib.rs":"8d7d5bd14f58269edc5cb56d0218c854a3efa6a7155ffa14bd3e5486c355977b","src/prefdata.rs":"f3157c44e3d395331dd9ac8f2a065fe0512b4090804b14d044b70ae2f688fcdf","src/preferences.rs":"96e6fd609c48f3dcf1c945c7c095d5f33a13fc39f0d7c56a30924a59bd8f54f6","src/prefreader.rs":"84e357411164ebd8b11ab95962a1a5474bc7e79b8f1461f674a2b19868c39ddd","src/profile.rs":"0686a64b55afa928477a72ff1135939e68903305e26f47ddfb65e62409b2ea12"},"package":"4981de229fba7d949465a2f564e2b46906c6e876516040416956a54021a84165"} \ No newline at end of file +{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"c1e953ee360e77de57f7b02f1b7880bd6a3dc22d1a69e953c2ac2c52cc52d247","Cargo.toml":"9efdea9a6a5a92ba613ed754bbd4c7c1737e02f6eb1eee55b1e2a42c07265c18","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","src/lib.rs":"737568246693facce8c453a250b2bd93863364344bc155a7cea858ee5de5958a","src/preferences.rs":"96e6fd609c48f3dcf1c945c7c095d5f33a13fc39f0d7c56a30924a59bd8f54f6","src/prefreader.rs":"84e357411164ebd8b11ab95962a1a5474bc7e79b8f1461f674a2b19868c39ddd","src/profile.rs":"0686a64b55afa928477a72ff1135939e68903305e26f47ddfb65e62409b2ea12"},"package":"1a17b8bbde1dc0fbf1c8b073192d7c6f89baa932173ece7c1447de5e9cc7cd7e"} \ No newline at end of file diff --git a/third_party/rust/mozprofile/Cargo.toml b/third_party/rust/mozprofile/Cargo.toml index 223a9f482714..bbde6c81003c 100644 --- a/third_party/rust/mozprofile/Cargo.toml +++ b/third_party/rust/mozprofile/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mozprofile" -version = "0.2.1" +version = "0.3.0" authors = ["Mozilla Tools and Automation "] description = "Library for working with Mozilla profiles." repository = "https://github.com/jgraham/rust_mozprofile" @@ -8,4 +8,3 @@ license = "MPL-2.0" [dependencies] tempdir = "0.3.4" -lazy_static = "0.1" diff --git a/third_party/rust/mozprofile/src/lib.rs b/third_party/rust/mozprofile/src/lib.rs index e5bab22c783e..ef7a52274b0f 100644 --- a/third_party/rust/mozprofile/src/lib.rs +++ b/third_party/rust/mozprofile/src/lib.rs @@ -1,12 +1,9 @@ -#[macro_use] -extern crate lazy_static; - extern crate tempdir; pub mod profile; pub mod preferences; pub mod prefreader; -pub mod prefdata; + #[cfg(test)] mod test { diff --git a/third_party/rust/mozprofile/src/prefdata.rs b/third_party/rust/mozprofile/src/prefdata.rs deleted file mode 100644 index 1813f85c9548..000000000000 --- a/third_party/rust/mozprofile/src/prefdata.rs +++ /dev/null @@ -1,44 +0,0 @@ -#![allow(dead_code)] -use preferences::Pref; - -lazy_static! { - pub static ref FIREFOX_PREFERENCES: [(&'static str, Pref); 17] = [ - // Don't automatically update the application - ("app.update.enabled", Pref::new(false)), - // Don't restore the last open set of tabs if the browser has crashed - ("browser.sessionstore.resume_from_crash", Pref::new(false)), - // Don't check for the default web browser during startup - ("browser.shell.checkDefaultBrowser", Pref::new(false)), - // Don't warn on exit when multiple tabs are open - ("browser.tabs.warnOnClose", Pref::new(false)), - // Don't warn when exiting the browser - ("browser.warnOnQuit", Pref::new(false)), - // Don't send Firefox health reports to the production server - //"datareporting.healthreport.documentServerURI", "http://%(server)s/healthreport/", - // Only install add-ons from the profile and the application scope - // Also ensure that those are not getting disabled. - // see: https://developer.mozilla.org/en/Installing_extensions - ("extensions.enabledScopes", Pref::new(5)), - ("extensions.autoDisableScopes", Pref::new(10)), - // Don't send the list of installed addons to AMO - ("extensions.getAddons.cache.enabled", Pref::new(false)), - // Don't install distribution add-ons from the app folder - ("extensions.installDistroAddons", Pref::new(false)), - // Dont' run the add-on compatibility check during start-up - ("extensions.showMismatchUI", Pref::new(false)), - // Don't automatically update add-ons - ("extensions.update.enabled", Pref::new(false)), - // Don't open a dialog to show available add-on updates - ("extensions.update.notifyUser", Pref::new(false)), - // Enable test mode to run multiple tests in parallel - ("focusmanager.testmode", Pref::new(true)), - // Enable test mode to not raise an OS level dialog for location sharing - ("geo.provider.testing", Pref::new(true)), - // Suppress delay for main action in popup notifications - ("security.notification_enable_delay", Pref::new(0)), - // Suppress automatic safe mode after crashes - ("toolkit.startup.max_resumed_crashes", Pref::new(-1)), - // Don't report telemetry information - ("toolkit.telemetry.enabled", Pref::new(false)), - ]; -} diff --git a/third_party/rust/mozrunner/.cargo-checksum.json b/third_party/rust/mozrunner/.cargo-checksum.json index 9c5b9083c77f..a653c7480952 100644 --- a/third_party/rust/mozrunner/.cargo-checksum.json +++ b/third_party/rust/mozrunner/.cargo-checksum.json @@ -1 +1 @@ -{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"c1e953ee360e77de57f7b02f1b7880bd6a3dc22d1a69e953c2ac2c52cc52d247","Cargo.toml":"61ed94f83de70e690fd840ac055f3c7307bd92a14efc33f1f8297e89c52e83bc","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","src/bin/firefox-default-path.rs":"21f1aa96a4ffb368a4266e294bc4b1b17ff8229f2418af6679783f6d9c0280df","src/lib.rs":"3ed528f2069e810adb6f2ea0b248c4542de95f1cc305154f440877d4ee6d550c","src/runner.rs":"a54c399eb67136d437f0a51795de5d2c510b3feb44ff56f059e1d411e583a7ee"},"package":"91c54a746e7430326d2bc48a5b10ba7e9cd2294306773cb9f232835abe791f02"} \ No newline at end of file +{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"c1e953ee360e77de57f7b02f1b7880bd6a3dc22d1a69e953c2ac2c52cc52d247","Cargo.toml":"25af4086ef96f79688c6888d88df053fc04d0ff8e3c4353a6aea91605afc58ef","LICENSE":"fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85","src/bin/firefox-default-path.rs":"21f1aa96a4ffb368a4266e294bc4b1b17ff8229f2418af6679783f6d9c0280df","src/lib.rs":"3ed528f2069e810adb6f2ea0b248c4542de95f1cc305154f440877d4ee6d550c","src/runner.rs":"ed095febfb54c87648fecb4818e7726702f6e46053119ffd9316c664b7e93b3e"},"package":"a568168329fc285ad6d04dfbe058ea20ff842f4301fe9205c6cbd4ed3be85378"} \ No newline at end of file diff --git a/third_party/rust/mozrunner/Cargo.toml b/third_party/rust/mozrunner/Cargo.toml index 5de3139e645e..400acc7ff571 100644 --- a/third_party/rust/mozrunner/Cargo.toml +++ b/third_party/rust/mozrunner/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mozrunner" -version = "0.3.4" +version = "0.4.0" authors = ["Mozilla Tools and Automation "] description = "Library for starting Firefox binaries." repository = "https://github.com/jgraham/rust_mozrunner" @@ -8,7 +8,7 @@ license = "MPL-2.0" [dependencies] log = "0.3" -mozprofile = "0.2" +mozprofile = "0.3" [target.'cfg(target_os = "windows")'.dependencies] winreg = "0.3.5" diff --git a/third_party/rust/mozrunner/src/runner.rs b/third_party/rust/mozrunner/src/runner.rs index 2bc522321c5e..d0cd22381fed 100644 --- a/third_party/rust/mozrunner/src/runner.rs +++ b/third_party/rust/mozrunner/src/runner.rs @@ -1,4 +1,3 @@ -use mozprofile::prefdata::FIREFOX_PREFERENCES; use mozprofile::prefreader::PrefReaderError; use mozprofile::profile::Profile; use std::convert::From; @@ -97,9 +96,7 @@ impl Runner for FirefoxRunner { let mut cmd = Command::new(&self.binary); self.build_command(&mut cmd); - let mut prefs = try!(self.profile.user_prefs()); - prefs.insert_slice(&FIREFOX_PREFERENCES[..]); - + let prefs = try!(self.profile.user_prefs()); try!(prefs.write()); let process = try!(cmd.spawn()); diff --git a/toolkit/components/telemetry/CombinedStacks.cpp b/toolkit/components/telemetry/CombinedStacks.cpp new file mode 100644 index 000000000000..83b97dea20a8 --- /dev/null +++ b/toolkit/components/telemetry/CombinedStacks.cpp @@ -0,0 +1,205 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* 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/. */ + +#include "CombinedStacks.h" +#include "HangAnnotations.h" +#include "mozilla/HangAnnotations.h" +#include "jsapi.h" + +namespace mozilla { +namespace Telemetry { + +// The maximum number of chrome hangs stacks that we're keeping. +const size_t kMaxChromeStacksKept = 50; + +CombinedStacks::CombinedStacks() + : CombinedStacks(kMaxChromeStacksKept) +{} + +CombinedStacks::CombinedStacks(size_t aMaxStacksCount) + : mNextIndex(0) + , mMaxStacksCount(aMaxStacksCount) +{} + +size_t +CombinedStacks::GetModuleCount() const { + return mModules.size(); +} + +const Telemetry::ProcessedStack::Module& +CombinedStacks::GetModule(unsigned aIndex) const { + return mModules[aIndex]; +} + +size_t +CombinedStacks::AddStack(const Telemetry::ProcessedStack& aStack) { + // Advance the indices of the circular queue holding the stacks. + size_t index = mNextIndex++ % mMaxStacksCount; + // Grow the vector up to the maximum size, if needed. + if (mStacks.size() < mMaxStacksCount) { + mStacks.resize(mStacks.size() + 1); + } + // Get a reference to the location holding the new stack. + CombinedStacks::Stack& adjustedStack = mStacks[index]; + // If we're using an old stack to hold aStack, clear it. + adjustedStack.clear(); + + size_t stackSize = aStack.GetStackSize(); + for (size_t i = 0; i < stackSize; ++i) { + const Telemetry::ProcessedStack::Frame& frame = aStack.GetFrame(i); + uint16_t modIndex; + if (frame.mModIndex == std::numeric_limits::max()) { + modIndex = frame.mModIndex; + } else { + const Telemetry::ProcessedStack::Module& module = + aStack.GetModule(frame.mModIndex); + std::vector::iterator modIterator = + std::find(mModules.begin(), mModules.end(), module); + if (modIterator == mModules.end()) { + mModules.push_back(module); + modIndex = mModules.size() - 1; + } else { + modIndex = modIterator - mModules.begin(); + } + } + Telemetry::ProcessedStack::Frame adjustedFrame = { frame.mOffset, modIndex }; + adjustedStack.push_back(adjustedFrame); + } + return index; +} + +const CombinedStacks::Stack& +CombinedStacks::GetStack(unsigned aIndex) const { + return mStacks[aIndex]; +} + +size_t +CombinedStacks::GetStackCount() const { + return mStacks.size(); +} + +size_t +CombinedStacks::SizeOfExcludingThis() const { + // This is a crude approximation. We would like to do something like + // aMallocSizeOf(&mModules[0]), but on linux aMallocSizeOf will call + // malloc_usable_size which is only safe on the pointers returned by malloc. + // While it works on current libstdc++, it is better to be safe and not assume + // that &vec[0] points to one. We could use a custom allocator, but + // it doesn't seem worth it. + size_t n = 0; + n += mModules.capacity() * sizeof(Telemetry::ProcessedStack::Module); + n += mStacks.capacity() * sizeof(Stack); + for (const auto & s : mStacks) { + n += s.capacity() * sizeof(Telemetry::ProcessedStack::Frame); + } + return n; +} + +#if defined(MOZ_GECKO_PROFILER) +void +CombinedStacks::Clear() { + mNextIndex = 0; + mStacks.clear(); + mModules.clear(); +} +#endif + +JSObject * +CreateJSStackObject(JSContext *cx, const CombinedStacks &stacks) { + JS::Rooted ret(cx, JS_NewPlainObject(cx)); + if (!ret) { + return nullptr; + } + + JS::Rooted moduleArray(cx, JS_NewArrayObject(cx, 0)); + if (!moduleArray) { + return nullptr; + } + bool ok = JS_DefineProperty(cx, ret, "memoryMap", moduleArray, + JSPROP_ENUMERATE); + if (!ok) { + return nullptr; + } + + const size_t moduleCount = stacks.GetModuleCount(); + for (size_t moduleIndex = 0; moduleIndex < moduleCount; ++moduleIndex) { + // Current module + const Telemetry::ProcessedStack::Module& module = + stacks.GetModule(moduleIndex); + + JS::Rooted moduleInfoArray(cx, JS_NewArrayObject(cx, 0)); + if (!moduleInfoArray) { + return nullptr; + } + if (!JS_DefineElement(cx, moduleArray, moduleIndex, moduleInfoArray, + JSPROP_ENUMERATE)) { + return nullptr; + } + + unsigned index = 0; + + // Module name + JS::Rooted str(cx, JS_NewUCStringCopyZ(cx, module.mName.get())); + if (!str || !JS_DefineElement(cx, moduleInfoArray, index++, str, JSPROP_ENUMERATE)) { + return nullptr; + } + + // Module breakpad identifier + JS::Rooted id(cx, JS_NewStringCopyZ(cx, module.mBreakpadId.c_str())); + if (!id || !JS_DefineElement(cx, moduleInfoArray, index++, id, JSPROP_ENUMERATE)) { + return nullptr; + } + } + + JS::Rooted reportArray(cx, JS_NewArrayObject(cx, 0)); + if (!reportArray) { + return nullptr; + } + ok = JS_DefineProperty(cx, ret, "stacks", reportArray, JSPROP_ENUMERATE); + if (!ok) { + return nullptr; + } + + const size_t length = stacks.GetStackCount(); + for (size_t i = 0; i < length; ++i) { + // Represent call stack PCs as (module index, offset) pairs. + JS::Rooted pcArray(cx, JS_NewArrayObject(cx, 0)); + if (!pcArray) { + return nullptr; + } + + if (!JS_DefineElement(cx, reportArray, i, pcArray, JSPROP_ENUMERATE)) { + return nullptr; + } + + const CombinedStacks::Stack& stack = stacks.GetStack(i); + const uint32_t pcCount = stack.size(); + for (size_t pcIndex = 0; pcIndex < pcCount; ++pcIndex) { + const Telemetry::ProcessedStack::Frame& frame = stack[pcIndex]; + JS::Rooted framePair(cx, JS_NewArrayObject(cx, 0)); + if (!framePair) { + return nullptr; + } + int modIndex = (std::numeric_limits::max() == frame.mModIndex) ? + -1 : frame.mModIndex; + if (!JS_DefineElement(cx, framePair, 0, modIndex, JSPROP_ENUMERATE)) { + return nullptr; + } + if (!JS_DefineElement(cx, framePair, 1, static_cast(frame.mOffset), + JSPROP_ENUMERATE)) { + return nullptr; + } + if (!JS_DefineElement(cx, pcArray, pcIndex, framePair, JSPROP_ENUMERATE)) { + return nullptr; + } + } + } + + return ret; +} + +} // namespace Telemetry +} // namespace mozilla diff --git a/toolkit/components/telemetry/CombinedStacks.h b/toolkit/components/telemetry/CombinedStacks.h new file mode 100644 index 000000000000..1bd8e23b6899 --- /dev/null +++ b/toolkit/components/telemetry/CombinedStacks.h @@ -0,0 +1,60 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */ +/* 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/. */ + +#ifndef CombinedStacks_h__ +#define CombinedStacks_h__ + +#include + +#include "ProcessedStack.h" + +class JSObject; +struct JSContext; + +namespace mozilla { +namespace Telemetry { + +/** + * This class is conceptually a list of ProcessedStack objects, but it represents them + * more efficiently by keeping a single global list of modules. + */ +class CombinedStacks { +public: + explicit CombinedStacks(); + explicit CombinedStacks(size_t aMaxStacksCount); + + typedef std::vector Stack; + const Telemetry::ProcessedStack::Module& GetModule(unsigned aIndex) const; + size_t GetModuleCount() const; + const Stack& GetStack(unsigned aIndex) const; + size_t AddStack(const Telemetry::ProcessedStack& aStack); + size_t GetStackCount() const; + size_t SizeOfExcludingThis() const; + +#if defined(MOZ_GECKO_PROFILER) + /** Clears the contents of vectors and resets the index. */ + void Clear(); +#endif + +private: + std::vector mModules; + // A circular buffer to hold the stacks. + std::vector mStacks; + // The index of the next buffer element to write to in mStacks. + size_t mNextIndex; + // The maximum number of stacks to keep in the CombinedStacks object. + size_t mMaxStacksCount; +}; + +/** + * Creates a JSON representation of given combined stacks object. + */ +JSObject * +CreateJSStackObject(JSContext *cx, const CombinedStacks &stacks); + +} // namespace Telemetry +} // namespace mozilla + +#endif // CombinedStacks_h__ diff --git a/toolkit/components/telemetry/HangReports.cpp b/toolkit/components/telemetry/HangReports.cpp new file mode 100644 index 000000000000..a093405fe7a9 --- /dev/null +++ b/toolkit/components/telemetry/HangReports.cpp @@ -0,0 +1,156 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* 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/. */ + +#include "HangReports.h" + +namespace mozilla { +namespace Telemetry { + +using namespace HangMonitor; + +/** The maximum number of stacks that we're keeping for hang reports. */ +const size_t kMaxHangStacksKept = 50; + +// This utility function generates a string key that is used to index the annotations +// in a hash map from |HangReports::AddHang|. +nsresult +ComputeAnnotationsKey(const HangAnnotationsPtr& aAnnotations, nsAString& aKeyOut) +{ + UniquePtr annotationsEnum = aAnnotations->GetEnumerator(); + if (!annotationsEnum) { + return NS_ERROR_FAILURE; + } + + // Append all the attributes to the key, to uniquely identify this annotation. + nsAutoString key; + nsAutoString value; + while (annotationsEnum->Next(key, value)) { + aKeyOut.Append(key); + aKeyOut.Append(value); + } + + return NS_OK; +} + +#if defined(MOZ_GECKO_PROFILER) +void +HangReports::AddHang(const Telemetry::ProcessedStack& aStack, + uint32_t aDuration, + int32_t aSystemUptime, + int32_t aFirefoxUptime, + HangAnnotationsPtr aAnnotations) { + // Append the new stack to the stack's circular queue. + size_t hangIndex = mStacks.AddStack(aStack); + // Append the hang info at the same index, in mHangInfo. + HangInfo info = { aDuration, aSystemUptime, aFirefoxUptime }; + if (mHangInfo.size() < kMaxHangStacksKept) { + mHangInfo.push_back(info); + } else { + mHangInfo[hangIndex] = info; + // Remove any reference to the stack overwritten in the circular queue + // from the annotations. + PruneStackReferences(hangIndex); + } + + if (!aAnnotations) { + return; + } + + nsAutoString annotationsKey; + // Generate a key to index aAnnotations in the hash map. + nsresult rv = ComputeAnnotationsKey(aAnnotations, annotationsKey); + if (NS_FAILED(rv)) { + return; + } + + AnnotationInfo* annotationsEntry = mAnnotationInfo.Get(annotationsKey); + if (annotationsEntry) { + // If the key is already in the hash map, append the index of the chrome hang + // to its indices. + annotationsEntry->mHangIndices.AppendElement(hangIndex); + return; + } + + // If the key was not found, add the annotations to the hash map. + mAnnotationInfo.Put(annotationsKey, new AnnotationInfo(hangIndex, Move(aAnnotations))); +} + +/** + * This function removes links to discarded chrome hangs stacks and prunes unused + * annotations. + */ +void +HangReports::PruneStackReferences(const size_t aRemovedStackIndex) { + // We need to adjust the indices that link annotations to chrome hangs. Since we + // removed a stack, we must remove all references to it and prune annotations + // linked to no stacks. + for (auto iter = mAnnotationInfo.Iter(); !iter.Done(); iter.Next()) { + nsTArray& stackIndices = iter.Data()->mHangIndices; + size_t toRemove = stackIndices.NoIndex; + for (size_t k = 0; k < stackIndices.Length(); k++) { + // Is this index referencing the removed stack? + if (stackIndices[k] == aRemovedStackIndex) { + toRemove = k; + break; + } + } + + // Remove the index referencing the old stack from the annotation. + if (toRemove != stackIndices.NoIndex) { + stackIndices.RemoveElementAt(toRemove); + } + + // If this annotation no longer references any stack, drop it. + if (!stackIndices.Length()) { + iter.Remove(); + } + } +} +#endif + +size_t +HangReports::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const { + size_t n = 0; + n += mStacks.SizeOfExcludingThis(); + // This is a crude approximation. See comment on + // CombinedStacks::SizeOfExcludingThis. + n += mHangInfo.capacity() * sizeof(HangInfo); + n += mAnnotationInfo.ShallowSizeOfExcludingThis(aMallocSizeOf); + n += mAnnotationInfo.Count() * sizeof(AnnotationInfo); + for (auto iter = mAnnotationInfo.ConstIter(); !iter.Done(); iter.Next()) { + n += iter.Key().SizeOfExcludingThisIfUnshared(aMallocSizeOf); + n += iter.Data()->mAnnotations->SizeOfIncludingThis(aMallocSizeOf); + } + return n; +} + +const CombinedStacks& +HangReports::GetStacks() const { + return mStacks; +} + +uint32_t +HangReports::GetDuration(unsigned aIndex) const { + return mHangInfo[aIndex].mDuration; +} + +int32_t +HangReports::GetSystemUptime(unsigned aIndex) const { + return mHangInfo[aIndex].mSystemUptime; +} + +int32_t +HangReports::GetFirefoxUptime(unsigned aIndex) const { + return mHangInfo[aIndex].mFirefoxUptime; +} + +const nsClassHashtable& +HangReports::GetAnnotationInfo() const { + return mAnnotationInfo; +} + +} // namespace Telemetry +} // namespace mozilla diff --git a/toolkit/components/telemetry/HangReports.h b/toolkit/components/telemetry/HangReports.h new file mode 100644 index 000000000000..0c635bc9cbc0 --- /dev/null +++ b/toolkit/components/telemetry/HangReports.h @@ -0,0 +1,90 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */ +/* 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/. */ + +#ifndef HangReports_h__ +#define HangReports_h__ + +#include +#include "mozilla/HangAnnotations.h" +#include "ProcessedStack.h" +#include "nsTArray.h" +#include "nsString.h" +#include "nsClassHashtable.h" +#include "CombinedStacks.h" + +namespace mozilla { +namespace Telemetry { + +nsresult +ComputeAnnotationsKey(const HangMonitor::HangAnnotationsPtr& aAnnotations, nsAString& aKeyOut); + +class HangReports { +public: + /** + * This struct encapsulates information for an individual ChromeHang annotation. + * mHangIndex is the index of the corresponding ChromeHang. + */ + struct AnnotationInfo { + AnnotationInfo(uint32_t aHangIndex, + HangMonitor::HangAnnotationsPtr aAnnotations) + : mAnnotations(Move(aAnnotations)) + { + mHangIndices.AppendElement(aHangIndex); + } + AnnotationInfo(AnnotationInfo&& aOther) + : mHangIndices(aOther.mHangIndices) + , mAnnotations(Move(aOther.mAnnotations)) + {} + ~AnnotationInfo() = default; + AnnotationInfo& operator=(AnnotationInfo&& aOther) + { + mHangIndices = aOther.mHangIndices; + mAnnotations = Move(aOther.mAnnotations); + return *this; + } + // To save memory, a single AnnotationInfo can be associated to multiple chrome + // hangs. The following array holds the index of each related chrome hang. + nsTArray mHangIndices; + HangMonitor::HangAnnotationsPtr mAnnotations; + + private: + // Force move constructor + AnnotationInfo(const AnnotationInfo& aOther) = delete; + void operator=(const AnnotationInfo& aOther) = delete; + }; + size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const; +#if defined(MOZ_GECKO_PROFILER) + void AddHang(const Telemetry::ProcessedStack& aStack, uint32_t aDuration, + int32_t aSystemUptime, int32_t aFirefoxUptime, + HangMonitor::HangAnnotationsPtr aAnnotations); + void PruneStackReferences(const size_t aRemovedStackIndex); +#endif + uint32_t GetDuration(unsigned aIndex) const; + int32_t GetSystemUptime(unsigned aIndex) const; + int32_t GetFirefoxUptime(unsigned aIndex) const; + const nsClassHashtable& GetAnnotationInfo() const; + const CombinedStacks& GetStacks() const; +private: + /** + * This struct encapsulates the data for an individual ChromeHang, excluding + * annotations. + */ + struct HangInfo { + // Hang duration (in seconds) + uint32_t mDuration; + // System uptime (in minutes) at the time of the hang + int32_t mSystemUptime; + // Firefox uptime (in minutes) at the time of the hang + int32_t mFirefoxUptime; + }; + std::vector mHangInfo; + nsClassHashtable mAnnotationInfo; + CombinedStacks mStacks; +}; + +} // namespace Telemetry +} // namespace mozilla + +#endif // CombinedStacks_h__ diff --git a/toolkit/components/telemetry/Histograms.json b/toolkit/components/telemetry/Histograms.json index f02df3e8d5fc..114d81164b53 100644 --- a/toolkit/components/telemetry/Histograms.json +++ b/toolkit/components/telemetry/Histograms.json @@ -5803,6 +5803,17 @@ "releaseChannelCollection": "opt-out", "description": "Update: the update wizard page displayed when the UI was closed (mapped in toolkit/mozapps/update/UpdateTelemetry.jsm)" }, + "UPTAKE_REMOTE_CONTENT_RESULT_1": { + "record_in_processes": ["all"], + "expires_in_version": "never", + "kind": "categorical", + "keyed": true, + "labels": ["up_to_date", "success", "backoff", "pref_disabled", "parse_error", "content_error", "sign_error", "sign_retry_error", "conflict_error", "sync_error", "apply_error", "server_error", "certificate_error", "download_error", "timeout_error", "network_error", "offline_error", "cleanup_error", "unknown_error", "custom_1_error", "custom_2_error", "custom_3_error", "custom_4_error", "custom_5_error"], + "releaseChannelCollection": "opt-out", + "alert_emails": ["storage-team@mozilla.com"], + "bug_numbers": [1254099], + "description": "Generic histogram to track uptake of remote content like blocklists, settings or updates." + }, "UPDATE_NOTIFICATION_SHOWN": { "record_in_processes": ["main", "content"], "alert_emails": ["application-update-telemetry-alerts@mozilla.com"], @@ -7161,13 +7172,33 @@ "TELEMETRY_ARCHIVE_LOAD_MS": { "record_in_processes": ["main"], "alert_emails": ["telemetry-client-dev@mozilla.com", "chutten@mozilla.com"], - "expires_in_version": "never", + "expires_in_version": "61", "kind": "exponential", "high": 2000, "n_buckets": 20, "bug_numbers": [1033860], "description": "Time (ms) it takes for loading archived pings from disk" }, + "TELEMETRY_SUCCESSFUL_SEND_PINGS_SIZE_KB": { + "record_in_processes": ["main"], + "alert_emails": ["telemetry-client-dev@mozilla.com"], + "expires_in_version": "61", + "kind": "exponential", + "low": 10, + "high": 1024, + "n_buckets": 20, + "description": "The size (KB) of the Telemetry successfully sent pings" + }, + "TELEMETRY_FAILED_SEND_PINGS_SIZE_KB": { + "record_in_processes": ["main"], + "alert_emails": ["telemetry-client-dev@mozilla.com"], + "expires_in_version": "never", + "kind": "exponential", + "low": 10, + "high": 1024, + "n_buckets": 20, + "description": "The size (KB) of the Telemetry unsuccessfully sent pings" + }, "TELEMETRY_PING_SIZE_EXCEEDED_SEND": { "record_in_processes": ["main", "content"], "alert_emails": ["telemetry-client-dev@mozilla.com"], @@ -10067,15 +10098,6 @@ "releaseChannelCollection": "opt-out", "description": "True if the browser was unable to set Firefox as the default browser" }, - "BROWSER_SET_DEFAULT_TIME_TO_COMPLETION_SECONDS": { - "record_in_processes": ["main", "content"], - "expires_in_version": "never", - "kind": "exponential", - "high": 500, - "n_buckets": 15, - "releaseChannelCollection": "opt-out", - "description": "Time to successfully set Firefox as the default browser after clicking 'Set Firefox as Default'. Should be near-instant in some environments, others require user interaction. Measured in seconds." - }, "BROWSER_IS_ASSIST_DEFAULT": { "record_in_processes": ["main", "content"], "expires_in_version": "never", diff --git a/toolkit/components/telemetry/KeyedStackCapturer.cpp b/toolkit/components/telemetry/KeyedStackCapturer.cpp new file mode 100644 index 000000000000..25479485fcd9 --- /dev/null +++ b/toolkit/components/telemetry/KeyedStackCapturer.cpp @@ -0,0 +1,167 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* 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/. */ + +#include "KeyedStackCapturer.h" +#include "nsPrintfCString.h" +#include "mozilla/StackWalk.h" +#include "ProcessedStack.h" +#include "jsapi.h" + +namespace { + +#if defined(MOZ_GECKO_PROFILER) + +/** Defines the size of the keyed stack dictionary. */ +const uint8_t kMaxKeyLength = 50; + +/** The maximum number of captured stacks that we're keeping. */ +const size_t kMaxCapturedStacksKept = 50; + +/** + * Checks if a single character of the key string is valid. + * + * @param aChar a character to validate. + * @return True, if the char is valid, False - otherwise. + */ +bool +IsKeyCharValid(const char aChar) +{ + return (aChar >= 'A' && aChar <= 'Z') + || (aChar >= 'a' && aChar <= 'z') + || (aChar >= '0' && aChar <= '9') + || aChar == '-'; +} + +/** + * Checks if a given string is a valid telemetry key. + * + * @param aKey is the key string. + * @return True, if the key is valid, False - otherwise. + */ +bool +IsKeyValid(const nsACString& aKey) +{ + // Check key length. + if (aKey.Length() > kMaxKeyLength) { + return false; + } + + // Check key characters. + const char* cur = aKey.BeginReading(); + const char* end = aKey.EndReading(); + + for (; cur < end; ++cur) { + if (!IsKeyCharValid(*cur)) { + return false; + } + } + return true; +} + +} // anonymous namespace + +namespace mozilla { +namespace Telemetry { + +void KeyedStackCapturer::Capture(const nsACString& aKey) { + MutexAutoLock captureStackMutex(mStackCapturerMutex); + + // Check if the key is ok. + if (!IsKeyValid(aKey)) { + NS_WARNING(nsPrintfCString( + "Invalid key is used to capture stack in telemetry: '%s'", + PromiseFlatCString(aKey).get() + ).get()); + return; + } + + // Trying to find and update the stack information. + StackFrequencyInfo* info = mStackInfos.Get(aKey); + if (info) { + // We already recorded this stack before, only increase the count. + info->mCount++; + return; + } + + // Check if we have room for new captures. + if (mStackInfos.Count() >= kMaxCapturedStacksKept) { + // Addressed by Bug 1316793. + return; + } + + // We haven't captured a stack for this key before, do it now. + // Note that this does a stackwalk and is an expensive operation. + std::vector rawStack; + auto callback = [](uint32_t, void* aPC, void*, void* aClosure) { + std::vector* stack = + static_cast*>(aClosure); + stack->push_back(reinterpret_cast(aPC)); + }; + MozStackWalk(callback, /* skipFrames */ 0, + /* maxFrames */ 0, reinterpret_cast(&rawStack), 0, nullptr); + ProcessedStack stack = GetStackAndModules(rawStack); + + // Store the new stack info. + size_t stackIndex = mStacks.AddStack(stack); + mStackInfos.Put(aKey, new StackFrequencyInfo(1, stackIndex)); +} + +NS_IMETHODIMP +KeyedStackCapturer::ReflectCapturedStacks(JSContext *cx, JS::MutableHandle ret) +{ + MutexAutoLock capturedStackMutex(mStackCapturerMutex); + + // this adds the memoryMap and stacks properties. + JS::RootedObject fullReportObj(cx, CreateJSStackObject(cx, mStacks)); + if (!fullReportObj) { + return NS_ERROR_FAILURE; + } + + JS::RootedObject keysArray(cx, JS_NewArrayObject(cx, 0)); + if (!keysArray) { + return NS_ERROR_FAILURE; + } + + bool ok = JS_DefineProperty(cx, fullReportObj, "captures", + keysArray, JSPROP_ENUMERATE); + if (!ok) { + return NS_ERROR_FAILURE; + } + + size_t keyIndex = 0; + for (auto iter = mStackInfos.ConstIter(); !iter.Done(); iter.Next(), ++keyIndex) { + const StackFrequencyInfo* info = iter.Data(); + + JS::RootedObject infoArray(cx, JS_NewArrayObject(cx, 0)); + if (!keysArray) { + return NS_ERROR_FAILURE; + } + JS::RootedString str(cx, JS_NewStringCopyZ(cx, + PromiseFlatCString(iter.Key()).get())); + if (!str || + !JS_DefineElement(cx, infoArray, 0, str, JSPROP_ENUMERATE) || + !JS_DefineElement(cx, infoArray, 1, info->mIndex, JSPROP_ENUMERATE) || + !JS_DefineElement(cx, infoArray, 2, info->mCount, JSPROP_ENUMERATE) || + !JS_DefineElement(cx, keysArray, keyIndex, infoArray, JSPROP_ENUMERATE)) { + return NS_ERROR_FAILURE; + } + } + + ret.setObject(*fullReportObj); + return NS_OK; +} + +void +KeyedStackCapturer::Clear() +{ + MutexAutoLock captureStackMutex(mStackCapturerMutex); + mStackInfos.Clear(); + mStacks.Clear(); +} +#endif + +} // namespace Telemetry +} // namespace mozilla diff --git a/toolkit/components/telemetry/KeyedStackCapturer.h b/toolkit/components/telemetry/KeyedStackCapturer.h new file mode 100644 index 000000000000..77f17a613948 --- /dev/null +++ b/toolkit/components/telemetry/KeyedStackCapturer.h @@ -0,0 +1,79 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */ +/* 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/. */ + +#ifndef KeyedStackCapturer_h__ +#define KeyedStackCapturer_h__ + +#ifdef MOZ_GECKO_PROFILER + +#include "Telemetry.h" +#include "nsString.h" +#include "nsClassHashtable.h" +#include "mozilla/Mutex.h" +#include "CombinedStacks.h" + +struct JSContext; + +namespace mozilla { +namespace Telemetry { + +/** +* Allows taking a snapshot of a call stack on demand. Captured stacks are +* indexed by a string key in a hash table. The stack is only captured Once +* for each key. Consequent captures with the same key result in incrementing +* capture counter without re-capturing the stack. +*/ +class KeyedStackCapturer +{ +public: + KeyedStackCapturer() + : mStackCapturerMutex("Telemetry::StackCapturerMutex") + {} + + /** + * Captures a stack for the given key. + */ + void Capture(const nsACString& aKey); + + /** + * Transforms captured stacks into a JS object. + */ + NS_IMETHODIMP ReflectCapturedStacks( + JSContext *cx, JS::MutableHandle ret); + + /** + * Resets captured stacks and the information related to them. + */ + void Clear(); + +private: + /** + * Describes how often a stack was captured. + */ + struct StackFrequencyInfo { + // A number of times the stack was captured. + uint32_t mCount; + // Index of the stack inside stacks array. + uint32_t mIndex; + + StackFrequencyInfo(uint32_t aCount, uint32_t aIndex) + : mCount(aCount) + , mIndex(aIndex) + {} + }; + + typedef nsClassHashtable FrequencyInfoMapType; + + FrequencyInfoMapType mStackInfos; + CombinedStacks mStacks; + Mutex mStackCapturerMutex; +}; + +} // namespace Telemetry +} // namespace mozilla + +#endif // MOZ_GECKO_PROFILER + +#endif // KeyedStackCapturer_h__ diff --git a/toolkit/components/telemetry/Telemetry.cpp b/toolkit/components/telemetry/Telemetry.cpp index f1dca09a2186..4864f400a21a 100644 --- a/toolkit/components/telemetry/Telemetry.cpp +++ b/toolkit/components/telemetry/Telemetry.cpp @@ -84,12 +84,11 @@ #include "mozilla/HangMonitor.h" #include "nsNativeCharsetUtils.h" #include "nsProxyRelease.h" +#include "HangReports.h" #if defined(MOZ_GECKO_PROFILER) #include "shared-libraries.h" -#define ENABLE_STACK_CAPTURE -#include "mozilla/StackWalk.h" -#include "nsPrintfCString.h" +#include "KeyedStackCapturer.h" #endif // MOZ_GECKO_PROFILER namespace { @@ -99,516 +98,10 @@ using namespace mozilla::HangMonitor; using Telemetry::Common::AutoHashtable; using mozilla::dom::Promise; using mozilla::dom::AutoJSAPI; - -// The maximum number of chrome hangs stacks that we're keeping. -const size_t kMaxChromeStacksKept = 50; -// The maximum depth of a single chrome hang stack. -const size_t kMaxChromeStackDepth = 50; - -// This class is conceptually a list of ProcessedStack objects, but it represents them -// more efficiently by keeping a single global list of modules. -class CombinedStacks { -public: - explicit CombinedStacks(size_t aMaxStacksCount = kMaxChromeStacksKept) - : mNextIndex(0) - , mMaxStacksCount(aMaxStacksCount) - {} - - typedef std::vector Stack; - const Telemetry::ProcessedStack::Module& GetModule(unsigned aIndex) const; - size_t GetModuleCount() const; - const Stack& GetStack(unsigned aIndex) const; - size_t AddStack(const Telemetry::ProcessedStack& aStack); - size_t GetStackCount() const; - size_t SizeOfExcludingThis() const; - -#if defined(ENABLE_STACK_CAPTURE) - /** Clears the contents of vectors and resets the index. */ - void Clear(); -#endif -private: - std::vector mModules; - // A circular buffer to hold the stacks. - std::vector mStacks; - // The index of the next buffer element to write to in mStacks. - size_t mNextIndex; - // The maximum number of stacks to keep in the CombinedStacks object. - size_t mMaxStacksCount; -}; - -static JSObject * -CreateJSStackObject(JSContext *cx, const CombinedStacks &stacks); - -size_t -CombinedStacks::GetModuleCount() const { - return mModules.size(); -} - -const Telemetry::ProcessedStack::Module& -CombinedStacks::GetModule(unsigned aIndex) const { - return mModules[aIndex]; -} - -size_t -CombinedStacks::AddStack(const Telemetry::ProcessedStack& aStack) { - // Advance the indices of the circular queue holding the stacks. - size_t index = mNextIndex++ % mMaxStacksCount; - // Grow the vector up to the maximum size, if needed. - if (mStacks.size() < mMaxStacksCount) { - mStacks.resize(mStacks.size() + 1); - } - // Get a reference to the location holding the new stack. - CombinedStacks::Stack& adjustedStack = mStacks[index]; - // If we're using an old stack to hold aStack, clear it. - adjustedStack.clear(); - - size_t stackSize = aStack.GetStackSize(); - for (size_t i = 0; i < stackSize; ++i) { - const Telemetry::ProcessedStack::Frame& frame = aStack.GetFrame(i); - uint16_t modIndex; - if (frame.mModIndex == std::numeric_limits::max()) { - modIndex = frame.mModIndex; - } else { - const Telemetry::ProcessedStack::Module& module = - aStack.GetModule(frame.mModIndex); - std::vector::iterator modIterator = - std::find(mModules.begin(), mModules.end(), module); - if (modIterator == mModules.end()) { - mModules.push_back(module); - modIndex = mModules.size() - 1; - } else { - modIndex = modIterator - mModules.begin(); - } - } - Telemetry::ProcessedStack::Frame adjustedFrame = { frame.mOffset, modIndex }; - adjustedStack.push_back(adjustedFrame); - } - return index; -} - -const CombinedStacks::Stack& -CombinedStacks::GetStack(unsigned aIndex) const { - return mStacks[aIndex]; -} - -size_t -CombinedStacks::GetStackCount() const { - return mStacks.size(); -} - -size_t -CombinedStacks::SizeOfExcludingThis() const { - // This is a crude approximation. We would like to do something like - // aMallocSizeOf(&mModules[0]), but on linux aMallocSizeOf will call - // malloc_usable_size which is only safe on the pointers returned by malloc. - // While it works on current libstdc++, it is better to be safe and not assume - // that &vec[0] points to one. We could use a custom allocator, but - // it doesn't seem worth it. - size_t n = 0; - n += mModules.capacity() * sizeof(Telemetry::ProcessedStack::Module); - n += mStacks.capacity() * sizeof(Stack); - for (const auto & s : mStacks) { - n += s.capacity() * sizeof(Telemetry::ProcessedStack::Frame); - } - return n; -} - -// This utility function generates a string key that is used to index the annotations -// in a hash map from |HangReports::AddHang|. -nsresult -ComputeAnnotationsKey(const HangAnnotationsPtr& aAnnotations, nsAString& aKeyOut) -{ - UniquePtr annotationsEnum = aAnnotations->GetEnumerator(); - if (!annotationsEnum) { - return NS_ERROR_FAILURE; - } - - // Append all the attributes to the key, to uniquely identify this annotation. - nsAutoString key; - nsAutoString value; - while (annotationsEnum->Next(key, value)) { - aKeyOut.Append(key); - aKeyOut.Append(value); - } - - return NS_OK; -} - -#if defined(ENABLE_STACK_CAPTURE) -void -CombinedStacks::Clear() { - mNextIndex = 0; - mStacks.clear(); - mModules.clear(); -} -#endif - -class HangReports { -public: - /** - * This struct encapsulates information for an individual ChromeHang annotation. - * mHangIndex is the index of the corresponding ChromeHang. - */ - struct AnnotationInfo { - AnnotationInfo(uint32_t aHangIndex, - HangAnnotationsPtr aAnnotations) - : mAnnotations(Move(aAnnotations)) - { - mHangIndices.AppendElement(aHangIndex); - } - AnnotationInfo(AnnotationInfo&& aOther) - : mHangIndices(aOther.mHangIndices) - , mAnnotations(Move(aOther.mAnnotations)) - {} - ~AnnotationInfo() = default; - AnnotationInfo& operator=(AnnotationInfo&& aOther) - { - mHangIndices = aOther.mHangIndices; - mAnnotations = Move(aOther.mAnnotations); - return *this; - } - // To save memory, a single AnnotationInfo can be associated to multiple chrome - // hangs. The following array holds the index of each related chrome hang. - nsTArray mHangIndices; - HangAnnotationsPtr mAnnotations; - - private: - // Force move constructor - AnnotationInfo(const AnnotationInfo& aOther) = delete; - void operator=(const AnnotationInfo& aOther) = delete; - }; - size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const; -#if defined(MOZ_GECKO_PROFILER) - void AddHang(const Telemetry::ProcessedStack& aStack, uint32_t aDuration, - int32_t aSystemUptime, int32_t aFirefoxUptime, - HangAnnotationsPtr aAnnotations); - void PruneStackReferences(const size_t aRemovedStackIndex); -#endif - uint32_t GetDuration(unsigned aIndex) const; - int32_t GetSystemUptime(unsigned aIndex) const; - int32_t GetFirefoxUptime(unsigned aIndex) const; - const nsClassHashtable& GetAnnotationInfo() const; - const CombinedStacks& GetStacks() const; -private: - /** - * This struct encapsulates the data for an individual ChromeHang, excluding - * annotations. - */ - struct HangInfo { - // Hang duration (in seconds) - uint32_t mDuration; - // System uptime (in minutes) at the time of the hang - int32_t mSystemUptime; - // Firefox uptime (in minutes) at the time of the hang - int32_t mFirefoxUptime; - }; - std::vector mHangInfo; - nsClassHashtable mAnnotationInfo; - CombinedStacks mStacks; -}; - -#if defined(MOZ_GECKO_PROFILER) -void -HangReports::AddHang(const Telemetry::ProcessedStack& aStack, - uint32_t aDuration, - int32_t aSystemUptime, - int32_t aFirefoxUptime, - HangAnnotationsPtr aAnnotations) { - // Append the new stack to the stack's circular queue. - size_t hangIndex = mStacks.AddStack(aStack); - // Append the hang info at the same index, in mHangInfo. - HangInfo info = { aDuration, aSystemUptime, aFirefoxUptime }; - if (mHangInfo.size() < kMaxChromeStacksKept) { - mHangInfo.push_back(info); - } else { - mHangInfo[hangIndex] = info; - // Remove any reference to the stack overwritten in the circular queue - // from the annotations. - PruneStackReferences(hangIndex); - } - - if (!aAnnotations) { - return; - } - - nsAutoString annotationsKey; - // Generate a key to index aAnnotations in the hash map. - nsresult rv = ComputeAnnotationsKey(aAnnotations, annotationsKey); - if (NS_FAILED(rv)) { - return; - } - - AnnotationInfo* annotationsEntry = mAnnotationInfo.Get(annotationsKey); - if (annotationsEntry) { - // If the key is already in the hash map, append the index of the chrome hang - // to its indices. - annotationsEntry->mHangIndices.AppendElement(hangIndex); - return; - } - - // If the key was not found, add the annotations to the hash map. - mAnnotationInfo.Put(annotationsKey, new AnnotationInfo(hangIndex, Move(aAnnotations))); -} - -/** - * This function removes links to discarded chrome hangs stacks and prunes unused - * annotations. - */ -void -HangReports::PruneStackReferences(const size_t aRemovedStackIndex) { - // We need to adjust the indices that link annotations to chrome hangs. Since we - // removed a stack, we must remove all references to it and prune annotations - // linked to no stacks. - for (auto iter = mAnnotationInfo.Iter(); !iter.Done(); iter.Next()) { - nsTArray& stackIndices = iter.Data()->mHangIndices; - size_t toRemove = stackIndices.NoIndex; - for (size_t k = 0; k < stackIndices.Length(); k++) { - // Is this index referencing the removed stack? - if (stackIndices[k] == aRemovedStackIndex) { - toRemove = k; - break; - } - } - - // Remove the index referencing the old stack from the annotation. - if (toRemove != stackIndices.NoIndex) { - stackIndices.RemoveElementAt(toRemove); - } - - // If this annotation no longer references any stack, drop it. - if (!stackIndices.Length()) { - iter.Remove(); - } - } -} -#endif - -size_t -HangReports::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const { - size_t n = 0; - n += mStacks.SizeOfExcludingThis(); - // This is a crude approximation. See comment on - // CombinedStacks::SizeOfExcludingThis. - n += mHangInfo.capacity() * sizeof(HangInfo); - n += mAnnotationInfo.ShallowSizeOfExcludingThis(aMallocSizeOf); - n += mAnnotationInfo.Count() * sizeof(AnnotationInfo); - for (auto iter = mAnnotationInfo.ConstIter(); !iter.Done(); iter.Next()) { - n += iter.Key().SizeOfExcludingThisIfUnshared(aMallocSizeOf); - n += iter.Data()->mAnnotations->SizeOfIncludingThis(aMallocSizeOf); - } - return n; -} - -const CombinedStacks& -HangReports::GetStacks() const { - return mStacks; -} - -uint32_t -HangReports::GetDuration(unsigned aIndex) const { - return mHangInfo[aIndex].mDuration; -} - -int32_t -HangReports::GetSystemUptime(unsigned aIndex) const { - return mHangInfo[aIndex].mSystemUptime; -} - -int32_t -HangReports::GetFirefoxUptime(unsigned aIndex) const { - return mHangInfo[aIndex].mFirefoxUptime; -} - -const nsClassHashtable& -HangReports::GetAnnotationInfo() const { - return mAnnotationInfo; -} - -#if defined(ENABLE_STACK_CAPTURE) - -const uint8_t kMaxKeyLength = 50; - -/** - * Checks if a single character of the key string is valid. - * - * @param aChar a character to validate. - * @return True, if the char is valid, False - otherwise. - */ -bool -IsKeyCharValid(const char aChar) -{ - return (aChar >= 'A' && aChar <= 'Z') - || (aChar >= 'a' && aChar <= 'z') - || (aChar >= '0' && aChar <= '9') - || aChar == '-'; -} - -/** - * Checks if a given string is a valid telemetry key. - * - * @param aKey is the key string. - * @return True, if the key is valid, False - otherwise. - */ -bool -IsKeyValid(const nsACString& aKey) -{ - // Check key length. - if (aKey.Length() > kMaxKeyLength) { - return false; - } - - // Check key characters. - const char* cur = aKey.BeginReading(); - const char* end = aKey.EndReading(); - - for (; cur < end; ++cur) { - if (!IsKeyCharValid(*cur)) { - return false; - } - } - return true; -} - -/** - * Allows taking a snapshot of a call stack on demand. Captured stacks are - * indexed by a string key in a hash table. The stack is only captured Once - * for each key. Consequent captures with the same key result in incrementing - * capture counter without re-capturing the stack. - */ -class KeyedStackCapturer { -public: - KeyedStackCapturer(); - - void Capture(const nsACString& aKey); - NS_IMETHODIMP ReflectCapturedStacks(JSContext *cx, JS::MutableHandle ret); - - /** - * Resets captured stacks and the information related to them. - */ - void Clear(); -private: - /** - * Describes how often a stack was captured. - */ - struct StackFrequencyInfo { - // A number of times the stack was captured. - uint32_t mCount; - // Index of the stack inside stacks array. - uint32_t mIndex; - - StackFrequencyInfo(uint32_t aCount, uint32_t aIndex) - : mCount(aCount) - , mIndex(aIndex) - {} - }; - - typedef nsClassHashtable FrequencyInfoMapType; - - FrequencyInfoMapType mStackInfos; - CombinedStacks mStacks; - Mutex mStackCapturerMutex; -}; - -KeyedStackCapturer::KeyedStackCapturer() - : mStackCapturerMutex("Telemetry::StackCapturerMutex") -{} - -void KeyedStackCapturer::Capture(const nsACString& aKey) { - MutexAutoLock captureStackMutex(mStackCapturerMutex); - - // Check if the key is ok. - if (!IsKeyValid(aKey)) { - NS_WARNING(nsPrintfCString( - "Invalid key is used to capture stack in telemetry: '%s'", - PromiseFlatCString(aKey).get() - ).get()); - return; - } - - // Trying to find and update the stack information. - StackFrequencyInfo* info = mStackInfos.Get(aKey); - if (info) { - // We already recorded this stack before, only increase the count. - info->mCount++; - return; - } - - // Check if we have room for new captures. - if (mStackInfos.Count() >= kMaxChromeStacksKept) { - // Addressed by Bug 1316793. - return; - } - - // We haven't captured a stack for this key before, do it now. - // Note that this does a stackwalk and is an expensive operation. - std::vector rawStack; - auto callback = [](uint32_t, void* aPC, void*, void* aClosure) { - std::vector* stack = - static_cast*>(aClosure); - stack->push_back(reinterpret_cast(aPC)); - }; - MozStackWalk(callback, /* skipFrames */ 0, - /* maxFrames */ 0, reinterpret_cast(&rawStack), 0, nullptr); - Telemetry::ProcessedStack stack = Telemetry::GetStackAndModules(rawStack); - - // Store the new stack info. - size_t stackIndex = mStacks.AddStack(stack); - mStackInfos.Put(aKey, new StackFrequencyInfo(1, stackIndex)); -} - -NS_IMETHODIMP -KeyedStackCapturer::ReflectCapturedStacks(JSContext *cx, JS::MutableHandle ret) -{ - MutexAutoLock capturedStackMutex(mStackCapturerMutex); - - // this adds the memoryMap and stacks properties. - JS::RootedObject fullReportObj(cx, CreateJSStackObject(cx, mStacks)); - if (!fullReportObj) { - return NS_ERROR_FAILURE; - } - - JS::RootedObject keysArray(cx, JS_NewArrayObject(cx, 0)); - if (!keysArray) { - return NS_ERROR_FAILURE; - } - - bool ok = JS_DefineProperty(cx, fullReportObj, "captures", - keysArray, JSPROP_ENUMERATE); - if (!ok) { - return NS_ERROR_FAILURE; - } - - size_t keyIndex = 0; - for (auto iter = mStackInfos.ConstIter(); !iter.Done(); iter.Next(), ++keyIndex) { - const StackFrequencyInfo* info = iter.Data(); - - JS::RootedObject infoArray(cx, JS_NewArrayObject(cx, 0)); - if (!keysArray) { - return NS_ERROR_FAILURE; - } - JS::RootedString str(cx, JS_NewStringCopyZ(cx, - PromiseFlatCString(iter.Key()).get())); - if (!str || - !JS_DefineElement(cx, infoArray, 0, str, JSPROP_ENUMERATE) || - !JS_DefineElement(cx, infoArray, 1, info->mIndex, JSPROP_ENUMERATE) || - !JS_DefineElement(cx, infoArray, 2, info->mCount, JSPROP_ENUMERATE) || - !JS_DefineElement(cx, keysArray, keyIndex, infoArray, JSPROP_ENUMERATE)) { - return NS_ERROR_FAILURE; - } - } - - ret.setObject(*fullReportObj); - return NS_OK; -} - -void -KeyedStackCapturer::Clear() -{ - MutexAutoLock captureStackMutex(mStackCapturerMutex); - mStackInfos.Clear(); - mStacks.Clear(); -} -#endif +using mozilla::Telemetry::HangReports; +using mozilla::Telemetry::KeyedStackCapturer; +using mozilla::Telemetry::CombinedStacks; +using mozilla::Telemetry::ComputeAnnotationsKey; /** * IOInterposeObserver recording statistics of main-thread I/O during execution, @@ -770,7 +263,7 @@ void TelemetryIOInterposeObserver::Observe(Observation& aOb) // Get the filename const char16_t* filename = aOb.Filename(); - + // Discard observations without filename if (!filename) { return; @@ -914,7 +407,7 @@ public: int32_t aFirefoxUptime, HangAnnotationsPtr aAnnotations); #endif -#if defined(ENABLE_STACK_CAPTURE) +#if defined(MOZ_GECKO_PROFILER) static void DoStackCapture(const nsACString& aKey); #endif static void RecordThreadHangStats(Telemetry::ThreadHangStats& aStats); @@ -967,7 +460,7 @@ private: Atomic mCanRecordBase; Atomic mCanRecordExtended; -#if defined(ENABLE_STACK_CAPTURE) +#if defined(MOZ_GECKO_PROFILER) // Stores data about stacks captured on demand. KeyedStackCapturer mStackCapturer; #endif @@ -1081,7 +574,7 @@ public: NS_IMETHOD Run() override { LoadFailedLockCount(mTelemetry->mFailedLockCount); - mTelemetry->mLastShutdownTime = + mTelemetry->mLastShutdownTime = ReadLastShutdownDuration(mShutdownTimeFilename); mTelemetry->ReadLateWritesStacks(mProfileDir); nsCOMPtr e = @@ -1541,7 +1034,7 @@ TelemetryImpl::GetChromeHangs(JSContext *cx, JS::MutableHandle ret) NS_IMETHODIMP TelemetryImpl::SnapshotCapturedStacks(bool clear, JSContext *cx, JS::MutableHandle ret) { -#if defined(ENABLE_STACK_CAPTURE) +#if defined(MOZ_GECKO_PROFILER) nsresult rv = mStackCapturer.ReflectCapturedStacks(cx, ret); if (clear) { mStackCapturer.Clear(); @@ -1552,100 +1045,6 @@ TelemetryImpl::SnapshotCapturedStacks(bool clear, JSContext *cx, JS::MutableHand #endif } -static JSObject * -CreateJSStackObject(JSContext *cx, const CombinedStacks &stacks) { - JS::Rooted ret(cx, JS_NewPlainObject(cx)); - if (!ret) { - return nullptr; - } - - JS::Rooted moduleArray(cx, JS_NewArrayObject(cx, 0)); - if (!moduleArray) { - return nullptr; - } - bool ok = JS_DefineProperty(cx, ret, "memoryMap", moduleArray, - JSPROP_ENUMERATE); - if (!ok) { - return nullptr; - } - - const size_t moduleCount = stacks.GetModuleCount(); - for (size_t moduleIndex = 0; moduleIndex < moduleCount; ++moduleIndex) { - // Current module - const Telemetry::ProcessedStack::Module& module = - stacks.GetModule(moduleIndex); - - JS::Rooted moduleInfoArray(cx, JS_NewArrayObject(cx, 0)); - if (!moduleInfoArray) { - return nullptr; - } - if (!JS_DefineElement(cx, moduleArray, moduleIndex, moduleInfoArray, - JSPROP_ENUMERATE)) { - return nullptr; - } - - unsigned index = 0; - - // Module name - JS::Rooted str(cx, JS_NewUCStringCopyZ(cx, module.mName.get())); - if (!str || !JS_DefineElement(cx, moduleInfoArray, index++, str, JSPROP_ENUMERATE)) { - return nullptr; - } - - // Module breakpad identifier - JS::Rooted id(cx, JS_NewStringCopyZ(cx, module.mBreakpadId.c_str())); - if (!id || !JS_DefineElement(cx, moduleInfoArray, index++, id, JSPROP_ENUMERATE)) { - return nullptr; - } - } - - JS::Rooted reportArray(cx, JS_NewArrayObject(cx, 0)); - if (!reportArray) { - return nullptr; - } - ok = JS_DefineProperty(cx, ret, "stacks", reportArray, JSPROP_ENUMERATE); - if (!ok) { - return nullptr; - } - - const size_t length = stacks.GetStackCount(); - for (size_t i = 0; i < length; ++i) { - // Represent call stack PCs as (module index, offset) pairs. - JS::Rooted pcArray(cx, JS_NewArrayObject(cx, 0)); - if (!pcArray) { - return nullptr; - } - - if (!JS_DefineElement(cx, reportArray, i, pcArray, JSPROP_ENUMERATE)) { - return nullptr; - } - - const CombinedStacks::Stack& stack = stacks.GetStack(i); - const uint32_t pcCount = stack.size(); - for (size_t pcIndex = 0; pcIndex < pcCount; ++pcIndex) { - const Telemetry::ProcessedStack::Frame& frame = stack[pcIndex]; - JS::Rooted framePair(cx, JS_NewArrayObject(cx, 0)); - if (!framePair) { - return nullptr; - } - int modIndex = (std::numeric_limits::max() == frame.mModIndex) ? - -1 : frame.mModIndex; - if (!JS_DefineElement(cx, framePair, 0, modIndex, JSPROP_ENUMERATE)) { - return nullptr; - } - if (!JS_DefineElement(cx, framePair, 1, static_cast(frame.mOffset), - JSPROP_ENUMERATE)) { - return nullptr; - } - if (!JS_DefineElement(cx, pcArray, pcIndex, framePair, JSPROP_ENUMERATE)) { - return nullptr; - } - } - } - - return ret; -} - #if defined(MOZ_GECKO_PROFILER) class GetLoadedModulesResultRunnable final : public Runnable { @@ -2674,7 +2073,7 @@ TelemetryImpl::RecordChromeHang(uint32_t aDuration, Move(annotations)); } -#if defined(ENABLE_STACK_CAPTURE) +#if defined(MOZ_GECKO_PROFILER) void TelemetryImpl::DoStackCapture(const nsACString& aKey) { if (Telemetry::CanRecordExtended() && XRE_IsParentProcess()) { @@ -2686,7 +2085,7 @@ TelemetryImpl::DoStackCapture(const nsACString& aKey) { nsresult TelemetryImpl::CaptureStack(const nsACString& aKey) { -#if defined(ENABLE_STACK_CAPTURE) +#if defined(MOZ_GECKO_PROFILER) TelemetryImpl::DoStackCapture(aKey); #endif return NS_OK; @@ -3057,6 +2456,8 @@ RecordShutdownEndTimeStamp() { namespace mozilla { namespace Telemetry { +const size_t kMaxChromeStackDepth = 50; + ProcessedStack::ProcessedStack() = default; size_t ProcessedStack::GetStackSize() const @@ -3381,7 +2782,7 @@ void RecordChromeHang(uint32_t duration, void CaptureStack(const nsACString& aKey) { -#if defined(ENABLE_STACK_CAPTURE) +#if defined(MOZ_GECKO_PROFILER) TelemetryImpl::DoStackCapture(aKey); #endif } diff --git a/toolkit/components/telemetry/TelemetrySend.jsm b/toolkit/components/telemetry/TelemetrySend.jsm index 6179aac4c047..cc1eb77108c4 100644 --- a/toolkit/components/telemetry/TelemetrySend.jsm +++ b/toolkit/components/telemetry/TelemetrySend.jsm @@ -1101,8 +1101,12 @@ var TelemetrySendImpl = { let onRequestFinished = (success, event) => { let onCompletion = () => { if (success) { + let histogram = Telemetry.getHistogramById("TELEMETRY_SUCCESSFUL_SEND_PINGS_SIZE_KB"); + histogram.add(compressedPingSizeKB); deferred.resolve(); } else { + let histogram = Telemetry.getHistogramById("TELEMETRY_FAILED_SEND_PINGS_SIZE_KB"); + histogram.add(compressedPingSizeKB); deferred.reject(event); } }; @@ -1187,6 +1191,8 @@ var TelemetrySendImpl = { .createInstance(Ci.nsIStringInputStream); startTime = new Date(); payloadStream.data = gzipCompressString(utf8Payload); + + const compressedPingSizeKB = Math.floor(payloadStream.data.length / 1024); Telemetry.getHistogramById("TELEMETRY_COMPRESS").add(new Date() - startTime); startTime = new Date(); request.send(payloadStream); diff --git a/toolkit/components/telemetry/docs/collection/histograms.rst b/toolkit/components/telemetry/docs/collection/histograms.rst index 51379b45420d..36b29a4ddb38 100644 --- a/toolkit/components/telemetry/docs/collection/histograms.rst +++ b/toolkit/components/telemetry/docs/collection/histograms.rst @@ -85,6 +85,8 @@ Flag histograms will ignore any changes after the flag is set, so once the flag This histogram type is used when you want to record a count of something. It only stores a single value and defaults to `0`. +.. _histogram-type-keyed: + Keyed Histograms ---------------- diff --git a/toolkit/components/telemetry/docs/collection/index.rst b/toolkit/components/telemetry/docs/collection/index.rst index 49fda29768a9..a94f7a3811a8 100644 --- a/toolkit/components/telemetry/docs/collection/index.rst +++ b/toolkit/components/telemetry/docs/collection/index.rst @@ -22,6 +22,7 @@ The current data collection possibilities include: * :doc:`stack capture ` allow recording application call stacks * :doc:`Use counters ` measure the usage of web platform features * :doc:`Experiment annotations ` +* :doc:`Remote content uptake ` .. toctree:: :maxdepth: 2 @@ -36,6 +37,7 @@ The current data collection possibilities include: custom-pings stack-capture experiments + uptake * Browser Usage Telemetry diff --git a/toolkit/components/telemetry/docs/collection/uptake.rst b/toolkit/components/telemetry/docs/collection/uptake.rst new file mode 100644 index 000000000000..3364ebadfc0a --- /dev/null +++ b/toolkit/components/telemetry/docs/collection/uptake.rst @@ -0,0 +1,93 @@ +================ +Uptake Telemetry +================ + +Firefox continuously pulls data from different remote sources (eg. settings, system add-ons, …). In order to have consistent insights about the *uptake rate* of these *update sources*, our clients can use a unified Telemetry helper to report their *update status*. + +The helper — described below — reports predefined update status, which eventually gives a unified way to obtain: + +* the proportion of success among clients; +* its evolution over time; +* the distribution of error causes. + +.. notes:: + + Examples of update sources: *remote settings, addons update, addons, gfx, and plugins blocklists, certificate revocation, certificate pinning, system addons delivery…* + + Examples of update status: *up-to-date, success, network error, server error, signature error, server backoff, unknown error…* + + +Usage +----- + +.. code-block:: js + + const { UptakeTelemetry } = Cu.import("resource://services-common/uptake-telemetry.js", {}); + + UptakeTelemetry.report(source, status); + +- ``source`` - a ``string`` that is an identifier for the update source (eg. ``addons-blocklist``) +- ``status`` - one of the following status constants: + - ``UptakeTelemetry.STATUS.UP_TO_DATE``: Local content was already up-to-date with remote content. + - ``UptakeTelemetry.STATUS.SUCCESS``: Local content was updated successfully. + - ``UptakeTelemetry.STATUS.BACKOFF``: Remote server asked clients to backoff. + - ``UptakeTelemetry.STATUS.PREF_DISABLED``: Update is disabled in user preferences. + - ``UptakeTelemetry.STATUS.PARSE_ERROR``: Parsing server response has failed. + - ``UptakeTelemetry.STATUS.CONTENT_ERROR``: Server response has unexpected content. + - ``UptakeTelemetry.STATUS.SIGNATURE_ERROR``: Signature verification after diff-based sync has failed. + - ``UptakeTelemetry.STATUS.SIGNATURE_RETRY_ERROR``: Signature verification after full fetch has failed. + - ``UptakeTelemetry.STATUS.CONFLICT_ERROR``: Some remote changes are in conflict with local changes. + - ``UptakeTelemetry.STATUS.SYNC_ERROR``: Synchronization of remote changes has failed. + - ``UptakeTelemetry.STATUS.APPLY_ERROR``: Application of changes locally has failed. + - ``UptakeTelemetry.STATUS.SERVER_ERROR``: Server failed to respond. + - ``UptakeTelemetry.STATUS.CERTIFICATE_ERROR``: Server certificate verification has failed. + - ``UptakeTelemetry.STATUS.DOWNLOAD_ERROR``: Data could not be fully retrieved. + - ``UptakeTelemetry.STATUS.TIMEOUT_ERROR``: Server response has timed out. + - ``UptakeTelemetry.STATUS.NETWORK_ERROR``: Communication with server has failed. + - ``UptakeTelemetry.STATUS.NETWORK_OFFLINE_ERROR``: Network not available. + - ``UptakeTelemetry.STATUS.CLEANUP_ERROR``: Clean-up of temporary files has failed. + - ``UptakeTelemetry.STATUS.UNKNOWN_ERROR``: Uncategorized error. + - ``UptakeTelemetry.STATUS.CUSTOM_1_ERROR``: Error #1 specific to this update source. + - ``UptakeTelemetry.STATUS.CUSTOM_2_ERROR``: Error #2 specific to this update source. + - ``UptakeTelemetry.STATUS.CUSTOM_3_ERROR``: Error #3 specific to this update source. + - ``UptakeTelemetry.STATUS.CUSTOM_4_ERROR``: Error #4 specific to this update source. + - ``UptakeTelemetry.STATUS.CUSTOM_5_ERROR``: Error #5 specific to this update source. + + +The data is submitted to a single :ref:`keyed histogram ` whose id is ``UPTAKE_REMOTE_CONTENT_RESULT_1`` and the specified update ``source`` as the key. + +Example: + +.. code-block:: js + + const UPDATE_SOURCE = "update-monitoring"; + + let status; + try { + const data = await fetch(uri); + status = UptakeTelemetry.STATUS.SUCCESS; + } catch (e) { + status = /NetworkError/.test(e) ? + UptakeTelemetry.STATUS.NETWORK_ERROR : + UptakeTelemetry.STATUS.SERVER_ERROR ; + } + UptakeTelemetry.report(UPDATE_SOURCE, status); + + +Use-cases +--------- + +The following remote data sources are already using this unified histogram. + +* remote settings changes monitoring +* add-ons blocklist +* gfx blocklist +* plugins blocklist +* certificate revocation +* certificate pinning + +Obviously, the goal is to eventually converge and avoid ad-hoc Telemetry probes for measuring uptake of remote content. Some notable potential use-cases are: + +* nsUpdateService +* mozapps extensions update +* Shield recipe client diff --git a/toolkit/components/telemetry/docs/data/crash-ping.rst b/toolkit/components/telemetry/docs/data/crash-ping.rst index c291f5bd30bf..f70226174744 100644 --- a/toolkit/components/telemetry/docs/data/crash-ping.rst +++ b/toolkit/components/telemetry/docs/data/crash-ping.rst @@ -45,6 +45,7 @@ Structure: ReleaseChannel: , Version: , BuildID: "YYYYMMDDHHMMSS", + AsyncShutdownTimeout: , // Optional, present when a shutdown blocker failed to respond within a reasonable amount of time AvailablePageFile: , // Windows-only, available paging file AvailablePhysicalMemory: , // Windows-only, available physical memory AvailableVirtualMemory: , // Windows-only, available virtual memory @@ -58,6 +59,7 @@ Structure: OOMAllocationSize: , // Size of the allocation that caused an OOM RemoteType: , // Optional, type of content process, see below for a list of types SecondsSinceLastCrash: , // Seconds elapsed since the last crash occurred + ShutdownProgress: , // Optional, contains the shutdown phase in which the crash occurred SystemMemoryUsePercentage: , // Windows-only, percent of memory in use TelemetrySessionId: , // Active telemetry session ID when the crash was recorded TextureUsage: , // Optional, usage of texture memory in bytes diff --git a/toolkit/components/telemetry/histogram-whitelists.json b/toolkit/components/telemetry/histogram-whitelists.json index 02bbfd9ec480..43e0d365a2db 100644 --- a/toolkit/components/telemetry/histogram-whitelists.json +++ b/toolkit/components/telemetry/histogram-whitelists.json @@ -18,7 +18,6 @@ "BROWSER_SET_DEFAULT_DIALOG_PROMPT_RAWCOUNT", "BROWSER_SET_DEFAULT_ERROR", "BROWSER_SET_DEFAULT_RESULT", - "BROWSER_SET_DEFAULT_TIME_TO_COMPLETION_SECONDS", "BR_9_2_1_SUBJECT_ALT_NAMES", "BR_9_2_2_SUBJECT_COMMON_NAME", "CACHE_DEVICE_SEARCH_2", @@ -657,7 +656,6 @@ "BROWSER_SET_DEFAULT_DIALOG_PROMPT_RAWCOUNT", "BROWSER_SET_DEFAULT_ERROR", "BROWSER_SET_DEFAULT_RESULT", - "BROWSER_SET_DEFAULT_TIME_TO_COMPLETION_SECONDS", "BR_9_2_1_SUBJECT_ALT_NAMES", "BR_9_2_2_SUBJECT_COMMON_NAME", "BUCKET_ORDER_ERRORS", diff --git a/toolkit/components/telemetry/moz.build b/toolkit/components/telemetry/moz.build index 283be48b77c7..c8d5b177d205 100644 --- a/toolkit/components/telemetry/moz.build +++ b/toolkit/components/telemetry/moz.build @@ -53,8 +53,11 @@ EXPORTS.mozilla += [ ] SOURCES += [ + 'CombinedStacks.cpp', + 'HangReports.cpp', 'ipc/TelemetryIPC.cpp', 'ipc/TelemetryIPCAccumulator.cpp', + 'KeyedStackCapturer.cpp', 'Telemetry.cpp', 'TelemetryCommon.cpp', 'TelemetryEvent.cpp', diff --git a/toolkit/components/telemetry/tests/unit/test_TelemetrySend.js b/toolkit/components/telemetry/tests/unit/test_TelemetrySend.js index aebfe9e937f2..6b348ed71e28 100644 --- a/toolkit/components/telemetry/tests/unit/test_TelemetrySend.js +++ b/toolkit/components/telemetry/tests/unit/test_TelemetrySend.js @@ -7,6 +7,7 @@ "use strict"; Cu.import("resource://gre/modules/TelemetryController.jsm", this); +Cu.import("resource://testing-common/ContentTaskUtils.jsm", this); Cu.import("resource://gre/modules/TelemetrySession.jsm", this); Cu.import("resource://gre/modules/TelemetrySend.jsm", this); Cu.import("resource://gre/modules/TelemetryStorage.jsm", this); @@ -468,6 +469,55 @@ add_task(async function test_sendCheckOverride() { Preferences.reset(PREF_OVERRIDE_OFFICIAL_CHECK); }); +add_task(async function test_measurePingsSize() { + const TEST_TYPE = "test-measure-ping-size"; + + let histSuccessPingSize = Telemetry.getHistogramById("TELEMETRY_SUCCESSFUL_SEND_PINGS_SIZE_KB"); + let histFailedPingSize = Telemetry.getHistogramById("TELEMETRY_FAILED_SEND_PINGS_SIZE_KB"); + + for (let h of [histSuccessPingSize, histFailedPingSize]) { + h.clear(); + } + + await TelemetryController.submitExternalPing(TEST_TYPE, {}); + await TelemetrySend.testWaitOnOutgoingPings(); + + // Check that we recorded the ping sizes correctly into histograms. + Assert.equal(histogramValueCount(histSuccessPingSize.snapshot()), 1, + "Should have recorded 1 successful ping into histogram."); + Assert.equal(histogramValueCount(histFailedPingSize.snapshot()), 0, + "Should have recorded 0 failed ping into histogram."); + + // Submit the same ping a second time. + await TelemetryController.submitExternalPing(TEST_TYPE, {}); + await TelemetrySend.testWaitOnOutgoingPings(); + + // Check that we recorded the ping sizes correctly into histograms. + Assert.equal(histogramValueCount(histSuccessPingSize.snapshot()), 2, + "Should have recorded 2 successful ping into histogram."); + Assert.equal(histogramValueCount(histFailedPingSize.snapshot()), 0, + "Should have recorded 0 failed ping into histogram."); + + // Register a custom ping handler which will return 601. + PingServer.registerPingHandler((req, res) => { + res.setStatusLine(null, 601, "Not Implemented"); + res.processAsync(); + res.finish(); + }); + + await TelemetryController.submitExternalPing(TEST_TYPE, {}); + await ContentTaskUtils.waitForCondition(() => { + return histogramValueCount(histFailedPingSize.snapshot()) > 0; + }); + + // Check that we recorded the ping sizes correctly into histograms. + Assert.equal(histogramValueCount(histSuccessPingSize.snapshot()), 2, + "Should have recorded 2 successful ping into histogram."); + Assert.equal(histogramValueCount(histFailedPingSize.snapshot()), 1, + "Should have recorded 1 failed ping into histogram."); +}); + + add_task(async function cleanup() { await PingServer.stop(); }); diff --git a/toolkit/content/aboutTelemetry.js b/toolkit/content/aboutTelemetry.js index 78152e6e8b17..51fafee1fefc 100644 --- a/toolkit/content/aboutTelemetry.js +++ b/toolkit/content/aboutTelemetry.js @@ -236,13 +236,7 @@ var Settings = { } else { // Show the data choices preferences on desktop. let mainWindow = getMainWindowWithPreferencesPane(); - // The advanced subpanes are only supported in the old organization, which will - // be removed by bug 1349689. - if (Preferences.get("browser.preferences.useOldOrganization")) { - mainWindow.openAdvancedPreferences("dataChoicesTab", {origin: "aboutTelemetry"}); - } else { - mainWindow.openPreferences("paneAdvanced", {origin: "aboutTelemetry"}); - } + mainWindow.openPreferences("privacy-reports", {origin: "aboutTelemetry"}); } }); } diff --git a/toolkit/crashreporter/client/ping.cpp b/toolkit/crashreporter/client/ping.cpp index 76c584647cde..e3839e6475db 100644 --- a/toolkit/crashreporter/client/ping.cpp +++ b/toolkit/crashreporter/client/ping.cpp @@ -122,6 +122,7 @@ CreateMetadataNode(StringTable& strings) { // The following list should be kept in sync with the one in CrashManager.jsm const char *entries[] = { + "AsyncShutdownTimeout", "AvailablePageFile", "AvailablePhysicalMemory", "AvailableVirtualMemory", @@ -139,9 +140,9 @@ CreateMetadataNode(StringTable& strings) "ReleaseChannel", "RemoteType", "SecondsSinceLastCrash", + "ShutdownProgress", "StartupCrash", "SystemMemoryUsePercentage", - "TelemetrySessionId", "TextureUsage", "TotalPageFile", "TotalPhysicalMemory", diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build index 650f6eaba980..1df0a7d688f0 100644 --- a/toolkit/library/moz.build +++ b/toolkit/library/moz.build @@ -177,14 +177,6 @@ if CONFIG['MOZ_WMF']: 'strmiids', ] -if CONFIG['MOZ_DIRECTSHOW']: - OS_LIBS += [ - 'dmoguids', - 'wmcodecdspuuid', - 'strmiids', - 'msdmo', - ] - if CONFIG['OS_ARCH'] == 'FreeBSD': OS_LIBS += [ 'util', diff --git a/toolkit/themes/linux/global/toolbarbutton.css b/toolkit/themes/linux/global/toolbarbutton.css index c28d64d13c70..dd466389fc63 100644 --- a/toolkit/themes/linux/global/toolbarbutton.css +++ b/toolkit/themes/linux/global/toolbarbutton.css @@ -16,7 +16,6 @@ toolbarbutton { -moz-box-pack: center; margin: 0; padding: 3px; - color: -moz-DialogText; } toolbarbutton:-moz-lwtheme { @@ -63,7 +62,6 @@ toolbarbutton[checked="true"]:not(:hover) { } toolbarbutton:-moz-lwtheme:not(:hover):not([checked="true"]):not([open="true"]):not([disabled="true"]) { - color: inherit; text-shadow: inherit; } diff --git a/toolkit/themes/osx/global/toolbarbutton.css b/toolkit/themes/osx/global/toolbarbutton.css index ab24387e3c40..68649a40a778 100644 --- a/toolkit/themes/osx/global/toolbarbutton.css +++ b/toolkit/themes/osx/global/toolbarbutton.css @@ -29,7 +29,7 @@ toolbarbutton[disabled="true"], toolbarbutton[disabled="true"]:hover, toolbarbutton[disabled="true"]:hover:active, toolbarbutton[disabled="true"][open="true"] { - color: -moz-mac-disabledtoolbartext !important; + color: -moz-mac-disabledtoolbartext; } /* ::::: toolbarbutton menu ::::: */ diff --git a/toolkit/themes/windows/global/toolbarbutton.css b/toolkit/themes/windows/global/toolbarbutton.css index e2c8c9f6d571..3976746579be 100644 --- a/toolkit/themes/windows/global/toolbarbutton.css +++ b/toolkit/themes/windows/global/toolbarbutton.css @@ -16,7 +16,6 @@ toolbarbutton { -moz-box-pack: center; margin: 0; padding: 3px; - color: -moz-DialogText; } .toolbarbutton-icon[label]:not([label=""]), @@ -76,7 +75,6 @@ toolbarbutton[checked="true"]:not([disabled="true"]) { } toolbarbutton:-moz-lwtheme:not([disabled="true"]) { - color: inherit; text-shadow: inherit; } } @@ -87,7 +85,6 @@ toolbarbutton[checked="true"]:not([disabled="true"]) { } toolbarbutton:-moz-lwtheme:not([disabled="true"]) { - color: inherit; text-shadow: inherit; } } diff --git a/widget/gtk/nsClipboard.cpp b/widget/gtk/nsClipboard.cpp index 315d2be27e1c..d2f82e41d459 100644 --- a/widget/gtk/nsClipboard.cpp +++ b/widget/gtk/nsClipboard.cpp @@ -246,7 +246,8 @@ nsClipboard::SetData(nsITransferable *aTransferable, GtkTargetEntry *gtkTargets = gtk_target_table_new_from_list(list, &numTargets); // Set getcallback and request to store data after an application exit - if (gtk_clipboard_set_with_data(gtkClipboard, gtkTargets, numTargets, + if (gtkTargets && + gtk_clipboard_set_with_data(gtkClipboard, gtkTargets, numTargets, clipboard_get_cb, clipboard_clear_cb, this)) { // We managed to set-up the clipboard so update internal state diff --git a/xpcom/base/nsIClassInfoImpl.h b/xpcom/base/nsIClassInfoImpl.h index 9158af0f703e..087be78483ab 100644 --- a/xpcom/base/nsIClassInfoImpl.h +++ b/xpcom/base/nsIClassInfoImpl.h @@ -156,13 +156,15 @@ NS_CI_INTERFACE_GETTER_NAME(_class)(uint32_t *count, nsIID ***array) \ } #define NS_IMPL_CI_INTERFACE_GETTER(aClass, ...) \ - NS_CLASSINFO_HELPER_BEGIN(aClass, \ - MOZ_PASTE_PREFIX_AND_ARG_COUNT(/* No prefix */, \ - __VA_ARGS__)) \ + static_assert(MOZ_ARG_COUNT(__VA_ARGS__) > 0, \ + "Need more arguments to NS_IMPL_CI_INTERFACE_GETTER"); \ + NS_CLASSINFO_HELPER_BEGIN(aClass, MOZ_ARG_COUNT(__VA_ARGS__)) \ MOZ_FOR_EACH(NS_CLASSINFO_HELPER_ENTRY, (), (__VA_ARGS__)) \ NS_CLASSINFO_HELPER_END #define NS_IMPL_QUERY_INTERFACE_CI(aClass, ...) \ + static_assert(MOZ_ARG_COUNT(__VA_ARGS__) > 0, \ + "Need more arguments to NS_IMPL_QUERY_INTERFACE_CI"); \ NS_INTERFACE_MAP_BEGIN(aClass) \ MOZ_FOR_EACH(NS_INTERFACE_MAP_ENTRY, (), (__VA_ARGS__)) \ NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, MOZ_ARG_1(__VA_ARGS__)) \ diff --git a/xpcom/base/nsISupportsImpl.h b/xpcom/base/nsISupportsImpl.h index 6896ef6de44d..ecc2f47c6421 100644 --- a/xpcom/base/nsISupportsImpl.h +++ b/xpcom/base/nsISupportsImpl.h @@ -960,6 +960,8 @@ NS_IMETHODIMP _class::QueryInterface(REFNSIID aIID, void** aInstancePtr) \ NS_INTERFACE_TABLE_END #define NS_INTERFACE_TABLE(aClass, ...) \ + static_assert(MOZ_ARG_COUNT(__VA_ARGS__) > 0, \ + "Need more arguments to NS_INTERFACE_TABLE"); \ NS_INTERFACE_TABLE_BEGIN \ MOZ_FOR_EACH(NS_INTERFACE_TABLE_ENTRY, (aClass,), (__VA_ARGS__)) \ NS_INTERFACE_TABLE_ENTRY_AMBIGUOUS(aClass, nsISupports, \ @@ -1040,6 +1042,8 @@ NS_IMETHODIMP_(MozExternalRefCountType) Class::Release(void) \ #define NS_INTERFACE_TABLE_INHERITED0(Class) /* Nothing to do here */ #define NS_INTERFACE_TABLE_INHERITED(aClass, ...) \ + static_assert(MOZ_ARG_COUNT(__VA_ARGS__) > 0, \ + "Need more arguments to NS_INTERFACE_TABLE_INHERITED"); \ NS_INTERFACE_TABLE_BEGIN \ MOZ_FOR_EACH(NS_INTERFACE_TABLE_ENTRY, (aClass,), (__VA_ARGS__)) \ NS_INTERFACE_TABLE_END diff --git a/xpcom/threads/MozPromise.h b/xpcom/threads/MozPromise.h index 68f4516de82a..a9f180ccaa16 100644 --- a/xpcom/threads/MozPromise.h +++ b/xpcom/threads/MozPromise.h @@ -20,7 +20,7 @@ #include "nsTArray.h" #include "nsThreadUtils.h" -#if defined(DEBUG) || !defined(RELEASE_OR_BETA) +#if MOZ_DIAGNOSTIC_ASSERT_ENABLED #define PROMISE_DEBUG #endif