mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 08:42:13 +00:00
Merge inbound to mozilla-central. a=merge
This commit is contained in:
commit
499182b91a
@ -2,4 +2,21 @@
|
||||
* 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/. */
|
||||
|
||||
/* aboutconfig.css */
|
||||
#list {
|
||||
margin: 0;
|
||||
padding: 2em;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
#list > li {
|
||||
padding: 5px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#list > li:nth-child(even) {
|
||||
background-color: rgba(0, 0, 0, .06);
|
||||
}
|
||||
|
||||
#list > li:nth-child(odd) {
|
||||
background-color: rgba(0, 0, 0, .03);
|
||||
}
|
||||
|
@ -2,20 +2,21 @@
|
||||
- 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/. -->
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" media="screen, projection" type="text/css"
|
||||
href="chrome://global/skin/in-content/common.css"/>
|
||||
href="chrome://global/skin/in-content/common.css">
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="chrome://browser/content/aboutconfig/aboutconfig.css"/>
|
||||
href="chrome://browser/content/aboutconfig/aboutconfig.css">
|
||||
<link rel="localization" href="browser/aboutConfig.ftl">
|
||||
<script type="application/javascript"
|
||||
src="chrome://browser/content/aboutconfig/aboutconfig.js"></script>
|
||||
<title data-l10n-id="about-config-title"></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body onload="onLoad();">
|
||||
<ul id="list"></ul>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
@ -2,4 +2,28 @@
|
||||
* 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/. */
|
||||
|
||||
/* aboutconfig.js */
|
||||
ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||
ChromeUtils.import("resource://gre/modules/Preferences.jsm");
|
||||
|
||||
let gPrefArray;
|
||||
|
||||
function onLoad() {
|
||||
gPrefArray = Services.prefs.getChildList("").map(name => ({
|
||||
name,
|
||||
value: Preferences.get(name),
|
||||
hasUserValue: Services.prefs.prefHasUserValue(name),
|
||||
}));
|
||||
|
||||
gPrefArray.sort((a, b) => a.name > b.name);
|
||||
|
||||
let fragment = document.createDocumentFragment();
|
||||
|
||||
for (let pref of gPrefArray) {
|
||||
let listItem = document.createElement("li");
|
||||
listItem.textContent = pref.name + " || " +
|
||||
(pref.hasUserValue ? "Modified" : "Default") + " || " +
|
||||
pref.value.constructor.name + " || " + pref.value;
|
||||
fragment.appendChild(listItem);
|
||||
}
|
||||
document.getElementById("list").appendChild(fragment);
|
||||
}
|
||||
|
@ -1,10 +1,12 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
const PAGE_URL = "chrome://browser/content/aboutconfig/aboutconfig.html";
|
||||
|
||||
add_task(async function test_load_title() {
|
||||
await BrowserTestUtils.withNewTab({
|
||||
gBrowser,
|
||||
url: "chrome://browser/content/aboutconfig/aboutconfig.html",
|
||||
url: PAGE_URL,
|
||||
}, browser => {
|
||||
info("about:config loaded");
|
||||
return ContentTask.spawn(browser, null, async () => {
|
||||
@ -13,3 +15,21 @@ add_task(async function test_load_title() {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
add_task(async function test_load_settings() {
|
||||
await BrowserTestUtils.withNewTab({
|
||||
gBrowser,
|
||||
url: PAGE_URL,
|
||||
}, browser => {
|
||||
return ContentTask.spawn(browser, null, () => {
|
||||
let list = [...content.document.getElementById("list")
|
||||
.getElementsByTagName("li")];
|
||||
function findPref(name) {
|
||||
return list.some(e => e.textContent.trim().startsWith(name + " "));
|
||||
}
|
||||
Assert.ok(findPref("plugins.testmode"));
|
||||
Assert.ok(findPref("dom.vr.enabled"));
|
||||
Assert.ok(findPref("accessibility.AOM.enabled"));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,9 +1,9 @@
|
||||
This is the debugger.html project output.
|
||||
See https://github.com/devtools-html/debugger.html
|
||||
|
||||
Version 96
|
||||
Version 97
|
||||
|
||||
Comparison: https://github.com/devtools-html/debugger.html/compare/release-95...release-96
|
||||
Comparison: https://github.com/devtools-html/debugger.html/compare/release-96...release-97
|
||||
|
||||
Packages:
|
||||
- babel-plugin-transform-es2015-modules-commonjs @6.26.2
|
||||
|
76
devtools/client/debugger/new/dist/debugger.css
vendored
76
devtools/client/debugger/new/dist/debugger.css
vendored
@ -2666,49 +2666,54 @@ menuseparator {
|
||||
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
|
||||
|
||||
.call-site {
|
||||
background: #f0f9ff;
|
||||
position: relative;
|
||||
border-bottom: 2px solid lightgrey;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.call-site::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: calc(100% - 2px);
|
||||
border-bottom: 2px solid #aed3ef;
|
||||
mask: url("chrome://devtools/skin/images/debugger/column-marker.svg") no-repeat 100% 100%;
|
||||
mask-size: contain;
|
||||
display: inline-block;
|
||||
background-color: var(--blue-55);
|
||||
opacity: 0.5;
|
||||
width: 9px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.call-site-bp {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.debug-expression.call-site-bp,
|
||||
.call-site-bp {
|
||||
background-color: #fce7e7;
|
||||
border-bottom: 2px solid #aed3ef;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.call-site-bp::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: calc(100% - 2px);
|
||||
border-bottom: 2px solid red;
|
||||
mask: url("chrome://devtools/skin/images/debugger/column-marker.svg") no-repeat 100% 100%;
|
||||
mask-size: contain;
|
||||
display: inline-block;
|
||||
background-color: var(--blue-55);
|
||||
width: 9px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
.theme-dark .call-site {
|
||||
background-color: #4b5462;
|
||||
}
|
||||
|
||||
.theme-dark .call-site::before {
|
||||
border-bottom-color: #5f78a4;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.theme-dark .call-site-bp {
|
||||
background-color: #4b3f3f;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.theme-dark .call-site::before {
|
||||
background-color: var(--blue-60);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.theme-dark .call-site-bp::before {
|
||||
border-bottom-color: #dd4d4d;
|
||||
background-color: var(--blue-50);
|
||||
opacity: 0.5;
|
||||
}
|
||||
/* 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
|
||||
@ -3418,6 +3423,12 @@ html[dir="rtl"] .breakpoints-list .breakpoint .breakpoint-line {
|
||||
.frames ul .frames-group .group .location {
|
||||
font-weight: 500;
|
||||
cursor: default;
|
||||
/*
|
||||
* direction:rtl is set in Frames.css to overflow the location text from the
|
||||
* start. Here we need to reset it in order to display the framework icon
|
||||
* after the framework name.
|
||||
*/
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
.frames ul .frames-group.expanded .group,
|
||||
@ -3500,13 +3511,16 @@ html[dir="rtl"] .breakpoints-list .breakpoint .breakpoint-line {
|
||||
}
|
||||
|
||||
.frames ul li {
|
||||
padding: 0 10px 0 21px;
|
||||
padding: 7px 10px 7px 21px;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
column-gap: 0.5em;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin: 0;
|
||||
max-width: 100%;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.frames ul li * {
|
||||
@ -3521,12 +3535,15 @@ html[dir="rtl"] .breakpoints-list .breakpoint .breakpoint-line {
|
||||
|
||||
.frames .location {
|
||||
font-weight: normal;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin: 0;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 1;
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
/* Trick to get the ellipsis at the start of the string */
|
||||
text-overflow: ellipsis;
|
||||
direction: rtl;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.theme-light .frames .location {
|
||||
@ -3541,7 +3558,6 @@ html[dir="rtl"] .breakpoints-list .breakpoint .breakpoint-line {
|
||||
.frames .title {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
margin: 7px 0.5em 7px 0;
|
||||
}
|
||||
|
||||
.frames ul li:hover,
|
||||
@ -3587,9 +3603,9 @@ html[dir="rtl"] .breakpoints-list .breakpoint .breakpoint-line {
|
||||
}
|
||||
|
||||
.annotation-logo {
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
margin-left: 3px;
|
||||
line-height: 8px;
|
||||
margin-inline-start: 4px;
|
||||
}
|
||||
|
||||
:root.theme-dark .annotation-logo svg path {
|
||||
|
8
devtools/client/debugger/new/dist/vendors.js
vendored
8
devtools/client/debugger/new/dist/vendors.js
vendored
@ -2201,6 +2201,7 @@ const svg = {
|
||||
breadcrumb: __webpack_require__(3603),
|
||||
breakpoint: __webpack_require__(350),
|
||||
"column-breakpoint": __webpack_require__(998),
|
||||
"column-marker": __webpack_require__(3801),
|
||||
"case-match": __webpack_require__(351),
|
||||
choo: __webpack_require__(1290),
|
||||
close: __webpack_require__(352),
|
||||
@ -7528,6 +7529,13 @@ function createStructuredSelector(selectors) {
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 3801:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = "<svg viewBox=\"0 0 9 12\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><g id=\"columnmarkergroup\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"><polygon id=\"columnmarker\" fill=\"#1B1B1D\" points=\"0 0 4 0 9 6 4 12 0 12\"></polygon></g></svg>"
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 4:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
|
@ -255,7 +255,9 @@ function debuggeeCommand(script) {
|
||||
}
|
||||
|
||||
function navigate(url) {
|
||||
return tabTarget.activeTab.navigateTo({ url });
|
||||
return tabTarget.activeTab.navigateTo({
|
||||
url
|
||||
});
|
||||
}
|
||||
|
||||
function reload() {
|
||||
@ -465,4 +467,4 @@ const clientCommands = {
|
||||
setSkipPausing
|
||||
};
|
||||
exports.setupCommands = setupCommands;
|
||||
exports.clientCommands = clientCommands;
|
||||
exports.clientCommands = clientCommands;
|
@ -41,8 +41,8 @@ function setupEvents(dependencies) {
|
||||
});
|
||||
|
||||
if (threadClient._parent) {
|
||||
// Parent may be BrowsingContextTargetFront/WorkerTargetFront and be protocol.js.
|
||||
// Or DebuggerClient and still be old fashion actor.
|
||||
// Parent may be BrowsingContextTargetFront/WorkerTargetFront and
|
||||
// be protocol.js. Or DebuggerClient and still be old fashion actor.
|
||||
if (threadClient._parent.on) {
|
||||
threadClient._parent.on("workerListChanged", workerListChanged);
|
||||
} else {
|
||||
@ -119,4 +119,4 @@ const clientEvents = {
|
||||
newSource
|
||||
};
|
||||
exports.setupEvents = setupEvents;
|
||||
exports.clientEvents = clientEvents;
|
||||
exports.clientEvents = clientEvents;
|
@ -223,10 +223,16 @@ class SearchBar extends _react.Component {
|
||||
});
|
||||
return _react2.default.createElement("button", {
|
||||
className: preppedClass,
|
||||
onClick: () => {
|
||||
onMouseDown: () => {
|
||||
toggleFileSearchModifier(modVal);
|
||||
doSearch(query);
|
||||
},
|
||||
onKeyDown: e => {
|
||||
if (e.key === "Enter") {
|
||||
toggleFileSearchModifier(modVal);
|
||||
doSearch(query);
|
||||
}
|
||||
},
|
||||
title: tooltip
|
||||
}, _react2.default.createElement(_Svg2.default, {
|
||||
name: svgName
|
||||
|
@ -31,9 +31,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
||||
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
|
||||
function FrameTitle({
|
||||
frame,
|
||||
options
|
||||
options = {}
|
||||
}) {
|
||||
const displayName = (0, _frames.formatDisplayName)(frame, options);
|
||||
const displayName = (0, _frames.formatDisplayName)(frame, { ...options,
|
||||
maxLength: null
|
||||
});
|
||||
return _react2.default.createElement("div", {
|
||||
className: "title"
|
||||
}, displayName);
|
||||
|
@ -125,7 +125,9 @@ class Group extends _react.Component {
|
||||
|
||||
renderDescription() {
|
||||
const frame = this.props.group[0];
|
||||
const displayName = (0, _frames.formatDisplayName)(frame);
|
||||
const displayName = (0, _frames.formatDisplayName)(frame, {
|
||||
maxLength: null
|
||||
});
|
||||
return _react2.default.createElement("li", {
|
||||
key: frame.id,
|
||||
className: (0, _classnames2.default)("group"),
|
||||
|
@ -40,6 +40,10 @@ async function getGeneratedLocation(state, source, location, sourceMaps) {
|
||||
async function getMappedLocation(state, sourceMaps, location) {
|
||||
const source = (0, _selectors.getSource)(state, location.sourceId);
|
||||
|
||||
if (!source) {
|
||||
throw new Error("Unknown source for location");
|
||||
}
|
||||
|
||||
if ((0, _devtoolsSourceMap.isOriginalId)(location.sourceId)) {
|
||||
return getGeneratedLocation(state, source, location, sourceMaps);
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ function truncateMiddleText(sourceText, maxLength) {
|
||||
let truncatedText = sourceText;
|
||||
|
||||
if (sourceText.length > maxLength) {
|
||||
truncatedText = `${sourceText.substring(0, Math.round(maxLength / 2) - 2)}...${sourceText.substring(sourceText.length - Math.round(maxLength / 2 - 1))}`;
|
||||
truncatedText = `${sourceText.substring(0, Math.round(maxLength / 2) - 2)}…${sourceText.substring(sourceText.length - Math.round(maxLength / 2 - 1))}`;
|
||||
}
|
||||
|
||||
return truncatedText;
|
||||
|
@ -50,7 +50,7 @@ function promisify(context, method, ...args) {
|
||||
|
||||
function endTruncateStr(str, size) {
|
||||
if (str.length > size) {
|
||||
return `...${str.slice(str.length - size)}`;
|
||||
return `…${str.slice(str.length - size)}`;
|
||||
}
|
||||
|
||||
return str;
|
||||
|
@ -255,6 +255,7 @@ devtools.jar:
|
||||
skin/images/debugger/breakpoint.svg (themes/images/debugger/breakpoint.svg)
|
||||
skin/images/debugger/close.svg (themes/images/debugger/close.svg)
|
||||
skin/images/debugger/coffeescript.svg (themes/images/debugger/coffeescript.svg)
|
||||
skin/images/debugger/column-marker.svg (themes/images/debugger/column-marker.svg)
|
||||
skin/images/debugger/disable-pausing.svg (themes/images/debugger/disable-pausing.svg)
|
||||
skin/images/debugger/domain.svg (themes/images/debugger/domain.svg)
|
||||
skin/images/debugger/extension.svg (themes/images/debugger/extension.svg)
|
||||
|
@ -1877,7 +1877,9 @@ const IGNORED_SOURCE_URLS = ["debugger eval code"];
|
||||
ErrorRep.propTypes = {
|
||||
object: PropTypes.object.isRequired,
|
||||
// @TODO Change this to Object.values when supported in Node's version of V8
|
||||
mode: PropTypes.oneOf(Object.keys(MODE).map(key => MODE[key]))
|
||||
mode: PropTypes.oneOf(Object.keys(MODE).map(key => MODE[key])),
|
||||
// An optional function that will be used to render the Error stacktrace.
|
||||
renderStacktrace: PropTypes.func
|
||||
};
|
||||
|
||||
function ErrorRep(props) {
|
||||
@ -1909,7 +1911,8 @@ function ErrorRep(props) {
|
||||
}
|
||||
|
||||
if (preview.stack && props.mode !== MODE.TINY) {
|
||||
content.push("\n", getStacktraceElements(props, preview));
|
||||
const stacktrace = props.renderStacktrace ? props.renderStacktrace(parseStackString(preview.stack)) : getStacktraceElements(props, preview);
|
||||
content.push("\n", stacktrace);
|
||||
}
|
||||
|
||||
return span({
|
||||
@ -1940,8 +1943,65 @@ function getStacktraceElements(props, preview) {
|
||||
return stack;
|
||||
}
|
||||
|
||||
const isStacktraceALongString = isLongString(preview.stack);
|
||||
const stackString = isStacktraceALongString ? preview.stack.initial : preview.stack;
|
||||
parseStackString(preview.stack).forEach((frame, index, frames) => {
|
||||
let onLocationClick;
|
||||
const {
|
||||
filename,
|
||||
lineNumber,
|
||||
columnNumber,
|
||||
functionName,
|
||||
location
|
||||
} = frame;
|
||||
|
||||
if (props.onViewSourceInDebugger && !IGNORED_SOURCE_URLS.includes(filename)) {
|
||||
onLocationClick = e => {
|
||||
// Don't trigger ObjectInspector expand/collapse.
|
||||
e.stopPropagation();
|
||||
props.onViewSourceInDebugger({
|
||||
url: filename,
|
||||
line: lineNumber,
|
||||
column: columnNumber
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
stack.push("\t", span({
|
||||
key: `fn${index}`,
|
||||
className: "objectBox-stackTrace-fn"
|
||||
}, cleanFunctionName(functionName)), " ", span({
|
||||
key: `location${index}`,
|
||||
className: "objectBox-stackTrace-location",
|
||||
onClick: onLocationClick,
|
||||
title: onLocationClick ? `View source in debugger → ${location}` : undefined
|
||||
}, location), "\n");
|
||||
});
|
||||
|
||||
return span({
|
||||
key: "stack",
|
||||
className: "objectBox-stackTrace-grid"
|
||||
}, stack);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse a string that should represent a stack trace and returns an array of
|
||||
* the frames. The shape of the frames are extremely important as they can then
|
||||
* be processed here or in the toolbox by other components.
|
||||
* @param {String} stack
|
||||
* @returns {Array} Array of frames, which are object with the following shape:
|
||||
* - {String} filename
|
||||
* - {String} functionName
|
||||
* - {String} location
|
||||
* - {Number} columnNumber
|
||||
* - {Number} lineNumber
|
||||
*/
|
||||
function parseStackString(stack) {
|
||||
const res = [];
|
||||
if (!stack) {
|
||||
return res;
|
||||
}
|
||||
|
||||
const isStacktraceALongString = isLongString(stack);
|
||||
const stackString = isStacktraceALongString ? stack.initial : stack;
|
||||
|
||||
stackString.split("\n").forEach((frame, index, frames) => {
|
||||
if (!frame) {
|
||||
@ -1980,40 +2040,24 @@ function getStacktraceElements(props, preview) {
|
||||
functionName = "<anonymous>";
|
||||
}
|
||||
|
||||
let onLocationClick;
|
||||
// Given the input: "scriptLocation:2:100"
|
||||
// Result:
|
||||
// ["scriptLocation:2:100", "scriptLocation", "2", "100"]
|
||||
const locationParts = location.match(/^(.*):(\d+):(\d+)$/);
|
||||
|
||||
if (props.onViewSourceInDebugger && location && locationParts && !IGNORED_SOURCE_URLS.includes(locationParts[1])) {
|
||||
const [, url, line, column] = locationParts;
|
||||
onLocationClick = e => {
|
||||
// Don't trigger ObjectInspector expand/collapse.
|
||||
e.stopPropagation();
|
||||
props.onViewSourceInDebugger({
|
||||
url,
|
||||
line: Number(line),
|
||||
column: Number(column)
|
||||
});
|
||||
};
|
||||
if (location && locationParts) {
|
||||
const [, filename, line, column] = locationParts;
|
||||
res.push({
|
||||
filename,
|
||||
functionName,
|
||||
location,
|
||||
columnNumber: Number(column),
|
||||
lineNumber: Number(line)
|
||||
});
|
||||
}
|
||||
|
||||
stack.push("\t", span({
|
||||
key: `fn${index}`,
|
||||
className: "objectBox-stackTrace-fn"
|
||||
}, cleanFunctionName(functionName)), " ", span({
|
||||
key: `location${index}`,
|
||||
className: "objectBox-stackTrace-location",
|
||||
onClick: onLocationClick,
|
||||
title: onLocationClick ? `View source in debugger → ${location}` : undefined
|
||||
}, location), "\n");
|
||||
});
|
||||
|
||||
return span({
|
||||
key: "stack",
|
||||
className: "objectBox-stackTrace-grid"
|
||||
}, stack);
|
||||
return res;
|
||||
}
|
||||
|
||||
// Registration
|
||||
|
5
devtools/client/themes/images/debugger/column-marker.svg
Normal file
5
devtools/client/themes/images/debugger/column-marker.svg
Normal file
@ -0,0 +1,5 @@
|
||||
<svg width="9px" height="12px" viewBox="0 0 9 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="columnmarkergroup" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<polygon id="columnmarker" fill="#1B1B1D" points="0 0 4 0 9 6 4 12 0 12"></polygon>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 344 B |
@ -88,33 +88,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class FileReader::AsyncWaitRunnable final : public CancelableRunnable
|
||||
{
|
||||
public:
|
||||
explicit AsyncWaitRunnable(FileReader* aReader)
|
||||
: CancelableRunnable("FileReader::AsyncWaitRunnable")
|
||||
, mReader(aReader)
|
||||
{}
|
||||
|
||||
NS_IMETHOD
|
||||
Run() override
|
||||
{
|
||||
if (mReader) {
|
||||
mReader->InitialAsyncWait();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
Abort()
|
||||
{
|
||||
mReader = nullptr;
|
||||
}
|
||||
|
||||
public:
|
||||
RefPtr<FileReader> mReader;
|
||||
};
|
||||
|
||||
void
|
||||
FileReader::RootResultArrayBuffer()
|
||||
{
|
||||
@ -473,8 +446,7 @@ FileReader::ReadFileContent(Blob& aBlob,
|
||||
}
|
||||
}
|
||||
|
||||
mAsyncWaitRunnable = new AsyncWaitRunnable(this);
|
||||
aRv = NS_DispatchToCurrentThread(mAsyncWaitRunnable);
|
||||
aRv = DoAsyncWait();
|
||||
if (NS_WARN_IF(aRv.Failed())) {
|
||||
FreeFileData();
|
||||
return;
|
||||
@ -482,20 +454,6 @@ FileReader::ReadFileContent(Blob& aBlob,
|
||||
|
||||
//FileReader should be in loading state here
|
||||
mReadyState = LOADING;
|
||||
}
|
||||
|
||||
void
|
||||
FileReader::InitialAsyncWait()
|
||||
{
|
||||
mAsyncWaitRunnable = nullptr;
|
||||
|
||||
nsresult rv = DoAsyncWait();
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
mReadyState = EMPTY;
|
||||
FreeFileData();
|
||||
return;
|
||||
}
|
||||
|
||||
DispatchProgressEvent(NS_LITERAL_STRING(LOADSTART_STR));
|
||||
}
|
||||
|
||||
@ -816,11 +774,6 @@ FileReader::Abort()
|
||||
|
||||
ClearProgressEventTimer();
|
||||
|
||||
if (mAsyncWaitRunnable) {
|
||||
mAsyncWaitRunnable->Abort();
|
||||
mAsyncWaitRunnable = nullptr;
|
||||
}
|
||||
|
||||
mReadyState = DONE;
|
||||
|
||||
// XXX The spec doesn't say this
|
||||
@ -830,19 +783,7 @@ FileReader::Abort()
|
||||
SetDOMStringToNull(mResult);
|
||||
mResultArrayBuffer = nullptr;
|
||||
|
||||
if (mAsyncStream) {
|
||||
if (mBusyCount) {
|
||||
// This will abort any pending reading. See nsIAsyncInputStream.idl.
|
||||
mAsyncStream->AsyncWait(/* callback */ nullptr,
|
||||
/* aFlags*/ 0,
|
||||
/* aRequestedCount */ 0,
|
||||
mTarget);
|
||||
DecreaseBusyCounter();
|
||||
MOZ_ASSERT(mBusyCount == 0);
|
||||
}
|
||||
mAsyncStream = nullptr;
|
||||
}
|
||||
|
||||
mAsyncStream = nullptr;
|
||||
mBlob = nullptr;
|
||||
|
||||
//Clean up memory buffer
|
||||
@ -890,11 +831,6 @@ FileReader::Shutdown()
|
||||
{
|
||||
mReadyState = DONE;
|
||||
|
||||
if (mAsyncWaitRunnable) {
|
||||
mAsyncWaitRunnable->Abort();
|
||||
mAsyncWaitRunnable = nullptr;
|
||||
}
|
||||
|
||||
if (mAsyncStream) {
|
||||
mAsyncStream->Close();
|
||||
mAsyncStream = nullptr;
|
||||
|
@ -128,8 +128,6 @@ public:
|
||||
eDataFormat DataFormat() const { return mDataFormat; }
|
||||
const nsString& Result() const { return mResult; }
|
||||
|
||||
void InitialAsyncWait();
|
||||
|
||||
private:
|
||||
virtual ~FileReader();
|
||||
|
||||
@ -209,10 +207,6 @@ private:
|
||||
// This value is set when the reading starts in order to keep the worker alive
|
||||
// during the process.
|
||||
RefPtr<StrongWorkerRef> mStrongWorkerRef;
|
||||
|
||||
// Runnable to start the reading asynchronous.
|
||||
class AsyncWaitRunnable;
|
||||
RefPtr<AsyncWaitRunnable> mAsyncWaitRunnable;
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(FileReader, FILEREADER_ID)
|
||||
|
@ -257,7 +257,7 @@ function test_readAsText(blob, text) {
|
||||
|
||||
is(r.readyState, FileReader.LOADING, "correct loading text readyState");
|
||||
is(onloadHasRun, false, "text loading must be async");
|
||||
is(onloadStartHasRun, false, "text loadstart should fire async");
|
||||
is(onloadStartHasRun, true, "text loadstart should fire sync");
|
||||
});
|
||||
}
|
||||
|
||||
@ -280,7 +280,7 @@ function test_readAsBinaryString(blob, text) {
|
||||
|
||||
is(r.readyState, FileReader.LOADING, "correct loading binary readyState");
|
||||
is(onloadHasRun, false, "binary loading must be async");
|
||||
is(onloadStartHasRun, false, "binary loadstart should fire async");
|
||||
is(onloadStartHasRun, true, "binary loadstart should fire sync");
|
||||
});
|
||||
}
|
||||
|
||||
@ -303,7 +303,7 @@ function test_readAsArrayBuffer(blob, text) {
|
||||
|
||||
is(r.readyState, FileReader.LOADING, "correct loading arrayBuffer readyState");
|
||||
is(onloadHasRun, false, "arrayBuffer loading must be async");
|
||||
is(onloadStartHasRun, false, "arrayBuffer loadstart should fire sync");
|
||||
is(onloadStartHasRun, true, "arrayBuffer loadstart should fire sync");
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -91,17 +91,19 @@ subjectToCSP(nsIURI* aURI, nsContentPolicyType aContentType) {
|
||||
// hence we use protocol flags to accomplish that, but we also
|
||||
// want resource:, chrome: and moz-icon to be subject to CSP
|
||||
// (which also use URI_IS_LOCAL_RESOURCE).
|
||||
// Exception to the rule are images, styles, and localization DTDs
|
||||
// using a scheme of resource: or chrome:
|
||||
bool isImgOrStyleOrDTD = contentType == nsIContentPolicy::TYPE_IMAGE ||
|
||||
contentType == nsIContentPolicy::TYPE_STYLESHEET ||
|
||||
contentType == nsIContentPolicy::TYPE_DTD;
|
||||
// Exception to the rule are images, styles, localization DTDs,
|
||||
// and XBLs using a scheme of resource: or chrome:
|
||||
bool isImgOrStyleOrDTDorXBL =
|
||||
contentType == nsIContentPolicy::TYPE_IMAGE ||
|
||||
contentType == nsIContentPolicy::TYPE_STYLESHEET ||
|
||||
contentType == nsIContentPolicy::TYPE_DTD ||
|
||||
contentType == nsIContentPolicy::TYPE_XBL;
|
||||
rv = aURI->SchemeIs("resource", &match);
|
||||
if (NS_SUCCEEDED(rv) && match && !isImgOrStyleOrDTD) {
|
||||
if (NS_SUCCEEDED(rv) && match && !isImgOrStyleOrDTDorXBL) {
|
||||
return true;
|
||||
}
|
||||
rv = aURI->SchemeIs("chrome", &match);
|
||||
if (NS_SUCCEEDED(rv) && match && !isImgOrStyleOrDTD) {
|
||||
if (NS_SUCCEEDED(rv) && match && !isImgOrStyleOrDTDorXBL) {
|
||||
return true;
|
||||
}
|
||||
rv = aURI->SchemeIs("moz-icon", &match);
|
||||
|
@ -4112,17 +4112,13 @@ AsyncPanZoomController::UpdateCheckerboardEvent(const MutexAutoLock& aProofOfLoc
|
||||
uint32_t aMagnitude)
|
||||
{
|
||||
if (mCheckerboardEvent && mCheckerboardEvent->RecordFrameInfo(aMagnitude)) {
|
||||
// This checkerboard event is done. Report some metrics to telemetry, but
|
||||
// skip reporting if the sanity checker window is running, because we get
|
||||
// checkerboarding reported on that window that we don't really care about.
|
||||
if (!gfxPrefs::SanityTestRunning()) {
|
||||
mozilla::Telemetry::Accumulate(mozilla::Telemetry::CHECKERBOARD_SEVERITY,
|
||||
mCheckerboardEvent->GetSeverity());
|
||||
mozilla::Telemetry::Accumulate(mozilla::Telemetry::CHECKERBOARD_PEAK,
|
||||
mCheckerboardEvent->GetPeak());
|
||||
mozilla::Telemetry::Accumulate(mozilla::Telemetry::CHECKERBOARD_DURATION,
|
||||
(uint32_t)mCheckerboardEvent->GetDuration().ToMilliseconds());
|
||||
}
|
||||
// This checkerboard event is done. Report some metrics to telemetry.
|
||||
mozilla::Telemetry::Accumulate(mozilla::Telemetry::CHECKERBOARD_SEVERITY,
|
||||
mCheckerboardEvent->GetSeverity());
|
||||
mozilla::Telemetry::Accumulate(mozilla::Telemetry::CHECKERBOARD_PEAK,
|
||||
mCheckerboardEvent->GetPeak());
|
||||
mozilla::Telemetry::Accumulate(mozilla::Telemetry::CHECKERBOARD_DURATION,
|
||||
(uint32_t)mCheckerboardEvent->GetDuration().ToMilliseconds());
|
||||
|
||||
mPotentialCheckerboardTracker.CheckerboardDone();
|
||||
|
||||
|
@ -742,8 +742,6 @@ private:
|
||||
|
||||
DECL_GFX_PREF(Live, "print.font-variations-as-paths", PrintFontVariationsAsPaths, bool, true);
|
||||
|
||||
DECL_GFX_PREF(Live, "sanity-test.running", SanityTestRunning, bool, false);
|
||||
|
||||
DECL_GFX_PREF(Once, "slider.snapMultiplier", SliderSnapMultiplier, int32_t, 0);
|
||||
|
||||
DECL_GFX_PREF(Live, "test.events.async.enabled", TestEventsAsyncEnabled, bool, false);
|
||||
|
@ -1862,7 +1862,9 @@ js::StartDynamicModuleImport(JSContext* cx, HandleValue referencingPrivate, Hand
|
||||
}
|
||||
|
||||
if (!importHook(cx, referencingPrivate, specifier, promise)) {
|
||||
if (!RejectPromiseWithPendingError(cx, promise)) {
|
||||
// If there's no exception pending then the script is terminating
|
||||
// anyway, so just return nullptr.
|
||||
if (!cx->isExceptionPending() || !RejectPromiseWithPendingError(cx, promise)) {
|
||||
return nullptr;
|
||||
}
|
||||
return promise;
|
||||
|
107
js/src/gc/GC.cpp
107
js/src/gc/GC.cpp
@ -6115,28 +6115,19 @@ GCRuntime::beginSweepingSweepGroup(FreeOp* fop, SliceBudget& budget)
|
||||
}
|
||||
|
||||
#ifdef JS_GC_ZEAL
|
||||
|
||||
bool
|
||||
GCRuntime::shouldYieldForZeal(ZealMode mode)
|
||||
{
|
||||
return useZeal && isIncremental && hasZealMode(mode);
|
||||
}
|
||||
bool yield = useZeal && isIncremental && hasZealMode(mode);
|
||||
|
||||
IncrementalProgress
|
||||
GCRuntime::maybeYieldForSweepingZeal(FreeOp* fop, SliceBudget& budget)
|
||||
{
|
||||
/*
|
||||
* Check whether we need to yield for GC zeal. We always yield when running
|
||||
* in incremental multi-slice zeal mode so RunDebugGC can reset the slice
|
||||
* budget.
|
||||
*/
|
||||
if (initialState != State::Sweep && shouldYieldForZeal(ZealMode::IncrementalMultipleSlices)) {
|
||||
return NotFinished;
|
||||
// Only yield on the first sweep slice for this mode.
|
||||
bool firstSweepSlice = initialState != State::Sweep;
|
||||
if (mode == ZealMode::IncrementalMultipleSlices && !firstSweepSlice) {
|
||||
yield = false;
|
||||
}
|
||||
|
||||
return Finished;
|
||||
return yield;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
IncrementalProgress
|
||||
@ -6689,37 +6680,41 @@ class SweepActionCall final : public SweepAction<GCRuntime*, Args...>
|
||||
void assertFinished() const override { }
|
||||
};
|
||||
|
||||
#ifdef JS_GC_ZEAL
|
||||
// Implementation of the SweepAction interface that yields in a specified zeal
|
||||
// mode and then calls another action.
|
||||
// mode.
|
||||
template <typename... Args>
|
||||
class SweepActionMaybeYield final : public SweepAction<GCRuntime*, Args...>
|
||||
{
|
||||
using Action = SweepAction<GCRuntime*, Args...>;
|
||||
|
||||
ZealMode mode;
|
||||
UniquePtr<Action> action;
|
||||
bool triggered;
|
||||
bool isYielding;
|
||||
|
||||
public:
|
||||
SweepActionMaybeYield(UniquePtr<Action> action, ZealMode mode)
|
||||
: mode(mode), action(std::move(action)), triggered(false) {}
|
||||
explicit SweepActionMaybeYield(ZealMode mode)
|
||||
: mode(mode), isYielding(false) {}
|
||||
|
||||
IncrementalProgress run(GCRuntime* gc, Args... args) override {
|
||||
if (!triggered && gc->shouldYieldForZeal(mode)) {
|
||||
triggered = true;
|
||||
#ifdef JS_GC_ZEAL
|
||||
if (!isYielding && gc->shouldYieldForZeal(mode)) {
|
||||
isYielding = true;
|
||||
return NotFinished;
|
||||
}
|
||||
|
||||
triggered = false;
|
||||
return action->run(gc, args...);
|
||||
isYielding = false;
|
||||
#endif
|
||||
return Finished;
|
||||
}
|
||||
|
||||
void assertFinished() const override {
|
||||
MOZ_ASSERT(!triggered);
|
||||
MOZ_ASSERT(!isYielding);
|
||||
}
|
||||
|
||||
// These actions should be skipped if GC zeal is not configured.
|
||||
#ifndef JS_GC_ZEAL
|
||||
bool shouldSkip() override {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
// Implementation of the SweepAction interface that calls a list of actions in
|
||||
// sequence.
|
||||
@ -6736,7 +6731,11 @@ class SweepActionSequence final : public SweepAction<Args...>
|
||||
public:
|
||||
bool init(UniquePtr<Action>* acts, size_t count) {
|
||||
for (size_t i = 0; i < count; i++) {
|
||||
if (!actions.emplaceBack(std::move(acts[i]))) {
|
||||
auto& action = acts[i];
|
||||
if (action->shouldSkip()) {
|
||||
continue;
|
||||
}
|
||||
if (!actions.emplaceBack(std::move(action))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -6865,14 +6864,14 @@ Call(IncrementalProgress (GCRuntime::*method)(Args...)) {
|
||||
return MakeUnique<SweepActionCall<Args...>>(method);
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
static UniquePtr<SweepAction<GCRuntime*, Args...>>
|
||||
MaybeYield(ZealMode zealMode, UniquePtr<SweepAction<GCRuntime*, Args...>> action) {
|
||||
#ifdef JS_GC_ZEAL
|
||||
return js::MakeUnique<SweepActionMaybeYield<Args...>>(std::move(action), zealMode);
|
||||
#else
|
||||
return action;
|
||||
#endif
|
||||
static UniquePtr<SweepAction<GCRuntime*, FreeOp*, SliceBudget&>>
|
||||
MaybeYield(ZealMode zealMode) {
|
||||
return js::MakeUnique<SweepActionMaybeYield<FreeOp*, SliceBudget&>>(zealMode);
|
||||
}
|
||||
|
||||
static UniquePtr<SweepAction<GCRuntime*, FreeOp*, SliceBudget&, Zone*>>
|
||||
MaybeYieldInZoneLoop(ZealMode zealMode) {
|
||||
return js::MakeUnique<SweepActionMaybeYield<FreeOp*, SliceBudget&, Zone*>>(zealMode);
|
||||
}
|
||||
|
||||
template <typename... Args, typename... Rest>
|
||||
@ -6939,25 +6938,23 @@ GCRuntime::initSweepActions()
|
||||
Sequence(
|
||||
Call(&GCRuntime::endMarkingSweepGroup),
|
||||
Call(&GCRuntime::beginSweepingSweepGroup),
|
||||
#ifdef JS_GC_ZEAL
|
||||
Call(&GCRuntime::maybeYieldForSweepingZeal),
|
||||
#endif
|
||||
MaybeYield(ZealMode::YieldBeforeSweepingAtoms,
|
||||
Call(&GCRuntime::sweepAtomsTable)),
|
||||
MaybeYield(ZealMode::YieldBeforeSweepingCaches,
|
||||
Call(&GCRuntime::sweepWeakCaches)),
|
||||
MaybeYield(ZealMode::IncrementalMultipleSlices),
|
||||
MaybeYield(ZealMode::YieldBeforeSweepingAtoms),
|
||||
Call(&GCRuntime::sweepAtomsTable),
|
||||
MaybeYield(ZealMode::YieldBeforeSweepingCaches),
|
||||
Call(&GCRuntime::sweepWeakCaches),
|
||||
ForEachZoneInSweepGroup(rt,
|
||||
Sequence(
|
||||
MaybeYield(ZealMode::YieldBeforeSweepingTypes,
|
||||
Call(&GCRuntime::sweepTypeInformation)),
|
||||
MaybeYield(ZealMode::YieldBeforeSweepingObjects,
|
||||
ForEachAllocKind(ForegroundObjectFinalizePhase.kinds,
|
||||
Call(&GCRuntime::finalizeAllocKind))),
|
||||
MaybeYield(ZealMode::YieldBeforeSweepingNonObjects,
|
||||
ForEachAllocKind(ForegroundNonObjectFinalizePhase.kinds,
|
||||
Call(&GCRuntime::finalizeAllocKind))),
|
||||
MaybeYield(ZealMode::YieldBeforeSweepingShapeTrees,
|
||||
Call(&GCRuntime::sweepShapeTree)),
|
||||
MaybeYieldInZoneLoop(ZealMode::YieldBeforeSweepingTypes),
|
||||
Call(&GCRuntime::sweepTypeInformation),
|
||||
MaybeYieldInZoneLoop(ZealMode::YieldBeforeSweepingObjects),
|
||||
ForEachAllocKind(ForegroundObjectFinalizePhase.kinds,
|
||||
Call(&GCRuntime::finalizeAllocKind)),
|
||||
MaybeYieldInZoneLoop(ZealMode::YieldBeforeSweepingNonObjects),
|
||||
ForEachAllocKind(ForegroundNonObjectFinalizePhase.kinds,
|
||||
Call(&GCRuntime::finalizeAllocKind)),
|
||||
MaybeYieldInZoneLoop(ZealMode::YieldBeforeSweepingShapeTrees),
|
||||
Call(&GCRuntime::sweepShapeTree),
|
||||
Call(&GCRuntime::releaseSweptEmptyArenas))),
|
||||
Call(&GCRuntime::endSweepingSweepGroup)));
|
||||
|
||||
|
@ -64,6 +64,7 @@ struct SweepAction
|
||||
virtual ~SweepAction() {}
|
||||
virtual IncrementalProgress run(Args... args) = 0;
|
||||
virtual void assertFinished() const = 0;
|
||||
virtual bool shouldSkip() { return false; }
|
||||
};
|
||||
|
||||
class ChunkPool
|
||||
@ -631,9 +632,6 @@ class GCRuntime
|
||||
IncrementalProgress endMarkingSweepGroup(FreeOp* fop, SliceBudget& budget);
|
||||
void markIncomingCrossCompartmentPointers(MarkColor color);
|
||||
IncrementalProgress beginSweepingSweepGroup(FreeOp* fop, SliceBudget& budget);
|
||||
#ifdef JS_GC_ZEAL
|
||||
IncrementalProgress maybeYieldForSweepingZeal(FreeOp* fop, SliceBudget& budget);
|
||||
#endif
|
||||
bool shouldReleaseObservedTypes();
|
||||
void sweepDebuggerOnMainThread(FreeOp* fop);
|
||||
void sweepJitDataOnMainThread(FreeOp* fop);
|
||||
|
5
js/src/jit-test/tests/modules/bug-1502669.js
Normal file
5
js/src/jit-test/tests/modules/bug-1502669.js
Normal file
@ -0,0 +1,5 @@
|
||||
// |jit-test| error: ReferenceError
|
||||
var g = newGlobal();
|
||||
g.parent = this;
|
||||
g.eval("new Debugger(parent).onExceptionUnwind = function () { hits++; };");
|
||||
import('')();
|
@ -234,12 +234,21 @@ DefaultJitOptions::DefaultJitOptions()
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_MIPS64)
|
||||
SET_DEFAULT(spectreIndexMasking, false);
|
||||
SET_DEFAULT(spectreObjectMitigationsBarriers, false);
|
||||
SET_DEFAULT(spectreObjectMitigationsMisc, false);
|
||||
SET_DEFAULT(spectreStringMitigations, false);
|
||||
SET_DEFAULT(spectreValueMasking, false);
|
||||
SET_DEFAULT(spectreJitToCxxCalls, false);
|
||||
#else
|
||||
SET_DEFAULT(spectreIndexMasking, true);
|
||||
SET_DEFAULT(spectreObjectMitigationsBarriers, true);
|
||||
SET_DEFAULT(spectreObjectMitigationsMisc, true);
|
||||
SET_DEFAULT(spectreStringMitigations, true);
|
||||
SET_DEFAULT(spectreValueMasking, true);
|
||||
SET_DEFAULT(spectreJitToCxxCalls, true);
|
||||
#endif
|
||||
|
||||
// Toggles whether unboxed plain objects can be created by the VM.
|
||||
SET_DEFAULT(disableUnboxedObjects, false);
|
||||
|
@ -4986,11 +4986,7 @@ ShellModuleDynamicImportHook(JSContext* cx, HandleValue referencingPrivate, Hand
|
||||
args[2].setObject(*promise);
|
||||
|
||||
RootedValue result(cx);
|
||||
if (!JS_CallFunctionValue(cx, nullptr, hookValue, args, &result)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return JS_CallFunctionValue(cx, nullptr, hookValue, args, &result);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@ -3717,6 +3717,22 @@ nsLayoutUtils::PaintFrame(gfxContext* aRenderingContext, nsIFrame* aFrame,
|
||||
if (dom::Element* element = presShell->GetDocument()->GetDocumentElement()) {
|
||||
id = nsLayoutUtils::FindOrCreateIDFor(element);
|
||||
}
|
||||
// In some cases we get a root document here on an APZ-enabled window
|
||||
// that doesn't have the root displayport initialized yet, even though
|
||||
// the ChromeProcessController is supposed to do it when the widget is
|
||||
// created. This can happen simply because the ChromeProcessController
|
||||
// does it on the next spin of the event loop, and we can trigger a paint
|
||||
// synchronously after window creation but before that runs. In that case
|
||||
// we should initialize the root displayport here before we do the paint.
|
||||
} else if (XRE_IsParentProcess() && presContext->IsRoot()
|
||||
&& presShell->GetDocument() != nullptr
|
||||
&& presShell->GetRootScrollFrame() != nullptr
|
||||
&& nsLayoutUtils::UsesAsyncScrolling(presShell->GetRootScrollFrame())) {
|
||||
if (dom::Element* element = presShell->GetDocument()->GetDocumentElement()) {
|
||||
if (!nsLayoutUtils::HasDisplayPort(element)) {
|
||||
APZCCallbackHelper::InitializeRootDisplayport(presShell);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nsDisplayListBuilder::AutoCurrentScrollParentIdSetter idSetter(&builder, id);
|
||||
|
@ -5,4 +5,4 @@ Makefile.in build files for the Mozilla build system.
|
||||
|
||||
The cubeb git repository is: git://github.com/kinetiknz/cubeb.git
|
||||
|
||||
The git commit ID used was 04d58b66057171d25413498b3a4d0607fd500bb8 (2018-10-24 08:43:52 +1300)
|
||||
The git commit ID used was 9a7a55153e7f9b9e0036ab023909c7bc4a41688b (2018-10-30 09:05:26 +1300)
|
||||
|
@ -3413,7 +3413,7 @@ audiounit_get_devices_of_type(cubeb_device_type devtype)
|
||||
// Remove the aggregate device from the list of devices (if any).
|
||||
for (auto it = devices.begin(); it != devices.end();) {
|
||||
CFStringRef name = get_device_name(*it);
|
||||
if (CFStringFind(name, CFSTR("CubebAggregateDevice"), 0).location !=
|
||||
if (name && CFStringFind(name, CFSTR("CubebAggregateDevice"), 0).location !=
|
||||
kCFNotFound) {
|
||||
it = devices.erase(it);
|
||||
} else {
|
||||
|
@ -1537,12 +1537,21 @@ pref("javascript.options.throw_on_debuggee_would_run", false);
|
||||
pref("javascript.options.dump_stack_on_debuggee_would_run", false);
|
||||
|
||||
// Spectre security vulnerability mitigations.
|
||||
#if defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_MIPS64)
|
||||
pref("javascript.options.spectre.index_masking", false);
|
||||
pref("javascript.options.spectre.object_mitigations.barriers", false);
|
||||
pref("javascript.options.spectre.object_mitigations.misc", false);
|
||||
pref("javascript.options.spectre.string_mitigations", false);
|
||||
pref("javascript.options.spectre.value_masking", false);
|
||||
pref("javascript.options.spectre.jit_to_C++_calls", false);
|
||||
#else
|
||||
pref("javascript.options.spectre.index_masking", true);
|
||||
pref("javascript.options.spectre.object_mitigations.barriers", true);
|
||||
pref("javascript.options.spectre.object_mitigations.misc", true);
|
||||
pref("javascript.options.spectre.string_mitigations", true);
|
||||
pref("javascript.options.spectre.value_masking", true);
|
||||
pref("javascript.options.spectre.jit_to_C++_calls", true);
|
||||
#endif
|
||||
|
||||
// Streams API
|
||||
pref("javascript.options.streams", false);
|
||||
|
@ -2351,10 +2351,21 @@ impl Animate for ComputedRotate {
|
||||
let from = ComputedRotate::resolve(self);
|
||||
let to = ComputedRotate::resolve(other);
|
||||
|
||||
let (fx, fy, fz, fa) =
|
||||
let (mut fx, mut fy, mut fz, fa) =
|
||||
transform::get_normalized_vector_and_angle(from.0, from.1, from.2, from.3);
|
||||
let (tx, ty, tz, ta) =
|
||||
let (mut tx, mut ty, mut tz, ta) =
|
||||
transform::get_normalized_vector_and_angle(to.0, to.1, to.2, to.3);
|
||||
|
||||
if fa == Angle::from_degrees(0.) {
|
||||
fx = tx;
|
||||
fy = ty;
|
||||
fz = tz;
|
||||
} else if ta == Angle::from_degrees(0.) {
|
||||
tx = fx;
|
||||
ty = fy;
|
||||
tz = fz;
|
||||
}
|
||||
|
||||
if (fx, fy, fz) == (tx, ty, tz) {
|
||||
return Ok(Rotate::Rotate3D(fx, fy, fz, fa.animate(&ta, procedure)?));
|
||||
}
|
||||
|
@ -0,0 +1,4 @@
|
||||
[filereader_abort.html]
|
||||
[Aborting after read]
|
||||
expected: FAIL
|
||||
|
@ -1,6 +1,3 @@
|
||||
[abs-pos-non-replaced-icb-vlr-021.xht]
|
||||
expected:
|
||||
if debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
|
||||
if not debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
|
||||
if debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
|
||||
if not debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
|
||||
disabled:
|
||||
if (os == "win"): https://bugzilla.mozilla.org/show_bug.cgi?id=1500276
|
||||
|
@ -11,57 +11,56 @@
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
// none -> none
|
||||
test_interpolation(
|
||||
{
|
||||
property: 'transform',
|
||||
from: 'none',
|
||||
to: 'none',
|
||||
},
|
||||
[{ at: 0.25, expect: 'none' }]
|
||||
[{ at: 0.25, expect: 'none' }],
|
||||
'none -> none'
|
||||
);
|
||||
|
||||
// none -> something
|
||||
test_interpolation(
|
||||
{
|
||||
property: 'transform',
|
||||
from: 'none',
|
||||
to: 'translate(200px) rotate(720deg)',
|
||||
},
|
||||
[{ at: 0.25, expect: 'translate(50px) rotate(180deg)' }]
|
||||
[{ at: 0.25, expect: 'translate(50px) rotate(180deg)' }],
|
||||
'none -> something'
|
||||
);
|
||||
|
||||
// something -> none
|
||||
test_interpolation(
|
||||
{
|
||||
property: 'transform',
|
||||
from: 'translate(200px) rotate(720deg)',
|
||||
to: 'none',
|
||||
},
|
||||
[{ at: 0.25, expect: 'translate(150px) rotate(540deg)' }]
|
||||
[{ at: 0.25, expect: 'translate(150px) rotate(540deg)' }],
|
||||
'something -> none'
|
||||
);
|
||||
|
||||
// Mismatched lengths (from is shorter), common part matches
|
||||
test_interpolation(
|
||||
{
|
||||
property: 'transform',
|
||||
from: 'translate(100px)',
|
||||
to: 'translate(200px) rotate(720deg)',
|
||||
},
|
||||
[{ at: 0.25, expect: 'translate(125px) rotate(180deg)' }]
|
||||
[{ at: 0.25, expect: 'translate(125px) rotate(180deg)' }],
|
||||
'Mismatched lengths (from is shorter), common part matches'
|
||||
);
|
||||
|
||||
// Mismatched lengths (to is shorter), common part matches
|
||||
test_interpolation(
|
||||
{
|
||||
property: 'transform',
|
||||
from: 'translate(100px) rotate(720deg)',
|
||||
to: 'translate(200px)',
|
||||
},
|
||||
[{ at: 0.25, expect: 'translate(125px) rotate(540deg)' }]
|
||||
[{ at: 0.25, expect: 'translate(125px) rotate(540deg)' }],
|
||||
'Mismatched lengths (to is shorter), common part matches'
|
||||
);
|
||||
|
||||
// Perfect match
|
||||
test_interpolation(
|
||||
{
|
||||
property: 'transform',
|
||||
@ -73,47 +72,68 @@ test_interpolation(
|
||||
at: 0.25,
|
||||
expect: 'scale(2.25) rotate(540deg) translate(125px) matrix(1, 0, 0, 1, 75, 50) skew(180deg)',
|
||||
},
|
||||
]
|
||||
],
|
||||
'Perfect match'
|
||||
);
|
||||
|
||||
// Matches on primitives
|
||||
test_interpolation(
|
||||
{
|
||||
property: 'transform',
|
||||
from: 'translateX(100px) scaleX(3) translate(500px) scale(2)',
|
||||
to: 'translateY(200px) scale(5) translateX(100px) scaleY(3)',
|
||||
},
|
||||
[{ at: 0.25, expect: 'translate(75px, 50px) scale(3.5, 2) translate(400px, 0px) scale(1.75, 2.25)' }]
|
||||
[{ at: 0.25, expect: 'translate(75px, 50px) scale(3.5, 2) translate(400px, 0px) scale(1.75, 2.25)' }],
|
||||
'Matches on primitives'
|
||||
);
|
||||
|
||||
test_interpolation(
|
||||
{
|
||||
property: 'transform',
|
||||
from: 'rotateX(90deg) translateX(100px)',
|
||||
to: 'rotate3d(50, 0, 0, 180deg) translateY(200px)',
|
||||
},
|
||||
[{ at: 0.25, expect: 'rotateX(112.5deg) translate(75px, 50px)' }],
|
||||
'Match on rotation vector'
|
||||
);
|
||||
|
||||
test_interpolation(
|
||||
{
|
||||
property: 'transform',
|
||||
from: 'rotateX(90deg) translateX(100px)',
|
||||
to: 'rotateY(0deg) translateY(200px)',
|
||||
},
|
||||
[{ at: 0.25, expect: 'rotateX(67.5deg) translate(75px, 50px)' }],
|
||||
'Match on rotation due to 0deg angle'
|
||||
);
|
||||
|
||||
// Common prefix
|
||||
test_interpolation(
|
||||
{
|
||||
property: 'transform',
|
||||
from: 'rotate(0deg) translate(100px)',
|
||||
to: 'rotate(720deg) scale(2) translate(200px)',
|
||||
},
|
||||
[{ at: 0.25, expect: 'rotate(180deg) matrix(1.25, 0, 0, 1.25, 175, 0)' }]
|
||||
[{ at: 0.25, expect: 'rotate(180deg) matrix(1.25, 0, 0, 1.25, 175, 0)' }],
|
||||
'Common prefix'
|
||||
);
|
||||
|
||||
// Complete mismatch (except length)
|
||||
test_interpolation(
|
||||
{
|
||||
property: 'transform',
|
||||
from: 'scale(2) rotate(0deg) translate(100px)',
|
||||
to: 'rotate(720deg) scale(2) translate(200px)',
|
||||
},
|
||||
[{ at: 0.25, expect: 'matrix(2, 0, 0, 2, 250, 0)' }]
|
||||
[{ at: 0.25, expect: 'matrix(2, 0, 0, 2, 250, 0)' }],
|
||||
'Complete mismatch (except length)'
|
||||
);
|
||||
|
||||
// Complete mismatch including length
|
||||
test_interpolation(
|
||||
{
|
||||
property: 'transform',
|
||||
from: 'scale(2) rotate(0deg)',
|
||||
to: 'rotate(720deg) scale(2) translate(200px)',
|
||||
},
|
||||
[{ at: 0.25, expect: 'matrix(2, 0, 0, 2, 100, 0)' }]
|
||||
[{ at: 0.25, expect: 'matrix(2, 0, 0, 2, 100, 0)' }],
|
||||
'Complete mismatch including length'
|
||||
);
|
||||
</script>
|
||||
</body>
|
||||
|
@ -1,5 +1,6 @@
|
||||
'use strict';
|
||||
function test_interpolation(settings, expectations) {
|
||||
function test_interpolation(settings, expectations, name) {
|
||||
var message_prefix = name ? name + ': ' : '';
|
||||
// Returns a timing function that at 0.5 evaluates to progress.
|
||||
function timingFunction(progress) {
|
||||
if (progress === 0)
|
||||
@ -13,7 +14,7 @@ function test_interpolation(settings, expectations) {
|
||||
test(function(){
|
||||
assert_true(CSS.supports(settings.property, settings.from), 'Value "' + settings.from + '" is supported by ' + settings.property);
|
||||
assert_true(CSS.supports(settings.property, settings.to), 'Value "' + settings.to + '" is supported by ' + settings.property);
|
||||
}, '"' + settings.from + '" and "' + settings.to + '" are valid ' + settings.property + ' values');
|
||||
}, message_prefix + '"' + settings.from + '" and "' + settings.to + '" are valid ' + settings.property + ' values');
|
||||
|
||||
for (var i = 0; i < expectations.length; ++i) {
|
||||
var progress = expectations[i].at;
|
||||
@ -49,6 +50,6 @@ function test_interpolation(settings, expectations) {
|
||||
reference.style = '';
|
||||
|
||||
assert_equals(getComputedStyle(target)[settings.property], getComputedStyle(reference)[settings.property]);
|
||||
}, 'Animation between "' + settings.from + '" and "' + settings.to + '" at progress ' + progress);
|
||||
}, message_prefix + 'Animation between "' + settings.from + '" and "' + settings.to + '" at progress ' + progress);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user