chrome-devtools-frontend 1.0.938678 → 1.0.939066
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.stylelintrc.json +15 -11
- package/front_end/Tests.js +30 -29
- package/front_end/core/host/InspectorFrontendHost.ts +16 -30
- package/front_end/core/i18n/locales/en-US.json +4 -1
- package/front_end/core/i18n/locales/en-XL.json +4 -1
- package/front_end/core/sdk/EmulationModel.ts +11 -0
- package/front_end/core/sdk/sdk-meta.ts +30 -1
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +9 -2
- package/front_end/entrypoints/inspector_main/renderingOptions.css +2 -2
- package/front_end/entrypoints/main/main-meta.ts +0 -2
- package/front_end/entrypoints/node_main/nodeConnectionsPanel.css +2 -2
- package/front_end/models/persistence/editFileSystemView.css +1 -1
- package/front_end/models/persistence/workspaceSettingsTab.css +1 -1
- package/front_end/panels/accessibility/accessibilityNode.css +2 -2
- package/front_end/panels/accessibility/axBreadcrumbs.css +1 -1
- package/front_end/panels/animation/animationTimeline.css +5 -5
- package/front_end/panels/application/components/frameDetailsReportView.css +1 -1
- package/front_end/panels/application/resourcesPanel.css +1 -1
- package/front_end/panels/application/resourcesSidebar.css +1 -1
- package/front_end/panels/browser_debugger/xhrBreakpointsSidebarPane.css +2 -5
- package/front_end/panels/changes/changesSidebar.css +1 -1
- package/front_end/panels/changes/changesView.css +2 -2
- package/front_end/panels/console/consolePrompt.css +1 -1
- package/front_end/panels/console/consoleSidebar.css +4 -4
- package/front_end/panels/console/consoleView.css +2 -2
- package/front_end/panels/css_overview/components/cssOverviewStartView.css +1 -1
- package/front_end/panels/css_overview/cssOverviewCompletedView.css +8 -8
- package/front_end/panels/elements/classesPaneWidget.css +1 -1
- package/front_end/panels/elements/components/adornerSettingsPane.css +1 -1
- package/front_end/panels/elements/computedStyleWidgetTree.css +1 -1
- package/front_end/panels/elements/elementsPanel.css +1 -1
- package/front_end/panels/elements/elementsTreeOutline.css +1 -1
- package/front_end/panels/elements/layoutPane.css +1 -1
- package/front_end/panels/elements/platformFontsWidget.css +1 -1
- package/front_end/panels/elements/stylesSectionTree.css +1 -1
- package/front_end/panels/event_listeners/EventListenersView.ts +5 -4
- package/front_end/panels/event_listeners/eventListenersView.css +3 -2
- package/front_end/panels/issues/IssueKindView.ts +0 -6
- package/front_end/panels/issues/IssueView.ts +19 -27
- package/front_end/panels/issues/components/HideIssuesMenu.ts +7 -11
- package/front_end/panels/issues/components/hideIssuesMenu.css +8 -0
- package/front_end/panels/issues/issuesTree.css +17 -5
- package/front_end/panels/lighthouse/lighthouseStartView.css +2 -2
- package/front_end/panels/media/playerListView.css +1 -1
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +1 -1
- package/front_end/panels/network/NetworkSearchScope.ts +3 -1
- package/front_end/panels/network/blockedURLsPane.css +1 -1
- package/front_end/panels/network/networkConfigView.css +1 -1
- package/front_end/panels/network/networkLogView.css +3 -3
- package/front_end/panels/profiler/profileLauncherView.css +3 -3
- package/front_end/panels/security/mainView.css +2 -2
- package/front_end/panels/security/originView.css +1 -1
- package/front_end/panels/sensors/sensors.css +2 -2
- package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +1 -1
- package/front_end/panels/settings/emulation/devicesSettingsTab.css +4 -4
- package/front_end/panels/settings/frameworkIgnoreListSettingsTab.css +1 -1
- package/front_end/panels/settings/settingsScreen.css +2 -2
- package/front_end/panels/sources/CoveragePlugin.ts +7 -2
- package/front_end/panels/sources/callStackSidebarPane.css +1 -1
- package/front_end/panels/sources/dialog.css +1 -1
- package/front_end/panels/sources/javaScriptBreakpointsSidebarPane.css +1 -1
- package/front_end/panels/sources/navigatorTree.css +4 -4
- package/front_end/panels/sources/sourcesPanel.css +2 -2
- package/front_end/panels/sources/threadsSidebarPane.css +1 -1
- package/front_end/panels/timeline/components/WebVitalsTooltip.css +1 -1
- package/front_end/panels/timeline/historyToolbarButton.css +1 -1
- package/front_end/panels/timeline/timelineStatusDialog.css +1 -1
- package/front_end/panels/webauthn/webauthnPane.css +2 -2
- package/front_end/ui/components/adorners/adorner.css +1 -1
- package/front_end/ui/components/expandable_list/expandableList.css +1 -1
- package/front_end/ui/components/linear_memory_inspector/valueInterpreterDisplay.css +1 -2
- package/front_end/ui/components/linear_memory_inspector/valueInterpreterSettings.css +1 -1
- package/front_end/ui/components/report_view/reportKey.css +1 -1
- package/front_end/ui/components/report_view/reportValue.css +1 -1
- package/front_end/ui/legacy/ContextMenu.ts +5 -1
- package/front_end/ui/legacy/SoftContextMenu.ts +5 -1
- package/front_end/ui/legacy/checkboxTextLabel.css +1 -1
- package/front_end/ui/legacy/components/color_picker/spectrum.css +9 -9
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +2 -2
- package/front_end/ui/legacy/components/inline_editor/cssAngleEditor.css +3 -3
- package/front_end/ui/legacy/components/inline_editor/cssLength.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/cssShadowEditor.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/fontEditor.css +1 -1
- package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +2 -2
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +13 -7
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +2 -2
- package/front_end/ui/legacy/components/source_frame/imageView.css +1 -1
- package/front_end/ui/legacy/components/text_editor/cmdevtools.css +6 -14
- package/front_end/ui/legacy/emptyWidget.css +1 -1
- package/front_end/ui/legacy/filter.css +1 -1
- package/front_end/ui/legacy/infobar.css +2 -2
- package/front_end/ui/legacy/inspectorCommon.css +45 -45
- package/front_end/ui/legacy/inspectorSyntaxHighlight.css +3 -3
- package/front_end/ui/legacy/inspectorViewTabbedPane.css +1 -1
- package/front_end/ui/legacy/searchableView.css +1 -1
- package/front_end/ui/legacy/softContextMenu.css +1 -1
- package/front_end/ui/legacy/textPrompt.css +1 -1
- package/front_end/ui/legacy/toolbar.css +8 -8
- package/front_end/ui/legacy/treeoutline.css +4 -4
- package/inspector_overlay/common.css +2 -2
- package/inspector_overlay/tool_highlight.css +1 -1
- package/inspector_overlay/tool_paused.css +2 -2
- package/package.json +1 -1
- package/scripts/eslint_rules/lib/es_modules_import.js +21 -20
- package/scripts/eslint_rules/lib/l10n_filename_matches.js +4 -3
- package/scripts/eslint_rules/lib/migrate_create_shadow_root_with_styles.js +2 -2
- package/scripts/eslint_rules/lib/migrate_register_required_css.js +1 -1
- package/scripts/eslint_rules/tests/es_modules_import_test.js +3 -2
package/.stylelintrc.json
CHANGED
|
@@ -12,15 +12,6 @@
|
|
|
12
12
|
"declaration-no-important": true,
|
|
13
13
|
"color-named": "never",
|
|
14
14
|
"max-empty-lines": 1,
|
|
15
|
-
"property-no-vendor-prefix": [
|
|
16
|
-
true,
|
|
17
|
-
{
|
|
18
|
-
"ignoreProperties": [
|
|
19
|
-
"border-image",
|
|
20
|
-
"/^mask-/"
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
],
|
|
24
15
|
"selector-type-no-unknown": [
|
|
25
16
|
true,
|
|
26
17
|
{
|
|
@@ -28,6 +19,19 @@
|
|
|
28
19
|
"/^devtools-/"
|
|
29
20
|
]
|
|
30
21
|
}
|
|
31
|
-
]
|
|
32
|
-
|
|
22
|
+
],
|
|
23
|
+
"max-line-length": null,
|
|
24
|
+
"selector-class-pattern": null,
|
|
25
|
+
"keyframes-name-pattern": null,
|
|
26
|
+
"selector-no-vendor-prefix": null,
|
|
27
|
+
"property-no-vendor-prefix": null,
|
|
28
|
+
"value-no-vendor-prefix": null,
|
|
29
|
+
"media-feature-name-no-vendor-prefix": null
|
|
30
|
+
},
|
|
31
|
+
"overrides": [
|
|
32
|
+
{
|
|
33
|
+
"files": ["**/*.ts"],
|
|
34
|
+
"customSyntax": "html"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
33
37
|
}
|
package/front_end/Tests.js
CHANGED
|
@@ -1331,8 +1331,8 @@
|
|
|
1331
1331
|
const browserContextIds = [];
|
|
1332
1332
|
const targetAgent = self.SDK.targetManager.mainTarget().targetAgent();
|
|
1333
1333
|
|
|
1334
|
-
const target1 = await createIsolatedTarget(url);
|
|
1335
|
-
const target2 = await createIsolatedTarget(url);
|
|
1334
|
+
const target1 = await createIsolatedTarget(url, browserContextIds);
|
|
1335
|
+
const target2 = await createIsolatedTarget(url, browserContextIds);
|
|
1336
1336
|
|
|
1337
1337
|
const response = await targetAgent.invoke_getBrowserContexts();
|
|
1338
1338
|
this.assertEquals(response.browserContextIds.length, 2);
|
|
@@ -1356,34 +1356,37 @@
|
|
|
1356
1356
|
this.assertEquals(removedTargets.indexOf(target2) !== -1, true);
|
|
1357
1357
|
|
|
1358
1358
|
this.releaseControl();
|
|
1359
|
+
};
|
|
1359
1360
|
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1361
|
+
/**
|
|
1362
|
+
* @param {string} url
|
|
1363
|
+
* @return {!Promise<!SDK.Target>}
|
|
1364
|
+
*/
|
|
1365
|
+
async function createIsolatedTarget(url, opt_browserContextIds) {
|
|
1366
|
+
const targetAgent = self.SDK.targetManager.mainTarget().targetAgent();
|
|
1367
|
+
const {browserContextId} = await targetAgent.invoke_createBrowserContext();
|
|
1368
|
+
if (opt_browserContextIds) {
|
|
1369
|
+
opt_browserContextIds.push(browserContextId);
|
|
1370
|
+
}
|
|
1367
1371
|
|
|
1368
|
-
|
|
1369
|
-
|
|
1372
|
+
const {targetId} = await targetAgent.invoke_createTarget({url: 'about:blank', browserContextId});
|
|
1373
|
+
await targetAgent.invoke_attachToTarget({targetId, flatten: true});
|
|
1370
1374
|
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1375
|
+
const target = self.SDK.targetManager.targets().find(target => target.id() === targetId);
|
|
1376
|
+
const pageAgent = target.pageAgent();
|
|
1377
|
+
await pageAgent.invoke_enable();
|
|
1378
|
+
await pageAgent.invoke_navigate({url});
|
|
1379
|
+
return target;
|
|
1380
|
+
}
|
|
1377
1381
|
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
+
async function disposeBrowserContext(browserContextId) {
|
|
1383
|
+
const targetAgent = self.SDK.targetManager.mainTarget().targetAgent();
|
|
1384
|
+
await targetAgent.invoke_disposeBrowserContext({browserContextId});
|
|
1385
|
+
}
|
|
1382
1386
|
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
};
|
|
1387
|
+
async function evalCode(target, code) {
|
|
1388
|
+
return (await target.runtimeAgent().invoke_evaluate({expression: code})).result.value;
|
|
1389
|
+
}
|
|
1387
1390
|
|
|
1388
1391
|
TestSuite.prototype.testInputDispatchEventsToOOPIF = async function() {
|
|
1389
1392
|
this.takeControl();
|
|
@@ -1391,14 +1394,12 @@
|
|
|
1391
1394
|
await new Promise(callback => this._waitForTargets(2, callback));
|
|
1392
1395
|
|
|
1393
1396
|
async function takeLogs(target) {
|
|
1394
|
-
|
|
1397
|
+
return await evalCode(target, `
|
|
1395
1398
|
(function() {
|
|
1396
1399
|
var result = window.logs.join(' ');
|
|
1397
1400
|
window.logs = [];
|
|
1398
1401
|
return result;
|
|
1399
|
-
})()
|
|
1400
|
-
`;
|
|
1401
|
-
return (await target.runtimeAgent().invoke_evaluate({expression: code})).result.value;
|
|
1402
|
+
})()`);
|
|
1402
1403
|
}
|
|
1403
1404
|
|
|
1404
1405
|
let parentFrameOutput;
|
|
@@ -364,13 +364,7 @@ export class InspectorFrontendHostStub implements InspectorFrontendHostAPI {
|
|
|
364
364
|
export let InspectorFrontendHostInstance: InspectorFrontendHostStub = window.InspectorFrontendHost;
|
|
365
365
|
|
|
366
366
|
class InspectorFrontendAPIImpl {
|
|
367
|
-
readonly #debugFrontend: boolean;
|
|
368
|
-
|
|
369
367
|
constructor() {
|
|
370
|
-
this.#debugFrontend = (Boolean(Root.Runtime.Runtime.queryParam('debugFrontend'))) ||
|
|
371
|
-
// @ts-ignore Compatibility hacks
|
|
372
|
-
(window['InspectorTest'] && window['InspectorTest']['debugTest']);
|
|
373
|
-
|
|
374
368
|
for (const descriptor of EventDescriptors) {
|
|
375
369
|
// @ts-ignore Dispatcher magic
|
|
376
370
|
this[descriptor[1]] = this.dispatch.bind(this, descriptor[0], descriptor[2], descriptor[3]);
|
|
@@ -378,35 +372,27 @@ class InspectorFrontendAPIImpl {
|
|
|
378
372
|
}
|
|
379
373
|
|
|
380
374
|
private dispatch(name: symbol, signature: string[], runOnceLoaded: boolean, ...params: string[]): void {
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
} else {
|
|
384
|
-
innerDispatch();
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
function innerDispatch(): void {
|
|
388
|
-
// Single argument methods get dispatched with the param.
|
|
389
|
-
if (signature.length < 2) {
|
|
390
|
-
try {
|
|
391
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
392
|
-
InspectorFrontendHostInstance.events.dispatchEventToListeners<any>(name, params[0]);
|
|
393
|
-
} catch (error) {
|
|
394
|
-
console.error(error + ' ' + error.stack);
|
|
395
|
-
}
|
|
396
|
-
return;
|
|
397
|
-
}
|
|
398
|
-
const data: {
|
|
399
|
-
[x: string]: string,
|
|
400
|
-
} = {};
|
|
401
|
-
for (let i = 0; i < signature.length; ++i) {
|
|
402
|
-
data[signature[i]] = params[i];
|
|
403
|
-
}
|
|
375
|
+
// Single argument methods get dispatched with the param.
|
|
376
|
+
if (signature.length < 2) {
|
|
404
377
|
try {
|
|
405
378
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
406
|
-
InspectorFrontendHostInstance.events.dispatchEventToListeners<any>(name,
|
|
379
|
+
InspectorFrontendHostInstance.events.dispatchEventToListeners<any>(name, params[0]);
|
|
407
380
|
} catch (error) {
|
|
408
381
|
console.error(error + ' ' + error.stack);
|
|
409
382
|
}
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
const data: {
|
|
386
|
+
[x: string]: string,
|
|
387
|
+
} = {};
|
|
388
|
+
for (let i = 0; i < signature.length; ++i) {
|
|
389
|
+
data[signature[i]] = params[i];
|
|
390
|
+
}
|
|
391
|
+
try {
|
|
392
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
393
|
+
InspectorFrontendHostInstance.events.dispatchEventToListeners<any>(name, data);
|
|
394
|
+
} catch (error) {
|
|
395
|
+
console.error(error + ' ' + error.stack);
|
|
410
396
|
}
|
|
411
397
|
}
|
|
412
398
|
|
|
@@ -935,6 +935,9 @@
|
|
|
935
935
|
"entrypoints/inspector_main/RenderingOptions.ts | forcesCssColorgamutMediaFeature": {
|
|
936
936
|
"message": "Forces CSS color-gamut media feature"
|
|
937
937
|
},
|
|
938
|
+
"entrypoints/inspector_main/RenderingOptions.ts | forcesCssForcedColors": {
|
|
939
|
+
"message": "Forces CSS forced-colors media feature"
|
|
940
|
+
},
|
|
938
941
|
"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPreferscolorschemeMedia": {
|
|
939
942
|
"message": "Forces CSS prefers-color-scheme media feature"
|
|
940
943
|
},
|
|
@@ -9147,7 +9150,7 @@
|
|
|
9147
9150
|
"message": "Coverage: n/a"
|
|
9148
9151
|
},
|
|
9149
9152
|
"panels/sources/CoveragePlugin.ts | coverageS": {
|
|
9150
|
-
"message": "Coverage: {PH1}
|
|
9153
|
+
"message": "Coverage: {PH1}"
|
|
9151
9154
|
},
|
|
9152
9155
|
"panels/sources/CoveragePlugin.ts | showDetails": {
|
|
9153
9156
|
"message": "Show Details"
|
|
@@ -935,6 +935,9 @@
|
|
|
935
935
|
"entrypoints/inspector_main/RenderingOptions.ts | forcesCssColorgamutMediaFeature": {
|
|
936
936
|
"message": "F̂ór̂ćêś ĈŚŜ color-gamut ḿêd́îá f̂éât́ûŕê"
|
|
937
937
|
},
|
|
938
|
+
"entrypoints/inspector_main/RenderingOptions.ts | forcesCssForcedColors": {
|
|
939
|
+
"message": "F̂ór̂ćêś ĈŚŜ f́ôŕĉéd̂-ćôĺôŕŝ ḿêd́îá f̂éât́ûŕê"
|
|
940
|
+
},
|
|
938
941
|
"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPreferscolorschemeMedia": {
|
|
939
942
|
"message": "F̂ór̂ćêś ĈŚŜ prefers-color-scheme ḿêd́îá f̂éât́ûŕê"
|
|
940
943
|
},
|
|
@@ -9147,7 +9150,7 @@
|
|
|
9147
9150
|
"message": "Ĉóv̂ér̂áĝé: n̂/á"
|
|
9148
9151
|
},
|
|
9149
9152
|
"panels/sources/CoveragePlugin.ts | coverageS": {
|
|
9150
|
-
"message": "Ĉóv̂ér̂áĝé: {PH1}
|
|
9153
|
+
"message": "Ĉóv̂ér̂áĝé: {PH1}"
|
|
9151
9154
|
},
|
|
9152
9155
|
"panels/sources/CoveragePlugin.ts | showDetails": {
|
|
9153
9156
|
"message": "Ŝh́ôẃ D̂ét̂áîĺŝ"
|
|
@@ -76,6 +76,8 @@ export class EmulationModel extends SDKModel<void> {
|
|
|
76
76
|
Common.Settings.Settings.instance().moduleSetting<string>('emulatedCSSMediaFeatureColorGamut');
|
|
77
77
|
const mediaFeaturePrefersColorSchemeSetting =
|
|
78
78
|
Common.Settings.Settings.instance().moduleSetting<string>('emulatedCSSMediaFeaturePrefersColorScheme');
|
|
79
|
+
const mediaFeatureForcedColorsSetting =
|
|
80
|
+
Common.Settings.Settings.instance().moduleSetting('emulatedCSSMediaFeatureForcedColors');
|
|
79
81
|
const mediaFeaturePrefersContrastSetting =
|
|
80
82
|
Common.Settings.Settings.instance().moduleSetting<string>('emulatedCSSMediaFeaturePrefersContrast');
|
|
81
83
|
const mediaFeaturePrefersReducedDataSetting =
|
|
@@ -90,6 +92,7 @@ export class EmulationModel extends SDKModel<void> {
|
|
|
90
92
|
['type', mediaTypeSetting.get()],
|
|
91
93
|
['color-gamut', mediaFeatureColorGamutSetting.get()],
|
|
92
94
|
['prefers-color-scheme', mediaFeaturePrefersColorSchemeSetting.get()],
|
|
95
|
+
['forced-colors', mediaFeatureForcedColorsSetting.get()],
|
|
93
96
|
['prefers-contrast', mediaFeaturePrefersContrastSetting.get()],
|
|
94
97
|
['prefers-reduced-data', mediaFeaturePrefersReducedDataSetting.get()],
|
|
95
98
|
['prefers-reduced-motion', mediaFeaturePrefersReducedMotionSetting.get()],
|
|
@@ -106,6 +109,10 @@ export class EmulationModel extends SDKModel<void> {
|
|
|
106
109
|
this.#mediaConfiguration.set('prefers-color-scheme', mediaFeaturePrefersColorSchemeSetting.get());
|
|
107
110
|
this.updateCssMedia();
|
|
108
111
|
});
|
|
112
|
+
mediaFeatureForcedColorsSetting.addChangeListener(() => {
|
|
113
|
+
this.#mediaConfiguration.set('forced-colors', mediaFeatureForcedColorsSetting.get());
|
|
114
|
+
this.updateCssMedia();
|
|
115
|
+
});
|
|
109
116
|
mediaFeaturePrefersContrastSetting.addChangeListener(() => {
|
|
110
117
|
this.#mediaConfiguration.set('prefers-contrast', mediaFeaturePrefersContrastSetting.get());
|
|
111
118
|
this.updateCssMedia();
|
|
@@ -367,6 +374,10 @@ export class EmulationModel extends SDKModel<void> {
|
|
|
367
374
|
name: 'prefers-color-scheme',
|
|
368
375
|
value: this.#mediaConfiguration.get('prefers-color-scheme') ?? '',
|
|
369
376
|
},
|
|
377
|
+
{
|
|
378
|
+
name: 'forced-colors',
|
|
379
|
+
value: this.#mediaConfiguration.get('forced-colors') ?? '',
|
|
380
|
+
},
|
|
370
381
|
{
|
|
371
382
|
name: 'prefers-contrast',
|
|
372
383
|
value: this.#mediaConfiguration.get('prefers-contrast') ?? '',
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as Common from '../common/common.js';
|
|
6
|
-
|
|
7
6
|
import * as i18n from '../i18n/i18n.js';
|
|
7
|
+
|
|
8
8
|
const UIStrings = {
|
|
9
9
|
/**
|
|
10
10
|
*@description Title of a setting under the Console category that can be invoked through the Command Menu
|
|
@@ -746,6 +746,35 @@ Common.Settings.registerSettingExtension({
|
|
|
746
746
|
title: i18nLazyString(UIStrings.emulateCssMediaFeature, {PH1: 'prefers-color-scheme'}),
|
|
747
747
|
});
|
|
748
748
|
|
|
749
|
+
Common.Settings.registerSettingExtension({
|
|
750
|
+
category: Common.Settings.SettingCategory.RENDERING,
|
|
751
|
+
settingName: 'emulatedCSSMediaFeatureForcedColors',
|
|
752
|
+
settingType: Common.Settings.SettingType.ENUM,
|
|
753
|
+
storageType: Common.Settings.SettingStorageType.Session,
|
|
754
|
+
defaultValue: '',
|
|
755
|
+
options: [
|
|
756
|
+
{
|
|
757
|
+
title: i18nLazyString(UIStrings.doNotEmulateCss, {PH1: 'forced-colors'}),
|
|
758
|
+
text: i18nLazyString(UIStrings.noEmulation),
|
|
759
|
+
value: '',
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
title: i18nLazyString(UIStrings.emulateCss, {PH1: 'forced-colors: active'}),
|
|
763
|
+
text: i18n.i18n.lockedLazyString('forced-colors: active'),
|
|
764
|
+
value: 'active',
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
title: i18nLazyString(UIStrings.emulateCss, {PH1: 'forced-colors: none'}),
|
|
768
|
+
text: i18n.i18n.lockedLazyString('forced-colors: none'),
|
|
769
|
+
value: 'none',
|
|
770
|
+
},
|
|
771
|
+
],
|
|
772
|
+
tags: [
|
|
773
|
+
i18nLazyString(UIStrings.query),
|
|
774
|
+
],
|
|
775
|
+
title: i18nLazyString(UIStrings.emulateCssMediaFeature, {PH1: 'forced-colors'}),
|
|
776
|
+
});
|
|
777
|
+
|
|
749
778
|
Common.Settings.registerSettingExtension({
|
|
750
779
|
category: Common.Settings.SettingCategory.RENDERING,
|
|
751
780
|
settingName: 'emulatedCSSMediaFeaturePrefersReducedMotion',
|
|
@@ -187,6 +187,10 @@ const UIStrings = {
|
|
|
187
187
|
* page from loading images with the WebP format.
|
|
188
188
|
*/
|
|
189
189
|
disableWebpImageFormat: 'Disable `WebP` image format',
|
|
190
|
+
/**
|
|
191
|
+
* @description Explanation text for the 'Forces CSS forced-colors' setting in the Rendering tool.
|
|
192
|
+
*/
|
|
193
|
+
forcesCssForcedColors: 'Forces CSS forced-colors media feature',
|
|
190
194
|
};
|
|
191
195
|
const str_ = i18n.i18n.registerUIStrings('entrypoints/inspector_main/RenderingOptions.ts', UIStrings);
|
|
192
196
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
@@ -263,13 +267,16 @@ export class RenderingOptionsView extends UI.Widget.VBox {
|
|
|
263
267
|
i18nString(UIStrings.forcesCssPreferscolorschemeMedia),
|
|
264
268
|
Common.Settings.Settings.instance().moduleSetting('emulatedCSSMediaFeaturePrefersColorScheme'));
|
|
265
269
|
this.appendSelect(
|
|
266
|
-
i18nString(UIStrings.
|
|
267
|
-
Common.Settings.Settings.instance().moduleSetting('
|
|
270
|
+
i18nString(UIStrings.forcesCssForcedColors),
|
|
271
|
+
Common.Settings.Settings.instance().moduleSetting('emulatedCSSMediaFeatureForcedColors'));
|
|
268
272
|
if (supportsPrefersContrast()) {
|
|
269
273
|
this.appendSelect(
|
|
270
274
|
i18nString(UIStrings.forcesCssPreferscontrastMedia),
|
|
271
275
|
Common.Settings.Settings.instance().moduleSetting('emulatedCSSMediaFeaturePrefersContrast'));
|
|
272
276
|
}
|
|
277
|
+
this.appendSelect(
|
|
278
|
+
i18nString(UIStrings.forcesCssPrefersreducedmotion),
|
|
279
|
+
Common.Settings.Settings.instance().moduleSetting('emulatedCSSMediaFeaturePrefersReducedMotion'));
|
|
273
280
|
if (supportsPrefersReducedData()) {
|
|
274
281
|
this.appendSelect(
|
|
275
282
|
i18nString(UIStrings.forcesCssPrefersreduceddataMedia),
|
|
@@ -237,8 +237,6 @@ async function loadMainModule(): Promise<typeof Main> {
|
|
|
237
237
|
|
|
238
238
|
async function loadInspectorMainModule(): Promise<typeof InspectorMain> {
|
|
239
239
|
if (!loadedInspectorMainModule) {
|
|
240
|
-
// Side-effect import resources in module.json
|
|
241
|
-
await Root.Runtime.Runtime.instance().loadModulePromise('entrypoints/inspector_main');
|
|
242
240
|
loadedInspectorMainModule = await import('../inspector_main/inspector_main.js');
|
|
243
241
|
}
|
|
244
242
|
return loadedInspectorMainModule;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
flex: none;
|
|
14
14
|
max-width: 600px;
|
|
15
15
|
max-height: 202px;
|
|
16
|
-
margin: 20px 0 5px
|
|
16
|
+
margin: 20px 0 5px;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.network-discovery-list-empty {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
.network-discovery-list-item {
|
|
28
|
-
padding: 3px 5px
|
|
28
|
+
padding: 3px 5px;
|
|
29
29
|
height: 30px;
|
|
30
30
|
display: flex;
|
|
31
31
|
align-items: center;
|
|
@@ -109,6 +109,6 @@
|
|
|
109
109
|
* Always show an outline. Needed because we have a white background here.
|
|
110
110
|
*/
|
|
111
111
|
|
|
112
|
-
.workspace-settings-tab .harmony-input[type=text]:not(.error-input):not(:invalid) {
|
|
112
|
+
.workspace-settings-tab .harmony-input[type="text"]:not(.error-input):not(:invalid) {
|
|
113
113
|
box-shadow: var(--legacy-focus-ring-inactive-shadow);
|
|
114
114
|
}
|
|
@@ -34,7 +34,7 @@ span.ax-value-undefined {
|
|
|
34
34
|
text-decoration: line-through;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
.tree-outline span[is=dt-icon-label] {
|
|
37
|
+
.tree-outline span[is="dt-icon-label"] {
|
|
38
38
|
position: relative;
|
|
39
39
|
left: -11px;
|
|
40
40
|
}
|
|
@@ -60,7 +60,7 @@ span.ax-value-undefined {
|
|
|
60
60
|
left: -2px;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
.tree-outline span[is=dt-icon-label] + .ax-name {
|
|
63
|
+
.tree-outline span[is="dt-icon-label"] + .ax-name {
|
|
64
64
|
margin-left: -11px;
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -112,7 +112,7 @@ circle.animation-keyframe-point:active {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
.animation-timeline-header::after {
|
|
115
|
-
content:
|
|
115
|
+
content: "";
|
|
116
116
|
height: calc(100% - 48px - 28px);
|
|
117
117
|
position: absolute;
|
|
118
118
|
width: 150px;
|
|
@@ -184,14 +184,14 @@ circle.animation-keyframe-point:active {
|
|
|
184
184
|
height: 100%;
|
|
185
185
|
width: 100%;
|
|
186
186
|
top: 28px;
|
|
187
|
-
border-left: 1px solid var(--color-
|
|
187
|
+
border-left: 1px solid var(--color-red);
|
|
188
188
|
z-index: 2;
|
|
189
189
|
cursor: col-resize;
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
.animation-scrubber-line {
|
|
193
193
|
width: 11px;
|
|
194
|
-
background: linear-gradient(to right, transparent 5px, var(--color-
|
|
194
|
+
background: linear-gradient(to right, transparent 5px, var(--color-red) 5px, var(--color-red) 6px, transparent 6px);
|
|
195
195
|
position: absolute;
|
|
196
196
|
top: -28px;
|
|
197
197
|
height: 28px;
|
|
@@ -204,7 +204,7 @@ circle.animation-keyframe-point:active {
|
|
|
204
204
|
width: 7px;
|
|
205
205
|
height: 7px;
|
|
206
206
|
transform: rotate(45deg);
|
|
207
|
-
background: var(--color-
|
|
207
|
+
background: var(--color-red);
|
|
208
208
|
position: absolute;
|
|
209
209
|
left: 2px;
|
|
210
210
|
top: 1px;
|
|
@@ -361,7 +361,7 @@ text.animation-timeline-grid-label {
|
|
|
361
361
|
|
|
362
362
|
.animation-paused::before,
|
|
363
363
|
.animation-paused::after {
|
|
364
|
-
content:
|
|
364
|
+
content: "";
|
|
365
365
|
background: var(--color-background);
|
|
366
366
|
width: 7px;
|
|
367
367
|
height: 20px;
|
|
@@ -15,10 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
.breakpoint-condition {
|
|
17
17
|
display: block;
|
|
18
|
-
margin
|
|
19
|
-
margin-bottom: 4px;
|
|
20
|
-
margin-left: 23px;
|
|
21
|
-
margin-right: 8px;
|
|
18
|
+
margin: 4px 8px 4px 23px;
|
|
22
19
|
}
|
|
23
20
|
|
|
24
21
|
.breakpoint-condition-input {
|
|
@@ -42,7 +39,7 @@
|
|
|
42
39
|
background-color: var(--legacy-focus-bg-color);
|
|
43
40
|
}
|
|
44
41
|
|
|
45
|
-
.breakpoint-entry [is=dt-checkbox] {
|
|
42
|
+
.breakpoint-entry [is="dt-checkbox"] {
|
|
46
43
|
max-width: 100%;
|
|
47
44
|
}
|
|
48
45
|
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
* found in the LICENSE file.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
[slot=insertion-point-main] {
|
|
7
|
+
[slot="insertion-point-main"] {
|
|
8
8
|
flex-direction: column;
|
|
9
9
|
display: flex;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
[slot=insertion-point-sidebar] {
|
|
12
|
+
[slot="insertion-point-sidebar"] {
|
|
13
13
|
overflow: auto;
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
margin: 0 8px;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
[is=ui-icon] {
|
|
22
|
+
[is="ui-icon"] {
|
|
23
23
|
margin: 0 5px;
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -48,7 +48,7 @@ li .largeicon-navigator-folder {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
@media (forced-colors: active) {
|
|
51
|
-
[is=ui-icon].icon-mask {
|
|
51
|
+
[is="ui-icon"].icon-mask {
|
|
52
52
|
background-color: ButtonText;
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -65,8 +65,8 @@ li .largeicon-navigator-folder {
|
|
|
65
65
|
color: HighlightText;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
.tree-outline li:hover [is=ui-icon].icon-mask,
|
|
69
|
-
.tree-outline li.selected [is=ui-icon].icon-mask,
|
|
68
|
+
.tree-outline li:hover [is="ui-icon"].icon-mask,
|
|
69
|
+
.tree-outline li.selected [is="ui-icon"].icon-mask,
|
|
70
70
|
.tree-outline li.selected:focus .spritesheet-mediumicons:not(.icon-mask) {
|
|
71
71
|
background-color: HighlightText !important; /* stylelint-disable-line declaration-no-important */
|
|
72
72
|
}
|
|
@@ -462,7 +462,7 @@
|
|
|
462
462
|
|
|
463
463
|
@media (forced-colors: active) {
|
|
464
464
|
.console-message-expand-icon,
|
|
465
|
-
.console-warning-level [is=ui-icon].icon-mask.expand-group-icon {
|
|
465
|
+
.console-warning-level [is="ui-icon"].icon-mask.expand-group-icon {
|
|
466
466
|
forced-color-adjust: none;
|
|
467
467
|
background-color: ButtonText;
|
|
468
468
|
}
|
|
@@ -493,7 +493,7 @@
|
|
|
493
493
|
color: HighlightText;
|
|
494
494
|
}
|
|
495
495
|
|
|
496
|
-
.console-message-wrapper:focus [is=ui-icon].icon-mask {
|
|
496
|
+
.console-message-wrapper:focus [is="ui-icon"].icon-mask {
|
|
497
497
|
background-color: HighlightText;
|
|
498
498
|
}
|
|
499
499
|
|