Merge inbound to mozilla-central a=merge

This commit is contained in:
arthur.iakab 2018-12-27 23:56:49 +02:00
Родитель dbb53da575 eb8c25f1d5
Коммит 9bcc2b137f
97 изменённых файлов: 619 добавлений и 329 удалений

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

@ -116,6 +116,7 @@ skip-if = (verify && (os == 'linux' || os == 'mac'))
[browser_ext_menus_errors.js]
[browser_ext_menus_event_order.js]
[browser_ext_menus_events.js]
skip-if = os == 'linux' #Bug 1433892
[browser_ext_menus_refresh.js]
[browser_ext_menus_replace_menu.js]
[browser_ext_menus_replace_menu_context.js]

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

@ -393,17 +393,16 @@
data-l10n-id="applications-filter"
aria-controls="handlersView"/>
<listheader equalsize="always">
<treecol id="typeColumn" data-l10n-id="applications-type-column" value="type"
persist="sortDirection"
flex="1" sortDirection="ascending"/>
<treecol id="actionColumn" data-l10n-id="applications-action-column" value="action"
persist="sortDirection"
flex="1"/>
</listheader>
<richlistbox id="handlersView"
preference="pref.downloads.disable_button.edit_actions">
<listheader equalsize="always">
<treecol id="typeColumn" data-l10n-id="applications-type-column" value="type"
persist="sortDirection"
flex="1" sortDirection="ascending"/>
<treecol id="actionColumn" data-l10n-id="applications-action-column" value="action"
persist="sortDirection"
flex="1"/>
</listheader>
</richlistbox>
preference="pref.downloads.disable_button.edit_actions"/>
</groupbox>

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

