chrome-devtools-frontend 1.0.1589336 → 1.0.1591204
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/docs/ui_engineering.md +33 -0
- package/front_end/core/common/Gzip.ts +17 -2
- package/front_end/core/common/Settings.ts +30 -1
- package/front_end/core/host/UserMetrics.ts +2 -1
- package/front_end/core/root/ExperimentNames.ts +1 -0
- package/front_end/core/root/Runtime.ts +5 -0
- package/front_end/core/sdk/EmulationModel.ts +6 -1
- package/front_end/core/sdk/NetworkManager.ts +49 -2
- package/front_end/core/sdk/NetworkRequest.ts +4 -0
- package/front_end/core/sdk/sdk-meta.ts +26 -0
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +34 -5
- package/front_end/entrypoints/main/MainImpl.ts +8 -0
- package/front_end/generated/Deprecation.ts +7 -0
- package/front_end/generated/InspectorBackendCommands.ts +10 -3
- package/front_end/generated/protocol-mapping.d.ts +19 -0
- package/front_end/generated/protocol-proxy-api.d.ts +15 -0
- package/front_end/generated/protocol.ts +102 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +53 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +140 -32
- package/front_end/panels/ai_assistance/README.md +85 -0
- package/front_end/panels/ai_assistance/aiAssistancePanel.css +5 -0
- package/front_end/panels/ai_assistance/ai_assistance.ts +1 -0
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +130 -9
- package/front_end/panels/ai_assistance/components/ChatView.ts +10 -0
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +208 -0
- package/front_end/panels/ai_assistance/components/chatMessage.css +8 -2
- package/front_end/panels/ai_assistance/components/walkthroughView.css +121 -0
- package/front_end/panels/application/DeviceBoundSessionsView.ts +64 -2
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +25 -46
- package/front_end/panels/console/ConsoleView.ts +8 -8
- package/front_end/panels/console/console-meta.ts +10 -6
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +14 -14
- package/front_end/panels/elements/ComputedStyleWidget.ts +59 -33
- package/front_end/panels/elements/ElementsTreeElement.ts +56 -2
- package/front_end/panels/elements/ElementsTreeOutline.ts +2 -0
- package/front_end/panels/elements/StyleEditorWidget.ts +12 -12
- package/front_end/panels/elements/StylePropertiesSection.ts +65 -64
- package/front_end/panels/elements/StylePropertyTreeElement.ts +139 -136
- package/front_end/panels/elements/StylesContainer.ts +57 -0
- package/front_end/panels/elements/StylesSidebarPane.ts +2 -1
- package/front_end/panels/layer_viewer/Layers3DView.ts +2 -2
- package/front_end/panels/network/RequestInitiatorView.ts +3 -2
- package/front_end/panels/network/RequestPayloadView.ts +7 -6
- package/front_end/panels/search/SearchResultsPane.ts +2 -1
- package/front_end/panels/timeline/timeline-meta.ts +4 -4
- package/front_end/panels/whats_new/ReleaseNoteText.ts +10 -16
- package/front_end/panels/whats_new/resources/WNDT.md +6 -6
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/markdown_view/MarkdownView.ts +5 -6
- package/front_end/ui/components/markdown_view/markdownView.css +6 -0
- package/front_end/ui/components/markdown_view/markdown_view.ts +0 -2
- package/front_end/ui/legacy/Treeoutline.ts +97 -10
- package/front_end/ui/legacy/Widget.ts +11 -1
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +20 -5
- package/front_end/ui/legacy/inspectorCommon.css +2 -0
- package/front_end/ui/visual_logging/Debugging.ts +51 -34
- package/front_end/ui/visual_logging/KnownContextValues.ts +15 -1
- package/front_end/ui/visual_logging/LoggingEvents.ts +5 -2
- package/package.json +1 -1
- package/front_end/ui/components/markdown_view/MarkdownLink.ts +0 -53
- package/front_end/ui/components/markdown_view/markdownLink.css +0 -11
package/docs/ui_engineering.md
CHANGED
|
@@ -1383,6 +1383,39 @@ export const DEFAULT_VIEW = (input, _output, target) => {
|
|
|
1383
1383
|
};
|
|
1384
1384
|
```
|
|
1385
1385
|
|
|
1386
|
+
In a more complex case you might want to skip rendering of the collapsed nodes
|
|
1387
|
+
subtrees and temporarily expand nodes to show search matches. This could be done
|
|
1388
|
+
as follows:
|
|
1389
|
+
|
|
1390
|
+
```typescript
|
|
1391
|
+
export const DEFAULT_VIEW = (input, _output, target) => {
|
|
1392
|
+
render(html`
|
|
1393
|
+
<div>
|
|
1394
|
+
<devtools-tree .template=${html`
|
|
1395
|
+
<ul role="tree">
|
|
1396
|
+
${input.topLevelNodes.map(node => html`
|
|
1397
|
+
<li role="treeitem" ?open=${containsSearchResult(node)}>
|
|
1398
|
+
${node.name}
|
|
1399
|
+
${node.children.length ? html`
|
|
1400
|
+
<ul role="group">
|
|
1401
|
+
${ifExpanded(node.children.map(renderChild))}
|
|
1402
|
+
</ul>
|
|
1403
|
+
` : nothing}
|
|
1404
|
+
</li>`)}
|
|
1405
|
+
</ul>
|
|
1406
|
+
`}></devtools-tree>
|
|
1407
|
+
</div>`,
|
|
1408
|
+
target, {host: input});
|
|
1409
|
+
};
|
|
1410
|
+
```
|
|
1411
|
+
|
|
1412
|
+
Here `open` attribute overrides the expansion state set by the user. Once `open`
|
|
1413
|
+
attribute is removed, the expansion state is reversed to the last state set by
|
|
1414
|
+
the user.
|
|
1415
|
+
|
|
1416
|
+
`ifExpanded` is a lit directive provided on `UI.TreeOutline` and it makes its
|
|
1417
|
+
argument render only if the current tree node is expanded.
|
|
1418
|
+
|
|
1386
1419
|
## Refactoring UI.Toolbar.Provider
|
|
1387
1420
|
|
|
1388
1421
|
As part of the migration, sometimes classes need to be broken up into smaller pieces. Classes implementing
|
|
@@ -37,11 +37,26 @@ export async function fileToString(file: File): Promise<string> {
|
|
|
37
37
|
* Decompress a gzipped ArrayBuffer to a string.
|
|
38
38
|
* Consider using `arrayBufferToString` instead, which can handle both gzipped and plain text buffers.
|
|
39
39
|
*/
|
|
40
|
-
export async function decompress(gzippedBuffer: ArrayBufferLike): Promise<string> {
|
|
40
|
+
export async function decompress(gzippedBuffer: ArrayBufferLike, charset = 'utf-8'): Promise<string> {
|
|
41
41
|
const buffer = await gzipCodec(gzippedBuffer, new DecompressionStream('gzip'));
|
|
42
|
-
const str = new TextDecoder(
|
|
42
|
+
const str = new TextDecoder(charset).decode(buffer);
|
|
43
43
|
return str;
|
|
44
44
|
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Decompress a deflate-encoded ArrayBuffer to a string.
|
|
48
|
+
* Tries 'deflate' (zlib wrapper) first, then falls back to 'deflate-raw'.
|
|
49
|
+
*/
|
|
50
|
+
export async function decompressDeflate(buffer: ArrayBufferLike, charset = 'utf-8'): Promise<string> {
|
|
51
|
+
let decompressedBuffer: ArrayBuffer;
|
|
52
|
+
try {
|
|
53
|
+
decompressedBuffer = await gzipCodec(buffer, new DecompressionStream('deflate'));
|
|
54
|
+
} catch {
|
|
55
|
+
// Try deflate-raw format if zlib-wrapped deflate fails.
|
|
56
|
+
decompressedBuffer = await gzipCodec(buffer, new DecompressionStream('deflate-raw'));
|
|
57
|
+
}
|
|
58
|
+
return new TextDecoder(charset).decode(decompressedBuffer);
|
|
59
|
+
}
|
|
45
60
|
export async function compress(str: string): Promise<ArrayBuffer> {
|
|
46
61
|
const encoded = new TextEncoder().encode(str);
|
|
47
62
|
const buffer = await gzipCodec(encoded, new CompressionStream('gzip'));
|
|
@@ -684,7 +684,7 @@ export class VersionController {
|
|
|
684
684
|
static readonly SYNCED_VERSION_SETTING_NAME = 'syncedInspectorVersion';
|
|
685
685
|
static readonly LOCAL_VERSION_SETTING_NAME = 'localInspectorVersion';
|
|
686
686
|
|
|
687
|
-
static readonly CURRENT_VERSION =
|
|
687
|
+
static readonly CURRENT_VERSION = 41;
|
|
688
688
|
|
|
689
689
|
readonly #settings: Settings;
|
|
690
690
|
readonly #globalVersionSetting: Setting<number>;
|
|
@@ -1447,6 +1447,35 @@ export class VersionController {
|
|
|
1447
1447
|
}
|
|
1448
1448
|
}
|
|
1449
1449
|
|
|
1450
|
+
// This migration handles two setting renames that requires inverted logic
|
|
1451
|
+
// (from "Hide X" to "X") and flipped the default values to true.
|
|
1452
|
+
updateVersionFrom40To41(): void {
|
|
1453
|
+
// 1. Rename 'Hide network messages' to 'Network messages'
|
|
1454
|
+
if (this.#settings.syncedStorage.has('hide-network-messages')) {
|
|
1455
|
+
const oldNetworkSetting = this.#settings.createSetting('hide-network-messages', false, SettingStorageType.SYNCED);
|
|
1456
|
+
if (!this.#settings.syncedStorage.has('network-messages')) {
|
|
1457
|
+
const newNetworkSetting = this.#settings.createSetting('network-messages', true, SettingStorageType.SYNCED);
|
|
1458
|
+
// If the user had a saved preference for the old setting, migrate it by
|
|
1459
|
+
// inverting the value to match the new logic.
|
|
1460
|
+
newNetworkSetting.set(!oldNetworkSetting.get());
|
|
1461
|
+
}
|
|
1462
|
+
this.#removeSetting(oldNetworkSetting);
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
// 2. Rename 'Hide `chrome` frame in Layers view' to 'Chrome frame in Layers view'
|
|
1466
|
+
if (this.#settings.syncedStorage.has('frame-viewer-hide-chrome-window')) {
|
|
1467
|
+
const oldChromeFrameSetting =
|
|
1468
|
+
this.#settings.createSetting('frame-viewer-hide-chrome-window', false, SettingStorageType.SYNCED);
|
|
1469
|
+
if (!this.#settings.syncedStorage.has('frame-viewer-chrome-window')) {
|
|
1470
|
+
const newChromeFrameSetting =
|
|
1471
|
+
this.#settings.createSetting('frame-viewer-chrome-window', true, SettingStorageType.SYNCED);
|
|
1472
|
+
// Similar to above, move the preference and invert the boolean.
|
|
1473
|
+
newChromeFrameSetting.set(!oldChromeFrameSetting.get());
|
|
1474
|
+
}
|
|
1475
|
+
this.#removeSetting(oldChromeFrameSetting);
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1450
1479
|
/*
|
|
1451
1480
|
* Any new migration should be added before this comment.
|
|
1452
1481
|
*
|
|
@@ -825,10 +825,11 @@ export enum DevtoolsExperiments {
|
|
|
825
825
|
'use-source-map-scopes' = 76,
|
|
826
826
|
'timeline-show-postmessage-events' = 86,
|
|
827
827
|
'timeline-debug-mode' = 93,
|
|
828
|
+
'durable-messages' = 110,
|
|
828
829
|
/* eslint-enable @typescript-eslint/naming-convention */
|
|
829
830
|
|
|
830
831
|
// Increment this when new experiments are added.
|
|
831
|
-
MAX_VALUE =
|
|
832
|
+
MAX_VALUE = 111,
|
|
832
833
|
}
|
|
833
834
|
|
|
834
835
|
/** Update DevToolsIssuesPanelIssueExpanded from tools/metrics/histograms/enums.xml if new enum is added. **/
|
|
@@ -23,6 +23,7 @@ export enum ExperimentName {
|
|
|
23
23
|
USE_SOURCE_MAP_SCOPES = 'use-source-map-scopes',
|
|
24
24
|
TIMELINE_SHOW_POST_MESSAGE_EVENTS = 'timeline-show-postmessage-events',
|
|
25
25
|
TIMELINE_DEBUG_MODE = 'timeline-debug-mode',
|
|
26
|
+
DURABLE_MESSAGES = 'durable-messages',
|
|
26
27
|
// Adding or removing an entry from this enum?
|
|
27
28
|
// You will need to update:
|
|
28
29
|
// 1. DevToolsExperiments enum in host/UserMetrics.ts
|
|
@@ -534,6 +534,10 @@ export interface HostConfigAnimationStylesInStylesTab {
|
|
|
534
534
|
enabled: boolean;
|
|
535
535
|
}
|
|
536
536
|
|
|
537
|
+
export interface HostConfigJpegXlImageFormat {
|
|
538
|
+
enabled: boolean;
|
|
539
|
+
}
|
|
540
|
+
|
|
537
541
|
export interface HostConfigThirdPartyCookieControls {
|
|
538
542
|
thirdPartyCookieRestrictionEnabled: boolean;
|
|
539
543
|
thirdPartyCookieMetadataEnabled: boolean;
|
|
@@ -641,6 +645,7 @@ export type HostConfig = Platform.TypeScriptUtilities.RecursivePartial<{
|
|
|
641
645
|
isOffTheRecord: boolean,
|
|
642
646
|
devToolsEnableOriginBoundCookies: HostConfigEnableOriginBoundCookies,
|
|
643
647
|
devToolsAnimationStylesInStylesTab: HostConfigAnimationStylesInStylesTab,
|
|
648
|
+
devToolsJpegXlImageFormat: HostConfigJpegXlImageFormat,
|
|
644
649
|
thirdPartyCookieControls: HostConfigThirdPartyCookieControls,
|
|
645
650
|
devToolsAiGeneratedTimelineLabels: AiGeneratedTimelineLabels,
|
|
646
651
|
devToolsAllowPopoverForcing: AllowPopoverForcing,
|
|
@@ -191,6 +191,7 @@ export class EmulationModel extends SDKModel<void> {
|
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
const avifFormatDisabledSetting = Common.Settings.Settings.instance().moduleSetting('avif-format-disabled');
|
|
194
|
+
const jpegXlFormatDisabledSetting = Common.Settings.Settings.instance().moduleSetting('jpeg-xl-format-disabled');
|
|
194
195
|
const webpFormatDisabledSetting = Common.Settings.Settings.instance().moduleSetting('webp-format-disabled');
|
|
195
196
|
|
|
196
197
|
const updateDisabledImageFormats = (): void => {
|
|
@@ -198,6 +199,9 @@ export class EmulationModel extends SDKModel<void> {
|
|
|
198
199
|
if (avifFormatDisabledSetting.get()) {
|
|
199
200
|
types.push(Protocol.Emulation.DisabledImageType.Avif);
|
|
200
201
|
}
|
|
202
|
+
if (jpegXlFormatDisabledSetting.get()) {
|
|
203
|
+
types.push(Protocol.Emulation.DisabledImageType.Jxl);
|
|
204
|
+
}
|
|
201
205
|
if (webpFormatDisabledSetting.get()) {
|
|
202
206
|
types.push(Protocol.Emulation.DisabledImageType.Webp);
|
|
203
207
|
}
|
|
@@ -205,9 +209,10 @@ export class EmulationModel extends SDKModel<void> {
|
|
|
205
209
|
};
|
|
206
210
|
|
|
207
211
|
avifFormatDisabledSetting.addChangeListener(updateDisabledImageFormats);
|
|
212
|
+
jpegXlFormatDisabledSetting.addChangeListener(updateDisabledImageFormats);
|
|
208
213
|
webpFormatDisabledSetting.addChangeListener(updateDisabledImageFormats);
|
|
209
214
|
|
|
210
|
-
if (avifFormatDisabledSetting.get() || webpFormatDisabledSetting.get()) {
|
|
215
|
+
if (avifFormatDisabledSetting.get() || jpegXlFormatDisabledSetting.get() || webpFormatDisabledSetting.get()) {
|
|
211
216
|
updateDisabledImageFormats();
|
|
212
217
|
}
|
|
213
218
|
|
|
@@ -277,13 +277,56 @@ export class NetworkManager extends SDKModel<EventTypes> {
|
|
|
277
277
|
return null;
|
|
278
278
|
}
|
|
279
279
|
try {
|
|
280
|
-
const {postData} = await manager.#networkAgent.invoke_getRequestPostData({requestId});
|
|
280
|
+
const {postData, base64Encoded} = await manager.#networkAgent.invoke_getRequestPostData({requestId});
|
|
281
|
+
if (base64Encoded && postData) {
|
|
282
|
+
// Decode base64 to get raw bytes as an ArrayBuffer.
|
|
283
|
+
const binaryString = window.atob(postData);
|
|
284
|
+
const bytes = new Uint8Array(binaryString.length);
|
|
285
|
+
for (let i = 0; i < binaryString.length; i++) {
|
|
286
|
+
bytes[i] = binaryString.charCodeAt(i);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
// Extract charset from request Content-Type header, defaulting to utf-8.
|
|
290
|
+
const requestContentType = request.requestContentType();
|
|
291
|
+
const charset =
|
|
292
|
+
requestContentType ? Platform.MimeType.parseContentType(requestContentType).charset ?? 'utf-8' : 'utf-8';
|
|
293
|
+
|
|
294
|
+
// If the request body is compressed, attempt to decompress it.
|
|
295
|
+
const contentEncoding = request.requestContentEncoding()?.toLowerCase();
|
|
296
|
+
if (contentEncoding) {
|
|
297
|
+
const decompressed = await NetworkManager.#tryDecompressBody(bytes.buffer, contentEncoding, charset);
|
|
298
|
+
if (decompressed !== null) {
|
|
299
|
+
return decompressed;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
// Not compressed or decompression not applicable -- decode as text.
|
|
304
|
+
return new TextDecoder(charset).decode(bytes);
|
|
305
|
+
}
|
|
281
306
|
return postData;
|
|
282
307
|
} catch (e) {
|
|
283
308
|
return e.message;
|
|
284
309
|
}
|
|
285
310
|
}
|
|
286
311
|
|
|
312
|
+
/**
|
|
313
|
+
* Attempts to decompress a compressed request body.
|
|
314
|
+
* Returns the decompressed string, or null if decompression is not applicable.
|
|
315
|
+
*/
|
|
316
|
+
static async #tryDecompressBody(buffer: ArrayBuffer, encoding: string, charset: string): Promise<string|null> {
|
|
317
|
+
try {
|
|
318
|
+
if (encoding.includes('gzip') && Common.Gzip.isGzip(buffer)) {
|
|
319
|
+
return await Common.Gzip.decompress(buffer, charset);
|
|
320
|
+
}
|
|
321
|
+
if (encoding.includes('deflate')) {
|
|
322
|
+
return await Common.Gzip.decompressDeflate(buffer, charset);
|
|
323
|
+
}
|
|
324
|
+
} catch (e) {
|
|
325
|
+
console.warn('Failed to decompress request body:', e);
|
|
326
|
+
}
|
|
327
|
+
return null;
|
|
328
|
+
}
|
|
329
|
+
|
|
287
330
|
static connectionType(conditions: Conditions): Protocol.Network.ConnectionType {
|
|
288
331
|
if (!conditions.download && !conditions.upload) {
|
|
289
332
|
return Protocol.Network.ConnectionType.None;
|
|
@@ -567,7 +610,11 @@ export class NetworkDispatcher implements ProtocolProxyApi.NetworkDispatcher {
|
|
|
567
610
|
private updateNetworkRequestWithRequest(networkRequest: NetworkRequest, request: Protocol.Network.Request): void {
|
|
568
611
|
networkRequest.requestMethod = request.method;
|
|
569
612
|
networkRequest.setRequestHeaders(this.headersMapToHeadersArray(request.headers));
|
|
570
|
-
|
|
613
|
+
// If the request body is compressed, discard the inline postData which is
|
|
614
|
+
// garbled (binary-as-text). The getRequestPostData command will provide
|
|
615
|
+
// properly base64-encoded data that we can decompress.
|
|
616
|
+
const isCompressed = Boolean(networkRequest.requestContentEncoding());
|
|
617
|
+
networkRequest.setRequestFormData(Boolean(request.hasPostData), isCompressed ? null : (request.postData || null));
|
|
571
618
|
networkRequest.setInitialPriority(request.initialPriority);
|
|
572
619
|
networkRequest.mixedContentType = request.mixedContentType || Protocol.Security.MixedContentType.None;
|
|
573
620
|
networkRequest.setReferrerPolicy(request.referrerPolicy);
|
|
@@ -1471,6 +1471,10 @@ export class NetworkRequest extends Common.ObjectWrapper.ObjectWrapper<EventType
|
|
|
1471
1471
|
return this.requestHeaderValue('Content-Type');
|
|
1472
1472
|
}
|
|
1473
1473
|
|
|
1474
|
+
requestContentEncoding(): string|undefined {
|
|
1475
|
+
return this.requestHeaderValue('Content-Encoding');
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1474
1478
|
hasErrorStatusCode(): boolean {
|
|
1475
1479
|
return this.statusCode >= 400;
|
|
1476
1480
|
}
|
|
@@ -313,6 +313,14 @@ const UIStrings = {
|
|
|
313
313
|
* @description Title of a setting that enables AVIF format
|
|
314
314
|
*/
|
|
315
315
|
enableAvifFormat: 'Enable `AVIF` format',
|
|
316
|
+
/**
|
|
317
|
+
* @description Title of a setting that disables JPEG XL format
|
|
318
|
+
*/
|
|
319
|
+
disableJpegXlFormat: 'Disable `JPEG XL` format',
|
|
320
|
+
/**
|
|
321
|
+
* @description Title of a setting that enables JPEG XL format
|
|
322
|
+
*/
|
|
323
|
+
enableJpegXlFormat: 'Enable `JPEG XL` format',
|
|
316
324
|
/**
|
|
317
325
|
* @description Title of a setting that disables WebP format
|
|
318
326
|
*/
|
|
@@ -1072,6 +1080,24 @@ Common.Settings.registerSettingExtension({
|
|
|
1072
1080
|
defaultValue: false,
|
|
1073
1081
|
});
|
|
1074
1082
|
|
|
1083
|
+
Common.Settings.registerSettingExtension({
|
|
1084
|
+
category: Common.Settings.SettingCategory.RENDERING,
|
|
1085
|
+
settingName: 'jpeg-xl-format-disabled',
|
|
1086
|
+
settingType: Common.Settings.SettingType.BOOLEAN,
|
|
1087
|
+
storageType: Common.Settings.SettingStorageType.SESSION,
|
|
1088
|
+
options: [
|
|
1089
|
+
{
|
|
1090
|
+
value: true,
|
|
1091
|
+
title: i18nLazyString(UIStrings.disableJpegXlFormat),
|
|
1092
|
+
},
|
|
1093
|
+
{
|
|
1094
|
+
value: false,
|
|
1095
|
+
title: i18nLazyString(UIStrings.enableJpegXlFormat),
|
|
1096
|
+
},
|
|
1097
|
+
],
|
|
1098
|
+
defaultValue: false,
|
|
1099
|
+
});
|
|
1100
|
+
|
|
1075
1101
|
Common.Settings.registerSettingExtension({
|
|
1076
1102
|
category: Common.Settings.SettingCategory.RENDERING,
|
|
1077
1103
|
settingName: 'webp-format-disabled',
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import * as Common from '../../core/common/common.js';
|
|
8
8
|
import * as Host from '../../core/host/host.js';
|
|
9
9
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
10
|
+
import * as Root from '../../core/root/root.js';
|
|
10
11
|
import * as SettingsUI from '../../ui/legacy/components/settings_ui/settings_ui.js';
|
|
11
12
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
12
13
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
@@ -145,10 +146,14 @@ const UIStrings = {
|
|
|
145
146
|
*/
|
|
146
147
|
disableAvifImageFormat: 'Disable `AVIF` image format',
|
|
147
148
|
/**
|
|
148
|
-
* @description Explanation text for
|
|
149
|
-
* format' settings in the Rendering tool.
|
|
149
|
+
* @description Explanation text for the image format disabling settings in the Rendering tool.
|
|
150
150
|
*/
|
|
151
151
|
requiresAPageReloadToApplyAnd: 'Requires a page reload to apply and disables caching for image requests.',
|
|
152
|
+
/**
|
|
153
|
+
* @description The name of a checkbox setting in the Rendering tool. This setting disables the
|
|
154
|
+
* page from loading images with the JPEG XL format.
|
|
155
|
+
*/
|
|
156
|
+
disableJpegXlImageFormat: 'Disable `JPEG XL` image format',
|
|
152
157
|
/**
|
|
153
158
|
* @description The name of a checkbox setting in the Rendering tool. This setting disables the
|
|
154
159
|
* page from loading images with the WebP format.
|
|
@@ -184,7 +189,13 @@ const supportsPrefersContrast = (): boolean => {
|
|
|
184
189
|
return window.matchMedia(query).matches;
|
|
185
190
|
};
|
|
186
191
|
|
|
192
|
+
const supportsJpegXl = (): boolean => {
|
|
193
|
+
return Boolean(Root.Runtime.hostConfig.devToolsJpegXlImageFormat?.enabled);
|
|
194
|
+
};
|
|
195
|
+
|
|
187
196
|
export class RenderingOptionsView extends UI.Widget.VBox {
|
|
197
|
+
#jpegXlCheckboxAdded = false;
|
|
198
|
+
|
|
188
199
|
constructor() {
|
|
189
200
|
super({useShadowDom: true});
|
|
190
201
|
this.registerRequiredCSS(renderingOptionsStyles);
|
|
@@ -266,13 +277,19 @@ export class RenderingOptionsView extends UI.Widget.VBox {
|
|
|
266
277
|
|
|
267
278
|
this.contentElement.createChild('div').classList.add('panel-section-separator');
|
|
268
279
|
|
|
280
|
+
const avifFormatDisabledSetting = Common.Settings.Settings.instance().moduleSetting('avif-format-disabled');
|
|
281
|
+
const jpegXlFormatDisabledSetting = Common.Settings.Settings.instance().moduleSetting('jpeg-xl-format-disabled');
|
|
282
|
+
const webpFormatDisabledSetting = Common.Settings.Settings.instance().moduleSetting('webp-format-disabled');
|
|
283
|
+
|
|
269
284
|
this.#appendCheckbox(
|
|
270
285
|
i18nString(UIStrings.disableAvifImageFormat), i18nString(UIStrings.requiresAPageReloadToApplyAnd),
|
|
271
|
-
|
|
286
|
+
avifFormatDisabledSetting);
|
|
272
287
|
|
|
273
|
-
this.#appendCheckbox(
|
|
288
|
+
const webpCheckbox = this.#appendCheckbox(
|
|
274
289
|
i18nString(UIStrings.disableWebpImageFormat), i18nString(UIStrings.requiresAPageReloadToApplyAnd),
|
|
275
|
-
|
|
290
|
+
webpFormatDisabledSetting);
|
|
291
|
+
|
|
292
|
+
this.#appendJpegXlCheckboxWhenSupported(webpCheckbox, jpegXlFormatDisabledSetting);
|
|
276
293
|
|
|
277
294
|
this.contentElement.createChild('div').classList.add('panel-section-separator');
|
|
278
295
|
}
|
|
@@ -286,6 +303,18 @@ export class RenderingOptionsView extends UI.Widget.VBox {
|
|
|
286
303
|
return checkbox;
|
|
287
304
|
}
|
|
288
305
|
|
|
306
|
+
#appendJpegXlCheckboxWhenSupported(
|
|
307
|
+
webpCheckbox: UI.UIUtils.CheckboxLabel, jpegXlFormatDisabledSetting: Common.Settings.Setting<boolean>): void {
|
|
308
|
+
if (this.#jpegXlCheckboxAdded || !supportsJpegXl()) {
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
this.#jpegXlCheckboxAdded = true;
|
|
313
|
+
webpCheckbox.before(this.#appendCheckbox(
|
|
314
|
+
i18nString(UIStrings.disableJpegXlImageFormat), i18nString(UIStrings.requiresAPageReloadToApplyAnd),
|
|
315
|
+
jpegXlFormatDisabledSetting));
|
|
316
|
+
}
|
|
317
|
+
|
|
289
318
|
#appendSelect(label: string, setting: Common.Settings.Setting<unknown>): void {
|
|
290
319
|
const control = SettingsUI.SettingsUI.createControlForSetting(setting, label);
|
|
291
320
|
if (control) {
|
|
@@ -423,6 +423,14 @@ export class MainImpl {
|
|
|
423
423
|
'Performance panel: show postMessage dispatch and handling flows',
|
|
424
424
|
);
|
|
425
425
|
|
|
426
|
+
Root.Runtime.experiments.registerHostExperiment({
|
|
427
|
+
name: Root.ExperimentNames.ExperimentName.DURABLE_MESSAGES,
|
|
428
|
+
title: 'Durable Messages',
|
|
429
|
+
aboutFlag: 'devtools-enable-durable-messages',
|
|
430
|
+
isEnabled: Root.Runtime.hostConfig.devToolsEnableDurableMessages?.enabled ?? false,
|
|
431
|
+
requiresChromeRestart: false,
|
|
432
|
+
});
|
|
433
|
+
|
|
426
434
|
Root.Runtime.experiments.enableExperimentsByDefault([
|
|
427
435
|
Root.ExperimentNames.ExperimentName.FULL_ACCESSIBILITY_TREE,
|
|
428
436
|
Root.ExperimentNames.ExperimentName.USE_SOURCE_MAP_SCOPES,
|
|
@@ -106,6 +106,10 @@ export const UIStrings = {
|
|
|
106
106
|
* @description Warning for using deprecated 'measureInputUsage' method.
|
|
107
107
|
*/
|
|
108
108
|
LanguageModel_MeasureInputUsage: "LanguageModel.measureInputUsage() is deprecated. Please use LanguageModel.measureContextUsage() instead. This alias is only available in extensions.",
|
|
109
|
+
/**
|
|
110
|
+
* @description Warning for using deprecated 'onquotaoverflow' event handler.
|
|
111
|
+
*/
|
|
112
|
+
LanguageModel_OnQuotaOverflow: "LanguageModel.onquotaoverflow is deprecated. Please use LanguageModel.oncontextoverflow instead. The LanguageModel.onquotaoverflow alias is only available in extensions.",
|
|
109
113
|
/**
|
|
110
114
|
* @description Warning message for web developers when they call the deprecated LanguageModel.params() method.
|
|
111
115
|
*/
|
|
@@ -334,6 +338,9 @@ export const DEPRECATIONS_METADATA: Partial<Record<string, DeprecationDescriptor
|
|
|
334
338
|
"LanguageModel_MeasureInputUsage": {
|
|
335
339
|
"chromeStatusFeature": 5134603979063296
|
|
336
340
|
},
|
|
341
|
+
"LanguageModel_OnQuotaOverflow": {
|
|
342
|
+
"chromeStatusFeature": 5134603979063296
|
|
343
|
+
},
|
|
337
344
|
"LocalCSSFileExtensionRejected": {
|
|
338
345
|
"milestone": 64
|
|
339
346
|
},
|
|
@@ -93,7 +93,7 @@ inspectorBackend.registerEnum("Audits.StyleSheetLoadingIssueReason", {LateImport
|
|
|
93
93
|
inspectorBackend.registerEnum("Audits.PropertyRuleIssueReason", {InvalidSyntax: "InvalidSyntax", InvalidInitialValue: "InvalidInitialValue", InvalidInherits: "InvalidInherits", InvalidName: "InvalidName"});
|
|
94
94
|
inspectorBackend.registerEnum("Audits.UserReidentificationIssueType", {BlockedFrameNavigation: "BlockedFrameNavigation", BlockedSubresource: "BlockedSubresource", NoisedCanvasReadback: "NoisedCanvasReadback"});
|
|
95
95
|
inspectorBackend.registerEnum("Audits.PermissionElementIssueType", {InvalidType: "InvalidType", FencedFrameDisallowed: "FencedFrameDisallowed", CspFrameAncestorsMissing: "CspFrameAncestorsMissing", PermissionsPolicyBlocked: "PermissionsPolicyBlocked", PaddingRightUnsupported: "PaddingRightUnsupported", PaddingBottomUnsupported: "PaddingBottomUnsupported", InsetBoxShadowUnsupported: "InsetBoxShadowUnsupported", RequestInProgress: "RequestInProgress", UntrustedEvent: "UntrustedEvent", RegistrationFailed: "RegistrationFailed", TypeNotSupported: "TypeNotSupported", InvalidTypeActivation: "InvalidTypeActivation", SecurityChecksFailed: "SecurityChecksFailed", ActivationDisabled: "ActivationDisabled", GeolocationDeprecated: "GeolocationDeprecated", InvalidDisplayStyle: "InvalidDisplayStyle", NonOpaqueColor: "NonOpaqueColor", LowContrast: "LowContrast", FontSizeTooSmall: "FontSizeTooSmall", FontSizeTooLarge: "FontSizeTooLarge", InvalidSizeValue: "InvalidSizeValue"});
|
|
96
|
-
inspectorBackend.registerEnum("Audits.InspectorIssueCode", {CookieIssue: "CookieIssue", MixedContentIssue: "MixedContentIssue", BlockedByResponseIssue: "BlockedByResponseIssue", HeavyAdIssue: "HeavyAdIssue", ContentSecurityPolicyIssue: "ContentSecurityPolicyIssue", SharedArrayBufferIssue: "SharedArrayBufferIssue", LowTextContrastIssue: "LowTextContrastIssue", CorsIssue: "CorsIssue", AttributionReportingIssue: "AttributionReportingIssue", QuirksModeIssue: "QuirksModeIssue", PartitioningBlobURLIssue: "PartitioningBlobURLIssue", NavigatorUserAgentIssue: "NavigatorUserAgentIssue", GenericIssue: "GenericIssue", DeprecationIssue: "DeprecationIssue", ClientHintIssue: "ClientHintIssue", FederatedAuthRequestIssue: "FederatedAuthRequestIssue", BounceTrackingIssue: "BounceTrackingIssue", CookieDeprecationMetadataIssue: "CookieDeprecationMetadataIssue", StylesheetLoadingIssue: "StylesheetLoadingIssue", FederatedAuthUserInfoRequestIssue: "FederatedAuthUserInfoRequestIssue", PropertyRuleIssue: "PropertyRuleIssue", SharedDictionaryIssue: "SharedDictionaryIssue", ElementAccessibilityIssue: "ElementAccessibilityIssue", SRIMessageSignatureIssue: "SRIMessageSignatureIssue", UnencodedDigestIssue: "UnencodedDigestIssue", ConnectionAllowlistIssue: "ConnectionAllowlistIssue", UserReidentificationIssue: "UserReidentificationIssue", PermissionElementIssue: "PermissionElementIssue", PerformanceIssue: "PerformanceIssue"});
|
|
96
|
+
inspectorBackend.registerEnum("Audits.InspectorIssueCode", {CookieIssue: "CookieIssue", MixedContentIssue: "MixedContentIssue", BlockedByResponseIssue: "BlockedByResponseIssue", HeavyAdIssue: "HeavyAdIssue", ContentSecurityPolicyIssue: "ContentSecurityPolicyIssue", SharedArrayBufferIssue: "SharedArrayBufferIssue", LowTextContrastIssue: "LowTextContrastIssue", CorsIssue: "CorsIssue", AttributionReportingIssue: "AttributionReportingIssue", QuirksModeIssue: "QuirksModeIssue", PartitioningBlobURLIssue: "PartitioningBlobURLIssue", NavigatorUserAgentIssue: "NavigatorUserAgentIssue", GenericIssue: "GenericIssue", DeprecationIssue: "DeprecationIssue", ClientHintIssue: "ClientHintIssue", FederatedAuthRequestIssue: "FederatedAuthRequestIssue", BounceTrackingIssue: "BounceTrackingIssue", CookieDeprecationMetadataIssue: "CookieDeprecationMetadataIssue", StylesheetLoadingIssue: "StylesheetLoadingIssue", FederatedAuthUserInfoRequestIssue: "FederatedAuthUserInfoRequestIssue", PropertyRuleIssue: "PropertyRuleIssue", SharedDictionaryIssue: "SharedDictionaryIssue", ElementAccessibilityIssue: "ElementAccessibilityIssue", SRIMessageSignatureIssue: "SRIMessageSignatureIssue", UnencodedDigestIssue: "UnencodedDigestIssue", ConnectionAllowlistIssue: "ConnectionAllowlistIssue", UserReidentificationIssue: "UserReidentificationIssue", PermissionElementIssue: "PermissionElementIssue", PerformanceIssue: "PerformanceIssue", SelectivePermissionsInterventionIssue: "SelectivePermissionsInterventionIssue"});
|
|
97
97
|
inspectorBackend.registerEvent("Audits.issueAdded", ["issue"]);
|
|
98
98
|
inspectorBackend.registerEnum("Audits.GetEncodedResponseRequestEncoding", {Webp: "webp", Jpeg: "jpeg", Png: "png"});
|
|
99
99
|
inspectorBackend.registerCommand("Audits.getEncodedResponse", [{"name": "requestId", "type": "string", "optional": false, "description": "Identifier of the network request to get content for.", "typeRef": "Network.RequestId"}, {"name": "encoding", "type": "string", "optional": false, "description": "The encoding to use.", "typeRef": "Audits.GetEncodedResponseRequestEncoding"}, {"name": "quality", "type": "number", "optional": true, "description": "The quality of the encoding (0-1). (defaults to 1)", "typeRef": null}, {"name": "sizeOnly", "type": "boolean", "optional": true, "description": "Whether to only return the size information (defaults to false).", "typeRef": null}], ["body", "originalSize", "encodedSize"], "Returns the response body and size if it were re-encoded with the specified settings. Only applies to images.");
|
|
@@ -136,7 +136,10 @@ inspectorBackend.registerType("Audits.StylesheetLoadingIssueDetails", [{"name":
|
|
|
136
136
|
inspectorBackend.registerType("Audits.PropertyRuleIssueDetails", [{"name": "sourceCodeLocation", "type": "object", "optional": false, "description": "Source code position of the property rule.", "typeRef": "Audits.SourceCodeLocation"}, {"name": "propertyRuleIssueReason", "type": "string", "optional": false, "description": "Reason why the property rule was discarded.", "typeRef": "Audits.PropertyRuleIssueReason"}, {"name": "propertyValue", "type": "string", "optional": true, "description": "The value of the property rule property that failed to parse", "typeRef": null}]);
|
|
137
137
|
inspectorBackend.registerType("Audits.UserReidentificationIssueDetails", [{"name": "type", "type": "string", "optional": false, "description": "", "typeRef": "Audits.UserReidentificationIssueType"}, {"name": "request", "type": "object", "optional": true, "description": "Applies to BlockedFrameNavigation and BlockedSubresource issue types.", "typeRef": "Audits.AffectedRequest"}, {"name": "sourceCodeLocation", "type": "object", "optional": true, "description": "Applies to NoisedCanvasReadback issue type.", "typeRef": "Audits.SourceCodeLocation"}]);
|
|
138
138
|
inspectorBackend.registerType("Audits.PermissionElementIssueDetails", [{"name": "issueType", "type": "string", "optional": false, "description": "", "typeRef": "Audits.PermissionElementIssueType"}, {"name": "type", "type": "string", "optional": true, "description": "The value of the type attribute.", "typeRef": null}, {"name": "nodeId", "type": "number", "optional": true, "description": "The node ID of the <permission> element.", "typeRef": "DOM.BackendNodeId"}, {"name": "isWarning", "type": "boolean", "optional": true, "description": "True if the issue is a warning, false if it is an error.", "typeRef": null}, {"name": "permissionName", "type": "string", "optional": true, "description": "Fields for message construction: Used for messages that reference a specific permission name", "typeRef": null}, {"name": "occluderNodeInfo", "type": "string", "optional": true, "description": "Used for messages about occlusion", "typeRef": null}, {"name": "occluderParentNodeInfo", "type": "string", "optional": true, "description": "Used for messages about occluder's parent", "typeRef": null}, {"name": "disableReason", "type": "string", "optional": true, "description": "Used for messages about activation disabled reason", "typeRef": null}]);
|
|
139
|
-
inspectorBackend.registerType("Audits.
|
|
139
|
+
inspectorBackend.registerType("Audits.AdScriptIdentifier", [{"name": "scriptId", "type": "string", "optional": false, "description": "The script's v8 identifier.", "typeRef": "Runtime.ScriptId"}, {"name": "debuggerId", "type": "string", "optional": false, "description": "v8's debugging id for the v8::Context.", "typeRef": "Runtime.UniqueDebuggerId"}, {"name": "name", "type": "string", "optional": false, "description": "The script's url (or generated name based on id if inline script).", "typeRef": null}]);
|
|
140
|
+
inspectorBackend.registerType("Audits.AdAncestry", [{"name": "adAncestryChain", "type": "array", "optional": false, "description": "The ad-script in the stack when the offending script was loaded. This is recursive down to the root script that was tagged due to the filterlist rule.", "typeRef": "Audits.AdScriptIdentifier"}, {"name": "rootScriptFilterlistRule", "type": "string", "optional": true, "description": "The filterlist rule that caused the root (last) script in `adAncestry` to be ad-tagged.", "typeRef": null}]);
|
|
141
|
+
inspectorBackend.registerType("Audits.SelectivePermissionsInterventionIssueDetails", [{"name": "apiName", "type": "string", "optional": false, "description": "Which API was intervened on.", "typeRef": null}, {"name": "adAncestry", "type": "object", "optional": false, "description": "Why the ad script using the API is considered an ad.", "typeRef": "Audits.AdAncestry"}, {"name": "stackTrace", "type": "object", "optional": true, "description": "The stack trace at the time of the intervention.", "typeRef": "Runtime.StackTrace"}]);
|
|
142
|
+
inspectorBackend.registerType("Audits.InspectorIssueDetails", [{"name": "cookieIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CookieIssueDetails"}, {"name": "mixedContentIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.MixedContentIssueDetails"}, {"name": "blockedByResponseIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.BlockedByResponseIssueDetails"}, {"name": "heavyAdIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.HeavyAdIssueDetails"}, {"name": "contentSecurityPolicyIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ContentSecurityPolicyIssueDetails"}, {"name": "sharedArrayBufferIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SharedArrayBufferIssueDetails"}, {"name": "lowTextContrastIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.LowTextContrastIssueDetails"}, {"name": "corsIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CorsIssueDetails"}, {"name": "attributionReportingIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.AttributionReportingIssueDetails"}, {"name": "quirksModeIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.QuirksModeIssueDetails"}, {"name": "partitioningBlobURLIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PartitioningBlobURLIssueDetails"}, {"name": "navigatorUserAgentIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.NavigatorUserAgentIssueDetails"}, {"name": "genericIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.GenericIssueDetails"}, {"name": "deprecationIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.DeprecationIssueDetails"}, {"name": "clientHintIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ClientHintIssueDetails"}, {"name": "federatedAuthRequestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.FederatedAuthRequestIssueDetails"}, {"name": "bounceTrackingIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.BounceTrackingIssueDetails"}, {"name": "cookieDeprecationMetadataIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CookieDeprecationMetadataIssueDetails"}, {"name": "stylesheetLoadingIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.StylesheetLoadingIssueDetails"}, {"name": "propertyRuleIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PropertyRuleIssueDetails"}, {"name": "federatedAuthUserInfoRequestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.FederatedAuthUserInfoRequestIssueDetails"}, {"name": "sharedDictionaryIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SharedDictionaryIssueDetails"}, {"name": "elementAccessibilityIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ElementAccessibilityIssueDetails"}, {"name": "sriMessageSignatureIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SRIMessageSignatureIssueDetails"}, {"name": "unencodedDigestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.UnencodedDigestIssueDetails"}, {"name": "connectionAllowlistIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ConnectionAllowlistIssueDetails"}, {"name": "userReidentificationIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.UserReidentificationIssueDetails"}, {"name": "permissionElementIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PermissionElementIssueDetails"}, {"name": "performanceIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PerformanceIssueDetails"}, {"name": "selectivePermissionsInterventionIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SelectivePermissionsInterventionIssueDetails"}]);
|
|
140
143
|
inspectorBackend.registerType("Audits.InspectorIssue", [{"name": "code", "type": "string", "optional": false, "description": "", "typeRef": "Audits.InspectorIssueCode"}, {"name": "details", "type": "object", "optional": false, "description": "", "typeRef": "Audits.InspectorIssueDetails"}, {"name": "issueId", "type": "string", "optional": true, "description": "A unique id for this issue. May be omitted if no other entity (e.g. exception, CDP message, etc.) is referencing this issue.", "typeRef": "Audits.IssueId"}]);
|
|
141
144
|
|
|
142
145
|
// Autofill.
|
|
@@ -514,7 +517,8 @@ inspectorBackend.registerCommand("Emulation.setAutoDarkModeOverride", [{"name":
|
|
|
514
517
|
inspectorBackend.registerCommand("Emulation.setCPUThrottlingRate", [{"name": "rate", "type": "number", "optional": false, "description": "Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).", "typeRef": null}], [], "Enables CPU throttling to emulate slow CPUs.");
|
|
515
518
|
inspectorBackend.registerCommand("Emulation.setDefaultBackgroundColorOverride", [{"name": "color", "type": "object", "optional": true, "description": "RGBA of the default background color. If not specified, any existing override will be cleared.", "typeRef": "DOM.RGBA"}], [], "Sets or clears an override of the default background color of the frame. This override is used if the content does not specify one.");
|
|
516
519
|
inspectorBackend.registerCommand("Emulation.setSafeAreaInsetsOverride", [{"name": "insets", "type": "object", "optional": false, "description": "", "typeRef": "Emulation.SafeAreaInsets"}], [], "Overrides the values for env(safe-area-inset-*) and env(safe-area-max-inset-*). Unset values will cause the respective variables to be undefined, even if previously overridden.");
|
|
517
|
-
inspectorBackend.
|
|
520
|
+
inspectorBackend.registerEnum("Emulation.SetDeviceMetricsOverrideRequestScrollbarType", {Overlay: "overlay", Default: "default"});
|
|
521
|
+
inspectorBackend.registerCommand("Emulation.setDeviceMetricsOverride", [{"name": "width", "type": "number", "optional": false, "description": "Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.", "typeRef": null}, {"name": "height", "type": "number", "optional": false, "description": "Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.", "typeRef": null}, {"name": "deviceScaleFactor", "type": "number", "optional": false, "description": "Overriding device scale factor value. 0 disables the override.", "typeRef": null}, {"name": "mobile", "type": "boolean", "optional": false, "description": "Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.", "typeRef": null}, {"name": "scale", "type": "number", "optional": true, "description": "Scale to apply to resulting view image.", "typeRef": null}, {"name": "screenWidth", "type": "number", "optional": true, "description": "Overriding screen width value in pixels (minimum 0, maximum 10000000).", "typeRef": null}, {"name": "screenHeight", "type": "number", "optional": true, "description": "Overriding screen height value in pixels (minimum 0, maximum 10000000).", "typeRef": null}, {"name": "positionX", "type": "number", "optional": true, "description": "Overriding view X position on screen in pixels (minimum 0, maximum 10000000).", "typeRef": null}, {"name": "positionY", "type": "number", "optional": true, "description": "Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).", "typeRef": null}, {"name": "dontSetVisibleSize", "type": "boolean", "optional": true, "description": "Do not set visible view size, rely upon explicit setVisibleSize call.", "typeRef": null}, {"name": "screenOrientation", "type": "object", "optional": true, "description": "Screen orientation override.", "typeRef": "Emulation.ScreenOrientation"}, {"name": "viewport", "type": "object", "optional": true, "description": "If set, the visible area of the page will be overridden to this viewport. This viewport change is not observed by the page, e.g. viewport-relative elements do not change positions.", "typeRef": "Page.Viewport"}, {"name": "displayFeature", "type": "object", "optional": true, "description": "If set, the display feature of a multi-segment screen. If not set, multi-segment support is turned-off. Deprecated, use Emulation.setDisplayFeaturesOverride.", "typeRef": "Emulation.DisplayFeature"}, {"name": "devicePosture", "type": "object", "optional": true, "description": "If set, the posture of a foldable device. If not set the posture is set to continuous. Deprecated, use Emulation.setDevicePostureOverride.", "typeRef": "Emulation.DevicePosture"}, {"name": "scrollbarType", "type": "string", "optional": true, "description": "Scrollbar type. Default: `default`.", "typeRef": "Emulation.SetDeviceMetricsOverrideRequestScrollbarType"}], [], "Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and \"device-width\"/\"device-height\"-related CSS media query results).");
|
|
518
522
|
inspectorBackend.registerCommand("Emulation.setDevicePostureOverride", [{"name": "posture", "type": "object", "optional": false, "description": "", "typeRef": "Emulation.DevicePosture"}], [], "Start reporting the given posture value to the Device Posture API. This override can also be set in setDeviceMetricsOverride().");
|
|
519
523
|
inspectorBackend.registerCommand("Emulation.clearDevicePostureOverride", [], [], "Clears a device posture override set with either setDeviceMetricsOverride() or setDevicePostureOverride() and starts using posture information from the platform again. Does nothing if no override is set.");
|
|
520
524
|
inspectorBackend.registerCommand("Emulation.setDisplayFeaturesOverride", [{"name": "features", "type": "array", "optional": false, "description": "", "typeRef": "Emulation.DisplayFeature"}], [], "Start using the given display features to pupulate the Viewport Segments API. This override can also be set in setDeviceMetricsOverride().");
|
|
@@ -553,6 +557,7 @@ inspectorBackend.registerCommand("Emulation.setSmallViewportHeightDifferenceOver
|
|
|
553
557
|
inspectorBackend.registerCommand("Emulation.getScreenInfos", [], ["screenInfos"], "Returns device's screen configuration. In headful mode, the physical screens configuration is returned, whereas in headless mode, a virtual headless screen configuration is provided instead.");
|
|
554
558
|
inspectorBackend.registerCommand("Emulation.addScreen", [{"name": "left", "type": "number", "optional": false, "description": "Offset of the left edge of the screen in pixels.", "typeRef": null}, {"name": "top", "type": "number", "optional": false, "description": "Offset of the top edge of the screen in pixels.", "typeRef": null}, {"name": "width", "type": "number", "optional": false, "description": "The width of the screen in pixels.", "typeRef": null}, {"name": "height", "type": "number", "optional": false, "description": "The height of the screen in pixels.", "typeRef": null}, {"name": "workAreaInsets", "type": "object", "optional": true, "description": "Specifies the screen's work area. Default is entire screen.", "typeRef": "Emulation.WorkAreaInsets"}, {"name": "devicePixelRatio", "type": "number", "optional": true, "description": "Specifies the screen's device pixel ratio. Default is 1.", "typeRef": null}, {"name": "rotation", "type": "number", "optional": true, "description": "Specifies the screen's rotation angle. Available values are 0, 90, 180 and 270. Default is 0.", "typeRef": null}, {"name": "colorDepth", "type": "number", "optional": true, "description": "Specifies the screen's color depth in bits. Default is 24.", "typeRef": null}, {"name": "label", "type": "string", "optional": true, "description": "Specifies the descriptive label for the screen. Default is none.", "typeRef": null}, {"name": "isInternal", "type": "boolean", "optional": true, "description": "Indicates whether the screen is internal to the device or external, attached to the device. Default is false.", "typeRef": null}], ["screenInfo"], "Add a new screen to the device. Only supported in headless mode.");
|
|
555
559
|
inspectorBackend.registerCommand("Emulation.removeScreen", [{"name": "screenId", "type": "string", "optional": false, "description": "", "typeRef": "Emulation.ScreenId"}], [], "Remove screen from the device. Only supported in headless mode.");
|
|
560
|
+
inspectorBackend.registerCommand("Emulation.setPrimaryScreen", [{"name": "screenId", "type": "string", "optional": false, "description": "", "typeRef": "Emulation.ScreenId"}], [], "Set primary screen. Only supported in headless mode. Note that this changes the coordinate system origin to the top-left of the new primary screen, updating the bounds and work areas of all existing screens accordingly.");
|
|
556
561
|
inspectorBackend.registerType("Emulation.SafeAreaInsets", [{"name": "top", "type": "number", "optional": true, "description": "Overrides safe-area-inset-top.", "typeRef": null}, {"name": "topMax", "type": "number", "optional": true, "description": "Overrides safe-area-max-inset-top.", "typeRef": null}, {"name": "left", "type": "number", "optional": true, "description": "Overrides safe-area-inset-left.", "typeRef": null}, {"name": "leftMax", "type": "number", "optional": true, "description": "Overrides safe-area-max-inset-left.", "typeRef": null}, {"name": "bottom", "type": "number", "optional": true, "description": "Overrides safe-area-inset-bottom.", "typeRef": null}, {"name": "bottomMax", "type": "number", "optional": true, "description": "Overrides safe-area-max-inset-bottom.", "typeRef": null}, {"name": "right", "type": "number", "optional": true, "description": "Overrides safe-area-inset-right.", "typeRef": null}, {"name": "rightMax", "type": "number", "optional": true, "description": "Overrides safe-area-max-inset-right.", "typeRef": null}]);
|
|
557
562
|
inspectorBackend.registerType("Emulation.ScreenOrientation", [{"name": "type", "type": "string", "optional": false, "description": "Orientation type.", "typeRef": null}, {"name": "angle", "type": "number", "optional": false, "description": "Orientation angle.", "typeRef": null}]);
|
|
558
563
|
inspectorBackend.registerType("Emulation.DisplayFeature", [{"name": "orientation", "type": "string", "optional": false, "description": "Orientation of a display feature in relation to screen", "typeRef": null}, {"name": "offset", "type": "number", "optional": false, "description": "The offset from the screen origin in either the x (for vertical orientation) or y (for horizontal orientation) direction.", "typeRef": null}, {"name": "maskLength", "type": "number", "optional": false, "description": "A display feature may mask content such that it is not physically displayed - this length along with the offset describes this area. A display feature that only splits content will have a 0 mask_length.", "typeRef": null}]);
|
|
@@ -578,11 +583,13 @@ inspectorBackend.registerCommand("EventBreakpoints.disable", [], [], "Removes al
|
|
|
578
583
|
inspectorBackend.registerEnum("Extensions.StorageArea", {Session: "session", Local: "local", Sync: "sync", Managed: "managed"});
|
|
579
584
|
inspectorBackend.registerCommand("Extensions.triggerAction", [{"name": "id", "type": "string", "optional": false, "description": "Extension id.", "typeRef": null}, {"name": "targetId", "type": "string", "optional": false, "description": "A tab target ID to trigger the default extension action on.", "typeRef": null}], [], "Runs an extension default action. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging flag is set.");
|
|
580
585
|
inspectorBackend.registerCommand("Extensions.loadUnpacked", [{"name": "path", "type": "string", "optional": false, "description": "Absolute file path.", "typeRef": null}, {"name": "enableInIncognito", "type": "boolean", "optional": true, "description": "Enable the extension in incognito", "typeRef": null}], ["id"], "Installs an unpacked extension from the filesystem similar to --load-extension CLI flags. Returns extension ID once the extension has been installed. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging flag is set.");
|
|
586
|
+
inspectorBackend.registerCommand("Extensions.getExtensions", [], ["extensions"], "Gets a list of all unpacked extensions. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging flag is set.");
|
|
581
587
|
inspectorBackend.registerCommand("Extensions.uninstall", [{"name": "id", "type": "string", "optional": false, "description": "Extension id.", "typeRef": null}], [], "Uninstalls an unpacked extension (others not supported) from the profile. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging.");
|
|
582
588
|
inspectorBackend.registerCommand("Extensions.getStorageItems", [{"name": "id", "type": "string", "optional": false, "description": "ID of extension.", "typeRef": null}, {"name": "storageArea", "type": "string", "optional": false, "description": "StorageArea to retrieve data from.", "typeRef": "Extensions.StorageArea"}, {"name": "keys", "type": "array", "optional": true, "description": "Keys to retrieve.", "typeRef": "string"}], ["data"], "Gets data from extension storage in the given `storageArea`. If `keys` is specified, these are used to filter the result.");
|
|
583
589
|
inspectorBackend.registerCommand("Extensions.removeStorageItems", [{"name": "id", "type": "string", "optional": false, "description": "ID of extension.", "typeRef": null}, {"name": "storageArea", "type": "string", "optional": false, "description": "StorageArea to remove data from.", "typeRef": "Extensions.StorageArea"}, {"name": "keys", "type": "array", "optional": false, "description": "Keys to remove.", "typeRef": "string"}], [], "Removes `keys` from extension storage in the given `storageArea`.");
|
|
584
590
|
inspectorBackend.registerCommand("Extensions.clearStorageItems", [{"name": "id", "type": "string", "optional": false, "description": "ID of extension.", "typeRef": null}, {"name": "storageArea", "type": "string", "optional": false, "description": "StorageArea to remove data from.", "typeRef": "Extensions.StorageArea"}], [], "Clears extension storage in the given `storageArea`.");
|
|
585
591
|
inspectorBackend.registerCommand("Extensions.setStorageItems", [{"name": "id", "type": "string", "optional": false, "description": "ID of extension.", "typeRef": null}, {"name": "storageArea", "type": "string", "optional": false, "description": "StorageArea to set data in.", "typeRef": "Extensions.StorageArea"}, {"name": "values", "type": "object", "optional": false, "description": "Values to set.", "typeRef": null}], [], "Sets `values` in extension storage in the given `storageArea`. The provided `values` will be merged with existing values in the storage area.");
|
|
592
|
+
inspectorBackend.registerType("Extensions.ExtensionInfo", [{"name": "id", "type": "string", "optional": false, "description": "Extension id.", "typeRef": null}, {"name": "name", "type": "string", "optional": false, "description": "Extension name.", "typeRef": null}, {"name": "version", "type": "string", "optional": false, "description": "Extension version.", "typeRef": null}, {"name": "path", "type": "string", "optional": false, "description": "The path from which the extension was loaded.", "typeRef": null}, {"name": "enabled", "type": "boolean", "optional": false, "description": "Extension enabled status.", "typeRef": null}]);
|
|
586
593
|
|
|
587
594
|
// FedCm.
|
|
588
595
|
inspectorBackend.registerEnum("FedCm.LoginState", {SignIn: "SignIn", SignUp: "SignUp"});
|
|
@@ -2782,6 +2782,16 @@ export namespace ProtocolMapping {
|
|
|
2782
2782
|
paramsType: [Protocol.Emulation.RemoveScreenRequest];
|
|
2783
2783
|
returnType: void;
|
|
2784
2784
|
};
|
|
2785
|
+
/**
|
|
2786
|
+
* Set primary screen. Only supported in headless mode.
|
|
2787
|
+
* Note that this changes the coordinate system origin to the top-left
|
|
2788
|
+
* of the new primary screen, updating the bounds and work areas
|
|
2789
|
+
* of all existing screens accordingly.
|
|
2790
|
+
*/
|
|
2791
|
+
'Emulation.setPrimaryScreen': {
|
|
2792
|
+
paramsType: [Protocol.Emulation.SetPrimaryScreenRequest];
|
|
2793
|
+
returnType: void;
|
|
2794
|
+
};
|
|
2785
2795
|
/**
|
|
2786
2796
|
* Sets breakpoint on particular native event.
|
|
2787
2797
|
*/
|
|
@@ -2823,6 +2833,15 @@ export namespace ProtocolMapping {
|
|
|
2823
2833
|
paramsType: [Protocol.Extensions.LoadUnpackedRequest];
|
|
2824
2834
|
returnType: Protocol.Extensions.LoadUnpackedResponse;
|
|
2825
2835
|
};
|
|
2836
|
+
/**
|
|
2837
|
+
* Gets a list of all unpacked extensions.
|
|
2838
|
+
* Available if the client is connected using the --remote-debugging-pipe flag
|
|
2839
|
+
* and the --enable-unsafe-extension-debugging flag is set.
|
|
2840
|
+
*/
|
|
2841
|
+
'Extensions.getExtensions': {
|
|
2842
|
+
paramsType: [];
|
|
2843
|
+
returnType: Protocol.Extensions.GetExtensionsResponse;
|
|
2844
|
+
};
|
|
2826
2845
|
/**
|
|
2827
2846
|
* Uninstalls an unpacked extension (others not supported) from the profile.
|
|
2828
2847
|
* Available if the client is connected using the --remote-debugging-pipe flag
|