diff --git a/public/Images/Images.js b/public/Images/Images.js index b5717bd51..ef097725e 100644 --- a/public/Images/Images.js +++ b/public/Images/Images.js @@ -147,6 +147,7 @@ style.setProperty('--image-file-help', 'url(\"' + new URL(new URL('help.svg', im style.setProperty('--image-file-iframe-crossed', 'url(\"' + new URL(new URL('iframe-crossed.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-iframe', 'url(\"' + new URL(new URL('iframe.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-import', 'url(\"' + new URL(new URL('import.svg', import.meta.url).href, import.meta.url).toString() + '\")'); +style.setProperty('--image-file-indeterminate-question-box', 'url(\"' + new URL(new URL('indeterminate-question-box.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-info-filled', 'url(\"' + new URL(new URL('info-filled.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-info', 'url(\"' + new URL(new URL('info.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-issue-cross-filled', 'url(\"' + new URL(new URL('issue-cross-filled.svg', import.meta.url).href, import.meta.url).toString() + '\")'); @@ -175,6 +176,7 @@ style.setProperty('--image-file-lightbulb-spark', 'url(\"' + new URL(new URL('li style.setProperty('--image-file-lighthouse_logo', 'url(\"' + new URL(new URL('lighthouse_logo.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-list', 'url(\"' + new URL(new URL('list.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-location-on', 'url(\"' + new URL(new URL('location-on.svg', import.meta.url).href, import.meta.url).toString() + '\")'); +style.setProperty('--image-file-lock', 'url(\"' + new URL(new URL('lock.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-match-case', 'url(\"' + new URL(new URL('match-case.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-match-whole-word', 'url(\"' + new URL(new URL('match-whole-word.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-memory', 'url(\"' + new URL(new URL('memory.svg', import.meta.url).href, import.meta.url).toString() + '\")'); @@ -209,7 +211,6 @@ style.setProperty('--image-file-right-panel-open', 'url(\"' + new URL(new URL('r style.setProperty('--image-file-scissors', 'url(\"' + new URL(new URL('scissors.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-screen-rotation', 'url(\"' + new URL(new URL('screen-rotation.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-search', 'url(\"' + new URL(new URL('search.svg', import.meta.url).href, import.meta.url).toString() + '\")'); -style.setProperty('--image-file-securityIcons', 'url(\"' + new URL(new URL('securityIcons.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-select-element', 'url(\"' + new URL(new URL('select-element.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-send', 'url(\"' + new URL(new URL('send.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-shadow', 'url(\"' + new URL(new URL('shadow.svg', import.meta.url).href, import.meta.url).toString() + '\")'); diff --git a/public/Images/Images.prebundle.js b/public/Images/Images.prebundle.js index e5ebf4243..0206f4844 100644 --- a/public/Images/Images.prebundle.js +++ b/public/Images/Images.prebundle.js @@ -148,6 +148,7 @@ style.setProperty('--image-file-help', 'url(\"' + new URL('./src/help.svg', impo style.setProperty('--image-file-iframe-crossed', 'url(\"' + new URL('./src/iframe-crossed.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-iframe', 'url(\"' + new URL('./src/iframe.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-import', 'url(\"' + new URL('./src/import.svg', import.meta.url).toString() + '\")'); +style.setProperty('--image-file-indeterminate-question-box', 'url(\"' + new URL('./src/indeterminate-question-box.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-info-filled', 'url(\"' + new URL('./src/info-filled.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-info', 'url(\"' + new URL('./src/info.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-issue-cross-filled', 'url(\"' + new URL('./src/issue-cross-filled.svg', import.meta.url).toString() + '\")'); @@ -176,6 +177,7 @@ style.setProperty('--image-file-lightbulb-spark', 'url(\"' + new URL('./src/ligh style.setProperty('--image-file-lighthouse_logo', 'url(\"' + new URL('./src/lighthouse_logo.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-list', 'url(\"' + new URL('./src/list.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-location-on', 'url(\"' + new URL('./src/location-on.svg', import.meta.url).toString() + '\")'); +style.setProperty('--image-file-lock', 'url(\"' + new URL('./src/lock.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-match-case', 'url(\"' + new URL('./src/match-case.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-match-whole-word', 'url(\"' + new URL('./src/match-whole-word.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-memory', 'url(\"' + new URL('./src/memory.svg', import.meta.url).toString() + '\")'); @@ -210,7 +212,6 @@ style.setProperty('--image-file-right-panel-open', 'url(\"' + new URL('./src/rig style.setProperty('--image-file-scissors', 'url(\"' + new URL('./src/scissors.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-screen-rotation', 'url(\"' + new URL('./src/screen-rotation.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-search', 'url(\"' + new URL('./src/search.svg', import.meta.url).toString() + '\")'); -style.setProperty('--image-file-securityIcons', 'url(\"' + new URL('./src/securityIcons.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-select-element', 'url(\"' + new URL('./src/select-element.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-send', 'url(\"' + new URL('./src/send.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-shadow', 'url(\"' + new URL('./src/shadow.svg', import.meta.url).toString() + '\")'); diff --git a/public/Images/indeterminate-question-box.svg b/public/Images/indeterminate-question-box.svg new file mode 100644 index 000000000..7ad02410f --- /dev/null +++ b/public/Images/indeterminate-question-box.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/Images/lock.svg b/public/Images/lock.svg new file mode 100644 index 000000000..595e5d365 --- /dev/null +++ b/public/Images/lock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/Images/src/indeterminate-question-box.svg b/public/Images/src/indeterminate-question-box.svg new file mode 100644 index 000000000..451be91fb --- /dev/null +++ b/public/Images/src/indeterminate-question-box.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/Images/src/lock.svg b/public/Images/src/lock.svg new file mode 100644 index 000000000..2a39891ad --- /dev/null +++ b/public/Images/src/lock.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/core/common/ColorUtils-tsconfig.json b/public/core/common/ColorUtils-tsconfig.json index d1a51c164..866558d3d 100644 --- a/public/core/common/ColorUtils-tsconfig.json +++ b/public/core/common/ColorUtils-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../front_end/core/common/ColorUtils.ts", "../../../../../../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" ] } \ No newline at end of file diff --git a/public/core/common/SettingRegistration.test.js b/public/core/common/SettingRegistration.test.js index c54826f47..e378e696b 100644 --- a/public/core/common/SettingRegistration.test.js +++ b/public/core/common/SettingRegistration.test.js @@ -92,7 +92,7 @@ describe('SettingRegistration', () => { settingType: "boolean" /* Common.Settings.SettingType.BOOLEAN */, defaultValue: false, condition: config => { - return config?.devToolsConsoleInsightsDogfood.enabled === true; + return config?.devToolsConsoleInsights.enabled === true; }, }); assert.throws(() => Common.Settings.Settings.instance().moduleSetting(configSettingName)); @@ -103,7 +103,7 @@ describe('SettingRegistration', () => { globalStorage: dummyStorage, localStorage: dummyStorage, config: { - devToolsConsoleInsightsDogfood: { + devToolsConsoleInsights: { aidaModelId: 'mockModel', aidaTemperature: 0.2, optIn: false, diff --git a/public/core/common/SettingRegistration.test.js.map b/public/core/common/SettingRegistration.test.js.map index 297e61edc..c607eb07d 100644 --- a/public/core/common/SettingRegistration.test.js.map +++ b/public/core/common/SettingRegistration.test.js.map @@ -1 +1 @@ -{"version":3,"file":"SettingRegistration.test.js","sourceRoot":"","sources":["../../../../../../front_end/core/common/SettingRegistration.test.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,EACL,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,SAAS,MAAM,qDAAqD,CAAC;AACjF,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAGxC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,MAAM,WAAW,GAAG,cAAc,CAAC;AACnC,MAAM,YAAY,GAAG,cAAc,CAAC;AACpC,MAAM,WAAW,GAAG,qBAAqB,CAAC;AAC1C,MAAM,YAAY,GAAG,sBAAsB,CAAC;AAE5C,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,2EAA2E;IAC3E,wBAAwB;IACxB,MAAM,eAAe,0DAA0C,CAAC;IAEhE,MAAM,CAAC,KAAK,IAAI,EAAE;QAChB,MAAM,CAAC,QAAQ,CAAC,uBAAuB,CACnC,CAAC;gBACC,QAAQ,EAAE,eAAe;gBACzB,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC;gBAC/C,WAAW,qDAAqC;gBAChD,WAAW;gBACX,YAAY,EAAE,KAAK;gBACnB,OAAO,EAAE;oBACP;wBACE,KAAK,EAAE,IAAI;wBACX,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC;qBAC/C;oBACD;wBACE,KAAK,EAAE,KAAK;wBACZ,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,YAA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ACrF,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAC1B,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) 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 {\n deinitializeGlobalVars,\n initializeGlobalVars,\n} from '../../testing/EnvironmentHelpers.js';\nimport * as QuickOpen from '../../ui/legacy/components/quick_open/quick_open.js';\nimport * as i18n from '../i18n/i18n.js';\nimport type * as Root from '../root/root.js';\n\nimport * as Common from './common.js';\n\nconst settingName = 'mock-setting';\nconst settingTitle = 'Mock setting';\nconst enableTitle = 'Enable mock setting';\nconst disableTitle = 'Disable mock setting';\n\ndescribe('SettingRegistration', () => {\n // const enum `SettingCategory` not available in top level scope, thats why\n // its initialized here.\n const settingCategory = Common.Settings.SettingCategory.CONSOLE;\n\n before(async () => {\n Common.Settings.registerSettingsForTest(\n [{\n category: settingCategory,\n title: i18n.i18n.lockedLazyString(settingTitle),\n settingType: Common.Settings.SettingType.BOOLEAN,\n settingName,\n defaultValue: false,\n options: [\n {\n value: true,\n title: i18n.i18n.lockedLazyString(enableTitle),\n },\n {\n value: false,\n title: i18n.i18n.lockedLazyString(disableTitle),\n },\n ],\n }],\n true);\n await initializeGlobalVars({reset: false});\n });\n\n after(async () => {\n await deinitializeGlobalVars();\n });\n\n it('retrieves a registered setting', () => {\n try {\n const preRegisteredSetting =\n Common.Settings.Settings.instance().moduleSetting(settingName) as Common.Settings.Setting;\n assert.strictEqual(preRegisteredSetting.title(), settingTitle, 'Setting title is not returned correctly');\n assert.strictEqual(\n preRegisteredSetting.category(), settingCategory, 'Setting category is not returned correctly');\n assert.isNotTrue(preRegisteredSetting.get(), 'Setting value is not returned correctly');\n } catch (error) {\n assert.fail('Failed to find setting registration');\n }\n });\n\n it('adds commands for changing a setting\\'s value', () => {\n const allCommands = QuickOpen.CommandMenu.CommandMenu.instance({forceNew: true}).commands();\n const disableSettingCommands = allCommands.filter(\n command => command.title === disableTitle &&\n command.category === Common.Settings.getLocalizedSettingsCategory(settingCategory));\n const enableSettingCommands = allCommands.filter(\n command => command.title === enableTitle &&\n command.category === Common.Settings.getLocalizedSettingsCategory(settingCategory));\n assert.strictEqual(\n disableSettingCommands.length, 1, 'Commands for changing a setting\\'s value were not added correctly');\n assert.strictEqual(\n enableSettingCommands.length, 1, 'Commands for changing a setting\\'s value were not added correctly');\n });\n\n it('triggers a setting\\'s change listener when a setting is set', () => {\n const preRegisteredSetting = Common.Settings.Settings.instance().moduleSetting(settingName);\n let settingChanged = false;\n preRegisteredSetting.addChangeListener(() => {\n settingChanged = true;\n });\n preRegisteredSetting.set(true);\n assert.isTrue(settingChanged, 'Setting\\'s change listener was not triggered after the setting was set');\n });\n\n it('throws an error when trying to register a duplicated setting name', () => {\n assert.throws(() => {\n Common.Settings.registerSettingExtension({\n settingName,\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n });\n });\n });\n\n it('deletes a registered setting using its name', () => {\n const removalResult = Common.Settings.maybeRemoveSettingExtension(settingName);\n assert.isTrue(removalResult);\n assert.doesNotThrow(() => {\n Common.Settings.registerSettingExtension({\n settingName,\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n });\n });\n });\n\n it('can handle settings with condition which depends on host config', () => {\n const configSettingName = 'mock-setting-with-host-config';\n Common.Settings.registerSettingExtension({\n settingName: configSettingName,\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n condition: config => {\n return config?.devToolsConsoleInsightsDogfood.enabled === true;\n },\n });\n assert.throws(() => Common.Settings.Settings.instance().moduleSetting(configSettingName));\n\n const dummyStorage = new Common.Settings.SettingsStorage({});\n Common.Settings.Settings.instance({\n forceNew: true,\n syncedStorage: dummyStorage,\n globalStorage: dummyStorage,\n localStorage: dummyStorage,\n config: {\n devToolsConsoleInsightsDogfood: {\n aidaModelId: 'mockModel',\n aidaTemperature: 0.2,\n optIn: false,\n enabled: true,\n },\n } as Root.Runtime.HostConfig,\n });\n const setting = Common.Settings.Settings.instance().moduleSetting(configSettingName);\n assert.isNotNull(setting);\n assert.isFalse(setting.get());\n });\n});\n"]} \ No newline at end of file +{"version":3,"file":"SettingRegistration.test.js","sourceRoot":"","sources":["../../../../../../front_end/core/common/SettingRegistration.test.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,EACL,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,SAAS,MAAM,qDAAqD,CAAC;AACjF,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAGxC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,MAAM,WAAW,GAAG,cAAc,CAAC;AACnC,MAAM,YAAY,GAAG,cAAc,CAAC;AACpC,MAAM,WAAW,GAAG,qBAAqB,CAAC;AAC1C,MAAM,YAAY,GAAG,sBAAsB,CAAC;AAE5C,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,2EAA2E;IAC3E,wBAAwB;IACxB,MAAM,eAAe,0DAA0C,CAAC;IAEhE,MAAM,CAAC,KAAK,IAAI,EAAE;QAChB,MAAM,CAAC,QAAQ,CAAC,uBAAuB,CACnC,CAAC;gBACC,QAAQ,EAAE,eAAe;gBACzB,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC;gBAC/C,WAAW,qDAAqC;gBAChD,WAAW;gBACX,YAAY,EAAE,KAAK;gBACnB,OAAO,EAAE;oBACP;wBACE,KAAK,EAAE,IAAI;wBACX,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC;qBAC/C;oBACD;wBACE,KAAK,EAAE,KAAK;wBACZ,KAAK,EAAE,IAAI,CAAC,IAA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AAC,iBAAiB,CAAC,CAAC;QACrF,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAC1B,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) 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 {\n deinitializeGlobalVars,\n initializeGlobalVars,\n} from '../../testing/EnvironmentHelpers.js';\nimport * as QuickOpen from '../../ui/legacy/components/quick_open/quick_open.js';\nimport * as i18n from '../i18n/i18n.js';\nimport type * as Root from '../root/root.js';\n\nimport * as Common from './common.js';\n\nconst settingName = 'mock-setting';\nconst settingTitle = 'Mock setting';\nconst enableTitle = 'Enable mock setting';\nconst disableTitle = 'Disable mock setting';\n\ndescribe('SettingRegistration', () => {\n // const enum `SettingCategory` not available in top level scope, thats why\n // its initialized here.\n const settingCategory = Common.Settings.SettingCategory.CONSOLE;\n\n before(async () => {\n Common.Settings.registerSettingsForTest(\n [{\n category: settingCategory,\n title: i18n.i18n.lockedLazyString(settingTitle),\n settingType: Common.Settings.SettingType.BOOLEAN,\n settingName,\n defaultValue: false,\n options: [\n {\n value: true,\n title: i18n.i18n.lockedLazyString(enableTitle),\n },\n {\n value: false,\n title: i18n.i18n.lockedLazyString(disableTitle),\n },\n ],\n }],\n true);\n await initializeGlobalVars({reset: false});\n });\n\n after(async () => {\n await deinitializeGlobalVars();\n });\n\n it('retrieves a registered setting', () => {\n try {\n const preRegisteredSetting =\n Common.Settings.Settings.instance().moduleSetting(settingName) as Common.Settings.Setting;\n assert.strictEqual(preRegisteredSetting.title(), settingTitle, 'Setting title is not returned correctly');\n assert.strictEqual(\n preRegisteredSetting.category(), settingCategory, 'Setting category is not returned correctly');\n assert.isNotTrue(preRegisteredSetting.get(), 'Setting value is not returned correctly');\n } catch (error) {\n assert.fail('Failed to find setting registration');\n }\n });\n\n it('adds commands for changing a setting\\'s value', () => {\n const allCommands = QuickOpen.CommandMenu.CommandMenu.instance({forceNew: true}).commands();\n const disableSettingCommands = allCommands.filter(\n command => command.title === disableTitle &&\n command.category === Common.Settings.getLocalizedSettingsCategory(settingCategory));\n const enableSettingCommands = allCommands.filter(\n command => command.title === enableTitle &&\n command.category === Common.Settings.getLocalizedSettingsCategory(settingCategory));\n assert.strictEqual(\n disableSettingCommands.length, 1, 'Commands for changing a setting\\'s value were not added correctly');\n assert.strictEqual(\n enableSettingCommands.length, 1, 'Commands for changing a setting\\'s value were not added correctly');\n });\n\n it('triggers a setting\\'s change listener when a setting is set', () => {\n const preRegisteredSetting = Common.Settings.Settings.instance().moduleSetting(settingName);\n let settingChanged = false;\n preRegisteredSetting.addChangeListener(() => {\n settingChanged = true;\n });\n preRegisteredSetting.set(true);\n assert.isTrue(settingChanged, 'Setting\\'s change listener was not triggered after the setting was set');\n });\n\n it('throws an error when trying to register a duplicated setting name', () => {\n assert.throws(() => {\n Common.Settings.registerSettingExtension({\n settingName,\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n });\n });\n });\n\n it('deletes a registered setting using its name', () => {\n const removalResult = Common.Settings.maybeRemoveSettingExtension(settingName);\n assert.isTrue(removalResult);\n assert.doesNotThrow(() => {\n Common.Settings.registerSettingExtension({\n settingName,\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n });\n });\n });\n\n it('can handle settings with condition which depends on host config', () => {\n const configSettingName = 'mock-setting-with-host-config';\n Common.Settings.registerSettingExtension({\n settingName: configSettingName,\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n condition: config => {\n return config?.devToolsConsoleInsights.enabled === true;\n },\n });\n assert.throws(() => Common.Settings.Settings.instance().moduleSetting(configSettingName));\n\n const dummyStorage = new Common.Settings.SettingsStorage({});\n Common.Settings.Settings.instance({\n forceNew: true,\n syncedStorage: dummyStorage,\n globalStorage: dummyStorage,\n localStorage: dummyStorage,\n config: {\n devToolsConsoleInsights: {\n aidaModelId: 'mockModel',\n aidaTemperature: 0.2,\n optIn: false,\n enabled: true,\n },\n } as Root.Runtime.HostConfig,\n });\n const setting = Common.Settings.Settings.instance().moduleSetting(configSettingName);\n assert.isNotNull(setting);\n assert.isFalse(setting.get());\n });\n});\n"]} \ No newline at end of file diff --git a/public/core/common/common-tsconfig.json b/public/core/common/common-tsconfig.json index 7dffb8435..2a02e2bca 100644 --- a/public/core/common/common-tsconfig.json +++ b/public/core/common/common-tsconfig.json @@ -61,7 +61,6 @@ "../../../../../../front_end/core/common/Worker.ts", "../../../../../../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" ], "references": [ diff --git a/public/core/common/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/core/common/devtools_entrypoint-bundle-typescript-tsconfig.json index f7c5f7d06..01ba3e4da 100644 --- a/public/core/common/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/core/common/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../front_end/core/common/common.ts", "../../../../../../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" ], "references": [ diff --git a/public/core/common/unittests-tsconfig.json b/public/core/common/unittests-tsconfig.json index 73cd28b93..7c7e1bf42 100644 --- a/public/core/common/unittests-tsconfig.json +++ b/public/core/common/unittests-tsconfig.json @@ -63,7 +63,6 @@ "../../../../../../front_end/core/common/Trie.test.ts", "../../../../../../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" ], "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 f5c763c16..8712f09bb 100644 --- a/public/core/dom_extension/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/core/dom_extension/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../front_end/core/dom_extension/dom_extension.ts", "../../../../../../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" ], "references": [ diff --git a/public/core/dom_extension/dom_extension-tsconfig.json b/public/core/dom_extension/dom_extension-tsconfig.json index d8d5e55c8..51f4b1a67 100644 --- a/public/core/dom_extension/dom_extension-tsconfig.json +++ b/public/core/dom_extension/dom_extension-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../front_end/core/dom_extension/DOMExtension.ts", "../../../../../../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" ], "references": [ diff --git a/public/core/dom_extension/unittests-tsconfig.json b/public/core/dom_extension/unittests-tsconfig.json index 513d9f5aa..854606fd0 100644 --- a/public/core/dom_extension/unittests-tsconfig.json +++ b/public/core/dom_extension/unittests-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../front_end/core/dom_extension/DOMExtension.test.ts", "../../../../../../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" ], "references": [ diff --git a/public/core/host/AidaClient.d.ts b/public/core/host/AidaClient.d.ts index 148c51e4a..ef78499b0 100644 --- a/public/core/host/AidaClient.d.ts +++ b/public/core/host/AidaClient.d.ts @@ -26,7 +26,14 @@ export interface AidaResponse { rpcGlobalId?: number; }; } +export declare enum AidaAvailability { + AVAILABLE = "available", + NO_ACCOUNT_EMAIL = "no-account-email", + NO_ACTIVE_SYNC = "no-active-sync", + NO_INTERNET = "no-internet" +} export declare class AidaClient { static buildConsoleInsightsRequest(input: string): AidaRequest; + static getAidaClientAvailability(): Promise; fetch(request: AidaRequest): AsyncGenerator; } diff --git a/public/core/host/AidaClient.js b/public/core/host/AidaClient.js index 919df7cd5..1f1a44318 100644 --- a/public/core/host/AidaClient.js +++ b/public/core/host/AidaClient.js @@ -11,6 +11,13 @@ export var Entity; Entity[Entity["USER"] = 1] = "USER"; Entity[Entity["SYSTEM"] = 2] = "SYSTEM"; })(Entity || (Entity = {})); +export var AidaAvailability; +(function (AidaAvailability) { + AidaAvailability["AVAILABLE"] = "available"; + AidaAvailability["NO_ACCOUNT_EMAIL"] = "no-account-email"; + AidaAvailability["NO_ACTIVE_SYNC"] = "no-active-sync"; + AidaAvailability["NO_INTERNET"] = "no-internet"; +})(AidaAvailability || (AidaAvailability = {})); export class AidaClient { static buildConsoleInsightsRequest(input) { const request = { @@ -21,11 +28,7 @@ export class AidaClient { let temperature = NaN; let modelId = null; let disallowLogging = false; - if (config?.devToolsConsoleInsightsDogfood.enabled) { - temperature = config.devToolsConsoleInsightsDogfood.aidaTemperature; - modelId = config.devToolsConsoleInsightsDogfood.aidaModelId; - } - else if (config?.devToolsConsoleInsights.enabled) { + if (config?.devToolsConsoleInsights.enabled) { temperature = config.devToolsConsoleInsights.aidaTemperature; modelId = config.devToolsConsoleInsights.aidaModelId; disallowLogging = config.devToolsConsoleInsights.disallowLogging; @@ -45,6 +48,19 @@ export class AidaClient { } return request; } + static async getAidaClientAvailability() { + if (!navigator.onLine) { + return AidaAvailability.NO_INTERNET; + } + const syncInfo = await new Promise(resolve => InspectorFrontendHostInstance.getSyncInformation(syncInfo => resolve(syncInfo))); + if (!syncInfo.accountEmail) { + return AidaAvailability.NO_ACCOUNT_EMAIL; + } + if (!syncInfo.isSyncActive) { + return AidaAvailability.NO_ACTIVE_SYNC; + } + return AidaAvailability.AVAILABLE; + } async *fetch(request) { if (!InspectorFrontendHostInstance.doAidaConversation) { throw new Error('doAidaConversation is not available'); diff --git a/public/core/host/AidaClient.js.map b/public/core/host/AidaClient.js.map index 3ddf33f11..ab0b17c4d 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,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAC,6BAA6B,EAAC,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AAErD,MAAM,CAAN,IAAY,MAIX;AAJD,WAAY,MAAM;IAChB,yCAAW,CAAA;IACX,mCAAQ,CAAA;IACR,uCAAU,CAAA;AACZ,CAAC,EAJW,MAAM,KAAN,MAAM,QAIjB;AA+BD,MAAM,OAAO,UAAU;IACrB,MAAM,CAAC,2BAA2B,CAAC,KAAa;QAC9C,MAAM,OAAO,GAAgB;YAC3B,KAAK;YACL,MAAM,EAAE,iBAAiB;SAC1B,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,aAAa,EAAE,CAAC;QACnE,IAAI,WAAW,GAAG,GAAG,CAAC;QACtB,IAAI,OAAO,GAAG,IAAI,CAAC;QACnB,IAAI,eAAe,GAAG,KAAK,CAAC;QAC5B,IAAI,MAAM,EAAE,8BAA8B,CAAC,OAAO,EAAE,CAAC;YACnD,WAAW,GAAG,MAAM,CAAC,8BAA8B,CAAC,eAAe,CAAC;YACpE,OAAO,GAAG,MAAM,CAAC,8BAA8B,C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ChC,WAAW,GAAG,KAAK,CAAC;oBACtB,CAAC;oBACD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;oBACjC,WAAW,GAAG,IAAI,CAAC;gBACrB,CAAC;qBAAM,IAAI,WAAW,IAAI,MAAM,EAAE,CAAC;oBACjC,IAAI,CAAC,WAAW,EAAE,CAAC;wBACjB,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;wBAChC,WAAW,GAAG,IAAI,CAAC;oBACrB,CAAC;oBACD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;oBACjC,WAAW,GAAG,IAAI,CAAC;gBACrB,CAAC;qBAAM,IAAI,OAAO,IAAI,MAAM,EAAE,CAAC;oBAC7B,MAAM,IAAI,KAAK,CAAC,qBAAqB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;gBACjE,CAAC;qBAAM,CAAC;oBACN,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;gBAC1C,CAAC;YACH,CAAC;YACD,IAAI,WAAW,EAAE,CAAC;gBAChB,MAAM;oBACJ,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC;oBACtE,QAAQ;iBACT,CAAC;YACJ,CAAC;QACH,CAAC;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 Common from '../common/common.js';\nimport * as Platform from '../platform/platform.js';\n\nimport {InspectorFrontendHostInstance} from './InspectorFrontendHost.js';\nimport {bindOutputStream} from './ResourceLoader.js';\n\nexport enum Entity {\n UNKNOWN = 0,\n USER = 1,\n SYSTEM = 2,\n}\n\nexport interface Chunk {\n text: string;\n entity: Entity;\n}\n\nexport interface AidaRequest {\n input: string;\n preamble?: string;\n // eslint-disable-next-line @typescript-eslint/naming-convention\n chat_history?: Chunk[];\n client: string;\n options?: {\n temperature?: Number,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n model_id?: string,\n };\n metadata?: {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n disable_user_content_logging: boolean,\n };\n}\n\nexport interface AidaResponse {\n explanation: string;\n metadata: {\n rpcGlobalId?: number,\n };\n}\n\nexport class AidaClient {\n static buildConsoleInsightsRequest(input: string): AidaRequest {\n const request: AidaRequest = {\n input,\n client: 'CHROME_DEVTOOLS',\n };\n const config = Common.Settings.Settings.instance().getHostConfig();\n let temperature = NaN;\n let modelId = null;\n let disallowLogging = false;\n if (config?.devToolsConsoleInsightsDogfood.enabled) {\n temperature = config.devToolsConsoleInsightsDogfood.aidaTemperature;\n modelId = config.devToolsConsoleInsightsDogfood.aidaModelId;\n } else if (config?.devToolsConsoleInsights.enabled) {\n temperature = config.devToolsConsoleInsights.aidaTemperature;\n modelId = config.devToolsConsoleInsights.aidaModelId;\n disallowLogging = config.devToolsConsoleInsights.disallowLogging;\n }\n\n if (!isNaN(temperature)) {\n request.options ??= {};\n request.options.temperature = temperature;\n }\n if (modelId) {\n request.options ??= {};\n request.options.model_id = modelId;\n }\n if (disallowLogging) {\n request.metadata = {\n disable_user_content_logging: true,\n };\n }\n return request;\n }\n\n async * fetch(request: AidaRequest): 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(JSON.stringify(request), 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 const metadata = {rpcGlobalId: 0};\n while ((chunk = await stream.read())) {\n let textUpdated = false;\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 ('metadata' in result) {\n metadata.rpcGlobalId = result.metadata.rpcGlobalId;\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 textUpdated = true;\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 textUpdated = true;\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 if (textUpdated) {\n yield {\n explanation: text.join('') + (inCodeChunk ? CODE_CHUNK_SEPARATOR : ''),\n metadata,\n };\n }\n }\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"AidaClient.js","sourceRoot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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 '../common/common.js';\nimport * as Platform from '../platform/platform.js';\n\nimport {InspectorFrontendHostInstance} from './InspectorFrontendHost.js';\nimport {type SyncInformation} from './InspectorFrontendHostAPI.js';\nimport {bindOutputStream} from './ResourceLoader.js';\n\nexport enum Entity {\n UNKNOWN = 0,\n USER = 1,\n SYSTEM = 2,\n}\n\nexport interface Chunk {\n text: string;\n entity: Entity;\n}\n\nexport interface AidaRequest {\n input: string;\n preamble?: string;\n // eslint-disable-next-line @typescript-eslint/naming-convention\n chat_history?: Chunk[];\n client: string;\n options?: {\n temperature?: Number,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n model_id?: string,\n };\n metadata?: {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n disable_user_content_logging: boolean,\n };\n}\n\nexport interface AidaResponse {\n explanation: string;\n metadata: {\n rpcGlobalId?: number,\n };\n}\n\nexport enum AidaAvailability {\n AVAILABLE = 'available',\n NO_ACCOUNT_EMAIL = 'no-account-email',\n NO_ACTIVE_SYNC = 'no-active-sync',\n NO_INTERNET = 'no-internet',\n}\n\nexport class AidaClient {\n static buildConsoleInsightsRequest(input: string): AidaRequest {\n const request: AidaRequest = {\n input,\n client: 'CHROME_DEVTOOLS',\n };\n const config = Common.Settings.Settings.instance().getHostConfig();\n let temperature = NaN;\n let modelId = null;\n let disallowLogging = false;\n if (config?.devToolsConsoleInsights.enabled) {\n temperature = config.devToolsConsoleInsights.aidaTemperature;\n modelId = config.devToolsConsoleInsights.aidaModelId;\n disallowLogging = config.devToolsConsoleInsights.disallowLogging;\n }\n\n if (!isNaN(temperature)) {\n request.options ??= {};\n request.options.temperature = temperature;\n }\n if (modelId) {\n request.options ??= {};\n request.options.model_id = modelId;\n }\n if (disallowLogging) {\n request.metadata = {\n disable_user_content_logging: true,\n };\n }\n return request;\n }\n\n static async getAidaClientAvailability(): Promise {\n if (!navigator.onLine) {\n return AidaAvailability.NO_INTERNET;\n }\n\n const syncInfo = await new Promise(\n resolve => InspectorFrontendHostInstance.getSyncInformation(syncInfo => resolve(syncInfo)));\n if (!syncInfo.accountEmail) {\n return AidaAvailability.NO_ACCOUNT_EMAIL;\n }\n\n if (!syncInfo.isSyncActive) {\n return AidaAvailability.NO_ACTIVE_SYNC;\n }\n\n return AidaAvailability.AVAILABLE;\n }\n\n async * fetch(request: AidaRequest): 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(JSON.stringify(request), 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 const metadata = {rpcGlobalId: 0};\n while ((chunk = await stream.read())) {\n let textUpdated = false;\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 ('metadata' in result) {\n metadata.rpcGlobalId = result.metadata.rpcGlobalId;\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 textUpdated = true;\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 textUpdated = true;\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 if (textUpdated) {\n yield {\n explanation: text.join('') + (inCodeChunk ? CODE_CHUNK_SEPARATOR : ''),\n metadata,\n };\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 d4acb541f..bc398a409 100644 --- a/public/core/host/AidaClient.test.js +++ b/public/core/host/AidaClient.test.js @@ -1,23 +1,12 @@ // Copyright 2023 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import { describeWithEnvironment } from '../../testing/EnvironmentHelpers.js'; -import * as Common from '../common/common.js'; +import { describeWithEnvironment, getGetHostConfigStub } from '../../testing/EnvironmentHelpers.js'; import * as Host from './host.js'; const TEST_MODEL_ID = 'testModelId'; describeWithEnvironment('AidaClient', () => { it('adds no model temperature if console insights is not enabled', () => { - const settings = Common.Settings.Settings.instance(); - const stub = sinon.stub(settings, 'getHostConfig').returns({ - devToolsConsoleInsights: { - enabled: false, - aidaTemperature: 0.2, - }, - devToolsConsoleInsightsDogfood: { - enabled: false, - aidaTemperature: 0.3, - }, - }); + const stub = getGetHostConfigStub({}); const request = Host.AidaClient.AidaClient.buildConsoleInsightsRequest('foo'); assert.deepStrictEqual(request, { input: 'foo', @@ -26,18 +15,11 @@ describeWithEnvironment('AidaClient', () => { stub.restore(); }); it('adds a model temperature', () => { - const settings = Common.Settings.Settings.instance(); - const stub = sinon.stub(settings, 'getHostConfig').returns({ + const stub = getGetHostConfigStub({ devToolsConsoleInsights: { enabled: true, - aidaModelId: '', aidaTemperature: 0.5, }, - devToolsConsoleInsightsDogfood: { - enabled: false, - aidaModelId: '', - aidaTemperature: 0.3, - }, }); const request = Host.AidaClient.AidaClient.buildConsoleInsightsRequest('foo'); assert.deepStrictEqual(request, { @@ -50,13 +32,8 @@ describeWithEnvironment('AidaClient', () => { stub.restore(); }); it('adds a model temperature of 0', () => { - const settings = Common.Settings.Settings.instance(); - const stub = sinon.stub(settings, 'getHostConfig').returns({ + const stub = getGetHostConfigStub({ devToolsConsoleInsights: { - enabled: true, - aidaTemperature: 0.5, - }, - devToolsConsoleInsightsDogfood: { enabled: true, aidaTemperature: 0, }, @@ -72,16 +49,12 @@ describeWithEnvironment('AidaClient', () => { stub.restore(); }); it('adds a model id and temperature', () => { - const settings = Common.Settings.Settings.instance(); - const stub = sinon.stub(settings, 'getHostConfig').returns({ + const stub = getGetHostConfigStub({ devToolsConsoleInsights: { enabled: true, aidaModelId: TEST_MODEL_ID, aidaTemperature: 0.5, }, - devToolsConsoleInsightsDogfood: { - enabled: false, - }, }); const request = Host.AidaClient.AidaClient.buildConsoleInsightsRequest('foo'); assert.deepStrictEqual(request, { @@ -95,17 +68,12 @@ describeWithEnvironment('AidaClient', () => { stub.restore(); }); it('adds metadata to disallow logging', () => { - const settings = Common.Settings.Settings.instance(); - const stub = sinon.stub(settings, 'getHostConfig').returns({ + const stub = getGetHostConfigStub({ devToolsConsoleInsights: { enabled: true, - aidaModelId: '', aidaTemperature: 0.5, disallowLogging: true, }, - devToolsConsoleInsightsDogfood: { - enabled: false, - }, }); const request = Host.AidaClient.AidaClient.buildConsoleInsightsRequest('foo'); assert.deepStrictEqual(request, { @@ -288,5 +256,45 @@ describeWithEnvironment('AidaClient', () => { .equals('Cannot send request: Cannot get OAuth credentials {\'@type\': \'type.googleapis.com/google.rpc.DebugInfo\', \'detail\': \'DETAILS\'}'); } }); + describe('getAidaClientAvailability', () => { + function mockGetSyncInformation(information) { + sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'getSyncInformation').callsFake(cb => { + cb(information); + }); + } + beforeEach(() => { + sinon.restore(); + }); + it('should return NO_INTERNET when navigator is not online', async () => { + const navigatorDescriptor = Object.getOwnPropertyDescriptor(globalThis, 'navigator'); + Object.defineProperty(globalThis, 'navigator', { + get() { + return { onLine: false }; + }, + }); + try { + const result = await Host.AidaClient.AidaClient.getAidaClientAvailability(); + assert.strictEqual(result, Host.AidaClient.AidaAvailability.NO_INTERNET); + } + finally { + Object.defineProperty(globalThis, 'navigator', navigatorDescriptor); + } + }); + it('should return NO_ACCOUNT_EMAIL when the syncInfo doesn\'t contain accountEmail', async () => { + mockGetSyncInformation({ accountEmail: undefined, isSyncActive: true }); + const result = await Host.AidaClient.AidaClient.getAidaClientAvailability(); + assert.strictEqual(result, Host.AidaClient.AidaAvailability.NO_ACCOUNT_EMAIL); + }); + it('should return NO_ACTIVE_SYNC when the syncInfo.isSyncActive is not true', async () => { + mockGetSyncInformation({ accountEmail: 'some-email', isSyncActive: false }); + const result = await Host.AidaClient.AidaClient.getAidaClientAvailability(); + assert.strictEqual(result, Host.AidaClient.AidaAvailability.NO_ACTIVE_SYNC); + }); + it('should return AVAILABLE when navigator is online, accountEmail exists and isSyncActive is true', async () => { + mockGetSyncInformation({ accountEmail: 'some-email', isSyncActive: true }); + const result = await Host.AidaClient.AidaClient.getAidaClientAvailability(); + assert.strictEqual(result, Host.AidaClient.AidaAvailability.AVAILABLE); + }); + }); }); //# sourceMappingURL=AidaClient.test.js.map \ No newline at end of file diff --git a/public/core/host/AidaClient.test.js.map b/public/core/host/AidaClient.test.js.map index f8032b320..7bdde53d4 100644 --- a/public/core/host/AidaClient.test.js.map +++ b/public/core/host/Aida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IACH,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qDAAqD,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,CAAC;YACH,MAAM,aAAa,CAAC,QAAQ,CAAC,CAAC;YAC9B,MAAM,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC;QAC9C,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC;iBACd,MAAM,CACH,sIAAsI,CAAC,CAAC;QAClJ,CAAC;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 {describeWithEnvironment} from '../../testing/EnvironmentHelpers.js';\nimport * as Common from '../common/common.js';\nimport type * as Root from '../root/root.js';\n\nimport * as Host from './host.js';\n\nconst TEST_MODEL_ID = 'testModelId';\n\ndescribeWithEnvironment('AidaClient', () => {\n it('adds no model temperature if console insights is not enabled', () => {\n const settings = Common.Settings.Settings.instance();\n const stub = sinon.stub(settings, 'getHostConfig').returns({\n devToolsConsoleInsights: {\n enabled: false,\n aidaTemperature: 0.2,\n } as Root.Runtime.HostConfigConsoleInsights,\n devToolsConsoleInsightsDogfood: {\n enabled: false,\n aidaTemperature: 0.3,\n } as Root.Runtime.HostConfigConsoleInsightsDogfood,\n });\n const request = Host.AidaClient.AidaClient.buildConsoleInsightsRequest('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 settings = Common.Settings.Settings.instance();\n const stub = sinon.stub(settings, 'getHostConfig').returns({\n devToolsConsoleInsights: {\n enabled: true,\n aidaModelId: '',\n aidaTemperature: 0.5,\n } as Root.Runtime.HostConfigConsoleInsights,\n devToolsConsoleInsightsDogfood: {\n enabled: false,\n aidaModelId: '',\n aidaTemperature: 0.3,\n } as Root.Runtime.HostConfigConsoleInsightsDogfood,\n });\n const request = Host.AidaClient.AidaClient.buildConsoleInsightsRequest('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 settings = Common.Settings.Settings.instance();\n const stub = sinon.stub(settings, 'getHostConfig').returns({\n devToolsConsoleInsights: {\n enabled: true,\n aidaTemperature: 0.5,\n } as Root.Runtime.HostConfigConsoleInsights,\n devToolsConsoleInsightsDogfood: {\n enabled: true,\n aidaTemperature: 0,\n } as Root.Runtime.HostConfigConsoleInsightsDogfood,\n });\n const request = Host.AidaClient.AidaClient.buildConsoleInsightsRequest('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 a model id and temperature', () => {\n const settings = Common.Settings.Settings.instance();\n const stub = sinon.stub(settings, 'getHostConfig').returns({\n devToolsConsoleInsights: {\n enabled: true,\n aidaModelId: TEST_MODEL_ID,\n aidaTemperature: 0.5,\n } as Root.Runtime.HostConfigConsoleInsights,\n devToolsConsoleInsightsDogfood: {\n enabled: false,\n } as Root.Runtime.HostConfigConsoleInsightsDogfood,\n });\n\n const request = Host.AidaClient.AidaClient.buildConsoleInsightsRequest('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 it('adds metadata to disallow logging', () => {\n const settings = Common.Settings.Settings.instance();\n const stub = sinon.stub(settings, 'getHostConfig').returns({\n devToolsConsoleInsights: {\n enabled: true,\n aidaModelId: '',\n aidaTemperature: 0.5,\n disallowLogging: true,\n } as Root.Runtime.HostConfigConsoleInsights,\n devToolsConsoleInsightsDogfood: {\n enabled: false,\n } as Root.Runtime.HostConfigConsoleInsightsDogfood,\n });\n\n const request = Host.AidaClient.AidaClient.buildConsoleInsightsRequest('foo');\n assert.deepStrictEqual(request, {\n input: 'foo',\n client: 'CHROME_DEVTOOLS',\n metadata: {\n disable_user_content_logging: true,\n },\n options: {\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(Host.AidaClient.AidaClient.buildConsoleInsightsRequest('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!'}},\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 single square bracket as a chunk', async () => {\n sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'doAidaConversation')\n .callsFake(async (_, streamId, callback) => {\n const response = ['[', JSON.stringify({textChunk: {text: 'hello world'}, metadata: {rpcGlobalId: 123}}), ']'];\n for (const chunk of response) {\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);\n assert.deepStrictEqual(results, [\n {explanation: 'hello 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 +{"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,EAAC,uBAAuB,EAAE,oBAAoB,EAAC,MAAM,qCAAqC,CAAC;AAElG,OAAO,KAAK,IAAI,MAAM,WA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right 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 {describeWithEnvironment, getGetHostConfigStub} from '../../testing/EnvironmentHelpers.js';\n\nimport * as Host from './host.js';\n\nconst TEST_MODEL_ID = 'testModelId';\n\ndescribeWithEnvironment('AidaClient', () => {\n it('adds no model temperature if console insights is not enabled', () => {\n const stub = getGetHostConfigStub({});\n const request = Host.AidaClient.AidaClient.buildConsoleInsightsRequest('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 = getGetHostConfigStub({\n devToolsConsoleInsights: {\n enabled: true,\n aidaTemperature: 0.5,\n },\n });\n const request = Host.AidaClient.AidaClient.buildConsoleInsightsRequest('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 = getGetHostConfigStub({\n devToolsConsoleInsights: {\n enabled: true,\n aidaTemperature: 0,\n },\n });\n const request = Host.AidaClient.AidaClient.buildConsoleInsightsRequest('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 a model id and temperature', () => {\n const stub = getGetHostConfigStub({\n devToolsConsoleInsights: {\n enabled: true,\n aidaModelId: TEST_MODEL_ID,\n aidaTemperature: 0.5,\n },\n });\n const request = Host.AidaClient.AidaClient.buildConsoleInsightsRequest('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 it('adds metadata to disallow logging', () => {\n const stub = getGetHostConfigStub({\n devToolsConsoleInsights: {\n enabled: true,\n aidaTemperature: 0.5,\n disallowLogging: true,\n },\n });\n const request = Host.AidaClient.AidaClient.buildConsoleInsightsRequest('foo');\n assert.deepStrictEqual(request, {\n input: 'foo',\n client: 'CHROME_DEVTOOLS',\n metadata: {\n disable_user_content_logging: true,\n },\n options: {\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(Host.AidaClient.AidaClient.buildConsoleInsightsRequest('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!'}},\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 single square bracket as a chunk', async () => {\n sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'doAidaConversation')\n .callsFake(async (_, streamId, callback) => {\n const response = ['[', JSON.stringify({textChunk: {text: 'hello world'}, metadata: {rpcGlobalId: 123}}), ']'];\n for (const chunk of response) {\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);\n assert.deepStrictEqual(results, [\n {explanation: 'hello 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 describe('getAidaClientAvailability', () => {\n function mockGetSyncInformation(information: Host.InspectorFrontendHostAPI.SyncInformation): void {\n sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'getSyncInformation').callsFake(cb => {\n cb(information);\n });\n }\n\n beforeEach(() => {\n sinon.restore();\n });\n\n it('should return NO_INTERNET when navigator is not online', async () => {\n const navigatorDescriptor = Object.getOwnPropertyDescriptor(globalThis, 'navigator')!;\n Object.defineProperty(globalThis, 'navigator', {\n get() {\n return {onLine: false};\n },\n });\n\n try {\n const result = await Host.AidaClient.AidaClient.getAidaClientAvailability();\n assert.strictEqual(result, Host.AidaClient.AidaAvailability.NO_INTERNET);\n } finally {\n Object.defineProperty(globalThis, 'navigator', navigatorDescriptor);\n }\n });\n\n it('should return NO_ACCOUNT_EMAIL when the syncInfo doesn\\'t contain accountEmail', async () => {\n mockGetSyncInformation({accountEmail: undefined, isSyncActive: true});\n\n const result = await Host.AidaClient.AidaClient.getAidaClientAvailability();\n\n assert.strictEqual(result, Host.AidaClient.AidaAvailability.NO_ACCOUNT_EMAIL);\n });\n\n it('should return NO_ACTIVE_SYNC when the syncInfo.isSyncActive is not true', async () => {\n mockGetSyncInformation({accountEmail: 'some-email', isSyncActive: false});\n\n const result = await Host.AidaClient.AidaClient.getAidaClientAvailability();\n\n assert.strictEqual(result, Host.AidaClient.AidaAvailability.NO_ACTIVE_SYNC);\n });\n\n it('should return AVAILABLE when navigator is online, accountEmail exists and isSyncActive is true', async () => {\n mockGetSyncInformation({accountEmail: 'some-email', isSyncActive: true});\n\n const result = await Host.AidaClient.AidaClient.getAidaClientAvailability();\n\n assert.strictEqual(result, Host.AidaClient.AidaAvailability.AVAILABLE);\n });\n });\n});\n"]} \ No newline at end of file diff --git a/public/core/host/InspectorFrontendHost.js b/public/core/host/InspectorFrontendHost.js index 5d7544a9c..3849ea4a4 100644 --- a/public/core/host/InspectorFrontendHost.js +++ b/public/core/host/InspectorFrontendHost.js @@ -319,11 +319,10 @@ export class InspectorFrontendHostStub { enabled: false, optIn: false, }, - devToolsConsoleInsightsDogfood: { + devToolsFreestylerDogfood: { aidaModelId: '', aidaTemperature: 0, enabled: false, - optIn: false, }, }); } diff --git a/public/core/host/InspectorFrontendHost.js.map b/public/core/host/InspectorFrontendHost.js.map index dc066b5b6..6a348c2e8 100644 --- a/public/core/host/InspectorFrontendHost.js.map +++ b/public/core/host/InspectorFrontendHost.js.map @@ -1 +1 @@ -{"version":3,"file":"InspectorFrontendHost.js","sourceRoot":"","sources":["../../../../../../front_end/core/host/InspectorFrontendHost.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,oEAAoE;AACpE,sDAAsD;AAEtD,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAK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C","sourcesContent":["/*\n * Copyright (C) 2009 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\n// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\nimport * as Common from '../common/common.js';\nimport * as i18n from '../i18n/i18n.js';\nimport * as Platform from '../platform/platform.js';\nimport * as Root from '../root/root.js';\n\nimport {\n type CanShowSurveyResult,\n type ChangeEvent,\n type ClickEvent,\n type ContextMenuDescriptor,\n type DoAidaConversationResult,\n type DragEvent,\n type EnumeratedHistogram,\n EventDescriptors,\n Events,\n type EventTypes,\n type ExtensionDescriptor,\n type HoverEvent,\n type ImpressionEvent,\n type InspectorFrontendHostAPI,\n type KeyDownEvent,\n type LoadNetworkResourceResult,\n type ResizeEvent,\n type ShowSurveyResult,\n type SyncInformation,\n} from './InspectorFrontendHostAPI.js';\nimport {streamWrite as resourceLoaderStreamWrite} from './ResourceLoader.js';\n\ninterface DecompressionStream extends GenericTransformStream {\n readonly format: string;\n}\ndeclare const DecompressionStream: {\n prototype: DecompressionStream,\n new (format: string): DecompressionStream,\n};\n\nconst UIStrings = {\n /**\n *@description Document title in Inspector Frontend Host of the DevTools window\n *@example {example.com} PH1\n */\n devtoolsS: 'DevTools - {PH1}',\n};\nconst str_ = i18n.i18n.registerUIStrings('core/host/InspectorFrontendHost.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nconst MAX_RECORDED_HISTOGRAMS_SIZE = 100;\nconst OVERRIDES_FILE_SYSTEM_PATH = '/overrides' as Platform.DevToolsPath.RawPathString;\n\n/**\n * The InspectorFrontendHostStub is a stub interface used the frontend is loaded like a webpage. Examples:\n * - devtools://devtools/bundled/devtools_app.html\n * - https://chrome-devtools-frontend.appspot.com/serve_rev/@030cc140435b0152645522b9864b75cac6c0a854/worker_app.html\n * - http://localhost:9222/devtools/inspector.html?ws=localhost:9222/devtools/page/xTARGET_IDx\n *\n * When the frontend runs within the native embedder, then the InspectorFrontendHostAPI methods are provided\n * by devtools_compatibility.js. Those leverage `DevToolsAPI.sendMessageToEmbedder()` which match up with\n * the embedder API defined here: https://source.chromium.org/search?q=f:devtools%20f:dispatcher%20f:cc%20symbol:CreateForDevToolsFrontend&sq=&ss=chromium%2Fchromium%2Fsrc\n * The native implementations live in devtools_ui_bindings.cc: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/devtools/devtools_ui_bindings.cc\n */\nexport class InspectorFrontendHostStub implements InspectorFrontendHostAPI {\n readonly #urlsBeingSaved: Map;\n events!: Common.EventTarget.EventTarget;\n #fileSystem: FileSystem|null = null;\n\n recordedCountHistograms:\n {histogramName: string, sample: number, min: number, exclusiveMax: number, bucketSize: number}[] = [];\n recordedEnumeratedHistograms: {actionName: EnumeratedHistogram, actionCode: number}[] = [];\n recordedPerformanceHistograms: {histogramName: string, duration: number}[] = [];\n\n constructor() {\n this.#urlsBeingSaved = new Map();\n\n // Guard against errors should this file ever be imported at the top level\n // within a worker - in which case this constructor is run. If there's no\n // document, we can early exit.\n if (typeof document === 'undefined') {\n return;\n }\n\n function stopEventPropagation(this: InspectorFrontendHostAPI, event: KeyboardEvent): void {\n // Let browser handle Ctrl+/Ctrl- shortcuts in hosted mode.\n const zoomModifier = this.platform() === 'mac' ? event.metaKey : event.ctrlKey;\n if (zoomModifier && (event.key === '+' || event.key === '-')) {\n event.stopPropagation();\n }\n }\n\n document.addEventListener('keydown', event => {\n stopEventPropagation.call(this, (event as KeyboardEvent));\n }, true);\n }\n\n platform(): string {\n const userAgent = navigator.userAgent;\n if (userAgent.includes('Windows NT')) {\n return 'windows';\n }\n if (userAgent.includes('Mac OS X')) {\n return 'mac';\n }\n return 'linux';\n }\n\n loadCompleted(): void {\n }\n\n bringToFront(): void {\n }\n\n closeWindow(): void {\n }\n\n setIsDocked(isDocked: boolean, callback: () => void): void {\n window.setTimeout(callback, 0);\n }\n\n showSurvey(trigger: string, callback: (arg0: ShowSurveyResult) => void): void {\n window.setTimeout(() => callback({surveyShown: false}), 0);\n }\n\n canShowSurvey(trigger: string, callback: (arg0: CanShowSurveyResult) => void): void {\n window.setTimeout(() => callback({canShowSurvey: false}), 0);\n }\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\n inspectElementCompleted(): void {\n }\n\n setInjectedScriptForOrigin(origin: string, script: string): void {\n }\n\n inspectedURLChanged(url: Platform.DevToolsPath.UrlString): void {\n document.title = i18nString(UIStrings.devtoolsS, {PH1: url.replace(/^https?:\\/\\//, '')});\n }\n\n copyText(text: string|null|undefined): void {\n if (text === undefined || text === null) {\n return;\n }\n void navigator.clipboard.writeText(text);\n }\n\n openInNewTab(url: Platform.DevToolsPath.UrlString): void {\n window.open(url, '_blank');\n }\n\n openSearchResultsInNewTab(query: string): void {\n Common.Console.Console.instance().error(\n 'Search is not enabled in hosted mode. Please inspect using chrome://inspect');\n }\n\n showItemInFolder(fileSystemPath: Platform.DevToolsPath.RawPathString): void {\n Common.Console.Console.instance().error(\n 'Show item in folder is not enabled in hosted mode. Please inspect using chrome://inspect');\n }\n\n save(\n url: Platform.DevToolsPath.RawPathString|Platform.DevToolsPath.UrlString, content: string, forceSaveAs: boolean,\n isBase64: boolean): void {\n let buffer = this.#urlsBeingSaved.get(url);\n if (!buffer) {\n buffer = [];\n this.#urlsBeingSaved.set(url, buffer);\n }\n buffer.push(content);\n this.events.dispatchEventToListeners(Events.SavedURL, {url, fileSystemPath: url});\n }\n\n append(url: Platform.DevToolsPath.RawPathString|Platform.DevToolsPath.UrlString, content: string): void {\n const buffer = this.#urlsBeingSaved.get(url);\n if (buffer) {\n buffer.push(content);\n this.events.dispatchEventToListeners(Events.AppendedToURL, url);\n }\n }\n\n close(url: Platform.DevToolsPath.RawPathString|Platform.DevToolsPath.UrlString): void {\n const buffer = this.#urlsBeingSaved.get(url) || [];\n this.#urlsBeingSaved.delete(url);\n let fileName = '';\n\n if (url) {\n try {\n const trimmed = Platform.StringUtilities.trimURL(url);\n fileName = Platform.StringUtilities.removeURLFragment(trimmed);\n } catch (error) {\n // If url is not a valid URL, it is probably a filename.\n fileName = url;\n }\n }\n\n const link = document.createElement('a');\n link.download = fileName;\n const blob = new Blob([buffer.join('')], {type: 'text/plain'});\n const blobUrl = URL.createObjectURL(blob);\n link.href = blobUrl;\n link.click();\n URL.revokeObjectURL(blobUrl);\n }\n\n sendMessageToBackend(message: string): void {\n }\n\n recordCountHistogram(histogramName: string, sample: number, min: number, exclusiveMax: number, bucketSize: number):\n void {\n if (this.recordedCountHistograms.length >= MAX_RECORDED_HISTOGRAMS_SIZE) {\n this.recordedCountHistograms.shift();\n }\n this.recordedCountHistograms.push({histogramName, sample, min, exclusiveMax, bucketSize});\n }\n\n recordEnumeratedHistogram(actionName: EnumeratedHistogram, actionCode: number, bucketSize: number): void {\n if (this.recordedEnumeratedHistograms.length >= MAX_RECORDED_HISTOGRAMS_SIZE) {\n this.recordedEnumeratedHistograms.shift();\n }\n this.recordedEnumeratedHistograms.push({actionName, actionCode});\n }\n\n recordPerformanceHistogram(histogramName: string, duration: number): void {\n if (this.recordedPerformanceHistograms.length >= MAX_RECORDED_HISTOGRAMS_SIZE) {\n this.recordedPerformanceHistograms.shift();\n }\n this.recordedPerformanceHistograms.push({histogramName, duration});\n }\n\n recordUserMetricsAction(umaName: string): void {\n }\n\n requestFileSystems(): void {\n this.events.dispatchEventToListeners(Events.FileSystemsLoaded, []);\n }\n\n addFileSystem(type?: string): void {\n const onFileSystem = (fs: FileSystem): void => {\n this.#fileSystem = fs;\n const fileSystem = {\n fileSystemName: 'sandboxedRequestedFileSystem',\n fileSystemPath: OVERRIDES_FILE_SYSTEM_PATH,\n rootURL: 'filesystem:devtools://devtools/isolated/',\n type: 'overrides',\n };\n this.events.dispatchEventToListeners(Events.FileSystemAdded, {fileSystem});\n };\n window.webkitRequestFileSystem(window.TEMPORARY, 1024 * 1024, onFileSystem);\n }\n\n removeFileSystem(fileSystemPath: Platform.DevToolsPath.RawPathString): void {\n const removalCallback = (entries: Entry[]): void => {\n entries.forEach(entry => {\n if (entry.isDirectory) {\n (entry as DirectoryEntry).removeRecursively(() => {});\n } else if (entry.isFile) {\n entry.remove(() => {});\n }\n });\n };\n\n if (this.#fileSystem) {\n this.#fileSystem.root.createReader().readEntries(removalCallback);\n }\n\n this.#fileSystem = null;\n this.events.dispatchEventToListeners(Events.FileSystemRemoved, OVERRIDES_FILE_SYSTEM_PATH);\n }\n\n isolatedFileSystem(fileSystemId: string, registeredName: string): FileSystem|null {\n return this.#fileSystem;\n }\n\n loadNetworkResource(\n url: string, headers: string, streamId: number, callback: (arg0: LoadNetworkResourceResult) => void): void {\n // Read the first 3 bytes looking for the gzip signature in the file header\n function isGzip(ab: ArrayBuffer): boolean {\n const buf = new Uint8Array(ab);\n if (!buf || buf.length < 3) {\n return false;\n }\n\n // https://www.rfc-editor.org/rfc/rfc1952#page-6\n return buf[0] === 0x1F && buf[1] === 0x8B && buf[2] === 0x08;\n }\n fetch(url)\n .then(async result => {\n const resultArrayBuf = await result.arrayBuffer();\n let decoded: ReadableStream|ArrayBuffer = resultArrayBuf;\n if (isGzip(resultArrayBuf)) {\n const ds = new DecompressionStream('gzip');\n const writer = ds.writable.getWriter();\n void writer.write(resultArrayBuf);\n void writer.close();\n decoded = ds.readable;\n }\n const text = await new Response(decoded).text();\n return text;\n })\n .then(function(text) {\n resourceLoaderStreamWrite(streamId, text);\n callback({\n statusCode: 200,\n headers: undefined,\n messageOverride: undefined,\n netError: undefined,\n netErrorName: undefined,\n urlValid: undefined,\n });\n })\n .catch(function() {\n callback({\n statusCode: 404,\n headers: undefined,\n messageOverride: undefined,\n netError: undefined,\n netErrorName: undefined,\n urlValid: undefined,\n });\n });\n }\n\n registerPreference(name: string, options: {synced?: boolean}): void {\n }\n\n getPreferences(callback: (arg0: {\n [x: string]: string,\n }) => void): void {\n const prefs: {\n [x: string]: string,\n } = {};\n for (const name in window.localStorage) {\n prefs[name] = window.localStorage[name];\n }\n callback(prefs);\n }\n\n getPreference(name: string, callback: (arg0: string) => void): void {\n callback(window.localStorage[name]);\n }\n\n setPreference(name: string, value: string): void {\n window.localStorage[name] = value;\n }\n\n removePreference(name: string): void {\n delete window.localStorage[name];\n }\n\n clearPreferences(): void {\n window.localStorage.clear();\n }\n\n getSyncInformation(callback: (arg0: SyncInformation) => void): void {\n callback({\n isSyncActive: false,\n arePreferencesSynced: false,\n });\n }\n\n getHostConfig(callback: (arg0: Root.Runtime.HostConfig) => void): void {\n callback({\n devToolsConsoleInsights: {\n aidaModelId: '',\n aidaTemperature: 0,\n blocked: true,\n blockedByAge: false,\n blockedByEnterprisePolicy: false,\n blockedByFeatureFlag: true,\n blockedByGeo: false,\n blockedByRollout: false,\n disallowLogging: false,\n enabled: false,\n optIn: false,\n },\n devToolsConsoleInsightsDogfood: {\n aidaModelId: '',\n aidaTemperature: 0,\n enabled: false,\n optIn: false,\n },\n });\n }\n\n upgradeDraggedFileSystemPermissions(fileSystem: FileSystem): void {\n }\n\n indexPath(requestId: number, fileSystemPath: Platform.DevToolsPath.RawPathString, excludedFolders: string): void {\n }\n\n stopIndexing(requestId: number): void {\n }\n\n searchInPath(requestId: number, fileSystemPath: Platform.DevToolsPath.RawPathString, query: string): void {\n }\n\n zoomFactor(): number {\n return 1;\n }\n\n zoomIn(): void {\n }\n\n zoomOut(): void {\n }\n\n resetZoom(): void {\n }\n\n setWhitelistedShortcuts(shortcuts: string): void {\n }\n\n setEyeDropperActive(active: boolean): void {\n }\n\n showCertificateViewer(certChain: string[]): void {\n }\n\n reattach(callback: () => void): void {\n }\n\n readyForTest(): void {\n }\n\n connectionReady(): void {\n }\n\n setOpenNewWindowForPopups(value: boolean): void {\n }\n\n setDevicesDiscoveryConfig(config: Adb.Config): void {\n }\n\n setDevicesUpdatesEnabled(enabled: boolean): void {\n }\n\n performActionOnRemotePage(pageId: string, action: string): void {\n }\n\n openRemotePage(browserId: string, url: string): void {\n }\n\n openNodeFrontend(): void {\n }\n\n showContextMenuAtPoint(x: number, y: number, items: ContextMenuDescriptor[], document: Document): void {\n throw 'Soft context menu should be used';\n }\n\n isHostedMode(): boolean {\n return true;\n }\n\n setAddExtensionCallback(callback: (arg0: ExtensionDescriptor) => void): void {\n // Extensions are not supported in hosted mode.\n }\n\n async initialTargetId(): Promise {\n return null;\n }\n\n doAidaConversation(request: string, streamId: number, callback: (result: DoAidaConversationResult) => void): void {\n callback({\n error: 'Not implemened',\n });\n }\n\n registerAidaClientEvent(request: string): void {\n }\n\n recordImpression(event: ImpressionEvent): void {\n }\n recordResize(event: ResizeEvent): void {\n }\n recordClick(event: ClickEvent): void {\n }\n recordHover(event: HoverEvent): void {\n }\n recordDrag(event: DragEvent): void {\n }\n recordChange(event: ChangeEvent): void {\n }\n recordKeyDown(event: KeyDownEvent): void {\n }\n}\n\n// @ts-ignore Global injected by devtools-compatibility.js\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport let InspectorFrontendHostInstance: InspectorFrontendHostStub = globalThis.InspectorFrontendHost;\n\nclass InspectorFrontendAPIImpl {\n constructor() {\n for (const descriptor of EventDescriptors) {\n // @ts-ignore Dispatcher magic\n this[descriptor[1]] = this.dispatch.bind(this, descriptor[0], descriptor[2], descriptor[3]);\n }\n }\n\n private dispatch(name: symbol, signature: string[], runOnceLoaded: boolean, ...params: string[]): void {\n // Single argument methods get dispatched with the param.\n if (signature.length < 2) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n InspectorFrontendHostInstance.events.dispatchEventToListeners(name, params[0]);\n } catch (error) {\n console.error(error + ' ' + error.stack);\n }\n return;\n }\n const data: {\n [x: string]: string,\n } = {};\n for (let i = 0; i < signature.length; ++i) {\n data[signature[i]] = params[i];\n }\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n InspectorFrontendHostInstance.events.dispatchEventToListeners(name, data);\n } catch (error) {\n console.error(error + ' ' + error.stack);\n }\n }\n\n streamWrite(id: number, chunk: string): void {\n resourceLoaderStreamWrite(id, chunk);\n }\n}\n\n(function(): void {\n\nfunction initializeInspectorFrontendHost(): void {\n let proto;\n if (!InspectorFrontendHostInstance) {\n // Instantiate stub for web-hosted mode if necessary.\n // @ts-ignore Global injected by devtools-compatibility.js\n globalThis.InspectorFrontendHost = InspectorFrontendHostInstance = new InspectorFrontendHostStub();\n if ('getHostConfigForTesting' in globalThis) {\n InspectorFrontendHostInstance['getHostConfig'] =\n (globalThis as unknown as {\n getHostConfigForTesting: typeof InspectorFrontendHostInstance['getHostConfig'],\n }).getHostConfigForTesting;\n }\n } else {\n // Otherwise add stubs for missing methods that are declared in the interface.\n proto = InspectorFrontendHostStub.prototype;\n for (const name of Object.getOwnPropertyNames(proto)) {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n // @ts-expect-error\n const stub = proto[name];\n // @ts-ignore Global injected by devtools-compatibility.js\n if (typeof stub !== 'function' || InspectorFrontendHostInstance[name]) {\n continue;\n }\n\n console.error(`Incompatible embedder: method Host.InspectorFrontendHost.${name} is missing. Using stub instead.`);\n // @ts-ignore Global injected by devtools-compatibility.js\n InspectorFrontendHostInstance[name] = stub;\n }\n }\n\n // Attach the events object.\n InspectorFrontendHostInstance.events = new Common.ObjectWrapper.ObjectWrapper();\n}\n\n// FIXME: This file is included into both apps, since the devtools_app needs the InspectorFrontendHostAPI only,\n// so the host instance should not be initialized there.\ninitializeInspectorFrontendHost();\n// @ts-ignore Global injected by devtools-compatibility.js\nglobalThis.InspectorFrontendAPI = new InspectorFrontendAPIImpl();\n})();\n\nexport function isUnderTest(prefs?: {\n [x: string]: string,\n}): boolean {\n // Integration tests rely on test queryParam.\n if (Root.Runtime.Runtime.queryParam('test')) {\n return true;\n }\n // Browser tests rely on prefs.\n if (prefs) {\n return prefs['isUnderTest'] === 'true';\n }\n return Common.Settings.Settings.hasInstance() &&\n Common.Settings.Settings.instance().createSetting('isUnderTest', false).get();\n}\n"]} \ No newline at end of file +{"version":3,"file":"InspectorFrontendHost.js","sourceRoot":"","sources":["../../../../../../front_end/core/host/InspectorFrontendHost.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,oEAAoE;AACpE,sDAAsD;AAEtD,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OA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,EAAE,CAAC;gBACrD,oEAAoE;gBACpE,mBAAmB;gBACnB,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;gBACzB,0DAA0D;gBAC1D,IAAI,OAAO,IAAI,KAAK,UAAU,IAAI,6BAA6B,CAAC,IAAI,CAAC,EAAE,CAAC;oBACtE,SAAS;gBACX,CAAC;gBAED,OAAO,CAAC,KAAK,CAAC,4DAA4D,IAAI,kCAAkC,CAAC,CAAC;gBAClH,0DAA0D;gBAC1D,6BAA6B,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;YAC7C,CAAC;QACH,CAAC;QAED,4BAA4B;QAC5B,6BAA6B,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,aAAa,CAAC,aAAa,EAAE,CAAC;IAClF,CAAC;IAED,+GAA+G;IAC/G,wDAAwD;IACxD,+BAA+B,EAAE,CAAC;IAClC,0DAA0D;IAC1D,UAAU,CAAC,oBAAoB,GAAG,IAAI,wBAAwB,EAAE,CAAC;AACjE,CAAC,CAAC,EAAE,CAAC;AAEL,MAAM,UAAU,WAAW,CAAC,KAE3B;IACC,6CAA6C;IAC7C,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5C,OAAO,IAAI,CAAC;IACd,CAAC;IACD,+BAA+B;IAC/B,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,KAAK,CAAC,aAAa,CAAC,KAAK,MAAM,CAAC;IACzC,CAAC;IACD,OAAO,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE;QACzC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,aAAa,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC;AACpF,CAAC","sourcesContent":["/*\n * Copyright (C) 2009 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\n// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\nimport * as Common from '../common/common.js';\nimport * as i18n from '../i18n/i18n.js';\nimport * as Platform from '../platform/platform.js';\nimport * as Root from '../root/root.js';\n\nimport {\n type CanShowSurveyResult,\n type ChangeEvent,\n type ClickEvent,\n type ContextMenuDescriptor,\n type DoAidaConversationResult,\n type DragEvent,\n type EnumeratedHistogram,\n EventDescriptors,\n Events,\n type EventTypes,\n type ExtensionDescriptor,\n type HoverEvent,\n type ImpressionEvent,\n type InspectorFrontendHostAPI,\n type KeyDownEvent,\n type LoadNetworkResourceResult,\n type ResizeEvent,\n type ShowSurveyResult,\n type SyncInformation,\n} from './InspectorFrontendHostAPI.js';\nimport {streamWrite as resourceLoaderStreamWrite} from './ResourceLoader.js';\n\ninterface DecompressionStream extends GenericTransformStream {\n readonly format: string;\n}\ndeclare const DecompressionStream: {\n prototype: DecompressionStream,\n new (format: string): DecompressionStream,\n};\n\nconst UIStrings = {\n /**\n *@description Document title in Inspector Frontend Host of the DevTools window\n *@example {example.com} PH1\n */\n devtoolsS: 'DevTools - {PH1}',\n};\nconst str_ = i18n.i18n.registerUIStrings('core/host/InspectorFrontendHost.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nconst MAX_RECORDED_HISTOGRAMS_SIZE = 100;\nconst OVERRIDES_FILE_SYSTEM_PATH = '/overrides' as Platform.DevToolsPath.RawPathString;\n\n/**\n * The InspectorFrontendHostStub is a stub interface used the frontend is loaded like a webpage. Examples:\n * - devtools://devtools/bundled/devtools_app.html\n * - https://chrome-devtools-frontend.appspot.com/serve_rev/@030cc140435b0152645522b9864b75cac6c0a854/worker_app.html\n * - http://localhost:9222/devtools/inspector.html?ws=localhost:9222/devtools/page/xTARGET_IDx\n *\n * When the frontend runs within the native embedder, then the InspectorFrontendHostAPI methods are provided\n * by devtools_compatibility.js. Those leverage `DevToolsAPI.sendMessageToEmbedder()` which match up with\n * the embedder API defined here: https://source.chromium.org/search?q=f:devtools%20f:dispatcher%20f:cc%20symbol:CreateForDevToolsFrontend&sq=&ss=chromium%2Fchromium%2Fsrc\n * The native implementations live in devtools_ui_bindings.cc: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/devtools/devtools_ui_bindings.cc\n */\nexport class InspectorFrontendHostStub implements InspectorFrontendHostAPI {\n readonly #urlsBeingSaved: Map;\n events!: Common.EventTarget.EventTarget;\n #fileSystem: FileSystem|null = null;\n\n recordedCountHistograms:\n {histogramName: string, sample: number, min: number, exclusiveMax: number, bucketSize: number}[] = [];\n recordedEnumeratedHistograms: {actionName: EnumeratedHistogram, actionCode: number}[] = [];\n recordedPerformanceHistograms: {histogramName: string, duration: number}[] = [];\n\n constructor() {\n this.#urlsBeingSaved = new Map();\n\n // Guard against errors should this file ever be imported at the top level\n // within a worker - in which case this constructor is run. If there's no\n // document, we can early exit.\n if (typeof document === 'undefined') {\n return;\n }\n\n function stopEventPropagation(this: InspectorFrontendHostAPI, event: KeyboardEvent): void {\n // Let browser handle Ctrl+/Ctrl- shortcuts in hosted mode.\n const zoomModifier = this.platform() === 'mac' ? event.metaKey : event.ctrlKey;\n if (zoomModifier && (event.key === '+' || event.key === '-')) {\n event.stopPropagation();\n }\n }\n\n document.addEventListener('keydown', event => {\n stopEventPropagation.call(this, (event as KeyboardEvent));\n }, true);\n }\n\n platform(): string {\n const userAgent = navigator.userAgent;\n if (userAgent.includes('Windows NT')) {\n return 'windows';\n }\n if (userAgent.includes('Mac OS X')) {\n return 'mac';\n }\n return 'linux';\n }\n\n loadCompleted(): void {\n }\n\n bringToFront(): void {\n }\n\n closeWindow(): void {\n }\n\n setIsDocked(isDocked: boolean, callback: () => void): void {\n window.setTimeout(callback, 0);\n }\n\n showSurvey(trigger: string, callback: (arg0: ShowSurveyResult) => void): void {\n window.setTimeout(() => callback({surveyShown: false}), 0);\n }\n\n canShowSurvey(trigger: string, callback: (arg0: CanShowSurveyResult) => void): void {\n window.setTimeout(() => callback({canShowSurvey: false}), 0);\n }\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\n inspectElementCompleted(): void {\n }\n\n setInjectedScriptForOrigin(origin: string, script: string): void {\n }\n\n inspectedURLChanged(url: Platform.DevToolsPath.UrlString): void {\n document.title = i18nString(UIStrings.devtoolsS, {PH1: url.replace(/^https?:\\/\\//, '')});\n }\n\n copyText(text: string|null|undefined): void {\n if (text === undefined || text === null) {\n return;\n }\n void navigator.clipboard.writeText(text);\n }\n\n openInNewTab(url: Platform.DevToolsPath.UrlString): void {\n window.open(url, '_blank');\n }\n\n openSearchResultsInNewTab(query: string): void {\n Common.Console.Console.instance().error(\n 'Search is not enabled in hosted mode. Please inspect using chrome://inspect');\n }\n\n showItemInFolder(fileSystemPath: Platform.DevToolsPath.RawPathString): void {\n Common.Console.Console.instance().error(\n 'Show item in folder is not enabled in hosted mode. Please inspect using chrome://inspect');\n }\n\n save(\n url: Platform.DevToolsPath.RawPathString|Platform.DevToolsPath.UrlString, content: string, forceSaveAs: boolean,\n isBase64: boolean): void {\n let buffer = this.#urlsBeingSaved.get(url);\n if (!buffer) {\n buffer = [];\n this.#urlsBeingSaved.set(url, buffer);\n }\n buffer.push(content);\n this.events.dispatchEventToListeners(Events.SavedURL, {url, fileSystemPath: url});\n }\n\n append(url: Platform.DevToolsPath.RawPathString|Platform.DevToolsPath.UrlString, content: string): void {\n const buffer = this.#urlsBeingSaved.get(url);\n if (buffer) {\n buffer.push(content);\n this.events.dispatchEventToListeners(Events.AppendedToURL, url);\n }\n }\n\n close(url: Platform.DevToolsPath.RawPathString|Platform.DevToolsPath.UrlString): void {\n const buffer = this.#urlsBeingSaved.get(url) || [];\n this.#urlsBeingSaved.delete(url);\n let fileName = '';\n\n if (url) {\n try {\n const trimmed = Platform.StringUtilities.trimURL(url);\n fileName = Platform.StringUtilities.removeURLFragment(trimmed);\n } catch (error) {\n // If url is not a valid URL, it is probably a filename.\n fileName = url;\n }\n }\n\n const link = document.createElement('a');\n link.download = fileName;\n const blob = new Blob([buffer.join('')], {type: 'text/plain'});\n const blobUrl = URL.createObjectURL(blob);\n link.href = blobUrl;\n link.click();\n URL.revokeObjectURL(blobUrl);\n }\n\n sendMessageToBackend(message: string): void {\n }\n\n recordCountHistogram(histogramName: string, sample: number, min: number, exclusiveMax: number, bucketSize: number):\n void {\n if (this.recordedCountHistograms.length >= MAX_RECORDED_HISTOGRAMS_SIZE) {\n this.recordedCountHistograms.shift();\n }\n this.recordedCountHistograms.push({histogramName, sample, min, exclusiveMax, bucketSize});\n }\n\n recordEnumeratedHistogram(actionName: EnumeratedHistogram, actionCode: number, bucketSize: number): void {\n if (this.recordedEnumeratedHistograms.length >= MAX_RECORDED_HISTOGRAMS_SIZE) {\n this.recordedEnumeratedHistograms.shift();\n }\n this.recordedEnumeratedHistograms.push({actionName, actionCode});\n }\n\n recordPerformanceHistogram(histogramName: string, duration: number): void {\n if (this.recordedPerformanceHistograms.length >= MAX_RECORDED_HISTOGRAMS_SIZE) {\n this.recordedPerformanceHistograms.shift();\n }\n this.recordedPerformanceHistograms.push({histogramName, duration});\n }\n\n recordUserMetricsAction(umaName: string): void {\n }\n\n requestFileSystems(): void {\n this.events.dispatchEventToListeners(Events.FileSystemsLoaded, []);\n }\n\n addFileSystem(type?: string): void {\n const onFileSystem = (fs: FileSystem): void => {\n this.#fileSystem = fs;\n const fileSystem = {\n fileSystemName: 'sandboxedRequestedFileSystem',\n fileSystemPath: OVERRIDES_FILE_SYSTEM_PATH,\n rootURL: 'filesystem:devtools://devtools/isolated/',\n type: 'overrides',\n };\n this.events.dispatchEventToListeners(Events.FileSystemAdded, {fileSystem});\n };\n window.webkitRequestFileSystem(window.TEMPORARY, 1024 * 1024, onFileSystem);\n }\n\n removeFileSystem(fileSystemPath: Platform.DevToolsPath.RawPathString): void {\n const removalCallback = (entries: Entry[]): void => {\n entries.forEach(entry => {\n if (entry.isDirectory) {\n (entry as DirectoryEntry).removeRecursively(() => {});\n } else if (entry.isFile) {\n entry.remove(() => {});\n }\n });\n };\n\n if (this.#fileSystem) {\n this.#fileSystem.root.createReader().readEntries(removalCallback);\n }\n\n this.#fileSystem = null;\n this.events.dispatchEventToListeners(Events.FileSystemRemoved, OVERRIDES_FILE_SYSTEM_PATH);\n }\n\n isolatedFileSystem(fileSystemId: string, registeredName: string): FileSystem|null {\n return this.#fileSystem;\n }\n\n loadNetworkResource(\n url: string, headers: string, streamId: number, callback: (arg0: LoadNetworkResourceResult) => void): void {\n // Read the first 3 bytes looking for the gzip signature in the file header\n function isGzip(ab: ArrayBuffer): boolean {\n const buf = new Uint8Array(ab);\n if (!buf || buf.length < 3) {\n return false;\n }\n\n // https://www.rfc-editor.org/rfc/rfc1952#page-6\n return buf[0] === 0x1F && buf[1] === 0x8B && buf[2] === 0x08;\n }\n fetch(url)\n .then(async result => {\n const resultArrayBuf = await result.arrayBuffer();\n let decoded: ReadableStream|ArrayBuffer = resultArrayBuf;\n if (isGzip(resultArrayBuf)) {\n const ds = new DecompressionStream('gzip');\n const writer = ds.writable.getWriter();\n void writer.write(resultArrayBuf);\n void writer.close();\n decoded = ds.readable;\n }\n const text = await new Response(decoded).text();\n return text;\n })\n .then(function(text) {\n resourceLoaderStreamWrite(streamId, text);\n callback({\n statusCode: 200,\n headers: undefined,\n messageOverride: undefined,\n netError: undefined,\n netErrorName: undefined,\n urlValid: undefined,\n });\n })\n .catch(function() {\n callback({\n statusCode: 404,\n headers: undefined,\n messageOverride: undefined,\n netError: undefined,\n netErrorName: undefined,\n urlValid: undefined,\n });\n });\n }\n\n registerPreference(name: string, options: {synced?: boolean}): void {\n }\n\n getPreferences(callback: (arg0: {\n [x: string]: string,\n }) => void): void {\n const prefs: {\n [x: string]: string,\n } = {};\n for (const name in window.localStorage) {\n prefs[name] = window.localStorage[name];\n }\n callback(prefs);\n }\n\n getPreference(name: string, callback: (arg0: string) => void): void {\n callback(window.localStorage[name]);\n }\n\n setPreference(name: string, value: string): void {\n window.localStorage[name] = value;\n }\n\n removePreference(name: string): void {\n delete window.localStorage[name];\n }\n\n clearPreferences(): void {\n window.localStorage.clear();\n }\n\n getSyncInformation(callback: (arg0: SyncInformation) => void): void {\n callback({\n isSyncActive: false,\n arePreferencesSynced: false,\n });\n }\n\n getHostConfig(callback: (arg0: Root.Runtime.HostConfig) => void): void {\n callback({\n devToolsConsoleInsights: {\n aidaModelId: '',\n aidaTemperature: 0,\n blocked: true,\n blockedByAge: false,\n blockedByEnterprisePolicy: false,\n blockedByFeatureFlag: true,\n blockedByGeo: false,\n blockedByRollout: false,\n disallowLogging: false,\n enabled: false,\n optIn: false,\n },\n devToolsFreestylerDogfood: {\n aidaModelId: '',\n aidaTemperature: 0,\n enabled: false,\n },\n });\n }\n\n upgradeDraggedFileSystemPermissions(fileSystem: FileSystem): void {\n }\n\n indexPath(requestId: number, fileSystemPath: Platform.DevToolsPath.RawPathString, excludedFolders: string): void {\n }\n\n stopIndexing(requestId: number): void {\n }\n\n searchInPath(requestId: number, fileSystemPath: Platform.DevToolsPath.RawPathString, query: string): void {\n }\n\n zoomFactor(): number {\n return 1;\n }\n\n zoomIn(): void {\n }\n\n zoomOut(): void {\n }\n\n resetZoom(): void {\n }\n\n setWhitelistedShortcuts(shortcuts: string): void {\n }\n\n setEyeDropperActive(active: boolean): void {\n }\n\n showCertificateViewer(certChain: string[]): void {\n }\n\n reattach(callback: () => void): void {\n }\n\n readyForTest(): void {\n }\n\n connectionReady(): void {\n }\n\n setOpenNewWindowForPopups(value: boolean): void {\n }\n\n setDevicesDiscoveryConfig(config: Adb.Config): void {\n }\n\n setDevicesUpdatesEnabled(enabled: boolean): void {\n }\n\n performActionOnRemotePage(pageId: string, action: string): void {\n }\n\n openRemotePage(browserId: string, url: string): void {\n }\n\n openNodeFrontend(): void {\n }\n\n showContextMenuAtPoint(x: number, y: number, items: ContextMenuDescriptor[], document: Document): void {\n throw 'Soft context menu should be used';\n }\n\n isHostedMode(): boolean {\n return true;\n }\n\n setAddExtensionCallback(callback: (arg0: ExtensionDescriptor) => void): void {\n // Extensions are not supported in hosted mode.\n }\n\n async initialTargetId(): Promise {\n return null;\n }\n\n doAidaConversation(request: string, streamId: number, callback: (result: DoAidaConversationResult) => void): void {\n callback({\n error: 'Not implemened',\n });\n }\n\n registerAidaClientEvent(request: string): void {\n }\n\n recordImpression(event: ImpressionEvent): void {\n }\n recordResize(event: ResizeEvent): void {\n }\n recordClick(event: ClickEvent): void {\n }\n recordHover(event: HoverEvent): void {\n }\n recordDrag(event: DragEvent): void {\n }\n recordChange(event: ChangeEvent): void {\n }\n recordKeyDown(event: KeyDownEvent): void {\n }\n}\n\n// @ts-ignore Global injected by devtools-compatibility.js\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport let InspectorFrontendHostInstance: InspectorFrontendHostStub = globalThis.InspectorFrontendHost;\n\nclass InspectorFrontendAPIImpl {\n constructor() {\n for (const descriptor of EventDescriptors) {\n // @ts-ignore Dispatcher magic\n this[descriptor[1]] = this.dispatch.bind(this, descriptor[0], descriptor[2], descriptor[3]);\n }\n }\n\n private dispatch(name: symbol, signature: string[], runOnceLoaded: boolean, ...params: string[]): void {\n // Single argument methods get dispatched with the param.\n if (signature.length < 2) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n InspectorFrontendHostInstance.events.dispatchEventToListeners(name, params[0]);\n } catch (error) {\n console.error(error + ' ' + error.stack);\n }\n return;\n }\n const data: {\n [x: string]: string,\n } = {};\n for (let i = 0; i < signature.length; ++i) {\n data[signature[i]] = params[i];\n }\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n InspectorFrontendHostInstance.events.dispatchEventToListeners(name, data);\n } catch (error) {\n console.error(error + ' ' + error.stack);\n }\n }\n\n streamWrite(id: number, chunk: string): void {\n resourceLoaderStreamWrite(id, chunk);\n }\n}\n\n(function(): void {\n\nfunction initializeInspectorFrontendHost(): void {\n let proto;\n if (!InspectorFrontendHostInstance) {\n // Instantiate stub for web-hosted mode if necessary.\n // @ts-ignore Global injected by devtools-compatibility.js\n globalThis.InspectorFrontendHost = InspectorFrontendHostInstance = new InspectorFrontendHostStub();\n if ('getHostConfigForTesting' in globalThis) {\n InspectorFrontendHostInstance['getHostConfig'] =\n (globalThis as unknown as {\n getHostConfigForTesting: typeof InspectorFrontendHostInstance['getHostConfig'],\n }).getHostConfigForTesting;\n }\n } else {\n // Otherwise add stubs for missing methods that are declared in the interface.\n proto = InspectorFrontendHostStub.prototype;\n for (const name of Object.getOwnPropertyNames(proto)) {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)\n // @ts-expect-error\n const stub = proto[name];\n // @ts-ignore Global injected by devtools-compatibility.js\n if (typeof stub !== 'function' || InspectorFrontendHostInstance[name]) {\n continue;\n }\n\n console.error(`Incompatible embedder: method Host.InspectorFrontendHost.${name} is missing. Using stub instead.`);\n // @ts-ignore Global injected by devtools-compatibility.js\n InspectorFrontendHostInstance[name] = stub;\n }\n }\n\n // Attach the events object.\n InspectorFrontendHostInstance.events = new Common.ObjectWrapper.ObjectWrapper();\n}\n\n// FIXME: This file is included into both apps, since the devtools_app needs the InspectorFrontendHostAPI only,\n// so the host instance should not be initialized there.\ninitializeInspectorFrontendHost();\n// @ts-ignore Global injected by devtools-compatibility.js\nglobalThis.InspectorFrontendAPI = new InspectorFrontendAPIImpl();\n})();\n\nexport function isUnderTest(prefs?: {\n [x: string]: string,\n}): boolean {\n // Integration tests rely on test queryParam.\n if (Root.Runtime.Runtime.queryParam('test')) {\n return true;\n }\n // Browser tests rely on prefs.\n if (prefs) {\n return prefs['isUnderTest'] === 'true';\n }\n return Common.Settings.Settings.hasInstance() &&\n Common.Settings.Settings.instance().createSetting('isUnderTest', false).get();\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 e18e666f7..04b3ec6da 100644 --- a/public/core/host/InspectorFrontendHostAPI.d.ts +++ b/public/core/host/InspectorFrontendHostAPI.d.ts @@ -304,7 +304,6 @@ export interface SyncInformation { */ export declare const enum EnumeratedHistogram { ActionTaken = "DevTools.ActionTaken", - BreakpointEditDialogRevealedFrom = "DevTools.BreakpointEditDialogRevealedFrom", PanelShown = "DevTools.PanelShown", PanelShownInLocation = "DevTools.PanelShownInLocation", SidebarPaneShown = "DevTools.SidebarPaneShown", diff --git a/public/core/host/InspectorFrontendHostAPI.js.map b/public/core/host/InspectorFrontendHostAPI.js.map index ce9f32c40..c95f5b7cf 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;AAK7B,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,kBAA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AAC,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';\nimport type * as Root from '../root/root.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, isBase64: 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 getHostConfig(callback: (arg0: Root.Runtime.HostConfig) => 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 shortcut?: string;\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 BreakpointEditDialogRevealedFrom = 'DevTools.BreakpointEditDialogRevealedFrom',\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 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 SwatchActivated = 'DevTools.SwatchActivated',\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;AAK7B,MAAM,CAAN,IAAY,MA8BX;AA9BD,WAAY,MAAM;IAChB,yCAA+B,CAAA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B,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';\nimport type * as Root from '../root/root.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, isBase64: 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 getHostConfig(callback: (arg0: Root.Runtime.HostConfig) => 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 shortcut?: string;\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 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 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 SwatchActivated = 'DevTools.SwatchActivated',\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 a70ceb4c4..fb16ba66f 100644 --- a/public/core/host/UserMetrics.d.ts +++ b/public/core/host/UserMetrics.d.ts @@ -1,7 +1,6 @@ export declare class UserMetrics { #private; constructor(); - breakpointEditDialogRevealedFrom(breakpointEditDialogRevealedFrom: BreakpointEditDialogRevealedFrom): void; panelShown(panelName: string, isLaunching?: boolean): void; panelShownInLocation(panelName: string, location: 'main' | 'drawer'): void; sourcesSidebarTabShown(sidebarPaneName: string): void; @@ -208,7 +207,9 @@ export declare enum Action { AnimationGroupSelected = 142, ScrollDrivenAnimationGroupSelected = 143, ScrollDrivenAnimationGroupScrubbed = 144, - MaxValue = 145 + FreestylerOpenedFromElementsPanel = 145, + FreestylerOpenedFromStylesTab = 146, + MaxValue = 147 } export declare enum PanelCodes { elements = 1, @@ -648,16 +649,6 @@ export declare enum DevtoolsExperiments { 'timeline-observations' = 96, 'MaxValue' = 97 } -export declare const enum BreakpointEditDialogRevealedFrom { - BreakpointSidebarContextMenu = 0, - BreakpointSidebarEditButton = 1, - BreakpointMarkerContextMenu = 2, - LineGutterContextMenu = 3, - KeyboardShortcut = 4, - Linkifier = 5, - MouseClick = 6, - MaxValue = 7 -} export declare const enum ColorConvertedFrom { ColorSwatch = 0, ColorPicker = 1, diff --git a/public/core/host/UserMetrics.js b/public/core/host/UserMetrics.js index 053750d0a..fafa0bae7 100644 --- a/public/core/host/UserMetrics.js +++ b/public/core/host/UserMetrics.js @@ -37,12 +37,6 @@ export class UserMetrics { this.#firedLaunchHistogram = false; this.#launchPanelName = ''; } - breakpointEditDialogRevealedFrom(breakpointEditDialogRevealedFrom) { - if (breakpointEditDialogRevealedFrom >= 7 /* BreakpointEditDialogRevealedFrom.MaxValue */) { - return; - } - InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.BreakpointEditDialogRevealedFrom" /* EnumeratedHistogram.BreakpointEditDialogRevealedFrom */, breakpointEditDialogRevealedFrom, 7 /* BreakpointEditDialogRevealedFrom.MaxValue */); - } panelShown(panelName, isLaunching) { const code = PanelCodes[panelName] || 0; InspectorFrontendHostInstance.recordEnumeratedHistogram("DevTools.PanelShown" /* EnumeratedHistogram.PanelShown */, code, PanelCodes.MaxValue); @@ -455,7 +449,9 @@ export var Action; Action[Action["AnimationGroupSelected"] = 142] = "AnimationGroupSelected"; Action[Action["ScrollDrivenAnimationGroupSelected"] = 143] = "ScrollDrivenAnimationGroupSelected"; Action[Action["ScrollDrivenAnimationGroupScrubbed"] = 144] = "ScrollDrivenAnimationGroupScrubbed"; - Action[Action["MaxValue"] = 145] = "MaxValue"; + Action[Action["FreestylerOpenedFromElementsPanel"] = 145] = "FreestylerOpenedFromElementsPanel"; + Action[Action["FreestylerOpenedFromStylesTab"] = 146] = "FreestylerOpenedFromStylesTab"; + Action[Action["MaxValue"] = 147] = "MaxValue"; })(Action || (Action = {})); /* eslint-disable @typescript-eslint/naming-convention */ export var PanelCodes; @@ -740,7 +736,6 @@ export var KeybindSetSettings; KeybindSetSettings[KeybindSetSettings["MaxValue"] = 2] = "MaxValue"; })(KeybindSetSettings || (KeybindSetSettings = {})); /* eslint-enable @typescript-eslint/naming-convention */ -/* eslint-disable @typescript-eslint/naming-convention */ export var KeyboardShortcutAction; (function (KeyboardShortcutAction) { KeyboardShortcutAction[KeyboardShortcutAction["OtherShortcut"] = 0] = "OtherShortcut"; diff --git a/public/core/host/UserMetrics.js.map b/public/core/host/UserMetrics.js.map index de2065743..83158eab6 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,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,gCAAgC,CAAC,gCAAkE;QACjG,IAAI,gCAAgC,qDAA6C,EAAE,CAAC;YAClF,OAAO;QACT,CAAC;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,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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,oCAAS,CAAA;IACT,oCAAS,CAAA;IACT,oCAAS,CAAA;IACT,oCAAS,CAAA;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 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 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 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 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 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 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 AnimationGroupSelected = 142,\n ScrollDrivenAnimationGroupSelected = 143,\n ScrollDrivenAnimationGroupScrubbed = 144,\n MaxValue = 145,\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 '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 'contrast-issues' = 44,\n 'experimental-cookie-features' = 45,\n 'styles-pane-css-changes' = 55,\n 'instrumentation-breakpoints' = 61,\n 'authored-deployed-grouping' = 63,\n 'important-dom-properties' = 64,\n 'just-my-code' = 65,\n 'preloading-status-panel' = 68,\n 'outermost-target-selector' = 71,\n 'highlight-errors-elements-panel' = 73,\n 'use-source-map-scopes' = 76,\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 'timeline-show-postmessage-events' = 86,\n 'timeline-extensions' = 89,\n 'timeline-enhanced-traces' = 90,\n 'timeline-compiled-sources' = 91,\n 'timeline-debug-mode' = 93,\n 'perf-panel-annotations' = 94,\n 'timeline-rpp-sidebar' = 95,\n 'timeline-observations' = 96,\n\n // Increment this when new experiments are added.\n 'MaxValue' = 97,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\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\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 Document = 1,\n JavaScript = 2,\n 'Fetch and XHR' = 3,\n CSS = 4,\n Font = 5,\n Image = 6,\n Media = 7,\n Manifest = 8,\n WebSocket = 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\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 PositionTryLink = 10,\n MaxValue = 11,\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,wB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AA;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 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 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 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 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 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 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 AnimationGroupSelected = 142,\n ScrollDrivenAnimationGroupSelected = 143,\n ScrollDrivenAnimationGroupScrubbed = 144,\n FreestylerOpenedFromElementsPanel = 145,\n FreestylerOpenedFromStylesTab = 146,\n MaxValue = 147,\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 '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\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 'contrast-issues' = 44,\n 'experimental-cookie-features' = 45,\n 'styles-pane-css-changes' = 55,\n 'instrumentation-breakpoints' = 61,\n 'authored-deployed-grouping' = 63,\n 'important-dom-properties' = 64,\n 'just-my-code' = 65,\n 'preloading-status-panel' = 68,\n 'outermost-target-selector' = 71,\n 'highlight-errors-elements-panel' = 73,\n 'use-source-map-scopes' = 76,\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 'timeline-show-postmessage-events' = 86,\n 'timeline-extensions' = 89,\n 'timeline-enhanced-traces' = 90,\n 'timeline-compiled-sources' = 91,\n 'timeline-debug-mode' = 93,\n 'perf-panel-annotations' = 94,\n 'timeline-rpp-sidebar' = 95,\n 'timeline-observations' = 96,\n\n // Increment this when new experiments are added.\n 'MaxValue' = 97,\n}\n/* eslint-enable @typescript-eslint/naming-convention */\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\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 Document = 1,\n JavaScript = 2,\n 'Fetch and XHR' = 3,\n CSS = 4,\n Font = 5,\n Image = 6,\n Media = 7,\n Manifest = 8,\n WebSocket = 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\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 PositionTryLink = 10,\n MaxValue = 11,\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 52662ad77..41be768b4 100644 --- a/public/core/host/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/core/host/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../front_end/core/host/host.ts", "../../../../../../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" ], "references": [ diff --git a/public/core/host/host-tsconfig.json b/public/core/host/host-tsconfig.json index df47ab71b..ae59ea412 100644 --- a/public/core/host/host-tsconfig.json +++ b/public/core/host/host-tsconfig.json @@ -37,7 +37,6 @@ "../../../../../../front_end/core/host/UserMetrics.ts", "../../../../../../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" ], "references": [ diff --git a/public/core/host/unittests-tsconfig.json b/public/core/host/unittests-tsconfig.json index cf7651deb..a4475fcb5 100644 --- a/public/core/host/unittests-tsconfig.json +++ b/public/core/host/unittests-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../front_end/core/host/AidaClient.test.ts", "../../../../../../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" ], "references": [ diff --git a/public/core/i18n/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/core/i18n/devtools_entrypoint-bundle-typescript-tsconfig.json index eab9fecf7..6f3e61428 100644 --- a/public/core/i18n/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/core/i18n/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../front_end/core/i18n/i18n.ts", "../../../../../../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" ], "references": [ diff --git a/public/core/i18n/i18n-tsconfig.json b/public/core/i18n/i18n-tsconfig.json index d5c976174..52a6616e1 100644 --- a/public/core/i18n/i18n-tsconfig.json +++ b/public/core/i18n/i18n-tsconfig.json @@ -35,7 +35,6 @@ "../../../../../../front_end/core/i18n/time-utilities.ts", "../../../../../../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" ], "references": [ diff --git a/public/core/i18n/locales/en-US.json b/public/core/i18n/locales/en-US.json index 30347db5f..213db782d 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 | developerResourcesPanel":{"message":"Developer Resources panel"},"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 | fast4G":{"message":"Fast 4G"},"core/sdk/NetworkManager.ts | fastG":{"message":"Slow 4G"},"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":"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 | exemptionReasonScheme":{"message":"This cookie is allowed by the top-level url scheme"},"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. Learn more: goo.gle/ps-dt."},"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/dt-grace."},"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 | GetInnerHTML":{"message":"The getInnerHTML() function is deprecated, and will be removed from this browser very soon. Please use getHTML() instead."},"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 | 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 | consoleTpcdErrorMessage":{"message":"Third-party cookie is blocked in Chrome as part of Privacy Sandbox."},"models/issues_manager/CookieIssue.ts | consoleTpcdWarningMessage":{"message":"Third-party cookie will be blocked in future Chrome versions as part of Privacy Sandbox."},"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/issues_manager/SharedDictionaryIssue.ts | compressionDictionaryTransport":{"message":"Compression Dictionary Transport"},"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/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 | saveWasmFailed":{"message":"Unable to save WASM module to disk. Most likely the module is too large."},"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/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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | filterByKey":{"message":"Filter by key (show keys greater or equal to)"},"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 | 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 | prerenderFinalStatusAllPrerenderingCanceled":{"message":"All prerendered pages were unloaded by the browser for some reason (For example, WebViewCompat.addWebMessageListener() was called during prerendering.)"},"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 | prerenderFinalStatusJavaScriptInterfaceAdded":{"message":"The prerendered page was unloaded because a new JavaScript interface has been injected by WebView.addJavascriptInterface()."},"panels/application/preloading/components/PreloadingString.ts | prerenderFinalStatusJavaScriptInterfaceRemoved":{"message":"The prerendered page was unloaded because a JavaScript interface has been removed by WebView.removeJavascriptInterface()."},"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\\`\\`\\`\n\nLinks: [https://example.com](https://example.com)\nImages: ![https://example.com](https://example.com)\n`,\n metadata: {},\n };\n },\n },\n {\n isSyncActive: true,\n accountEmail: 'some-email',\n });\ndocument.getElementById('container')?.appendChild(component);\n"]} \ No newline at end of file +{"version":3,"file":"static.js","sourceRoot":"","sources":["../../../../../../../../front_end/ui/components/docs/console_insight/static.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,+BAA+B,CAAC;AACtD,OAAO,KAAK,OAAO,MAAM,uCAAuC,CAAC;AACjE,OAAO,KAAK,eAAe,MAAM,2CAA2C,CAAC;AAC7E,OAAO,KAAK,gBAAgB,MAAM,0BAA0B,CAAC;AAE7D,MAAM,gBAAgB,CAAC,oBAAoB,CAAC,KAAK,EAAE,CAAC;AACpD,MAAM,eAAe,CAAC,oBAAoB,EAAE,CAAC;AAE7C,MAAM,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;AAE9C,MAAM,SAAS,GAAG,IAAI,cAAc,CAChC;IACE,cAAc;QACZ,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,KAAK,CAAC,WAAW;QACf,OAAO;YACL,MAAM,EAAE,EAAE;YACV,uBAAuB,EAAE,KAAK;YAC9B,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO;oBAChC,KAAK,EAAE,8CAA8C;iBACtD;gBACD;oBACE,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,UAAU;oBACnC,KAAK,EAAE,qCAAqC;iBAC7C;gBACD;oBACE,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,YAAY;oBACrC,KAAK,EAAE,aAAa;iBACrB;gBACD;oBACE,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,eAAe;oBACxC,KAAK,EAAE;;;;;;;qBAOA;iBACR;aACF;SACF,CAAC;IACJ,CAAC;CACF,EACD;IACE,KAAK,CAAC,CACF,KAAK;QACH,MAAM;YACJ,WAAW,EAAE;;;;;;;;;;;;;;;;;;CAkB1B;YACa,QAAQ,EAAE,EAAE;SACb,CAAC;IACJ,CAAC;CACN,EACD,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;AAChD,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,SAAS,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 '../../../../core/host/host.js';\nimport * as Explain from '../../../../panels/explain/explain.js';\nimport * as FrontendHelpers from '../../../../testing/EnvironmentHelpers.js';\nimport * as ComponentHelpers from '../../helpers/helpers.js';\n\nawait ComponentHelpers.ComponentServerSetup.setup();\nawait FrontendHelpers.initializeGlobalVars();\n\nconst ConsoleInsight = Explain.ConsoleInsight;\n\nconst component = new ConsoleInsight(\n {\n getSearchQuery() {\n return '';\n },\n async buildPrompt() {\n return {\n prompt: '',\n isPageReloadRecommended: false,\n sources: [\n {\n type: Explain.SourceType.MESSAGE,\n value: 'Something went wrong\\n\\nSomething went wrong',\n },\n {\n type: Explain.SourceType.STACKTRACE,\n value: 'Stacktrace line1\\nStacketrace line2',\n },\n {\n type: Explain.SourceType.RELATED_CODE,\n value: 'RelatedCode',\n },\n {\n type: Explain.SourceType.NETWORK_REQUEST,\n value: `Request: https://example.com/data.html\n\nRequest headers:\n:authority: example.com\nuser-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36\n\nResponse headers:\nResponse status: 404`,\n },\n ],\n };\n },\n },\n {\n async *\n fetch() {\n yield {\n explanation: `## Result\n\nSome text with \\`code\\`. Some code:\n\\`\\`\\`ts\nconsole.log('test');\ndocument.querySelector('test').style = 'black';\n\\`\\`\\`\n\n\\`\\`\\`\n\n
Hello world
\n\n\\`\\`\\`\n\nLinks: [https://example.com](https://example.com)\nImages: ![https://example.com](https://example.com)\n`,\n metadata: {},\n };\n },\n },\n Host.AidaClient.AidaAvailability.AVAILABLE);\ndocument.getElementById('container')?.appendChild(component);\n"]} \ No newline at end of file diff --git a/public/ui/components/docs/console_insight/ts-tsconfig.json b/public/ui/components/docs/console_insight/ts-tsconfig.json index 706a913ec..1add9ab75 100644 --- a/public/ui/components/docs/console_insight/ts-tsconfig.json +++ b/public/ui/components/docs/console_insight/ts-tsconfig.json @@ -43,10 +43,12 @@ "../../../../../../../../front_end/ui/components/docs/console_insight/static.ts", "../../../../../../../../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" ], "references": [ + { + "path": "../../../../core/host/bundle-tsconfig.json" + }, { "path": "../../../../panels/explain/bundle-tsconfig.json" }, diff --git a/public/ui/components/docs/css_overview/ts-tsconfig.json b/public/ui/components/docs/css_overview/ts-tsconfig.json index e74dddda0..f4250628e 100644 --- a/public/ui/components/docs/css_overview/ts-tsconfig.json +++ b/public/ui/components/docs/css_overview/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/css_overview/start_view.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/data_grid/ts-tsconfig.json b/public/ui/components/docs/data_grid/ts-tsconfig.json index 4ffabab91..d59b9438a 100644 --- a/public/ui/components/docs/data_grid/ts-tsconfig.json +++ b/public/ui/components/docs/data_grid/ts-tsconfig.json @@ -46,7 +46,6 @@ "../../../../../../../../front_end/ui/components/docs/data_grid/three_columns.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/data_grid_controller/ts-tsconfig.json b/public/ui/components/docs/data_grid_controller/ts-tsconfig.json index 423edfa87..88449358c 100644 --- a/public/ui/components/docs/data_grid_controller/ts-tsconfig.json +++ b/public/ui/components/docs/data_grid_controller/ts-tsconfig.json @@ -42,7 +42,6 @@ "../../../../../../../../front_end/ui/components/docs/data_grid_controller/filter.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/dialog/ts-tsconfig.json b/public/ui/components/docs/dialog/ts-tsconfig.json index 46f7b9b5d..36989f754 100644 --- a/public/ui/components/docs/dialog/ts-tsconfig.json +++ b/public/ui/components/docs/dialog/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/dialog/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/elements_breadcrumbs/ts-tsconfig.json b/public/ui/components/docs/elements_breadcrumbs/ts-tsconfig.json index 4c84b0ca7..51f14a73d 100644 --- a/public/ui/components/docs/elements_breadcrumbs/ts-tsconfig.json +++ b/public/ui/components/docs/elements_breadcrumbs/ts-tsconfig.json @@ -43,7 +43,6 @@ "../../../../../../../../front_end/ui/components/docs/elements_breadcrumbs/scroll.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/expandable_list/ts-tsconfig.json b/public/ui/components/docs/expandable_list/ts-tsconfig.json index 2968968ac..44062f0b6 100644 --- a/public/ui/components/docs/expandable_list/ts-tsconfig.json +++ b/public/ui/components/docs/expandable_list/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/expandable_list/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/icon_button/ts-tsconfig.json b/public/ui/components/docs/icon_button/ts-tsconfig.json index 5e42dd902..f53b7b120 100644 --- a/public/ui/components/docs/icon_button/ts-tsconfig.json +++ b/public/ui/components/docs/icon_button/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/icon_button/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/icon_component/ts-tsconfig.json b/public/ui/components/docs/icon_component/ts-tsconfig.json index 6e6e67837..9fea2c8fe 100644 --- a/public/ui/components/docs/icon_component/ts-tsconfig.json +++ b/public/ui/components/docs/icon_component/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/icon_component/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/icon_dialog/ts-tsconfig.json b/public/ui/components/docs/icon_dialog/ts-tsconfig.json index 1aa17bc36..34bd5d799 100644 --- a/public/ui/components/docs/icon_dialog/ts-tsconfig.json +++ b/public/ui/components/docs/icon_dialog/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/icon_dialog/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/input/ts-tsconfig.json b/public/ui/components/docs/input/ts-tsconfig.json index 06b0f729c..7d61b041d 100644 --- a/public/ui/components/docs/input/ts-tsconfig.json +++ b/public/ui/components/docs/input/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/input/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/issue_counter/ts-tsconfig.json b/public/ui/components/docs/issue_counter/ts-tsconfig.json index 6defa18e1..154f54785 100644 --- a/public/ui/components/docs/issue_counter/ts-tsconfig.json +++ b/public/ui/components/docs/issue_counter/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/issue_counter/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/issue_link_icon/ts-tsconfig.json b/public/ui/components/docs/issue_link_icon/ts-tsconfig.json index a5bcec1e3..1be164269 100644 --- a/public/ui/components/docs/issue_link_icon/ts-tsconfig.json +++ b/public/ui/components/docs/issue_link_icon/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/issue_link_icon/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/legacy_color_invert/ts-tsconfig.json b/public/ui/components/docs/legacy_color_invert/ts-tsconfig.json index 3a4319084..d10a57727 100644 --- a/public/ui/components/docs/legacy_color_invert/ts-tsconfig.json +++ b/public/ui/components/docs/legacy_color_invert/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/legacy_color_invert/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/linear_memory_inspector/ts-tsconfig.json b/public/ui/components/docs/linear_memory_inspector/ts-tsconfig.json index da80dba7e..be4ef797e 100644 --- a/public/ui/components/docs/linear_memory_inspector/ts-tsconfig.json +++ b/public/ui/components/docs/linear_memory_inspector/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/linear_memory_inspector/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/linkifier/ts-tsconfig.json b/public/ui/components/docs/linkifier/ts-tsconfig.json index c29c30c0d..51565b6a6 100644 --- a/public/ui/components/docs/linkifier/ts-tsconfig.json +++ b/public/ui/components/docs/linkifier/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/linkifier/simple-url.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/markdown_image/ts-tsconfig.json b/public/ui/components/docs/markdown_image/ts-tsconfig.json index 678bb745b..90920ad7b 100644 --- a/public/ui/components/docs/markdown_image/ts-tsconfig.json +++ b/public/ui/components/docs/markdown_image/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/markdown_image/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/markdown_link/ts-tsconfig.json b/public/ui/components/docs/markdown_link/ts-tsconfig.json index 883591fd1..499796caa 100644 --- a/public/ui/components/docs/markdown_link/ts-tsconfig.json +++ b/public/ui/components/docs/markdown_link/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/markdown_link/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/markdown_view/ts-tsconfig.json b/public/ui/components/docs/markdown_view/ts-tsconfig.json index db8a6682f..211aebc5c 100644 --- a/public/ui/components/docs/markdown_view/ts-tsconfig.json +++ b/public/ui/components/docs/markdown_view/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/markdown_view/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/panel_feedback/ts-tsconfig.json b/public/ui/components/docs/panel_feedback/ts-tsconfig.json index 00a5872d0..2b3ba7bb3 100644 --- a/public/ui/components/docs/panel_feedback/ts-tsconfig.json +++ b/public/ui/components/docs/panel_feedback/ts-tsconfig.json @@ -41,7 +41,6 @@ "../../../../../../../../front_end/ui/components/docs/panel_feedback/button.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/panel_introduction_steps/ts-tsconfig.json b/public/ui/components/docs/panel_introduction_steps/ts-tsconfig.json index b3ddbfd9b..05dc7ca5b 100644 --- a/public/ui/components/docs/panel_introduction_steps/ts-tsconfig.json +++ b/public/ui/components/docs/panel_introduction_steps/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/panel_introduction_steps/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/perf_piechart/ts-tsconfig.json b/public/ui/components/docs/perf_piechart/ts-tsconfig.json index a3a62107e..274afe218 100644 --- a/public/ui/components/docs/perf_piechart/ts-tsconfig.json +++ b/public/ui/components/docs/perf_piechart/ts-tsconfig.json @@ -41,7 +41,6 @@ "../../../../../../../../front_end/ui/components/docs/perf_piechart/basic-without-legend.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/performance_panel/ts-tsconfig.json b/public/ui/components/docs/performance_panel/ts-tsconfig.json index 26bd4e4f9..3614a4269 100644 --- a/public/ui/components/docs/performance_panel/ts-tsconfig.json +++ b/public/ui/components/docs/performance_panel/ts-tsconfig.json @@ -44,7 +44,6 @@ "../../../../../../../../front_end/ui/components/docs/performance_panel/track_example.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/recorder_control_button/ts-tsconfig.json b/public/ui/components/docs/recorder_control_button/ts-tsconfig.json index 76f83f529..d579c5032 100644 --- a/public/ui/components/docs/recorder_control_button/ts-tsconfig.json +++ b/public/ui/components/docs/recorder_control_button/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/recorder_control_button/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/recorder_create_recording_view/ts-tsconfig.json b/public/ui/components/docs/recorder_create_recording_view/ts-tsconfig.json index 02f17ecc7..516ca2457 100644 --- a/public/ui/components/docs/recorder_create_recording_view/ts-tsconfig.json +++ b/public/ui/components/docs/recorder_create_recording_view/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/recorder_create_recording_view/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/recorder_injected/ts-tsconfig.json b/public/ui/components/docs/recorder_injected/ts-tsconfig.json index f5c1e4673..402ddfad7 100644 --- a/public/ui/components/docs/recorder_injected/ts-tsconfig.json +++ b/public/ui/components/docs/recorder_injected/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/recorder_injected/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/recorder_recording_list_view/ts-tsconfig.json b/public/ui/components/docs/recorder_recording_list_view/ts-tsconfig.json index 9a4f9201c..dd0c21bb0 100644 --- a/public/ui/components/docs/recorder_recording_list_view/ts-tsconfig.json +++ b/public/ui/components/docs/recorder_recording_list_view/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/recorder_recording_list_view/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/recorder_recording_view/ts-tsconfig.json b/public/ui/components/docs/recorder_recording_view/ts-tsconfig.json index 607b2766b..9f2299593 100644 --- a/public/ui/components/docs/recorder_recording_view/ts-tsconfig.json +++ b/public/ui/components/docs/recorder_recording_view/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/recorder_recording_view/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/recorder_select_button/ts-tsconfig.json b/public/ui/components/docs/recorder_select_button/ts-tsconfig.json index 4853f5cc2..2878d28cd 100644 --- a/public/ui/components/docs/recorder_select_button/ts-tsconfig.json +++ b/public/ui/components/docs/recorder_select_button/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/recorder_select_button/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/recorder_split_view/ts-tsconfig.json b/public/ui/components/docs/recorder_split_view/ts-tsconfig.json index eb62df8f1..5e532fd46 100644 --- a/public/ui/components/docs/recorder_split_view/ts-tsconfig.json +++ b/public/ui/components/docs/recorder_split_view/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/recorder_split_view/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/recorder_start_view/ts-tsconfig.json b/public/ui/components/docs/recorder_start_view/ts-tsconfig.json index b9c9c4c7c..770fcc6b7 100644 --- a/public/ui/components/docs/recorder_start_view/ts-tsconfig.json +++ b/public/ui/components/docs/recorder_start_view/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/recorder_start_view/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/report/ts-tsconfig.json b/public/ui/components/docs/report/ts-tsconfig.json index 23a0bdefa..1626c1337 100644 --- a/public/ui/components/docs/report/ts-tsconfig.json +++ b/public/ui/components/docs/report/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/report/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/request_link_icon/ts-tsconfig.json b/public/ui/components/docs/request_link_icon/ts-tsconfig.json index 8c0be77ef..6728e8bf8 100644 --- a/public/ui/components/docs/request_link_icon/ts-tsconfig.json +++ b/public/ui/components/docs/request_link_icon/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/request_link_icon/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/select_menu/ts-tsconfig.json b/public/ui/components/docs/select_menu/ts-tsconfig.json index be5059cac..6f8079490 100644 --- a/public/ui/components/docs/select_menu/ts-tsconfig.json +++ b/public/ui/components/docs/select_menu/ts-tsconfig.json @@ -41,7 +41,6 @@ "../../../../../../../../front_end/ui/components/docs/select_menu/wide-option.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/shortcut_dialog/ts-tsconfig.json b/public/ui/components/docs/shortcut_dialog/ts-tsconfig.json index 459fe4bc9..37f86c56e 100644 --- a/public/ui/components/docs/shortcut_dialog/ts-tsconfig.json +++ b/public/ui/components/docs/shortcut_dialog/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/shortcut_dialog/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/style_property_editor/ts-tsconfig.json b/public/ui/components/docs/style_property_editor/ts-tsconfig.json index 16205db8a..6884ad205 100644 --- a/public/ui/components/docs/style_property_editor/ts-tsconfig.json +++ b/public/ui/components/docs/style_property_editor/ts-tsconfig.json @@ -41,7 +41,6 @@ "../../../../../../../../front_end/ui/components/docs/style_property_editor/grid.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/survey_link/ts-tsconfig.json b/public/ui/components/docs/survey_link/ts-tsconfig.json index 44720d2d5..cf6572969 100644 --- a/public/ui/components/docs/survey_link/ts-tsconfig.json +++ b/public/ui/components/docs/survey_link/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/survey_link/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/text_editor/ts-tsconfig.json b/public/ui/components/docs/text_editor/ts-tsconfig.json index 11ecca7bd..9dacaea0a 100644 --- a/public/ui/components/docs/text_editor/ts-tsconfig.json +++ b/public/ui/components/docs/text_editor/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/text_editor/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/text_prompt/ts-tsconfig.json b/public/ui/components/docs/text_prompt/ts-tsconfig.json index ea4a30501..9826d3efe 100644 --- a/public/ui/components/docs/text_prompt/ts-tsconfig.json +++ b/public/ui/components/docs/text_prompt/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/text_prompt/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/theme_colors/ts-tsconfig.json b/public/ui/components/docs/theme_colors/ts-tsconfig.json index ce25857d7..2660613b2 100644 --- a/public/ui/components/docs/theme_colors/ts-tsconfig.json +++ b/public/ui/components/docs/theme_colors/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/theme_colors/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/tree_outline/ts-tsconfig.json b/public/ui/components/docs/tree_outline/ts-tsconfig.json index 2f46e393f..cb1fcf47f 100644 --- a/public/ui/components/docs/tree_outline/ts-tsconfig.json +++ b/public/ui/components/docs/tree_outline/ts-tsconfig.json @@ -43,7 +43,6 @@ "../../../../../../../../front_end/ui/components/docs/tree_outline/sample-data.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/two_states_counter/ts-tsconfig.json b/public/ui/components/docs/two_states_counter/ts-tsconfig.json index 277b676b9..ab1a71766 100644 --- a/public/ui/components/docs/two_states_counter/ts-tsconfig.json +++ b/public/ui/components/docs/two_states_counter/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/two_states_counter/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/docs/user_agent_client_hints/ts-tsconfig.json b/public/ui/components/docs/user_agent_client_hints/ts-tsconfig.json index aee13459e..33a45f4cb 100644 --- a/public/ui/components/docs/user_agent_client_hints/ts-tsconfig.json +++ b/public/ui/components/docs/user_agent_client_hints/ts-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/components/docs/user_agent_client_hints/basic.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/components/expandable_list/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/expandable_list/devtools_entrypoint-bundle-typescript-tsconfig.json index 68ad76a6e..d33e8475a 100644 --- a/public/ui/components/expandable_list/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/expandable_list/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/expandable_list/expandable_list.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/expandable_list/expandable_list-tsconfig.json b/public/ui/components/expandable_list/expandable_list-tsconfig.json index 144010a3b..1e10177c9 100644 --- a/public/ui/components/expandable_list/expandable_list-tsconfig.json +++ b/public/ui/components/expandable_list/expandable_list-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/expandable_list/ExpandableList.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/expandable_list/unittests-tsconfig.json b/public/ui/components/expandable_list/unittests-tsconfig.json index 2b7ae2f84..a07717b72 100644 --- a/public/ui/components/expandable_list/unittests-tsconfig.json +++ b/public/ui/components/expandable_list/unittests-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../front_end/ui/components/expandable_list/ExpandableList.test.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/helpers/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/helpers/devtools_entrypoint-bundle-typescript-tsconfig.json index 8cea3e9c4..f8203d8f2 100644 --- a/public/ui/components/helpers/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/helpers/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/helpers/helpers.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/helpers/helpers-tsconfig.json b/public/ui/components/helpers/helpers-tsconfig.json index 6c58794f4..9e94073df 100644 --- a/public/ui/components/helpers/helpers-tsconfig.json +++ b/public/ui/components/helpers/helpers-tsconfig.json @@ -35,7 +35,6 @@ "../../../../../../../front_end/ui/components/helpers/scheduled-render.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/helpers/unittests-tsconfig.json b/public/ui/components/helpers/unittests-tsconfig.json index a1bd65874..afc9b2d5b 100644 --- a/public/ui/components/helpers/unittests-tsconfig.json +++ b/public/ui/components/helpers/unittests-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../front_end/ui/components/helpers/helpers.test.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/highlighting/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/highlighting/devtools_entrypoint-bundle-typescript-tsconfig.json index 56c0f742d..70ced091b 100644 --- a/public/ui/components/highlighting/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/highlighting/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/highlighting/highlighting.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/highlighting/highlighting-tsconfig.json b/public/ui/components/highlighting/highlighting-tsconfig.json index 487ca0ca9..a3eb05ad6 100644 --- a/public/ui/components/highlighting/highlighting-tsconfig.json +++ b/public/ui/components/highlighting/highlighting-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/highlighting/HighlightManager.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/highlighting/unittests-tsconfig.json b/public/ui/components/highlighting/unittests-tsconfig.json index ce5d84aa9..1bdf97e41 100644 --- a/public/ui/components/highlighting/unittests-tsconfig.json +++ b/public/ui/components/highlighting/unittests-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../front_end/ui/components/highlighting/HighlightManager.test.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/icon_button/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/icon_button/devtools_entrypoint-bundle-typescript-tsconfig.json index d713a3ad3..5399e885b 100644 --- a/public/ui/components/icon_button/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/icon_button/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/icon_button/icon_button.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/icon_button/icon_button-tsconfig.json b/public/ui/components/icon_button/icon_button-tsconfig.json index 63bc68c57..9c4b325f6 100644 --- a/public/ui/components/icon_button/icon_button-tsconfig.json +++ b/public/ui/components/icon_button/icon_button-tsconfig.json @@ -33,7 +33,6 @@ "../../../../../../../front_end/ui/components/icon_button/IconButton.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/icon_button/unittests-tsconfig.json b/public/ui/components/icon_button/unittests-tsconfig.json index 74cece1a6..53511b0f7 100644 --- a/public/ui/components/icon_button/unittests-tsconfig.json +++ b/public/ui/components/icon_button/unittests-tsconfig.json @@ -41,7 +41,6 @@ "../../../../../../../front_end/ui/components/icon_button/IconButton.test.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/input/checkbox.css.js b/public/ui/components/input/checkbox.css.js index ebc5888d1..43be889e3 100644 --- a/public/ui/components/input/checkbox.css.js +++ b/public/ui/components/input/checkbox.css.js @@ -16,6 +16,49 @@ input[type="checkbox"] { height: 12px; accent-color: var(--sys-color-primary-bright); color: var(--sys-color-on-primary); + position: relative; + + &:hover::after, + &:active::before { + content: ""; + height: 24px; + width: 24px; + border-radius: var(--sys-shape-corner-full); + position: absolute; + top: -6px; + left: -6px; + } + + &:not(:disabled):hover::after { + background-color: var(--sys-color-state-hover-on-subtle); + } + + &:not(:disabled):active::before { + background-color: var(--sys-color-state-ripple-neutral-on-subtle); + } + + &:not(:disabled):focus-visible { + outline: none; + + &::before { + content: ""; + height: 15px; + width: 15px; + border-radius: 5px; + position: absolute; + top: -3px; + left: -3px; + border: 2px solid var(--sys-color-state-focus-ring); + } + } + + &.small:hover::after, + &.small:active::before { + height: 18px; + width: 18px; + top: -3px; + left: -3px; + } } /*# sourceURL=checkbox.css */ diff --git a/public/ui/components/input/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/input/devtools_entrypoint-bundle-typescript-tsconfig.json index e7d56330f..9511fff2b 100644 --- a/public/ui/components/input/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/input/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/input/input.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/issue_counter/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/issue_counter/devtools_entrypoint-bundle-typescript-tsconfig.json index a10fb3b05..7ba478cec 100644 --- a/public/ui/components/issue_counter/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/issue_counter/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/issue_counter/issue_counter.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/issue_counter/issue_counter-tsconfig.json b/public/ui/components/issue_counter/issue_counter-tsconfig.json index 31aacdd18..8b4d3c7e0 100644 --- a/public/ui/components/issue_counter/issue_counter-tsconfig.json +++ b/public/ui/components/issue_counter/issue_counter-tsconfig.json @@ -33,7 +33,6 @@ "../../../../../../../front_end/ui/components/issue_counter/IssueLinkIcon.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/issue_counter/unittests-tsconfig.json b/public/ui/components/issue_counter/unittests-tsconfig.json index d246d9091..3eb1f194c 100644 --- a/public/ui/components/issue_counter/unittests-tsconfig.json +++ b/public/ui/components/issue_counter/unittests-tsconfig.json @@ -41,7 +41,6 @@ "../../../../../../../front_end/ui/components/issue_counter/IssueLinkIcon.test.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/legacy_wrapper/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/legacy_wrapper/devtools_entrypoint-bundle-typescript-tsconfig.json index d9b703ea4..5f47816b4 100644 --- a/public/ui/components/legacy_wrapper/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/legacy_wrapper/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/legacy_wrapper/legacy_wrapper.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/legacy_wrapper/legacy_wrapper-tsconfig.json b/public/ui/components/legacy_wrapper/legacy_wrapper-tsconfig.json index 10528e3f1..1c3fc75f9 100644 --- a/public/ui/components/legacy_wrapper/legacy_wrapper-tsconfig.json +++ b/public/ui/components/legacy_wrapper/legacy_wrapper-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/legacy_wrapper/LegacyWrapper.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/linkifier/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/linkifier/devtools_entrypoint-bundle-typescript-tsconfig.json index eda7587ab..ec31a518a 100644 --- a/public/ui/components/linkifier/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/linkifier/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/linkifier/linkifier.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/linkifier/linkifier-tsconfig.json b/public/ui/components/linkifier/linkifier-tsconfig.json index 82c77b441..f91a126c9 100644 --- a/public/ui/components/linkifier/linkifier-tsconfig.json +++ b/public/ui/components/linkifier/linkifier-tsconfig.json @@ -33,7 +33,6 @@ "../../../../../../../front_end/ui/components/linkifier/LinkifierUtils.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/linkifier/unittests-tsconfig.json b/public/ui/components/linkifier/unittests-tsconfig.json index 1a41fa5f8..02e9969b1 100644 --- a/public/ui/components/linkifier/unittests-tsconfig.json +++ b/public/ui/components/linkifier/unittests-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../front_end/ui/components/linkifier/LinkifierImpl.test.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/markdown_view/MarkdownLinksMap.js b/public/ui/components/markdown_view/MarkdownLinksMap.js index 9ca84b71d..23e9da080 100644 --- a/public/ui/components/markdown_view/MarkdownLinksMap.js +++ b/public/ui/components/markdown_view/MarkdownLinksMap.js @@ -50,7 +50,7 @@ export const markdownLinks = new Map([ ['PNASecureContextRestrictionFeatureStatus', 'https://chromestatus.com/feature/5954091755241472'], ['https://w3c.github.io/uievents/#legacy-event-types', 'https://w3c.github.io/uievents/#legacy-event-types'], ['manageCookiesHelpPage', 'https://support.google.com/chrome/answer/95647'], - ['gracePeriodStagedControlExplainer', 'https://github.com/amaliev/3pcd-exemption-heuristics/blob/main/explainer.md'], + ['gracePeriodStagedControlExplainer', 'https://developers.google.com/privacy-sandbox/blog/grace-period-opt-out'], ]); export const getMarkdownLink = (key) => { if (/^https:\/\/www.chromestatus.com\/feature\/\d+$/.test(key)) { diff --git a/public/ui/components/markdown_view/MarkdownLinksMap.js.map b/public/ui/components/markdown_view/MarkdownLinksMap.js.map index eeeb7bc0e..9b0763203 100644 --- a/public/ui/components/markdown_view/MarkdownLinksMap.js.map +++ b/public/ui/components/markdown_view/MarkdownLinksMap.js.map @@ -1 +1 @@ -{"version":3,"file":"MarkdownLinksMap.js","sourceRoot":"","sources":["../../../../../../../front_end/ui/components/markdown_view/MarkdownLinksMap.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B;;;;;EAKE;AAEF,wDAAwD;AACxD,yDAAyD;AACzD,mDAAmD;AACnD,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,GAAG,CAAiB;IACnD,CAAC,wBAAwB,EAAE,gDAAgD,CAAC;IAC5E,CAAC,yBAAyB,EAAE,iDAAiD,CAAC;IAC9E,CAAC,4BAA4B,EAAE,6EAA6E,CAAC;IAC7G,CAAC,oBAAoB,EAAE,4BAA4B,CAAC;IACpD;QACE,iCAAiC;QACjC,iFAAiF;KAClF;IACD;QACE,2BAA2B;QAC3B,0FAA0F;KAC3F;IACD,CAAC,wBAAwB,EAAE,0BAA0B,CAAC;IACtD,CAAC,uBAAuB,EAAE,wCAAwC,CAAC;IACnE,CAAC,mBAAmB,EAAE,qCAAqC,CAAC;IAC5D,4DAA4D;IAC5D,CAAC,8BAA8B,EAAE,8BAA8B,CAAC;IAChE,CAAC,yCAAyC,EAAE,yCAAyC,CAAC;IACtF,CAAC,kDAAkD,EAAE,kDAAkD,CAAC;IACxG;QACE,iEAAiE;QACjE,iEAAiE;KAClE;IACD,CAAC,mDAAmD,EAAE,mDAAmD,CAAC;IAC1G;QACE,8DAA8D;QAC9D,8DAA8D;KAC/D;IACD;QACE,8FAA8F;QAC9F,8FAA8F;KAC/F;IACD;QACE,yGAAyG;QACzG,yGAAyG;KAC1G;IACD,CAAC,0CAA0C,EAAE,mDAAmD,CAAC;IACjG,CAAC,oDAAoD,EAAE,oDAAoD,CAAC;IAC5G,CAAC,uBAAuB,EAAE,gDAAgD,CAAC;IAC3E,CAAC,mCAAmC,EAAE,6EAA6E,CAAC;CACrH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAAW,EAAU,EAAE;IACrD,IAAI,gDAAgD,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/D,OAAO,GAAG,CAAC;IACb,CAAC;IACD,MAAM,IAAI,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACpC,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CAAC,2BAA2B,GAAG,sDAAsD,CAAC,CAAC;IACxG,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["// Copyright (c) 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\n/*\n To use links in markdown, add key here with the link and\n use the added key in markdown.\n @example markdown\n Find more information about web development at [Learn more](exampleLink)\n*/\n\n// This is only exported for tests, and it should not be\n// imported in any component, instead add link in map and\n// use getMarkdownLink to get the appropriate link.\nexport const markdownLinks = new Map([\n ['issuesContrastWCAG21AA', 'https://www.w3.org/TR/WCAG21/#contrast-minimum'],\n ['issuesContrastWCAG21AAA', 'https://www.w3.org/TR/WCAG21/#contrast-enhanced'],\n ['issuesContrastSuggestColor', 'https://developers.google.com/web/updates/2020/08/devtools#accessible-color'],\n ['issuesCSPSetStrict', 'https://web.dev/strict-csp'],\n [\n 'issuesCSPWhyStrictOverAllowlist',\n 'https://web.dev/strict-csp/#why-a-strict-csp-is-recommended-over-allowlist-csps',\n ],\n [\n 'issueCorsPreflightRequest',\n 'https://web.dev/cross-origin-resource-sharing/#preflight-requests-for-complex-http-calls',\n ],\n ['issueQuirksModeDoctype', 'https://web.dev/doctype/'],\n ['sameSiteAndSameOrigin', 'https://web.dev/same-site-same-origin/'],\n ['punycodeReference', 'https://wikipedia.org/wiki/Punycode'],\n // Link URLs for deprecation issues (see blink::Deprecation)\n ['https://xhr.spec.whatwg.org/', 'https://xhr.spec.whatwg.org/'],\n ['https://goo.gle/chrome-insecure-origins', 'https://goo.gle/chrome-insecure-origins'],\n ['https://webrtc.org/web-apis/chrome/unified-plan/', 'https://webrtc.org/web-apis/chrome/unified-plan/'],\n [\n 'https://developer.chrome.com/blog/enabling-shared-array-buffer/',\n 'https://developer.chrome.com/blog/enabling-shared-array-buffer/',\n ],\n ['https://developer.chrome.com/docs/extensions/mv3/', 'https://developer.chrome.com/docs/extensions/mv3/'],\n [\n 'https://developer.chrome.com/blog/immutable-document-domain/',\n 'https://developer.chrome.com/blog/immutable-document-domain/',\n ],\n [\n 'https://github.com/WICG/shared-element-transitions/blob/main/debugging_overflow_on_images.md',\n 'https://github.com/WICG/shared-element-transitions/blob/main/debugging_overflow_on_images.md',\n ],\n [\n 'https://developer.chrome.com/docs/extensions/reference/privacy/#property-websites-privacySandboxEnabled',\n 'https://developer.chrome.com/docs/extensions/reference/privacy/#property-websites-privacySandboxEnabled',\n ],\n ['PNASecureContextRestrictionFeatureStatus', 'https://chromestatus.com/feature/5954091755241472'],\n ['https://w3c.github.io/uievents/#legacy-event-types', 'https://w3c.github.io/uievents/#legacy-event-types'],\n ['manageCookiesHelpPage', 'https://support.google.com/chrome/answer/95647'],\n ['gracePeriodStagedControlExplainer', 'https://github.com/amaliev/3pcd-exemption-heuristics/blob/main/explainer.md'],\n]);\n\nexport const getMarkdownLink = (key: string): string => {\n if (/^https:\\/\\/www.chromestatus.com\\/feature\\/\\d+$/.test(key)) {\n return key;\n }\n const link = markdownLinks.get(key);\n if (!link) {\n throw new Error(`Markdown link with key '${key}' is not available, please check MarkdownLinksMap.ts`);\n }\n return link;\n};\n"]} \ No newline at end of file +{"version":3,"file":"MarkdownLinksMap.js","sourceRoot":"","sources":["../../../../../../../front_end/ui/components/markdown_view/MarkdownLinksMap.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B;;;;;EAKE;AAEF,wDAAwD;AACxD,yDAAyD;AACzD,mDAAmD;AACnD,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,GAAG,CAAiB;IACnD,CAAC,wBAAwB,EAAE,gDAAgD,CAAC;IAC5E,CAAC,yBAAyB,EAAE,iDAAiD,CAAC;IAC9E,CAAC,4BAA4B,EAAE,6EAA6E,CAAC;IAC7G,CAAC,oBAAoB,EAAE,4BAA4B,CAAC;IACpD;QACE,iCAAiC;QACjC,iFAAiF;KAClF;IACD;QACE,2BAA2B;QAC3B,0FAA0F;KAC3F;IACD,CAAC,wBAAwB,EAAE,0BAA0B,CAAC;IACtD,CAAC,uBAAuB,EAAE,wCAAwC,CAAC;IACnE,CAAC,mBAAmB,EAAE,qCAAqC,CAAC;IAC5D,4DAA4D;IAC5D,CAAC,8BAA8B,EAAE,8BAA8B,CAAC;IAChE,CAAC,yCAAyC,EAAE,yCAAyC,CAAC;IACtF,CAAC,kDAAkD,EAAE,kDAAkD,CAAC;IACxG;QACE,iEAAiE;QACjE,iEAAiE;KAClE;IACD,CAAC,mDAAmD,EAAE,mDAAmD,CAAC;IAC1G;QACE,8DAA8D;QAC9D,8DAA8D;KAC/D;IACD;QACE,8FAA8F;QAC9F,8FAA8F;KAC/F;IACD;QACE,yGAAyG;QACzG,yGAAyG;KAC1G;IACD,CAAC,0CAA0C,EAAE,mDAAmD,CAAC;IACjG,CAAC,oDAAoD,EAAE,oDAAoD,CAAC;IAC5G,CAAC,uBAAuB,EAAE,gDAAgD,CAAC;IAC3E,CAAC,mCAAmC,EAAE,yEAAyE,CAAC;CACjH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAAW,EAAU,EAAE;IACrD,IAAI,gDAAgD,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/D,OAAO,GAAG,CAAC;IACb,CAAC;IACD,MAAM,IAAI,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACpC,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CAAC,2BAA2B,GAAG,sDAAsD,CAAC,CAAC;IACxG,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["// Copyright (c) 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\n/*\n To use links in markdown, add key here with the link and\n use the added key in markdown.\n @example markdown\n Find more information about web development at [Learn more](exampleLink)\n*/\n\n// This is only exported for tests, and it should not be\n// imported in any component, instead add link in map and\n// use getMarkdownLink to get the appropriate link.\nexport const markdownLinks = new Map([\n ['issuesContrastWCAG21AA', 'https://www.w3.org/TR/WCAG21/#contrast-minimum'],\n ['issuesContrastWCAG21AAA', 'https://www.w3.org/TR/WCAG21/#contrast-enhanced'],\n ['issuesContrastSuggestColor', 'https://developers.google.com/web/updates/2020/08/devtools#accessible-color'],\n ['issuesCSPSetStrict', 'https://web.dev/strict-csp'],\n [\n 'issuesCSPWhyStrictOverAllowlist',\n 'https://web.dev/strict-csp/#why-a-strict-csp-is-recommended-over-allowlist-csps',\n ],\n [\n 'issueCorsPreflightRequest',\n 'https://web.dev/cross-origin-resource-sharing/#preflight-requests-for-complex-http-calls',\n ],\n ['issueQuirksModeDoctype', 'https://web.dev/doctype/'],\n ['sameSiteAndSameOrigin', 'https://web.dev/same-site-same-origin/'],\n ['punycodeReference', 'https://wikipedia.org/wiki/Punycode'],\n // Link URLs for deprecation issues (see blink::Deprecation)\n ['https://xhr.spec.whatwg.org/', 'https://xhr.spec.whatwg.org/'],\n ['https://goo.gle/chrome-insecure-origins', 'https://goo.gle/chrome-insecure-origins'],\n ['https://webrtc.org/web-apis/chrome/unified-plan/', 'https://webrtc.org/web-apis/chrome/unified-plan/'],\n [\n 'https://developer.chrome.com/blog/enabling-shared-array-buffer/',\n 'https://developer.chrome.com/blog/enabling-shared-array-buffer/',\n ],\n ['https://developer.chrome.com/docs/extensions/mv3/', 'https://developer.chrome.com/docs/extensions/mv3/'],\n [\n 'https://developer.chrome.com/blog/immutable-document-domain/',\n 'https://developer.chrome.com/blog/immutable-document-domain/',\n ],\n [\n 'https://github.com/WICG/shared-element-transitions/blob/main/debugging_overflow_on_images.md',\n 'https://github.com/WICG/shared-element-transitions/blob/main/debugging_overflow_on_images.md',\n ],\n [\n 'https://developer.chrome.com/docs/extensions/reference/privacy/#property-websites-privacySandboxEnabled',\n 'https://developer.chrome.com/docs/extensions/reference/privacy/#property-websites-privacySandboxEnabled',\n ],\n ['PNASecureContextRestrictionFeatureStatus', 'https://chromestatus.com/feature/5954091755241472'],\n ['https://w3c.github.io/uievents/#legacy-event-types', 'https://w3c.github.io/uievents/#legacy-event-types'],\n ['manageCookiesHelpPage', 'https://support.google.com/chrome/answer/95647'],\n ['gracePeriodStagedControlExplainer', 'https://developers.google.com/privacy-sandbox/blog/grace-period-opt-out'],\n]);\n\nexport const getMarkdownLink = (key: string): string => {\n if (/^https:\\/\\/www.chromestatus.com\\/feature\\/\\d+$/.test(key)) {\n return key;\n }\n const link = markdownLinks.get(key);\n if (!link) {\n throw new Error(`Markdown link with key '${key}' is not available, please check MarkdownLinksMap.ts`);\n }\n return link;\n};\n"]} \ No newline at end of file diff --git a/public/ui/components/markdown_view/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/markdown_view/devtools_entrypoint-bundle-typescript-tsconfig.json index 2cde4e878..c12b4f5d2 100644 --- a/public/ui/components/markdown_view/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/markdown_view/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/markdown_view/markdown_view.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/markdown_view/markdown_view-tsconfig.json b/public/ui/components/markdown_view/markdown_view-tsconfig.json index ba7d43747..5282fb1e5 100644 --- a/public/ui/components/markdown_view/markdown_view-tsconfig.json +++ b/public/ui/components/markdown_view/markdown_view-tsconfig.json @@ -37,7 +37,6 @@ "../../../../../../../front_end/ui/components/markdown_view/MarkdownView.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/markdown_view/unittests-tsconfig.json b/public/ui/components/markdown_view/unittests-tsconfig.json index cca17d501..d22cfc7ed 100644 --- a/public/ui/components/markdown_view/unittests-tsconfig.json +++ b/public/ui/components/markdown_view/unittests-tsconfig.json @@ -43,7 +43,6 @@ "../../../../../../../front_end/ui/components/markdown_view/MarkdownView.test.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/menus/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/menus/devtools_entrypoint-bundle-typescript-tsconfig.json index 3390fa9c6..16b42e629 100644 --- a/public/ui/components/menus/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/menus/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/menus/menus.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/menus/menus-tsconfig.json b/public/ui/components/menus/menus-tsconfig.json index 5a87c8592..44b1b7104 100644 --- a/public/ui/components/menus/menus-tsconfig.json +++ b/public/ui/components/menus/menus-tsconfig.json @@ -33,7 +33,6 @@ "../../../../../../../front_end/ui/components/menus/SelectMenu.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/menus/unittests-tsconfig.json b/public/ui/components/menus/unittests-tsconfig.json index 2fb2838a4..8b046b667 100644 --- a/public/ui/components/menus/unittests-tsconfig.json +++ b/public/ui/components/menus/unittests-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../front_end/ui/components/menus/SelectMenu.test.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/node_text/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/node_text/devtools_entrypoint-bundle-typescript-tsconfig.json index 25d83f732..5bf5575a0 100644 --- a/public/ui/components/node_text/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/node_text/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/node_text/node_text.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/node_text/node_text-tsconfig.json b/public/ui/components/node_text/node_text-tsconfig.json index 11418496d..09bf53eb2 100644 --- a/public/ui/components/node_text/node_text-tsconfig.json +++ b/public/ui/components/node_text/node_text-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/node_text/NodeText.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/node_text/unittests-tsconfig.json b/public/ui/components/node_text/unittests-tsconfig.json index a4cd37e79..ab21e7fc3 100644 --- a/public/ui/components/node_text/unittests-tsconfig.json +++ b/public/ui/components/node_text/unittests-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../front_end/ui/components/node_text/NodeText.test.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/panel_feedback/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/panel_feedback/devtools_entrypoint-bundle-typescript-tsconfig.json index 7b501b729..438e907b8 100644 --- a/public/ui/components/panel_feedback/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/panel_feedback/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/panel_feedback/panel_feedback.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/panel_feedback/panel_feedback-tsconfig.json b/public/ui/components/panel_feedback/panel_feedback-tsconfig.json index c733c3114..a19489901 100644 --- a/public/ui/components/panel_feedback/panel_feedback-tsconfig.json +++ b/public/ui/components/panel_feedback/panel_feedback-tsconfig.json @@ -34,7 +34,6 @@ "../../../../../../../front_end/ui/components/panel_feedback/PreviewToggle.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/panel_feedback/unittests-tsconfig.json b/public/ui/components/panel_feedback/unittests-tsconfig.json index e31a8bc75..44b71de27 100644 --- a/public/ui/components/panel_feedback/unittests-tsconfig.json +++ b/public/ui/components/panel_feedback/unittests-tsconfig.json @@ -42,7 +42,6 @@ "../../../../../../../front_end/ui/components/panel_feedback/PreviewToggle.test.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/panel_introduction_steps/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/panel_introduction_steps/devtools_entrypoint-bundle-typescript-tsconfig.json index 5e9bb6c01..7b42998ef 100644 --- a/public/ui/components/panel_introduction_steps/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/panel_introduction_steps/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/panel_introduction_steps/panel_introduction_steps.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/panel_introduction_steps/panel_introduction_steps-tsconfig.json b/public/ui/components/panel_introduction_steps/panel_introduction_steps-tsconfig.json index 2b015d3b9..747e0f8fc 100644 --- a/public/ui/components/panel_introduction_steps/panel_introduction_steps-tsconfig.json +++ b/public/ui/components/panel_introduction_steps/panel_introduction_steps-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/panel_introduction_steps/PanelIntroductionSteps.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/render_coordinator/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/render_coordinator/devtools_entrypoint-bundle-typescript-tsconfig.json index 70f721961..6b1b2dcc5 100644 --- a/public/ui/components/render_coordinator/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/render_coordinator/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/render_coordinator/render_coordinator.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/render_coordinator/render_coordinator-tsconfig.json b/public/ui/components/render_coordinator/render_coordinator-tsconfig.json index 126a16f9d..6105c0ced 100644 --- a/public/ui/components/render_coordinator/render_coordinator-tsconfig.json +++ b/public/ui/components/render_coordinator/render_coordinator-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/render_coordinator/RenderCoordinator.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/render_coordinator/unittests-tsconfig.json b/public/ui/components/render_coordinator/unittests-tsconfig.json index d21692854..c51e62d26 100644 --- a/public/ui/components/render_coordinator/unittests-tsconfig.json +++ b/public/ui/components/render_coordinator/unittests-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../front_end/ui/components/render_coordinator/render_coordinator.test.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/report_view/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/report_view/devtools_entrypoint-bundle-typescript-tsconfig.json index bcd5a61f9..8162c5d2a 100644 --- a/public/ui/components/report_view/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/report_view/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/report_view/report_view.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/report_view/report_view-tsconfig.json b/public/ui/components/report_view/report_view-tsconfig.json index 985218e6a..c86418309 100644 --- a/public/ui/components/report_view/report_view-tsconfig.json +++ b/public/ui/components/report_view/report_view-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/report_view/ReportView.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/report_view/unittests-tsconfig.json b/public/ui/components/report_view/unittests-tsconfig.json index ae41cae36..f0562d9f5 100644 --- a/public/ui/components/report_view/unittests-tsconfig.json +++ b/public/ui/components/report_view/unittests-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../front_end/ui/components/report_view/ReportView.test.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/request_link_icon/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/request_link_icon/devtools_entrypoint-bundle-typescript-tsconfig.json index 47f41dab7..43f64a440 100644 --- a/public/ui/components/request_link_icon/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/request_link_icon/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/request_link_icon/request_link_icon.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/request_link_icon/request_link_icon-tsconfig.json b/public/ui/components/request_link_icon/request_link_icon-tsconfig.json index c1537ee35..bb1323d1e 100644 --- a/public/ui/components/request_link_icon/request_link_icon-tsconfig.json +++ b/public/ui/components/request_link_icon/request_link_icon-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/request_link_icon/RequestLinkIcon.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/request_link_icon/unittests-tsconfig.json b/public/ui/components/request_link_icon/unittests-tsconfig.json index 1c9d3b816..cde0afb9e 100644 --- a/public/ui/components/request_link_icon/unittests-tsconfig.json +++ b/public/ui/components/request_link_icon/unittests-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../front_end/ui/components/request_link_icon/RequestLinkIcon.test.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/settings/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/settings/devtools_entrypoint-bundle-typescript-tsconfig.json index 6cd98e22b..37007e7b4 100644 --- a/public/ui/components/settings/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/settings/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/settings/settings.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/settings/settingCheckbox.css.js b/public/ui/components/settings/settingCheckbox.css.js index 633918b4d..47837c8ef 100644 --- a/public/ui/components/settings/settingCheckbox.css.js +++ b/public/ui/components/settings/settingCheckbox.css.js @@ -21,6 +21,7 @@ input { width: 12px; min-height: 12px; min-width: 12px; + margin: 6px; } label { @@ -28,10 +29,14 @@ label { align-items: center; overflow: hidden; text-overflow: ellipsis; + + &:has(input:disabled) { + pointer-events: none; + } } p { - margin: 12px 0; + margin: 6px 0; } .disabled-reason { diff --git a/public/ui/components/settings/settings-tsconfig.json b/public/ui/components/settings/settings-tsconfig.json index 448794ace..d6ba4d72c 100644 --- a/public/ui/components/settings/settings-tsconfig.json +++ b/public/ui/components/settings/settings-tsconfig.json @@ -33,7 +33,6 @@ "../../../../../../../front_end/ui/components/settings/SettingDeprecationWarning.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/settings/unittests-tsconfig.json b/public/ui/components/settings/unittests-tsconfig.json index f34693f3f..16242d333 100644 --- a/public/ui/components/settings/unittests-tsconfig.json +++ b/public/ui/components/settings/unittests-tsconfig.json @@ -41,7 +41,6 @@ "../../../../../../../front_end/ui/components/settings/SettingDeprecationWarning.test.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/split_view/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/split_view/devtools_entrypoint-bundle-typescript-tsconfig.json index 80089a586..330e0a362 100644 --- a/public/ui/components/split_view/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/split_view/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/split_view/split_view.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/split_view/split_view-tsconfig.json b/public/ui/components/split_view/split_view-tsconfig.json index 029fd8bda..b13d4b592 100644 --- a/public/ui/components/split_view/split_view-tsconfig.json +++ b/public/ui/components/split_view/split_view-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/split_view/SplitView.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/split_view/unittests-tsconfig.json b/public/ui/components/split_view/unittests-tsconfig.json index 40ee6ea78..1d2a5458a 100644 --- a/public/ui/components/split_view/unittests-tsconfig.json +++ b/public/ui/components/split_view/unittests-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../front_end/ui/components/split_view/SplitView.test.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/srgb_overlay/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/srgb_overlay/devtools_entrypoint-bundle-typescript-tsconfig.json index 54a57b818..98b934987 100644 --- a/public/ui/components/srgb_overlay/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/srgb_overlay/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/srgb_overlay/srgb_overlay.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/srgb_overlay/srgb_overlay-tsconfig.json b/public/ui/components/srgb_overlay/srgb_overlay-tsconfig.json index 0b5c6791e..da9710e58 100644 --- a/public/ui/components/srgb_overlay/srgb_overlay-tsconfig.json +++ b/public/ui/components/srgb_overlay/srgb_overlay-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/srgb_overlay/SrgbOverlay.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/suggestion_input/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/suggestion_input/devtools_entrypoint-bundle-typescript-tsconfig.json index f2ca4bcae..bd0f87012 100644 --- a/public/ui/components/suggestion_input/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/suggestion_input/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/suggestion_input/suggestion_input.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/suggestion_input/suggestion_input-tsconfig.json b/public/ui/components/suggestion_input/suggestion_input-tsconfig.json index be4947bda..0b9768aa1 100644 --- a/public/ui/components/suggestion_input/suggestion_input-tsconfig.json +++ b/public/ui/components/suggestion_input/suggestion_input-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/suggestion_input/SuggestionInput.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/survey_link/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/survey_link/devtools_entrypoint-bundle-typescript-tsconfig.json index cef4c274e..0346928ef 100644 --- a/public/ui/components/survey_link/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/survey_link/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/survey_link/survey_link.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/survey_link/survey_link-tsconfig.json b/public/ui/components/survey_link/survey_link-tsconfig.json index aebde3fbb..918b46ecd 100644 --- a/public/ui/components/survey_link/survey_link-tsconfig.json +++ b/public/ui/components/survey_link/survey_link-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/survey_link/SurveyLink.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/survey_link/unittests-tsconfig.json b/public/ui/components/survey_link/unittests-tsconfig.json index 5e2565f8a..a06afe356 100644 --- a/public/ui/components/survey_link/unittests-tsconfig.json +++ b/public/ui/components/survey_link/unittests-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../front_end/ui/components/survey_link/SurveyLink.test.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/text_editor/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/text_editor/devtools_entrypoint-bundle-typescript-tsconfig.json index 91bfa700c..a267608e3 100644 --- a/public/ui/components/text_editor/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/text_editor/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/text_editor/text_editor.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/text_editor/text_editor-tsconfig.json b/public/ui/components/text_editor/text_editor-tsconfig.json index 904669d90..12f28891d 100644 --- a/public/ui/components/text_editor/text_editor-tsconfig.json +++ b/public/ui/components/text_editor/text_editor-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../front_end/ui/components/text_editor/theme.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/text_editor/unittests-tsconfig.json b/public/ui/components/text_editor/unittests-tsconfig.json index a3ae62c68..8615e4d7a 100644 --- a/public/ui/components/text_editor/unittests-tsconfig.json +++ b/public/ui/components/text_editor/unittests-tsconfig.json @@ -44,7 +44,6 @@ "../../../../../../../front_end/ui/components/text_editor/javascript.test.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/text_prompt/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/text_prompt/devtools_entrypoint-bundle-typescript-tsconfig.json index 31bd28839..0f164fd67 100644 --- a/public/ui/components/text_prompt/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/text_prompt/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/text_prompt/text_prompt.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/text_prompt/text_prompt-tsconfig.json b/public/ui/components/text_prompt/text_prompt-tsconfig.json index ed60938ae..644b89731 100644 --- a/public/ui/components/text_prompt/text_prompt-tsconfig.json +++ b/public/ui/components/text_prompt/text_prompt-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/text_prompt/TextPrompt.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/text_prompt/unittests-tsconfig.json b/public/ui/components/text_prompt/unittests-tsconfig.json index e0603688a..4d17932e0 100644 --- a/public/ui/components/text_prompt/unittests-tsconfig.json +++ b/public/ui/components/text_prompt/unittests-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../front_end/ui/components/text_prompt/TextPrompt.test.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/tree_outline/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/tree_outline/devtools_entrypoint-bundle-typescript-tsconfig.json index be2653501..ec9b996d2 100644 --- a/public/ui/components/tree_outline/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/tree_outline/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/tree_outline/tree_outline.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/tree_outline/tree_outline-tsconfig.json b/public/ui/components/tree_outline/tree_outline-tsconfig.json index 82f043f57..d77197923 100644 --- a/public/ui/components/tree_outline/tree_outline-tsconfig.json +++ b/public/ui/components/tree_outline/tree_outline-tsconfig.json @@ -33,7 +33,6 @@ "../../../../../../../front_end/ui/components/tree_outline/TreeOutlineUtils.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/tree_outline/unittests-tsconfig.json b/public/ui/components/tree_outline/unittests-tsconfig.json index 1861b0399..bd259f5b7 100644 --- a/public/ui/components/tree_outline/unittests-tsconfig.json +++ b/public/ui/components/tree_outline/unittests-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../front_end/ui/components/tree_outline/TreeOutline.test.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/two_states_counter/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/two_states_counter/devtools_entrypoint-bundle-typescript-tsconfig.json index c046073f8..398f150c3 100644 --- a/public/ui/components/two_states_counter/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/components/two_states_counter/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/two_states_counter/two_states_counter.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/two_states_counter/two_states_counter-tsconfig.json b/public/ui/components/two_states_counter/two_states_counter-tsconfig.json index 577ca3589..875b14a6e 100644 --- a/public/ui/components/two_states_counter/two_states_counter-tsconfig.json +++ b/public/ui/components/two_states_counter/two_states_counter-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/components/two_states_counter/TwoStatesCounter.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/components/two_states_counter/unittests-tsconfig.json b/public/ui/components/two_states_counter/unittests-tsconfig.json index f1eedeee9..641ebfc98 100644 --- a/public/ui/components/two_states_counter/unittests-tsconfig.json +++ b/public/ui/components/two_states_counter/unittests-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../front_end/ui/components/two_states_counter/TwoStatesCounter.test.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/Toolbar.d.ts b/public/ui/legacy/Toolbar.d.ts index 830a5bcf0..eb71f8425 100644 --- a/public/ui/legacy/Toolbar.d.ts +++ b/public/ui/legacy/Toolbar.d.ts @@ -213,7 +213,7 @@ export declare class ToolbarSettingComboBox extends ToolbarComboBox { } export declare class ToolbarCheckbox extends ToolbarItem { inputElement: HTMLInputElement; - constructor(text: string, tooltip?: string, listener?: ((arg0: MouseEvent) => void), jslogContext?: string); + constructor(text: string, tooltip?: string, listener?: ((arg0: MouseEvent) => void), jslogContext?: string, small?: boolean); checked(): boolean; setChecked(value: boolean): void; applyEnabledState(enabled: boolean): void; diff --git a/public/ui/legacy/Toolbar.js b/public/ui/legacy/Toolbar.js index 579a940de..540363563 100644 --- a/public/ui/legacy/Toolbar.js +++ b/public/ui/legacy/Toolbar.js @@ -958,10 +958,11 @@ export class ToolbarSettingComboBox extends ToolbarComboBox { } export class ToolbarCheckbox extends ToolbarItem { inputElement; - constructor(text, tooltip, listener, jslogContext) { + constructor(text, tooltip, listener, jslogContext, small) { super(CheckboxLabel.create(text)); this.element.classList.add('checkbox'); this.inputElement = this.element.checkboxElement; + this.inputElement.classList.toggle('small', small); if (tooltip) { // install on the checkbox Tooltip.install(this.inputElement, tooltip); diff --git a/public/ui/legacy/Toolbar.js.map b/public/ui/legacy/Toolbar.js.map index 670dfe7f9..fc7325836 100644 --- a/public/ui/legacy/Toolbar.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C","sourcesContent":["/*\n * Copyright (C) 2009 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 Root from '../../core/root/root.js';\nimport * as Buttons from '../../ui/components/buttons/buttons.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\nimport * as Adorners from '../components/adorners/adorners.js';\nimport * as IconButton from '../components/icon_button/icon_button.js';\n\nimport {type Action, Events as ActionEvents} from './ActionRegistration.js';\nimport {ActionRegistry} from './ActionRegistry.js';\nimport * as ARIAUtils from './ARIAUtils.js';\nimport {ContextMenu} from './ContextMenu.js';\nimport {GlassPane, PointerEventsBehavior} from './GlassPane.js';\nimport {bindCheckbox} from './SettingsUI.js';\nimport {type Suggestion} from './SuggestBox.js';\nimport {Events as TextPromptEvents, TextPrompt} from './TextPrompt.js';\nimport toolbarStyles from './toolbar.css.legacy.js';\nimport {Tooltip} from './Tooltip.js';\nimport {CheckboxLabel, createShadowRootWithCoreStyles, LongClickController} from './UIUtils.js';\n\nconst UIStrings = {\n /**\n *@description Announced screen reader message for ToolbarSettingToggle when the setting is toggled on.\n */\n pressed: 'pressed',\n /**\n *@description Announced screen reader message for ToolbarSettingToggle when the setting is toggled off.\n */\n notPressed: 'not pressed',\n /**\n *@description Tooltip shown when the user hovers over the clear icon to empty the text input.\n */\n clearInput: 'Clear',\n /**\n *@description Placeholder for filter bars that shows before the user types in a filter keyword.\n */\n filter: 'Filter',\n};\nconst str_ = i18n.i18n.registerUIStrings('ui/legacy/Toolbar.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class Toolbar {\n private items: ToolbarItem[];\n element: HTMLElement;\n enabled: boolean;\n private readonly shadowRoot: ShadowRoot;\n private contentElement: Element;\n private compactLayout = false;\n\n constructor(className: string, parentElement?: Element) {\n this.items = [];\n this.element = (parentElement ? parentElement.createChild('div') : document.createElement('div')) as HTMLElement;\n this.element.className = className;\n this.element.classList.add('toolbar');\n this.enabled = true;\n this.shadowRoot = createShadowRootWithCoreStyles(this.element, {cssFile: toolbarStyles, delegatesFocus: undefined});\n this.contentElement = this.shadowRoot.createChild('div', 'toolbar-shadow');\n }\n\n hasCompactLayout(): boolean {\n return this.compactLayout;\n }\n\n registerCSSFiles(cssFiles: CSSStyleSheet[]): void {\n this.shadowRoot.adoptedStyleSheets = this.shadowRoot.adoptedStyleSheets.concat(cssFiles);\n }\n\n setCompactLayout(enable: boolean): void {\n if (this.compactLayout === enable) {\n return;\n }\n this.compactLayout = enable;\n for (const item of this.items) {\n item.setCompactLayout(enable);\n }\n }\n\n static createLongPressActionButton(\n action: Action, toggledOptions: ToolbarButton[], untoggledOptions: ToolbarButton[]): ToolbarButton {\n const button = Toolbar.createActionButton(action);\n const mainButtonClone = Toolbar.createActionButton(action);\n\n let longClickController: LongClickController|null = null;\n let longClickButtons: ToolbarButton[]|null = null;\n let longClickGlyph: IconButton.Icon.Icon|null = null;\n\n action.addEventListener(ActionEvents.Toggled, updateOptions);\n updateOptions();\n return button;\n\n function updateOptions(): void {\n const buttons = action.toggled() ? (toggledOptions || null) : (untoggledOptions || null);\n\n if (buttons && buttons.length) {\n if (!longClickController) {\n longClickController = new LongClickController(button.element, showOptions);\n longClickGlyph = IconButton.Icon.create('triangle-bottom-right', 'long-click-glyph');\n button.element.appendChild(longClickGlyph);\n longClickButtons = buttons;\n }\n } else {\n if (longClickController) {\n longClickController.dispose();\n longClickController = null;\n if (longClickGlyph) {\n longClickGlyph.remove();\n }\n longClickGlyph = null;\n longClickButtons = null;\n }\n }\n }\n\n function showOptions(): void {\n let buttons: ToolbarButton[] = longClickButtons ? longClickButtons.slice() : [];\n buttons.push(mainButtonClone);\n\n const document = button.element.ownerDocument;\n document.documentElement.addEventListener('mouseup', mouseUp, false);\n\n const optionsGlassPane = new GlassPane();\n optionsGlassPane.setPointerEventsBehavior(PointerEventsBehavior.BlockedByGlassPane);\n optionsGlassPane.show(document);\n const optionsBar = new Toolbar('fill', optionsGlassPane.contentElement);\n optionsBar.contentElement.classList.add('floating');\n const buttonHeight = 26;\n\n const hostButtonPosition = button.element.boxInWindow().relativeToElement(GlassPane.container(document));\n\n const topNotBottom = hostButtonPosition.y + buttonHeight * buttons.length < document.documentElement.offsetHeight;\n\n if (topNotBottom) {\n buttons = buttons.reverse();\n }\n\n optionsBar.element.style.height = (buttonHeight * buttons.length) + 'px';\n if (topNotBottom) {\n optionsBar.element.style.top = (hostButtonPosition.y - 5) + 'px';\n } else {\n optionsBar.element.style.top = (hostButtonPosition.y - (buttonHeight * (buttons.length - 1)) - 6) + 'px';\n }\n optionsBar.element.style.left = (hostButtonPosition.x - 5) + 'px';\n\n for (let i = 0; i < buttons.length; ++i) {\n buttons[i].element.addEventListener('mousemove', mouseOver, false);\n buttons[i].element.addEventListener('mouseout', mouseOut, false);\n optionsBar.appendToolbarItem(buttons[i]);\n }\n const hostButtonIndex = topNotBottom ? 0 : buttons.length - 1;\n buttons[hostButtonIndex].element.classList.add('emulate-active');\n\n function mouseOver(e: Event): void {\n if ((e as MouseEvent).which !== 1) {\n return;\n }\n if (e.target instanceof HTMLElement) {\n const buttonElement = e.target.enclosingNodeOrSelfWithClass('toolbar-item');\n buttonElement.classList.add('emulate-active');\n }\n }\n\n function mouseOut(e: Event): void {\n if ((e as MouseEvent).which !== 1) {\n return;\n }\n if (e.target instanceof HTMLElement) {\n const buttonElement = e.target.enclosingNodeOrSelfWithClass('toolbar-item');\n buttonElement.classList.remove('emulate-active');\n }\n }\n\n function mouseUp(e: Event): void {\n if ((e as MouseEvent).which !== 1) {\n return;\n }\n optionsGlassPane.hide();\n document.documentElement.removeEventListener('mouseup', mouseUp, false);\n\n for (let i = 0; i < buttons.length; ++i) {\n if (buttons[i].element.classList.contains('emulate-active')) {\n buttons[i].element.classList.remove('emulate-active');\n buttons[i].clicked(e);\n break;\n }\n }\n }\n }\n }\n\n static createActionButton(action: Action, options: ToolbarButtonOptions|undefined = TOOLBAR_BUTTON_DEFAULT_OPTIONS):\n ToolbarButton {\n const button = action.toggleable() ? makeToggle() : makeButton();\n\n if (options.showLabel) {\n button.setText(options.label?.() || action.title());\n }\n\n let handler = (): void => {\n void action.execute();\n };\n if (options.userActionCode) {\n const actionCode = options.userActionCode;\n handler = () => {\n Host.userMetrics.actionTaken(actionCode);\n void action.execute();\n };\n }\n button.addEventListener(ToolbarButton.Events.Click, handler, action);\n action.addEventListener(ActionEvents.Enabled, enabledChanged);\n button.setEnabled(action.enabled());\n return button;\n\n function makeButton(): ToolbarButton {\n const button = new ToolbarButton(action.title(), action.icon(), undefined, action.id());\n if (action.title()) {\n Tooltip.installWithActionBinding(button.element, action.title(), action.id());\n }\n return button;\n }\n\n function makeToggle(): ToolbarToggle {\n const toggleButton = new ToolbarToggle(action.title(), action.icon(), action.toggledIcon(), action.id());\n toggleButton.setToggleWithRedColor(action.toggleWithRedColor());\n action.addEventListener(ActionEvents.Toggled, toggled);\n toggled();\n return toggleButton;\n\n function toggled(): void {\n toggleButton.setToggled(action.toggled());\n if (action.title()) {\n toggleButton.setTitle(action.title());\n Tooltip.installWithActionBinding(toggleButton.element, action.title(), action.id());\n }\n }\n }\n\n function enabledChanged(event: Common.EventTarget.EventTargetEvent): void {\n button.setEnabled(event.data);\n }\n }\n\n static createActionButtonForId(actionId: string, options?: ToolbarButtonOptions): ToolbarButton {\n const action = ActionRegistry.instance().getAction(actionId);\n return Toolbar.createActionButton(action, options);\n }\n\n gripElementForResize(): Element {\n return this.contentElement;\n }\n\n makeWrappable(growVertically?: boolean): void {\n this.contentElement.classList.add('wrappable');\n if (growVertically) {\n this.contentElement.classList.add('toolbar-grow-vertical');\n }\n }\n\n makeVertical(): void {\n this.contentElement.classList.add('vertical');\n }\n\n makeBlueOnHover(): void {\n this.contentElement.classList.add('toolbar-blue-on-hover');\n }\n\n makeToggledGray(): void {\n this.contentElement.classList.add('toolbar-toggled-gray');\n }\n\n renderAsLinks(): void {\n this.contentElement.classList.add('toolbar-render-as-links');\n }\n\n empty(): boolean {\n return !this.items.length;\n }\n\n setEnabled(enabled: boolean): void {\n this.enabled = enabled;\n for (const item of this.items) {\n item.applyEnabledState(this.enabled && item.enabled);\n }\n }\n\n appendToolbarItem(item: ToolbarItem): void {\n this.items.push(item);\n item.toolbar = this;\n item.setCompactLayout(this.hasCompactLayout());\n if (!this.enabled) {\n item.applyEnabledState(false);\n }\n this.contentElement.appendChild(item.element);\n this.hideSeparatorDupes();\n }\n\n appendSeparator(): void {\n this.appendToolbarItem(new ToolbarSeparator());\n }\n\n appendSpacer(): void {\n this.appendToolbarItem(new ToolbarSeparator(true));\n }\n\n appendText(text: string): void {\n this.appendToolbarItem(new ToolbarText(text));\n }\n\n removeToolbarItem(itemToRemove: ToolbarItem): void {\n const updatedItems = [];\n for (const item of this.items) {\n if (item === itemToRemove) {\n item.element.remove();\n } else {\n updatedItems.push(item);\n }\n }\n this.items = updatedItems;\n }\n\n removeToolbarItems(): void {\n for (const item of this.items) {\n item.toolbar = null;\n }\n this.items = [];\n this.contentElement.removeChildren();\n }\n\n setColor(color: string): void {\n const style = document.createElement('style');\n style.textContent = '.toolbar-glyph { background-color: ' + color + ' !important }';\n this.shadowRoot.appendChild(style);\n }\n\n setToggledColor(color: string): void {\n const style = document.createElement('style');\n style.textContent =\n '.toolbar-button.toolbar-state-on .toolbar-glyph { background-color: ' + color + ' !important }';\n this.shadowRoot.appendChild(style);\n }\n\n hideSeparatorDupes(): void {\n if (!this.items.length) {\n return;\n }\n // Don't hide first and last separators if they were added explicitly.\n let previousIsSeparator = false;\n let lastSeparator;\n let nonSeparatorVisible = false;\n for (let i = 0; i < this.items.length; ++i) {\n if (this.items[i] instanceof ToolbarSeparator) {\n this.items[i].setVisible(!previousIsSeparator);\n previousIsSeparator = true;\n lastSeparator = this.items[i];\n continue;\n }\n if (this.items[i].visible()) {\n previousIsSeparator = false;\n lastSeparator = null;\n nonSeparatorVisible = true;\n }\n }\n if (lastSeparator && lastSeparator !== this.items[this.items.length - 1]) {\n lastSeparator.setVisible(false);\n }\n\n this.element.classList.toggle(\n 'hidden',\n lastSeparator !== null && lastSeparator !== undefined && lastSeparator.visible() && !nonSeparatorVisible);\n }\n\n async appendItemsAtLocation(location: string): Promise {\n const extensions: ToolbarItemRegistration[] = getRegisteredToolbarItems();\n\n extensions.sort((extension1, extension2) => {\n const order1 = extension1.order || 0;\n const order2 = extension2.order || 0;\n return order1 - order2;\n });\n\n const filtered = extensions.filter(e => e.location === location);\n const items = await Promise.all(filtered.map(extension => {\n const {separator, actionId, showLabel, label, loadItem} = extension;\n if (separator) {\n return new ToolbarSeparator();\n }\n if (actionId) {\n return Toolbar.createActionButtonForId(\n actionId, {label, showLabel: Boolean(showLabel), userActionCode: undefined});\n }\n // TODO(crbug.com/1134103) constratint the case checked with this if using TS type definitions once UI is TS-authored.\n if (!loadItem) {\n throw new Error('Could not load a toolbar item registration with no loadItem function');\n }\n return loadItem().then(p => (p as Provider).item());\n }));\n\n for (const item of items) {\n if (item) {\n this.appendToolbarItem(item);\n }\n }\n }\n}\nexport interface ToolbarButtonOptions {\n label?: () => Platform.UIString.LocalizedString;\n showLabel: boolean;\n userActionCode?: Host.UserMetrics.Action;\n}\n\nconst TOOLBAR_BUTTON_DEFAULT_OPTIONS: ToolbarButtonOptions = {\n showLabel: false,\n userActionCode: undefined,\n};\n\n// We need any here because Common.ObjectWrapper.ObjectWrapper is invariant in T.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport class ToolbarItem extends Common.ObjectWrapper.ObjectWrapper {\n element: HTMLElement;\n private visibleInternal: boolean;\n enabled: boolean;\n toolbar: Toolbar|null;\n protected title?: string;\n\n constructor(element: Element) {\n super();\n this.element = (element as HTMLElement);\n this.element.classList.add('toolbar-item');\n this.visibleInternal = true;\n this.enabled = true;\n\n /**\n * Set by the parent toolbar during appending.\n */\n this.toolbar = null;\n }\n\n setTitle(title: string, actionId: string|undefined = undefined): void {\n if (this.title === title) {\n return;\n }\n this.title = title;\n ARIAUtils.setLabel(this.element, title);\n if (actionId === undefined) {\n Tooltip.install(this.element, title);\n } else {\n Tooltip.installWithActionBinding(this.element, title, actionId);\n }\n }\n\n setEnabled(value: boolean): void {\n if (this.enabled === value) {\n return;\n }\n this.enabled = value;\n this.applyEnabledState(this.enabled && (!this.toolbar || this.toolbar.enabled));\n }\n\n applyEnabledState(enabled: boolean): void {\n // @ts-ignore: Ignoring in favor of an `instanceof` check for all the different\n // kind of HTMLElement classes that have a disabled attribute.\n this.element.disabled = !enabled;\n }\n\n visible(): boolean {\n return this.visibleInternal;\n }\n\n setVisible(x: boolean): void {\n if (this.visibleInternal === x) {\n return;\n }\n this.element.classList.toggle('hidden', !x);\n this.visibleInternal = x;\n if (this.toolbar && !(this instanceof ToolbarSeparator)) {\n this.toolbar.hideSeparatorDupes();\n }\n }\n\n setRightAligned(alignRight: boolean): void {\n this.element.classList.toggle('toolbar-item-right-aligned', alignRight);\n }\n\n setCompactLayout(_enable: boolean): void {\n }\n}\n\nexport const enum ToolbarItemWithCompactLayoutEvents {\n CompactLayoutUpdated = 'CompactLayoutUpdated',\n}\n\ntype ToolbarItemWithCompactLayoutEventTypes = {\n [ToolbarItemWithCompactLayoutEvents.CompactLayoutUpdated]: boolean,\n};\n\nexport class ToolbarItemWithCompactLayout extends ToolbarItem {\n constructor(element: Element) {\n super(element);\n }\n\n override setCompactLayout(enable: boolean): void {\n this.dispatchEventToListeners(ToolbarItemWithCompactLayoutEvents.CompactLayoutUpdated, enable);\n }\n}\n\nexport class ToolbarText extends ToolbarItem {\n constructor(text?: string) {\n const element = document.createElement('div');\n element.classList.add('toolbar-text');\n super(element);\n this.element.classList.add('toolbar-text');\n this.setText(text || '');\n }\n\n text(): string {\n return this.element.textContent || '';\n }\n\n setText(text: string): void {\n this.element.textContent = text;\n }\n}\n\nexport class ToolbarButton extends ToolbarItem {\n private readonly glyphElement: IconButton.Icon.Icon;\n private textElement: HTMLElement;\n private text?: string;\n private glyph?: string;\n private adorner?: HTMLElement;\n\n constructor(title: string, glyphOrAdorner?: string|Adorners.Adorner.Adorner, text?: string, jslogContext?: string) {\n const element = document.createElement('button');\n element.classList.add('toolbar-button');\n super(element);\n this.element.addEventListener('click', this.clicked.bind(this), false);\n this.element.addEventListener('mousedown', this.mouseDown.bind(this), false);\n\n this.glyphElement = new IconButton.Icon.Icon();\n this.glyphElement.className = 'toolbar-glyph hidden';\n this.element.appendChild(this.glyphElement);\n this.textElement = this.element.createChild('div', 'toolbar-text hidden');\n\n this.setTitle(title);\n if (glyphOrAdorner) {\n this.setGlyphOrAdorner(glyphOrAdorner);\n }\n this.setText(text || '');\n if (jslogContext) {\n this.element.setAttribute('jslog', `${VisualLogging.action().track({click: true}).context(jslogContext)}`);\n }\n this.title = '';\n }\n\n focus(): void {\n this.element.focus();\n }\n\n setText(text: string): void {\n if (this.text === text) {\n return;\n }\n this.textElement.textContent = text;\n this.textElement.classList.toggle('hidden', !text);\n this.text = text;\n }\n\n setGlyphOrAdorner(glyphOrAdorner: string|Adorners.Adorner.Adorner): void {\n if (glyphOrAdorner instanceof Adorners.Adorner.Adorner) {\n if (this.adorner) {\n this.adorner.replaceWith(glyphOrAdorner);\n } else {\n this.element.prepend(glyphOrAdorner);\n }\n this.adorner = glyphOrAdorner;\n } else {\n this.setGlyph(glyphOrAdorner);\n }\n }\n\n setGlyph(glyph: string): void {\n if (this.glyph === glyph) {\n return;\n }\n this.glyphElement.name = !glyph ? null : glyph;\n this.glyphElement.classList.toggle('hidden', !glyph);\n this.element.classList.toggle('toolbar-has-glyph', Boolean(glyph));\n this.glyph = glyph;\n }\n\n setBackgroundImage(iconURL: string): void {\n this.element.style.backgroundImage = 'url(' + iconURL + ')';\n }\n\n setSecondary(): void {\n this.element.classList.add('toolbar-button-secondary');\n }\n\n setDarkText(): void {\n this.element.classList.add('dark-text');\n }\n\n turnIntoSelect(shrinkable: boolean|undefined = false): void {\n this.element.classList.add('toolbar-has-dropdown');\n if (shrinkable) {\n this.element.classList.add('toolbar-has-dropdown-shrinkable');\n }\n const dropdownArrowIcon = IconButton.Icon.create('triangle-down', 'toolbar-dropdown-arrow');\n this.element.appendChild(dropdownArrowIcon);\n }\n\n clicked(event: Event): void {\n if (!this.enabled) {\n return;\n }\n this.dispatchEventToListeners(ToolbarButton.Events.Click, event);\n event.consume();\n }\n\n protected mouseDown(event: MouseEvent): void {\n if (!this.enabled) {\n return;\n }\n this.dispatchEventToListeners(ToolbarButton.Events.MouseDown, event);\n }\n}\n\nexport class ToolbarCombobox extends ToolbarItem {\n private readonly glyphElement: IconButton.Icon.Icon;\n private textElement: HTMLElement;\n private text?: string;\n private glyph?: string;\n\n constructor(title: string, isIconDropdown?: boolean, jslogContext?: string) {\n const element = document.createElement('button');\n element.classList.add('toolbar-button');\n super(element);\n this.element.addEventListener('click', this.clicked.bind(this), false);\n this.element.addEventListener('mousedown', this.mouseDown.bind(this), false);\n\n this.glyphElement = new IconButton.Icon.Icon();\n this.glyphElement.className = 'toolbar-glyph hidden';\n this.element.appendChild(this.glyphElement);\n this.textElement = this.element.createChild('div', 'toolbar-text hidden');\n\n this.setTitle(title);\n if (jslogContext) {\n this.element.setAttribute('jslog', `${VisualLogging.action().track({click: true}).context(jslogContext)}`);\n }\n this.title = '';\n if (!isIconDropdown) {\n this.element.classList.add('toolbar-has-dropdown');\n const dropdownArrowIcon = IconButton.Icon.create('triangle-down', 'toolbar-dropdown-arrow');\n this.element.appendChild(dropdownArrowIcon);\n }\n }\n\n setText(text: string): void {\n if (this.text === text) {\n return;\n }\n this.textElement.textContent = text;\n this.textElement.classList.toggle('hidden', !text);\n this.text = text;\n }\n\n setGlyph(glyph: string): void {\n if (this.glyph === glyph) {\n return;\n }\n this.glyphElement.name = !glyph ? null : glyph;\n this.glyphElement.classList.toggle('hidden', !glyph);\n this.element.classList.toggle('toolbar-has-glyph', Boolean(glyph));\n this.glyph = glyph;\n }\n\n setDarkText(): void {\n this.element.classList.add('dark-text');\n }\n\n turnShrinkable(): void {\n this.element.classList.add('toolbar-has-dropdown-shrinkable');\n }\n\n clicked(event: Event): void {\n if (!this.enabled) {\n return;\n }\n this.dispatchEventToListeners(ToolbarButton.Events.Click, event);\n event.consume();\n }\n\n protected mouseDown(event: MouseEvent): void {\n if (!this.enabled) {\n return;\n }\n this.dispatchEventToListeners(ToolbarButton.Events.MouseDown, event);\n }\n}\n\nexport namespace ToolbarButton {\n export const enum Events {\n Click = 'Click',\n MouseDown = 'MouseDown',\n }\n\n export type EventTypes = {\n [Events.Click]: Event,\n [Events.MouseDown]: MouseEvent,\n };\n}\n\nexport class ToolbarInput extends ToolbarItem {\n private prompt: TextPrompt;\n private readonly proxyElement: Element;\n\n constructor(\n placeholder: string, accessiblePlaceholder?: string, growFactor?: number, shrinkFactor?: number, tooltip?: string,\n completions?: ((arg0: string, arg1: string, arg2?: boolean|undefined) => Promise),\n dynamicCompletions?: boolean, jslogContext?: string) {\n const element = document.createElement('div');\n element.classList.add('toolbar-input');\n super(element);\n\n const internalPromptElement = this.element.createChild('div', 'toolbar-input-prompt');\n ARIAUtils.setLabel(internalPromptElement, accessiblePlaceholder || placeholder);\n internalPromptElement.addEventListener('focus', () => this.element.classList.add('focused'));\n internalPromptElement.addEventListener('blur', () => this.element.classList.remove('focused'));\n\n this.prompt = new TextPrompt();\n this.prompt.jslogContext = jslogContext;\n this.proxyElement = this.prompt.attach(internalPromptElement);\n this.proxyElement.classList.add('toolbar-prompt-proxy');\n this.proxyElement.addEventListener('keydown', (event: Event) => this.onKeydownCallback(event as KeyboardEvent));\n this.prompt.initialize(\n completions || (() => Promise.resolve([])),\n ' ',\n dynamicCompletions,\n );\n if (tooltip) {\n this.prompt.setTitle(tooltip);\n }\n this.prompt.setPlaceholder(placeholder, accessiblePlaceholder);\n this.prompt.addEventListener(TextPromptEvents.TextChanged, this.onChangeCallback.bind(this));\n\n if (growFactor) {\n this.element.style.flexGrow = String(growFactor);\n }\n if (shrinkFactor) {\n this.element.style.flexShrink = String(shrinkFactor);\n }\n\n const clearButtonText = i18nString(UIStrings.clearInput);\n const clearButton = new Buttons.Button.Button();\n clearButton.className = 'toolbar-input-clear-button';\n clearButton.variant = Buttons.Button.Variant.ICON;\n clearButton.size = Buttons.Button.Size.SMALL;\n clearButton.iconName = 'cross-circle-filled';\n clearButton.title = clearButtonText;\n clearButton.ariaLabel = clearButtonText;\n clearButton.tabIndex = -1;\n\n clearButton.addEventListener('click', () => {\n this.setValue('', true);\n this.prompt.focus();\n });\n\n this.element.appendChild(clearButton);\n this.updateEmptyStyles();\n }\n\n override applyEnabledState(enabled: boolean): void {\n if (enabled) {\n this.element.classList.remove('disabled');\n } else {\n this.element.classList.add('disabled');\n }\n\n this.prompt.setEnabled(enabled);\n }\n\n setValue(value: string, notify?: boolean): void {\n this.prompt.setText(value);\n if (notify) {\n this.onChangeCallback();\n }\n this.updateEmptyStyles();\n }\n\n value(): string {\n return this.prompt.textWithCurrentSuggestion();\n }\n\n valueWithoutSuggestion(): string {\n return this.prompt.text();\n }\n\n clearAutocomplete(): void {\n this.prompt.clearAutocomplete();\n }\n\n focus(): void {\n this.prompt.focus();\n }\n\n private onKeydownCallback(event: KeyboardEvent): void {\n if (event.key === 'Enter' && this.prompt.text()) {\n this.dispatchEventToListeners(ToolbarInput.Event.EnterPressed, this.prompt.text());\n }\n if (!Platform.KeyboardUtilities.isEscKey(event) || !this.prompt.text()) {\n return;\n }\n this.setValue('', true);\n event.consume(true);\n }\n\n private onChangeCallback(): void {\n this.updateEmptyStyles();\n this.dispatchEventToListeners(ToolbarInput.Event.TextChanged, this.prompt.text());\n }\n\n private updateEmptyStyles(): void {\n this.element.classList.toggle('toolbar-input-empty', !this.prompt.text());\n }\n}\n\nexport class ToolbarFilter extends ToolbarInput {\n constructor(\n filterBy?: Common.UIString.LocalizedString, growFactor?: number, shrinkFactor?: number, tooltip?: string,\n completions?: ((arg0: string, arg1: string, arg2?: boolean|undefined) => Promise),\n dynamicCompletions?: boolean, jslogContext?: string) {\n const filterPlaceholder = filterBy ? filterBy : i18nString(UIStrings.filter);\n super(\n filterPlaceholder, filterPlaceholder, growFactor, shrinkFactor, tooltip, completions, dynamicCompletions,\n jslogContext);\n\n const filterIcon = IconButton.Icon.create('filter');\n this.element.prepend(filterIcon);\n }\n}\n\nexport namespace ToolbarInput {\n export const enum Event {\n TextChanged = 'TextChanged',\n EnterPressed = 'EnterPressed',\n }\n\n export interface EventTypes {\n [Event.TextChanged]: string;\n [Event.EnterPressed]: string;\n }\n}\n\nexport class ToolbarToggle extends ToolbarButton {\n private toggledInternal: boolean;\n private readonly untoggledGlyph: string|undefined;\n private readonly toggledGlyph: string|undefined;\n\n constructor(title: string, glyph?: string, toggledGlyph?: string, jslogContext?: string) {\n super(title, glyph, '');\n this.toggledInternal = false;\n this.untoggledGlyph = glyph;\n this.toggledGlyph = toggledGlyph;\n this.element.classList.add('toolbar-state-off');\n ARIAUtils.setPressed(this.element, false);\n if (jslogContext) {\n this.element.setAttribute('jslog', `${VisualLogging.toggle().track({click: true}).context(jslogContext)}`);\n }\n }\n\n toggled(): boolean {\n return this.toggledInternal;\n }\n\n setToggled(toggled: boolean): void {\n if (this.toggledInternal === toggled) {\n return;\n }\n this.toggledInternal = toggled;\n this.element.classList.toggle('toolbar-state-on', toggled);\n this.element.classList.toggle('toolbar-state-off', !toggled);\n ARIAUtils.setPressed(this.element, toggled);\n if (this.toggledGlyph && this.untoggledGlyph) {\n this.setGlyph(toggled ? this.toggledGlyph : this.untoggledGlyph);\n }\n }\n\n setDefaultWithRedColor(withRedColor: boolean): void {\n this.element.classList.toggle('toolbar-default-with-red-color', withRedColor);\n }\n\n setToggleWithRedColor(toggleWithRedColor: boolean): void {\n this.element.classList.toggle('toolbar-toggle-with-red-color', toggleWithRedColor);\n }\n\n setToggleWithDot(toggleWithDot: boolean): void {\n this.element.classList.toggle('toolbar-toggle-with-dot', toggleWithDot);\n }\n}\n\nexport class ToolbarMenuButton extends ToolbarCombobox {\n private readonly contextMenuHandler: (arg0: ContextMenu) => void;\n private readonly useSoftMenu: boolean;\n private triggerTimeout?: number;\n constructor(\n contextMenuHandler: (arg0: ContextMenu) => void, isIconDropdown?: boolean, useSoftMenu?: boolean,\n jslogContext?: string) {\n super('', isIconDropdown, jslogContext);\n if (jslogContext) {\n this.element.setAttribute('jslog', `${VisualLogging.dropDown().track({click: true}).context(jslogContext)}`);\n }\n this.contextMenuHandler = contextMenuHandler;\n this.useSoftMenu = Boolean(useSoftMenu);\n ARIAUtils.markAsMenuButton(this.element);\n }\n\n override mouseDown(event: MouseEvent): void {\n if (event.buttons !== 1) {\n super.mouseDown(event);\n return;\n }\n\n if (!this.triggerTimeout) {\n this.triggerTimeout = window.setTimeout(this.trigger.bind(this, event), 200);\n }\n }\n\n private trigger(event: Event): void {\n delete this.triggerTimeout;\n\n const contextMenu = new ContextMenu(event, {\n useSoftMenu: this.useSoftMenu,\n x: this.element.getBoundingClientRect().left,\n y: this.element.getBoundingClientRect().top + this.element.offsetHeight,\n // Without rAF, pointer events will be un-ignored too early, and a single click causes the\n // context menu to be closed and immediately re-opened on Windows (https://crbug.com/339560549).\n onSoftMenuClosed: () => requestAnimationFrame(() => this.element.removeAttribute('aria-expanded')),\n });\n this.contextMenuHandler(contextMenu);\n this.element.setAttribute('aria-expanded', 'true');\n void contextMenu.show();\n }\n\n override clicked(event: Event): void {\n if (this.triggerTimeout) {\n clearTimeout(this.triggerTimeout);\n }\n this.trigger(event);\n }\n}\n\nexport class ToolbarSettingToggle extends ToolbarToggle {\n private readonly defaultTitle: string;\n private readonly setting: Common.Settings.Setting;\n private willAnnounceState: boolean;\n\n constructor(\n setting: Common.Settings.Setting, glyph: string, title: string, toggledGlyph?: string,\n jslogContext?: string) {\n super(title, glyph, toggledGlyph, jslogContext);\n this.defaultTitle = title;\n this.setting = setting;\n this.settingChanged();\n this.setting.addChangeListener(this.settingChanged, this);\n\n // Determines whether the toggle state will be announced to a screen reader\n this.willAnnounceState = false;\n }\n\n private settingChanged(): void {\n const toggled = this.setting.get();\n this.setToggled(toggled);\n const toggleAnnouncement = toggled ? i18nString(UIStrings.pressed) : i18nString(UIStrings.notPressed);\n if (this.willAnnounceState) {\n ARIAUtils.alert(toggleAnnouncement);\n }\n this.willAnnounceState = false;\n this.setTitle(this.defaultTitle);\n }\n\n override clicked(event: Event): void {\n this.willAnnounceState = true;\n this.setting.set(!this.toggled());\n super.clicked(event);\n }\n}\n\nexport class ToolbarSeparator extends ToolbarItem {\n constructor(spacer?: boolean) {\n const element = document.createElement('div');\n element.classList.add(spacer ? 'toolbar-spacer' : 'toolbar-divider');\n super(element);\n }\n}\n\nexport interface Provider {\n item(): ToolbarItem|null;\n}\n\nexport interface ItemsProvider {\n toolbarItems(): ToolbarItem[];\n}\n\nexport class ToolbarComboBox extends ToolbarItem {\n protected selectElementInternal: HTMLSelectElement;\n\n constructor(changeHandler: ((arg0: Event) => void)|null, title: string, className?: string, jslogContext?: string) {\n const element = document.createElement('span');\n element.classList.add('toolbar-select-container');\n super(element);\n this.selectElementInternal = (this.element.createChild('select', 'toolbar-item') as HTMLSelectElement);\n const dropdownArrowIcon = IconButton.Icon.create('triangle-down', 'toolbar-dropdown-arrow');\n this.element.appendChild(dropdownArrowIcon);\n if (changeHandler) {\n this.selectElementInternal.addEventListener('change', changeHandler, false);\n }\n ARIAUtils.setLabel(this.selectElementInternal, title);\n super.setTitle(title);\n if (className) {\n this.selectElementInternal.classList.add(className);\n }\n if (jslogContext) {\n this.selectElementInternal.setAttribute(\n 'jslog', `${VisualLogging.dropDown().track({change: true}).context(jslogContext)}`);\n }\n }\n\n selectElement(): HTMLSelectElement {\n return this.selectElementInternal;\n }\n\n size(): number {\n return this.selectElementInternal.childElementCount;\n }\n\n options(): HTMLOptionElement[] {\n return Array.prototype.slice.call(this.selectElementInternal.children, 0);\n }\n\n addOption(option: Element): void {\n this.selectElementInternal.appendChild(option);\n }\n\n createOption(label: string, value?: string): Element {\n const option = (this.selectElementInternal.createChild('option') as HTMLOptionElement);\n option.text = label;\n if (typeof value !== 'undefined') {\n option.value = value;\n }\n const jslogContext = value ? Platform.StringUtilities.toKebabCase(value) : undefined;\n option.setAttribute('jslog', `${VisualLogging.item(jslogContext).track({click: true})}`);\n return option;\n }\n\n override applyEnabledState(enabled: boolean): void {\n super.applyEnabledState(enabled);\n this.selectElementInternal.disabled = !enabled;\n }\n\n removeOption(option: Element): void {\n this.selectElementInternal.removeChild(option);\n }\n\n removeOptions(): void {\n this.selectElementInternal.removeChildren();\n }\n\n selectedOption(): HTMLOptionElement|null {\n if (this.selectElementInternal.selectedIndex >= 0) {\n return this.selectElementInternal[this.selectElementInternal.selectedIndex] as HTMLOptionElement;\n }\n return null;\n }\n\n select(option: Element): void {\n this.selectElementInternal.selectedIndex = Array.prototype.indexOf.call(this.selectElementInternal, option);\n }\n\n setSelectedIndex(index: number): void {\n this.selectElementInternal.selectedIndex = index;\n }\n\n selectedIndex(): number {\n return this.selectElementInternal.selectedIndex;\n }\n\n setMaxWidth(width: number): void {\n this.selectElementInternal.style.maxWidth = width + 'px';\n }\n\n setMinWidth(width: number): void {\n this.selectElementInternal.style.minWidth = width + 'px';\n }\n}\n\nexport interface Option {\n value: string;\n label: string;\n}\n\nexport class ToolbarSettingComboBox extends ToolbarComboBox {\n private optionsInternal: Option[];\n private readonly setting: Common.Settings.Setting;\n private muteSettingListener?: boolean;\n constructor(options: Option[], setting: Common.Settings.Setting, accessibleName: string) {\n super(null, accessibleName);\n this.optionsInternal = options;\n this.setting = setting;\n this.selectElementInternal.addEventListener('change', this.valueChanged.bind(this), false);\n this.setOptions(options);\n setting.addChangeListener(this.settingChanged, this);\n }\n\n setOptions(options: Option[]): void {\n this.optionsInternal = options;\n this.selectElementInternal.removeChildren();\n for (let i = 0; i < options.length; ++i) {\n const dataOption = options[i];\n const option = this.createOption(dataOption.label, dataOption.value);\n this.selectElementInternal.appendChild(option);\n if (this.setting.get() === dataOption.value) {\n this.setSelectedIndex(i);\n }\n }\n }\n\n value(): string {\n return this.optionsInternal[this.selectedIndex()].value;\n }\n\n private settingChanged(): void {\n if (this.muteSettingListener) {\n return;\n }\n\n const value = this.setting.get();\n for (let i = 0; i < this.optionsInternal.length; ++i) {\n if (value === this.optionsInternal[i].value) {\n this.setSelectedIndex(i);\n break;\n }\n }\n }\n\n private valueChanged(_event: Event): void {\n const option = this.optionsInternal[this.selectedIndex()];\n this.muteSettingListener = true;\n this.setting.set(option.value);\n this.muteSettingListener = false;\n }\n}\n\nexport class ToolbarCheckbox extends ToolbarItem {\n inputElement: HTMLInputElement;\n\n constructor(text: string, tooltip?: string, listener?: ((arg0: MouseEvent) => void), jslogContext?: string) {\n super(CheckboxLabel.create(text));\n this.element.classList.add('checkbox');\n this.inputElement = (this.element as CheckboxLabel).checkboxElement;\n if (tooltip) {\n // install on the checkbox\n Tooltip.install(this.inputElement, tooltip);\n Tooltip.install((this.element as CheckboxLabel).textElement, tooltip);\n }\n if (listener) {\n this.inputElement.addEventListener('click', listener, false);\n }\n if (jslogContext) {\n this.inputElement.setAttribute('jslog', `${VisualLogging.toggle().track({change: true}).context(jslogContext)}`);\n }\n }\n\n checked(): boolean {\n return this.inputElement.checked;\n }\n\n setChecked(value: boolean): void {\n this.inputElement.checked = value;\n }\n\n override applyEnabledState(enabled: boolean): void {\n super.applyEnabledState(enabled);\n this.inputElement.disabled = !enabled;\n }\n\n setIndeterminate(indeterminate: boolean): void {\n this.inputElement.indeterminate = indeterminate;\n }\n}\n\nexport class ToolbarSettingCheckbox extends ToolbarCheckbox {\n constructor(setting: Common.Settings.Setting, tooltip?: string, alternateTitle?: string) {\n super(alternateTitle || setting.title() || '', tooltip, undefined, setting.name);\n bindCheckbox(this.inputElement, setting);\n }\n}\n\nconst registeredToolbarItems: ToolbarItemRegistration[] = [];\n\nexport function registerToolbarItem(registration: ToolbarItemRegistration): void {\n registeredToolbarItems.push(registration);\n}\n\nfunction getRegisteredToolbarItems(): ToolbarItemRegistration[] {\n return registeredToolbarItems.filter(\n item => Root.Runtime.Runtime.isDescriptorEnabled({experiment: item.experiment, condition: item.condition}));\n}\n\nexport interface ToolbarItemRegistration {\n order?: number;\n location: ToolbarItemLocation;\n separator?: boolean;\n label?: () => Platform.UIString.LocalizedString;\n showLabel?: boolean;\n actionId?: string;\n condition?: Root.Runtime.Condition;\n loadItem?: (() => Promise);\n experiment?: string;\n jslog?: string;\n}\n\nexport const enum ToolbarItemLocation {\n FILES_NAVIGATION_TOOLBAR = 'files-navigator-toolbar',\n MAIN_TOOLBAR_RIGHT = 'main-toolbar-right',\n MAIN_TOOLBAR_LEFT = 'main-toolbar-left',\n STYLES_SIDEBARPANE_TOOLBAR = 'styles-sidebarpane-toolbar',\n}\n"]} \ No newline at end of file +{"version":3,"file":"Toolbar.js","sourceRoot":"","sources":["../../../../../../front_end/ui/legacy/Toolbar.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,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,OAAO,MAAM,wCAAwC,CAAC;AAClE,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAC3E,OAAO,KAAK,QAAQ,MAAM,oCAAoC,CAAC;AAC/D,OAAO,KAAK,UAAU,MAAM,0CAA0C,CAAC;AAGvE,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAC,SAAS,EAAwB,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAA6B,UAAU,EAAC,MAAM,iBAAiB,CAAC;AACvE,OAAO,aAAa,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AACrC,OAAO,EAAC,aAAa,EAAE,8BAA8B,EAAE,mBAAmB,EAAC,MAAM,cAAc,CAAC;AAEhG,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH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CAAC,MAAM,CAChC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAC,CAAC,CAAC,CAAC;AAClH,CAAC","sourcesContent":["/*\n * Copyright (C) 2009 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 Root from '../../core/root/root.js';\nimport * as Buttons from '../../ui/components/buttons/buttons.js';\nimport * as VisualLogging from '../../ui/visual_logging/visual_logging.js';\nimport * as Adorners from '../components/adorners/adorners.js';\nimport * as IconButton from '../components/icon_button/icon_button.js';\n\nimport {type Action, Events as ActionEvents} from './ActionRegistration.js';\nimport {ActionRegistry} from './ActionRegistry.js';\nimport * as ARIAUtils from './ARIAUtils.js';\nimport {ContextMenu} from './ContextMenu.js';\nimport {GlassPane, PointerEventsBehavior} from './GlassPane.js';\nimport {bindCheckbox} from './SettingsUI.js';\nimport {type Suggestion} from './SuggestBox.js';\nimport {Events as TextPromptEvents, TextPrompt} from './TextPrompt.js';\nimport toolbarStyles from './toolbar.css.legacy.js';\nimport {Tooltip} from './Tooltip.js';\nimport {CheckboxLabel, createShadowRootWithCoreStyles, LongClickController} from './UIUtils.js';\n\nconst UIStrings = {\n /**\n *@description Announced screen reader message for ToolbarSettingToggle when the setting is toggled on.\n */\n pressed: 'pressed',\n /**\n *@description Announced screen reader message for ToolbarSettingToggle when the setting is toggled off.\n */\n notPressed: 'not pressed',\n /**\n *@description Tooltip shown when the user hovers over the clear icon to empty the text input.\n */\n clearInput: 'Clear',\n /**\n *@description Placeholder for filter bars that shows before the user types in a filter keyword.\n */\n filter: 'Filter',\n};\nconst str_ = i18n.i18n.registerUIStrings('ui/legacy/Toolbar.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class Toolbar {\n private items: ToolbarItem[];\n element: HTMLElement;\n enabled: boolean;\n private readonly shadowRoot: ShadowRoot;\n private contentElement: Element;\n private compactLayout = false;\n\n constructor(className: string, parentElement?: Element) {\n this.items = [];\n this.element = (parentElement ? parentElement.createChild('div') : document.createElement('div')) as HTMLElement;\n this.element.className = className;\n this.element.classList.add('toolbar');\n this.enabled = true;\n this.shadowRoot = createShadowRootWithCoreStyles(this.element, {cssFile: toolbarStyles, delegatesFocus: undefined});\n this.contentElement = this.shadowRoot.createChild('div', 'toolbar-shadow');\n }\n\n hasCompactLayout(): boolean {\n return this.compactLayout;\n }\n\n registerCSSFiles(cssFiles: CSSStyleSheet[]): void {\n this.shadowRoot.adoptedStyleSheets = this.shadowRoot.adoptedStyleSheets.concat(cssFiles);\n }\n\n setCompactLayout(enable: boolean): void {\n if (this.compactLayout === enable) {\n return;\n }\n this.compactLayout = enable;\n for (const item of this.items) {\n item.setCompactLayout(enable);\n }\n }\n\n static createLongPressActionButton(\n action: Action, toggledOptions: ToolbarButton[], untoggledOptions: ToolbarButton[]): ToolbarButton {\n const button = Toolbar.createActionButton(action);\n const mainButtonClone = Toolbar.createActionButton(action);\n\n let longClickController: LongClickController|null = null;\n let longClickButtons: ToolbarButton[]|null = null;\n let longClickGlyph: IconButton.Icon.Icon|null = null;\n\n action.addEventListener(ActionEvents.Toggled, updateOptions);\n updateOptions();\n return button;\n\n function updateOptions(): void {\n const buttons = action.toggled() ? (toggledOptions || null) : (untoggledOptions || null);\n\n if (buttons && buttons.length) {\n if (!longClickController) {\n longClickController = new LongClickController(button.element, showOptions);\n longClickGlyph = IconButton.Icon.create('triangle-bottom-right', 'long-click-glyph');\n button.element.appendChild(longClickGlyph);\n longClickButtons = buttons;\n }\n } else {\n if (longClickController) {\n longClickController.dispose();\n longClickController = null;\n if (longClickGlyph) {\n longClickGlyph.remove();\n }\n longClickGlyph = null;\n longClickButtons = null;\n }\n }\n }\n\n function showOptions(): void {\n let buttons: ToolbarButton[] = longClickButtons ? longClickButtons.slice() : [];\n buttons.push(mainButtonClone);\n\n const document = button.element.ownerDocument;\n document.documentElement.addEventListener('mouseup', mouseUp, false);\n\n const optionsGlassPane = new GlassPane();\n optionsGlassPane.setPointerEventsBehavior(PointerEventsBehavior.BlockedByGlassPane);\n optionsGlassPane.show(document);\n const optionsBar = new Toolbar('fill', optionsGlassPane.contentElement);\n optionsBar.contentElement.classList.add('floating');\n const buttonHeight = 26;\n\n const hostButtonPosition = button.element.boxInWindow().relativeToElement(GlassPane.container(document));\n\n const topNotBottom = hostButtonPosition.y + buttonHeight * buttons.length < document.documentElement.offsetHeight;\n\n if (topNotBottom) {\n buttons = buttons.reverse();\n }\n\n optionsBar.element.style.height = (buttonHeight * buttons.length) + 'px';\n if (topNotBottom) {\n optionsBar.element.style.top = (hostButtonPosition.y - 5) + 'px';\n } else {\n optionsBar.element.style.top = (hostButtonPosition.y - (buttonHeight * (buttons.length - 1)) - 6) + 'px';\n }\n optionsBar.element.style.left = (hostButtonPosition.x - 5) + 'px';\n\n for (let i = 0; i < buttons.length; ++i) {\n buttons[i].element.addEventListener('mousemove', mouseOver, false);\n buttons[i].element.addEventListener('mouseout', mouseOut, false);\n optionsBar.appendToolbarItem(buttons[i]);\n }\n const hostButtonIndex = topNotBottom ? 0 : buttons.length - 1;\n buttons[hostButtonIndex].element.classList.add('emulate-active');\n\n function mouseOver(e: Event): void {\n if ((e as MouseEvent).which !== 1) {\n return;\n }\n if (e.target instanceof HTMLElement) {\n const buttonElement = e.target.enclosingNodeOrSelfWithClass('toolbar-item');\n buttonElement.classList.add('emulate-active');\n }\n }\n\n function mouseOut(e: Event): void {\n if ((e as MouseEvent).which !== 1) {\n return;\n }\n if (e.target instanceof HTMLElement) {\n const buttonElement = e.target.enclosingNodeOrSelfWithClass('toolbar-item');\n buttonElement.classList.remove('emulate-active');\n }\n }\n\n function mouseUp(e: Event): void {\n if ((e as MouseEvent).which !== 1) {\n return;\n }\n optionsGlassPane.hide();\n document.documentElement.removeEventListener('mouseup', mouseUp, false);\n\n for (let i = 0; i < buttons.length; ++i) {\n if (buttons[i].element.classList.contains('emulate-active')) {\n buttons[i].element.classList.remove('emulate-active');\n buttons[i].clicked(e);\n break;\n }\n }\n }\n }\n }\n\n static createActionButton(action: Action, options: ToolbarButtonOptions|undefined = TOOLBAR_BUTTON_DEFAULT_OPTIONS):\n ToolbarButton {\n const button = action.toggleable() ? makeToggle() : makeButton();\n\n if (options.showLabel) {\n button.setText(options.label?.() || action.title());\n }\n\n let handler = (): void => {\n void action.execute();\n };\n if (options.userActionCode) {\n const actionCode = options.userActionCode;\n handler = () => {\n Host.userMetrics.actionTaken(actionCode);\n void action.execute();\n };\n }\n button.addEventListener(ToolbarButton.Events.Click, handler, action);\n action.addEventListener(ActionEvents.Enabled, enabledChanged);\n button.setEnabled(action.enabled());\n return button;\n\n function makeButton(): ToolbarButton {\n const button = new ToolbarButton(action.title(), action.icon(), undefined, action.id());\n if (action.title()) {\n Tooltip.installWithActionBinding(button.element, action.title(), action.id());\n }\n return button;\n }\n\n function makeToggle(): ToolbarToggle {\n const toggleButton = new ToolbarToggle(action.title(), action.icon(), action.toggledIcon(), action.id());\n toggleButton.setToggleWithRedColor(action.toggleWithRedColor());\n action.addEventListener(ActionEvents.Toggled, toggled);\n toggled();\n return toggleButton;\n\n function toggled(): void {\n toggleButton.setToggled(action.toggled());\n if (action.title()) {\n toggleButton.setTitle(action.title());\n Tooltip.installWithActionBinding(toggleButton.element, action.title(), action.id());\n }\n }\n }\n\n function enabledChanged(event: Common.EventTarget.EventTargetEvent): void {\n button.setEnabled(event.data);\n }\n }\n\n static createActionButtonForId(actionId: string, options?: ToolbarButtonOptions): ToolbarButton {\n const action = ActionRegistry.instance().getAction(actionId);\n return Toolbar.createActionButton(action, options);\n }\n\n gripElementForResize(): Element {\n return this.contentElement;\n }\n\n makeWrappable(growVertically?: boolean): void {\n this.contentElement.classList.add('wrappable');\n if (growVertically) {\n this.contentElement.classList.add('toolbar-grow-vertical');\n }\n }\n\n makeVertical(): void {\n this.contentElement.classList.add('vertical');\n }\n\n makeBlueOnHover(): void {\n this.contentElement.classList.add('toolbar-blue-on-hover');\n }\n\n makeToggledGray(): void {\n this.contentElement.classList.add('toolbar-toggled-gray');\n }\n\n renderAsLinks(): void {\n this.contentElement.classList.add('toolbar-render-as-links');\n }\n\n empty(): boolean {\n return !this.items.length;\n }\n\n setEnabled(enabled: boolean): void {\n this.enabled = enabled;\n for (const item of this.items) {\n item.applyEnabledState(this.enabled && item.enabled);\n }\n }\n\n appendToolbarItem(item: ToolbarItem): void {\n this.items.push(item);\n item.toolbar = this;\n item.setCompactLayout(this.hasCompactLayout());\n if (!this.enabled) {\n item.applyEnabledState(false);\n }\n this.contentElement.appendChild(item.element);\n this.hideSeparatorDupes();\n }\n\n appendSeparator(): void {\n this.appendToolbarItem(new ToolbarSeparator());\n }\n\n appendSpacer(): void {\n this.appendToolbarItem(new ToolbarSeparator(true));\n }\n\n appendText(text: string): void {\n this.appendToolbarItem(new ToolbarText(text));\n }\n\n removeToolbarItem(itemToRemove: ToolbarItem): void {\n const updatedItems = [];\n for (const item of this.items) {\n if (item === itemToRemove) {\n item.element.remove();\n } else {\n updatedItems.push(item);\n }\n }\n this.items = updatedItems;\n }\n\n removeToolbarItems(): void {\n for (const item of this.items) {\n item.toolbar = null;\n }\n this.items = [];\n this.contentElement.removeChildren();\n }\n\n setColor(color: string): void {\n const style = document.createElement('style');\n style.textContent = '.toolbar-glyph { background-color: ' + color + ' !important }';\n this.shadowRoot.appendChild(style);\n }\n\n setToggledColor(color: string): void {\n const style = document.createElement('style');\n style.textContent =\n '.toolbar-button.toolbar-state-on .toolbar-glyph { background-color: ' + color + ' !important }';\n this.shadowRoot.appendChild(style);\n }\n\n hideSeparatorDupes(): void {\n if (!this.items.length) {\n return;\n }\n // Don't hide first and last separators if they were added explicitly.\n let previousIsSeparator = false;\n let lastSeparator;\n let nonSeparatorVisible = false;\n for (let i = 0; i < this.items.length; ++i) {\n if (this.items[i] instanceof ToolbarSeparator) {\n this.items[i].setVisible(!previousIsSeparator);\n previousIsSeparator = true;\n lastSeparator = this.items[i];\n continue;\n }\n if (this.items[i].visible()) {\n previousIsSeparator = false;\n lastSeparator = null;\n nonSeparatorVisible = true;\n }\n }\n if (lastSeparator && lastSeparator !== this.items[this.items.length - 1]) {\n lastSeparator.setVisible(false);\n }\n\n this.element.classList.toggle(\n 'hidden',\n lastSeparator !== null && lastSeparator !== undefined && lastSeparator.visible() && !nonSeparatorVisible);\n }\n\n async appendItemsAtLocation(location: string): Promise {\n const extensions: ToolbarItemRegistration[] = getRegisteredToolbarItems();\n\n extensions.sort((extension1, extension2) => {\n const order1 = extension1.order || 0;\n const order2 = extension2.order || 0;\n return order1 - order2;\n });\n\n const filtered = extensions.filter(e => e.location === location);\n const items = await Promise.all(filtered.map(extension => {\n const {separator, actionId, showLabel, label, loadItem} = extension;\n if (separator) {\n return new ToolbarSeparator();\n }\n if (actionId) {\n return Toolbar.createActionButtonForId(\n actionId, {label, showLabel: Boolean(showLabel), userActionCode: undefined});\n }\n // TODO(crbug.com/1134103) constratint the case checked with this if using TS type definitions once UI is TS-authored.\n if (!loadItem) {\n throw new Error('Could not load a toolbar item registration with no loadItem function');\n }\n return loadItem().then(p => (p as Provider).item());\n }));\n\n for (const item of items) {\n if (item) {\n this.appendToolbarItem(item);\n }\n }\n }\n}\nexport interface ToolbarButtonOptions {\n label?: () => Platform.UIString.LocalizedString;\n showLabel: boolean;\n userActionCode?: Host.UserMetrics.Action;\n}\n\nconst TOOLBAR_BUTTON_DEFAULT_OPTIONS: ToolbarButtonOptions = {\n showLabel: false,\n userActionCode: undefined,\n};\n\n// We need any here because Common.ObjectWrapper.ObjectWrapper is invariant in T.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport class ToolbarItem extends Common.ObjectWrapper.ObjectWrapper {\n element: HTMLElement;\n private visibleInternal: boolean;\n enabled: boolean;\n toolbar: Toolbar|null;\n protected title?: string;\n\n constructor(element: Element) {\n super();\n this.element = (element as HTMLElement);\n this.element.classList.add('toolbar-item');\n this.visibleInternal = true;\n this.enabled = true;\n\n /**\n * Set by the parent toolbar during appending.\n */\n this.toolbar = null;\n }\n\n setTitle(title: string, actionId: string|undefined = undefined): void {\n if (this.title === title) {\n return;\n }\n this.title = title;\n ARIAUtils.setLabel(this.element, title);\n if (actionId === undefined) {\n Tooltip.install(this.element, title);\n } else {\n Tooltip.installWithActionBinding(this.element, title, actionId);\n }\n }\n\n setEnabled(value: boolean): void {\n if (this.enabled === value) {\n return;\n }\n this.enabled = value;\n this.applyEnabledState(this.enabled && (!this.toolbar || this.toolbar.enabled));\n }\n\n applyEnabledState(enabled: boolean): void {\n // @ts-ignore: Ignoring in favor of an `instanceof` check for all the different\n // kind of HTMLElement classes that have a disabled attribute.\n this.element.disabled = !enabled;\n }\n\n visible(): boolean {\n return this.visibleInternal;\n }\n\n setVisible(x: boolean): void {\n if (this.visibleInternal === x) {\n return;\n }\n this.element.classList.toggle('hidden', !x);\n this.visibleInternal = x;\n if (this.toolbar && !(this instanceof ToolbarSeparator)) {\n this.toolbar.hideSeparatorDupes();\n }\n }\n\n setRightAligned(alignRight: boolean): void {\n this.element.classList.toggle('toolbar-item-right-aligned', alignRight);\n }\n\n setCompactLayout(_enable: boolean): void {\n }\n}\n\nexport const enum ToolbarItemWithCompactLayoutEvents {\n CompactLayoutUpdated = 'CompactLayoutUpdated',\n}\n\ntype ToolbarItemWithCompactLayoutEventTypes = {\n [ToolbarItemWithCompactLayoutEvents.CompactLayoutUpdated]: boolean,\n};\n\nexport class ToolbarItemWithCompactLayout extends ToolbarItem {\n constructor(element: Element) {\n super(element);\n }\n\n override setCompactLayout(enable: boolean): void {\n this.dispatchEventToListeners(ToolbarItemWithCompactLayoutEvents.CompactLayoutUpdated, enable);\n }\n}\n\nexport class ToolbarText extends ToolbarItem {\n constructor(text?: string) {\n const element = document.createElement('div');\n element.classList.add('toolbar-text');\n super(element);\n this.element.classList.add('toolbar-text');\n this.setText(text || '');\n }\n\n text(): string {\n return this.element.textContent || '';\n }\n\n setText(text: string): void {\n this.element.textContent = text;\n }\n}\n\nexport class ToolbarButton extends ToolbarItem {\n private readonly glyphElement: IconButton.Icon.Icon;\n private textElement: HTMLElement;\n private text?: string;\n private glyph?: string;\n private adorner?: HTMLElement;\n\n constructor(title: string, glyphOrAdorner?: string|Adorners.Adorner.Adorner, text?: string, jslogContext?: string) {\n const element = document.createElement('button');\n element.classList.add('toolbar-button');\n super(element);\n this.element.addEventListener('click', this.clicked.bind(this), false);\n this.element.addEventListener('mousedown', this.mouseDown.bind(this), false);\n\n this.glyphElement = new IconButton.Icon.Icon();\n this.glyphElement.className = 'toolbar-glyph hidden';\n this.element.appendChild(this.glyphElement);\n this.textElement = this.element.createChild('div', 'toolbar-text hidden');\n\n this.setTitle(title);\n if (glyphOrAdorner) {\n this.setGlyphOrAdorner(glyphOrAdorner);\n }\n this.setText(text || '');\n if (jslogContext) {\n this.element.setAttribute('jslog', `${VisualLogging.action().track({click: true}).context(jslogContext)}`);\n }\n this.title = '';\n }\n\n focus(): void {\n this.element.focus();\n }\n\n setText(text: string): void {\n if (this.text === text) {\n return;\n }\n this.textElement.textContent = text;\n this.textElement.classList.toggle('hidden', !text);\n this.text = text;\n }\n\n setGlyphOrAdorner(glyphOrAdorner: string|Adorners.Adorner.Adorner): void {\n if (glyphOrAdorner instanceof Adorners.Adorner.Adorner) {\n if (this.adorner) {\n this.adorner.replaceWith(glyphOrAdorner);\n } else {\n this.element.prepend(glyphOrAdorner);\n }\n this.adorner = glyphOrAdorner;\n } else {\n this.setGlyph(glyphOrAdorner);\n }\n }\n\n setGlyph(glyph: string): void {\n if (this.glyph === glyph) {\n return;\n }\n this.glyphElement.name = !glyph ? null : glyph;\n this.glyphElement.classList.toggle('hidden', !glyph);\n this.element.classList.toggle('toolbar-has-glyph', Boolean(glyph));\n this.glyph = glyph;\n }\n\n setBackgroundImage(iconURL: string): void {\n this.element.style.backgroundImage = 'url(' + iconURL + ')';\n }\n\n setSecondary(): void {\n this.element.classList.add('toolbar-button-secondary');\n }\n\n setDarkText(): void {\n this.element.classList.add('dark-text');\n }\n\n turnIntoSelect(shrinkable: boolean|undefined = false): void {\n this.element.classList.add('toolbar-has-dropdown');\n if (shrinkable) {\n this.element.classList.add('toolbar-has-dropdown-shrinkable');\n }\n const dropdownArrowIcon = IconButton.Icon.create('triangle-down', 'toolbar-dropdown-arrow');\n this.element.appendChild(dropdownArrowIcon);\n }\n\n clicked(event: Event): void {\n if (!this.enabled) {\n return;\n }\n this.dispatchEventToListeners(ToolbarButton.Events.Click, event);\n event.consume();\n }\n\n protected mouseDown(event: MouseEvent): void {\n if (!this.enabled) {\n return;\n }\n this.dispatchEventToListeners(ToolbarButton.Events.MouseDown, event);\n }\n}\n\nexport class ToolbarCombobox extends ToolbarItem {\n private readonly glyphElement: IconButton.Icon.Icon;\n private textElement: HTMLElement;\n private text?: string;\n private glyph?: string;\n\n constructor(title: string, isIconDropdown?: boolean, jslogContext?: string) {\n const element = document.createElement('button');\n element.classList.add('toolbar-button');\n super(element);\n this.element.addEventListener('click', this.clicked.bind(this), false);\n this.element.addEventListener('mousedown', this.mouseDown.bind(this), false);\n\n this.glyphElement = new IconButton.Icon.Icon();\n this.glyphElement.className = 'toolbar-glyph hidden';\n this.element.appendChild(this.glyphElement);\n this.textElement = this.element.createChild('div', 'toolbar-text hidden');\n\n this.setTitle(title);\n if (jslogContext) {\n this.element.setAttribute('jslog', `${VisualLogging.action().track({click: true}).context(jslogContext)}`);\n }\n this.title = '';\n if (!isIconDropdown) {\n this.element.classList.add('toolbar-has-dropdown');\n const dropdownArrowIcon = IconButton.Icon.create('triangle-down', 'toolbar-dropdown-arrow');\n this.element.appendChild(dropdownArrowIcon);\n }\n }\n\n setText(text: string): void {\n if (this.text === text) {\n return;\n }\n this.textElement.textContent = text;\n this.textElement.classList.toggle('hidden', !text);\n this.text = text;\n }\n\n setGlyph(glyph: string): void {\n if (this.glyph === glyph) {\n return;\n }\n this.glyphElement.name = !glyph ? null : glyph;\n this.glyphElement.classList.toggle('hidden', !glyph);\n this.element.classList.toggle('toolbar-has-glyph', Boolean(glyph));\n this.glyph = glyph;\n }\n\n setDarkText(): void {\n this.element.classList.add('dark-text');\n }\n\n turnShrinkable(): void {\n this.element.classList.add('toolbar-has-dropdown-shrinkable');\n }\n\n clicked(event: Event): void {\n if (!this.enabled) {\n return;\n }\n this.dispatchEventToListeners(ToolbarButton.Events.Click, event);\n event.consume();\n }\n\n protected mouseDown(event: MouseEvent): void {\n if (!this.enabled) {\n return;\n }\n this.dispatchEventToListeners(ToolbarButton.Events.MouseDown, event);\n }\n}\n\nexport namespace ToolbarButton {\n export const enum Events {\n Click = 'Click',\n MouseDown = 'MouseDown',\n }\n\n export type EventTypes = {\n [Events.Click]: Event,\n [Events.MouseDown]: MouseEvent,\n };\n}\n\nexport class ToolbarInput extends ToolbarItem {\n private prompt: TextPrompt;\n private readonly proxyElement: Element;\n\n constructor(\n placeholder: string, accessiblePlaceholder?: string, growFactor?: number, shrinkFactor?: number, tooltip?: string,\n completions?: ((arg0: string, arg1: string, arg2?: boolean|undefined) => Promise),\n dynamicCompletions?: boolean, jslogContext?: string) {\n const element = document.createElement('div');\n element.classList.add('toolbar-input');\n super(element);\n\n const internalPromptElement = this.element.createChild('div', 'toolbar-input-prompt');\n ARIAUtils.setLabel(internalPromptElement, accessiblePlaceholder || placeholder);\n internalPromptElement.addEventListener('focus', () => this.element.classList.add('focused'));\n internalPromptElement.addEventListener('blur', () => this.element.classList.remove('focused'));\n\n this.prompt = new TextPrompt();\n this.prompt.jslogContext = jslogContext;\n this.proxyElement = this.prompt.attach(internalPromptElement);\n this.proxyElement.classList.add('toolbar-prompt-proxy');\n this.proxyElement.addEventListener('keydown', (event: Event) => this.onKeydownCallback(event as KeyboardEvent));\n this.prompt.initialize(\n completions || (() => Promise.resolve([])),\n ' ',\n dynamicCompletions,\n );\n if (tooltip) {\n this.prompt.setTitle(tooltip);\n }\n this.prompt.setPlaceholder(placeholder, accessiblePlaceholder);\n this.prompt.addEventListener(TextPromptEvents.TextChanged, this.onChangeCallback.bind(this));\n\n if (growFactor) {\n this.element.style.flexGrow = String(growFactor);\n }\n if (shrinkFactor) {\n this.element.style.flexShrink = String(shrinkFactor);\n }\n\n const clearButtonText = i18nString(UIStrings.clearInput);\n const clearButton = new Buttons.Button.Button();\n clearButton.className = 'toolbar-input-clear-button';\n clearButton.variant = Buttons.Button.Variant.ICON;\n clearButton.size = Buttons.Button.Size.SMALL;\n clearButton.iconName = 'cross-circle-filled';\n clearButton.title = clearButtonText;\n clearButton.ariaLabel = clearButtonText;\n clearButton.tabIndex = -1;\n\n clearButton.addEventListener('click', () => {\n this.setValue('', true);\n this.prompt.focus();\n });\n\n this.element.appendChild(clearButton);\n this.updateEmptyStyles();\n }\n\n override applyEnabledState(enabled: boolean): void {\n if (enabled) {\n this.element.classList.remove('disabled');\n } else {\n this.element.classList.add('disabled');\n }\n\n this.prompt.setEnabled(enabled);\n }\n\n setValue(value: string, notify?: boolean): void {\n this.prompt.setText(value);\n if (notify) {\n this.onChangeCallback();\n }\n this.updateEmptyStyles();\n }\n\n value(): string {\n return this.prompt.textWithCurrentSuggestion();\n }\n\n valueWithoutSuggestion(): string {\n return this.prompt.text();\n }\n\n clearAutocomplete(): void {\n this.prompt.clearAutocomplete();\n }\n\n focus(): void {\n this.prompt.focus();\n }\n\n private onKeydownCallback(event: KeyboardEvent): void {\n if (event.key === 'Enter' && this.prompt.text()) {\n this.dispatchEventToListeners(ToolbarInput.Event.EnterPressed, this.prompt.text());\n }\n if (!Platform.KeyboardUtilities.isEscKey(event) || !this.prompt.text()) {\n return;\n }\n this.setValue('', true);\n event.consume(true);\n }\n\n private onChangeCallback(): void {\n this.updateEmptyStyles();\n this.dispatchEventToListeners(ToolbarInput.Event.TextChanged, this.prompt.text());\n }\n\n private updateEmptyStyles(): void {\n this.element.classList.toggle('toolbar-input-empty', !this.prompt.text());\n }\n}\n\nexport class ToolbarFilter extends ToolbarInput {\n constructor(\n filterBy?: Common.UIString.LocalizedString, growFactor?: number, shrinkFactor?: number, tooltip?: string,\n completions?: ((arg0: string, arg1: string, arg2?: boolean|undefined) => Promise),\n dynamicCompletions?: boolean, jslogContext?: string) {\n const filterPlaceholder = filterBy ? filterBy : i18nString(UIStrings.filter);\n super(\n filterPlaceholder, filterPlaceholder, growFactor, shrinkFactor, tooltip, completions, dynamicCompletions,\n jslogContext);\n\n const filterIcon = IconButton.Icon.create('filter');\n this.element.prepend(filterIcon);\n }\n}\n\nexport namespace ToolbarInput {\n export const enum Event {\n TextChanged = 'TextChanged',\n EnterPressed = 'EnterPressed',\n }\n\n export interface EventTypes {\n [Event.TextChanged]: string;\n [Event.EnterPressed]: string;\n }\n}\n\nexport class ToolbarToggle extends ToolbarButton {\n private toggledInternal: boolean;\n private readonly untoggledGlyph: string|undefined;\n private readonly toggledGlyph: string|undefined;\n\n constructor(title: string, glyph?: string, toggledGlyph?: string, jslogContext?: string) {\n super(title, glyph, '');\n this.toggledInternal = false;\n this.untoggledGlyph = glyph;\n this.toggledGlyph = toggledGlyph;\n this.element.classList.add('toolbar-state-off');\n ARIAUtils.setPressed(this.element, false);\n if (jslogContext) {\n this.element.setAttribute('jslog', `${VisualLogging.toggle().track({click: true}).context(jslogContext)}`);\n }\n }\n\n toggled(): boolean {\n return this.toggledInternal;\n }\n\n setToggled(toggled: boolean): void {\n if (this.toggledInternal === toggled) {\n return;\n }\n this.toggledInternal = toggled;\n this.element.classList.toggle('toolbar-state-on', toggled);\n this.element.classList.toggle('toolbar-state-off', !toggled);\n ARIAUtils.setPressed(this.element, toggled);\n if (this.toggledGlyph && this.untoggledGlyph) {\n this.setGlyph(toggled ? this.toggledGlyph : this.untoggledGlyph);\n }\n }\n\n setDefaultWithRedColor(withRedColor: boolean): void {\n this.element.classList.toggle('toolbar-default-with-red-color', withRedColor);\n }\n\n setToggleWithRedColor(toggleWithRedColor: boolean): void {\n this.element.classList.toggle('toolbar-toggle-with-red-color', toggleWithRedColor);\n }\n\n setToggleWithDot(toggleWithDot: boolean): void {\n this.element.classList.toggle('toolbar-toggle-with-dot', toggleWithDot);\n }\n}\n\nexport class ToolbarMenuButton extends ToolbarCombobox {\n private readonly contextMenuHandler: (arg0: ContextMenu) => void;\n private readonly useSoftMenu: boolean;\n private triggerTimeout?: number;\n constructor(\n contextMenuHandler: (arg0: ContextMenu) => void, isIconDropdown?: boolean, useSoftMenu?: boolean,\n jslogContext?: string) {\n super('', isIconDropdown, jslogContext);\n if (jslogContext) {\n this.element.setAttribute('jslog', `${VisualLogging.dropDown().track({click: true}).context(jslogContext)}`);\n }\n this.contextMenuHandler = contextMenuHandler;\n this.useSoftMenu = Boolean(useSoftMenu);\n ARIAUtils.markAsMenuButton(this.element);\n }\n\n override mouseDown(event: MouseEvent): void {\n if (event.buttons !== 1) {\n super.mouseDown(event);\n return;\n }\n\n if (!this.triggerTimeout) {\n this.triggerTimeout = window.setTimeout(this.trigger.bind(this, event), 200);\n }\n }\n\n private trigger(event: Event): void {\n delete this.triggerTimeout;\n\n const contextMenu = new ContextMenu(event, {\n useSoftMenu: this.useSoftMenu,\n x: this.element.getBoundingClientRect().left,\n y: this.element.getBoundingClientRect().top + this.element.offsetHeight,\n // Without rAF, pointer events will be un-ignored too early, and a single click causes the\n // context menu to be closed and immediately re-opened on Windows (https://crbug.com/339560549).\n onSoftMenuClosed: () => requestAnimationFrame(() => this.element.removeAttribute('aria-expanded')),\n });\n this.contextMenuHandler(contextMenu);\n this.element.setAttribute('aria-expanded', 'true');\n void contextMenu.show();\n }\n\n override clicked(event: Event): void {\n if (this.triggerTimeout) {\n clearTimeout(this.triggerTimeout);\n }\n this.trigger(event);\n }\n}\n\nexport class ToolbarSettingToggle extends ToolbarToggle {\n private readonly defaultTitle: string;\n private readonly setting: Common.Settings.Setting;\n private willAnnounceState: boolean;\n\n constructor(\n setting: Common.Settings.Setting, glyph: string, title: string, toggledGlyph?: string,\n jslogContext?: string) {\n super(title, glyph, toggledGlyph, jslogContext);\n this.defaultTitle = title;\n this.setting = setting;\n this.settingChanged();\n this.setting.addChangeListener(this.settingChanged, this);\n\n // Determines whether the toggle state will be announced to a screen reader\n this.willAnnounceState = false;\n }\n\n private settingChanged(): void {\n const toggled = this.setting.get();\n this.setToggled(toggled);\n const toggleAnnouncement = toggled ? i18nString(UIStrings.pressed) : i18nString(UIStrings.notPressed);\n if (this.willAnnounceState) {\n ARIAUtils.alert(toggleAnnouncement);\n }\n this.willAnnounceState = false;\n this.setTitle(this.defaultTitle);\n }\n\n override clicked(event: Event): void {\n this.willAnnounceState = true;\n this.setting.set(!this.toggled());\n super.clicked(event);\n }\n}\n\nexport class ToolbarSeparator extends ToolbarItem {\n constructor(spacer?: boolean) {\n const element = document.createElement('div');\n element.classList.add(spacer ? 'toolbar-spacer' : 'toolbar-divider');\n super(element);\n }\n}\n\nexport interface Provider {\n item(): ToolbarItem|null;\n}\n\nexport interface ItemsProvider {\n toolbarItems(): ToolbarItem[];\n}\n\nexport class ToolbarComboBox extends ToolbarItem {\n protected selectElementInternal: HTMLSelectElement;\n\n constructor(changeHandler: ((arg0: Event) => void)|null, title: string, className?: string, jslogContext?: string) {\n const element = document.createElement('span');\n element.classList.add('toolbar-select-container');\n super(element);\n this.selectElementInternal = (this.element.createChild('select', 'toolbar-item') as HTMLSelectElement);\n const dropdownArrowIcon = IconButton.Icon.create('triangle-down', 'toolbar-dropdown-arrow');\n this.element.appendChild(dropdownArrowIcon);\n if (changeHandler) {\n this.selectElementInternal.addEventListener('change', changeHandler, false);\n }\n ARIAUtils.setLabel(this.selectElementInternal, title);\n super.setTitle(title);\n if (className) {\n this.selectElementInternal.classList.add(className);\n }\n if (jslogContext) {\n this.selectElementInternal.setAttribute(\n 'jslog', `${VisualLogging.dropDown().track({change: true}).context(jslogContext)}`);\n }\n }\n\n selectElement(): HTMLSelectElement {\n return this.selectElementInternal;\n }\n\n size(): number {\n return this.selectElementInternal.childElementCount;\n }\n\n options(): HTMLOptionElement[] {\n return Array.prototype.slice.call(this.selectElementInternal.children, 0);\n }\n\n addOption(option: Element): void {\n this.selectElementInternal.appendChild(option);\n }\n\n createOption(label: string, value?: string): Element {\n const option = (this.selectElementInternal.createChild('option') as HTMLOptionElement);\n option.text = label;\n if (typeof value !== 'undefined') {\n option.value = value;\n }\n const jslogContext = value ? Platform.StringUtilities.toKebabCase(value) : undefined;\n option.setAttribute('jslog', `${VisualLogging.item(jslogContext).track({click: true})}`);\n return option;\n }\n\n override applyEnabledState(enabled: boolean): void {\n super.applyEnabledState(enabled);\n this.selectElementInternal.disabled = !enabled;\n }\n\n removeOption(option: Element): void {\n this.selectElementInternal.removeChild(option);\n }\n\n removeOptions(): void {\n this.selectElementInternal.removeChildren();\n }\n\n selectedOption(): HTMLOptionElement|null {\n if (this.selectElementInternal.selectedIndex >= 0) {\n return this.selectElementInternal[this.selectElementInternal.selectedIndex] as HTMLOptionElement;\n }\n return null;\n }\n\n select(option: Element): void {\n this.selectElementInternal.selectedIndex = Array.prototype.indexOf.call(this.selectElementInternal, option);\n }\n\n setSelectedIndex(index: number): void {\n this.selectElementInternal.selectedIndex = index;\n }\n\n selectedIndex(): number {\n return this.selectElementInternal.selectedIndex;\n }\n\n setMaxWidth(width: number): void {\n this.selectElementInternal.style.maxWidth = width + 'px';\n }\n\n setMinWidth(width: number): void {\n this.selectElementInternal.style.minWidth = width + 'px';\n }\n}\n\nexport interface Option {\n value: string;\n label: string;\n}\n\nexport class ToolbarSettingComboBox extends ToolbarComboBox {\n private optionsInternal: Option[];\n private readonly setting: Common.Settings.Setting;\n private muteSettingListener?: boolean;\n constructor(options: Option[], setting: Common.Settings.Setting, accessibleName: string) {\n super(null, accessibleName);\n this.optionsInternal = options;\n this.setting = setting;\n this.selectElementInternal.addEventListener('change', this.valueChanged.bind(this), false);\n this.setOptions(options);\n setting.addChangeListener(this.settingChanged, this);\n }\n\n setOptions(options: Option[]): void {\n this.optionsInternal = options;\n this.selectElementInternal.removeChildren();\n for (let i = 0; i < options.length; ++i) {\n const dataOption = options[i];\n const option = this.createOption(dataOption.label, dataOption.value);\n this.selectElementInternal.appendChild(option);\n if (this.setting.get() === dataOption.value) {\n this.setSelectedIndex(i);\n }\n }\n }\n\n value(): string {\n return this.optionsInternal[this.selectedIndex()].value;\n }\n\n private settingChanged(): void {\n if (this.muteSettingListener) {\n return;\n }\n\n const value = this.setting.get();\n for (let i = 0; i < this.optionsInternal.length; ++i) {\n if (value === this.optionsInternal[i].value) {\n this.setSelectedIndex(i);\n break;\n }\n }\n }\n\n private valueChanged(_event: Event): void {\n const option = this.optionsInternal[this.selectedIndex()];\n this.muteSettingListener = true;\n this.setting.set(option.value);\n this.muteSettingListener = false;\n }\n}\n\nexport class ToolbarCheckbox extends ToolbarItem {\n inputElement: HTMLInputElement;\n\n constructor(\n text: string, tooltip?: string, listener?: ((arg0: MouseEvent) => void), jslogContext?: string, small?: boolean) {\n super(CheckboxLabel.create(text));\n this.element.classList.add('checkbox');\n this.inputElement = (this.element as CheckboxLabel).checkboxElement;\n this.inputElement.classList.toggle('small', small);\n if (tooltip) {\n // install on the checkbox\n Tooltip.install(this.inputElement, tooltip);\n Tooltip.install((this.element as CheckboxLabel).textElement, tooltip);\n }\n if (listener) {\n this.inputElement.addEventListener('click', listener, false);\n }\n if (jslogContext) {\n this.inputElement.setAttribute('jslog', `${VisualLogging.toggle().track({change: true}).context(jslogContext)}`);\n }\n }\n\n checked(): boolean {\n return this.inputElement.checked;\n }\n\n setChecked(value: boolean): void {\n this.inputElement.checked = value;\n }\n\n override applyEnabledState(enabled: boolean): void {\n super.applyEnabledState(enabled);\n this.inputElement.disabled = !enabled;\n }\n\n setIndeterminate(indeterminate: boolean): void {\n this.inputElement.indeterminate = indeterminate;\n }\n}\n\nexport class ToolbarSettingCheckbox extends ToolbarCheckbox {\n constructor(setting: Common.Settings.Setting, tooltip?: string, alternateTitle?: string) {\n super(alternateTitle || setting.title() || '', tooltip, undefined, setting.name);\n bindCheckbox(this.inputElement, setting);\n }\n}\n\nconst registeredToolbarItems: ToolbarItemRegistration[] = [];\n\nexport function registerToolbarItem(registration: ToolbarItemRegistration): void {\n registeredToolbarItems.push(registration);\n}\n\nfunction getRegisteredToolbarItems(): ToolbarItemRegistration[] {\n return registeredToolbarItems.filter(\n item => Root.Runtime.Runtime.isDescriptorEnabled({experiment: item.experiment, condition: item.condition}));\n}\n\nexport interface ToolbarItemRegistration {\n order?: number;\n location: ToolbarItemLocation;\n separator?: boolean;\n label?: () => Platform.UIString.LocalizedString;\n showLabel?: boolean;\n actionId?: string;\n condition?: Root.Runtime.Condition;\n loadItem?: (() => Promise);\n experiment?: string;\n jslog?: string;\n}\n\nexport const enum ToolbarItemLocation {\n FILES_NAVIGATION_TOOLBAR = 'files-navigator-toolbar',\n MAIN_TOOLBAR_RIGHT = 'main-toolbar-right',\n MAIN_TOOLBAR_LEFT = 'main-toolbar-left',\n STYLES_SIDEBARPANE_TOOLBAR = 'styles-sidebarpane-toolbar',\n}\n"]} \ No newline at end of file diff --git a/public/ui/legacy/UIUtils.d.ts b/public/ui/legacy/UIUtils.d.ts index 3133f1a12..3be15a1a0 100644 --- a/public/ui/legacy/UIUtils.d.ts +++ b/public/ui/legacy/UIUtils.d.ts @@ -87,7 +87,7 @@ export declare class CheckboxLabel extends HTMLSpanElement { checkboxElement: HTMLInputElement; textElement: HTMLElement; constructor(); - static create(title?: string, checked?: boolean, subtitle?: string, jslogContext?: string): CheckboxLabel; + static create(title?: string, checked?: boolean, subtitle?: string, jslogContext?: string, small?: boolean): CheckboxLabel; private static lastId; static constructorInternal: (() => Element) | null; } diff --git a/public/ui/legacy/UIUtils.js b/public/ui/legacy/UIUtils.js index 5190fe67f..c121afe5f 100644 --- a/public/ui/legacy/UIUtils.js +++ b/public/ui/legacy/UIUtils.js @@ -1045,7 +1045,7 @@ export class CheckboxLabel extends HTMLSpanElement { this.textElement.setAttribute('for', id); this.shadowRootInternal.createChild('slot'); } - static create(title, checked, subtitle, jslogContext) { + static create(title, checked, subtitle, jslogContext, small) { if (!CheckboxLabel.constructorInternal) { CheckboxLabel.constructorInternal = registerCustomElement('span', 'dt-checkbox', CheckboxLabel); } @@ -1061,6 +1061,7 @@ export class CheckboxLabel extends HTMLSpanElement { element.textElement.createChild('div', 'dt-checkbox-subtitle').textContent = subtitle; } } + element.checkboxElement.classList.toggle('small', small); return element; } static lastId = 0; diff --git a/public/ui/legacy/UIUtils.js.map b/public/ui/legacy/UIUtils.js.map index eba7e94cc..a0f99f5d8 100644 --- a/public/ui/legacy/UIUtils.js.map +++ b/public/ui/legacy/UIUtils.js.map @@ -1 +1 @@ -{"version":3,"file":"UIUtils.js","sourceRoot":"","sources":["../../../../../../front_end/ui/legacy/UIUtils.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,SAAS,MAAM,uCAAuC,CAAC;AACnE,OAAO,KAAK,OAAO,MAAM,kCAAkC,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,0CAA0C,CAAC;AACvE,OAAO,KAAK,aAAa,MAAM,qCAAqC,CAAC;AAErE,OAAO,4BAA4B,MAAM,wCAAwC,CAAC;AAClF,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,uBAAuB,MAAM,mCAAmC,CAAC;AACxE,OAAO,mBAAmB,MAAM,+BAA+B,CAAC;AAChE,OAAO,kBAAkB,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,IAAI,EAAC,MAAM,eAAe,CAAC;AACnC,OAAO,EAAC,SAAS,EAAsC,MAAM,gBAAgB,CAAC;AAC9E,OAAO,kBAAkB,MAAM,8BAA8B,CAAC;AAC9D,OAAO,qBAAqB,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AACvD,OAAO,iBAAiB,MAAM,6BAA6B,CAAC;AAC5D,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,iBAAiB,MAAM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a,CAAC,KAAK,CAAC,CAAC;IAC/C,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,gEAAgE,CAAC,CAAC;IAClG,QAAQ,CAAC,YAAY,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IAChD,SAAS,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAChC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IACrC,4BAA4B,GAAG,SAAS,CAAC,WAAW,GAAG,SAAS,CAAC,WAAW,CAAC;IAC7E,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IACrC,OAAO,4BAA4B,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,qBAAqB,CACjC,SAAiB,EAAE,aAAqB,EAAE,UAAiC;IAC7E,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,aAAa,EAAE,KAAM,SAAQ,UAAU;QAChE;YACE,uEAAuE;YACvE,0EAA0E;YAC1E,oEAAoE;YACpE,KAAK,EAAE,CAAC;YACR,6DAA6D;YAC7D,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;QACzC,CAAC;KACF,EAAE,EAAC,OAAO,EAAE,SAAS,EAAC,CAAC,CAAC;IACzB,OAAO,GAAY,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC,SAAS,EAAE,EAAC,EAAE,EAAE,aAAa,EAAC,CAAC,CAAC;AAC/E,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\n/*\n * Copyright (C) 2011 Google Inc. All rights reserved.\n * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.\n * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).\n * Copyright (C) 2009 Joseph Pecoraro\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 *\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 * 3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of\n * its contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\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 TextUtils from '../../models/text_utils/text_utils.js';\nimport * as Buttons from '../components/buttons/buttons.js';\nimport * as IconButton from '../components/icon_button/icon_button.js';\nimport * as VisualLogging from '../visual_logging/visual_logging.js';\n\nimport applicationColorTokensStyles from './applicationColorTokens.css.legacy.js';\nimport * as ARIAUtils from './ARIAUtils.js';\nimport checkboxTextLabelStyles from './checkboxTextLabel.css.legacy.js';\nimport confirmDialogStyles from './confirmDialog.css.legacy.js';\nimport designTokensStyles from './designTokens.css.legacy.js';\nimport {Dialog} from './Dialog.js';\nimport {Size} from './Geometry.js';\nimport {GlassPane, PointerEventsBehavior, SizeBehavior} from './GlassPane.js';\nimport inlineButtonStyles from './inlineButton.css.legacy.js';\nimport inspectorCommonStyles from './inspectorCommon.css.legacy.js';\nimport {KeyboardShortcut} from './KeyboardShortcut.js';\nimport radioButtonStyles from './radioButton.css.legacy.js';\nimport sliderStyles from './slider.css.legacy.js';\nimport smallBubbleStyles from './smallBubble.css.legacy.js';\nimport textButtonStyles from './textButton.css.legacy.js';\nimport * as ThemeSupport from './theme_support/theme_support.js';\nimport themeColorsStyles from './themeColors.css.legacy.js';\nimport tokens from './tokens.css.legacy.js';\nimport {Toolbar, type ToolbarButton} from './Toolbar.js';\nimport {Tooltip} from './Tooltip.js';\nimport {type TreeOutline} from './Treeoutline.js';\nimport {Widget} from './Widget.js';\n\nconst UIStrings = {\n /**\n *@description label to open link externally\n */\n openInNewTab: 'Open in new tab',\n /**\n *@description label to copy link address\n */\n copyLinkAddress: 'Copy link address',\n /**\n *@description label to copy file name\n */\n copyFileName: 'Copy file name',\n /**\n *@description label for the profiler control button\n */\n anotherProfilerIsAlreadyActive: 'Another profiler is already active',\n /**\n *@description Text in UIUtils\n */\n promiseResolvedAsync: 'Promise resolved (async)',\n /**\n *@description Text in UIUtils\n */\n promiseRejectedAsync: 'Promise rejected (async)',\n /**\n *@description Text for the title of asynchronous function calls group in Call Stack\n */\n asyncCall: 'Async Call',\n /**\n *@description Text for the name of anonymous functions\n */\n anonymous: '(anonymous)',\n /**\n *@description Text to close something\n */\n close: 'Close',\n /**\n *@description Text on a button for message dialog\n */\n ok: 'OK',\n /**\n *@description Text to cancel something\n */\n cancel: 'Cancel',\n};\nconst str_ = i18n.i18n.registerUIStrings('ui/legacy/UIUtils.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport const highlightedSearchResultClassName = 'highlighted-search-result';\nexport const highlightedCurrentSearchResultClassName = 'current-search-result';\n\nexport function installDragHandle(\n element: Element, elementDragStart: ((arg0: MouseEvent) => boolean)|null, elementDrag: (arg0: MouseEvent) => void,\n elementDragEnd: ((arg0: MouseEvent) => void)|null, cursor: string|null, hoverCursor?: string|null,\n startDelay?: number): void {\n function onMouseDown(event: Event): void {\n const dragHandler = new DragHandler();\n const dragStart = (): void =>\n dragHandler.elementDragStart(element, elementDragStart, elementDrag, elementDragEnd, cursor, event);\n if (startDelay) {\n startTimer = window.setTimeout(dragStart, startDelay);\n } else {\n dragStart();\n }\n }\n\n function onMouseUp(): void {\n if (startTimer) {\n window.clearTimeout(startTimer);\n }\n startTimer = null;\n }\n\n let startTimer: number|null;\n element.addEventListener('pointerdown', onMouseDown, false);\n if (startDelay) {\n element.addEventListener('pointerup', onMouseUp, false);\n }\n if (hoverCursor !== null) {\n (element as HTMLElement).style.cursor = hoverCursor || cursor || '';\n }\n}\n\nexport function elementDragStart(\n targetElement: Element, elementDragStart: ((arg0: MouseEvent) => boolean)|null,\n elementDrag: (arg0: MouseEvent) => void, elementDragEnd: ((arg0: MouseEvent) => void)|null, cursor: string|null,\n event: Event): void {\n const dragHandler = new DragHandler();\n dragHandler.elementDragStart(targetElement, elementDragStart, elementDrag, elementDragEnd, cursor, event);\n}\n\nclass DragHandler {\n private glassPaneInUse?: boolean;\n private elementDraggingEventListener?: ((arg0: MouseEvent) => void|boolean);\n private elementEndDraggingEventListener?: ((arg0: MouseEvent) => void)|null;\n private dragEventsTargetDocument?: Document;\n private dragEventsTargetDocumentTop?: Document;\n private restoreCursorAfterDrag?: (() => void);\n\n constructor() {\n this.elementDragMove = this.elementDragMove.bind(this);\n this.elementDragEnd = this.elementDragEnd.bind(this);\n this.mouseOutWhileDragging = this.mouseOutWhileDragging.bind(this);\n }\n\n private createGlassPane(): void {\n this.glassPaneInUse = true;\n if (!DragHandler.glassPaneUsageCount++) {\n DragHandler.glassPane = new GlassPane();\n DragHandler.glassPane.setPointerEventsBehavior(PointerEventsBehavior.BlockedByGlassPane);\n if (DragHandler.documentForMouseOut) {\n DragHandler.glassPane.show(DragHandler.documentForMouseOut);\n }\n }\n }\n\n private disposeGlassPane(): void {\n if (!this.glassPaneInUse) {\n return;\n }\n this.glassPaneInUse = false;\n if (--DragHandler.glassPaneUsageCount) {\n return;\n }\n if (DragHandler.glassPane) {\n DragHandler.glassPane.hide();\n DragHandler.glassPane = null;\n }\n DragHandler.documentForMouseOut = null;\n DragHandler.rootForMouseOut = null;\n }\n\n elementDragStart(\n targetElement: Element, elementDragStart: ((arg0: MouseEvent) => boolean)|null,\n elementDrag: (arg0: MouseEvent) => void|boolean, elementDragEnd: ((arg0: MouseEvent) => void)|null,\n cursor: string|null, ev: Event): void {\n const event = (ev as MouseEvent);\n // Only drag upon left button. Right will likely cause a context menu. So will ctrl-click on mac.\n if (event.button || (Host.Platform.isMac() && event.ctrlKey)) {\n return;\n }\n\n if (this.elementDraggingEventListener) {\n return;\n }\n\n if (elementDragStart && !elementDragStart((event as MouseEvent))) {\n return;\n }\n\n const targetDocument = (event.target instanceof Node && event.target.ownerDocument) as Document;\n this.elementDraggingEventListener = elementDrag;\n this.elementEndDraggingEventListener = elementDragEnd;\n console.assert(\n (DragHandler.documentForMouseOut || targetDocument) === targetDocument, 'Dragging on multiple documents.');\n DragHandler.documentForMouseOut = targetDocument;\n DragHandler.rootForMouseOut = event.target instanceof Node && event.target.getRootNode() || null;\n this.dragEventsTargetDocument = targetDocument;\n try {\n if (targetDocument.defaultView && targetDocument.defaultView.top) {\n this.dragEventsTargetDocumentTop = targetDocument.defaultView.top.document;\n }\n } catch (e) {\n this.dragEventsTargetDocumentTop = this.dragEventsTargetDocument;\n }\n\n targetDocument.addEventListener('pointermove', this.elementDragMove, true);\n targetDocument.addEventListener('pointerup', this.elementDragEnd, true);\n DragHandler.rootForMouseOut &&\n DragHandler.rootForMouseOut.addEventListener('pointerout', this.mouseOutWhileDragging, {capture: true});\n if (this.dragEventsTargetDocumentTop && targetDocument !== this.dragEventsTargetDocumentTop) {\n this.dragEventsTargetDocumentTop.addEventListener('pointerup', this.elementDragEnd, true);\n }\n\n const targetHtmlElement = (targetElement as HTMLElement);\n if (typeof cursor === 'string') {\n this.restoreCursorAfterDrag = restoreCursor.bind(this, targetHtmlElement.style.cursor);\n targetHtmlElement.style.cursor = cursor;\n targetDocument.body.style.cursor = cursor;\n }\n function restoreCursor(this: DragHandler, oldCursor: string): void {\n targetDocument.body.style.removeProperty('cursor');\n targetHtmlElement.style.cursor = oldCursor;\n this.restoreCursorAfterDrag = undefined;\n }\n event.preventDefault();\n }\n\n private mouseOutWhileDragging(): void {\n this.unregisterMouseOutWhileDragging();\n this.createGlassPane();\n }\n\n private unregisterMouseOutWhileDragging(): void {\n if (!DragHandler.rootForMouseOut) {\n return;\n }\n DragHandler.rootForMouseOut.removeEventListener('pointerout', this.mouseOutWhileDragging, {capture: true});\n }\n\n private unregisterDragEvents(): void {\n if (!this.dragEventsTargetDocument) {\n return;\n }\n this.dragEventsTargetDocument.removeEventListener('pointermove', this.elementDragMove, true);\n this.dragEventsTargetDocument.removeEventListener('pointerup', this.elementDragEnd, true);\n if (this.dragEventsTargetDocumentTop && this.dragEventsTargetDocument !== this.dragEventsTargetDocumentTop) {\n this.dragEventsTargetDocumentTop.removeEventListener('pointerup', this.elementDragEnd, true);\n }\n delete this.dragEventsTargetDocument;\n delete this.dragEventsTargetDocumentTop;\n }\n\n private elementDragMove(event: MouseEvent): void {\n if (event.buttons !== 1) {\n this.elementDragEnd(event);\n return;\n }\n if (this.elementDraggingEventListener && this.elementDraggingEventListener(event)) {\n this.cancelDragEvents(event);\n }\n }\n\n private cancelDragEvents(_event: Event): void {\n this.unregisterDragEvents();\n this.unregisterMouseOutWhileDragging();\n\n if (this.restoreCursorAfterDrag) {\n this.restoreCursorAfterDrag();\n }\n\n this.disposeGlassPane();\n\n delete this.elementDraggingEventListener;\n delete this.elementEndDraggingEventListener;\n }\n\n private elementDragEnd(event: Event): void {\n const elementDragEnd = this.elementEndDraggingEventListener;\n this.cancelDragEvents((event as MouseEvent));\n event.preventDefault();\n if (elementDragEnd) {\n elementDragEnd((event as MouseEvent));\n }\n }\n\n private static glassPaneUsageCount = 0;\n private static glassPane: GlassPane|null = null;\n private static documentForMouseOut: Document|null = null;\n private static rootForMouseOut: Node|null = null;\n}\n\nexport function isBeingEdited(node?: Node|null): boolean {\n if (!node || node.nodeType !== Node.ELEMENT_NODE) {\n return false;\n }\n const element = (node as Element);\n if (element.classList.contains('text-prompt') || element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {\n return true;\n }\n\n if (!elementsBeingEdited.size) {\n return false;\n }\n\n let currentElement: (Element|null)|Element = element;\n while (currentElement) {\n if (elementsBeingEdited.has(element)) {\n return true;\n }\n currentElement = currentElement.parentElementOrShadowHost();\n }\n return false;\n}\n\nexport function isEditing(): boolean {\n if (elementsBeingEdited.size) {\n return true;\n }\n\n const focused = Platform.DOMUtilities.deepActiveElement(document);\n if (!focused) {\n return false;\n }\n return focused.classList.contains('text-prompt') || focused.nodeName === 'INPUT' || focused.nodeName === 'TEXTAREA' ||\n ((focused as HTMLElement).contentEditable === 'true' ||\n (focused as HTMLElement).contentEditable === 'plaintext-only');\n}\n\nexport function markBeingEdited(element: Element, value: boolean): boolean {\n if (value) {\n if (elementsBeingEdited.has(element)) {\n return false;\n }\n element.classList.add('being-edited');\n elementsBeingEdited.add(element);\n } else {\n if (!elementsBeingEdited.has(element)) {\n return false;\n }\n element.classList.remove('being-edited');\n elementsBeingEdited.delete(element);\n }\n return true;\n}\n\nconst elementsBeingEdited = new Set();\n\n// Avoids Infinity, NaN, and scientific notation (e.g. 1e20), see crbug.com/81165.\nconst numberRegex = /^(-?(?:\\d+(?:\\.\\d+)?|\\.\\d+))$/;\n\nexport const StyleValueDelimiters = ' \\xA0\\t\\n\"\\':;,/()';\n\nexport function getValueModificationDirection(event: Event): string|null {\n let direction: 'Up'|'Down'|null = null;\n if (event.type === 'wheel') {\n // When shift is pressed while spinning mousewheel, delta comes as wheelDeltaX.\n const wheelEvent = (event as WheelEvent);\n if (wheelEvent.deltaY < 0 || wheelEvent.deltaX < 0) {\n direction = 'Up';\n } else if (wheelEvent.deltaY > 0 || wheelEvent.deltaX > 0) {\n direction = 'Down';\n }\n } else {\n const keyEvent = (event as KeyboardEvent);\n if (keyEvent.key === 'ArrowUp' || keyEvent.key === 'PageUp') {\n direction = 'Up';\n } else if (keyEvent.key === 'ArrowDown' || keyEvent.key === 'PageDown') {\n direction = 'Down';\n }\n }\n\n return direction;\n}\n\nfunction modifiedHexValue(hexString: string, event: Event): string|null {\n const direction = getValueModificationDirection(event);\n if (!direction) {\n return null;\n }\n\n const mouseEvent = (event as MouseEvent);\n const number = parseInt(hexString, 16);\n if (isNaN(number) || !isFinite(number)) {\n return null;\n }\n\n const hexStrLen = hexString.length;\n const channelLen = hexStrLen / 3;\n\n // Colors are either rgb or rrggbb.\n if (channelLen !== 1 && channelLen !== 2) {\n return null;\n }\n\n // Precision modifier keys work with both mousewheel and up/down keys.\n // When ctrl is pressed, increase R by 1.\n // When shift is pressed, increase G by 1.\n // When alt is pressed, increase B by 1.\n // If no shortcut keys are pressed then increase hex value by 1.\n // Keys can be pressed together to increase RGB channels. e.g trying different shades.\n let delta = 0;\n if (KeyboardShortcut.eventHasCtrlEquivalentKey(mouseEvent)) {\n delta += Math.pow(16, channelLen * 2);\n }\n if (mouseEvent.shiftKey) {\n delta += Math.pow(16, channelLen);\n }\n if (mouseEvent.altKey) {\n delta += 1;\n }\n if (delta === 0) {\n delta = 1;\n }\n if (direction === 'Down') {\n delta *= -1;\n }\n\n // Increase hex value by 1 and clamp from 0 ... maxValue.\n const maxValue = Math.pow(16, hexStrLen) - 1;\n const result = Platform.NumberUtilities.clamp(number + delta, 0, maxValue);\n\n // Ensure the result length is the same as the original hex value.\n let resultString = result.toString(16).toUpperCase();\n for (let i = 0, lengthDelta = hexStrLen - resultString.length; i < lengthDelta; ++i) {\n resultString = '0' + resultString;\n }\n return resultString;\n}\n\nexport function modifiedFloatNumber(number: number, event: Event, modifierMultiplier?: number): number|null {\n const direction = getValueModificationDirection(event);\n if (!direction) {\n return null;\n }\n\n const mouseEvent = (event as MouseEvent);\n\n // Precision modifier keys work with both mousewheel and up/down keys.\n // When ctrl is pressed, increase by 100.\n // When shift is pressed, increase by 10.\n // When alt is pressed, increase by 0.1.\n // Otherwise increase by 1.\n let delta = 1;\n if (KeyboardShortcut.eventHasCtrlEquivalentKey(mouseEvent)) {\n delta = 100;\n } else if (mouseEvent.shiftKey) {\n delta = 10;\n } else if (mouseEvent.altKey) {\n delta = 0.1;\n }\n\n if (direction === 'Down') {\n delta *= -1;\n }\n if (modifierMultiplier) {\n delta *= modifierMultiplier;\n }\n\n // Make the new number and constrain it to a precision of 6, this matches numbers the engine returns.\n // Use the Number constructor to forget the fixed precision, so 1.100000 will print as 1.1.\n const result = Number((number + delta).toFixed(6));\n if (!String(result).match(numberRegex)) {\n return null;\n }\n return result;\n}\n\nexport function createReplacementString(\n wordString: string, event: Event,\n customNumberHandler?: ((arg0: string, arg1: number, arg2: string) => string)): string|null {\n let prefix;\n let suffix;\n let number;\n let replacementString: string|null = null;\n let matches = /(.*#)([\\da-fA-F]+)(.*)/.exec(wordString);\n if (matches && matches.length) {\n prefix = matches[1];\n suffix = matches[3];\n number = modifiedHexValue(matches[2], event);\n if (number !== null) {\n replacementString = prefix + number + suffix;\n }\n } else {\n matches = /(.*?)(-?(?:\\d+(?:\\.\\d+)?|\\.\\d+))(.*)/.exec(wordString);\n if (matches && matches.length) {\n prefix = matches[1];\n suffix = matches[3];\n number = modifiedFloatNumber(parseFloat(matches[2]), event);\n if (number !== null) {\n replacementString =\n customNumberHandler ? customNumberHandler(prefix, number, suffix) : prefix + number + suffix;\n }\n }\n }\n return replacementString;\n}\n\nexport function isElementValueModification(event: Event): boolean {\n const arrowKeyOrWheelEvent =\n ((event as KeyboardEvent).key === 'ArrowUp' || (event as KeyboardEvent).key === 'ArrowDown' ||\n event.type === 'wheel');\n const pageKeyPressed = ((event as KeyboardEvent).key === 'PageUp' || (event as KeyboardEvent).key === 'PageDown');\n return arrowKeyOrWheelEvent || pageKeyPressed;\n}\n\nexport function handleElementValueModifications(\n event: Event, element: Element, finishHandler?: ((arg0: string, arg1: string) => void),\n suggestionHandler?: ((arg0: string) => boolean),\n customNumberHandler?: ((arg0: string, arg1: number, arg2: string) => string)): boolean {\n if (!isElementValueModification(event)) {\n return false;\n }\n void VisualLogging.logKeyDown(event.currentTarget, event, 'element-value-modification');\n\n const selection = element.getComponentSelection();\n if (!selection || !selection.rangeCount) {\n return false;\n }\n\n const selectionRange = selection.getRangeAt(0);\n if (!selectionRange.commonAncestorContainer.isSelfOrDescendant(element)) {\n return false;\n }\n\n const originalValue = element.textContent;\n const wordRange = Platform.DOMUtilities.rangeOfWord(\n selectionRange.startContainer, selectionRange.startOffset, StyleValueDelimiters, element);\n const wordString = wordRange.toString();\n\n if (suggestionHandler && suggestionHandler(wordString)) {\n return false;\n }\n\n const replacementString = createReplacementString(wordString, event, customNumberHandler);\n\n if (replacementString) {\n const replacementTextNode = document.createTextNode(replacementString);\n\n wordRange.deleteContents();\n wordRange.insertNode(replacementTextNode);\n\n const finalSelectionRange = document.createRange();\n finalSelectionRange.setStart(replacementTextNode, 0);\n finalSelectionRange.setEnd(replacementTextNode, replacementString.length);\n\n selection.removeAllRanges();\n selection.addRange(finalSelectionRange);\n\n event.handled = true;\n event.preventDefault();\n\n if (finishHandler) {\n finishHandler(originalValue || '', replacementString);\n }\n\n return true;\n }\n return false;\n}\n\nexport function openLinkExternallyLabel(): string {\n return i18nString(UIStrings.openInNewTab);\n}\n\nexport function copyLinkAddressLabel(): string {\n return i18nString(UIStrings.copyLinkAddress);\n}\n\nexport function copyFileNameLabel(): string {\n return i18nString(UIStrings.copyFileName);\n}\n\nexport function anotherProfilerActiveLabel(): string {\n return i18nString(UIStrings.anotherProfilerIsAlreadyActive);\n}\n\nexport function asyncStackTraceLabel(\n description: string|undefined, previousCallFrames: {functionName: string}[]): string {\n if (description) {\n if (description === 'Promise.resolve') {\n return i18nString(UIStrings.promiseResolvedAsync);\n }\n if (description === 'Promise.reject') {\n return i18nString(UIStrings.promiseRejectedAsync);\n }\n if (description === 'await' && previousCallFrames.length !== 0) {\n const lastPreviousFrame = previousCallFrames[previousCallFrames.length - 1];\n const lastPreviousFrameName = beautifyFunctionName(lastPreviousFrame.functionName);\n description = `await in ${lastPreviousFrameName}`;\n }\n return description;\n }\n return i18nString(UIStrings.asyncCall);\n}\n\nexport function installComponentRootStyles(element: Element): void {\n injectCoreStyles(element);\n element.classList.add('platform-' + Host.Platform.platform());\n\n // Detect overlay scrollbar enable by checking for nonzero scrollbar width.\n if (!Host.Platform.isMac() && measuredScrollbarWidth(element.ownerDocument) === 0) {\n element.classList.add('overlay-scrollbar-enabled');\n }\n}\n\nfunction windowFocused(document: Document, event: Event): void {\n if (event.target instanceof Window && event.target.document.nodeType === Node.DOCUMENT_NODE) {\n document.body.classList.remove('inactive');\n }\n}\n\nfunction windowBlurred(document: Document, event: Event): void {\n if (event.target instanceof Window && event.target.document.nodeType === Node.DOCUMENT_NODE) {\n document.body.classList.add('inactive');\n }\n}\n\nexport class ElementFocusRestorer {\n private element: HTMLElement|null;\n private previous: HTMLElement|null;\n constructor(element: Element) {\n this.element = (element as HTMLElement | null);\n this.previous = (Platform.DOMUtilities.deepActiveElement(element.ownerDocument) as HTMLElement | null);\n (element as HTMLElement).focus();\n }\n\n restore(): void {\n if (!this.element) {\n return;\n }\n if (this.element.hasFocus() && this.previous) {\n this.previous.focus();\n }\n this.previous = null;\n this.element = null;\n }\n}\n\nexport function highlightSearchResult(\n element: Element, offset: number, length: number, domChanges?: HighlightChange[]): Element|null {\n const result = highlightSearchResults(element, [new TextUtils.TextRange.SourceRange(offset, length)], domChanges);\n return result.length ? result[0] : null;\n}\n\nexport function highlightSearchResults(\n element: Element, resultRanges: TextUtils.TextRange.SourceRange[], changes?: HighlightChange[]): Element[] {\n return highlightRangesWithStyleClass(element, resultRanges, highlightedSearchResultClassName, changes);\n}\n\nexport function runCSSAnimationOnce(element: Element, className: string): void {\n function animationEndCallback(): void {\n element.classList.remove(className);\n element.removeEventListener('webkitAnimationEnd', animationEndCallback, false);\n }\n\n if (element.classList.contains(className)) {\n element.classList.remove(className);\n }\n\n element.addEventListener('webkitAnimationEnd', animationEndCallback, false);\n element.classList.add(className);\n}\n\nexport function highlightRangesWithStyleClass(\n element: Element, resultRanges: TextUtils.TextRange.SourceRange[], styleClass: string,\n changes?: HighlightChange[]): Element[] {\n changes = changes || [];\n const highlightNodes: Element[] = [];\n const textNodes = element.childTextNodes();\n const lineText = textNodes\n .map(function(node) {\n return node.textContent;\n })\n .join('');\n const ownerDocument = element.ownerDocument;\n\n if (textNodes.length === 0) {\n return highlightNodes;\n }\n\n const nodeRanges: TextUtils.TextRange.SourceRange[] = [];\n let rangeEndOffset = 0;\n for (const textNode of textNodes) {\n const range =\n new TextUtils.TextRange.SourceRange(rangeEndOffset, textNode.textContent ? textNode.textContent.length : 0);\n rangeEndOffset = range.offset + range.length;\n nodeRanges.push(range);\n }\n\n let startIndex = 0;\n for (let i = 0; i < resultRanges.length; ++i) {\n const startOffset = resultRanges[i].offset;\n const endOffset = startOffset + resultRanges[i].length;\n\n while (startIndex < textNodes.length &&\n nodeRanges[startIndex].offset + nodeRanges[startIndex].length <= startOffset) {\n startIndex++;\n }\n let endIndex = startIndex;\n while (endIndex < textNodes.length && nodeRanges[endIndex].offset + nodeRanges[endIndex].length < endOffset) {\n endIndex++;\n }\n if (endIndex === textNodes.length) {\n break;\n }\n\n const highlightNode = ownerDocument.createElement('span');\n highlightNode.className = styleClass;\n highlightNode.textContent = lineText.substring(startOffset, endOffset);\n\n const lastTextNode = textNodes[endIndex];\n const lastText = lastTextNode.textContent || '';\n lastTextNode.textContent = lastText.substring(endOffset - nodeRanges[endIndex].offset);\n changes.push({\n node: (lastTextNode as Element),\n type: 'changed',\n oldText: lastText,\n newText: lastTextNode.textContent,\n nextSibling: undefined,\n parent: undefined,\n });\n\n if (startIndex === endIndex && lastTextNode.parentElement) {\n lastTextNode.parentElement.insertBefore(highlightNode, lastTextNode);\n changes.push({\n node: highlightNode,\n type: 'added',\n nextSibling: lastTextNode,\n parent: lastTextNode.parentElement,\n oldText: undefined,\n newText: undefined,\n });\n highlightNodes.push(highlightNode);\n\n const prefixNode =\n ownerDocument.createTextNode(lastText.substring(0, startOffset - nodeRanges[startIndex].offset));\n lastTextNode.parentElement.insertBefore(prefixNode, highlightNode);\n changes.push({\n node: prefixNode,\n type: 'added',\n nextSibling: highlightNode,\n parent: lastTextNode.parentElement,\n oldText: undefined,\n newText: undefined,\n });\n } else {\n const firstTextNode = textNodes[startIndex];\n const firstText = firstTextNode.textContent || '';\n const anchorElement = firstTextNode.nextSibling;\n\n if (firstTextNode.parentElement) {\n firstTextNode.parentElement.insertBefore(highlightNode, anchorElement);\n changes.push({\n node: highlightNode,\n type: 'added',\n nextSibling: anchorElement || undefined,\n parent: firstTextNode.parentElement,\n oldText: undefined,\n newText: undefined,\n });\n highlightNodes.push(highlightNode);\n }\n\n firstTextNode.textContent = firstText.substring(0, startOffset - nodeRanges[startIndex].offset);\n changes.push({\n node: (firstTextNode as Element),\n type: 'changed',\n oldText: firstText,\n newText: firstTextNode.textContent,\n nextSibling: undefined,\n parent: undefined,\n });\n\n for (let j = startIndex + 1; j < endIndex; j++) {\n const textNode = textNodes[j];\n const text = textNode.textContent;\n textNode.textContent = '';\n changes.push({\n node: (textNode as Element),\n type: 'changed',\n oldText: text || undefined,\n newText: textNode.textContent,\n nextSibling: undefined,\n parent: undefined,\n });\n }\n }\n startIndex = endIndex;\n nodeRanges[startIndex].offset = endOffset;\n nodeRanges[startIndex].length = lastTextNode.textContent.length;\n }\n return highlightNodes;\n}\n\nexport function applyDomChanges(domChanges: HighlightChange[]): void {\n for (let i = 0, size = domChanges.length; i < size; ++i) {\n const entry = domChanges[i];\n switch (entry.type) {\n case 'added':\n entry.parent?.insertBefore(entry.node, entry.nextSibling ?? null);\n break;\n case 'changed':\n entry.node.textContent = entry.newText ?? null;\n break;\n }\n }\n}\n\nexport function revertDomChanges(domChanges: HighlightChange[]): void {\n for (let i = domChanges.length - 1; i >= 0; --i) {\n const entry = domChanges[i];\n switch (entry.type) {\n case 'added':\n entry.node.remove();\n break;\n case 'changed':\n entry.node.textContent = entry.oldText ?? null;\n break;\n }\n }\n}\n\nexport function measurePreferredSize(element: Element, containerElement?: Element|null): Size {\n const oldParent = element.parentElement;\n const oldNextSibling = element.nextSibling;\n containerElement = containerElement || element.ownerDocument.body;\n containerElement.appendChild(element);\n element.positionAt(0, 0);\n const result = element.getBoundingClientRect();\n\n element.positionAt(undefined, undefined);\n if (oldParent) {\n oldParent.insertBefore(element, oldNextSibling);\n } else {\n element.remove();\n }\n return new Size(result.width, result.height);\n}\n\nclass InvokeOnceHandlers {\n private handlers: Map>|null;\n private readonly autoInvoke: boolean;\n constructor(autoInvoke: boolean) {\n this.handlers = null;\n this.autoInvoke = autoInvoke;\n }\n\n add(object: Object, method: () => void): void {\n if (!this.handlers) {\n this.handlers = new Map();\n if (this.autoInvoke) {\n this.scheduleInvoke();\n }\n }\n let methods = this.handlers.get(object);\n if (!methods) {\n methods = new Set();\n this.handlers.set(object, methods);\n }\n methods.add(method);\n }\n scheduleInvoke(): void {\n if (this.handlers) {\n requestAnimationFrame(this.invoke.bind(this));\n }\n }\n\n private invoke(): void {\n const handlers = this.handlers;\n this.handlers = null;\n if (handlers) {\n for (const [object, methods] of handlers) {\n for (const method of methods) {\n method.call(object);\n }\n }\n }\n }\n}\n\nlet coalescingLevel = 0;\nlet postUpdateHandlers: InvokeOnceHandlers|null = null;\n\nexport function startBatchUpdate(): void {\n if (!coalescingLevel++) {\n postUpdateHandlers = new InvokeOnceHandlers(false);\n }\n}\n\nexport function endBatchUpdate(): void {\n if (--coalescingLevel) {\n return;\n }\n\n if (postUpdateHandlers) {\n postUpdateHandlers.scheduleInvoke();\n postUpdateHandlers = null;\n }\n}\n\nexport function invokeOnceAfterBatchUpdate(object: Object, method: () => void): void {\n if (!postUpdateHandlers) {\n postUpdateHandlers = new InvokeOnceHandlers(true);\n }\n postUpdateHandlers.add(object, method);\n}\n\nexport function animateFunction(\n window: Window, func: Function, params: {\n from: number,\n to: number,\n }[],\n duration: number, animationComplete?: (() => void)): () => void {\n const start = window.performance.now();\n let raf = window.requestAnimationFrame(animationStep);\n\n function animationStep(timestamp: number): void {\n const progress = Platform.NumberUtilities.clamp((timestamp - start) / duration, 0, 1);\n func(...params.map(p => p.from + (p.to - p.from) * progress));\n if (progress < 1) {\n raf = window.requestAnimationFrame(animationStep);\n } else if (animationComplete) {\n animationComplete();\n }\n }\n\n return () => window.cancelAnimationFrame(raf);\n}\n\nexport class LongClickController {\n private readonly element: Element;\n private readonly callback: (arg0: Event) => void;\n private readonly editKey: (arg0: KeyboardEvent) => boolean;\n private longClickData!: {\n mouseUp: (arg0: Event) => void,\n mouseDown: (arg0: Event) => void,\n reset: () => void,\n }|undefined;\n private longClickInterval!: number|undefined;\n\n constructor(\n element: Element, callback: (arg0: Event) => void,\n isEditKeyFunc: (arg0: KeyboardEvent) => boolean = (event):\n boolean => Platform.KeyboardUtilities.isEnterOrSpaceKey(event)) {\n this.element = element;\n this.callback = callback;\n this.editKey = isEditKeyFunc;\n this.enable();\n }\n\n reset(): void {\n if (this.longClickInterval) {\n clearInterval(this.longClickInterval);\n delete this.longClickInterval;\n }\n }\n\n private enable(): void {\n if (this.longClickData) {\n return;\n }\n const boundKeyDown = keyDown.bind(this);\n const boundKeyUp = keyUp.bind(this);\n const boundMouseDown = mouseDown.bind(this);\n const boundMouseUp = mouseUp.bind(this);\n const boundReset = this.reset.bind(this);\n\n this.element.addEventListener('keydown', boundKeyDown, false);\n this.element.addEventListener('keyup', boundKeyUp, false);\n this.element.addEventListener('pointerdown', boundMouseDown, false);\n this.element.addEventListener('pointerout', boundReset, false);\n this.element.addEventListener('pointerup', boundMouseUp, false);\n this.element.addEventListener('click', boundReset, true);\n\n this.longClickData = {mouseUp: boundMouseUp, mouseDown: boundMouseDown, reset: boundReset};\n\n function keyDown(this: LongClickController, e: Event): void {\n if (this.editKey(e as KeyboardEvent)) {\n const callback = this.callback;\n this.longClickInterval = window.setTimeout(callback.bind(null, e), LongClickController.TIME_MS);\n }\n }\n\n function keyUp(this: LongClickController, e: Event): void {\n if (this.editKey(e as KeyboardEvent)) {\n this.reset();\n }\n }\n\n function mouseDown(this: LongClickController, e: Event): void {\n if ((e as MouseEvent).which !== 1) {\n return;\n }\n const callback = this.callback;\n this.longClickInterval = window.setTimeout(callback.bind(null, e), LongClickController.TIME_MS);\n }\n\n function mouseUp(this: LongClickController, e: Event): void {\n if ((e as MouseEvent).which !== 1) {\n return;\n }\n this.reset();\n }\n }\n\n dispose(): void {\n if (!this.longClickData) {\n return;\n }\n this.element.removeEventListener('pointerdown', this.longClickData.mouseDown, false);\n this.element.removeEventListener('pointerout', this.longClickData.reset, false);\n this.element.removeEventListener('pointerup', this.longClickData.mouseUp, false);\n this.element.addEventListener('click', this.longClickData.reset, true);\n delete this.longClickData;\n }\n\n static readonly TIME_MS = 200;\n}\n\nexport function initializeUIUtils(document: Document): void {\n document.body.classList.toggle('inactive', !document.hasFocus());\n if (document.defaultView) {\n document.defaultView.addEventListener('focus', windowFocused.bind(undefined, document), false);\n document.defaultView.addEventListener('blur', windowBlurred.bind(undefined, document), false);\n }\n document.addEventListener('focus', focusChanged.bind(undefined), true);\n\n const body = (document.body as Element);\n GlassPane.setContainer(body);\n}\n\nexport function beautifyFunctionName(name: string): string {\n return name || i18nString(UIStrings.anonymous);\n}\n\nexport const createTextChild = (element: Element|DocumentFragment, text: string): Text => {\n const textNode = element.ownerDocument.createTextNode(text);\n element.appendChild(textNode);\n return textNode;\n};\n\nexport const createTextChildren = (element: Element|DocumentFragment, ...childrenText: string[]): void => {\n for (const child of childrenText) {\n createTextChild(element, child);\n }\n};\n\nexport function createTextButton(text: string, clickHandler?: ((arg0: Event) => void), opts?: {\n className?: string,\n jslogContext?: string,\n variant?: Buttons.Button.Variant,\n title?: string,\n}): Buttons.Button.Button {\n const button = new Buttons.Button.Button();\n if (opts?.className) {\n button.className = opts.className;\n }\n button.textContent = text;\n button.variant = opts?.variant ? opts.variant : Buttons.Button.Variant.OUTLINED;\n if (clickHandler) {\n button.addEventListener('click', clickHandler);\n }\n if (opts?.jslogContext) {\n button.setAttribute('jslog', `${VisualLogging.action().track({click: true}).context(opts.jslogContext)}`);\n }\n if (opts?.title) {\n button.setAttribute('title', opts.title);\n }\n button.type = 'button';\n return button;\n}\n\nexport function createInput(className?: string, type?: string, jslogContext?: string): HTMLInputElement {\n const element = document.createElement('input');\n if (className) {\n element.className = className;\n }\n element.spellcheck = false;\n element.classList.add('harmony-input');\n if (type) {\n element.type = type;\n }\n if (jslogContext) {\n element.setAttribute(\n 'jslog', `${VisualLogging.textField().track({keydown: 'Enter', change: true}).context(jslogContext)}`);\n }\n return element;\n}\n\nexport function createSelect(name: string, options: string[]|Map[]|Set): HTMLSelectElement {\n const select = document.createElement('select');\n select.classList.add('chrome-select');\n ARIAUtils.setLabel(select, name);\n for (const option of options) {\n if (option instanceof Map) {\n for (const [key, value] of option) {\n const optGroup = (select.createChild('optgroup') as HTMLOptGroupElement);\n optGroup.label = key;\n for (const child of value) {\n if (typeof child === 'string') {\n optGroup.appendChild(createOption(child, child, Platform.StringUtilities.toKebabCase(child)));\n }\n }\n }\n } else if (typeof option === 'string') {\n select.add(createOption(option, option, Platform.StringUtilities.toKebabCase(option)));\n }\n }\n return select;\n}\n\nexport function createOption(title: string, value?: string, jslogContext?: string): HTMLOptionElement {\n const result = new Option(title, value || title);\n if (jslogContext) {\n result.setAttribute('jslog', `${VisualLogging.item(jslogContext).track({click: true})}`);\n }\n return result;\n}\n\nexport function createLabel(title: string, className?: string, associatedControl?: Element): Element {\n const element = document.createElement('label');\n if (className) {\n element.className = className;\n }\n element.textContent = title;\n if (associatedControl) {\n ARIAUtils.bindLabelToControl(element, associatedControl);\n }\n\n return element;\n}\n\nexport function createRadioLabel(\n name: string, title: string, checked?: boolean, jslogContext?: string): DevToolsRadioButton {\n const element = (document.createElement('span', {is: 'dt-radio'}) as DevToolsRadioButton);\n element.radioElement.name = name;\n element.radioElement.checked = Boolean(checked);\n createTextChild(element.labelElement, title);\n if (jslogContext) {\n element.radioElement.setAttribute('jslog', `${VisualLogging.toggle().track({change: true}).context(jslogContext)}`);\n }\n return element;\n}\n\nexport function createIconLabel(\n options: {title?: string, iconName: string, color?: string, width?: '14px'|'20px', height?: '14px'|'20px'}):\n DevToolsIconLabel {\n const element = (document.createElement('span', {is: 'dt-icon-label'}) as DevToolsIconLabel);\n if (options.title) {\n element.createChild('span').textContent = options.title;\n }\n element.data = {\n iconName: options.iconName,\n color: options.color ?? 'var(--icon-default)',\n width: options.width ?? '14px',\n height: options.height ?? '14px',\n };\n return element;\n}\n\nexport function createSlider(min: number, max: number, tabIndex: number): Element {\n const element = (document.createElement('span', {is: 'dt-slider'}) as DevToolsSlider);\n element.sliderElement.min = String(min);\n element.sliderElement.max = String(max);\n element.sliderElement.step = String(1);\n element.sliderElement.tabIndex = tabIndex;\n return element;\n}\n\nexport function setTitle(element: HTMLElement, title: string): void {\n ARIAUtils.setLabel(element, title);\n Tooltip.install(element, title);\n}\n\nexport class CheckboxLabel extends HTMLSpanElement {\n private readonly shadowRootInternal!: DocumentFragment;\n checkboxElement!: HTMLInputElement;\n textElement!: HTMLElement;\n\n constructor() {\n super();\n CheckboxLabel.lastId = CheckboxLabel.lastId + 1;\n const id = 'ui-checkbox-label' + CheckboxLabel.lastId;\n this.shadowRootInternal =\n createShadowRootWithCoreStyles(this, {cssFile: checkboxTextLabelStyles, delegatesFocus: undefined});\n this.checkboxElement = (this.shadowRootInternal.createChild('input') as HTMLInputElement);\n this.checkboxElement.type = 'checkbox';\n this.checkboxElement.setAttribute('id', id);\n this.textElement = this.shadowRootInternal.createChild('label', 'dt-checkbox-text') as HTMLElement;\n this.textElement.setAttribute('for', id);\n this.shadowRootInternal.createChild('slot');\n }\n\n static create(title?: string, checked?: boolean, subtitle?: string, jslogContext?: string): CheckboxLabel {\n if (!CheckboxLabel.constructorInternal) {\n CheckboxLabel.constructorInternal = registerCustomElement('span', 'dt-checkbox', CheckboxLabel);\n }\n const element = (CheckboxLabel.constructorInternal() as CheckboxLabel);\n element.checkboxElement.checked = Boolean(checked);\n if (jslogContext) {\n element.checkboxElement.setAttribute(\n 'jslog', `${VisualLogging.toggle().track({change: true}).context(jslogContext)}`);\n }\n if (title !== undefined) {\n element.textElement.textContent = title;\n element.checkboxElement.title = title;\n if (subtitle !== undefined) {\n element.textElement.createChild('div', 'dt-checkbox-subtitle').textContent = subtitle;\n }\n }\n return element;\n }\n\n private static lastId = 0;\n static constructorInternal: (() => Element)|null = null;\n}\n\nexport class DevToolsIconLabel extends HTMLSpanElement {\n readonly #icon: IconButton.Icon.Icon;\n\n constructor() {\n super();\n const root = createShadowRootWithCoreStyles(this, {\n cssFile: undefined,\n delegatesFocus: undefined,\n });\n this.#icon = new IconButton.Icon.Icon();\n this.#icon.style.setProperty('margin-right', '4px');\n this.#icon.style.setProperty('vertical-align', 'baseline');\n root.appendChild(this.#icon);\n root.createChild('slot');\n }\n\n set data(data: IconButton.Icon.IconData) {\n this.#icon.data = data;\n // TODO(crbug.com/1427397): Clean this up. This was necessary so `DevToolsIconLabel` can use Lit icon\n // while being backwards-compatible with the legacy Icon while working for both small and large icons.\n if (data.height === '14px') {\n this.#icon.style.setProperty('margin-bottom', '-2px');\n } else if (data.height === '20px') {\n this.#icon.style.setProperty('margin-bottom', '2px');\n }\n }\n}\n\nlet labelId = 0;\n\nexport class DevToolsRadioButton extends HTMLSpanElement {\n radioElement: HTMLInputElement;\n labelElement: HTMLLabelElement;\n\n constructor() {\n super();\n this.radioElement = (this.createChild('input', 'dt-radio-button') as HTMLInputElement);\n this.labelElement = (this.createChild('label') as HTMLLabelElement);\n\n const id = 'dt-radio-button-id' + (++labelId);\n this.radioElement.id = id;\n this.radioElement.type = 'radio';\n this.labelElement.htmlFor = id;\n const root = createShadowRootWithCoreStyles(this, {cssFile: radioButtonStyles, delegatesFocus: undefined});\n root.createChild('slot');\n this.addEventListener('click', this.radioClickHandler.bind(this), false);\n }\n\n radioClickHandler(): void {\n if (this.radioElement.checked || this.radioElement.disabled) {\n return;\n }\n this.radioElement.checked = true;\n this.radioElement.dispatchEvent(new Event('change'));\n }\n}\n\nregisterCustomElement('span', 'dt-radio', DevToolsRadioButton);\nregisterCustomElement('span', 'dt-icon-label', DevToolsIconLabel);\n\nexport class DevToolsSlider extends HTMLSpanElement {\n sliderElement: HTMLInputElement;\n\n constructor() {\n super();\n const root = createShadowRootWithCoreStyles(this, {cssFile: sliderStyles, delegatesFocus: undefined});\n this.sliderElement = document.createElement('input');\n this.sliderElement.classList.add('dt-range-input');\n this.sliderElement.type = 'range';\n root.appendChild(this.sliderElement);\n }\n\n set value(amount: number) {\n this.sliderElement.value = String(amount);\n }\n\n get value(): number {\n return Number(this.sliderElement.value);\n }\n}\n\nregisterCustomElement('span', 'dt-slider', DevToolsSlider);\n\nexport class DevToolsSmallBubble extends HTMLSpanElement {\n private textElement: Element;\n\n constructor() {\n super();\n const root = createShadowRootWithCoreStyles(this, {cssFile: smallBubbleStyles, delegatesFocus: undefined});\n this.textElement = root.createChild('div');\n this.textElement.className = 'info';\n this.textElement.createChild('slot');\n }\n\n set type(type: string) {\n this.textElement.className = type;\n }\n}\n\nregisterCustomElement('span', 'dt-small-bubble', DevToolsSmallBubble);\n\nexport class DevToolsCloseButton extends HTMLDivElement {\n private button: Buttons.Button.Button;\n\n constructor() {\n super();\n const root = createShadowRootWithCoreStyles(this, {delegatesFocus: undefined});\n this.button = new Buttons.Button.Button();\n this.button.data = {variant: Buttons.Button.Variant.ICON, iconName: 'cross'};\n this.button.classList.add('close-button');\n this.button.setAttribute('jslog', `${VisualLogging.close().track({click: true})}`);\n Tooltip.install(this.button, i18nString(UIStrings.close));\n ARIAUtils.setLabel(this.button, i18nString(UIStrings.close));\n root.appendChild(this.button);\n }\n\n setAccessibleName(name: string): void {\n ARIAUtils.setLabel(this.button, name);\n }\n\n setTabbable(tabbable: boolean): void {\n if (tabbable) {\n this.button.tabIndex = 0;\n } else {\n this.button.tabIndex = -1;\n }\n }\n}\n\nregisterCustomElement('div', 'dt-close-button', DevToolsCloseButton);\n\nexport function bindInput(\n input: HTMLInputElement, apply: (arg0: string) => void, validate: (arg0: string) => {\n valid: boolean,\n errorMessage: (string | undefined),\n },\n numeric: boolean, modifierMultiplier?: number): (arg0: string) => void {\n input.addEventListener('change', onChange, false);\n input.addEventListener('input', onInput, false);\n input.addEventListener('keydown', onKeyDown, false);\n input.addEventListener('focus', input.select.bind(input), false);\n\n function onInput(): void {\n input.classList.toggle('error-input', !validate(input.value));\n }\n\n function onChange(): void {\n const {valid} = validate(input.value);\n input.classList.toggle('error-input', !valid);\n if (valid) {\n apply(input.value);\n }\n }\n\n function onKeyDown(event: KeyboardEvent): void {\n if (event.key === 'Enter') {\n const {valid} = validate(input.value);\n if (valid) {\n apply(input.value);\n }\n event.preventDefault();\n return;\n }\n\n if (!numeric) {\n return;\n }\n\n const value = modifiedFloatNumber(parseFloat(input.value), event, modifierMultiplier);\n if (value === null) {\n return;\n }\n const stringValue = String(value);\n const {valid} = validate(stringValue);\n if (valid) {\n setValue(stringValue);\n }\n event.preventDefault();\n }\n\n function setValue(value: string): void {\n if (value === input.value) {\n return;\n }\n const {valid} = validate(value);\n input.classList.toggle('error-input', !valid);\n input.value = value;\n }\n\n return setValue;\n}\n\nexport function trimText(\n context: CanvasRenderingContext2D, text: string, maxWidth: number,\n trimFunction: (arg0: string, arg1: number) => string): string {\n const maxLength = 200;\n if (maxWidth <= 10) {\n return '';\n }\n if (text.length > maxLength) {\n text = trimFunction(text, maxLength);\n }\n const textWidth = measureTextWidth(context, text);\n if (textWidth <= maxWidth) {\n return text;\n }\n\n let l = 0;\n let r: number = text.length;\n let lv = 0;\n let rv: number = textWidth;\n while (l < r && lv !== rv && lv !== maxWidth) {\n const m = Math.ceil(l + (r - l) * (maxWidth - lv) / (rv - lv));\n const mv = measureTextWidth(context, trimFunction(text, m));\n if (mv <= maxWidth) {\n l = m;\n lv = mv;\n } else {\n r = m - 1;\n rv = mv;\n }\n }\n text = trimFunction(text, l);\n return text !== '…' ? text : '';\n}\n\nexport function trimTextMiddle(context: CanvasRenderingContext2D, text: string, maxWidth: number): string {\n return trimText(context, text, maxWidth, (text, width) => Platform.StringUtilities.trimMiddle(text, width));\n}\n\nexport function trimTextEnd(context: CanvasRenderingContext2D, text: string, maxWidth: number): string {\n return trimText(context, text, maxWidth, (text, width) => Platform.StringUtilities.trimEndWithMaxLength(text, width));\n}\n\nexport function measureTextWidth(context: CanvasRenderingContext2D, text: string): number {\n const maxCacheableLength = 200;\n if (text.length > maxCacheableLength) {\n return context.measureText(text).width;\n }\n\n if (!measureTextWidthCache) {\n measureTextWidthCache = new Map();\n }\n const font = context.font;\n let textWidths = measureTextWidthCache.get(font);\n if (!textWidths) {\n textWidths = new Map();\n measureTextWidthCache.set(font, textWidths);\n }\n let width = textWidths.get(text);\n if (!width) {\n width = context.measureText(text).width;\n textWidths.set(text, width);\n }\n return width;\n}\n\nlet measureTextWidthCache: Map>|null = null;\n\n/**\n * Adds a 'utm_source=devtools' as query parameter to the url.\n */\nexport function addReferrerToURL(url: Platform.DevToolsPath.UrlString): Platform.DevToolsPath.UrlString {\n if (/(\\?|&)utm_source=devtools/.test(url)) {\n return url;\n }\n if (url.indexOf('?') === -1) {\n // If the URL does not contain a query, add the referrer query after path\n // and before (potential) anchor.\n return url.replace(/^([^#]*)(#.*)?$/g, '$1?utm_source=devtools$2') as Platform.DevToolsPath.UrlString;\n }\n // If the URL already contains a query, add the referrer query after the last query\n // and before (potential) anchor.\n return url.replace(/^([^#]*)(#.*)?$/g, '$1&utm_source=devtools$2') as Platform.DevToolsPath.UrlString;\n}\n\n/**\n * We want to add a referrer query param to every request to\n * 'web.dev' or 'developers.google.com'.\n */\nexport function addReferrerToURLIfNecessary(url: Platform.DevToolsPath.UrlString): Platform.DevToolsPath.UrlString {\n if (/(\\/\\/developers.google.com\\/|\\/\\/web.dev\\/|\\/\\/developer.chrome.com\\/)/.test(url)) {\n return addReferrerToURL(url);\n }\n return url;\n}\n\nexport function loadImage(url: string): Promise {\n return new Promise(fulfill => {\n const image = new Image();\n image.addEventListener('load', () => fulfill(image));\n image.addEventListener('error', () => fulfill(null));\n image.src = url;\n });\n}\n\nexport function createFileSelectorElement(callback: (arg0: File) => void): HTMLInputElement {\n const fileSelectorElement = document.createElement('input');\n fileSelectorElement.type = 'file';\n fileSelectorElement.style.display = 'none';\n fileSelectorElement.tabIndex = -1;\n fileSelectorElement.onchange = () => {\n if (fileSelectorElement.files) {\n callback(fileSelectorElement.files[0]);\n }\n };\n\n return fileSelectorElement;\n}\n\nexport const MaxLengthForDisplayedURLs = 150;\n\nexport class MessageDialog {\n static async show(message: string, where?: Element|Document, jslogContext?: string): Promise {\n const dialog = new Dialog(jslogContext);\n dialog.setSizeBehavior(SizeBehavior.MeasureContent);\n dialog.setDimmed(true);\n const shadowRoot = createShadowRootWithCoreStyles(\n dialog.contentElement, {cssFile: confirmDialogStyles, delegatesFocus: undefined});\n const content = shadowRoot.createChild('div', 'widget');\n await new Promise(resolve => {\n const okButton = createTextButton(\n i18nString(UIStrings.ok), resolve, {jslogContext: 'confirm', variant: Buttons.Button.Variant.PRIMARY});\n content.createChild('div', 'message').createChild('span').textContent = message;\n content.createChild('div', 'button').appendChild(okButton);\n dialog.setOutsideClickCallback(event => {\n event.consume();\n resolve(undefined);\n });\n dialog.show(where);\n okButton.focus();\n });\n dialog.hide();\n }\n}\n\nexport class ConfirmDialog {\n static async show(message: string, where?: Element|Document, options?: ConfirmDialogOptions): Promise {\n const dialog = new Dialog(options?.jslogContext);\n dialog.setSizeBehavior(SizeBehavior.MeasureContent);\n dialog.setDimmed(true);\n ARIAUtils.setLabel(dialog.contentElement, message);\n const shadowRoot = createShadowRootWithCoreStyles(\n dialog.contentElement, {cssFile: confirmDialogStyles, delegatesFocus: undefined});\n const content = shadowRoot.createChild('div', 'widget');\n content.createChild('div', 'message').createChild('span').textContent = message;\n const buttonsBar = content.createChild('div', 'button');\n const result = await new Promise(resolve => {\n const okButton = createTextButton(\n /* text= */ options?.okButtonLabel || i18nString(UIStrings.ok), /* clickHandler= */ () => resolve(true),\n {jslogContext: 'confirm', variant: Buttons.Button.Variant.PRIMARY});\n buttonsBar.appendChild(okButton);\n buttonsBar.appendChild(createTextButton(\n options?.cancelButtonLabel || i18nString(UIStrings.cancel), () => resolve(false), {jslogContext: 'cancel'}));\n dialog.setOutsideClickCallback(event => {\n event.consume();\n resolve(false);\n });\n dialog.show(where);\n okButton.focus();\n });\n dialog.hide();\n return result;\n }\n}\n\nexport function createInlineButton(toolbarButton: ToolbarButton): Element {\n const element = document.createElement('span');\n const shadowRoot = createShadowRootWithCoreStyles(element, {cssFile: inlineButtonStyles, delegatesFocus: undefined});\n element.classList.add('inline-button');\n const toolbar = new Toolbar('');\n toolbar.appendToolbarItem(toolbarButton);\n shadowRoot.appendChild(toolbar.element);\n return element;\n}\n\nexport abstract class Renderer {\n abstract render(object: Object, options?: Options): Promise<{\n node: Node,\n tree: TreeOutline|null,\n }|null>;\n\n static async render(object: Object, options?: Options): Promise<{\n node: Node,\n tree: TreeOutline|null,\n }|null> {\n if (!object) {\n throw new Error('Can\\'t render ' + object);\n }\n const extension = getApplicableRegisteredRenderers(object)[0];\n if (!extension) {\n return null;\n }\n const renderer = await extension.loadRenderer();\n return renderer.render(object, options);\n }\n}\n\nexport function formatTimestamp(timestamp: number, full: boolean): string {\n const date = new Date(timestamp);\n const yymmdd = date.getFullYear() + '-' + leadZero(date.getMonth() + 1, 2) + '-' + leadZero(date.getDate(), 2);\n const hhmmssfff = leadZero(date.getHours(), 2) + ':' + leadZero(date.getMinutes(), 2) + ':' +\n leadZero(date.getSeconds(), 2) + '.' + leadZero(date.getMilliseconds(), 3);\n return full ? (yymmdd + ' ' + hhmmssfff) : hhmmssfff;\n\n function leadZero(value: number, length: number): string {\n const valueString = String(value);\n return valueString.padStart(length, '0');\n }\n}\n\nexport interface Options {\n title?: string|Element;\n editable?: boolean;\n}\n\nexport interface HighlightChange {\n node: Element|Text;\n type: string;\n oldText?: string;\n newText?: string;\n nextSibling?: Node;\n parent?: Node;\n}\n\nexport const isScrolledToBottom = (element: Element): boolean => {\n // This code works only for 0-width border.\n // The scrollTop, clientHeight and scrollHeight are computed in double values internally.\n // However, they are exposed to javascript differently, each being either rounded (via\n // round, ceil or floor functions) or left intouch.\n // This adds up a total error up to 2.\n return Math.abs(element.scrollTop + element.clientHeight - element.scrollHeight) <= 2;\n};\n\nexport function createSVGChild(element: Element, childType: string, className?: string): Element {\n const child = element.ownerDocument.createElementNS('http://www.w3.org/2000/svg', childType);\n if (className) {\n child.setAttribute('class', className);\n }\n element.appendChild(child);\n return child;\n}\n\nexport const enclosingNodeOrSelfWithNodeNameInArray = (initialNode: Node, nameArray: string[]): Node|null => {\n let node: (Node|null)|Node = initialNode;\n for (; node && node !== initialNode.ownerDocument; node = node.parentNodeOrShadowHost()) {\n for (let i = 0; i < nameArray.length; ++i) {\n if (node.nodeName.toLowerCase() === nameArray[i].toLowerCase()) {\n return node;\n }\n }\n }\n return null;\n};\n\nexport const enclosingNodeOrSelfWithNodeName = function(node: Node, nodeName: string): Node|null {\n return enclosingNodeOrSelfWithNodeNameInArray(node, [nodeName]);\n};\n\nexport const deepElementFromPoint = (document: Document|ShadowRoot|null|undefined, x: number, y: number): Node|null => {\n let container: (ShadowRoot|null)|(Document | ShadowRoot | null | undefined) = document;\n let node: Element|null = null;\n while (container) {\n const innerNode = container.elementFromPoint(x, y);\n if (!innerNode || node === innerNode) {\n break;\n }\n node = innerNode;\n container = node.shadowRoot;\n }\n return node;\n};\n\nexport const deepElementFromEvent = (ev: Event): Node|null => {\n const event = (ev as MouseEvent);\n // Some synthetic events have zero coordinates which lead to a wrong element.\n // Better return nothing in this case.\n if (!event.which && !event.pageX && !event.pageY && !event.clientX && !event.clientY && !event.movementX &&\n !event.movementY) {\n return null;\n }\n const root = event.target && (event.target as Element).getComponentRoot();\n return root ? deepElementFromPoint((root as Document | ShadowRoot), event.pageX, event.pageY) : null;\n};\n\nconst registeredRenderers: RendererRegistration[] = [];\n\nexport function registerRenderer(registration: RendererRegistration): void {\n registeredRenderers.push(registration);\n}\nexport function getApplicableRegisteredRenderers(object: Object): RendererRegistration[] {\n return registeredRenderers.filter(isRendererApplicableToContextTypes);\n\n function isRendererApplicableToContextTypes(rendererRegistration: RendererRegistration): boolean {\n if (!rendererRegistration.contextTypes) {\n return true;\n }\n for (const contextType of rendererRegistration.contextTypes()) {\n if (object instanceof contextType) {\n return true;\n }\n }\n return false;\n }\n}\nexport interface RendererRegistration {\n loadRenderer: () => Promise;\n contextTypes: () => Array;\n}\n\nexport interface ConfirmDialogOptions {\n okButtonLabel?: string;\n cancelButtonLabel?: string;\n jslogContext?: string;\n}\n\nfunction updateWidgetfocusWidgetForNode(node: Node|null): void {\n while (node) {\n if (Widget.get(node)) {\n break;\n }\n\n node = node.parentNodeOrShadowHost();\n }\n if (!node) {\n return;\n }\n\n let widget = Widget.get(node);\n while (widget && widget.parentWidget()) {\n const parentWidget = widget.parentWidget();\n if (!parentWidget) {\n break;\n }\n\n parentWidget.defaultFocusedChild = widget;\n widget = parentWidget;\n }\n}\n\nfunction updateXWidgetfocusWidgetForNode(node: Node|null): void {\n node = node && node.parentNodeOrShadowHost();\n const XWidgetCtor = customElements.get('x-widget');\n let widget = null;\n while (node) {\n if (XWidgetCtor && node instanceof XWidgetCtor) {\n if (widget) {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (node as any).defaultFocusedElement = widget;\n }\n widget = node;\n }\n node = node.parentNodeOrShadowHost();\n }\n}\n\nfunction focusChanged(event: Event): void {\n const target = event.target as HTMLElement;\n const document = target ? target.ownerDocument : null;\n const element = document ? Platform.DOMUtilities.deepActiveElement(document) : null;\n updateWidgetfocusWidgetForNode(element);\n updateXWidgetfocusWidgetForNode(element);\n}\n\nexport function injectCoreStyles(root: Element|ShadowRoot): void {\n ThemeSupport.ThemeSupport.instance().appendStyle(root, applicationColorTokensStyles);\n ThemeSupport.ThemeSupport.instance().appendStyle(root, designTokensStyles);\n ThemeSupport.ThemeSupport.instance().appendStyle(root, inspectorCommonStyles);\n ThemeSupport.ThemeSupport.instance().appendStyle(root, textButtonStyles);\n ThemeSupport.ThemeSupport.instance().appendStyle(root, themeColorsStyles);\n ThemeSupport.ThemeSupport.instance().appendStyle(root, tokens);\n\n ThemeSupport.ThemeSupport.instance().injectHighlightStyleSheets(root);\n ThemeSupport.ThemeSupport.instance().injectCustomStyleSheets(root);\n}\n\nexport function createShadowRootWithCoreStyles(\n element: Element, options: {cssFile?: CSSStyleSheet[]|{cssContent: string}, delegatesFocus?: boolean} = {\n delegatesFocus: undefined,\n cssFile: undefined,\n }): ShadowRoot {\n const {\n cssFile,\n delegatesFocus,\n } = options;\n\n const shadowRoot = element.attachShadow({mode: 'open', delegatesFocus});\n injectCoreStyles(shadowRoot);\n if (cssFile) {\n if ('cssContent' in cssFile) {\n ThemeSupport.ThemeSupport.instance().appendStyle(shadowRoot, cssFile);\n } else {\n shadowRoot.adoptedStyleSheets = cssFile;\n }\n }\n shadowRoot.addEventListener('focus', focusChanged, true);\n return shadowRoot;\n}\n\nlet cachedMeasuredScrollbarWidth: number|undefined;\n\nexport function resetMeasuredScrollbarWidthForTest(): void {\n cachedMeasuredScrollbarWidth = undefined;\n}\n\nexport function measuredScrollbarWidth(document?: Document|null): number {\n if (typeof cachedMeasuredScrollbarWidth === 'number') {\n return cachedMeasuredScrollbarWidth;\n }\n if (!document) {\n return 16;\n }\n\n const scrollDiv = document.createElement('div');\n const innerDiv = document.createElement('div');\n scrollDiv.setAttribute('style', 'display: block; width: 100px; height: 100px; overflow: scroll;');\n innerDiv.setAttribute('style', 'height: 200px');\n scrollDiv.appendChild(innerDiv);\n document.body.appendChild(scrollDiv);\n cachedMeasuredScrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return cachedMeasuredScrollbarWidth;\n}\n\nexport function registerCustomElement(\n localName: string, typeExtension: string, definition: new () => HTMLElement): () => Element {\n self.customElements.define(typeExtension, class extends definition {\n constructor() {\n // The JSDoc above does not allow the super call to have no params, but\n // it seems to be the nearest to something both Closure and TS understand.\n // @ts-ignore crbug.com/1011811: Fix after Closure has been removed.\n super();\n // TODO(einbinder) convert to classes and custom element tags\n this.setAttribute('is', typeExtension);\n }\n }, {extends: localName});\n return (): Element => document.createElement(localName, {is: typeExtension});\n}\n"]} \ No newline at end of file +{"version":3,"file":"UIUtils.js","sourceRoot":"","sources":["../../../../../../front_end/ui/legacy/UIUtils.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAChD,OAAO,KAAK,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,SAAS,MAAM,uCAAuC,CAAC;AACnE,OAAO,KAAK,OAAO,MAAM,kCAAkC,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,0CAA0C,CAAC;AACvE,OAAO,KAAK,aAAa,MAAM,qCAAqC,CAAC;AAErE,OAAO,4BAA4B,MAAM,wCAAwC,CAAC;AAClF,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,uBAAuB,MAAM,mCAAmC,CAAC;AACxE,OAAO,mBAAmB,MAAM,+BAA+B,CAAC;AAChE,OAAO,kBAAkB,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAC,MAAM,EAAC,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AC,CAAC;IACzB,OAAO,GAAY,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC,SAAS,EAAE,EAAC,EAAE,EAAE,aAAa,EAAC,CAAC,CAAC;AAC/E,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\n/*\n * Copyright (C) 2011 Google Inc. All rights reserved.\n * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.\n * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).\n * Copyright (C) 2009 Joseph Pecoraro\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 *\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 * 3. Neither the name of Apple Computer, Inc. (\"Apple\") nor the names of\n * its contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS \"AS IS\" AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\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 TextUtils from '../../models/text_utils/text_utils.js';\nimport * as Buttons from '../components/buttons/buttons.js';\nimport * as IconButton from '../components/icon_button/icon_button.js';\nimport * as VisualLogging from '../visual_logging/visual_logging.js';\n\nimport applicationColorTokensStyles from './applicationColorTokens.css.legacy.js';\nimport * as ARIAUtils from './ARIAUtils.js';\nimport checkboxTextLabelStyles from './checkboxTextLabel.css.legacy.js';\nimport confirmDialogStyles from './confirmDialog.css.legacy.js';\nimport designTokensStyles from './designTokens.css.legacy.js';\nimport {Dialog} from './Dialog.js';\nimport {Size} from './Geometry.js';\nimport {GlassPane, PointerEventsBehavior, SizeBehavior} from './GlassPane.js';\nimport inlineButtonStyles from './inlineButton.css.legacy.js';\nimport inspectorCommonStyles from './inspectorCommon.css.legacy.js';\nimport {KeyboardShortcut} from './KeyboardShortcut.js';\nimport radioButtonStyles from './radioButton.css.legacy.js';\nimport sliderStyles from './slider.css.legacy.js';\nimport smallBubbleStyles from './smallBubble.css.legacy.js';\nimport textButtonStyles from './textButton.css.legacy.js';\nimport * as ThemeSupport from './theme_support/theme_support.js';\nimport themeColorsStyles from './themeColors.css.legacy.js';\nimport tokens from './tokens.css.legacy.js';\nimport {Toolbar, type ToolbarButton} from './Toolbar.js';\nimport {Tooltip} from './Tooltip.js';\nimport {type TreeOutline} from './Treeoutline.js';\nimport {Widget} from './Widget.js';\n\nconst UIStrings = {\n /**\n *@description label to open link externally\n */\n openInNewTab: 'Open in new tab',\n /**\n *@description label to copy link address\n */\n copyLinkAddress: 'Copy link address',\n /**\n *@description label to copy file name\n */\n copyFileName: 'Copy file name',\n /**\n *@description label for the profiler control button\n */\n anotherProfilerIsAlreadyActive: 'Another profiler is already active',\n /**\n *@description Text in UIUtils\n */\n promiseResolvedAsync: 'Promise resolved (async)',\n /**\n *@description Text in UIUtils\n */\n promiseRejectedAsync: 'Promise rejected (async)',\n /**\n *@description Text for the title of asynchronous function calls group in Call Stack\n */\n asyncCall: 'Async Call',\n /**\n *@description Text for the name of anonymous functions\n */\n anonymous: '(anonymous)',\n /**\n *@description Text to close something\n */\n close: 'Close',\n /**\n *@description Text on a button for message dialog\n */\n ok: 'OK',\n /**\n *@description Text to cancel something\n */\n cancel: 'Cancel',\n};\nconst str_ = i18n.i18n.registerUIStrings('ui/legacy/UIUtils.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport const highlightedSearchResultClassName = 'highlighted-search-result';\nexport const highlightedCurrentSearchResultClassName = 'current-search-result';\n\nexport function installDragHandle(\n element: Element, elementDragStart: ((arg0: MouseEvent) => boolean)|null, elementDrag: (arg0: MouseEvent) => void,\n elementDragEnd: ((arg0: MouseEvent) => void)|null, cursor: string|null, hoverCursor?: string|null,\n startDelay?: number): void {\n function onMouseDown(event: Event): void {\n const dragHandler = new DragHandler();\n const dragStart = (): void =>\n dragHandler.elementDragStart(element, elementDragStart, elementDrag, elementDragEnd, cursor, event);\n if (startDelay) {\n startTimer = window.setTimeout(dragStart, startDelay);\n } else {\n dragStart();\n }\n }\n\n function onMouseUp(): void {\n if (startTimer) {\n window.clearTimeout(startTimer);\n }\n startTimer = null;\n }\n\n let startTimer: number|null;\n element.addEventListener('pointerdown', onMouseDown, false);\n if (startDelay) {\n element.addEventListener('pointerup', onMouseUp, false);\n }\n if (hoverCursor !== null) {\n (element as HTMLElement).style.cursor = hoverCursor || cursor || '';\n }\n}\n\nexport function elementDragStart(\n targetElement: Element, elementDragStart: ((arg0: MouseEvent) => boolean)|null,\n elementDrag: (arg0: MouseEvent) => void, elementDragEnd: ((arg0: MouseEvent) => void)|null, cursor: string|null,\n event: Event): void {\n const dragHandler = new DragHandler();\n dragHandler.elementDragStart(targetElement, elementDragStart, elementDrag, elementDragEnd, cursor, event);\n}\n\nclass DragHandler {\n private glassPaneInUse?: boolean;\n private elementDraggingEventListener?: ((arg0: MouseEvent) => void|boolean);\n private elementEndDraggingEventListener?: ((arg0: MouseEvent) => void)|null;\n private dragEventsTargetDocument?: Document;\n private dragEventsTargetDocumentTop?: Document;\n private restoreCursorAfterDrag?: (() => void);\n\n constructor() {\n this.elementDragMove = this.elementDragMove.bind(this);\n this.elementDragEnd = this.elementDragEnd.bind(this);\n this.mouseOutWhileDragging = this.mouseOutWhileDragging.bind(this);\n }\n\n private createGlassPane(): void {\n this.glassPaneInUse = true;\n if (!DragHandler.glassPaneUsageCount++) {\n DragHandler.glassPane = new GlassPane();\n DragHandler.glassPane.setPointerEventsBehavior(PointerEventsBehavior.BlockedByGlassPane);\n if (DragHandler.documentForMouseOut) {\n DragHandler.glassPane.show(DragHandler.documentForMouseOut);\n }\n }\n }\n\n private disposeGlassPane(): void {\n if (!this.glassPaneInUse) {\n return;\n }\n this.glassPaneInUse = false;\n if (--DragHandler.glassPaneUsageCount) {\n return;\n }\n if (DragHandler.glassPane) {\n DragHandler.glassPane.hide();\n DragHandler.glassPane = null;\n }\n DragHandler.documentForMouseOut = null;\n DragHandler.rootForMouseOut = null;\n }\n\n elementDragStart(\n targetElement: Element, elementDragStart: ((arg0: MouseEvent) => boolean)|null,\n elementDrag: (arg0: MouseEvent) => void|boolean, elementDragEnd: ((arg0: MouseEvent) => void)|null,\n cursor: string|null, ev: Event): void {\n const event = (ev as MouseEvent);\n // Only drag upon left button. Right will likely cause a context menu. So will ctrl-click on mac.\n if (event.button || (Host.Platform.isMac() && event.ctrlKey)) {\n return;\n }\n\n if (this.elementDraggingEventListener) {\n return;\n }\n\n if (elementDragStart && !elementDragStart((event as MouseEvent))) {\n return;\n }\n\n const targetDocument = (event.target instanceof Node && event.target.ownerDocument) as Document;\n this.elementDraggingEventListener = elementDrag;\n this.elementEndDraggingEventListener = elementDragEnd;\n console.assert(\n (DragHandler.documentForMouseOut || targetDocument) === targetDocument, 'Dragging on multiple documents.');\n DragHandler.documentForMouseOut = targetDocument;\n DragHandler.rootForMouseOut = event.target instanceof Node && event.target.getRootNode() || null;\n this.dragEventsTargetDocument = targetDocument;\n try {\n if (targetDocument.defaultView && targetDocument.defaultView.top) {\n this.dragEventsTargetDocumentTop = targetDocument.defaultView.top.document;\n }\n } catch (e) {\n this.dragEventsTargetDocumentTop = this.dragEventsTargetDocument;\n }\n\n targetDocument.addEventListener('pointermove', this.elementDragMove, true);\n targetDocument.addEventListener('pointerup', this.elementDragEnd, true);\n DragHandler.rootForMouseOut &&\n DragHandler.rootForMouseOut.addEventListener('pointerout', this.mouseOutWhileDragging, {capture: true});\n if (this.dragEventsTargetDocumentTop && targetDocument !== this.dragEventsTargetDocumentTop) {\n this.dragEventsTargetDocumentTop.addEventListener('pointerup', this.elementDragEnd, true);\n }\n\n const targetHtmlElement = (targetElement as HTMLElement);\n if (typeof cursor === 'string') {\n this.restoreCursorAfterDrag = restoreCursor.bind(this, targetHtmlElement.style.cursor);\n targetHtmlElement.style.cursor = cursor;\n targetDocument.body.style.cursor = cursor;\n }\n function restoreCursor(this: DragHandler, oldCursor: string): void {\n targetDocument.body.style.removeProperty('cursor');\n targetHtmlElement.style.cursor = oldCursor;\n this.restoreCursorAfterDrag = undefined;\n }\n event.preventDefault();\n }\n\n private mouseOutWhileDragging(): void {\n this.unregisterMouseOutWhileDragging();\n this.createGlassPane();\n }\n\n private unregisterMouseOutWhileDragging(): void {\n if (!DragHandler.rootForMouseOut) {\n return;\n }\n DragHandler.rootForMouseOut.removeEventListener('pointerout', this.mouseOutWhileDragging, {capture: true});\n }\n\n private unregisterDragEvents(): void {\n if (!this.dragEventsTargetDocument) {\n return;\n }\n this.dragEventsTargetDocument.removeEventListener('pointermove', this.elementDragMove, true);\n this.dragEventsTargetDocument.removeEventListener('pointerup', this.elementDragEnd, true);\n if (this.dragEventsTargetDocumentTop && this.dragEventsTargetDocument !== this.dragEventsTargetDocumentTop) {\n this.dragEventsTargetDocumentTop.removeEventListener('pointerup', this.elementDragEnd, true);\n }\n delete this.dragEventsTargetDocument;\n delete this.dragEventsTargetDocumentTop;\n }\n\n private elementDragMove(event: MouseEvent): void {\n if (event.buttons !== 1) {\n this.elementDragEnd(event);\n return;\n }\n if (this.elementDraggingEventListener && this.elementDraggingEventListener(event)) {\n this.cancelDragEvents(event);\n }\n }\n\n private cancelDragEvents(_event: Event): void {\n this.unregisterDragEvents();\n this.unregisterMouseOutWhileDragging();\n\n if (this.restoreCursorAfterDrag) {\n this.restoreCursorAfterDrag();\n }\n\n this.disposeGlassPane();\n\n delete this.elementDraggingEventListener;\n delete this.elementEndDraggingEventListener;\n }\n\n private elementDragEnd(event: Event): void {\n const elementDragEnd = this.elementEndDraggingEventListener;\n this.cancelDragEvents((event as MouseEvent));\n event.preventDefault();\n if (elementDragEnd) {\n elementDragEnd((event as MouseEvent));\n }\n }\n\n private static glassPaneUsageCount = 0;\n private static glassPane: GlassPane|null = null;\n private static documentForMouseOut: Document|null = null;\n private static rootForMouseOut: Node|null = null;\n}\n\nexport function isBeingEdited(node?: Node|null): boolean {\n if (!node || node.nodeType !== Node.ELEMENT_NODE) {\n return false;\n }\n const element = (node as Element);\n if (element.classList.contains('text-prompt') || element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {\n return true;\n }\n\n if (!elementsBeingEdited.size) {\n return false;\n }\n\n let currentElement: (Element|null)|Element = element;\n while (currentElement) {\n if (elementsBeingEdited.has(element)) {\n return true;\n }\n currentElement = currentElement.parentElementOrShadowHost();\n }\n return false;\n}\n\nexport function isEditing(): boolean {\n if (elementsBeingEdited.size) {\n return true;\n }\n\n const focused = Platform.DOMUtilities.deepActiveElement(document);\n if (!focused) {\n return false;\n }\n return focused.classList.contains('text-prompt') || focused.nodeName === 'INPUT' || focused.nodeName === 'TEXTAREA' ||\n ((focused as HTMLElement).contentEditable === 'true' ||\n (focused as HTMLElement).contentEditable === 'plaintext-only');\n}\n\nexport function markBeingEdited(element: Element, value: boolean): boolean {\n if (value) {\n if (elementsBeingEdited.has(element)) {\n return false;\n }\n element.classList.add('being-edited');\n elementsBeingEdited.add(element);\n } else {\n if (!elementsBeingEdited.has(element)) {\n return false;\n }\n element.classList.remove('being-edited');\n elementsBeingEdited.delete(element);\n }\n return true;\n}\n\nconst elementsBeingEdited = new Set();\n\n// Avoids Infinity, NaN, and scientific notation (e.g. 1e20), see crbug.com/81165.\nconst numberRegex = /^(-?(?:\\d+(?:\\.\\d+)?|\\.\\d+))$/;\n\nexport const StyleValueDelimiters = ' \\xA0\\t\\n\"\\':;,/()';\n\nexport function getValueModificationDirection(event: Event): string|null {\n let direction: 'Up'|'Down'|null = null;\n if (event.type === 'wheel') {\n // When shift is pressed while spinning mousewheel, delta comes as wheelDeltaX.\n const wheelEvent = (event as WheelEvent);\n if (wheelEvent.deltaY < 0 || wheelEvent.deltaX < 0) {\n direction = 'Up';\n } else if (wheelEvent.deltaY > 0 || wheelEvent.deltaX > 0) {\n direction = 'Down';\n }\n } else {\n const keyEvent = (event as KeyboardEvent);\n if (keyEvent.key === 'ArrowUp' || keyEvent.key === 'PageUp') {\n direction = 'Up';\n } else if (keyEvent.key === 'ArrowDown' || keyEvent.key === 'PageDown') {\n direction = 'Down';\n }\n }\n\n return direction;\n}\n\nfunction modifiedHexValue(hexString: string, event: Event): string|null {\n const direction = getValueModificationDirection(event);\n if (!direction) {\n return null;\n }\n\n const mouseEvent = (event as MouseEvent);\n const number = parseInt(hexString, 16);\n if (isNaN(number) || !isFinite(number)) {\n return null;\n }\n\n const hexStrLen = hexString.length;\n const channelLen = hexStrLen / 3;\n\n // Colors are either rgb or rrggbb.\n if (channelLen !== 1 && channelLen !== 2) {\n return null;\n }\n\n // Precision modifier keys work with both mousewheel and up/down keys.\n // When ctrl is pressed, increase R by 1.\n // When shift is pressed, increase G by 1.\n // When alt is pressed, increase B by 1.\n // If no shortcut keys are pressed then increase hex value by 1.\n // Keys can be pressed together to increase RGB channels. e.g trying different shades.\n let delta = 0;\n if (KeyboardShortcut.eventHasCtrlEquivalentKey(mouseEvent)) {\n delta += Math.pow(16, channelLen * 2);\n }\n if (mouseEvent.shiftKey) {\n delta += Math.pow(16, channelLen);\n }\n if (mouseEvent.altKey) {\n delta += 1;\n }\n if (delta === 0) {\n delta = 1;\n }\n if (direction === 'Down') {\n delta *= -1;\n }\n\n // Increase hex value by 1 and clamp from 0 ... maxValue.\n const maxValue = Math.pow(16, hexStrLen) - 1;\n const result = Platform.NumberUtilities.clamp(number + delta, 0, maxValue);\n\n // Ensure the result length is the same as the original hex value.\n let resultString = result.toString(16).toUpperCase();\n for (let i = 0, lengthDelta = hexStrLen - resultString.length; i < lengthDelta; ++i) {\n resultString = '0' + resultString;\n }\n return resultString;\n}\n\nexport function modifiedFloatNumber(number: number, event: Event, modifierMultiplier?: number): number|null {\n const direction = getValueModificationDirection(event);\n if (!direction) {\n return null;\n }\n\n const mouseEvent = (event as MouseEvent);\n\n // Precision modifier keys work with both mousewheel and up/down keys.\n // When ctrl is pressed, increase by 100.\n // When shift is pressed, increase by 10.\n // When alt is pressed, increase by 0.1.\n // Otherwise increase by 1.\n let delta = 1;\n if (KeyboardShortcut.eventHasCtrlEquivalentKey(mouseEvent)) {\n delta = 100;\n } else if (mouseEvent.shiftKey) {\n delta = 10;\n } else if (mouseEvent.altKey) {\n delta = 0.1;\n }\n\n if (direction === 'Down') {\n delta *= -1;\n }\n if (modifierMultiplier) {\n delta *= modifierMultiplier;\n }\n\n // Make the new number and constrain it to a precision of 6, this matches numbers the engine returns.\n // Use the Number constructor to forget the fixed precision, so 1.100000 will print as 1.1.\n const result = Number((number + delta).toFixed(6));\n if (!String(result).match(numberRegex)) {\n return null;\n }\n return result;\n}\n\nexport function createReplacementString(\n wordString: string, event: Event,\n customNumberHandler?: ((arg0: string, arg1: number, arg2: string) => string)): string|null {\n let prefix;\n let suffix;\n let number;\n let replacementString: string|null = null;\n let matches = /(.*#)([\\da-fA-F]+)(.*)/.exec(wordString);\n if (matches && matches.length) {\n prefix = matches[1];\n suffix = matches[3];\n number = modifiedHexValue(matches[2], event);\n if (number !== null) {\n replacementString = prefix + number + suffix;\n }\n } else {\n matches = /(.*?)(-?(?:\\d+(?:\\.\\d+)?|\\.\\d+))(.*)/.exec(wordString);\n if (matches && matches.length) {\n prefix = matches[1];\n suffix = matches[3];\n number = modifiedFloatNumber(parseFloat(matches[2]), event);\n if (number !== null) {\n replacementString =\n customNumberHandler ? customNumberHandler(prefix, number, suffix) : prefix + number + suffix;\n }\n }\n }\n return replacementString;\n}\n\nexport function isElementValueModification(event: Event): boolean {\n const arrowKeyOrWheelEvent =\n ((event as KeyboardEvent).key === 'ArrowUp' || (event as KeyboardEvent).key === 'ArrowDown' ||\n event.type === 'wheel');\n const pageKeyPressed = ((event as KeyboardEvent).key === 'PageUp' || (event as KeyboardEvent).key === 'PageDown');\n return arrowKeyOrWheelEvent || pageKeyPressed;\n}\n\nexport function handleElementValueModifications(\n event: Event, element: Element, finishHandler?: ((arg0: string, arg1: string) => void),\n suggestionHandler?: ((arg0: string) => boolean),\n customNumberHandler?: ((arg0: string, arg1: number, arg2: string) => string)): boolean {\n if (!isElementValueModification(event)) {\n return false;\n }\n void VisualLogging.logKeyDown(event.currentTarget, event, 'element-value-modification');\n\n const selection = element.getComponentSelection();\n if (!selection || !selection.rangeCount) {\n return false;\n }\n\n const selectionRange = selection.getRangeAt(0);\n if (!selectionRange.commonAncestorContainer.isSelfOrDescendant(element)) {\n return false;\n }\n\n const originalValue = element.textContent;\n const wordRange = Platform.DOMUtilities.rangeOfWord(\n selectionRange.startContainer, selectionRange.startOffset, StyleValueDelimiters, element);\n const wordString = wordRange.toString();\n\n if (suggestionHandler && suggestionHandler(wordString)) {\n return false;\n }\n\n const replacementString = createReplacementString(wordString, event, customNumberHandler);\n\n if (replacementString) {\n const replacementTextNode = document.createTextNode(replacementString);\n\n wordRange.deleteContents();\n wordRange.insertNode(replacementTextNode);\n\n const finalSelectionRange = document.createRange();\n finalSelectionRange.setStart(replacementTextNode, 0);\n finalSelectionRange.setEnd(replacementTextNode, replacementString.length);\n\n selection.removeAllRanges();\n selection.addRange(finalSelectionRange);\n\n event.handled = true;\n event.preventDefault();\n\n if (finishHandler) {\n finishHandler(originalValue || '', replacementString);\n }\n\n return true;\n }\n return false;\n}\n\nexport function openLinkExternallyLabel(): string {\n return i18nString(UIStrings.openInNewTab);\n}\n\nexport function copyLinkAddressLabel(): string {\n return i18nString(UIStrings.copyLinkAddress);\n}\n\nexport function copyFileNameLabel(): string {\n return i18nString(UIStrings.copyFileName);\n}\n\nexport function anotherProfilerActiveLabel(): string {\n return i18nString(UIStrings.anotherProfilerIsAlreadyActive);\n}\n\nexport function asyncStackTraceLabel(\n description: string|undefined, previousCallFrames: {functionName: string}[]): string {\n if (description) {\n if (description === 'Promise.resolve') {\n return i18nString(UIStrings.promiseResolvedAsync);\n }\n if (description === 'Promise.reject') {\n return i18nString(UIStrings.promiseRejectedAsync);\n }\n if (description === 'await' && previousCallFrames.length !== 0) {\n const lastPreviousFrame = previousCallFrames[previousCallFrames.length - 1];\n const lastPreviousFrameName = beautifyFunctionName(lastPreviousFrame.functionName);\n description = `await in ${lastPreviousFrameName}`;\n }\n return description;\n }\n return i18nString(UIStrings.asyncCall);\n}\n\nexport function installComponentRootStyles(element: Element): void {\n injectCoreStyles(element);\n element.classList.add('platform-' + Host.Platform.platform());\n\n // Detect overlay scrollbar enable by checking for nonzero scrollbar width.\n if (!Host.Platform.isMac() && measuredScrollbarWidth(element.ownerDocument) === 0) {\n element.classList.add('overlay-scrollbar-enabled');\n }\n}\n\nfunction windowFocused(document: Document, event: Event): void {\n if (event.target instanceof Window && event.target.document.nodeType === Node.DOCUMENT_NODE) {\n document.body.classList.remove('inactive');\n }\n}\n\nfunction windowBlurred(document: Document, event: Event): void {\n if (event.target instanceof Window && event.target.document.nodeType === Node.DOCUMENT_NODE) {\n document.body.classList.add('inactive');\n }\n}\n\nexport class ElementFocusRestorer {\n private element: HTMLElement|null;\n private previous: HTMLElement|null;\n constructor(element: Element) {\n this.element = (element as HTMLElement | null);\n this.previous = (Platform.DOMUtilities.deepActiveElement(element.ownerDocument) as HTMLElement | null);\n (element as HTMLElement).focus();\n }\n\n restore(): void {\n if (!this.element) {\n return;\n }\n if (this.element.hasFocus() && this.previous) {\n this.previous.focus();\n }\n this.previous = null;\n this.element = null;\n }\n}\n\nexport function highlightSearchResult(\n element: Element, offset: number, length: number, domChanges?: HighlightChange[]): Element|null {\n const result = highlightSearchResults(element, [new TextUtils.TextRange.SourceRange(offset, length)], domChanges);\n return result.length ? result[0] : null;\n}\n\nexport function highlightSearchResults(\n element: Element, resultRanges: TextUtils.TextRange.SourceRange[], changes?: HighlightChange[]): Element[] {\n return highlightRangesWithStyleClass(element, resultRanges, highlightedSearchResultClassName, changes);\n}\n\nexport function runCSSAnimationOnce(element: Element, className: string): void {\n function animationEndCallback(): void {\n element.classList.remove(className);\n element.removeEventListener('webkitAnimationEnd', animationEndCallback, false);\n }\n\n if (element.classList.contains(className)) {\n element.classList.remove(className);\n }\n\n element.addEventListener('webkitAnimationEnd', animationEndCallback, false);\n element.classList.add(className);\n}\n\nexport function highlightRangesWithStyleClass(\n element: Element, resultRanges: TextUtils.TextRange.SourceRange[], styleClass: string,\n changes?: HighlightChange[]): Element[] {\n changes = changes || [];\n const highlightNodes: Element[] = [];\n const textNodes = element.childTextNodes();\n const lineText = textNodes\n .map(function(node) {\n return node.textContent;\n })\n .join('');\n const ownerDocument = element.ownerDocument;\n\n if (textNodes.length === 0) {\n return highlightNodes;\n }\n\n const nodeRanges: TextUtils.TextRange.SourceRange[] = [];\n let rangeEndOffset = 0;\n for (const textNode of textNodes) {\n const range =\n new TextUtils.TextRange.SourceRange(rangeEndOffset, textNode.textContent ? textNode.textContent.length : 0);\n rangeEndOffset = range.offset + range.length;\n nodeRanges.push(range);\n }\n\n let startIndex = 0;\n for (let i = 0; i < resultRanges.length; ++i) {\n const startOffset = resultRanges[i].offset;\n const endOffset = startOffset + resultRanges[i].length;\n\n while (startIndex < textNodes.length &&\n nodeRanges[startIndex].offset + nodeRanges[startIndex].length <= startOffset) {\n startIndex++;\n }\n let endIndex = startIndex;\n while (endIndex < textNodes.length && nodeRanges[endIndex].offset + nodeRanges[endIndex].length < endOffset) {\n endIndex++;\n }\n if (endIndex === textNodes.length) {\n break;\n }\n\n const highlightNode = ownerDocument.createElement('span');\n highlightNode.className = styleClass;\n highlightNode.textContent = lineText.substring(startOffset, endOffset);\n\n const lastTextNode = textNodes[endIndex];\n const lastText = lastTextNode.textContent || '';\n lastTextNode.textContent = lastText.substring(endOffset - nodeRanges[endIndex].offset);\n changes.push({\n node: (lastTextNode as Element),\n type: 'changed',\n oldText: lastText,\n newText: lastTextNode.textContent,\n nextSibling: undefined,\n parent: undefined,\n });\n\n if (startIndex === endIndex && lastTextNode.parentElement) {\n lastTextNode.parentElement.insertBefore(highlightNode, lastTextNode);\n changes.push({\n node: highlightNode,\n type: 'added',\n nextSibling: lastTextNode,\n parent: lastTextNode.parentElement,\n oldText: undefined,\n newText: undefined,\n });\n highlightNodes.push(highlightNode);\n\n const prefixNode =\n ownerDocument.createTextNode(lastText.substring(0, startOffset - nodeRanges[startIndex].offset));\n lastTextNode.parentElement.insertBefore(prefixNode, highlightNode);\n changes.push({\n node: prefixNode,\n type: 'added',\n nextSibling: highlightNode,\n parent: lastTextNode.parentElement,\n oldText: undefined,\n newText: undefined,\n });\n } else {\n const firstTextNode = textNodes[startIndex];\n const firstText = firstTextNode.textContent || '';\n const anchorElement = firstTextNode.nextSibling;\n\n if (firstTextNode.parentElement) {\n firstTextNode.parentElement.insertBefore(highlightNode, anchorElement);\n changes.push({\n node: highlightNode,\n type: 'added',\n nextSibling: anchorElement || undefined,\n parent: firstTextNode.parentElement,\n oldText: undefined,\n newText: undefined,\n });\n highlightNodes.push(highlightNode);\n }\n\n firstTextNode.textContent = firstText.substring(0, startOffset - nodeRanges[startIndex].offset);\n changes.push({\n node: (firstTextNode as Element),\n type: 'changed',\n oldText: firstText,\n newText: firstTextNode.textContent,\n nextSibling: undefined,\n parent: undefined,\n });\n\n for (let j = startIndex + 1; j < endIndex; j++) {\n const textNode = textNodes[j];\n const text = textNode.textContent;\n textNode.textContent = '';\n changes.push({\n node: (textNode as Element),\n type: 'changed',\n oldText: text || undefined,\n newText: textNode.textContent,\n nextSibling: undefined,\n parent: undefined,\n });\n }\n }\n startIndex = endIndex;\n nodeRanges[startIndex].offset = endOffset;\n nodeRanges[startIndex].length = lastTextNode.textContent.length;\n }\n return highlightNodes;\n}\n\nexport function applyDomChanges(domChanges: HighlightChange[]): void {\n for (let i = 0, size = domChanges.length; i < size; ++i) {\n const entry = domChanges[i];\n switch (entry.type) {\n case 'added':\n entry.parent?.insertBefore(entry.node, entry.nextSibling ?? null);\n break;\n case 'changed':\n entry.node.textContent = entry.newText ?? null;\n break;\n }\n }\n}\n\nexport function revertDomChanges(domChanges: HighlightChange[]): void {\n for (let i = domChanges.length - 1; i >= 0; --i) {\n const entry = domChanges[i];\n switch (entry.type) {\n case 'added':\n entry.node.remove();\n break;\n case 'changed':\n entry.node.textContent = entry.oldText ?? null;\n break;\n }\n }\n}\n\nexport function measurePreferredSize(element: Element, containerElement?: Element|null): Size {\n const oldParent = element.parentElement;\n const oldNextSibling = element.nextSibling;\n containerElement = containerElement || element.ownerDocument.body;\n containerElement.appendChild(element);\n element.positionAt(0, 0);\n const result = element.getBoundingClientRect();\n\n element.positionAt(undefined, undefined);\n if (oldParent) {\n oldParent.insertBefore(element, oldNextSibling);\n } else {\n element.remove();\n }\n return new Size(result.width, result.height);\n}\n\nclass InvokeOnceHandlers {\n private handlers: Map>|null;\n private readonly autoInvoke: boolean;\n constructor(autoInvoke: boolean) {\n this.handlers = null;\n this.autoInvoke = autoInvoke;\n }\n\n add(object: Object, method: () => void): void {\n if (!this.handlers) {\n this.handlers = new Map();\n if (this.autoInvoke) {\n this.scheduleInvoke();\n }\n }\n let methods = this.handlers.get(object);\n if (!methods) {\n methods = new Set();\n this.handlers.set(object, methods);\n }\n methods.add(method);\n }\n scheduleInvoke(): void {\n if (this.handlers) {\n requestAnimationFrame(this.invoke.bind(this));\n }\n }\n\n private invoke(): void {\n const handlers = this.handlers;\n this.handlers = null;\n if (handlers) {\n for (const [object, methods] of handlers) {\n for (const method of methods) {\n method.call(object);\n }\n }\n }\n }\n}\n\nlet coalescingLevel = 0;\nlet postUpdateHandlers: InvokeOnceHandlers|null = null;\n\nexport function startBatchUpdate(): void {\n if (!coalescingLevel++) {\n postUpdateHandlers = new InvokeOnceHandlers(false);\n }\n}\n\nexport function endBatchUpdate(): void {\n if (--coalescingLevel) {\n return;\n }\n\n if (postUpdateHandlers) {\n postUpdateHandlers.scheduleInvoke();\n postUpdateHandlers = null;\n }\n}\n\nexport function invokeOnceAfterBatchUpdate(object: Object, method: () => void): void {\n if (!postUpdateHandlers) {\n postUpdateHandlers = new InvokeOnceHandlers(true);\n }\n postUpdateHandlers.add(object, method);\n}\n\nexport function animateFunction(\n window: Window, func: Function, params: {\n from: number,\n to: number,\n }[],\n duration: number, animationComplete?: (() => void)): () => void {\n const start = window.performance.now();\n let raf = window.requestAnimationFrame(animationStep);\n\n function animationStep(timestamp: number): void {\n const progress = Platform.NumberUtilities.clamp((timestamp - start) / duration, 0, 1);\n func(...params.map(p => p.from + (p.to - p.from) * progress));\n if (progress < 1) {\n raf = window.requestAnimationFrame(animationStep);\n } else if (animationComplete) {\n animationComplete();\n }\n }\n\n return () => window.cancelAnimationFrame(raf);\n}\n\nexport class LongClickController {\n private readonly element: Element;\n private readonly callback: (arg0: Event) => void;\n private readonly editKey: (arg0: KeyboardEvent) => boolean;\n private longClickData!: {\n mouseUp: (arg0: Event) => void,\n mouseDown: (arg0: Event) => void,\n reset: () => void,\n }|undefined;\n private longClickInterval!: number|undefined;\n\n constructor(\n element: Element, callback: (arg0: Event) => void,\n isEditKeyFunc: (arg0: KeyboardEvent) => boolean = (event):\n boolean => Platform.KeyboardUtilities.isEnterOrSpaceKey(event)) {\n this.element = element;\n this.callback = callback;\n this.editKey = isEditKeyFunc;\n this.enable();\n }\n\n reset(): void {\n if (this.longClickInterval) {\n clearInterval(this.longClickInterval);\n delete this.longClickInterval;\n }\n }\n\n private enable(): void {\n if (this.longClickData) {\n return;\n }\n const boundKeyDown = keyDown.bind(this);\n const boundKeyUp = keyUp.bind(this);\n const boundMouseDown = mouseDown.bind(this);\n const boundMouseUp = mouseUp.bind(this);\n const boundReset = this.reset.bind(this);\n\n this.element.addEventListener('keydown', boundKeyDown, false);\n this.element.addEventListener('keyup', boundKeyUp, false);\n this.element.addEventListener('pointerdown', boundMouseDown, false);\n this.element.addEventListener('pointerout', boundReset, false);\n this.element.addEventListener('pointerup', boundMouseUp, false);\n this.element.addEventListener('click', boundReset, true);\n\n this.longClickData = {mouseUp: boundMouseUp, mouseDown: boundMouseDown, reset: boundReset};\n\n function keyDown(this: LongClickController, e: Event): void {\n if (this.editKey(e as KeyboardEvent)) {\n const callback = this.callback;\n this.longClickInterval = window.setTimeout(callback.bind(null, e), LongClickController.TIME_MS);\n }\n }\n\n function keyUp(this: LongClickController, e: Event): void {\n if (this.editKey(e as KeyboardEvent)) {\n this.reset();\n }\n }\n\n function mouseDown(this: LongClickController, e: Event): void {\n if ((e as MouseEvent).which !== 1) {\n return;\n }\n const callback = this.callback;\n this.longClickInterval = window.setTimeout(callback.bind(null, e), LongClickController.TIME_MS);\n }\n\n function mouseUp(this: LongClickController, e: Event): void {\n if ((e as MouseEvent).which !== 1) {\n return;\n }\n this.reset();\n }\n }\n\n dispose(): void {\n if (!this.longClickData) {\n return;\n }\n this.element.removeEventListener('pointerdown', this.longClickData.mouseDown, false);\n this.element.removeEventListener('pointerout', this.longClickData.reset, false);\n this.element.removeEventListener('pointerup', this.longClickData.mouseUp, false);\n this.element.addEventListener('click', this.longClickData.reset, true);\n delete this.longClickData;\n }\n\n static readonly TIME_MS = 200;\n}\n\nexport function initializeUIUtils(document: Document): void {\n document.body.classList.toggle('inactive', !document.hasFocus());\n if (document.defaultView) {\n document.defaultView.addEventListener('focus', windowFocused.bind(undefined, document), false);\n document.defaultView.addEventListener('blur', windowBlurred.bind(undefined, document), false);\n }\n document.addEventListener('focus', focusChanged.bind(undefined), true);\n\n const body = (document.body as Element);\n GlassPane.setContainer(body);\n}\n\nexport function beautifyFunctionName(name: string): string {\n return name || i18nString(UIStrings.anonymous);\n}\n\nexport const createTextChild = (element: Element|DocumentFragment, text: string): Text => {\n const textNode = element.ownerDocument.createTextNode(text);\n element.appendChild(textNode);\n return textNode;\n};\n\nexport const createTextChildren = (element: Element|DocumentFragment, ...childrenText: string[]): void => {\n for (const child of childrenText) {\n createTextChild(element, child);\n }\n};\n\nexport function createTextButton(text: string, clickHandler?: ((arg0: Event) => void), opts?: {\n className?: string,\n jslogContext?: string,\n variant?: Buttons.Button.Variant,\n title?: string,\n}): Buttons.Button.Button {\n const button = new Buttons.Button.Button();\n if (opts?.className) {\n button.className = opts.className;\n }\n button.textContent = text;\n button.variant = opts?.variant ? opts.variant : Buttons.Button.Variant.OUTLINED;\n if (clickHandler) {\n button.addEventListener('click', clickHandler);\n }\n if (opts?.jslogContext) {\n button.setAttribute('jslog', `${VisualLogging.action().track({click: true}).context(opts.jslogContext)}`);\n }\n if (opts?.title) {\n button.setAttribute('title', opts.title);\n }\n button.type = 'button';\n return button;\n}\n\nexport function createInput(className?: string, type?: string, jslogContext?: string): HTMLInputElement {\n const element = document.createElement('input');\n if (className) {\n element.className = className;\n }\n element.spellcheck = false;\n element.classList.add('harmony-input');\n if (type) {\n element.type = type;\n }\n if (jslogContext) {\n element.setAttribute(\n 'jslog', `${VisualLogging.textField().track({keydown: 'Enter', change: true}).context(jslogContext)}`);\n }\n return element;\n}\n\nexport function createSelect(name: string, options: string[]|Map[]|Set): HTMLSelectElement {\n const select = document.createElement('select');\n select.classList.add('chrome-select');\n ARIAUtils.setLabel(select, name);\n for (const option of options) {\n if (option instanceof Map) {\n for (const [key, value] of option) {\n const optGroup = (select.createChild('optgroup') as HTMLOptGroupElement);\n optGroup.label = key;\n for (const child of value) {\n if (typeof child === 'string') {\n optGroup.appendChild(createOption(child, child, Platform.StringUtilities.toKebabCase(child)));\n }\n }\n }\n } else if (typeof option === 'string') {\n select.add(createOption(option, option, Platform.StringUtilities.toKebabCase(option)));\n }\n }\n return select;\n}\n\nexport function createOption(title: string, value?: string, jslogContext?: string): HTMLOptionElement {\n const result = new Option(title, value || title);\n if (jslogContext) {\n result.setAttribute('jslog', `${VisualLogging.item(jslogContext).track({click: true})}`);\n }\n return result;\n}\n\nexport function createLabel(title: string, className?: string, associatedControl?: Element): Element {\n const element = document.createElement('label');\n if (className) {\n element.className = className;\n }\n element.textContent = title;\n if (associatedControl) {\n ARIAUtils.bindLabelToControl(element, associatedControl);\n }\n\n return element;\n}\n\nexport function createRadioLabel(\n name: string, title: string, checked?: boolean, jslogContext?: string): DevToolsRadioButton {\n const element = (document.createElement('span', {is: 'dt-radio'}) as DevToolsRadioButton);\n element.radioElement.name = name;\n element.radioElement.checked = Boolean(checked);\n createTextChild(element.labelElement, title);\n if (jslogContext) {\n element.radioElement.setAttribute('jslog', `${VisualLogging.toggle().track({change: true}).context(jslogContext)}`);\n }\n return element;\n}\n\nexport function createIconLabel(\n options: {title?: string, iconName: string, color?: string, width?: '14px'|'20px', height?: '14px'|'20px'}):\n DevToolsIconLabel {\n const element = (document.createElement('span', {is: 'dt-icon-label'}) as DevToolsIconLabel);\n if (options.title) {\n element.createChild('span').textContent = options.title;\n }\n element.data = {\n iconName: options.iconName,\n color: options.color ?? 'var(--icon-default)',\n width: options.width ?? '14px',\n height: options.height ?? '14px',\n };\n return element;\n}\n\nexport function createSlider(min: number, max: number, tabIndex: number): Element {\n const element = (document.createElement('span', {is: 'dt-slider'}) as DevToolsSlider);\n element.sliderElement.min = String(min);\n element.sliderElement.max = String(max);\n element.sliderElement.step = String(1);\n element.sliderElement.tabIndex = tabIndex;\n return element;\n}\n\nexport function setTitle(element: HTMLElement, title: string): void {\n ARIAUtils.setLabel(element, title);\n Tooltip.install(element, title);\n}\n\nexport class CheckboxLabel extends HTMLSpanElement {\n private readonly shadowRootInternal!: DocumentFragment;\n checkboxElement!: HTMLInputElement;\n textElement!: HTMLElement;\n\n constructor() {\n super();\n CheckboxLabel.lastId = CheckboxLabel.lastId + 1;\n const id = 'ui-checkbox-label' + CheckboxLabel.lastId;\n this.shadowRootInternal =\n createShadowRootWithCoreStyles(this, {cssFile: checkboxTextLabelStyles, delegatesFocus: undefined});\n this.checkboxElement = (this.shadowRootInternal.createChild('input') as HTMLInputElement);\n this.checkboxElement.type = 'checkbox';\n this.checkboxElement.setAttribute('id', id);\n this.textElement = this.shadowRootInternal.createChild('label', 'dt-checkbox-text') as HTMLElement;\n this.textElement.setAttribute('for', id);\n this.shadowRootInternal.createChild('slot');\n }\n\n static create(title?: string, checked?: boolean, subtitle?: string, jslogContext?: string, small?: boolean):\n CheckboxLabel {\n if (!CheckboxLabel.constructorInternal) {\n CheckboxLabel.constructorInternal = registerCustomElement('span', 'dt-checkbox', CheckboxLabel);\n }\n const element = (CheckboxLabel.constructorInternal() as CheckboxLabel);\n element.checkboxElement.checked = Boolean(checked);\n if (jslogContext) {\n element.checkboxElement.setAttribute(\n 'jslog', `${VisualLogging.toggle().track({change: true}).context(jslogContext)}`);\n }\n if (title !== undefined) {\n element.textElement.textContent = title;\n element.checkboxElement.title = title;\n if (subtitle !== undefined) {\n element.textElement.createChild('div', 'dt-checkbox-subtitle').textContent = subtitle;\n }\n }\n element.checkboxElement.classList.toggle('small', small);\n return element;\n }\n\n private static lastId = 0;\n static constructorInternal: (() => Element)|null = null;\n}\n\nexport class DevToolsIconLabel extends HTMLSpanElement {\n readonly #icon: IconButton.Icon.Icon;\n\n constructor() {\n super();\n const root = createShadowRootWithCoreStyles(this, {\n cssFile: undefined,\n delegatesFocus: undefined,\n });\n this.#icon = new IconButton.Icon.Icon();\n this.#icon.style.setProperty('margin-right', '4px');\n this.#icon.style.setProperty('vertical-align', 'baseline');\n root.appendChild(this.#icon);\n root.createChild('slot');\n }\n\n set data(data: IconButton.Icon.IconData) {\n this.#icon.data = data;\n // TODO(crbug.com/1427397): Clean this up. This was necessary so `DevToolsIconLabel` can use Lit icon\n // while being backwards-compatible with the legacy Icon while working for both small and large icons.\n if (data.height === '14px') {\n this.#icon.style.setProperty('margin-bottom', '-2px');\n } else if (data.height === '20px') {\n this.#icon.style.setProperty('margin-bottom', '2px');\n }\n }\n}\n\nlet labelId = 0;\n\nexport class DevToolsRadioButton extends HTMLSpanElement {\n radioElement: HTMLInputElement;\n labelElement: HTMLLabelElement;\n\n constructor() {\n super();\n this.radioElement = (this.createChild('input', 'dt-radio-button') as HTMLInputElement);\n this.labelElement = (this.createChild('label') as HTMLLabelElement);\n\n const id = 'dt-radio-button-id' + (++labelId);\n this.radioElement.id = id;\n this.radioElement.type = 'radio';\n this.labelElement.htmlFor = id;\n const root = createShadowRootWithCoreStyles(this, {cssFile: radioButtonStyles, delegatesFocus: undefined});\n root.createChild('slot');\n this.addEventListener('click', this.radioClickHandler.bind(this), false);\n }\n\n radioClickHandler(): void {\n if (this.radioElement.checked || this.radioElement.disabled) {\n return;\n }\n this.radioElement.checked = true;\n this.radioElement.dispatchEvent(new Event('change'));\n }\n}\n\nregisterCustomElement('span', 'dt-radio', DevToolsRadioButton);\nregisterCustomElement('span', 'dt-icon-label', DevToolsIconLabel);\n\nexport class DevToolsSlider extends HTMLSpanElement {\n sliderElement: HTMLInputElement;\n\n constructor() {\n super();\n const root = createShadowRootWithCoreStyles(this, {cssFile: sliderStyles, delegatesFocus: undefined});\n this.sliderElement = document.createElement('input');\n this.sliderElement.classList.add('dt-range-input');\n this.sliderElement.type = 'range';\n root.appendChild(this.sliderElement);\n }\n\n set value(amount: number) {\n this.sliderElement.value = String(amount);\n }\n\n get value(): number {\n return Number(this.sliderElement.value);\n }\n}\n\nregisterCustomElement('span', 'dt-slider', DevToolsSlider);\n\nexport class DevToolsSmallBubble extends HTMLSpanElement {\n private textElement: Element;\n\n constructor() {\n super();\n const root = createShadowRootWithCoreStyles(this, {cssFile: smallBubbleStyles, delegatesFocus: undefined});\n this.textElement = root.createChild('div');\n this.textElement.className = 'info';\n this.textElement.createChild('slot');\n }\n\n set type(type: string) {\n this.textElement.className = type;\n }\n}\n\nregisterCustomElement('span', 'dt-small-bubble', DevToolsSmallBubble);\n\nexport class DevToolsCloseButton extends HTMLDivElement {\n private button: Buttons.Button.Button;\n\n constructor() {\n super();\n const root = createShadowRootWithCoreStyles(this, {delegatesFocus: undefined});\n this.button = new Buttons.Button.Button();\n this.button.data = {variant: Buttons.Button.Variant.ICON, iconName: 'cross'};\n this.button.classList.add('close-button');\n this.button.setAttribute('jslog', `${VisualLogging.close().track({click: true})}`);\n Tooltip.install(this.button, i18nString(UIStrings.close));\n ARIAUtils.setLabel(this.button, i18nString(UIStrings.close));\n root.appendChild(this.button);\n }\n\n setAccessibleName(name: string): void {\n ARIAUtils.setLabel(this.button, name);\n }\n\n setTabbable(tabbable: boolean): void {\n if (tabbable) {\n this.button.tabIndex = 0;\n } else {\n this.button.tabIndex = -1;\n }\n }\n}\n\nregisterCustomElement('div', 'dt-close-button', DevToolsCloseButton);\n\nexport function bindInput(\n input: HTMLInputElement, apply: (arg0: string) => void, validate: (arg0: string) => {\n valid: boolean,\n errorMessage: (string | undefined),\n },\n numeric: boolean, modifierMultiplier?: number): (arg0: string) => void {\n input.addEventListener('change', onChange, false);\n input.addEventListener('input', onInput, false);\n input.addEventListener('keydown', onKeyDown, false);\n input.addEventListener('focus', input.select.bind(input), false);\n\n function onInput(): void {\n input.classList.toggle('error-input', !validate(input.value));\n }\n\n function onChange(): void {\n const {valid} = validate(input.value);\n input.classList.toggle('error-input', !valid);\n if (valid) {\n apply(input.value);\n }\n }\n\n function onKeyDown(event: KeyboardEvent): void {\n if (event.key === 'Enter') {\n const {valid} = validate(input.value);\n if (valid) {\n apply(input.value);\n }\n event.preventDefault();\n return;\n }\n\n if (!numeric) {\n return;\n }\n\n const value = modifiedFloatNumber(parseFloat(input.value), event, modifierMultiplier);\n if (value === null) {\n return;\n }\n const stringValue = String(value);\n const {valid} = validate(stringValue);\n if (valid) {\n setValue(stringValue);\n }\n event.preventDefault();\n }\n\n function setValue(value: string): void {\n if (value === input.value) {\n return;\n }\n const {valid} = validate(value);\n input.classList.toggle('error-input', !valid);\n input.value = value;\n }\n\n return setValue;\n}\n\nexport function trimText(\n context: CanvasRenderingContext2D, text: string, maxWidth: number,\n trimFunction: (arg0: string, arg1: number) => string): string {\n const maxLength = 200;\n if (maxWidth <= 10) {\n return '';\n }\n if (text.length > maxLength) {\n text = trimFunction(text, maxLength);\n }\n const textWidth = measureTextWidth(context, text);\n if (textWidth <= maxWidth) {\n return text;\n }\n\n let l = 0;\n let r: number = text.length;\n let lv = 0;\n let rv: number = textWidth;\n while (l < r && lv !== rv && lv !== maxWidth) {\n const m = Math.ceil(l + (r - l) * (maxWidth - lv) / (rv - lv));\n const mv = measureTextWidth(context, trimFunction(text, m));\n if (mv <= maxWidth) {\n l = m;\n lv = mv;\n } else {\n r = m - 1;\n rv = mv;\n }\n }\n text = trimFunction(text, l);\n return text !== '…' ? text : '';\n}\n\nexport function trimTextMiddle(context: CanvasRenderingContext2D, text: string, maxWidth: number): string {\n return trimText(context, text, maxWidth, (text, width) => Platform.StringUtilities.trimMiddle(text, width));\n}\n\nexport function trimTextEnd(context: CanvasRenderingContext2D, text: string, maxWidth: number): string {\n return trimText(context, text, maxWidth, (text, width) => Platform.StringUtilities.trimEndWithMaxLength(text, width));\n}\n\nexport function measureTextWidth(context: CanvasRenderingContext2D, text: string): number {\n const maxCacheableLength = 200;\n if (text.length > maxCacheableLength) {\n return context.measureText(text).width;\n }\n\n if (!measureTextWidthCache) {\n measureTextWidthCache = new Map();\n }\n const font = context.font;\n let textWidths = measureTextWidthCache.get(font);\n if (!textWidths) {\n textWidths = new Map();\n measureTextWidthCache.set(font, textWidths);\n }\n let width = textWidths.get(text);\n if (!width) {\n width = context.measureText(text).width;\n textWidths.set(text, width);\n }\n return width;\n}\n\nlet measureTextWidthCache: Map>|null = null;\n\n/**\n * Adds a 'utm_source=devtools' as query parameter to the url.\n */\nexport function addReferrerToURL(url: Platform.DevToolsPath.UrlString): Platform.DevToolsPath.UrlString {\n if (/(\\?|&)utm_source=devtools/.test(url)) {\n return url;\n }\n if (url.indexOf('?') === -1) {\n // If the URL does not contain a query, add the referrer query after path\n // and before (potential) anchor.\n return url.replace(/^([^#]*)(#.*)?$/g, '$1?utm_source=devtools$2') as Platform.DevToolsPath.UrlString;\n }\n // If the URL already contains a query, add the referrer query after the last query\n // and before (potential) anchor.\n return url.replace(/^([^#]*)(#.*)?$/g, '$1&utm_source=devtools$2') as Platform.DevToolsPath.UrlString;\n}\n\n/**\n * We want to add a referrer query param to every request to\n * 'web.dev' or 'developers.google.com'.\n */\nexport function addReferrerToURLIfNecessary(url: Platform.DevToolsPath.UrlString): Platform.DevToolsPath.UrlString {\n if (/(\\/\\/developers.google.com\\/|\\/\\/web.dev\\/|\\/\\/developer.chrome.com\\/)/.test(url)) {\n return addReferrerToURL(url);\n }\n return url;\n}\n\nexport function loadImage(url: string): Promise {\n return new Promise(fulfill => {\n const image = new Image();\n image.addEventListener('load', () => fulfill(image));\n image.addEventListener('error', () => fulfill(null));\n image.src = url;\n });\n}\n\nexport function createFileSelectorElement(callback: (arg0: File) => void): HTMLInputElement {\n const fileSelectorElement = document.createElement('input');\n fileSelectorElement.type = 'file';\n fileSelectorElement.style.display = 'none';\n fileSelectorElement.tabIndex = -1;\n fileSelectorElement.onchange = () => {\n if (fileSelectorElement.files) {\n callback(fileSelectorElement.files[0]);\n }\n };\n\n return fileSelectorElement;\n}\n\nexport const MaxLengthForDisplayedURLs = 150;\n\nexport class MessageDialog {\n static async show(message: string, where?: Element|Document, jslogContext?: string): Promise {\n const dialog = new Dialog(jslogContext);\n dialog.setSizeBehavior(SizeBehavior.MeasureContent);\n dialog.setDimmed(true);\n const shadowRoot = createShadowRootWithCoreStyles(\n dialog.contentElement, {cssFile: confirmDialogStyles, delegatesFocus: undefined});\n const content = shadowRoot.createChild('div', 'widget');\n await new Promise(resolve => {\n const okButton = createTextButton(\n i18nString(UIStrings.ok), resolve, {jslogContext: 'confirm', variant: Buttons.Button.Variant.PRIMARY});\n content.createChild('div', 'message').createChild('span').textContent = message;\n content.createChild('div', 'button').appendChild(okButton);\n dialog.setOutsideClickCallback(event => {\n event.consume();\n resolve(undefined);\n });\n dialog.show(where);\n okButton.focus();\n });\n dialog.hide();\n }\n}\n\nexport class ConfirmDialog {\n static async show(message: string, where?: Element|Document, options?: ConfirmDialogOptions): Promise {\n const dialog = new Dialog(options?.jslogContext);\n dialog.setSizeBehavior(SizeBehavior.MeasureContent);\n dialog.setDimmed(true);\n ARIAUtils.setLabel(dialog.contentElement, message);\n const shadowRoot = createShadowRootWithCoreStyles(\n dialog.contentElement, {cssFile: confirmDialogStyles, delegatesFocus: undefined});\n const content = shadowRoot.createChild('div', 'widget');\n content.createChild('div', 'message').createChild('span').textContent = message;\n const buttonsBar = content.createChild('div', 'button');\n const result = await new Promise(resolve => {\n const okButton = createTextButton(\n /* text= */ options?.okButtonLabel || i18nString(UIStrings.ok), /* clickHandler= */ () => resolve(true),\n {jslogContext: 'confirm', variant: Buttons.Button.Variant.PRIMARY});\n buttonsBar.appendChild(okButton);\n buttonsBar.appendChild(createTextButton(\n options?.cancelButtonLabel || i18nString(UIStrings.cancel), () => resolve(false), {jslogContext: 'cancel'}));\n dialog.setOutsideClickCallback(event => {\n event.consume();\n resolve(false);\n });\n dialog.show(where);\n okButton.focus();\n });\n dialog.hide();\n return result;\n }\n}\n\nexport function createInlineButton(toolbarButton: ToolbarButton): Element {\n const element = document.createElement('span');\n const shadowRoot = createShadowRootWithCoreStyles(element, {cssFile: inlineButtonStyles, delegatesFocus: undefined});\n element.classList.add('inline-button');\n const toolbar = new Toolbar('');\n toolbar.appendToolbarItem(toolbarButton);\n shadowRoot.appendChild(toolbar.element);\n return element;\n}\n\nexport abstract class Renderer {\n abstract render(object: Object, options?: Options): Promise<{\n node: Node,\n tree: TreeOutline|null,\n }|null>;\n\n static async render(object: Object, options?: Options): Promise<{\n node: Node,\n tree: TreeOutline|null,\n }|null> {\n if (!object) {\n throw new Error('Can\\'t render ' + object);\n }\n const extension = getApplicableRegisteredRenderers(object)[0];\n if (!extension) {\n return null;\n }\n const renderer = await extension.loadRenderer();\n return renderer.render(object, options);\n }\n}\n\nexport function formatTimestamp(timestamp: number, full: boolean): string {\n const date = new Date(timestamp);\n const yymmdd = date.getFullYear() + '-' + leadZero(date.getMonth() + 1, 2) + '-' + leadZero(date.getDate(), 2);\n const hhmmssfff = leadZero(date.getHours(), 2) + ':' + leadZero(date.getMinutes(), 2) + ':' +\n leadZero(date.getSeconds(), 2) + '.' + leadZero(date.getMilliseconds(), 3);\n return full ? (yymmdd + ' ' + hhmmssfff) : hhmmssfff;\n\n function leadZero(value: number, length: number): string {\n const valueString = String(value);\n return valueString.padStart(length, '0');\n }\n}\n\nexport interface Options {\n title?: string|Element;\n editable?: boolean;\n}\n\nexport interface HighlightChange {\n node: Element|Text;\n type: string;\n oldText?: string;\n newText?: string;\n nextSibling?: Node;\n parent?: Node;\n}\n\nexport const isScrolledToBottom = (element: Element): boolean => {\n // This code works only for 0-width border.\n // The scrollTop, clientHeight and scrollHeight are computed in double values internally.\n // However, they are exposed to javascript differently, each being either rounded (via\n // round, ceil or floor functions) or left intouch.\n // This adds up a total error up to 2.\n return Math.abs(element.scrollTop + element.clientHeight - element.scrollHeight) <= 2;\n};\n\nexport function createSVGChild(element: Element, childType: string, className?: string): Element {\n const child = element.ownerDocument.createElementNS('http://www.w3.org/2000/svg', childType);\n if (className) {\n child.setAttribute('class', className);\n }\n element.appendChild(child);\n return child;\n}\n\nexport const enclosingNodeOrSelfWithNodeNameInArray = (initialNode: Node, nameArray: string[]): Node|null => {\n let node: (Node|null)|Node = initialNode;\n for (; node && node !== initialNode.ownerDocument; node = node.parentNodeOrShadowHost()) {\n for (let i = 0; i < nameArray.length; ++i) {\n if (node.nodeName.toLowerCase() === nameArray[i].toLowerCase()) {\n return node;\n }\n }\n }\n return null;\n};\n\nexport const enclosingNodeOrSelfWithNodeName = function(node: Node, nodeName: string): Node|null {\n return enclosingNodeOrSelfWithNodeNameInArray(node, [nodeName]);\n};\n\nexport const deepElementFromPoint = (document: Document|ShadowRoot|null|undefined, x: number, y: number): Node|null => {\n let container: (ShadowRoot|null)|(Document | ShadowRoot | null | undefined) = document;\n let node: Element|null = null;\n while (container) {\n const innerNode = container.elementFromPoint(x, y);\n if (!innerNode || node === innerNode) {\n break;\n }\n node = innerNode;\n container = node.shadowRoot;\n }\n return node;\n};\n\nexport const deepElementFromEvent = (ev: Event): Node|null => {\n const event = (ev as MouseEvent);\n // Some synthetic events have zero coordinates which lead to a wrong element.\n // Better return nothing in this case.\n if (!event.which && !event.pageX && !event.pageY && !event.clientX && !event.clientY && !event.movementX &&\n !event.movementY) {\n return null;\n }\n const root = event.target && (event.target as Element).getComponentRoot();\n return root ? deepElementFromPoint((root as Document | ShadowRoot), event.pageX, event.pageY) : null;\n};\n\nconst registeredRenderers: RendererRegistration[] = [];\n\nexport function registerRenderer(registration: RendererRegistration): void {\n registeredRenderers.push(registration);\n}\nexport function getApplicableRegisteredRenderers(object: Object): RendererRegistration[] {\n return registeredRenderers.filter(isRendererApplicableToContextTypes);\n\n function isRendererApplicableToContextTypes(rendererRegistration: RendererRegistration): boolean {\n if (!rendererRegistration.contextTypes) {\n return true;\n }\n for (const contextType of rendererRegistration.contextTypes()) {\n if (object instanceof contextType) {\n return true;\n }\n }\n return false;\n }\n}\nexport interface RendererRegistration {\n loadRenderer: () => Promise;\n contextTypes: () => Array;\n}\n\nexport interface ConfirmDialogOptions {\n okButtonLabel?: string;\n cancelButtonLabel?: string;\n jslogContext?: string;\n}\n\nfunction updateWidgetfocusWidgetForNode(node: Node|null): void {\n while (node) {\n if (Widget.get(node)) {\n break;\n }\n\n node = node.parentNodeOrShadowHost();\n }\n if (!node) {\n return;\n }\n\n let widget = Widget.get(node);\n while (widget && widget.parentWidget()) {\n const parentWidget = widget.parentWidget();\n if (!parentWidget) {\n break;\n }\n\n parentWidget.defaultFocusedChild = widget;\n widget = parentWidget;\n }\n}\n\nfunction updateXWidgetfocusWidgetForNode(node: Node|null): void {\n node = node && node.parentNodeOrShadowHost();\n const XWidgetCtor = customElements.get('x-widget');\n let widget = null;\n while (node) {\n if (XWidgetCtor && node instanceof XWidgetCtor) {\n if (widget) {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (node as any).defaultFocusedElement = widget;\n }\n widget = node;\n }\n node = node.parentNodeOrShadowHost();\n }\n}\n\nfunction focusChanged(event: Event): void {\n const target = event.target as HTMLElement;\n const document = target ? target.ownerDocument : null;\n const element = document ? Platform.DOMUtilities.deepActiveElement(document) : null;\n updateWidgetfocusWidgetForNode(element);\n updateXWidgetfocusWidgetForNode(element);\n}\n\nexport function injectCoreStyles(root: Element|ShadowRoot): void {\n ThemeSupport.ThemeSupport.instance().appendStyle(root, applicationColorTokensStyles);\n ThemeSupport.ThemeSupport.instance().appendStyle(root, designTokensStyles);\n ThemeSupport.ThemeSupport.instance().appendStyle(root, inspectorCommonStyles);\n ThemeSupport.ThemeSupport.instance().appendStyle(root, textButtonStyles);\n ThemeSupport.ThemeSupport.instance().appendStyle(root, themeColorsStyles);\n ThemeSupport.ThemeSupport.instance().appendStyle(root, tokens);\n\n ThemeSupport.ThemeSupport.instance().injectHighlightStyleSheets(root);\n ThemeSupport.ThemeSupport.instance().injectCustomStyleSheets(root);\n}\n\nexport function createShadowRootWithCoreStyles(\n element: Element, options: {cssFile?: CSSStyleSheet[]|{cssContent: string}, delegatesFocus?: boolean} = {\n delegatesFocus: undefined,\n cssFile: undefined,\n }): ShadowRoot {\n const {\n cssFile,\n delegatesFocus,\n } = options;\n\n const shadowRoot = element.attachShadow({mode: 'open', delegatesFocus});\n injectCoreStyles(shadowRoot);\n if (cssFile) {\n if ('cssContent' in cssFile) {\n ThemeSupport.ThemeSupport.instance().appendStyle(shadowRoot, cssFile);\n } else {\n shadowRoot.adoptedStyleSheets = cssFile;\n }\n }\n shadowRoot.addEventListener('focus', focusChanged, true);\n return shadowRoot;\n}\n\nlet cachedMeasuredScrollbarWidth: number|undefined;\n\nexport function resetMeasuredScrollbarWidthForTest(): void {\n cachedMeasuredScrollbarWidth = undefined;\n}\n\nexport function measuredScrollbarWidth(document?: Document|null): number {\n if (typeof cachedMeasuredScrollbarWidth === 'number') {\n return cachedMeasuredScrollbarWidth;\n }\n if (!document) {\n return 16;\n }\n\n const scrollDiv = document.createElement('div');\n const innerDiv = document.createElement('div');\n scrollDiv.setAttribute('style', 'display: block; width: 100px; height: 100px; overflow: scroll;');\n innerDiv.setAttribute('style', 'height: 200px');\n scrollDiv.appendChild(innerDiv);\n document.body.appendChild(scrollDiv);\n cachedMeasuredScrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return cachedMeasuredScrollbarWidth;\n}\n\nexport function registerCustomElement(\n localName: string, typeExtension: string, definition: new () => HTMLElement): () => Element {\n self.customElements.define(typeExtension, class extends definition {\n constructor() {\n // The JSDoc above does not allow the super call to have no params, but\n // it seems to be the nearest to something both Closure and TS understand.\n // @ts-ignore crbug.com/1011811: Fix after Closure has been removed.\n super();\n // TODO(einbinder) convert to classes and custom element tags\n this.setAttribute('is', typeExtension);\n }\n }, {extends: localName});\n return (): Element => document.createElement(localName, {is: typeExtension});\n}\n"]} \ No newline at end of file diff --git a/public/ui/legacy/ViewManager.js b/public/ui/legacy/ViewManager.js index 9cc781a0c..b1fb0cfc8 100644 --- a/public/ui/legacy/ViewManager.js +++ b/public/ui/legacy/ViewManager.js @@ -114,7 +114,7 @@ export class ViewManager { // Views may define their initial ordering within a location. When the user has not reordered, we use the // default ordering as defined by the views themselves. const viewsByLocation = new Map(); - for (const view of getRegisteredViewExtensions()) { + for (const view of getRegisteredViewExtensions(Common.Settings.Settings.instance().getHostConfig())) { const location = view.location() || 'none'; const views = viewsByLocation.get(location) || []; views.push(view); diff --git a/public/ui/legacy/ViewManager.js.map b/public/ui/legacy/ViewManager.js.map index 7a9a6434a..cbad64b6c 100644 --- a/public/ui/legacy/ViewManager.js.map +++ b/public/ui/legacy/ViewManager.js.map @@ -1 +1 @@ -{"version":3,"file":"ViewManager.js","sourceRoot":"","sources":["../../../../../../front_end/ui/legacy/ViewManager.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,QAAQ,MAAM,iCAAiC,CAAC;AAE5D,OAAO,KAAK,UAAU,MAAM,0CAA0C,CAAC;AACvE,OAAO,KAAK,aAAa,MAAM,qCAAqC,CAAC;AAErE,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAiB,MAAM,IAAI,gBAAgB,EAAE,UAAU,EAAC,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAqB,OAAO,EAAoB,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAC9F,OAAO,EAAC,eAAe,EAAC,MAAM,cAAc,CAAC;AAE7C,OAAO,oBAAoB,MAAM,gCAAgC,CAAC;AAClE,OAAO,EACL,gCAAgC,EAChC,8BAA8B,EAC9B,2BAA2B,EAC3B,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,GAKtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAC,IAAI,EAAc,MAAM,aAAa,CAAC;AAE9C,MAAM,SAAS,GAAG;IAChB;;;OAGG;IACH,MAAM,EAAE,aAAa;CACtB,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,I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AC/D,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,SAAS,CAAC,MAAM,EAAE,CAAC;QAC3B,CAAC;IACH,CAAC;IAEQ,UAAU,CAAC,IAAU;QAC5B,MAAM,SAAS,GAAG,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QAC/D,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,OAAO;QACT,CAAC;QAED,SAAS,CAAC,MAAM,EAAE,CAAC;QACnB,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QAChD,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC7B,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAC3C,CAAC;IAED,qBAAqB,CAAC,YAAoB;QACxC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,YAAY,CAAC,EAAE,CAAC;YAC/D,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACxB,CAAC;IACH,CAAC;CACF;AAED,OAAO,EAGL,2BAA2B,EAC3B,wBAAwB,EACxB,qBAAqB,EAErB,8BAA8B,EAC9B,wBAAwB,EAExB,gCAAgC,EAChC,qBAAqB,GACtB,CAAC","sourcesContent":["// Copyright 2019 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 Platform from '../../core/platform/platform.js';\nimport type * as Root from '../../core/root/root.js';\nimport * as IconButton from '../components/icon_button/icon_button.js';\nimport * as VisualLogging from '../visual_logging/visual_logging.js';\n\nimport * as ARIAUtils from './ARIAUtils.js';\nimport {type ContextMenu} from './ContextMenu.js';\nimport {type EventData, Events as TabbedPaneEvents, TabbedPane} from './TabbedPane.js';\nimport {type ItemsProvider, Toolbar, type ToolbarItem, ToolbarMenuButton} from './Toolbar.js';\nimport {createTextChild} from './UIUtils.js';\nimport {type TabbedViewLocation, type View, type ViewLocation} from './View.js';\nimport viewContainersStyles from './viewContainers.css.legacy.js';\nimport {\n getLocalizedViewLocationCategory,\n getRegisteredLocationResolvers,\n getRegisteredViewExtensions,\n maybeRemoveViewExtension,\n registerLocationResolver,\n registerViewExtension,\n resetViewRegistration,\n ViewLocationCategory,\n ViewLocationValues,\n ViewPersistence,\n type ViewRegistration,\n} from './ViewRegistration.js';\nimport {VBox, type Widget} from './Widget.js';\n\nconst UIStrings = {\n /**\n *@description Aria label for the tab panel view container\n *@example {Sensors} PH1\n */\n sPanel: '{PH1} panel',\n};\nconst str_ = i18n.i18n.registerUIStrings('ui/legacy/ViewManager.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport const defaultOptionsForTabs = {\n security: true,\n};\n\nexport class PreRegisteredView implements View {\n private readonly viewRegistration: ViewRegistration;\n private widgetPromise: Promise|null;\n\n constructor(viewRegistration: ViewRegistration) {\n this.viewRegistration = viewRegistration;\n this.widgetPromise = null;\n }\n\n title(): Common.UIString.LocalizedString {\n return this.viewRegistration.title();\n }\n\n commandPrompt(): Common.UIString.LocalizedString {\n return this.viewRegistration.commandPrompt();\n }\n isCloseable(): boolean {\n return this.viewRegistration.persistence === ViewPersistence.CLOSEABLE;\n }\n\n isPreviewFeature(): boolean {\n return Boolean(this.viewRegistration.isPreviewFeature);\n }\n\n iconName(): string|undefined {\n return this.viewRegistration.iconName;\n }\n\n isTransient(): boolean {\n return this.viewRegistration.persistence === ViewPersistence.TRANSIENT;\n }\n\n viewId(): string {\n return this.viewRegistration.id;\n }\n\n location(): ViewLocationValues|undefined {\n return this.viewRegistration.location;\n }\n\n order(): number|undefined {\n return this.viewRegistration.order;\n }\n\n settings(): string[]|undefined {\n return this.viewRegistration.settings;\n }\n\n tags(): string|undefined {\n if (this.viewRegistration.tags) {\n // Get localized keys and separate by null character to prevent fuzzy matching from matching across them.\n return this.viewRegistration.tags.map(tag => tag()).join('\\0');\n }\n return undefined;\n }\n\n persistence(): ViewPersistence|undefined {\n return this.viewRegistration.persistence;\n }\n\n async toolbarItems(): Promise {\n if (!this.viewRegistration.hasToolbar) {\n return [];\n }\n const provider = await this.widget() as unknown as ItemsProvider;\n return provider.toolbarItems();\n }\n\n widget(): Promise {\n if (this.widgetPromise === null) {\n this.widgetPromise = this.viewRegistration.loadView();\n }\n return this.widgetPromise;\n }\n\n async disposeView(): Promise {\n if (this.widgetPromise === null) {\n return;\n }\n\n const widget = await this.widgetPromise;\n await widget.ownerViewDisposed();\n }\n\n experiment(): string|undefined {\n return this.viewRegistration.experiment;\n }\n\n condition(): Root.Runtime.Condition|undefined {\n return this.viewRegistration.condition;\n }\n}\n\nlet viewManagerInstance: ViewManager|undefined;\n\nexport class ViewManager {\n readonly views: Map;\n private readonly locationNameByViewId: Map;\n private readonly locationOverrideSetting: Common.Settings.Setting<{[key: string]: string}>;\n\n private constructor() {\n this.views = new Map();\n this.locationNameByViewId = new Map();\n\n // Read override setting for location\n this.locationOverrideSetting = Common.Settings.Settings.instance().createSetting('views-location-override', {});\n const preferredExtensionLocations = this.locationOverrideSetting.get();\n\n // Views may define their initial ordering within a location. When the user has not reordered, we use the\n // default ordering as defined by the views themselves.\n\n const viewsByLocation = new Map();\n for (const view of getRegisteredViewExtensions()) {\n const location = view.location() || 'none';\n const views = viewsByLocation.get(location) || [];\n views.push(view);\n viewsByLocation.set(location, views);\n }\n\n let sortedViewExtensions: PreRegisteredView[] = [];\n for (const views of viewsByLocation.values()) {\n views.sort((firstView, secondView) => {\n const firstViewOrder = firstView.order();\n const secondViewOrder = secondView.order();\n if (firstViewOrder !== undefined && secondViewOrder !== undefined) {\n return firstViewOrder - secondViewOrder;\n }\n return 0;\n });\n sortedViewExtensions = sortedViewExtensions.concat(views);\n }\n\n for (const view of sortedViewExtensions) {\n const viewId = view.viewId();\n const location = view.location();\n if (this.views.has(viewId)) {\n throw new Error(`Duplicate view id '${viewId}'`);\n }\n if (!Platform.StringUtilities.isExtendedKebabCase(viewId)) {\n throw new Error(`Invalid view ID '${viewId}'`);\n }\n this.views.set(viewId, view);\n // Use the preferred user location if available\n const locationName = preferredExtensionLocations[viewId] || location;\n this.locationNameByViewId.set(viewId, locationName as string);\n }\n }\n\n static instance(opts: {\n forceNew: boolean|null,\n } = {forceNew: null}): ViewManager {\n const {forceNew} = opts;\n if (!viewManagerInstance || forceNew) {\n viewManagerInstance = new ViewManager();\n }\n\n return viewManagerInstance;\n }\n\n static removeInstance(): void {\n viewManagerInstance = undefined;\n }\n\n static createToolbar(toolbarItems: ToolbarItem[]): Element|null {\n if (!toolbarItems.length) {\n return null;\n }\n const toolbar = new Toolbar('');\n for (const item of toolbarItems) {\n toolbar.appendToolbarItem(item);\n }\n return toolbar.element;\n }\n\n locationNameForViewId(viewId: string): string {\n const locationName = this.locationNameByViewId.get(viewId);\n if (!locationName) {\n throw new Error(`No location name for view with id ${viewId}`);\n }\n return locationName;\n }\n\n /**\n * Moves a view to a new location\n */\n moveView(viewId: string, locationName: string, options?: {\n shouldSelectTab: (boolean),\n overrideSaving: (boolean),\n }): void {\n const defaultOptions = {shouldSelectTab: true, overrideSaving: false};\n const {shouldSelectTab, overrideSaving} = options || defaultOptions;\n if (!viewId || !locationName) {\n return;\n }\n\n const view = this.view(viewId);\n if (!view) {\n return;\n }\n\n if (!overrideSaving) {\n // Update the inner map of locations\n this.locationNameByViewId.set(viewId, locationName);\n\n // Update the settings of location overwrites\n const locations = this.locationOverrideSetting.get();\n locations[viewId] = locationName;\n this.locationOverrideSetting.set(locations);\n }\n\n // Find new location and show view there\n void this.resolveLocation(locationName).then(location => {\n if (!location) {\n throw new Error('Move view: Could not resolve location for view: ' + viewId);\n }\n location.reveal();\n return location.showView(view, undefined, /* userGesture*/ true, /* omitFocus*/ false, shouldSelectTab);\n });\n }\n\n revealView(view: View): Promise {\n const location = locationForView.get(view);\n if (!location) {\n return Promise.resolve();\n }\n location.reveal();\n return location.showView(view);\n }\n\n /**\n * Show view in location\n */\n showViewInLocation(viewId: string, locationName: string, shouldSelectTab: boolean|undefined = true): void {\n this.moveView(viewId, locationName, {\n shouldSelectTab,\n overrideSaving: true,\n });\n }\n\n view(viewId: string): View {\n const view = this.views.get(viewId);\n if (!view) {\n throw new Error(`No view with id ${viewId} found!`);\n }\n return view;\n }\n\n materializedWidget(viewId: string): Widget|null {\n const view = this.view(viewId);\n if (!view) {\n return null;\n }\n return widgetForView.get(view) || null;\n }\n\n async showView(viewId: string, userGesture?: boolean, omitFocus?: boolean): Promise {\n const view = this.views.get(viewId);\n if (!view) {\n console.error('Could not find view for id: \\'' + viewId + '\\' ' + new Error().stack);\n return;\n }\n\n const location = locationForView.get(view) ?? await this.resolveLocation(this.locationNameByViewId.get(viewId));\n if (!location) {\n throw new Error('Could not resolve location for view: ' + viewId);\n }\n location.reveal();\n await location.showView(view, undefined, userGesture, omitFocus);\n }\n\n async resolveLocation(location?: string): Promise {\n if (!location) {\n return null;\n }\n const registeredResolvers = getRegisteredLocationResolvers().filter(resolver => resolver.name === location);\n\n if (registeredResolvers.length > 1) {\n throw new Error('Duplicate resolver for location: ' + location);\n }\n if (registeredResolvers.length) {\n const resolver = await registeredResolvers[0].loadResolver();\n return resolver.resolveLocation(location) as Location | null;\n }\n throw new Error('Unresolved location: ' + location);\n }\n\n createTabbedLocation(\n revealCallback?: (() => void), location?: string, restoreSelection?: boolean, allowReorder?: boolean,\n defaultTab?: string|null): TabbedViewLocation {\n return new TabbedLocation(this, revealCallback, location, restoreSelection, allowReorder, defaultTab);\n }\n\n createStackLocation(revealCallback?: (() => void), location?: string, jslogContext?: string): ViewLocation {\n return new StackLocation(this, revealCallback, location, jslogContext);\n }\n\n hasViewsForLocation(location: string): boolean {\n return Boolean(this.viewsForLocation(location).length);\n }\n\n viewsForLocation(location: string): View[] {\n const result = [];\n for (const [id, view] of this.views.entries()) {\n if (this.locationNameByViewId.get(id) === location) {\n result.push(view);\n }\n }\n return result;\n }\n}\n\nconst widgetForView = new WeakMap();\n\nexport class ContainerWidget extends VBox {\n private readonly view: View;\n private materializePromise?: Promise;\n\n constructor(view: View) {\n super();\n this.element.classList.add('flex-auto', 'view-container', 'overflow-auto');\n this.view = view;\n this.element.tabIndex = -1;\n ARIAUtils.markAsTabpanel(this.element);\n ARIAUtils.setLabel(this.element, i18nString(UIStrings.sPanel, {PH1: view.title()}));\n this.setDefaultFocusedElement(this.element);\n }\n\n materialize(): Promise {\n if (this.materializePromise) {\n return this.materializePromise;\n }\n const promises = [];\n // TODO(crbug.com/1006759): Transform to async-await\n promises.push(this.view.toolbarItems().then(toolbarItems => {\n const toolbarElement = ViewManager.createToolbar(toolbarItems);\n if (toolbarElement) {\n this.element.insertBefore(toolbarElement, this.element.firstChild);\n }\n }));\n promises.push(this.view.widget().then(widget => {\n // Move focus from |this| to loaded |widget| if any.\n const shouldFocus = this.element.hasFocus();\n this.setDefaultFocusedElement(null);\n widgetForView.set(this.view, widget);\n widget.show(this.element);\n if (shouldFocus) {\n widget.focus();\n }\n }));\n this.materializePromise = Promise.all(promises).then(() => {});\n return this.materializePromise;\n }\n\n override wasShown(): void {\n void this.materialize().then(() => {\n const widget = widgetForView.get(this.view);\n if (widget) {\n widget.show(this.element);\n this.wasShownForTest();\n }\n });\n }\n\n private wasShownForTest(): void {\n // This method is sniffed in tests.\n }\n}\n\nclass ExpandableContainerWidget extends VBox {\n private titleElement: HTMLDivElement;\n private readonly titleExpandIcon: IconButton.Icon.Icon;\n private readonly view: View;\n private widget?: Widget;\n private materializePromise?: Promise;\n\n constructor(view: View) {\n super(true);\n this.element.classList.add('flex-none');\n this.registerRequiredCSS(viewContainersStyles);\n\n this.titleElement = document.createElement('div');\n this.titleElement.classList.add('expandable-view-title');\n this.titleElement.setAttribute('jslog', `${VisualLogging.sectionHeader().context(view.viewId()).track({\n click: true,\n keydown: 'Enter|Space|ArrowLeft|ArrowRight',\n })}`);\n ARIAUtils.markAsTreeitem(this.titleElement);\n this.titleExpandIcon = IconButton.Icon.create('triangle-right', 'title-expand-icon');\n this.titleElement.appendChild(this.titleExpandIcon);\n const titleText = view.title();\n createTextChild(this.titleElement, titleText);\n ARIAUtils.setLabel(this.titleElement, titleText);\n ARIAUtils.setExpanded(this.titleElement, false);\n this.titleElement.tabIndex = 0;\n self.onInvokeElement(this.titleElement, this.toggleExpanded.bind(this));\n this.titleElement.addEventListener('keydown', this.onTitleKeyDown.bind(this), false);\n this.contentElement.insertBefore(this.titleElement, this.contentElement.firstChild);\n\n ARIAUtils.setControls(this.titleElement, this.contentElement.createChild('slot'));\n this.view = view;\n expandableContainerForView.set(view, this);\n }\n\n override wasShown(): void {\n if (this.widget && this.materializePromise) {\n void this.materializePromise.then(() => {\n if (this.titleElement.classList.contains('expanded') && this.widget) {\n this.widget.show(this.element);\n }\n });\n }\n }\n\n private materialize(): Promise {\n if (this.materializePromise) {\n return this.materializePromise;\n }\n // TODO(crbug.com/1006759): Transform to async-await\n const promises = [];\n promises.push(this.view.toolbarItems().then(toolbarItems => {\n const toolbarElement = ViewManager.createToolbar(toolbarItems);\n if (toolbarElement) {\n this.titleElement.appendChild(toolbarElement);\n }\n }));\n promises.push(this.view.widget().then(widget => {\n this.widget = widget;\n widgetForView.set(this.view, widget);\n widget.show(this.element);\n }));\n this.materializePromise = Promise.all(promises).then(() => {});\n return this.materializePromise;\n }\n\n expand(): Promise {\n if (this.titleElement.classList.contains('expanded')) {\n return this.materialize();\n }\n this.titleElement.classList.add('expanded');\n ARIAUtils.setExpanded(this.titleElement, true);\n this.titleExpandIcon.name = 'triangle-down';\n return this.materialize().then(() => {\n if (this.widget) {\n this.widget.show(this.element);\n }\n });\n }\n\n private collapse(): void {\n if (!this.titleElement.classList.contains('expanded')) {\n return;\n }\n this.titleElement.classList.remove('expanded');\n ARIAUtils.setExpanded(this.titleElement, false);\n this.titleExpandIcon.name = 'triangle-right';\n void this.materialize().then(() => {\n if (this.widget) {\n this.widget.detach();\n }\n });\n }\n\n private toggleExpanded(event: Event): void {\n if (event.type === 'keydown' && event.target !== this.titleElement) {\n return;\n }\n if (this.titleElement.classList.contains('expanded')) {\n this.collapse();\n } else {\n void this.expand();\n }\n }\n\n private onTitleKeyDown(event: Event): void {\n if (event.target !== this.titleElement) {\n return;\n }\n const keyEvent = (event as KeyboardEvent);\n if (keyEvent.key === 'ArrowLeft') {\n this.collapse();\n } else if (keyEvent.key === 'ArrowRight') {\n if (!this.titleElement.classList.contains('expanded')) {\n void this.expand();\n } else if (this.widget) {\n this.widget.focus();\n }\n }\n }\n}\n\nconst expandableContainerForView = new WeakMap();\n\nclass Location {\n protected readonly manager: ViewManager;\n private readonly revealCallback: (() => void)|undefined;\n private readonly widgetInternal: Widget;\n\n constructor(manager: ViewManager, widget: Widget, revealCallback?: (() => void)) {\n this.manager = manager;\n this.revealCallback = revealCallback;\n this.widgetInternal = widget;\n }\n\n widget(): Widget {\n return this.widgetInternal;\n }\n\n reveal(): void {\n if (this.revealCallback) {\n this.revealCallback();\n }\n }\n\n showView(\n _view: View, _insertBefore?: View|null, _userGesture?: boolean, _omitFocus?: boolean,\n _shouldSelectTab?: boolean): Promise {\n throw new Error('not implemented');\n }\n\n removeView(_view: View): void {\n throw new Error('not implemented');\n }\n}\n\nconst locationForView = new WeakMap();\n\ninterface CloseableTabSetting {\n [tabName: string]: boolean;\n}\n\ninterface TabOrderSetting {\n [tabName: string]: number;\n}\n\nclass TabbedLocation extends Location implements TabbedViewLocation {\n private tabbedPaneInternal: TabbedPane;\n private readonly allowReorder: boolean|undefined;\n private readonly closeableTabSetting: Common.Settings.Setting;\n private readonly tabOrderSetting: Common.Settings.Setting;\n private readonly lastSelectedTabSetting?: Common.Settings.Setting;\n private readonly defaultTab: string|null|undefined;\n private readonly views: Map;\n\n constructor(\n manager: ViewManager, revealCallback?: (() => void), location?: string, restoreSelection?: boolean,\n allowReorder?: boolean, defaultTab?: string|null) {\n const tabbedPane = new TabbedPane();\n if (allowReorder) {\n tabbedPane.setAllowTabReorder(true);\n }\n\n super(manager, tabbedPane, revealCallback);\n this.tabbedPaneInternal = tabbedPane;\n this.allowReorder = allowReorder;\n\n this.tabbedPaneInternal.addEventListener(TabbedPaneEvents.TabSelected, this.tabSelected, this);\n this.tabbedPaneInternal.addEventListener(TabbedPaneEvents.TabClosed, this.tabClosed, this);\n\n this.closeableTabSetting = Common.Settings.Settings.instance().createSetting('closeable-tabs', {});\n // As we give tabs the capability to be closed we also need to add them to the setting so they are still open\n // until the user decide to close them\n this.setOrUpdateCloseableTabsSetting();\n\n this.tabOrderSetting = Common.Settings.Settings.instance().createSetting(location + '-tab-order', {});\n this.tabbedPaneInternal.addEventListener(TabbedPaneEvents.TabOrderChanged, this.persistTabOrder, this);\n if (restoreSelection) {\n this.lastSelectedTabSetting = Common.Settings.Settings.instance().createSetting(location + '-selected-tab', '');\n }\n this.defaultTab = defaultTab;\n\n this.views = new Map();\n\n if (location) {\n this.appendApplicableItems(location);\n }\n }\n\n private setOrUpdateCloseableTabsSetting(): void {\n // Update the setting value, we respect the closed state decided by the user\n // and append the new tabs with value of true so they are shown open\n const newClosable = {\n ...defaultOptionsForTabs,\n ...this.closeableTabSetting.get(),\n };\n this.closeableTabSetting.set(newClosable);\n }\n\n override widget(): Widget {\n return this.tabbedPaneInternal;\n }\n\n tabbedPane(): TabbedPane {\n return this.tabbedPaneInternal;\n }\n\n enableMoreTabsButton(): ToolbarMenuButton {\n const moreTabsButton =\n new ToolbarMenuButton(this.appendTabsToMenu.bind(this), /* isIconDropdown */ true, undefined, 'more-tabs');\n moreTabsButton.setGlyph('dots-vertical');\n this.tabbedPaneInternal.leftToolbar().appendToolbarItem(moreTabsButton);\n this.tabbedPaneInternal.disableOverflowMenu();\n return moreTabsButton;\n }\n\n appendApplicableItems(locationName: string): void {\n const views = this.manager.viewsForLocation(locationName);\n if (this.allowReorder) {\n let i = 0;\n const persistedOrders = this.tabOrderSetting.get();\n const orders = new Map();\n for (const view of views) {\n orders.set(view.viewId(), persistedOrders[view.viewId()] || (++i) * TabbedLocation.orderStep);\n }\n views.sort((a, b) => (orders.get(a.viewId()) as number) - (orders.get(b.viewId()) as number));\n }\n\n for (const view of views) {\n const id = view.viewId();\n this.views.set(id, view);\n locationForView.set(view, this);\n if (view.isTransient()) {\n continue;\n }\n if (!view.isCloseable()) {\n this.appendTab(view);\n } else if (this.closeableTabSetting.get()[id]) {\n this.appendTab(view);\n }\n }\n\n // If a default tab was provided we open or select it\n if (this.defaultTab) {\n if (this.tabbedPaneInternal.hasTab(this.defaultTab)) {\n // If the tabbed pane already has the tab we just have to select it\n this.tabbedPaneInternal.selectTab(this.defaultTab);\n } else {\n // If the tab is not present already it can be because:\n // it doesn't correspond to this tabbed location\n // or because it is closed\n const view = Array.from(this.views.values()).find(view => view.viewId() === this.defaultTab);\n if (view) {\n // defaultTab is indeed part of the views for this tabbed location\n void this.showView(view);\n }\n }\n } else if (this.lastSelectedTabSetting && this.tabbedPaneInternal.hasTab(this.lastSelectedTabSetting.get())) {\n this.tabbedPaneInternal.selectTab(this.lastSelectedTabSetting.get());\n }\n }\n\n private appendTabsToMenu(contextMenu: ContextMenu): void {\n const views = Array.from(this.views.values());\n views.sort((viewa, viewb) => viewa.title().localeCompare(viewb.title()));\n for (const view of views) {\n const title = view.title();\n\n if (view.viewId() === 'issues-pane') {\n contextMenu.defaultSection().appendItem(title, () => {\n Host.userMetrics.issuesPanelOpenedFrom(Host.UserMetrics.IssueOpener.HamburgerMenu);\n void this.showView(view, undefined, true);\n }, {jslogContext: 'issues-pane'});\n continue;\n }\n\n contextMenu.defaultSection().appendItem(\n title, this.showView.bind(this, view, undefined, true), {jslogContext: view.viewId()});\n }\n }\n\n private appendTab(view: View, index?: number): void {\n this.tabbedPaneInternal.appendTab(\n view.viewId(), view.title(), new ContainerWidget(view), undefined, false,\n view.isCloseable() || view.isTransient(), view.isPreviewFeature(), index);\n const iconName = view.iconName();\n if (iconName) {\n const icon = IconButton.Icon.create(iconName);\n this.tabbedPaneInternal.setTabIcon(view.viewId(), icon);\n }\n }\n\n appendView(view: View, insertBefore?: View|null): void {\n if (this.tabbedPaneInternal.hasTab(view.viewId())) {\n return;\n }\n const oldLocation = locationForView.get(view);\n if (oldLocation && oldLocation !== this) {\n oldLocation.removeView(view);\n }\n locationForView.set(view, this);\n this.manager.views.set(view.viewId(), view);\n this.views.set(view.viewId(), view);\n let index: number|undefined = undefined;\n const tabIds = this.tabbedPaneInternal.tabIds();\n if (this.allowReorder) {\n const orderSetting = this.tabOrderSetting.get();\n const order = orderSetting[view.viewId()];\n for (let i = 0; order && i < tabIds.length; ++i) {\n if (orderSetting[tabIds[i]] && orderSetting[tabIds[i]] > order) {\n index = i;\n break;\n }\n }\n } else if (insertBefore) {\n for (let i = 0; i < tabIds.length; ++i) {\n if (tabIds[i] === insertBefore.viewId()) {\n index = i;\n break;\n }\n }\n }\n this.appendTab(view, index);\n\n if (view.isCloseable()) {\n const tabs = this.closeableTabSetting.get();\n const tabId = view.viewId();\n if (!tabs[tabId]) {\n tabs[tabId] = true;\n this.closeableTabSetting.set(tabs);\n }\n }\n this.persistTabOrder();\n }\n\n override async showView(\n view: View, insertBefore?: View|null, userGesture?: boolean, omitFocus?: boolean,\n shouldSelectTab: boolean|undefined = true): Promise {\n this.appendView(view, insertBefore);\n if (shouldSelectTab) {\n this.tabbedPaneInternal.selectTab(view.viewId(), userGesture);\n }\n if (!omitFocus) {\n this.tabbedPaneInternal.focus();\n }\n const widget = (this.tabbedPaneInternal.tabView(view.viewId()) as ContainerWidget);\n await widget.materialize();\n }\n\n override removeView(view: View): void {\n if (!this.tabbedPaneInternal.hasTab(view.viewId())) {\n return;\n }\n\n locationForView.delete(view);\n this.manager.views.delete(view.viewId());\n this.tabbedPaneInternal.closeTab(view.viewId());\n this.views.delete(view.viewId());\n }\n\n private tabSelected(event: Common.EventTarget.EventTargetEvent): void {\n const {tabId} = event.data;\n if (this.lastSelectedTabSetting && event.data['isUserGesture']) {\n this.lastSelectedTabSetting.set(tabId);\n }\n }\n\n private tabClosed(event: Common.EventTarget.EventTargetEvent): void {\n const {tabId} = event.data;\n const tabs = this.closeableTabSetting.get();\n if (tabs[tabId]) {\n tabs[tabId] = false;\n this.closeableTabSetting.set(tabs);\n }\n const view = this.views.get(tabId);\n if (view) {\n void view.disposeView();\n }\n }\n\n private persistTabOrder(): void {\n const tabIds = this.tabbedPaneInternal.tabIds();\n const tabOrders: {\n [x: string]: number,\n } = {};\n for (let i = 0; i < tabIds.length; i++) {\n tabOrders[tabIds[i]] = (i + 1) * TabbedLocation.orderStep;\n }\n\n const oldTabOrder = this.tabOrderSetting.get();\n const oldTabArray = Object.keys(oldTabOrder);\n oldTabArray.sort((a, b) => oldTabOrder[a] - oldTabOrder[b]);\n let lastOrder = 0;\n for (const key of oldTabArray) {\n if (key in tabOrders) {\n lastOrder = tabOrders[key];\n continue;\n }\n tabOrders[key] = ++lastOrder;\n }\n this.tabOrderSetting.set(tabOrders);\n }\n\n getCloseableTabSetting(): CloseableTabSetting {\n return this.closeableTabSetting.get();\n }\n\n static orderStep = 10; // Keep in sync with descriptors.\n}\n\nclass StackLocation extends Location implements ViewLocation {\n private readonly vbox: VBox;\n private readonly expandableContainers: Map;\n\n constructor(manager: ViewManager, revealCallback?: (() => void), location?: string, jslogContext?: string) {\n const vbox = new VBox();\n vbox.element.setAttribute('jslog', `${VisualLogging.pane(jslogContext || 'sidebar').track({resize: true})}`);\n super(manager, vbox, revealCallback);\n this.vbox = vbox;\n ARIAUtils.markAsTree(vbox.element);\n\n this.expandableContainers = new Map();\n\n if (location) {\n this.appendApplicableItems(location);\n }\n }\n\n appendView(view: View, insertBefore?: View|null): void {\n const oldLocation = locationForView.get(view);\n if (oldLocation && oldLocation !== this) {\n oldLocation.removeView(view);\n }\n\n let container = this.expandableContainers.get(view.viewId());\n if (!container) {\n locationForView.set(view, this);\n this.manager.views.set(view.viewId(), view);\n container = new ExpandableContainerWidget(view);\n let beforeElement: Node|null = null;\n if (insertBefore) {\n const beforeContainer = expandableContainerForView.get(insertBefore);\n beforeElement = beforeContainer ? beforeContainer.element : null;\n }\n container.show(this.vbox.contentElement, beforeElement);\n this.expandableContainers.set(view.viewId(), container);\n }\n }\n\n override async showView(view: View, insertBefore?: View|null): Promise {\n this.appendView(view, insertBefore);\n const container = this.expandableContainers.get(view.viewId());\n if (container) {\n await container.expand();\n }\n }\n\n override removeView(view: View): void {\n const container = this.expandableContainers.get(view.viewId());\n if (!container) {\n return;\n }\n\n container.detach();\n this.expandableContainers.delete(view.viewId());\n locationForView.delete(view);\n this.manager.views.delete(view.viewId());\n }\n\n appendApplicableItems(locationName: string): void {\n for (const view of this.manager.viewsForLocation(locationName)) {\n this.appendView(view);\n }\n }\n}\n\nexport {\n ViewRegistration,\n ViewPersistence,\n getRegisteredViewExtensions,\n maybeRemoveViewExtension,\n registerViewExtension,\n ViewLocationValues,\n getRegisteredLocationResolvers,\n registerLocationResolver,\n ViewLocationCategory,\n getLocalizedViewLocationCategory,\n resetViewRegistration,\n};\n"]} \ No newline at end of file +{"version":3,"file":"ViewManager.js","sourceRoot":"","sources":["../../../../../../front_end/ui/legacy/ViewManager.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,QAAQ,MAAM,iCAAiC,CAAC;AAE5D,OAAO,KAAK,UAAU,MAAM,0CAA0C,CAAC;AACvE,OAAO,KAAK,aAAa,MAAM,qCAAqC,CAAC;AAErE,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAiB,MAAM,IAAI,gBAAgB,EAAE,UAAU,EAAC,MAAM,iBAAi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U,CAAC,IAAI,CAAC,CAAC;QACxB,CAAC;IACH,CAAC;CACF;AAED,OAAO,EAGL,2BAA2B,EAC3B,wBAAwB,EACxB,qBAAqB,EAErB,8BAA8B,EAC9B,wBAAwB,EAExB,gCAAgC,EAChC,qBAAqB,GACtB,CAAC","sourcesContent":["// Copyright 2019 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 Platform from '../../core/platform/platform.js';\nimport type * as Root from '../../core/root/root.js';\nimport * as IconButton from '../components/icon_button/icon_button.js';\nimport * as VisualLogging from '../visual_logging/visual_logging.js';\n\nimport * as ARIAUtils from './ARIAUtils.js';\nimport {type ContextMenu} from './ContextMenu.js';\nimport {type EventData, Events as TabbedPaneEvents, TabbedPane} from './TabbedPane.js';\nimport {type ItemsProvider, Toolbar, type ToolbarItem, ToolbarMenuButton} from './Toolbar.js';\nimport {createTextChild} from './UIUtils.js';\nimport {type TabbedViewLocation, type View, type ViewLocation} from './View.js';\nimport viewContainersStyles from './viewContainers.css.legacy.js';\nimport {\n getLocalizedViewLocationCategory,\n getRegisteredLocationResolvers,\n getRegisteredViewExtensions,\n maybeRemoveViewExtension,\n registerLocationResolver,\n registerViewExtension,\n resetViewRegistration,\n ViewLocationCategory,\n ViewLocationValues,\n ViewPersistence,\n type ViewRegistration,\n} from './ViewRegistration.js';\nimport {VBox, type Widget} from './Widget.js';\n\nconst UIStrings = {\n /**\n *@description Aria label for the tab panel view container\n *@example {Sensors} PH1\n */\n sPanel: '{PH1} panel',\n};\nconst str_ = i18n.i18n.registerUIStrings('ui/legacy/ViewManager.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport const defaultOptionsForTabs = {\n security: true,\n};\n\nexport class PreRegisteredView implements View {\n private readonly viewRegistration: ViewRegistration;\n private widgetPromise: Promise|null;\n\n constructor(viewRegistration: ViewRegistration) {\n this.viewRegistration = viewRegistration;\n this.widgetPromise = null;\n }\n\n title(): Common.UIString.LocalizedString {\n return this.viewRegistration.title();\n }\n\n commandPrompt(): Common.UIString.LocalizedString {\n return this.viewRegistration.commandPrompt();\n }\n isCloseable(): boolean {\n return this.viewRegistration.persistence === ViewPersistence.CLOSEABLE;\n }\n\n isPreviewFeature(): boolean {\n return Boolean(this.viewRegistration.isPreviewFeature);\n }\n\n iconName(): string|undefined {\n return this.viewRegistration.iconName;\n }\n\n isTransient(): boolean {\n return this.viewRegistration.persistence === ViewPersistence.TRANSIENT;\n }\n\n viewId(): string {\n return this.viewRegistration.id;\n }\n\n location(): ViewLocationValues|undefined {\n return this.viewRegistration.location;\n }\n\n order(): number|undefined {\n return this.viewRegistration.order;\n }\n\n settings(): string[]|undefined {\n return this.viewRegistration.settings;\n }\n\n tags(): string|undefined {\n if (this.viewRegistration.tags) {\n // Get localized keys and separate by null character to prevent fuzzy matching from matching across them.\n return this.viewRegistration.tags.map(tag => tag()).join('\\0');\n }\n return undefined;\n }\n\n persistence(): ViewPersistence|undefined {\n return this.viewRegistration.persistence;\n }\n\n async toolbarItems(): Promise {\n if (!this.viewRegistration.hasToolbar) {\n return [];\n }\n const provider = await this.widget() as unknown as ItemsProvider;\n return provider.toolbarItems();\n }\n\n widget(): Promise {\n if (this.widgetPromise === null) {\n this.widgetPromise = this.viewRegistration.loadView();\n }\n return this.widgetPromise;\n }\n\n async disposeView(): Promise {\n if (this.widgetPromise === null) {\n return;\n }\n\n const widget = await this.widgetPromise;\n await widget.ownerViewDisposed();\n }\n\n experiment(): string|undefined {\n return this.viewRegistration.experiment;\n }\n\n condition(): Root.Runtime.Condition|undefined {\n return this.viewRegistration.condition;\n }\n}\n\nlet viewManagerInstance: ViewManager|undefined;\n\nexport class ViewManager {\n readonly views: Map;\n private readonly locationNameByViewId: Map;\n private readonly locationOverrideSetting: Common.Settings.Setting<{[key: string]: string}>;\n\n private constructor() {\n this.views = new Map();\n this.locationNameByViewId = new Map();\n\n // Read override setting for location\n this.locationOverrideSetting = Common.Settings.Settings.instance().createSetting('views-location-override', {});\n const preferredExtensionLocations = this.locationOverrideSetting.get();\n\n // Views may define their initial ordering within a location. When the user has not reordered, we use the\n // default ordering as defined by the views themselves.\n\n const viewsByLocation = new Map();\n for (const view of getRegisteredViewExtensions(Common.Settings.Settings.instance().getHostConfig())) {\n const location = view.location() || 'none';\n const views = viewsByLocation.get(location) || [];\n views.push(view);\n viewsByLocation.set(location, views);\n }\n\n let sortedViewExtensions: PreRegisteredView[] = [];\n for (const views of viewsByLocation.values()) {\n views.sort((firstView, secondView) => {\n const firstViewOrder = firstView.order();\n const secondViewOrder = secondView.order();\n if (firstViewOrder !== undefined && secondViewOrder !== undefined) {\n return firstViewOrder - secondViewOrder;\n }\n return 0;\n });\n sortedViewExtensions = sortedViewExtensions.concat(views);\n }\n\n for (const view of sortedViewExtensions) {\n const viewId = view.viewId();\n const location = view.location();\n if (this.views.has(viewId)) {\n throw new Error(`Duplicate view id '${viewId}'`);\n }\n if (!Platform.StringUtilities.isExtendedKebabCase(viewId)) {\n throw new Error(`Invalid view ID '${viewId}'`);\n }\n this.views.set(viewId, view);\n // Use the preferred user location if available\n const locationName = preferredExtensionLocations[viewId] || location;\n this.locationNameByViewId.set(viewId, locationName as string);\n }\n }\n\n static instance(opts: {\n forceNew: boolean|null,\n } = {forceNew: null}): ViewManager {\n const {forceNew} = opts;\n if (!viewManagerInstance || forceNew) {\n viewManagerInstance = new ViewManager();\n }\n\n return viewManagerInstance;\n }\n\n static removeInstance(): void {\n viewManagerInstance = undefined;\n }\n\n static createToolbar(toolbarItems: ToolbarItem[]): Element|null {\n if (!toolbarItems.length) {\n return null;\n }\n const toolbar = new Toolbar('');\n for (const item of toolbarItems) {\n toolbar.appendToolbarItem(item);\n }\n return toolbar.element;\n }\n\n locationNameForViewId(viewId: string): string {\n const locationName = this.locationNameByViewId.get(viewId);\n if (!locationName) {\n throw new Error(`No location name for view with id ${viewId}`);\n }\n return locationName;\n }\n\n /**\n * Moves a view to a new location\n */\n moveView(viewId: string, locationName: string, options?: {\n shouldSelectTab: (boolean),\n overrideSaving: (boolean),\n }): void {\n const defaultOptions = {shouldSelectTab: true, overrideSaving: false};\n const {shouldSelectTab, overrideSaving} = options || defaultOptions;\n if (!viewId || !locationName) {\n return;\n }\n\n const view = this.view(viewId);\n if (!view) {\n return;\n }\n\n if (!overrideSaving) {\n // Update the inner map of locations\n this.locationNameByViewId.set(viewId, locationName);\n\n // Update the settings of location overwrites\n const locations = this.locationOverrideSetting.get();\n locations[viewId] = locationName;\n this.locationOverrideSetting.set(locations);\n }\n\n // Find new location and show view there\n void this.resolveLocation(locationName).then(location => {\n if (!location) {\n throw new Error('Move view: Could not resolve location for view: ' + viewId);\n }\n location.reveal();\n return location.showView(view, undefined, /* userGesture*/ true, /* omitFocus*/ false, shouldSelectTab);\n });\n }\n\n revealView(view: View): Promise {\n const location = locationForView.get(view);\n if (!location) {\n return Promise.resolve();\n }\n location.reveal();\n return location.showView(view);\n }\n\n /**\n * Show view in location\n */\n showViewInLocation(viewId: string, locationName: string, shouldSelectTab: boolean|undefined = true): void {\n this.moveView(viewId, locationName, {\n shouldSelectTab,\n overrideSaving: true,\n });\n }\n\n view(viewId: string): View {\n const view = this.views.get(viewId);\n if (!view) {\n throw new Error(`No view with id ${viewId} found!`);\n }\n return view;\n }\n\n materializedWidget(viewId: string): Widget|null {\n const view = this.view(viewId);\n if (!view) {\n return null;\n }\n return widgetForView.get(view) || null;\n }\n\n async showView(viewId: string, userGesture?: boolean, omitFocus?: boolean): Promise {\n const view = this.views.get(viewId);\n if (!view) {\n console.error('Could not find view for id: \\'' + viewId + '\\' ' + new Error().stack);\n return;\n }\n\n const location = locationForView.get(view) ?? await this.resolveLocation(this.locationNameByViewId.get(viewId));\n if (!location) {\n throw new Error('Could not resolve location for view: ' + viewId);\n }\n location.reveal();\n await location.showView(view, undefined, userGesture, omitFocus);\n }\n\n async resolveLocation(location?: string): Promise {\n if (!location) {\n return null;\n }\n const registeredResolvers = getRegisteredLocationResolvers().filter(resolver => resolver.name === location);\n\n if (registeredResolvers.length > 1) {\n throw new Error('Duplicate resolver for location: ' + location);\n }\n if (registeredResolvers.length) {\n const resolver = await registeredResolvers[0].loadResolver();\n return resolver.resolveLocation(location) as Location | null;\n }\n throw new Error('Unresolved location: ' + location);\n }\n\n createTabbedLocation(\n revealCallback?: (() => void), location?: string, restoreSelection?: boolean, allowReorder?: boolean,\n defaultTab?: string|null): TabbedViewLocation {\n return new TabbedLocation(this, revealCallback, location, restoreSelection, allowReorder, defaultTab);\n }\n\n createStackLocation(revealCallback?: (() => void), location?: string, jslogContext?: string): ViewLocation {\n return new StackLocation(this, revealCallback, location, jslogContext);\n }\n\n hasViewsForLocation(location: string): boolean {\n return Boolean(this.viewsForLocation(location).length);\n }\n\n viewsForLocation(location: string): View[] {\n const result = [];\n for (const [id, view] of this.views.entries()) {\n if (this.locationNameByViewId.get(id) === location) {\n result.push(view);\n }\n }\n return result;\n }\n}\n\nconst widgetForView = new WeakMap();\n\nexport class ContainerWidget extends VBox {\n private readonly view: View;\n private materializePromise?: Promise;\n\n constructor(view: View) {\n super();\n this.element.classList.add('flex-auto', 'view-container', 'overflow-auto');\n this.view = view;\n this.element.tabIndex = -1;\n ARIAUtils.markAsTabpanel(this.element);\n ARIAUtils.setLabel(this.element, i18nString(UIStrings.sPanel, {PH1: view.title()}));\n this.setDefaultFocusedElement(this.element);\n }\n\n materialize(): Promise {\n if (this.materializePromise) {\n return this.materializePromise;\n }\n const promises = [];\n // TODO(crbug.com/1006759): Transform to async-await\n promises.push(this.view.toolbarItems().then(toolbarItems => {\n const toolbarElement = ViewManager.createToolbar(toolbarItems);\n if (toolbarElement) {\n this.element.insertBefore(toolbarElement, this.element.firstChild);\n }\n }));\n promises.push(this.view.widget().then(widget => {\n // Move focus from |this| to loaded |widget| if any.\n const shouldFocus = this.element.hasFocus();\n this.setDefaultFocusedElement(null);\n widgetForView.set(this.view, widget);\n widget.show(this.element);\n if (shouldFocus) {\n widget.focus();\n }\n }));\n this.materializePromise = Promise.all(promises).then(() => {});\n return this.materializePromise;\n }\n\n override wasShown(): void {\n void this.materialize().then(() => {\n const widget = widgetForView.get(this.view);\n if (widget) {\n widget.show(this.element);\n this.wasShownForTest();\n }\n });\n }\n\n private wasShownForTest(): void {\n // This method is sniffed in tests.\n }\n}\n\nclass ExpandableContainerWidget extends VBox {\n private titleElement: HTMLDivElement;\n private readonly titleExpandIcon: IconButton.Icon.Icon;\n private readonly view: View;\n private widget?: Widget;\n private materializePromise?: Promise;\n\n constructor(view: View) {\n super(true);\n this.element.classList.add('flex-none');\n this.registerRequiredCSS(viewContainersStyles);\n\n this.titleElement = document.createElement('div');\n this.titleElement.classList.add('expandable-view-title');\n this.titleElement.setAttribute('jslog', `${VisualLogging.sectionHeader().context(view.viewId()).track({\n click: true,\n keydown: 'Enter|Space|ArrowLeft|ArrowRight',\n })}`);\n ARIAUtils.markAsTreeitem(this.titleElement);\n this.titleExpandIcon = IconButton.Icon.create('triangle-right', 'title-expand-icon');\n this.titleElement.appendChild(this.titleExpandIcon);\n const titleText = view.title();\n createTextChild(this.titleElement, titleText);\n ARIAUtils.setLabel(this.titleElement, titleText);\n ARIAUtils.setExpanded(this.titleElement, false);\n this.titleElement.tabIndex = 0;\n self.onInvokeElement(this.titleElement, this.toggleExpanded.bind(this));\n this.titleElement.addEventListener('keydown', this.onTitleKeyDown.bind(this), false);\n this.contentElement.insertBefore(this.titleElement, this.contentElement.firstChild);\n\n ARIAUtils.setControls(this.titleElement, this.contentElement.createChild('slot'));\n this.view = view;\n expandableContainerForView.set(view, this);\n }\n\n override wasShown(): void {\n if (this.widget && this.materializePromise) {\n void this.materializePromise.then(() => {\n if (this.titleElement.classList.contains('expanded') && this.widget) {\n this.widget.show(this.element);\n }\n });\n }\n }\n\n private materialize(): Promise {\n if (this.materializePromise) {\n return this.materializePromise;\n }\n // TODO(crbug.com/1006759): Transform to async-await\n const promises = [];\n promises.push(this.view.toolbarItems().then(toolbarItems => {\n const toolbarElement = ViewManager.createToolbar(toolbarItems);\n if (toolbarElement) {\n this.titleElement.appendChild(toolbarElement);\n }\n }));\n promises.push(this.view.widget().then(widget => {\n this.widget = widget;\n widgetForView.set(this.view, widget);\n widget.show(this.element);\n }));\n this.materializePromise = Promise.all(promises).then(() => {});\n return this.materializePromise;\n }\n\n expand(): Promise {\n if (this.titleElement.classList.contains('expanded')) {\n return this.materialize();\n }\n this.titleElement.classList.add('expanded');\n ARIAUtils.setExpanded(this.titleElement, true);\n this.titleExpandIcon.name = 'triangle-down';\n return this.materialize().then(() => {\n if (this.widget) {\n this.widget.show(this.element);\n }\n });\n }\n\n private collapse(): void {\n if (!this.titleElement.classList.contains('expanded')) {\n return;\n }\n this.titleElement.classList.remove('expanded');\n ARIAUtils.setExpanded(this.titleElement, false);\n this.titleExpandIcon.name = 'triangle-right';\n void this.materialize().then(() => {\n if (this.widget) {\n this.widget.detach();\n }\n });\n }\n\n private toggleExpanded(event: Event): void {\n if (event.type === 'keydown' && event.target !== this.titleElement) {\n return;\n }\n if (this.titleElement.classList.contains('expanded')) {\n this.collapse();\n } else {\n void this.expand();\n }\n }\n\n private onTitleKeyDown(event: Event): void {\n if (event.target !== this.titleElement) {\n return;\n }\n const keyEvent = (event as KeyboardEvent);\n if (keyEvent.key === 'ArrowLeft') {\n this.collapse();\n } else if (keyEvent.key === 'ArrowRight') {\n if (!this.titleElement.classList.contains('expanded')) {\n void this.expand();\n } else if (this.widget) {\n this.widget.focus();\n }\n }\n }\n}\n\nconst expandableContainerForView = new WeakMap();\n\nclass Location {\n protected readonly manager: ViewManager;\n private readonly revealCallback: (() => void)|undefined;\n private readonly widgetInternal: Widget;\n\n constructor(manager: ViewManager, widget: Widget, revealCallback?: (() => void)) {\n this.manager = manager;\n this.revealCallback = revealCallback;\n this.widgetInternal = widget;\n }\n\n widget(): Widget {\n return this.widgetInternal;\n }\n\n reveal(): void {\n if (this.revealCallback) {\n this.revealCallback();\n }\n }\n\n showView(\n _view: View, _insertBefore?: View|null, _userGesture?: boolean, _omitFocus?: boolean,\n _shouldSelectTab?: boolean): Promise {\n throw new Error('not implemented');\n }\n\n removeView(_view: View): void {\n throw new Error('not implemented');\n }\n}\n\nconst locationForView = new WeakMap();\n\ninterface CloseableTabSetting {\n [tabName: string]: boolean;\n}\n\ninterface TabOrderSetting {\n [tabName: string]: number;\n}\n\nclass TabbedLocation extends Location implements TabbedViewLocation {\n private tabbedPaneInternal: TabbedPane;\n private readonly allowReorder: boolean|undefined;\n private readonly closeableTabSetting: Common.Settings.Setting;\n private readonly tabOrderSetting: Common.Settings.Setting;\n private readonly lastSelectedTabSetting?: Common.Settings.Setting;\n private readonly defaultTab: string|null|undefined;\n private readonly views: Map;\n\n constructor(\n manager: ViewManager, revealCallback?: (() => void), location?: string, restoreSelection?: boolean,\n allowReorder?: boolean, defaultTab?: string|null) {\n const tabbedPane = new TabbedPane();\n if (allowReorder) {\n tabbedPane.setAllowTabReorder(true);\n }\n\n super(manager, tabbedPane, revealCallback);\n this.tabbedPaneInternal = tabbedPane;\n this.allowReorder = allowReorder;\n\n this.tabbedPaneInternal.addEventListener(TabbedPaneEvents.TabSelected, this.tabSelected, this);\n this.tabbedPaneInternal.addEventListener(TabbedPaneEvents.TabClosed, this.tabClosed, this);\n\n this.closeableTabSetting = Common.Settings.Settings.instance().createSetting('closeable-tabs', {});\n // As we give tabs the capability to be closed we also need to add them to the setting so they are still open\n // until the user decide to close them\n this.setOrUpdateCloseableTabsSetting();\n\n this.tabOrderSetting = Common.Settings.Settings.instance().createSetting(location + '-tab-order', {});\n this.tabbedPaneInternal.addEventListener(TabbedPaneEvents.TabOrderChanged, this.persistTabOrder, this);\n if (restoreSelection) {\n this.lastSelectedTabSetting = Common.Settings.Settings.instance().createSetting(location + '-selected-tab', '');\n }\n this.defaultTab = defaultTab;\n\n this.views = new Map();\n\n if (location) {\n this.appendApplicableItems(location);\n }\n }\n\n private setOrUpdateCloseableTabsSetting(): void {\n // Update the setting value, we respect the closed state decided by the user\n // and append the new tabs with value of true so they are shown open\n const newClosable = {\n ...defaultOptionsForTabs,\n ...this.closeableTabSetting.get(),\n };\n this.closeableTabSetting.set(newClosable);\n }\n\n override widget(): Widget {\n return this.tabbedPaneInternal;\n }\n\n tabbedPane(): TabbedPane {\n return this.tabbedPaneInternal;\n }\n\n enableMoreTabsButton(): ToolbarMenuButton {\n const moreTabsButton =\n new ToolbarMenuButton(this.appendTabsToMenu.bind(this), /* isIconDropdown */ true, undefined, 'more-tabs');\n moreTabsButton.setGlyph('dots-vertical');\n this.tabbedPaneInternal.leftToolbar().appendToolbarItem(moreTabsButton);\n this.tabbedPaneInternal.disableOverflowMenu();\n return moreTabsButton;\n }\n\n appendApplicableItems(locationName: string): void {\n const views = this.manager.viewsForLocation(locationName);\n if (this.allowReorder) {\n let i = 0;\n const persistedOrders = this.tabOrderSetting.get();\n const orders = new Map();\n for (const view of views) {\n orders.set(view.viewId(), persistedOrders[view.viewId()] || (++i) * TabbedLocation.orderStep);\n }\n views.sort((a, b) => (orders.get(a.viewId()) as number) - (orders.get(b.viewId()) as number));\n }\n\n for (const view of views) {\n const id = view.viewId();\n this.views.set(id, view);\n locationForView.set(view, this);\n if (view.isTransient()) {\n continue;\n }\n if (!view.isCloseable()) {\n this.appendTab(view);\n } else if (this.closeableTabSetting.get()[id]) {\n this.appendTab(view);\n }\n }\n\n // If a default tab was provided we open or select it\n if (this.defaultTab) {\n if (this.tabbedPaneInternal.hasTab(this.defaultTab)) {\n // If the tabbed pane already has the tab we just have to select it\n this.tabbedPaneInternal.selectTab(this.defaultTab);\n } else {\n // If the tab is not present already it can be because:\n // it doesn't correspond to this tabbed location\n // or because it is closed\n const view = Array.from(this.views.values()).find(view => view.viewId() === this.defaultTab);\n if (view) {\n // defaultTab is indeed part of the views for this tabbed location\n void this.showView(view);\n }\n }\n } else if (this.lastSelectedTabSetting && this.tabbedPaneInternal.hasTab(this.lastSelectedTabSetting.get())) {\n this.tabbedPaneInternal.selectTab(this.lastSelectedTabSetting.get());\n }\n }\n\n private appendTabsToMenu(contextMenu: ContextMenu): void {\n const views = Array.from(this.views.values());\n views.sort((viewa, viewb) => viewa.title().localeCompare(viewb.title()));\n for (const view of views) {\n const title = view.title();\n\n if (view.viewId() === 'issues-pane') {\n contextMenu.defaultSection().appendItem(title, () => {\n Host.userMetrics.issuesPanelOpenedFrom(Host.UserMetrics.IssueOpener.HamburgerMenu);\n void this.showView(view, undefined, true);\n }, {jslogContext: 'issues-pane'});\n continue;\n }\n\n contextMenu.defaultSection().appendItem(\n title, this.showView.bind(this, view, undefined, true), {jslogContext: view.viewId()});\n }\n }\n\n private appendTab(view: View, index?: number): void {\n this.tabbedPaneInternal.appendTab(\n view.viewId(), view.title(), new ContainerWidget(view), undefined, false,\n view.isCloseable() || view.isTransient(), view.isPreviewFeature(), index);\n const iconName = view.iconName();\n if (iconName) {\n const icon = IconButton.Icon.create(iconName);\n this.tabbedPaneInternal.setTabIcon(view.viewId(), icon);\n }\n }\n\n appendView(view: View, insertBefore?: View|null): void {\n if (this.tabbedPaneInternal.hasTab(view.viewId())) {\n return;\n }\n const oldLocation = locationForView.get(view);\n if (oldLocation && oldLocation !== this) {\n oldLocation.removeView(view);\n }\n locationForView.set(view, this);\n this.manager.views.set(view.viewId(), view);\n this.views.set(view.viewId(), view);\n let index: number|undefined = undefined;\n const tabIds = this.tabbedPaneInternal.tabIds();\n if (this.allowReorder) {\n const orderSetting = this.tabOrderSetting.get();\n const order = orderSetting[view.viewId()];\n for (let i = 0; order && i < tabIds.length; ++i) {\n if (orderSetting[tabIds[i]] && orderSetting[tabIds[i]] > order) {\n index = i;\n break;\n }\n }\n } else if (insertBefore) {\n for (let i = 0; i < tabIds.length; ++i) {\n if (tabIds[i] === insertBefore.viewId()) {\n index = i;\n break;\n }\n }\n }\n this.appendTab(view, index);\n\n if (view.isCloseable()) {\n const tabs = this.closeableTabSetting.get();\n const tabId = view.viewId();\n if (!tabs[tabId]) {\n tabs[tabId] = true;\n this.closeableTabSetting.set(tabs);\n }\n }\n this.persistTabOrder();\n }\n\n override async showView(\n view: View, insertBefore?: View|null, userGesture?: boolean, omitFocus?: boolean,\n shouldSelectTab: boolean|undefined = true): Promise {\n this.appendView(view, insertBefore);\n if (shouldSelectTab) {\n this.tabbedPaneInternal.selectTab(view.viewId(), userGesture);\n }\n if (!omitFocus) {\n this.tabbedPaneInternal.focus();\n }\n const widget = (this.tabbedPaneInternal.tabView(view.viewId()) as ContainerWidget);\n await widget.materialize();\n }\n\n override removeView(view: View): void {\n if (!this.tabbedPaneInternal.hasTab(view.viewId())) {\n return;\n }\n\n locationForView.delete(view);\n this.manager.views.delete(view.viewId());\n this.tabbedPaneInternal.closeTab(view.viewId());\n this.views.delete(view.viewId());\n }\n\n private tabSelected(event: Common.EventTarget.EventTargetEvent): void {\n const {tabId} = event.data;\n if (this.lastSelectedTabSetting && event.data['isUserGesture']) {\n this.lastSelectedTabSetting.set(tabId);\n }\n }\n\n private tabClosed(event: Common.EventTarget.EventTargetEvent): void {\n const {tabId} = event.data;\n const tabs = this.closeableTabSetting.get();\n if (tabs[tabId]) {\n tabs[tabId] = false;\n this.closeableTabSetting.set(tabs);\n }\n const view = this.views.get(tabId);\n if (view) {\n void view.disposeView();\n }\n }\n\n private persistTabOrder(): void {\n const tabIds = this.tabbedPaneInternal.tabIds();\n const tabOrders: {\n [x: string]: number,\n } = {};\n for (let i = 0; i < tabIds.length; i++) {\n tabOrders[tabIds[i]] = (i + 1) * TabbedLocation.orderStep;\n }\n\n const oldTabOrder = this.tabOrderSetting.get();\n const oldTabArray = Object.keys(oldTabOrder);\n oldTabArray.sort((a, b) => oldTabOrder[a] - oldTabOrder[b]);\n let lastOrder = 0;\n for (const key of oldTabArray) {\n if (key in tabOrders) {\n lastOrder = tabOrders[key];\n continue;\n }\n tabOrders[key] = ++lastOrder;\n }\n this.tabOrderSetting.set(tabOrders);\n }\n\n getCloseableTabSetting(): CloseableTabSetting {\n return this.closeableTabSetting.get();\n }\n\n static orderStep = 10; // Keep in sync with descriptors.\n}\n\nclass StackLocation extends Location implements ViewLocation {\n private readonly vbox: VBox;\n private readonly expandableContainers: Map;\n\n constructor(manager: ViewManager, revealCallback?: (() => void), location?: string, jslogContext?: string) {\n const vbox = new VBox();\n vbox.element.setAttribute('jslog', `${VisualLogging.pane(jslogContext || 'sidebar').track({resize: true})}`);\n super(manager, vbox, revealCallback);\n this.vbox = vbox;\n ARIAUtils.markAsTree(vbox.element);\n\n this.expandableContainers = new Map();\n\n if (location) {\n this.appendApplicableItems(location);\n }\n }\n\n appendView(view: View, insertBefore?: View|null): void {\n const oldLocation = locationForView.get(view);\n if (oldLocation && oldLocation !== this) {\n oldLocation.removeView(view);\n }\n\n let container = this.expandableContainers.get(view.viewId());\n if (!container) {\n locationForView.set(view, this);\n this.manager.views.set(view.viewId(), view);\n container = new ExpandableContainerWidget(view);\n let beforeElement: Node|null = null;\n if (insertBefore) {\n const beforeContainer = expandableContainerForView.get(insertBefore);\n beforeElement = beforeContainer ? beforeContainer.element : null;\n }\n container.show(this.vbox.contentElement, beforeElement);\n this.expandableContainers.set(view.viewId(), container);\n }\n }\n\n override async showView(view: View, insertBefore?: View|null): Promise {\n this.appendView(view, insertBefore);\n const container = this.expandableContainers.get(view.viewId());\n if (container) {\n await container.expand();\n }\n }\n\n override removeView(view: View): void {\n const container = this.expandableContainers.get(view.viewId());\n if (!container) {\n return;\n }\n\n container.detach();\n this.expandableContainers.delete(view.viewId());\n locationForView.delete(view);\n this.manager.views.delete(view.viewId());\n }\n\n appendApplicableItems(locationName: string): void {\n for (const view of this.manager.viewsForLocation(locationName)) {\n this.appendView(view);\n }\n }\n}\n\nexport {\n ViewRegistration,\n ViewPersistence,\n getRegisteredViewExtensions,\n maybeRemoveViewExtension,\n registerViewExtension,\n ViewLocationValues,\n getRegisteredLocationResolvers,\n registerLocationResolver,\n ViewLocationCategory,\n getLocalizedViewLocationCategory,\n resetViewRegistration,\n};\n"]} \ No newline at end of file diff --git a/public/ui/legacy/ViewRegistration.d.ts b/public/ui/legacy/ViewRegistration.d.ts index 869b54550..4c46b2c14 100644 --- a/public/ui/legacy/ViewRegistration.d.ts +++ b/public/ui/legacy/ViewRegistration.d.ts @@ -109,7 +109,7 @@ export interface ViewRegistration { iconName?: string; } export declare function registerViewExtension(registration: ViewRegistration): void; -export declare function getRegisteredViewExtensions(): Array; +export declare function getRegisteredViewExtensions(config?: Root.Runtime.HostConfig): Array; export declare function maybeRemoveViewExtension(viewId: string): boolean; export declare function registerLocationResolver(registration: LocationResolverRegistration): void; export declare function getRegisteredLocationResolvers(): Array; diff --git a/public/ui/legacy/ViewRegistration.js b/public/ui/legacy/ViewRegistration.js index b7954cfe6..7ec845f78 100644 --- a/public/ui/legacy/ViewRegistration.js +++ b/public/ui/legacy/ViewRegistration.js @@ -46,8 +46,8 @@ export function registerViewExtension(registration) { viewIdSet.add(viewId); registeredViewExtensions.push(new PreRegisteredView(registration)); } -export function getRegisteredViewExtensions() { - return registeredViewExtensions.filter(view => Root.Runtime.Runtime.isDescriptorEnabled({ experiment: view.experiment(), condition: view.condition() })); +export function getRegisteredViewExtensions(config) { + return registeredViewExtensions.filter(view => Root.Runtime.Runtime.isDescriptorEnabled({ experiment: view.experiment(), condition: view.condition() }, config)); } export function maybeRemoveViewExtension(viewId) { const viewIndex = registeredViewExtensions.findIndex(view => view.viewId() === viewId); diff --git a/public/ui/legacy/ViewRegistration.js.map b/public/ui/legacy/ViewRegistration.js.map index ec7c3e283..b818c6c2b 100644 --- a/public/ui/legacy/ViewRegistration.js.map +++ b/public/ui/legacy/ViewRegistration.js.map @@ -1 +1 @@ -{"version":3,"file":"ViewRegistration.js","sourceRoot":"","sources":["../../../../../../front_end/ui/legacy/ViewRegistration.ts"],"names":[],"mappings":"AACA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAC7B,OAAO,KAAK,IAAI,MAAM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AAE,CAAC;QACjB;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QACxC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACtC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;QAC9C;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACrC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACvC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QACxC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACvC;YACE,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IACtC,CAAC;AACH,CAAC","sourcesContent":["\n// 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.\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';\n\nimport {type ViewLocationResolver} from './View.js';\nimport {PreRegisteredView} from './ViewManager.js';\nimport {type Widget} from './Widget.js';\n\nconst UIStrings = {\n /**\n *@description Badge label for an entry in the Quick Open menu. Selecting the entry opens the 'Elements' panel.\n */\n elements: 'Elements',\n /**\n *@description Badge label for an entry in the Quick Open menu. Selecting the entry opens the 'Drawer' panel.\n */\n drawer: 'Drawer',\n /**\n *@description Badge label for an entry in the Quick Open menu. Selecting the entry opens the 'Drawer sidebar' panel.\n */\n drawer_sidebar: 'Drawer sidebar',\n /**\n *@description Badge label for an entry in the Quick Open menu. Selecting the entry opens the 'Panel'.\n */\n panel: 'Panel',\n /**\n *@description Badge label for an entry in the Quick Open menu. Selecting the entry opens the 'Network' panel.\n */\n network: 'Network',\n /**\n *@description Badge label for an entry in the Quick Open menu. Selecting the entry opens the 'Settings' panel.\n */\n settings: 'Settings',\n /**\n *@description Badge label for an entry in the Quick Open menu. Selecting the entry opens the 'Sources' panel.\n */\n sources: 'Sources',\n};\nconst str_ = i18n.i18n.registerUIStrings('ui/legacy/ViewRegistration.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nconst registeredViewExtensions: Array = [];\n\nexport const enum ViewPersistence {\n CLOSEABLE = 'closeable',\n PERMANENT = 'permanent',\n TRANSIENT = 'transient',\n}\n\nexport const enum ViewLocationValues {\n PANEL = 'panel',\n SETTINGS_VIEW = 'settings-view',\n ELEMENTS_SIDEBAR = 'elements-sidebar',\n SOURCES_SIDEBAR_BOTTOM = 'sources.sidebar-bottom',\n NAVIGATOR_VIEW = 'navigator-view',\n DRAWER_VIEW = 'drawer-view',\n DRAWER_SIDEBAR = 'drawer-sidebar',\n NETWORK_SIDEBAR = 'network-sidebar',\n SOURCES_SIDEBAR_TOP = 'sources.sidebar-top',\n SOURCES_SIDEBAR_TABS = 'sources.sidebar-tabs',\n}\n\nexport interface ViewRegistration {\n /**\n * The name of the experiment a view is associated with. Enabling and disabling the declared\n * experiment will enable and disable the view respectively.\n */\n experiment?: Root.Runtime.ExperimentName;\n /**\n * A condition is a function that will make the view available if it\n * returns true, and not available, otherwise. Make sure that objects you\n * access from inside the condition function are ready at the time when the\n * setting conditions are checked.\n */\n condition?: Root.Runtime.Condition;\n /**\n * The command added to the command menu used to show the view. It usually follows the shape Show as it must\n * not be localized at declaration since it is localized internally when appending the commands to the command menu.\n * The existing duplication of the declaration of the title is expected to be removed once the migration to the version\n * 2 of the localization model has been completed (crbug.com/1136655).\n */\n commandPrompt: () => Platform.UIString.LocalizedString;\n\n /**\n * A UI string used as the title of the view.\n */\n title: () => Platform.UIString.LocalizedString;\n\n /**\n * Whether the view is permanently visible or can be opened temporarily.\n */\n persistence?: ViewPersistence;\n\n /**\n * Whether the view is a preview feature (a corresponding icon is shown then).\n */\n isPreviewFeature?: boolean;\n /**\n * Unique identifier of the view.\n */\n id: Lowercase<string>;\n /**\n * An identifier for the location of the view. The location is resolved by\n * an extension of type '@UI.ViewLocationResolver'.\n */\n location?: ViewLocationValues;\n /**\n * Whether the view has a toolbar.\n */\n hasToolbar?: boolean;\n /**\n * Returns an instance of the class that wraps the view.\n * The common pattern for implementing this function is loading the module with the wrapping 'Widget'\n * lazily loaded. As an example:\n *\n * ```js\n * let loadedElementsModule;\n *\n * async function loadElementsModule() {\n *\n * if (!loadedElementsModule) {\n * loadedElementsModule = await import('./elements.js');\n * }\n * return loadedElementsModule;\n * }\n * UI.ViewManager.registerViewExtension({\n * <...>\n * async loadView() {\n * const Elements = await loadElementsModule();\n * return Elements.ElementsPanel.ElementsPanel.instance();\n * },\n * <...>\n * });\n * ```\n */\n loadView: () => Promise<Widget>;\n /**\n * Used to sort the views that appear in a shared location.\n */\n order?: number;\n /**\n * The names of the settings the registered view performs as UI for.\n */\n settings?: Array<string>;\n /**\n * Words used to find the view in the Command Menu.\n */\n tags?: Array<() => Platform.UIString.LocalizedString>;\n /**\n * Icon to be used next to view's title.\n */\n iconName?: string;\n}\n\nconst viewIdSet = new Set<string>();\nexport function registerViewExtension(registration: ViewRegistration): void {\n const viewId = registration.id;\n if (viewIdSet.has(viewId)) {\n throw new Error(`Duplicate view id '${viewId}'`);\n }\n viewIdSet.add(viewId);\n registeredViewExtensions.push(new PreRegisteredView(registration));\n}\n\nexport function getRegisteredViewExtensions(): Array<PreRegisteredView> {\n return registeredViewExtensions.filter(\n view => Root.Runtime.Runtime.isDescriptorEnabled({experiment: view.experiment(), condition: view.condition()}));\n}\n\nexport function maybeRemoveViewExtension(viewId: string): boolean {\n const viewIndex = registeredViewExtensions.findIndex(view => view.viewId() === viewId);\n if (viewIndex < 0 || !viewIdSet.delete(viewId)) {\n return false;\n }\n registeredViewExtensions.splice(viewIndex, 1);\n return true;\n}\n\nconst registeredLocationResolvers: Array<LocationResolverRegistration> = [];\n\nconst viewLocationNameSet = new Set<ViewLocationValues>();\n\nexport function registerLocationResolver(registration: LocationResolverRegistration): void {\n const locationName = registration.name;\n if (viewLocationNameSet.has(locationName)) {\n throw new Error(`Duplicate view location name registration '${locationName}'`);\n }\n viewLocationNameSet.add(locationName);\n registeredLocationResolvers.push(registration);\n}\n\nexport function getRegisteredLocationResolvers(): Array<LocationResolverRegistration> {\n return registeredLocationResolvers;\n}\n\nexport function resetViewRegistration(): void {\n registeredViewExtensions.length = 0;\n registeredLocationResolvers.length = 0;\n viewLocationNameSet.clear();\n viewIdSet.clear();\n}\n\nexport const enum ViewLocationCategory {\n NONE = '', // `NONE` must be a falsy value. Legacy code uses if-checks for the category.\n ELEMENTS = 'ELEMENTS',\n DRAWER = 'DRAWER',\n DRAWER_SIDEBAR = 'DRAWER_SIDEBAR',\n PANEL = 'PANEL',\n NETWORK = 'NETWORK',\n SETTINGS = 'SETTINGS',\n SOURCES = 'SOURCES',\n}\n\nexport function getLocalizedViewLocationCategory(category: ViewLocationCategory): Platform.UIString.LocalizedString {\n switch (category) {\n case ViewLocationCategory.ELEMENTS:\n return i18nString(UIStrings.elements);\n case ViewLocationCategory.DRAWER:\n return i18nString(UIStrings.drawer);\n case ViewLocationCategory.DRAWER_SIDEBAR:\n return i18nString(UIStrings.drawer_sidebar);\n case ViewLocationCategory.PANEL:\n return i18nString(UIStrings.panel);\n case ViewLocationCategory.NETWORK:\n return i18nString(UIStrings.network);\n case ViewLocationCategory.SETTINGS:\n return i18nString(UIStrings.settings);\n case ViewLocationCategory.SOURCES:\n return i18nString(UIStrings.sources);\n case ViewLocationCategory.NONE:\n return i18n.i18n.lockedString('');\n }\n}\n\nexport interface LocationResolverRegistration {\n name: ViewLocationValues;\n category: ViewLocationCategory;\n loadResolver: () => Promise<ViewLocationResolver>;\n}\n"]} \ No newline at end of file +{"version":3,"file":"ViewRegistration.js","sourceRoot":"","sources":["../../../../../../front_end/ui/legacy/ViewRegistration.ts"],"names":[],"mappings":"AACA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAC7B,OAAO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,gCAAgC,CAAC,QAA8B;IAC7E,QAAQ,QAAQ,EAAE,CAAC;QACjB;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QACxC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACtC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;QAC9C;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACrC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACvC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QACxC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACvC;YACE,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IACtC,CAAC;AACH,CAAC","sourcesContent":["\n// 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.\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';\n\nimport {type ViewLocationResolver} from './View.js';\nimport {PreRegisteredView} from './ViewManager.js';\nimport {type Widget} from './Widget.js';\n\nconst UIStrings = {\n /**\n *@description Badge label for an entry in the Quick Open menu. Selecting the entry opens the 'Elements' panel.\n */\n elements: 'Elements',\n /**\n *@description Badge label for an entry in the Quick Open menu. Selecting the entry opens the 'Drawer' panel.\n */\n drawer: 'Drawer',\n /**\n *@description Badge label for an entry in the Quick Open menu. Selecting the entry opens the 'Drawer sidebar' panel.\n */\n drawer_sidebar: 'Drawer sidebar',\n /**\n *@description Badge label for an entry in the Quick Open menu. Selecting the entry opens the 'Panel'.\n */\n panel: 'Panel',\n /**\n *@description Badge label for an entry in the Quick Open menu. Selecting the entry opens the 'Network' panel.\n */\n network: 'Network',\n /**\n *@description Badge label for an entry in the Quick Open menu. Selecting the entry opens the 'Settings' panel.\n */\n settings: 'Settings',\n /**\n *@description Badge label for an entry in the Quick Open menu. Selecting the entry opens the 'Sources' panel.\n */\n sources: 'Sources',\n};\nconst str_ = i18n.i18n.registerUIStrings('ui/legacy/ViewRegistration.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nconst registeredViewExtensions: Array<PreRegisteredView> = [];\n\nexport const enum ViewPersistence {\n CLOSEABLE = 'closeable',\n PERMANENT = 'permanent',\n TRANSIENT = 'transient',\n}\n\nexport const enum ViewLocationValues {\n PANEL = 'panel',\n SETTINGS_VIEW = 'settings-view',\n ELEMENTS_SIDEBAR = 'elements-sidebar',\n SOURCES_SIDEBAR_BOTTOM = 'sources.sidebar-bottom',\n NAVIGATOR_VIEW = 'navigator-view',\n DRAWER_VIEW = 'drawer-view',\n DRAWER_SIDEBAR = 'drawer-sidebar',\n NETWORK_SIDEBAR = 'network-sidebar',\n SOURCES_SIDEBAR_TOP = 'sources.sidebar-top',\n SOURCES_SIDEBAR_TABS = 'sources.sidebar-tabs',\n}\n\nexport interface ViewRegistration {\n /**\n * The name of the experiment a view is associated with. Enabling and disabling the declared\n * experiment will enable and disable the view respectively.\n */\n experiment?: Root.Runtime.ExperimentName;\n /**\n * A condition is a function that will make the view available if it\n * returns true, and not available, otherwise. Make sure that objects you\n * access from inside the condition function are ready at the time when the\n * setting conditions are checked.\n */\n condition?: Root.Runtime.Condition;\n /**\n * The command added to the command menu used to show the view. It usually follows the shape Show <title> as it must\n * not be localized at declaration since it is localized internally when appending the commands to the command menu.\n * The existing duplication of the declaration of the title is expected to be removed once the migration to the version\n * 2 of the localization model has been completed (crbug.com/1136655).\n */\n commandPrompt: () => Platform.UIString.LocalizedString;\n\n /**\n * A UI string used as the title of the view.\n */\n title: () => Platform.UIString.LocalizedString;\n\n /**\n * Whether the view is permanently visible or can be opened temporarily.\n */\n persistence?: ViewPersistence;\n\n /**\n * Whether the view is a preview feature (a corresponding icon is shown then).\n */\n isPreviewFeature?: boolean;\n /**\n * Unique identifier of the view.\n */\n id: Lowercase<string>;\n /**\n * An identifier for the location of the view. The location is resolved by\n * an extension of type '@UI.ViewLocationResolver'.\n */\n location?: ViewLocationValues;\n /**\n * Whether the view has a toolbar.\n */\n hasToolbar?: boolean;\n /**\n * Returns an instance of the class that wraps the view.\n * The common pattern for implementing this function is loading the module with the wrapping 'Widget'\n * lazily loaded. As an example:\n *\n * ```js\n * let loadedElementsModule;\n *\n * async function loadElementsModule() {\n *\n * if (!loadedElementsModule) {\n * loadedElementsModule = await import('./elements.js');\n * }\n * return loadedElementsModule;\n * }\n * UI.ViewManager.registerViewExtension({\n * <...>\n * async loadView() {\n * const Elements = await loadElementsModule();\n * return Elements.ElementsPanel.ElementsPanel.instance();\n * },\n * <...>\n * });\n * ```\n */\n loadView: () => Promise<Widget>;\n /**\n * Used to sort the views that appear in a shared location.\n */\n order?: number;\n /**\n * The names of the settings the registered view performs as UI for.\n */\n settings?: Array<string>;\n /**\n * Words used to find the view in the Command Menu.\n */\n tags?: Array<() => Platform.UIString.LocalizedString>;\n /**\n * Icon to be used next to view's title.\n */\n iconName?: string;\n}\n\nconst viewIdSet = new Set<string>();\nexport function registerViewExtension(registration: ViewRegistration): void {\n const viewId = registration.id;\n if (viewIdSet.has(viewId)) {\n throw new Error(`Duplicate view id '${viewId}'`);\n }\n viewIdSet.add(viewId);\n registeredViewExtensions.push(new PreRegisteredView(registration));\n}\n\nexport function getRegisteredViewExtensions(config?: Root.Runtime.HostConfig): Array<PreRegisteredView> {\n return registeredViewExtensions.filter(\n view => Root.Runtime.Runtime.isDescriptorEnabled(\n {experiment: view.experiment(), condition: view.condition()}, config));\n}\n\nexport function maybeRemoveViewExtension(viewId: string): boolean {\n const viewIndex = registeredViewExtensions.findIndex(view => view.viewId() === viewId);\n if (viewIndex < 0 || !viewIdSet.delete(viewId)) {\n return false;\n }\n registeredViewExtensions.splice(viewIndex, 1);\n return true;\n}\n\nconst registeredLocationResolvers: Array<LocationResolverRegistration> = [];\n\nconst viewLocationNameSet = new Set<ViewLocationValues>();\n\nexport function registerLocationResolver(registration: LocationResolverRegistration): void {\n const locationName = registration.name;\n if (viewLocationNameSet.has(locationName)) {\n throw new Error(`Duplicate view location name registration '${locationName}'`);\n }\n viewLocationNameSet.add(locationName);\n registeredLocationResolvers.push(registration);\n}\n\nexport function getRegisteredLocationResolvers(): Array<LocationResolverRegistration> {\n return registeredLocationResolvers;\n}\n\nexport function resetViewRegistration(): void {\n registeredViewExtensions.length = 0;\n registeredLocationResolvers.length = 0;\n viewLocationNameSet.clear();\n viewIdSet.clear();\n}\n\nexport const enum ViewLocationCategory {\n NONE = '', // `NONE` must be a falsy value. Legacy code uses if-checks for the category.\n ELEMENTS = 'ELEMENTS',\n DRAWER = 'DRAWER',\n DRAWER_SIDEBAR = 'DRAWER_SIDEBAR',\n PANEL = 'PANEL',\n NETWORK = 'NETWORK',\n SETTINGS = 'SETTINGS',\n SOURCES = 'SOURCES',\n}\n\nexport function getLocalizedViewLocationCategory(category: ViewLocationCategory): Platform.UIString.LocalizedString {\n switch (category) {\n case ViewLocationCategory.ELEMENTS:\n return i18nString(UIStrings.elements);\n case ViewLocationCategory.DRAWER:\n return i18nString(UIStrings.drawer);\n case ViewLocationCategory.DRAWER_SIDEBAR:\n return i18nString(UIStrings.drawer_sidebar);\n case ViewLocationCategory.PANEL:\n return i18nString(UIStrings.panel);\n case ViewLocationCategory.NETWORK:\n return i18nString(UIStrings.network);\n case ViewLocationCategory.SETTINGS:\n return i18nString(UIStrings.settings);\n case ViewLocationCategory.SOURCES:\n return i18nString(UIStrings.sources);\n case ViewLocationCategory.NONE:\n return i18n.i18n.lockedString('');\n }\n}\n\nexport interface LocationResolverRegistration {\n name: ViewLocationValues;\n category: ViewLocationCategory;\n loadResolver: () => Promise<ViewLocationResolver>;\n}\n"]} \ No newline at end of file diff --git a/public/ui/legacy/checkboxTextLabel.css.legacy.js b/public/ui/legacy/checkboxTextLabel.css.legacy.js index 9aec2a872..898e6cb96 100644 --- a/public/ui/legacy/checkboxTextLabel.css.legacy.js +++ b/public/ui/legacy/checkboxTextLabel.css.legacy.js @@ -27,8 +27,8 @@ input { accent-color: var(--sys-color-primary-bright); color: var(--sys-color-on-primary); - &:focus { - outline: auto 5px -webkit-focus-ring-color; + &:not(.small) { + margin: 6px; } } @@ -38,7 +38,6 @@ input.inside-datagrid { } .dt-checkbox-text { - margin-left: 3px; overflow: hidden; text-overflow: ellipsis; } diff --git a/public/ui/legacy/components/color_picker/color_picker-tsconfig.json b/public/ui/legacy/components/color_picker/color_picker-tsconfig.json index 9cb56052d..d844a0f8d 100644 --- a/public/ui/legacy/components/color_picker/color_picker-tsconfig.json +++ b/public/ui/legacy/components/color_picker/color_picker-tsconfig.json @@ -37,7 +37,6 @@ "../../../../../../../../front_end/ui/legacy/components/color_picker/Spectrum.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/color_picker/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/legacy/components/color_picker/devtools_entrypoint-bundle-typescript-tsconfig.json index 1e8042c36..f491f8907 100644 --- a/public/ui/legacy/components/color_picker/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/legacy/components/color_picker/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../../front_end/ui/legacy/components/color_picker/color_picker.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/color_picker/unittests-tsconfig.json b/public/ui/legacy/components/color_picker/unittests-tsconfig.json index a82816d41..2d32fa830 100644 --- a/public/ui/legacy/components/color_picker/unittests-tsconfig.json +++ b/public/ui/legacy/components/color_picker/unittests-tsconfig.json @@ -41,7 +41,6 @@ "../../../../../../../../front_end/ui/legacy/components/color_picker/Spectrum.test.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/cookie_table/cookie_table-tsconfig.json b/public/ui/legacy/components/cookie_table/cookie_table-tsconfig.json index 5ed4b63ef..ac3344161 100644 --- a/public/ui/legacy/components/cookie_table/cookie_table-tsconfig.json +++ b/public/ui/legacy/components/cookie_table/cookie_table-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../../front_end/ui/legacy/components/cookie_table/CookiesTable.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/cookie_table/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/legacy/components/cookie_table/devtools_entrypoint-bundle-typescript-tsconfig.json index f2a81bb8b..828721e01 100644 --- a/public/ui/legacy/components/cookie_table/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/legacy/components/cookie_table/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../../front_end/ui/legacy/components/cookie_table/cookie_table.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/data_grid/data_grid-tsconfig.json b/public/ui/legacy/components/data_grid/data_grid-tsconfig.json index 72f5adbe2..cb608c22a 100644 --- a/public/ui/legacy/components/data_grid/data_grid-tsconfig.json +++ b/public/ui/legacy/components/data_grid/data_grid-tsconfig.json @@ -35,7 +35,6 @@ "../../../../../../../../front_end/ui/legacy/components/data_grid/ViewportDataGrid.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/data_grid/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/legacy/components/data_grid/devtools_entrypoint-bundle-typescript-tsconfig.json index ec94f1140..b31a26162 100644 --- a/public/ui/legacy/components/data_grid/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/legacy/components/data_grid/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../../front_end/ui/legacy/components/data_grid/data_grid.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/inline_editor/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/legacy/components/inline_editor/devtools_entrypoint-bundle-typescript-tsconfig.json index ecb690f8f..626b6a3a5 100644 --- a/public/ui/legacy/components/inline_editor/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/legacy/components/inline_editor/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../../front_end/ui/legacy/components/inline_editor/inline_editor.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/inline_editor/inline_editor-tsconfig.json b/public/ui/legacy/components/inline_editor/inline_editor-tsconfig.json index 59f5f3173..c84695087 100644 --- a/public/ui/legacy/components/inline_editor/inline_editor-tsconfig.json +++ b/public/ui/legacy/components/inline_editor/inline_editor-tsconfig.json @@ -52,7 +52,6 @@ "../../../../../../../../front_end/ui/legacy/components/inline_editor/Swatches.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/inline_editor/unittests-tsconfig.json b/public/ui/legacy/components/inline_editor/unittests-tsconfig.json index cd10c7a77..1d3f5be9f 100644 --- a/public/ui/legacy/components/inline_editor/unittests-tsconfig.json +++ b/public/ui/legacy/components/inline_editor/unittests-tsconfig.json @@ -51,7 +51,6 @@ "../../../../../../../../front_end/ui/legacy/components/inline_editor/LinkSwatch.test.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/object_ui/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/legacy/components/object_ui/devtools_entrypoint-bundle-typescript-tsconfig.json index 84c1ff5d0..81d8dc5ed 100644 --- a/public/ui/legacy/components/object_ui/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/legacy/components/object_ui/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../../front_end/ui/legacy/components/object_ui/object_ui.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/object_ui/devtools_entrypoint-meta-typescript-tsconfig.json b/public/ui/legacy/components/object_ui/devtools_entrypoint-meta-typescript-tsconfig.json index aad2208b2..c1985770e 100644 --- a/public/ui/legacy/components/object_ui/devtools_entrypoint-meta-typescript-tsconfig.json +++ b/public/ui/legacy/components/object_ui/devtools_entrypoint-meta-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../../front_end/ui/legacy/components/object_ui/object_ui-meta.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/object_ui/object_ui-tsconfig.json b/public/ui/legacy/components/object_ui/object_ui-tsconfig.json index 32feec4c2..37bc61146 100644 --- a/public/ui/legacy/components/object_ui/object_ui-tsconfig.json +++ b/public/ui/legacy/components/object_ui/object_ui-tsconfig.json @@ -36,7 +36,6 @@ "../../../../../../../../front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/object_ui/unittests-tsconfig.json b/public/ui/legacy/components/object_ui/unittests-tsconfig.json index 5def3dbf4..bae444fe0 100644 --- a/public/ui/legacy/components/object_ui/unittests-tsconfig.json +++ b/public/ui/legacy/components/object_ui/unittests-tsconfig.json @@ -41,7 +41,6 @@ "../../../../../../../../front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.test.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/perf_ui/FlameChart.d.ts b/public/ui/legacy/components/perf_ui/FlameChart.d.ts index 9d0095fe1..e61463382 100644 --- a/public/ui/legacy/components/perf_ui/FlameChart.d.ts +++ b/public/ui/legacy/components/perf_ui/FlameChart.d.ts @@ -30,6 +30,7 @@ import * as Common from '../../../../core/common/common.js'; import * as Platform from '../../../../core/platform/platform.js'; import * as TraceEngine from '../../../../models/trace/trace.js'; +import type * as VisualLogging from '../../../visual_logging/visual_logging.js'; import * as UI from '../../legacy.js'; import { type ChartViewportDelegate } from './ChartViewport.js'; import { type Calculator } from './TimelineGrid.js'; @@ -495,6 +496,7 @@ export interface FlameChartDataProvider { buildFlowForInitiator?(index: number): unknown; minimumBoundary(): number; totalTime(): number; + setVisualElementLoggingParent?(parent: VisualLogging.Loggable): void; formatValue(value: number, precision?: number): string; maxStackDepth(): number; timelineData(rebuild?: boolean): FlameChartTimelineData | null; @@ -535,6 +537,7 @@ export declare const enum Events { * away from any events) */ EntryInvoked = "EntryInvoked", + AnnotateEntry = "AnnotateEntry", /** * Emitted when an event is selected via keyboard navigation using the arrow * keys. @@ -555,6 +558,7 @@ export declare const enum Events { LatestDrawDimensions = "LatestDrawDimensions" } export type EventTypes = { + [Events.AnnotateEntry]: number; [Events.CanvasFocused]: number | void; [Events.EntryInvoked]: number; [Events.EntrySelected]: number; @@ -579,6 +583,7 @@ export interface Group { style: GroupStyle; /** Should be turned on if the track supports user editable stacks. */ showStackContextMenu?: boolean; + jslogContext?: string; } export interface GroupStyle { height: number; diff --git a/public/ui/legacy/components/perf_ui/FlameChart.js b/public/ui/legacy/components/perf_ui/FlameChart.js index 0331bf0bf..15d21d5c5 100644 --- a/public/ui/legacy/components/perf_ui/FlameChart.js +++ b/public/ui/legacy/components/perf_ui/FlameChart.js @@ -28,6 +28,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ import * as Common from '../../../../core/common/common.js'; +import * as Host from '../../../../core/host/host.js'; import * as i18n from '../../../../core/i18n/i18n.js'; import * as Platform from '../../../../core/platform/platform.js'; import * as Bindings from '../../../../models/bindings/bindings.js'; @@ -674,11 +675,15 @@ export class FlameChart extends Common.ObjectWrapper.eventMixin(UI.Widget.VBox) case "INSIDE_TRACK" /* HoverType.INSIDE_TRACK */: { this.#selectGroup(groupIndex); const timelineData = this.timelineData(); + const isMetaOrControl = Host.Platform.isMac() ? mouseEvent.metaKey : mouseEvent.ctrlKey; if (mouseEvent.shiftKey && this.highlightedEntryIndex !== -1 && timelineData) { const start = timelineData.entryStartTimes[this.highlightedEntryIndex]; const end = start + timelineData.entryTotalTimes[this.highlightedEntryIndex]; this.chartViewport.setRangeSelection(start, end); } + else if (isMetaOrControl && this.highlightedEntryIndex !== -1 && timelineData) { + this.dispatchEventToListeners("AnnotateEntry" /* Events.AnnotateEntry */, this.highlightedEntryIndex); + } else { this.chartViewport.onClick(mouseEvent); this.dispatchEventToListeners("EntryInvoked" /* Events.EntryInvoked */, this.highlightedEntryIndex); diff --git a/public/ui/legacy/components/perf_ui/FlameChart.js.map b/public/ui/legacy/components/perf_ui/FlameChart.js.map index ac62a72b1..0d520768c 100644 --- a/public/ui/legacy/components/perf_ui/FlameChart.js.map +++ b/public/ui/legacy/components/perf_ui/FlameChart.js.map @@ -1 +1 @@ -{"version":3,"file":"FlameChart.js","sourceRoot":"","sources":["../../../../../../../../front_end/ui/legacy/components/perf_ui/FlameChart.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,mCAAmC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,+BAA+B,CAAC;AACtD,OAAO,KAAK,QAAQ,MAAM,uCAAuC,CAAC;AAClE,OAAO,KAAK,QAAQ,MAAM,yCAAyC,CAAC;AACpE,OAAO,KAAK,WAAW,MAAM,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AAG,sDAAsD;QAC3D,EAAE,CACL,CAAC;IACJ,CAAC;IAED,aAAa;QACX,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;IAC3B,CAAC;CACF","sourcesContent":["/**\n * Copyright (C) 2013 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 Bindings from '../../../../models/bindings/bindings.js';\nimport * as TraceEngine from '../../../../models/trace/trace.js';\nimport * as Buttons from '../../../components/buttons/buttons.js';\nimport * as UI from '../../legacy.js';\nimport * as ThemeSupport from '../../theme_support/theme_support.js';\n\nimport {ChartViewport, type ChartViewportDelegate} from './ChartViewport.js';\nimport flameChartStyles from './flameChart.css.legacy.js';\nimport {DEFAULT_FONT_SIZE, getFontFamilyForCanvas} from './Font.js';\nimport {type Calculator, TimelineGrid} from './TimelineGrid.js';\n\nconst UIStrings = {\n /**\n *@description Aria accessible name in Flame Chart of the Performance panel\n */\n flameChart: 'Flame Chart',\n /**\n *@description Text for the screen reader to announce a hovered group\n *@example {Network} PH1\n */\n sHovered: '{PH1} hovered',\n /**\n *@description Text for screen reader to announce a selected group.\n *@example {Network} PH1\n */\n sSelected: '{PH1} selected',\n /**\n *@description Text for screen reader to announce an expanded group\n *@example {Network} PH1\n */\n sExpanded: '{PH1} expanded',\n /**\n *@description Text for screen reader to announce a collapsed group\n *@example {Network} PH1\n */\n sCollapsed: '{PH1} collapsed',\n /**\n *@description Text for Hiding a function from the Flame Chart\n */\n hideFunction: 'Hide function',\n /**\n *@description Text for Hiding all children of a function from the Flame Chart\n */\n hideChildren: 'Hide children',\n /**\n *@description Text for Hiding all repeating child entries of a function from the Flame Chart\n */\n hideRepeatingChildren: 'Hide repeating children',\n /**\n *@description Text for remove script from ignore list from the Flame Chart\n */\n removeScriptFromIgnoreList: 'Remove script from ignore list',\n /**\n *@description Text for add script to ignore list from the Flame Chart\n */\n addScriptToIgnoreList: 'Add script to ignore list',\n /**\n *@description Text for an action that shows all of the hidden children of an entry\n */\n resetChildren: 'Reset children',\n /**\n *@description Text for an action that shows all of the hidden entries of the Flame Chart\n */\n resetTrace: 'Reset trace',\n\n /**\n *@description Shown in the context menu when right clicking on a track header to enable the user to enter the track configuration mode.\n */\n enterTrackConfigurationMode: 'Configure tracks…',\n /**\n *@description Shown in the context menu when right clicking on a track header to allow the user to exit track configuration mode.\n */\n exitTrackConfigurationMode: 'Finish configuring tracks',\n};\nconst str_ = i18n.i18n.registerUIStrings('ui/legacy/components/perf_ui/FlameChart.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\n/**\n * The expansion arrow is drawn from the center, so the indent is in fact the center of the arrow.\n * See `drawExpansionArrow` function to understand how we draw the arrow.\n * |headerLeftPadding|Arrow|\n * |expansionArrowIndent|\n *\n * When we are in edit mode, we render 3 icons to the left of the track's title.\n * When we are in normal mode, there are no icons to the left of the track's title.\n **/\n\n// Placed to the left of the track header.\nconst HEADER_LEFT_PADDING = 6;\nconst ARROW_SIDE = 8;\n\nconst EXPANSION_ARROW_INDENT = HEADER_LEFT_PADDING + ARROW_SIDE / 2;\nconst HEADER_LABEL_X_PADDING = 3;\nconst HEADER_LABEL_Y_PADDING = 2;\n\n// The width of each of the edit mode icons.\nconst EDIT_ICON_WIDTH = 16;\n// This gap might seem quite small - but the icons themselves have some\n// whitespace either side, so we don't need a huge gap.\nconst GAP_BETWEEN_EDIT_ICONS = 3;\n// The UP icon is first, and is rendered in from the left just as the track text.\nconst UP_ICON_LEFT = HEADER_LEFT_PADDING;\n// The DOWN icon is after the UP icon, hence we take the up icon's position,\n// add its width and then the gap between them.\nconst DOWN_ICON_LEFT = UP_ICON_LEFT + EDIT_ICON_WIDTH + GAP_BETWEEN_EDIT_ICONS;\n// The HIDE icon is after the DOWN icon, hence we take the up icon's position,\n// add its width and then the gap between them.\nconst HIDE_ICON_LEFT = DOWN_ICON_LEFT + EDIT_ICON_WIDTH + GAP_BETWEEN_EDIT_ICONS;\n\n// Represents the total width taken by the 3 icons (up, down, hide/show, and\n// the gap between them.)\n// We calculate this by taking the space to the left of the hide icon (which\n// encompasses UP/DOWN icons), adding on the width of the HIDE icon, and then a\n// bit of extra padding.\nconst EDIT_MODE_TOTAL_ICON_WIDTH = HIDE_ICON_LEFT + EDIT_ICON_WIDTH + GAP_BETWEEN_EDIT_ICONS;\n\n// These are copied from front_end/images/*.svg, because we need to draw them with canvas.\n// arrow-up.svg\nconst moveUpIconPath = 'M9.25 17V5.875L7.062 8.062L6 7L10 3L14 7L12.938 8.062L10.75 5.875V17H9.25Z';\n// arrow-down.svg\nconst moveDownIconPath = 'M9.25 3V14.125L7.062 11.938L6 13L10 17L14 13L12.938 11.938L10.75 14.125V3H9.25Z';\n// eye-crossed.svg\nconst hideIconPath =\n 'M13.2708 11.1459L11.9792 9.85419C12.0347 9.32641 11.875 8.87155 11.5 8.4896C11.125 8.10766 10.6736 7.94446 10.1458 8.00002L8.85417 6.70835C9.03472 6.63891 9.22222 6.58683 9.41667 6.5521C9.61111 6.51738 9.80556 6.50002 10 6.50002C10.9722 6.50002 11.7986 6.8403 12.4792 7.52085C13.1597 8.20141 13.5 9.0278 13.5 10C13.5 10.1945 13.4826 10.3889 13.4479 10.5834C13.4132 10.7778 13.3542 10.9653 13.2708 11.1459ZM16.0417 13.9167L14.9583 12.8334C15.4583 12.4445 15.9132 12.0174 16.3229 11.5521C16.7326 11.0868 17.0764 10.5695 17.3542 10C16.6736 8.59724 15.6701 7.49655 14.3438 6.69794C13.0174 5.89933 11.5694 5.50002 10 5.50002C9.63889 5.50002 9.28472 5.52085 8.9375 5.56252C8.59028 5.60419 8.25 5.67363 7.91667 5.77085L6.70833 4.56252C7.23611 4.35419 7.77431 4.20835 8.32292 4.12502C8.87153 4.04169 9.43056 4.00002 10 4.00002C11.9861 4.00002 13.8021 4.53821 15.4479 5.6146C17.0938 6.69099 18.2778 8.1528 19 10C18.6944 10.7917 18.2882 11.5104 17.7813 12.1563C17.2743 12.8021 16.6944 13.3889 16.0417 13.9167ZM16 18.125L13.2917 15.4167C12.7639 15.6111 12.2257 15.757 11.6771 15.8542C11.1285 15.9514 10.5694 16 10 16C8.01389 16 6.19792 15.4618 4.55208 14.3854C2.90625 13.309 1.72222 11.8472 1 10C1.30556 9.20835 1.70833 8.48613 2.20833 7.83335C2.70833 7.18058 3.29167 6.5903 3.95833 6.06252L1.875 3.97919L2.9375 2.91669L17.0625 17.0625L16 18.125ZM5.02083 7.14585C4.53472 7.53474 4.08333 7.96183 3.66667 8.4271C3.25 8.89238 2.90972 9.41669 2.64583 10C3.32639 11.4028 4.32986 12.5035 5.65625 13.3021C6.98264 14.1007 8.43056 14.5 10 14.5C10.3611 14.5 10.7153 14.4757 11.0625 14.4271C11.4097 14.3785 11.7569 14.3125 12.1042 14.2292L11.1667 13.2917C10.9722 13.3611 10.7778 13.4132 10.5833 13.4479C10.3889 13.4827 10.1944 13.5 10 13.5C9.02778 13.5 8.20139 13.1597 7.52083 12.4792C6.84028 11.7986 6.5 10.9722 6.5 10C6.5 9.80558 6.52431 9.61113 6.57292 9.41669C6.62153 9.22224 6.66667 9.0278 6.70833 8.83335L5.02083 7.14585Z';\n// eye.svg\nconst showIconPath =\n 'M10 13.5C10.972 13.5 11.7983 13.1597 12.479 12.479C13.1597 11.7983 13.5 10.972 13.5 10C13.5 9.028 13.1597 8.20167 12.479 7.521C11.7983 6.84033 10.972 6.5 10 6.5C9.028 6.5 8.20167 6.84033 7.521 7.521C6.84033 8.20167 6.5 9.028 6.5 10C6.5 10.972 6.84033 11.7983 7.521 12.479C8.20167 13.1597 9.028 13.5 10 13.5ZM10 12C9.44467 12 8.97233 11.8057 8.583 11.417C8.19433 11.0277 8 10.5553 8 10C8 9.44467 8.19433 8.97233 8.583 8.583C8.97233 8.19433 9.44467 8 10 8C10.5553 8 11.0277 8.19433 11.417 8.583C11.8057 8.97233 12 9.44467 12 10C12 10.5553 11.8057 11.0277 11.417 11.417C11.0277 11.8057 10.5553 12 10 12ZM10 16C8.014 16 6.20833 15.455 4.583 14.365C2.95833 13.2743 1.764 11.8193 1 10C1.764 8.18067 2.95833 6.72567 4.583 5.635C6.20833 4.545 8.014 4 10 4C11.986 4 13.7917 4.545 15.417 5.635C17.0417 6.72567 18.236 8.18067 19 10C18.236 11.8193 17.0417 13.2743 15.417 14.365C13.7917 15.455 11.986 16 10 16ZM10 14.5C11.5553 14.5 12.9927 14.0973 14.312 13.292C15.632 12.486 16.646 11.3887 17.354 10C16.646 8.61133 15.632 7.514 14.312 6.708C12.9927 5.90267 11.5553 5.5 10 5.5C8.44467 5.5 7.00733 5.90267 5.688 6.708C4.368 7.514 3.354 8.61133 2.646 10C3.354 11.3887 4.368 12.486 5.688 13.292C7.00733 14.0973 8.44467 14.5 10 14.5Z';\n\n// export for test.\nexport const enum HoverType {\n TRACK_CONFIG_UP_BUTTON = 'TRACK_CONFIG_UP_BUTTON',\n TRACK_CONFIG_DOWN_BUTTON = 'TRACK_CONFIG_DOWN_BUTTON',\n TRACK_CONFIG_HIDE_BUTTON = 'TRACK_CONFIG_HIDE_BUTTON',\n TRACK_CONFIG_SHOW_BUTTON = 'TRACK_CONFIG_SHOW_BUTTON',\n INSIDE_TRACK_HEADER = 'INSIDE_TRACK_HEADER',\n INSIDE_TRACK = 'INSIDE_TRACK',\n OUTSIDE_TRACKS = 'OUTSIDE_TRACKS',\n ERROR = 'ERROR',\n}\n\nexport class FlameChartDelegate {\n windowChanged(_startTime: number, _endTime: number, _animate: boolean): void {\n }\n updateRangeSelection(_startTime: number, _endTime: number): void {\n }\n updateSelectedGroup(_flameChart: FlameChart, _group: Group|null): void {\n }\n}\n\ninterface GroupExpansionState {\n [groupName: string]: boolean;\n}\ninterface GroupHiddenState {\n [groupName: string]: boolean;\n}\n\ninterface PopoverState {\n entryIndex: number;\n hiddenEntriesPopover: boolean;\n}\ninterface GroupTreeNode {\n index: number;\n nestingLevel: number;\n startLevel: number;\n endLevel: number;\n // The order in children is the visible order of them.\n children: GroupTreeNode[];\n}\n\nexport interface OptionalFlameChartConfig {\n /**\n * The FlameChart will highlight the entry that is selected by default. In\n * some cases (Performance Panel) we manage this ourselves with the Overlays\n * system, so we disable the built in one.\n */\n selectedElementOutline?: boolean;\n groupExpansionSetting?: Common.Settings.Setting<GroupExpansionState>;\n}\nexport class FlameChart extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.VBox>(UI.Widget.VBox)\n implements Calculator, ChartViewportDelegate {\n private readonly groupExpansionSetting?: Common.Settings.Setting<GroupExpansionState>;\n private groupExpansionState: GroupExpansionState;\n private groupHiddenState: GroupHiddenState;\n private readonly flameChartDelegate: FlameChartDelegate;\n private chartViewport: ChartViewport;\n private dataProvider: FlameChartDataProvider;\n private candyStripePattern: CanvasPattern|null;\n private contextMenu?: UI.ContextMenu.ContextMenu;\n private viewportElement: HTMLElement;\n private canvas: HTMLCanvasElement;\n private popoverElement: HTMLElement;\n private readonly markerHighlighElement: HTMLElement;\n readonly highlightElement: HTMLElement;\n readonly revealDescendantsArrowHighlightElement: HTMLElement;\n private readonly selectedElement: HTMLElement|null = null;\n private rulerEnabled: boolean;\n private barHeight: number;\n // Additional space around an entry that is added for operations with entry.\n // It allows for less pecision while selecting/hovering over an entry.\n private hitMarginPx: number;\n private textBaseline: number;\n private textPadding: number;\n private highlightedMarkerIndex: number;\n /**\n * Represents the index of the entry that the user's mouse cursor is over.\n * Note that this is updated as the user moves their cursor: they do not have\n * to click for this to be updated.\n **/\n private highlightedEntryIndex: number;\n /**\n * Represents the index of the entry that is selected. For an entry to be\n * selected, it has to be clicked by the user.\n **/\n private selectedEntryIndex: number;\n private rawTimelineDataLength: number;\n private readonly markerPositions: Map<number, {\n x: number,\n width: number,\n }>;\n private lastMouseOffsetX: number;\n private selectedGroupIndex: number;\n private keyboardFocusedGroup: number;\n private offsetWidth!: number;\n private offsetHeight!: number;\n private dragStartX!: number;\n private dragStartY!: number;\n private lastMouseOffsetY!: number;\n private minimumBoundaryInternal!: number;\n private maxDragOffset!: number;\n private timelineLevels?: number[][]|null;\n private visibleLevelOffsets?: Uint32Array|null;\n private visibleLevels?: boolean[]|null;\n private visibleLevelHeights?: Uint32Array;\n private groupOffsets?: Uint32Array|null;\n private rawTimelineData?: FlameChartTimelineData|null;\n private forceDecorationCache?: Int8Array|null;\n private entryColorsCache?: string[]|null;\n private totalTime?: number;\n private lastPopoverState: PopoverState;\n #font: string;\n #groupTreeRoot?: GroupTreeNode|null;\n #searchResultEntryIndex: number;\n #searchResultHighlightElements: HTMLElement[] = [];\n #inTrackConfigEditMode: boolean = false;\n\n // Stored because we cache this value to save extra lookups and layoffs.\n #canvasBoundingClientRect: DOMRect|null = null;\n #selectedElementOutlineEnabled = true;\n\n constructor(\n dataProvider: FlameChartDataProvider, flameChartDelegate: FlameChartDelegate,\n optionalConfig: OptionalFlameChartConfig = {}) {\n super(true);\n this.#font = `${DEFAULT_FONT_SIZE} ${getFontFamilyForCanvas()}`;\n this.registerRequiredCSS(flameChartStyles);\n this.contentElement.classList.add('flame-chart-main-pane');\n if (typeof optionalConfig.selectedElementOutline === 'boolean') {\n this.#selectedElementOutlineEnabled = optionalConfig.selectedElementOutline;\n }\n\n this.groupExpansionSetting = optionalConfig.groupExpansionSetting;\n this.groupExpansionState = optionalConfig.groupExpansionSetting?.get() || {};\n this.groupHiddenState = {};\n this.flameChartDelegate = flameChartDelegate;\n\n this.chartViewport = new ChartViewport(this);\n this.chartViewport.show(this.contentElement);\n\n this.dataProvider = dataProvider;\n\n this.viewportElement = this.chartViewport.viewportElement;\n this.canvas = (this.viewportElement.createChild('canvas', 'fill') as HTMLCanvasElement);\n this.candyStripePattern = null;\n\n this.canvas.tabIndex = 0;\n UI.ARIAUtils.setLabel(this.canvas, i18nString(UIStrings.flameChart));\n UI.ARIAUtils.markAsTree(this.canvas);\n this.setDefaultFocusedElement(this.canvas);\n this.canvas.classList.add('flame-chart-canvas');\n this.canvas.addEventListener('mousemove', this.onMouseMove.bind(this), false);\n this.canvas.addEventListener('mouseout', this.onMouseOut.bind(this), false);\n this.canvas.addEventListener('click', this.onClick.bind(this), false);\n this.canvas.addEventListener('keydown', this.onKeyDown.bind(this), false);\n this.canvas.addEventListener('contextmenu', this.onContextMenu.bind(this), false);\n\n this.popoverElement = this.viewportElement.createChild('div', 'flame-chart-entry-info');\n this.markerHighlighElement = this.viewportElement.createChild('div', 'flame-chart-marker-highlight-element');\n this.highlightElement = this.viewportElement.createChild('div', 'flame-chart-highlight-element');\n this.revealDescendantsArrowHighlightElement =\n this.viewportElement.createChild('div', 'reveal-descendants-arrow-highlight-element');\n\n if (this.#selectedElementOutlineEnabled) {\n this.selectedElement = this.viewportElement.createChild('div', 'flame-chart-selected-element');\n }\n\n this.canvas.addEventListener('focus', () => {\n this.dispatchEventToListeners(Events.CanvasFocused);\n }, false);\n\n UI.UIUtils.installDragHandle(\n this.viewportElement, this.startDragging.bind(this), this.dragging.bind(this), this.endDragging.bind(this),\n null);\n\n this.rulerEnabled = true;\n this.barHeight = 17;\n this.hitMarginPx = 3;\n this.textBaseline = 5;\n this.textPadding = 5;\n this.chartViewport.setWindowTimes(\n dataProvider.minimumBoundary(), dataProvider.minimumBoundary() + dataProvider.totalTime());\n\n this.highlightedMarkerIndex = -1;\n this.highlightedEntryIndex = -1;\n this.selectedEntryIndex = -1;\n this.#searchResultEntryIndex = -1;\n this.rawTimelineDataLength = 0;\n this.markerPositions = new Map();\n\n this.lastMouseOffsetX = 0;\n this.selectedGroupIndex = -1;\n this.lastPopoverState = {\n entryIndex: -1,\n hiddenEntriesPopover: false,\n };\n\n // Keyboard focused group is used to navigate groups irrespective of whether they are selectable or not\n this.keyboardFocusedGroup = -1;\n\n ThemeSupport.ThemeSupport.instance().addEventListener(ThemeSupport.ThemeChangeEvent.eventName, () => {\n this.scheduleUpdate();\n });\n }\n\n override willHide(): void {\n this.hideHighlight();\n }\n\n canvasBoundingClientRect(): DOMRect|null {\n if (this.#canvasBoundingClientRect) {\n return this.#canvasBoundingClientRect;\n }\n this.#canvasBoundingClientRect = this.canvas.getBoundingClientRect();\n return this.#canvasBoundingClientRect;\n }\n\n getBarHeight(): number {\n return this.barHeight;\n }\n\n setBarHeight(value: number): void {\n this.barHeight = value;\n }\n\n setTextBaseline(value: number): void {\n this.textBaseline = value;\n }\n\n setTextPadding(value: number): void {\n this.textPadding = value;\n }\n\n enableRuler(enable: boolean): void {\n this.rulerEnabled = enable;\n }\n\n alwaysShowVerticalScroll(): void {\n this.chartViewport.alwaysShowVerticalScroll();\n }\n\n disableRangeSelection(): void {\n this.chartViewport.disableRangeSelection();\n }\n\n highlightEntry(entryIndex: number): void {\n if (this.highlightedEntryIndex === entryIndex) {\n return;\n }\n if (!this.dataProvider.entryColor(entryIndex)) {\n return;\n }\n this.highlightedEntryIndex = entryIndex;\n this.updateElementPosition(this.highlightElement, this.highlightedEntryIndex);\n this.dispatchEventToListeners(Events.EntryHighlighted, entryIndex);\n }\n\n highlightAllEntries(entries: number[]): void {\n for (const entry of entries) {\n const searchElement = this.viewportElement.createChild('div', 'flame-chart-search-element');\n this.#searchResultHighlightElements.push(searchElement);\n searchElement.id = entry.toString();\n this.updateElementPosition(searchElement, entry);\n }\n }\n\n removeSearchResultHighlights(): void {\n for (const element of this.#searchResultHighlightElements) {\n element.remove();\n }\n this.#searchResultHighlightElements = [];\n }\n\n hideHighlight(): void {\n if (this.#searchResultEntryIndex === -1) {\n this.popoverElement.removeChildren();\n this.lastPopoverState = {\n entryIndex: -1,\n hiddenEntriesPopover: false,\n };\n }\n if (this.highlightedEntryIndex === -1) {\n return;\n }\n this.highlightedEntryIndex = -1;\n this.updateElementPosition(this.highlightElement, this.highlightedEntryIndex);\n this.dispatchEventToListeners(Events.EntryHighlighted, -1);\n }\n\n private createCandyStripePattern(): CanvasPattern {\n // Set the candy stripe pattern to 17px so it repeats well.\n const size = 17;\n const candyStripeCanvas = document.createElement('canvas');\n candyStripeCanvas.width = size;\n candyStripeCanvas.height = size;\n const ctx = candyStripeCanvas.getContext('2d') as CanvasRenderingContext2D;\n\n // Rotate the stripe by 45deg to the right.\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 = 'rgba(255, 0, 0, 0.8)';\n for (let x = -size; x < size * 2; x += 3) {\n ctx.fillRect(x, -size, 1, size * 3);\n }\n // Because we're using a canvas, we know createPattern won't return null\n // https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-createpattern-dev\n return ctx.createPattern(candyStripeCanvas, 'repeat') as CanvasPattern;\n }\n\n private resetCanvas(): void {\n const ratio = window.devicePixelRatio;\n const width = Math.round(this.offsetWidth * ratio);\n const height = Math.round(this.offsetHeight * ratio);\n this.canvas.width = width;\n this.canvas.height = height;\n this.canvas.style.width = `${width / ratio}px`;\n this.canvas.style.height = `${height / ratio}px`;\n }\n\n windowChanged(startTime: number, endTime: number, animate: boolean): void {\n this.flameChartDelegate.windowChanged(startTime, endTime, animate);\n }\n\n updateRangeSelection(startTime: number, endTime: number): void {\n this.flameChartDelegate.updateRangeSelection(startTime, endTime);\n }\n\n setSize(width: number, height: number): void {\n this.offsetWidth = width;\n this.offsetHeight = height;\n }\n\n private startDragging(event: MouseEvent): boolean {\n this.hideHighlight();\n this.maxDragOffset = 0;\n this.dragStartX = event.pageX;\n this.dragStartY = event.pageY;\n return true;\n }\n\n private dragging(event: MouseEvent): void {\n const dx = event.pageX - this.dragStartX;\n const dy = event.pageY - this.dragStartY;\n this.maxDragOffset = Math.max(this.maxDragOffset, Math.sqrt(dx * dx + dy * dy));\n }\n\n private endDragging(_event: MouseEvent): void {\n this.updateHighlight();\n }\n\n timelineData(rebuid?: boolean): FlameChartTimelineData|null {\n if (!this.dataProvider) {\n return null;\n }\n const timelineData = this.dataProvider.timelineData(rebuid);\n if (timelineData !== this.rawTimelineData ||\n (timelineData && timelineData.entryStartTimes.length !== this.rawTimelineDataLength)) {\n this.processTimelineData(timelineData);\n }\n return this.rawTimelineData || null;\n }\n\n private revealEntry(entryIndex: number): void {\n const timelineData = this.timelineData();\n if (!timelineData) {\n return;\n }\n const timeLeft = this.chartViewport.windowLeftTime();\n const timeRight = this.chartViewport.windowRightTime();\n const entryStartTime = timelineData.entryStartTimes[entryIndex];\n const entryTotalTime = timelineData.entryTotalTimes[entryIndex];\n const entryEndTime = entryStartTime + entryTotalTime;\n let minEntryTimeWindow = Math.min(entryTotalTime, timeRight - timeLeft);\n\n const level = timelineData.entryLevels[entryIndex];\n this.chartViewport.setScrollOffset(this.levelToOffset(level), this.levelHeight(level));\n\n const minVisibleWidthPx = 30;\n const futurePixelToTime = (timeRight - timeLeft) / this.offsetWidth;\n minEntryTimeWindow = Math.max(minEntryTimeWindow, futurePixelToTime * minVisibleWidthPx);\n if (timeLeft > entryEndTime) {\n const delta = timeLeft - entryEndTime + minEntryTimeWindow;\n this.windowChanged(timeLeft - delta, timeRight - delta, /* animate */ true);\n } else if (timeRight < entryStartTime) {\n const delta = entryStartTime - timeRight + minEntryTimeWindow;\n this.windowChanged(timeLeft + delta, timeRight + delta, /* animate */ true);\n }\n }\n\n setWindowTimes(startTime: number, endTime: number, animate?: boolean): void {\n this.chartViewport.setWindowTimes(startTime, endTime, animate);\n this.updateHighlight();\n }\n\n /**\n * Handle the mouse move event.\n *\n * And the handle priority will be:\n * 1. Track configuration icons -> show tooltip for the icons\n * 2. Inside a track header -> mouse style will be a \"pointer\", show edit icon\n * 3.1 Inside a track -> show edit icon, update the highlight of hovered event\n * 3.2 Outside all tracks -> clear all highlights\n */\n private onMouseMove(event: Event): void {\n this.#searchResultEntryIndex = -1;\n const mouseEvent = (event as MouseEvent);\n this.lastMouseOffsetX = mouseEvent.offsetX;\n this.lastMouseOffsetY = mouseEvent.offsetY;\n if (!this.enabled()) {\n return;\n }\n if (this.chartViewport.isDragging()) {\n return;\n }\n // Check if the mouse is hovering any group's header area\n const {groupIndex, hoverType} = this.coordinatesToGroupIndexAndHoverType(mouseEvent.offsetX, mouseEvent.offsetY);\n switch (hoverType) {\n case HoverType.TRACK_CONFIG_UP_BUTTON:\n case HoverType.TRACK_CONFIG_DOWN_BUTTON:\n case HoverType.TRACK_CONFIG_HIDE_BUTTON:\n case HoverType.TRACK_CONFIG_SHOW_BUTTON: {\n this.hideHighlight();\n this.viewportElement.style.cursor = 'pointer';\n const iconTooltipElement = this.#prepareIconInfo(groupIndex, hoverType);\n if (iconTooltipElement) {\n this.popoverElement.appendChild(iconTooltipElement);\n this.updatePopoverOffset();\n }\n return;\n }\n case HoverType.INSIDE_TRACK_HEADER:\n this.hideHighlight();\n this.viewportElement.style.cursor = 'pointer';\n return;\n case HoverType.INSIDE_TRACK:\n this.updateHighlight();\n return;\n case HoverType.OUTSIDE_TRACKS:\n // No group is hovered.\n // Redraw the flame chart to clear the potentially previously draw edit icon.\n this.draw();\n this.updateHighlight();\n return;\n }\n }\n\n #prepareIconInfo(groupIndex: number, iconType: HoverType): Element|null {\n const group = this.rawTimelineData?.groups[groupIndex];\n if (!group) {\n return null;\n }\n\n // Only show first 20 characters to make the tooltip not too long.\n const maxTitleChars = 20;\n const displayName = Platform.StringUtilities.trimMiddle(group.name, maxTitleChars);\n\n let iconTooltip = '';\n switch (iconType) {\n case HoverType.TRACK_CONFIG_UP_BUTTON:\n iconTooltip = `Move ${displayName} track up`;\n break;\n case HoverType.TRACK_CONFIG_DOWN_BUTTON:\n iconTooltip = `Move ${displayName} track down`;\n break;\n case HoverType.TRACK_CONFIG_HIDE_BUTTON:\n if (this.groupIsLastVisibleTopLevel(group)) {\n iconTooltip = 'Can not hide the last top level track';\n } else {\n iconTooltip = `Hide ${displayName} track`;\n }\n break;\n case HoverType.TRACK_CONFIG_SHOW_BUTTON:\n iconTooltip = `Show ${displayName} track`;\n break;\n default:\n return null;\n }\n const element = document.createElement('div');\n element.createChild('span', 'timeline-info-title').textContent = iconTooltip;\n\n return element;\n }\n\n private updateHighlight(): void {\n const entryIndex = this.coordinatesToEntryIndex(this.lastMouseOffsetX, this.lastMouseOffsetY);\n // Each time the entry highlight is updated, we need to check if the mouse is hovering over a\n // button that indicates hidden child elements and if so, update the button highlight.\n this.updateHiddenChildrenArrowHighlighPosition(entryIndex);\n\n // No entry is hovered.\n if (entryIndex === -1) {\n this.hideHighlight();\n const {groupIndex} = this.coordinatesToGroupIndexAndHoverType(this.lastMouseOffsetX, this.lastMouseOffsetY);\n if (groupIndex >= 0 && this.rawTimelineData && this.rawTimelineData.groups &&\n this.rawTimelineData.groups[groupIndex].selectable) {\n // This means the mouse is in a selectable group's area, and not hovering any entry.\n this.viewportElement.style.cursor = 'pointer';\n } else {\n // This means the mouse is not hovering any selectable track, and not hovering any entry.\n this.viewportElement.style.cursor = 'default';\n }\n return;\n }\n\n // Some entry is hovered.\n if (this.chartViewport.isDragging()) {\n return;\n }\n this.#updatePopoverForEntry(entryIndex);\n this.viewportElement.style.cursor = this.dataProvider.canJumpToEntry(entryIndex) ? 'pointer' : 'default';\n this.highlightEntry(entryIndex);\n }\n\n private onMouseOut(): void {\n this.lastMouseOffsetX = -1;\n this.lastMouseOffsetY = -1;\n this.hideHighlight();\n }\n\n showPopoverForSearchResult(selectedSearchResult: number): void {\n this.#searchResultEntryIndex = selectedSearchResult;\n this.#updatePopoverForEntry(selectedSearchResult);\n }\n\n #updatePopoverForEntry(entryIndex: number): void {\n // Just update position if cursor is hovering the same entry.\n const isMouseOverRevealChildrenArrow = this.isMouseOverRevealChildrenArrow(this.lastMouseOffsetX, entryIndex);\n if (entryIndex === this.lastPopoverState.entryIndex &&\n isMouseOverRevealChildrenArrow === this.lastPopoverState.hiddenEntriesPopover) {\n return this.updatePopoverOffset();\n }\n this.popoverElement.removeChildren();\n const data = this.timelineData();\n if (!data) {\n return;\n }\n const group = data.groups.at(this.selectedGroupIndex);\n // If the mouse is hovering over the hidden descendants arrow, get an element that shows how many children are hidden, otherwise an element with the event name and length\n const entryInfo = (isMouseOverRevealChildrenArrow && group) ?\n this.dataProvider.prepareHighlightedHiddenEntriesArrowInfo &&\n this.dataProvider.prepareHighlightedHiddenEntriesArrowInfo(entryIndex) :\n this.dataProvider.prepareHighlightedEntryInfo(entryIndex);\n if (entryInfo) {\n this.popoverElement.appendChild(entryInfo);\n this.updatePopoverOffset();\n }\n this.lastPopoverState = {\n entryIndex,\n hiddenEntriesPopover: isMouseOverRevealChildrenArrow,\n };\n }\n\n private updatePopoverOffset(): void {\n let mouseX = this.lastMouseOffsetX;\n let mouseY = this.lastMouseOffsetY;\n\n // If the popover is being updated from a search, we calculate the coordinates manually\n if (this.#searchResultEntryIndex !== -1) {\n const coordinate = this.entryIndexToCoordinates(this.selectedEntryIndex);\n const {x: canvasViewportOffsetX, y: canvasViewportOffsetY} = this.canvas.getBoundingClientRect();\n mouseX = coordinate?.x ? coordinate.x - canvasViewportOffsetX : mouseX;\n mouseY = coordinate?.y ? coordinate.y - canvasViewportOffsetY : mouseY;\n }\n\n const parentWidth = this.popoverElement.parentElement ? this.popoverElement.parentElement.clientWidth : 0;\n const parentHeight = this.popoverElement.parentElement ? this.popoverElement.parentElement.clientHeight : 0;\n const infoWidth = this.popoverElement.clientWidth;\n const infoHeight = this.popoverElement.clientHeight;\n const /** @const */ offsetX = 10;\n const /** @const */ offsetY = 6;\n let x;\n let y;\n for (let quadrant = 0; quadrant < 4; ++quadrant) {\n const dx = quadrant & 2 ? -offsetX - infoWidth : offsetX;\n const dy = quadrant & 1 ? -offsetY - infoHeight : offsetY;\n x = Platform.NumberUtilities.clamp(mouseX + dx, 0, parentWidth - infoWidth);\n y = Platform.NumberUtilities.clamp(mouseY + dy, 0, parentHeight - infoHeight);\n if (x >= mouseX || mouseX >= x + infoWidth || y >= mouseY || mouseY >= y + infoHeight) {\n break;\n }\n }\n this.popoverElement.style.left = x + 'px';\n this.popoverElement.style.top = y + 'px';\n }\n\n /**\n * Handle mouse click event in flame chart\n *\n * And the handle priority will be:\n * 1. Track configuration icons -> Config a track\n * 1.1 if it's edit mode ignore others.\n * 2. Inside a track header -> Select and Expand/Collapse a track\n * 3. Inside a track -> Select a track\n * 3.1 shift + click -> Select the time range of clicked event\n * 3.2 click -> update highlight (handle in other functions)\n */\n private onClick(event: Event): void {\n const mouseEvent = (event as MouseEvent);\n this.focus();\n // onClick comes after dragStart and dragEnd events.\n // So if there was drag (mouse move) in the middle of that events\n // we skip the click. Otherwise we jump to the sources.\n const clickThreshold = 5;\n if (this.maxDragOffset > clickThreshold) {\n return;\n }\n\n // If any button is clicked, we should handle the action only and ignore others.\n const {groupIndex, hoverType} = this.coordinatesToGroupIndexAndHoverType(mouseEvent.offsetX, mouseEvent.offsetY);\n if (groupIndex >= 0) {\n switch (hoverType) {\n case HoverType.TRACK_CONFIG_UP_BUTTON:\n this.moveGroupUp(groupIndex);\n return;\n case HoverType.TRACK_CONFIG_DOWN_BUTTON:\n this.moveGroupDown(groupIndex);\n return;\n case HoverType.TRACK_CONFIG_HIDE_BUTTON:\n if (this.groupIsLastVisibleTopLevel(this.rawTimelineData?.groups[groupIndex])) {\n // If this is the last visible top-level group, we will not allow you hiding the track.\n return;\n }\n this.hideGroup(groupIndex);\n return;\n case HoverType.TRACK_CONFIG_SHOW_BUTTON:\n this.showGroup(groupIndex);\n return;\n case HoverType.INSIDE_TRACK_HEADER:\n this.#selectGroup(groupIndex);\n this.toggleGroupExpand(groupIndex);\n return;\n case HoverType.INSIDE_TRACK: {\n this.#selectGroup(groupIndex);\n\n const timelineData = this.timelineData();\n if (mouseEvent.shiftKey && this.highlightedEntryIndex !== -1 && timelineData) {\n const start = timelineData.entryStartTimes[this.highlightedEntryIndex];\n const end = start + timelineData.entryTotalTimes[this.highlightedEntryIndex];\n this.chartViewport.setRangeSelection(start, end);\n } else {\n this.chartViewport.onClick(mouseEvent);\n this.dispatchEventToListeners(Events.EntryInvoked, this.highlightedEntryIndex);\n }\n return;\n }\n }\n }\n }\n\n #selectGroup(groupIndex: number): void {\n if (groupIndex < 0 || this.selectedGroupIndex === groupIndex) {\n return;\n }\n if (!this.rawTimelineData) {\n return;\n }\n\n const groups = this.rawTimelineData.groups;\n if (!groups) {\n return;\n }\n\n this.keyboardFocusedGroup = groupIndex;\n this.scrollGroupIntoView(groupIndex);\n const groupName = groups[groupIndex].name;\n if (!groups[groupIndex].selectable) {\n this.deselectAllGroups();\n UI.ARIAUtils.alert(i18nString(UIStrings.sHovered, {PH1: groupName}));\n } else {\n this.selectedGroupIndex = groupIndex;\n this.flameChartDelegate.updateSelectedGroup(this, groups[groupIndex]);\n this.draw();\n UI.ARIAUtils.alert(i18nString(UIStrings.sSelected, {PH1: groupName}));\n }\n }\n\n private deselectAllGroups(): void {\n this.selectedGroupIndex = -1;\n this.flameChartDelegate.updateSelectedGroup(this, null);\n this.draw();\n }\n\n private deselectAllEntries(): void {\n this.selectedEntryIndex = -1;\n this.rawTimelineData?.resetFlowData();\n this.draw();\n }\n\n private isGroupFocused(index: number): boolean {\n return index === this.selectedGroupIndex || index === this.keyboardFocusedGroup;\n }\n\n private scrollGroupIntoView(index: number): void {\n if (index < 0) {\n return;\n }\n\n if (!this.rawTimelineData) {\n return;\n }\n\n const groups = this.rawTimelineData.groups;\n const groupOffsets = this.groupOffsets;\n if (!groupOffsets || !groups) {\n return;\n }\n const groupTop = groupOffsets[index];\n\n let nextOffset = groupOffsets[index + 1];\n if (index === groups.length - 1) {\n nextOffset += groups[index].style.padding;\n }\n\n // For the top group, scroll all the way to the top of the chart\n // to accommodate the bar with time markers\n const scrollTop = index === 0 ? 0 : groupTop;\n\n const scrollHeight = Math.min(nextOffset - scrollTop, this.chartViewport.chartHeight());\n this.chartViewport.setScrollOffset(scrollTop, scrollHeight);\n }\n\n private toggleGroupExpand(groupIndex: number): void {\n if (groupIndex < 0 || !this.isGroupCollapsible(groupIndex)) {\n return;\n }\n\n if (!this.rawTimelineData || !this.rawTimelineData.groups) {\n return;\n }\n\n this.expandGroup(groupIndex, !this.rawTimelineData.groups[groupIndex].expanded /* setExpanded */);\n }\n\n private expandGroup(\n groupIndex: number, setExpanded: boolean|undefined = true, propagatedExpand: boolean|undefined = false): void {\n if (groupIndex < 0 || !this.isGroupCollapsible(groupIndex)) {\n return;\n }\n\n if (!this.rawTimelineData) {\n return;\n }\n\n const groups = this.rawTimelineData.groups;\n if (!groups) {\n return;\n }\n\n const group = groups[groupIndex];\n group.expanded = setExpanded;\n\n this.groupExpansionState[group.name] = group.expanded;\n if (this.groupExpansionSetting) {\n this.groupExpansionSetting.set(this.groupExpansionState);\n }\n this.updateLevelPositions();\n\n this.updateHighlight();\n if (!group.expanded) {\n const timelineData = this.timelineData();\n if (timelineData) {\n const level = timelineData.entryLevels[this.selectedEntryIndex];\n if (this.selectedEntryIndex >= 0 && level >= group.startLevel &&\n (groupIndex >= groups.length - 1 || groups[groupIndex + 1].startLevel > level)) {\n this.selectedEntryIndex = -1;\n // Reset all flow arrows when we deselect the entry.\n this.rawTimelineData.resetFlowData();\n }\n }\n }\n\n this.updateHeight();\n this.draw();\n\n this.scrollGroupIntoView(groupIndex);\n // We only want to read expanded/collapsed state on user inputted expand/collapse\n if (!propagatedExpand) {\n const groupName = groups[groupIndex].name;\n const content = group.expanded ? i18nString(UIStrings.sExpanded, {PH1: groupName}) :\n i18nString(UIStrings.sCollapsed, {PH1: groupName});\n UI.ARIAUtils.alert(content);\n }\n }\n\n moveGroupUp(groupIndex: number): void {\n if (groupIndex < 0) {\n return;\n }\n\n if (!this.rawTimelineData || !this.rawTimelineData.groups) {\n return;\n }\n\n if (!this.#groupTreeRoot) {\n return;\n }\n\n for (let i = 0; i < this.#groupTreeRoot.children.length; i++) {\n const child = this.#groupTreeRoot.children[i];\n if (child.index === groupIndex) {\n // exchange with previous one, only second or later group can do so\n if (i >= 1) {\n this.#groupTreeRoot.children[i] = this.#groupTreeRoot.children[i - 1];\n this.#groupTreeRoot.children[i - 1] = child;\n break;\n }\n }\n }\n\n this.updateLevelPositions();\n\n this.updateHighlight();\n this.updateHeight();\n this.draw();\n }\n\n moveGroupDown(groupIndex: number): void {\n if (groupIndex < 0) {\n return;\n }\n\n if (!this.rawTimelineData || !this.rawTimelineData.groups) {\n return;\n }\n\n if (!this.#groupTreeRoot) {\n return;\n }\n\n for (let i = 0; i < this.#groupTreeRoot.children.length; i++) {\n const child = this.#groupTreeRoot.children[i];\n if (child.index === groupIndex) {\n // exchange with previous one, only second to last or before group can do so\n if (i <= this.#groupTreeRoot.children.length - 2) {\n this.#groupTreeRoot.children[i] = this.#groupTreeRoot.children[i + 1];\n this.#groupTreeRoot.children[i + 1] = child;\n break;\n }\n }\n }\n\n this.updateLevelPositions();\n\n this.updateHighlight();\n this.updateHeight();\n this.draw();\n }\n\n hideGroup(groupIndex: number): void {\n this.#toggleGroupHiddenState(groupIndex, /* hidden= */ true);\n }\n\n showGroup(groupIndex: number): void {\n this.#toggleGroupHiddenState(groupIndex, /* hidden= */ false);\n }\n\n #toggleGroupHiddenState(groupIndex: number, hidden: boolean): void {\n if (groupIndex < 0) {\n return;\n }\n\n if (!this.rawTimelineData || !this.rawTimelineData.groups) {\n return;\n }\n\n const groups = this.rawTimelineData.groups;\n if (!groups) {\n return;\n }\n\n const group = groups[groupIndex];\n group.hidden = hidden;\n\n // We need to store this state again because somehow timelineData() is\n // called multiple times when rendering the flame chart, and timelineData()\n // will overwrite the groups with the data from |dataProvider|.\n // So we need this groupHiddenState to reapply hidden state in the processTimelineData()\n this.groupHiddenState[group.name] = group.hidden;\n this.updateLevelPositions();\n\n this.updateHighlight();\n this.updateHeight();\n this.draw();\n }\n\n modifyTree(treeAction: TraceEngine.EntriesFilter.FilterAction, index: number): void {\n const data = this.timelineData();\n if (!data) {\n return;\n }\n this.dataProvider.modifyTree?.(index, treeAction);\n this.dataProvider.timelineData(true);\n this.dataProvider.buildFlowForInitiator?.(index);\n this.update();\n }\n\n getPossibleActions(): TraceEngine.EntriesFilter.PossibleFilterActions|void {\n const data = this.timelineData();\n if (!data) {\n return;\n }\n const group = data.groups.at(this.selectedGroupIndex);\n // Early exit here if there is no group or:\n // 1. The group is not expanded: it needs to be expanded to allow the\n // context menu actions to occur.\n // 2. The group does not have the showStackContextMenu flag which indicates\n // that it does not show entries that support the stack actions.\n if (!group || !group.expanded || !group.showStackContextMenu) {\n return;\n }\n\n // Check which actions are possible on an entry.\n // If an action would not change the entries (for example it has no children to collapse), we do not need to show it.\n return this.dataProvider.findPossibleContextMenuActions?.(this.selectedEntryIndex);\n }\n\n #buildEnterEditModeContextMenu(event: MouseEvent): void {\n if (this.#inTrackConfigEditMode) {\n return;\n }\n\n this.contextMenu = new UI.ContextMenu.ContextMenu(event, {useSoftMenu: true});\n const label = i18nString(UIStrings.enterTrackConfigurationMode);\n this.contextMenu.defaultSection().appendItem(label, () => {\n this.#enterEditMode();\n }, {\n jslogContext: 'track-configuration-enter',\n });\n void this.contextMenu.show();\n }\n\n #buildExitEditModeContextMenu(event: MouseEvent): void {\n if (this.#inTrackConfigEditMode === false) {\n return;\n }\n this.contextMenu = new UI.ContextMenu.ContextMenu(event, {useSoftMenu: true});\n const label = i18nString(UIStrings.exitTrackConfigurationMode);\n this.contextMenu.defaultSection().appendItem(label, () => {\n this.#exitEditMode();\n }, {\n jslogContext: 'track-configuration-exit',\n });\n void this.contextMenu.show();\n }\n\n #hasTrackConfigurationMode(): boolean {\n // Track Configuration mode is off by default: a provider must define the\n // function and have it return `true` to enable it.\n return Boolean(this.dataProvider.hasTrackConfigurationMode && this.dataProvider.hasTrackConfigurationMode());\n }\n\n onContextMenu(event: MouseEvent): void {\n const {groupIndex, hoverType} = this.coordinatesToGroupIndexAndHoverType(event.offsetX, event.offsetY);\n\n // If the user is in edit mode, allow a right click anywhere to exit the mode.\n if (this.#inTrackConfigEditMode) {\n this.#buildExitEditModeContextMenu(event);\n return;\n }\n\n // If we are not in edit mode, and the user right clicks on the header,\n // allow them to enter edit mode.\n // Data providers can disable the ability to enter this mode, hence the\n // extra check. For example, in the DevTools Performance Panel the network\n // data provider & flame chart does not support this mode, but the main one\n // does.\n if (hoverType === HoverType.INSIDE_TRACK_HEADER && this.#hasTrackConfigurationMode()) {\n this.#buildEnterEditModeContextMenu(event);\n }\n\n // The following context menu should only work for the flame chart that support tree modification.\n // So if the data provider doesn't have the |modifyTree| function, simply return to show the default context menu.\n if (!this.dataProvider.modifyTree) {\n return;\n }\n\n if (this.highlightedEntryIndex === -1) {\n // If the user has not selected an individual entry, we do not show any\n // context menu, so finish here.\n return;\n }\n // Build the context menu for right clicking individual entries.\n // The context menu only applies if the user is hovering over an individual\n // entry, and we are not in edit mode (which we know we cannot be given the\n // conditional checks above)\n\n // Update the selected index to match the highlighted index, which\n // represents the entry under the cursor where the user has right clicked\n // to trigger a context menu.\n this.dispatchEventToListeners(Events.EntryInvoked, this.highlightedEntryIndex);\n this.setSelectedEntry(this.highlightedEntryIndex);\n // Update the selected group as well.\n this.#selectGroup(groupIndex);\n\n const possibleActions = this.getPossibleActions();\n if (!possibleActions) {\n return;\n }\n\n this.contextMenu = new UI.ContextMenu.ContextMenu(event, {useSoftMenu: true});\n\n const hideEntryOption = this.contextMenu.defaultSection().appendItem(i18nString(UIStrings.hideFunction), () => {\n this.modifyTree(TraceEngine.EntriesFilter.FilterAction.MERGE_FUNCTION, this.selectedEntryIndex);\n }, {\n disabled: !possibleActions?.[TraceEngine.EntriesFilter.FilterAction.MERGE_FUNCTION],\n jslogContext: 'hide-function',\n });\n hideEntryOption.setShortcut('H');\n\n const hideChildrenOption = this.contextMenu.defaultSection().appendItem(i18nString(UIStrings.hideChildren), () => {\n this.modifyTree(TraceEngine.EntriesFilter.FilterAction.COLLAPSE_FUNCTION, this.selectedEntryIndex);\n }, {\n disabled: !possibleActions?.[TraceEngine.EntriesFilter.FilterAction.COLLAPSE_FUNCTION],\n jslogContext: 'hide-children',\n });\n hideChildrenOption.setShortcut('C');\n\n const hideRepeatingChildrenOption =\n this.contextMenu.defaultSection().appendItem(i18nString(UIStrings.hideRepeatingChildren), () => {\n this.modifyTree(\n TraceEngine.EntriesFilter.FilterAction.COLLAPSE_REPEATING_DESCENDANTS, this.selectedEntryIndex);\n }, {\n disabled: !possibleActions?.[TraceEngine.EntriesFilter.FilterAction.COLLAPSE_REPEATING_DESCENDANTS],\n jslogContext: 'hide-repeating-children',\n });\n hideRepeatingChildrenOption.setShortcut('R');\n\n const resetChildrenOption =\n this.contextMenu.defaultSection().appendItem(i18nString(UIStrings.resetChildren), () => {\n this.modifyTree(TraceEngine.EntriesFilter.FilterAction.RESET_CHILDREN, this.selectedEntryIndex);\n }, {\n disabled: !possibleActions?.[TraceEngine.EntriesFilter.FilterAction.RESET_CHILDREN],\n jslogContext: 'reset-children',\n });\n resetChildrenOption.setShortcut('U');\n\n this.contextMenu.defaultSection().appendItem(i18nString(UIStrings.resetTrace), () => {\n this.modifyTree(TraceEngine.EntriesFilter.FilterAction.UNDO_ALL_ACTIONS, this.selectedEntryIndex);\n }, {\n disabled: !possibleActions?.[TraceEngine.EntriesFilter.FilterAction.UNDO_ALL_ACTIONS],\n jslogContext: 'reset-trace',\n });\n\n const entry = this.dataProvider.eventByIndex?.(this.selectedEntryIndex);\n if (entry && entry instanceof TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame === false) {\n const url = (TraceEngine.Types.TraceEvents.isProfileCall(entry)) ?\n entry.callFrame.url as Platform.DevToolsPath.UrlString :\n undefined;\n if (url) {\n if (Bindings.IgnoreListManager.IgnoreListManager.instance().isUserIgnoreListedURL(url)) {\n this.contextMenu.defaultSection().appendItem(i18nString(UIStrings.removeScriptFromIgnoreList), () => {\n Bindings.IgnoreListManager.IgnoreListManager.instance().unIgnoreListURL(url);\n }, {\n jslogContext: 'remove-from-ignore-list',\n });\n } else {\n this.contextMenu.defaultSection().appendItem(i18nString(UIStrings.addScriptToIgnoreList), () => {\n Bindings.IgnoreListManager.IgnoreListManager.instance().ignoreListURL(url);\n }, {\n jslogContext: 'add-to-ignore-list',\n });\n }\n }\n }\n\n void this.contextMenu.show();\n }\n\n private handleFlameChartTransformEvent(event: Event): void {\n // TODO(crbug.com/1469887): Indicate Shortcuts to the user when the designs are complete.\n if (this.selectedEntryIndex === -1) {\n return;\n }\n\n const possibleActions = this.getPossibleActions();\n if (!possibleActions) {\n return;\n }\n\n const keyboardEvent = (event as KeyboardEvent);\n let handled = false;\n\n if (keyboardEvent.code === 'KeyH' && possibleActions[TraceEngine.EntriesFilter.FilterAction.MERGE_FUNCTION]) {\n this.modifyTree(TraceEngine.EntriesFilter.FilterAction.MERGE_FUNCTION, this.selectedEntryIndex);\n handled = true;\n } else if (\n keyboardEvent.code === 'KeyC' && possibleActions[TraceEngine.EntriesFilter.FilterAction.COLLAPSE_FUNCTION]) {\n this.modifyTree(TraceEngine.EntriesFilter.FilterAction.COLLAPSE_FUNCTION, this.selectedEntryIndex);\n handled = true;\n } else if (\n keyboardEvent.code === 'KeyR' &&\n possibleActions[TraceEngine.EntriesFilter.FilterAction.COLLAPSE_REPEATING_DESCENDANTS]) {\n this.modifyTree(TraceEngine.EntriesFilter.FilterAction.COLLAPSE_REPEATING_DESCENDANTS, this.selectedEntryIndex);\n handled = true;\n } else if (keyboardEvent.code === 'KeyU') {\n this.modifyTree(TraceEngine.EntriesFilter.FilterAction.RESET_CHILDREN, this.selectedEntryIndex);\n handled = true;\n }\n\n if (handled) {\n keyboardEvent.consume(true);\n }\n }\n\n private onKeyDown(e: KeyboardEvent): void {\n if (!UI.KeyboardShortcut.KeyboardShortcut.hasNoModifiers(e) || !this.timelineData()) {\n return;\n }\n\n let eventHandled = this.handleSelectionNavigation(e);\n\n // Handle keyboard navigation in groups\n if (!eventHandled && this.rawTimelineData && this.rawTimelineData.groups) {\n eventHandled = this.handleKeyboardGroupNavigation(e);\n }\n\n if (!eventHandled) {\n this.handleFlameChartTransformEvent(e);\n }\n }\n\n bindCanvasEvent(eventName: string, onEvent: (arg0: Event) => void): void {\n this.canvas.addEventListener(eventName, onEvent);\n }\n\n drawTrackOnCanvas(trackName: string, context: CanvasRenderingContext2D, minWidth: number):\n {top: number, height: number, visibleEntries: Set<number>}|null {\n const timelineData = this.timelineData();\n if (!timelineData) {\n return null;\n }\n const canvasWidth = this.offsetWidth;\n const canvasHeight = this.offsetHeight;\n context.save();\n const ratio = window.devicePixelRatio;\n context.scale(ratio, ratio);\n context.fillStyle = 'rgba(0, 0, 0, 0)';\n context.fillRect(0, 0, canvasWidth, canvasHeight);\n context.font = this.#font;\n\n const groups = this.rawTimelineData?.groups || [];\n const groupOffsets = this.groupOffsets;\n if (!groups.length || !groupOffsets) {\n return null;\n }\n const trackIndex = groups.findIndex(g => g.name.includes(trackName));\n if (trackIndex < 0) {\n return null;\n }\n this.scrollGroupIntoView(trackIndex);\n const group = groups[trackIndex];\n const startLevel = group.startLevel;\n const endLevel = groups[trackIndex + 1].startLevel;\n const groupTop = groupOffsets[trackIndex];\n const nextOffset = groupOffsets[trackIndex + 1];\n\n const {colorBuckets, titleIndices} = this.getDrawableData(context, timelineData);\n\n const entryIndexIsInTrack = (index: number): boolean => {\n const barWidth = Math.min(this.#eventBarWidth(timelineData, index), canvasWidth);\n return timelineData.entryLevels[index] >= startLevel && timelineData.entryLevels[index] < endLevel &&\n barWidth > minWidth;\n };\n let allFilteredIndexes: number[] = [];\n for (const [color, {indexes}] of colorBuckets) {\n const filteredIndexes = indexes.filter(entryIndexIsInTrack);\n allFilteredIndexes = [...allFilteredIndexes, ...filteredIndexes];\n this.#drawGenericEvents(context, timelineData, color, filteredIndexes);\n }\n const filteredTitleIndices = titleIndices.filter(entryIndexIsInTrack);\n this.drawEventTitles(context, timelineData, filteredTitleIndices, canvasWidth);\n context.restore();\n return {top: groupOffsets[trackIndex], height: nextOffset - groupTop, visibleEntries: new Set(allFilteredIndexes)};\n }\n\n private handleKeyboardGroupNavigation(event: Event): boolean {\n const keyboardEvent = (event as KeyboardEvent);\n let handled = false;\n let entrySelected = false;\n\n if (keyboardEvent.code === 'ArrowUp') {\n handled = this.selectPreviousGroup();\n } else if (keyboardEvent.code === 'ArrowDown') {\n handled = this.selectNextGroup();\n } else if (keyboardEvent.code === 'ArrowLeft') {\n if (this.keyboardFocusedGroup >= 0) {\n this.expandGroup(this.keyboardFocusedGroup, false /* setExpanded */);\n handled = true;\n }\n } else if (keyboardEvent.code === 'ArrowRight') {\n if (this.keyboardFocusedGroup >= 0) {\n this.expandGroup(this.keyboardFocusedGroup, true /* setExpanded */);\n this.selectFirstChild();\n handled = true;\n }\n } else if (keyboardEvent.key === 'Enter') {\n entrySelected = this.selectFirstEntryInCurrentGroup();\n handled = entrySelected;\n }\n\n if (handled && !entrySelected) {\n this.deselectAllEntries();\n }\n\n if (handled) {\n keyboardEvent.consume(true);\n }\n\n return handled;\n }\n\n private selectFirstEntryInCurrentGroup(): boolean {\n if (!this.rawTimelineData) {\n return false;\n }\n\n const allGroups = this.rawTimelineData.groups;\n\n if (this.keyboardFocusedGroup < 0 || !allGroups) {\n return false;\n }\n\n const group = allGroups[this.keyboardFocusedGroup];\n const startLevelInGroup = group.startLevel;\n\n // Return if no levels in this group\n if (startLevelInGroup < 0) {\n return false;\n }\n\n // Make sure this is the innermost nested group with this startLevel\n // This is because a parent group also contains levels of all its child groups\n // So check if the next group has the same level, if it does, user should\n // go to that child group to select this entry\n if (this.keyboardFocusedGroup < allGroups.length - 1 &&\n allGroups[this.keyboardFocusedGroup + 1].startLevel === startLevelInGroup) {\n return false;\n }\n\n if (!this.timelineLevels) {\n return false;\n }\n\n // Get first (default) entry in startLevel of selected group\n const firstEntryIndex = this.timelineLevels[startLevelInGroup][0];\n\n this.expandGroup(this.keyboardFocusedGroup, true /* setExpanded */);\n this.setSelectedEntry(firstEntryIndex);\n return true;\n }\n\n private selectPreviousGroup(): boolean {\n if (this.keyboardFocusedGroup <= 0) {\n return false;\n }\n\n const groupIndexToSelect = this.getGroupIndexToSelect(-1 /* offset */);\n this.#selectGroup(groupIndexToSelect);\n return true;\n }\n\n private selectNextGroup(): boolean {\n if (!this.rawTimelineData || !this.rawTimelineData.groups) {\n return false;\n }\n\n if (this.keyboardFocusedGroup >= this.rawTimelineData.groups.length - 1) {\n return false;\n }\n\n const groupIndexToSelect = this.getGroupIndexToSelect(1 /* offset */);\n this.#selectGroup(groupIndexToSelect);\n return true;\n }\n\n private getGroupIndexToSelect(offset: number): number {\n if (!this.rawTimelineData || !this.rawTimelineData.groups) {\n throw new Error('No raw timeline data');\n }\n const allGroups = this.rawTimelineData.groups;\n let groupIndexToSelect = this.keyboardFocusedGroup;\n let groupName, groupWithSubNestingLevel;\n\n do {\n groupIndexToSelect += offset;\n groupName = this.rawTimelineData.groups[groupIndexToSelect].name;\n groupWithSubNestingLevel = this.keyboardFocusedGroup !== -1 &&\n allGroups[groupIndexToSelect].style.nestingLevel > allGroups[this.keyboardFocusedGroup].style.nestingLevel;\n } while (groupIndexToSelect > 0 && groupIndexToSelect < allGroups.length - 1 &&\n (!groupName || groupWithSubNestingLevel));\n\n return groupIndexToSelect;\n }\n\n private selectFirstChild(): void {\n if (!this.rawTimelineData || !this.rawTimelineData.groups) {\n return;\n }\n\n const allGroups = this.rawTimelineData.groups;\n if (this.keyboardFocusedGroup < 0 || this.keyboardFocusedGroup >= allGroups.length - 1) {\n return;\n }\n\n const groupIndexToSelect = this.keyboardFocusedGroup + 1;\n if (allGroups[groupIndexToSelect].style.nestingLevel > allGroups[this.keyboardFocusedGroup].style.nestingLevel) {\n this.#selectGroup(groupIndexToSelect);\n }\n }\n\n private handleSelectionNavigation(event: KeyboardEvent): boolean {\n if (this.selectedEntryIndex === -1) {\n return false;\n }\n const timelineData = this.timelineData();\n if (!timelineData) {\n return false;\n }\n\n function timeComparator(time: number, entryIndex: number): number {\n if (!timelineData) {\n throw new Error('No timeline data');\n }\n return time - timelineData.entryStartTimes[entryIndex];\n }\n\n function entriesIntersect(entry1: number, entry2: number): boolean {\n if (!timelineData) {\n throw new Error('No timeline data');\n }\n\n const start1 = timelineData.entryStartTimes[entry1];\n const start2 = timelineData.entryStartTimes[entry2];\n const end1 = start1 + timelineData.entryTotalTimes[entry1];\n const end2 = start2 + timelineData.entryTotalTimes[entry2];\n return start1 < end2 && start2 < end1;\n }\n\n const keyboardEvent = (event as KeyboardEvent);\n const keys = UI.KeyboardShortcut.Keys;\n if (keyboardEvent.keyCode === keys.Left.code || keyboardEvent.keyCode === keys.Right.code) {\n const level = timelineData.entryLevels[this.selectedEntryIndex];\n const levelIndexes = this.timelineLevels ? this.timelineLevels[level] : [];\n let indexOnLevel = Platform.ArrayUtilities.lowerBound(levelIndexes, this.selectedEntryIndex, (a, b) => a - b);\n indexOnLevel += keyboardEvent.keyCode === keys.Left.code ? -1 : 1;\n event.consume(true);\n if (indexOnLevel >= 0 && indexOnLevel < levelIndexes.length) {\n this.dispatchEventToListeners(Events.EntrySelected, levelIndexes[indexOnLevel]);\n }\n return true;\n }\n\n if (keyboardEvent.keyCode === keys.Up.code || keyboardEvent.keyCode === keys.Down.code) {\n let level = timelineData.entryLevels[this.selectedEntryIndex];\n level += keyboardEvent.keyCode === keys.Up.code ? -1 : 1;\n if (level < 0 || (this.timelineLevels && level >= this.timelineLevels.length)) {\n this.deselectAllEntries();\n keyboardEvent.consume(true);\n return true;\n }\n const entryTime = timelineData.entryStartTimes[this.selectedEntryIndex] +\n timelineData.entryTotalTimes[this.selectedEntryIndex] / 2;\n const levelIndexes = this.timelineLevels ? this.timelineLevels[level] : [];\n let indexOnLevel = Platform.ArrayUtilities.upperBound(levelIndexes, entryTime, timeComparator) - 1;\n if (!entriesIntersect(this.selectedEntryIndex, levelIndexes[indexOnLevel])) {\n ++indexOnLevel;\n if (indexOnLevel >= levelIndexes.length ||\n !entriesIntersect(this.selectedEntryIndex, levelIndexes[indexOnLevel])) {\n if (keyboardEvent.code === 'ArrowDown') {\n return false;\n }\n\n // Stay in the current group and give focus to the parent group instead of entries\n this.deselectAllEntries();\n keyboardEvent.consume(true);\n return true;\n }\n }\n keyboardEvent.consume(true);\n this.dispatchEventToListeners(Events.EntrySelected, levelIndexes[indexOnLevel]);\n return true;\n }\n if (event.key === 'Enter') {\n event.consume(true);\n this.dispatchEventToListeners(Events.EntryInvoked, this.selectedEntryIndex);\n return true;\n }\n return false;\n }\n\n /**\n * Given offset of the cursor, returns the index of the entry.\n * This function is public for test purpose.\n * @param x\n * @param y\n * @returns the index of the entry\n */\n coordinatesToEntryIndex(x: number, y: number): number {\n if (x < 0 || y < 0) {\n return -1;\n }\n const timelineData = this.timelineData();\n if (!timelineData) {\n return -1;\n }\n y += this.chartViewport.scrollOffset();\n if (!this.visibleLevelOffsets || !this.visibleLevelHeights || !this.visibleLevels) {\n throw new Error('No visible level offsets or heights');\n }\n\n // The real order of the levels might be changed.\n // So we just check each level, and check if the y is between the start and the end of this level. If yes, this is\n // the level we want to find.\n let cursorLevel = -1;\n for (let i = 0; i < this.dataProvider.maxStackDepth(); i++) {\n if (y >= this.visibleLevelOffsets[i] &&\n y < this.visibleLevelOffsets[i] + (this.visibleLevels[i] ? this.visibleLevelHeights[i] : 0)) {\n cursorLevel = i;\n break;\n }\n }\n\n if (cursorLevel < 0 || !this.visibleLevels[cursorLevel]) {\n return -1;\n }\n const offsetFromLevel = y - this.visibleLevelOffsets[cursorLevel];\n if (offsetFromLevel > this.levelHeight(cursorLevel)) {\n return -1;\n }\n\n // Check markers first.\n for (const [index, pos] of this.markerPositions) {\n if (timelineData.entryLevels[index] !== cursorLevel) {\n continue;\n }\n if (pos.x <= x && x < pos.x + pos.width) {\n return index as number;\n }\n }\n\n // Check regular entries.\n const entryStartTimes = timelineData.entryStartTimes;\n const entriesOnLevel: number[] = this.timelineLevels ? this.timelineLevels[cursorLevel] : [];\n if (!entriesOnLevel || !entriesOnLevel.length) {\n return -1;\n }\n\n const cursorTime = this.chartViewport.pixelToTime(x);\n const indexOnLevel = Math.max(\n Platform.ArrayUtilities.upperBound(\n entriesOnLevel, cursorTime, (time, entryIndex) => time - entryStartTimes[entryIndex]) -\n 1,\n 0);\n\n function checkEntryHit(this: FlameChart, entryIndex: number|undefined): boolean {\n if (entryIndex === undefined) {\n return false;\n }\n\n if (!timelineData) {\n return false;\n }\n\n const startTime = entryStartTimes[entryIndex];\n const duration = timelineData.entryTotalTimes[entryIndex];\n const startX = this.chartViewport.timeToPosition(startTime);\n const endX = this.chartViewport.timeToPosition(startTime + duration);\n return startX - this.hitMarginPx < x && x < endX + this.hitMarginPx;\n }\n\n let entryIndex: number = entriesOnLevel[indexOnLevel];\n if (checkEntryHit.call(this, entryIndex)) {\n return entryIndex;\n }\n entryIndex = entriesOnLevel[indexOnLevel + 1];\n if (checkEntryHit.call(this, entryIndex)) {\n return entryIndex;\n }\n return -1;\n }\n\n /**\n * Given an entry's index and an X coordinate of a mouse click, returns\n * whether the mouse is hovering over the arrow button that reveals hidden children\n */\n isMouseOverRevealChildrenArrow(x: number, index: number): boolean {\n // Check if given entry has an arrow\n if (!this.entryHasDecoration(index, FlameChartDecorationType.HIDDEN_DESCENDANTS_ARROW)) {\n return false;\n }\n const timelineData = this.timelineData();\n if (!timelineData) {\n return false;\n }\n const startTime = timelineData.entryStartTimes[index];\n const duration = timelineData.entryTotalTimes[index];\n const endX = this.chartViewport.timeToPosition(startTime + duration);\n // The arrow icon is square, thefore the width is equal to the bar height\n const barHeight = this.#eventBarHeight(timelineData, index);\n const arrowWidth = barHeight;\n if (endX - arrowWidth - this.hitMarginPx < x && x < endX + this.hitMarginPx) {\n return true;\n }\n return false;\n }\n\n /**\n * Given an entry's index, returns its coordinates relative to the\n * viewport.\n * This function is public for test purpose.\n */\n entryIndexToCoordinates(entryIndex: number): {x: number, y: number}|null {\n const timelineData = this.timelineData();\n const {x: canvasViewportOffsetX, y: canvasViewportOffsetY} = this.canvas.getBoundingClientRect();\n if (!timelineData || !this.visibleLevelOffsets) {\n return null;\n }\n\n const x = this.chartViewport.timeToPosition(timelineData.entryStartTimes[entryIndex]) + canvasViewportOffsetX;\n const y = this.visibleLevelOffsets[timelineData.entryLevels[entryIndex]] - this.chartViewport.scrollOffset() +\n canvasViewportOffsetY;\n return {x, y};\n }\n\n /**\n * Given an entry's index, returns its title\n */\n entryTitle(entryIndex: number): string|null {\n return this.dataProvider.entryTitle(entryIndex);\n }\n\n /**\n * Returns the offset of the canvas relative to the viewport.\n */\n getCanvasOffset(): {x: number, y: number} {\n return this.canvas.getBoundingClientRect();\n }\n\n getCanvas(): HTMLCanvasElement {\n return this.canvas;\n }\n\n /**\n * Returns the y scroll of the chart viewport.\n */\n getScrollOffset(): number {\n return this.chartViewport.scrollOffset();\n }\n\n getContextMenu(): UI.ContextMenu.ContextMenu|undefined {\n return this.contextMenu;\n }\n\n /**\n * Given offset of the cursor, returns the index of the group and the hover type of current mouse position.\n * Will return -1 for index and HoverType.OUTSIDE_TRACKS if no group is hovered/clicked.\n * And the handle priority will be:\n * 1. Track configuration icons\n * 2. Inside a track header (track label and the expansion arrow)\n * 3. Inside a track\n * 4. Outside all tracks\n *\n * This function is public for test purpose.\n * @param x\n * @param y\n * @returns the index of the group and the button user clicked. If there is no button the button type will be\n * undefined.\n */\n coordinatesToGroupIndexAndHoverType(x: number, y: number): {groupIndex: number, hoverType: HoverType} {\n if (!this.rawTimelineData || !this.rawTimelineData.groups || !this.groupOffsets) {\n return {groupIndex: -1, hoverType: HoverType.ERROR};\n }\n\n if (x < 0 || y < 0) {\n return {groupIndex: -1, hoverType: HoverType.ERROR};\n }\n y += this.chartViewport.scrollOffset();\n const groups = this.rawTimelineData.groups || [];\n\n // The real order of the groups is the preorder traversal, and it will match the order in the sortedGroup.\n // So we first do a preorder traversal to get an array of GroupIndex. And then based on the visual index we got\n // before, we can get the real group index.\n if (this.#groupTreeRoot) {\n const sortedGroupIndexes: number[] = [];\n\n function traverse(root: GroupTreeNode): void {\n sortedGroupIndexes.push(root.index);\n for (const child of root.children) {\n traverse(child);\n }\n }\n traverse(this.#groupTreeRoot);\n // Skip the one whose index is -1, because we added to represent the top\n // level to be the parent of all groups.\n sortedGroupIndexes.shift();\n\n // This shouldn't happen, because the tree should have the fake root and all groups. Add a sanity check to avoid\n // error.\n if (sortedGroupIndexes.length !== groups.length) {\n console.warn('The data from the group tree doesn\\'t match the data from DataProvider.');\n return {groupIndex: -1, hoverType: HoverType.ERROR};\n }\n\n // Add an extra index, which is equal to the length of the |groups|, this\n // will be used for the coordinates after the last group.\n // If the coordinates after the last group, it will return in later check\n // `groupIndex >= groups.length` anyway. But add one more element to make\n // this array same length as the |groupOffsets|.\n sortedGroupIndexes.push(groups.length);\n\n for (let i = 0; i < sortedGroupIndexes.length; i++) {\n const groupIndex = sortedGroupIndexes[i];\n const nextIndex = sortedGroupIndexes[i + 1] ?? sortedGroupIndexes.length;\n\n if (y >= this.groupOffsets[groupIndex] && y < this.groupOffsets[nextIndex]) {\n // This section is used to calculate the position of current group's header\n // If we are in edit mode, the track label is pushed right to make room for the icons.\n const context = (this.canvas.getContext('2d') as CanvasRenderingContext2D);\n context.save();\n context.font = this.#font;\n const headerRight = HEADER_LEFT_PADDING + (this.#inTrackConfigEditMode ? EDIT_MODE_TOTAL_ICON_WIDTH : 0) +\n this.labelWidthForGroup(context, groups[groupIndex]);\n context.restore();\n\n const mouseInHeaderRow =\n y >= this.groupOffsets[groupIndex] && y < this.groupOffsets[groupIndex] + groups[groupIndex].style.height;\n\n if (this.#inTrackConfigEditMode) {\n if (mouseInHeaderRow) {\n if (UP_ICON_LEFT <= x && x < UP_ICON_LEFT + EDIT_ICON_WIDTH) {\n return {groupIndex: groupIndex, hoverType: HoverType.TRACK_CONFIG_UP_BUTTON};\n }\n if (DOWN_ICON_LEFT <= x && x < DOWN_ICON_LEFT + EDIT_ICON_WIDTH) {\n return {groupIndex: groupIndex, hoverType: HoverType.TRACK_CONFIG_DOWN_BUTTON};\n }\n if (HIDE_ICON_LEFT <= x && x < HIDE_ICON_LEFT + EDIT_ICON_WIDTH) {\n return {\n groupIndex: groupIndex,\n hoverType: groups[groupIndex].hidden ? HoverType.TRACK_CONFIG_SHOW_BUTTON :\n HoverType.TRACK_CONFIG_HIDE_BUTTON,\n };\n }\n if (mouseInHeaderRow && x <= headerRight) {\n return {groupIndex: groupIndex, hoverType: HoverType.INSIDE_TRACK_HEADER};\n }\n }\n // Ignore any other actions when user is customizing the tracks.\n // For example, we won't toggle the expand status in the editing mode.\n } else {\n // User is not in edit mode so they can either be in the header, or in the track.\n if (mouseInHeaderRow && x <= headerRight) {\n return {groupIndex: groupIndex, hoverType: HoverType.INSIDE_TRACK_HEADER};\n }\n return {groupIndex: groupIndex, hoverType: HoverType.INSIDE_TRACK};\n }\n }\n }\n }\n\n return {groupIndex: -1, hoverType: HoverType.OUTSIDE_TRACKS};\n }\n\n #enterEditMode(): void {\n const div = document.createElement('div');\n div.classList.add('flame-chart-edit-confirm');\n const button = new Buttons.Button.Button();\n button.data = {\n variant: Buttons.Button.Variant.PRIMARY,\n jslogContext: 'track-configuration-exit',\n };\n button.innerText = i18nString(UIStrings.exitTrackConfigurationMode);\n div.appendChild(button);\n button.addEventListener('click', () => {\n this.#exitEditMode();\n });\n\n this.viewportElement.appendChild(div);\n this.#inTrackConfigEditMode = true;\n this.updateLevelPositions();\n this.draw();\n }\n\n #removeEditModeButton(): void {\n const confirmButton = this.viewportElement.querySelector('.flame-chart-edit-confirm');\n if (confirmButton) {\n this.viewportElement.removeChild(confirmButton);\n }\n }\n\n #exitEditMode(): void {\n this.#removeEditModeButton();\n this.#inTrackConfigEditMode = false;\n this.updateLevelPositions();\n this.draw();\n }\n\n private markerIndexBeforeTime(time: number): number {\n const timelineData = this.timelineData();\n if (!timelineData) {\n throw new Error('No timeline data');\n }\n\n const markers = timelineData.markers;\n if (!markers) {\n throw new Error('No timeline markers');\n }\n\n return Platform.ArrayUtilities.lowerBound(\n timelineData.markers, time, (markerTimestamp, marker) => markerTimestamp - marker.startTime());\n }\n\n /**\n * Draw the whole flame chart.\n * Make sure |setWindowTimes| is called with correct time range before this function.\n */\n private draw(): void {\n const timelineData = this.timelineData();\n if (!timelineData) {\n return;\n }\n this.resetCanvas();\n\n this.dispatchEventToListeners(Events.LatestDrawDimensions, {\n chart: {\n widthPixels: this.offsetWidth,\n heightPixels: this.offsetHeight,\n scrollOffsetPixels: this.chartViewport.scrollOffset(),\n // If there are no groups because we have no timeline data, we treat\n // that as all being collapsed.\n allGroupsCollapsed: this.rawTimelineData?.groups.every(g => !g.expanded) ?? true,\n },\n traceWindow: TraceEngine.Helpers.Timing.traceWindowFromMilliSeconds(\n this.minimumBoundary(),\n this.maximumBoundary(),\n ),\n });\n const canvasWidth = this.offsetWidth;\n const canvasHeight = this.offsetHeight;\n const context = (this.canvas.getContext('2d') as CanvasRenderingContext2D);\n\n context.save();\n const ratio = window.devicePixelRatio;\n const top = this.chartViewport.scrollOffset();\n context.scale(ratio, ratio);\n // Clear the canvas area by drawing a white square first\n context.fillStyle = 'rgba(0, 0, 0, 0)';\n context.fillRect(0, 0, canvasWidth, canvasHeight);\n context.translate(0, -top);\n context.font = this.#font;\n\n const {markerIndices, colorBuckets, titleIndices} = this.getDrawableData(context, timelineData);\n\n context.save();\n this.forEachGroupInViewport((offset, index, group, isFirst, groupHeight) => {\n if (this.isGroupFocused(index)) {\n context.fillStyle =\n ThemeSupport.ThemeSupport.instance().getComputedValue('--selected-group-background', this.contentElement);\n context.fillRect(0, offset, canvasWidth, groupHeight - group.style.padding);\n }\n });\n context.restore();\n\n const groups = this.rawTimelineData?.groups || [];\n const trackIndex = groups.findIndex(g => g.name.includes('Main'));\n const group = groups.at(trackIndex);\n const startLevel = group?.startLevel;\n const endLevel = groups.at(trackIndex + 1)?.startLevel;\n const entryIndexIsInTrack = (index: number): boolean => {\n if (trackIndex < 0 || startLevel === undefined || endLevel === undefined) {\n return false;\n }\n const barWidth = Math.min(this.#eventBarWidth(timelineData, index), canvasWidth);\n return timelineData.entryLevels[index] >= startLevel && timelineData.entryLevels[index] < endLevel &&\n barWidth > 10;\n };\n let wideEntryExists: boolean = false;\n for (const [color, {indexes}] of colorBuckets) {\n if (!wideEntryExists) {\n wideEntryExists = indexes.some(entryIndexIsInTrack);\n }\n this.#drawGenericEvents(context, timelineData, color, indexes);\n }\n this.dispatchEventToListeners(Events.ChartPlayableStateChange, wideEntryExists);\n\n const allIndexes = Array.from(colorBuckets.values()).map(x => x.indexes).flat();\n this.#drawDecorations(context, timelineData, allIndexes);\n\n this.drawMarkers(context, timelineData, markerIndices);\n\n this.drawEventTitles(context, timelineData, titleIndices, canvasWidth);\n context.restore();\n\n this.drawGroupHeaders(canvasWidth, canvasHeight);\n this.drawFlowEvents(context, timelineData);\n this.drawMarkerLines();\n const dividersData = TimelineGrid.calculateGridOffsets(this);\n const navStartTimes = this.dataProvider.mainFrameNavigationStartEvents?.() || [];\n\n let navStartTimeIndex = 0;\n const drawAdjustedTime = (time: number): string => {\n if (navStartTimes.length === 0) {\n return this.formatValue(time, dividersData.precision);\n }\n\n // Track when the time crosses the boundary to the next nav start record,\n // and when it does, move the nav start array index accordingly.\n const hasNextNavStartTime = navStartTimes.length > navStartTimeIndex + 1;\n if (hasNextNavStartTime) {\n const nextNavStartTime = navStartTimes[navStartTimeIndex + 1];\n const nextNavStartTimeStartTimestamp =\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(nextNavStartTime.ts);\n if (time > nextNavStartTimeStartTimestamp) {\n navStartTimeIndex++;\n }\n }\n\n // Adjust the time by the nearest nav start marker's value.\n const nearestMarker = navStartTimes[navStartTimeIndex];\n if (nearestMarker) {\n const nearestMarkerStartTime = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(nearestMarker.ts);\n time -= nearestMarkerStartTime - this.zeroTime();\n }\n\n return this.formatValue(time, dividersData.precision);\n };\n\n TimelineGrid.drawCanvasGrid(context, dividersData);\n if (this.rulerEnabled) {\n TimelineGrid.drawCanvasHeaders(context, dividersData, drawAdjustedTime, 3, RulerHeight);\n }\n\n this.updateElementPosition(this.highlightElement, this.highlightedEntryIndex);\n this.updateElementPosition(this.selectedElement, this.selectedEntryIndex);\n\n if (this.#searchResultEntryIndex !== -1) {\n this.showPopoverForSearchResult(this.#searchResultEntryIndex);\n }\n for (const element of this.#searchResultHighlightElements) {\n this.updateElementPosition(element, Number(element.id));\n }\n this.updateMarkerHighlight();\n }\n\n /**\n * Draws generic flame chart events, that is, the plain rectangles that fill several parts\n * in the timeline like the Main Thread flamechart and the timings track.\n * Drawn on a color by color basis to minimize the amount of times context.style is switched.\n */\n #drawGenericEvents(\n context: CanvasRenderingContext2D, timelineData: FlameChartTimelineData, color: string, indexes: number[]): void {\n context.save();\n context.beginPath();\n for (let i = 0; i < indexes.length; ++i) {\n const entryIndex = indexes[i];\n this.#drawEventRect(context, timelineData, entryIndex);\n }\n context.fillStyle = color;\n context.fill();\n context.restore();\n }\n\n /**\n * Draws decorations onto events. {@see FlameChartDecoration}.\n */\n #drawDecorations(context: CanvasRenderingContext2D, timelineData: FlameChartTimelineData, indexes: number[]): void {\n const {entryTotalTimes, entryStartTimes, entryLevels} = timelineData;\n context.save();\n for (let i = 0; i < indexes.length; ++i) {\n const entryIndex = indexes[i];\n const decorationsForEvent = timelineData.entryDecorations.at(entryIndex);\n if (!decorationsForEvent || decorationsForEvent.length < 1) {\n continue;\n }\n if (decorationsForEvent.length > 1) {\n sortDecorationsForRenderingOrder(decorationsForEvent);\n }\n const entryStartTime = entryStartTimes[entryIndex];\n const duration = entryTotalTimes[entryIndex];\n const barX = this.timeToPositionClipped(entryStartTime);\n const barLevel = entryLevels[entryIndex];\n const barHeight = this.#eventBarHeight(timelineData, entryIndex);\n const barY = this.levelToOffset(barLevel);\n let barWidth = this.#eventBarWidth(timelineData, entryIndex);\n\n for (const decoration of decorationsForEvent) {\n switch (decoration.type) {\n case FlameChartDecorationType.CANDY: {\n const candyStripeStartTime = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(decoration.startAtTime);\n if (duration < candyStripeStartTime) {\n // If the duration of the event is less than the start time to draw the candy stripes, then we have no stripes to draw.\n continue;\n }\n if (!this.candyStripePattern) {\n this.candyStripePattern = this.createCandyStripePattern();\n }\n\n context.save();\n context.beginPath();\n // Draw a rectangle over the event, starting at the X value of the\n // event's start time + the startDuration of the candy striping.\n const barXStart = this.timeToPositionClipped(entryStartTime + candyStripeStartTime);\n\n // If a custom end time was passed in, that is when we stop striping, else we stripe until the very end of the entry.\n const stripingEndTime = decoration.endAtTime ?\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(decoration.endAtTime) :\n entryStartTime + duration;\n const barXEnd = this.timeToPositionClipped(stripingEndTime);\n this.#drawEventRect(context, timelineData, entryIndex, {\n startX: barXStart,\n width: barXEnd - barXStart,\n });\n context.fillStyle = this.candyStripePattern;\n context.fill();\n context.restore();\n break;\n }\n case FlameChartDecorationType.WARNING_TRIANGLE: {\n if (typeof decoration.customEndTime !== 'undefined') {\n // The user can pass a customEndTime to tell us where the event's box ends and therefore where we should draw the triangle. So therefore we calculate the width by taking the end time off the start time.\n const endTimeMilli = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(decoration.customEndTime);\n const endTimePixels = this.timeToPositionClipped(endTimeMilli);\n barWidth = endTimePixels - barX;\n }\n const triangleSize = 8;\n context.save();\n context.beginPath();\n context.rect(barX, barY, barWidth, barHeight);\n context.clip();\n context.beginPath();\n context.fillStyle = 'red';\n context.moveTo(barX + barWidth - triangleSize, barY);\n context.lineTo(barX + barWidth, barY);\n context.lineTo(barX + barWidth, barY + triangleSize);\n context.fill();\n context.restore();\n break;\n }\n case FlameChartDecorationType.HIDDEN_DESCENDANTS_ARROW: {\n context.save();\n context.beginPath();\n context.rect(barX, barY, barWidth, barHeight);\n const arrowSize = barHeight;\n // If the bar is wider than double the arrow button, draw the button. Otherwise, draw a corner triangle to indicate some entries are hidden\n if (barWidth > arrowSize * 2) {\n const triangleSize = 7;\n const triangleHorizontalPadding = 5;\n const triangleVerrticalPadding = 6;\n context.clip();\n context.beginPath();\n context.fillStyle = '#474747';\n const arrowAX = barX + barWidth - triangleSize - triangleHorizontalPadding;\n const arrowAY = barY + triangleVerrticalPadding;\n context.moveTo(arrowAX, arrowAY);\n const arrowBX = barX + barWidth - triangleHorizontalPadding;\n const arrowBY = barY + triangleVerrticalPadding;\n context.lineTo(arrowBX, arrowBY);\n const arrowCX = barX + barWidth - triangleHorizontalPadding - triangleSize / 2;\n const arrowCY = barY + barHeight - triangleVerrticalPadding;\n context.lineTo(arrowCX, arrowCY);\n } else {\n const triangleSize = 8;\n context.clip();\n context.beginPath();\n context.fillStyle = '#474747';\n context.moveTo(barX + barWidth - triangleSize, barY + barHeight);\n context.lineTo(barX + barWidth, barY + barHeight);\n context.lineTo(barX + barWidth, barY + triangleSize);\n }\n context.fill();\n context.restore();\n break;\n }\n }\n }\n }\n context.restore();\n }\n\n /**\n * Draws (but does not fill) a rectangle for a given event onto the provided\n * context. Because sometimes we need to draw a portion of the rect, it\n * optionally allows the start X and width of the rect to be overriden by\n * custom pixel values. It currently does not allow the start Y and height to\n * be changed because we have no need to do so, but this can be extended in\n * the future if required.\n **/\n #drawEventRect(\n context: CanvasRenderingContext2D, timelineData: FlameChartTimelineData, entryIndex: number, overrides?: {\n startX?: number,\n width?: number,\n }): void {\n const {entryTotalTimes, entryStartTimes, entryLevels} = timelineData;\n const duration = entryTotalTimes[entryIndex];\n if (isNaN(duration)) {\n return;\n }\n const entryStartTime = entryStartTimes[entryIndex];\n const barX = overrides?.startX ?? this.timeToPositionClipped(entryStartTime);\n const barLevel = entryLevels[entryIndex];\n const barHeight = this.#eventBarHeight(timelineData, entryIndex);\n const barY = this.levelToOffset(barLevel);\n const barWidth = overrides?.width ?? this.#eventBarWidth(timelineData, entryIndex);\n if (barWidth === 0) {\n return;\n }\n // We purposefully leave a 1px gap off the height so there is a small gap\n // visually between events vertically in the panel.\n // Similarly, we leave 0.5 pixels off the width so that there is a small\n // gap between events. Otherwise if a trace has a lot of events it looks\n // like one solid block and is not very easy to distinguish when events\n // start and end.\n context.rect(barX, barY, barWidth - 0.5, barHeight - 1);\n }\n\n #eventBarHeight(timelineData: FlameChartTimelineData, entryIndex: number): number {\n const {entryLevels} = timelineData;\n const barLevel = entryLevels[entryIndex];\n const barHeight = this.levelHeight(barLevel);\n return barHeight;\n }\n\n entryWidth(entryIndex: number): number {\n const timelineData = this.timelineData();\n if (!timelineData) {\n return 0;\n }\n return this.#eventBarWidth(timelineData, entryIndex);\n }\n\n #eventBarWidth(timelineData: FlameChartTimelineData, entryIndex: number): number {\n const {entryTotalTimes, entryStartTimes} = timelineData;\n const duration = entryTotalTimes[entryIndex];\n const entryStartTime = entryStartTimes[entryIndex];\n const barXStart = this.timeToPositionClipped(entryStartTime);\n const barXEnd = this.timeToPositionClipped(entryStartTime + duration);\n // Ensure that the width of the bar is at least one pixel.\n const barWidth = Math.max(barXEnd - barXStart, 1);\n return barWidth;\n }\n\n /**\n * Preprocess the data to be drawn to speed the rendering time.\n * Especifically:\n * - Groups events into color buckets.\n * - Discards non visible events.\n * - Gathers marker events (LCP, FCP, DCL, etc.).\n * - Gathers event titles that should be rendered.\n */\n private getDrawableData(context: CanvasRenderingContext2D, timelineData: FlameChartTimelineData):\n {colorBuckets: Map<string, {indexes: number[]}>, titleIndices: number[], markerIndices: number[]} {\n // These are the event indexes of events that we are drawing onto the timeline that:\n // 1) have text within them\n // 2) are visually wide enough in pixels to make it worth rendering the text.\n const titleIndices: number[] = [];\n\n // These point to events that represent single points in the timeline, most\n // often an event such as DCL/LCP.\n const markerIndices: number[] = [];\n const {entryTotalTimes, entryStartTimes} = timelineData;\n\n const top = this.chartViewport.scrollOffset();\n\n const textPadding = this.textPadding;\n // How wide in pixels / long in duration an event needs to be to make it\n // worthwhile rendering the text inside it.\n const minTextWidth = 2 * textPadding + UI.UIUtils.measureTextWidth(context, '…');\n const minTextWidthDuration = this.chartViewport.pixelToTimeOffset(minTextWidth);\n\n // As we parse each event, we bucket them into groups based on the color we\n // will render them with. The key of this map will be a color, and all\n // events stored in the `indexes` array for that color will be painted as\n // such. This way, when rendering events, we can render them based on\n // color, and ensure the minimum amount of changes to context.fillStyle.\n const colorBuckets = new Map<string, {indexes: number[]}>();\n for (let level = 0; level < this.dataProvider.maxStackDepth(); ++level) {\n // Since tracks can be reordered the |visibleLevelOffsets| is not necessarily sorted, so we need to check all levels.\n // Note that to check if a level is off the top of the screen, we can't\n // just check its offset, because then the level will disappear the\n // moment it is 1px off the top of the screen. So instead we check that\n // the entire height of the level is off the top of the screen before\n // skipping it.\n if (this.levelToOffset(level) + this.levelHeight(level) < top ||\n this.levelToOffset(level) > top + this.offsetHeight) {\n continue;\n }\n if (!this.visibleLevels || !this.visibleLevels[level]) {\n continue;\n }\n if (!this.timelineLevels) {\n break;\n }\n\n // Entries are ordered by start time within a level, so find the last visible entry.\n const levelIndexes = this.timelineLevels[level];\n const rightIndexOnLevel = Platform.ArrayUtilities.lowerBound(\n levelIndexes, this.chartViewport.windowRightTime(),\n (time, entryIndex) => time - entryStartTimes[entryIndex]) -\n 1;\n let lastDrawOffset = Infinity;\n for (let entryIndexOnLevel = rightIndexOnLevel; entryIndexOnLevel >= 0; --entryIndexOnLevel) {\n const entryIndex = levelIndexes[entryIndexOnLevel];\n const duration = entryTotalTimes[entryIndex];\n // Markers are single events in time (e.g. LCP): they do not have a duration.\n if (isNaN(duration)) {\n markerIndices.push(entryIndex);\n continue;\n }\n\n if (duration >= minTextWidthDuration || (this.forceDecorationCache && this.forceDecorationCache[entryIndex])) {\n // If the event is big enough visually to have its text rendered,\n // or if it's in the array of event indexes that we forcibly render (as defined by the data provider)\n // then we store its index. Later on, we'll loop through all\n // `titleIndices` to render the text for each event.\n titleIndices.push(entryIndex);\n }\n\n const entryStartTime = entryStartTimes[entryIndex];\n const entryOffsetRight = entryStartTime + duration;\n if (entryOffsetRight <= this.chartViewport.windowLeftTime()) {\n break;\n }\n\n const barX = this.timeToPositionClipped(entryStartTime);\n // Check if the entry entirely fits into an already drawn pixel, we can just skip drawing it.\n if (barX >= lastDrawOffset) {\n continue;\n }\n lastDrawOffset = barX;\n\n if (this.entryColorsCache) {\n const color = this.entryColorsCache[entryIndex];\n let bucket = colorBuckets.get(color);\n if (!bucket) {\n bucket = {indexes: []};\n colorBuckets.set(color, bucket);\n }\n bucket.indexes.push(entryIndex);\n }\n }\n }\n return {colorBuckets, titleIndices, markerIndices};\n }\n\n /**\n * The function to draw the group headers. It will draw the title by default.\n * And when a group is hovered, it will add a edit button.\n * And will draw the move up/down, hide and save button if user enter the editing mode.\n * @param width\n * @param height\n * @param hoveredGroupIndex This is used to show the edit icon for hovered group. If it is undefined or -1, it means\n * there is no group being hovered.\n */\n private drawGroupHeaders(width: number, height: number): void {\n const context = (this.canvas.getContext('2d') as CanvasRenderingContext2D);\n const top = this.chartViewport.scrollOffset();\n const ratio = window.devicePixelRatio;\n if (!this.rawTimelineData) {\n return;\n }\n\n const groups = this.rawTimelineData.groups || [];\n if (!groups.length) {\n return;\n }\n\n const groupOffsets = this.groupOffsets;\n if (groupOffsets === null || groupOffsets === undefined) {\n return;\n }\n const lastGroupOffset = groupOffsets[groupOffsets.length - 1];\n\n context.save();\n context.scale(ratio, ratio);\n context.translate(0, -top);\n context.font = this.#font;\n\n context.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container');\n // Fill the gap between groups.\n this.forEachGroupInViewport((offset, index, group) => {\n const paddingHeight = group.style.padding;\n if (paddingHeight < 5) {\n return;\n }\n context.fillRect(0, offset - paddingHeight + 2, width, paddingHeight - 4);\n });\n // Fill the gap between last group and the bottom of canvas view.\n if (groups.length && lastGroupOffset < top + height) {\n context.fillRect(0, lastGroupOffset + 2, width, top + height - lastGroupOffset);\n }\n\n // The separating line between top level groups.\n context.strokeStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-neutral-container');\n context.beginPath();\n this.forEachGroupInViewport((offset, index, group, isFirst) => {\n if (isFirst || group.style.padding < 4) {\n return;\n }\n hLine(offset - 2.5);\n });\n hLine(lastGroupOffset + 1.5);\n context.stroke();\n\n this.forEachGroupInViewport((offset, index, group) => {\n if (group.style.useFirstLineForOverview) {\n return;\n }\n if (!this.isGroupCollapsible(index) || group.expanded) {\n if (!group.style.shareHeaderLine && this.isGroupFocused(index)) {\n context.fillStyle = group.style.backgroundColor;\n context.fillRect(0, offset, width, group.style.height);\n }\n return;\n }\n let nextGroup = index + 1;\n while (nextGroup < groups.length && groups[nextGroup].style.nestingLevel > group.style.nestingLevel) {\n nextGroup++;\n }\n const endLevel = nextGroup < groups.length ? groups[nextGroup].startLevel : this.dataProvider.maxStackDepth();\n this.drawCollapsedOverviewForGroup(group, offset, endLevel);\n });\n\n context.save();\n // If there is only one track, we won't allow the track reordering or hiding.\n const trackConfigurationAllowed = groups.length > 1;\n\n // When it is normal mode, there are no icons to the left of a track.\n // When it is in edit mode, there are three icons to customize the groups.\n const iconsWidth = this.#inTrackConfigEditMode ? EDIT_MODE_TOTAL_ICON_WIDTH : 0;\n this.forEachGroupInViewport((offset, index, group) => {\n context.font = this.#font;\n if (this.isGroupCollapsible(index) && !group.expanded || group.style.shareHeaderLine) {\n // In edit mode, we draw an extra rectangle for the save icon.\n const labelBackgroundWidth = this.labelWidthForGroup(context, group);\n if (this.isGroupFocused(index)) {\n context.fillStyle =\n ThemeSupport.ThemeSupport.instance().getComputedValue('--selected-group-background', this.contentElement);\n } else {\n const parsedColor = Common.Color.parse(group.style.backgroundColor);\n if (parsedColor) {\n context.fillStyle = (parsedColor.setAlpha(0.8).asString() as string);\n }\n }\n context.fillRect(\n iconsWidth + HEADER_LEFT_PADDING, offset + HEADER_LABEL_Y_PADDING, labelBackgroundWidth,\n group.style.height - 2 * HEADER_LABEL_Y_PADDING);\n }\n context.fillStyle = (this.#inTrackConfigEditMode && group.hidden) ?\n ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-token-subtle', this.contentElement) :\n group.style.color;\n\n // The arrow is drawn from the center, so the indent is in fact the center of the arrow. See `drawExpansionArrow`\n // function to understand how we draw the arrow.\n // So the header looks like this:\n // |ICON_WIDTH|expansionArrowIndent * (nesting level + 1)|\n // |headerLeftPadding|EDIT ICON| |Arrow|LabelXPadding|Title|LabelXPadding|\n // ^ titleStart\n const titleStart = iconsWidth + EXPANSION_ARROW_INDENT * (group.style.nestingLevel + 1) + ARROW_SIDE / 2 +\n HEADER_LABEL_X_PADDING;\n context.fillText(group.name, titleStart, offset + group.style.height - this.textBaseline);\n if (this.#inTrackConfigEditMode && group.hidden) {\n // Draw a strikethrough line for the hidden tracks.\n context.fillRect(\n titleStart, offset + group.style.height / 2, UI.UIUtils.measureTextWidth(context, group.name), 1);\n }\n\n // The icon and track title will look like this\n // Normal mode:\n // Track title\n // Edit mode:\n // [ Up ][Down][Hide]Track title\n if (trackConfigurationAllowed) {\n if (this.#inTrackConfigEditMode) {\n const iconColor = group.hidden ? '--sys-color-token-subtle' : '--sys-color-on-surface';\n // We only allow to reorder the top level groups.\n if (group.style.nestingLevel === 0) {\n drawIcon(UP_ICON_LEFT, offset, moveUpIconPath, iconColor);\n drawIcon(DOWN_ICON_LEFT, offset, moveDownIconPath, iconColor);\n }\n // If this is the last visible top-level group, we will disable the hide action.\n drawIcon(\n HIDE_ICON_LEFT, offset, group.hidden ? showIconPath : hideIconPath,\n this.groupIsLastVisibleTopLevel(group) ? '--sys-color-state-disabled' : iconColor);\n }\n }\n });\n context.restore();\n\n context.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-token-subtle');\n this.forEachGroupInViewport((offset, index, group) => {\n if (this.isGroupCollapsible(index)) {\n drawExpansionArrow.call(\n this, iconsWidth + EXPANSION_ARROW_INDENT * (group.style.nestingLevel + 1),\n offset + group.style.height - this.textBaseline - ARROW_SIDE / 2,\n this.#inTrackConfigEditMode ? false : Boolean(group.expanded));\n }\n });\n\n context.strokeStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-neutral-outline');\n context.beginPath();\n context.stroke();\n\n this.forEachGroupInViewport((offset, index, group, isFirst, groupHeight) => {\n if (this.isGroupFocused(index)) {\n const lineWidth = 2;\n const bracketLength = 10;\n context.fillStyle =\n ThemeSupport.ThemeSupport.instance().getComputedValue('--selected-group-border', this.contentElement);\n // The selected group indicator will be blue and in this kind of shape. And we will draw it with three\n // rectangles.\n // +-+---+\n // |-|---+\n // | |\n // | |\n // |-|---+\n // +-+---+\n\n // The vertical stroke\n context.fillRect(0, offset - lineWidth, lineWidth, groupHeight - group.style.padding + 2 * lineWidth);\n // The top horizontal stroke\n context.fillRect(0, offset - lineWidth, bracketLength, lineWidth);\n // The top horizontal stroke\n context.fillRect(0, offset + groupHeight - group.style.padding, bracketLength, lineWidth);\n }\n });\n\n context.restore();\n\n function hLine(y: number): void {\n context.moveTo(0, y);\n context.lineTo(width, y);\n }\n\n function drawExpansionArrow(this: FlameChart, x: number, y: number, expanded: boolean): void {\n // We will draw a equilateral triangle, so first calculate the height of the triangle.\n const arrowHeight = ARROW_SIDE * Math.sqrt(3) / 2;\n const arrowCenterOffset = Math.round(arrowHeight / 2);\n context.save();\n context.beginPath();\n context.translate(x, y);\n context.rotate(expanded ? Math.PI / 2 : 0);\n // The final triangle will be this shape: (the rotation will be handled by `context.rotate`)\n // |\\\n // | \\\n // | /\n // |/\n\n // Move to the top vertex\n context.moveTo(-arrowCenterOffset, -ARROW_SIDE / 2);\n // Line to the bottom vertex\n context.lineTo(-arrowCenterOffset, ARROW_SIDE / 2);\n // Line to the right vertex\n context.lineTo(arrowHeight - arrowCenterOffset, 0);\n context.fill();\n context.restore();\n }\n\n function drawIcon(x: number, y: number, pathData: string, iconColor: string = '--sys-color-on-surface'): void {\n const p = new Path2D(pathData);\n\n context.save();\n context.translate(x, y);\n // This color is same as the background of the whole flame chart.\n context.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container');\n context.fillRect(0, 0, EDIT_ICON_WIDTH, EDIT_ICON_WIDTH);\n\n context.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue(iconColor);\n // The pathData from front_end/images folder is for a 20 pixel icon.\n // So we add a scale to draw the icon in a correct size.\n const scale = EDIT_ICON_WIDTH / 20;\n context.scale(scale, scale);\n context.fill(p);\n context.restore();\n }\n }\n\n /**\n * Draws page load events in the Timings track (LCP, FCP, DCL, etc.)\n */\n private drawMarkers(context: CanvasRenderingContext2D, timelineData: FlameChartTimelineData, markerIndices: number[]):\n void {\n const {entryStartTimes, entryLevels} = timelineData;\n this.markerPositions.clear();\n context.textBaseline = 'alphabetic';\n context.save();\n context.beginPath();\n let lastMarkerLevel = -1;\n let lastMarkerX: number = -Infinity;\n // Markers are sorted top to bottom, right to left.\n for (let m = markerIndices.length - 1; m >= 0; --m) {\n const entryIndex = markerIndices[m];\n const title = this.dataProvider.entryTitle(entryIndex);\n if (!title) {\n continue;\n }\n const entryStartTime = entryStartTimes[entryIndex];\n const level = entryLevels[entryIndex];\n if (lastMarkerLevel !== level) {\n lastMarkerX = -Infinity;\n }\n const x = Math.max(this.chartViewport.timeToPosition(entryStartTime), lastMarkerX);\n const y = this.levelToOffset(level);\n const h = this.levelHeight(level);\n const padding = 4;\n const width = Math.ceil(UI.UIUtils.measureTextWidth(context, title)) + 2 * padding;\n lastMarkerX = x + width + 1;\n lastMarkerLevel = level;\n this.markerPositions.set(entryIndex, {x, width});\n context.fillStyle = this.dataProvider.entryColor(entryIndex);\n context.fillRect(x, y, width, h - 1);\n context.fillStyle = 'white';\n context.fillText(title, x + padding, y + h - this.textBaseline);\n }\n context.strokeStyle = 'rgba(0, 0, 0, 0.2)';\n context.stroke();\n context.restore();\n }\n\n /**\n * Draws the titles of trace events in the timeline. Also calls `decorateEntry` on the data\n * provider, which can do any custom drawing on the corresponding entry's area (e.g. draw screenshots\n * in the Performance Panel timeline).\n *\n * Takes in the width of the entire canvas so that we know if an event does\n * not fit into the viewport entirely, the max width we can draw is that\n * width, not the width of the event itself.\n */\n private drawEventTitles(\n context: CanvasRenderingContext2D, timelineData: FlameChartTimelineData, titleIndices: number[],\n canvasWidth: number): void {\n const timeToPixel = this.chartViewport.timeToPixel();\n const textPadding = this.textPadding;\n context.save();\n context.beginPath();\n const {entryStartTimes, entryLevels} = timelineData;\n for (let i = 0; i < titleIndices.length; ++i) {\n const entryIndex = titleIndices[i];\n const entryStartTime = entryStartTimes[entryIndex];\n const barX = this.timeToPositionClipped(entryStartTime);\n // Ensure that the title does not go off screen, if the width of the\n // event is wider than the width of the canvas, use the canvas width as\n // our maximum width.\n const barWidth = Math.min(this.#eventBarWidth(timelineData, entryIndex), canvasWidth);\n const barLevel = entryLevels[entryIndex];\n const barY = this.levelToOffset(barLevel);\n let text = this.dataProvider.entryTitle(entryIndex);\n const barHeight = this.#eventBarHeight(timelineData, entryIndex);\n if (text && text.length) {\n context.font = this.#font;\n const hasArrowDecoration =\n this.entryHasDecoration(entryIndex, FlameChartDecorationType.HIDDEN_DESCENDANTS_ARROW);\n // Set the max width to be the width of the bar plus some padding. If the bar has an arrow decoration and the bar is wide enough for the larger\n // version of the decoration that is a square button, also substract the width of the decoration.\n // Because the decoration is square, it's width is equal to this.barHeight\n const maxBarWidth = (hasArrowDecoration && barWidth > barHeight * 2) ? barWidth - textPadding - this.barHeight :\n barWidth - 2 * textPadding;\n text = UI.UIUtils.trimTextMiddle(\n context,\n text,\n maxBarWidth,\n );\n }\n const unclippedBarX = this.chartViewport.timeToPosition(entryStartTime);\n if (this.dataProvider.decorateEntry(\n entryIndex, context, text, barX, barY, barWidth, barHeight, unclippedBarX, timeToPixel)) {\n continue;\n }\n if (!text || !text.length) {\n continue;\n }\n context.fillStyle = this.dataProvider.textColor(entryIndex);\n context.fillText(text, barX + textPadding, barY + barHeight - this.textBaseline);\n }\n\n context.restore();\n }\n\n /**\n * @callback GroupCallback\n * @param groupTop pixels between group top and the top of the flame chart.\n * @param groupIndex\n * @param group\n * @param isFirstGroup if the group is the first one of this nesting level.\n * @param height pixels of height of this group\n */\n /**\n * Process the pixels of start and end, and other data of each group, which are used in drawing the group.\n * @param {GroupCallback} callback\n */\n private forEachGroup(\n callback: (groupTop: number, groupIndex: number, group: Group, isFirstGroup: boolean, height: number) => void):\n void {\n if (!this.rawTimelineData) {\n return;\n }\n const groups = this.rawTimelineData.groups || [];\n if (!groups.length) {\n return;\n }\n const groupOffsets = this.groupOffsets;\n if (!groupOffsets) {\n return;\n }\n\n const groupStack: {\n nestingLevel: number,\n visible: boolean,\n }[] = [{nestingLevel: -1, visible: true}];\n for (let i = 0; i < groups.length; ++i) {\n const groupTop = groupOffsets[i];\n const group = groups[i];\n let firstGroup = true;\n let last: {\n nestingLevel: number,\n visible: boolean,\n } = groupStack[groupStack.length - 1];\n while (last && last.nestingLevel >= group.style.nestingLevel) {\n groupStack.pop();\n firstGroup = false;\n last = groupStack[groupStack.length - 1];\n }\n last = groupStack[groupStack.length - 1];\n const parentGroupVisible = last ? last.visible : false;\n const thisGroupVisible = !group.hidden && parentGroupVisible && (!this.isGroupCollapsible(i) || group.expanded);\n groupStack.push({nestingLevel: group.style.nestingLevel, visible: Boolean(thisGroupVisible)});\n\n if (!this.#groupTreeRoot) {\n return;\n }\n const sortedGroupIndexes: number[] = [];\n\n function traverse(root: GroupTreeNode): void {\n sortedGroupIndexes.push(root.index);\n for (const child of root.children) {\n traverse(child);\n }\n }\n traverse(this.#groupTreeRoot);\n // Skip the one whose index is -1, because we added to represent the top\n // level to be the parent of all groups.\n sortedGroupIndexes.shift();\n\n // This shouldn't happen, because the tree should have the fake root and all groups. Add a sanity check to avoid\n // error.\n if (sortedGroupIndexes.length !== groups.length) {\n console.warn('The data from the group tree doesn\\'t match the data from DataProvider.');\n return;\n }\n\n // Add an extra index, which is equal to the length of the |groups|, this\n // will be used for the coordinates after the last group.\n // If the coordinates after the last group, it will return in later check\n // `groupIndex >= groups.length` anyway. But add one more element to make\n // this array same length as the |groupOffsets|.\n sortedGroupIndexes.push(groups.length);\n\n const currentIndex = sortedGroupIndexes.indexOf(i);\n const nextOffset = groupOffsets[sortedGroupIndexes[currentIndex + 1]];\n // In edit mode all the groups are visible.\n if (!this.#inTrackConfigEditMode && (!parentGroupVisible || group.hidden)) {\n continue;\n }\n callback(groupTop, i, group, firstGroup, nextOffset - groupTop);\n }\n }\n\n private forEachGroupInViewport(\n callback: (offset: number, index: number, group: Group, isFirst: boolean, groupHeight: number) => void): void {\n const top = this.chartViewport.scrollOffset();\n this.forEachGroup((groupTop, index, group, firstGroup, height) => {\n if (groupTop - group.style.padding > top + this.offsetHeight) {\n return;\n }\n if (groupTop + height < top) {\n return;\n }\n callback(groupTop, index, group, firstGroup, height);\n });\n }\n\n /**\n * Returns the width of the title label of the group, which include the left padding, arrow and the group header text.\n * This function is public for test reason.\n * |ICON_WIDTH|expansionArrowIndent * (nestingLevel + 1)|\n * |headerLeftPadding|EDIT ICON| |Arrow|LabelXPadding|Title|LabelXPadding|\n * |<-- labelWidth -->|\n * @param context canvas context\n * @param group\n * @returns the width of the label of the group.\n */\n labelWidthForGroup(context: CanvasRenderingContext2D, group: Group): number {\n return EXPANSION_ARROW_INDENT * (group.style.nestingLevel + 1) + ARROW_SIDE / 2 + HEADER_LABEL_X_PADDING +\n UI.UIUtils.measureTextWidth(context, group.name) + HEADER_LABEL_X_PADDING - HEADER_LEFT_PADDING;\n }\n\n private drawCollapsedOverviewForGroup(group: Group, y: number, endLevel: number): void {\n const range = new Common.SegmentedRange.SegmentedRange<string>(mergeCallback);\n const timeWindowLeft = this.chartViewport.windowLeftTime();\n const timeWindowRight = this.chartViewport.windowRightTime();\n const context = (this.canvas.getContext('2d') as CanvasRenderingContext2D);\n const groupBarHeight = group.style.height;\n if (!this.rawTimelineData) {\n return;\n }\n const entryStartTimes = this.rawTimelineData.entryStartTimes;\n const entryTotalTimes = this.rawTimelineData.entryTotalTimes;\n const timeToPixel = this.chartViewport.timeToPixel();\n\n for (let level = group.startLevel; level < endLevel; ++level) {\n const levelIndexes: number[] = this.timelineLevels ? this.timelineLevels[level] : [];\n const rightIndexOnLevel =\n Platform.ArrayUtilities.lowerBound(\n levelIndexes, timeWindowRight, (time, entryIndex) => time - entryStartTimes[entryIndex]) -\n 1;\n let lastDrawOffset: number = Infinity;\n\n for (let entryIndexOnLevel = rightIndexOnLevel; entryIndexOnLevel >= 0; --entryIndexOnLevel) {\n const entryIndex = levelIndexes[entryIndexOnLevel];\n const entryStartTime = entryStartTimes[entryIndex];\n const barX = this.timeToPositionClipped(entryStartTime);\n const entryEndTime = entryStartTime + entryTotalTimes[entryIndex];\n if (isNaN(entryEndTime) || barX >= lastDrawOffset) {\n continue;\n }\n if (entryEndTime <= timeWindowLeft) {\n break;\n }\n lastDrawOffset = barX;\n const color = this.entryColorsCache ? this.entryColorsCache[entryIndex] : '';\n const endBarX = this.timeToPositionClipped(entryEndTime);\n if (group.style.useDecoratorsForOverview && this.dataProvider.forceDecoration(entryIndex)) {\n const unclippedBarX = this.chartViewport.timeToPosition(entryStartTime);\n const barWidth = this.#eventBarWidth(this.rawTimelineData, entryIndex);\n\n context.beginPath();\n context.fillStyle = color;\n context.fillRect(barX, y, barWidth, groupBarHeight - 1);\n this.dataProvider.decorateEntry(\n entryIndex, context, '', barX, y, barWidth, groupBarHeight, unclippedBarX, timeToPixel);\n continue;\n }\n range.append(new Common.SegmentedRange.Segment(barX, endBarX, color));\n }\n }\n\n const segments = range.segments().slice().sort((a, b) => a.data.localeCompare(b.data));\n let lastColor;\n context.beginPath();\n for (let i = 0; i < segments.length; ++i) {\n const segment = segments[i];\n if (lastColor !== segments[i].data) {\n context.fill();\n context.beginPath();\n lastColor = segments[i].data;\n context.fillStyle = lastColor;\n }\n context.rect(segment.begin, y, segment.end - segment.begin, groupBarHeight);\n }\n context.fill();\n\n function mergeCallback<T>(a: Common.SegmentedRange.Segment<T>, b: Common.SegmentedRange.Segment<T>):\n Common.SegmentedRange.Segment<T>|null {\n return a.data === b.data && a.end + 0.4 > b.end ? a : null;\n }\n }\n\n private drawFlowEvents(context: CanvasRenderingContext2D, timelineData: FlameChartTimelineData): void {\n const td = this.timelineData();\n if (!td) {\n return;\n }\n\n const {entryTotalTimes, entryStartTimes, entryLevels} = timelineData;\n const ratio = window.devicePixelRatio;\n const top = this.chartViewport.scrollOffset();\n const arrowLineWidth = 6;\n const arrowWidth = 3;\n\n context.save();\n context.scale(ratio, ratio);\n context.translate(0, -top);\n\n context.fillStyle = '#7f5050';\n context.strokeStyle = '#7f5050';\n\n for (let i = 0; i < td.initiatorsData.length; ++i) {\n const initiatorsData = td.initiatorsData[i];\n\n const initiatorArrowStartTime =\n entryStartTimes[initiatorsData.initiatorIndex] + entryTotalTimes[initiatorsData.initiatorIndex];\n const initiatorArrowEndTime = entryStartTimes[initiatorsData.eventIndex];\n\n // Do not draw the initiator if it is out of the viewport\n if (initiatorArrowEndTime < this.chartViewport.windowLeftTime()) {\n continue;\n }\n let startX = this.chartViewport.timeToPosition(initiatorArrowStartTime);\n let endX = this.chartViewport.timeToPosition(initiatorArrowEndTime);\n\n // Draw a circle arround 'collapsed entries' arrow to indicate that the initiated entry is hidden\n if (initiatorsData.isInitiatorHidden) {\n const {circleEndX} = this.drawCircleArroundCollapseArrow(initiatorsData.initiatorIndex, context, timelineData);\n // If the circle exists around the initiator, start the initiator arrow from the circle end\n if (circleEndX) {\n startX = circleEndX;\n }\n }\n if (initiatorsData.isEntryHidden) {\n const {circleStartX} = this.drawCircleArroundCollapseArrow(initiatorsData.eventIndex, context, timelineData);\n // If the circle exists around the initiated event, draw the initiator arrow until the circle beginning\n if (circleStartX) {\n endX = circleStartX;\n }\n }\n\n const startLevel = entryLevels[initiatorsData.initiatorIndex];\n const endLevel = entryLevels[initiatorsData.eventIndex];\n const startY = this.levelToOffset(startLevel) + this.levelHeight(startLevel) / 2;\n const endY = this.levelToOffset(endLevel) + this.levelHeight(endLevel) / 2;\n const lineLength = endX - startX;\n\n // Draw an arrow in an 'elbow connector' shape\n context.beginPath();\n context.moveTo(startX, startY);\n context.lineTo(startX + lineLength / 2, startY);\n context.lineTo(startX + lineLength / 2, endY);\n context.lineTo(endX, endY);\n context.stroke();\n\n // Make line an arrow if the line is long enough to fit the arrow head. Othewise, draw a thinner line without the arrow head.\n if (lineLength > arrowWidth) {\n context.lineWidth = 0.5;\n context.beginPath();\n context.moveTo(endX, endY);\n context.lineTo(endX - arrowLineWidth, endY - 3);\n context.lineTo(endX - arrowLineWidth, endY + 3);\n context.fill();\n } else {\n context.lineWidth = 0.2;\n }\n }\n context.restore();\n }\n\n private drawCircleArroundCollapseArrow(\n entryIndex: number, context: CanvasRenderingContext2D,\n timelineData: FlameChartTimelineData): {circleStartX?: number, circleEndX?: number} {\n const decorationsForEvent = timelineData.entryDecorations.at(entryIndex);\n // The circle is only drawn when the initiator arrow is going to/from some hidden entry. Make sure that the entry also has a decoration for hidden children.\n if (!decorationsForEvent ||\n !decorationsForEvent.find(\n decoration => decoration.type === FlameChartDecorationType.HIDDEN_DESCENDANTS_ARROW)) {\n // This should not happen, break if it does.\n return {};\n }\n\n const {entryStartTimes, entryLevels} = timelineData;\n // The large version of 'hidden entries' is displayed\n // only when the bar width is over double the height.\n // We do not want to draw the circle if the arrow is not visible.\n const barWidth = this.#eventBarWidth(timelineData, entryIndex);\n if (barWidth < this.barHeight * 2) {\n return {};\n }\n\n const entryStartTime = entryStartTimes[entryIndex];\n const barX = this.timeToPositionClipped(entryStartTime);\n const barLevel = entryLevels[entryIndex];\n const barHeight = this.#eventBarHeight(timelineData, entryIndex);\n const barY = this.levelToOffset(barLevel);\n\n context.save();\n context.beginPath();\n context.rect(barX, barY, barWidth, barHeight);\n context.clip();\n context.lineWidth = 1;\n context.beginPath();\n context.fillStyle = '#474747';\n const triangleCenterX = barX + barWidth - this.barHeight / 2;\n const triangleCenterY = barY + this.barHeight / 2;\n const circleRadius = 6;\n context.beginPath();\n context.arc(triangleCenterX, triangleCenterY, circleRadius, 0, 2 * Math.PI);\n context.stroke();\n context.restore();\n\n return {circleStartX: triangleCenterX - circleRadius, circleEndX: triangleCenterX + circleRadius};\n }\n\n /**\n * Draws the vertical dashed lines in the timeline marking where the \"Marker\" events\n * happened in time.\n */\n private drawMarkerLines(): void {\n const timelineData = this.timelineData();\n if (!timelineData) {\n return;\n }\n const markers = timelineData.markers;\n const left = this.markerIndexBeforeTime(this.minimumBoundary());\n const rightBoundary = this.maximumBoundary();\n const timeToPixel = this.chartViewport.timeToPixel();\n\n const context = (this.canvas.getContext('2d') as CanvasRenderingContext2D);\n context.save();\n const ratio = window.devicePixelRatio;\n context.scale(ratio, ratio);\n context.translate(0, 3);\n const height = RulerHeight - 1;\n for (let i = left; i < markers.length; i++) {\n const timestamp = markers[i].startTime();\n if (timestamp > rightBoundary) {\n break;\n }\n markers[i].draw(context, this.chartViewport.timeToPosition(timestamp), height, timeToPixel);\n }\n context.restore();\n }\n\n private updateMarkerHighlight(): void {\n const element = this.markerHighlighElement;\n if (element.parentElement) {\n element.remove();\n }\n const markerIndex = this.highlightedMarkerIndex;\n if (markerIndex === -1) {\n return;\n }\n const timelineData = this.timelineData();\n if (!timelineData) {\n return;\n }\n const marker = timelineData.markers[markerIndex];\n const barX = this.timeToPositionClipped(marker.startTime());\n UI.Tooltip.Tooltip.install(element, marker.title() || '');\n const style = element.style;\n style.left = barX + 'px';\n style.backgroundColor = marker.color();\n this.viewportElement.appendChild(element);\n }\n\n private processTimelineData(timelineData: FlameChartTimelineData|null): void {\n if (!timelineData) {\n this.timelineLevels = null;\n this.visibleLevelOffsets = null;\n this.visibleLevels = null;\n this.groupOffsets = null;\n this.rawTimelineData = null;\n this.forceDecorationCache = null;\n this.entryColorsCache = null;\n this.rawTimelineDataLength = 0;\n this.#groupTreeRoot = null;\n this.selectedGroupIndex = -1;\n this.keyboardFocusedGroup = -1;\n this.flameChartDelegate.updateSelectedGroup(this, null);\n return;\n }\n\n this.rawTimelineData = timelineData;\n this.rawTimelineDataLength = timelineData.entryStartTimes.length;\n this.forceDecorationCache = new Int8Array(this.rawTimelineDataLength);\n this.entryColorsCache = new Array(this.rawTimelineDataLength);\n for (let i = 0; i < this.rawTimelineDataLength; ++i) {\n this.forceDecorationCache[i] = this.dataProvider.forceDecoration(i) ? 1 : 0;\n this.entryColorsCache[i] = this.dataProvider.entryColor(i);\n }\n\n const entryCounters = new Uint32Array(this.dataProvider.maxStackDepth() + 1);\n for (let i = 0; i < timelineData.entryLevels.length; ++i) {\n ++entryCounters[timelineData.entryLevels[i]];\n }\n const levelIndexes = new Array(entryCounters.length);\n for (let i = 0; i < levelIndexes.length; ++i) {\n levelIndexes[i] = new Uint32Array(entryCounters[i]);\n entryCounters[i] = 0;\n }\n\n for (let i = 0; i < timelineData.entryLevels.length; ++i) {\n const level = timelineData.entryLevels[i];\n levelIndexes[level][entryCounters[level]++] = i;\n }\n this.timelineLevels = levelIndexes;\n const groups = this.rawTimelineData.groups || [];\n for (let i = 0; i < groups.length; ++i) {\n const expanded = this.groupExpansionState[groups[i].name];\n const hidden = this.groupHiddenState[groups[i].name];\n if (expanded !== undefined) {\n groups[i].expanded = expanded;\n }\n if (hidden !== undefined) {\n groups[i].hidden = hidden;\n }\n }\n\n if (!this.#groupTreeRoot) {\n this.#groupTreeRoot = this.buildGroupTree(groups);\n } else {\n // When the |groupTreeRoot| is already existing, and a \"new\" timeline data comes, this means the new timeline data\n // is just a modification of original, so we should update the tree instead of rebuild it.\n // For example,\n // [\n // { name: 'Test Group 0', startLevel: 0, ...},\n // { name: 'Test Group 1', startLevel: 1, ...},\n // { name: 'Test Group 2', startLevel: 2, ...},\n // ], and [\n // { name: 'Test Group 0', startLevel: 0, ...},\n // { name: 'Test Group 1', startLevel: 2, ...},\n // { name: 'Test Group 2', startLevel: 4, ...},\n // ],\n // are the same.\n // But they and [\n // { name: 'Test Group 0', startLevel: 0, ...},\n // { name: 'Test Group 2', startLevel: 1, ...},\n // { name: 'Test Group 1', startLevel: 2, ...},\n // ] are different.\n // But if the |groups| is changed (this means the group order inside the |groups| is changed), it means the\n // timeline data is a real new one, then please call |reset()| before rendering.\n this.updateGroupTree(groups, this.#groupTreeRoot);\n }\n\n this.updateLevelPositions();\n this.updateHeight();\n\n // If this is a new trace, we will call the reset()(See TimelineFlameChartView > setModel()), which will set the\n // |selectedGroupIndex| to -1.\n // So when |selectedGroupIndex| is not -1, it means it is the same trace file, but might have some modification\n // (like reorder the track, merge an entry, etc).\n if (this.selectedGroupIndex === -1) {\n this.selectedGroupIndex = timelineData.selectedGroup ? groups.indexOf(timelineData.selectedGroup) : -1;\n }\n\n this.keyboardFocusedGroup = this.selectedGroupIndex;\n this.flameChartDelegate.updateSelectedGroup(this, timelineData.selectedGroup);\n }\n\n /**\n * Builds a tree node for a group. For each group the start level is inclusive and the end level is exclusive.\n * @param group\n * @param index index of the group in the |FlameChartTimelineData.groups[]|\n * @param endLevel The end level of this group, which is also the start level of the next group or the end of all\n * groups\n * @returns the tree node for the group\n */\n #buildGroupTreeNode(group: Group, index: number, endLevel: number): GroupTreeNode {\n return {\n index,\n nestingLevel: group.style.nestingLevel,\n startLevel: group.startLevel,\n endLevel,\n children: [],\n };\n }\n\n /**\n * Builds a tree for the given group array, the tree will be builded based on the nesting level.\n * We will add one fake root to represent the top level parent, and the for each tree node, its children means the\n * group nested in. The order of the children matters because it represent the order of groups.\n * So for example if there are Group 0-7, Group 0, 3, 4 have nestingLevel 0, Group 1, 2, 5, 6, 7 have nestingLevel 1.\n * Then we will get a tree like this.\n * -1(fake root to represent the top level parent)\n * / | \\\n * / | \\\n * 0 3 4\n * / \\ / | \\\n * 1 2 5 6 7\n * This function is public for test purpose.\n * @param groups the array of all groups, it should be the one from FlameChartTimelineData\n * @returns the root of the Group tree. The root is the fake one we added, which represent the parent for all groups\n */\n buildGroupTree(groups: Group[]): GroupTreeNode {\n // Add an extra top level. This will be used as a parent for all groups, and\n // will be used to contain the levels that not belong to any group.\n const treeRoot: GroupTreeNode = {\n index: -1,\n nestingLevel: -1,\n startLevel: 0,\n // If there is no |groups| (for example the JS Profiler), it means all the\n // levels belong to the top level, so just use the max level as the end.\n endLevel: groups.length ? groups[0].startLevel : this.dataProvider.maxStackDepth(),\n children: [],\n };\n const groupStack: GroupTreeNode[] = [treeRoot];\n for (let i = 0; i < groups.length; i++) {\n const group = groups[i];\n const currentGroupNestingLevel = group.style.nestingLevel;\n let parentGroup: GroupTreeNode = groupStack[groupStack.length - 1];\n while (parentGroup && parentGroup.nestingLevel >= currentGroupNestingLevel) {\n groupStack.pop();\n parentGroup = groupStack[groupStack.length - 1];\n }\n\n const nextGroup = groups[i + 1];\n // If this group is the last one, it means all the remaining levels belong\n // to this level, so just use the max level as the end.\n const endLevel = nextGroup?.startLevel ?? this.dataProvider.maxStackDepth();\n const currentGroupNode = this.#buildGroupTreeNode(group, i, endLevel);\n parentGroup.children.push(currentGroupNode);\n groupStack.push(currentGroupNode);\n }\n return treeRoot;\n }\n\n /**\n * Updates the tree for the given group array.\n * For a new timeline data, if the groups remains the same (the same here mean the group order inside the |groups|,\n * the start level, style and other attribute can be changed), but other parts are different.\n * For example the |entryLevels[]| or |maxStackDepth| is changed, then we should update the group tree instead of\n * re-build it.\n * So we can keep the order that user manually set.\n * To do this, we go through the tree, and update the start and end level of each group.\n * This function is public for test purpose.\n * @param groups the array of all groups, it should be the one from FlameChartTimelineData\n * @returns the root of the Group tree. The root is the fake one we added, which represent the parent for all groups\n */\n updateGroupTree(groups: Group[], root: GroupTreeNode): void {\n const maxStackDepth = this.dataProvider.maxStackDepth();\n\n function traverse(treeNode: GroupTreeNode): void {\n const index = treeNode.index;\n if (index < 0) {\n // For the extra top level. This will be used as a parent for all\n // groups, so it will start from level 0.\n treeNode.startLevel = 0;\n // If there is no |groups| (for example the JS Profiler), it means all the\n // levels belong to the top level, so just use the max level as the end.\n treeNode.endLevel = groups.length ? groups[0].startLevel : maxStackDepth;\n } else {\n // This shouldn't happen. If this happen, it means the |groups| from data provider is changed. Add a sanity\n // check to avoid error.\n if (!groups[index]) {\n console.warn(\n 'The |groups| is changed. ' +\n 'Please make sure the flamechart is reset after data change in the data provider');\n return;\n }\n treeNode.startLevel = groups[index].startLevel;\n const nextGroup = groups[index + 1];\n // If this group is the last one, it means all the remaining levels belong\n // to this level, so just use the max level as the end.\n treeNode.endLevel = nextGroup?.startLevel ?? maxStackDepth;\n }\n for (const child of treeNode.children) {\n traverse(child);\n }\n }\n traverse(root);\n }\n\n /**\n * Given a tree, do a preorder traversal, and process the group and the levels in this group.\n * So for a tree like this:\n * -1\n * / | \\\n * / | \\\n * 0 3 4\n * / \\ / | \\\n * 1 2 5 6 7\n * The traverse order will be: -1, 0, 1, 2, 3, 4, 5, 6, 7.\n * @param groupNode TreeNode for current group\n * @param currentOffset\n * @param parentGroupIsVisible used to determine if current group's header and its levels are visible\n * @returns the offset (in pixels) after processing current group\n */\n #traverseGroupTreeAndUpdateLevelPositionsForTheGroup(\n groupNode: GroupTreeNode, currentOffset: number, parentGroupIsVisible: boolean): number {\n if (!this.visibleLevels || !this.visibleLevelOffsets || !this.visibleLevelHeights || !this.groupOffsets) {\n return currentOffset;\n }\n\n const groups = this.rawTimelineData?.groups;\n if (!groups) {\n return currentOffset;\n }\n\n // This shouldn't happen. If this happen, it means the group tree is outdated. Add a sanity check to avoid error.\n if (groupNode.index >= groups.length) {\n console.warn(\n 'The data from the group tree is outdated. ' +\n 'Please make sure the flamechart is reset after data change in the data provider');\n return currentOffset;\n }\n\n if (groupNode.index >= 0) {\n this.groupOffsets[groupNode.index] = currentOffset;\n // If |shareHeaderLine| is false, we add the height of one more level to\n // the current offset, which will be used for the start level of current\n // group.\n // For edit mode, we will show all the groups whose name are not empty.\n if ((this.#inTrackConfigEditMode && groups[groupNode.index].name) ||\n (!groups[groupNode.index].hidden && parentGroupIsVisible && !groups[groupNode.index].style.shareHeaderLine)) {\n currentOffset += groups[groupNode.index].style.height;\n }\n }\n\n // If this is the top level, it is always shown.\n // Otherwise, if the parent group is visible and current group is not hidden, and this group is expanded, then this\n // group is visible.\n let thisGroupIsVisible = false;\n if (groupNode.index < 0) {\n thisGroupIsVisible = true;\n } else {\n const thisGroupIsExpanded = !(this.isGroupCollapsible(groupNode.index) && !groups[groupNode.index].expanded);\n thisGroupIsVisible = !groups[groupNode.index].hidden && thisGroupIsExpanded;\n }\n const thisGroupLevelsAreVisible = thisGroupIsVisible && parentGroupIsVisible;\n\n for (let level = groupNode.startLevel; level < groupNode.endLevel; level++) {\n // This shouldn't happen. If this happen, it means the group tree is outdated. Add a sanity check to avoid error.\n if (level >= this.dataProvider.maxStackDepth()) {\n console.warn(\n 'The data from the group tree is outdated. ' +\n 'Please make sure the flamechart is reset after data change in the data provider');\n return currentOffset;\n }\n\n // Handle offset and visibility of each level inside this group.\n const isFirstOnLevel = level === groupNode.startLevel;\n // If this is the top level group, all the levels in this group are always shown.\n // Otherwise it depends on the visibility of parent group and this group.\n let thisLevelIsVisible;\n if (groupNode.index < 0) {\n thisLevelIsVisible = true;\n } else {\n const isFirstLevelAndForOverview = isFirstOnLevel && groups[groupNode.index].style.useFirstLineForOverview;\n thisLevelIsVisible = !groups[groupNode.index].hidden &&\n (parentGroupIsVisible && (thisGroupLevelsAreVisible || isFirstLevelAndForOverview));\n }\n\n let height;\n if (groups[groupNode.index]) {\n // |shareHeaderLine| is false means the first level of this group is on the next level of the header.\n const isFirstLevelAndNotShareHeaderLine = isFirstOnLevel && !groups[groupNode.index].style.shareHeaderLine;\n // A group is collapsed means only ite header is visible.\n const thisGroupIsCollapsed = this.isGroupCollapsible(groupNode.index) && !groups[groupNode.index].expanded;\n\n if (isFirstLevelAndNotShareHeaderLine || thisGroupIsCollapsed) {\n // This means this level is only the header, so we use the height of the header for this level.\n height = groups[groupNode.index].style.height;\n } else {\n height = groups[groupNode.index].style.itemsHeight ?? this.barHeight;\n }\n } else {\n height = this.barHeight;\n }\n\n // If it's in edit mode, all the levels are hidden.\n this.visibleLevels[level] = this.#inTrackConfigEditMode ? false : Boolean(thisLevelIsVisible);\n this.visibleLevelOffsets[level] = currentOffset;\n this.visibleLevelHeights[level] = this.#inTrackConfigEditMode ? 0 : height;\n\n // If this level not belong to any group, it is always shown, otherwise we need to check if it is visible.\n if (groupNode.index < 0 ||\n (!groups[groupNode.index].hidden) &&\n (thisLevelIsVisible ||\n (parentGroupIsVisible && groups[groupNode.index].style.shareHeaderLine && isFirstOnLevel))) {\n currentOffset += this.visibleLevelHeights[level];\n }\n }\n\n if (groupNode.children.length === 0) {\n return currentOffset;\n }\n\n for (const child of groupNode.children) {\n // If the child is not the first child, we will add a padding top.\n // For edit mode, we will show all the groups whose name are not empty.\n if ((this.#inTrackConfigEditMode && groups[child.index].name) ||\n (thisGroupLevelsAreVisible && !groups[child.index]?.hidden && child !== groupNode.children[0])) {\n currentOffset += (groups[child.index].style.padding ?? 0);\n }\n currentOffset =\n this.#traverseGroupTreeAndUpdateLevelPositionsForTheGroup(child, currentOffset, thisGroupLevelsAreVisible);\n }\n return currentOffset;\n }\n\n private updateLevelPositions(): void {\n if (!this.#groupTreeRoot) {\n console.warn('Please make sure the new timeline data is processed before update the level positions.');\n return;\n }\n const levelCount = this.dataProvider.maxStackDepth();\n const groups = this.rawTimelineData?.groups || [];\n // Add an extra number in visibleLevelOffsets to store the end of last level\n this.visibleLevelOffsets = new Uint32Array(levelCount + 1);\n this.visibleLevelHeights = new Uint32Array(levelCount);\n this.visibleLevels = new Array(levelCount);\n // Add an extra number in groupOffsets to store the end of last group\n this.groupOffsets = new Uint32Array(groups.length + 1);\n let currentOffset = this.rulerEnabled ? RulerHeight + 2 : 2;\n // The root is always visible, so just simply set the |parentGroupIsVisible| to visible.\n currentOffset = this.#traverseGroupTreeAndUpdateLevelPositionsForTheGroup(\n this.#groupTreeRoot, currentOffset, /* parentGroupIsVisible= */ true);\n\n // Set the final offset to the last element of |groupOffsets| and\n // |visibleLevelOffsets|. This number represent the end of last group and\n // level.\n this.groupOffsets[groups.length] = currentOffset;\n this.visibleLevelOffsets[levelCount] = currentOffset;\n }\n\n private isGroupCollapsible(index: number): boolean|undefined {\n if (!this.rawTimelineData || index < 0) {\n return;\n }\n\n const groups = this.rawTimelineData.groups || [];\n const style = groups[index].style;\n if (!style.shareHeaderLine || !style.collapsible) {\n return Boolean(style.collapsible);\n }\n const isLastGroup = index + 1 >= groups.length;\n if (!isLastGroup && groups[index + 1].style.nestingLevel > style.nestingLevel) {\n return true;\n }\n const nextGroupLevel = isLastGroup ? this.dataProvider.maxStackDepth() : groups[index + 1].startLevel;\n if (nextGroupLevel !== groups[index].startLevel + 1) {\n return true;\n }\n // For groups that only have one line and share header line, pretend these are not collapsible\n // unless the itemsHeight does not match the headerHeight\n return style.height !== style.itemsHeight;\n }\n\n groupIsLastVisibleTopLevel(group?: Group): boolean {\n if (!group) {\n return true;\n }\n const visibleTopLevelGroupNumber =\n this.#groupTreeRoot?.children.filter(track => !this.rawTimelineData?.groups[track.index].hidden).length;\n return visibleTopLevelGroupNumber === 1 && group.style.nestingLevel === 0 && !group.hidden;\n }\n\n setSelectedEntry(entryIndex: number): void {\n // Check if the button that resets children of the entry is clicked. We need to check it even if the entry\n // clicked is not selected to avoid needing to double click\n if (this.isMouseOverRevealChildrenArrow(this.lastMouseOffsetX, entryIndex)) {\n this.modifyTree(TraceEngine.EntriesFilter.FilterAction.RESET_CHILDREN, entryIndex);\n }\n if (this.selectedEntryIndex === entryIndex) {\n return;\n }\n if (entryIndex !== -1) {\n this.chartViewport.hideRangeSelection();\n }\n this.selectedEntryIndex = entryIndex;\n this.revealEntry(entryIndex);\n this.updateElementPosition(this.selectedElement, this.selectedEntryIndex);\n this.update();\n }\n\n private entryHasDecoration(entryIndex: number, decorationType: FlameChartDecorationType): boolean {\n const timelineData = this.timelineData();\n if (!timelineData) {\n return false;\n }\n\n const decorationsForEvent = timelineData.entryDecorations.at(entryIndex);\n if (decorationsForEvent && decorationsForEvent.length >= 1) {\n return decorationsForEvent.some(decoration => decoration.type === decorationType);\n }\n\n return false;\n }\n\n getMarkerPixelsForEntryIndex(entryIndex: number): {x: number, width: number}|null {\n return this.markerPositions.get(entryIndex) ?? null;\n }\n\n /**\n * Update position of an Element. By default, the element is treated as a full entry and it's dimentions are set to the full entry width/length/height.\n * If isDecoration parameter is set to true, the element will be positioned on the right side of the entry and have a square shape where width == height of the entry.\n */\n private updateElementPosition(element: Element|null, entryIndex: number, isDecoration?: boolean): void {\n if (!element) {\n return;\n }\n const elementMinWidthPx = 2;\n element.classList.add('hidden');\n if (entryIndex === -1) {\n return;\n }\n const timelineData = this.timelineData();\n if (!timelineData) {\n return;\n }\n\n const startTime = timelineData.entryStartTimes[entryIndex];\n const duration = timelineData.entryTotalTimes[entryIndex];\n let barX = 0;\n let barWidth = 0;\n let visible = true;\n if (Number.isNaN(duration)) {\n const position = this.markerPositions.get(entryIndex);\n if (position) {\n barX = position.x;\n barWidth = position.width;\n } else {\n visible = false;\n }\n } else {\n barX = this.chartViewport.timeToPosition(startTime);\n barWidth = duration * this.chartViewport.timeToPixel();\n }\n if (barX + barWidth <= 0 || barX >= this.offsetWidth) {\n return;\n }\n const barCenter = barX + barWidth / 2;\n barWidth = Math.max(barWidth, elementMinWidthPx);\n barX = barCenter - barWidth / 2;\n const entryLevel = timelineData.entryLevels[entryIndex];\n const barY = this.levelToOffset(entryLevel) - this.chartViewport.scrollOffset();\n const barHeight = this.levelHeight(entryLevel);\n const style = (element as HTMLElement).style;\n\n if (isDecoration) {\n style.top = barY + 'px';\n style.width = barHeight + 'px';\n style.height = barHeight + 'px';\n style.left = barX + barWidth - barHeight + 'px';\n } else {\n style.top = barY + 'px';\n style.width = barWidth + 'px';\n style.height = barHeight - 1 + 'px';\n style.left = barX + 'px';\n }\n element.classList.toggle('hidden', !visible);\n this.viewportElement.appendChild(element);\n }\n\n // Updates the highlight of an Arrow button that is shown on an entry if it has hidden child entries\n private updateHiddenChildrenArrowHighlighPosition(entryIndex: number): void {\n this.revealDescendantsArrowHighlightElement.classList.add('hidden');\n /**\n * No need to update the hidden descendants arrow highlight if\n * 1. No entry is highlighted\n * 2. Mouse is not hovering over the arrow button\n */\n if (entryIndex === -1 || !this.isMouseOverRevealChildrenArrow(this.lastMouseOffsetX, entryIndex)) {\n return;\n }\n this.updateElementPosition(this.revealDescendantsArrowHighlightElement, entryIndex, true);\n }\n\n private timeToPositionClipped(time: number): number {\n return Platform.NumberUtilities.clamp(this.chartViewport.timeToPosition(time), 0, this.offsetWidth);\n }\n\n /**\n * Returns the amount of pixels a group is vertically offset in the flame chart.\n * Now this function is only used for tests.\n */\n groupIndexToOffsetForTest(groupIndex: number): number {\n if (!this.groupOffsets) {\n throw new Error('No visible group offsets');\n }\n return this.groupOffsets[groupIndex];\n }\n\n /**\n * Set the edit mode.\n * Now this function is only used for tests.\n */\n setEditModeForTest(editMode: boolean): void {\n this.#inTrackConfigEditMode = editMode;\n }\n\n /**\n * Returns the visibility of a level in the.\n * flame chart.\n */\n levelIsVisible(level: number): boolean {\n if (!this.visibleLevels) {\n throw new Error('No level visiblibities');\n }\n return this.visibleLevels[level];\n }\n\n /**\n * Returns the amount of pixels a level is vertically offset in the.\n * flame chart.\n */\n levelToOffset(level: number): number {\n if (!this.visibleLevelOffsets) {\n throw new Error('No visible level offsets');\n }\n return this.visibleLevelOffsets[level];\n }\n\n levelHeight(level: number): number {\n if (!this.visibleLevelHeights) {\n throw new Error('No visible level heights');\n }\n return this.visibleLevelHeights[level];\n }\n\n private updateBoundaries(): void {\n this.totalTime = this.dataProvider.totalTime();\n this.minimumBoundaryInternal = this.dataProvider.minimumBoundary();\n this.chartViewport.setBoundaries(this.minimumBoundaryInternal, this.totalTime);\n }\n\n private updateHeight(): void {\n const height = this.levelToOffset(this.dataProvider.maxStackDepth()) + 2;\n this.chartViewport.setContentHeight(height);\n }\n\n override onResize(): void {\n // Clear the rect cache because we have been resized.\n this.#canvasBoundingClientRect = null;\n this.scheduleUpdate();\n }\n\n update(): void {\n if (!this.timelineData()) {\n return;\n }\n this.updateHeight();\n this.updateBoundaries();\n this.draw();\n if (!this.chartViewport.isDragging()) {\n this.updateHighlight();\n }\n }\n\n // Reset the whole flame chart.\n // It will reset the viewport, which will reset the scrollTop and scrollLeft. So should be careful when call this\n // function. But when the data is \"real\" changed, especially when groups[] is changed, make sure call this before\n // re-rendering.\n // This will also clear all the selected entry, group, etc.\n // Remember to call |setWindowTimes| before draw the flame chart again.\n reset(): void {\n if (this.#inTrackConfigEditMode) {\n this.#removeEditModeButton();\n this.#inTrackConfigEditMode = false;\n }\n\n this.chartViewport.reset();\n this.rawTimelineData = null;\n this.rawTimelineDataLength = 0;\n this.#groupTreeRoot = null;\n this.highlightedMarkerIndex = -1;\n this.highlightedEntryIndex = -1;\n this.selectedEntryIndex = -1;\n this.selectedGroupIndex = -1;\n }\n\n scheduleUpdate(): void {\n this.chartViewport.scheduleUpdate();\n }\n\n private enabled(): boolean {\n return this.rawTimelineDataLength !== 0;\n }\n\n computePosition(time: number): number {\n return this.chartViewport.timeToPosition(time);\n }\n\n formatValue(value: number, precision?: number): string {\n return this.dataProvider.formatValue(value - this.zeroTime(), precision);\n }\n\n maximumBoundary(): TraceEngine.Types.Timing.MilliSeconds {\n return TraceEngine.Types.Timing.MilliSeconds(this.chartViewport.windowRightTime());\n }\n\n minimumBoundary(): TraceEngine.Types.Timing.MilliSeconds {\n return TraceEngine.Types.Timing.MilliSeconds(this.chartViewport.windowLeftTime());\n }\n\n zeroTime(): TraceEngine.Types.Timing.MilliSeconds {\n return TraceEngine.Types.Timing.MilliSeconds(this.dataProvider.minimumBoundary());\n }\n\n boundarySpan(): TraceEngine.Types.Timing.MilliSeconds {\n return TraceEngine.Types.Timing.MilliSeconds(this.maximumBoundary() - this.minimumBoundary());\n }\n}\n\nexport const RulerHeight = 15;\nexport const MinimalTimeWindowMs = 0.5;\n\n/**\n * initiatorIndex is the index of the initiator entry and\n * eventIndex is the entry initiated by it.\n * However, if isEntryHidden or isInitiatorHidden are set to true,\n * it means that the actual initiator or initiated entry is hidden\n * by some context menu action and the indexes in initiatorIndex\n * or/and eventIndex are for the entries that are the closest\n * modified by an actions ancestors to them.\n */\nexport interface FlameChartInitiatorData {\n initiatorIndex: number;\n eventIndex: number;\n isEntryHidden?: boolean;\n isInitiatorHidden?: boolean;\n}\n\nexport const enum FlameChartDecorationType {\n CANDY = 'CANDY',\n WARNING_TRIANGLE = 'WARNING_TRIANGLE',\n HIDDEN_DESCENDANTS_ARROW = 'HIDDEN_DESCENDANTS_ARROW',\n}\n\n/**\n * Represents a decoration that can be added to event. Each event can have as\n * many decorations as required.\n *\n * It is anticipated in the future that we will add to this as we want to\n * annotate events in more ways.\n *\n * This work is being tracked in crbug.com/1434297.\n **/\nexport type FlameChartDecoration = {\n type: FlameChartDecorationType.CANDY,\n // We often only want to highlight problem parts of events, so this time sets\n // the minimum time at which the candystriping will start. If you want to\n // candystripe the entire event, set this to 0.\n startAtTime: TraceEngine.Types.Timing.MicroSeconds,\n // Optionally set the end time for the striping. If this is not provided, the entire entry will be striped.\n endAtTime?: TraceEngine.Types.Timing.MicroSeconds,\n}|{\n type: FlameChartDecorationType.WARNING_TRIANGLE,\n customEndTime?: TraceEngine.Types.Timing.MicroSeconds,\n}|{\n type: FlameChartDecorationType.HIDDEN_DESCENDANTS_ARROW,\n};\n\n// We have to ensure we draw the decorations in a particular order; warning\n// triangles always go on top of any candy stripes.\nconst decorationDrawOrder: Record<FlameChartDecorationType, number> = {\n CANDY: 1,\n WARNING_TRIANGLE: 2,\n HIDDEN_DESCENDANTS_ARROW: 3,\n};\n\nexport function sortDecorationsForRenderingOrder(decorations: FlameChartDecoration[]): void {\n decorations.sort((decoration1, decoration2) => {\n return decorationDrawOrder[decoration1.type] - decorationDrawOrder[decoration2.type];\n });\n}\n\nexport class FlameChartTimelineData {\n entryLevels: number[]|Uint16Array;\n entryTotalTimes: number[]|Float32Array;\n entryStartTimes: number[]|Float64Array;\n /**\n * An array of entry decorations, where each item in the array is an array of\n * decorations for the event at that index.\n **/\n entryDecorations: FlameChartDecoration[][];\n groups: Group[];\n markers: FlameChartMarker[];\n\n // These four arrays are used to draw the initiator arrows, and if there are\n // multiple arrows, they should be a chain.\n initiatorsData: FlameChartInitiatorData[];\n\n selectedGroup: Group|null;\n private constructor(\n entryLevels: number[]|Uint16Array, entryTotalTimes: number[]|Float32Array, entryStartTimes: number[]|Float64Array,\n groups: Group[]|null, entryDecorations: FlameChartDecoration[][] = [],\n initiatorsData: FlameChartInitiatorData[] = []) {\n this.entryLevels = entryLevels;\n this.entryTotalTimes = entryTotalTimes;\n this.entryStartTimes = entryStartTimes;\n this.entryDecorations = entryDecorations;\n this.groups = groups || [];\n this.markers = [];\n this.initiatorsData = initiatorsData || [];\n this.selectedGroup = null;\n }\n\n // TODO(crbug.com/1501055) Thinking about refactor this class, so we can avoid create a new object when modifying the\n // flame chart.\n static create(data: {\n entryLevels: FlameChartTimelineData['entryLevels'],\n entryTotalTimes: FlameChartTimelineData['entryTotalTimes'],\n entryStartTimes: FlameChartTimelineData['entryStartTimes'],\n groups: FlameChartTimelineData['groups']|null,\n entryDecorations?: FlameChartDecoration[][],\n initiatorsData?: FlameChartTimelineData['initiatorsData'],\n }): FlameChartTimelineData {\n return new FlameChartTimelineData(\n data.entryLevels, data.entryTotalTimes, data.entryStartTimes, data.groups, data.entryDecorations || [],\n data.initiatorsData || []);\n }\n\n // TODO(crbug.com/1501055) Thinking about refactor this class, so we can avoid create a new object when modifying the\n // flame chart.\n static createEmpty(): FlameChartTimelineData {\n return new FlameChartTimelineData(\n [], // entry levels: what level on the timeline is an event on,\n [], // entry total times: the total duration of an event,\n [], // entry start times: the start time of a given event,\n [], // groups: a list of flame chart groups, which roughly correlate to each individual track\n );\n }\n\n resetFlowData(): void {\n this.initiatorsData = [];\n }\n}\n\nexport interface FlameChartDataProvider {\n buildFlowForInitiator?(index: number): unknown;\n\n minimumBoundary(): number;\n\n totalTime(): number;\n\n formatValue(value: number, precision?: number): string;\n\n maxStackDepth(): number;\n\n timelineData(rebuild?: boolean): FlameChartTimelineData|null;\n\n prepareHighlightedEntryInfo(entryIndex: number): Element|null;\n\n prepareHighlightedHiddenEntriesArrowInfo?(entryIndex: number): Element|null;\n\n canJumpToEntry(entryIndex: number): boolean;\n\n entryTitle(entryIndex: number): string|null;\n\n entryFont(entryIndex: number): string|null;\n\n entryColor(entryIndex: number): string;\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\n forceDecoration(entryIndex: number): boolean;\n\n textColor(entryIndex: number): string;\n\n mainFrameNavigationStartEvents?(): readonly TraceEngine.Types.TraceEvents.TraceEventNavigationStart[];\n\n modifyTree?(node: number, action: TraceEngine.EntriesFilter.FilterAction): void;\n\n findPossibleContextMenuActions?(node: number): TraceEngine.EntriesFilter.PossibleFilterActions|void;\n\n hasTrackConfigurationMode(): boolean;\n\n eventByIndex?(entryIndex: number): TraceEngine.Types.TraceEvents.TraceEventData\n |TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame|null;\n\n indexForEvent?(event: TraceEngine.Types.TraceEvents.TraceEventData|\n TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame): number|null;\n}\n\nexport interface FlameChartMarker {\n startTime(): number;\n color(): string;\n title(): string|null;\n draw(context: CanvasRenderingContext2D, x: number, height: number, pixelsPerMillisecond: number): void;\n}\n\nexport const enum Events {\n /**\n * Emitted when the <canvas> element of the FlameChart is focused by the user.\n **/\n CanvasFocused = 'CanvasFocused',\n /**\n * Emitted when an event is selected by either mouse click, or hitting\n * <enter> on the keyboard - e.g. the same actions that would invoke a\n * <button> element.\n *\n * Will be emitted with a number which is the index of the entry that has\n * been selected, or -1 if no entry is selected (e.g the user has clicked\n * away from any events)\n */\n EntryInvoked = 'EntryInvoked',\n /**\n * Emitted when an event is selected via keyboard navigation using the arrow\n * keys.\n *\n * Will be emitted with a number which is the index of the entry that has\n * been selected, or -1 if no entry is selected.\n */\n EntrySelected = 'EntrySelected',\n /**\n * Emitted when an event is hovered over with the mouse.\n *\n * Will be emitted with a number which is the index of the entry that has\n * been hovered on, or -1 if no entry is selected (the user has moved their\n * mouse off the event)\n */\n EntryHighlighted = 'EntryHighlighted',\n ChartPlayableStateChange = 'ChartPlayableStateChange',\n\n LatestDrawDimensions = 'LatestDrawDimensions',\n}\n\nexport type EventTypes = {\n [Events.CanvasFocused]: number|void,\n [Events.EntryInvoked]: number,\n [Events.EntrySelected]: number,\n [Events.EntryHighlighted]: number,\n [Events.ChartPlayableStateChange]: boolean,\n [Events.LatestDrawDimensions]: {\n chart: {\n widthPixels: number,\n heightPixels: number,\n scrollOffsetPixels: number,\n allGroupsCollapsed: boolean,\n },\n traceWindow: TraceEngine.Types.Timing.TraceWindowMicroSeconds,\n },\n};\n\nexport interface Group {\n name: Common.UIString.LocalizedString;\n startLevel: number;\n expanded?: boolean;\n hidden?: boolean;\n selectable?: boolean;\n style: GroupStyle;\n /** Should be turned on if the track supports user editable stacks. */\n showStackContextMenu?: boolean;\n}\n\nexport interface GroupStyle {\n height: number;\n padding: number;\n /* Can it be collapsed? True by default! */\n collapsible: boolean;\n /** The color of the group title text. */\n color: string;\n /** The background color of the group title when the track is collapsed,\n * and this is usually around same length as the title text. */\n backgroundColor: string;\n nestingLevel: number;\n itemsHeight?: number;\n /** Allow entries to be placed on the same horizontal level as the text heading. True by default for Timeline */\n // TODO(paulirish): Attempt to remove with this behavior always true\n shareHeaderLine?: boolean;\n useFirstLineForOverview?: boolean;\n useDecoratorsForOverview?: boolean;\n}\n"]} \ No newline at end of file +{"version":3,"file":"FlameChart.js","sourceRoot":"","sources":["../../../../../../../../front_end/ui/legacy/components/perf_ui/FlameChart.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,mCAAmC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,+BAA+B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,+BAA+B,CAAC;AACtD,OAAO,KAAK,QAAQ,MAAM,uCAAuC,CAAC;AAClE,OAAO,KAAK,QAAQ,MAAM,yCAAyC,CAAC;AACpE,OAAO,KAAK,WAAW,MAAM,mCAAmC,CAAC;AACjE,OAAO,KAAK,OAAO,MAAM,wCAAwC,CAAC;AAElE,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,KAAK,YAAY,MAAM,sCAAsC,CAAC;AAErE,OAAO,EAAC,aAAa,EAA6B,MAAM,oBAAoB,CAAC;AAC7E,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAC,iBAAiB,EAAE,sBAAsB,EAAC,MAAM,WAAW,CAAC;AACpE,OAAO,EAAkB,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAEhE,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,UAAU,EAAE,aAAa;IACzB;;;OAGG;IACH,QAAQ,EAAE,eAAe;IACzB;;;OAGG;IACH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\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 TraceEngine from '../../../../models/trace/trace.js';\nimport * as Buttons from '../../../components/buttons/buttons.js';\nimport type * as VisualLogging from '../../../visual_logging/visual_logging.js';\nimport * as UI from '../../legacy.js';\nimport * as ThemeSupport from '../../theme_support/theme_support.js';\n\nimport {ChartViewport, type ChartViewportDelegate} from './ChartViewport.js';\nimport flameChartStyles from './flameChart.css.legacy.js';\nimport {DEFAULT_FONT_SIZE, getFontFamilyForCanvas} from './Font.js';\nimport {type Calculator, TimelineGrid} from './TimelineGrid.js';\n\nconst UIStrings = {\n /**\n *@description Aria accessible name in Flame Chart of the Performance panel\n */\n flameChart: 'Flame Chart',\n /**\n *@description Text for the screen reader to announce a hovered group\n *@example {Network} PH1\n */\n sHovered: '{PH1} hovered',\n /**\n *@description Text for screen reader to announce a selected group.\n *@example {Network} PH1\n */\n sSelected: '{PH1} selected',\n /**\n *@description Text for screen reader to announce an expanded group\n *@example {Network} PH1\n */\n sExpanded: '{PH1} expanded',\n /**\n *@description Text for screen reader to announce a collapsed group\n *@example {Network} PH1\n */\n sCollapsed: '{PH1} collapsed',\n /**\n *@description Text for Hiding a function from the Flame Chart\n */\n hideFunction: 'Hide function',\n /**\n *@description Text for Hiding all children of a function from the Flame Chart\n */\n hideChildren: 'Hide children',\n /**\n *@description Text for Hiding all repeating child entries of a function from the Flame Chart\n */\n hideRepeatingChildren: 'Hide repeating children',\n /**\n *@description Text for remove script from ignore list from the Flame Chart\n */\n removeScriptFromIgnoreList: 'Remove script from ignore list',\n /**\n *@description Text for add script to ignore list from the Flame Chart\n */\n addScriptToIgnoreList: 'Add script to ignore list',\n /**\n *@description Text for an action that shows all of the hidden children of an entry\n */\n resetChildren: 'Reset children',\n /**\n *@description Text for an action that shows all of the hidden entries of the Flame Chart\n */\n resetTrace: 'Reset trace',\n\n /**\n *@description Shown in the context menu when right clicking on a track header to enable the user to enter the track configuration mode.\n */\n enterTrackConfigurationMode: 'Configure tracks…',\n /**\n *@description Shown in the context menu when right clicking on a track header to allow the user to exit track configuration mode.\n */\n exitTrackConfigurationMode: 'Finish configuring tracks',\n};\nconst str_ = i18n.i18n.registerUIStrings('ui/legacy/components/perf_ui/FlameChart.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\n/**\n * The expansion arrow is drawn from the center, so the indent is in fact the center of the arrow.\n * See `drawExpansionArrow` function to understand how we draw the arrow.\n * |headerLeftPadding|Arrow|\n * |expansionArrowIndent|\n *\n * When we are in edit mode, we render 3 icons to the left of the track's title.\n * When we are in normal mode, there are no icons to the left of the track's title.\n **/\n\n// Placed to the left of the track header.\nconst HEADER_LEFT_PADDING = 6;\nconst ARROW_SIDE = 8;\n\nconst EXPANSION_ARROW_INDENT = HEADER_LEFT_PADDING + ARROW_SIDE / 2;\nconst HEADER_LABEL_X_PADDING = 3;\nconst HEADER_LABEL_Y_PADDING = 2;\n\n// The width of each of the edit mode icons.\nconst EDIT_ICON_WIDTH = 16;\n// This gap might seem quite small - but the icons themselves have some\n// whitespace either side, so we don't need a huge gap.\nconst GAP_BETWEEN_EDIT_ICONS = 3;\n// The UP icon is first, and is rendered in from the left just as the track text.\nconst UP_ICON_LEFT = HEADER_LEFT_PADDING;\n// The DOWN icon is after the UP icon, hence we take the up icon's position,\n// add its width and then the gap between them.\nconst DOWN_ICON_LEFT = UP_ICON_LEFT + EDIT_ICON_WIDTH + GAP_BETWEEN_EDIT_ICONS;\n// The HIDE icon is after the DOWN icon, hence we take the up icon's position,\n// add its width and then the gap between them.\nconst HIDE_ICON_LEFT = DOWN_ICON_LEFT + EDIT_ICON_WIDTH + GAP_BETWEEN_EDIT_ICONS;\n\n// Represents the total width taken by the 3 icons (up, down, hide/show, and\n// the gap between them.)\n// We calculate this by taking the space to the left of the hide icon (which\n// encompasses UP/DOWN icons), adding on the width of the HIDE icon, and then a\n// bit of extra padding.\nconst EDIT_MODE_TOTAL_ICON_WIDTH = HIDE_ICON_LEFT + EDIT_ICON_WIDTH + GAP_BETWEEN_EDIT_ICONS;\n\n// These are copied from front_end/images/*.svg, because we need to draw them with canvas.\n// arrow-up.svg\nconst moveUpIconPath = 'M9.25 17V5.875L7.062 8.062L6 7L10 3L14 7L12.938 8.062L10.75 5.875V17H9.25Z';\n// arrow-down.svg\nconst moveDownIconPath = 'M9.25 3V14.125L7.062 11.938L6 13L10 17L14 13L12.938 11.938L10.75 14.125V3H9.25Z';\n// eye-crossed.svg\nconst hideIconPath =\n 'M13.2708 11.1459L11.9792 9.85419C12.0347 9.32641 11.875 8.87155 11.5 8.4896C11.125 8.10766 10.6736 7.94446 10.1458 8.00002L8.85417 6.70835C9.03472 6.63891 9.22222 6.58683 9.41667 6.5521C9.61111 6.51738 9.80556 6.50002 10 6.50002C10.9722 6.50002 11.7986 6.8403 12.4792 7.52085C13.1597 8.20141 13.5 9.0278 13.5 10C13.5 10.1945 13.4826 10.3889 13.4479 10.5834C13.4132 10.7778 13.3542 10.9653 13.2708 11.1459ZM16.0417 13.9167L14.9583 12.8334C15.4583 12.4445 15.9132 12.0174 16.3229 11.5521C16.7326 11.0868 17.0764 10.5695 17.3542 10C16.6736 8.59724 15.6701 7.49655 14.3438 6.69794C13.0174 5.89933 11.5694 5.50002 10 5.50002C9.63889 5.50002 9.28472 5.52085 8.9375 5.56252C8.59028 5.60419 8.25 5.67363 7.91667 5.77085L6.70833 4.56252C7.23611 4.35419 7.77431 4.20835 8.32292 4.12502C8.87153 4.04169 9.43056 4.00002 10 4.00002C11.9861 4.00002 13.8021 4.53821 15.4479 5.6146C17.0938 6.69099 18.2778 8.1528 19 10C18.6944 10.7917 18.2882 11.5104 17.7813 12.1563C17.2743 12.8021 16.6944 13.3889 16.0417 13.9167ZM16 18.125L13.2917 15.4167C12.7639 15.6111 12.2257 15.757 11.6771 15.8542C11.1285 15.9514 10.5694 16 10 16C8.01389 16 6.19792 15.4618 4.55208 14.3854C2.90625 13.309 1.72222 11.8472 1 10C1.30556 9.20835 1.70833 8.48613 2.20833 7.83335C2.70833 7.18058 3.29167 6.5903 3.95833 6.06252L1.875 3.97919L2.9375 2.91669L17.0625 17.0625L16 18.125ZM5.02083 7.14585C4.53472 7.53474 4.08333 7.96183 3.66667 8.4271C3.25 8.89238 2.90972 9.41669 2.64583 10C3.32639 11.4028 4.32986 12.5035 5.65625 13.3021C6.98264 14.1007 8.43056 14.5 10 14.5C10.3611 14.5 10.7153 14.4757 11.0625 14.4271C11.4097 14.3785 11.7569 14.3125 12.1042 14.2292L11.1667 13.2917C10.9722 13.3611 10.7778 13.4132 10.5833 13.4479C10.3889 13.4827 10.1944 13.5 10 13.5C9.02778 13.5 8.20139 13.1597 7.52083 12.4792C6.84028 11.7986 6.5 10.9722 6.5 10C6.5 9.80558 6.52431 9.61113 6.57292 9.41669C6.62153 9.22224 6.66667 9.0278 6.70833 8.83335L5.02083 7.14585Z';\n// eye.svg\nconst showIconPath =\n 'M10 13.5C10.972 13.5 11.7983 13.1597 12.479 12.479C13.1597 11.7983 13.5 10.972 13.5 10C13.5 9.028 13.1597 8.20167 12.479 7.521C11.7983 6.84033 10.972 6.5 10 6.5C9.028 6.5 8.20167 6.84033 7.521 7.521C6.84033 8.20167 6.5 9.028 6.5 10C6.5 10.972 6.84033 11.7983 7.521 12.479C8.20167 13.1597 9.028 13.5 10 13.5ZM10 12C9.44467 12 8.97233 11.8057 8.583 11.417C8.19433 11.0277 8 10.5553 8 10C8 9.44467 8.19433 8.97233 8.583 8.583C8.97233 8.19433 9.44467 8 10 8C10.5553 8 11.0277 8.19433 11.417 8.583C11.8057 8.97233 12 9.44467 12 10C12 10.5553 11.8057 11.0277 11.417 11.417C11.0277 11.8057 10.5553 12 10 12ZM10 16C8.014 16 6.20833 15.455 4.583 14.365C2.95833 13.2743 1.764 11.8193 1 10C1.764 8.18067 2.95833 6.72567 4.583 5.635C6.20833 4.545 8.014 4 10 4C11.986 4 13.7917 4.545 15.417 5.635C17.0417 6.72567 18.236 8.18067 19 10C18.236 11.8193 17.0417 13.2743 15.417 14.365C13.7917 15.455 11.986 16 10 16ZM10 14.5C11.5553 14.5 12.9927 14.0973 14.312 13.292C15.632 12.486 16.646 11.3887 17.354 10C16.646 8.61133 15.632 7.514 14.312 6.708C12.9927 5.90267 11.5553 5.5 10 5.5C8.44467 5.5 7.00733 5.90267 5.688 6.708C4.368 7.514 3.354 8.61133 2.646 10C3.354 11.3887 4.368 12.486 5.688 13.292C7.00733 14.0973 8.44467 14.5 10 14.5Z';\n\n// export for test.\nexport const enum HoverType {\n TRACK_CONFIG_UP_BUTTON = 'TRACK_CONFIG_UP_BUTTON',\n TRACK_CONFIG_DOWN_BUTTON = 'TRACK_CONFIG_DOWN_BUTTON',\n TRACK_CONFIG_HIDE_BUTTON = 'TRACK_CONFIG_HIDE_BUTTON',\n TRACK_CONFIG_SHOW_BUTTON = 'TRACK_CONFIG_SHOW_BUTTON',\n INSIDE_TRACK_HEADER = 'INSIDE_TRACK_HEADER',\n INSIDE_TRACK = 'INSIDE_TRACK',\n OUTSIDE_TRACKS = 'OUTSIDE_TRACKS',\n ERROR = 'ERROR',\n}\n\nexport class FlameChartDelegate {\n windowChanged(_startTime: number, _endTime: number, _animate: boolean): void {\n }\n updateRangeSelection(_startTime: number, _endTime: number): void {\n }\n updateSelectedGroup(_flameChart: FlameChart, _group: Group|null): void {\n }\n}\n\ninterface GroupExpansionState {\n [groupName: string]: boolean;\n}\ninterface GroupHiddenState {\n [groupName: string]: boolean;\n}\n\ninterface PopoverState {\n entryIndex: number;\n hiddenEntriesPopover: boolean;\n}\ninterface GroupTreeNode {\n index: number;\n nestingLevel: number;\n startLevel: number;\n endLevel: number;\n // The order in children is the visible order of them.\n children: GroupTreeNode[];\n}\n\nexport interface OptionalFlameChartConfig {\n /**\n * The FlameChart will highlight the entry that is selected by default. In\n * some cases (Performance Panel) we manage this ourselves with the Overlays\n * system, so we disable the built in one.\n */\n selectedElementOutline?: boolean;\n groupExpansionSetting?: Common.Settings.Setting<GroupExpansionState>;\n}\nexport class FlameChart extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.VBox>(UI.Widget.VBox)\n implements Calculator, ChartViewportDelegate {\n private readonly groupExpansionSetting?: Common.Settings.Setting<GroupExpansionState>;\n private groupExpansionState: GroupExpansionState;\n private groupHiddenState: GroupHiddenState;\n private readonly flameChartDelegate: FlameChartDelegate;\n private chartViewport: ChartViewport;\n private dataProvider: FlameChartDataProvider;\n private candyStripePattern: CanvasPattern|null;\n private contextMenu?: UI.ContextMenu.ContextMenu;\n private viewportElement: HTMLElement;\n private canvas: HTMLCanvasElement;\n private popoverElement: HTMLElement;\n private readonly markerHighlighElement: HTMLElement;\n readonly highlightElement: HTMLElement;\n readonly revealDescendantsArrowHighlightElement: HTMLElement;\n private readonly selectedElement: HTMLElement|null = null;\n private rulerEnabled: boolean;\n private barHeight: number;\n // Additional space around an entry that is added for operations with entry.\n // It allows for less pecision while selecting/hovering over an entry.\n private hitMarginPx: number;\n private textBaseline: number;\n private textPadding: number;\n private highlightedMarkerIndex: number;\n /**\n * Represents the index of the entry that the user's mouse cursor is over.\n * Note that this is updated as the user moves their cursor: they do not have\n * to click for this to be updated.\n **/\n private highlightedEntryIndex: number;\n /**\n * Represents the index of the entry that is selected. For an entry to be\n * selected, it has to be clicked by the user.\n **/\n private selectedEntryIndex: number;\n private rawTimelineDataLength: number;\n private readonly markerPositions: Map<number, {\n x: number,\n width: number,\n }>;\n private lastMouseOffsetX: number;\n private selectedGroupIndex: number;\n private keyboardFocusedGroup: number;\n private offsetWidth!: number;\n private offsetHeight!: number;\n private dragStartX!: number;\n private dragStartY!: number;\n private lastMouseOffsetY!: number;\n private minimumBoundaryInternal!: number;\n private maxDragOffset!: number;\n private timelineLevels?: number[][]|null;\n private visibleLevelOffsets?: Uint32Array|null;\n private visibleLevels?: boolean[]|null;\n private visibleLevelHeights?: Uint32Array;\n private groupOffsets?: Uint32Array|null;\n private rawTimelineData?: FlameChartTimelineData|null;\n private forceDecorationCache?: Int8Array|null;\n private entryColorsCache?: string[]|null;\n private totalTime?: number;\n private lastPopoverState: PopoverState;\n #font: string;\n #groupTreeRoot?: GroupTreeNode|null;\n #searchResultEntryIndex: number;\n #searchResultHighlightElements: HTMLElement[] = [];\n #inTrackConfigEditMode: boolean = false;\n\n // Stored because we cache this value to save extra lookups and layoffs.\n #canvasBoundingClientRect: DOMRect|null = null;\n #selectedElementOutlineEnabled = true;\n\n constructor(\n dataProvider: FlameChartDataProvider, flameChartDelegate: FlameChartDelegate,\n optionalConfig: OptionalFlameChartConfig = {}) {\n super(true);\n this.#font = `${DEFAULT_FONT_SIZE} ${getFontFamilyForCanvas()}`;\n this.registerRequiredCSS(flameChartStyles);\n this.contentElement.classList.add('flame-chart-main-pane');\n if (typeof optionalConfig.selectedElementOutline === 'boolean') {\n this.#selectedElementOutlineEnabled = optionalConfig.selectedElementOutline;\n }\n\n this.groupExpansionSetting = optionalConfig.groupExpansionSetting;\n this.groupExpansionState = optionalConfig.groupExpansionSetting?.get() || {};\n this.groupHiddenState = {};\n this.flameChartDelegate = flameChartDelegate;\n\n this.chartViewport = new ChartViewport(this);\n this.chartViewport.show(this.contentElement);\n\n this.dataProvider = dataProvider;\n\n this.viewportElement = this.chartViewport.viewportElement;\n this.canvas = (this.viewportElement.createChild('canvas', 'fill') as HTMLCanvasElement);\n this.candyStripePattern = null;\n\n this.canvas.tabIndex = 0;\n UI.ARIAUtils.setLabel(this.canvas, i18nString(UIStrings.flameChart));\n UI.ARIAUtils.markAsTree(this.canvas);\n this.setDefaultFocusedElement(this.canvas);\n this.canvas.classList.add('flame-chart-canvas');\n this.canvas.addEventListener('mousemove', this.onMouseMove.bind(this), false);\n this.canvas.addEventListener('mouseout', this.onMouseOut.bind(this), false);\n this.canvas.addEventListener('click', this.onClick.bind(this), false);\n this.canvas.addEventListener('keydown', this.onKeyDown.bind(this), false);\n this.canvas.addEventListener('contextmenu', this.onContextMenu.bind(this), false);\n\n this.popoverElement = this.viewportElement.createChild('div', 'flame-chart-entry-info');\n this.markerHighlighElement = this.viewportElement.createChild('div', 'flame-chart-marker-highlight-element');\n this.highlightElement = this.viewportElement.createChild('div', 'flame-chart-highlight-element');\n this.revealDescendantsArrowHighlightElement =\n this.viewportElement.createChild('div', 'reveal-descendants-arrow-highlight-element');\n\n if (this.#selectedElementOutlineEnabled) {\n this.selectedElement = this.viewportElement.createChild('div', 'flame-chart-selected-element');\n }\n\n this.canvas.addEventListener('focus', () => {\n this.dispatchEventToListeners(Events.CanvasFocused);\n }, false);\n\n UI.UIUtils.installDragHandle(\n this.viewportElement, this.startDragging.bind(this), this.dragging.bind(this), this.endDragging.bind(this),\n null);\n\n this.rulerEnabled = true;\n this.barHeight = 17;\n this.hitMarginPx = 3;\n this.textBaseline = 5;\n this.textPadding = 5;\n this.chartViewport.setWindowTimes(\n dataProvider.minimumBoundary(), dataProvider.minimumBoundary() + dataProvider.totalTime());\n\n this.highlightedMarkerIndex = -1;\n this.highlightedEntryIndex = -1;\n this.selectedEntryIndex = -1;\n this.#searchResultEntryIndex = -1;\n this.rawTimelineDataLength = 0;\n this.markerPositions = new Map();\n\n this.lastMouseOffsetX = 0;\n this.selectedGroupIndex = -1;\n this.lastPopoverState = {\n entryIndex: -1,\n hiddenEntriesPopover: false,\n };\n\n // Keyboard focused group is used to navigate groups irrespective of whether they are selectable or not\n this.keyboardFocusedGroup = -1;\n\n ThemeSupport.ThemeSupport.instance().addEventListener(ThemeSupport.ThemeChangeEvent.eventName, () => {\n this.scheduleUpdate();\n });\n }\n\n override willHide(): void {\n this.hideHighlight();\n }\n\n canvasBoundingClientRect(): DOMRect|null {\n if (this.#canvasBoundingClientRect) {\n return this.#canvasBoundingClientRect;\n }\n this.#canvasBoundingClientRect = this.canvas.getBoundingClientRect();\n return this.#canvasBoundingClientRect;\n }\n\n getBarHeight(): number {\n return this.barHeight;\n }\n\n setBarHeight(value: number): void {\n this.barHeight = value;\n }\n\n setTextBaseline(value: number): void {\n this.textBaseline = value;\n }\n\n setTextPadding(value: number): void {\n this.textPadding = value;\n }\n\n enableRuler(enable: boolean): void {\n this.rulerEnabled = enable;\n }\n\n alwaysShowVerticalScroll(): void {\n this.chartViewport.alwaysShowVerticalScroll();\n }\n\n disableRangeSelection(): void {\n this.chartViewport.disableRangeSelection();\n }\n\n highlightEntry(entryIndex: number): void {\n if (this.highlightedEntryIndex === entryIndex) {\n return;\n }\n if (!this.dataProvider.entryColor(entryIndex)) {\n return;\n }\n this.highlightedEntryIndex = entryIndex;\n this.updateElementPosition(this.highlightElement, this.highlightedEntryIndex);\n this.dispatchEventToListeners(Events.EntryHighlighted, entryIndex);\n }\n\n highlightAllEntries(entries: number[]): void {\n for (const entry of entries) {\n const searchElement = this.viewportElement.createChild('div', 'flame-chart-search-element');\n this.#searchResultHighlightElements.push(searchElement);\n searchElement.id = entry.toString();\n this.updateElementPosition(searchElement, entry);\n }\n }\n\n removeSearchResultHighlights(): void {\n for (const element of this.#searchResultHighlightElements) {\n element.remove();\n }\n this.#searchResultHighlightElements = [];\n }\n\n hideHighlight(): void {\n if (this.#searchResultEntryIndex === -1) {\n this.popoverElement.removeChildren();\n this.lastPopoverState = {\n entryIndex: -1,\n hiddenEntriesPopover: false,\n };\n }\n if (this.highlightedEntryIndex === -1) {\n return;\n }\n this.highlightedEntryIndex = -1;\n this.updateElementPosition(this.highlightElement, this.highlightedEntryIndex);\n this.dispatchEventToListeners(Events.EntryHighlighted, -1);\n }\n\n private createCandyStripePattern(): CanvasPattern {\n // Set the candy stripe pattern to 17px so it repeats well.\n const size = 17;\n const candyStripeCanvas = document.createElement('canvas');\n candyStripeCanvas.width = size;\n candyStripeCanvas.height = size;\n const ctx = candyStripeCanvas.getContext('2d') as CanvasRenderingContext2D;\n\n // Rotate the stripe by 45deg to the right.\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 = 'rgba(255, 0, 0, 0.8)';\n for (let x = -size; x < size * 2; x += 3) {\n ctx.fillRect(x, -size, 1, size * 3);\n }\n // Because we're using a canvas, we know createPattern won't return null\n // https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-createpattern-dev\n return ctx.createPattern(candyStripeCanvas, 'repeat') as CanvasPattern;\n }\n\n private resetCanvas(): void {\n const ratio = window.devicePixelRatio;\n const width = Math.round(this.offsetWidth * ratio);\n const height = Math.round(this.offsetHeight * ratio);\n this.canvas.width = width;\n this.canvas.height = height;\n this.canvas.style.width = `${width / ratio}px`;\n this.canvas.style.height = `${height / ratio}px`;\n }\n\n windowChanged(startTime: number, endTime: number, animate: boolean): void {\n this.flameChartDelegate.windowChanged(startTime, endTime, animate);\n }\n\n updateRangeSelection(startTime: number, endTime: number): void {\n this.flameChartDelegate.updateRangeSelection(startTime, endTime);\n }\n\n setSize(width: number, height: number): void {\n this.offsetWidth = width;\n this.offsetHeight = height;\n }\n\n private startDragging(event: MouseEvent): boolean {\n this.hideHighlight();\n this.maxDragOffset = 0;\n this.dragStartX = event.pageX;\n this.dragStartY = event.pageY;\n return true;\n }\n\n private dragging(event: MouseEvent): void {\n const dx = event.pageX - this.dragStartX;\n const dy = event.pageY - this.dragStartY;\n this.maxDragOffset = Math.max(this.maxDragOffset, Math.sqrt(dx * dx + dy * dy));\n }\n\n private endDragging(_event: MouseEvent): void {\n this.updateHighlight();\n }\n\n timelineData(rebuid?: boolean): FlameChartTimelineData|null {\n if (!this.dataProvider) {\n return null;\n }\n const timelineData = this.dataProvider.timelineData(rebuid);\n if (timelineData !== this.rawTimelineData ||\n (timelineData && timelineData.entryStartTimes.length !== this.rawTimelineDataLength)) {\n this.processTimelineData(timelineData);\n }\n return this.rawTimelineData || null;\n }\n\n private revealEntry(entryIndex: number): void {\n const timelineData = this.timelineData();\n if (!timelineData) {\n return;\n }\n const timeLeft = this.chartViewport.windowLeftTime();\n const timeRight = this.chartViewport.windowRightTime();\n const entryStartTime = timelineData.entryStartTimes[entryIndex];\n const entryTotalTime = timelineData.entryTotalTimes[entryIndex];\n const entryEndTime = entryStartTime + entryTotalTime;\n let minEntryTimeWindow = Math.min(entryTotalTime, timeRight - timeLeft);\n\n const level = timelineData.entryLevels[entryIndex];\n this.chartViewport.setScrollOffset(this.levelToOffset(level), this.levelHeight(level));\n\n const minVisibleWidthPx = 30;\n const futurePixelToTime = (timeRight - timeLeft) / this.offsetWidth;\n minEntryTimeWindow = Math.max(minEntryTimeWindow, futurePixelToTime * minVisibleWidthPx);\n if (timeLeft > entryEndTime) {\n const delta = timeLeft - entryEndTime + minEntryTimeWindow;\n this.windowChanged(timeLeft - delta, timeRight - delta, /* animate */ true);\n } else if (timeRight < entryStartTime) {\n const delta = entryStartTime - timeRight + minEntryTimeWindow;\n this.windowChanged(timeLeft + delta, timeRight + delta, /* animate */ true);\n }\n }\n\n setWindowTimes(startTime: number, endTime: number, animate?: boolean): void {\n this.chartViewport.setWindowTimes(startTime, endTime, animate);\n this.updateHighlight();\n }\n\n /**\n * Handle the mouse move event.\n *\n * And the handle priority will be:\n * 1. Track configuration icons -> show tooltip for the icons\n * 2. Inside a track header -> mouse style will be a \"pointer\", show edit icon\n * 3.1 Inside a track -> show edit icon, update the highlight of hovered event\n * 3.2 Outside all tracks -> clear all highlights\n */\n private onMouseMove(event: Event): void {\n this.#searchResultEntryIndex = -1;\n const mouseEvent = (event as MouseEvent);\n this.lastMouseOffsetX = mouseEvent.offsetX;\n this.lastMouseOffsetY = mouseEvent.offsetY;\n if (!this.enabled()) {\n return;\n }\n if (this.chartViewport.isDragging()) {\n return;\n }\n // Check if the mouse is hovering any group's header area\n const {groupIndex, hoverType} = this.coordinatesToGroupIndexAndHoverType(mouseEvent.offsetX, mouseEvent.offsetY);\n switch (hoverType) {\n case HoverType.TRACK_CONFIG_UP_BUTTON:\n case HoverType.TRACK_CONFIG_DOWN_BUTTON:\n case HoverType.TRACK_CONFIG_HIDE_BUTTON:\n case HoverType.TRACK_CONFIG_SHOW_BUTTON: {\n this.hideHighlight();\n this.viewportElement.style.cursor = 'pointer';\n const iconTooltipElement = this.#prepareIconInfo(groupIndex, hoverType);\n if (iconTooltipElement) {\n this.popoverElement.appendChild(iconTooltipElement);\n this.updatePopoverOffset();\n }\n return;\n }\n case HoverType.INSIDE_TRACK_HEADER:\n this.hideHighlight();\n this.viewportElement.style.cursor = 'pointer';\n return;\n case HoverType.INSIDE_TRACK:\n this.updateHighlight();\n return;\n case HoverType.OUTSIDE_TRACKS:\n // No group is hovered.\n // Redraw the flame chart to clear the potentially previously draw edit icon.\n this.draw();\n this.updateHighlight();\n return;\n }\n }\n\n #prepareIconInfo(groupIndex: number, iconType: HoverType): Element|null {\n const group = this.rawTimelineData?.groups[groupIndex];\n if (!group) {\n return null;\n }\n\n // Only show first 20 characters to make the tooltip not too long.\n const maxTitleChars = 20;\n const displayName = Platform.StringUtilities.trimMiddle(group.name, maxTitleChars);\n\n let iconTooltip = '';\n switch (iconType) {\n case HoverType.TRACK_CONFIG_UP_BUTTON:\n iconTooltip = `Move ${displayName} track up`;\n break;\n case HoverType.TRACK_CONFIG_DOWN_BUTTON:\n iconTooltip = `Move ${displayName} track down`;\n break;\n case HoverType.TRACK_CONFIG_HIDE_BUTTON:\n if (this.groupIsLastVisibleTopLevel(group)) {\n iconTooltip = 'Can not hide the last top level track';\n } else {\n iconTooltip = `Hide ${displayName} track`;\n }\n break;\n case HoverType.TRACK_CONFIG_SHOW_BUTTON:\n iconTooltip = `Show ${displayName} track`;\n break;\n default:\n return null;\n }\n const element = document.createElement('div');\n element.createChild('span', 'timeline-info-title').textContent = iconTooltip;\n\n return element;\n }\n\n private updateHighlight(): void {\n const entryIndex = this.coordinatesToEntryIndex(this.lastMouseOffsetX, this.lastMouseOffsetY);\n // Each time the entry highlight is updated, we need to check if the mouse is hovering over a\n // button that indicates hidden child elements and if so, update the button highlight.\n this.updateHiddenChildrenArrowHighlighPosition(entryIndex);\n\n // No entry is hovered.\n if (entryIndex === -1) {\n this.hideHighlight();\n const {groupIndex} = this.coordinatesToGroupIndexAndHoverType(this.lastMouseOffsetX, this.lastMouseOffsetY);\n if (groupIndex >= 0 && this.rawTimelineData && this.rawTimelineData.groups &&\n this.rawTimelineData.groups[groupIndex].selectable) {\n // This means the mouse is in a selectable group's area, and not hovering any entry.\n this.viewportElement.style.cursor = 'pointer';\n } else {\n // This means the mouse is not hovering any selectable track, and not hovering any entry.\n this.viewportElement.style.cursor = 'default';\n }\n return;\n }\n\n // Some entry is hovered.\n if (this.chartViewport.isDragging()) {\n return;\n }\n this.#updatePopoverForEntry(entryIndex);\n this.viewportElement.style.cursor = this.dataProvider.canJumpToEntry(entryIndex) ? 'pointer' : 'default';\n this.highlightEntry(entryIndex);\n }\n\n private onMouseOut(): void {\n this.lastMouseOffsetX = -1;\n this.lastMouseOffsetY = -1;\n this.hideHighlight();\n }\n\n showPopoverForSearchResult(selectedSearchResult: number): void {\n this.#searchResultEntryIndex = selectedSearchResult;\n this.#updatePopoverForEntry(selectedSearchResult);\n }\n\n #updatePopoverForEntry(entryIndex: number): void {\n // Just update position if cursor is hovering the same entry.\n const isMouseOverRevealChildrenArrow = this.isMouseOverRevealChildrenArrow(this.lastMouseOffsetX, entryIndex);\n if (entryIndex === this.lastPopoverState.entryIndex &&\n isMouseOverRevealChildrenArrow === this.lastPopoverState.hiddenEntriesPopover) {\n return this.updatePopoverOffset();\n }\n this.popoverElement.removeChildren();\n const data = this.timelineData();\n if (!data) {\n return;\n }\n const group = data.groups.at(this.selectedGroupIndex);\n // If the mouse is hovering over the hidden descendants arrow, get an element that shows how many children are hidden, otherwise an element with the event name and length\n const entryInfo = (isMouseOverRevealChildrenArrow && group) ?\n this.dataProvider.prepareHighlightedHiddenEntriesArrowInfo &&\n this.dataProvider.prepareHighlightedHiddenEntriesArrowInfo(entryIndex) :\n this.dataProvider.prepareHighlightedEntryInfo(entryIndex);\n if (entryInfo) {\n this.popoverElement.appendChild(entryInfo);\n this.updatePopoverOffset();\n }\n this.lastPopoverState = {\n entryIndex,\n hiddenEntriesPopover: isMouseOverRevealChildrenArrow,\n };\n }\n\n private updatePopoverOffset(): void {\n let mouseX = this.lastMouseOffsetX;\n let mouseY = this.lastMouseOffsetY;\n\n // If the popover is being updated from a search, we calculate the coordinates manually\n if (this.#searchResultEntryIndex !== -1) {\n const coordinate = this.entryIndexToCoordinates(this.selectedEntryIndex);\n const {x: canvasViewportOffsetX, y: canvasViewportOffsetY} = this.canvas.getBoundingClientRect();\n mouseX = coordinate?.x ? coordinate.x - canvasViewportOffsetX : mouseX;\n mouseY = coordinate?.y ? coordinate.y - canvasViewportOffsetY : mouseY;\n }\n\n const parentWidth = this.popoverElement.parentElement ? this.popoverElement.parentElement.clientWidth : 0;\n const parentHeight = this.popoverElement.parentElement ? this.popoverElement.parentElement.clientHeight : 0;\n const infoWidth = this.popoverElement.clientWidth;\n const infoHeight = this.popoverElement.clientHeight;\n const /** @const */ offsetX = 10;\n const /** @const */ offsetY = 6;\n let x;\n let y;\n for (let quadrant = 0; quadrant < 4; ++quadrant) {\n const dx = quadrant & 2 ? -offsetX - infoWidth : offsetX;\n const dy = quadrant & 1 ? -offsetY - infoHeight : offsetY;\n x = Platform.NumberUtilities.clamp(mouseX + dx, 0, parentWidth - infoWidth);\n y = Platform.NumberUtilities.clamp(mouseY + dy, 0, parentHeight - infoHeight);\n if (x >= mouseX || mouseX >= x + infoWidth || y >= mouseY || mouseY >= y + infoHeight) {\n break;\n }\n }\n this.popoverElement.style.left = x + 'px';\n this.popoverElement.style.top = y + 'px';\n }\n\n /**\n * Handle mouse click event in flame chart\n *\n * And the handle priority will be:\n * 1. Track configuration icons -> Config a track\n * 1.1 if it's edit mode ignore others.\n * 2. Inside a track header -> Select and Expand/Collapse a track\n * 3. Inside a track -> Select a track\n * 3.1 shift + click -> Select the time range of clicked event\n * 3.2 click -> update highlight (handle in other functions)\n */\n private onClick(event: Event): void {\n const mouseEvent = (event as MouseEvent);\n this.focus();\n // onClick comes after dragStart and dragEnd events.\n // So if there was drag (mouse move) in the middle of that events\n // we skip the click. Otherwise we jump to the sources.\n const clickThreshold = 5;\n if (this.maxDragOffset > clickThreshold) {\n return;\n }\n\n // If any button is clicked, we should handle the action only and ignore others.\n const {groupIndex, hoverType} = this.coordinatesToGroupIndexAndHoverType(mouseEvent.offsetX, mouseEvent.offsetY);\n if (groupIndex >= 0) {\n switch (hoverType) {\n case HoverType.TRACK_CONFIG_UP_BUTTON:\n this.moveGroupUp(groupIndex);\n return;\n case HoverType.TRACK_CONFIG_DOWN_BUTTON:\n this.moveGroupDown(groupIndex);\n return;\n case HoverType.TRACK_CONFIG_HIDE_BUTTON:\n if (this.groupIsLastVisibleTopLevel(this.rawTimelineData?.groups[groupIndex])) {\n // If this is the last visible top-level group, we will not allow you hiding the track.\n return;\n }\n this.hideGroup(groupIndex);\n return;\n case HoverType.TRACK_CONFIG_SHOW_BUTTON:\n this.showGroup(groupIndex);\n return;\n case HoverType.INSIDE_TRACK_HEADER:\n this.#selectGroup(groupIndex);\n this.toggleGroupExpand(groupIndex);\n return;\n case HoverType.INSIDE_TRACK: {\n this.#selectGroup(groupIndex);\n\n const timelineData = this.timelineData();\n const isMetaOrControl = Host.Platform.isMac() ? mouseEvent.metaKey : mouseEvent.ctrlKey;\n if (mouseEvent.shiftKey && this.highlightedEntryIndex !== -1 && timelineData) {\n const start = timelineData.entryStartTimes[this.highlightedEntryIndex];\n const end = start + timelineData.entryTotalTimes[this.highlightedEntryIndex];\n this.chartViewport.setRangeSelection(start, end);\n } else if (isMetaOrControl && this.highlightedEntryIndex !== -1 && timelineData) {\n this.dispatchEventToListeners(Events.AnnotateEntry, this.highlightedEntryIndex);\n } else {\n this.chartViewport.onClick(mouseEvent);\n this.dispatchEventToListeners(Events.EntryInvoked, this.highlightedEntryIndex);\n }\n return;\n }\n }\n }\n }\n\n #selectGroup(groupIndex: number): void {\n if (groupIndex < 0 || this.selectedGroupIndex === groupIndex) {\n return;\n }\n if (!this.rawTimelineData) {\n return;\n }\n\n const groups = this.rawTimelineData.groups;\n if (!groups) {\n return;\n }\n\n this.keyboardFocusedGroup = groupIndex;\n this.scrollGroupIntoView(groupIndex);\n const groupName = groups[groupIndex].name;\n if (!groups[groupIndex].selectable) {\n this.deselectAllGroups();\n UI.ARIAUtils.alert(i18nString(UIStrings.sHovered, {PH1: groupName}));\n } else {\n this.selectedGroupIndex = groupIndex;\n this.flameChartDelegate.updateSelectedGroup(this, groups[groupIndex]);\n this.draw();\n UI.ARIAUtils.alert(i18nString(UIStrings.sSelected, {PH1: groupName}));\n }\n }\n\n private deselectAllGroups(): void {\n this.selectedGroupIndex = -1;\n this.flameChartDelegate.updateSelectedGroup(this, null);\n this.draw();\n }\n\n private deselectAllEntries(): void {\n this.selectedEntryIndex = -1;\n this.rawTimelineData?.resetFlowData();\n this.draw();\n }\n\n private isGroupFocused(index: number): boolean {\n return index === this.selectedGroupIndex || index === this.keyboardFocusedGroup;\n }\n\n private scrollGroupIntoView(index: number): void {\n if (index < 0) {\n return;\n }\n\n if (!this.rawTimelineData) {\n return;\n }\n\n const groups = this.rawTimelineData.groups;\n const groupOffsets = this.groupOffsets;\n if (!groupOffsets || !groups) {\n return;\n }\n const groupTop = groupOffsets[index];\n\n let nextOffset = groupOffsets[index + 1];\n if (index === groups.length - 1) {\n nextOffset += groups[index].style.padding;\n }\n\n // For the top group, scroll all the way to the top of the chart\n // to accommodate the bar with time markers\n const scrollTop = index === 0 ? 0 : groupTop;\n\n const scrollHeight = Math.min(nextOffset - scrollTop, this.chartViewport.chartHeight());\n this.chartViewport.setScrollOffset(scrollTop, scrollHeight);\n }\n\n private toggleGroupExpand(groupIndex: number): void {\n if (groupIndex < 0 || !this.isGroupCollapsible(groupIndex)) {\n return;\n }\n\n if (!this.rawTimelineData || !this.rawTimelineData.groups) {\n return;\n }\n\n this.expandGroup(groupIndex, !this.rawTimelineData.groups[groupIndex].expanded /* setExpanded */);\n }\n\n private expandGroup(\n groupIndex: number, setExpanded: boolean|undefined = true, propagatedExpand: boolean|undefined = false): void {\n if (groupIndex < 0 || !this.isGroupCollapsible(groupIndex)) {\n return;\n }\n\n if (!this.rawTimelineData) {\n return;\n }\n\n const groups = this.rawTimelineData.groups;\n if (!groups) {\n return;\n }\n\n const group = groups[groupIndex];\n group.expanded = setExpanded;\n\n this.groupExpansionState[group.name] = group.expanded;\n if (this.groupExpansionSetting) {\n this.groupExpansionSetting.set(this.groupExpansionState);\n }\n this.updateLevelPositions();\n\n this.updateHighlight();\n if (!group.expanded) {\n const timelineData = this.timelineData();\n if (timelineData) {\n const level = timelineData.entryLevels[this.selectedEntryIndex];\n if (this.selectedEntryIndex >= 0 && level >= group.startLevel &&\n (groupIndex >= groups.length - 1 || groups[groupIndex + 1].startLevel > level)) {\n this.selectedEntryIndex = -1;\n // Reset all flow arrows when we deselect the entry.\n this.rawTimelineData.resetFlowData();\n }\n }\n }\n\n this.updateHeight();\n this.draw();\n\n this.scrollGroupIntoView(groupIndex);\n // We only want to read expanded/collapsed state on user inputted expand/collapse\n if (!propagatedExpand) {\n const groupName = groups[groupIndex].name;\n const content = group.expanded ? i18nString(UIStrings.sExpanded, {PH1: groupName}) :\n i18nString(UIStrings.sCollapsed, {PH1: groupName});\n UI.ARIAUtils.alert(content);\n }\n }\n\n moveGroupUp(groupIndex: number): void {\n if (groupIndex < 0) {\n return;\n }\n\n if (!this.rawTimelineData || !this.rawTimelineData.groups) {\n return;\n }\n\n if (!this.#groupTreeRoot) {\n return;\n }\n\n for (let i = 0; i < this.#groupTreeRoot.children.length; i++) {\n const child = this.#groupTreeRoot.children[i];\n if (child.index === groupIndex) {\n // exchange with previous one, only second or later group can do so\n if (i >= 1) {\n this.#groupTreeRoot.children[i] = this.#groupTreeRoot.children[i - 1];\n this.#groupTreeRoot.children[i - 1] = child;\n break;\n }\n }\n }\n\n this.updateLevelPositions();\n\n this.updateHighlight();\n this.updateHeight();\n this.draw();\n }\n\n moveGroupDown(groupIndex: number): void {\n if (groupIndex < 0) {\n return;\n }\n\n if (!this.rawTimelineData || !this.rawTimelineData.groups) {\n return;\n }\n\n if (!this.#groupTreeRoot) {\n return;\n }\n\n for (let i = 0; i < this.#groupTreeRoot.children.length; i++) {\n const child = this.#groupTreeRoot.children[i];\n if (child.index === groupIndex) {\n // exchange with previous one, only second to last or before group can do so\n if (i <= this.#groupTreeRoot.children.length - 2) {\n this.#groupTreeRoot.children[i] = this.#groupTreeRoot.children[i + 1];\n this.#groupTreeRoot.children[i + 1] = child;\n break;\n }\n }\n }\n\n this.updateLevelPositions();\n\n this.updateHighlight();\n this.updateHeight();\n this.draw();\n }\n\n hideGroup(groupIndex: number): void {\n this.#toggleGroupHiddenState(groupIndex, /* hidden= */ true);\n }\n\n showGroup(groupIndex: number): void {\n this.#toggleGroupHiddenState(groupIndex, /* hidden= */ false);\n }\n\n #toggleGroupHiddenState(groupIndex: number, hidden: boolean): void {\n if (groupIndex < 0) {\n return;\n }\n\n if (!this.rawTimelineData || !this.rawTimelineData.groups) {\n return;\n }\n\n const groups = this.rawTimelineData.groups;\n if (!groups) {\n return;\n }\n\n const group = groups[groupIndex];\n group.hidden = hidden;\n\n // We need to store this state again because somehow timelineData() is\n // called multiple times when rendering the flame chart, and timelineData()\n // will overwrite the groups with the data from |dataProvider|.\n // So we need this groupHiddenState to reapply hidden state in the processTimelineData()\n this.groupHiddenState[group.name] = group.hidden;\n this.updateLevelPositions();\n\n this.updateHighlight();\n this.updateHeight();\n this.draw();\n }\n\n modifyTree(treeAction: TraceEngine.EntriesFilter.FilterAction, index: number): void {\n const data = this.timelineData();\n if (!data) {\n return;\n }\n this.dataProvider.modifyTree?.(index, treeAction);\n this.dataProvider.timelineData(true);\n this.dataProvider.buildFlowForInitiator?.(index);\n this.update();\n }\n\n getPossibleActions(): TraceEngine.EntriesFilter.PossibleFilterActions|void {\n const data = this.timelineData();\n if (!data) {\n return;\n }\n const group = data.groups.at(this.selectedGroupIndex);\n // Early exit here if there is no group or:\n // 1. The group is not expanded: it needs to be expanded to allow the\n // context menu actions to occur.\n // 2. The group does not have the showStackContextMenu flag which indicates\n // that it does not show entries that support the stack actions.\n if (!group || !group.expanded || !group.showStackContextMenu) {\n return;\n }\n\n // Check which actions are possible on an entry.\n // If an action would not change the entries (for example it has no children to collapse), we do not need to show it.\n return this.dataProvider.findPossibleContextMenuActions?.(this.selectedEntryIndex);\n }\n\n #buildEnterEditModeContextMenu(event: MouseEvent): void {\n if (this.#inTrackConfigEditMode) {\n return;\n }\n\n this.contextMenu = new UI.ContextMenu.ContextMenu(event, {useSoftMenu: true});\n const label = i18nString(UIStrings.enterTrackConfigurationMode);\n this.contextMenu.defaultSection().appendItem(label, () => {\n this.#enterEditMode();\n }, {\n jslogContext: 'track-configuration-enter',\n });\n void this.contextMenu.show();\n }\n\n #buildExitEditModeContextMenu(event: MouseEvent): void {\n if (this.#inTrackConfigEditMode === false) {\n return;\n }\n this.contextMenu = new UI.ContextMenu.ContextMenu(event, {useSoftMenu: true});\n const label = i18nString(UIStrings.exitTrackConfigurationMode);\n this.contextMenu.defaultSection().appendItem(label, () => {\n this.#exitEditMode();\n }, {\n jslogContext: 'track-configuration-exit',\n });\n void this.contextMenu.show();\n }\n\n #hasTrackConfigurationMode(): boolean {\n // Track Configuration mode is off by default: a provider must define the\n // function and have it return `true` to enable it.\n return Boolean(this.dataProvider.hasTrackConfigurationMode && this.dataProvider.hasTrackConfigurationMode());\n }\n\n onContextMenu(event: MouseEvent): void {\n const {groupIndex, hoverType} = this.coordinatesToGroupIndexAndHoverType(event.offsetX, event.offsetY);\n\n // If the user is in edit mode, allow a right click anywhere to exit the mode.\n if (this.#inTrackConfigEditMode) {\n this.#buildExitEditModeContextMenu(event);\n return;\n }\n\n // If we are not in edit mode, and the user right clicks on the header,\n // allow them to enter edit mode.\n // Data providers can disable the ability to enter this mode, hence the\n // extra check. For example, in the DevTools Performance Panel the network\n // data provider & flame chart does not support this mode, but the main one\n // does.\n if (hoverType === HoverType.INSIDE_TRACK_HEADER && this.#hasTrackConfigurationMode()) {\n this.#buildEnterEditModeContextMenu(event);\n }\n\n // The following context menu should only work for the flame chart that support tree modification.\n // So if the data provider doesn't have the |modifyTree| function, simply return to show the default context menu.\n if (!this.dataProvider.modifyTree) {\n return;\n }\n\n if (this.highlightedEntryIndex === -1) {\n // If the user has not selected an individual entry, we do not show any\n // context menu, so finish here.\n return;\n }\n // Build the context menu for right clicking individual entries.\n // The context menu only applies if the user is hovering over an individual\n // entry, and we are not in edit mode (which we know we cannot be given the\n // conditional checks above)\n\n // Update the selected index to match the highlighted index, which\n // represents the entry under the cursor where the user has right clicked\n // to trigger a context menu.\n this.dispatchEventToListeners(Events.EntryInvoked, this.highlightedEntryIndex);\n this.setSelectedEntry(this.highlightedEntryIndex);\n // Update the selected group as well.\n this.#selectGroup(groupIndex);\n\n const possibleActions = this.getPossibleActions();\n if (!possibleActions) {\n return;\n }\n\n this.contextMenu = new UI.ContextMenu.ContextMenu(event, {useSoftMenu: true});\n\n const hideEntryOption = this.contextMenu.defaultSection().appendItem(i18nString(UIStrings.hideFunction), () => {\n this.modifyTree(TraceEngine.EntriesFilter.FilterAction.MERGE_FUNCTION, this.selectedEntryIndex);\n }, {\n disabled: !possibleActions?.[TraceEngine.EntriesFilter.FilterAction.MERGE_FUNCTION],\n jslogContext: 'hide-function',\n });\n hideEntryOption.setShortcut('H');\n\n const hideChildrenOption = this.contextMenu.defaultSection().appendItem(i18nString(UIStrings.hideChildren), () => {\n this.modifyTree(TraceEngine.EntriesFilter.FilterAction.COLLAPSE_FUNCTION, this.selectedEntryIndex);\n }, {\n disabled: !possibleActions?.[TraceEngine.EntriesFilter.FilterAction.COLLAPSE_FUNCTION],\n jslogContext: 'hide-children',\n });\n hideChildrenOption.setShortcut('C');\n\n const hideRepeatingChildrenOption =\n this.contextMenu.defaultSection().appendItem(i18nString(UIStrings.hideRepeatingChildren), () => {\n this.modifyTree(\n TraceEngine.EntriesFilter.FilterAction.COLLAPSE_REPEATING_DESCENDANTS, this.selectedEntryIndex);\n }, {\n disabled: !possibleActions?.[TraceEngine.EntriesFilter.FilterAction.COLLAPSE_REPEATING_DESCENDANTS],\n jslogContext: 'hide-repeating-children',\n });\n hideRepeatingChildrenOption.setShortcut('R');\n\n const resetChildrenOption =\n this.contextMenu.defaultSection().appendItem(i18nString(UIStrings.resetChildren), () => {\n this.modifyTree(TraceEngine.EntriesFilter.FilterAction.RESET_CHILDREN, this.selectedEntryIndex);\n }, {\n disabled: !possibleActions?.[TraceEngine.EntriesFilter.FilterAction.RESET_CHILDREN],\n jslogContext: 'reset-children',\n });\n resetChildrenOption.setShortcut('U');\n\n this.contextMenu.defaultSection().appendItem(i18nString(UIStrings.resetTrace), () => {\n this.modifyTree(TraceEngine.EntriesFilter.FilterAction.UNDO_ALL_ACTIONS, this.selectedEntryIndex);\n }, {\n disabled: !possibleActions?.[TraceEngine.EntriesFilter.FilterAction.UNDO_ALL_ACTIONS],\n jslogContext: 'reset-trace',\n });\n\n const entry = this.dataProvider.eventByIndex?.(this.selectedEntryIndex);\n if (entry && entry instanceof TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame === false) {\n const url = (TraceEngine.Types.TraceEvents.isProfileCall(entry)) ?\n entry.callFrame.url as Platform.DevToolsPath.UrlString :\n undefined;\n if (url) {\n if (Bindings.IgnoreListManager.IgnoreListManager.instance().isUserIgnoreListedURL(url)) {\n this.contextMenu.defaultSection().appendItem(i18nString(UIStrings.removeScriptFromIgnoreList), () => {\n Bindings.IgnoreListManager.IgnoreListManager.instance().unIgnoreListURL(url);\n }, {\n jslogContext: 'remove-from-ignore-list',\n });\n } else {\n this.contextMenu.defaultSection().appendItem(i18nString(UIStrings.addScriptToIgnoreList), () => {\n Bindings.IgnoreListManager.IgnoreListManager.instance().ignoreListURL(url);\n }, {\n jslogContext: 'add-to-ignore-list',\n });\n }\n }\n }\n\n void this.contextMenu.show();\n }\n\n private handleFlameChartTransformEvent(event: Event): void {\n // TODO(crbug.com/1469887): Indicate Shortcuts to the user when the designs are complete.\n if (this.selectedEntryIndex === -1) {\n return;\n }\n\n const possibleActions = this.getPossibleActions();\n if (!possibleActions) {\n return;\n }\n\n const keyboardEvent = (event as KeyboardEvent);\n let handled = false;\n\n if (keyboardEvent.code === 'KeyH' && possibleActions[TraceEngine.EntriesFilter.FilterAction.MERGE_FUNCTION]) {\n this.modifyTree(TraceEngine.EntriesFilter.FilterAction.MERGE_FUNCTION, this.selectedEntryIndex);\n handled = true;\n } else if (\n keyboardEvent.code === 'KeyC' && possibleActions[TraceEngine.EntriesFilter.FilterAction.COLLAPSE_FUNCTION]) {\n this.modifyTree(TraceEngine.EntriesFilter.FilterAction.COLLAPSE_FUNCTION, this.selectedEntryIndex);\n handled = true;\n } else if (\n keyboardEvent.code === 'KeyR' &&\n possibleActions[TraceEngine.EntriesFilter.FilterAction.COLLAPSE_REPEATING_DESCENDANTS]) {\n this.modifyTree(TraceEngine.EntriesFilter.FilterAction.COLLAPSE_REPEATING_DESCENDANTS, this.selectedEntryIndex);\n handled = true;\n } else if (keyboardEvent.code === 'KeyU') {\n this.modifyTree(TraceEngine.EntriesFilter.FilterAction.RESET_CHILDREN, this.selectedEntryIndex);\n handled = true;\n }\n\n if (handled) {\n keyboardEvent.consume(true);\n }\n }\n\n private onKeyDown(e: KeyboardEvent): void {\n if (!UI.KeyboardShortcut.KeyboardShortcut.hasNoModifiers(e) || !this.timelineData()) {\n return;\n }\n\n let eventHandled = this.handleSelectionNavigation(e);\n\n // Handle keyboard navigation in groups\n if (!eventHandled && this.rawTimelineData && this.rawTimelineData.groups) {\n eventHandled = this.handleKeyboardGroupNavigation(e);\n }\n\n if (!eventHandled) {\n this.handleFlameChartTransformEvent(e);\n }\n }\n\n bindCanvasEvent(eventName: string, onEvent: (arg0: Event) => void): void {\n this.canvas.addEventListener(eventName, onEvent);\n }\n\n drawTrackOnCanvas(trackName: string, context: CanvasRenderingContext2D, minWidth: number):\n {top: number, height: number, visibleEntries: Set<number>}|null {\n const timelineData = this.timelineData();\n if (!timelineData) {\n return null;\n }\n const canvasWidth = this.offsetWidth;\n const canvasHeight = this.offsetHeight;\n context.save();\n const ratio = window.devicePixelRatio;\n context.scale(ratio, ratio);\n context.fillStyle = 'rgba(0, 0, 0, 0)';\n context.fillRect(0, 0, canvasWidth, canvasHeight);\n context.font = this.#font;\n\n const groups = this.rawTimelineData?.groups || [];\n const groupOffsets = this.groupOffsets;\n if (!groups.length || !groupOffsets) {\n return null;\n }\n const trackIndex = groups.findIndex(g => g.name.includes(trackName));\n if (trackIndex < 0) {\n return null;\n }\n this.scrollGroupIntoView(trackIndex);\n const group = groups[trackIndex];\n const startLevel = group.startLevel;\n const endLevel = groups[trackIndex + 1].startLevel;\n const groupTop = groupOffsets[trackIndex];\n const nextOffset = groupOffsets[trackIndex + 1];\n\n const {colorBuckets, titleIndices} = this.getDrawableData(context, timelineData);\n\n const entryIndexIsInTrack = (index: number): boolean => {\n const barWidth = Math.min(this.#eventBarWidth(timelineData, index), canvasWidth);\n return timelineData.entryLevels[index] >= startLevel && timelineData.entryLevels[index] < endLevel &&\n barWidth > minWidth;\n };\n let allFilteredIndexes: number[] = [];\n for (const [color, {indexes}] of colorBuckets) {\n const filteredIndexes = indexes.filter(entryIndexIsInTrack);\n allFilteredIndexes = [...allFilteredIndexes, ...filteredIndexes];\n this.#drawGenericEvents(context, timelineData, color, filteredIndexes);\n }\n const filteredTitleIndices = titleIndices.filter(entryIndexIsInTrack);\n this.drawEventTitles(context, timelineData, filteredTitleIndices, canvasWidth);\n context.restore();\n return {top: groupOffsets[trackIndex], height: nextOffset - groupTop, visibleEntries: new Set(allFilteredIndexes)};\n }\n\n private handleKeyboardGroupNavigation(event: Event): boolean {\n const keyboardEvent = (event as KeyboardEvent);\n let handled = false;\n let entrySelected = false;\n\n if (keyboardEvent.code === 'ArrowUp') {\n handled = this.selectPreviousGroup();\n } else if (keyboardEvent.code === 'ArrowDown') {\n handled = this.selectNextGroup();\n } else if (keyboardEvent.code === 'ArrowLeft') {\n if (this.keyboardFocusedGroup >= 0) {\n this.expandGroup(this.keyboardFocusedGroup, false /* setExpanded */);\n handled = true;\n }\n } else if (keyboardEvent.code === 'ArrowRight') {\n if (this.keyboardFocusedGroup >= 0) {\n this.expandGroup(this.keyboardFocusedGroup, true /* setExpanded */);\n this.selectFirstChild();\n handled = true;\n }\n } else if (keyboardEvent.key === 'Enter') {\n entrySelected = this.selectFirstEntryInCurrentGroup();\n handled = entrySelected;\n }\n\n if (handled && !entrySelected) {\n this.deselectAllEntries();\n }\n\n if (handled) {\n keyboardEvent.consume(true);\n }\n\n return handled;\n }\n\n private selectFirstEntryInCurrentGroup(): boolean {\n if (!this.rawTimelineData) {\n return false;\n }\n\n const allGroups = this.rawTimelineData.groups;\n\n if (this.keyboardFocusedGroup < 0 || !allGroups) {\n return false;\n }\n\n const group = allGroups[this.keyboardFocusedGroup];\n const startLevelInGroup = group.startLevel;\n\n // Return if no levels in this group\n if (startLevelInGroup < 0) {\n return false;\n }\n\n // Make sure this is the innermost nested group with this startLevel\n // This is because a parent group also contains levels of all its child groups\n // So check if the next group has the same level, if it does, user should\n // go to that child group to select this entry\n if (this.keyboardFocusedGroup < allGroups.length - 1 &&\n allGroups[this.keyboardFocusedGroup + 1].startLevel === startLevelInGroup) {\n return false;\n }\n\n if (!this.timelineLevels) {\n return false;\n }\n\n // Get first (default) entry in startLevel of selected group\n const firstEntryIndex = this.timelineLevels[startLevelInGroup][0];\n\n this.expandGroup(this.keyboardFocusedGroup, true /* setExpanded */);\n this.setSelectedEntry(firstEntryIndex);\n return true;\n }\n\n private selectPreviousGroup(): boolean {\n if (this.keyboardFocusedGroup <= 0) {\n return false;\n }\n\n const groupIndexToSelect = this.getGroupIndexToSelect(-1 /* offset */);\n this.#selectGroup(groupIndexToSelect);\n return true;\n }\n\n private selectNextGroup(): boolean {\n if (!this.rawTimelineData || !this.rawTimelineData.groups) {\n return false;\n }\n\n if (this.keyboardFocusedGroup >= this.rawTimelineData.groups.length - 1) {\n return false;\n }\n\n const groupIndexToSelect = this.getGroupIndexToSelect(1 /* offset */);\n this.#selectGroup(groupIndexToSelect);\n return true;\n }\n\n private getGroupIndexToSelect(offset: number): number {\n if (!this.rawTimelineData || !this.rawTimelineData.groups) {\n throw new Error('No raw timeline data');\n }\n const allGroups = this.rawTimelineData.groups;\n let groupIndexToSelect = this.keyboardFocusedGroup;\n let groupName, groupWithSubNestingLevel;\n\n do {\n groupIndexToSelect += offset;\n groupName = this.rawTimelineData.groups[groupIndexToSelect].name;\n groupWithSubNestingLevel = this.keyboardFocusedGroup !== -1 &&\n allGroups[groupIndexToSelect].style.nestingLevel > allGroups[this.keyboardFocusedGroup].style.nestingLevel;\n } while (groupIndexToSelect > 0 && groupIndexToSelect < allGroups.length - 1 &&\n (!groupName || groupWithSubNestingLevel));\n\n return groupIndexToSelect;\n }\n\n private selectFirstChild(): void {\n if (!this.rawTimelineData || !this.rawTimelineData.groups) {\n return;\n }\n\n const allGroups = this.rawTimelineData.groups;\n if (this.keyboardFocusedGroup < 0 || this.keyboardFocusedGroup >= allGroups.length - 1) {\n return;\n }\n\n const groupIndexToSelect = this.keyboardFocusedGroup + 1;\n if (allGroups[groupIndexToSelect].style.nestingLevel > allGroups[this.keyboardFocusedGroup].style.nestingLevel) {\n this.#selectGroup(groupIndexToSelect);\n }\n }\n\n private handleSelectionNavigation(event: KeyboardEvent): boolean {\n if (this.selectedEntryIndex === -1) {\n return false;\n }\n const timelineData = this.timelineData();\n if (!timelineData) {\n return false;\n }\n\n function timeComparator(time: number, entryIndex: number): number {\n if (!timelineData) {\n throw new Error('No timeline data');\n }\n return time - timelineData.entryStartTimes[entryIndex];\n }\n\n function entriesIntersect(entry1: number, entry2: number): boolean {\n if (!timelineData) {\n throw new Error('No timeline data');\n }\n\n const start1 = timelineData.entryStartTimes[entry1];\n const start2 = timelineData.entryStartTimes[entry2];\n const end1 = start1 + timelineData.entryTotalTimes[entry1];\n const end2 = start2 + timelineData.entryTotalTimes[entry2];\n return start1 < end2 && start2 < end1;\n }\n\n const keyboardEvent = (event as KeyboardEvent);\n const keys = UI.KeyboardShortcut.Keys;\n if (keyboardEvent.keyCode === keys.Left.code || keyboardEvent.keyCode === keys.Right.code) {\n const level = timelineData.entryLevels[this.selectedEntryIndex];\n const levelIndexes = this.timelineLevels ? this.timelineLevels[level] : [];\n let indexOnLevel = Platform.ArrayUtilities.lowerBound(levelIndexes, this.selectedEntryIndex, (a, b) => a - b);\n indexOnLevel += keyboardEvent.keyCode === keys.Left.code ? -1 : 1;\n event.consume(true);\n if (indexOnLevel >= 0 && indexOnLevel < levelIndexes.length) {\n this.dispatchEventToListeners(Events.EntrySelected, levelIndexes[indexOnLevel]);\n }\n return true;\n }\n\n if (keyboardEvent.keyCode === keys.Up.code || keyboardEvent.keyCode === keys.Down.code) {\n let level = timelineData.entryLevels[this.selectedEntryIndex];\n level += keyboardEvent.keyCode === keys.Up.code ? -1 : 1;\n if (level < 0 || (this.timelineLevels && level >= this.timelineLevels.length)) {\n this.deselectAllEntries();\n keyboardEvent.consume(true);\n return true;\n }\n const entryTime = timelineData.entryStartTimes[this.selectedEntryIndex] +\n timelineData.entryTotalTimes[this.selectedEntryIndex] / 2;\n const levelIndexes = this.timelineLevels ? this.timelineLevels[level] : [];\n let indexOnLevel = Platform.ArrayUtilities.upperBound(levelIndexes, entryTime, timeComparator) - 1;\n if (!entriesIntersect(this.selectedEntryIndex, levelIndexes[indexOnLevel])) {\n ++indexOnLevel;\n if (indexOnLevel >= levelIndexes.length ||\n !entriesIntersect(this.selectedEntryIndex, levelIndexes[indexOnLevel])) {\n if (keyboardEvent.code === 'ArrowDown') {\n return false;\n }\n\n // Stay in the current group and give focus to the parent group instead of entries\n this.deselectAllEntries();\n keyboardEvent.consume(true);\n return true;\n }\n }\n keyboardEvent.consume(true);\n this.dispatchEventToListeners(Events.EntrySelected, levelIndexes[indexOnLevel]);\n return true;\n }\n if (event.key === 'Enter') {\n event.consume(true);\n this.dispatchEventToListeners(Events.EntryInvoked, this.selectedEntryIndex);\n return true;\n }\n return false;\n }\n\n /**\n * Given offset of the cursor, returns the index of the entry.\n * This function is public for test purpose.\n * @param x\n * @param y\n * @returns the index of the entry\n */\n coordinatesToEntryIndex(x: number, y: number): number {\n if (x < 0 || y < 0) {\n return -1;\n }\n const timelineData = this.timelineData();\n if (!timelineData) {\n return -1;\n }\n y += this.chartViewport.scrollOffset();\n if (!this.visibleLevelOffsets || !this.visibleLevelHeights || !this.visibleLevels) {\n throw new Error('No visible level offsets or heights');\n }\n\n // The real order of the levels might be changed.\n // So we just check each level, and check if the y is between the start and the end of this level. If yes, this is\n // the level we want to find.\n let cursorLevel = -1;\n for (let i = 0; i < this.dataProvider.maxStackDepth(); i++) {\n if (y >= this.visibleLevelOffsets[i] &&\n y < this.visibleLevelOffsets[i] + (this.visibleLevels[i] ? this.visibleLevelHeights[i] : 0)) {\n cursorLevel = i;\n break;\n }\n }\n\n if (cursorLevel < 0 || !this.visibleLevels[cursorLevel]) {\n return -1;\n }\n const offsetFromLevel = y - this.visibleLevelOffsets[cursorLevel];\n if (offsetFromLevel > this.levelHeight(cursorLevel)) {\n return -1;\n }\n\n // Check markers first.\n for (const [index, pos] of this.markerPositions) {\n if (timelineData.entryLevels[index] !== cursorLevel) {\n continue;\n }\n if (pos.x <= x && x < pos.x + pos.width) {\n return index as number;\n }\n }\n\n // Check regular entries.\n const entryStartTimes = timelineData.entryStartTimes;\n const entriesOnLevel: number[] = this.timelineLevels ? this.timelineLevels[cursorLevel] : [];\n if (!entriesOnLevel || !entriesOnLevel.length) {\n return -1;\n }\n\n const cursorTime = this.chartViewport.pixelToTime(x);\n const indexOnLevel = Math.max(\n Platform.ArrayUtilities.upperBound(\n entriesOnLevel, cursorTime, (time, entryIndex) => time - entryStartTimes[entryIndex]) -\n 1,\n 0);\n\n function checkEntryHit(this: FlameChart, entryIndex: number|undefined): boolean {\n if (entryIndex === undefined) {\n return false;\n }\n\n if (!timelineData) {\n return false;\n }\n\n const startTime = entryStartTimes[entryIndex];\n const duration = timelineData.entryTotalTimes[entryIndex];\n const startX = this.chartViewport.timeToPosition(startTime);\n const endX = this.chartViewport.timeToPosition(startTime + duration);\n return startX - this.hitMarginPx < x && x < endX + this.hitMarginPx;\n }\n\n let entryIndex: number = entriesOnLevel[indexOnLevel];\n if (checkEntryHit.call(this, entryIndex)) {\n return entryIndex;\n }\n entryIndex = entriesOnLevel[indexOnLevel + 1];\n if (checkEntryHit.call(this, entryIndex)) {\n return entryIndex;\n }\n return -1;\n }\n\n /**\n * Given an entry's index and an X coordinate of a mouse click, returns\n * whether the mouse is hovering over the arrow button that reveals hidden children\n */\n isMouseOverRevealChildrenArrow(x: number, index: number): boolean {\n // Check if given entry has an arrow\n if (!this.entryHasDecoration(index, FlameChartDecorationType.HIDDEN_DESCENDANTS_ARROW)) {\n return false;\n }\n const timelineData = this.timelineData();\n if (!timelineData) {\n return false;\n }\n const startTime = timelineData.entryStartTimes[index];\n const duration = timelineData.entryTotalTimes[index];\n const endX = this.chartViewport.timeToPosition(startTime + duration);\n // The arrow icon is square, thefore the width is equal to the bar height\n const barHeight = this.#eventBarHeight(timelineData, index);\n const arrowWidth = barHeight;\n if (endX - arrowWidth - this.hitMarginPx < x && x < endX + this.hitMarginPx) {\n return true;\n }\n return false;\n }\n\n /**\n * Given an entry's index, returns its coordinates relative to the\n * viewport.\n * This function is public for test purpose.\n */\n entryIndexToCoordinates(entryIndex: number): {x: number, y: number}|null {\n const timelineData = this.timelineData();\n const {x: canvasViewportOffsetX, y: canvasViewportOffsetY} = this.canvas.getBoundingClientRect();\n if (!timelineData || !this.visibleLevelOffsets) {\n return null;\n }\n\n const x = this.chartViewport.timeToPosition(timelineData.entryStartTimes[entryIndex]) + canvasViewportOffsetX;\n const y = this.visibleLevelOffsets[timelineData.entryLevels[entryIndex]] - this.chartViewport.scrollOffset() +\n canvasViewportOffsetY;\n return {x, y};\n }\n\n /**\n * Given an entry's index, returns its title\n */\n entryTitle(entryIndex: number): string|null {\n return this.dataProvider.entryTitle(entryIndex);\n }\n\n /**\n * Returns the offset of the canvas relative to the viewport.\n */\n getCanvasOffset(): {x: number, y: number} {\n return this.canvas.getBoundingClientRect();\n }\n\n getCanvas(): HTMLCanvasElement {\n return this.canvas;\n }\n\n /**\n * Returns the y scroll of the chart viewport.\n */\n getScrollOffset(): number {\n return this.chartViewport.scrollOffset();\n }\n\n getContextMenu(): UI.ContextMenu.ContextMenu|undefined {\n return this.contextMenu;\n }\n\n /**\n * Given offset of the cursor, returns the index of the group and the hover type of current mouse position.\n * Will return -1 for index and HoverType.OUTSIDE_TRACKS if no group is hovered/clicked.\n * And the handle priority will be:\n * 1. Track configuration icons\n * 2. Inside a track header (track label and the expansion arrow)\n * 3. Inside a track\n * 4. Outside all tracks\n *\n * This function is public for test purpose.\n * @param x\n * @param y\n * @returns the index of the group and the button user clicked. If there is no button the button type will be\n * undefined.\n */\n coordinatesToGroupIndexAndHoverType(x: number, y: number): {groupIndex: number, hoverType: HoverType} {\n if (!this.rawTimelineData || !this.rawTimelineData.groups || !this.groupOffsets) {\n return {groupIndex: -1, hoverType: HoverType.ERROR};\n }\n\n if (x < 0 || y < 0) {\n return {groupIndex: -1, hoverType: HoverType.ERROR};\n }\n y += this.chartViewport.scrollOffset();\n const groups = this.rawTimelineData.groups || [];\n\n // The real order of the groups is the preorder traversal, and it will match the order in the sortedGroup.\n // So we first do a preorder traversal to get an array of GroupIndex. And then based on the visual index we got\n // before, we can get the real group index.\n if (this.#groupTreeRoot) {\n const sortedGroupIndexes: number[] = [];\n\n function traverse(root: GroupTreeNode): void {\n sortedGroupIndexes.push(root.index);\n for (const child of root.children) {\n traverse(child);\n }\n }\n traverse(this.#groupTreeRoot);\n // Skip the one whose index is -1, because we added to represent the top\n // level to be the parent of all groups.\n sortedGroupIndexes.shift();\n\n // This shouldn't happen, because the tree should have the fake root and all groups. Add a sanity check to avoid\n // error.\n if (sortedGroupIndexes.length !== groups.length) {\n console.warn('The data from the group tree doesn\\'t match the data from DataProvider.');\n return {groupIndex: -1, hoverType: HoverType.ERROR};\n }\n\n // Add an extra index, which is equal to the length of the |groups|, this\n // will be used for the coordinates after the last group.\n // If the coordinates after the last group, it will return in later check\n // `groupIndex >= groups.length` anyway. But add one more element to make\n // this array same length as the |groupOffsets|.\n sortedGroupIndexes.push(groups.length);\n\n for (let i = 0; i < sortedGroupIndexes.length; i++) {\n const groupIndex = sortedGroupIndexes[i];\n const nextIndex = sortedGroupIndexes[i + 1] ?? sortedGroupIndexes.length;\n\n if (y >= this.groupOffsets[groupIndex] && y < this.groupOffsets[nextIndex]) {\n // This section is used to calculate the position of current group's header\n // If we are in edit mode, the track label is pushed right to make room for the icons.\n const context = (this.canvas.getContext('2d') as CanvasRenderingContext2D);\n context.save();\n context.font = this.#font;\n const headerRight = HEADER_LEFT_PADDING + (this.#inTrackConfigEditMode ? EDIT_MODE_TOTAL_ICON_WIDTH : 0) +\n this.labelWidthForGroup(context, groups[groupIndex]);\n context.restore();\n\n const mouseInHeaderRow =\n y >= this.groupOffsets[groupIndex] && y < this.groupOffsets[groupIndex] + groups[groupIndex].style.height;\n\n if (this.#inTrackConfigEditMode) {\n if (mouseInHeaderRow) {\n if (UP_ICON_LEFT <= x && x < UP_ICON_LEFT + EDIT_ICON_WIDTH) {\n return {groupIndex: groupIndex, hoverType: HoverType.TRACK_CONFIG_UP_BUTTON};\n }\n if (DOWN_ICON_LEFT <= x && x < DOWN_ICON_LEFT + EDIT_ICON_WIDTH) {\n return {groupIndex: groupIndex, hoverType: HoverType.TRACK_CONFIG_DOWN_BUTTON};\n }\n if (HIDE_ICON_LEFT <= x && x < HIDE_ICON_LEFT + EDIT_ICON_WIDTH) {\n return {\n groupIndex: groupIndex,\n hoverType: groups[groupIndex].hidden ? HoverType.TRACK_CONFIG_SHOW_BUTTON :\n HoverType.TRACK_CONFIG_HIDE_BUTTON,\n };\n }\n if (mouseInHeaderRow && x <= headerRight) {\n return {groupIndex: groupIndex, hoverType: HoverType.INSIDE_TRACK_HEADER};\n }\n }\n // Ignore any other actions when user is customizing the tracks.\n // For example, we won't toggle the expand status in the editing mode.\n } else {\n // User is not in edit mode so they can either be in the header, or in the track.\n if (mouseInHeaderRow && x <= headerRight) {\n return {groupIndex: groupIndex, hoverType: HoverType.INSIDE_TRACK_HEADER};\n }\n return {groupIndex: groupIndex, hoverType: HoverType.INSIDE_TRACK};\n }\n }\n }\n }\n\n return {groupIndex: -1, hoverType: HoverType.OUTSIDE_TRACKS};\n }\n\n #enterEditMode(): void {\n const div = document.createElement('div');\n div.classList.add('flame-chart-edit-confirm');\n const button = new Buttons.Button.Button();\n button.data = {\n variant: Buttons.Button.Variant.PRIMARY,\n jslogContext: 'track-configuration-exit',\n };\n button.innerText = i18nString(UIStrings.exitTrackConfigurationMode);\n div.appendChild(button);\n button.addEventListener('click', () => {\n this.#exitEditMode();\n });\n\n this.viewportElement.appendChild(div);\n this.#inTrackConfigEditMode = true;\n this.updateLevelPositions();\n this.draw();\n }\n\n #removeEditModeButton(): void {\n const confirmButton = this.viewportElement.querySelector('.flame-chart-edit-confirm');\n if (confirmButton) {\n this.viewportElement.removeChild(confirmButton);\n }\n }\n\n #exitEditMode(): void {\n this.#removeEditModeButton();\n this.#inTrackConfigEditMode = false;\n this.updateLevelPositions();\n this.draw();\n }\n\n private markerIndexBeforeTime(time: number): number {\n const timelineData = this.timelineData();\n if (!timelineData) {\n throw new Error('No timeline data');\n }\n\n const markers = timelineData.markers;\n if (!markers) {\n throw new Error('No timeline markers');\n }\n\n return Platform.ArrayUtilities.lowerBound(\n timelineData.markers, time, (markerTimestamp, marker) => markerTimestamp - marker.startTime());\n }\n\n /**\n * Draw the whole flame chart.\n * Make sure |setWindowTimes| is called with correct time range before this function.\n */\n private draw(): void {\n const timelineData = this.timelineData();\n if (!timelineData) {\n return;\n }\n this.resetCanvas();\n\n this.dispatchEventToListeners(Events.LatestDrawDimensions, {\n chart: {\n widthPixels: this.offsetWidth,\n heightPixels: this.offsetHeight,\n scrollOffsetPixels: this.chartViewport.scrollOffset(),\n // If there are no groups because we have no timeline data, we treat\n // that as all being collapsed.\n allGroupsCollapsed: this.rawTimelineData?.groups.every(g => !g.expanded) ?? true,\n },\n traceWindow: TraceEngine.Helpers.Timing.traceWindowFromMilliSeconds(\n this.minimumBoundary(),\n this.maximumBoundary(),\n ),\n });\n const canvasWidth = this.offsetWidth;\n const canvasHeight = this.offsetHeight;\n const context = (this.canvas.getContext('2d') as CanvasRenderingContext2D);\n\n context.save();\n const ratio = window.devicePixelRatio;\n const top = this.chartViewport.scrollOffset();\n context.scale(ratio, ratio);\n // Clear the canvas area by drawing a white square first\n context.fillStyle = 'rgba(0, 0, 0, 0)';\n context.fillRect(0, 0, canvasWidth, canvasHeight);\n context.translate(0, -top);\n context.font = this.#font;\n\n const {markerIndices, colorBuckets, titleIndices} = this.getDrawableData(context, timelineData);\n\n context.save();\n this.forEachGroupInViewport((offset, index, group, isFirst, groupHeight) => {\n if (this.isGroupFocused(index)) {\n context.fillStyle =\n ThemeSupport.ThemeSupport.instance().getComputedValue('--selected-group-background', this.contentElement);\n context.fillRect(0, offset, canvasWidth, groupHeight - group.style.padding);\n }\n });\n context.restore();\n\n const groups = this.rawTimelineData?.groups || [];\n const trackIndex = groups.findIndex(g => g.name.includes('Main'));\n const group = groups.at(trackIndex);\n const startLevel = group?.startLevel;\n const endLevel = groups.at(trackIndex + 1)?.startLevel;\n const entryIndexIsInTrack = (index: number): boolean => {\n if (trackIndex < 0 || startLevel === undefined || endLevel === undefined) {\n return false;\n }\n const barWidth = Math.min(this.#eventBarWidth(timelineData, index), canvasWidth);\n return timelineData.entryLevels[index] >= startLevel && timelineData.entryLevels[index] < endLevel &&\n barWidth > 10;\n };\n let wideEntryExists: boolean = false;\n for (const [color, {indexes}] of colorBuckets) {\n if (!wideEntryExists) {\n wideEntryExists = indexes.some(entryIndexIsInTrack);\n }\n this.#drawGenericEvents(context, timelineData, color, indexes);\n }\n this.dispatchEventToListeners(Events.ChartPlayableStateChange, wideEntryExists);\n\n const allIndexes = Array.from(colorBuckets.values()).map(x => x.indexes).flat();\n this.#drawDecorations(context, timelineData, allIndexes);\n\n this.drawMarkers(context, timelineData, markerIndices);\n\n this.drawEventTitles(context, timelineData, titleIndices, canvasWidth);\n context.restore();\n\n this.drawGroupHeaders(canvasWidth, canvasHeight);\n this.drawFlowEvents(context, timelineData);\n this.drawMarkerLines();\n const dividersData = TimelineGrid.calculateGridOffsets(this);\n const navStartTimes = this.dataProvider.mainFrameNavigationStartEvents?.() || [];\n\n let navStartTimeIndex = 0;\n const drawAdjustedTime = (time: number): string => {\n if (navStartTimes.length === 0) {\n return this.formatValue(time, dividersData.precision);\n }\n\n // Track when the time crosses the boundary to the next nav start record,\n // and when it does, move the nav start array index accordingly.\n const hasNextNavStartTime = navStartTimes.length > navStartTimeIndex + 1;\n if (hasNextNavStartTime) {\n const nextNavStartTime = navStartTimes[navStartTimeIndex + 1];\n const nextNavStartTimeStartTimestamp =\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(nextNavStartTime.ts);\n if (time > nextNavStartTimeStartTimestamp) {\n navStartTimeIndex++;\n }\n }\n\n // Adjust the time by the nearest nav start marker's value.\n const nearestMarker = navStartTimes[navStartTimeIndex];\n if (nearestMarker) {\n const nearestMarkerStartTime = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(nearestMarker.ts);\n time -= nearestMarkerStartTime - this.zeroTime();\n }\n\n return this.formatValue(time, dividersData.precision);\n };\n\n TimelineGrid.drawCanvasGrid(context, dividersData);\n if (this.rulerEnabled) {\n TimelineGrid.drawCanvasHeaders(context, dividersData, drawAdjustedTime, 3, RulerHeight);\n }\n\n this.updateElementPosition(this.highlightElement, this.highlightedEntryIndex);\n this.updateElementPosition(this.selectedElement, this.selectedEntryIndex);\n\n if (this.#searchResultEntryIndex !== -1) {\n this.showPopoverForSearchResult(this.#searchResultEntryIndex);\n }\n for (const element of this.#searchResultHighlightElements) {\n this.updateElementPosition(element, Number(element.id));\n }\n this.updateMarkerHighlight();\n }\n\n /**\n * Draws generic flame chart events, that is, the plain rectangles that fill several parts\n * in the timeline like the Main Thread flamechart and the timings track.\n * Drawn on a color by color basis to minimize the amount of times context.style is switched.\n */\n #drawGenericEvents(\n context: CanvasRenderingContext2D, timelineData: FlameChartTimelineData, color: string, indexes: number[]): void {\n context.save();\n context.beginPath();\n for (let i = 0; i < indexes.length; ++i) {\n const entryIndex = indexes[i];\n this.#drawEventRect(context, timelineData, entryIndex);\n }\n context.fillStyle = color;\n context.fill();\n context.restore();\n }\n\n /**\n * Draws decorations onto events. {@see FlameChartDecoration}.\n */\n #drawDecorations(context: CanvasRenderingContext2D, timelineData: FlameChartTimelineData, indexes: number[]): void {\n const {entryTotalTimes, entryStartTimes, entryLevels} = timelineData;\n context.save();\n for (let i = 0; i < indexes.length; ++i) {\n const entryIndex = indexes[i];\n const decorationsForEvent = timelineData.entryDecorations.at(entryIndex);\n if (!decorationsForEvent || decorationsForEvent.length < 1) {\n continue;\n }\n if (decorationsForEvent.length > 1) {\n sortDecorationsForRenderingOrder(decorationsForEvent);\n }\n const entryStartTime = entryStartTimes[entryIndex];\n const duration = entryTotalTimes[entryIndex];\n const barX = this.timeToPositionClipped(entryStartTime);\n const barLevel = entryLevels[entryIndex];\n const barHeight = this.#eventBarHeight(timelineData, entryIndex);\n const barY = this.levelToOffset(barLevel);\n let barWidth = this.#eventBarWidth(timelineData, entryIndex);\n\n for (const decoration of decorationsForEvent) {\n switch (decoration.type) {\n case FlameChartDecorationType.CANDY: {\n const candyStripeStartTime = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(decoration.startAtTime);\n if (duration < candyStripeStartTime) {\n // If the duration of the event is less than the start time to draw the candy stripes, then we have no stripes to draw.\n continue;\n }\n if (!this.candyStripePattern) {\n this.candyStripePattern = this.createCandyStripePattern();\n }\n\n context.save();\n context.beginPath();\n // Draw a rectangle over the event, starting at the X value of the\n // event's start time + the startDuration of the candy striping.\n const barXStart = this.timeToPositionClipped(entryStartTime + candyStripeStartTime);\n\n // If a custom end time was passed in, that is when we stop striping, else we stripe until the very end of the entry.\n const stripingEndTime = decoration.endAtTime ?\n TraceEngine.Helpers.Timing.microSecondsToMilliseconds(decoration.endAtTime) :\n entryStartTime + duration;\n const barXEnd = this.timeToPositionClipped(stripingEndTime);\n this.#drawEventRect(context, timelineData, entryIndex, {\n startX: barXStart,\n width: barXEnd - barXStart,\n });\n context.fillStyle = this.candyStripePattern;\n context.fill();\n context.restore();\n break;\n }\n case FlameChartDecorationType.WARNING_TRIANGLE: {\n if (typeof decoration.customEndTime !== 'undefined') {\n // The user can pass a customEndTime to tell us where the event's box ends and therefore where we should draw the triangle. So therefore we calculate the width by taking the end time off the start time.\n const endTimeMilli = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(decoration.customEndTime);\n const endTimePixels = this.timeToPositionClipped(endTimeMilli);\n barWidth = endTimePixels - barX;\n }\n const triangleSize = 8;\n context.save();\n context.beginPath();\n context.rect(barX, barY, barWidth, barHeight);\n context.clip();\n context.beginPath();\n context.fillStyle = 'red';\n context.moveTo(barX + barWidth - triangleSize, barY);\n context.lineTo(barX + barWidth, barY);\n context.lineTo(barX + barWidth, barY + triangleSize);\n context.fill();\n context.restore();\n break;\n }\n case FlameChartDecorationType.HIDDEN_DESCENDANTS_ARROW: {\n context.save();\n context.beginPath();\n context.rect(barX, barY, barWidth, barHeight);\n const arrowSize = barHeight;\n // If the bar is wider than double the arrow button, draw the button. Otherwise, draw a corner triangle to indicate some entries are hidden\n if (barWidth > arrowSize * 2) {\n const triangleSize = 7;\n const triangleHorizontalPadding = 5;\n const triangleVerrticalPadding = 6;\n context.clip();\n context.beginPath();\n context.fillStyle = '#474747';\n const arrowAX = barX + barWidth - triangleSize - triangleHorizontalPadding;\n const arrowAY = barY + triangleVerrticalPadding;\n context.moveTo(arrowAX, arrowAY);\n const arrowBX = barX + barWidth - triangleHorizontalPadding;\n const arrowBY = barY + triangleVerrticalPadding;\n context.lineTo(arrowBX, arrowBY);\n const arrowCX = barX + barWidth - triangleHorizontalPadding - triangleSize / 2;\n const arrowCY = barY + barHeight - triangleVerrticalPadding;\n context.lineTo(arrowCX, arrowCY);\n } else {\n const triangleSize = 8;\n context.clip();\n context.beginPath();\n context.fillStyle = '#474747';\n context.moveTo(barX + barWidth - triangleSize, barY + barHeight);\n context.lineTo(barX + barWidth, barY + barHeight);\n context.lineTo(barX + barWidth, barY + triangleSize);\n }\n context.fill();\n context.restore();\n break;\n }\n }\n }\n }\n context.restore();\n }\n\n /**\n * Draws (but does not fill) a rectangle for a given event onto the provided\n * context. Because sometimes we need to draw a portion of the rect, it\n * optionally allows the start X and width of the rect to be overriden by\n * custom pixel values. It currently does not allow the start Y and height to\n * be changed because we have no need to do so, but this can be extended in\n * the future if required.\n **/\n #drawEventRect(\n context: CanvasRenderingContext2D, timelineData: FlameChartTimelineData, entryIndex: number, overrides?: {\n startX?: number,\n width?: number,\n }): void {\n const {entryTotalTimes, entryStartTimes, entryLevels} = timelineData;\n const duration = entryTotalTimes[entryIndex];\n if (isNaN(duration)) {\n return;\n }\n const entryStartTime = entryStartTimes[entryIndex];\n const barX = overrides?.startX ?? this.timeToPositionClipped(entryStartTime);\n const barLevel = entryLevels[entryIndex];\n const barHeight = this.#eventBarHeight(timelineData, entryIndex);\n const barY = this.levelToOffset(barLevel);\n const barWidth = overrides?.width ?? this.#eventBarWidth(timelineData, entryIndex);\n if (barWidth === 0) {\n return;\n }\n // We purposefully leave a 1px gap off the height so there is a small gap\n // visually between events vertically in the panel.\n // Similarly, we leave 0.5 pixels off the width so that there is a small\n // gap between events. Otherwise if a trace has a lot of events it looks\n // like one solid block and is not very easy to distinguish when events\n // start and end.\n context.rect(barX, barY, barWidth - 0.5, barHeight - 1);\n }\n\n #eventBarHeight(timelineData: FlameChartTimelineData, entryIndex: number): number {\n const {entryLevels} = timelineData;\n const barLevel = entryLevels[entryIndex];\n const barHeight = this.levelHeight(barLevel);\n return barHeight;\n }\n\n entryWidth(entryIndex: number): number {\n const timelineData = this.timelineData();\n if (!timelineData) {\n return 0;\n }\n return this.#eventBarWidth(timelineData, entryIndex);\n }\n\n #eventBarWidth(timelineData: FlameChartTimelineData, entryIndex: number): number {\n const {entryTotalTimes, entryStartTimes} = timelineData;\n const duration = entryTotalTimes[entryIndex];\n const entryStartTime = entryStartTimes[entryIndex];\n const barXStart = this.timeToPositionClipped(entryStartTime);\n const barXEnd = this.timeToPositionClipped(entryStartTime + duration);\n // Ensure that the width of the bar is at least one pixel.\n const barWidth = Math.max(barXEnd - barXStart, 1);\n return barWidth;\n }\n\n /**\n * Preprocess the data to be drawn to speed the rendering time.\n * Especifically:\n * - Groups events into color buckets.\n * - Discards non visible events.\n * - Gathers marker events (LCP, FCP, DCL, etc.).\n * - Gathers event titles that should be rendered.\n */\n private getDrawableData(context: CanvasRenderingContext2D, timelineData: FlameChartTimelineData):\n {colorBuckets: Map<string, {indexes: number[]}>, titleIndices: number[], markerIndices: number[]} {\n // These are the event indexes of events that we are drawing onto the timeline that:\n // 1) have text within them\n // 2) are visually wide enough in pixels to make it worth rendering the text.\n const titleIndices: number[] = [];\n\n // These point to events that represent single points in the timeline, most\n // often an event such as DCL/LCP.\n const markerIndices: number[] = [];\n const {entryTotalTimes, entryStartTimes} = timelineData;\n\n const top = this.chartViewport.scrollOffset();\n\n const textPadding = this.textPadding;\n // How wide in pixels / long in duration an event needs to be to make it\n // worthwhile rendering the text inside it.\n const minTextWidth = 2 * textPadding + UI.UIUtils.measureTextWidth(context, '…');\n const minTextWidthDuration = this.chartViewport.pixelToTimeOffset(minTextWidth);\n\n // As we parse each event, we bucket them into groups based on the color we\n // will render them with. The key of this map will be a color, and all\n // events stored in the `indexes` array for that color will be painted as\n // such. This way, when rendering events, we can render them based on\n // color, and ensure the minimum amount of changes to context.fillStyle.\n const colorBuckets = new Map<string, {indexes: number[]}>();\n for (let level = 0; level < this.dataProvider.maxStackDepth(); ++level) {\n // Since tracks can be reordered the |visibleLevelOffsets| is not necessarily sorted, so we need to check all levels.\n // Note that to check if a level is off the top of the screen, we can't\n // just check its offset, because then the level will disappear the\n // moment it is 1px off the top of the screen. So instead we check that\n // the entire height of the level is off the top of the screen before\n // skipping it.\n if (this.levelToOffset(level) + this.levelHeight(level) < top ||\n this.levelToOffset(level) > top + this.offsetHeight) {\n continue;\n }\n if (!this.visibleLevels || !this.visibleLevels[level]) {\n continue;\n }\n if (!this.timelineLevels) {\n break;\n }\n\n // Entries are ordered by start time within a level, so find the last visible entry.\n const levelIndexes = this.timelineLevels[level];\n const rightIndexOnLevel = Platform.ArrayUtilities.lowerBound(\n levelIndexes, this.chartViewport.windowRightTime(),\n (time, entryIndex) => time - entryStartTimes[entryIndex]) -\n 1;\n let lastDrawOffset = Infinity;\n for (let entryIndexOnLevel = rightIndexOnLevel; entryIndexOnLevel >= 0; --entryIndexOnLevel) {\n const entryIndex = levelIndexes[entryIndexOnLevel];\n const duration = entryTotalTimes[entryIndex];\n // Markers are single events in time (e.g. LCP): they do not have a duration.\n if (isNaN(duration)) {\n markerIndices.push(entryIndex);\n continue;\n }\n\n if (duration >= minTextWidthDuration || (this.forceDecorationCache && this.forceDecorationCache[entryIndex])) {\n // If the event is big enough visually to have its text rendered,\n // or if it's in the array of event indexes that we forcibly render (as defined by the data provider)\n // then we store its index. Later on, we'll loop through all\n // `titleIndices` to render the text for each event.\n titleIndices.push(entryIndex);\n }\n\n const entryStartTime = entryStartTimes[entryIndex];\n const entryOffsetRight = entryStartTime + duration;\n if (entryOffsetRight <= this.chartViewport.windowLeftTime()) {\n break;\n }\n\n const barX = this.timeToPositionClipped(entryStartTime);\n // Check if the entry entirely fits into an already drawn pixel, we can just skip drawing it.\n if (barX >= lastDrawOffset) {\n continue;\n }\n lastDrawOffset = barX;\n\n if (this.entryColorsCache) {\n const color = this.entryColorsCache[entryIndex];\n let bucket = colorBuckets.get(color);\n if (!bucket) {\n bucket = {indexes: []};\n colorBuckets.set(color, bucket);\n }\n bucket.indexes.push(entryIndex);\n }\n }\n }\n return {colorBuckets, titleIndices, markerIndices};\n }\n\n /**\n * The function to draw the group headers. It will draw the title by default.\n * And when a group is hovered, it will add a edit button.\n * And will draw the move up/down, hide and save button if user enter the editing mode.\n * @param width\n * @param height\n * @param hoveredGroupIndex This is used to show the edit icon for hovered group. If it is undefined or -1, it means\n * there is no group being hovered.\n */\n private drawGroupHeaders(width: number, height: number): void {\n const context = (this.canvas.getContext('2d') as CanvasRenderingContext2D);\n const top = this.chartViewport.scrollOffset();\n const ratio = window.devicePixelRatio;\n if (!this.rawTimelineData) {\n return;\n }\n\n const groups = this.rawTimelineData.groups || [];\n if (!groups.length) {\n return;\n }\n\n const groupOffsets = this.groupOffsets;\n if (groupOffsets === null || groupOffsets === undefined) {\n return;\n }\n const lastGroupOffset = groupOffsets[groupOffsets.length - 1];\n\n context.save();\n context.scale(ratio, ratio);\n context.translate(0, -top);\n context.font = this.#font;\n\n context.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container');\n // Fill the gap between groups.\n this.forEachGroupInViewport((offset, index, group) => {\n const paddingHeight = group.style.padding;\n if (paddingHeight < 5) {\n return;\n }\n context.fillRect(0, offset - paddingHeight + 2, width, paddingHeight - 4);\n });\n // Fill the gap between last group and the bottom of canvas view.\n if (groups.length && lastGroupOffset < top + height) {\n context.fillRect(0, lastGroupOffset + 2, width, top + height - lastGroupOffset);\n }\n\n // The separating line between top level groups.\n context.strokeStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-neutral-container');\n context.beginPath();\n this.forEachGroupInViewport((offset, index, group, isFirst) => {\n if (isFirst || group.style.padding < 4) {\n return;\n }\n hLine(offset - 2.5);\n });\n hLine(lastGroupOffset + 1.5);\n context.stroke();\n\n this.forEachGroupInViewport((offset, index, group) => {\n if (group.style.useFirstLineForOverview) {\n return;\n }\n if (!this.isGroupCollapsible(index) || group.expanded) {\n if (!group.style.shareHeaderLine && this.isGroupFocused(index)) {\n context.fillStyle = group.style.backgroundColor;\n context.fillRect(0, offset, width, group.style.height);\n }\n return;\n }\n let nextGroup = index + 1;\n while (nextGroup < groups.length && groups[nextGroup].style.nestingLevel > group.style.nestingLevel) {\n nextGroup++;\n }\n const endLevel = nextGroup < groups.length ? groups[nextGroup].startLevel : this.dataProvider.maxStackDepth();\n this.drawCollapsedOverviewForGroup(group, offset, endLevel);\n });\n\n context.save();\n // If there is only one track, we won't allow the track reordering or hiding.\n const trackConfigurationAllowed = groups.length > 1;\n\n // When it is normal mode, there are no icons to the left of a track.\n // When it is in edit mode, there are three icons to customize the groups.\n const iconsWidth = this.#inTrackConfigEditMode ? EDIT_MODE_TOTAL_ICON_WIDTH : 0;\n this.forEachGroupInViewport((offset, index, group) => {\n context.font = this.#font;\n if (this.isGroupCollapsible(index) && !group.expanded || group.style.shareHeaderLine) {\n // In edit mode, we draw an extra rectangle for the save icon.\n const labelBackgroundWidth = this.labelWidthForGroup(context, group);\n if (this.isGroupFocused(index)) {\n context.fillStyle =\n ThemeSupport.ThemeSupport.instance().getComputedValue('--selected-group-background', this.contentElement);\n } else {\n const parsedColor = Common.Color.parse(group.style.backgroundColor);\n if (parsedColor) {\n context.fillStyle = (parsedColor.setAlpha(0.8).asString() as string);\n }\n }\n context.fillRect(\n iconsWidth + HEADER_LEFT_PADDING, offset + HEADER_LABEL_Y_PADDING, labelBackgroundWidth,\n group.style.height - 2 * HEADER_LABEL_Y_PADDING);\n }\n context.fillStyle = (this.#inTrackConfigEditMode && group.hidden) ?\n ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-token-subtle', this.contentElement) :\n group.style.color;\n\n // The arrow is drawn from the center, so the indent is in fact the center of the arrow. See `drawExpansionArrow`\n // function to understand how we draw the arrow.\n // So the header looks like this:\n // |ICON_WIDTH|expansionArrowIndent * (nesting level + 1)|\n // |headerLeftPadding|EDIT ICON| |Arrow|LabelXPadding|Title|LabelXPadding|\n // ^ titleStart\n const titleStart = iconsWidth + EXPANSION_ARROW_INDENT * (group.style.nestingLevel + 1) + ARROW_SIDE / 2 +\n HEADER_LABEL_X_PADDING;\n context.fillText(group.name, titleStart, offset + group.style.height - this.textBaseline);\n if (this.#inTrackConfigEditMode && group.hidden) {\n // Draw a strikethrough line for the hidden tracks.\n context.fillRect(\n titleStart, offset + group.style.height / 2, UI.UIUtils.measureTextWidth(context, group.name), 1);\n }\n\n // The icon and track title will look like this\n // Normal mode:\n // Track title\n // Edit mode:\n // [ Up ][Down][Hide]Track title\n if (trackConfigurationAllowed) {\n if (this.#inTrackConfigEditMode) {\n const iconColor = group.hidden ? '--sys-color-token-subtle' : '--sys-color-on-surface';\n // We only allow to reorder the top level groups.\n if (group.style.nestingLevel === 0) {\n drawIcon(UP_ICON_LEFT, offset, moveUpIconPath, iconColor);\n drawIcon(DOWN_ICON_LEFT, offset, moveDownIconPath, iconColor);\n }\n // If this is the last visible top-level group, we will disable the hide action.\n drawIcon(\n HIDE_ICON_LEFT, offset, group.hidden ? showIconPath : hideIconPath,\n this.groupIsLastVisibleTopLevel(group) ? '--sys-color-state-disabled' : iconColor);\n }\n }\n });\n context.restore();\n\n context.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-token-subtle');\n this.forEachGroupInViewport((offset, index, group) => {\n if (this.isGroupCollapsible(index)) {\n drawExpansionArrow.call(\n this, iconsWidth + EXPANSION_ARROW_INDENT * (group.style.nestingLevel + 1),\n offset + group.style.height - this.textBaseline - ARROW_SIDE / 2,\n this.#inTrackConfigEditMode ? false : Boolean(group.expanded));\n }\n });\n\n context.strokeStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-neutral-outline');\n context.beginPath();\n context.stroke();\n\n this.forEachGroupInViewport((offset, index, group, isFirst, groupHeight) => {\n if (this.isGroupFocused(index)) {\n const lineWidth = 2;\n const bracketLength = 10;\n context.fillStyle =\n ThemeSupport.ThemeSupport.instance().getComputedValue('--selected-group-border', this.contentElement);\n // The selected group indicator will be blue and in this kind of shape. And we will draw it with three\n // rectangles.\n // +-+---+\n // |-|---+\n // | |\n // | |\n // |-|---+\n // +-+---+\n\n // The vertical stroke\n context.fillRect(0, offset - lineWidth, lineWidth, groupHeight - group.style.padding + 2 * lineWidth);\n // The top horizontal stroke\n context.fillRect(0, offset - lineWidth, bracketLength, lineWidth);\n // The top horizontal stroke\n context.fillRect(0, offset + groupHeight - group.style.padding, bracketLength, lineWidth);\n }\n });\n\n context.restore();\n\n function hLine(y: number): void {\n context.moveTo(0, y);\n context.lineTo(width, y);\n }\n\n function drawExpansionArrow(this: FlameChart, x: number, y: number, expanded: boolean): void {\n // We will draw a equilateral triangle, so first calculate the height of the triangle.\n const arrowHeight = ARROW_SIDE * Math.sqrt(3) / 2;\n const arrowCenterOffset = Math.round(arrowHeight / 2);\n context.save();\n context.beginPath();\n context.translate(x, y);\n context.rotate(expanded ? Math.PI / 2 : 0);\n // The final triangle will be this shape: (the rotation will be handled by `context.rotate`)\n // |\\\n // | \\\n // | /\n // |/\n\n // Move to the top vertex\n context.moveTo(-arrowCenterOffset, -ARROW_SIDE / 2);\n // Line to the bottom vertex\n context.lineTo(-arrowCenterOffset, ARROW_SIDE / 2);\n // Line to the right vertex\n context.lineTo(arrowHeight - arrowCenterOffset, 0);\n context.fill();\n context.restore();\n }\n\n function drawIcon(x: number, y: number, pathData: string, iconColor: string = '--sys-color-on-surface'): void {\n const p = new Path2D(pathData);\n\n context.save();\n context.translate(x, y);\n // This color is same as the background of the whole flame chart.\n context.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue('--sys-color-cdt-base-container');\n context.fillRect(0, 0, EDIT_ICON_WIDTH, EDIT_ICON_WIDTH);\n\n context.fillStyle = ThemeSupport.ThemeSupport.instance().getComputedValue(iconColor);\n // The pathData from front_end/images folder is for a 20 pixel icon.\n // So we add a scale to draw the icon in a correct size.\n const scale = EDIT_ICON_WIDTH / 20;\n context.scale(scale, scale);\n context.fill(p);\n context.restore();\n }\n }\n\n /**\n * Draws page load events in the Timings track (LCP, FCP, DCL, etc.)\n */\n private drawMarkers(context: CanvasRenderingContext2D, timelineData: FlameChartTimelineData, markerIndices: number[]):\n void {\n const {entryStartTimes, entryLevels} = timelineData;\n this.markerPositions.clear();\n context.textBaseline = 'alphabetic';\n context.save();\n context.beginPath();\n let lastMarkerLevel = -1;\n let lastMarkerX: number = -Infinity;\n // Markers are sorted top to bottom, right to left.\n for (let m = markerIndices.length - 1; m >= 0; --m) {\n const entryIndex = markerIndices[m];\n const title = this.dataProvider.entryTitle(entryIndex);\n if (!title) {\n continue;\n }\n const entryStartTime = entryStartTimes[entryIndex];\n const level = entryLevels[entryIndex];\n if (lastMarkerLevel !== level) {\n lastMarkerX = -Infinity;\n }\n const x = Math.max(this.chartViewport.timeToPosition(entryStartTime), lastMarkerX);\n const y = this.levelToOffset(level);\n const h = this.levelHeight(level);\n const padding = 4;\n const width = Math.ceil(UI.UIUtils.measureTextWidth(context, title)) + 2 * padding;\n lastMarkerX = x + width + 1;\n lastMarkerLevel = level;\n this.markerPositions.set(entryIndex, {x, width});\n context.fillStyle = this.dataProvider.entryColor(entryIndex);\n context.fillRect(x, y, width, h - 1);\n context.fillStyle = 'white';\n context.fillText(title, x + padding, y + h - this.textBaseline);\n }\n context.strokeStyle = 'rgba(0, 0, 0, 0.2)';\n context.stroke();\n context.restore();\n }\n\n /**\n * Draws the titles of trace events in the timeline. Also calls `decorateEntry` on the data\n * provider, which can do any custom drawing on the corresponding entry's area (e.g. draw screenshots\n * in the Performance Panel timeline).\n *\n * Takes in the width of the entire canvas so that we know if an event does\n * not fit into the viewport entirely, the max width we can draw is that\n * width, not the width of the event itself.\n */\n private drawEventTitles(\n context: CanvasRenderingContext2D, timelineData: FlameChartTimelineData, titleIndices: number[],\n canvasWidth: number): void {\n const timeToPixel = this.chartViewport.timeToPixel();\n const textPadding = this.textPadding;\n context.save();\n context.beginPath();\n const {entryStartTimes, entryLevels} = timelineData;\n for (let i = 0; i < titleIndices.length; ++i) {\n const entryIndex = titleIndices[i];\n const entryStartTime = entryStartTimes[entryIndex];\n const barX = this.timeToPositionClipped(entryStartTime);\n // Ensure that the title does not go off screen, if the width of the\n // event is wider than the width of the canvas, use the canvas width as\n // our maximum width.\n const barWidth = Math.min(this.#eventBarWidth(timelineData, entryIndex), canvasWidth);\n const barLevel = entryLevels[entryIndex];\n const barY = this.levelToOffset(barLevel);\n let text = this.dataProvider.entryTitle(entryIndex);\n const barHeight = this.#eventBarHeight(timelineData, entryIndex);\n if (text && text.length) {\n context.font = this.#font;\n const hasArrowDecoration =\n this.entryHasDecoration(entryIndex, FlameChartDecorationType.HIDDEN_DESCENDANTS_ARROW);\n // Set the max width to be the width of the bar plus some padding. If the bar has an arrow decoration and the bar is wide enough for the larger\n // version of the decoration that is a square button, also substract the width of the decoration.\n // Because the decoration is square, it's width is equal to this.barHeight\n const maxBarWidth = (hasArrowDecoration && barWidth > barHeight * 2) ? barWidth - textPadding - this.barHeight :\n barWidth - 2 * textPadding;\n text = UI.UIUtils.trimTextMiddle(\n context,\n text,\n maxBarWidth,\n );\n }\n const unclippedBarX = this.chartViewport.timeToPosition(entryStartTime);\n if (this.dataProvider.decorateEntry(\n entryIndex, context, text, barX, barY, barWidth, barHeight, unclippedBarX, timeToPixel)) {\n continue;\n }\n if (!text || !text.length) {\n continue;\n }\n context.fillStyle = this.dataProvider.textColor(entryIndex);\n context.fillText(text, barX + textPadding, barY + barHeight - this.textBaseline);\n }\n\n context.restore();\n }\n\n /**\n * @callback GroupCallback\n * @param groupTop pixels between group top and the top of the flame chart.\n * @param groupIndex\n * @param group\n * @param isFirstGroup if the group is the first one of this nesting level.\n * @param height pixels of height of this group\n */\n /**\n * Process the pixels of start and end, and other data of each group, which are used in drawing the group.\n * @param {GroupCallback} callback\n */\n private forEachGroup(\n callback: (groupTop: number, groupIndex: number, group: Group, isFirstGroup: boolean, height: number) => void):\n void {\n if (!this.rawTimelineData) {\n return;\n }\n const groups = this.rawTimelineData.groups || [];\n if (!groups.length) {\n return;\n }\n const groupOffsets = this.groupOffsets;\n if (!groupOffsets) {\n return;\n }\n\n const groupStack: {\n nestingLevel: number,\n visible: boolean,\n }[] = [{nestingLevel: -1, visible: true}];\n for (let i = 0; i < groups.length; ++i) {\n const groupTop = groupOffsets[i];\n const group = groups[i];\n let firstGroup = true;\n let last: {\n nestingLevel: number,\n visible: boolean,\n } = groupStack[groupStack.length - 1];\n while (last && last.nestingLevel >= group.style.nestingLevel) {\n groupStack.pop();\n firstGroup = false;\n last = groupStack[groupStack.length - 1];\n }\n last = groupStack[groupStack.length - 1];\n const parentGroupVisible = last ? last.visible : false;\n const thisGroupVisible = !group.hidden && parentGroupVisible && (!this.isGroupCollapsible(i) || group.expanded);\n groupStack.push({nestingLevel: group.style.nestingLevel, visible: Boolean(thisGroupVisible)});\n\n if (!this.#groupTreeRoot) {\n return;\n }\n const sortedGroupIndexes: number[] = [];\n\n function traverse(root: GroupTreeNode): void {\n sortedGroupIndexes.push(root.index);\n for (const child of root.children) {\n traverse(child);\n }\n }\n traverse(this.#groupTreeRoot);\n // Skip the one whose index is -1, because we added to represent the top\n // level to be the parent of all groups.\n sortedGroupIndexes.shift();\n\n // This shouldn't happen, because the tree should have the fake root and all groups. Add a sanity check to avoid\n // error.\n if (sortedGroupIndexes.length !== groups.length) {\n console.warn('The data from the group tree doesn\\'t match the data from DataProvider.');\n return;\n }\n\n // Add an extra index, which is equal to the length of the |groups|, this\n // will be used for the coordinates after the last group.\n // If the coordinates after the last group, it will return in later check\n // `groupIndex >= groups.length` anyway. But add one more element to make\n // this array same length as the |groupOffsets|.\n sortedGroupIndexes.push(groups.length);\n\n const currentIndex = sortedGroupIndexes.indexOf(i);\n const nextOffset = groupOffsets[sortedGroupIndexes[currentIndex + 1]];\n // In edit mode all the groups are visible.\n if (!this.#inTrackConfigEditMode && (!parentGroupVisible || group.hidden)) {\n continue;\n }\n callback(groupTop, i, group, firstGroup, nextOffset - groupTop);\n }\n }\n\n private forEachGroupInViewport(\n callback: (offset: number, index: number, group: Group, isFirst: boolean, groupHeight: number) => void): void {\n const top = this.chartViewport.scrollOffset();\n this.forEachGroup((groupTop, index, group, firstGroup, height) => {\n if (groupTop - group.style.padding > top + this.offsetHeight) {\n return;\n }\n if (groupTop + height < top) {\n return;\n }\n callback(groupTop, index, group, firstGroup, height);\n });\n }\n\n /**\n * Returns the width of the title label of the group, which include the left padding, arrow and the group header text.\n * This function is public for test reason.\n * |ICON_WIDTH|expansionArrowIndent * (nestingLevel + 1)|\n * |headerLeftPadding|EDIT ICON| |Arrow|LabelXPadding|Title|LabelXPadding|\n * |<-- labelWidth -->|\n * @param context canvas context\n * @param group\n * @returns the width of the label of the group.\n */\n labelWidthForGroup(context: CanvasRenderingContext2D, group: Group): number {\n return EXPANSION_ARROW_INDENT * (group.style.nestingLevel + 1) + ARROW_SIDE / 2 + HEADER_LABEL_X_PADDING +\n UI.UIUtils.measureTextWidth(context, group.name) + HEADER_LABEL_X_PADDING - HEADER_LEFT_PADDING;\n }\n\n private drawCollapsedOverviewForGroup(group: Group, y: number, endLevel: number): void {\n const range = new Common.SegmentedRange.SegmentedRange<string>(mergeCallback);\n const timeWindowLeft = this.chartViewport.windowLeftTime();\n const timeWindowRight = this.chartViewport.windowRightTime();\n const context = (this.canvas.getContext('2d') as CanvasRenderingContext2D);\n const groupBarHeight = group.style.height;\n if (!this.rawTimelineData) {\n return;\n }\n const entryStartTimes = this.rawTimelineData.entryStartTimes;\n const entryTotalTimes = this.rawTimelineData.entryTotalTimes;\n const timeToPixel = this.chartViewport.timeToPixel();\n\n for (let level = group.startLevel; level < endLevel; ++level) {\n const levelIndexes: number[] = this.timelineLevels ? this.timelineLevels[level] : [];\n const rightIndexOnLevel =\n Platform.ArrayUtilities.lowerBound(\n levelIndexes, timeWindowRight, (time, entryIndex) => time - entryStartTimes[entryIndex]) -\n 1;\n let lastDrawOffset: number = Infinity;\n\n for (let entryIndexOnLevel = rightIndexOnLevel; entryIndexOnLevel >= 0; --entryIndexOnLevel) {\n const entryIndex = levelIndexes[entryIndexOnLevel];\n const entryStartTime = entryStartTimes[entryIndex];\n const barX = this.timeToPositionClipped(entryStartTime);\n const entryEndTime = entryStartTime + entryTotalTimes[entryIndex];\n if (isNaN(entryEndTime) || barX >= lastDrawOffset) {\n continue;\n }\n if (entryEndTime <= timeWindowLeft) {\n break;\n }\n lastDrawOffset = barX;\n const color = this.entryColorsCache ? this.entryColorsCache[entryIndex] : '';\n const endBarX = this.timeToPositionClipped(entryEndTime);\n if (group.style.useDecoratorsForOverview && this.dataProvider.forceDecoration(entryIndex)) {\n const unclippedBarX = this.chartViewport.timeToPosition(entryStartTime);\n const barWidth = this.#eventBarWidth(this.rawTimelineData, entryIndex);\n\n context.beginPath();\n context.fillStyle = color;\n context.fillRect(barX, y, barWidth, groupBarHeight - 1);\n this.dataProvider.decorateEntry(\n entryIndex, context, '', barX, y, barWidth, groupBarHeight, unclippedBarX, timeToPixel);\n continue;\n }\n range.append(new Common.SegmentedRange.Segment(barX, endBarX, color));\n }\n }\n\n const segments = range.segments().slice().sort((a, b) => a.data.localeCompare(b.data));\n let lastColor;\n context.beginPath();\n for (let i = 0; i < segments.length; ++i) {\n const segment = segments[i];\n if (lastColor !== segments[i].data) {\n context.fill();\n context.beginPath();\n lastColor = segments[i].data;\n context.fillStyle = lastColor;\n }\n context.rect(segment.begin, y, segment.end - segment.begin, groupBarHeight);\n }\n context.fill();\n\n function mergeCallback<T>(a: Common.SegmentedRange.Segment<T>, b: Common.SegmentedRange.Segment<T>):\n Common.SegmentedRange.Segment<T>|null {\n return a.data === b.data && a.end + 0.4 > b.end ? a : null;\n }\n }\n\n private drawFlowEvents(context: CanvasRenderingContext2D, timelineData: FlameChartTimelineData): void {\n const td = this.timelineData();\n if (!td) {\n return;\n }\n\n const {entryTotalTimes, entryStartTimes, entryLevels} = timelineData;\n const ratio = window.devicePixelRatio;\n const top = this.chartViewport.scrollOffset();\n const arrowLineWidth = 6;\n const arrowWidth = 3;\n\n context.save();\n context.scale(ratio, ratio);\n context.translate(0, -top);\n\n context.fillStyle = '#7f5050';\n context.strokeStyle = '#7f5050';\n\n for (let i = 0; i < td.initiatorsData.length; ++i) {\n const initiatorsData = td.initiatorsData[i];\n\n const initiatorArrowStartTime =\n entryStartTimes[initiatorsData.initiatorIndex] + entryTotalTimes[initiatorsData.initiatorIndex];\n const initiatorArrowEndTime = entryStartTimes[initiatorsData.eventIndex];\n\n // Do not draw the initiator if it is out of the viewport\n if (initiatorArrowEndTime < this.chartViewport.windowLeftTime()) {\n continue;\n }\n let startX = this.chartViewport.timeToPosition(initiatorArrowStartTime);\n let endX = this.chartViewport.timeToPosition(initiatorArrowEndTime);\n\n // Draw a circle arround 'collapsed entries' arrow to indicate that the initiated entry is hidden\n if (initiatorsData.isInitiatorHidden) {\n const {circleEndX} = this.drawCircleArroundCollapseArrow(initiatorsData.initiatorIndex, context, timelineData);\n // If the circle exists around the initiator, start the initiator arrow from the circle end\n if (circleEndX) {\n startX = circleEndX;\n }\n }\n if (initiatorsData.isEntryHidden) {\n const {circleStartX} = this.drawCircleArroundCollapseArrow(initiatorsData.eventIndex, context, timelineData);\n // If the circle exists around the initiated event, draw the initiator arrow until the circle beginning\n if (circleStartX) {\n endX = circleStartX;\n }\n }\n\n const startLevel = entryLevels[initiatorsData.initiatorIndex];\n const endLevel = entryLevels[initiatorsData.eventIndex];\n const startY = this.levelToOffset(startLevel) + this.levelHeight(startLevel) / 2;\n const endY = this.levelToOffset(endLevel) + this.levelHeight(endLevel) / 2;\n const lineLength = endX - startX;\n\n // Draw an arrow in an 'elbow connector' shape\n context.beginPath();\n context.moveTo(startX, startY);\n context.lineTo(startX + lineLength / 2, startY);\n context.lineTo(startX + lineLength / 2, endY);\n context.lineTo(endX, endY);\n context.stroke();\n\n // Make line an arrow if the line is long enough to fit the arrow head. Othewise, draw a thinner line without the arrow head.\n if (lineLength > arrowWidth) {\n context.lineWidth = 0.5;\n context.beginPath();\n context.moveTo(endX, endY);\n context.lineTo(endX - arrowLineWidth, endY - 3);\n context.lineTo(endX - arrowLineWidth, endY + 3);\n context.fill();\n } else {\n context.lineWidth = 0.2;\n }\n }\n context.restore();\n }\n\n private drawCircleArroundCollapseArrow(\n entryIndex: number, context: CanvasRenderingContext2D,\n timelineData: FlameChartTimelineData): {circleStartX?: number, circleEndX?: number} {\n const decorationsForEvent = timelineData.entryDecorations.at(entryIndex);\n // The circle is only drawn when the initiator arrow is going to/from some hidden entry. Make sure that the entry also has a decoration for hidden children.\n if (!decorationsForEvent ||\n !decorationsForEvent.find(\n decoration => decoration.type === FlameChartDecorationType.HIDDEN_DESCENDANTS_ARROW)) {\n // This should not happen, break if it does.\n return {};\n }\n\n const {entryStartTimes, entryLevels} = timelineData;\n // The large version of 'hidden entries' is displayed\n // only when the bar width is over double the height.\n // We do not want to draw the circle if the arrow is not visible.\n const barWidth = this.#eventBarWidth(timelineData, entryIndex);\n if (barWidth < this.barHeight * 2) {\n return {};\n }\n\n const entryStartTime = entryStartTimes[entryIndex];\n const barX = this.timeToPositionClipped(entryStartTime);\n const barLevel = entryLevels[entryIndex];\n const barHeight = this.#eventBarHeight(timelineData, entryIndex);\n const barY = this.levelToOffset(barLevel);\n\n context.save();\n context.beginPath();\n context.rect(barX, barY, barWidth, barHeight);\n context.clip();\n context.lineWidth = 1;\n context.beginPath();\n context.fillStyle = '#474747';\n const triangleCenterX = barX + barWidth - this.barHeight / 2;\n const triangleCenterY = barY + this.barHeight / 2;\n const circleRadius = 6;\n context.beginPath();\n context.arc(triangleCenterX, triangleCenterY, circleRadius, 0, 2 * Math.PI);\n context.stroke();\n context.restore();\n\n return {circleStartX: triangleCenterX - circleRadius, circleEndX: triangleCenterX + circleRadius};\n }\n\n /**\n * Draws the vertical dashed lines in the timeline marking where the \"Marker\" events\n * happened in time.\n */\n private drawMarkerLines(): void {\n const timelineData = this.timelineData();\n if (!timelineData) {\n return;\n }\n const markers = timelineData.markers;\n const left = this.markerIndexBeforeTime(this.minimumBoundary());\n const rightBoundary = this.maximumBoundary();\n const timeToPixel = this.chartViewport.timeToPixel();\n\n const context = (this.canvas.getContext('2d') as CanvasRenderingContext2D);\n context.save();\n const ratio = window.devicePixelRatio;\n context.scale(ratio, ratio);\n context.translate(0, 3);\n const height = RulerHeight - 1;\n for (let i = left; i < markers.length; i++) {\n const timestamp = markers[i].startTime();\n if (timestamp > rightBoundary) {\n break;\n }\n markers[i].draw(context, this.chartViewport.timeToPosition(timestamp), height, timeToPixel);\n }\n context.restore();\n }\n\n private updateMarkerHighlight(): void {\n const element = this.markerHighlighElement;\n if (element.parentElement) {\n element.remove();\n }\n const markerIndex = this.highlightedMarkerIndex;\n if (markerIndex === -1) {\n return;\n }\n const timelineData = this.timelineData();\n if (!timelineData) {\n return;\n }\n const marker = timelineData.markers[markerIndex];\n const barX = this.timeToPositionClipped(marker.startTime());\n UI.Tooltip.Tooltip.install(element, marker.title() || '');\n const style = element.style;\n style.left = barX + 'px';\n style.backgroundColor = marker.color();\n this.viewportElement.appendChild(element);\n }\n\n private processTimelineData(timelineData: FlameChartTimelineData|null): void {\n if (!timelineData) {\n this.timelineLevels = null;\n this.visibleLevelOffsets = null;\n this.visibleLevels = null;\n this.groupOffsets = null;\n this.rawTimelineData = null;\n this.forceDecorationCache = null;\n this.entryColorsCache = null;\n this.rawTimelineDataLength = 0;\n this.#groupTreeRoot = null;\n this.selectedGroupIndex = -1;\n this.keyboardFocusedGroup = -1;\n this.flameChartDelegate.updateSelectedGroup(this, null);\n return;\n }\n\n this.rawTimelineData = timelineData;\n this.rawTimelineDataLength = timelineData.entryStartTimes.length;\n this.forceDecorationCache = new Int8Array(this.rawTimelineDataLength);\n this.entryColorsCache = new Array(this.rawTimelineDataLength);\n for (let i = 0; i < this.rawTimelineDataLength; ++i) {\n this.forceDecorationCache[i] = this.dataProvider.forceDecoration(i) ? 1 : 0;\n this.entryColorsCache[i] = this.dataProvider.entryColor(i);\n }\n\n const entryCounters = new Uint32Array(this.dataProvider.maxStackDepth() + 1);\n for (let i = 0; i < timelineData.entryLevels.length; ++i) {\n ++entryCounters[timelineData.entryLevels[i]];\n }\n const levelIndexes = new Array(entryCounters.length);\n for (let i = 0; i < levelIndexes.length; ++i) {\n levelIndexes[i] = new Uint32Array(entryCounters[i]);\n entryCounters[i] = 0;\n }\n\n for (let i = 0; i < timelineData.entryLevels.length; ++i) {\n const level = timelineData.entryLevels[i];\n levelIndexes[level][entryCounters[level]++] = i;\n }\n this.timelineLevels = levelIndexes;\n const groups = this.rawTimelineData.groups || [];\n for (let i = 0; i < groups.length; ++i) {\n const expanded = this.groupExpansionState[groups[i].name];\n const hidden = this.groupHiddenState[groups[i].name];\n if (expanded !== undefined) {\n groups[i].expanded = expanded;\n }\n if (hidden !== undefined) {\n groups[i].hidden = hidden;\n }\n }\n\n if (!this.#groupTreeRoot) {\n this.#groupTreeRoot = this.buildGroupTree(groups);\n } else {\n // When the |groupTreeRoot| is already existing, and a \"new\" timeline data comes, this means the new timeline data\n // is just a modification of original, so we should update the tree instead of rebuild it.\n // For example,\n // [\n // { name: 'Test Group 0', startLevel: 0, ...},\n // { name: 'Test Group 1', startLevel: 1, ...},\n // { name: 'Test Group 2', startLevel: 2, ...},\n // ], and [\n // { name: 'Test Group 0', startLevel: 0, ...},\n // { name: 'Test Group 1', startLevel: 2, ...},\n // { name: 'Test Group 2', startLevel: 4, ...},\n // ],\n // are the same.\n // But they and [\n // { name: 'Test Group 0', startLevel: 0, ...},\n // { name: 'Test Group 2', startLevel: 1, ...},\n // { name: 'Test Group 1', startLevel: 2, ...},\n // ] are different.\n // But if the |groups| is changed (this means the group order inside the |groups| is changed), it means the\n // timeline data is a real new one, then please call |reset()| before rendering.\n this.updateGroupTree(groups, this.#groupTreeRoot);\n }\n\n this.updateLevelPositions();\n this.updateHeight();\n\n // If this is a new trace, we will call the reset()(See TimelineFlameChartView > setModel()), which will set the\n // |selectedGroupIndex| to -1.\n // So when |selectedGroupIndex| is not -1, it means it is the same trace file, but might have some modification\n // (like reorder the track, merge an entry, etc).\n if (this.selectedGroupIndex === -1) {\n this.selectedGroupIndex = timelineData.selectedGroup ? groups.indexOf(timelineData.selectedGroup) : -1;\n }\n\n this.keyboardFocusedGroup = this.selectedGroupIndex;\n this.flameChartDelegate.updateSelectedGroup(this, timelineData.selectedGroup);\n }\n\n /**\n * Builds a tree node for a group. For each group the start level is inclusive and the end level is exclusive.\n * @param group\n * @param index index of the group in the |FlameChartTimelineData.groups[]|\n * @param endLevel The end level of this group, which is also the start level of the next group or the end of all\n * groups\n * @returns the tree node for the group\n */\n #buildGroupTreeNode(group: Group, index: number, endLevel: number): GroupTreeNode {\n return {\n index,\n nestingLevel: group.style.nestingLevel,\n startLevel: group.startLevel,\n endLevel,\n children: [],\n };\n }\n\n /**\n * Builds a tree for the given group array, the tree will be builded based on the nesting level.\n * We will add one fake root to represent the top level parent, and the for each tree node, its children means the\n * group nested in. The order of the children matters because it represent the order of groups.\n * So for example if there are Group 0-7, Group 0, 3, 4 have nestingLevel 0, Group 1, 2, 5, 6, 7 have nestingLevel 1.\n * Then we will get a tree like this.\n * -1(fake root to represent the top level parent)\n * / | \\\n * / | \\\n * 0 3 4\n * / \\ / | \\\n * 1 2 5 6 7\n * This function is public for test purpose.\n * @param groups the array of all groups, it should be the one from FlameChartTimelineData\n * @returns the root of the Group tree. The root is the fake one we added, which represent the parent for all groups\n */\n buildGroupTree(groups: Group[]): GroupTreeNode {\n // Add an extra top level. This will be used as a parent for all groups, and\n // will be used to contain the levels that not belong to any group.\n const treeRoot: GroupTreeNode = {\n index: -1,\n nestingLevel: -1,\n startLevel: 0,\n // If there is no |groups| (for example the JS Profiler), it means all the\n // levels belong to the top level, so just use the max level as the end.\n endLevel: groups.length ? groups[0].startLevel : this.dataProvider.maxStackDepth(),\n children: [],\n };\n const groupStack: GroupTreeNode[] = [treeRoot];\n for (let i = 0; i < groups.length; i++) {\n const group = groups[i];\n const currentGroupNestingLevel = group.style.nestingLevel;\n let parentGroup: GroupTreeNode = groupStack[groupStack.length - 1];\n while (parentGroup && parentGroup.nestingLevel >= currentGroupNestingLevel) {\n groupStack.pop();\n parentGroup = groupStack[groupStack.length - 1];\n }\n\n const nextGroup = groups[i + 1];\n // If this group is the last one, it means all the remaining levels belong\n // to this level, so just use the max level as the end.\n const endLevel = nextGroup?.startLevel ?? this.dataProvider.maxStackDepth();\n const currentGroupNode = this.#buildGroupTreeNode(group, i, endLevel);\n parentGroup.children.push(currentGroupNode);\n groupStack.push(currentGroupNode);\n }\n return treeRoot;\n }\n\n /**\n * Updates the tree for the given group array.\n * For a new timeline data, if the groups remains the same (the same here mean the group order inside the |groups|,\n * the start level, style and other attribute can be changed), but other parts are different.\n * For example the |entryLevels[]| or |maxStackDepth| is changed, then we should update the group tree instead of\n * re-build it.\n * So we can keep the order that user manually set.\n * To do this, we go through the tree, and update the start and end level of each group.\n * This function is public for test purpose.\n * @param groups the array of all groups, it should be the one from FlameChartTimelineData\n * @returns the root of the Group tree. The root is the fake one we added, which represent the parent for all groups\n */\n updateGroupTree(groups: Group[], root: GroupTreeNode): void {\n const maxStackDepth = this.dataProvider.maxStackDepth();\n\n function traverse(treeNode: GroupTreeNode): void {\n const index = treeNode.index;\n if (index < 0) {\n // For the extra top level. This will be used as a parent for all\n // groups, so it will start from level 0.\n treeNode.startLevel = 0;\n // If there is no |groups| (for example the JS Profiler), it means all the\n // levels belong to the top level, so just use the max level as the end.\n treeNode.endLevel = groups.length ? groups[0].startLevel : maxStackDepth;\n } else {\n // This shouldn't happen. If this happen, it means the |groups| from data provider is changed. Add a sanity\n // check to avoid error.\n if (!groups[index]) {\n console.warn(\n 'The |groups| is changed. ' +\n 'Please make sure the flamechart is reset after data change in the data provider');\n return;\n }\n treeNode.startLevel = groups[index].startLevel;\n const nextGroup = groups[index + 1];\n // If this group is the last one, it means all the remaining levels belong\n // to this level, so just use the max level as the end.\n treeNode.endLevel = nextGroup?.startLevel ?? maxStackDepth;\n }\n for (const child of treeNode.children) {\n traverse(child);\n }\n }\n traverse(root);\n }\n\n /**\n * Given a tree, do a preorder traversal, and process the group and the levels in this group.\n * So for a tree like this:\n * -1\n * / | \\\n * / | \\\n * 0 3 4\n * / \\ / | \\\n * 1 2 5 6 7\n * The traverse order will be: -1, 0, 1, 2, 3, 4, 5, 6, 7.\n * @param groupNode TreeNode for current group\n * @param currentOffset\n * @param parentGroupIsVisible used to determine if current group's header and its levels are visible\n * @returns the offset (in pixels) after processing current group\n */\n #traverseGroupTreeAndUpdateLevelPositionsForTheGroup(\n groupNode: GroupTreeNode, currentOffset: number, parentGroupIsVisible: boolean): number {\n if (!this.visibleLevels || !this.visibleLevelOffsets || !this.visibleLevelHeights || !this.groupOffsets) {\n return currentOffset;\n }\n\n const groups = this.rawTimelineData?.groups;\n if (!groups) {\n return currentOffset;\n }\n\n // This shouldn't happen. If this happen, it means the group tree is outdated. Add a sanity check to avoid error.\n if (groupNode.index >= groups.length) {\n console.warn(\n 'The data from the group tree is outdated. ' +\n 'Please make sure the flamechart is reset after data change in the data provider');\n return currentOffset;\n }\n\n if (groupNode.index >= 0) {\n this.groupOffsets[groupNode.index] = currentOffset;\n // If |shareHeaderLine| is false, we add the height of one more level to\n // the current offset, which will be used for the start level of current\n // group.\n // For edit mode, we will show all the groups whose name are not empty.\n if ((this.#inTrackConfigEditMode && groups[groupNode.index].name) ||\n (!groups[groupNode.index].hidden && parentGroupIsVisible && !groups[groupNode.index].style.shareHeaderLine)) {\n currentOffset += groups[groupNode.index].style.height;\n }\n }\n\n // If this is the top level, it is always shown.\n // Otherwise, if the parent group is visible and current group is not hidden, and this group is expanded, then this\n // group is visible.\n let thisGroupIsVisible = false;\n if (groupNode.index < 0) {\n thisGroupIsVisible = true;\n } else {\n const thisGroupIsExpanded = !(this.isGroupCollapsible(groupNode.index) && !groups[groupNode.index].expanded);\n thisGroupIsVisible = !groups[groupNode.index].hidden && thisGroupIsExpanded;\n }\n const thisGroupLevelsAreVisible = thisGroupIsVisible && parentGroupIsVisible;\n\n for (let level = groupNode.startLevel; level < groupNode.endLevel; level++) {\n // This shouldn't happen. If this happen, it means the group tree is outdated. Add a sanity check to avoid error.\n if (level >= this.dataProvider.maxStackDepth()) {\n console.warn(\n 'The data from the group tree is outdated. ' +\n 'Please make sure the flamechart is reset after data change in the data provider');\n return currentOffset;\n }\n\n // Handle offset and visibility of each level inside this group.\n const isFirstOnLevel = level === groupNode.startLevel;\n // If this is the top level group, all the levels in this group are always shown.\n // Otherwise it depends on the visibility of parent group and this group.\n let thisLevelIsVisible;\n if (groupNode.index < 0) {\n thisLevelIsVisible = true;\n } else {\n const isFirstLevelAndForOverview = isFirstOnLevel && groups[groupNode.index].style.useFirstLineForOverview;\n thisLevelIsVisible = !groups[groupNode.index].hidden &&\n (parentGroupIsVisible && (thisGroupLevelsAreVisible || isFirstLevelAndForOverview));\n }\n\n let height;\n if (groups[groupNode.index]) {\n // |shareHeaderLine| is false means the first level of this group is on the next level of the header.\n const isFirstLevelAndNotShareHeaderLine = isFirstOnLevel && !groups[groupNode.index].style.shareHeaderLine;\n // A group is collapsed means only ite header is visible.\n const thisGroupIsCollapsed = this.isGroupCollapsible(groupNode.index) && !groups[groupNode.index].expanded;\n\n if (isFirstLevelAndNotShareHeaderLine || thisGroupIsCollapsed) {\n // This means this level is only the header, so we use the height of the header for this level.\n height = groups[groupNode.index].style.height;\n } else {\n height = groups[groupNode.index].style.itemsHeight ?? this.barHeight;\n }\n } else {\n height = this.barHeight;\n }\n\n // If it's in edit mode, all the levels are hidden.\n this.visibleLevels[level] = this.#inTrackConfigEditMode ? false : Boolean(thisLevelIsVisible);\n this.visibleLevelOffsets[level] = currentOffset;\n this.visibleLevelHeights[level] = this.#inTrackConfigEditMode ? 0 : height;\n\n // If this level not belong to any group, it is always shown, otherwise we need to check if it is visible.\n if (groupNode.index < 0 ||\n (!groups[groupNode.index].hidden) &&\n (thisLevelIsVisible ||\n (parentGroupIsVisible && groups[groupNode.index].style.shareHeaderLine && isFirstOnLevel))) {\n currentOffset += this.visibleLevelHeights[level];\n }\n }\n\n if (groupNode.children.length === 0) {\n return currentOffset;\n }\n\n for (const child of groupNode.children) {\n // If the child is not the first child, we will add a padding top.\n // For edit mode, we will show all the groups whose name are not empty.\n if ((this.#inTrackConfigEditMode && groups[child.index].name) ||\n (thisGroupLevelsAreVisible && !groups[child.index]?.hidden && child !== groupNode.children[0])) {\n currentOffset += (groups[child.index].style.padding ?? 0);\n }\n currentOffset =\n this.#traverseGroupTreeAndUpdateLevelPositionsForTheGroup(child, currentOffset, thisGroupLevelsAreVisible);\n }\n return currentOffset;\n }\n\n private updateLevelPositions(): void {\n if (!this.#groupTreeRoot) {\n console.warn('Please make sure the new timeline data is processed before update the level positions.');\n return;\n }\n const levelCount = this.dataProvider.maxStackDepth();\n const groups = this.rawTimelineData?.groups || [];\n // Add an extra number in visibleLevelOffsets to store the end of last level\n this.visibleLevelOffsets = new Uint32Array(levelCount + 1);\n this.visibleLevelHeights = new Uint32Array(levelCount);\n this.visibleLevels = new Array(levelCount);\n // Add an extra number in groupOffsets to store the end of last group\n this.groupOffsets = new Uint32Array(groups.length + 1);\n let currentOffset = this.rulerEnabled ? RulerHeight + 2 : 2;\n // The root is always visible, so just simply set the |parentGroupIsVisible| to visible.\n currentOffset = this.#traverseGroupTreeAndUpdateLevelPositionsForTheGroup(\n this.#groupTreeRoot, currentOffset, /* parentGroupIsVisible= */ true);\n\n // Set the final offset to the last element of |groupOffsets| and\n // |visibleLevelOffsets|. This number represent the end of last group and\n // level.\n this.groupOffsets[groups.length] = currentOffset;\n this.visibleLevelOffsets[levelCount] = currentOffset;\n }\n\n private isGroupCollapsible(index: number): boolean|undefined {\n if (!this.rawTimelineData || index < 0) {\n return;\n }\n\n const groups = this.rawTimelineData.groups || [];\n const style = groups[index].style;\n if (!style.shareHeaderLine || !style.collapsible) {\n return Boolean(style.collapsible);\n }\n const isLastGroup = index + 1 >= groups.length;\n if (!isLastGroup && groups[index + 1].style.nestingLevel > style.nestingLevel) {\n return true;\n }\n const nextGroupLevel = isLastGroup ? this.dataProvider.maxStackDepth() : groups[index + 1].startLevel;\n if (nextGroupLevel !== groups[index].startLevel + 1) {\n return true;\n }\n // For groups that only have one line and share header line, pretend these are not collapsible\n // unless the itemsHeight does not match the headerHeight\n return style.height !== style.itemsHeight;\n }\n\n groupIsLastVisibleTopLevel(group?: Group): boolean {\n if (!group) {\n return true;\n }\n const visibleTopLevelGroupNumber =\n this.#groupTreeRoot?.children.filter(track => !this.rawTimelineData?.groups[track.index].hidden).length;\n return visibleTopLevelGroupNumber === 1 && group.style.nestingLevel === 0 && !group.hidden;\n }\n\n setSelectedEntry(entryIndex: number): void {\n // Check if the button that resets children of the entry is clicked. We need to check it even if the entry\n // clicked is not selected to avoid needing to double click\n if (this.isMouseOverRevealChildrenArrow(this.lastMouseOffsetX, entryIndex)) {\n this.modifyTree(TraceEngine.EntriesFilter.FilterAction.RESET_CHILDREN, entryIndex);\n }\n if (this.selectedEntryIndex === entryIndex) {\n return;\n }\n if (entryIndex !== -1) {\n this.chartViewport.hideRangeSelection();\n }\n this.selectedEntryIndex = entryIndex;\n this.revealEntry(entryIndex);\n this.updateElementPosition(this.selectedElement, this.selectedEntryIndex);\n this.update();\n }\n\n private entryHasDecoration(entryIndex: number, decorationType: FlameChartDecorationType): boolean {\n const timelineData = this.timelineData();\n if (!timelineData) {\n return false;\n }\n\n const decorationsForEvent = timelineData.entryDecorations.at(entryIndex);\n if (decorationsForEvent && decorationsForEvent.length >= 1) {\n return decorationsForEvent.some(decoration => decoration.type === decorationType);\n }\n\n return false;\n }\n\n getMarkerPixelsForEntryIndex(entryIndex: number): {x: number, width: number}|null {\n return this.markerPositions.get(entryIndex) ?? null;\n }\n\n /**\n * Update position of an Element. By default, the element is treated as a full entry and it's dimentions are set to the full entry width/length/height.\n * If isDecoration parameter is set to true, the element will be positioned on the right side of the entry and have a square shape where width == height of the entry.\n */\n private updateElementPosition(element: Element|null, entryIndex: number, isDecoration?: boolean): void {\n if (!element) {\n return;\n }\n const elementMinWidthPx = 2;\n element.classList.add('hidden');\n if (entryIndex === -1) {\n return;\n }\n const timelineData = this.timelineData();\n if (!timelineData) {\n return;\n }\n\n const startTime = timelineData.entryStartTimes[entryIndex];\n const duration = timelineData.entryTotalTimes[entryIndex];\n let barX = 0;\n let barWidth = 0;\n let visible = true;\n if (Number.isNaN(duration)) {\n const position = this.markerPositions.get(entryIndex);\n if (position) {\n barX = position.x;\n barWidth = position.width;\n } else {\n visible = false;\n }\n } else {\n barX = this.chartViewport.timeToPosition(startTime);\n barWidth = duration * this.chartViewport.timeToPixel();\n }\n if (barX + barWidth <= 0 || barX >= this.offsetWidth) {\n return;\n }\n const barCenter = barX + barWidth / 2;\n barWidth = Math.max(barWidth, elementMinWidthPx);\n barX = barCenter - barWidth / 2;\n const entryLevel = timelineData.entryLevels[entryIndex];\n const barY = this.levelToOffset(entryLevel) - this.chartViewport.scrollOffset();\n const barHeight = this.levelHeight(entryLevel);\n const style = (element as HTMLElement).style;\n\n if (isDecoration) {\n style.top = barY + 'px';\n style.width = barHeight + 'px';\n style.height = barHeight + 'px';\n style.left = barX + barWidth - barHeight + 'px';\n } else {\n style.top = barY + 'px';\n style.width = barWidth + 'px';\n style.height = barHeight - 1 + 'px';\n style.left = barX + 'px';\n }\n element.classList.toggle('hidden', !visible);\n this.viewportElement.appendChild(element);\n }\n\n // Updates the highlight of an Arrow button that is shown on an entry if it has hidden child entries\n private updateHiddenChildrenArrowHighlighPosition(entryIndex: number): void {\n this.revealDescendantsArrowHighlightElement.classList.add('hidden');\n /**\n * No need to update the hidden descendants arrow highlight if\n * 1. No entry is highlighted\n * 2. Mouse is not hovering over the arrow button\n */\n if (entryIndex === -1 || !this.isMouseOverRevealChildrenArrow(this.lastMouseOffsetX, entryIndex)) {\n return;\n }\n this.updateElementPosition(this.revealDescendantsArrowHighlightElement, entryIndex, true);\n }\n\n private timeToPositionClipped(time: number): number {\n return Platform.NumberUtilities.clamp(this.chartViewport.timeToPosition(time), 0, this.offsetWidth);\n }\n\n /**\n * Returns the amount of pixels a group is vertically offset in the flame chart.\n * Now this function is only used for tests.\n */\n groupIndexToOffsetForTest(groupIndex: number): number {\n if (!this.groupOffsets) {\n throw new Error('No visible group offsets');\n }\n return this.groupOffsets[groupIndex];\n }\n\n /**\n * Set the edit mode.\n * Now this function is only used for tests.\n */\n setEditModeForTest(editMode: boolean): void {\n this.#inTrackConfigEditMode = editMode;\n }\n\n /**\n * Returns the visibility of a level in the.\n * flame chart.\n */\n levelIsVisible(level: number): boolean {\n if (!this.visibleLevels) {\n throw new Error('No level visiblibities');\n }\n return this.visibleLevels[level];\n }\n\n /**\n * Returns the amount of pixels a level is vertically offset in the.\n * flame chart.\n */\n levelToOffset(level: number): number {\n if (!this.visibleLevelOffsets) {\n throw new Error('No visible level offsets');\n }\n return this.visibleLevelOffsets[level];\n }\n\n levelHeight(level: number): number {\n if (!this.visibleLevelHeights) {\n throw new Error('No visible level heights');\n }\n return this.visibleLevelHeights[level];\n }\n\n private updateBoundaries(): void {\n this.totalTime = this.dataProvider.totalTime();\n this.minimumBoundaryInternal = this.dataProvider.minimumBoundary();\n this.chartViewport.setBoundaries(this.minimumBoundaryInternal, this.totalTime);\n }\n\n private updateHeight(): void {\n const height = this.levelToOffset(this.dataProvider.maxStackDepth()) + 2;\n this.chartViewport.setContentHeight(height);\n }\n\n override onResize(): void {\n // Clear the rect cache because we have been resized.\n this.#canvasBoundingClientRect = null;\n this.scheduleUpdate();\n }\n\n update(): void {\n if (!this.timelineData()) {\n return;\n }\n this.updateHeight();\n this.updateBoundaries();\n this.draw();\n if (!this.chartViewport.isDragging()) {\n this.updateHighlight();\n }\n }\n\n // Reset the whole flame chart.\n // It will reset the viewport, which will reset the scrollTop and scrollLeft. So should be careful when call this\n // function. But when the data is \"real\" changed, especially when groups[] is changed, make sure call this before\n // re-rendering.\n // This will also clear all the selected entry, group, etc.\n // Remember to call |setWindowTimes| before draw the flame chart again.\n reset(): void {\n if (this.#inTrackConfigEditMode) {\n this.#removeEditModeButton();\n this.#inTrackConfigEditMode = false;\n }\n\n this.chartViewport.reset();\n this.rawTimelineData = null;\n this.rawTimelineDataLength = 0;\n this.#groupTreeRoot = null;\n this.highlightedMarkerIndex = -1;\n this.highlightedEntryIndex = -1;\n this.selectedEntryIndex = -1;\n this.selectedGroupIndex = -1;\n }\n\n scheduleUpdate(): void {\n this.chartViewport.scheduleUpdate();\n }\n\n private enabled(): boolean {\n return this.rawTimelineDataLength !== 0;\n }\n\n computePosition(time: number): number {\n return this.chartViewport.timeToPosition(time);\n }\n\n formatValue(value: number, precision?: number): string {\n return this.dataProvider.formatValue(value - this.zeroTime(), precision);\n }\n\n maximumBoundary(): TraceEngine.Types.Timing.MilliSeconds {\n return TraceEngine.Types.Timing.MilliSeconds(this.chartViewport.windowRightTime());\n }\n\n minimumBoundary(): TraceEngine.Types.Timing.MilliSeconds {\n return TraceEngine.Types.Timing.MilliSeconds(this.chartViewport.windowLeftTime());\n }\n\n zeroTime(): TraceEngine.Types.Timing.MilliSeconds {\n return TraceEngine.Types.Timing.MilliSeconds(this.dataProvider.minimumBoundary());\n }\n\n boundarySpan(): TraceEngine.Types.Timing.MilliSeconds {\n return TraceEngine.Types.Timing.MilliSeconds(this.maximumBoundary() - this.minimumBoundary());\n }\n}\n\nexport const RulerHeight = 15;\nexport const MinimalTimeWindowMs = 0.5;\n\n/**\n * initiatorIndex is the index of the initiator entry and\n * eventIndex is the entry initiated by it.\n * However, if isEntryHidden or isInitiatorHidden are set to true,\n * it means that the actual initiator or initiated entry is hidden\n * by some context menu action and the indexes in initiatorIndex\n * or/and eventIndex are for the entries that are the closest\n * modified by an actions ancestors to them.\n */\nexport interface FlameChartInitiatorData {\n initiatorIndex: number;\n eventIndex: number;\n isEntryHidden?: boolean;\n isInitiatorHidden?: boolean;\n}\n\nexport const enum FlameChartDecorationType {\n CANDY = 'CANDY',\n WARNING_TRIANGLE = 'WARNING_TRIANGLE',\n HIDDEN_DESCENDANTS_ARROW = 'HIDDEN_DESCENDANTS_ARROW',\n}\n\n/**\n * Represents a decoration that can be added to event. Each event can have as\n * many decorations as required.\n *\n * It is anticipated in the future that we will add to this as we want to\n * annotate events in more ways.\n *\n * This work is being tracked in crbug.com/1434297.\n **/\nexport type FlameChartDecoration = {\n type: FlameChartDecorationType.CANDY,\n // We often only want to highlight problem parts of events, so this time sets\n // the minimum time at which the candystriping will start. If you want to\n // candystripe the entire event, set this to 0.\n startAtTime: TraceEngine.Types.Timing.MicroSeconds,\n // Optionally set the end time for the striping. If this is not provided, the entire entry will be striped.\n endAtTime?: TraceEngine.Types.Timing.MicroSeconds,\n}|{\n type: FlameChartDecorationType.WARNING_TRIANGLE,\n customEndTime?: TraceEngine.Types.Timing.MicroSeconds,\n}|{\n type: FlameChartDecorationType.HIDDEN_DESCENDANTS_ARROW,\n};\n\n// We have to ensure we draw the decorations in a particular order; warning\n// triangles always go on top of any candy stripes.\nconst decorationDrawOrder: Record<FlameChartDecorationType, number> = {\n CANDY: 1,\n WARNING_TRIANGLE: 2,\n HIDDEN_DESCENDANTS_ARROW: 3,\n};\n\nexport function sortDecorationsForRenderingOrder(decorations: FlameChartDecoration[]): void {\n decorations.sort((decoration1, decoration2) => {\n return decorationDrawOrder[decoration1.type] - decorationDrawOrder[decoration2.type];\n });\n}\n\nexport class FlameChartTimelineData {\n entryLevels: number[]|Uint16Array;\n entryTotalTimes: number[]|Float32Array;\n entryStartTimes: number[]|Float64Array;\n /**\n * An array of entry decorations, where each item in the array is an array of\n * decorations for the event at that index.\n **/\n entryDecorations: FlameChartDecoration[][];\n groups: Group[];\n markers: FlameChartMarker[];\n\n // These four arrays are used to draw the initiator arrows, and if there are\n // multiple arrows, they should be a chain.\n initiatorsData: FlameChartInitiatorData[];\n\n selectedGroup: Group|null;\n private constructor(\n entryLevels: number[]|Uint16Array, entryTotalTimes: number[]|Float32Array, entryStartTimes: number[]|Float64Array,\n groups: Group[]|null, entryDecorations: FlameChartDecoration[][] = [],\n initiatorsData: FlameChartInitiatorData[] = []) {\n this.entryLevels = entryLevels;\n this.entryTotalTimes = entryTotalTimes;\n this.entryStartTimes = entryStartTimes;\n this.entryDecorations = entryDecorations;\n this.groups = groups || [];\n this.markers = [];\n this.initiatorsData = initiatorsData || [];\n this.selectedGroup = null;\n }\n\n // TODO(crbug.com/1501055) Thinking about refactor this class, so we can avoid create a new object when modifying the\n // flame chart.\n static create(data: {\n entryLevels: FlameChartTimelineData['entryLevels'],\n entryTotalTimes: FlameChartTimelineData['entryTotalTimes'],\n entryStartTimes: FlameChartTimelineData['entryStartTimes'],\n groups: FlameChartTimelineData['groups']|null,\n entryDecorations?: FlameChartDecoration[][],\n initiatorsData?: FlameChartTimelineData['initiatorsData'],\n }): FlameChartTimelineData {\n return new FlameChartTimelineData(\n data.entryLevels, data.entryTotalTimes, data.entryStartTimes, data.groups, data.entryDecorations || [],\n data.initiatorsData || []);\n }\n\n // TODO(crbug.com/1501055) Thinking about refactor this class, so we can avoid create a new object when modifying the\n // flame chart.\n static createEmpty(): FlameChartTimelineData {\n return new FlameChartTimelineData(\n [], // entry levels: what level on the timeline is an event on,\n [], // entry total times: the total duration of an event,\n [], // entry start times: the start time of a given event,\n [], // groups: a list of flame chart groups, which roughly correlate to each individual track\n );\n }\n\n resetFlowData(): void {\n this.initiatorsData = [];\n }\n}\n\nexport interface FlameChartDataProvider {\n buildFlowForInitiator?(index: number): unknown;\n\n minimumBoundary(): number;\n\n totalTime(): number;\n\n setVisualElementLoggingParent?(parent: VisualLogging.Loggable): void;\n\n formatValue(value: number, precision?: number): string;\n\n maxStackDepth(): number;\n\n timelineData(rebuild?: boolean): FlameChartTimelineData|null;\n\n prepareHighlightedEntryInfo(entryIndex: number): Element|null;\n\n prepareHighlightedHiddenEntriesArrowInfo?(entryIndex: number): Element|null;\n\n canJumpToEntry(entryIndex: number): boolean;\n\n entryTitle(entryIndex: number): string|null;\n\n entryFont(entryIndex: number): string|null;\n\n entryColor(entryIndex: number): string;\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\n forceDecoration(entryIndex: number): boolean;\n\n textColor(entryIndex: number): string;\n\n mainFrameNavigationStartEvents?(): readonly TraceEngine.Types.TraceEvents.TraceEventNavigationStart[];\n\n modifyTree?(node: number, action: TraceEngine.EntriesFilter.FilterAction): void;\n\n findPossibleContextMenuActions?(node: number): TraceEngine.EntriesFilter.PossibleFilterActions|void;\n\n hasTrackConfigurationMode(): boolean;\n\n eventByIndex?(entryIndex: number): TraceEngine.Types.TraceEvents.TraceEventData\n |TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame|null;\n\n indexForEvent?(event: TraceEngine.Types.TraceEvents.TraceEventData|\n TraceEngine.Handlers.ModelHandlers.Frames.TimelineFrame): number|null;\n}\n\nexport interface FlameChartMarker {\n startTime(): number;\n color(): string;\n title(): string|null;\n draw(context: CanvasRenderingContext2D, x: number, height: number, pixelsPerMillisecond: number): void;\n}\n\nexport const enum Events {\n /**\n * Emitted when the <canvas> element of the FlameChart is focused by the user.\n **/\n CanvasFocused = 'CanvasFocused',\n /**\n * Emitted when an event is selected by either mouse click, or hitting\n * <enter> on the keyboard - e.g. the same actions that would invoke a\n * <button> element.\n *\n * Will be emitted with a number which is the index of the entry that has\n * been selected, or -1 if no entry is selected (e.g the user has clicked\n * away from any events)\n */\n EntryInvoked = 'EntryInvoked',\n // Emmited when annotate entry shortcut is clicked.\n AnnotateEntry = 'AnnotateEntry',\n /**\n * Emitted when an event is selected via keyboard navigation using the arrow\n * keys.\n *\n * Will be emitted with a number which is the index of the entry that has\n * been selected, or -1 if no entry is selected.\n */\n EntrySelected = 'EntrySelected',\n /**\n * Emitted when an event is hovered over with the mouse.\n *\n * Will be emitted with a number which is the index of the entry that has\n * been hovered on, or -1 if no entry is selected (the user has moved their\n * mouse off the event)\n */\n EntryHighlighted = 'EntryHighlighted',\n ChartPlayableStateChange = 'ChartPlayableStateChange',\n\n LatestDrawDimensions = 'LatestDrawDimensions',\n}\n\nexport type EventTypes = {\n [Events.AnnotateEntry]: number,\n [Events.CanvasFocused]: number|void,\n [Events.EntryInvoked]: number,\n [Events.EntrySelected]: number,\n [Events.EntryHighlighted]: number,\n [Events.ChartPlayableStateChange]: boolean,\n [Events.LatestDrawDimensions]: {\n chart: {\n widthPixels: number,\n heightPixels: number,\n scrollOffsetPixels: number,\n allGroupsCollapsed: boolean,\n },\n traceWindow: TraceEngine.Types.Timing.TraceWindowMicroSeconds,\n },\n};\n\nexport interface Group {\n name: Common.UIString.LocalizedString;\n startLevel: number;\n expanded?: boolean;\n hidden?: boolean;\n selectable?: boolean;\n style: GroupStyle;\n /** Should be turned on if the track supports user editable stacks. */\n showStackContextMenu?: boolean;\n jslogContext?: string;\n}\n\nexport interface GroupStyle {\n height: number;\n padding: number;\n /* Can it be collapsed? True by default! */\n collapsible: boolean;\n /** The color of the group title text. */\n color: string;\n /** The background color of the group title when the track is collapsed,\n * and this is usually around same length as the title text. */\n backgroundColor: string;\n nestingLevel: number;\n itemsHeight?: number;\n /** Allow entries to be placed on the same horizontal level as the text heading. True by default for Timeline */\n // TODO(paulirish): Attempt to remove with this behavior always true\n shareHeaderLine?: boolean;\n useFirstLineForOverview?: boolean;\n useDecoratorsForOverview?: boolean;\n}\n"]} \ No newline at end of file diff --git a/public/ui/legacy/components/perf_ui/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/legacy/components/perf_ui/devtools_entrypoint-bundle-typescript-tsconfig.json index 13d3599b9..9225f501c 100644 --- a/public/ui/legacy/components/perf_ui/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/legacy/components/perf_ui/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../../front_end/ui/legacy/components/perf_ui/perf_ui.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/perf_ui/devtools_entrypoint-meta-typescript-tsconfig.json b/public/ui/legacy/components/perf_ui/devtools_entrypoint-meta-typescript-tsconfig.json index 3a12988b3..20d52de2f 100644 --- a/public/ui/legacy/components/perf_ui/devtools_entrypoint-meta-typescript-tsconfig.json +++ b/public/ui/legacy/components/perf_ui/devtools_entrypoint-meta-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../../front_end/ui/legacy/components/perf_ui/perf_ui-meta.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/perf_ui/perf_ui-tsconfig.json b/public/ui/legacy/components/perf_ui/perf_ui-tsconfig.json index 2ff92008b..695c92c10 100644 --- a/public/ui/legacy/components/perf_ui/perf_ui-tsconfig.json +++ b/public/ui/legacy/components/perf_ui/perf_ui-tsconfig.json @@ -45,7 +45,6 @@ "../../../../../../../../front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/perf_ui/unittests-tsconfig.json b/public/ui/legacy/components/perf_ui/unittests-tsconfig.json index 7286b421c..78d7bcc63 100644 --- a/public/ui/legacy/components/perf_ui/unittests-tsconfig.json +++ b/public/ui/legacy/components/perf_ui/unittests-tsconfig.json @@ -44,7 +44,6 @@ "../../../../../../../../front_end/ui/legacy/components/perf_ui/TimelineOverviewCalculator.test.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/quick_open/CommandMenu.js b/public/ui/legacy/components/quick_open/CommandMenu.js index 4cc8438ff..62beb1197 100644 --- a/public/ui/legacy/components/quick_open/CommandMenu.js +++ b/public/ui/legacy/components/quick_open/CommandMenu.js @@ -157,7 +157,7 @@ export class CommandMenu { locations.set(name, category); } } - const views = UI.ViewManager.getRegisteredViewExtensions(); + const views = UI.ViewManager.getRegisteredViewExtensions(Common.Settings.Settings.instance().getHostConfig()); for (const view of views) { const viewLocation = view.location(); const category = viewLocation && locations.get(viewLocation); diff --git a/public/ui/legacy/components/quick_open/CommandMenu.js.map b/public/ui/legacy/components/quick_open/CommandMenu.js.map index 61cc5363a..4573f8a73 100644 --- a/public/ui/legacy/components/quick_open/CommandMenu.js.map +++ b/public/ui/legacy/components/quick_open/CommandMenu.js.map @@ -1 +1 @@ -{"version":3,"file":"CommandMenu.js","sourceRoot":"","sources":["../../../../../../../../front_end/ui/legacy/components/quick_open/CommandMenu.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,mCAAmC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,+BAA+B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,+BAA+B,CAAC;AACtD,OAAO,KAAK,QAAQ,MAAM,uCAAuC,CAAC;AAClE,OAAO,KAAK,IAAI,MAAM,sCAAsC,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAEtC,OAAO,EAAC,kBAAkB,EAAE,QAAQ,EAAE,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AACvF,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAE7C,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,4BAA4B,EAAE,2EAA2E;IACzG;;OAEG;IACH,eAAe,EAAE,mBAAmB;IACpC;;OAEG;IACH,GAAG,EAAE,KAAK;IACV;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,UAAU,EAAE,cAAc;CAC3B,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,gDAAgD,EAAE,SAAS,CAAC,CAAC;AACtG,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI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ACnB,IAAI,CAAC,GAAG,GAAG,QAAQ,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,GAAG,CAAC;QAChD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;QACtC,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAC;QAC1C,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC7C,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAClE,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC,CAAE,2DAA2D;IAC7F,CAAC;CACF;AAED,MAAM,OAAO,kBAAkB;IAC7B,YAAY,CAAC,QAA4B,EAAE,SAAiB;QAC1D,IAAI,CAAC,qBAAqB,CAAC,6BAA6B,CAAC,YAAY,EAAE,CAAC;QACxE,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED,gBAAgB,CAAC;IACf,MAAM,EAAE,GAAG;IACX,QAAQ,EAAE,eAAe;IACzB,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,mBAAmB,EAAE,CAAC;IAC1D,WAAW,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC;IAC5C,eAAe,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC;CACrD,CAAC,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 * as Platform from '../../../../core/platform/platform.js';\nimport * as Diff from '../../../../third_party/diff/diff.js';\nimport * as UI from '../../legacy.js';\n\nimport {FilteredListWidget, Provider, registerProvider} from './FilteredListWidget.js';\nimport {QuickOpenImpl} from './QuickOpen.js';\n\nconst UIStrings = {\n /**\n * @description Message to display if a setting change requires a reload of DevTools\n */\n oneOrMoreSettingsHaveChanged: 'One or more settings have changed which requires a reload to take effect.',\n /**\n * @description Text in Command Menu of the Command Menu\n */\n noCommandsFound: 'No commands found',\n /**\n * @description Text for command prefix of run a command\n */\n run: 'Run',\n /**\n * @description Text for command suggestion of run a command\n */\n command: 'Command',\n /**\n * @description Hint text to indicate that a selected command is deprecated\n */\n deprecated: '— deprecated',\n};\nconst str_ = i18n.i18n.registerUIStrings('ui/legacy/components/quick_open/CommandMenu.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nlet commandMenuInstance: CommandMenu;\n\nexport class CommandMenu {\n private readonly commandsInternal: Command[];\n private constructor() {\n this.commandsInternal = [];\n this.loadCommands();\n }\n\n static instance(opts: {\n forceNew: boolean|null,\n } = {forceNew: null}): CommandMenu {\n const {forceNew} = opts;\n if (!commandMenuInstance || forceNew) {\n commandMenuInstance = new CommandMenu();\n }\n return commandMenuInstance;\n }\n\n static createCommand(options: CreateCommandOptions): Command {\n const {\n category,\n keys,\n title,\n shortcut,\n jslogContext,\n executeHandler,\n availableHandler,\n userActionCode,\n deprecationWarning,\n isPanelOrDrawer,\n } = options;\n\n let handler = executeHandler;\n if (userActionCode) {\n const actionCode = userActionCode;\n handler = () => {\n Host.userMetrics.actionTaken(actionCode);\n executeHandler();\n };\n }\n return new Command(\n category, title, keys, shortcut, jslogContext, handler, availableHandler, deprecationWarning, isPanelOrDrawer);\n }\n\n static createSettingCommand<V>(setting: Common.Settings.Setting<V>, title: Common.UIString.LocalizedString, value: V):\n Command {\n const category = setting.category();\n if (!category) {\n throw new Error(`Creating '${title}' setting command failed. Setting has no category.`);\n }\n const tags = setting.tags() || '';\n const reloadRequired = Boolean(setting.reloadRequired());\n\n return CommandMenu.createCommand({\n category: Common.Settings.getLocalizedSettingsCategory(category),\n keys: tags,\n title,\n shortcut: '',\n jslogContext: setting.name,\n executeHandler: () => {\n if (setting.deprecation?.disabled &&\n (!setting.deprecation?.experiment || setting.deprecation.experiment.isEnabled())) {\n void Common.Revealer.reveal(setting);\n return;\n }\n setting.set(value);\n\n if (setting.name === 'emulate-page-focus') {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.ToggleEmulateFocusedPageFromCommandMenu);\n }\n if (setting.name === 'show-web-vitals') {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.ToggleShowWebVitals);\n }\n\n if (reloadRequired) {\n UI.InspectorView.InspectorView.instance().displayReloadRequiredWarning(\n i18nString(UIStrings.oneOrMoreSettingsHaveChanged));\n }\n },\n availableHandler,\n userActionCode: undefined,\n deprecationWarning: setting.deprecation?.warning,\n });\n\n function availableHandler(): boolean {\n return setting.get() !== value;\n }\n }\n\n static createActionCommand(options: ActionCommandOptions): Command {\n const {action, userActionCode} = options;\n const category = action.category();\n if (!category) {\n throw new Error(`Creating '${action.title()}' action command failed. Action has no category.`);\n }\n\n let panelOrDrawer = undefined;\n if (category === UI.ActionRegistration.ActionCategory.DRAWER) {\n panelOrDrawer = PanelOrDrawer.DRAWER;\n }\n\n const shortcut = UI.ShortcutRegistry.ShortcutRegistry.instance().shortcutTitleForAction(action.id()) || '';\n\n return CommandMenu.createCommand({\n category: UI.ActionRegistration.getLocalizedActionCategory(category),\n keys: action.tags() || '',\n title: action.title(),\n shortcut,\n jslogContext: action.id(),\n executeHandler: action.execute.bind(action),\n userActionCode,\n availableHandler: undefined,\n isPanelOrDrawer: panelOrDrawer,\n });\n }\n\n static createRevealViewCommand(options: RevealViewCommandOptions): Command {\n const {title, tags, category, userActionCode, id} = options;\n if (!category) {\n throw new Error(`Creating '${title}' reveal view command failed. Reveal view has no category.`);\n }\n let panelOrDrawer = undefined;\n if (category === UI.ViewManager.ViewLocationCategory.PANEL) {\n panelOrDrawer = PanelOrDrawer.PANEL;\n } else if (category === UI.ViewManager.ViewLocationCategory.DRAWER) {\n panelOrDrawer = PanelOrDrawer.DRAWER;\n }\n\n const executeHandler = (): Promise<void> => {\n if (id === 'issues-pane') {\n Host.userMetrics.issuesPanelOpenedFrom(Host.UserMetrics.IssueOpener.CommandMenu);\n }\n return UI.ViewManager.ViewManager.instance().showView(id, /* userGesture */ true);\n };\n\n return CommandMenu.createCommand({\n category: UI.ViewManager.getLocalizedViewLocationCategory(category),\n keys: tags,\n title,\n shortcut: '',\n jslogContext: id,\n executeHandler,\n userActionCode,\n availableHandler: undefined,\n isPanelOrDrawer: panelOrDrawer,\n });\n }\n\n private loadCommands(): void {\n const locations = new Map<UI.ViewManager.ViewLocationValues, UI.ViewManager.ViewLocationCategory>();\n for (const {category, name} of UI.ViewManager.getRegisteredLocationResolvers()) {\n if (category && name) {\n locations.set(name, category);\n }\n }\n const views = UI.ViewManager.getRegisteredViewExtensions();\n for (const view of views) {\n const viewLocation = view.location();\n const category = viewLocation && locations.get(viewLocation);\n if (!category) {\n continue;\n }\n\n const options: RevealViewCommandOptions = {\n title: view.commandPrompt(),\n tags: view.tags() || '',\n category,\n userActionCode: undefined,\n id: view.viewId(),\n };\n this.commandsInternal.push(CommandMenu.createRevealViewCommand(options));\n }\n // Populate allowlisted settings.\n const settingsRegistrations = Common.Settings.Settings.instance().getRegisteredSettings();\n for (const settingRegistration of settingsRegistrations) {\n const options = settingRegistration.options;\n if (!options || !settingRegistration.category) {\n continue;\n }\n for (const pair of options) {\n const setting = Common.Settings.Settings.instance().moduleSetting(settingRegistration.settingName);\n this.commandsInternal.push(CommandMenu.createSettingCommand(setting, pair.title(), pair.value));\n }\n }\n }\n\n commands(): Command[] {\n return this.commandsInternal;\n }\n}\nexport interface ActionCommandOptions {\n action: UI.ActionRegistration.Action;\n userActionCode?: number;\n}\n\nexport interface RevealViewCommandOptions {\n id: string;\n title: Common.UIString.LocalizedString;\n tags: string;\n category: UI.ViewManager.ViewLocationCategory;\n userActionCode?: number;\n}\n\nexport interface CreateCommandOptions {\n category: Platform.UIString.LocalizedString;\n keys: string;\n title: Common.UIString.LocalizedString;\n shortcut: string;\n jslogContext: string;\n executeHandler: () => void;\n availableHandler?: () => boolean;\n userActionCode?: number;\n deprecationWarning?: Platform.UIString.LocalizedString;\n isPanelOrDrawer?: PanelOrDrawer;\n}\n\nexport const enum PanelOrDrawer {\n PANEL = 'PANEL',\n DRAWER = 'DRAWER',\n}\n\nexport class CommandMenuProvider extends Provider {\n private commands: Command[];\n\n constructor(commandsForTest: Command[] = []) {\n super('command');\n this.commands = commandsForTest;\n }\n\n override attach(): void {\n const allCommands = CommandMenu.instance().commands();\n\n // Populate allowlisted actions.\n const actions = UI.ActionRegistry.ActionRegistry.instance().availableActions();\n for (const action of actions) {\n const category = action.category();\n if (!category) {\n continue;\n }\n\n const options: ActionCommandOptions = {action, userActionCode: undefined};\n this.commands.push(CommandMenu.createActionCommand(options));\n }\n\n for (const command of allCommands) {\n if (!command.available()) {\n continue;\n }\n if (this.commands.find(({title, category}) => title === command.title && category === command.category)) {\n continue;\n }\n this.commands.push(command);\n }\n\n this.commands = this.commands.sort(commandComparator);\n\n function commandComparator(left: Command, right: Command): number {\n const cats = Platform.StringUtilities.compare(left.category, right.category);\n return cats ? cats : Platform.StringUtilities.compare(left.title, right.title);\n }\n }\n\n override detach(): void {\n this.commands = [];\n }\n\n override itemCount(): number {\n return this.commands.length;\n }\n\n override itemKeyAt(itemIndex: number): string {\n return this.commands[itemIndex].key;\n }\n\n override itemScoreAt(itemIndex: number, query: string): number {\n const command = this.commands[itemIndex];\n let score = Diff.Diff.DiffWrapper.characterScore(query.toLowerCase(), command.title.toLowerCase());\n\n // Score panel/drawer reveals above regular actions.\n if (command.isPanelOrDrawer === PanelOrDrawer.PANEL) {\n score += 2;\n } else if (command.isPanelOrDrawer === PanelOrDrawer.DRAWER) {\n score += 1;\n }\n\n return score;\n }\n\n override renderItem(itemIndex: number, query: string, titleElement: Element, subtitleElement: Element): void {\n const command = this.commands[itemIndex];\n\n titleElement.removeChildren();\n UI.UIUtils.createTextChild(titleElement, command.title);\n FilteredListWidget.highlightRanges(titleElement, query, true);\n\n subtitleElement.textContent = command.shortcut;\n\n const deprecationWarning = command.deprecationWarning;\n if (deprecationWarning) {\n const deprecatedTagElement = (titleElement.parentElement?.createChild('span', 'deprecated-tag') as HTMLElement);\n if (deprecatedTagElement) {\n deprecatedTagElement.textContent = i18nString(UIStrings.deprecated);\n deprecatedTagElement.title = deprecationWarning;\n }\n }\n const tagElement = (titleElement.parentElement?.parentElement?.createChild('span', 'tag') as HTMLElement);\n if (!tagElement) {\n return;\n }\n const index = Platform.StringUtilities.hashCode(command.category) % MaterialPaletteColors.length;\n tagElement.style.backgroundColor = MaterialPaletteColors[index];\n tagElement.style.color = '#fff';\n tagElement.textContent = command.category;\n }\n\n override jslogContextAt(itemIndex: number): string {\n return this.commands[itemIndex].jslogContext;\n }\n\n override selectItem(itemIndex: number|null, _promptValue: string): void {\n if (itemIndex === null) {\n return;\n }\n this.commands[itemIndex].execute();\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.SelectCommandFromCommandMenu);\n }\n\n override notFoundText(): string {\n return i18nString(UIStrings.noCommandsFound);\n }\n}\n\nexport const MaterialPaletteColors = [\n '#F44336',\n '#E91E63',\n '#9C27B0',\n '#673AB7',\n '#3F51B5',\n '#03A9F4',\n '#00BCD4',\n '#009688',\n '#4CAF50',\n '#8BC34A',\n '#CDDC39',\n '#FFC107',\n '#FF9800',\n '#FF5722',\n '#795548',\n '#9E9E9E',\n '#607D8B',\n];\n\nexport class Command {\n readonly category: Common.UIString.LocalizedString;\n readonly title: Common.UIString.LocalizedString;\n readonly key: string;\n readonly shortcut: string;\n readonly jslogContext: string;\n readonly deprecationWarning?: Platform.UIString.LocalizedString;\n readonly isPanelOrDrawer?: PanelOrDrawer;\n\n readonly #executeHandler: () => unknown;\n readonly #availableHandler?: () => boolean;\n\n constructor(\n category: Common.UIString.LocalizedString, title: Common.UIString.LocalizedString, key: string, shortcut: string,\n jslogContext: string, executeHandler: () => unknown, availableHandler?: () => boolean,\n deprecationWarning?: Platform.UIString.LocalizedString, isPanelOrDrawer?: PanelOrDrawer) {\n this.category = category;\n this.title = title;\n this.key = category + '\\0' + title + '\\0' + key;\n this.shortcut = shortcut;\n this.jslogContext = jslogContext;\n this.#executeHandler = executeHandler;\n this.#availableHandler = availableHandler;\n this.deprecationWarning = deprecationWarning;\n this.isPanelOrDrawer = isPanelOrDrawer;\n }\n\n available(): boolean {\n return this.#availableHandler ? this.#availableHandler() : true;\n }\n\n execute(): unknown {\n return this.#executeHandler(); // Tests might want to await the action in case it's async.\n }\n}\n\nexport class ShowActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(_context: UI.Context.Context, _actionId: string): boolean {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.bringToFront();\n QuickOpenImpl.show('>');\n return true;\n }\n}\n\nregisterProvider({\n prefix: '>',\n iconName: 'chevron-right',\n iconWidth: '20px',\n provider: () => Promise.resolve(new CommandMenuProvider()),\n titlePrefix: () => i18nString(UIStrings.run),\n titleSuggestion: () => i18nString(UIStrings.command),\n});\n"]} \ No newline at end of file +{"version":3,"file":"CommandMenu.js","sourceRoot":"","sources":["../../../../../../../../front_end/ui/legacy/components/quick_open/CommandMenu.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,mCAAmC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,+BAA+B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,+BAA+B,CAAC;AACtD,OAAO,KAAK,QAAQ,MAAM,uCAAuC,CAAC;AAClE,OAAO,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,MAAM,OAAO,kBAAkB;IAC7B,YAAY,CAAC,QAA4B,EAAE,SAAiB;QAC1D,IAAI,CAAC,qBAAqB,CAAC,6BAA6B,CAAC,YAAY,EAAE,CAAC;QACxE,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED,gBAAgB,CAAC;IACf,MAAM,EAAE,GAAG;IACX,QAAQ,EAAE,eAAe;IACzB,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,mBAAmB,EAAE,CAAC;IAC1D,WAAW,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC;IAC5C,eAAe,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC;CACrD,CAAC,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 * as Platform from '../../../../core/platform/platform.js';\nimport * as Diff from '../../../../third_party/diff/diff.js';\nimport * as UI from '../../legacy.js';\n\nimport {FilteredListWidget, Provider, registerProvider} from './FilteredListWidget.js';\nimport {QuickOpenImpl} from './QuickOpen.js';\n\nconst UIStrings = {\n /**\n * @description Message to display if a setting change requires a reload of DevTools\n */\n oneOrMoreSettingsHaveChanged: 'One or more settings have changed which requires a reload to take effect.',\n /**\n * @description Text in Command Menu of the Command Menu\n */\n noCommandsFound: 'No commands found',\n /**\n * @description Text for command prefix of run a command\n */\n run: 'Run',\n /**\n * @description Text for command suggestion of run a command\n */\n command: 'Command',\n /**\n * @description Hint text to indicate that a selected command is deprecated\n */\n deprecated: '— deprecated',\n};\nconst str_ = i18n.i18n.registerUIStrings('ui/legacy/components/quick_open/CommandMenu.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nlet commandMenuInstance: CommandMenu;\n\nexport class CommandMenu {\n private readonly commandsInternal: Command[];\n private constructor() {\n this.commandsInternal = [];\n this.loadCommands();\n }\n\n static instance(opts: {\n forceNew: boolean|null,\n } = {forceNew: null}): CommandMenu {\n const {forceNew} = opts;\n if (!commandMenuInstance || forceNew) {\n commandMenuInstance = new CommandMenu();\n }\n return commandMenuInstance;\n }\n\n static createCommand(options: CreateCommandOptions): Command {\n const {\n category,\n keys,\n title,\n shortcut,\n jslogContext,\n executeHandler,\n availableHandler,\n userActionCode,\n deprecationWarning,\n isPanelOrDrawer,\n } = options;\n\n let handler = executeHandler;\n if (userActionCode) {\n const actionCode = userActionCode;\n handler = () => {\n Host.userMetrics.actionTaken(actionCode);\n executeHandler();\n };\n }\n return new Command(\n category, title, keys, shortcut, jslogContext, handler, availableHandler, deprecationWarning, isPanelOrDrawer);\n }\n\n static createSettingCommand<V>(setting: Common.Settings.Setting<V>, title: Common.UIString.LocalizedString, value: V):\n Command {\n const category = setting.category();\n if (!category) {\n throw new Error(`Creating '${title}' setting command failed. Setting has no category.`);\n }\n const tags = setting.tags() || '';\n const reloadRequired = Boolean(setting.reloadRequired());\n\n return CommandMenu.createCommand({\n category: Common.Settings.getLocalizedSettingsCategory(category),\n keys: tags,\n title,\n shortcut: '',\n jslogContext: setting.name,\n executeHandler: () => {\n if (setting.deprecation?.disabled &&\n (!setting.deprecation?.experiment || setting.deprecation.experiment.isEnabled())) {\n void Common.Revealer.reveal(setting);\n return;\n }\n setting.set(value);\n\n if (setting.name === 'emulate-page-focus') {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.ToggleEmulateFocusedPageFromCommandMenu);\n }\n if (setting.name === 'show-web-vitals') {\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.ToggleShowWebVitals);\n }\n\n if (reloadRequired) {\n UI.InspectorView.InspectorView.instance().displayReloadRequiredWarning(\n i18nString(UIStrings.oneOrMoreSettingsHaveChanged));\n }\n },\n availableHandler,\n userActionCode: undefined,\n deprecationWarning: setting.deprecation?.warning,\n });\n\n function availableHandler(): boolean {\n return setting.get() !== value;\n }\n }\n\n static createActionCommand(options: ActionCommandOptions): Command {\n const {action, userActionCode} = options;\n const category = action.category();\n if (!category) {\n throw new Error(`Creating '${action.title()}' action command failed. Action has no category.`);\n }\n\n let panelOrDrawer = undefined;\n if (category === UI.ActionRegistration.ActionCategory.DRAWER) {\n panelOrDrawer = PanelOrDrawer.DRAWER;\n }\n\n const shortcut = UI.ShortcutRegistry.ShortcutRegistry.instance().shortcutTitleForAction(action.id()) || '';\n\n return CommandMenu.createCommand({\n category: UI.ActionRegistration.getLocalizedActionCategory(category),\n keys: action.tags() || '',\n title: action.title(),\n shortcut,\n jslogContext: action.id(),\n executeHandler: action.execute.bind(action),\n userActionCode,\n availableHandler: undefined,\n isPanelOrDrawer: panelOrDrawer,\n });\n }\n\n static createRevealViewCommand(options: RevealViewCommandOptions): Command {\n const {title, tags, category, userActionCode, id} = options;\n if (!category) {\n throw new Error(`Creating '${title}' reveal view command failed. Reveal view has no category.`);\n }\n let panelOrDrawer = undefined;\n if (category === UI.ViewManager.ViewLocationCategory.PANEL) {\n panelOrDrawer = PanelOrDrawer.PANEL;\n } else if (category === UI.ViewManager.ViewLocationCategory.DRAWER) {\n panelOrDrawer = PanelOrDrawer.DRAWER;\n }\n\n const executeHandler = (): Promise<void> => {\n if (id === 'issues-pane') {\n Host.userMetrics.issuesPanelOpenedFrom(Host.UserMetrics.IssueOpener.CommandMenu);\n }\n return UI.ViewManager.ViewManager.instance().showView(id, /* userGesture */ true);\n };\n\n return CommandMenu.createCommand({\n category: UI.ViewManager.getLocalizedViewLocationCategory(category),\n keys: tags,\n title,\n shortcut: '',\n jslogContext: id,\n executeHandler,\n userActionCode,\n availableHandler: undefined,\n isPanelOrDrawer: panelOrDrawer,\n });\n }\n\n private loadCommands(): void {\n const locations = new Map<UI.ViewManager.ViewLocationValues, UI.ViewManager.ViewLocationCategory>();\n for (const {category, name} of UI.ViewManager.getRegisteredLocationResolvers()) {\n if (category && name) {\n locations.set(name, category);\n }\n }\n const views = UI.ViewManager.getRegisteredViewExtensions(Common.Settings.Settings.instance().getHostConfig());\n for (const view of views) {\n const viewLocation = view.location();\n const category = viewLocation && locations.get(viewLocation);\n if (!category) {\n continue;\n }\n\n const options: RevealViewCommandOptions = {\n title: view.commandPrompt(),\n tags: view.tags() || '',\n category,\n userActionCode: undefined,\n id: view.viewId(),\n };\n this.commandsInternal.push(CommandMenu.createRevealViewCommand(options));\n }\n // Populate allowlisted settings.\n const settingsRegistrations = Common.Settings.Settings.instance().getRegisteredSettings();\n for (const settingRegistration of settingsRegistrations) {\n const options = settingRegistration.options;\n if (!options || !settingRegistration.category) {\n continue;\n }\n for (const pair of options) {\n const setting = Common.Settings.Settings.instance().moduleSetting(settingRegistration.settingName);\n this.commandsInternal.push(CommandMenu.createSettingCommand(setting, pair.title(), pair.value));\n }\n }\n }\n\n commands(): Command[] {\n return this.commandsInternal;\n }\n}\nexport interface ActionCommandOptions {\n action: UI.ActionRegistration.Action;\n userActionCode?: number;\n}\n\nexport interface RevealViewCommandOptions {\n id: string;\n title: Common.UIString.LocalizedString;\n tags: string;\n category: UI.ViewManager.ViewLocationCategory;\n userActionCode?: number;\n}\n\nexport interface CreateCommandOptions {\n category: Platform.UIString.LocalizedString;\n keys: string;\n title: Common.UIString.LocalizedString;\n shortcut: string;\n jslogContext: string;\n executeHandler: () => void;\n availableHandler?: () => boolean;\n userActionCode?: number;\n deprecationWarning?: Platform.UIString.LocalizedString;\n isPanelOrDrawer?: PanelOrDrawer;\n}\n\nexport const enum PanelOrDrawer {\n PANEL = 'PANEL',\n DRAWER = 'DRAWER',\n}\n\nexport class CommandMenuProvider extends Provider {\n private commands: Command[];\n\n constructor(commandsForTest: Command[] = []) {\n super('command');\n this.commands = commandsForTest;\n }\n\n override attach(): void {\n const allCommands = CommandMenu.instance().commands();\n\n // Populate allowlisted actions.\n const actions = UI.ActionRegistry.ActionRegistry.instance().availableActions();\n for (const action of actions) {\n const category = action.category();\n if (!category) {\n continue;\n }\n\n const options: ActionCommandOptions = {action, userActionCode: undefined};\n this.commands.push(CommandMenu.createActionCommand(options));\n }\n\n for (const command of allCommands) {\n if (!command.available()) {\n continue;\n }\n if (this.commands.find(({title, category}) => title === command.title && category === command.category)) {\n continue;\n }\n this.commands.push(command);\n }\n\n this.commands = this.commands.sort(commandComparator);\n\n function commandComparator(left: Command, right: Command): number {\n const cats = Platform.StringUtilities.compare(left.category, right.category);\n return cats ? cats : Platform.StringUtilities.compare(left.title, right.title);\n }\n }\n\n override detach(): void {\n this.commands = [];\n }\n\n override itemCount(): number {\n return this.commands.length;\n }\n\n override itemKeyAt(itemIndex: number): string {\n return this.commands[itemIndex].key;\n }\n\n override itemScoreAt(itemIndex: number, query: string): number {\n const command = this.commands[itemIndex];\n let score = Diff.Diff.DiffWrapper.characterScore(query.toLowerCase(), command.title.toLowerCase());\n\n // Score panel/drawer reveals above regular actions.\n if (command.isPanelOrDrawer === PanelOrDrawer.PANEL) {\n score += 2;\n } else if (command.isPanelOrDrawer === PanelOrDrawer.DRAWER) {\n score += 1;\n }\n\n return score;\n }\n\n override renderItem(itemIndex: number, query: string, titleElement: Element, subtitleElement: Element): void {\n const command = this.commands[itemIndex];\n\n titleElement.removeChildren();\n UI.UIUtils.createTextChild(titleElement, command.title);\n FilteredListWidget.highlightRanges(titleElement, query, true);\n\n subtitleElement.textContent = command.shortcut;\n\n const deprecationWarning = command.deprecationWarning;\n if (deprecationWarning) {\n const deprecatedTagElement = (titleElement.parentElement?.createChild('span', 'deprecated-tag') as HTMLElement);\n if (deprecatedTagElement) {\n deprecatedTagElement.textContent = i18nString(UIStrings.deprecated);\n deprecatedTagElement.title = deprecationWarning;\n }\n }\n const tagElement = (titleElement.parentElement?.parentElement?.createChild('span', 'tag') as HTMLElement);\n if (!tagElement) {\n return;\n }\n const index = Platform.StringUtilities.hashCode(command.category) % MaterialPaletteColors.length;\n tagElement.style.backgroundColor = MaterialPaletteColors[index];\n tagElement.style.color = '#fff';\n tagElement.textContent = command.category;\n }\n\n override jslogContextAt(itemIndex: number): string {\n return this.commands[itemIndex].jslogContext;\n }\n\n override selectItem(itemIndex: number|null, _promptValue: string): void {\n if (itemIndex === null) {\n return;\n }\n this.commands[itemIndex].execute();\n Host.userMetrics.actionTaken(Host.UserMetrics.Action.SelectCommandFromCommandMenu);\n }\n\n override notFoundText(): string {\n return i18nString(UIStrings.noCommandsFound);\n }\n}\n\nexport const MaterialPaletteColors = [\n '#F44336',\n '#E91E63',\n '#9C27B0',\n '#673AB7',\n '#3F51B5',\n '#03A9F4',\n '#00BCD4',\n '#009688',\n '#4CAF50',\n '#8BC34A',\n '#CDDC39',\n '#FFC107',\n '#FF9800',\n '#FF5722',\n '#795548',\n '#9E9E9E',\n '#607D8B',\n];\n\nexport class Command {\n readonly category: Common.UIString.LocalizedString;\n readonly title: Common.UIString.LocalizedString;\n readonly key: string;\n readonly shortcut: string;\n readonly jslogContext: string;\n readonly deprecationWarning?: Platform.UIString.LocalizedString;\n readonly isPanelOrDrawer?: PanelOrDrawer;\n\n readonly #executeHandler: () => unknown;\n readonly #availableHandler?: () => boolean;\n\n constructor(\n category: Common.UIString.LocalizedString, title: Common.UIString.LocalizedString, key: string, shortcut: string,\n jslogContext: string, executeHandler: () => unknown, availableHandler?: () => boolean,\n deprecationWarning?: Platform.UIString.LocalizedString, isPanelOrDrawer?: PanelOrDrawer) {\n this.category = category;\n this.title = title;\n this.key = category + '\\0' + title + '\\0' + key;\n this.shortcut = shortcut;\n this.jslogContext = jslogContext;\n this.#executeHandler = executeHandler;\n this.#availableHandler = availableHandler;\n this.deprecationWarning = deprecationWarning;\n this.isPanelOrDrawer = isPanelOrDrawer;\n }\n\n available(): boolean {\n return this.#availableHandler ? this.#availableHandler() : true;\n }\n\n execute(): unknown {\n return this.#executeHandler(); // Tests might want to await the action in case it's async.\n }\n}\n\nexport class ShowActionDelegate implements UI.ActionRegistration.ActionDelegate {\n handleAction(_context: UI.Context.Context, _actionId: string): boolean {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.bringToFront();\n QuickOpenImpl.show('>');\n return true;\n }\n}\n\nregisterProvider({\n prefix: '>',\n iconName: 'chevron-right',\n iconWidth: '20px',\n provider: () => Promise.resolve(new CommandMenuProvider()),\n titlePrefix: () => i18nString(UIStrings.run),\n titleSuggestion: () => i18nString(UIStrings.command),\n});\n"]} \ No newline at end of file diff --git a/public/ui/legacy/components/quick_open/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/legacy/components/quick_open/devtools_entrypoint-bundle-typescript-tsconfig.json index 9ce18cc80..5526bbc4e 100644 --- a/public/ui/legacy/components/quick_open/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/legacy/components/quick_open/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../../front_end/ui/legacy/components/quick_open/quick_open.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/quick_open/devtools_entrypoint-meta-typescript-tsconfig.json b/public/ui/legacy/components/quick_open/devtools_entrypoint-meta-typescript-tsconfig.json index c828fd975..f9fcdedc9 100644 --- a/public/ui/legacy/components/quick_open/devtools_entrypoint-meta-typescript-tsconfig.json +++ b/public/ui/legacy/components/quick_open/devtools_entrypoint-meta-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../../front_end/ui/legacy/components/quick_open/quick_open-meta.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/quick_open/quick_open-tsconfig.json b/public/ui/legacy/components/quick_open/quick_open-tsconfig.json index 18be23aba..99d3c314d 100644 --- a/public/ui/legacy/components/quick_open/quick_open-tsconfig.json +++ b/public/ui/legacy/components/quick_open/quick_open-tsconfig.json @@ -35,7 +35,6 @@ "../../../../../../../../front_end/ui/legacy/components/quick_open/QuickOpen.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/quick_open/unittests-tsconfig.json b/public/ui/legacy/components/quick_open/unittests-tsconfig.json index a920fcba3..e3e543bf6 100644 --- a/public/ui/legacy/components/quick_open/unittests-tsconfig.json +++ b/public/ui/legacy/components/quick_open/unittests-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../../front_end/ui/legacy/components/quick_open/CommandMenu.test.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/source_frame/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/legacy/components/source_frame/devtools_entrypoint-bundle-typescript-tsconfig.json index f5c411e54..5baf7009a 100644 --- a/public/ui/legacy/components/source_frame/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/legacy/components/source_frame/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../../front_end/ui/legacy/components/source_frame/source_frame.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/source_frame/devtools_entrypoint-meta-typescript-tsconfig.json b/public/ui/legacy/components/source_frame/devtools_entrypoint-meta-typescript-tsconfig.json index 85fb1089d..c14b46704 100644 --- a/public/ui/legacy/components/source_frame/devtools_entrypoint-meta-typescript-tsconfig.json +++ b/public/ui/legacy/components/source_frame/devtools_entrypoint-meta-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../../front_end/ui/legacy/components/source_frame/source_frame-meta.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/source_frame/source_frame-tsconfig.json b/public/ui/legacy/components/source_frame/source_frame-tsconfig.json index c8f224032..59e066229 100644 --- a/public/ui/legacy/components/source_frame/source_frame-tsconfig.json +++ b/public/ui/legacy/components/source_frame/source_frame-tsconfig.json @@ -39,7 +39,6 @@ "../../../../../../../../front_end/ui/legacy/components/source_frame/XMLView.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/source_frame/unittests-tsconfig.json b/public/ui/legacy/components/source_frame/unittests-tsconfig.json index dca88320c..02f2d9b5a 100644 --- a/public/ui/legacy/components/source_frame/unittests-tsconfig.json +++ b/public/ui/legacy/components/source_frame/unittests-tsconfig.json @@ -41,7 +41,6 @@ "../../../../../../../../front_end/ui/legacy/components/source_frame/SourceFrame.test.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/utils/Linkifier.js b/public/ui/legacy/components/utils/Linkifier.js index f01ce985a..70a61dc7f 100644 --- a/public/ui/legacy/components/utils/Linkifier.js +++ b/public/ui/legacy/components/utils/Linkifier.js @@ -671,12 +671,7 @@ export class Linkifier extends Common.ObjectWrapper.ObjectWrapper { section: 'reveal', title: destination ? i18nString(UIStrings.revealInS, { PH1: destination }) : i18nString(UIStrings.reveal), jslogContext: 'reveal', - handler: () => { - if (revealable instanceof Breakpoints.BreakpointManager.BreakpointLocation) { - Host.userMetrics.breakpointEditDialogRevealedFrom(5 /* Host.UserMetrics.BreakpointEditDialogRevealedFrom.Linkifier */); - } - return Common.Revealer.reveal(revealable); - }, + handler: () => Common.Revealer.reveal(revealable), }); } if (contentProvider) { diff --git a/public/ui/legacy/components/utils/Linkifier.js.map b/public/ui/legacy/components/utils/Linkifier.js.map index 94f1bf3d6..de04a713e 100644 --- a/public/ui/legacy/components/utils/Linkifier.js.map +++ b/public/ui/legacy/components/utils/Linkifier.js.map @@ -1 +1 @@ -{"version":3,"file":"Linkifier.js","sourceRoot":"","sources":["../../../../../../../../front_end/ui/legacy/components/utils/Linkifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,mCAAmC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,+BAA+B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,+BAA+B,CAAC;AACtD,OAAO,KAAK,QAAQ,MAAM,uCAAuC,CAAC;AAClE,OAAO,KAAK,GAAG,MAAM,6BAA6B,CAAC;AAEnD,OAAO,KAAK,QAAQ,MAAM,yCAAyC,CAAC;AACpE,OAAO,KAAK,WAAW,MAAM,+CAA+C,CAAC;AAC7E,OAAO,KAAK,SAAS,MAAM,6CAA6C,CAAC;AAEzE,OAAO,KAAK,SAAS,MAAM,2CAA2C,CAAC;AAEvE,OAAO,KAAK,aAAa,MAAM,2CA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AO,CAAC,oBAAoB,EAAE,EACjC,GAAG,EAAE,CAAC,IAAI,CAAC,qBAAqB,CAAC,6BAA6B,CAAC,QAAQ,CAAC,UAAU,CAAC,EACnF,EAAC,YAAY,EAAE,mBAAmB,EAAC,CAAC,CAAC;QAEzC,iFAAiF;QACjF,IAAI,eAAe,YAAY,SAAS,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC;YACnE,WAAW,CAAC,gBAAgB,EAAE,CAAC,UAAU,CACrC,EAAE,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAC9B,GAAG,EAAE,CAAC,IAAI,CAAC,qBAAqB,CAAC,6BAA6B,CAAC,QAAQ,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC,EACtG,EAAC,YAAY,EAAE,gBAAgB,EAAC,CAAC,CAAC;QACxC,CAAC;aAAM,CAAC;YACN,WAAW,CAAC,gBAAgB,EAAE,CAAC,UAAU,CACrC,EAAE,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAC9B,GAAG,EAAE,CAAC,IAAI,CAAC,qBAAqB,CAAC,6BAA6B,CAAC,QAAQ,CAAC,eAAe,CAAC,WAAW,CAAC,EACpG,EAAC,YAAY,EAAE,gBAAgB,EAAC,CAAC,CAAC;QACxC,CAAC;IACH,CAAC;CACF","sourcesContent":["/*\n * Copyright (C) 2012 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 SDK from '../../../../core/sdk/sdk.js';\nimport type * as Protocol from '../../../../generated/protocol.js';\nimport * as Bindings from '../../../../models/bindings/bindings.js';\nimport * as Breakpoints from '../../../../models/breakpoints/breakpoints.js';\nimport * as TextUtils from '../../../../models/text_utils/text_utils.js';\nimport type * as TraceEngine from '../../../../models/trace/trace.js';\nimport * as Workspace from '../../../../models/workspace/workspace.js';\nimport type * as IconButton from '../../../components/icon_button/icon_button.js';\nimport * as VisualLogging from '../../../visual_logging/visual_logging.js';\nimport * as UI from '../../legacy.js';\n\nconst UIStrings = {\n /**\n *@description Text in Linkifier\n */\n unknown: '(unknown)',\n /**\n *@description Text short for automatic\n */\n auto: 'auto',\n /**\n *@description Text in Linkifier\n *@example {Sources panel} PH1\n */\n revealInS: 'Reveal in {PH1}',\n /**\n *@description Text for revealing an item in its destination\n */\n reveal: 'Reveal',\n /**\n *@description A context menu item in the Linkifier\n *@example {Extension} PH1\n */\n openUsingS: 'Open using {PH1}',\n /**\n * @description The name of a setting which controls how links are handled in the UI. 'Handling'\n * refers to the ability of extensions to DevTools to be able to intercept link clicks so that they\n * can react to them.\n */\n linkHandling: 'Link handling:',\n};\nconst str_ = i18n.i18n.registerUIStrings('ui/legacy/components/utils/Linkifier.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nconst instances = new Set<Linkifier>();\n\nlet decorator: LinkDecorator|null = null;\n\nconst anchorsByUISourceCode = new WeakMap<Workspace.UISourceCode.UISourceCode, Set<Element>>();\n\nconst infoByAnchor = new WeakMap<Node, LinkInfo>();\n\nconst textByAnchor = new WeakMap<Node, string>();\n\nconst linkHandlers = new Map<string, LinkHandler>();\n\nlet linkHandlerSettingInstance: Common.Settings.Setting<string>;\n\nexport class Linkifier extends Common.ObjectWrapper.ObjectWrapper<EventTypes> implements SDK.TargetManager.Observer {\n private readonly maxLength: number;\n private readonly anchorsByTarget: Map<SDK.Target.Target, Element[]>;\n private readonly locationPoolByTarget: Map<SDK.Target.Target, Bindings.LiveLocation.LiveLocationPool>;\n private useLinkDecorator: boolean;\n\n constructor(maxLengthForDisplayedURLs?: number, useLinkDecorator?: boolean) {\n super();\n this.maxLength = maxLengthForDisplayedURLs || UI.UIUtils.MaxLengthForDisplayedURLs;\n this.anchorsByTarget = new Map();\n this.locationPoolByTarget = new Map();\n this.useLinkDecorator = Boolean(useLinkDecorator);\n instances.add(this);\n SDK.TargetManager.TargetManager.instance().observeTargets(this);\n }\n\n static setLinkDecorator(linkDecorator: LinkDecorator): void {\n console.assert(!decorator, 'Cannot re-register link decorator.');\n decorator = linkDecorator;\n linkDecorator.addEventListener(LinkDecorator.Events.LinkIconChanged, onLinkIconChanged);\n for (const linkifier of instances) {\n linkifier.updateAllAnchorDecorations();\n }\n\n function onLinkIconChanged(event: Common.EventTarget.EventTargetEvent<Workspace.UISourceCode.UISourceCode>): void {\n const uiSourceCode = event.data;\n const links = anchorsByUISourceCode.get(uiSourceCode) || [];\n for (const link of links) {\n Linkifier.updateLinkDecorations(link);\n }\n }\n }\n\n private updateAllAnchorDecorations(): void {\n for (const anchors of this.anchorsByTarget.values()) {\n for (const anchor of anchors) {\n Linkifier.updateLinkDecorations(anchor);\n }\n }\n }\n\n private static bindUILocation(anchor: Element, uiLocation: Workspace.UISourceCode.UILocation): void {\n const linkInfo = Linkifier.linkInfo(anchor);\n if (!linkInfo) {\n return;\n }\n linkInfo.uiLocation = uiLocation;\n if (!uiLocation) {\n return;\n }\n const uiSourceCode = uiLocation.uiSourceCode;\n let sourceCodeAnchors = anchorsByUISourceCode.get(uiSourceCode);\n if (!sourceCodeAnchors) {\n sourceCodeAnchors = new Set();\n anchorsByUISourceCode.set(uiSourceCode, sourceCodeAnchors);\n }\n sourceCodeAnchors.add(anchor);\n }\n\n private static unbindUILocation(anchor: Element): void {\n const info = Linkifier.linkInfo(anchor);\n if (!info || !info.uiLocation) {\n return;\n }\n\n const uiSourceCode = info.uiLocation.uiSourceCode;\n info.uiLocation = null;\n const sourceCodeAnchors = anchorsByUISourceCode.get(uiSourceCode);\n if (sourceCodeAnchors) {\n sourceCodeAnchors.delete(anchor);\n }\n }\n\n /**\n * When we link to a breakpoint condition, we need to stash the BreakpointLocation as the revealable\n * in the LinkInfo.\n */\n private static bindBreakpoint(anchor: Element, uiLocation: Workspace.UISourceCode.UILocation): void {\n const info = Linkifier.linkInfo(anchor);\n if (!info) {\n return;\n }\n\n const breakpoint = Breakpoints.BreakpointManager.BreakpointManager.instance().findBreakpoint(uiLocation);\n if (breakpoint) {\n info.revealable = breakpoint;\n }\n }\n\n /**\n * When we link to a breakpoint condition, we store the BreakpointLocation in the revealable.\n * Clear it when the LiveLocation updates.\n */\n private static unbindBreakpoint(anchor: Element): void {\n const info = Linkifier.linkInfo(anchor);\n if (info && info.revealable) {\n info.revealable = null;\n }\n }\n\n targetAdded(target: SDK.Target.Target): void {\n this.anchorsByTarget.set(target, []);\n this.locationPoolByTarget.set(target, new Bindings.LiveLocation.LiveLocationPool());\n }\n\n targetRemoved(target: SDK.Target.Target): void {\n const locationPool = this.locationPoolByTarget.get(target);\n this.locationPoolByTarget.delete(target);\n if (!locationPool) {\n return;\n }\n locationPool.disposeAll();\n const anchors = (this.anchorsByTarget.get(target) as HTMLElement[] | null);\n if (!anchors) {\n return;\n }\n this.anchorsByTarget.delete(target);\n for (const anchor of anchors) {\n const info = Linkifier.linkInfo(anchor);\n if (!info) {\n continue;\n }\n info.liveLocation = null;\n Linkifier.unbindUILocation(anchor);\n const fallback = info.fallback;\n if (fallback) {\n anchor.replaceWith(fallback);\n }\n }\n }\n\n maybeLinkifyScriptLocation(\n target: SDK.Target.Target|null, scriptId: Protocol.Runtime.ScriptId|null,\n sourceURL: Platform.DevToolsPath.UrlString, lineNumber: number|undefined, options?: LinkifyOptions): HTMLElement\n |null {\n let fallbackAnchor: HTMLElement|null = null;\n const linkifyURLOptions: LinkifyURLOptions = {\n lineNumber,\n maxLength: this.maxLength,\n columnNumber: options?.columnNumber,\n showColumnNumber: Boolean(options?.showColumnNumber),\n className: options?.className,\n tabStop: options?.tabStop,\n inlineFrameIndex: options?.inlineFrameIndex ?? 0,\n userMetric: options?.userMetric,\n jslogContext: options?.jslogContext || 'script-source-url',\n };\n const {columnNumber, className = ''} = linkifyURLOptions;\n if (sourceURL) {\n fallbackAnchor = Linkifier.linkifyURL(sourceURL, linkifyURLOptions);\n }\n if (!target || target.isDisposed()) {\n return fallbackAnchor;\n }\n const debuggerModel = target.model(SDK.DebuggerModel.DebuggerModel);\n if (!debuggerModel) {\n return fallbackAnchor;\n }\n\n // Prefer createRawLocationByScriptId() here, since it will always produce a correct\n // link, since the script ID is unique. Only fall back to createRawLocationByURL()\n // when all we have is an URL, which is not guaranteed to be unique.\n const rawLocation = scriptId ? debuggerModel.createRawLocationByScriptId(\n scriptId, lineNumber || 0, columnNumber, linkifyURLOptions.inlineFrameIndex) :\n debuggerModel.createRawLocationByURL(\n sourceURL, lineNumber || 0, columnNumber, linkifyURLOptions.inlineFrameIndex);\n if (!rawLocation) {\n return fallbackAnchor;\n }\n\n const createLinkOptions: CreateLinkOptions = {\n tabStop: options?.tabStop,\n jslogContext: 'script-location',\n };\n const {link, linkInfo} = Linkifier.createLink(\n fallbackAnchor && fallbackAnchor.textContent ? fallbackAnchor.textContent : '', className, createLinkOptions);\n linkInfo.enableDecorator = this.useLinkDecorator;\n linkInfo.fallback = fallbackAnchor;\n linkInfo.userMetric = options?.userMetric;\n\n const pool = this.locationPoolByTarget.get(rawLocation.debuggerModel.target());\n if (!pool) {\n return fallbackAnchor;\n }\n\n const linkDisplayOptions: LinkDisplayOptions = {\n showColumnNumber: linkifyURLOptions.showColumnNumber ?? false,\n revealBreakpoint: options?.revealBreakpoint,\n };\n\n const updateDelegate = async(liveLocation: Bindings.LiveLocation.LiveLocation): Promise<void> => {\n await this.updateAnchor(link, linkDisplayOptions, liveLocation);\n this.dispatchEventToListeners(Events.LiveLocationUpdated, liveLocation);\n };\n void Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()\n .createLiveLocation(rawLocation, updateDelegate.bind(this), pool)\n .then(liveLocation => {\n if (liveLocation) {\n linkInfo.liveLocation = liveLocation;\n }\n });\n\n const anchors = (this.anchorsByTarget.get(rawLocation.debuggerModel.target()) as Element[]);\n anchors.push(link);\n return link;\n }\n\n linkifyScriptLocation(\n target: SDK.Target.Target|null, scriptId: Protocol.Runtime.ScriptId|null,\n sourceURL: Platform.DevToolsPath.UrlString, lineNumber: number|undefined, options?: LinkifyOptions): HTMLElement {\n const scriptLink = this.maybeLinkifyScriptLocation(target, scriptId, sourceURL, lineNumber, options);\n const linkifyURLOptions: LinkifyURLOptions = {\n lineNumber,\n maxLength: this.maxLength,\n className: options?.className,\n columnNumber: options?.columnNumber,\n showColumnNumber: Boolean(options?.showColumnNumber),\n inlineFrameIndex: options?.inlineFrameIndex ?? 0,\n tabStop: options?.tabStop,\n userMetric: options?.userMetric,\n jslogContext: options?.jslogContext || 'script-source-url',\n };\n\n return scriptLink || Linkifier.linkifyURL(sourceURL, linkifyURLOptions);\n }\n\n linkifyRawLocation(\n rawLocation: SDK.DebuggerModel.Location, fallbackUrl: Platform.DevToolsPath.UrlString,\n className?: string): Element {\n return this.linkifyScriptLocation(\n rawLocation.debuggerModel.target(), rawLocation.scriptId, fallbackUrl, rawLocation.lineNumber, {\n columnNumber: rawLocation.columnNumber,\n className,\n inlineFrameIndex: rawLocation.inlineFrameIndex,\n });\n }\n\n maybeLinkifyConsoleCallFrame(\n target: SDK.Target.Target|null,\n callFrame: Protocol.Runtime.CallFrame|TraceEngine.Types.TraceEvents.TraceEventCallFrame,\n options?: LinkifyOptions): HTMLElement|null {\n const linkifyOptions: LinkifyOptions = {\n ...options,\n columnNumber: callFrame.columnNumber,\n inlineFrameIndex: options?.inlineFrameIndex ?? 0,\n };\n return this.maybeLinkifyScriptLocation(\n target, String(callFrame.scriptId) as Protocol.Runtime.ScriptId,\n callFrame.url as Platform.DevToolsPath.UrlString, callFrame.lineNumber, linkifyOptions);\n }\n\n linkifyStackTraceTopFrame(target: SDK.Target.Target|null, stackTrace: Protocol.Runtime.StackTrace): HTMLElement {\n console.assert(stackTrace.callFrames.length > 0);\n\n const {url, lineNumber, columnNumber} = stackTrace.callFrames[0];\n const fallbackAnchor = Linkifier.linkifyURL(url as Platform.DevToolsPath.UrlString, {\n lineNumber,\n columnNumber,\n showColumnNumber: false,\n inlineFrameIndex: 0,\n maxLength: this.maxLength,\n preventClick: true,\n jslogContext: 'script-source-url',\n });\n\n // HAR imported network logs have no associated NetworkManager.\n if (!target) {\n return fallbackAnchor;\n }\n\n // The contract is that disposed targets don't have a LiveLocationPool\n // associated, whereas all active targets have one such pool. This ensures\n // that the fallbackAnchor is only ever used when the target was disposed.\n const pool = this.locationPoolByTarget.get(target);\n if (!pool) {\n console.assert(target.isDisposed());\n return fallbackAnchor;\n }\n console.assert(!target.isDisposed());\n\n // All targets that can report stack traces also have a debugger model.\n const debuggerModel = target.model(SDK.DebuggerModel.DebuggerModel) as SDK.DebuggerModel.DebuggerModel;\n\n const {link, linkInfo} = Linkifier.createLink('', '');\n linkInfo.enableDecorator = this.useLinkDecorator;\n linkInfo.fallback = fallbackAnchor;\n\n const linkDisplayOptions = {showColumnNumber: false};\n\n const updateDelegate = async(liveLocation: Bindings.LiveLocation.LiveLocation): Promise<void> => {\n await this.updateAnchor(link, linkDisplayOptions, liveLocation);\n this.dispatchEventToListeners(Events.LiveLocationUpdated, liveLocation);\n };\n void Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()\n .createStackTraceTopFrameLiveLocation(\n debuggerModel.createRawLocationsByStackTrace(stackTrace), updateDelegate.bind(this), pool)\n .then(liveLocation => {\n linkInfo.liveLocation = liveLocation;\n });\n\n const anchors = (this.anchorsByTarget.get(target) as Element[]);\n anchors.push(link);\n return link;\n }\n\n linkifyCSSLocation(rawLocation: SDK.CSSModel.CSSLocation, classes?: string): Element {\n const createLinkOptions: CreateLinkOptions = {\n tabStop: true,\n jslogContext: 'css-location',\n };\n const {link, linkInfo} = Linkifier.createLink('', classes || '', createLinkOptions);\n linkInfo.enableDecorator = this.useLinkDecorator;\n\n const pool = this.locationPoolByTarget.get(rawLocation.cssModel().target());\n if (!pool) {\n return link;\n }\n\n const linkDisplayOptions = {showColumnNumber: false};\n\n const updateDelegate = async(liveLocation: Bindings.LiveLocation.LiveLocation): Promise<void> => {\n await this.updateAnchor(link, linkDisplayOptions, liveLocation);\n this.dispatchEventToListeners(Events.LiveLocationUpdated, liveLocation);\n };\n void Bindings.CSSWorkspaceBinding.CSSWorkspaceBinding.instance()\n .createLiveLocation(rawLocation, updateDelegate.bind(this), pool)\n .then(liveLocation => {\n linkInfo.liveLocation = liveLocation;\n });\n\n const anchors = (this.anchorsByTarget.get(rawLocation.cssModel().target()) as Element[]);\n anchors.push(link);\n return link;\n }\n\n reset(): void {\n // Create a copy of {keys} so {targetRemoved} can safely modify the map.\n for (const target of [...this.anchorsByTarget.keys()]) {\n this.targetRemoved(target);\n this.targetAdded(target);\n }\n this.listeners?.clear();\n }\n\n dispose(): void {\n // Create a copy of {keys} so {targetRemoved} can safely modify the map.\n for (const target of [...this.anchorsByTarget.keys()]) {\n this.targetRemoved(target);\n }\n SDK.TargetManager.TargetManager.instance().unobserveTargets(this);\n instances.delete(this);\n }\n\n private async updateAnchor(\n anchor: HTMLElement, options: LinkDisplayOptions,\n liveLocation: Bindings.LiveLocation.LiveLocation): Promise<void> {\n Linkifier.unbindUILocation(anchor);\n if (options.revealBreakpoint) {\n Linkifier.unbindBreakpoint(anchor);\n }\n const uiLocation = await liveLocation.uiLocation();\n if (!uiLocation) {\n if (liveLocation instanceof Bindings.CSSWorkspaceBinding.LiveLocation) {\n const header = (liveLocation as Bindings.CSSWorkspaceBinding.LiveLocation).header();\n if (header && header.ownerNode) {\n anchor.addEventListener('click', event => {\n event.consume(true);\n void Common.Revealer.reveal(header.ownerNode || null);\n }, false);\n Linkifier.setTrimmedText(anchor, '<style>');\n }\n }\n\n anchor.classList.add('invalid-link');\n anchor.removeAttribute('role');\n return;\n }\n\n Linkifier.bindUILocation(anchor, uiLocation);\n if (options.revealBreakpoint) {\n Linkifier.bindBreakpoint(anchor, uiLocation);\n }\n const text = uiLocation.linkText(true /* skipTrim */, options.showColumnNumber);\n Linkifier.setTrimmedText(anchor, text, this.maxLength);\n\n let titleText: string = uiLocation.uiSourceCode.url();\n if (uiLocation.uiSourceCode.mimeType() === 'application/wasm') {\n // For WebAssembly locations, we follow the conventions described in\n // github.com/WebAssembly/design/blob/master/Web.md#developer-facing-display-conventions\n if (typeof uiLocation.columnNumber === 'number') {\n titleText += `:0x${uiLocation.columnNumber.toString(16)}`;\n }\n } else {\n titleText += ':' + (uiLocation.lineNumber + 1);\n if (options.showColumnNumber && typeof uiLocation.columnNumber === 'number') {\n titleText += ':' + (uiLocation.columnNumber + 1);\n }\n }\n UI.Tooltip.Tooltip.install(anchor, titleText);\n anchor.classList.toggle('ignore-list-link', await liveLocation.isIgnoreListed());\n Linkifier.updateLinkDecorations(anchor);\n }\n\n private static updateLinkDecorations(anchor: Element): void {\n const info = Linkifier.linkInfo(anchor);\n if (!info || !info.enableDecorator) {\n return;\n }\n if (!decorator || !info.uiLocation) {\n return;\n }\n if (info.icon && info.icon.parentElement) {\n anchor.removeChild(info.icon);\n }\n const icon = decorator.linkIcon(info.uiLocation.uiSourceCode);\n if (icon) {\n icon.style.setProperty('margin-right', '2px');\n anchor.insertBefore(icon, anchor.firstChild);\n }\n info.icon = icon;\n }\n\n static linkifyURL(url: Platform.DevToolsPath.UrlString, options?: LinkifyURLOptions): HTMLElement {\n options = options || {\n showColumnNumber: false,\n inlineFrameIndex: 0,\n };\n\n const text = options.text;\n const className = options.className || '';\n const lineNumber = options.lineNumber;\n const columnNumber = options.columnNumber;\n const showColumnNumber = options.showColumnNumber;\n const preventClick = options.preventClick;\n const maxLength = options.maxLength || UI.UIUtils.MaxLengthForDisplayedURLs;\n const bypassURLTrimming = options.bypassURLTrimming;\n if (!url || Common.ParsedURL.schemeIs(url, 'javascript:')) {\n const element = document.createElement('span');\n if (className) {\n element.className = className;\n }\n\n element.textContent = text || url || i18nString(UIStrings.unknown);\n return element;\n }\n\n let linkText = text || Bindings.ResourceUtils.displayNameForURL(url);\n if (typeof lineNumber === 'number' && !text) {\n linkText += ':' + (lineNumber + 1);\n if (showColumnNumber && typeof columnNumber === 'number') {\n linkText += ':' + (columnNumber + 1);\n }\n }\n const title = linkText !== url ? url : '';\n const linkOptions = {\n maxLength,\n title,\n href: url,\n preventClick,\n tabStop: options.tabStop,\n bypassURLTrimming,\n jslogContext: options.jslogContext || 'url',\n };\n const {link, linkInfo} = Linkifier.createLink(linkText, className, linkOptions);\n if (lineNumber) {\n linkInfo.lineNumber = lineNumber;\n }\n if (columnNumber) {\n linkInfo.columnNumber = columnNumber;\n }\n linkInfo.userMetric = options?.userMetric;\n return link;\n }\n\n static linkifyRevealable(\n revealable: Object, text: string|HTMLElement, fallbackHref?: Platform.DevToolsPath.UrlString, title?: string,\n className?: string, jslogContext?: string): HTMLElement {\n const createLinkOptions: CreateLinkOptions = {\n maxLength: UI.UIUtils.MaxLengthForDisplayedURLs,\n href: (fallbackHref),\n title,\n jslogContext,\n };\n const {link, linkInfo} = Linkifier.createLink(text, className || '', createLinkOptions);\n linkInfo.revealable = revealable;\n return link;\n }\n\n private static createLink(text: string|HTMLElement, className: string, options: CreateLinkOptions = {}):\n {link: HTMLElement, linkInfo: LinkInfo} {\n const {maxLength, title, href, preventClick, tabStop, bypassURLTrimming, jslogContext} = options;\n const link = document.createElement(options.preventClick ? 'span' : 'button');\n if (className) {\n link.className = className;\n }\n link.classList.add('devtools-link');\n if (!options.preventClick) {\n link.classList.add('text-button', 'link-style');\n }\n if (title) {\n UI.Tooltip.Tooltip.install(link, title);\n }\n if (href) {\n // @ts-ignore\n link.href = href;\n }\n link.setAttribute('jslog', `${VisualLogging.link(jslogContext).track({click: true})}`);\n\n if (text instanceof HTMLElement) {\n link.appendChild(text);\n } else {\n if (bypassURLTrimming) {\n link.classList.add('devtools-link-styled-trim');\n Linkifier.appendTextWithoutHashes(link, text);\n } else {\n Linkifier.setTrimmedText(link, text, maxLength);\n }\n }\n\n const linkInfo = {\n icon: null,\n enableDecorator: false,\n uiLocation: null,\n liveLocation: null,\n url: href || null,\n lineNumber: null,\n columnNumber: null,\n inlineFrameIndex: 0,\n revealable: null,\n fallback: null,\n };\n infoByAnchor.set(link, linkInfo);\n if (!preventClick) {\n link.addEventListener('click', event => {\n if (Linkifier.handleClick(event)) {\n event.consume(true);\n }\n }, false);\n } else {\n link.classList.add('devtools-link-prevent-click');\n }\n UI.ARIAUtils.markAsLink(link);\n link.tabIndex = tabStop ? 0 : -1;\n return {link, linkInfo};\n }\n\n private static setTrimmedText(link: Element, text: string, maxLength?: number): void {\n link.removeChildren();\n if (maxLength && text.length > maxLength) {\n const middleSplit = splitMiddle(text, maxLength);\n Linkifier.appendTextWithoutHashes(link, middleSplit[0]);\n Linkifier.appendHiddenText(link, middleSplit[1]);\n Linkifier.appendTextWithoutHashes(link, middleSplit[2]);\n } else {\n Linkifier.appendTextWithoutHashes(link, text);\n }\n\n function splitMiddle(string: string, maxLength: number): string[] {\n let leftIndex = Math.floor(maxLength / 2);\n let rightIndex = string.length - Math.ceil(maxLength / 2) + 1;\n\n const codePointAtRightIndex = string.codePointAt(rightIndex - 1);\n // Do not truncate between characters that use multiple code points (emojis).\n if (typeof codePointAtRightIndex !== 'undefined' && codePointAtRightIndex >= 0x10000) {\n rightIndex++;\n leftIndex++;\n }\n const codePointAtLeftIndex = string.codePointAt(leftIndex - 1);\n if (typeof codePointAtLeftIndex !== 'undefined' && leftIndex > 0 && codePointAtLeftIndex >= 0x10000) {\n leftIndex--;\n }\n return [string.substring(0, leftIndex), string.substring(leftIndex, rightIndex), string.substring(rightIndex)];\n }\n }\n\n private static appendTextWithoutHashes(link: Element, string: string): void {\n const hashSplit = TextUtils.TextUtils.Utils.splitStringByRegexes(string, [/[a-f0-9]{20,}/g]);\n for (const match of hashSplit) {\n if (match.regexIndex === -1) {\n UI.UIUtils.createTextChild(link, match.value);\n } else {\n UI.UIUtils.createTextChild(link, match.value.substring(0, 7));\n Linkifier.appendHiddenText(link, match.value.substring(7));\n }\n }\n }\n\n private static appendHiddenText(link: Element, string: string): void {\n const ellipsisNode = UI.UIUtils.createTextChild(link.createChild('span', 'devtools-link-ellipsis'), '…');\n textByAnchor.set(ellipsisNode, string);\n }\n\n static untruncatedNodeText(node: Node): string {\n return textByAnchor.get(node) || node.textContent || '';\n }\n\n static linkInfo(link: Element|null): LinkInfo|null {\n return link ? infoByAnchor.get(link) || null : null as LinkInfo | null;\n }\n\n private static handleClick(event: Event): boolean {\n const link = (event.currentTarget as Element);\n if (UI.UIUtils.isBeingEdited((event.target as Node)) || link.hasSelection()) {\n return false;\n }\n const linkInfo = Linkifier.linkInfo(link);\n if (!linkInfo) {\n return false;\n }\n return Linkifier.invokeFirstAction(linkInfo);\n }\n\n static handleClickFromNewComponentLand(linkInfo: LinkInfo): void {\n Linkifier.invokeFirstAction(linkInfo);\n }\n\n static invokeFirstAction(linkInfo: LinkInfo): boolean {\n const actions = Linkifier.linkActions(linkInfo);\n if (actions.length) {\n void actions[0].handler.call(null);\n if (linkInfo.userMetric) {\n Host.userMetrics.actionTaken(linkInfo.userMetric);\n }\n return true;\n }\n return false;\n }\n\n static linkHandlerSetting(): Common.Settings.Setting<string> {\n if (!linkHandlerSettingInstance) {\n linkHandlerSettingInstance =\n Common.Settings.Settings.instance().createSetting('open-link-handler', i18nString(UIStrings.auto));\n }\n return linkHandlerSettingInstance;\n }\n\n static registerLinkHandler(title: string, handler: LinkHandler): void {\n linkHandlers.set(title, handler);\n LinkHandlerSettingUI.instance().update();\n }\n\n static unregisterLinkHandler(title: string): void {\n linkHandlers.delete(title);\n LinkHandlerSettingUI.instance().update();\n }\n\n static uiLocation(link: Element): Workspace.UISourceCode.UILocation|null {\n const info = Linkifier.linkInfo(link);\n return info ? info.uiLocation : null;\n }\n\n static linkActions(info: LinkInfo): {\n section: string,\n title: string,\n jslogContext: string,\n handler: () => Promise<void>| void,\n }[] {\n const result: {\n section: string,\n title: string,\n jslogContext: string,\n handler: () => Promise<void>| void,\n }[] = [];\n\n if (!info) {\n return result;\n }\n\n let url = Platform.DevToolsPath.EmptyUrlString;\n let uiLocation: Workspace.UISourceCode.UILocation|(Workspace.UISourceCode.UILocation | null)|null = null;\n if (info.uiLocation) {\n uiLocation = info.uiLocation;\n url = uiLocation.uiSourceCode.contentURL();\n } else if (info.url) {\n url = info.url;\n const uiSourceCode = Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(url) ||\n Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(\n Common.ParsedURL.ParsedURL.urlWithoutHash(url) as Platform.DevToolsPath.UrlString);\n uiLocation = uiSourceCode ? uiSourceCode.uiLocation(info.lineNumber || 0, info.columnNumber || 0) : null;\n }\n const resource = url ? Bindings.ResourceUtils.resourceForURL(url) : null;\n const contentProvider = uiLocation ? uiLocation.uiSourceCode : resource;\n\n const revealable = info.revealable || uiLocation || resource;\n if (revealable) {\n const destination = Common.Revealer.revealDestination(revealable);\n result.push({\n section: 'reveal',\n title: destination ? i18nString(UIStrings.revealInS, {PH1: destination}) : i18nString(UIStrings.reveal),\n jslogContext: 'reveal',\n handler: () => {\n if (revealable instanceof Breakpoints.BreakpointManager.BreakpointLocation) {\n Host.userMetrics.breakpointEditDialogRevealedFrom(\n Host.UserMetrics.BreakpointEditDialogRevealedFrom.Linkifier);\n }\n return Common.Revealer.reveal(revealable);\n },\n });\n }\n if (contentProvider) {\n const lineNumber = uiLocation ? uiLocation.lineNumber : info.lineNumber || 0;\n for (const title of linkHandlers.keys()) {\n const handler = linkHandlers.get(title);\n if (!handler) {\n continue;\n }\n const action = {\n section: 'reveal',\n title: i18nString(UIStrings.openUsingS, {PH1: title}),\n jslogContext: 'open-using',\n handler: handler.bind(null, contentProvider, lineNumber),\n };\n if (title === Linkifier.linkHandlerSetting().get()) {\n result.unshift(action);\n } else {\n result.push(action);\n }\n }\n }\n if (resource || info.url) {\n result.push({\n section: 'reveal',\n title: UI.UIUtils.openLinkExternallyLabel(),\n jslogContext: 'open-in-new-tab',\n handler: () => Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(url),\n });\n result.push({\n section: 'clipboard',\n title: UI.UIUtils.copyLinkAddressLabel(),\n jslogContext: 'copy-link-address',\n handler: () => Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(url),\n });\n }\n\n if (uiLocation && uiLocation.uiSourceCode) {\n const contentProvider = uiLocation.uiSourceCode;\n result.push({\n section: 'clipboard',\n title: UI.UIUtils.copyFileNameLabel(),\n jslogContext: 'copy-file-name',\n handler: () => Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(contentProvider.displayName()),\n });\n }\n\n return result;\n }\n}\n\nexport interface LinkDecorator extends Common.EventTarget.EventTarget<LinkDecorator.EventTypes> {\n linkIcon(uiSourceCode: Workspace.UISourceCode.UISourceCode): IconButton.Icon.Icon|null;\n}\n\nexport namespace LinkDecorator {\n export const enum Events {\n LinkIconChanged = 'LinkIconChanged',\n }\n\n export type EventTypes = {\n [Events.LinkIconChanged]: Workspace.UISourceCode.UISourceCode,\n };\n}\n\nexport class LinkContextMenuProvider implements UI.ContextMenu.Provider<Node> {\n appendApplicableItems(_event: Event, contextMenu: UI.ContextMenu.ContextMenu, target: Node): void {\n let targetNode: Node|null = target;\n while (targetNode && !infoByAnchor.get(targetNode)) {\n targetNode = targetNode.parentNodeOrShadowHost();\n }\n const link = (targetNode as Element | null);\n const linkInfo = Linkifier.linkInfo(link);\n if (!linkInfo) {\n return;\n }\n\n const actions = Linkifier.linkActions(linkInfo);\n for (const action of actions) {\n contextMenu.section(action.section).appendItem(action.title, action.handler, {jslogContext: action.jslogContext});\n }\n }\n}\n\nlet linkHandlerSettingUIInstance: LinkHandlerSettingUI;\n\nexport class LinkHandlerSettingUI implements UI.SettingsUI.SettingUI {\n private element: HTMLSelectElement;\n\n private constructor() {\n this.element = document.createElement('select');\n this.element.classList.add('chrome-select');\n this.element.addEventListener('change', this.onChange.bind(this), false);\n this.update();\n }\n\n static instance(opts: {\n forceNew: boolean|null,\n } = {forceNew: null}): LinkHandlerSettingUI {\n const {forceNew} = opts;\n if (!linkHandlerSettingUIInstance || forceNew) {\n linkHandlerSettingUIInstance = new LinkHandlerSettingUI();\n }\n\n return linkHandlerSettingUIInstance;\n }\n\n update(): void {\n this.element.removeChildren();\n const names = [...linkHandlers.keys()];\n names.unshift(i18nString(UIStrings.auto));\n for (const name of names) {\n const option = document.createElement('option');\n option.textContent = name;\n option.selected = name === Linkifier.linkHandlerSetting().get();\n this.element.appendChild(option);\n }\n this.element.disabled = names.length <= 1;\n }\n\n private onChange(event: Event): void {\n if (!event.target) {\n return;\n }\n const value = (event.target as HTMLSelectElement).value;\n Linkifier.linkHandlerSetting().set(value);\n }\n\n settingElement(): Element|null {\n return UI.SettingsUI.createCustomSetting(i18nString(UIStrings.linkHandling), this.element);\n }\n}\n\nlet listeningToNewEvents = false;\nfunction listenForNewComponentLinkifierEvents(): void {\n if (listeningToNewEvents) {\n return;\n }\n\n listeningToNewEvents = true;\n\n window.addEventListener('linkifieractivated', function(event: Event) {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const unknownEvent = (event as any);\n const eventWithData = (unknownEvent as {\n data: LinkInfo,\n });\n Linkifier.handleClickFromNewComponentLand(eventWithData.data);\n });\n}\n\nlistenForNewComponentLinkifierEvents();\n\nexport class ContentProviderContextMenuProvider implements\n UI.ContextMenu\n .Provider<Workspace.UISourceCode.UISourceCode|SDK.Resource.Resource|SDK.NetworkRequest.NetworkRequest> {\n appendApplicableItems(\n _event: Event, contextMenu: UI.ContextMenu.ContextMenu,\n contentProvider: Workspace.UISourceCode.UISourceCode|SDK.Resource.Resource|\n SDK.NetworkRequest.NetworkRequest): void {\n const contentUrl = contentProvider.contentURL();\n if (!contentUrl) {\n return;\n }\n\n if (!Common.ParsedURL.schemeIs(contentUrl, 'file:')) {\n contextMenu.revealSection().appendItem(\n UI.UIUtils.openLinkExternallyLabel(),\n () => Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(\n contentUrl.endsWith(':formatted') ?\n Common.ParsedURL.ParsedURL.slice(contentUrl, 0, contentUrl.lastIndexOf(':')) :\n contentUrl),\n {jslogContext: 'open-in-new-tab'});\n }\n for (const title of linkHandlers.keys()) {\n const handler = linkHandlers.get(title);\n if (!handler) {\n continue;\n }\n contextMenu.revealSection().appendItem(\n i18nString(UIStrings.openUsingS, {PH1: title}), handler.bind(null, contentProvider, 0),\n {jslogContext: 'open-using'});\n }\n if (contentProvider instanceof SDK.NetworkRequest.NetworkRequest) {\n return;\n }\n\n contextMenu.clipboardSection().appendItem(\n UI.UIUtils.copyLinkAddressLabel(),\n () => Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(contentUrl),\n {jslogContext: 'copy-link-address'});\n\n // TODO(bmeurer): `displayName` should be an accessor/data property consistently.\n if (contentProvider instanceof Workspace.UISourceCode.UISourceCode) {\n contextMenu.clipboardSection().appendItem(\n UI.UIUtils.copyFileNameLabel(),\n () => Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(contentProvider.displayName()),\n {jslogContext: 'copy-file-name'});\n } else {\n contextMenu.clipboardSection().appendItem(\n UI.UIUtils.copyFileNameLabel(),\n () => Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(contentProvider.displayName),\n {jslogContext: 'copy-file-name'});\n }\n }\n}\n\ninterface LinkInfo {\n icon: IconButton.Icon.Icon|null;\n enableDecorator: boolean;\n uiLocation: Workspace.UISourceCode.UILocation|null;\n liveLocation: Bindings.LiveLocation.LiveLocation|null;\n url: Platform.DevToolsPath.UrlString|null;\n lineNumber: number|null;\n columnNumber: number|null;\n inlineFrameIndex: number;\n revealable: Object|null;\n fallback: Element|null;\n userMetric?: Host.UserMetrics.Action;\n jslogContext?: string;\n}\n\nexport interface LinkifyURLOptions {\n text?: string;\n className?: string;\n lineNumber?: number;\n columnNumber?: number;\n showColumnNumber?: boolean;\n inlineFrameIndex?: number;\n preventClick?: boolean;\n maxLength?: number;\n tabStop?: boolean;\n bypassURLTrimming?: boolean;\n userMetric?: Host.UserMetrics.Action;\n jslogContext?: string;\n}\n\nexport interface LinkifyOptions {\n className?: string;\n columnNumber?: number;\n showColumnNumber?: boolean;\n inlineFrameIndex: number;\n tabStop?: boolean;\n userMetric?: Host.UserMetrics.Action;\n jslogContext?: string;\n\n /**\n * {@link LinkDisplayOptions.revealBreakpoint}\n */\n revealBreakpoint?: boolean;\n}\n\ninterface CreateLinkOptions {\n maxLength?: number;\n title?: string;\n href?: Platform.DevToolsPath.UrlString;\n preventClick?: boolean;\n tabStop?: boolean;\n bypassURLTrimming?: boolean;\n jslogContext?: string;\n}\n\ninterface LinkDisplayOptions {\n showColumnNumber: boolean;\n\n /**\n * If true, we'll check if there is a breakpoint at the UILocation we get\n * from the LiveLocation. If we find a breakpoint, we'll reveal the corresponding\n * {@link Breakpoints.BreakpointManager.BreakpointLocation}. Which opens the\n * breakpoint edit dialog.\n */\n revealBreakpoint?: boolean;\n}\n\nexport type LinkHandler = (arg0: TextUtils.ContentProvider.ContentProvider, arg1: number) => void;\n\nexport const enum Events {\n LiveLocationUpdated = 'liveLocationUpdated',\n}\n\nexport type EventTypes = {\n [Events.LiveLocationUpdated]: Bindings.LiveLocation.LiveLocation,\n};\n"]} \ No newline at end of file +{"version":3,"file":"Linkifier.js","sourceRoot":"","sources":["../../../../../../../../front_end/ui/legacy/components/utils/Linkifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,MAAM,MAAM,mCAAmC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,+BAA+B,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,+BAA+B,CAAC;AACtD,OAAO,KAAK,QAAQ,MAAM,uCAAuC,CAAC;AAClE,OAAO,KAAK,GAAG,MAAM,6BAA6B,CAAC;AAEnD,OAAO,KAAK,QAAQ,MAAM,yCAAyC,CAAC;AACpE,OAAO,KAAK,WAAW,MAAM,+CAA+C,CAAC;AAC7E,OAAO,KAAK,SAAS,MAAM,6CAA6C,CAAC;AAEzE,OAAO,KAAK,SAAS,MAAM,2CAA2C,CAAC;AAEvE,OAAO,KAAK,aAAa,MAAM,2CAA2C,CAAC;AAC3E,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAEtC,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,OAAO,EAAE,WAAW;IACpB;;OAEG;IACH,IAAI,EAAE,MAAM;IACZ;;;OAGG;IACH,SAAS,EAAE,iBAAiB;IAC5B;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;;OAGG;IACH,UAAU,EAAE,kBAAkB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AAE,CAAC,EACtG,EAAC,YAAY,EAAE,gBAAgB,EAAC,CAAC,CAAC;QACxC,CAAC;aAAM,CAAC;YACN,WAAW,CAAC,gBAAgB,EAAE,CAAC,UAAU,CACrC,EAAE,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAC9B,GAAG,EAAE,CAAC,IAAI,CAAC,qBAAqB,CAAC,6BAA6B,CAAC,QAAQ,CAAC,eAAe,CAAC,WAAW,CAAC,EACpG,EAAC,YAAY,EAAE,gBAAgB,EAAC,CAAC,CAAC;QACxC,CAAC;IACH,CAAC;CACF","sourcesContent":["/*\n * Copyright (C) 2012 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 SDK from '../../../../core/sdk/sdk.js';\nimport type * as Protocol from '../../../../generated/protocol.js';\nimport * as Bindings from '../../../../models/bindings/bindings.js';\nimport * as Breakpoints from '../../../../models/breakpoints/breakpoints.js';\nimport * as TextUtils from '../../../../models/text_utils/text_utils.js';\nimport type * as TraceEngine from '../../../../models/trace/trace.js';\nimport * as Workspace from '../../../../models/workspace/workspace.js';\nimport type * as IconButton from '../../../components/icon_button/icon_button.js';\nimport * as VisualLogging from '../../../visual_logging/visual_logging.js';\nimport * as UI from '../../legacy.js';\n\nconst UIStrings = {\n /**\n *@description Text in Linkifier\n */\n unknown: '(unknown)',\n /**\n *@description Text short for automatic\n */\n auto: 'auto',\n /**\n *@description Text in Linkifier\n *@example {Sources panel} PH1\n */\n revealInS: 'Reveal in {PH1}',\n /**\n *@description Text for revealing an item in its destination\n */\n reveal: 'Reveal',\n /**\n *@description A context menu item in the Linkifier\n *@example {Extension} PH1\n */\n openUsingS: 'Open using {PH1}',\n /**\n * @description The name of a setting which controls how links are handled in the UI. 'Handling'\n * refers to the ability of extensions to DevTools to be able to intercept link clicks so that they\n * can react to them.\n */\n linkHandling: 'Link handling:',\n};\nconst str_ = i18n.i18n.registerUIStrings('ui/legacy/components/utils/Linkifier.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nconst instances = new Set<Linkifier>();\n\nlet decorator: LinkDecorator|null = null;\n\nconst anchorsByUISourceCode = new WeakMap<Workspace.UISourceCode.UISourceCode, Set<Element>>();\n\nconst infoByAnchor = new WeakMap<Node, LinkInfo>();\n\nconst textByAnchor = new WeakMap<Node, string>();\n\nconst linkHandlers = new Map<string, LinkHandler>();\n\nlet linkHandlerSettingInstance: Common.Settings.Setting<string>;\n\nexport class Linkifier extends Common.ObjectWrapper.ObjectWrapper<EventTypes> implements SDK.TargetManager.Observer {\n private readonly maxLength: number;\n private readonly anchorsByTarget: Map<SDK.Target.Target, Element[]>;\n private readonly locationPoolByTarget: Map<SDK.Target.Target, Bindings.LiveLocation.LiveLocationPool>;\n private useLinkDecorator: boolean;\n\n constructor(maxLengthForDisplayedURLs?: number, useLinkDecorator?: boolean) {\n super();\n this.maxLength = maxLengthForDisplayedURLs || UI.UIUtils.MaxLengthForDisplayedURLs;\n this.anchorsByTarget = new Map();\n this.locationPoolByTarget = new Map();\n this.useLinkDecorator = Boolean(useLinkDecorator);\n instances.add(this);\n SDK.TargetManager.TargetManager.instance().observeTargets(this);\n }\n\n static setLinkDecorator(linkDecorator: LinkDecorator): void {\n console.assert(!decorator, 'Cannot re-register link decorator.');\n decorator = linkDecorator;\n linkDecorator.addEventListener(LinkDecorator.Events.LinkIconChanged, onLinkIconChanged);\n for (const linkifier of instances) {\n linkifier.updateAllAnchorDecorations();\n }\n\n function onLinkIconChanged(event: Common.EventTarget.EventTargetEvent<Workspace.UISourceCode.UISourceCode>): void {\n const uiSourceCode = event.data;\n const links = anchorsByUISourceCode.get(uiSourceCode) || [];\n for (const link of links) {\n Linkifier.updateLinkDecorations(link);\n }\n }\n }\n\n private updateAllAnchorDecorations(): void {\n for (const anchors of this.anchorsByTarget.values()) {\n for (const anchor of anchors) {\n Linkifier.updateLinkDecorations(anchor);\n }\n }\n }\n\n private static bindUILocation(anchor: Element, uiLocation: Workspace.UISourceCode.UILocation): void {\n const linkInfo = Linkifier.linkInfo(anchor);\n if (!linkInfo) {\n return;\n }\n linkInfo.uiLocation = uiLocation;\n if (!uiLocation) {\n return;\n }\n const uiSourceCode = uiLocation.uiSourceCode;\n let sourceCodeAnchors = anchorsByUISourceCode.get(uiSourceCode);\n if (!sourceCodeAnchors) {\n sourceCodeAnchors = new Set();\n anchorsByUISourceCode.set(uiSourceCode, sourceCodeAnchors);\n }\n sourceCodeAnchors.add(anchor);\n }\n\n private static unbindUILocation(anchor: Element): void {\n const info = Linkifier.linkInfo(anchor);\n if (!info || !info.uiLocation) {\n return;\n }\n\n const uiSourceCode = info.uiLocation.uiSourceCode;\n info.uiLocation = null;\n const sourceCodeAnchors = anchorsByUISourceCode.get(uiSourceCode);\n if (sourceCodeAnchors) {\n sourceCodeAnchors.delete(anchor);\n }\n }\n\n /**\n * When we link to a breakpoint condition, we need to stash the BreakpointLocation as the revealable\n * in the LinkInfo.\n */\n private static bindBreakpoint(anchor: Element, uiLocation: Workspace.UISourceCode.UILocation): void {\n const info = Linkifier.linkInfo(anchor);\n if (!info) {\n return;\n }\n\n const breakpoint = Breakpoints.BreakpointManager.BreakpointManager.instance().findBreakpoint(uiLocation);\n if (breakpoint) {\n info.revealable = breakpoint;\n }\n }\n\n /**\n * When we link to a breakpoint condition, we store the BreakpointLocation in the revealable.\n * Clear it when the LiveLocation updates.\n */\n private static unbindBreakpoint(anchor: Element): void {\n const info = Linkifier.linkInfo(anchor);\n if (info && info.revealable) {\n info.revealable = null;\n }\n }\n\n targetAdded(target: SDK.Target.Target): void {\n this.anchorsByTarget.set(target, []);\n this.locationPoolByTarget.set(target, new Bindings.LiveLocation.LiveLocationPool());\n }\n\n targetRemoved(target: SDK.Target.Target): void {\n const locationPool = this.locationPoolByTarget.get(target);\n this.locationPoolByTarget.delete(target);\n if (!locationPool) {\n return;\n }\n locationPool.disposeAll();\n const anchors = (this.anchorsByTarget.get(target) as HTMLElement[] | null);\n if (!anchors) {\n return;\n }\n this.anchorsByTarget.delete(target);\n for (const anchor of anchors) {\n const info = Linkifier.linkInfo(anchor);\n if (!info) {\n continue;\n }\n info.liveLocation = null;\n Linkifier.unbindUILocation(anchor);\n const fallback = info.fallback;\n if (fallback) {\n anchor.replaceWith(fallback);\n }\n }\n }\n\n maybeLinkifyScriptLocation(\n target: SDK.Target.Target|null, scriptId: Protocol.Runtime.ScriptId|null,\n sourceURL: Platform.DevToolsPath.UrlString, lineNumber: number|undefined, options?: LinkifyOptions): HTMLElement\n |null {\n let fallbackAnchor: HTMLElement|null = null;\n const linkifyURLOptions: LinkifyURLOptions = {\n lineNumber,\n maxLength: this.maxLength,\n columnNumber: options?.columnNumber,\n showColumnNumber: Boolean(options?.showColumnNumber),\n className: options?.className,\n tabStop: options?.tabStop,\n inlineFrameIndex: options?.inlineFrameIndex ?? 0,\n userMetric: options?.userMetric,\n jslogContext: options?.jslogContext || 'script-source-url',\n };\n const {columnNumber, className = ''} = linkifyURLOptions;\n if (sourceURL) {\n fallbackAnchor = Linkifier.linkifyURL(sourceURL, linkifyURLOptions);\n }\n if (!target || target.isDisposed()) {\n return fallbackAnchor;\n }\n const debuggerModel = target.model(SDK.DebuggerModel.DebuggerModel);\n if (!debuggerModel) {\n return fallbackAnchor;\n }\n\n // Prefer createRawLocationByScriptId() here, since it will always produce a correct\n // link, since the script ID is unique. Only fall back to createRawLocationByURL()\n // when all we have is an URL, which is not guaranteed to be unique.\n const rawLocation = scriptId ? debuggerModel.createRawLocationByScriptId(\n scriptId, lineNumber || 0, columnNumber, linkifyURLOptions.inlineFrameIndex) :\n debuggerModel.createRawLocationByURL(\n sourceURL, lineNumber || 0, columnNumber, linkifyURLOptions.inlineFrameIndex);\n if (!rawLocation) {\n return fallbackAnchor;\n }\n\n const createLinkOptions: CreateLinkOptions = {\n tabStop: options?.tabStop,\n jslogContext: 'script-location',\n };\n const {link, linkInfo} = Linkifier.createLink(\n fallbackAnchor && fallbackAnchor.textContent ? fallbackAnchor.textContent : '', className, createLinkOptions);\n linkInfo.enableDecorator = this.useLinkDecorator;\n linkInfo.fallback = fallbackAnchor;\n linkInfo.userMetric = options?.userMetric;\n\n const pool = this.locationPoolByTarget.get(rawLocation.debuggerModel.target());\n if (!pool) {\n return fallbackAnchor;\n }\n\n const linkDisplayOptions: LinkDisplayOptions = {\n showColumnNumber: linkifyURLOptions.showColumnNumber ?? false,\n revealBreakpoint: options?.revealBreakpoint,\n };\n\n const updateDelegate = async(liveLocation: Bindings.LiveLocation.LiveLocation): Promise<void> => {\n await this.updateAnchor(link, linkDisplayOptions, liveLocation);\n this.dispatchEventToListeners(Events.LiveLocationUpdated, liveLocation);\n };\n void Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()\n .createLiveLocation(rawLocation, updateDelegate.bind(this), pool)\n .then(liveLocation => {\n if (liveLocation) {\n linkInfo.liveLocation = liveLocation;\n }\n });\n\n const anchors = (this.anchorsByTarget.get(rawLocation.debuggerModel.target()) as Element[]);\n anchors.push(link);\n return link;\n }\n\n linkifyScriptLocation(\n target: SDK.Target.Target|null, scriptId: Protocol.Runtime.ScriptId|null,\n sourceURL: Platform.DevToolsPath.UrlString, lineNumber: number|undefined, options?: LinkifyOptions): HTMLElement {\n const scriptLink = this.maybeLinkifyScriptLocation(target, scriptId, sourceURL, lineNumber, options);\n const linkifyURLOptions: LinkifyURLOptions = {\n lineNumber,\n maxLength: this.maxLength,\n className: options?.className,\n columnNumber: options?.columnNumber,\n showColumnNumber: Boolean(options?.showColumnNumber),\n inlineFrameIndex: options?.inlineFrameIndex ?? 0,\n tabStop: options?.tabStop,\n userMetric: options?.userMetric,\n jslogContext: options?.jslogContext || 'script-source-url',\n };\n\n return scriptLink || Linkifier.linkifyURL(sourceURL, linkifyURLOptions);\n }\n\n linkifyRawLocation(\n rawLocation: SDK.DebuggerModel.Location, fallbackUrl: Platform.DevToolsPath.UrlString,\n className?: string): Element {\n return this.linkifyScriptLocation(\n rawLocation.debuggerModel.target(), rawLocation.scriptId, fallbackUrl, rawLocation.lineNumber, {\n columnNumber: rawLocation.columnNumber,\n className,\n inlineFrameIndex: rawLocation.inlineFrameIndex,\n });\n }\n\n maybeLinkifyConsoleCallFrame(\n target: SDK.Target.Target|null,\n callFrame: Protocol.Runtime.CallFrame|TraceEngine.Types.TraceEvents.TraceEventCallFrame,\n options?: LinkifyOptions): HTMLElement|null {\n const linkifyOptions: LinkifyOptions = {\n ...options,\n columnNumber: callFrame.columnNumber,\n inlineFrameIndex: options?.inlineFrameIndex ?? 0,\n };\n return this.maybeLinkifyScriptLocation(\n target, String(callFrame.scriptId) as Protocol.Runtime.ScriptId,\n callFrame.url as Platform.DevToolsPath.UrlString, callFrame.lineNumber, linkifyOptions);\n }\n\n linkifyStackTraceTopFrame(target: SDK.Target.Target|null, stackTrace: Protocol.Runtime.StackTrace): HTMLElement {\n console.assert(stackTrace.callFrames.length > 0);\n\n const {url, lineNumber, columnNumber} = stackTrace.callFrames[0];\n const fallbackAnchor = Linkifier.linkifyURL(url as Platform.DevToolsPath.UrlString, {\n lineNumber,\n columnNumber,\n showColumnNumber: false,\n inlineFrameIndex: 0,\n maxLength: this.maxLength,\n preventClick: true,\n jslogContext: 'script-source-url',\n });\n\n // HAR imported network logs have no associated NetworkManager.\n if (!target) {\n return fallbackAnchor;\n }\n\n // The contract is that disposed targets don't have a LiveLocationPool\n // associated, whereas all active targets have one such pool. This ensures\n // that the fallbackAnchor is only ever used when the target was disposed.\n const pool = this.locationPoolByTarget.get(target);\n if (!pool) {\n console.assert(target.isDisposed());\n return fallbackAnchor;\n }\n console.assert(!target.isDisposed());\n\n // All targets that can report stack traces also have a debugger model.\n const debuggerModel = target.model(SDK.DebuggerModel.DebuggerModel) as SDK.DebuggerModel.DebuggerModel;\n\n const {link, linkInfo} = Linkifier.createLink('', '');\n linkInfo.enableDecorator = this.useLinkDecorator;\n linkInfo.fallback = fallbackAnchor;\n\n const linkDisplayOptions = {showColumnNumber: false};\n\n const updateDelegate = async(liveLocation: Bindings.LiveLocation.LiveLocation): Promise<void> => {\n await this.updateAnchor(link, linkDisplayOptions, liveLocation);\n this.dispatchEventToListeners(Events.LiveLocationUpdated, liveLocation);\n };\n void Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance()\n .createStackTraceTopFrameLiveLocation(\n debuggerModel.createRawLocationsByStackTrace(stackTrace), updateDelegate.bind(this), pool)\n .then(liveLocation => {\n linkInfo.liveLocation = liveLocation;\n });\n\n const anchors = (this.anchorsByTarget.get(target) as Element[]);\n anchors.push(link);\n return link;\n }\n\n linkifyCSSLocation(rawLocation: SDK.CSSModel.CSSLocation, classes?: string): Element {\n const createLinkOptions: CreateLinkOptions = {\n tabStop: true,\n jslogContext: 'css-location',\n };\n const {link, linkInfo} = Linkifier.createLink('', classes || '', createLinkOptions);\n linkInfo.enableDecorator = this.useLinkDecorator;\n\n const pool = this.locationPoolByTarget.get(rawLocation.cssModel().target());\n if (!pool) {\n return link;\n }\n\n const linkDisplayOptions = {showColumnNumber: false};\n\n const updateDelegate = async(liveLocation: Bindings.LiveLocation.LiveLocation): Promise<void> => {\n await this.updateAnchor(link, linkDisplayOptions, liveLocation);\n this.dispatchEventToListeners(Events.LiveLocationUpdated, liveLocation);\n };\n void Bindings.CSSWorkspaceBinding.CSSWorkspaceBinding.instance()\n .createLiveLocation(rawLocation, updateDelegate.bind(this), pool)\n .then(liveLocation => {\n linkInfo.liveLocation = liveLocation;\n });\n\n const anchors = (this.anchorsByTarget.get(rawLocation.cssModel().target()) as Element[]);\n anchors.push(link);\n return link;\n }\n\n reset(): void {\n // Create a copy of {keys} so {targetRemoved} can safely modify the map.\n for (const target of [...this.anchorsByTarget.keys()]) {\n this.targetRemoved(target);\n this.targetAdded(target);\n }\n this.listeners?.clear();\n }\n\n dispose(): void {\n // Create a copy of {keys} so {targetRemoved} can safely modify the map.\n for (const target of [...this.anchorsByTarget.keys()]) {\n this.targetRemoved(target);\n }\n SDK.TargetManager.TargetManager.instance().unobserveTargets(this);\n instances.delete(this);\n }\n\n private async updateAnchor(\n anchor: HTMLElement, options: LinkDisplayOptions,\n liveLocation: Bindings.LiveLocation.LiveLocation): Promise<void> {\n Linkifier.unbindUILocation(anchor);\n if (options.revealBreakpoint) {\n Linkifier.unbindBreakpoint(anchor);\n }\n const uiLocation = await liveLocation.uiLocation();\n if (!uiLocation) {\n if (liveLocation instanceof Bindings.CSSWorkspaceBinding.LiveLocation) {\n const header = (liveLocation as Bindings.CSSWorkspaceBinding.LiveLocation).header();\n if (header && header.ownerNode) {\n anchor.addEventListener('click', event => {\n event.consume(true);\n void Common.Revealer.reveal(header.ownerNode || null);\n }, false);\n Linkifier.setTrimmedText(anchor, '<style>');\n }\n }\n\n anchor.classList.add('invalid-link');\n anchor.removeAttribute('role');\n return;\n }\n\n Linkifier.bindUILocation(anchor, uiLocation);\n if (options.revealBreakpoint) {\n Linkifier.bindBreakpoint(anchor, uiLocation);\n }\n const text = uiLocation.linkText(true /* skipTrim */, options.showColumnNumber);\n Linkifier.setTrimmedText(anchor, text, this.maxLength);\n\n let titleText: string = uiLocation.uiSourceCode.url();\n if (uiLocation.uiSourceCode.mimeType() === 'application/wasm') {\n // For WebAssembly locations, we follow the conventions described in\n // github.com/WebAssembly/design/blob/master/Web.md#developer-facing-display-conventions\n if (typeof uiLocation.columnNumber === 'number') {\n titleText += `:0x${uiLocation.columnNumber.toString(16)}`;\n }\n } else {\n titleText += ':' + (uiLocation.lineNumber + 1);\n if (options.showColumnNumber && typeof uiLocation.columnNumber === 'number') {\n titleText += ':' + (uiLocation.columnNumber + 1);\n }\n }\n UI.Tooltip.Tooltip.install(anchor, titleText);\n anchor.classList.toggle('ignore-list-link', await liveLocation.isIgnoreListed());\n Linkifier.updateLinkDecorations(anchor);\n }\n\n private static updateLinkDecorations(anchor: Element): void {\n const info = Linkifier.linkInfo(anchor);\n if (!info || !info.enableDecorator) {\n return;\n }\n if (!decorator || !info.uiLocation) {\n return;\n }\n if (info.icon && info.icon.parentElement) {\n anchor.removeChild(info.icon);\n }\n const icon = decorator.linkIcon(info.uiLocation.uiSourceCode);\n if (icon) {\n icon.style.setProperty('margin-right', '2px');\n anchor.insertBefore(icon, anchor.firstChild);\n }\n info.icon = icon;\n }\n\n static linkifyURL(url: Platform.DevToolsPath.UrlString, options?: LinkifyURLOptions): HTMLElement {\n options = options || {\n showColumnNumber: false,\n inlineFrameIndex: 0,\n };\n\n const text = options.text;\n const className = options.className || '';\n const lineNumber = options.lineNumber;\n const columnNumber = options.columnNumber;\n const showColumnNumber = options.showColumnNumber;\n const preventClick = options.preventClick;\n const maxLength = options.maxLength || UI.UIUtils.MaxLengthForDisplayedURLs;\n const bypassURLTrimming = options.bypassURLTrimming;\n if (!url || Common.ParsedURL.schemeIs(url, 'javascript:')) {\n const element = document.createElement('span');\n if (className) {\n element.className = className;\n }\n\n element.textContent = text || url || i18nString(UIStrings.unknown);\n return element;\n }\n\n let linkText = text || Bindings.ResourceUtils.displayNameForURL(url);\n if (typeof lineNumber === 'number' && !text) {\n linkText += ':' + (lineNumber + 1);\n if (showColumnNumber && typeof columnNumber === 'number') {\n linkText += ':' + (columnNumber + 1);\n }\n }\n const title = linkText !== url ? url : '';\n const linkOptions = {\n maxLength,\n title,\n href: url,\n preventClick,\n tabStop: options.tabStop,\n bypassURLTrimming,\n jslogContext: options.jslogContext || 'url',\n };\n const {link, linkInfo} = Linkifier.createLink(linkText, className, linkOptions);\n if (lineNumber) {\n linkInfo.lineNumber = lineNumber;\n }\n if (columnNumber) {\n linkInfo.columnNumber = columnNumber;\n }\n linkInfo.userMetric = options?.userMetric;\n return link;\n }\n\n static linkifyRevealable(\n revealable: Object, text: string|HTMLElement, fallbackHref?: Platform.DevToolsPath.UrlString, title?: string,\n className?: string, jslogContext?: string): HTMLElement {\n const createLinkOptions: CreateLinkOptions = {\n maxLength: UI.UIUtils.MaxLengthForDisplayedURLs,\n href: (fallbackHref),\n title,\n jslogContext,\n };\n const {link, linkInfo} = Linkifier.createLink(text, className || '', createLinkOptions);\n linkInfo.revealable = revealable;\n return link;\n }\n\n private static createLink(text: string|HTMLElement, className: string, options: CreateLinkOptions = {}):\n {link: HTMLElement, linkInfo: LinkInfo} {\n const {maxLength, title, href, preventClick, tabStop, bypassURLTrimming, jslogContext} = options;\n const link = document.createElement(options.preventClick ? 'span' : 'button');\n if (className) {\n link.className = className;\n }\n link.classList.add('devtools-link');\n if (!options.preventClick) {\n link.classList.add('text-button', 'link-style');\n }\n if (title) {\n UI.Tooltip.Tooltip.install(link, title);\n }\n if (href) {\n // @ts-ignore\n link.href = href;\n }\n link.setAttribute('jslog', `${VisualLogging.link(jslogContext).track({click: true})}`);\n\n if (text instanceof HTMLElement) {\n link.appendChild(text);\n } else {\n if (bypassURLTrimming) {\n link.classList.add('devtools-link-styled-trim');\n Linkifier.appendTextWithoutHashes(link, text);\n } else {\n Linkifier.setTrimmedText(link, text, maxLength);\n }\n }\n\n const linkInfo = {\n icon: null,\n enableDecorator: false,\n uiLocation: null,\n liveLocation: null,\n url: href || null,\n lineNumber: null,\n columnNumber: null,\n inlineFrameIndex: 0,\n revealable: null,\n fallback: null,\n };\n infoByAnchor.set(link, linkInfo);\n if (!preventClick) {\n link.addEventListener('click', event => {\n if (Linkifier.handleClick(event)) {\n event.consume(true);\n }\n }, false);\n } else {\n link.classList.add('devtools-link-prevent-click');\n }\n UI.ARIAUtils.markAsLink(link);\n link.tabIndex = tabStop ? 0 : -1;\n return {link, linkInfo};\n }\n\n private static setTrimmedText(link: Element, text: string, maxLength?: number): void {\n link.removeChildren();\n if (maxLength && text.length > maxLength) {\n const middleSplit = splitMiddle(text, maxLength);\n Linkifier.appendTextWithoutHashes(link, middleSplit[0]);\n Linkifier.appendHiddenText(link, middleSplit[1]);\n Linkifier.appendTextWithoutHashes(link, middleSplit[2]);\n } else {\n Linkifier.appendTextWithoutHashes(link, text);\n }\n\n function splitMiddle(string: string, maxLength: number): string[] {\n let leftIndex = Math.floor(maxLength / 2);\n let rightIndex = string.length - Math.ceil(maxLength / 2) + 1;\n\n const codePointAtRightIndex = string.codePointAt(rightIndex - 1);\n // Do not truncate between characters that use multiple code points (emojis).\n if (typeof codePointAtRightIndex !== 'undefined' && codePointAtRightIndex >= 0x10000) {\n rightIndex++;\n leftIndex++;\n }\n const codePointAtLeftIndex = string.codePointAt(leftIndex - 1);\n if (typeof codePointAtLeftIndex !== 'undefined' && leftIndex > 0 && codePointAtLeftIndex >= 0x10000) {\n leftIndex--;\n }\n return [string.substring(0, leftIndex), string.substring(leftIndex, rightIndex), string.substring(rightIndex)];\n }\n }\n\n private static appendTextWithoutHashes(link: Element, string: string): void {\n const hashSplit = TextUtils.TextUtils.Utils.splitStringByRegexes(string, [/[a-f0-9]{20,}/g]);\n for (const match of hashSplit) {\n if (match.regexIndex === -1) {\n UI.UIUtils.createTextChild(link, match.value);\n } else {\n UI.UIUtils.createTextChild(link, match.value.substring(0, 7));\n Linkifier.appendHiddenText(link, match.value.substring(7));\n }\n }\n }\n\n private static appendHiddenText(link: Element, string: string): void {\n const ellipsisNode = UI.UIUtils.createTextChild(link.createChild('span', 'devtools-link-ellipsis'), '…');\n textByAnchor.set(ellipsisNode, string);\n }\n\n static untruncatedNodeText(node: Node): string {\n return textByAnchor.get(node) || node.textContent || '';\n }\n\n static linkInfo(link: Element|null): LinkInfo|null {\n return link ? infoByAnchor.get(link) || null : null as LinkInfo | null;\n }\n\n private static handleClick(event: Event): boolean {\n const link = (event.currentTarget as Element);\n if (UI.UIUtils.isBeingEdited((event.target as Node)) || link.hasSelection()) {\n return false;\n }\n const linkInfo = Linkifier.linkInfo(link);\n if (!linkInfo) {\n return false;\n }\n return Linkifier.invokeFirstAction(linkInfo);\n }\n\n static handleClickFromNewComponentLand(linkInfo: LinkInfo): void {\n Linkifier.invokeFirstAction(linkInfo);\n }\n\n static invokeFirstAction(linkInfo: LinkInfo): boolean {\n const actions = Linkifier.linkActions(linkInfo);\n if (actions.length) {\n void actions[0].handler.call(null);\n if (linkInfo.userMetric) {\n Host.userMetrics.actionTaken(linkInfo.userMetric);\n }\n return true;\n }\n return false;\n }\n\n static linkHandlerSetting(): Common.Settings.Setting<string> {\n if (!linkHandlerSettingInstance) {\n linkHandlerSettingInstance =\n Common.Settings.Settings.instance().createSetting('open-link-handler', i18nString(UIStrings.auto));\n }\n return linkHandlerSettingInstance;\n }\n\n static registerLinkHandler(title: string, handler: LinkHandler): void {\n linkHandlers.set(title, handler);\n LinkHandlerSettingUI.instance().update();\n }\n\n static unregisterLinkHandler(title: string): void {\n linkHandlers.delete(title);\n LinkHandlerSettingUI.instance().update();\n }\n\n static uiLocation(link: Element): Workspace.UISourceCode.UILocation|null {\n const info = Linkifier.linkInfo(link);\n return info ? info.uiLocation : null;\n }\n\n static linkActions(info: LinkInfo): {\n section: string,\n title: string,\n jslogContext: string,\n handler: () => Promise<void>| void,\n }[] {\n const result: {\n section: string,\n title: string,\n jslogContext: string,\n handler: () => Promise<void>| void,\n }[] = [];\n\n if (!info) {\n return result;\n }\n\n let url = Platform.DevToolsPath.EmptyUrlString;\n let uiLocation: Workspace.UISourceCode.UILocation|(Workspace.UISourceCode.UILocation | null)|null = null;\n if (info.uiLocation) {\n uiLocation = info.uiLocation;\n url = uiLocation.uiSourceCode.contentURL();\n } else if (info.url) {\n url = info.url;\n const uiSourceCode = Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(url) ||\n Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(\n Common.ParsedURL.ParsedURL.urlWithoutHash(url) as Platform.DevToolsPath.UrlString);\n uiLocation = uiSourceCode ? uiSourceCode.uiLocation(info.lineNumber || 0, info.columnNumber || 0) : null;\n }\n const resource = url ? Bindings.ResourceUtils.resourceForURL(url) : null;\n const contentProvider = uiLocation ? uiLocation.uiSourceCode : resource;\n\n const revealable = info.revealable || uiLocation || resource;\n if (revealable) {\n const destination = Common.Revealer.revealDestination(revealable);\n result.push({\n section: 'reveal',\n title: destination ? i18nString(UIStrings.revealInS, {PH1: destination}) : i18nString(UIStrings.reveal),\n jslogContext: 'reveal',\n handler: () => Common.Revealer.reveal(revealable),\n });\n }\n if (contentProvider) {\n const lineNumber = uiLocation ? uiLocation.lineNumber : info.lineNumber || 0;\n for (const title of linkHandlers.keys()) {\n const handler = linkHandlers.get(title);\n if (!handler) {\n continue;\n }\n const action = {\n section: 'reveal',\n title: i18nString(UIStrings.openUsingS, {PH1: title}),\n jslogContext: 'open-using',\n handler: handler.bind(null, contentProvider, lineNumber),\n };\n if (title === Linkifier.linkHandlerSetting().get()) {\n result.unshift(action);\n } else {\n result.push(action);\n }\n }\n }\n if (resource || info.url) {\n result.push({\n section: 'reveal',\n title: UI.UIUtils.openLinkExternallyLabel(),\n jslogContext: 'open-in-new-tab',\n handler: () => Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(url),\n });\n result.push({\n section: 'clipboard',\n title: UI.UIUtils.copyLinkAddressLabel(),\n jslogContext: 'copy-link-address',\n handler: () => Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(url),\n });\n }\n\n if (uiLocation && uiLocation.uiSourceCode) {\n const contentProvider = uiLocation.uiSourceCode;\n result.push({\n section: 'clipboard',\n title: UI.UIUtils.copyFileNameLabel(),\n jslogContext: 'copy-file-name',\n handler: () => Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(contentProvider.displayName()),\n });\n }\n\n return result;\n }\n}\n\nexport interface LinkDecorator extends Common.EventTarget.EventTarget<LinkDecorator.EventTypes> {\n linkIcon(uiSourceCode: Workspace.UISourceCode.UISourceCode): IconButton.Icon.Icon|null;\n}\n\nexport namespace LinkDecorator {\n export const enum Events {\n LinkIconChanged = 'LinkIconChanged',\n }\n\n export type EventTypes = {\n [Events.LinkIconChanged]: Workspace.UISourceCode.UISourceCode,\n };\n}\n\nexport class LinkContextMenuProvider implements UI.ContextMenu.Provider<Node> {\n appendApplicableItems(_event: Event, contextMenu: UI.ContextMenu.ContextMenu, target: Node): void {\n let targetNode: Node|null = target;\n while (targetNode && !infoByAnchor.get(targetNode)) {\n targetNode = targetNode.parentNodeOrShadowHost();\n }\n const link = (targetNode as Element | null);\n const linkInfo = Linkifier.linkInfo(link);\n if (!linkInfo) {\n return;\n }\n\n const actions = Linkifier.linkActions(linkInfo);\n for (const action of actions) {\n contextMenu.section(action.section).appendItem(action.title, action.handler, {jslogContext: action.jslogContext});\n }\n }\n}\n\nlet linkHandlerSettingUIInstance: LinkHandlerSettingUI;\n\nexport class LinkHandlerSettingUI implements UI.SettingsUI.SettingUI {\n private element: HTMLSelectElement;\n\n private constructor() {\n this.element = document.createElement('select');\n this.element.classList.add('chrome-select');\n this.element.addEventListener('change', this.onChange.bind(this), false);\n this.update();\n }\n\n static instance(opts: {\n forceNew: boolean|null,\n } = {forceNew: null}): LinkHandlerSettingUI {\n const {forceNew} = opts;\n if (!linkHandlerSettingUIInstance || forceNew) {\n linkHandlerSettingUIInstance = new LinkHandlerSettingUI();\n }\n\n return linkHandlerSettingUIInstance;\n }\n\n update(): void {\n this.element.removeChildren();\n const names = [...linkHandlers.keys()];\n names.unshift(i18nString(UIStrings.auto));\n for (const name of names) {\n const option = document.createElement('option');\n option.textContent = name;\n option.selected = name === Linkifier.linkHandlerSetting().get();\n this.element.appendChild(option);\n }\n this.element.disabled = names.length <= 1;\n }\n\n private onChange(event: Event): void {\n if (!event.target) {\n return;\n }\n const value = (event.target as HTMLSelectElement).value;\n Linkifier.linkHandlerSetting().set(value);\n }\n\n settingElement(): Element|null {\n return UI.SettingsUI.createCustomSetting(i18nString(UIStrings.linkHandling), this.element);\n }\n}\n\nlet listeningToNewEvents = false;\nfunction listenForNewComponentLinkifierEvents(): void {\n if (listeningToNewEvents) {\n return;\n }\n\n listeningToNewEvents = true;\n\n window.addEventListener('linkifieractivated', function(event: Event) {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const unknownEvent = (event as any);\n const eventWithData = (unknownEvent as {\n data: LinkInfo,\n });\n Linkifier.handleClickFromNewComponentLand(eventWithData.data);\n });\n}\n\nlistenForNewComponentLinkifierEvents();\n\nexport class ContentProviderContextMenuProvider implements\n UI.ContextMenu\n .Provider<Workspace.UISourceCode.UISourceCode|SDK.Resource.Resource|SDK.NetworkRequest.NetworkRequest> {\n appendApplicableItems(\n _event: Event, contextMenu: UI.ContextMenu.ContextMenu,\n contentProvider: Workspace.UISourceCode.UISourceCode|SDK.Resource.Resource|\n SDK.NetworkRequest.NetworkRequest): void {\n const contentUrl = contentProvider.contentURL();\n if (!contentUrl) {\n return;\n }\n\n if (!Common.ParsedURL.schemeIs(contentUrl, 'file:')) {\n contextMenu.revealSection().appendItem(\n UI.UIUtils.openLinkExternallyLabel(),\n () => Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(\n contentUrl.endsWith(':formatted') ?\n Common.ParsedURL.ParsedURL.slice(contentUrl, 0, contentUrl.lastIndexOf(':')) :\n contentUrl),\n {jslogContext: 'open-in-new-tab'});\n }\n for (const title of linkHandlers.keys()) {\n const handler = linkHandlers.get(title);\n if (!handler) {\n continue;\n }\n contextMenu.revealSection().appendItem(\n i18nString(UIStrings.openUsingS, {PH1: title}), handler.bind(null, contentProvider, 0),\n {jslogContext: 'open-using'});\n }\n if (contentProvider instanceof SDK.NetworkRequest.NetworkRequest) {\n return;\n }\n\n contextMenu.clipboardSection().appendItem(\n UI.UIUtils.copyLinkAddressLabel(),\n () => Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(contentUrl),\n {jslogContext: 'copy-link-address'});\n\n // TODO(bmeurer): `displayName` should be an accessor/data property consistently.\n if (contentProvider instanceof Workspace.UISourceCode.UISourceCode) {\n contextMenu.clipboardSection().appendItem(\n UI.UIUtils.copyFileNameLabel(),\n () => Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(contentProvider.displayName()),\n {jslogContext: 'copy-file-name'});\n } else {\n contextMenu.clipboardSection().appendItem(\n UI.UIUtils.copyFileNameLabel(),\n () => Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(contentProvider.displayName),\n {jslogContext: 'copy-file-name'});\n }\n }\n}\n\ninterface LinkInfo {\n icon: IconButton.Icon.Icon|null;\n enableDecorator: boolean;\n uiLocation: Workspace.UISourceCode.UILocation|null;\n liveLocation: Bindings.LiveLocation.LiveLocation|null;\n url: Platform.DevToolsPath.UrlString|null;\n lineNumber: number|null;\n columnNumber: number|null;\n inlineFrameIndex: number;\n revealable: Object|null;\n fallback: Element|null;\n userMetric?: Host.UserMetrics.Action;\n jslogContext?: string;\n}\n\nexport interface LinkifyURLOptions {\n text?: string;\n className?: string;\n lineNumber?: number;\n columnNumber?: number;\n showColumnNumber?: boolean;\n inlineFrameIndex?: number;\n preventClick?: boolean;\n maxLength?: number;\n tabStop?: boolean;\n bypassURLTrimming?: boolean;\n userMetric?: Host.UserMetrics.Action;\n jslogContext?: string;\n}\n\nexport interface LinkifyOptions {\n className?: string;\n columnNumber?: number;\n showColumnNumber?: boolean;\n inlineFrameIndex: number;\n tabStop?: boolean;\n userMetric?: Host.UserMetrics.Action;\n jslogContext?: string;\n\n /**\n * {@link LinkDisplayOptions.revealBreakpoint}\n */\n revealBreakpoint?: boolean;\n}\n\ninterface CreateLinkOptions {\n maxLength?: number;\n title?: string;\n href?: Platform.DevToolsPath.UrlString;\n preventClick?: boolean;\n tabStop?: boolean;\n bypassURLTrimming?: boolean;\n jslogContext?: string;\n}\n\ninterface LinkDisplayOptions {\n showColumnNumber: boolean;\n\n /**\n * If true, we'll check if there is a breakpoint at the UILocation we get\n * from the LiveLocation. If we find a breakpoint, we'll reveal the corresponding\n * {@link Breakpoints.BreakpointManager.BreakpointLocation}. Which opens the\n * breakpoint edit dialog.\n */\n revealBreakpoint?: boolean;\n}\n\nexport type LinkHandler = (arg0: TextUtils.ContentProvider.ContentProvider, arg1: number) => void;\n\nexport const enum Events {\n LiveLocationUpdated = 'liveLocationUpdated',\n}\n\nexport type EventTypes = {\n [Events.LiveLocationUpdated]: Bindings.LiveLocation.LiveLocation,\n};\n"]} \ No newline at end of file diff --git a/public/ui/legacy/components/utils/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/legacy/components/utils/devtools_entrypoint-bundle-typescript-tsconfig.json index 29daa31b5..f289f5836 100644 --- a/public/ui/legacy/components/utils/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/legacy/components/utils/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../../front_end/ui/legacy/components/utils/utils.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/utils/unittests-tsconfig.json b/public/ui/legacy/components/utils/unittests-tsconfig.json index 58ea4df39..ed7ac0e36 100644 --- a/public/ui/legacy/components/utils/unittests-tsconfig.json +++ b/public/ui/legacy/components/utils/unittests-tsconfig.json @@ -41,7 +41,6 @@ "../../../../../../../../front_end/ui/legacy/components/utils/Linkifier.test.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/components/utils/utils-tsconfig.json b/public/ui/legacy/components/utils/utils-tsconfig.json index bb7984de8..e7c537a51 100644 --- a/public/ui/legacy/components/utils/utils-tsconfig.json +++ b/public/ui/legacy/components/utils/utils-tsconfig.json @@ -36,7 +36,6 @@ "../../../../../../../../front_end/ui/legacy/components/utils/TargetDetachedDialog.ts", "../../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/legacy/devtools_entrypoint-bundle-typescript-tsconfig.json index 5210508e3..503084f8d 100644 --- a/public/ui/legacy/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/legacy/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../front_end/ui/legacy/legacy.ts", "../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/filter.css.legacy.js b/public/ui/legacy/filter.css.legacy.js index 056446f89..60a49057d 100644 --- a/public/ui/legacy/filter.css.legacy.js +++ b/public/ui/legacy/filter.css.legacy.js @@ -98,7 +98,7 @@ export default { } .filter-checkbox-filter { - padding-left: 4px; + padding-left: 1px; padding-right: 7px; white-space: nowrap; text-overflow: ellipsis; diff --git a/public/ui/legacy/inspectorCommon.css b/public/ui/legacy/inspectorCommon.css index a3f2c2193..5b5fe65ab 100644 --- a/public/ui/legacy/inspectorCommon.css +++ b/public/ui/legacy/inspectorCommon.css @@ -262,6 +262,57 @@ input { input { color: inherit; + + &[type="checkbox"] { + position: relative; + + &:hover::after, + &:active::before { + content: ""; + height: 24px; + width: 24px; + border-radius: var(--sys-shape-corner-full); + position: absolute; + top: -6px; + left: -6px; + } + + &:not(.-theme-preserve) { + accent-color: var(--sys-color-primary-bright); + color: var(--sys-color-on-primary); + } + + &:not(:disabled):hover::after { + background-color: var(--sys-color-state-hover-on-subtle); + } + + &:not(:disabled):active::before { + background-color: var(--sys-color-state-ripple-neutral-on-subtle); + } + + &:not(:disabled):focus-visible { + outline: none; + + &::before { + content: ""; + height: 15px; + width: 15px; + border-radius: 5px; + position: absolute; + top: -3px; + left: -3px; + border: 2px solid var(--sys-color-state-focus-ring); + } + } + + &.small:hover::after, + &.small:active::before { + height: 18px; + width: 18px; + top: -3px; + left: -3px; + } + } } input::placeholder { @@ -275,11 +326,6 @@ input::placeholder { --override-input-placeholder-color: rgb(230 230 230 / 54%); } -input[type="checkbox"]:not(.-theme-preserve) { - accent-color: var(--sys-color-primary-bright); - color: var(--sys-color-on-primary); -} - .harmony-input:not([type]), .harmony-input[type="number"], .harmony-input[type="text"] { diff --git a/public/ui/legacy/inspectorCommon.css.js b/public/ui/legacy/inspectorCommon.css.js index 78c42e0fb..3f619a8c1 100644 --- a/public/ui/legacy/inspectorCommon.css.js +++ b/public/ui/legacy/inspectorCommon.css.js @@ -269,6 +269,57 @@ input { input { color: inherit; + + &[type="checkbox"] { + position: relative; + + &:hover::after, + &:active::before { + content: ""; + height: 24px; + width: 24px; + border-radius: var(--sys-shape-corner-full); + position: absolute; + top: -6px; + left: -6px; + } + + &:not(.-theme-preserve) { + accent-color: var(--sys-color-primary-bright); + color: var(--sys-color-on-primary); + } + + &:not(:disabled):hover::after { + background-color: var(--sys-color-state-hover-on-subtle); + } + + &:not(:disabled):active::before { + background-color: var(--sys-color-state-ripple-neutral-on-subtle); + } + + &:not(:disabled):focus-visible { + outline: none; + + &::before { + content: ""; + height: 15px; + width: 15px; + border-radius: 5px; + position: absolute; + top: -3px; + left: -3px; + border: 2px solid var(--sys-color-state-focus-ring); + } + } + + &.small:hover::after, + &.small:active::before { + height: 18px; + width: 18px; + top: -3px; + left: -3px; + } + } } input::placeholder { @@ -282,11 +333,6 @@ input::placeholder { --override-input-placeholder-color: rgb(230 230 230 / 54%); } -input[type="checkbox"]:not(.-theme-preserve) { - accent-color: var(--sys-color-primary-bright); - color: var(--sys-color-on-primary); -} - .harmony-input:not([type]), .harmony-input[type="number"], .harmony-input[type="text"] { diff --git a/public/ui/legacy/inspectorCommon.css.legacy.js b/public/ui/legacy/inspectorCommon.css.legacy.js index 2f96734fb..24d3ac30d 100644 --- a/public/ui/legacy/inspectorCommon.css.legacy.js +++ b/public/ui/legacy/inspectorCommon.css.legacy.js @@ -268,6 +268,57 @@ input { input { color: inherit; + + &[type="checkbox"] { + position: relative; + + &:hover::after, + &:active::before { + content: ""; + height: 24px; + width: 24px; + border-radius: var(--sys-shape-corner-full); + position: absolute; + top: -6px; + left: -6px; + } + + &:not(.-theme-preserve) { + accent-color: var(--sys-color-primary-bright); + color: var(--sys-color-on-primary); + } + + &:not(:disabled):hover::after { + background-color: var(--sys-color-state-hover-on-subtle); + } + + &:not(:disabled):active::before { + background-color: var(--sys-color-state-ripple-neutral-on-subtle); + } + + &:not(:disabled):focus-visible { + outline: none; + + &::before { + content: ""; + height: 15px; + width: 15px; + border-radius: 5px; + position: absolute; + top: -3px; + left: -3px; + border: 2px solid var(--sys-color-state-focus-ring); + } + } + + &.small:hover::after, + &.small:active::before { + height: 18px; + width: 18px; + top: -3px; + left: -3px; + } + } } input::placeholder { @@ -281,11 +332,6 @@ input::placeholder { --override-input-placeholder-color: rgb(230 230 230 / 54%); } -input[type="checkbox"]:not(.-theme-preserve) { - accent-color: var(--sys-color-primary-bright); - color: var(--sys-color-on-primary); -} - .harmony-input:not([type]), .harmony-input[type="number"], .harmony-input[type="text"] { diff --git a/public/ui/legacy/listWidget.css.legacy.js b/public/ui/legacy/listWidget.css.legacy.js index e73797549..43ef5337f 100644 --- a/public/ui/legacy/listWidget.css.legacy.js +++ b/public/ui/legacy/listWidget.css.legacy.js @@ -38,8 +38,7 @@ export default { overflow: hidden; } -.list-item:focus-within, -.list-item:hover { +.list-item:focus-within:not(:active) { background: var(--sys-color-state-hover-on-subtle); } @@ -60,8 +59,7 @@ export default { flex: 0 1 50px; } -.list-item:focus-within .controls-gradient, -.list-item:hover .controls-gradient { +.list-item:focus-within:not(:active) .controls-gradient { background-image: linear-gradient(90deg, transparent, var(--override-background-list-item-color)); } @@ -72,10 +70,14 @@ export default { align-items: center; pointer-events: auto; visibility: hidden; + background-color: var(--sys-color-cdt-base-container); + + .list-item:hover & { + visibility: visible; + } } -.list-item:focus-within .controls-buttons, -.list-item:hover .controls-buttons { +.list-item:focus-within:not(:active) .controls-buttons { background-color: var(--override-background-list-item-color); visibility: visible; } diff --git a/public/ui/legacy/reportView.css.legacy.js b/public/ui/legacy/reportView.css.legacy.js index 0144f9c61..e58c14f92 100644 --- a/public/ui/legacy/reportView.css.legacy.js +++ b/public/ui/legacy/reportView.css.legacy.js @@ -79,6 +79,10 @@ export default { .report-row { margin: 10px 0 2px 18px; + + &:has(span[is="dt-checkbox"]) { + margin-top: 7px; + } } .report-field-name { diff --git a/public/ui/legacy/themeColors.css b/public/ui/legacy/themeColors.css index f71df99b2..d50c66561 100644 --- a/public/ui/legacy/themeColors.css +++ b/public/ui/legacy/themeColors.css @@ -447,7 +447,7 @@ */ --app-color-navigation-drawer-label-selected: var(--sys-color-primary); - &.-theme-with-dark-background { + &.theme-with-dark-background { /** * Color for navigation drawers. */ diff --git a/public/ui/legacy/themeColors.css.legacy.js b/public/ui/legacy/themeColors.css.legacy.js index c42b2146d..f3e54cad9 100644 --- a/public/ui/legacy/themeColors.css.legacy.js +++ b/public/ui/legacy/themeColors.css.legacy.js @@ -453,7 +453,7 @@ export default { */ --app-color-navigation-drawer-label-selected: var(--sys-color-primary); - &.-theme-with-dark-background { + &.theme-with-dark-background { /** * Color for navigation drawers. */ diff --git a/public/ui/legacy/theme_support/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/legacy/theme_support/devtools_entrypoint-bundle-typescript-tsconfig.json index 85c3297ce..4eff4ba41 100644 --- a/public/ui/legacy/theme_support/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/legacy/theme_support/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/legacy/theme_support/theme_support.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/theme_support/theme_support-tsconfig.json b/public/ui/legacy/theme_support/theme_support-tsconfig.json index be8759b93..10499743c 100644 --- a/public/ui/legacy/theme_support/theme_support-tsconfig.json +++ b/public/ui/legacy/theme_support/theme_support-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../../front_end/ui/legacy/theme_support/ThemeSupport.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/theme_support/unittests-tsconfig.json b/public/ui/legacy/theme_support/unittests-tsconfig.json index 9d804ae20..357b04325 100644 --- a/public/ui/legacy/theme_support/unittests-tsconfig.json +++ b/public/ui/legacy/theme_support/unittests-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../../front_end/ui/legacy/theme_support/ThemeSupport.test.ts", "../../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/toolbar.css.legacy.js b/public/ui/legacy/toolbar.css.legacy.js index 6f6804320..69544cc73 100644 --- a/public/ui/legacy/toolbar.css.legacy.js +++ b/public/ui/legacy/toolbar.css.legacy.js @@ -332,7 +332,7 @@ it. */ /* Checkbox */ .toolbar-item.checkbox { - padding: 0 5px 0 2px; + padding: 0 5px 0 0; } /* Select */ diff --git a/public/ui/legacy/treeoutline.css.legacy.js b/public/ui/legacy/treeoutline.css.legacy.js index f9244bddb..28202d8f6 100644 --- a/public/ui/legacy/treeoutline.css.legacy.js +++ b/public/ui/legacy/treeoutline.css.legacy.js @@ -41,11 +41,6 @@ export default { color: var(--sys-color-on-surface-subtle); } -.tree-outline li:hover .selection { - display: block; - background-color: var(--sys-color-state-hover-on-subtle); -} - .tree-outline:not(.hide-selection-when-blurred) li.selected .selection { display: block; background-color: var(--sys-color-neutral-container); @@ -58,6 +53,11 @@ export default { border-top-color: var(--sys-color-tonal-container); } +.tree-outline li:hover:not(:has(span[is="dt-checkbox"])) .selection { + display: block; + background-color: var(--sys-color-state-hover-on-subtle); +} + .tree-outline:not(.hide-selection-when-blurred) li.hovered:not(.selected) .selection { display: block; left: 3px; diff --git a/public/ui/legacy/ui-tsconfig.json b/public/ui/legacy/ui-tsconfig.json index 82fc268f6..41bb9272a 100644 --- a/public/ui/legacy/ui-tsconfig.json +++ b/public/ui/legacy/ui-tsconfig.json @@ -85,7 +85,6 @@ "../../../../../../front_end/ui/legacy/ZoomManager.ts", "../../../../../../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" ], "references": [ diff --git a/public/ui/legacy/unittests-tsconfig.json b/public/ui/legacy/unittests-tsconfig.json index cbf17923e..56539297d 100644 --- a/public/ui/legacy/unittests-tsconfig.json +++ b/public/ui/legacy/unittests-tsconfig.json @@ -59,7 +59,6 @@ "../../../../../../front_end/ui/legacy/XLink.test.ts", "../../../../../../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" ], "references": [ diff --git a/public/ui/lit-html/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/lit-html/devtools_entrypoint-bundle-typescript-tsconfig.json index c03e68e66..32ed6143c 100644 --- a/public/ui/lit-html/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/lit-html/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../front_end/ui/lit-html/lit-html.ts", "../../../../../../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" ], "references": [ diff --git a/public/ui/lit-html/lit-html-tsconfig.json b/public/ui/lit-html/lit-html-tsconfig.json index 472f84428..c10bae7c0 100644 --- a/public/ui/lit-html/lit-html-tsconfig.json +++ b/public/ui/lit-html/lit-html-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../front_end/ui/lit-html/static.ts", "../../../../../../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" ], "references": [ diff --git a/public/ui/lit-html/unittests-tsconfig.json b/public/ui/lit-html/unittests-tsconfig.json index 22956a0fa..ae4fb7586 100644 --- a/public/ui/lit-html/unittests-tsconfig.json +++ b/public/ui/lit-html/unittests-tsconfig.json @@ -40,7 +40,6 @@ "../../../../../../front_end/ui/lit-html/static.test.ts", "../../../../../../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" ], "references": [ diff --git a/public/ui/visual_logging/Debugging.d.ts b/public/ui/visual_logging/Debugging.d.ts index 7afd27fed..6dc996c9c 100644 --- a/public/ui/visual_logging/Debugging.d.ts +++ b/public/ui/visual_logging/Debugging.d.ts @@ -5,6 +5,7 @@ export declare function processForDebugging(loggable: Loggable): void; type EventType = 'Click' | 'Drag' | 'Hover' | 'Change' | 'KeyDown' | 'Resize'; export declare function processEventForDebugging(event: EventType, state: LoggingState | null, extraInfo?: EventAttributes): void; export declare function processEventForIntuitiveDebugging(event: EventType, state: LoggingState | null, extraInfo?: EventAttributes): void; +export declare function processEventForTestDebugging(event: EventType, state: LoggingState | null, _extraInfo?: EventAttributes): void; export declare function processEventForAdHocAnalysisDebugging(event: EventType, state: LoggingState | null, extraInfo?: EventAttributes): void; export type EventAttributes = { context?: string; diff --git a/public/ui/visual_logging/Debugging.js b/public/ui/visual_logging/Debugging.js index 29aa1c11c..8f738a75a 100644 --- a/public/ui/visual_logging/Debugging.js +++ b/public/ui/visual_logging/Debugging.js @@ -1,8 +1,10 @@ // Copyright 2023 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import * as Common from '../../core/common/common.js'; import { assertNotNullOrUndefined } from '../../core/platform/platform.js'; import { VisualElements } from './LoggingConfig.js'; +import { pendingWorkComplete, startLogging, stopLogging } from './LoggingDriver.js'; import { getLoggingState } from './LoggingState.js'; let veDebuggingEnabled = false; let debugPopover = null; @@ -77,6 +79,9 @@ export function processEventForDebugging(event, state, extraInfo) { case DebugLoggingFormat.Intuitive: processEventForIntuitiveDebugging(event, state, extraInfo); break; + case DebugLoggingFormat.Test: + processEventForTestDebugging(event, state, extraInfo); + break; case DebugLoggingFormat.AdHocAnalysis: processEventForAdHocAnalysisDebugging(event, state, extraInfo); break; @@ -94,6 +99,10 @@ export function processEventForIntuitiveDebugging(event, state, extraInfo) { deleteUndefinedFields(entry); maybeLogDebugEvent(entry); } +export function processEventForTestDebugging(event, state, _extraInfo) { + lastImpressionLogEntry = null; + maybeLogDebugEvent({ interaction: `${event}: ${veTestKeys.get(state?.veid || 0) || ''}` }); +} export function processEventForAdHocAnalysisDebugging(event, state, extraInfo) { const ve = state ? adHocAnalysisEntries.get(state.veid) : null; if (ve) { @@ -116,6 +125,9 @@ export function processImpressionsForDebugging(states) { case DebugLoggingFormat.Intuitive: processImpressionsForIntuitiveDebugLog(states); break; + case DebugLoggingFormat.Test: + processImpressionsForTestDebugLog(states); + break; case DebugLoggingFormat.AdHocAnalysis: processImpressionsForAdHocAnalysisDebugLog(states); break; @@ -153,6 +165,26 @@ function processImpressionsForIntuitiveDebugLog(states) { maybeLogDebugEvent({ event: 'Impression', children: entries, time: Date.now() - sessionStartTime }); } } +const veTestKeys = new Map(); +let lastImpressionLogEntry = null; +function processImpressionsForTestDebugLog(states) { + if (!lastImpressionLogEntry) { + lastImpressionLogEntry = { impressions: [] }; + veDebugEventsLog.push(lastImpressionLogEntry); + } + for (const state of states) { + let key = ''; + if (state.parent) { + key = (veTestKeys.get(state.parent.veid) || '<UNKNOWN>') + ' > '; + } + key += VisualElements[state.config.ve]; + if (state.config.context) { + key += ': ' + state.config.context; + } + veTestKeys.set(state.veid, key); + lastImpressionLogEntry.impressions.push(key); + } +} const adHocAnalysisEntries = new Map(); function processImpressionsForAdHocAnalysisDebugLog(states) { for (const state of states) { @@ -233,6 +265,7 @@ function maybeLogDebugEvent(entry) { var DebugLoggingFormat; (function (DebugLoggingFormat) { DebugLoggingFormat["Intuitive"] = "Intuitive"; + DebugLoggingFormat["Test"] = "Test"; DebugLoggingFormat["AdHocAnalysis"] = "AdHocAnalysis"; })(DebugLoggingFormat || (DebugLoggingFormat = {})); function setVeDebugLoggingEnabled(enabled, format = DebugLoggingFormat.Intuitive) { @@ -429,6 +462,23 @@ export function processStartLoggingForDebugging() { maybeLogDebugEvent({ event: 'SessionStart' }); } } +async function getVeDebugEventsLog() { + await pendingWorkComplete(); + lastImpressionLogEntry = null; + return veDebugEventsLog; +} +async function startTestLogging() { + setVeDebugLoggingEnabled(true, DebugLoggingFormat.Test); + stopLogging(); + await startLogging({ + processingThrottler: new Common.Throttler.Throttler(10), + keyboardLogThrottler: new Common.Throttler.Throttler(10), + hoverLogThrottler: new Common.Throttler.Throttler(10), + dragLogThrottler: new Common.Throttler.Throttler(10), + clickLogThrottler: new Common.Throttler.Throttler(10), + resizeLogThrottler: new Common.Throttler.Throttler(10), + }); +} // @ts-ignore globalThis.setVeDebugLoggingEnabled = setVeDebugLoggingEnabled; // @ts-ignore @@ -439,4 +489,8 @@ globalThis.findVeDebugImpression = findVeDebugImpression; globalThis.exportAdHocAnalysisLogForSql = exportAdHocAnalysisLogForSql; // @ts-ignore globalThis.buildStateFlow = buildStateFlow; +// @ts-ignore +globalThis.getVeDebugEventsLog = getVeDebugEventsLog; +// @ts-ignore +globalThis.startTestLogging = startTestLogging; //# sourceMappingURL=Debugging.js.map \ No newline at end of file diff --git a/public/ui/visual_logging/Debugging.js.map b/public/ui/visual_logging/Debugging.js.map index d11db2ed6..22a10dd21 100644 --- a/public/ui/visual_logging/Debugging.js.map +++ b/public/ui/visual_logging/Debugging.js.map @@ -1 +1 @@ -{"version":3,"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C;AACH,CAAC;AAED,aAAa;AACb,UAAU,CAAC,wBAAwB,GAAG,wBAAwB,CAAC;AAC/D,aAAa;AACb,UAAU,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;AAC/C,aAAa;AACb,UAAU,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;AACzD,aAAa;AACb,UAAU,CAAC,4BAA4B,GAAG,4BAA4B,CAAC;AACvE,aAAa;AACb,UAAU,CAAC,cAAc,GAAG,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 {assertNotNullOrUndefined} from '../../core/platform/platform.js';\n\nimport {type Loggable} from './Loggable.js';\nimport {type LoggingConfig, VisualElements} from './LoggingConfig.js';\nimport {getLoggingState, type LoggingState} from './LoggingState.js';\n\nlet veDebuggingEnabled = false;\nlet debugPopover: HTMLElement|null = null;\nconst nonDomDebugElements = new WeakMap<Loggable, HTMLElement>();\n\nfunction setVeDebuggingEnabled(enabled: boolean): void {\n veDebuggingEnabled = enabled;\n if (enabled && !debugPopover) {\n debugPopover = document.createElement('div');\n debugPopover.classList.add('ve-debug');\n debugPopover.style.position = 'absolute';\n debugPopover.style.bottom = '100px';\n debugPopover.style.left = '100px';\n debugPopover.style.background = 'black';\n debugPopover.style.color = 'white';\n debugPopover.style.zIndex = '100000';\n document.body.appendChild(debugPopover);\n }\n}\n\n// @ts-ignore\nglobalThis.setVeDebuggingEnabled = setVeDebuggingEnabled;\n\nexport function processForDebugging(loggable: Loggable): void {\n const loggingState = getLoggingState(loggable);\n if (!veDebuggingEnabled || !loggingState || loggingState.processedForDebugging) {\n return;\n }\n if (loggable instanceof Element) {\n processElementForDebugging(loggable, loggingState);\n } else {\n processNonDomLoggableForDebugging(loggable, loggingState);\n }\n}\n\nfunction showDebugPopover(content: string): void {\n if (!debugPopover) {\n return;\n }\n debugPopover.style.display = 'block';\n debugPopover.innerHTML = content;\n}\n\nfunction processElementForDebugging(element: Element, loggingState: LoggingState): void {\n if (element.tagName === 'OPTION') {\n if (loggingState.parent?.selectOpen && debugPopover) {\n debugPopover.innerHTML += '<br>' + debugString(loggingState.config);\n loggingState.processedForDebugging = true;\n }\n } else {\n (element as HTMLElement).style.outline = 'solid 1px red';\n element.addEventListener('mouseenter', () => {\n assertNotNullOrUndefined(debugPopover);\n const pathToRoot = [loggingState];\n let ancestor = loggingState.parent;\n while (ancestor) {\n pathToRoot.push(ancestor);\n ancestor = ancestor.parent;\n }\n showDebugPopover(pathToRoot.map(s => debugString(s.config)).join('<br>'));\n }, {capture: true});\n element.addEventListener('mouseleave', () => {\n assertNotNullOrUndefined(debugPopover);\n debugPopover.style.display = 'none';\n }, {capture: true});\n loggingState.processedForDebugging = true;\n }\n}\n\ntype EventType = 'Click'|'Drag'|'Hover'|'Change'|'KeyDown'|'Resize';\nexport function processEventForDebugging(\n event: EventType, state: LoggingState|null, extraInfo?: EventAttributes): void {\n const format = localStorage.getItem('veDebugLoggingEnabled');\n if (!format) {\n return;\n }\n\n switch (format) {\n case DebugLoggingFormat.Intuitive:\n processEventForIntuitiveDebugging(event, state, extraInfo);\n break;\n case DebugLoggingFormat.AdHocAnalysis:\n processEventForAdHocAnalysisDebugging(event, state, extraInfo);\n break;\n }\n}\n\nexport function processEventForIntuitiveDebugging(\n event: EventType, state: LoggingState|null, extraInfo?: EventAttributes): void {\n const entry: IntuitiveLogEntry = {\n event,\n ve: state ? VisualElements[state?.config.ve] : undefined,\n veid: state?.veid,\n context: state?.config.context,\n time: Date.now() - sessionStartTime,\n ...extraInfo,\n };\n deleteUndefinedFields(entry);\n maybeLogDebugEvent(entry);\n}\n\nexport function processEventForAdHocAnalysisDebugging(\n event: EventType, state: LoggingState|null, extraInfo?: EventAttributes): void {\n const ve = state ? adHocAnalysisEntries.get(state.veid) : null;\n if (ve) {\n const interaction: AdHocAnalysisInteraction = {time: Date.now() - sessionStartTime, type: event, ...extraInfo};\n deleteUndefinedFields(interaction);\n ve.interactions.push(interaction);\n }\n}\n\nfunction deleteUndefinedFields<T>(entry: T): void {\n for (const stringKey in entry) {\n const key = stringKey as keyof T;\n if (typeof entry[key] === 'undefined') {\n delete entry[key];\n }\n }\n}\n\nexport type EventAttributes = {\n context?: string,\n width?: number,\n height?: number,\n mouseButton?: number,\n doubleClick?: boolean,\n};\n\ntype VisualElementAttributes = {\n ve: string,\n veid: number,\n context?: string,\n width?: number,\n height?: number,\n};\n\ntype IntuitiveLogEntry = {\n event?: EventType|'Impression'|'SessionStart',\n children?: IntuitiveLogEntry[],\n parent?: number,\n time?: number,\n}&Partial<VisualElementAttributes>;\n\ntype AdHocAnalysisVisualElement = VisualElementAttributes&{\n parent?: AdHocAnalysisVisualElement,\n};\n\ntype AdHocAnalysisInteraction = {\n type: EventType,\n time: number,\n}&EventAttributes;\n\ntype AdHocAnalysisLogEntry = AdHocAnalysisVisualElement&{\n time: number,\n interactions: AdHocAnalysisInteraction[],\n};\n\nexport function processImpressionsForDebugging(states: LoggingState[]): void {\n const format = localStorage.getItem('veDebugLoggingEnabled');\n switch (format) {\n case DebugLoggingFormat.Intuitive:\n processImpressionsForIntuitiveDebugLog(states);\n break;\n case DebugLoggingFormat.AdHocAnalysis:\n processImpressionsForAdHocAnalysisDebugLog(states);\n break;\n default:\n }\n}\n\nfunction processImpressionsForIntuitiveDebugLog(states: LoggingState[]): void {\n const impressions = new Map<number, IntuitiveLogEntry>();\n for (const state of states) {\n const entry: IntuitiveLogEntry = {\n event: 'Impression',\n ve: VisualElements[state.config.ve],\n context: state?.config.context,\n width: state.size.width,\n height: state.size.height,\n veid: state.veid,\n };\n deleteUndefinedFields(entry);\n\n impressions.set(state.veid, entry);\n if (!state.parent || !impressions.has(state.parent?.veid)) {\n entry.parent = state.parent?.veid;\n } else {\n const parent = impressions.get(state.parent?.veid) as IntuitiveLogEntry;\n parent.children = parent.children || [];\n parent.children.push(entry);\n }\n }\n\n const entries = [...impressions.values()].filter(i => 'parent' in i);\n if (entries.length === 1) {\n entries[0].time = Date.now() - sessionStartTime;\n maybeLogDebugEvent(entries[0]);\n } else {\n maybeLogDebugEvent({event: 'Impression', children: entries, time: Date.now() - sessionStartTime});\n }\n}\n\nconst adHocAnalysisEntries = new Map<number, AdHocAnalysisLogEntry>();\n\nfunction processImpressionsForAdHocAnalysisDebugLog(states: LoggingState[]): void {\n for (const state of states) {\n const buildVe = (state: LoggingState): AdHocAnalysisVisualElement => {\n const ve: AdHocAnalysisVisualElement = {\n ve: VisualElements[state.config.ve],\n veid: state.veid,\n width: state.size?.width,\n height: state.size?.height,\n context: state.config.context,\n };\n deleteUndefinedFields(ve);\n if (state.parent) {\n ve.parent = buildVe(state.parent);\n }\n return ve;\n };\n const entry = {...buildVe(state), interactions: [], time: Date.now() - sessionStartTime};\n adHocAnalysisEntries.set(state.veid, entry);\n maybeLogDebugEvent(entry);\n }\n}\n\nfunction processNonDomLoggableForDebugging(loggable: Loggable, loggingState: LoggingState): void {\n let debugElement = nonDomDebugElements.get(loggable);\n if (!debugElement) {\n debugElement = document.createElement('div');\n debugElement.classList.add('ve-debug');\n debugElement.style.background = 'black';\n debugElement.style.color = 'white';\n debugElement.style.zIndex = '100000';\n debugElement.textContent = debugString(loggingState.config);\n nonDomDebugElements.set(loggable, debugElement);\n setTimeout(() => {\n if (!loggingState.size?.width || !loggingState.size?.height) {\n debugElement?.parentElement?.removeChild(debugElement);\n nonDomDebugElements.delete(loggable);\n }\n }, 10000);\n }\n const parentDebugElement =\n parent instanceof HTMLElement ? parent : nonDomDebugElements.get(parent as Loggable) || debugPopover;\n assertNotNullOrUndefined(parentDebugElement);\n if (!parentDebugElement.classList.contains('ve-debug')) {\n debugElement.style.position = 'absolute';\n parentDebugElement.insertBefore(debugElement, parentDebugElement.firstChild);\n } else {\n debugElement.style.marginLeft = '10px';\n parentDebugElement.appendChild(debugElement);\n }\n}\n\nexport function debugString(config: LoggingConfig): string {\n const components = [VisualElements[config.ve]];\n if (config.context) {\n components.push(`context: ${config.context}`);\n }\n if (config.parent) {\n components.push(`parent: ${config.parent}`);\n }\n if (config.track) {\n components.push(`track: ${\n Object.entries(config.track)\n .map(([key, value]) => `${key}${typeof value === 'string' ? `: ${value}` : ''}`)\n .join(', ')}`);\n }\n return components.join('; ');\n}\n\nconst veDebugEventsLog: (IntuitiveLogEntry|AdHocAnalysisLogEntry)[] = [];\n\nfunction maybeLogDebugEvent(entry: IntuitiveLogEntry|AdHocAnalysisLogEntry): void {\n const format = localStorage.getItem('veDebugLoggingEnabled');\n if (!format) {\n return;\n }\n veDebugEventsLog.push(entry);\n if (format === DebugLoggingFormat.Intuitive) {\n // eslint-disable-next-line no-console\n console.info('VE Debug:', entry);\n }\n}\n\nenum DebugLoggingFormat {\n Intuitive = 'Intuitive',\n AdHocAnalysis = 'AdHocAnalysis',\n}\n\nfunction setVeDebugLoggingEnabled(enabled: boolean, format = DebugLoggingFormat.Intuitive): void {\n if (enabled) {\n localStorage.setItem('veDebugLoggingEnabled', format);\n } else {\n localStorage.removeItem('veDebugLoggingEnabled');\n }\n}\n\nfunction findVeDebugImpression(veid: number, includeAncestorChain?: boolean): IntuitiveLogEntry|undefined {\n const findImpression = (entry: IntuitiveLogEntry): IntuitiveLogEntry|undefined => {\n if (entry.event === 'Impression' && entry.veid === veid) {\n return entry;\n }\n let i = 0;\n for (const childEntry of entry.children || []) {\n const matchingEntry = findImpression(childEntry);\n if (matchingEntry) {\n if (includeAncestorChain) {\n const children = [];\n children[i] = matchingEntry;\n return {...entry, children};\n }\n return matchingEntry;\n }\n ++i;\n }\n return undefined;\n };\n return findImpression({children: veDebugEventsLog as IntuitiveLogEntry[]});\n}\n\nfunction fieldValuesForSql<T>(\n obj: T,\n fields: {strings: readonly(keyof T)[], numerics: readonly(keyof T)[], booleans: readonly(keyof T)[]}): string {\n return [\n ...fields.strings.map(f => obj[f] ? `\"${obj[f]}\"` : '$NullString'),\n ...fields.numerics.map(f => obj[f] ?? 'null'),\n ...fields.booleans.map(f => obj[f] ?? '$NullBool'),\n ].join(', ');\n}\n\nfunction exportAdHocAnalysisLogForSql(): void {\n const VE_FIELDS = {\n strings: ['ve', 'context'] as const,\n numerics: ['veid', 'width', 'height'] as const,\n booleans: [] as const,\n };\n const INTERACTION_FIELDS = {\n strings: ['type', 'context'] as const,\n numerics: ['width', 'height', 'mouseButton', 'time'] as const,\n booleans: ['width', 'height', 'mouseButton', 'time'] as const,\n };\n\n const fieldsDefsForSql = (fields: string[]): string => fields.map((f, i) => `$${i + 1} as ${f}`).join(', ');\n\n const veForSql = (e: AdHocAnalysisVisualElement): string =>\n `$VeFields(${fieldValuesForSql(e, VE_FIELDS)}, ${e.parent ? `STRUCT(${veForSql(e.parent)})` : null})`;\n\n const interactionForSql = (i: AdHocAnalysisInteraction): string =>\n `$Interaction(${fieldValuesForSql(i, INTERACTION_FIELDS)})`;\n\n const entryForSql = (e: AdHocAnalysisLogEntry): string =>\n `$Entry(${veForSql(e)}, ([${e.interactions.map(interactionForSql).join(', ')}]), ${e.time})`;\n\n const entries = veDebugEventsLog as AdHocAnalysisLogEntry[];\n\n // eslint-disable-next-line no-console\n console.log(`\nDEFINE MACRO NullString CAST(null AS STRING);\nDEFINE MACRO NullBool CAST(null AS BOOL);\nDEFINE MACRO VeFields ${fieldsDefsForSql([\n ...VE_FIELDS.strings,\n ...VE_FIELDS.numerics,\n 'parent',\n ])};\nDEFINE MACRO Interaction STRUCT(${\n fieldsDefsForSql([\n ...INTERACTION_FIELDS.strings,\n ...INTERACTION_FIELDS.numerics,\n ...INTERACTION_FIELDS.booleans,\n ])});\nDEFINE MACRO Entry STRUCT($1, $2 AS interactions, $3 AS time);\n\n// This fake entry put first fixes nested struct fiels names being lost\nDEFINE MACRO FakeVeFields $VeFields(\"\", $NullString, 0, 0, 0, $1);\nDEFINE MACRO FakeVe STRUCT($FakeVeFields($1));\nDEFINE MACRO FakeEntry $Entry($FakeVeFields($FakeVe($FakeVe($FakeVe($FakeVe($FakeVe($FakeVe($FakeVe(null)))))))), ([]), 0);\n\nWITH\n processed_logs AS (\n SELECT * FROM UNNEST([\n $FakeEntry,\n ${entries.map(entryForSql).join(', \\n')}\n ])\n )\n\n\n\nSELECT * FROM processed_logs;`);\n}\n\ntype StateFlowNode = {\n type: 'Session',\n children: StateFlowNode[],\n}|({type: 'Impression', children: StateFlowNode[], time: number}&AdHocAnalysisVisualElement)|AdHocAnalysisInteraction;\n\ntype StateFlowMutation = (AdHocAnalysisLogEntry|(AdHocAnalysisInteraction&{veid: number}));\n\nfunction getStateFlowMutations(): StateFlowMutation[] {\n const mutations: StateFlowMutation[] = [];\n for (const entry of (veDebugEventsLog as AdHocAnalysisLogEntry[])) {\n mutations.push(entry);\n const veid = entry.veid;\n for (const interaction of entry.interactions) {\n mutations.push({...interaction, veid});\n }\n }\n mutations.sort((e1, e2) => e1.time - e2.time);\n return mutations;\n}\n\nclass StateFlowElementsByArea {\n #data = new Map<number, AdHocAnalysisVisualElement>();\n\n add(e: AdHocAnalysisVisualElement): void {\n this.#data.set(e.veid, e);\n }\n\n get(veid: number): AdHocAnalysisVisualElement|undefined {\n return this.#data.get(veid);\n }\n\n getArea(e: AdHocAnalysisVisualElement): number {\n let area = (e.width || 0) * (e.height || 0);\n const parent = e.parent ? this.#data.get(e.parent?.veid) : null;\n if (!parent) {\n return area;\n }\n const parentArea = this.getArea(parent);\n if (area > parentArea) {\n area = parentArea;\n }\n return area;\n }\n\n get data(): readonly AdHocAnalysisVisualElement[] {\n return [...this.#data.values()].filter(e => this.getArea(e)).sort((e1, e2) => this.getArea(e2) - this.getArea(e1));\n }\n}\n\nfunction updateStateFlowTree(\n rootNode: StateFlowNode, elements: StateFlowElementsByArea, time: number,\n interactions: AdHocAnalysisInteraction[]): void {\n let node = rootNode;\n for (const element of elements.data) {\n if (!('children' in node)) {\n return;\n }\n let nextNode = node.children[node.children.length - 1];\n const nextNodeId = nextNode?.type === 'Impression' ? nextNode.veid : null;\n if (nextNodeId !== element.veid) {\n node.children.push(...interactions);\n interactions.length = 0;\n nextNode = {type: 'Impression', ve: element.ve, veid: element.veid, context: element.context, time, children: []};\n node.children.push(nextNode);\n }\n node = nextNode;\n }\n}\n\nfunction normalizeNode(node: StateFlowNode): void {\n if (node.type !== 'Impression') {\n return;\n }\n while (node.children.length === 1) {\n if (node.children[0].type === 'Impression') {\n node.children = node.children[0].children;\n }\n }\n for (const child of node.children) {\n normalizeNode(child);\n }\n}\n\nfunction buildStateFlow(): StateFlowNode {\n const mutations = getStateFlowMutations();\n const elements = new StateFlowElementsByArea();\n const rootNode: StateFlowNode = {type: 'Session', children: []};\n\n let time = mutations[0].time;\n const interactions: AdHocAnalysisInteraction[] = [];\n for (const mutation of mutations) {\n if (mutation.time > time + 1000) {\n updateStateFlowTree(rootNode, elements, time, interactions);\n interactions.length = 0;\n }\n if (!('type' in mutation)) {\n elements.add(mutation);\n } else if (mutation.type === 'Resize') {\n const element = elements.get(mutation.veid);\n if (!element) {\n continue;\n }\n const oldArea = elements.getArea(element);\n element.width = mutation.width;\n element.height = mutation.height;\n if (elements.getArea(element) !== 0 && oldArea !== 0) {\n interactions.push(mutation);\n }\n } else {\n interactions.push(mutation);\n }\n time = mutation.time;\n }\n updateStateFlowTree(rootNode, elements, time, interactions);\n\n normalizeNode(rootNode);\n return rootNode;\n}\n\nlet sessionStartTime: number = Date.now();\n\nexport function processStartLoggingForDebugging(): void {\n sessionStartTime = Date.now();\n if (localStorage.getItem('veDebugLoggingEnabled') === DebugLoggingFormat.Intuitive) {\n maybeLogDebugEvent({event: 'SessionStart'});\n }\n}\n\n// @ts-ignore\nglobalThis.setVeDebugLoggingEnabled = setVeDebugLoggingEnabled;\n// @ts-ignore\nglobalThis.veDebugEventsLog = veDebugEventsLog;\n// @ts-ignore\nglobalThis.findVeDebugImpression = findVeDebugImpression;\n// @ts-ignore\nglobalThis.exportAdHocAnalysisLogForSql = exportAdHocAnalysisLogForSql;\n// @ts-ignore\nglobalThis.buildStateFlow = buildStateFlow;\n"]} \ No newline at end of file +{"version":3,"file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4BAA4B,GAAG,4BAA4B,CAAC;AACvE,aAAa;AACb,UAAU,CAAC,cAAc,GAAG,cAAc,CAAC;AAC3C,aAAa;AACb,UAAU,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;AACrD,aAAa;AACb,UAAU,CAAC,gBAAgB,GAAG,gBAAgB,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 Common from '../../core/common/common.js';\nimport {assertNotNullOrUndefined} from '../../core/platform/platform.js';\n\nimport {type Loggable} from './Loggable.js';\nimport {type LoggingConfig, VisualElements} from './LoggingConfig.js';\nimport {pendingWorkComplete, startLogging, stopLogging} from './LoggingDriver.js';\nimport {getLoggingState, type LoggingState} from './LoggingState.js';\n\nlet veDebuggingEnabled = false;\nlet debugPopover: HTMLElement|null = null;\nconst nonDomDebugElements = new WeakMap<Loggable, HTMLElement>();\n\nfunction setVeDebuggingEnabled(enabled: boolean): void {\n veDebuggingEnabled = enabled;\n if (enabled && !debugPopover) {\n debugPopover = document.createElement('div');\n debugPopover.classList.add('ve-debug');\n debugPopover.style.position = 'absolute';\n debugPopover.style.bottom = '100px';\n debugPopover.style.left = '100px';\n debugPopover.style.background = 'black';\n debugPopover.style.color = 'white';\n debugPopover.style.zIndex = '100000';\n document.body.appendChild(debugPopover);\n }\n}\n\n// @ts-ignore\nglobalThis.setVeDebuggingEnabled = setVeDebuggingEnabled;\n\nexport function processForDebugging(loggable: Loggable): void {\n const loggingState = getLoggingState(loggable);\n if (!veDebuggingEnabled || !loggingState || loggingState.processedForDebugging) {\n return;\n }\n if (loggable instanceof Element) {\n processElementForDebugging(loggable, loggingState);\n } else {\n processNonDomLoggableForDebugging(loggable, loggingState);\n }\n}\n\nfunction showDebugPopover(content: string): void {\n if (!debugPopover) {\n return;\n }\n debugPopover.style.display = 'block';\n debugPopover.innerHTML = content;\n}\n\nfunction processElementForDebugging(element: Element, loggingState: LoggingState): void {\n if (element.tagName === 'OPTION') {\n if (loggingState.parent?.selectOpen && debugPopover) {\n debugPopover.innerHTML += '<br>' + debugString(loggingState.config);\n loggingState.processedForDebugging = true;\n }\n } else {\n (element as HTMLElement).style.outline = 'solid 1px red';\n element.addEventListener('mouseenter', () => {\n assertNotNullOrUndefined(debugPopover);\n const pathToRoot = [loggingState];\n let ancestor = loggingState.parent;\n while (ancestor) {\n pathToRoot.push(ancestor);\n ancestor = ancestor.parent;\n }\n showDebugPopover(pathToRoot.map(s => debugString(s.config)).join('<br>'));\n }, {capture: true});\n element.addEventListener('mouseleave', () => {\n assertNotNullOrUndefined(debugPopover);\n debugPopover.style.display = 'none';\n }, {capture: true});\n loggingState.processedForDebugging = true;\n }\n}\n\ntype EventType = 'Click'|'Drag'|'Hover'|'Change'|'KeyDown'|'Resize';\nexport function processEventForDebugging(\n event: EventType, state: LoggingState|null, extraInfo?: EventAttributes): void {\n const format = localStorage.getItem('veDebugLoggingEnabled');\n if (!format) {\n return;\n }\n\n switch (format) {\n case DebugLoggingFormat.Intuitive:\n processEventForIntuitiveDebugging(event, state, extraInfo);\n break;\n case DebugLoggingFormat.Test:\n processEventForTestDebugging(event, state, extraInfo);\n break;\n case DebugLoggingFormat.AdHocAnalysis:\n processEventForAdHocAnalysisDebugging(event, state, extraInfo);\n break;\n }\n}\n\nexport function processEventForIntuitiveDebugging(\n event: EventType, state: LoggingState|null, extraInfo?: EventAttributes): void {\n const entry: IntuitiveLogEntry = {\n event,\n ve: state ? VisualElements[state?.config.ve] : undefined,\n veid: state?.veid,\n context: state?.config.context,\n time: Date.now() - sessionStartTime,\n ...extraInfo,\n };\n deleteUndefinedFields(entry);\n maybeLogDebugEvent(entry);\n}\n\nexport function processEventForTestDebugging(\n event: EventType, state: LoggingState|null, _extraInfo?: EventAttributes): void {\n lastImpressionLogEntry = null;\n maybeLogDebugEvent({interaction: `${event}: ${veTestKeys.get(state?.veid || 0) || ''}`});\n}\n\nexport function processEventForAdHocAnalysisDebugging(\n event: EventType, state: LoggingState|null, extraInfo?: EventAttributes): void {\n const ve = state ? adHocAnalysisEntries.get(state.veid) : null;\n if (ve) {\n const interaction: AdHocAnalysisInteraction = {time: Date.now() - sessionStartTime, type: event, ...extraInfo};\n deleteUndefinedFields(interaction);\n ve.interactions.push(interaction);\n }\n}\n\nfunction deleteUndefinedFields<T>(entry: T): void {\n for (const stringKey in entry) {\n const key = stringKey as keyof T;\n if (typeof entry[key] === 'undefined') {\n delete entry[key];\n }\n }\n}\n\nexport type EventAttributes = {\n context?: string,\n width?: number,\n height?: number,\n mouseButton?: number,\n doubleClick?: boolean,\n};\n\ntype VisualElementAttributes = {\n ve: string,\n veid: number,\n context?: string,\n width?: number,\n height?: number,\n};\n\ntype IntuitiveLogEntry = {\n event?: EventType|'Impression'|'SessionStart',\n children?: IntuitiveLogEntry[],\n parent?: number,\n time?: number,\n}&Partial<VisualElementAttributes>;\n\ntype AdHocAnalysisVisualElement = VisualElementAttributes&{\n parent?: AdHocAnalysisVisualElement,\n};\n\ntype AdHocAnalysisInteraction = {\n type: EventType,\n time: number,\n}&EventAttributes;\n\ntype AdHocAnalysisLogEntry = AdHocAnalysisVisualElement&{\n time: number,\n interactions: AdHocAnalysisInteraction[],\n};\n\ntype TestLogEntry = {\n impressions: string[],\n}|{\n interaction: string,\n};\n\nexport function processImpressionsForDebugging(states: LoggingState[]): void {\n const format = localStorage.getItem('veDebugLoggingEnabled');\n switch (format) {\n case DebugLoggingFormat.Intuitive:\n processImpressionsForIntuitiveDebugLog(states);\n break;\n case DebugLoggingFormat.Test:\n processImpressionsForTestDebugLog(states);\n break;\n case DebugLoggingFormat.AdHocAnalysis:\n processImpressionsForAdHocAnalysisDebugLog(states);\n break;\n default:\n }\n}\n\nfunction processImpressionsForIntuitiveDebugLog(states: LoggingState[]): void {\n const impressions = new Map<number, IntuitiveLogEntry>();\n for (const state of states) {\n const entry: IntuitiveLogEntry = {\n event: 'Impression',\n ve: VisualElements[state.config.ve],\n context: state?.config.context,\n width: state.size.width,\n height: state.size.height,\n veid: state.veid,\n };\n deleteUndefinedFields(entry);\n\n impressions.set(state.veid, entry);\n if (!state.parent || !impressions.has(state.parent?.veid)) {\n entry.parent = state.parent?.veid;\n } else {\n const parent = impressions.get(state.parent?.veid) as IntuitiveLogEntry;\n parent.children = parent.children || [];\n parent.children.push(entry);\n }\n }\n\n const entries = [...impressions.values()].filter(i => 'parent' in i);\n if (entries.length === 1) {\n entries[0].time = Date.now() - sessionStartTime;\n maybeLogDebugEvent(entries[0]);\n } else {\n maybeLogDebugEvent({event: 'Impression', children: entries, time: Date.now() - sessionStartTime});\n }\n}\n\nconst veTestKeys = new Map<number, string>();\nlet lastImpressionLogEntry: {impressions: string[]}|null = null;\n\nfunction processImpressionsForTestDebugLog(states: LoggingState[]): void {\n if (!lastImpressionLogEntry) {\n lastImpressionLogEntry = {impressions: []};\n veDebugEventsLog.push(lastImpressionLogEntry);\n }\n for (const state of states) {\n let key = '';\n if (state.parent) {\n key = (veTestKeys.get(state.parent.veid) || '<UNKNOWN>') + ' > ';\n }\n key += VisualElements[state.config.ve];\n if (state.config.context) {\n key += ': ' + state.config.context;\n }\n veTestKeys.set(state.veid, key);\n lastImpressionLogEntry.impressions.push(key);\n }\n}\n\nconst adHocAnalysisEntries = new Map<number, AdHocAnalysisLogEntry>();\n\nfunction processImpressionsForAdHocAnalysisDebugLog(states: LoggingState[]): void {\n for (const state of states) {\n const buildVe = (state: LoggingState): AdHocAnalysisVisualElement => {\n const ve: AdHocAnalysisVisualElement = {\n ve: VisualElements[state.config.ve],\n veid: state.veid,\n width: state.size?.width,\n height: state.size?.height,\n context: state.config.context,\n };\n deleteUndefinedFields(ve);\n if (state.parent) {\n ve.parent = buildVe(state.parent);\n }\n return ve;\n };\n const entry = {...buildVe(state), interactions: [], time: Date.now() - sessionStartTime};\n adHocAnalysisEntries.set(state.veid, entry);\n maybeLogDebugEvent(entry);\n }\n}\n\nfunction processNonDomLoggableForDebugging(loggable: Loggable, loggingState: LoggingState): void {\n let debugElement = nonDomDebugElements.get(loggable);\n if (!debugElement) {\n debugElement = document.createElement('div');\n debugElement.classList.add('ve-debug');\n debugElement.style.background = 'black';\n debugElement.style.color = 'white';\n debugElement.style.zIndex = '100000';\n debugElement.textContent = debugString(loggingState.config);\n nonDomDebugElements.set(loggable, debugElement);\n setTimeout(() => {\n if (!loggingState.size?.width || !loggingState.size?.height) {\n debugElement?.parentElement?.removeChild(debugElement);\n nonDomDebugElements.delete(loggable);\n }\n }, 10000);\n }\n const parentDebugElement =\n parent instanceof HTMLElement ? parent : nonDomDebugElements.get(parent as Loggable) || debugPopover;\n assertNotNullOrUndefined(parentDebugElement);\n if (!parentDebugElement.classList.contains('ve-debug')) {\n debugElement.style.position = 'absolute';\n parentDebugElement.insertBefore(debugElement, parentDebugElement.firstChild);\n } else {\n debugElement.style.marginLeft = '10px';\n parentDebugElement.appendChild(debugElement);\n }\n}\n\nexport function debugString(config: LoggingConfig): string {\n const components = [VisualElements[config.ve]];\n if (config.context) {\n components.push(`context: ${config.context}`);\n }\n if (config.parent) {\n components.push(`parent: ${config.parent}`);\n }\n if (config.track) {\n components.push(`track: ${\n Object.entries(config.track)\n .map(([key, value]) => `${key}${typeof value === 'string' ? `: ${value}` : ''}`)\n .join(', ')}`);\n }\n return components.join('; ');\n}\n\nconst veDebugEventsLog: (IntuitiveLogEntry|AdHocAnalysisLogEntry|TestLogEntry)[] = [];\n\nfunction maybeLogDebugEvent(entry: IntuitiveLogEntry|AdHocAnalysisLogEntry|TestLogEntry): void {\n const format = localStorage.getItem('veDebugLoggingEnabled');\n if (!format) {\n return;\n }\n veDebugEventsLog.push(entry);\n if (format === DebugLoggingFormat.Intuitive) {\n // eslint-disable-next-line no-console\n console.info('VE Debug:', entry);\n }\n}\n\nenum DebugLoggingFormat {\n Intuitive = 'Intuitive',\n Test = 'Test',\n AdHocAnalysis = 'AdHocAnalysis',\n}\n\nfunction setVeDebugLoggingEnabled(enabled: boolean, format = DebugLoggingFormat.Intuitive): void {\n if (enabled) {\n localStorage.setItem('veDebugLoggingEnabled', format);\n } else {\n localStorage.removeItem('veDebugLoggingEnabled');\n }\n}\n\nfunction findVeDebugImpression(veid: number, includeAncestorChain?: boolean): IntuitiveLogEntry|undefined {\n const findImpression = (entry: IntuitiveLogEntry): IntuitiveLogEntry|undefined => {\n if (entry.event === 'Impression' && entry.veid === veid) {\n return entry;\n }\n let i = 0;\n for (const childEntry of entry.children || []) {\n const matchingEntry = findImpression(childEntry);\n if (matchingEntry) {\n if (includeAncestorChain) {\n const children = [];\n children[i] = matchingEntry;\n return {...entry, children};\n }\n return matchingEntry;\n }\n ++i;\n }\n return undefined;\n };\n return findImpression({children: veDebugEventsLog as IntuitiveLogEntry[]});\n}\n\nfunction fieldValuesForSql<T>(\n obj: T,\n fields: {strings: readonly(keyof T)[], numerics: readonly(keyof T)[], booleans: readonly(keyof T)[]}): string {\n return [\n ...fields.strings.map(f => obj[f] ? `\"${obj[f]}\"` : '$NullString'),\n ...fields.numerics.map(f => obj[f] ?? 'null'),\n ...fields.booleans.map(f => obj[f] ?? '$NullBool'),\n ].join(', ');\n}\n\nfunction exportAdHocAnalysisLogForSql(): void {\n const VE_FIELDS = {\n strings: ['ve', 'context'] as const,\n numerics: ['veid', 'width', 'height'] as const,\n booleans: [] as const,\n };\n const INTERACTION_FIELDS = {\n strings: ['type', 'context'] as const,\n numerics: ['width', 'height', 'mouseButton', 'time'] as const,\n booleans: ['width', 'height', 'mouseButton', 'time'] as const,\n };\n\n const fieldsDefsForSql = (fields: string[]): string => fields.map((f, i) => `$${i + 1} as ${f}`).join(', ');\n\n const veForSql = (e: AdHocAnalysisVisualElement): string =>\n `$VeFields(${fieldValuesForSql(e, VE_FIELDS)}, ${e.parent ? `STRUCT(${veForSql(e.parent)})` : null})`;\n\n const interactionForSql = (i: AdHocAnalysisInteraction): string =>\n `$Interaction(${fieldValuesForSql(i, INTERACTION_FIELDS)})`;\n\n const entryForSql = (e: AdHocAnalysisLogEntry): string =>\n `$Entry(${veForSql(e)}, ([${e.interactions.map(interactionForSql).join(', ')}]), ${e.time})`;\n\n const entries = veDebugEventsLog as AdHocAnalysisLogEntry[];\n\n // eslint-disable-next-line no-console\n console.log(`\nDEFINE MACRO NullString CAST(null AS STRING);\nDEFINE MACRO NullBool CAST(null AS BOOL);\nDEFINE MACRO VeFields ${fieldsDefsForSql([\n ...VE_FIELDS.strings,\n ...VE_FIELDS.numerics,\n 'parent',\n ])};\nDEFINE MACRO Interaction STRUCT(${\n fieldsDefsForSql([\n ...INTERACTION_FIELDS.strings,\n ...INTERACTION_FIELDS.numerics,\n ...INTERACTION_FIELDS.booleans,\n ])});\nDEFINE MACRO Entry STRUCT($1, $2 AS interactions, $3 AS time);\n\n// This fake entry put first fixes nested struct fiels names being lost\nDEFINE MACRO FakeVeFields $VeFields(\"\", $NullString, 0, 0, 0, $1);\nDEFINE MACRO FakeVe STRUCT($FakeVeFields($1));\nDEFINE MACRO FakeEntry $Entry($FakeVeFields($FakeVe($FakeVe($FakeVe($FakeVe($FakeVe($FakeVe($FakeVe(null)))))))), ([]), 0);\n\nWITH\n processed_logs AS (\n SELECT * FROM UNNEST([\n $FakeEntry,\n ${entries.map(entryForSql).join(', \\n')}\n ])\n )\n\n\n\nSELECT * FROM processed_logs;`);\n}\n\ntype StateFlowNode = {\n type: 'Session',\n children: StateFlowNode[],\n}|({type: 'Impression', children: StateFlowNode[], time: number}&AdHocAnalysisVisualElement)|AdHocAnalysisInteraction;\n\ntype StateFlowMutation = (AdHocAnalysisLogEntry|(AdHocAnalysisInteraction&{veid: number}));\n\nfunction getStateFlowMutations(): StateFlowMutation[] {\n const mutations: StateFlowMutation[] = [];\n for (const entry of (veDebugEventsLog as AdHocAnalysisLogEntry[])) {\n mutations.push(entry);\n const veid = entry.veid;\n for (const interaction of entry.interactions) {\n mutations.push({...interaction, veid});\n }\n }\n mutations.sort((e1, e2) => e1.time - e2.time);\n return mutations;\n}\n\nclass StateFlowElementsByArea {\n #data = new Map<number, AdHocAnalysisVisualElement>();\n\n add(e: AdHocAnalysisVisualElement): void {\n this.#data.set(e.veid, e);\n }\n\n get(veid: number): AdHocAnalysisVisualElement|undefined {\n return this.#data.get(veid);\n }\n\n getArea(e: AdHocAnalysisVisualElement): number {\n let area = (e.width || 0) * (e.height || 0);\n const parent = e.parent ? this.#data.get(e.parent?.veid) : null;\n if (!parent) {\n return area;\n }\n const parentArea = this.getArea(parent);\n if (area > parentArea) {\n area = parentArea;\n }\n return area;\n }\n\n get data(): readonly AdHocAnalysisVisualElement[] {\n return [...this.#data.values()].filter(e => this.getArea(e)).sort((e1, e2) => this.getArea(e2) - this.getArea(e1));\n }\n}\n\nfunction updateStateFlowTree(\n rootNode: StateFlowNode, elements: StateFlowElementsByArea, time: number,\n interactions: AdHocAnalysisInteraction[]): void {\n let node = rootNode;\n for (const element of elements.data) {\n if (!('children' in node)) {\n return;\n }\n let nextNode = node.children[node.children.length - 1];\n const nextNodeId = nextNode?.type === 'Impression' ? nextNode.veid : null;\n if (nextNodeId !== element.veid) {\n node.children.push(...interactions);\n interactions.length = 0;\n nextNode = {type: 'Impression', ve: element.ve, veid: element.veid, context: element.context, time, children: []};\n node.children.push(nextNode);\n }\n node = nextNode;\n }\n}\n\nfunction normalizeNode(node: StateFlowNode): void {\n if (node.type !== 'Impression') {\n return;\n }\n while (node.children.length === 1) {\n if (node.children[0].type === 'Impression') {\n node.children = node.children[0].children;\n }\n }\n for (const child of node.children) {\n normalizeNode(child);\n }\n}\n\nfunction buildStateFlow(): StateFlowNode {\n const mutations = getStateFlowMutations();\n const elements = new StateFlowElementsByArea();\n const rootNode: StateFlowNode = {type: 'Session', children: []};\n\n let time = mutations[0].time;\n const interactions: AdHocAnalysisInteraction[] = [];\n for (const mutation of mutations) {\n if (mutation.time > time + 1000) {\n updateStateFlowTree(rootNode, elements, time, interactions);\n interactions.length = 0;\n }\n if (!('type' in mutation)) {\n elements.add(mutation);\n } else if (mutation.type === 'Resize') {\n const element = elements.get(mutation.veid);\n if (!element) {\n continue;\n }\n const oldArea = elements.getArea(element);\n element.width = mutation.width;\n element.height = mutation.height;\n if (elements.getArea(element) !== 0 && oldArea !== 0) {\n interactions.push(mutation);\n }\n } else {\n interactions.push(mutation);\n }\n time = mutation.time;\n }\n updateStateFlowTree(rootNode, elements, time, interactions);\n\n normalizeNode(rootNode);\n return rootNode;\n}\n\nlet sessionStartTime: number = Date.now();\n\nexport function processStartLoggingForDebugging(): void {\n sessionStartTime = Date.now();\n if (localStorage.getItem('veDebugLoggingEnabled') === DebugLoggingFormat.Intuitive) {\n maybeLogDebugEvent({event: 'SessionStart'});\n }\n}\n\nasync function getVeDebugEventsLog(): Promise<(IntuitiveLogEntry | AdHocAnalysisLogEntry | TestLogEntry)[]> {\n await pendingWorkComplete();\n lastImpressionLogEntry = null;\n return veDebugEventsLog;\n}\n\nasync function startTestLogging(): Promise<void> {\n setVeDebugLoggingEnabled(true, DebugLoggingFormat.Test);\n stopLogging();\n await startLogging({\n processingThrottler: new Common.Throttler.Throttler(10),\n keyboardLogThrottler: new Common.Throttler.Throttler(10),\n hoverLogThrottler: new Common.Throttler.Throttler(10),\n dragLogThrottler: new Common.Throttler.Throttler(10),\n clickLogThrottler: new Common.Throttler.Throttler(10),\n resizeLogThrottler: new Common.Throttler.Throttler(10),\n });\n}\n\n// @ts-ignore\nglobalThis.setVeDebugLoggingEnabled = setVeDebugLoggingEnabled;\n// @ts-ignore\nglobalThis.veDebugEventsLog = veDebugEventsLog;\n// @ts-ignore\nglobalThis.findVeDebugImpression = findVeDebugImpression;\n// @ts-ignore\nglobalThis.exportAdHocAnalysisLogForSql = exportAdHocAnalysisLogForSql;\n// @ts-ignore\nglobalThis.buildStateFlow = buildStateFlow;\n// @ts-ignore\nglobalThis.getVeDebugEventsLog = getVeDebugEventsLog;\n// @ts-ignore\nglobalThis.startTestLogging = startTestLogging;\n"]} \ No newline at end of file diff --git a/public/ui/visual_logging/LoggingDriver.d.ts b/public/ui/visual_logging/LoggingDriver.d.ts index 06d1bf857..5bbea3c2c 100644 --- a/public/ui/visual_logging/LoggingDriver.d.ts +++ b/public/ui/visual_logging/LoggingDriver.d.ts @@ -13,4 +13,5 @@ export declare function startLogging(options?: { }): Promise<void>; export declare function addDocument(document: Document): Promise<void>; export declare function stopLogging(): void; +export declare function pendingWorkComplete(): Promise<void>; export declare function scheduleProcessing(): Promise<void>; diff --git a/public/ui/visual_logging/LoggingDriver.js b/public/ui/visual_logging/LoggingDriver.js index fd9d1b526..08e709119 100644 --- a/public/ui/visual_logging/LoggingDriver.js +++ b/public/ui/visual_logging/LoggingDriver.js @@ -78,6 +78,22 @@ export function stopLogging() { pendingResize.clear(); pendingChange.clear(); } +export function pendingWorkComplete() { + return Promise + .all([ + processingThrottler, + keyboardLogThrottler, + hoverLogThrottler, + dragLogThrottler, + clickLogThrottler, + resizeLogThrottler, + ].map(async (throttler) => { + while (throttler.process) { + await throttler.processCompleted; + } + })) + .then(() => { }); +} async function yieldToInteractions() { while (clickLogThrottler.process) { await clickLogThrottler.processCompleted; diff --git a/public/ui/visual_logging/LoggingDriver.js.map b/public/ui/visual_logging/LoggingDriver.js.map index 45b07363c..50bb5bb56 100644 --- a/public/ui/visual_logging/LoggingDriver.js.map +++ b/public/ui/visual_logging/LoggingDriver.js.map @@ -1 +1 @@ -{"version":3,"file":"LoggingDriver.js","sourceRoot":"","sources":["../../../../../../front_end/ui/visual_logging/LoggingDriver.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,WAAW,MAAM,wDAAwD,CAAC;AAEtF,OAAO,EAAC,mBAAmB,EAAE,+BAA+B,EAAC,MAAM,gBAAgB,CAAC;AACpF,OAAO,EAAC,WAAW,EAAE,cAAc,EAAC,MAAM,eAAe,CAAC;AAE1D,OAAO,EAAC,gB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,CAAC;oBAC7C,aAAa,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;gBACvC,CAAC;YACH,CAAC;YACD,IAAI,gBAAgB,EAAE,CAAC;gBACrB,SAAS;YACX,CAAC;YACD,aAAa,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACpC,MAAM,kBAAkB,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE,GAAE,CAAC,CAAC,CAAC;YAClD,KAAK,kBAAkB,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE;gBAC1C,IAAI,aAAa,CAAC,IAAI,EAAE,CAAC;oBACvB,MAAM,mBAAmB,EAAE,CAAC;oBAC5B,wBAAwB,EAAE,CAAC;gBAC7B,CAAC;gBACD,KAAK,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,aAAa,CAAC,OAAO,EAAE,EAAE,CAAC;oBACzD,MAAM,YAAY,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;oBAC9C,IAAI,CAAC,YAAY,EAAE,CAAC;wBAClB,SAAS;oBACX,CAAC;oBACD,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,GAAG,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,uBAAuB;wBAC5E,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,uBAAuB,EAAE,CAAC;wBACnF,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;oBAC9B,CAAC;gBACH,CAAC;gBACD,aAAa,CAAC,KAAK,EAAE,CAAC;YACxB,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;AACL,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 Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as Coordinator from '../components/render_coordinator/render_coordinator.js';\n\nimport {processForDebugging, processStartLoggingForDebugging} from './Debugging.js';\nimport {getDomState, visibleOverlap} from './DomState.js';\nimport {type Loggable} from './Loggable.js';\nimport {getLoggingConfig} from './LoggingConfig.js';\nimport {logChange, logClick, logDrag, logHover, logImpressions, logKeyDown, logResize} from './LoggingEvents.js';\nimport {getLoggingState, getOrCreateLoggingState, type LoggingState} from './LoggingState.js';\nimport {getNonDomState, unregisterAllLoggables, unregisterLoggable} from './NonDomState.js';\n\nconst PROCESS_DOM_INTERVAL = 500;\nconst KEYBOARD_LOG_INTERVAL = 3000;\nconst HOVER_LOG_INTERVAL = 1000;\nconst DRAG_LOG_INTERVAL = 1250;\nconst DRAG_REPORT_THRESHOLD = 50;\nconst CLICK_LOG_INTERVAL = 500;\nconst RESIZE_LOG_INTERVAL = 200;\nconst RESIZE_REPORT_THRESHOLD = 50;\n\nconst noOpThrottler = {\n schedule: async () => {},\n} as unknown as Common.Throttler.Throttler;\n\nlet processingThrottler = noOpThrottler;\nexport let keyboardLogThrottler = noOpThrottler;\nlet hoverLogThrottler = noOpThrottler;\nlet dragLogThrottler = noOpThrottler;\nexport let clickLogThrottler = noOpThrottler;\nexport let resizeLogThrottler = noOpThrottler;\n\nconst mutationObserver = new MutationObserver(scheduleProcessing);\nconst resizeObserver = new ResizeObserver(onResizeOrIntersection);\nconst intersectionObserver = new IntersectionObserver(onResizeOrIntersection);\nconst documents: Document[] = [];\nconst pendingResize = new Map<Element, DOMRect>();\nconst pendingChange = new Set<Element>();\n\nfunction observeMutations(roots: Node[]): void {\n for (const root of roots) {\n mutationObserver.observe(root, {attributes: true, childList: true, subtree: true});\n }\n}\n\nlet logging = false;\n\nexport function isLogging(): boolean {\n return logging;\n}\n\nexport async function startLogging(options?: {\n processingThrottler?: Common.Throttler.Throttler,\n keyboardLogThrottler?: Common.Throttler.Throttler,\n hoverLogThrottler?: Common.Throttler.Throttler,\n dragLogThrottler?: Common.Throttler.Throttler,\n clickLogThrottler?: Common.Throttler.Throttler,\n resizeLogThrottler?: Common.Throttler.Throttler,\n}): Promise<void> {\n logging = true;\n processingThrottler = options?.processingThrottler || new Common.Throttler.Throttler(PROCESS_DOM_INTERVAL);\n keyboardLogThrottler = options?.keyboardLogThrottler || new Common.Throttler.Throttler(KEYBOARD_LOG_INTERVAL);\n hoverLogThrottler = options?.hoverLogThrottler || new Common.Throttler.Throttler(HOVER_LOG_INTERVAL);\n dragLogThrottler = options?.dragLogThrottler || new Common.Throttler.Throttler(DRAG_LOG_INTERVAL);\n clickLogThrottler = options?.clickLogThrottler || new Common.Throttler.Throttler(CLICK_LOG_INTERVAL);\n resizeLogThrottler = options?.resizeLogThrottler || new Common.Throttler.Throttler(RESIZE_LOG_INTERVAL);\n processStartLoggingForDebugging();\n await addDocument(document);\n}\n\nexport async function addDocument(document: Document): Promise<void> {\n documents.push(document);\n if (['interactive', 'complete'].includes(document.readyState)) {\n await process();\n }\n document.addEventListener('visibilitychange', scheduleProcessing);\n document.addEventListener('scroll', scheduleProcessing);\n observeMutations([document.body]);\n}\n\nexport function stopLogging(): void {\n logging = false;\n unregisterAllLoggables();\n for (const document of documents) {\n document.removeEventListener('visibilitychange', scheduleProcessing);\n document.removeEventListener('scroll', scheduleProcessing);\n }\n mutationObserver.disconnect();\n resizeObserver.disconnect();\n intersectionObserver.disconnect();\n documents.length = 0;\n viewportRects.clear();\n processingThrottler = noOpThrottler;\n pendingResize.clear();\n pendingChange.clear();\n}\n\nasync function yieldToInteractions(): Promise<void> {\n while (clickLogThrottler.process) {\n await clickLogThrottler.processCompleted;\n }\n while (keyboardLogThrottler.process) {\n await keyboardLogThrottler.processCompleted;\n }\n}\n\nfunction flushPendingChangeEvents(): void {\n for (const element of pendingChange) {\n logPendingChange(element);\n }\n}\n\nexport async function scheduleProcessing(): Promise<void> {\n if (!processingThrottler) {\n return;\n }\n void processingThrottler.schedule(\n () => Coordinator.RenderCoordinator.RenderCoordinator.instance().read('processForLogging', process));\n}\n\nconst viewportRects = new Map<Document, DOMRect>();\nconst viewportRectFor = (element: Element): DOMRect => {\n const ownerDocument = element.ownerDocument;\n const viewportRect = viewportRects.get(ownerDocument) ||\n new DOMRect(0, 0, ownerDocument.defaultView?.innerWidth || 0, ownerDocument.defaultView?.innerHeight || 0);\n viewportRects.set(ownerDocument, viewportRect);\n return viewportRect;\n};\n\nasync function process(): Promise<void> {\n if (document.hidden) {\n return;\n }\n const startTime = performance.now();\n const {loggables, shadowRoots} = getDomState(documents);\n const visibleLoggables: Loggable[] = [];\n observeMutations(shadowRoots);\n\n for (const {element, parent} of loggables) {\n const loggingState = getOrCreateLoggingState(element, getLoggingConfig(element), parent);\n if (!loggingState.impressionLogged) {\n const overlap = visibleOverlap(element, viewportRectFor(element));\n const visibleSelectOption = element.tagName === 'OPTION' && loggingState.parent?.selectOpen;\n if (overlap || visibleSelectOption) {\n if (overlap) {\n loggingState.size = overlap;\n }\n visibleLoggables.push(element);\n loggingState.impressionLogged = true;\n }\n }\n if (!loggingState.processed) {\n const clickLikeHandler = (doubleClick: boolean) => (e: Event) => {\n const loggable = e.currentTarget as Element;\n logClick(clickLogThrottler)(loggable, e, {doubleClick});\n };\n if (loggingState.config.track?.click) {\n element.addEventListener('click', clickLikeHandler(false), {capture: true});\n element.addEventListener('auxclick', clickLikeHandler(false), {capture: true});\n element.addEventListener('contextmenu', clickLikeHandler(false), {capture: true});\n }\n if (loggingState.config.track?.dblclick) {\n element.addEventListener('dblclick', clickLikeHandler(true), {capture: true});\n }\n const trackHover = loggingState.config.track?.hover;\n if (trackHover) {\n element.addEventListener('mouseover', logHover(hoverLogThrottler), {capture: true});\n element.addEventListener(\n 'mouseout', () => hoverLogThrottler.schedule(cancelLogging, Common.Throttler.Scheduling.AsSoonAsPossible),\n {capture: true});\n }\n const trackDrag = loggingState.config.track?.drag;\n if (trackDrag) {\n element.addEventListener('pointerdown', onDragStart, {capture: true});\n document.addEventListener('pointerup', maybeCancelDrag, {capture: true});\n document.addEventListener('dragend', maybeCancelDrag, {capture: true});\n }\n if (loggingState.config.track?.change) {\n element.addEventListener('input', (event: Event) => {\n if (!(event instanceof InputEvent)) {\n return;\n }\n if (loggingState.lastInputEventType && loggingState.lastInputEventType !== event.inputType) {\n void logPendingChange(element);\n }\n loggingState.lastInputEventType = event.inputType;\n pendingChange.add(element);\n }, {capture: true});\n element.addEventListener('change', () => logPendingChange(element), {capture: true});\n element.addEventListener('focusout', () => {\n if (loggingState.lastInputEventType) {\n void logPendingChange(element);\n }\n }, {capture: true});\n }\n const trackKeyDown = loggingState.config.track?.keydown;\n if (trackKeyDown) {\n element.addEventListener('keydown', e => logKeyDown(keyboardLogThrottler)(e.currentTarget, e), {capture: true});\n }\n if (loggingState.config.track?.resize) {\n resizeObserver.observe(element);\n intersectionObserver.observe(element);\n }\n if (element.tagName === 'SELECT') {\n const onSelectOpen = (e: Event): void => {\n void logClick(clickLogThrottler)(element, e);\n if (loggingState.selectOpen) {\n return;\n }\n loggingState.selectOpen = true;\n void scheduleProcessing();\n };\n element.addEventListener('click', onSelectOpen, {capture: true});\n // Based on MenuListSelectType::ShouldOpenPopupForKey{Down,Press}Event\n element.addEventListener('keydown', event => {\n const e = event as KeyboardEvent;\n if ((Host.Platform.isMac() || e.altKey) && (e.code === 'ArrowDown' || e.code === 'ArrowUp') ||\n (!e.altKey && !e.ctrlKey && e.code === 'F4')) {\n onSelectOpen(event);\n }\n }, {capture: true});\n element.addEventListener('keypress', event => {\n const e = event as KeyboardEvent;\n if (e.key === ' ' || !Host.Platform.isMac() && e.key === '\\r') {\n onSelectOpen(event);\n }\n }, {capture: true});\n element.addEventListener('change', e => {\n for (const option of (element as HTMLSelectElement).selectedOptions) {\n if (getLoggingState(option)?.config.track?.click) {\n void logClick(clickLogThrottler)(option, e);\n }\n }\n }, {capture: true});\n }\n loggingState.processed = true;\n }\n processForDebugging(element);\n }\n for (const {loggable, config, parent} of getNonDomState().loggables) {\n const loggingState = getOrCreateLoggingState(loggable, config, parent);\n const visible = !parent || loggingState.parent?.impressionLogged;\n if (!visible) {\n continue;\n }\n processForDebugging(loggable);\n visibleLoggables.push(loggable);\n loggingState.impressionLogged = true;\n // No need to track loggable as soon as we've logged the impression\n // We can still log interaction events with a handle to a loggable\n unregisterLoggable(loggable);\n }\n if (visibleLoggables.length) {\n await yieldToInteractions();\n flushPendingChangeEvents();\n await logImpressions(visibleLoggables);\n }\n Host.userMetrics.visualLoggingProcessingDone(performance.now() - startTime);\n}\n\nfunction logPendingChange(element: Element): void {\n const loggingState = getLoggingState(element);\n if (!loggingState) {\n return;\n }\n void logChange(element);\n delete loggingState.lastInputEventType;\n pendingChange.delete(element);\n}\n\nasync function cancelLogging(): Promise<void> {\n}\n\nlet dragStartX = 0, dragStartY = 0;\n\nfunction onDragStart(event: Event): void {\n if (!(event instanceof MouseEvent)) {\n return;\n }\n dragStartX = event.screenX;\n dragStartY = event.screenY;\n void logDrag(dragLogThrottler)(event);\n}\n\nfunction maybeCancelDrag(event: Event): void {\n if (!(event instanceof MouseEvent)) {\n return;\n }\n if (Math.abs(event.screenX - dragStartX) >= DRAG_REPORT_THRESHOLD ||\n Math.abs(event.screenY - dragStartY) >= DRAG_REPORT_THRESHOLD) {\n return;\n }\n void dragLogThrottler.schedule(cancelLogging, Common.Throttler.Scheduling.AsSoonAsPossible);\n}\n\nfunction isAncestorOf(state1: LoggingState|null, state2: LoggingState|null): boolean {\n while (state2) {\n if (state2 === state1) {\n return true;\n }\n state2 = state2.parent;\n }\n return false;\n}\n\nasync function onResizeOrIntersection(entries: ResizeObserverEntry[]|IntersectionObserverEntry[]): Promise<void> {\n await Coordinator.RenderCoordinator.RenderCoordinator.instance().read('logResize', async () => {\n for (const entry of entries) {\n const element = entry.target;\n const loggingState = getLoggingState(element);\n const overlap = visibleOverlap(element, viewportRectFor(element)) || new DOMRect(0, 0, 0, 0);\n if (!loggingState?.size) {\n continue;\n }\n\n let hasPendingParent = false;\n for (const pendingElement of pendingResize.keys()) {\n if (pendingElement === element) {\n continue;\n }\n const pendingState = getLoggingState(pendingElement);\n if (isAncestorOf(pendingState, loggingState)) {\n hasPendingParent = true;\n break;\n }\n if (isAncestorOf(loggingState, pendingState)) {\n pendingResize.delete(pendingElement);\n }\n }\n if (hasPendingParent) {\n continue;\n }\n pendingResize.set(element, overlap);\n await resizeLogThrottler.schedule(async () => {});\n void resizeLogThrottler.schedule(async () => {\n if (pendingResize.size) {\n await yieldToInteractions();\n flushPendingChangeEvents();\n }\n for (const [element, overlap] of pendingResize.entries()) {\n const loggingState = getLoggingState(element);\n if (!loggingState) {\n continue;\n }\n if (Math.abs(overlap.width - loggingState.size.width) >= RESIZE_REPORT_THRESHOLD ||\n Math.abs(overlap.height - loggingState.size.height) >= RESIZE_REPORT_THRESHOLD) {\n logResize(element, overlap);\n }\n }\n pendingResize.clear();\n });\n }\n });\n}\n"]} \ No newline at end of file +{"version":3,"file":"LoggingDriver.js","sourceRoot":"","sources":["../../../../../../front_end/ui/visual_logging/LoggingDriver.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,WAAW,MAAM,wDAAwD,CAAC;AAEtF,OAAO,EAAC,mBAAmB,EAAE,+BAA+B,EAAC,MAAM,gBAAgB,CAAC;AACpF,OAAO,EAAC,WAAW,EAAE,cAAc,EAAC,MAAM,eAAe,CAAC;AAE1D,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAAC,MAAM,oBAAoB,CAAC;AACjH,OAAO,EAAC,eAAe,EAAE,uBAAuB,EAAoB,MAAM,mBAAmB,CAAC;AAC9F,OAAO,EAAC,cAAc,EAAE,sBAAsB,EAAE,kBAAkB,EAAC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SD-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 Coordinator from '../components/render_coordinator/render_coordinator.js';\n\nimport {processForDebugging, processStartLoggingForDebugging} from './Debugging.js';\nimport {getDomState, visibleOverlap} from './DomState.js';\nimport {type Loggable} from './Loggable.js';\nimport {getLoggingConfig} from './LoggingConfig.js';\nimport {logChange, logClick, logDrag, logHover, logImpressions, logKeyDown, logResize} from './LoggingEvents.js';\nimport {getLoggingState, getOrCreateLoggingState, type LoggingState} from './LoggingState.js';\nimport {getNonDomState, unregisterAllLoggables, unregisterLoggable} from './NonDomState.js';\n\nconst PROCESS_DOM_INTERVAL = 500;\nconst KEYBOARD_LOG_INTERVAL = 3000;\nconst HOVER_LOG_INTERVAL = 1000;\nconst DRAG_LOG_INTERVAL = 1250;\nconst DRAG_REPORT_THRESHOLD = 50;\nconst CLICK_LOG_INTERVAL = 500;\nconst RESIZE_LOG_INTERVAL = 200;\nconst RESIZE_REPORT_THRESHOLD = 50;\n\nconst noOpThrottler = {\n schedule: async () => {},\n} as unknown as Common.Throttler.Throttler;\n\nlet processingThrottler = noOpThrottler;\nexport let keyboardLogThrottler = noOpThrottler;\nlet hoverLogThrottler = noOpThrottler;\nlet dragLogThrottler = noOpThrottler;\nexport let clickLogThrottler = noOpThrottler;\nexport let resizeLogThrottler = noOpThrottler;\n\nconst mutationObserver = new MutationObserver(scheduleProcessing);\nconst resizeObserver = new ResizeObserver(onResizeOrIntersection);\nconst intersectionObserver = new IntersectionObserver(onResizeOrIntersection);\nconst documents: Document[] = [];\nconst pendingResize = new Map<Element, DOMRect>();\nconst pendingChange = new Set<Element>();\n\nfunction observeMutations(roots: Node[]): void {\n for (const root of roots) {\n mutationObserver.observe(root, {attributes: true, childList: true, subtree: true});\n }\n}\n\nlet logging = false;\n\nexport function isLogging(): boolean {\n return logging;\n}\n\nexport async function startLogging(options?: {\n processingThrottler?: Common.Throttler.Throttler,\n keyboardLogThrottler?: Common.Throttler.Throttler,\n hoverLogThrottler?: Common.Throttler.Throttler,\n dragLogThrottler?: Common.Throttler.Throttler,\n clickLogThrottler?: Common.Throttler.Throttler,\n resizeLogThrottler?: Common.Throttler.Throttler,\n}): Promise<void> {\n logging = true;\n processingThrottler = options?.processingThrottler || new Common.Throttler.Throttler(PROCESS_DOM_INTERVAL);\n keyboardLogThrottler = options?.keyboardLogThrottler || new Common.Throttler.Throttler(KEYBOARD_LOG_INTERVAL);\n hoverLogThrottler = options?.hoverLogThrottler || new Common.Throttler.Throttler(HOVER_LOG_INTERVAL);\n dragLogThrottler = options?.dragLogThrottler || new Common.Throttler.Throttler(DRAG_LOG_INTERVAL);\n clickLogThrottler = options?.clickLogThrottler || new Common.Throttler.Throttler(CLICK_LOG_INTERVAL);\n resizeLogThrottler = options?.resizeLogThrottler || new Common.Throttler.Throttler(RESIZE_LOG_INTERVAL);\n processStartLoggingForDebugging();\n await addDocument(document);\n}\n\nexport async function addDocument(document: Document): Promise<void> {\n documents.push(document);\n if (['interactive', 'complete'].includes(document.readyState)) {\n await process();\n }\n document.addEventListener('visibilitychange', scheduleProcessing);\n document.addEventListener('scroll', scheduleProcessing);\n observeMutations([document.body]);\n}\n\nexport function stopLogging(): void {\n logging = false;\n unregisterAllLoggables();\n for (const document of documents) {\n document.removeEventListener('visibilitychange', scheduleProcessing);\n document.removeEventListener('scroll', scheduleProcessing);\n }\n mutationObserver.disconnect();\n resizeObserver.disconnect();\n intersectionObserver.disconnect();\n documents.length = 0;\n viewportRects.clear();\n processingThrottler = noOpThrottler;\n pendingResize.clear();\n pendingChange.clear();\n}\n\nexport function pendingWorkComplete(): Promise<void> {\n return Promise\n .all([\n processingThrottler,\n keyboardLogThrottler,\n hoverLogThrottler,\n dragLogThrottler,\n clickLogThrottler,\n resizeLogThrottler,\n ].map(async throttler => {\n while (throttler.process) {\n await throttler.processCompleted;\n }\n }))\n .then(() => {});\n}\n\nasync function yieldToInteractions(): Promise<void> {\n while (clickLogThrottler.process) {\n await clickLogThrottler.processCompleted;\n }\n while (keyboardLogThrottler.process) {\n await keyboardLogThrottler.processCompleted;\n }\n}\n\nfunction flushPendingChangeEvents(): void {\n for (const element of pendingChange) {\n logPendingChange(element);\n }\n}\n\nexport async function scheduleProcessing(): Promise<void> {\n if (!processingThrottler) {\n return;\n }\n void processingThrottler.schedule(\n () => Coordinator.RenderCoordinator.RenderCoordinator.instance().read('processForLogging', process));\n}\n\nconst viewportRects = new Map<Document, DOMRect>();\nconst viewportRectFor = (element: Element): DOMRect => {\n const ownerDocument = element.ownerDocument;\n const viewportRect = viewportRects.get(ownerDocument) ||\n new DOMRect(0, 0, ownerDocument.defaultView?.innerWidth || 0, ownerDocument.defaultView?.innerHeight || 0);\n viewportRects.set(ownerDocument, viewportRect);\n return viewportRect;\n};\n\nasync function process(): Promise<void> {\n if (document.hidden) {\n return;\n }\n const startTime = performance.now();\n const {loggables, shadowRoots} = getDomState(documents);\n const visibleLoggables: Loggable[] = [];\n observeMutations(shadowRoots);\n\n for (const {element, parent} of loggables) {\n const loggingState = getOrCreateLoggingState(element, getLoggingConfig(element), parent);\n if (!loggingState.impressionLogged) {\n const overlap = visibleOverlap(element, viewportRectFor(element));\n const visibleSelectOption = element.tagName === 'OPTION' && loggingState.parent?.selectOpen;\n if (overlap || visibleSelectOption) {\n if (overlap) {\n loggingState.size = overlap;\n }\n visibleLoggables.push(element);\n loggingState.impressionLogged = true;\n }\n }\n if (!loggingState.processed) {\n const clickLikeHandler = (doubleClick: boolean) => (e: Event) => {\n const loggable = e.currentTarget as Element;\n logClick(clickLogThrottler)(loggable, e, {doubleClick});\n };\n if (loggingState.config.track?.click) {\n element.addEventListener('click', clickLikeHandler(false), {capture: true});\n element.addEventListener('auxclick', clickLikeHandler(false), {capture: true});\n element.addEventListener('contextmenu', clickLikeHandler(false), {capture: true});\n }\n if (loggingState.config.track?.dblclick) {\n element.addEventListener('dblclick', clickLikeHandler(true), {capture: true});\n }\n const trackHover = loggingState.config.track?.hover;\n if (trackHover) {\n element.addEventListener('mouseover', logHover(hoverLogThrottler), {capture: true});\n element.addEventListener(\n 'mouseout', () => hoverLogThrottler.schedule(cancelLogging, Common.Throttler.Scheduling.AsSoonAsPossible),\n {capture: true});\n }\n const trackDrag = loggingState.config.track?.drag;\n if (trackDrag) {\n element.addEventListener('pointerdown', onDragStart, {capture: true});\n document.addEventListener('pointerup', maybeCancelDrag, {capture: true});\n document.addEventListener('dragend', maybeCancelDrag, {capture: true});\n }\n if (loggingState.config.track?.change) {\n element.addEventListener('input', (event: Event) => {\n if (!(event instanceof InputEvent)) {\n return;\n }\n if (loggingState.lastInputEventType && loggingState.lastInputEventType !== event.inputType) {\n void logPendingChange(element);\n }\n loggingState.lastInputEventType = event.inputType;\n pendingChange.add(element);\n }, {capture: true});\n element.addEventListener('change', () => logPendingChange(element), {capture: true});\n element.addEventListener('focusout', () => {\n if (loggingState.lastInputEventType) {\n void logPendingChange(element);\n }\n }, {capture: true});\n }\n const trackKeyDown = loggingState.config.track?.keydown;\n if (trackKeyDown) {\n element.addEventListener('keydown', e => logKeyDown(keyboardLogThrottler)(e.currentTarget, e), {capture: true});\n }\n if (loggingState.config.track?.resize) {\n resizeObserver.observe(element);\n intersectionObserver.observe(element);\n }\n if (element.tagName === 'SELECT') {\n const onSelectOpen = (e: Event): void => {\n void logClick(clickLogThrottler)(element, e);\n if (loggingState.selectOpen) {\n return;\n }\n loggingState.selectOpen = true;\n void scheduleProcessing();\n };\n element.addEventListener('click', onSelectOpen, {capture: true});\n // Based on MenuListSelectType::ShouldOpenPopupForKey{Down,Press}Event\n element.addEventListener('keydown', event => {\n const e = event as KeyboardEvent;\n if ((Host.Platform.isMac() || e.altKey) && (e.code === 'ArrowDown' || e.code === 'ArrowUp') ||\n (!e.altKey && !e.ctrlKey && e.code === 'F4')) {\n onSelectOpen(event);\n }\n }, {capture: true});\n element.addEventListener('keypress', event => {\n const e = event as KeyboardEvent;\n if (e.key === ' ' || !Host.Platform.isMac() && e.key === '\\r') {\n onSelectOpen(event);\n }\n }, {capture: true});\n element.addEventListener('change', e => {\n for (const option of (element as HTMLSelectElement).selectedOptions) {\n if (getLoggingState(option)?.config.track?.click) {\n void logClick(clickLogThrottler)(option, e);\n }\n }\n }, {capture: true});\n }\n loggingState.processed = true;\n }\n processForDebugging(element);\n }\n for (const {loggable, config, parent} of getNonDomState().loggables) {\n const loggingState = getOrCreateLoggingState(loggable, config, parent);\n const visible = !parent || loggingState.parent?.impressionLogged;\n if (!visible) {\n continue;\n }\n processForDebugging(loggable);\n visibleLoggables.push(loggable);\n loggingState.impressionLogged = true;\n // No need to track loggable as soon as we've logged the impression\n // We can still log interaction events with a handle to a loggable\n unregisterLoggable(loggable);\n }\n if (visibleLoggables.length) {\n await yieldToInteractions();\n flushPendingChangeEvents();\n await logImpressions(visibleLoggables);\n }\n Host.userMetrics.visualLoggingProcessingDone(performance.now() - startTime);\n}\n\nfunction logPendingChange(element: Element): void {\n const loggingState = getLoggingState(element);\n if (!loggingState) {\n return;\n }\n void logChange(element);\n delete loggingState.lastInputEventType;\n pendingChange.delete(element);\n}\n\nasync function cancelLogging(): Promise<void> {\n}\n\nlet dragStartX = 0, dragStartY = 0;\n\nfunction onDragStart(event: Event): void {\n if (!(event instanceof MouseEvent)) {\n return;\n }\n dragStartX = event.screenX;\n dragStartY = event.screenY;\n void logDrag(dragLogThrottler)(event);\n}\n\nfunction maybeCancelDrag(event: Event): void {\n if (!(event instanceof MouseEvent)) {\n return;\n }\n if (Math.abs(event.screenX - dragStartX) >= DRAG_REPORT_THRESHOLD ||\n Math.abs(event.screenY - dragStartY) >= DRAG_REPORT_THRESHOLD) {\n return;\n }\n void dragLogThrottler.schedule(cancelLogging, Common.Throttler.Scheduling.AsSoonAsPossible);\n}\n\nfunction isAncestorOf(state1: LoggingState|null, state2: LoggingState|null): boolean {\n while (state2) {\n if (state2 === state1) {\n return true;\n }\n state2 = state2.parent;\n }\n return false;\n}\n\nasync function onResizeOrIntersection(entries: ResizeObserverEntry[]|IntersectionObserverEntry[]): Promise<void> {\n await Coordinator.RenderCoordinator.RenderCoordinator.instance().read('logResize', async () => {\n for (const entry of entries) {\n const element = entry.target;\n const loggingState = getLoggingState(element);\n const overlap = visibleOverlap(element, viewportRectFor(element)) || new DOMRect(0, 0, 0, 0);\n if (!loggingState?.size) {\n continue;\n }\n\n let hasPendingParent = false;\n for (const pendingElement of pendingResize.keys()) {\n if (pendingElement === element) {\n continue;\n }\n const pendingState = getLoggingState(pendingElement);\n if (isAncestorOf(pendingState, loggingState)) {\n hasPendingParent = true;\n break;\n }\n if (isAncestorOf(loggingState, pendingState)) {\n pendingResize.delete(pendingElement);\n }\n }\n if (hasPendingParent) {\n continue;\n }\n pendingResize.set(element, overlap);\n await resizeLogThrottler.schedule(async () => {});\n void resizeLogThrottler.schedule(async () => {\n if (pendingResize.size) {\n await yieldToInteractions();\n flushPendingChangeEvents();\n }\n for (const [element, overlap] of pendingResize.entries()) {\n const loggingState = getLoggingState(element);\n if (!loggingState) {\n continue;\n }\n if (Math.abs(overlap.width - loggingState.size.width) >= RESIZE_REPORT_THRESHOLD ||\n Math.abs(overlap.height - loggingState.size.height) >= RESIZE_REPORT_THRESHOLD) {\n logResize(element, overlap);\n }\n }\n pendingResize.clear();\n });\n }\n });\n}\n"]} \ No newline at end of file diff --git a/public/ui/visual_logging/LoggingDriver.test.js b/public/ui/visual_logging/LoggingDriver.test.js index 725f42ee2..1c26bd611 100644 --- a/public/ui/visual_logging/LoggingDriver.test.js +++ b/public/ui/visual_logging/LoggingDriver.test.js @@ -479,7 +479,8 @@ describe('LoggingDriver', () => { assert.isTrue(recordResize.calledOnce); assert.deepStrictEqual(recordResize.firstCall.firstArg, { veid: getVeId(element), width: 300, height: 300 }); }); - it('throttles resize per element', async () => { + // Flaky, to be rewritten + it.skip('[crbug.com/347520196] throttles resize per element', async () => { addLoggableElements(); const element1 = document.getElementById('element'); const element2 = element1.cloneNode(); diff --git a/public/ui/visual_logging/LoggingDriver.test.js.map b/public/ui/visual_logging/LoggingDriver.test.js.map index 42df3240a..be6440ef9 100644 --- a/public/ui/visual_logging/LoggingDriver.test.js.map +++ b/public/ui/visual_logging/LoggingDriver.test.js.map @@ -1 +1 @@ -{"version":3,"file":"LoggingDriver.test.js","sourceRoot":"","sources":["../../../../../../front_end/ui/visual_logging/LoggingDriver.test.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,EAAC,oBAAoB,EAAC,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAC,UAAU,EAAE,YAAY,EAAC,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAC,OAAO,EAAC,MAAM,uCAAuC,CAAC;AAE9D,OAAO,KAAK,oBAAoB,MAAM,6BAA6B,CAAC;AAEpE,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,IAAI,gBAAiC,CAAC;IACtC,IAAI,SAAqC,CAAC;IAC1C,IAAI,QAAyB,CAAC;IAC9B,IAAI,OAA4B,CAAC;IAEjC,MAAM,CAAC,GAAG,EAAE;QACV,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QACzB,MAAM,CAAC,OAAO,GAAG,CAAC,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE;YAC3D,IAAI,OAAO,KAAK,+DAA+D,IAAI,OAAO,EAAE,CAAC;gBAC3F,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;YACnE,CAAC;QACH,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,KAAK,CAAC,GAAG,EAAE;QACT,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC,C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IAAI,EAAE;QAC1E,mBAAmB,EAAE,CAAC;QACtB,MAAM,QAAQ,GAAG,EAAE,CAAC;QACpB,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC7C,oBAAoB,CAAC,WAAW,CAAC,gBAAgB,CAAC,QAAQ,EAAE,EAAC,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAC,EAAE,MAAM,CAAC,CAAC;QAC7F,MAAM,oBAAoB,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC;QACxD,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QAE3C,MAAM,CAAC,eAAe,CAAC,gBAAgB,CAAC,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE;YACtE,EAAC,EAAE,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAC;YACpG,EAAC,EAAE,EAAE,OAAO,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAC;SAC3D,CAAC,CAAC;QACH,MAAM,CAAC,WAAW,CACd,oBAAoB,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,SAAS,EAC3D,EAAC,QAAQ,EAAE,MAAM,EAAE,EAAC,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAC,EAAE,MAAM,EAAC,CAAC,CAAC;IAC3D,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 Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport {renderElementIntoDOM} from '../../testing/DOMHelpers.js';\nimport {expectCall, expectCalled} from '../../testing/ExpectStubCall.js';\nimport {getVeId} from '../../testing/VisualLoggingHelpers.js';\n\nimport * as VisualLoggingTesting from './visual_logging-testing.js';\n\ndescribe('LoggingDriver', () => {\n let recordImpression: sinon.SinonStub;\n let throttler: Common.Throttler.Throttler;\n let throttle: sinon.SinonStub;\n let onerror: OnErrorEventHandler;\n\n before(() => {\n onerror = window.onerror;\n window.onerror = (message, url, lineNumber, column, error) => {\n if (message !== 'ResizeObserver loop completed with undelivered notifications.' && onerror) {\n onerror.apply(window, [message, url, lineNumber, column, error]);\n }\n };\n });\n\n after(() => {\n window.onerror = onerror;\n });\n\n beforeEach(() => {\n throttler = new Common.Throttler.Throttler(1000000000);\n throttle = sinon.stub(throttler, 'schedule');\n recordImpression = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordImpression',\n );\n });\n\n afterEach(() => {\n VisualLoggingTesting.LoggingDriver.stopLogging();\n });\n\n function addLoggableElements() {\n const parent = document.createElement('div') as HTMLElement;\n parent.id = 'parent';\n parent.setAttribute('jslog', 'TreeItem; track: hover');\n parent.style.width = '300px';\n parent.style.height = '300px';\n const element = document.createElement('div') as HTMLElement;\n element.id = 'element';\n element.setAttribute('jslog', 'TreeItem; context:42; track: click, keydown, hover, drag, resize, change');\n element.style.width = '300px';\n element.style.height = '300px';\n parent.appendChild(element);\n renderElementIntoDOM(parent);\n }\n\n it('logs impressions on startLogging', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging();\n assert.isTrue(recordImpression.calledOnce);\n assert.sameDeepMembers(recordImpression.firstCall.firstArg.impressions, [\n {id: getVeId('#element'), type: 1, context: 42, parent: getVeId('#parent'), width: 300, height: 300},\n {id: getVeId('#parent'), type: 1, width: 300, height: 300},\n ]);\n });\n\n async function assertImpressionRecordedDeferred() {\n const [work] = await expectCalled(throttle);\n assert.isFalse(recordImpression.called);\n\n await work();\n assert.isTrue(recordImpression.called);\n }\n\n it('does not log impressions when hidden', async () => {\n addLoggableElements();\n sinon.stub(document, 'hidden').value(true);\n await VisualLoggingTesting.LoggingDriver.startLogging({processingThrottler: throttler});\n assert.isFalse(recordImpression.called);\n });\n\n it('logs impressions when visibility changes', async () => {\n let hidden = true;\n addLoggableElements();\n sinon.stub(document, 'hidden').get(() => hidden);\n await VisualLoggingTesting.LoggingDriver.startLogging({processingThrottler: throttler});\n\n hidden = false;\n const event = document.createEvent('Event');\n event.initEvent('visibilitychange', true, true);\n document.dispatchEvent(event);\n\n await assertImpressionRecordedDeferred();\n });\n\n it('logs impressions on scroll', async () => {\n addLoggableElements();\n const parent = document.getElementById('parent') as HTMLElement;\n parent.style.marginTop = '2000px';\n await VisualLoggingTesting.LoggingDriver.startLogging({processingThrottler: throttler});\n\n const scrollend = sinon.stub();\n window.addEventListener('scrollend', scrollend);\n window.scrollTo({\n top: 2000,\n left: 0,\n behavior: 'instant',\n });\n await expectCalled(scrollend);\n await assertImpressionRecordedDeferred();\n\n scrollend.resetHistory();\n window.scrollTo({\n top: 0,\n left: 0,\n behavior: 'instant',\n });\n await expectCalled(scrollend);\n });\n\n it('logs impressions on mutation', async () => {\n await VisualLoggingTesting.LoggingDriver.startLogging({processingThrottler: throttler});\n addLoggableElements();\n await assertImpressionRecordedDeferred();\n });\n\n it('logs impressions on mutation in shadow DOM', async () => {\n const parent = document.createElement('div') as HTMLElement;\n renderElementIntoDOM(parent);\n const shadow = parent.attachShadow({mode: 'open'});\n const shadowContent = document.createElement('div');\n shadow.appendChild(shadowContent);\n\n await VisualLoggingTesting.LoggingDriver.startLogging({processingThrottler: throttler});\n shadowContent.innerHTML = '<div jslog=\"TreeItem\" style=\"width:300px;height:300px\"></div>';\n await assertImpressionRecordedDeferred();\n });\n\n it('logs impressions on mutation in additional document', async () => {\n const iframe = document.createElement('iframe') as HTMLIFrameElement;\n renderElementIntoDOM(iframe);\n\n await VisualLoggingTesting.LoggingDriver.startLogging({processingThrottler: throttler});\n const iframeDocument = iframe.contentDocument;\n assert.exists(iframeDocument);\n await VisualLoggingTesting.LoggingDriver.addDocument(iframeDocument);\n iframeDocument.body.innerHTML = '<div jslog=\"TreeItem\" style=\"width:300px;height:300px\"></div>';\n await assertImpressionRecordedDeferred();\n });\n\n it('correctly determines visibility in additional document', async () => {\n const iframe = document.createElement('iframe') as HTMLIFrameElement;\n renderElementIntoDOM(iframe);\n iframe.style.width = '100px';\n iframe.style.height = '100px';\n iframe.width = '100';\n iframe.height = '100';\n const iframeDocument = iframe.contentDocument;\n assert.exists(iframeDocument);\n iframeDocument.body.innerHTML = // Second div should not be out of viewport and not logged\n `<div style=\"width:150px;height:150px\"></div>\n <div jslog=\"TreeItem\" style=\"width:150px;height:150px\"></div>`;\n\n await VisualLoggingTesting.LoggingDriver.startLogging({processingThrottler: throttler});\n await VisualLoggingTesting.LoggingDriver.addDocument(iframeDocument);\n assert.isFalse(recordImpression.called);\n });\n\n it('hashes a string context', async () => {\n const element = document.createElement('div') as HTMLElement;\n element.setAttribute('jslog', 'TreeItem; track: hover; context: foobar');\n element.style.width = '300px';\n element.style.height = '300px';\n renderElementIntoDOM(element);\n\n await VisualLoggingTesting.LoggingDriver.startLogging();\n assert.isTrue(recordImpression.calledOnce);\n assert.strictEqual(recordImpression.firstCall.firstArg.impressions[0]?.context, -103332984);\n });\n\n it('logs clicks', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging();\n const recordClick = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordClick',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.click();\n\n await expectCalled(recordClick);\n });\n\n it('logs right clicks', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging();\n const recordClick = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordClick',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new MouseEvent('contextmenu'));\n\n await expectCalled(recordClick);\n });\n\n it('logs middle clicks', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging();\n const recordClick = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordClick',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new MouseEvent('auxclick'));\n\n await expectCalled(recordClick);\n });\n\n it('does not log clicks if not configured', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging();\n const recordClick = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordClick',\n );\n\n const parent = document.getElementById('parent') as HTMLElement;\n parent.click();\n\n await new Promise(resolve => setTimeout(resolve, 0));\n assert.isFalse(recordClick.called);\n });\n\n it('does not log click on double click', async () => {\n addLoggableElements();\n const element = document.getElementById('element') as HTMLElement;\n element.setAttribute('jslog', 'TreeItem; context:42; track: click, dblclick');\n await VisualLoggingTesting.LoggingDriver.startLogging({clickLogThrottler: throttler});\n const recordClick = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordClick',\n );\n\n element.dispatchEvent(new MouseEvent('click'));\n element.dispatchEvent(new MouseEvent('dblclick'));\n const [logging] = await expectCalled(throttle);\n assert.isTrue(throttle.calledTwice);\n assert.isFalse(recordClick.called);\n\n await logging();\n assert.isTrue(recordClick.calledOnce);\n assert.isTrue(recordClick.firstCall.firstArg.doubleClick);\n });\n\n it('does not log click on parent when clicked on child', async () => {\n addLoggableElements();\n const parent = document.getElementById('parent') as HTMLElement;\n parent.setAttribute('jslog', 'TreeItem; track: click');\n await VisualLoggingTesting.LoggingDriver.startLogging({clickLogThrottler: throttler});\n const recordClick = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordClick',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.click();\n const [logging] = await expectCalled(throttle);\n assert.isFalse(recordClick.called);\n\n await logging();\n assert.isTrue(recordClick.calledOnce);\n assert.strictEqual(recordClick.firstCall.firstArg.veid, getVeId(element));\n });\n\n const logsSelectOptions = (event: Event) => async () => {\n const parent = document.createElement('div') as HTMLElement;\n parent.innerHTML = `\n <select jslog=\"TreeItem; context: 0\" id=\"select\" style=\"width: 30px; height: 20px\">\n <option jslog=\"TreeItem; context: 1\">1</option>\n <option jslog=\"TreeItem; context: 2\">2</option>\n </select>`;\n renderElementIntoDOM(parent);\n const select = document.getElementById('select')!;\n const recordClick = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordClick',\n );\n\n await VisualLoggingTesting.LoggingDriver.startLogging(\n {processingThrottler: throttler, clickLogThrottler: throttler});\n\n assert.isTrue(recordImpression.calledOnce);\n const impressions = recordImpression.firstCall.firstArg.impressions;\n assert.sameDeepMembers(impressions, [\n {id: getVeId(select), type: 1, width: 30, height: 20, context: 0},\n ]);\n\n recordImpression.resetHistory();\n\n throttle.callsArg(0);\n select.dispatchEvent(event);\n\n await expectCalled(recordClick);\n assert.isTrue(recordClick.calledOnce);\n assert.strictEqual(recordClick.firstCall.firstArg.veid, getVeId(select));\n\n await expectCalled(recordImpression);\n assert.isTrue(recordImpression.calledOnce);\n assert.sameDeepMembers(recordImpression.firstCall.firstArg.impressions, [\n {id: getVeId('option:first-child'), type: 1, parent: getVeId(select), context: 1, width: 0, height: 0},\n {id: getVeId('option:last-child'), type: 1, parent: getVeId(select), context: 2, width: 0, height: 0},\n ]);\n };\n\n it('logs impressions on select options on click', logsSelectOptions(new MouseEvent('click')));\n it('logs impressions on select options on space press', logsSelectOptions(new KeyboardEvent('keypress', {key: ' '})));\n it('logs impressions on select options on F4', logsSelectOptions(new KeyboardEvent('keydown', {code: 'F4'})));\n\n it('logs option click on select change', async () => {\n const parent = document.createElement('div') as HTMLElement;\n parent.innerHTML = `\n <select jslog=\"TreeItem; context: 0\" id=\"select\">\n <option jslog=\"TreeItem; context: 1; track: click\">1</option>\n <option jslog=\"TreeItem; context: 2; track: click\">2</option>\n </select>`;\n renderElementIntoDOM(parent);\n\n await VisualLoggingTesting.LoggingDriver.startLogging({clickLogThrottler: throttler});\n const recordClick = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordClick',\n );\n\n const select = document.getElementById('select') as HTMLSelectElement;\n assert.exists(select);\n select.selectedIndex = 1;\n select.dispatchEvent(new Event('change'));\n await expectCalled(throttle).then(([logging]) => logging());\n\n assert.isTrue(recordClick.calledOnce);\n assert.deepStrictEqual(\n recordClick.firstCall.firstArg, {veid: getVeId(select.selectedOptions[0]), doubleClick: false});\n });\n\n it('logs keydown', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({keyboardLogThrottler: throttler});\n const recordKeyDown = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordKeyDown',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new KeyboardEvent('keydown', {key: 'a'}));\n element.dispatchEvent(new KeyboardEvent('keydown', {key: 'b'}));\n const [logging] = await expectCalled(throttle);\n assert.isTrue(throttle.calledTwice);\n assert.isFalse(recordKeyDown.called);\n\n await logging();\n assert.isTrue(recordKeyDown.calledOnce);\n });\n\n it('logs keydown for specific codes', async () => {\n addLoggableElements();\n\n const element = document.getElementById('element') as HTMLElement;\n element.setAttribute('jslog', 'TreeItem; context:42; track: keydown: KeyA|KeyB');\n await VisualLoggingTesting.LoggingDriver.startLogging({keyboardLogThrottler: throttler});\n const recordKeyDown = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordKeyDown',\n );\n\n element.dispatchEvent(new KeyboardEvent('keydown', {code: 'KeyC'}));\n await new Promise(resolve => setTimeout(resolve, 0));\n assert.isFalse(throttle.called);\n\n element.dispatchEvent(new KeyboardEvent('keydown', {code: 'KeyA'}));\n let [logging] = await expectCalled(throttle);\n assert.isFalse(recordKeyDown.called);\n await logging();\n assert.isTrue(recordKeyDown.calledOnce);\n\n recordKeyDown.resetHistory();\n\n element.dispatchEvent(new KeyboardEvent('keydown', {code: 'KeyB'}));\n [logging] = await expectCalled(throttle);\n assert.isFalse(recordKeyDown.called);\n await logging();\n assert.isTrue(recordKeyDown.calledOnce);\n });\n\n it('logs change', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging();\n const recordChange = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordChange',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new Event('change'));\n assert.isTrue(recordChange.calledOnce);\n });\n\n it('logs change for each input type', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging();\n const recordChange = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordChange',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new InputEvent('input', {inputType: 'insertText'}));\n await new Promise(resolve => setTimeout(resolve, 0));\n assert.isFalse(recordChange.called);\n element.dispatchEvent(new InputEvent('input', {inputType: 'insertText'}));\n await new Promise(resolve => setTimeout(resolve, 0));\n assert.isFalse(recordChange.called);\n\n let logging = expectCalled(recordChange);\n element.dispatchEvent(new InputEvent('input', {inputType: 'inserFromPaste'}));\n await logging;\n\n logging = expectCalled(recordChange);\n element.dispatchEvent(new InputEvent('input', {inputType: 'inserFromDrop'}));\n await logging;\n logging = expectCalled(recordChange);\n element.dispatchEvent(new Event('change'));\n await logging;\n });\n\n it('logs change on focus out after input', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging();\n const recordChange = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordChange',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new InputEvent('input', {inputType: 'insertText'}));\n element.dispatchEvent(new Event('focusout'));\n await expectCalled(recordChange);\n });\n\n it('logs change on new impressions', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({processingThrottler: throttler});\n const recordChange = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordChange',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n const parent = document.getElementById('parent') as HTMLElement;\n element.dispatchEvent(new InputEvent('input', {inputType: 'insertText'}));\n throttle.callsArg(0);\n parent.appendChild(element.cloneNode());\n await expectCalled(recordChange);\n });\n\n it('logs change on resize', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({resizeLogThrottler: throttler});\n const recordChange = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordChange',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new InputEvent('input', {inputType: 'insertText'}));\n throttle.callsArg(0);\n element.style.width = '400px';\n await expectCalled(recordChange);\n });\n\n it('does not log change on focus out without input', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging();\n const recordChange = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordChange',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new Event('focusout'));\n await new Promise(resolve => setTimeout(resolve, 0));\n assert.isFalse(recordChange.calledOnce);\n });\n\n it('logs hover', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({hoverLogThrottler: throttler});\n const recordHover = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordHover',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new MouseEvent('mouseover'));\n const [logging] = await expectCall(throttle);\n assert.isFalse(recordHover.called);\n await logging();\n assert.isTrue(recordHover.calledOnce);\n });\n\n it('does not log hover if too short', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({hoverLogThrottler: throttler});\n const recordHover = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordHover',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new MouseEvent('mouseover'));\n await expectCall(throttle);\n assert.isFalse(recordHover.called);\n element.dispatchEvent(new MouseEvent('mouseout'));\n await expectCalled(throttle).then(([work]) => work());\n assert.isFalse(recordHover.called);\n });\n\n it('does not log hover if in descendent', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({hoverLogThrottler: throttler});\n const recordHover = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordHover',\n );\n\n const parent = document.getElementById('parent') as HTMLElement;\n const element = document.getElementById('element') as HTMLElement;\n parent.dispatchEvent(new MouseEvent('mouseover'));\n await expectCall(throttle);\n\n element.dispatchEvent(new MouseEvent('mouseover'));\n await expectCall(throttle).then(([work]) => work());\n assert.isTrue(recordHover.called);\n assert.deepStrictEqual(recordHover.firstCall.firstArg, {veid: getVeId(parent)});\n });\n\n it('logs drag', async () => {\n const dragLogThrottler = new Common.Throttler.Throttler(1000000000);\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({dragLogThrottler});\n const recordDrag = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordDrag',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new MouseEvent('pointerdown'));\n assert.exists(dragLogThrottler.process);\n assert.isFalse(recordDrag.called);\n\n await dragLogThrottler.schedule(async () => {}, Common.Throttler.Scheduling.AsSoonAsPossible);\n await dragLogThrottler.process?.();\n assert.isTrue(recordDrag.called);\n assert.isTrue(recordDrag.calledOnce);\n });\n\n it('does not log drag if too short in time', async () => {\n const dragLogThrottler = new Common.Throttler.Throttler(1000000000);\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({dragLogThrottler});\n const recordDrag = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordDrag',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new MouseEvent('pointerdown'));\n assert.exists(dragLogThrottler.process);\n assert.isFalse(recordDrag.called);\n\n element.dispatchEvent(new MouseEvent('pointerup'));\n\n await dragLogThrottler.process?.();\n assert.isFalse(recordDrag.called);\n });\n\n it('logs drag if short in time but long in distance', async () => {\n const dragLogThrottler = new Common.Throttler.Throttler(1000000000);\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({dragLogThrottler});\n const recordDrag = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordDrag',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new MouseEvent('pointerdown', {screenX: 0, screenY: 0}));\n assert.exists(dragLogThrottler.process);\n assert.isFalse(recordDrag.called);\n\n element.dispatchEvent(new MouseEvent('pointerup', {screenX: 100, screenY: 100}));\n\n await dragLogThrottler.process?.();\n assert.isFalse(recordDrag.called);\n });\n\n it('logs resize', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({resizeLogThrottler: throttler});\n const recordResize = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordResize',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n\n element.style.height = '400px';\n const [logging] = await expectCall(throttle, {callCount: 2});\n assert.isFalse(recordResize.called);\n await logging();\n assert.isTrue(recordResize.calledOnce);\n });\n\n it('does not log resize if too small', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({resizeLogThrottler: throttler});\n const recordResize = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordResize',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.style.height = '301px';\n assert.isFalse(recordResize.called);\n });\n\n it('logs resize on visibility change', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({resizeLogThrottler: throttler});\n const recordResize = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordResize',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n\n element.style.display = 'none';\n const [logging] = await expectCall(throttle, {callCount: 2});\n assert.isFalse(recordResize.called);\n\n logging();\n await expectCalled(recordResize);\n assert.isTrue(recordResize.calledOnce);\n assert.deepStrictEqual(recordResize.firstCall.firstArg, {veid: getVeId(element), width: 0, height: 0});\n\n recordResize.resetHistory();\n\n element.style.display = 'block';\n assert.isFalse(recordResize.called);\n throttle.callsArg(0);\n\n await expectCall(recordResize);\n assert.isTrue(recordResize.calledOnce);\n assert.deepStrictEqual(recordResize.firstCall.firstArg, {veid: getVeId(element), width: 300, height: 300});\n });\n\n it('throttles resize per element', async () => {\n addLoggableElements();\n const element1 = document.getElementById('element') as HTMLElement;\n const element2 = element1.cloneNode() as HTMLElement;\n document.getElementById('parent')?.appendChild(element2);\n await VisualLoggingTesting.LoggingDriver.startLogging({resizeLogThrottler: throttler});\n const recordResize = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordResize',\n );\n\n element1.style.height = '200px';\n await expectCall(throttle, {callCount: 2});\n element2.style.height = '200px';\n await expectCall(throttle, {callCount: 2});\n element1.style.height = '100px';\n await expectCall(throttle, {callCount: 2});\n element2.style.height = '100px';\n const [work] = await expectCall(throttle, {callCount: 2});\n\n assert.isFalse(recordResize.called);\n await work();\n assert.isTrue(recordResize.calledTwice);\n assert.strictEqual(recordResize.firstCall.firstArg.height, 100);\n assert.strictEqual(recordResize.lastCall.firstArg.height, 100);\n assert.notStrictEqual(recordResize.firstCall.firstArg.veid, recordResize.lastCall.firstArg.veid);\n });\n\n it('only logs resize of the outer element', async () => {\n addLoggableElements();\n const element = document.getElementById('element') as HTMLElement;\n const child = document.createElement('div');\n child.setAttribute('jslog', 'TreeItem; track: resize');\n child.style.width = '100%';\n child.style.height = '100%';\n element.appendChild(child);\n\n await VisualLoggingTesting.LoggingDriver.startLogging({resizeLogThrottler: throttler});\n const recordResize = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordResize',\n );\n\n element.style.width = '400px';\n const [work] = await expectCall(throttle, {callCount: 2});\n\n assert.isFalse(recordResize.called);\n await work();\n assert.isTrue(recordResize.calledOnce);\n assert.deepStrictEqual(recordResize.firstCall.firstArg, {veid: getVeId(element), width: 400, height: 300});\n });\n\n it('does not log resize intial impressions due to visibility change', async () => {\n addLoggableElements();\n const element = document.getElementById('element') as HTMLElement;\n element.style.display = 'none';\n\n await VisualLoggingTesting.LoggingDriver.startLogging(\n {processingThrottler: throttler, resizeLogThrottler: throttler});\n const recordResize = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordResize',\n );\n recordImpression.resetHistory();\n\n element.style.display = 'block';\n await expectCalled(throttle).then(([work]) => work());\n assert.isTrue(throttle.calledOnce);\n assert.isTrue(recordImpression.calledOnce);\n assert.isFalse(recordResize.called);\n\n await new Promise(resolve => setTimeout(resolve, 0));\n assert.isFalse(recordResize.called);\n });\n\n it('properly handles the switch between visible elements', async () => {\n addLoggableElements();\n const element1 = document.getElementById('element') as HTMLElement;\n const child = document.createElement('div');\n child.id = 'child';\n child.setAttribute('jslog', 'TreeItem; track: resize');\n child.style.width = '100%';\n child.style.height = '100%';\n element1.appendChild(child);\n\n const element2 = element1.cloneNode(/* deep=*/ true) as HTMLElement;\n element2.id = 'element2';\n document.getElementById('parent')?.appendChild(element2);\n\n // First ensure both top level elements have impressions logged\n await VisualLoggingTesting.LoggingDriver.startLogging({resizeLogThrottler: throttler});\n const recordResize = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordResize',\n );\n\n // Now hide one and wait for logging to finish\n throttle.callsArg(0);\n element2.style.display = 'none';\n await expectCalled(recordResize, {callCount: 2});\n throttle.reset();\n recordResize.reset();\n\n // Now the actual test: hiding one element and show the other one\n element1.style.display = 'none';\n element2.style.display = 'block';\n // Throttler is called by both resize and intersection observer for each element\n await expectCalled(throttle, {callCount: 4}).then(([work]) => work());\n\n assert.isTrue(recordResize.calledTwice);\n assert.sameDeepMembers(recordResize.getCalls().map(c => c.firstArg), [\n {veid: VisualLoggingTesting.LoggingState.getLoggingState(element1)?.veid, width: 0, height: 0},\n {veid: VisualLoggingTesting.LoggingState.getLoggingState(element2)?.veid, width: 300, height: 300},\n ]);\n });\n\n it('logs resize when removed from DOM', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({resizeLogThrottler: throttler});\n const recordResize = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordResize',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n const parent = document.getElementById('parent') as HTMLElement;\n\n parent.removeChild(element);\n const [logging] = await expectCall(throttle, {callCount: 2});\n assert.isFalse(recordResize.called);\n\n await logging();\n assert.isTrue(recordResize.calledOnce);\n assert.deepStrictEqual(recordResize.firstCall.firstArg, {veid: getVeId(element), width: 0, height: 0});\n });\n\n it('logs interactions before impressions and resize', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({resizeLogThrottler: throttler});\n const recordResize = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordResize',\n );\n const recordClick = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordClick',\n );\n const recordKeyDown = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordKeyDown',\n );\n recordImpression.resetHistory();\n\n const element = document.getElementById('element') as HTMLElement;\n const parent = document.getElementById('parent') as HTMLElement;\n\n parent.removeChild(element);\n parent.appendChild(element.cloneNode());\n element.click();\n element.dispatchEvent(new KeyboardEvent('keydown', {key: 'a'}));\n throttle.callsArg(0);\n\n await Promise.all([\n expectCalled(recordImpression),\n expectCalled(recordResize),\n expectCalled(recordClick),\n expectCalled(recordKeyDown),\n ]);\n assert.isTrue(recordClick.calledBefore(recordImpression));\n assert.isTrue(recordClick.calledBefore(recordResize));\n assert.isTrue(recordKeyDown.calledBefore(recordImpression));\n assert.isTrue(recordKeyDown.calledBefore(recordResize));\n });\n\n it('logs non-DOM impressions', async () => {\n addLoggableElements();\n const loggable = {};\n const parent = document.getElementById('parent')!;\n VisualLoggingTesting.NonDomState.registerLoggable(loggable, {ve: 1, context: '123'}, parent);\n await VisualLoggingTesting.LoggingDriver.startLogging();\n assert.isTrue(recordImpression.calledOnce);\n\n assert.sameDeepMembers(recordImpression.firstCall.firstArg.impressions, [\n {id: getVeId(loggable), type: 1, context: 123, parent: getVeId(parent), width: 0, height: 0},\n {id: getVeId('#element'), type: 1, context: 42, parent: getVeId(parent), width: 300, height: 300},\n {id: getVeId(parent), type: 1, width: 300, height: 300},\n ]);\n assert.isEmpty(VisualLoggingTesting.NonDomState.getNonDomState().loggables);\n });\n\n it('logs root non-DOM impressions', async () => {\n addLoggableElements();\n const loggable = {};\n VisualLoggingTesting.NonDomState.registerLoggable(loggable, {ve: 1, context: '123'}, undefined);\n await VisualLoggingTesting.LoggingDriver.startLogging();\n assert.isTrue(recordImpression.calledOnce);\n\n assert.sameDeepMembers(recordImpression.firstCall.firstArg.impressions, [\n {id: getVeId(loggable), type: 1, context: 123, width: 0, height: 0},\n {id: getVeId('#element'), type: 1, context: 42, parent: getVeId('#parent'), width: 300, height: 300},\n {id: getVeId('#parent'), type: 1, width: 300, height: 300},\n ]);\n assert.isEmpty(VisualLoggingTesting.NonDomState.getNonDomState().loggables);\n });\n\n it('postpones logging non-DOM impressions with detached parent', async () => {\n addLoggableElements();\n const loggable = {};\n const parent = document.createElement('div');\n VisualLoggingTesting.NonDomState.registerLoggable(loggable, {ve: 1, context: '123'}, parent);\n await VisualLoggingTesting.LoggingDriver.startLogging();\n assert.isTrue(recordImpression.calledOnce);\n\n assert.sameDeepMembers(recordImpression.firstCall.firstArg.impressions, [\n {id: getVeId('#element'), type: 1, context: 42, parent: getVeId('#parent'), width: 300, height: 300},\n {id: getVeId('#parent'), type: 1, width: 300, height: 300},\n ]);\n assert.deepInclude(\n VisualLoggingTesting.NonDomState.getNonDomState().loggables,\n {loggable, config: {ve: 1, context: '123'}, parent});\n });\n});\n"]} \ No newline at end of file +{"version":3,"file":"LoggingD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,CAAC;QAC7C,oBAAoB,CAAC,WAAW,CAAC,gBAAgB,CAAC,QAAQ,EAAE,EAAC,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAC,EAAE,MAAM,CAAC,CAAC;QAC7F,MAAM,oBAAoB,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC;QACxD,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QAE3C,MAAM,CAAC,eAAe,CAAC,gBAAgB,CAAC,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE;YACtE,EAAC,EAAE,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAC;YACpG,EAAC,EAAE,EAAE,OAAO,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAC;SAC3D,CAAC,CAAC;QACH,MAAM,CAAC,WAAW,CACd,oBAAoB,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,SAAS,EAC3D,EAAC,QAAQ,EAAE,MAAM,EAAE,EAAC,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAC,EAAE,MAAM,EAAC,CAAC,CAAC;IAC3D,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 Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport {renderElementIntoDOM} from '../../testing/DOMHelpers.js';\nimport {expectCall, expectCalled} from '../../testing/ExpectStubCall.js';\nimport {getVeId} from '../../testing/VisualLoggingHelpers.js';\n\nimport * as VisualLoggingTesting from './visual_logging-testing.js';\n\ndescribe('LoggingDriver', () => {\n let recordImpression: sinon.SinonStub;\n let throttler: Common.Throttler.Throttler;\n let throttle: sinon.SinonStub;\n let onerror: OnErrorEventHandler;\n\n before(() => {\n onerror = window.onerror;\n window.onerror = (message, url, lineNumber, column, error) => {\n if (message !== 'ResizeObserver loop completed with undelivered notifications.' && onerror) {\n onerror.apply(window, [message, url, lineNumber, column, error]);\n }\n };\n });\n\n after(() => {\n window.onerror = onerror;\n });\n\n beforeEach(() => {\n throttler = new Common.Throttler.Throttler(1000000000);\n throttle = sinon.stub(throttler, 'schedule');\n recordImpression = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordImpression',\n );\n });\n\n afterEach(() => {\n VisualLoggingTesting.LoggingDriver.stopLogging();\n });\n\n function addLoggableElements() {\n const parent = document.createElement('div') as HTMLElement;\n parent.id = 'parent';\n parent.setAttribute('jslog', 'TreeItem; track: hover');\n parent.style.width = '300px';\n parent.style.height = '300px';\n const element = document.createElement('div') as HTMLElement;\n element.id = 'element';\n element.setAttribute('jslog', 'TreeItem; context:42; track: click, keydown, hover, drag, resize, change');\n element.style.width = '300px';\n element.style.height = '300px';\n parent.appendChild(element);\n renderElementIntoDOM(parent);\n }\n\n it('logs impressions on startLogging', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging();\n assert.isTrue(recordImpression.calledOnce);\n assert.sameDeepMembers(recordImpression.firstCall.firstArg.impressions, [\n {id: getVeId('#element'), type: 1, context: 42, parent: getVeId('#parent'), width: 300, height: 300},\n {id: getVeId('#parent'), type: 1, width: 300, height: 300},\n ]);\n });\n\n async function assertImpressionRecordedDeferred() {\n const [work] = await expectCalled(throttle);\n assert.isFalse(recordImpression.called);\n\n await work();\n assert.isTrue(recordImpression.called);\n }\n\n it('does not log impressions when hidden', async () => {\n addLoggableElements();\n sinon.stub(document, 'hidden').value(true);\n await VisualLoggingTesting.LoggingDriver.startLogging({processingThrottler: throttler});\n assert.isFalse(recordImpression.called);\n });\n\n it('logs impressions when visibility changes', async () => {\n let hidden = true;\n addLoggableElements();\n sinon.stub(document, 'hidden').get(() => hidden);\n await VisualLoggingTesting.LoggingDriver.startLogging({processingThrottler: throttler});\n\n hidden = false;\n const event = document.createEvent('Event');\n event.initEvent('visibilitychange', true, true);\n document.dispatchEvent(event);\n\n await assertImpressionRecordedDeferred();\n });\n\n it('logs impressions on scroll', async () => {\n addLoggableElements();\n const parent = document.getElementById('parent') as HTMLElement;\n parent.style.marginTop = '2000px';\n await VisualLoggingTesting.LoggingDriver.startLogging({processingThrottler: throttler});\n\n const scrollend = sinon.stub();\n window.addEventListener('scrollend', scrollend);\n window.scrollTo({\n top: 2000,\n left: 0,\n behavior: 'instant',\n });\n await expectCalled(scrollend);\n await assertImpressionRecordedDeferred();\n\n scrollend.resetHistory();\n window.scrollTo({\n top: 0,\n left: 0,\n behavior: 'instant',\n });\n await expectCalled(scrollend);\n });\n\n it('logs impressions on mutation', async () => {\n await VisualLoggingTesting.LoggingDriver.startLogging({processingThrottler: throttler});\n addLoggableElements();\n await assertImpressionRecordedDeferred();\n });\n\n it('logs impressions on mutation in shadow DOM', async () => {\n const parent = document.createElement('div') as HTMLElement;\n renderElementIntoDOM(parent);\n const shadow = parent.attachShadow({mode: 'open'});\n const shadowContent = document.createElement('div');\n shadow.appendChild(shadowContent);\n\n await VisualLoggingTesting.LoggingDriver.startLogging({processingThrottler: throttler});\n shadowContent.innerHTML = '<div jslog=\"TreeItem\" style=\"width:300px;height:300px\"></div>';\n await assertImpressionRecordedDeferred();\n });\n\n it('logs impressions on mutation in additional document', async () => {\n const iframe = document.createElement('iframe') as HTMLIFrameElement;\n renderElementIntoDOM(iframe);\n\n await VisualLoggingTesting.LoggingDriver.startLogging({processingThrottler: throttler});\n const iframeDocument = iframe.contentDocument;\n assert.exists(iframeDocument);\n await VisualLoggingTesting.LoggingDriver.addDocument(iframeDocument);\n iframeDocument.body.innerHTML = '<div jslog=\"TreeItem\" style=\"width:300px;height:300px\"></div>';\n await assertImpressionRecordedDeferred();\n });\n\n it('correctly determines visibility in additional document', async () => {\n const iframe = document.createElement('iframe') as HTMLIFrameElement;\n renderElementIntoDOM(iframe);\n iframe.style.width = '100px';\n iframe.style.height = '100px';\n iframe.width = '100';\n iframe.height = '100';\n const iframeDocument = iframe.contentDocument;\n assert.exists(iframeDocument);\n iframeDocument.body.innerHTML = // Second div should not be out of viewport and not logged\n `<div style=\"width:150px;height:150px\"></div>\n <div jslog=\"TreeItem\" style=\"width:150px;height:150px\"></div>`;\n\n await VisualLoggingTesting.LoggingDriver.startLogging({processingThrottler: throttler});\n await VisualLoggingTesting.LoggingDriver.addDocument(iframeDocument);\n assert.isFalse(recordImpression.called);\n });\n\n it('hashes a string context', async () => {\n const element = document.createElement('div') as HTMLElement;\n element.setAttribute('jslog', 'TreeItem; track: hover; context: foobar');\n element.style.width = '300px';\n element.style.height = '300px';\n renderElementIntoDOM(element);\n\n await VisualLoggingTesting.LoggingDriver.startLogging();\n assert.isTrue(recordImpression.calledOnce);\n assert.strictEqual(recordImpression.firstCall.firstArg.impressions[0]?.context, -103332984);\n });\n\n it('logs clicks', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging();\n const recordClick = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordClick',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.click();\n\n await expectCalled(recordClick);\n });\n\n it('logs right clicks', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging();\n const recordClick = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordClick',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new MouseEvent('contextmenu'));\n\n await expectCalled(recordClick);\n });\n\n it('logs middle clicks', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging();\n const recordClick = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordClick',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new MouseEvent('auxclick'));\n\n await expectCalled(recordClick);\n });\n\n it('does not log clicks if not configured', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging();\n const recordClick = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordClick',\n );\n\n const parent = document.getElementById('parent') as HTMLElement;\n parent.click();\n\n await new Promise(resolve => setTimeout(resolve, 0));\n assert.isFalse(recordClick.called);\n });\n\n it('does not log click on double click', async () => {\n addLoggableElements();\n const element = document.getElementById('element') as HTMLElement;\n element.setAttribute('jslog', 'TreeItem; context:42; track: click, dblclick');\n await VisualLoggingTesting.LoggingDriver.startLogging({clickLogThrottler: throttler});\n const recordClick = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordClick',\n );\n\n element.dispatchEvent(new MouseEvent('click'));\n element.dispatchEvent(new MouseEvent('dblclick'));\n const [logging] = await expectCalled(throttle);\n assert.isTrue(throttle.calledTwice);\n assert.isFalse(recordClick.called);\n\n await logging();\n assert.isTrue(recordClick.calledOnce);\n assert.isTrue(recordClick.firstCall.firstArg.doubleClick);\n });\n\n it('does not log click on parent when clicked on child', async () => {\n addLoggableElements();\n const parent = document.getElementById('parent') as HTMLElement;\n parent.setAttribute('jslog', 'TreeItem; track: click');\n await VisualLoggingTesting.LoggingDriver.startLogging({clickLogThrottler: throttler});\n const recordClick = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordClick',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.click();\n const [logging] = await expectCalled(throttle);\n assert.isFalse(recordClick.called);\n\n await logging();\n assert.isTrue(recordClick.calledOnce);\n assert.strictEqual(recordClick.firstCall.firstArg.veid, getVeId(element));\n });\n\n const logsSelectOptions = (event: Event) => async () => {\n const parent = document.createElement('div') as HTMLElement;\n parent.innerHTML = `\n <select jslog=\"TreeItem; context: 0\" id=\"select\" style=\"width: 30px; height: 20px\">\n <option jslog=\"TreeItem; context: 1\">1</option>\n <option jslog=\"TreeItem; context: 2\">2</option>\n </select>`;\n renderElementIntoDOM(parent);\n const select = document.getElementById('select')!;\n const recordClick = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordClick',\n );\n\n await VisualLoggingTesting.LoggingDriver.startLogging(\n {processingThrottler: throttler, clickLogThrottler: throttler});\n\n assert.isTrue(recordImpression.calledOnce);\n const impressions = recordImpression.firstCall.firstArg.impressions;\n assert.sameDeepMembers(impressions, [\n {id: getVeId(select), type: 1, width: 30, height: 20, context: 0},\n ]);\n\n recordImpression.resetHistory();\n\n throttle.callsArg(0);\n select.dispatchEvent(event);\n\n await expectCalled(recordClick);\n assert.isTrue(recordClick.calledOnce);\n assert.strictEqual(recordClick.firstCall.firstArg.veid, getVeId(select));\n\n await expectCalled(recordImpression);\n assert.isTrue(recordImpression.calledOnce);\n assert.sameDeepMembers(recordImpression.firstCall.firstArg.impressions, [\n {id: getVeId('option:first-child'), type: 1, parent: getVeId(select), context: 1, width: 0, height: 0},\n {id: getVeId('option:last-child'), type: 1, parent: getVeId(select), context: 2, width: 0, height: 0},\n ]);\n };\n\n it('logs impressions on select options on click', logsSelectOptions(new MouseEvent('click')));\n it('logs impressions on select options on space press', logsSelectOptions(new KeyboardEvent('keypress', {key: ' '})));\n it('logs impressions on select options on F4', logsSelectOptions(new KeyboardEvent('keydown', {code: 'F4'})));\n\n it('logs option click on select change', async () => {\n const parent = document.createElement('div') as HTMLElement;\n parent.innerHTML = `\n <select jslog=\"TreeItem; context: 0\" id=\"select\">\n <option jslog=\"TreeItem; context: 1; track: click\">1</option>\n <option jslog=\"TreeItem; context: 2; track: click\">2</option>\n </select>`;\n renderElementIntoDOM(parent);\n\n await VisualLoggingTesting.LoggingDriver.startLogging({clickLogThrottler: throttler});\n const recordClick = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordClick',\n );\n\n const select = document.getElementById('select') as HTMLSelectElement;\n assert.exists(select);\n select.selectedIndex = 1;\n select.dispatchEvent(new Event('change'));\n await expectCalled(throttle).then(([logging]) => logging());\n\n assert.isTrue(recordClick.calledOnce);\n assert.deepStrictEqual(\n recordClick.firstCall.firstArg, {veid: getVeId(select.selectedOptions[0]), doubleClick: false});\n });\n\n it('logs keydown', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({keyboardLogThrottler: throttler});\n const recordKeyDown = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordKeyDown',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new KeyboardEvent('keydown', {key: 'a'}));\n element.dispatchEvent(new KeyboardEvent('keydown', {key: 'b'}));\n const [logging] = await expectCalled(throttle);\n assert.isTrue(throttle.calledTwice);\n assert.isFalse(recordKeyDown.called);\n\n await logging();\n assert.isTrue(recordKeyDown.calledOnce);\n });\n\n it('logs keydown for specific codes', async () => {\n addLoggableElements();\n\n const element = document.getElementById('element') as HTMLElement;\n element.setAttribute('jslog', 'TreeItem; context:42; track: keydown: KeyA|KeyB');\n await VisualLoggingTesting.LoggingDriver.startLogging({keyboardLogThrottler: throttler});\n const recordKeyDown = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordKeyDown',\n );\n\n element.dispatchEvent(new KeyboardEvent('keydown', {code: 'KeyC'}));\n await new Promise(resolve => setTimeout(resolve, 0));\n assert.isFalse(throttle.called);\n\n element.dispatchEvent(new KeyboardEvent('keydown', {code: 'KeyA'}));\n let [logging] = await expectCalled(throttle);\n assert.isFalse(recordKeyDown.called);\n await logging();\n assert.isTrue(recordKeyDown.calledOnce);\n\n recordKeyDown.resetHistory();\n\n element.dispatchEvent(new KeyboardEvent('keydown', {code: 'KeyB'}));\n [logging] = await expectCalled(throttle);\n assert.isFalse(recordKeyDown.called);\n await logging();\n assert.isTrue(recordKeyDown.calledOnce);\n });\n\n it('logs change', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging();\n const recordChange = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordChange',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new Event('change'));\n assert.isTrue(recordChange.calledOnce);\n });\n\n it('logs change for each input type', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging();\n const recordChange = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordChange',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new InputEvent('input', {inputType: 'insertText'}));\n await new Promise(resolve => setTimeout(resolve, 0));\n assert.isFalse(recordChange.called);\n element.dispatchEvent(new InputEvent('input', {inputType: 'insertText'}));\n await new Promise(resolve => setTimeout(resolve, 0));\n assert.isFalse(recordChange.called);\n\n let logging = expectCalled(recordChange);\n element.dispatchEvent(new InputEvent('input', {inputType: 'inserFromPaste'}));\n await logging;\n\n logging = expectCalled(recordChange);\n element.dispatchEvent(new InputEvent('input', {inputType: 'inserFromDrop'}));\n await logging;\n logging = expectCalled(recordChange);\n element.dispatchEvent(new Event('change'));\n await logging;\n });\n\n it('logs change on focus out after input', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging();\n const recordChange = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordChange',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new InputEvent('input', {inputType: 'insertText'}));\n element.dispatchEvent(new Event('focusout'));\n await expectCalled(recordChange);\n });\n\n it('logs change on new impressions', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({processingThrottler: throttler});\n const recordChange = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordChange',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n const parent = document.getElementById('parent') as HTMLElement;\n element.dispatchEvent(new InputEvent('input', {inputType: 'insertText'}));\n throttle.callsArg(0);\n parent.appendChild(element.cloneNode());\n await expectCalled(recordChange);\n });\n\n it('logs change on resize', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({resizeLogThrottler: throttler});\n const recordChange = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordChange',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new InputEvent('input', {inputType: 'insertText'}));\n throttle.callsArg(0);\n element.style.width = '400px';\n await expectCalled(recordChange);\n });\n\n it('does not log change on focus out without input', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging();\n const recordChange = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordChange',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new Event('focusout'));\n await new Promise(resolve => setTimeout(resolve, 0));\n assert.isFalse(recordChange.calledOnce);\n });\n\n it('logs hover', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({hoverLogThrottler: throttler});\n const recordHover = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordHover',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new MouseEvent('mouseover'));\n const [logging] = await expectCall(throttle);\n assert.isFalse(recordHover.called);\n await logging();\n assert.isTrue(recordHover.calledOnce);\n });\n\n it('does not log hover if too short', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({hoverLogThrottler: throttler});\n const recordHover = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordHover',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new MouseEvent('mouseover'));\n await expectCall(throttle);\n assert.isFalse(recordHover.called);\n element.dispatchEvent(new MouseEvent('mouseout'));\n await expectCalled(throttle).then(([work]) => work());\n assert.isFalse(recordHover.called);\n });\n\n it('does not log hover if in descendent', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({hoverLogThrottler: throttler});\n const recordHover = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordHover',\n );\n\n const parent = document.getElementById('parent') as HTMLElement;\n const element = document.getElementById('element') as HTMLElement;\n parent.dispatchEvent(new MouseEvent('mouseover'));\n await expectCall(throttle);\n\n element.dispatchEvent(new MouseEvent('mouseover'));\n await expectCall(throttle).then(([work]) => work());\n assert.isTrue(recordHover.called);\n assert.deepStrictEqual(recordHover.firstCall.firstArg, {veid: getVeId(parent)});\n });\n\n it('logs drag', async () => {\n const dragLogThrottler = new Common.Throttler.Throttler(1000000000);\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({dragLogThrottler});\n const recordDrag = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordDrag',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new MouseEvent('pointerdown'));\n assert.exists(dragLogThrottler.process);\n assert.isFalse(recordDrag.called);\n\n await dragLogThrottler.schedule(async () => {}, Common.Throttler.Scheduling.AsSoonAsPossible);\n await dragLogThrottler.process?.();\n assert.isTrue(recordDrag.called);\n assert.isTrue(recordDrag.calledOnce);\n });\n\n it('does not log drag if too short in time', async () => {\n const dragLogThrottler = new Common.Throttler.Throttler(1000000000);\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({dragLogThrottler});\n const recordDrag = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordDrag',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new MouseEvent('pointerdown'));\n assert.exists(dragLogThrottler.process);\n assert.isFalse(recordDrag.called);\n\n element.dispatchEvent(new MouseEvent('pointerup'));\n\n await dragLogThrottler.process?.();\n assert.isFalse(recordDrag.called);\n });\n\n it('logs drag if short in time but long in distance', async () => {\n const dragLogThrottler = new Common.Throttler.Throttler(1000000000);\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({dragLogThrottler});\n const recordDrag = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordDrag',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.dispatchEvent(new MouseEvent('pointerdown', {screenX: 0, screenY: 0}));\n assert.exists(dragLogThrottler.process);\n assert.isFalse(recordDrag.called);\n\n element.dispatchEvent(new MouseEvent('pointerup', {screenX: 100, screenY: 100}));\n\n await dragLogThrottler.process?.();\n assert.isFalse(recordDrag.called);\n });\n\n it('logs resize', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({resizeLogThrottler: throttler});\n const recordResize = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordResize',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n\n element.style.height = '400px';\n const [logging] = await expectCall(throttle, {callCount: 2});\n assert.isFalse(recordResize.called);\n await logging();\n assert.isTrue(recordResize.calledOnce);\n });\n\n it('does not log resize if too small', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({resizeLogThrottler: throttler});\n const recordResize = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordResize',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n element.style.height = '301px';\n assert.isFalse(recordResize.called);\n });\n\n it('logs resize on visibility change', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({resizeLogThrottler: throttler});\n const recordResize = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordResize',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n\n element.style.display = 'none';\n const [logging] = await expectCall(throttle, {callCount: 2});\n assert.isFalse(recordResize.called);\n\n logging();\n await expectCalled(recordResize);\n assert.isTrue(recordResize.calledOnce);\n assert.deepStrictEqual(recordResize.firstCall.firstArg, {veid: getVeId(element), width: 0, height: 0});\n\n recordResize.resetHistory();\n\n element.style.display = 'block';\n assert.isFalse(recordResize.called);\n throttle.callsArg(0);\n\n await expectCall(recordResize);\n assert.isTrue(recordResize.calledOnce);\n assert.deepStrictEqual(recordResize.firstCall.firstArg, {veid: getVeId(element), width: 300, height: 300});\n });\n\n // Flaky, to be rewritten\n it.skip('[crbug.com/347520196] throttles resize per element', async () => {\n addLoggableElements();\n const element1 = document.getElementById('element') as HTMLElement;\n const element2 = element1.cloneNode() as HTMLElement;\n document.getElementById('parent')?.appendChild(element2);\n await VisualLoggingTesting.LoggingDriver.startLogging({resizeLogThrottler: throttler});\n const recordResize = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordResize',\n );\n\n element1.style.height = '200px';\n await expectCall(throttle, {callCount: 2});\n element2.style.height = '200px';\n await expectCall(throttle, {callCount: 2});\n element1.style.height = '100px';\n await expectCall(throttle, {callCount: 2});\n element2.style.height = '100px';\n const [work] = await expectCall(throttle, {callCount: 2});\n\n assert.isFalse(recordResize.called);\n await work();\n assert.isTrue(recordResize.calledTwice);\n assert.strictEqual(recordResize.firstCall.firstArg.height, 100);\n assert.strictEqual(recordResize.lastCall.firstArg.height, 100);\n assert.notStrictEqual(recordResize.firstCall.firstArg.veid, recordResize.lastCall.firstArg.veid);\n });\n\n it('only logs resize of the outer element', async () => {\n addLoggableElements();\n const element = document.getElementById('element') as HTMLElement;\n const child = document.createElement('div');\n child.setAttribute('jslog', 'TreeItem; track: resize');\n child.style.width = '100%';\n child.style.height = '100%';\n element.appendChild(child);\n\n await VisualLoggingTesting.LoggingDriver.startLogging({resizeLogThrottler: throttler});\n const recordResize = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordResize',\n );\n\n element.style.width = '400px';\n const [work] = await expectCall(throttle, {callCount: 2});\n\n assert.isFalse(recordResize.called);\n await work();\n assert.isTrue(recordResize.calledOnce);\n assert.deepStrictEqual(recordResize.firstCall.firstArg, {veid: getVeId(element), width: 400, height: 300});\n });\n\n it('does not log resize intial impressions due to visibility change', async () => {\n addLoggableElements();\n const element = document.getElementById('element') as HTMLElement;\n element.style.display = 'none';\n\n await VisualLoggingTesting.LoggingDriver.startLogging(\n {processingThrottler: throttler, resizeLogThrottler: throttler});\n const recordResize = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordResize',\n );\n recordImpression.resetHistory();\n\n element.style.display = 'block';\n await expectCalled(throttle).then(([work]) => work());\n assert.isTrue(throttle.calledOnce);\n assert.isTrue(recordImpression.calledOnce);\n assert.isFalse(recordResize.called);\n\n await new Promise(resolve => setTimeout(resolve, 0));\n assert.isFalse(recordResize.called);\n });\n\n it('properly handles the switch between visible elements', async () => {\n addLoggableElements();\n const element1 = document.getElementById('element') as HTMLElement;\n const child = document.createElement('div');\n child.id = 'child';\n child.setAttribute('jslog', 'TreeItem; track: resize');\n child.style.width = '100%';\n child.style.height = '100%';\n element1.appendChild(child);\n\n const element2 = element1.cloneNode(/* deep=*/ true) as HTMLElement;\n element2.id = 'element2';\n document.getElementById('parent')?.appendChild(element2);\n\n // First ensure both top level elements have impressions logged\n await VisualLoggingTesting.LoggingDriver.startLogging({resizeLogThrottler: throttler});\n const recordResize = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordResize',\n );\n\n // Now hide one and wait for logging to finish\n throttle.callsArg(0);\n element2.style.display = 'none';\n await expectCalled(recordResize, {callCount: 2});\n throttle.reset();\n recordResize.reset();\n\n // Now the actual test: hiding one element and show the other one\n element1.style.display = 'none';\n element2.style.display = 'block';\n // Throttler is called by both resize and intersection observer for each element\n await expectCalled(throttle, {callCount: 4}).then(([work]) => work());\n\n assert.isTrue(recordResize.calledTwice);\n assert.sameDeepMembers(recordResize.getCalls().map(c => c.firstArg), [\n {veid: VisualLoggingTesting.LoggingState.getLoggingState(element1)?.veid, width: 0, height: 0},\n {veid: VisualLoggingTesting.LoggingState.getLoggingState(element2)?.veid, width: 300, height: 300},\n ]);\n });\n\n it('logs resize when removed from DOM', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({resizeLogThrottler: throttler});\n const recordResize = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordResize',\n );\n\n const element = document.getElementById('element') as HTMLElement;\n const parent = document.getElementById('parent') as HTMLElement;\n\n parent.removeChild(element);\n const [logging] = await expectCall(throttle, {callCount: 2});\n assert.isFalse(recordResize.called);\n\n await logging();\n assert.isTrue(recordResize.calledOnce);\n assert.deepStrictEqual(recordResize.firstCall.firstArg, {veid: getVeId(element), width: 0, height: 0});\n });\n\n it('logs interactions before impressions and resize', async () => {\n addLoggableElements();\n await VisualLoggingTesting.LoggingDriver.startLogging({resizeLogThrottler: throttler});\n const recordResize = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordResize',\n );\n const recordClick = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordClick',\n );\n const recordKeyDown = sinon.stub(\n Host.InspectorFrontendHost.InspectorFrontendHostInstance,\n 'recordKeyDown',\n );\n recordImpression.resetHistory();\n\n const element = document.getElementById('element') as HTMLElement;\n const parent = document.getElementById('parent') as HTMLElement;\n\n parent.removeChild(element);\n parent.appendChild(element.cloneNode());\n element.click();\n element.dispatchEvent(new KeyboardEvent('keydown', {key: 'a'}));\n throttle.callsArg(0);\n\n await Promise.all([\n expectCalled(recordImpression),\n expectCalled(recordResize),\n expectCalled(recordClick),\n expectCalled(recordKeyDown),\n ]);\n assert.isTrue(recordClick.calledBefore(recordImpression));\n assert.isTrue(recordClick.calledBefore(recordResize));\n assert.isTrue(recordKeyDown.calledBefore(recordImpression));\n assert.isTrue(recordKeyDown.calledBefore(recordResize));\n });\n\n it('logs non-DOM impressions', async () => {\n addLoggableElements();\n const loggable = {};\n const parent = document.getElementById('parent')!;\n VisualLoggingTesting.NonDomState.registerLoggable(loggable, {ve: 1, context: '123'}, parent);\n await VisualLoggingTesting.LoggingDriver.startLogging();\n assert.isTrue(recordImpression.calledOnce);\n\n assert.sameDeepMembers(recordImpression.firstCall.firstArg.impressions, [\n {id: getVeId(loggable), type: 1, context: 123, parent: getVeId(parent), width: 0, height: 0},\n {id: getVeId('#element'), type: 1, context: 42, parent: getVeId(parent), width: 300, height: 300},\n {id: getVeId(parent), type: 1, width: 300, height: 300},\n ]);\n assert.isEmpty(VisualLoggingTesting.NonDomState.getNonDomState().loggables);\n });\n\n it('logs root non-DOM impressions', async () => {\n addLoggableElements();\n const loggable = {};\n VisualLoggingTesting.NonDomState.registerLoggable(loggable, {ve: 1, context: '123'}, undefined);\n await VisualLoggingTesting.LoggingDriver.startLogging();\n assert.isTrue(recordImpression.calledOnce);\n\n assert.sameDeepMembers(recordImpression.firstCall.firstArg.impressions, [\n {id: getVeId(loggable), type: 1, context: 123, width: 0, height: 0},\n {id: getVeId('#element'), type: 1, context: 42, parent: getVeId('#parent'), width: 300, height: 300},\n {id: getVeId('#parent'), type: 1, width: 300, height: 300},\n ]);\n assert.isEmpty(VisualLoggingTesting.NonDomState.getNonDomState().loggables);\n });\n\n it('postpones logging non-DOM impressions with detached parent', async () => {\n addLoggableElements();\n const loggable = {};\n const parent = document.createElement('div');\n VisualLoggingTesting.NonDomState.registerLoggable(loggable, {ve: 1, context: '123'}, parent);\n await VisualLoggingTesting.LoggingDriver.startLogging();\n assert.isTrue(recordImpression.calledOnce);\n\n assert.sameDeepMembers(recordImpression.firstCall.firstArg.impressions, [\n {id: getVeId('#element'), type: 1, context: 42, parent: getVeId('#parent'), width: 300, height: 300},\n {id: getVeId('#parent'), type: 1, width: 300, height: 300},\n ]);\n assert.deepInclude(\n VisualLoggingTesting.NonDomState.getNonDomState().loggables,\n {loggable, config: {ve: 1, context: '123'}, parent});\n });\n});\n"]} \ No newline at end of file diff --git a/public/ui/visual_logging/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/visual_logging/devtools_entrypoint-bundle-typescript-tsconfig.json index e26086df1..cf3ac9139 100644 --- a/public/ui/visual_logging/devtools_entrypoint-bundle-typescript-tsconfig.json +++ b/public/ui/visual_logging/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../front_end/ui/visual_logging/visual_logging.ts", "../../../../../../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" ], "references": [ diff --git a/public/ui/visual_logging/devtools_entrypoint-testing-typescript-tsconfig.json b/public/ui/visual_logging/devtools_entrypoint-testing-typescript-tsconfig.json index f9bfa472f..2dd75b9d8 100644 --- a/public/ui/visual_logging/devtools_entrypoint-testing-typescript-tsconfig.json +++ b/public/ui/visual_logging/devtools_entrypoint-testing-typescript-tsconfig.json @@ -32,7 +32,6 @@ "../../../../../../front_end/ui/visual_logging/visual_logging-testing.ts", "../../../../../../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" ], "references": [ diff --git a/public/ui/visual_logging/unittests-tsconfig.json b/public/ui/visual_logging/unittests-tsconfig.json index 5d3a1272a..9f72f7f87 100644 --- a/public/ui/visual_logging/unittests-tsconfig.json +++ b/public/ui/visual_logging/unittests-tsconfig.json @@ -46,7 +46,6 @@ "../../../../../../front_end/ui/visual_logging/NonDomState.test.ts", "../../../../../../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" ], "references": [ diff --git a/public/ui/visual_logging/visual_logging-tsconfig.json b/public/ui/visual_logging/visual_logging-tsconfig.json index bf62d0b7f..141735439 100644 --- a/public/ui/visual_logging/visual_logging-tsconfig.json +++ b/public/ui/visual_logging/visual_logging-tsconfig.json @@ -39,7 +39,6 @@ "../../../../../../front_end/ui/visual_logging/NonDomState.ts", "../../../../../../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" ], "references": [