@ -430,7 +430,7 @@ var gPermissionManager = {
// Re-append items in the correct order:
items.forEach(item => frag.appendChild(item));
let cols = list.querySelectorAll("treecol");
let cols = list.previousElementSibling.querySelectorAll("treecol");
cols.forEach(c => {
c.removeAttribute("data-isCurrentSortCol");
c.removeAttribute("sortDirection");

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

@ -48,17 +48,16 @@
oncommand="gPermissionManager.addPermission(Ci.nsIPermissionManager.ALLOW_ACTION);"/>
</hbox>
<separator class="thin"/>
<listheader>
<treecol id="siteCol" data-l10n-id="permissions-site-name" flex="3" width="0"
onclick="gPermissionManager.buildPermissionsList(event.target)"/>
<treecol id="statusCol" data-l10n-id="permissions-status" flex="1" width="0"
data-isCurrentSortCol="true"
onclick="gPermissionManager.buildPermissionsList(event.target);"/>
</listheader>
<richlistbox id="permissionsBox" flex="1" selected="false"
onkeypress="gPermissionManager.onPermissionKeyPress(event);"
onselect="gPermissionManager.onPermissionSelect();">
<listheader>
<treecol id="siteCol" data-l10n-id="permissions-site-name" flex="3" width="0"
onclick="gPermissionManager.buildPermissionsList(event.target)"/>
<treecol id="statusCol" data-l10n-id="permissions-status" flex="1" width="0"
data-isCurrentSortCol="true"
onclick="gPermissionManager.buildPermissionsList(event.target);"/>
</listheader>
</richlistbox>
onselect="gPermissionManager.onPermissionSelect();"/>
</vbox>
<hbox class="actionButtons" align="left" flex="1">

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

@ -169,7 +169,7 @@ let gSiteDataSettings = {
sites.sort(sortFunc);
}
let cols = this._list.querySelectorAll("treecol");
let cols = this._list.previousElementSibling.querySelectorAll("treecol");
cols.forEach(c => {
c.removeAttribute("sortDirection");
c.removeAttribute("data-isCurrentSortCol");

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

@ -35,15 +35,14 @@
</hbox>
<separator class="thin"/>
<richlistbox seltype="multiple" id="sitesList" orient="vertical" flex="1">
<listheader>
<treecol flex="4" width="50" data-l10n-id="site-data-column-host" id="hostCol"/>
<treecol flex="1" width="50" data-l10n-id="site-data-column-cookies" id="cookiesCol"/>
<!-- Sorted by usage so the user can quickly see which sites use the most data. -->
<treecol flex="2" width="50" data-l10n-id="site-data-column-storage" id="usageCol" data-isCurrentSortCol="true"/>
<treecol flex="2" width="50" data-l10n-id="site-data-column-last-used" id="lastAccessedCol" />
</listheader>
</richlistbox>
<listheader>
<treecol flex="4" width="50" data-l10n-id="site-data-column-host" id="hostCol"/>
<treecol flex="1" width="50" data-l10n-id="site-data-column-cookies" id="cookiesCol"/>
<!-- Sorted by usage so the user can quickly see which sites use the most data. -->
<treecol flex="2" width="50" data-l10n-id="site-data-column-storage" id="usageCol" data-isCurrentSortCol="true"/>
<treecol flex="2" width="50" data-l10n-id="site-data-column-last-used" id="lastAccessedCol" />
</listheader>
<richlistbox seltype="multiple" id="sitesList" orient="vertical" flex="1"/>
</vbox>
<hbox align="start">

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

@ -466,7 +466,7 @@ var gSitePermissionsManager = {
// Re-append items in the correct order:
items.forEach(item => frag.appendChild(item));
let cols = list.querySelectorAll("treecol");
let cols = list.previousElementSibling.querySelectorAll("treecol");
cols.forEach(c => {
c.removeAttribute("data-isCurrentSortCol");
c.removeAttribute("sortDirection");

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

@ -38,17 +38,16 @@
type="search" oncommand="gSitePermissionsManager.buildPermissionsList();"/>
</hbox>
<separator class="thin"/>
<listheader>
<treecol id="siteCol" data-l10n-id="permissions-site-name" flex="3" width="50"
onclick="gSitePermissionsManager.buildPermissionsList(event.target)"/>
<treecol id="statusCol" data-l10n-id="permissions-status" flex="1" width="50"
data-isCurrentSortCol="true"
onclick="gSitePermissionsManager.buildPermissionsList(event.target);"/>
</listheader>
<richlistbox id="permissionsBox" flex="1" selected="false"
onkeypress="gSitePermissionsManager.onPermissionKeyPress(event);"
onselect="gSitePermissionsManager.onPermissionSelect();">
<listheader>
<treecol id="siteCol" data-l10n-id="permissions-site-name" flex="3" width="50"
onclick="gSitePermissionsManager.buildPermissionsList(event.target)"/>
<treecol id="statusCol" data-l10n-id="permissions-status" flex="1" width="50"
data-isCurrentSortCol="true"
onclick="gSitePermissionsManager.buildPermissionsList(event.target);"/>
</listheader>
</richlistbox>
onselect="gSitePermissionsManager.onPermissionSelect();"/>
</vbox>
<hbox class="actionButtons" align="left" flex="1">

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

@ -1,9 +1,9 @@
This is the debugger.html project output.
See https://github.com/devtools-html/debugger.html
Version 111
Version 112
Comparison: https://github.com/devtools-html/debugger.html/compare/release-110...release-111
Comparison: https://github.com/devtools-html/debugger.html/compare/release-111...release-112
Packages:
- babel-plugin-transform-es2015-modules-commonjs @6.26.2

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

@ -1540,6 +1540,19 @@ html .toggle-button.end.vertical svg {
.search-field .search-nav-buttons .nav-btn path {
fill: var(--theme-comment);
}
.search-field i.loader svg {
animation: rotate 0.5s linear infinite;
}
@keyframes rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
/* 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/>. */
@ -1663,6 +1676,10 @@ html .toggle-button.end.vertical svg {
/* Focus values */
.project-text-search .file-result.focused .img.file {
background-color: white;
}
.project-text-search .file-result.focused,
.project-text-search .result.focused .line-value {
background-color: var(--theme-selection-background);
@ -3071,6 +3088,10 @@ debug-expression-error {
.visible {
visibility: visible;
}
.download-anchor {
display: none;
}
/* 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/>. */

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

@ -23142,6 +23142,7 @@ const getAllGeneratedLocations = dispatcher.task("getAllGeneratedLocations", {
queue: true
});
const getOriginalLocation = dispatcher.task("getOriginalLocation");
const getFileGeneratedRange = dispatcher.task("getFileGeneratedRange");
const getLocationScopes = dispatcher.task("getLocationScopes");
const getOriginalSourceText = dispatcher.task("getOriginalSourceText");
const applySourceMap = dispatcher.task("applySourceMap");
@ -23161,6 +23162,7 @@ module.exports = {
getGeneratedLocation,
getAllGeneratedLocations,
getOriginalLocation,
getFileGeneratedRange,
getLocationScopes,
getOriginalSourceText,
applySourceMap,
@ -23245,7 +23247,8 @@ const contentMap = {
vue: "text/vue",
coffee: "text/coffeescript",
elm: "text/elm",
cljs: "text/x-clojure"
cljc: "text/x-clojure",
cljs: "text/x-clojurescript"
};
/**

19
devtools/client/debugger/new/dist/vendors.js поставляемый
Просмотреть файл

@ -3870,7 +3870,7 @@ module.exports = "<!-- This Source Code Form is subject to the terms of the Mozi
/***/ 350:
/***/ (function(module, exports) {
module.exports = "<!-- This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --><svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 60 12\"><path id=\"base-path\" d=\"M53.9,0H1C0.4,0,0,0.4,0,1v10c0,0.6,0.4,1,1,1h52.9c0.6,0,1.2-0.3,1.5-0.7L60,6l-4.4-5.3C55,0.3,54.5,0,53.9,0z\"></path></svg>"
module.exports = "<!-- This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --><svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 60 14\"><path id=\"base-path\" d=\"M53.07.5H1.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h51.57a2 2 0 0 0 1.53-.7L59.3 7l-4.7-5.8a2 2 0 0 0-1.53-.7z&gt;&lt;/path&gt;&lt;/svg&gt;\">"
/***/ }),
@ -5043,6 +5043,10 @@ class Tree extends Component {
// root item.
autoExpandAll: _propTypes2.default.bool,
// Auto expand a node only if number of its children
// are less than autoExpandNodeChildrenLimit
autoExpandNodeChildrenLimit: _propTypes2.default.number,
// Note: the two properties below are mutually exclusive. Only one of the
// label properties is necessary.
// ID of an element whose textual content serves as an accessible label
@ -5134,7 +5138,8 @@ class Tree extends Component {
}
_autoExpand() {
if (!this.props.autoExpandDepth) {
const { autoExpandDepth, autoExpandNodeChildrenLimit } = this.props;
if (!autoExpandDepth) {
return;
}
@ -5142,14 +5147,18 @@ class Tree extends Component {
// not use the usual DFS infrastructure because we don't want to ignore
// collapsed nodes.
const autoExpand = (item, currentDepth) => {
if (currentDepth >= this.props.autoExpandDepth || this.state.seen.has(item)) {
if (currentDepth >= autoExpandDepth || this.state.seen.has(item)) {
return;
}
const children = this.props.getChildren(item);
if (autoExpandNodeChildrenLimit && children.length > autoExpandNodeChildrenLimit) {
return;
}
this.props.onExpand(item);
this.state.seen.add(item);
const children = this.props.getChildren(item);
const length = children.length;
for (let i = 0; i < length; i++) {
autoExpand(children[i], currentDepth + 1);
@ -7058,7 +7067,7 @@ function formatKeyShortcut(shortcut) {
/***/ 3789:
/***/ (function(module, exports) {
module.exports = "<!-- This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --><svg version=\"1.1\" id=\"loader-1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 40 40\" enable-background=\"new 0 0 40 40\" xml:space=\"preserve\"><path opacity=\"0.2\" fill=\"#000\" d=\"M20.201,5.169c-8.254,0-14.946,6.692-14.946,14.946c0,8.255,6.692,14.946,14.946,14.946 s14.946-6.691,14.946-14.946C35.146,11.861,28.455,5.169,20.201,5.169z M20.201,31.749c-6.425,0-11.634-5.208-11.634-11.634 c0-6.425,5.209-11.634,11.634-11.634c6.425,0,11.633,5.209,11.633,11.634C31.834,26.541,26.626,31.749,20.201,31.749z\"></path><path fill=\"#000\" d=\"M26.013,10.047l1.654-2.866c-2.198-1.272-4.743-2.012-7.466-2.012h0v3.312h0 C22.32,8.481,24.301,9.057,26.013,10.047z\"><animateTransform attributeType=\"xml\" attributeName=\"transform\" type=\"rotate\" from=\"0 20 20\" to=\"360 20 20\" dur=\"0.5s\" repeatCount=\"indefinite\"></animateTransform></path></svg>"
module.exports = "<!-- This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --><svg version=\"1.1\" id=\"loader-1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 40 40\" enable-background=\"new 0 0 40 40\" xml:space=\"preserve\"><path opacity=\"0.2\" fill=\"#000\" d=\"M20.201,5.169c-8.254,0-14.946,6.692-14.946,14.946c0,8.255,6.692,14.946,14.946,14.946 s14.946-6.691,14.946-14.946C35.146,11.861,28.455,5.169,20.201,5.169z M20.201,31.749c-6.425,0-11.634-5.208-11.634-11.634 c0-6.425,5.209-11.634,11.634-11.634c6.425,0,11.633,5.209,11.633,11.634C31.834,26.541,26.626,31.749,20.201,31.749z\"></path><path fill=\"#000\" d=\"M26.013,10.047l1.654-2.866c-2.198-1.272-4.743-2.012-7.466-2.012h0v3.312h0 C22.32,8.481,24.301,9.057,26.013,10.047z\"></path></svg>"
/***/ }),

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

@ -1,6 +1,6 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 60 12">
<path id="base-path" d="M53.9,0H1C0.4,0,0,0.4,0,1v10c0,0.6,0.4,1,1,1h52.9c0.6,0,1.2-0.3,1.5-0.7L60,6l-4.4-5.3C55,0.3,54.5,0,53.9,0z"/>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 60 14">
<path id="base-path" d="M53.07.5H1.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h51.57a2 2 0 0 0 1.53-.7L59.3 7l-4.7-5.8a2 2 0 0 0-1.53-.7z/>
</svg>

До

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

После

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

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

@ -22,17 +22,18 @@ import { features } from "../../utils/prefs";
import { isGeneratedId } from "devtools-source-map";
function isFrameBlackboxed(state, frame) {
const source = getSource(state, frame.location.sourceId);
return source && source.isBlackBoxed;
}
function getSelectedFrameId(state, frames) {
if (!features.originalBlackbox) {
const selectedFrame = getSelectedFrame(state);
return selectedFrame && selectedFrame.id;
let selectedFrame = getSelectedFrame(state);
if (selectedFrame && !isFrameBlackboxed(state, selectedFrame)) {
return selectedFrame.id;
}
const selectedFrame = frames.find(frame => {
const source = getSource(state, frame.location.sourceId);
return source && !source.isBlackBoxed;
});
selectedFrame = frames.find(frame => !isFrameBlackboxed(state, frame));
return selectedFrame && selectedFrame.id;
}

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

@ -9,27 +9,31 @@
* @module actions/sources
*/
import { isOriginalId } from "devtools-source-map";
import { isOriginalId, originalToGeneratedId } from "devtools-source-map";
import { recordEvent } from "../../utils/telemetry";
import { features } from "../../utils/prefs";
import { PROMISE } from "../utils/middleware/promise";
import type { Source } from "../../types";
import type { ThunkArgs } from "../types";
export function toggleBlackBox(source: Source) {
return async ({ dispatch, getState, client, sourceMaps }: ThunkArgs) => {
const { isBlackBoxed, id } = source;
const { isBlackBoxed } = source;
if (!isBlackBoxed) {
recordEvent("blackbox");
}
let promise;
if (features.originalBlackbox && isOriginalId(id)) {
promise = Promise.resolve({ isBlackBoxed: !isBlackBoxed });
if (features.originalBlackbox && isOriginalId(source.id)) {
const range = await sourceMaps.getFileGeneratedRange(source);
const generatedId = originalToGeneratedId(source.id);
promise = client.blackBox(generatedId, isBlackBoxed, range);
} else {
promise = client.blackBox(id, isBlackBoxed);
promise = client.blackBox(source.id, isBlackBoxed);
}
return dispatch({

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

@ -4,7 +4,7 @@
// @flow
import type { SourceLocation, LoadedObject } from "../../types";
import type { ChromeFrame, SourceLocation, LoadedObject } from "../../types";
import type { ServerLocation } from "./types";
export function fromServerLocation(
@ -27,7 +27,7 @@ export function toServerLocation(location: SourceLocation): ServerLocation {
};
}
export function createFrame(frame: any) {
export function createFrame(frame: any): ChromeFrame {
return {
id: frame.callFrameId,
displayName: frame.functionName,

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

@ -345,12 +345,16 @@ function prettyPrint(sourceId: SourceId, indentSize: number): Promise<*> {
return sourceClient.prettyPrint(indentSize);
}
async function blackBox(sourceId: SourceId, isBlackBoxed: boolean): Promise<*> {
async function blackBox(
sourceId: SourceId,
isBlackBoxed: boolean,
range?: Range
): Promise<*> {
const sourceClient = threadClient.source({ actor: sourceId });
if (isBlackBoxed) {
await sourceClient.unblackBox(null);
await sourceClient.unblackBox(range);
} else {
await sourceClient.blackBox(null);
await sourceClient.blackBox(range);
}
return { isBlackBoxed: !isBlackBoxed };

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

@ -14,7 +14,13 @@ import {
getSourceLocationFromMouseEvent,
toSourceLine
} from "../../utils/editor";
import { isPretty, getRawSourceURL, shouldBlackbox } from "../../utils/source";
import {
isPretty,
getRawSourceURL,
getFilename,
shouldBlackbox
} from "../../utils/source";
import { downloadFile } from "../../utils/utils";
import {
getContextMenu,
getPrettySource,
@ -93,6 +99,8 @@ function getMenuItems(
const revealInTreeLabel = L10N.getStr("sourceTabs.revealInTree");
const watchExpressionKey = L10N.getStr("expressions.accesskey");
const watchExpressionLabel = L10N.getStr("expressions.label");
const downloadKey = L10N.getStr("downloadFile.accesskey");
const downloadLabel = L10N.getStr("downloadFile.label");
// menu items
@ -179,6 +187,13 @@ function getMenuItems(
click: () => evaluateInConsole(selectionText)
};
const downloadFileItem = {
id: "node-menu-download-file",
label: downloadLabel,
accesskey: downloadKey,
click: () => downloadFile(selectedSource.text, getFilename(selectedSource))
};
// construct menu
const menuItems = [
copyToClipboardItem,
@ -197,6 +212,8 @@ function getMenuItems(
menuItems.push(watchExpressionItem, evaluateInConsoleItem);
}
menuItems.push(downloadFileItem);
return menuItems;
}

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

@ -248,12 +248,14 @@ class SourceFooter extends PureComponent<Props, State> {
const mapStateToProps = state => {
const selectedSource = getSelectedSource(state);
const selectedId = selectedSource.id;
return {
selectedSource,
mappedSource: getGeneratedSource(state, selectedSource),
prettySource: getPrettySource(state, selectedId),
prettySource: getPrettySource(
state,
selectedSource ? selectedSource.id : null
),
endPanelCollapsed: getPaneCollapse(state, "end")
};
};

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

@ -261,12 +261,19 @@ export class Outline extends Component<Props, State> {
const mapStateToProps = state => {
const selectedSource = getSelectedSource(state);
const symbols = getSymbols(state, selectedSource);
const symbols = selectedSource ? getSymbols(state, selectedSource) : null;
return {
symbols,
selectedSource,
selectedLocation: getSelectedLocation(state),
getFunctionText: line => findFunctionText(line, selectedSource, symbols)
getFunctionText: line => {
if (selectedSource) {
return findFunctionText(line, selectedSource, symbols);
}
return null;
}
};
};

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

@ -175,7 +175,7 @@ class Breakpoint extends PureComponent<Props> {
const getFormattedFrame = createSelector(
getSelectedSource,
getSelectedFrame,
(selectedSource: Source, frame: Frame): ?FormattedFrame => {
(selectedSource: ?Source, frame: ?Frame): ?FormattedFrame => {
if (!frame) {
return null;
}

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

@ -271,7 +271,7 @@ class CommandBar extends Component<Props> {
active: skipPausing
}
)}
title={L10N.getStr("skipPausingTooltip")}
title={L10N.getStr("skipPausingTooltip.label")}
onClick={toggleSkipPausing}
>
<AccessibleImage className="skipPausing" />

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

@ -159,7 +159,7 @@ function update(
// https://github.com/devtools-html/debugger.html/blob/master/src/reducers/sources.js#L179-L185
type OuterState = { ast: Record<ASTState> };
export function getSymbols(state: OuterState, source?: Source): ?Symbols {
export function getSymbols(state: OuterState, source: ?Source): ?Symbols {
if (!source) {
return null;
}
@ -177,7 +177,7 @@ export function hasSymbols(state: OuterState, source: Source): boolean {
return !symbols.loading;
}
export function isSymbolsLoading(state: OuterState, source: Source): boolean {
export function isSymbolsLoading(state: OuterState, source: ?Source): boolean {
const symbols = getSymbols(state, source);
if (!symbols) {
return false;

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

@ -13,10 +13,11 @@ import makeRecord from "../utils/makeRecord";
import { List, Map } from "immutable";
import { omit, zip } from "lodash";
import { createSelector } from "../utils/createSelector";
import { createSelector } from "reselect";
import { prefs } from "../utils/prefs";
import type { Expression } from "../types";
import type { Selector, State } from "../reducers/types";
import type { Action } from "../actions/types";
import type { Record } from "../utils/makeRecord";
@ -158,38 +159,36 @@ function updateExpressionInList(
}
function deleteExpression(state: Record<ExpressionState>, input: string) {
const index = getExpressions({ expressions: state }).findIndex(
e => e.input == input
);
const index = state.expressions.findIndex(e => e.input == input);
const newState = state.deleteIn(["expressions", index]);
storeExpressions(newState);
return newState;
}
type OuterState = { expressions: Record<ExpressionState> };
const getExpressionsWrapper = state => state.expressions;
export const getExpressions = createSelector(
export const getExpressions: Selector<List<Expression>> = createSelector(
getExpressionsWrapper,
expressions => expressions.expressions
);
export const getAutocompleteMatches = createSelector(
export const getAutocompleteMatches: Selector<
Map<string, List<string>>
> = createSelector(
getExpressionsWrapper,
expressions => expressions.autocompleteMatches
);
export function getExpression(state: OuterState, input: string) {
export function getExpression(state: State, input: string) {
return getExpressions(state).find(exp => exp.input == input);
}
export function getAutocompleteMatchset(state: OuterState) {
export function getAutocompleteMatchset(state: State) {
const input = state.expressions.get("currentAutocompleteInput");
return getAutocompleteMatches(state).get(input);
}
export const getExpressionError = createSelector(
export const getExpressionError: Selector<boolean> = createSelector(
getExpressionsWrapper,
expressions => expressions.expressionError
);

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

@ -10,15 +10,23 @@
* @module reducers/pause
*/
import { createSelector } from "../utils/createSelector";
import { createSelector } from "reselect";
import { isGeneratedId } from "devtools-source-map";
import { prefs } from "../utils/prefs";
import { getSelectedSource } from "./sources";
import type { OriginalScope } from "../utils/pause/mapScopes";
import type { Action } from "../actions/types";
import type { State } from "./types";
import type { Why, Scope, SourceId, FrameId, MappedLocation } from "../types";
import type { Selector, State } from "./types";
import type {
Why,
Scope,
SourceId,
ChromeFrame,
Frame,
FrameId,
MappedLocation
} from "../types";
export type Command =
| null
@ -340,7 +348,7 @@ function getCurrentPauseState(state: OuterState): ThreadPauseState {
return getThreadPauseState(state.pause, state.pause.currentThread);
}
export const getAllPopupObjectProperties = createSelector(
export const getAllPopupObjectProperties: Selector<{}> = createSelector(
getCurrentPauseState,
pauseWrapper => pauseWrapper.loadedObjects
);
@ -534,7 +542,7 @@ export function getTopFrame(state: OuterState) {
return frames && frames[0];
}
export const getSelectedFrame = createSelector(
export const getSelectedFrame: Selector<?Frame> = createSelector(
getSelectedFrameId,
getFrames,
(selectedFrameId, frames) => {
@ -556,7 +564,7 @@ export function getSkipPausing(state: OuterState) {
// NOTE: currently only used for chrome
export function getChromeScopes(state: OuterState) {
const frame = getSelectedFrame(state);
const frame: ?ChromeFrame = (getSelectedFrame(state): any);
return frame ? frame.scopeChain : undefined;
}

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

@ -9,7 +9,7 @@
* @module reducers/sources
*/
import { createSelector } from "../utils/createSelector";
import { createSelector } from "reselect";
import {
getPrettySourceURL,
underRoot,
@ -21,7 +21,7 @@ import { originalToGeneratedId } from "devtools-source-map";
import { prefs } from "../utils/prefs";
import type { Source, SourceId, SourceLocation } from "../types";
import type { PendingSelectedLocation } from "./types";
import type { PendingSelectedLocation, Selector } from "./types";
import type { Action, DonePromiseAction } from "../actions/types";
import type { LoadSourceAction } from "../actions/types/SourceAction";
@ -345,7 +345,14 @@ export function getSourcesByURL(state: OuterState, url: string): Source[] {
return getSourcesByUrlInSources(getSources(state), getUrls(state), url);
}
export function getGeneratedSource(state: OuterState, source: Source): Source {
export function getGeneratedSource(
state: OuterState,
source: ?Source
): ?Source {
if (!source) {
return null;
}
if (isGenerated(source)) {
return source;
}
@ -357,7 +364,11 @@ export function getPendingSelectedLocation(state: OuterState) {
return state.sources.pendingSelectedLocation;
}
export function getPrettySource(state: OuterState, id: string) {
export function getPrettySource(state: OuterState, id: ?string) {
if (!id) {
return;
}
const source = getSource(state, id);
if (!source) {
return;
@ -470,17 +481,17 @@ export function getSourceList(state: OuterState): Source[] {
return (Object.values(getSources(state)): any);
}
export const getSourceCount = createSelector(
export const getSourceCount: Selector<number> = createSelector(
getSources,
sources => Object.keys(sources).length
);
export const getSelectedLocation = createSelector(
export const getSelectedLocation: Selector<?SourceLocation> = createSelector(
getSourcesState,
sources => sources.selectedLocation
);
export const getSelectedSource = createSelector(
export const getSelectedSource: Selector<?Source> = createSelector(
getSelectedLocation,
getSources,
(selectedLocation: ?SourceLocation, sources: SourcesMap): ?Source => {

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

@ -9,7 +9,7 @@
* @module reducers/tabs
*/
import { createSelector } from "../utils/createSelector";
import { createSelector } from "reselect";
import { isOriginalId } from "devtools-source-map";
import move from "lodash-move";
@ -25,6 +25,7 @@ import {
import type { Action } from "../actions/types";
import type { SourcesState } from "./sources";
import type { Source } from "../types";
import type { Selector } from "./types";
export type Tab = {
url: string,
@ -194,7 +195,7 @@ type OuterState = { tabs: TabList, sources: SourcesState };
export const getTabs = (state: OuterState): TabList => state.tabs;
export const getSourceTabs = createSelector(
export const getSourceTabs: Selector<Tab[]> = createSelector(
getTabs,
getSources,
getUrls,
@ -202,7 +203,7 @@ export const getSourceTabs = createSelector(
tabs.filter(tab => getTabWithOrWithoutUrl(tab, sources, urls))
);
export const getSourcesForTabs = createSelector(
export const getSourcesForTabs: Selector<Source[]> = createSelector(
getSourceTabs,
getSources,
getUrls,

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

@ -5,7 +5,7 @@
// @flow
import { sortBy, uniq } from "lodash";
import { createSelector } from "../utils/createSelector";
import { createSelector } from "reselect";
import {
getSources,
getBreakpointsList,
@ -20,7 +20,7 @@ import type {
BreakpointId,
SourceLocation
} from "../types";
import type { SourcesMap } from "../reducers/types";
import type { Selector, SourcesMap } from "../reducers/types";
export type BreakpointSources = Array<{
source: Source,
@ -37,7 +37,7 @@ export type FormattedBreakpoint = {|
function formatBreakpoint(
breakpoint: Breakpoint,
selectedSource: Source
selectedSource: ?Source
): FormattedBreakpoint {
const { id, condition, disabled } = breakpoint;
@ -55,7 +55,7 @@ function formatBreakpoint(
function getBreakpointsForSource(
source: Source,
selectedSource: Source,
selectedSource: ?Source,
breakpoints: Breakpoint[]
) {
return breakpoints
@ -72,7 +72,6 @@ function getBreakpointsForSource(
function findBreakpointSources(
sources: SourcesMap,
selectedSource: Source,
breakpoints: Breakpoint[]
): Source[] {
const sourceIds: string[] = uniq(breakpoints.map(bp => bp.location.sourceId));
@ -84,12 +83,12 @@ function findBreakpointSources(
return sortBy(breakpointSources, (source: Source) => getFilename(source));
}
export const getBreakpointSources = createSelector(
export const getBreakpointSources: Selector<BreakpointSources> = createSelector(
getBreakpointsList,
getSources,
getSelectedSource,
(breakpoints: Breakpoint[], sources: SourcesMap, selectedSource: Source) =>
findBreakpointSources(sources, selectedSource, breakpoints)
(breakpoints: Breakpoint[], sources: SourcesMap, selectedSource: ?Source) =>
findBreakpointSources(sources, breakpoints)
.map(source => ({
source,
breakpoints: getBreakpointsForSource(

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

@ -4,12 +4,13 @@
// @flow
import { createSelector } from "../utils/createSelector";
import { createSelector } from "reselect";
import type {
BreakpointsState,
XHRBreakpointsList
} from "../reducers/breakpoints";
import type { Selector } from "../reducers/types";
type OuterState = { breakpoints: BreakpointsState };
@ -17,7 +18,7 @@ export function getXHRBreakpoints(state: OuterState): XHRBreakpointsList {
return state.breakpoints.xhrBreakpoints;
}
export const shouldPauseOnAnyXHR = createSelector(
export const shouldPauseOnAnyXHR: Selector<boolean> = createSelector(
getXHRBreakpoints,
xhrBreakpoints => {
const emptyBp = xhrBreakpoints.find(({ path }) => path.length === 0);

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

@ -13,7 +13,7 @@ import { isOriginal } from "../utils/source";
import { get } from "lodash";
import type { Frame, Source } from "../types";
import type { SourcesMap } from "../reducers/sources";
import { createSelector } from "../utils/createSelector";
import { createSelector } from "reselect";
function getLocation(frame, isGeneratedSource) {
return isGeneratedSource

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

@ -5,7 +5,7 @@
// @flow
import { isGeneratedId } from "devtools-source-map";
import { createSelector } from "../utils/createSelector";
import { createSelector } from "reselect";
import { uniqBy } from "lodash";
import { getBreakpointsList } from "../reducers/breakpoints";
@ -15,6 +15,7 @@ import memoize from "../utils/memoize";
import { sortBreakpoints } from "../utils/breakpoint";
import type { Breakpoint, Source } from "../types";
import type { Selector } from "../reducers/types";
function getLocation(breakpoint, isGeneratedSource) {
return isGeneratedSource
@ -36,7 +37,7 @@ const formatBreakpoint = memoize(function(breakpoint, selectedSource) {
};
});
function isVisible(breakpoint, selectedSource) {
function isVisible(breakpoint: Breakpoint, selectedSource: Source) {
const sourceId = selectedSource.id;
const isGeneratedSource = isGeneratedId(sourceId);
@ -47,16 +48,20 @@ function isVisible(breakpoint, selectedSource) {
/*
* Finds the breakpoints, which appear in the selected source.
*/
export const getVisibleBreakpoints = createSelector(
export const getVisibleBreakpoints: Selector<?(Breakpoint[])> = createSelector(
getSelectedSource,
getBreakpointsList,
(selectedSource: Source, breakpoints: Breakpoint[]) => {
if (!selectedSource) {
(selectedSource: ?Source, breakpoints: Breakpoint[]) => {
if (selectedSource == null) {
return null;
}
// FIXME: Even though selectedSource is checked above, it fails type
// checking for isVisible
const source: Source = selectedSource;
return breakpoints
.filter(bp => isVisible(bp, selectedSource))
.filter(bp => isVisible(bp, source))
.map(bp => formatBreakpoint(bp, selectedSource));
}
);
@ -64,13 +69,12 @@ export const getVisibleBreakpoints = createSelector(
/*
* Finds the first breakpoint per line, which appear in the selected source.
*/
export const getFirstVisibleBreakpoints = createSelector(
getVisibleBreakpoints,
breakpoints => {
if (!breakpoints) {
return null;
}
return uniqBy(sortBreakpoints(breakpoints), bp => bp.location.line);
export const getFirstVisibleBreakpoints: Selector<
Breakpoint[]
> = createSelector(getVisibleBreakpoints, breakpoints => {
if (!breakpoints) {
return [];
}
);
return (uniqBy(sortBreakpoints(breakpoints), bp => bp.location.line): any);
});

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

@ -3,7 +3,7 @@
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
import { groupBy, get, sortedUniqBy } from "lodash";
import { createSelector } from "../utils/createSelector";
import { createSelector } from "reselect";
import { getViewport } from "../selectors";
import { getVisibleBreakpoints } from "./visibleBreakpoints";

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

@ -7,11 +7,12 @@
import { getSelectedLocation } from "../reducers/sources";
import { getSelectedFrame } from "../reducers/pause";
import { isOriginalId } from "devtools-source-map";
import { createSelector } from "../utils/createSelector";
import { createSelector } from "reselect";
import type { Frame, SourceLocation } from "../types";
import type { Selector } from "../reducers/types";
function getLocation(frame: Frame, location?: SourceLocation) {
function getLocation(frame: Frame, location: ?SourceLocation) {
if (!location) {
return frame.location;
}
@ -21,7 +22,10 @@ function getLocation(frame: Frame, location?: SourceLocation) {
: frame.location;
}
export const getVisibleSelectedFrame = createSelector(
export const getVisibleSelectedFrame: Selector<?{
id: string,
location: SourceLocation
}> = createSelector(
getSelectedLocation,
getSelectedFrame,
(selectedLocation, selectedFrame) => {

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

@ -18,7 +18,6 @@ DebuggerModules(
'build-query.js',
'clipboard.js',
'connect.js',
'createSelector.js',
'dbg.js',
'defer.js',
'DevToolsUtils.js',

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

@ -61,7 +61,7 @@ if (isDevelopment()) {
pref("devtools.debugger.features.map-expression-bindings", true);
pref("devtools.debugger.features.map-await-expression", true);
pref("devtools.debugger.features.xhr-breakpoints", true);
pref("devtools.debugger.features.origial-blackbox", false);
pref("devtools.debugger.features.origial-blackbox", true);
pref("devtools.debugger.features.windowless-workers", false);
}

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

@ -265,6 +265,7 @@ const contentTypeModeMap = {
"text/jsx": { name: "jsx" },
"text/x-elm": { name: "elm" },
"text/x-clojure": { name: "clojure" },
"text/x-clojurescript": { name: "clojure" },
"text/wasm": { name: "text" },
"text/html": { name: "htmlmixed" }
};

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

@ -52,3 +52,20 @@ export function endTruncateStr(str: any, size: number) {
export function waitForMs(ms: number): Promise<void> {
return new Promise(resolve => setTimeout(resolve, ms));
}
export function downloadFile(data: string, fileName: string) {
const { body } = document;
if (!body) {
return;
}
const a = document.createElement("a");
body.appendChild(a);
a.className = "download-anchor";
a.href = window.URL.createObjectURL(
new Blob([data], { type: "text/javascript" })
);
a.setAttribute("download", fileName);
a.click();
body.removeChild(a);
}

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

@ -740,6 +740,7 @@ skip-if = os == "win" # Bug 1393121
[browser_dbg-quick-open.js]
skip-if = os == "win"
[browser_dbg-search-project.js]
[browser_dbg-blackbox-original.js]
[browser_dbg-sourcemaps.js]
[browser_dbg-sourcemaps-disabled.js]
[browser_dbg-sourcemaps-reload.js]

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

@ -0,0 +1,42 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
// This source map does not have source contents, so it's fetched separately
add_task(async function() {
// NOTE: the CORS call makes the test run times inconsistent
await pushPref("devtools.debugger.features.map-scopes", true);
const dbg = await initDebugger("doc-sourcemaps3.html");
const {
selectors: { getBreakpoint, getBreakpointCount },
getState
} = dbg;
await waitForSources(dbg, "bundle.js", "sorted.js", "test.js");
const sortedSrc = findSource(dbg, "sorted.js");
await selectSource(dbg, sortedSrc);
await clickElement(dbg, "blackbox");
await waitForDispatch(dbg, "BLACKBOX");
// breakpoint at line 38 in sorted
await addBreakpoint(dbg, sortedSrc, 38);
// invoke test
invokeInTab("test");
// should not pause
is(isPaused(dbg), false);
// unblackbox
await clickElement(dbg, "blackbox");
await waitForDispatch(dbg, "BLACKBOX");
// click on test
invokeInTab("test");
// should pause
await waitForPaused(dbg);
ok(true, "blackbox works")
});

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

@ -1136,7 +1136,8 @@ const selectors = {
`.outline-list__element:nth-child(${i}) .function-signature`,
outlineItems: ".outline-list__element",
conditionalPanelInput: ".conditional-breakpoint-panel input",
searchField: ".search-field"
searchField: ".search-field",
blackbox: ".action.black-box"
};
function getSelector(elementName, ...args) {

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

@ -82,9 +82,9 @@ stepInTooltip=Step in %S
# button that steps out of a function call.
stepOutTooltip=Step out %S
# LOCALIZATION NOTE (skipPausingTooltip): The tooltip text for disabling all
# LOCALIZATION NOTE (skipPausingTooltip.label): The tooltip text for disabling all
# breakpoints and pausing triggers
skipPausingTooltip=Skip all pausing
skipPausingTooltip.label=Deactivate breakpoints
# LOCALIZATION NOTE (pauseButtonItem): The label that is displayed for the dropdown pause
# list item when the debugger is in a running state.
@ -510,6 +510,11 @@ editor.conditionalPanel.close=Cancel edit breakpoint and close
editor.jumpToMappedLocation1=Jump to %S location
editor.jumpToMappedLocation1.accesskey=m
# LOCALIZATION NOTE (downloadFile.label): Context menu item
# for downloading a source's content
downloadFile.label=Download file
downloadFile.accesskey=d
# LOCALIZATION NOTE (framework.disableGrouping): This is the text that appears in the
# context menu to disable framework grouping.
framework.disableGrouping=Disable framework grouping

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

@ -67,5 +67,5 @@ pref("devtools.debugger.features.skip-pausing", true);
pref("devtools.debugger.features.autocomplete-expressions", false);
pref("devtools.debugger.features.map-expression-bindings", true);
pref("devtools.debugger.features.xhr-breakpoints", true);
pref("devtools.debugger.features.origial-blackbox", false);
pref("devtools.debugger.features.origial-blackbox", true);
pref("devtools.debugger.features.windowless-workers", false);

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

@ -4103,6 +4103,10 @@ class Tree extends Component {
// root item.
autoExpandAll: _propTypes2.default.bool,
// Auto expand a node only if number of its children
// are less than autoExpandNodeChildrenLimit
autoExpandNodeChildrenLimit: _propTypes2.default.number,
// Note: the two properties below are mutually exclusive. Only one of the
// label properties is necessary.
// ID of an element whose textual content serves as an accessible label
@ -4194,7 +4198,8 @@ class Tree extends Component {
}
_autoExpand() {
if (!this.props.autoExpandDepth) {
const { autoExpandDepth, autoExpandNodeChildrenLimit } = this.props;
if (!autoExpandDepth) {
return;
}
@ -4202,14 +4207,18 @@ class Tree extends Component {
// not use the usual DFS infrastructure because we don't want to ignore
// collapsed nodes.
const autoExpand = (item, currentDepth) => {
if (currentDepth >= this.props.autoExpandDepth || this.state.seen.has(item)) {
if (currentDepth >= autoExpandDepth || this.state.seen.has(item)) {
return;
}
const children = this.props.getChildren(item);
if (autoExpandNodeChildrenLimit && children.length > autoExpandNodeChildrenLimit) {
return;
}
this.props.onExpand(item);
this.state.seen.add(item);
const children = this.props.getChildren(item);
const length = children.length;
for (let i = 0; i < length; i++) {
autoExpand(children[i], currentDepth + 1);

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

@ -449,6 +449,7 @@ const getAllGeneratedLocations = dispatcher.task("getAllGeneratedLocations", {
queue: true
});
const getOriginalLocation = dispatcher.task("getOriginalLocation");
const getFileGeneratedRange = dispatcher.task("getFileGeneratedRange");
const getLocationScopes = dispatcher.task("getLocationScopes");
const getOriginalSourceText = dispatcher.task("getOriginalSourceText");
const applySourceMap = dispatcher.task("applySourceMap");
@ -468,6 +469,7 @@ module.exports = {
getGeneratedLocation,
getAllGeneratedLocations,
getOriginalLocation,
getFileGeneratedRange,
getLocationScopes,
getOriginalSourceText,
applySourceMap,
@ -552,7 +554,8 @@ const contentMap = {
vue: "text/vue",
coffee: "text/coffeescript",
elm: "text/elm",
cljs: "text/x-clojure"
cljc: "text/x-clojure",
cljs: "text/x-clojurescript"
};
/**

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

@ -483,7 +483,8 @@ const contentMap = {
vue: "text/vue",
coffee: "text/coffeescript",
elm: "text/elm",
cljs: "text/x-clojure"
cljc: "text/x-clojure",
cljs: "text/x-clojurescript"
};
/**
@ -1876,6 +1877,7 @@ const {
getAllGeneratedLocations,
getOriginalLocation,
getOriginalSourceText,
getFileGeneratedRange,
hasMappedSource,
clearSourceMaps,
applySourceMap
@ -1900,6 +1902,7 @@ self.onmessage = workerHandler({
getOriginalLocation,
getOriginalSourceText,
getOriginalStackFrames,
getFileGeneratedRange,
hasMappedSource,
applySourceMap,
clearSourceMaps
@ -2187,6 +2190,34 @@ async function getOriginalSourceText(originalSource) {
};
}
async function getFileGeneratedRange(originalSource) {
assert(isOriginalId(originalSource.id), "Source is not an original source");
const map = await getSourceMap(originalToGeneratedId(originalSource.id));
if (!map) {
return;
}
const start = map.generatedPositionFor({
source: originalSource.url,
line: 1,
column: 0,
bias: SourceMapConsumer.LEAST_UPPER_BOUND
});
const end = map.generatedPositionFor({
source: originalSource.url,
line: Number.MAX_SAFE_INTEGER,
column: Number.MAX_SAFE_INTEGER,
bias: SourceMapConsumer.GREATEST_LOWER_BOUND
});
return {
start,
end
};
}
async function hasMappedSource(location) {
if (isOriginalId(location.sourceId)) {
return true;
@ -2218,6 +2249,7 @@ module.exports = {
getAllGeneratedLocations,
getOriginalLocation,
getOriginalSourceText,
getFileGeneratedRange,
applySourceMap,
clearSourceMaps,
hasMappedSource

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

@ -1235,10 +1235,10 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
return res ? res : {};
},
onSources: function(request) {
for (const source of this.dbg.findSources()) {
onSources: async function(request) {
await Promise.all(this.dbg.findSources().map(source => {
this.sources.createSourceActor(source);
}
}));
// No need to flush the new source packets here, as we are sending the
// list of sources out immediately and we don't need to invoke the

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

@ -20,7 +20,7 @@ void SMILBoolType::Init(nsSMILValue& aValue) const {
void SMILBoolType::Destroy(nsSMILValue& aValue) const {
MOZ_ASSERT(aValue.mType == this, "Unexpected SMIL value");
aValue.mU.mBool = false;
aValue.mType = nsSMILNullType::Singleton();
aValue.mType = SMILNullType::Singleton();
}
nsresult SMILBoolType::Assign(nsSMILValue& aDest,

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

@ -6,7 +6,7 @@
/* representation of a value for a SMIL-animated CSS property */
#include "nsSMILCSSValueType.h"
#include "SMILCSSValueType.h"
#include "nsComputedDOMStyle.h"
#include "nsString.h"
@ -27,12 +27,13 @@
#include "nsStyleUtil.h"
#include "nsIDocument.h"
using namespace mozilla;
using namespace mozilla::dom;
namespace mozilla {
typedef AutoTArray<RefPtr<RawServoAnimationValue>, 1> ServoAnimationValues;
/*static*/ nsSMILCSSValueType nsSMILCSSValueType::sSingleton;
/*static*/ SMILCSSValueType SMILCSSValueType::sSingleton;
struct ValueWrapper {
ValueWrapper(nsCSSPropertyID aPropID, const AnimationValue& aValue)
@ -118,21 +119,21 @@ static const ValueWrapper* ExtractValueWrapper(const nsSMILValue& aValue) {
// Class methods
// -------------
void nsSMILCSSValueType::Init(nsSMILValue& aValue) const {
void SMILCSSValueType::Init(nsSMILValue& aValue) const {
MOZ_ASSERT(aValue.IsNull(), "Unexpected SMIL value type");
aValue.mU.mPtr = nullptr;
aValue.mType = this;
}
void nsSMILCSSValueType::Destroy(nsSMILValue& aValue) const {
void SMILCSSValueType::Destroy(nsSMILValue& aValue) const {
MOZ_ASSERT(aValue.mType == this, "Unexpected SMIL value type");
delete static_cast<ValueWrapper*>(aValue.mU.mPtr);
aValue.mType = nsSMILNullType::Singleton();
aValue.mType = SMILNullType::Singleton();
}
nsresult nsSMILCSSValueType::Assign(nsSMILValue& aDest,
const nsSMILValue& aSrc) const {
nsresult SMILCSSValueType::Assign(nsSMILValue& aDest,
const nsSMILValue& aSrc) const {
MOZ_ASSERT(aDest.mType == aSrc.mType, "Incompatible SMIL types");
MOZ_ASSERT(aDest.mType == this, "Unexpected SMIL value type");
const ValueWrapper* srcWrapper = ExtractValueWrapper(aSrc);
@ -155,8 +156,8 @@ nsresult nsSMILCSSValueType::Assign(nsSMILValue& aDest,
return NS_OK;
}
bool nsSMILCSSValueType::IsEqual(const nsSMILValue& aLeft,
const nsSMILValue& aRight) const {
bool SMILCSSValueType::IsEqual(const nsSMILValue& aLeft,
const nsSMILValue& aRight) const {
MOZ_ASSERT(aLeft.mType == aRight.mType, "Incompatible SMIL types");
MOZ_ASSERT(aLeft.mType == this, "Unexpected SMIL value");
const ValueWrapper* leftWrapper = ExtractValueWrapper(aLeft);
@ -238,7 +239,7 @@ static bool AddOrAccumulate(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
CompositeOperation aCompositeOp, uint64_t aCount) {
MOZ_ASSERT(aValueToAdd.mType == aDest.mType,
"Trying to add mismatching types");
MOZ_ASSERT(aValueToAdd.mType == &nsSMILCSSValueType::sSingleton,
MOZ_ASSERT(aValueToAdd.mType == &SMILCSSValueType::sSingleton,
"Unexpected SMIL value type");
MOZ_ASSERT(aCompositeOp == CompositeOperation::Add ||
aCompositeOp == CompositeOperation::Accumulate,
@ -275,16 +276,16 @@ static bool AddOrAccumulate(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
aCompositeOp, aCount);
}
nsresult nsSMILCSSValueType::SandwichAdd(nsSMILValue& aDest,
const nsSMILValue& aValueToAdd) const {
nsresult SMILCSSValueType::SandwichAdd(nsSMILValue& aDest,
const nsSMILValue& aValueToAdd) const {
return AddOrAccumulate(aDest, aValueToAdd, CompositeOperation::Add, 1)
? NS_OK
: NS_ERROR_FAILURE;
}
nsresult nsSMILCSSValueType::Add(nsSMILValue& aDest,
const nsSMILValue& aValueToAdd,
uint32_t aCount) const {
nsresult SMILCSSValueType::Add(nsSMILValue& aDest,
const nsSMILValue& aValueToAdd,
uint32_t aCount) const {
return AddOrAccumulate(aDest, aValueToAdd, CompositeOperation::Accumulate,
aCount)
? NS_OK
@ -328,9 +329,9 @@ static nsresult ComputeDistanceForServo(const ValueWrapper* aFromWrapper,
return NS_OK;
}
nsresult nsSMILCSSValueType::ComputeDistance(const nsSMILValue& aFrom,
const nsSMILValue& aTo,
double& aDistance) const {
nsresult SMILCSSValueType::ComputeDistance(const nsSMILValue& aFrom,
const nsSMILValue& aTo,
double& aDistance) const {
MOZ_ASSERT(aFrom.mType == aTo.mType, "Trying to compare different types");
MOZ_ASSERT(aFrom.mType == this, "Unexpected source type");
@ -388,10 +389,10 @@ static nsresult InterpolateForServo(const ValueWrapper* aStartWrapper,
return NS_OK;
}
nsresult nsSMILCSSValueType::Interpolate(const nsSMILValue& aStartVal,
const nsSMILValue& aEndVal,
double aUnitDistance,
nsSMILValue& aResult) const {
nsresult SMILCSSValueType::Interpolate(const nsSMILValue& aStartVal,
const nsSMILValue& aEndVal,
double aUnitDistance,
nsSMILValue& aResult) const {
MOZ_ASSERT(aStartVal.mType == aEndVal.mType,
"Trying to interpolate different types");
MOZ_ASSERT(aStartVal.mType == this, "Unexpected types for interpolation");
@ -437,11 +438,11 @@ static ServoAnimationValues ValueFromStringHelper(nsCSSPropertyID aPropID,
}
// static
void nsSMILCSSValueType::ValueFromString(nsCSSPropertyID aPropID,
Element* aTargetElement,
const nsAString& aString,
nsSMILValue& aValue,
bool* aIsContextSensitive) {
void SMILCSSValueType::ValueFromString(nsCSSPropertyID aPropID,
Element* aTargetElement,
const nsAString& aString,
nsSMILValue& aValue,
bool* aIsContextSensitive) {
MOZ_ASSERT(aValue.IsNull(), "Outparam should be null-typed");
nsPresContext* presContext =
nsContentUtils::GetContextForContent(aTargetElement);
@ -478,7 +479,7 @@ void nsSMILCSSValueType::ValueFromString(nsCSSPropertyID aPropID,
}
// static
nsSMILValue nsSMILCSSValueType::ValueFromAnimationValue(
nsSMILValue SMILCSSValueType::ValueFromAnimationValue(
nsCSSPropertyID aPropID, Element* aTargetElement,
const AnimationValue& aValue) {
nsSMILValue result;
@ -503,9 +504,9 @@ nsSMILValue nsSMILCSSValueType::ValueFromAnimationValue(
}
// static
bool nsSMILCSSValueType::SetPropertyValues(const nsSMILValue& aValue,
DeclarationBlock& aDecl) {
MOZ_ASSERT(aValue.mType == &nsSMILCSSValueType::sSingleton,
bool SMILCSSValueType::SetPropertyValues(const nsSMILValue& aValue,
DeclarationBlock& aDecl) {
MOZ_ASSERT(aValue.mType == &SMILCSSValueType::sSingleton,
"Unexpected SMIL value type");
const ValueWrapper* wrapper = ExtractValueWrapper(aValue);
if (!wrapper) {
@ -522,9 +523,8 @@ bool nsSMILCSSValueType::SetPropertyValues(const nsSMILValue& aValue,
}
// static
nsCSSPropertyID nsSMILCSSValueType::PropertyFromValue(
const nsSMILValue& aValue) {
if (aValue.mType != &nsSMILCSSValueType::sSingleton) {
nsCSSPropertyID SMILCSSValueType::PropertyFromValue(const nsSMILValue& aValue) {
if (aValue.mType != &SMILCSSValueType::sSingleton) {
return eCSSProperty_UNKNOWN;
}
@ -537,10 +537,10 @@ nsCSSPropertyID nsSMILCSSValueType::PropertyFromValue(
}
// static
void nsSMILCSSValueType::FinalizeValue(nsSMILValue& aValue,
const nsSMILValue& aValueToMatch) {
void SMILCSSValueType::FinalizeValue(nsSMILValue& aValue,
const nsSMILValue& aValueToMatch) {
MOZ_ASSERT(aValue.mType == aValueToMatch.mType, "Incompatible SMIL types");
MOZ_ASSERT(aValue.mType == &nsSMILCSSValueType::sSingleton,
MOZ_ASSERT(aValue.mType == &SMILCSSValueType::sSingleton,
"Unexpected SMIL value type");
ValueWrapper* valueWrapper = ExtractValueWrapper(aValue);
@ -569,3 +569,5 @@ void nsSMILCSSValueType::FinalizeValue(nsSMILValue& aValue,
aValue.mU.mPtr =
new ValueWrapper(valueToMatchWrapper->mPropID, std::move(zeroValues));
}
} // namespace mozilla

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

@ -20,18 +20,17 @@ class DeclarationBlock;
namespace dom {
class Element;
} // namespace dom
} // namespace mozilla
/*
* nsSMILCSSValueType: Represents a SMIL-animated CSS value.
* SMILCSSValueType: Represents a SMIL-animated CSS value.
*/
class nsSMILCSSValueType : public nsISMILType {
class SMILCSSValueType : public nsISMILType {
public:
typedef mozilla::dom::Element Element;
typedef mozilla::AnimationValue AnimationValue;
// Singleton for nsSMILValue objects to hold onto.
static nsSMILCSSValueType sSingleton;
static SMILCSSValueType sSingleton;
protected:
// nsISMILType Methods
@ -59,7 +58,7 @@ class nsSMILCSSValueType : public nsISMILType {
* string is interpreted as a value for the given property on the given
* element.
*
* On failure, this method leaves aValue.mType == nsSMILNullType::sSingleton.
* On failure, this method leaves aValue.mType == SMILNullType::sSingleton.
* Otherwise, this method leaves aValue.mType == this class's singleton.
*
* @param aPropID The property for which we're parsing a value.
@ -75,7 +74,7 @@ class nsSMILCSSValueType : public nsISMILType {
* false otherwise. May be nullptr.
* Not set if the method fails.
* @pre aValue.IsNull()
* @post aValue.IsNull() || aValue.mType == nsSMILCSSValueType::sSingleton
* @post aValue.IsNull() || aValue.mType == SMILCSSValueType::sSingleton
*/
static void ValueFromString(nsCSSPropertyID aPropID, Element* aTargetElement,
const nsAString& aString, nsSMILValue& aValue,
@ -109,7 +108,7 @@ class nsSMILCSSValueType : public nsISMILType {
* @param aValue The nsSMILValue to examine.
* @return The nsCSSPropertyID enum value of the property animated
* by |aValue|, or eCSSProperty_UNKNOWN if the type of
* |aValue| is not nsSMILCSSValueType.
* |aValue| is not SMILCSSValueType.
*/
static nsCSSPropertyID PropertyFromValue(const nsSMILValue& aValue);
@ -120,9 +119,9 @@ class nsSMILCSSValueType : public nsISMILType {
* There is no indication if this method fails. If a suitable zero value could
* not be created, |aValue| is simply unmodified.
*
* @param aValue The nsSMILValue (of type nsSMILCSSValueType) to
* @param aValue The nsSMILValue (of type SMILCSSValueType) to
* possibly update.
* @param aValueToMatch A nsSMILValue (of type nsSMILCSSValueType) for which
* @param aValueToMatch A nsSMILValue (of type SMILCSSValueType) for which
* a corresponding zero value will be created if |aValue|
* is empty.
*/
@ -131,7 +130,9 @@ class nsSMILCSSValueType : public nsISMILType {
private:
// Private constructor: prevent instances beyond my singleton.
constexpr nsSMILCSSValueType() {}
constexpr SMILCSSValueType() {}
};
} // namespace mozilla
#endif // NS_SMILCSSVALUETYPE_H_

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

@ -20,7 +20,7 @@ void SMILEnumType::Init(nsSMILValue& aValue) const {
void SMILEnumType::Destroy(nsSMILValue& aValue) const {
MOZ_ASSERT(aValue.mType == this, "Unexpected SMIL value");
aValue.mU.mUint = 0;
aValue.mType = nsSMILNullType::Singleton();
aValue.mType = SMILNullType::Singleton();
}
nsresult SMILEnumType::Assign(nsSMILValue& aDest,

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

@ -20,7 +20,7 @@ void SMILFloatType::Init(nsSMILValue& aValue) const {
void SMILFloatType::Destroy(nsSMILValue& aValue) const {
MOZ_ASSERT(aValue.mType == this, "Unexpected SMIL value");
aValue.mU.mDouble = 0.0;
aValue.mType = nsSMILNullType::Singleton();
aValue.mType = SMILNullType::Singleton();
}
nsresult SMILFloatType::Assign(nsSMILValue& aDest,

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

@ -20,7 +20,7 @@ void SMILIntegerType::Init(nsSMILValue& aValue) const {
void SMILIntegerType::Destroy(nsSMILValue& aValue) const {
MOZ_ASSERT(aValue.mType == this, "Unexpected SMIL value");
aValue.mU.mInt = 0;
aValue.mType = nsSMILNullType::Singleton();
aValue.mType = SMILNullType::Singleton();
}
nsresult SMILIntegerType::Assign(nsSMILValue& aDest,

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

@ -4,17 +4,19 @@
* 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 "nsSMILNullType.h"
#include "SMILNullType.h"
#include "nsSMILValue.h"
#include "nsDebug.h"
/*static*/ nsSMILNullType* nsSMILNullType::Singleton() {
static nsSMILNullType sSingleton;
namespace mozilla {
/*static*/ SMILNullType* SMILNullType::Singleton() {
static SMILNullType sSingleton;
return &sSingleton;
}
nsresult nsSMILNullType::Assign(nsSMILValue& aDest,
const nsSMILValue& aSrc) const {
nsresult SMILNullType::Assign(nsSMILValue& aDest,
const nsSMILValue& aSrc) const {
MOZ_ASSERT(aDest.mType == aSrc.mType, "Incompatible SMIL types");
MOZ_ASSERT(aSrc.mType == this, "Unexpected source type");
aDest.mU = aSrc.mU;
@ -22,31 +24,33 @@ nsresult nsSMILNullType::Assign(nsSMILValue& aDest,
return NS_OK;
}
bool nsSMILNullType::IsEqual(const nsSMILValue& aLeft,
const nsSMILValue& aRight) const {
bool SMILNullType::IsEqual(const nsSMILValue& aLeft,
const nsSMILValue& aRight) const {
MOZ_ASSERT(aLeft.mType == aRight.mType, "Incompatible SMIL types");
MOZ_ASSERT(aLeft.mType == this, "Unexpected type for SMIL value");
return true; // All null-typed values are equivalent.
}
nsresult nsSMILNullType::Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
uint32_t aCount) const {
nsresult SMILNullType::Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
uint32_t aCount) const {
MOZ_ASSERT_UNREACHABLE("Adding NULL type");
return NS_ERROR_FAILURE;
}
nsresult nsSMILNullType::ComputeDistance(const nsSMILValue& aFrom,
const nsSMILValue& aTo,
double& aDistance) const {
nsresult SMILNullType::ComputeDistance(const nsSMILValue& aFrom,
const nsSMILValue& aTo,
double& aDistance) const {
MOZ_ASSERT_UNREACHABLE("Computing distance for NULL type");
return NS_ERROR_FAILURE;
}
nsresult nsSMILNullType::Interpolate(const nsSMILValue& aStartVal,
const nsSMILValue& aEndVal,
double aUnitDistance,
nsSMILValue& aResult) const {
nsresult SMILNullType::Interpolate(const nsSMILValue& aStartVal,
const nsSMILValue& aEndVal,
double aUnitDistance,
nsSMILValue& aResult) const {
MOZ_ASSERT_UNREACHABLE("Interpolating NULL type");
return NS_ERROR_FAILURE;
}
} // namespace mozilla

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

@ -10,10 +10,12 @@
#include "mozilla/Attributes.h"
#include "nsISMILType.h"
class nsSMILNullType : public nsISMILType {
namespace mozilla {
class SMILNullType : public nsISMILType {
public:
// Singleton for nsSMILValue objects to hold onto.
static nsSMILNullType* Singleton();
static SMILNullType* Singleton();
protected:
// nsISMILType Methods
@ -38,7 +40,9 @@ class nsSMILNullType : public nsISMILType {
private:
// Private constructor: prevent instances beyond my singleton.
constexpr nsSMILNullType() {}
constexpr SMILNullType() {}
};
} // namespace mozilla
#endif // NS_SMILNULLTYPE_H_

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

@ -21,7 +21,7 @@ void SMILStringType::Destroy(nsSMILValue& aValue) const {
MOZ_ASSERT(aValue.mType == this, "Unexpected SMIL value");
delete static_cast<nsAString*>(aValue.mU.mPtr);
aValue.mU.mPtr = nullptr;
aValue.mType = nsSMILNullType::Singleton();
aValue.mType = SMILNullType::Singleton();
}
nsresult SMILStringType::Assign(nsSMILValue& aDest,

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

@ -16,12 +16,10 @@ EXPORTS += [
'nsSMILAnimationFunction.h',
'nsSMILCompositorTable.h',
'nsSMILCSSProperty.h',
'nsSMILCSSValueType.h',
'nsSMILInstanceTime.h',
'nsSMILInterval.h',
'nsSMILKeySpline.h',
'nsSMILMilestone.h',
'nsSMILNullType.h',
'nsSMILRepeatCount.h',
'nsSMILSetAnimationFunction.h',
'nsSMILTargetIdentifier.h',
@ -32,6 +30,8 @@ EXPORTS += [
'nsSMILTimeValueSpecParams.h',
'nsSMILTypes.h',
'nsSMILValue.h',
'SMILCSSValueType.h',
'SMILNullType.h',
]
EXPORTS.mozilla.dom += [
@ -43,11 +43,9 @@ UNIFIED_SOURCES += [
'nsSMILAnimationFunction.cpp',
'nsSMILCompositor.cpp',
'nsSMILCSSProperty.cpp',
'nsSMILCSSValueType.cpp',
'nsSMILInstanceTime.cpp',
'nsSMILInterval.cpp',
'nsSMILKeySpline.cpp',
'nsSMILNullType.cpp',
'nsSMILParserUtils.cpp',
'nsSMILRepeatCount.cpp',
'nsSMILSetAnimationFunction.cpp',
@ -57,9 +55,11 @@ UNIFIED_SOURCES += [
'nsSMILTimeValueSpec.cpp',
'nsSMILValue.cpp',
'SMILBoolType.cpp',
'SMILCSSValueType.cpp',
'SMILEnumType.cpp',
'SMILFloatType.cpp',
'SMILIntegerType.cpp',
'SMILNullType.cpp',
'SMILStringType.cpp',
'TimeEvent.cpp',
]

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

@ -9,9 +9,9 @@
#include "mozilla/dom/SVGAnimationElement.h"
#include "mozilla/Move.h"
#include "nsISMILAttr.h"
#include "nsSMILCSSValueType.h"
#include "SMILCSSValueType.h"
#include "nsSMILParserUtils.h"
#include "nsSMILNullType.h"
#include "SMILNullType.h"
#include "nsSMILTimedElement.h"
#include "nsAttrValueInlines.h"
#include "nsGkAtoms.h"
@ -341,7 +341,7 @@ nsresult nsSMILAnimationFunction::InterpolateResult(
// Force discrete calcMode for visibility since StyleAnimationValue will
// try to interpolate it using the special clamping behavior defined for
// CSS.
if (nsSMILCSSValueType::PropertyFromValue(aValues[0]) ==
if (SMILCSSValueType::PropertyFromValue(aValues[0]) ==
eCSSProperty_visibility) {
calcMode = CALC_DISCRETE;
}
@ -425,7 +425,7 @@ nsresult nsSMILAnimationFunction::InterpolateResult(
// For animation of CSS properties, normally when interpolating we perform
// a zero-value fixup which means that empty values (values with type
// nsSMILCSSValueType but a null pointer value) are converted into
// SMILCSSValueType but a null pointer value) are converted into
// a suitable zero value based on whatever they're being interpolated
// with. For discrete animation, however, since we don't interpolate,
// that never happens. In some rare cases, such as discrete non-additive
@ -433,8 +433,8 @@ nsresult nsSMILAnimationFunction::InterpolateResult(
// value so we need to manually perform the fixup.
//
// We could define a generic method for this on nsSMILValue but its faster
// and simpler to just special case nsSMILCSSValueType.
if (aResult.mType == &nsSMILCSSValueType::sSingleton) {
// and simpler to just special case SMILCSSValueType.
if (aResult.mType == &SMILCSSValueType::sSingleton) {
// We have currently only ever encountered this case for the first
// value of a by-animation (which has two values) and since we have no
// way of testing other cases we just skip them (but assert if we
@ -443,7 +443,7 @@ nsresult nsSMILAnimationFunction::InterpolateResult(
MOZ_ASSERT(aResult.mU.mPtr, "The last value should not be empty");
} else {
// Base the type of the zero value on the next element in the series.
nsSMILCSSValueType::FinalizeValue(aResult, aValues[index + 1]);
SMILCSSValueType::FinalizeValue(aResult, aValues[index + 1]);
}
}
}

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

@ -13,7 +13,7 @@
#include "mozilla/ServoBindings.h"
#include "mozilla/StyleAnimationValue.h"
#include "nsDOMCSSAttrDeclaration.h"
#include "nsSMILCSSValueType.h"
#include "SMILCSSValueType.h"
#include "nsSMILValue.h"
#include "nsCSSProps.h"
@ -55,7 +55,7 @@ nsSMILValue nsSMILCSSProperty::GetBaseValue() const {
//
// In any case, just return a dummy value (initialized with the right
// type, so as not to indicate failure).
nsSMILValue tmpVal(&nsSMILCSSValueType::sSingleton);
nsSMILValue tmpVal(&SMILCSSValueType::sSingleton);
Swap(baseValue, tmpVal);
return baseValue;
}
@ -68,8 +68,8 @@ nsSMILValue nsSMILCSSProperty::GetBaseValue() const {
return baseValue;
}
baseValue = nsSMILCSSValueType::ValueFromAnimationValue(mPropID, mElement,
computedValue);
baseValue = SMILCSSValueType::ValueFromAnimationValue(mPropID, mElement,
computedValue);
return baseValue;
}
@ -78,8 +78,8 @@ nsresult nsSMILCSSProperty::ValueFromString(
nsSMILValue& aValue, bool& aPreventCachingOfSandwich) const {
NS_ENSURE_TRUE(IsPropertyAnimatable(mPropID), NS_ERROR_FAILURE);
nsSMILCSSValueType::ValueFromString(mPropID, mElement, aStr, aValue,
&aPreventCachingOfSandwich);
SMILCSSValueType::ValueFromString(mPropID, mElement, aStr, aValue,
&aPreventCachingOfSandwich);
if (aValue.IsNull()) {
return NS_ERROR_FAILURE;

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

@ -36,7 +36,7 @@ class nsSMILCSSProperty : public nsISMILAttr {
* @param aBaseComputedStyle The ComputedStyle to use when getting the base
* value. If this is nullptr and GetBaseValue is
* called, an empty nsSMILValue initialized with
* the nsSMILCSSValueType will be returned.
* the SMILCSSValueType will be returned.
*/
nsSMILCSSProperty(nsCSSPropertyID aPropID, mozilla::dom::Element* aElement,
mozilla::ComputedStyle* aBaseComputedStyle);

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

@ -12,7 +12,7 @@
// Public methods
nsSMILValue::nsSMILValue(const nsISMILType* aType)
: mType(nsSMILNullType::Singleton()) {
: mType(SMILNullType::Singleton()) {
mU.mBool = false;
if (!aType) {
NS_ERROR("Trying to construct nsSMILValue with null mType pointer");
@ -23,7 +23,7 @@ nsSMILValue::nsSMILValue(const nsISMILType* aType)
}
nsSMILValue::nsSMILValue(const nsSMILValue& aVal)
: mType(nsSMILNullType::Singleton()) {
: mType(SMILNullType::Singleton()) {
InitAndCheckPostcondition(aVal.mType);
mType->Assign(*this, aVal);
}
@ -47,7 +47,7 @@ nsSMILValue::nsSMILValue(nsSMILValue&& aVal)
mType(aVal.mType) {
// Leave aVal with a null type, so that it's safely destructible (and won't
// mess with anything referenced by its union, which we've copied).
aVal.mType = nsSMILNullType::Singleton();
aVal.mType = SMILNullType::Singleton();
}
nsSMILValue& nsSMILValue::operator=(nsSMILValue&& aVal) {
@ -62,7 +62,7 @@ nsSMILValue& nsSMILValue::operator=(nsSMILValue&& aVal) {
// Leave aVal with a null type, so that it's safely destructible (and won't
// mess with anything referenced by its union, which we've now copied).
aVal.mType = nsSMILNullType::Singleton();
aVal.mType = SMILNullType::Singleton();
return *this;
}

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

@ -8,7 +8,7 @@
#define NS_SMILVALUE_H_
#include "nsISMILType.h"
#include "nsSMILNullType.h"
#include "SMILNullType.h"
/**
* Although objects of this type are generally only created on the stack and
@ -21,7 +21,9 @@
*/
class nsSMILValue {
public:
nsSMILValue() : mU(), mType(nsSMILNullType::Singleton()) {}
typedef mozilla::SMILNullType SMILNullType;
nsSMILValue() : mU(), mType(SMILNullType::Singleton()) {}
explicit nsSMILValue(const nsISMILType* aType);
nsSMILValue(const nsSMILValue& aVal);
@ -38,7 +40,7 @@ class nsSMILValue {
bool operator==(const nsSMILValue& aVal) const;
bool operator!=(const nsSMILValue& aVal) const { return !(*this == aVal); }
bool IsNull() const { return (mType == nsSMILNullType::Singleton()); }
bool IsNull() const { return (mType == SMILNullType::Singleton()); }
nsresult Add(const nsSMILValue& aValueToAdd, uint32_t aCount = 1);
nsresult SandwichAdd(const nsSMILValue& aValueToAdd);

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

@ -5,11 +5,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "DOMSVGTransformList.h"
#include "mozilla/dom/SVGElement.h"
#include "mozilla/dom/SVGTransform.h"
#include "mozilla/dom/SVGMatrix.h"
#include "SVGAnimatedTransformList.h"
#include "SVGElement.h"
#include "mozilla/dom/SVGTransformListBinding.h"
#include "SVGAnimatedTransformList.h"
#include "nsError.h"
#include <algorithm>

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

@ -10,8 +10,8 @@
#include "DOMSVGAnimatedTransformList.h"
#include "nsCycleCollectionParticipant.h"
#include "nsDebug.h"
#include "nsTArray.h"
#include "SVGTransformList.h"
#include "nsTArray.h"
#include "mozilla/Attributes.h"
#include "mozilla/ErrorResult.h"

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

@ -7,13 +7,13 @@
#include "SVGAnimatedTransformList.h"
#include "mozilla/dom/MutationEventBinding.h"
#include "DOMSVGAnimatedTransformList.h"
#include "mozilla/dom/SVGAnimationElement.h"
#include "mozilla/Move.h"
#include "nsCharSeparatedTokenizer.h"
#include "nsSVGTransform.h"
#include "nsSMILValue.h"
#include "DOMSVGAnimatedTransformList.h"
#include "SVGContentUtils.h"
#include "nsSMILValue.h"
#include "nsSVGTransform.h"
#include "SVGTransformListSMILType.h"
using namespace mozilla::dom;

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

@ -10,51 +10,51 @@
#include "SVGElement.h"
#include "mozilla/dom/MutationEventBinding.h"
#include "mozilla/dom/SVGAnimatedEnumeration.h"
#include "mozilla/dom/SVGElementBinding.h"
#include "mozilla/dom/SVGLengthBinding.h"
#include "mozilla/dom/SVGSVGElement.h"
#include "mozilla/dom/SVGTests.h"
#include "mozilla/dom/SVGUnitTypesBinding.h"
#include "mozilla/DeclarationBlock.h"
#include "mozilla/EventListenerManager.h"
#include "mozilla/InternalMutationEvent.h"
#include "mozilla/RestyleManager.h"
#include "mozilla/Unused.h"
#include "mozAutoDocUpdate.h"
#include "nsAttrValueOrString.h"
#include "nsCSSProps.h"
#include "nsContentUtils.h"
#include "nsICSSDeclaration.h"
#include "nsIContentInlines.h"
#include "nsIDocument.h"
#include "mozilla/InternalMutationEvent.h"
#include "mozAutoDocUpdate.h"
#include "nsError.h"
#include "nsIPresShell.h"
#include "nsGkAtoms.h"
#include "nsCSSProps.h"
#include "mozilla/EventListenerManager.h"
#include "nsIPresShell.h"
#include "nsIFrame.h"
#include "nsLayoutUtils.h"
#include "SVGAnimatedTransformList.h"
#include "nsSVGLength2.h"
#include "nsSVGNumber2.h"
#include "nsSVGNumberPair.h"
#include "nsSVGInteger.h"
#include "nsSVGIntegerPair.h"
#include "nsSMILAnimationController.h"
#include "nsSVGAngle.h"
#include "nsSVGBoolean.h"
#include "nsSVGEnum.h"
#include "nsSVGViewBox.h"
#include "nsSVGInteger.h"
#include "nsSVGIntegerPair.h"
#include "nsSVGLength2.h"
#include "nsSVGNumber2.h"
#include "nsSVGNumberPair.h"
#include "nsSVGString.h"
#include "mozilla/dom/SVGAnimatedEnumeration.h"
#include "nsSVGViewBox.h"
#include "SVGAnimatedNumberList.h"
#include "SVGAnimatedLengthList.h"
#include "SVGAnimatedPointList.h"
#include "SVGAnimatedPathSegList.h"
#include "SVGAnimatedTransformList.h"
#include "SVGContentUtils.h"
#include "SVGGeometryElement.h"
#include "nsIFrame.h"
#include "SVGMotionSMILAttr.h"
#include "nsQueryObject.h"
#include <stdarg.h>
#include "SVGMotionSMILAttr.h"
#include "nsAttrValueOrString.h"
#include "nsSMILAnimationController.h"
#include "mozilla/dom/MutationEventBinding.h"
#include "mozilla/dom/SVGElementBinding.h"
#include "mozilla/DeclarationBlock.h"
#include "mozilla/Unused.h"
#include "mozilla/RestyleManager.h"
// This is needed to ensure correct handling of calls to the
// vararg-list methods in this file:

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

@ -13,18 +13,18 @@
*/
#include "mozilla/Attributes.h"
#include "mozilla/dom/DOMRect.h"
#include "mozilla/dom/Element.h"
#include "mozilla/gfx/MatrixFwd.h"
#include "nsAutoPtr.h"
#include "nsChangeHint.h"
#include "nsCOMPtr.h"
#include "nsCycleCollectionParticipant.h"
#include "nsError.h"
#include "mozilla/dom/DOMRect.h"
#include "mozilla/dom/Element.h"
#include "mozilla/gfx/MatrixFwd.h"
#include "nsISupportsImpl.h"
#include "nsStyledElement.h"
#include "nsSVGClass.h"
#include "SVGContentUtils.h"
#include "nsSVGClass.h"
#include "gfxMatrix.h"
class nsSVGAngle;

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

@ -8,9 +8,9 @@
#include "mozilla/dom/SVGSVGElement.h"
#include "mozilla/dom/SVGViewElement.h"
#include "nsCharSeparatedTokenizer.h"
#include "nsContentUtils.h" // for nsCharSeparatedTokenizerTemplate
#include "SVGAnimatedTransformList.h"
#include "nsCharSeparatedTokenizer.h"
namespace mozilla {

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

@ -7,15 +7,15 @@
#include "mozilla/dom/SVGGradientElement.h"
#include "mozilla/ArrayUtils.h"
#include "DOMSVGAnimatedTransformList.h"
#include "mozilla/dom/SVGElement.h"
#include "mozilla/dom/SVGGradientElementBinding.h"
#include "mozilla/dom/SVGRadialGradientElementBinding.h"
#include "mozilla/dom/SVGLengthBinding.h"
#include "mozilla/dom/SVGLinearGradientElementBinding.h"
#include "mozilla/dom/SVGRadialGradientElementBinding.h"
#include "mozilla/dom/SVGUnitTypesBinding.h"
#include "DOMSVGAnimatedTransformList.h"
#include "nsCOMPtr.h"
#include "nsGkAtoms.h"
#include "SVGElement.h"
NS_IMPL_NS_NEW_SVG_ELEMENT(LinearGradient)
NS_IMPL_NS_NEW_SVG_ELEMENT(RadialGradient)

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

@ -10,8 +10,8 @@
#include "nsAutoPtr.h"
#include "SVGAnimatedTransformList.h"
#include "SVGElement.h"
#include "nsSVGLength2.h"
#include "nsSVGEnum.h"
#include "nsSVGLength2.h"
#include "nsSVGString.h"
class nsSVGGradientFrame;

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

@ -23,7 +23,7 @@ void SVGIntegerPairSMILType::Destroy(nsSMILValue& aValue) const {
MOZ_ASSERT(aValue.mType == this, "Unexpected SMIL value");
aValue.mU.mIntPair[0] = 0;
aValue.mU.mIntPair[1] = 0;
aValue.mType = nsSMILNullType::Singleton();
aValue.mType = SMILNullType::Singleton();
}
nsresult SVGIntegerPairSMILType::Assign(nsSMILValue& aDest,

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

@ -35,7 +35,7 @@ void SVGLengthListSMILType::Destroy(nsSMILValue& aValue) const {
MOZ_ASSERT(aValue.mType == this, "Unexpected SMIL value type");
delete static_cast<SVGLengthListAndInfo*>(aValue.mU.mPtr);
aValue.mU.mPtr = nullptr;
aValue.mType = nsSMILNullType::Singleton();
aValue.mType = SMILNullType::Singleton();
}
nsresult SVGLengthListSMILType::Assign(nsSMILValue& aDest,

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

@ -173,7 +173,7 @@ void SVGMotionSMILType::Destroy(nsSMILValue& aValue) const {
delete arr;
aValue.mU.mPtr = nullptr;
aValue.mType = nsSMILNullType::Singleton();
aValue.mType = SMILNullType::Singleton();
}
nsresult SVGMotionSMILType::Assign(nsSMILValue& aDest,

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

@ -50,7 +50,7 @@ void SVGNumberListSMILType::Destroy(nsSMILValue& aValue) const {
MOZ_ASSERT(aValue.mType == this, "Unexpected SMIL value type");
delete static_cast<SVGNumberListAndInfo*>(aValue.mU.mPtr);
aValue.mU.mPtr = nullptr;
aValue.mType = nsSMILNullType::Singleton();
aValue.mType = SMILNullType::Singleton();
}
nsresult SVGNumberListSMILType::Assign(nsSMILValue& aDest,

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

@ -25,7 +25,7 @@ void SVGNumberPairSMILType::Destroy(nsSMILValue& aValue) const {
MOZ_ASSERT(aValue.mType == this, "Unexpected SMIL value");
aValue.mU.mNumberPair[0] = 0;
aValue.mU.mNumberPair[1] = 0;
aValue.mType = nsSMILNullType::Singleton();
aValue.mType = SMILNullType::Singleton();
}
nsresult SVGNumberPairSMILType::Assign(nsSMILValue& aDest,

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

@ -30,7 +30,7 @@ void SVGOrientSMILType::Init(nsSMILValue& aValue) const {
void SVGOrientSMILType::Destroy(nsSMILValue& aValue) const {
MOZ_ASSERT(aValue.mType == this, "Unexpected SMIL value.");
aValue.mU.mPtr = nullptr;
aValue.mType = nsSMILNullType::Singleton();
aValue.mType = SMILNullType::Singleton();
}
nsresult SVGOrientSMILType::Assign(nsSMILValue& aDest,

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

@ -33,7 +33,7 @@ void SVGPathSegListSMILType::Destroy(nsSMILValue& aValue) const {
MOZ_ASSERT(aValue.mType == this, "Unexpected SMIL value type");
delete static_cast<SVGPathDataAndInfo*>(aValue.mU.mPtr);
aValue.mU.mPtr = nullptr;
aValue.mType = nsSMILNullType::Singleton();
aValue.mType = SMILNullType::Singleton();
}
nsresult SVGPathSegListSMILType::Assign(nsSMILValue& aDest,

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

@ -4,15 +4,15 @@
* 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 "mozilla/ArrayUtils.h"
#include "nsCOMPtr.h"
#include "nsGkAtoms.h"
#include "DOMSVGAnimatedTransformList.h"
#include "mozilla/dom/SVGLengthBinding.h"
#include "mozilla/dom/SVGPatternElement.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/dom/SVGLengthBinding.h"
#include "mozilla/dom/SVGPatternElementBinding.h"
#include "mozilla/dom/SVGUnitTypesBinding.h"
#include "DOMSVGAnimatedTransformList.h"
#include "nsCOMPtr.h"
#include "nsGkAtoms.h"
NS_IMPL_NS_NEW_SVG_ELEMENT(Pattern)

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

@ -8,13 +8,13 @@
#define mozilla_dom_SVGPatternElement_h
#include "nsAutoPtr.h"
#include "mozilla/dom/SVGElement.h"
#include "SVGAnimatedPreserveAspectRatio.h"
#include "SVGAnimatedTransformList.h"
#include "nsSVGEnum.h"
#include "nsSVGLength2.h"
#include "nsSVGString.h"
#include "SVGElement.h"
#include "nsSVGViewBox.h"
#include "SVGAnimatedPreserveAspectRatio.h"
#include "SVGAnimatedTransformList.h"
class nsSVGPatternFrame;

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

@ -31,7 +31,7 @@ void SVGPointListSMILType::Destroy(nsSMILValue& aValue) const {
MOZ_ASSERT(aValue.mType == this, "Unexpected SMIL value type");
delete static_cast<SVGPointListAndInfo*>(aValue.mU.mPtr);
aValue.mU.mPtr = nullptr;
aValue.mType = nsSMILNullType::Singleton();
aValue.mType = SMILNullType::Singleton();
}
nsresult SVGPointListSMILType::Assign(nsSMILValue& aDest,

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

@ -15,16 +15,16 @@
#include "DOMSVGLength.h"
#include "DOMSVGNumber.h"
#include "DOMSVGPoint.h"
#include "nsLayoutStylesheetCache.h"
#include "nsSVGAngle.h"
#include "nsFrameSelection.h"
#include "nsLayoutStylesheetCache.h"
#include "nsIFrame.h"
#include "nsISVGSVGFrame.h"
#include "nsSMILAnimationController.h"
#include "nsSMILTimeContainer.h"
#include "nsSVGAngle.h"
#include "SVGAngle.h"
#include "nsSVGDisplayableFrame.h"
#include "nsSVGUtils.h"
#include "SVGAngle.h"
NS_IMPL_NS_NEW_SVG_ELEMENT_CHECK_PARSER(SVG)

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

@ -9,11 +9,11 @@
#include "mozilla/dom/SVGTransform.h"
#include "mozilla/dom/SVGMatrix.h"
#include "mozilla/dom/SVGTransformBinding.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/FloatingPoint.h"
#include "nsError.h"
#include "SVGAnimatedTransformList.h"
#include "nsSVGAttrTearoffTable.h"
#include "mozilla/DebugOnly.h"
#include "mozilla/FloatingPoint.h"
namespace {
const double kRadPerDegree = 2.0 * M_PI / 360.0;

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

@ -8,9 +8,8 @@
#define MOZILLA_SVGTRANSFORMLIST_H__
#include "gfxMatrix.h"
#include "nsDebug.h"
#include "nsTArray.h"
#include "nsSVGTransform.h"
#include "nsTArray.h"
namespace mozilla {

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

@ -32,7 +32,7 @@ void SVGTransformListSMILType::Destroy(nsSMILValue& aValue) const {
TransformArray* params = static_cast<TransformArray*>(aValue.mU.mPtr);
delete params;
aValue.mU.mPtr = nullptr;
aValue.mType = nsSMILNullType::Singleton();
aValue.mType = SMILNullType::Singleton();
}
nsresult SVGTransformListSMILType::Assign(nsSMILValue& aDest,

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

@ -4,19 +4,20 @@
* 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 "SVGTransformableElement.h"
#include "DOMSVGAnimatedTransformList.h"
#include "gfx2DGlue.h"
#include "mozilla/dom/MutationEventBinding.h"
#include "DOMSVGAnimatedTransformList.h"
#include "mozilla/dom/SVGGraphicsElementBinding.h"
#include "mozilla/dom/SVGTransformableElement.h"
#include "mozilla/dom/SVGMatrix.h"
#include "mozilla/dom/SVGRect.h"
#include "mozilla/dom/SVGSVGElement.h"
#include "nsContentUtils.h"
#include "nsIFrame.h"
#include "nsSVGDisplayableFrame.h"
#include "mozilla/dom/SVGRect.h"
#include "nsSVGUtils.h"
#include "SVGContentUtils.h"
#include "nsSVGDisplayableFrame.h"
#include "nsSVGUtils.h"
using namespace mozilla::gfx;

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

@ -7,11 +7,11 @@
#ifndef SVGTransformableElement_h
#define SVGTransformableElement_h
#include "mozilla/Attributes.h"
#include "nsAutoPtr.h"
#include "SVGAnimatedTransformList.h"
#include "SVGElement.h"
#include "gfxMatrix.h"
#include "mozilla/Attributes.h"
#include "mozilla/dom/SVGElement.h"
#include "mozilla/gfx/Matrix.h"
namespace mozilla {

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

@ -25,7 +25,7 @@ void SVGViewBoxSMILType::Destroy(nsSMILValue& aValue) const {
MOZ_ASSERT(aValue.mType == this, "Unexpected SMIL value");
delete static_cast<nsSVGViewBoxRect*>(aValue.mU.mPtr);
aValue.mU.mPtr = nullptr;
aValue.mType = nsSMILNullType::Singleton();
aValue.mType = SMILNullType::Singleton();
}
nsresult SVGViewBoxSMILType::Assign(nsSMILValue& aDest,

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

@ -7,18 +7,18 @@
#ifndef mozilla_dom_SVGViewportElement_h
#define mozilla_dom_SVGViewportElement_h
#include "mozilla/Attributes.h"
#include "mozilla/dom/FromParser.h"
#include "nsAutoPtr.h"
#include "nsIContentInlines.h"
#include "nsISVGPoint.h"
#include "SVGAnimatedPreserveAspectRatio.h"
#include "nsSVGEnum.h"
#include "nsSVGLength2.h"
#include "SVGGraphicsElement.h"
#include "SVGImageContext.h"
#include "nsSVGViewBox.h"
#include "SVGPreserveAspectRatio.h"
#include "SVGAnimatedPreserveAspectRatio.h"
#include "mozilla/Attributes.h"
#include "nsSVGLength2.h"
#include "nsSVGViewBox.h"
class nsSVGOuterSVGFrame;
class nsSVGViewportFrame;

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

@ -98,6 +98,9 @@ SharedSurface_ANGLEShareHandle::SharedSurface_ANGLEShareHandle(
mKeyedMutex(keyedMutex) {}
SharedSurface_ANGLEShareHandle::~SharedSurface_ANGLEShareHandle() {
if (GLContextEGL::Cast(mGL)->GetEGLSurfaceOverride() == mPBuffer) {
GLContextEGL::Cast(mGL)->SetEGLSurfaceOverride(EGL_NO_SURFACE);
}
mEGL->fDestroySurface(Display(), mPBuffer);
}

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

@ -69,6 +69,11 @@ bool SkGlyphRunListPainter::ShouldDrawAsPath(const SkPaint& paint, const SkMatri
return true;
}
// Glyphs like Emojis can't be rendered as a path.
if (paint.getTypeface() && paint.getTypeface()->hasColorGlyphs()) {
return false;
}
SkMatrix textM;
SkPaintPriv::MakeTextMatrix(&textM, paint);
return SkPaint::TooBigToUseCache(matrix, textM, 1024);

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

@ -37,15 +37,23 @@ static constexpr ARMRegister ScratchReg64 = {ScratchReg, 64};
static constexpr Register ScratchReg2{Registers::ip1};
static constexpr ARMRegister ScratchReg2_64 = {ScratchReg2, 64};
static constexpr FloatRegister ScratchDoubleReg = {FloatRegisters::d31,
FloatRegisters::Double};
static constexpr FloatRegister ReturnDoubleReg = {FloatRegisters::d0,
FloatRegisters::Double};
static constexpr FloatRegister ScratchDoubleReg = {FloatRegisters::d31,
FloatRegisters::Double};
struct ScratchDoubleScope : public AutoFloatRegisterScope {
explicit ScratchDoubleScope(MacroAssembler& masm)
: AutoFloatRegisterScope(masm, ScratchDoubleReg) {}
};
static constexpr FloatRegister ReturnFloat32Reg = {FloatRegisters::s0,
FloatRegisters::Single};
static constexpr FloatRegister ScratchFloat32Reg = {FloatRegisters::s31,
FloatRegisters::Single};
struct ScratchFloat32Scope : public AutoFloatRegisterScope {
explicit ScratchFloat32Scope(MacroAssembler& masm)
: AutoFloatRegisterScope(masm, ScratchFloat32Reg) {}
};
static constexpr Register InvalidReg{Registers::invalid_reg};
static constexpr FloatRegister InvalidFloatReg = {FloatRegisters::invalid_fpreg,

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

@ -744,7 +744,42 @@ void CodeGenerator::visitUrshD(LUrshD* ins) {
}
void CodeGenerator::visitPowHalfD(LPowHalfD* ins) {
MOZ_CRASH("visitPowHalfD");
FloatRegister input = ToFloatRegister(ins->input());
FloatRegister output = ToFloatRegister(ins->output());
ScratchDoubleScope scratch(masm);
Label done, sqrt;
if (!ins->mir()->operandIsNeverNegativeInfinity()) {
// Branch if not -Infinity.
masm.loadConstantDouble(NegativeInfinity<double>(), scratch);
Assembler::DoubleCondition cond = Assembler::DoubleNotEqualOrUnordered;
if (ins->mir()->operandIsNeverNaN()) {
cond = Assembler::DoubleNotEqual;
}
masm.branchDouble(cond, input, scratch, &sqrt);
// Math.pow(-Infinity, 0.5) == Infinity.
masm.zeroDouble(output);
masm.subDouble(scratch, output);
masm.jump(&done);
masm.bind(&sqrt);
}
if (!ins->mir()->operandIsNeverNegativeZero()) {
// Math.pow(-0, 0.5) == 0 == Math.pow(0, 0.5).
// Adding 0 converts any -0 to 0.
masm.zeroDouble(scratch);
masm.addDouble(input, scratch);
masm.sqrtDouble(scratch, output);
} else {
masm.sqrtDouble(input, output);
}
masm.bind(&done);
}
MoveOperand CodeGeneratorARM64::toMoveOperand(const LAllocation a) const {

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

@ -3503,4 +3503,11 @@ void DisassembleInstruction(char* buffer, size_t bufsize, const Instruction* ins
buffer[bufsize-1] = 0; // Just to be safe
}
char* GdbDisassembleInstruction(const Instruction* instr)
{
static char buffer[1024];
DisassembleInstruction(buffer, sizeof(buffer), instr);
return buffer;
}
} // namespace vixl

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

@ -174,6 +174,7 @@ class PrintDisassembler: public Disassembler {
};
void DisassembleInstruction(char* buffer, size_t bufsize, const Instruction* instr);
char* GdbDisassembleInstruction(const Instruction* instr);
} // namespace vixl

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

@ -755,8 +755,8 @@ void CodeGenerator::visitPowHalfD(LPowHalfD* ins) {
}
if (!ins->mir()->operandIsNeverNegativeZero()) {
// Math.pow(-0, 0.5) == 0 == Math.pow(0, 0.5). Adding 0 converts any -0 to
// 0.
// Math.pow(-0, 0.5) == 0 == Math.pow(0, 0.5).
// Adding 0 converts any -0 to 0.
masm.zeroDouble(scratch);
masm.addDouble(input, scratch);
masm.vsqrtsd(scratch, output, output);

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

@ -16,7 +16,7 @@
#include "nsIDocument.h"
#include "nsIURI.h"
#include "nsNodeUtils.h"
#include "nsSMILCSSValueType.h"
#include "SMILCSSValueType.h"
#include "nsWrapperCacheInlines.h"
#include "nsIFrame.h"
#include "ActiveLayerTracker.h"
@ -146,7 +146,7 @@ nsresult nsDOMCSSAttributeDeclaration::SetSMILValue(
}
mozAutoDocUpdate autoUpdate(DocToUpdate(), true);
RefPtr<DeclarationBlock> decl = olddecl->EnsureMutable();
bool changed = nsSMILCSSValueType::SetPropertyValues(aValue, *decl);
bool changed = SMILCSSValueType::SetPropertyValues(aValue, *decl);
if (changed) {
// We can pass nullptr as the latter param, since this is
// mIsSMILOverride == true case.

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

@ -15,7 +15,6 @@
<binding id="richlistbox"
extends="chrome://global/content/bindings/general.xml#basecontrol">
<content>
<children includes="listheader"/>
<xul:scrollbox allowevents="true" orient="vertical" anonid="main-box"
flex="1" style="overflow: auto;" xbl:inherits="dir,pack">
<children/>

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

@ -714,15 +714,32 @@ xul|*.radio-label-box {
/* List boxes */
html|select[size][multiple],
xul|listheader,
xul|richlistbox {
-moz-appearance: none;
margin-inline-start: 0;
margin-left: 0;
margin-right: 0;
background-color: var(--in-content-box-background);
border: 1px solid var(--in-content-box-border-color);
border-radius: 2px;
color: var(--in-content-text-color);
}
xul|listheader {
border-bottom: none;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
padding-bottom: 1px;
box-shadow: inset 0 -1px var(--in-content-border-color);
}
xul|listheader + xul|richlistbox {
margin-top: 0;
border-top: none;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
html|select[size][multiple] > html|option,
xul|treechildren::-moz-tree-row {
padding: 0.3em;
@ -761,7 +778,6 @@ xul|richlistbox:-moz-focusring {
border: 1px dotted var(--in-content-border-focus);
}
xul|listheader,
xul|treecols {
-moz-appearance: none;
border: none;