diff --git a/public/Images/Images.js b/public/Images/Images.js index d340bb36e..33d4f321d 100644 --- a/public/Images/Images.js +++ b/public/Images/Images.js @@ -192,6 +192,7 @@ style.setProperty('--image-file-redo', 'url(\"' + new URL(new URL('redo.svg', im style.setProperty('--image-file-refresh', 'url(\"' + new URL(new URL('refresh.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-replace', 'url(\"' + new URL(new URL('replace.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-replay', 'url(\"' + new URL(new URL('replay.svg', import.meta.url).href, import.meta.url).toString() + '\")'); +style.setProperty('--image-file-report', 'url(\"' + new URL(new URL('report.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-resizeDiagonal', 'url(\"' + new URL(new URL('resizeDiagonal.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-resizeHorizontal', 'url(\"' + new URL(new URL('resizeHorizontal.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-resizeVertical', 'url(\"' + new URL(new URL('resizeVertical.svg', import.meta.url).href, import.meta.url).toString() + '\")'); diff --git a/public/Images/Images.prebundle.js b/public/Images/Images.prebundle.js index 9497b87bd..8189dcf38 100644 --- a/public/Images/Images.prebundle.js +++ b/public/Images/Images.prebundle.js @@ -193,6 +193,7 @@ style.setProperty('--image-file-redo', 'url(\"' + new URL('./src/redo.svg', impo style.setProperty('--image-file-refresh', 'url(\"' + new URL('./src/refresh.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-replace', 'url(\"' + new URL('./src/replace.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-replay', 'url(\"' + new URL('./src/replay.svg', import.meta.url).toString() + '\")'); +style.setProperty('--image-file-report', 'url(\"' + new URL('./src/report.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-resizeDiagonal', 'url(\"' + new URL('./src/resizeDiagonal.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-resizeHorizontal', 'url(\"' + new URL('./src/resizeHorizontal.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-resizeVertical', 'url(\"' + new URL('./src/resizeVertical.svg', import.meta.url).toString() + '\")'); diff --git a/public/Images/mouse.svg b/public/Images/mouse.svg index 1fc20959d..c228ef836 100644 --- a/public/Images/mouse.svg +++ b/public/Images/mouse.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/Images/report.svg b/public/Images/report.svg new file mode 100644 index 000000000..cd40abd86 --- /dev/null +++ b/public/Images/report.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/Images/src/mouse.svg b/public/Images/src/mouse.svg index b53a700f4..f4de5cb98 100644 --- a/public/Images/src/mouse.svg +++ b/public/Images/src/mouse.svg @@ -1,4 +1,4 @@ + d="M10 18C8.33333 18 6.91667 17.4167 5.75 16.25C4.58333 15.0833 4 13.6667 4 12V8C4 6.33333 4.58333 4.91667 5.75 3.75C6.91667 2.58333 8.33333 2 10 2C11.6667 2 13.0833 2.58333 14.25 3.75C15.4167 4.91667 16 6.33333 16 8V12C16 13.6667 15.4167 15.0833 14.25 16.25C13.0833 17.4167 11.6667 18 10 18ZM10.75 7.5H14.4583C14.3472 6.5 13.9514 5.63889 13.2708 4.91667C12.5903 4.19444 11.75 3.75 10.75 3.58333V7.5ZM5.54167 7.5H9.25V3.58333C8.25 3.73611 7.40972 4.17708 6.72917 4.90625C6.04861 5.63542 5.65278 6.5 5.54167 7.5ZM10 16.5C11.245 16.5 12.3063 16.0613 13.1838 15.1838C14.0613 14.3063 14.5 13.245 14.5 12V9H5.5V12C5.5 13.245 5.93875 14.3063 6.81625 15.1838C7.69375 16.0613 8.755 16.5 10 16.5Z" fill="black"/> \ No newline at end of file diff --git a/public/Images/src/report.svg b/public/Images/src/report.svg new file mode 100644 index 000000000..cd40abd86 --- /dev/null +++ b/public/Images/src/report.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/core/common/ColorUtils-tsconfig.json b/public/core/common/ColorUtils-tsconfig.json index cc2fcb2d2..d1a51c164 100644 --- a/public/core/common/ColorUtils-tsconfig.json +++ b/public/core/common/ColorUtils-tsconfig.json @@ -33,7 +33,6 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ] } \ No newline at end of file diff --git a/public/core/common/common-tsconfig.json b/public/core/common/common-tsconfig.json index 0ee122b82..445a01f9d 100644 --- a/public/core/common/common-tsconfig.json +++ b/public/core/common/common-tsconfig.json @@ -63,8 +63,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/core/common/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/core/common/devtools_entrypoint-bundle-typescript-tsconfig.json index f2e0b9be6..f7c5f7d06 100644 --- a/public/core/common/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/core/common/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/core/common/unittests-tsconfig.json b/public/core/common/unittests-tsconfig.json index b98445b97..e9fe21a0c 100644 --- a/public/core/common/unittests-tsconfig.json +++ b/public/core/common/unittests-tsconfig.json @@ -65,8 +65,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/core/dom_extension/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/core/dom_extension/devtools_entrypoint-bundle-typescript-tsconfig.json index 0387d0e11..f5c763c16 100644 --- a/public/core/dom_extension/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/core/dom_extension/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/core/dom_extension/dom_extension-tsconfig.json b/public/core/dom_extension/dom_extension-tsconfig.json index bc14de9a0..d8d5e55c8 100644 --- a/public/core/dom_extension/dom_extension-tsconfig.json +++ b/public/core/dom_extension/dom_extension-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/core/dom_extension/unittests-tsconfig.json b/public/core/dom_extension/unittests-tsconfig.json index 59f2f09c3..513d9f5aa 100644 --- a/public/core/dom_extension/unittests-tsconfig.json +++ b/public/core/dom_extension/unittests-tsconfig.json @@ -41,8 +41,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/core/host/AidaClient.js b/public/core/host/AidaClient.js index 2dede4b99..a924a5480 100644 --- a/public/core/host/AidaClient.js +++ b/public/core/host/AidaClient.js @@ -62,40 +62,56 @@ export class AidaClient { const text = []; let inCodeChunk = false; while ((chunk = await stream.read())) { - if (chunk.endsWith(']')) { - chunk = chunk.slice(0, -1); + // The AIDA response is a JSON array of objects, split at the object + // boundary. Therefore each chunk may start with `[` or `,` and possibly + // followed by `]`. Each chunk may include one or more objects, so we + // make sure that each chunk becomes a well-formed JSON array when we + // parse it by adding `[` and `]` and removing `,` where appropriate. + if (!chunk.length) { + continue; } - if (chunk.startsWith(',') || chunk.startsWith('[')) { + if (chunk.startsWith(',')) { chunk = chunk.slice(1); } - if (!chunk.length) { - continue; + if (!chunk.startsWith('[')) { + chunk = '[' + chunk; } - const result = JSON.parse(chunk); - const CODE_CHUNK_SEPARATOR = '\n`````\n'; - if ('textChunk' in result) { - if (inCodeChunk) { - text.push(CODE_CHUNK_SEPARATOR); - inCodeChunk = false; - } - text.push(result.textChunk.text); + if (!chunk.endsWith(']')) { + chunk = chunk + ']'; } - else if ('codeChunk' in result) { - if (!inCodeChunk) { - text.push(CODE_CHUNK_SEPARATOR); - inCodeChunk = true; - } - text.push(result.codeChunk.code); + let results; + try { + results = JSON.parse(chunk); } - else if ('error' in result) { - throw new Error(`Server responded: ${JSON.stringify(result)}`); + catch (error) { + throw new Error('Cannot parse chunk: ' + chunk, { cause: error }); } - else { - throw new Error('Unknown chunk result'); + const CODE_CHUNK_SEPARATOR = '\n`````\n'; + for (const result of results) { + if ('textChunk' in result) { + if (inCodeChunk) { + text.push(CODE_CHUNK_SEPARATOR); + inCodeChunk = false; + } + text.push(result.textChunk.text); + } + else if ('codeChunk' in result) { + if (!inCodeChunk) { + text.push(CODE_CHUNK_SEPARATOR); + inCodeChunk = true; + } + text.push(result.codeChunk.code); + } + else if ('error' in result) { + throw new Error(`Server responded: ${JSON.stringify(result)}`); + } + else { + throw new Error('Unknown chunk result'); + } } yield { explanation: text.join('') + (inCodeChunk ? CODE_CHUNK_SEPARATOR : ''), - metadata: { rpcGlobalId: result?.metadata?.rpcGlobalId }, + metadata: { rpcGlobalId: results[0]?.metadata?.rpcGlobalId }, }; } } diff --git a/public/core/host/AidaClient.js.map b/public/core/host/AidaClient.js.map index 62440aecc..e8d3b253c 100644 --- a/public/core/host/AidaClient.js.map +++ b/public/core/host/AidaClient.js.map @@ -1 +1 @@ -{"version":3,"file":"AidaClient.js","sourceRoot":"","sources":["../../../../../../front_end/core/host/AidaClient.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAC,6BAA6B,EAAC,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AAmBrD,MAAM,OAAO,UAAU;IACrB,MAAM,CAAC,eAAe,CAAC,KAAa;QAClC,MAAM,OAAO,GAAgB;YAC3B,KAAK;YACL,MAAM,EAAE,iBAAiB;SAC1B,CAAC;QACF,MAAM,WAAW,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC;QACzF,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE;YACvB,OAAO,CAAC,OAAO,KAAK,EAAE,CAAC;YACvB,OAAO,CAAC,OAAO,CAAC,WAAW,GAAG,WAAW,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IAAI,WAAW,IAAI,MAAM,EAAE;gBACzB,IAAI,WAAW,EAAE;oBACf,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;oBAChC,WAAW,GAAG,KAAK,CAAC;iBACrB;gBACD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;aAClC;iBAAM,IAAI,WAAW,IAAI,MAAM,EAAE;gBAChC,IAAI,CAAC,WAAW,EAAE;oBAChB,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;oBAChC,WAAW,GAAG,IAAI,CAAC;iBACpB;gBACD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;aAClC;iBAAM,IAAI,OAAO,IAAI,MAAM,EAAE;gBAC5B,MAAM,IAAI,KAAK,CAAC,qBAAqB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;aAChE;iBAAM;gBACL,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;aACzC;YACD,MAAM;gBACJ,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC;gBACtE,QAAQ,EAAE,EAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAC;aACvD,CAAC;SACH;IACH,CAAC;CACF","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Platform from '../platform/platform.js';\nimport * as Root from '../root/root.js';\nimport {InspectorFrontendHostInstance} from './InspectorFrontendHost.js';\nimport {bindOutputStream} from './ResourceLoader.js';\n\nexport interface AidaRequest {\n input: string;\n client: string;\n options?: {\n temperature?: Number,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n model_id?: string,\n };\n}\n\nexport interface AidaResponse {\n explanation: string;\n metadata: {\n rpcGlobalId?: number,\n };\n}\n\nexport class AidaClient {\n static buildApiRequest(input: string): AidaRequest {\n const request: AidaRequest = {\n input,\n client: 'CHROME_DEVTOOLS',\n };\n const temperature = parseFloat(Root.Runtime.Runtime.queryParam('aidaTemperature') || '');\n if (!isNaN(temperature)) {\n request.options ??= {};\n request.options.temperature = temperature;\n }\n const modelId = Root.Runtime.Runtime.queryParam('aidaModelId');\n if (modelId) {\n request.options ??= {};\n request.options.model_id = modelId;\n }\n return request;\n }\n\n async * fetch(input: string): AsyncGenerator {\n if (!InspectorFrontendHostInstance.doAidaConversation) {\n throw new Error('doAidaConversation is not available');\n }\n const stream = (() => {\n let {promise, resolve, reject} = Platform.PromiseUtilities.promiseWithResolvers();\n return {\n write: async(data: string): Promise => {\n resolve(data);\n ({promise, resolve, reject} = Platform.PromiseUtilities.promiseWithResolvers());\n },\n close: async(): Promise => {\n resolve(null);\n },\n read: (): Promise => {\n return promise;\n },\n fail: (e: Error) => reject(e),\n };\n })();\n const streamId = bindOutputStream(stream);\n InspectorFrontendHostInstance.doAidaConversation(\n JSON.stringify(AidaClient.buildApiRequest(input)), streamId, result => {\n if (result.statusCode === 403) {\n stream.fail(new Error('Server responded: permission denied'));\n } else if (result.error) {\n stream.fail(new Error(`Cannot send request: ${result.error} ${result.detail || ''}`));\n } else if (result.statusCode !== 200) {\n stream.fail(new Error(`Request failed: ${JSON.stringify(result)}`));\n } else {\n void stream.close();\n }\n });\n let chunk;\n const text = [];\n let inCodeChunk = false;\n while ((chunk = await stream.read())) {\n if (chunk.endsWith(']')) {\n chunk = chunk.slice(0, -1);\n }\n if (chunk.startsWith(',') || chunk.startsWith('[')) {\n chunk = chunk.slice(1);\n }\n if (!chunk.length) {\n continue;\n }\n const result = JSON.parse(chunk);\n const CODE_CHUNK_SEPARATOR = '\\n`````\\n';\n if ('textChunk' in result) {\n if (inCodeChunk) {\n text.push(CODE_CHUNK_SEPARATOR);\n inCodeChunk = false;\n }\n text.push(result.textChunk.text);\n } else if ('codeChunk' in result) {\n if (!inCodeChunk) {\n text.push(CODE_CHUNK_SEPARATOR);\n inCodeChunk = true;\n }\n text.push(result.codeChunk.code);\n } else if ('error' in result) {\n throw new Error(`Server responded: ${JSON.stringify(result)}`);\n } else {\n throw new Error('Unknown chunk result');\n }\n yield {\n explanation: text.join('') + (inCodeChunk ? CODE_CHUNK_SEPARATOR : ''),\n metadata: {rpcGlobalId: result?.metadata?.rpcGlobalId},\n };\n }\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"AidaClient.js","sourceRoot":"","sources":["../../../../../../front_end/core/host/AidaClient.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAC,6BAA6B,EAAC,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AAmBrD,MAAM,OAAO,UAAU;IACrB,MAAM,CAAC,eAAe,CAAC,KAAa;QAClC,MAAM,OAAO,GAAgB;YAC3B,KAAK;YACL,MAAM,EAAE,iBAAiB;SAC1B,CAAC;QACF,MAAM,WAAW,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC;QACzF,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE;YACvB,OAAO,CAAC,OAAO,KAAK,EAAE,CAAC;YACvB,OAAO,CAAC,OAAO,CAAC,WAAW,GAAG,WAAW,CAAC;SAC3C;QACD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;QAC/D,IAAI,OAAO,EAAE;YACX,OAAO,CAAC,OAAO,KAAK,EAAE,CAAC;YACvB,OAAO,C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EAAC,KAAK,EAAE,KAAK,EAAC,CAAC,CAAC;aACjE;YACD,MAAM,oBAAoB,GAAG,WAAW,CAAC;YACzC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;gBAC5B,IAAI,WAAW,IAAI,MAAM,EAAE;oBACzB,IAAI,WAAW,EAAE;wBACf,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;wBAChC,WAAW,GAAG,KAAK,CAAC;qBACrB;oBACD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;iBAClC;qBAAM,IAAI,WAAW,IAAI,MAAM,EAAE;oBAChC,IAAI,CAAC,WAAW,EAAE;wBAChB,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;wBAChC,WAAW,GAAG,IAAI,CAAC;qBACpB;oBACD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;iBAClC;qBAAM,IAAI,OAAO,IAAI,MAAM,EAAE;oBAC5B,MAAM,IAAI,KAAK,CAAC,qBAAqB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;iBAChE;qBAAM;oBACL,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;iBACzC;aACF;YACD,MAAM;gBACJ,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC;gBACtE,QAAQ,EAAE,EAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAC;aAC3D,CAAC;SACH;IACH,CAAC;CACF","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Platform from '../platform/platform.js';\nimport * as Root from '../root/root.js';\nimport {InspectorFrontendHostInstance} from './InspectorFrontendHost.js';\nimport {bindOutputStream} from './ResourceLoader.js';\n\nexport interface AidaRequest {\n input: string;\n client: string;\n options?: {\n temperature?: Number,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n model_id?: string,\n };\n}\n\nexport interface AidaResponse {\n explanation: string;\n metadata: {\n rpcGlobalId?: number,\n };\n}\n\nexport class AidaClient {\n static buildApiRequest(input: string): AidaRequest {\n const request: AidaRequest = {\n input,\n client: 'CHROME_DEVTOOLS',\n };\n const temperature = parseFloat(Root.Runtime.Runtime.queryParam('aidaTemperature') || '');\n if (!isNaN(temperature)) {\n request.options ??= {};\n request.options.temperature = temperature;\n }\n const modelId = Root.Runtime.Runtime.queryParam('aidaModelId');\n if (modelId) {\n request.options ??= {};\n request.options.model_id = modelId;\n }\n return request;\n }\n\n async * fetch(input: string): AsyncGenerator {\n if (!InspectorFrontendHostInstance.doAidaConversation) {\n throw new Error('doAidaConversation is not available');\n }\n const stream = (() => {\n let {promise, resolve, reject} = Platform.PromiseUtilities.promiseWithResolvers();\n return {\n write: async(data: string): Promise => {\n resolve(data);\n ({promise, resolve, reject} = Platform.PromiseUtilities.promiseWithResolvers());\n },\n close: async(): Promise => {\n resolve(null);\n },\n read: (): Promise => {\n return promise;\n },\n fail: (e: Error) => reject(e),\n };\n })();\n const streamId = bindOutputStream(stream);\n InspectorFrontendHostInstance.doAidaConversation(\n JSON.stringify(AidaClient.buildApiRequest(input)), streamId, result => {\n if (result.statusCode === 403) {\n stream.fail(new Error('Server responded: permission denied'));\n } else if (result.error) {\n stream.fail(new Error(`Cannot send request: ${result.error} ${result.detail || ''}`));\n } else if (result.statusCode !== 200) {\n stream.fail(new Error(`Request failed: ${JSON.stringify(result)}`));\n } else {\n void stream.close();\n }\n });\n let chunk;\n const text = [];\n let inCodeChunk = false;\n while ((chunk = await stream.read())) {\n // The AIDA response is a JSON array of objects, split at the object\n // boundary. Therefore each chunk may start with `[` or `,` and possibly\n // followed by `]`. Each chunk may include one or more objects, so we\n // make sure that each chunk becomes a well-formed JSON array when we\n // parse it by adding `[` and `]` and removing `,` where appropriate.\n if (!chunk.length) {\n continue;\n }\n if (chunk.startsWith(',')) {\n chunk = chunk.slice(1);\n }\n if (!chunk.startsWith('[')) {\n chunk = '[' + chunk;\n }\n if (!chunk.endsWith(']')) {\n chunk = chunk + ']';\n }\n let results;\n try {\n results = JSON.parse(chunk);\n } catch (error) {\n throw new Error('Cannot parse chunk: ' + chunk, {cause: error});\n }\n const CODE_CHUNK_SEPARATOR = '\\n`````\\n';\n for (const result of results) {\n if ('textChunk' in result) {\n if (inCodeChunk) {\n text.push(CODE_CHUNK_SEPARATOR);\n inCodeChunk = false;\n }\n text.push(result.textChunk.text);\n } else if ('codeChunk' in result) {\n if (!inCodeChunk) {\n text.push(CODE_CHUNK_SEPARATOR);\n inCodeChunk = true;\n }\n text.push(result.codeChunk.code);\n } else if ('error' in result) {\n throw new Error(`Server responded: ${JSON.stringify(result)}`);\n } else {\n throw new Error('Unknown chunk result');\n }\n }\n yield {\n explanation: text.join('') + (inCodeChunk ? CODE_CHUNK_SEPARATOR : ''),\n metadata: {rpcGlobalId: results[0]?.metadata?.rpcGlobalId},\n };\n }\n }\n}\n"]} \ No newline at end of file diff --git a/public/core/host/AidaClient.test.js b/public/core/host/AidaClient.test.js index a6b2de718..d95b5213f 100644 --- a/public/core/host/AidaClient.test.js +++ b/public/core/host/AidaClient.test.js @@ -121,6 +121,68 @@ describe('AidaClient', () => { { explanation: 'hello brave new world!', metadata: { rpcGlobalId: 123 } }, ]); }); + it('handles chunked response with multiple objects per chunk', async () => { + sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'doAidaConversation') + .callsFake(async (_, streamId, callback) => { + const response = JSON.stringify([ + { textChunk: { text: 'Friends, Romans, countrymen, lend me your ears;\n' }, metadata: { rpcGlobalId: 123 } }, + { textChunk: { text: 'I come to bury Caesar, not to praise him.\n' }, metadata: { rpcGlobalId: 123 } }, + { textChunk: { text: 'The evil that men do lives after them;\n' }, metadata: { rpcGlobalId: 123 } }, + { textChunk: { text: 'The good is oft interred with their bones;\n' }, metadata: { rpcGlobalId: 123 } }, + { textChunk: { text: 'So let it be with Caesar. The noble Brutus\n' }, metadata: { rpcGlobalId: 123 } }, + { textChunk: { text: 'Hath told you Caesar was ambitious:\n' }, metadata: { rpcGlobalId: 123 } }, + { textChunk: { text: 'If it were so, it was a grievous fault,\n' }, metadata: { rpcGlobalId: 123 } }, + { textChunk: { text: 'And grievously hath Caesar answer’d it.\n' }, metadata: { rpcGlobalId: 123 } }, + ]); + const chunks = response.split(',{'); + await new Promise(resolve => setTimeout(resolve, 0)); + Host.ResourceLoader.streamWrite(streamId, chunks[0] + ',{' + chunks[1]); + await new Promise(resolve => setTimeout(resolve, 0)); + Host.ResourceLoader.streamWrite(streamId, ',{' + chunks[2] + ',{' + chunks[3] + ',{' + chunks[4]); + await new Promise(resolve => setTimeout(resolve, 0)); + Host.ResourceLoader.streamWrite(streamId, ',{' + chunks[5]); + await new Promise(resolve => setTimeout(resolve, 0)); + Host.ResourceLoader.streamWrite(streamId, ',{' + chunks[6] + ',{' + chunks[7]); + callback({ statusCode: 200 }); + }); + const provider = new Host.AidaClient.AidaClient(); + const results = await getAllResults(provider); + assert.deepStrictEqual(results, [ + { + explanation: 'Friends, Romans, countrymen, lend me your ears;\n' + + 'I come to bury Caesar, not to praise him.\n', + metadata: { rpcGlobalId: 123 }, + }, + { + explanation: 'Friends, Romans, countrymen, lend me your ears;\n' + + 'I come to bury Caesar, not to praise him.\n' + + 'The evil that men do lives after them;\n' + + 'The good is oft interred with their bones;\n' + + 'So let it be with Caesar. The noble Brutus\n', + metadata: { rpcGlobalId: 123 }, + }, + { + explanation: 'Friends, Romans, countrymen, lend me your ears;\n' + + 'I come to bury Caesar, not to praise him.\n' + + 'The evil that men do lives after them;\n' + + 'The good is oft interred with their bones;\n' + + 'So let it be with Caesar. The noble Brutus\n' + + 'Hath told you Caesar was ambitious:\n', + metadata: { rpcGlobalId: 123 }, + }, + { + explanation: 'Friends, Romans, countrymen, lend me your ears;\n' + + 'I come to bury Caesar, not to praise him.\n' + + 'The evil that men do lives after them;\n' + + 'The good is oft interred with their bones;\n' + + 'So let it be with Caesar. The noble Brutus\n' + + 'Hath told you Caesar was ambitious:\n' + + 'If it were so, it was a grievous fault,\n' + + 'And grievously hath Caesar answer’d it.\n', + metadata: { rpcGlobalId: 123 }, + }, + ]); + }); it('handles subsequent code chunks', async () => { sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'doAidaConversation') .callsFake(async (_, streamId, callback) => { diff --git a/public/core/host/AidaClient.test.js.map b/public/core/host/AidaClient.test.js.map index b097713c7..b7859e03e 100644 --- a/public/core/host/AidaClient.test.js.map +++ b/public/core/host/AidaClient.test.js.map @@ -1 +1 @@ -{"version":3,"file":"AidaClient.test.js","sourceRoot":"","sources":["../../../../../../front_end/core/host/AidaClient.test.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAExC,MAAM,EAAC,MAAM,EAAC,GAAG,IAAI,CAAC;AAEtB,MAAM,aAAa,GAAG,aAAa,CAAC;AAEpC,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,EAAE,CAAC,sEAAsE,EAAE,GAAG,EAAE;QAC9E,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QAC5D,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC/C,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QAClE,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE;YAC9B,KAAK,EAAE,K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qD,EAAE,KAAK,IAAI,EAAE;QACnE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,6BAA6B,EAAE,oBAAoB,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE;YACzG,OAAO,EAAE,8BAA8B;YACvC,QAAQ,EAAE,oFAAoF;SAC/F,CAAC,CAAC;QACH,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC;QAClD,IAAI;YACF,MAAM,aAAa,CAAC,QAAQ,CAAC,CAAC;YAC9B,MAAM,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC;SAC7C;QAAC,OAAO,GAAG,EAAE;YACZ,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC;iBACd,MAAM,CACH,sIAAsI,CAAC,CAAC;SACjJ;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Host from './host.js';\nimport * as Root from '../root/root.js';\n\nconst {assert} = chai;\n\nconst TEST_MODEL_ID = 'testModelId';\n\ndescribe('AidaClient', () => {\n it('adds no model temperature if there is no aidaTemperature query param', () => {\n const stub = sinon.stub(Root.Runtime.Runtime, 'queryParam');\n stub.withArgs('aidaTemperature').returns(null);\n const request = Host.AidaClient.AidaClient.buildApiRequest('foo');\n assert.deepStrictEqual(request, {\n input: 'foo',\n client: 'CHROME_DEVTOOLS',\n });\n stub.restore();\n });\n\n it('adds a model temperature', () => {\n const stub = sinon.stub(Root.Runtime.Runtime, 'queryParam');\n stub.withArgs('aidaTemperature').returns('0.5');\n const request = Host.AidaClient.AidaClient.buildApiRequest('foo');\n assert.deepStrictEqual(request, {\n input: 'foo',\n client: 'CHROME_DEVTOOLS',\n options: {\n temperature: 0.5,\n },\n });\n stub.restore();\n });\n\n it('adds a model temperature of 0', () => {\n const stub = sinon.stub(Root.Runtime.Runtime, 'queryParam');\n stub.withArgs('aidaTemperature').returns('0');\n const request = Host.AidaClient.AidaClient.buildApiRequest('foo');\n assert.deepStrictEqual(request, {\n input: 'foo',\n client: 'CHROME_DEVTOOLS',\n options: {\n temperature: 0,\n },\n });\n stub.restore();\n });\n\n it('adds no model temperature if the aidaTemperature query param cannot be parsed into a float', () => {\n const stub = sinon.stub(Root.Runtime.Runtime, 'queryParam');\n stub.withArgs('aidaTemperature').returns('not a number');\n const request = Host.AidaClient.AidaClient.buildApiRequest('foo');\n assert.deepStrictEqual(request, {\n input: 'foo',\n client: 'CHROME_DEVTOOLS',\n });\n stub.restore();\n });\n\n it('adds no model id if there is no aidaModelId query param', () => {\n const stub = sinon.stub(Root.Runtime.Runtime, 'queryParam');\n stub.withArgs('aidaModelId').returns(null);\n const request = Host.AidaClient.AidaClient.buildApiRequest('foo');\n assert.deepStrictEqual(request, {\n input: 'foo',\n client: 'CHROME_DEVTOOLS',\n });\n stub.restore();\n });\n\n it('adds a model id', () => {\n const stub = sinon.stub(Root.Runtime.Runtime, 'queryParam');\n stub.withArgs('aidaModelId').returns(TEST_MODEL_ID);\n const request = Host.AidaClient.AidaClient.buildApiRequest('foo');\n assert.deepStrictEqual(request, {\n input: 'foo',\n client: 'CHROME_DEVTOOLS',\n options: {\n model_id: TEST_MODEL_ID,\n },\n });\n stub.restore();\n });\n\n it('adds a model id and temperature', () => {\n const stub = sinon.stub(Root.Runtime.Runtime, 'queryParam');\n stub.withArgs('aidaModelId').returns(TEST_MODEL_ID);\n stub.withArgs('aidaTemperature').returns('0.5');\n const request = Host.AidaClient.AidaClient.buildApiRequest('foo');\n assert.deepStrictEqual(request, {\n input: 'foo',\n client: 'CHROME_DEVTOOLS',\n options: {\n model_id: TEST_MODEL_ID,\n temperature: 0.5,\n },\n });\n stub.restore();\n });\n\n async function getAllResults(provider: Host.AidaClient.AidaClient): Promise {\n const results = [];\n for await (const result of provider.fetch('foo')) {\n results.push(result);\n }\n return results;\n }\n\n it('handles chunked response', async () => {\n sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'doAidaConversation')\n .callsFake(async (_, streamId, callback) => {\n const response = JSON.stringify([\n {textChunk: {text: 'hello '}, metadata: {rpcGlobalId: 123}},\n {textChunk: {text: 'brave '}, metadata: {rpcGlobalId: 123}},\n {textChunk: {text: 'new world!'}, metadata: {rpcGlobalId: 123}},\n ]);\n let first = true;\n for (const chunk of response.split(',{')) {\n await new Promise(resolve => setTimeout(resolve, 0));\n Host.ResourceLoader.streamWrite(streamId, first ? chunk : ',{' + chunk);\n first = false;\n }\n callback({statusCode: 200});\n });\n\n const provider = new Host.AidaClient.AidaClient();\n const results = await getAllResults(provider);\n assert.deepStrictEqual(results, [\n {explanation: 'hello ', metadata: {rpcGlobalId: 123}},\n {explanation: 'hello brave ', metadata: {rpcGlobalId: 123}},\n {explanation: 'hello brave new world!', metadata: {rpcGlobalId: 123}},\n ]);\n });\n\n it('handles subsequent code chunks', async () => {\n sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'doAidaConversation')\n .callsFake(async (_, streamId, callback) => {\n const response = JSON.stringify([\n {textChunk: {text: 'hello '}},\n {codeChunk: {code: 'brave '}},\n {codeChunk: {code: 'new World()'}},\n ]);\n for (const chunk of response.split(',')) {\n await new Promise(resolve => setTimeout(resolve, 0));\n Host.ResourceLoader.streamWrite(streamId, chunk);\n }\n callback({statusCode: 200});\n });\n\n const provider = new Host.AidaClient.AidaClient();\n const results = (await getAllResults(provider)).map(r => r.explanation);\n assert.deepStrictEqual(\n results, ['hello ', 'hello \\n`````\\nbrave \\n`````\\n', 'hello \\n`````\\nbrave new World()\\n`````\\n']);\n });\n\n it('throws a readable error on 403', async () => {\n sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'doAidaConversation').callsArgWith(2, {\n 'statusCode': 403,\n });\n const provider = new Host.AidaClient.AidaClient();\n try {\n await getAllResults(provider);\n expect.fail('provider.fetch did not throw');\n } catch (err) {\n expect(err.message).equals('Server responded: permission denied');\n }\n });\n\n it('throws an error for other codes', async () => {\n sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'doAidaConversation').callsArgWith(2, {\n 'statusCode': 418,\n });\n const provider = new Host.AidaClient.AidaClient();\n try {\n await getAllResults(provider);\n expect.fail('provider.fetch did not throw');\n } catch (err) {\n expect(err.message).equals('Request failed: {\"statusCode\":418}');\n }\n });\n\n it('throws an error with all details for other failures', async () => {\n sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'doAidaConversation').callsArgWith(2, {\n 'error': 'Cannot get OAuth credentials',\n 'detail': '{\\'@type\\': \\'type.googleapis.com/google.rpc.DebugInfo\\', \\'detail\\': \\'DETAILS\\'}',\n });\n const provider = new Host.AidaClient.AidaClient();\n try {\n await getAllResults(provider);\n expect.fail('provider.fetch did not throw');\n } catch (err) {\n expect(err.message)\n .equals(\n 'Cannot send request: Cannot get OAuth credentials {\\'@type\\': \\'type.googleapis.com/google.rpc.DebugInfo\\', \\'detail\\': \\'DETAILS\\'}');\n }\n });\n});\n"]} \ No newline at end of file +{"version":3,"file":"AidaClient.test.js","sourceRoot":"","sources":["../../../../../../front_end/core/host/AidaClient.test.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAExC,MAAM,EAAC,MAAM,EAAC,GAAG,IAAI,CAAC;AAEtB,MAAM,aAAa,GAAG,aAAa,CAAC;AAEpC,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,EAAE,CAAC,sEAAsE,EAAE,GAAG,EAAE;QAC9E,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QAC5D,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CA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C,QAAQ,CAAC,CAAC;YAC9B,MAAM,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC;SAC7C;QAAC,OAAO,GAAG,EAAE;YACZ,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC;iBACd,MAAM,CACH,sIAAsI,CAAC,CAAC;SACjJ;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Host from './host.js';\nimport * as Root from '../root/root.js';\n\nconst {assert} = chai;\n\nconst TEST_MODEL_ID = 'testModelId';\n\ndescribe('AidaClient', () => {\n it('adds no model temperature if there is no aidaTemperature query param', () => {\n const stub = sinon.stub(Root.Runtime.Runtime, 'queryParam');\n stub.withArgs('aidaTemperature').returns(null);\n const request = Host.AidaClient.AidaClient.buildApiRequest('foo');\n assert.deepStrictEqual(request, {\n input: 'foo',\n client: 'CHROME_DEVTOOLS',\n });\n stub.restore();\n });\n\n it('adds a model temperature', () => {\n const stub = sinon.stub(Root.Runtime.Runtime, 'queryParam');\n stub.withArgs('aidaTemperature').returns('0.5');\n const request = Host.AidaClient.AidaClient.buildApiRequest('foo');\n assert.deepStrictEqual(request, {\n input: 'foo',\n client: 'CHROME_DEVTOOLS',\n options: {\n temperature: 0.5,\n },\n });\n stub.restore();\n });\n\n it('adds a model temperature of 0', () => {\n const stub = sinon.stub(Root.Runtime.Runtime, 'queryParam');\n stub.withArgs('aidaTemperature').returns('0');\n const request = Host.AidaClient.AidaClient.buildApiRequest('foo');\n assert.deepStrictEqual(request, {\n input: 'foo',\n client: 'CHROME_DEVTOOLS',\n options: {\n temperature: 0,\n },\n });\n stub.restore();\n });\n\n it('adds no model temperature if the aidaTemperature query param cannot be parsed into a float', () => {\n const stub = sinon.stub(Root.Runtime.Runtime, 'queryParam');\n stub.withArgs('aidaTemperature').returns('not a number');\n const request = Host.AidaClient.AidaClient.buildApiRequest('foo');\n assert.deepStrictEqual(request, {\n input: 'foo',\n client: 'CHROME_DEVTOOLS',\n });\n stub.restore();\n });\n\n it('adds no model id if there is no aidaModelId query param', () => {\n const stub = sinon.stub(Root.Runtime.Runtime, 'queryParam');\n stub.withArgs('aidaModelId').returns(null);\n const request = Host.AidaClient.AidaClient.buildApiRequest('foo');\n assert.deepStrictEqual(request, {\n input: 'foo',\n client: 'CHROME_DEVTOOLS',\n });\n stub.restore();\n });\n\n it('adds a model id', () => {\n const stub = sinon.stub(Root.Runtime.Runtime, 'queryParam');\n stub.withArgs('aidaModelId').returns(TEST_MODEL_ID);\n const request = Host.AidaClient.AidaClient.buildApiRequest('foo');\n assert.deepStrictEqual(request, {\n input: 'foo',\n client: 'CHROME_DEVTOOLS',\n options: {\n model_id: TEST_MODEL_ID,\n },\n });\n stub.restore();\n });\n\n it('adds a model id and temperature', () => {\n const stub = sinon.stub(Root.Runtime.Runtime, 'queryParam');\n stub.withArgs('aidaModelId').returns(TEST_MODEL_ID);\n stub.withArgs('aidaTemperature').returns('0.5');\n const request = Host.AidaClient.AidaClient.buildApiRequest('foo');\n assert.deepStrictEqual(request, {\n input: 'foo',\n client: 'CHROME_DEVTOOLS',\n options: {\n model_id: TEST_MODEL_ID,\n temperature: 0.5,\n },\n });\n stub.restore();\n });\n\n async function getAllResults(provider: Host.AidaClient.AidaClient): Promise {\n const results = [];\n for await (const result of provider.fetch('foo')) {\n results.push(result);\n }\n return results;\n }\n\n it('handles chunked response', async () => {\n sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'doAidaConversation')\n .callsFake(async (_, streamId, callback) => {\n const response = JSON.stringify([\n {textChunk: {text: 'hello '}, metadata: {rpcGlobalId: 123}},\n {textChunk: {text: 'brave '}, metadata: {rpcGlobalId: 123}},\n {textChunk: {text: 'new world!'}, metadata: {rpcGlobalId: 123}},\n ]);\n let first = true;\n for (const chunk of response.split(',{')) {\n await new Promise(resolve => setTimeout(resolve, 0));\n Host.ResourceLoader.streamWrite(streamId, first ? chunk : ',{' + chunk);\n first = false;\n }\n callback({statusCode: 200});\n });\n\n const provider = new Host.AidaClient.AidaClient();\n const results = await getAllResults(provider);\n assert.deepStrictEqual(results, [\n {explanation: 'hello ', metadata: {rpcGlobalId: 123}},\n {explanation: 'hello brave ', metadata: {rpcGlobalId: 123}},\n {explanation: 'hello brave new world!', metadata: {rpcGlobalId: 123}},\n ]);\n });\n\n it('handles chunked response with multiple objects per chunk', async () => {\n sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'doAidaConversation')\n .callsFake(async (_, streamId, callback) => {\n const response = JSON.stringify([\n {textChunk: {text: 'Friends, Romans, countrymen, lend me your ears;\\n'}, metadata: {rpcGlobalId: 123}},\n {textChunk: {text: 'I come to bury Caesar, not to praise him.\\n'}, metadata: {rpcGlobalId: 123}},\n {textChunk: {text: 'The evil that men do lives after them;\\n'}, metadata: {rpcGlobalId: 123}},\n {textChunk: {text: 'The good is oft interred with their bones;\\n'}, metadata: {rpcGlobalId: 123}},\n {textChunk: {text: 'So let it be with Caesar. The noble Brutus\\n'}, metadata: {rpcGlobalId: 123}},\n {textChunk: {text: 'Hath told you Caesar was ambitious:\\n'}, metadata: {rpcGlobalId: 123}},\n {textChunk: {text: 'If it were so, it was a grievous fault,\\n'}, metadata: {rpcGlobalId: 123}},\n {textChunk: {text: 'And grievously hath Caesar answer’d it.\\n'}, metadata: {rpcGlobalId: 123}},\n ]);\n const chunks = response.split(',{');\n await new Promise(resolve => setTimeout(resolve, 0));\n Host.ResourceLoader.streamWrite(streamId, chunks[0] + ',{' + chunks[1]);\n await new Promise(resolve => setTimeout(resolve, 0));\n Host.ResourceLoader.streamWrite(streamId, ',{' + chunks[2] + ',{' + chunks[3] + ',{' + chunks[4]);\n await new Promise(resolve => setTimeout(resolve, 0));\n Host.ResourceLoader.streamWrite(streamId, ',{' + chunks[5]);\n await new Promise(resolve => setTimeout(resolve, 0));\n Host.ResourceLoader.streamWrite(streamId, ',{' + chunks[6] + ',{' + chunks[7]);\n callback({statusCode: 200});\n });\n\n const provider = new Host.AidaClient.AidaClient();\n const results = await getAllResults(provider);\n assert.deepStrictEqual(results, [\n {\n explanation: 'Friends, Romans, countrymen, lend me your ears;\\n' +\n 'I come to bury Caesar, not to praise him.\\n',\n metadata: {rpcGlobalId: 123},\n },\n {\n explanation: 'Friends, Romans, countrymen, lend me your ears;\\n' +\n 'I come to bury Caesar, not to praise him.\\n' +\n 'The evil that men do lives after them;\\n' +\n 'The good is oft interred with their bones;\\n' +\n 'So let it be with Caesar. The noble Brutus\\n',\n metadata: {rpcGlobalId: 123},\n },\n {\n explanation: 'Friends, Romans, countrymen, lend me your ears;\\n' +\n 'I come to bury Caesar, not to praise him.\\n' +\n 'The evil that men do lives after them;\\n' +\n 'The good is oft interred with their bones;\\n' +\n 'So let it be with Caesar. The noble Brutus\\n' +\n 'Hath told you Caesar was ambitious:\\n',\n metadata: {rpcGlobalId: 123},\n },\n {\n explanation: 'Friends, Romans, countrymen, lend me your ears;\\n' +\n 'I come to bury Caesar, not to praise him.\\n' +\n 'The evil that men do lives after them;\\n' +\n 'The good is oft interred with their bones;\\n' +\n 'So let it be with Caesar. The noble Brutus\\n' +\n 'Hath told you Caesar was ambitious:\\n' +\n 'If it were so, it was a grievous fault,\\n' +\n 'And grievously hath Caesar answer’d it.\\n',\n metadata: {rpcGlobalId: 123},\n },\n ]);\n });\n\n it('handles subsequent code chunks', async () => {\n sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'doAidaConversation')\n .callsFake(async (_, streamId, callback) => {\n const response = JSON.stringify([\n {textChunk: {text: 'hello '}},\n {codeChunk: {code: 'brave '}},\n {codeChunk: {code: 'new World()'}},\n ]);\n for (const chunk of response.split(',')) {\n await new Promise(resolve => setTimeout(resolve, 0));\n Host.ResourceLoader.streamWrite(streamId, chunk);\n }\n callback({statusCode: 200});\n });\n\n const provider = new Host.AidaClient.AidaClient();\n const results = (await getAllResults(provider)).map(r => r.explanation);\n assert.deepStrictEqual(\n results, ['hello ', 'hello \\n`````\\nbrave \\n`````\\n', 'hello \\n`````\\nbrave new World()\\n`````\\n']);\n });\n\n it('throws a readable error on 403', async () => {\n sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'doAidaConversation').callsArgWith(2, {\n 'statusCode': 403,\n });\n const provider = new Host.AidaClient.AidaClient();\n try {\n await getAllResults(provider);\n expect.fail('provider.fetch did not throw');\n } catch (err) {\n expect(err.message).equals('Server responded: permission denied');\n }\n });\n\n it('throws an error for other codes', async () => {\n sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'doAidaConversation').callsArgWith(2, {\n 'statusCode': 418,\n });\n const provider = new Host.AidaClient.AidaClient();\n try {\n await getAllResults(provider);\n expect.fail('provider.fetch did not throw');\n } catch (err) {\n expect(err.message).equals('Request failed: {\"statusCode\":418}');\n }\n });\n\n it('throws an error with all details for other failures', async () => {\n sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'doAidaConversation').callsArgWith(2, {\n 'error': 'Cannot get OAuth credentials',\n 'detail': '{\\'@type\\': \\'type.googleapis.com/google.rpc.DebugInfo\\', \\'detail\\': \\'DETAILS\\'}',\n });\n const provider = new Host.AidaClient.AidaClient();\n try {\n await getAllResults(provider);\n expect.fail('provider.fetch did not throw');\n } catch (err) {\n expect(err.message)\n .equals(\n 'Cannot send request: Cannot get OAuth credentials {\\'@type\\': \\'type.googleapis.com/google.rpc.DebugInfo\\', \\'detail\\': \\'DETAILS\\'}');\n }\n });\n});\n"]} \ No newline at end of file diff --git a/public/core/host/InspectorFrontendHostAPI.d.ts b/public/core/host/InspectorFrontendHostAPI.d.ts index 14416afc6..81775cb98 100644 --- a/public/core/host/InspectorFrontendHostAPI.d.ts +++ b/public/core/host/InspectorFrontendHostAPI.d.ts @@ -131,7 +131,7 @@ export interface ChangeEvent { context?: number; } export interface KeyDownEvent { - veid: number; + veid?: number; context?: number; } export type EventTypes = { diff --git a/public/core/host/InspectorFrontendHostAPI.js.map b/public/core/host/InspectorFrontendHostAPI.js.map index 43e6b700b..ad08b7272 100644 --- a/public/core/host/InspectorFrontendHostAPI.js.map +++ b/public/core/host/InspectorFrontendHostAPI.js.map @@ -1 +1 @@ -{"version":3,"file":"InspectorFrontendHostAPI.js","sourceRoot":"","sources":["../../../../../../front_end/core/host/InspectorFrontendHostAPI.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAI7B,MAAM,CAAN,IAAY,MA8BX;AA9BD,WAAY,MAAM;IAChB,yCAA+B,CAAA;IAC/B,6CAAmC,CAAA;IACnC,iDAAuC,CAAA;IACvC,mDAAyC,CAAA;IACzC,6DAAmD,CAAA;IACnD,mDAAyC,CAAA;IACzC,yEAA+D,CAAA;IAC/D,mFAAyE,CAAA;IACzE,2CAAiC,CAAA;IACjC,6CAAmC,CAAA;IACnC,uDAA6C,CAAA;IAC7C,6DAAmD,CAAA;IACnD,yDAA+C,CAAA;IAC/C,iDAAuC,CAAA;IACvC,iDAAuC,CAAA;IACvC,6CAAmC,CAAA;IACnC,mFAAyE,CAAA;IACzE,qEAA2D,CAAA;IAC3D,2CAAiC,CAAA;IACjC,uCAA6B,CAAA;IAC7B,iDAAuC,CAAA;IACvC,mDAAyC,CAAA;IACzC,qDAA2C,CAAA;IAC3C,+CAAqC,CAAA;IACrC,+BAAqB,CAAA;IACrB,6CAAmC,CAAA;IACnC,iDAAuC,CAAA;IACvC,2CAAiC,CAAA;IACjC,iCAAuB,CAAA;AACzB,CAAC,EA9BW,MAAM,KAAN,MAAM,QA8BjB;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,CAAC,MAAM,CAAC,aAAa,EAAE,eAAe,EAAE,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC,MAAM,CAAC,eAAe,EAAE,iBAAiB,EAAE,CAAC,KAAK,CAAC,CAAC;IACpD,CAAC,MAAM,CAAC,iBAAiB,EAAE,mBAAmB,E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CAAC,MAAM,CAAC,cAAc,EAAE,gBAAgB,EAAE,CAAC,WAAW,EAAE,gBAAgB,EAAE,QAAQ,CAAC,CAAC;IACpF,CAAC,MAAM,CAAC,YAAY,EAAE,cAAc,EAAE,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;IACtE,CAAC,MAAM,CAAC,iBAAiB,EAAE,mBAAmB,EAAE,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC,MAAM,CAAC,kBAAkB,EAAE,oBAAoB,EAAE,EAAE,CAAC;IACrD,CAAC,MAAM,CAAC,mBAAmB,EAAE,qBAAqB,EAAE,CAAC,MAAM,CAAC,CAAC;IAC7D,CAAC,MAAM,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;IACpF,CAAC,MAAM,CAAC,QAAQ,EAAE,UAAU,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;IACxD,CAAC,MAAM,CAAC,eAAe,EAAE,iBAAiB,EAAE,CAAC,WAAW,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACrF,CAAC,MAAM,CAAC,iBAAiB,EAAE,mBAAmB,EAAE,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC,MAAM,CAAC,cAAc,EAAE,gBAAgB,EAAE,CAAC,aAAa,CAAC,CAAC;IAC1D,CAAC,MAAM,CAAC,SAAS,EAAE,WAAW,EAAE,CAAC,WAAW,CAAC,CAAC;CAC/C,CAAC","sourcesContent":["// Copyright (c) 2015 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Platform from '../../core/platform/platform.js';\n\nexport enum Events {\n AppendedToURL = 'appendedToURL',\n CanceledSaveURL = 'canceledSaveURL',\n ColorThemeChanged = 'colorThemeChanged',\n ContextMenuCleared = 'contextMenuCleared',\n ContextMenuItemSelected = 'contextMenuItemSelected',\n DeviceCountUpdated = 'deviceCountUpdated',\n DevicesDiscoveryConfigChanged = 'devicesDiscoveryConfigChanged',\n DevicesPortForwardingStatusChanged = 'devicesPortForwardingStatusChanged',\n DevicesUpdated = 'devicesUpdated',\n DispatchMessage = 'dispatchMessage',\n DispatchMessageChunk = 'dispatchMessageChunk',\n EnterInspectElementMode = 'enterInspectElementMode',\n EyeDropperPickedColor = 'eyeDropperPickedColor',\n FileSystemsLoaded = 'fileSystemsLoaded',\n FileSystemRemoved = 'fileSystemRemoved',\n FileSystemAdded = 'fileSystemAdded',\n FileSystemFilesChangedAddedRemoved = 'FileSystemFilesChangedAddedRemoved',\n IndexingTotalWorkCalculated = 'indexingTotalWorkCalculated',\n IndexingWorked = 'indexingWorked',\n IndexingDone = 'indexingDone',\n KeyEventUnhandled = 'keyEventUnhandled',\n ReattachRootTarget = 'reattachMainTarget',\n ReloadInspectedPage = 'reloadInspectedPage',\n RevealSourceLine = 'revealSourceLine',\n SavedURL = 'savedURL',\n SearchCompleted = 'searchCompleted',\n SetInspectedTabId = 'setInspectedTabId',\n SetUseSoftMenu = 'setUseSoftMenu',\n ShowPanel = 'showPanel',\n}\n\nexport const EventDescriptors = [\n [Events.AppendedToURL, 'appendedToURL', ['url']],\n [Events.CanceledSaveURL, 'canceledSaveURL', ['url']],\n [Events.ColorThemeChanged, 'colorThemeChanged', []],\n [Events.ContextMenuCleared, 'contextMenuCleared', []],\n [Events.ContextMenuItemSelected, 'contextMenuItemSelected', ['id']],\n [Events.DeviceCountUpdated, 'deviceCountUpdated', ['count']],\n [Events.DevicesDiscoveryConfigChanged, 'devicesDiscoveryConfigChanged', ['config']],\n [Events.DevicesPortForwardingStatusChanged, 'devicesPortForwardingStatusChanged', ['status']],\n [Events.DevicesUpdated, 'devicesUpdated', ['devices']],\n [Events.DispatchMessage, 'dispatchMessage', ['messageObject']],\n [Events.DispatchMessageChunk, 'dispatchMessageChunk', ['messageChunk', 'messageSize']],\n [Events.EnterInspectElementMode, 'enterInspectElementMode', []],\n [Events.EyeDropperPickedColor, 'eyeDropperPickedColor', ['color']],\n [Events.FileSystemsLoaded, 'fileSystemsLoaded', ['fileSystems']],\n [Events.FileSystemRemoved, 'fileSystemRemoved', ['fileSystemPath']],\n [Events.FileSystemAdded, 'fileSystemAdded', ['errorMessage', 'fileSystem']],\n [Events.FileSystemFilesChangedAddedRemoved, 'fileSystemFilesChangedAddedRemoved', ['changed', 'added', 'removed']],\n [Events.IndexingTotalWorkCalculated, 'indexingTotalWorkCalculated', ['requestId', 'fileSystemPath', 'totalWork']],\n [Events.IndexingWorked, 'indexingWorked', ['requestId', 'fileSystemPath', 'worked']],\n [Events.IndexingDone, 'indexingDone', ['requestId', 'fileSystemPath']],\n [Events.KeyEventUnhandled, 'keyEventUnhandled', ['event']],\n [Events.ReattachRootTarget, 'reattachMainTarget', []],\n [Events.ReloadInspectedPage, 'reloadInspectedPage', ['hard']],\n [Events.RevealSourceLine, 'revealSourceLine', ['url', 'lineNumber', 'columnNumber']],\n [Events.SavedURL, 'savedURL', ['url', 'fileSystemPath']],\n [Events.SearchCompleted, 'searchCompleted', ['requestId', 'fileSystemPath', 'files']],\n [Events.SetInspectedTabId, 'setInspectedTabId', ['tabId']],\n [Events.SetUseSoftMenu, 'setUseSoftMenu', ['useSoftMenu']],\n [Events.ShowPanel, 'showPanel', ['panelName']],\n];\n\nexport interface DispatchMessageChunkEvent {\n messageChunk: string;\n messageSize: number;\n}\n\nexport interface EyeDropperPickedColorEvent {\n r: number;\n g: number;\n b: number;\n a: number;\n}\n\nexport interface DevToolsFileSystem {\n type: string;\n fileSystemName: string;\n rootURL: string;\n fileSystemPath: Platform.DevToolsPath.RawPathString;\n}\n\nexport interface FileSystemAddedEvent {\n errorMessage?: string;\n fileSystem: DevToolsFileSystem|null;\n}\n\nexport interface FilesChangedEvent {\n changed: Platform.DevToolsPath.RawPathString[];\n added: Platform.DevToolsPath.RawPathString[];\n removed: Platform.DevToolsPath.RawPathString[];\n}\n\nexport interface IndexingEvent {\n requestId: number;\n fileSystemPath: string;\n}\n\nexport interface IndexingTotalWorkCalculatedEvent extends IndexingEvent {\n totalWork: number;\n}\n\nexport interface IndexingWorkedEvent extends IndexingEvent {\n worked: number;\n}\n\nexport interface KeyEventUnhandledEvent {\n type: string;\n key: string;\n keyCode: number;\n modifiers: number;\n}\n\nexport interface RevealSourceLineEvent {\n url: Platform.DevToolsPath.UrlString;\n lineNumber: number;\n columnNumber: number;\n}\n\nexport interface SavedURLEvent {\n url: Platform.DevToolsPath.RawPathString|Platform.DevToolsPath.UrlString;\n fileSystemPath: Platform.DevToolsPath.RawPathString|Platform.DevToolsPath.UrlString;\n}\n\nexport interface SearchCompletedEvent {\n requestId: number;\n files: Platform.DevToolsPath.RawPathString[];\n}\n\nexport interface DoAidaConversationResult {\n statusCode?: number;\n headers?: {\n [x: string]: string,\n };\n netError?: number;\n netErrorName?: string;\n error?: string;\n detail?: string;\n}\n\nexport interface VisualElementImpression {\n id: number;\n type: number;\n parent?: number;\n context?: number;\n width?: number;\n height?: number;\n}\n\nexport interface ImpressionEvent {\n impressions: VisualElementImpression[];\n}\n\nexport interface ResizeEvent {\n veid: number;\n width?: number;\n height?: number;\n}\n\nexport interface ClickEvent {\n veid: number;\n mouseButton: number;\n context?: number;\n doubleClick: boolean;\n}\n\nexport interface HoverEvent {\n veid: number;\n time?: number;\n context?: number;\n}\n\nexport interface DragEvent {\n veid: number;\n context?: number;\n}\n\nexport interface ChangeEvent {\n veid: number;\n context?: number;\n}\n\nexport interface KeyDownEvent {\n veid: number;\n context?: number;\n}\n\n// While `EventDescriptors` are used to dynamically dispatch host binding events,\n// the `EventTypes` \"type map\" is used for type-checking said events by TypeScript.\n// `EventTypes` is not used at runtime.\n// Please note that the \"dispatch\" side can't be type-checked as the dispatch is\n// done dynamically.\nexport type EventTypes = {\n [Events.AppendedToURL]: Platform.DevToolsPath.RawPathString|Platform.DevToolsPath.UrlString,\n [Events.CanceledSaveURL]: Platform.DevToolsPath.UrlString,\n [Events.ColorThemeChanged]: void,\n [Events.ContextMenuCleared]: void,\n [Events.ContextMenuItemSelected]: number,\n [Events.DeviceCountUpdated]: number,\n [Events.DevicesDiscoveryConfigChanged]: Adb.Config,\n [Events.DevicesPortForwardingStatusChanged]: void,\n [Events.DevicesUpdated]: void,\n [Events.DispatchMessage]: string,\n [Events.DispatchMessageChunk]: DispatchMessageChunkEvent,\n [Events.EnterInspectElementMode]: void,\n [Events.EyeDropperPickedColor]: EyeDropperPickedColorEvent,\n [Events.FileSystemsLoaded]: DevToolsFileSystem[],\n [Events.FileSystemRemoved]: Platform.DevToolsPath.RawPathString,\n [Events.FileSystemAdded]: FileSystemAddedEvent,\n [Events.FileSystemFilesChangedAddedRemoved]: FilesChangedEvent,\n [Events.IndexingTotalWorkCalculated]: IndexingTotalWorkCalculatedEvent,\n [Events.IndexingWorked]: IndexingWorkedEvent,\n [Events.IndexingDone]: IndexingEvent,\n [Events.KeyEventUnhandled]: KeyEventUnhandledEvent,\n [Events.ReattachRootTarget]: void,\n [Events.ReloadInspectedPage]: boolean,\n [Events.RevealSourceLine]: RevealSourceLineEvent,\n [Events.SavedURL]: SavedURLEvent,\n [Events.SearchCompleted]: SearchCompletedEvent,\n [Events.SetInspectedTabId]: string,\n [Events.SetUseSoftMenu]: boolean,\n [Events.ShowPanel]: string,\n};\n\nexport interface InspectorFrontendHostAPI {\n addFileSystem(type?: string): void;\n\n loadCompleted(): void;\n\n indexPath(requestId: number, fileSystemPath: Platform.DevToolsPath.RawPathString, excludedFolders: string): void;\n\n /**\n * Requests inspected page to be placed atop of the inspector frontend with specified bounds.\n */\n setInspectedPageBounds(bounds: {\n x: number,\n y: number,\n width: number,\n height: number,\n }): void;\n\n showCertificateViewer(certChain: string[]): void;\n\n setWhitelistedShortcuts(shortcuts: string): void;\n\n setEyeDropperActive(active: boolean): void;\n\n inspectElementCompleted(): void;\n\n openInNewTab(url: Platform.DevToolsPath.UrlString): void;\n\n openSearchResultsInNewTab(query: string): void;\n\n showItemInFolder(fileSystemPath: Platform.DevToolsPath.RawPathString): void;\n\n removeFileSystem(fileSystemPath: Platform.DevToolsPath.RawPathString): void;\n\n requestFileSystems(): void;\n\n save(url: Platform.DevToolsPath.UrlString, content: string, forceSaveAs: boolean): void;\n\n append(url: Platform.DevToolsPath.UrlString, content: string): void;\n\n close(url: Platform.DevToolsPath.UrlString): void;\n\n searchInPath(requestId: number, fileSystemPath: Platform.DevToolsPath.RawPathString, query: string): void;\n\n stopIndexing(requestId: number): void;\n\n bringToFront(): void;\n\n closeWindow(): void;\n\n copyText(text: string|null|undefined): void;\n\n inspectedURLChanged(url: Platform.DevToolsPath.UrlString): void;\n\n isolatedFileSystem(fileSystemId: string, registeredName: string): FileSystem|null;\n\n loadNetworkResource(\n url: string, headers: string, streamId: number, callback: (arg0: LoadNetworkResourceResult) => void): void;\n\n registerPreference(name: string, options: {synced?: boolean}): void;\n\n getPreferences(callback: (arg0: {\n [x: string]: string,\n }) => void): void;\n\n getPreference(name: string, callback: (arg0: string) => void): void;\n\n setPreference(name: string, value: string): void;\n\n removePreference(name: string): void;\n\n clearPreferences(): void;\n\n getSyncInformation(callback: (arg0: SyncInformation) => void): void;\n\n upgradeDraggedFileSystemPermissions(fileSystem: FileSystem): void;\n\n platform(): string;\n\n recordCountHistogram(histogramName: string, sample: number, min: number, exclusiveMax: number, bucketSize: number):\n void;\n\n recordEnumeratedHistogram(actionName: EnumeratedHistogram, actionCode: number, bucketSize: number): void;\n\n recordPerformanceHistogram(histogramName: string, duration: number): void;\n\n recordUserMetricsAction(umaName: string): void;\n\n sendMessageToBackend(message: string): void;\n\n setDevicesDiscoveryConfig(config: Adb.Config): void;\n\n setDevicesUpdatesEnabled(enabled: boolean): void;\n\n performActionOnRemotePage(pageId: string, action: string): void;\n\n openRemotePage(browserId: string, url: string): void;\n\n openNodeFrontend(): void;\n\n setInjectedScriptForOrigin(origin: string, script: string): void;\n\n setIsDocked(isDocked: boolean, callback: () => void): void;\n\n showSurvey(trigger: string, callback: (arg0: ShowSurveyResult) => void): void;\n\n canShowSurvey(trigger: string, callback: (arg0: CanShowSurveyResult) => void): void;\n\n zoomFactor(): number;\n\n zoomIn(): void;\n\n zoomOut(): void;\n\n resetZoom(): void;\n\n showContextMenuAtPoint(x: number, y: number, items: ContextMenuDescriptor[], document: Document): void;\n\n reattach(callback: () => void): void;\n\n readyForTest(): void;\n\n connectionReady(): void;\n\n setOpenNewWindowForPopups(value: boolean): void;\n\n isHostedMode(): boolean;\n\n setAddExtensionCallback(callback: (arg0: ExtensionDescriptor) => void): void;\n\n initialTargetId(): Promise;\n\n doAidaConversation: (request: string, streamId: number, cb: (result: DoAidaConversationResult) => void) => void;\n registerAidaClientEvent: (request: string) => void;\n\n recordImpression(event: ImpressionEvent): void;\n recordClick(event: ClickEvent): void;\n recordHover(event: HoverEvent): void;\n recordDrag(event: DragEvent): void;\n recordChange(event: ChangeEvent): void;\n recordKeyDown(event: KeyDownEvent): void;\n}\n\nexport interface ContextMenuDescriptor {\n type: 'checkbox'|'item'|'separator'|'subMenu';\n id?: number;\n label?: string;\n enabled?: boolean;\n checked?: boolean;\n subItems?: ContextMenuDescriptor[];\n jslogContext?: string;\n}\nexport interface LoadNetworkResourceResult {\n statusCode: number;\n headers?: {\n [x: string]: string,\n };\n netError?: number;\n netErrorName?: string;\n urlValid?: boolean;\n messageOverride?: string;\n}\nexport interface ExtensionDescriptor {\n startPage: string;\n name: string;\n exposeExperimentalAPIs: boolean;\n hostsPolicy?: ExtensionHostsPolicy;\n allowFileAccess?: boolean;\n}\nexport interface ExtensionHostsPolicy {\n runtimeAllowedHosts: string[];\n runtimeBlockedHosts: string[];\n}\nexport interface ShowSurveyResult {\n surveyShown: boolean;\n}\nexport interface CanShowSurveyResult {\n canShowSurvey: boolean;\n}\nexport interface SyncInformation {\n /** Whether Chrome Sync is enabled and active */\n isSyncActive: boolean;\n /** Whether syncing of Chrome Settings is enabled via Chrome Sync is enabled */\n arePreferencesSynced?: boolean;\n /** The email of the account used for syncing */\n accountEmail?: string;\n /** The image of the account used for syncing. Its a base64 encoded PNG */\n accountImage?: string;\n}\n\n/**\n * Enum for recordPerformanceHistogram\n * Warning: There is another definition of this enum in the DevTools code\n * base, keep them in sync:\n * front_end/devtools_compatibility.js\n * @readonly\n */\nexport const enum EnumeratedHistogram {\n ActionTaken = 'DevTools.ActionTaken',\n BreakpointWithConditionAdded = 'DevTools.BreakpointWithConditionAdded',\n BreakpointEditDialogRevealedFrom = 'DevTools.BreakpointEditDialogRevealedFrom',\n PanelClosed = 'DevTools.PanelClosed',\n PanelShown = 'DevTools.PanelShown',\n PanelShownInLocation = 'DevTools.PanelShownInLocation',\n SidebarPaneShown = 'DevTools.SidebarPaneShown',\n KeyboardShortcutFired = 'DevTools.KeyboardShortcutFired',\n IssueCreated = 'DevTools.IssueCreated',\n IssuesPanelIssueExpanded = 'DevTools.IssuesPanelIssueExpanded',\n IssuesPanelOpenedFrom = 'DevTools.IssuesPanelOpenedFrom',\n IssuesPanelResourceOpened = 'DevTools.IssuesPanelResourceOpened',\n KeybindSetSettingChanged = 'DevTools.KeybindSetSettingChanged',\n ElementsSidebarTabShown = 'DevTools.Elements.SidebarTabShown',\n ExperimentEnabledAtLaunch = 'DevTools.ExperimentEnabledAtLaunch',\n ExperimentDisabledAtLaunch = 'DevTools.ExperimentDisabledAtLaunch',\n ExperimentEnabled = 'DevTools.ExperimentEnabled',\n ExperimentDisabled = 'DevTools.ExperimentDisabled',\n DeveloperResourceLoaded = 'DevTools.DeveloperResourceLoaded',\n DeveloperResourceScheme = 'DevTools.DeveloperResourceScheme',\n Language = 'DevTools.Language',\n SyncSetting = 'DevTools.SyncSetting',\n RecordingAssertion = 'DevTools.RecordingAssertion',\n RecordingCodeToggled = 'DevTools.RecordingCodeToggled',\n RecordingCopiedToClipboard = 'DevTools.RecordingCopiedToClipboard',\n RecordingEdited = 'DevTools.RecordingEdited',\n RecordingExported = 'DevTools.RecordingExported',\n RecordingReplayFinished = 'DevTools.RecordingReplayFinished',\n RecordingReplaySpeed = 'DevTools.RecordingReplaySpeed',\n RecordingReplayStarted = 'DevTools.RecordingReplayStarted',\n RecordingToggled = 'DevTools.RecordingToggled',\n SourcesSidebarTabShown = 'DevTools.Sources.SidebarTabShown',\n SourcesPanelFileDebugged = 'DevTools.SourcesPanelFileDebugged',\n SourcesPanelFileOpened = 'DevTools.SourcesPanelFileOpened',\n NetworkPanelResponsePreviewOpened = 'DevTools.NetworkPanelResponsePreviewOpened',\n StyleTextCopied = 'DevTools.StyleTextCopied',\n ManifestSectionSelected = 'DevTools.ManifestSectionSelected',\n CSSHintShown = 'DevTools.CSSHintShown',\n LighthouseModeRun = 'DevTools.LighthouseModeRun',\n LighthouseCategoryUsed = 'DevTools.LighthouseCategoryUsed',\n ColorConvertedFrom = 'DevTools.ColorConvertedFrom',\n ColorPickerOpenedFrom = 'DevTools.ColorPickerOpenedFrom',\n CSSPropertyDocumentation = 'DevTools.CSSPropertyDocumentation',\n InlineScriptParsed = 'DevTools.InlineScriptParsed',\n VMInlineScriptTypeShown = 'DevTools.VMInlineScriptShown',\n BreakpointsRestoredFromStorageCount = 'DevTools.BreakpointsRestoredFromStorageCount',\n SwatchActivated = 'DevTools.SwatchActivated',\n BadgeActivated = 'DevTools.BadgeActivated',\n AnimationPlaybackRateChanged = 'DevTools.AnimationPlaybackRateChanged',\n AnimationPointDragged = 'DevTools.AnimationPointDragged',\n LegacyResourceTypeFilterNumberOfSelectedChanged = 'DevTools.LegacyResourceTypeFilterNumberOfSelectedChanged',\n LegacyResourceTypeFilterItemSelected = 'DevTools.LegacyResourceTypeFilterItemSelected',\n ResourceTypeFilterNumberOfSelectedChanged = 'DevTools.ResourceTypeFilterNumberOfSelectedChanged',\n ResourceTypeFilterItemSelected = 'DevTools.ResourceTypeFilterItemSelected',\n NetworkPanelMoreFiltersNumberOfSelectedChanged = 'DevTools.NetworkPanelMoreFiltersNumberOfSelectedChanged',\n NetworkPanelMoreFiltersItemSelected = 'DevTools.NetworkPanelMoreFiltersItemSelected',\n}\n"]} \ No newline at end of file +{"version":3,"file":"InspectorFrontendHostAPI.js","sourceRoot":"","sources":["../../../../../../front_end/core/host/InspectorFrontendHostAPI.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAI7B,MAAM,CAAN,IAAY,MA8BX;AA9BD,WAAY,MAAM;IAChB,yCAA+B,CAAA;IAC/B,6CAAmC,CAAA;IACnC,iDAAuC,CAAA;IACvC,mDAAyC,CAAA;IACzC,6DAAmD,CAAA;IACnD,mDAAyC,CAAA;IACzC,yEAA+D,CAAA;IAC/D,mFAAyE,CAAA;IACzE,2CAAiC,CAAA;IACjC,6CAAmC,CAAA;IACnC,uDAA6C,CAAA;IAC7C,6DAAmD,CAAA;IACnD,yDAA+C,CAAA;IAC/C,iDAAuC,CAAA;IACvC,iDAAuC,CAAA;IACvC,6CAAmC,CAAA;IACnC,mFAAyE,CAAA;IACzE,qEAA2D,CAAA;IAC3D,2CAAiC,CAAA;IACjC,uCAA6B,CAAA;IAC7B,iDAAuC,CAAA;IACvC,mDAAyC,CAAA;IACzC,qDAA2C,CAAA;IAC3C,+CAAqC,CAAA;IACrC,+BAAqB,CAAA;IACrB,6CAAmC,CAAA;IACnC,iDAAuC,CAAA;IACvC,2CAAiC,CAAA;IACjC,iCAAuB,CAAA;AACzB,CAAC,EA9BW,MAAM,KAAN,MAAM,QA8BjB;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,CAAC,MAAM,CAAC,aAAa,EAAE,eAAe,EAAE,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC,MAAM,CAAC,eAAe,EAAE,iBAAiB,EAAE,CAAC,KAAK,CAAC,CAAC;IACpD,CAAC,MAAM,CAAC,iBAAiB,EAAE,mBAAmB,EAAE,EAAE,CAAC;IACnD,CAAC,MAAM,CAAC,kBAAkB,EAAE,oBAAoB,EAAE,EAAE,CAAC;IACrD,CAAC,MAAM,CAAC,uBAAuB,EAAE,yBAAyB,EAAE,CAAC,IA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,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;IACtE,CAAC,MAAM,CAAC,iBAAiB,EAAE,mBAAmB,EAAE,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC,MAAM,CAAC,kBAAkB,EAAE,oBAAoB,EAAE,EAAE,CAAC;IACrD,CAAC,MAAM,CAAC,mBAAmB,EAAE,qBAAqB,EAAE,CAAC,MAAM,CAAC,CAAC;IAC7D,CAAC,MAAM,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;IACpF,CAAC,MAAM,CAAC,QAAQ,EAAE,UAAU,EAAE,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;IACxD,CAAC,MAAM,CAAC,eAAe,EAAE,iBAAiB,EAAE,CAAC,WAAW,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACrF,CAAC,MAAM,CAAC,iBAAiB,EAAE,mBAAmB,EAAE,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC,MAAM,CAAC,cAAc,EAAE,gBAAgB,EAAE,CAAC,aAAa,CAAC,CAAC;IAC1D,CAAC,MAAM,CAAC,SAAS,EAAE,WAAW,EAAE,CAAC,WAAW,CAAC,CAAC;CAC/C,CAAC","sourcesContent":["// Copyright (c) 2015 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Platform from '../../core/platform/platform.js';\n\nexport enum Events {\n AppendedToURL = 'appendedToURL',\n CanceledSaveURL = 'canceledSaveURL',\n ColorThemeChanged = 'colorThemeChanged',\n ContextMenuCleared = 'contextMenuCleared',\n ContextMenuItemSelected = 'contextMenuItemSelected',\n DeviceCountUpdated = 'deviceCountUpdated',\n DevicesDiscoveryConfigChanged = 'devicesDiscoveryConfigChanged',\n DevicesPortForwardingStatusChanged = 'devicesPortForwardingStatusChanged',\n DevicesUpdated = 'devicesUpdated',\n DispatchMessage = 'dispatchMessage',\n DispatchMessageChunk = 'dispatchMessageChunk',\n EnterInspectElementMode = 'enterInspectElementMode',\n EyeDropperPickedColor = 'eyeDropperPickedColor',\n FileSystemsLoaded = 'fileSystemsLoaded',\n FileSystemRemoved = 'fileSystemRemoved',\n FileSystemAdded = 'fileSystemAdded',\n FileSystemFilesChangedAddedRemoved = 'FileSystemFilesChangedAddedRemoved',\n IndexingTotalWorkCalculated = 'indexingTotalWorkCalculated',\n IndexingWorked = 'indexingWorked',\n IndexingDone = 'indexingDone',\n KeyEventUnhandled = 'keyEventUnhandled',\n ReattachRootTarget = 'reattachMainTarget',\n ReloadInspectedPage = 'reloadInspectedPage',\n RevealSourceLine = 'revealSourceLine',\n SavedURL = 'savedURL',\n SearchCompleted = 'searchCompleted',\n SetInspectedTabId = 'setInspectedTabId',\n SetUseSoftMenu = 'setUseSoftMenu',\n ShowPanel = 'showPanel',\n}\n\nexport const EventDescriptors = [\n [Events.AppendedToURL, 'appendedToURL', ['url']],\n [Events.CanceledSaveURL, 'canceledSaveURL', ['url']],\n [Events.ColorThemeChanged, 'colorThemeChanged', []],\n [Events.ContextMenuCleared, 'contextMenuCleared', []],\n [Events.ContextMenuItemSelected, 'contextMenuItemSelected', ['id']],\n [Events.DeviceCountUpdated, 'deviceCountUpdated', ['count']],\n [Events.DevicesDiscoveryConfigChanged, 'devicesDiscoveryConfigChanged', ['config']],\n [Events.DevicesPortForwardingStatusChanged, 'devicesPortForwardingStatusChanged', ['status']],\n [Events.DevicesUpdated, 'devicesUpdated', ['devices']],\n [Events.DispatchMessage, 'dispatchMessage', ['messageObject']],\n [Events.DispatchMessageChunk, 'dispatchMessageChunk', ['messageChunk', 'messageSize']],\n [Events.EnterInspectElementMode, 'enterInspectElementMode', []],\n [Events.EyeDropperPickedColor, 'eyeDropperPickedColor', ['color']],\n [Events.FileSystemsLoaded, 'fileSystemsLoaded', ['fileSystems']],\n [Events.FileSystemRemoved, 'fileSystemRemoved', ['fileSystemPath']],\n [Events.FileSystemAdded, 'fileSystemAdded', ['errorMessage', 'fileSystem']],\n [Events.FileSystemFilesChangedAddedRemoved, 'fileSystemFilesChangedAddedRemoved', ['changed', 'added', 'removed']],\n [Events.IndexingTotalWorkCalculated, 'indexingTotalWorkCalculated', ['requestId', 'fileSystemPath', 'totalWork']],\n [Events.IndexingWorked, 'indexingWorked', ['requestId', 'fileSystemPath', 'worked']],\n [Events.IndexingDone, 'indexingDone', ['requestId', 'fileSystemPath']],\n [Events.KeyEventUnhandled, 'keyEventUnhandled', ['event']],\n [Events.ReattachRootTarget, 'reattachMainTarget', []],\n [Events.ReloadInspectedPage, 'reloadInspectedPage', ['hard']],\n [Events.RevealSourceLine, 'revealSourceLine', ['url', 'lineNumber', 'columnNumber']],\n [Events.SavedURL, 'savedURL', ['url', 'fileSystemPath']],\n [Events.SearchCompleted, 'searchCompleted', ['requestId', 'fileSystemPath', 'files']],\n [Events.SetInspectedTabId, 'setInspectedTabId', ['tabId']],\n [Events.SetUseSoftMenu, 'setUseSoftMenu', ['useSoftMenu']],\n [Events.ShowPanel, 'showPanel', ['panelName']],\n];\n\nexport interface DispatchMessageChunkEvent {\n messageChunk: string;\n messageSize: number;\n}\n\nexport interface EyeDropperPickedColorEvent {\n r: number;\n g: number;\n b: number;\n a: number;\n}\n\nexport interface DevToolsFileSystem {\n type: string;\n fileSystemName: string;\n rootURL: string;\n fileSystemPath: Platform.DevToolsPath.RawPathString;\n}\n\nexport interface FileSystemAddedEvent {\n errorMessage?: string;\n fileSystem: DevToolsFileSystem|null;\n}\n\nexport interface FilesChangedEvent {\n changed: Platform.DevToolsPath.RawPathString[];\n added: Platform.DevToolsPath.RawPathString[];\n removed: Platform.DevToolsPath.RawPathString[];\n}\n\nexport interface IndexingEvent {\n requestId: number;\n fileSystemPath: string;\n}\n\nexport interface IndexingTotalWorkCalculatedEvent extends IndexingEvent {\n totalWork: number;\n}\n\nexport interface IndexingWorkedEvent extends IndexingEvent {\n worked: number;\n}\n\nexport interface KeyEventUnhandledEvent {\n type: string;\n key: string;\n keyCode: number;\n modifiers: number;\n}\n\nexport interface RevealSourceLineEvent {\n url: Platform.DevToolsPath.UrlString;\n lineNumber: number;\n columnNumber: number;\n}\n\nexport interface SavedURLEvent {\n url: Platform.DevToolsPath.RawPathString|Platform.DevToolsPath.UrlString;\n fileSystemPath: Platform.DevToolsPath.RawPathString|Platform.DevToolsPath.UrlString;\n}\n\nexport interface SearchCompletedEvent {\n requestId: number;\n files: Platform.DevToolsPath.RawPathString[];\n}\n\nexport interface DoAidaConversationResult {\n statusCode?: number;\n headers?: {\n [x: string]: string,\n };\n netError?: number;\n netErrorName?: string;\n error?: string;\n detail?: string;\n}\n\nexport interface VisualElementImpression {\n id: number;\n type: number;\n parent?: number;\n context?: number;\n width?: number;\n height?: number;\n}\n\nexport interface ImpressionEvent {\n impressions: VisualElementImpression[];\n}\n\nexport interface ResizeEvent {\n veid: number;\n width?: number;\n height?: number;\n}\n\nexport interface ClickEvent {\n veid: number;\n mouseButton: number;\n context?: number;\n doubleClick: boolean;\n}\n\nexport interface HoverEvent {\n veid: number;\n time?: number;\n context?: number;\n}\n\nexport interface DragEvent {\n veid: number;\n context?: number;\n}\n\nexport interface ChangeEvent {\n veid: number;\n context?: number;\n}\n\nexport interface KeyDownEvent {\n veid?: number;\n context?: number;\n}\n\n// While `EventDescriptors` are used to dynamically dispatch host binding events,\n// the `EventTypes` \"type map\" is used for type-checking said events by TypeScript.\n// `EventTypes` is not used at runtime.\n// Please note that the \"dispatch\" side can't be type-checked as the dispatch is\n// done dynamically.\nexport type EventTypes = {\n [Events.AppendedToURL]: Platform.DevToolsPath.RawPathString|Platform.DevToolsPath.UrlString,\n [Events.CanceledSaveURL]: Platform.DevToolsPath.UrlString,\n [Events.ColorThemeChanged]: void,\n [Events.ContextMenuCleared]: void,\n [Events.ContextMenuItemSelected]: number,\n [Events.DeviceCountUpdated]: number,\n [Events.DevicesDiscoveryConfigChanged]: Adb.Config,\n [Events.DevicesPortForwardingStatusChanged]: void,\n [Events.DevicesUpdated]: void,\n [Events.DispatchMessage]: string,\n [Events.DispatchMessageChunk]: DispatchMessageChunkEvent,\n [Events.EnterInspectElementMode]: void,\n [Events.EyeDropperPickedColor]: EyeDropperPickedColorEvent,\n [Events.FileSystemsLoaded]: DevToolsFileSystem[],\n [Events.FileSystemRemoved]: Platform.DevToolsPath.RawPathString,\n [Events.FileSystemAdded]: FileSystemAddedEvent,\n [Events.FileSystemFilesChangedAddedRemoved]: FilesChangedEvent,\n [Events.IndexingTotalWorkCalculated]: IndexingTotalWorkCalculatedEvent,\n [Events.IndexingWorked]: IndexingWorkedEvent,\n [Events.IndexingDone]: IndexingEvent,\n [Events.KeyEventUnhandled]: KeyEventUnhandledEvent,\n [Events.ReattachRootTarget]: void,\n [Events.ReloadInspectedPage]: boolean,\n [Events.RevealSourceLine]: RevealSourceLineEvent,\n [Events.SavedURL]: SavedURLEvent,\n [Events.SearchCompleted]: SearchCompletedEvent,\n [Events.SetInspectedTabId]: string,\n [Events.SetUseSoftMenu]: boolean,\n [Events.ShowPanel]: string,\n};\n\nexport interface InspectorFrontendHostAPI {\n addFileSystem(type?: string): void;\n\n loadCompleted(): void;\n\n indexPath(requestId: number, fileSystemPath: Platform.DevToolsPath.RawPathString, excludedFolders: string): void;\n\n /**\n * Requests inspected page to be placed atop of the inspector frontend with specified bounds.\n */\n setInspectedPageBounds(bounds: {\n x: number,\n y: number,\n width: number,\n height: number,\n }): void;\n\n showCertificateViewer(certChain: string[]): void;\n\n setWhitelistedShortcuts(shortcuts: string): void;\n\n setEyeDropperActive(active: boolean): void;\n\n inspectElementCompleted(): void;\n\n openInNewTab(url: Platform.DevToolsPath.UrlString): void;\n\n openSearchResultsInNewTab(query: string): void;\n\n showItemInFolder(fileSystemPath: Platform.DevToolsPath.RawPathString): void;\n\n removeFileSystem(fileSystemPath: Platform.DevToolsPath.RawPathString): void;\n\n requestFileSystems(): void;\n\n save(url: Platform.DevToolsPath.UrlString, content: string, forceSaveAs: boolean): void;\n\n append(url: Platform.DevToolsPath.UrlString, content: string): void;\n\n close(url: Platform.DevToolsPath.UrlString): void;\n\n searchInPath(requestId: number, fileSystemPath: Platform.DevToolsPath.RawPathString, query: string): void;\n\n stopIndexing(requestId: number): void;\n\n bringToFront(): void;\n\n closeWindow(): void;\n\n copyText(text: string|null|undefined): void;\n\n inspectedURLChanged(url: Platform.DevToolsPath.UrlString): void;\n\n isolatedFileSystem(fileSystemId: string, registeredName: string): FileSystem|null;\n\n loadNetworkResource(\n url: string, headers: string, streamId: number, callback: (arg0: LoadNetworkResourceResult) => void): void;\n\n registerPreference(name: string, options: {synced?: boolean}): void;\n\n getPreferences(callback: (arg0: {\n [x: string]: string,\n }) => void): void;\n\n getPreference(name: string, callback: (arg0: string) => void): void;\n\n setPreference(name: string, value: string): void;\n\n removePreference(name: string): void;\n\n clearPreferences(): void;\n\n getSyncInformation(callback: (arg0: SyncInformation) => void): void;\n\n upgradeDraggedFileSystemPermissions(fileSystem: FileSystem): void;\n\n platform(): string;\n\n recordCountHistogram(histogramName: string, sample: number, min: number, exclusiveMax: number, bucketSize: number):\n void;\n\n recordEnumeratedHistogram(actionName: EnumeratedHistogram, actionCode: number, bucketSize: number): void;\n\n recordPerformanceHistogram(histogramName: string, duration: number): void;\n\n recordUserMetricsAction(umaName: string): void;\n\n sendMessageToBackend(message: string): void;\n\n setDevicesDiscoveryConfig(config: Adb.Config): void;\n\n setDevicesUpdatesEnabled(enabled: boolean): void;\n\n performActionOnRemotePage(pageId: string, action: string): void;\n\n openRemotePage(browserId: string, url: string): void;\n\n openNodeFrontend(): void;\n\n setInjectedScriptForOrigin(origin: string, script: string): void;\n\n setIsDocked(isDocked: boolean, callback: () => void): void;\n\n showSurvey(trigger: string, callback: (arg0: ShowSurveyResult) => void): void;\n\n canShowSurvey(trigger: string, callback: (arg0: CanShowSurveyResult) => void): void;\n\n zoomFactor(): number;\n\n zoomIn(): void;\n\n zoomOut(): void;\n\n resetZoom(): void;\n\n showContextMenuAtPoint(x: number, y: number, items: ContextMenuDescriptor[], document: Document): void;\n\n reattach(callback: () => void): void;\n\n readyForTest(): void;\n\n connectionReady(): void;\n\n setOpenNewWindowForPopups(value: boolean): void;\n\n isHostedMode(): boolean;\n\n setAddExtensionCallback(callback: (arg0: ExtensionDescriptor) => void): void;\n\n initialTargetId(): Promise;\n\n doAidaConversation: (request: string, streamId: number, cb: (result: DoAidaConversationResult) => void) => void;\n registerAidaClientEvent: (request: string) => void;\n\n recordImpression(event: ImpressionEvent): void;\n recordClick(event: ClickEvent): void;\n recordHover(event: HoverEvent): void;\n recordDrag(event: DragEvent): void;\n recordChange(event: ChangeEvent): void;\n recordKeyDown(event: KeyDownEvent): void;\n}\n\nexport interface ContextMenuDescriptor {\n type: 'checkbox'|'item'|'separator'|'subMenu';\n id?: number;\n label?: string;\n enabled?: boolean;\n checked?: boolean;\n subItems?: ContextMenuDescriptor[];\n jslogContext?: string;\n}\nexport interface LoadNetworkResourceResult {\n statusCode: number;\n headers?: {\n [x: string]: string,\n };\n netError?: number;\n netErrorName?: string;\n urlValid?: boolean;\n messageOverride?: string;\n}\nexport interface ExtensionDescriptor {\n startPage: string;\n name: string;\n exposeExperimentalAPIs: boolean;\n hostsPolicy?: ExtensionHostsPolicy;\n allowFileAccess?: boolean;\n}\nexport interface ExtensionHostsPolicy {\n runtimeAllowedHosts: string[];\n runtimeBlockedHosts: string[];\n}\nexport interface ShowSurveyResult {\n surveyShown: boolean;\n}\nexport interface CanShowSurveyResult {\n canShowSurvey: boolean;\n}\nexport interface SyncInformation {\n /** Whether Chrome Sync is enabled and active */\n isSyncActive: boolean;\n /** Whether syncing of Chrome Settings is enabled via Chrome Sync is enabled */\n arePreferencesSynced?: boolean;\n /** The email of the account used for syncing */\n accountEmail?: string;\n /** The image of the account used for syncing. Its a base64 encoded PNG */\n accountImage?: string;\n}\n\n/**\n * Enum for recordPerformanceHistogram\n * Warning: There is another definition of this enum in the DevTools code\n * base, keep them in sync:\n * front_end/devtools_compatibility.js\n * @readonly\n */\nexport const enum EnumeratedHistogram {\n ActionTaken = 'DevTools.ActionTaken',\n BreakpointWithConditionAdded = 'DevTools.BreakpointWithConditionAdded',\n BreakpointEditDialogRevealedFrom = 'DevTools.BreakpointEditDialogRevealedFrom',\n PanelClosed = 'DevTools.PanelClosed',\n PanelShown = 'DevTools.PanelShown',\n PanelShownInLocation = 'DevTools.PanelShownInLocation',\n SidebarPaneShown = 'DevTools.SidebarPaneShown',\n KeyboardShortcutFired = 'DevTools.KeyboardShortcutFired',\n IssueCreated = 'DevTools.IssueCreated',\n IssuesPanelIssueExpanded = 'DevTools.IssuesPanelIssueExpanded',\n IssuesPanelOpenedFrom = 'DevTools.IssuesPanelOpenedFrom',\n IssuesPanelResourceOpened = 'DevTools.IssuesPanelResourceOpened',\n KeybindSetSettingChanged = 'DevTools.KeybindSetSettingChanged',\n ElementsSidebarTabShown = 'DevTools.Elements.SidebarTabShown',\n ExperimentEnabledAtLaunch = 'DevTools.ExperimentEnabledAtLaunch',\n ExperimentDisabledAtLaunch = 'DevTools.ExperimentDisabledAtLaunch',\n ExperimentEnabled = 'DevTools.ExperimentEnabled',\n ExperimentDisabled = 'DevTools.ExperimentDisabled',\n DeveloperResourceLoaded = 'DevTools.DeveloperResourceLoaded',\n DeveloperResourceScheme = 'DevTools.DeveloperResourceScheme',\n Language = 'DevTools.Language',\n SyncSetting = 'DevTools.SyncSetting',\n RecordingAssertion = 'DevTools.RecordingAssertion',\n RecordingCodeToggled = 'DevTools.RecordingCodeToggled',\n RecordingCopiedToClipboard = 'DevTools.RecordingCopiedToClipboard',\n RecordingEdited = 'DevTools.RecordingEdited',\n RecordingExported = 'DevTools.RecordingExported',\n RecordingReplayFinished = 'DevTools.RecordingReplayFinished',\n RecordingReplaySpeed = 'DevTools.RecordingReplaySpeed',\n RecordingReplayStarted = 'DevTools.RecordingReplayStarted',\n RecordingToggled = 'DevTools.RecordingToggled',\n SourcesSidebarTabShown = 'DevTools.Sources.SidebarTabShown',\n SourcesPanelFileDebugged = 'DevTools.SourcesPanelFileDebugged',\n SourcesPanelFileOpened = 'DevTools.SourcesPanelFileOpened',\n NetworkPanelResponsePreviewOpened = 'DevTools.NetworkPanelResponsePreviewOpened',\n StyleTextCopied = 'DevTools.StyleTextCopied',\n ManifestSectionSelected = 'DevTools.ManifestSectionSelected',\n CSSHintShown = 'DevTools.CSSHintShown',\n LighthouseModeRun = 'DevTools.LighthouseModeRun',\n LighthouseCategoryUsed = 'DevTools.LighthouseCategoryUsed',\n ColorConvertedFrom = 'DevTools.ColorConvertedFrom',\n ColorPickerOpenedFrom = 'DevTools.ColorPickerOpenedFrom',\n CSSPropertyDocumentation = 'DevTools.CSSPropertyDocumentation',\n InlineScriptParsed = 'DevTools.InlineScriptParsed',\n VMInlineScriptTypeShown = 'DevTools.VMInlineScriptShown',\n BreakpointsRestoredFromStorageCount = 'DevTools.BreakpointsRestoredFromStorageCount',\n SwatchActivated = 'DevTools.SwatchActivated',\n BadgeActivated = 'DevTools.BadgeActivated',\n AnimationPlaybackRateChanged = 'DevTools.AnimationPlaybackRateChanged',\n AnimationPointDragged = 'DevTools.AnimationPointDragged',\n LegacyResourceTypeFilterNumberOfSelectedChanged = 'DevTools.LegacyResourceTypeFilterNumberOfSelectedChanged',\n LegacyResourceTypeFilterItemSelected = 'DevTools.LegacyResourceTypeFilterItemSelected',\n ResourceTypeFilterNumberOfSelectedChanged = 'DevTools.ResourceTypeFilterNumberOfSelectedChanged',\n ResourceTypeFilterItemSelected = 'DevTools.ResourceTypeFilterItemSelected',\n NetworkPanelMoreFiltersNumberOfSelectedChanged = 'DevTools.NetworkPanelMoreFiltersNumberOfSelectedChanged',\n NetworkPanelMoreFiltersItemSelected = 'DevTools.NetworkPanelMoreFiltersItemSelected',\n}\n"]} \ No newline at end of file diff --git a/public/core/host/UserMetrics.d.ts b/public/core/host/UserMetrics.d.ts index e8c7b4c54..f025554ed 100644 --- a/public/core/host/UserMetrics.d.ts +++ b/public/core/host/UserMetrics.d.ts @@ -207,7 +207,15 @@ export declare enum Action { InsightErroredApi = 131, InsightErroredMarkdown = 132, ToggleShowWebVitals = 133, - MaxValue = 134 + InsightErroredPermissionDenied = 134, + InsightErroredCannotSend = 135, + InsightErroredRequestFailed = 136, + InsightErroredCannotParseChunk = 137, + InsightErroredUnknownChunk = 138, + InsightErroredOther = 139, + AutofillReceived = 140, + AutofillReceivedAndTabAutoOpened = 141, + MaxValue = 142 } export declare enum PanelCodes { elements = 1, @@ -638,11 +646,9 @@ export declare enum DevtoolsExperiments { 'js-profiler-temporarily-enable' = 72, 'highlight-errors-elements-panel' = 73, 'set-all-breakpoints-eagerly' = 74, - 'self-xss-warning' = 75, 'use-source-map-scopes' = 76, 'storage-buckets-tree' = 77, 'network-panel-filter-bar-redesign' = 79, - 'track-context-menu' = 81, 'autofill-view' = 82, 'sources-frame-indentation-markers-temporarily-disable' = 83, 'heap-snapshot-treat-backing-store-as-containing-object' = 84, diff --git a/public/core/host/UserMetrics.js b/public/core/host/UserMetrics.js index 25d2f565c..71fbb1e98 100644 --- a/public/core/host/UserMetrics.js +++ b/public/core/host/UserMetrics.js @@ -512,7 +512,15 @@ export var Action; Action[Action["InsightErroredApi"] = 131] = "InsightErroredApi"; Action[Action["InsightErroredMarkdown"] = 132] = "InsightErroredMarkdown"; Action[Action["ToggleShowWebVitals"] = 133] = "ToggleShowWebVitals"; - Action[Action["MaxValue"] = 134] = "MaxValue"; + Action[Action["InsightErroredPermissionDenied"] = 134] = "InsightErroredPermissionDenied"; + Action[Action["InsightErroredCannotSend"] = 135] = "InsightErroredCannotSend"; + Action[Action["InsightErroredRequestFailed"] = 136] = "InsightErroredRequestFailed"; + Action[Action["InsightErroredCannotParseChunk"] = 137] = "InsightErroredCannotParseChunk"; + Action[Action["InsightErroredUnknownChunk"] = 138] = "InsightErroredUnknownChunk"; + Action[Action["InsightErroredOther"] = 139] = "InsightErroredOther"; + Action[Action["AutofillReceived"] = 140] = "AutofillReceived"; + Action[Action["AutofillReceivedAndTabAutoOpened"] = 141] = "AutofillReceivedAndTabAutoOpened"; + Action[Action["MaxValue"] = 142] = "MaxValue"; })(Action || (Action = {})); /* eslint-disable @typescript-eslint/naming-convention */ export var PanelCodes; @@ -956,11 +964,9 @@ export var DevtoolsExperiments; DevtoolsExperiments[DevtoolsExperiments["js-profiler-temporarily-enable"] = 72] = "js-profiler-temporarily-enable"; DevtoolsExperiments[DevtoolsExperiments["highlight-errors-elements-panel"] = 73] = "highlight-errors-elements-panel"; DevtoolsExperiments[DevtoolsExperiments["set-all-breakpoints-eagerly"] = 74] = "set-all-breakpoints-eagerly"; - DevtoolsExperiments[DevtoolsExperiments["self-xss-warning"] = 75] = "self-xss-warning"; DevtoolsExperiments[DevtoolsExperiments["use-source-map-scopes"] = 76] = "use-source-map-scopes"; DevtoolsExperiments[DevtoolsExperiments["storage-buckets-tree"] = 77] = "storage-buckets-tree"; DevtoolsExperiments[DevtoolsExperiments["network-panel-filter-bar-redesign"] = 79] = "network-panel-filter-bar-redesign"; - DevtoolsExperiments[DevtoolsExperiments["track-context-menu"] = 81] = "track-context-menu"; DevtoolsExperiments[DevtoolsExperiments["autofill-view"] = 82] = "autofill-view"; DevtoolsExperiments[DevtoolsExperiments["sources-frame-indentation-markers-temporarily-disable"] = 83] = "sources-frame-indentation-markers-temporarily-disable"; DevtoolsExperiments[DevtoolsExperiments["heap-snapshot-treat-backing-store-as-containing-object"] = 84] = "heap-snapshot-treat-backing-store-as-containing-object"; diff --git a/public/core/host/UserMetrics.js.map b/public/core/host/UserMetrics.js.map index 492189bb8..7f155ded6 100644 --- a/public/core/host/UserMetrics.js.map +++ b/public/core/host/UserMetrics.js.map @@ -1 +1 @@ -{"version":3,"file":"UserMetrics.js","sourceRoot":"","sources":["../../../../../../front_end/core/host/UserMetrics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAC,6BAA6B,EAAC,MAAM,4BAA4B,CAAC;AAGzE,MAAM,O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IACZ,oCAAS,CAAA;IACT,gDAAa,CAAA;AACf,CAAC,EApFW,QAAQ,KAAR,QAAQ,QAoFnB;AAsGD,MAAM,CAAN,IAAY,oBAQX;AARD,WAAY,oBAAoB;IAC9B,+EAAgB,CAAA;IAChB,uEAAc,CAAA;IACd,+EAAkB,CAAA;IAClB,yFAAuB,CAAA;IACvB,iEAAW,CAAA;IACX,qGAA6B,CAAA;IAC7B,uEAAY,CAAA;AACd,CAAC,EARW,oBAAoB,KAApB,oBAAoB,QAQ/B","sourcesContent":["/*\n * Copyright (C) 2011 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport {InspectorFrontendHostInstance} from './InspectorFrontendHost.js';\nimport {EnumeratedHistogram} from './InspectorFrontendHostAPI.js';\n\nexport class UserMetrics {\n #panelChangedSinceLaunch: boolean;\n #firedLaunchHistogram: boolean;\n #launchPanelName: string;\n constructor() {\n this.#panelChangedSinceLaunch = false;\n this.#firedLaunchHistogram = false;\n this.#launchPanelName = '';\n }\n\n breakpointWithConditionAdded(breakpointWithConditionAdded: BreakpointWithConditionAdded): void {\n if (breakpointWithConditionAdded >= BreakpointWithConditionAdded.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.BreakpointWithConditionAdded, breakpointWithConditionAdded,\n BreakpointWithConditionAdded.MaxValue);\n }\n\n breakpointEditDialogRevealedFrom(breakpointEditDialogRevealedFrom: BreakpointEditDialogRevealedFrom): void {\n if (breakpointEditDialogRevealedFrom >= BreakpointEditDialogRevealedFrom.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.BreakpointEditDialogRevealedFrom, breakpointEditDialogRevealedFrom,\n BreakpointEditDialogRevealedFrom.MaxValue);\n }\n\n panelShown(panelName: string, isLaunching?: boolean): void {\n const code = PanelCodes[panelName as keyof typeof PanelCodes] || 0;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.PanelShown, code, PanelCodes.MaxValue);\n InspectorFrontendHostInstance.recordUserMetricsAction('DevTools_PanelShown_' + panelName);\n // Store that the user has changed the panel so we know launch histograms should not be fired.\n if (!isLaunching) {\n this.#panelChangedSinceLaunch = true;\n }\n }\n\n /**\n * Fired when a panel is closed (regardless if it exists in the main panel or the drawer)\n */\n panelClosed(panelName: string): void {\n const code = PanelCodes[panelName as keyof typeof PanelCodes] || 0;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.PanelClosed, code, PanelCodes.MaxValue);\n // Store that the user has changed the panel so we know launch histograms should not be fired.\n this.#panelChangedSinceLaunch = true;\n }\n\n panelShownInLocation(panelName: string, location: 'main'|'drawer'): void {\n const panelWithLocationName = `${panelName}-${location}`;\n const panelWithLocation = PanelWithLocation[panelWithLocationName as keyof typeof PanelWithLocation] || 0;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.PanelShownInLocation,\n panelWithLocation,\n PanelWithLocation.MaxValue,\n );\n }\n\n elementsSidebarTabShown(sidebarPaneName: string): void {\n const code = ElementsSidebarTabCodes[sidebarPaneName as keyof typeof ElementsSidebarTabCodes] || 0;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ElementsSidebarTabShown, code, ElementsSidebarTabCodes.MaxValue);\n }\n\n sourcesSidebarTabShown(sidebarPaneName: string): void {\n const code = SourcesSidebarTabCodes[sidebarPaneName as keyof typeof SourcesSidebarTabCodes] || 0;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SourcesSidebarTabShown, code, SourcesSidebarTabCodes.MaxValue);\n }\n\n settingsPanelShown(settingsViewId: string): void {\n this.panelShown('settings-' + settingsViewId);\n }\n\n sourcesPanelFileDebugged(mediaType?: string): void {\n const code = (mediaType && MediaTypes[mediaType as keyof typeof MediaTypes]) || MediaTypes.Unknown;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SourcesPanelFileDebugged, code, MediaTypes.MaxValue);\n }\n\n sourcesPanelFileOpened(mediaType?: string): void {\n const code = (mediaType && MediaTypes[mediaType as keyof typeof MediaTypes]) || MediaTypes.Unknown;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SourcesPanelFileOpened, code, MediaTypes.MaxValue);\n }\n\n networkPanelResponsePreviewOpened(mediaType: string): void {\n const code = (mediaType && MediaTypes[mediaType as keyof typeof MediaTypes]) || MediaTypes.Unknown;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.NetworkPanelResponsePreviewOpened, code, MediaTypes.MaxValue);\n }\n\n actionTaken(action: Action): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.ActionTaken, action, Action.MaxValue);\n }\n\n panelLoaded(panelName: string, histogramName: string): void {\n if (this.#firedLaunchHistogram || panelName !== this.#launchPanelName) {\n return;\n }\n\n this.#firedLaunchHistogram = true;\n // Use rAF and window.setTimeout to ensure the marker is fired after layout and rendering.\n // This will give the most accurate representation of the tool being ready for a user.\n requestAnimationFrame(() => {\n window.setTimeout(() => {\n // Mark the load time so that we can pinpoint it more easily in a trace.\n performance.mark(histogramName);\n // If the user has switched panel before we finished loading, ignore the histogram,\n // since the launch timings will have been affected and are no longer valid.\n if (this.#panelChangedSinceLaunch) {\n return;\n }\n // This fires the event for the appropriate launch histogram.\n // The duration is measured as the time elapsed since the time origin of the document.\n InspectorFrontendHostInstance.recordPerformanceHistogram(histogramName, performance.now());\n }, 0);\n });\n }\n\n setLaunchPanel(panelName: string|null): void {\n this.#launchPanelName = (panelName as string);\n }\n\n performanceTraceLoad(measure: PerformanceMeasure): void {\n InspectorFrontendHostInstance.recordPerformanceHistogram('DevTools.TraceLoad', measure.duration);\n }\n\n keybindSetSettingChanged(keybindSet: string): void {\n const value = KeybindSetSettings[keybindSet as keyof typeof KeybindSetSettings] || 0;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.KeybindSetSettingChanged, value, KeybindSetSettings.MaxValue);\n }\n\n keyboardShortcutFired(actionId: string): void {\n const action =\n KeyboardShortcutAction[actionId as keyof typeof KeyboardShortcutAction] || KeyboardShortcutAction.OtherShortcut;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.KeyboardShortcutFired, action, KeyboardShortcutAction.MaxValue);\n }\n\n issuesPanelOpenedFrom(issueOpener: IssueOpener): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.IssuesPanelOpenedFrom, issueOpener, IssueOpener.MaxValue);\n }\n\n issuesPanelIssueExpanded(issueExpandedCategory: string|undefined): void {\n if (issueExpandedCategory === undefined) {\n return;\n }\n\n const issueExpanded = IssueExpanded[issueExpandedCategory as keyof typeof IssueExpanded];\n\n if (issueExpanded === undefined) {\n return;\n }\n\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.IssuesPanelIssueExpanded, issueExpanded, IssueExpanded.MaxValue);\n }\n\n issuesPanelResourceOpened(issueCategory: string, type: string): void {\n const key = issueCategory + type;\n const value = IssueResourceOpened[key as keyof typeof IssueResourceOpened];\n\n if (value === undefined) {\n return;\n }\n\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.IssuesPanelResourceOpened, value, IssueResourceOpened.MaxValue);\n }\n\n issueCreated(code: string): void {\n const issueCreated = IssueCreated[code as keyof typeof IssueCreated];\n if (issueCreated === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.IssueCreated, issueCreated, IssueCreated.MaxValue);\n }\n\n experimentEnabledAtLaunch(experimentId: string): void {\n const experiment = DevtoolsExperiments[experimentId as keyof typeof DevtoolsExperiments];\n if (experiment === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ExperimentEnabledAtLaunch, experiment, DevtoolsExperiments.MaxValue);\n }\n\n experimentDisabledAtLaunch(experimentId: string): void {\n const experiment = DevtoolsExperiments[experimentId as keyof typeof DevtoolsExperiments];\n if (experiment === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ExperimentDisabledAtLaunch, experiment, DevtoolsExperiments.MaxValue);\n }\n\n experimentChanged(experimentId: string, isEnabled: boolean): void {\n const experiment = DevtoolsExperiments[experimentId as keyof typeof DevtoolsExperiments];\n if (experiment === undefined) {\n return;\n }\n const actionName = isEnabled ? EnumeratedHistogram.ExperimentEnabled : EnumeratedHistogram.ExperimentDisabled;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(actionName, experiment, DevtoolsExperiments.MaxValue);\n }\n\n developerResourceLoaded(developerResourceLoaded: DeveloperResourceLoaded): void {\n if (developerResourceLoaded >= DeveloperResourceLoaded.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.DeveloperResourceLoaded, developerResourceLoaded, DeveloperResourceLoaded.MaxValue);\n }\n\n developerResourceScheme(developerResourceScheme: DeveloperResourceScheme): void {\n if (developerResourceScheme >= DeveloperResourceScheme.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.DeveloperResourceScheme, developerResourceScheme, DeveloperResourceScheme.MaxValue);\n }\n\n inlineScriptParsed(inlineScriptType: VMInlineScriptType): void {\n if (inlineScriptType >= VMInlineScriptType.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.InlineScriptParsed, inlineScriptType, VMInlineScriptType.MaxValue);\n }\n\n vmInlineScriptContentShown(inlineScriptType: VMInlineScriptType): void {\n if (inlineScriptType >= VMInlineScriptType.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.VMInlineScriptTypeShown, inlineScriptType, VMInlineScriptType.MaxValue);\n }\n\n language(language: Intl.UnicodeBCP47LocaleIdentifier): void {\n const languageCode = Language[language as keyof typeof Language];\n if (languageCode === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.Language, languageCode, Language.MaxValue);\n }\n\n syncSetting(devtoolsSyncSettingEnabled: boolean): void {\n InspectorFrontendHostInstance.getSyncInformation(syncInfo => {\n let settingValue = SyncSetting.ChromeSyncDisabled;\n if (syncInfo.isSyncActive && !syncInfo.arePreferencesSynced) {\n settingValue = SyncSetting.ChromeSyncSettingsDisabled;\n } else if (syncInfo.isSyncActive && syncInfo.arePreferencesSynced) {\n settingValue = devtoolsSyncSettingEnabled ? SyncSetting.DevToolsSyncSettingEnabled :\n SyncSetting.DevToolsSyncSettingDisabled;\n }\n\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SyncSetting, settingValue, SyncSetting.MaxValue);\n });\n }\n\n recordingAssertion(value: RecordingAssertion): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingAssertion, value, RecordingAssertion.MaxValue);\n }\n\n recordingToggled(value: RecordingToggled): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingToggled, value, RecordingToggled.MaxValue);\n }\n\n recordingReplayFinished(value: RecordingReplayFinished): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingReplayFinished, value, RecordingReplayFinished.MaxValue);\n }\n\n recordingReplaySpeed(value: RecordingReplaySpeed): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingReplaySpeed, value, RecordingReplaySpeed.MaxValue);\n }\n\n recordingReplayStarted(value: RecordingReplayStarted): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingReplayStarted, value, RecordingReplayStarted.MaxValue);\n }\n\n recordingEdited(value: RecordingEdited): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingEdited, value, RecordingEdited.MaxValue);\n }\n\n recordingExported(value: RecordingExported): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingExported, value, RecordingExported.MaxValue);\n }\n\n recordingCodeToggled(value: RecordingCodeToggled): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingCodeToggled, value, RecordingCodeToggled.MaxValue);\n }\n\n recordingCopiedToClipboard(value: RecordingCopiedToClipboard): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingCopiedToClipboard, value, RecordingCopiedToClipboard.MaxValue);\n }\n\n styleTextCopied(value: StyleTextCopied): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.StyleTextCopied, value, StyleTextCopied.MaxValue);\n }\n\n manifestSectionSelected(sectionTitle: string): void {\n const code =\n ManifestSectionCodes[sectionTitle as keyof typeof ManifestSectionCodes] || ManifestSectionCodes.OtherSection;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ManifestSectionSelected, code, ManifestSectionCodes.MaxValue);\n }\n\n cssHintShown(type: CSSHintType): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.CSSHintShown, type, CSSHintType.MaxValue);\n }\n\n lighthouseModeRun(type: LighthouseModeRun): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LighthouseModeRun, type, LighthouseModeRun.MaxValue);\n }\n\n lighthouseCategoryUsed(type: LighthouseCategoryUsed): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LighthouseCategoryUsed, type, LighthouseCategoryUsed.MaxValue);\n }\n\n colorConvertedFrom(type: ColorConvertedFrom): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ColorConvertedFrom, type, ColorConvertedFrom.MaxValue);\n }\n\n colorPickerOpenedFrom(type: ColorPickerOpenedFrom): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ColorPickerOpenedFrom, type, ColorPickerOpenedFrom.MaxValue);\n }\n\n cssPropertyDocumentation(type: CSSPropertyDocumentation): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.CSSPropertyDocumentation, type, CSSPropertyDocumentation.MaxValue);\n }\n\n swatchActivated(swatch: SwatchType): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SwatchActivated, swatch, SwatchType.MaxValue);\n }\n\n badgeActivated(badge: BadgeType): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.BadgeActivated, badge, BadgeType.MaxValue);\n }\n\n breakpointsRestoredFromStorage(count: number): void {\n const countBucket = this.#breakpointCountToBucket(count);\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.BreakpointsRestoredFromStorageCount, countBucket,\n BreakpointsRestoredFromStorageCount.MaxValue);\n }\n\n animationPlaybackRateChanged(playbackRate: AnimationsPlaybackRate): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.AnimationPlaybackRateChanged, playbackRate, AnimationsPlaybackRate.MaxValue);\n }\n\n animationPointDragged(dragType: AnimationPointDragType): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.AnimationPointDragged, dragType, AnimationPointDragType.MaxValue);\n }\n\n #breakpointCountToBucket(count: number): BreakpointsRestoredFromStorageCount {\n if (count < 100) {\n return BreakpointsRestoredFromStorageCount.LessThan100;\n }\n if (count < 300) {\n return BreakpointsRestoredFromStorageCount.LessThan300;\n }\n if (count < 1000) {\n return BreakpointsRestoredFromStorageCount.LessThan1000;\n }\n if (count < 3000) {\n return BreakpointsRestoredFromStorageCount.LessThan3000;\n }\n if (count < 10000) {\n return BreakpointsRestoredFromStorageCount.LessThan10000;\n }\n if (count < 30000) {\n return BreakpointsRestoredFromStorageCount.LessThan30000;\n }\n if (count < 100000) {\n return BreakpointsRestoredFromStorageCount.LessThan100000;\n }\n if (count < 300000) {\n return BreakpointsRestoredFromStorageCount.LessThan300000;\n }\n if (count < 1000000) {\n return BreakpointsRestoredFromStorageCount.LessThan1000000;\n }\n return BreakpointsRestoredFromStorageCount.Above1000000;\n }\n\n workspacesPopulated(wallClockTimeInMilliseconds: number): void {\n InspectorFrontendHostInstance.recordPerformanceHistogram(\n 'DevTools.Workspaces.PopulateWallClocktime', wallClockTimeInMilliseconds);\n }\n\n visualLoggingProcessingDone(timeInMilliseconds: number): void {\n InspectorFrontendHostInstance.recordPerformanceHistogram(\n 'DevTools.VisualLogging.ProcessingTime', timeInMilliseconds);\n }\n\n legacyResourceTypeFilterNumberOfSelectedChanged(itemCount: number): void {\n const boundItemCount = Math.max(Math.min(itemCount, ResourceType.MaxValue - 1), 1);\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LegacyResourceTypeFilterNumberOfSelectedChanged, boundItemCount, ResourceType.MaxValue);\n }\n\n legacyResourceTypeFilterItemSelected(resourceTypeName: string): void {\n const resourceType = ResourceType[resourceTypeName as keyof typeof ResourceType];\n if (resourceType === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LegacyResourceTypeFilterItemSelected, resourceType, ResourceType.MaxValue);\n }\n\n resourceTypeFilterNumberOfSelectedChanged(itemCount: number): void {\n const boundItemCount = Math.max(Math.min(itemCount, ResourceType.MaxValue - 1), 1);\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ResourceTypeFilterNumberOfSelectedChanged, boundItemCount, ResourceType.MaxValue);\n }\n\n resourceTypeFilterItemSelected(resourceTypeName: string): void {\n const resourceType = ResourceType[resourceTypeName as keyof typeof ResourceType];\n if (resourceType === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ResourceTypeFilterItemSelected, resourceType, ResourceType.MaxValue);\n }\n\n networkPanelMoreFiltersNumberOfSelectedChanged(itemCount: number): void {\n const boundItemCount = Math.max(Math.min(itemCount, NetworkPanelMoreFilters.MaxValue), 0);\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.NetworkPanelMoreFiltersNumberOfSelectedChanged, boundItemCount,\n NetworkPanelMoreFilters.MaxValue);\n }\n\n networkPanelMoreFiltersItemSelected(filterName: string): void {\n const filter = NetworkPanelMoreFilters[filterName as keyof typeof NetworkPanelMoreFilters];\n if (filter === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.NetworkPanelMoreFiltersItemSelected, filter, NetworkPanelMoreFilters.MaxValue);\n }\n}\n\n/**\n * The numeric enum values are not necessarily continuous! It is possible that\n * values have been removed, which results in gaps in the sequence of values.\n * When adding a new value:\n * 1. Add an entry to the bottom of the enum before 'MaxValue'.\n * 2. Set the value of the new entry to the current value of 'MaxValue'.\n * 2. Increment the value of 'MaxValue' by 1.\n * When removing a value which is no longer needed:\n * 1. Delete the line with the unneeded value\n * 2. Do not update any 'MaxValue' or any other value.\n */\n\n// Codes below are used to collect UMA histograms in the Chromium port.\n// Do not change the values below, additional actions are needed on the Chromium side\n// in order to add more codes.\nexport enum Action {\n WindowDocked = 1,\n WindowUndocked = 2,\n ScriptsBreakpointSet = 3,\n TimelineStarted = 4,\n ProfilesCPUProfileTaken = 5,\n ProfilesHeapProfileTaken = 6,\n ConsoleEvaluated = 8,\n FileSavedInWorkspace = 9,\n DeviceModeEnabled = 10,\n AnimationsPlaybackRateChanged = 11,\n RevisionApplied = 12,\n FileSystemDirectoryContentReceived = 13,\n StyleRuleEdited = 14,\n CommandEvaluatedInConsolePanel = 15,\n DOMPropertiesExpanded = 16,\n ResizedViewInResponsiveMode = 17,\n TimelinePageReloadStarted = 18,\n ConnectToNodeJSFromFrontend = 19,\n ConnectToNodeJSDirectly = 20,\n CpuThrottlingEnabled = 21,\n CpuProfileNodeFocused = 22,\n CpuProfileNodeExcluded = 23,\n SelectFileFromFilePicker = 24,\n SelectCommandFromCommandMenu = 25,\n ChangeInspectedNodeInElementsPanel = 26,\n StyleRuleCopied = 27,\n CoverageStarted = 28,\n LighthouseStarted = 29,\n LighthouseFinished = 30,\n ShowedThirdPartyBadges = 31,\n LighthouseViewTrace = 32,\n FilmStripStartedRecording = 33,\n CoverageReportFiltered = 34,\n CoverageStartedPerBlock = 35,\n 'SettingsOpenedFromGear-deprecated' = 36,\n 'SettingsOpenedFromMenu-deprecated' = 37,\n 'SettingsOpenedFromCommandMenu-deprecated' = 38,\n TabMovedToDrawer = 39,\n TabMovedToMainPanel = 40,\n CaptureCssOverviewClicked = 41,\n VirtualAuthenticatorEnvironmentEnabled = 42,\n SourceOrderViewActivated = 43,\n UserShortcutAdded = 44,\n ShortcutRemoved = 45,\n ShortcutModified = 46,\n CustomPropertyLinkClicked = 47,\n CustomPropertyEdited = 48,\n ServiceWorkerNetworkRequestClicked = 49,\n ServiceWorkerNetworkRequestClosedQuickly = 50,\n NetworkPanelServiceWorkerRespondWith = 51,\n NetworkPanelCopyValue = 52,\n ConsoleSidebarOpened = 53,\n PerfPanelTraceImported = 54,\n PerfPanelTraceExported = 55,\n StackFrameRestarted = 56,\n CaptureTestProtocolClicked = 57,\n BreakpointRemovedFromRemoveButton = 58,\n BreakpointGroupExpandedStateChanged = 59,\n HeaderOverrideFileCreated = 60,\n HeaderOverrideEnableEditingClicked = 61,\n HeaderOverrideHeaderAdded = 62,\n HeaderOverrideHeaderEdited = 63,\n HeaderOverrideHeaderRemoved = 64,\n HeaderOverrideHeadersFileEdited = 65,\n PersistenceNetworkOverridesEnabled = 66,\n PersistenceNetworkOverridesDisabled = 67,\n BreakpointRemovedFromContextMenu = 68,\n BreakpointsInFileRemovedFromRemoveButton = 69,\n BreakpointsInFileRemovedFromContextMenu = 70,\n BreakpointsInFileCheckboxToggled = 71,\n BreakpointsInFileEnabledDisabledFromContextMenu = 72,\n BreakpointConditionEditedFromSidebar = 73,\n WorkspaceTabAddFolder = 74,\n WorkspaceTabRemoveFolder = 75,\n OverrideTabAddFolder = 76,\n OverrideTabRemoveFolder = 77,\n WorkspaceSourceSelected = 78,\n OverridesSourceSelected = 79,\n StyleSheetInitiatorLinkClicked = 80,\n BreakpointRemovedFromGutterContextMenu = 81,\n BreakpointRemovedFromGutterToggle = 82,\n StylePropertyInsideKeyframeEdited = 83,\n OverrideContentFromSourcesContextMenu = 84,\n OverrideContentFromNetworkContextMenu = 85,\n OverrideScript = 86,\n OverrideStyleSheet = 87,\n OverrideDocument = 88,\n OverrideFetchXHR = 89,\n OverrideImage = 90,\n OverrideFont = 91,\n OverrideContentContextMenuSetup = 92,\n OverrideContentContextMenuAbandonSetup = 93,\n OverrideContentContextMenuActivateDisabled = 94,\n OverrideContentContextMenuOpenExistingFile = 95,\n OverrideContentContextMenuSaveNewFile = 96,\n ShowAllOverridesFromSourcesContextMenu = 97,\n ShowAllOverridesFromNetworkContextMenu = 98,\n AnimationGroupsCleared = 99,\n AnimationsPaused = 100,\n AnimationsResumed = 101,\n AnimatedNodeDescriptionClicked = 102,\n AnimationGroupScrubbed = 103,\n AnimationGroupReplayed = 104,\n OverrideTabDeleteFolderContextMenu = 105,\n WorkspaceDropFolder = 107,\n WorkspaceSelectFolder = 108,\n OverrideContentContextMenuSourceMappedWarning = 109,\n OverrideContentContextMenuRedirectToDeployed = 110,\n NewStyleRuleAdded = 111,\n TraceExpanded = 112,\n InsightConsoleMessageShown = 113,\n InsightRequestedViaContextMenu = 114,\n InsightRequestedViaHoverButton = 115,\n InsightRatedPositive = 117,\n InsightRatedNegative = 118,\n InsightClosed = 119,\n InsightErrored = 120,\n InsightHoverButtonShown = 121,\n SelfXssWarningConsoleMessageShown = 122,\n SelfXssWarningDialogShown = 123,\n SelfXssAllowPastingInConsole = 124,\n SelfXssAllowPastingInDialog = 125,\n ToggleEmulateFocusedPageFromStylesPaneOn = 126,\n ToggleEmulateFocusedPageFromStylesPaneOff = 127,\n ToggleEmulateFocusedPageFromRenderingTab = 128,\n ToggleEmulateFocusedPageFromCommandMenu = 129,\n InsightGenerated = 130,\n InsightErroredApi = 131,\n InsightErroredMarkdown = 132,\n ToggleShowWebVitals = 133,\n MaxValue = 134,\n}\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum PanelCodes {\n elements = 1,\n resources = 2,\n network = 3,\n sources = 4,\n timeline = 5,\n 'heap-profiler' = 6,\n console = 8,\n layers = 9,\n 'console-view' = 10,\n 'animations' = 11,\n 'network.config' = 12,\n 'rendering' = 13,\n 'sensors' = 14,\n 'sources.search' = 15,\n security = 16,\n 'js-profiler' = 17,\n lighthouse = 18,\n 'coverage' = 19,\n 'protocol-monitor' = 20,\n 'remote-devices' = 21,\n 'web-audio' = 22,\n 'changes.changes' = 23,\n 'performance.monitor' = 24,\n 'release-note' = 25,\n 'live-heap-profile' = 26,\n 'sources.quick' = 27,\n 'network.blocked-urls' = 28,\n 'settings-preferences' = 29,\n 'settings-workspace' = 30,\n 'settings-experiments' = 31,\n 'settings-blackbox' = 32,\n 'settings-devices' = 33,\n 'settings-throttling-conditions' = 34,\n 'settings-emulation-locations' = 35,\n 'settings-shortcuts' = 36,\n 'issues-pane' = 37,\n 'settings-keybinds' = 38,\n 'cssoverview' = 39,\n 'chrome-recorder' = 40,\n 'trust-tokens' = 41,\n 'reporting-api' = 42,\n 'interest-groups' = 43,\n 'back-forward-cache' = 44,\n 'service-worker-cache' = 45,\n 'background-service-background-fetch' = 46,\n 'background-service-background-sync' = 47,\n 'background-service-push-messaging' = 48,\n 'background-service-notifications' = 49,\n 'background-service-payment-handler' = 50,\n 'background-service-periodic-background-sync' = 51,\n 'service-workers' = 52,\n 'app-manifest' = 53,\n 'storage' = 54,\n 'cookies' = 55,\n 'frame-details' = 56,\n 'frame-resource' = 57,\n 'frame-window' = 58,\n 'frame-worker' = 59,\n 'dom-storage' = 60,\n 'indexed-db' = 61,\n 'web-sql' = 62,\n 'performance-insights' = 63,\n 'preloading' = 64,\n 'bounce-tracking-mitigations' = 65,\n 'developer-resources' = 66,\n 'autofill-view' = 67,\n MaxValue = 68,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum PanelWithLocation {\n 'elements-main' = 1,\n 'elements-drawer' = 2,\n 'resources-main' = 3,\n 'resources-drawer' = 4,\n 'network-main' = 5,\n 'network-drawer' = 6,\n 'sources-main' = 7,\n 'sources-drawer' = 8,\n 'timeline-main' = 9,\n 'timeline-drawer' = 10,\n 'heap_profiler-main' = 11,\n 'heap_profiler-drawer' = 12,\n 'console-main' = 13,\n 'console-drawer' = 14,\n 'layers-main' = 15,\n 'layers-drawer' = 16,\n 'console-view-main' = 17,\n 'console-view-drawer' = 18,\n 'animations-main' = 19,\n 'animations-drawer' = 20,\n 'network.config-main' = 21,\n 'network.config-drawer' = 22,\n 'rendering-main' = 23,\n 'rendering-drawer' = 24,\n 'sensors-main' = 25,\n 'sensors-drawer' = 26,\n 'sources.search-main' = 27,\n 'sources.search-drawer' = 28,\n 'security-main' = 29,\n 'security-drawer' = 30,\n 'js_profiler-main' = 31,\n 'js_profiler-drawer' = 32,\n 'lighthouse-main' = 33,\n 'lighthouse-drawer' = 34,\n 'coverage-main' = 35,\n 'coverage-drawer' = 36,\n 'protocol-monitor-main' = 37,\n 'protocol-monitor-drawer' = 38,\n 'remote-devices-main' = 39,\n 'remote-devices-drawer' = 40,\n 'web-audio-main' = 41,\n 'web-audio-drawer' = 42,\n 'changes.changes-main' = 43,\n 'changes.changes-drawer' = 44,\n 'performance.monitor-main' = 45,\n 'performance.monitor-drawer' = 46,\n 'release-note-main' = 47,\n 'release-note-drawer' = 48,\n 'live_heap_profile-main' = 49,\n 'live_heap_profile-drawer' = 50,\n 'sources.quick-main' = 51,\n 'sources.quick-drawer' = 52,\n 'network.blocked-urls-main' = 53,\n 'network.blocked-urls-drawer' = 54,\n 'settings-preferences-main' = 55,\n 'settings-preferences-drawer' = 56,\n 'settings-workspace-main' = 57,\n 'settings-workspace-drawer' = 58,\n 'settings-experiments-main' = 59,\n 'settings-experiments-drawer' = 60,\n 'settings-blackbox-main' = 61,\n 'settings-blackbox-drawer' = 62,\n 'settings-devices-main' = 63,\n 'settings-devices-drawer' = 64,\n 'settings-throttling-conditions-main' = 65,\n 'settings-throttling-conditions-drawer' = 66,\n 'settings-emulation-locations-main' = 67,\n 'settings-emulation-locations-drawer' = 68,\n 'settings-shortcuts-main' = 69,\n 'settings-shortcuts-drawer' = 70,\n 'issues-pane-main' = 71,\n 'issues-pane-drawer' = 72,\n 'settings-keybinds-main' = 73,\n 'settings-keybinds-drawer' = 74,\n 'cssoverview-main' = 75,\n 'cssoverview-drawer' = 76,\n 'chrome_recorder-main' = 77,\n 'chrome_recorder-drawer' = 78,\n 'trust_tokens-main' = 79,\n 'trust_tokens-drawer' = 80,\n 'reporting_api-main' = 81,\n 'reporting_api-drawer' = 82,\n 'interest_groups-main' = 83,\n 'interest_groups-drawer' = 84,\n 'back_forward_cache-main' = 85,\n 'back_forward_cache-drawer' = 86,\n 'service_worker_cache-main' = 87,\n 'service_worker_cache-drawer' = 88,\n 'background_service_backgroundFetch-main' = 89,\n 'background_service_backgroundFetch-drawer' = 90,\n 'background_service_backgroundSync-main' = 91,\n 'background_service_backgroundSync-drawer' = 92,\n 'background_service_pushMessaging-main' = 93,\n 'background_service_pushMessaging-drawer' = 94,\n 'background_service_notifications-main' = 95,\n 'background_service_notifications-drawer' = 96,\n 'background_service_paymentHandler-main' = 97,\n 'background_service_paymentHandler-drawer' = 98,\n 'background_service_periodicBackgroundSync-main' = 99,\n 'background_service_periodicBackgroundSync-drawer' = 100,\n 'service_workers-main' = 101,\n 'service_workers-drawer' = 102,\n 'app_manifest-main' = 103,\n 'app_manifest-drawer' = 104,\n 'storage-main' = 105,\n 'storage-drawer' = 106,\n 'cookies-main' = 107,\n 'cookies-drawer' = 108,\n 'frame_details-main' = 109,\n 'frame_details-drawer' = 110,\n 'frame_resource-main' = 111,\n 'frame_resource-drawer' = 112,\n 'frame_window-main' = 113,\n 'frame_window-drawer' = 114,\n 'frame_worker-main' = 115,\n 'frame_worker-drawer' = 116,\n 'dom_storage-main' = 117,\n 'dom_storage-drawer' = 118,\n 'indexed_db-main' = 119,\n 'indexed_db-drawer' = 120,\n 'web_sql-main' = 121,\n 'web_sql-drawer' = 122,\n 'performance_insights-main' = 123,\n 'performance_insights-drawer' = 124,\n 'preloading-main' = 125,\n 'preloading-drawer' = 126,\n 'bounce_tracking_mitigations-main' = 127,\n 'bounce_tracking_mitigations-drawer' = 128,\n 'developer-resources-main' = 129,\n 'developer-resources-drawer' = 130,\n 'autofill-view-main' = 131,\n 'autofill-view-drawer' = 132,\n MaxValue = 133,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum ElementsSidebarTabCodes {\n 'OtherSidebarPane' = 0,\n 'styles' = 1,\n 'computed' = 2,\n 'elements.layout' = 3,\n 'elements.event-listeners' = 4,\n 'elements.dom-breakpoints' = 5,\n 'elements.dom-properties' = 6,\n 'accessibility.view' = 7,\n MaxValue = 8,\n}\n\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum SourcesSidebarTabCodes {\n 'OtherSidebarPane' = 0,\n 'navigator-network' = 1,\n 'navigator-files' = 2,\n 'navigator-overrides' = 3,\n 'navigator-content-scripts' = 4,\n 'navigator-snippets' = 5,\n MaxValue = 6,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum MediaTypes {\n Unknown = 0,\n 'text/css' = 2,\n 'text/html' = 3,\n 'application/xml' = 4,\n 'application/wasm' = 5,\n 'application/manifest+json' = 6,\n 'application/x-aspx' = 7,\n 'application/jsp' = 8,\n 'text/x-c++src' = 9,\n 'text/x-coffeescript' = 10,\n 'application/vnd.dart' = 11,\n 'text/typescript' = 12,\n 'text/typescript-jsx' = 13,\n 'application/json' = 14,\n 'text/x-csharp' = 15,\n 'text/x-java' = 16,\n 'text/x-less' = 17,\n 'application/x-httpd-php' = 18,\n 'text/x-python' = 19,\n 'text/x-sh' = 20,\n 'text/x-gss' = 21,\n 'text/x-sass' = 22,\n 'text/x-scss' = 23,\n 'text/markdown' = 24,\n 'text/x-clojure' = 25,\n 'text/jsx' = 26,\n 'text/x-go' = 27,\n 'text/x-kotlin' = 28,\n 'text/x-scala' = 29,\n 'text/x.svelte' = 30,\n 'text/javascript+plain' = 31,\n 'text/javascript+minified' = 32,\n 'text/javascript+sourcemapped' = 33,\n 'text/x.angular' = 34,\n 'text/x.vue' = 35,\n MaxValue = 36,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum KeybindSetSettings {\n 'devToolsDefault' = 0,\n 'vsCode' = 1,\n MaxValue = 2,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum KeyboardShortcutAction {\n OtherShortcut = 0,\n 'quick-open.show-command-menu' = 1,\n 'console.clear' = 2,\n 'console.toggle' = 3,\n 'debugger.step' = 4,\n 'debugger.step-into' = 5,\n 'debugger.step-out' = 6,\n 'debugger.step-over' = 7,\n 'debugger.toggle-breakpoint' = 8,\n 'debugger.toggle-breakpoint-enabled' = 9,\n 'debugger.toggle-pause' = 10,\n 'elements.edit-as-html' = 11,\n 'elements.hide-element' = 12,\n 'elements.redo' = 13,\n 'elements.toggle-element-search' = 14,\n 'elements.undo' = 15,\n 'main.search-in-panel.find' = 16,\n 'main.toggle-drawer' = 17,\n 'network.hide-request-details' = 18,\n 'network.search' = 19,\n 'network.toggle-recording' = 20,\n 'quick-open.show' = 21,\n 'settings.show' = 22,\n 'sources.search' = 23,\n 'background-service.toggle-recording' = 24,\n 'components.collect-garbage' = 25,\n 'console.clear.history' = 26,\n 'console.create-pin' = 27,\n 'coverage.start-with-reload' = 28,\n 'coverage.toggle-recording' = 29,\n 'debugger.breakpoint-input-window' = 30,\n 'debugger.evaluate-selection' = 31,\n 'debugger.next-call-frame' = 32,\n 'debugger.previous-call-frame' = 33,\n 'debugger.run-snippet' = 34,\n 'debugger.toggle-breakpoints-active' = 35,\n 'elements.capture-area-screenshot' = 36,\n 'emulation.capture-full-height-screenshot' = 37,\n 'emulation.capture-node-screenshot' = 38,\n 'emulation.capture-screenshot' = 39,\n 'emulation.show-sensors' = 40,\n 'emulation.toggle-device-mode' = 41,\n 'help.release-notes' = 42,\n 'help.report-issue' = 43,\n 'input.start-replaying' = 44,\n 'input.toggle-pause' = 45,\n 'input.toggle-recording' = 46,\n 'inspector-main.focus-debuggee' = 47,\n 'inspector-main.hard-reload' = 48,\n 'inspector-main.reload' = 49,\n 'live-heap-profile.start-with-reload' = 50,\n 'live-heap-profile.toggle-recording' = 51,\n 'main.debug-reload' = 52,\n 'main.next-tab' = 53,\n 'main.previous-tab' = 54,\n 'main.search-in-panel.cancel' = 55,\n 'main.search-in-panel.find-next' = 56,\n 'main.search-in-panel.find-previous' = 57,\n 'main.toggle-dock' = 58,\n 'main.zoom-in' = 59,\n 'main.zoom-out' = 60,\n 'main.zoom-reset' = 61,\n 'network-conditions.network-low-end-mobile' = 62,\n 'network-conditions.network-mid-tier-mobile' = 63,\n 'network-conditions.network-offline' = 64,\n 'network-conditions.network-online' = 65,\n 'profiler.heap-toggle-recording' = 66,\n 'profiler.js-toggle-recording' = 67,\n 'resources.clear' = 68,\n 'settings.documentation' = 69,\n 'settings.shortcuts' = 70,\n 'sources.add-folder-to-workspace' = 71,\n 'sources.add-to-watch' = 72,\n 'sources.close-all' = 73,\n 'sources.close-editor-tab' = 74,\n 'sources.create-snippet' = 75,\n 'sources.go-to-line' = 76,\n 'sources.go-to-member' = 77,\n 'sources.jump-to-next-location' = 78,\n 'sources.jump-to-previous-location' = 79,\n 'sources.rename' = 80,\n 'sources.save' = 81,\n 'sources.save-all' = 82,\n 'sources.switch-file' = 83,\n 'timeline.jump-to-next-frame' = 84,\n 'timeline.jump-to-previous-frame' = 85,\n 'timeline.load-from-file' = 86,\n 'timeline.next-recording' = 87,\n 'timeline.previous-recording' = 88,\n 'timeline.record-reload' = 89,\n 'timeline.save-to-file' = 90,\n 'timeline.show-history' = 91,\n 'timeline.toggle-recording' = 92,\n 'sources.increment-css' = 93,\n 'sources.increment-css-by-ten' = 94,\n 'sources.decrement-css' = 95,\n 'sources.decrement-css-by-ten' = 96,\n 'layers.reset-view' = 97,\n 'layers.pan-mode' = 98,\n 'layers.rotate-mode' = 99,\n 'layers.zoom-in' = 100,\n 'layers.zoom-out' = 101,\n 'layers.up' = 102,\n 'layers.down' = 103,\n 'layers.left' = 104,\n 'layers.right' = 105,\n 'help.report-translation-issue' = 106,\n 'rendering.toggle-prefers-color-scheme' = 107,\n 'chrome-recorder.start-recording' = 108,\n 'chrome-recorder.replay-recording' = 109,\n 'chrome-recorder.toggle-code-view' = 110,\n 'chrome-recorder.copy-recording-or-step' = 111,\n 'changes.revert' = 112,\n 'changes.copy' = 113,\n 'elements.new-style-rule' = 114,\n 'elements.refresh-event-listeners' = 115,\n 'coverage.clear' = 116,\n 'coverage.export' = 117,\n MaxValue = 118,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport const enum IssueOpener {\n ConsoleInfoBar = 0,\n LearnMoreLinkCOEP = 1,\n StatusBarIssuesCounter = 2,\n HamburgerMenu = 3,\n Adorner = 4,\n CommandMenu = 5,\n MaxValue = 6,\n}\n\n/**\n * This list should contain the currently active Devtools Experiments,\n * gaps are expected.\n */\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum DevtoolsExperiments {\n 'apply-custom-stylesheet' = 0,\n 'capture-node-creation-stacks' = 1,\n 'live-heap-profile' = 11,\n 'protocol-monitor' = 13,\n 'sampling-heap-profiler-timeline' = 17,\n 'show-option-tp-expose-internals-in-heap-snapshot' = 18,\n 'timeline-invalidation-tracking' = 26,\n 'timeline-show-all-events' = 27,\n 'timeline-v8-runtime-call-stats' = 28,\n 'apca' = 39,\n 'font-editor' = 41,\n 'full-accessibility-tree' = 42,\n 'ignore-list-js-frames-on-timeline' = 43,\n 'contrast-issues' = 44,\n 'experimental-cookie-features' = 45,\n 'styles-pane-css-changes' = 55,\n 'evaluate-expressions-with-source-maps' = 58,\n 'instrumentation-breakpoints' = 61,\n 'authored-deployed-grouping' = 63,\n 'important-dom-properties' = 64,\n 'just-my-code' = 65,\n 'timeline-as-console-profile-result-panel' = 67,\n 'preloading-status-panel' = 68,\n 'outermost-target-selector' = 71,\n 'js-profiler-temporarily-enable' = 72,\n 'highlight-errors-elements-panel' = 73,\n 'set-all-breakpoints-eagerly' = 74,\n 'self-xss-warning' = 75,\n 'use-source-map-scopes' = 76,\n 'storage-buckets-tree' = 77,\n 'network-panel-filter-bar-redesign' = 79,\n 'track-context-menu' = 81,\n 'autofill-view' = 82,\n 'sources-frame-indentation-markers-temporarily-disable' = 83,\n 'heap-snapshot-treat-backing-store-as-containing-object' = 84,\n 'css-type-component-length-deprecate' = 85,\n\n // Increment this when new experiments are added.\n 'MaxValue' = 86,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport const enum BreakpointWithConditionAdded {\n Logpoint = 0,\n ConditionalBreakpoint = 1,\n MaxValue = 2,\n}\n\nexport const enum BreakpointEditDialogRevealedFrom {\n BreakpointSidebarContextMenu = 0,\n BreakpointSidebarEditButton = 1,\n BreakpointMarkerContextMenu = 2,\n LineGutterContextMenu = 3,\n KeyboardShortcut = 4,\n Linkifier = 5,\n MouseClick = 6,\n MaxValue = 7,\n}\n\nexport const enum ColorConvertedFrom {\n ColorSwatch = 0,\n ColorPicker = 1,\n MaxValue = 2,\n}\n\nexport const enum ColorPickerOpenedFrom {\n SourcesPanel = 0,\n StylesPane = 1,\n MaxValue = 2,\n}\n\nexport const enum CSSPropertyDocumentation {\n Shown = 0,\n ToggledOn = 1,\n ToggledOff = 2,\n MaxValue = 3,\n}\n\nexport const enum BreakpointsRestoredFromStorageCount {\n LessThan100 = 0,\n LessThan300 = 1,\n LessThan1000 = 2,\n LessThan3000 = 3,\n LessThan10000 = 4,\n LessThan30000 = 5,\n LessThan100000 = 6,\n LessThan300000 = 7,\n LessThan1000000 = 8,\n Above1000000 = 9,\n MaxValue = 10,\n}\n\n// Update DevToolsIssuesPanelIssueExpanded from tools/metrics/histograms/enums.xml if new enum is added.\nexport enum IssueExpanded {\n CrossOriginEmbedderPolicy = 0,\n MixedContent = 1,\n SameSiteCookie = 2,\n HeavyAd = 3,\n ContentSecurityPolicy = 4,\n Other = 5,\n Generic = 6,\n ThirdPartyPhaseoutCookie = 7,\n GenericCookie = 8,\n MaxValue = 9,\n}\n\nexport enum IssueResourceOpened {\n CrossOriginEmbedderPolicyRequest = 0,\n CrossOriginEmbedderPolicyElement = 1,\n MixedContentRequest = 2,\n SameSiteCookieCookie = 3,\n SameSiteCookieRequest = 4,\n HeavyAdElement = 5,\n ContentSecurityPolicyDirective = 6,\n ContentSecurityPolicyElement = 7,\n MaxValue = 13,\n}\n\n/**\n * This list should contain the currently active issue types,\n * gaps are expected.\n */\nexport enum IssueCreated {\n MixedContentIssue = 0,\n 'ContentSecurityPolicyIssue::kInlineViolation' = 1,\n 'ContentSecurityPolicyIssue::kEvalViolation' = 2,\n 'ContentSecurityPolicyIssue::kURLViolation' = 3,\n 'ContentSecurityPolicyIssue::kTrustedTypesSinkViolation' = 4,\n 'ContentSecurityPolicyIssue::kTrustedTypesPolicyViolation' = 5,\n 'HeavyAdIssue::NetworkTotalLimit' = 6,\n 'HeavyAdIssue::CpuTotalLimit' = 7,\n 'HeavyAdIssue::CpuPeakLimit' = 8,\n 'CrossOriginEmbedderPolicyIssue::CoepFrameResourceNeedsCoepHeader' = 9,\n 'CrossOriginEmbedderPolicyIssue::CoopSandboxedIFrameCannotNavigateToCoopPage' = 10,\n 'CrossOriginEmbedderPolicyIssue::CorpNotSameOrigin' = 11,\n 'CrossOriginEmbedderPolicyIssue::CorpNotSameOriginAfterDefaultedToSameOriginByCoep' = 12,\n 'CrossOriginEmbedderPolicyIssue::CorpNotSameSite' = 13,\n 'CookieIssue::ExcludeSameSiteNoneInsecure::ReadCookie' = 14,\n 'CookieIssue::ExcludeSameSiteNoneInsecure::SetCookie' = 15,\n 'CookieIssue::WarnSameSiteNoneInsecure::ReadCookie' = 16,\n 'CookieIssue::WarnSameSiteNoneInsecure::SetCookie' = 17,\n 'CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Secure' = 18,\n 'CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Insecure' = 19,\n 'CookieIssue::WarnCrossDowngrade::ReadCookie::Secure' = 20,\n 'CookieIssue::WarnCrossDowngrade::ReadCookie::Insecure' = 21,\n 'CookieIssue::WarnCrossDowngrade::SetCookie::Secure' = 22,\n 'CookieIssue::WarnCrossDowngrade::SetCookie::Insecure' = 23,\n 'CookieIssue::ExcludeNavigationContextDowngrade::Secure' = 24,\n 'CookieIssue::ExcludeNavigationContextDowngrade::Insecure' = 25,\n 'CookieIssue::ExcludeContextDowngrade::ReadCookie::Secure' = 26,\n 'CookieIssue::ExcludeContextDowngrade::ReadCookie::Insecure' = 27,\n 'CookieIssue::ExcludeContextDowngrade::SetCookie::Secure' = 28,\n 'CookieIssue::ExcludeContextDowngrade::SetCookie::Insecure' = 29,\n 'CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie' = 30,\n 'CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie' = 31,\n 'CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::ReadCookie' = 32,\n 'CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::SetCookie' = 33,\n 'CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::ReadCookie' = 34,\n 'CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie' = 35,\n 'SharedArrayBufferIssue::TransferIssue' = 36,\n 'SharedArrayBufferIssue::CreationIssue' = 37,\n LowTextContrastIssue = 41,\n 'CorsIssue::InsecurePrivateNetwork' = 42,\n 'CorsIssue::InvalidHeaders' = 44,\n 'CorsIssue::WildcardOriginWithCredentials' = 45,\n 'CorsIssue::PreflightResponseInvalid' = 46,\n 'CorsIssue::OriginMismatch' = 47,\n 'CorsIssue::AllowCredentialsRequired' = 48,\n 'CorsIssue::MethodDisallowedByPreflightResponse' = 49,\n 'CorsIssue::HeaderDisallowedByPreflightResponse' = 50,\n 'CorsIssue::RedirectContainsCredentials' = 51,\n 'CorsIssue::DisallowedByMode' = 52,\n 'CorsIssue::CorsDisabledScheme' = 53,\n 'CorsIssue::PreflightMissingAllowExternal' = 54,\n 'CorsIssue::PreflightInvalidAllowExternal' = 55,\n 'CorsIssue::NoCorsRedirectModeNotFollow' = 57,\n 'QuirksModeIssue::QuirksMode' = 58,\n 'QuirksModeIssue::LimitedQuirksMode' = 59,\n DeprecationIssue = 60,\n 'ClientHintIssue::MetaTagAllowListInvalidOrigin' = 61,\n 'ClientHintIssue::MetaTagModifiedHTML' = 62,\n 'CorsIssue::PreflightAllowPrivateNetworkError' = 63,\n 'GenericIssue::CrossOriginPortalPostMessageError' = 64,\n 'GenericIssue::FormLabelForNameError' = 65,\n 'GenericIssue::FormDuplicateIdForInputError' = 66,\n 'GenericIssue::FormInputWithNoLabelError' = 67,\n 'GenericIssue::FormAutocompleteAttributeEmptyError' = 68,\n 'GenericIssue::FormEmptyIdAndNameAttributesForInputError' = 69,\n 'GenericIssue::FormAriaLabelledByToNonExistingId' = 70,\n 'GenericIssue::FormInputAssignedAutocompleteValueToIdOrNameAttributeError' = 71,\n 'GenericIssue::FormLabelHasNeitherForNorNestedInput' = 72,\n 'GenericIssue::FormLabelForMatchesNonExistingIdError' = 73,\n 'GenericIssue::FormHasPasswordFieldWithoutUsernameFieldError' = 74,\n 'GenericIssue::FormInputHasWrongButWellIntendedAutocompleteValueError' = 75,\n 'StylesheetLoadingIssue::LateImportRule' = 76,\n 'StylesheetLoadingIssue::RequestFailed' = 77,\n 'CorsIssue::PreflightMissingPrivateNetworkAccessId' = 78,\n 'CorsIssue::PreflightMissingPrivateNetworkAccessName' = 79,\n 'CorsIssue::PrivateNetworkAccessPermissionUnavailable' = 80,\n 'CorsIssue::PrivateNetworkAccessPermissionDenied' = 81,\n 'CookieIssue::WarnThirdPartyPhaseout::ReadCookie' = 82,\n 'CookieIssue::WarnThirdPartyPhaseout::SetCookie' = 83,\n 'CookieIssue::ExcludeThirdPartyPhaseout::ReadCookie' = 84,\n 'CookieIssue::ExcludeThirdPartyPhaseout::SetCookie' = 85,\n MaxValue = 86,\n}\n\nexport const enum DeveloperResourceLoaded {\n LoadThroughPageViaTarget = 0,\n LoadThroughPageViaFrame = 1,\n LoadThroughPageFailure = 2,\n LoadThroughPageFallback = 3,\n FallbackAfterFailure = 4,\n FallbackPerOverride = 5,\n FallbackPerProtocol = 6,\n FallbackFailure = 7,\n MaxValue = 8,\n}\n\nexport const enum DeveloperResourceScheme {\n SchemeOther = 0,\n SchemeUnknown = 1,\n SchemeHttp = 2,\n SchemeHttps = 3,\n SchemeHttpLocalhost = 4,\n SchemeHttpsLocalhost = 5,\n SchemeData = 6,\n SchemeFile = 7,\n SchemeBlob = 8,\n MaxValue = 9,\n}\n\nexport enum ResourceType {\n /* eslint-disable @typescript-eslint/naming-convention */\n all = 0,\n /* eslint-enable @typescript-eslint/naming-convention */\n Documents = 1,\n Scripts = 2,\n 'Fetch and XHR' = 3,\n Stylesheets = 4,\n Fonts = 5,\n Images = 6,\n Media = 7,\n Manifest = 8,\n WebSockets = 9,\n WebAssembly = 10,\n Other = 11,\n MaxValue = 12,\n}\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum NetworkPanelMoreFilters {\n 'Hide data URLs' = 0,\n 'Hide extension URLs' = 1,\n 'Blocked response cookies' = 2,\n 'Blocked requests' = 3,\n '3rd-party requests' = 4,\n MaxValue = 5,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport const enum VMInlineScriptType {\n MODULE_SCRIPT = 0,\n CLASSIC_SCRIPT = 1,\n MaxValue = 2,\n}\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum Language {\n 'af' = 1,\n 'am' = 2,\n 'ar' = 3,\n 'as' = 4,\n 'az' = 5,\n 'be' = 6,\n 'bg' = 7,\n 'bn' = 8,\n 'bs' = 9,\n 'ca' = 10,\n 'cs' = 11,\n 'cy' = 12,\n 'da' = 13,\n 'de' = 14,\n 'el' = 15,\n 'en-GB' = 16,\n 'en-US' = 17,\n 'es-419' = 18,\n 'es' = 19,\n 'et' = 20,\n 'eu' = 21,\n 'fa' = 22,\n 'fi' = 23,\n 'fil' = 24,\n 'fr-CA' = 25,\n 'fr' = 26,\n 'gl' = 27,\n 'gu' = 28,\n 'he' = 29,\n 'hi' = 30,\n 'hr' = 31,\n 'hu' = 32,\n 'hy' = 33,\n 'id' = 34,\n 'is' = 35,\n 'it' = 36,\n 'ja' = 37,\n 'ka' = 38,\n 'kk' = 39,\n 'km' = 40,\n 'kn' = 41,\n 'ko' = 42,\n 'ky' = 43,\n 'lo' = 44,\n 'lt' = 45,\n 'lv' = 46,\n 'mk' = 47,\n 'ml' = 48,\n 'mn' = 49,\n 'mr' = 50,\n 'ms' = 51,\n 'my' = 52,\n 'ne' = 53,\n 'nl' = 54,\n 'no' = 55,\n 'or' = 56,\n 'pa' = 57,\n 'pl' = 58,\n 'pt-PT' = 59,\n 'pt' = 60,\n 'ro' = 61,\n 'ru' = 62,\n 'si' = 63,\n 'sk' = 64,\n 'sl' = 65,\n 'sq' = 66,\n 'sr-Latn' = 67,\n 'sr' = 68,\n 'sv' = 69,\n 'sw' = 70,\n 'ta' = 71,\n 'te' = 72,\n 'th' = 73,\n 'tr' = 74,\n 'uk' = 75,\n 'ur' = 76,\n 'uz' = 77,\n 'vi' = 78,\n 'zh' = 79,\n 'zh-HK' = 80,\n 'zh-TW' = 81,\n 'zu' = 82,\n MaxValue = 83,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport const enum SyncSetting {\n ChromeSyncDisabled = 1,\n ChromeSyncSettingsDisabled = 2,\n DevToolsSyncSettingDisabled = 3,\n DevToolsSyncSettingEnabled = 4,\n MaxValue = 5,\n}\n\nexport const enum RecordingToggled {\n RecordingStarted = 1,\n RecordingFinished = 2,\n MaxValue = 3,\n}\n\nexport const enum RecordingAssertion {\n AssertionAdded = 1,\n PropertyAssertionEdited = 2,\n AttributeAssertionEdited = 3,\n MaxValue = 4,\n}\n\nexport const enum RecordingReplayFinished {\n Success = 1,\n TimeoutErrorSelectors = 2,\n TimeoutErrorTarget = 3,\n OtherError = 4,\n MaxValue = 5,\n}\n\nexport const enum RecordingReplaySpeed {\n Normal = 1,\n Slow = 2,\n VerySlow = 3,\n ExtremelySlow = 4,\n MaxValue = 5,\n}\n\nexport const enum RecordingReplayStarted {\n ReplayOnly = 1,\n ReplayWithPerformanceTracing = 2,\n ReplayViaExtension = 3,\n MaxValue = 4,\n}\n\nexport const enum RecordingEdited {\n SelectorPickerUsed = 1,\n StepAdded = 2,\n StepRemoved = 3,\n SelectorAdded = 4,\n SelectorRemoved = 5,\n SelectorPartAdded = 6,\n SelectorPartEdited = 7,\n SelectorPartRemoved = 8,\n TypeChanged = 9,\n OtherEditing = 10,\n MaxValue = 11,\n}\n\nexport const enum RecordingExported {\n ToPuppeteer = 1,\n ToJSON = 2,\n ToPuppeteerReplay = 3,\n ToExtension = 4,\n ToLighthouse = 5,\n MaxValue = 6,\n}\n\nexport const enum RecordingCodeToggled {\n CodeShown = 1,\n CodeHidden = 2,\n MaxValue = 3,\n}\n\nexport const enum RecordingCopiedToClipboard {\n CopiedRecordingWithPuppeteer = 1,\n CopiedRecordingWithJSON = 2,\n CopiedRecordingWithReplay = 3,\n CopiedRecordingWithExtension = 4,\n CopiedStepWithPuppeteer = 5,\n CopiedStepWithJSON = 6,\n CopiedStepWithReplay = 7,\n CopiedStepWithExtension = 8,\n MaxValue = 9,\n}\n\nexport const enum StyleTextCopied {\n DeclarationViaChangedLine = 1,\n AllChangesViaStylesPane = 2,\n DeclarationViaContextMenu = 3,\n PropertyViaContextMenu = 4,\n ValueViaContextMenu = 5,\n DeclarationAsJSViaContextMenu = 6,\n RuleViaContextMenu = 7,\n AllDeclarationsViaContextMenu = 8,\n AllDeclarationsAsJSViaContextMenu = 9,\n SelectorViaContextMenu = 10,\n MaxValue = 11,\n}\n\nexport enum ManifestSectionCodes {\n OtherSection = 0,\n 'Identity' = 1,\n 'Presentation' = 2,\n 'Protocol Handlers' = 3,\n 'Icons' = 4,\n 'Window Controls Overlay' = 5,\n MaxValue = 6,\n}\n\n/* eslint-enable @typescript-eslint/naming-convention */\n\n// The names here match the CSSRuleValidator names in CSSRuleValidator.ts.\nexport const enum CSSHintType {\n Other = 0,\n AlignContent = 1,\n FlexItem = 2,\n FlexContainer = 3,\n GridContainer = 4,\n GridItem = 5,\n FlexGrid = 6,\n MulticolFlexGrid = 7,\n Padding = 8,\n Position = 9,\n ZIndex = 10,\n Sizing = 11,\n FlexOrGridItem = 12,\n FontVariationSettings = 13,\n MaxValue = 14,\n}\n\nexport const enum LighthouseModeRun {\n Navigation = 0,\n Timespan = 1,\n Snapshot = 2,\n LegacyNavigation = 3,\n MaxValue = 4,\n}\n\nexport const enum LighthouseCategoryUsed {\n Performance = 0,\n Accessibility = 1,\n BestPractices = 2,\n SEO = 3,\n PWA = 4,\n PubAds = 5,\n MaxValue = 6,\n}\n\nexport const enum SwatchType {\n VarLink = 0,\n AnimationNameLink = 1,\n Color = 2,\n AnimationTiming = 3,\n Shadow = 4,\n Grid = 5,\n Flex = 6,\n Angle = 7,\n Length = 8,\n PositionFallbackLink = 9,\n MaxValue = 10,\n}\n\nexport const enum BadgeType {\n GRID = 0,\n SUBGRID = 1,\n FLEX = 2,\n AD = 3,\n SCROLL_SNAP = 4,\n CONTAINER = 5,\n SLOT = 6,\n TOP_LAYER = 7,\n REVEAL = 8,\n MaxValue = 9,\n}\n\nexport const enum AnimationsPlaybackRate {\n Percent100 = 0,\n Percent25 = 1,\n Percent10 = 2,\n Other = 3,\n MaxValue = 4,\n}\n\nexport const enum AnimationPointDragType {\n // Animation is dragged as a whole in the Animations panel.\n AnimationDrag = 0,\n // A keyframe point inside animation timeline is dragged.\n KeyframeMove = 1,\n // Start point of the animation inside animation timeline is dragged.\n StartEndpointMove = 2,\n // Finish point of the animation inside animation timeline is dragged.\n FinishEndpointMove = 3,\n Other = 4,\n MaxValue = 5,\n}\n"]} \ No newline at end of file +{"version":3,"file":"UserMetrics.js","sourceRoot":"","sources":["../../../../../../front_end/core/host/UserMetrics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAC,6BAA6B,EAAC,MAAM,4BAA4B,CAAC;AAGzE,MAAM,OAAO,WAAW;IACtB,wBAAwB,CAAU;IAClC,qBAAqB,CAAU;IAC/B,gBAAgB,CAAS;IACzB;QACE,IAAI,CAAC,wBAAwB,GAAG,KAAK,CAAC;QACtC,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC;QACnC,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC;IAC7B,CAAC;IAED,4BAA4B,CAAC,4BAA0D;QACrF,IAAI,4BAA4B,iDAAyC,EAAE;YACzE,OAAO;SACR;QACD,6BAA6B,CAAC,yBAAyB,iGACD,4BAA4B,gDACxC,CAAC;IAC7C,CAAC;IAED,gCAAgC,CAAC,gCAAkE;QACjG,IAAI,gCAAgC,qDAA6C,EAAE;YACjF,OAAO;SACR;QACD,6BAA6B,CAAC,yBAAyB,yGACG,gCAAgC,oDAC5C,CAAC;IACjD,CAAC;IAED,UAAU,CAAC,SAAiB,EAAE,WAAqB;QACjD,MAAM,IAAI,GAAG,UAAU,CAAC,SAAoC,CAAC,IAAI,CAAC,CAAC;QACnE,6BAA6B,CAAC,yBAAyB,6DAAiC,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;QACnH,6BAA6B,CAAC,uBAAuB,CAAC,sBAAsB,GAAG,SAAS,CAAC,CAAC;QAC1F,8FAA8F;QAC9F,IAAI,CAAC,WAAW,EAAE;YAChB,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAC;SACtC;IACH,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,SAAiB;QAC3B,MAAM,IAAI,GAAG,UAAU,CAAC,SAAoC,CAAC,IAAI,CAAC,CAAC;QACnE,6BAA6B,CAAC,yBAAyB,+DAAkC,IAAI,EAA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IACT,oCAAS,CAAA;IACT,oCAAS,CAAA;IACT,oCAAS,CAAA;IACT,8CAAc,CAAA;IACd,oCAAS,CAAA;IACT,oCAAS,CAAA;IACT,oCAAS,CAAA;IACT,oCAAS,CAAA;IACT,oCAAS,CAAA;IACT,oCAAS,CAAA;IACT,oCAAS,CAAA;IACT,oCAAS,CAAA;IACT,oCAAS,CAAA;IACT,oCAAS,CAAA;IACT,oCAAS,CAAA;IACT,oCAAS,CAAA;IACT,0CAAY,CAAA;IACZ,0CAAY,CAAA;IACZ,oCAAS,CAAA;IACT,gDAAa,CAAA;AACf,CAAC,EApFW,QAAQ,KAAR,QAAQ,QAoFnB;AAsGD,MAAM,CAAN,IAAY,oBAQX;AARD,WAAY,oBAAoB;IAC9B,+EAAgB,CAAA;IAChB,uEAAc,CAAA;IACd,+EAAkB,CAAA;IAClB,yFAAuB,CAAA;IACvB,iEAAW,CAAA;IACX,qGAA6B,CAAA;IAC7B,uEAAY,CAAA;AACd,CAAC,EARW,oBAAoB,KAApB,oBAAoB,QAQ/B","sourcesContent":["/*\n * Copyright (C) 2011 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport {InspectorFrontendHostInstance} from './InspectorFrontendHost.js';\nimport {EnumeratedHistogram} from './InspectorFrontendHostAPI.js';\n\nexport class UserMetrics {\n #panelChangedSinceLaunch: boolean;\n #firedLaunchHistogram: boolean;\n #launchPanelName: string;\n constructor() {\n this.#panelChangedSinceLaunch = false;\n this.#firedLaunchHistogram = false;\n this.#launchPanelName = '';\n }\n\n breakpointWithConditionAdded(breakpointWithConditionAdded: BreakpointWithConditionAdded): void {\n if (breakpointWithConditionAdded >= BreakpointWithConditionAdded.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.BreakpointWithConditionAdded, breakpointWithConditionAdded,\n BreakpointWithConditionAdded.MaxValue);\n }\n\n breakpointEditDialogRevealedFrom(breakpointEditDialogRevealedFrom: BreakpointEditDialogRevealedFrom): void {\n if (breakpointEditDialogRevealedFrom >= BreakpointEditDialogRevealedFrom.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.BreakpointEditDialogRevealedFrom, breakpointEditDialogRevealedFrom,\n BreakpointEditDialogRevealedFrom.MaxValue);\n }\n\n panelShown(panelName: string, isLaunching?: boolean): void {\n const code = PanelCodes[panelName as keyof typeof PanelCodes] || 0;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.PanelShown, code, PanelCodes.MaxValue);\n InspectorFrontendHostInstance.recordUserMetricsAction('DevTools_PanelShown_' + panelName);\n // Store that the user has changed the panel so we know launch histograms should not be fired.\n if (!isLaunching) {\n this.#panelChangedSinceLaunch = true;\n }\n }\n\n /**\n * Fired when a panel is closed (regardless if it exists in the main panel or the drawer)\n */\n panelClosed(panelName: string): void {\n const code = PanelCodes[panelName as keyof typeof PanelCodes] || 0;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.PanelClosed, code, PanelCodes.MaxValue);\n // Store that the user has changed the panel so we know launch histograms should not be fired.\n this.#panelChangedSinceLaunch = true;\n }\n\n panelShownInLocation(panelName: string, location: 'main'|'drawer'): void {\n const panelWithLocationName = `${panelName}-${location}`;\n const panelWithLocation = PanelWithLocation[panelWithLocationName as keyof typeof PanelWithLocation] || 0;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.PanelShownInLocation,\n panelWithLocation,\n PanelWithLocation.MaxValue,\n );\n }\n\n elementsSidebarTabShown(sidebarPaneName: string): void {\n const code = ElementsSidebarTabCodes[sidebarPaneName as keyof typeof ElementsSidebarTabCodes] || 0;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ElementsSidebarTabShown, code, ElementsSidebarTabCodes.MaxValue);\n }\n\n sourcesSidebarTabShown(sidebarPaneName: string): void {\n const code = SourcesSidebarTabCodes[sidebarPaneName as keyof typeof SourcesSidebarTabCodes] || 0;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SourcesSidebarTabShown, code, SourcesSidebarTabCodes.MaxValue);\n }\n\n settingsPanelShown(settingsViewId: string): void {\n this.panelShown('settings-' + settingsViewId);\n }\n\n sourcesPanelFileDebugged(mediaType?: string): void {\n const code = (mediaType && MediaTypes[mediaType as keyof typeof MediaTypes]) || MediaTypes.Unknown;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SourcesPanelFileDebugged, code, MediaTypes.MaxValue);\n }\n\n sourcesPanelFileOpened(mediaType?: string): void {\n const code = (mediaType && MediaTypes[mediaType as keyof typeof MediaTypes]) || MediaTypes.Unknown;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SourcesPanelFileOpened, code, MediaTypes.MaxValue);\n }\n\n networkPanelResponsePreviewOpened(mediaType: string): void {\n const code = (mediaType && MediaTypes[mediaType as keyof typeof MediaTypes]) || MediaTypes.Unknown;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.NetworkPanelResponsePreviewOpened, code, MediaTypes.MaxValue);\n }\n\n actionTaken(action: Action): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.ActionTaken, action, Action.MaxValue);\n }\n\n panelLoaded(panelName: string, histogramName: string): void {\n if (this.#firedLaunchHistogram || panelName !== this.#launchPanelName) {\n return;\n }\n\n this.#firedLaunchHistogram = true;\n // Use rAF and window.setTimeout to ensure the marker is fired after layout and rendering.\n // This will give the most accurate representation of the tool being ready for a user.\n requestAnimationFrame(() => {\n window.setTimeout(() => {\n // Mark the load time so that we can pinpoint it more easily in a trace.\n performance.mark(histogramName);\n // If the user has switched panel before we finished loading, ignore the histogram,\n // since the launch timings will have been affected and are no longer valid.\n if (this.#panelChangedSinceLaunch) {\n return;\n }\n // This fires the event for the appropriate launch histogram.\n // The duration is measured as the time elapsed since the time origin of the document.\n InspectorFrontendHostInstance.recordPerformanceHistogram(histogramName, performance.now());\n }, 0);\n });\n }\n\n setLaunchPanel(panelName: string|null): void {\n this.#launchPanelName = (panelName as string);\n }\n\n performanceTraceLoad(measure: PerformanceMeasure): void {\n InspectorFrontendHostInstance.recordPerformanceHistogram('DevTools.TraceLoad', measure.duration);\n }\n\n keybindSetSettingChanged(keybindSet: string): void {\n const value = KeybindSetSettings[keybindSet as keyof typeof KeybindSetSettings] || 0;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.KeybindSetSettingChanged, value, KeybindSetSettings.MaxValue);\n }\n\n keyboardShortcutFired(actionId: string): void {\n const action =\n KeyboardShortcutAction[actionId as keyof typeof KeyboardShortcutAction] || KeyboardShortcutAction.OtherShortcut;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.KeyboardShortcutFired, action, KeyboardShortcutAction.MaxValue);\n }\n\n issuesPanelOpenedFrom(issueOpener: IssueOpener): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.IssuesPanelOpenedFrom, issueOpener, IssueOpener.MaxValue);\n }\n\n issuesPanelIssueExpanded(issueExpandedCategory: string|undefined): void {\n if (issueExpandedCategory === undefined) {\n return;\n }\n\n const issueExpanded = IssueExpanded[issueExpandedCategory as keyof typeof IssueExpanded];\n\n if (issueExpanded === undefined) {\n return;\n }\n\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.IssuesPanelIssueExpanded, issueExpanded, IssueExpanded.MaxValue);\n }\n\n issuesPanelResourceOpened(issueCategory: string, type: string): void {\n const key = issueCategory + type;\n const value = IssueResourceOpened[key as keyof typeof IssueResourceOpened];\n\n if (value === undefined) {\n return;\n }\n\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.IssuesPanelResourceOpened, value, IssueResourceOpened.MaxValue);\n }\n\n issueCreated(code: string): void {\n const issueCreated = IssueCreated[code as keyof typeof IssueCreated];\n if (issueCreated === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.IssueCreated, issueCreated, IssueCreated.MaxValue);\n }\n\n experimentEnabledAtLaunch(experimentId: string): void {\n const experiment = DevtoolsExperiments[experimentId as keyof typeof DevtoolsExperiments];\n if (experiment === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ExperimentEnabledAtLaunch, experiment, DevtoolsExperiments.MaxValue);\n }\n\n experimentDisabledAtLaunch(experimentId: string): void {\n const experiment = DevtoolsExperiments[experimentId as keyof typeof DevtoolsExperiments];\n if (experiment === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ExperimentDisabledAtLaunch, experiment, DevtoolsExperiments.MaxValue);\n }\n\n experimentChanged(experimentId: string, isEnabled: boolean): void {\n const experiment = DevtoolsExperiments[experimentId as keyof typeof DevtoolsExperiments];\n if (experiment === undefined) {\n return;\n }\n const actionName = isEnabled ? EnumeratedHistogram.ExperimentEnabled : EnumeratedHistogram.ExperimentDisabled;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(actionName, experiment, DevtoolsExperiments.MaxValue);\n }\n\n developerResourceLoaded(developerResourceLoaded: DeveloperResourceLoaded): void {\n if (developerResourceLoaded >= DeveloperResourceLoaded.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.DeveloperResourceLoaded, developerResourceLoaded, DeveloperResourceLoaded.MaxValue);\n }\n\n developerResourceScheme(developerResourceScheme: DeveloperResourceScheme): void {\n if (developerResourceScheme >= DeveloperResourceScheme.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.DeveloperResourceScheme, developerResourceScheme, DeveloperResourceScheme.MaxValue);\n }\n\n inlineScriptParsed(inlineScriptType: VMInlineScriptType): void {\n if (inlineScriptType >= VMInlineScriptType.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.InlineScriptParsed, inlineScriptType, VMInlineScriptType.MaxValue);\n }\n\n vmInlineScriptContentShown(inlineScriptType: VMInlineScriptType): void {\n if (inlineScriptType >= VMInlineScriptType.MaxValue) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.VMInlineScriptTypeShown, inlineScriptType, VMInlineScriptType.MaxValue);\n }\n\n language(language: Intl.UnicodeBCP47LocaleIdentifier): void {\n const languageCode = Language[language as keyof typeof Language];\n if (languageCode === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.Language, languageCode, Language.MaxValue);\n }\n\n syncSetting(devtoolsSyncSettingEnabled: boolean): void {\n InspectorFrontendHostInstance.getSyncInformation(syncInfo => {\n let settingValue = SyncSetting.ChromeSyncDisabled;\n if (syncInfo.isSyncActive && !syncInfo.arePreferencesSynced) {\n settingValue = SyncSetting.ChromeSyncSettingsDisabled;\n } else if (syncInfo.isSyncActive && syncInfo.arePreferencesSynced) {\n settingValue = devtoolsSyncSettingEnabled ? SyncSetting.DevToolsSyncSettingEnabled :\n SyncSetting.DevToolsSyncSettingDisabled;\n }\n\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SyncSetting, settingValue, SyncSetting.MaxValue);\n });\n }\n\n recordingAssertion(value: RecordingAssertion): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingAssertion, value, RecordingAssertion.MaxValue);\n }\n\n recordingToggled(value: RecordingToggled): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingToggled, value, RecordingToggled.MaxValue);\n }\n\n recordingReplayFinished(value: RecordingReplayFinished): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingReplayFinished, value, RecordingReplayFinished.MaxValue);\n }\n\n recordingReplaySpeed(value: RecordingReplaySpeed): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingReplaySpeed, value, RecordingReplaySpeed.MaxValue);\n }\n\n recordingReplayStarted(value: RecordingReplayStarted): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingReplayStarted, value, RecordingReplayStarted.MaxValue);\n }\n\n recordingEdited(value: RecordingEdited): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingEdited, value, RecordingEdited.MaxValue);\n }\n\n recordingExported(value: RecordingExported): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingExported, value, RecordingExported.MaxValue);\n }\n\n recordingCodeToggled(value: RecordingCodeToggled): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingCodeToggled, value, RecordingCodeToggled.MaxValue);\n }\n\n recordingCopiedToClipboard(value: RecordingCopiedToClipboard): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingCopiedToClipboard, value, RecordingCopiedToClipboard.MaxValue);\n }\n\n styleTextCopied(value: StyleTextCopied): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.StyleTextCopied, value, StyleTextCopied.MaxValue);\n }\n\n manifestSectionSelected(sectionTitle: string): void {\n const code =\n ManifestSectionCodes[sectionTitle as keyof typeof ManifestSectionCodes] || ManifestSectionCodes.OtherSection;\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ManifestSectionSelected, code, ManifestSectionCodes.MaxValue);\n }\n\n cssHintShown(type: CSSHintType): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.CSSHintShown, type, CSSHintType.MaxValue);\n }\n\n lighthouseModeRun(type: LighthouseModeRun): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LighthouseModeRun, type, LighthouseModeRun.MaxValue);\n }\n\n lighthouseCategoryUsed(type: LighthouseCategoryUsed): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LighthouseCategoryUsed, type, LighthouseCategoryUsed.MaxValue);\n }\n\n colorConvertedFrom(type: ColorConvertedFrom): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ColorConvertedFrom, type, ColorConvertedFrom.MaxValue);\n }\n\n colorPickerOpenedFrom(type: ColorPickerOpenedFrom): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ColorPickerOpenedFrom, type, ColorPickerOpenedFrom.MaxValue);\n }\n\n cssPropertyDocumentation(type: CSSPropertyDocumentation): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.CSSPropertyDocumentation, type, CSSPropertyDocumentation.MaxValue);\n }\n\n swatchActivated(swatch: SwatchType): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SwatchActivated, swatch, SwatchType.MaxValue);\n }\n\n badgeActivated(badge: BadgeType): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.BadgeActivated, badge, BadgeType.MaxValue);\n }\n\n breakpointsRestoredFromStorage(count: number): void {\n const countBucket = this.#breakpointCountToBucket(count);\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.BreakpointsRestoredFromStorageCount, countBucket,\n BreakpointsRestoredFromStorageCount.MaxValue);\n }\n\n animationPlaybackRateChanged(playbackRate: AnimationsPlaybackRate): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.AnimationPlaybackRateChanged, playbackRate, AnimationsPlaybackRate.MaxValue);\n }\n\n animationPointDragged(dragType: AnimationPointDragType): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.AnimationPointDragged, dragType, AnimationPointDragType.MaxValue);\n }\n\n #breakpointCountToBucket(count: number): BreakpointsRestoredFromStorageCount {\n if (count < 100) {\n return BreakpointsRestoredFromStorageCount.LessThan100;\n }\n if (count < 300) {\n return BreakpointsRestoredFromStorageCount.LessThan300;\n }\n if (count < 1000) {\n return BreakpointsRestoredFromStorageCount.LessThan1000;\n }\n if (count < 3000) {\n return BreakpointsRestoredFromStorageCount.LessThan3000;\n }\n if (count < 10000) {\n return BreakpointsRestoredFromStorageCount.LessThan10000;\n }\n if (count < 30000) {\n return BreakpointsRestoredFromStorageCount.LessThan30000;\n }\n if (count < 100000) {\n return BreakpointsRestoredFromStorageCount.LessThan100000;\n }\n if (count < 300000) {\n return BreakpointsRestoredFromStorageCount.LessThan300000;\n }\n if (count < 1000000) {\n return BreakpointsRestoredFromStorageCount.LessThan1000000;\n }\n return BreakpointsRestoredFromStorageCount.Above1000000;\n }\n\n workspacesPopulated(wallClockTimeInMilliseconds: number): void {\n InspectorFrontendHostInstance.recordPerformanceHistogram(\n 'DevTools.Workspaces.PopulateWallClocktime', wallClockTimeInMilliseconds);\n }\n\n visualLoggingProcessingDone(timeInMilliseconds: number): void {\n InspectorFrontendHostInstance.recordPerformanceHistogram(\n 'DevTools.VisualLogging.ProcessingTime', timeInMilliseconds);\n }\n\n legacyResourceTypeFilterNumberOfSelectedChanged(itemCount: number): void {\n const boundItemCount = Math.max(Math.min(itemCount, ResourceType.MaxValue - 1), 1);\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LegacyResourceTypeFilterNumberOfSelectedChanged, boundItemCount, ResourceType.MaxValue);\n }\n\n legacyResourceTypeFilterItemSelected(resourceTypeName: string): void {\n const resourceType = ResourceType[resourceTypeName as keyof typeof ResourceType];\n if (resourceType === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LegacyResourceTypeFilterItemSelected, resourceType, ResourceType.MaxValue);\n }\n\n resourceTypeFilterNumberOfSelectedChanged(itemCount: number): void {\n const boundItemCount = Math.max(Math.min(itemCount, ResourceType.MaxValue - 1), 1);\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ResourceTypeFilterNumberOfSelectedChanged, boundItemCount, ResourceType.MaxValue);\n }\n\n resourceTypeFilterItemSelected(resourceTypeName: string): void {\n const resourceType = ResourceType[resourceTypeName as keyof typeof ResourceType];\n if (resourceType === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ResourceTypeFilterItemSelected, resourceType, ResourceType.MaxValue);\n }\n\n networkPanelMoreFiltersNumberOfSelectedChanged(itemCount: number): void {\n const boundItemCount = Math.max(Math.min(itemCount, NetworkPanelMoreFilters.MaxValue), 0);\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.NetworkPanelMoreFiltersNumberOfSelectedChanged, boundItemCount,\n NetworkPanelMoreFilters.MaxValue);\n }\n\n networkPanelMoreFiltersItemSelected(filterName: string): void {\n const filter = NetworkPanelMoreFilters[filterName as keyof typeof NetworkPanelMoreFilters];\n if (filter === undefined) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.NetworkPanelMoreFiltersItemSelected, filter, NetworkPanelMoreFilters.MaxValue);\n }\n}\n\n/**\n * The numeric enum values are not necessarily continuous! It is possible that\n * values have been removed, which results in gaps in the sequence of values.\n * When adding a new value:\n * 1. Add an entry to the bottom of the enum before 'MaxValue'.\n * 2. Set the value of the new entry to the current value of 'MaxValue'.\n * 2. Increment the value of 'MaxValue' by 1.\n * When removing a value which is no longer needed:\n * 1. Delete the line with the unneeded value\n * 2. Do not update any 'MaxValue' or any other value.\n */\n\n// Codes below are used to collect UMA histograms in the Chromium port.\n// Do not change the values below, additional actions are needed on the Chromium side\n// in order to add more codes.\nexport enum Action {\n WindowDocked = 1,\n WindowUndocked = 2,\n ScriptsBreakpointSet = 3,\n TimelineStarted = 4,\n ProfilesCPUProfileTaken = 5,\n ProfilesHeapProfileTaken = 6,\n ConsoleEvaluated = 8,\n FileSavedInWorkspace = 9,\n DeviceModeEnabled = 10,\n AnimationsPlaybackRateChanged = 11,\n RevisionApplied = 12,\n FileSystemDirectoryContentReceived = 13,\n StyleRuleEdited = 14,\n CommandEvaluatedInConsolePanel = 15,\n DOMPropertiesExpanded = 16,\n ResizedViewInResponsiveMode = 17,\n TimelinePageReloadStarted = 18,\n ConnectToNodeJSFromFrontend = 19,\n ConnectToNodeJSDirectly = 20,\n CpuThrottlingEnabled = 21,\n CpuProfileNodeFocused = 22,\n CpuProfileNodeExcluded = 23,\n SelectFileFromFilePicker = 24,\n SelectCommandFromCommandMenu = 25,\n ChangeInspectedNodeInElementsPanel = 26,\n StyleRuleCopied = 27,\n CoverageStarted = 28,\n LighthouseStarted = 29,\n LighthouseFinished = 30,\n ShowedThirdPartyBadges = 31,\n LighthouseViewTrace = 32,\n FilmStripStartedRecording = 33,\n CoverageReportFiltered = 34,\n CoverageStartedPerBlock = 35,\n 'SettingsOpenedFromGear-deprecated' = 36,\n 'SettingsOpenedFromMenu-deprecated' = 37,\n 'SettingsOpenedFromCommandMenu-deprecated' = 38,\n TabMovedToDrawer = 39,\n TabMovedToMainPanel = 40,\n CaptureCssOverviewClicked = 41,\n VirtualAuthenticatorEnvironmentEnabled = 42,\n SourceOrderViewActivated = 43,\n UserShortcutAdded = 44,\n ShortcutRemoved = 45,\n ShortcutModified = 46,\n CustomPropertyLinkClicked = 47,\n CustomPropertyEdited = 48,\n ServiceWorkerNetworkRequestClicked = 49,\n ServiceWorkerNetworkRequestClosedQuickly = 50,\n NetworkPanelServiceWorkerRespondWith = 51,\n NetworkPanelCopyValue = 52,\n ConsoleSidebarOpened = 53,\n PerfPanelTraceImported = 54,\n PerfPanelTraceExported = 55,\n StackFrameRestarted = 56,\n CaptureTestProtocolClicked = 57,\n BreakpointRemovedFromRemoveButton = 58,\n BreakpointGroupExpandedStateChanged = 59,\n HeaderOverrideFileCreated = 60,\n HeaderOverrideEnableEditingClicked = 61,\n HeaderOverrideHeaderAdded = 62,\n HeaderOverrideHeaderEdited = 63,\n HeaderOverrideHeaderRemoved = 64,\n HeaderOverrideHeadersFileEdited = 65,\n PersistenceNetworkOverridesEnabled = 66,\n PersistenceNetworkOverridesDisabled = 67,\n BreakpointRemovedFromContextMenu = 68,\n BreakpointsInFileRemovedFromRemoveButton = 69,\n BreakpointsInFileRemovedFromContextMenu = 70,\n BreakpointsInFileCheckboxToggled = 71,\n BreakpointsInFileEnabledDisabledFromContextMenu = 72,\n BreakpointConditionEditedFromSidebar = 73,\n WorkspaceTabAddFolder = 74,\n WorkspaceTabRemoveFolder = 75,\n OverrideTabAddFolder = 76,\n OverrideTabRemoveFolder = 77,\n WorkspaceSourceSelected = 78,\n OverridesSourceSelected = 79,\n StyleSheetInitiatorLinkClicked = 80,\n BreakpointRemovedFromGutterContextMenu = 81,\n BreakpointRemovedFromGutterToggle = 82,\n StylePropertyInsideKeyframeEdited = 83,\n OverrideContentFromSourcesContextMenu = 84,\n OverrideContentFromNetworkContextMenu = 85,\n OverrideScript = 86,\n OverrideStyleSheet = 87,\n OverrideDocument = 88,\n OverrideFetchXHR = 89,\n OverrideImage = 90,\n OverrideFont = 91,\n OverrideContentContextMenuSetup = 92,\n OverrideContentContextMenuAbandonSetup = 93,\n OverrideContentContextMenuActivateDisabled = 94,\n OverrideContentContextMenuOpenExistingFile = 95,\n OverrideContentContextMenuSaveNewFile = 96,\n ShowAllOverridesFromSourcesContextMenu = 97,\n ShowAllOverridesFromNetworkContextMenu = 98,\n AnimationGroupsCleared = 99,\n AnimationsPaused = 100,\n AnimationsResumed = 101,\n AnimatedNodeDescriptionClicked = 102,\n AnimationGroupScrubbed = 103,\n AnimationGroupReplayed = 104,\n OverrideTabDeleteFolderContextMenu = 105,\n WorkspaceDropFolder = 107,\n WorkspaceSelectFolder = 108,\n OverrideContentContextMenuSourceMappedWarning = 109,\n OverrideContentContextMenuRedirectToDeployed = 110,\n NewStyleRuleAdded = 111,\n TraceExpanded = 112,\n InsightConsoleMessageShown = 113,\n InsightRequestedViaContextMenu = 114,\n InsightRequestedViaHoverButton = 115,\n InsightRatedPositive = 117,\n InsightRatedNegative = 118,\n InsightClosed = 119,\n InsightErrored = 120,\n InsightHoverButtonShown = 121,\n SelfXssWarningConsoleMessageShown = 122,\n SelfXssWarningDialogShown = 123,\n SelfXssAllowPastingInConsole = 124,\n SelfXssAllowPastingInDialog = 125,\n ToggleEmulateFocusedPageFromStylesPaneOn = 126,\n ToggleEmulateFocusedPageFromStylesPaneOff = 127,\n ToggleEmulateFocusedPageFromRenderingTab = 128,\n ToggleEmulateFocusedPageFromCommandMenu = 129,\n InsightGenerated = 130,\n InsightErroredApi = 131,\n InsightErroredMarkdown = 132,\n ToggleShowWebVitals = 133,\n InsightErroredPermissionDenied = 134,\n InsightErroredCannotSend = 135,\n InsightErroredRequestFailed = 136,\n InsightErroredCannotParseChunk = 137,\n InsightErroredUnknownChunk = 138,\n InsightErroredOther = 139,\n AutofillReceived = 140,\n AutofillReceivedAndTabAutoOpened = 141,\n MaxValue = 142,\n}\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum PanelCodes {\n elements = 1,\n resources = 2,\n network = 3,\n sources = 4,\n timeline = 5,\n 'heap-profiler' = 6,\n console = 8,\n layers = 9,\n 'console-view' = 10,\n 'animations' = 11,\n 'network.config' = 12,\n 'rendering' = 13,\n 'sensors' = 14,\n 'sources.search' = 15,\n security = 16,\n 'js-profiler' = 17,\n lighthouse = 18,\n 'coverage' = 19,\n 'protocol-monitor' = 20,\n 'remote-devices' = 21,\n 'web-audio' = 22,\n 'changes.changes' = 23,\n 'performance.monitor' = 24,\n 'release-note' = 25,\n 'live-heap-profile' = 26,\n 'sources.quick' = 27,\n 'network.blocked-urls' = 28,\n 'settings-preferences' = 29,\n 'settings-workspace' = 30,\n 'settings-experiments' = 31,\n 'settings-blackbox' = 32,\n 'settings-devices' = 33,\n 'settings-throttling-conditions' = 34,\n 'settings-emulation-locations' = 35,\n 'settings-shortcuts' = 36,\n 'issues-pane' = 37,\n 'settings-keybinds' = 38,\n 'cssoverview' = 39,\n 'chrome-recorder' = 40,\n 'trust-tokens' = 41,\n 'reporting-api' = 42,\n 'interest-groups' = 43,\n 'back-forward-cache' = 44,\n 'service-worker-cache' = 45,\n 'background-service-background-fetch' = 46,\n 'background-service-background-sync' = 47,\n 'background-service-push-messaging' = 48,\n 'background-service-notifications' = 49,\n 'background-service-payment-handler' = 50,\n 'background-service-periodic-background-sync' = 51,\n 'service-workers' = 52,\n 'app-manifest' = 53,\n 'storage' = 54,\n 'cookies' = 55,\n 'frame-details' = 56,\n 'frame-resource' = 57,\n 'frame-window' = 58,\n 'frame-worker' = 59,\n 'dom-storage' = 60,\n 'indexed-db' = 61,\n 'web-sql' = 62,\n 'performance-insights' = 63,\n 'preloading' = 64,\n 'bounce-tracking-mitigations' = 65,\n 'developer-resources' = 66,\n 'autofill-view' = 67,\n MaxValue = 68,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum PanelWithLocation {\n 'elements-main' = 1,\n 'elements-drawer' = 2,\n 'resources-main' = 3,\n 'resources-drawer' = 4,\n 'network-main' = 5,\n 'network-drawer' = 6,\n 'sources-main' = 7,\n 'sources-drawer' = 8,\n 'timeline-main' = 9,\n 'timeline-drawer' = 10,\n 'heap_profiler-main' = 11,\n 'heap_profiler-drawer' = 12,\n 'console-main' = 13,\n 'console-drawer' = 14,\n 'layers-main' = 15,\n 'layers-drawer' = 16,\n 'console-view-main' = 17,\n 'console-view-drawer' = 18,\n 'animations-main' = 19,\n 'animations-drawer' = 20,\n 'network.config-main' = 21,\n 'network.config-drawer' = 22,\n 'rendering-main' = 23,\n 'rendering-drawer' = 24,\n 'sensors-main' = 25,\n 'sensors-drawer' = 26,\n 'sources.search-main' = 27,\n 'sources.search-drawer' = 28,\n 'security-main' = 29,\n 'security-drawer' = 30,\n 'js_profiler-main' = 31,\n 'js_profiler-drawer' = 32,\n 'lighthouse-main' = 33,\n 'lighthouse-drawer' = 34,\n 'coverage-main' = 35,\n 'coverage-drawer' = 36,\n 'protocol-monitor-main' = 37,\n 'protocol-monitor-drawer' = 38,\n 'remote-devices-main' = 39,\n 'remote-devices-drawer' = 40,\n 'web-audio-main' = 41,\n 'web-audio-drawer' = 42,\n 'changes.changes-main' = 43,\n 'changes.changes-drawer' = 44,\n 'performance.monitor-main' = 45,\n 'performance.monitor-drawer' = 46,\n 'release-note-main' = 47,\n 'release-note-drawer' = 48,\n 'live_heap_profile-main' = 49,\n 'live_heap_profile-drawer' = 50,\n 'sources.quick-main' = 51,\n 'sources.quick-drawer' = 52,\n 'network.blocked-urls-main' = 53,\n 'network.blocked-urls-drawer' = 54,\n 'settings-preferences-main' = 55,\n 'settings-preferences-drawer' = 56,\n 'settings-workspace-main' = 57,\n 'settings-workspace-drawer' = 58,\n 'settings-experiments-main' = 59,\n 'settings-experiments-drawer' = 60,\n 'settings-blackbox-main' = 61,\n 'settings-blackbox-drawer' = 62,\n 'settings-devices-main' = 63,\n 'settings-devices-drawer' = 64,\n 'settings-throttling-conditions-main' = 65,\n 'settings-throttling-conditions-drawer' = 66,\n 'settings-emulation-locations-main' = 67,\n 'settings-emulation-locations-drawer' = 68,\n 'settings-shortcuts-main' = 69,\n 'settings-shortcuts-drawer' = 70,\n 'issues-pane-main' = 71,\n 'issues-pane-drawer' = 72,\n 'settings-keybinds-main' = 73,\n 'settings-keybinds-drawer' = 74,\n 'cssoverview-main' = 75,\n 'cssoverview-drawer' = 76,\n 'chrome_recorder-main' = 77,\n 'chrome_recorder-drawer' = 78,\n 'trust_tokens-main' = 79,\n 'trust_tokens-drawer' = 80,\n 'reporting_api-main' = 81,\n 'reporting_api-drawer' = 82,\n 'interest_groups-main' = 83,\n 'interest_groups-drawer' = 84,\n 'back_forward_cache-main' = 85,\n 'back_forward_cache-drawer' = 86,\n 'service_worker_cache-main' = 87,\n 'service_worker_cache-drawer' = 88,\n 'background_service_backgroundFetch-main' = 89,\n 'background_service_backgroundFetch-drawer' = 90,\n 'background_service_backgroundSync-main' = 91,\n 'background_service_backgroundSync-drawer' = 92,\n 'background_service_pushMessaging-main' = 93,\n 'background_service_pushMessaging-drawer' = 94,\n 'background_service_notifications-main' = 95,\n 'background_service_notifications-drawer' = 96,\n 'background_service_paymentHandler-main' = 97,\n 'background_service_paymentHandler-drawer' = 98,\n 'background_service_periodicBackgroundSync-main' = 99,\n 'background_service_periodicBackgroundSync-drawer' = 100,\n 'service_workers-main' = 101,\n 'service_workers-drawer' = 102,\n 'app_manifest-main' = 103,\n 'app_manifest-drawer' = 104,\n 'storage-main' = 105,\n 'storage-drawer' = 106,\n 'cookies-main' = 107,\n 'cookies-drawer' = 108,\n 'frame_details-main' = 109,\n 'frame_details-drawer' = 110,\n 'frame_resource-main' = 111,\n 'frame_resource-drawer' = 112,\n 'frame_window-main' = 113,\n 'frame_window-drawer' = 114,\n 'frame_worker-main' = 115,\n 'frame_worker-drawer' = 116,\n 'dom_storage-main' = 117,\n 'dom_storage-drawer' = 118,\n 'indexed_db-main' = 119,\n 'indexed_db-drawer' = 120,\n 'web_sql-main' = 121,\n 'web_sql-drawer' = 122,\n 'performance_insights-main' = 123,\n 'performance_insights-drawer' = 124,\n 'preloading-main' = 125,\n 'preloading-drawer' = 126,\n 'bounce_tracking_mitigations-main' = 127,\n 'bounce_tracking_mitigations-drawer' = 128,\n 'developer-resources-main' = 129,\n 'developer-resources-drawer' = 130,\n 'autofill-view-main' = 131,\n 'autofill-view-drawer' = 132,\n MaxValue = 133,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum ElementsSidebarTabCodes {\n 'OtherSidebarPane' = 0,\n 'styles' = 1,\n 'computed' = 2,\n 'elements.layout' = 3,\n 'elements.event-listeners' = 4,\n 'elements.dom-breakpoints' = 5,\n 'elements.dom-properties' = 6,\n 'accessibility.view' = 7,\n MaxValue = 8,\n}\n\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum SourcesSidebarTabCodes {\n 'OtherSidebarPane' = 0,\n 'navigator-network' = 1,\n 'navigator-files' = 2,\n 'navigator-overrides' = 3,\n 'navigator-content-scripts' = 4,\n 'navigator-snippets' = 5,\n MaxValue = 6,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum MediaTypes {\n Unknown = 0,\n 'text/css' = 2,\n 'text/html' = 3,\n 'application/xml' = 4,\n 'application/wasm' = 5,\n 'application/manifest+json' = 6,\n 'application/x-aspx' = 7,\n 'application/jsp' = 8,\n 'text/x-c++src' = 9,\n 'text/x-coffeescript' = 10,\n 'application/vnd.dart' = 11,\n 'text/typescript' = 12,\n 'text/typescript-jsx' = 13,\n 'application/json' = 14,\n 'text/x-csharp' = 15,\n 'text/x-java' = 16,\n 'text/x-less' = 17,\n 'application/x-httpd-php' = 18,\n 'text/x-python' = 19,\n 'text/x-sh' = 20,\n 'text/x-gss' = 21,\n 'text/x-sass' = 22,\n 'text/x-scss' = 23,\n 'text/markdown' = 24,\n 'text/x-clojure' = 25,\n 'text/jsx' = 26,\n 'text/x-go' = 27,\n 'text/x-kotlin' = 28,\n 'text/x-scala' = 29,\n 'text/x.svelte' = 30,\n 'text/javascript+plain' = 31,\n 'text/javascript+minified' = 32,\n 'text/javascript+sourcemapped' = 33,\n 'text/x.angular' = 34,\n 'text/x.vue' = 35,\n MaxValue = 36,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum KeybindSetSettings {\n 'devToolsDefault' = 0,\n 'vsCode' = 1,\n MaxValue = 2,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum KeyboardShortcutAction {\n OtherShortcut = 0,\n 'quick-open.show-command-menu' = 1,\n 'console.clear' = 2,\n 'console.toggle' = 3,\n 'debugger.step' = 4,\n 'debugger.step-into' = 5,\n 'debugger.step-out' = 6,\n 'debugger.step-over' = 7,\n 'debugger.toggle-breakpoint' = 8,\n 'debugger.toggle-breakpoint-enabled' = 9,\n 'debugger.toggle-pause' = 10,\n 'elements.edit-as-html' = 11,\n 'elements.hide-element' = 12,\n 'elements.redo' = 13,\n 'elements.toggle-element-search' = 14,\n 'elements.undo' = 15,\n 'main.search-in-panel.find' = 16,\n 'main.toggle-drawer' = 17,\n 'network.hide-request-details' = 18,\n 'network.search' = 19,\n 'network.toggle-recording' = 20,\n 'quick-open.show' = 21,\n 'settings.show' = 22,\n 'sources.search' = 23,\n 'background-service.toggle-recording' = 24,\n 'components.collect-garbage' = 25,\n 'console.clear.history' = 26,\n 'console.create-pin' = 27,\n 'coverage.start-with-reload' = 28,\n 'coverage.toggle-recording' = 29,\n 'debugger.breakpoint-input-window' = 30,\n 'debugger.evaluate-selection' = 31,\n 'debugger.next-call-frame' = 32,\n 'debugger.previous-call-frame' = 33,\n 'debugger.run-snippet' = 34,\n 'debugger.toggle-breakpoints-active' = 35,\n 'elements.capture-area-screenshot' = 36,\n 'emulation.capture-full-height-screenshot' = 37,\n 'emulation.capture-node-screenshot' = 38,\n 'emulation.capture-screenshot' = 39,\n 'emulation.show-sensors' = 40,\n 'emulation.toggle-device-mode' = 41,\n 'help.release-notes' = 42,\n 'help.report-issue' = 43,\n 'input.start-replaying' = 44,\n 'input.toggle-pause' = 45,\n 'input.toggle-recording' = 46,\n 'inspector-main.focus-debuggee' = 47,\n 'inspector-main.hard-reload' = 48,\n 'inspector-main.reload' = 49,\n 'live-heap-profile.start-with-reload' = 50,\n 'live-heap-profile.toggle-recording' = 51,\n 'main.debug-reload' = 52,\n 'main.next-tab' = 53,\n 'main.previous-tab' = 54,\n 'main.search-in-panel.cancel' = 55,\n 'main.search-in-panel.find-next' = 56,\n 'main.search-in-panel.find-previous' = 57,\n 'main.toggle-dock' = 58,\n 'main.zoom-in' = 59,\n 'main.zoom-out' = 60,\n 'main.zoom-reset' = 61,\n 'network-conditions.network-low-end-mobile' = 62,\n 'network-conditions.network-mid-tier-mobile' = 63,\n 'network-conditions.network-offline' = 64,\n 'network-conditions.network-online' = 65,\n 'profiler.heap-toggle-recording' = 66,\n 'profiler.js-toggle-recording' = 67,\n 'resources.clear' = 68,\n 'settings.documentation' = 69,\n 'settings.shortcuts' = 70,\n 'sources.add-folder-to-workspace' = 71,\n 'sources.add-to-watch' = 72,\n 'sources.close-all' = 73,\n 'sources.close-editor-tab' = 74,\n 'sources.create-snippet' = 75,\n 'sources.go-to-line' = 76,\n 'sources.go-to-member' = 77,\n 'sources.jump-to-next-location' = 78,\n 'sources.jump-to-previous-location' = 79,\n 'sources.rename' = 80,\n 'sources.save' = 81,\n 'sources.save-all' = 82,\n 'sources.switch-file' = 83,\n 'timeline.jump-to-next-frame' = 84,\n 'timeline.jump-to-previous-frame' = 85,\n 'timeline.load-from-file' = 86,\n 'timeline.next-recording' = 87,\n 'timeline.previous-recording' = 88,\n 'timeline.record-reload' = 89,\n 'timeline.save-to-file' = 90,\n 'timeline.show-history' = 91,\n 'timeline.toggle-recording' = 92,\n 'sources.increment-css' = 93,\n 'sources.increment-css-by-ten' = 94,\n 'sources.decrement-css' = 95,\n 'sources.decrement-css-by-ten' = 96,\n 'layers.reset-view' = 97,\n 'layers.pan-mode' = 98,\n 'layers.rotate-mode' = 99,\n 'layers.zoom-in' = 100,\n 'layers.zoom-out' = 101,\n 'layers.up' = 102,\n 'layers.down' = 103,\n 'layers.left' = 104,\n 'layers.right' = 105,\n 'help.report-translation-issue' = 106,\n 'rendering.toggle-prefers-color-scheme' = 107,\n 'chrome-recorder.start-recording' = 108,\n 'chrome-recorder.replay-recording' = 109,\n 'chrome-recorder.toggle-code-view' = 110,\n 'chrome-recorder.copy-recording-or-step' = 111,\n 'changes.revert' = 112,\n 'changes.copy' = 113,\n 'elements.new-style-rule' = 114,\n 'elements.refresh-event-listeners' = 115,\n 'coverage.clear' = 116,\n 'coverage.export' = 117,\n MaxValue = 118,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport const enum IssueOpener {\n ConsoleInfoBar = 0,\n LearnMoreLinkCOEP = 1,\n StatusBarIssuesCounter = 2,\n HamburgerMenu = 3,\n Adorner = 4,\n CommandMenu = 5,\n MaxValue = 6,\n}\n\n/**\n * This list should contain the currently active Devtools Experiments,\n * gaps are expected.\n */\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum DevtoolsExperiments {\n 'apply-custom-stylesheet' = 0,\n 'capture-node-creation-stacks' = 1,\n 'live-heap-profile' = 11,\n 'protocol-monitor' = 13,\n 'sampling-heap-profiler-timeline' = 17,\n 'show-option-tp-expose-internals-in-heap-snapshot' = 18,\n 'timeline-invalidation-tracking' = 26,\n 'timeline-show-all-events' = 27,\n 'timeline-v8-runtime-call-stats' = 28,\n 'apca' = 39,\n 'font-editor' = 41,\n 'full-accessibility-tree' = 42,\n 'ignore-list-js-frames-on-timeline' = 43,\n 'contrast-issues' = 44,\n 'experimental-cookie-features' = 45,\n 'styles-pane-css-changes' = 55,\n 'evaluate-expressions-with-source-maps' = 58,\n 'instrumentation-breakpoints' = 61,\n 'authored-deployed-grouping' = 63,\n 'important-dom-properties' = 64,\n 'just-my-code' = 65,\n 'timeline-as-console-profile-result-panel' = 67,\n 'preloading-status-panel' = 68,\n 'outermost-target-selector' = 71,\n 'js-profiler-temporarily-enable' = 72,\n 'highlight-errors-elements-panel' = 73,\n 'set-all-breakpoints-eagerly' = 74,\n 'use-source-map-scopes' = 76,\n 'storage-buckets-tree' = 77,\n 'network-panel-filter-bar-redesign' = 79,\n 'autofill-view' = 82,\n 'sources-frame-indentation-markers-temporarily-disable' = 83,\n 'heap-snapshot-treat-backing-store-as-containing-object' = 84,\n 'css-type-component-length-deprecate' = 85,\n\n // Increment this when new experiments are added.\n 'MaxValue' = 86,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport const enum BreakpointWithConditionAdded {\n Logpoint = 0,\n ConditionalBreakpoint = 1,\n MaxValue = 2,\n}\n\nexport const enum BreakpointEditDialogRevealedFrom {\n BreakpointSidebarContextMenu = 0,\n BreakpointSidebarEditButton = 1,\n BreakpointMarkerContextMenu = 2,\n LineGutterContextMenu = 3,\n KeyboardShortcut = 4,\n Linkifier = 5,\n MouseClick = 6,\n MaxValue = 7,\n}\n\nexport const enum ColorConvertedFrom {\n ColorSwatch = 0,\n ColorPicker = 1,\n MaxValue = 2,\n}\n\nexport const enum ColorPickerOpenedFrom {\n SourcesPanel = 0,\n StylesPane = 1,\n MaxValue = 2,\n}\n\nexport const enum CSSPropertyDocumentation {\n Shown = 0,\n ToggledOn = 1,\n ToggledOff = 2,\n MaxValue = 3,\n}\n\nexport const enum BreakpointsRestoredFromStorageCount {\n LessThan100 = 0,\n LessThan300 = 1,\n LessThan1000 = 2,\n LessThan3000 = 3,\n LessThan10000 = 4,\n LessThan30000 = 5,\n LessThan100000 = 6,\n LessThan300000 = 7,\n LessThan1000000 = 8,\n Above1000000 = 9,\n MaxValue = 10,\n}\n\n// Update DevToolsIssuesPanelIssueExpanded from tools/metrics/histograms/enums.xml if new enum is added.\nexport enum IssueExpanded {\n CrossOriginEmbedderPolicy = 0,\n MixedContent = 1,\n SameSiteCookie = 2,\n HeavyAd = 3,\n ContentSecurityPolicy = 4,\n Other = 5,\n Generic = 6,\n ThirdPartyPhaseoutCookie = 7,\n GenericCookie = 8,\n MaxValue = 9,\n}\n\nexport enum IssueResourceOpened {\n CrossOriginEmbedderPolicyRequest = 0,\n CrossOriginEmbedderPolicyElement = 1,\n MixedContentRequest = 2,\n SameSiteCookieCookie = 3,\n SameSiteCookieRequest = 4,\n HeavyAdElement = 5,\n ContentSecurityPolicyDirective = 6,\n ContentSecurityPolicyElement = 7,\n MaxValue = 13,\n}\n\n/**\n * This list should contain the currently active issue types,\n * gaps are expected.\n */\nexport enum IssueCreated {\n MixedContentIssue = 0,\n 'ContentSecurityPolicyIssue::kInlineViolation' = 1,\n 'ContentSecurityPolicyIssue::kEvalViolation' = 2,\n 'ContentSecurityPolicyIssue::kURLViolation' = 3,\n 'ContentSecurityPolicyIssue::kTrustedTypesSinkViolation' = 4,\n 'ContentSecurityPolicyIssue::kTrustedTypesPolicyViolation' = 5,\n 'HeavyAdIssue::NetworkTotalLimit' = 6,\n 'HeavyAdIssue::CpuTotalLimit' = 7,\n 'HeavyAdIssue::CpuPeakLimit' = 8,\n 'CrossOriginEmbedderPolicyIssue::CoepFrameResourceNeedsCoepHeader' = 9,\n 'CrossOriginEmbedderPolicyIssue::CoopSandboxedIFrameCannotNavigateToCoopPage' = 10,\n 'CrossOriginEmbedderPolicyIssue::CorpNotSameOrigin' = 11,\n 'CrossOriginEmbedderPolicyIssue::CorpNotSameOriginAfterDefaultedToSameOriginByCoep' = 12,\n 'CrossOriginEmbedderPolicyIssue::CorpNotSameSite' = 13,\n 'CookieIssue::ExcludeSameSiteNoneInsecure::ReadCookie' = 14,\n 'CookieIssue::ExcludeSameSiteNoneInsecure::SetCookie' = 15,\n 'CookieIssue::WarnSameSiteNoneInsecure::ReadCookie' = 16,\n 'CookieIssue::WarnSameSiteNoneInsecure::SetCookie' = 17,\n 'CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Secure' = 18,\n 'CookieIssue::WarnSameSiteStrictLaxDowngradeStrict::Insecure' = 19,\n 'CookieIssue::WarnCrossDowngrade::ReadCookie::Secure' = 20,\n 'CookieIssue::WarnCrossDowngrade::ReadCookie::Insecure' = 21,\n 'CookieIssue::WarnCrossDowngrade::SetCookie::Secure' = 22,\n 'CookieIssue::WarnCrossDowngrade::SetCookie::Insecure' = 23,\n 'CookieIssue::ExcludeNavigationContextDowngrade::Secure' = 24,\n 'CookieIssue::ExcludeNavigationContextDowngrade::Insecure' = 25,\n 'CookieIssue::ExcludeContextDowngrade::ReadCookie::Secure' = 26,\n 'CookieIssue::ExcludeContextDowngrade::ReadCookie::Insecure' = 27,\n 'CookieIssue::ExcludeContextDowngrade::SetCookie::Secure' = 28,\n 'CookieIssue::ExcludeContextDowngrade::SetCookie::Insecure' = 29,\n 'CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::ReadCookie' = 30,\n 'CookieIssue::ExcludeSameSiteUnspecifiedTreatedAsLax::SetCookie' = 31,\n 'CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::ReadCookie' = 32,\n 'CookieIssue::WarnSameSiteUnspecifiedLaxAllowUnsafe::SetCookie' = 33,\n 'CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::ReadCookie' = 34,\n 'CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie' = 35,\n 'SharedArrayBufferIssue::TransferIssue' = 36,\n 'SharedArrayBufferIssue::CreationIssue' = 37,\n LowTextContrastIssue = 41,\n 'CorsIssue::InsecurePrivateNetwork' = 42,\n 'CorsIssue::InvalidHeaders' = 44,\n 'CorsIssue::WildcardOriginWithCredentials' = 45,\n 'CorsIssue::PreflightResponseInvalid' = 46,\n 'CorsIssue::OriginMismatch' = 47,\n 'CorsIssue::AllowCredentialsRequired' = 48,\n 'CorsIssue::MethodDisallowedByPreflightResponse' = 49,\n 'CorsIssue::HeaderDisallowedByPreflightResponse' = 50,\n 'CorsIssue::RedirectContainsCredentials' = 51,\n 'CorsIssue::DisallowedByMode' = 52,\n 'CorsIssue::CorsDisabledScheme' = 53,\n 'CorsIssue::PreflightMissingAllowExternal' = 54,\n 'CorsIssue::PreflightInvalidAllowExternal' = 55,\n 'CorsIssue::NoCorsRedirectModeNotFollow' = 57,\n 'QuirksModeIssue::QuirksMode' = 58,\n 'QuirksModeIssue::LimitedQuirksMode' = 59,\n DeprecationIssue = 60,\n 'ClientHintIssue::MetaTagAllowListInvalidOrigin' = 61,\n 'ClientHintIssue::MetaTagModifiedHTML' = 62,\n 'CorsIssue::PreflightAllowPrivateNetworkError' = 63,\n 'GenericIssue::CrossOriginPortalPostMessageError' = 64,\n 'GenericIssue::FormLabelForNameError' = 65,\n 'GenericIssue::FormDuplicateIdForInputError' = 66,\n 'GenericIssue::FormInputWithNoLabelError' = 67,\n 'GenericIssue::FormAutocompleteAttributeEmptyError' = 68,\n 'GenericIssue::FormEmptyIdAndNameAttributesForInputError' = 69,\n 'GenericIssue::FormAriaLabelledByToNonExistingId' = 70,\n 'GenericIssue::FormInputAssignedAutocompleteValueToIdOrNameAttributeError' = 71,\n 'GenericIssue::FormLabelHasNeitherForNorNestedInput' = 72,\n 'GenericIssue::FormLabelForMatchesNonExistingIdError' = 73,\n 'GenericIssue::FormHasPasswordFieldWithoutUsernameFieldError' = 74,\n 'GenericIssue::FormInputHasWrongButWellIntendedAutocompleteValueError' = 75,\n 'StylesheetLoadingIssue::LateImportRule' = 76,\n 'StylesheetLoadingIssue::RequestFailed' = 77,\n 'CorsIssue::PreflightMissingPrivateNetworkAccessId' = 78,\n 'CorsIssue::PreflightMissingPrivateNetworkAccessName' = 79,\n 'CorsIssue::PrivateNetworkAccessPermissionUnavailable' = 80,\n 'CorsIssue::PrivateNetworkAccessPermissionDenied' = 81,\n 'CookieIssue::WarnThirdPartyPhaseout::ReadCookie' = 82,\n 'CookieIssue::WarnThirdPartyPhaseout::SetCookie' = 83,\n 'CookieIssue::ExcludeThirdPartyPhaseout::ReadCookie' = 84,\n 'CookieIssue::ExcludeThirdPartyPhaseout::SetCookie' = 85,\n MaxValue = 86,\n}\n\nexport const enum DeveloperResourceLoaded {\n LoadThroughPageViaTarget = 0,\n LoadThroughPageViaFrame = 1,\n LoadThroughPageFailure = 2,\n LoadThroughPageFallback = 3,\n FallbackAfterFailure = 4,\n FallbackPerOverride = 5,\n FallbackPerProtocol = 6,\n FallbackFailure = 7,\n MaxValue = 8,\n}\n\nexport const enum DeveloperResourceScheme {\n SchemeOther = 0,\n SchemeUnknown = 1,\n SchemeHttp = 2,\n SchemeHttps = 3,\n SchemeHttpLocalhost = 4,\n SchemeHttpsLocalhost = 5,\n SchemeData = 6,\n SchemeFile = 7,\n SchemeBlob = 8,\n MaxValue = 9,\n}\n\nexport enum ResourceType {\n /* eslint-disable @typescript-eslint/naming-convention */\n all = 0,\n /* eslint-enable @typescript-eslint/naming-convention */\n Documents = 1,\n Scripts = 2,\n 'Fetch and XHR' = 3,\n Stylesheets = 4,\n Fonts = 5,\n Images = 6,\n Media = 7,\n Manifest = 8,\n WebSockets = 9,\n WebAssembly = 10,\n Other = 11,\n MaxValue = 12,\n}\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum NetworkPanelMoreFilters {\n 'Hide data URLs' = 0,\n 'Hide extension URLs' = 1,\n 'Blocked response cookies' = 2,\n 'Blocked requests' = 3,\n '3rd-party requests' = 4,\n MaxValue = 5,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport const enum VMInlineScriptType {\n MODULE_SCRIPT = 0,\n CLASSIC_SCRIPT = 1,\n MaxValue = 2,\n}\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum Language {\n 'af' = 1,\n 'am' = 2,\n 'ar' = 3,\n 'as' = 4,\n 'az' = 5,\n 'be' = 6,\n 'bg' = 7,\n 'bn' = 8,\n 'bs' = 9,\n 'ca' = 10,\n 'cs' = 11,\n 'cy' = 12,\n 'da' = 13,\n 'de' = 14,\n 'el' = 15,\n 'en-GB' = 16,\n 'en-US' = 17,\n 'es-419' = 18,\n 'es' = 19,\n 'et' = 20,\n 'eu' = 21,\n 'fa' = 22,\n 'fi' = 23,\n 'fil' = 24,\n 'fr-CA' = 25,\n 'fr' = 26,\n 'gl' = 27,\n 'gu' = 28,\n 'he' = 29,\n 'hi' = 30,\n 'hr' = 31,\n 'hu' = 32,\n 'hy' = 33,\n 'id' = 34,\n 'is' = 35,\n 'it' = 36,\n 'ja' = 37,\n 'ka' = 38,\n 'kk' = 39,\n 'km' = 40,\n 'kn' = 41,\n 'ko' = 42,\n 'ky' = 43,\n 'lo' = 44,\n 'lt' = 45,\n 'lv' = 46,\n 'mk' = 47,\n 'ml' = 48,\n 'mn' = 49,\n 'mr' = 50,\n 'ms' = 51,\n 'my' = 52,\n 'ne' = 53,\n 'nl' = 54,\n 'no' = 55,\n 'or' = 56,\n 'pa' = 57,\n 'pl' = 58,\n 'pt-PT' = 59,\n 'pt' = 60,\n 'ro' = 61,\n 'ru' = 62,\n 'si' = 63,\n 'sk' = 64,\n 'sl' = 65,\n 'sq' = 66,\n 'sr-Latn' = 67,\n 'sr' = 68,\n 'sv' = 69,\n 'sw' = 70,\n 'ta' = 71,\n 'te' = 72,\n 'th' = 73,\n 'tr' = 74,\n 'uk' = 75,\n 'ur' = 76,\n 'uz' = 77,\n 'vi' = 78,\n 'zh' = 79,\n 'zh-HK' = 80,\n 'zh-TW' = 81,\n 'zu' = 82,\n MaxValue = 83,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport const enum SyncSetting {\n ChromeSyncDisabled = 1,\n ChromeSyncSettingsDisabled = 2,\n DevToolsSyncSettingDisabled = 3,\n DevToolsSyncSettingEnabled = 4,\n MaxValue = 5,\n}\n\nexport const enum RecordingToggled {\n RecordingStarted = 1,\n RecordingFinished = 2,\n MaxValue = 3,\n}\n\nexport const enum RecordingAssertion {\n AssertionAdded = 1,\n PropertyAssertionEdited = 2,\n AttributeAssertionEdited = 3,\n MaxValue = 4,\n}\n\nexport const enum RecordingReplayFinished {\n Success = 1,\n TimeoutErrorSelectors = 2,\n TimeoutErrorTarget = 3,\n OtherError = 4,\n MaxValue = 5,\n}\n\nexport const enum RecordingReplaySpeed {\n Normal = 1,\n Slow = 2,\n VerySlow = 3,\n ExtremelySlow = 4,\n MaxValue = 5,\n}\n\nexport const enum RecordingReplayStarted {\n ReplayOnly = 1,\n ReplayWithPerformanceTracing = 2,\n ReplayViaExtension = 3,\n MaxValue = 4,\n}\n\nexport const enum RecordingEdited {\n SelectorPickerUsed = 1,\n StepAdded = 2,\n StepRemoved = 3,\n SelectorAdded = 4,\n SelectorRemoved = 5,\n SelectorPartAdded = 6,\n SelectorPartEdited = 7,\n SelectorPartRemoved = 8,\n TypeChanged = 9,\n OtherEditing = 10,\n MaxValue = 11,\n}\n\nexport const enum RecordingExported {\n ToPuppeteer = 1,\n ToJSON = 2,\n ToPuppeteerReplay = 3,\n ToExtension = 4,\n ToLighthouse = 5,\n MaxValue = 6,\n}\n\nexport const enum RecordingCodeToggled {\n CodeShown = 1,\n CodeHidden = 2,\n MaxValue = 3,\n}\n\nexport const enum RecordingCopiedToClipboard {\n CopiedRecordingWithPuppeteer = 1,\n CopiedRecordingWithJSON = 2,\n CopiedRecordingWithReplay = 3,\n CopiedRecordingWithExtension = 4,\n CopiedStepWithPuppeteer = 5,\n CopiedStepWithJSON = 6,\n CopiedStepWithReplay = 7,\n CopiedStepWithExtension = 8,\n MaxValue = 9,\n}\n\nexport const enum StyleTextCopied {\n DeclarationViaChangedLine = 1,\n AllChangesViaStylesPane = 2,\n DeclarationViaContextMenu = 3,\n PropertyViaContextMenu = 4,\n ValueViaContextMenu = 5,\n DeclarationAsJSViaContextMenu = 6,\n RuleViaContextMenu = 7,\n AllDeclarationsViaContextMenu = 8,\n AllDeclarationsAsJSViaContextMenu = 9,\n SelectorViaContextMenu = 10,\n MaxValue = 11,\n}\n\nexport enum ManifestSectionCodes {\n OtherSection = 0,\n 'Identity' = 1,\n 'Presentation' = 2,\n 'Protocol Handlers' = 3,\n 'Icons' = 4,\n 'Window Controls Overlay' = 5,\n MaxValue = 6,\n}\n\n/* eslint-enable @typescript-eslint/naming-convention */\n\n// The names here match the CSSRuleValidator names in CSSRuleValidator.ts.\nexport const enum CSSHintType {\n Other = 0,\n AlignContent = 1,\n FlexItem = 2,\n FlexContainer = 3,\n GridContainer = 4,\n GridItem = 5,\n FlexGrid = 6,\n MulticolFlexGrid = 7,\n Padding = 8,\n Position = 9,\n ZIndex = 10,\n Sizing = 11,\n FlexOrGridItem = 12,\n FontVariationSettings = 13,\n MaxValue = 14,\n}\n\nexport const enum LighthouseModeRun {\n Navigation = 0,\n Timespan = 1,\n Snapshot = 2,\n LegacyNavigation = 3,\n MaxValue = 4,\n}\n\nexport const enum LighthouseCategoryUsed {\n Performance = 0,\n Accessibility = 1,\n BestPractices = 2,\n SEO = 3,\n PWA = 4,\n PubAds = 5,\n MaxValue = 6,\n}\n\nexport const enum SwatchType {\n VarLink = 0,\n AnimationNameLink = 1,\n Color = 2,\n AnimationTiming = 3,\n Shadow = 4,\n Grid = 5,\n Flex = 6,\n Angle = 7,\n Length = 8,\n PositionFallbackLink = 9,\n MaxValue = 10,\n}\n\nexport const enum BadgeType {\n GRID = 0,\n SUBGRID = 1,\n FLEX = 2,\n AD = 3,\n SCROLL_SNAP = 4,\n CONTAINER = 5,\n SLOT = 6,\n TOP_LAYER = 7,\n REVEAL = 8,\n MaxValue = 9,\n}\n\nexport const enum AnimationsPlaybackRate {\n Percent100 = 0,\n Percent25 = 1,\n Percent10 = 2,\n Other = 3,\n MaxValue = 4,\n}\n\nexport const enum AnimationPointDragType {\n // Animation is dragged as a whole in the Animations panel.\n AnimationDrag = 0,\n // A keyframe point inside animation timeline is dragged.\n KeyframeMove = 1,\n // Start point of the animation inside animation timeline is dragged.\n StartEndpointMove = 2,\n // Finish point of the animation inside animation timeline is dragged.\n FinishEndpointMove = 3,\n Other = 4,\n MaxValue = 5,\n}\n"]} \ No newline at end of file diff --git a/public/core/host/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/core/host/devtools_entrypoint-bundle-typescript-tsconfig.json index 4c076f674..52662ad77 100644 --- a/public/core/host/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/core/host/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/core/host/host-tsconfig.json b/public/core/host/host-tsconfig.json index d7cde6745..df47ab71b 100644 --- a/public/core/host/host-tsconfig.json +++ b/public/core/host/host-tsconfig.json @@ -38,8 +38,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/core/host/unittests-tsconfig.json b/public/core/host/unittests-tsconfig.json index 81fd42b8d..cf7651deb 100644 --- a/public/core/host/unittests-tsconfig.json +++ b/public/core/host/unittests-tsconfig.json @@ -41,8 +41,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/core/i18n/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/core/i18n/devtools_entrypoint-bundle-typescript-tsconfig.json index 9bb221abd..eab9fecf7 100644 --- a/public/core/i18n/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/core/i18n/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/core/i18n/i18n-tsconfig.json b/public/core/i18n/i18n-tsconfig.json index 48a2f9c57..d5c976174 100644 --- a/public/core/i18n/i18n-tsconfig.json +++ b/public/core/i18n/i18n-tsconfig.json @@ -36,8 +36,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/core/i18n/locales/en-US.json b/public/core/i18n/locales/en-US.json index 5b838e761..e64667d59 100644 --- a/public/core/i18n/locales/en-US.json +++ b/public/core/i18n/locales/en-US.json @@ -1 +1 @@ -{"core/common/ResourceType.ts | cspviolationreport":{"message":"CSPViolationReport"},"core/common/ResourceType.ts | css":{"message":"CSS"},"core/common/ResourceType.ts | doc":{"message":"Doc"},"core/common/ResourceType.ts | document":{"message":"Document"},"core/common/ResourceType.ts | eventsource":{"message":"EventSource"},"core/common/ResourceType.ts | fetch":{"message":"Fetch"},"core/common/ResourceType.ts | fetchAndXHR":{"message":"Fetch and XHR"},"core/common/ResourceType.ts | font":{"message":"Font"},"core/common/ResourceType.ts | image":{"message":"Image"},"core/common/ResourceType.ts | img":{"message":"Img"},"core/common/ResourceType.ts | javascript":{"message":"JavaScript"},"core/common/ResourceType.ts | js":{"message":"JS"},"core/common/ResourceType.ts | manifest":{"message":"Manifest"},"core/common/ResourceType.ts | media":{"message":"Media"},"core/common/ResourceType.ts | other":{"message":"Other"},"core/common/ResourceType.ts | ping":{"message":"Ping"},"core/common/ResourceType.ts | preflight":{"message":"Preflight"},"core/common/ResourceType.ts | script":{"message":"Script"},"core/common/ResourceType.ts | signedexchange":{"message":"SignedExchange"},"core/common/ResourceType.ts | stylesheet":{"message":"Stylesheet"},"core/common/ResourceType.ts | texttrack":{"message":"TextTrack"},"core/common/ResourceType.ts | wasm":{"message":"Wasm"},"core/common/ResourceType.ts | webassembly":{"message":"WebAssembly"},"core/common/ResourceType.ts | webbundle":{"message":"WebBundle"},"core/common/ResourceType.ts | websocket":{"message":"WebSocket"},"core/common/ResourceType.ts | webtransport":{"message":"WebTransport"},"core/common/ResourceType.ts | ws":{"message":"WS"},"core/common/Revealer.ts | applicationPanel":{"message":"Application panel"},"core/common/Revealer.ts | changesDrawer":{"message":"Changes drawer"},"core/common/Revealer.ts | elementsPanel":{"message":"Elements panel"},"core/common/Revealer.ts | issuesView":{"message":"Issues view"},"core/common/Revealer.ts | memoryInspectorPanel":{"message":"Memory inspector panel"},"core/common/Revealer.ts | networkPanel":{"message":"Network panel"},"core/common/Revealer.ts | sourcesPanel":{"message":"Sources panel"},"core/common/Revealer.ts | stylesSidebar":{"message":"styles sidebar"},"core/common/SettingRegistration.ts | adorner":{"message":"Adorner"},"core/common/SettingRegistration.ts | appearance":{"message":"Appearance"},"core/common/SettingRegistration.ts | console":{"message":"Console"},"core/common/SettingRegistration.ts | debugger":{"message":"Debugger"},"core/common/SettingRegistration.ts | elements":{"message":"Elements"},"core/common/SettingRegistration.ts | extension":{"message":"Extension"},"core/common/SettingRegistration.ts | global":{"message":"Global"},"core/common/SettingRegistration.ts | grid":{"message":"Grid"},"core/common/SettingRegistration.ts | memory":{"message":"Memory"},"core/common/SettingRegistration.ts | mobile":{"message":"Mobile"},"core/common/SettingRegistration.ts | network":{"message":"Network"},"core/common/SettingRegistration.ts | performance":{"message":"Performance"},"core/common/SettingRegistration.ts | persistence":{"message":"Persistence"},"core/common/SettingRegistration.ts | rendering":{"message":"Rendering"},"core/common/SettingRegistration.ts | sources":{"message":"Sources"},"core/common/SettingRegistration.ts | sync":{"message":"Sync"},"core/host/InspectorFrontendHost.ts | devtoolsS":{"message":"DevTools - {PH1}"},"core/host/ResourceLoader.ts | cacheError":{"message":"Cache error"},"core/host/ResourceLoader.ts | certificateError":{"message":"Certificate error"},"core/host/ResourceLoader.ts | certificateManagerError":{"message":"Certificate manager error"},"core/host/ResourceLoader.ts | connectionError":{"message":"Connection error"},"core/host/ResourceLoader.ts | decodingDataUrlFailed":{"message":"Decoding Data URL failed"},"core/host/ResourceLoader.ts | dnsResolverError":{"message":"DNS resolver error"},"core/host/ResourceLoader.ts | ftpError":{"message":"FTP error"},"core/host/ResourceLoader.ts | httpError":{"message":"HTTP error"},"core/host/ResourceLoader.ts | httpErrorStatusCodeSS":{"message":"HTTP error: status code {PH1}, {PH2}"},"core/host/ResourceLoader.ts | invalidUrl":{"message":"Invalid URL"},"core/host/ResourceLoader.ts | signedExchangeError":{"message":"Signed Exchange error"},"core/host/ResourceLoader.ts | systemError":{"message":"System error"},"core/host/ResourceLoader.ts | unknownError":{"message":"Unknown error"},"core/i18n/time-utilities.ts | fdays":{"message":"{PH1} days"},"core/i18n/time-utilities.ts | fhrs":{"message":"{PH1} hrs"},"core/i18n/time-utilities.ts | fmin":{"message":"{PH1} min"},"core/i18n/time-utilities.ts | fmms":{"message":"{PH1} μs"},"core/i18n/time-utilities.ts | fms":{"message":"{PH1} ms"},"core/i18n/time-utilities.ts | fs":{"message":"{PH1} s"},"core/sdk/ChildTargetManager.ts | main":{"message":"Main"},"core/sdk/CompilerSourceMappingContentProvider.ts | couldNotLoadContentForSS":{"message":"Could not load content for {PH1} ({PH2})"},"core/sdk/ConsoleModel.ts | bfcacheNavigation":{"message":"Navigation to {PH1} was restored from back/forward cache (see https://web.dev/bfcache/)"},"core/sdk/ConsoleModel.ts | failedToSaveToTempVariable":{"message":"Failed to save to temp variable."},"core/sdk/ConsoleModel.ts | navigatedToS":{"message":"Navigated to {PH1}"},"core/sdk/ConsoleModel.ts | profileSFinished":{"message":"Profile ''{PH1}'' finished."},"core/sdk/ConsoleModel.ts | profileSStarted":{"message":"Profile ''{PH1}'' started."},"core/sdk/CPUProfilerModel.ts | profileD":{"message":"Profile {PH1}"},"core/sdk/CSSStyleSheetHeader.ts | couldNotFindTheOriginalStyle":{"message":"Could not find the original style sheet."},"core/sdk/CSSStyleSheetHeader.ts | thereWasAnErrorRetrievingThe":{"message":"There was an error retrieving the source styles."},"core/sdk/DebuggerModel.ts | block":{"message":"Block"},"core/sdk/DebuggerModel.ts | catchBlock":{"message":"Catch block"},"core/sdk/DebuggerModel.ts | closure":{"message":"Closure"},"core/sdk/DebuggerModel.ts | expression":{"message":"Expression"},"core/sdk/DebuggerModel.ts | global":{"message":"Global"},"core/sdk/DebuggerModel.ts | local":{"message":"Local"},"core/sdk/DebuggerModel.ts | module":{"message":"Module"},"core/sdk/DebuggerModel.ts | script":{"message":"Script"},"core/sdk/DebuggerModel.ts | withBlock":{"message":"With block"},"core/sdk/NetworkManager.ts | fastG":{"message":"Fast 3G"},"core/sdk/NetworkManager.ts | noContentForPreflight":{"message":"No content available for preflight request"},"core/sdk/NetworkManager.ts | noContentForRedirect":{"message":"No content available because this request was redirected"},"core/sdk/NetworkManager.ts | noContentForWebSocket":{"message":"Content for WebSockets is currently not supported"},"core/sdk/NetworkManager.ts | noThrottling":{"message":"No throttling"},"core/sdk/NetworkManager.ts | offline":{"message":"Offline"},"core/sdk/NetworkManager.ts | requestWasBlockedByDevtoolsS":{"message":"Request was blocked by DevTools: \"{PH1}\""},"core/sdk/NetworkManager.ts | sFailedLoadingSS":{"message":"{PH1} failed loading: {PH2} \"{PH3}\"."},"core/sdk/NetworkManager.ts | sFinishedLoadingSS":{"message":"{PH1} finished loading: {PH2} \"{PH3}\"."},"core/sdk/NetworkManager.ts | slowG":{"message":"Slow 3G"},"core/sdk/NetworkRequest.ts | anUnknownErrorWasEncounteredWhenTrying":{"message":"An unknown error was encountered when trying to store this cookie."},"core/sdk/NetworkRequest.ts | binary":{"message":"(binary)"},"core/sdk/NetworkRequest.ts | blockedReasonInvalidDomain":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because its Domain attribute was invalid with regards to the current host url."},"core/sdk/NetworkRequest.ts | blockedReasonInvalidPrefix":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it used the \"__Secure-\" or \"__Host-\" prefix in its name and broke the additional rules applied to cookies with these prefixes as defined in https://tools.ietf.org/html/draft-west-cookie-prefixes-05."},"core/sdk/NetworkRequest.ts | blockedReasonOverwriteSecure":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it was not sent over a secure connection and would have overwritten a cookie with the Secure attribute."},"core/sdk/NetworkRequest.ts | blockedReasonSameSiteNoneInsecure":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the \"SameSite=None\" attribute but did not have the \"Secure\" attribute, which is required in order to use \"SameSite=None\"."},"core/sdk/NetworkRequest.ts | blockedReasonSameSiteStrictLax":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the \"{PH1}\" attribute but came from a cross-site response which was not the response to a top-level navigation."},"core/sdk/NetworkRequest.ts | blockedReasonSameSiteUnspecifiedTreatedAsLax":{"message":"This Set-Cookie header didn't specify a \"SameSite\" attribute and was defaulted to \"SameSite=Lax,\" and was blocked because it came from a cross-site response which was not the response to a top-level navigation. The Set-Cookie had to have been set with \"SameSite=None\" to enable cross-site usage."},"core/sdk/NetworkRequest.ts | blockedReasonSecureOnly":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the \"Secure\" attribute but was not received over a secure connection."},"core/sdk/NetworkRequest.ts | domainMismatch":{"message":"This cookie was blocked because neither did the request URL's domain exactly match the cookie's domain, nor was the request URL's domain a subdomain of the cookie's Domain attribute value."},"core/sdk/NetworkRequest.ts | exemptionReasonCorsOptIn":{"message":"This cookie is allowed by CORS opt-in. Learn more: goo.gle/cors"},"core/sdk/NetworkRequest.ts | exemptionReasonEnterprisePolicy":{"message":"This cookie is allowed by Chrome Enterprise policy. Learn more: goo.gle/ce-3pc"},"core/sdk/NetworkRequest.ts | exemptionReasonStorageAccessAPI":{"message":"This cookie is allowed by the Storage Access API. Learn more: goo.gle/saa"},"core/sdk/NetworkRequest.ts | exemptionReasonTopLevelStorageAccessAPI":{"message":"This cookie is allowed by the top-level Storage Access API. Learn more: goo.gle/saa-top"},"core/sdk/NetworkRequest.ts | exemptionReasonTPCDDeprecationTrial":{"message":"This cookie is allowed by third-party cookie phaseout deprecation trial."},"core/sdk/NetworkRequest.ts | exemptionReasonTPCDHeuristics":{"message":"This cookie is allowed by third-party cookie phaseout heuristics. Learn more: goo.gle/hbe"},"core/sdk/NetworkRequest.ts | exemptionReasonTPCDMetadata":{"message":"This cookie is allowed by a third-party cookie deprecation trial grace period. Learn more: goo.gle/ps-dt."},"core/sdk/NetworkRequest.ts | exemptionReasonUserSetting":{"message":"This cookie is allowed by user preference."},"core/sdk/NetworkRequest.ts | nameValuePairExceedsMaxSize":{"message":"This cookie was blocked because it was too large. The combined size of the name and value must be less than or equal to 4096 characters."},"core/sdk/NetworkRequest.ts | notOnPath":{"message":"This cookie was blocked because its path was not an exact match for or a superdirectory of the request url's path."},"core/sdk/NetworkRequest.ts | samePartyFromCrossPartyContext":{"message":"This cookie was blocked because it had the \"SameParty\" attribute but the request was cross-party. The request was considered cross-party because the domain of the resource's URL and the domains of the resource's enclosing frames/documents are neither owners nor members in the same First-Party Set."},"core/sdk/NetworkRequest.ts | sameSiteLax":{"message":"This cookie was blocked because it had the \"SameSite=Lax\" attribute and the request was made from a different site and was not initiated by a top-level navigation."},"core/sdk/NetworkRequest.ts | sameSiteNoneInsecure":{"message":"This cookie was blocked because it had the \"SameSite=None\" attribute but was not marked \"Secure\". Cookies without SameSite restrictions must be marked \"Secure\" and sent over a secure connection."},"core/sdk/NetworkRequest.ts | sameSiteStrict":{"message":"This cookie was blocked because it had the \"SameSite=Strict\" attribute and the request was made from a different site. This includes top-level navigation requests initiated by other sites."},"core/sdk/NetworkRequest.ts | sameSiteUnspecifiedTreatedAsLax":{"message":"This cookie didn't specify a \"SameSite\" attribute when it was stored and was defaulted to \"SameSite=Lax,\" and was blocked because the request was made from a different site and was not initiated by a top-level navigation. The cookie had to have been set with \"SameSite=None\" to enable cross-site usage."},"core/sdk/NetworkRequest.ts | schemefulSameSiteLax":{"message":"This cookie was blocked because it had the \"SameSite=Lax\" attribute but the request was cross-site and was not initiated by a top-level navigation. This request is considered cross-site because the URL has a different scheme than the current site."},"core/sdk/NetworkRequest.ts | schemefulSameSiteStrict":{"message":"This cookie was blocked because it had the \"SameSite=Strict\" attribute but the request was cross-site. This includes top-level navigation requests initiated by other sites. This request is considered cross-site because the URL has a different scheme than the current site."},"core/sdk/NetworkRequest.ts | schemefulSameSiteUnspecifiedTreatedAsLax":{"message":"This cookie didn't specify a \"SameSite\" attribute when it was stored, was defaulted to \"SameSite=Lax\", and was blocked because the request was cross-site and was not initiated by a top-level navigation. This request is considered cross-site because the URL has a different scheme than the current site."},"core/sdk/NetworkRequest.ts | secureOnly":{"message":"This cookie was blocked because it had the \"Secure\" attribute and the connection was not secure."},"core/sdk/NetworkRequest.ts | setcookieHeaderIsIgnoredIn":{"message":"Set-Cookie header is ignored in response from url: {PH1}. The combined size of the name and value must be less than or equal to 4096 characters."},"core/sdk/NetworkRequest.ts | theSchemeOfThisConnectionIsNot":{"message":"The scheme of this connection is not allowed to store cookies."},"core/sdk/NetworkRequest.ts | thirdPartyPhaseout":{"message":"This cookie was blocked due to third-party cookie phaseout. Learn more in the Issues tab."},"core/sdk/NetworkRequest.ts | thisSetcookieDidntSpecifyASamesite":{"message":"This Set-Cookie header didn't specify a \"SameSite\" attribute, was defaulted to \"SameSite=Lax\", and was blocked because it came from a cross-site response which was not the response to a top-level navigation. This response is considered cross-site because the URL has a different scheme than the current site."},"core/sdk/NetworkRequest.ts | thisSetcookieHadADisallowedCharacter":{"message":"This Set-Cookie header contained a disallowed character (a forbidden ASCII control character, or the tab character if it appears in the middle of the cookie name, value, an attribute name, or an attribute value)."},"core/sdk/NetworkRequest.ts | thisSetcookieHadInvalidSyntax":{"message":"This Set-Cookie header had invalid syntax."},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedBecauseItHadTheSameparty":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the \"SameParty\" attribute but the request was cross-party. The request was considered cross-party because the domain of the resource's URL and the domains of the resource's enclosing frames/documents are neither owners nor members in the same First-Party Set."},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedBecauseItHadTheSamepartyAttribute":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the \"SameParty\" attribute but also had other conflicting attributes. Chrome requires cookies that use the \"SameParty\" attribute to also have the \"Secure\" attribute, and to not be restricted to \"SameSite=Strict\"."},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedBecauseItHadTheSamesiteStrictLax":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because it had the \"{PH1}\" attribute but came from a cross-site response which was not the response to a top-level navigation. This response is considered cross-site because the URL has a different scheme than the current site."},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedBecauseTheNameValuePairExceedsMaxSize":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked because the cookie was too large. The combined size of the name and value must be less than or equal to 4096 characters."},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedDueThirdPartyPhaseout":{"message":"Setting this cookie was blocked due to third-party cookie phaseout. Learn more in the Issues tab."},"core/sdk/NetworkRequest.ts | thisSetcookieWasBlockedDueToUser":{"message":"This attempt to set a cookie via a Set-Cookie header was blocked due to user preferences."},"core/sdk/NetworkRequest.ts | unknownError":{"message":"An unknown error was encountered when trying to send this cookie."},"core/sdk/NetworkRequest.ts | userPreferences":{"message":"This cookie was blocked due to user preferences."},"core/sdk/OverlayModel.ts | pausedInDebugger":{"message":"Paused in debugger"},"core/sdk/PageResourceLoader.ts | loadCanceledDueToReloadOf":{"message":"Load canceled due to reload of inspected page"},"core/sdk/Script.ts | scriptRemovedOrDeleted":{"message":"Script removed or deleted."},"core/sdk/Script.ts | unableToFetchScriptSource":{"message":"Unable to fetch script source."},"core/sdk/sdk-meta.ts | achromatopsia":{"message":"Achromatopsia (no color)"},"core/sdk/sdk-meta.ts | blurredVision":{"message":"Blurred vision"},"core/sdk/sdk-meta.ts | captureAsyncStackTraces":{"message":"Capture async stack traces"},"core/sdk/sdk-meta.ts | customFormatters":{"message":"Custom formatters"},"core/sdk/sdk-meta.ts | deuteranopia":{"message":"Deuteranopia (no green)"},"core/sdk/sdk-meta.ts | disableAsyncStackTraces":{"message":"Disable async stack traces"},"core/sdk/sdk-meta.ts | disableAvifFormat":{"message":"Disable AVIF format"},"core/sdk/sdk-meta.ts | disableCache":{"message":"Disable cache (while DevTools is open)"},"core/sdk/sdk-meta.ts | disableJavascript":{"message":"Disable JavaScript"},"core/sdk/sdk-meta.ts | disableLocalFonts":{"message":"Disable local fonts"},"core/sdk/sdk-meta.ts | disableNetworkRequestBlocking":{"message":"Disable network request blocking"},"core/sdk/sdk-meta.ts | disableWebpFormat":{"message":"Disable WebP format"},"core/sdk/sdk-meta.ts | doNotCaptureAsyncStackTraces":{"message":"Do not capture async stack traces"},"core/sdk/sdk-meta.ts | doNotEmulateAFocusedPage":{"message":"Do not emulate a focused page"},"core/sdk/sdk-meta.ts | doNotEmulateAnyVisionDeficiency":{"message":"Do not emulate any vision deficiency"},"core/sdk/sdk-meta.ts | doNotEmulateCss":{"message":"Do not emulate CSS {PH1}"},"core/sdk/sdk-meta.ts | doNotEmulateCssMediaType":{"message":"Do not emulate CSS media type"},"core/sdk/sdk-meta.ts | doNotExtendGridLines":{"message":"Do not extend grid lines"},"core/sdk/sdk-meta.ts | doNotHighlightAdFrames":{"message":"Do not highlight ad frames"},"core/sdk/sdk-meta.ts | doNotPauseOnExceptions":{"message":"Do not pause on exceptions"},"core/sdk/sdk-meta.ts | doNotPreserveLogUponNavigation":{"message":"Do not preserve log upon navigation"},"core/sdk/sdk-meta.ts | doNotShowGridNamedAreas":{"message":"Do not show grid named areas"},"core/sdk/sdk-meta.ts | doNotShowGridTrackSizes":{"message":"Do not show grid track sizes"},"core/sdk/sdk-meta.ts | doNotShowRulersOnHover":{"message":"Do not show rulers on hover"},"core/sdk/sdk-meta.ts | emulateAchromatopsia":{"message":"Emulate achromatopsia (no color)"},"core/sdk/sdk-meta.ts | emulateAFocusedPage":{"message":"Emulate a focused page"},"core/sdk/sdk-meta.ts | emulateAutoDarkMode":{"message":"Emulate auto dark mode"},"core/sdk/sdk-meta.ts | emulateBlurredVision":{"message":"Emulate blurred vision"},"core/sdk/sdk-meta.ts | emulateCss":{"message":"Emulate CSS {PH1}"},"core/sdk/sdk-meta.ts | emulateCssMediaFeature":{"message":"Emulate CSS media feature {PH1}"},"core/sdk/sdk-meta.ts | emulateCssMediaType":{"message":"Emulate CSS media type"},"core/sdk/sdk-meta.ts | emulateCssPrintMediaType":{"message":"Emulate CSS print media type"},"core/sdk/sdk-meta.ts | emulateCssScreenMediaType":{"message":"Emulate CSS screen media type"},"core/sdk/sdk-meta.ts | emulateDeuteranopia":{"message":"Emulate deuteranopia (no green)"},"core/sdk/sdk-meta.ts | emulateProtanopia":{"message":"Emulate protanopia (no red)"},"core/sdk/sdk-meta.ts | emulateReducedContrast":{"message":"Emulate reduced contrast"},"core/sdk/sdk-meta.ts | emulateTritanopia":{"message":"Emulate tritanopia (no blue)"},"core/sdk/sdk-meta.ts | emulateVisionDeficiencies":{"message":"Emulate vision deficiencies"},"core/sdk/sdk-meta.ts | enableAvifFormat":{"message":"Enable AVIF format"},"core/sdk/sdk-meta.ts | enableCache":{"message":"Enable cache"},"core/sdk/sdk-meta.ts | enableJavascript":{"message":"Enable JavaScript"},"core/sdk/sdk-meta.ts | enableLocalFonts":{"message":"Enable local fonts"},"core/sdk/sdk-meta.ts | enableNetworkRequestBlocking":{"message":"Enable network request blocking"},"core/sdk/sdk-meta.ts | enableRemoteFileLoading":{"message":"Allow DevTools to load resources, such as source maps, from remote file paths. Disabled by default for security reasons."},"core/sdk/sdk-meta.ts | enableWebpFormat":{"message":"Enable WebP format"},"core/sdk/sdk-meta.ts | extendGridLines":{"message":"Extend grid lines"},"core/sdk/sdk-meta.ts | hideCoreWebVitalsOverlay":{"message":"Hide Core Web Vitals overlay"},"core/sdk/sdk-meta.ts | hideFramesPerSecondFpsMeter":{"message":"Hide frames per second (FPS) meter"},"core/sdk/sdk-meta.ts | hideLayerBorders":{"message":"Hide layer borders"},"core/sdk/sdk-meta.ts | hideLayoutShiftRegions":{"message":"Hide layout shift regions"},"core/sdk/sdk-meta.ts | hideLineLabels":{"message":"Hide line labels"},"core/sdk/sdk-meta.ts | hidePaintFlashingRectangles":{"message":"Hide paint flashing rectangles"},"core/sdk/sdk-meta.ts | hideScrollPerformanceBottlenecks":{"message":"Hide scroll performance bottlenecks"},"core/sdk/sdk-meta.ts | highlightAdFrames":{"message":"Highlight ad frames"},"core/sdk/sdk-meta.ts | networkRequestBlocking":{"message":"Network request blocking"},"core/sdk/sdk-meta.ts | noEmulation":{"message":"No emulation"},"core/sdk/sdk-meta.ts | pauseOnExceptions":{"message":"Pause on exceptions"},"core/sdk/sdk-meta.ts | preserveLogUponNavigation":{"message":"Preserve log upon navigation"},"core/sdk/sdk-meta.ts | print":{"message":"print"},"core/sdk/sdk-meta.ts | protanopia":{"message":"Protanopia (no red)"},"core/sdk/sdk-meta.ts | query":{"message":"query"},"core/sdk/sdk-meta.ts | reducedContrast":{"message":"Reduced contrast"},"core/sdk/sdk-meta.ts | screen":{"message":"screen"},"core/sdk/sdk-meta.ts | showAreaNames":{"message":"Show area names"},"core/sdk/sdk-meta.ts | showCoreWebVitalsOverlay":{"message":"Show Core Web Vitals overlay"},"core/sdk/sdk-meta.ts | showFramesPerSecondFpsMeter":{"message":"Show frames per second (FPS) meter"},"core/sdk/sdk-meta.ts | showGridNamedAreas":{"message":"Show grid named areas"},"core/sdk/sdk-meta.ts | showGridTrackSizes":{"message":"Show grid track sizes"},"core/sdk/sdk-meta.ts | showLayerBorders":{"message":"Show layer borders"},"core/sdk/sdk-meta.ts | showLayoutShiftRegions":{"message":"Show layout shift regions"},"core/sdk/sdk-meta.ts | showLineLabels":{"message":"Show line labels"},"core/sdk/sdk-meta.ts | showLineNames":{"message":"Show line names"},"core/sdk/sdk-meta.ts | showLineNumbers":{"message":"Show line numbers"},"core/sdk/sdk-meta.ts | showPaintFlashingRectangles":{"message":"Show paint flashing rectangles"},"core/sdk/sdk-meta.ts | showRulersOnHover":{"message":"Show rulers on hover"},"core/sdk/sdk-meta.ts | showScrollPerformanceBottlenecks":{"message":"Show scroll performance bottlenecks"},"core/sdk/sdk-meta.ts | showTrackSizes":{"message":"Show track sizes"},"core/sdk/sdk-meta.ts | tritanopia":{"message":"Tritanopia (no blue)"},"core/sdk/ServerTiming.ts | deprecatedSyntaxFoundPleaseUse":{"message":"Deprecated syntax found. Please use: ;dur=;desc="},"core/sdk/ServerTiming.ts | duplicateParameterSIgnored":{"message":"Duplicate parameter \"{PH1}\" ignored."},"core/sdk/ServerTiming.ts | extraneousTrailingCharacters":{"message":"Extraneous trailing characters."},"core/sdk/ServerTiming.ts | noValueFoundForParameterS":{"message":"No value found for parameter \"{PH1}\"."},"core/sdk/ServerTiming.ts | unableToParseSValueS":{"message":"Unable to parse \"{PH1}\" value \"{PH2}\"."},"core/sdk/ServerTiming.ts | unrecognizedParameterS":{"message":"Unrecognized parameter \"{PH1}\"."},"core/sdk/ServiceWorkerCacheModel.ts | serviceworkercacheagentError":{"message":"ServiceWorkerCacheAgent error deleting cache entry {PH1} in cache: {PH2}"},"core/sdk/ServiceWorkerManager.ts | activated":{"message":"activated"},"core/sdk/ServiceWorkerManager.ts | activating":{"message":"activating"},"core/sdk/ServiceWorkerManager.ts | installed":{"message":"installed"},"core/sdk/ServiceWorkerManager.ts | installing":{"message":"installing"},"core/sdk/ServiceWorkerManager.ts | new":{"message":"new"},"core/sdk/ServiceWorkerManager.ts | redundant":{"message":"redundant"},"core/sdk/ServiceWorkerManager.ts | running":{"message":"running"},"core/sdk/ServiceWorkerManager.ts | sSS":{"message":"{PH1} #{PH2} ({PH3})"},"core/sdk/ServiceWorkerManager.ts | starting":{"message":"starting"},"core/sdk/ServiceWorkerManager.ts | stopped":{"message":"stopped"},"core/sdk/ServiceWorkerManager.ts | stopping":{"message":"stopping"},"entrypoints/inspector_main/inspector_main-meta.ts | autoOpenDevTools":{"message":"Auto-open DevTools for popups"},"entrypoints/inspector_main/inspector_main-meta.ts | blockAds":{"message":"Block ads on this site"},"entrypoints/inspector_main/inspector_main-meta.ts | colorVisionDeficiency":{"message":"color vision deficiency"},"entrypoints/inspector_main/inspector_main-meta.ts | cssMediaFeature":{"message":"CSS media feature"},"entrypoints/inspector_main/inspector_main-meta.ts | cssMediaType":{"message":"CSS media type"},"entrypoints/inspector_main/inspector_main-meta.ts | disablePaused":{"message":"Disable paused state overlay"},"entrypoints/inspector_main/inspector_main-meta.ts | doNotAutoOpen":{"message":"Do not auto-open DevTools for popups"},"entrypoints/inspector_main/inspector_main-meta.ts | forceAdBlocking":{"message":"Force ad blocking on this site"},"entrypoints/inspector_main/inspector_main-meta.ts | fps":{"message":"fps"},"entrypoints/inspector_main/inspector_main-meta.ts | hardReloadPage":{"message":"Hard reload page"},"entrypoints/inspector_main/inspector_main-meta.ts | layout":{"message":"layout"},"entrypoints/inspector_main/inspector_main-meta.ts | paint":{"message":"paint"},"entrypoints/inspector_main/inspector_main-meta.ts | reloadPage":{"message":"Reload page"},"entrypoints/inspector_main/inspector_main-meta.ts | rendering":{"message":"Rendering"},"entrypoints/inspector_main/inspector_main-meta.ts | showAds":{"message":"Show ads on this site, if allowed"},"entrypoints/inspector_main/inspector_main-meta.ts | showRendering":{"message":"Show Rendering"},"entrypoints/inspector_main/inspector_main-meta.ts | toggleCssPrefersColorSchemeMedia":{"message":"Toggle CSS media feature prefers-color-scheme"},"entrypoints/inspector_main/inspector_main-meta.ts | visionDeficiency":{"message":"vision deficiency"},"entrypoints/inspector_main/InspectorMain.ts | javascriptIsDisabled":{"message":"JavaScript is disabled"},"entrypoints/inspector_main/InspectorMain.ts | main":{"message":"Main"},"entrypoints/inspector_main/InspectorMain.ts | openDedicatedTools":{"message":"Open dedicated DevTools for Node.js"},"entrypoints/inspector_main/InspectorMain.ts | tab":{"message":"Tab"},"entrypoints/inspector_main/OutermostTargetSelector.ts | targetNotSelected":{"message":"Page: Not selected"},"entrypoints/inspector_main/OutermostTargetSelector.ts | targetS":{"message":"Page: {PH1}"},"entrypoints/inspector_main/RenderingOptions.ts | coreWebVitals":{"message":"Core Web Vitals"},"entrypoints/inspector_main/RenderingOptions.ts | disableAvifImageFormat":{"message":"Disable AVIF image format"},"entrypoints/inspector_main/RenderingOptions.ts | disableLocalFonts":{"message":"Disable local fonts"},"entrypoints/inspector_main/RenderingOptions.ts | disablesLocalSourcesInFontface":{"message":"Disables local() sources in @font-face rules. Requires a page reload to apply."},"entrypoints/inspector_main/RenderingOptions.ts | disableWebpImageFormat":{"message":"Disable WebP image format"},"entrypoints/inspector_main/RenderingOptions.ts | emulateAFocusedPage":{"message":"Emulate a focused page"},"entrypoints/inspector_main/RenderingOptions.ts | emulateAutoDarkMode":{"message":"Enable automatic dark mode"},"entrypoints/inspector_main/RenderingOptions.ts | emulatesAFocusedPage":{"message":"Keep page focused. Commonly used for debugging disappearing elements."},"entrypoints/inspector_main/RenderingOptions.ts | emulatesAutoDarkMode":{"message":"Enables automatic dark mode and sets prefers-color-scheme to dark."},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssColorgamutMediaFeature":{"message":"Forces CSS color-gamut media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssForcedColors":{"message":"Forces CSS forced-colors media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPreferscolorschemeMedia":{"message":"Forces CSS prefers-color-scheme media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPreferscontrastMedia":{"message":"Forces CSS prefers-contrast media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPrefersreduceddataMedia":{"message":"Forces CSS prefers-reduced-data media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPrefersreducedmotion":{"message":"Forces CSS prefers-reduced-motion media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesCssPrefersreducedtransparencyMedia":{"message":"Forces CSS prefers-reduced-transparency media feature"},"entrypoints/inspector_main/RenderingOptions.ts | forcesMediaTypeForTestingPrint":{"message":"Forces media type for testing print and screen styles"},"entrypoints/inspector_main/RenderingOptions.ts | forcesVisionDeficiencyEmulation":{"message":"Forces vision deficiency emulation"},"entrypoints/inspector_main/RenderingOptions.ts | frameRenderingStats":{"message":"Frame Rendering Stats"},"entrypoints/inspector_main/RenderingOptions.ts | highlightAdFrames":{"message":"Highlight ad frames"},"entrypoints/inspector_main/RenderingOptions.ts | highlightsAreasOfThePageBlueThat":{"message":"Highlights areas of the page (blue) that were shifted. May not be suitable for people prone to photosensitive epilepsy."},"entrypoints/inspector_main/RenderingOptions.ts | highlightsAreasOfThePageGreen":{"message":"Highlights areas of the page (green) that need to be repainted. May not be suitable for people prone to photosensitive epilepsy."},"entrypoints/inspector_main/RenderingOptions.ts | highlightsElementsTealThatCan":{"message":"Highlights elements (teal) that can slow down scrolling, including touch & wheel event handlers and other main-thread scrolling situations."},"entrypoints/inspector_main/RenderingOptions.ts | highlightsFramesRedDetectedToBe":{"message":"Highlights frames (red) detected to be ads."},"entrypoints/inspector_main/RenderingOptions.ts | layerBorders":{"message":"Layer borders"},"entrypoints/inspector_main/RenderingOptions.ts | layoutShiftRegions":{"message":"Layout Shift Regions"},"entrypoints/inspector_main/RenderingOptions.ts | paintFlashing":{"message":"Paint flashing"},"entrypoints/inspector_main/RenderingOptions.ts | plotsFrameThroughputDropped":{"message":"Plots frame throughput, dropped frames distribution, and GPU memory."},"entrypoints/inspector_main/RenderingOptions.ts | requiresAPageReloadToApplyAnd":{"message":"Requires a page reload to apply and disables caching for image requests."},"entrypoints/inspector_main/RenderingOptions.ts | scrollingPerformanceIssues":{"message":"Scrolling performance issues"},"entrypoints/inspector_main/RenderingOptions.ts | showsAnOverlayWithCoreWebVitals":{"message":"Shows an overlay with Core Web Vitals."},"entrypoints/inspector_main/RenderingOptions.ts | showsLayerBordersOrangeoliveAnd":{"message":"Shows layer borders (orange/olive) and tiles (cyan)."},"entrypoints/js_app/js_app.ts | main":{"message":"Main"},"entrypoints/js_app/js_app.ts | networkTitle":{"message":"Scripts"},"entrypoints/js_app/js_app.ts | showNode":{"message":"Show Scripts"},"entrypoints/main/main-meta.ts | auto":{"message":"auto"},"entrypoints/main/main-meta.ts | bottom":{"message":"Bottom"},"entrypoints/main/main-meta.ts | browserLanguage":{"message":"Browser UI language"},"entrypoints/main/main-meta.ts | cancelSearch":{"message":"Cancel search"},"entrypoints/main/main-meta.ts | darkCapital":{"message":"Dark"},"entrypoints/main/main-meta.ts | darkLower":{"message":"dark"},"entrypoints/main/main-meta.ts | devtoolsDefault":{"message":"DevTools (Default)"},"entrypoints/main/main-meta.ts | dockToBottom":{"message":"Dock to bottom"},"entrypoints/main/main-meta.ts | dockToLeft":{"message":"Dock to left"},"entrypoints/main/main-meta.ts | dockToRight":{"message":"Dock to right"},"entrypoints/main/main-meta.ts | enableCtrlShortcutToSwitchPanels":{"message":"Enable Ctrl + 1-9 shortcut to switch panels"},"entrypoints/main/main-meta.ts | enableShortcutToSwitchPanels":{"message":"Enable ⌘ + 1-9 shortcut to switch panels"},"entrypoints/main/main-meta.ts | enableSync":{"message":"Enable settings sync"},"entrypoints/main/main-meta.ts | findNextResult":{"message":"Find next result"},"entrypoints/main/main-meta.ts | findPreviousResult":{"message":"Find previous result"},"entrypoints/main/main-meta.ts | focusDebuggee":{"message":"Focus page"},"entrypoints/main/main-meta.ts | horizontal":{"message":"horizontal"},"entrypoints/main/main-meta.ts | language":{"message":"Language:"},"entrypoints/main/main-meta.ts | left":{"message":"Left"},"entrypoints/main/main-meta.ts | lightCapital":{"message":"Light"},"entrypoints/main/main-meta.ts | lightLower":{"message":"light"},"entrypoints/main/main-meta.ts | nextPanel":{"message":"Next panel"},"entrypoints/main/main-meta.ts | panelLayout":{"message":"Panel layout:"},"entrypoints/main/main-meta.ts | previousPanel":{"message":"Previous panel"},"entrypoints/main/main-meta.ts | reloadDevtools":{"message":"Reload DevTools"},"entrypoints/main/main-meta.ts | resetZoomLevel":{"message":"Reset zoom level"},"entrypoints/main/main-meta.ts | restoreLastDockPosition":{"message":"Restore last dock position"},"entrypoints/main/main-meta.ts | right":{"message":"Right"},"entrypoints/main/main-meta.ts | searchAsYouTypeCommand":{"message":"Enable search as you type"},"entrypoints/main/main-meta.ts | searchAsYouTypeSetting":{"message":"Search as you type"},"entrypoints/main/main-meta.ts | searchInPanel":{"message":"Search in panel"},"entrypoints/main/main-meta.ts | searchOnEnterCommand":{"message":"Disable search as you type (press Enter to search)"},"entrypoints/main/main-meta.ts | switchToDarkTheme":{"message":"Switch to dark theme"},"entrypoints/main/main-meta.ts | switchToLightTheme":{"message":"Switch to light theme"},"entrypoints/main/main-meta.ts | switchToSystemPreferredColor":{"message":"Switch to system preferred color theme"},"entrypoints/main/main-meta.ts | systemPreference":{"message":"System preference"},"entrypoints/main/main-meta.ts | theme":{"message":"Theme:"},"entrypoints/main/main-meta.ts | toggleDrawer":{"message":"Toggle drawer"},"entrypoints/main/main-meta.ts | undocked":{"message":"Undocked"},"entrypoints/main/main-meta.ts | undockIntoSeparateWindow":{"message":"Undock into separate window"},"entrypoints/main/main-meta.ts | useAutomaticPanelLayout":{"message":"Use automatic panel layout"},"entrypoints/main/main-meta.ts | useHorizontalPanelLayout":{"message":"Use horizontal panel layout"},"entrypoints/main/main-meta.ts | useVerticalPanelLayout":{"message":"Use vertical panel layout"},"entrypoints/main/main-meta.ts | vertical":{"message":"vertical"},"entrypoints/main/main-meta.ts | zoomIn":{"message":"Zoom in"},"entrypoints/main/main-meta.ts | zoomOut":{"message":"Zoom out"},"entrypoints/main/MainImpl.ts | customizeAndControlDevtools":{"message":"Customize and control DevTools"},"entrypoints/main/MainImpl.ts | dockSide":{"message":"Dock side"},"entrypoints/main/MainImpl.ts | dockSideNaviation":{"message":"Use left and right arrow keys to navigate the options"},"entrypoints/main/MainImpl.ts | dockToBottom":{"message":"Dock to bottom"},"entrypoints/main/MainImpl.ts | dockToLeft":{"message":"Dock to left"},"entrypoints/main/MainImpl.ts | dockToRight":{"message":"Dock to right"},"entrypoints/main/MainImpl.ts | focusDebuggee":{"message":"Focus page"},"entrypoints/main/MainImpl.ts | help":{"message":"Help"},"entrypoints/main/MainImpl.ts | hideConsoleDrawer":{"message":"Hide console drawer"},"entrypoints/main/MainImpl.ts | moreTools":{"message":"More tools"},"entrypoints/main/MainImpl.ts | placementOfDevtoolsRelativeToThe":{"message":"Placement of DevTools relative to the page. ({PH1} to restore last position)"},"entrypoints/main/MainImpl.ts | showConsoleDrawer":{"message":"Show console drawer"},"entrypoints/main/MainImpl.ts | undockIntoSeparateWindow":{"message":"Undock into separate window"},"entrypoints/node_app/node_app.ts | connection":{"message":"Connection"},"entrypoints/node_app/node_app.ts | networkTitle":{"message":"Node"},"entrypoints/node_app/node_app.ts | node":{"message":"node"},"entrypoints/node_app/node_app.ts | showConnection":{"message":"Show Connection"},"entrypoints/node_app/node_app.ts | showNode":{"message":"Show Node"},"entrypoints/node_app/NodeConnectionsPanel.ts | addConnection":{"message":"Add connection"},"entrypoints/node_app/NodeConnectionsPanel.ts | networkAddressEgLocalhost":{"message":"Network address (e.g. localhost:9229)"},"entrypoints/node_app/NodeConnectionsPanel.ts | noConnectionsSpecified":{"message":"No connections specified"},"entrypoints/node_app/NodeConnectionsPanel.ts | nodejsDebuggingGuide":{"message":"Node.js debugging guide"},"entrypoints/node_app/NodeConnectionsPanel.ts | specifyNetworkEndpointAnd":{"message":"Specify network endpoint and DevTools will connect to it automatically. Read {PH1} to learn more."},"entrypoints/node_app/NodeMain.ts | main":{"message":"Main"},"entrypoints/node_app/NodeMain.ts | nodejsS":{"message":"Node.js: {PH1}"},"entrypoints/worker_app/WorkerMain.ts | main":{"message":"Main"},"generated/Deprecation.ts | AuthorizationCoveredByWildcard":{"message":"Authorization will not be covered by the wildcard symbol (*) in CORS Access-Control-Allow-Headers handling."},"generated/Deprecation.ts | CanRequestURLHTTPContainingNewline":{"message":"Resource requests whose URLs contained both removed whitespace \\(n|r|t) characters and less-than characters (<) are blocked. Please remove newlines and encode less-than characters from places like element attribute values in order to load these resources."},"generated/Deprecation.ts | ChromeLoadTimesConnectionInfo":{"message":"chrome.loadTimes() is deprecated, instead use standardized API: Navigation Timing 2."},"generated/Deprecation.ts | ChromeLoadTimesFirstPaintAfterLoadTime":{"message":"chrome.loadTimes() is deprecated, instead use standardized API: Paint Timing."},"generated/Deprecation.ts | ChromeLoadTimesWasAlternateProtocolAvailable":{"message":"chrome.loadTimes() is deprecated, instead use standardized API: nextHopProtocol in Navigation Timing 2."},"generated/Deprecation.ts | CookieWithTruncatingChar":{"message":"Cookies containing a \\(0|r|n) character will be rejected instead of truncated."},"generated/Deprecation.ts | CrossOriginAccessBasedOnDocumentDomain":{"message":"Relaxing the same-origin policy by setting document.domain is deprecated, and will be disabled by default. This deprecation warning is for a cross-origin access that was enabled by setting document.domain."},"generated/Deprecation.ts | CrossOriginWindowAlert":{"message":"Triggering window.alert from cross origin iframes has been deprecated and will be removed in the future."},"generated/Deprecation.ts | CrossOriginWindowConfirm":{"message":"Triggering window.confirm from cross origin iframes has been deprecated and will be removed in the future."},"generated/Deprecation.ts | CSSCustomStateDeprecatedSyntax":{"message":":--customstatename is deprecated. Please use the :state(customstatename) syntax instead."},"generated/Deprecation.ts | CSSSelectorInternalMediaControlsOverlayCastButton":{"message":"The disableRemotePlayback attribute should be used in order to disable the default Cast integration instead of using -internal-media-controls-overlay-cast-button selector."},"generated/Deprecation.ts | CSSValueAppearanceNonStandard":{"message":"CSS appearance values inner-spin-button, media-slider, media-sliderthumb, media-volume-slider, media-volume-sliderthumb, push-button, searchfield-cancel-button, slider-horizontal, sliderthumb-horizontal, sliderthumb-vertical, square-button are not standardized and will be removed."},"generated/Deprecation.ts | CSSValueAppearanceSliderVertical":{"message":"CSS appearance value slider-vertical is not standardized and will be removed."},"generated/Deprecation.ts | DataUrlInSvgUse":{"message":"Support for data: URLs in SVGUseElement is deprecated and it will be removed in the future."},"generated/Deprecation.ts | DocumentDomainSettingWithoutOriginAgentClusterHeader":{"message":"Relaxing the same-origin policy by setting document.domain is deprecated, and will be disabled by default. To continue using this feature, please opt-out of origin-keyed agent clusters by sending an Origin-Agent-Cluster: ?0 header along with the HTTP response for the document and frames. See https://developer.chrome.com/blog/immutable-document-domain/ for more details."},"generated/Deprecation.ts | DOMMutationEvents":{"message":"DOM Mutation Events, including DOMSubtreeModified, DOMNodeInserted, DOMNodeRemoved, DOMNodeRemovedFromDocument, DOMNodeInsertedIntoDocument, and DOMCharacterDataModified are deprecated (https://w3c.github.io/uievents/#legacy-event-types) and will be removed. Please use MutationObserver instead."},"generated/Deprecation.ts | GeolocationInsecureOrigin":{"message":"getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details."},"generated/Deprecation.ts | GeolocationInsecureOriginDeprecatedNotRemoved":{"message":"getCurrentPosition() and watchPosition() are deprecated on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details."},"generated/Deprecation.ts | GetUserMediaInsecureOrigin":{"message":"getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details."},"generated/Deprecation.ts | HostCandidateAttributeGetter":{"message":"RTCPeerConnectionIceErrorEvent.hostCandidate is deprecated. Please use RTCPeerConnectionIceErrorEvent.address or RTCPeerConnectionIceErrorEvent.port instead."},"generated/Deprecation.ts | IdentityInCanMakePaymentEvent":{"message":"The merchant origin and arbitrary data from the canmakepayment service worker event are deprecated and will be removed: topOrigin, paymentRequestOrigin, methodData, modifiers."},"generated/Deprecation.ts | InsecurePrivateNetworkSubresourceRequest":{"message":"The website requested a subresource from a network that it could only access because of its users' privileged network position. These requests expose non-public devices and servers to the internet, increasing the risk of a cross-site request forgery (CSRF) attack, and/or information leakage. To mitigate these risks, Chrome deprecates requests to non-public subresources when initiated from non-secure contexts, and will start blocking them."},"generated/Deprecation.ts | InterestGroupDailyUpdateUrl":{"message":"The dailyUpdateUrl field of InterestGroups passed to joinAdInterestGroup() has been renamed to updateUrl, to more accurately reflect its behavior."},"generated/Deprecation.ts | LocalCSSFileExtensionRejected":{"message":"CSS cannot be loaded from file: URLs unless they end in a .css file extension."},"generated/Deprecation.ts | MediaSourceAbortRemove":{"message":"Using SourceBuffer.abort() to abort remove()'s asynchronous range removal is deprecated due to specification change. Support will be removed in the future. You should listen to the updateend event instead. abort() is intended to only abort an asynchronous media append or reset parser state."},"generated/Deprecation.ts | MediaSourceDurationTruncatingBuffered":{"message":"Setting MediaSource.duration below the highest presentation timestamp of any buffered coded frames is deprecated due to specification change. Support for implicit removal of truncated buffered media will be removed in the future. You should instead perform explicit remove(newDuration, oldDuration) on all sourceBuffers, where newDuration < oldDuration."},"generated/Deprecation.ts | NoSysexWebMIDIWithoutPermission":{"message":"Web MIDI will ask a permission to use even if the sysex is not specified in the MIDIOptions."},"generated/Deprecation.ts | NotificationInsecureOrigin":{"message":"The Notification API may no longer be used from insecure origins. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details."},"generated/Deprecation.ts | NotificationPermissionRequestedIframe":{"message":"Permission for the Notification API may no longer be requested from a cross-origin iframe. You should consider requesting permission from a top-level frame or opening a new window instead."},"generated/Deprecation.ts | ObsoleteCreateImageBitmapImageOrientationNone":{"message":"Option imageOrientation: 'none' in createImageBitmap is deprecated. Please use createImageBitmap with option {imageOrientation: 'from-image'} instead."},"generated/Deprecation.ts | ObsoleteWebRtcCipherSuite":{"message":"Your partner is negotiating an obsolete (D)TLS version. Please check with your partner to have this fixed."},"generated/Deprecation.ts | OverflowVisibleOnReplacedElement":{"message":"Specifying overflow: visible on img, video and canvas tags may cause them to produce visual content outside of the element bounds. See https://github.com/WICG/shared-element-transitions/blob/main/debugging_overflow_on_images.md."},"generated/Deprecation.ts | PaymentInstruments":{"message":"paymentManager.instruments is deprecated. Please use just-in-time install for payment handlers instead."},"generated/Deprecation.ts | PaymentRequestCSPViolation":{"message":"Your PaymentRequest call bypassed Content-Security-Policy (CSP) connect-src directive. This bypass is deprecated. Please add the payment method identifier from the PaymentRequest API (in supportedMethods field) to your CSP connect-src directive."},"generated/Deprecation.ts | PersistentQuotaType":{"message":"StorageType.persistent is deprecated. Please use standardized navigator.storage instead."},"generated/Deprecation.ts | PictureSourceSrc":{"message":" with a parent is invalid and therefore ignored. Please use instead."},"generated/Deprecation.ts | PrefixedCancelAnimationFrame":{"message":"webkitCancelAnimationFrame is vendor-specific. Please use the standard cancelAnimationFrame instead."},"generated/Deprecation.ts | PrefixedRequestAnimationFrame":{"message":"webkitRequestAnimationFrame is vendor-specific. Please use the standard requestAnimationFrame instead."},"generated/Deprecation.ts | PrefixedVideoDisplayingFullscreen":{"message":"HTMLVideoElement.webkitDisplayingFullscreen is deprecated. Please use Document.fullscreenElement instead."},"generated/Deprecation.ts | PrefixedVideoEnterFullscreen":{"message":"HTMLVideoElement.webkitEnterFullscreen() is deprecated. Please use Element.requestFullscreen() instead."},"generated/Deprecation.ts | PrefixedVideoEnterFullScreen":{"message":"HTMLVideoElement.webkitEnterFullScreen() is deprecated. Please use Element.requestFullscreen() instead."},"generated/Deprecation.ts | PrefixedVideoExitFullscreen":{"message":"HTMLVideoElement.webkitExitFullscreen() is deprecated. Please use Document.exitFullscreen() instead."},"generated/Deprecation.ts | PrefixedVideoExitFullScreen":{"message":"HTMLVideoElement.webkitExitFullScreen() is deprecated. Please use Document.exitFullscreen() instead."},"generated/Deprecation.ts | PrefixedVideoSupportsFullscreen":{"message":"HTMLVideoElement.webkitSupportsFullscreen is deprecated. Please use Document.fullscreenEnabled instead."},"generated/Deprecation.ts | PrivacySandboxExtensionsAPI":{"message":"We're deprecating the API chrome.privacy.websites.privacySandboxEnabled, though it will remain active for backward compatibility until release M113. Instead, please use chrome.privacy.websites.topicsEnabled, chrome.privacy.websites.fledgeEnabled and chrome.privacy.websites.adMeasurementEnabled. See https://developer.chrome.com/docs/extensions/reference/privacy/#property-websites-privacySandboxEnabled."},"generated/Deprecation.ts | RangeExpand":{"message":"Range.expand() is deprecated. Please use Selection.modify() instead."},"generated/Deprecation.ts | RequestedSubresourceWithEmbeddedCredentials":{"message":"Subresource requests whose URLs contain embedded credentials (e.g. https://user:pass@host/) are blocked."},"generated/Deprecation.ts | RTCConstraintEnableDtlsSrtpFalse":{"message":"The constraint DtlsSrtpKeyAgreement is removed. You have specified a false value for this constraint, which is interpreted as an attempt to use the removed SDES key negotiation method. This functionality is removed; use a service that supports DTLS key negotiation instead."},"generated/Deprecation.ts | RTCConstraintEnableDtlsSrtpTrue":{"message":"The constraint DtlsSrtpKeyAgreement is removed. You have specified a true value for this constraint, which had no effect, but you can remove this constraint for tidiness."},"generated/Deprecation.ts | RTCPeerConnectionGetStatsLegacyNonCompliant":{"message":"The callback-based getStats() is deprecated and will be removed. Use the spec-compliant getStats() instead."},"generated/Deprecation.ts | RtcpMuxPolicyNegotiate":{"message":"The rtcpMuxPolicy option is deprecated and will be removed."},"generated/Deprecation.ts | SharedArrayBufferConstructedWithoutIsolation":{"message":"SharedArrayBuffer will require cross-origin isolation. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details."},"generated/Deprecation.ts | TextToSpeech_DisallowedByAutoplay":{"message":"speechSynthesis.speak() without user activation is deprecated and will be removed."},"generated/Deprecation.ts | UnloadHandler":{"message":"Unload event listeners are deprecated and will be removed."},"generated/Deprecation.ts | V8SharedArrayBufferConstructedInExtensionWithoutIsolation":{"message":"Extensions should opt into cross-origin isolation to continue using SharedArrayBuffer. See https://developer.chrome.com/docs/extensions/mv3/cross-origin-isolation/."},"generated/Deprecation.ts | WebSQL":{"message":"Web SQL is deprecated. Please use SQLite WebAssembly or Indexed Database"},"generated/Deprecation.ts | WindowPlacementPermissionDescriptorUsed":{"message":"The permission descriptor window-placement is deprecated. Use window-management instead. For more help, check https://bit.ly/window-placement-rename."},"generated/Deprecation.ts | WindowPlacementPermissionPolicyParsed":{"message":"The permission policy window-placement is deprecated. Use window-management instead. For more help, check https://bit.ly/window-placement-rename."},"generated/Deprecation.ts | XHRJSONEncodingDetection":{"message":"UTF-16 is not supported by response json in XMLHttpRequest"},"generated/Deprecation.ts | XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload":{"message":"Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/."},"generated/Deprecation.ts | XRSupportsSession":{"message":"supportsSession() is deprecated. Please use isSessionSupported() and check the resolved boolean value instead."},"models/bindings/ContentProviderBasedProject.ts | unknownErrorLoadingFile":{"message":"Unknown error loading file"},"models/bindings/DebuggerLanguagePlugins.ts | debugSymbolsIncomplete":{"message":"The debug information for function {PH1} is incomplete"},"models/bindings/DebuggerLanguagePlugins.ts | errorInDebuggerLanguagePlugin":{"message":"Error in debugger language plugin: {PH1}"},"models/bindings/DebuggerLanguagePlugins.ts | failedToLoadDebugSymbolsFor":{"message":"[{PH1}] Failed to load debug symbols for {PH2} ({PH3})"},"models/bindings/DebuggerLanguagePlugins.ts | failedToLoadDebugSymbolsForFunction":{"message":"No debug information for function \"{PH1}\""},"models/bindings/DebuggerLanguagePlugins.ts | loadedDebugSymbolsForButDidnt":{"message":"[{PH1}] Loaded debug symbols for {PH2}, but didn't find any source files"},"models/bindings/DebuggerLanguagePlugins.ts | loadedDebugSymbolsForFound":{"message":"[{PH1}] Loaded debug symbols for {PH2}, found {PH3} source file(s)"},"models/bindings/DebuggerLanguagePlugins.ts | loadingDebugSymbolsFor":{"message":"[{PH1}] Loading debug symbols for {PH2}..."},"models/bindings/DebuggerLanguagePlugins.ts | loadingDebugSymbolsForVia":{"message":"[{PH1}] Loading debug symbols for {PH2} (via {PH3})..."},"models/bindings/IgnoreListManager.ts | addAllContentScriptsToIgnoreList":{"message":"Add all extension scripts to ignore list"},"models/bindings/IgnoreListManager.ts | addAllThirdPartyScriptsToIgnoreList":{"message":"Add all third-party scripts to ignore list"},"models/bindings/IgnoreListManager.ts | addDirectoryToIgnoreList":{"message":"Add directory to ignore list"},"models/bindings/IgnoreListManager.ts | addScriptToIgnoreList":{"message":"Add script to ignore list"},"models/bindings/IgnoreListManager.ts | removeFromIgnoreList":{"message":"Remove from ignore list"},"models/bindings/ResourceScriptMapping.ts | liveEditCompileFailed":{"message":"LiveEdit compile failed: {PH1}"},"models/bindings/ResourceScriptMapping.ts | liveEditFailed":{"message":"LiveEdit failed: {PH1}"},"models/emulation/DeviceModeModel.ts | devicePixelRatioMustBeANumberOr":{"message":"Device pixel ratio must be a number or blank."},"models/emulation/DeviceModeModel.ts | devicePixelRatioMustBeGreater":{"message":"Device pixel ratio must be greater than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | devicePixelRatioMustBeLessThanOr":{"message":"Device pixel ratio must be less than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | heightCannotBeEmpty":{"message":"Height cannot be empty."},"models/emulation/DeviceModeModel.ts | heightMustBeANumber":{"message":"Height must be a number."},"models/emulation/DeviceModeModel.ts | heightMustBeGreaterThanOrEqualTo":{"message":"Height must be greater than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | heightMustBeLessThanOrEqualToS":{"message":"Height must be less than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | widthCannotBeEmpty":{"message":"Width cannot be empty."},"models/emulation/DeviceModeModel.ts | widthMustBeANumber":{"message":"Width must be a number."},"models/emulation/DeviceModeModel.ts | widthMustBeGreaterThanOrEqualToS":{"message":"Width must be greater than or equal to {PH1}."},"models/emulation/DeviceModeModel.ts | widthMustBeLessThanOrEqualToS":{"message":"Width must be less than or equal to {PH1}."},"models/emulation/EmulatedDevices.ts | laptopWithHiDPIScreen":{"message":"Laptop with HiDPI screen"},"models/emulation/EmulatedDevices.ts | laptopWithMDPIScreen":{"message":"Laptop with MDPI screen"},"models/emulation/EmulatedDevices.ts | laptopWithTouch":{"message":"Laptop with touch"},"models/har/Writer.ts | collectingContent":{"message":"Collecting content…"},"models/har/Writer.ts | writingFile":{"message":"Writing file…"},"models/issues_manager/BounceTrackingIssue.ts | bounceTrackingMitigations":{"message":"Bounce tracking mitigations"},"models/issues_manager/ClientHintIssue.ts | clientHintsInfrastructure":{"message":"Client Hints Infrastructure"},"models/issues_manager/ContentSecurityPolicyIssue.ts | contentSecurityPolicyEval":{"message":"Content Security Policy - Eval"},"models/issues_manager/ContentSecurityPolicyIssue.ts | contentSecurityPolicyInlineCode":{"message":"Content Security Policy - Inline Code"},"models/issues_manager/ContentSecurityPolicyIssue.ts | contentSecurityPolicySource":{"message":"Content Security Policy - Source Allowlists"},"models/issues_manager/ContentSecurityPolicyIssue.ts | trustedTypesFixViolations":{"message":"Trusted Types - Fix violations"},"models/issues_manager/ContentSecurityPolicyIssue.ts | trustedTypesPolicyViolation":{"message":"Trusted Types - Policy violation"},"models/issues_manager/CookieDeprecationMetadataIssue.ts | thirdPartyPhaseoutExplained":{"message":"Prepare for phasing out third-party cookies"},"models/issues_manager/CookieIssue.ts | anInsecure":{"message":"an insecure"},"models/issues_manager/CookieIssue.ts | aSecure":{"message":"a secure"},"models/issues_manager/CookieIssue.ts | fileCrosSiteRedirectBug":{"message":"File a bug"},"models/issues_manager/CookieIssue.ts | firstPartySetsExplained":{"message":"First-Party Sets and the SameParty attribute"},"models/issues_manager/CookieIssue.ts | howSchemefulSamesiteWorks":{"message":"How Schemeful Same-Site Works"},"models/issues_manager/CookieIssue.ts | samesiteCookiesExplained":{"message":"SameSite cookies explained"},"models/issues_manager/CookieIssue.ts | thirdPartyPhaseoutExplained":{"message":"Prepare for phasing out third-party cookies"},"models/issues_manager/CorsIssue.ts | CORS":{"message":"Cross-Origin Resource Sharing (CORS)"},"models/issues_manager/CorsIssue.ts | corsPrivateNetworkAccess":{"message":"Private Network Access"},"models/issues_manager/CrossOriginEmbedderPolicyIssue.ts | coopAndCoep":{"message":"COOP and COEP"},"models/issues_manager/CrossOriginEmbedderPolicyIssue.ts | samesiteAndSameorigin":{"message":"Same-Site and Same-Origin"},"models/issues_manager/DeprecationIssue.ts | feature":{"message":"Check the feature status page for more details."},"models/issues_manager/DeprecationIssue.ts | milestone":{"message":"This change will go into effect with milestone {milestone}."},"models/issues_manager/DeprecationIssue.ts | title":{"message":"Deprecated feature used"},"models/issues_manager/FederatedAuthRequestIssue.ts | fedCm":{"message":"Federated Credential Management API"},"models/issues_manager/FederatedAuthUserInfoRequestIssue.ts | fedCmUserInfo":{"message":"Federated Credential Management User Info API"},"models/issues_manager/GenericIssue.ts | autocompleteAttributePageTitle":{"message":"HTML attribute: autocomplete"},"models/issues_manager/GenericIssue.ts | corbExplainerPageTitle":{"message":"CORB explainer"},"models/issues_manager/GenericIssue.ts | crossOriginPortalPostMessage":{"message":"Portals - Same-origin communication channels"},"models/issues_manager/GenericIssue.ts | howDoesAutofillWorkPageTitle":{"message":"How does autofill work?"},"models/issues_manager/GenericIssue.ts | inputFormElementPageTitle":{"message":"The form input element"},"models/issues_manager/GenericIssue.ts | labelFormlementsPageTitle":{"message":"The label elements"},"models/issues_manager/HeavyAdIssue.ts | handlingHeavyAdInterventions":{"message":"Handling Heavy Ad Interventions"},"models/issues_manager/Issue.ts | breakingChangeIssue":{"message":"A breaking change issue: the page may stop working in an upcoming version of Chrome"},"models/issues_manager/Issue.ts | breakingChanges":{"message":"Breaking Changes"},"models/issues_manager/Issue.ts | improvementIssue":{"message":"An improvement issue: there is an opportunity to improve the page"},"models/issues_manager/Issue.ts | improvements":{"message":"Improvements"},"models/issues_manager/Issue.ts | pageErrorIssue":{"message":"A page error issue: the page is not working correctly"},"models/issues_manager/Issue.ts | pageErrors":{"message":"Page Errors"},"models/issues_manager/LowTextContrastIssue.ts | colorAndContrastAccessibility":{"message":"Color and contrast accessibility"},"models/issues_manager/MixedContentIssue.ts | preventingMixedContent":{"message":"Preventing mixed content"},"models/issues_manager/QuirksModeIssue.ts | documentCompatibilityMode":{"message":"Document compatibility mode"},"models/issues_manager/SharedArrayBufferIssue.ts | enablingSharedArrayBuffer":{"message":"Enabling SharedArrayBuffer"},"models/logs/logs-meta.ts | clear":{"message":"clear"},"models/logs/logs-meta.ts | doNotPreserveLogOnPageReload":{"message":"Do not preserve log on page reload / navigation"},"models/logs/logs-meta.ts | preserve":{"message":"preserve"},"models/logs/logs-meta.ts | preserveLog":{"message":"Preserve log"},"models/logs/logs-meta.ts | preserveLogOnPageReload":{"message":"Preserve log on page reload / navigation"},"models/logs/logs-meta.ts | recordNetworkLog":{"message":"Record network log"},"models/logs/logs-meta.ts | reset":{"message":"reset"},"models/logs/NetworkLog.ts | anonymous":{"message":""},"models/persistence/EditFileSystemView.ts | add":{"message":"Add"},"models/persistence/EditFileSystemView.ts | enterAPath":{"message":"Enter a path"},"models/persistence/EditFileSystemView.ts | enterAUniquePath":{"message":"Enter a unique path"},"models/persistence/EditFileSystemView.ts | excludedFolders":{"message":"Excluded folders"},"models/persistence/EditFileSystemView.ts | folderPath":{"message":"Folder path"},"models/persistence/EditFileSystemView.ts | none":{"message":"None"},"models/persistence/EditFileSystemView.ts | sViaDevtools":{"message":"{PH1} (via .devtools)"},"models/persistence/IsolatedFileSystem.ts | blobCouldNotBeLoaded":{"message":"Blob could not be loaded."},"models/persistence/IsolatedFileSystem.ts | cantReadFileSS":{"message":"Can't read file: {PH1}: {PH2}"},"models/persistence/IsolatedFileSystem.ts | fileSystemErrorS":{"message":"File system error: {PH1}"},"models/persistence/IsolatedFileSystem.ts | linkedToS":{"message":"Linked to {PH1}"},"models/persistence/IsolatedFileSystem.ts | unknownErrorReadingFileS":{"message":"Unknown error reading file: {PH1}"},"models/persistence/IsolatedFileSystemManager.ts | unableToAddFilesystemS":{"message":"Unable to add filesystem: {PH1}"},"models/persistence/persistence-meta.ts | disableOverrideNetworkRequests":{"message":"Disable override network requests"},"models/persistence/persistence-meta.ts | enableLocalOverrides":{"message":"Enable Local Overrides"},"models/persistence/persistence-meta.ts | enableOverrideNetworkRequests":{"message":"Enable override network requests"},"models/persistence/persistence-meta.ts | interception":{"message":"interception"},"models/persistence/persistence-meta.ts | network":{"message":"network"},"models/persistence/persistence-meta.ts | override":{"message":"override"},"models/persistence/persistence-meta.ts | request":{"message":"request"},"models/persistence/persistence-meta.ts | rewrite":{"message":"rewrite"},"models/persistence/persistence-meta.ts | showWorkspace":{"message":"Show Workspace settings"},"models/persistence/persistence-meta.ts | workspace":{"message":"Workspace"},"models/persistence/PersistenceActions.ts | openInContainingFolder":{"message":"Open in containing folder"},"models/persistence/PersistenceActions.ts | overrideContent":{"message":"Override content"},"models/persistence/PersistenceActions.ts | overrideSourceMappedFileExplanation":{"message":"‘{PH1}’ is a source mapped file and cannot be overridden."},"models/persistence/PersistenceActions.ts | overrideSourceMappedFileWarning":{"message":"Override ‘{PH1}’ instead?"},"models/persistence/PersistenceActions.ts | saveAs":{"message":"Save as..."},"models/persistence/PersistenceActions.ts | saveImage":{"message":"Save image"},"models/persistence/PersistenceActions.ts | showOverrides":{"message":"Show all overrides"},"models/persistence/PersistenceUtils.ts | linkedToS":{"message":"Linked to {PH1}"},"models/persistence/PersistenceUtils.ts | linkedToSourceMapS":{"message":"Linked to source map: {PH1}"},"models/persistence/PlatformFileSystem.ts | unableToReadFilesWithThis":{"message":"PlatformFileSystem cannot read files."},"models/persistence/WorkspaceSettingsTab.ts | addFolder":{"message":"Add folder…"},"models/persistence/WorkspaceSettingsTab.ts | folderExcludePattern":{"message":"Folder exclude pattern"},"models/persistence/WorkspaceSettingsTab.ts | mappingsAreInferredAutomatically":{"message":"Mappings are inferred automatically."},"models/persistence/WorkspaceSettingsTab.ts | remove":{"message":"Remove"},"models/persistence/WorkspaceSettingsTab.ts | workspace":{"message":"Workspace"},"models/timeline_model/TimelineJSProfile.ts | threadS":{"message":"Thread {PH1}"},"models/timeline_model/TimelineModel.ts | dedicatedWorker":{"message":"Dedicated Worker"},"models/timeline_model/TimelineModel.ts | threadS":{"message":"Thread {PH1}"},"models/timeline_model/TimelineModel.ts | workerS":{"message":"Worker — {PH1}"},"models/timeline_model/TimelineModel.ts | workerSS":{"message":"Worker: {PH1} — {PH2}"},"models/workspace/UISourceCode.ts | index":{"message":"(index)"},"models/workspace/UISourceCode.ts | thisFileWasChangedExternally":{"message":"This file was changed externally. Would you like to reload it?"},"panels/accessibility/accessibility-meta.ts | accessibility":{"message":"Accessibility"},"panels/accessibility/accessibility-meta.ts | shoAccessibility":{"message":"Show Accessibility"},"panels/accessibility/AccessibilityNodeView.ts | accessibilityNodeNotExposed":{"message":"Accessibility node not exposed"},"panels/accessibility/AccessibilityNodeView.ts | ancestorChildrenAreAll":{"message":"Ancestor's children are all presentational: "},"panels/accessibility/AccessibilityNodeView.ts | computedProperties":{"message":"Computed Properties"},"panels/accessibility/AccessibilityNodeView.ts | elementHasEmptyAltText":{"message":"Element has empty alt text."},"panels/accessibility/AccessibilityNodeView.ts | elementHasPlaceholder":{"message":"Element has {PH1}."},"panels/accessibility/AccessibilityNodeView.ts | elementIsHiddenBy":{"message":"Element is hidden by active modal dialog: "},"panels/accessibility/AccessibilityNodeView.ts | elementIsHiddenByChildTree":{"message":"Element is hidden by child tree: "},"panels/accessibility/AccessibilityNodeView.ts | elementIsInAnInertSubTree":{"message":"Element is in an inert subtree from "},"panels/accessibility/AccessibilityNodeView.ts | elementIsInert":{"message":"Element is inert."},"panels/accessibility/AccessibilityNodeView.ts | elementIsNotRendered":{"message":"Element is not rendered."},"panels/accessibility/AccessibilityNodeView.ts | elementIsNotVisible":{"message":"Element is not visible."},"panels/accessibility/AccessibilityNodeView.ts | elementIsPlaceholder":{"message":"Element is {PH1}."},"panels/accessibility/AccessibilityNodeView.ts | elementIsPresentational":{"message":"Element is presentational."},"panels/accessibility/AccessibilityNodeView.ts | elementNotInteresting":{"message":"Element not interesting for accessibility."},"panels/accessibility/AccessibilityNodeView.ts | elementsInheritsPresentational":{"message":"Element inherits presentational role from "},"panels/accessibility/AccessibilityNodeView.ts | invalidSource":{"message":"Invalid source."},"panels/accessibility/AccessibilityNodeView.ts | labelFor":{"message":"Label for "},"panels/accessibility/AccessibilityNodeView.ts | noAccessibilityNode":{"message":"No accessibility node"},"panels/accessibility/AccessibilityNodeView.ts | noNodeWithThisId":{"message":"No node with this ID."},"panels/accessibility/AccessibilityNodeView.ts | noTextContent":{"message":"No text content."},"panels/accessibility/AccessibilityNodeView.ts | notSpecified":{"message":"Not specified"},"panels/accessibility/AccessibilityNodeView.ts | partOfLabelElement":{"message":"Part of label element: "},"panels/accessibility/AccessibilityNodeView.ts | placeholderIsPlaceholderOnAncestor":{"message":"{PH1} is {PH2} on ancestor: "},"panels/accessibility/AccessibilityStrings.ts | activeDescendant":{"message":"Active descendant"},"panels/accessibility/AccessibilityStrings.ts | aHumanreadableVersionOfTheValue":{"message":"A human-readable version of the value of a range widget (where necessary)."},"panels/accessibility/AccessibilityStrings.ts | atomicLiveRegions":{"message":"Atomic (live regions)"},"panels/accessibility/AccessibilityStrings.ts | busyLiveRegions":{"message":"Busy (live regions)"},"panels/accessibility/AccessibilityStrings.ts | canSetValue":{"message":"Can set value"},"panels/accessibility/AccessibilityStrings.ts | checked":{"message":"Checked"},"panels/accessibility/AccessibilityStrings.ts | contents":{"message":"Contents"},"panels/accessibility/AccessibilityStrings.ts | controls":{"message":"Controls"},"panels/accessibility/AccessibilityStrings.ts | describedBy":{"message":"Described by"},"panels/accessibility/AccessibilityStrings.ts | description":{"message":"Description"},"panels/accessibility/AccessibilityStrings.ts | disabled":{"message":"Disabled"},"panels/accessibility/AccessibilityStrings.ts | editable":{"message":"Editable"},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhichFormThe":{"message":"Element or elements which form the description of this element."},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhichMayFormThe":{"message":"Element or elements which may form the name of this element."},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhichShouldBe":{"message":"Element or elements which should be considered descendants of this element, despite not being descendants in the DOM."},"panels/accessibility/AccessibilityStrings.ts | elementOrElementsWhoseContentOr":{"message":"Element or elements whose content or presence is/are controlled by this widget."},"panels/accessibility/AccessibilityStrings.ts | elementToWhichTheUserMayChooseTo":{"message":"Element to which the user may choose to navigate after this one, instead of the next element in the DOM order."},"panels/accessibility/AccessibilityStrings.ts | expanded":{"message":"Expanded"},"panels/accessibility/AccessibilityStrings.ts | focusable":{"message":"Focusable"},"panels/accessibility/AccessibilityStrings.ts | focused":{"message":"Focused"},"panels/accessibility/AccessibilityStrings.ts | forARangeWidgetTheMaximumAllowed":{"message":"For a range widget, the maximum allowed value."},"panels/accessibility/AccessibilityStrings.ts | forARangeWidgetTheMinimumAllowed":{"message":"For a range widget, the minimum allowed value."},"panels/accessibility/AccessibilityStrings.ts | fromAttribute":{"message":"From attribute"},"panels/accessibility/AccessibilityStrings.ts | fromCaption":{"message":"From caption"},"panels/accessibility/AccessibilityStrings.ts | fromDescription":{"message":"From description"},"panels/accessibility/AccessibilityStrings.ts | fromLabel":{"message":"From label"},"panels/accessibility/AccessibilityStrings.ts | fromLabelFor":{"message":"From label (for= attribute)"},"panels/accessibility/AccessibilityStrings.ts | fromLabelWrapped":{"message":"From label (wrapped)"},"panels/accessibility/AccessibilityStrings.ts | fromLegend":{"message":"From legend"},"panels/accessibility/AccessibilityStrings.ts | fromNativeHtml":{"message":"From native HTML"},"panels/accessibility/AccessibilityStrings.ts | fromPlaceholderAttribute":{"message":"From placeholder attribute"},"panels/accessibility/AccessibilityStrings.ts | fromRubyAnnotation":{"message":"From ruby annotation"},"panels/accessibility/AccessibilityStrings.ts | fromStyle":{"message":"From style"},"panels/accessibility/AccessibilityStrings.ts | fromTitle":{"message":"From title"},"panels/accessibility/AccessibilityStrings.ts | hasAutocomplete":{"message":"Has autocomplete"},"panels/accessibility/AccessibilityStrings.ts | hasPopup":{"message":"Has popup"},"panels/accessibility/AccessibilityStrings.ts | help":{"message":"Help"},"panels/accessibility/AccessibilityStrings.ts | ifAndHowThisElementCanBeEdited":{"message":"If and how this element can be edited."},"panels/accessibility/AccessibilityStrings.ts | ifThisElementMayReceiveLive":{"message":"If this element may receive live updates, whether the entire live region should be presented to the user on changes, or only changed nodes."},"panels/accessibility/AccessibilityStrings.ts | ifThisElementMayReceiveLiveUpdates":{"message":"If this element may receive live updates, what type of updates should trigger a notification."},"panels/accessibility/AccessibilityStrings.ts | ifThisElementMayReceiveLiveUpdatesThe":{"message":"If this element may receive live updates, the root element of the containing live region."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementCanReceiveFocus":{"message":"If true, this element can receive focus."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementCurrentlyCannot":{"message":"If true, this element currently cannot be interacted with."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementCurrentlyHas":{"message":"If true, this element currently has focus."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementMayBeInteracted":{"message":"If true, this element may be interacted with, but its value cannot be changed."},"panels/accessibility/AccessibilityStrings.ts | ifTrueThisElementsUserentered":{"message":"If true, this element's user-entered value does not conform to validation requirement."},"panels/accessibility/AccessibilityStrings.ts | implicit":{"message":"Implicit"},"panels/accessibility/AccessibilityStrings.ts | implicitValue":{"message":"Implicit value."},"panels/accessibility/AccessibilityStrings.ts | indicatesThePurposeOfThisElement":{"message":"Indicates the purpose of this element, such as a user interface idiom for a widget, or structural role within a document."},"panels/accessibility/AccessibilityStrings.ts | invalidUserEntry":{"message":"Invalid user entry"},"panels/accessibility/AccessibilityStrings.ts | labeledBy":{"message":"Labeled by"},"panels/accessibility/AccessibilityStrings.ts | level":{"message":"Level"},"panels/accessibility/AccessibilityStrings.ts | liveRegion":{"message":"Live region"},"panels/accessibility/AccessibilityStrings.ts | liveRegionRoot":{"message":"Live region root"},"panels/accessibility/AccessibilityStrings.ts | maximumValue":{"message":"Maximum value"},"panels/accessibility/AccessibilityStrings.ts | minimumValue":{"message":"Minimum value"},"panels/accessibility/AccessibilityStrings.ts | multiline":{"message":"Multi-line"},"panels/accessibility/AccessibilityStrings.ts | multiselectable":{"message":"Multi-selectable"},"panels/accessibility/AccessibilityStrings.ts | orientation":{"message":"Orientation"},"panels/accessibility/AccessibilityStrings.ts | pressed":{"message":"Pressed"},"panels/accessibility/AccessibilityStrings.ts | readonlyString":{"message":"Read-only"},"panels/accessibility/AccessibilityStrings.ts | relatedElement":{"message":"Related element"},"panels/accessibility/AccessibilityStrings.ts | relevantLiveRegions":{"message":"Relevant (live regions)"},"panels/accessibility/AccessibilityStrings.ts | requiredString":{"message":"Required"},"panels/accessibility/AccessibilityStrings.ts | role":{"message":"Role"},"panels/accessibility/AccessibilityStrings.ts | selectedString":{"message":"Selected"},"panels/accessibility/AccessibilityStrings.ts | theAccessibleDescriptionForThis":{"message":"The accessible description for this element."},"panels/accessibility/AccessibilityStrings.ts | theComputedHelpTextForThis":{"message":"The computed help text for this element."},"panels/accessibility/AccessibilityStrings.ts | theComputedNameOfThisElement":{"message":"The computed name of this element."},"panels/accessibility/AccessibilityStrings.ts | theDescendantOfThisElementWhich":{"message":"The descendant of this element which is active; i.e. the element to which focus should be delegated."},"panels/accessibility/AccessibilityStrings.ts | theHierarchicalLevelOfThis":{"message":"The hierarchical level of this element."},"panels/accessibility/AccessibilityStrings.ts | theValueOfThisElementThisMayBe":{"message":"The value of this element; this may be user-provided or developer-provided, depending on the element."},"panels/accessibility/AccessibilityStrings.ts | value":{"message":"Value"},"panels/accessibility/AccessibilityStrings.ts | valueDescription":{"message":"Value description"},"panels/accessibility/AccessibilityStrings.ts | valueFromAttribute":{"message":"Value from attribute."},"panels/accessibility/AccessibilityStrings.ts | valueFromDescriptionElement":{"message":"Value from description element."},"panels/accessibility/AccessibilityStrings.ts | valueFromElementContents":{"message":"Value from element contents."},"panels/accessibility/AccessibilityStrings.ts | valueFromFigcaptionElement":{"message":"Value from figcaption element."},"panels/accessibility/AccessibilityStrings.ts | valueFromLabelElement":{"message":"Value from label element."},"panels/accessibility/AccessibilityStrings.ts | valueFromLabelElementWithFor":{"message":"Value from label element with for= attribute."},"panels/accessibility/AccessibilityStrings.ts | valueFromLabelElementWrapped":{"message":"Value from a wrapping label element."},"panels/accessibility/AccessibilityStrings.ts | valueFromLegendElement":{"message":"Value from legend element."},"panels/accessibility/AccessibilityStrings.ts | valueFromNativeHtmlRuby":{"message":"Value from plain HTML ruby annotation."},"panels/accessibility/AccessibilityStrings.ts | valueFromNativeHtmlUnknownSource":{"message":"Value from native HTML (unknown source)."},"panels/accessibility/AccessibilityStrings.ts | valueFromPlaceholderAttribute":{"message":"Value from placeholder attribute."},"panels/accessibility/AccessibilityStrings.ts | valueFromRelatedElement":{"message":"Value from related element."},"panels/accessibility/AccessibilityStrings.ts | valueFromStyle":{"message":"Value from style."},"panels/accessibility/AccessibilityStrings.ts | valueFromTableCaption":{"message":"Value from table caption."},"panels/accessibility/AccessibilityStrings.ts | valueFromTitleAttribute":{"message":"Value from title attribute."},"panels/accessibility/AccessibilityStrings.ts | whetherAndWhatPriorityOfLive":{"message":"Whether and what priority of live updates may be expected for this element."},"panels/accessibility/AccessibilityStrings.ts | whetherAndWhatTypeOfAutocomplete":{"message":"Whether and what type of autocomplete suggestions are currently provided by this element."},"panels/accessibility/AccessibilityStrings.ts | whetherAUserMaySelectMoreThanOne":{"message":"Whether a user may select more than one option from this widget."},"panels/accessibility/AccessibilityStrings.ts | whetherTheOptionRepresentedBy":{"message":"Whether the option represented by this element is currently selected."},"panels/accessibility/AccessibilityStrings.ts | whetherTheValueOfThisElementCan":{"message":"Whether the value of this element can be set."},"panels/accessibility/AccessibilityStrings.ts | whetherThisCheckboxRadioButtonOr":{"message":"Whether this checkbox, radio button or tree item is checked, unchecked, or mixed (e.g. has both checked and un-checked children)."},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementHasCausedSome":{"message":"Whether this element has caused some kind of pop-up (such as a menu) to appear."},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementIsARequired":{"message":"Whether this element is a required field in a form."},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementOrAnother":{"message":"Whether this element, or another grouping element it controls, is expanded."},"panels/accessibility/AccessibilityStrings.ts | whetherThisElementOrItsSubtree":{"message":"Whether this element or its subtree are currently being updated (and thus may be in an inconsistent state)."},"panels/accessibility/AccessibilityStrings.ts | whetherThisLinearElements":{"message":"Whether this linear element's orientation is horizontal or vertical."},"panels/accessibility/AccessibilityStrings.ts | whetherThisTextBoxMayHaveMore":{"message":"Whether this text box may have more than one line."},"panels/accessibility/AccessibilityStrings.ts | whetherThisToggleButtonIs":{"message":"Whether this toggle button is currently in a pressed state."},"panels/accessibility/ARIAAttributesView.ts | ariaAttributes":{"message":"ARIA Attributes"},"panels/accessibility/ARIAAttributesView.ts | noAriaAttributes":{"message":"No ARIA attributes"},"panels/accessibility/AXBreadcrumbsPane.ts | accessibilityTree":{"message":"Accessibility Tree"},"panels/accessibility/AXBreadcrumbsPane.ts | fullTreeExperimentDescription":{"message":"The accessibility tree moved to the top right corner of the DOM tree."},"panels/accessibility/AXBreadcrumbsPane.ts | fullTreeExperimentName":{"message":"Enable full-page accessibility tree"},"panels/accessibility/AXBreadcrumbsPane.ts | ignored":{"message":"Ignored"},"panels/accessibility/AXBreadcrumbsPane.ts | reloadRequired":{"message":"Reload required before the change takes effect."},"panels/accessibility/AXBreadcrumbsPane.ts | scrollIntoView":{"message":"Scroll into view"},"panels/accessibility/SourceOrderView.ts | noSourceOrderInformation":{"message":"No source order information available"},"panels/accessibility/SourceOrderView.ts | showSourceOrder":{"message":"Show source order"},"panels/accessibility/SourceOrderView.ts | sourceOrderViewer":{"message":"Source Order Viewer"},"panels/accessibility/SourceOrderView.ts | thereMayBeADelayInDisplaying":{"message":"There may be a delay in displaying source order for elements with many children"},"panels/animation/animation-meta.ts | animations":{"message":"Animations"},"panels/animation/animation-meta.ts | showAnimations":{"message":"Show Animations"},"panels/animation/AnimationTimeline.ts | animationPreviews":{"message":"Animation previews"},"panels/animation/AnimationTimeline.ts | animationPreviewS":{"message":"Animation Preview {PH1}"},"panels/animation/AnimationTimeline.ts | clearAll":{"message":"Clear all"},"panels/animation/AnimationTimeline.ts | pause":{"message":"Pause"},"panels/animation/AnimationTimeline.ts | pauseAll":{"message":"Pause all"},"panels/animation/AnimationTimeline.ts | pauseTimeline":{"message":"Pause timeline"},"panels/animation/AnimationTimeline.ts | playbackRatePlaceholder":{"message":"{PH1}%"},"panels/animation/AnimationTimeline.ts | playbackRates":{"message":"Playback rates"},"panels/animation/AnimationTimeline.ts | playTimeline":{"message":"Play timeline"},"panels/animation/AnimationTimeline.ts | replayTimeline":{"message":"Replay timeline"},"panels/animation/AnimationTimeline.ts | resumeAll":{"message":"Resume all"},"panels/animation/AnimationTimeline.ts | selectAnEffectAboveToInspectAnd":{"message":"Select an effect above to inspect and modify."},"panels/animation/AnimationTimeline.ts | setSpeedToS":{"message":"Set speed to {PH1}"},"panels/animation/AnimationTimeline.ts | waitingForAnimations":{"message":"Waiting for animations..."},"panels/animation/AnimationUI.ts | animationEndpointSlider":{"message":"Animation Endpoint slider"},"panels/animation/AnimationUI.ts | animationKeyframeSlider":{"message":"Animation Keyframe slider"},"panels/animation/AnimationUI.ts | sSlider":{"message":"{PH1} slider"},"panels/application/application-meta.ts | application":{"message":"Application"},"panels/application/application-meta.ts | clearSiteData":{"message":"Clear site data"},"panels/application/application-meta.ts | clearSiteDataIncludingThirdparty":{"message":"Clear site data (including third-party cookies)"},"panels/application/application-meta.ts | pwa":{"message":"pwa"},"panels/application/application-meta.ts | showApplication":{"message":"Show Application"},"panels/application/application-meta.ts | startRecordingEvents":{"message":"Start recording events"},"panels/application/application-meta.ts | stopRecordingEvents":{"message":"Stop recording events"},"panels/application/ApplicationPanelSidebar.ts | application":{"message":"Application"},"panels/application/ApplicationPanelSidebar.ts | applicationSidebarPanel":{"message":"Application panel sidebar"},"panels/application/ApplicationPanelSidebar.ts | appManifest":{"message":"App Manifest"},"panels/application/ApplicationPanelSidebar.ts | backgroundServices":{"message":"Background services"},"panels/application/ApplicationPanelSidebar.ts | beforeInvokeAlert":{"message":"{PH1}: Invoke to scroll to this section in manifest"},"panels/application/ApplicationPanelSidebar.ts | clear":{"message":"Clear"},"panels/application/ApplicationPanelSidebar.ts | cookies":{"message":"Cookies"},"panels/application/ApplicationPanelSidebar.ts | cookiesUsedByFramesFromS":{"message":"Cookies used by frames from {PH1}"},"panels/application/ApplicationPanelSidebar.ts | documentNotAvailable":{"message":"Document not available"},"panels/application/ApplicationPanelSidebar.ts | frames":{"message":"Frames"},"panels/application/ApplicationPanelSidebar.ts | indexeddb":{"message":"IndexedDB"},"panels/application/ApplicationPanelSidebar.ts | keyPathS":{"message":"Key path: {PH1}"},"panels/application/ApplicationPanelSidebar.ts | localFiles":{"message":"Local Files"},"panels/application/ApplicationPanelSidebar.ts | localStorage":{"message":"Local storage"},"panels/application/ApplicationPanelSidebar.ts | manifest":{"message":"Manifest"},"panels/application/ApplicationPanelSidebar.ts | noManifestDetected":{"message":"No manifest detected"},"panels/application/ApplicationPanelSidebar.ts | onInvokeAlert":{"message":"Scrolled to {PH1}"},"panels/application/ApplicationPanelSidebar.ts | onInvokeManifestAlert":{"message":"Manifest: Invoke to scroll to the top of manifest"},"panels/application/ApplicationPanelSidebar.ts | openedWindows":{"message":"Opened Windows"},"panels/application/ApplicationPanelSidebar.ts | refreshIndexeddb":{"message":"Refresh IndexedDB"},"panels/application/ApplicationPanelSidebar.ts | sessionStorage":{"message":"Session storage"},"panels/application/ApplicationPanelSidebar.ts | storage":{"message":"Storage"},"panels/application/ApplicationPanelSidebar.ts | theContentOfThisDocumentHasBeen":{"message":"The content of this document has been generated dynamically via 'document.write()'."},"panels/application/ApplicationPanelSidebar.ts | thirdPartyPhaseout":{"message":"Cookies from {PH1} may have been blocked due to third-party cookie phaseout."},"panels/application/ApplicationPanelSidebar.ts | versionS":{"message":"Version: {PH1}"},"panels/application/ApplicationPanelSidebar.ts | versionSEmpty":{"message":"Version: {PH1} (empty)"},"panels/application/ApplicationPanelSidebar.ts | webWorkers":{"message":"Web Workers"},"panels/application/ApplicationPanelSidebar.ts | windowWithoutTitle":{"message":"Window without title"},"panels/application/ApplicationPanelSidebar.ts | worker":{"message":"worker"},"panels/application/AppManifestView.ts | actualHeightSpxOfSSDoesNotMatch":{"message":"Actual height ({PH1}px) of {PH2} {PH3} does not match specified height ({PH4}px)"},"panels/application/AppManifestView.ts | actualSizeSspxOfSSDoesNotMatch":{"message":"Actual size ({PH1}×{PH2})px of {PH3} {PH4} does not match specified size ({PH5}×{PH6}px)"},"panels/application/AppManifestView.ts | actualWidthSpxOfSSDoesNotMatch":{"message":"Actual width ({PH1}px) of {PH2} {PH3} does not match specified width ({PH4}px)"},"panels/application/AppManifestView.ts | appIdExplainer":{"message":"This is used by the browser to know whether the manifest should be updating an existing application, or whether it refers to a new web app that can be installed."},"panels/application/AppManifestView.ts | appIdNote":{"message":"{PH1} {PH2} is not specified in the manifest, {PH3} is used instead. To specify an App ID that matches the current identity, set the {PH4} field to {PH5} {PH6}."},"panels/application/AppManifestView.ts | aUrlInTheManifestContainsA":{"message":"A URL in the manifest contains a username, password, or port"},"panels/application/AppManifestView.ts | avoidPurposeAnyAndMaskable":{"message":"Declaring an icon with 'purpose' of 'any maskable' is discouraged. It is likely to look incorrect on some platforms due to too much or too little padding."},"panels/application/AppManifestView.ts | backgroundColor":{"message":"Background color"},"panels/application/AppManifestView.ts | computedAppId":{"message":"Computed App ID"},"panels/application/AppManifestView.ts | copiedToClipboard":{"message":"Copied suggested ID {PH1} to clipboard"},"panels/application/AppManifestView.ts | copyToClipboard":{"message":"Copy suggested ID to clipboard"},"panels/application/AppManifestView.ts | couldNotCheckServiceWorker":{"message":"Could not check service worker without a 'start_url' field in the manifest"},"panels/application/AppManifestView.ts | couldNotDownloadARequiredIcon":{"message":"Could not download a required icon from the manifest"},"panels/application/AppManifestView.ts | customizePwaTitleBar":{"message":"Customize the window controls overlay of your PWA's title bar"},"panels/application/AppManifestView.ts | darkBackgroundColor":{"message":"Dark background color"},"panels/application/AppManifestView.ts | darkThemeColor":{"message":"Dark theme color"},"panels/application/AppManifestView.ts | description":{"message":"Description"},"panels/application/AppManifestView.ts | descriptionMayBeTruncated":{"message":"Description may be truncated."},"panels/application/AppManifestView.ts | display":{"message":"Display"},"panels/application/AppManifestView.ts | documentationOnMaskableIcons":{"message":"documentation on maskable icons"},"panels/application/AppManifestView.ts | downloadedIconWasEmptyOr":{"message":"Downloaded icon was empty or corrupted"},"panels/application/AppManifestView.ts | errorsAndWarnings":{"message":"Errors and warnings"},"panels/application/AppManifestView.ts | formFactor":{"message":"Form factor"},"panels/application/AppManifestView.ts | icon":{"message":"Icon"},"panels/application/AppManifestView.ts | icons":{"message":"Icons"},"panels/application/AppManifestView.ts | identity":{"message":"Identity"},"panels/application/AppManifestView.ts | imageFromS":{"message":"Image from {PH1}"},"panels/application/AppManifestView.ts | installability":{"message":"Installability"},"panels/application/AppManifestView.ts | label":{"message":"Label"},"panels/application/AppManifestView.ts | learnMore":{"message":"Learn more"},"panels/application/AppManifestView.ts | manifestContainsDisplayoverride":{"message":"Manifest contains 'display_override' field, and the first supported display mode must be one of 'standalone', 'fullscreen', or 'minimal-ui'"},"panels/application/AppManifestView.ts | manifestCouldNotBeFetchedIsEmpty":{"message":"Manifest could not be fetched, is empty, or could not be parsed"},"panels/application/AppManifestView.ts | manifestDisplayPropertyMustBeOne":{"message":"Manifest 'display' property must be one of 'standalone', 'fullscreen', or 'minimal-ui'"},"panels/application/AppManifestView.ts | manifestDoesNotContainANameOr":{"message":"Manifest does not contain a 'name' or 'short_name' field"},"panels/application/AppManifestView.ts | manifestDoesNotContainASuitable":{"message":"Manifest does not contain a suitable icon—PNG, SVG, or WebP format of at least {PH1}px is required, the 'sizes' attribute must be set, and the 'purpose' attribute, if set, must include 'any'."},"panels/application/AppManifestView.ts | manifestSpecifies":{"message":"Manifest specifies 'prefer_related_applications: true'"},"panels/application/AppManifestView.ts | manifestStartUrlIsNotValid":{"message":"Manifest 'start_url' is not valid"},"panels/application/AppManifestView.ts | name":{"message":"Name"},"panels/application/AppManifestView.ts | needHelpReadOurS":{"message":"Need help? Read the {PH1}."},"panels/application/AppManifestView.ts | newNoteUrl":{"message":"New note URL"},"panels/application/AppManifestView.ts | noPlayStoreIdProvided":{"message":"No Play store ID provided"},"panels/application/AppManifestView.ts | noScreenshotsForRicherPWAInstallOnDesktop":{"message":"Richer PWA Install UI won’t be available on desktop. Please add at least one screenshot with the form_factor set to wide."},"panels/application/AppManifestView.ts | noScreenshotsForRicherPWAInstallOnMobile":{"message":"Richer PWA Install UI won’t be available on mobile. Please add at least one screenshot for which form_factor is not set or set to a value other than wide."},"panels/application/AppManifestView.ts | noSuppliedIconIsAtLeastSpxSquare":{"message":"No supplied icon is at least {PH1} pixels square in PNG, SVG, or WebP format, with the purpose attribute unset or set to 'any'."},"panels/application/AppManifestView.ts | note":{"message":"Note:"},"panels/application/AppManifestView.ts | orientation":{"message":"Orientation"},"panels/application/AppManifestView.ts | pageDoesNotWorkOffline":{"message":"Page does not work offline"},"panels/application/AppManifestView.ts | pageDoesNotWorkOfflineThePage":{"message":"Page does not work offline. Starting in Chrome 93, the installability criteria are changing, and this site will not be installable. See {PH1} for more information."},"panels/application/AppManifestView.ts | pageHasNoManifestLinkUrl":{"message":"Page has no manifest URL"},"panels/application/AppManifestView.ts | pageIsLoadedInAnIncognitoWindow":{"message":"Page is loaded in an incognito window"},"panels/application/AppManifestView.ts | pageIsNotLoadedInTheMainFrame":{"message":"Page is not loaded in the main frame"},"panels/application/AppManifestView.ts | pageIsNotServedFromASecureOrigin":{"message":"Page is not served from a secure origin"},"panels/application/AppManifestView.ts | platform":{"message":"Platform"},"panels/application/AppManifestView.ts | preferrelatedapplicationsIsOnly":{"message":"'prefer_related_applications' is only supported on Chrome Beta and Stable channels on Android."},"panels/application/AppManifestView.ts | presentation":{"message":"Presentation"},"panels/application/AppManifestView.ts | protocolHandlers":{"message":"Protocol Handlers"},"panels/application/AppManifestView.ts | screenshot":{"message":"Screenshot"},"panels/application/AppManifestView.ts | screenshotPixelSize":{"message":"Screenshot {url} should specify a pixel size [width]x[height] instead of any as first size."},"panels/application/AppManifestView.ts | screenshotS":{"message":"Screenshot #{PH1}"},"panels/application/AppManifestView.ts | screenshotsMustHaveSameAspectRatio":{"message":"All screenshots with the same form_factor must have the same aspect ratio as the first screenshot with that form_factor. Some screenshots will be ignored."},"panels/application/AppManifestView.ts | selectWindowControlsOverlayEmulationOs":{"message":"Emulate the Window Controls Overlay on"},"panels/application/AppManifestView.ts | shortcutS":{"message":"Shortcut #{PH1}"},"panels/application/AppManifestView.ts | shortcutsMayBeNotAvailable":{"message":"The maximum number of shortcuts is platform dependent. Some shortcuts may be not available."},"panels/application/AppManifestView.ts | shortcutSShouldIncludeAXPixel":{"message":"Shortcut #{PH1} should include a 96×96 pixel icon"},"panels/application/AppManifestView.ts | shortName":{"message":"Short name"},"panels/application/AppManifestView.ts | showOnlyTheMinimumSafeAreaFor":{"message":"Show only the minimum safe area for maskable icons"},"panels/application/AppManifestView.ts | sSDoesNotSpecifyItsSizeInThe":{"message":"{PH1} {PH2} does not specify its size in the manifest"},"panels/application/AppManifestView.ts | sSFailedToLoad":{"message":"{PH1} {PH2} failed to load"},"panels/application/AppManifestView.ts | sSHeightDoesNotComplyWithRatioRequirement":{"message":"{PH1} {PH2} height can't be more than 2.3 times as long as the width"},"panels/application/AppManifestView.ts | sSrcIsNotSet":{"message":"{PH1} 'src' is not set"},"panels/application/AppManifestView.ts | sSShouldHaveSquareIcon":{"message":"Most operating systems require square icons. Please include at least one square icon in the array."},"panels/application/AppManifestView.ts | sSShouldSpecifyItsSizeAs":{"message":"{PH1} {PH2} should specify its size as [width]x[height]"},"panels/application/AppManifestView.ts | sSSizeShouldBeAtLeast320":{"message":"{PH1} {PH2} size should be at least 320×320"},"panels/application/AppManifestView.ts | sSSizeShouldBeAtMost3840":{"message":"{PH1} {PH2} size should be at most 3840×3840"},"panels/application/AppManifestView.ts | sSWidthDoesNotComplyWithRatioRequirement":{"message":"{PH1} {PH2} width can't be more than 2.3 times as long as the height"},"panels/application/AppManifestView.ts | startUrl":{"message":"Start URL"},"panels/application/AppManifestView.ts | sUrlSFailedToParse":{"message":"{PH1} URL ''{PH2}'' failed to parse"},"panels/application/AppManifestView.ts | theAppIsAlreadyInstalled":{"message":"The app is already installed"},"panels/application/AppManifestView.ts | themeColor":{"message":"Theme color"},"panels/application/AppManifestView.ts | thePlayStoreAppUrlAndPlayStoreId":{"message":"The Play Store app URL and Play Store ID do not match"},"panels/application/AppManifestView.ts | theSpecifiedApplicationPlatform":{"message":"The specified application platform is not supported on Android"},"panels/application/AppManifestView.ts | tooManyScreenshotsForDesktop":{"message":"No more than 8 screenshots will be displayed on desktop. The rest will be ignored."},"panels/application/AppManifestView.ts | tooManyScreenshotsForMobile":{"message":"No more than 5 screenshots will be displayed on mobile. The rest will be ignored."},"panels/application/AppManifestView.ts | url":{"message":"URL"},"panels/application/AppManifestView.ts | wcoFound":{"message":"Chrome has successfully found the {PH1} value for the {PH2} field in the {PH3}."},"panels/application/AppManifestView.ts | wcoNeedHelpReadMore":{"message":"Need help? Read {PH1}."},"panels/application/AppManifestView.ts | wcoNotFound":{"message":"Define {PH1} in the manifest to use the Window Controls Overlay API and customize your app's title bar."},"panels/application/AppManifestView.ts | windowControlsOverlay":{"message":"Window Controls Overlay"},"panels/application/BackForwardCacheTreeElement.ts | backForwardCache":{"message":"Back/forward cache"},"panels/application/BackgroundServiceView.ts | backgroundFetch":{"message":"Background fetch"},"panels/application/BackgroundServiceView.ts | backgroundServices":{"message":"Background services"},"panels/application/BackgroundServiceView.ts | backgroundSync":{"message":"Background sync"},"panels/application/BackgroundServiceView.ts | clear":{"message":"Clear"},"panels/application/BackgroundServiceView.ts | clickTheRecordButtonSOrHitSTo":{"message":"Click the record button {PH1} or hit {PH2} to start recording."},"panels/application/BackgroundServiceView.ts | devtoolsWillRecordAllSActivity":{"message":"DevTools will record all {PH1} activity for up to 3 days, even when closed."},"panels/application/BackgroundServiceView.ts | empty":{"message":"empty"},"panels/application/BackgroundServiceView.ts | event":{"message":"Event"},"panels/application/BackgroundServiceView.ts | instanceId":{"message":"Instance ID"},"panels/application/BackgroundServiceView.ts | learnMore":{"message":"Learn more"},"panels/application/BackgroundServiceView.ts | noMetadataForThisEvent":{"message":"No metadata for this event"},"panels/application/BackgroundServiceView.ts | notifications":{"message":"Notifications"},"panels/application/BackgroundServiceView.ts | origin":{"message":"Origin"},"panels/application/BackgroundServiceView.ts | paymentHandler":{"message":"Payment handler"},"panels/application/BackgroundServiceView.ts | periodicBackgroundSync":{"message":"Periodic background sync"},"panels/application/BackgroundServiceView.ts | pushMessaging":{"message":"Push messaging"},"panels/application/BackgroundServiceView.ts | recordingSActivity":{"message":"Recording {PH1} activity..."},"panels/application/BackgroundServiceView.ts | saveEvents":{"message":"Save events"},"panels/application/BackgroundServiceView.ts | selectAnEntryToViewMetadata":{"message":"Select an entry to view metadata"},"panels/application/BackgroundServiceView.ts | showEventsForOtherStorageKeys":{"message":"Show events from other storage partitions"},"panels/application/BackgroundServiceView.ts | showEventsFromOtherDomains":{"message":"Show events from other domains"},"panels/application/BackgroundServiceView.ts | startRecordingEvents":{"message":"Start recording events"},"panels/application/BackgroundServiceView.ts | stopRecordingEvents":{"message":"Stop recording events"},"panels/application/BackgroundServiceView.ts | storageKey":{"message":"Storage Key"},"panels/application/BackgroundServiceView.ts | swScope":{"message":"Service Worker Scope"},"panels/application/BackgroundServiceView.ts | timestamp":{"message":"Timestamp"},"panels/application/BounceTrackingMitigationsTreeElement.ts | bounceTrackingMitigations":{"message":"Bounce tracking mitigations"},"panels/application/components/BackForwardCacheStrings.ts | appBanner":{"message":"Pages that requested an AppBanner are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabled":{"message":"Back/forward cache is disabled by flags. Visit chrome://flags/#back-forward-cache to enable it locally on this device."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledByCommandLine":{"message":"Back/forward cache is disabled by the command line."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledByLowMemory":{"message":"Back/forward cache is disabled due to insufficient memory."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledForDelegate":{"message":"Back/forward cache is not supported by delegate."},"panels/application/components/BackForwardCacheStrings.ts | backForwardCacheDisabledForPrerender":{"message":"Back/forward cache is disabled for prerenderer."},"panels/application/components/BackForwardCacheStrings.ts | broadcastChannel":{"message":"The page cannot be cached because it has a BroadcastChannel instance with registered listeners."},"panels/application/components/BackForwardCacheStrings.ts | cacheControlNoStore":{"message":"Pages with cache-control:no-store header cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | cacheFlushed":{"message":"The cache was intentionally cleared."},"panels/application/components/BackForwardCacheStrings.ts | cacheLimit":{"message":"The page was evicted from the cache to allow another page to be cached."},"panels/application/components/BackForwardCacheStrings.ts | containsPlugins":{"message":"Pages containing plugins are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentFileChooser":{"message":"Pages that use FileChooser API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentFileSystemAccess":{"message":"Pages that use File System Access API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentMediaDevicesDispatcherHost":{"message":"Pages that use Media Device Dispatcher are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentMediaPlay":{"message":"A media player was playing upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | contentMediaSession":{"message":"Pages that use MediaSession API and set a playback state are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentMediaSessionService":{"message":"Pages that use MediaSession API and set action handlers are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentScreenReader":{"message":"Back/forward cache is disabled due to screen reader."},"panels/application/components/BackForwardCacheStrings.ts | contentSecurityHandler":{"message":"Pages that use SecurityHandler are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentSerial":{"message":"Pages that use Serial API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentWebAuthenticationAPI":{"message":"Pages that use WebAuthetication API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentWebBluetooth":{"message":"Pages that use WebBluetooth API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | contentWebUSB":{"message":"Pages that use WebUSB API are not eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | cookieDisabled":{"message":"Back/forward cache is disabled because cookies are disabled on a page that uses Cache-Control: no-store."},"panels/application/components/BackForwardCacheStrings.ts | CookieFlushed":{"message":"Undefined"},"panels/application/components/BackForwardCacheStrings.ts | dedicatedWorkerOrWorklet":{"message":"Pages that use a dedicated worker or worklet are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | documentLoaded":{"message":"The document did not finish loading before navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderAppBannerManager":{"message":"App Banner was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderChromePasswordManagerClientBindCredentialManager":{"message":"Chrome Password Manager was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderDomDistillerSelfDeletingRequestDelegate":{"message":"DOM distillation was in progress upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderDomDistillerViewerSource":{"message":"DOM Distiller Viewer was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionMessaging":{"message":"Back/forward cache is disabled due to extensions using messaging API."},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionMessagingForOpenPort":{"message":"Extensions with long-lived connection should close the connection before entering back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensions":{"message":"Back/forward cache is disabled due to extensions."},"panels/application/components/BackForwardCacheStrings.ts | embedderExtensionSentMessageToCachedFrame":{"message":"Extensions with long-lived connection attempted to send messages to frames in back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | embedderModalDialog":{"message":"Modal dialog such as form resubmission or http password dialog was shown for the page upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderOfflinePage":{"message":"The offline page was shown upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderOomInterventionTabHelper":{"message":"Out-Of-Memory Intervention bar was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderPermissionRequestManager":{"message":"There were permission requests upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderPopupBlockerTabHelper":{"message":"Popup blocker was present upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderSafeBrowsingThreatDetails":{"message":"Safe Browsing details were shown upon navigating away."},"panels/application/components/BackForwardCacheStrings.ts | embedderSafeBrowsingTriggeredPopupBlocker":{"message":"Safe Browsing considered this page to be abusive and blocked popup."},"panels/application/components/BackForwardCacheStrings.ts | enteredBackForwardCacheBeforeServiceWorkerHostAdded":{"message":"A service worker was activated while the page was in back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | errorDocument":{"message":"Back/forward cache is disabled due to a document error."},"panels/application/components/BackForwardCacheStrings.ts | fencedFramesEmbedder":{"message":"Pages using FencedFrames cannot be stored in bfcache."},"panels/application/components/BackForwardCacheStrings.ts | foregroundCacheLimit":{"message":"The page was evicted from the cache to allow another page to be cached."},"panels/application/components/BackForwardCacheStrings.ts | grantedMediaStreamAccess":{"message":"Pages that have granted media stream access are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | haveInnerContents":{"message":"Pages that use portals are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | HTTPAuthRequired":{"message":"Undefined"},"panels/application/components/BackForwardCacheStrings.ts | HTTPMethodNotGET":{"message":"Only pages loaded via a GET request are eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | HTTPStatusNotOK":{"message":"Only pages with a status code of 2XX can be cached."},"panels/application/components/BackForwardCacheStrings.ts | idleManager":{"message":"Pages that use IdleManager are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | indexedDBConnection":{"message":"Pages that have an open IndexedDB connection are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | indexedDBEvent":{"message":"Back/forward cache is disabled due to an IndexedDB event."},"panels/application/components/BackForwardCacheStrings.ts | ineligibleAPI":{"message":"Ineligible APIs were used."},"panels/application/components/BackForwardCacheStrings.ts | injectedJavascript":{"message":"Pages that JavaScript is injected into by extensions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | injectedStyleSheet":{"message":"Pages that a StyleSheet is injected into by extensions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | internalError":{"message":"Internal error."},"panels/application/components/BackForwardCacheStrings.ts | JavaScriptExecution":{"message":"Chrome detected an attempt to execute JavaScript while in the cache."},"panels/application/components/BackForwardCacheStrings.ts | jsNetworkRequestReceivedCacheControlNoStoreResource":{"message":"Back/forward cache is disabled because some JavaScript network request received resource with Cache-Control: no-store header."},"panels/application/components/BackForwardCacheStrings.ts | keepaliveRequest":{"message":"Back/forward cache is disabled due to a keepalive request."},"panels/application/components/BackForwardCacheStrings.ts | keyboardLock":{"message":"Pages that use Keyboard lock are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | LiveMediaStreamTrack":{"message":"Undefined"},"panels/application/components/BackForwardCacheStrings.ts | loading":{"message":"The page did not finish loading before navigating away."},"panels/application/components/BackForwardCacheStrings.ts | mainResourceHasCacheControlNoCache":{"message":"Pages whose main resource has cache-control:no-cache cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | mainResourceHasCacheControlNoStore":{"message":"Pages whose main resource has cache-control:no-store cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | navigationCancelledWhileRestoring":{"message":"Navigation was cancelled before the page could be restored from back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | networkExceedsBufferLimit":{"message":"The page was evicted from the cache because an active network connection received too much data. Chrome limits the amount of data that a page may receive while cached."},"panels/application/components/BackForwardCacheStrings.ts | networkRequestDatapipeDrainedAsBytesConsumer":{"message":"Pages that have inflight fetch() or XHR are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | networkRequestRedirected":{"message":"The page was evicted from back/forward cache because an active network request involved a redirect."},"panels/application/components/BackForwardCacheStrings.ts | networkRequestTimeout":{"message":"The page was evicted from the cache because a network connection was open too long. Chrome limits the amount of time that a page may receive data while cached."},"panels/application/components/BackForwardCacheStrings.ts | noResponseHead":{"message":"Pages that do not have a valid response head cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | notMainFrame":{"message":"Navigation happened in a frame other than the main frame."},"panels/application/components/BackForwardCacheStrings.ts | outstandingIndexedDBTransaction":{"message":"Page with ongoing indexed DB transactions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestDirectSocket":{"message":"Pages with an in-flight network request are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestFetch":{"message":"Pages with an in-flight fetch network request are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestOthers":{"message":"Pages with an in-flight network request are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | outstandingNetworkRequestXHR":{"message":"Pages with an in-flight XHR network request are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | ParserAborted":{"message":"Undefined"},"panels/application/components/BackForwardCacheStrings.ts | paymentManager":{"message":"Pages that use PaymentManager are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | pictureInPicture":{"message":"Pages that use Picture-in-Picture are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | portal":{"message":"Pages that use portals are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | printing":{"message":"Pages that show Printing UI are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | relatedActiveContentsExist":{"message":"The page was opened using 'window.open()' and another tab has a reference to it, or the page opened a window."},"panels/application/components/BackForwardCacheStrings.ts | rendererProcessCrashed":{"message":"The renderer process for the page in back/forward cache crashed."},"panels/application/components/BackForwardCacheStrings.ts | rendererProcessKilled":{"message":"The renderer process for the page in back/forward cache was killed."},"panels/application/components/BackForwardCacheStrings.ts | requestedAudioCapturePermission":{"message":"Pages that have requested audio capture permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedBackForwardCacheBlockedSensors":{"message":"Pages that have requested sensor permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedBackgroundWorkPermission":{"message":"Pages that have requested background sync or fetch permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedMIDIPermission":{"message":"Pages that have requested MIDI permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedNotificationsPermission":{"message":"Pages that have requested notifications permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedStorageAccessGrant":{"message":"Pages that have requested storage access are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | requestedVideoCapturePermission":{"message":"Pages that have requested video capture permissions are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | schemeNotHTTPOrHTTPS":{"message":"Only pages whose URL scheme is HTTP / HTTPS can be cached."},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerClaim":{"message":"The page was claimed by a service worker while it is in back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerPostMessage":{"message":"A service worker attempted to send the page in back/forward cache a MessageEvent."},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerUnregistration":{"message":"ServiceWorker was unregistered while a page was in back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | serviceWorkerVersionActivation":{"message":"The page was evicted from back/forward cache due to a service worker activation."},"panels/application/components/BackForwardCacheStrings.ts | sessionRestored":{"message":"Chrome restarted and cleared the back/forward cache entries."},"panels/application/components/BackForwardCacheStrings.ts | sharedWorker":{"message":"Pages that use SharedWorker are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | SmartCard":{"message":"Undefined"},"panels/application/components/BackForwardCacheStrings.ts | speechRecognizer":{"message":"Pages that use SpeechRecognizer are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | speechSynthesis":{"message":"Pages that use SpeechSynthesis are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | subframeIsNavigating":{"message":"An iframe on the page started a navigation that did not complete."},"panels/application/components/BackForwardCacheStrings.ts | subresourceHasCacheControlNoCache":{"message":"Pages whose subresource has cache-control:no-cache cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | subresourceHasCacheControlNoStore":{"message":"Pages whose subresource has cache-control:no-store cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | timeout":{"message":"The page exceeded the maximum time in back/forward cache and was expired."},"panels/application/components/BackForwardCacheStrings.ts | timeoutPuttingInCache":{"message":"The page timed out entering back/forward cache (likely due to long-running pagehide handlers)."},"panels/application/components/BackForwardCacheStrings.ts | UnloadHandler":{"message":"Undefined"},"panels/application/components/BackForwardCacheStrings.ts | unloadHandlerExistsInMainFrame":{"message":"The page has an unload handler in the main frame."},"panels/application/components/BackForwardCacheStrings.ts | unloadHandlerExistsInSubFrame":{"message":"The page has an unload handler in a sub frame."},"panels/application/components/BackForwardCacheStrings.ts | userAgentOverrideDiffers":{"message":"Browser has changed the user agent override header."},"panels/application/components/BackForwardCacheStrings.ts | wasGrantedMediaAccess":{"message":"Pages that have granted access to record video or audio are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webDatabase":{"message":"Pages that use WebDatabase are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webHID":{"message":"Pages that use WebHID are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webLocks":{"message":"Pages that use WebLocks are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webNfc":{"message":"Pages that use WebNfc are not currently eligible for back/forwad cache."},"panels/application/components/BackForwardCacheStrings.ts | webOTPService":{"message":"Pages that use WebOTPService are not currently eligible for bfcache."},"panels/application/components/BackForwardCacheStrings.ts | webRTC":{"message":"Pages with WebRTC cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webRTCSticky":{"message":"Back/forward cache is disabled because WebRTC has been used."},"panels/application/components/BackForwardCacheStrings.ts | webShare":{"message":"Pages that use WebShare are not currently eligible for back/forwad cache."},"panels/application/components/BackForwardCacheStrings.ts | webSocket":{"message":"Pages with WebSocket cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webSocketSticky":{"message":"Back/forward cache is disabled because WebSocket has been used."},"panels/application/components/BackForwardCacheStrings.ts | webTransport":{"message":"Pages with WebTransport cannot enter back/forward cache."},"panels/application/components/BackForwardCacheStrings.ts | webTransportSticky":{"message":"Back/forward cache is disabled because WebTransport has been used."},"panels/application/components/BackForwardCacheStrings.ts | webXR":{"message":"Pages that use WebXR are not currently eligible for back/forward cache."},"panels/application/components/BackForwardCacheView.ts | backForwardCacheTitle":{"message":"Back/forward cache"},"panels/application/components/BackForwardCacheView.ts | blankURLTitle":{"message":"Blank URL [{PH1}]"},"panels/application/components/BackForwardCacheView.ts | blockingExtensionId":{"message":"Extension id: "},"panels/application/components/BackForwardCacheView.ts | circumstantial":{"message":"Not Actionable"},"panels/application/components/BackForwardCacheView.ts | circumstantialExplanation":{"message":"These reasons are not actionable i.e. caching was prevented by something outside of the direct control of the page."},"panels/application/components/BackForwardCacheView.ts | filesPerIssue":{"message":"{n, plural, =1 {# file} other {# files}}"},"panels/application/components/BackForwardCacheView.ts | framesPerIssue":{"message":"{n, plural, =1 {# frame} other {# frames}}"},"panels/application/components/BackForwardCacheView.ts | framesTitle":{"message":"Frames"},"panels/application/components/BackForwardCacheView.ts | issuesInMultipleFrames":{"message":"{n, plural, =1 {# issue found in {m} frames.} other {# issues found in {m} frames.}}"},"panels/application/components/BackForwardCacheView.ts | issuesInSingleFrame":{"message":"{n, plural, =1 {# issue found in 1 frame.} other {# issues found in 1 frame.}}"},"panels/application/components/BackForwardCacheView.ts | learnMore":{"message":"Learn more: back/forward cache eligibility"},"panels/application/components/BackForwardCacheView.ts | mainFrame":{"message":"Main Frame"},"panels/application/components/BackForwardCacheView.ts | neverUseUnload":{"message":"Learn more: Never use unload handler"},"panels/application/components/BackForwardCacheView.ts | normalNavigation":{"message":"Not served from back/forward cache: to trigger back/forward cache, use Chrome's back/forward buttons, or use the test button below to automatically navigate away and back."},"panels/application/components/BackForwardCacheView.ts | pageSupportNeeded":{"message":"Actionable"},"panels/application/components/BackForwardCacheView.ts | pageSupportNeededExplanation":{"message":"These reasons are actionable i.e. they can be cleaned up to make the page eligible for back/forward cache."},"panels/application/components/BackForwardCacheView.ts | restoredFromBFCache":{"message":"Successfully served from back/forward cache."},"panels/application/components/BackForwardCacheView.ts | runningTest":{"message":"Running test"},"panels/application/components/BackForwardCacheView.ts | runTest":{"message":"Test back/forward cache"},"panels/application/components/BackForwardCacheView.ts | supportPending":{"message":"Pending Support"},"panels/application/components/BackForwardCacheView.ts | supportPendingExplanation":{"message":"Chrome support for these reasons is pending i.e. they will not prevent the page from being eligible for back/forward cache in a future version of Chrome."},"panels/application/components/BackForwardCacheView.ts | unavailable":{"message":"unavailable"},"panels/application/components/BackForwardCacheView.ts | unknown":{"message":"Unknown Status"},"panels/application/components/BackForwardCacheView.ts | url":{"message":"URL:"},"panels/application/components/BounceTrackingMitigationsView.ts | bounceTrackingMitigationsTitle":{"message":"Bounce tracking mitigations"},"panels/application/components/BounceTrackingMitigationsView.ts | checkingPotentialTrackers":{"message":"Checking for potential bounce tracking sites."},"panels/application/components/BounceTrackingMitigationsView.ts | featureDisabled":{"message":"Bounce tracking mitigations are disabled. To enable them, set the flag at {PH1} to \"Enabled With Deletion\"."},"panels/application/components/BounceTrackingMitigationsView.ts | featureFlag":{"message":"Bounce Tracking Mitigations Feature Flag"},"panels/application/components/BounceTrackingMitigationsView.ts | forceRun":{"message":"Force run"},"panels/application/components/BounceTrackingMitigationsView.ts | learnMore":{"message":"Learn more: Bounce Tracking Mitigations"},"panels/application/components/BounceTrackingMitigationsView.ts | noPotentialBounceTrackersIdentified":{"message":"State was not cleared for any potential bounce tracking sites. Either none were identified or third-party cookies are not blocked."},"panels/application/components/BounceTrackingMitigationsView.ts | runningMitigations":{"message":"Running"},"panels/application/components/BounceTrackingMitigationsView.ts | stateDeletedFor":{"message":"State was deleted for the following sites:"},"panels/application/components/EndpointsGrid.ts | noEndpointsToDisplay":{"message":"No endpoints to display"},"panels/application/components/FrameDetailsView.ts | additionalInformation":{"message":"Additional Information"},"panels/application/components/FrameDetailsView.ts | adStatus":{"message":"Ad Status"},"panels/application/components/FrameDetailsView.ts | aFrameAncestorIsAnInsecure":{"message":"A frame ancestor is an insecure context"},"panels/application/components/FrameDetailsView.ts | apiAvailability":{"message":"API availability"},"panels/application/components/FrameDetailsView.ts | availabilityOfCertainApisDepends":{"message":"Availability of certain APIs depends on the document being cross-origin isolated."},"panels/application/components/FrameDetailsView.ts | available":{"message":"available"},"panels/application/components/FrameDetailsView.ts | availableNotTransferable":{"message":"available, not transferable"},"panels/application/components/FrameDetailsView.ts | availableTransferable":{"message":"available, transferable"},"panels/application/components/FrameDetailsView.ts | child":{"message":"child"},"panels/application/components/FrameDetailsView.ts | childDescription":{"message":"This frame has been identified as a child frame of an ad"},"panels/application/components/FrameDetailsView.ts | clickToRevealInElementsPanel":{"message":"Click to reveal in Elements panel"},"panels/application/components/FrameDetailsView.ts | clickToRevealInNetworkPanel":{"message":"Click to reveal in Network panel"},"panels/application/components/FrameDetailsView.ts | clickToRevealInNetworkPanelMight":{"message":"Click to reveal in Network panel (might require page reload)"},"panels/application/components/FrameDetailsView.ts | clickToRevealInSourcesPanel":{"message":"Click to reveal in Sources panel"},"panels/application/components/FrameDetailsView.ts | contentSecurityPolicy":{"message":"Content Security Policy (CSP)"},"panels/application/components/FrameDetailsView.ts | createdByAdScriptExplanation":{"message":"There was an ad script in the (async) stack when this frame was created. Examining the creation stack trace of this frame might provide more insight."},"panels/application/components/FrameDetailsView.ts | creationStackTrace":{"message":"Frame Creation Stack Trace"},"panels/application/components/FrameDetailsView.ts | creationStackTraceExplanation":{"message":"This frame was created programmatically. The stack trace shows where this happened."},"panels/application/components/FrameDetailsView.ts | creatorAdScript":{"message":"Creator Ad Script"},"panels/application/components/FrameDetailsView.ts | crossoriginIsolated":{"message":"Cross-Origin Isolated"},"panels/application/components/FrameDetailsView.ts | document":{"message":"Document"},"panels/application/components/FrameDetailsView.ts | frameId":{"message":"Frame ID"},"panels/application/components/FrameDetailsView.ts | learnMore":{"message":"Learn more"},"panels/application/components/FrameDetailsView.ts | localhostIsAlwaysASecureContext":{"message":"Localhost is always a secure context"},"panels/application/components/FrameDetailsView.ts | matchedBlockingRuleExplanation":{"message":"This frame is considered an ad frame because its current (or previous) main document is an ad resource."},"panels/application/components/FrameDetailsView.ts | measureMemory":{"message":"Measure Memory"},"panels/application/components/FrameDetailsView.ts | no":{"message":"No"},"panels/application/components/FrameDetailsView.ts | none":{"message":"None"},"panels/application/components/FrameDetailsView.ts | origin":{"message":"Origin"},"panels/application/components/FrameDetailsView.ts | originTrialsExplanation":{"message":"Origin trials give you access to a new or experimental feature."},"panels/application/components/FrameDetailsView.ts | ownerElement":{"message":"Owner Element"},"panels/application/components/FrameDetailsView.ts | parentIsAdExplanation":{"message":"This frame is considered an ad frame because its parent frame is an ad frame."},"panels/application/components/FrameDetailsView.ts | reportingTo":{"message":"reporting to"},"panels/application/components/FrameDetailsView.ts | requiresCrossoriginIsolated":{"message":"requires cross-origin isolated context"},"panels/application/components/FrameDetailsView.ts | root":{"message":"root"},"panels/application/components/FrameDetailsView.ts | rootDescription":{"message":"This frame has been identified as the root frame of an ad"},"panels/application/components/FrameDetailsView.ts | secureContext":{"message":"Secure Context"},"panels/application/components/FrameDetailsView.ts | securityIsolation":{"message":"Security & Isolation"},"panels/application/components/FrameDetailsView.ts | sharedarraybufferConstructorIs":{"message":"SharedArrayBuffer constructor is available and SABs can be transferred via postMessage"},"panels/application/components/FrameDetailsView.ts | sharedarraybufferConstructorIsAvailable":{"message":"SharedArrayBuffer constructor is available but SABs cannot be transferred via postMessage"},"panels/application/components/FrameDetailsView.ts | theFramesSchemeIsInsecure":{"message":"The frame's scheme is insecure"},"panels/application/components/FrameDetailsView.ts | thePerformanceAPI":{"message":"The performance.measureUserAgentSpecificMemory() API is available"},"panels/application/components/FrameDetailsView.ts | thePerformancemeasureuseragentspecificmemory":{"message":"The performance.measureUserAgentSpecificMemory() API is not available"},"panels/application/components/FrameDetailsView.ts | thisAdditionalDebugging":{"message":"This additional (debugging) information is shown because the 'Protocol Monitor' experiment is enabled."},"panels/application/components/FrameDetailsView.ts | transferRequiresCrossoriginIsolatedPermission":{"message":"SharedArrayBuffer transfer requires enabling the permission policy:"},"panels/application/components/FrameDetailsView.ts | unavailable":{"message":"unavailable"},"panels/application/components/FrameDetailsView.ts | unreachableUrl":{"message":"Unreachable URL"},"panels/application/components/FrameDetailsView.ts | url":{"message":"URL"},"panels/application/components/FrameDetailsView.ts | willRequireCrossoriginIsolated":{"message":"⚠️ will require cross-origin isolated context in the future"},"panels/application/components/FrameDetailsView.ts | yes":{"message":"Yes"},"panels/application/components/InterestGroupAccessGrid.ts | allInterestGroupStorageEvents":{"message":"All interest group storage events."},"panels/application/components/InterestGroupAccessGrid.ts | eventTime":{"message":"Event Time"},"panels/application/components/InterestGroupAccessGrid.ts | eventType":{"message":"Access Type"},"panels/application/components/InterestGroupAccessGrid.ts | groupName":{"message":"Name"},"panels/application/components/InterestGroupAccessGrid.ts | groupOwner":{"message":"Owner"},"panels/application/components/InterestGroupAccessGrid.ts | noEvents":{"message":"No interest group events recorded."},"panels/application/components/OriginTrialTreeView.ts | expiryTime":{"message":"Expiry Time"},"panels/application/components/OriginTrialTreeView.ts | isThirdParty":{"message":"Third Party"},"panels/application/components/OriginTrialTreeView.ts | matchSubDomains":{"message":"Subdomain Matching"},"panels/application/components/OriginTrialTreeView.ts | noTrialTokens":{"message":"No trial tokens"},"panels/application/components/OriginTrialTreeView.ts | origin":{"message":"Origin"},"panels/application/components/OriginTrialTreeView.ts | rawTokenText":{"message":"Raw Token"},"panels/application/components/OriginTrialTreeView.ts | status":{"message":"Token Status"},"panels/application/components/OriginTrialTreeView.ts | token":{"message":"Token"},"panels/application/components/OriginTrialTreeView.ts | tokens":{"message":"{PH1} tokens"},"panels/application/components/OriginTrialTreeView.ts | trialName":{"message":"Trial Name"},"panels/application/components/OriginTrialTreeView.ts | usageRestriction":{"message":"Usage Restriction"},"panels/application/components/PermissionsPolicySection.ts | allowedFeatures":{"message":"Allowed Features"},"panels/application/components/PermissionsPolicySection.ts | clickToShowHeader":{"message":"Click to reveal the request whose \"Permissions-Policy\" HTTP header disables this feature."},"panels/application/components/PermissionsPolicySection.ts | clickToShowIframe":{"message":"Click to reveal the top-most iframe which does not allow this feature in the elements panel."},"panels/application/components/PermissionsPolicySection.ts | disabledByFencedFrame":{"message":"disabled inside a fencedframe"},"panels/application/components/PermissionsPolicySection.ts | disabledByHeader":{"message":"disabled by \"Permissions-Policy\" header"},"panels/application/components/PermissionsPolicySection.ts | disabledByIframe":{"message":"missing in iframe \"allow\" attribute"},"panels/application/components/PermissionsPolicySection.ts | disabledFeatures":{"message":"Disabled Features"},"panels/application/components/PermissionsPolicySection.ts | hideDetails":{"message":"Hide details"},"panels/application/components/PermissionsPolicySection.ts | showDetails":{"message":"Show details"},"panels/application/components/ProtocolHandlersView.ts | dropdownLabel":{"message":"Select protocol handler"},"panels/application/components/ProtocolHandlersView.ts | manifest":{"message":"manifest"},"panels/application/components/ProtocolHandlersView.ts | needHelpReadOur":{"message":"Need help? Read {PH1}."},"panels/application/components/ProtocolHandlersView.ts | protocolDetected":{"message":"Found valid protocol handler registration in the {PH1}. With the app installed, test the registered protocols."},"panels/application/components/ProtocolHandlersView.ts | protocolHandlerRegistrations":{"message":"URL protocol handler registration for PWAs"},"panels/application/components/ProtocolHandlersView.ts | protocolNotDetected":{"message":"Define protocol handlers in the {PH1} to register your app as a handler for custom protocols when your app is installed."},"panels/application/components/ProtocolHandlersView.ts | testProtocol":{"message":"Test protocol"},"panels/application/components/ProtocolHandlersView.ts | textboxLabel":{"message":"Query parameter or endpoint for protocol handler"},"panels/application/components/ProtocolHandlersView.ts | textboxPlaceholder":{"message":"Enter URL"},"panels/application/components/ReportsGrid.ts | destination":{"message":"Destination"},"panels/application/components/ReportsGrid.ts | generatedAt":{"message":"Generated at"},"panels/application/components/ReportsGrid.ts | noReportsToDisplay":{"message":"No reports to display"},"panels/application/components/ReportsGrid.ts | status":{"message":"Status"},"panels/application/components/SharedStorageAccessGrid.ts | allSharedStorageEvents":{"message":"All shared storage events for this page."},"panels/application/components/SharedStorageAccessGrid.ts | eventParams":{"message":"Optional Event Params"},"panels/application/components/SharedStorageAccessGrid.ts | eventTime":{"message":"Event Time"},"panels/application/components/SharedStorageAccessGrid.ts | eventType":{"message":"Access Type"},"panels/application/components/SharedStorageAccessGrid.ts | mainFrameId":{"message":"Main Frame ID"},"panels/application/components/SharedStorageAccessGrid.ts | noEvents":{"message":"No shared storage events recorded."},"panels/application/components/SharedStorageAccessGrid.ts | ownerOrigin":{"message":"Owner Origin"},"panels/application/components/SharedStorageAccessGrid.ts | sharedStorage":{"message":"Shared storage"},"panels/application/components/SharedStorageMetadataView.ts | budgetExplanation":{"message":"Remaining data leakage allowed within a 24-hour period for this origin in bits of entropy"},"panels/application/components/SharedStorageMetadataView.ts | creation":{"message":"Creation Time"},"panels/application/components/SharedStorageMetadataView.ts | entropyBudget":{"message":"Entropy Budget for Fenced Frames"},"panels/application/components/SharedStorageMetadataView.ts | notYetCreated":{"message":"Not yet created"},"panels/application/components/SharedStorageMetadataView.ts | numBytesUsed":{"message":"Number of Bytes Used"},"panels/application/components/SharedStorageMetadataView.ts | numEntries":{"message":"Number of Entries"},"panels/application/components/SharedStorageMetadataView.ts | resetBudget":{"message":"Reset Budget"},"panels/application/components/SharedStorageMetadataView.ts | sharedStorage":{"message":"Shared storage"},"panels/application/components/StackTrace.ts | cannotRenderStackTrace":{"message":"Cannot render stack trace"},"panels/application/components/StackTrace.ts | creationStackTrace":{"message":"Frame Creation Stack Trace"},"panels/application/components/StackTrace.ts | showLess":{"message":"Show less"},"panels/application/components/StackTrace.ts | showSMoreFrames":{"message":"{n, plural, =1 {Show # more frame} other {Show # more frames}}"},"panels/application/components/StorageMetadataView.ts | bucketName":{"message":"Bucket name"},"panels/application/components/StorageMetadataView.ts | confirmBucketDeletion":{"message":"Delete the \"{PH1}\" bucket?"},"panels/application/components/StorageMetadataView.ts | defaultBucket":{"message":"Default bucket"},"panels/application/components/StorageMetadataView.ts | deleteBucket":{"message":"Delete bucket"},"panels/application/components/StorageMetadataView.ts | durability":{"message":"Durability"},"panels/application/components/StorageMetadataView.ts | expiration":{"message":"Expiration"},"panels/application/components/StorageMetadataView.ts | isOpaque":{"message":"Is opaque"},"panels/application/components/StorageMetadataView.ts | isThirdParty":{"message":"Is third-party"},"panels/application/components/StorageMetadataView.ts | loading":{"message":"Loading…"},"panels/application/components/StorageMetadataView.ts | no":{"message":"No"},"panels/application/components/StorageMetadataView.ts | none":{"message":"None"},"panels/application/components/StorageMetadataView.ts | opaque":{"message":"(opaque)"},"panels/application/components/StorageMetadataView.ts | origin":{"message":"Origin"},"panels/application/components/StorageMetadataView.ts | persistent":{"message":"Is persistent"},"panels/application/components/StorageMetadataView.ts | quota":{"message":"Quota"},"panels/application/components/StorageMetadataView.ts | topLevelSite":{"message":"Top-level site"},"panels/application/components/StorageMetadataView.ts | yes":{"message":"Yes"},"panels/application/components/StorageMetadataView.ts | yesBecauseAncestorChainHasCrossSite":{"message":"Yes, because the ancestry chain contains a third-party origin"},"panels/application/components/StorageMetadataView.ts | yesBecauseKeyIsOpaque":{"message":"Yes, because the storage key is opaque"},"panels/application/components/StorageMetadataView.ts | yesBecauseOriginNotInTopLevelSite":{"message":"Yes, because the origin is outside of the top-level site"},"panels/application/components/StorageMetadataView.ts | yesBecauseTopLevelIsOpaque":{"message":"Yes, because the top-level site is opaque"},"panels/application/components/TrustTokensView.ts | allStoredTrustTokensAvailableIn":{"message":"All stored private state tokens available in this browser instance."},"panels/application/components/TrustTokensView.ts | deleteTrustTokens":{"message":"Delete all stored private state tokens issued by {PH1}."},"panels/application/components/TrustTokensView.ts | issuer":{"message":"Issuer"},"panels/application/components/TrustTokensView.ts | noTrustTokensStored":{"message":"No private state tokens are currently stored."},"panels/application/components/TrustTokensView.ts | storedTokenCount":{"message":"Stored token count"},"panels/application/components/TrustTokensView.ts | trustTokens":{"message":"Private state tokens"},"panels/application/CookieItemsView.ts | clearAllCookies":{"message":"Clear all cookies"},"panels/application/CookieItemsView.ts | clearFilteredCookies":{"message":"Clear filtered cookies"},"panels/application/CookieItemsView.ts | cookies":{"message":"Cookies"},"panels/application/CookieItemsView.ts | numberOfCookiesShownInTableS":{"message":"Number of cookies shown in table: {PH1}"},"panels/application/CookieItemsView.ts | onlyShowCookiesWhichHaveAn":{"message":"Only show cookies that have an associated issue"},"panels/application/CookieItemsView.ts | onlyShowCookiesWithAnIssue":{"message":"Only show cookies with an issue"},"panels/application/CookieItemsView.ts | selectACookieToPreviewItsValue":{"message":"Select a cookie to preview its value"},"panels/application/CookieItemsView.ts | showUrlDecoded":{"message":"Show URL-decoded"},"panels/application/DOMStorageItemsView.ts | domStorage":{"message":"DOM Storage"},"panels/application/DOMStorageItemsView.ts | domStorageItemDeleted":{"message":"The storage item was deleted."},"panels/application/DOMStorageItemsView.ts | domStorageItems":{"message":"DOM Storage Items"},"panels/application/DOMStorageItemsView.ts | domStorageItemsCleared":{"message":"DOM Storage Items cleared"},"panels/application/DOMStorageItemsView.ts | domStorageNumberEntries":{"message":"Number of entries shown in table: {PH1}"},"panels/application/DOMStorageItemsView.ts | key":{"message":"Key"},"panels/application/DOMStorageItemsView.ts | selectAValueToPreview":{"message":"Select a value to preview"},"panels/application/DOMStorageItemsView.ts | value":{"message":"Value"},"panels/application/IndexedDBViews.ts | clearObjectStore":{"message":"Clear object store"},"panels/application/IndexedDBViews.ts | collapse":{"message":"Collapse"},"panels/application/IndexedDBViews.ts | dataMayBeStale":{"message":"Data may be stale"},"panels/application/IndexedDBViews.ts | deleteDatabase":{"message":"Delete database"},"panels/application/IndexedDBViews.ts | deleteSelected":{"message":"Delete selected"},"panels/application/IndexedDBViews.ts | expandRecursively":{"message":"Expand Recursively"},"panels/application/IndexedDBViews.ts | idb":{"message":"IDB"},"panels/application/IndexedDBViews.ts | indexedDb":{"message":"Indexed DB"},"panels/application/IndexedDBViews.ts | keyGeneratorValueS":{"message":"Key generator value: {PH1}"},"panels/application/IndexedDBViews.ts | keyPath":{"message":"Key path: "},"panels/application/IndexedDBViews.ts | keyString":{"message":"Key"},"panels/application/IndexedDBViews.ts | objectStores":{"message":"Object stores"},"panels/application/IndexedDBViews.ts | pleaseConfirmDeleteOfSDatabase":{"message":"Please confirm delete of \"{PH1}\" database."},"panels/application/IndexedDBViews.ts | primaryKey":{"message":"Primary key"},"panels/application/IndexedDBViews.ts | refresh":{"message":"Refresh"},"panels/application/IndexedDBViews.ts | refreshDatabase":{"message":"Refresh database"},"panels/application/IndexedDBViews.ts | showNextPage":{"message":"Show next page"},"panels/application/IndexedDBViews.ts | showPreviousPage":{"message":"Show previous page"},"panels/application/IndexedDBViews.ts | someEntriesMayHaveBeenModified":{"message":"Some entries may have been modified"},"panels/application/IndexedDBViews.ts | startFromKey":{"message":"Start from key"},"panels/application/IndexedDBViews.ts | totalEntriesS":{"message":"Total entries: {PH1}"},"panels/application/IndexedDBViews.ts | valueString":{"message":"Value"},"panels/application/IndexedDBViews.ts | version":{"message":"Version"},"panels/application/InterestGroupStorageView.ts | clickToDisplayBody":{"message":"Click on any interest group event to display the group's current state"},"panels/application/InterestGroupStorageView.ts | noDataAvailable":{"message":"No details available for the selected interest group. The browser may have left the group."},"panels/application/InterestGroupTreeElement.ts | interestGroups":{"message":"Interest groups"},"panels/application/OpenedWindowDetailsView.ts | accessToOpener":{"message":"Access to opener"},"panels/application/OpenedWindowDetailsView.ts | clickToRevealInElementsPanel":{"message":"Click to reveal in Elements panel"},"panels/application/OpenedWindowDetailsView.ts | closed":{"message":"closed"},"panels/application/OpenedWindowDetailsView.ts | crossoriginEmbedderPolicy":{"message":"Cross-Origin Embedder Policy"},"panels/application/OpenedWindowDetailsView.ts | document":{"message":"Document"},"panels/application/OpenedWindowDetailsView.ts | no":{"message":"No"},"panels/application/OpenedWindowDetailsView.ts | openerFrame":{"message":"Opener Frame"},"panels/application/OpenedWindowDetailsView.ts | reportingTo":{"message":"reporting to"},"panels/application/OpenedWindowDetailsView.ts | security":{"message":"Security"},"panels/application/OpenedWindowDetailsView.ts | securityIsolation":{"message":"Security & Isolation"},"panels/application/OpenedWindowDetailsView.ts | showsWhetherTheOpenedWindowIs":{"message":"Shows whether the opened window is able to access its opener and vice versa"},"panels/application/OpenedWindowDetailsView.ts | type":{"message":"Type"},"panels/application/OpenedWindowDetailsView.ts | unknown":{"message":"Unknown"},"panels/application/OpenedWindowDetailsView.ts | url":{"message":"URL"},"panels/application/OpenedWindowDetailsView.ts | webWorker":{"message":"Web Worker"},"panels/application/OpenedWindowDetailsView.ts | windowWithoutTitle":{"message":"Window without title"},"panels/application/OpenedWindowDetailsView.ts | worker":{"message":"worker"},"panels/application/OpenedWindowDetailsView.ts | yes":{"message":"Yes"},"panels/application/preloading/components/MismatchedPreloadingGrid.ts | action":{"message":"Action"},"panels/application/preloading/components/MismatchedPreloadingGrid.ts | status":{"message":"Status"},"panels/application/preloading/components/MismatchedPreloadingGrid.ts | statusFailure":{"message":"Failure"},"panels/application/preloading/components/MismatchedPreloadingGrid.ts | statusNotTriggered":{"message":"Not triggered"},"panels/application/preloading/components/MismatchedPreloadingGrid.ts | statusPending":{"message":"Pending"},"panels/application/preloading/components/MismatchedPreloadingGrid.ts | statusReady":{"message":"Ready"},"panels/application/preloading/components/MismatchedPreloadingGrid.ts | statusRunning":{"message":"Running"},"panels/application/preloading/components/MismatchedPreloadingGrid.ts | statusSuccess":{"message":"Success"},"panels/application/preloading/components/MismatchedPreloadingGrid.ts | url":{"message":"URL"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | buttonClickToInspect":{"message":"Click to inspect prerendered page"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | buttonClickToRevealRuleSet":{"message":"Click to reveal rule set"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | buttonInspect":{"message":"Inspect"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusFailure":{"message":"Speculative load failed."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusNotTriggered":{"message":"Speculative load attempt is not yet triggered."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusPending":{"message":"Speculative load attempt is eligible but pending."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusReady":{"message":"Speculative load finished and the result is ready for the next navigation."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusRunning":{"message":"Speculative load is running."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailedStatusSuccess":{"message":"Speculative load finished and used for a navigation."},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsAction":{"message":"Action"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsDetailedInformation":{"message":"Detailed information"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsFailureReason":{"message":"Failure reason"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsRuleSet":{"message":"Rule set"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | detailsStatus":{"message":"Status"},"panels/application/preloading/components/PreloadingDetailsReportView.ts | selectAnElementForMoreDetails":{"message":"Select an element for more details"},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | descriptionDisabledByBatterySaver":{"message":"Speculative loading is disabled because of the operating system's Battery Saver mode."},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | descriptionDisabledByDataSaver":{"message":"Speculative loading is disabled because of the operating system's Data Saver mode."},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | descriptionDisabledByHoldbackPrefetchSpeculationRules":{"message":"Prefetch is forced-enabled because DevTools is open. When DevTools is closed, prefetch will be disabled because this browser session is part of a holdback group used for performance comparisons."},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | descriptionDisabledByHoldbackPrerenderSpeculationRules":{"message":"Prerendering is forced-enabled because DevTools is open. When DevTools is closed, prerendering will be disabled because this browser session is part of a holdback group used for performance comparisons."},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | descriptionDisabledByPreference":{"message":"Speculative loading is disabled because of user settings or an extension. Go to {PH1} to update your preference. Go to {PH2} to disable any extension that blocks speculative loading."},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | extensionsSettings":{"message":"Extensions settings"},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | footerLearnMore":{"message":"Learn more"},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | headerDisabledByBatterySaver":{"message":"Battery Saver"},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | headerDisabledByDataSaver":{"message":"Data Saver"},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | headerDisabledByHoldbackPrefetchSpeculationRules":{"message":"Prefetch was disabled, but is force-enabled now"},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | headerDisabledByHoldbackPrerenderSpeculationRules":{"message":"Prerendering was disabled, but is force-enabled now"},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | headerDisabledByPreference":{"message":"User settings or extensions"},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | infobarPreloadingIsDisabled":{"message":"Speculative loading is disabled"},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | infobarPreloadingIsForceEnabled":{"message":"Speculative loading is force-enabled"},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | preloadingPagesSettings":{"message":"Preload pages settings"},"panels/application/preloading/components/PreloadingDisabledInfobar.ts | titleReasonsPreventingPreloading":{"message":"Reasons preventing speculative loading"},"panels/application/preloading/components/PreloadingGrid.ts | action":{"message":"Action"},"panels/application/preloading/components/PreloadingGrid.ts | ruleSet":{"message":"Rule set"},"panels/application/preloading/components/PreloadingGrid.ts | status":{"message":"Status"},"panels/application/preloading/components/PreloadingMismatchedHeadersGrid.ts | activationNavigationValue":{"message":"Value in activation navigation"},"panels/application/preloading/components/PreloadingMismatchedHeadersGrid.ts | headerName":{"message":"Header name"},"panels/application/preloading/components/PreloadingMismatchedHeadersGrid.ts | initialNavigationValue":{"message":"Value in initial navigation"},"panels/application/preloading/components/PreloadingMismatchedHeadersGrid.ts | missing":{"message":"(missing)"},"panels/application/preloading/components/PreloadingString.ts | PrefetchEvictedAfterCandidateRemoved":{"message":"The prefetch was discarded because no speculation rule in the initating page triggers a prefetch for this URL anymore."},"panels/application/preloading/components/PreloadingString.ts | PrefetchEvictedForNewerPrefetch":{"message":"The prefetch was discarded because the initiating page has too many prefetches ongoing, and this was one of the oldest."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedIneligibleRedirect":{"message":"The prefetch was redirected, but the redirect URL is not eligible for prefetch."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedInvalidRedirect":{"message":"The prefetch was redirected, but there was a problem with the redirect."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedMIMENotSupported":{"message":"The prefetch failed because the response's Content-Type header was not supported."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedNetError":{"message":"The prefetch failed because of a network error."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedNon2XX":{"message":"The prefetch failed because of a non-2xx HTTP response status code."},"panels/application/preloading/components/PreloadingString.ts | PrefetchFailedPerPageLimitExceeded":{"message":"The prefetch was not performed because the initiating page already has too many prefetches ongoing."},"panels/application/preloading/components/PreloadingString.ts | PrefetchIneligibleRetryAfter":{"message":"A previous prefetch to the origin got a HTTP 503 response with an Retry-After header that has not elapsed yet."},"panels/application/preloading/components/PreloadingString.ts | PrefetchIsPrivacyDecoy":{"message":"The URL was not eligible to be prefetched because there was a registered service worker or cross-site cookies for that origin, but the prefetch was put on the network anyways and not used, to disguise that the user had some kind of previous relationship with the origin."},"panels/application/preloading/components/PreloadingString.ts | PrefetchIsStale":{"message":"Too much time elapsed between the prefetch and usage, so the prefetch was discarded."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleBatterySaverEnabled":{"message":"The prefetch was not performed because the Battery Saver setting was enabled."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleBrowserContextOffTheRecord":{"message":"The prefetch was not performed because the browser is in Incognito or Guest mode."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleDataSaverEnabled":{"message":"The prefetch was not performed because the operating system is in Data Saver mode."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleExistingProxy":{"message":"The URL is not eligible to be prefetched, because in the default network context it is configured to use a proxy server."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleHostIsNonUnique":{"message":"The URL was not eligible to be prefetched because its host was not unique (e.g., a non publicly routable IP address or a hostname which is not registry-controlled), but the prefetch was required to be proxied."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleNonDefaultStoragePartition":{"message":"The URL was not eligible to be prefetched because it uses a non-default storage partition."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligiblePreloadingDisabled":{"message":"The prefetch was not performed because speculative loading was disabled."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy":{"message":"The URL was not eligible to be prefetched because the default network context cannot be configured to use the prefetch proxy for a same-site cross-origin prefetch request."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleSchemeIsNotHttps":{"message":"The URL was not eligible to be prefetched because its scheme was not https:."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleUserHasCookies":{"message":"The URL was not eligible to be prefetched because it was cross-site, but the user had cookies for that origin."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotEligibleUserHasServiceWorker":{"message":"The URL was not eligible to be prefetched because there was a registered service worker for that origin, which is currently not supported."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotUsedCookiesChanged":{"message":"The prefetch was not used because it was a cross-site prefetch, and cookies were added for that URL while the prefetch was ongoing, so the prefetched response is now out-of-date."},"panels/application/preloading/components/PreloadingString.ts | PrefetchNotUsedProbeFailed":{"message":"The prefetch was blocked by your Internet Service Provider or network administrator."},"panels/application/preloading/components/PreloadingString.ts | PrefetchProxyNotAvailable":{"message":"A network error was encountered when trying to set up a connection to the prefetching proxy."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusActivatedDuringMainFrameNavigation":{"message":"Prerendered page activated during initiating page's main frame navigation."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusActivatedWithAuxiliaryBrowsingContexts":{"message":"The prerender was not used because during activation time, there were other windows with an active opener reference to the initiating page, which is currently not supported."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusActivationFramePolicyNotCompatible":{"message":"The prerender was not used because the sandboxing flags or permissions policy of the initiating page was not compatible with those of the prerendering page."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusActivationNavigationParameterMismatch":{"message":"The prerender was not used because during activation time, different navigation parameters (e.g., HTTP headers) were calculated than during the original prerendering navigation request."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusActivationUrlHasEffectiveUrl":{"message":"The prerender was not used because during activation time, navigation has an effective URL that is different from its normal URL. (For example, the New Tab Page, or hosted apps.)"},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusAudioOutputDeviceRequested":{"message":"The prerendered page requested audio output, which is currently not supported."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusBatterySaverEnabled":{"message":"The prerender was not performed because the user requested that the browser use less battery."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusBlockedByClient":{"message":"Some resource load was blocked."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusClientCertRequested":{"message":"The prerendering navigation required a HTTP client certificate."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusCrossSiteNavigationInInitialNavigation":{"message":"The prerendering navigation failed because it targeted a cross-site URL."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusCrossSiteNavigationInMainFrameNavigation":{"message":"The prerendered page navigated to a cross-site URL."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusCrossSiteRedirectInInitialNavigation":{"message":"The prerendering navigation failed because the prerendered URL redirected to a cross-site URL."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusCrossSiteRedirectInMainFrameNavigation":{"message":"The prerendered page navigated to a URL which redirected to a cross-site URL."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusDataSaverEnabled":{"message":"The prerender was not performed because the user requested that the browser use less data."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusDownload":{"message":"The prerendered page attempted to initiate a download, which is currently not supported."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusHasEffectiveUrl":{"message":"The initiating page cannot perform prerendering, because it has an effective URL that is different from its normal URL. (For example, the New Tab Page, or hosted apps.)"},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusInvalidSchemeNavigation":{"message":"The URL was not eligible to be prerendered because its scheme was not http: or https:."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusInvalidSchemeRedirect":{"message":"The prerendering navigation failed because it redirected to a URL whose scheme was not http: or https:."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusLoginAuthRequested":{"message":"The prerendering navigation required HTTP authentication, which is currently not supported."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusLowEndDevice":{"message":"The prerender was not performed because this device does not have enough total system memory to support prerendering."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusMainFrameNavigation":{"message":"The prerendered page navigated itself to another URL, which is currently not supported."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusMaxNumOfRunningEagerPrerendersExceeded":{"message":"The prerender whose eagerness is \"eager\" was not performed because the initiating page already has too many prerenders ongoing. Remove other speculation rules with \"eager\" to enable further prerendering."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusMaxNumOfRunningEmbedderPrerendersExceeded":{"message":"The browser-triggered prerender was not performed because the initiating page already has too many prerenders ongoing."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusMaxNumOfRunningNonEagerPrerendersExceeded":{"message":"The old non-eager prerender (with a \"moderate\" or \"conservative\" eagerness and triggered by hovering or clicking links) was automatically canceled due to starting a new non-eager prerender. It can be retriggered by interacting with the link again."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusMemoryLimitExceeded":{"message":"The prerender was not performed because the browser exceeded the prerendering memory limit."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusMemoryPressureAfterTriggered":{"message":"The prerendered page was unloaded because the browser came under critical memory pressure."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusMemoryPressureOnTrigger":{"message":"The prerender was not performed because the browser was under critical memory pressure."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusMixedContent":{"message":"The prerendered page contained mixed content."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusMojoBinderPolicy":{"message":"The prerendered page used a forbidden JavaScript API that is currently not supported. (Internal Mojo interface: {PH1})"},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusNavigationBadHttpStatus":{"message":"The prerendering navigation failed because of a non-2xx HTTP response status code."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusNavigationRequestBlockedByCsp":{"message":"The prerendering navigation was blocked by a Content Security Policy."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusNavigationRequestNetworkError":{"message":"The prerendering navigation encountered a network error."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusPreloadingDisabled":{"message":"The prerender was not performed because the user disabled preloading in their browser settings."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusPrerenderingDisabledByDevTools":{"message":"The prerender was not performed because DevTools has been used to disable prerendering."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusPrerenderingUrlHasEffectiveUrl":{"message":"The prerendering navigation failed because it has an effective URL that is different from its normal URL. (For example, the New Tab Page, or hosted apps.)"},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusPrimaryMainFrameRendererProcessCrashed":{"message":"The initiating page crashed."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusPrimaryMainFrameRendererProcessKilled":{"message":"The initiating page was killed."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusRedirectedPrerenderingUrlHasEffectiveUrl":{"message":"The prerendering navigation failed because it redirected to an effective URL that is different from its normal URL. (For example, the New Tab Page, or hosted apps.)"},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusRendererProcessCrashed":{"message":"The prerendered page crashed."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusRendererProcessKilled":{"message":"The prerendered page was killed."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusSameSiteCrossOriginNavigationNotOptInInInitialNavigation":{"message":"The prerendering navigation failed because it was to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusSameSiteCrossOriginNavigationNotOptInInMainFrameNavigation":{"message":"The prerendered page navigated to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusSameSiteCrossOriginRedirectNotOptInInInitialNavigation":{"message":"The prerendering navigation failed because the prerendered URL redirected to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusSameSiteCrossOriginRedirectNotOptInInMainFrameNavigation":{"message":"The prerendered page navigated to a URL which redirected to a cross-origin same-site URL, but the destination response did not include the appropriate Supports-Loading-Mode header."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusSpeculationRuleRemoved":{"message":"The prerendered page was unloaded because the initiating page removed the corresponding prerender rule from `;\n const extensions = [CodeMirror.html.html()];\n const state = CodeMirror.EditorState.create({doc, extensions});\n for (const name of ['bar', 'baz']) {\n const from = doc.indexOf(name);\n const to = from + name.length;\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/html', from),\n {from, to},\n `did not correct highlight '${name}'`,\n );\n }\n });\n\n it('correctly returns highlight range for variables in inline event handlers', () => {\n const doc = `\n`;\n const extensions = [CodeMirror.html.html()];\n const state = CodeMirror.EditorState.create({doc, extensions});\n for (const name of ['foo', 'bar', 'baz']) {\n const from = doc.indexOf(name);\n const to = from + name.length;\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/html', from),\n {from, to},\n `did not correct highlight '${name}'`,\n );\n }\n });\n });\n\n describe('in TSX files', () => {\n it('correctly returns highlight range for field accesses', () => {\n const doc = `function foo(obj: any): number {\n return obj.x + obj.y;\n}`;\n const extensions = [CodeMirror.javascript.tsxLanguage];\n const state = CodeMirror.EditorState.create({doc, extensions});\n for (const name of ['x', 'y']) {\n const pos = doc.lastIndexOf(name);\n const from = pos - 4;\n const to = pos + name.length;\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/typescript-jsx', pos),\n {from, to},\n `did not correct highlight '${name}'`,\n );\n }\n });\n });\n });\n});\n"]} \ No newline at end of file +{"version":3,"file":"DebuggerPlugin.test.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sources/DebuggerPlugin.test.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAG7B,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAE7C,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,SAAS,MAAM,uCAAuC,CAAC;AACnE,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAC,YAAY,EAAE,uBAAuB,EAAC,MAAM,qCAAqC,CAAC;AAC1F,OAAO,EAAC,0BAA0B,EAAC,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAC,mBAAmB,EAAE,eAAe,EAAC,MAAM,iCAAiC,CAAC;AACrF,OAAO,KAAK,UAAU,MAAM,sDAAsD,CAAC;AACnF,OAAO,KAAK,UAAU,MAAM,gDAAgD,CAAC;AAE7E,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AAExC,0BAA0B,CAAC,oCAAoC,EAAE,GAAG,EAAE;IACpE,MAAM,GAAG,GAAG,wBAA2D,CAAC;IACxE,IAAI,MAAyB,CAAC;IAC9B,IAAI,OAA4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I,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE;oBAC7B,MAAM,GAAG,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;oBAClC,MAAM,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC;oBACrB,MAAM,EAAE,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC;oBAC7B,MAAM,CAAC,WAAW,CACd,4BAA4B,CAAC,KAAK,EAAE,qBAAqB,EAAE,GAAG,CAAC,EAC/D,EAAC,IAAI,EAAE,EAAE,EAAC,EACV,8BAA8B,IAAI,GAAG,CACxC,CAAC;iBACH;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["// Copyright 2022 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Platform from '../../core/platform/platform.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Protocol from '../../generated/protocol.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as TextUtils from '../../models/text_utils/text_utils.js';\nimport * as Workspace from '../../models/workspace/workspace.js';\nimport {createTarget, describeWithEnvironment} from '../../testing/EnvironmentHelpers.js';\nimport {describeWithMockConnection} from '../../testing/MockConnection.js';\nimport {MockProtocolBackend, parseScopeChain} from '../../testing/MockScopeChain.js';\nimport * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';\nimport * as TextEditor from '../../ui/components/text_editor/text_editor.js';\n\nimport * as Sources from './sources.js';\n\ndescribeWithMockConnection('Inline variable view scope helpers', () => {\n const URL = 'file:///tmp/example.js' as Platform.DevToolsPath.UrlString;\n let target: SDK.Target.Target;\n let backend: MockProtocolBackend;\n\n beforeEach(() => {\n const workspace = Workspace.Workspace.WorkspaceImpl.instance();\n const targetManager = SDK.TargetManager.TargetManager.instance();\n const resourceMapping = new Bindings.ResourceMapping.ResourceMapping(targetManager, workspace);\n const debuggerWorkspaceBinding = Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance({\n forceNew: true,\n resourceMapping,\n targetManager,\n });\n Bindings.IgnoreListManager.IgnoreListManager.instance({forceNew: true, debuggerWorkspaceBinding});\n target = createTarget();\n backend = new MockProtocolBackend();\n });\n\n async function toOffsetWithSourceMap(\n sourceMap: SDK.SourceMap.SourceMap|undefined, location: SDK.DebuggerModel.Location|null) {\n if (!location || !sourceMap) {\n return null;\n }\n const entry = sourceMap.findEntry(location.lineNumber, location.columnNumber);\n if (!entry || !entry.sourceURL) {\n return null;\n }\n const content = sourceMap.embeddedContentByURL(entry.sourceURL);\n if (!content) {\n return null;\n }\n const text = new TextUtils.Text.Text(content);\n return text.offsetFromPosition(entry.sourceLineNumber, entry.sourceColumnNumber);\n }\n\n async function toOffset(source: string|null, location: SDK.DebuggerModel.Location|null) {\n if (!location || !source) {\n return null;\n }\n const text = new TextUtils.Text.Text(source);\n return text.offsetFromPosition(location.lineNumber, location.columnNumber);\n }\n\n it('can resolve single scope mappings with source map', async () => {\n const sourceMapUrl = 'file:///tmp/example.js.min.map';\n // This example was minified with terser v5.7.0 with following command.\n // 'terser index.js -m --toplevel -o example.min.js --source-map \"url=example.min.js.map,includeSources\"'\n const source = `function o(o,n){console.log(o,n)}o(1,2);\\n//# sourceMappingURL=${sourceMapUrl}`;\n const scopes = ' { }';\n\n // The original scopes below have to match with how the source map translates the scope, so it\n // does not align perfectly with the source language scopes. In principle, this test could only\n // assert that the tests are approximately correct; currently, we assert an exact match.\n const originalSource = 'function unminified(par1, par2) {\\n console.log(par1, par2);\\n}\\nunminified(1, 2);\\n';\n const originalScopes = ' { \\n \\n }';\n const expectedOffsets = parseScopeChain(originalScopes);\n\n const sourceMapContent = {\n 'version': 3,\n 'names': ['unminified', 'par1', 'par2', 'console', 'log'],\n 'sources': ['index.js'],\n 'sourcesContent': [originalSource],\n 'mappings': 'AAAA,SAASA,EAAWC,EAAMC,GACxBC,QAAQC,IAAIH,EAAMC,EACpB,CACAF,EAAW,EAAG',\n };\n const sourceMapJson = JSON.stringify(sourceMapContent);\n\n const scopeObject = backend.createSimpleRemoteObject([{name: 'o', value: 42}, {name: 'n', value: 1}]);\n const callFrame = await backend.createCallFrame(\n target, {url: URL, content: source}, scopes, {url: sourceMapUrl, content: sourceMapJson}, [scopeObject]);\n\n // Get source map for mapping locations to 'editor' offsets.\n const sourceMap = await callFrame.debuggerModel.sourceMapManager().sourceMapForClientPromise(callFrame.script);\n\n const scopeMappings =\n await Sources.DebuggerPlugin.computeScopeMappings(callFrame, l => toOffsetWithSourceMap(sourceMap, l));\n\n const text = new TextUtils.Text.Text(originalSource);\n assert.strictEqual(scopeMappings.length, 1);\n assert.strictEqual(\n scopeMappings[0].scopeStart,\n text.offsetFromPosition(expectedOffsets[0].startLine, expectedOffsets[0].startColumn));\n assert.strictEqual(\n scopeMappings[0].scopeEnd, text.offsetFromPosition(expectedOffsets[0].endLine, expectedOffsets[0].endColumn));\n assert.strictEqual(scopeMappings[0].variableMap.get('par1')?.value, 42);\n assert.strictEqual(scopeMappings[0].variableMap.get('par2')?.value, 1);\n });\n\n it('can resolve nested scope mappings with source map', async () => {\n const sourceMapUrl = 'file:///tmp/example.js.min.map';\n // This example was minified with terser v5.7.0 with following command.\n // 'terser index.js -m --toplevel -o example.min.js --source-map \"url=example.min.js.map,includeSources\"'\n const source =\n `function o(o){const n=console.log.bind(console);for(let c=0;c} ';\n\n const originalSource =\n 'function f(n) {\\n const c = console.log.bind(console);\\n for (let i = 0; i < n; i++) c(i);\\n}\\nf(10);\\n';\n const originalScopes =\n ' { \\n \\n < >\\n }';\n const expectedOffsets = parseScopeChain(originalScopes);\n\n const sourceMapContent = {\n 'version': 3,\n 'names': ['f', 'n', 'c', 'console', 'log', 'bind', 'i'],\n 'sources': ['index.js'],\n 'sourcesContent': [originalSource],\n 'mappings':\n 'AAAA,SAASA,EAAEC,GACT,MAAMC,EAAIC,QAAQC,IAAIC,KAAKF,SAC3B,IAAK,IAAIG,EAAI,EAAGA,EAAIL,EAAGK,IAAKJ,EAAEI,EAChC,CACAN,EAAE',\n };\n const sourceMapJson = JSON.stringify(sourceMapContent);\n\n const functionScopeObject = backend.createSimpleRemoteObject([{name: 'o', value: 10}, {name: 'n', value: 1234}]);\n const forScopeObject = backend.createSimpleRemoteObject([{name: 'c', value: 5}]);\n\n const callFrame = await backend.createCallFrame(\n target, {url: URL, content: source}, scopes, {url: sourceMapUrl, content: sourceMapJson},\n [forScopeObject, functionScopeObject]);\n\n // Get source map for mapping locations to 'editor' offsets.\n const sourceMap = await callFrame.debuggerModel.sourceMapManager().sourceMapForClientPromise(callFrame.script);\n\n const scopeMappings =\n await Sources.DebuggerPlugin.computeScopeMappings(callFrame, l => toOffsetWithSourceMap(sourceMap, l));\n\n const text = new TextUtils.Text.Text(originalSource);\n assert.strictEqual(scopeMappings.length, 2);\n assert.strictEqual(\n scopeMappings[0].scopeStart,\n text.offsetFromPosition(expectedOffsets[0].startLine, expectedOffsets[0].startColumn));\n assert.strictEqual(\n scopeMappings[0].scopeEnd, text.offsetFromPosition(expectedOffsets[0].endLine, expectedOffsets[0].endColumn));\n assert.strictEqual(scopeMappings[0].variableMap.get('i')?.value, 5);\n assert.strictEqual(scopeMappings[0].variableMap.size, 1);\n assert.strictEqual(\n scopeMappings[1].scopeStart,\n text.offsetFromPosition(expectedOffsets[1].startLine, expectedOffsets[1].startColumn));\n assert.strictEqual(\n scopeMappings[1].scopeEnd, text.offsetFromPosition(expectedOffsets[1].endLine, expectedOffsets[1].endColumn));\n assert.strictEqual(scopeMappings[1].variableMap.get('n')?.value, 10);\n assert.strictEqual(scopeMappings[1].variableMap.get('c')?.value, 1234);\n assert.strictEqual(scopeMappings[1].variableMap.size, 2);\n });\n\n it('can resolve simple scope mappings', async () => {\n const source = 'function f(a) { debugger } f(1)';\n const scopes = ' { }';\n const expectedOffsets = parseScopeChain(scopes);\n\n const functionScopeObject = backend.createSimpleRemoteObject([{name: 'a', value: 1}]);\n\n const callFrame =\n await backend.createCallFrame(target, {url: URL, content: source}, scopes, null, [functionScopeObject]);\n\n const scopeMappings = await Sources.DebuggerPlugin.computeScopeMappings(callFrame, l => toOffset(source, l));\n\n assert.strictEqual(scopeMappings.length, 1);\n assert.strictEqual(scopeMappings[0].scopeStart, expectedOffsets[0].startColumn);\n assert.strictEqual(scopeMappings[0].scopeEnd, expectedOffsets[0].endColumn);\n assert.strictEqual(scopeMappings[0].variableMap.get('a')?.value, 1);\n assert.strictEqual(scopeMappings[0].variableMap.size, 1);\n });\n\n it('can resolve nested scope mappings for block with no variables', async () => {\n const source = 'function f() { let a = 1; { debugger } } f()';\n const scopes = ' { < > }';\n const expectedOffsets = parseScopeChain(scopes);\n\n const functionScopeObject = backend.createSimpleRemoteObject([{name: 'a', value: 1}]);\n const blockScopeObject = backend.createSimpleRemoteObject([]);\n\n const callFrame = await backend.createCallFrame(\n target, {url: URL, content: source}, scopes, null, [blockScopeObject, functionScopeObject]);\n\n const scopeMappings = await Sources.DebuggerPlugin.computeScopeMappings(callFrame, l => toOffset(source, l));\n\n assert.strictEqual(scopeMappings.length, 2);\n assert.strictEqual(scopeMappings[0].scopeStart, expectedOffsets[0].startColumn);\n assert.strictEqual(scopeMappings[0].scopeEnd, expectedOffsets[0].endColumn);\n assert.strictEqual(scopeMappings[0].variableMap.size, 0);\n assert.strictEqual(scopeMappings[1].scopeStart, expectedOffsets[1].startColumn);\n assert.strictEqual(scopeMappings[1].scopeEnd, expectedOffsets[1].endColumn);\n assert.strictEqual(scopeMappings[1].variableMap.get('a')?.value, 1);\n assert.strictEqual(scopeMappings[1].variableMap.size, 1);\n });\n\n it('can resolve nested scope mappings for function with no variables', async () => {\n const source = 'function f() { console.log(\"Hi\"); { let a = 1; debugger } } f()';\n const scopes = ' { < > }';\n const expectedOffsets = parseScopeChain(scopes);\n\n const functionScopeObject = backend.createSimpleRemoteObject([]);\n const blockScopeObject = backend.createSimpleRemoteObject([{name: 'a', value: 1}]);\n\n const callFrame = await backend.createCallFrame(\n target, {url: URL, content: source}, scopes, null, [blockScopeObject, functionScopeObject]);\n\n const scopeMappings = await Sources.DebuggerPlugin.computeScopeMappings(callFrame, l => toOffset(source, l));\n\n assert.strictEqual(scopeMappings.length, 2);\n assert.strictEqual(scopeMappings[0].scopeStart, expectedOffsets[0].startColumn);\n assert.strictEqual(scopeMappings[0].scopeEnd, expectedOffsets[0].endColumn);\n assert.strictEqual(scopeMappings[0].variableMap.size, 1);\n assert.strictEqual(scopeMappings[0].variableMap.get('a')?.value, 1);\n assert.strictEqual(scopeMappings[1].scopeStart, expectedOffsets[1].startColumn);\n assert.strictEqual(scopeMappings[1].scopeEnd, expectedOffsets[1].endColumn);\n assert.strictEqual(scopeMappings[1].variableMap.size, 0);\n });\n});\n\nfunction makeState(doc: string, extensions: CodeMirror.Extension = []) {\n return CodeMirror.EditorState.create({\n doc,\n extensions: [\n extensions,\n TextEditor.Config.baseConfiguration(doc),\n TextEditor.Config.autocompletion.instance(),\n ],\n });\n}\n\ndescribeWithEnvironment('Inline variable view parser', () => {\n it('parses simple identifier', () => {\n const state = makeState('c', CodeMirror.javascript.javascriptLanguage);\n const variables = Sources.DebuggerPlugin.getVariableNamesByLine(state, 0, 1, 1);\n assert.deepEqual(variables, [{line: 0, from: 0, id: 'c'}]);\n });\n\n it('parses simple function', () => {\n const code = `function f(o) {\n let a = 1;\n debugger;\n }`;\n const state = makeState(code, CodeMirror.javascript.javascriptLanguage);\n const variables = Sources.DebuggerPlugin.getVariableNamesByLine(state, 10, code.length, code.indexOf('debugger'));\n assert.deepEqual(variables, [{line: 0, from: 11, id: 'o'}, {line: 1, from: 26, id: 'a'}]);\n });\n\n it('parses patterns', () => {\n const code = `function f(o) {\n let {x: a, y: [b, c]} = {x: o, y: [1, 2]};\n console.log(a + b + c);\n debugger;\n }`;\n const state = makeState(code, CodeMirror.javascript.javascriptLanguage);\n const variables = Sources.DebuggerPlugin.getVariableNamesByLine(state, 10, code.length, code.indexOf('debugger'));\n assert.deepEqual(variables, [\n {line: 0, from: 11, id: 'o'},\n {line: 1, from: 30, id: 'a'},\n {line: 1, from: 37, id: 'b'},\n {line: 1, from: 40, id: 'c'},\n {line: 1, from: 50, id: 'o'},\n {line: 2, from: 71, id: 'console'},\n {line: 2, from: 83, id: 'a'},\n {line: 2, from: 87, id: 'b'},\n {line: 2, from: 91, id: 'c'},\n ]);\n });\n\n it('parses function with nested block', () => {\n const code = `function f(o) {\n let a = 1;\n {\n let a = 2;\n debugger;\n }\n }`;\n const state = makeState(code, CodeMirror.javascript.javascriptLanguage);\n const variables = Sources.DebuggerPlugin.getVariableNamesByLine(state, 10, code.length, code.indexOf('debugger'));\n assert.deepEqual(\n variables, [{line: 0, from: 11, id: 'o'}, {line: 1, from: 26, id: 'a'}, {line: 3, from: 53, id: 'a'}]);\n });\n\n it('parses function variable, ignores shadowing let in sibling block', () => {\n const code = `function f(o) {\n let a = 1;\n {\n let a = 2;\n console.log(a);\n }\n debugger;\n }`;\n const state = makeState(code, CodeMirror.javascript.javascriptLanguage);\n const variables = Sources.DebuggerPlugin.getVariableNamesByLine(state, 10, code.length, code.indexOf('debugger'));\n assert.deepEqual(\n variables, [{line: 0, from: 11, id: 'o'}, {line: 1, from: 26, id: 'a'}, {line: 4, from: 68, id: 'console'}]);\n });\n\n it('parses function variable, ignores shadowing const in sibling block', () => {\n const code = `function f(o) {\n let a = 1;\n {\n const a = 2;\n console.log(a);\n }\n debugger;\n }`;\n const state = makeState(code, CodeMirror.javascript.javascriptLanguage);\n const variables = Sources.DebuggerPlugin.getVariableNamesByLine(state, 10, code.length, code.indexOf('debugger'));\n assert.deepEqual(\n variables, [{line: 0, from: 11, id: 'o'}, {line: 1, from: 26, id: 'a'}, {line: 4, from: 70, id: 'console'}]);\n });\n\n it('parses function variable, ignores shadowing typed const in sibling block', () => {\n const code = `function f(o) {\n let a: number = 1;\n {\n const a: number = 2;\n console.log(a);\n }\n debugger;\n }`;\n const state = makeState(code, CodeMirror.javascript.javascriptLanguage);\n const variables = Sources.DebuggerPlugin.getVariableNamesByLine(state, 10, code.length, code.indexOf('debugger'));\n assert.deepEqual(\n variables, [{line: 0, from: 11, id: 'o'}, {line: 1, from: 26, id: 'a'}, {line: 4, from: 86, id: 'console'}]);\n });\n\n it('parses function variable, reports all vars', () => {\n const code = `function f(o) {\n var a = 1;\n {\n var a = 2;\n console.log(a);\n }\n debugger;\n }`;\n const state = makeState(code, CodeMirror.javascript.javascriptLanguage);\n const variables = Sources.DebuggerPlugin.getVariableNamesByLine(state, 10, code.length, code.indexOf('debugger'));\n assert.deepEqual(variables, [\n {line: 0, from: 11, id: 'o'},\n {line: 1, from: 26, id: 'a'},\n {line: 3, from: 53, id: 'a'},\n {line: 4, from: 68, id: 'console'},\n {line: 4, from: 80, id: 'a'},\n ]);\n });\n\n it('parses function variable, handles shadowing in doubly nested scopes', () => {\n const code = `function f() {\n let a = 1;\n let b = 2;\n let c = 3;\n {\n let b;\n {\n const c = 4;\n b = 5;\n console.log(c);\n }\n console.log(c);\n }\n debugger;\n }`;\n const state = makeState(code, CodeMirror.javascript.javascriptLanguage);\n const variables = Sources.DebuggerPlugin.getVariableNamesByLine(state, 10, code.length, code.indexOf('debugger'));\n assert.deepEqual(variables, [\n {line: 1, from: 25, id: 'a'},\n {line: 2, from: 42, id: 'b'},\n {line: 3, from: 59, id: 'c'},\n {line: 9, from: 149, id: 'console'},\n {line: 11, from: 183, id: 'console'},\n {line: 11, from: 195, id: 'c'},\n ]);\n });\n\n it('parses function variable, handles shadowing with object pattern', () => {\n const code = `function f() {\n let a = 1;\n {\n let {x: b, y: a} = {x: 1, y: 2};\n console.log(a + b);\n }\n console.log(a);\n debugger;\n }`;\n const state = makeState(code, CodeMirror.javascript.javascriptLanguage);\n const variables = Sources.DebuggerPlugin.getVariableNamesByLine(state, 10, code.length, code.indexOf('debugger'));\n assert.deepEqual(variables, [\n {line: 1, from: 25, id: 'a'},\n {line: 4, from: 89, id: 'console'},\n {line: 6, from: 123, id: 'console'},\n {line: 6, from: 135, id: 'a'},\n ]);\n });\n\n it('parses function variable, handles shadowing with array pattern', () => {\n const code = `function f() {\n let a = 1;\n {\n const [b, a] = [1, 2];\n console.log(a + b);\n }\n console.log(a);\n debugger;\n }`;\n const state = makeState(code, CodeMirror.javascript.javascriptLanguage);\n const variables = Sources.DebuggerPlugin.getVariableNamesByLine(state, 10, code.length, code.indexOf('debugger'));\n assert.deepEqual(variables, [\n {line: 1, from: 25, id: 'a'},\n {line: 4, from: 79, id: 'console'},\n {line: 6, from: 113, id: 'console'},\n {line: 6, from: 125, id: 'a'},\n ]);\n });\n});\n\ndescribeWithEnvironment('Inline variable view scope value resolution', () => {\n it('resolves single variable in single scope', () => {\n const value42 = {type: Protocol.Runtime.RemoteObjectType.Number, value: 42} as SDK.RemoteObject.RemoteObject;\n const scopeMappings = [{scopeStart: 0, scopeEnd: 10, variableMap: new Map([['a', value42]])}];\n const variableNames = [{line: 3, from: 5, id: 'a'}];\n const valuesByLine = Sources.DebuggerPlugin.getVariableValuesByLine(scopeMappings, variableNames);\n\n assert.strictEqual(valuesByLine?.size, 1);\n assert.strictEqual(valuesByLine?.get(3)?.size, 1);\n assert.strictEqual(valuesByLine?.get(3)?.get('a')?.value, 42);\n });\n\n it('resolves shadowed variables', () => {\n const value1 = {type: Protocol.Runtime.RemoteObjectType.Number, value: 1} as SDK.RemoteObject.RemoteObject;\n const value2 = {type: Protocol.Runtime.RemoteObjectType.Number, value: 2} as SDK.RemoteObject.RemoteObject;\n const scopeMappings = [\n {scopeStart: 10, scopeEnd: 20, variableMap: new Map([['a', value1]])},\n {scopeStart: 0, scopeEnd: 30, variableMap: new Map([['a', value2]])},\n ];\n const variableNames = [\n {line: 0, from: 5, id: 'a'}, // Falls into the outer scope.\n {line: 10, from: 15, id: 'a'}, // Inner scope.\n {line: 20, from: 25, id: 'a'}, // Outer scope.\n {line: 30, from: 35, id: 'a'}, // Outside of any scope.\n ];\n const valuesByLine = Sources.DebuggerPlugin.getVariableValuesByLine(scopeMappings, variableNames);\n\n assert.strictEqual(valuesByLine?.size, 3);\n assert.strictEqual(valuesByLine?.get(0)?.size, 1);\n assert.strictEqual(valuesByLine?.get(0)?.get('a')?.value, 2);\n assert.strictEqual(valuesByLine?.get(10)?.size, 1);\n assert.strictEqual(valuesByLine?.get(10)?.get('a')?.value, 1);\n assert.strictEqual(valuesByLine?.get(20)?.size, 1);\n assert.strictEqual(valuesByLine?.get(20)?.get('a')?.value, 2);\n });\n\n it('resolves multiple variables on the same line', () => {\n const value1 = {type: Protocol.Runtime.RemoteObjectType.Number, value: 1} as SDK.RemoteObject.RemoteObject;\n const value2 = {type: Protocol.Runtime.RemoteObjectType.Number, value: 2} as SDK.RemoteObject.RemoteObject;\n const scopeMappings = [{scopeStart: 10, scopeEnd: 20, variableMap: new Map([['a', value1], ['b', value2]])}];\n const variableNames = [\n {line: 10, from: 11, id: 'a'},\n {line: 10, from: 13, id: 'b'},\n {line: 10, from: 15, id: 'a'},\n ];\n const valuesByLine = Sources.DebuggerPlugin.getVariableValuesByLine(scopeMappings, variableNames);\n\n assert.strictEqual(valuesByLine?.size, 1);\n assert.strictEqual(valuesByLine?.get(10)?.size, 2);\n assert.strictEqual(valuesByLine?.get(10)?.get('a')?.value, 1);\n assert.strictEqual(valuesByLine?.get(10)?.get('b')?.value, 2);\n });\n});\n\ndescribe('DebuggerPlugin', () => {\n describe('computeExecutionDecorations', () => {\n const {computeExecutionDecorations} = Sources.DebuggerPlugin;\n const extensions = [CodeMirror.javascript.javascript()];\n\n it('correctly returns no decorations when line is outside of the document', () => {\n const doc = 'console.log(\"Hello World!\");';\n const state = CodeMirror.EditorState.create({doc, extensions});\n const decorations = computeExecutionDecorations(state, 1, 0);\n assert.strictEqual(decorations.size, 0, 'Expected to have no decorations');\n });\n\n it('correctly returns line and token decorations', () => {\n const doc = 'function foo() {\\n debugger;\\n }';\n const state = CodeMirror.EditorState.create({doc, extensions});\n const decorations = computeExecutionDecorations(state, 1, 2);\n assert.strictEqual(decorations.size, 2, 'Expected to have execution line and token decoration');\n });\n\n it('correctly returns line and token decorations even for long documents', () => {\n const doc = 'console.log(\"Hello World!\");\\n'.repeat(10_000);\n const state = CodeMirror.EditorState.create({doc, extensions});\n const decorations = computeExecutionDecorations(state, 9_998, 0);\n assert.strictEqual(decorations.size, 2, 'Expected to have execution line and token decoration');\n });\n\n it('correctly returns line decorations for documents that don\\'t have syntax highlighting', () => {\n const doc = `\n\n`;\n const state = CodeMirror.EditorState.create({doc});\n const decorations = computeExecutionDecorations(state, 1, 0);\n assert.strictEqual(decorations.size, 1, 'Expected to have execution line decoration');\n });\n });\n\n describe('computePopoverHighlightRange', () => {\n const {computePopoverHighlightRange} = Sources.DebuggerPlugin;\n\n it('correctly returns highlight range depending on cursor position and selection', () => {\n const doc = 'Hello World!';\n const selection = CodeMirror.EditorSelection.create([\n CodeMirror.EditorSelection.range(2, 5),\n ]);\n const state = CodeMirror.EditorState.create({doc, selection});\n assert.isNull(computePopoverHighlightRange(state, 'text/plain', 0));\n assert.deepInclude(computePopoverHighlightRange(state, 'text/plain', 2), {from: 2, to: 5});\n assert.deepInclude(computePopoverHighlightRange(state, 'text/plain', 5), {from: 2, to: 5});\n assert.isNull(computePopoverHighlightRange(state, 'text/plain', 10));\n assert.isNull(computePopoverHighlightRange(state, 'text/plain', doc.length - 1));\n });\n\n describe('in JavaScript files', () => {\n const extensions = [CodeMirror.javascript.javascript()];\n\n it('correctly returns highlight range for member assignments', () => {\n const doc = 'obj.foo = 42;';\n const state = CodeMirror.EditorState.create({doc, extensions});\n\n assert.deepInclude(computePopoverHighlightRange(state, 'text/javascript', 0), {from: 0, to: 3});\n assert.deepInclude(computePopoverHighlightRange(state, 'text/javascript', 4), {from: 0, to: 7});\n });\n\n it('correctly returns highlight range for member assignments involving `this`', () => {\n const doc = 'this.x = bar;';\n const state = CodeMirror.EditorState.create({doc, extensions});\n\n assert.deepInclude(computePopoverHighlightRange(state, 'text/javascript', 0), {from: 0, to: 4});\n assert.deepInclude(computePopoverHighlightRange(state, 'text/javascript', 5), {from: 0, to: 6});\n });\n\n it('correctly reports function calls as potentially side-effecting', () => {\n const doc = 'getRandomCoffee().name';\n const state = CodeMirror.EditorState.create({doc, extensions});\n\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/javascript', doc.indexOf('getRandomCoffee')),\n {containsSideEffects: false},\n );\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/javascript', doc.lastIndexOf('.')),\n {containsSideEffects: true},\n );\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/javascript', doc.indexOf('name')),\n {containsSideEffects: true},\n );\n });\n\n it('correctly reports method calls as potentially side-effecting', () => {\n const doc = 'utils.getRandomCoffee().name';\n const state = CodeMirror.EditorState.create({doc, extensions});\n\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/javascript', doc.indexOf('utils')),\n {containsSideEffects: false},\n );\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/javascript', doc.indexOf('getRandomCoffee')),\n {containsSideEffects: false},\n );\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/javascript', doc.lastIndexOf('.')),\n {containsSideEffects: true},\n );\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/javascript', doc.indexOf('name')),\n {containsSideEffects: true},\n );\n });\n\n it('correctly reports function calls in property accesses as potentially side-effecting', () => {\n const doc = 'bar[foo()]';\n const state = CodeMirror.EditorState.create({doc, extensions});\n\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/javascript', doc.indexOf('bar')),\n {containsSideEffects: false, from: 0, to: 'bar'.length},\n );\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/javascript', doc.indexOf('[')),\n {containsSideEffects: true, from: 0, to: doc.length},\n );\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/javascript', doc.indexOf(']')),\n {containsSideEffects: true, from: 0, to: doc.length},\n );\n });\n\n it('correct reports postfix increments in property accesses as potentially side-effecting', () => {\n const doc = 'a[i++]';\n const state = CodeMirror.EditorState.create({doc, extensions});\n\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/javascript', doc.indexOf('[')),\n {containsSideEffects: true, from: 0, to: doc.length},\n );\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/javascript', doc.indexOf(']')),\n {containsSideEffects: true, from: 0, to: doc.length},\n );\n });\n\n it('correct reports postfix decrements in property accesses as potentially side-effecting', () => {\n const doc = 'a[i--]';\n const state = CodeMirror.EditorState.create({doc, extensions});\n\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/javascript', doc.indexOf('[')),\n {containsSideEffects: true, from: 0, to: doc.length},\n );\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/javascript', doc.indexOf(']')),\n {containsSideEffects: true, from: 0, to: doc.length},\n );\n });\n\n it('correct reports prefix increments in property accesses as potentially side-effecting', () => {\n const doc = 'array[++index]';\n const state = CodeMirror.EditorState.create({doc, extensions});\n\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/javascript', doc.indexOf('[')),\n {containsSideEffects: true, from: 0, to: doc.length},\n );\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/javascript', doc.indexOf(']')),\n {containsSideEffects: true, from: 0, to: doc.length},\n );\n });\n\n it('correct reports prefix decrements in property accesses as potentially side-effecting', () => {\n const doc = 'array[--index]';\n const state = CodeMirror.EditorState.create({doc, extensions});\n\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/javascript', doc.indexOf('[')),\n {containsSideEffects: true, from: 0, to: doc.length},\n );\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/javascript', doc.indexOf(']')),\n {containsSideEffects: true, from: 0, to: doc.length},\n );\n });\n\n it('correct reports assignment expressions in property accesses as potentially side-effecting', () => {\n const doc = 'array[index *= 5]';\n const state = CodeMirror.EditorState.create({doc, extensions});\n\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/javascript', doc.indexOf('[')),\n {containsSideEffects: true, from: 0, to: doc.length},\n );\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/javascript', doc.indexOf(']')),\n {containsSideEffects: true, from: 0, to: doc.length},\n );\n });\n });\n\n describe('in HTML files', () => {\n it('correctly returns highlight range for variables in inline `;\n const extensions = [CodeMirror.html.html()];\n const state = CodeMirror.EditorState.create({doc, extensions});\n for (const name of ['bar', 'baz']) {\n const from = doc.indexOf(name);\n const to = from + name.length;\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/html', from),\n {from, to},\n `did not correct highlight '${name}'`,\n );\n }\n });\n\n it('correctly returns highlight range for variables in inline event handlers', () => {\n const doc = `\n`;\n const extensions = [CodeMirror.html.html()];\n const state = CodeMirror.EditorState.create({doc, extensions});\n for (const name of ['foo', 'bar', 'baz']) {\n const from = doc.indexOf(name);\n const to = from + name.length;\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/html', from),\n {from, to},\n `did not correct highlight '${name}'`,\n );\n }\n });\n });\n\n describe('in TSX files', () => {\n it('correctly returns highlight range for field accesses', () => {\n const doc = `function foo(obj: any): number {\n return obj.x + obj.y;\n}`;\n const extensions = [CodeMirror.javascript.tsxLanguage];\n const state = CodeMirror.EditorState.create({doc, extensions});\n for (const name of ['x', 'y']) {\n const pos = doc.lastIndexOf(name);\n const from = pos - 4;\n const to = pos + name.length;\n assert.deepInclude(\n computePopoverHighlightRange(state, 'text/typescript-jsx', pos),\n {from, to},\n `did not correct highlight '${name}'`,\n );\n }\n });\n });\n });\n});\n"]} \ No newline at end of file diff --git a/public/panels/sources/SourcesPanel.js b/public/panels/sources/SourcesPanel.js index 1a073d2fc..895b4c320 100644 --- a/public/panels/sources/SourcesPanel.js +++ b/public/panels/sources/SourcesPanel.js @@ -225,7 +225,7 @@ export class SourcesPanel extends UI.Panel.Panel { const tabbedPane = this.navigatorTabbedLocation.tabbedPane(); tabbedPane.setMinimumSize(100, 25); tabbedPane.element.classList.add('navigator-tabbed-pane'); - tabbedPane.headerElement().setAttribute('jslog', `${VisualLogging.toolbar('navigator')}`); + tabbedPane.headerElement().setAttribute('jslog', `${VisualLogging.toolbar('navigator').track({ keydown: 'ArrowUp|ArrowLeft|ArrowDown|ArrowRight|Enter|Space' })}`); const navigatorMenuButton = new UI.Toolbar.ToolbarMenuButton(this.populateNavigatorMenu.bind(this), true, 'more-options'); navigatorMenuButton.setTitle(i18nString(UIStrings.moreOptions)); tabbedPane.rightToolbar().appendToolbarItem(navigatorMenuButton); @@ -702,7 +702,7 @@ export class SourcesPanel extends UI.Panel.Panel { } createDebugToolbar() { const debugToolbar = new UI.Toolbar.Toolbar('scripts-debug-toolbar'); - debugToolbar.element.setAttribute('jslog', `${VisualLogging.toolbar('debug')}`); + debugToolbar.element.setAttribute('jslog', `${VisualLogging.toolbar('debug').track({ keydown: 'ArrowUp|ArrowLeft|ArrowDown|ArrowRight|Enter|Space' })}`); const longResumeButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.resumeWithAllPausesBlockedForMs), 'play'); longResumeButton.addEventListener("Click" /* UI.Toolbar.ToolbarButton.Events.Click */, this.longResume, this); const terminateExecutionButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.terminateCurrentJavascriptCall), 'stop'); diff --git a/public/panels/sources/SourcesPanel.js.map b/public/panels/sources/SourcesPanel.js.map index 2b70b98e0..a7d0d137e 100644 --- a/public/panels/sources/SourcesPanel.js.map +++ b/public/panels/sources/SourcesPanel.js.map @@ -1 +1 @@ -{"version":3,"file":"SourcesPanel.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sources/SourcesPanel.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAA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,kBAAkB,CAAC,IAAI,CAAC,CAAC;SACpE;QACD,YAAY,CAAC,8BAA8B,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC;IACvE,CAAC;IAEQ,QAAQ;QACf,EAAE,CAAC,aAAa,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACpE,cAAc,CAAC,GAAG,EAAE;YAClB,YAAY,CAAC,8BAA8B,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC;QACvE,CAAC,CAAC,CAAC;QACH,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;IACjE,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;CACF","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/*\n * Copyright (C) 2008 Apple Inc. All Rights Reserved.\n * Copyright (C) 2011 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as Breakpoints from '../../models/breakpoints/breakpoints.js';\nimport * as Extensions from '../../models/extensions/extensions.js';\nimport * as Workspace from '../../models/workspace/workspace.js';\nimport * as IconButton from '../../ui/components/icon_button/icon_button.js';\nimport * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';\nimport type * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\nimport * as Snippets from '../snippets/snippets.js';\n\nimport {CallStackSidebarPane} from './CallStackSidebarPane.js';\nimport {DebuggerPausedMessage} from './DebuggerPausedMessage.js';\nimport {NavigatorView} from './NavigatorView.js';\nimport sourcesPanelStyles from './sourcesPanel.css.js';\nimport {Events, SourcesView} from './SourcesView.js';\nimport {ThreadsSidebarPane} from './ThreadsSidebarPane.js';\nimport {UISourceCodeFrame} from './UISourceCodeFrame.js';\n\nconst UIStrings = {\n /**\n *@description Text that appears when user drag and drop something (for example, a file) in Sources Panel of the Sources panel\n */\n dropWorkspaceFolderHere: 'Drop workspace folder here',\n /**\n *@description Text to show more options\n */\n moreOptions: 'More options',\n /**\n * @description Tooltip for the the navigator toggle in the Sources panel. Command to open/show the\n * sidebar containing the navigator tool.\n */\n showNavigator: 'Show navigator',\n /**\n * @description Tooltip for the the navigator toggle in the Sources panel. Command to close/hide\n * the sidebar containing the navigator tool.\n */\n hideNavigator: 'Hide navigator',\n /**\n * @description Screen reader announcement when the navigator sidebar is shown in the Sources panel.\n */\n navigatorShown: 'Navigator sidebar shown',\n /**\n * @description Screen reader announcement when the navigator sidebar is hidden in the Sources panel.\n */\n navigatorHidden: 'Navigator sidebar hidden',\n /**\n * @description Screen reader announcement when the navigator sidebar is shown in the Sources panel.\n */\n debuggerShown: 'Debugger sidebar shown',\n /**\n * @description Screen reader announcement when the navigator sidebar is hidden in the Sources panel.\n */\n debuggerHidden: 'Debugger sidebar hidden',\n /**\n * @description Tooltip for the the debugger toggle in the Sources panel. Command to open/show the\n * sidebar containing the debugger tool.\n */\n showDebugger: 'Show debugger',\n /**\n * @description Tooltip for the the debugger toggle in the Sources panel. Command to close/hide the\n * sidebar containing the debugger tool.\n */\n hideDebugger: 'Hide debugger',\n /**\n *@description Text in Sources Panel of the Sources panel\n */\n groupByFolder: 'Group by folder',\n /**\n *@description Text in Sources Panel of the Sources panel\n */\n groupByAuthored: 'Group by Authored/Deployed',\n /**\n *@description Text in Sources Panel of the Sources panel\n */\n hideIgnoreListed: 'Hide ignore-listed sources',\n /**\n *@description Tooltip text that appears when hovering over the largeicon play button in the Sources Panel of the Sources panel\n */\n resumeWithAllPausesBlockedForMs: 'Resume with all pauses blocked for 500 ms',\n /**\n *@description Tooltip text that appears when hovering over the largeicon terminate execution button in the Sources Panel of the Sources panel\n */\n terminateCurrentJavascriptCall: 'Terminate current JavaScript call',\n /**\n *@description Text in Sources Panel of the Sources panel\n */\n pauseOnCaughtExceptions: 'Pause on caught exceptions',\n /**\n *@description A context menu item in the Sources Panel of the Sources panel\n */\n revealInSidebar: 'Reveal in navigator sidebar',\n /**\n *@description A context menu item in the Sources Panel of the Sources panel when debugging JS code.\n * When clicked, the execution is resumed until it reaches the line specified by the right-click that\n * opened the context menu.\n */\n continueToHere: 'Continue to here',\n /**\n *@description A context menu item in the Console that stores selection as a temporary global variable\n */\n storeAsGlobalVariable: 'Store as global variable',\n /**\n *@description A context menu item in the Console, Sources, and Network panel\n *@example {string} PH1\n */\n copyS: 'Copy {PH1}',\n /**\n *@description A context menu item for strings in the Console, Sources, and Network panel.\n * When clicked, the raw contents of the string is copied to the clipboard.\n */\n copyStringContents: 'Copy string contents',\n /**\n *@description A context menu item for strings in the Console, Sources, and Network panel.\n * When clicked, the string is copied to the clipboard as a valid JavaScript literal.\n */\n copyStringAsJSLiteral: 'Copy string as JavaScript literal',\n /**\n *@description A context menu item for strings in the Console, Sources, and Network panel.\n * When clicked, the string is copied to the clipboard as a valid JSON literal.\n */\n copyStringAsJSONLiteral: 'Copy string as JSON literal',\n /**\n *@description A context menu item in the Sources Panel of the Sources panel\n */\n showFunctionDefinition: 'Show function definition',\n /**\n *@description Text in Sources Panel of the Sources panel\n */\n openInSourcesPanel: 'Open in Sources panel',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sources/SourcesPanel.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nconst primitiveRemoteObjectTypes = new Set(['number', 'boolean', 'bigint', 'undefined']);\nlet sourcesPanelInstance: SourcesPanel;\n\nexport class SourcesPanel extends UI.Panel.Panel implements\n UI.ContextMenu.Provider,\n SDK.TargetManager.Observer, UI.View.ViewLocationResolver {\n private readonly workspace: Workspace.Workspace.WorkspaceImpl;\n private readonly togglePauseAction: UI.ActionRegistration.Action;\n private readonly stepOverAction: UI.ActionRegistration.Action;\n private readonly stepIntoAction: UI.ActionRegistration.Action;\n private readonly stepOutAction: UI.ActionRegistration.Action;\n private readonly stepAction: UI.ActionRegistration.Action;\n private readonly toggleBreakpointsActiveAction: UI.ActionRegistration.Action;\n private readonly debugToolbar: UI.Toolbar.Toolbar;\n private readonly debugToolbarDrawer: HTMLDivElement;\n private readonly debuggerPausedMessage: DebuggerPausedMessage;\n private splitWidget: UI.SplitWidget.SplitWidget;\n editorView: UI.SplitWidget.SplitWidget;\n private navigatorTabbedLocation: UI.View.TabbedViewLocation;\n sourcesViewInternal: SourcesView;\n private readonly toggleNavigatorSidebarButton: UI.Toolbar.ToolbarButton;\n private readonly toggleDebuggerSidebarButton: UI.Toolbar.ToolbarButton;\n private threadsSidebarPane: UI.View.View|null;\n private readonly watchSidebarPane: UI.View.View;\n private readonly callstackPane: CallStackSidebarPane;\n private liveLocationPool: Bindings.LiveLocation.LiveLocationPool;\n private lastModificationTime: number;\n private pausedInternal?: boolean;\n private switchToPausedTargetTimeout?: number;\n private ignoreExecutionLineEvents?: boolean;\n private executionLineLocation?: Bindings.DebuggerWorkspaceBinding.Location|null;\n private pauseOnExceptionButton?: UI.Toolbar.ToolbarToggle;\n private sidebarPaneStack?: UI.View.ViewLocation;\n private tabbedLocationHeader?: Element|null;\n private extensionSidebarPanesContainer?: UI.View.ViewLocation;\n sidebarPaneView?: UI.Widget.VBox|UI.SplitWidget.SplitWidget;\n constructor() {\n super('sources');\n\n new UI.DropTarget.DropTarget(\n this.element, [UI.DropTarget.Type.Folder], i18nString(UIStrings.dropWorkspaceFolderHere),\n this.handleDrop.bind(this));\n\n this.workspace = Workspace.Workspace.WorkspaceImpl.instance();\n this.togglePauseAction = UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.toggle-pause');\n this.stepOverAction = UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.step-over');\n this.stepIntoAction = UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.step-into');\n this.stepOutAction = UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.step-out');\n this.stepAction = UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.step');\n this.toggleBreakpointsActiveAction =\n UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.toggle-breakpoints-active');\n\n this.debugToolbar = this.createDebugToolbar();\n this.debugToolbarDrawer = this.createDebugToolbarDrawer();\n this.debuggerPausedMessage = new DebuggerPausedMessage();\n\n const initialDebugSidebarWidth = 225;\n this.splitWidget =\n new UI.SplitWidget.SplitWidget(true, true, 'sources-panel-split-view-state', initialDebugSidebarWidth);\n this.splitWidget.enableShowModeSaving();\n this.splitWidget.show(this.element);\n\n // Create scripts navigator\n const initialNavigatorWidth = 225;\n this.editorView =\n new UI.SplitWidget.SplitWidget(true, false, 'sources-panel-navigator-split-view-state', initialNavigatorWidth);\n this.editorView.enableShowModeSaving();\n this.splitWidget.setMainWidget(this.editorView);\n\n // Create navigator tabbed pane with toolbar.\n this.navigatorTabbedLocation = UI.ViewManager.ViewManager.instance().createTabbedLocation(\n this.revealNavigatorSidebar.bind(this), 'navigator-view', true, true);\n const tabbedPane = this.navigatorTabbedLocation.tabbedPane();\n tabbedPane.setMinimumSize(100, 25);\n tabbedPane.element.classList.add('navigator-tabbed-pane');\n tabbedPane.headerElement().setAttribute('jslog', `${VisualLogging.toolbar('navigator')}`);\n const navigatorMenuButton =\n new UI.Toolbar.ToolbarMenuButton(this.populateNavigatorMenu.bind(this), true, 'more-options');\n navigatorMenuButton.setTitle(i18nString(UIStrings.moreOptions));\n tabbedPane.rightToolbar().appendToolbarItem(navigatorMenuButton);\n tabbedPane.addEventListener(\n UI.TabbedPane.Events.TabSelected,\n ({data: {tabId}}: Common.EventTarget.EventTargetEvent) =>\n Host.userMetrics.sourcesSidebarTabShown(tabId));\n\n if (UI.ViewManager.ViewManager.instance().hasViewsForLocation('run-view-sidebar')) {\n const navigatorSplitWidget =\n new UI.SplitWidget.SplitWidget(false, true, 'source-panel-navigator-sidebar-split-view-state');\n navigatorSplitWidget.setMainWidget(tabbedPane);\n const runViewTabbedPane = UI.ViewManager.ViewManager.instance()\n .createTabbedLocation(this.revealNavigatorSidebar.bind(this), 'run-view-sidebar')\n .tabbedPane();\n navigatorSplitWidget.setSidebarWidget(runViewTabbedPane);\n navigatorSplitWidget.installResizer(runViewTabbedPane.headerElement());\n this.editorView.setSidebarWidget(navigatorSplitWidget);\n } else {\n this.editorView.setSidebarWidget(tabbedPane);\n }\n\n this.sourcesViewInternal = new SourcesView();\n this.sourcesViewInternal.addEventListener(Events.EditorSelected, this.editorSelected.bind(this));\n\n this.toggleNavigatorSidebarButton = this.editorView.createShowHideSidebarButton(\n i18nString(UIStrings.showNavigator), i18nString(UIStrings.hideNavigator), i18nString(UIStrings.navigatorShown),\n i18nString(UIStrings.navigatorHidden), 'navigator');\n this.toggleDebuggerSidebarButton = this.splitWidget.createShowHideSidebarButton(\n i18nString(UIStrings.showDebugger), i18nString(UIStrings.hideDebugger), i18nString(UIStrings.debuggerShown),\n i18nString(UIStrings.debuggerHidden), 'debugger');\n this.editorView.setMainWidget(this.sourcesViewInternal);\n\n this.threadsSidebarPane = null;\n this.watchSidebarPane = UI.ViewManager.ViewManager.instance().view('sources.watch');\n this.callstackPane = CallStackSidebarPane.instance();\n\n Common.Settings.Settings.instance()\n .moduleSetting('sidebar-position')\n .addChangeListener(this.updateSidebarPosition.bind(this));\n this.updateSidebarPosition();\n\n void this.updateDebuggerButtonsAndStatus();\n\n this.liveLocationPool = new Bindings.LiveLocation.LiveLocationPool();\n\n this.setTarget(UI.Context.Context.instance().flavor(SDK.Target.Target));\n Common.Settings.Settings.instance()\n .moduleSetting('breakpoints-active')\n .addChangeListener(this.breakpointsActiveStateChanged, this);\n UI.Context.Context.instance().addFlavorChangeListener(SDK.Target.Target, this.onCurrentTargetChanged, this);\n UI.Context.Context.instance().addFlavorChangeListener(SDK.DebuggerModel.CallFrame, this.callFrameChanged, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.DebuggerWasEnabled, this.debuggerWasEnabled, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.DebuggerPaused, this.debuggerPaused, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.DebugInfoAttached, this.debugInfoAttached, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.DebuggerResumed,\n event => this.debuggerResumed(event.data));\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.GlobalObjectCleared,\n event => this.debuggerResumed(event.data));\n Extensions.ExtensionServer.ExtensionServer.instance().addEventListener(\n Extensions.ExtensionServer.Events.SidebarPaneAdded, this.extensionSidebarPaneAdded, this);\n SDK.TargetManager.TargetManager.instance().observeTargets(this);\n this.lastModificationTime = -Infinity;\n }\n\n static instance(opts: {\n forceNew: boolean|null,\n }|undefined = {forceNew: null}): SourcesPanel {\n const {forceNew} = opts;\n if (!sourcesPanelInstance || forceNew) {\n sourcesPanelInstance = new SourcesPanel();\n }\n\n return sourcesPanelInstance;\n }\n\n static updateResizerAndSidebarButtons(panel: SourcesPanel): void {\n panel.sourcesViewInternal.leftToolbar().removeToolbarItems();\n panel.sourcesViewInternal.rightToolbar().removeToolbarItems();\n panel.sourcesViewInternal.bottomToolbar().removeToolbarItems();\n const isInWrapper = UI.Context.Context.instance().flavor(QuickSourceView) &&\n !UI.InspectorView.InspectorView.instance().isDrawerMinimized();\n if (panel.splitWidget.isVertical() || isInWrapper) {\n panel.splitWidget.uninstallResizer(panel.sourcesViewInternal.toolbarContainerElement());\n } else {\n panel.splitWidget.installResizer(panel.sourcesViewInternal.toolbarContainerElement());\n }\n if (!isInWrapper) {\n panel.sourcesViewInternal.leftToolbar().appendToolbarItem(panel.toggleNavigatorSidebarButton);\n if (panel.splitWidget.isVertical()) {\n panel.sourcesViewInternal.rightToolbar().appendToolbarItem(panel.toggleDebuggerSidebarButton);\n } else {\n panel.sourcesViewInternal.bottomToolbar().appendToolbarItem(panel.toggleDebuggerSidebarButton);\n }\n }\n }\n\n targetAdded(_target: SDK.Target.Target): void {\n this.showThreadsIfNeeded();\n }\n\n targetRemoved(_target: SDK.Target.Target): void {\n }\n\n private showThreadsIfNeeded(): void {\n if (ThreadsSidebarPane.shouldBeShown() && !this.threadsSidebarPane) {\n this.threadsSidebarPane = UI.ViewManager.ViewManager.instance().view('sources.threads');\n if (this.sidebarPaneStack && this.threadsSidebarPane) {\n this.sidebarPaneStack.appendView(\n this.threadsSidebarPane, this.splitWidget.isVertical() ? this.watchSidebarPane : this.callstackPane);\n }\n }\n }\n\n private setTarget(target: SDK.Target.Target|null): void {\n if (!target) {\n return;\n }\n const debuggerModel = target.model(SDK.DebuggerModel.DebuggerModel);\n if (!debuggerModel) {\n return;\n }\n\n if (debuggerModel.isPaused()) {\n this.showDebuggerPausedDetails(\n (debuggerModel.debuggerPausedDetails() as SDK.DebuggerModel.DebuggerPausedDetails));\n } else {\n this.pausedInternal = false;\n this.clearInterface();\n this.toggleDebuggerSidebarButton.setEnabled(true);\n }\n }\n\n private onCurrentTargetChanged({data: target}: Common.EventTarget.EventTargetEvent): void {\n this.setTarget(target);\n }\n paused(): boolean {\n return this.pausedInternal || false;\n }\n\n override wasShown(): void {\n UI.Context.Context.instance().setFlavor(SourcesPanel, this);\n this.registerCSSFiles([sourcesPanelStyles]);\n super.wasShown();\n if (UI.Context.Context.instance().flavor(QuickSourceView)) {\n UI.InspectorView.InspectorView.instance().setDrawerMinimized(true);\n SourcesPanel.updateResizerAndSidebarButtons(this);\n }\n this.editorView.setMainWidget(this.sourcesViewInternal);\n }\n\n override willHide(): void {\n super.willHide();\n UI.Context.Context.instance().setFlavor(SourcesPanel, null);\n const wrapperView = UI.Context.Context.instance().flavor(QuickSourceView);\n if (wrapperView) {\n wrapperView.showViewInWrapper();\n UI.InspectorView.InspectorView.instance().setDrawerMinimized(false);\n SourcesPanel.updateResizerAndSidebarButtons(this);\n }\n }\n\n resolveLocation(locationName: string): UI.View.ViewLocation|null {\n if (locationName === 'sources.sidebar-top' || locationName === 'sources.sidebar-bottom' ||\n locationName === 'sources.sidebar-tabs') {\n return this.sidebarPaneStack || null;\n }\n return this.navigatorTabbedLocation;\n }\n\n ensureSourcesViewVisible(): boolean {\n if (UI.Context.Context.instance().flavor(QuickSourceView)) {\n return true;\n }\n if (!UI.InspectorView.InspectorView.instance().canSelectPanel('sources')) {\n return false;\n }\n void UI.ViewManager.ViewManager.instance().showView('sources');\n return true;\n }\n\n override onResize(): void {\n if (Common.Settings.Settings.instance().moduleSetting('sidebar-position').get() === 'auto') {\n this.element.window().requestAnimationFrame(this.updateSidebarPosition.bind(this));\n } // Do not force layout.\n }\n\n override searchableView(): UI.SearchableView.SearchableView {\n return this.sourcesViewInternal.searchableView();\n }\n\n toggleNavigatorSidebar(): void {\n this.editorView.toggleSidebar();\n }\n\n toggleDebuggerSidebar(): void {\n this.splitWidget.toggleSidebar();\n }\n\n private debuggerPaused(event: Common.EventTarget.EventTargetEvent): void {\n const debuggerModel = event.data;\n const details = debuggerModel.debuggerPausedDetails();\n if (!this.pausedInternal &&\n Common.Settings.Settings.instance().moduleSetting('auto-focus-on-debugger-paused-enabled').get()) {\n void this.setAsCurrentPanel();\n }\n\n if (UI.Context.Context.instance().flavor(SDK.Target.Target) === debuggerModel.target()) {\n this.showDebuggerPausedDetails((details as SDK.DebuggerModel.DebuggerPausedDetails));\n } else if (!this.pausedInternal) {\n UI.Context.Context.instance().setFlavor(SDK.Target.Target, debuggerModel.target());\n }\n }\n\n private debugInfoAttached(event: Common.EventTarget.EventTargetEvent): void {\n const {debuggerModel} = event.data;\n if (!debuggerModel.isPaused()) {\n return;\n }\n\n const details = debuggerModel.debuggerPausedDetails();\n if (details && UI.Context.Context.instance().flavor(SDK.Target.Target) === debuggerModel.target()) {\n this.showDebuggerPausedDetails(details);\n }\n }\n\n private showDebuggerPausedDetails(details: SDK.DebuggerModel.DebuggerPausedDetails): void {\n this.pausedInternal = true;\n void this.updateDebuggerButtonsAndStatus();\n UI.Context.Context.instance().setFlavor(SDK.DebuggerModel.DebuggerPausedDetails, details);\n this.toggleDebuggerSidebarButton.setEnabled(false);\n this.revealDebuggerSidebar();\n window.focus();\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.bringToFront();\n }\n\n private debuggerResumed(debuggerModel: SDK.DebuggerModel.DebuggerModel): void {\n const target = debuggerModel.target();\n if (UI.Context.Context.instance().flavor(SDK.Target.Target) !== target) {\n return;\n }\n this.pausedInternal = false;\n this.clearInterface();\n this.toggleDebuggerSidebarButton.setEnabled(true);\n this.switchToPausedTargetTimeout = window.setTimeout(this.switchToPausedTarget.bind(this, debuggerModel), 500);\n }\n\n private debuggerWasEnabled(event: Common.EventTarget.EventTargetEvent): void {\n const debuggerModel = event.data;\n if (UI.Context.Context.instance().flavor(SDK.Target.Target) !== debuggerModel.target()) {\n return;\n }\n\n void this.updateDebuggerButtonsAndStatus();\n }\n\n get visibleView(): UI.Widget.Widget|null {\n return this.sourcesViewInternal.visibleView();\n }\n\n showUISourceCode(\n uiSourceCode: Workspace.UISourceCode.UISourceCode, location?: SourceFrame.SourceFrame.RevealPosition,\n omitFocus?: boolean): void {\n if (omitFocus) {\n if (!this.isShowing() && !UI.Context.Context.instance().flavor(QuickSourceView)) {\n return;\n }\n } else {\n this.showEditor();\n }\n this.sourcesViewInternal.showSourceLocation(uiSourceCode, location, omitFocus);\n }\n\n private showEditor(): void {\n if (UI.Context.Context.instance().flavor(QuickSourceView)) {\n return;\n }\n void this.setAsCurrentPanel();\n }\n\n showUILocation(uiLocation: Workspace.UISourceCode.UILocation, omitFocus?: boolean): void {\n const {uiSourceCode, lineNumber, columnNumber} = uiLocation;\n this.showUISourceCode(uiSourceCode, {lineNumber, columnNumber}, omitFocus);\n }\n\n async revealInNavigator(uiSourceCode: Workspace.UISourceCode.UISourceCode, skipReveal?: boolean): Promise {\n const viewManager = UI.ViewManager.ViewManager.instance();\n for (const view of viewManager.viewsForLocation(UI.ViewManager.ViewLocationValues.NAVIGATOR_VIEW)) {\n const navigatorView = await view.widget();\n if (navigatorView instanceof NavigatorView && navigatorView.acceptProject(uiSourceCode.project())) {\n navigatorView.revealUISourceCode(uiSourceCode, true);\n this.navigatorTabbedLocation.tabbedPane().selectTab(view.viewId(), true);\n if (!skipReveal) {\n this.editorView.showBoth(true);\n navigatorView.focus();\n }\n break;\n }\n }\n }\n\n private addExperimentMenuItem(\n menuSection: UI.ContextMenu.Section, experiment: string, menuItem: Common.UIString.LocalizedString): void {\n // menu handler\n function toggleExperiment(): void {\n const checked = Root.Runtime.experiments.isEnabled(experiment);\n Root.Runtime.experiments.setEnabled(experiment, !checked);\n Host.userMetrics.experimentChanged(experiment, checked);\n // Need to signal to the NavigatorView that grouping has changed. Unfortunately,\n // it can't listen to an experiment, and this class doesn't directly interact\n // with it, so we will convince it a different grouping setting changed. When we switch\n // from using an experiment to a setting, it will listen to that setting and we\n // won't need to do this.\n const groupByFolderSetting = Common.Settings.Settings.instance().moduleSetting('navigator-group-by-folder');\n groupByFolderSetting.set(groupByFolderSetting.get());\n }\n\n menuSection.appendCheckboxItem(menuItem, toggleExperiment, {\n checked: Root.Runtime.experiments.isEnabled(experiment),\n additionalElement: IconButton.Icon.create('experiment'),\n jslogContext: Platform.StringUtilities.toKebabCase(experiment),\n });\n }\n\n private populateNavigatorMenu(contextMenu: UI.ContextMenu.ContextMenu): void {\n const groupByFolderSetting = Common.Settings.Settings.instance().moduleSetting('navigator-group-by-folder');\n contextMenu.appendItemsAtLocation('navigatorMenu');\n contextMenu.viewSection().appendCheckboxItem(\n i18nString(UIStrings.groupByFolder), () => groupByFolderSetting.set(!groupByFolderSetting.get()),\n {checked: groupByFolderSetting.get(), jslogContext: groupByFolderSetting.name});\n\n this.addExperimentMenuItem(\n contextMenu.viewSection(), Root.Runtime.ExperimentName.AUTHORED_DEPLOYED_GROUPING,\n i18nString(UIStrings.groupByAuthored));\n this.addExperimentMenuItem(\n contextMenu.viewSection(), Root.Runtime.ExperimentName.JUST_MY_CODE, i18nString(UIStrings.hideIgnoreListed));\n }\n\n setIgnoreExecutionLineEvents(ignoreExecutionLineEvents: boolean): void {\n this.ignoreExecutionLineEvents = ignoreExecutionLineEvents;\n }\n\n updateLastModificationTime(): void {\n this.lastModificationTime = window.performance.now();\n }\n\n private async executionLineChanged(liveLocation: Bindings.LiveLocation.LiveLocation): Promise {\n const uiLocation = await liveLocation.uiLocation();\n if (liveLocation.isDisposed()) {\n return;\n }\n if (!uiLocation) {\n return;\n }\n if (window.performance.now() - this.lastModificationTime < lastModificationTimeout) {\n return;\n }\n this.sourcesViewInternal.showSourceLocation(uiLocation.uiSourceCode, uiLocation, undefined, true);\n }\n\n private lastModificationTimeoutPassedForTest(): void {\n lastModificationTimeout = Number.MIN_VALUE;\n }\n\n private updateLastModificationTimeForTest(): void {\n lastModificationTimeout = Number.MAX_VALUE;\n }\n\n private async callFrameChanged(): Promise {\n const callFrame = UI.Context.Context.instance().flavor(SDK.DebuggerModel.CallFrame);\n if (!callFrame) {\n return;\n }\n if (this.executionLineLocation) {\n this.executionLineLocation.dispose();\n }\n this.executionLineLocation =\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().createCallFrameLiveLocation(\n callFrame.location(), this.executionLineChanged.bind(this), this.liveLocationPool);\n }\n\n private async updateDebuggerButtonsAndStatus(): Promise {\n const currentTarget = UI.Context.Context.instance().flavor(SDK.Target.Target);\n const currentDebuggerModel = currentTarget ? currentTarget.model(SDK.DebuggerModel.DebuggerModel) : null;\n if (!currentDebuggerModel) {\n this.togglePauseAction.setEnabled(false);\n this.stepOverAction.setEnabled(false);\n this.stepIntoAction.setEnabled(false);\n this.stepOutAction.setEnabled(false);\n this.stepAction.setEnabled(false);\n } else if (this.pausedInternal) {\n this.togglePauseAction.setToggled(true);\n this.togglePauseAction.setEnabled(true);\n this.stepOverAction.setEnabled(true);\n this.stepIntoAction.setEnabled(true);\n this.stepOutAction.setEnabled(true);\n this.stepAction.setEnabled(true);\n } else {\n this.togglePauseAction.setToggled(false);\n this.togglePauseAction.setEnabled(!currentDebuggerModel.isPausing());\n this.stepOverAction.setEnabled(false);\n this.stepIntoAction.setEnabled(false);\n this.stepOutAction.setEnabled(false);\n this.stepAction.setEnabled(false);\n }\n\n const details = currentDebuggerModel ? currentDebuggerModel.debuggerPausedDetails() : null;\n await this.debuggerPausedMessage.render(\n details, Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance(),\n Breakpoints.BreakpointManager.BreakpointManager.instance());\n if (details) {\n this.updateDebuggerButtonsAndStatusForTest();\n }\n }\n\n private updateDebuggerButtonsAndStatusForTest(): void {\n }\n\n private clearInterface(): void {\n void this.updateDebuggerButtonsAndStatus();\n UI.Context.Context.instance().setFlavor(SDK.DebuggerModel.DebuggerPausedDetails, null);\n\n if (this.switchToPausedTargetTimeout) {\n clearTimeout(this.switchToPausedTargetTimeout);\n }\n this.liveLocationPool.disposeAll();\n }\n\n private switchToPausedTarget(debuggerModel: SDK.DebuggerModel.DebuggerModel): void {\n delete this.switchToPausedTargetTimeout;\n if (this.pausedInternal || debuggerModel.isPaused()) {\n return;\n }\n\n for (const debuggerModel of SDK.TargetManager.TargetManager.instance().models(SDK.DebuggerModel.DebuggerModel)) {\n if (debuggerModel.isPaused()) {\n UI.Context.Context.instance().setFlavor(SDK.Target.Target, debuggerModel.target());\n break;\n }\n }\n }\n\n runSnippet(): void {\n const uiSourceCode = this.sourcesViewInternal.currentUISourceCode();\n if (uiSourceCode) {\n void Snippets.ScriptSnippetFileSystem.evaluateScriptSnippet(uiSourceCode);\n }\n }\n\n private editorSelected(event: Common.EventTarget.EventTargetEvent): void {\n const uiSourceCode = event.data;\n if (this.editorView.mainWidget() &&\n Common.Settings.Settings.instance().moduleSetting('auto-reveal-in-navigator').get()) {\n void this.revealInNavigator(uiSourceCode, true);\n }\n }\n\n togglePause(): boolean {\n const target = UI.Context.Context.instance().flavor(SDK.Target.Target);\n if (!target) {\n return true;\n }\n const debuggerModel = target.model(SDK.DebuggerModel.DebuggerModel);\n if (!debuggerModel) {\n return true;\n }\n\n if (this.pausedInternal) {\n this.pausedInternal = false;\n debuggerModel.resume();\n } else {\n // Make sure pauses didn't stick skipped.\n debuggerModel.pause();\n }\n\n this.clearInterface();\n return true;\n }\n\n private prepareToResume(): SDK.DebuggerModel.DebuggerModel|null {\n if (!this.pausedInternal) {\n return null;\n }\n\n this.pausedInternal = false;\n\n this.clearInterface();\n const target = UI.Context.Context.instance().flavor(SDK.Target.Target);\n return target ? target.model(SDK.DebuggerModel.DebuggerModel) : null;\n }\n\n private longResume(): void {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n debuggerModel.skipAllPausesUntilReloadOrTimeout(500);\n debuggerModel.resume();\n }\n }\n\n private terminateExecution(): void {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n void debuggerModel.runtimeModel().terminateExecution();\n debuggerModel.resume();\n }\n }\n\n stepOver(): boolean {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n void debuggerModel.stepOver();\n }\n return true;\n }\n\n stepInto(): boolean {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n void debuggerModel.stepInto();\n }\n return true;\n }\n\n stepIntoAsync(): boolean {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n debuggerModel.scheduleStepIntoAsync();\n }\n return true;\n }\n\n stepOut(): boolean {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n void debuggerModel.stepOut();\n }\n return true;\n }\n\n private async continueToLocation(uiLocation: Workspace.UISourceCode.UILocation): Promise {\n const executionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);\n if (!executionContext) {\n return;\n }\n // Always use 0 column.\n const rawLocations =\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().uiLocationToRawLocations(\n uiLocation.uiSourceCode, uiLocation.lineNumber, 0);\n const rawLocation = rawLocations.find(location => location.debuggerModel === executionContext.debuggerModel);\n if (rawLocation && this.prepareToResume()) {\n rawLocation.continueToLocation();\n }\n }\n\n toggleBreakpointsActive(): void {\n Common.Settings.Settings.instance()\n .moduleSetting('breakpoints-active')\n .set(!Common.Settings.Settings.instance().moduleSetting('breakpoints-active').get());\n }\n\n private breakpointsActiveStateChanged(): void {\n const active = Common.Settings.Settings.instance().moduleSetting('breakpoints-active').get();\n this.toggleBreakpointsActiveAction.setToggled(!active);\n this.sourcesViewInternal.toggleBreakpointsActiveState(active);\n }\n\n private createDebugToolbar(): UI.Toolbar.Toolbar {\n const debugToolbar = new UI.Toolbar.Toolbar('scripts-debug-toolbar');\n debugToolbar.element.setAttribute('jslog', `${VisualLogging.toolbar('debug')}`);\n\n const longResumeButton =\n new UI.Toolbar.ToolbarButton(i18nString(UIStrings.resumeWithAllPausesBlockedForMs), 'play');\n longResumeButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, this.longResume, this);\n const terminateExecutionButton =\n new UI.Toolbar.ToolbarButton(i18nString(UIStrings.terminateCurrentJavascriptCall), 'stop');\n terminateExecutionButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, this.terminateExecution, this);\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createLongPressActionButton(\n this.togglePauseAction, [terminateExecutionButton, longResumeButton], []));\n\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.stepOverAction));\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.stepIntoAction));\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.stepOutAction));\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.stepAction));\n\n debugToolbar.appendSeparator();\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.toggleBreakpointsActiveAction));\n\n return debugToolbar;\n }\n\n private createDebugToolbarDrawer(): HTMLDivElement {\n const debugToolbarDrawer = document.createElement('div');\n debugToolbarDrawer.classList.add('scripts-debug-toolbar-drawer');\n\n const label = i18nString(UIStrings.pauseOnCaughtExceptions);\n const setting = Common.Settings.Settings.instance().moduleSetting('pause-on-caught-exception');\n debugToolbarDrawer.appendChild(UI.SettingsUI.createSettingCheckbox(label, setting, true));\n\n return debugToolbarDrawer;\n }\n\n appendApplicableItems(\n event: Event, contextMenu: UI.ContextMenu.ContextMenu,\n target: Workspace.UISourceCode.UISourceCode|Workspace.UISourceCode.UILocation|SDK.RemoteObject.RemoteObject|\n SDK.NetworkRequest.NetworkRequest|UISourceCodeFrame): void {\n if (target instanceof Workspace.UISourceCode.UISourceCode) {\n this.appendUISourceCodeItems(event, contextMenu, target);\n return;\n }\n if (target instanceof UISourceCodeFrame) {\n this.appendUISourceCodeFrameItems(contextMenu, target);\n return;\n }\n if (target instanceof Workspace.UISourceCode.UILocation) {\n this.appendUILocationItems(contextMenu, target);\n return;\n }\n if (target instanceof SDK.RemoteObject.RemoteObject) {\n this.appendRemoteObjectItems(contextMenu, target);\n return;\n }\n this.appendNetworkRequestItems(contextMenu, target);\n }\n\n private appendUISourceCodeItems(\n event: Event, contextMenu: UI.ContextMenu.ContextMenu, uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n if (!event.target) {\n return;\n }\n\n const eventTarget = (event.target as Node);\n if (!uiSourceCode.project().isServiceProject() &&\n !eventTarget.isSelfOrDescendant(this.navigatorTabbedLocation.widget().element) &&\n !(Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.JUST_MY_CODE) &&\n Bindings.IgnoreListManager.IgnoreListManager.instance().isUserOrSourceMapIgnoreListedUISourceCode(\n uiSourceCode))) {\n contextMenu.revealSection().appendItem(\n i18nString(UIStrings.revealInSidebar), this.revealInNavigator.bind(this, uiSourceCode), {\n jslogContext: 'sources.reveal-in-navigator-sidebar',\n });\n }\n // Ignore list only works for JavaScript debugging.\n if (uiSourceCode.contentType().hasScripts() &&\n Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()\n .scriptsForUISourceCode(uiSourceCode)\n .every(script => script.isJavaScript())) {\n this.callstackPane.appendIgnoreListURLContextMenuItems(contextMenu, uiSourceCode);\n }\n }\n\n private appendUISourceCodeFrameItems(contextMenu: UI.ContextMenu.ContextMenu, target: UISourceCodeFrame): void {\n if (target.uiSourceCode().contentType().isFromSourceMap() || target.textEditor.state.selection.main.empty) {\n return;\n }\n contextMenu.debugSection().appendAction('debugger.evaluate-selection');\n }\n\n appendUILocationItems(contextMenu: UI.ContextMenu.ContextMenu, uiLocation: Workspace.UISourceCode.UILocation): void {\n const uiSourceCode = uiLocation.uiSourceCode;\n\n if (!Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()\n .scriptsForUISourceCode(uiSourceCode)\n .every(script => script.isJavaScript())) {\n // Ignore List and 'Continue to here' currently only works for JavaScript debugging.\n return;\n }\n const contentType = uiSourceCode.contentType();\n if (contentType.hasScripts()) {\n const target = UI.Context.Context.instance().flavor(SDK.Target.Target);\n const debuggerModel = target ? target.model(SDK.DebuggerModel.DebuggerModel) : null;\n if (debuggerModel && debuggerModel.isPaused()) {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.continueToHere), this.continueToLocation.bind(this, uiLocation),\n {jslogContext: 'continue-to-here'});\n }\n\n this.callstackPane.appendIgnoreListURLContextMenuItems(contextMenu, uiSourceCode);\n }\n }\n\n private appendRemoteObjectItems(contextMenu: UI.ContextMenu.ContextMenu, remoteObject: SDK.RemoteObject.RemoteObject):\n void {\n const indent = Common.Settings.Settings.instance().moduleSetting('text-editor-indent').get();\n const executionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);\n\n function getObjectTitle(): string|undefined {\n if (remoteObject.type === 'wasm') {\n return remoteObject.subtype;\n }\n if (remoteObject.subtype === 'node') {\n return 'outerHTML';\n }\n return remoteObject.type;\n }\n const copyContextMenuTitle = getObjectTitle();\n\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.storeAsGlobalVariable),\n () => executionContext?.target()\n .model(SDK.ConsoleModel.ConsoleModel)\n ?.saveToTempVariable(executionContext, remoteObject),\n {jslogContext: 'store-as-global-variable'});\n\n const ctxMenuClipboardSection = contextMenu.clipboardSection();\n const inspectorFrontendHost = Host.InspectorFrontendHost.InspectorFrontendHostInstance;\n\n if (remoteObject.type === 'string') {\n ctxMenuClipboardSection.appendItem(i18nString(UIStrings.copyStringContents), () => {\n inspectorFrontendHost.copyText(remoteObject.value);\n }, {jslogContext: 'copy-string-contents'});\n ctxMenuClipboardSection.appendItem(i18nString(UIStrings.copyStringAsJSLiteral), () => {\n inspectorFrontendHost.copyText(Platform.StringUtilities.formatAsJSLiteral(remoteObject.value));\n }, {jslogContext: 'copy-string-as-js-literal'});\n ctxMenuClipboardSection.appendItem(i18nString(UIStrings.copyStringAsJSONLiteral), () => {\n inspectorFrontendHost.copyText(JSON.stringify(remoteObject.value));\n }, {jslogContext: 'copy-string-as-json-literal'});\n }\n // We are trying to copy a primitive value.\n else if (primitiveRemoteObjectTypes.has(remoteObject.type)) {\n ctxMenuClipboardSection.appendItem(i18nString(UIStrings.copyS, {PH1: String(copyContextMenuTitle)}), () => {\n inspectorFrontendHost.copyText(remoteObject.description);\n }, {jslogContext: 'copy-primitive'});\n }\n // We are trying to copy a remote object.\n else if (remoteObject.type === 'object') {\n const copyDecodedValueHandler = async(): Promise => {\n const result = await remoteObject.callFunctionJSON(toStringForClipboard, [{\n value: {\n subtype: remoteObject.subtype,\n indent: indent,\n },\n }]);\n inspectorFrontendHost.copyText(result);\n };\n\n ctxMenuClipboardSection.appendItem(\n i18nString(UIStrings.copyS, {PH1: String(copyContextMenuTitle)}), copyDecodedValueHandler,\n {jslogContext: 'copy-object'});\n }\n\n else if (remoteObject.type === 'function') {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.showFunctionDefinition), this.showFunctionDefinition.bind(this, remoteObject),\n {jslogContext: 'show-function-definition'});\n }\n\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function toStringForClipboard(this: Object, data: any): string|undefined {\n const subtype = data.subtype;\n const indent = data.indent;\n\n if (subtype === 'map') {\n if (this instanceof Map) {\n const elements = Array.from(this.entries());\n const literal = elements.length === 0 ? '' : JSON.stringify(elements, null, indent);\n return `new Map(${literal})`;\n }\n return undefined;\n }\n if (subtype === 'set') {\n if (this instanceof Set) {\n const values = Array.from(this.values());\n const literal = values.length === 0 ? '' : JSON.stringify(values, null, indent);\n return `new Set(${literal})`;\n }\n return undefined;\n }\n if (subtype === 'node') {\n return this instanceof Element ? this.outerHTML : undefined;\n }\n if (subtype && typeof this === 'undefined') {\n return String(subtype);\n }\n try {\n return JSON.stringify(this, null, indent);\n } catch (error) {\n return String(this);\n }\n }\n }\n\n private appendNetworkRequestItems(\n contextMenu: UI.ContextMenu.ContextMenu, request: SDK.NetworkRequest.NetworkRequest): void {\n const uiSourceCode = this.workspace.uiSourceCodeForURL(request.url());\n if (!uiSourceCode) {\n return;\n }\n const openText = i18nString(UIStrings.openInSourcesPanel);\n const callback: () => void = this.showUILocation.bind(this, uiSourceCode.uiLocation(0, 0));\n contextMenu.revealSection().appendItem(openText, callback, {jslogContext: 'reveal-in-sources'});\n }\n\n private showFunctionDefinition(remoteObject: SDK.RemoteObject.RemoteObject): void {\n void SDK.RemoteObject.RemoteFunction.objectAsFunction(remoteObject)\n .targetFunction()\n .then(\n targetFunction => targetFunction.debuggerModel()\n .functionDetailsPromise(targetFunction)\n .then(this.didGetFunctionDetails.bind(this)));\n }\n\n private async didGetFunctionDetails(response: {\n location: SDK.DebuggerModel.Location|null,\n }|null): Promise {\n if (!response || !response.location) {\n return;\n }\n\n const uiLocation =\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().rawLocationToUILocation(\n response.location);\n if (uiLocation) {\n this.showUILocation(uiLocation);\n }\n }\n\n private revealNavigatorSidebar(): void {\n void this.setAsCurrentPanel();\n this.editorView.showBoth(true);\n }\n\n private revealDebuggerSidebar(): void {\n if (!Common.Settings.Settings.instance().moduleSetting('auto-focus-on-debugger-paused-enabled').get()) {\n return;\n }\n void this.setAsCurrentPanel();\n this.splitWidget.showBoth(true);\n }\n\n private updateSidebarPosition(): void {\n let vertically;\n const position = Common.Settings.Settings.instance().moduleSetting('sidebar-position').get();\n if (position === 'right') {\n vertically = false;\n } else if (position === 'bottom') {\n vertically = true;\n } else {\n vertically = UI.InspectorView.InspectorView.instance().element.offsetWidth < 680;\n }\n\n if (this.sidebarPaneView && vertically === !this.splitWidget.isVertical()) {\n return;\n }\n\n if (this.sidebarPaneView && this.sidebarPaneView.shouldHideOnDetach()) {\n return;\n } // We can't reparent extension iframes.\n\n if (this.sidebarPaneView) {\n this.sidebarPaneView.detach();\n }\n\n this.splitWidget.setVertical(!vertically);\n this.splitWidget.element.classList.toggle('sources-split-view-vertical', vertically);\n\n SourcesPanel.updateResizerAndSidebarButtons(this);\n\n // Create vertical box with stack.\n const vbox = new UI.Widget.VBox();\n vbox.element.appendChild(this.debugToolbar.element);\n vbox.element.appendChild(this.debugToolbarDrawer);\n\n vbox.setMinimumAndPreferredSizes(minToolbarWidth, 25, minToolbarWidth, 100);\n this.sidebarPaneStack = UI.ViewManager.ViewManager.instance().createStackLocation(\n this.revealDebuggerSidebar.bind(this), undefined, 'debug');\n this.sidebarPaneStack.widget().element.classList.add('overflow-auto');\n this.sidebarPaneStack.widget().show(vbox.element);\n this.sidebarPaneStack.widget().element.appendChild(this.debuggerPausedMessage.element());\n this.sidebarPaneStack.appendApplicableItems('sources.sidebar-top');\n\n if (this.threadsSidebarPane) {\n this.sidebarPaneStack.appendView(this.threadsSidebarPane);\n }\n\n const jsBreakpoints = UI.ViewManager.ViewManager.instance().view('sources.js-breakpoints');\n const scopeChainView = UI.ViewManager.ViewManager.instance().view('sources.scope-chain');\n\n if (this.tabbedLocationHeader) {\n this.splitWidget.uninstallResizer(this.tabbedLocationHeader);\n this.tabbedLocationHeader = null;\n }\n\n if (!vertically) {\n // Populate the rest of the stack.\n this.sidebarPaneStack.appendView(this.watchSidebarPane);\n void this.sidebarPaneStack.showView(jsBreakpoints);\n void this.sidebarPaneStack.showView(scopeChainView);\n void this.sidebarPaneStack.showView(this.callstackPane);\n this.extensionSidebarPanesContainer = this.sidebarPaneStack;\n this.sidebarPaneView = vbox;\n this.splitWidget.uninstallResizer(this.debugToolbar.gripElementForResize());\n } else {\n const splitWidget =\n new UI.SplitWidget.SplitWidget(true, true, 'sources-panel-debugger-sidebar-split-view-state', 0.5);\n splitWidget.setMainWidget(vbox);\n\n // Populate the left stack.\n void this.sidebarPaneStack.showView(jsBreakpoints);\n void this.sidebarPaneStack.showView(this.callstackPane);\n\n const tabbedLocation =\n UI.ViewManager.ViewManager.instance().createTabbedLocation(this.revealDebuggerSidebar.bind(this));\n splitWidget.setSidebarWidget(tabbedLocation.tabbedPane());\n this.tabbedLocationHeader = tabbedLocation.tabbedPane().headerElement();\n this.splitWidget.installResizer(this.tabbedLocationHeader);\n this.splitWidget.installResizer(this.debugToolbar.gripElementForResize());\n tabbedLocation.appendView(scopeChainView);\n tabbedLocation.appendView(this.watchSidebarPane);\n tabbedLocation.appendApplicableItems('sources.sidebar-tabs');\n this.extensionSidebarPanesContainer = tabbedLocation;\n this.sidebarPaneView = splitWidget;\n }\n\n this.sidebarPaneStack.appendApplicableItems('sources.sidebar-bottom');\n const extensionSidebarPanes = Extensions.ExtensionServer.ExtensionServer.instance().sidebarPanes();\n for (let i = 0; i < extensionSidebarPanes.length; ++i) {\n this.addExtensionSidebarPane(extensionSidebarPanes[i]);\n }\n\n this.splitWidget.setSidebarWidget(this.sidebarPaneView);\n }\n\n setAsCurrentPanel(): Promise {\n return UI.ViewManager.ViewManager.instance().showView('sources');\n }\n\n private extensionSidebarPaneAdded(\n event: Common.EventTarget.EventTargetEvent): void {\n this.addExtensionSidebarPane(event.data);\n }\n\n private addExtensionSidebarPane(pane: Extensions.ExtensionPanel.ExtensionSidebarPane): void {\n if (pane.panelName() === this.name) {\n (this.extensionSidebarPanesContainer as UI.View.ViewLocation).appendView(pane);\n }\n }\n\n sourcesView(): SourcesView {\n return this.sourcesViewInternal;\n }\n\n private handleDrop(dataTransfer: DataTransfer): void {\n const items = dataTransfer.items;\n if (!items.length) {\n return;\n }\n const entry = items[0].webkitGetAsEntry();\n if (entry && entry.isDirectory) {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.upgradeDraggedFileSystemPermissions(entry.filesystem);\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.WorkspaceDropFolder);\n void UI.ViewManager.ViewManager.instance().showView('navigator-files');\n }\n }\n}\n\nexport let lastModificationTimeout = 200;\nexport const minToolbarWidth = 215;\n\nexport class UILocationRevealer implements Common.Revealer.Revealer {\n async reveal(uiLocation: Workspace.UISourceCode.UILocation, omitFocus?: boolean): Promise {\n SourcesPanel.instance().showUILocation(uiLocation, omitFocus);\n }\n}\n\nexport class UILocationRangeRevealer implements Common.Revealer.Revealer {\n static #instance?: UILocationRangeRevealer;\n static instance(opts: {forceNew: boolean} = {forceNew: false}): UILocationRangeRevealer {\n if (!UILocationRangeRevealer.#instance || opts.forceNew) {\n UILocationRangeRevealer.#instance = new UILocationRangeRevealer();\n }\n return UILocationRangeRevealer.#instance;\n }\n\n async reveal(uiLocationRange: Workspace.UISourceCode.UILocationRange, omitFocus?: boolean): Promise {\n const {uiSourceCode, range: {start: from, end: to}} = uiLocationRange;\n SourcesPanel.instance().showUISourceCode(uiSourceCode, {from, to}, omitFocus);\n }\n}\n\nexport class DebuggerLocationRevealer implements Common.Revealer.Revealer {\n async reveal(rawLocation: SDK.DebuggerModel.Location, omitFocus?: boolean): Promise {\n const uiLocation =\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().rawLocationToUILocation(\n rawLocation);\n if (uiLocation) {\n SourcesPanel.instance().showUILocation(uiLocation, omitFocus);\n }\n }\n}\n\nexport class UISourceCodeRevealer implements Common.Revealer.Revealer {\n async reveal(uiSourceCode: Workspace.UISourceCode.UISourceCode, omitFocus?: boolean): Promise {\n SourcesPanel.instance().showUISourceCode(uiSourceCode, undefined, omitFocus);\n }\n}\n\nexport class DebuggerPausedDetailsRevealer implements\n Common.Revealer.Revealer {\n async reveal(_object: SDK.DebuggerModel.DebuggerPausedDetails): Promise {\n if (Common.Settings.Settings.instance().moduleSetting('auto-focus-on-debugger-paused-enabled').get()) {\n return SourcesPanel.instance().setAsCurrentPanel();\n }\n }\n}\n\nexport class RevealingActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(context: UI.Context.Context, actionId: string): boolean {\n const panel = SourcesPanel.instance();\n if (!panel.ensureSourcesViewVisible()) {\n return false;\n }\n switch (actionId) {\n case 'debugger.toggle-pause': {\n // This action can be triggered both on the DevTools front-end itself,\n // or on the inspected target. If triggered on the DevTools front-end,\n // it will take care of resuming.\n //\n // If triggered on the target, NOT in hosted mode:\n // * ..and the paused overlay is enabled:\n // => do not take any action here, as the paused overlay will resume\n // * ..and the paused overlay is disabled:\n // => take care of the resume here\n // If triggered on the target in hosted mode:\n // * ..and the paused overlay is enabled:\n // => execution will not reach here, as shortcuts are not forwarded\n // and the paused overlay will resume\n // * ..and the paused overlay is disabled:\n // => overlay will not take care of resume, and neither will\n // DevTools as no shortcuts are forwarded from the target\n\n // Do not trigger a resume action, if: the shortcut was forwarded and the\n // paused overlay is enabled.\n const actionHandledInPausedOverlay = context.flavor(UI.ShortcutRegistry.ForwardedShortcut) &&\n !Common.Settings.Settings.instance().moduleSetting('disable-paused-state-overlay').get();\n if (actionHandledInPausedOverlay) {\n // Taken care of by inspector overlay: handled set to true to\n // register user metric.\n return true;\n }\n panel.togglePause();\n return true;\n }\n }\n return false;\n }\n}\n\nexport class ActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(context: UI.Context.Context, actionId: string): boolean {\n const panel = SourcesPanel.instance();\n switch (actionId) {\n case 'debugger.step-over': {\n panel.stepOver();\n return true;\n }\n case 'debugger.step-into': {\n panel.stepIntoAsync();\n return true;\n }\n case 'debugger.step': {\n panel.stepInto();\n return true;\n }\n case 'debugger.step-out': {\n panel.stepOut();\n return true;\n }\n case 'debugger.run-snippet': {\n panel.runSnippet();\n return true;\n }\n case 'debugger.toggle-breakpoints-active': {\n panel.toggleBreakpointsActive();\n return true;\n }\n case 'debugger.evaluate-selection': {\n const frame = context.flavor(UISourceCodeFrame);\n if (frame) {\n const {state: editorState} = frame.textEditor;\n let text = editorState.sliceDoc(editorState.selection.main.from, editorState.selection.main.to);\n const executionContext = context.flavor(SDK.RuntimeModel.ExecutionContext);\n const consoleModel = executionContext?.target().model(SDK.ConsoleModel.ConsoleModel);\n if (executionContext && consoleModel) {\n const message = consoleModel.addCommandMessage(executionContext, text);\n text = ObjectUI.JavaScriptREPL.JavaScriptREPL.wrapObjectLiteral(text);\n void consoleModel.evaluateCommandInConsole(executionContext, message, text, /* useCommandLineAPI */ true);\n }\n }\n return true;\n }\n case 'sources.reveal-in-navigator-sidebar': {\n const uiSourceCode = panel.sourcesView().currentUISourceCode();\n if (uiSourceCode === null) {\n return false;\n }\n void panel.revealInNavigator(uiSourceCode);\n return true;\n }\n case 'sources.toggle-navigator-sidebar': {\n panel.toggleNavigatorSidebar();\n return true;\n }\n case 'sources.toggle-debugger-sidebar': {\n panel.toggleDebuggerSidebar();\n return true;\n }\n }\n return false;\n }\n}\n\nexport class QuickSourceView extends UI.Widget.VBox {\n private readonly view: SourcesView;\n constructor() {\n super();\n this.element.classList.add('sources-view-wrapper');\n this.element.setAttribute('jslog', `${VisualLogging.panel('sources.quick').track({resize: true})}`);\n this.view = SourcesPanel.instance().sourcesView();\n }\n\n override wasShown(): void {\n UI.Context.Context.instance().setFlavor(QuickSourceView, this);\n super.wasShown();\n if (!SourcesPanel.instance().isShowing()) {\n this.showViewInWrapper();\n } else {\n UI.InspectorView.InspectorView.instance().setDrawerMinimized(true);\n }\n SourcesPanel.updateResizerAndSidebarButtons(SourcesPanel.instance());\n }\n\n override willHide(): void {\n UI.InspectorView.InspectorView.instance().setDrawerMinimized(false);\n queueMicrotask(() => {\n SourcesPanel.updateResizerAndSidebarButtons(SourcesPanel.instance());\n });\n super.willHide();\n UI.Context.Context.instance().setFlavor(QuickSourceView, null);\n }\n\n showViewInWrapper(): void {\n this.view.show(this.element);\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"SourcesPanel.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sources/SourcesPanel.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAC7C,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,WAAW,MAAM,yCAAyC,CAAC;AACvE,OAAO,KAAK,UAAU,MAAM,uCAAuC,CAAC;AACpE,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAC;AACjE,OAAO,KAAK,UAAU,MAAM,gDAAgD,CAAC;AAC7E,OAAO,KAAK,QAAQ,MAAM,mDAAmD,CAAC;AAE9E,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAC3E,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAC,qBAAqB,EAAC,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AACjD,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AACvD,OAAO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C/B,CAAC;CACF","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/*\n * Copyright (C) 2008 Apple Inc. All Rights Reserved.\n * Copyright (C) 2011 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as Breakpoints from '../../models/breakpoints/breakpoints.js';\nimport * as Extensions from '../../models/extensions/extensions.js';\nimport * as Workspace from '../../models/workspace/workspace.js';\nimport * as IconButton from '../../ui/components/icon_button/icon_button.js';\nimport * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';\nimport type * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\nimport * as Snippets from '../snippets/snippets.js';\n\nimport {CallStackSidebarPane} from './CallStackSidebarPane.js';\nimport {DebuggerPausedMessage} from './DebuggerPausedMessage.js';\nimport {NavigatorView} from './NavigatorView.js';\nimport sourcesPanelStyles from './sourcesPanel.css.js';\nimport {Events, SourcesView} from './SourcesView.js';\nimport {ThreadsSidebarPane} from './ThreadsSidebarPane.js';\nimport {UISourceCodeFrame} from './UISourceCodeFrame.js';\n\nconst UIStrings = {\n /**\n *@description Text that appears when user drag and drop something (for example, a file) in Sources Panel of the Sources panel\n */\n dropWorkspaceFolderHere: 'Drop workspace folder here',\n /**\n *@description Text to show more options\n */\n moreOptions: 'More options',\n /**\n * @description Tooltip for the the navigator toggle in the Sources panel. Command to open/show the\n * sidebar containing the navigator tool.\n */\n showNavigator: 'Show navigator',\n /**\n * @description Tooltip for the the navigator toggle in the Sources panel. Command to close/hide\n * the sidebar containing the navigator tool.\n */\n hideNavigator: 'Hide navigator',\n /**\n * @description Screen reader announcement when the navigator sidebar is shown in the Sources panel.\n */\n navigatorShown: 'Navigator sidebar shown',\n /**\n * @description Screen reader announcement when the navigator sidebar is hidden in the Sources panel.\n */\n navigatorHidden: 'Navigator sidebar hidden',\n /**\n * @description Screen reader announcement when the navigator sidebar is shown in the Sources panel.\n */\n debuggerShown: 'Debugger sidebar shown',\n /**\n * @description Screen reader announcement when the navigator sidebar is hidden in the Sources panel.\n */\n debuggerHidden: 'Debugger sidebar hidden',\n /**\n * @description Tooltip for the the debugger toggle in the Sources panel. Command to open/show the\n * sidebar containing the debugger tool.\n */\n showDebugger: 'Show debugger',\n /**\n * @description Tooltip for the the debugger toggle in the Sources panel. Command to close/hide the\n * sidebar containing the debugger tool.\n */\n hideDebugger: 'Hide debugger',\n /**\n *@description Text in Sources Panel of the Sources panel\n */\n groupByFolder: 'Group by folder',\n /**\n *@description Text in Sources Panel of the Sources panel\n */\n groupByAuthored: 'Group by Authored/Deployed',\n /**\n *@description Text in Sources Panel of the Sources panel\n */\n hideIgnoreListed: 'Hide ignore-listed sources',\n /**\n *@description Tooltip text that appears when hovering over the largeicon play button in the Sources Panel of the Sources panel\n */\n resumeWithAllPausesBlockedForMs: 'Resume with all pauses blocked for 500 ms',\n /**\n *@description Tooltip text that appears when hovering over the largeicon terminate execution button in the Sources Panel of the Sources panel\n */\n terminateCurrentJavascriptCall: 'Terminate current JavaScript call',\n /**\n *@description Text in Sources Panel of the Sources panel\n */\n pauseOnCaughtExceptions: 'Pause on caught exceptions',\n /**\n *@description A context menu item in the Sources Panel of the Sources panel\n */\n revealInSidebar: 'Reveal in navigator sidebar',\n /**\n *@description A context menu item in the Sources Panel of the Sources panel when debugging JS code.\n * When clicked, the execution is resumed until it reaches the line specified by the right-click that\n * opened the context menu.\n */\n continueToHere: 'Continue to here',\n /**\n *@description A context menu item in the Console that stores selection as a temporary global variable\n */\n storeAsGlobalVariable: 'Store as global variable',\n /**\n *@description A context menu item in the Console, Sources, and Network panel\n *@example {string} PH1\n */\n copyS: 'Copy {PH1}',\n /**\n *@description A context menu item for strings in the Console, Sources, and Network panel.\n * When clicked, the raw contents of the string is copied to the clipboard.\n */\n copyStringContents: 'Copy string contents',\n /**\n *@description A context menu item for strings in the Console, Sources, and Network panel.\n * When clicked, the string is copied to the clipboard as a valid JavaScript literal.\n */\n copyStringAsJSLiteral: 'Copy string as JavaScript literal',\n /**\n *@description A context menu item for strings in the Console, Sources, and Network panel.\n * When clicked, the string is copied to the clipboard as a valid JSON literal.\n */\n copyStringAsJSONLiteral: 'Copy string as JSON literal',\n /**\n *@description A context menu item in the Sources Panel of the Sources panel\n */\n showFunctionDefinition: 'Show function definition',\n /**\n *@description Text in Sources Panel of the Sources panel\n */\n openInSourcesPanel: 'Open in Sources panel',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sources/SourcesPanel.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nconst primitiveRemoteObjectTypes = new Set(['number', 'boolean', 'bigint', 'undefined']);\nlet sourcesPanelInstance: SourcesPanel;\n\nexport class SourcesPanel extends UI.Panel.Panel implements\n UI.ContextMenu.Provider,\n SDK.TargetManager.Observer, UI.View.ViewLocationResolver {\n private readonly workspace: Workspace.Workspace.WorkspaceImpl;\n private readonly togglePauseAction: UI.ActionRegistration.Action;\n private readonly stepOverAction: UI.ActionRegistration.Action;\n private readonly stepIntoAction: UI.ActionRegistration.Action;\n private readonly stepOutAction: UI.ActionRegistration.Action;\n private readonly stepAction: UI.ActionRegistration.Action;\n private readonly toggleBreakpointsActiveAction: UI.ActionRegistration.Action;\n private readonly debugToolbar: UI.Toolbar.Toolbar;\n private readonly debugToolbarDrawer: HTMLDivElement;\n private readonly debuggerPausedMessage: DebuggerPausedMessage;\n private splitWidget: UI.SplitWidget.SplitWidget;\n editorView: UI.SplitWidget.SplitWidget;\n private navigatorTabbedLocation: UI.View.TabbedViewLocation;\n sourcesViewInternal: SourcesView;\n private readonly toggleNavigatorSidebarButton: UI.Toolbar.ToolbarButton;\n private readonly toggleDebuggerSidebarButton: UI.Toolbar.ToolbarButton;\n private threadsSidebarPane: UI.View.View|null;\n private readonly watchSidebarPane: UI.View.View;\n private readonly callstackPane: CallStackSidebarPane;\n private liveLocationPool: Bindings.LiveLocation.LiveLocationPool;\n private lastModificationTime: number;\n private pausedInternal?: boolean;\n private switchToPausedTargetTimeout?: number;\n private ignoreExecutionLineEvents?: boolean;\n private executionLineLocation?: Bindings.DebuggerWorkspaceBinding.Location|null;\n private pauseOnExceptionButton?: UI.Toolbar.ToolbarToggle;\n private sidebarPaneStack?: UI.View.ViewLocation;\n private tabbedLocationHeader?: Element|null;\n private extensionSidebarPanesContainer?: UI.View.ViewLocation;\n sidebarPaneView?: UI.Widget.VBox|UI.SplitWidget.SplitWidget;\n constructor() {\n super('sources');\n\n new UI.DropTarget.DropTarget(\n this.element, [UI.DropTarget.Type.Folder], i18nString(UIStrings.dropWorkspaceFolderHere),\n this.handleDrop.bind(this));\n\n this.workspace = Workspace.Workspace.WorkspaceImpl.instance();\n this.togglePauseAction = UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.toggle-pause');\n this.stepOverAction = UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.step-over');\n this.stepIntoAction = UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.step-into');\n this.stepOutAction = UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.step-out');\n this.stepAction = UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.step');\n this.toggleBreakpointsActiveAction =\n UI.ActionRegistry.ActionRegistry.instance().getAction('debugger.toggle-breakpoints-active');\n\n this.debugToolbar = this.createDebugToolbar();\n this.debugToolbarDrawer = this.createDebugToolbarDrawer();\n this.debuggerPausedMessage = new DebuggerPausedMessage();\n\n const initialDebugSidebarWidth = 225;\n this.splitWidget =\n new UI.SplitWidget.SplitWidget(true, true, 'sources-panel-split-view-state', initialDebugSidebarWidth);\n this.splitWidget.enableShowModeSaving();\n this.splitWidget.show(this.element);\n\n // Create scripts navigator\n const initialNavigatorWidth = 225;\n this.editorView =\n new UI.SplitWidget.SplitWidget(true, false, 'sources-panel-navigator-split-view-state', initialNavigatorWidth);\n this.editorView.enableShowModeSaving();\n this.splitWidget.setMainWidget(this.editorView);\n\n // Create navigator tabbed pane with toolbar.\n this.navigatorTabbedLocation = UI.ViewManager.ViewManager.instance().createTabbedLocation(\n this.revealNavigatorSidebar.bind(this), 'navigator-view', true, true);\n const tabbedPane = this.navigatorTabbedLocation.tabbedPane();\n tabbedPane.setMinimumSize(100, 25);\n tabbedPane.element.classList.add('navigator-tabbed-pane');\n tabbedPane.headerElement().setAttribute(\n 'jslog',\n `${VisualLogging.toolbar('navigator').track({keydown: 'ArrowUp|ArrowLeft|ArrowDown|ArrowRight|Enter|Space'})}`);\n const navigatorMenuButton =\n new UI.Toolbar.ToolbarMenuButton(this.populateNavigatorMenu.bind(this), true, 'more-options');\n navigatorMenuButton.setTitle(i18nString(UIStrings.moreOptions));\n tabbedPane.rightToolbar().appendToolbarItem(navigatorMenuButton);\n tabbedPane.addEventListener(\n UI.TabbedPane.Events.TabSelected,\n ({data: {tabId}}: Common.EventTarget.EventTargetEvent) =>\n Host.userMetrics.sourcesSidebarTabShown(tabId));\n\n if (UI.ViewManager.ViewManager.instance().hasViewsForLocation('run-view-sidebar')) {\n const navigatorSplitWidget =\n new UI.SplitWidget.SplitWidget(false, true, 'source-panel-navigator-sidebar-split-view-state');\n navigatorSplitWidget.setMainWidget(tabbedPane);\n const runViewTabbedPane = UI.ViewManager.ViewManager.instance()\n .createTabbedLocation(this.revealNavigatorSidebar.bind(this), 'run-view-sidebar')\n .tabbedPane();\n navigatorSplitWidget.setSidebarWidget(runViewTabbedPane);\n navigatorSplitWidget.installResizer(runViewTabbedPane.headerElement());\n this.editorView.setSidebarWidget(navigatorSplitWidget);\n } else {\n this.editorView.setSidebarWidget(tabbedPane);\n }\n\n this.sourcesViewInternal = new SourcesView();\n this.sourcesViewInternal.addEventListener(Events.EditorSelected, this.editorSelected.bind(this));\n\n this.toggleNavigatorSidebarButton = this.editorView.createShowHideSidebarButton(\n i18nString(UIStrings.showNavigator), i18nString(UIStrings.hideNavigator), i18nString(UIStrings.navigatorShown),\n i18nString(UIStrings.navigatorHidden), 'navigator');\n this.toggleDebuggerSidebarButton = this.splitWidget.createShowHideSidebarButton(\n i18nString(UIStrings.showDebugger), i18nString(UIStrings.hideDebugger), i18nString(UIStrings.debuggerShown),\n i18nString(UIStrings.debuggerHidden), 'debugger');\n this.editorView.setMainWidget(this.sourcesViewInternal);\n\n this.threadsSidebarPane = null;\n this.watchSidebarPane = UI.ViewManager.ViewManager.instance().view('sources.watch');\n this.callstackPane = CallStackSidebarPane.instance();\n\n Common.Settings.Settings.instance()\n .moduleSetting('sidebar-position')\n .addChangeListener(this.updateSidebarPosition.bind(this));\n this.updateSidebarPosition();\n\n void this.updateDebuggerButtonsAndStatus();\n\n this.liveLocationPool = new Bindings.LiveLocation.LiveLocationPool();\n\n this.setTarget(UI.Context.Context.instance().flavor(SDK.Target.Target));\n Common.Settings.Settings.instance()\n .moduleSetting('breakpoints-active')\n .addChangeListener(this.breakpointsActiveStateChanged, this);\n UI.Context.Context.instance().addFlavorChangeListener(SDK.Target.Target, this.onCurrentTargetChanged, this);\n UI.Context.Context.instance().addFlavorChangeListener(SDK.DebuggerModel.CallFrame, this.callFrameChanged, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.DebuggerWasEnabled, this.debuggerWasEnabled, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.DebuggerPaused, this.debuggerPaused, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.DebugInfoAttached, this.debugInfoAttached, this);\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.DebuggerResumed,\n event => this.debuggerResumed(event.data));\n SDK.TargetManager.TargetManager.instance().addModelListener(\n SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.GlobalObjectCleared,\n event => this.debuggerResumed(event.data));\n Extensions.ExtensionServer.ExtensionServer.instance().addEventListener(\n Extensions.ExtensionServer.Events.SidebarPaneAdded, this.extensionSidebarPaneAdded, this);\n SDK.TargetManager.TargetManager.instance().observeTargets(this);\n this.lastModificationTime = -Infinity;\n }\n\n static instance(opts: {\n forceNew: boolean|null,\n }|undefined = {forceNew: null}): SourcesPanel {\n const {forceNew} = opts;\n if (!sourcesPanelInstance || forceNew) {\n sourcesPanelInstance = new SourcesPanel();\n }\n\n return sourcesPanelInstance;\n }\n\n static updateResizerAndSidebarButtons(panel: SourcesPanel): void {\n panel.sourcesViewInternal.leftToolbar().removeToolbarItems();\n panel.sourcesViewInternal.rightToolbar().removeToolbarItems();\n panel.sourcesViewInternal.bottomToolbar().removeToolbarItems();\n const isInWrapper = UI.Context.Context.instance().flavor(QuickSourceView) &&\n !UI.InspectorView.InspectorView.instance().isDrawerMinimized();\n if (panel.splitWidget.isVertical() || isInWrapper) {\n panel.splitWidget.uninstallResizer(panel.sourcesViewInternal.toolbarContainerElement());\n } else {\n panel.splitWidget.installResizer(panel.sourcesViewInternal.toolbarContainerElement());\n }\n if (!isInWrapper) {\n panel.sourcesViewInternal.leftToolbar().appendToolbarItem(panel.toggleNavigatorSidebarButton);\n if (panel.splitWidget.isVertical()) {\n panel.sourcesViewInternal.rightToolbar().appendToolbarItem(panel.toggleDebuggerSidebarButton);\n } else {\n panel.sourcesViewInternal.bottomToolbar().appendToolbarItem(panel.toggleDebuggerSidebarButton);\n }\n }\n }\n\n targetAdded(_target: SDK.Target.Target): void {\n this.showThreadsIfNeeded();\n }\n\n targetRemoved(_target: SDK.Target.Target): void {\n }\n\n private showThreadsIfNeeded(): void {\n if (ThreadsSidebarPane.shouldBeShown() && !this.threadsSidebarPane) {\n this.threadsSidebarPane = UI.ViewManager.ViewManager.instance().view('sources.threads');\n if (this.sidebarPaneStack && this.threadsSidebarPane) {\n this.sidebarPaneStack.appendView(\n this.threadsSidebarPane, this.splitWidget.isVertical() ? this.watchSidebarPane : this.callstackPane);\n }\n }\n }\n\n private setTarget(target: SDK.Target.Target|null): void {\n if (!target) {\n return;\n }\n const debuggerModel = target.model(SDK.DebuggerModel.DebuggerModel);\n if (!debuggerModel) {\n return;\n }\n\n if (debuggerModel.isPaused()) {\n this.showDebuggerPausedDetails(\n (debuggerModel.debuggerPausedDetails() as SDK.DebuggerModel.DebuggerPausedDetails));\n } else {\n this.pausedInternal = false;\n this.clearInterface();\n this.toggleDebuggerSidebarButton.setEnabled(true);\n }\n }\n\n private onCurrentTargetChanged({data: target}: Common.EventTarget.EventTargetEvent): void {\n this.setTarget(target);\n }\n paused(): boolean {\n return this.pausedInternal || false;\n }\n\n override wasShown(): void {\n UI.Context.Context.instance().setFlavor(SourcesPanel, this);\n this.registerCSSFiles([sourcesPanelStyles]);\n super.wasShown();\n if (UI.Context.Context.instance().flavor(QuickSourceView)) {\n UI.InspectorView.InspectorView.instance().setDrawerMinimized(true);\n SourcesPanel.updateResizerAndSidebarButtons(this);\n }\n this.editorView.setMainWidget(this.sourcesViewInternal);\n }\n\n override willHide(): void {\n super.willHide();\n UI.Context.Context.instance().setFlavor(SourcesPanel, null);\n const wrapperView = UI.Context.Context.instance().flavor(QuickSourceView);\n if (wrapperView) {\n wrapperView.showViewInWrapper();\n UI.InspectorView.InspectorView.instance().setDrawerMinimized(false);\n SourcesPanel.updateResizerAndSidebarButtons(this);\n }\n }\n\n resolveLocation(locationName: string): UI.View.ViewLocation|null {\n if (locationName === 'sources.sidebar-top' || locationName === 'sources.sidebar-bottom' ||\n locationName === 'sources.sidebar-tabs') {\n return this.sidebarPaneStack || null;\n }\n return this.navigatorTabbedLocation;\n }\n\n ensureSourcesViewVisible(): boolean {\n if (UI.Context.Context.instance().flavor(QuickSourceView)) {\n return true;\n }\n if (!UI.InspectorView.InspectorView.instance().canSelectPanel('sources')) {\n return false;\n }\n void UI.ViewManager.ViewManager.instance().showView('sources');\n return true;\n }\n\n override onResize(): void {\n if (Common.Settings.Settings.instance().moduleSetting('sidebar-position').get() === 'auto') {\n this.element.window().requestAnimationFrame(this.updateSidebarPosition.bind(this));\n } // Do not force layout.\n }\n\n override searchableView(): UI.SearchableView.SearchableView {\n return this.sourcesViewInternal.searchableView();\n }\n\n toggleNavigatorSidebar(): void {\n this.editorView.toggleSidebar();\n }\n\n toggleDebuggerSidebar(): void {\n this.splitWidget.toggleSidebar();\n }\n\n private debuggerPaused(event: Common.EventTarget.EventTargetEvent): void {\n const debuggerModel = event.data;\n const details = debuggerModel.debuggerPausedDetails();\n if (!this.pausedInternal &&\n Common.Settings.Settings.instance().moduleSetting('auto-focus-on-debugger-paused-enabled').get()) {\n void this.setAsCurrentPanel();\n }\n\n if (UI.Context.Context.instance().flavor(SDK.Target.Target) === debuggerModel.target()) {\n this.showDebuggerPausedDetails((details as SDK.DebuggerModel.DebuggerPausedDetails));\n } else if (!this.pausedInternal) {\n UI.Context.Context.instance().setFlavor(SDK.Target.Target, debuggerModel.target());\n }\n }\n\n private debugInfoAttached(event: Common.EventTarget.EventTargetEvent): void {\n const {debuggerModel} = event.data;\n if (!debuggerModel.isPaused()) {\n return;\n }\n\n const details = debuggerModel.debuggerPausedDetails();\n if (details && UI.Context.Context.instance().flavor(SDK.Target.Target) === debuggerModel.target()) {\n this.showDebuggerPausedDetails(details);\n }\n }\n\n private showDebuggerPausedDetails(details: SDK.DebuggerModel.DebuggerPausedDetails): void {\n this.pausedInternal = true;\n void this.updateDebuggerButtonsAndStatus();\n UI.Context.Context.instance().setFlavor(SDK.DebuggerModel.DebuggerPausedDetails, details);\n this.toggleDebuggerSidebarButton.setEnabled(false);\n this.revealDebuggerSidebar();\n window.focus();\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.bringToFront();\n }\n\n private debuggerResumed(debuggerModel: SDK.DebuggerModel.DebuggerModel): void {\n const target = debuggerModel.target();\n if (UI.Context.Context.instance().flavor(SDK.Target.Target) !== target) {\n return;\n }\n this.pausedInternal = false;\n this.clearInterface();\n this.toggleDebuggerSidebarButton.setEnabled(true);\n this.switchToPausedTargetTimeout = window.setTimeout(this.switchToPausedTarget.bind(this, debuggerModel), 500);\n }\n\n private debuggerWasEnabled(event: Common.EventTarget.EventTargetEvent): void {\n const debuggerModel = event.data;\n if (UI.Context.Context.instance().flavor(SDK.Target.Target) !== debuggerModel.target()) {\n return;\n }\n\n void this.updateDebuggerButtonsAndStatus();\n }\n\n get visibleView(): UI.Widget.Widget|null {\n return this.sourcesViewInternal.visibleView();\n }\n\n showUISourceCode(\n uiSourceCode: Workspace.UISourceCode.UISourceCode, location?: SourceFrame.SourceFrame.RevealPosition,\n omitFocus?: boolean): void {\n if (omitFocus) {\n if (!this.isShowing() && !UI.Context.Context.instance().flavor(QuickSourceView)) {\n return;\n }\n } else {\n this.showEditor();\n }\n this.sourcesViewInternal.showSourceLocation(uiSourceCode, location, omitFocus);\n }\n\n private showEditor(): void {\n if (UI.Context.Context.instance().flavor(QuickSourceView)) {\n return;\n }\n void this.setAsCurrentPanel();\n }\n\n showUILocation(uiLocation: Workspace.UISourceCode.UILocation, omitFocus?: boolean): void {\n const {uiSourceCode, lineNumber, columnNumber} = uiLocation;\n this.showUISourceCode(uiSourceCode, {lineNumber, columnNumber}, omitFocus);\n }\n\n async revealInNavigator(uiSourceCode: Workspace.UISourceCode.UISourceCode, skipReveal?: boolean): Promise {\n const viewManager = UI.ViewManager.ViewManager.instance();\n for (const view of viewManager.viewsForLocation(UI.ViewManager.ViewLocationValues.NAVIGATOR_VIEW)) {\n const navigatorView = await view.widget();\n if (navigatorView instanceof NavigatorView && navigatorView.acceptProject(uiSourceCode.project())) {\n navigatorView.revealUISourceCode(uiSourceCode, true);\n this.navigatorTabbedLocation.tabbedPane().selectTab(view.viewId(), true);\n if (!skipReveal) {\n this.editorView.showBoth(true);\n navigatorView.focus();\n }\n break;\n }\n }\n }\n\n private addExperimentMenuItem(\n menuSection: UI.ContextMenu.Section, experiment: string, menuItem: Common.UIString.LocalizedString): void {\n // menu handler\n function toggleExperiment(): void {\n const checked = Root.Runtime.experiments.isEnabled(experiment);\n Root.Runtime.experiments.setEnabled(experiment, !checked);\n Host.userMetrics.experimentChanged(experiment, checked);\n // Need to signal to the NavigatorView that grouping has changed. Unfortunately,\n // it can't listen to an experiment, and this class doesn't directly interact\n // with it, so we will convince it a different grouping setting changed. When we switch\n // from using an experiment to a setting, it will listen to that setting and we\n // won't need to do this.\n const groupByFolderSetting = Common.Settings.Settings.instance().moduleSetting('navigator-group-by-folder');\n groupByFolderSetting.set(groupByFolderSetting.get());\n }\n\n menuSection.appendCheckboxItem(menuItem, toggleExperiment, {\n checked: Root.Runtime.experiments.isEnabled(experiment),\n additionalElement: IconButton.Icon.create('experiment'),\n jslogContext: Platform.StringUtilities.toKebabCase(experiment),\n });\n }\n\n private populateNavigatorMenu(contextMenu: UI.ContextMenu.ContextMenu): void {\n const groupByFolderSetting = Common.Settings.Settings.instance().moduleSetting('navigator-group-by-folder');\n contextMenu.appendItemsAtLocation('navigatorMenu');\n contextMenu.viewSection().appendCheckboxItem(\n i18nString(UIStrings.groupByFolder), () => groupByFolderSetting.set(!groupByFolderSetting.get()),\n {checked: groupByFolderSetting.get(), jslogContext: groupByFolderSetting.name});\n\n this.addExperimentMenuItem(\n contextMenu.viewSection(), Root.Runtime.ExperimentName.AUTHORED_DEPLOYED_GROUPING,\n i18nString(UIStrings.groupByAuthored));\n this.addExperimentMenuItem(\n contextMenu.viewSection(), Root.Runtime.ExperimentName.JUST_MY_CODE, i18nString(UIStrings.hideIgnoreListed));\n }\n\n setIgnoreExecutionLineEvents(ignoreExecutionLineEvents: boolean): void {\n this.ignoreExecutionLineEvents = ignoreExecutionLineEvents;\n }\n\n updateLastModificationTime(): void {\n this.lastModificationTime = window.performance.now();\n }\n\n private async executionLineChanged(liveLocation: Bindings.LiveLocation.LiveLocation): Promise {\n const uiLocation = await liveLocation.uiLocation();\n if (liveLocation.isDisposed()) {\n return;\n }\n if (!uiLocation) {\n return;\n }\n if (window.performance.now() - this.lastModificationTime < lastModificationTimeout) {\n return;\n }\n this.sourcesViewInternal.showSourceLocation(uiLocation.uiSourceCode, uiLocation, undefined, true);\n }\n\n private lastModificationTimeoutPassedForTest(): void {\n lastModificationTimeout = Number.MIN_VALUE;\n }\n\n private updateLastModificationTimeForTest(): void {\n lastModificationTimeout = Number.MAX_VALUE;\n }\n\n private async callFrameChanged(): Promise {\n const callFrame = UI.Context.Context.instance().flavor(SDK.DebuggerModel.CallFrame);\n if (!callFrame) {\n return;\n }\n if (this.executionLineLocation) {\n this.executionLineLocation.dispose();\n }\n this.executionLineLocation =\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().createCallFrameLiveLocation(\n callFrame.location(), this.executionLineChanged.bind(this), this.liveLocationPool);\n }\n\n private async updateDebuggerButtonsAndStatus(): Promise {\n const currentTarget = UI.Context.Context.instance().flavor(SDK.Target.Target);\n const currentDebuggerModel = currentTarget ? currentTarget.model(SDK.DebuggerModel.DebuggerModel) : null;\n if (!currentDebuggerModel) {\n this.togglePauseAction.setEnabled(false);\n this.stepOverAction.setEnabled(false);\n this.stepIntoAction.setEnabled(false);\n this.stepOutAction.setEnabled(false);\n this.stepAction.setEnabled(false);\n } else if (this.pausedInternal) {\n this.togglePauseAction.setToggled(true);\n this.togglePauseAction.setEnabled(true);\n this.stepOverAction.setEnabled(true);\n this.stepIntoAction.setEnabled(true);\n this.stepOutAction.setEnabled(true);\n this.stepAction.setEnabled(true);\n } else {\n this.togglePauseAction.setToggled(false);\n this.togglePauseAction.setEnabled(!currentDebuggerModel.isPausing());\n this.stepOverAction.setEnabled(false);\n this.stepIntoAction.setEnabled(false);\n this.stepOutAction.setEnabled(false);\n this.stepAction.setEnabled(false);\n }\n\n const details = currentDebuggerModel ? currentDebuggerModel.debuggerPausedDetails() : null;\n await this.debuggerPausedMessage.render(\n details, Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance(),\n Breakpoints.BreakpointManager.BreakpointManager.instance());\n if (details) {\n this.updateDebuggerButtonsAndStatusForTest();\n }\n }\n\n private updateDebuggerButtonsAndStatusForTest(): void {\n }\n\n private clearInterface(): void {\n void this.updateDebuggerButtonsAndStatus();\n UI.Context.Context.instance().setFlavor(SDK.DebuggerModel.DebuggerPausedDetails, null);\n\n if (this.switchToPausedTargetTimeout) {\n clearTimeout(this.switchToPausedTargetTimeout);\n }\n this.liveLocationPool.disposeAll();\n }\n\n private switchToPausedTarget(debuggerModel: SDK.DebuggerModel.DebuggerModel): void {\n delete this.switchToPausedTargetTimeout;\n if (this.pausedInternal || debuggerModel.isPaused()) {\n return;\n }\n\n for (const debuggerModel of SDK.TargetManager.TargetManager.instance().models(SDK.DebuggerModel.DebuggerModel)) {\n if (debuggerModel.isPaused()) {\n UI.Context.Context.instance().setFlavor(SDK.Target.Target, debuggerModel.target());\n break;\n }\n }\n }\n\n runSnippet(): void {\n const uiSourceCode = this.sourcesViewInternal.currentUISourceCode();\n if (uiSourceCode) {\n void Snippets.ScriptSnippetFileSystem.evaluateScriptSnippet(uiSourceCode);\n }\n }\n\n private editorSelected(event: Common.EventTarget.EventTargetEvent): void {\n const uiSourceCode = event.data;\n if (this.editorView.mainWidget() &&\n Common.Settings.Settings.instance().moduleSetting('auto-reveal-in-navigator').get()) {\n void this.revealInNavigator(uiSourceCode, true);\n }\n }\n\n togglePause(): boolean {\n const target = UI.Context.Context.instance().flavor(SDK.Target.Target);\n if (!target) {\n return true;\n }\n const debuggerModel = target.model(SDK.DebuggerModel.DebuggerModel);\n if (!debuggerModel) {\n return true;\n }\n\n if (this.pausedInternal) {\n this.pausedInternal = false;\n debuggerModel.resume();\n } else {\n // Make sure pauses didn't stick skipped.\n debuggerModel.pause();\n }\n\n this.clearInterface();\n return true;\n }\n\n private prepareToResume(): SDK.DebuggerModel.DebuggerModel|null {\n if (!this.pausedInternal) {\n return null;\n }\n\n this.pausedInternal = false;\n\n this.clearInterface();\n const target = UI.Context.Context.instance().flavor(SDK.Target.Target);\n return target ? target.model(SDK.DebuggerModel.DebuggerModel) : null;\n }\n\n private longResume(): void {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n debuggerModel.skipAllPausesUntilReloadOrTimeout(500);\n debuggerModel.resume();\n }\n }\n\n private terminateExecution(): void {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n void debuggerModel.runtimeModel().terminateExecution();\n debuggerModel.resume();\n }\n }\n\n stepOver(): boolean {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n void debuggerModel.stepOver();\n }\n return true;\n }\n\n stepInto(): boolean {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n void debuggerModel.stepInto();\n }\n return true;\n }\n\n stepIntoAsync(): boolean {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n debuggerModel.scheduleStepIntoAsync();\n }\n return true;\n }\n\n stepOut(): boolean {\n const debuggerModel = this.prepareToResume();\n if (debuggerModel) {\n void debuggerModel.stepOut();\n }\n return true;\n }\n\n private async continueToLocation(uiLocation: Workspace.UISourceCode.UILocation): Promise {\n const executionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);\n if (!executionContext) {\n return;\n }\n // Always use 0 column.\n const rawLocations =\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().uiLocationToRawLocations(\n uiLocation.uiSourceCode, uiLocation.lineNumber, 0);\n const rawLocation = rawLocations.find(location => location.debuggerModel === executionContext.debuggerModel);\n if (rawLocation && this.prepareToResume()) {\n rawLocation.continueToLocation();\n }\n }\n\n toggleBreakpointsActive(): void {\n Common.Settings.Settings.instance()\n .moduleSetting('breakpoints-active')\n .set(!Common.Settings.Settings.instance().moduleSetting('breakpoints-active').get());\n }\n\n private breakpointsActiveStateChanged(): void {\n const active = Common.Settings.Settings.instance().moduleSetting('breakpoints-active').get();\n this.toggleBreakpointsActiveAction.setToggled(!active);\n this.sourcesViewInternal.toggleBreakpointsActiveState(active);\n }\n\n private createDebugToolbar(): UI.Toolbar.Toolbar {\n const debugToolbar = new UI.Toolbar.Toolbar('scripts-debug-toolbar');\n debugToolbar.element.setAttribute(\n 'jslog',\n `${VisualLogging.toolbar('debug').track({keydown: 'ArrowUp|ArrowLeft|ArrowDown|ArrowRight|Enter|Space'})}`);\n\n const longResumeButton =\n new UI.Toolbar.ToolbarButton(i18nString(UIStrings.resumeWithAllPausesBlockedForMs), 'play');\n longResumeButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, this.longResume, this);\n const terminateExecutionButton =\n new UI.Toolbar.ToolbarButton(i18nString(UIStrings.terminateCurrentJavascriptCall), 'stop');\n terminateExecutionButton.addEventListener(UI.Toolbar.ToolbarButton.Events.Click, this.terminateExecution, this);\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createLongPressActionButton(\n this.togglePauseAction, [terminateExecutionButton, longResumeButton], []));\n\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.stepOverAction));\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.stepIntoAction));\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.stepOutAction));\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.stepAction));\n\n debugToolbar.appendSeparator();\n debugToolbar.appendToolbarItem(UI.Toolbar.Toolbar.createActionButton(this.toggleBreakpointsActiveAction));\n\n return debugToolbar;\n }\n\n private createDebugToolbarDrawer(): HTMLDivElement {\n const debugToolbarDrawer = document.createElement('div');\n debugToolbarDrawer.classList.add('scripts-debug-toolbar-drawer');\n\n const label = i18nString(UIStrings.pauseOnCaughtExceptions);\n const setting = Common.Settings.Settings.instance().moduleSetting('pause-on-caught-exception');\n debugToolbarDrawer.appendChild(UI.SettingsUI.createSettingCheckbox(label, setting, true));\n\n return debugToolbarDrawer;\n }\n\n appendApplicableItems(\n event: Event, contextMenu: UI.ContextMenu.ContextMenu,\n target: Workspace.UISourceCode.UISourceCode|Workspace.UISourceCode.UILocation|SDK.RemoteObject.RemoteObject|\n SDK.NetworkRequest.NetworkRequest|UISourceCodeFrame): void {\n if (target instanceof Workspace.UISourceCode.UISourceCode) {\n this.appendUISourceCodeItems(event, contextMenu, target);\n return;\n }\n if (target instanceof UISourceCodeFrame) {\n this.appendUISourceCodeFrameItems(contextMenu, target);\n return;\n }\n if (target instanceof Workspace.UISourceCode.UILocation) {\n this.appendUILocationItems(contextMenu, target);\n return;\n }\n if (target instanceof SDK.RemoteObject.RemoteObject) {\n this.appendRemoteObjectItems(contextMenu, target);\n return;\n }\n this.appendNetworkRequestItems(contextMenu, target);\n }\n\n private appendUISourceCodeItems(\n event: Event, contextMenu: UI.ContextMenu.ContextMenu, uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n if (!event.target) {\n return;\n }\n\n const eventTarget = (event.target as Node);\n if (!uiSourceCode.project().isServiceProject() &&\n !eventTarget.isSelfOrDescendant(this.navigatorTabbedLocation.widget().element) &&\n !(Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.JUST_MY_CODE) &&\n Bindings.IgnoreListManager.IgnoreListManager.instance().isUserOrSourceMapIgnoreListedUISourceCode(\n uiSourceCode))) {\n contextMenu.revealSection().appendItem(\n i18nString(UIStrings.revealInSidebar), this.revealInNavigator.bind(this, uiSourceCode), {\n jslogContext: 'sources.reveal-in-navigator-sidebar',\n });\n }\n // Ignore list only works for JavaScript debugging.\n if (uiSourceCode.contentType().hasScripts() &&\n Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()\n .scriptsForUISourceCode(uiSourceCode)\n .every(script => script.isJavaScript())) {\n this.callstackPane.appendIgnoreListURLContextMenuItems(contextMenu, uiSourceCode);\n }\n }\n\n private appendUISourceCodeFrameItems(contextMenu: UI.ContextMenu.ContextMenu, target: UISourceCodeFrame): void {\n if (target.uiSourceCode().contentType().isFromSourceMap() || target.textEditor.state.selection.main.empty) {\n return;\n }\n contextMenu.debugSection().appendAction('debugger.evaluate-selection');\n }\n\n appendUILocationItems(contextMenu: UI.ContextMenu.ContextMenu, uiLocation: Workspace.UISourceCode.UILocation): void {\n const uiSourceCode = uiLocation.uiSourceCode;\n\n if (!Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()\n .scriptsForUISourceCode(uiSourceCode)\n .every(script => script.isJavaScript())) {\n // Ignore List and 'Continue to here' currently only works for JavaScript debugging.\n return;\n }\n const contentType = uiSourceCode.contentType();\n if (contentType.hasScripts()) {\n const target = UI.Context.Context.instance().flavor(SDK.Target.Target);\n const debuggerModel = target ? target.model(SDK.DebuggerModel.DebuggerModel) : null;\n if (debuggerModel && debuggerModel.isPaused()) {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.continueToHere), this.continueToLocation.bind(this, uiLocation),\n {jslogContext: 'continue-to-here'});\n }\n\n this.callstackPane.appendIgnoreListURLContextMenuItems(contextMenu, uiSourceCode);\n }\n }\n\n private appendRemoteObjectItems(contextMenu: UI.ContextMenu.ContextMenu, remoteObject: SDK.RemoteObject.RemoteObject):\n void {\n const indent = Common.Settings.Settings.instance().moduleSetting('text-editor-indent').get();\n const executionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);\n\n function getObjectTitle(): string|undefined {\n if (remoteObject.type === 'wasm') {\n return remoteObject.subtype;\n }\n if (remoteObject.subtype === 'node') {\n return 'outerHTML';\n }\n return remoteObject.type;\n }\n const copyContextMenuTitle = getObjectTitle();\n\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.storeAsGlobalVariable),\n () => executionContext?.target()\n .model(SDK.ConsoleModel.ConsoleModel)\n ?.saveToTempVariable(executionContext, remoteObject),\n {jslogContext: 'store-as-global-variable'});\n\n const ctxMenuClipboardSection = contextMenu.clipboardSection();\n const inspectorFrontendHost = Host.InspectorFrontendHost.InspectorFrontendHostInstance;\n\n if (remoteObject.type === 'string') {\n ctxMenuClipboardSection.appendItem(i18nString(UIStrings.copyStringContents), () => {\n inspectorFrontendHost.copyText(remoteObject.value);\n }, {jslogContext: 'copy-string-contents'});\n ctxMenuClipboardSection.appendItem(i18nString(UIStrings.copyStringAsJSLiteral), () => {\n inspectorFrontendHost.copyText(Platform.StringUtilities.formatAsJSLiteral(remoteObject.value));\n }, {jslogContext: 'copy-string-as-js-literal'});\n ctxMenuClipboardSection.appendItem(i18nString(UIStrings.copyStringAsJSONLiteral), () => {\n inspectorFrontendHost.copyText(JSON.stringify(remoteObject.value));\n }, {jslogContext: 'copy-string-as-json-literal'});\n }\n // We are trying to copy a primitive value.\n else if (primitiveRemoteObjectTypes.has(remoteObject.type)) {\n ctxMenuClipboardSection.appendItem(i18nString(UIStrings.copyS, {PH1: String(copyContextMenuTitle)}), () => {\n inspectorFrontendHost.copyText(remoteObject.description);\n }, {jslogContext: 'copy-primitive'});\n }\n // We are trying to copy a remote object.\n else if (remoteObject.type === 'object') {\n const copyDecodedValueHandler = async(): Promise => {\n const result = await remoteObject.callFunctionJSON(toStringForClipboard, [{\n value: {\n subtype: remoteObject.subtype,\n indent: indent,\n },\n }]);\n inspectorFrontendHost.copyText(result);\n };\n\n ctxMenuClipboardSection.appendItem(\n i18nString(UIStrings.copyS, {PH1: String(copyContextMenuTitle)}), copyDecodedValueHandler,\n {jslogContext: 'copy-object'});\n }\n\n else if (remoteObject.type === 'function') {\n contextMenu.debugSection().appendItem(\n i18nString(UIStrings.showFunctionDefinition), this.showFunctionDefinition.bind(this, remoteObject),\n {jslogContext: 'show-function-definition'});\n }\n\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function toStringForClipboard(this: Object, data: any): string|undefined {\n const subtype = data.subtype;\n const indent = data.indent;\n\n if (subtype === 'map') {\n if (this instanceof Map) {\n const elements = Array.from(this.entries());\n const literal = elements.length === 0 ? '' : JSON.stringify(elements, null, indent);\n return `new Map(${literal})`;\n }\n return undefined;\n }\n if (subtype === 'set') {\n if (this instanceof Set) {\n const values = Array.from(this.values());\n const literal = values.length === 0 ? '' : JSON.stringify(values, null, indent);\n return `new Set(${literal})`;\n }\n return undefined;\n }\n if (subtype === 'node') {\n return this instanceof Element ? this.outerHTML : undefined;\n }\n if (subtype && typeof this === 'undefined') {\n return String(subtype);\n }\n try {\n return JSON.stringify(this, null, indent);\n } catch (error) {\n return String(this);\n }\n }\n }\n\n private appendNetworkRequestItems(\n contextMenu: UI.ContextMenu.ContextMenu, request: SDK.NetworkRequest.NetworkRequest): void {\n const uiSourceCode = this.workspace.uiSourceCodeForURL(request.url());\n if (!uiSourceCode) {\n return;\n }\n const openText = i18nString(UIStrings.openInSourcesPanel);\n const callback: () => void = this.showUILocation.bind(this, uiSourceCode.uiLocation(0, 0));\n contextMenu.revealSection().appendItem(openText, callback, {jslogContext: 'reveal-in-sources'});\n }\n\n private showFunctionDefinition(remoteObject: SDK.RemoteObject.RemoteObject): void {\n void SDK.RemoteObject.RemoteFunction.objectAsFunction(remoteObject)\n .targetFunction()\n .then(\n targetFunction => targetFunction.debuggerModel()\n .functionDetailsPromise(targetFunction)\n .then(this.didGetFunctionDetails.bind(this)));\n }\n\n private async didGetFunctionDetails(response: {\n location: SDK.DebuggerModel.Location|null,\n }|null): Promise {\n if (!response || !response.location) {\n return;\n }\n\n const uiLocation =\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().rawLocationToUILocation(\n response.location);\n if (uiLocation) {\n this.showUILocation(uiLocation);\n }\n }\n\n private revealNavigatorSidebar(): void {\n void this.setAsCurrentPanel();\n this.editorView.showBoth(true);\n }\n\n private revealDebuggerSidebar(): void {\n if (!Common.Settings.Settings.instance().moduleSetting('auto-focus-on-debugger-paused-enabled').get()) {\n return;\n }\n void this.setAsCurrentPanel();\n this.splitWidget.showBoth(true);\n }\n\n private updateSidebarPosition(): void {\n let vertically;\n const position = Common.Settings.Settings.instance().moduleSetting('sidebar-position').get();\n if (position === 'right') {\n vertically = false;\n } else if (position === 'bottom') {\n vertically = true;\n } else {\n vertically = UI.InspectorView.InspectorView.instance().element.offsetWidth < 680;\n }\n\n if (this.sidebarPaneView && vertically === !this.splitWidget.isVertical()) {\n return;\n }\n\n if (this.sidebarPaneView && this.sidebarPaneView.shouldHideOnDetach()) {\n return;\n } // We can't reparent extension iframes.\n\n if (this.sidebarPaneView) {\n this.sidebarPaneView.detach();\n }\n\n this.splitWidget.setVertical(!vertically);\n this.splitWidget.element.classList.toggle('sources-split-view-vertical', vertically);\n\n SourcesPanel.updateResizerAndSidebarButtons(this);\n\n // Create vertical box with stack.\n const vbox = new UI.Widget.VBox();\n vbox.element.appendChild(this.debugToolbar.element);\n vbox.element.appendChild(this.debugToolbarDrawer);\n\n vbox.setMinimumAndPreferredSizes(minToolbarWidth, 25, minToolbarWidth, 100);\n this.sidebarPaneStack = UI.ViewManager.ViewManager.instance().createStackLocation(\n this.revealDebuggerSidebar.bind(this), undefined, 'debug');\n this.sidebarPaneStack.widget().element.classList.add('overflow-auto');\n this.sidebarPaneStack.widget().show(vbox.element);\n this.sidebarPaneStack.widget().element.appendChild(this.debuggerPausedMessage.element());\n this.sidebarPaneStack.appendApplicableItems('sources.sidebar-top');\n\n if (this.threadsSidebarPane) {\n this.sidebarPaneStack.appendView(this.threadsSidebarPane);\n }\n\n const jsBreakpoints = UI.ViewManager.ViewManager.instance().view('sources.js-breakpoints');\n const scopeChainView = UI.ViewManager.ViewManager.instance().view('sources.scope-chain');\n\n if (this.tabbedLocationHeader) {\n this.splitWidget.uninstallResizer(this.tabbedLocationHeader);\n this.tabbedLocationHeader = null;\n }\n\n if (!vertically) {\n // Populate the rest of the stack.\n this.sidebarPaneStack.appendView(this.watchSidebarPane);\n void this.sidebarPaneStack.showView(jsBreakpoints);\n void this.sidebarPaneStack.showView(scopeChainView);\n void this.sidebarPaneStack.showView(this.callstackPane);\n this.extensionSidebarPanesContainer = this.sidebarPaneStack;\n this.sidebarPaneView = vbox;\n this.splitWidget.uninstallResizer(this.debugToolbar.gripElementForResize());\n } else {\n const splitWidget =\n new UI.SplitWidget.SplitWidget(true, true, 'sources-panel-debugger-sidebar-split-view-state', 0.5);\n splitWidget.setMainWidget(vbox);\n\n // Populate the left stack.\n void this.sidebarPaneStack.showView(jsBreakpoints);\n void this.sidebarPaneStack.showView(this.callstackPane);\n\n const tabbedLocation =\n UI.ViewManager.ViewManager.instance().createTabbedLocation(this.revealDebuggerSidebar.bind(this));\n splitWidget.setSidebarWidget(tabbedLocation.tabbedPane());\n this.tabbedLocationHeader = tabbedLocation.tabbedPane().headerElement();\n this.splitWidget.installResizer(this.tabbedLocationHeader);\n this.splitWidget.installResizer(this.debugToolbar.gripElementForResize());\n tabbedLocation.appendView(scopeChainView);\n tabbedLocation.appendView(this.watchSidebarPane);\n tabbedLocation.appendApplicableItems('sources.sidebar-tabs');\n this.extensionSidebarPanesContainer = tabbedLocation;\n this.sidebarPaneView = splitWidget;\n }\n\n this.sidebarPaneStack.appendApplicableItems('sources.sidebar-bottom');\n const extensionSidebarPanes = Extensions.ExtensionServer.ExtensionServer.instance().sidebarPanes();\n for (let i = 0; i < extensionSidebarPanes.length; ++i) {\n this.addExtensionSidebarPane(extensionSidebarPanes[i]);\n }\n\n this.splitWidget.setSidebarWidget(this.sidebarPaneView);\n }\n\n setAsCurrentPanel(): Promise {\n return UI.ViewManager.ViewManager.instance().showView('sources');\n }\n\n private extensionSidebarPaneAdded(\n event: Common.EventTarget.EventTargetEvent): void {\n this.addExtensionSidebarPane(event.data);\n }\n\n private addExtensionSidebarPane(pane: Extensions.ExtensionPanel.ExtensionSidebarPane): void {\n if (pane.panelName() === this.name) {\n (this.extensionSidebarPanesContainer as UI.View.ViewLocation).appendView(pane);\n }\n }\n\n sourcesView(): SourcesView {\n return this.sourcesViewInternal;\n }\n\n private handleDrop(dataTransfer: DataTransfer): void {\n const items = dataTransfer.items;\n if (!items.length) {\n return;\n }\n const entry = items[0].webkitGetAsEntry();\n if (entry && entry.isDirectory) {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.upgradeDraggedFileSystemPermissions(entry.filesystem);\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.WorkspaceDropFolder);\n void UI.ViewManager.ViewManager.instance().showView('navigator-files');\n }\n }\n}\n\nexport let lastModificationTimeout = 200;\nexport const minToolbarWidth = 215;\n\nexport class UILocationRevealer implements Common.Revealer.Revealer {\n async reveal(uiLocation: Workspace.UISourceCode.UILocation, omitFocus?: boolean): Promise {\n SourcesPanel.instance().showUILocation(uiLocation, omitFocus);\n }\n}\n\nexport class UILocationRangeRevealer implements Common.Revealer.Revealer {\n static #instance?: UILocationRangeRevealer;\n static instance(opts: {forceNew: boolean} = {forceNew: false}): UILocationRangeRevealer {\n if (!UILocationRangeRevealer.#instance || opts.forceNew) {\n UILocationRangeRevealer.#instance = new UILocationRangeRevealer();\n }\n return UILocationRangeRevealer.#instance;\n }\n\n async reveal(uiLocationRange: Workspace.UISourceCode.UILocationRange, omitFocus?: boolean): Promise {\n const {uiSourceCode, range: {start: from, end: to}} = uiLocationRange;\n SourcesPanel.instance().showUISourceCode(uiSourceCode, {from, to}, omitFocus);\n }\n}\n\nexport class DebuggerLocationRevealer implements Common.Revealer.Revealer {\n async reveal(rawLocation: SDK.DebuggerModel.Location, omitFocus?: boolean): Promise {\n const uiLocation =\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().rawLocationToUILocation(\n rawLocation);\n if (uiLocation) {\n SourcesPanel.instance().showUILocation(uiLocation, omitFocus);\n }\n }\n}\n\nexport class UISourceCodeRevealer implements Common.Revealer.Revealer {\n async reveal(uiSourceCode: Workspace.UISourceCode.UISourceCode, omitFocus?: boolean): Promise {\n SourcesPanel.instance().showUISourceCode(uiSourceCode, undefined, omitFocus);\n }\n}\n\nexport class DebuggerPausedDetailsRevealer implements\n Common.Revealer.Revealer {\n async reveal(_object: SDK.DebuggerModel.DebuggerPausedDetails): Promise {\n if (Common.Settings.Settings.instance().moduleSetting('auto-focus-on-debugger-paused-enabled').get()) {\n return SourcesPanel.instance().setAsCurrentPanel();\n }\n }\n}\n\nexport class RevealingActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(context: UI.Context.Context, actionId: string): boolean {\n const panel = SourcesPanel.instance();\n if (!panel.ensureSourcesViewVisible()) {\n return false;\n }\n switch (actionId) {\n case 'debugger.toggle-pause': {\n // This action can be triggered both on the DevTools front-end itself,\n // or on the inspected target. If triggered on the DevTools front-end,\n // it will take care of resuming.\n //\n // If triggered on the target, NOT in hosted mode:\n // * ..and the paused overlay is enabled:\n // => do not take any action here, as the paused overlay will resume\n // * ..and the paused overlay is disabled:\n // => take care of the resume here\n // If triggered on the target in hosted mode:\n // * ..and the paused overlay is enabled:\n // => execution will not reach here, as shortcuts are not forwarded\n // and the paused overlay will resume\n // * ..and the paused overlay is disabled:\n // => overlay will not take care of resume, and neither will\n // DevTools as no shortcuts are forwarded from the target\n\n // Do not trigger a resume action, if: the shortcut was forwarded and the\n // paused overlay is enabled.\n const actionHandledInPausedOverlay = context.flavor(UI.ShortcutRegistry.ForwardedShortcut) &&\n !Common.Settings.Settings.instance().moduleSetting('disable-paused-state-overlay').get();\n if (actionHandledInPausedOverlay) {\n // Taken care of by inspector overlay: handled set to true to\n // register user metric.\n return true;\n }\n panel.togglePause();\n return true;\n }\n }\n return false;\n }\n}\n\nexport class ActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(context: UI.Context.Context, actionId: string): boolean {\n const panel = SourcesPanel.instance();\n switch (actionId) {\n case 'debugger.step-over': {\n panel.stepOver();\n return true;\n }\n case 'debugger.step-into': {\n panel.stepIntoAsync();\n return true;\n }\n case 'debugger.step': {\n panel.stepInto();\n return true;\n }\n case 'debugger.step-out': {\n panel.stepOut();\n return true;\n }\n case 'debugger.run-snippet': {\n panel.runSnippet();\n return true;\n }\n case 'debugger.toggle-breakpoints-active': {\n panel.toggleBreakpointsActive();\n return true;\n }\n case 'debugger.evaluate-selection': {\n const frame = context.flavor(UISourceCodeFrame);\n if (frame) {\n const {state: editorState} = frame.textEditor;\n let text = editorState.sliceDoc(editorState.selection.main.from, editorState.selection.main.to);\n const executionContext = context.flavor(SDK.RuntimeModel.ExecutionContext);\n const consoleModel = executionContext?.target().model(SDK.ConsoleModel.ConsoleModel);\n if (executionContext && consoleModel) {\n const message = consoleModel.addCommandMessage(executionContext, text);\n text = ObjectUI.JavaScriptREPL.JavaScriptREPL.wrapObjectLiteral(text);\n void consoleModel.evaluateCommandInConsole(executionContext, message, text, /* useCommandLineAPI */ true);\n }\n }\n return true;\n }\n case 'sources.reveal-in-navigator-sidebar': {\n const uiSourceCode = panel.sourcesView().currentUISourceCode();\n if (uiSourceCode === null) {\n return false;\n }\n void panel.revealInNavigator(uiSourceCode);\n return true;\n }\n case 'sources.toggle-navigator-sidebar': {\n panel.toggleNavigatorSidebar();\n return true;\n }\n case 'sources.toggle-debugger-sidebar': {\n panel.toggleDebuggerSidebar();\n return true;\n }\n }\n return false;\n }\n}\n\nexport class QuickSourceView extends UI.Widget.VBox {\n private readonly view: SourcesView;\n constructor() {\n super();\n this.element.classList.add('sources-view-wrapper');\n this.element.setAttribute('jslog', `${VisualLogging.panel('sources.quick').track({resize: true})}`);\n this.view = SourcesPanel.instance().sourcesView();\n }\n\n override wasShown(): void {\n UI.Context.Context.instance().setFlavor(QuickSourceView, this);\n super.wasShown();\n if (!SourcesPanel.instance().isShowing()) {\n this.showViewInWrapper();\n } else {\n UI.InspectorView.InspectorView.instance().setDrawerMinimized(true);\n }\n SourcesPanel.updateResizerAndSidebarButtons(SourcesPanel.instance());\n }\n\n override willHide(): void {\n UI.InspectorView.InspectorView.instance().setDrawerMinimized(false);\n queueMicrotask(() => {\n SourcesPanel.updateResizerAndSidebarButtons(SourcesPanel.instance());\n });\n super.willHide();\n UI.Context.Context.instance().setFlavor(QuickSourceView, null);\n }\n\n showViewInWrapper(): void {\n this.view.show(this.element);\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/sources/TabbedEditorContainer.js b/public/panels/sources/TabbedEditorContainer.js index 29b5149cf..4f1ad089d 100644 --- a/public/panels/sources/TabbedEditorContainer.js +++ b/public/panels/sources/TabbedEditorContainer.js @@ -84,7 +84,7 @@ export class TabbedEditorContainer extends Common.ObjectWrapper.ObjectWrapper { this.tabbedPane.setAllowTabReorder(true, true); this.tabbedPane.addEventListener(UI.TabbedPane.Events.TabClosed, this.tabClosed, this); this.tabbedPane.addEventListener(UI.TabbedPane.Events.TabSelected, this.tabSelected, this); - this.tabbedPane.headerElement().setAttribute('jslog', `${VisualLogging.toolbar('top')}`); + this.tabbedPane.headerElement().setAttribute('jslog', `${VisualLogging.toolbar('top').track({ keydown: 'ArrowUp|ArrowLeft|ArrowDown|ArrowRight|Enter|Space' })}`); Persistence.Persistence.PersistenceImpl.instance().addEventListener(Persistence.Persistence.Events.BindingCreated, this.onBindingCreated, this); Persistence.Persistence.PersistenceImpl.instance().addEventListener(Persistence.Persistence.Events.BindingRemoved, this.onBindingRemoved, this); Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance().addEventListener("RequestsForHeaderOverridesFileChanged" /* Persistence.NetworkPersistenceManager.Events.RequestsForHeaderOverridesFileChanged */, this.#onRequestsForHeaderOverridesFileChanged, this); diff --git a/public/panels/sources/TabbedEditorContainer.js.map b/public/panels/sources/TabbedEditorContainer.js.map index fc8636b50..726081b45 100644 --- a/public/panels/sources/TabbedEditorContainer.js.map +++ b/public/panels/sources/TabbedEditorContainer.js.map @@ -1 +1 @@ -{"version":3,"file":"TabbedEditorContainer.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sources/TabbedEditorContainer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,UAAU,MAAM,uCAAuC,CAAC;AACpE,OAAO,KAAK,WAAW,MAAM,yCAAyC,CAAC;AACvE,OAAO,KAAK,SAAS,MAAM,uCAAuC,CAAC;AACnE,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAC;AAEjE,OAAO,KAAK,UAAU,MAAM,g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,CAAC;QAC9B,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;YAChB,OAAO;SACR;QACD,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAC9B,CAAC;IAED,QAAQ;QACN,MAAM,sBAAsB,GAAG,EAAE,CAAC;QAClC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE;YAC7B,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;YACvC,IAAI,cAAc,EAAE;gBAClB,sBAAsB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;aAC7C;YACD,IAAI,sBAAsB,CAAC,MAAM,KAAK,iCAAiC,EAAE;gBACvE,MAAM;aACP;SACF;QACD,OAAO,sBAAsB,CAAC;IAChC,CAAC;IAED,4DAA4D;IAC5D,IAAI;QACF,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF;AAED,MAAM,OAAO,0BAA0B;IACpB,eAAe,CAAwB;IAExD,YAAY,eAAsC;QAChD,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,CAAC;IAED,SAAS,CAAC,WAAqC,EAAE,GAAa;QAC5D,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;IAED,aAAa,CAAC,KAAa,EAAE,WAAuC;QAClE,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IACzD,CAAC;CACF","sourcesContent":["/*\n * Copyright (C) 2011 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as Extensions from '../../models/extensions/extensions.js';\nimport * as Persistence from '../../models/persistence/persistence.js';\nimport * as TextUtils from '../../models/text_utils/text_utils.js';\nimport * as Workspace from '../../models/workspace/workspace.js';\nimport type * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';\nimport * as IconButton from '../../ui/components/icon_button/icon_button.js';\nimport * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\nimport * as Snippets from '../snippets/snippets.js';\n\nimport {SourcesView} from './SourcesView.js';\nimport {UISourceCodeFrame} from './UISourceCodeFrame.js';\n\nconst UIStrings = {\n /**\n *@description Text in Tabbed Editor Container of the Sources panel\n *@example {example.file} PH1\n */\n areYouSureYouWantToCloseUnsaved: 'Are you sure you want to close unsaved file: {PH1}?',\n /**\n *@description Error message for tooltip showing that a file in Sources could not be loaded\n */\n unableToLoadThisContent: 'Unable to load this content.',\n /**\n *@description Icon title in Tabbed Editor Container of the Sources panel\n */\n changesToThisFileWereNotSavedTo: 'Changes to this file were not saved to file system.',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sources/TabbedEditorContainer.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nexport interface TabbedEditorContainerDelegate {\n viewForFile(uiSourceCode: Workspace.UISourceCode.UISourceCode): UI.Widget.Widget;\n\n recycleUISourceCodeFrame(sourceFrame: UISourceCodeFrame, uiSourceCode: Workspace.UISourceCode.UISourceCode): void;\n}\n\nlet tabId = 0;\n\nexport class TabbedEditorContainer extends Common.ObjectWrapper.ObjectWrapper {\n private readonly delegate: TabbedEditorContainerDelegate;\n private readonly tabbedPane: UI.TabbedPane.TabbedPane;\n private tabIds: Map;\n private readonly files: Map;\n private readonly previouslyViewedFilesSetting: Common.Settings.Setting;\n private readonly history: History;\n private readonly uriToUISourceCode: Map;\n private readonly idToUISourceCode: Map;\n private currentFileInternal!: Workspace.UISourceCode.UISourceCode|null;\n private currentView!: UI.Widget.Widget|null;\n private scrollTimer?: number;\n private reentrantShow: boolean;\n constructor(\n delegate: TabbedEditorContainerDelegate, setting: Common.Settings.Setting,\n placeholderElement: Element, focusedPlaceholderElement?: Element) {\n super();\n this.delegate = delegate;\n\n this.tabbedPane = new UI.TabbedPane.TabbedPane();\n this.tabbedPane.setPlaceholderElement(placeholderElement, focusedPlaceholderElement);\n this.tabbedPane.setTabDelegate(new EditorContainerTabDelegate(this));\n\n this.tabbedPane.setCloseableTabs(true);\n this.tabbedPane.setAllowTabReorder(true, true);\n\n this.tabbedPane.addEventListener(UI.TabbedPane.Events.TabClosed, this.tabClosed, this);\n this.tabbedPane.addEventListener(UI.TabbedPane.Events.TabSelected, this.tabSelected, this);\n\n this.tabbedPane.headerElement().setAttribute('jslog', `${VisualLogging.toolbar('top')}`);\n\n Persistence.Persistence.PersistenceImpl.instance().addEventListener(\n Persistence.Persistence.Events.BindingCreated, this.onBindingCreated, this);\n Persistence.Persistence.PersistenceImpl.instance().addEventListener(\n Persistence.Persistence.Events.BindingRemoved, this.onBindingRemoved, this);\n Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance().addEventListener(\n Persistence.NetworkPersistenceManager.Events.RequestsForHeaderOverridesFileChanged,\n this.#onRequestsForHeaderOverridesFileChanged, this);\n\n this.tabIds = new Map();\n this.files = new Map();\n\n this.previouslyViewedFilesSetting = setting;\n this.history = History.fromObject(this.previouslyViewedFilesSetting.get());\n this.uriToUISourceCode = new Map();\n this.idToUISourceCode = new Map();\n this.reentrantShow = false;\n }\n\n private onBindingCreated(event: Common.EventTarget.EventTargetEvent):\n void {\n const binding = event.data;\n this.updateFileTitle(binding.fileSystem);\n\n const networkTabId = this.tabIds.get(binding.network);\n let fileSystemTabId = this.tabIds.get(binding.fileSystem);\n\n const wasSelectedInNetwork = this.currentFileInternal === binding.network;\n const networkKey = historyItemKey(binding.network);\n const currentSelectionRange = this.history.selectionRange(networkKey);\n const currentScrollLineNumber = this.history.scrollLineNumber(networkKey);\n this.history.remove(networkKey);\n\n if (!networkTabId) {\n return;\n }\n\n if (!fileSystemTabId) {\n const networkView = this.tabbedPane.tabView(networkTabId);\n const tabIndex = this.tabbedPane.tabIndex(networkTabId);\n if (networkView instanceof UISourceCodeFrame) {\n this.delegate.recycleUISourceCodeFrame(networkView, binding.fileSystem);\n fileSystemTabId = this.appendFileTab(binding.fileSystem, false, tabIndex, networkView);\n } else {\n fileSystemTabId = this.appendFileTab(binding.fileSystem, false, tabIndex);\n const fileSystemTabView = (this.tabbedPane.tabView(fileSystemTabId) as UI.Widget.Widget);\n this.restoreEditorProperties(fileSystemTabView, currentSelectionRange, currentScrollLineNumber);\n }\n }\n\n this.closeTabs([networkTabId], true);\n if (wasSelectedInNetwork) {\n this.tabbedPane.selectTab(fileSystemTabId, false);\n }\n\n this.updateHistory();\n }\n\n #onRequestsForHeaderOverridesFileChanged(\n event: Common.EventTarget.EventTargetEvent): void {\n this.updateFileTitle(event.data);\n }\n\n private onBindingRemoved(event: Common.EventTarget.EventTargetEvent):\n void {\n const binding = event.data;\n this.updateFileTitle(binding.fileSystem);\n }\n\n get view(): UI.Widget.Widget {\n return this.tabbedPane;\n }\n\n get visibleView(): UI.Widget.Widget|null {\n return this.tabbedPane.visibleView;\n }\n\n fileViews(): UI.Widget.Widget[] {\n return this.tabbedPane.tabViews();\n }\n\n leftToolbar(): UI.Toolbar.Toolbar {\n return this.tabbedPane.leftToolbar();\n }\n\n rightToolbar(): UI.Toolbar.Toolbar {\n return this.tabbedPane.rightToolbar();\n }\n\n show(parentElement: Element): void {\n this.tabbedPane.show(parentElement);\n }\n\n showFile(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n const binding = Persistence.Persistence.PersistenceImpl.instance().binding(uiSourceCode);\n uiSourceCode = binding ? binding.fileSystem : uiSourceCode;\n\n const frame = UI.Context.Context.instance().flavor(SourcesView);\n // If the content has already been set and the current frame is showing\n // the incoming uiSourceCode, then fire the event that the file has been loaded.\n // Otherwise, this event will fire as soon as the content has been set.\n if (frame?.currentSourceFrame()?.contentSet && this.currentFileInternal === uiSourceCode &&\n frame?.currentUISourceCode() === uiSourceCode) {\n Common.EventTarget.fireEvent('source-file-loaded', uiSourceCode.displayName(true));\n } else {\n if (uiSourceCode.project().type() === Workspace.Workspace.projectTypes.Debugger) {\n const script = Bindings.DefaultScriptMapping.DefaultScriptMapping.scriptForUISourceCode(uiSourceCode);\n if (script && script.isInlineScript() && !script.hasSourceURL) {\n if (script.isModule) {\n Host.userMetrics.vmInlineScriptContentShown(Host.UserMetrics.VMInlineScriptType.MODULE_SCRIPT);\n } else {\n Host.userMetrics.vmInlineScriptContentShown(Host.UserMetrics.VMInlineScriptType.CLASSIC_SCRIPT);\n }\n }\n }\n\n this.innerShowFile(uiSourceCode, true);\n }\n }\n\n closeFile(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n const tabId = this.tabIds.get(uiSourceCode);\n if (!tabId) {\n return;\n }\n this.closeTabs([tabId]);\n }\n\n closeAllFiles(): void {\n this.closeTabs(this.tabbedPane.tabIds());\n }\n\n historyUISourceCodes(): Workspace.UISourceCode.UISourceCode[] {\n const result = [];\n for (const {url, resourceType} of this.history.keys()) {\n const uiSourceCode = this.uriToUISourceCode.get(url);\n if (uiSourceCode !== undefined && uiSourceCode.contentType() === resourceType) {\n result.push(uiSourceCode);\n }\n }\n return result;\n }\n\n selectNextTab(): void {\n this.tabbedPane.selectNextTab();\n }\n\n selectPrevTab(): void {\n this.tabbedPane.selectPrevTab();\n }\n\n private addViewListeners(): void {\n if (!this.currentView || !(this.currentView instanceof SourceFrame.SourceFrame.SourceFrameImpl)) {\n return;\n }\n this.currentView.addEventListener(SourceFrame.SourceFrame.Events.EditorUpdate, this.onEditorUpdate, this);\n this.currentView.addEventListener(SourceFrame.SourceFrame.Events.EditorScroll, this.onScrollChanged, this);\n }\n\n private removeViewListeners(): void {\n if (!this.currentView || !(this.currentView instanceof SourceFrame.SourceFrame.SourceFrameImpl)) {\n return;\n }\n this.currentView.removeEventListener(SourceFrame.SourceFrame.Events.EditorUpdate, this.onEditorUpdate, this);\n this.currentView.removeEventListener(SourceFrame.SourceFrame.Events.EditorScroll, this.onScrollChanged, this);\n }\n\n private onScrollChanged(): void {\n if (this.currentView instanceof SourceFrame.SourceFrame.SourceFrameImpl) {\n if (this.scrollTimer) {\n clearTimeout(this.scrollTimer);\n }\n this.scrollTimer = window.setTimeout(() => this.previouslyViewedFilesSetting.set(this.history.toObject()), 100);\n if (this.currentFileInternal) {\n const {editor} = this.currentView.textEditor;\n const topBlock = editor.lineBlockAtHeight(editor.scrollDOM.getBoundingClientRect().top - editor.documentTop);\n const topLine = editor.state.doc.lineAt(topBlock.from).number - 1;\n this.history.updateScrollLineNumber(historyItemKey(this.currentFileInternal), topLine);\n }\n }\n }\n\n private onEditorUpdate({data: update}: Common.EventTarget.EventTargetEvent): void {\n if (update.docChanged || update.selectionSet) {\n const {main} = update.state.selection;\n const lineFrom = update.state.doc.lineAt(main.from), lineTo = update.state.doc.lineAt(main.to);\n const range = new TextUtils.TextRange.TextRange(\n lineFrom.number - 1, main.from - lineFrom.from, lineTo.number - 1, main.to - lineTo.from);\n if (this.currentFileInternal) {\n this.history.updateSelectionRange(historyItemKey(this.currentFileInternal), range);\n }\n this.previouslyViewedFilesSetting.set(this.history.toObject());\n\n if (this.currentFileInternal) {\n Extensions.ExtensionServer.ExtensionServer.instance().sourceSelectionChanged(\n this.currentFileInternal.url(), range);\n }\n }\n }\n\n private innerShowFile(uiSourceCode: Workspace.UISourceCode.UISourceCode, userGesture?: boolean): void {\n if (this.reentrantShow) {\n return;\n }\n const canonicalSourceCode = this.canonicalUISourceCode(uiSourceCode);\n const binding = Persistence.Persistence.PersistenceImpl.instance().binding(uiSourceCode);\n uiSourceCode = binding ? binding.fileSystem : uiSourceCode;\n if (this.currentFileInternal === uiSourceCode) {\n return;\n }\n\n this.removeViewListeners();\n this.currentFileInternal = uiSourceCode;\n\n try {\n // Selecting the tab may cause showFile to be called again, but with the canonical source code,\n // which is not what we want, so we prevent reentrant calls.\n this.reentrantShow = true;\n const tabId = this.tabIds.get(canonicalSourceCode) || this.appendFileTab(canonicalSourceCode, userGesture);\n\n this.tabbedPane.selectTab(tabId, userGesture);\n } finally {\n this.reentrantShow = false;\n }\n\n if (userGesture) {\n this.editorSelectedByUserAction();\n }\n\n const previousView = this.currentView;\n this.currentView = this.visibleView;\n this.addViewListeners();\n\n if (this.currentView instanceof UISourceCodeFrame && this.currentView.uiSourceCode() !== uiSourceCode) {\n // We are showing a different UISourceCode in the same tab (because it has the same URL). This\n // commonly happens when switching between workers or iframes containing the same code, and while the\n // contents are usually identical they may not be and it is important to show users when they aren't.\n this.delegate.recycleUISourceCodeFrame(this.currentView, uiSourceCode);\n if (uiSourceCode.project().type() !== Workspace.Workspace.projectTypes.FileSystem) {\n // Disable editing, because it may confuse users that only one of the copies of this code changes.\n uiSourceCode.disableEdit();\n }\n }\n\n const eventData = {\n currentFile: this.currentFileInternal,\n currentView: this.currentView,\n previousView: previousView,\n userGesture: userGesture,\n };\n this.dispatchEventToListeners(Events.EditorSelected, eventData);\n }\n\n private titleForFile(uiSourceCode: Workspace.UISourceCode.UISourceCode): string {\n const maxDisplayNameLength = 30;\n let title = Platform.StringUtilities.trimMiddle(uiSourceCode.displayName(true), maxDisplayNameLength);\n if (uiSourceCode.isDirty()) {\n title += '*';\n }\n return title;\n }\n\n private maybeCloseTab(id: string, nextTabId: string|null): boolean {\n const uiSourceCode = this.files.get(id);\n if (!uiSourceCode) {\n return false;\n }\n const shouldPrompt = uiSourceCode.isDirty() && uiSourceCode.project().canSetFileContent();\n // FIXME: this should be replaced with common Save/Discard/Cancel dialog.\n if (!shouldPrompt || confirm(i18nString(UIStrings.areYouSureYouWantToCloseUnsaved, {PH1: uiSourceCode.name()}))) {\n uiSourceCode.resetWorkingCopy();\n if (nextTabId) {\n this.tabbedPane.selectTab(nextTabId, true);\n }\n this.tabbedPane.closeTab(id, true);\n return true;\n }\n return false;\n }\n\n closeTabs(ids: string[], forceCloseDirtyTabs?: boolean): void {\n const dirtyTabs = [];\n const cleanTabs = [];\n for (let i = 0; i < ids.length; ++i) {\n const id = ids[i];\n const uiSourceCode = this.files.get(id);\n if (uiSourceCode) {\n if (!forceCloseDirtyTabs && uiSourceCode.isDirty()) {\n dirtyTabs.push(id);\n } else {\n cleanTabs.push(id);\n }\n }\n }\n if (dirtyTabs.length) {\n this.tabbedPane.selectTab(dirtyTabs[0], true);\n }\n this.tabbedPane.closeTabs(cleanTabs, true);\n for (let i = 0; i < dirtyTabs.length; ++i) {\n const nextTabId = i + 1 < dirtyTabs.length ? dirtyTabs[i + 1] : null;\n if (!this.maybeCloseTab(dirtyTabs[i], nextTabId)) {\n break;\n }\n }\n }\n\n onContextMenu(tabId: string, contextMenu: UI.ContextMenu.ContextMenu): void {\n const uiSourceCode = this.files.get(tabId);\n if (uiSourceCode) {\n contextMenu.appendApplicableItems(uiSourceCode);\n }\n }\n\n private canonicalUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode):\n Workspace.UISourceCode.UISourceCode {\n // Check if we have already a UISourceCode for this url\n const existingSourceCode = this.idToUISourceCode.get(uiSourceCode.canononicalScriptId());\n if (existingSourceCode) {\n // Ignore incoming uiSourceCode, we already have this file.\n return existingSourceCode;\n }\n this.idToUISourceCode.set(uiSourceCode.canononicalScriptId(), uiSourceCode);\n this.uriToUISourceCode.set(uiSourceCode.url(), uiSourceCode);\n return uiSourceCode;\n }\n\n addUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n const canonicalSourceCode = this.canonicalUISourceCode(uiSourceCode);\n const duplicated = canonicalSourceCode !== uiSourceCode;\n const binding = Persistence.Persistence.PersistenceImpl.instance().binding(canonicalSourceCode);\n uiSourceCode = binding ? binding.fileSystem : canonicalSourceCode;\n\n if (duplicated && uiSourceCode.project().type() !== Workspace.Workspace.projectTypes.FileSystem) {\n uiSourceCode.disableEdit();\n }\n\n if (this.currentFileInternal?.canononicalScriptId() === uiSourceCode.canononicalScriptId()) {\n return;\n }\n\n const index = this.history.index(historyItemKey(uiSourceCode));\n if (index === -1) {\n return;\n }\n\n if (!this.tabIds.has(uiSourceCode)) {\n this.appendFileTab(uiSourceCode, false);\n }\n\n // Select tab if this file was the last to be shown.\n if (!index) {\n this.innerShowFile(uiSourceCode, false);\n return;\n }\n\n if (!this.currentFileInternal) {\n return;\n }\n\n const currentProjectIsSnippets = Snippets.ScriptSnippetFileSystem.isSnippetsUISourceCode(this.currentFileInternal);\n const addedProjectIsSnippets = Snippets.ScriptSnippetFileSystem.isSnippetsUISourceCode(uiSourceCode);\n if (this.history.index(historyItemKey(this.currentFileInternal)) && currentProjectIsSnippets &&\n !addedProjectIsSnippets) {\n this.innerShowFile(uiSourceCode, false);\n }\n }\n\n removeUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n this.removeUISourceCodes([uiSourceCode]);\n }\n\n removeUISourceCodes(uiSourceCodes: Workspace.UISourceCode.UISourceCode[]): void {\n const tabIds = [];\n for (const uiSourceCode of uiSourceCodes) {\n const tabId = this.tabIds.get(uiSourceCode);\n if (tabId) {\n tabIds.push(tabId);\n }\n if (this.uriToUISourceCode.get(uiSourceCode.url()) === uiSourceCode) {\n this.uriToUISourceCode.delete(uiSourceCode.url());\n }\n if (this.idToUISourceCode.get(uiSourceCode.canononicalScriptId()) === uiSourceCode) {\n this.idToUISourceCode.delete(uiSourceCode.canononicalScriptId());\n }\n }\n this.tabbedPane.closeTabs(tabIds);\n }\n\n private editorClosedByUserAction(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n this.history.remove(historyItemKey(uiSourceCode));\n this.updateHistory();\n }\n\n private editorSelectedByUserAction(): void {\n this.updateHistory();\n }\n\n private updateHistory(): void {\n const historyItemKeys = [];\n for (const tabId of this.tabbedPane.lastOpenedTabIds(MAX_PREVIOUSLY_VIEWED_FILES_COUNT)) {\n const uiSourceCode = this.files.get(tabId);\n if (uiSourceCode !== undefined) {\n historyItemKeys.push(historyItemKey(uiSourceCode));\n }\n }\n this.history.update(historyItemKeys);\n this.previouslyViewedFilesSetting.set(this.history.toObject());\n }\n\n private tooltipForFile(uiSourceCode: Workspace.UISourceCode.UISourceCode): string {\n uiSourceCode = Persistence.Persistence.PersistenceImpl.instance().network(uiSourceCode) || uiSourceCode;\n return uiSourceCode.url();\n }\n\n private appendFileTab(\n uiSourceCode: Workspace.UISourceCode.UISourceCode, userGesture?: boolean, index?: number,\n replaceView?: UI.Widget.Widget): string {\n const view = replaceView || this.delegate.viewForFile(uiSourceCode);\n const title = this.titleForFile(uiSourceCode);\n const tooltip = this.tooltipForFile(uiSourceCode);\n\n const tabId = this.generateTabId();\n this.tabIds.set(uiSourceCode, tabId);\n this.files.set(tabId, uiSourceCode);\n\n if (!replaceView) {\n const savedSelectionRange = this.history.selectionRange(historyItemKey(uiSourceCode));\n const savedScrollLineNumber = this.history.scrollLineNumber(historyItemKey(uiSourceCode));\n this.restoreEditorProperties(view, savedSelectionRange, savedScrollLineNumber);\n }\n\n this.tabbedPane.appendTab(tabId, title, view, tooltip, userGesture, undefined, undefined, index);\n\n this.updateFileTitle(uiSourceCode);\n this.addUISourceCodeListeners(uiSourceCode);\n if (uiSourceCode.loadError()) {\n this.addLoadErrorIcon(tabId);\n } else if (!uiSourceCode.contentLoaded()) {\n void uiSourceCode.requestContent().then(_content => {\n if (uiSourceCode.loadError()) {\n this.addLoadErrorIcon(tabId);\n }\n });\n }\n return tabId;\n }\n\n private addLoadErrorIcon(tabId: string): void {\n const icon = new IconButton.Icon.Icon();\n icon.data = {iconName: 'cross-circle-filled', color: 'var(--icon-error)', width: '14px', height: '14px'};\n UI.Tooltip.Tooltip.install(icon, i18nString(UIStrings.unableToLoadThisContent));\n if (this.tabbedPane.tabView(tabId)) {\n this.tabbedPane.setTabIcon(tabId, icon);\n }\n }\n\n private restoreEditorProperties(\n editorView: UI.Widget.Widget, selection?: TextUtils.TextRange.TextRange, firstLineNumber?: number): void {\n const sourceFrame = editorView instanceof SourceFrame.SourceFrame.SourceFrameImpl ?\n editorView as SourceFrame.SourceFrame.SourceFrameImpl :\n null;\n if (!sourceFrame) {\n return;\n }\n if (selection) {\n sourceFrame.setSelection(selection);\n }\n if (typeof firstLineNumber === 'number') {\n sourceFrame.scrollToLine(firstLineNumber);\n }\n }\n\n private tabClosed(event: Common.EventTarget.EventTargetEvent): void {\n const {tabId, isUserGesture} = event.data;\n const uiSourceCode = this.files.get(tabId);\n if (this.currentFileInternal &&\n this.currentFileInternal.canononicalScriptId() === uiSourceCode?.canononicalScriptId()) {\n this.removeViewListeners();\n this.currentView = null;\n this.currentFileInternal = null;\n }\n if (uiSourceCode) {\n this.tabIds.delete(uiSourceCode);\n }\n this.files.delete(tabId);\n\n if (uiSourceCode) {\n this.removeUISourceCodeListeners(uiSourceCode);\n\n this.dispatchEventToListeners(Events.EditorClosed, uiSourceCode);\n\n if (isUserGesture) {\n this.editorClosedByUserAction(uiSourceCode);\n }\n }\n }\n\n private tabSelected(event: Common.EventTarget.EventTargetEvent): void {\n const {tabId, isUserGesture} = event.data;\n\n const uiSourceCode = this.files.get(tabId);\n if (uiSourceCode) {\n this.innerShowFile(uiSourceCode, isUserGesture);\n }\n }\n\n private addUISourceCodeListeners(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n uiSourceCode.addEventListener(Workspace.UISourceCode.Events.TitleChanged, this.uiSourceCodeTitleChanged, this);\n uiSourceCode.addEventListener(\n Workspace.UISourceCode.Events.WorkingCopyChanged, this.uiSourceCodeWorkingCopyChanged, this);\n uiSourceCode.addEventListener(\n Workspace.UISourceCode.Events.WorkingCopyCommitted, this.uiSourceCodeWorkingCopyCommitted, this);\n }\n\n private removeUISourceCodeListeners(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n uiSourceCode.removeEventListener(Workspace.UISourceCode.Events.TitleChanged, this.uiSourceCodeTitleChanged, this);\n uiSourceCode.removeEventListener(\n Workspace.UISourceCode.Events.WorkingCopyChanged, this.uiSourceCodeWorkingCopyChanged, this);\n uiSourceCode.removeEventListener(\n Workspace.UISourceCode.Events.WorkingCopyCommitted, this.uiSourceCodeWorkingCopyCommitted, this);\n }\n\n private updateFileTitle(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n const tabId = this.tabIds.get(uiSourceCode);\n if (tabId) {\n const title = this.titleForFile(uiSourceCode);\n const tooltip = this.tooltipForFile(uiSourceCode);\n this.tabbedPane.changeTabTitle(tabId, title, tooltip);\n let icon: IconButton.Icon.Icon|null = null;\n if (uiSourceCode.loadError()) {\n icon = new IconButton.Icon.Icon();\n icon.data = {iconName: 'cross-circle-filled', color: 'var(--icon-error)', width: '14px', height: '14px'};\n UI.Tooltip.Tooltip.install(icon, i18nString(UIStrings.unableToLoadThisContent));\n } else if (Persistence.Persistence.PersistenceImpl.instance().hasUnsavedCommittedChanges(uiSourceCode)) {\n icon = new IconButton.Icon.Icon();\n icon.data = {iconName: 'warning-filled', color: 'var(--icon-warning)', width: '14px', height: '14px'};\n UI.Tooltip.Tooltip.install(icon, i18nString(UIStrings.changesToThisFileWereNotSavedTo));\n } else {\n icon = Persistence.PersistenceUtils.PersistenceUtils.iconForUISourceCode(uiSourceCode);\n }\n this.tabbedPane.setTabIcon(tabId, icon);\n }\n }\n\n private uiSourceCodeTitleChanged(event: Common.EventTarget.EventTargetEvent):\n void {\n const uiSourceCode = event.data;\n this.updateFileTitle(uiSourceCode);\n this.updateHistory();\n\n // Remove from map under old url if it has changed.\n for (const [k, v] of this.uriToUISourceCode) {\n if (v === uiSourceCode && k !== v.url()) {\n this.uriToUISourceCode.delete(k);\n }\n }\n // Remove from map under old id if it has changed.\n for (const [k, v] of this.idToUISourceCode) {\n if (v === uiSourceCode && k !== v.canononicalScriptId()) {\n this.idToUISourceCode.delete(k);\n }\n }\n // Ensure it is mapped under current url and id.\n this.canonicalUISourceCode(uiSourceCode);\n }\n\n private uiSourceCodeWorkingCopyChanged(\n event: Common.EventTarget.EventTargetEvent): void {\n const uiSourceCode = event.data;\n this.updateFileTitle(uiSourceCode);\n }\n\n private uiSourceCodeWorkingCopyCommitted(\n event: Common.EventTarget.EventTargetEvent): void {\n const uiSourceCode = event.data.uiSourceCode;\n this.updateFileTitle(uiSourceCode);\n }\n\n private generateTabId(): Lowercase {\n return 'tab-' + (tabId++) as Lowercase;\n }\n\n currentFile(): Workspace.UISourceCode.UISourceCode|null {\n return this.currentFileInternal || null;\n }\n}\n\nexport const enum Events {\n EditorSelected = 'EditorSelected',\n EditorClosed = 'EditorClosed',\n}\n\nexport interface EditorSelectedEvent {\n currentFile: Workspace.UISourceCode.UISourceCode;\n currentView: UI.Widget.Widget|null;\n previousView: UI.Widget.Widget|null;\n userGesture: boolean|undefined;\n}\n\nexport type EventTypes = {\n [Events.EditorSelected]: EditorSelectedEvent,\n [Events.EditorClosed]: Workspace.UISourceCode.UISourceCode,\n};\n\nconst MAX_PREVIOUSLY_VIEWED_FILES_COUNT = 30;\nconst MAX_SERIALIZABLE_URL_LENGTH = 4096;\n\ninterface SerializedHistoryItem {\n url: string;\n resourceTypeName: string;\n selectionRange?: TextUtils.TextRange.SerializedTextRange;\n scrollLineNumber?: number;\n}\n\ninterface HistoryItemKey {\n url: Platform.DevToolsPath.UrlString;\n resourceType: Common.ResourceType.ResourceType;\n}\n\nfunction historyItemKey(uiSourceCode: Workspace.UISourceCode.UISourceCode): HistoryItemKey {\n return {url: uiSourceCode.url(), resourceType: uiSourceCode.contentType()};\n}\n\nexport class HistoryItem implements HistoryItemKey {\n url: Platform.DevToolsPath.UrlString;\n resourceType: Common.ResourceType.ResourceType;\n selectionRange: TextUtils.TextRange.TextRange|undefined;\n scrollLineNumber: number|undefined;\n\n constructor(\n url: Platform.DevToolsPath.UrlString, resourceType: Common.ResourceType.ResourceType,\n selectionRange?: TextUtils.TextRange.TextRange, scrollLineNumber?: number) {\n this.url = url;\n this.resourceType = resourceType;\n this.selectionRange = selectionRange;\n this.scrollLineNumber = scrollLineNumber;\n }\n\n static fromObject(serializedHistoryItem: SerializedHistoryItem): HistoryItem {\n const resourceType = Common.ResourceType.ResourceType.fromName(serializedHistoryItem.resourceTypeName);\n if (resourceType === null) {\n throw new TypeError(`Invalid resource type name \"${serializedHistoryItem.resourceTypeName}\"`);\n }\n const selectionRange = serializedHistoryItem.selectionRange ?\n TextUtils.TextRange.TextRange.fromObject(serializedHistoryItem.selectionRange) :\n undefined;\n return new HistoryItem(\n serializedHistoryItem.url as Platform.DevToolsPath.UrlString,\n resourceType,\n selectionRange,\n serializedHistoryItem.scrollLineNumber,\n );\n }\n\n toObject(): SerializedHistoryItem|null {\n if (this.url.length >= MAX_SERIALIZABLE_URL_LENGTH) {\n return null;\n }\n return {\n url: this.url,\n resourceTypeName: this.resourceType.name(),\n selectionRange: this.selectionRange,\n scrollLineNumber: this.scrollLineNumber,\n };\n }\n}\n\nexport class History {\n private items: HistoryItem[];\n\n constructor(items: HistoryItem[]) {\n this.items = items;\n }\n\n static fromObject(serializedHistoryItems: SerializedHistoryItem[]): History {\n const items = [];\n for (const serializedHistoryItem of serializedHistoryItems) {\n try {\n items.push(HistoryItem.fromObject(serializedHistoryItem));\n } catch {\n }\n }\n return new History(items);\n }\n\n index({url, resourceType}: HistoryItemKey): number {\n return this.items.findIndex(item => item.url === url && item.resourceType === resourceType);\n }\n\n selectionRange(key: HistoryItemKey): TextUtils.TextRange.TextRange|undefined {\n const index = this.index(key);\n if (index === -1) {\n return undefined;\n }\n return this.items[index].selectionRange;\n }\n\n updateSelectionRange(key: HistoryItemKey, selectionRange?: TextUtils.TextRange.TextRange): void {\n if (!selectionRange) {\n return;\n }\n const index = this.index(key);\n if (index === -1) {\n return;\n }\n this.items[index].selectionRange = selectionRange;\n }\n\n scrollLineNumber(key: HistoryItemKey): number|undefined {\n const index = this.index(key);\n if (index === -1) {\n return;\n }\n return this.items[index].scrollLineNumber;\n }\n\n updateScrollLineNumber(key: HistoryItemKey, scrollLineNumber: number): void {\n const index = this.index(key);\n if (index === -1) {\n return;\n }\n this.items[index].scrollLineNumber = scrollLineNumber;\n }\n\n update(keys: HistoryItemKey[]): void {\n for (let i = keys.length - 1; i >= 0; --i) {\n const index = this.index(keys[i]);\n let item;\n if (index !== -1) {\n item = this.items[index];\n this.items.splice(index, 1);\n } else {\n item = new HistoryItem(keys[i].url, keys[i].resourceType);\n }\n this.items.unshift(item);\n }\n }\n\n remove(key: HistoryItemKey): void {\n const index = this.index(key);\n if (index === -1) {\n return;\n }\n this.items.splice(index, 1);\n }\n\n toObject(): SerializedHistoryItem[] {\n const serializedHistoryItems = [];\n for (const item of this.items) {\n const serializedItem = item.toObject();\n if (serializedItem) {\n serializedHistoryItems.push(serializedItem);\n }\n if (serializedHistoryItems.length === MAX_PREVIOUSLY_VIEWED_FILES_COUNT) {\n break;\n }\n }\n return serializedHistoryItems;\n }\n\n // eslint-disable-next-line rulesdir/prefer_readonly_keyword\n keys(): ReadonlyArray {\n return this.items;\n }\n}\n\nexport class EditorContainerTabDelegate implements UI.TabbedPane.TabbedPaneTabDelegate {\n private readonly editorContainer: TabbedEditorContainer;\n\n constructor(editorContainer: TabbedEditorContainer) {\n this.editorContainer = editorContainer;\n }\n\n closeTabs(_tabbedPane: UI.TabbedPane.TabbedPane, ids: string[]): void {\n this.editorContainer.closeTabs(ids);\n }\n\n onContextMenu(tabId: string, contextMenu: UI.ContextMenu.ContextMenu): void {\n this.editorContainer.onContextMenu(tabId, contextMenu);\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"TabbedEditorContainer.js","sourceRoot":"","sources":["../../../../../../front_end/panels/sources/TabbedEditorContainer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,UAAU,MAAM,uCAAuC,CAAC;AACpE,OAAO,KAAK,WAAW,MAAM,yCAAyC,CAAC;AACvE,OAAO,KAAK,SAAS,MAAM,uCAAuC,CAAC;AACnE,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAC;AAEjE,OAAO,KAAK,UAAU,MAAM,gDAAgD,CAAC;AAC7E,OAAO,KAAK,WAAW,MAAM,yDAAyD,CAAC;AACvF,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MA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AI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAC9B,CAAC;IAED,QAAQ;QACN,MAAM,sBAAsB,GAAG,EAAE,CAAC;QAClC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE;YAC7B,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;YACvC,IAAI,cAAc,EAAE;gBAClB,sBAAsB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;aAC7C;YACD,IAAI,sBAAsB,CAAC,MAAM,KAAK,iCAAiC,EAAE;gBACvE,MAAM;aACP;SACF;QACD,OAAO,sBAAsB,CAAC;IAChC,CAAC;IAED,4DAA4D;IAC5D,IAAI;QACF,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF;AAED,MAAM,OAAO,0BAA0B;IACpB,eAAe,CAAwB;IAExD,YAAY,eAAsC;QAChD,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,CAAC;IAED,SAAS,CAAC,WAAqC,EAAE,GAAa;QAC5D,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;IAED,aAAa,CAAC,KAAa,EAAE,WAAuC;QAClE,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IACzD,CAAC;CACF","sourcesContent":["/*\n * Copyright (C) 2011 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as Extensions from '../../models/extensions/extensions.js';\nimport * as Persistence from '../../models/persistence/persistence.js';\nimport * as TextUtils from '../../models/text_utils/text_utils.js';\nimport * as Workspace from '../../models/workspace/workspace.js';\nimport type * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';\nimport * as IconButton from '../../ui/components/icon_button/icon_button.js';\nimport * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\nimport * as Snippets from '../snippets/snippets.js';\n\nimport {SourcesView} from './SourcesView.js';\nimport {UISourceCodeFrame} from './UISourceCodeFrame.js';\n\nconst UIStrings = {\n /**\n *@description Text in Tabbed Editor Container of the Sources panel\n *@example {example.file} PH1\n */\n areYouSureYouWantToCloseUnsaved: 'Are you sure you want to close unsaved file: {PH1}?',\n /**\n *@description Error message for tooltip showing that a file in Sources could not be loaded\n */\n unableToLoadThisContent: 'Unable to load this content.',\n /**\n *@description Icon title in Tabbed Editor Container of the Sources panel\n */\n changesToThisFileWereNotSavedTo: 'Changes to this file were not saved to file system.',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sources/TabbedEditorContainer.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nexport interface TabbedEditorContainerDelegate {\n viewForFile(uiSourceCode: Workspace.UISourceCode.UISourceCode): UI.Widget.Widget;\n\n recycleUISourceCodeFrame(sourceFrame: UISourceCodeFrame, uiSourceCode: Workspace.UISourceCode.UISourceCode): void;\n}\n\nlet tabId = 0;\n\nexport class TabbedEditorContainer extends Common.ObjectWrapper.ObjectWrapper {\n private readonly delegate: TabbedEditorContainerDelegate;\n private readonly tabbedPane: UI.TabbedPane.TabbedPane;\n private tabIds: Map;\n private readonly files: Map;\n private readonly previouslyViewedFilesSetting: Common.Settings.Setting;\n private readonly history: History;\n private readonly uriToUISourceCode: Map;\n private readonly idToUISourceCode: Map;\n private currentFileInternal!: Workspace.UISourceCode.UISourceCode|null;\n private currentView!: UI.Widget.Widget|null;\n private scrollTimer?: number;\n private reentrantShow: boolean;\n constructor(\n delegate: TabbedEditorContainerDelegate, setting: Common.Settings.Setting,\n placeholderElement: Element, focusedPlaceholderElement?: Element) {\n super();\n this.delegate = delegate;\n\n this.tabbedPane = new UI.TabbedPane.TabbedPane();\n this.tabbedPane.setPlaceholderElement(placeholderElement, focusedPlaceholderElement);\n this.tabbedPane.setTabDelegate(new EditorContainerTabDelegate(this));\n\n this.tabbedPane.setCloseableTabs(true);\n this.tabbedPane.setAllowTabReorder(true, true);\n\n this.tabbedPane.addEventListener(UI.TabbedPane.Events.TabClosed, this.tabClosed, this);\n this.tabbedPane.addEventListener(UI.TabbedPane.Events.TabSelected, this.tabSelected, this);\n\n this.tabbedPane.headerElement().setAttribute(\n 'jslog',\n `${VisualLogging.toolbar('top').track({keydown: 'ArrowUp|ArrowLeft|ArrowDown|ArrowRight|Enter|Space'})}`);\n\n Persistence.Persistence.PersistenceImpl.instance().addEventListener(\n Persistence.Persistence.Events.BindingCreated, this.onBindingCreated, this);\n Persistence.Persistence.PersistenceImpl.instance().addEventListener(\n Persistence.Persistence.Events.BindingRemoved, this.onBindingRemoved, this);\n Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance().addEventListener(\n Persistence.NetworkPersistenceManager.Events.RequestsForHeaderOverridesFileChanged,\n this.#onRequestsForHeaderOverridesFileChanged, this);\n\n this.tabIds = new Map();\n this.files = new Map();\n\n this.previouslyViewedFilesSetting = setting;\n this.history = History.fromObject(this.previouslyViewedFilesSetting.get());\n this.uriToUISourceCode = new Map();\n this.idToUISourceCode = new Map();\n this.reentrantShow = false;\n }\n\n private onBindingCreated(event: Common.EventTarget.EventTargetEvent):\n void {\n const binding = event.data;\n this.updateFileTitle(binding.fileSystem);\n\n const networkTabId = this.tabIds.get(binding.network);\n let fileSystemTabId = this.tabIds.get(binding.fileSystem);\n\n const wasSelectedInNetwork = this.currentFileInternal === binding.network;\n const networkKey = historyItemKey(binding.network);\n const currentSelectionRange = this.history.selectionRange(networkKey);\n const currentScrollLineNumber = this.history.scrollLineNumber(networkKey);\n this.history.remove(networkKey);\n\n if (!networkTabId) {\n return;\n }\n\n if (!fileSystemTabId) {\n const networkView = this.tabbedPane.tabView(networkTabId);\n const tabIndex = this.tabbedPane.tabIndex(networkTabId);\n if (networkView instanceof UISourceCodeFrame) {\n this.delegate.recycleUISourceCodeFrame(networkView, binding.fileSystem);\n fileSystemTabId = this.appendFileTab(binding.fileSystem, false, tabIndex, networkView);\n } else {\n fileSystemTabId = this.appendFileTab(binding.fileSystem, false, tabIndex);\n const fileSystemTabView = (this.tabbedPane.tabView(fileSystemTabId) as UI.Widget.Widget);\n this.restoreEditorProperties(fileSystemTabView, currentSelectionRange, currentScrollLineNumber);\n }\n }\n\n this.closeTabs([networkTabId], true);\n if (wasSelectedInNetwork) {\n this.tabbedPane.selectTab(fileSystemTabId, false);\n }\n\n this.updateHistory();\n }\n\n #onRequestsForHeaderOverridesFileChanged(\n event: Common.EventTarget.EventTargetEvent): void {\n this.updateFileTitle(event.data);\n }\n\n private onBindingRemoved(event: Common.EventTarget.EventTargetEvent):\n void {\n const binding = event.data;\n this.updateFileTitle(binding.fileSystem);\n }\n\n get view(): UI.Widget.Widget {\n return this.tabbedPane;\n }\n\n get visibleView(): UI.Widget.Widget|null {\n return this.tabbedPane.visibleView;\n }\n\n fileViews(): UI.Widget.Widget[] {\n return this.tabbedPane.tabViews();\n }\n\n leftToolbar(): UI.Toolbar.Toolbar {\n return this.tabbedPane.leftToolbar();\n }\n\n rightToolbar(): UI.Toolbar.Toolbar {\n return this.tabbedPane.rightToolbar();\n }\n\n show(parentElement: Element): void {\n this.tabbedPane.show(parentElement);\n }\n\n showFile(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n const binding = Persistence.Persistence.PersistenceImpl.instance().binding(uiSourceCode);\n uiSourceCode = binding ? binding.fileSystem : uiSourceCode;\n\n const frame = UI.Context.Context.instance().flavor(SourcesView);\n // If the content has already been set and the current frame is showing\n // the incoming uiSourceCode, then fire the event that the file has been loaded.\n // Otherwise, this event will fire as soon as the content has been set.\n if (frame?.currentSourceFrame()?.contentSet && this.currentFileInternal === uiSourceCode &&\n frame?.currentUISourceCode() === uiSourceCode) {\n Common.EventTarget.fireEvent('source-file-loaded', uiSourceCode.displayName(true));\n } else {\n if (uiSourceCode.project().type() === Workspace.Workspace.projectTypes.Debugger) {\n const script = Bindings.DefaultScriptMapping.DefaultScriptMapping.scriptForUISourceCode(uiSourceCode);\n if (script && script.isInlineScript() && !script.hasSourceURL) {\n if (script.isModule) {\n Host.userMetrics.vmInlineScriptContentShown(Host.UserMetrics.VMInlineScriptType.MODULE_SCRIPT);\n } else {\n Host.userMetrics.vmInlineScriptContentShown(Host.UserMetrics.VMInlineScriptType.CLASSIC_SCRIPT);\n }\n }\n }\n\n this.innerShowFile(uiSourceCode, true);\n }\n }\n\n closeFile(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n const tabId = this.tabIds.get(uiSourceCode);\n if (!tabId) {\n return;\n }\n this.closeTabs([tabId]);\n }\n\n closeAllFiles(): void {\n this.closeTabs(this.tabbedPane.tabIds());\n }\n\n historyUISourceCodes(): Workspace.UISourceCode.UISourceCode[] {\n const result = [];\n for (const {url, resourceType} of this.history.keys()) {\n const uiSourceCode = this.uriToUISourceCode.get(url);\n if (uiSourceCode !== undefined && uiSourceCode.contentType() === resourceType) {\n result.push(uiSourceCode);\n }\n }\n return result;\n }\n\n selectNextTab(): void {\n this.tabbedPane.selectNextTab();\n }\n\n selectPrevTab(): void {\n this.tabbedPane.selectPrevTab();\n }\n\n private addViewListeners(): void {\n if (!this.currentView || !(this.currentView instanceof SourceFrame.SourceFrame.SourceFrameImpl)) {\n return;\n }\n this.currentView.addEventListener(SourceFrame.SourceFrame.Events.EditorUpdate, this.onEditorUpdate, this);\n this.currentView.addEventListener(SourceFrame.SourceFrame.Events.EditorScroll, this.onScrollChanged, this);\n }\n\n private removeViewListeners(): void {\n if (!this.currentView || !(this.currentView instanceof SourceFrame.SourceFrame.SourceFrameImpl)) {\n return;\n }\n this.currentView.removeEventListener(SourceFrame.SourceFrame.Events.EditorUpdate, this.onEditorUpdate, this);\n this.currentView.removeEventListener(SourceFrame.SourceFrame.Events.EditorScroll, this.onScrollChanged, this);\n }\n\n private onScrollChanged(): void {\n if (this.currentView instanceof SourceFrame.SourceFrame.SourceFrameImpl) {\n if (this.scrollTimer) {\n clearTimeout(this.scrollTimer);\n }\n this.scrollTimer = window.setTimeout(() => this.previouslyViewedFilesSetting.set(this.history.toObject()), 100);\n if (this.currentFileInternal) {\n const {editor} = this.currentView.textEditor;\n const topBlock = editor.lineBlockAtHeight(editor.scrollDOM.getBoundingClientRect().top - editor.documentTop);\n const topLine = editor.state.doc.lineAt(topBlock.from).number - 1;\n this.history.updateScrollLineNumber(historyItemKey(this.currentFileInternal), topLine);\n }\n }\n }\n\n private onEditorUpdate({data: update}: Common.EventTarget.EventTargetEvent): void {\n if (update.docChanged || update.selectionSet) {\n const {main} = update.state.selection;\n const lineFrom = update.state.doc.lineAt(main.from), lineTo = update.state.doc.lineAt(main.to);\n const range = new TextUtils.TextRange.TextRange(\n lineFrom.number - 1, main.from - lineFrom.from, lineTo.number - 1, main.to - lineTo.from);\n if (this.currentFileInternal) {\n this.history.updateSelectionRange(historyItemKey(this.currentFileInternal), range);\n }\n this.previouslyViewedFilesSetting.set(this.history.toObject());\n\n if (this.currentFileInternal) {\n Extensions.ExtensionServer.ExtensionServer.instance().sourceSelectionChanged(\n this.currentFileInternal.url(), range);\n }\n }\n }\n\n private innerShowFile(uiSourceCode: Workspace.UISourceCode.UISourceCode, userGesture?: boolean): void {\n if (this.reentrantShow) {\n return;\n }\n const canonicalSourceCode = this.canonicalUISourceCode(uiSourceCode);\n const binding = Persistence.Persistence.PersistenceImpl.instance().binding(uiSourceCode);\n uiSourceCode = binding ? binding.fileSystem : uiSourceCode;\n if (this.currentFileInternal === uiSourceCode) {\n return;\n }\n\n this.removeViewListeners();\n this.currentFileInternal = uiSourceCode;\n\n try {\n // Selecting the tab may cause showFile to be called again, but with the canonical source code,\n // which is not what we want, so we prevent reentrant calls.\n this.reentrantShow = true;\n const tabId = this.tabIds.get(canonicalSourceCode) || this.appendFileTab(canonicalSourceCode, userGesture);\n\n this.tabbedPane.selectTab(tabId, userGesture);\n } finally {\n this.reentrantShow = false;\n }\n\n if (userGesture) {\n this.editorSelectedByUserAction();\n }\n\n const previousView = this.currentView;\n this.currentView = this.visibleView;\n this.addViewListeners();\n\n if (this.currentView instanceof UISourceCodeFrame && this.currentView.uiSourceCode() !== uiSourceCode) {\n // We are showing a different UISourceCode in the same tab (because it has the same URL). This\n // commonly happens when switching between workers or iframes containing the same code, and while the\n // contents are usually identical they may not be and it is important to show users when they aren't.\n this.delegate.recycleUISourceCodeFrame(this.currentView, uiSourceCode);\n if (uiSourceCode.project().type() !== Workspace.Workspace.projectTypes.FileSystem) {\n // Disable editing, because it may confuse users that only one of the copies of this code changes.\n uiSourceCode.disableEdit();\n }\n }\n\n const eventData = {\n currentFile: this.currentFileInternal,\n currentView: this.currentView,\n previousView: previousView,\n userGesture: userGesture,\n };\n this.dispatchEventToListeners(Events.EditorSelected, eventData);\n }\n\n private titleForFile(uiSourceCode: Workspace.UISourceCode.UISourceCode): string {\n const maxDisplayNameLength = 30;\n let title = Platform.StringUtilities.trimMiddle(uiSourceCode.displayName(true), maxDisplayNameLength);\n if (uiSourceCode.isDirty()) {\n title += '*';\n }\n return title;\n }\n\n private maybeCloseTab(id: string, nextTabId: string|null): boolean {\n const uiSourceCode = this.files.get(id);\n if (!uiSourceCode) {\n return false;\n }\n const shouldPrompt = uiSourceCode.isDirty() && uiSourceCode.project().canSetFileContent();\n // FIXME: this should be replaced with common Save/Discard/Cancel dialog.\n if (!shouldPrompt || confirm(i18nString(UIStrings.areYouSureYouWantToCloseUnsaved, {PH1: uiSourceCode.name()}))) {\n uiSourceCode.resetWorkingCopy();\n if (nextTabId) {\n this.tabbedPane.selectTab(nextTabId, true);\n }\n this.tabbedPane.closeTab(id, true);\n return true;\n }\n return false;\n }\n\n closeTabs(ids: string[], forceCloseDirtyTabs?: boolean): void {\n const dirtyTabs = [];\n const cleanTabs = [];\n for (let i = 0; i < ids.length; ++i) {\n const id = ids[i];\n const uiSourceCode = this.files.get(id);\n if (uiSourceCode) {\n if (!forceCloseDirtyTabs && uiSourceCode.isDirty()) {\n dirtyTabs.push(id);\n } else {\n cleanTabs.push(id);\n }\n }\n }\n if (dirtyTabs.length) {\n this.tabbedPane.selectTab(dirtyTabs[0], true);\n }\n this.tabbedPane.closeTabs(cleanTabs, true);\n for (let i = 0; i < dirtyTabs.length; ++i) {\n const nextTabId = i + 1 < dirtyTabs.length ? dirtyTabs[i + 1] : null;\n if (!this.maybeCloseTab(dirtyTabs[i], nextTabId)) {\n break;\n }\n }\n }\n\n onContextMenu(tabId: string, contextMenu: UI.ContextMenu.ContextMenu): void {\n const uiSourceCode = this.files.get(tabId);\n if (uiSourceCode) {\n contextMenu.appendApplicableItems(uiSourceCode);\n }\n }\n\n private canonicalUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode):\n Workspace.UISourceCode.UISourceCode {\n // Check if we have already a UISourceCode for this url\n const existingSourceCode = this.idToUISourceCode.get(uiSourceCode.canononicalScriptId());\n if (existingSourceCode) {\n // Ignore incoming uiSourceCode, we already have this file.\n return existingSourceCode;\n }\n this.idToUISourceCode.set(uiSourceCode.canononicalScriptId(), uiSourceCode);\n this.uriToUISourceCode.set(uiSourceCode.url(), uiSourceCode);\n return uiSourceCode;\n }\n\n addUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n const canonicalSourceCode = this.canonicalUISourceCode(uiSourceCode);\n const duplicated = canonicalSourceCode !== uiSourceCode;\n const binding = Persistence.Persistence.PersistenceImpl.instance().binding(canonicalSourceCode);\n uiSourceCode = binding ? binding.fileSystem : canonicalSourceCode;\n\n if (duplicated && uiSourceCode.project().type() !== Workspace.Workspace.projectTypes.FileSystem) {\n uiSourceCode.disableEdit();\n }\n\n if (this.currentFileInternal?.canononicalScriptId() === uiSourceCode.canononicalScriptId()) {\n return;\n }\n\n const index = this.history.index(historyItemKey(uiSourceCode));\n if (index === -1) {\n return;\n }\n\n if (!this.tabIds.has(uiSourceCode)) {\n this.appendFileTab(uiSourceCode, false);\n }\n\n // Select tab if this file was the last to be shown.\n if (!index) {\n this.innerShowFile(uiSourceCode, false);\n return;\n }\n\n if (!this.currentFileInternal) {\n return;\n }\n\n const currentProjectIsSnippets = Snippets.ScriptSnippetFileSystem.isSnippetsUISourceCode(this.currentFileInternal);\n const addedProjectIsSnippets = Snippets.ScriptSnippetFileSystem.isSnippetsUISourceCode(uiSourceCode);\n if (this.history.index(historyItemKey(this.currentFileInternal)) && currentProjectIsSnippets &&\n !addedProjectIsSnippets) {\n this.innerShowFile(uiSourceCode, false);\n }\n }\n\n removeUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n this.removeUISourceCodes([uiSourceCode]);\n }\n\n removeUISourceCodes(uiSourceCodes: Workspace.UISourceCode.UISourceCode[]): void {\n const tabIds = [];\n for (const uiSourceCode of uiSourceCodes) {\n const tabId = this.tabIds.get(uiSourceCode);\n if (tabId) {\n tabIds.push(tabId);\n }\n if (this.uriToUISourceCode.get(uiSourceCode.url()) === uiSourceCode) {\n this.uriToUISourceCode.delete(uiSourceCode.url());\n }\n if (this.idToUISourceCode.get(uiSourceCode.canononicalScriptId()) === uiSourceCode) {\n this.idToUISourceCode.delete(uiSourceCode.canononicalScriptId());\n }\n }\n this.tabbedPane.closeTabs(tabIds);\n }\n\n private editorClosedByUserAction(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n this.history.remove(historyItemKey(uiSourceCode));\n this.updateHistory();\n }\n\n private editorSelectedByUserAction(): void {\n this.updateHistory();\n }\n\n private updateHistory(): void {\n const historyItemKeys = [];\n for (const tabId of this.tabbedPane.lastOpenedTabIds(MAX_PREVIOUSLY_VIEWED_FILES_COUNT)) {\n const uiSourceCode = this.files.get(tabId);\n if (uiSourceCode !== undefined) {\n historyItemKeys.push(historyItemKey(uiSourceCode));\n }\n }\n this.history.update(historyItemKeys);\n this.previouslyViewedFilesSetting.set(this.history.toObject());\n }\n\n private tooltipForFile(uiSourceCode: Workspace.UISourceCode.UISourceCode): string {\n uiSourceCode = Persistence.Persistence.PersistenceImpl.instance().network(uiSourceCode) || uiSourceCode;\n return uiSourceCode.url();\n }\n\n private appendFileTab(\n uiSourceCode: Workspace.UISourceCode.UISourceCode, userGesture?: boolean, index?: number,\n replaceView?: UI.Widget.Widget): string {\n const view = replaceView || this.delegate.viewForFile(uiSourceCode);\n const title = this.titleForFile(uiSourceCode);\n const tooltip = this.tooltipForFile(uiSourceCode);\n\n const tabId = this.generateTabId();\n this.tabIds.set(uiSourceCode, tabId);\n this.files.set(tabId, uiSourceCode);\n\n if (!replaceView) {\n const savedSelectionRange = this.history.selectionRange(historyItemKey(uiSourceCode));\n const savedScrollLineNumber = this.history.scrollLineNumber(historyItemKey(uiSourceCode));\n this.restoreEditorProperties(view, savedSelectionRange, savedScrollLineNumber);\n }\n\n this.tabbedPane.appendTab(tabId, title, view, tooltip, userGesture, undefined, undefined, index);\n\n this.updateFileTitle(uiSourceCode);\n this.addUISourceCodeListeners(uiSourceCode);\n if (uiSourceCode.loadError()) {\n this.addLoadErrorIcon(tabId);\n } else if (!uiSourceCode.contentLoaded()) {\n void uiSourceCode.requestContent().then(_content => {\n if (uiSourceCode.loadError()) {\n this.addLoadErrorIcon(tabId);\n }\n });\n }\n return tabId;\n }\n\n private addLoadErrorIcon(tabId: string): void {\n const icon = new IconButton.Icon.Icon();\n icon.data = {iconName: 'cross-circle-filled', color: 'var(--icon-error)', width: '14px', height: '14px'};\n UI.Tooltip.Tooltip.install(icon, i18nString(UIStrings.unableToLoadThisContent));\n if (this.tabbedPane.tabView(tabId)) {\n this.tabbedPane.setTabIcon(tabId, icon);\n }\n }\n\n private restoreEditorProperties(\n editorView: UI.Widget.Widget, selection?: TextUtils.TextRange.TextRange, firstLineNumber?: number): void {\n const sourceFrame = editorView instanceof SourceFrame.SourceFrame.SourceFrameImpl ?\n editorView as SourceFrame.SourceFrame.SourceFrameImpl :\n null;\n if (!sourceFrame) {\n return;\n }\n if (selection) {\n sourceFrame.setSelection(selection);\n }\n if (typeof firstLineNumber === 'number') {\n sourceFrame.scrollToLine(firstLineNumber);\n }\n }\n\n private tabClosed(event: Common.EventTarget.EventTargetEvent): void {\n const {tabId, isUserGesture} = event.data;\n const uiSourceCode = this.files.get(tabId);\n if (this.currentFileInternal &&\n this.currentFileInternal.canononicalScriptId() === uiSourceCode?.canononicalScriptId()) {\n this.removeViewListeners();\n this.currentView = null;\n this.currentFileInternal = null;\n }\n if (uiSourceCode) {\n this.tabIds.delete(uiSourceCode);\n }\n this.files.delete(tabId);\n\n if (uiSourceCode) {\n this.removeUISourceCodeListeners(uiSourceCode);\n\n this.dispatchEventToListeners(Events.EditorClosed, uiSourceCode);\n\n if (isUserGesture) {\n this.editorClosedByUserAction(uiSourceCode);\n }\n }\n }\n\n private tabSelected(event: Common.EventTarget.EventTargetEvent): void {\n const {tabId, isUserGesture} = event.data;\n\n const uiSourceCode = this.files.get(tabId);\n if (uiSourceCode) {\n this.innerShowFile(uiSourceCode, isUserGesture);\n }\n }\n\n private addUISourceCodeListeners(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n uiSourceCode.addEventListener(Workspace.UISourceCode.Events.TitleChanged, this.uiSourceCodeTitleChanged, this);\n uiSourceCode.addEventListener(\n Workspace.UISourceCode.Events.WorkingCopyChanged, this.uiSourceCodeWorkingCopyChanged, this);\n uiSourceCode.addEventListener(\n Workspace.UISourceCode.Events.WorkingCopyCommitted, this.uiSourceCodeWorkingCopyCommitted, this);\n }\n\n private removeUISourceCodeListeners(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n uiSourceCode.removeEventListener(Workspace.UISourceCode.Events.TitleChanged, this.uiSourceCodeTitleChanged, this);\n uiSourceCode.removeEventListener(\n Workspace.UISourceCode.Events.WorkingCopyChanged, this.uiSourceCodeWorkingCopyChanged, this);\n uiSourceCode.removeEventListener(\n Workspace.UISourceCode.Events.WorkingCopyCommitted, this.uiSourceCodeWorkingCopyCommitted, this);\n }\n\n private updateFileTitle(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {\n const tabId = this.tabIds.get(uiSourceCode);\n if (tabId) {\n const title = this.titleForFile(uiSourceCode);\n const tooltip = this.tooltipForFile(uiSourceCode);\n this.tabbedPane.changeTabTitle(tabId, title, tooltip);\n let icon: IconButton.Icon.Icon|null = null;\n if (uiSourceCode.loadError()) {\n icon = new IconButton.Icon.Icon();\n icon.data = {iconName: 'cross-circle-filled', color: 'var(--icon-error)', width: '14px', height: '14px'};\n UI.Tooltip.Tooltip.install(icon, i18nString(UIStrings.unableToLoadThisContent));\n } else if (Persistence.Persistence.PersistenceImpl.instance().hasUnsavedCommittedChanges(uiSourceCode)) {\n icon = new IconButton.Icon.Icon();\n icon.data = {iconName: 'warning-filled', color: 'var(--icon-warning)', width: '14px', height: '14px'};\n UI.Tooltip.Tooltip.install(icon, i18nString(UIStrings.changesToThisFileWereNotSavedTo));\n } else {\n icon = Persistence.PersistenceUtils.PersistenceUtils.iconForUISourceCode(uiSourceCode);\n }\n this.tabbedPane.setTabIcon(tabId, icon);\n }\n }\n\n private uiSourceCodeTitleChanged(event: Common.EventTarget.EventTargetEvent):\n void {\n const uiSourceCode = event.data;\n this.updateFileTitle(uiSourceCode);\n this.updateHistory();\n\n // Remove from map under old url if it has changed.\n for (const [k, v] of this.uriToUISourceCode) {\n if (v === uiSourceCode && k !== v.url()) {\n this.uriToUISourceCode.delete(k);\n }\n }\n // Remove from map under old id if it has changed.\n for (const [k, v] of this.idToUISourceCode) {\n if (v === uiSourceCode && k !== v.canononicalScriptId()) {\n this.idToUISourceCode.delete(k);\n }\n }\n // Ensure it is mapped under current url and id.\n this.canonicalUISourceCode(uiSourceCode);\n }\n\n private uiSourceCodeWorkingCopyChanged(\n event: Common.EventTarget.EventTargetEvent): void {\n const uiSourceCode = event.data;\n this.updateFileTitle(uiSourceCode);\n }\n\n private uiSourceCodeWorkingCopyCommitted(\n event: Common.EventTarget.EventTargetEvent): void {\n const uiSourceCode = event.data.uiSourceCode;\n this.updateFileTitle(uiSourceCode);\n }\n\n private generateTabId(): Lowercase {\n return 'tab-' + (tabId++) as Lowercase;\n }\n\n currentFile(): Workspace.UISourceCode.UISourceCode|null {\n return this.currentFileInternal || null;\n }\n}\n\nexport const enum Events {\n EditorSelected = 'EditorSelected',\n EditorClosed = 'EditorClosed',\n}\n\nexport interface EditorSelectedEvent {\n currentFile: Workspace.UISourceCode.UISourceCode;\n currentView: UI.Widget.Widget|null;\n previousView: UI.Widget.Widget|null;\n userGesture: boolean|undefined;\n}\n\nexport type EventTypes = {\n [Events.EditorSelected]: EditorSelectedEvent,\n [Events.EditorClosed]: Workspace.UISourceCode.UISourceCode,\n};\n\nconst MAX_PREVIOUSLY_VIEWED_FILES_COUNT = 30;\nconst MAX_SERIALIZABLE_URL_LENGTH = 4096;\n\ninterface SerializedHistoryItem {\n url: string;\n resourceTypeName: string;\n selectionRange?: TextUtils.TextRange.SerializedTextRange;\n scrollLineNumber?: number;\n}\n\ninterface HistoryItemKey {\n url: Platform.DevToolsPath.UrlString;\n resourceType: Common.ResourceType.ResourceType;\n}\n\nfunction historyItemKey(uiSourceCode: Workspace.UISourceCode.UISourceCode): HistoryItemKey {\n return {url: uiSourceCode.url(), resourceType: uiSourceCode.contentType()};\n}\n\nexport class HistoryItem implements HistoryItemKey {\n url: Platform.DevToolsPath.UrlString;\n resourceType: Common.ResourceType.ResourceType;\n selectionRange: TextUtils.TextRange.TextRange|undefined;\n scrollLineNumber: number|undefined;\n\n constructor(\n url: Platform.DevToolsPath.UrlString, resourceType: Common.ResourceType.ResourceType,\n selectionRange?: TextUtils.TextRange.TextRange, scrollLineNumber?: number) {\n this.url = url;\n this.resourceType = resourceType;\n this.selectionRange = selectionRange;\n this.scrollLineNumber = scrollLineNumber;\n }\n\n static fromObject(serializedHistoryItem: SerializedHistoryItem): HistoryItem {\n const resourceType = Common.ResourceType.ResourceType.fromName(serializedHistoryItem.resourceTypeName);\n if (resourceType === null) {\n throw new TypeError(`Invalid resource type name \"${serializedHistoryItem.resourceTypeName}\"`);\n }\n const selectionRange = serializedHistoryItem.selectionRange ?\n TextUtils.TextRange.TextRange.fromObject(serializedHistoryItem.selectionRange) :\n undefined;\n return new HistoryItem(\n serializedHistoryItem.url as Platform.DevToolsPath.UrlString,\n resourceType,\n selectionRange,\n serializedHistoryItem.scrollLineNumber,\n );\n }\n\n toObject(): SerializedHistoryItem|null {\n if (this.url.length >= MAX_SERIALIZABLE_URL_LENGTH) {\n return null;\n }\n return {\n url: this.url,\n resourceTypeName: this.resourceType.name(),\n selectionRange: this.selectionRange,\n scrollLineNumber: this.scrollLineNumber,\n };\n }\n}\n\nexport class History {\n private items: HistoryItem[];\n\n constructor(items: HistoryItem[]) {\n this.items = items;\n }\n\n static fromObject(serializedHistoryItems: SerializedHistoryItem[]): History {\n const items = [];\n for (const serializedHistoryItem of serializedHistoryItems) {\n try {\n items.push(HistoryItem.fromObject(serializedHistoryItem));\n } catch {\n }\n }\n return new History(items);\n }\n\n index({url, resourceType}: HistoryItemKey): number {\n return this.items.findIndex(item => item.url === url && item.resourceType === resourceType);\n }\n\n selectionRange(key: HistoryItemKey): TextUtils.TextRange.TextRange|undefined {\n const index = this.index(key);\n if (index === -1) {\n return undefined;\n }\n return this.items[index].selectionRange;\n }\n\n updateSelectionRange(key: HistoryItemKey, selectionRange?: TextUtils.TextRange.TextRange): void {\n if (!selectionRange) {\n return;\n }\n const index = this.index(key);\n if (index === -1) {\n return;\n }\n this.items[index].selectionRange = selectionRange;\n }\n\n scrollLineNumber(key: HistoryItemKey): number|undefined {\n const index = this.index(key);\n if (index === -1) {\n return;\n }\n return this.items[index].scrollLineNumber;\n }\n\n updateScrollLineNumber(key: HistoryItemKey, scrollLineNumber: number): void {\n const index = this.index(key);\n if (index === -1) {\n return;\n }\n this.items[index].scrollLineNumber = scrollLineNumber;\n }\n\n update(keys: HistoryItemKey[]): void {\n for (let i = keys.length - 1; i >= 0; --i) {\n const index = this.index(keys[i]);\n let item;\n if (index !== -1) {\n item = this.items[index];\n this.items.splice(index, 1);\n } else {\n item = new HistoryItem(keys[i].url, keys[i].resourceType);\n }\n this.items.unshift(item);\n }\n }\n\n remove(key: HistoryItemKey): void {\n const index = this.index(key);\n if (index === -1) {\n return;\n }\n this.items.splice(index, 1);\n }\n\n toObject(): SerializedHistoryItem[] {\n const serializedHistoryItems = [];\n for (const item of this.items) {\n const serializedItem = item.toObject();\n if (serializedItem) {\n serializedHistoryItems.push(serializedItem);\n }\n if (serializedHistoryItems.length === MAX_PREVIOUSLY_VIEWED_FILES_COUNT) {\n break;\n }\n }\n return serializedHistoryItems;\n }\n\n // eslint-disable-next-line rulesdir/prefer_readonly_keyword\n keys(): ReadonlyArray {\n return this.items;\n }\n}\n\nexport class EditorContainerTabDelegate implements UI.TabbedPane.TabbedPaneTabDelegate {\n private readonly editorContainer: TabbedEditorContainer;\n\n constructor(editorContainer: TabbedEditorContainer) {\n this.editorContainer = editorContainer;\n }\n\n closeTabs(_tabbedPane: UI.TabbedPane.TabbedPane, ids: string[]): void {\n this.editorContainer.closeTabs(ids);\n }\n\n onContextMenu(tabId: string, contextMenu: UI.ContextMenu.ContextMenu): void {\n this.editorContainer.onContextMenu(tabId, contextMenu);\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/sources/components/HeadersView.js b/public/panels/sources/components/HeadersView.js index 8a44f0da0..7454b91ee 100644 --- a/public/panels/sources/components/HeadersView.js +++ b/public/panels/sources/components/HeadersView.js @@ -140,10 +140,12 @@ export class HeadersViewComponent extends HTMLElement { // onFocusOut will remove the header -> blur instead of focusing on next editable event.preventDefault(); target.blur(); + target.dispatchEvent(new Event('change')); } else if (keyboardEvent.key === 'Enter') { event.preventDefault(); target.blur(); + target.dispatchEvent(new Event('change')); this.#focusNext(target); } else if (keyboardEvent.key === 'Escape') { @@ -318,7 +320,7 @@ export class HeadersViewComponent extends HTMLElement { `)} <${Buttons.Button.Button.litTagName} .variant=${"secondary" /* Buttons.Button.Variant.SECONDARY */} - .jslog=${VisualLogging.action('headers-view.add-override-rule').track({ click: true })} + .jslogContext=${'headers-view.add-override-rule'} class="add-block"> ${i18nString(UIStrings.addOverrideRule)} @@ -347,7 +349,8 @@ export class HeadersViewComponent extends HTMLElement { #renderApplyToRow(pattern, blockIndex) { // clang-format off return LitHtml.html ` -
+
${i18n.i18n.lockedString('Apply to')}
:
${this.#renderEditable(pattern, 'apply-to')} @@ -358,7 +361,7 @@ export class HeadersViewComponent extends HTMLElement { .iconWidth=${'14px'} .iconHeight=${'14px'} .variant=${"round" /* Buttons.Button.Variant.ROUND */} - .jslog=${VisualLogging.action('headers-view.remove-apply-to-section').track({ click: true })} + .jslogContext=${'headers-view.remove-apply-to-section'} class="remove-block inline-button" >
@@ -368,8 +371,9 @@ export class HeadersViewComponent extends HTMLElement { #renderHeaderRow(header, blockIndex, headerIndex) { // clang-format off return LitHtml.html ` -
- ${this.#renderEditable(header.name, 'header-name red')} +
+ ${this.#renderEditable(header.name, 'header-name red', true)}
:
${this.#renderEditable(header.value, 'header-value')} <${Buttons.Button.Button.litTagName} @@ -377,7 +381,7 @@ export class HeadersViewComponent extends HTMLElement { .size=${"SMALL" /* Buttons.Button.Size.SMALL */} .iconUrl=${plusIconUrl} .variant=${"round" /* Buttons.Button.Variant.ROUND */} - .jslog=${VisualLogging.action('headers-view.add-header').track({ click: true })} + .jslogContext=${'headers-view.add-header'} class="add-header inline-button" > <${Buttons.Button.Button.litTagName} @@ -386,22 +390,33 @@ export class HeadersViewComponent extends HTMLElement { .iconUrl=${trashIconUrl} .variant=${"round" /* Buttons.Button.Variant.ROUND */} ?hidden=${!this.#isDeletable(blockIndex, headerIndex)} - .jslog=${VisualLogging.action('headers-view.remove-header').track({ click: true })} + .jslogContext=${'headers-view.remove-header'} class="remove-header inline-button" >
`; // clang-format on } - #renderEditable(value, className) { + #renderEditable(value, className, isKey) { // This uses LitHtml's `live`-directive, so that when checking whether to // update during re-render, `value` is compared against the actual live DOM // value of the contenteditable element and not the potentially outdated // value from the previous render. // clang-format off - return LitHtml.html ``; + const jslog = isKey ? VisualLogging.key() : VisualLogging.value(); + return LitHtml.html ``; // clang-format on } } +VisualLogging.registerParentProvider('headers-editor-row-parent', (e) => { + while (e.previousElementSibling?.classList?.contains('padded')) { + e = e.previousElementSibling; + } + return e.previousElementSibling || undefined; +}); customElements.define('devtools-sources-headers-view', HeadersViewComponent); //# sourceMappingURL=HeadersView.js.map \ No newline at end of file diff --git a/public/panels/sources/components/HeadersView.js.map b/public/panels/sources/components/HeadersView.js.map index bd209aa09..dbce57b49 100644 --- a/public/panels/sources/components/HeadersView.js.map +++ b/public/panels/sources/components/HeadersView.js.map @@ -1 +1 @@ -{"version":3,"file":"HeadersView.js","sourceRoot":"","sources":["../../../../../../../front_end/panels/sources/components/HeadersView.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AAEnD,OAAO,KAAK,WAAW,MAAM,4CAA4C,CAAC;AAC1E,OAAO,KAAK,SAAS,MAAM,wCAAwC,CAAC;AACpE,OAAO,KAAK,OAAO,MAAM,2CAA2C,CAAC;AACrE,OAAO,KAAK,gBAAgB,MAAM,2CAA2C,CAAC;AAC9E,OAAO,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACnD,OAAO,KAAK,OAAO,MAAM,kCAAkC,CAAC;AAC5D,OAAO,KAAK,aAAa,MAAM,8CAA8C,CAAC;AAE9E,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AAErD,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,SAAS,EAAE,cAAc;IACzB;;OAEG;IACH,YAAY,EAAE,oBAAoB;IAClC;;OAEG;IACH,WAAW,EAAE,mCAAmC;IAChD;;;OAGG;IACH,gBAAgB,EAAE,mCAAmC;IACrD;;;OAGG;IACH,qBAAqB,EACjB,yKAAyK;IAC7K;;OAEG;IACH,eAAe,EAAE,mBAAmB;IACpC;;OAEG;IACH,SAAS,EAAE,YAAY;CACxB,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,0CAA0C,EAAE,SAAS,CAAC,CAAC;AAChG,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC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governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Host from '../../../core/host/host.js';\nimport * as i18n from '../../../core/i18n/i18n.js';\nimport type * as Protocol from '../../../generated/protocol.js';\nimport * as Persistence from '../../../models/persistence/persistence.js';\nimport * as Workspace from '../../../models/workspace/workspace.js';\nimport * as Buttons from '../../../ui/components/buttons/buttons.js';\nimport * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';\nimport * as UI from '../../../ui/legacy/legacy.js';\nimport * as LitHtml from '../../../ui/lit-html/lit-html.js';\nimport * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';\n\nimport HeadersViewStyles from './HeadersView.css.js';\n\nconst UIStrings = {\n /**\n *@description The title of a button that adds a field to input a header in the editor form.\n */\n addHeader: 'Add a header',\n /**\n *@description The title of a button that removes a field to input a header in the editor form.\n */\n removeHeader: 'Remove this header',\n /**\n *@description The title of a button that removes a section for defining header overrides in the editor form.\n */\n removeBlock: 'Remove this \\'`ApplyTo`\\'-section',\n /**\n *@description Error message for files which cannot not be parsed.\n *@example {.headers} PH1\n */\n errorWhenParsing: 'Error when parsing \\'\\'{PH1}\\'\\'.',\n /**\n *@description Explainer for files which cannot be parsed.\n *@example {.headers} PH1\n */\n parsingErrorExplainer:\n 'This is most likely due to a syntax error in \\'\\'{PH1}\\'\\'. Try opening this file in an external editor to fix the error or delete the file and re-create the override.',\n /**\n *@description Button text for a button which adds an additional header override rule.\n */\n addOverrideRule: 'Add override rule',\n /**\n *@description Text which is a hyperlink to more documentation\n */\n learnMore: 'Learn more',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sources/components/HeadersView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nconst plusIconUrl = new URL('../../../Images/plus.svg', import.meta.url).toString();\nconst trashIconUrl = new URL('../../../Images/bin.svg', import.meta.url).toString();\n\nconst DEFAULT_HEADER_VALUE = 'header value';\nconst getDefaultHeaderName = (i: number): string => `header-name-${i}`;\n\nexport class HeadersView extends UI.View.SimpleView {\n readonly #headersViewComponent = new HeadersViewComponent();\n #uiSourceCode: Workspace.UISourceCode.UISourceCode;\n\n constructor(uiSourceCode: Workspace.UISourceCode.UISourceCode) {\n super(i18n.i18n.lockedString('HeadersView'));\n this.element.setAttribute('jslog', `${VisualLogging.pane('headers-view')}`);\n this.#uiSourceCode = uiSourceCode;\n this.#uiSourceCode.addEventListener(\n Workspace.UISourceCode.Events.WorkingCopyChanged, this.#onWorkingCopyChanged, this);\n this.#uiSourceCode.addEventListener(\n Workspace.UISourceCode.Events.WorkingCopyCommitted, this.#onWorkingCopyCommitted, this);\n this.element.appendChild(this.#headersViewComponent);\n void this.#setInitialData();\n }\n\n async #setInitialData(): Promise {\n const content = await this.#uiSourceCode.requestContent();\n this.#setComponentData(content.content || '');\n }\n\n #setComponentData(content: string): void {\n let parsingError = false;\n let headerOverrides: Persistence.NetworkPersistenceManager.HeaderOverride[] = [];\n content = content || '[]';\n try {\n headerOverrides = JSON.parse(content) as Persistence.NetworkPersistenceManager.HeaderOverride[];\n if (!headerOverrides.every(Persistence.NetworkPersistenceManager.isHeaderOverride)) {\n throw 'Type mismatch after parsing';\n }\n } catch (e) {\n console.error('Failed to parse', this.#uiSourceCode.url(), 'for locally overriding headers.');\n parsingError = true;\n }\n\n this.#headersViewComponent.data = {\n headerOverrides,\n uiSourceCode: this.#uiSourceCode,\n parsingError,\n };\n }\n\n #onWorkingCopyChanged(): void {\n this.#setComponentData(this.#uiSourceCode.workingCopy());\n }\n\n #onWorkingCopyCommitted(): void {\n this.#setComponentData(this.#uiSourceCode.workingCopy());\n }\n\n getComponent(): HeadersViewComponent {\n return this.#headersViewComponent;\n }\n\n dispose(): void {\n this.#uiSourceCode.removeEventListener(\n Workspace.UISourceCode.Events.WorkingCopyChanged, this.#onWorkingCopyChanged, this);\n this.#uiSourceCode.removeEventListener(\n Workspace.UISourceCode.Events.WorkingCopyCommitted, this.#onWorkingCopyCommitted, this);\n }\n}\n\nexport interface HeadersViewComponentData {\n headerOverrides: Persistence.NetworkPersistenceManager.HeaderOverride[];\n uiSourceCode: Workspace.UISourceCode.UISourceCode;\n parsingError: boolean;\n}\n\nexport class HeadersViewComponent extends HTMLElement {\n static readonly litTagName = LitHtml.literal`devtools-sources-headers-view`;\n readonly #shadow = this.attachShadow({mode: 'open'});\n readonly #boundRender = this.#render.bind(this);\n #headerOverrides: Persistence.NetworkPersistenceManager.HeaderOverride[] = [];\n #uiSourceCode: Workspace.UISourceCode.UISourceCode|null = null;\n #parsingError = false;\n #focusElement: {blockIndex: number, headerIndex?: number}|null = null;\n #textOnFocusIn = '';\n\n constructor() {\n super();\n this.#shadow.addEventListener('focusin', this.#onFocusIn.bind(this));\n this.#shadow.addEventListener('focusout', this.#onFocusOut.bind(this));\n this.#shadow.addEventListener('click', this.#onClick.bind(this));\n this.#shadow.addEventListener('input', this.#onInput.bind(this));\n this.#shadow.addEventListener('keydown', this.#onKeyDown.bind(this));\n this.#shadow.addEventListener('paste', this.#onPaste.bind(this));\n this.addEventListener('contextmenu', this.#onContextMenu.bind(this));\n }\n\n connectedCallback(): void {\n this.#shadow.adoptedStyleSheets = [HeadersViewStyles];\n }\n\n set data(data: HeadersViewComponentData) {\n this.#headerOverrides = data.headerOverrides;\n this.#uiSourceCode = data.uiSourceCode;\n this.#parsingError = data.parsingError;\n void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);\n }\n\n // 'Enter' key should not create a new line in the contenteditable. Focus\n // on the next contenteditable instead.\n #onKeyDown(event: Event): void {\n const target = event.target as HTMLElement;\n if (!target.matches('.editable')) {\n return;\n }\n const keyboardEvent = event as KeyboardEvent;\n if (target.matches('.header-name') && target.innerText === '' &&\n (keyboardEvent.key === 'Enter' || keyboardEvent.key === 'Tab')) {\n // onFocusOut will remove the header -> blur instead of focusing on next editable\n event.preventDefault();\n target.blur();\n } else if (keyboardEvent.key === 'Enter') {\n event.preventDefault();\n target.blur();\n this.#focusNext(target);\n } else if (keyboardEvent.key === 'Escape') {\n event.consume();\n target.innerText = this.#textOnFocusIn;\n target.blur();\n this.#onChange(target);\n }\n }\n\n #focusNext(target: HTMLElement): void {\n const elements = Array.from(this.#shadow.querySelectorAll('.editable')) as HTMLElement[];\n const idx = elements.indexOf(target);\n if (idx !== -1 && idx + 1 < elements.length) {\n elements[idx + 1].focus();\n }\n }\n\n #selectAllText(target: HTMLElement): void {\n const selection = window.getSelection();\n const range = document.createRange();\n range.selectNodeContents(target);\n selection?.removeAllRanges();\n selection?.addRange(range);\n }\n\n #onFocusIn(event: Event): void {\n const target = event.target as HTMLElement;\n if (target.matches('.editable')) {\n this.#selectAllText(target);\n this.#textOnFocusIn = target.innerText;\n }\n }\n\n #onFocusOut(event: Event): void {\n const target = event.target as HTMLElement;\n if (target.innerText === '') {\n const rowElement = target.closest('.row') as HTMLElement;\n const blockIndex = Number(rowElement.dataset.blockIndex);\n const headerIndex = Number(rowElement.dataset.headerIndex);\n if (target.matches('.apply-to')) {\n target.innerText = '*';\n this.#headerOverrides[blockIndex].applyTo = '*';\n this.#onHeadersChanged();\n } else if (target.matches('.header-name')) {\n this.#removeHeader(blockIndex, headerIndex);\n }\n }\n\n // clear selection\n const selection = window.getSelection();\n selection?.removeAllRanges();\n\n this.#uiSourceCode?.commitWorkingCopy();\n }\n\n #onContextMenu(event: Event): void {\n if (!this.#uiSourceCode) {\n return;\n }\n const contextMenu = new UI.ContextMenu.ContextMenu(event);\n contextMenu.appendApplicableItems(this.#uiSourceCode);\n void contextMenu.show();\n }\n\n #generateNextHeaderName(headers: Protocol.Fetch.HeaderEntry[]): string {\n const takenNames = new Set(headers.map(header => header.name));\n let idx = 1;\n while (takenNames.has(getDefaultHeaderName(idx))) {\n idx++;\n }\n return getDefaultHeaderName(idx);\n }\n\n #onClick(event: Event): void {\n const target = event.target as HTMLButtonElement;\n const rowElement = target.closest('.row') as HTMLElement | null;\n const blockIndex = Number(rowElement?.dataset.blockIndex || 0);\n const headerIndex = Number(rowElement?.dataset.headerIndex || 0);\n if (target.matches('.add-header')) {\n this.#headerOverrides[blockIndex].headers.splice(\n headerIndex + 1, 0,\n {name: this.#generateNextHeaderName(this.#headerOverrides[blockIndex].headers), value: DEFAULT_HEADER_VALUE});\n this.#focusElement = {blockIndex, headerIndex: headerIndex + 1};\n this.#onHeadersChanged();\n } else if (target.matches('.remove-header')) {\n this.#removeHeader(blockIndex, headerIndex);\n } else if (target.matches('.add-block')) {\n this.#headerOverrides.push(\n {applyTo: '*', headers: [{name: getDefaultHeaderName(1), value: DEFAULT_HEADER_VALUE}]});\n this.#focusElement = {blockIndex: this.#headerOverrides.length - 1};\n this.#onHeadersChanged();\n } else if (target.matches('.remove-block')) {\n this.#headerOverrides.splice(blockIndex, 1);\n this.#onHeadersChanged();\n }\n }\n\n #isDeletable(blockIndex: number, headerIndex: number): boolean {\n const isOnlyDefaultHeader = headerIndex === 0 && this.#headerOverrides[blockIndex].headers.length === 1 &&\n this.#headerOverrides[blockIndex].headers[headerIndex].name === getDefaultHeaderName(1) &&\n this.#headerOverrides[blockIndex].headers[headerIndex].value === DEFAULT_HEADER_VALUE;\n return !isOnlyDefaultHeader;\n }\n\n #removeHeader(blockIndex: number, headerIndex: number): void {\n this.#headerOverrides[blockIndex].headers.splice(headerIndex, 1);\n if (this.#headerOverrides[blockIndex].headers.length === 0) {\n this.#headerOverrides[blockIndex].headers.push(\n {name: this.#generateNextHeaderName(this.#headerOverrides[blockIndex].headers), value: DEFAULT_HEADER_VALUE});\n }\n this.#onHeadersChanged();\n }\n\n #onInput(event: Event): void {\n this.#onChange(event.target as HTMLElement);\n }\n\n #onChange(target: HTMLElement): void {\n const rowElement = target.closest('.row') as HTMLElement;\n const blockIndex = Number(rowElement.dataset.blockIndex);\n const headerIndex = Number(rowElement.dataset.headerIndex);\n if (target.matches('.header-name')) {\n this.#headerOverrides[blockIndex].headers[headerIndex].name = target.innerText;\n this.#onHeadersChanged();\n }\n if (target.matches('.header-value')) {\n this.#headerOverrides[blockIndex].headers[headerIndex].value = target.innerText;\n this.#onHeadersChanged();\n }\n if (target.matches('.apply-to')) {\n this.#headerOverrides[blockIndex].applyTo = target.innerText;\n this.#onHeadersChanged();\n }\n }\n\n #onHeadersChanged(): void {\n this.#uiSourceCode?.setWorkingCopy(JSON.stringify(this.#headerOverrides, null, 2));\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.HeaderOverrideHeadersFileEdited);\n }\n\n #onPaste(event: Event): void {\n const clipboardEvent = event as ClipboardEvent;\n event.preventDefault();\n if (clipboardEvent.clipboardData) {\n const text = clipboardEvent.clipboardData.getData('text/plain');\n const range = this.#shadow.getSelection()?.getRangeAt(0);\n if (!range) {\n return;\n }\n range.deleteContents();\n\n const textNode = document.createTextNode(text);\n range.insertNode(textNode);\n range.selectNodeContents(textNode);\n range.collapse(false);\n\n const selection = window.getSelection();\n selection?.removeAllRanges();\n selection?.addRange(range);\n\n this.#onChange(event.target as HTMLElement);\n }\n }\n\n #render(): void {\n if (!ComponentHelpers.ScheduledRender.isScheduledRender(this)) {\n throw new Error('HeadersView render was not scheduled');\n }\n\n if (this.#parsingError) {\n const fileName = this.#uiSourceCode?.name() || '.headers';\n // clang-format off\n LitHtml.render(LitHtml.html`\n
\n
\n
${i18nString(UIStrings.errorWhenParsing, {PH1: fileName})}
\n
${i18nString(UIStrings.parsingErrorExplainer, {PH1: fileName})}
\n
\n
\n `, this.#shadow, {host: this});\n // clang-format on\n return;\n }\n\n // clang-format off\n LitHtml.render(LitHtml.html`\n ${this.#headerOverrides.map((headerOverride, blockIndex) =>\n LitHtml.html`\n ${this.#renderApplyToRow(headerOverride.applyTo, blockIndex)}\n ${headerOverride.headers.map((header, headerIndex) =>\n LitHtml.html`\n ${this.#renderHeaderRow(header, blockIndex, headerIndex)}\n `,\n )}\n `,\n )}\n <${Buttons.Button.Button.litTagName}\n .variant=${Buttons.Button.Variant.SECONDARY}\n .jslog=${VisualLogging.action('headers-view.add-override-rule').track({click: true})}\n class=\"add-block\">\n ${i18nString(UIStrings.addOverrideRule)}\n \n
\n ${i18nString(UIStrings.learnMore)}\n
\n `, this.#shadow, {host: this});\n // clang-format on\n\n if (this.#focusElement) {\n let focusElement: Element|null = null;\n if (this.#focusElement.headerIndex) {\n focusElement = this.#shadow.querySelector(`[data-block-index=\"${\n this.#focusElement.blockIndex}\"][data-header-index=\"${this.#focusElement.headerIndex}\"] .header-name`);\n } else {\n focusElement = this.#shadow.querySelector(`[data-block-index=\"${this.#focusElement.blockIndex}\"] .apply-to`);\n }\n if (focusElement) {\n (focusElement as HTMLElement).focus();\n }\n this.#focusElement = null;\n }\n }\n\n #renderApplyToRow(pattern: string, blockIndex: number): LitHtml.TemplateResult {\n // clang-format off\n return LitHtml.html`\n
\n
${i18n.i18n.lockedString('Apply to')}
\n
:
\n ${this.#renderEditable(pattern, 'apply-to')}\n <${Buttons.Button.Button.litTagName}\n title=${i18nString(UIStrings.removeBlock)}\n .size=${Buttons.Button.Size.SMALL}\n .iconUrl=${trashIconUrl}\n .iconWidth=${'14px'}\n .iconHeight=${'14px'}\n .variant=${Buttons.Button.Variant.ROUND}\n .jslog=${VisualLogging.action('headers-view.remove-apply-to-section').track({click: true})}\n class=\"remove-block inline-button\"\n >\n
\n `;\n // clang-format on\n }\n\n #renderHeaderRow(header: Protocol.Fetch.HeaderEntry, blockIndex: number, headerIndex: number):\n LitHtml.TemplateResult {\n // clang-format off\n return LitHtml.html`\n
\n ${this.#renderEditable(header.name, 'header-name red')}\n
:
\n ${this.#renderEditable(header.value, 'header-value')}\n <${Buttons.Button.Button.litTagName}\n title=${i18nString(UIStrings.addHeader)}\n .size=${Buttons.Button.Size.SMALL}\n .iconUrl=${plusIconUrl}\n .variant=${Buttons.Button.Variant.ROUND}\n .jslog=${VisualLogging.action('headers-view.add-header').track({click: true})}\n class=\"add-header inline-button\"\n >\n <${Buttons.Button.Button.litTagName}\n title=${i18nString(UIStrings.removeHeader)}\n .size=${Buttons.Button.Size.SMALL}\n .iconUrl=${trashIconUrl}\n .variant=${Buttons.Button.Variant.ROUND}\n ?hidden=${!this.#isDeletable(blockIndex, headerIndex)}\n .jslog=${VisualLogging.action('headers-view.remove-header').track({click: true})}\n class=\"remove-header inline-button\"\n >\n
\n `;\n // clang-format on\n }\n\n #renderEditable(value: string, className?: string): LitHtml.TemplateResult {\n // This uses LitHtml's `live`-directive, so that when checking whether to\n // update during re-render, `value` is compared against the actual live DOM\n // value of the contenteditable element and not the potentially outdated\n // value from the previous render.\n // clang-format off\n return LitHtml.html``;\n // clang-format on\n }\n}\n\ncustomElements.define('devtools-sources-headers-view', HeadersViewComponent);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'devtools-sources-headers-view': HeadersViewComponent;\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"HeadersView.js","sourceRoot":"","sources":["../../../../../../../front_end/panels/sources/components/HeadersView.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AAEnD,OAAO,KAAK,WAAW,MAAM,4CAA4C,CAAC;AAC1E,OAAO,KAAK,SAAS,MAAM,wCAAwC,CAAC;AACpE,OAAO,KAAK,OAAO,MAAM,2CAA2C,CAAC;AACrE,OAAO,KAAK,gBAAgB,MAAM,2CAA2C,CAAC;AAC9E,OAAO,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACnD,OAAO,KAAK,OAAO,MAAM,kCAAkC,CAAC;AAC5D,OAAO,KAAK,aAAa,MAAM,8CAA8C,CAAC;AAE9E,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AAErD,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,SAAS,EAAE,cAAc;IACzB;;OAEG;IACH,YAAY,EAAE,oBAAoB;IAClC;;OAEG;IACH,WAAW,EAAE,mCAAmC;IAChD;;;OAGG;IACH,gBAAgB,EAAE,mCAAmC;IACrD;;;OAGG;IACH,qBA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;QACzE,2EAA2E;QAC3E,wEAAwE;QACxE,kCAAkC;QAClC,mBAAmB;QACnB,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;QAClE,OAAO,OAAO,CAAC,IAAI,CAAA,eAAe,KAAK,CAAC,KAAK,CAAC,EAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,kBAAkB,EAAC,CAAC;;gDAE9C,SAAS;;2CAEd,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;QAChF,kBAAkB;IACpB,CAAC;;AAGH,aAAa,CAAC,sBAAsB,CAAC,2BAA2B,EAAE,CAAC,CAAU,EAAE,EAAE;IAC/E,OAAO,CAAC,CAAC,sBAAsB,EAAE,SAAS,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAC9D,CAAC,GAAG,CAAC,CAAC,sBAAsB,CAAC;KAC9B;IACD,OAAO,CAAC,CAAC,sBAAsB,IAAI,SAAS,CAAC;AAC/C,CAAC,CAAC,CAAC;AAEH,cAAc,CAAC,MAAM,CAAC,+BAA+B,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["// Copyright 2022 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Host from '../../../core/host/host.js';\nimport * as i18n from '../../../core/i18n/i18n.js';\nimport type * as Protocol from '../../../generated/protocol.js';\nimport * as Persistence from '../../../models/persistence/persistence.js';\nimport * as Workspace from '../../../models/workspace/workspace.js';\nimport * as Buttons from '../../../ui/components/buttons/buttons.js';\nimport * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';\nimport * as UI from '../../../ui/legacy/legacy.js';\nimport * as LitHtml from '../../../ui/lit-html/lit-html.js';\nimport * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';\n\nimport HeadersViewStyles from './HeadersView.css.js';\n\nconst UIStrings = {\n /**\n *@description The title of a button that adds a field to input a header in the editor form.\n */\n addHeader: 'Add a header',\n /**\n *@description The title of a button that removes a field to input a header in the editor form.\n */\n removeHeader: 'Remove this header',\n /**\n *@description The title of a button that removes a section for defining header overrides in the editor form.\n */\n removeBlock: 'Remove this \\'`ApplyTo`\\'-section',\n /**\n *@description Error message for files which cannot not be parsed.\n *@example {.headers} PH1\n */\n errorWhenParsing: 'Error when parsing \\'\\'{PH1}\\'\\'.',\n /**\n *@description Explainer for files which cannot be parsed.\n *@example {.headers} PH1\n */\n parsingErrorExplainer:\n 'This is most likely due to a syntax error in \\'\\'{PH1}\\'\\'. Try opening this file in an external editor to fix the error or delete the file and re-create the override.',\n /**\n *@description Button text for a button which adds an additional header override rule.\n */\n addOverrideRule: 'Add override rule',\n /**\n *@description Text which is a hyperlink to more documentation\n */\n learnMore: 'Learn more',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/sources/components/HeadersView.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nconst plusIconUrl = new URL('../../../Images/plus.svg', import.meta.url).toString();\nconst trashIconUrl = new URL('../../../Images/bin.svg', import.meta.url).toString();\n\nconst DEFAULT_HEADER_VALUE = 'header value';\nconst getDefaultHeaderName = (i: number): string => `header-name-${i}`;\n\nexport class HeadersView extends UI.View.SimpleView {\n readonly #headersViewComponent = new HeadersViewComponent();\n #uiSourceCode: Workspace.UISourceCode.UISourceCode;\n\n constructor(uiSourceCode: Workspace.UISourceCode.UISourceCode) {\n super(i18n.i18n.lockedString('HeadersView'));\n this.element.setAttribute('jslog', `${VisualLogging.pane('headers-view')}`);\n this.#uiSourceCode = uiSourceCode;\n this.#uiSourceCode.addEventListener(\n Workspace.UISourceCode.Events.WorkingCopyChanged, this.#onWorkingCopyChanged, this);\n this.#uiSourceCode.addEventListener(\n Workspace.UISourceCode.Events.WorkingCopyCommitted, this.#onWorkingCopyCommitted, this);\n this.element.appendChild(this.#headersViewComponent);\n void this.#setInitialData();\n }\n\n async #setInitialData(): Promise {\n const content = await this.#uiSourceCode.requestContent();\n this.#setComponentData(content.content || '');\n }\n\n #setComponentData(content: string): void {\n let parsingError = false;\n let headerOverrides: Persistence.NetworkPersistenceManager.HeaderOverride[] = [];\n content = content || '[]';\n try {\n headerOverrides = JSON.parse(content) as Persistence.NetworkPersistenceManager.HeaderOverride[];\n if (!headerOverrides.every(Persistence.NetworkPersistenceManager.isHeaderOverride)) {\n throw 'Type mismatch after parsing';\n }\n } catch (e) {\n console.error('Failed to parse', this.#uiSourceCode.url(), 'for locally overriding headers.');\n parsingError = true;\n }\n\n this.#headersViewComponent.data = {\n headerOverrides,\n uiSourceCode: this.#uiSourceCode,\n parsingError,\n };\n }\n\n #onWorkingCopyChanged(): void {\n this.#setComponentData(this.#uiSourceCode.workingCopy());\n }\n\n #onWorkingCopyCommitted(): void {\n this.#setComponentData(this.#uiSourceCode.workingCopy());\n }\n\n getComponent(): HeadersViewComponent {\n return this.#headersViewComponent;\n }\n\n dispose(): void {\n this.#uiSourceCode.removeEventListener(\n Workspace.UISourceCode.Events.WorkingCopyChanged, this.#onWorkingCopyChanged, this);\n this.#uiSourceCode.removeEventListener(\n Workspace.UISourceCode.Events.WorkingCopyCommitted, this.#onWorkingCopyCommitted, this);\n }\n}\n\nexport interface HeadersViewComponentData {\n headerOverrides: Persistence.NetworkPersistenceManager.HeaderOverride[];\n uiSourceCode: Workspace.UISourceCode.UISourceCode;\n parsingError: boolean;\n}\n\nexport class HeadersViewComponent extends HTMLElement {\n static readonly litTagName = LitHtml.literal`devtools-sources-headers-view`;\n readonly #shadow = this.attachShadow({mode: 'open'});\n readonly #boundRender = this.#render.bind(this);\n #headerOverrides: Persistence.NetworkPersistenceManager.HeaderOverride[] = [];\n #uiSourceCode: Workspace.UISourceCode.UISourceCode|null = null;\n #parsingError = false;\n #focusElement: {blockIndex: number, headerIndex?: number}|null = null;\n #textOnFocusIn = '';\n\n constructor() {\n super();\n this.#shadow.addEventListener('focusin', this.#onFocusIn.bind(this));\n this.#shadow.addEventListener('focusout', this.#onFocusOut.bind(this));\n this.#shadow.addEventListener('click', this.#onClick.bind(this));\n this.#shadow.addEventListener('input', this.#onInput.bind(this));\n this.#shadow.addEventListener('keydown', this.#onKeyDown.bind(this));\n this.#shadow.addEventListener('paste', this.#onPaste.bind(this));\n this.addEventListener('contextmenu', this.#onContextMenu.bind(this));\n }\n\n connectedCallback(): void {\n this.#shadow.adoptedStyleSheets = [HeadersViewStyles];\n }\n\n set data(data: HeadersViewComponentData) {\n this.#headerOverrides = data.headerOverrides;\n this.#uiSourceCode = data.uiSourceCode;\n this.#parsingError = data.parsingError;\n void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);\n }\n\n // 'Enter' key should not create a new line in the contenteditable. Focus\n // on the next contenteditable instead.\n #onKeyDown(event: Event): void {\n const target = event.target as HTMLElement;\n if (!target.matches('.editable')) {\n return;\n }\n const keyboardEvent = event as KeyboardEvent;\n if (target.matches('.header-name') && target.innerText === '' &&\n (keyboardEvent.key === 'Enter' || keyboardEvent.key === 'Tab')) {\n // onFocusOut will remove the header -> blur instead of focusing on next editable\n event.preventDefault();\n target.blur();\n target.dispatchEvent(new Event('change'));\n } else if (keyboardEvent.key === 'Enter') {\n event.preventDefault();\n target.blur();\n target.dispatchEvent(new Event('change'));\n this.#focusNext(target);\n } else if (keyboardEvent.key === 'Escape') {\n event.consume();\n target.innerText = this.#textOnFocusIn;\n target.blur();\n this.#onChange(target);\n }\n }\n\n #focusNext(target: HTMLElement): void {\n const elements = Array.from(this.#shadow.querySelectorAll('.editable')) as HTMLElement[];\n const idx = elements.indexOf(target);\n if (idx !== -1 && idx + 1 < elements.length) {\n elements[idx + 1].focus();\n }\n }\n\n #selectAllText(target: HTMLElement): void {\n const selection = window.getSelection();\n const range = document.createRange();\n range.selectNodeContents(target);\n selection?.removeAllRanges();\n selection?.addRange(range);\n }\n\n #onFocusIn(event: Event): void {\n const target = event.target as HTMLElement;\n if (target.matches('.editable')) {\n this.#selectAllText(target);\n this.#textOnFocusIn = target.innerText;\n }\n }\n\n #onFocusOut(event: Event): void {\n const target = event.target as HTMLElement;\n if (target.innerText === '') {\n const rowElement = target.closest('.row') as HTMLElement;\n const blockIndex = Number(rowElement.dataset.blockIndex);\n const headerIndex = Number(rowElement.dataset.headerIndex);\n if (target.matches('.apply-to')) {\n target.innerText = '*';\n this.#headerOverrides[blockIndex].applyTo = '*';\n this.#onHeadersChanged();\n } else if (target.matches('.header-name')) {\n this.#removeHeader(blockIndex, headerIndex);\n }\n }\n\n // clear selection\n const selection = window.getSelection();\n selection?.removeAllRanges();\n\n this.#uiSourceCode?.commitWorkingCopy();\n }\n\n #onContextMenu(event: Event): void {\n if (!this.#uiSourceCode) {\n return;\n }\n const contextMenu = new UI.ContextMenu.ContextMenu(event);\n contextMenu.appendApplicableItems(this.#uiSourceCode);\n void contextMenu.show();\n }\n\n #generateNextHeaderName(headers: Protocol.Fetch.HeaderEntry[]): string {\n const takenNames = new Set(headers.map(header => header.name));\n let idx = 1;\n while (takenNames.has(getDefaultHeaderName(idx))) {\n idx++;\n }\n return getDefaultHeaderName(idx);\n }\n\n #onClick(event: Event): void {\n const target = event.target as HTMLButtonElement;\n const rowElement = target.closest('.row') as HTMLElement | null;\n const blockIndex = Number(rowElement?.dataset.blockIndex || 0);\n const headerIndex = Number(rowElement?.dataset.headerIndex || 0);\n if (target.matches('.add-header')) {\n this.#headerOverrides[blockIndex].headers.splice(\n headerIndex + 1, 0,\n {name: this.#generateNextHeaderName(this.#headerOverrides[blockIndex].headers), value: DEFAULT_HEADER_VALUE});\n this.#focusElement = {blockIndex, headerIndex: headerIndex + 1};\n this.#onHeadersChanged();\n } else if (target.matches('.remove-header')) {\n this.#removeHeader(blockIndex, headerIndex);\n } else if (target.matches('.add-block')) {\n this.#headerOverrides.push(\n {applyTo: '*', headers: [{name: getDefaultHeaderName(1), value: DEFAULT_HEADER_VALUE}]});\n this.#focusElement = {blockIndex: this.#headerOverrides.length - 1};\n this.#onHeadersChanged();\n } else if (target.matches('.remove-block')) {\n this.#headerOverrides.splice(blockIndex, 1);\n this.#onHeadersChanged();\n }\n }\n\n #isDeletable(blockIndex: number, headerIndex: number): boolean {\n const isOnlyDefaultHeader = headerIndex === 0 && this.#headerOverrides[blockIndex].headers.length === 1 &&\n this.#headerOverrides[blockIndex].headers[headerIndex].name === getDefaultHeaderName(1) &&\n this.#headerOverrides[blockIndex].headers[headerIndex].value === DEFAULT_HEADER_VALUE;\n return !isOnlyDefaultHeader;\n }\n\n #removeHeader(blockIndex: number, headerIndex: number): void {\n this.#headerOverrides[blockIndex].headers.splice(headerIndex, 1);\n if (this.#headerOverrides[blockIndex].headers.length === 0) {\n this.#headerOverrides[blockIndex].headers.push(\n {name: this.#generateNextHeaderName(this.#headerOverrides[blockIndex].headers), value: DEFAULT_HEADER_VALUE});\n }\n this.#onHeadersChanged();\n }\n\n #onInput(event: Event): void {\n this.#onChange(event.target as HTMLElement);\n }\n\n #onChange(target: HTMLElement): void {\n const rowElement = target.closest('.row') as HTMLElement;\n const blockIndex = Number(rowElement.dataset.blockIndex);\n const headerIndex = Number(rowElement.dataset.headerIndex);\n if (target.matches('.header-name')) {\n this.#headerOverrides[blockIndex].headers[headerIndex].name = target.innerText;\n this.#onHeadersChanged();\n }\n if (target.matches('.header-value')) {\n this.#headerOverrides[blockIndex].headers[headerIndex].value = target.innerText;\n this.#onHeadersChanged();\n }\n if (target.matches('.apply-to')) {\n this.#headerOverrides[blockIndex].applyTo = target.innerText;\n this.#onHeadersChanged();\n }\n }\n\n #onHeadersChanged(): void {\n this.#uiSourceCode?.setWorkingCopy(JSON.stringify(this.#headerOverrides, null, 2));\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.HeaderOverrideHeadersFileEdited);\n }\n\n #onPaste(event: Event): void {\n const clipboardEvent = event as ClipboardEvent;\n event.preventDefault();\n if (clipboardEvent.clipboardData) {\n const text = clipboardEvent.clipboardData.getData('text/plain');\n const range = this.#shadow.getSelection()?.getRangeAt(0);\n if (!range) {\n return;\n }\n range.deleteContents();\n\n const textNode = document.createTextNode(text);\n range.insertNode(textNode);\n range.selectNodeContents(textNode);\n range.collapse(false);\n\n const selection = window.getSelection();\n selection?.removeAllRanges();\n selection?.addRange(range);\n\n this.#onChange(event.target as HTMLElement);\n }\n }\n\n #render(): void {\n if (!ComponentHelpers.ScheduledRender.isScheduledRender(this)) {\n throw new Error('HeadersView render was not scheduled');\n }\n\n if (this.#parsingError) {\n const fileName = this.#uiSourceCode?.name() || '.headers';\n // clang-format off\n LitHtml.render(LitHtml.html`\n
\n
\n
${i18nString(UIStrings.errorWhenParsing, {PH1: fileName})}
\n
${i18nString(UIStrings.parsingErrorExplainer, {PH1: fileName})}
\n
\n
\n `, this.#shadow, {host: this});\n // clang-format on\n return;\n }\n\n // clang-format off\n LitHtml.render(LitHtml.html`\n ${this.#headerOverrides.map((headerOverride, blockIndex) =>\n LitHtml.html`\n ${this.#renderApplyToRow(headerOverride.applyTo, blockIndex)}\n ${headerOverride.headers.map((header, headerIndex) =>\n LitHtml.html`\n ${this.#renderHeaderRow(header, blockIndex, headerIndex)}\n `,\n )}\n `,\n )}\n <${Buttons.Button.Button.litTagName}\n .variant=${Buttons.Button.Variant.SECONDARY}\n .jslogContext=${'headers-view.add-override-rule'}\n class=\"add-block\">\n ${i18nString(UIStrings.addOverrideRule)}\n \n
\n ${i18nString(UIStrings.learnMore)}\n
\n `, this.#shadow, {host: this});\n // clang-format on\n\n if (this.#focusElement) {\n let focusElement: Element|null = null;\n if (this.#focusElement.headerIndex) {\n focusElement = this.#shadow.querySelector(`[data-block-index=\"${\n this.#focusElement.blockIndex}\"][data-header-index=\"${this.#focusElement.headerIndex}\"] .header-name`);\n } else {\n focusElement = this.#shadow.querySelector(`[data-block-index=\"${this.#focusElement.blockIndex}\"] .apply-to`);\n }\n if (focusElement) {\n (focusElement as HTMLElement).focus();\n }\n this.#focusElement = null;\n }\n }\n\n #renderApplyToRow(pattern: string, blockIndex: number): LitHtml.TemplateResult {\n // clang-format off\n return LitHtml.html`\n
\n
${i18n.i18n.lockedString('Apply to')}
\n
:
\n ${this.#renderEditable(pattern, 'apply-to')}\n <${Buttons.Button.Button.litTagName}\n title=${i18nString(UIStrings.removeBlock)}\n .size=${Buttons.Button.Size.SMALL}\n .iconUrl=${trashIconUrl}\n .iconWidth=${'14px'}\n .iconHeight=${'14px'}\n .variant=${Buttons.Button.Variant.ROUND}\n .jslogContext=${'headers-view.remove-apply-to-section'}\n class=\"remove-block inline-button\"\n >\n
\n `;\n // clang-format on\n }\n\n #renderHeaderRow(header: Protocol.Fetch.HeaderEntry, blockIndex: number, headerIndex: number):\n LitHtml.TemplateResult {\n // clang-format off\n return LitHtml.html`\n
\n ${this.#renderEditable(header.name, 'header-name red', true)}\n
:
\n ${this.#renderEditable(header.value, 'header-value')}\n <${Buttons.Button.Button.litTagName}\n title=${i18nString(UIStrings.addHeader)}\n .size=${Buttons.Button.Size.SMALL}\n .iconUrl=${plusIconUrl}\n .variant=${Buttons.Button.Variant.ROUND}\n .jslogContext=${'headers-view.add-header'}\n class=\"add-header inline-button\"\n >\n <${Buttons.Button.Button.litTagName}\n title=${i18nString(UIStrings.removeHeader)}\n .size=${Buttons.Button.Size.SMALL}\n .iconUrl=${trashIconUrl}\n .variant=${Buttons.Button.Variant.ROUND}\n ?hidden=${!this.#isDeletable(blockIndex, headerIndex)}\n .jslogContext=${'headers-view.remove-header'}\n class=\"remove-header inline-button\"\n >\n
\n `;\n // clang-format on\n }\n\n #renderEditable(value: string, className?: string, isKey?: boolean): LitHtml.TemplateResult {\n // This uses LitHtml's `live`-directive, so that when checking whether to\n // update during re-render, `value` is compared against the actual live DOM\n // value of the contenteditable element and not the potentially outdated\n // value from the previous render.\n // clang-format off\n const jslog = isKey ? VisualLogging.key() : VisualLogging.value();\n return LitHtml.html``;\n // clang-format on\n }\n}\n\nVisualLogging.registerParentProvider('headers-editor-row-parent', (e: Element) => {\n while (e.previousElementSibling?.classList?.contains('padded')) {\n e = e.previousElementSibling;\n }\n return e.previousElementSibling || undefined;\n});\n\ncustomElements.define('devtools-sources-headers-view', HeadersViewComponent);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'devtools-sources-headers-view': HeadersViewComponent;\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/sources/components/components-tsconfig.json b/public/panels/sources/components/components-tsconfig.json index 75764f5de..a666a9809 100644 --- a/public/panels/sources/components/components-tsconfig.json +++ b/public/panels/sources/components/components-tsconfig.json @@ -35,8 +35,7 @@ "../../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/sources/components/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/panels/sources/components/devtools_entrypoint-bundle-typescript-tsconfig.json index a10f85027..c80ed8eae 100644 --- a/public/panels/sources/components/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/panels/sources/components/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/sources/components/unittests-tsconfig.json b/public/panels/sources/components/unittests-tsconfig.json index c843053e7..be96141da 100644 --- a/public/panels/sources/components/unittests-tsconfig.json +++ b/public/panels/sources/components/unittests-tsconfig.json @@ -43,8 +43,7 @@ "../../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/sources/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/panels/sources/devtools_entrypoint-bundle-typescript-tsconfig.json index 19be13580..1704b7abc 100644 --- a/public/panels/sources/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/panels/sources/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/sources/devtools_entrypoint-meta-typescript-tsconfig.json b/public/panels/sources/devtools_entrypoint-meta-typescript-tsconfig.json index eab9fc214..e1346e637 100644 --- a/public/panels/sources/devtools_entrypoint-meta-typescript-tsconfig.json +++ b/public/panels/sources/devtools_entrypoint-meta-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/sources/sources-tsconfig.json b/public/panels/sources/sources-tsconfig.json index 1490d5c2e..4d6b79dcd 100644 --- a/public/panels/sources/sources-tsconfig.json +++ b/public/panels/sources/sources-tsconfig.json @@ -62,8 +62,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/sources/unittests-tsconfig.json b/public/panels/sources/unittests-tsconfig.json index c61781abc..e3ce8675a 100644 --- a/public/panels/sources/unittests-tsconfig.json +++ b/public/panels/sources/unittests-tsconfig.json @@ -53,8 +53,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/timeline/CompatibilityTracksAppender.d.ts b/public/panels/timeline/CompatibilityTracksAppender.d.ts index 5cfa51845..b3865fc3b 100644 --- a/public/panels/timeline/CompatibilityTracksAppender.d.ts +++ b/public/panels/timeline/CompatibilityTracksAppender.d.ts @@ -89,6 +89,7 @@ export declare class CompatibilityTracksAppender { getModifiedEntries(group: PerfUI.FlameChart.Group): TraceEngine.Types.TraceEvents.TraceEventData[] | void; modifyTree(group: PerfUI.FlameChart.Group, entry: TraceEngine.Types.TraceEvents.SyntheticTraceEntry, type: TraceEngine.EntriesFilter.FilterAction): void; findPossibleContextMenuActions(group: PerfUI.FlameChart.Group, node: TraceEngine.Types.TraceEvents.SyntheticTraceEntry): TraceEngine.EntriesFilter.PossibleFilterActions | void; + revealEntry(group: PerfUI.FlameChart.Group, index: TraceEngine.Types.TraceEvents.SyntheticTraceEntry): void; findHiddenDescendantsAmount(group: PerfUI.FlameChart.Group, node: TraceEngine.Types.TraceEvents.SyntheticTraceEntry): number | void; /** * Given a trace event returns instantiates a legacy SDK.Event. This should diff --git a/public/panels/timeline/CompatibilityTracksAppender.js b/public/panels/timeline/CompatibilityTracksAppender.js index 30833d913..62c5a0654 100644 --- a/public/panels/timeline/CompatibilityTracksAppender.js +++ b/public/panels/timeline/CompatibilityTracksAppender.js @@ -124,6 +124,12 @@ export class CompatibilityTracksAppender { } console.warn('Could not find possible context menu actions.'); } + revealEntry(group, index) { + const appender = this.#trackForGroup.get(group); + if (appender && appender.entriesFilter) { + appender.entriesFilter().revealEntry(index); + } + } findHiddenDescendantsAmount(group, node) { const appender = this.#trackForGroup.get(group); if (appender && appender.entriesFilter) { diff --git a/public/panels/timeline/CompatibilityTracksAppender.js.map b/public/panels/timeline/CompatibilityTracksAppender.js.map index 4fc30fb91..f4c9c6f00 100644 --- a/public/panels/timeline/CompatibilityTracksAppender.js.map +++ b/public/panels/timeline/CompatibilityTracksAppender.js.map @@ -1 +1 @@ -{"version":3,"file":"CompatibilityTracksAppender.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/CompatibilityTracksAppender.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAEtD,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAE3D,OAAO,KAAK,YAAY,MAAM,gDAAgD,CAAC;AAE/E,OAAO,EAAC,uBAAuB,EAAC,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,kBAAkB,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAC,yBAAyB,EAAC,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAC,yBAAyB,EAAC,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAEL,6BAA6B,GAE9B,MAAM,qC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cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC7C,IAAI,CAAC,KAAK,EAAE;YACV,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;SAC9C;QACD,OAAO,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IACD;;OAEG;IACH,oBAAoB,CAAC,KAAmD,EAAE,KAAa;QACrF,MAAM,KAAK,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC7C,IAAI,CAAC,KAAK,EAAE;YACV,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;SAC9C;QAED,2GAA2G;QAC3G,2DAA2D;QAC3D,gEAAgE;QAChE,kBAAkB;QAClB,MAAM,eAAe,GACjB,kBAAkB,CAAC,WAAW,CAAC,4BAA4B,CAAC,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAE9F,MAAM,EAAC,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,oBAAoB,EAAC,GAAG,KAAK,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;QACxG,OAAO;YACL,KAAK;YACL,aAAa;YACb,eAAe,EAAE,eAAe,CAAC,MAAM,CAAC,oBAAoB,IAAI,EAAE,CAAC;SACpE,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport type * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport type * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';\n\nimport {AnimationsTrackAppender} from './AnimationsTrackAppender.js';\nimport {getEventLevel} from './AppenderUtils.js';\nimport * as TimelineComponents from './components/components.js';\nimport {getEventStyle} from './EventUICategory.js';\nimport {GPUTrackAppender} from './GPUTrackAppender.js';\nimport {InteractionsTrackAppender} from './InteractionsTrackAppender.js';\nimport {LayoutShiftsTrackAppender} from './LayoutShiftsTrackAppender.js';\nimport {ThreadAppender} from './ThreadAppender.js';\nimport {\n EntryType,\n InstantEventVisibleDurationMs,\n type TimelineFlameChartEntry,\n} from './TimelineFlameChartDataProvider.js';\nimport {TimingsTrackAppender} from './TimingsTrackAppender.js';\n\nexport type HighlightedEntryInfo = {\n title: string,\n formattedTime: string,\n warningElements?: HTMLSpanElement[],\n};\n\n/**\n * Track appenders add the data of each track into the timeline flame\n * chart. Each track appender also implements functions tha allow the\n * canvas renderer to gather more information about an event in a track,\n * like its display name or color.\n *\n * At the moment, tracks in the timeline flame chart are appended in\n * two locations: in the TimelineFlameChartDataProvider and in the track\n * appenders exported by this module. As part of the work to use a new\n * trace parsing engine, a track appender will be defined with this API\n * for each of the tracks in the timeline. With this implementation in\n * place its counterpart in the TimelineFlameChartDataProvider can be\n * removed. This processes of doing this for a track is referred to as\n * \"migrating the track\" to the new system.\n *\n * The migration implementation will result beneficial among other\n * things because the complexity of rendering the details of each track\n * is distributed among multiple standalone modules.\n * Read more at go/rpp-flamechart-arch\n */\n\nexport interface TrackAppender {\n /**\n * The unique name given to the track appender.\n */\n appenderName: TrackAppenderName;\n\n /**\n * Appends into the flame chart data the data corresponding to a track.\n * @param level the horizontal level of the flame chart events where the\n * track's events will start being appended.\n * @param expanded wether the track should be rendered expanded.\n * @returns the first available level to append more data after having\n * appended the track's events.\n */\n appendTrackAtLevel(level: number, expanded?: boolean): number;\n /**\n * Returns the color an event is shown with in the timeline.\n */\n colorForEvent(event: TraceEngine.Types.TraceEvents.TraceEventData): string;\n /**\n * Returns the title an event is shown with in the timeline.\n */\n titleForEvent(event: TraceEngine.Types.TraceEvents.TraceEventData): string;\n /**\n * Returns the info shown when an event in the timeline is hovered.\n */\n highlightedEntryInfo(event: TraceEngine.Types.TraceEvents.TraceEventData): HighlightedEntryInfo;\n /**\n * The EntriesFilter instance that used to modify the trees in a track based on user actions,\n * e.g collapsing functions, etc.\n */\n entriesFilter?(): TraceEngine.EntriesFilter.EntriesFilter;\n}\n\nexport const TrackNames =\n ['Animations', 'Timings', 'Interactions', 'GPU', 'LayoutShifts', 'Thread', 'Thread_AuctionWorklet'] as const;\n// Network track will use TrackAppender interface, but it won't be shown in Main flamechart.\n// So manually add it to TrackAppenderName.\nexport type TrackAppenderName = typeof TrackNames[number]|'Network';\n\nexport class CompatibilityTracksAppender {\n #trackForLevel = new Map();\n #trackForGroup = new Map();\n #eventsForTrack = new Map();\n #trackEventsForTreeview = new Map();\n #flameChartData: PerfUI.FlameChart.FlameChartTimelineData;\n #traceParsedData: TraceEngine.Handlers.Types.TraceParseData;\n #entryData: TimelineFlameChartEntry[];\n #colorGenerator: Common.Color.Generator;\n #allTrackAppenders: TrackAppender[] = [];\n #visibleTrackNames: Set = new Set([...TrackNames]);\n\n // TODO(crbug.com/1416533)\n // These are used only for compatibility with the legacy flame chart\n // architecture of the panel. Once all tracks have been migrated to\n // use the new engine and flame chart architecture, the reference can\n // be removed.\n #legacyTimelineModel: TimelineModel.TimelineModel.TimelineModelImpl;\n #legacyEntryTypeByLevel: EntryType[];\n #timingsTrackAppender: TimingsTrackAppender;\n #animationsTrackAppender: AnimationsTrackAppender;\n #interactionsTrackAppender: InteractionsTrackAppender;\n #gpuTrackAppender: GPUTrackAppender;\n #layoutShiftsTrackAppender: LayoutShiftsTrackAppender;\n #threadAppenders: ThreadAppender[] = [];\n\n /**\n * @param flameChartData the data used by the flame chart renderer on\n * which the track data will be appended.\n * @param traceParsedData the trace parsing engines output.\n * @param entryData the array containing all event to be rendered in\n * the flamechart.\n * @param legacyEntryTypeByLevel an array containing the type of\n * each entry in the entryData array. Indexed by the position the\n * corresponding entry occupies in the entryData array. This reference\n * is needed only for compatibility with the legacy flamechart\n * architecture and should be removed once all tracks use the new\n * system.\n */\n constructor(\n flameChartData: PerfUI.FlameChart.FlameChartTimelineData,\n traceParsedData: TraceEngine.Handlers.Types.TraceParseData, entryData: TimelineFlameChartEntry[],\n legacyEntryTypeByLevel: EntryType[], legacyTimelineModel: TimelineModel.TimelineModel.TimelineModelImpl) {\n this.#flameChartData = flameChartData;\n this.#traceParsedData = traceParsedData;\n this.#entryData = entryData;\n this.#colorGenerator = new Common.Color.Generator(\n /* hueSpace= */ {min: 30, max: 55, count: undefined},\n /* satSpace= */ {min: 70, max: 100, count: 6},\n /* lightnessSpace= */ 50,\n /* alphaSpace= */ 0.7);\n this.#legacyEntryTypeByLevel = legacyEntryTypeByLevel;\n this.#legacyTimelineModel = legacyTimelineModel;\n this.#timingsTrackAppender = new TimingsTrackAppender(this, this.#traceParsedData, this.#colorGenerator);\n this.#allTrackAppenders.push(this.#timingsTrackAppender);\n\n this.#interactionsTrackAppender = new InteractionsTrackAppender(this, this.#traceParsedData, this.#colorGenerator);\n this.#allTrackAppenders.push(this.#interactionsTrackAppender);\n\n this.#animationsTrackAppender = new AnimationsTrackAppender(this, this.#traceParsedData);\n this.#allTrackAppenders.push(this.#animationsTrackAppender);\n\n this.#gpuTrackAppender = new GPUTrackAppender(this, this.#traceParsedData);\n this.#allTrackAppenders.push(this.#gpuTrackAppender);\n\n // Layout Shifts track in OPP was called the \"Experience\" track even though\n // all it shows are layout shifts.\n this.#layoutShiftsTrackAppender = new LayoutShiftsTrackAppender(this, this.#traceParsedData);\n this.#allTrackAppenders.push(this.#layoutShiftsTrackAppender);\n\n this.#addThreadAppenders();\n ThemeSupport.ThemeSupport.instance().addEventListener(ThemeSupport.ThemeChangeEvent.eventName, () => {\n for (const group of this.#flameChartData.groups) {\n // We only need to update the color here, because FlameChart will call `scheduleUpdate()` when theme is changed.\n group.style.color = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-on-surface');\n group.style.backgroundColor =\n ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container');\n }\n });\n }\n\n setFlameChartDataAndEntryData(\n flameChartData: PerfUI.FlameChart.FlameChartTimelineData, entryData: TimelineFlameChartEntry[],\n legacyEntryTypeByLevel: EntryType[]): void {\n this.#trackForGroup.clear();\n this.#flameChartData = flameChartData;\n this.#entryData = entryData;\n this.#legacyEntryTypeByLevel = legacyEntryTypeByLevel;\n }\n\n getFlameChartTimelineData(): PerfUI.FlameChart.FlameChartTimelineData {\n return this.#flameChartData;\n }\n\n getHiddenEvents(group: PerfUI.FlameChart.Group): TraceEngine.Types.TraceEvents.TraceEventData[]|void {\n const appender = this.#trackForGroup.get(group);\n if (appender && appender.entriesFilter) {\n return appender.entriesFilter().invisibleEntries();\n }\n console.warn('Could not get hidden events.');\n }\n\n getModifiedEntries(group: PerfUI.FlameChart.Group): TraceEngine.Types.TraceEvents.TraceEventData[]|void {\n const appender = this.#trackForGroup.get(group);\n if (appender && appender.entriesFilter) {\n return appender.entriesFilter().modifiedEntries();\n }\n console.warn('Could not get modified events.');\n }\n\n modifyTree(\n group: PerfUI.FlameChart.Group, entry: TraceEngine.Types.TraceEvents.SyntheticTraceEntry,\n type: TraceEngine.EntriesFilter.FilterAction): void {\n const appender = this.#trackForGroup.get(group);\n if (appender && appender.entriesFilter) {\n appender.entriesFilter().applyFilterAction({entry, type});\n } else {\n console.warn('Could not modify tree on a track.');\n }\n }\n\n findPossibleContextMenuActions(\n group: PerfUI.FlameChart.Group,\n node: TraceEngine.Types.TraceEvents.SyntheticTraceEntry): TraceEngine.EntriesFilter.PossibleFilterActions|void {\n const appender = this.#trackForGroup.get(group);\n if (appender && appender.entriesFilter) {\n return appender.entriesFilter().findPossibleActions(node);\n }\n console.warn('Could not find possible context menu actions.');\n }\n\n findHiddenDescendantsAmount(group: PerfUI.FlameChart.Group, node: TraceEngine.Types.TraceEvents.SyntheticTraceEntry):\n number|void {\n const appender = this.#trackForGroup.get(group);\n if (appender && appender.entriesFilter) {\n return appender.entriesFilter().findHiddenDescendantsAmount(node);\n }\n console.warn('Could not find hidden entries on a track.');\n }\n\n #addThreadAppenders(): void {\n const weight = (appender: ThreadAppender): number => {\n switch (appender.threadType) {\n case TraceEngine.Handlers.Threads.ThreadType.MAIN_THREAD: {\n // Within tracks of the main thread, those with data\n // from about:blank are treated with the lowest priority,\n // since there's a chance they have only noise from the\n // navigation to about:blank done on record and reload.\n if (!appender.getUrl()) {\n // We expect each appender to have a URL as we filter out empty URL\n // processes, but in the event that we do not have a URL (can\n // happen for a generic trace), return 2, to ensure these are put\n // below any that do have value URLs.\n return 2;\n }\n const asUrl = new URL(appender.getUrl());\n if (asUrl.protocol === 'about:') {\n return 2;\n }\n return (appender.isOnMainFrame && appender.getUrl() !== '') ? 0 : 1;\n }\n case TraceEngine.Handlers.Threads.ThreadType.WORKER:\n return 3;\n case TraceEngine.Handlers.Threads.ThreadType.RASTERIZER:\n return 4;\n case TraceEngine.Handlers.Threads.ThreadType.THREAD_POOL:\n return 5;\n case TraceEngine.Handlers.Threads.ThreadType.AUCTION_WORKLET:\n return 6;\n case TraceEngine.Handlers.Threads.ThreadType.OTHER:\n return 7;\n default:\n return 8;\n }\n };\n const threads = TraceEngine.Handlers.Threads.threadsInTrace(this.#traceParsedData);\n const processedAuctionWorkletsIds = new Set();\n\n for (const {pid, tid, name, type} of threads) {\n if (this.#traceParsedData.Meta.traceIsGeneric) {\n // If the trace is generic, we just push all of the threads with no\n // effort to differentiate them, hence overriding the thread type to be\n // OTHER for all threads.\n this.#threadAppenders.push(new ThreadAppender(\n this, this.#traceParsedData, pid, tid, name, TraceEngine.Handlers.Threads.ThreadType.OTHER));\n continue;\n }\n\n const maybeWorklet = this.#traceParsedData.AuctionWorklets.worklets.get(pid);\n if (processedAuctionWorkletsIds.has(pid)) {\n // Keep track of this process to ensure we only add the following\n // tracks once per process and not once per thread.\n continue;\n }\n if (maybeWorklet) {\n processedAuctionWorkletsIds.add(pid);\n // Each AuctionWorklet event represents two threads:\n // 1. the Utility Thread\n // 2. the V8 Helper Thread\n // Note that the names passed here are not used visually. TODO: remove this name?\n this.#threadAppenders.push(new ThreadAppender(\n this, this.#traceParsedData, pid, maybeWorklet.args.data.utilityThread.tid, 'auction-worket-utility',\n TraceEngine.Handlers.Threads.ThreadType.AUCTION_WORKLET));\n this.#threadAppenders.push(new ThreadAppender(\n this, this.#traceParsedData, pid, maybeWorklet.args.data.v8HelperThread.tid, 'auction-worklet-v8helper',\n TraceEngine.Handlers.Threads.ThreadType.AUCTION_WORKLET));\n continue;\n }\n\n this.#threadAppenders.push(new ThreadAppender(this, this.#traceParsedData, pid, tid, name, type));\n }\n\n this.#threadAppenders.sort((a, b) => weight(a) - weight(b));\n this.#allTrackAppenders.push(...this.#threadAppenders);\n }\n /**\n * Given a trace event returns instantiates a legacy SDK.Event. This should\n * be used for compatibility purposes only.\n */\n getLegacyEvent(event: TraceEngine.Types.TraceEvents.TraceEventData): TraceEngine.Legacy.Event|null {\n const process = this.#legacyTimelineModel.tracingModel()?.getProcessById(event.pid);\n const thread = process?.threadById(event.tid);\n if (!thread) {\n return null;\n }\n return TraceEngine.Legacy.PayloadEvent.fromPayload(\n event as unknown as TraceEngine.TracingManager.EventPayload, thread);\n }\n\n timingsTrackAppender(): TimingsTrackAppender {\n return this.#timingsTrackAppender;\n }\n\n animationsTrackAppender(): AnimationsTrackAppender {\n return this.#animationsTrackAppender;\n }\n\n interactionsTrackAppender(): InteractionsTrackAppender {\n return this.#interactionsTrackAppender;\n }\n\n gpuTrackAppender(): GPUTrackAppender {\n return this.#gpuTrackAppender;\n }\n\n layoutShiftsTrackAppender(): LayoutShiftsTrackAppender {\n return this.#layoutShiftsTrackAppender;\n }\n\n threadAppenders(): ThreadAppender[] {\n return this.#threadAppenders;\n }\n\n eventsInTrack(trackAppender: TrackAppender): TraceEngine.Types.TraceEvents.TraceEventData[] {\n const cachedData = this.#eventsForTrack.get(trackAppender);\n if (cachedData) {\n return cachedData;\n }\n\n // Calculate the levels occupied by a track.\n let trackStartLevel = null;\n let trackEndLevel = null;\n for (const [level, track] of this.#trackForLevel) {\n if (track !== trackAppender) {\n continue;\n }\n if (trackStartLevel === null) {\n trackStartLevel = level;\n }\n trackEndLevel = level;\n }\n\n if (trackStartLevel === null || trackEndLevel === null) {\n throw new Error(`Could not find events for track: ${trackAppender}`);\n }\n const entryLevels = this.#flameChartData.entryLevels;\n const events = [];\n for (let i = 0; i < entryLevels.length; i++) {\n if (trackStartLevel <= entryLevels[i] && entryLevels[i] <= trackEndLevel) {\n events.push(this.#entryData[i] as TraceEngine.Types.TraceEvents.TraceEventData);\n }\n }\n events.sort((a, b) => a.ts - b.ts);\n this.#eventsForTrack.set(trackAppender, events);\n return events;\n }\n\n /**\n * Determines if the given events, which are assumed to be ordered can\n * be organized into tree structures.\n * This condition is met if there is *not* a pair of async events\n * e1 and e2 where:\n *\n * e1.startTime <= e2.startTime && e1.endTime > e2.startTime && e1.endTime > e2.endTime.\n * or, graphically:\n * |------- e1 ------|\n * |------- e2 --------|\n *\n * Because a parent-child relationship cannot be made from the example\n * above, a tree cannot be made from the set of events.\n *\n * Note that this will also return true if multiple trees can be\n * built, for example if none of the events overlap with each other.\n */\n canBuildTreesFromEvents(events: readonly TraceEngine.Types.TraceEvents.TraceEventData[]): boolean {\n const stack: TraceEngine.Types.TraceEvents.TraceEventData[] = [];\n for (const event of events) {\n const startTime = event.ts;\n const endTime = event.ts + (event.dur || 0);\n let parent = stack.at(-1);\n if (parent === undefined) {\n stack.push(event);\n continue;\n }\n let parentEndTime = parent.ts + (parent.dur || 0);\n // Discard events that are not parents for this event. The parent\n // is one whose end time is after this event start time.\n while (stack.length && startTime >= parentEndTime) {\n stack.pop();\n parent = stack.at(-1);\n\n if (parent === undefined) {\n break;\n }\n parentEndTime = parent.ts + (parent.dur || 0);\n }\n if (stack.length && endTime > parentEndTime) {\n // If such an event exists but its end time is before this\n // event's end time, then a tree cannot be made using this\n // events.\n return false;\n }\n stack.push(event);\n }\n return true;\n }\n\n /**\n * Gets the events to be shown in the tree views of the details pane\n * (Bottom-up, Call tree, etc.). These are the events from the track\n * that can be arranged in a tree shape.\n */\n eventsForTreeView(trackAppender: TrackAppender): TraceEngine.Types.TraceEvents.TraceEventData[] {\n const cachedData = this.#trackEventsForTreeview.get(trackAppender);\n if (cachedData) {\n return cachedData;\n }\n\n let trackEvents = this.eventsInTrack(trackAppender);\n if (!this.canBuildTreesFromEvents(trackEvents)) {\n // Some tracks can include both async and sync events. When this\n // happens, we use all events for the tree views if a trees can be\n // built from both sync and async events. If this is not possible,\n // async events are filtered out and only sync events are used\n // (it's assumed a tree can always be built using a tracks sync\n // events).\n trackEvents = trackEvents.filter(e => !TraceEngine.Types.TraceEvents.isAsyncPhase(e.ph));\n }\n this.#trackEventsForTreeview.set(trackAppender, trackEvents);\n return trackEvents;\n }\n\n /**\n * Caches the track appender that owns a flame chart group. FlameChart\n * groups are created for each track in the timeline. When an user\n * selects a track in the UI, the track's group is passed to the model\n * layer to inform about the selection.\n */\n registerTrackForGroup(group: PerfUI.FlameChart.Group, appender: TrackAppender): void {\n this.#flameChartData.groups.push(group);\n this.#trackForGroup.set(group, appender);\n }\n\n /**\n * Returns number of tracks of given type already appended.\n * Used to name the \"Raster Thread 6\" tracks, etc\n */\n getCurrentTrackCountForThreadType(threadType: TraceEngine.Handlers.Threads.ThreadType.RASTERIZER|\n TraceEngine.Handlers.Threads.ThreadType.THREAD_POOL): number {\n return this.#threadAppenders.filter(appender => appender.threadType === threadType && appender.headerAppended())\n .length;\n }\n\n /**\n * Looks up a FlameChart group for a given appender.\n */\n groupForAppender(targetAppender: TrackAppender): PerfUI.FlameChart.Group|null {\n let foundGroup: PerfUI.FlameChart.Group|null = null;\n for (const [group, appender] of this.#trackForGroup) {\n if (appender === targetAppender) {\n foundGroup = group;\n break;\n }\n }\n return foundGroup;\n }\n\n /**\n * Given a FlameChart group, gets the events to be shown in the tree\n * views if that group was registered by the appender system.\n */\n groupEventsForTreeView(group: PerfUI.FlameChart.Group): TraceEngine.Types.TraceEvents.TraceEventData[]|null {\n const track = this.#trackForGroup.get(group);\n if (!track) {\n return null;\n }\n return this.eventsForTreeView(track);\n }\n\n /**\n * Caches the track appender that owns a level. An appender takes\n * ownership of a level when it appends data to it.\n * The cache is useful to determine what appender should handle a\n * query from the flame chart renderer when an event's feature (like\n * style, title, etc.) is needed.\n */\n registerTrackForLevel(level: number, appender: TrackAppender): void {\n // TODO(crbug.com/1442454) Figure out how to avoid the circular calls.\n this.#trackForLevel.set(level, appender);\n }\n\n /**\n * Adds an event to the flame chart data at a defined level.\n * @param event the event to be appended,\n * @param level the level to append the event,\n * @param appender the track which the event belongs to.\n * @returns the index of the event in all events to be rendered in the flamechart.\n */\n appendEventAtLevel(event: TraceEngine.Types.TraceEvents.TraceEventData, level: number, appender: TrackAppender):\n number {\n // TODO(crbug.com/1442454) Figure out how to avoid the circular calls.\n this.#trackForLevel.set(level, appender);\n const index = this.#entryData.length;\n this.#entryData.push(event);\n this.#legacyEntryTypeByLevel[level] = EntryType.TrackAppender;\n this.#flameChartData.entryLevels[index] = level;\n this.#flameChartData.entryStartTimes[index] = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(event.ts);\n const msDuration = event.dur ||\n TraceEngine.Helpers.Timing.millisecondsToMicroseconds(\n InstantEventVisibleDurationMs as TraceEngine.Types.Timing.MilliSeconds);\n this.#flameChartData.entryTotalTimes[index] = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(msDuration);\n return index;\n }\n\n /**\n * Adds into the flame chart data a list of trace events.\n * @param events the trace events that will be appended to the flame chart.\n * The events should be taken straight from the trace handlers. The handlers\n * should sort the events by start time, and the parent event is before the\n * child.\n * @param trackStartLevel the flame chart level from which the events will\n * be appended.\n * @param appender the track that the trace events belong to.\n * @param eventAppendedCallback an optional function called after the\n * event has been added to the timeline data. This allows the caller\n * to know f.e. the position of the event in the entry data. Use this\n * hook to customize the data after it has been appended, f.e. to add\n * decorations to a set of the entries.\n * @returns the next level after the last occupied by the appended these\n * trace events (the first available level to append next track).\n */\n appendEventsAtLevel(\n events: readonly T[], trackStartLevel: number, appender: TrackAppender,\n eventAppendedCallback?: (event: T, index: number) => void): number {\n const lastUsedTimeByLevel: number[] = [];\n for (let i = 0; i < events.length; ++i) {\n const event = events[i];\n if (!this.entryIsVisibleInTimeline(event)) {\n continue;\n }\n\n const level = getEventLevel(event, lastUsedTimeByLevel);\n const index = this.appendEventAtLevel(event, trackStartLevel + level, appender);\n eventAppendedCallback?.(event, index);\n }\n\n this.#legacyEntryTypeByLevel.length = trackStartLevel + lastUsedTimeByLevel.length;\n this.#legacyEntryTypeByLevel.fill(EntryType.TrackAppender, trackStartLevel);\n return trackStartLevel + lastUsedTimeByLevel.length;\n }\n\n entryIsVisibleInTimeline(entry: TraceEngine.Types.TraceEvents.TraceEventData): boolean {\n if (this.#traceParsedData.Meta.traceIsGeneric) {\n return true;\n }\n\n if (TraceEngine.Types.TraceEvents.isTraceEventUpdateCounters(entry)) {\n // These events are not \"visible\" on the timeline because they are instant events with 0 duration.\n // However, the Memory view (CountersGraph in the codebase) relies on\n // finding the UpdateCounters events within the user's active trace\n // selection in order to show the memory usage for the selected time\n // period.\n // Therefore we mark them as visible so they are appended onto the Thread\n // track, and hence accessible by the CountersGraph view.\n return true;\n }\n\n // Default styles are globally defined for each event name. Some\n // events are hidden by default.\n const eventStyle = getEventStyle(entry.name as TraceEngine.Types.TraceEvents.KnownEventName);\n const eventIsTiming = TraceEngine.Types.TraceEvents.isTraceEventConsoleTime(entry) ||\n TraceEngine.Types.TraceEvents.isTraceEventPerformanceMeasure(entry) ||\n TraceEngine.Types.TraceEvents.isTraceEventPerformanceMark(entry);\n\n return (eventStyle && !eventStyle.hidden) || eventIsTiming;\n }\n\n /**\n * Gets the all track appenders that have been set to be visible.\n */\n allVisibleTrackAppenders(): TrackAppender[] {\n return this.#allTrackAppenders.filter(track => this.#visibleTrackNames.has(track.appenderName));\n }\n\n allThreadAppendersByProcess(): Map {\n const appenders = this.allVisibleTrackAppenders();\n const result = new Map();\n for (const appender of appenders) {\n if (!(appender instanceof ThreadAppender)) {\n continue;\n }\n const existing = result.get(appender.processId()) ?? [];\n existing.push(appender);\n result.set(appender.processId(), existing);\n }\n return result;\n }\n\n /**\n * Sets the visible tracks internally\n * @param visibleTracks set with the names of the visible track\n * appenders. If undefined, all tracks are set to be visible.\n */\n setVisibleTracks(visibleTracks?: Set): void {\n if (!visibleTracks) {\n this.#visibleTrackNames = new Set([...TrackNames]);\n return;\n }\n this.#visibleTrackNames = visibleTracks;\n }\n\n /**\n * Returns the color an event is shown with in the timeline.\n */\n colorForEvent(event: TraceEngine.Types.TraceEvents.TraceEventData, level: number): string {\n const track = this.#trackForLevel.get(level);\n if (!track) {\n throw new Error('Track not found for level');\n }\n return track.colorForEvent(event);\n }\n /**\n * Returns the title an event is shown with in the timeline.\n */\n titleForEvent(event: TraceEngine.Types.TraceEvents.TraceEventData, level: number): string {\n const track = this.#trackForLevel.get(level);\n if (!track) {\n throw new Error('Track not found for level');\n }\n return track.titleForEvent(event);\n }\n /**\n * Returns the info shown when an event in the timeline is hovered.\n */\n highlightedEntryInfo(event: TraceEngine.Types.TraceEvents.TraceEventData, level: number): HighlightedEntryInfo {\n const track = this.#trackForLevel.get(level);\n if (!track) {\n throw new Error('Track not found for level');\n }\n\n // Add any warnings information to the tooltip. Done here to avoid duplicating this call in every appender.\n // By doing this here, we ensure that any warnings that are\n // added to the WarningsHandler are automatically used and added\n // to the tooltip.\n const warningElements: HTMLSpanElement[] =\n TimelineComponents.DetailsView.buildWarningElementsForEvent(event, this.#traceParsedData);\n\n const {title, formattedTime, warningElements: extraWarningElements} = track.highlightedEntryInfo(event);\n return {\n title,\n formattedTime,\n warningElements: warningElements.concat(extraWarningElements || []),\n };\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"CompatibilityTracksAppender.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/CompatibilityTracksAppender.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAEtD,O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C3D,gEAAgE;QAChE,kBAAkB;QAClB,MAAM,eAAe,GACjB,kBAAkB,CAAC,WAAW,CAAC,4BAA4B,CAAC,KAAK,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAE9F,MAAM,EAAC,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,oBAAoB,EAAC,GAAG,KAAK,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;QACxG,OAAO;YACL,KAAK;YACL,aAAa;YACb,eAAe,EAAE,eAAe,CAAC,MAAM,CAAC,oBAAoB,IAAI,EAAE,CAAC;SACpE,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport type * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport type * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';\n\nimport {AnimationsTrackAppender} from './AnimationsTrackAppender.js';\nimport {getEventLevel} from './AppenderUtils.js';\nimport * as TimelineComponents from './components/components.js';\nimport {getEventStyle} from './EventUICategory.js';\nimport {GPUTrackAppender} from './GPUTrackAppender.js';\nimport {InteractionsTrackAppender} from './InteractionsTrackAppender.js';\nimport {LayoutShiftsTrackAppender} from './LayoutShiftsTrackAppender.js';\nimport {ThreadAppender} from './ThreadAppender.js';\nimport {\n EntryType,\n InstantEventVisibleDurationMs,\n type TimelineFlameChartEntry,\n} from './TimelineFlameChartDataProvider.js';\nimport {TimingsTrackAppender} from './TimingsTrackAppender.js';\n\nexport type HighlightedEntryInfo = {\n title: string,\n formattedTime: string,\n warningElements?: HTMLSpanElement[],\n};\n\n/**\n * Track appenders add the data of each track into the timeline flame\n * chart. Each track appender also implements functions tha allow the\n * canvas renderer to gather more information about an event in a track,\n * like its display name or color.\n *\n * At the moment, tracks in the timeline flame chart are appended in\n * two locations: in the TimelineFlameChartDataProvider and in the track\n * appenders exported by this module. As part of the work to use a new\n * trace parsing engine, a track appender will be defined with this API\n * for each of the tracks in the timeline. With this implementation in\n * place its counterpart in the TimelineFlameChartDataProvider can be\n * removed. This processes of doing this for a track is referred to as\n * \"migrating the track\" to the new system.\n *\n * The migration implementation will result beneficial among other\n * things because the complexity of rendering the details of each track\n * is distributed among multiple standalone modules.\n * Read more at go/rpp-flamechart-arch\n */\n\nexport interface TrackAppender {\n /**\n * The unique name given to the track appender.\n */\n appenderName: TrackAppenderName;\n\n /**\n * Appends into the flame chart data the data corresponding to a track.\n * @param level the horizontal level of the flame chart events where the\n * track's events will start being appended.\n * @param expanded wether the track should be rendered expanded.\n * @returns the first available level to append more data after having\n * appended the track's events.\n */\n appendTrackAtLevel(level: number, expanded?: boolean): number;\n /**\n * Returns the color an event is shown with in the timeline.\n */\n colorForEvent(event: TraceEngine.Types.TraceEvents.TraceEventData): string;\n /**\n * Returns the title an event is shown with in the timeline.\n */\n titleForEvent(event: TraceEngine.Types.TraceEvents.TraceEventData): string;\n /**\n * Returns the info shown when an event in the timeline is hovered.\n */\n highlightedEntryInfo(event: TraceEngine.Types.TraceEvents.TraceEventData): HighlightedEntryInfo;\n /**\n * The EntriesFilter instance that used to modify the trees in a track based on user actions,\n * e.g collapsing functions, etc.\n */\n entriesFilter?(): TraceEngine.EntriesFilter.EntriesFilter;\n}\n\nexport const TrackNames =\n ['Animations', 'Timings', 'Interactions', 'GPU', 'LayoutShifts', 'Thread', 'Thread_AuctionWorklet'] as const;\n// Network track will use TrackAppender interface, but it won't be shown in Main flamechart.\n// So manually add it to TrackAppenderName.\nexport type TrackAppenderName = typeof TrackNames[number]|'Network';\n\nexport class CompatibilityTracksAppender {\n #trackForLevel = new Map();\n #trackForGroup = new Map();\n #eventsForTrack = new Map();\n #trackEventsForTreeview = new Map();\n #flameChartData: PerfUI.FlameChart.FlameChartTimelineData;\n #traceParsedData: TraceEngine.Handlers.Types.TraceParseData;\n #entryData: TimelineFlameChartEntry[];\n #colorGenerator: Common.Color.Generator;\n #allTrackAppenders: TrackAppender[] = [];\n #visibleTrackNames: Set = new Set([...TrackNames]);\n\n // TODO(crbug.com/1416533)\n // These are used only for compatibility with the legacy flame chart\n // architecture of the panel. Once all tracks have been migrated to\n // use the new engine and flame chart architecture, the reference can\n // be removed.\n #legacyTimelineModel: TimelineModel.TimelineModel.TimelineModelImpl;\n #legacyEntryTypeByLevel: EntryType[];\n #timingsTrackAppender: TimingsTrackAppender;\n #animationsTrackAppender: AnimationsTrackAppender;\n #interactionsTrackAppender: InteractionsTrackAppender;\n #gpuTrackAppender: GPUTrackAppender;\n #layoutShiftsTrackAppender: LayoutShiftsTrackAppender;\n #threadAppenders: ThreadAppender[] = [];\n\n /**\n * @param flameChartData the data used by the flame chart renderer on\n * which the track data will be appended.\n * @param traceParsedData the trace parsing engines output.\n * @param entryData the array containing all event to be rendered in\n * the flamechart.\n * @param legacyEntryTypeByLevel an array containing the type of\n * each entry in the entryData array. Indexed by the position the\n * corresponding entry occupies in the entryData array. This reference\n * is needed only for compatibility with the legacy flamechart\n * architecture and should be removed once all tracks use the new\n * system.\n */\n constructor(\n flameChartData: PerfUI.FlameChart.FlameChartTimelineData,\n traceParsedData: TraceEngine.Handlers.Types.TraceParseData, entryData: TimelineFlameChartEntry[],\n legacyEntryTypeByLevel: EntryType[], legacyTimelineModel: TimelineModel.TimelineModel.TimelineModelImpl) {\n this.#flameChartData = flameChartData;\n this.#traceParsedData = traceParsedData;\n this.#entryData = entryData;\n this.#colorGenerator = new Common.Color.Generator(\n /* hueSpace= */ {min: 30, max: 55, count: undefined},\n /* satSpace= */ {min: 70, max: 100, count: 6},\n /* lightnessSpace= */ 50,\n /* alphaSpace= */ 0.7);\n this.#legacyEntryTypeByLevel = legacyEntryTypeByLevel;\n this.#legacyTimelineModel = legacyTimelineModel;\n this.#timingsTrackAppender = new TimingsTrackAppender(this, this.#traceParsedData, this.#colorGenerator);\n this.#allTrackAppenders.push(this.#timingsTrackAppender);\n\n this.#interactionsTrackAppender = new InteractionsTrackAppender(this, this.#traceParsedData, this.#colorGenerator);\n this.#allTrackAppenders.push(this.#interactionsTrackAppender);\n\n this.#animationsTrackAppender = new AnimationsTrackAppender(this, this.#traceParsedData);\n this.#allTrackAppenders.push(this.#animationsTrackAppender);\n\n this.#gpuTrackAppender = new GPUTrackAppender(this, this.#traceParsedData);\n this.#allTrackAppenders.push(this.#gpuTrackAppender);\n\n // Layout Shifts track in OPP was called the \"Experience\" track even though\n // all it shows are layout shifts.\n this.#layoutShiftsTrackAppender = new LayoutShiftsTrackAppender(this, this.#traceParsedData);\n this.#allTrackAppenders.push(this.#layoutShiftsTrackAppender);\n\n this.#addThreadAppenders();\n ThemeSupport.ThemeSupport.instance().addEventListener(ThemeSupport.ThemeChangeEvent.eventName, () => {\n for (const group of this.#flameChartData.groups) {\n // We only need to update the color here, because FlameChart will call `scheduleUpdate()` when theme is changed.\n group.style.color = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-on-surface');\n group.style.backgroundColor =\n ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container');\n }\n });\n }\n\n setFlameChartDataAndEntryData(\n flameChartData: PerfUI.FlameChart.FlameChartTimelineData, entryData: TimelineFlameChartEntry[],\n legacyEntryTypeByLevel: EntryType[]): void {\n this.#trackForGroup.clear();\n this.#flameChartData = flameChartData;\n this.#entryData = entryData;\n this.#legacyEntryTypeByLevel = legacyEntryTypeByLevel;\n }\n\n getFlameChartTimelineData(): PerfUI.FlameChart.FlameChartTimelineData {\n return this.#flameChartData;\n }\n\n getHiddenEvents(group: PerfUI.FlameChart.Group): TraceEngine.Types.TraceEvents.TraceEventData[]|void {\n const appender = this.#trackForGroup.get(group);\n if (appender && appender.entriesFilter) {\n return appender.entriesFilter().invisibleEntries();\n }\n console.warn('Could not get hidden events.');\n }\n\n getModifiedEntries(group: PerfUI.FlameChart.Group): TraceEngine.Types.TraceEvents.TraceEventData[]|void {\n const appender = this.#trackForGroup.get(group);\n if (appender && appender.entriesFilter) {\n return appender.entriesFilter().modifiedEntries();\n }\n console.warn('Could not get modified events.');\n }\n\n modifyTree(\n group: PerfUI.FlameChart.Group, entry: TraceEngine.Types.TraceEvents.SyntheticTraceEntry,\n type: TraceEngine.EntriesFilter.FilterAction): void {\n const appender = this.#trackForGroup.get(group);\n if (appender && appender.entriesFilter) {\n appender.entriesFilter().applyFilterAction({entry, type});\n } else {\n console.warn('Could not modify tree on a track.');\n }\n }\n\n findPossibleContextMenuActions(\n group: PerfUI.FlameChart.Group,\n node: TraceEngine.Types.TraceEvents.SyntheticTraceEntry): TraceEngine.EntriesFilter.PossibleFilterActions|void {\n const appender = this.#trackForGroup.get(group);\n if (appender && appender.entriesFilter) {\n return appender.entriesFilter().findPossibleActions(node);\n }\n console.warn('Could not find possible context menu actions.');\n }\n\n revealEntry(group: PerfUI.FlameChart.Group, index: TraceEngine.Types.TraceEvents.SyntheticTraceEntry): void {\n const appender = this.#trackForGroup.get(group);\n if (appender && appender.entriesFilter) {\n appender.entriesFilter().revealEntry(index);\n }\n }\n\n findHiddenDescendantsAmount(group: PerfUI.FlameChart.Group, node: TraceEngine.Types.TraceEvents.SyntheticTraceEntry):\n number|void {\n const appender = this.#trackForGroup.get(group);\n if (appender && appender.entriesFilter) {\n return appender.entriesFilter().findHiddenDescendantsAmount(node);\n }\n console.warn('Could not find hidden entries on a track.');\n }\n\n #addThreadAppenders(): void {\n const weight = (appender: ThreadAppender): number => {\n switch (appender.threadType) {\n case TraceEngine.Handlers.Threads.ThreadType.MAIN_THREAD: {\n // Within tracks of the main thread, those with data\n // from about:blank are treated with the lowest priority,\n // since there's a chance they have only noise from the\n // navigation to about:blank done on record and reload.\n if (!appender.getUrl()) {\n // We expect each appender to have a URL as we filter out empty URL\n // processes, but in the event that we do not have a URL (can\n // happen for a generic trace), return 2, to ensure these are put\n // below any that do have value URLs.\n return 2;\n }\n const asUrl = new URL(appender.getUrl());\n if (asUrl.protocol === 'about:') {\n return 2;\n }\n return (appender.isOnMainFrame && appender.getUrl() !== '') ? 0 : 1;\n }\n case TraceEngine.Handlers.Threads.ThreadType.WORKER:\n return 3;\n case TraceEngine.Handlers.Threads.ThreadType.RASTERIZER:\n return 4;\n case TraceEngine.Handlers.Threads.ThreadType.THREAD_POOL:\n return 5;\n case TraceEngine.Handlers.Threads.ThreadType.AUCTION_WORKLET:\n return 6;\n case TraceEngine.Handlers.Threads.ThreadType.OTHER:\n return 7;\n default:\n return 8;\n }\n };\n const threads = TraceEngine.Handlers.Threads.threadsInTrace(this.#traceParsedData);\n const processedAuctionWorkletsIds = new Set();\n\n for (const {pid, tid, name, type} of threads) {\n if (this.#traceParsedData.Meta.traceIsGeneric) {\n // If the trace is generic, we just push all of the threads with no\n // effort to differentiate them, hence overriding the thread type to be\n // OTHER for all threads.\n this.#threadAppenders.push(new ThreadAppender(\n this, this.#traceParsedData, pid, tid, name, TraceEngine.Handlers.Threads.ThreadType.OTHER));\n continue;\n }\n\n const maybeWorklet = this.#traceParsedData.AuctionWorklets.worklets.get(pid);\n if (processedAuctionWorkletsIds.has(pid)) {\n // Keep track of this process to ensure we only add the following\n // tracks once per process and not once per thread.\n continue;\n }\n if (maybeWorklet) {\n processedAuctionWorkletsIds.add(pid);\n // Each AuctionWorklet event represents two threads:\n // 1. the Utility Thread\n // 2. the V8 Helper Thread\n // Note that the names passed here are not used visually. TODO: remove this name?\n this.#threadAppenders.push(new ThreadAppender(\n this, this.#traceParsedData, pid, maybeWorklet.args.data.utilityThread.tid, 'auction-worket-utility',\n TraceEngine.Handlers.Threads.ThreadType.AUCTION_WORKLET));\n this.#threadAppenders.push(new ThreadAppender(\n this, this.#traceParsedData, pid, maybeWorklet.args.data.v8HelperThread.tid, 'auction-worklet-v8helper',\n TraceEngine.Handlers.Threads.ThreadType.AUCTION_WORKLET));\n continue;\n }\n\n this.#threadAppenders.push(new ThreadAppender(this, this.#traceParsedData, pid, tid, name, type));\n }\n\n this.#threadAppenders.sort((a, b) => weight(a) - weight(b));\n this.#allTrackAppenders.push(...this.#threadAppenders);\n }\n /**\n * Given a trace event returns instantiates a legacy SDK.Event. This should\n * be used for compatibility purposes only.\n */\n getLegacyEvent(event: TraceEngine.Types.TraceEvents.TraceEventData): TraceEngine.Legacy.Event|null {\n const process = this.#legacyTimelineModel.tracingModel()?.getProcessById(event.pid);\n const thread = process?.threadById(event.tid);\n if (!thread) {\n return null;\n }\n return TraceEngine.Legacy.PayloadEvent.fromPayload(\n event as unknown as TraceEngine.TracingManager.EventPayload, thread);\n }\n\n timingsTrackAppender(): TimingsTrackAppender {\n return this.#timingsTrackAppender;\n }\n\n animationsTrackAppender(): AnimationsTrackAppender {\n return this.#animationsTrackAppender;\n }\n\n interactionsTrackAppender(): InteractionsTrackAppender {\n return this.#interactionsTrackAppender;\n }\n\n gpuTrackAppender(): GPUTrackAppender {\n return this.#gpuTrackAppender;\n }\n\n layoutShiftsTrackAppender(): LayoutShiftsTrackAppender {\n return this.#layoutShiftsTrackAppender;\n }\n\n threadAppenders(): ThreadAppender[] {\n return this.#threadAppenders;\n }\n\n eventsInTrack(trackAppender: TrackAppender): TraceEngine.Types.TraceEvents.TraceEventData[] {\n const cachedData = this.#eventsForTrack.get(trackAppender);\n if (cachedData) {\n return cachedData;\n }\n\n // Calculate the levels occupied by a track.\n let trackStartLevel = null;\n let trackEndLevel = null;\n for (const [level, track] of this.#trackForLevel) {\n if (track !== trackAppender) {\n continue;\n }\n if (trackStartLevel === null) {\n trackStartLevel = level;\n }\n trackEndLevel = level;\n }\n\n if (trackStartLevel === null || trackEndLevel === null) {\n throw new Error(`Could not find events for track: ${trackAppender}`);\n }\n const entryLevels = this.#flameChartData.entryLevels;\n const events = [];\n for (let i = 0; i < entryLevels.length; i++) {\n if (trackStartLevel <= entryLevels[i] && entryLevels[i] <= trackEndLevel) {\n events.push(this.#entryData[i] as TraceEngine.Types.TraceEvents.TraceEventData);\n }\n }\n events.sort((a, b) => a.ts - b.ts);\n this.#eventsForTrack.set(trackAppender, events);\n return events;\n }\n\n /**\n * Determines if the given events, which are assumed to be ordered can\n * be organized into tree structures.\n * This condition is met if there is *not* a pair of async events\n * e1 and e2 where:\n *\n * e1.startTime <= e2.startTime && e1.endTime > e2.startTime && e1.endTime > e2.endTime.\n * or, graphically:\n * |------- e1 ------|\n * |------- e2 --------|\n *\n * Because a parent-child relationship cannot be made from the example\n * above, a tree cannot be made from the set of events.\n *\n * Note that this will also return true if multiple trees can be\n * built, for example if none of the events overlap with each other.\n */\n canBuildTreesFromEvents(events: readonly TraceEngine.Types.TraceEvents.TraceEventData[]): boolean {\n const stack: TraceEngine.Types.TraceEvents.TraceEventData[] = [];\n for (const event of events) {\n const startTime = event.ts;\n const endTime = event.ts + (event.dur || 0);\n let parent = stack.at(-1);\n if (parent === undefined) {\n stack.push(event);\n continue;\n }\n let parentEndTime = parent.ts + (parent.dur || 0);\n // Discard events that are not parents for this event. The parent\n // is one whose end time is after this event start time.\n while (stack.length && startTime >= parentEndTime) {\n stack.pop();\n parent = stack.at(-1);\n\n if (parent === undefined) {\n break;\n }\n parentEndTime = parent.ts + (parent.dur || 0);\n }\n if (stack.length && endTime > parentEndTime) {\n // If such an event exists but its end time is before this\n // event's end time, then a tree cannot be made using this\n // events.\n return false;\n }\n stack.push(event);\n }\n return true;\n }\n\n /**\n * Gets the events to be shown in the tree views of the details pane\n * (Bottom-up, Call tree, etc.). These are the events from the track\n * that can be arranged in a tree shape.\n */\n eventsForTreeView(trackAppender: TrackAppender): TraceEngine.Types.TraceEvents.TraceEventData[] {\n const cachedData = this.#trackEventsForTreeview.get(trackAppender);\n if (cachedData) {\n return cachedData;\n }\n\n let trackEvents = this.eventsInTrack(trackAppender);\n if (!this.canBuildTreesFromEvents(trackEvents)) {\n // Some tracks can include both async and sync events. When this\n // happens, we use all events for the tree views if a trees can be\n // built from both sync and async events. If this is not possible,\n // async events are filtered out and only sync events are used\n // (it's assumed a tree can always be built using a tracks sync\n // events).\n trackEvents = trackEvents.filter(e => !TraceEngine.Types.TraceEvents.isAsyncPhase(e.ph));\n }\n this.#trackEventsForTreeview.set(trackAppender, trackEvents);\n return trackEvents;\n }\n\n /**\n * Caches the track appender that owns a flame chart group. FlameChart\n * groups are created for each track in the timeline. When an user\n * selects a track in the UI, the track's group is passed to the model\n * layer to inform about the selection.\n */\n registerTrackForGroup(group: PerfUI.FlameChart.Group, appender: TrackAppender): void {\n this.#flameChartData.groups.push(group);\n this.#trackForGroup.set(group, appender);\n }\n\n /**\n * Returns number of tracks of given type already appended.\n * Used to name the \"Raster Thread 6\" tracks, etc\n */\n getCurrentTrackCountForThreadType(threadType: TraceEngine.Handlers.Threads.ThreadType.RASTERIZER|\n TraceEngine.Handlers.Threads.ThreadType.THREAD_POOL): number {\n return this.#threadAppenders.filter(appender => appender.threadType === threadType && appender.headerAppended())\n .length;\n }\n\n /**\n * Looks up a FlameChart group for a given appender.\n */\n groupForAppender(targetAppender: TrackAppender): PerfUI.FlameChart.Group|null {\n let foundGroup: PerfUI.FlameChart.Group|null = null;\n for (const [group, appender] of this.#trackForGroup) {\n if (appender === targetAppender) {\n foundGroup = group;\n break;\n }\n }\n return foundGroup;\n }\n\n /**\n * Given a FlameChart group, gets the events to be shown in the tree\n * views if that group was registered by the appender system.\n */\n groupEventsForTreeView(group: PerfUI.FlameChart.Group): TraceEngine.Types.TraceEvents.TraceEventData[]|null {\n const track = this.#trackForGroup.get(group);\n if (!track) {\n return null;\n }\n return this.eventsForTreeView(track);\n }\n\n /**\n * Caches the track appender that owns a level. An appender takes\n * ownership of a level when it appends data to it.\n * The cache is useful to determine what appender should handle a\n * query from the flame chart renderer when an event's feature (like\n * style, title, etc.) is needed.\n */\n registerTrackForLevel(level: number, appender: TrackAppender): void {\n // TODO(crbug.com/1442454) Figure out how to avoid the circular calls.\n this.#trackForLevel.set(level, appender);\n }\n\n /**\n * Adds an event to the flame chart data at a defined level.\n * @param event the event to be appended,\n * @param level the level to append the event,\n * @param appender the track which the event belongs to.\n * @returns the index of the event in all events to be rendered in the flamechart.\n */\n appendEventAtLevel(event: TraceEngine.Types.TraceEvents.TraceEventData, level: number, appender: TrackAppender):\n number {\n // TODO(crbug.com/1442454) Figure out how to avoid the circular calls.\n this.#trackForLevel.set(level, appender);\n const index = this.#entryData.length;\n this.#entryData.push(event);\n this.#legacyEntryTypeByLevel[level] = EntryType.TrackAppender;\n this.#flameChartData.entryLevels[index] = level;\n this.#flameChartData.entryStartTimes[index] = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(event.ts);\n const msDuration = event.dur ||\n TraceEngine.Helpers.Timing.millisecondsToMicroseconds(\n InstantEventVisibleDurationMs as TraceEngine.Types.Timing.MilliSeconds);\n this.#flameChartData.entryTotalTimes[index] = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(msDuration);\n return index;\n }\n\n /**\n * Adds into the flame chart data a list of trace events.\n * @param events the trace events that will be appended to the flame chart.\n * The events should be taken straight from the trace handlers. The handlers\n * should sort the events by start time, and the parent event is before the\n * child.\n * @param trackStartLevel the flame chart level from which the events will\n * be appended.\n * @param appender the track that the trace events belong to.\n * @param eventAppendedCallback an optional function called after the\n * event has been added to the timeline data. This allows the caller\n * to know f.e. the position of the event in the entry data. Use this\n * hook to customize the data after it has been appended, f.e. to add\n * decorations to a set of the entries.\n * @returns the next level after the last occupied by the appended these\n * trace events (the first available level to append next track).\n */\n appendEventsAtLevel(\n events: readonly T[], trackStartLevel: number, appender: TrackAppender,\n eventAppendedCallback?: (event: T, index: number) => void): number {\n const lastUsedTimeByLevel: number[] = [];\n for (let i = 0; i < events.length; ++i) {\n const event = events[i];\n if (!this.entryIsVisibleInTimeline(event)) {\n continue;\n }\n\n const level = getEventLevel(event, lastUsedTimeByLevel);\n const index = this.appendEventAtLevel(event, trackStartLevel + level, appender);\n eventAppendedCallback?.(event, index);\n }\n\n this.#legacyEntryTypeByLevel.length = trackStartLevel + lastUsedTimeByLevel.length;\n this.#legacyEntryTypeByLevel.fill(EntryType.TrackAppender, trackStartLevel);\n return trackStartLevel + lastUsedTimeByLevel.length;\n }\n\n entryIsVisibleInTimeline(entry: TraceEngine.Types.TraceEvents.TraceEventData): boolean {\n if (this.#traceParsedData.Meta.traceIsGeneric) {\n return true;\n }\n\n if (TraceEngine.Types.TraceEvents.isTraceEventUpdateCounters(entry)) {\n // These events are not \"visible\" on the timeline because they are instant events with 0 duration.\n // However, the Memory view (CountersGraph in the codebase) relies on\n // finding the UpdateCounters events within the user's active trace\n // selection in order to show the memory usage for the selected time\n // period.\n // Therefore we mark them as visible so they are appended onto the Thread\n // track, and hence accessible by the CountersGraph view.\n return true;\n }\n\n // Default styles are globally defined for each event name. Some\n // events are hidden by default.\n const eventStyle = getEventStyle(entry.name as TraceEngine.Types.TraceEvents.KnownEventName);\n const eventIsTiming = TraceEngine.Types.TraceEvents.isTraceEventConsoleTime(entry) ||\n TraceEngine.Types.TraceEvents.isTraceEventPerformanceMeasure(entry) ||\n TraceEngine.Types.TraceEvents.isTraceEventPerformanceMark(entry);\n\n return (eventStyle && !eventStyle.hidden) || eventIsTiming;\n }\n\n /**\n * Gets the all track appenders that have been set to be visible.\n */\n allVisibleTrackAppenders(): TrackAppender[] {\n return this.#allTrackAppenders.filter(track => this.#visibleTrackNames.has(track.appenderName));\n }\n\n allThreadAppendersByProcess(): Map {\n const appenders = this.allVisibleTrackAppenders();\n const result = new Map();\n for (const appender of appenders) {\n if (!(appender instanceof ThreadAppender)) {\n continue;\n }\n const existing = result.get(appender.processId()) ?? [];\n existing.push(appender);\n result.set(appender.processId(), existing);\n }\n return result;\n }\n\n /**\n * Sets the visible tracks internally\n * @param visibleTracks set with the names of the visible track\n * appenders. If undefined, all tracks are set to be visible.\n */\n setVisibleTracks(visibleTracks?: Set): void {\n if (!visibleTracks) {\n this.#visibleTrackNames = new Set([...TrackNames]);\n return;\n }\n this.#visibleTrackNames = visibleTracks;\n }\n\n /**\n * Returns the color an event is shown with in the timeline.\n */\n colorForEvent(event: TraceEngine.Types.TraceEvents.TraceEventData, level: number): string {\n const track = this.#trackForLevel.get(level);\n if (!track) {\n throw new Error('Track not found for level');\n }\n return track.colorForEvent(event);\n }\n /**\n * Returns the title an event is shown with in the timeline.\n */\n titleForEvent(event: TraceEngine.Types.TraceEvents.TraceEventData, level: number): string {\n const track = this.#trackForLevel.get(level);\n if (!track) {\n throw new Error('Track not found for level');\n }\n return track.titleForEvent(event);\n }\n /**\n * Returns the info shown when an event in the timeline is hovered.\n */\n highlightedEntryInfo(event: TraceEngine.Types.TraceEvents.TraceEventData, level: number): HighlightedEntryInfo {\n const track = this.#trackForLevel.get(level);\n if (!track) {\n throw new Error('Track not found for level');\n }\n\n // Add any warnings information to the tooltip. Done here to avoid duplicating this call in every appender.\n // By doing this here, we ensure that any warnings that are\n // added to the WarningsHandler are automatically used and added\n // to the tooltip.\n const warningElements: HTMLSpanElement[] =\n TimelineComponents.DetailsView.buildWarningElementsForEvent(event, this.#traceParsedData);\n\n const {title, formattedTime, warningElements: extraWarningElements} = track.highlightedEntryInfo(event);\n return {\n title,\n formattedTime,\n warningElements: warningElements.concat(extraWarningElements || []),\n };\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/timeline/Initiators.d.ts b/public/panels/timeline/Initiators.d.ts index d9aaec68f..c10b35a7c 100644 --- a/public/panels/timeline/Initiators.d.ts +++ b/public/panels/timeline/Initiators.d.ts @@ -1,5 +1,5 @@ import * as TraceEngine from '../../models/trace/trace.js'; -export interface InitiatorPair { +export interface InitiatorData { event: TraceEngine.Types.TraceEvents.TraceEventData; initiator: TraceEngine.Types.TraceEvents.TraceEventData; isEntryHidden?: boolean; @@ -7,9 +7,9 @@ export interface InitiatorPair { } /** * Given an event that the user has selected, this function returns all the - * pairs of events and their initiators that need to be drawn on the flamechart. - * The reason that this can return multiple pairs is because we draw the + * data of events and their initiators that need to be drawn on the flamechart. + * The reason that this can return multiple InitiatorEntry objects is because we draw the * entire chain: for each, we see if it had an initiator, and * work backwards to draw each one, as well as the events initiated directly by the entry. */ -export declare function eventInitiatorPairsToDraw(traceEngineData: TraceEngine.Handlers.Types.TraceParseData, selectedEvent: TraceEngine.Types.TraceEvents.TraceEventData, hiddenEntries: TraceEngine.Types.TraceEvents.TraceEventData[], modifiedEntries: TraceEngine.Types.TraceEvents.TraceEventData[]): readonly InitiatorPair[]; +export declare function initiatorsDataToDraw(traceEngineData: TraceEngine.Handlers.Types.TraceParseData, selectedEvent: TraceEngine.Types.TraceEvents.TraceEventData, hiddenEntries: TraceEngine.Types.TraceEvents.TraceEventData[], modifiedEntries: TraceEngine.Types.TraceEvents.TraceEventData[]): readonly InitiatorData[]; diff --git a/public/panels/timeline/Initiators.js b/public/panels/timeline/Initiators.js index af86ab4a3..edab4b837 100644 --- a/public/panels/timeline/Initiators.js +++ b/public/panels/timeline/Initiators.js @@ -4,33 +4,33 @@ import * as TraceEngine from '../../models/trace/trace.js'; /** * Given an event that the user has selected, this function returns all the - * pairs of events and their initiators that need to be drawn on the flamechart. - * The reason that this can return multiple pairs is because we draw the + * data of events and their initiators that need to be drawn on the flamechart. + * The reason that this can return multiple InitiatorEntry objects is because we draw the * entire chain: for each, we see if it had an initiator, and * work backwards to draw each one, as well as the events initiated directly by the entry. */ -export function eventInitiatorPairsToDraw(traceEngineData, selectedEvent, hiddenEntries, modifiedEntries) { - const pairs = [ - ...findEventInitiatorPairsPredecessors(traceEngineData, selectedEvent), - ...findEventInitiatorPairsDirectSuccessors(traceEngineData, selectedEvent), +export function initiatorsDataToDraw(traceEngineData, selectedEvent, hiddenEntries, modifiedEntries) { + const initiatorsData = [ + ...findInitiatorDataPredecessors(traceEngineData, selectedEvent), + ...findInitiatorDataDirectSuccessors(traceEngineData, selectedEvent), ]; - // For each pair, call a function that makes sure that neither entry is hidden. + // For each InitiatorData, call a function that makes sure that neither the initirator or initiated entry is hidden. // If they are, it will reassign the event or initiator to the closest ancestor. - pairs.forEach(pair => getClosestVisibleAncestorsPair(pair, modifiedEntries, hiddenEntries, traceEngineData)); - return pairs; + initiatorsData.forEach(initiatorData => getClosestVisibleInitiatorEntriesAncestors(initiatorData, modifiedEntries, hiddenEntries, traceEngineData)); + return initiatorsData; } -function findEventInitiatorPairsPredecessors(traceEngineData, selectedEvent) { - const pairs = []; +function findInitiatorDataPredecessors(traceEngineData, selectedEvent) { + const initiatorsData = []; let currentEvent = selectedEvent; - // Build event pairs up to the selected one + // Build event initiator data up to the selected one while (currentEvent) { const currentInitiator = traceEngineData.Initiators.eventToInitiator.get(currentEvent); if (currentInitiator) { - // Store the current pair, and then set the initiator to + // Store the current initiator data, and then set the initiator to // be the current event, so we work back through the // trace and find the initiator of the initiator, and so // on... - pairs.push({ event: currentEvent, initiator: currentInitiator }); + initiatorsData.push({ event: currentEvent, initiator: currentInitiator }); currentEvent = currentInitiator; continue; } @@ -50,42 +50,42 @@ function findEventInitiatorPairsPredecessors(traceEngineData, selectedEvent) { // Go up to the parent, and loop again. currentEvent = nodeForCurrentEvent.parent?.entry || null; } - return pairs; + return initiatorsData; } -function findEventInitiatorPairsDirectSuccessors(traceEngineData, selectedEvent) { - const pairs = []; - // Add all of the initiated events to the pairs array. +function findInitiatorDataDirectSuccessors(traceEngineData, selectedEvent) { + const initiatorsData = []; + // Add all of the initiated events to the initiatorsData array. const eventsInitiatedByCurrent = traceEngineData.Initiators.initiatorToEvents.get(selectedEvent); if (eventsInitiatedByCurrent) { eventsInitiatedByCurrent.forEach(event => { - pairs.push({ event: event, initiator: selectedEvent }); + initiatorsData.push({ event: event, initiator: selectedEvent }); }); } - return pairs; + return initiatorsData; } /** - * Given a pair of an initiator and event, this function returns - * the closest visible ancestors. We need to apply this to each pair because + * Given an InitiatorData object that contains an initiator and event, this function returns + * the closest visible ancestors. We need to apply this to each initiatorData because * the actual initiator or initiated event might be hidden form the flame chart. - * If neither entry is hidden, this function returns the initial pair. + * If neither entry is hidden, this function returns the initial initiatorData object. */ -function getClosestVisibleAncestorsPair(pair, modifiedEntries, hiddenEntries, traceEngineData) { - if (hiddenEntries.includes(pair.event)) { - let nextParent = traceEngineData.Renderer.entryToNode.get(pair.event)?.parent; +function getClosestVisibleInitiatorEntriesAncestors(initiatorData, modifiedEntries, hiddenEntries, traceEngineData) { + if (hiddenEntries.includes(initiatorData.event)) { + let nextParent = traceEngineData.Renderer.entryToNode.get(initiatorData.event)?.parent; while (nextParent?.entry && !modifiedEntries.includes(nextParent?.entry)) { nextParent = nextParent.parent ?? undefined; } - pair.event = nextParent?.entry ?? pair.event; - pair.isEntryHidden = true; + initiatorData.event = nextParent?.entry ?? initiatorData.event; + initiatorData.isEntryHidden = true; } - if (hiddenEntries.includes(pair.initiator)) { - let nextParent = traceEngineData.Renderer.entryToNode.get(pair.initiator)?.parent; + if (hiddenEntries.includes(initiatorData.initiator)) { + let nextParent = traceEngineData.Renderer.entryToNode.get(initiatorData.initiator)?.parent; while (nextParent?.entry && !modifiedEntries.includes(nextParent?.entry)) { nextParent = nextParent.parent ?? undefined; } - pair.initiator = nextParent?.entry ?? pair.initiator; - pair.isInitiatorHidden = true; + initiatorData.initiator = nextParent?.entry ?? initiatorData.initiator; + initiatorData.isInitiatorHidden = true; } - return pair; + return initiatorData; } //# sourceMappingURL=Initiators.js.map \ No newline at end of file diff --git a/public/panels/timeline/Initiators.js.map b/public/panels/timeline/Initiators.js.map index 820aef757..c41c92bb6 100644 --- a/public/panels/timeline/Initiators.js.map +++ b/public/panels/timeline/Initiators.js.map @@ -1 +1 @@ -{"version":3,"file":"Initiators.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/Initiators.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAQ3D;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CACrC,eAA0D,EAC1D,aAA2D,EAC3D,aAA6D,EAC7D,eAA+D;IAEjE,MAAM,KAAK,GAAG;QACZ,GAAG,mCAAmC,CAAC,e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K,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,UAAU,EAAE,KAAK,CAAC,EAAE;YACxE,UAAU,GAAG,UAAU,CAAC,MAAM,IAAI,SAAS,CAAC;SAC7C;QACD,IAAI,CAAC,SAAS,GAAG,UAAU,EAAE,KAAK,IAAI,IAAI,CAAC,SAAS,CAAC;QACrD,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;KAC/B;IAED,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as TraceEngine from '../../models/trace/trace.js';\n\nexport interface InitiatorPair {\n event: TraceEngine.Types.TraceEvents.TraceEventData;\n initiator: TraceEngine.Types.TraceEvents.TraceEventData;\n isEntryHidden?: boolean;\n isInitiatorHidden?: boolean;\n}\n/**\n * Given an event that the user has selected, this function returns all the\n * pairs of events and their initiators that need to be drawn on the flamechart.\n * The reason that this can return multiple pairs is because we draw the\n * entire chain: for each, we see if it had an initiator, and\n * work backwards to draw each one, as well as the events initiated directly by the entry.\n */\nexport function eventInitiatorPairsToDraw(\n traceEngineData: TraceEngine.Handlers.Types.TraceParseData,\n selectedEvent: TraceEngine.Types.TraceEvents.TraceEventData,\n hiddenEntries: TraceEngine.Types.TraceEvents.TraceEventData[],\n modifiedEntries: TraceEngine.Types.TraceEvents.TraceEventData[],\n ): readonly InitiatorPair[] {\n const pairs = [\n ...findEventInitiatorPairsPredecessors(traceEngineData, selectedEvent),\n ...findEventInitiatorPairsDirectSuccessors(traceEngineData, selectedEvent),\n ];\n\n // For each pair, call a function that makes sure that neither entry is hidden.\n // If they are, it will reassign the event or initiator to the closest ancestor.\n pairs.forEach(pair => getClosestVisibleAncestorsPair(pair, modifiedEntries, hiddenEntries, traceEngineData));\n return pairs;\n}\n\nfunction findEventInitiatorPairsPredecessors(\n traceEngineData: TraceEngine.Handlers.Types.TraceParseData,\n selectedEvent: TraceEngine.Types.TraceEvents.TraceEventData,\n ): readonly InitiatorPair[] {\n const pairs: InitiatorPair[] = [];\n\n let currentEvent: TraceEngine.Types.TraceEvents.TraceEventData|null = selectedEvent;\n\n // Build event pairs up to the selected one\n while (currentEvent) {\n const currentInitiator = traceEngineData.Initiators.eventToInitiator.get(currentEvent);\n\n if (currentInitiator) {\n // Store the current pair, and then set the initiator to\n // be the current event, so we work back through the\n // trace and find the initiator of the initiator, and so\n // on...\n pairs.push({event: currentEvent, initiator: currentInitiator});\n currentEvent = currentInitiator;\n continue;\n }\n\n if (!TraceEngine.Types.TraceEvents.isSyntheticTraceEntry(currentEvent)) {\n // If the current event is not a renderer, we have no\n // concept of a parent event, so we can bail.\n currentEvent = null;\n break;\n }\n\n const nodeForCurrentEvent = traceEngineData.Renderer.entryToNode.get(currentEvent);\n if (!nodeForCurrentEvent) {\n // Should not happen - if it does something odd is going\n // on so let's give up.\n currentEvent = null;\n break;\n }\n\n // Go up to the parent, and loop again.\n currentEvent = nodeForCurrentEvent.parent?.entry || null;\n }\n\n return pairs;\n}\n\nfunction findEventInitiatorPairsDirectSuccessors(\n traceEngineData: TraceEngine.Handlers.Types.TraceParseData,\n selectedEvent: TraceEngine.Types.TraceEvents.TraceEventData,\n ): readonly InitiatorPair[] {\n const pairs: InitiatorPair[] = [];\n\n // Add all of the initiated events to the pairs array.\n const eventsInitiatedByCurrent = traceEngineData.Initiators.initiatorToEvents.get(selectedEvent);\n if (eventsInitiatedByCurrent) {\n eventsInitiatedByCurrent.forEach(event => {\n pairs.push({event: event, initiator: selectedEvent});\n });\n }\n\n return pairs;\n}\n\n/**\n * Given a pair of an initiator and event, this function returns\n * the closest visible ancestors. We need to apply this to each pair because\n * the actual initiator or initiated event might be hidden form the flame chart.\n * If neither entry is hidden, this function returns the initial pair.\n */\nfunction getClosestVisibleAncestorsPair(\n pair: InitiatorPair, modifiedEntries: TraceEngine.Types.TraceEvents.TraceEventData[],\n hiddenEntries: TraceEngine.Types.TraceEvents.TraceEventData[],\n traceEngineData: TraceEngine.Handlers.Types.TraceParseData): InitiatorPair {\n if (hiddenEntries.includes(pair.event)) {\n let nextParent = traceEngineData.Renderer.entryToNode.get(pair.event)?.parent;\n while (nextParent?.entry && !modifiedEntries.includes(nextParent?.entry)) {\n nextParent = nextParent.parent ?? undefined;\n }\n pair.event = nextParent?.entry ?? pair.event;\n pair.isEntryHidden = true;\n }\n\n if (hiddenEntries.includes(pair.initiator)) {\n let nextParent = traceEngineData.Renderer.entryToNode.get(pair.initiator)?.parent;\n while (nextParent?.entry && !modifiedEntries.includes(nextParent?.entry)) {\n nextParent = nextParent.parent ?? undefined;\n }\n pair.initiator = nextParent?.entry ?? pair.initiator;\n pair.isInitiatorHidden = true;\n }\n\n return pair;\n}\n"]} \ No newline at end of file +{"version":3,"file":"Initiators.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/Initiators.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAQ3D;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAChC,eAA0D,EAC1D,aAA2D,EAC3D,aAA6D,EAC7D,eAA+D;IAEjE,MAAM,cAAc,GAAG;QACrB,GAAG,6BAA6B,CAAC,eAAe,EAAE,aAAa,CAAC;QAChE,GAAG,iCAAiC,CAAC,eAAe,EAAE,aAAa,CAAC;KACrE,CAAC;IAEF,oHAAoH;IACpH,gFAAgF;IAChF,cAAc,CAAC,OAAO,CAClB,aAAa,CAAC,EAAE,CACZ,0CAA0C,CAAC,aAAa,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC,CAAC;IACpH,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,SAAS,6BAA6B,CAClC,eAA0D,EAC1D,aAA2D;IAE7D,MAAM,cAAc,GAAoB,EAAE,CAAC;IAE3C,IAAI,YAAY,GAAsD,aAAa,CAAC;IAEpF,oDAAoD;IACp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J;IAED,OAAO,cAAc,CAAC;AACxB,CAAC;AAED;;;;;GAKG;AACH,SAAS,0CAA0C,CAC/C,aAA4B,EAAE,eAA+D,EAC7F,aAA6D,EAC7D,eAA0D;IAC5D,IAAI,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE;QAC/C,IAAI,UAAU,GAAG,eAAe,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QACvF,OAAO,UAAU,EAAE,KAAK,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,UAAU,EAAE,KAAK,CAAC,EAAE;YACxE,UAAU,GAAG,UAAU,CAAC,MAAM,IAAI,SAAS,CAAC;SAC7C;QACD,aAAa,CAAC,KAAK,GAAG,UAAU,EAAE,KAAK,IAAI,aAAa,CAAC,KAAK,CAAC;QAC/D,aAAa,CAAC,aAAa,GAAG,IAAI,CAAC;KACpC;IAED,IAAI,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE;QACnD,IAAI,UAAU,GAAG,eAAe,CAAC,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAC3F,OAAO,UAAU,EAAE,KAAK,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,UAAU,EAAE,KAAK,CAAC,EAAE;YACxE,UAAU,GAAG,UAAU,CAAC,MAAM,IAAI,SAAS,CAAC;SAC7C;QACD,aAAa,CAAC,SAAS,GAAG,UAAU,EAAE,KAAK,IAAI,aAAa,CAAC,SAAS,CAAC;QACvE,aAAa,CAAC,iBAAiB,GAAG,IAAI,CAAC;KACxC;IAED,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as TraceEngine from '../../models/trace/trace.js';\n\nexport interface InitiatorData {\n event: TraceEngine.Types.TraceEvents.TraceEventData;\n initiator: TraceEngine.Types.TraceEvents.TraceEventData;\n isEntryHidden?: boolean;\n isInitiatorHidden?: boolean;\n}\n/**\n * Given an event that the user has selected, this function returns all the\n * data of events and their initiators that need to be drawn on the flamechart.\n * The reason that this can return multiple InitiatorEntry objects is because we draw the\n * entire chain: for each, we see if it had an initiator, and\n * work backwards to draw each one, as well as the events initiated directly by the entry.\n */\nexport function initiatorsDataToDraw(\n traceEngineData: TraceEngine.Handlers.Types.TraceParseData,\n selectedEvent: TraceEngine.Types.TraceEvents.TraceEventData,\n hiddenEntries: TraceEngine.Types.TraceEvents.TraceEventData[],\n modifiedEntries: TraceEngine.Types.TraceEvents.TraceEventData[],\n ): readonly InitiatorData[] {\n const initiatorsData = [\n ...findInitiatorDataPredecessors(traceEngineData, selectedEvent),\n ...findInitiatorDataDirectSuccessors(traceEngineData, selectedEvent),\n ];\n\n // For each InitiatorData, call a function that makes sure that neither the initirator or initiated entry is hidden.\n // If they are, it will reassign the event or initiator to the closest ancestor.\n initiatorsData.forEach(\n initiatorData =>\n getClosestVisibleInitiatorEntriesAncestors(initiatorData, modifiedEntries, hiddenEntries, traceEngineData));\n return initiatorsData;\n}\n\nfunction findInitiatorDataPredecessors(\n traceEngineData: TraceEngine.Handlers.Types.TraceParseData,\n selectedEvent: TraceEngine.Types.TraceEvents.TraceEventData,\n ): readonly InitiatorData[] {\n const initiatorsData: InitiatorData[] = [];\n\n let currentEvent: TraceEngine.Types.TraceEvents.TraceEventData|null = selectedEvent;\n\n // Build event initiator data up to the selected one\n while (currentEvent) {\n const currentInitiator = traceEngineData.Initiators.eventToInitiator.get(currentEvent);\n\n if (currentInitiator) {\n // Store the current initiator data, and then set the initiator to\n // be the current event, so we work back through the\n // trace and find the initiator of the initiator, and so\n // on...\n initiatorsData.push({event: currentEvent, initiator: currentInitiator});\n currentEvent = currentInitiator;\n continue;\n }\n\n if (!TraceEngine.Types.TraceEvents.isSyntheticTraceEntry(currentEvent)) {\n // If the current event is not a renderer, we have no\n // concept of a parent event, so we can bail.\n currentEvent = null;\n break;\n }\n\n const nodeForCurrentEvent = traceEngineData.Renderer.entryToNode.get(currentEvent);\n if (!nodeForCurrentEvent) {\n // Should not happen - if it does something odd is going\n // on so let's give up.\n currentEvent = null;\n break;\n }\n\n // Go up to the parent, and loop again.\n currentEvent = nodeForCurrentEvent.parent?.entry || null;\n }\n\n return initiatorsData;\n}\n\nfunction findInitiatorDataDirectSuccessors(\n traceEngineData: TraceEngine.Handlers.Types.TraceParseData,\n selectedEvent: TraceEngine.Types.TraceEvents.TraceEventData,\n ): readonly InitiatorData[] {\n const initiatorsData: InitiatorData[] = [];\n\n // Add all of the initiated events to the initiatorsData array.\n const eventsInitiatedByCurrent = traceEngineData.Initiators.initiatorToEvents.get(selectedEvent);\n if (eventsInitiatedByCurrent) {\n eventsInitiatedByCurrent.forEach(event => {\n initiatorsData.push({event: event, initiator: selectedEvent});\n });\n }\n\n return initiatorsData;\n}\n\n/**\n * Given an InitiatorData object that contains an initiator and event, this function returns\n * the closest visible ancestors. We need to apply this to each initiatorData because\n * the actual initiator or initiated event might be hidden form the flame chart.\n * If neither entry is hidden, this function returns the initial initiatorData object.\n */\nfunction getClosestVisibleInitiatorEntriesAncestors(\n initiatorData: InitiatorData, modifiedEntries: TraceEngine.Types.TraceEvents.TraceEventData[],\n hiddenEntries: TraceEngine.Types.TraceEvents.TraceEventData[],\n traceEngineData: TraceEngine.Handlers.Types.TraceParseData): InitiatorData {\n if (hiddenEntries.includes(initiatorData.event)) {\n let nextParent = traceEngineData.Renderer.entryToNode.get(initiatorData.event)?.parent;\n while (nextParent?.entry && !modifiedEntries.includes(nextParent?.entry)) {\n nextParent = nextParent.parent ?? undefined;\n }\n initiatorData.event = nextParent?.entry ?? initiatorData.event;\n initiatorData.isEntryHidden = true;\n }\n\n if (hiddenEntries.includes(initiatorData.initiator)) {\n let nextParent = traceEngineData.Renderer.entryToNode.get(initiatorData.initiator)?.parent;\n while (nextParent?.entry && !modifiedEntries.includes(nextParent?.entry)) {\n nextParent = nextParent.parent ?? undefined;\n }\n initiatorData.initiator = nextParent?.entry ?? initiatorData.initiator;\n initiatorData.isInitiatorHidden = true;\n }\n\n return initiatorData;\n}\n"]} \ No newline at end of file diff --git a/public/panels/timeline/Initiators.test.js b/public/panels/timeline/Initiators.test.js index 5144e6fa7..834757dfe 100644 --- a/public/panels/timeline/Initiators.test.js +++ b/public/panels/timeline/Initiators.test.js @@ -7,15 +7,15 @@ import * as TraceEngine from '../../models/trace/trace.js'; import { TraceLoader } from '../../testing/TraceLoader.js'; import * as Timeline from './timeline.js'; describe('Initiators', () => { - it('returns the pair of initiators', async function () { + it('returns the initiator data', async function () { const traceData = await TraceLoader.traceEngine(this, 'set-timeout-long-task.json.gz'); const timerFireEvent = Array.from(traceData.Initiators.eventToInitiator.keys()) .find(TraceEngine.Types.TraceEvents.isTraceEventTimerFire); assertNotNullOrUndefined(timerFireEvent); const timerInstallEvent = traceData.Initiators.eventToInitiator.get(timerFireEvent); assertNotNullOrUndefined(timerInstallEvent); - const initiatorPairs = Timeline.Initiators.eventInitiatorPairsToDraw(traceData, timerFireEvent, [], []); - assert.deepEqual(initiatorPairs, [{ + const initiatorData = Timeline.Initiators.initiatorsDataToDraw(traceData, timerFireEvent, [], []); + assert.deepEqual(initiatorData, [{ event: timerFireEvent, initiator: timerInstallEvent, }]); @@ -33,10 +33,10 @@ describe('Initiators', () => { assertNotNullOrUndefined(timerFireEvent); const timerInstallEvent = traceData.Initiators.eventToInitiator.get(timerFireEvent); assertNotNullOrUndefined(timerInstallEvent); - // Find the initator pairs but starting at the fibonacci() + // Find the initator data but starting at the fibonacci() // call. - const initiatorPairs = Timeline.Initiators.eventInitiatorPairsToDraw(traceData, fibonacciCall, [], []); - assert.deepEqual(initiatorPairs, [{ + const initiatorsData = Timeline.Initiators.initiatorsDataToDraw(traceData, fibonacciCall, [], []); + assert.deepEqual(initiatorsData, [{ event: timerFireEvent, initiator: timerInstallEvent, }]); @@ -49,16 +49,16 @@ describe('Initiators', () => { return TraceEngine.Types.TraceEvents.isProfileCall(entry) && entry.callFrame.functionName === 'fibonacci'; }); assertNotNullOrUndefined(fibonacciCall); - // Find the initator pairs but starting at the fibonacci() - // call. We expect to find two pairs here: + // Find the initators data but starting at the fibonacci() + // call. We expect to find two initiatorData objects here: // 1. fibonacci() ===> TimerFire caused by TimerInstall // 2. The TimerInstall from (1), caused by a prior TimerInstall. - const initiatorPairs = Timeline.Initiators.eventInitiatorPairsToDraw(traceData, fibonacciCall, [], []); - assert.lengthOf(initiatorPairs, 2); - for (const pair of initiatorPairs) { - // Ensure each pair is a TimerInstall>TimerFire pair. - assert.strictEqual(pair.event.name, "TimerFire" /* TraceEngine.Types.TraceEvents.KnownEventName.TimerFire */); - assert.strictEqual(pair.initiator.name, "TimerInstall" /* TraceEngine.Types.TraceEvents.KnownEventName.TimerInstall */); + const initiatorsData = Timeline.Initiators.initiatorsDataToDraw(traceData, fibonacciCall, [], []); + assert.lengthOf(initiatorsData, 2); + for (const initiatorData of initiatorsData) { + // Ensure each initiatorData object has TimerInstall>TimerFire event to initiator. + assert.strictEqual(initiatorData.event.name, "TimerFire" /* TraceEngine.Types.TraceEvents.KnownEventName.TimerFire */); + assert.strictEqual(initiatorData.initiator.name, "TimerInstall" /* TraceEngine.Types.TraceEvents.KnownEventName.TimerInstall */); } }); it('will walk forward to find the events initiated by the selected entry', async function () { @@ -68,15 +68,15 @@ describe('Initiators', () => { return entry.name === "TimerInstall" /* TraceEngine.Types.TraceEvents.KnownEventName.TimerInstall */; }); assertNotNullOrUndefined(timerInstall); - // Find the initator pairs starting at the TimerInstall - // call. We expect to find one pair here: + // Find the initatorData objects starting at the TimerInstall + // call. We expect to find one initatorData here: // TimerFire that was initiated by the entry we found - TimerInstall - const initiatorPairs = Timeline.Initiators.eventInitiatorPairsToDraw(traceData, timerInstall, [], []); - assert.lengthOf(initiatorPairs, 1); - for (const pair of initiatorPairs) { - // Ensure the pair is a TimerInstall>TimerFire pair. - assert.strictEqual(pair.event.name, "TimerFire" /* TraceEngine.Types.TraceEvents.KnownEventName.TimerFire */); - assert.strictEqual(pair.initiator.name, "TimerInstall" /* TraceEngine.Types.TraceEvents.KnownEventName.TimerInstall */); + const initatorsData = Timeline.Initiators.initiatorsDataToDraw(traceData, timerInstall, [], []); + assert.lengthOf(initatorsData, 1); + for (const initatorData of initatorsData) { + // Ensure each initiatorData object has TimerInstall>TimerFire event to initiator. + assert.strictEqual(initatorData.event.name, "TimerFire" /* TraceEngine.Types.TraceEvents.KnownEventName.TimerFire */); + assert.strictEqual(initatorData.initiator.name, "TimerInstall" /* TraceEngine.Types.TraceEvents.KnownEventName.TimerInstall */); } }); it('will return the closest modified ancestor as an initiator in a pair if the initiator itself is hidden', async function () { @@ -90,17 +90,17 @@ describe('Initiators', () => { // When we add TimerInstall to hidden entries list, it will be the closest modified parent and the initiator should point to it. const timerInstallParent = traceData.Renderer.entryToNode.get(timerInstall)?.parent; assertNotNullOrUndefined(timerInstallParent); - // Find the initator pairs starting at the TimerInstall - // call. We expect to find one pair here: + // Find the initatorData objects starting at the TimerInstall + // call. We expect to find one initatorData here: // TimerFire that was initiated by the entry we found - Parent of TimerInstall because TimerInstall is hidden - const initiatorPairs = Timeline.Initiators.eventInitiatorPairsToDraw(traceData, timerInstall, [timerInstall], [timerInstallParent?.entry]); - assert.lengthOf(initiatorPairs, 1); - // Ensure the pair is a TimerInstall>TimerFire parent pair. - for (const pair of initiatorPairs) { - assert.strictEqual(pair.event.name, "TimerFire" /* TraceEngine.Types.TraceEvents.KnownEventName.TimerFire */); - assert.strictEqual(pair.initiator, timerInstallParent.entry); + const initiatorsData = Timeline.Initiators.initiatorsDataToDraw(traceData, timerInstall, [timerInstall], [timerInstallParent?.entry]); + assert.lengthOf(initiatorsData, 1); + // Ensure each initiatorData object has TimerInstall>TimerFire event to initiator. + for (const initiatorData of initiatorsData) { + assert.strictEqual(initiatorData.event.name, "TimerFire" /* TraceEngine.Types.TraceEvents.KnownEventName.TimerFire */); + assert.strictEqual(initiatorData.initiator, timerInstallParent.entry); // Ensure the modified entry is marked as hidden - assert.strictEqual(pair.isInitiatorHidden, true); + assert.strictEqual(initiatorData.isInitiatorHidden, true); } }); it('will return the closest modified ancestor as an initiated event in a pair if the event itself is hidden', async function () { @@ -111,37 +111,37 @@ describe('Initiators', () => { return TraceEngine.Types.TraceEvents.isProfileCall(entry) && entry.callFrame.functionName === 'fibonacci'; }); assertNotNullOrUndefined(fibonacciCall); - // Find the initator pairs but starting at the fibonacci() - // call. We expect to find two pairs here: + // Find the initatorData objects but starting at the fibonacci() + // call. We expect to find two initiatorData objects here: // 1. fibonacci() ===> TimerFire caused by TimerInstall // 2. The TimerInstall from (1), caused by a prior TimerInstall. - let initiatorPairs = Timeline.Initiators.eventInitiatorPairsToDraw(traceData, fibonacciCall, [], []); - assert.lengthOf(initiatorPairs, 2); + let initiatorsData = Timeline.Initiators.initiatorsDataToDraw(traceData, fibonacciCall, [], []); + assert.lengthOf(initiatorsData, 2); // Save the parents of initiated events and the events themselves to get initiators again with those as modified and hidden const timerFireParents = []; const initiatedEvents = []; - for (const pair of initiatorPairs) { - // Ensure each pair is a TimerInstall>TimerFire pair. - assert.strictEqual(pair.event.name, "TimerFire" /* TraceEngine.Types.TraceEvents.KnownEventName.TimerFire */); - assert.strictEqual(pair.initiator.name, "TimerInstall" /* TraceEngine.Types.TraceEvents.KnownEventName.TimerInstall */); - const parentEvent = traceData.Renderer.entryToNode.get(pair.event)?.parent?.entry; + for (const initiatorData of initiatorsData) { + // Ensure each initiatorData object has TimerInstall>TimerFire event to initiator. + assert.strictEqual(initiatorData.event.name, "TimerFire" /* TraceEngine.Types.TraceEvents.KnownEventName.TimerFire */); + assert.strictEqual(initiatorData.initiator.name, "TimerInstall" /* TraceEngine.Types.TraceEvents.KnownEventName.TimerInstall */); + const parentEvent = traceData.Renderer.entryToNode.get(initiatorData.event)?.parent?.entry; if (parentEvent) { timerFireParents.push(parentEvent); - initiatedEvents.push(pair.event); + initiatedEvents.push(initiatorData.event); } } - // Get initiator pair again, now with the previously initiated events hidden and parents marked as modified - initiatorPairs = - Timeline.Initiators.eventInitiatorPairsToDraw(traceData, fibonacciCall, initiatedEvents, timerFireParents); + // Get initiatorData object again, now with the previously initiated events hidden and parents marked as modified + initiatorsData = + Timeline.Initiators.initiatorsDataToDraw(traceData, fibonacciCall, initiatedEvents, timerFireParents); // The length should not change, just the inititated events. - assert.lengthOf(initiatorPairs, 2); - for (let i = 0; i < initiatorPairs.length; i++) { - const pair = initiatorPairs[i]; - // Ensure each pair is a TimerInstall>TimerFire parent pair. - assert.strictEqual(pair.event, timerFireParents[i]); - assert.strictEqual(pair.initiator.name, "TimerInstall" /* TraceEngine.Types.TraceEvents.KnownEventName.TimerInstall */); + assert.lengthOf(initiatorsData, 2); + for (let i = 0; i < initiatorsData.length; i++) { + const initiatorData = initiatorsData[i]; + // Ensure each initiatorData object has TimerInstall>TimerFire event to initiator. + assert.strictEqual(initiatorData.event, timerFireParents[i]); + assert.strictEqual(initiatorData.initiator.name, "TimerInstall" /* TraceEngine.Types.TraceEvents.KnownEventName.TimerInstall */); // Ensure the modified entry is marked as hidden - assert.strictEqual(pair.isEntryHidden, true); + assert.strictEqual(initiatorData.isEntryHidden, true); } }); }); diff --git a/public/panels/timeline/Initiators.test.js.map b/public/panels/timeline/Initiators.test.js.map index 9cb76133d..f85fa6985 100644 --- a/public/panels/timeline/Initiators.test.js.map +++ b/public/panels/timeline/Initiators.test.js.map @@ -1 +1 @@ -{"version":3,"file":"Initiators.test.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/Initiators.test.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,MAAM,EAAC,MAAM,EAAC,GAAG,IAAI,CAAC;AAEtB,OAAO,EAAC,wBAAwB,EAAC,MAAM,iCAAiC,CAAC;AACzE,OAAO,KAAK,WAAW,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AE,aAAa,EAAE,eAAe,EAAE,gBAAgB,CAAC,CAAC;QAC/G,4DAA4D;QAC5D,MAAM,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;QACnC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC9C,MAAM,IAAI,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;YAC/B,4DAA4D;YAC5D,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;YACpD,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,iFAA4D,CAAC;YACnG,gDAAgD;YAChD,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;SAC9C;IACH,CAAC,CAAC,CAAC;AACR,CAAC,CAAC,CAAC","sourcesContent":["// Copyright 2023 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nconst {assert} = chai;\n\nimport {assertNotNullOrUndefined} from '../../core/platform/platform.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport {TraceLoader} from '../../testing/TraceLoader.js';\nimport * as Timeline from './timeline.js';\n\ndescribe('Initiators', () => {\n it('returns the pair of initiators', async function() {\n const traceData = await TraceLoader.traceEngine(this, 'set-timeout-long-task.json.gz');\n\n const timerFireEvent = Array.from(traceData.Initiators.eventToInitiator.keys())\n .find(TraceEngine.Types.TraceEvents.isTraceEventTimerFire);\n assertNotNullOrUndefined(timerFireEvent);\n const timerInstallEvent = traceData.Initiators.eventToInitiator.get(timerFireEvent);\n assertNotNullOrUndefined(timerInstallEvent);\n const initiatorPairs = Timeline.Initiators.eventInitiatorPairsToDraw(traceData, timerFireEvent, [], []);\n\n assert.deepEqual(initiatorPairs, [{\n event: timerFireEvent,\n initiator: timerInstallEvent,\n }]);\n });\n\n it('can walk up the tree to find the first parent with an initiator', async function() {\n const traceData = await TraceLoader.traceEngine(this, 'set-timeout-long-task.json.gz');\n\n // Find any of the fibonnaci() calls; they have a parent\n // event (TimerFire) that has an initiator.\n const fibonacciCall = traceData.Renderer.allTraceEntries.find(entry => {\n return TraceEngine.Types.TraceEvents.isProfileCall(entry) && entry.callFrame.functionName === 'fibonacci';\n });\n assertNotNullOrUndefined(fibonacciCall);\n\n const timerFireEvent = Array.from(traceData.Initiators.eventToInitiator.keys())\n .find(TraceEngine.Types.TraceEvents.isTraceEventTimerFire);\n assertNotNullOrUndefined(timerFireEvent);\n const timerInstallEvent = traceData.Initiators.eventToInitiator.get(timerFireEvent);\n assertNotNullOrUndefined(timerInstallEvent);\n\n // Find the initator pairs but starting at the fibonacci()\n // call.\n const initiatorPairs = Timeline.Initiators.eventInitiatorPairsToDraw(traceData, fibonacciCall, [], []);\n\n assert.deepEqual(initiatorPairs, [{\n event: timerFireEvent,\n initiator: timerInstallEvent,\n }]);\n });\n\n it('will walk back through the initiators to find the entire chain', async function() {\n const traceData = await TraceLoader.traceEngine(this, 'nested-initiators.json.gz');\n\n // Find any of the fibonnaci() calls; they have a parent\n // event (TimerFire) that has an initiator.\n const fibonacciCall = traceData.Renderer.allTraceEntries.find(entry => {\n return TraceEngine.Types.TraceEvents.isProfileCall(entry) && entry.callFrame.functionName === 'fibonacci';\n });\n assertNotNullOrUndefined(fibonacciCall);\n\n // Find the initator pairs but starting at the fibonacci()\n // call. We expect to find two pairs here:\n // 1. fibonacci() ===> TimerFire caused by TimerInstall\n // 2. The TimerInstall from (1), caused by a prior TimerInstall.\n const initiatorPairs = Timeline.Initiators.eventInitiatorPairsToDraw(traceData, fibonacciCall, [], []);\n\n assert.lengthOf(initiatorPairs, 2);\n for (const pair of initiatorPairs) {\n // Ensure each pair is a TimerInstall>TimerFire pair.\n assert.strictEqual(pair.event.name, TraceEngine.Types.TraceEvents.KnownEventName.TimerFire);\n assert.strictEqual(pair.initiator.name, TraceEngine.Types.TraceEvents.KnownEventName.TimerInstall);\n }\n });\n\n it('will walk forward to find the events initiated by the selected entry', async function() {\n const traceData = await TraceLoader.traceEngine(this, 'nested-initiators.json.gz');\n\n // Find any of the InstallTimer calls; they initiate other events.\n const timerInstall = traceData.Renderer.allTraceEntries.find(entry => {\n return entry.name === TraceEngine.Types.TraceEvents.KnownEventName.TimerInstall;\n });\n assertNotNullOrUndefined(timerInstall);\n\n // Find the initator pairs starting at the TimerInstall\n // call. We expect to find one pair here:\n // TimerFire that was initiated by the entry we found - TimerInstall\n\n const initiatorPairs = Timeline.Initiators.eventInitiatorPairsToDraw(traceData, timerInstall, [], []);\n\n assert.lengthOf(initiatorPairs, 1);\n for (const pair of initiatorPairs) {\n // Ensure the pair is a TimerInstall>TimerFire pair.\n assert.strictEqual(pair.event.name, TraceEngine.Types.TraceEvents.KnownEventName.TimerFire);\n assert.strictEqual(pair.initiator.name, TraceEngine.Types.TraceEvents.KnownEventName.TimerInstall);\n }\n });\n\n it('will return the closest modified ancestor as an initiator in a pair if the initiator itself is hidden',\n async function() {\n const traceData = await TraceLoader.traceEngine(this, 'nested-initiators.json.gz');\n\n // Find any of the InstallTimer calls; they initiate other events.\n const timerInstall = traceData.Renderer.allTraceEntries.find(entry => {\n return entry.name === TraceEngine.Types.TraceEvents.KnownEventName.TimerInstall;\n });\n assertNotNullOrUndefined(timerInstall);\n // Get the parent of InstallTimer to add to the modified events array.\n // When we add TimerInstall to hidden entries list, it will be the closest modified parent and the initiator should point to it.\n const timerInstallParent = traceData.Renderer.entryToNode.get(timerInstall)?.parent;\n assertNotNullOrUndefined(timerInstallParent);\n\n // Find the initator pairs starting at the TimerInstall\n // call. We expect to find one pair here:\n // TimerFire that was initiated by the entry we found - Parent of TimerInstall because TimerInstall is hidden\n const initiatorPairs = Timeline.Initiators.eventInitiatorPairsToDraw(\n traceData, timerInstall, [timerInstall], [timerInstallParent?.entry]);\n\n assert.lengthOf(initiatorPairs, 1);\n // Ensure the pair is a TimerInstall>TimerFire parent pair.\n for (const pair of initiatorPairs) {\n assert.strictEqual(pair.event.name, TraceEngine.Types.TraceEvents.KnownEventName.TimerFire);\n assert.strictEqual(pair.initiator, timerInstallParent.entry);\n // Ensure the modified entry is marked as hidden\n assert.strictEqual(pair.isInitiatorHidden, true);\n }\n\n });\n\n it('will return the closest modified ancestor as an initiated event in a pair if the event itself is hidden',\n async function() {\n const traceData = await TraceLoader.traceEngine(this, 'nested-initiators.json.gz');\n\n // Find any of the fibonnaci() calls; they have a parent\n // event (TimerFire) that has an initiator.\n const fibonacciCall = traceData.Renderer.allTraceEntries.find(entry => {\n return TraceEngine.Types.TraceEvents.isProfileCall(entry) && entry.callFrame.functionName === 'fibonacci';\n });\n assertNotNullOrUndefined(fibonacciCall);\n\n // Find the initator pairs but starting at the fibonacci()\n // call. We expect to find two pairs here:\n // 1. fibonacci() ===> TimerFire caused by TimerInstall\n // 2. The TimerInstall from (1), caused by a prior TimerInstall.\n let initiatorPairs = Timeline.Initiators.eventInitiatorPairsToDraw(traceData, fibonacciCall, [], []);\n\n assert.lengthOf(initiatorPairs, 2);\n // Save the parents of initiated events and the events themselves to get initiators again with those as modified and hidden\n const timerFireParents: TraceEngine.Types.TraceEvents.TraceEventData[] = [];\n const initiatedEvents: TraceEngine.Types.TraceEvents.TraceEventData[] = [];\n\n for (const pair of initiatorPairs) {\n // Ensure each pair is a TimerInstall>TimerFire pair.\n assert.strictEqual(pair.event.name, TraceEngine.Types.TraceEvents.KnownEventName.TimerFire);\n assert.strictEqual(pair.initiator.name, TraceEngine.Types.TraceEvents.KnownEventName.TimerInstall);\n const parentEvent = traceData.Renderer.entryToNode.get(pair.event)?.parent?.entry;\n if (parentEvent) {\n timerFireParents.push(parentEvent);\n initiatedEvents.push(pair.event);\n }\n }\n\n // Get initiator pair again, now with the previously initiated events hidden and parents marked as modified\n initiatorPairs =\n Timeline.Initiators.eventInitiatorPairsToDraw(traceData, fibonacciCall, initiatedEvents, timerFireParents);\n // The length should not change, just the inititated events.\n assert.lengthOf(initiatorPairs, 2);\n for (let i = 0; i < initiatorPairs.length; i++) {\n const pair = initiatorPairs[i];\n // Ensure each pair is a TimerInstall>TimerFire parent pair.\n assert.strictEqual(pair.event, timerFireParents[i]);\n assert.strictEqual(pair.initiator.name, TraceEngine.Types.TraceEvents.KnownEventName.TimerInstall);\n // Ensure the modified entry is marked as hidden\n assert.strictEqual(pair.isEntryHidden, true);\n }\n });\n});\n"]} \ No newline at end of file +{"version":3,"file":"Initiators.test.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/Initiators.test.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,MAAM,EAAC,MAAM,EAAC,GAAG,IAAI,CAAC;AAEtB,OAAO,EAAC,wBAAwB,EAAC,MAAM,iCAAiC,CAAC;AACzE,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAE1C,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,EAAE,CAAC,4BAA4B,EAAE,KAAK;QACpC,MAAM,SAAS,GAAG,MAAM,WAAW,CAAC,WAAW,CAAC,IAAI,EAAE,+BAA+B,CAAC,CAAC;QAEvF,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;aACnD,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;QACtF,wBAAwB,CAAC,cAAc,CAAC,CAAC;QACzC,MAAM,iBAAiB,GAAG,SAAS,CAAC,UAAU,CAAC,gBAAgB,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QACpF,wBAAwB,CAAC,iBAAiB,CAAC,CAAC;QAC5C,MAAM,aAAa,GAAG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license that can be\n// found in the LICENSE file.\n\nconst {assert} = chai;\n\nimport {assertNotNullOrUndefined} from '../../core/platform/platform.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport {TraceLoader} from '../../testing/TraceLoader.js';\nimport * as Timeline from './timeline.js';\n\ndescribe('Initiators', () => {\n it('returns the initiator data', async function() {\n const traceData = await TraceLoader.traceEngine(this, 'set-timeout-long-task.json.gz');\n\n const timerFireEvent = Array.from(traceData.Initiators.eventToInitiator.keys())\n .find(TraceEngine.Types.TraceEvents.isTraceEventTimerFire);\n assertNotNullOrUndefined(timerFireEvent);\n const timerInstallEvent = traceData.Initiators.eventToInitiator.get(timerFireEvent);\n assertNotNullOrUndefined(timerInstallEvent);\n const initiatorData = Timeline.Initiators.initiatorsDataToDraw(traceData, timerFireEvent, [], []);\n\n assert.deepEqual(initiatorData, [{\n event: timerFireEvent,\n initiator: timerInstallEvent,\n }]);\n });\n\n it('can walk up the tree to find the first parent with an initiator', async function() {\n const traceData = await TraceLoader.traceEngine(this, 'set-timeout-long-task.json.gz');\n\n // Find any of the fibonnaci() calls; they have a parent\n // event (TimerFire) that has an initiator.\n const fibonacciCall = traceData.Renderer.allTraceEntries.find(entry => {\n return TraceEngine.Types.TraceEvents.isProfileCall(entry) && entry.callFrame.functionName === 'fibonacci';\n });\n assertNotNullOrUndefined(fibonacciCall);\n\n const timerFireEvent = Array.from(traceData.Initiators.eventToInitiator.keys())\n .find(TraceEngine.Types.TraceEvents.isTraceEventTimerFire);\n assertNotNullOrUndefined(timerFireEvent);\n const timerInstallEvent = traceData.Initiators.eventToInitiator.get(timerFireEvent);\n assertNotNullOrUndefined(timerInstallEvent);\n\n // Find the initator data but starting at the fibonacci()\n // call.\n const initiatorsData = Timeline.Initiators.initiatorsDataToDraw(traceData, fibonacciCall, [], []);\n\n assert.deepEqual(initiatorsData, [{\n event: timerFireEvent,\n initiator: timerInstallEvent,\n }]);\n });\n\n it('will walk back through the initiators to find the entire chain', async function() {\n const traceData = await TraceLoader.traceEngine(this, 'nested-initiators.json.gz');\n\n // Find any of the fibonnaci() calls; they have a parent\n // event (TimerFire) that has an initiator.\n const fibonacciCall = traceData.Renderer.allTraceEntries.find(entry => {\n return TraceEngine.Types.TraceEvents.isProfileCall(entry) && entry.callFrame.functionName === 'fibonacci';\n });\n assertNotNullOrUndefined(fibonacciCall);\n\n // Find the initators data but starting at the fibonacci()\n // call. We expect to find two initiatorData objects here:\n // 1. fibonacci() ===> TimerFire caused by TimerInstall\n // 2. The TimerInstall from (1), caused by a prior TimerInstall.\n const initiatorsData = Timeline.Initiators.initiatorsDataToDraw(traceData, fibonacciCall, [], []);\n\n assert.lengthOf(initiatorsData, 2);\n for (const initiatorData of initiatorsData) {\n // Ensure each initiatorData object has TimerInstall>TimerFire event to initiator.\n assert.strictEqual(initiatorData.event.name, TraceEngine.Types.TraceEvents.KnownEventName.TimerFire);\n assert.strictEqual(initiatorData.initiator.name, TraceEngine.Types.TraceEvents.KnownEventName.TimerInstall);\n }\n });\n\n it('will walk forward to find the events initiated by the selected entry', async function() {\n const traceData = await TraceLoader.traceEngine(this, 'nested-initiators.json.gz');\n\n // Find any of the InstallTimer calls; they initiate other events.\n const timerInstall = traceData.Renderer.allTraceEntries.find(entry => {\n return entry.name === TraceEngine.Types.TraceEvents.KnownEventName.TimerInstall;\n });\n assertNotNullOrUndefined(timerInstall);\n\n // Find the initatorData objects starting at the TimerInstall\n // call. We expect to find one initatorData here:\n // TimerFire that was initiated by the entry we found - TimerInstall\n\n const initatorsData = Timeline.Initiators.initiatorsDataToDraw(traceData, timerInstall, [], []);\n\n assert.lengthOf(initatorsData, 1);\n for (const initatorData of initatorsData) {\n // Ensure each initiatorData object has TimerInstall>TimerFire event to initiator.\n assert.strictEqual(initatorData.event.name, TraceEngine.Types.TraceEvents.KnownEventName.TimerFire);\n assert.strictEqual(initatorData.initiator.name, TraceEngine.Types.TraceEvents.KnownEventName.TimerInstall);\n }\n });\n\n it('will return the closest modified ancestor as an initiator in a pair if the initiator itself is hidden',\n async function() {\n const traceData = await TraceLoader.traceEngine(this, 'nested-initiators.json.gz');\n\n // Find any of the InstallTimer calls; they initiate other events.\n const timerInstall = traceData.Renderer.allTraceEntries.find(entry => {\n return entry.name === TraceEngine.Types.TraceEvents.KnownEventName.TimerInstall;\n });\n assertNotNullOrUndefined(timerInstall);\n // Get the parent of InstallTimer to add to the modified events array.\n // When we add TimerInstall to hidden entries list, it will be the closest modified parent and the initiator should point to it.\n const timerInstallParent = traceData.Renderer.entryToNode.get(timerInstall)?.parent;\n assertNotNullOrUndefined(timerInstallParent);\n\n // Find the initatorData objects starting at the TimerInstall\n // call. We expect to find one initatorData here:\n // TimerFire that was initiated by the entry we found - Parent of TimerInstall because TimerInstall is hidden\n const initiatorsData = Timeline.Initiators.initiatorsDataToDraw(\n traceData, timerInstall, [timerInstall], [timerInstallParent?.entry]);\n\n assert.lengthOf(initiatorsData, 1);\n // Ensure each initiatorData object has TimerInstall>TimerFire event to initiator.\n for (const initiatorData of initiatorsData) {\n assert.strictEqual(initiatorData.event.name, TraceEngine.Types.TraceEvents.KnownEventName.TimerFire);\n assert.strictEqual(initiatorData.initiator, timerInstallParent.entry);\n // Ensure the modified entry is marked as hidden\n assert.strictEqual(initiatorData.isInitiatorHidden, true);\n }\n\n });\n\n it('will return the closest modified ancestor as an initiated event in a pair if the event itself is hidden',\n async function() {\n const traceData = await TraceLoader.traceEngine(this, 'nested-initiators.json.gz');\n\n // Find any of the fibonnaci() calls; they have a parent\n // event (TimerFire) that has an initiator.\n const fibonacciCall = traceData.Renderer.allTraceEntries.find(entry => {\n return TraceEngine.Types.TraceEvents.isProfileCall(entry) && entry.callFrame.functionName === 'fibonacci';\n });\n assertNotNullOrUndefined(fibonacciCall);\n\n // Find the initatorData objects but starting at the fibonacci()\n // call. We expect to find two initiatorData objects here:\n // 1. fibonacci() ===> TimerFire caused by TimerInstall\n // 2. The TimerInstall from (1), caused by a prior TimerInstall.\n let initiatorsData = Timeline.Initiators.initiatorsDataToDraw(traceData, fibonacciCall, [], []);\n\n assert.lengthOf(initiatorsData, 2);\n // Save the parents of initiated events and the events themselves to get initiators again with those as modified and hidden\n const timerFireParents: TraceEngine.Types.TraceEvents.TraceEventData[] = [];\n const initiatedEvents: TraceEngine.Types.TraceEvents.TraceEventData[] = [];\n\n for (const initiatorData of initiatorsData) {\n // Ensure each initiatorData object has TimerInstall>TimerFire event to initiator.\n assert.strictEqual(initiatorData.event.name, TraceEngine.Types.TraceEvents.KnownEventName.TimerFire);\n assert.strictEqual(initiatorData.initiator.name, TraceEngine.Types.TraceEvents.KnownEventName.TimerInstall);\n const parentEvent = traceData.Renderer.entryToNode.get(initiatorData.event)?.parent?.entry;\n if (parentEvent) {\n timerFireParents.push(parentEvent);\n initiatedEvents.push(initiatorData.event);\n }\n }\n\n // Get initiatorData object again, now with the previously initiated events hidden and parents marked as modified\n initiatorsData =\n Timeline.Initiators.initiatorsDataToDraw(traceData, fibonacciCall, initiatedEvents, timerFireParents);\n // The length should not change, just the inititated events.\n assert.lengthOf(initiatorsData, 2);\n for (let i = 0; i < initiatorsData.length; i++) {\n const initiatorData = initiatorsData[i];\n // Ensure each initiatorData object has TimerInstall>TimerFire event to initiator.\n assert.strictEqual(initiatorData.event, timerFireParents[i]);\n assert.strictEqual(initiatorData.initiator.name, TraceEngine.Types.TraceEvents.KnownEventName.TimerInstall);\n // Ensure the modified entry is marked as hidden\n assert.strictEqual(initiatorData.isEntryHidden, true);\n }\n });\n});\n"]} \ No newline at end of file diff --git a/public/panels/timeline/TimelineFlameChartDataProvider.d.ts b/public/panels/timeline/TimelineFlameChartDataProvider.d.ts index 9ae421da1..beb9e7830 100644 --- a/public/panels/timeline/TimelineFlameChartDataProvider.d.ts +++ b/public/panels/timeline/TimelineFlameChartDataProvider.d.ts @@ -107,7 +107,7 @@ export declare class TimelineFlameChartDataProvider extends Common.ObjectWrapper entryIndexForSelection(selection: TimelineSelection | null): number; getIndexForEvent(targetEvent: TraceEngine.Types.TraceEvents.TraceEventData): number | null; /** - * Build the pairs of initiators and initiated entries. + * Build the data for initiators and initiated entries. * @param entryIndex * @returns if we should re-render the flame chart (canvas) */ diff --git a/public/panels/timeline/TimelineFlameChartDataProvider.js b/public/panels/timeline/TimelineFlameChartDataProvider.js index c94dedcbf..8cdb80831 100644 --- a/public/panels/timeline/TimelineFlameChartDataProvider.js +++ b/public/panels/timeline/TimelineFlameChartDataProvider.js @@ -40,7 +40,7 @@ import * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js'; import { ActiveFilters } from './ActiveFilters.js'; import { CompatibilityTracksAppender } from './CompatibilityTracksAppender.js'; import * as Components from './components/components.js'; -import { eventInitiatorPairsToDraw } from './Initiators.js'; +import { initiatorsDataToDraw } from './Initiators.js'; import { ThreadAppender } from './ThreadAppender.js'; import timelineFlamechartPopoverStyles from './timelineFlamechartPopover.css.js'; import { FlameChartStyle, Selection } from './TimelineFlameChartView.js'; @@ -151,7 +151,6 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW #eventToDisallowRoot = new WeakMap(); #font; #eventIndexByEvent = new WeakMap(); - #eventsWithCircleDecorationIndexes = []; constructor() { super(); this.reset(); @@ -461,24 +460,6 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW decorationsForEvent.push(decoration); this.timelineDataInternal.entryDecorations[eventIndex] = decorationsForEvent; } - /** - * Removes all circle decorations that indicate - * that the initiator or initiated entry are hidden. - * Remove them every time a new entry is chosen. - */ - #removeAllCollapsedFlowEventsDecorations() { - this.#eventsWithCircleDecorationIndexes.forEach(index => { - if (!this.timelineDataInternal) { - return; - } - let decorationsForEvent = this.timelineDataInternal.entryDecorations[index] || []; - decorationsForEvent = decorationsForEvent.filter(decorationIter => { - return decorationIter.type !== "INITIATOR_ENTRY_HIDDEN" /* PerfUI.FlameChart.FlameChartDecorationType.INITIATOR_HIDDEN_CIRCLE */; - }); - this.timelineDataInternal.entryDecorations[index] = decorationsForEvent; - }); - this.#eventsWithCircleDecorationIndexes = []; - } /** * Appends a track in the flame chart using the legacy system. * @param track the legacy track to be rendered. @@ -1201,6 +1182,15 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW if (this.lastSelection && this.lastSelection.timelineSelection.object === selection.object) { return this.lastSelection.entryIndex; } + // If the index is -1 and the selection is a TraceEvent, it might be + // the case that this Entry is hidden by the Context Menu action. + // Try revealing the entry and getting the index again. + if (this.entryData.indexOf(selection.object) === -1 && TimelineSelection.isTraceEventSelection(selection.object)) { + if (this.timelineDataInternal?.selectedGroup) { + this.compatibilityTracksAppender?.revealEntry(this.timelineDataInternal?.selectedGroup, selection.object); + this.timelineData(true); + } + } const index = this.entryData.indexOf(selection.object); if (index !== -1) { this.lastSelection = new Selection(selection, index); @@ -1224,7 +1214,7 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW return result; } /** - * Build the pairs of initiators and initiated entries. + * Build the data for initiators and initiated entries. * @param entryIndex * @returns if we should re-render the flame chart (canvas) */ @@ -1242,14 +1232,13 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW return false; } // Remove all previously assigned decorations indicating that the flow event entries are hidden - this.#removeAllCollapsedFlowEventsDecorations(); - const previousInitiatorPairsLength = this.timelineDataInternal.initiatorPairs.length; + const previousInitiatorsDataLength = this.timelineDataInternal.initiatorsData.length; // |entryIndex| equals -1 means there is no entry selected, just clear the // initiator cache if there is any previous arrow and return true to // re-render. if (entryIndex === -1) { this.lastInitiatorEntry = entryIndex; - if (previousInitiatorPairsLength === 0) { + if (previousInitiatorsDataLength === 0) { // This means there is no arrow before, so we don't need to re-render. return false; } @@ -1278,27 +1267,23 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW modifiedEntries = this.compatibilityTracksAppender?.getModifiedEntries(this.timelineDataInternal.selectedGroup) ?? []; } - const initiatorPairs = eventInitiatorPairsToDraw(this.traceEngineData, event, hiddenEvents, modifiedEntries); + const initiatorsData = initiatorsDataToDraw(this.traceEngineData, event, hiddenEvents, modifiedEntries); // This means there is no change for arrows. - if (previousInitiatorPairsLength === 0 && initiatorPairs.length === 0) { + if (previousInitiatorsDataLength === 0 && initiatorsData.length === 0) { return false; } - for (const pair of initiatorPairs) { - const eventIndex = this.getIndexForEvent(pair.event); - const initiatorIndex = this.getIndexForEvent(pair.initiator); + for (const intiatorData of initiatorsData) { + const eventIndex = this.getIndexForEvent(intiatorData.event); + const initiatorIndex = this.getIndexForEvent(intiatorData.initiator); if (eventIndex === null || initiatorIndex === null) { continue; } - this.timelineDataInternal.initiatorPairs.push({ initiatorIndex, eventIndex }); - // Add a decoration of a circle around the 'collapse arrow' to show that the entry is hidden - if (pair.isEntryHidden) { - this.#addDecorationToEvent(this.entryData.indexOf(pair.event), { type: "INITIATOR_ENTRY_HIDDEN" /* PerfUI.FlameChart.FlameChartDecorationType.INITIATOR_HIDDEN_CIRCLE */ }); - this.#eventsWithCircleDecorationIndexes.push(this.entryData.indexOf(pair.event)); - } - if (pair.isInitiatorHidden) { - this.#addDecorationToEvent(this.entryData.indexOf(pair.initiator), { type: "INITIATOR_ENTRY_HIDDEN" /* PerfUI.FlameChart.FlameChartDecorationType.INITIATOR_HIDDEN_CIRCLE */ }); - this.#eventsWithCircleDecorationIndexes.push(this.entryData.indexOf(pair.initiator)); - } + this.timelineDataInternal.initiatorsData.push({ + initiatorIndex, + eventIndex, + isInitiatorHidden: intiatorData.isInitiatorHidden, + isEntryHidden: intiatorData.isEntryHidden, + }); } return true; } diff --git a/public/panels/timeline/TimelineFlameChartDataProvider.js.map b/public/panels/timeline/TimelineFlameChartDataProvider.js.map index d52c64418..b0e516d3a 100644 --- a/public/panels/timeline/TimelineFlameChartDataProvider.js.map +++ b/public/panels/timeline/TimelineFlameChartDataProvider.js.map @@ -1 +1 @@ -{"version":3,"file":"TimelineFlameChartDataProvider.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/TimelineFlameChartDataProvider.ts"],"names":[],"mappings":"AAAA;;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SAAS,kCAAoB,EAAE;YACjC,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,CAA6B,CAAC;SAC/D;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,oBAAoB,CAAC,aAAyD;QAC5E,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED,kCAAkC;IAClC,6DAA6D;IAC7D,IAAI,gBAAgB;QAClB,OAAO,IAAI,CAAC,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,6BAA6B,GAAG,KAAK,CAAC","sourcesContent":["/*\n * Copyright (C) 2014 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';\n\nimport {ActiveFilters} from './ActiveFilters.js';\nimport {CompatibilityTracksAppender, type TrackAppenderName} from './CompatibilityTracksAppender.js';\nimport * as Components from './components/components.js';\nimport {type TimelineCategory} from './EventUICategory.js';\nimport {eventInitiatorPairsToDraw} from './Initiators.js';\nimport {type PerformanceModel} from './PerformanceModel.js';\nimport {ThreadAppender} from './ThreadAppender.js';\nimport timelineFlamechartPopoverStyles from './timelineFlamechartPopover.css.js';\nimport {FlameChartStyle, Selection} from './TimelineFlameChartView.js';\nimport {TimelineSelection} from './TimelineSelection.js';\nimport {TimelineUIUtils} from './TimelineUIUtils.js';\n\nconst UIStrings = {\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n */\n onIgnoreList: 'On ignore list',\n /**\n * @description Text in Timeline Flame Chart Data Provider of the Performance panel *\n * @example{example.com} PH1\n */\n mainS: 'Main — {PH1}',\n /**\n * @description Text that refers to the main target\n */\n main: 'Main',\n /**\n * @description Text in Timeline Flame Chart Data Provider of the Performance panel * @example {https://example.com} PH1\n */\n frameS: 'Frame — {PH1}',\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n */\n subframe: 'Subframe',\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n */\n raster: 'Raster',\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n *@example {2} PH1\n */\n rasterizerThreadS: 'Rasterizer Thread {PH1}',\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n */\n thread: 'Thread',\n /**\n *@description Text for rendering frames\n */\n frames: 'Frames',\n /**\n * @description Text in the Performance panel to show how long was spent in a particular part of the code.\n * The first placeholder is the total time taken for this node and all children, the second is the self time\n * (time taken in this node, without children included).\n *@example {10ms} PH1\n *@example {10ms} PH2\n */\n sSelfS: '{PH1} (self {PH2})',\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n */\n idleFrame: 'Idle Frame',\n /**\n *@description Text in Timeline Frame Chart Data Provider of the Performance panel\n */\n droppedFrame: 'Dropped Frame',\n /**\n *@description Text in Timeline Frame Chart Data Provider of the Performance panel\n */\n partiallyPresentedFrame: 'Partially Presented Frame',\n /**\n *@description Text for a rendering frame\n */\n frame: 'Frame',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelineFlameChartDataProvider.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\n// at the moment there are two types defined for trace events: traceeventdata and\n// SDK.TracingModel.Event. This is only for compatibility between the legacy system\n// and the new system proposed in go/rpp-flamechart-arch. In the future, once all\n// tracks have been migrated to the new system, all entries will be of the\n// TraceEventData type.\nexport type TimelineFlameChartEntry =\n (TraceEngine.Legacy.Event|TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame|\n TraceEngine.Types.TraceEvents.TraceEventData);\nexport class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectWrapper implements\n PerfUI.FlameChart.FlameChartDataProvider {\n private droppedFramePatternCanvas: HTMLCanvasElement;\n private partialFramePatternCanvas: HTMLCanvasElement;\n private timelineDataInternal: PerfUI.FlameChart.FlameChartTimelineData|null;\n private currentLevel: number;\n\n // The Performance and the Timeline models are expected to be\n // deprecated in favor of using traceEngineData (new RPP engine) only\n // as part of the work in crbug.com/1386091. For this reason they\n // have the \"legacy\" prefix on their name.\n private legacyPerformanceModel: PerformanceModel|null;\n private compatibilityTracksAppender: CompatibilityTracksAppender|null;\n private legacyTimelineModel: TimelineModel.TimelineModel.TimelineModelImpl|null;\n private traceEngineData: TraceEngine.Handlers.Types.TraceParseData|null;\n private isCpuProfile = false;\n /**\n * Raster threads are tracked and enumerated with this property. This is also\n * used to group all raster threads together in the same track, instead of\n * rendering a track for thread.\n */\n #rasterCount: number = 0;\n\n private minimumBoundaryInternal: number;\n private timeSpan: number;\n private readonly headerLevel1: PerfUI.FlameChart.GroupStyle;\n private readonly headerLevel2: PerfUI.FlameChart.GroupStyle;\n private readonly staticHeader: PerfUI.FlameChart.GroupStyle;\n private framesHeader: PerfUI.FlameChart.GroupStyle;\n private readonly screenshotsHeader: PerfUI.FlameChart.GroupStyle;\n private entryData!: TimelineFlameChartEntry[];\n private entryTypeByLevel!: EntryType[];\n private screenshotImageCache!: Map;\n private entryIndexToTitle!: string[];\n private asyncColorByCategory!: Map;\n private lastInitiatorEntry!: number;\n private entryParent!: TraceEngine.Legacy.Event[];\n private lastSelection?: Selection;\n private colorForEvent?: ((arg0: TraceEngine.Legacy.Event) => string);\n #eventToDisallowRoot = new WeakMap();\n #font: string;\n #eventIndexByEvent: WeakMap = new WeakMap();\n #eventsWithCircleDecorationIndexes: number[] = [];\n\n constructor() {\n super();\n this.reset();\n this.#font = `${PerfUI.Font.DEFAULT_FONT_SIZE} ${PerfUI.Font.getFontFamilyForCanvas()}`;\n this.droppedFramePatternCanvas = document.createElement('canvas');\n this.partialFramePatternCanvas = document.createElement('canvas');\n this.preparePatternCanvas();\n this.timelineDataInternal = null;\n this.currentLevel = 0;\n this.legacyPerformanceModel = null;\n this.legacyTimelineModel = null;\n this.compatibilityTracksAppender = null;\n this.traceEngineData = null;\n this.minimumBoundaryInternal = 0;\n this.timeSpan = 0;\n\n this.headerLevel1 = this.buildGroupStyle({shareHeaderLine: false});\n this.headerLevel2 = this.buildGroupStyle({padding: 2, nestingLevel: 1, collapsible: false});\n this.staticHeader = this.buildGroupStyle({collapsible: false});\n this.framesHeader = this.buildGroupStyle({useFirstLineForOverview: true});\n this.screenshotsHeader =\n this.buildGroupStyle({useFirstLineForOverview: true, nestingLevel: 1, collapsible: false, itemsHeight: 150});\n\n ThemeSupport.ThemeSupport.instance().addEventListener(ThemeSupport.ThemeChangeEvent.eventName, () => {\n const headers = [\n this.headerLevel1,\n this.headerLevel2,\n this.staticHeader,\n this.framesHeader,\n this.screenshotsHeader,\n ];\n for (const header of headers) {\n header.color = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-on-surface');\n header.backgroundColor =\n ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container');\n }\n });\n }\n\n modifyTree(group: PerfUI.FlameChart.Group, node: number, action: TraceEngine.EntriesFilter.FilterAction): void {\n const entry = this.entryData[node] as TraceEngine.Types.TraceEvents.SyntheticTraceEntry;\n this.compatibilityTracksAppender?.modifyTree(group, entry, action);\n }\n\n findPossibleContextMenuActions(group: PerfUI.FlameChart.Group, node: number):\n TraceEngine.EntriesFilter.PossibleFilterActions|void {\n const entry = this.entryData[node] as TraceEngine.Types.TraceEvents.SyntheticTraceEntry;\n return this.compatibilityTracksAppender?.findPossibleContextMenuActions(group, entry);\n }\n\n private buildGroupStyle(extra: Object): PerfUI.FlameChart.GroupStyle {\n const defaultGroupStyle = {\n padding: 4,\n height: 17,\n collapsible: true,\n color: ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-on-surface'),\n backgroundColor: ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container'),\n nestingLevel: 0,\n shareHeaderLine: true,\n };\n return Object.assign(defaultGroupStyle, extra);\n }\n\n setModel(\n performanceModel: PerformanceModel|null, newTraceEngineData: TraceEngine.Handlers.Types.TraceParseData|null,\n isCpuProfile = false): void {\n this.reset();\n this.legacyPerformanceModel = performanceModel;\n this.legacyTimelineModel = performanceModel && performanceModel.timelineModel();\n this.traceEngineData = newTraceEngineData;\n\n this.isCpuProfile = isCpuProfile;\n if (newTraceEngineData) {\n const {traceBounds} = newTraceEngineData.Meta;\n const minTime = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(traceBounds.min);\n const maxTime = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(traceBounds.max);\n this.minimumBoundaryInternal = minTime;\n this.timeSpan = minTime === maxTime ? 1000 : maxTime - this.minimumBoundaryInternal;\n }\n }\n\n /**\n * Instances and caches a CompatibilityTracksAppender using the\n * internal flame chart data and the trace parsed data coming from the\n * trace engine.\n * The model data must have been set to the data provider instance before\n * attempting to instance the CompatibilityTracksAppender.\n */\n compatibilityTracksAppenderInstance(forceNew = false): CompatibilityTracksAppender {\n if (!this.compatibilityTracksAppender || forceNew) {\n if (!this.traceEngineData || !this.legacyTimelineModel) {\n throw new Error(\n 'Attempted to instantiate a CompatibilityTracksAppender without having set the trace parse data first.');\n }\n this.timelineDataInternal = this.#instantiateTimelineData();\n this.compatibilityTracksAppender = new CompatibilityTracksAppender(\n this.timelineDataInternal, this.traceEngineData, this.entryData, this.entryTypeByLevel,\n this.legacyTimelineModel);\n }\n return this.compatibilityTracksAppender;\n }\n\n /**\n * Returns the instance of the timeline flame chart data, without\n * adding data to it. In case the timeline data hasn't been instanced\n * creates a new instance and returns it.\n */\n #instantiateTimelineData(): PerfUI.FlameChart.FlameChartTimelineData {\n if (!this.timelineDataInternal) {\n this.timelineDataInternal = PerfUI.FlameChart.FlameChartTimelineData.createEmpty();\n }\n return this.timelineDataInternal;\n }\n\n /**\n * Builds the flame chart data using the track appenders\n */\n buildFromTrackAppenders(options?: {filterThreadsByName?: string, expandedTracks?: Set}): void {\n if (!this.compatibilityTracksAppender) {\n return;\n }\n const appenders = this.compatibilityTracksAppender.allVisibleTrackAppenders();\n for (const appender of appenders) {\n const skipThreadAppenderByName =\n appender instanceof ThreadAppender && !appender.trackName().includes(options?.filterThreadsByName || '');\n if (skipThreadAppenderByName) {\n continue;\n }\n const expanded = Boolean(options?.expandedTracks?.has(appender.appenderName));\n this.currentLevel = appender.appendTrackAtLevel(this.currentLevel, expanded);\n }\n }\n\n groupTrack(group: PerfUI.FlameChart.Group): TimelineModel.TimelineModel.Track|null {\n return group.track || null;\n }\n\n groupTreeEvents(group: PerfUI.FlameChart.Group): TraceEngine.Types.TraceEvents.TraceEventData[]|null {\n return this.compatibilityTracksAppender?.groupEventsForTreeView(group) ?? null;\n }\n\n mainFrameNavigationStartEvents(): readonly TraceEngine.Types.TraceEvents.TraceEventNavigationStart[] {\n if (!this.traceEngineData) {\n return [];\n }\n return this.traceEngineData.Meta.mainFrameNavigations;\n }\n\n entryTitle(entryIndex: number): string|null {\n const entryType = this.entryType(entryIndex);\n if (entryType === EntryType.Event) {\n const event = (this.entryData[entryIndex] as TraceEngine.Legacy.Event);\n if (event.phase === TraceEngine.Types.TraceEvents.Phase.ASYNC_STEP_INTO ||\n event.phase === TraceEngine.Types.TraceEvents.Phase.ASYNC_STEP_PAST) {\n return event.name + ':' + event.args['step'];\n }\n if (this.#eventToDisallowRoot.get(event)) {\n return i18nString(UIStrings.onIgnoreList);\n }\n return TimelineUIUtils.eventTitle(event);\n }\n if (entryType === EntryType.Screenshot) {\n return '';\n }\n if (entryType === EntryType.TrackAppender) {\n const timelineData = (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData);\n const eventLevel = timelineData.entryLevels[entryIndex];\n const event = (this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData);\n return this.compatibilityTracksAppender?.titleForEvent(event, eventLevel) || null;\n }\n let title: Common.UIString.LocalizedString|string = this.entryIndexToTitle[entryIndex];\n if (!title) {\n title = `Unexpected entryIndex ${entryIndex}`;\n console.error(title);\n }\n return title;\n }\n\n textColor(index: number): string {\n const event = this.entryData[index];\n if (!TimelineFlameChartDataProvider.isEntryRegularEvent(event)) {\n return FlameChartStyle.textColor;\n }\n return this.isIgnoreListedEvent(event) ? '#888' : FlameChartStyle.textColor;\n }\n\n entryFont(_index: number): string|null {\n return this.#font;\n }\n\n // resetCompatibilityTracksAppender boolean set to false does not recreate the thread appenders\n reset(resetCompatibilityTracksAppender: boolean = true): void {\n this.currentLevel = 0;\n this.entryData = [];\n this.entryParent = [];\n this.entryTypeByLevel = [];\n this.entryIndexToTitle = [];\n this.asyncColorByCategory = new Map();\n this.screenshotImageCache = new Map();\n this.#eventIndexByEvent = new Map();\n this.#eventToDisallowRoot = new WeakMap();\n if (resetCompatibilityTracksAppender) {\n this.compatibilityTracksAppender = null;\n this.timelineDataInternal = null;\n } else if (!resetCompatibilityTracksAppender && this.timelineDataInternal) {\n this.compatibilityTracksAppender?.setFlameChartDataAndEntryData(\n this.timelineDataInternal, this.entryData, this.entryTypeByLevel);\n this.compatibilityTracksAppender?.threadAppenders().forEach(\n threadAppender => threadAppender.setHeaderAppended(false));\n }\n }\n\n maxStackDepth(): number {\n return this.currentLevel;\n }\n\n /**\n * Builds the flame chart data using the tracks appender (which use\n * the new trace engine) and the legacy code paths present in this\n * file. The result built data is cached and returned.\n */\n timelineData(rebuild: boolean = false): PerfUI.FlameChart.FlameChartTimelineData {\n if (this.timelineDataInternal && this.timelineDataInternal.entryLevels.length !== 0 && !rebuild) {\n // The flame chart data is built already, so return the cached\n // data.\n return this.timelineDataInternal;\n }\n\n this.timelineDataInternal = PerfUI.FlameChart.FlameChartTimelineData.createEmpty();\n if (!this.legacyTimelineModel) {\n return this.timelineDataInternal;\n }\n\n if (rebuild) {\n this.reset(/* resetCompatibilityTracksAppender= */ false);\n }\n\n this.currentLevel = 0;\n\n if (this.traceEngineData) {\n this.compatibilityTracksAppender = this.compatibilityTracksAppenderInstance();\n if (this.traceEngineData.Meta.traceIsGeneric) {\n this.#processGenericTrace();\n } else {\n this.processInspectorTrace();\n }\n }\n\n return this.timelineDataInternal;\n }\n\n #processGenericTrace(): void {\n if (!this.compatibilityTracksAppender) {\n return;\n }\n\n const appendersByProcess = this.compatibilityTracksAppender.allThreadAppendersByProcess();\n\n for (const [pid, threadAppenders] of appendersByProcess) {\n const processGroupStyle = this.buildGroupStyle({shareHeaderLine: false});\n const processName = this.traceEngineData?.Meta.processNames.get(pid)?.args.name || 'Process';\n this.appendHeader(`${processName} (${pid})`, processGroupStyle, true, false);\n for (const appender of threadAppenders) {\n appender.setHeaderNestingLevel(1);\n this.currentLevel = appender.appendTrackAtLevel(this.currentLevel);\n }\n }\n }\n\n private processInspectorTrace(): void {\n if (!this.isCpuProfile) {\n this.appendFrames();\n }\n\n const weight = (track: {type?: string, forMainFrame?: boolean, appenderName?: TrackAppenderName}): number => {\n if (track.appenderName !== undefined) {\n switch (track.appenderName) {\n case 'Animations':\n return 0;\n case 'Timings':\n return 1;\n case 'Interactions':\n return 2;\n case 'LayoutShifts':\n return 3;\n case 'GPU':\n return 8;\n case 'Thread':\n return 4;\n case 'Thread_AuctionWorklet':\n return 10;\n default:\n return -1;\n }\n }\n\n switch (track.type) {\n case TimelineModel.TimelineModel.TrackType.MainThread:\n return track.forMainFrame ? 5 : 6;\n case TimelineModel.TimelineModel.TrackType.Worker:\n return 7;\n case TimelineModel.TimelineModel.TrackType.Raster:\n return 9;\n case TimelineModel.TimelineModel.TrackType.Other:\n return 11;\n default:\n return -1;\n }\n };\n\n if (!this.legacyTimelineModel) {\n return;\n }\n const allTrackAppenders =\n this.compatibilityTracksAppender ? this.compatibilityTracksAppender.allVisibleTrackAppenders() : [];\n\n allTrackAppenders.sort((a, b) => weight(a) - weight(b));\n\n for (const appender of allTrackAppenders) {\n if (!this.traceEngineData) {\n continue;\n }\n\n this.currentLevel = appender.appendTrackAtLevel(this.currentLevel);\n\n // If there is not a selected group, we want to default to selecting the\n // main thread track. Therefore in this check we look to see if the\n // current appender is a ThreadAppender and represnets the Main Thread.\n // If it is, we mark the group as selected.\n if (this.timelineDataInternal && !this.timelineDataInternal.selectedGroup) {\n if (appender instanceof ThreadAppender &&\n (appender.threadType === TraceEngine.Handlers.Threads.ThreadType.MAIN_THREAD ||\n appender.threadType === TraceEngine.Handlers.Threads.ThreadType.CPU_PROFILE)) {\n const group = this.compatibilityTracksAppender?.groupForAppender(appender);\n if (group) {\n this.timelineDataInternal.selectedGroup = group;\n }\n }\n }\n }\n if (this.timelineDataInternal && this.timelineDataInternal.selectedGroup) {\n this.timelineDataInternal.selectedGroup.expanded = true;\n }\n }\n\n #addDecorationToEvent(eventIndex: number, decoration: PerfUI.FlameChart.FlameChartDecoration): void {\n if (!this.timelineDataInternal) {\n return;\n }\n const decorationsForEvent = this.timelineDataInternal.entryDecorations[eventIndex] || [];\n decorationsForEvent.push(decoration);\n this.timelineDataInternal.entryDecorations[eventIndex] = decorationsForEvent;\n }\n\n /**\n * Removes all circle decorations that indicate\n * that the initiator or initiated entry are hidden.\n * Remove them every time a new entry is chosen.\n */\n #removeAllCollapsedFlowEventsDecorations(): void {\n this.#eventsWithCircleDecorationIndexes.forEach(index => {\n if (!this.timelineDataInternal) {\n return;\n }\n let decorationsForEvent = this.timelineDataInternal.entryDecorations[index] || [];\n decorationsForEvent = decorationsForEvent.filter(decorationIter => {\n return decorationIter.type !== PerfUI.FlameChart.FlameChartDecorationType.INITIATOR_HIDDEN_CIRCLE;\n });\n this.timelineDataInternal.entryDecorations[index] = decorationsForEvent;\n });\n this.#eventsWithCircleDecorationIndexes = [];\n }\n\n /**\n * Appends a track in the flame chart using the legacy system.\n * @param track the legacy track to be rendered.\n * @param expanded if the track is expanded.\n */\n appendLegacyTrackData(track: TimelineModel.TimelineModel.Track, expanded?: boolean): void {\n this.#instantiateTimelineData();\n const eventEntryType = EntryType.Event;\n switch (track.type) {\n case TimelineModel.TimelineModel.TrackType.MainThread: {\n if (track.forMainFrame) {\n const group = this.appendSyncEvents(\n track, track.events,\n track.url ? i18nString(UIStrings.mainS, {PH1: track.url}) : i18nString(UIStrings.main), this.headerLevel1,\n eventEntryType, true /* selectable */, expanded);\n if (group && this.timelineDataInternal) {\n this.timelineDataInternal.selectedGroup = group;\n }\n } else {\n this.appendSyncEvents(\n track, track.events,\n track.url ? i18nString(UIStrings.frameS, {PH1: track.url}) : i18nString(UIStrings.subframe),\n this.headerLevel1, eventEntryType, true /* selectable */, expanded);\n }\n break;\n }\n\n case TimelineModel.TimelineModel.TrackType.Worker: {\n this.appendSyncEvents(\n track, track.events, track.name, this.headerLevel1, eventEntryType, true /* selectable */, expanded);\n break;\n }\n\n case TimelineModel.TimelineModel.TrackType.Raster: {\n if (!this.#rasterCount) {\n this.appendHeader(i18nString(UIStrings.raster), this.headerLevel1, false /* selectable */, expanded);\n }\n ++this.#rasterCount;\n this.appendSyncEvents(\n track, track.events, i18nString(UIStrings.rasterizerThreadS, {PH1: this.#rasterCount}), this.headerLevel2,\n eventEntryType, true /* selectable */, expanded);\n break;\n }\n\n case TimelineModel.TimelineModel.TrackType.Other: {\n this.appendSyncEvents(\n track, track.events, track.name || i18nString(UIStrings.thread), this.headerLevel1, eventEntryType,\n true /* selectable */, expanded);\n this.appendAsyncEventsGroup(\n track, track.name, track.asyncEvents, this.headerLevel1, eventEntryType, true /* selectable */, expanded);\n break;\n }\n }\n }\n minimumBoundary(): number {\n return this.minimumBoundaryInternal;\n }\n\n totalTime(): number {\n return this.timeSpan;\n }\n\n /**\n * Narrows an entry of type TimelineFlameChartEntry to the 2 types of\n * simple trace events (legacy and new engine definitions).\n */\n static isEntryRegularEvent(entry: TimelineFlameChartEntry):\n entry is(TraceEngine.Types.TraceEvents.TraceEventData|TraceEngine.Legacy.Event) {\n return 'name' in entry;\n }\n\n search(startTime: number, endTime: number, filter: TimelineModel.TimelineModelFilter.TimelineModelFilter): number[] {\n const result = [];\n this.timelineData();\n for (let i = 0; i < this.entryData.length; ++i) {\n const entry = this.entryData[i];\n if (!TimelineFlameChartDataProvider.isEntryRegularEvent(entry)) {\n continue;\n }\n if (!entry) {\n continue;\n }\n\n // Until all the tracks are powered by the new engine, we need to\n // consider that these entries could be either new engine or legacy\n // engine.\n const entryStartTime = TraceEngine.Legacy.eventIsFromNewEngine(entry) ?\n TraceEngine.Helpers.Timing.eventTimingsMilliSeconds(entry).startTime :\n entry.startTime;\n const entryEndTime = TraceEngine.Legacy.eventIsFromNewEngine(entry) ?\n TraceEngine.Helpers.Timing.eventTimingsMilliSeconds(entry).endTime :\n entry.endTime;\n\n if (entryStartTime > endTime) {\n continue;\n }\n if ((entryEndTime || entryStartTime) < startTime) {\n continue;\n }\n if (filter.accept(entry, this.traceEngineData || undefined)) {\n result.push(i);\n }\n }\n result.sort((a, b) => {\n let firstEvent: TimelineFlameChartEntry|null = this.entryData[a];\n let secondEvent: TimelineFlameChartEntry|null = this.entryData[b];\n if (!TimelineFlameChartDataProvider.isEntryRegularEvent(firstEvent) ||\n !TimelineFlameChartDataProvider.isEntryRegularEvent(secondEvent)) {\n return 0;\n }\n firstEvent = firstEvent instanceof TraceEngine.Legacy.Event ?\n firstEvent :\n (this.compatibilityTracksAppender?.getLegacyEvent(firstEvent) || null);\n secondEvent = secondEvent instanceof TraceEngine.Legacy.Event ?\n secondEvent :\n (this.compatibilityTracksAppender?.getLegacyEvent(secondEvent) || null);\n if (!firstEvent || !secondEvent) {\n return 0;\n }\n return TraceEngine.Legacy.Event.compareStartTime(firstEvent, secondEvent);\n });\n return result;\n }\n\n private appendSyncEvents(\n track: TimelineModel.TimelineModel.Track|null, events: TraceEngine.Legacy.Event[], title: string|null,\n style: PerfUI.FlameChart.GroupStyle|null, entryType: EntryType, selectable: boolean,\n expanded?: boolean): PerfUI.FlameChart.Group|null {\n if (!events.length) {\n return null;\n }\n if (!this.legacyPerformanceModel || !this.legacyTimelineModel) {\n return null;\n }\n const openEvents = [];\n const ignoreListingEnabled = Root.Runtime.experiments.isEnabled('ignore-list-js-frames-on-timeline');\n let maxStackDepth = 0;\n let group: PerfUI.FlameChart.Group|null = null;\n if (track && track.type === TimelineModel.TimelineModel.TrackType.MainThread) {\n group = this.appendHeader((title as string), (style as PerfUI.FlameChart.GroupStyle), selectable, expanded);\n group.track = track;\n }\n for (let i = 0; i < events.length; ++i) {\n const event = events[i];\n const {duration: eventDuration} = TraceEngine.Legacy.timesForEventInMilliseconds(event);\n // TODO(crbug.com/1386091) this check should happen at the model level.\n // Skip Layout Shifts and TTI events when dealing with the main thread.\n if (this.legacyPerformanceModel) {\n const isInteractiveTime = this.legacyPerformanceModel.timelineModel().isInteractiveTimeEvent(event);\n const isLayoutShift = this.legacyPerformanceModel.timelineModel().isLayoutShiftEvent(event);\n const skippableEvent = isInteractiveTime || isLayoutShift;\n\n if (track && track.type === TimelineModel.TimelineModel.TrackType.MainThread && skippableEvent) {\n continue;\n }\n }\n\n if (!TraceEngine.Types.TraceEvents.isFlowPhase(event.phase)) {\n if (!event.endTime && event.phase !== TraceEngine.Types.TraceEvents.Phase.INSTANT) {\n continue;\n }\n if (TraceEngine.Types.TraceEvents.isAsyncPhase(event.phase)) {\n continue;\n }\n if (!ActiveFilters.instance().isVisible(event)) {\n continue;\n }\n }\n // Handle events belonging to a stack. E.g. A call stack in the main thread flame chart.\n while (openEvents.length &&\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // @ts-expect-error\n ((openEvents[openEvents.length - 1] as TraceEngine.Legacy.Event).endTime) <= event.startTime) {\n openEvents.pop();\n }\n this.#eventToDisallowRoot.set(event, false);\n if (ignoreListingEnabled && this.isIgnoreListedEvent(event)) {\n const parent = openEvents[openEvents.length - 1];\n if (parent && this.#eventToDisallowRoot.get(parent)) {\n continue;\n }\n this.#eventToDisallowRoot.set(event, true);\n }\n if (!group && title) {\n group = this.appendHeader(title, (style as PerfUI.FlameChart.GroupStyle), selectable, expanded);\n if (selectable) {\n group.track = track;\n }\n }\n\n const level = this.currentLevel + openEvents.length;\n const index = this.appendEvent(event, level);\n if (openEvents.length) {\n this.entryParent[index] = (openEvents[openEvents.length - 1] as TraceEngine.Legacy.Event);\n }\n\n const trackIsMainThreadMainFrame =\n Boolean(track?.forMainFrame && track?.type === TimelineModel.TimelineModel.TrackType.MainThread);\n // If we are dealing with the Main Thread, find any long tasks and add\n // the candy striping to them. Doing it here avoids having to do another\n // pass through the events at a later point.\n if (trackIsMainThreadMainFrame && event.name === TimelineModel.TimelineModel.RecordType.Task &&\n TraceEngine.Helpers.Timing.millisecondsToMicroseconds(eventDuration) >\n TraceEngine.Handlers.ModelHandlers.Warnings.LONG_MAIN_THREAD_TASK_THRESHOLD) {\n this.#addDecorationToEvent(index, {\n type: PerfUI.FlameChart.FlameChartDecorationType.CANDY,\n startAtTime: TraceEngine.Handlers.ModelHandlers.Warnings.LONG_MAIN_THREAD_TASK_THRESHOLD,\n });\n }\n maxStackDepth = Math.max(maxStackDepth, openEvents.length + 1);\n if (event.endTime) {\n openEvents.push(event);\n }\n }\n this.entryTypeByLevel.length = this.currentLevel + maxStackDepth;\n this.entryTypeByLevel.fill(entryType, this.currentLevel);\n this.currentLevel += maxStackDepth;\n return group;\n }\n\n isIgnoreListedEvent(event: TraceEngine.Legacy.CompatibleTraceEvent): boolean {\n if (TraceEngine.Legacy.eventIsFromNewEngine(event) && TraceEngine.Types.TraceEvents.isProfileCall(event)) {\n return this.isIgnoreListedURL(event.callFrame.url as Platform.DevToolsPath.UrlString);\n }\n return false;\n }\n\n private isIgnoreListedURL(url: Platform.DevToolsPath.UrlString): boolean {\n return Bindings.IgnoreListManager.IgnoreListManager.instance().isUserIgnoreListedURL(url);\n }\n\n private appendAsyncEventsGroup(\n track: TimelineModel.TimelineModel.Track|null, title: string|null, events: TraceEngine.Legacy.AsyncEvent[],\n style: PerfUI.FlameChart.GroupStyle|null, entryType: EntryType, selectable: boolean,\n expanded?: boolean): PerfUI.FlameChart.Group|null {\n if (!events.length) {\n return null;\n }\n const lastUsedTimeByLevel: number[] = [];\n let group: PerfUI.FlameChart.Group|null = null;\n for (let i = 0; i < events.length; ++i) {\n const asyncEvent = events[i];\n if (!this.legacyPerformanceModel || !ActiveFilters.instance().isVisible(asyncEvent)) {\n continue;\n }\n if (!group && title) {\n group = this.appendHeader(title, (style as PerfUI.FlameChart.GroupStyle), selectable, expanded);\n if (selectable) {\n group.track = track;\n }\n }\n const startTime = asyncEvent.startTime;\n let level;\n for (level = 0; level < lastUsedTimeByLevel.length && lastUsedTimeByLevel[level] > startTime; ++level) {\n }\n this.appendAsyncEvent(asyncEvent, this.currentLevel + level);\n lastUsedTimeByLevel[level] = (asyncEvent.endTime as number);\n }\n this.entryTypeByLevel.length = this.currentLevel + lastUsedTimeByLevel.length;\n this.entryTypeByLevel.fill(entryType, this.currentLevel);\n this.currentLevel += lastUsedTimeByLevel.length;\n return group;\n }\n\n getEntryTypeForLevel(level: number): EntryType {\n return this.entryTypeByLevel[level];\n }\n\n private appendFrames(): void {\n if (!this.legacyPerformanceModel || !this.timelineDataInternal || !this.legacyTimelineModel ||\n !this.traceEngineData) {\n return;\n }\n\n // TODO: Long term we want to move both the Frames track and the screenshots\n // track into the TrackAppender system. However right now the frames track\n // expects data in a different form to how the new engine parses frame\n // information. Therefore we have migrated the screenshots to use the new\n // data model in place without creating a new TrackAppender. When we can\n // migrate the frames track to the new appender system, we can migrate the\n // screnshots then as well.\n const filmStrip = TraceEngine.Extras.FilmStrip.fromTraceData(this.traceEngineData);\n const hasScreenshots = filmStrip.frames.length > 0;\n\n this.framesHeader.collapsible = hasScreenshots;\n const expanded = Root.Runtime.Runtime.queryParam('flamechart-force-expand') === 'frames';\n\n this.appendHeader(i18nString(UIStrings.frames), this.framesHeader, false /* selectable */, expanded);\n\n this.entryTypeByLevel[this.currentLevel] = EntryType.Frame;\n for (const frame of this.traceEngineData.Frames.frames) {\n this.#appendNewEngineFrame(frame);\n }\n ++this.currentLevel;\n\n if (!hasScreenshots) {\n return;\n }\n this.#appendScreenshots(filmStrip);\n }\n\n #appendScreenshots(filmStrip: TraceEngine.Extras.FilmStrip.Data): void {\n if (!this.timelineDataInternal || !this.legacyTimelineModel) {\n return;\n }\n this.appendHeader('', this.screenshotsHeader, false /* selectable */);\n this.entryTypeByLevel[this.currentLevel] = EntryType.Screenshot;\n let prevTimestamp: TraceEngine.Types.Timing.MilliSeconds|undefined = undefined;\n\n for (const filmStripFrame of filmStrip.frames) {\n const screenshotTimeInMilliSeconds =\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(filmStripFrame.screenshotEvent.ts);\n this.entryData.push(filmStripFrame.screenshotEvent);\n (this.timelineDataInternal.entryLevels as number[]).push(this.currentLevel);\n (this.timelineDataInternal.entryStartTimes as number[]).push(screenshotTimeInMilliSeconds);\n if (prevTimestamp) {\n (this.timelineDataInternal.entryTotalTimes as number[]).push(screenshotTimeInMilliSeconds - prevTimestamp);\n }\n prevTimestamp = screenshotTimeInMilliSeconds;\n }\n if (filmStrip.frames.length && prevTimestamp !== undefined) {\n // Set the total time of the final screenshot so it takes up the remainder of the trace.\n (this.timelineDataInternal.entryTotalTimes as number[])\n .push(this.legacyTimelineModel.maximumRecordTime() - prevTimestamp);\n }\n ++this.currentLevel;\n }\n\n private entryType(entryIndex: number): EntryType {\n return this.entryTypeByLevel[(this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData)\n .entryLevels[entryIndex]];\n }\n\n prepareHighlightedEntryInfo(entryIndex: number): Element|null {\n let time = '';\n let title;\n let warningElements: Element[] = [];\n let nameSpanTimelineInfoTime = 'timeline-info-time';\n\n const additionalContent: HTMLElement[] = [];\n\n const entryType = this.entryType(entryIndex);\n if (entryType === EntryType.TrackAppender) {\n if (!this.compatibilityTracksAppender) {\n return null;\n }\n const event = (this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData);\n const timelineData = (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData);\n const eventLevel = timelineData.entryLevels[entryIndex];\n const highlightedEntryInfo = this.compatibilityTracksAppender.highlightedEntryInfo(event, eventLevel);\n title = highlightedEntryInfo.title;\n time = highlightedEntryInfo.formattedTime;\n warningElements = highlightedEntryInfo.warningElements || warningElements;\n if (TraceEngine.Types.TraceEvents.isSyntheticInteractionEvent(event)) {\n const breakdown = new Components.InteractionBreakdown.InteractionBreakdown();\n breakdown.entry = event;\n additionalContent.push(breakdown);\n }\n } else if (entryType === EntryType.Event) {\n const event = (this.entryData[entryIndex] as TraceEngine.Legacy.Event);\n const totalTime = event.duration;\n const selfTime = event.selfTime;\n const eps = 1e-6;\n if (typeof totalTime === 'number') {\n time = Math.abs(totalTime - selfTime) > eps && selfTime > eps ?\n i18nString(UIStrings.sSelfS, {\n PH1: i18n.TimeUtilities.millisToString(totalTime, true),\n PH2: i18n.TimeUtilities.millisToString(selfTime, true),\n }) :\n i18n.TimeUtilities.millisToString(totalTime, true);\n }\n title = this.entryTitle(entryIndex);\n\n } else if (entryType === EntryType.Frame) {\n const frame = (this.entryData[entryIndex] as TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame);\n time = i18n.TimeUtilities.preciseMillisToString(\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.duration), 1);\n\n if (frame.idle) {\n title = i18nString(UIStrings.idleFrame);\n } else if (frame.dropped) {\n if (frame.isPartial) {\n title = i18nString(UIStrings.partiallyPresentedFrame);\n } else {\n title = i18nString(UIStrings.droppedFrame);\n }\n nameSpanTimelineInfoTime = 'timeline-info-warning';\n } else {\n title = i18nString(UIStrings.frame);\n }\n } else {\n return null;\n }\n\n const element = document.createElement('div');\n const root = UI.Utils.createShadowRootWithCoreStyles(element, {\n cssFile: [timelineFlamechartPopoverStyles],\n delegatesFocus: undefined,\n });\n const contents = root.createChild('div', 'timeline-flamechart-popover');\n contents.createChild('span', nameSpanTimelineInfoTime).textContent = time;\n contents.createChild('span', 'timeline-info-title').textContent = title;\n if (warningElements) {\n for (const warningElement of warningElements) {\n warningElement.classList.add('timeline-info-warning');\n contents.appendChild(warningElement);\n }\n }\n for (const elem of additionalContent) {\n contents.appendChild(elem);\n }\n return element;\n }\n\n prepareHighlightedHiddenEntriesArrowInfo(group: PerfUI.FlameChart.Group, entryIndex: number): Element|null {\n const element = document.createElement('div');\n const root = UI.Utils.createShadowRootWithCoreStyles(element, {\n cssFile: [timelineFlamechartPopoverStyles],\n delegatesFocus: undefined,\n });\n\n const entry = this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.SyntheticTraceEntry;\n const hiddenEntriesAmount = this.compatibilityTracksAppender?.findHiddenDescendantsAmount(group, entry);\n\n if (!hiddenEntriesAmount) {\n return null;\n }\n const contents = root.createChild('div', 'timeline-flamechart-popover');\n contents.createChild('span', 'timeline-info-title').textContent = hiddenEntriesAmount + ' hidden';\n\n return element;\n }\n\n entryColor(entryIndex: number): string {\n function patchColorAndCache(cache: Map, key: KEY, lookupColor: (arg0: KEY) => string): string {\n let color = cache.get(key);\n if (color) {\n return color;\n }\n const parsedColor = lookupColor(key);\n if (!parsedColor) {\n throw new Error('Could not parse color from entry');\n }\n color = parsedColor;\n cache.set(key, color);\n return (color);\n }\n\n if (!this.legacyPerformanceModel || !this.legacyTimelineModel) {\n return '';\n }\n\n const entryType = this.entryType(entryIndex);\n if (entryType === EntryType.Event) {\n const event = (this.entryData[entryIndex] as TraceEngine.Legacy.Event);\n if (this.legacyTimelineModel.isGenericTrace()) {\n return this.genericTraceEventColor(event);\n }\n if (this.legacyPerformanceModel.timelineModel().isMarkerEvent(event)) {\n return TimelineUIUtils.markerStyleForEvent(event).color;\n }\n if (!TraceEngine.Types.TraceEvents.isAsyncPhase(event.phase) && this.colorForEvent) {\n return this.colorForEvent(event);\n }\n const category = TimelineUIUtils.eventStyle(event).category;\n return patchColorAndCache(this.asyncColorByCategory, category, () => category.getComputedColorValue());\n }\n if (entryType === EntryType.Frame) {\n return 'white';\n }\n if (entryType === EntryType.TrackAppender) {\n const timelineData = (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData);\n const eventLevel = timelineData.entryLevels[entryIndex];\n const event = (this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData);\n return this.compatibilityTracksAppender?.colorForEvent(event, eventLevel) || '';\n }\n return '';\n }\n\n private genericTraceEventColor(event: TraceEngine.Legacy.Event): string {\n const key = event.categoriesString || event.name;\n return key ? `hsl(${Platform.StringUtilities.hashCode(key) % 300 + 30}, 40%, 70%)` : '#ccc';\n }\n\n private preparePatternCanvas(): void {\n // Set the candy stripe pattern to 17px so it repeats well.\n const size = 17;\n this.droppedFramePatternCanvas.width = size;\n this.droppedFramePatternCanvas.height = size;\n\n this.partialFramePatternCanvas.width = size;\n this.partialFramePatternCanvas.height = size;\n\n const ctx = this.droppedFramePatternCanvas.getContext('2d');\n if (ctx) {\n // Make a dense solid-line pattern.\n ctx.translate(size * 0.5, size * 0.5);\n ctx.rotate(Math.PI * 0.25);\n ctx.translate(-size * 0.5, -size * 0.5);\n\n ctx.fillStyle = 'rgb(255, 255, 255)';\n for (let x = -size; x < size * 2; x += 3) {\n ctx.fillRect(x, -size, 1, size * 3);\n }\n }\n\n const ctx2 = this.partialFramePatternCanvas.getContext('2d');\n if (ctx2) {\n // Make a sparse dashed-line pattern.\n ctx2.strokeStyle = 'rgb(255, 255, 255)';\n ctx2.lineWidth = 2;\n ctx2.beginPath();\n ctx2.moveTo(17, 0);\n ctx2.lineTo(10, 7);\n ctx2.moveTo(8, 9);\n ctx2.lineTo(2, 15);\n ctx2.stroke();\n }\n }\n\n private drawFrame(\n entryIndex: number, context: CanvasRenderingContext2D, text: string|null, barX: number, barY: number,\n barWidth: number, barHeight: number): void {\n const hPadding = 1;\n const frame = (this.entryData[entryIndex] as TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame);\n barX += hPadding;\n barWidth -= 2 * hPadding;\n if (frame.idle) {\n context.fillStyle = 'white';\n } else if (frame.dropped) {\n if (frame.isPartial) {\n // For partially presented frame boxes, paint a yellow background with\n // a sparse white dashed-line pattern overlay.\n context.fillStyle = '#f0e442';\n context.fillRect(barX, barY, barWidth, barHeight);\n\n const overlay = context.createPattern(this.partialFramePatternCanvas, 'repeat');\n context.fillStyle = overlay || context.fillStyle;\n } else {\n // For dropped frame boxes, paint a red background with a dense white\n // solid-line pattern overlay.\n context.fillStyle = '#f08080';\n context.fillRect(barX, barY, barWidth, barHeight);\n\n const overlay = context.createPattern(this.droppedFramePatternCanvas, 'repeat');\n context.fillStyle = overlay || context.fillStyle;\n }\n } else {\n context.fillStyle = '#d7f0d1';\n }\n context.fillRect(barX, barY, barWidth, barHeight);\n\n const frameDurationText = i18n.TimeUtilities.preciseMillisToString(\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.duration), 1);\n const textWidth = context.measureText(frameDurationText).width;\n if (textWidth <= barWidth) {\n context.fillStyle = this.textColor(entryIndex);\n context.fillText(frameDurationText, barX + (barWidth - textWidth) / 2, barY + barHeight - 4);\n }\n }\n\n private async drawScreenshot(\n entryIndex: number, context: CanvasRenderingContext2D, barX: number, barY: number, barWidth: number,\n barHeight: number): Promise {\n const screenshot = (this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.SyntheticScreenshot);\n if (!this.screenshotImageCache.has(screenshot)) {\n this.screenshotImageCache.set(screenshot, null);\n const data = screenshot.args.dataUri;\n const image = await UI.UIUtils.loadImage(data);\n this.screenshotImageCache.set(screenshot, image);\n this.dispatchEventToListeners(Events.DataChanged);\n return;\n }\n\n const image = this.screenshotImageCache.get(screenshot);\n if (!image) {\n return;\n }\n const imageX = barX + 1;\n const imageY = barY + 1;\n const imageHeight = barHeight - 2;\n const scale = imageHeight / image.naturalHeight;\n const imageWidth = Math.floor(image.naturalWidth * scale);\n context.save();\n context.beginPath();\n context.rect(barX, barY, barWidth, barHeight);\n context.clip();\n context.drawImage(image, imageX, imageY, imageWidth, imageHeight);\n context.strokeStyle = '#ccc';\n context.strokeRect(imageX - 0.5, imageY - 0.5, Math.min(barWidth - 1, imageWidth + 1), imageHeight);\n context.restore();\n }\n\n decorateEntry(\n entryIndex: number, context: CanvasRenderingContext2D, text: string|null, barX: number, barY: number,\n barWidth: number, barHeight: number, unclippedBarX: number, timeToPixelRatio: number): boolean {\n const entryType = this.entryType(entryIndex);\n\n if (entryType === EntryType.Frame) {\n this.drawFrame(entryIndex, context, text, barX, barY, barWidth, barHeight);\n return true;\n }\n\n if (entryType === EntryType.Screenshot) {\n void this.drawScreenshot(entryIndex, context, barX, barY, barWidth, barHeight);\n return true;\n }\n\n if (entryType === EntryType.TrackAppender) {\n const entry = this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData;\n if (TraceEngine.Types.TraceEvents.isSyntheticInteractionEvent(entry)) {\n this.#drawInteractionEventWithWhiskers(\n context, entryIndex, text, entry, barX, barY, unclippedBarX, barWidth, barHeight, timeToPixelRatio);\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Draws the left and right whiskers around an interaction in the timeline.\n * @param context - the canvas that will be drawn onto\n * @param entryIndex\n * @param entryTitle - the title of the entry\n * @param entry - the entry itself\n * @param barX - the starting X pixel position of the bar representing this event. This is clipped: if the bar is off the left side of the screen, this value will be 0\n * @param barY - the starting Y pixel position of the bar representing this event.\n * @param unclippedBarXStartPixel - the starting X pixel position of the bar representing this event, not clipped. This means if the bar is off the left of the screen this will be a negative number.\n * @param barWidth - the width of the full bar in pixels\n * @param barHeight - the height of the full bar in pixels\n * @param timeToPixelRatio - the ratio required to convert a millisecond time to a pixel value.\n **/\n #drawInteractionEventWithWhiskers(\n context: CanvasRenderingContext2D, entryIndex: number, entryTitle: string|null,\n entry: TraceEngine.Types.TraceEvents.SyntheticInteractionPair, barX: number, barY: number,\n unclippedBarXStartPixel: number, barWidth: number, barHeight: number, timeToPixelRatio: number): void {\n /**\n * An interaction is drawn with whiskers as so:\n * |----------[=======]-------------|\n * => The left whisker is the event's start time (event.ts)\n * => The box start is the event's processingStart time\n * => The box end is the event's processingEnd time\n * => The right whisker is the event's end time (event.ts + event.dur)\n *\n * When we draw the event in the InteractionsAppender, we draw a huge box\n * that spans the entire of the above. So here we need to draw over the\n * rectangle that is outside of {processingStart, processingEnd} and\n * replace it with the whiskers.\n * TODO(crbug.com/1495248): rework how we draw whiskers to avoid this inefficiency\n */\n\n const beginTime = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(entry.ts);\n const entireBarEndXPixel = barX + barWidth;\n\n function timeToPixel(time: TraceEngine.Types.Timing.MicroSeconds): number {\n const timeMilli = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(time);\n return Math.floor(unclippedBarXStartPixel + (timeMilli - beginTime) * timeToPixelRatio);\n }\n\n context.save();\n\n // Clear portions of initial rect to prepare for the ticks.\n context.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container');\n let desiredBoxStartX = timeToPixel(entry.processingStart);\n const desiredBoxEndX = timeToPixel(entry.processingEnd);\n\n // If the entry has no processing time, ensure the box is 1px wide so at least it is visible.\n if (entry.processingEnd - entry.processingStart === 0) {\n desiredBoxStartX -= 1;\n }\n\n context.fillRect(barX, barY - 0.5, desiredBoxStartX - barX, barHeight);\n context.fillRect(desiredBoxEndX, barY - 0.5, entireBarEndXPixel - desiredBoxEndX, barHeight);\n\n // Draws left and right whiskers\n function drawTick(begin: number, end: number, y: number): void {\n const tickHeightPx = 6;\n context.moveTo(begin, y - tickHeightPx / 2);\n context.lineTo(begin, y + tickHeightPx / 2);\n context.moveTo(begin, y);\n context.lineTo(end, y);\n }\n\n // The left whisker starts at the enty timestamp, and continues until the start of the box (processingStart).\n const leftWhiskerX = timeToPixel(entry.ts);\n // The right whisker ends at (entry.ts + entry.dur). We draw the line from the end of the box (processingEnd).\n const rightWhiskerX = timeToPixel(TraceEngine.Types.Timing.MicroSeconds(entry.ts + entry.dur));\n context.beginPath();\n context.lineWidth = 1;\n context.strokeStyle = '#ccc';\n const lineY = Math.floor(barY + barHeight / 2) + 0.5;\n const leftTick = leftWhiskerX + 0.5;\n const rightTick = rightWhiskerX - 0.5;\n drawTick(leftTick, desiredBoxStartX, lineY);\n drawTick(rightTick, desiredBoxEndX, lineY);\n context.stroke();\n\n if (entryTitle) {\n // BarX will be set to 0 if the start of the box if off the screen to the\n // left. If this happens, the desiredBoxStartX will be negative. In that\n // case, we fallback to the BarX. This ensures that even if the box\n // starts off-screen, we draw the text at the first visible on screen\n // pixels, so the user can still see the event's title.\n const textStartX = desiredBoxStartX > 0 ? desiredBoxStartX : barX;\n context.font = this.#font;\n const textWidth = UI.UIUtils.measureTextWidth(context, entryTitle);\n\n // These numbers are duplicated from FlameChart.ts.\n const textPadding = 5;\n const textBaseline = 5;\n\n // Only draw the text if it can fit in the amount of box that is visible.\n if (textWidth <= desiredBoxEndX - textStartX + textPadding) {\n context.fillStyle = this.textColor(entryIndex);\n context.fillText(entryTitle, textStartX + textPadding, barY + barHeight - textBaseline);\n }\n }\n context.restore();\n }\n\n forceDecoration(entryIndex: number): boolean {\n const entryType = this.entryType(entryIndex);\n if (entryType === EntryType.Frame) {\n return true;\n }\n if (entryType === EntryType.Screenshot) {\n return true;\n }\n\n if (entryType === EntryType.Event) {\n // TODO: this entryType can no longer exist as all tracks are now\n // migrated to appenders. This can be removed as part of the old engine\n // removal.\n return false;\n }\n const event = (this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData);\n\n if (TraceEngine.Types.TraceEvents.isSyntheticInteractionEvent(event)) {\n // We draw interactions with whiskers, which are done via the\n // decorateEntry() method, hence we always want to force these to be\n // decorated.\n return true;\n }\n return Boolean(this.traceEngineData?.Warnings.perEvent.get(event));\n }\n\n private appendHeader(title: string, style: PerfUI.FlameChart.GroupStyle, selectable: boolean, expanded?: boolean):\n PerfUI.FlameChart.Group {\n const group =\n ({startLevel: this.currentLevel, name: title, style: style, selectable: selectable, expanded} as\n PerfUI.FlameChart.Group);\n (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData).groups.push(group);\n return group;\n }\n\n private appendEvent(event: TraceEngine.Legacy.Event, level: number): number {\n const index = this.entryData.length;\n this.entryData.push(event);\n const timelineData = (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData);\n timelineData.entryLevels[index] = level;\n timelineData.entryTotalTimes[index] = event.duration || InstantEventVisibleDurationMs;\n timelineData.entryStartTimes[index] = event.startTime;\n return index;\n }\n\n private appendAsyncEvent(asyncEvent: TraceEngine.Legacy.AsyncEvent, level: number): void {\n const steps = asyncEvent.steps;\n // If we have past steps, put the end event for each range rather than start one.\n const eventOffset =\n steps.length > 1 && steps[1].phase === TraceEngine.Types.TraceEvents.Phase.ASYNC_STEP_PAST ? 1 : 0;\n for (let i = 0; i < steps.length - 1; ++i) {\n const index = this.entryData.length;\n this.entryData.push(steps[i + eventOffset]);\n const startTime = steps[i].startTime;\n const timelineData = (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData);\n timelineData.entryLevels[index] = level;\n timelineData.entryTotalTimes[index] = steps[i + 1].startTime - startTime;\n timelineData.entryStartTimes[index] = startTime;\n }\n }\n\n #appendNewEngineFrame(frame: TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame): void {\n const index = this.entryData.length;\n this.entryData.push(frame);\n const durationMilliseconds = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.duration);\n this.entryIndexToTitle[index] = i18n.TimeUtilities.millisToString(durationMilliseconds, true);\n if (!this.timelineDataInternal) {\n return;\n }\n this.timelineDataInternal.entryLevels[index] = this.currentLevel;\n this.timelineDataInternal.entryTotalTimes[index] = durationMilliseconds;\n this.timelineDataInternal.entryStartTimes[index] =\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.startTime);\n }\n\n createSelection(entryIndex: number): TimelineSelection|null {\n const entryType = this.entryType(entryIndex);\n let timelineSelection: TimelineSelection|null = null;\n const entry = this.entryData[entryIndex];\n if (entry && TimelineFlameChartDataProvider.isEntryRegularEvent(entry)) {\n timelineSelection = TimelineSelection.fromTraceEvent(entry);\n } else if (entryType === EntryType.Frame) {\n timelineSelection = TimelineSelection.fromFrame(\n (this.entryData[entryIndex] as TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame));\n }\n if (timelineSelection) {\n this.lastSelection = new Selection(timelineSelection, entryIndex);\n }\n return timelineSelection;\n }\n\n formatValue(value: number, precision?: number): string {\n return i18n.TimeUtilities.preciseMillisToString(value, precision);\n }\n\n canJumpToEntry(_entryIndex: number): boolean {\n return false;\n }\n\n entryIndexForSelection(selection: TimelineSelection|null): number {\n if (!selection || TimelineSelection.isRangeSelection(selection.object) ||\n TimelineSelection.isSyntheticNetworkRequestDetailsEventSelection(selection.object)) {\n return -1;\n }\n\n if (this.lastSelection && this.lastSelection.timelineSelection.object === selection.object) {\n return this.lastSelection.entryIndex;\n }\n const index = this.entryData.indexOf(selection.object);\n if (index !== -1) {\n this.lastSelection = new Selection(selection, index);\n }\n return index;\n }\n\n getIndexForEvent(targetEvent: TraceEngine.Types.TraceEvents.TraceEventData): number|null {\n // Gets the index for the given event by walking through the array of entryData.\n // This may seem inefficient - but we have seen that by building up large\n // maps keyed by trace events that this has a significant impact on the\n // performance of the panel.\n // Therefore, we strike a middle ground: look up the event the first time,\n // but then cache the result.\n const fromCache = this.#eventIndexByEvent.get(targetEvent);\n if (fromCache) {\n return fromCache;\n }\n const index = this.entryData.indexOf(targetEvent);\n const result = index > -1 ? index : null;\n this.#eventIndexByEvent.set(targetEvent, result);\n return result;\n }\n\n /**\n * Build the pairs of initiators and initiated entries.\n * @param entryIndex\n * @returns if we should re-render the flame chart (canvas)\n */\n buildFlowForInitiator(entryIndex: number): boolean {\n if (this.lastInitiatorEntry === entryIndex) {\n return false;\n }\n if (!this.traceEngineData) {\n return false;\n }\n if (!this.timelineDataInternal) {\n return false;\n }\n if (!this.compatibilityTracksAppender) {\n return false;\n }\n\n // Remove all previously assigned decorations indicating that the flow event entries are hidden\n this.#removeAllCollapsedFlowEventsDecorations();\n const previousInitiatorPairsLength = this.timelineDataInternal.initiatorPairs.length;\n // |entryIndex| equals -1 means there is no entry selected, just clear the\n // initiator cache if there is any previous arrow and return true to\n // re-render.\n if (entryIndex === -1) {\n this.lastInitiatorEntry = entryIndex;\n if (previousInitiatorPairsLength === 0) {\n // This means there is no arrow before, so we don't need to re-render.\n return false;\n }\n // Reset to clear any previous arrows from the last event.\n this.timelineDataInternal.resetFlowData();\n return true;\n }\n\n const entryType = this.entryType(entryIndex);\n if (entryType !== EntryType.TrackAppender) {\n return false;\n }\n const event = this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData;\n if (!TraceEngine.Legacy.eventIsFromNewEngine(event)) {\n // TODO: as part of the old engine removal, we need to redefine the Event\n // type to teach the code that only new engine events can be selected by\n // the user.\n return false;\n }\n // Reset to clear any previous arrows from the last event.\n this.timelineDataInternal.resetFlowData();\n this.lastInitiatorEntry = entryIndex;\n\n let hiddenEvents: TraceEngine.Types.TraceEvents.TraceEventData[] = [];\n let modifiedEntries: TraceEngine.Types.TraceEvents.TraceEventData[] = [];\n\n if (this.timelineDataInternal.selectedGroup) {\n hiddenEvents = this.compatibilityTracksAppender?.getHiddenEvents(this.timelineDataInternal.selectedGroup) ?? [];\n modifiedEntries =\n this.compatibilityTracksAppender?.getModifiedEntries(this.timelineDataInternal.selectedGroup) ?? [];\n }\n\n const initiatorPairs = eventInitiatorPairsToDraw(\n this.traceEngineData,\n event,\n hiddenEvents,\n modifiedEntries,\n );\n // This means there is no change for arrows.\n if (previousInitiatorPairsLength === 0 && initiatorPairs.length === 0) {\n return false;\n }\n for (const pair of initiatorPairs) {\n const eventIndex = this.getIndexForEvent(pair.event);\n const initiatorIndex = this.getIndexForEvent(pair.initiator);\n if (eventIndex === null || initiatorIndex === null) {\n continue;\n }\n this.timelineDataInternal.initiatorPairs.push({initiatorIndex, eventIndex});\n\n // Add a decoration of a circle around the 'collapse arrow' to show that the entry is hidden\n if (pair.isEntryHidden) {\n this.#addDecorationToEvent(\n this.entryData.indexOf(pair.event),\n {type: PerfUI.FlameChart.FlameChartDecorationType.INITIATOR_HIDDEN_CIRCLE});\n this.#eventsWithCircleDecorationIndexes.push(this.entryData.indexOf(pair.event));\n }\n\n if (pair.isInitiatorHidden) {\n this.#addDecorationToEvent(\n this.entryData.indexOf(pair.initiator),\n {type: PerfUI.FlameChart.FlameChartDecorationType.INITIATOR_HIDDEN_CIRCLE});\n this.#eventsWithCircleDecorationIndexes.push(this.entryData.indexOf(pair.initiator));\n }\n }\n return true;\n }\n\n eventByIndex(entryIndex: number): TraceEngine.Legacy.CompatibleTraceEvent|null {\n if (entryIndex < 0) {\n return null;\n }\n const entryType = this.entryType(entryIndex);\n if (entryType === EntryType.TrackAppender) {\n return this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData;\n }\n if (entryType === EntryType.Event) {\n return this.entryData[entryIndex] as TraceEngine.Legacy.Event;\n }\n return null;\n }\n\n setEventColorMapping(colorForEvent: (arg0: TraceEngine.Legacy.Event) => string): void {\n this.colorForEvent = colorForEvent;\n }\n\n // Included only for layout tests.\n // TODO(crbug.com/1386091): Fix/port layout tests and remove.\n get performanceModel(): PerformanceModel|null {\n return this.legacyPerformanceModel;\n }\n}\n\nexport const InstantEventVisibleDurationMs = 0.001;\n\nexport const enum Events {\n DataChanged = 'DataChanged',\n}\n\nexport type EventTypes = {\n [Events.DataChanged]: void,\n};\n\n// an entry is a trace event, they are classified into \"entry types\"\n// because some events are rendered differently. For example, screenshot\n// events are rendered as images. Checks for entry types allow to have\n// different styles, names, etc. for events that look differently.\n// In the future we won't have this checks: instead we will forward\n// the event to the corresponding \"track appender\" and it will determine\n// how the event shall be rendered.\nexport const enum EntryType {\n Frame = 'Frame',\n Event = 'Event',\n TrackAppender = 'TrackAppender',\n Screenshot = 'Screenshot',\n}\n"]} \ No newline at end of file +{"version":3,"file":"TimelineFlameChartDataProvider.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/TimelineFlameChartDataProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OA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7B,IAAI,UAAU,GAAG,CAAC,EAAE;YAClB,OAAO,IAAI,CAAC;SACb;QACD,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC7C,IAAI,SAAS,kDAA4B,EAAE;YACzC,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,CAAiD,CAAC;SACnF;QACD,IAAI,SAAS,kCAAoB,EAAE;YACjC,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,CAA6B,CAAC;SAC/D;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,oBAAoB,CAAC,aAAyD;QAC5E,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED,kCAAkC;IAClC,6DAA6D;IAC7D,IAAI,gBAAgB;QAClB,OAAO,IAAI,CAAC,sBAAsB,CAAC;IACrC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,6BAA6B,GAAG,KAAK,CAAC","sourcesContent":["/*\n * Copyright (C) 2014 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';\n\nimport {ActiveFilters} from './ActiveFilters.js';\nimport {CompatibilityTracksAppender, type TrackAppenderName} from './CompatibilityTracksAppender.js';\nimport * as Components from './components/components.js';\nimport {type TimelineCategory} from './EventUICategory.js';\nimport {initiatorsDataToDraw} from './Initiators.js';\nimport {type PerformanceModel} from './PerformanceModel.js';\nimport {ThreadAppender} from './ThreadAppender.js';\nimport timelineFlamechartPopoverStyles from './timelineFlamechartPopover.css.js';\nimport {FlameChartStyle, Selection} from './TimelineFlameChartView.js';\nimport {TimelineSelection} from './TimelineSelection.js';\nimport {TimelineUIUtils} from './TimelineUIUtils.js';\n\nconst UIStrings = {\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n */\n onIgnoreList: 'On ignore list',\n /**\n * @description Text in Timeline Flame Chart Data Provider of the Performance panel *\n * @example{example.com} PH1\n */\n mainS: 'Main — {PH1}',\n /**\n * @description Text that refers to the main target\n */\n main: 'Main',\n /**\n * @description Text in Timeline Flame Chart Data Provider of the Performance panel * @example {https://example.com} PH1\n */\n frameS: 'Frame — {PH1}',\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n */\n subframe: 'Subframe',\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n */\n raster: 'Raster',\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n *@example {2} PH1\n */\n rasterizerThreadS: 'Rasterizer Thread {PH1}',\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n */\n thread: 'Thread',\n /**\n *@description Text for rendering frames\n */\n frames: 'Frames',\n /**\n * @description Text in the Performance panel to show how long was spent in a particular part of the code.\n * The first placeholder is the total time taken for this node and all children, the second is the self time\n * (time taken in this node, without children included).\n *@example {10ms} PH1\n *@example {10ms} PH2\n */\n sSelfS: '{PH1} (self {PH2})',\n /**\n *@description Text in Timeline Flame Chart Data Provider of the Performance panel\n */\n idleFrame: 'Idle Frame',\n /**\n *@description Text in Timeline Frame Chart Data Provider of the Performance panel\n */\n droppedFrame: 'Dropped Frame',\n /**\n *@description Text in Timeline Frame Chart Data Provider of the Performance panel\n */\n partiallyPresentedFrame: 'Partially Presented Frame',\n /**\n *@description Text for a rendering frame\n */\n frame: 'Frame',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelineFlameChartDataProvider.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\n// at the moment there are two types defined for trace events: traceeventdata and\n// SDK.TracingModel.Event. This is only for compatibility between the legacy system\n// and the new system proposed in go/rpp-flamechart-arch. In the future, once all\n// tracks have been migrated to the new system, all entries will be of the\n// TraceEventData type.\nexport type TimelineFlameChartEntry =\n (TraceEngine.Legacy.Event|TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame|\n TraceEngine.Types.TraceEvents.TraceEventData);\nexport class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectWrapper implements\n PerfUI.FlameChart.FlameChartDataProvider {\n private droppedFramePatternCanvas: HTMLCanvasElement;\n private partialFramePatternCanvas: HTMLCanvasElement;\n private timelineDataInternal: PerfUI.FlameChart.FlameChartTimelineData|null;\n private currentLevel: number;\n\n // The Performance and the Timeline models are expected to be\n // deprecated in favor of using traceEngineData (new RPP engine) only\n // as part of the work in crbug.com/1386091. For this reason they\n // have the \"legacy\" prefix on their name.\n private legacyPerformanceModel: PerformanceModel|null;\n private compatibilityTracksAppender: CompatibilityTracksAppender|null;\n private legacyTimelineModel: TimelineModel.TimelineModel.TimelineModelImpl|null;\n private traceEngineData: TraceEngine.Handlers.Types.TraceParseData|null;\n private isCpuProfile = false;\n /**\n * Raster threads are tracked and enumerated with this property. This is also\n * used to group all raster threads together in the same track, instead of\n * rendering a track for thread.\n */\n #rasterCount: number = 0;\n\n private minimumBoundaryInternal: number;\n private timeSpan: number;\n private readonly headerLevel1: PerfUI.FlameChart.GroupStyle;\n private readonly headerLevel2: PerfUI.FlameChart.GroupStyle;\n private readonly staticHeader: PerfUI.FlameChart.GroupStyle;\n private framesHeader: PerfUI.FlameChart.GroupStyle;\n private readonly screenshotsHeader: PerfUI.FlameChart.GroupStyle;\n private entryData!: TimelineFlameChartEntry[];\n private entryTypeByLevel!: EntryType[];\n private screenshotImageCache!: Map;\n private entryIndexToTitle!: string[];\n private asyncColorByCategory!: Map;\n private lastInitiatorEntry!: number;\n private entryParent!: TraceEngine.Legacy.Event[];\n private lastSelection?: Selection;\n private colorForEvent?: ((arg0: TraceEngine.Legacy.Event) => string);\n #eventToDisallowRoot = new WeakMap();\n #font: string;\n #eventIndexByEvent: WeakMap = new WeakMap();\n\n constructor() {\n super();\n this.reset();\n this.#font = `${PerfUI.Font.DEFAULT_FONT_SIZE} ${PerfUI.Font.getFontFamilyForCanvas()}`;\n this.droppedFramePatternCanvas = document.createElement('canvas');\n this.partialFramePatternCanvas = document.createElement('canvas');\n this.preparePatternCanvas();\n this.timelineDataInternal = null;\n this.currentLevel = 0;\n this.legacyPerformanceModel = null;\n this.legacyTimelineModel = null;\n this.compatibilityTracksAppender = null;\n this.traceEngineData = null;\n this.minimumBoundaryInternal = 0;\n this.timeSpan = 0;\n\n this.headerLevel1 = this.buildGroupStyle({shareHeaderLine: false});\n this.headerLevel2 = this.buildGroupStyle({padding: 2, nestingLevel: 1, collapsible: false});\n this.staticHeader = this.buildGroupStyle({collapsible: false});\n this.framesHeader = this.buildGroupStyle({useFirstLineForOverview: true});\n this.screenshotsHeader =\n this.buildGroupStyle({useFirstLineForOverview: true, nestingLevel: 1, collapsible: false, itemsHeight: 150});\n\n ThemeSupport.ThemeSupport.instance().addEventListener(ThemeSupport.ThemeChangeEvent.eventName, () => {\n const headers = [\n this.headerLevel1,\n this.headerLevel2,\n this.staticHeader,\n this.framesHeader,\n this.screenshotsHeader,\n ];\n for (const header of headers) {\n header.color = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-on-surface');\n header.backgroundColor =\n ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container');\n }\n });\n }\n\n modifyTree(group: PerfUI.FlameChart.Group, node: number, action: TraceEngine.EntriesFilter.FilterAction): void {\n const entry = this.entryData[node] as TraceEngine.Types.TraceEvents.SyntheticTraceEntry;\n this.compatibilityTracksAppender?.modifyTree(group, entry, action);\n }\n\n findPossibleContextMenuActions(group: PerfUI.FlameChart.Group, node: number):\n TraceEngine.EntriesFilter.PossibleFilterActions|void {\n const entry = this.entryData[node] as TraceEngine.Types.TraceEvents.SyntheticTraceEntry;\n return this.compatibilityTracksAppender?.findPossibleContextMenuActions(group, entry);\n }\n\n private buildGroupStyle(extra: Object): PerfUI.FlameChart.GroupStyle {\n const defaultGroupStyle = {\n padding: 4,\n height: 17,\n collapsible: true,\n color: ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-on-surface'),\n backgroundColor: ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container'),\n nestingLevel: 0,\n shareHeaderLine: true,\n };\n return Object.assign(defaultGroupStyle, extra);\n }\n\n setModel(\n performanceModel: PerformanceModel|null, newTraceEngineData: TraceEngine.Handlers.Types.TraceParseData|null,\n isCpuProfile = false): void {\n this.reset();\n this.legacyPerformanceModel = performanceModel;\n this.legacyTimelineModel = performanceModel && performanceModel.timelineModel();\n this.traceEngineData = newTraceEngineData;\n\n this.isCpuProfile = isCpuProfile;\n if (newTraceEngineData) {\n const {traceBounds} = newTraceEngineData.Meta;\n const minTime = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(traceBounds.min);\n const maxTime = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(traceBounds.max);\n this.minimumBoundaryInternal = minTime;\n this.timeSpan = minTime === maxTime ? 1000 : maxTime - this.minimumBoundaryInternal;\n }\n }\n\n /**\n * Instances and caches a CompatibilityTracksAppender using the\n * internal flame chart data and the trace parsed data coming from the\n * trace engine.\n * The model data must have been set to the data provider instance before\n * attempting to instance the CompatibilityTracksAppender.\n */\n compatibilityTracksAppenderInstance(forceNew = false): CompatibilityTracksAppender {\n if (!this.compatibilityTracksAppender || forceNew) {\n if (!this.traceEngineData || !this.legacyTimelineModel) {\n throw new Error(\n 'Attempted to instantiate a CompatibilityTracksAppender without having set the trace parse data first.');\n }\n this.timelineDataInternal = this.#instantiateTimelineData();\n this.compatibilityTracksAppender = new CompatibilityTracksAppender(\n this.timelineDataInternal, this.traceEngineData, this.entryData, this.entryTypeByLevel,\n this.legacyTimelineModel);\n }\n return this.compatibilityTracksAppender;\n }\n\n /**\n * Returns the instance of the timeline flame chart data, without\n * adding data to it. In case the timeline data hasn't been instanced\n * creates a new instance and returns it.\n */\n #instantiateTimelineData(): PerfUI.FlameChart.FlameChartTimelineData {\n if (!this.timelineDataInternal) {\n this.timelineDataInternal = PerfUI.FlameChart.FlameChartTimelineData.createEmpty();\n }\n return this.timelineDataInternal;\n }\n\n /**\n * Builds the flame chart data using the track appenders\n */\n buildFromTrackAppenders(options?: {filterThreadsByName?: string, expandedTracks?: Set}): void {\n if (!this.compatibilityTracksAppender) {\n return;\n }\n const appenders = this.compatibilityTracksAppender.allVisibleTrackAppenders();\n for (const appender of appenders) {\n const skipThreadAppenderByName =\n appender instanceof ThreadAppender && !appender.trackName().includes(options?.filterThreadsByName || '');\n if (skipThreadAppenderByName) {\n continue;\n }\n const expanded = Boolean(options?.expandedTracks?.has(appender.appenderName));\n this.currentLevel = appender.appendTrackAtLevel(this.currentLevel, expanded);\n }\n }\n\n groupTrack(group: PerfUI.FlameChart.Group): TimelineModel.TimelineModel.Track|null {\n return group.track || null;\n }\n\n groupTreeEvents(group: PerfUI.FlameChart.Group): TraceEngine.Types.TraceEvents.TraceEventData[]|null {\n return this.compatibilityTracksAppender?.groupEventsForTreeView(group) ?? null;\n }\n\n mainFrameNavigationStartEvents(): readonly TraceEngine.Types.TraceEvents.TraceEventNavigationStart[] {\n if (!this.traceEngineData) {\n return [];\n }\n return this.traceEngineData.Meta.mainFrameNavigations;\n }\n\n entryTitle(entryIndex: number): string|null {\n const entryType = this.entryType(entryIndex);\n if (entryType === EntryType.Event) {\n const event = (this.entryData[entryIndex] as TraceEngine.Legacy.Event);\n if (event.phase === TraceEngine.Types.TraceEvents.Phase.ASYNC_STEP_INTO ||\n event.phase === TraceEngine.Types.TraceEvents.Phase.ASYNC_STEP_PAST) {\n return event.name + ':' + event.args['step'];\n }\n if (this.#eventToDisallowRoot.get(event)) {\n return i18nString(UIStrings.onIgnoreList);\n }\n return TimelineUIUtils.eventTitle(event);\n }\n if (entryType === EntryType.Screenshot) {\n return '';\n }\n if (entryType === EntryType.TrackAppender) {\n const timelineData = (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData);\n const eventLevel = timelineData.entryLevels[entryIndex];\n const event = (this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData);\n return this.compatibilityTracksAppender?.titleForEvent(event, eventLevel) || null;\n }\n let title: Common.UIString.LocalizedString|string = this.entryIndexToTitle[entryIndex];\n if (!title) {\n title = `Unexpected entryIndex ${entryIndex}`;\n console.error(title);\n }\n return title;\n }\n\n textColor(index: number): string {\n const event = this.entryData[index];\n if (!TimelineFlameChartDataProvider.isEntryRegularEvent(event)) {\n return FlameChartStyle.textColor;\n }\n return this.isIgnoreListedEvent(event) ? '#888' : FlameChartStyle.textColor;\n }\n\n entryFont(_index: number): string|null {\n return this.#font;\n }\n\n // resetCompatibilityTracksAppender boolean set to false does not recreate the thread appenders\n reset(resetCompatibilityTracksAppender: boolean = true): void {\n this.currentLevel = 0;\n this.entryData = [];\n this.entryParent = [];\n this.entryTypeByLevel = [];\n this.entryIndexToTitle = [];\n this.asyncColorByCategory = new Map();\n this.screenshotImageCache = new Map();\n this.#eventIndexByEvent = new Map();\n this.#eventToDisallowRoot = new WeakMap();\n if (resetCompatibilityTracksAppender) {\n this.compatibilityTracksAppender = null;\n this.timelineDataInternal = null;\n } else if (!resetCompatibilityTracksAppender && this.timelineDataInternal) {\n this.compatibilityTracksAppender?.setFlameChartDataAndEntryData(\n this.timelineDataInternal, this.entryData, this.entryTypeByLevel);\n this.compatibilityTracksAppender?.threadAppenders().forEach(\n threadAppender => threadAppender.setHeaderAppended(false));\n }\n }\n\n maxStackDepth(): number {\n return this.currentLevel;\n }\n\n /**\n * Builds the flame chart data using the tracks appender (which use\n * the new trace engine) and the legacy code paths present in this\n * file. The result built data is cached and returned.\n */\n timelineData(rebuild: boolean = false): PerfUI.FlameChart.FlameChartTimelineData {\n if (this.timelineDataInternal && this.timelineDataInternal.entryLevels.length !== 0 && !rebuild) {\n // The flame chart data is built already, so return the cached\n // data.\n return this.timelineDataInternal;\n }\n\n this.timelineDataInternal = PerfUI.FlameChart.FlameChartTimelineData.createEmpty();\n if (!this.legacyTimelineModel) {\n return this.timelineDataInternal;\n }\n\n if (rebuild) {\n this.reset(/* resetCompatibilityTracksAppender= */ false);\n }\n\n this.currentLevel = 0;\n\n if (this.traceEngineData) {\n this.compatibilityTracksAppender = this.compatibilityTracksAppenderInstance();\n if (this.traceEngineData.Meta.traceIsGeneric) {\n this.#processGenericTrace();\n } else {\n this.processInspectorTrace();\n }\n }\n\n return this.timelineDataInternal;\n }\n\n #processGenericTrace(): void {\n if (!this.compatibilityTracksAppender) {\n return;\n }\n\n const appendersByProcess = this.compatibilityTracksAppender.allThreadAppendersByProcess();\n\n for (const [pid, threadAppenders] of appendersByProcess) {\n const processGroupStyle = this.buildGroupStyle({shareHeaderLine: false});\n const processName = this.traceEngineData?.Meta.processNames.get(pid)?.args.name || 'Process';\n this.appendHeader(`${processName} (${pid})`, processGroupStyle, true, false);\n for (const appender of threadAppenders) {\n appender.setHeaderNestingLevel(1);\n this.currentLevel = appender.appendTrackAtLevel(this.currentLevel);\n }\n }\n }\n\n private processInspectorTrace(): void {\n if (!this.isCpuProfile) {\n this.appendFrames();\n }\n\n const weight = (track: {type?: string, forMainFrame?: boolean, appenderName?: TrackAppenderName}): number => {\n if (track.appenderName !== undefined) {\n switch (track.appenderName) {\n case 'Animations':\n return 0;\n case 'Timings':\n return 1;\n case 'Interactions':\n return 2;\n case 'LayoutShifts':\n return 3;\n case 'GPU':\n return 8;\n case 'Thread':\n return 4;\n case 'Thread_AuctionWorklet':\n return 10;\n default:\n return -1;\n }\n }\n\n switch (track.type) {\n case TimelineModel.TimelineModel.TrackType.MainThread:\n return track.forMainFrame ? 5 : 6;\n case TimelineModel.TimelineModel.TrackType.Worker:\n return 7;\n case TimelineModel.TimelineModel.TrackType.Raster:\n return 9;\n case TimelineModel.TimelineModel.TrackType.Other:\n return 11;\n default:\n return -1;\n }\n };\n\n if (!this.legacyTimelineModel) {\n return;\n }\n const allTrackAppenders =\n this.compatibilityTracksAppender ? this.compatibilityTracksAppender.allVisibleTrackAppenders() : [];\n\n allTrackAppenders.sort((a, b) => weight(a) - weight(b));\n\n for (const appender of allTrackAppenders) {\n if (!this.traceEngineData) {\n continue;\n }\n\n this.currentLevel = appender.appendTrackAtLevel(this.currentLevel);\n\n // If there is not a selected group, we want to default to selecting the\n // main thread track. Therefore in this check we look to see if the\n // current appender is a ThreadAppender and represnets the Main Thread.\n // If it is, we mark the group as selected.\n if (this.timelineDataInternal && !this.timelineDataInternal.selectedGroup) {\n if (appender instanceof ThreadAppender &&\n (appender.threadType === TraceEngine.Handlers.Threads.ThreadType.MAIN_THREAD ||\n appender.threadType === TraceEngine.Handlers.Threads.ThreadType.CPU_PROFILE)) {\n const group = this.compatibilityTracksAppender?.groupForAppender(appender);\n if (group) {\n this.timelineDataInternal.selectedGroup = group;\n }\n }\n }\n }\n if (this.timelineDataInternal && this.timelineDataInternal.selectedGroup) {\n this.timelineDataInternal.selectedGroup.expanded = true;\n }\n }\n\n #addDecorationToEvent(eventIndex: number, decoration: PerfUI.FlameChart.FlameChartDecoration): void {\n if (!this.timelineDataInternal) {\n return;\n }\n const decorationsForEvent = this.timelineDataInternal.entryDecorations[eventIndex] || [];\n decorationsForEvent.push(decoration);\n this.timelineDataInternal.entryDecorations[eventIndex] = decorationsForEvent;\n }\n\n /**\n * Appends a track in the flame chart using the legacy system.\n * @param track the legacy track to be rendered.\n * @param expanded if the track is expanded.\n */\n appendLegacyTrackData(track: TimelineModel.TimelineModel.Track, expanded?: boolean): void {\n this.#instantiateTimelineData();\n const eventEntryType = EntryType.Event;\n switch (track.type) {\n case TimelineModel.TimelineModel.TrackType.MainThread: {\n if (track.forMainFrame) {\n const group = this.appendSyncEvents(\n track, track.events,\n track.url ? i18nString(UIStrings.mainS, {PH1: track.url}) : i18nString(UIStrings.main), this.headerLevel1,\n eventEntryType, true /* selectable */, expanded);\n if (group && this.timelineDataInternal) {\n this.timelineDataInternal.selectedGroup = group;\n }\n } else {\n this.appendSyncEvents(\n track, track.events,\n track.url ? i18nString(UIStrings.frameS, {PH1: track.url}) : i18nString(UIStrings.subframe),\n this.headerLevel1, eventEntryType, true /* selectable */, expanded);\n }\n break;\n }\n\n case TimelineModel.TimelineModel.TrackType.Worker: {\n this.appendSyncEvents(\n track, track.events, track.name, this.headerLevel1, eventEntryType, true /* selectable */, expanded);\n break;\n }\n\n case TimelineModel.TimelineModel.TrackType.Raster: {\n if (!this.#rasterCount) {\n this.appendHeader(i18nString(UIStrings.raster), this.headerLevel1, false /* selectable */, expanded);\n }\n ++this.#rasterCount;\n this.appendSyncEvents(\n track, track.events, i18nString(UIStrings.rasterizerThreadS, {PH1: this.#rasterCount}), this.headerLevel2,\n eventEntryType, true /* selectable */, expanded);\n break;\n }\n\n case TimelineModel.TimelineModel.TrackType.Other: {\n this.appendSyncEvents(\n track, track.events, track.name || i18nString(UIStrings.thread), this.headerLevel1, eventEntryType,\n true /* selectable */, expanded);\n this.appendAsyncEventsGroup(\n track, track.name, track.asyncEvents, this.headerLevel1, eventEntryType, true /* selectable */, expanded);\n break;\n }\n }\n }\n minimumBoundary(): number {\n return this.minimumBoundaryInternal;\n }\n\n totalTime(): number {\n return this.timeSpan;\n }\n\n /**\n * Narrows an entry of type TimelineFlameChartEntry to the 2 types of\n * simple trace events (legacy and new engine definitions).\n */\n static isEntryRegularEvent(entry: TimelineFlameChartEntry):\n entry is(TraceEngine.Types.TraceEvents.TraceEventData|TraceEngine.Legacy.Event) {\n return 'name' in entry;\n }\n\n search(startTime: number, endTime: number, filter: TimelineModel.TimelineModelFilter.TimelineModelFilter): number[] {\n const result = [];\n this.timelineData();\n for (let i = 0; i < this.entryData.length; ++i) {\n const entry = this.entryData[i];\n if (!TimelineFlameChartDataProvider.isEntryRegularEvent(entry)) {\n continue;\n }\n if (!entry) {\n continue;\n }\n\n // Until all the tracks are powered by the new engine, we need to\n // consider that these entries could be either new engine or legacy\n // engine.\n const entryStartTime = TraceEngine.Legacy.eventIsFromNewEngine(entry) ?\n TraceEngine.Helpers.Timing.eventTimingsMilliSeconds(entry).startTime :\n entry.startTime;\n const entryEndTime = TraceEngine.Legacy.eventIsFromNewEngine(entry) ?\n TraceEngine.Helpers.Timing.eventTimingsMilliSeconds(entry).endTime :\n entry.endTime;\n\n if (entryStartTime > endTime) {\n continue;\n }\n if ((entryEndTime || entryStartTime) < startTime) {\n continue;\n }\n if (filter.accept(entry, this.traceEngineData || undefined)) {\n result.push(i);\n }\n }\n result.sort((a, b) => {\n let firstEvent: TimelineFlameChartEntry|null = this.entryData[a];\n let secondEvent: TimelineFlameChartEntry|null = this.entryData[b];\n if (!TimelineFlameChartDataProvider.isEntryRegularEvent(firstEvent) ||\n !TimelineFlameChartDataProvider.isEntryRegularEvent(secondEvent)) {\n return 0;\n }\n firstEvent = firstEvent instanceof TraceEngine.Legacy.Event ?\n firstEvent :\n (this.compatibilityTracksAppender?.getLegacyEvent(firstEvent) || null);\n secondEvent = secondEvent instanceof TraceEngine.Legacy.Event ?\n secondEvent :\n (this.compatibilityTracksAppender?.getLegacyEvent(secondEvent) || null);\n if (!firstEvent || !secondEvent) {\n return 0;\n }\n return TraceEngine.Legacy.Event.compareStartTime(firstEvent, secondEvent);\n });\n return result;\n }\n\n private appendSyncEvents(\n track: TimelineModel.TimelineModel.Track|null, events: TraceEngine.Legacy.Event[], title: string|null,\n style: PerfUI.FlameChart.GroupStyle|null, entryType: EntryType, selectable: boolean,\n expanded?: boolean): PerfUI.FlameChart.Group|null {\n if (!events.length) {\n return null;\n }\n if (!this.legacyPerformanceModel || !this.legacyTimelineModel) {\n return null;\n }\n const openEvents = [];\n const ignoreListingEnabled = Root.Runtime.experiments.isEnabled('ignore-list-js-frames-on-timeline');\n let maxStackDepth = 0;\n let group: PerfUI.FlameChart.Group|null = null;\n if (track && track.type === TimelineModel.TimelineModel.TrackType.MainThread) {\n group = this.appendHeader((title as string), (style as PerfUI.FlameChart.GroupStyle), selectable, expanded);\n group.track = track;\n }\n for (let i = 0; i < events.length; ++i) {\n const event = events[i];\n const {duration: eventDuration} = TraceEngine.Legacy.timesForEventInMilliseconds(event);\n // TODO(crbug.com/1386091) this check should happen at the model level.\n // Skip Layout Shifts and TTI events when dealing with the main thread.\n if (this.legacyPerformanceModel) {\n const isInteractiveTime = this.legacyPerformanceModel.timelineModel().isInteractiveTimeEvent(event);\n const isLayoutShift = this.legacyPerformanceModel.timelineModel().isLayoutShiftEvent(event);\n const skippableEvent = isInteractiveTime || isLayoutShift;\n\n if (track && track.type === TimelineModel.TimelineModel.TrackType.MainThread && skippableEvent) {\n continue;\n }\n }\n\n if (!TraceEngine.Types.TraceEvents.isFlowPhase(event.phase)) {\n if (!event.endTime && event.phase !== TraceEngine.Types.TraceEvents.Phase.INSTANT) {\n continue;\n }\n if (TraceEngine.Types.TraceEvents.isAsyncPhase(event.phase)) {\n continue;\n }\n if (!ActiveFilters.instance().isVisible(event)) {\n continue;\n }\n }\n // Handle events belonging to a stack. E.g. A call stack in the main thread flame chart.\n while (openEvents.length &&\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // @ts-expect-error\n ((openEvents[openEvents.length - 1] as TraceEngine.Legacy.Event).endTime) <= event.startTime) {\n openEvents.pop();\n }\n this.#eventToDisallowRoot.set(event, false);\n if (ignoreListingEnabled && this.isIgnoreListedEvent(event)) {\n const parent = openEvents[openEvents.length - 1];\n if (parent && this.#eventToDisallowRoot.get(parent)) {\n continue;\n }\n this.#eventToDisallowRoot.set(event, true);\n }\n if (!group && title) {\n group = this.appendHeader(title, (style as PerfUI.FlameChart.GroupStyle), selectable, expanded);\n if (selectable) {\n group.track = track;\n }\n }\n\n const level = this.currentLevel + openEvents.length;\n const index = this.appendEvent(event, level);\n if (openEvents.length) {\n this.entryParent[index] = (openEvents[openEvents.length - 1] as TraceEngine.Legacy.Event);\n }\n\n const trackIsMainThreadMainFrame =\n Boolean(track?.forMainFrame && track?.type === TimelineModel.TimelineModel.TrackType.MainThread);\n // If we are dealing with the Main Thread, find any long tasks and add\n // the candy striping to them. Doing it here avoids having to do another\n // pass through the events at a later point.\n if (trackIsMainThreadMainFrame && event.name === TimelineModel.TimelineModel.RecordType.Task &&\n TraceEngine.Helpers.Timing.millisecondsToMicroseconds(eventDuration) >\n TraceEngine.Handlers.ModelHandlers.Warnings.LONG_MAIN_THREAD_TASK_THRESHOLD) {\n this.#addDecorationToEvent(index, {\n type: PerfUI.FlameChart.FlameChartDecorationType.CANDY,\n startAtTime: TraceEngine.Handlers.ModelHandlers.Warnings.LONG_MAIN_THREAD_TASK_THRESHOLD,\n });\n }\n maxStackDepth = Math.max(maxStackDepth, openEvents.length + 1);\n if (event.endTime) {\n openEvents.push(event);\n }\n }\n this.entryTypeByLevel.length = this.currentLevel + maxStackDepth;\n this.entryTypeByLevel.fill(entryType, this.currentLevel);\n this.currentLevel += maxStackDepth;\n return group;\n }\n\n isIgnoreListedEvent(event: TraceEngine.Legacy.CompatibleTraceEvent): boolean {\n if (TraceEngine.Legacy.eventIsFromNewEngine(event) && TraceEngine.Types.TraceEvents.isProfileCall(event)) {\n return this.isIgnoreListedURL(event.callFrame.url as Platform.DevToolsPath.UrlString);\n }\n return false;\n }\n\n private isIgnoreListedURL(url: Platform.DevToolsPath.UrlString): boolean {\n return Bindings.IgnoreListManager.IgnoreListManager.instance().isUserIgnoreListedURL(url);\n }\n\n private appendAsyncEventsGroup(\n track: TimelineModel.TimelineModel.Track|null, title: string|null, events: TraceEngine.Legacy.AsyncEvent[],\n style: PerfUI.FlameChart.GroupStyle|null, entryType: EntryType, selectable: boolean,\n expanded?: boolean): PerfUI.FlameChart.Group|null {\n if (!events.length) {\n return null;\n }\n const lastUsedTimeByLevel: number[] = [];\n let group: PerfUI.FlameChart.Group|null = null;\n for (let i = 0; i < events.length; ++i) {\n const asyncEvent = events[i];\n if (!this.legacyPerformanceModel || !ActiveFilters.instance().isVisible(asyncEvent)) {\n continue;\n }\n if (!group && title) {\n group = this.appendHeader(title, (style as PerfUI.FlameChart.GroupStyle), selectable, expanded);\n if (selectable) {\n group.track = track;\n }\n }\n const startTime = asyncEvent.startTime;\n let level;\n for (level = 0; level < lastUsedTimeByLevel.length && lastUsedTimeByLevel[level] > startTime; ++level) {\n }\n this.appendAsyncEvent(asyncEvent, this.currentLevel + level);\n lastUsedTimeByLevel[level] = (asyncEvent.endTime as number);\n }\n this.entryTypeByLevel.length = this.currentLevel + lastUsedTimeByLevel.length;\n this.entryTypeByLevel.fill(entryType, this.currentLevel);\n this.currentLevel += lastUsedTimeByLevel.length;\n return group;\n }\n\n getEntryTypeForLevel(level: number): EntryType {\n return this.entryTypeByLevel[level];\n }\n\n private appendFrames(): void {\n if (!this.legacyPerformanceModel || !this.timelineDataInternal || !this.legacyTimelineModel ||\n !this.traceEngineData) {\n return;\n }\n\n // TODO: Long term we want to move both the Frames track and the screenshots\n // track into the TrackAppender system. However right now the frames track\n // expects data in a different form to how the new engine parses frame\n // information. Therefore we have migrated the screenshots to use the new\n // data model in place without creating a new TrackAppender. When we can\n // migrate the frames track to the new appender system, we can migrate the\n // screnshots then as well.\n const filmStrip = TraceEngine.Extras.FilmStrip.fromTraceData(this.traceEngineData);\n const hasScreenshots = filmStrip.frames.length > 0;\n\n this.framesHeader.collapsible = hasScreenshots;\n const expanded = Root.Runtime.Runtime.queryParam('flamechart-force-expand') === 'frames';\n\n this.appendHeader(i18nString(UIStrings.frames), this.framesHeader, false /* selectable */, expanded);\n\n this.entryTypeByLevel[this.currentLevel] = EntryType.Frame;\n for (const frame of this.traceEngineData.Frames.frames) {\n this.#appendNewEngineFrame(frame);\n }\n ++this.currentLevel;\n\n if (!hasScreenshots) {\n return;\n }\n this.#appendScreenshots(filmStrip);\n }\n\n #appendScreenshots(filmStrip: TraceEngine.Extras.FilmStrip.Data): void {\n if (!this.timelineDataInternal || !this.legacyTimelineModel) {\n return;\n }\n this.appendHeader('', this.screenshotsHeader, false /* selectable */);\n this.entryTypeByLevel[this.currentLevel] = EntryType.Screenshot;\n let prevTimestamp: TraceEngine.Types.Timing.MilliSeconds|undefined = undefined;\n\n for (const filmStripFrame of filmStrip.frames) {\n const screenshotTimeInMilliSeconds =\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(filmStripFrame.screenshotEvent.ts);\n this.entryData.push(filmStripFrame.screenshotEvent);\n (this.timelineDataInternal.entryLevels as number[]).push(this.currentLevel);\n (this.timelineDataInternal.entryStartTimes as number[]).push(screenshotTimeInMilliSeconds);\n if (prevTimestamp) {\n (this.timelineDataInternal.entryTotalTimes as number[]).push(screenshotTimeInMilliSeconds - prevTimestamp);\n }\n prevTimestamp = screenshotTimeInMilliSeconds;\n }\n if (filmStrip.frames.length && prevTimestamp !== undefined) {\n // Set the total time of the final screenshot so it takes up the remainder of the trace.\n (this.timelineDataInternal.entryTotalTimes as number[])\n .push(this.legacyTimelineModel.maximumRecordTime() - prevTimestamp);\n }\n ++this.currentLevel;\n }\n\n private entryType(entryIndex: number): EntryType {\n return this.entryTypeByLevel[(this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData)\n .entryLevels[entryIndex]];\n }\n\n prepareHighlightedEntryInfo(entryIndex: number): Element|null {\n let time = '';\n let title;\n let warningElements: Element[] = [];\n let nameSpanTimelineInfoTime = 'timeline-info-time';\n\n const additionalContent: HTMLElement[] = [];\n\n const entryType = this.entryType(entryIndex);\n if (entryType === EntryType.TrackAppender) {\n if (!this.compatibilityTracksAppender) {\n return null;\n }\n const event = (this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData);\n const timelineData = (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData);\n const eventLevel = timelineData.entryLevels[entryIndex];\n const highlightedEntryInfo = this.compatibilityTracksAppender.highlightedEntryInfo(event, eventLevel);\n title = highlightedEntryInfo.title;\n time = highlightedEntryInfo.formattedTime;\n warningElements = highlightedEntryInfo.warningElements || warningElements;\n if (TraceEngine.Types.TraceEvents.isSyntheticInteractionEvent(event)) {\n const breakdown = new Components.InteractionBreakdown.InteractionBreakdown();\n breakdown.entry = event;\n additionalContent.push(breakdown);\n }\n } else if (entryType === EntryType.Event) {\n const event = (this.entryData[entryIndex] as TraceEngine.Legacy.Event);\n const totalTime = event.duration;\n const selfTime = event.selfTime;\n const eps = 1e-6;\n if (typeof totalTime === 'number') {\n time = Math.abs(totalTime - selfTime) > eps && selfTime > eps ?\n i18nString(UIStrings.sSelfS, {\n PH1: i18n.TimeUtilities.millisToString(totalTime, true),\n PH2: i18n.TimeUtilities.millisToString(selfTime, true),\n }) :\n i18n.TimeUtilities.millisToString(totalTime, true);\n }\n title = this.entryTitle(entryIndex);\n\n } else if (entryType === EntryType.Frame) {\n const frame = (this.entryData[entryIndex] as TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame);\n time = i18n.TimeUtilities.preciseMillisToString(\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.duration), 1);\n\n if (frame.idle) {\n title = i18nString(UIStrings.idleFrame);\n } else if (frame.dropped) {\n if (frame.isPartial) {\n title = i18nString(UIStrings.partiallyPresentedFrame);\n } else {\n title = i18nString(UIStrings.droppedFrame);\n }\n nameSpanTimelineInfoTime = 'timeline-info-warning';\n } else {\n title = i18nString(UIStrings.frame);\n }\n } else {\n return null;\n }\n\n const element = document.createElement('div');\n const root = UI.Utils.createShadowRootWithCoreStyles(element, {\n cssFile: [timelineFlamechartPopoverStyles],\n delegatesFocus: undefined,\n });\n const contents = root.createChild('div', 'timeline-flamechart-popover');\n contents.createChild('span', nameSpanTimelineInfoTime).textContent = time;\n contents.createChild('span', 'timeline-info-title').textContent = title;\n if (warningElements) {\n for (const warningElement of warningElements) {\n warningElement.classList.add('timeline-info-warning');\n contents.appendChild(warningElement);\n }\n }\n for (const elem of additionalContent) {\n contents.appendChild(elem);\n }\n return element;\n }\n\n prepareHighlightedHiddenEntriesArrowInfo(group: PerfUI.FlameChart.Group, entryIndex: number): Element|null {\n const element = document.createElement('div');\n const root = UI.Utils.createShadowRootWithCoreStyles(element, {\n cssFile: [timelineFlamechartPopoverStyles],\n delegatesFocus: undefined,\n });\n\n const entry = this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.SyntheticTraceEntry;\n const hiddenEntriesAmount = this.compatibilityTracksAppender?.findHiddenDescendantsAmount(group, entry);\n\n if (!hiddenEntriesAmount) {\n return null;\n }\n const contents = root.createChild('div', 'timeline-flamechart-popover');\n contents.createChild('span', 'timeline-info-title').textContent = hiddenEntriesAmount + ' hidden';\n\n return element;\n }\n\n entryColor(entryIndex: number): string {\n function patchColorAndCache(cache: Map, key: KEY, lookupColor: (arg0: KEY) => string): string {\n let color = cache.get(key);\n if (color) {\n return color;\n }\n const parsedColor = lookupColor(key);\n if (!parsedColor) {\n throw new Error('Could not parse color from entry');\n }\n color = parsedColor;\n cache.set(key, color);\n return (color);\n }\n\n if (!this.legacyPerformanceModel || !this.legacyTimelineModel) {\n return '';\n }\n\n const entryType = this.entryType(entryIndex);\n if (entryType === EntryType.Event) {\n const event = (this.entryData[entryIndex] as TraceEngine.Legacy.Event);\n if (this.legacyTimelineModel.isGenericTrace()) {\n return this.genericTraceEventColor(event);\n }\n if (this.legacyPerformanceModel.timelineModel().isMarkerEvent(event)) {\n return TimelineUIUtils.markerStyleForEvent(event).color;\n }\n if (!TraceEngine.Types.TraceEvents.isAsyncPhase(event.phase) && this.colorForEvent) {\n return this.colorForEvent(event);\n }\n const category = TimelineUIUtils.eventStyle(event).category;\n return patchColorAndCache(this.asyncColorByCategory, category, () => category.getComputedColorValue());\n }\n if (entryType === EntryType.Frame) {\n return 'white';\n }\n if (entryType === EntryType.TrackAppender) {\n const timelineData = (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData);\n const eventLevel = timelineData.entryLevels[entryIndex];\n const event = (this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData);\n return this.compatibilityTracksAppender?.colorForEvent(event, eventLevel) || '';\n }\n return '';\n }\n\n private genericTraceEventColor(event: TraceEngine.Legacy.Event): string {\n const key = event.categoriesString || event.name;\n return key ? `hsl(${Platform.StringUtilities.hashCode(key) % 300 + 30}, 40%, 70%)` : '#ccc';\n }\n\n private preparePatternCanvas(): void {\n // Set the candy stripe pattern to 17px so it repeats well.\n const size = 17;\n this.droppedFramePatternCanvas.width = size;\n this.droppedFramePatternCanvas.height = size;\n\n this.partialFramePatternCanvas.width = size;\n this.partialFramePatternCanvas.height = size;\n\n const ctx = this.droppedFramePatternCanvas.getContext('2d');\n if (ctx) {\n // Make a dense solid-line pattern.\n ctx.translate(size * 0.5, size * 0.5);\n ctx.rotate(Math.PI * 0.25);\n ctx.translate(-size * 0.5, -size * 0.5);\n\n ctx.fillStyle = 'rgb(255, 255, 255)';\n for (let x = -size; x < size * 2; x += 3) {\n ctx.fillRect(x, -size, 1, size * 3);\n }\n }\n\n const ctx2 = this.partialFramePatternCanvas.getContext('2d');\n if (ctx2) {\n // Make a sparse dashed-line pattern.\n ctx2.strokeStyle = 'rgb(255, 255, 255)';\n ctx2.lineWidth = 2;\n ctx2.beginPath();\n ctx2.moveTo(17, 0);\n ctx2.lineTo(10, 7);\n ctx2.moveTo(8, 9);\n ctx2.lineTo(2, 15);\n ctx2.stroke();\n }\n }\n\n private drawFrame(\n entryIndex: number, context: CanvasRenderingContext2D, text: string|null, barX: number, barY: number,\n barWidth: number, barHeight: number): void {\n const hPadding = 1;\n const frame = (this.entryData[entryIndex] as TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame);\n barX += hPadding;\n barWidth -= 2 * hPadding;\n if (frame.idle) {\n context.fillStyle = 'white';\n } else if (frame.dropped) {\n if (frame.isPartial) {\n // For partially presented frame boxes, paint a yellow background with\n // a sparse white dashed-line pattern overlay.\n context.fillStyle = '#f0e442';\n context.fillRect(barX, barY, barWidth, barHeight);\n\n const overlay = context.createPattern(this.partialFramePatternCanvas, 'repeat');\n context.fillStyle = overlay || context.fillStyle;\n } else {\n // For dropped frame boxes, paint a red background with a dense white\n // solid-line pattern overlay.\n context.fillStyle = '#f08080';\n context.fillRect(barX, barY, barWidth, barHeight);\n\n const overlay = context.createPattern(this.droppedFramePatternCanvas, 'repeat');\n context.fillStyle = overlay || context.fillStyle;\n }\n } else {\n context.fillStyle = '#d7f0d1';\n }\n context.fillRect(barX, barY, barWidth, barHeight);\n\n const frameDurationText = i18n.TimeUtilities.preciseMillisToString(\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.duration), 1);\n const textWidth = context.measureText(frameDurationText).width;\n if (textWidth <= barWidth) {\n context.fillStyle = this.textColor(entryIndex);\n context.fillText(frameDurationText, barX + (barWidth - textWidth) / 2, barY + barHeight - 4);\n }\n }\n\n private async drawScreenshot(\n entryIndex: number, context: CanvasRenderingContext2D, barX: number, barY: number, barWidth: number,\n barHeight: number): Promise {\n const screenshot = (this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.SyntheticScreenshot);\n if (!this.screenshotImageCache.has(screenshot)) {\n this.screenshotImageCache.set(screenshot, null);\n const data = screenshot.args.dataUri;\n const image = await UI.UIUtils.loadImage(data);\n this.screenshotImageCache.set(screenshot, image);\n this.dispatchEventToListeners(Events.DataChanged);\n return;\n }\n\n const image = this.screenshotImageCache.get(screenshot);\n if (!image) {\n return;\n }\n const imageX = barX + 1;\n const imageY = barY + 1;\n const imageHeight = barHeight - 2;\n const scale = imageHeight / image.naturalHeight;\n const imageWidth = Math.floor(image.naturalWidth * scale);\n context.save();\n context.beginPath();\n context.rect(barX, barY, barWidth, barHeight);\n context.clip();\n context.drawImage(image, imageX, imageY, imageWidth, imageHeight);\n context.strokeStyle = '#ccc';\n context.strokeRect(imageX - 0.5, imageY - 0.5, Math.min(barWidth - 1, imageWidth + 1), imageHeight);\n context.restore();\n }\n\n decorateEntry(\n entryIndex: number, context: CanvasRenderingContext2D, text: string|null, barX: number, barY: number,\n barWidth: number, barHeight: number, unclippedBarX: number, timeToPixelRatio: number): boolean {\n const entryType = this.entryType(entryIndex);\n\n if (entryType === EntryType.Frame) {\n this.drawFrame(entryIndex, context, text, barX, barY, barWidth, barHeight);\n return true;\n }\n\n if (entryType === EntryType.Screenshot) {\n void this.drawScreenshot(entryIndex, context, barX, barY, barWidth, barHeight);\n return true;\n }\n\n if (entryType === EntryType.TrackAppender) {\n const entry = this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData;\n if (TraceEngine.Types.TraceEvents.isSyntheticInteractionEvent(entry)) {\n this.#drawInteractionEventWithWhiskers(\n context, entryIndex, text, entry, barX, barY, unclippedBarX, barWidth, barHeight, timeToPixelRatio);\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Draws the left and right whiskers around an interaction in the timeline.\n * @param context - the canvas that will be drawn onto\n * @param entryIndex\n * @param entryTitle - the title of the entry\n * @param entry - the entry itself\n * @param barX - the starting X pixel position of the bar representing this event. This is clipped: if the bar is off the left side of the screen, this value will be 0\n * @param barY - the starting Y pixel position of the bar representing this event.\n * @param unclippedBarXStartPixel - the starting X pixel position of the bar representing this event, not clipped. This means if the bar is off the left of the screen this will be a negative number.\n * @param barWidth - the width of the full bar in pixels\n * @param barHeight - the height of the full bar in pixels\n * @param timeToPixelRatio - the ratio required to convert a millisecond time to a pixel value.\n **/\n #drawInteractionEventWithWhiskers(\n context: CanvasRenderingContext2D, entryIndex: number, entryTitle: string|null,\n entry: TraceEngine.Types.TraceEvents.SyntheticInteractionPair, barX: number, barY: number,\n unclippedBarXStartPixel: number, barWidth: number, barHeight: number, timeToPixelRatio: number): void {\n /**\n * An interaction is drawn with whiskers as so:\n * |----------[=======]-------------|\n * => The left whisker is the event's start time (event.ts)\n * => The box start is the event's processingStart time\n * => The box end is the event's processingEnd time\n * => The right whisker is the event's end time (event.ts + event.dur)\n *\n * When we draw the event in the InteractionsAppender, we draw a huge box\n * that spans the entire of the above. So here we need to draw over the\n * rectangle that is outside of {processingStart, processingEnd} and\n * replace it with the whiskers.\n * TODO(crbug.com/1495248): rework how we draw whiskers to avoid this inefficiency\n */\n\n const beginTime = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(entry.ts);\n const entireBarEndXPixel = barX + barWidth;\n\n function timeToPixel(time: TraceEngine.Types.Timing.MicroSeconds): number {\n const timeMilli = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(time);\n return Math.floor(unclippedBarXStartPixel + (timeMilli - beginTime) * timeToPixelRatio);\n }\n\n context.save();\n\n // Clear portions of initial rect to prepare for the ticks.\n context.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container');\n let desiredBoxStartX = timeToPixel(entry.processingStart);\n const desiredBoxEndX = timeToPixel(entry.processingEnd);\n\n // If the entry has no processing time, ensure the box is 1px wide so at least it is visible.\n if (entry.processingEnd - entry.processingStart === 0) {\n desiredBoxStartX -= 1;\n }\n\n context.fillRect(barX, barY - 0.5, desiredBoxStartX - barX, barHeight);\n context.fillRect(desiredBoxEndX, barY - 0.5, entireBarEndXPixel - desiredBoxEndX, barHeight);\n\n // Draws left and right whiskers\n function drawTick(begin: number, end: number, y: number): void {\n const tickHeightPx = 6;\n context.moveTo(begin, y - tickHeightPx / 2);\n context.lineTo(begin, y + tickHeightPx / 2);\n context.moveTo(begin, y);\n context.lineTo(end, y);\n }\n\n // The left whisker starts at the enty timestamp, and continues until the start of the box (processingStart).\n const leftWhiskerX = timeToPixel(entry.ts);\n // The right whisker ends at (entry.ts + entry.dur). We draw the line from the end of the box (processingEnd).\n const rightWhiskerX = timeToPixel(TraceEngine.Types.Timing.MicroSeconds(entry.ts + entry.dur));\n context.beginPath();\n context.lineWidth = 1;\n context.strokeStyle = '#ccc';\n const lineY = Math.floor(barY + barHeight / 2) + 0.5;\n const leftTick = leftWhiskerX + 0.5;\n const rightTick = rightWhiskerX - 0.5;\n drawTick(leftTick, desiredBoxStartX, lineY);\n drawTick(rightTick, desiredBoxEndX, lineY);\n context.stroke();\n\n if (entryTitle) {\n // BarX will be set to 0 if the start of the box if off the screen to the\n // left. If this happens, the desiredBoxStartX will be negative. In that\n // case, we fallback to the BarX. This ensures that even if the box\n // starts off-screen, we draw the text at the first visible on screen\n // pixels, so the user can still see the event's title.\n const textStartX = desiredBoxStartX > 0 ? desiredBoxStartX : barX;\n context.font = this.#font;\n const textWidth = UI.UIUtils.measureTextWidth(context, entryTitle);\n\n // These numbers are duplicated from FlameChart.ts.\n const textPadding = 5;\n const textBaseline = 5;\n\n // Only draw the text if it can fit in the amount of box that is visible.\n if (textWidth <= desiredBoxEndX - textStartX + textPadding) {\n context.fillStyle = this.textColor(entryIndex);\n context.fillText(entryTitle, textStartX + textPadding, barY + barHeight - textBaseline);\n }\n }\n context.restore();\n }\n\n forceDecoration(entryIndex: number): boolean {\n const entryType = this.entryType(entryIndex);\n if (entryType === EntryType.Frame) {\n return true;\n }\n if (entryType === EntryType.Screenshot) {\n return true;\n }\n\n if (entryType === EntryType.Event) {\n // TODO: this entryType can no longer exist as all tracks are now\n // migrated to appenders. This can be removed as part of the old engine\n // removal.\n return false;\n }\n const event = (this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData);\n\n if (TraceEngine.Types.TraceEvents.isSyntheticInteractionEvent(event)) {\n // We draw interactions with whiskers, which are done via the\n // decorateEntry() method, hence we always want to force these to be\n // decorated.\n return true;\n }\n return Boolean(this.traceEngineData?.Warnings.perEvent.get(event));\n }\n\n private appendHeader(title: string, style: PerfUI.FlameChart.GroupStyle, selectable: boolean, expanded?: boolean):\n PerfUI.FlameChart.Group {\n const group =\n ({startLevel: this.currentLevel, name: title, style: style, selectable: selectable, expanded} as\n PerfUI.FlameChart.Group);\n (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData).groups.push(group);\n return group;\n }\n\n private appendEvent(event: TraceEngine.Legacy.Event, level: number): number {\n const index = this.entryData.length;\n this.entryData.push(event);\n const timelineData = (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData);\n timelineData.entryLevels[index] = level;\n timelineData.entryTotalTimes[index] = event.duration || InstantEventVisibleDurationMs;\n timelineData.entryStartTimes[index] = event.startTime;\n return index;\n }\n\n private appendAsyncEvent(asyncEvent: TraceEngine.Legacy.AsyncEvent, level: number): void {\n const steps = asyncEvent.steps;\n // If we have past steps, put the end event for each range rather than start one.\n const eventOffset =\n steps.length > 1 && steps[1].phase === TraceEngine.Types.TraceEvents.Phase.ASYNC_STEP_PAST ? 1 : 0;\n for (let i = 0; i < steps.length - 1; ++i) {\n const index = this.entryData.length;\n this.entryData.push(steps[i + eventOffset]);\n const startTime = steps[i].startTime;\n const timelineData = (this.timelineDataInternal as PerfUI.FlameChart.FlameChartTimelineData);\n timelineData.entryLevels[index] = level;\n timelineData.entryTotalTimes[index] = steps[i + 1].startTime - startTime;\n timelineData.entryStartTimes[index] = startTime;\n }\n }\n\n #appendNewEngineFrame(frame: TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame): void {\n const index = this.entryData.length;\n this.entryData.push(frame);\n const durationMilliseconds = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.duration);\n this.entryIndexToTitle[index] = i18n.TimeUtilities.millisToString(durationMilliseconds, true);\n if (!this.timelineDataInternal) {\n return;\n }\n this.timelineDataInternal.entryLevels[index] = this.currentLevel;\n this.timelineDataInternal.entryTotalTimes[index] = durationMilliseconds;\n this.timelineDataInternal.entryStartTimes[index] =\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(frame.startTime);\n }\n\n createSelection(entryIndex: number): TimelineSelection|null {\n const entryType = this.entryType(entryIndex);\n let timelineSelection: TimelineSelection|null = null;\n const entry = this.entryData[entryIndex];\n if (entry && TimelineFlameChartDataProvider.isEntryRegularEvent(entry)) {\n timelineSelection = TimelineSelection.fromTraceEvent(entry);\n } else if (entryType === EntryType.Frame) {\n timelineSelection = TimelineSelection.fromFrame(\n (this.entryData[entryIndex] as TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame));\n }\n if (timelineSelection) {\n this.lastSelection = new Selection(timelineSelection, entryIndex);\n }\n return timelineSelection;\n }\n\n formatValue(value: number, precision?: number): string {\n return i18n.TimeUtilities.preciseMillisToString(value, precision);\n }\n\n canJumpToEntry(_entryIndex: number): boolean {\n return false;\n }\n\n entryIndexForSelection(selection: TimelineSelection|null): number {\n if (!selection || TimelineSelection.isRangeSelection(selection.object) ||\n TimelineSelection.isSyntheticNetworkRequestDetailsEventSelection(selection.object)) {\n return -1;\n }\n\n if (this.lastSelection && this.lastSelection.timelineSelection.object === selection.object) {\n return this.lastSelection.entryIndex;\n }\n\n // If the index is -1 and the selection is a TraceEvent, it might be\n // the case that this Entry is hidden by the Context Menu action.\n // Try revealing the entry and getting the index again.\n if (this.entryData.indexOf(selection.object) === -1 && TimelineSelection.isTraceEventSelection(selection.object)) {\n if (this.timelineDataInternal?.selectedGroup) {\n this.compatibilityTracksAppender?.revealEntry(\n this.timelineDataInternal?.selectedGroup,\n selection.object as TraceEngine.Types.TraceEvents.SyntheticTraceEntry);\n this.timelineData(true);\n }\n }\n\n const index = this.entryData.indexOf(selection.object);\n if (index !== -1) {\n this.lastSelection = new Selection(selection, index);\n }\n return index;\n }\n\n getIndexForEvent(targetEvent: TraceEngine.Types.TraceEvents.TraceEventData): number|null {\n // Gets the index for the given event by walking through the array of entryData.\n // This may seem inefficient - but we have seen that by building up large\n // maps keyed by trace events that this has a significant impact on the\n // performance of the panel.\n // Therefore, we strike a middle ground: look up the event the first time,\n // but then cache the result.\n const fromCache = this.#eventIndexByEvent.get(targetEvent);\n if (fromCache) {\n return fromCache;\n }\n const index = this.entryData.indexOf(targetEvent);\n const result = index > -1 ? index : null;\n this.#eventIndexByEvent.set(targetEvent, result);\n return result;\n }\n\n /**\n * Build the data for initiators and initiated entries.\n * @param entryIndex\n * @returns if we should re-render the flame chart (canvas)\n */\n buildFlowForInitiator(entryIndex: number): boolean {\n if (this.lastInitiatorEntry === entryIndex) {\n return false;\n }\n if (!this.traceEngineData) {\n return false;\n }\n if (!this.timelineDataInternal) {\n return false;\n }\n if (!this.compatibilityTracksAppender) {\n return false;\n }\n\n // Remove all previously assigned decorations indicating that the flow event entries are hidden\n const previousInitiatorsDataLength = this.timelineDataInternal.initiatorsData.length;\n // |entryIndex| equals -1 means there is no entry selected, just clear the\n // initiator cache if there is any previous arrow and return true to\n // re-render.\n if (entryIndex === -1) {\n this.lastInitiatorEntry = entryIndex;\n if (previousInitiatorsDataLength === 0) {\n // This means there is no arrow before, so we don't need to re-render.\n return false;\n }\n // Reset to clear any previous arrows from the last event.\n this.timelineDataInternal.resetFlowData();\n return true;\n }\n\n const entryType = this.entryType(entryIndex);\n if (entryType !== EntryType.TrackAppender) {\n return false;\n }\n const event = this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData;\n if (!TraceEngine.Legacy.eventIsFromNewEngine(event)) {\n // TODO: as part of the old engine removal, we need to redefine the Event\n // type to teach the code that only new engine events can be selected by\n // the user.\n return false;\n }\n // Reset to clear any previous arrows from the last event.\n this.timelineDataInternal.resetFlowData();\n this.lastInitiatorEntry = entryIndex;\n\n let hiddenEvents: TraceEngine.Types.TraceEvents.TraceEventData[] = [];\n let modifiedEntries: TraceEngine.Types.TraceEvents.TraceEventData[] = [];\n\n if (this.timelineDataInternal.selectedGroup) {\n hiddenEvents = this.compatibilityTracksAppender?.getHiddenEvents(this.timelineDataInternal.selectedGroup) ?? [];\n modifiedEntries =\n this.compatibilityTracksAppender?.getModifiedEntries(this.timelineDataInternal.selectedGroup) ?? [];\n }\n\n const initiatorsData = initiatorsDataToDraw(\n this.traceEngineData,\n event,\n hiddenEvents,\n modifiedEntries,\n );\n // This means there is no change for arrows.\n if (previousInitiatorsDataLength === 0 && initiatorsData.length === 0) {\n return false;\n }\n for (const intiatorData of initiatorsData) {\n const eventIndex = this.getIndexForEvent(intiatorData.event);\n const initiatorIndex = this.getIndexForEvent(intiatorData.initiator);\n if (eventIndex === null || initiatorIndex === null) {\n continue;\n }\n this.timelineDataInternal.initiatorsData.push({\n initiatorIndex,\n eventIndex,\n isInitiatorHidden: intiatorData.isInitiatorHidden,\n isEntryHidden: intiatorData.isEntryHidden,\n });\n }\n return true;\n }\n\n eventByIndex(entryIndex: number): TraceEngine.Legacy.CompatibleTraceEvent|null {\n if (entryIndex < 0) {\n return null;\n }\n const entryType = this.entryType(entryIndex);\n if (entryType === EntryType.TrackAppender) {\n return this.entryData[entryIndex] as TraceEngine.Types.TraceEvents.TraceEventData;\n }\n if (entryType === EntryType.Event) {\n return this.entryData[entryIndex] as TraceEngine.Legacy.Event;\n }\n return null;\n }\n\n setEventColorMapping(colorForEvent: (arg0: TraceEngine.Legacy.Event) => string): void {\n this.colorForEvent = colorForEvent;\n }\n\n // Included only for layout tests.\n // TODO(crbug.com/1386091): Fix/port layout tests and remove.\n get performanceModel(): PerformanceModel|null {\n return this.legacyPerformanceModel;\n }\n}\n\nexport const InstantEventVisibleDurationMs = 0.001;\n\nexport const enum Events {\n DataChanged = 'DataChanged',\n}\n\nexport type EventTypes = {\n [Events.DataChanged]: void,\n};\n\n// an entry is a trace event, they are classified into \"entry types\"\n// because some events are rendered differently. For example, screenshot\n// events are rendered as images. Checks for entry types allow to have\n// different styles, names, etc. for events that look differently.\n// In the future we won't have this checks: instead we will forward\n// the event to the corresponding \"track appender\" and it will determine\n// how the event shall be rendered.\nexport const enum EntryType {\n Frame = 'Frame',\n Event = 'Event',\n TrackAppender = 'TrackAppender',\n Screenshot = 'Screenshot',\n}\n"]} \ No newline at end of file diff --git a/public/panels/timeline/TimelineLoader.d.ts b/public/panels/timeline/TimelineLoader.d.ts index 3f21123b2..f9af9d86c 100644 --- a/public/panels/timeline/TimelineLoader.d.ts +++ b/public/panels/timeline/TimelineLoader.d.ts @@ -32,6 +32,11 @@ export declare class TimelineLoader implements Common.StringOutputStream.OutputS static loadFromURL(url: Platform.DevToolsPath.UrlString, client: Client): Promise; addEvents(events: TraceEngine.TracingManager.EventPayload[]): Promise; cancel(): Promise; + /** + * As TimelineLoader implements `Common.StringOutputStream.OutputStream`, `write()` is called when a + * Common.StringOutputStream.StringOutputStream instance has decoded a chunk. This path is only used + * by `loadFromURL()`; it's NOT used by `loadFromEvents` or `loadFromFile`. + */ write(chunk: string): Promise; private writeBalancedJSON; private reportErrorAndCancelLoading; diff --git a/public/panels/timeline/TimelineLoader.js b/public/panels/timeline/TimelineLoader.js index cbd33baa8..87a69d2ef 100644 --- a/public/panels/timeline/TimelineLoader.js +++ b/public/panels/timeline/TimelineLoader.js @@ -140,13 +140,19 @@ export class TimelineLoader { } async addEvents(events) { await this.client?.loadingStarted(); - const eventsPerChunk = 15_000; + /** + * See the `eventsPerChunk` comment in `models/trace/types/Configuration.ts`. + * + * This value is different though. Why? `The addEvents()` work below is different + * (and much faster!) than running `handleEvent()` on all handlers. + */ + const eventsPerChunk = 150_000; for (let i = 0; i < events.length; i += eventsPerChunk) { const chunk = events.slice(i, i + eventsPerChunk); this.#collectEvents(chunk); this.tracingModel.addEvents(chunk); await this.client?.loadingProgress((i + chunk.length) / events.length); - await new Promise(r => window.setTimeout(r)); // Yield event loop to paint. + await new Promise(r => window.setTimeout(r, 0)); // Yield event loop to paint. } void this.close(); } @@ -162,6 +168,11 @@ export class TimelineLoader { this.canceledCallback(); } } + /** + * As TimelineLoader implements `Common.StringOutputStream.OutputStream`, `write()` is called when a + * Common.StringOutputStream.StringOutputStream instance has decoded a chunk. This path is only used + * by `loadFromURL()`; it's NOT used by `loadFromEvents` or `loadFromFile`. + */ async write(chunk) { if (!this.client) { return Promise.resolve(); diff --git a/public/panels/timeline/TimelineLoader.js.map b/public/panels/timeline/TimelineLoader.js.map index df2c828a4..48554a537 100644 --- a/public/panels/timeline/TimelineLoader.js.map +++ b/public/panels/timeline/TimelineLoader.js.map @@ -1 +1 @@ -{"version":3,"file":"TimelineLoader.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/TimelineLoader.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAGhD,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,SAAS,MAAM,uCAAuC,CAAC;AACnE,OAAO,KAAK,aAAa,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAI3D,MAAM,SAAS,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qBAAqB,CAAC,IAAI,CAAC,CAAC;SACvD;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,CAAC,2BAA2B,CAAC,UAAU,CAAC,SAAS,CAAC,yBAAyB,CAAC,CAAC,CAAC;YAClF,OAAO;SACR;QACD,IAAI,CAAC,MAAM,GAAG,cAAc,CAAC,mBAAmB,EAAE,CAAC;QAClD,IAAI,CAAC,YAAgD,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QAC9E,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IACnC,CAAC;IAED,cAAc,CAAC,MAAiD;QAC9D,uHAAuH;QACvH,IAAI,CAAC,gBAAgB;YACjB,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,MAAiE,CAAC,CAAC;IACtG,CAAC;CACF;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAG,OAAO,CAAC","sourcesContent":["// Copyright 2016 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport type * as Platform from '../../core/platform/platform.js';\nimport type * as Protocol from '../../generated/protocol.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as TextUtils from '../../models/text_utils/text_utils.js';\nimport * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\n\nimport {type Client} from './TimelineController.js';\n\nconst UIStrings = {\n /**\n *@description Text in Timeline Loader of the Performance panel\n */\n malformedTimelineDataUnknownJson: 'Malformed timeline data: Unknown JSON format',\n /**\n *@description Text in Timeline Loader of the Performance panel\n */\n malformedTimelineInputWrongJson: 'Malformed timeline input, wrong JSON brackets balance',\n /**\n *@description Text in Timeline Loader of the Performance panel\n *@example {Unknown JSON format} PH1\n */\n malformedTimelineDataS: 'Malformed timeline data: {PH1}',\n /**\n *@description Text in Timeline Loader of the Performance panel\n */\n legacyTimelineFormatIsNot: 'Legacy Timeline format is not supported.',\n /**\n *@description Text in Timeline Loader of the Performance panel\n */\n malformedCpuProfileFormat: 'Malformed CPU profile format',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelineLoader.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\n/**\n * This class handles loading traces from file and URL, and from the Lighthouse panel\n * It also handles loading cpuprofiles from file, url and console.profileEnd()\n *\n * Meanwhile, the normal trace recording flow bypasses TimelineLoader entirely,\n * as it's handled from TracingManager => TimelineController.\n */\nexport class TimelineLoader implements Common.StringOutputStream.OutputStream {\n private client: Client|null;\n private tracingModel: TraceEngine.Legacy.TracingModel|null;\n private canceledCallback: (() => void)|null;\n private state: State;\n private buffer: string;\n private firstRawChunk: boolean;\n private firstChunk: boolean;\n private loadedBytes: number;\n private totalSize!: number;\n private readonly jsonTokenizer: TextUtils.TextUtils.BalancedJSONTokenizer;\n private filter: TimelineModel.TimelineModelFilter.TimelineModelFilter|null;\n #collectedEvents: TraceEngine.Types.TraceEvents.TraceEventData[] = [];\n\n #traceFinalizedCallbackForTest?: () => void;\n #traceFinalizedPromiseForTest: Promise;\n\n constructor(client: Client, title?: string) {\n this.client = client;\n this.tracingModel = new TraceEngine.Legacy.TracingModel(title);\n this.canceledCallback = null;\n this.state = State.Initial;\n this.buffer = '';\n this.firstRawChunk = true;\n this.firstChunk = true;\n this.loadedBytes = 0;\n this.jsonTokenizer = new TextUtils.TextUtils.BalancedJSONTokenizer(this.writeBalancedJSON.bind(this), true);\n this.filter = null;\n\n this.#traceFinalizedPromiseForTest = new Promise(resolve => {\n this.#traceFinalizedCallbackForTest = resolve;\n });\n }\n\n static async loadFromFile(file: File, client: Client): Promise {\n const loader = new TimelineLoader(client);\n const fileReader = new Bindings.FileUtils.ChunkedFileReader(file, TransferChunkLengthBytes);\n loader.canceledCallback = fileReader.cancel.bind(fileReader);\n loader.totalSize = file.size;\n // We'll resolve and return the loader instance before finalizing the trace.\n setTimeout(async () => {\n const success = await fileReader.read(loader);\n if (!success && fileReader.error()) {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n loader.reportErrorAndCancelLoading((fileReader.error() as any).message);\n }\n });\n return loader;\n }\n\n static loadFromEvents(events: TraceEngine.TracingManager.EventPayload[], client: Client): TimelineLoader {\n const loader = new TimelineLoader(client);\n window.setTimeout(async () => {\n void loader.addEvents(events);\n });\n return loader;\n }\n\n static getCpuProfileFilter(): TimelineModel.TimelineModelFilter.TimelineVisibleEventsFilter {\n const visibleTypes = [];\n visibleTypes.push(TimelineModel.TimelineModel.RecordType.JSFrame);\n visibleTypes.push(TimelineModel.TimelineModel.RecordType.JSIdleFrame);\n visibleTypes.push(TimelineModel.TimelineModel.RecordType.JSSystemFrame);\n return new TimelineModel.TimelineModelFilter.TimelineVisibleEventsFilter(visibleTypes);\n }\n\n static loadFromCpuProfile(profile: Protocol.Profiler.Profile|null, client: Client, title?: string): TimelineLoader {\n const loader = new TimelineLoader(client, title);\n loader.state = State.LoadingCPUProfileFromRecording;\n\n try {\n const events = TimelineModel.TimelineJSProfile.TimelineJSProfileProcessor.createFakeTraceFromCpuProfile(\n profile, /* tid */ 1, /* injectPageEvent */ true);\n\n loader.filter = TimelineLoader.getCpuProfileFilter();\n\n window.setTimeout(async () => {\n void loader.addEvents(events);\n });\n } catch (e) {\n console.error(e.stack);\n }\n return loader;\n }\n\n static async loadFromURL(url: Platform.DevToolsPath.UrlString, client: Client): Promise {\n const loader = new TimelineLoader(client);\n const stream = new Common.StringOutputStream.StringOutputStream();\n await client.loadingStarted();\n\n const allowRemoteFilePaths =\n Common.Settings.Settings.instance().moduleSetting('network.enable-remote-file-loading').get();\n Host.ResourceLoader.loadAsStream(url, null, stream, finishedCallback, allowRemoteFilePaths);\n\n async function finishedCallback(\n success: boolean, _headers: {[x: string]: string},\n errorDescription: Host.ResourceLoader.LoadErrorDescription): Promise {\n if (!success) {\n return loader.reportErrorAndCancelLoading(errorDescription.message);\n }\n const txt = stream.data();\n const trace = JSON.parse(txt);\n if (Array.isArray(trace.nodes)) {\n loader.state = State.LoadingCPUProfileFromFile;\n loader.buffer = txt;\n await loader.close();\n return;\n }\n const events = Array.isArray(trace.traceEvents) ? trace.traceEvents : trace;\n void loader.addEvents(events);\n }\n\n return loader;\n }\n\n async addEvents(events: TraceEngine.TracingManager.EventPayload[]): Promise {\n await this.client?.loadingStarted();\n const eventsPerChunk = 15_000;\n for (let i = 0; i < events.length; i += eventsPerChunk) {\n const chunk = events.slice(i, i + eventsPerChunk);\n this.#collectEvents(chunk);\n (this.tracingModel as TraceEngine.Legacy.TracingModel).addEvents(chunk);\n await this.client?.loadingProgress((i + chunk.length) / events.length);\n await new Promise(r => window.setTimeout(r)); // Yield event loop to paint.\n }\n void this.close();\n }\n\n async cancel(): Promise {\n this.tracingModel = null;\n if (this.client) {\n await this.client.loadingComplete(\n /* collectedEvents */[], /* tracingModel= */ null, /* exclusiveFilter= */ null, /* isCpuProfile= */ false,\n /* recordingStartTime= */ null);\n this.client = null;\n }\n if (this.canceledCallback) {\n this.canceledCallback();\n }\n }\n\n async write(chunk: string): Promise {\n if (!this.client) {\n return Promise.resolve();\n }\n this.loadedBytes += chunk.length;\n if (this.firstRawChunk) {\n await this.client.loadingStarted();\n // Ensure we paint the loading dialog before continuing\n await new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve)));\n } else {\n let progress = undefined;\n if (this.totalSize) {\n progress = this.loadedBytes / this.totalSize;\n // For compressed traces, we can't provide a definite progress percentage. So, just keep it moving.\n progress = progress > 1 ? progress - Math.floor(progress) : progress;\n }\n await this.client.loadingProgress(progress);\n }\n this.firstRawChunk = false;\n\n if (this.state === State.Initial) {\n if (chunk.match(/^{(\\s)*\"nodes\":(\\s)*\\[/)) {\n this.state = State.LoadingCPUProfileFromFile;\n } else if (chunk[0] === '{') {\n this.state = State.LookingForEvents;\n } else if (chunk[0] === '[') {\n this.state = State.ReadingEvents;\n } else {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.malformedTimelineDataUnknownJson));\n return Promise.resolve();\n }\n }\n\n if (this.state === State.LoadingCPUProfileFromFile) {\n this.buffer += chunk;\n return Promise.resolve();\n }\n\n if (this.state === State.LookingForEvents) {\n const objectName = '\"traceEvents\":';\n const startPos = this.buffer.length - objectName.length;\n this.buffer += chunk;\n const pos = this.buffer.indexOf(objectName, startPos);\n if (pos === -1) {\n return Promise.resolve();\n }\n chunk = this.buffer.slice(pos + objectName.length);\n this.state = State.ReadingEvents;\n }\n\n if (this.state !== State.ReadingEvents) {\n return Promise.resolve();\n }\n // This is where we actually do the loading of events from JSON: the JSON\n // Tokenizer writes the JSON to a buffer, and then as a callback the\n // writeBalancedJSON method below is invoked. It then parses this chunk\n // of JSON as a set of events, and adds them to the TracingModel via\n // addEvents()\n if (this.jsonTokenizer.write(chunk)) {\n return Promise.resolve();\n }\n this.state = State.SkippingTail;\n if (this.firstChunk) {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.malformedTimelineInputWrongJson));\n }\n return Promise.resolve();\n }\n\n private writeBalancedJSON(data: string): void {\n let json: string = data + ']';\n\n if (!this.firstChunk) {\n const commaIndex = json.indexOf(',');\n if (commaIndex !== -1) {\n json = json.slice(commaIndex + 1);\n }\n json = '[' + json;\n }\n\n let items;\n try {\n items = (JSON.parse(json) as TraceEngine.TracingManager.EventPayload[]);\n } catch (e) {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.malformedTimelineDataS, {PH1: e.toString()}));\n return;\n }\n\n if (this.firstChunk) {\n this.firstChunk = false;\n if (this.looksLikeAppVersion(items[0])) {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.legacyTimelineFormatIsNot));\n return;\n }\n }\n\n try {\n (this.tracingModel as TraceEngine.Legacy.TracingModel).addEvents(items);\n this.#collectEvents(items);\n } catch (e) {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.malformedTimelineDataS, {PH1: e.toString()}));\n }\n }\n\n private reportErrorAndCancelLoading(message?: string): void {\n if (message) {\n Common.Console.Console.instance().error(message);\n }\n void this.cancel();\n }\n\n private looksLikeAppVersion(item: unknown): boolean {\n return typeof item === 'string' && item.indexOf('Chrome') !== -1;\n }\n\n async close(): Promise {\n if (!this.client) {\n return;\n }\n await this.client.processingStarted();\n await this.finalizeTrace();\n }\n\n private isCpuProfile(): boolean {\n return this.state === State.LoadingCPUProfileFromFile || this.state === State.LoadingCPUProfileFromRecording;\n }\n\n private async finalizeTrace(): Promise {\n if (this.state === State.LoadingCPUProfileFromFile) {\n this.parseCPUProfileFormat(this.buffer);\n this.buffer = '';\n }\n (this.tracingModel as TraceEngine.Legacy.TracingModel).tracingComplete();\n await (this.client as Client)\n .loadingComplete(\n this.#collectedEvents, this.tracingModel, this.filter, this.isCpuProfile(), /* recordingStartTime=*/ null);\n this.#traceFinalizedCallbackForTest?.();\n }\n\n traceFinalizedForTest(): Promise {\n return this.#traceFinalizedPromiseForTest;\n }\n\n private parseCPUProfileFormat(text: string): void {\n let traceEvents;\n try {\n const profile = JSON.parse(text);\n traceEvents = TimelineModel.TimelineJSProfile.TimelineJSProfileProcessor.createFakeTraceFromCpuProfile(\n profile, /* tid */ 1, /* injectPageEvent */ true);\n } catch (e) {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.malformedCpuProfileFormat));\n return;\n }\n this.filter = TimelineLoader.getCpuProfileFilter();\n (this.tracingModel as TraceEngine.Legacy.TracingModel).addEvents(traceEvents);\n this.#collectEvents(traceEvents);\n }\n\n #collectEvents(events: TraceEngine.TracingManager.EventPayload[]): void {\n // Once the old engine is removed, this can be updated to use the types from the new engine and avoid the `as unknown`.\n this.#collectedEvents =\n this.#collectedEvents.concat(events as unknown as TraceEngine.Types.TraceEvents.TraceEventData);\n }\n}\n\nexport const TransferChunkLengthBytes = 5000000;\n\nexport const enum State {\n Initial = 'Initial',\n LookingForEvents = 'LookingForEvents',\n ReadingEvents = 'ReadingEvents',\n SkippingTail = 'SkippingTail',\n LoadingCPUProfileFromFile = 'LoadingCPUProfileFromFile',\n LoadingCPUProfileFromRecording = 'LoadingCPUProfileFromRecording',\n}\n"]} \ No newline at end of file +{"version":3,"file":"TimelineLoader.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/TimelineLoader.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAGhD,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,SAAS,MAAM,uCAAuC,CAAC;AACnE,OAAO,KAAK,aAAa,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAI3D,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,gCAAgC,EAAE,8CAA8C;IAChF;;OAEG;IACH,+BAA+B,EAAE,uDAAuD;IACxF;;;OAGG;IACH,sBAAsB,EAAE,gCAAgC;IACxD;;OAEG;IACH,yBAAyB,EAAE,0CAA0C;IACrE;;OAEG;IACH,yBAAyB,EAAE,8BAA8B;CAC1D,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,mCAAmC,EAAE,SAAS,CAAC,CAAC;AACzF,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAEtE;;;;;;GAMG;AACH,MAAM,OAAO,cAAc;IACjB,MAAM,CAAc;IACpB,YAAY,CAAuC;IACnD,gBAAgB,CAAoB;IACpC,KAAK,CAAQ;IACb,MAAM,CAAS;IACf,aAAa,CAAU;IACvB,UAAU,CAAU;IACpB,WAAW,CAAS;IACpB,SAAS,CAAU;I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is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport type * as Platform from '../../core/platform/platform.js';\nimport type * as Protocol from '../../generated/protocol.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as TextUtils from '../../models/text_utils/text_utils.js';\nimport * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\n\nimport {type Client} from './TimelineController.js';\n\nconst UIStrings = {\n /**\n *@description Text in Timeline Loader of the Performance panel\n */\n malformedTimelineDataUnknownJson: 'Malformed timeline data: Unknown JSON format',\n /**\n *@description Text in Timeline Loader of the Performance panel\n */\n malformedTimelineInputWrongJson: 'Malformed timeline input, wrong JSON brackets balance',\n /**\n *@description Text in Timeline Loader of the Performance panel\n *@example {Unknown JSON format} PH1\n */\n malformedTimelineDataS: 'Malformed timeline data: {PH1}',\n /**\n *@description Text in Timeline Loader of the Performance panel\n */\n legacyTimelineFormatIsNot: 'Legacy Timeline format is not supported.',\n /**\n *@description Text in Timeline Loader of the Performance panel\n */\n malformedCpuProfileFormat: 'Malformed CPU profile format',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/timeline/TimelineLoader.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\n/**\n * This class handles loading traces from file and URL, and from the Lighthouse panel\n * It also handles loading cpuprofiles from file, url and console.profileEnd()\n *\n * Meanwhile, the normal trace recording flow bypasses TimelineLoader entirely,\n * as it's handled from TracingManager => TimelineController.\n */\nexport class TimelineLoader implements Common.StringOutputStream.OutputStream {\n private client: Client|null;\n private tracingModel: TraceEngine.Legacy.TracingModel|null;\n private canceledCallback: (() => void)|null;\n private state: State;\n private buffer: string;\n private firstRawChunk: boolean;\n private firstChunk: boolean;\n private loadedBytes: number;\n private totalSize!: number;\n private readonly jsonTokenizer: TextUtils.TextUtils.BalancedJSONTokenizer;\n private filter: TimelineModel.TimelineModelFilter.TimelineModelFilter|null;\n #collectedEvents: TraceEngine.Types.TraceEvents.TraceEventData[] = [];\n\n #traceFinalizedCallbackForTest?: () => void;\n #traceFinalizedPromiseForTest: Promise;\n\n constructor(client: Client, title?: string) {\n this.client = client;\n this.tracingModel = new TraceEngine.Legacy.TracingModel(title);\n this.canceledCallback = null;\n this.state = State.Initial;\n this.buffer = '';\n this.firstRawChunk = true;\n this.firstChunk = true;\n this.loadedBytes = 0;\n this.jsonTokenizer = new TextUtils.TextUtils.BalancedJSONTokenizer(this.writeBalancedJSON.bind(this), true);\n this.filter = null;\n\n this.#traceFinalizedPromiseForTest = new Promise(resolve => {\n this.#traceFinalizedCallbackForTest = resolve;\n });\n }\n\n static async loadFromFile(file: File, client: Client): Promise {\n const loader = new TimelineLoader(client);\n const fileReader = new Bindings.FileUtils.ChunkedFileReader(file, TransferChunkLengthBytes);\n loader.canceledCallback = fileReader.cancel.bind(fileReader);\n loader.totalSize = file.size;\n // We'll resolve and return the loader instance before finalizing the trace.\n setTimeout(async () => {\n const success = await fileReader.read(loader);\n if (!success && fileReader.error()) {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n loader.reportErrorAndCancelLoading((fileReader.error() as any).message);\n }\n });\n return loader;\n }\n\n static loadFromEvents(events: TraceEngine.TracingManager.EventPayload[], client: Client): TimelineLoader {\n const loader = new TimelineLoader(client);\n window.setTimeout(async () => {\n void loader.addEvents(events);\n });\n return loader;\n }\n\n static getCpuProfileFilter(): TimelineModel.TimelineModelFilter.TimelineVisibleEventsFilter {\n const visibleTypes = [];\n visibleTypes.push(TimelineModel.TimelineModel.RecordType.JSFrame);\n visibleTypes.push(TimelineModel.TimelineModel.RecordType.JSIdleFrame);\n visibleTypes.push(TimelineModel.TimelineModel.RecordType.JSSystemFrame);\n return new TimelineModel.TimelineModelFilter.TimelineVisibleEventsFilter(visibleTypes);\n }\n\n static loadFromCpuProfile(profile: Protocol.Profiler.Profile|null, client: Client, title?: string): TimelineLoader {\n const loader = new TimelineLoader(client, title);\n loader.state = State.LoadingCPUProfileFromRecording;\n\n try {\n const events = TimelineModel.TimelineJSProfile.TimelineJSProfileProcessor.createFakeTraceFromCpuProfile(\n profile, /* tid */ 1, /* injectPageEvent */ true);\n\n loader.filter = TimelineLoader.getCpuProfileFilter();\n\n window.setTimeout(async () => {\n void loader.addEvents(events);\n });\n } catch (e) {\n console.error(e.stack);\n }\n return loader;\n }\n\n static async loadFromURL(url: Platform.DevToolsPath.UrlString, client: Client): Promise {\n const loader = new TimelineLoader(client);\n const stream = new Common.StringOutputStream.StringOutputStream();\n await client.loadingStarted();\n\n const allowRemoteFilePaths =\n Common.Settings.Settings.instance().moduleSetting('network.enable-remote-file-loading').get();\n Host.ResourceLoader.loadAsStream(url, null, stream, finishedCallback, allowRemoteFilePaths);\n\n async function finishedCallback(\n success: boolean, _headers: {[x: string]: string},\n errorDescription: Host.ResourceLoader.LoadErrorDescription): Promise {\n if (!success) {\n return loader.reportErrorAndCancelLoading(errorDescription.message);\n }\n const txt = stream.data();\n const trace = JSON.parse(txt);\n if (Array.isArray(trace.nodes)) {\n loader.state = State.LoadingCPUProfileFromFile;\n loader.buffer = txt;\n await loader.close();\n return;\n }\n const events = Array.isArray(trace.traceEvents) ? trace.traceEvents : trace;\n void loader.addEvents(events);\n }\n\n return loader;\n }\n\n async addEvents(events: TraceEngine.TracingManager.EventPayload[]): Promise {\n await this.client?.loadingStarted();\n /**\n * See the `eventsPerChunk` comment in `models/trace/types/Configuration.ts`.\n *\n * This value is different though. Why? `The addEvents()` work below is different\n * (and much faster!) than running `handleEvent()` on all handlers.\n */\n const eventsPerChunk = 150_000;\n for (let i = 0; i < events.length; i += eventsPerChunk) {\n const chunk = events.slice(i, i + eventsPerChunk);\n this.#collectEvents(chunk);\n (this.tracingModel as TraceEngine.Legacy.TracingModel).addEvents(chunk);\n await this.client?.loadingProgress((i + chunk.length) / events.length);\n await new Promise(r => window.setTimeout(r, 0)); // Yield event loop to paint.\n }\n void this.close();\n }\n\n async cancel(): Promise {\n this.tracingModel = null;\n if (this.client) {\n await this.client.loadingComplete(\n /* collectedEvents */[], /* tracingModel= */ null, /* exclusiveFilter= */ null, /* isCpuProfile= */ false,\n /* recordingStartTime= */ null);\n this.client = null;\n }\n if (this.canceledCallback) {\n this.canceledCallback();\n }\n }\n\n /**\n * As TimelineLoader implements `Common.StringOutputStream.OutputStream`, `write()` is called when a\n * Common.StringOutputStream.StringOutputStream instance has decoded a chunk. This path is only used\n * by `loadFromURL()`; it's NOT used by `loadFromEvents` or `loadFromFile`.\n */\n async write(chunk: string): Promise {\n if (!this.client) {\n return Promise.resolve();\n }\n this.loadedBytes += chunk.length;\n if (this.firstRawChunk) {\n await this.client.loadingStarted();\n // Ensure we paint the loading dialog before continuing\n await new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve)));\n } else {\n let progress = undefined;\n if (this.totalSize) {\n progress = this.loadedBytes / this.totalSize;\n // For compressed traces, we can't provide a definite progress percentage. So, just keep it moving.\n progress = progress > 1 ? progress - Math.floor(progress) : progress;\n }\n await this.client.loadingProgress(progress);\n }\n this.firstRawChunk = false;\n\n if (this.state === State.Initial) {\n if (chunk.match(/^{(\\s)*\"nodes\":(\\s)*\\[/)) {\n this.state = State.LoadingCPUProfileFromFile;\n } else if (chunk[0] === '{') {\n this.state = State.LookingForEvents;\n } else if (chunk[0] === '[') {\n this.state = State.ReadingEvents;\n } else {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.malformedTimelineDataUnknownJson));\n return Promise.resolve();\n }\n }\n\n if (this.state === State.LoadingCPUProfileFromFile) {\n this.buffer += chunk;\n return Promise.resolve();\n }\n\n if (this.state === State.LookingForEvents) {\n const objectName = '\"traceEvents\":';\n const startPos = this.buffer.length - objectName.length;\n this.buffer += chunk;\n const pos = this.buffer.indexOf(objectName, startPos);\n if (pos === -1) {\n return Promise.resolve();\n }\n chunk = this.buffer.slice(pos + objectName.length);\n this.state = State.ReadingEvents;\n }\n\n if (this.state !== State.ReadingEvents) {\n return Promise.resolve();\n }\n // This is where we actually do the loading of events from JSON: the JSON\n // Tokenizer writes the JSON to a buffer, and then as a callback the\n // writeBalancedJSON method below is invoked. It then parses this chunk\n // of JSON as a set of events, and adds them to the TracingModel via\n // addEvents()\n if (this.jsonTokenizer.write(chunk)) {\n return Promise.resolve();\n }\n this.state = State.SkippingTail;\n if (this.firstChunk) {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.malformedTimelineInputWrongJson));\n }\n return Promise.resolve();\n }\n\n private writeBalancedJSON(data: string): void {\n let json: string = data + ']';\n\n if (!this.firstChunk) {\n const commaIndex = json.indexOf(',');\n if (commaIndex !== -1) {\n json = json.slice(commaIndex + 1);\n }\n json = '[' + json;\n }\n\n let items;\n try {\n items = (JSON.parse(json) as TraceEngine.TracingManager.EventPayload[]);\n } catch (e) {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.malformedTimelineDataS, {PH1: e.toString()}));\n return;\n }\n\n if (this.firstChunk) {\n this.firstChunk = false;\n if (this.looksLikeAppVersion(items[0])) {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.legacyTimelineFormatIsNot));\n return;\n }\n }\n\n try {\n (this.tracingModel as TraceEngine.Legacy.TracingModel).addEvents(items);\n this.#collectEvents(items);\n } catch (e) {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.malformedTimelineDataS, {PH1: e.toString()}));\n }\n }\n\n private reportErrorAndCancelLoading(message?: string): void {\n if (message) {\n Common.Console.Console.instance().error(message);\n }\n void this.cancel();\n }\n\n private looksLikeAppVersion(item: unknown): boolean {\n return typeof item === 'string' && item.indexOf('Chrome') !== -1;\n }\n\n async close(): Promise {\n if (!this.client) {\n return;\n }\n await this.client.processingStarted();\n await this.finalizeTrace();\n }\n\n private isCpuProfile(): boolean {\n return this.state === State.LoadingCPUProfileFromFile || this.state === State.LoadingCPUProfileFromRecording;\n }\n\n private async finalizeTrace(): Promise {\n if (this.state === State.LoadingCPUProfileFromFile) {\n this.parseCPUProfileFormat(this.buffer);\n this.buffer = '';\n }\n (this.tracingModel as TraceEngine.Legacy.TracingModel).tracingComplete();\n await (this.client as Client)\n .loadingComplete(\n this.#collectedEvents, this.tracingModel, this.filter, this.isCpuProfile(), /* recordingStartTime=*/ null);\n this.#traceFinalizedCallbackForTest?.();\n }\n\n traceFinalizedForTest(): Promise {\n return this.#traceFinalizedPromiseForTest;\n }\n\n private parseCPUProfileFormat(text: string): void {\n let traceEvents;\n try {\n const profile = JSON.parse(text);\n traceEvents = TimelineModel.TimelineJSProfile.TimelineJSProfileProcessor.createFakeTraceFromCpuProfile(\n profile, /* tid */ 1, /* injectPageEvent */ true);\n } catch (e) {\n this.reportErrorAndCancelLoading(i18nString(UIStrings.malformedCpuProfileFormat));\n return;\n }\n this.filter = TimelineLoader.getCpuProfileFilter();\n (this.tracingModel as TraceEngine.Legacy.TracingModel).addEvents(traceEvents);\n this.#collectEvents(traceEvents);\n }\n\n #collectEvents(events: TraceEngine.TracingManager.EventPayload[]): void {\n // Once the old engine is removed, this can be updated to use the types from the new engine and avoid the `as unknown`.\n this.#collectedEvents =\n this.#collectedEvents.concat(events as unknown as TraceEngine.Types.TraceEvents.TraceEventData);\n }\n}\n\nexport const TransferChunkLengthBytes = 5000000;\n\nexport const enum State {\n Initial = 'Initial',\n LookingForEvents = 'LookingForEvents',\n ReadingEvents = 'ReadingEvents',\n SkippingTail = 'SkippingTail',\n LoadingCPUProfileFromFile = 'LoadingCPUProfileFromFile',\n LoadingCPUProfileFromRecording = 'LoadingCPUProfileFromRecording',\n}\n"]} \ No newline at end of file diff --git a/public/panels/timeline/TimelineUIUtils.test.js b/public/panels/timeline/TimelineUIUtils.test.js index c19ff9aa4..ef9a80fc5 100644 --- a/public/panels/timeline/TimelineUIUtils.test.js +++ b/public/panels/timeline/TimelineUIUtils.test.js @@ -561,8 +561,8 @@ describeWithMockConnection('TimelineUIUtils', function () { // Test the related node link. const relatedNodeRow = details.querySelector('.timeline-details-view-row:nth-of-type(9) .timeline-details-view-row-value span') ?.shadowRoot; - relatedNodeRow?.querySelector('div')?.innerText; - assert.strictEqual(relatedNodeRow?.querySelector('div')?.innerText, 'A test node name'); + relatedNodeRow?.querySelector('button')?.innerText; + assert.strictEqual(relatedNodeRow?.querySelector('button')?.innerText, 'A test node name'); }); it('renders the details for a profile call properly', async function () { Common.Linkifier.registerLinkifier({ diff --git a/public/panels/timeline/TimelineUIUtils.test.js.map b/public/panels/timeline/TimelineUIUtils.test.js.map index 67159bf4f..fae0f18e7 100644 --- a/public/panels/timeline/TimelineUIUtils.test.js.map +++ b/public/panels/timeline/TimelineUIUtils.test.js.map @@ -1 +1 @@ -{"version":3,"file":"TimelineUIUtils.test.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/TimelineUIUtils.test.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAEtD,OAAO,EAAC,wBAAwB,EAAC,MAAM,iCAAiC,CAAC;AACzE,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAE7C,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,aAAa,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAC;AACjE,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAC,SAAS,EAAE,oBAAoB,EAAC,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAC,YAAY,EAAC,MAAM,qCAAqC,CAAC;AACjE,OAAO,EACL,kCAAkC,EAClC,0BAA0B,EAC1B,gCAAgC,GACjC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,yBAAyB,EACzB,mCAAmC,GACpC,MAAM,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,GAAG,QAAQ,CAAC,eAAe,CAAC,eAAe,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;YACnF,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;YACrD,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,wBAAwB,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport type * as Platform from '../../core/platform/platform.js';\nimport {assertNotNullOrUndefined} from '../../core/platform/platform.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport type * as Protocol from '../../generated/protocol.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as Workspace from '../../models/workspace/workspace.js';\nimport * as Elements from '../../panels/elements/elements.js';\nimport {doubleRaf, renderElementIntoDOM} from '../../testing/DOMHelpers.js';\nimport {createTarget} from '../../testing/EnvironmentHelpers.js';\nimport {\n clearMockConnectionResponseHandler,\n describeWithMockConnection,\n setMockConnectionResponseHandler,\n} from '../../testing/MockConnection.js';\nimport {\n loadBasicSourceMapExample,\n setupPageResourceLoaderForSourceMap,\n} from '../../testing/SourceMapHelpers.js';\nimport {\n getMainThread,\n makeCompleteEvent,\n makeMockSamplesHandlerData,\n makeProfileCall,\n} from '../../testing/TraceHelpers.js';\nimport {TraceLoader} from '../../testing/TraceLoader.js';\nimport * as Components from '../../ui/legacy/components/utils/utils.js';\n\nimport * as Timeline from './timeline.js';\n\nconst {assert} = chai;\n\ndescribeWithMockConnection('TimelineUIUtils', function() {\n let tracingModel: TraceEngine.Legacy.TracingModel;\n let process: TraceEngine.Legacy.Process;\n let thread: TraceEngine.Legacy.Thread;\n let target: SDK.Target.Target;\n // Trace events contain script ids as strings. However, the linkifier\n // utilities assume it is a number because that's how it's defined at\n // the protocol level. For practicality, we declare these two\n // variables so that we can satisfy type checking throughout the tests.\n const SCRIPT_ID_NUMBER = 1;\n const SCRIPT_ID_STRING = String(SCRIPT_ID_NUMBER) as Protocol.Runtime.ScriptId;\n\n beforeEach(() => {\n target = createTarget();\n tracingModel = new TraceEngine.Legacy.TracingModel();\n process = new TraceEngine.Legacy.Process(tracingModel, 1);\n thread = new TraceEngine.Legacy.Thread(process, 1);\n\n const workspace = Workspace.Workspace.WorkspaceImpl.instance();\n const targetManager = SDK.TargetManager.TargetManager.instance();\n const resourceMapping = new Bindings.ResourceMapping.ResourceMapping(targetManager, workspace);\n const debuggerWorkspaceBinding = Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance({\n forceNew: true,\n resourceMapping,\n targetManager,\n });\n Bindings.IgnoreListManager.IgnoreListManager.instance({forceNew: true, debuggerWorkspaceBinding});\n });\n\n afterEach(() => {\n clearMockConnectionResponseHandler('DOM.pushNodesByBackendIdsToFrontend');\n });\n\n it('creates top frame location text for function calls', async function() {\n const event = new TraceEngine.Legacy.ConstructedEvent(\n 'devtools.timeline', 'FunctionCall', TraceEngine.Types.TraceEvents.Phase.COMPLETE, 10, thread);\n\n event.addArgs({\n data: {\n functionName: 'test',\n url: 'test.js',\n scriptId: SCRIPT_ID_STRING,\n lineNumber: 0,\n columnNumber: 0,\n },\n });\n assert.strictEqual(\n 'test.js:1:1', await Timeline.TimelineUIUtils.TimelineUIUtils.buildDetailsTextForTraceEvent(event));\n });\n\n it('creates top frame location text as a fallback', async function() {\n // 'TimerInstall' is chosen such that we run into the 'default' case.\n const event = new TraceEngine.Legacy.ConstructedEvent(\n 'devtools.timeline', 'TimerInstall', TraceEngine.Types.TraceEvents.Phase.COMPLETE, 10, thread);\n\n event.addArgs({\n data: {\n stackTrace: [\n {\n functionName: 'test',\n url: 'test.js',\n scriptId: SCRIPT_ID_STRING,\n lineNumber: 0,\n columnNumber: 0,\n },\n ],\n },\n });\n const data = TimelineModel.TimelineModel.EventOnTimelineData.forEvent(event);\n data.stackTrace = event.args.data.stackTrace;\n assert.strictEqual(\n 'test.js:1:1', await Timeline.TimelineUIUtils.TimelineUIUtils.buildDetailsTextForTraceEvent(event));\n });\n\n describe('script location as an URL', function() {\n let event: TraceEngine.Legacy.ConstructedEvent;\n beforeEach(() => {\n event = new TraceEngine.Legacy.ConstructedEvent(\n 'devtools.timeline', TimelineModel.TimelineModel.RecordType.FunctionCall,\n TraceEngine.Types.TraceEvents.Phase.COMPLETE, 10, thread);\n\n event.addArgs({\n data: {\n functionName: 'test',\n url: 'https://google.com/test.js',\n scriptId: SCRIPT_ID_STRING,\n lineNumber: 0,\n columnNumber: 0,\n },\n });\n });\n it('makes the script location of a call frame a full URL when the inspected target is not the same the call frame was taken from (e.g. a loaded file)',\n async function() {\n target.setInspectedURL('https://not-google.com' as Platform.DevToolsPath.UrlString);\n const node = await Timeline.TimelineUIUtils.TimelineUIUtils.buildDetailsNodeForTraceEvent(\n event, target, new Components.Linkifier.Linkifier());\n if (!node) {\n throw new Error('Node was unexpectedly null');\n }\n assert.strictEqual(node.textContent, 'test @ google.com/test.js:1:1');\n });\n\n it('makes the script location of a call frame a script name when the inspected target is the one the call frame was taken from',\n async function() {\n target.setInspectedURL('https://google.com' as Platform.DevToolsPath.UrlString);\n const node = await Timeline.TimelineUIUtils.TimelineUIUtils.buildDetailsNodeForTraceEvent(\n event, target, new Components.Linkifier.Linkifier());\n if (!node) {\n throw new Error('Node was unexpectedly null');\n }\n assert.strictEqual(node.textContent, 'test @ /test.js:1:1');\n });\n });\n\n describe('mapping to authored script when recording is fresh', function() {\n beforeEach(async () => {\n // Register mock script and source map.\n\n const sourceMapContent = JSON.stringify({\n 'version': 3,\n 'names': ['unminified', 'par1', 'par2', 'console', 'log'],\n 'sources': [\n '/original-script.ts',\n ],\n 'file': '/test.js',\n 'sourcesContent': ['function unminified(par1, par2) {\\n console.log(par1, par2);\\n}\\n'],\n 'mappings': 'AAAA,SAASA,EAAWC,EAAMC,GACxBC,QAAQC,IAAIH,EAAMC',\n });\n setupPageResourceLoaderForSourceMap(sourceMapContent);\n target.setInspectedURL('https://google.com' as Platform.DevToolsPath.UrlString);\n const scriptUrl = 'https://google.com/script.js' as Platform.DevToolsPath.UrlString;\n const sourceMapUrl = 'script.js.map' as Platform.DevToolsPath.UrlString;\n const debuggerModel = target.model(SDK.DebuggerModel.DebuggerModel);\n assert.isNotNull(debuggerModel);\n if (debuggerModel === null) {\n return;\n }\n const sourceMapManager = debuggerModel.sourceMapManager();\n const script = debuggerModel.parsedScriptSource(\n SCRIPT_ID_STRING, scriptUrl, 0, 0, 0, 0, 0, '', undefined, false, sourceMapUrl, true, false, length, false,\n null, null, null, null, null);\n await sourceMapManager.sourceMapForClientPromise(script);\n });\n it('maps to the authored script when a call frame is provided', async function() {\n const linkifier = new Components.Linkifier.Linkifier();\n const node = Timeline.TimelineUIUtils.TimelineUIUtils.linkifyLocation({\n scriptId: SCRIPT_ID_STRING,\n url: 'https://google.com/test.js',\n lineNumber: 0,\n columnNumber: 0,\n isFreshRecording: true,\n target,\n linkifier,\n });\n if (!node) {\n throw new Error('Node was unexpectedly null');\n }\n // Wait for the location to be resolved using the registered source map.\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().pendingLiveLocationChangesPromise();\n\n assert.strictEqual(node.textContent, 'original-script.ts:1:1');\n });\n\n it('maps to the authored script when a trace event from the new engine with a stack trace is provided',\n async function() {\n const functionCallEvent = makeCompleteEvent('FunctionCall', 10, 100);\n functionCallEvent.args = ({\n data: {\n stackTrace: [{\n functionName: 'test',\n url: 'https://google.com/test.js',\n scriptId: SCRIPT_ID_NUMBER,\n lineNumber: 0,\n columnNumber: 0,\n }],\n },\n });\n const linkifier = new Components.Linkifier.Linkifier();\n const node =\n Timeline.TimelineUIUtils.TimelineUIUtils.linkifyTopCallFrame(functionCallEvent, target, linkifier, true);\n if (!node) {\n throw new Error('Node was unexpectedly null');\n }\n // Wait for the location to be resolved using the registered source map.\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()\n .pendingLiveLocationChangesPromise();\n\n assert.strictEqual(node.textContent, 'original-script.ts:1:1');\n });\n });\n\n describe('mapping to authored function name when recording is fresh', function() {\n it('maps to the authored name and script of a profile call', async function() {\n const {script} = await loadBasicSourceMapExample(target);\n // Ideally we would get a column number we can use from the source\n // map however the current status of the source map helpers makes\n // it difficult to do so.\n const columnNumber = 51;\n const profileCall = makeProfileCall(\n 'function', 10, 100, TraceEngine.Types.TraceEvents.ProcessID(1), TraceEngine.Types.TraceEvents.ThreadID(1));\n\n profileCall.callFrame = {\n 'columnNumber': columnNumber,\n 'functionName': 'minified',\n 'lineNumber': 0,\n 'scriptId': script.scriptId,\n 'url': 'file://gen.js',\n };\n const workersData: TraceEngine.Handlers.ModelHandlers.Workers.WorkersData = {\n workerSessionIdEvents: [],\n workerIdByThread: new Map(),\n workerURLById: new Map(),\n };\n // This only includes data used in the SourceMapsResolver\n const traceParsedData = {\n Samples: makeMockSamplesHandlerData([profileCall]),\n Workers: workersData,\n } as TraceEngine.Handlers.Types.TraceParseData;\n\n const resolver = new Timeline.SourceMapsResolver.SourceMapsResolver(traceParsedData);\n await resolver.install();\n\n const linkifier = new Components.Linkifier.Linkifier();\n const node = await Timeline.TimelineUIUtils.TimelineUIUtils.buildDetailsNodeForTraceEvent(\n profileCall, target, linkifier, true);\n if (!node) {\n throw new Error('Node was unexpectedly null');\n }\n assert.isTrue(node.textContent?.startsWith('someFunction @'));\n });\n });\n describe('adjusting timestamps for events and navigations', function() {\n it('adjusts the time for a DCL event after a navigation', async function() {\n const traceParsedData = await TraceLoader.traceEngine(this, 'web-dev.json.gz');\n\n const mainFrameID = traceParsedData.Meta.mainFrameId;\n\n const dclEvent = traceParsedData.PageLoadMetrics.allMarkerEvents.find(event => {\n return TraceEngine.Types.TraceEvents.isTraceEventMarkDOMContent(event) &&\n event.args.data?.frame === mainFrameID;\n });\n if (!dclEvent) {\n throw new Error('Could not find DCL event');\n }\n\n const traceMinBound = traceParsedData.Meta.traceBounds.min;\n\n // Round the time to 2DP to avoid needlessly long expectation numbers!\n const unadjustedStartTimeMilliseconds =\n TraceEngine.Helpers.Timing\n .microSecondsToMilliseconds(\n TraceEngine.Types.Timing.MicroSeconds(dclEvent.ts - traceMinBound),\n )\n .toFixed(2);\n assert.strictEqual(unadjustedStartTimeMilliseconds, String(190.79));\n\n const adjustedTime =\n Timeline.TimelineUIUtils.timeStampForEventAdjustedForClosestNavigationIfPossible(dclEvent, traceParsedData);\n assert.strictEqual(adjustedTime.toFixed(2), String(178.92));\n });\n\n it('can adjust the times for events that are not PageLoad markers', async function() {\n const traceParsedData = await TraceLoader.traceEngine(this, 'user-timings.json.gz');\n // Use a performance.mark event. Exact event is unimportant except that\n // it should not be a Page Load event as those are covered by the tests\n // above.\n const userMark = traceParsedData.UserTimings.performanceMarks.find(event => event.name === 'mark1');\n if (!userMark) {\n throw new Error('Could not find user mark');\n }\n\n const adjustedMarkTime =\n Timeline.TimelineUIUtils.timeStampForEventAdjustedForClosestNavigationIfPossible(userMark, traceParsedData);\n assert.strictEqual(adjustedMarkTime.toFixed(2), String(79.88));\n });\n });\n\n function getRowDataForDetailsElement(details: DocumentFragment) {\n return Array.from(details.querySelectorAll('.timeline-details-view-row')).map(row => {\n const title = row.querySelector('.timeline-details-view-row-title')?.innerText;\n const value = row.querySelector('.timeline-details-view-row-value')?.innerText;\n return {title, value};\n });\n }\n\n function getPieChartDataForDetailsElement(details: DocumentFragment) {\n const pieChartComp = details.querySelector('devtools-perf-piechart');\n if (!pieChartComp?.shadowRoot) {\n return [];\n }\n return Array.from(pieChartComp.shadowRoot.querySelectorAll('.pie-chart-legend-row')).map(row => {\n const title = row.querySelector('.pie-chart-name')?.innerText;\n const value = row.querySelector('.pie-chart-size')?.innerText;\n return {title, value};\n });\n }\n\n describe('colors', function() {\n before(() => {\n // Rather than use the real colours here and burden the test with having to\n // inject loads of CSS, we fake out the colours. this is fine for our tests as\n // the exact value of the colours is not important; we just make sure that it\n // parses them out correctly. Each variable is given a different rgb() value to\n // ensure we know the code is working and using the right one.\n const styleElement = document.createElement('style');\n styleElement.id = 'fake-perf-panel-colors';\n styleElement.textContent = `\n:root {\n --app-color-loading: rgb(0 0 0);\n --app-color-loading-children: rgb(1 1 1);\n --app-color-scripting: rgb(2 2 2);\n --app-color-scripting-children: rgb(3 3 3);\n --app-color-rendering: rgb(4 4 4);\n --app-color-rendering-children: rgb(5 5 5);\n --app-color-painting: rgb(6 6 6);\n --app-color-painting-children: rgb(7 7 7);\n --app-color-task: rgb(8 8 8);\n --app-color-task-children: rgb(9 9 9);\n --app-color-system: rgb(10 10 10);\n --app-color-system-children: rgb(11 11 11);\n --app-color-idle: rgb(12 12 12);\n --app-color-idle-children: rgb(13 13 13);\n --app-color-async: rgb(14 14 14);\n --app-color-async-children: rgb(15 15 15);\n --app-color-other: rgb(16 16 16);\n}\n`;\n document.documentElement.appendChild(styleElement);\n });\n\n after(() => {\n const styleElementToRemove = document.documentElement.querySelector('#fake-perf-panel-colors');\n if (styleElementToRemove) {\n document.documentElement.removeChild(styleElementToRemove);\n }\n });\n\n it('should return the correct rgb value for a corresponding CSS variable', function() {\n const parsedColor = Timeline.TimelineUIUtils.TimelineUIUtils.categories().scripting.getComputedColorValue();\n assert.strictEqual('rgb(2 2 2)', parsedColor);\n });\n\n it('should return the color as a CSS variable', function() {\n const cssVariable = Timeline.TimelineUIUtils.TimelineUIUtils.categories().scripting.getCSSValue();\n assert.strictEqual('var(--app-color-scripting)', cssVariable);\n });\n\n it('treats the v8.parseOnBackgroundWaiting as scripting even though it would usually be idle', function() {\n const event = new TraceEngine.Legacy.ConstructedEvent(\n 'v8,devtools.timeline,disabled-by-default-v8.compile',\n TimelineModel.TimelineModel.RecordType.StreamingCompileScriptWaiting,\n TraceEngine.Types.TraceEvents.Phase.COMPLETE, 10, thread);\n\n assert.strictEqual('rgb(2 2 2)', Timeline.TimelineUIUtils.TimelineUIUtils.eventColor(event));\n });\n\n it('assigns the correct color to the swatch of an event\\'s title', async function() {\n const data = await TraceLoader.allModels(this, 'lcp-web-font.json.gz');\n const events = data.traceParsedData.Renderer.allTraceEntries;\n const task = events.find(event => {\n return event.name.includes('RunTask');\n });\n if (!task) {\n throw new Error('Could not find expected event.');\n }\n\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildTraceEventDetails(\n task,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n false,\n );\n const titleSwatch: HTMLElement|null = details.querySelector('.timeline-details-chip-title div');\n assert.strictEqual(titleSwatch?.style.backgroundColor, 'rgb(10, 10, 10)');\n });\n it('assigns the correct color to the swatch of a network request title', async function() {\n const data = await TraceLoader.allModels(this, 'lcp-web-font.json.gz');\n const networkRequests = data.traceParsedData.NetworkRequests.byTime;\n const cssRequest = networkRequests.find(request => {\n return request.args.data.url === 'http://localhost:3000/app.css';\n });\n if (!cssRequest) {\n throw new Error('Could not find expected network request.');\n }\n\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildSyntheticNetworkRequestDetails(\n cssRequest,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n );\n const titleSwatch: HTMLElement|null = details.querySelector('.timeline-details-chip-title div');\n assert.strictEqual(titleSwatch?.style.backgroundColor, 'rgb(4, 4, 4)');\n });\n });\n\n describe('testContentMatching', () => {\n it('matches call frame events based on a regular expression and the contents of the event', async function() {\n const data = await TraceLoader.allModels(this, 'react-hello-world.json.gz');\n // Find an event from the trace that represents some work that React did. This\n // event is not chosen for any particular reason other than it was the example\n // used in the bug report: crbug.com/1484504\n const mainThread = getMainThread(data.traceParsedData.Renderer);\n const performConcurrentWorkEvent = mainThread.entries.find(entry => {\n if (TraceEngine.Types.TraceEvents.isProfileCall(entry)) {\n return entry.callFrame.functionName === 'performConcurrentWorkOnRoot';\n }\n return false;\n });\n if (!performConcurrentWorkEvent) {\n throw new Error('Could not find expected event');\n }\n assert.isTrue(Timeline.TimelineUIUtils.TimelineUIUtils.testContentMatching(\n performConcurrentWorkEvent, /perfo/, data.traceParsedData));\n });\n });\n\n describe('traceEventDetails', function() {\n it('shows the interaction ID and INP breakdown metrics for a given interaction', async function() {\n const data = await TraceLoader.allModels(this, 'one-second-interaction.json.gz');\n const interactionEvent = data.traceParsedData.UserInteractions.interactionEventsWithNoNesting.find(entry => {\n return entry.dur === 979974 && entry.type === 'click';\n });\n if (!interactionEvent) {\n throw new Error('Could not find expected event');\n }\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildTraceEventDetails(\n interactionEvent,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n false,\n data.traceParsedData,\n );\n const rowData = getRowDataForDetailsElement(details);\n assert.deepEqual(rowData, [\n {\n title: 'Warning',\n value: 'Long interaction is indicating poor page responsiveness.',\n },\n {\n title: 'ID',\n value: '4122',\n },\n {\n title: 'Input delay',\n value: '1ms',\n },\n {\n title: 'Processing time',\n value: '977ms',\n },\n {\n title: 'Presentation delay',\n value: '1.974ms',\n },\n ]);\n });\n\n it('renders all event data for a generic trace', async function() {\n const data = await TraceLoader.allModels(this, 'generic-about-tracing.json.gz');\n const event = data.traceParsedData.Renderer.allTraceEntries.find(entry => {\n return entry.name === 'ThreadControllerImpl::RunTask';\n });\n if (!event) {\n throw new Error('Could not find event.');\n }\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildTraceEventDetails(\n event,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n false,\n data.traceParsedData,\n );\n const rowData = getRowDataForDetailsElement(details);\n assert.deepEqual(rowData, [\n {\n title: 'chrome_task_annotator',\n value: '{\"delay_policy\":\"PRECISE\",\"task_delay_us\":7159}',\n },\n {\n title: 'src_file',\n value: '\"cc/scheduler/scheduler.cc\"',\n },\n {\n title: 'src_func',\n value: '\"ScheduleBeginImplFrameDeadline\"',\n },\n ]);\n });\n\n it('renders invalidations correctly', async function() {\n const data = await TraceLoader.allModels(this, 'style-invalidation-change-attribute.json.gz');\n\n // Set up a fake DOM so that we can request nodes by backend Ids (even\n // though we return none, we need to mock these calls else the frontend\n // will not work.)\n const documentNode = {nodeId: 1 as Protocol.DOM.BackendNodeId};\n setMockConnectionResponseHandler('DOM.getDocument', () => ({root: documentNode}));\n setMockConnectionResponseHandler('DOM.pushNodesByBackendIdsToFrontend', () => {\n return {\n nodeIds: [],\n };\n });\n\n const updateLayoutTreeEvent = data.traceParsedData.Renderer.allTraceEntries.find(event => {\n return TraceEngine.Types.TraceEvents.isTraceEventUpdateLayoutTree(event) &&\n event.args.beginData?.stackTrace?.[0].functionName === 'testFuncs.changeAttributeAndDisplay';\n });\n if (!updateLayoutTreeEvent) {\n throw new Error('Could not find update layout tree event');\n }\n\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildTraceEventDetails(\n updateLayoutTreeEvent,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n false,\n data.traceParsedData,\n );\n const rowData = getRowDataForDetailsElement(details);\n assert.deepEqual(rowData, [\n {\n title: 'Elements Affected',\n value: '3',\n },\n {\n // The \"Recalculation forced\" Stack trace output would be here but the detailRow helper is\n // unable to parse it, hence why this returns undefined.\n title: undefined,\n value: undefined,\n },\n {\n title: 'Initiated by',\n value: 'Schedule Style Recalculation',\n },\n {\n title: 'Pending for',\n value: '7.1 ms',\n },\n {\n title: 'PseudoClass:active',\n value: 'BUTTON id=\\'changeAttributeAndDisplay\\'',\n },\n {\n title: 'Attribute (dir)',\n value:\n 'DIV id=\\'testElementFour\\' at chromedevtools.github.io/performance-stories/style-invalidations/app.js:46',\n },\n {\n title: 'Attribute (dir)',\n value:\n 'DIV id=\\'testElementFive\\' at chromedevtools.github.io/performance-stories/style-invalidations/app.js:47',\n },\n {\n title: 'Element has pending invalidation list',\n value: 'DIV id=\\'testElementFour\\'',\n },\n {\n title: 'Element has pending invalidation list',\n value: 'DIV id=\\'testElementFive\\'',\n },\n ]);\n });\n\n it('renders details for a v8.compile (\"Compile Script\") event', async function() {\n const data = await TraceLoader.allModels(this, 'user-timings.json.gz');\n const compileEvent =\n data.traceParsedData.Renderer.allTraceEntries.find(TraceEngine.Types.TraceEvents.isTraceEventV8Compile);\n if (!compileEvent) {\n throw new Error('Could not find expected event');\n }\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildTraceEventDetails(\n compileEvent,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n false,\n data.traceParsedData,\n );\n const rowData = getRowDataForDetailsElement(details);\n assert.deepEqual(rowData, [\n {\n title: 'Script',\n // URL plus line/col number\n value: 'chrome-extension://blijaeebfebmkmekmdnehcmmcjnblkeo/lib/utils.js:1:1',\n },\n {\n title: 'Streamed',\n value: 'false: inline script',\n },\n {title: 'Compilation cache status', value: 'script not eligible'},\n ]);\n });\n\n it('renders the details for a layout shift properly', async function() {\n // Set related CDP methods responses to return our mock document and node.\n const domModel = target.model(SDK.DOMModel.DOMModel);\n assertNotNullOrUndefined(domModel);\n const documentNode = {nodeId: 1 as Protocol.DOM.NodeId};\n const docc = new SDK.DOMModel.DOMNode(domModel) as SDK.DOMModel.DOMDocument;\n const domNode2 = new SDK.DOMModel.DOMNode(domModel);\n const domID = 58 as Protocol.DOM.NodeId;\n domNode2.id = domID;\n\n setMockConnectionResponseHandler('DOM.pushNodesByBackendIdsToFrontend', () => ({nodeIds: [domID]}));\n\n setMockConnectionResponseHandler('DOM.getDocument', () => ({root: documentNode}));\n await domModel.requestDocument();\n domModel.registerNode(domNode2);\n domNode2.init(docc, false, {nodeName: 'A test node name', nodeId: domID} as Protocol.DOM.Node);\n const data = await TraceLoader.allModels(this, 'cls-single-frame.json.gz');\n const layoutShift = data.traceParsedData.LayoutShifts.clusters[0].events[0];\n Common.Linkifier.registerLinkifier({\n contextTypes() {\n return [Timeline.CLSLinkifier.CLSRect];\n },\n async loadLinkifier() {\n return Timeline.CLSLinkifier.Linkifier.instance();\n },\n });\n Common.Linkifier.registerLinkifier({\n contextTypes() {\n return [\n SDK.DOMModel.DOMNode,\n ];\n },\n async loadLinkifier() {\n return Elements.DOMLinkifier.Linkifier.instance();\n },\n });\n\n if (!layoutShift) {\n throw new Error('Could not find LayoutShift event.');\n }\n\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildTraceEventDetails(\n layoutShift,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n false,\n data.traceParsedData,\n );\n const rowData = getRowDataForDetailsElement(details);\n assert.deepEqual(\n rowData,\n [\n {\n title: 'Warning',\n value: 'Cumulative Layout Shifts can result in poor user experiences. It has recently evolved.',\n },\n {title: 'Score', value: '0.04218'},\n {title: 'Cumulative Score', value: '0.04218'},\n {title: 'Current Cluster ID', value: '1'},\n {title: 'Current Cluster Score', value: '0.2952'},\n {title: 'Had recent input', value: 'No'},\n {title: 'Moved from', value: 'Location: [120,670], Size: [900x900]'},\n {title: 'Moved to', value: 'Location: [120,1270], Size: [900x478]'},\n // The related node link value is under shadow root so it\n // can't be accessed at this point.\n {title: 'Related Node', value: ''},\n ],\n );\n // Test the related node link.\n const relatedNodeRow =\n details.querySelector('.timeline-details-view-row:nth-of-type(9) .timeline-details-view-row-value span')\n ?.shadowRoot;\n relatedNodeRow?.querySelector('div')?.innerText;\n assert.strictEqual(relatedNodeRow?.querySelector('div')?.innerText, 'A test node name');\n });\n\n it('renders the details for a profile call properly', async function() {\n Common.Linkifier.registerLinkifier({\n contextTypes() {\n return [Timeline.CLSLinkifier.CLSRect];\n },\n async loadLinkifier() {\n return Timeline.CLSLinkifier.Linkifier.instance();\n },\n });\n\n const data = await TraceLoader.allModels(this, 'simple-js-program.json.gz');\n const rendererHandler = data.traceParsedData.Renderer;\n if (!rendererHandler) {\n throw new Error('RendererHandler is undefined');\n }\n const [process] = rendererHandler.processes.values();\n const [thread] = process.threads.values();\n const profileCalls = thread.entries.filter(entry => TraceEngine.Types.TraceEvents.isProfileCall(entry));\n\n if (!profileCalls) {\n throw new Error('Could not find renderer events');\n }\n\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildTraceEventDetails(\n profileCalls[0],\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n false,\n data.traceParsedData,\n );\n const rowData = getRowDataForDetailsElement(details);\n assert.deepEqual(\n rowData,\n [\n {\n title: 'Function',\n value: '(anonymous) @ www.google.com:21:17',\n },\n ],\n );\n });\n\n it('renders the warning for a trace event in its details', async function() {\n const data = await TraceLoader.allModels(this, 'simple-js-program.json.gz');\n\n const events = data.traceParsedData.Renderer?.allTraceEntries;\n if (!events) {\n throw new Error('Could not find renderer events');\n }\n\n const longTask = events.find(e => (e.dur || 0) > 1_000_000);\n if (!longTask) {\n throw new Error('Could not find Long Task event.');\n }\n\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildTraceEventDetails(\n longTask,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n false,\n data.traceParsedData,\n );\n const rowData = getRowDataForDetailsElement(details);\n assert.deepEqual(\n rowData,\n [\n {\n title: 'Warning',\n value: 'Long task took 1.30\\u00A0s.',\n },\n ],\n );\n });\n\n it('shows information for the WebSocketCreate initiator when viewing a WebSocketSendHandshakeRequest event',\n async function() {\n const data = await TraceLoader.allModels(this, 'web-sockets.json.gz');\n const events = data.traceParsedData.Renderer?.allTraceEntries;\n if (!events) {\n throw new Error('Could not find renderer events');\n }\n\n const sendHandshake = events.find(TraceEngine.Types.TraceEvents.isTraceEventWebSocketSendHandshakeRequest);\n if (!sendHandshake) {\n throw new Error('Could not find handshake event.');\n }\n\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildTraceEventDetails(\n sendHandshake,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n false,\n data.traceParsedData,\n );\n const rowData = getRowDataForDetailsElement(details);\n const expectedRowData = [\n {title: 'URL', value: 'wss://socketsbay.com/wss/v2/1/demo/'},\n {\n // The 'First Invalidated' Stack trace output would be here but the detailRow helper is\n // unable to parse it, hence why this returns undefined.\n title: undefined,\n value: undefined,\n },\n {title: 'Initiated by', 'value': 'Create WebSocket'},\n {title: 'Pending for', value: '72.0 ms'},\n ];\n assert.deepEqual(\n rowData,\n expectedRowData,\n );\n });\n\n it('shows information for the events initiated by WebSocketCreate when viewing a WebSocketCreate event',\n async function() {\n const data = await TraceLoader.allModels(this, 'web-sockets.json.gz');\n const events = data.traceParsedData.Renderer?.allTraceEntries;\n if (!events) {\n throw new Error('Could not find renderer events');\n }\n\n const sendHandshake = events.find(TraceEngine.Types.TraceEvents.isTraceEventWebSocketCreate);\n if (!sendHandshake) {\n throw new Error('Could not find handshake event.');\n }\n\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildTraceEventDetails(\n sendHandshake,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n false,\n data.traceParsedData,\n );\n const rowData = getRowDataForDetailsElement(details);\n const expectedRowData = [\n {title: 'URL', value: 'wss://socketsbay.com/wss/v2/1/demo/'},\n // This value looks odd, but it is because the initiator stack trace cannot be\n // easily represented as a string, so this is OK.\n {title: undefined, value: undefined},\n // The 2 entries under \"Initiator for\" are displayed as seperate links and in the UI it is obvious they are seperate\n {title: 'Initiator for', 'value': 'Send WebSocket Handshake Receive WebSocket Handshake'},\n ];\n assert.deepEqual(\n rowData,\n expectedRowData,\n );\n });\n\n it('shows the aggregated time information for an event', async function() {\n const data = await TraceLoader.allModels(this, 'web-dev.json.gz');\n const event =\n data.traceParsedData.Renderer?.allTraceEntries.find(e => e.ts === 1020034919877 && e.name === 'RunTask');\n if (!event) {\n throw new Error('Could not find renderer events');\n }\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildTraceEventDetails(\n event,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n true,\n data.traceParsedData,\n );\n const pieChartData = getPieChartDataForDetailsElement(details);\n\n const expectedPieChartData = [\n {title: 'System (self)', value: '2\\u00A0ms'},\n {title: 'System (children)', value: '2\\u00A0ms'},\n {title: 'Rendering', value: '28\\u00A0ms'},\n {title: 'Painting', value: '2\\u00A0ms'},\n {title: 'Total', value: '34\\u00A0ms'},\n ];\n assert.deepEqual(\n pieChartData,\n expectedPieChartData,\n );\n });\n });\n\n it('can generate details for a frame', async function() {\n const traceParsedData = await TraceLoader.traceEngine(this, 'web-dev-with-commit.json.gz');\n const frame = traceParsedData.Frames.frames.at(0);\n if (!frame) {\n throw new Error('Could not find expected frame');\n }\n const filmStrip = TraceEngine.Extras.FilmStrip.fromTraceData(traceParsedData);\n const details =\n Timeline.TimelineUIUtils.TimelineUIUtils.generateDetailsContentForFrame(frame, filmStrip, filmStrip.frames[0]);\n const container = document.createElement('div');\n renderElementIntoDOM(container);\n container.appendChild(details);\n // Give the image element time to render and load.\n await doubleRaf();\n const img = container.querySelector('.timeline-filmstrip-preview img');\n assert.isTrue(img?.currentSrc.includes(filmStrip.frames[0].screenshotEvent.args.dataUri));\n\n const durationRow = container.querySelector('[data-row-title=\"Duration\"]');\n const durationValue = durationRow?.querySelector('.timeline-details-view-row-value span');\n if (!durationValue) {\n throw new Error('Could not find duration');\n }\n // Strip the unicode spaces out and replace with simple spaces for easy\n // assertions.\n const value = (durationValue.innerText.replaceAll(/\\s/g, ' '));\n assert.strictEqual(value, '37.85 ms (at 109.82 ms)');\n });\n\n describe('buildNetworkRequestDetails', function() {\n it('renders the right details for a network event from TraceEngine', async function() {\n const data = await TraceLoader.allModels(this, 'lcp-web-font.json.gz');\n const networkRequests = data.traceParsedData.NetworkRequests.byTime;\n const cssRequest = networkRequests.find(request => {\n return request.args.data.url === 'http://localhost:3000/app.css';\n });\n if (!cssRequest) {\n throw new Error('Could not find expected network request.');\n }\n\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildSyntheticNetworkRequestDetails(\n cssRequest,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n );\n\n const rowData = getRowDataForDetailsElement(details);\n\n assert.deepEqual(\n rowData,\n [\n {title: 'URL', value: 'localhost:3000/app.css'},\n {title: 'Duration', value: '4.075ms (3.08ms network transfer + 995μs resource loading)'},\n {title: 'Request Method', value: 'GET'},\n {title: 'Initial Priority', value: 'Highest'},\n {title: 'Priority', value: 'Highest'},\n {title: 'Mime Type', value: 'text/css'},\n {title: 'Encoded Data', value: '402 B'},\n {title: 'Decoded Body', value: '96 B'},\n ],\n );\n });\n });\n\n describe('eventTitle', function() {\n it('renders the correct title for an EventTiming interaction event', async function() {\n const data = await TraceLoader.allModels(this, 'slow-interaction-button-click.json.gz');\n const interactionEvent = data.traceParsedData.UserInteractions.interactionEventsWithNoNesting[0];\n const details = Timeline.TimelineUIUtils.TimelineUIUtils.eventTitle(interactionEvent);\n assert.deepEqual(details, 'Pointer');\n });\n\n it('will use the resolved function name for a profile node that has a sourcemap', async function() {\n // Timeline.SourceMapsResolver.SourceMapsResolver.\n const traceParsedData = await TraceLoader.traceEngine(this, 'slow-interaction-button-click.json.gz');\n\n const mainThread = getMainThread(traceParsedData.Renderer);\n const profileEntry = mainThread.entries.find(entry => {\n return TraceEngine.Types.TraceEvents.isProfileCall(entry);\n });\n if (!profileEntry || !TraceEngine.Types.TraceEvents.isProfileCall(profileEntry)) {\n throw new Error('Could not find a profile entry');\n }\n\n // Fake that we resolved the entry's name from a sourcemap.\n Timeline.SourceMapsResolver.SourceMapsResolver.storeResolvedNodeNameForEntry(\n profileEntry.pid, profileEntry.tid, profileEntry.nodeId, 'resolved-function-test');\n\n const title = Timeline.TimelineUIUtils.TimelineUIUtils.eventTitle(profileEntry);\n assert.strictEqual(title, 'resolved-function-test');\n });\n });\n\n describe('eventStyle', function() {\n it('returns the correct style for profile calls', async function() {\n const data = await TraceLoader.allModels(this, 'simple-js-program.json.gz');\n const rendererHandler = data.traceParsedData.Renderer;\n if (!rendererHandler) {\n throw new Error('RendererHandler is undefined');\n }\n const [process] = rendererHandler.processes.values();\n const [thread] = process.threads.values();\n const profileCalls = thread.entries.filter(entry => TraceEngine.Types.TraceEvents.isProfileCall(entry));\n const style = Timeline.TimelineUIUtils.TimelineUIUtils.eventStyle(profileCalls[0]);\n assert.strictEqual(style.category.name, 'scripting');\n assert.strictEqual(style.category.color, 'rgb(250 204 21 / 100%)');\n });\n });\n});\n"]} \ No newline at end of file +{"version":3,"file":"TimelineUIUtils.test.js","sourceRoot":"","sources":["../../../../../../front_end/panels/timeline/TimelineUIUtils.test.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AAEtD,OAAO,EAAC,wBAAwB,EAAC,MAAM,iCAAiC,CAAC;AACzE,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAE7C,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,KAAK,aAAa,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,SAAS,MAAM,qCAAqC,CAAC;AACjE,OAAO,KAAK,QAAQ,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAC,SAAS,EAAE,oBAAoB,EAAC,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAC,YAAY,EAAC,MAAM,qCAAqC,CAAC;AACjE,OAAO,EACL,kCAAkC,EAClC,0BAA0B,EAC1B,gCAAgC,GACjC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,yBAAyB,EACzB,mCAAmC,GACpC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,0BAA0B,EAC1B,eAAe,GAChB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,UAAU,MAAM,2CAA2C,CAAC;AAExE,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAE1C,MAAM,EAAC,MAAM,EAAC,GAAG,IAAI,CAAC;AAE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AAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport type * as Platform from '../../core/platform/platform.js';\nimport {assertNotNullOrUndefined} from '../../core/platform/platform.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport type * as Protocol from '../../generated/protocol.js';\nimport * as Bindings from '../../models/bindings/bindings.js';\nimport * as TimelineModel from '../../models/timeline_model/timeline_model.js';\nimport * as TraceEngine from '../../models/trace/trace.js';\nimport * as Workspace from '../../models/workspace/workspace.js';\nimport * as Elements from '../../panels/elements/elements.js';\nimport {doubleRaf, renderElementIntoDOM} from '../../testing/DOMHelpers.js';\nimport {createTarget} from '../../testing/EnvironmentHelpers.js';\nimport {\n clearMockConnectionResponseHandler,\n describeWithMockConnection,\n setMockConnectionResponseHandler,\n} from '../../testing/MockConnection.js';\nimport {\n loadBasicSourceMapExample,\n setupPageResourceLoaderForSourceMap,\n} from '../../testing/SourceMapHelpers.js';\nimport {\n getMainThread,\n makeCompleteEvent,\n makeMockSamplesHandlerData,\n makeProfileCall,\n} from '../../testing/TraceHelpers.js';\nimport {TraceLoader} from '../../testing/TraceLoader.js';\nimport * as Components from '../../ui/legacy/components/utils/utils.js';\n\nimport * as Timeline from './timeline.js';\n\nconst {assert} = chai;\n\ndescribeWithMockConnection('TimelineUIUtils', function() {\n let tracingModel: TraceEngine.Legacy.TracingModel;\n let process: TraceEngine.Legacy.Process;\n let thread: TraceEngine.Legacy.Thread;\n let target: SDK.Target.Target;\n // Trace events contain script ids as strings. However, the linkifier\n // utilities assume it is a number because that's how it's defined at\n // the protocol level. For practicality, we declare these two\n // variables so that we can satisfy type checking throughout the tests.\n const SCRIPT_ID_NUMBER = 1;\n const SCRIPT_ID_STRING = String(SCRIPT_ID_NUMBER) as Protocol.Runtime.ScriptId;\n\n beforeEach(() => {\n target = createTarget();\n tracingModel = new TraceEngine.Legacy.TracingModel();\n process = new TraceEngine.Legacy.Process(tracingModel, 1);\n thread = new TraceEngine.Legacy.Thread(process, 1);\n\n const workspace = Workspace.Workspace.WorkspaceImpl.instance();\n const targetManager = SDK.TargetManager.TargetManager.instance();\n const resourceMapping = new Bindings.ResourceMapping.ResourceMapping(targetManager, workspace);\n const debuggerWorkspaceBinding = Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance({\n forceNew: true,\n resourceMapping,\n targetManager,\n });\n Bindings.IgnoreListManager.IgnoreListManager.instance({forceNew: true, debuggerWorkspaceBinding});\n });\n\n afterEach(() => {\n clearMockConnectionResponseHandler('DOM.pushNodesByBackendIdsToFrontend');\n });\n\n it('creates top frame location text for function calls', async function() {\n const event = new TraceEngine.Legacy.ConstructedEvent(\n 'devtools.timeline', 'FunctionCall', TraceEngine.Types.TraceEvents.Phase.COMPLETE, 10, thread);\n\n event.addArgs({\n data: {\n functionName: 'test',\n url: 'test.js',\n scriptId: SCRIPT_ID_STRING,\n lineNumber: 0,\n columnNumber: 0,\n },\n });\n assert.strictEqual(\n 'test.js:1:1', await Timeline.TimelineUIUtils.TimelineUIUtils.buildDetailsTextForTraceEvent(event));\n });\n\n it('creates top frame location text as a fallback', async function() {\n // 'TimerInstall' is chosen such that we run into the 'default' case.\n const event = new TraceEngine.Legacy.ConstructedEvent(\n 'devtools.timeline', 'TimerInstall', TraceEngine.Types.TraceEvents.Phase.COMPLETE, 10, thread);\n\n event.addArgs({\n data: {\n stackTrace: [\n {\n functionName: 'test',\n url: 'test.js',\n scriptId: SCRIPT_ID_STRING,\n lineNumber: 0,\n columnNumber: 0,\n },\n ],\n },\n });\n const data = TimelineModel.TimelineModel.EventOnTimelineData.forEvent(event);\n data.stackTrace = event.args.data.stackTrace;\n assert.strictEqual(\n 'test.js:1:1', await Timeline.TimelineUIUtils.TimelineUIUtils.buildDetailsTextForTraceEvent(event));\n });\n\n describe('script location as an URL', function() {\n let event: TraceEngine.Legacy.ConstructedEvent;\n beforeEach(() => {\n event = new TraceEngine.Legacy.ConstructedEvent(\n 'devtools.timeline', TimelineModel.TimelineModel.RecordType.FunctionCall,\n TraceEngine.Types.TraceEvents.Phase.COMPLETE, 10, thread);\n\n event.addArgs({\n data: {\n functionName: 'test',\n url: 'https://google.com/test.js',\n scriptId: SCRIPT_ID_STRING,\n lineNumber: 0,\n columnNumber: 0,\n },\n });\n });\n it('makes the script location of a call frame a full URL when the inspected target is not the same the call frame was taken from (e.g. a loaded file)',\n async function() {\n target.setInspectedURL('https://not-google.com' as Platform.DevToolsPath.UrlString);\n const node = await Timeline.TimelineUIUtils.TimelineUIUtils.buildDetailsNodeForTraceEvent(\n event, target, new Components.Linkifier.Linkifier());\n if (!node) {\n throw new Error('Node was unexpectedly null');\n }\n assert.strictEqual(node.textContent, 'test @ google.com/test.js:1:1');\n });\n\n it('makes the script location of a call frame a script name when the inspected target is the one the call frame was taken from',\n async function() {\n target.setInspectedURL('https://google.com' as Platform.DevToolsPath.UrlString);\n const node = await Timeline.TimelineUIUtils.TimelineUIUtils.buildDetailsNodeForTraceEvent(\n event, target, new Components.Linkifier.Linkifier());\n if (!node) {\n throw new Error('Node was unexpectedly null');\n }\n assert.strictEqual(node.textContent, 'test @ /test.js:1:1');\n });\n });\n\n describe('mapping to authored script when recording is fresh', function() {\n beforeEach(async () => {\n // Register mock script and source map.\n\n const sourceMapContent = JSON.stringify({\n 'version': 3,\n 'names': ['unminified', 'par1', 'par2', 'console', 'log'],\n 'sources': [\n '/original-script.ts',\n ],\n 'file': '/test.js',\n 'sourcesContent': ['function unminified(par1, par2) {\\n console.log(par1, par2);\\n}\\n'],\n 'mappings': 'AAAA,SAASA,EAAWC,EAAMC,GACxBC,QAAQC,IAAIH,EAAMC',\n });\n setupPageResourceLoaderForSourceMap(sourceMapContent);\n target.setInspectedURL('https://google.com' as Platform.DevToolsPath.UrlString);\n const scriptUrl = 'https://google.com/script.js' as Platform.DevToolsPath.UrlString;\n const sourceMapUrl = 'script.js.map' as Platform.DevToolsPath.UrlString;\n const debuggerModel = target.model(SDK.DebuggerModel.DebuggerModel);\n assert.isNotNull(debuggerModel);\n if (debuggerModel === null) {\n return;\n }\n const sourceMapManager = debuggerModel.sourceMapManager();\n const script = debuggerModel.parsedScriptSource(\n SCRIPT_ID_STRING, scriptUrl, 0, 0, 0, 0, 0, '', undefined, false, sourceMapUrl, true, false, length, false,\n null, null, null, null, null);\n await sourceMapManager.sourceMapForClientPromise(script);\n });\n it('maps to the authored script when a call frame is provided', async function() {\n const linkifier = new Components.Linkifier.Linkifier();\n const node = Timeline.TimelineUIUtils.TimelineUIUtils.linkifyLocation({\n scriptId: SCRIPT_ID_STRING,\n url: 'https://google.com/test.js',\n lineNumber: 0,\n columnNumber: 0,\n isFreshRecording: true,\n target,\n linkifier,\n });\n if (!node) {\n throw new Error('Node was unexpectedly null');\n }\n // Wait for the location to be resolved using the registered source map.\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().pendingLiveLocationChangesPromise();\n\n assert.strictEqual(node.textContent, 'original-script.ts:1:1');\n });\n\n it('maps to the authored script when a trace event from the new engine with a stack trace is provided',\n async function() {\n const functionCallEvent = makeCompleteEvent('FunctionCall', 10, 100);\n functionCallEvent.args = ({\n data: {\n stackTrace: [{\n functionName: 'test',\n url: 'https://google.com/test.js',\n scriptId: SCRIPT_ID_NUMBER,\n lineNumber: 0,\n columnNumber: 0,\n }],\n },\n });\n const linkifier = new Components.Linkifier.Linkifier();\n const node =\n Timeline.TimelineUIUtils.TimelineUIUtils.linkifyTopCallFrame(functionCallEvent, target, linkifier, true);\n if (!node) {\n throw new Error('Node was unexpectedly null');\n }\n // Wait for the location to be resolved using the registered source map.\n await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()\n .pendingLiveLocationChangesPromise();\n\n assert.strictEqual(node.textContent, 'original-script.ts:1:1');\n });\n });\n\n describe('mapping to authored function name when recording is fresh', function() {\n it('maps to the authored name and script of a profile call', async function() {\n const {script} = await loadBasicSourceMapExample(target);\n // Ideally we would get a column number we can use from the source\n // map however the current status of the source map helpers makes\n // it difficult to do so.\n const columnNumber = 51;\n const profileCall = makeProfileCall(\n 'function', 10, 100, TraceEngine.Types.TraceEvents.ProcessID(1), TraceEngine.Types.TraceEvents.ThreadID(1));\n\n profileCall.callFrame = {\n 'columnNumber': columnNumber,\n 'functionName': 'minified',\n 'lineNumber': 0,\n 'scriptId': script.scriptId,\n 'url': 'file://gen.js',\n };\n const workersData: TraceEngine.Handlers.ModelHandlers.Workers.WorkersData = {\n workerSessionIdEvents: [],\n workerIdByThread: new Map(),\n workerURLById: new Map(),\n };\n // This only includes data used in the SourceMapsResolver\n const traceParsedData = {\n Samples: makeMockSamplesHandlerData([profileCall]),\n Workers: workersData,\n } as TraceEngine.Handlers.Types.TraceParseData;\n\n const resolver = new Timeline.SourceMapsResolver.SourceMapsResolver(traceParsedData);\n await resolver.install();\n\n const linkifier = new Components.Linkifier.Linkifier();\n const node = await Timeline.TimelineUIUtils.TimelineUIUtils.buildDetailsNodeForTraceEvent(\n profileCall, target, linkifier, true);\n if (!node) {\n throw new Error('Node was unexpectedly null');\n }\n assert.isTrue(node.textContent?.startsWith('someFunction @'));\n });\n });\n describe('adjusting timestamps for events and navigations', function() {\n it('adjusts the time for a DCL event after a navigation', async function() {\n const traceParsedData = await TraceLoader.traceEngine(this, 'web-dev.json.gz');\n\n const mainFrameID = traceParsedData.Meta.mainFrameId;\n\n const dclEvent = traceParsedData.PageLoadMetrics.allMarkerEvents.find(event => {\n return TraceEngine.Types.TraceEvents.isTraceEventMarkDOMContent(event) &&\n event.args.data?.frame === mainFrameID;\n });\n if (!dclEvent) {\n throw new Error('Could not find DCL event');\n }\n\n const traceMinBound = traceParsedData.Meta.traceBounds.min;\n\n // Round the time to 2DP to avoid needlessly long expectation numbers!\n const unadjustedStartTimeMilliseconds =\n TraceEngine.Helpers.Timing\n .microSecondsToMilliseconds(\n TraceEngine.Types.Timing.MicroSeconds(dclEvent.ts - traceMinBound),\n )\n .toFixed(2);\n assert.strictEqual(unadjustedStartTimeMilliseconds, String(190.79));\n\n const adjustedTime =\n Timeline.TimelineUIUtils.timeStampForEventAdjustedForClosestNavigationIfPossible(dclEvent, traceParsedData);\n assert.strictEqual(adjustedTime.toFixed(2), String(178.92));\n });\n\n it('can adjust the times for events that are not PageLoad markers', async function() {\n const traceParsedData = await TraceLoader.traceEngine(this, 'user-timings.json.gz');\n // Use a performance.mark event. Exact event is unimportant except that\n // it should not be a Page Load event as those are covered by the tests\n // above.\n const userMark = traceParsedData.UserTimings.performanceMarks.find(event => event.name === 'mark1');\n if (!userMark) {\n throw new Error('Could not find user mark');\n }\n\n const adjustedMarkTime =\n Timeline.TimelineUIUtils.timeStampForEventAdjustedForClosestNavigationIfPossible(userMark, traceParsedData);\n assert.strictEqual(adjustedMarkTime.toFixed(2), String(79.88));\n });\n });\n\n function getRowDataForDetailsElement(details: DocumentFragment) {\n return Array.from(details.querySelectorAll('.timeline-details-view-row')).map(row => {\n const title = row.querySelector('.timeline-details-view-row-title')?.innerText;\n const value = row.querySelector('.timeline-details-view-row-value')?.innerText;\n return {title, value};\n });\n }\n\n function getPieChartDataForDetailsElement(details: DocumentFragment) {\n const pieChartComp = details.querySelector('devtools-perf-piechart');\n if (!pieChartComp?.shadowRoot) {\n return [];\n }\n return Array.from(pieChartComp.shadowRoot.querySelectorAll('.pie-chart-legend-row')).map(row => {\n const title = row.querySelector('.pie-chart-name')?.innerText;\n const value = row.querySelector('.pie-chart-size')?.innerText;\n return {title, value};\n });\n }\n\n describe('colors', function() {\n before(() => {\n // Rather than use the real colours here and burden the test with having to\n // inject loads of CSS, we fake out the colours. this is fine for our tests as\n // the exact value of the colours is not important; we just make sure that it\n // parses them out correctly. Each variable is given a different rgb() value to\n // ensure we know the code is working and using the right one.\n const styleElement = document.createElement('style');\n styleElement.id = 'fake-perf-panel-colors';\n styleElement.textContent = `\n:root {\n --app-color-loading: rgb(0 0 0);\n --app-color-loading-children: rgb(1 1 1);\n --app-color-scripting: rgb(2 2 2);\n --app-color-scripting-children: rgb(3 3 3);\n --app-color-rendering: rgb(4 4 4);\n --app-color-rendering-children: rgb(5 5 5);\n --app-color-painting: rgb(6 6 6);\n --app-color-painting-children: rgb(7 7 7);\n --app-color-task: rgb(8 8 8);\n --app-color-task-children: rgb(9 9 9);\n --app-color-system: rgb(10 10 10);\n --app-color-system-children: rgb(11 11 11);\n --app-color-idle: rgb(12 12 12);\n --app-color-idle-children: rgb(13 13 13);\n --app-color-async: rgb(14 14 14);\n --app-color-async-children: rgb(15 15 15);\n --app-color-other: rgb(16 16 16);\n}\n`;\n document.documentElement.appendChild(styleElement);\n });\n\n after(() => {\n const styleElementToRemove = document.documentElement.querySelector('#fake-perf-panel-colors');\n if (styleElementToRemove) {\n document.documentElement.removeChild(styleElementToRemove);\n }\n });\n\n it('should return the correct rgb value for a corresponding CSS variable', function() {\n const parsedColor = Timeline.TimelineUIUtils.TimelineUIUtils.categories().scripting.getComputedColorValue();\n assert.strictEqual('rgb(2 2 2)', parsedColor);\n });\n\n it('should return the color as a CSS variable', function() {\n const cssVariable = Timeline.TimelineUIUtils.TimelineUIUtils.categories().scripting.getCSSValue();\n assert.strictEqual('var(--app-color-scripting)', cssVariable);\n });\n\n it('treats the v8.parseOnBackgroundWaiting as scripting even though it would usually be idle', function() {\n const event = new TraceEngine.Legacy.ConstructedEvent(\n 'v8,devtools.timeline,disabled-by-default-v8.compile',\n TimelineModel.TimelineModel.RecordType.StreamingCompileScriptWaiting,\n TraceEngine.Types.TraceEvents.Phase.COMPLETE, 10, thread);\n\n assert.strictEqual('rgb(2 2 2)', Timeline.TimelineUIUtils.TimelineUIUtils.eventColor(event));\n });\n\n it('assigns the correct color to the swatch of an event\\'s title', async function() {\n const data = await TraceLoader.allModels(this, 'lcp-web-font.json.gz');\n const events = data.traceParsedData.Renderer.allTraceEntries;\n const task = events.find(event => {\n return event.name.includes('RunTask');\n });\n if (!task) {\n throw new Error('Could not find expected event.');\n }\n\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildTraceEventDetails(\n task,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n false,\n );\n const titleSwatch: HTMLElement|null = details.querySelector('.timeline-details-chip-title div');\n assert.strictEqual(titleSwatch?.style.backgroundColor, 'rgb(10, 10, 10)');\n });\n it('assigns the correct color to the swatch of a network request title', async function() {\n const data = await TraceLoader.allModels(this, 'lcp-web-font.json.gz');\n const networkRequests = data.traceParsedData.NetworkRequests.byTime;\n const cssRequest = networkRequests.find(request => {\n return request.args.data.url === 'http://localhost:3000/app.css';\n });\n if (!cssRequest) {\n throw new Error('Could not find expected network request.');\n }\n\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildSyntheticNetworkRequestDetails(\n cssRequest,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n );\n const titleSwatch: HTMLElement|null = details.querySelector('.timeline-details-chip-title div');\n assert.strictEqual(titleSwatch?.style.backgroundColor, 'rgb(4, 4, 4)');\n });\n });\n\n describe('testContentMatching', () => {\n it('matches call frame events based on a regular expression and the contents of the event', async function() {\n const data = await TraceLoader.allModels(this, 'react-hello-world.json.gz');\n // Find an event from the trace that represents some work that React did. This\n // event is not chosen for any particular reason other than it was the example\n // used in the bug report: crbug.com/1484504\n const mainThread = getMainThread(data.traceParsedData.Renderer);\n const performConcurrentWorkEvent = mainThread.entries.find(entry => {\n if (TraceEngine.Types.TraceEvents.isProfileCall(entry)) {\n return entry.callFrame.functionName === 'performConcurrentWorkOnRoot';\n }\n return false;\n });\n if (!performConcurrentWorkEvent) {\n throw new Error('Could not find expected event');\n }\n assert.isTrue(Timeline.TimelineUIUtils.TimelineUIUtils.testContentMatching(\n performConcurrentWorkEvent, /perfo/, data.traceParsedData));\n });\n });\n\n describe('traceEventDetails', function() {\n it('shows the interaction ID and INP breakdown metrics for a given interaction', async function() {\n const data = await TraceLoader.allModels(this, 'one-second-interaction.json.gz');\n const interactionEvent = data.traceParsedData.UserInteractions.interactionEventsWithNoNesting.find(entry => {\n return entry.dur === 979974 && entry.type === 'click';\n });\n if (!interactionEvent) {\n throw new Error('Could not find expected event');\n }\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildTraceEventDetails(\n interactionEvent,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n false,\n data.traceParsedData,\n );\n const rowData = getRowDataForDetailsElement(details);\n assert.deepEqual(rowData, [\n {\n title: 'Warning',\n value: 'Long interaction is indicating poor page responsiveness.',\n },\n {\n title: 'ID',\n value: '4122',\n },\n {\n title: 'Input delay',\n value: '1ms',\n },\n {\n title: 'Processing time',\n value: '977ms',\n },\n {\n title: 'Presentation delay',\n value: '1.974ms',\n },\n ]);\n });\n\n it('renders all event data for a generic trace', async function() {\n const data = await TraceLoader.allModels(this, 'generic-about-tracing.json.gz');\n const event = data.traceParsedData.Renderer.allTraceEntries.find(entry => {\n return entry.name === 'ThreadControllerImpl::RunTask';\n });\n if (!event) {\n throw new Error('Could not find event.');\n }\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildTraceEventDetails(\n event,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n false,\n data.traceParsedData,\n );\n const rowData = getRowDataForDetailsElement(details);\n assert.deepEqual(rowData, [\n {\n title: 'chrome_task_annotator',\n value: '{\"delay_policy\":\"PRECISE\",\"task_delay_us\":7159}',\n },\n {\n title: 'src_file',\n value: '\"cc/scheduler/scheduler.cc\"',\n },\n {\n title: 'src_func',\n value: '\"ScheduleBeginImplFrameDeadline\"',\n },\n ]);\n });\n\n it('renders invalidations correctly', async function() {\n const data = await TraceLoader.allModels(this, 'style-invalidation-change-attribute.json.gz');\n\n // Set up a fake DOM so that we can request nodes by backend Ids (even\n // though we return none, we need to mock these calls else the frontend\n // will not work.)\n const documentNode = {nodeId: 1 as Protocol.DOM.BackendNodeId};\n setMockConnectionResponseHandler('DOM.getDocument', () => ({root: documentNode}));\n setMockConnectionResponseHandler('DOM.pushNodesByBackendIdsToFrontend', () => {\n return {\n nodeIds: [],\n };\n });\n\n const updateLayoutTreeEvent = data.traceParsedData.Renderer.allTraceEntries.find(event => {\n return TraceEngine.Types.TraceEvents.isTraceEventUpdateLayoutTree(event) &&\n event.args.beginData?.stackTrace?.[0].functionName === 'testFuncs.changeAttributeAndDisplay';\n });\n if (!updateLayoutTreeEvent) {\n throw new Error('Could not find update layout tree event');\n }\n\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildTraceEventDetails(\n updateLayoutTreeEvent,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n false,\n data.traceParsedData,\n );\n const rowData = getRowDataForDetailsElement(details);\n assert.deepEqual(rowData, [\n {\n title: 'Elements Affected',\n value: '3',\n },\n {\n // The \"Recalculation forced\" Stack trace output would be here but the detailRow helper is\n // unable to parse it, hence why this returns undefined.\n title: undefined,\n value: undefined,\n },\n {\n title: 'Initiated by',\n value: 'Schedule Style Recalculation',\n },\n {\n title: 'Pending for',\n value: '7.1 ms',\n },\n {\n title: 'PseudoClass:active',\n value: 'BUTTON id=\\'changeAttributeAndDisplay\\'',\n },\n {\n title: 'Attribute (dir)',\n value:\n 'DIV id=\\'testElementFour\\' at chromedevtools.github.io/performance-stories/style-invalidations/app.js:46',\n },\n {\n title: 'Attribute (dir)',\n value:\n 'DIV id=\\'testElementFive\\' at chromedevtools.github.io/performance-stories/style-invalidations/app.js:47',\n },\n {\n title: 'Element has pending invalidation list',\n value: 'DIV id=\\'testElementFour\\'',\n },\n {\n title: 'Element has pending invalidation list',\n value: 'DIV id=\\'testElementFive\\'',\n },\n ]);\n });\n\n it('renders details for a v8.compile (\"Compile Script\") event', async function() {\n const data = await TraceLoader.allModels(this, 'user-timings.json.gz');\n const compileEvent =\n data.traceParsedData.Renderer.allTraceEntries.find(TraceEngine.Types.TraceEvents.isTraceEventV8Compile);\n if (!compileEvent) {\n throw new Error('Could not find expected event');\n }\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildTraceEventDetails(\n compileEvent,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n false,\n data.traceParsedData,\n );\n const rowData = getRowDataForDetailsElement(details);\n assert.deepEqual(rowData, [\n {\n title: 'Script',\n // URL plus line/col number\n value: 'chrome-extension://blijaeebfebmkmekmdnehcmmcjnblkeo/lib/utils.js:1:1',\n },\n {\n title: 'Streamed',\n value: 'false: inline script',\n },\n {title: 'Compilation cache status', value: 'script not eligible'},\n ]);\n });\n\n it('renders the details for a layout shift properly', async function() {\n // Set related CDP methods responses to return our mock document and node.\n const domModel = target.model(SDK.DOMModel.DOMModel);\n assertNotNullOrUndefined(domModel);\n const documentNode = {nodeId: 1 as Protocol.DOM.NodeId};\n const docc = new SDK.DOMModel.DOMNode(domModel) as SDK.DOMModel.DOMDocument;\n const domNode2 = new SDK.DOMModel.DOMNode(domModel);\n const domID = 58 as Protocol.DOM.NodeId;\n domNode2.id = domID;\n\n setMockConnectionResponseHandler('DOM.pushNodesByBackendIdsToFrontend', () => ({nodeIds: [domID]}));\n\n setMockConnectionResponseHandler('DOM.getDocument', () => ({root: documentNode}));\n await domModel.requestDocument();\n domModel.registerNode(domNode2);\n domNode2.init(docc, false, {nodeName: 'A test node name', nodeId: domID} as Protocol.DOM.Node);\n const data = await TraceLoader.allModels(this, 'cls-single-frame.json.gz');\n const layoutShift = data.traceParsedData.LayoutShifts.clusters[0].events[0];\n Common.Linkifier.registerLinkifier({\n contextTypes() {\n return [Timeline.CLSLinkifier.CLSRect];\n },\n async loadLinkifier() {\n return Timeline.CLSLinkifier.Linkifier.instance();\n },\n });\n Common.Linkifier.registerLinkifier({\n contextTypes() {\n return [\n SDK.DOMModel.DOMNode,\n ];\n },\n async loadLinkifier() {\n return Elements.DOMLinkifier.Linkifier.instance();\n },\n });\n\n if (!layoutShift) {\n throw new Error('Could not find LayoutShift event.');\n }\n\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildTraceEventDetails(\n layoutShift,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n false,\n data.traceParsedData,\n );\n const rowData = getRowDataForDetailsElement(details);\n assert.deepEqual(\n rowData,\n [\n {\n title: 'Warning',\n value: 'Cumulative Layout Shifts can result in poor user experiences. It has recently evolved.',\n },\n {title: 'Score', value: '0.04218'},\n {title: 'Cumulative Score', value: '0.04218'},\n {title: 'Current Cluster ID', value: '1'},\n {title: 'Current Cluster Score', value: '0.2952'},\n {title: 'Had recent input', value: 'No'},\n {title: 'Moved from', value: 'Location: [120,670], Size: [900x900]'},\n {title: 'Moved to', value: 'Location: [120,1270], Size: [900x478]'},\n // The related node link value is under shadow root so it\n // can't be accessed at this point.\n {title: 'Related Node', value: ''},\n ],\n );\n // Test the related node link.\n const relatedNodeRow =\n details.querySelector('.timeline-details-view-row:nth-of-type(9) .timeline-details-view-row-value span')\n ?.shadowRoot;\n relatedNodeRow?.querySelector('button')?.innerText;\n assert.strictEqual(relatedNodeRow?.querySelector('button')?.innerText, 'A test node name');\n });\n\n it('renders the details for a profile call properly', async function() {\n Common.Linkifier.registerLinkifier({\n contextTypes() {\n return [Timeline.CLSLinkifier.CLSRect];\n },\n async loadLinkifier() {\n return Timeline.CLSLinkifier.Linkifier.instance();\n },\n });\n\n const data = await TraceLoader.allModels(this, 'simple-js-program.json.gz');\n const rendererHandler = data.traceParsedData.Renderer;\n if (!rendererHandler) {\n throw new Error('RendererHandler is undefined');\n }\n const [process] = rendererHandler.processes.values();\n const [thread] = process.threads.values();\n const profileCalls = thread.entries.filter(entry => TraceEngine.Types.TraceEvents.isProfileCall(entry));\n\n if (!profileCalls) {\n throw new Error('Could not find renderer events');\n }\n\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildTraceEventDetails(\n profileCalls[0],\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n false,\n data.traceParsedData,\n );\n const rowData = getRowDataForDetailsElement(details);\n assert.deepEqual(\n rowData,\n [\n {\n title: 'Function',\n value: '(anonymous) @ www.google.com:21:17',\n },\n ],\n );\n });\n\n it('renders the warning for a trace event in its details', async function() {\n const data = await TraceLoader.allModels(this, 'simple-js-program.json.gz');\n\n const events = data.traceParsedData.Renderer?.allTraceEntries;\n if (!events) {\n throw new Error('Could not find renderer events');\n }\n\n const longTask = events.find(e => (e.dur || 0) > 1_000_000);\n if (!longTask) {\n throw new Error('Could not find Long Task event.');\n }\n\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildTraceEventDetails(\n longTask,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n false,\n data.traceParsedData,\n );\n const rowData = getRowDataForDetailsElement(details);\n assert.deepEqual(\n rowData,\n [\n {\n title: 'Warning',\n value: 'Long task took 1.30\\u00A0s.',\n },\n ],\n );\n });\n\n it('shows information for the WebSocketCreate initiator when viewing a WebSocketSendHandshakeRequest event',\n async function() {\n const data = await TraceLoader.allModels(this, 'web-sockets.json.gz');\n const events = data.traceParsedData.Renderer?.allTraceEntries;\n if (!events) {\n throw new Error('Could not find renderer events');\n }\n\n const sendHandshake = events.find(TraceEngine.Types.TraceEvents.isTraceEventWebSocketSendHandshakeRequest);\n if (!sendHandshake) {\n throw new Error('Could not find handshake event.');\n }\n\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildTraceEventDetails(\n sendHandshake,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n false,\n data.traceParsedData,\n );\n const rowData = getRowDataForDetailsElement(details);\n const expectedRowData = [\n {title: 'URL', value: 'wss://socketsbay.com/wss/v2/1/demo/'},\n {\n // The 'First Invalidated' Stack trace output would be here but the detailRow helper is\n // unable to parse it, hence why this returns undefined.\n title: undefined,\n value: undefined,\n },\n {title: 'Initiated by', 'value': 'Create WebSocket'},\n {title: 'Pending for', value: '72.0 ms'},\n ];\n assert.deepEqual(\n rowData,\n expectedRowData,\n );\n });\n\n it('shows information for the events initiated by WebSocketCreate when viewing a WebSocketCreate event',\n async function() {\n const data = await TraceLoader.allModels(this, 'web-sockets.json.gz');\n const events = data.traceParsedData.Renderer?.allTraceEntries;\n if (!events) {\n throw new Error('Could not find renderer events');\n }\n\n const sendHandshake = events.find(TraceEngine.Types.TraceEvents.isTraceEventWebSocketCreate);\n if (!sendHandshake) {\n throw new Error('Could not find handshake event.');\n }\n\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildTraceEventDetails(\n sendHandshake,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n false,\n data.traceParsedData,\n );\n const rowData = getRowDataForDetailsElement(details);\n const expectedRowData = [\n {title: 'URL', value: 'wss://socketsbay.com/wss/v2/1/demo/'},\n // This value looks odd, but it is because the initiator stack trace cannot be\n // easily represented as a string, so this is OK.\n {title: undefined, value: undefined},\n // The 2 entries under \"Initiator for\" are displayed as seperate links and in the UI it is obvious they are seperate\n {title: 'Initiator for', 'value': 'Send WebSocket Handshake Receive WebSocket Handshake'},\n ];\n assert.deepEqual(\n rowData,\n expectedRowData,\n );\n });\n\n it('shows the aggregated time information for an event', async function() {\n const data = await TraceLoader.allModels(this, 'web-dev.json.gz');\n const event =\n data.traceParsedData.Renderer?.allTraceEntries.find(e => e.ts === 1020034919877 && e.name === 'RunTask');\n if (!event) {\n throw new Error('Could not find renderer events');\n }\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildTraceEventDetails(\n event,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n true,\n data.traceParsedData,\n );\n const pieChartData = getPieChartDataForDetailsElement(details);\n\n const expectedPieChartData = [\n {title: 'System (self)', value: '2\\u00A0ms'},\n {title: 'System (children)', value: '2\\u00A0ms'},\n {title: 'Rendering', value: '28\\u00A0ms'},\n {title: 'Painting', value: '2\\u00A0ms'},\n {title: 'Total', value: '34\\u00A0ms'},\n ];\n assert.deepEqual(\n pieChartData,\n expectedPieChartData,\n );\n });\n });\n\n it('can generate details for a frame', async function() {\n const traceParsedData = await TraceLoader.traceEngine(this, 'web-dev-with-commit.json.gz');\n const frame = traceParsedData.Frames.frames.at(0);\n if (!frame) {\n throw new Error('Could not find expected frame');\n }\n const filmStrip = TraceEngine.Extras.FilmStrip.fromTraceData(traceParsedData);\n const details =\n Timeline.TimelineUIUtils.TimelineUIUtils.generateDetailsContentForFrame(frame, filmStrip, filmStrip.frames[0]);\n const container = document.createElement('div');\n renderElementIntoDOM(container);\n container.appendChild(details);\n // Give the image element time to render and load.\n await doubleRaf();\n const img = container.querySelector('.timeline-filmstrip-preview img');\n assert.isTrue(img?.currentSrc.includes(filmStrip.frames[0].screenshotEvent.args.dataUri));\n\n const durationRow = container.querySelector('[data-row-title=\"Duration\"]');\n const durationValue = durationRow?.querySelector('.timeline-details-view-row-value span');\n if (!durationValue) {\n throw new Error('Could not find duration');\n }\n // Strip the unicode spaces out and replace with simple spaces for easy\n // assertions.\n const value = (durationValue.innerText.replaceAll(/\\s/g, ' '));\n assert.strictEqual(value, '37.85 ms (at 109.82 ms)');\n });\n\n describe('buildNetworkRequestDetails', function() {\n it('renders the right details for a network event from TraceEngine', async function() {\n const data = await TraceLoader.allModels(this, 'lcp-web-font.json.gz');\n const networkRequests = data.traceParsedData.NetworkRequests.byTime;\n const cssRequest = networkRequests.find(request => {\n return request.args.data.url === 'http://localhost:3000/app.css';\n });\n if (!cssRequest) {\n throw new Error('Could not find expected network request.');\n }\n\n const details = await Timeline.TimelineUIUtils.TimelineUIUtils.buildSyntheticNetworkRequestDetails(\n cssRequest,\n data.timelineModel,\n new Components.Linkifier.Linkifier(),\n );\n\n const rowData = getRowDataForDetailsElement(details);\n\n assert.deepEqual(\n rowData,\n [\n {title: 'URL', value: 'localhost:3000/app.css'},\n {title: 'Duration', value: '4.075ms (3.08ms network transfer + 995μs resource loading)'},\n {title: 'Request Method', value: 'GET'},\n {title: 'Initial Priority', value: 'Highest'},\n {title: 'Priority', value: 'Highest'},\n {title: 'Mime Type', value: 'text/css'},\n {title: 'Encoded Data', value: '402 B'},\n {title: 'Decoded Body', value: '96 B'},\n ],\n );\n });\n });\n\n describe('eventTitle', function() {\n it('renders the correct title for an EventTiming interaction event', async function() {\n const data = await TraceLoader.allModels(this, 'slow-interaction-button-click.json.gz');\n const interactionEvent = data.traceParsedData.UserInteractions.interactionEventsWithNoNesting[0];\n const details = Timeline.TimelineUIUtils.TimelineUIUtils.eventTitle(interactionEvent);\n assert.deepEqual(details, 'Pointer');\n });\n\n it('will use the resolved function name for a profile node that has a sourcemap', async function() {\n // Timeline.SourceMapsResolver.SourceMapsResolver.\n const traceParsedData = await TraceLoader.traceEngine(this, 'slow-interaction-button-click.json.gz');\n\n const mainThread = getMainThread(traceParsedData.Renderer);\n const profileEntry = mainThread.entries.find(entry => {\n return TraceEngine.Types.TraceEvents.isProfileCall(entry);\n });\n if (!profileEntry || !TraceEngine.Types.TraceEvents.isProfileCall(profileEntry)) {\n throw new Error('Could not find a profile entry');\n }\n\n // Fake that we resolved the entry's name from a sourcemap.\n Timeline.SourceMapsResolver.SourceMapsResolver.storeResolvedNodeNameForEntry(\n profileEntry.pid, profileEntry.tid, profileEntry.nodeId, 'resolved-function-test');\n\n const title = Timeline.TimelineUIUtils.TimelineUIUtils.eventTitle(profileEntry);\n assert.strictEqual(title, 'resolved-function-test');\n });\n });\n\n describe('eventStyle', function() {\n it('returns the correct style for profile calls', async function() {\n const data = await TraceLoader.allModels(this, 'simple-js-program.json.gz');\n const rendererHandler = data.traceParsedData.Renderer;\n if (!rendererHandler) {\n throw new Error('RendererHandler is undefined');\n }\n const [process] = rendererHandler.processes.values();\n const [thread] = process.threads.values();\n const profileCalls = thread.entries.filter(entry => TraceEngine.Types.TraceEvents.isProfileCall(entry));\n const style = Timeline.TimelineUIUtils.TimelineUIUtils.eventStyle(profileCalls[0]);\n assert.strictEqual(style.category.name, 'scripting');\n assert.strictEqual(style.category.color, 'rgb(250 204 21 / 100%)');\n });\n });\n});\n"]} \ No newline at end of file diff --git a/public/panels/timeline/components/components-tsconfig.json b/public/panels/timeline/components/components-tsconfig.json index ecbd8ffec..d9e40eb53 100644 --- a/public/panels/timeline/components/components-tsconfig.json +++ b/public/panels/timeline/components/components-tsconfig.json @@ -36,8 +36,7 @@ "../../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/timeline/components/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/panels/timeline/components/devtools_entrypoint-bundle-typescript-tsconfig.json index 8e932690c..28946c62c 100644 --- a/public/panels/timeline/components/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/panels/timeline/components/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/timeline/components/unittests-tsconfig.json b/public/panels/timeline/components/unittests-tsconfig.json index b0ae1d529..a6ee946e7 100644 --- a/public/panels/timeline/components/unittests-tsconfig.json +++ b/public/panels/timeline/components/unittests-tsconfig.json @@ -43,8 +43,7 @@ "../../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/timeline/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/panels/timeline/devtools_entrypoint-bundle-typescript-tsconfig.json index 3730f36f2..f1814c5ac 100644 --- a/public/panels/timeline/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/panels/timeline/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/timeline/devtools_entrypoint-meta-typescript-tsconfig.json b/public/panels/timeline/devtools_entrypoint-meta-typescript-tsconfig.json index 7eeb36a2b..d6244dea0 100644 --- a/public/panels/timeline/devtools_entrypoint-meta-typescript-tsconfig.json +++ b/public/panels/timeline/devtools_entrypoint-meta-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/timeline/fixtures/traces/large-profile.cpuprofile.gz b/public/panels/timeline/fixtures/traces/large-profile.cpuprofile.gz new file mode 100644 index 000000000..8176074df Binary files /dev/null and b/public/panels/timeline/fixtures/traces/large-profile.cpuprofile.gz differ diff --git a/public/panels/timeline/timeline-tsconfig.json b/public/panels/timeline/timeline-tsconfig.json index 72e308c31..6c352846a 100644 --- a/public/panels/timeline/timeline-tsconfig.json +++ b/public/panels/timeline/timeline-tsconfig.json @@ -70,8 +70,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/timeline/track_appenders/unittests-tsconfig.json b/public/panels/timeline/track_appenders/unittests-tsconfig.json index b19f16ffa..fa09e4fed 100644 --- a/public/panels/timeline/track_appenders/unittests-tsconfig.json +++ b/public/panels/timeline/track_appenders/unittests-tsconfig.json @@ -49,8 +49,7 @@ "../../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/timeline/unittests-tsconfig.json b/public/panels/timeline/unittests-tsconfig.json index 8a6aa4c26..95a1f40a7 100644 --- a/public/panels/timeline/unittests-tsconfig.json +++ b/public/panels/timeline/unittests-tsconfig.json @@ -57,8 +57,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/utils/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/panels/utils/devtools_entrypoint-bundle-typescript-tsconfig.json index ed9021a19..58bba3cc6 100644 --- a/public/panels/utils/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/panels/utils/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/utils/unittests-tsconfig.json b/public/panels/utils/unittests-tsconfig.json index 079fcd3f6..961d21e46 100644 --- a/public/panels/utils/unittests-tsconfig.json +++ b/public/panels/utils/unittests-tsconfig.json @@ -41,8 +41,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/web_audio/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/panels/web_audio/devtools_entrypoint-bundle-typescript-tsconfig.json index 36eb5d6af..84f62c7de 100644 --- a/public/panels/web_audio/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/panels/web_audio/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/web_audio/devtools_entrypoint-meta-typescript-tsconfig.json b/public/panels/web_audio/devtools_entrypoint-meta-typescript-tsconfig.json index 1fcadb2e9..7ba5537c4 100644 --- a/public/panels/web_audio/devtools_entrypoint-meta-typescript-tsconfig.json +++ b/public/panels/web_audio/devtools_entrypoint-meta-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/web_audio/graph_visualizer/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/panels/web_audio/graph_visualizer/devtools_entrypoint-bundle-typescript-tsconfig.json index 6e964481a..558d884e2 100644 --- a/public/panels/web_audio/graph_visualizer/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/panels/web_audio/graph_visualizer/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/web_audio/graph_visualizer/web_audio_graph_visualizer-tsconfig.json b/public/panels/web_audio/graph_visualizer/web_audio_graph_visualizer-tsconfig.json index 22ee1e4d4..7d94c7440 100644 --- a/public/panels/web_audio/graph_visualizer/web_audio_graph_visualizer-tsconfig.json +++ b/public/panels/web_audio/graph_visualizer/web_audio_graph_visualizer-tsconfig.json @@ -38,8 +38,7 @@ "../../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/web_audio/unittests-tsconfig.json b/public/panels/web_audio/unittests-tsconfig.json index 9b71c4277..89d9ad188 100644 --- a/public/panels/web_audio/unittests-tsconfig.json +++ b/public/panels/web_audio/unittests-tsconfig.json @@ -41,8 +41,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/web_audio/web_audio-tsconfig.json b/public/panels/web_audio/web_audio-tsconfig.json index 2d01bdeda..bbdad7a3f 100644 --- a/public/panels/web_audio/web_audio-tsconfig.json +++ b/public/panels/web_audio/web_audio-tsconfig.json @@ -36,8 +36,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/webauthn/WebauthnPane.js b/public/panels/webauthn/WebauthnPane.js index 771ee6966..87eb18f41 100644 --- a/public/panels/webauthn/WebauthnPane.js +++ b/public/panels/webauthn/WebauthnPane.js @@ -559,7 +559,7 @@ export class WebauthnPaneImpl extends UI.Widget.VBox { const nameField = titleElement.createChild('input', 'authenticator-name-field'); nameField.placeholder = i18nString(UIStrings.enterNewName); nameField.disabled = true; - nameField.setAttribute('jslog', `${VisualLogging.textField('name').track({ keydown: true })}`); + nameField.setAttribute('jslog', `${VisualLogging.textField('name').track({ keydown: 'Enter', change: true })}`); const userFriendlyName = authenticatorId.slice(-5); // User friendly name defaults to last 5 chars of UUID. nameField.value = i18nString(UIStrings.authenticatorS, { PH1: userFriendlyName }); this.#updateActiveLabelTitle(activeLabel, nameField.value); diff --git a/public/panels/webauthn/WebauthnPane.js.map b/public/panels/webauthn/WebauthnPane.js.map index 88e513191..b76178dd3 100644 --- a/public/panels/webauthn/WebauthnPane.js.map +++ b/public/panels/webauthn/WebauthnPane.js.map @@ -1 +1 @@ -{"version":3,"file":"WebauthnPane.js","sourceRoot":"","sources":["../../../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5D,MAAM,MAAM,GAAI,aAAa,CAAC,aAAa,CAAC,uBAAuB,CAAsB,CAAC;YAC1F,IAAI,CAAC,MAAM,EAAE;gBACX,OAAO;aACR;YACD,MAAM,CAAC,OAAO,GAAI,aAA6B,CAAC,OAAO,CAAC,eAAe,KAAK,IAAI,CAAC,aAAa,CAAC;QACjG,CAAC,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,yBAAyB;QAC7B,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,MAAM,EAAE;YACrC,MAAM,IAAI,CAAC,MAAM,CAAC,8BAA8B,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;SAC7E;QACD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC1B,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC9B,CAAC;IACQ,QAAQ;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,gBAAgB,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAC9C,CAAC;CACF","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Protocol from '../../generated/protocol.js';\nimport * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport webauthnPaneStyles from './webauthnPane.css.js';\n\nconst UIStrings = {\n /**\n *@description Label for button that allows user to download the private key related to a credential.\n */\n export: 'Export',\n /**\n *@description Label for an item to remove something\n */\n remove: 'Remove',\n /**\n *@description Label for empty credentials table.\n *@example {navigator.credentials.create()} PH1\n */\n noCredentialsTryCallingSFromYour: 'No credentials. Try calling {PH1} from your website.',\n /**\n *@description Label for checkbox to toggle the virtual authenticator environment allowing user to interact with software-based virtual authenticators.\n */\n enableVirtualAuthenticator: 'Enable virtual authenticator environment',\n /**\n *@description Label for ID field for credentials.\n */\n id: 'ID',\n /**\n *@description Label for field that describes whether a credential is a resident credential.\n */\n isResident: 'Is Resident',\n /**\n *@description Label for credential field that represents the Relying Party ID that the credential is scoped to.\n */\n rpId: 'RP ID',\n /**\n *@description Label for a column in a table. A field/unique ID that represents the user a credential is mapped to.\n */\n userHandle: 'User Handle',\n /**\n *@description Label for signature counter field for credentials which represents the number of successful assertions.\n * See https://w3c.github.io/webauthn/#signature-counter.\n */\n signCount: 'Signature Count',\n /**\n *@description Label for column with actions for credentials.\n */\n actions: 'Actions',\n /**\n *@description Title for the table that holds the credentials that a authenticator has registered.\n */\n credentials: 'Credentials',\n /**\n *@description Label for the learn more link that is shown before the virtual environment is enabled.\n */\n useWebauthnForPhishingresistant: 'Use WebAuthn for phishing-resistant authentication',\n /**\n *@description Text that is usually a hyperlink to more documentation\n */\n learnMore: 'Learn more',\n /**\n *@description Title for section of interface that allows user to add a new virtual authenticator.\n */\n newAuthenticator: 'New authenticator',\n /**\n *@description Text for security or network protocol\n */\n protocol: 'Protocol',\n /**\n *@description Label for input to select which transport option to use on virtual authenticators, e.g. USB or Bluetooth.\n */\n transport: 'Transport',\n /**\n *@description Label for checkbox that toggles resident key support on virtual authenticators.\n */\n supportsResidentKeys: 'Supports resident keys',\n /**\n *@description Label for checkbox that toggles large blob support on virtual authenticators. Large blobs are opaque data associated\n * with a WebAuthn credential that a website can store, like an SSH certificate or a symmetric encryption key.\n * See https://w3c.github.io/webauthn/#sctn-large-blob-extension\n */\n supportsLargeBlob: 'Supports large blob',\n /**\n *@description Text to add something\n */\n add: 'Add',\n /**\n *@description Label for button to add a new virtual authenticator.\n */\n addAuthenticator: 'Add authenticator',\n /**\n *@description Label for radio button that toggles whether an authenticator is active.\n */\n active: 'Active',\n /**\n *@description Title for button that enables user to customize name of authenticator.\n */\n editName: 'Edit name',\n /**\n *@description Placeholder for the input box to customize name of authenticator.\n */\n enterNewName: 'Enter new name',\n /**\n *@description Title for button that enables user to save name of authenticator after editing it.\n */\n saveName: 'Save name',\n /**\n *@description Title for a user-added virtual authenticator which is uniquely identified with its AUTHENTICATORID.\n *@example {8c7873be-0b13-4996-a794-1521331bbd96} PH1\n */\n authenticatorS: 'Authenticator {PH1}',\n /**\n *@description Name for generated file which user can download. A private key is a secret code which enables encoding and decoding of a credential. .pem is the file extension.\n */\n privateKeypem: 'Private key.pem',\n /**\n *@description Label for field that holds an authenticator's universally unique identifier (UUID).\n */\n uuid: 'UUID',\n /**\n *@description Label for checkbox that toggles user verification support on virtual authenticators.\n */\n supportsUserVerification: 'Supports user verification',\n /**\n *@description Text in Timeline indicating that input has happened recently\n */\n yes: 'Yes',\n /**\n *@description Text in Timeline indicating that input has not happened recently\n */\n no: 'No',\n /**\n *@description Title of radio button that sets an authenticator as active.\n *@example {Authenticator ABCDEF} PH1\n */\n setSAsTheActiveAuthenticator: 'Set {PH1} as the active authenticator',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/webauthn/WebauthnPane.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nconst enum Events {\n ExportCredential = 'ExportCredential',\n RemoveCredential = 'RemoveCredential',\n}\n\ntype EventTypes = {\n [Events.ExportCredential]: Protocol.WebAuthn.Credential,\n [Events.RemoveCredential]: Protocol.WebAuthn.Credential,\n};\n\nclass DataGridNode extends DataGrid.DataGrid.DataGridNode {\n constructor(private readonly credential: Protocol.WebAuthn.Credential) {\n super(credential);\n }\n\n override nodeSelfHeight(): number {\n return 24;\n }\n\n override createCell(columnId: string): HTMLElement {\n const cell = super.createCell(columnId);\n UI.Tooltip.Tooltip.install(cell, cell.textContent || '');\n\n if (columnId !== 'actions') {\n return cell;\n }\n\n const exportButton = UI.UIUtils.createTextButton(i18nString(UIStrings.export), () => {\n if (this.dataGrid) {\n (this.dataGrid as WebauthnDataGrid).dispatchEventToListeners(Events.ExportCredential, this.credential);\n }\n }, {jslogContext: 'webauthn.export-credential'});\n\n cell.appendChild(exportButton);\n\n const removeButton = UI.UIUtils.createTextButton(i18nString(UIStrings.remove), () => {\n if (this.dataGrid) {\n (this.dataGrid as WebauthnDataGrid).dispatchEventToListeners(Events.RemoveCredential, this.credential);\n }\n }, {jslogContext: 'webauthn.remove-credential'});\n\n cell.appendChild(removeButton);\n\n return cell;\n }\n}\n\nclass WebauthnDataGridBase extends DataGrid.DataGrid.DataGridImpl {}\nclass WebauthnDataGrid extends Common.ObjectWrapper.eventMixin(\n WebauthnDataGridBase) {}\n\nclass EmptyDataGridNode extends DataGrid.DataGrid.DataGridNode {\n override createCells(element: Element): void {\n element.removeChildren();\n const td = (this.createTDWithClass(DataGrid.DataGrid.Align.Center) as HTMLTableCellElement);\n if (this.dataGrid) {\n td.colSpan = this.dataGrid.visibleColumnsArray.length;\n }\n\n const code = document.createElement('span', {is: 'source-code'});\n code.textContent = 'navigator.credentials.create()';\n code.classList.add('code');\n const message = i18n.i18n.getFormatLocalizedString(str_, UIStrings.noCredentialsTryCallingSFromYour, {PH1: code});\n\n td.appendChild(message);\n element.appendChild(td);\n }\n}\n\ntype AvailableAuthenticatorOptions = Protocol.WebAuthn.VirtualAuthenticatorOptions&{\n active: boolean,\n authenticatorId: Protocol.WebAuthn.AuthenticatorId,\n};\n\n// We extrapolate this variable as otherwise git detects a private key, even though we\n// perform string manipulation. If we extract the name, then the regex doesn't match\n// and we can upload as expected.\nconst PRIVATE_NAME = 'PRIVATE';\nconst PRIVATE_KEY_HEADER = `-----BEGIN ${PRIVATE_NAME} KEY-----\n`;\nconst PRIVATE_KEY_FOOTER = `-----END ${PRIVATE_NAME} KEY-----`;\n\nconst PROTOCOL_AUTHENTICATOR_VALUES: Protocol.EnumerableEnum = {\n Ctap2: Protocol.WebAuthn.AuthenticatorProtocol.Ctap2,\n U2f: Protocol.WebAuthn.AuthenticatorProtocol.U2f,\n};\n\nexport class WebauthnPaneImpl extends UI.Widget.VBox implements\n SDK.TargetManager.SDKModelObserver {\n #activeAuthId: Protocol.WebAuthn.AuthenticatorId|null = null;\n #hasBeenEnabled = false;\n readonly dataGrids = new Map>();\n #enableCheckbox!: UI.Toolbar.ToolbarCheckbox;\n readonly #availableAuthenticatorSetting: Common.Settings.Setting;\n #model?: SDK.WebAuthnModel.WebAuthnModel;\n #authenticatorsView: HTMLElement;\n #topToolbarContainer: HTMLElement|undefined;\n #topToolbar: UI.Toolbar.Toolbar|undefined;\n #learnMoreView: HTMLElement|undefined;\n #newAuthenticatorSection: HTMLElement|undefined;\n #newAuthenticatorForm: HTMLElement|undefined;\n #protocolSelect: HTMLSelectElement|undefined;\n #transportSelect: HTMLSelectElement|undefined;\n #residentKeyCheckboxLabel: UI.UIUtils.CheckboxLabel|undefined;\n residentKeyCheckbox: HTMLInputElement|undefined;\n #userVerificationCheckboxLabel: UI.UIUtils.CheckboxLabel|undefined;\n #userVerificationCheckbox: HTMLInputElement|undefined;\n #largeBlobCheckboxLabel: UI.UIUtils.CheckboxLabel|undefined;\n largeBlobCheckbox: HTMLInputElement|undefined;\n addAuthenticatorButton: HTMLButtonElement|undefined;\n #isEnabling?: Promise;\n\n constructor() {\n super(true);\n\n this.element.setAttribute('jslog', `${VisualLogging.panel('webauthn').track({resize: true})}`);\n\n SDK.TargetManager.TargetManager.instance().observeModels(SDK.WebAuthnModel.WebAuthnModel, this, {scoped: true});\n\n this.contentElement.classList.add('webauthn-pane');\n\n this.#availableAuthenticatorSetting =\n Common.Settings.Settings.instance().createSetting(\n 'webauthn-authenticators', []);\n\n this.#createToolbar();\n this.#authenticatorsView = this.contentElement.createChild('div', 'authenticators-view');\n this.#createNewAuthenticatorSection();\n this.#updateVisibility(false);\n }\n\n modelAdded(model: SDK.WebAuthnModel.WebAuthnModel): void {\n if (model.target() === model.target().outermostTarget()) {\n this.#model = model;\n }\n }\n\n modelRemoved(model: SDK.WebAuthnModel.WebAuthnModel): void {\n if (model.target() === model.target().outermostTarget()) {\n this.#model = undefined;\n }\n }\n\n async #loadInitialAuthenticators(): Promise {\n let activeAuthenticatorId: Protocol.WebAuthn.AuthenticatorId|null = null;\n const availableAuthenticators = this.#availableAuthenticatorSetting.get();\n for (const options of availableAuthenticators) {\n if (!this.#model) {\n continue;\n }\n\n const authenticatorId = await this.#model.addAuthenticator(options);\n void this.#addAuthenticatorSection(authenticatorId, options);\n // Update the authenticatorIds in the options.\n options.authenticatorId = authenticatorId;\n if (options.active) {\n activeAuthenticatorId = authenticatorId;\n }\n }\n\n // Update the settings to reflect the new authenticatorIds.\n this.#availableAuthenticatorSetting.set(availableAuthenticators);\n if (activeAuthenticatorId) {\n void this.#setActiveAuthenticator(activeAuthenticatorId);\n }\n }\n\n override async ownerViewDisposed(): Promise {\n if (this.#enableCheckbox) {\n this.#enableCheckbox.setChecked(false);\n }\n await this.#setVirtualAuthEnvEnabled(false);\n }\n\n #createToolbar(): void {\n this.#topToolbarContainer = this.contentElement.createChild('div', 'webauthn-toolbar-container');\n this.#topToolbarContainer.setAttribute('jslog', `${VisualLogging.toolbar()}`);\n this.#topToolbar = new UI.Toolbar.Toolbar('webauthn-toolbar', this.#topToolbarContainer);\n const enableCheckboxTitle = i18nString(UIStrings.enableVirtualAuthenticator);\n this.#enableCheckbox =\n new UI.Toolbar.ToolbarCheckbox(enableCheckboxTitle, enableCheckboxTitle, this.#handleCheckboxToggle.bind(this));\n this.#enableCheckbox.inputElement.setAttribute(\n 'jslog', `${VisualLogging.toggle('virtual-authenticators').track({click: true})}`);\n this.#topToolbar.appendToolbarItem(this.#enableCheckbox);\n }\n\n #createCredentialsDataGrid(authenticatorId: Protocol.WebAuthn.AuthenticatorId):\n DataGrid.DataGrid.DataGridImpl {\n const columns = ([\n {\n id: 'credentialId',\n title: i18nString(UIStrings.id),\n longText: true,\n weight: 24,\n },\n {\n id: 'isResidentCredential',\n title: i18nString(UIStrings.isResident),\n dataType: DataGrid.DataGrid.DataType.Boolean,\n weight: 10,\n },\n {\n id: 'rpId',\n title: i18nString(UIStrings.rpId),\n },\n {\n id: 'userHandle',\n title: i18nString(UIStrings.userHandle),\n },\n {\n id: 'signCount',\n title: i18nString(UIStrings.signCount),\n },\n {id: 'actions', title: i18nString(UIStrings.actions)},\n ] as DataGrid.DataGrid.ColumnDescriptor[]);\n\n const dataGridConfig = {\n displayName: i18nString(UIStrings.credentials),\n columns,\n editCallback: undefined,\n deleteCallback: undefined,\n refreshCallback: undefined,\n };\n const dataGrid = new WebauthnDataGrid(dataGridConfig);\n dataGrid.renderInline();\n dataGrid.setStriped(true);\n dataGrid.addEventListener(Events.ExportCredential, this.#handleExportCredential, this);\n dataGrid.addEventListener(Events.RemoveCredential, this.#handleRemoveCredential.bind(this, authenticatorId));\n dataGrid.rootNode().appendChild(new EmptyDataGridNode());\n\n this.dataGrids.set(authenticatorId, dataGrid);\n\n return dataGrid;\n }\n\n #handleExportCredential({data: credential}: Common.EventTarget.EventTargetEvent): void {\n this.#exportCredential(credential);\n }\n\n #handleRemoveCredential(authenticatorId: Protocol.WebAuthn.AuthenticatorId, {\n data: credential,\n }: Common.EventTarget.EventTargetEvent): void {\n void this.#removeCredential(authenticatorId, credential.credentialId);\n }\n\n #addCredential(authenticatorId: Protocol.WebAuthn.AuthenticatorId, {\n data: event,\n }: Common.EventTarget.EventTargetEvent): void {\n const dataGrid = this.dataGrids.get(authenticatorId);\n if (!dataGrid) {\n return;\n }\n const emptyNode = dataGrid.rootNode().children.find(node => !Object.keys(node.data).length);\n if (emptyNode) {\n dataGrid.rootNode().removeChild(emptyNode);\n }\n const node = new DataGridNode(event.credential);\n dataGrid.rootNode().appendChild(node);\n }\n\n #updateCredential(authenticatorId: Protocol.WebAuthn.AuthenticatorId, {\n data: event,\n }: Common.EventTarget.EventTargetEvent): void {\n const dataGrid = this.dataGrids.get(authenticatorId);\n if (!dataGrid) {\n return;\n }\n const node = dataGrid.rootNode().children.find(node => node.data?.credentialId === event.credential.credentialId);\n if (!node) {\n return;\n }\n node.data = event.credential;\n }\n\n async #setVirtualAuthEnvEnabled(enable: boolean): Promise {\n await this.#isEnabling;\n this.#isEnabling = new Promise(async (resolve: (value: void) => void) => {\n if (enable && !this.#hasBeenEnabled) {\n // Ensures metric is only tracked once per session.\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.VirtualAuthenticatorEnvironmentEnabled);\n this.#hasBeenEnabled = true;\n }\n if (this.#model) {\n await this.#model.setVirtualAuthEnvEnabled(enable);\n }\n\n if (enable) {\n await this.#loadInitialAuthenticators();\n } else {\n this.#removeAuthenticatorSections();\n }\n\n this.#updateVisibility(enable);\n this.#isEnabling = undefined;\n resolve();\n });\n }\n\n #updateVisibility(enabled: boolean): void {\n this.contentElement.classList.toggle('enabled', enabled);\n }\n\n #removeAuthenticatorSections(): void {\n this.#authenticatorsView.innerHTML = '';\n for (const dataGrid of this.dataGrids.values()) {\n dataGrid.asWidget().detach();\n }\n this.dataGrids.clear();\n }\n\n #handleCheckboxToggle(e: MouseEvent): void {\n void this.#setVirtualAuthEnvEnabled((e.target as HTMLInputElement).checked);\n }\n\n #updateEnabledTransportOptions(enabledOptions: Protocol.WebAuthn.AuthenticatorTransport[]): void {\n if (!this.#transportSelect) {\n return;\n }\n\n const prevValue = this.#transportSelect.value;\n this.#transportSelect.removeChildren();\n\n for (const option of enabledOptions) {\n this.#transportSelect.appendChild(UI.UIUtils.createOption(option, option, option));\n }\n\n // Make sure the currently selected value stays the same.\n this.#transportSelect.value = prevValue;\n // If the new set does not include the previous value.\n if (!this.#transportSelect.value) {\n // Select the first available value.\n this.#transportSelect.selectedIndex = 0;\n }\n }\n\n #updateNewAuthenticatorSectionOptions(): void {\n if (!this.#protocolSelect || !this.residentKeyCheckbox || !this.#userVerificationCheckbox ||\n !this.largeBlobCheckbox) {\n return;\n }\n\n if (this.#protocolSelect.value === Protocol.WebAuthn.AuthenticatorProtocol.Ctap2) {\n this.residentKeyCheckbox.disabled = false;\n this.#userVerificationCheckbox.disabled = false;\n this.largeBlobCheckbox.disabled = !this.residentKeyCheckbox.checked;\n if (this.largeBlobCheckbox.disabled) {\n this.largeBlobCheckbox.checked = false;\n }\n this.#updateEnabledTransportOptions([\n Protocol.WebAuthn.AuthenticatorTransport.Usb,\n Protocol.WebAuthn.AuthenticatorTransport.Ble,\n Protocol.WebAuthn.AuthenticatorTransport.Nfc,\n // TODO (crbug.com/1034663): Toggle cable as option depending on if cablev2 flag is on.\n // Protocol.WebAuthn.AuthenticatorTransport.Cable,\n Protocol.WebAuthn.AuthenticatorTransport.Internal,\n ]);\n } else {\n this.residentKeyCheckbox.checked = false;\n this.residentKeyCheckbox.disabled = true;\n this.#userVerificationCheckbox.checked = false;\n this.#userVerificationCheckbox.disabled = true;\n this.largeBlobCheckbox.checked = false;\n this.largeBlobCheckbox.disabled = true;\n this.#updateEnabledTransportOptions([\n Protocol.WebAuthn.AuthenticatorTransport.Usb,\n Protocol.WebAuthn.AuthenticatorTransport.Ble,\n Protocol.WebAuthn.AuthenticatorTransport.Nfc,\n ]);\n }\n }\n\n #createNewAuthenticatorSection(): void {\n const learnMoreLink = UI.XLink.XLink.create(\n 'https://developers.google.com/web/updates/2018/05/webauthn', i18nString(UIStrings.learnMore), undefined,\n undefined, 'learn-more');\n this.#learnMoreView = this.contentElement.createChild('div', 'learn-more');\n this.#learnMoreView.appendChild(UI.Fragment.html`\n
\n ${i18nString(UIStrings.useWebauthnForPhishingresistant)}

\n ${learnMoreLink}\n
\n `);\n\n this.#newAuthenticatorSection = this.contentElement.createChild('div', 'new-authenticator-container');\n const newAuthenticatorTitle =\n UI.UIUtils.createLabel(i18nString(UIStrings.newAuthenticator), 'new-authenticator-title');\n this.#newAuthenticatorSection.appendChild(newAuthenticatorTitle);\n this.#newAuthenticatorForm = this.#newAuthenticatorSection.createChild('div', 'new-authenticator-form');\n this.#newAuthenticatorForm.setAttribute('jslog', `${VisualLogging.section('new-authenticator')}`);\n\n const protocolGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n const transportGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n const residentKeyGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n const userVerificationGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n const largeBlobGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n const addButtonGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n\n const protocolSelectTitle = UI.UIUtils.createLabel(i18nString(UIStrings.protocol), 'authenticator-option-label');\n protocolGroup.appendChild(protocolSelectTitle);\n this.#protocolSelect = (protocolGroup.createChild('select', 'chrome-select') as HTMLSelectElement);\n this.#protocolSelect.setAttribute('jslog', `${VisualLogging.dropDown('protocol').track({change: true})}`);\n UI.ARIAUtils.bindLabelToControl(protocolSelectTitle, (this.#protocolSelect as Element));\n Object.values(PROTOCOL_AUTHENTICATOR_VALUES).sort().forEach((option: Protocol.WebAuthn.AuthenticatorProtocol) => {\n if (this.#protocolSelect) {\n this.#protocolSelect.appendChild(UI.UIUtils.createOption(option, option, option));\n }\n });\n\n if (this.#protocolSelect) {\n this.#protocolSelect.value = Protocol.WebAuthn.AuthenticatorProtocol.Ctap2;\n }\n\n const transportSelectTitle = UI.UIUtils.createLabel(i18nString(UIStrings.transport), 'authenticator-option-label');\n transportGroup.appendChild(transportSelectTitle);\n this.#transportSelect = (transportGroup.createChild('select', 'chrome-select') as HTMLSelectElement);\n this.#transportSelect.setAttribute('jslog', `${VisualLogging.dropDown('transport').track({change: true})}`);\n UI.ARIAUtils.bindLabelToControl(transportSelectTitle, (this.#transportSelect as Element));\n // transportSelect will be populated in updateNewAuthenticatorSectionOptions.\n\n this.#residentKeyCheckboxLabel =\n UI.UIUtils.CheckboxLabel.create(i18nString(UIStrings.supportsResidentKeys), false, undefined, 'resident-key');\n this.#residentKeyCheckboxLabel.textElement.classList.add('authenticator-option-label');\n residentKeyGroup.appendChild(this.#residentKeyCheckboxLabel.textElement);\n this.residentKeyCheckbox = this.#residentKeyCheckboxLabel.checkboxElement;\n this.residentKeyCheckbox.checked = false;\n this.residentKeyCheckbox.classList.add('authenticator-option-checkbox');\n residentKeyGroup.appendChild(this.#residentKeyCheckboxLabel);\n\n this.#userVerificationCheckboxLabel = UI.UIUtils.CheckboxLabel.create(\n i18nString(UIStrings.supportsUserVerification), false, undefined, 'user-verification');\n this.#userVerificationCheckboxLabel.textElement.classList.add('authenticator-option-label');\n userVerificationGroup.appendChild(this.#userVerificationCheckboxLabel.textElement);\n this.#userVerificationCheckbox = this.#userVerificationCheckboxLabel.checkboxElement;\n this.#userVerificationCheckbox.checked = false;\n this.#userVerificationCheckbox.classList.add('authenticator-option-checkbox');\n userVerificationGroup.appendChild(this.#userVerificationCheckboxLabel);\n\n this.#largeBlobCheckboxLabel =\n UI.UIUtils.CheckboxLabel.create(i18nString(UIStrings.supportsLargeBlob), false, undefined, 'large-blob');\n this.#largeBlobCheckboxLabel.textElement.classList.add('authenticator-option-label');\n largeBlobGroup.appendChild(this.#largeBlobCheckboxLabel.textElement);\n this.largeBlobCheckbox = this.#largeBlobCheckboxLabel.checkboxElement;\n this.largeBlobCheckbox.checked = false;\n this.largeBlobCheckbox.classList.add('authenticator-option-checkbox');\n this.largeBlobCheckbox.name = 'large-blob-checkbox';\n largeBlobGroup.appendChild(this.#largeBlobCheckboxLabel);\n\n this.addAuthenticatorButton = UI.UIUtils.createTextButton(\n i18nString(UIStrings.add), this.#handleAddAuthenticatorButton.bind(this),\n {jslogContext: 'webauthn.add-authenticator'});\n addButtonGroup.createChild('div', 'authenticator-option-label');\n addButtonGroup.appendChild(this.addAuthenticatorButton);\n const addAuthenticatorTitle = UI.UIUtils.createLabel(i18nString(UIStrings.addAuthenticator), '');\n UI.ARIAUtils.bindLabelToControl(addAuthenticatorTitle, this.addAuthenticatorButton);\n\n this.#updateNewAuthenticatorSectionOptions();\n if (this.#protocolSelect) {\n this.#protocolSelect.addEventListener('change', this.#updateNewAuthenticatorSectionOptions.bind(this));\n }\n if (this.residentKeyCheckbox) {\n this.residentKeyCheckbox.addEventListener('change', this.#updateNewAuthenticatorSectionOptions.bind(this));\n }\n }\n\n async #handleAddAuthenticatorButton(): Promise {\n const options = this.#createOptionsFromCurrentInputs();\n if (this.#model) {\n const authenticatorId = await this.#model.addAuthenticator(options);\n const availableAuthenticators = this.#availableAuthenticatorSetting.get();\n availableAuthenticators.push({authenticatorId, active: true, ...options});\n this.#availableAuthenticatorSetting.set(\n availableAuthenticators.map(a => ({...a, active: a.authenticatorId === authenticatorId})));\n const section = await this.#addAuthenticatorSection(authenticatorId, options);\n const mediaQueryList = window.matchMedia('(prefers-reduced-motion: reduce)');\n const prefersReducedMotion = mediaQueryList.matches;\n section.scrollIntoView({block: 'start', behavior: prefersReducedMotion ? 'auto' : 'smooth'});\n }\n }\n\n async #addAuthenticatorSection(\n authenticatorId: Protocol.WebAuthn.AuthenticatorId,\n options: Protocol.WebAuthn.VirtualAuthenticatorOptions): Promise {\n const section = document.createElement('div');\n section.classList.add('authenticator-section');\n section.setAttribute('data-authenticator-id', authenticatorId);\n section.setAttribute('jslog', `${VisualLogging.section('authenticator')}`);\n this.#authenticatorsView.appendChild(section);\n\n const headerElement = section.createChild('div', 'authenticator-section-header');\n const titleElement = headerElement.createChild('div', 'authenticator-section-title');\n UI.ARIAUtils.markAsHeading(titleElement, 2);\n\n await this.#clearActiveAuthenticator();\n const activeButtonContainer = headerElement.createChild('div', 'active-button-container');\n const activeLabel =\n UI.UIUtils.createRadioLabel(`active-authenticator-${authenticatorId}`, i18nString(UIStrings.active));\n activeLabel.radioElement.addEventListener('change', this.#setActiveAuthenticator.bind(this, authenticatorId));\n activeButtonContainer.appendChild(activeLabel);\n (activeLabel.radioElement as HTMLInputElement).checked = true;\n this.#activeAuthId = authenticatorId; // Newly added authenticator is automatically set as active.\n\n const removeButton = headerElement.createChild('button', 'text-button');\n removeButton.textContent = i18nString(UIStrings.remove);\n removeButton.addEventListener('click', this.#removeAuthenticator.bind(this, authenticatorId));\n removeButton.setAttribute('jslog', `${VisualLogging.action('webauthn.remove-authenticator').track({click: true})}`);\n\n const toolbar = new UI.Toolbar.Toolbar('edit-name-toolbar', titleElement);\n const editName = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.editName), 'edit', undefined, 'edit-name');\n const saveName = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.saveName), 'checkmark', undefined, 'save-name');\n saveName.setVisible(false);\n\n const nameField = (titleElement.createChild('input', 'authenticator-name-field') as HTMLInputElement);\n nameField.placeholder = i18nString(UIStrings.enterNewName);\n nameField.disabled = true;\n nameField.setAttribute('jslog', `${VisualLogging.textField('name').track({keydown: true})}`);\n const userFriendlyName = authenticatorId.slice(-5); // User friendly name defaults to last 5 chars of UUID.\n nameField.value = i18nString(UIStrings.authenticatorS, {PH1: userFriendlyName});\n this.#updateActiveLabelTitle(activeLabel, nameField.value);\n\n editName.addEventListener(\n UI.Toolbar.ToolbarButton.Events.Click,\n () => this.#handleEditNameButton(titleElement, nameField, editName, saveName));\n saveName.addEventListener(\n UI.Toolbar.ToolbarButton.Events.Click,\n () => this.#handleSaveNameButton(titleElement, nameField, editName, saveName, activeLabel));\n\n nameField.addEventListener(\n 'focusout', () => this.#handleSaveNameButton(titleElement, nameField, editName, saveName, activeLabel));\n nameField.addEventListener('keydown', (event: KeyboardEvent) => {\n if (event.key === 'Enter') {\n this.#handleSaveNameButton(titleElement, nameField, editName, saveName, activeLabel);\n }\n });\n\n toolbar.appendToolbarItem(editName);\n toolbar.appendToolbarItem(saveName);\n\n this.#createAuthenticatorFields(section, authenticatorId, options);\n\n const label = document.createElement('div');\n label.classList.add('credentials-title');\n label.textContent = i18nString(UIStrings.credentials);\n section.appendChild(label);\n\n const dataGrid = this.#createCredentialsDataGrid(authenticatorId);\n dataGrid.asWidget().show(section);\n if (this.#model) {\n this.#model.addEventListener(\n SDK.WebAuthnModel.Events.CredentialAdded, this.#addCredential.bind(this, authenticatorId));\n this.#model.addEventListener(\n SDK.WebAuthnModel.Events.CredentialAsserted, this.#updateCredential.bind(this, authenticatorId));\n }\n\n return section;\n }\n\n #exportCredential(credential: Protocol.WebAuthn.Credential): void {\n let pem = PRIVATE_KEY_HEADER;\n for (let i = 0; i < credential.privateKey.length; i += 64) {\n pem += credential.privateKey.substring(i, i + 64) + '\\n';\n }\n pem += PRIVATE_KEY_FOOTER;\n\n const link = document.createElement('a');\n link.download = i18nString(UIStrings.privateKeypem);\n link.href = 'data:application/x-pem-file,' + encodeURIComponent(pem);\n link.click();\n }\n\n async #removeCredential(authenticatorId: Protocol.WebAuthn.AuthenticatorId, credentialId: string): Promise {\n const dataGrid = this.dataGrids.get(authenticatorId);\n if (!dataGrid) {\n return;\n }\n\n // @ts-ignore dataGrid node type is indeterminate.\n dataGrid.rootNode()\n .children.find((n: DataGrid.DataGrid.DataGridNode) => n.data.credentialId === credentialId)\n .remove();\n\n if (!dataGrid.rootNode().children.length) {\n dataGrid.rootNode().appendChild(new EmptyDataGridNode());\n }\n\n if (this.#model) {\n await this.#model.removeCredential(authenticatorId, credentialId);\n }\n }\n\n /**\n * Creates the fields describing the authenticator in the front end.\n */\n #createAuthenticatorFields(\n section: Element, authenticatorId: string, options: Protocol.WebAuthn.VirtualAuthenticatorOptions): void {\n const sectionFields = section.createChild('div', 'authenticator-fields');\n const uuidField = sectionFields.createChild('div', 'authenticator-field');\n const protocolField = sectionFields.createChild('div', 'authenticator-field');\n const transportField = sectionFields.createChild('div', 'authenticator-field');\n const srkField = sectionFields.createChild('div', 'authenticator-field');\n const slbField = sectionFields.createChild('div', 'authenticator-field');\n const suvField = sectionFields.createChild('div', 'authenticator-field');\n\n uuidField.appendChild(UI.UIUtils.createLabel(i18nString(UIStrings.uuid), 'authenticator-option-label'));\n protocolField.appendChild(UI.UIUtils.createLabel(i18nString(UIStrings.protocol), 'authenticator-option-label'));\n transportField.appendChild(UI.UIUtils.createLabel(i18nString(UIStrings.transport), 'authenticator-option-label'));\n srkField.appendChild(\n UI.UIUtils.createLabel(i18nString(UIStrings.supportsResidentKeys), 'authenticator-option-label'));\n slbField.appendChild(UI.UIUtils.createLabel(i18nString(UIStrings.supportsLargeBlob), 'authenticator-option-label'));\n suvField.appendChild(\n UI.UIUtils.createLabel(i18nString(UIStrings.supportsUserVerification), 'authenticator-option-label'));\n\n uuidField.createChild('div', 'authenticator-field-value').textContent = authenticatorId;\n protocolField.createChild('div', 'authenticator-field-value').textContent = options.protocol;\n transportField.createChild('div', 'authenticator-field-value').textContent = options.transport;\n srkField.createChild('div', 'authenticator-field-value').textContent =\n options.hasResidentKey ? i18nString(UIStrings.yes) : i18nString(UIStrings.no);\n slbField.createChild('div', 'authenticator-field-value').textContent =\n options.hasLargeBlob ? i18nString(UIStrings.yes) : i18nString(UIStrings.no);\n suvField.createChild('div', 'authenticator-field-value').textContent =\n options.hasUserVerification ? i18nString(UIStrings.yes) : i18nString(UIStrings.no);\n }\n\n #handleEditNameButton(\n titleElement: Element, nameField: HTMLInputElement, editName: UI.Toolbar.ToolbarButton,\n saveName: UI.Toolbar.ToolbarButton): void {\n nameField.disabled = false;\n titleElement.classList.add('editing-name');\n nameField.focus();\n saveName.setVisible(true);\n editName.setVisible(false);\n }\n\n #handleSaveNameButton(\n titleElement: Element, nameField: HTMLInputElement, editName: UI.Toolbar.ToolbarItem,\n saveName: UI.Toolbar.ToolbarItem, activeLabel: UI.UIUtils.DevToolsRadioButton): void {\n const name = nameField.value;\n if (!name) {\n return;\n }\n nameField.disabled = true;\n titleElement.classList.remove('editing-name');\n editName.setVisible(true);\n saveName.setVisible(false);\n this.#updateActiveLabelTitle(activeLabel, name);\n }\n\n #updateActiveLabelTitle(activeLabel: UI.UIUtils.DevToolsRadioButton, authenticatorName: string): void {\n UI.Tooltip.Tooltip.install(\n activeLabel.radioElement, i18nString(UIStrings.setSAsTheActiveAuthenticator, {PH1: authenticatorName}));\n }\n\n /**\n * Removes both the authenticator and its respective UI element.\n */\n #removeAuthenticator(authenticatorId: Protocol.WebAuthn.AuthenticatorId): void {\n if (this.#authenticatorsView) {\n const child = this.#authenticatorsView.querySelector(`[data-authenticator-id=${CSS.escape(authenticatorId)}]`);\n if (child) {\n child.remove();\n }\n }\n const dataGrid = this.dataGrids.get(authenticatorId);\n if (dataGrid) {\n dataGrid.asWidget().detach();\n this.dataGrids.delete(authenticatorId);\n }\n\n if (this.#model) {\n void this.#model.removeAuthenticator(authenticatorId);\n }\n\n // Update available authenticator setting.\n const prevAvailableAuthenticators = this.#availableAuthenticatorSetting.get();\n const newAvailableAuthenticators = prevAvailableAuthenticators.filter(a => a.authenticatorId !== authenticatorId);\n this.#availableAuthenticatorSetting.set(newAvailableAuthenticators);\n\n if (this.#activeAuthId === authenticatorId) {\n const availableAuthenticatorIds = Array.from(this.dataGrids.keys());\n if (availableAuthenticatorIds.length) {\n void this.#setActiveAuthenticator(availableAuthenticatorIds[0]);\n } else {\n this.#activeAuthId = null;\n }\n }\n }\n\n #createOptionsFromCurrentInputs(): Protocol.WebAuthn.VirtualAuthenticatorOptions {\n // TODO(crbug.com/1034663): Add optionality for isUserVerified param.\n if (!this.#protocolSelect || !this.#transportSelect || !this.residentKeyCheckbox ||\n !this.#userVerificationCheckbox || !this.largeBlobCheckbox) {\n throw new Error('Unable to create options from current inputs');\n }\n\n return {\n protocol: this.#protocolSelect.options[this.#protocolSelect.selectedIndex].value as\n Protocol.WebAuthn.AuthenticatorProtocol,\n ctap2Version: Protocol.WebAuthn.Ctap2Version.Ctap2_1,\n transport: this.#transportSelect.options[this.#transportSelect.selectedIndex].value as\n Protocol.WebAuthn.AuthenticatorTransport,\n hasResidentKey: this.residentKeyCheckbox.checked,\n hasUserVerification: this.#userVerificationCheckbox.checked,\n hasLargeBlob: this.largeBlobCheckbox.checked,\n automaticPresenceSimulation: true,\n isUserVerified: true,\n };\n }\n\n /**\n * Sets the given authenticator as active.\n * Note that a newly added authenticator will automatically be set as active.\n */\n async #setActiveAuthenticator(authenticatorId: Protocol.WebAuthn.AuthenticatorId): Promise {\n await this.#clearActiveAuthenticator();\n if (this.#model) {\n await this.#model.setAutomaticPresenceSimulation(authenticatorId, true);\n }\n this.#activeAuthId = authenticatorId;\n\n const prevAvailableAuthenticators = this.#availableAuthenticatorSetting.get();\n const newAvailableAuthenticators =\n prevAvailableAuthenticators.map(a => ({...a, active: a.authenticatorId === authenticatorId}));\n this.#availableAuthenticatorSetting.set(newAvailableAuthenticators);\n\n this.#updateActiveButtons();\n }\n\n #updateActiveButtons(): void {\n const authenticators = this.#authenticatorsView.getElementsByClassName('authenticator-section');\n Array.from(authenticators).forEach((authenticator: Element) => {\n const button = (authenticator.querySelector('input.dt-radio-button') as HTMLInputElement);\n if (!button) {\n return;\n }\n button.checked = (authenticator as HTMLElement).dataset.authenticatorId === this.#activeAuthId;\n });\n }\n\n async #clearActiveAuthenticator(): Promise {\n if (this.#activeAuthId && this.#model) {\n await this.#model.setAutomaticPresenceSimulation(this.#activeAuthId, false);\n }\n this.#activeAuthId = null;\n this.#updateActiveButtons();\n }\n override wasShown(): void {\n super.wasShown();\n this.registerCSSFiles([webauthnPaneStyles]);\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"WebauthnPane.js","sourceRoot":"","sources":["../../../../../../front_end/panels/webauthn/WebauthnPane.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,uBAAuB,CAAC;AAE7C,OAAO,KAAK,QAAQ,MAAM,mDAAmD,CAAC;AAC9E,OAAO,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAE3E,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AAEvD,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,MAAM,EAAE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I,CAAC,oBAAoB,EAAE,CAAC;IAC9B,CAAC;IACQ,QAAQ;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,gBAAgB,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAC9C,CAAC;CACF","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as SDK from '../../core/sdk/sdk.js';\nimport * as Protocol from '../../generated/protocol.js';\nimport * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';\nimport * as UI from '../../ui/legacy/legacy.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\n\nimport webauthnPaneStyles from './webauthnPane.css.js';\n\nconst UIStrings = {\n /**\n *@description Label for button that allows user to download the private key related to a credential.\n */\n export: 'Export',\n /**\n *@description Label for an item to remove something\n */\n remove: 'Remove',\n /**\n *@description Label for empty credentials table.\n *@example {navigator.credentials.create()} PH1\n */\n noCredentialsTryCallingSFromYour: 'No credentials. Try calling {PH1} from your website.',\n /**\n *@description Label for checkbox to toggle the virtual authenticator environment allowing user to interact with software-based virtual authenticators.\n */\n enableVirtualAuthenticator: 'Enable virtual authenticator environment',\n /**\n *@description Label for ID field for credentials.\n */\n id: 'ID',\n /**\n *@description Label for field that describes whether a credential is a resident credential.\n */\n isResident: 'Is Resident',\n /**\n *@description Label for credential field that represents the Relying Party ID that the credential is scoped to.\n */\n rpId: 'RP ID',\n /**\n *@description Label for a column in a table. A field/unique ID that represents the user a credential is mapped to.\n */\n userHandle: 'User Handle',\n /**\n *@description Label for signature counter field for credentials which represents the number of successful assertions.\n * See https://w3c.github.io/webauthn/#signature-counter.\n */\n signCount: 'Signature Count',\n /**\n *@description Label for column with actions for credentials.\n */\n actions: 'Actions',\n /**\n *@description Title for the table that holds the credentials that a authenticator has registered.\n */\n credentials: 'Credentials',\n /**\n *@description Label for the learn more link that is shown before the virtual environment is enabled.\n */\n useWebauthnForPhishingresistant: 'Use WebAuthn for phishing-resistant authentication',\n /**\n *@description Text that is usually a hyperlink to more documentation\n */\n learnMore: 'Learn more',\n /**\n *@description Title for section of interface that allows user to add a new virtual authenticator.\n */\n newAuthenticator: 'New authenticator',\n /**\n *@description Text for security or network protocol\n */\n protocol: 'Protocol',\n /**\n *@description Label for input to select which transport option to use on virtual authenticators, e.g. USB or Bluetooth.\n */\n transport: 'Transport',\n /**\n *@description Label for checkbox that toggles resident key support on virtual authenticators.\n */\n supportsResidentKeys: 'Supports resident keys',\n /**\n *@description Label for checkbox that toggles large blob support on virtual authenticators. Large blobs are opaque data associated\n * with a WebAuthn credential that a website can store, like an SSH certificate or a symmetric encryption key.\n * See https://w3c.github.io/webauthn/#sctn-large-blob-extension\n */\n supportsLargeBlob: 'Supports large blob',\n /**\n *@description Text to add something\n */\n add: 'Add',\n /**\n *@description Label for button to add a new virtual authenticator.\n */\n addAuthenticator: 'Add authenticator',\n /**\n *@description Label for radio button that toggles whether an authenticator is active.\n */\n active: 'Active',\n /**\n *@description Title for button that enables user to customize name of authenticator.\n */\n editName: 'Edit name',\n /**\n *@description Placeholder for the input box to customize name of authenticator.\n */\n enterNewName: 'Enter new name',\n /**\n *@description Title for button that enables user to save name of authenticator after editing it.\n */\n saveName: 'Save name',\n /**\n *@description Title for a user-added virtual authenticator which is uniquely identified with its AUTHENTICATORID.\n *@example {8c7873be-0b13-4996-a794-1521331bbd96} PH1\n */\n authenticatorS: 'Authenticator {PH1}',\n /**\n *@description Name for generated file which user can download. A private key is a secret code which enables encoding and decoding of a credential. .pem is the file extension.\n */\n privateKeypem: 'Private key.pem',\n /**\n *@description Label for field that holds an authenticator's universally unique identifier (UUID).\n */\n uuid: 'UUID',\n /**\n *@description Label for checkbox that toggles user verification support on virtual authenticators.\n */\n supportsUserVerification: 'Supports user verification',\n /**\n *@description Text in Timeline indicating that input has happened recently\n */\n yes: 'Yes',\n /**\n *@description Text in Timeline indicating that input has not happened recently\n */\n no: 'No',\n /**\n *@description Title of radio button that sets an authenticator as active.\n *@example {Authenticator ABCDEF} PH1\n */\n setSAsTheActiveAuthenticator: 'Set {PH1} as the active authenticator',\n};\nconst str_ = i18n.i18n.registerUIStrings('panels/webauthn/WebauthnPane.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nconst enum Events {\n ExportCredential = 'ExportCredential',\n RemoveCredential = 'RemoveCredential',\n}\n\ntype EventTypes = {\n [Events.ExportCredential]: Protocol.WebAuthn.Credential,\n [Events.RemoveCredential]: Protocol.WebAuthn.Credential,\n};\n\nclass DataGridNode extends DataGrid.DataGrid.DataGridNode {\n constructor(private readonly credential: Protocol.WebAuthn.Credential) {\n super(credential);\n }\n\n override nodeSelfHeight(): number {\n return 24;\n }\n\n override createCell(columnId: string): HTMLElement {\n const cell = super.createCell(columnId);\n UI.Tooltip.Tooltip.install(cell, cell.textContent || '');\n\n if (columnId !== 'actions') {\n return cell;\n }\n\n const exportButton = UI.UIUtils.createTextButton(i18nString(UIStrings.export), () => {\n if (this.dataGrid) {\n (this.dataGrid as WebauthnDataGrid).dispatchEventToListeners(Events.ExportCredential, this.credential);\n }\n }, {jslogContext: 'webauthn.export-credential'});\n\n cell.appendChild(exportButton);\n\n const removeButton = UI.UIUtils.createTextButton(i18nString(UIStrings.remove), () => {\n if (this.dataGrid) {\n (this.dataGrid as WebauthnDataGrid).dispatchEventToListeners(Events.RemoveCredential, this.credential);\n }\n }, {jslogContext: 'webauthn.remove-credential'});\n\n cell.appendChild(removeButton);\n\n return cell;\n }\n}\n\nclass WebauthnDataGridBase extends DataGrid.DataGrid.DataGridImpl {}\nclass WebauthnDataGrid extends Common.ObjectWrapper.eventMixin(\n WebauthnDataGridBase) {}\n\nclass EmptyDataGridNode extends DataGrid.DataGrid.DataGridNode {\n override createCells(element: Element): void {\n element.removeChildren();\n const td = (this.createTDWithClass(DataGrid.DataGrid.Align.Center) as HTMLTableCellElement);\n if (this.dataGrid) {\n td.colSpan = this.dataGrid.visibleColumnsArray.length;\n }\n\n const code = document.createElement('span', {is: 'source-code'});\n code.textContent = 'navigator.credentials.create()';\n code.classList.add('code');\n const message = i18n.i18n.getFormatLocalizedString(str_, UIStrings.noCredentialsTryCallingSFromYour, {PH1: code});\n\n td.appendChild(message);\n element.appendChild(td);\n }\n}\n\ntype AvailableAuthenticatorOptions = Protocol.WebAuthn.VirtualAuthenticatorOptions&{\n active: boolean,\n authenticatorId: Protocol.WebAuthn.AuthenticatorId,\n};\n\n// We extrapolate this variable as otherwise git detects a private key, even though we\n// perform string manipulation. If we extract the name, then the regex doesn't match\n// and we can upload as expected.\nconst PRIVATE_NAME = 'PRIVATE';\nconst PRIVATE_KEY_HEADER = `-----BEGIN ${PRIVATE_NAME} KEY-----\n`;\nconst PRIVATE_KEY_FOOTER = `-----END ${PRIVATE_NAME} KEY-----`;\n\nconst PROTOCOL_AUTHENTICATOR_VALUES: Protocol.EnumerableEnum = {\n Ctap2: Protocol.WebAuthn.AuthenticatorProtocol.Ctap2,\n U2f: Protocol.WebAuthn.AuthenticatorProtocol.U2f,\n};\n\nexport class WebauthnPaneImpl extends UI.Widget.VBox implements\n SDK.TargetManager.SDKModelObserver {\n #activeAuthId: Protocol.WebAuthn.AuthenticatorId|null = null;\n #hasBeenEnabled = false;\n readonly dataGrids = new Map>();\n #enableCheckbox!: UI.Toolbar.ToolbarCheckbox;\n readonly #availableAuthenticatorSetting: Common.Settings.Setting;\n #model?: SDK.WebAuthnModel.WebAuthnModel;\n #authenticatorsView: HTMLElement;\n #topToolbarContainer: HTMLElement|undefined;\n #topToolbar: UI.Toolbar.Toolbar|undefined;\n #learnMoreView: HTMLElement|undefined;\n #newAuthenticatorSection: HTMLElement|undefined;\n #newAuthenticatorForm: HTMLElement|undefined;\n #protocolSelect: HTMLSelectElement|undefined;\n #transportSelect: HTMLSelectElement|undefined;\n #residentKeyCheckboxLabel: UI.UIUtils.CheckboxLabel|undefined;\n residentKeyCheckbox: HTMLInputElement|undefined;\n #userVerificationCheckboxLabel: UI.UIUtils.CheckboxLabel|undefined;\n #userVerificationCheckbox: HTMLInputElement|undefined;\n #largeBlobCheckboxLabel: UI.UIUtils.CheckboxLabel|undefined;\n largeBlobCheckbox: HTMLInputElement|undefined;\n addAuthenticatorButton: HTMLButtonElement|undefined;\n #isEnabling?: Promise;\n\n constructor() {\n super(true);\n\n this.element.setAttribute('jslog', `${VisualLogging.panel('webauthn').track({resize: true})}`);\n\n SDK.TargetManager.TargetManager.instance().observeModels(SDK.WebAuthnModel.WebAuthnModel, this, {scoped: true});\n\n this.contentElement.classList.add('webauthn-pane');\n\n this.#availableAuthenticatorSetting =\n Common.Settings.Settings.instance().createSetting(\n 'webauthn-authenticators', []);\n\n this.#createToolbar();\n this.#authenticatorsView = this.contentElement.createChild('div', 'authenticators-view');\n this.#createNewAuthenticatorSection();\n this.#updateVisibility(false);\n }\n\n modelAdded(model: SDK.WebAuthnModel.WebAuthnModel): void {\n if (model.target() === model.target().outermostTarget()) {\n this.#model = model;\n }\n }\n\n modelRemoved(model: SDK.WebAuthnModel.WebAuthnModel): void {\n if (model.target() === model.target().outermostTarget()) {\n this.#model = undefined;\n }\n }\n\n async #loadInitialAuthenticators(): Promise {\n let activeAuthenticatorId: Protocol.WebAuthn.AuthenticatorId|null = null;\n const availableAuthenticators = this.#availableAuthenticatorSetting.get();\n for (const options of availableAuthenticators) {\n if (!this.#model) {\n continue;\n }\n\n const authenticatorId = await this.#model.addAuthenticator(options);\n void this.#addAuthenticatorSection(authenticatorId, options);\n // Update the authenticatorIds in the options.\n options.authenticatorId = authenticatorId;\n if (options.active) {\n activeAuthenticatorId = authenticatorId;\n }\n }\n\n // Update the settings to reflect the new authenticatorIds.\n this.#availableAuthenticatorSetting.set(availableAuthenticators);\n if (activeAuthenticatorId) {\n void this.#setActiveAuthenticator(activeAuthenticatorId);\n }\n }\n\n override async ownerViewDisposed(): Promise {\n if (this.#enableCheckbox) {\n this.#enableCheckbox.setChecked(false);\n }\n await this.#setVirtualAuthEnvEnabled(false);\n }\n\n #createToolbar(): void {\n this.#topToolbarContainer = this.contentElement.createChild('div', 'webauthn-toolbar-container');\n this.#topToolbarContainer.setAttribute('jslog', `${VisualLogging.toolbar()}`);\n this.#topToolbar = new UI.Toolbar.Toolbar('webauthn-toolbar', this.#topToolbarContainer);\n const enableCheckboxTitle = i18nString(UIStrings.enableVirtualAuthenticator);\n this.#enableCheckbox =\n new UI.Toolbar.ToolbarCheckbox(enableCheckboxTitle, enableCheckboxTitle, this.#handleCheckboxToggle.bind(this));\n this.#enableCheckbox.inputElement.setAttribute(\n 'jslog', `${VisualLogging.toggle('virtual-authenticators').track({click: true})}`);\n this.#topToolbar.appendToolbarItem(this.#enableCheckbox);\n }\n\n #createCredentialsDataGrid(authenticatorId: Protocol.WebAuthn.AuthenticatorId):\n DataGrid.DataGrid.DataGridImpl {\n const columns = ([\n {\n id: 'credentialId',\n title: i18nString(UIStrings.id),\n longText: true,\n weight: 24,\n },\n {\n id: 'isResidentCredential',\n title: i18nString(UIStrings.isResident),\n dataType: DataGrid.DataGrid.DataType.Boolean,\n weight: 10,\n },\n {\n id: 'rpId',\n title: i18nString(UIStrings.rpId),\n },\n {\n id: 'userHandle',\n title: i18nString(UIStrings.userHandle),\n },\n {\n id: 'signCount',\n title: i18nString(UIStrings.signCount),\n },\n {id: 'actions', title: i18nString(UIStrings.actions)},\n ] as DataGrid.DataGrid.ColumnDescriptor[]);\n\n const dataGridConfig = {\n displayName: i18nString(UIStrings.credentials),\n columns,\n editCallback: undefined,\n deleteCallback: undefined,\n refreshCallback: undefined,\n };\n const dataGrid = new WebauthnDataGrid(dataGridConfig);\n dataGrid.renderInline();\n dataGrid.setStriped(true);\n dataGrid.addEventListener(Events.ExportCredential, this.#handleExportCredential, this);\n dataGrid.addEventListener(Events.RemoveCredential, this.#handleRemoveCredential.bind(this, authenticatorId));\n dataGrid.rootNode().appendChild(new EmptyDataGridNode());\n\n this.dataGrids.set(authenticatorId, dataGrid);\n\n return dataGrid;\n }\n\n #handleExportCredential({data: credential}: Common.EventTarget.EventTargetEvent): void {\n this.#exportCredential(credential);\n }\n\n #handleRemoveCredential(authenticatorId: Protocol.WebAuthn.AuthenticatorId, {\n data: credential,\n }: Common.EventTarget.EventTargetEvent): void {\n void this.#removeCredential(authenticatorId, credential.credentialId);\n }\n\n #addCredential(authenticatorId: Protocol.WebAuthn.AuthenticatorId, {\n data: event,\n }: Common.EventTarget.EventTargetEvent): void {\n const dataGrid = this.dataGrids.get(authenticatorId);\n if (!dataGrid) {\n return;\n }\n const emptyNode = dataGrid.rootNode().children.find(node => !Object.keys(node.data).length);\n if (emptyNode) {\n dataGrid.rootNode().removeChild(emptyNode);\n }\n const node = new DataGridNode(event.credential);\n dataGrid.rootNode().appendChild(node);\n }\n\n #updateCredential(authenticatorId: Protocol.WebAuthn.AuthenticatorId, {\n data: event,\n }: Common.EventTarget.EventTargetEvent): void {\n const dataGrid = this.dataGrids.get(authenticatorId);\n if (!dataGrid) {\n return;\n }\n const node = dataGrid.rootNode().children.find(node => node.data?.credentialId === event.credential.credentialId);\n if (!node) {\n return;\n }\n node.data = event.credential;\n }\n\n async #setVirtualAuthEnvEnabled(enable: boolean): Promise {\n await this.#isEnabling;\n this.#isEnabling = new Promise(async (resolve: (value: void) => void) => {\n if (enable && !this.#hasBeenEnabled) {\n // Ensures metric is only tracked once per session.\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.VirtualAuthenticatorEnvironmentEnabled);\n this.#hasBeenEnabled = true;\n }\n if (this.#model) {\n await this.#model.setVirtualAuthEnvEnabled(enable);\n }\n\n if (enable) {\n await this.#loadInitialAuthenticators();\n } else {\n this.#removeAuthenticatorSections();\n }\n\n this.#updateVisibility(enable);\n this.#isEnabling = undefined;\n resolve();\n });\n }\n\n #updateVisibility(enabled: boolean): void {\n this.contentElement.classList.toggle('enabled', enabled);\n }\n\n #removeAuthenticatorSections(): void {\n this.#authenticatorsView.innerHTML = '';\n for (const dataGrid of this.dataGrids.values()) {\n dataGrid.asWidget().detach();\n }\n this.dataGrids.clear();\n }\n\n #handleCheckboxToggle(e: MouseEvent): void {\n void this.#setVirtualAuthEnvEnabled((e.target as HTMLInputElement).checked);\n }\n\n #updateEnabledTransportOptions(enabledOptions: Protocol.WebAuthn.AuthenticatorTransport[]): void {\n if (!this.#transportSelect) {\n return;\n }\n\n const prevValue = this.#transportSelect.value;\n this.#transportSelect.removeChildren();\n\n for (const option of enabledOptions) {\n this.#transportSelect.appendChild(UI.UIUtils.createOption(option, option, option));\n }\n\n // Make sure the currently selected value stays the same.\n this.#transportSelect.value = prevValue;\n // If the new set does not include the previous value.\n if (!this.#transportSelect.value) {\n // Select the first available value.\n this.#transportSelect.selectedIndex = 0;\n }\n }\n\n #updateNewAuthenticatorSectionOptions(): void {\n if (!this.#protocolSelect || !this.residentKeyCheckbox || !this.#userVerificationCheckbox ||\n !this.largeBlobCheckbox) {\n return;\n }\n\n if (this.#protocolSelect.value === Protocol.WebAuthn.AuthenticatorProtocol.Ctap2) {\n this.residentKeyCheckbox.disabled = false;\n this.#userVerificationCheckbox.disabled = false;\n this.largeBlobCheckbox.disabled = !this.residentKeyCheckbox.checked;\n if (this.largeBlobCheckbox.disabled) {\n this.largeBlobCheckbox.checked = false;\n }\n this.#updateEnabledTransportOptions([\n Protocol.WebAuthn.AuthenticatorTransport.Usb,\n Protocol.WebAuthn.AuthenticatorTransport.Ble,\n Protocol.WebAuthn.AuthenticatorTransport.Nfc,\n // TODO (crbug.com/1034663): Toggle cable as option depending on if cablev2 flag is on.\n // Protocol.WebAuthn.AuthenticatorTransport.Cable,\n Protocol.WebAuthn.AuthenticatorTransport.Internal,\n ]);\n } else {\n this.residentKeyCheckbox.checked = false;\n this.residentKeyCheckbox.disabled = true;\n this.#userVerificationCheckbox.checked = false;\n this.#userVerificationCheckbox.disabled = true;\n this.largeBlobCheckbox.checked = false;\n this.largeBlobCheckbox.disabled = true;\n this.#updateEnabledTransportOptions([\n Protocol.WebAuthn.AuthenticatorTransport.Usb,\n Protocol.WebAuthn.AuthenticatorTransport.Ble,\n Protocol.WebAuthn.AuthenticatorTransport.Nfc,\n ]);\n }\n }\n\n #createNewAuthenticatorSection(): void {\n const learnMoreLink = UI.XLink.XLink.create(\n 'https://developers.google.com/web/updates/2018/05/webauthn', i18nString(UIStrings.learnMore), undefined,\n undefined, 'learn-more');\n this.#learnMoreView = this.contentElement.createChild('div', 'learn-more');\n this.#learnMoreView.appendChild(UI.Fragment.html`\n
\n ${i18nString(UIStrings.useWebauthnForPhishingresistant)}

\n ${learnMoreLink}\n
\n `);\n\n this.#newAuthenticatorSection = this.contentElement.createChild('div', 'new-authenticator-container');\n const newAuthenticatorTitle =\n UI.UIUtils.createLabel(i18nString(UIStrings.newAuthenticator), 'new-authenticator-title');\n this.#newAuthenticatorSection.appendChild(newAuthenticatorTitle);\n this.#newAuthenticatorForm = this.#newAuthenticatorSection.createChild('div', 'new-authenticator-form');\n this.#newAuthenticatorForm.setAttribute('jslog', `${VisualLogging.section('new-authenticator')}`);\n\n const protocolGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n const transportGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n const residentKeyGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n const userVerificationGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n const largeBlobGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n const addButtonGroup = this.#newAuthenticatorForm.createChild('div', 'authenticator-option');\n\n const protocolSelectTitle = UI.UIUtils.createLabel(i18nString(UIStrings.protocol), 'authenticator-option-label');\n protocolGroup.appendChild(protocolSelectTitle);\n this.#protocolSelect = (protocolGroup.createChild('select', 'chrome-select') as HTMLSelectElement);\n this.#protocolSelect.setAttribute('jslog', `${VisualLogging.dropDown('protocol').track({change: true})}`);\n UI.ARIAUtils.bindLabelToControl(protocolSelectTitle, (this.#protocolSelect as Element));\n Object.values(PROTOCOL_AUTHENTICATOR_VALUES).sort().forEach((option: Protocol.WebAuthn.AuthenticatorProtocol) => {\n if (this.#protocolSelect) {\n this.#protocolSelect.appendChild(UI.UIUtils.createOption(option, option, option));\n }\n });\n\n if (this.#protocolSelect) {\n this.#protocolSelect.value = Protocol.WebAuthn.AuthenticatorProtocol.Ctap2;\n }\n\n const transportSelectTitle = UI.UIUtils.createLabel(i18nString(UIStrings.transport), 'authenticator-option-label');\n transportGroup.appendChild(transportSelectTitle);\n this.#transportSelect = (transportGroup.createChild('select', 'chrome-select') as HTMLSelectElement);\n this.#transportSelect.setAttribute('jslog', `${VisualLogging.dropDown('transport').track({change: true})}`);\n UI.ARIAUtils.bindLabelToControl(transportSelectTitle, (this.#transportSelect as Element));\n // transportSelect will be populated in updateNewAuthenticatorSectionOptions.\n\n this.#residentKeyCheckboxLabel =\n UI.UIUtils.CheckboxLabel.create(i18nString(UIStrings.supportsResidentKeys), false, undefined, 'resident-key');\n this.#residentKeyCheckboxLabel.textElement.classList.add('authenticator-option-label');\n residentKeyGroup.appendChild(this.#residentKeyCheckboxLabel.textElement);\n this.residentKeyCheckbox = this.#residentKeyCheckboxLabel.checkboxElement;\n this.residentKeyCheckbox.checked = false;\n this.residentKeyCheckbox.classList.add('authenticator-option-checkbox');\n residentKeyGroup.appendChild(this.#residentKeyCheckboxLabel);\n\n this.#userVerificationCheckboxLabel = UI.UIUtils.CheckboxLabel.create(\n i18nString(UIStrings.supportsUserVerification), false, undefined, 'user-verification');\n this.#userVerificationCheckboxLabel.textElement.classList.add('authenticator-option-label');\n userVerificationGroup.appendChild(this.#userVerificationCheckboxLabel.textElement);\n this.#userVerificationCheckbox = this.#userVerificationCheckboxLabel.checkboxElement;\n this.#userVerificationCheckbox.checked = false;\n this.#userVerificationCheckbox.classList.add('authenticator-option-checkbox');\n userVerificationGroup.appendChild(this.#userVerificationCheckboxLabel);\n\n this.#largeBlobCheckboxLabel =\n UI.UIUtils.CheckboxLabel.create(i18nString(UIStrings.supportsLargeBlob), false, undefined, 'large-blob');\n this.#largeBlobCheckboxLabel.textElement.classList.add('authenticator-option-label');\n largeBlobGroup.appendChild(this.#largeBlobCheckboxLabel.textElement);\n this.largeBlobCheckbox = this.#largeBlobCheckboxLabel.checkboxElement;\n this.largeBlobCheckbox.checked = false;\n this.largeBlobCheckbox.classList.add('authenticator-option-checkbox');\n this.largeBlobCheckbox.name = 'large-blob-checkbox';\n largeBlobGroup.appendChild(this.#largeBlobCheckboxLabel);\n\n this.addAuthenticatorButton = UI.UIUtils.createTextButton(\n i18nString(UIStrings.add), this.#handleAddAuthenticatorButton.bind(this),\n {jslogContext: 'webauthn.add-authenticator'});\n addButtonGroup.createChild('div', 'authenticator-option-label');\n addButtonGroup.appendChild(this.addAuthenticatorButton);\n const addAuthenticatorTitle = UI.UIUtils.createLabel(i18nString(UIStrings.addAuthenticator), '');\n UI.ARIAUtils.bindLabelToControl(addAuthenticatorTitle, this.addAuthenticatorButton);\n\n this.#updateNewAuthenticatorSectionOptions();\n if (this.#protocolSelect) {\n this.#protocolSelect.addEventListener('change', this.#updateNewAuthenticatorSectionOptions.bind(this));\n }\n if (this.residentKeyCheckbox) {\n this.residentKeyCheckbox.addEventListener('change', this.#updateNewAuthenticatorSectionOptions.bind(this));\n }\n }\n\n async #handleAddAuthenticatorButton(): Promise {\n const options = this.#createOptionsFromCurrentInputs();\n if (this.#model) {\n const authenticatorId = await this.#model.addAuthenticator(options);\n const availableAuthenticators = this.#availableAuthenticatorSetting.get();\n availableAuthenticators.push({authenticatorId, active: true, ...options});\n this.#availableAuthenticatorSetting.set(\n availableAuthenticators.map(a => ({...a, active: a.authenticatorId === authenticatorId})));\n const section = await this.#addAuthenticatorSection(authenticatorId, options);\n const mediaQueryList = window.matchMedia('(prefers-reduced-motion: reduce)');\n const prefersReducedMotion = mediaQueryList.matches;\n section.scrollIntoView({block: 'start', behavior: prefersReducedMotion ? 'auto' : 'smooth'});\n }\n }\n\n async #addAuthenticatorSection(\n authenticatorId: Protocol.WebAuthn.AuthenticatorId,\n options: Protocol.WebAuthn.VirtualAuthenticatorOptions): Promise {\n const section = document.createElement('div');\n section.classList.add('authenticator-section');\n section.setAttribute('data-authenticator-id', authenticatorId);\n section.setAttribute('jslog', `${VisualLogging.section('authenticator')}`);\n this.#authenticatorsView.appendChild(section);\n\n const headerElement = section.createChild('div', 'authenticator-section-header');\n const titleElement = headerElement.createChild('div', 'authenticator-section-title');\n UI.ARIAUtils.markAsHeading(titleElement, 2);\n\n await this.#clearActiveAuthenticator();\n const activeButtonContainer = headerElement.createChild('div', 'active-button-container');\n const activeLabel =\n UI.UIUtils.createRadioLabel(`active-authenticator-${authenticatorId}`, i18nString(UIStrings.active));\n activeLabel.radioElement.addEventListener('change', this.#setActiveAuthenticator.bind(this, authenticatorId));\n activeButtonContainer.appendChild(activeLabel);\n (activeLabel.radioElement as HTMLInputElement).checked = true;\n this.#activeAuthId = authenticatorId; // Newly added authenticator is automatically set as active.\n\n const removeButton = headerElement.createChild('button', 'text-button');\n removeButton.textContent = i18nString(UIStrings.remove);\n removeButton.addEventListener('click', this.#removeAuthenticator.bind(this, authenticatorId));\n removeButton.setAttribute('jslog', `${VisualLogging.action('webauthn.remove-authenticator').track({click: true})}`);\n\n const toolbar = new UI.Toolbar.Toolbar('edit-name-toolbar', titleElement);\n const editName = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.editName), 'edit', undefined, 'edit-name');\n const saveName = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.saveName), 'checkmark', undefined, 'save-name');\n saveName.setVisible(false);\n\n const nameField = (titleElement.createChild('input', 'authenticator-name-field') as HTMLInputElement);\n nameField.placeholder = i18nString(UIStrings.enterNewName);\n nameField.disabled = true;\n nameField.setAttribute('jslog', `${VisualLogging.textField('name').track({keydown: 'Enter', change: true})}`);\n const userFriendlyName = authenticatorId.slice(-5); // User friendly name defaults to last 5 chars of UUID.\n nameField.value = i18nString(UIStrings.authenticatorS, {PH1: userFriendlyName});\n this.#updateActiveLabelTitle(activeLabel, nameField.value);\n\n editName.addEventListener(\n UI.Toolbar.ToolbarButton.Events.Click,\n () => this.#handleEditNameButton(titleElement, nameField, editName, saveName));\n saveName.addEventListener(\n UI.Toolbar.ToolbarButton.Events.Click,\n () => this.#handleSaveNameButton(titleElement, nameField, editName, saveName, activeLabel));\n\n nameField.addEventListener(\n 'focusout', () => this.#handleSaveNameButton(titleElement, nameField, editName, saveName, activeLabel));\n nameField.addEventListener('keydown', (event: KeyboardEvent) => {\n if (event.key === 'Enter') {\n this.#handleSaveNameButton(titleElement, nameField, editName, saveName, activeLabel);\n }\n });\n\n toolbar.appendToolbarItem(editName);\n toolbar.appendToolbarItem(saveName);\n\n this.#createAuthenticatorFields(section, authenticatorId, options);\n\n const label = document.createElement('div');\n label.classList.add('credentials-title');\n label.textContent = i18nString(UIStrings.credentials);\n section.appendChild(label);\n\n const dataGrid = this.#createCredentialsDataGrid(authenticatorId);\n dataGrid.asWidget().show(section);\n if (this.#model) {\n this.#model.addEventListener(\n SDK.WebAuthnModel.Events.CredentialAdded, this.#addCredential.bind(this, authenticatorId));\n this.#model.addEventListener(\n SDK.WebAuthnModel.Events.CredentialAsserted, this.#updateCredential.bind(this, authenticatorId));\n }\n\n return section;\n }\n\n #exportCredential(credential: Protocol.WebAuthn.Credential): void {\n let pem = PRIVATE_KEY_HEADER;\n for (let i = 0; i < credential.privateKey.length; i += 64) {\n pem += credential.privateKey.substring(i, i + 64) + '\\n';\n }\n pem += PRIVATE_KEY_FOOTER;\n\n const link = document.createElement('a');\n link.download = i18nString(UIStrings.privateKeypem);\n link.href = 'data:application/x-pem-file,' + encodeURIComponent(pem);\n link.click();\n }\n\n async #removeCredential(authenticatorId: Protocol.WebAuthn.AuthenticatorId, credentialId: string): Promise {\n const dataGrid = this.dataGrids.get(authenticatorId);\n if (!dataGrid) {\n return;\n }\n\n // @ts-ignore dataGrid node type is indeterminate.\n dataGrid.rootNode()\n .children.find((n: DataGrid.DataGrid.DataGridNode) => n.data.credentialId === credentialId)\n .remove();\n\n if (!dataGrid.rootNode().children.length) {\n dataGrid.rootNode().appendChild(new EmptyDataGridNode());\n }\n\n if (this.#model) {\n await this.#model.removeCredential(authenticatorId, credentialId);\n }\n }\n\n /**\n * Creates the fields describing the authenticator in the front end.\n */\n #createAuthenticatorFields(\n section: Element, authenticatorId: string, options: Protocol.WebAuthn.VirtualAuthenticatorOptions): void {\n const sectionFields = section.createChild('div', 'authenticator-fields');\n const uuidField = sectionFields.createChild('div', 'authenticator-field');\n const protocolField = sectionFields.createChild('div', 'authenticator-field');\n const transportField = sectionFields.createChild('div', 'authenticator-field');\n const srkField = sectionFields.createChild('div', 'authenticator-field');\n const slbField = sectionFields.createChild('div', 'authenticator-field');\n const suvField = sectionFields.createChild('div', 'authenticator-field');\n\n uuidField.appendChild(UI.UIUtils.createLabel(i18nString(UIStrings.uuid), 'authenticator-option-label'));\n protocolField.appendChild(UI.UIUtils.createLabel(i18nString(UIStrings.protocol), 'authenticator-option-label'));\n transportField.appendChild(UI.UIUtils.createLabel(i18nString(UIStrings.transport), 'authenticator-option-label'));\n srkField.appendChild(\n UI.UIUtils.createLabel(i18nString(UIStrings.supportsResidentKeys), 'authenticator-option-label'));\n slbField.appendChild(UI.UIUtils.createLabel(i18nString(UIStrings.supportsLargeBlob), 'authenticator-option-label'));\n suvField.appendChild(\n UI.UIUtils.createLabel(i18nString(UIStrings.supportsUserVerification), 'authenticator-option-label'));\n\n uuidField.createChild('div', 'authenticator-field-value').textContent = authenticatorId;\n protocolField.createChild('div', 'authenticator-field-value').textContent = options.protocol;\n transportField.createChild('div', 'authenticator-field-value').textContent = options.transport;\n srkField.createChild('div', 'authenticator-field-value').textContent =\n options.hasResidentKey ? i18nString(UIStrings.yes) : i18nString(UIStrings.no);\n slbField.createChild('div', 'authenticator-field-value').textContent =\n options.hasLargeBlob ? i18nString(UIStrings.yes) : i18nString(UIStrings.no);\n suvField.createChild('div', 'authenticator-field-value').textContent =\n options.hasUserVerification ? i18nString(UIStrings.yes) : i18nString(UIStrings.no);\n }\n\n #handleEditNameButton(\n titleElement: Element, nameField: HTMLInputElement, editName: UI.Toolbar.ToolbarButton,\n saveName: UI.Toolbar.ToolbarButton): void {\n nameField.disabled = false;\n titleElement.classList.add('editing-name');\n nameField.focus();\n saveName.setVisible(true);\n editName.setVisible(false);\n }\n\n #handleSaveNameButton(\n titleElement: Element, nameField: HTMLInputElement, editName: UI.Toolbar.ToolbarItem,\n saveName: UI.Toolbar.ToolbarItem, activeLabel: UI.UIUtils.DevToolsRadioButton): void {\n const name = nameField.value;\n if (!name) {\n return;\n }\n nameField.disabled = true;\n titleElement.classList.remove('editing-name');\n editName.setVisible(true);\n saveName.setVisible(false);\n this.#updateActiveLabelTitle(activeLabel, name);\n }\n\n #updateActiveLabelTitle(activeLabel: UI.UIUtils.DevToolsRadioButton, authenticatorName: string): void {\n UI.Tooltip.Tooltip.install(\n activeLabel.radioElement, i18nString(UIStrings.setSAsTheActiveAuthenticator, {PH1: authenticatorName}));\n }\n\n /**\n * Removes both the authenticator and its respective UI element.\n */\n #removeAuthenticator(authenticatorId: Protocol.WebAuthn.AuthenticatorId): void {\n if (this.#authenticatorsView) {\n const child = this.#authenticatorsView.querySelector(`[data-authenticator-id=${CSS.escape(authenticatorId)}]`);\n if (child) {\n child.remove();\n }\n }\n const dataGrid = this.dataGrids.get(authenticatorId);\n if (dataGrid) {\n dataGrid.asWidget().detach();\n this.dataGrids.delete(authenticatorId);\n }\n\n if (this.#model) {\n void this.#model.removeAuthenticator(authenticatorId);\n }\n\n // Update available authenticator setting.\n const prevAvailableAuthenticators = this.#availableAuthenticatorSetting.get();\n const newAvailableAuthenticators = prevAvailableAuthenticators.filter(a => a.authenticatorId !== authenticatorId);\n this.#availableAuthenticatorSetting.set(newAvailableAuthenticators);\n\n if (this.#activeAuthId === authenticatorId) {\n const availableAuthenticatorIds = Array.from(this.dataGrids.keys());\n if (availableAuthenticatorIds.length) {\n void this.#setActiveAuthenticator(availableAuthenticatorIds[0]);\n } else {\n this.#activeAuthId = null;\n }\n }\n }\n\n #createOptionsFromCurrentInputs(): Protocol.WebAuthn.VirtualAuthenticatorOptions {\n // TODO(crbug.com/1034663): Add optionality for isUserVerified param.\n if (!this.#protocolSelect || !this.#transportSelect || !this.residentKeyCheckbox ||\n !this.#userVerificationCheckbox || !this.largeBlobCheckbox) {\n throw new Error('Unable to create options from current inputs');\n }\n\n return {\n protocol: this.#protocolSelect.options[this.#protocolSelect.selectedIndex].value as\n Protocol.WebAuthn.AuthenticatorProtocol,\n ctap2Version: Protocol.WebAuthn.Ctap2Version.Ctap2_1,\n transport: this.#transportSelect.options[this.#transportSelect.selectedIndex].value as\n Protocol.WebAuthn.AuthenticatorTransport,\n hasResidentKey: this.residentKeyCheckbox.checked,\n hasUserVerification: this.#userVerificationCheckbox.checked,\n hasLargeBlob: this.largeBlobCheckbox.checked,\n automaticPresenceSimulation: true,\n isUserVerified: true,\n };\n }\n\n /**\n * Sets the given authenticator as active.\n * Note that a newly added authenticator will automatically be set as active.\n */\n async #setActiveAuthenticator(authenticatorId: Protocol.WebAuthn.AuthenticatorId): Promise {\n await this.#clearActiveAuthenticator();\n if (this.#model) {\n await this.#model.setAutomaticPresenceSimulation(authenticatorId, true);\n }\n this.#activeAuthId = authenticatorId;\n\n const prevAvailableAuthenticators = this.#availableAuthenticatorSetting.get();\n const newAvailableAuthenticators =\n prevAvailableAuthenticators.map(a => ({...a, active: a.authenticatorId === authenticatorId}));\n this.#availableAuthenticatorSetting.set(newAvailableAuthenticators);\n\n this.#updateActiveButtons();\n }\n\n #updateActiveButtons(): void {\n const authenticators = this.#authenticatorsView.getElementsByClassName('authenticator-section');\n Array.from(authenticators).forEach((authenticator: Element) => {\n const button = (authenticator.querySelector('input.dt-radio-button') as HTMLInputElement);\n if (!button) {\n return;\n }\n button.checked = (authenticator as HTMLElement).dataset.authenticatorId === this.#activeAuthId;\n });\n }\n\n async #clearActiveAuthenticator(): Promise {\n if (this.#activeAuthId && this.#model) {\n await this.#model.setAutomaticPresenceSimulation(this.#activeAuthId, false);\n }\n this.#activeAuthId = null;\n this.#updateActiveButtons();\n }\n override wasShown(): void {\n super.wasShown();\n this.registerCSSFiles([webauthnPaneStyles]);\n }\n}\n"]} \ No newline at end of file diff --git a/public/panels/webauthn/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/panels/webauthn/devtools_entrypoint-bundle-typescript-tsconfig.json index 82dda2bce..f2bde0b5c 100644 --- a/public/panels/webauthn/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/panels/webauthn/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/webauthn/devtools_entrypoint-meta-typescript-tsconfig.json b/public/panels/webauthn/devtools_entrypoint-meta-typescript-tsconfig.json index 79af72b6b..a526f4651 100644 --- a/public/panels/webauthn/devtools_entrypoint-meta-typescript-tsconfig.json +++ b/public/panels/webauthn/devtools_entrypoint-meta-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/webauthn/unittests-tsconfig.json b/public/panels/webauthn/unittests-tsconfig.json index e44be9d8b..a1dd2670a 100644 --- a/public/panels/webauthn/unittests-tsconfig.json +++ b/public/panels/webauthn/unittests-tsconfig.json @@ -41,8 +41,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/panels/webauthn/webauthn-tsconfig.json b/public/panels/webauthn/webauthn-tsconfig.json index ce596b52c..27f34fb30 100644 --- a/public/panels/webauthn/webauthn-tsconfig.json +++ b/public/panels/webauthn/webauthn-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/services/puppeteer/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/services/puppeteer/devtools_entrypoint-bundle-typescript-tsconfig.json index abb11ad0c..5ae4f1ad5 100644 --- a/public/services/puppeteer/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/services/puppeteer/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/services/puppeteer/puppeteer_connection-tsconfig.json b/public/services/puppeteer/puppeteer_connection-tsconfig.json index 697d4cb72..8d3209c95 100644 --- a/public/services/puppeteer/puppeteer_connection-tsconfig.json +++ b/public/services/puppeteer/puppeteer_connection-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/services/trace_bounds/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/services/trace_bounds/devtools_entrypoint-bundle-typescript-tsconfig.json index dbad1b4b9..f5bdc65a2 100644 --- a/public/services/trace_bounds/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/services/trace_bounds/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/services/trace_bounds/trace_bounds-tsconfig.json b/public/services/trace_bounds/trace_bounds-tsconfig.json index 1bc5c3347..c29067b27 100644 --- a/public/services/trace_bounds/trace_bounds-tsconfig.json +++ b/public/services/trace_bounds/trace_bounds-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/services/trace_bounds/unittests-tsconfig.json b/public/services/trace_bounds/unittests-tsconfig.json index f6052a77d..cebece88b 100644 --- a/public/services/trace_bounds/unittests-tsconfig.json +++ b/public/services/trace_bounds/unittests-tsconfig.json @@ -41,8 +41,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/services/tracing/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/services/tracing/devtools_entrypoint-bundle-typescript-tsconfig.json index 9f6af92de..ee6ae53c8 100644 --- a/public/services/tracing/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/services/tracing/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/services/tracing/tracing-tsconfig.json b/public/services/tracing/tracing-tsconfig.json index 205bdd538..00d59d465 100644 --- a/public/services/tracing/tracing-tsconfig.json +++ b/public/services/tracing/tracing-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/services/window_bounds/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/services/window_bounds/devtools_entrypoint-bundle-typescript-tsconfig.json index 275b7a136..91f341318 100644 --- a/public/services/window_bounds/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/services/window_bounds/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/services/window_bounds/window_bounds-tsconfig.json b/public/services/window_bounds/window_bounds-tsconfig.json index ceee9420a..ab363f365 100644 --- a/public/services/window_bounds/window_bounds-tsconfig.json +++ b/public/services/window_bounds/window_bounds-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/testing/EnvironmentHelpers.js b/public/testing/EnvironmentHelpers.js index 0389455a8..337bf88b9 100644 --- a/public/testing/EnvironmentHelpers.js +++ b/public/testing/EnvironmentHelpers.js @@ -100,12 +100,10 @@ const REGISTERED_EXPERIMENTS = [ "header-overrides" /* Root.Runtime.ExperimentName.HEADER_OVERRIDES */, "highlight-errors-elements-panel" /* Root.Runtime.ExperimentName.HIGHLIGHT_ERRORS_ELEMENTS_PANEL */, "set-all-breakpoints-eagerly" /* Root.Runtime.ExperimentName.SET_ALL_BREAKPOINTS_EAGERLY */, - "self-xss-warning" /* Root.Runtime.ExperimentName.SELF_XSS_WARNING */, 'evaluate-expressions-with-source-maps', "use-source-map-scopes" /* Root.Runtime.ExperimentName.USE_SOURCE_MAP_SCOPES */, 'font-editor', "network-panel-filter-bar-redesign" /* Root.Runtime.ExperimentName.NETWORK_PANEL_FILTER_BAR_REDESIGN */, - "track-context-menu" /* Root.Runtime.ExperimentName.TRACK_CONTEXT_MENU */, "sources-frame-indentation-markers-temporarily-disable" /* Root.Runtime.ExperimentName.INDENTATION_MARKERS_TEMP_DISABLE */, "autofill-view" /* Root.Runtime.ExperimentName.AUTOFILL_VIEW */, ]; diff --git a/public/testing/EnvironmentHelpers.js.map b/public/testing/EnvironmentHelpers.js.map index 4026f7b3f..40424e805 100644 --- a/public/testing/EnvironmentHelpers.js.map +++ b/public/testing/EnvironmentHelpers.js.map @@ -1 +1 @@ -{"version":3,"file":"EnvironmentHelpers.js","sourceRoot":"","sources":["../../../../../front_end/testing/EnvironmentHelpers.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAC;AAE7C,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAC;AAC7C,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAE1C,OAAO,KAAK,QAAQ,MAAM,gCAAgC,CAAC;AAC3D,OAAO,KAAK,aAAa,MAAM,4CAA4C,CAAC;AAC5E,OAAO,KAAK,IAAI,MAAM,wBAAwB,CAAC;AAC/C,OAAO,KAAK,WAAW,MAAM,sCAAsC,CAAC;AACpE,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAC;AAG9D,6DAA6D;AAC7D,8DAA8D;AAC9D,wBAAwB;AACxB,gEAAgE;AAChE,IAAI,EAAmB,CAAC;AAExB,IAAI,cAAc,GAAG,CAAC,CAAC;AAEvB,MAAM,UAAU,YAAY,CACxB,EAAC,EAAE,EAAE,IAAI,EAAE,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,GAAG,oBAAoB,KAOtF,EAAE;IACR,IAAI,CAAC,EAAE,EAAE;QACP,IAAI,CAAC,cA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AC,CAAC,EAAE;oBAC/C,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;iBACd;YACH,CAAC,CAAC;SACH;QACD,IAAI,YAAY,CAAC,IAAI,EAAE;YACrB,OAAO,CAAC,IAAI,GAAG,CAAC,GAAG,IAAe,EAAE,EAAE;gBACpC,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE;oBAChD,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;iBACf;YACH,CAAC,CAAC;SACH;QACD,IAAI,YAAY,CAAC,KAAK,EAAE;YACtB,OAAO,CAAC,KAAK,GAAG,CAAC,GAAG,IAAe,EAAE,EAAE;gBACrC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE;oBACjD,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;iBAChB;YACH,CAAC,CAAC;SACH;IACH,CAAC,CAAC,CAAC;IACH,KAAK,CAAC,GAAG,EAAE;QACT,IAAI,YAAY,CAAC,GAAG,EAAE;YACpB,sCAAsC;YACtC,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC;SACnB;QACD,IAAI,YAAY,CAAC,IAAI,EAAE;YACrB,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;SACrB;QACD,IAAI,YAAY,CAAC,KAAK,EAAE;YACtB,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;SACvB;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../core/common/common.js';\nimport * as Host from '../core/host/host.js';\nimport * as i18n from '../core/i18n/i18n.js';\nimport type * as Platform from '../core/platform/platform.js';\nimport * as Root from '../core/root/root.js';\nimport * as SDK from '../core/sdk/sdk.js';\nimport type * as Protocol from '../generated/protocol.js';\nimport * as Bindings from '../models/bindings/bindings.js';\nimport * as IssuesManager from '../models/issues_manager/issues_manager.js';\nimport * as Logs from '../models/logs/logs.js';\nimport * as Persistence from '../models/persistence/persistence.js';\nimport * as Workspace from '../models/workspace/workspace.js';\nimport type * as UIModule from '../ui/legacy/legacy.js';\n\n// Don't import UI at this stage because it will fail without\n// the environment. Instead we do the import at the end of the\n// initialization phase.\n// eslint-disable-next-line @typescript-eslint/naming-convention\nlet UI: typeof UIModule;\n\nlet uniqueTargetId = 0;\n\nexport function createTarget(\n {id, name, type = SDK.Target.Type.Frame, parentTarget, subtype, url = 'http://example.com'}: {\n id?: Protocol.Target.TargetID,\n name?: string,\n type?: SDK.Target.Type,\n parentTarget?: SDK.Target.Target,\n subtype?: string,\n url?: string,\n } = {}) {\n if (!id) {\n if (!uniqueTargetId++) {\n id = 'test' as Protocol.Target.TargetID;\n } else {\n id = ('test' + uniqueTargetId) as Protocol.Target.TargetID;\n }\n }\n const targetManager = SDK.TargetManager.TargetManager.instance();\n return targetManager.createTarget(\n id, name ?? id, type, parentTarget ? parentTarget : null, /* sessionId=*/ parentTarget ? id : undefined,\n /* suspended=*/ false,\n /* connection=*/ undefined, {targetId: id, url, subtype} as Protocol.Target.TargetInfo);\n}\n\nfunction createSettingValue(\n category: Common.Settings.SettingCategory, settingName: string, defaultValue: unknown,\n settingType = Common.Settings.SettingType.BOOLEAN): Common.Settings.SettingRegistration {\n return {category, settingName, defaultValue, settingType};\n}\n\nexport function stubNoopSettings() {\n sinon.stub(Common.Settings.Settings, 'instance').returns({\n createSetting: () => ({\n get: () => [],\n set: () => {},\n addChangeListener: () => {},\n removeChangeListener: () => {},\n setDisabled: () => {},\n setTitle: () => {},\n title: () => {},\n asRegExp: () => {},\n type: () => Common.Settings.SettingType.BOOLEAN,\n getAsArray: () => [],\n }),\n moduleSetting: () => ({\n get: () => [],\n set: () => {},\n addChangeListener: () => {},\n removeChangeListener: () => {},\n setDisabled: () => {},\n setTitle: () => {},\n title: () => {},\n asRegExp: () => {},\n type: () => Common.Settings.SettingType.BOOLEAN,\n getAsArray: () => [],\n }),\n createLocalSetting: () => ({\n get: () => [],\n set: () => {},\n addChangeListener: () => {},\n removeChangeListener: () => {},\n setDisabled: () => {},\n setTitle: () => {},\n title: () => {},\n asRegExp: () => {},\n type: () => Common.Settings.SettingType.BOOLEAN,\n getAsArray: () => [],\n }),\n } as unknown as Common.Settings.Settings);\n}\n\nexport function registerNoopActions(actionIds: string[]): void {\n for (const actionId of actionIds) {\n UI.ActionRegistration.maybeRemoveActionExtension(actionId);\n UI.ActionRegistration.registerActionExtension({\n actionId,\n category: UI.ActionRegistration.ActionCategory.NONE,\n title: () => 'mock' as Platform.UIString.LocalizedString,\n });\n }\n const actionRegistryInstance = UI.ActionRegistry.ActionRegistry.instance({forceNew: true});\n UI.ShortcutRegistry.ShortcutRegistry.instance({forceNew: true, actionRegistry: actionRegistryInstance});\n}\n\nconst REGISTERED_EXPERIMENTS = [\n Root.Runtime.ExperimentName.CAPTURE_NODE_CREATION_STACKS,\n Root.Runtime.ExperimentName.PROTOCOL_MONITOR,\n 'timeline-show-all-events',\n 'timeline-v8-runtime-call-stats',\n 'timeline-invalidation-tracking',\n 'ignore-list-js-frames-on-timeline',\n Root.Runtime.ExperimentName.INSTRUMENTATION_BREAKPOINTS,\n 'css-type-component-length-deprecate',\n Root.Runtime.ExperimentName.STYLES_PANE_CSS_CHANGES,\n Root.Runtime.ExperimentName.TIMELINE_AS_CONSOLE_PROFILE_RESULT_PANEL,\n Root.Runtime.ExperimentName.HEADER_OVERRIDES,\n Root.Runtime.ExperimentName.HIGHLIGHT_ERRORS_ELEMENTS_PANEL,\n Root.Runtime.ExperimentName.SET_ALL_BREAKPOINTS_EAGERLY,\n Root.Runtime.ExperimentName.SELF_XSS_WARNING,\n 'evaluate-expressions-with-source-maps',\n Root.Runtime.ExperimentName.USE_SOURCE_MAP_SCOPES,\n 'font-editor',\n Root.Runtime.ExperimentName.NETWORK_PANEL_FILTER_BAR_REDESIGN,\n Root.Runtime.ExperimentName.TRACK_CONTEXT_MENU,\n Root.Runtime.ExperimentName.INDENTATION_MARKERS_TEMP_DISABLE,\n Root.Runtime.ExperimentName.AUTOFILL_VIEW,\n];\n\nexport async function initializeGlobalVars({reset = true} = {}) {\n await initializeGlobalLocaleVars();\n\n // Create the appropriate settings needed to boot.\n const settings = [\n createSettingValue(Common.Settings.SettingCategory.APPEARANCE, 'disable-paused-state-overlay', false),\n createSettingValue(Common.Settings.SettingCategory.CONSOLE, 'custom-formatters', false),\n createSettingValue(Common.Settings.SettingCategory.DEBUGGER, 'pause-on-exception-enabled', false),\n createSettingValue(Common.Settings.SettingCategory.DEBUGGER, 'pause-on-caught-exception', false),\n createSettingValue(Common.Settings.SettingCategory.DEBUGGER, 'pause-on-uncaught-exception', false),\n createSettingValue(Common.Settings.SettingCategory.DEBUGGER, 'disable-async-stack-traces', false),\n createSettingValue(Common.Settings.SettingCategory.DEBUGGER, 'breakpoints-active', true),\n createSettingValue(Common.Settings.SettingCategory.DEBUGGER, 'java-script-disabled', false),\n createSettingValue(Common.Settings.SettingCategory.DEBUGGER, 'skip-content-scripts', true),\n createSettingValue(\n Common.Settings.SettingCategory.DEBUGGER, 'automatically-ignore-list-known-third-party-scripts', true),\n createSettingValue(Common.Settings.SettingCategory.DEBUGGER, 'enable-ignore-listing', true),\n createSettingValue(\n Common.Settings.SettingCategory.DEBUGGER, 'skip-stack-frames-pattern', '/node_modules/|/bower_components/',\n Common.Settings.SettingType.REGEX),\n createSettingValue(Common.Settings.SettingCategory.DEBUGGER, 'navigator-group-by-folder', true),\n createSettingValue(Common.Settings.SettingCategory.ELEMENTS, 'show-detailed-inspect-tooltip', true),\n createSettingValue(Common.Settings.SettingCategory.NETWORK, 'cache-disabled', false),\n createSettingValue(Common.Settings.SettingCategory.RENDERING, 'avif-format-disabled', false),\n createSettingValue(\n Common.Settings.SettingCategory.RENDERING, 'emulated-css-media', '', Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.RENDERING, 'emulated-css-media-feature-prefers-color-scheme', '',\n Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.RENDERING, 'emulated-css-media-feature-forced-colors', '',\n Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.RENDERING, 'emulated-css-media-feature-prefers-reduced-motion', '',\n Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.RENDERING, 'emulated-css-media-feature-prefers-contrast', '',\n Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.RENDERING, 'emulated-css-media-feature-prefers-reduced-data', '',\n Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.RENDERING, 'emulated-css-media-feature-prefers-reduced-transparency', '',\n Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.RENDERING, 'emulated-css-media-feature-color-gamut', '',\n Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.RENDERING, 'emulated-vision-deficiency', '', Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.RENDERING, 'emulate-auto-dark-mode', '', Common.Settings.SettingType.ENUM),\n createSettingValue(Common.Settings.SettingCategory.RENDERING, 'local-fonts-disabled', false),\n createSettingValue(Common.Settings.SettingCategory.RENDERING, 'show-paint-rects', false),\n createSettingValue(Common.Settings.SettingCategory.RENDERING, 'show-layout-shift-regions', false),\n createSettingValue(Common.Settings.SettingCategory.RENDERING, 'show-ad-highlights', false),\n createSettingValue(Common.Settings.SettingCategory.RENDERING, 'show-debug-borders', false),\n createSettingValue(Common.Settings.SettingCategory.RENDERING, 'show-fps-counter', false),\n createSettingValue(Common.Settings.SettingCategory.RENDERING, 'show-scroll-bottleneck-rects', false),\n createSettingValue(Common.Settings.SettingCategory.RENDERING, 'show-web-vitals', false),\n createSettingValue(Common.Settings.SettingCategory.RENDERING, 'webp-format-disabled', false),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'allow-scroll-past-eof', true),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'css-source-maps-enabled', true),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'inline-variable-values', true),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'js-source-maps-enabled', true),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'show-whitespaces-in-editor', 'none'),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'text-editor-autocompletion', true),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'text-editor-auto-detect-indent', false),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'text-editor-bracket-matching', true),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'text-editor-code-folding', true),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'text-editor-indent', ' '),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'text-editor-tab-moves-focus', false),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'dom-word-wrap', true),\n createSettingValue(\n Common.Settings.SettingCategory.EMULATION, 'emulation.touch', '', Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.EMULATION, 'emulation.idle-detection', '', Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.GRID, 'show-grid-line-labels', 'none', Common.Settings.SettingType.ENUM),\n createSettingValue(Common.Settings.SettingCategory.GRID, 'extend-grid-lines', true),\n createSettingValue(Common.Settings.SettingCategory.GRID, 'show-grid-areas', true),\n createSettingValue(Common.Settings.SettingCategory.GRID, 'show-grid-track-sizes', true),\n createSettingValue(\n Common.Settings.SettingCategory.NONE, 'active-keybind-set', '', Common.Settings.SettingType.ENUM),\n createSettingValue(Common.Settings.SettingCategory.NONE, 'user-shortcuts', [], Common.Settings.SettingType.ARRAY),\n createSettingValue(\n Common.Settings.SettingCategory.APPEARANCE, 'help.show-release-note', true,\n Common.Settings.SettingType.BOOLEAN),\n createSettingValue(Common.Settings.SettingCategory.NETWORK, 'request-blocking-enabled', false),\n createSettingValue(Common.Settings.SettingCategory.CONSOLE, 'monitoring-xhr-enabled', false),\n createSettingValue(\n Common.Settings.SettingCategory.NONE, 'custom-network-conditions', [], Common.Settings.SettingType.ARRAY),\n createSettingValue(\n Common.Settings.SettingCategory.APPEARANCE, 'ui-theme', 'systemPreferred', Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.APPEARANCE, 'language', 'en-US', Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.PERSISTENCE, 'persistence-network-overrides-enabled', true,\n Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.NETWORK, 'network-log.preserve-log', true, Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.NETWORK, 'network-log.record-log', true, Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.SOURCES, 'network.enable-remote-file-loading', false,\n Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'hide-network-messages', false, Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'selected-context-filter-enabled', false,\n Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'console-group-similar', false, Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'console-shows-cors-errors', false,\n Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'console-timestamps-enabled', false,\n Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'console-insights-enabled', false,\n Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'console-insights-onboarding-finished', false,\n Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'console-history-autocomplete', false,\n Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'console-autocomplete-on-enter', false,\n Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'preserve-console-log', false, Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'console-eager-eval', false, Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'console-user-activation-eval', false,\n Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'console-trace-expand', false, Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.PERFORMANCE, 'flamechart-mouse-wheel-action', false,\n Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.ELEMENTS, 'show-css-property-documentation-on-hover', false,\n Common.Settings.SettingType.BOOLEAN),\n ];\n\n Common.Settings.registerSettingsForTest(settings, reset);\n\n // Instantiate the storage.\n const storage = new Common.Settings.SettingsStorage({}, Common.Settings.NOOP_STORAGE, 'test');\n Common.Settings.Settings.instance(\n {forceNew: reset, syncedStorage: storage, globalStorage: storage, localStorage: storage});\n\n Root.Runtime.experiments.clearForTest();\n for (const experimentName of REGISTERED_EXPERIMENTS) {\n Root.Runtime.experiments.register(experimentName, '');\n }\n\n // Dynamically import UI after the rest of the environment is set up, otherwise it will fail.\n UI = await import('../ui/legacy/legacy.js');\n UI.ZoomManager.ZoomManager.instance(\n {forceNew: true, win: window, frontendHost: Host.InspectorFrontendHost.InspectorFrontendHostInstance});\n\n // Initialize theme support and context menus.\n Common.Settings.Settings.instance().createSetting('uiTheme', 'systemPreferred');\n UI.UIUtils.initializeUIUtils(document);\n}\n\nexport async function deinitializeGlobalVars() {\n // Remove the global SDK.\n // eslint-disable-next-line @typescript-eslint/naming-convention\n const globalObject = (globalThis as unknown as {SDK?: {}, ls?: {}});\n delete globalObject.SDK;\n delete globalObject.ls;\n\n for (const target of SDK.TargetManager.TargetManager.instance().targets()) {\n target.dispose('deinitializeGlobalVars');\n }\n\n // Remove instances.\n await deinitializeGlobalLocaleVars();\n Logs.NetworkLog.NetworkLog.removeInstance();\n SDK.TargetManager.TargetManager.removeInstance();\n Root.Runtime.Runtime.removeInstance();\n Common.Settings.Settings.removeInstance();\n Common.Revealer.RevealerRegistry.removeInstance();\n Common.Console.Console.removeInstance();\n Workspace.Workspace.WorkspaceImpl.removeInstance();\n Bindings.IgnoreListManager.IgnoreListManager.removeInstance();\n Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.removeInstance();\n Bindings.CSSWorkspaceBinding.CSSWorkspaceBinding.removeInstance();\n IssuesManager.IssuesManager.IssuesManager.removeInstance();\n Persistence.IsolatedFileSystemManager.IsolatedFileSystemManager.removeInstance();\n\n Common.Settings.resetSettings();\n\n // Protect against the dynamic import not having happened.\n if (UI) {\n UI.ZoomManager.ZoomManager.removeInstance();\n UI.ViewManager.ViewManager.removeInstance();\n UI.ViewManager.resetViewRegistration();\n UI.Context.Context.removeInstance();\n UI.InspectorView.InspectorView.removeInstance();\n UI.ActionRegistry.ActionRegistry.reset();\n }\n\n Root.Runtime.experiments.clearForTest();\n}\n\nexport function describeWithEnvironment(title: string, fn: (this: Mocha.Suite) => void, opts: {reset: boolean} = {\n reset: true,\n}) {\n return describe(title, function() {\n before(async () => await initializeGlobalVars(opts));\n fn.call(this);\n after(async () => await deinitializeGlobalVars());\n });\n}\n\ndescribeWithEnvironment.only = function(title: string, fn: (this: Mocha.Suite) => void, opts: {reset: boolean} = {\n reset: true,\n}) {\n // eslint-disable-next-line mocha/no-exclusive-tests\n return describe.only(title, function() {\n before(async () => await initializeGlobalVars(opts));\n fn.call(this);\n after(async () => await deinitializeGlobalVars());\n });\n};\n\nexport async function initializeGlobalLocaleVars() {\n // Expose the locale.\n i18n.DevToolsLocale.DevToolsLocale.instance({\n create: true,\n data: {\n navigatorLanguage: 'en-US',\n settingLanguage: 'en-US',\n lookupClosestDevToolsLocale: () => 'en-US',\n },\n });\n\n // Load the strings from the resource file.\n const locale = i18n.DevToolsLocale.DevToolsLocale.instance().locale;\n // proxied call.\n try {\n await i18n.i18n.fetchAndRegisterLocaleData(locale);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.warn('EnvironmentHelper: Loading en-US locale failed', error.message);\n }\n}\n\nexport function deinitializeGlobalLocaleVars() {\n i18n.DevToolsLocale.DevToolsLocale.removeInstance();\n}\n\nexport function describeWithLocale(title: string, fn: (this: Mocha.Suite) => void) {\n return describe(title, function() {\n before(async () => await initializeGlobalLocaleVars());\n fn.call(this);\n after(deinitializeGlobalLocaleVars);\n });\n}\ndescribeWithLocale.only = function(title: string, fn: (this: Mocha.Suite) => void) {\n // eslint-disable-next-line mocha/no-exclusive-tests\n return describe.only(title, function() {\n before(async () => await initializeGlobalLocaleVars());\n fn.call(this);\n after(deinitializeGlobalLocaleVars);\n });\n};\ndescribeWithLocale.skip = function(title: string, fn: (this: Mocha.Suite) => void) {\n // eslint-disable-next-line rulesdir/check_test_definitions\n return describe.skip(title, function() {\n fn.call(this);\n });\n};\n\nexport function createFakeSetting(name: string, defaultValue: T): Common.Settings.Setting {\n const storage = new Common.Settings.SettingsStorage({}, Common.Settings.NOOP_STORAGE, 'test');\n return new Common.Settings.Setting(name, defaultValue, new Common.ObjectWrapper.ObjectWrapper(), storage);\n}\n\nexport function enableFeatureForTest(feature: string): void {\n Root.Runtime.experiments.enableForTest(feature);\n}\n\nexport function setupActionRegistry() {\n before(function() {\n const actionRegistry = UI.ActionRegistry.ActionRegistry.instance();\n UI.ShortcutRegistry.ShortcutRegistry.instance({\n forceNew: true,\n actionRegistry,\n });\n });\n after(function() {\n if (UI) {\n UI.ShortcutRegistry.ShortcutRegistry.removeInstance();\n UI.ActionRegistry.ActionRegistry.removeInstance();\n }\n });\n}\n\nexport function expectConsoleLogs(expectedLogs: {warn?: string[], log?: string[], error?: string[]}) {\n const {error, warn, log} = console;\n before(() => {\n if (expectedLogs.log) {\n // eslint-disable-next-line no-console\n console.log = (...data: unknown[]) => {\n if (!expectedLogs.log?.includes(data.join(' '))) {\n log(...data);\n }\n };\n }\n if (expectedLogs.warn) {\n console.warn = (...data: unknown[]) => {\n if (!expectedLogs.warn?.includes(data.join(' '))) {\n warn(...data);\n }\n };\n }\n if (expectedLogs.error) {\n console.error = (...data: unknown[]) => {\n if (!expectedLogs.error?.includes(data.join(' '))) {\n error(...data);\n }\n };\n }\n });\n after(() => {\n if (expectedLogs.log) {\n // eslint-disable-next-line no-console\n console.log = log;\n }\n if (expectedLogs.warn) {\n console.warn = warn;\n }\n if (expectedLogs.error) {\n console.error = error;\n }\n });\n}\n"]} \ No newline at end of file +{"version":3,"file":"EnvironmentHelpers.js","sourceRoot":"","sources":["../../../../../front_end/testing/EnvironmentHelpers.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAC;AAE7C,OAAO,KAAK,IAAI,MAAM,sBAAsB,CAAC;AAC7C,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAE1C,OAAO,KAAK,QAAQ,MAAM,gCAAgC,CAAC;AAC3D,OAAO,KAAK,aAAa,MAAM,4CAA4C,CAAC;AAC5E,OAAO,KAAK,IAAI,MAAM,wBAAwB,CAAC;AAC/C,OAAO,KAAK,WAAW,MAAM,sCAAsC,CAAC;AACpE,OAAO,KAAK,SAAS,MAAM,kCAAkC,CAAC;AAG9D,6DAA6D;AAC7D,8DAA8D;AAC9D,wBAAwB;AACxB,gEAAgE;AAChE,IAAI,EAAmB,CAAC;AAExB,IAAI,cAAc,GAAG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 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../core/common/common.js';\nimport * as Host from '../core/host/host.js';\nimport * as i18n from '../core/i18n/i18n.js';\nimport type * as Platform from '../core/platform/platform.js';\nimport * as Root from '../core/root/root.js';\nimport * as SDK from '../core/sdk/sdk.js';\nimport type * as Protocol from '../generated/protocol.js';\nimport * as Bindings from '../models/bindings/bindings.js';\nimport * as IssuesManager from '../models/issues_manager/issues_manager.js';\nimport * as Logs from '../models/logs/logs.js';\nimport * as Persistence from '../models/persistence/persistence.js';\nimport * as Workspace from '../models/workspace/workspace.js';\nimport type * as UIModule from '../ui/legacy/legacy.js';\n\n// Don't import UI at this stage because it will fail without\n// the environment. Instead we do the import at the end of the\n// initialization phase.\n// eslint-disable-next-line @typescript-eslint/naming-convention\nlet UI: typeof UIModule;\n\nlet uniqueTargetId = 0;\n\nexport function createTarget(\n {id, name, type = SDK.Target.Type.Frame, parentTarget, subtype, url = 'http://example.com'}: {\n id?: Protocol.Target.TargetID,\n name?: string,\n type?: SDK.Target.Type,\n parentTarget?: SDK.Target.Target,\n subtype?: string,\n url?: string,\n } = {}) {\n if (!id) {\n if (!uniqueTargetId++) {\n id = 'test' as Protocol.Target.TargetID;\n } else {\n id = ('test' + uniqueTargetId) as Protocol.Target.TargetID;\n }\n }\n const targetManager = SDK.TargetManager.TargetManager.instance();\n return targetManager.createTarget(\n id, name ?? id, type, parentTarget ? parentTarget : null, /* sessionId=*/ parentTarget ? id : undefined,\n /* suspended=*/ false,\n /* connection=*/ undefined, {targetId: id, url, subtype} as Protocol.Target.TargetInfo);\n}\n\nfunction createSettingValue(\n category: Common.Settings.SettingCategory, settingName: string, defaultValue: unknown,\n settingType = Common.Settings.SettingType.BOOLEAN): Common.Settings.SettingRegistration {\n return {category, settingName, defaultValue, settingType};\n}\n\nexport function stubNoopSettings() {\n sinon.stub(Common.Settings.Settings, 'instance').returns({\n createSetting: () => ({\n get: () => [],\n set: () => {},\n addChangeListener: () => {},\n removeChangeListener: () => {},\n setDisabled: () => {},\n setTitle: () => {},\n title: () => {},\n asRegExp: () => {},\n type: () => Common.Settings.SettingType.BOOLEAN,\n getAsArray: () => [],\n }),\n moduleSetting: () => ({\n get: () => [],\n set: () => {},\n addChangeListener: () => {},\n removeChangeListener: () => {},\n setDisabled: () => {},\n setTitle: () => {},\n title: () => {},\n asRegExp: () => {},\n type: () => Common.Settings.SettingType.BOOLEAN,\n getAsArray: () => [],\n }),\n createLocalSetting: () => ({\n get: () => [],\n set: () => {},\n addChangeListener: () => {},\n removeChangeListener: () => {},\n setDisabled: () => {},\n setTitle: () => {},\n title: () => {},\n asRegExp: () => {},\n type: () => Common.Settings.SettingType.BOOLEAN,\n getAsArray: () => [],\n }),\n } as unknown as Common.Settings.Settings);\n}\n\nexport function registerNoopActions(actionIds: string[]): void {\n for (const actionId of actionIds) {\n UI.ActionRegistration.maybeRemoveActionExtension(actionId);\n UI.ActionRegistration.registerActionExtension({\n actionId,\n category: UI.ActionRegistration.ActionCategory.NONE,\n title: () => 'mock' as Platform.UIString.LocalizedString,\n });\n }\n const actionRegistryInstance = UI.ActionRegistry.ActionRegistry.instance({forceNew: true});\n UI.ShortcutRegistry.ShortcutRegistry.instance({forceNew: true, actionRegistry: actionRegistryInstance});\n}\n\nconst REGISTERED_EXPERIMENTS = [\n Root.Runtime.ExperimentName.CAPTURE_NODE_CREATION_STACKS,\n Root.Runtime.ExperimentName.PROTOCOL_MONITOR,\n 'timeline-show-all-events',\n 'timeline-v8-runtime-call-stats',\n 'timeline-invalidation-tracking',\n 'ignore-list-js-frames-on-timeline',\n Root.Runtime.ExperimentName.INSTRUMENTATION_BREAKPOINTS,\n 'css-type-component-length-deprecate',\n Root.Runtime.ExperimentName.STYLES_PANE_CSS_CHANGES,\n Root.Runtime.ExperimentName.TIMELINE_AS_CONSOLE_PROFILE_RESULT_PANEL,\n Root.Runtime.ExperimentName.HEADER_OVERRIDES,\n Root.Runtime.ExperimentName.HIGHLIGHT_ERRORS_ELEMENTS_PANEL,\n Root.Runtime.ExperimentName.SET_ALL_BREAKPOINTS_EAGERLY,\n 'evaluate-expressions-with-source-maps',\n Root.Runtime.ExperimentName.USE_SOURCE_MAP_SCOPES,\n 'font-editor',\n Root.Runtime.ExperimentName.NETWORK_PANEL_FILTER_BAR_REDESIGN,\n Root.Runtime.ExperimentName.INDENTATION_MARKERS_TEMP_DISABLE,\n Root.Runtime.ExperimentName.AUTOFILL_VIEW,\n];\n\nexport async function initializeGlobalVars({reset = true} = {}) {\n await initializeGlobalLocaleVars();\n\n // Create the appropriate settings needed to boot.\n const settings = [\n createSettingValue(Common.Settings.SettingCategory.APPEARANCE, 'disable-paused-state-overlay', false),\n createSettingValue(Common.Settings.SettingCategory.CONSOLE, 'custom-formatters', false),\n createSettingValue(Common.Settings.SettingCategory.DEBUGGER, 'pause-on-exception-enabled', false),\n createSettingValue(Common.Settings.SettingCategory.DEBUGGER, 'pause-on-caught-exception', false),\n createSettingValue(Common.Settings.SettingCategory.DEBUGGER, 'pause-on-uncaught-exception', false),\n createSettingValue(Common.Settings.SettingCategory.DEBUGGER, 'disable-async-stack-traces', false),\n createSettingValue(Common.Settings.SettingCategory.DEBUGGER, 'breakpoints-active', true),\n createSettingValue(Common.Settings.SettingCategory.DEBUGGER, 'java-script-disabled', false),\n createSettingValue(Common.Settings.SettingCategory.DEBUGGER, 'skip-content-scripts', true),\n createSettingValue(\n Common.Settings.SettingCategory.DEBUGGER, 'automatically-ignore-list-known-third-party-scripts', true),\n createSettingValue(Common.Settings.SettingCategory.DEBUGGER, 'enable-ignore-listing', true),\n createSettingValue(\n Common.Settings.SettingCategory.DEBUGGER, 'skip-stack-frames-pattern', '/node_modules/|/bower_components/',\n Common.Settings.SettingType.REGEX),\n createSettingValue(Common.Settings.SettingCategory.DEBUGGER, 'navigator-group-by-folder', true),\n createSettingValue(Common.Settings.SettingCategory.ELEMENTS, 'show-detailed-inspect-tooltip', true),\n createSettingValue(Common.Settings.SettingCategory.NETWORK, 'cache-disabled', false),\n createSettingValue(Common.Settings.SettingCategory.RENDERING, 'avif-format-disabled', false),\n createSettingValue(\n Common.Settings.SettingCategory.RENDERING, 'emulated-css-media', '', Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.RENDERING, 'emulated-css-media-feature-prefers-color-scheme', '',\n Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.RENDERING, 'emulated-css-media-feature-forced-colors', '',\n Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.RENDERING, 'emulated-css-media-feature-prefers-reduced-motion', '',\n Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.RENDERING, 'emulated-css-media-feature-prefers-contrast', '',\n Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.RENDERING, 'emulated-css-media-feature-prefers-reduced-data', '',\n Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.RENDERING, 'emulated-css-media-feature-prefers-reduced-transparency', '',\n Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.RENDERING, 'emulated-css-media-feature-color-gamut', '',\n Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.RENDERING, 'emulated-vision-deficiency', '', Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.RENDERING, 'emulate-auto-dark-mode', '', Common.Settings.SettingType.ENUM),\n createSettingValue(Common.Settings.SettingCategory.RENDERING, 'local-fonts-disabled', false),\n createSettingValue(Common.Settings.SettingCategory.RENDERING, 'show-paint-rects', false),\n createSettingValue(Common.Settings.SettingCategory.RENDERING, 'show-layout-shift-regions', false),\n createSettingValue(Common.Settings.SettingCategory.RENDERING, 'show-ad-highlights', false),\n createSettingValue(Common.Settings.SettingCategory.RENDERING, 'show-debug-borders', false),\n createSettingValue(Common.Settings.SettingCategory.RENDERING, 'show-fps-counter', false),\n createSettingValue(Common.Settings.SettingCategory.RENDERING, 'show-scroll-bottleneck-rects', false),\n createSettingValue(Common.Settings.SettingCategory.RENDERING, 'show-web-vitals', false),\n createSettingValue(Common.Settings.SettingCategory.RENDERING, 'webp-format-disabled', false),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'allow-scroll-past-eof', true),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'css-source-maps-enabled', true),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'inline-variable-values', true),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'js-source-maps-enabled', true),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'show-whitespaces-in-editor', 'none'),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'text-editor-autocompletion', true),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'text-editor-auto-detect-indent', false),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'text-editor-bracket-matching', true),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'text-editor-code-folding', true),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'text-editor-indent', ' '),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'text-editor-tab-moves-focus', false),\n createSettingValue(Common.Settings.SettingCategory.SOURCES, 'dom-word-wrap', true),\n createSettingValue(\n Common.Settings.SettingCategory.EMULATION, 'emulation.touch', '', Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.EMULATION, 'emulation.idle-detection', '', Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.GRID, 'show-grid-line-labels', 'none', Common.Settings.SettingType.ENUM),\n createSettingValue(Common.Settings.SettingCategory.GRID, 'extend-grid-lines', true),\n createSettingValue(Common.Settings.SettingCategory.GRID, 'show-grid-areas', true),\n createSettingValue(Common.Settings.SettingCategory.GRID, 'show-grid-track-sizes', true),\n createSettingValue(\n Common.Settings.SettingCategory.NONE, 'active-keybind-set', '', Common.Settings.SettingType.ENUM),\n createSettingValue(Common.Settings.SettingCategory.NONE, 'user-shortcuts', [], Common.Settings.SettingType.ARRAY),\n createSettingValue(\n Common.Settings.SettingCategory.APPEARANCE, 'help.show-release-note', true,\n Common.Settings.SettingType.BOOLEAN),\n createSettingValue(Common.Settings.SettingCategory.NETWORK, 'request-blocking-enabled', false),\n createSettingValue(Common.Settings.SettingCategory.CONSOLE, 'monitoring-xhr-enabled', false),\n createSettingValue(\n Common.Settings.SettingCategory.NONE, 'custom-network-conditions', [], Common.Settings.SettingType.ARRAY),\n createSettingValue(\n Common.Settings.SettingCategory.APPEARANCE, 'ui-theme', 'systemPreferred', Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.APPEARANCE, 'language', 'en-US', Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.PERSISTENCE, 'persistence-network-overrides-enabled', true,\n Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.NETWORK, 'network-log.preserve-log', true, Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.NETWORK, 'network-log.record-log', true, Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.SOURCES, 'network.enable-remote-file-loading', false,\n Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'hide-network-messages', false, Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'selected-context-filter-enabled', false,\n Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'console-group-similar', false, Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'console-shows-cors-errors', false,\n Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'console-timestamps-enabled', false,\n Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'console-insights-enabled', false,\n Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'console-insights-onboarding-finished', false,\n Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'console-history-autocomplete', false,\n Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'console-autocomplete-on-enter', false,\n Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'preserve-console-log', false, Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'console-eager-eval', false, Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'console-user-activation-eval', false,\n Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.CONSOLE, 'console-trace-expand', false, Common.Settings.SettingType.BOOLEAN),\n createSettingValue(\n Common.Settings.SettingCategory.PERFORMANCE, 'flamechart-mouse-wheel-action', false,\n Common.Settings.SettingType.ENUM),\n createSettingValue(\n Common.Settings.SettingCategory.ELEMENTS, 'show-css-property-documentation-on-hover', false,\n Common.Settings.SettingType.BOOLEAN),\n ];\n\n Common.Settings.registerSettingsForTest(settings, reset);\n\n // Instantiate the storage.\n const storage = new Common.Settings.SettingsStorage({}, Common.Settings.NOOP_STORAGE, 'test');\n Common.Settings.Settings.instance(\n {forceNew: reset, syncedStorage: storage, globalStorage: storage, localStorage: storage});\n\n Root.Runtime.experiments.clearForTest();\n for (const experimentName of REGISTERED_EXPERIMENTS) {\n Root.Runtime.experiments.register(experimentName, '');\n }\n\n // Dynamically import UI after the rest of the environment is set up, otherwise it will fail.\n UI = await import('../ui/legacy/legacy.js');\n UI.ZoomManager.ZoomManager.instance(\n {forceNew: true, win: window, frontendHost: Host.InspectorFrontendHost.InspectorFrontendHostInstance});\n\n // Initialize theme support and context menus.\n Common.Settings.Settings.instance().createSetting('uiTheme', 'systemPreferred');\n UI.UIUtils.initializeUIUtils(document);\n}\n\nexport async function deinitializeGlobalVars() {\n // Remove the global SDK.\n // eslint-disable-next-line @typescript-eslint/naming-convention\n const globalObject = (globalThis as unknown as {SDK?: {}, ls?: {}});\n delete globalObject.SDK;\n delete globalObject.ls;\n\n for (const target of SDK.TargetManager.TargetManager.instance().targets()) {\n target.dispose('deinitializeGlobalVars');\n }\n\n // Remove instances.\n await deinitializeGlobalLocaleVars();\n Logs.NetworkLog.NetworkLog.removeInstance();\n SDK.TargetManager.TargetManager.removeInstance();\n Root.Runtime.Runtime.removeInstance();\n Common.Settings.Settings.removeInstance();\n Common.Revealer.RevealerRegistry.removeInstance();\n Common.Console.Console.removeInstance();\n Workspace.Workspace.WorkspaceImpl.removeInstance();\n Bindings.IgnoreListManager.IgnoreListManager.removeInstance();\n Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.removeInstance();\n Bindings.CSSWorkspaceBinding.CSSWorkspaceBinding.removeInstance();\n IssuesManager.IssuesManager.IssuesManager.removeInstance();\n Persistence.IsolatedFileSystemManager.IsolatedFileSystemManager.removeInstance();\n\n Common.Settings.resetSettings();\n\n // Protect against the dynamic import not having happened.\n if (UI) {\n UI.ZoomManager.ZoomManager.removeInstance();\n UI.ViewManager.ViewManager.removeInstance();\n UI.ViewManager.resetViewRegistration();\n UI.Context.Context.removeInstance();\n UI.InspectorView.InspectorView.removeInstance();\n UI.ActionRegistry.ActionRegistry.reset();\n }\n\n Root.Runtime.experiments.clearForTest();\n}\n\nexport function describeWithEnvironment(title: string, fn: (this: Mocha.Suite) => void, opts: {reset: boolean} = {\n reset: true,\n}) {\n return describe(title, function() {\n before(async () => await initializeGlobalVars(opts));\n fn.call(this);\n after(async () => await deinitializeGlobalVars());\n });\n}\n\ndescribeWithEnvironment.only = function(title: string, fn: (this: Mocha.Suite) => void, opts: {reset: boolean} = {\n reset: true,\n}) {\n // eslint-disable-next-line mocha/no-exclusive-tests\n return describe.only(title, function() {\n before(async () => await initializeGlobalVars(opts));\n fn.call(this);\n after(async () => await deinitializeGlobalVars());\n });\n};\n\nexport async function initializeGlobalLocaleVars() {\n // Expose the locale.\n i18n.DevToolsLocale.DevToolsLocale.instance({\n create: true,\n data: {\n navigatorLanguage: 'en-US',\n settingLanguage: 'en-US',\n lookupClosestDevToolsLocale: () => 'en-US',\n },\n });\n\n // Load the strings from the resource file.\n const locale = i18n.DevToolsLocale.DevToolsLocale.instance().locale;\n // proxied call.\n try {\n await i18n.i18n.fetchAndRegisterLocaleData(locale);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.warn('EnvironmentHelper: Loading en-US locale failed', error.message);\n }\n}\n\nexport function deinitializeGlobalLocaleVars() {\n i18n.DevToolsLocale.DevToolsLocale.removeInstance();\n}\n\nexport function describeWithLocale(title: string, fn: (this: Mocha.Suite) => void) {\n return describe(title, function() {\n before(async () => await initializeGlobalLocaleVars());\n fn.call(this);\n after(deinitializeGlobalLocaleVars);\n });\n}\ndescribeWithLocale.only = function(title: string, fn: (this: Mocha.Suite) => void) {\n // eslint-disable-next-line mocha/no-exclusive-tests\n return describe.only(title, function() {\n before(async () => await initializeGlobalLocaleVars());\n fn.call(this);\n after(deinitializeGlobalLocaleVars);\n });\n};\ndescribeWithLocale.skip = function(title: string, fn: (this: Mocha.Suite) => void) {\n // eslint-disable-next-line rulesdir/check_test_definitions\n return describe.skip(title, function() {\n fn.call(this);\n });\n};\n\nexport function createFakeSetting(name: string, defaultValue: T): Common.Settings.Setting {\n const storage = new Common.Settings.SettingsStorage({}, Common.Settings.NOOP_STORAGE, 'test');\n return new Common.Settings.Setting(name, defaultValue, new Common.ObjectWrapper.ObjectWrapper(), storage);\n}\n\nexport function enableFeatureForTest(feature: string): void {\n Root.Runtime.experiments.enableForTest(feature);\n}\n\nexport function setupActionRegistry() {\n before(function() {\n const actionRegistry = UI.ActionRegistry.ActionRegistry.instance();\n UI.ShortcutRegistry.ShortcutRegistry.instance({\n forceNew: true,\n actionRegistry,\n });\n });\n after(function() {\n if (UI) {\n UI.ShortcutRegistry.ShortcutRegistry.removeInstance();\n UI.ActionRegistry.ActionRegistry.removeInstance();\n }\n });\n}\n\nexport function expectConsoleLogs(expectedLogs: {warn?: string[], log?: string[], error?: string[]}) {\n const {error, warn, log} = console;\n before(() => {\n if (expectedLogs.log) {\n // eslint-disable-next-line no-console\n console.log = (...data: unknown[]) => {\n if (!expectedLogs.log?.includes(data.join(' '))) {\n log(...data);\n }\n };\n }\n if (expectedLogs.warn) {\n console.warn = (...data: unknown[]) => {\n if (!expectedLogs.warn?.includes(data.join(' '))) {\n warn(...data);\n }\n };\n }\n if (expectedLogs.error) {\n console.error = (...data: unknown[]) => {\n if (!expectedLogs.error?.includes(data.join(' '))) {\n error(...data);\n }\n };\n }\n });\n after(() => {\n if (expectedLogs.log) {\n // eslint-disable-next-line no-console\n console.log = log;\n }\n if (expectedLogs.warn) {\n console.warn = warn;\n }\n if (expectedLogs.error) {\n console.error = error;\n }\n });\n}\n"]} \ No newline at end of file diff --git a/public/testing/testing-tsconfig.json b/public/testing/testing-tsconfig.json index c45733776..cf788fa58 100644 --- a/public/testing/testing-tsconfig.json +++ b/public/testing/testing-tsconfig.json @@ -70,8 +70,7 @@ "../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/third_party/acorn/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/third_party/acorn/devtools_entrypoint-bundle-typescript-tsconfig.json index 447f7e943..c3776a376 100644 --- a/public/third_party/acorn/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/third_party/acorn/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/third_party/chromium/client-variations/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/third_party/chromium/client-variations/devtools_entrypoint-bundle-typescript-tsconfig.json index 144080711..bcac22e8e 100644 --- a/public/third_party/chromium/client-variations/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/third_party/chromium/client-variations/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/third_party/chromium/client-variations/unittests-tsconfig.json b/public/third_party/chromium/client-variations/unittests-tsconfig.json index 1e554fe7e..f8e1d6947 100644 --- a/public/third_party/chromium/client-variations/unittests-tsconfig.json +++ b/public/third_party/chromium/client-variations/unittests-tsconfig.json @@ -41,8 +41,7 @@ "../../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/third_party/csp_evaluator/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/third_party/csp_evaluator/devtools_entrypoint-bundle-typescript-tsconfig.json index 6c7899784..d72e9a3a1 100644 --- a/public/third_party/csp_evaluator/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/third_party/csp_evaluator/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/third_party/csp_evaluator/package/csp_evaluator-tsconfig.json b/public/third_party/csp_evaluator/package/csp_evaluator-tsconfig.json index bb33b4f45..2f5d51156 100644 --- a/public/third_party/csp_evaluator/package/csp_evaluator-tsconfig.json +++ b/public/third_party/csp_evaluator/package/csp_evaluator-tsconfig.json @@ -44,7 +44,6 @@ "../../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../../node_modules/@types/filesystem/index.d.ts" ] } \ No newline at end of file diff --git a/public/third_party/diff/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/third_party/diff/devtools_entrypoint-bundle-typescript-tsconfig.json index 10f3aa006..89e3cc226 100644 --- a/public/third_party/diff/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/third_party/diff/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/third_party/diff/diff-tsconfig.json b/public/third_party/diff/diff-tsconfig.json index fa91ac37e..81dcfe9d4 100644 --- a/public/third_party/diff/diff-tsconfig.json +++ b/public/third_party/diff/diff-tsconfig.json @@ -34,8 +34,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/third_party/i18n/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/third_party/i18n/devtools_entrypoint-bundle-typescript-tsconfig.json index 19e15eba9..6307e5cde 100644 --- a/public/third_party/i18n/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/third_party/i18n/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/third_party/i18n/i18n-tsconfig.json b/public/third_party/i18n/i18n-tsconfig.json index 362390943..5ab89b2f0 100644 --- a/public/third_party/i18n/i18n-tsconfig.json +++ b/public/third_party/i18n/i18n-tsconfig.json @@ -34,8 +34,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/third_party/i18n/unittests-tsconfig.json b/public/third_party/i18n/unittests-tsconfig.json index 61d7079a4..9240baa9b 100644 --- a/public/third_party/i18n/unittests-tsconfig.json +++ b/public/third_party/i18n/unittests-tsconfig.json @@ -41,8 +41,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/third_party/intl-messageformat/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/third_party/intl-messageformat/devtools_entrypoint-bundle-typescript-tsconfig.json index 6b52fa6c2..5a5022015 100644 --- a/public/third_party/intl-messageformat/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/third_party/intl-messageformat/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/third_party/lighthouse/report/devtools_entrypoint-report-typescript-tsconfig.json b/public/third_party/lighthouse/report/devtools_entrypoint-report-typescript-tsconfig.json index b0d063492..34cc1c2f4 100644 --- a/public/third_party/lighthouse/report/devtools_entrypoint-report-typescript-tsconfig.json +++ b/public/third_party/lighthouse/report/devtools_entrypoint-report-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/third_party/lit/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/third_party/lit/devtools_entrypoint-bundle-typescript-tsconfig.json index a5c392f7c..3d02a9f52 100644 --- a/public/third_party/lit/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/third_party/lit/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/third_party/marked/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/third_party/marked/devtools_entrypoint-bundle-typescript-tsconfig.json index c9e062796..e9ddfeed5 100644 --- a/public/third_party/marked/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/third_party/marked/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/third_party/puppeteer-replay/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/third_party/puppeteer-replay/devtools_entrypoint-bundle-typescript-tsconfig.json index 415fcded9..ba079d69a 100644 --- a/public/third_party/puppeteer-replay/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/third_party/puppeteer-replay/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/third_party/puppeteer/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/third_party/puppeteer/devtools_entrypoint-bundle-typescript-tsconfig.json index 8ba0fcf0e..397ded1d0 100644 --- a/public/third_party/puppeteer/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/third_party/puppeteer/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Connection.d.ts b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Connection.d.ts index f9f1c1999..8f44a0a0e 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Connection.d.ts +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Connection.d.ts @@ -20,6 +20,10 @@ export interface Commands extends BidiCommands { params: Bidi.Cdp.GetSessionParameters; returnType: Bidi.Cdp.GetSessionResult; }; + 'cdp.resolveRealm': { + params: Bidi.Cdp.ResolveRealmParameters; + returnType: Bidi.Cdp.ResolveRealmResult; + }; } /** * @internal diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Connection.d.ts.map b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Connection.d.ts.map index 694f6b4f0..39c3a14d2 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Connection.d.ts.map +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/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BAAkB,EAAE;QAClB,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,sBAAsB,CAAC;QACxC,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC,kBAAkB,CAAC;KACzC,CAAC;CACH;AAED;;GAEG;AACH,qBAAa,cACX,SAAQ,YAAY,CAAC,UAAU,CAC/B,YAAW,UAAU;;gBAWnB,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,mBAAmB,EAC9B,KAAK,SAAI,EACT,OAAO,CAAC,EAAE,MAAM;IAYlB,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED,IAAI,GAAG,IAAI,MAAM,CAEhB;IAED,MAAM,CAAC,MAAM,SAAS,UAAU,EAAE,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,GAAG,IAAI;IAI7D,IAAI,CAAC,GAAG,SAAS,MAAM,kBAAkB,CAAC,UAAU,CAAC,EAC5D,IAAI,EAAE,GAAG,EACT,KAAK,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,GACzC,OAAO;IAOV,IAAI,CAAC,CAAC,SAAS,MAAM,QAAQ,EAC3B,MAAM,EAAE,CAAC,EACT,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAC5B,OAAO,CAAC;QAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAA;KAAC,CAAC;IAc/C;;OAEG;cACa,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAkDzD;;;;OAIG;IACH,MAAM,IAAI,IAAI;IAYd;;OAEG;IACH,OAAO,IAAI,IAAI;IAKf,wBAAwB,IAAI,KAAK,EAAE;CAGpC"} \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Connection.js.map b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Connection.js.map index 02ddfdf0a..8e67b1f22 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Connection.js.map +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Connection.js.map @@ -1 +1 @@ -{"version":3,"file":"Connection.js","sourceRoot":"","sources":["../../../../src/bidi/Connection.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAC,gBAAgB,EAAC,MAAM,+BAA+B,CAAC;AAE/D,OAAO,EAAC,KAAK,EAAC,MAAM,oBAAoB,CAAC;AAEzC,OAAO,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAAC,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAO/C,MAAM,iBAAiB,GAAG,KAAK,CAAC,gCAAgC,CAAC,CAAC;AAClE,MAAM,oBAAoB,GAAG,KAAK,CAAC,gCAAgC,CAAC,CAAC;AAgBrE;;GAEG;AACH,MAAM,OAAO,cACX,SAAQ,YAAwB;IAGhC,IAAI,CAAS;IACb,UAAU,CAAsB;IAChC,MAAM,CAAS;IACf,QAAQ,GAAI,CAAC,CAAC;IACd,OAAO,GAAG,KAAK,CAAC;IAChB,UAAU,GAAG,IAAI,gBAAgB,EAAE,CAAC;IACpC,SAAS,GAA6B,EAAE,CAAC;IAEzC,YACE,GAAW,EACX,SAA8B,EAC9B,KAAK,GAAG,CAAC,EACT,OAAgB;QAEhB,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;QAChB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,QAAQ,GAAG,OAAO,IAAI,MAAO,CAAC;QAEnC,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,UAAU,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtD,IAAI,CA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C;IACrB,CAAC;IAED;;;;OAIG;IACH,MAAM;QACJ,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,OAAO;QACT,CAAC;QACD,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,+CAA+C;QAC/C,IAAI,CAAC,UAAU,CAAC,SAAS,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;QACrC,IAAI,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;QAEnC,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;IAED;;OAEG;IACH,OAAO;QACL,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;IAED,wBAAwB;QACtB,OAAO,IAAI,CAAC,UAAU,CAAC,wBAAwB,EAAE,CAAC;IACpD,CAAC;CACF;AAED;;GAEG;AACH,SAAS,mBAAmB,CAAC,MAA0B;IACrD,IAAI,OAAO,GAAG,GAAG,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;IAClD,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QACtB,OAAO,IAAI,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;IACrC,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,UAAU,CAAC,KAA8B;IAChD,OAAO,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC"} \ No newline at end of file +{"version":3,"file":"Connection.js","sourceRoot":"","sources":["../../../../src/bidi/Connection.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAC,gBAAgB,EAAC,MAAM,+BAA+B,CAAC;AAE/D,OAAO,EAAC,KAAK,EAAC,MAAM,oBAAoB,CAAC;AAEzC,OAAO,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAC,UAAU,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IAC1B,CAAC;IAED;;OAEG;IACH,OAAO;QACL,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;IAED,wBAAwB;QACtB,OAAO,IAAI,CAAC,UAAU,CAAC,wBAAwB,EAAE,CAAC;IACpD,CAAC;CACF;AAED;;GAEG;AACH,SAAS,mBAAmB,CAAC,MAA0B;IACrD,IAAI,OAAO,GAAG,GAAG,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;IAClD,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QACtB,OAAO,IAAI,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;IACrC,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,UAAU,CAAC,KAA8B;IAChD,OAAO,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC"} \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.d.ts b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.d.ts index 2a53d1548..94a720abc 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.d.ts +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.d.ts @@ -20,6 +20,6 @@ export declare class BidiElementHandle exten remoteValue(): Bidi.Script.RemoteValue; autofill(data: AutofillData): Promise; contentFrame(this: BidiElementHandle): Promise; - uploadFile(this: ElementHandle): never; + uploadFile(this: BidiElementHandle, ...files: string[]): Promise; } //# sourceMappingURL=ElementHandle.d.ts.map \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.d.ts.map b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.d.ts.map index 1f18f609c..7bde34666 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.d.ts.map +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ElementHandle.d.ts","sourceRoot":"","sources":["../../../../src/bidi/ElementHandle.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,IAAI,MAAM,4CAA4C,CAAC;AAExE,OAAO,EAAC,aAAa,EAAE,KAAK,YAAY,EAAC,MAAM,yBAAyB,CAAC;AAIzE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAC,YAAY,EAAC,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,YAAY,CAAC;AAE/C;;GAEG;AACH,qBAAa,iBAAiB,CAC5B,WAAW,SAAS,IAAI,GAAG,OAAO,CAClC,SAAQ,aAAa,CAAC,WAAW,CAAC;IAClC,MAAM,CAAC,IAAI,CAAC,WAAW,SAAS,IAAI,GAAG,OAAO,EAC5C,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAC9B,KAAK,EAAE,cAAc,GACpB,iBAAiB,CAAC,WAAW,CAAC;IAIzB,MAAM,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;gBAE9B,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,EAAE,cAAc;IAIjE,IAAa,KAAK,IAAI,cAAc,CAGnC;IAED,IAAa,KAAK,IAAI,SAAS,CAE9B;IAED,WAAW,IAAI,IAAI,CAAC,MAAM,CAAC,WAAW;IAKvB,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAc3C,YAAY,CACzB,IAAI,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,GACzC,OAAO,CAAC,SAAS,CAAC;IA2BZ,UAAU,CAAC,IAAI,EAAE,aAAa,CAAC,gBAAgB,CAAC,GAAG,KAAK;CAGlE"} \ No newline at end of file +{"version":3,"file":"ElementHandle.d.ts","sourceRoot":"","sources":["../../../../src/bidi/ElementHandle.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,IAAI,MAAM,4CAA4C,CAAC;AAExE,OAAO,EAAC,aAAa,EAAE,KAAK,YAAY,EAAC,MAAM,yBAAyB,CAAC;AAGzE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAC,YAAY,EAAC,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,YAAY,CAAC;AAE/C;;GAEG;AACH,qBAAa,iBAAiB,CAC5B,WAAW,SAAS,IAAI,GAAG,OAAO,CAClC,SAAQ,aAAa,CAAC,WAAW,CAAC;IAClC,MAAM,CAAC,IAAI,CAAC,WAAW,SAAS,IAAI,GAAG,OAAO,EAC5C,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAC9B,KAAK,EAAE,cAAc,GACpB,iBAAiB,CAAC,WAAW,CAAC;IAIzB,MAAM,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;gBAE9B,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,EAAE,cAAc;IAIjE,IAAa,KAAK,IAAI,cAAc,CAGnC;IAED,IAAa,KAAK,IAAI,SAAS,CAE9B;IAED,WAAW,IAAI,IAAI,CAAC,MAAM,CAAC,WAAW;IAKvB,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAc3C,YAAY,CACzB,IAAI,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,GACzC,OAAO,CAAC,SAAS,CAAC;IA2BN,UAAU,CACvB,IAAI,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,EACzC,GAAG,KAAK,EAAE,MAAM,EAAE,GACjB,OAAO,CAAC,IAAI,CAAC;CAwBjB"} \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js index b17ea7eca..cd521c07d 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js @@ -83,7 +83,6 @@ var __disposeResources = (this && this.__disposeResources) || (function (Suppres return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; }); import { ElementHandle } from '../api/ElementHandle.js'; -import { UnsupportedOperation } from '../common/Errors.js'; import { throwIfDisposed } from '../util/decorators.js'; import { BidiJSHandle } from './JSHandle.js'; /** @@ -163,8 +162,28 @@ let BidiElementHandle = (() => { __disposeResources(env_1); } } - uploadFile() { - throw new UnsupportedOperation(); + async uploadFile(...files) { + // Locate all files and confirm that they exist. + // eslint-disable-next-line @typescript-eslint/consistent-type-imports + let path; + try { + path = await import('path'); + } + catch (error) { + if (error instanceof TypeError) { + throw new Error(`JSHandle#uploadFile can only be used in Node-like environments.`); + } + throw error; + } + files = files.map(file => { + if (path.win32.isAbsolute(file) || path.posix.isAbsolute(file)) { + return file; + } + else { + return path.resolve(file); + } + }); + await this.frame.setFiles(this, files); } }; })(); diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js.map b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js.map index 5b616033d..693e334c3 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js.map +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js.map @@ -1 +1 @@ -{"version":3,"file":"ElementHandle.js","sourceRoot":"","sources":["../../../../src/bidi/ElementHandle.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIH,OAAO,EAAC,aAAa,EAAoB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K,CAAC,GAAG,CAAC;YAC/B,MAAM,MAAM,CAAC,IAAI,CAAC,kBAAkB,EAAE;gBACpC,OAAO;gBACP,OAAO;gBACP,IAAI,EAAE,IAAI,CAAC,UAAU;aACtB,CAAC,CAAC;QACL,CAAC;QAOQ,KAAK,CAAC,YAAY;;;gBACzB,MAAM,MAAM,kCAAG,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE;oBAClD,IACE,OAAO,YAAY,iBAAiB;wBACpC,OAAO,YAAY,gBAAgB,EACnC,CAAC;wBACD,OAAO,OAAO,CAAC,aAAa,CAAC;oBAC/B,CAAC;oBACD,OAAO;gBACT,CAAC,CAAC,CAAiB,QAAA,CAAC;gBACpB,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;gBACnC,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;oBAC5B,OAAO,CACL,IAAI,CAAC,KAAK;yBACP,IAAI,EAAE;yBACN,MAAM,EAAE;yBACR,IAAI,CAAC,KAAK,CAAC,EAAE;wBACZ,OAAO,KAAK,CAAC,GAAG,KAAK,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC;oBAC3C,CAAC,CAAC,IAAI,IAAI,CACb,CAAC;gBACJ,CAAC;gBACD,OAAO,IAAI,CAAC;;;;;;;;;SACb;QAEQ,UAAU;YACjB,MAAM,IAAI,oBAAoB,EAAE,CAAC;QACnC,CAAC;;;SA3EU,iBAAiB"} \ No newline at end of file +{"version":3,"file":"ElementHandle.js","sourceRoot":"","sources":["../../../../src/bidi/ElementHandle.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIH,OAAO,EAAC,aAAa,EAAoB,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC;AAGtD,OAAO,E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AC;oBAC/D,OAAO,IAAI,CAAC;gBACd,CAAC;qBAAM,CAAC;oBACN,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;gBAC5B,CAAC;YACH,CAAC,CAAC,CAAC;YACH,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACzC,CAAC;;;SAnGU,iBAAiB"} \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ExposedFunction.d.ts b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ExposedFunction.d.ts index 31e0e43bd..3e2d9a500 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ExposedFunction.d.ts +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ExposedFunction.d.ts @@ -10,9 +10,9 @@ import type { BidiFrame } from './Frame.js'; */ export declare class ExposeableFunction { #private; + static from(frame: BidiFrame, name: string, apply: (...args: Args) => Awaitable, isolate?: boolean): Promise>; readonly name: string; constructor(frame: BidiFrame, name: string, apply: (...args: Args) => Awaitable, isolate?: boolean); - expose(): Promise; [Symbol.dispose](): void; [Symbol.asyncDispose](): Promise; } diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ExposedFunction.d.ts.map b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ExposedFunction.d.ts.map index 82d5efa5f..b6b0a56ab 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ExposedFunction.d.ts.map +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ExposedFunction.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ExposedFunction.d.ts","sourceRoot":"","sources":["../../../../src/bidi/ExposedFunction.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAC,SAAS,EAAgB,MAAM,oBAAoB,CAAC;AAOjE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,YAAY,CAA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B,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC;CAkB7C"} \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ExposedFunction.js b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ExposedFunction.js index 8ba56f867..72acc3ef9 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ExposedFunction.js +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ExposedFunction.js @@ -59,6 +59,11 @@ import { BidiJSHandle } from './JSHandle.js'; * @internal */ export class ExposeableFunction { + static async from(frame, name, apply, isolate = false) { + const func = new ExposeableFunction(frame, name, apply, isolate); + await func.#initialize(); + return func; + } #frame; name; #apply; @@ -73,7 +78,7 @@ export class ExposeableFunction { this.#isolate = isolate; this.#channel = `__puppeteer__${this.#frame._id}_page_exposeFunction_${this.name}`; } - async expose() { + async #initialize() { const connection = this.#connection; const channel = { type: 'channel', @@ -100,23 +105,16 @@ export class ExposeableFunction { await Promise.all(frames.map(async (frame) => { const realm = this.#isolate ? frame.isolatedRealm() : frame.mainRealm(); try { - this.#scripts.push([ - frame, - await frame.browsingContext.addPreloadScript(functionDeclaration, { + const [script] = await Promise.all([ + frame.browsingContext.addPreloadScript(functionDeclaration, { arguments: [channel], sandbox: realm.sandbox, }), + realm.realm.callFunction(functionDeclaration, false, { + arguments: [channel], + }), ]); - } - catch (error) { - // If it errors, the frame probably doesn't support adding preload - // scripts. We fail gracefully. - debugError(error); - } - try { - await realm.realm.callFunction(functionDeclaration, false, { - arguments: [channel], - }); + this.#scripts.push([frame, script]); } catch (error) { // If it errors, the frame probably doesn't support call function. We @@ -224,7 +222,18 @@ export class ExposeableFunction { async [Symbol.asyncDispose]() { this.#disposables.dispose(); await Promise.all(this.#scripts.map(async ([frame, script]) => { - await frame.browsingContext.removePreloadScript(script); + const realm = this.#isolate ? frame.isolatedRealm() : frame.mainRealm(); + try { + await Promise.all([ + realm.evaluate(name => { + delete globalThis[name]; + }, this.name), + frame.browsingContext.removePreloadScript(script), + ]); + } + catch (error) { + debugError(error); + } })); } } diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ExposedFunction.js.map b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ExposedFunction.js.map index fc584719a..2a0a88801 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ExposedFunction.js.map +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ExposedFunction.js.map @@ -1 +1 @@ -{"version":3,"file":"ExposedFunction.js","sourceRoot":"","sources":["../../../../src/bidi/ExposedFunction.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,KAAK,IAAI,MAAM,4CAA4C,CAAC;AAEnE,OAAO,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAC;AAEvD,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAC,mBAAmB,EAAE,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAG3E,OAAO,EAAC,iBAAiB,EAAC,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAC,YAAY,EAAC,MAAM,eAAe,CAAC;AAU3C;;GAEG;AACH,MAAM,OAAO,kBAAkB;IACpB,MAAM,CAAC;IAEP,IAAI,CAAC;IACL,MAAM,CAAC;IACP,QAAQ,CAAC;IAET,QAAQ,CAAC;IAElB,QAAQ,GAAkD,EAAE,CAAC;IAC7D,YAAY,GAAG,IAAI,eAAe,EAAE,CAAC;IAErC,YACE,KAAgB,EAChB,IAAY,EACZ,KAAwC,EACxC,OAAO,GAAG,KAAK;QAEf,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAA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CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAED,UAAU,CAAC,EAAU;QACnB,MAAM,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC7B,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,IAAI,KAAK,CAAC,GAAG,KAAK,EAAE,EAAE,CAAC;gBACrB,OAAO,KAAK,CAAC;YACf,CAAC;YACD,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;QACtC,CAAC;QACD,OAAO;IACT,CAAC;IAED,CAAC,MAAM,CAAC,OAAO,CAAC;QACd,KAAK,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC;IAED,KAAK,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;QACzB,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;QAC5B,MAAM,OAAO,CAAC,GAAG,CACf,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,EAAE;YAC1C,MAAM,KAAK,CAAC,eAAe,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;QAC1D,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;CACF"} \ No newline at end of file +{"version":3,"file":"ExposedFunction.js","sourceRoot":"","sources":["../../../../src/bidi/ExposedFunction.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,KAAK,IAAI,MAAM,4CAA4C,CAAC;AAEnE,OAAO,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAC;AAEvD,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAC,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AU,CAAC,CAAC;IACrD,CAAC;IAED,KAAK,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;QACzB,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;QAC5B,MAAM,OAAO,CAAC,GAAG,CACf,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,EAAE;YAC1C,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;YACxE,IAAI,CAAC;gBACH,MAAM,OAAO,CAAC,GAAG,CAAC;oBAChB,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;wBACpB,OAAQ,UAAkB,CAAC,IAAI,CAAC,CAAC;oBACnC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC;oBACb,KAAK,CAAC,eAAe,CAAC,mBAAmB,CAAC,MAAM,CAAC;iBAClD,CAAC,CAAC;YACL,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,UAAU,CAAC,KAAK,CAAC,CAAC;YACpB,CAAC;QACH,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;CACF"} \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts index 332226819..8280f4f44 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts @@ -11,6 +11,7 @@ import type { TimeoutSettings } from '../common/TimeoutSettings.js'; import type { Awaitable, NodeFor } from '../common/types.js'; import { BidiCdpSession } from './CDPSession.js'; import type { BrowsingContext } from './core/BrowsingContext.js'; +import type { BidiElementHandle } from './ElementHandle.js'; import type { BidiHTTPResponse } from './HTTPResponse.js'; import type { BidiPage } from './Page.js'; import type { BidiRealm } from './Realm.js'; @@ -41,7 +42,9 @@ export declare class BidiFrame extends Frame { waitForDevicePrompt(): never; get detached(): boolean; exposeFunction(name: string, apply: (...args: Args) => Awaitable): Promise; + removeExposedFunction(name: string): Promise; waitForSelector(selector: Selector, options?: WaitForSelectorOptions): Promise> | null>; createCDPSession(): Promise; + setFiles(element: BidiElementHandle, files: string[]): Promise; } //# sourceMappingURL=Frame.d.ts.map \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts.map b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts.map index fa22c68f4..ca93f7189 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts.map +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Frame.d.ts","sourceRoot":"","sources":["../../../../src/bidi/Frame.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAiBH,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EACL,KAAK,EAEL,KAAK,WAAW,EAChB,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,gBAAgB,CAAC;AAO3D,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAC,SAAS,EAAE,OAAO,EAAC,MAAM,oBAAoB,CAAC;AAG3D,OAAO,EAAC,cAAc,EAAC,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAK/D,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAExD,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM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O,CAAC,IAAI,CAAC;IAY/C,eAAe,CAAC,QAAQ,SAAS,MAAM,EAC9C,QAAQ,EAAE,QAAQ,EAClB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,GAAG,IAAI,CAAC;IAU7C,gBAAgB,IAAI,OAAO,CAAC,UAAU,CAAC;IAoFvC,QAAQ,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAO3E"} \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js index a2531525e..bcce84749 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js @@ -66,6 +66,7 @@ let BidiFrame = (() => { let _private_waitForLoad$_descriptor; let _private_waitForNetworkIdle$_decorators; let _private_waitForNetworkIdle$_descriptor; + let _setFiles_decorators; return class BidiFrame extends _classSuper { static { const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0; @@ -74,6 +75,7 @@ let BidiFrame = (() => { _waitForNavigation_decorators = [throwIfDetached]; _private_waitForLoad$_decorators = [throwIfDetached]; _private_waitForNetworkIdle$_decorators = [throwIfDetached]; + _setFiles_decorators = [throwIfDetached]; __esDecorate(this, null, _goto_decorators, { kind: "method", name: "goto", static: false, private: false, access: { has: obj => "goto" in obj, get: obj => obj.goto }, metadata: _metadata }, null, _instanceExtraInitializers); __esDecorate(this, null, _setContent_decorators, { kind: "method", name: "setContent", static: false, private: false, access: { has: obj => "setContent" in obj, get: obj => obj.setContent }, metadata: _metadata }, null, _instanceExtraInitializers); __esDecorate(this, null, _waitForNavigation_decorators, { kind: "method", name: "waitForNavigation", static: false, private: false, access: { has: obj => "waitForNavigation" in obj, get: obj => obj.waitForNavigation }, metadata: _metadata }, null, _instanceExtraInitializers); @@ -132,6 +134,7 @@ let BidiFrame = (() => { concurrency, }); }, "#waitForNetworkIdle$") }, _private_waitForNetworkIdle$_decorators, { kind: "method", name: "#waitForNetworkIdle$", static: false, private: true, access: { has: obj => #waitForNetworkIdle$ in obj, get: obj => obj.#waitForNetworkIdle$ }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _setFiles_decorators, { kind: "method", name: "setFiles", static: false, private: false, access: { has: obj => "setFiles" in obj, get: obj => obj.setFiles }, metadata: _metadata }, null, _instanceExtraInitializers); if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static from(parent, browsingContext) { @@ -340,8 +343,27 @@ let BidiFrame = (() => { throw new Error(`Navigation failed: ${url}`); })), fromEmitterEvent(navigation, 'aborted').pipe(map(({ url }) => { throw new Error(`Navigation aborted: ${url}`); - }))), map(() => { - return navigation; + }))), switchMap(() => { + if (navigation.request) { + function requestFinished$(request) { + // Reduces flakiness if the response events arrive after + // the load event. + // Usually, the response or error is already there at this point. + if (request.response || request.error) { + return of(navigation); + } + if (request.redirect) { + return requestFinished$(request.redirect); + } + return fromEmitterEvent(request, 'success') + .pipe(raceWith(fromEmitterEvent(request, 'error')), raceWith(fromEmitterEvent(request, 'redirect'))) + .pipe(switchMap(() => { + return requestFinished$(request); + })); + } + return requestFinished$(navigation.request); + } + return of(navigation); })); })), this.#waitForNetworkIdle$(options), @@ -368,18 +390,19 @@ let BidiFrame = (() => { if (this.#exposedFunctions.has(name)) { throw new Error(`Failed to add page binding with name ${name}: globalThis['${name}'] already exists!`); } - const exposeable = new ExposeableFunction(this, name, apply); + const exposeable = await ExposeableFunction.from(this, name, apply); this.#exposedFunctions.set(name, exposeable); - try { - await exposeable.expose(); - } - catch (error) { - this.#exposedFunctions.delete(name); - throw error; + } + async removeExposedFunction(name) { + const exposedFunction = this.#exposedFunctions.get(name); + if (!exposedFunction) { + throw new Error(`Failed to remove page binding with name ${name}: window['${name}'] does not exists!`); } + this.#exposedFunctions.delete(name); + await exposedFunction[Symbol.asyncDispose](); } waitForSelector(selector, options) { - if (selector.startsWith('aria')) { + if (selector.startsWith('aria') && !this.page().browser().cdpSupported) { throw new UnsupportedOperation('ARIA selector is not supported for BiDi!'); } return super.waitForSelector(selector, options); @@ -393,6 +416,11 @@ let BidiFrame = (() => { } get #waitForLoad$() { return _private_waitForLoad$_descriptor.value; } get #waitForNetworkIdle$() { return _private_waitForNetworkIdle$_descriptor.value; } + async setFiles(element, files) { + await this.browsingContext.setFiles( + // SAFETY: ElementHandles are always remote references. + element.remoteValue(), files); + } }; })(); export { BidiFrame }; diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js.map b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js.map index e2f117fbf..56a195761 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js.map +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js.map @@ -1 +1 @@ -{"version":3,"file":"Frame.js","sourceRoot":"","sources":["../../../../src/bidi/Frame.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKH,OAAO,EACL,aAAa,EACb,KAAK,EACL,SAAS,EACT,MAAM,EACN,KAAK,EACL,cAAc,EACd,GAAG,EACH,EAAE,EACF,QAAQ,EACR,SAAS,GACV,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EACL,KAAK,EACL,eAAe,GAGhB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,cAAc,GAEf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAC,gBAAgB,EAAE,oBAAoB,EAAC,MAAM,qBAAqB,CAAC;AAG3E,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAE,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAExE,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C,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,uBAAuB,EAAE;gBAClE,QAAQ,EAAE,IAAI,CAAC,GAAG;gBAClB,OAAO,EAAE,IAAI;aACd,CAAC,CAAC;YACH,OAAO,IAAI,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAC7C,CAAC;QAGD,IAAA,aAAa,qDAyCZ;QAGD,IAAA,oBAAoB,4DA4BnB;;;SA5cU,SAAS;AA+ctB,SAAS,iBAAiB,CACxB,KAAqB;IAErB,OAAO,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC;AAClC,CAAC;AAED,SAAS,oBAAoB,CAC3B,KAAqB;IAErB,OAAO,KAAK,CAAC,IAAI,KAAK,YAAY,CAAC;AACrC,CAAC;AAED,SAAS,sBAAsB,CAC7B,UAAmC;IAEnC,MAAM,mBAAmB,GAA6B,EAAE,CAAC;IACzD,IAAI,UAAU,EAAE,CAAC;QACf,KAAK,MAAM,SAAS,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC;YAC9C,mBAAmB,CAAC,IAAI,CAAC;gBACvB,GAAG,EAAE,SAAS,CAAC,GAAG;gBAClB,UAAU,EAAE,SAAS,CAAC,UAAU;gBAChC,YAAY,EAAE,SAAS,CAAC,YAAY;aACrC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO,mBAAmB,CAAC;AAC7B,CAAC"} \ No newline at end of file +{"version":3,"file":"Frame.js","sourceRoot":"","sources":["../../../../src/bidi/Frame.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKH,OAAO,EACL,aAAa,EACb,KAAK,EACL,SAAS,EACT,MAAM,EACN,KAAK,EACL,cAAc,EACd,GAAG,EACH,EAAE,EACF,QAAQ,EACR,SAAS,GACV,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EACL,KAAK,EACL,eAAe,GAGhB,MAAM,iBAAiB,CAAC;AAGzB,OA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AAC,gBAAgB;YACpB,MAAM,EAAC,SAAS,EAAC,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,uBAAuB,EAAE;gBAClE,QAAQ,EAAE,IAAI,CAAC,GAAG;gBAClB,OAAO,EAAE,IAAI;aACd,CAAC,CAAC;YACH,OAAO,IAAI,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAC7C,CAAC;QAGD,IAAA,aAAa,qDAyCZ;QAGD,IAAA,oBAAoB,4DA4BnB;QAGD,KAAK,CAAC,QAAQ,CAAC,OAA0B,EAAE,KAAe;YACxD,MAAM,IAAI,CAAC,eAAe,CAAC,QAAQ;YACjC,uDAAuD;YACvD,OAAO,CAAC,WAAW,EAAiC,EACpD,KAAK,CACN,CAAC;QACJ,CAAC;;;SArfU,SAAS;AAwftB,SAAS,iBAAiB,CACxB,KAAqB;IAErB,OAAO,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC;AAClC,CAAC;AAED,SAAS,oBAAoB,CAC3B,KAAqB;IAErB,OAAO,KAAK,CAAC,IAAI,KAAK,YAAY,CAAC;AACrC,CAAC;AAED,SAAS,sBAAsB,CAC7B,UAAmC;IAEnC,MAAM,mBAAmB,GAA6B,EAAE,CAAC;IACzD,IAAI,UAAU,EAAE,CAAC;QACf,KAAK,MAAM,SAAS,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC;YAC9C,mBAAmB,CAAC,IAAI,CAAC;gBACvB,GAAG,EAAE,SAAS,CAAC,GAAG;gBAClB,UAAU,EAAE,SAAS,CAAC,UAAU;gBAChC,YAAY,EAAE,SAAS,CAAC,YAAY;aACrC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO,mBAAmB,CAAC;AAC7B,CAAC"} \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts index da9b30a4b..8f9c88b0c 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts @@ -14,6 +14,7 @@ import { Accessibility } from '../cdp/Accessibility.js'; import { Coverage } from '../cdp/Coverage.js'; import { Tracing } from '../cdp/Tracing.js'; import type { Cookie, CookieParam } from '../common/Cookie.js'; +import type { DeleteCookiesRequest } from '../common/Cookie.js'; import { EventEmitter } from '../common/EventEmitter.js'; import type { PDFOptions } from '../common/PDFOptions.js'; import type { Awaitable } from '../common/types.js'; @@ -95,8 +96,8 @@ export declare class BidiPage extends Page { setOfflineMode(): never; emulateNetworkConditions(): never; setCookie(...cookies: CookieParam[]): Promise; - deleteCookie(): never; - removeExposedFunction(): never; + deleteCookie(...cookies: DeleteCookiesRequest[]): Promise; + removeExposedFunction(name: string): Promise; authenticate(): never; setExtraHTTPHeaders(): never; metrics(): never; diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map index 1823bea21..d7d77fbfa 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../../../../src/bidi/Page.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAGH,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAG9C,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAErD,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,IAAI,EAEJ,KAAK,2BAA2B,E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;IAIf,kBAAkB,IAAI,KAAK;IAI3B,OAAO,IAAI,aAAa,EAAE;IAI1B,sBAAsB,IAAI,KAAK;IAI/B,mBAAmB,IAAI,KAAK;IAI5B,sBAAsB,IAAI,KAAK;IAI/B,cAAc,IAAI,KAAK;IAIvB,wBAAwB,IAAI,KAAK;IAI3B,SAAS,CAAC,GAAG,OAAO,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA8DnD,YAAY,CACzB,GAAG,OAAO,EAAE,oBAAoB,EAAE,GACjC,OAAO,CAAC,IAAI,CAAC;IA0BD,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIxD,YAAY,IAAI,KAAK;IAIrB,mBAAmB,IAAI,KAAK;IAI5B,OAAO,IAAI,KAAK;IAIV,MAAM,CACnB,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAIhB,SAAS,CACtB,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAyBtB,mBAAmB,IAAI,KAAK;CAGtC"} \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js index fe3671074..e41da7e19 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js @@ -481,8 +481,6 @@ let BidiPage = (() => { // Chrome-specific properties. ...cdpSpecificCookiePropertiesFromPuppeteerToBidi(cookie, 'sameParty', 'sourceScheme', 'priority', 'url'), }; - // TODO: delete cookie before setting them. - // await this.deleteCookie(bidiCookie); if (cookie.partitionKey !== undefined) { await this.browserContext().userContext.setCookie(bidiCookie, cookie.partitionKey); } @@ -491,12 +489,26 @@ let BidiPage = (() => { } } } - deleteCookie() { - throw new UnsupportedOperation(); + async deleteCookie(...cookies) { + await Promise.all(cookies.map(async (deleteCookieRequest) => { + const cookieUrl = deleteCookieRequest.url ?? this.url(); + const normalizedUrl = URL.canParse(cookieUrl) + ? new URL(cookieUrl) + : undefined; + const domain = deleteCookieRequest.domain ?? normalizedUrl?.hostname; + assert(domain !== undefined, `At least one of the url and domain needs to be specified`); + const filter = { + domain: domain, + name: deleteCookieRequest.name, + ...(deleteCookieRequest.path !== undefined + ? { path: deleteCookieRequest.path } + : {}), + }; + await this.#frame.browsingContext.deleteCookie(filter); + })); } - removeExposedFunction() { - // TODO: Quick win? - throw new UnsupportedOperation(); + async removeExposedFunction(name) { + await this.#frame.removeExposedFunction(name); } authenticate() { throw new UnsupportedOperation(); diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map index 7dbfa6928..65a42d16b 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map @@ -1 +1 @@ -{"version":3,"file":"Page.js","sourceRoot":"","sources":["../../../../src/bidi/Page.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKH,OAAO,EAAC,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAC,MAAM,gCAAgC,CAAC;AAU9E,OAAO,EACL,IAAI,GAIL,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAC,QAAQ,EAAC,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAC,gBAAgB,EAAC,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAC,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAC,oBAAoB,EAAC,MAAM,qBAAqB,CAAC;AACzD,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,KAAK,SAAS,EAAE,CAAC;YACxC,MAAM,CAAC,mBAAmB,GAAG,QAAQ,CAAC,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,+BAA+B,CACtC,QAA2C;IAE3C,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;AAChF,CAAC;AAED,SAAS,+BAA+B,CACtC,QAAoC;IAEpC,OAAO,QAAQ,KAAK,QAAQ;QAC1B,CAAC;QACD,CAAC,CAAC,QAAQ,KAAK,KAAK;YAClB,CAAC;YACD,CAAC,wCAA2B,CAAC;AACnC,CAAC"} \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.d.ts b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.d.ts index d516d2fef..0d97697be 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.d.ts +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.d.ts @@ -41,6 +41,7 @@ export declare class BidiFrameRealm extends BidiRealm { static from(realm: WindowRealm, frame: BidiFrame): BidiFrameRealm; readonly realm: WindowRealm; private constructor(); + get puppeteerUtil(): Promise>; get sandbox(): string | undefined; get environment(): BidiFrame; adoptBackendNode(backendNodeId?: number | undefined): Promise>; diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.d.ts.map b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.d.ts.map index 49a13b562..252c11a5c 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.d.ts.map +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Realm.d.ts","sourceR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,CAAC,CAAC;IAM5D,cAAc,CAAC,CAAC,SAAS,QAAQ,CAAC,IAAI,CAAC,EACpD,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,CAAC,CAAC;CAQd;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,SAAS;;IAC3C,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,GAAG,cAAc;IAKjE,SAAiB,KAAK,EAAE,WAAW,CAAC;IAIpC,OAAO;IAgBP,IAAa,aAAa,IAAI,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC,CAiCjE;IAED,IAAI,OAAO,IAAI,MAAM,GAAG,SAAS,CAEhC;IAED,IAAa,WAAW,IAAI,SAAS,CAEpC;IAEc,gBAAgB,CAC7B,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,GACjC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;CAiB3B;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,SAAS;;IAC5C,MAAM,CAAC,IAAI,CACT,KAAK,EAAE,oBAAoB,GAAG,iBAAiB,EAC/C,MAAM,EAAE,aAAa,GACpB,eAAe;IAKlB,SAAiB,KAAK,EAAE,oBAAoB,GAAG,iBAAiB,CAAC;IAIjE,OAAO;IAQP,IAAa,WAAW,IAAI,aAAa,CAExC;IAEc,gBAAgB,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;CAG3D"} \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.js b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.js index 716fe5a5a..b6440ffad 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.js +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.js @@ -1,10 +1,58 @@ +var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) { + if (value !== null && value !== void 0) { + if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); + var dispose; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; + } + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; +}; +var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) { + return function (env) { + function fail(e) { + env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; + env.hasError = true; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; +})(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { + var e = new Error(message); + return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; +}); import { Realm } from '../api/Realm.js'; +import { ARIAQueryHandler } from '../cdp/AriaQueryHandler.js'; import { LazyArg } from '../common/LazyArg.js'; import { scriptInjector } from '../common/ScriptInjector.js'; import { debugError, getSourcePuppeteerURLIfAvailable, getSourceUrlComment, isString, PuppeteerURL, SOURCE_URL_REGEX, } from '../common/util.js'; +import { AsyncIterableUtil } from '../util/AsyncIterableUtil.js'; import { stringifyFunction } from '../util/Function.js'; import { BidiDeserializer } from './Deserializer.js'; import { BidiElementHandle } from './ElementHandle.js'; +import { ExposeableFunction } from './ExposedFunction.js'; import { BidiJSHandle } from './JSHandle.js'; import { BidiSerializer } from './Serializer.js'; import { createEvaluationError } from './util.js'; @@ -169,11 +217,31 @@ export class BidiFrameRealm extends BidiRealm { this.#frame = frame; } #initialize() { + super.initialize(); // This should run first. this.realm.on('updated', () => { this.environment.clearDocumentHandle(); + this.#bindingsInstalled = false; + }); + } + #bindingsInstalled = false; + get puppeteerUtil() { + let promise = Promise.resolve(); + if (!this.#bindingsInstalled) { + promise = Promise.all([ + ExposeableFunction.from(this.environment, '__ariaQuerySelector', ARIAQueryHandler.queryOne, !!this.sandbox), + ExposeableFunction.from(this.environment, '__ariaQuerySelectorAll', async (element, selector) => { + const results = ARIAQueryHandler.queryAll(element, selector); + return await element.realm.evaluateHandle((...elements) => { + return elements; + }, ...(await AsyncIterableUtil.collect(results))); + }, !!this.sandbox), + ]); + this.#bindingsInstalled = true; + } + return promise.then(() => { + return super.puppeteerUtil; }); - super.initialize(); } get sandbox() { return this.realm.sandbox; @@ -182,13 +250,28 @@ export class BidiFrameRealm extends BidiRealm { return this.#frame; } async adoptBackendNode(backendNodeId) { - const { object } = await this.#frame.client.send('DOM.resolveNode', { - backendNodeId, - }); - return BidiElementHandle.from({ - handle: object.objectId, - type: 'node', - }, this); + const env_1 = { stack: [], error: void 0, hasError: false }; + try { + const { object } = await this.#frame.client.send('DOM.resolveNode', { + backendNodeId, + executionContextId: await this.realm.resolveExecutionContextId(), + }); + const handle = __addDisposableResource(env_1, BidiElementHandle.from({ + handle: object.objectId, + type: 'node', + }, this), false); + // We need the sharedId, so we perform the following to obtain it. + return await handle.evaluateHandle(element => { + return element; + }); + } + catch (e_1) { + env_1.error = e_1; + env_1.hasError = true; + } + finally { + __disposeResources(env_1); + } } } /** diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.js.map b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.js.map index be51b82c2..f24f8d11c 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.js.map +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Realm.js.map @@ -1 +1 @@ -{"version":3,"file":"Realm.js","sourceRoot":"","sources":["../../../../src/bidi/Realm.ts"],"names":[],"mappings":"AAQA,OAAO,EAAC,KAAK,EAAC,MAAM,iBAAiB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AC,yBAAyB,EAAE;aACjE,CAAC,CAAC;YACH,MAAM,MAAM,kCAAG,iBAAiB,CAAC,IAAI,CACnC;gBACE,MAAM,EAAE,MAAM,CAAC,QAAQ;gBACvB,IAAI,EAAE,MAAM;aACb,EACD,IAAI,CACL,QAAA,CAAC;YACF,kEAAkE;YAClE,OAAO,MAAM,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE;gBAC3C,OAAO,OAAO,CAAC;YACjB,CAAC,CAAC,CAAC;;;;;;;;;KACJ;CACF;AAED;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,SAAS;IAC5C,MAAM,CAAC,IAAI,CACT,KAA+C,EAC/C,MAAqB;QAErB,MAAM,WAAW,GAAG,IAAI,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACvD,WAAW,CAAC,UAAU,EAAE,CAAC;QACzB,OAAO,WAAW,CAAC;IACrB,CAAC;IAGQ,OAAO,CAAgB;IAEhC,YACE,KAA+C,EAC/C,KAAoB;QAEpB,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;QACpC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,IAAa,WAAW;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAEQ,KAAK,CAAC,gBAAgB;QAC7B,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAC3D,CAAC;CACF"} \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts index 35c75e602..6436be051 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts @@ -111,6 +111,8 @@ export declare class BrowsingContext extends EventEmitter<{ removePreloadScript(script: string): Promise; getCookies(options?: GetCookiesOptions): Promise; setCookie(cookie: Bidi.Storage.PartialCookie): Promise; + setFiles(element: Bidi.Script.SharedReference, files: string[]): Promise; [disposeSymbol](): void; + deleteCookie(...cookieFilters: Bidi.Storage.CookieFilter[]): Promise; } //# sourceMappingURL=BrowsingContext.d.ts.map \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map index 314c5db2d..c828aa703 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"BrowsingContext.d.ts","sourceRoot":"","sources":["../../../../../src/bidi/core/BrowsingContext.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,IAAI,MAAM,4CAA4C,CAAC;AAExE,OAAO,EAAC,YAAY,EAAC,MAAM,8BAA8B,CAAC;AAE1D,OAAO,EAAkB,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAExE,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,YAAY,CAAC;AACrD,OAAO,EAAC,WAAW,EAAC,MAAM,YAAY,CAAC;AACvC,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAE3C;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACzC,IAAI,CAAC,eAAe,CAAC,2BAA2B,EAChD,SAAS,CACV,CAAC;AAEF;;GAEG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E,GAC5C,OAAO,CAAC,IAAI,CAAC;CAajB"} \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js index cce2071b0..98ad8e64b 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js @@ -68,9 +68,15 @@ let BrowsingContext = (() => { let _removePreloadScript_decorators; let _getCookies_decorators; let _setCookie_decorators; + let _setFiles_decorators; + let _deleteCookie_decorators; return class BrowsingContext extends _classSuper { static { const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0; + _deleteCookie_decorators = [throwIfDisposed(context => { + // SAFETY: Disposal implies this exists. + return context.#reason; + })]; __esDecorate(this, null, _dispose_decorators, { kind: "method", name: "dispose", static: false, private: false, access: { has: obj => "dispose" in obj, get: obj => obj.dispose }, metadata: _metadata }, null, _instanceExtraInitializers); __esDecorate(this, null, _activate_decorators, { kind: "method", name: "activate", static: false, private: false, access: { has: obj => "activate" in obj, get: obj => obj.activate }, metadata: _metadata }, null, _instanceExtraInitializers); __esDecorate(this, null, _captureScreenshot_decorators, { kind: "method", name: "captureScreenshot", static: false, private: false, access: { has: obj => "captureScreenshot" in obj, get: obj => obj.captureScreenshot }, metadata: _metadata }, null, _instanceExtraInitializers); @@ -88,6 +94,8 @@ let BrowsingContext = (() => { __esDecorate(this, null, _removePreloadScript_decorators, { kind: "method", name: "removePreloadScript", static: false, private: false, access: { has: obj => "removePreloadScript" in obj, get: obj => obj.removePreloadScript }, metadata: _metadata }, null, _instanceExtraInitializers); __esDecorate(this, null, _getCookies_decorators, { kind: "method", name: "getCookies", static: false, private: false, access: { has: obj => "getCookies" in obj, get: obj => obj.getCookies }, metadata: _metadata }, null, _instanceExtraInitializers); __esDecorate(this, null, _setCookie_decorators, { kind: "method", name: "setCookie", static: false, private: false, access: { has: obj => "setCookie" in obj, get: obj => obj.setCookie }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _setFiles_decorators, { kind: "method", name: "setFiles", static: false, private: false, access: { has: obj => "setFiles" in obj, get: obj => obj.setFiles }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _deleteCookie_decorators, { kind: "method", name: "deleteCookie", static: false, private: false, access: { has: obj => "deleteCookie" in obj, get: obj => obj.deleteCookie }, metadata: _metadata }, null, _instanceExtraInitializers); if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } static from(userContext, parent, id, url) { @@ -353,6 +361,13 @@ let BrowsingContext = (() => { }, }); } + async setFiles(element, files) { + await this.#session.send('input.setFiles', { + context: this.id, + element, + files, + }); + } [(_dispose_decorators = [inertIfDisposed], _activate_decorators = [throwIfDisposed(context => { // SAFETY: Disposal implies this exists. return context.#reason; @@ -401,6 +416,9 @@ let BrowsingContext = (() => { })], _setCookie_decorators = [throwIfDisposed(context => { // SAFETY: Disposal implies this exists. return context.#reason; + })], _setFiles_decorators = [throwIfDisposed(context => { + // SAFETY: Disposal implies this exists. + return context.#reason; })], disposeSymbol)]() { this.#reason ??= 'Browsing context already closed, probably because the user context closed.'; @@ -408,6 +426,17 @@ let BrowsingContext = (() => { this.#disposables.dispose(); super[disposeSymbol](); } + async deleteCookie(...cookieFilters) { + await Promise.all(cookieFilters.map(async (filter) => { + await this.#session.send('storage.deleteCookies', { + filter: filter, + partition: { + type: 'context', + context: this.id, + }, + }); + })); + } }; })(); export { BrowsingContext }; diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map index 8bbfad221..b02d94986 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map @@ -1 +1 @@ -{"version":3,"file":"BrowsingContext.js","sourceRoot":"","sources":["../../../../../src/bidi/core/BrowsingContext.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIH,OAAO,EAAC,YAAY,EAAC,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAC,eAAe,EAAE,eAAe,EAAC,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAC,eAAe,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAGxE,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAAC,WAAW,EAAC,MAAM,YAAY,CAAC;AACvC,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AAErC,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAkD3C;;GAEG;IACU,eAAe;;sBAAS,YAAY;;;;;;;;;;;;;;;;;;;iBAApC,eAAgB,SAAQ,WAwCnC;;;YAgNA,wKAAQ,OAAO,6DAGd;YAMD,2KAAM,QAAQ,6DAIb;YAMD,sMAAM,iBAAiB,6DAUtB;YAMD,kKAAM,KAAK,6DAUV;YAMD,gMAAM,eAAe,6DAKpB;YAMD,2KAAM,QAAQ,6DASb;YAMD,qKAAM,MAAM,6DAKX;YAMD,kKAAM,KAAK,6DAQV;YAMD,mMAAM,gBAAgB,6DAKrB;YAMD,oLAAM,WAAW,6DAKhB;YAMD,6LAAM,cAAc,6DAKnB;YAMD,6LAAM,cAAc,6DAInB;YAMD,sMAAA,iBAAiB,6DAEhB;YAMD,mMAAM,gBAAgB,6DAWrB;YAMD,4MAAM,mBAAmB,6DAExB;YAMD,iLAAM,UAAU,6DAaf;YAMD,8KAAM,SAAS,6DAQd;;;QA5ZD,MAAM,CAAC,IAAI,CACT,WAAwB,EACxB,MAAmC,EACnC,EAAU,EACV,GAAW;YAEX,MAAM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,MAAM,OAAO,CAAC,GAAG,CACf,aAAa,CAAC,GAAG,CAAC,KAAK,EAAC,MAAM,EAAC,EAAE;gBAC/B,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,uBAAuB,EAAE;oBAChD,MAAM,EAAE,MAAM;oBACd,SAAS,EAAE;wBACT,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,IAAI,CAAC,EAAE;qBACjB;iBACF,CAAC,CAAC;YACL,CAAC,CAAC,CACH,CAAC;QACJ,CAAC;;;SAjfU,eAAe"} \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Connection.d.ts b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Connection.d.ts index be0b37d70..34d4f385a 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Connection.d.ts +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Connection.d.ts @@ -99,6 +99,10 @@ export interface Commands { params: Bidi.Input.ReleaseActionsParameters; returnType: Bidi.EmptyResult; }; + 'input.setFiles': { + params: Bidi.Input.SetFilesParameters; + returnType: Bidi.EmptyResult; + }; 'permissions.setPermission': { params: Bidi.Permissions.SetPermissionParameters; returnType: Bidi.EmptyResult; @@ -123,6 +127,10 @@ export interface Commands { params: Bidi.Session.SubscriptionRequest; returnType: Bidi.EmptyResult; }; + 'storage.deleteCookies': { + params: Bidi.Storage.DeleteCookiesParameters; + returnType: Bidi.Storage.DeleteCookiesResult; + }; 'storage.getCookies': { params: Bidi.Storage.GetCookiesParameters; returnType: Bidi.Storage.GetCookiesResult; diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Connection.d.ts.map b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Connection.d.ts.map index 2b75b7bf3..4bdf5a300 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Connection.d.ts.map +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core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CAAC;CACjD"} \ No newline at end of file +{"version":3,"file":"Connection.d.ts","sourceRoot":"","sources":["../../../../../src/bidi/core/Connection.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,IAAI,MAAM,4CAA4C,CAAC;AAExE,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,8BAA8B,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,iBAAiB,EAAE;QACjB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC;QACvC,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC;KACxC,CAAC;IACF,qBAAqB,EAAE;QACrB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC;QAC3C,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC;KACxC,CAAC;IACF,eAAe,EAAE;QACf,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC;QACrC,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC;KAC9B,CAAC;IACF,yBAAyB,EAAE;QACzB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,0BAA0B,CAAC;QAC/C,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC;KAChD,CAAC;IACF,4BAA4B,EAAE;QAC5B,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,6BAA6B,CAAC;QAClD,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC;KAC9B,CAAC;IAEF,eAAe,EAAE;QACf,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC;QACzB,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC;KAC9B,CAAC;IAEF,2BAA2B,EAAE;QAC3B,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC;QACzB,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAC;KAClD,CAAC;IACF,yBAAyB,EAAE;QACzB,MAAM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,UAAU,CAChE,SAAQ,YAAY,CAAC,MAAM,CAAC;IAC5B,IAAI,CAAC,CAAC,SAAS,MAAM,QAAQ,EAC3B,MAAM,EAAE,CAAC,EACT,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAC5B,OAAO,CAAC;QAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAA;KAAC,CAAC,CAAC;CACjD"} \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.d.ts b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.d.ts index f183315b2..49630e1ef 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.d.ts +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.d.ts @@ -44,6 +44,7 @@ export declare abstract class Realm extends EventEmitter<{ disown(handles: string[]): Promise; callFunction(functionDeclaration: string, awaitPromise: boolean, options?: CallFunctionOptions): Promise; evaluate(expression: string, awaitPromise: boolean, options?: EvaluateOptions): Promise; + resolveExecutionContextId(): Promise; [disposeSymbol](): void; } /** diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.d.ts.map b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.d.ts.map index b8da249f7..1cb75bd45 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.d.ts.map +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Realm.d.ts","sourceRoot":"","sources":["../../../../../src/bidi/core/Realm.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,IAAI,MAAM,4CAA4C,CAAC;AAExE,OAAO,EAAC,YAAY,EAAC,MAAM,8BAA8B,CAAC;AAE1D,OAAO,EAAC,eAAe,EAAE,aAAa,EAAC,MAAM,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yB,EAChC,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,GACb,oBAAoB;IAQvB,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC,yBAAyB,CAAC,CAAC;IAGhD,OAAO;IAqCP,IAAa,OAAO,IAAI,OAAO,CAG9B;CACF;AAED;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;;IAC1C,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,iBAAiB;IAQ5E,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAG1B,OAAO;IAiCP,IAAa,OAAO,IAAI,OAAO,CAE9B;CACF"} \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.js b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.js index 7a6112f74..9235775e5 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.js +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.js @@ -51,6 +51,7 @@ let Realm = (() => { let _disown_decorators; let _callFunction_decorators; let _evaluate_decorators; + let _resolveExecutionContextId_decorators; return class Realm extends _classSuper { static { const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0; @@ -58,6 +59,7 @@ let Realm = (() => { __esDecorate(this, null, _disown_decorators, { kind: "method", name: "disown", static: false, private: false, access: { has: obj => "disown" in obj, get: obj => obj.disown }, metadata: _metadata }, null, _instanceExtraInitializers); __esDecorate(this, null, _callFunction_decorators, { kind: "method", name: "callFunction", static: false, private: false, access: { has: obj => "callFunction" in obj, get: obj => obj.callFunction }, metadata: _metadata }, null, _instanceExtraInitializers); __esDecorate(this, null, _evaluate_decorators, { kind: "method", name: "evaluate", static: false, private: false, access: { has: obj => "evaluate" in obj, get: obj => obj.evaluate }, metadata: _metadata }, null, _instanceExtraInitializers); + __esDecorate(this, null, _resolveExecutionContextId_decorators, { kind: "method", name: "resolveExecutionContextId", static: false, private: false, access: { has: obj => "resolveExecutionContextId" in obj, get: obj => obj.resolveExecutionContextId }, metadata: _metadata }, null, _instanceExtraInitializers); if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); } // keep-sorted start @@ -109,6 +111,10 @@ let Realm = (() => { }); return result; } + async resolveExecutionContextId() { + const { result } = await this.session.connection.send('cdp.resolveRealm', { realm: this.id }); + return result.executionContextId; + } [(_dispose_decorators = [inertIfDisposed], _disown_decorators = [throwIfDisposed(realm => { // SAFETY: Disposal implies this exists. return realm.#reason; @@ -118,6 +124,9 @@ let Realm = (() => { })], _evaluate_decorators = [throwIfDisposed(realm => { // SAFETY: Disposal implies this exists. return realm.#reason; + })], _resolveExecutionContextId_decorators = [throwIfDisposed(realm => { + // SAFETY: Disposal implies this exists. + return realm.#reason; })], disposeSymbol)]() { this.#reason ??= 'Realm already destroyed, probably because all associated browsing contexts closed.'; diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.js.map b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.js.map index b351689e5..6eb23d08a 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.js.map +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.js.map @@ -1 +1 @@ -{"version":3,"file":"Realm.js","sourceRoot":"","sources":["../../../../../src/bidi/core/Realm.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIH,OAAO,EAAC,YAAY,EAAC,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAC,eAAe,EAAE,eAAe,EAAC,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAC,eAAe,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAsBxE;;GAEG;IACmB,KAAK;sB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ACL,CAAC;IAED,IAAa,OAAO;QAClB,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;IAC9B,CAAC;CACF"} \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/common/Cookie.d.ts b/public/third_party/puppeteer/package/lib/esm/puppeteer/common/Cookie.d.ts index 32e7007e9..1df834bf8 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/common/Cookie.d.ts +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/common/Cookie.d.ts @@ -166,7 +166,7 @@ export interface DeleteCookiesRequest { name: string; /** * If specified, deletes all the cookies with the given name where domain and path match - * provided URL. + * provided URL. Otherwise, deletes only cookies related to the current page's domain. */ url?: string; /** diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts b/public/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts index 20c953ccb..53d6d6253 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts @@ -1,5 +1,5 @@ /** * @internal */ -export declare const packageVersion = "22.3.0"; +export declare const packageVersion = "22.4.0"; //# sourceMappingURL=version.d.ts.map \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js b/public/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js index 5243a6a22..c42a0e9ab 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js @@ -1,5 +1,5 @@ /** * @internal */ -export const packageVersion = '22.3.0'; +export const packageVersion = '22.4.0'; //# sourceMappingURL=version.js.map \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.d.ts.map b/public/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.d.ts.map index c49e4de51..1579d5ad1 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.d.ts.map +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"FirefoxLauncher.d.ts","sourceRoot":"","sources":["../../../../src/node/FirefoxLauncher.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkBH,OAAO,KAAK,EACV,4BAA4B,EAC5B,0BAA0B,EAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,eAAe,EAAE,KAAK,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAC9E,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAGtD;;GAEG;AACH,qBAAa,eAAgB,SAAQ,eAAe;gBACtC,SAAS,EAAE,aAAa;IAIpC,MAAM,CAAC,cAAc,CACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3C,QAAQ,CAAC,EAAE,KAAK,GAAG,eAAe,GACjC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAoB1B;;OAEG;IACY,sBAAsB,CACnC,OAAO,GAAE,0BAA+B,GACvC,OAAO,CAAC,kBAAkB,CAAC;IAwF9B;;OAEG;IACY,gBAAgB,CAC7B,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE;QAAC,MAAM,EAAE,OAAO,CAAA;KAAC,GACtB,OAAO,CAAC,IAAI,CAAC;IA0BP,cAAc,IAAI,MAAM;IAiBxB,WAAW,CAAC,OAAO,GAAE,4BAAiC,GAAG,MAAM,EAAE;CAsC3E"} \ No newline at end of file +{"version":3,"file":"FirefoxLauncher.d.ts","sourceRoot":"","sources":["../../../../src/node/FirefoxLauncher.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkBH,OAAO,KAAK,EACV,4BAA4B,EAC5B,0BAA0B,EAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,eAAe,EAAE,KAAK,kBAAkB,EAAC,MAAM,sBAAsB,CAAC;AAC9E,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAGtD;;GAEG;AACH,qBAAa,eAAgB,SAAQ,eAAe;gBACtC,SAAS,EAAE,aAAa;IAIpC,MAAM,CAAC,cAAc,CACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3C,QAAQ,CAAC,EAAE,KAAK,GAAG,eAAe,GACjC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IA4B1B;;OAEG;IACY,sBAAsB,CACnC,OAAO,GAAE,0BAA+B,GACvC,OAAO,CAAC,kBAAkB,CAAC;IAwF9B;;OAEG;IACY,gBAAgB,CAC7B,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE;QAAC,MAAM,EAAE,OAAO,CAAA;KAAC,GACtB,OAAO,CAAC,IAAI,CAAC;IA0BP,cAAc,IAAI,MAAM;IAiBxB,WAAW,CAAC,OAAO,GAAE,4BAAiC,GAAG,MAAM,EAAE;CAsC3E"} \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.js b/public/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.js index 29eebd581..e0e091443 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.js +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.js @@ -23,12 +23,20 @@ export class FirefoxLauncher extends ProductLauncher { return { ...extraPrefsFirefox, ...(protocol === 'webDriverBiDi' - ? {} + ? { + // Only enable the WebDriver BiDi protocol + 'remote.active-protocols': 1, + } : { // Do not close the window when the last tab gets closed 'browser.tabs.closeWindowWithLastTab': false, + // Prevent various error message on the console + // jest-puppeteer asserts that no error message is emitted by the console + 'network.cookie.cookieBehavior': 0, // Temporarily force disable BFCache in parent (https://bit.ly/bug-1732263) 'fission.bfcacheInParent': false, + // Only enable the CDP protocol + 'remote.active-protocols': 2, }), // Force all web content to use a single content process. TODO: remove // this once Firefox supports mouse event dispatch from the main frame diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.js.map b/public/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.js.map index 006f1ff53..9dd26f549 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.js.map +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/node/FirefoxLauncher.js.map @@ -1 +1 @@ -{"version":3,"file":"FirefoxLauncher.js","sourceRoot":"","sources":["../../../../src/node/FirefoxLauncher.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAC,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,OAAO,IAAI,iBAAiB,EAC5B,aAAa,EACb,KAAK,EACL,qBAAqB,EACrB,OAAO,GACR,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAMzC,OAAO,EAAC,eAAe,EAA0B,MAAM,sBAAsB,CAAC;AAE9E,OAAO,EAAC,EAAE,EAAC,MAAM,cAAc,CAAC;AAEhC;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,eAAe;IAClD,YAAY,SAAwB;QAClC,KAAK,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAC9B,CAAC;IAED,MAAM,CAAC,cAAc,CACnB,iBAA2C,EAC3C,QAAkC;QAElC,OAAO;YACL,GAAG,iBAAiB;YACpB,GAAG,CAAC,QAAQ,KAAK,eAAe;gBAC9B,CAAC,CAAC,EAAE;gBACJ,CAAC,CAAC;oBACE,wDAAwD;oBACxD,qCAAqC,EAAE,KA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AK,CAAC,GAAG,CAAC,EAAE;YACf,OAAO,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QAC7B,CAAC,CAAC,EACF,CAAC;YACD,gBAAgB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACvC,CAAC;QACD,gBAAgB,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;QAC/B,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACF"} \ No newline at end of file +{"version":3,"file":"FirefoxLauncher.js","sourceRoot":"","sources":["../../../../src/node/FirefoxLauncher.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAC,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,OAAO,IAAI,iBAAiB,EAC5B,aAAa,EACb,KAAK,EACL,qBAAqB,EACrB,OAAO,GACR,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAMzC,OAAO,EAAC,eAAe,EAA0B,MAAM,sBAAsB,CAAC;AAE9E,OAAO,EAAC,EAAE,EAAC,MAAM,cAAc,CAAC;AAEhC;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,eAAe;IAClD,YAAY,SAAwB;QAClC,KAAK,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAC9B,CAAC;IAED,MAAM,CAAC,cAAc,CACnB,iBAA2C,EAC3C,QAAkC;QAElC,OAAO;YACL,GAAG,iBAAiB;YACpB,GAAG,CAAC,QAAQ,KAAK,eAAe;gBAC9B,CAAC,CAAC;oBACE,0CAA0C;oBAC1C,yBAAyB,EAAE,CAAC;iBAC7B;gBACH,CAAC,CAAC;oBACE,w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AC,CAAC;QACtC,CAAC;QACD,IAAI,QAAQ,EAAE,CAAC;YACb,gBAAgB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACtC,CAAC;QACD,IACE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;YACf,OAAO,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QAC7B,CAAC,CAAC,EACF,CAAC;YACD,gBAAgB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACvC,CAAC;QACD,gBAAgB,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;QAC/B,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACF"} \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts b/public/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts index 22511d05a..ab390f211 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts @@ -7,8 +7,8 @@ * @internal */ export declare const PUPPETEER_REVISIONS: Readonly<{ - chrome: "122.0.6261.69"; - 'chrome-headless-shell': "122.0.6261.69"; + chrome: "122.0.6261.94"; + 'chrome-headless-shell': "122.0.6261.94"; firefox: "latest"; }>; //# sourceMappingURL=revisions.d.ts.map \ No newline at end of file diff --git a/public/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js b/public/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js index 0e27d23b1..70f51bdff 100644 --- a/public/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +++ b/public/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js @@ -7,8 +7,8 @@ * @internal */ export const PUPPETEER_REVISIONS = Object.freeze({ - chrome: '122.0.6261.69', - 'chrome-headless-shell': '122.0.6261.69', + chrome: '122.0.6261.94', + 'chrome-headless-shell': '122.0.6261.94', firefox: 'latest', }); //# sourceMappingURL=revisions.js.map \ No newline at end of file diff --git a/public/third_party/wasmparser/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/third_party/wasmparser/devtools_entrypoint-bundle-typescript-tsconfig.json index c3dac89ba..ea7d281a0 100644 --- a/public/third_party/wasmparser/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/third_party/wasmparser/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/ui/components/adorners/adorners-tsconfig.json b/public/ui/components/adorners/adorners-tsconfig.json index 999eaaa07..fbba38fc6 100644 --- a/public/ui/components/adorners/adorners-tsconfig.json +++ b/public/ui/components/adorners/adorners-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/ui/components/adorners/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/adorners/devtools_entrypoint-bundle-typescript-tsconfig.json index 6576fad87..1cc5c0f1b 100644 --- a/public/ui/components/adorners/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/adorners/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/ui/components/adorners/unittests-tsconfig.json b/public/ui/components/adorners/unittests-tsconfig.json index cd90abd3c..a5cb0ce43 100644 --- a/public/ui/components/adorners/unittests-tsconfig.json +++ b/public/ui/components/adorners/unittests-tsconfig.json @@ -41,8 +41,7 @@ "../../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/ui/components/buttons/button-tsconfig.json b/public/ui/components/buttons/button-tsconfig.json index 68345a445..e518ae95e 100644 --- a/public/ui/components/buttons/button-tsconfig.json +++ b/public/ui/components/buttons/button-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/ui/components/buttons/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/buttons/devtools_entrypoint-bundle-typescript-tsconfig.json index 2246d6b66..e9bf215be 100644 --- a/public/ui/components/buttons/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/buttons/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/ui/components/buttons/unittests-tsconfig.json b/public/ui/components/buttons/unittests-tsconfig.json index 6abc1a502..b6a07db7f 100644 --- a/public/ui/components/buttons/unittests-tsconfig.json +++ b/public/ui/components/buttons/unittests-tsconfig.json @@ -41,8 +41,7 @@ "../../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/ui/components/chrome_link/chrome_link-tsconfig.json b/public/ui/components/chrome_link/chrome_link-tsconfig.json index 91fa274cb..8e2cbaa76 100644 --- a/public/ui/components/chrome_link/chrome_link-tsconfig.json +++ b/public/ui/components/chrome_link/chrome_link-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/ui/components/chrome_link/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/chrome_link/devtools_entrypoint-bundle-typescript-tsconfig.json index 69c0e0ffb..aa472c924 100644 --- a/public/ui/components/chrome_link/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/chrome_link/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -33,8 +33,7 @@ "../../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/ui/components/chrome_link/unittests-tsconfig.json b/public/ui/components/chrome_link/unittests-tsconfig.json index 4b20041f6..178bbea76 100644 --- a/public/ui/components/chrome_link/unittests-tsconfig.json +++ b/public/ui/components/chrome_link/unittests-tsconfig.json @@ -41,8 +41,7 @@ "../../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../../front_end/global_typings/request_idle_callback.d.ts", - "../../../../../../../node_modules/@types/filesystem/index.d.ts", - "../../../../../../../node_modules/@webgpu/types/dist/index.d.ts" + "../../../../../../../node_modules/@types/filesystem/index.d.ts" ], "references": [ { diff --git a/public/ui/components/code_highlighter/CodeHighlighter.js b/public/ui/components/code_highlighter/CodeHighlighter.js index 7fe0f2323..4d4544c43 100644 --- a/public/ui/components/code_highlighter/CodeHighlighter.js +++ b/public/ui/components/code_highlighter/CodeHighlighter.js @@ -91,6 +91,7 @@ export async function languageFromMIME(mimeType) { case 'text/html': return CodeMirror.html.html({ selfClosingTags: true }); case 'application/xml': + case 'application/xhtml+xml': case 'image/svg+xml': return (await CodeMirror.xml()).xml(); case 'application/wasm': diff --git a/public/ui/components/code_highlighter/CodeHighlighter.js.map b/public/ui/components/code_highlighter/CodeHighlighter.js.map index 607e4db4e..1aed81737 100644 --- a/public/ui/components/code_highlighter/CodeHighlighter.js.map +++ b/public/ui/components/code_highlighter/CodeHighlighter.js.map @@ -1 +1 @@ -{"version":3,"file":"CodeHighlighter.js","sourceRoot":"","sources":["../../../../../../../front_end/ui/components/code_highlighter/CodeHighlighter.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,UAAU,MAAM,yDAAyD,CAAC;AAEtF,MAAM,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC;AAE1B,MAAM,CAAC,MA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C;IAClD,CAAC;IAED,cAAc,CAAC,IAAY,EAAE,EAAU,EAAE,KAA4C;QACnF,IAAI,GAAG,GAAG,IAAI,CAAC;QACf,MAAM,KAAK,GAAG,CAAC,EAAU,EAAE,KAAa,EAAQ,EAAE;YAChD,IAAI,EAAE,GAAG,GAAG,EAAE;gBACZ,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;gBACvC,GAAG,GAAG,EAAE,CAAC;aACV;QACH,CAAC,CAAC;QACF,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE;YACtE,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAChB,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QACnB,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QACb,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAChB,CAAC;CACF","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as CodeMirror from '../../../third_party/codemirror.next/codemirror.next.js';\n\nconst t = CodeMirror.tags;\n\nexport const highlightStyle: CodeMirror.HighlightStyle = CodeMirror.HighlightStyle.define([\n {tag: t.variableName, class: 'token-variable'},\n {tag: t.definition(t.variableName), class: 'token-definition'},\n {tag: t.propertyName, class: 'token-property'},\n {tag: [t.typeName, t.className, t.namespace, t.macroName], class: 'token-type'},\n {tag: [t.special(t.name), t.constant(t.className)], class: 'token-variable-special'},\n {tag: t.standard(t.variableName), class: 'token-builtin'},\n\n {tag: [t.number, t.literal, t.unit], class: 'token-number'},\n {tag: t.string, class: 'token-string'},\n {tag: [t.special(t.string), t.regexp, t.escape], class: 'token-string-special'},\n {tag: [t.atom, t.labelName, t.bool], class: 'token-atom'},\n\n {tag: t.keyword, class: 'token-keyword'},\n {tag: [t.comment, t.quote], class: 'token-comment'},\n {tag: t.meta, class: 'token-meta'},\n {tag: t.invalid, class: 'token-invalid'},\n\n {tag: t.tagName, class: 'token-tag'},\n {tag: t.attributeName, class: 'token-attribute'},\n {tag: t.attributeValue, class: 'token-attribute-value'},\n\n {tag: t.inserted, class: 'token-inserted'},\n {tag: t.deleted, class: 'token-deleted'},\n {tag: t.heading, class: 'token-heading'},\n {tag: t.link, class: 'token-link'},\n {tag: t.strikethrough, class: 'token-strikethrough'},\n {tag: t.strong, class: 'token-strong'},\n {tag: t.emphasis, class: 'token-emphasis'},\n]);\n\nexport async function create(code: string, mimeType: string): Promise {\n const language = await languageFromMIME(mimeType);\n let tree: CodeMirror.Tree;\n if (language) {\n tree = language.language.parser.parse(code);\n } else {\n tree = new CodeMirror.Tree(CodeMirror.NodeType.none, [], [], code.length);\n }\n return new CodeHighlighter(code, tree);\n}\n\nexport async function highlightNode(node: Element, mimeType: string): Promise {\n const code = node.textContent || '';\n const highlighter = await create(code, mimeType);\n node.removeChildren();\n highlighter.highlight((text, style) => {\n let token: Node = document.createTextNode(text);\n if (style) {\n const span = document.createElement('span');\n span.className = style;\n span.appendChild(token);\n token = span;\n }\n node.appendChild(token);\n });\n}\n\nexport async function languageFromMIME(mimeType: string): Promise {\n switch (mimeType) {\n // The correct MIME type for JavaScript is text/javascript, but we also support\n // the legacy JavaScript MIME types here for backwards compatibility.\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#legacy_javascript_mime_types\n case 'application/javascript':\n case 'application/ecmascript':\n case 'application/x-ecmascript':\n case 'application/x-javascript':\n case 'text/ecmascript':\n case 'text/javascript1.0':\n case 'text/javascript1.1':\n case 'text/javascript1.2':\n case 'text/javascript1.3':\n case 'text/javascript1.4':\n case 'text/javascript1.5':\n case 'text/jscript':\n case 'text/livescript ':\n case 'text/x-ecmascript':\n case 'text/x-javascript':\n case 'text/javascript':\n case 'text/jsx':\n // We intentionally allow JSX in normal .js as well as .jsx files,\n // because there are simply too many existing applications and\n // examples out there that use JSX within .js files, and we don't\n // want to break them.\n return CodeMirror.javascript.javascript({jsx: true});\n case 'text/typescript':\n return CodeMirror.javascript.javascript({typescript: true});\n case 'text/typescript-jsx':\n return CodeMirror.javascript.javascript({typescript: true, jsx: true});\n\n case 'text/css':\n return CodeMirror.css.css();\n\n case 'text/html':\n return CodeMirror.html.html({selfClosingTags: true});\n\n case 'application/xml':\n case 'image/svg+xml':\n return (await CodeMirror.xml()).xml();\n\n case 'application/wasm':\n return (await CodeMirror.wast()).wast();\n\n case 'text/x-c++src':\n return (await CodeMirror.cpp()).cpp();\n\n case 'text/x-go':\n return new CodeMirror.LanguageSupport(await CodeMirror.go());\n\n case 'text/x-java':\n return (await CodeMirror.java()).java();\n\n case 'text/x-kotlin':\n return new CodeMirror.LanguageSupport(await CodeMirror.kotlin());\n\n case 'application/json':\n case 'application/manifest+json': {\n const jsonLanguage = CodeMirror.javascript.javascriptLanguage.configure({top: 'SingleExpression'});\n return new CodeMirror.LanguageSupport(jsonLanguage);\n }\n\n case 'application/x-httpd-php':\n return (await CodeMirror.php()).php();\n\n case 'text/x-python':\n return (await CodeMirror.python()).python();\n\n case 'text/markdown':\n return (await CodeMirror.markdown()).markdown();\n\n case 'text/x-sh':\n return new CodeMirror.LanguageSupport(await CodeMirror.shell());\n\n case 'text/x-coffeescript':\n return new CodeMirror.LanguageSupport(await CodeMirror.coffeescript());\n\n case 'text/x-clojure':\n return new CodeMirror.LanguageSupport(await CodeMirror.clojure());\n\n case 'application/vnd.dart':\n return new CodeMirror.LanguageSupport(await CodeMirror.dart());\n\n case 'text/x-gss':\n return new CodeMirror.LanguageSupport(await CodeMirror.gss());\n\n case 'text/x-less':\n return (await CodeMirror.less()).less();\n\n case 'text/x-sass':\n return (await CodeMirror.sass()).sass({indented: true});\n\n case 'text/x-scala':\n return new CodeMirror.LanguageSupport(await CodeMirror.scala());\n\n case 'text/x-scss':\n return (await CodeMirror.sass()).sass({indented: false});\n\n case 'text/x.angular':\n return (await CodeMirror.angular()).angular();\n\n case 'text/x.svelte':\n return (await CodeMirror.svelte()).svelte();\n\n case 'text/x.vue':\n return (await CodeMirror.vue()).vue();\n\n default:\n return null;\n }\n}\n\nexport class CodeHighlighter {\n constructor(readonly code: string, readonly tree: CodeMirror.Tree) {\n }\n\n highlight(token: (text: string, style: string) => void): void {\n this.highlightRange(0, this.code.length, token);\n }\n\n highlightRange(from: number, to: number, token: (text: string, style: string) => void): void {\n let pos = from;\n const flush = (to: number, style: string): void => {\n if (to > pos) {\n token(this.code.slice(pos, to), style);\n pos = to;\n }\n };\n CodeMirror.highlightTree(this.tree, highlightStyle, (from, to, style) => {\n flush(from, '');\n flush(to, style);\n }, from, to);\n flush(to, '');\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"CodeHighlighter.js","sourceRoot":"","sources":["../../../../../../../front_end/ui/components/code_highlighter/CodeHighlighter.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,UAAU,MAAM,yDAAyD,CAAC;AAEtF,MAAM,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC;AAE1B,MAAM,CAAC,MAAM,cAAc,GAA8B,UAAU,CAAC,cAAc,CAAC,MAAM,CAAC;IACxF,EAAC,GAAG,EAAE,CAAC,CAAC,YAAY,EAAE,KAAK,EAAE,gBAAgB,EAAC;IAC9C,EAAC,GAAG,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,kBAAkB,EAAC;IAC9D,EAAC,GAAG,EAAE,CAAC,CAAC,YAAY,EAAE,KAAK,EAAE,gBAAgB,EAAC;IAC9C,EAAC,GAAG,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,EAAE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,CAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE;YACtE,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAChB,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QACnB,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QACb,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAChB,CAAC;CACF","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as CodeMirror from '../../../third_party/codemirror.next/codemirror.next.js';\n\nconst t = CodeMirror.tags;\n\nexport const highlightStyle: CodeMirror.HighlightStyle = CodeMirror.HighlightStyle.define([\n {tag: t.variableName, class: 'token-variable'},\n {tag: t.definition(t.variableName), class: 'token-definition'},\n {tag: t.propertyName, class: 'token-property'},\n {tag: [t.typeName, t.className, t.namespace, t.macroName], class: 'token-type'},\n {tag: [t.special(t.name), t.constant(t.className)], class: 'token-variable-special'},\n {tag: t.standard(t.variableName), class: 'token-builtin'},\n\n {tag: [t.number, t.literal, t.unit], class: 'token-number'},\n {tag: t.string, class: 'token-string'},\n {tag: [t.special(t.string), t.regexp, t.escape], class: 'token-string-special'},\n {tag: [t.atom, t.labelName, t.bool], class: 'token-atom'},\n\n {tag: t.keyword, class: 'token-keyword'},\n {tag: [t.comment, t.quote], class: 'token-comment'},\n {tag: t.meta, class: 'token-meta'},\n {tag: t.invalid, class: 'token-invalid'},\n\n {tag: t.tagName, class: 'token-tag'},\n {tag: t.attributeName, class: 'token-attribute'},\n {tag: t.attributeValue, class: 'token-attribute-value'},\n\n {tag: t.inserted, class: 'token-inserted'},\n {tag: t.deleted, class: 'token-deleted'},\n {tag: t.heading, class: 'token-heading'},\n {tag: t.link, class: 'token-link'},\n {tag: t.strikethrough, class: 'token-strikethrough'},\n {tag: t.strong, class: 'token-strong'},\n {tag: t.emphasis, class: 'token-emphasis'},\n]);\n\nexport async function create(code: string, mimeType: string): Promise {\n const language = await languageFromMIME(mimeType);\n let tree: CodeMirror.Tree;\n if (language) {\n tree = language.language.parser.parse(code);\n } else {\n tree = new CodeMirror.Tree(CodeMirror.NodeType.none, [], [], code.length);\n }\n return new CodeHighlighter(code, tree);\n}\n\nexport async function highlightNode(node: Element, mimeType: string): Promise {\n const code = node.textContent || '';\n const highlighter = await create(code, mimeType);\n node.removeChildren();\n highlighter.highlight((text, style) => {\n let token: Node = document.createTextNode(text);\n if (style) {\n const span = document.createElement('span');\n span.className = style;\n span.appendChild(token);\n token = span;\n }\n node.appendChild(token);\n });\n}\n\nexport async function languageFromMIME(mimeType: string): Promise {\n switch (mimeType) {\n // The correct MIME type for JavaScript is text/javascript, but we also support\n // the legacy JavaScript MIME types here for backwards compatibility.\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#legacy_javascript_mime_types\n case 'application/javascript':\n case 'application/ecmascript':\n case 'application/x-ecmascript':\n case 'application/x-javascript':\n case 'text/ecmascript':\n case 'text/javascript1.0':\n case 'text/javascript1.1':\n case 'text/javascript1.2':\n case 'text/javascript1.3':\n case 'text/javascript1.4':\n case 'text/javascript1.5':\n case 'text/jscript':\n case 'text/livescript ':\n case 'text/x-ecmascript':\n case 'text/x-javascript':\n case 'text/javascript':\n case 'text/jsx':\n // We intentionally allow JSX in normal .js as well as .jsx files,\n // because there are simply too many existing applications and\n // examples out there that use JSX within .js files, and we don't\n // want to break them.\n return CodeMirror.javascript.javascript({jsx: true});\n case 'text/typescript':\n return CodeMirror.javascript.javascript({typescript: true});\n case 'text/typescript-jsx':\n return CodeMirror.javascript.javascript({typescript: true, jsx: true});\n\n case 'text/css':\n return CodeMirror.css.css();\n\n case 'text/html':\n return CodeMirror.html.html({selfClosingTags: true});\n\n case 'application/xml':\n case 'application/xhtml+xml':\n case 'image/svg+xml':\n return (await CodeMirror.xml()).xml();\n\n case 'application/wasm':\n return (await CodeMirror.wast()).wast();\n\n case 'text/x-c++src':\n return (await CodeMirror.cpp()).cpp();\n\n case 'text/x-go':\n return new CodeMirror.LanguageSupport(await CodeMirror.go());\n\n case 'text/x-java':\n return (await CodeMirror.java()).java();\n\n case 'text/x-kotlin':\n return new CodeMirror.LanguageSupport(await CodeMirror.kotlin());\n\n case 'application/json':\n case 'application/manifest+json': {\n const jsonLanguage = CodeMirror.javascript.javascriptLanguage.configure({top: 'SingleExpression'});\n return new CodeMirror.LanguageSupport(jsonLanguage);\n }\n\n case 'application/x-httpd-php':\n return (await CodeMirror.php()).php();\n\n case 'text/x-python':\n return (await CodeMirror.python()).python();\n\n case 'text/markdown':\n return (await CodeMirror.markdown()).markdown();\n\n case 'text/x-sh':\n return new CodeMirror.LanguageSupport(await CodeMirror.shell());\n\n case 'text/x-coffeescript':\n return new CodeMirror.LanguageSupport(await CodeMirror.coffeescript());\n\n case 'text/x-clojure':\n return new CodeMirror.LanguageSupport(await CodeMirror.clojure());\n\n case 'application/vnd.dart':\n return new CodeMirror.LanguageSupport(await CodeMirror.dart());\n\n case 'text/x-gss':\n return new CodeMirror.LanguageSupport(await CodeMirror.gss());\n\n case 'text/x-less':\n return (await CodeMirror.less()).less();\n\n case 'text/x-sass':\n return (await CodeMirror.sass()).sass({indented: true});\n\n case 'text/x-scala':\n return new CodeMirror.LanguageSupport(await CodeMirror.scala());\n\n case 'text/x-scss':\n return (await CodeMirror.sass()).sass({indented: false});\n\n case 'text/x.angular':\n return (await CodeMirror.angular()).angular();\n\n case 'text/x.svelte':\n return (await CodeMirror.svelte()).svelte();\n\n case 'text/x.vue':\n return (await CodeMirror.vue()).vue();\n\n default:\n return null;\n }\n}\n\nexport class CodeHighlighter {\n constructor(readonly code: string, readonly tree: CodeMirror.Tree) {\n }\n\n highlight(token: (text: string, style: string) => void): void {\n this.highlightRange(0, this.code.length, token);\n }\n\n highlightRange(from: number, to: number, token: (text: string, style: string) => void): void {\n let pos = from;\n const flush = (to: number, style: string): void => {\n if (to > pos) {\n token(this.code.slice(pos, to), style);\n pos = to;\n }\n };\n CodeMirror.highlightTree(this.tree, highlightStyle, (from, to, style) => {\n flush(from, '');\n flush(to, style);\n }, from, to);\n flush(to, '');\n }\n}\n"]} \ No newline at end of file diff --git a/public/ui/components/code_highlighter/CodeHighlighter.test.js b/public/ui/components/code_highlighter/CodeHighlighter.test.js index 23b1b4358..690563e4b 100644 --- a/public/ui/components/code_highlighter/CodeHighlighter.test.js +++ b/public/ui/components/code_highlighter/CodeHighlighter.test.js @@ -142,6 +142,10 @@ describe('CodeHighlighter', () => { <[tag svg] [attribute viewBox]=[attribute-value "0 0 10 10"]> <[tag circle] /> `, 'image/svg+xml')); + it('can highlight XHTML', testHighlight(`[meta ] + [meta ] + <[tag html] [attribute xmlns]=[attribute-value "http://www.w3.org/1999/xhtml"]> + `, 'application/xhtml+xml')); it('can highlight Angular Templates', testHighlight(` <[tag div] [attribute class]=[attribute-value "title"]>{{[variable obj].[property title]}} <[tag app-button] ([attribute clicked])=[variable onClick]()> diff --git a/public/ui/components/code_highlighter/CodeHighlighter.test.js.map b/public/ui/components/code_highlighter/CodeHighlighter.test.js.map index 8aea726d5..65ae6e15d 100644 --- a/public/ui/components/code_highlighter/CodeHighlighter.test.js.map +++ b/public/ui/components/code_highlighter/CodeHighlighter.test.js.map @@ -1 +1 @@ -{"version":3,"file":"CodeHighlighter.test.js","sourceRoot":"","sources":["../../../../../../../front_end/ui/components/code_highlighter/CodeHighlighter.test.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,eAAe,MAAM,uBAAuB,CAAC;AAEzD,MAAM,EAAC,MAAM,EAAC,GAAG,IAAI,CAAC;AAEtB,SAAS,WAAW,CAAC,IAAY;IAC/B,MAAM,KAAK,GAAG,qBAAqB,EAAE,MAAM,GAAuB,EAAE,CAAC;IACrE,KAAK,IAAI,GAAG,GAAG,CAAC,IAAI;QAClB,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,C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D,EAAE,2BAA2B,CAAC,CAAC,CAAC;IACjC,kBAAkB;AACpB,CAAC,CAAC,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as CodeHighlighter from './code_highlighter.js';\n\nconst {assert} = chai;\n\nfunction parseTokens(code: string): [string, string][] {\n const token = /\\[(\\S+) ([^\\]]+)\\]/g, tokens: [string, string][] = [];\n for (let pos = 0;;) {\n const match = token.exec(code);\n const next = match ? match.index : code.length;\n if (next > pos) {\n tokens.push([code.slice(pos, next), '']);\n }\n if (!match) {\n break;\n }\n tokens.push([match[2], match[1]]);\n pos = match.index + match[0].length;\n }\n return tokens;\n}\n\nfunction testHighlight(code: string, mimeType: string) {\n return async () => {\n const tokens = parseTokens(code), rawCode = tokens.map(t => t[0]).join('');\n const highlighter = await CodeHighlighter.CodeHighlighter.create(rawCode, mimeType);\n let i = 0;\n highlighter.highlight((text, style) => {\n assert.strictEqual(\n JSON.stringify([text, style.replace(/\\btoken-/g, '').split(' ').sort().join('&')]),\n JSON.stringify(tokens[i++] || ['', '']));\n });\n };\n}\n\ndescribe('CodeHighlighter', () => {\n describe('languageFromMIMEType', () => {\n it('also supports common legacy MIME types for JavaScript', async () => {\n for (const mimeType of ['application/ecmascript', 'application/javascript', 'text/jscript']) {\n const language = await CodeHighlighter.CodeHighlighter.languageFromMIME(mimeType);\n assert.isNotNull(language, `legacy MIME type '${mimeType}' not recognized`);\n }\n });\n });\n\n // clang-format off\n it('can highlight JavaScript', testHighlight(`\n[keyword function] [definition foo]([definition bar]) {\n [keyword return] [number 22];\n}`, 'text/javascript'));\n\nit('can highlight JavaScript compatible with CodeMirror 5', testHighlight(`\n[keyword function] [definition name]([definition params]) {\n [keyword var] [definition x] = [number 1];\n [keyword const] [definition y] = [number 2];\n [keyword let] [definition z] = [number 3];\n [keyword return] [variable x] + [variable params];\n}`, 'text/javascript')),\n\nit('can highlight JavaScript with `import { default as name }` syntax', testHighlight(`\n[keyword import] {[keyword default] [keyword as] [definition name]} [keyword from] [string 'module'];\n`, 'text/javascript')),\n\n it('can highlight TypeScript', testHighlight(`\n[keyword type] [type X] = {\n [property x]: [type boolean]\n}`, 'text/typescript'));\n\nit('can highlight TypeScript with the new `using` keyword', testHighlight(`\n[keyword using] [definition resource] = [variable getResource]()\n`, 'text/typescript'));\n\n it('can highlight JSX', testHighlight(`\n[keyword function] [definition App]() {\n [keyword return] (\n <[tag div] [attribute className]=[attribute-value \"App\"]>\n Hello World!\n );\n }`, 'text/jsx'));\n\n it('can highlight JSX within JavaScript files', testHighlight(`\n[keyword const] [definition t] = <[tag div] [attribute disabled]>hello\n`, 'text/javascript'));\n\n it('can highlight HTML', testHighlight(`\n[meta ]\n<[tag html] [attribute lang]=[attribute-value ar]>\n ...\n`, 'text/html'));\n\n it('can highlight HTML with