diff --git a/public/Images/Images.js b/public/Images/Images.js index ab1279c4c..3cc610c8d 100644 --- a/public/Images/Images.js +++ b/public/Images/Images.js @@ -192,6 +192,7 @@ style.setProperty('--image-file-mop', 'url(\"' + new URL(new URL('mop.svg', impo style.setProperty('--image-file-mouse', 'url(\"' + new URL(new URL('mouse.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-network-settings', 'url(\"' + new URL(new URL('network-settings.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-open-externally', 'url(\"' + new URL(new URL('open-externally.svg', import.meta.url).href, import.meta.url).toString() + '\")'); +style.setProperty('--image-file-pause-circle', 'url(\"' + new URL(new URL('pause-circle.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-pause', 'url(\"' + new URL(new URL('pause.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-pen-spark', 'url(\"' + new URL(new URL('pen-spark.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-performance-panel-diagram', 'url(\"' + new URL(new URL('performance-panel-diagram.svg', import.meta.url).href, import.meta.url).toString() + '\")'); @@ -228,6 +229,7 @@ style.setProperty('--image-file-select-element', 'url(\"' + new URL(new URL('sel 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() + '\")'); style.setProperty('--image-file-small-status-dot', 'url(\"' + new URL(new URL('small-status-dot.svg', import.meta.url).href, import.meta.url).toString() + '\")'); +style.setProperty('--image-file-smart-assistant', 'url(\"' + new URL(new URL('smart-assistant.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-snippet', 'url(\"' + new URL(new URL('snippet.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-spark-info', 'url(\"' + new URL(new URL('spark-info.svg', import.meta.url).href, import.meta.url).toString() + '\")'); style.setProperty('--image-file-spark', 'url(\"' + new URL(new URL('spark.svg', import.meta.url).href, import.meta.url).toString() + '\")'); diff --git a/public/Images/Images.prebundle.js b/public/Images/Images.prebundle.js index adde92e59..fe246e94f 100644 --- a/public/Images/Images.prebundle.js +++ b/public/Images/Images.prebundle.js @@ -193,6 +193,7 @@ style.setProperty('--image-file-mop', 'url(\"' + new URL('./src/mop.svg', import style.setProperty('--image-file-mouse', 'url(\"' + new URL('./src/mouse.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-network-settings', 'url(\"' + new URL('./src/network-settings.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-open-externally', 'url(\"' + new URL('./src/open-externally.svg', import.meta.url).toString() + '\")'); +style.setProperty('--image-file-pause-circle', 'url(\"' + new URL('./src/pause-circle.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-pause', 'url(\"' + new URL('./src/pause.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-pen-spark', 'url(\"' + new URL('./src/pen-spark.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-performance-panel-diagram', 'url(\"' + new URL('./src/performance-panel-diagram.svg', import.meta.url).toString() + '\")'); @@ -229,6 +230,7 @@ style.setProperty('--image-file-select-element', 'url(\"' + new URL('./src/selec 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() + '\")'); style.setProperty('--image-file-small-status-dot', 'url(\"' + new URL('./src/small-status-dot.svg', import.meta.url).toString() + '\")'); +style.setProperty('--image-file-smart-assistant', 'url(\"' + new URL('./src/smart-assistant.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-snippet', 'url(\"' + new URL('./src/snippet.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-spark-info', 'url(\"' + new URL('./src/spark-info.svg', import.meta.url).toString() + '\")'); style.setProperty('--image-file-spark', 'url(\"' + new URL('./src/spark.svg', import.meta.url).toString() + '\")'); diff --git a/public/Images/pause-circle.svg b/public/Images/pause-circle.svg new file mode 100644 index 000000000..d53330860 --- /dev/null +++ b/public/Images/pause-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/Images/smart-assistant.svg b/public/Images/smart-assistant.svg new file mode 100644 index 000000000..36cb0d9f3 --- /dev/null +++ b/public/Images/smart-assistant.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/Images/src/pause-circle.svg b/public/Images/src/pause-circle.svg new file mode 100644 index 000000000..4700d493a --- /dev/null +++ b/public/Images/src/pause-circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/Images/src/smart-assistant.svg b/public/Images/src/smart-assistant.svg new file mode 100644 index 000000000..08207ef40 --- /dev/null +++ b/public/Images/src/smart-assistant.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/core/common/SettingRegistration.d.ts b/public/core/common/SettingRegistration.d.ts index 0b6ae7252..7e7d9a99e 100644 --- a/public/core/common/SettingRegistration.d.ts +++ b/public/core/common/SettingRegistration.d.ts @@ -119,7 +119,7 @@ export interface SettingRegistration { */ disabledCondition?: (config?: Root.Runtime.HostConfig) => DisabledConditionResult; /** - * If a setting is deprecated, define this notice to show an appropriate warning according to the `warning` propertiy. + * If a setting is deprecated, define this notice to show an appropriate warning according to the `warning` property. * If `disabled` is set, the setting will be disabled in the settings UI. In that case, `experiment` optionally can be * set to link to an experiment (by experiment name). The information icon in the settings UI can then be clicked to * jump to the experiment. If a setting is not disabled, the experiment entry will be ignored. @@ -129,6 +129,20 @@ export interface SettingRegistration { warning: () => Platform.UIString.LocalizedString; experiment?: string; }; + /** + * Optional information to learn more about the setting. If provided, a `(?)` icon will show next to the setting + * in the Settings panel with a link to learn more, and the `tooltip` will be presented to the user when hovering + * the `(?)` icon. + */ + learnMore?: LearnMore; +} +/** + * Metadata to learn more about a setting. The `url` will be used to construct + * a `(?)` icon link and the `tooltip` will be shown when hovering the icon. + */ +export interface LearnMore { + tooltip: () => Platform.UIString.LocalizedString; + url: Platform.DevToolsPath.UrlString; } interface LocalizedSettingExtensionOption { value: boolean | string; diff --git a/public/core/common/SettingRegistration.js.map b/public/core/common/SettingRegistration.js.map index e92c6dd87..0e593a8a3 100644 --- a/public/core/common/SettingRegistration.js.map +++ b/public/core/common/SettingRegistration.js.map @@ -1 +1 @@ -{"version":3,"file":"SettingRegistration.js","sourceRoot":"","sources":["../../../../../../front_end/core/common/SettingRegistration.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAExC,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAIxC,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,QAAQ,EAAE,UAAU;IACpB;;OAEG;IACH,UAAU,EAAE,YAAY;IACxB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,WAAW,EAAE,aAAa;IAC1B;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,WAAW,EAAE,aAAa;IAC1B;;OAEG;IACH,QAAQ,EAAE,UAAU;IACpB;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,SAAS,EAAE,WAAW;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM;IACZ;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,SAAS,EAAE,WAAW;IACtB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;;OAGG;IACH,IAAI,EAAE,MAAM;CACb,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,oCAAoC,EAAE,SAAS,CAAC,CAAC;AAC1F,MAAM,UAAU,GAAG,IAAI,CAAC,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AAS,CAAC,IAAI,CAAC,CAAC;QACpC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACtC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACvC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACtC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QACzC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACvC;YACE,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;QACpC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../i18n/i18n.js';\nimport type * as Platform from '../platform/platform.js';\nimport * as Root from '../root/root.js';\n\nimport {type SettingStorageType} from './Settings.js';\n\nconst UIStrings = {\n /**\n *@description Title of the Elements Panel\n */\n elements: 'Elements',\n /**\n *@description Text for DevTools appearance\n */\n appearance: 'Appearance',\n /**\n *@description Name of the Sources panel\n */\n sources: 'Sources',\n /**\n *@description Title of the Network tool\n */\n network: 'Network',\n /**\n *@description Text for the performance of something\n */\n performance: 'Performance',\n /**\n *@description Title of the Console tool\n */\n console: 'Console',\n /**\n *@description A title of the 'Persistence' setting category\n */\n persistence: 'Persistence',\n /**\n *@description Text that refers to the debugger\n */\n debugger: 'Debugger',\n /**\n *@description Text describing global shortcuts and settings that are available throughout the DevTools\n */\n global: 'Global',\n /**\n *@description Title of the Rendering tool\n */\n rendering: 'Rendering',\n /**\n *@description Title of a section on CSS Grid tooling\n */\n grid: 'Grid',\n /**\n *@description Text for the mobile platform, as opposed to desktop\n */\n mobile: 'Mobile',\n /**\n *@description Text for the memory of the page\n */\n memory: 'Memory',\n /**\n *@description Text for the extension of the page\n */\n extension: 'Extension',\n /**\n *@description Text for the adorner of the page\n */\n adorner: 'Adorner',\n /**\n * @description Header for the \"Sync\" section in the settings UI. The \"Sync\"\n * section allows users to configure which DevTools data is synced via Chrome Sync.\n */\n sync: 'Sync',\n};\nconst str_ = i18n.i18n.registerUIStrings('core/common/SettingRegistration.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nlet registeredSettings: Array = [];\nconst settingNameSet = new Set();\n\nexport function registerSettingExtension(registration: SettingRegistration): void {\n const settingName = registration.settingName;\n if (settingNameSet.has(settingName)) {\n throw new Error(`Duplicate setting name '${settingName}'`);\n }\n settingNameSet.add(settingName);\n registeredSettings.push(registration);\n}\n\nexport function getRegisteredSettings(config: Root.Runtime.HostConfig): Array {\n return registeredSettings.filter(\n setting => Root.Runtime.Runtime.isDescriptorEnabled(\n {experiment: setting.experiment, condition: setting.condition}, config));\n}\n\nexport function registerSettingsForTest(settings: Array, forceReset: boolean = false): void {\n if (registeredSettings.length === 0 || forceReset) {\n registeredSettings = settings;\n settingNameSet.clear();\n for (const setting of settings) {\n const settingName = setting.settingName;\n if (settingNameSet.has(settingName)) {\n throw new Error(`Duplicate setting name '${settingName}'`);\n }\n settingNameSet.add(settingName);\n }\n }\n}\n\nexport function resetSettings(): void {\n registeredSettings = [];\n settingNameSet.clear();\n}\n\nexport function maybeRemoveSettingExtension(settingName: string): boolean {\n const settingIndex = registeredSettings.findIndex(setting => setting.settingName === settingName);\n if (settingIndex < 0 || !settingNameSet.delete(settingName)) {\n return false;\n }\n registeredSettings.splice(settingIndex, 1);\n return true;\n}\n\nexport const enum SettingCategory {\n NONE = '', // `NONE` must be a falsy value. Legacy code uses if-checks for the category.\n ELEMENTS = 'ELEMENTS',\n APPEARANCE = 'APPEARANCE',\n SOURCES = 'SOURCES',\n NETWORK = 'NETWORK',\n PERFORMANCE = 'PERFORMANCE',\n CONSOLE = 'CONSOLE',\n PERSISTENCE = 'PERSISTENCE',\n DEBUGGER = 'DEBUGGER',\n GLOBAL = 'GLOBAL',\n RENDERING = 'RENDERING',\n GRID = 'GRID',\n MOBILE = 'MOBILE',\n EMULATION = 'EMULATION',\n MEMORY = 'MEMORY',\n EXTENSIONS = 'EXTENSIONS',\n ADORNER = 'ADORNER',\n SYNC = 'SYNC',\n}\n\nexport function getLocalizedSettingsCategory(category: SettingCategory): Platform.UIString.LocalizedString {\n switch (category) {\n case SettingCategory.ELEMENTS:\n return i18nString(UIStrings.elements);\n case SettingCategory.APPEARANCE:\n return i18nString(UIStrings.appearance);\n case SettingCategory.SOURCES:\n return i18nString(UIStrings.sources);\n case SettingCategory.NETWORK:\n return i18nString(UIStrings.network);\n case SettingCategory.PERFORMANCE:\n return i18nString(UIStrings.performance);\n case SettingCategory.CONSOLE:\n return i18nString(UIStrings.console);\n case SettingCategory.PERSISTENCE:\n return i18nString(UIStrings.persistence);\n case SettingCategory.DEBUGGER:\n return i18nString(UIStrings.debugger);\n case SettingCategory.GLOBAL:\n return i18nString(UIStrings.global);\n case SettingCategory.RENDERING:\n return i18nString(UIStrings.rendering);\n case SettingCategory.GRID:\n return i18nString(UIStrings.grid);\n case SettingCategory.MOBILE:\n return i18nString(UIStrings.mobile);\n case SettingCategory.EMULATION:\n return i18nString(UIStrings.console);\n case SettingCategory.MEMORY:\n return i18nString(UIStrings.memory);\n case SettingCategory.EXTENSIONS:\n return i18nString(UIStrings.extension);\n case SettingCategory.ADORNER:\n return i18nString(UIStrings.adorner);\n case SettingCategory.NONE:\n return i18n.i18n.lockedString('');\n case SettingCategory.SYNC:\n return i18nString(UIStrings.sync);\n }\n}\n\nexport const enum SettingType {\n ARRAY = 'array',\n REGEX = 'regex',\n ENUM = 'enum',\n BOOLEAN = 'boolean',\n}\n\nexport interface RegExpSettingItem {\n /**\n * A regular expression matched against URLs for ignore listing.\n */\n pattern: string;\n /**\n * If true, ignore this rule.\n */\n disabled?: boolean;\n /**\n * When a rule is disabled due to requesting through a script's context menu\n * that it no longer be ignore listed, this field is set to the URL of that\n * script, so that if the user requests through the same context menu to\n * enable ignore listing, the rule can be reenabled.\n */\n disabledForUrl?: Platform.DevToolsPath.UrlString;\n}\n\nexport interface SettingRegistration {\n /**\n * The category with which the setting is displayed in the UI.\n */\n category?: SettingCategory;\n /**\n * Used to sort on screen the settings that belong to the same category.\n */\n order?: number;\n /**\n * The title with which the setting is shown on screen.\n */\n title?: () => Platform.UIString.LocalizedString;\n /**\n * The identifier of the setting.\n */\n settingName: string;\n /**\n * Determines how the possible values of the setting are expressed.\n *\n * - If the setting can only be enabled and disabled use BOOLEAN\n * - If the setting has a list of possible values use ENUM\n * - If each setting value is a set of objects use ARRAY\n * - If the setting value is a regular expression use REGEX\n */\n settingType: SettingType;\n /**\n * The value set by default to the setting.\n */\n defaultValue: unknown;\n /**\n * Words used to find a setting in the Command Menu.\n */\n tags?: Array<() => Platform.UIString.LocalizedString>;\n /**\n * The possible values the setting can have, each with a description composed of a title and an optional text.\n */\n options?: Array;\n /**\n * Whether DevTools must be reloaded for a change in the setting to take effect.\n */\n reloadRequired?: boolean;\n /**\n * Determines if the setting value is stored in the global, local or session storage.\n */\n storageType?: SettingStorageType;\n /**\n * A condition that, when present in the queryParamsObject of Runtime, constraints the value\n * of the setting to be changed only if the user set it.\n */\n userActionCondition?: string;\n /**\n * The name of the experiment a setting is associated with. Enabling and disabling the declared\n * experiment will enable and disable the setting respectively.\n */\n experiment?: Root.Runtime.ExperimentName;\n /**\n * A condition is a function that will make the setting 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 /**\n * A function that returns true if the setting should be disabled, along with\n * the reason why.\n */\n disabledCondition?: (config?: Root.Runtime.HostConfig) => DisabledConditionResult;\n\n /**\n * If a setting is deprecated, define this notice to show an appropriate warning according to the `warning` propertiy.\n * If `disabled` is set, the setting will be disabled in the settings UI. In that case, `experiment` optionally can be\n * set to link to an experiment (by experiment name). The information icon in the settings UI can then be clicked to\n * jump to the experiment. If a setting is not disabled, the experiment entry will be ignored.\n */\n deprecationNotice?: {disabled: boolean, warning: () => Platform.UIString.LocalizedString, experiment?: string};\n}\ninterface LocalizedSettingExtensionOption {\n value: boolean|string;\n title: () => Platform.UIString.LocalizedString;\n text?: () => Platform.UIString.LocalizedString;\n raw?: false;\n}\ninterface RawSettingExtensionOption {\n value: boolean|string;\n title: () => Platform.UIString.LocalizedString;\n /**\n * Text used to describe the option. Must be localized if 'raw' is false.\n */\n text?: string;\n raw: true;\n}\nexport type SettingExtensionOption = LocalizedSettingExtensionOption|RawSettingExtensionOption;\nexport type DisabledConditionResult = {\n disabled: true,\n reason: string,\n}|{disabled: false};\n"]} \ No newline at end of file +{"version":3,"file":"SettingRegistration.js","sourceRoot":"","sources":["../../../../../../front_end/core/common/SettingRegistration.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAExC,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAIxC,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,QAAQ,EAAE,UAAU;IACpB;;OAEG;IACH,UAAU,EAAE,YAAY;IACxB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,WAAW,EAAE,aAAa;IAC1B;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,WAAW,EAAE,aAAa;IAC1B;;OAEG;IACH,QAAQ,EAAE,UAAU;IACpB;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,SAAS,EAAE,WAAW;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM;IACZ;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,SAAS,EAAE,WAAW;I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AAC;QAC3C;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,SAAS,CAAC,CAAC;QACzC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACpC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACtC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACvC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACtC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QACzC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACvC;YACE,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;QACpC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18n from '../i18n/i18n.js';\nimport type * as Platform from '../platform/platform.js';\nimport * as Root from '../root/root.js';\n\nimport {type SettingStorageType} from './Settings.js';\n\nconst UIStrings = {\n /**\n *@description Title of the Elements Panel\n */\n elements: 'Elements',\n /**\n *@description Text for DevTools appearance\n */\n appearance: 'Appearance',\n /**\n *@description Name of the Sources panel\n */\n sources: 'Sources',\n /**\n *@description Title of the Network tool\n */\n network: 'Network',\n /**\n *@description Text for the performance of something\n */\n performance: 'Performance',\n /**\n *@description Title of the Console tool\n */\n console: 'Console',\n /**\n *@description A title of the 'Persistence' setting category\n */\n persistence: 'Persistence',\n /**\n *@description Text that refers to the debugger\n */\n debugger: 'Debugger',\n /**\n *@description Text describing global shortcuts and settings that are available throughout the DevTools\n */\n global: 'Global',\n /**\n *@description Title of the Rendering tool\n */\n rendering: 'Rendering',\n /**\n *@description Title of a section on CSS Grid tooling\n */\n grid: 'Grid',\n /**\n *@description Text for the mobile platform, as opposed to desktop\n */\n mobile: 'Mobile',\n /**\n *@description Text for the memory of the page\n */\n memory: 'Memory',\n /**\n *@description Text for the extension of the page\n */\n extension: 'Extension',\n /**\n *@description Text for the adorner of the page\n */\n adorner: 'Adorner',\n /**\n * @description Header for the \"Sync\" section in the settings UI. The \"Sync\"\n * section allows users to configure which DevTools data is synced via Chrome Sync.\n */\n sync: 'Sync',\n};\nconst str_ = i18n.i18n.registerUIStrings('core/common/SettingRegistration.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nlet registeredSettings: Array = [];\nconst settingNameSet = new Set();\n\nexport function registerSettingExtension(registration: SettingRegistration): void {\n const settingName = registration.settingName;\n if (settingNameSet.has(settingName)) {\n throw new Error(`Duplicate setting name '${settingName}'`);\n }\n settingNameSet.add(settingName);\n registeredSettings.push(registration);\n}\n\nexport function getRegisteredSettings(config: Root.Runtime.HostConfig): Array {\n return registeredSettings.filter(\n setting => Root.Runtime.Runtime.isDescriptorEnabled(\n {experiment: setting.experiment, condition: setting.condition}, config));\n}\n\nexport function registerSettingsForTest(settings: Array, forceReset: boolean = false): void {\n if (registeredSettings.length === 0 || forceReset) {\n registeredSettings = settings;\n settingNameSet.clear();\n for (const setting of settings) {\n const settingName = setting.settingName;\n if (settingNameSet.has(settingName)) {\n throw new Error(`Duplicate setting name '${settingName}'`);\n }\n settingNameSet.add(settingName);\n }\n }\n}\n\nexport function resetSettings(): void {\n registeredSettings = [];\n settingNameSet.clear();\n}\n\nexport function maybeRemoveSettingExtension(settingName: string): boolean {\n const settingIndex = registeredSettings.findIndex(setting => setting.settingName === settingName);\n if (settingIndex < 0 || !settingNameSet.delete(settingName)) {\n return false;\n }\n registeredSettings.splice(settingIndex, 1);\n return true;\n}\n\nexport const enum SettingCategory {\n NONE = '', // `NONE` must be a falsy value. Legacy code uses if-checks for the category.\n ELEMENTS = 'ELEMENTS',\n APPEARANCE = 'APPEARANCE',\n SOURCES = 'SOURCES',\n NETWORK = 'NETWORK',\n PERFORMANCE = 'PERFORMANCE',\n CONSOLE = 'CONSOLE',\n PERSISTENCE = 'PERSISTENCE',\n DEBUGGER = 'DEBUGGER',\n GLOBAL = 'GLOBAL',\n RENDERING = 'RENDERING',\n GRID = 'GRID',\n MOBILE = 'MOBILE',\n EMULATION = 'EMULATION',\n MEMORY = 'MEMORY',\n EXTENSIONS = 'EXTENSIONS',\n ADORNER = 'ADORNER',\n SYNC = 'SYNC',\n}\n\nexport function getLocalizedSettingsCategory(category: SettingCategory): Platform.UIString.LocalizedString {\n switch (category) {\n case SettingCategory.ELEMENTS:\n return i18nString(UIStrings.elements);\n case SettingCategory.APPEARANCE:\n return i18nString(UIStrings.appearance);\n case SettingCategory.SOURCES:\n return i18nString(UIStrings.sources);\n case SettingCategory.NETWORK:\n return i18nString(UIStrings.network);\n case SettingCategory.PERFORMANCE:\n return i18nString(UIStrings.performance);\n case SettingCategory.CONSOLE:\n return i18nString(UIStrings.console);\n case SettingCategory.PERSISTENCE:\n return i18nString(UIStrings.persistence);\n case SettingCategory.DEBUGGER:\n return i18nString(UIStrings.debugger);\n case SettingCategory.GLOBAL:\n return i18nString(UIStrings.global);\n case SettingCategory.RENDERING:\n return i18nString(UIStrings.rendering);\n case SettingCategory.GRID:\n return i18nString(UIStrings.grid);\n case SettingCategory.MOBILE:\n return i18nString(UIStrings.mobile);\n case SettingCategory.EMULATION:\n return i18nString(UIStrings.console);\n case SettingCategory.MEMORY:\n return i18nString(UIStrings.memory);\n case SettingCategory.EXTENSIONS:\n return i18nString(UIStrings.extension);\n case SettingCategory.ADORNER:\n return i18nString(UIStrings.adorner);\n case SettingCategory.NONE:\n return i18n.i18n.lockedString('');\n case SettingCategory.SYNC:\n return i18nString(UIStrings.sync);\n }\n}\n\nexport const enum SettingType {\n ARRAY = 'array',\n REGEX = 'regex',\n ENUM = 'enum',\n BOOLEAN = 'boolean',\n}\n\nexport interface RegExpSettingItem {\n /**\n * A regular expression matched against URLs for ignore listing.\n */\n pattern: string;\n /**\n * If true, ignore this rule.\n */\n disabled?: boolean;\n /**\n * When a rule is disabled due to requesting through a script's context menu\n * that it no longer be ignore listed, this field is set to the URL of that\n * script, so that if the user requests through the same context menu to\n * enable ignore listing, the rule can be reenabled.\n */\n disabledForUrl?: Platform.DevToolsPath.UrlString;\n}\n\nexport interface SettingRegistration {\n /**\n * The category with which the setting is displayed in the UI.\n */\n category?: SettingCategory;\n /**\n * Used to sort on screen the settings that belong to the same category.\n */\n order?: number;\n /**\n * The title with which the setting is shown on screen.\n */\n title?: () => Platform.UIString.LocalizedString;\n /**\n * The identifier of the setting.\n */\n settingName: string;\n /**\n * Determines how the possible values of the setting are expressed.\n *\n * - If the setting can only be enabled and disabled use BOOLEAN\n * - If the setting has a list of possible values use ENUM\n * - If each setting value is a set of objects use ARRAY\n * - If the setting value is a regular expression use REGEX\n */\n settingType: SettingType;\n /**\n * The value set by default to the setting.\n */\n defaultValue: unknown;\n /**\n * Words used to find a setting in the Command Menu.\n */\n tags?: Array<() => Platform.UIString.LocalizedString>;\n /**\n * The possible values the setting can have, each with a description composed of a title and an optional text.\n */\n options?: Array;\n /**\n * Whether DevTools must be reloaded for a change in the setting to take effect.\n */\n reloadRequired?: boolean;\n /**\n * Determines if the setting value is stored in the global, local or session storage.\n */\n storageType?: SettingStorageType;\n /**\n * A condition that, when present in the queryParamsObject of Runtime, constraints the value\n * of the setting to be changed only if the user set it.\n */\n userActionCondition?: string;\n /**\n * The name of the experiment a setting is associated with. Enabling and disabling the declared\n * experiment will enable and disable the setting respectively.\n */\n experiment?: Root.Runtime.ExperimentName;\n /**\n * A condition is a function that will make the setting 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 /**\n * A function that returns true if the setting should be disabled, along with\n * the reason why.\n */\n disabledCondition?: (config?: Root.Runtime.HostConfig) => DisabledConditionResult;\n\n /**\n * If a setting is deprecated, define this notice to show an appropriate warning according to the `warning` property.\n * If `disabled` is set, the setting will be disabled in the settings UI. In that case, `experiment` optionally can be\n * set to link to an experiment (by experiment name). The information icon in the settings UI can then be clicked to\n * jump to the experiment. If a setting is not disabled, the experiment entry will be ignored.\n */\n deprecationNotice?: {disabled: boolean, warning: () => Platform.UIString.LocalizedString, experiment?: string};\n\n /**\n * Optional information to learn more about the setting. If provided, a `(?)` icon will show next to the setting\n * in the Settings panel with a link to learn more, and the `tooltip` will be presented to the user when hovering\n * the `(?)` icon.\n */\n learnMore?: LearnMore;\n}\n\n/**\n * Metadata to learn more about a setting. The `url` will be used to construct\n * a `(?)` icon link and the `tooltip` will be shown when hovering the icon.\n */\nexport interface LearnMore {\n tooltip: () => Platform.UIString.LocalizedString;\n url: Platform.DevToolsPath.UrlString;\n}\n\ninterface LocalizedSettingExtensionOption {\n value: boolean|string;\n title: () => Platform.UIString.LocalizedString;\n text?: () => Platform.UIString.LocalizedString;\n raw?: false;\n}\ninterface RawSettingExtensionOption {\n value: boolean|string;\n title: () => Platform.UIString.LocalizedString;\n /**\n * Text used to describe the option. Must be localized if 'raw' is false.\n */\n text?: string;\n raw: true;\n}\nexport type SettingExtensionOption = LocalizedSettingExtensionOption|RawSettingExtensionOption;\nexport type DisabledConditionResult = {\n disabled: true,\n reason: string,\n}|{disabled: false};\n"]} \ No newline at end of file diff --git a/public/core/common/Settings.d.ts b/public/core/common/Settings.d.ts index 22068d01d..c14d4b7a5 100644 --- a/public/core/common/Settings.d.ts +++ b/public/core/common/Settings.d.ts @@ -2,7 +2,7 @@ import * as Platform from '../platform/platform.js'; import * as Root from '../root/root.js'; import { type EventDescriptor, type EventTargetEvent, type GenericEvents } from './EventTarget.js'; import { ObjectWrapper } from './Object.js'; -import { getLocalizedSettingsCategory, maybeRemoveSettingExtension, type RegExpSettingItem, registerSettingExtension, registerSettingsForTest, resetSettings, SettingCategory, type SettingExtensionOption, type SettingRegistration, SettingType } from './SettingRegistration.js'; +import { getLocalizedSettingsCategory, type LearnMore, maybeRemoveSettingExtension, type RegExpSettingItem, registerSettingExtension, registerSettingsForTest, resetSettings, SettingCategory, type SettingExtensionOption, type SettingRegistration, SettingType } from './SettingRegistration.js'; export declare class Settings { #private; readonly syncedStorage: SettingsStorage; @@ -84,6 +84,7 @@ export declare class Setting { disabledReason(): string | undefined; setDisabled(disabled: boolean): void; get(): V; + getIfNotDisabled(): V | undefined; forceGet(): Promise; set(value: V): void; setRegistration(registration: SettingRegistration): void; @@ -93,6 +94,7 @@ export declare class Setting { category(): SettingCategory | null; tags(): string | null; order(): number | null; + learnMore(): LearnMore | null; get deprecation(): Deprecation | null; private printSettingsSavingError; } diff --git a/public/core/common/Settings.js b/public/core/common/Settings.js index e9bf26434..89c4ced84 100644 --- a/public/core/common/Settings.js +++ b/public/core/common/Settings.js @@ -369,6 +369,15 @@ export class Setting { } return this.#value; } + // Prefer this getter for settings which are "disableable". The plain getter returns `this.#value`, + // even if the setting is disabled, which means the callsite has to explicitly call the `disabled()` + // getter and add its own logic for the disabled state. + getIfNotDisabled() { + if (this.disabled()) { + return; + } + return this.get(); + } async forceGet() { const name = this.name; const oldValue = this.storage.get(name); @@ -462,6 +471,9 @@ export class Setting { } return null; } + learnMore() { + return this.#registration?.learnMore ?? null; + } get deprecation() { if (!this.#registration || !this.#registration.deprecationNotice) { return null; diff --git a/public/core/common/Settings.js.map b/public/core/common/Settings.js.map index 3b2459cc8..a5217cefc 100644 --- a/public/core/common/Settings.js.map +++ b/public/core/common/Settings.js.map @@ -1 +1 @@ -{"version":3,"file":"Settings.js","sourceRoot":"","sources":["../../../../../../front_end/core/common/Settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,QAAQ,MAAM,yBAA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AU,cAAc,CAAC,WAAmB;IAChD,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;AACzD,CAAC;AAED,OAAO,EACL,4BAA4B,EAC5B,2BAA2B,EAC3B,wBAAwB,EAMxB,uBAAuB,EACvB,aAAa,GACd,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 Platform from '../platform/platform.js';\nimport * as Root from '../root/root.js';\n\nimport {Console} from './Console.js';\nimport {type EventDescriptor, type EventTargetEvent, type GenericEvents} from './EventTarget.js';\nimport {ObjectWrapper} from './Object.js';\nimport {\n getLocalizedSettingsCategory,\n getRegisteredSettings as getRegisteredSettingsInternal,\n maybeRemoveSettingExtension,\n type RegExpSettingItem,\n registerSettingExtension,\n registerSettingsForTest,\n resetSettings,\n SettingCategory,\n type SettingExtensionOption,\n type SettingRegistration,\n SettingType,\n} from './SettingRegistration.js';\n\nlet settingsInstance: Settings|undefined;\n\nexport class Settings {\n readonly #sessionStorage: SettingsStorage;\n settingNameSet: Set;\n orderValuesBySettingCategory: Map>;\n #eventSupport: ObjectWrapper;\n #registry: Map>;\n readonly moduleSettings: Map>;\n readonly #config: Root.Runtime.HostConfig;\n\n private constructor(\n readonly syncedStorage: SettingsStorage, readonly globalStorage: SettingsStorage,\n readonly localStorage: SettingsStorage, config?: Root.Runtime.HostConfig) {\n this.#sessionStorage = new SettingsStorage({});\n\n this.settingNameSet = new Set();\n\n this.orderValuesBySettingCategory = new Map();\n\n this.#eventSupport = new ObjectWrapper();\n this.#registry = new Map();\n this.moduleSettings = new Map();\n\n this.#config = config || {};\n for (const registration of this.getRegisteredSettings()) {\n const {settingName, defaultValue, storageType} = registration;\n const isRegex = registration.settingType === SettingType.REGEX;\n\n const evaluatedDefaultValue = typeof defaultValue === 'function' ? defaultValue(this.#config) : defaultValue;\n const setting = isRegex && typeof evaluatedDefaultValue === 'string' ?\n this.createRegExpSetting(settingName, evaluatedDefaultValue, undefined, storageType) :\n this.createSetting(settingName, evaluatedDefaultValue, storageType);\n\n setting.setTitleFunction(registration.title);\n if (registration.userActionCondition) {\n setting.setRequiresUserAction(Boolean(Root.Runtime.Runtime.queryParam(registration.userActionCondition)));\n }\n setting.setRegistration(registration);\n\n this.registerModuleSetting(setting);\n }\n }\n\n getRegisteredSettings(): SettingRegistration[] {\n return getRegisteredSettingsInternal(this.#config);\n }\n\n static hasInstance(): boolean {\n return typeof settingsInstance !== 'undefined';\n }\n\n static instance(opts: {\n forceNew: boolean|null,\n syncedStorage: SettingsStorage|null,\n globalStorage: SettingsStorage|null,\n localStorage: SettingsStorage|null,\n config?: Root.Runtime.HostConfig,\n } = {forceNew: null, syncedStorage: null, globalStorage: null, localStorage: null}): Settings {\n const {forceNew, syncedStorage, globalStorage, localStorage, config} = opts;\n if (!settingsInstance || forceNew) {\n if (!syncedStorage || !globalStorage || !localStorage) {\n throw new Error(`Unable to create settings: global and local storage must be provided: ${new Error().stack}`);\n }\n\n settingsInstance = new Settings(syncedStorage, globalStorage, localStorage, config);\n }\n\n return settingsInstance;\n }\n\n static removeInstance(): void {\n settingsInstance = undefined;\n }\n\n getHostConfig(): Root.Runtime.HostConfig {\n return this.#config;\n }\n\n private registerModuleSetting(setting: Setting): void {\n const settingName = setting.name;\n const category = setting.category();\n const order = setting.order();\n if (this.settingNameSet.has(settingName)) {\n throw new Error(`Duplicate Setting name '${settingName}'`);\n }\n if (category && order) {\n const orderValues = this.orderValuesBySettingCategory.get(category) || new Set();\n if (orderValues.has(order)) {\n throw new Error(`Duplicate order value '${order}' for settings category '${category}'`);\n }\n orderValues.add(order);\n this.orderValuesBySettingCategory.set(category, orderValues);\n }\n this.settingNameSet.add(settingName);\n this.moduleSettings.set(setting.name, setting);\n }\n\n static normalizeSettingName(name: string): string {\n if ([\n VersionController.GLOBAL_VERSION_SETTING_NAME,\n VersionController.SYNCED_VERSION_SETTING_NAME,\n VersionController.LOCAL_VERSION_SETTING_NAME,\n 'currentDockState',\n 'isUnderTest',\n ].includes(name)) {\n return name;\n }\n return Platform.StringUtilities.toKebabCase(name);\n }\n\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n moduleSetting(settingName: string): Setting {\n const setting = this.moduleSettings.get(settingName) as Setting;\n if (!setting) {\n throw new Error('No setting registered: ' + settingName);\n }\n return setting;\n }\n\n settingForTest(settingName: string): Setting {\n const setting = this.#registry.get(settingName);\n if (!setting) {\n throw new Error('No setting registered: ' + settingName);\n }\n return setting;\n }\n\n /**\n * Get setting via key, and create a new setting if the requested setting does not exist.\n */\n createSetting(key: string, defaultValue: T, storageType?: SettingStorageType): Setting {\n const storage = this.storageFromType(storageType);\n let setting = (this.#registry.get(key) as Setting);\n if (!setting) {\n setting = new Setting(key, defaultValue, this.#eventSupport, storage);\n this.#registry.set(key, setting);\n }\n return setting;\n }\n\n createLocalSetting(key: string, defaultValue: T): Setting {\n return this.createSetting(key, defaultValue, SettingStorageType.LOCAL);\n }\n\n createRegExpSetting(key: string, defaultValue: string, regexFlags?: string, storageType?: SettingStorageType):\n RegExpSetting {\n if (!this.#registry.get(key)) {\n this.#registry.set(\n key, new RegExpSetting(key, defaultValue, this.#eventSupport, this.storageFromType(storageType), regexFlags));\n }\n return this.#registry.get(key) as RegExpSetting;\n }\n\n clearAll(): void {\n this.globalStorage.removeAll();\n this.syncedStorage.removeAll();\n this.localStorage.removeAll();\n new VersionController().resetToCurrent();\n }\n\n private storageFromType(storageType?: SettingStorageType): SettingsStorage {\n switch (storageType) {\n case SettingStorageType.LOCAL:\n return this.localStorage;\n case SettingStorageType.SESSION:\n return this.#sessionStorage;\n case SettingStorageType.GLOBAL:\n return this.globalStorage;\n case SettingStorageType.SYNCED:\n return this.syncedStorage;\n }\n return this.globalStorage;\n }\n\n getRegistry(): Map> {\n return this.#registry;\n }\n}\n\nexport interface SettingsBackingStore {\n register(setting: string): void;\n get(setting: string): Promise;\n set(setting: string, value: string): void;\n remove(setting: string): void;\n clear(): void;\n}\n\nexport const NOOP_STORAGE: SettingsBackingStore = {\n register: () => {},\n set: () => {},\n get: () => Promise.resolve(''),\n remove: () => {},\n clear: () => {},\n};\n\nexport class SettingsStorage {\n constructor(\n private object: Record, private readonly backingStore: SettingsBackingStore = NOOP_STORAGE,\n private readonly storagePrefix: string = '') {\n }\n\n register(name: string): void {\n name = this.storagePrefix + name;\n this.backingStore.register(name);\n }\n\n set(name: string, value: string): void {\n name = this.storagePrefix + name;\n this.object[name] = value;\n this.backingStore.set(name, value);\n }\n\n has(name: string): boolean {\n name = this.storagePrefix + name;\n return name in this.object;\n }\n\n get(name: string): string {\n name = this.storagePrefix + name;\n return this.object[name];\n }\n\n async forceGet(originalName: string): Promise {\n const name = this.storagePrefix + originalName;\n const value = await this.backingStore.get(name);\n if (value && value !== this.object[name]) {\n this.set(originalName, value);\n } else if (!value) {\n this.remove(originalName);\n }\n return value;\n }\n\n remove(name: string): void {\n name = this.storagePrefix + name;\n delete this.object[name];\n this.backingStore.remove(name);\n }\n\n removeAll(): void {\n this.object = {};\n this.backingStore.clear();\n }\n\n keys(): string[] {\n return Object.keys(this.object);\n }\n\n dumpSizes(): void {\n Console.instance().log('Ten largest settings: ');\n\n const sizes: {\n [x: string]: number,\n // @ts-expect-error __proto__ optimization\n } = {__proto__: null};\n for (const key in this.object) {\n sizes[key] = this.object[key].length;\n }\n const keys = Object.keys(sizes);\n\n function comparator(key1: string, key2: string): number {\n return sizes[key2] - sizes[key1];\n }\n\n keys.sort(comparator);\n\n for (let i = 0; i < 10 && i < keys.length; ++i) {\n Console.instance().log('Setting: \\'' + keys[i] + '\\', size: ' + sizes[keys[i]]);\n }\n }\n}\n\nfunction removeSetting(setting: {name: string, storage: SettingsStorage}): void {\n const name = setting.name;\n const settings = Settings.instance();\n\n settings.getRegistry().delete(name);\n settings.moduleSettings.delete(name);\n\n setting.storage.remove(name);\n}\n\nexport class Deprecation {\n readonly disabled: boolean;\n readonly warning: Platform.UIString.LocalizedString;\n readonly experiment?: Root.Runtime.Experiment;\n\n constructor({deprecationNotice}: SettingRegistration) {\n if (!deprecationNotice) {\n throw new Error('Cannot create deprecation info for a non-deprecated setting');\n }\n this.disabled = deprecationNotice.disabled;\n this.warning = deprecationNotice.warning();\n this.experiment = deprecationNotice.experiment ?\n Root.Runtime.experiments.allConfigurableExperiments().find(e => e.name === deprecationNotice.experiment) :\n undefined;\n }\n}\n\nexport class Setting {\n #titleFunction?: () => Platform.UIString.LocalizedString;\n #titleInternal!: string;\n #registration: SettingRegistration|null = null;\n #requiresUserAction?: boolean;\n #value?: V;\n // TODO(crbug.com/1172300) Type cannot be inferred without changes to consumers. See above.\n #serializer: Serializer = JSON;\n #hadUserAction?: boolean;\n #disabled?: boolean;\n #deprecation: Deprecation|null = null;\n\n constructor(\n readonly name: string, readonly defaultValue: V, private readonly eventSupport: ObjectWrapper,\n readonly storage: SettingsStorage) {\n storage.register(this.name);\n }\n\n setSerializer(serializer: Serializer): void {\n this.#serializer = serializer;\n }\n\n addChangeListener(listener: (arg0: EventTargetEvent) => void, thisObject?: Object): EventDescriptor {\n return this.eventSupport.addEventListener(this.name, listener, thisObject);\n }\n\n removeChangeListener(listener: (arg0: EventTargetEvent) => void, thisObject?: Object): void {\n this.eventSupport.removeEventListener(this.name, listener, thisObject);\n }\n\n title(): string {\n if (this.#titleInternal) {\n return this.#titleInternal;\n }\n if (this.#titleFunction) {\n return this.#titleFunction();\n }\n return '';\n }\n\n setTitleFunction(titleFunction: (() => Platform.UIString.LocalizedString)|undefined): void {\n if (titleFunction) {\n this.#titleFunction = titleFunction;\n }\n }\n\n setTitle(title: string): void {\n this.#titleInternal = title;\n }\n\n setRequiresUserAction(requiresUserAction: boolean): void {\n this.#requiresUserAction = requiresUserAction;\n }\n\n disabled(): boolean {\n if (this.#registration?.disabledCondition) {\n const {disabled} = this.#registration.disabledCondition(Settings.instance().getHostConfig());\n // If registration does not disable it, pass through to #disabled\n // attribute check.\n if (disabled) {\n return true;\n }\n }\n return this.#disabled || false;\n }\n\n disabledReason(): string|undefined {\n if (this.#registration?.disabledCondition) {\n const result = this.#registration.disabledCondition(Settings.instance().getHostConfig());\n if (result.disabled) {\n return result.reason;\n }\n }\n return undefined;\n }\n\n setDisabled(disabled: boolean): void {\n this.#disabled = disabled;\n this.eventSupport.dispatchEventToListeners(this.name);\n }\n\n get(): V {\n if (this.#requiresUserAction && !this.#hadUserAction) {\n return this.defaultValue;\n }\n\n if (typeof this.#value !== 'undefined') {\n return this.#value;\n }\n\n this.#value = this.defaultValue;\n if (this.storage.has(this.name)) {\n try {\n this.#value = this.#serializer.parse(this.storage.get(this.name));\n } catch (e) {\n this.storage.remove(this.name);\n }\n }\n return this.#value;\n }\n\n async forceGet(): Promise {\n const name = this.name;\n const oldValue = this.storage.get(name);\n const value = await this.storage.forceGet(name);\n this.#value = this.defaultValue;\n if (value) {\n try {\n this.#value = this.#serializer.parse(value);\n } catch (e) {\n this.storage.remove(this.name);\n }\n }\n\n if (oldValue !== value) {\n this.eventSupport.dispatchEventToListeners(this.name, this.#value);\n }\n\n return this.#value;\n }\n\n set(value: V): void {\n this.#hadUserAction = true;\n this.#value = value;\n try {\n const settingString = this.#serializer.stringify(value);\n try {\n this.storage.set(this.name, settingString);\n } catch (e) {\n this.printSettingsSavingError(e.message, this.name, settingString);\n }\n } catch (e) {\n Console.instance().error('Cannot stringify setting with name: ' + this.name + ', error: ' + e.message);\n }\n this.eventSupport.dispatchEventToListeners(this.name, value);\n }\n\n setRegistration(registration: SettingRegistration): void {\n this.#registration = registration;\n const {deprecationNotice} = registration;\n if (deprecationNotice?.disabled) {\n const experiment = deprecationNotice.experiment ?\n Root.Runtime.experiments.allConfigurableExperiments().find(e => e.name === deprecationNotice.experiment) :\n undefined;\n if ((!experiment || experiment.isEnabled())) {\n this.set(this.defaultValue);\n this.setDisabled(true);\n }\n }\n }\n\n type(): SettingType|null {\n if (this.#registration) {\n return this.#registration.settingType;\n }\n return null;\n }\n\n options(): SimpleSettingOption[] {\n if (this.#registration && this.#registration.options) {\n return this.#registration.options.map(opt => {\n const {value, title, text, raw} = opt;\n return {\n value,\n title: title(),\n text: typeof text === 'function' ? text() : text,\n raw,\n };\n });\n }\n return [];\n }\n\n reloadRequired(): boolean|null {\n if (this.#registration) {\n return this.#registration.reloadRequired || null;\n }\n return null;\n }\n\n category(): SettingCategory|null {\n if (this.#registration) {\n return this.#registration.category || null;\n }\n return null;\n }\n\n tags(): string|null {\n if (this.#registration && this.#registration.tags) {\n // Get localized keys and separate by null character to prevent fuzzy matching from matching across them.\n return this.#registration.tags.map(tag => tag()).join('\\0');\n }\n return null;\n }\n\n order(): number|null {\n if (this.#registration) {\n return this.#registration.order || null;\n }\n return null;\n }\n\n get deprecation(): Deprecation|null {\n if (!this.#registration || !this.#registration.deprecationNotice) {\n return null;\n }\n if (!this.#deprecation) {\n this.#deprecation = new Deprecation(this.#registration);\n }\n return this.#deprecation;\n }\n\n private printSettingsSavingError(message: string, name: string, value: string): void {\n const errorMessage =\n 'Error saving setting with name: ' + this.name + ', value length: ' + value.length + '. Error: ' + message;\n console.error(errorMessage);\n Console.instance().error(errorMessage);\n this.storage.dumpSizes();\n }\n}\n\n// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport class RegExpSetting extends Setting {\n #regexFlags: string|undefined;\n #regex?: RegExp|null;\n\n constructor(\n name: string, defaultValue: string, eventSupport: ObjectWrapper, storage: SettingsStorage,\n regexFlags?: string) {\n super(name, defaultValue ? [{pattern: defaultValue}] : [], eventSupport, storage);\n this.#regexFlags = regexFlags;\n }\n\n override get(): string {\n const result = [];\n const items = this.getAsArray();\n for (let i = 0; i < items.length; ++i) {\n const item = items[i];\n if (item.pattern && !item.disabled) {\n result.push(item.pattern);\n }\n }\n return result.join('|');\n }\n\n getAsArray(): RegExpSettingItem[] {\n return super.get();\n }\n\n override set(value: string): void {\n this.setAsArray([{pattern: value, disabled: false}]);\n }\n\n setAsArray(value: RegExpSettingItem[]): void {\n this.#regex = undefined;\n super.set(value);\n }\n\n asRegExp(): RegExp|null {\n if (typeof this.#regex !== 'undefined') {\n return this.#regex;\n }\n this.#regex = null;\n try {\n const pattern = this.get();\n if (pattern) {\n this.#regex = new RegExp(pattern, this.#regexFlags || '');\n }\n } catch (e) {\n }\n return this.#regex;\n }\n}\n\nexport class VersionController {\n static readonly GLOBAL_VERSION_SETTING_NAME = 'inspectorVersion';\n static readonly SYNCED_VERSION_SETTING_NAME = 'syncedInspectorVersion';\n static readonly LOCAL_VERSION_SETTING_NAME = 'localInspectorVersion';\n\n static readonly CURRENT_VERSION = 37;\n\n readonly #globalVersionSetting: Setting;\n readonly #syncedVersionSetting: Setting;\n readonly #localVersionSetting: Setting;\n\n constructor() {\n // If no version setting is found, we initialize with the current version and don't do anything.\n this.#globalVersionSetting = Settings.instance().createSetting(\n VersionController.GLOBAL_VERSION_SETTING_NAME, VersionController.CURRENT_VERSION, SettingStorageType.GLOBAL);\n this.#syncedVersionSetting = Settings.instance().createSetting(\n VersionController.SYNCED_VERSION_SETTING_NAME, VersionController.CURRENT_VERSION, SettingStorageType.SYNCED);\n this.#localVersionSetting = Settings.instance().createSetting(\n VersionController.LOCAL_VERSION_SETTING_NAME, VersionController.CURRENT_VERSION, SettingStorageType.LOCAL);\n }\n\n /**\n * Force re-sets all version number settings to the current version without\n * running any migrations.\n */\n resetToCurrent(): void {\n this.#globalVersionSetting.set(VersionController.CURRENT_VERSION);\n this.#syncedVersionSetting.set(VersionController.CURRENT_VERSION);\n this.#localVersionSetting.set(VersionController.CURRENT_VERSION);\n }\n\n /**\n * Runs the appropriate migrations and updates the version settings accordingly.\n *\n * To determine what migrations to run we take the minimum of all version number settings.\n *\n * IMPORTANT: All migrations must be idempotent since they might be applied multiple times.\n */\n updateVersion(): void {\n const currentVersion = VersionController.CURRENT_VERSION;\n const minimumVersion =\n Math.min(this.#globalVersionSetting.get(), this.#syncedVersionSetting.get(), this.#localVersionSetting.get());\n const methodsToRun = this.methodsToRunToUpdateVersion(minimumVersion, currentVersion);\n console.assert(\n // @ts-ignore\n this[`updateVersionFrom${currentVersion}To${currentVersion + 1}`] === undefined,\n 'Unexpected migration method found. Increment CURRENT_VERSION or remove the method.');\n for (const method of methodsToRun) {\n // @ts-ignore Special version method matching\n this[method].call(this);\n }\n this.resetToCurrent();\n }\n\n private methodsToRunToUpdateVersion(oldVersion: number, currentVersion: number): string[] {\n const result = [];\n for (let i = oldVersion; i < currentVersion; ++i) {\n result.push('updateVersionFrom' + i + 'To' + (i + 1));\n }\n return result;\n }\n\n private updateVersionFrom0To1(): void {\n this.clearBreakpointsWhenTooMany(Settings.instance().createLocalSetting('breakpoints', []), 500000);\n }\n\n private updateVersionFrom1To2(): void {\n Settings.instance().createSetting('previouslyViewedFiles', []).set([]);\n }\n\n private updateVersionFrom2To3(): void {\n Settings.instance().createSetting('fileSystemMapping', {}).set({});\n removeSetting(Settings.instance().createSetting('fileMappingEntries', []));\n }\n\n private updateVersionFrom3To4(): void {\n const advancedMode = Settings.instance().createSetting('showHeaSnapshotObjectsHiddenProperties', false);\n moduleSetting('showAdvancedHeapSnapshotProperties').set(advancedMode.get());\n removeSetting(advancedMode);\n }\n\n private updateVersionFrom4To5(): void {\n const settingNames: {\n [x: string]: string,\n } = {\n FileSystemViewSidebarWidth: 'fileSystemViewSplitViewState',\n elementsSidebarWidth: 'elementsPanelSplitViewState',\n StylesPaneSplitRatio: 'stylesPaneSplitViewState',\n heapSnapshotRetainersViewSize: 'heapSnapshotSplitViewState',\n 'InspectorView.splitView': 'InspectorView.splitViewState',\n 'InspectorView.screencastSplitView': 'InspectorView.screencastSplitViewState',\n 'Inspector.drawerSplitView': 'Inspector.drawerSplitViewState',\n layerDetailsSplitView: 'layerDetailsSplitViewState',\n networkSidebarWidth: 'networkPanelSplitViewState',\n sourcesSidebarWidth: 'sourcesPanelSplitViewState',\n scriptsPanelNavigatorSidebarWidth: 'sourcesPanelNavigatorSplitViewState',\n sourcesPanelSplitSidebarRatio: 'sourcesPanelDebuggerSidebarSplitViewState',\n 'timeline-details': 'timelinePanelDetailsSplitViewState',\n 'timeline-split': 'timelinePanelRecorsSplitViewState',\n 'timeline-view': 'timelinePanelTimelineStackSplitViewState',\n auditsSidebarWidth: 'auditsPanelSplitViewState',\n layersSidebarWidth: 'layersPanelSplitViewState',\n profilesSidebarWidth: 'profilesPanelSplitViewState',\n resourcesSidebarWidth: 'resourcesPanelSplitViewState',\n };\n const empty = {};\n for (const oldName in settingNames) {\n const newName = settingNames[oldName];\n const oldNameH = oldName + 'H';\n\n let newValue: {}|null = null;\n const oldSetting = Settings.instance().createSetting(oldName, empty);\n if (oldSetting.get() !== empty) {\n newValue = newValue || {};\n // @ts-expect-error\n newValue.vertical = {};\n // @ts-expect-error\n newValue.vertical.size = oldSetting.get();\n removeSetting(oldSetting);\n }\n const oldSettingH = Settings.instance().createSetting(oldNameH, empty);\n if (oldSettingH.get() !== empty) {\n newValue = newValue || {};\n // @ts-expect-error\n newValue.horizontal = {};\n // @ts-expect-error\n newValue.horizontal.size = oldSettingH.get();\n removeSetting(oldSettingH);\n }\n if (newValue) {\n Settings.instance().createSetting(newName, {}).set(newValue);\n }\n }\n }\n\n private updateVersionFrom5To6(): void {\n const settingNames: {\n [x: string]: string,\n } = {\n debuggerSidebarHidden: 'sourcesPanelSplitViewState',\n navigatorHidden: 'sourcesPanelNavigatorSplitViewState',\n 'WebInspector.Drawer.showOnLoad': 'Inspector.drawerSplitViewState',\n };\n\n for (const oldName in settingNames) {\n const oldSetting = Settings.instance().createSetting(oldName, null);\n if (oldSetting.get() === null) {\n removeSetting(oldSetting);\n continue;\n }\n\n const newName = settingNames[oldName];\n const invert = oldName === 'WebInspector.Drawer.showOnLoad';\n const hidden = oldSetting.get() !== invert;\n removeSetting(oldSetting);\n const showMode = hidden ? 'OnlyMain' : 'Both';\n\n const newSetting = Settings.instance().createSetting(newName, {});\n const newValue = newSetting.get() || {};\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // @ts-expect-error\n newValue.vertical = newValue.vertical || {};\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // @ts-expect-error\n newValue.vertical.showMode = showMode;\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // @ts-expect-error\n newValue.horizontal = newValue.horizontal || {};\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // @ts-expect-error\n newValue.horizontal.showMode = showMode;\n newSetting.set(newValue);\n }\n }\n\n private updateVersionFrom6To7(): void {\n const settingNames = {\n sourcesPanelNavigatorSplitViewState: 'sourcesPanelNavigatorSplitViewState',\n elementsPanelSplitViewState: 'elementsPanelSplitViewState',\n stylesPaneSplitViewState: 'stylesPaneSplitViewState',\n sourcesPanelDebuggerSidebarSplitViewState: 'sourcesPanelDebuggerSidebarSplitViewState',\n };\n\n const empty = {};\n for (const name in settingNames) {\n const setting =\n Settings.instance().createSetting<{vertical?: {size?: number}, horizontal?: {size?: number}}>(name, empty);\n const value = setting.get();\n if (value === empty) {\n continue;\n }\n // Zero out saved percentage sizes, and they will be restored to defaults.\n if (value.vertical && value.vertical.size && value.vertical.size < 1) {\n value.vertical.size = 0;\n }\n if (value.horizontal && value.horizontal.size && value.horizontal.size < 1) {\n value.horizontal.size = 0;\n }\n setting.set(value);\n }\n }\n\n private updateVersionFrom7To8(): void {\n }\n\n private updateVersionFrom8To9(): void {\n const settingNames = ['skipStackFramesPattern', 'workspaceFolderExcludePattern'];\n\n for (let i = 0; i < settingNames.length; ++i) {\n const setting = Settings.instance().createSetting(settingNames[i], '');\n let value = setting.get();\n if (!value) {\n return;\n }\n if (typeof value === 'string') {\n value = [value];\n }\n for (let j = 0; j < value.length; ++j) {\n if (typeof value[j] === 'string') {\n value[j] = {pattern: value[j]};\n }\n }\n setting.set(value);\n }\n }\n\n private updateVersionFrom9To10(): void {\n // This one is localStorage specific, which is fine.\n if (!window.localStorage) {\n return;\n }\n for (const key in window.localStorage) {\n if (key.startsWith('revision-history')) {\n window.localStorage.removeItem(key);\n }\n }\n }\n\n private updateVersionFrom10To11(): void {\n const oldSettingName = 'customDevicePresets';\n const newSettingName = 'customEmulatedDeviceList';\n const oldSetting = Settings.instance().createSetting(oldSettingName, undefined);\n const list = oldSetting.get();\n if (!Array.isArray(list)) {\n return;\n }\n const newList = [];\n for (let i = 0; i < list.length; ++i) {\n const value = list[i];\n const device: {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [x: string]: any,\n } = {};\n device['title'] = value['title'];\n device['type'] = 'unknown';\n device['user-agent'] = value['userAgent'];\n device['capabilities'] = [];\n if (value['touch']) {\n device['capabilities'].push('touch');\n }\n if (value['mobile']) {\n device['capabilities'].push('mobile');\n }\n device['screen'] = {};\n device['screen']['vertical'] = {width: value['width'], height: value['height']};\n device['screen']['horizontal'] = {width: value['height'], height: value['width']};\n device['screen']['device-pixel-ratio'] = value['deviceScaleFactor'];\n device['modes'] = [];\n device['show-by-default'] = true;\n device['show'] = 'Default';\n newList.push(device);\n }\n if (newList.length) {\n Settings.instance().createSetting(newSettingName, []).set(newList);\n }\n removeSetting(oldSetting);\n }\n\n private updateVersionFrom11To12(): void {\n this.migrateSettingsFromLocalStorage();\n }\n\n private updateVersionFrom12To13(): void {\n this.migrateSettingsFromLocalStorage();\n removeSetting(Settings.instance().createSetting('timelineOverviewMode', ''));\n }\n\n private updateVersionFrom13To14(): void {\n const defaultValue = {throughput: -1, latency: 0};\n Settings.instance().createSetting('networkConditions', defaultValue).set(defaultValue);\n }\n\n private updateVersionFrom14To15(): void {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const setting = Settings.instance().createLocalSetting('workspaceExcludedFolders', {});\n const oldValue = setting.get();\n const newValue: {\n [x: string]: string[],\n } = {};\n for (const fileSystemPath in oldValue) {\n newValue[fileSystemPath] = [];\n for (const entry of oldValue[fileSystemPath]) {\n newValue[fileSystemPath].push(entry.path);\n }\n }\n setting.set(newValue);\n }\n\n private updateVersionFrom15To16(): void {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const setting = Settings.instance().createSetting('InspectorView.panelOrder', {});\n const tabOrders = setting.get();\n for (const key of Object.keys(tabOrders)) {\n tabOrders[key] = (tabOrders[key] + 1) * 10;\n }\n setting.set(tabOrders);\n }\n\n private updateVersionFrom16To17(): void {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const setting = Settings.instance().createSetting('networkConditionsCustomProfiles', []);\n const oldValue = setting.get();\n const newValue = [];\n if (Array.isArray(oldValue)) {\n for (const preset of oldValue) {\n if (typeof preset.title === 'string' && typeof preset.value === 'object' &&\n typeof preset.value.throughput === 'number' && typeof preset.value.latency === 'number') {\n newValue.push({\n title: preset.title,\n value: {download: preset.value.throughput, upload: preset.value.throughput, latency: preset.value.latency},\n });\n }\n }\n }\n setting.set(newValue);\n }\n\n private updateVersionFrom17To18(): void {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const setting = Settings.instance().createLocalSetting('workspaceExcludedFolders', {});\n const oldValue = setting.get();\n const newValue: {\n [x: string]: string,\n } = {};\n for (const oldKey in oldValue) {\n let newKey = oldKey.replace(/\\\\/g, '/');\n if (!newKey.startsWith('file://')) {\n if (newKey.startsWith('/')) {\n newKey = 'file://' + newKey;\n } else {\n newKey = 'file:///' + newKey;\n }\n }\n newValue[newKey] = oldValue[oldKey];\n }\n setting.set(newValue);\n }\n\n private updateVersionFrom18To19(): void {\n const defaultColumns = {status: true, type: true, initiator: true, size: true, time: true};\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const visibleColumnSettings = Settings.instance().createSetting('networkLogColumnsVisibility', defaultColumns);\n const visibleColumns = visibleColumnSettings.get();\n visibleColumns.name = true;\n visibleColumns.timeline = true;\n\n const configs: {\n [x: string]: {\n visible: number,\n },\n } = {};\n for (const columnId in visibleColumns) {\n if (!visibleColumns.hasOwnProperty(columnId)) {\n continue;\n }\n configs[columnId.toLowerCase()] = {visible: visibleColumns[columnId]};\n }\n const newSetting = Settings.instance().createSetting('networkLogColumns', {});\n newSetting.set(configs);\n removeSetting(visibleColumnSettings);\n }\n\n private updateVersionFrom19To20(): void {\n const oldSetting = Settings.instance().createSetting('InspectorView.panelOrder', {});\n const newSetting = Settings.instance().createSetting('panel-tabOrder', {});\n newSetting.set(oldSetting.get());\n removeSetting(oldSetting);\n }\n\n private updateVersionFrom20To21(): void {\n const networkColumns = Settings.instance().createSetting('networkLogColumns', {});\n const columns = (networkColumns.get() as {\n [x: string]: string,\n });\n delete columns['timeline'];\n delete columns['waterfall'];\n networkColumns.set(columns);\n }\n\n private updateVersionFrom21To22(): void {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const breakpointsSetting = Settings.instance().createLocalSetting('breakpoints', []);\n const breakpoints = breakpointsSetting.get();\n for (const breakpoint of breakpoints) {\n breakpoint['url'] = breakpoint['sourceFileId'];\n delete breakpoint['sourceFileId'];\n }\n breakpointsSetting.set(breakpoints);\n }\n\n private updateVersionFrom22To23(): void {\n // This update is no-op.\n }\n\n private updateVersionFrom23To24(): void {\n const oldSetting = Settings.instance().createSetting('searchInContentScripts', false);\n const newSetting = Settings.instance().createSetting('searchInAnonymousAndContentScripts', false);\n newSetting.set(oldSetting.get());\n removeSetting(oldSetting);\n }\n\n private updateVersionFrom24To25(): void {\n const defaultColumns = {status: true, type: true, initiator: true, size: true, time: true};\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const networkLogColumnsSetting = Settings.instance().createSetting('networkLogColumns', defaultColumns);\n const columns = networkLogColumnsSetting.get();\n delete columns.product;\n networkLogColumnsSetting.set(columns);\n }\n\n private updateVersionFrom25To26(): void {\n const oldSetting = Settings.instance().createSetting('messageURLFilters', {});\n const urls = Object.keys(oldSetting.get());\n const textFilter = urls.map(url => `-url:${url}`).join(' ');\n if (textFilter) {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const textFilterSetting = Settings.instance().createSetting('console.textFilter', '');\n const suffix = textFilterSetting.get() ? ` ${textFilterSetting.get()}` : '';\n textFilterSetting.set(`${textFilter}${suffix}`);\n }\n removeSetting(oldSetting);\n }\n\n private updateVersionFrom26To27(): void {\n function renameKeyInObjectSetting(settingName: string, from: string, to: string): void {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const setting = Settings.instance().createSetting(settingName, {});\n const value = setting.get();\n if (from in value) {\n value[to] = value[from];\n delete value[from];\n setting.set(value);\n }\n }\n\n function renameInStringSetting(settingName: string, from: string, to: string): void {\n const setting = Settings.instance().createSetting(settingName, '');\n const value = setting.get();\n if (value === from) {\n setting.set(to);\n }\n }\n\n renameKeyInObjectSetting('panel-tabOrder', 'audits2', 'audits');\n renameKeyInObjectSetting('panel-closeableTabs', 'audits2', 'audits');\n renameInStringSetting('panel-selectedTab', 'audits2', 'audits');\n }\n\n private updateVersionFrom27To28(): void {\n const setting = Settings.instance().createSetting('uiTheme', 'systemPreferred');\n if (setting.get() === 'default') {\n setting.set('systemPreferred');\n }\n }\n\n private updateVersionFrom28To29(): void {\n function renameKeyInObjectSetting(settingName: string, from: string, to: string): void {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const setting = Settings.instance().createSetting(settingName, {});\n const value = setting.get();\n if (from in value) {\n value[to] = value[from];\n delete value[from];\n setting.set(value);\n }\n }\n\n function renameInStringSetting(settingName: string, from: string, to: string): void {\n const setting = Settings.instance().createSetting(settingName, '');\n const value = setting.get();\n if (value === from) {\n setting.set(to);\n }\n }\n\n renameKeyInObjectSetting('panel-tabOrder', 'audits', 'lighthouse');\n renameKeyInObjectSetting('panel-closeableTabs', 'audits', 'lighthouse');\n renameInStringSetting('panel-selectedTab', 'audits', 'lighthouse');\n }\n\n private updateVersionFrom29To30(): void {\n // Create new location agnostic setting\n const closeableTabSetting = Settings.instance().createSetting('closeableTabs', {});\n\n // Read current settings\n const panelCloseableTabSetting = Settings.instance().createSetting('panel-closeableTabs', {});\n const drawerCloseableTabSetting = Settings.instance().createSetting('drawer-view-closeableTabs', {});\n const openTabsInPanel = panelCloseableTabSetting.get();\n const openTabsInDrawer = panelCloseableTabSetting.get();\n\n // Set #value of new setting\n const newValue = Object.assign(openTabsInDrawer, openTabsInPanel);\n closeableTabSetting.set(newValue);\n\n // Remove old settings\n removeSetting(panelCloseableTabSetting);\n removeSetting(drawerCloseableTabSetting);\n }\n\n private updateVersionFrom30To31(): void {\n // Remove recorder_recordings setting that was used for storing recordings\n // by an old recorder experiment.\n const recordingsSetting = Settings.instance().createSetting('recorder_recordings', []);\n removeSetting(recordingsSetting);\n }\n\n updateVersionFrom31To32(): void {\n // Introduce the new 'resourceTypeName' property on stored breakpoints. Prior to\n // this change we synchronized the breakpoint only by URL, but since we don't\n // know on which resource type the given breakpoint was set, we just assume\n // 'script' here to keep things simple.\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const breakpointsSetting = Settings.instance().createLocalSetting('breakpoints', []);\n const breakpoints = breakpointsSetting.get();\n for (const breakpoint of breakpoints) {\n breakpoint['resourceTypeName'] = 'script';\n }\n breakpointsSetting.set(breakpoints);\n }\n\n updateVersionFrom32To33(): void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const previouslyViewedFilesSetting = Settings.instance().createLocalSetting('previouslyViewedFiles', []);\n let previouslyViewedFiles = previouslyViewedFilesSetting.get();\n\n // Discard old 'previouslyViewedFiles' items that don't have a 'url' property.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n previouslyViewedFiles = previouslyViewedFiles.filter((previouslyViewedFile: any) => 'url' in previouslyViewedFile);\n\n // Introduce the new 'resourceTypeName' property on previously viewed files.\n // Prior to this change we only keyed them based on the URL, but since we\n // don't know which resource type the given file had, we just assume 'script'\n // here to keep things simple.\n for (const previouslyViewedFile of previouslyViewedFiles) {\n previouslyViewedFile['resourceTypeName'] = 'script';\n }\n\n previouslyViewedFilesSetting.set(previouslyViewedFiles);\n }\n\n updateVersionFrom33To34(): void {\n // Introduces the 'isLogpoint' property on stored breakpoints. This information was\n // previously encoded in the 'condition' itself. This migration leaves the condition\n // alone but ensures that 'isLogpoint' is accurate for already stored breakpoints.\n // This enables us to use the 'isLogpoint' property in code.\n // A separate migration will remove the special encoding from the condition itself\n // once all refactorings are done.\n\n // The prefix/suffix are hardcoded here, since these constants will be removed in\n // the future.\n const logpointPrefix = '/** DEVTOOLS_LOGPOINT */ console.log(';\n const logpointSuffix = ')';\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const breakpointsSetting = Settings.instance().createLocalSetting('breakpoints', []);\n const breakpoints = breakpointsSetting.get();\n for (const breakpoint of breakpoints) {\n const isLogpoint =\n breakpoint.condition.startsWith(logpointPrefix) && breakpoint.condition.endsWith(logpointSuffix);\n breakpoint['isLogpoint'] = isLogpoint;\n }\n breakpointsSetting.set(breakpoints);\n }\n\n updateVersionFrom34To35(): void {\n // Uses the 'isLogpoint' property on stored breakpoints to remove the prefix/suffix\n // from logpoints. This way, we store the entered log point condition as the user\n // entered it.\n\n // The prefix/suffix are hardcoded here, since these constants will be removed in\n // the future.\n const logpointPrefix = '/** DEVTOOLS_LOGPOINT */ console.log(';\n const logpointSuffix = ')';\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const breakpointsSetting = Settings.instance().createLocalSetting('breakpoints', []);\n const breakpoints = breakpointsSetting.get();\n for (const breakpoint of breakpoints) {\n const {condition, isLogpoint} = breakpoint;\n if (isLogpoint) {\n breakpoint.condition = condition.slice(logpointPrefix.length, condition.length - logpointSuffix.length);\n }\n }\n breakpointsSetting.set(breakpoints);\n }\n\n updateVersionFrom35To36(): void {\n // We have changed the default from 'false' to 'true' and this updates the existing setting just for once.\n Settings.instance().createSetting('showThirdPartyIssues', true).set(true);\n }\n\n updateVersionFrom36To37(): void {\n const updateStorage = (storage: SettingsStorage): void => {\n for (const key of storage.keys()) {\n const normalizedKey = Settings.normalizeSettingName(key);\n if (normalizedKey !== key) {\n const value = storage.get(key);\n removeSetting({name: key, storage});\n storage.set(normalizedKey, value);\n }\n }\n };\n updateStorage(Settings.instance().globalStorage);\n updateStorage(Settings.instance().syncedStorage);\n updateStorage(Settings.instance().localStorage);\n\n for (const key of Settings.instance().globalStorage.keys()) {\n if ((key.startsWith('data-grid-') && key.endsWith('-column-weights')) || key.endsWith('-tab-order') ||\n key === 'views-location-override' || key === 'closeable-tabs') {\n const setting = Settings.instance().createSetting(key, {});\n setting.set(Platform.StringUtilities.toKebabCaseKeys(setting.get()));\n }\n if (key.endsWith('-selected-tab')) {\n const setting = Settings.instance().createSetting(key, '');\n setting.set(Platform.StringUtilities.toKebabCase(setting.get()));\n }\n }\n }\n\n /*\n * Any new migration should be added before this comment.\n *\n * IMPORTANT: Migrations must be idempotent, since they may be applied\n * multiple times! E.g. when renaming a setting one has to check that the\n * a setting with the new name does not yet exist.\n * ----------------------------------------------------------------------- */\n\n private migrateSettingsFromLocalStorage(): void {\n // This step migrates all the settings except for the ones below into the browser profile.\n const localSettings = new Set([\n 'advancedSearchConfig',\n 'breakpoints',\n 'consoleHistory',\n 'domBreakpoints',\n 'eventListenerBreakpoints',\n 'fileSystemMapping',\n 'lastSelectedSourcesSidebarPaneTab',\n 'previouslyViewedFiles',\n 'savedURLs',\n 'watchExpressions',\n 'workspaceExcludedFolders',\n 'xhrBreakpoints',\n ]);\n if (!window.localStorage) {\n return;\n }\n\n for (const key in window.localStorage) {\n if (localSettings.has(key)) {\n continue;\n }\n const value = window.localStorage[key];\n window.localStorage.removeItem(key);\n Settings.instance().globalStorage.set(key, value);\n }\n }\n\n private clearBreakpointsWhenTooMany(breakpointsSetting: Setting, maxBreakpointsCount: number): void {\n // If there are too many breakpoints in a storage, it is likely due to a recent bug that caused\n // periodical breakpoints duplication leading to inspector slowness.\n if (breakpointsSetting.get().length > maxBreakpointsCount) {\n breakpointsSetting.set([]);\n }\n }\n}\n\nexport const enum SettingStorageType {\n /**\n * Synced storage persists settings with the active Chrome profile but also\n * syncs the settings across devices via Chrome Sync.\n */\n SYNCED = 'Synced',\n /** Global storage persists settings with the active Chrome profile */\n GLOBAL = 'Global',\n /** Uses Window.localStorage */\n LOCAL = 'Local',\n /** Session storage dies when DevTools window closes */\n SESSION = 'Session',\n}\n\nexport function moduleSetting(settingName: string): Setting {\n return Settings.instance().moduleSetting(settingName);\n}\n\nexport function settingForTest(settingName: string): Setting {\n return Settings.instance().settingForTest(settingName);\n}\n\nexport {\n getLocalizedSettingsCategory,\n maybeRemoveSettingExtension,\n registerSettingExtension,\n RegExpSettingItem,\n SettingCategory,\n SettingExtensionOption,\n SettingRegistration,\n SettingType,\n registerSettingsForTest,\n resetSettings,\n};\n\nexport interface Serializer {\n stringify: (value: I) => string;\n parse: (value: string) => O;\n}\n\nexport interface SimpleSettingOption {\n value: string|boolean;\n title: string;\n text?: string;\n raw?: boolean;\n}\n"]} \ No newline at end of file +{"version":3,"file":"Settings.js","sourceRoot":"","sources":["../../../../../../front_end/core/common/Settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAExC,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AAErC,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAC1C,OAAO,EACL,4BAA4B,EAC5B,qBAAqB,IAAI,6BAA6B,EAEtD,2BAA2B,EAE3B,wBAAwB,EACxB,uBAAuB,EACvB,aAAa,GAKd,MAAM,0BAA0B,CAAC;AAElC,IAAI,gBAAoC,CAAC;AAEzC,MAAM,OAAO,QAAQ;IAUN;IAAyC;IACzC;IAVJ,eAAe,CAAkB;IAC1C,cAAc,CAAc;IAC5B,4BAA4B,CAAoC;IAChE,aAAa,CAA+B;IAC5C,SAAS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GACd,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 Platform from '../platform/platform.js';\nimport * as Root from '../root/root.js';\n\nimport {Console} from './Console.js';\nimport {type EventDescriptor, type EventTargetEvent, type GenericEvents} from './EventTarget.js';\nimport {ObjectWrapper} from './Object.js';\nimport {\n getLocalizedSettingsCategory,\n getRegisteredSettings as getRegisteredSettingsInternal,\n type LearnMore,\n maybeRemoveSettingExtension,\n type RegExpSettingItem,\n registerSettingExtension,\n registerSettingsForTest,\n resetSettings,\n SettingCategory,\n type SettingExtensionOption,\n type SettingRegistration,\n SettingType,\n} from './SettingRegistration.js';\n\nlet settingsInstance: Settings|undefined;\n\nexport class Settings {\n readonly #sessionStorage: SettingsStorage;\n settingNameSet: Set;\n orderValuesBySettingCategory: Map>;\n #eventSupport: ObjectWrapper;\n #registry: Map>;\n readonly moduleSettings: Map>;\n readonly #config: Root.Runtime.HostConfig;\n\n private constructor(\n readonly syncedStorage: SettingsStorage, readonly globalStorage: SettingsStorage,\n readonly localStorage: SettingsStorage, config?: Root.Runtime.HostConfig) {\n this.#sessionStorage = new SettingsStorage({});\n\n this.settingNameSet = new Set();\n\n this.orderValuesBySettingCategory = new Map();\n\n this.#eventSupport = new ObjectWrapper();\n this.#registry = new Map();\n this.moduleSettings = new Map();\n\n this.#config = config || {};\n for (const registration of this.getRegisteredSettings()) {\n const {settingName, defaultValue, storageType} = registration;\n const isRegex = registration.settingType === SettingType.REGEX;\n\n const evaluatedDefaultValue = typeof defaultValue === 'function' ? defaultValue(this.#config) : defaultValue;\n const setting = isRegex && typeof evaluatedDefaultValue === 'string' ?\n this.createRegExpSetting(settingName, evaluatedDefaultValue, undefined, storageType) :\n this.createSetting(settingName, evaluatedDefaultValue, storageType);\n\n setting.setTitleFunction(registration.title);\n if (registration.userActionCondition) {\n setting.setRequiresUserAction(Boolean(Root.Runtime.Runtime.queryParam(registration.userActionCondition)));\n }\n setting.setRegistration(registration);\n\n this.registerModuleSetting(setting);\n }\n }\n\n getRegisteredSettings(): SettingRegistration[] {\n return getRegisteredSettingsInternal(this.#config);\n }\n\n static hasInstance(): boolean {\n return typeof settingsInstance !== 'undefined';\n }\n\n static instance(opts: {\n forceNew: boolean|null,\n syncedStorage: SettingsStorage|null,\n globalStorage: SettingsStorage|null,\n localStorage: SettingsStorage|null,\n config?: Root.Runtime.HostConfig,\n } = {forceNew: null, syncedStorage: null, globalStorage: null, localStorage: null}): Settings {\n const {forceNew, syncedStorage, globalStorage, localStorage, config} = opts;\n if (!settingsInstance || forceNew) {\n if (!syncedStorage || !globalStorage || !localStorage) {\n throw new Error(`Unable to create settings: global and local storage must be provided: ${new Error().stack}`);\n }\n\n settingsInstance = new Settings(syncedStorage, globalStorage, localStorage, config);\n }\n\n return settingsInstance;\n }\n\n static removeInstance(): void {\n settingsInstance = undefined;\n }\n\n getHostConfig(): Root.Runtime.HostConfig {\n return this.#config;\n }\n\n private registerModuleSetting(setting: Setting): void {\n const settingName = setting.name;\n const category = setting.category();\n const order = setting.order();\n if (this.settingNameSet.has(settingName)) {\n throw new Error(`Duplicate Setting name '${settingName}'`);\n }\n if (category && order) {\n const orderValues = this.orderValuesBySettingCategory.get(category) || new Set();\n if (orderValues.has(order)) {\n throw new Error(`Duplicate order value '${order}' for settings category '${category}'`);\n }\n orderValues.add(order);\n this.orderValuesBySettingCategory.set(category, orderValues);\n }\n this.settingNameSet.add(settingName);\n this.moduleSettings.set(setting.name, setting);\n }\n\n static normalizeSettingName(name: string): string {\n if ([\n VersionController.GLOBAL_VERSION_SETTING_NAME,\n VersionController.SYNCED_VERSION_SETTING_NAME,\n VersionController.LOCAL_VERSION_SETTING_NAME,\n 'currentDockState',\n 'isUnderTest',\n ].includes(name)) {\n return name;\n }\n return Platform.StringUtilities.toKebabCase(name);\n }\n\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n moduleSetting(settingName: string): Setting {\n const setting = this.moduleSettings.get(settingName) as Setting;\n if (!setting) {\n throw new Error('No setting registered: ' + settingName);\n }\n return setting;\n }\n\n settingForTest(settingName: string): Setting {\n const setting = this.#registry.get(settingName);\n if (!setting) {\n throw new Error('No setting registered: ' + settingName);\n }\n return setting;\n }\n\n /**\n * Get setting via key, and create a new setting if the requested setting does not exist.\n */\n createSetting(key: string, defaultValue: T, storageType?: SettingStorageType): Setting {\n const storage = this.storageFromType(storageType);\n let setting = (this.#registry.get(key) as Setting);\n if (!setting) {\n setting = new Setting(key, defaultValue, this.#eventSupport, storage);\n this.#registry.set(key, setting);\n }\n return setting;\n }\n\n createLocalSetting(key: string, defaultValue: T): Setting {\n return this.createSetting(key, defaultValue, SettingStorageType.LOCAL);\n }\n\n createRegExpSetting(key: string, defaultValue: string, regexFlags?: string, storageType?: SettingStorageType):\n RegExpSetting {\n if (!this.#registry.get(key)) {\n this.#registry.set(\n key, new RegExpSetting(key, defaultValue, this.#eventSupport, this.storageFromType(storageType), regexFlags));\n }\n return this.#registry.get(key) as RegExpSetting;\n }\n\n clearAll(): void {\n this.globalStorage.removeAll();\n this.syncedStorage.removeAll();\n this.localStorage.removeAll();\n new VersionController().resetToCurrent();\n }\n\n private storageFromType(storageType?: SettingStorageType): SettingsStorage {\n switch (storageType) {\n case SettingStorageType.LOCAL:\n return this.localStorage;\n case SettingStorageType.SESSION:\n return this.#sessionStorage;\n case SettingStorageType.GLOBAL:\n return this.globalStorage;\n case SettingStorageType.SYNCED:\n return this.syncedStorage;\n }\n return this.globalStorage;\n }\n\n getRegistry(): Map> {\n return this.#registry;\n }\n}\n\nexport interface SettingsBackingStore {\n register(setting: string): void;\n get(setting: string): Promise;\n set(setting: string, value: string): void;\n remove(setting: string): void;\n clear(): void;\n}\n\nexport const NOOP_STORAGE: SettingsBackingStore = {\n register: () => {},\n set: () => {},\n get: () => Promise.resolve(''),\n remove: () => {},\n clear: () => {},\n};\n\nexport class SettingsStorage {\n constructor(\n private object: Record, private readonly backingStore: SettingsBackingStore = NOOP_STORAGE,\n private readonly storagePrefix: string = '') {\n }\n\n register(name: string): void {\n name = this.storagePrefix + name;\n this.backingStore.register(name);\n }\n\n set(name: string, value: string): void {\n name = this.storagePrefix + name;\n this.object[name] = value;\n this.backingStore.set(name, value);\n }\n\n has(name: string): boolean {\n name = this.storagePrefix + name;\n return name in this.object;\n }\n\n get(name: string): string {\n name = this.storagePrefix + name;\n return this.object[name];\n }\n\n async forceGet(originalName: string): Promise {\n const name = this.storagePrefix + originalName;\n const value = await this.backingStore.get(name);\n if (value && value !== this.object[name]) {\n this.set(originalName, value);\n } else if (!value) {\n this.remove(originalName);\n }\n return value;\n }\n\n remove(name: string): void {\n name = this.storagePrefix + name;\n delete this.object[name];\n this.backingStore.remove(name);\n }\n\n removeAll(): void {\n this.object = {};\n this.backingStore.clear();\n }\n\n keys(): string[] {\n return Object.keys(this.object);\n }\n\n dumpSizes(): void {\n Console.instance().log('Ten largest settings: ');\n\n const sizes: {\n [x: string]: number,\n // @ts-expect-error __proto__ optimization\n } = {__proto__: null};\n for (const key in this.object) {\n sizes[key] = this.object[key].length;\n }\n const keys = Object.keys(sizes);\n\n function comparator(key1: string, key2: string): number {\n return sizes[key2] - sizes[key1];\n }\n\n keys.sort(comparator);\n\n for (let i = 0; i < 10 && i < keys.length; ++i) {\n Console.instance().log('Setting: \\'' + keys[i] + '\\', size: ' + sizes[keys[i]]);\n }\n }\n}\n\nfunction removeSetting(setting: {name: string, storage: SettingsStorage}): void {\n const name = setting.name;\n const settings = Settings.instance();\n\n settings.getRegistry().delete(name);\n settings.moduleSettings.delete(name);\n\n setting.storage.remove(name);\n}\n\nexport class Deprecation {\n readonly disabled: boolean;\n readonly warning: Platform.UIString.LocalizedString;\n readonly experiment?: Root.Runtime.Experiment;\n\n constructor({deprecationNotice}: SettingRegistration) {\n if (!deprecationNotice) {\n throw new Error('Cannot create deprecation info for a non-deprecated setting');\n }\n this.disabled = deprecationNotice.disabled;\n this.warning = deprecationNotice.warning();\n this.experiment = deprecationNotice.experiment ?\n Root.Runtime.experiments.allConfigurableExperiments().find(e => e.name === deprecationNotice.experiment) :\n undefined;\n }\n}\n\nexport class Setting {\n #titleFunction?: () => Platform.UIString.LocalizedString;\n #titleInternal!: string;\n #registration: SettingRegistration|null = null;\n #requiresUserAction?: boolean;\n #value?: V;\n // TODO(crbug.com/1172300) Type cannot be inferred without changes to consumers. See above.\n #serializer: Serializer = JSON;\n #hadUserAction?: boolean;\n #disabled?: boolean;\n #deprecation: Deprecation|null = null;\n\n constructor(\n readonly name: string, readonly defaultValue: V, private readonly eventSupport: ObjectWrapper,\n readonly storage: SettingsStorage) {\n storage.register(this.name);\n }\n\n setSerializer(serializer: Serializer): void {\n this.#serializer = serializer;\n }\n\n addChangeListener(listener: (arg0: EventTargetEvent) => void, thisObject?: Object): EventDescriptor {\n return this.eventSupport.addEventListener(this.name, listener, thisObject);\n }\n\n removeChangeListener(listener: (arg0: EventTargetEvent) => void, thisObject?: Object): void {\n this.eventSupport.removeEventListener(this.name, listener, thisObject);\n }\n\n title(): string {\n if (this.#titleInternal) {\n return this.#titleInternal;\n }\n if (this.#titleFunction) {\n return this.#titleFunction();\n }\n return '';\n }\n\n setTitleFunction(titleFunction: (() => Platform.UIString.LocalizedString)|undefined): void {\n if (titleFunction) {\n this.#titleFunction = titleFunction;\n }\n }\n\n setTitle(title: string): void {\n this.#titleInternal = title;\n }\n\n setRequiresUserAction(requiresUserAction: boolean): void {\n this.#requiresUserAction = requiresUserAction;\n }\n\n disabled(): boolean {\n if (this.#registration?.disabledCondition) {\n const {disabled} = this.#registration.disabledCondition(Settings.instance().getHostConfig());\n // If registration does not disable it, pass through to #disabled\n // attribute check.\n if (disabled) {\n return true;\n }\n }\n return this.#disabled || false;\n }\n\n disabledReason(): string|undefined {\n if (this.#registration?.disabledCondition) {\n const result = this.#registration.disabledCondition(Settings.instance().getHostConfig());\n if (result.disabled) {\n return result.reason;\n }\n }\n return undefined;\n }\n\n setDisabled(disabled: boolean): void {\n this.#disabled = disabled;\n this.eventSupport.dispatchEventToListeners(this.name);\n }\n\n get(): V {\n if (this.#requiresUserAction && !this.#hadUserAction) {\n return this.defaultValue;\n }\n\n if (typeof this.#value !== 'undefined') {\n return this.#value;\n }\n\n this.#value = this.defaultValue;\n if (this.storage.has(this.name)) {\n try {\n this.#value = this.#serializer.parse(this.storage.get(this.name));\n } catch (e) {\n this.storage.remove(this.name);\n }\n }\n return this.#value;\n }\n\n // Prefer this getter for settings which are \"disableable\". The plain getter returns `this.#value`,\n // even if the setting is disabled, which means the callsite has to explicitly call the `disabled()`\n // getter and add its own logic for the disabled state.\n getIfNotDisabled(): V|undefined {\n if (this.disabled()) {\n return;\n }\n return this.get();\n }\n\n async forceGet(): Promise {\n const name = this.name;\n const oldValue = this.storage.get(name);\n const value = await this.storage.forceGet(name);\n this.#value = this.defaultValue;\n if (value) {\n try {\n this.#value = this.#serializer.parse(value);\n } catch (e) {\n this.storage.remove(this.name);\n }\n }\n\n if (oldValue !== value) {\n this.eventSupport.dispatchEventToListeners(this.name, this.#value);\n }\n\n return this.#value;\n }\n\n set(value: V): void {\n this.#hadUserAction = true;\n this.#value = value;\n try {\n const settingString = this.#serializer.stringify(value);\n try {\n this.storage.set(this.name, settingString);\n } catch (e) {\n this.printSettingsSavingError(e.message, this.name, settingString);\n }\n } catch (e) {\n Console.instance().error('Cannot stringify setting with name: ' + this.name + ', error: ' + e.message);\n }\n this.eventSupport.dispatchEventToListeners(this.name, value);\n }\n\n setRegistration(registration: SettingRegistration): void {\n this.#registration = registration;\n const {deprecationNotice} = registration;\n if (deprecationNotice?.disabled) {\n const experiment = deprecationNotice.experiment ?\n Root.Runtime.experiments.allConfigurableExperiments().find(e => e.name === deprecationNotice.experiment) :\n undefined;\n if ((!experiment || experiment.isEnabled())) {\n this.set(this.defaultValue);\n this.setDisabled(true);\n }\n }\n }\n\n type(): SettingType|null {\n if (this.#registration) {\n return this.#registration.settingType;\n }\n return null;\n }\n\n options(): SimpleSettingOption[] {\n if (this.#registration && this.#registration.options) {\n return this.#registration.options.map(opt => {\n const {value, title, text, raw} = opt;\n return {\n value,\n title: title(),\n text: typeof text === 'function' ? text() : text,\n raw,\n };\n });\n }\n return [];\n }\n\n reloadRequired(): boolean|null {\n if (this.#registration) {\n return this.#registration.reloadRequired || null;\n }\n return null;\n }\n\n category(): SettingCategory|null {\n if (this.#registration) {\n return this.#registration.category || null;\n }\n return null;\n }\n\n tags(): string|null {\n if (this.#registration && this.#registration.tags) {\n // Get localized keys and separate by null character to prevent fuzzy matching from matching across them.\n return this.#registration.tags.map(tag => tag()).join('\\0');\n }\n return null;\n }\n\n order(): number|null {\n if (this.#registration) {\n return this.#registration.order || null;\n }\n return null;\n }\n\n learnMore(): LearnMore|null {\n return this.#registration?.learnMore ?? null;\n }\n\n get deprecation(): Deprecation|null {\n if (!this.#registration || !this.#registration.deprecationNotice) {\n return null;\n }\n if (!this.#deprecation) {\n this.#deprecation = new Deprecation(this.#registration);\n }\n return this.#deprecation;\n }\n\n private printSettingsSavingError(message: string, name: string, value: string): void {\n const errorMessage =\n 'Error saving setting with name: ' + this.name + ', value length: ' + value.length + '. Error: ' + message;\n console.error(errorMessage);\n Console.instance().error(errorMessage);\n this.storage.dumpSizes();\n }\n}\n\n// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport class RegExpSetting extends Setting {\n #regexFlags: string|undefined;\n #regex?: RegExp|null;\n\n constructor(\n name: string, defaultValue: string, eventSupport: ObjectWrapper, storage: SettingsStorage,\n regexFlags?: string) {\n super(name, defaultValue ? [{pattern: defaultValue}] : [], eventSupport, storage);\n this.#regexFlags = regexFlags;\n }\n\n override get(): string {\n const result = [];\n const items = this.getAsArray();\n for (let i = 0; i < items.length; ++i) {\n const item = items[i];\n if (item.pattern && !item.disabled) {\n result.push(item.pattern);\n }\n }\n return result.join('|');\n }\n\n getAsArray(): RegExpSettingItem[] {\n return super.get();\n }\n\n override set(value: string): void {\n this.setAsArray([{pattern: value, disabled: false}]);\n }\n\n setAsArray(value: RegExpSettingItem[]): void {\n this.#regex = undefined;\n super.set(value);\n }\n\n asRegExp(): RegExp|null {\n if (typeof this.#regex !== 'undefined') {\n return this.#regex;\n }\n this.#regex = null;\n try {\n const pattern = this.get();\n if (pattern) {\n this.#regex = new RegExp(pattern, this.#regexFlags || '');\n }\n } catch (e) {\n }\n return this.#regex;\n }\n}\n\nexport class VersionController {\n static readonly GLOBAL_VERSION_SETTING_NAME = 'inspectorVersion';\n static readonly SYNCED_VERSION_SETTING_NAME = 'syncedInspectorVersion';\n static readonly LOCAL_VERSION_SETTING_NAME = 'localInspectorVersion';\n\n static readonly CURRENT_VERSION = 37;\n\n readonly #globalVersionSetting: Setting;\n readonly #syncedVersionSetting: Setting;\n readonly #localVersionSetting: Setting;\n\n constructor() {\n // If no version setting is found, we initialize with the current version and don't do anything.\n this.#globalVersionSetting = Settings.instance().createSetting(\n VersionController.GLOBAL_VERSION_SETTING_NAME, VersionController.CURRENT_VERSION, SettingStorageType.GLOBAL);\n this.#syncedVersionSetting = Settings.instance().createSetting(\n VersionController.SYNCED_VERSION_SETTING_NAME, VersionController.CURRENT_VERSION, SettingStorageType.SYNCED);\n this.#localVersionSetting = Settings.instance().createSetting(\n VersionController.LOCAL_VERSION_SETTING_NAME, VersionController.CURRENT_VERSION, SettingStorageType.LOCAL);\n }\n\n /**\n * Force re-sets all version number settings to the current version without\n * running any migrations.\n */\n resetToCurrent(): void {\n this.#globalVersionSetting.set(VersionController.CURRENT_VERSION);\n this.#syncedVersionSetting.set(VersionController.CURRENT_VERSION);\n this.#localVersionSetting.set(VersionController.CURRENT_VERSION);\n }\n\n /**\n * Runs the appropriate migrations and updates the version settings accordingly.\n *\n * To determine what migrations to run we take the minimum of all version number settings.\n *\n * IMPORTANT: All migrations must be idempotent since they might be applied multiple times.\n */\n updateVersion(): void {\n const currentVersion = VersionController.CURRENT_VERSION;\n const minimumVersion =\n Math.min(this.#globalVersionSetting.get(), this.#syncedVersionSetting.get(), this.#localVersionSetting.get());\n const methodsToRun = this.methodsToRunToUpdateVersion(minimumVersion, currentVersion);\n console.assert(\n // @ts-ignore\n this[`updateVersionFrom${currentVersion}To${currentVersion + 1}`] === undefined,\n 'Unexpected migration method found. Increment CURRENT_VERSION or remove the method.');\n for (const method of methodsToRun) {\n // @ts-ignore Special version method matching\n this[method].call(this);\n }\n this.resetToCurrent();\n }\n\n private methodsToRunToUpdateVersion(oldVersion: number, currentVersion: number): string[] {\n const result = [];\n for (let i = oldVersion; i < currentVersion; ++i) {\n result.push('updateVersionFrom' + i + 'To' + (i + 1));\n }\n return result;\n }\n\n private updateVersionFrom0To1(): void {\n this.clearBreakpointsWhenTooMany(Settings.instance().createLocalSetting('breakpoints', []), 500000);\n }\n\n private updateVersionFrom1To2(): void {\n Settings.instance().createSetting('previouslyViewedFiles', []).set([]);\n }\n\n private updateVersionFrom2To3(): void {\n Settings.instance().createSetting('fileSystemMapping', {}).set({});\n removeSetting(Settings.instance().createSetting('fileMappingEntries', []));\n }\n\n private updateVersionFrom3To4(): void {\n const advancedMode = Settings.instance().createSetting('showHeaSnapshotObjectsHiddenProperties', false);\n moduleSetting('showAdvancedHeapSnapshotProperties').set(advancedMode.get());\n removeSetting(advancedMode);\n }\n\n private updateVersionFrom4To5(): void {\n const settingNames: {\n [x: string]: string,\n } = {\n FileSystemViewSidebarWidth: 'fileSystemViewSplitViewState',\n elementsSidebarWidth: 'elementsPanelSplitViewState',\n StylesPaneSplitRatio: 'stylesPaneSplitViewState',\n heapSnapshotRetainersViewSize: 'heapSnapshotSplitViewState',\n 'InspectorView.splitView': 'InspectorView.splitViewState',\n 'InspectorView.screencastSplitView': 'InspectorView.screencastSplitViewState',\n 'Inspector.drawerSplitView': 'Inspector.drawerSplitViewState',\n layerDetailsSplitView: 'layerDetailsSplitViewState',\n networkSidebarWidth: 'networkPanelSplitViewState',\n sourcesSidebarWidth: 'sourcesPanelSplitViewState',\n scriptsPanelNavigatorSidebarWidth: 'sourcesPanelNavigatorSplitViewState',\n sourcesPanelSplitSidebarRatio: 'sourcesPanelDebuggerSidebarSplitViewState',\n 'timeline-details': 'timelinePanelDetailsSplitViewState',\n 'timeline-split': 'timelinePanelRecorsSplitViewState',\n 'timeline-view': 'timelinePanelTimelineStackSplitViewState',\n auditsSidebarWidth: 'auditsPanelSplitViewState',\n layersSidebarWidth: 'layersPanelSplitViewState',\n profilesSidebarWidth: 'profilesPanelSplitViewState',\n resourcesSidebarWidth: 'resourcesPanelSplitViewState',\n };\n const empty = {};\n for (const oldName in settingNames) {\n const newName = settingNames[oldName];\n const oldNameH = oldName + 'H';\n\n let newValue: {}|null = null;\n const oldSetting = Settings.instance().createSetting(oldName, empty);\n if (oldSetting.get() !== empty) {\n newValue = newValue || {};\n // @ts-expect-error\n newValue.vertical = {};\n // @ts-expect-error\n newValue.vertical.size = oldSetting.get();\n removeSetting(oldSetting);\n }\n const oldSettingH = Settings.instance().createSetting(oldNameH, empty);\n if (oldSettingH.get() !== empty) {\n newValue = newValue || {};\n // @ts-expect-error\n newValue.horizontal = {};\n // @ts-expect-error\n newValue.horizontal.size = oldSettingH.get();\n removeSetting(oldSettingH);\n }\n if (newValue) {\n Settings.instance().createSetting(newName, {}).set(newValue);\n }\n }\n }\n\n private updateVersionFrom5To6(): void {\n const settingNames: {\n [x: string]: string,\n } = {\n debuggerSidebarHidden: 'sourcesPanelSplitViewState',\n navigatorHidden: 'sourcesPanelNavigatorSplitViewState',\n 'WebInspector.Drawer.showOnLoad': 'Inspector.drawerSplitViewState',\n };\n\n for (const oldName in settingNames) {\n const oldSetting = Settings.instance().createSetting(oldName, null);\n if (oldSetting.get() === null) {\n removeSetting(oldSetting);\n continue;\n }\n\n const newName = settingNames[oldName];\n const invert = oldName === 'WebInspector.Drawer.showOnLoad';\n const hidden = oldSetting.get() !== invert;\n removeSetting(oldSetting);\n const showMode = hidden ? 'OnlyMain' : 'Both';\n\n const newSetting = Settings.instance().createSetting(newName, {});\n const newValue = newSetting.get() || {};\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // @ts-expect-error\n newValue.vertical = newValue.vertical || {};\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // @ts-expect-error\n newValue.vertical.showMode = showMode;\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // @ts-expect-error\n newValue.horizontal = newValue.horizontal || {};\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // @ts-expect-error\n newValue.horizontal.showMode = showMode;\n newSetting.set(newValue);\n }\n }\n\n private updateVersionFrom6To7(): void {\n const settingNames = {\n sourcesPanelNavigatorSplitViewState: 'sourcesPanelNavigatorSplitViewState',\n elementsPanelSplitViewState: 'elementsPanelSplitViewState',\n stylesPaneSplitViewState: 'stylesPaneSplitViewState',\n sourcesPanelDebuggerSidebarSplitViewState: 'sourcesPanelDebuggerSidebarSplitViewState',\n };\n\n const empty = {};\n for (const name in settingNames) {\n const setting =\n Settings.instance().createSetting<{vertical?: {size?: number}, horizontal?: {size?: number}}>(name, empty);\n const value = setting.get();\n if (value === empty) {\n continue;\n }\n // Zero out saved percentage sizes, and they will be restored to defaults.\n if (value.vertical && value.vertical.size && value.vertical.size < 1) {\n value.vertical.size = 0;\n }\n if (value.horizontal && value.horizontal.size && value.horizontal.size < 1) {\n value.horizontal.size = 0;\n }\n setting.set(value);\n }\n }\n\n private updateVersionFrom7To8(): void {\n }\n\n private updateVersionFrom8To9(): void {\n const settingNames = ['skipStackFramesPattern', 'workspaceFolderExcludePattern'];\n\n for (let i = 0; i < settingNames.length; ++i) {\n const setting = Settings.instance().createSetting(settingNames[i], '');\n let value = setting.get();\n if (!value) {\n return;\n }\n if (typeof value === 'string') {\n value = [value];\n }\n for (let j = 0; j < value.length; ++j) {\n if (typeof value[j] === 'string') {\n value[j] = {pattern: value[j]};\n }\n }\n setting.set(value);\n }\n }\n\n private updateVersionFrom9To10(): void {\n // This one is localStorage specific, which is fine.\n if (!window.localStorage) {\n return;\n }\n for (const key in window.localStorage) {\n if (key.startsWith('revision-history')) {\n window.localStorage.removeItem(key);\n }\n }\n }\n\n private updateVersionFrom10To11(): void {\n const oldSettingName = 'customDevicePresets';\n const newSettingName = 'customEmulatedDeviceList';\n const oldSetting = Settings.instance().createSetting(oldSettingName, undefined);\n const list = oldSetting.get();\n if (!Array.isArray(list)) {\n return;\n }\n const newList = [];\n for (let i = 0; i < list.length; ++i) {\n const value = list[i];\n const device: {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [x: string]: any,\n } = {};\n device['title'] = value['title'];\n device['type'] = 'unknown';\n device['user-agent'] = value['userAgent'];\n device['capabilities'] = [];\n if (value['touch']) {\n device['capabilities'].push('touch');\n }\n if (value['mobile']) {\n device['capabilities'].push('mobile');\n }\n device['screen'] = {};\n device['screen']['vertical'] = {width: value['width'], height: value['height']};\n device['screen']['horizontal'] = {width: value['height'], height: value['width']};\n device['screen']['device-pixel-ratio'] = value['deviceScaleFactor'];\n device['modes'] = [];\n device['show-by-default'] = true;\n device['show'] = 'Default';\n newList.push(device);\n }\n if (newList.length) {\n Settings.instance().createSetting(newSettingName, []).set(newList);\n }\n removeSetting(oldSetting);\n }\n\n private updateVersionFrom11To12(): void {\n this.migrateSettingsFromLocalStorage();\n }\n\n private updateVersionFrom12To13(): void {\n this.migrateSettingsFromLocalStorage();\n removeSetting(Settings.instance().createSetting('timelineOverviewMode', ''));\n }\n\n private updateVersionFrom13To14(): void {\n const defaultValue = {throughput: -1, latency: 0};\n Settings.instance().createSetting('networkConditions', defaultValue).set(defaultValue);\n }\n\n private updateVersionFrom14To15(): void {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const setting = Settings.instance().createLocalSetting('workspaceExcludedFolders', {});\n const oldValue = setting.get();\n const newValue: {\n [x: string]: string[],\n } = {};\n for (const fileSystemPath in oldValue) {\n newValue[fileSystemPath] = [];\n for (const entry of oldValue[fileSystemPath]) {\n newValue[fileSystemPath].push(entry.path);\n }\n }\n setting.set(newValue);\n }\n\n private updateVersionFrom15To16(): void {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const setting = Settings.instance().createSetting('InspectorView.panelOrder', {});\n const tabOrders = setting.get();\n for (const key of Object.keys(tabOrders)) {\n tabOrders[key] = (tabOrders[key] + 1) * 10;\n }\n setting.set(tabOrders);\n }\n\n private updateVersionFrom16To17(): void {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const setting = Settings.instance().createSetting('networkConditionsCustomProfiles', []);\n const oldValue = setting.get();\n const newValue = [];\n if (Array.isArray(oldValue)) {\n for (const preset of oldValue) {\n if (typeof preset.title === 'string' && typeof preset.value === 'object' &&\n typeof preset.value.throughput === 'number' && typeof preset.value.latency === 'number') {\n newValue.push({\n title: preset.title,\n value: {download: preset.value.throughput, upload: preset.value.throughput, latency: preset.value.latency},\n });\n }\n }\n }\n setting.set(newValue);\n }\n\n private updateVersionFrom17To18(): void {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const setting = Settings.instance().createLocalSetting('workspaceExcludedFolders', {});\n const oldValue = setting.get();\n const newValue: {\n [x: string]: string,\n } = {};\n for (const oldKey in oldValue) {\n let newKey = oldKey.replace(/\\\\/g, '/');\n if (!newKey.startsWith('file://')) {\n if (newKey.startsWith('/')) {\n newKey = 'file://' + newKey;\n } else {\n newKey = 'file:///' + newKey;\n }\n }\n newValue[newKey] = oldValue[oldKey];\n }\n setting.set(newValue);\n }\n\n private updateVersionFrom18To19(): void {\n const defaultColumns = {status: true, type: true, initiator: true, size: true, time: true};\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const visibleColumnSettings = Settings.instance().createSetting('networkLogColumnsVisibility', defaultColumns);\n const visibleColumns = visibleColumnSettings.get();\n visibleColumns.name = true;\n visibleColumns.timeline = true;\n\n const configs: {\n [x: string]: {\n visible: number,\n },\n } = {};\n for (const columnId in visibleColumns) {\n if (!visibleColumns.hasOwnProperty(columnId)) {\n continue;\n }\n configs[columnId.toLowerCase()] = {visible: visibleColumns[columnId]};\n }\n const newSetting = Settings.instance().createSetting('networkLogColumns', {});\n newSetting.set(configs);\n removeSetting(visibleColumnSettings);\n }\n\n private updateVersionFrom19To20(): void {\n const oldSetting = Settings.instance().createSetting('InspectorView.panelOrder', {});\n const newSetting = Settings.instance().createSetting('panel-tabOrder', {});\n newSetting.set(oldSetting.get());\n removeSetting(oldSetting);\n }\n\n private updateVersionFrom20To21(): void {\n const networkColumns = Settings.instance().createSetting('networkLogColumns', {});\n const columns = (networkColumns.get() as {\n [x: string]: string,\n });\n delete columns['timeline'];\n delete columns['waterfall'];\n networkColumns.set(columns);\n }\n\n private updateVersionFrom21To22(): void {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const breakpointsSetting = Settings.instance().createLocalSetting('breakpoints', []);\n const breakpoints = breakpointsSetting.get();\n for (const breakpoint of breakpoints) {\n breakpoint['url'] = breakpoint['sourceFileId'];\n delete breakpoint['sourceFileId'];\n }\n breakpointsSetting.set(breakpoints);\n }\n\n private updateVersionFrom22To23(): void {\n // This update is no-op.\n }\n\n private updateVersionFrom23To24(): void {\n const oldSetting = Settings.instance().createSetting('searchInContentScripts', false);\n const newSetting = Settings.instance().createSetting('searchInAnonymousAndContentScripts', false);\n newSetting.set(oldSetting.get());\n removeSetting(oldSetting);\n }\n\n private updateVersionFrom24To25(): void {\n const defaultColumns = {status: true, type: true, initiator: true, size: true, time: true};\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const networkLogColumnsSetting = Settings.instance().createSetting('networkLogColumns', defaultColumns);\n const columns = networkLogColumnsSetting.get();\n delete columns.product;\n networkLogColumnsSetting.set(columns);\n }\n\n private updateVersionFrom25To26(): void {\n const oldSetting = Settings.instance().createSetting('messageURLFilters', {});\n const urls = Object.keys(oldSetting.get());\n const textFilter = urls.map(url => `-url:${url}`).join(' ');\n if (textFilter) {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const textFilterSetting = Settings.instance().createSetting('console.textFilter', '');\n const suffix = textFilterSetting.get() ? ` ${textFilterSetting.get()}` : '';\n textFilterSetting.set(`${textFilter}${suffix}`);\n }\n removeSetting(oldSetting);\n }\n\n private updateVersionFrom26To27(): void {\n function renameKeyInObjectSetting(settingName: string, from: string, to: string): void {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const setting = Settings.instance().createSetting(settingName, {});\n const value = setting.get();\n if (from in value) {\n value[to] = value[from];\n delete value[from];\n setting.set(value);\n }\n }\n\n function renameInStringSetting(settingName: string, from: string, to: string): void {\n const setting = Settings.instance().createSetting(settingName, '');\n const value = setting.get();\n if (value === from) {\n setting.set(to);\n }\n }\n\n renameKeyInObjectSetting('panel-tabOrder', 'audits2', 'audits');\n renameKeyInObjectSetting('panel-closeableTabs', 'audits2', 'audits');\n renameInStringSetting('panel-selectedTab', 'audits2', 'audits');\n }\n\n private updateVersionFrom27To28(): void {\n const setting = Settings.instance().createSetting('uiTheme', 'systemPreferred');\n if (setting.get() === 'default') {\n setting.set('systemPreferred');\n }\n }\n\n private updateVersionFrom28To29(): void {\n function renameKeyInObjectSetting(settingName: string, from: string, to: string): void {\n // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const setting = Settings.instance().createSetting(settingName, {});\n const value = setting.get();\n if (from in value) {\n value[to] = value[from];\n delete value[from];\n setting.set(value);\n }\n }\n\n function renameInStringSetting(settingName: string, from: string, to: string): void {\n const setting = Settings.instance().createSetting(settingName, '');\n const value = setting.get();\n if (value === from) {\n setting.set(to);\n }\n }\n\n renameKeyInObjectSetting('panel-tabOrder', 'audits', 'lighthouse');\n renameKeyInObjectSetting('panel-closeableTabs', 'audits', 'lighthouse');\n renameInStringSetting('panel-selectedTab', 'audits', 'lighthouse');\n }\n\n private updateVersionFrom29To30(): void {\n // Create new location agnostic setting\n const closeableTabSetting = Settings.instance().createSetting('closeableTabs', {});\n\n // Read current settings\n const panelCloseableTabSetting = Settings.instance().createSetting('panel-closeableTabs', {});\n const drawerCloseableTabSetting = Settings.instance().createSetting('drawer-view-closeableTabs', {});\n const openTabsInPanel = panelCloseableTabSetting.get();\n const openTabsInDrawer = panelCloseableTabSetting.get();\n\n // Set #value of new setting\n const newValue = Object.assign(openTabsInDrawer, openTabsInPanel);\n closeableTabSetting.set(newValue);\n\n // Remove old settings\n removeSetting(panelCloseableTabSetting);\n removeSetting(drawerCloseableTabSetting);\n }\n\n private updateVersionFrom30To31(): void {\n // Remove recorder_recordings setting that was used for storing recordings\n // by an old recorder experiment.\n const recordingsSetting = Settings.instance().createSetting('recorder_recordings', []);\n removeSetting(recordingsSetting);\n }\n\n updateVersionFrom31To32(): void {\n // Introduce the new 'resourceTypeName' property on stored breakpoints. Prior to\n // this change we synchronized the breakpoint only by URL, but since we don't\n // know on which resource type the given breakpoint was set, we just assume\n // 'script' here to keep things simple.\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const breakpointsSetting = Settings.instance().createLocalSetting('breakpoints', []);\n const breakpoints = breakpointsSetting.get();\n for (const breakpoint of breakpoints) {\n breakpoint['resourceTypeName'] = 'script';\n }\n breakpointsSetting.set(breakpoints);\n }\n\n updateVersionFrom32To33(): void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const previouslyViewedFilesSetting = Settings.instance().createLocalSetting('previouslyViewedFiles', []);\n let previouslyViewedFiles = previouslyViewedFilesSetting.get();\n\n // Discard old 'previouslyViewedFiles' items that don't have a 'url' property.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n previouslyViewedFiles = previouslyViewedFiles.filter((previouslyViewedFile: any) => 'url' in previouslyViewedFile);\n\n // Introduce the new 'resourceTypeName' property on previously viewed files.\n // Prior to this change we only keyed them based on the URL, but since we\n // don't know which resource type the given file had, we just assume 'script'\n // here to keep things simple.\n for (const previouslyViewedFile of previouslyViewedFiles) {\n previouslyViewedFile['resourceTypeName'] = 'script';\n }\n\n previouslyViewedFilesSetting.set(previouslyViewedFiles);\n }\n\n updateVersionFrom33To34(): void {\n // Introduces the 'isLogpoint' property on stored breakpoints. This information was\n // previously encoded in the 'condition' itself. This migration leaves the condition\n // alone but ensures that 'isLogpoint' is accurate for already stored breakpoints.\n // This enables us to use the 'isLogpoint' property in code.\n // A separate migration will remove the special encoding from the condition itself\n // once all refactorings are done.\n\n // The prefix/suffix are hardcoded here, since these constants will be removed in\n // the future.\n const logpointPrefix = '/** DEVTOOLS_LOGPOINT */ console.log(';\n const logpointSuffix = ')';\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const breakpointsSetting = Settings.instance().createLocalSetting('breakpoints', []);\n const breakpoints = breakpointsSetting.get();\n for (const breakpoint of breakpoints) {\n const isLogpoint =\n breakpoint.condition.startsWith(logpointPrefix) && breakpoint.condition.endsWith(logpointSuffix);\n breakpoint['isLogpoint'] = isLogpoint;\n }\n breakpointsSetting.set(breakpoints);\n }\n\n updateVersionFrom34To35(): void {\n // Uses the 'isLogpoint' property on stored breakpoints to remove the prefix/suffix\n // from logpoints. This way, we store the entered log point condition as the user\n // entered it.\n\n // The prefix/suffix are hardcoded here, since these constants will be removed in\n // the future.\n const logpointPrefix = '/** DEVTOOLS_LOGPOINT */ console.log(';\n const logpointSuffix = ')';\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const breakpointsSetting = Settings.instance().createLocalSetting('breakpoints', []);\n const breakpoints = breakpointsSetting.get();\n for (const breakpoint of breakpoints) {\n const {condition, isLogpoint} = breakpoint;\n if (isLogpoint) {\n breakpoint.condition = condition.slice(logpointPrefix.length, condition.length - logpointSuffix.length);\n }\n }\n breakpointsSetting.set(breakpoints);\n }\n\n updateVersionFrom35To36(): void {\n // We have changed the default from 'false' to 'true' and this updates the existing setting just for once.\n Settings.instance().createSetting('showThirdPartyIssues', true).set(true);\n }\n\n updateVersionFrom36To37(): void {\n const updateStorage = (storage: SettingsStorage): void => {\n for (const key of storage.keys()) {\n const normalizedKey = Settings.normalizeSettingName(key);\n if (normalizedKey !== key) {\n const value = storage.get(key);\n removeSetting({name: key, storage});\n storage.set(normalizedKey, value);\n }\n }\n };\n updateStorage(Settings.instance().globalStorage);\n updateStorage(Settings.instance().syncedStorage);\n updateStorage(Settings.instance().localStorage);\n\n for (const key of Settings.instance().globalStorage.keys()) {\n if ((key.startsWith('data-grid-') && key.endsWith('-column-weights')) || key.endsWith('-tab-order') ||\n key === 'views-location-override' || key === 'closeable-tabs') {\n const setting = Settings.instance().createSetting(key, {});\n setting.set(Platform.StringUtilities.toKebabCaseKeys(setting.get()));\n }\n if (key.endsWith('-selected-tab')) {\n const setting = Settings.instance().createSetting(key, '');\n setting.set(Platform.StringUtilities.toKebabCase(setting.get()));\n }\n }\n }\n\n /*\n * Any new migration should be added before this comment.\n *\n * IMPORTANT: Migrations must be idempotent, since they may be applied\n * multiple times! E.g. when renaming a setting one has to check that the\n * a setting with the new name does not yet exist.\n * ----------------------------------------------------------------------- */\n\n private migrateSettingsFromLocalStorage(): void {\n // This step migrates all the settings except for the ones below into the browser profile.\n const localSettings = new Set([\n 'advancedSearchConfig',\n 'breakpoints',\n 'consoleHistory',\n 'domBreakpoints',\n 'eventListenerBreakpoints',\n 'fileSystemMapping',\n 'lastSelectedSourcesSidebarPaneTab',\n 'previouslyViewedFiles',\n 'savedURLs',\n 'watchExpressions',\n 'workspaceExcludedFolders',\n 'xhrBreakpoints',\n ]);\n if (!window.localStorage) {\n return;\n }\n\n for (const key in window.localStorage) {\n if (localSettings.has(key)) {\n continue;\n }\n const value = window.localStorage[key];\n window.localStorage.removeItem(key);\n Settings.instance().globalStorage.set(key, value);\n }\n }\n\n private clearBreakpointsWhenTooMany(breakpointsSetting: Setting, maxBreakpointsCount: number): void {\n // If there are too many breakpoints in a storage, it is likely due to a recent bug that caused\n // periodical breakpoints duplication leading to inspector slowness.\n if (breakpointsSetting.get().length > maxBreakpointsCount) {\n breakpointsSetting.set([]);\n }\n }\n}\n\nexport const enum SettingStorageType {\n /**\n * Synced storage persists settings with the active Chrome profile but also\n * syncs the settings across devices via Chrome Sync.\n */\n SYNCED = 'Synced',\n /** Global storage persists settings with the active Chrome profile */\n GLOBAL = 'Global',\n /** Uses Window.localStorage */\n LOCAL = 'Local',\n /** Session storage dies when DevTools window closes */\n SESSION = 'Session',\n}\n\nexport function moduleSetting(settingName: string): Setting {\n return Settings.instance().moduleSetting(settingName);\n}\n\nexport function settingForTest(settingName: string): Setting {\n return Settings.instance().settingForTest(settingName);\n}\n\nexport {\n getLocalizedSettingsCategory,\n maybeRemoveSettingExtension,\n registerSettingExtension,\n RegExpSettingItem,\n SettingCategory,\n SettingExtensionOption,\n SettingRegistration,\n SettingType,\n registerSettingsForTest,\n resetSettings,\n};\n\nexport interface Serializer {\n stringify: (value: I) => string;\n parse: (value: string) => O;\n}\n\nexport interface SimpleSettingOption {\n value: string|boolean;\n title: string;\n text?: string;\n raw?: boolean;\n}\n"]} \ No newline at end of file diff --git a/public/core/common/Settings.test.js b/public/core/common/Settings.test.js index 061d594fa..daeff174f 100644 --- a/public/core/common/Settings.test.js +++ b/public/core/common/Settings.test.js @@ -162,6 +162,21 @@ describe('Settings instance', () => { assert.strictEqual(await testSetting.forceGet(), 'new'); }); }); + it('getIfNotDisabled returns the setting\'s value only if the setting is not disabled', async () => { + const registeredSettings = new Set(); + const mockBackingStore = { + ...Common.Settings.NOOP_STORAGE, + register: (name) => registeredSettings.add(name), + }; + const storage = new SettingsStorage({}, mockBackingStore, '__prefix__.'); + const settings = Common.Settings.Settings.instance({ forceNew: true, syncedStorage: storage, globalStorage: storage, localStorage: storage }); + const testSetting = settings.createSetting('test-setting', 'some value'); + assert.strictEqual(testSetting.getIfNotDisabled(), 'some value'); + testSetting.setDisabled(true); + assert.isUndefined(testSetting.getIfNotDisabled()); + testSetting.setDisabled(false); + assert.strictEqual(testSetting.getIfNotDisabled(), 'some value'); + }); }); describe('VersionController', () => { let settings; diff --git a/public/core/common/Settings.test.js.map b/public/core/common/Settings.test.js.map index f02207412..ae833f0e4 100644 --- a/public/core/common/Settings.test.js.map +++ b/public/core/common/Settings.test.js.map @@ -1 +1 @@ -{"version":3,"file":"Settings.test.js","sourceRoot":"","sources":["../../../../../../front_end/core/common/Settings.test.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,MAAM,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC;AACxD,MAAM,iBAAiB,GAAG,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAC;AAE5D,MAAM,SAAS;IACb,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;IACnB,QAAQ;IACR,CAAC;IACD,GAAG,CAAC,GAAW,EAAE,KAAa;QAC5B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC9B,CAAC;IACD,GAAG,CAAC,GAAW;QACb,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;IACD,MAAM,CAAC,GAAW;QAChB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;IACD,KAAK;QACH,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;CACF;AAED,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IACrC,EAAE,CAAC,uBAAuB,EAAE,GAAG,EAAE;QAC/B,MAAM,eAAe,GAAG,IAAI,eAAe,CAAC,EAAE,CAAC,CAAC;QAChD,eAAe,CAAC,GAAG,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;QAC/C,MAAM,CAAC,WAAW,CAAC,eAAe,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,YAAY,EAAE,iCAAiC,CAAC,CA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,KAAK;gBAChB,WAAW,EAAE,IAAI;aAClB,CAAC,CAAC,CAAC;YACJ,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC;gBACzD,SAAS,EAAE,CAAC;gBACZ,WAAW,EAAE,CAAC;aACf,CAAC,CAAC,CAAC;YACJ,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,kBAAkB,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;YAE5E,iBAAiB,CAAC,uBAAuB,EAAE,CAAC;YAE5C,MAAM,CAAC,SAAS,CACZ,QAAQ,CAAC,aAAa,CAAC,yBAAyB,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,EAAE,EAAC,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAC,CAAC,CAAC;YAClH,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,EAAE,EAAC,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAC,CAAC,CAAC;YACjH,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,EAAE,EAAC,YAAY,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAC,CAAC,CAAC;YAC1G,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,EAAE,YAAY,CAAC,CAAC;QACxF,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,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 './common.js';\n\nconst SettingsStorage = Common.Settings.SettingsStorage;\nconst VersionController = Common.Settings.VersionController;\n\nclass MockStore implements Common.Settings.SettingsBackingStore {\n #store = new Map();\n register() {\n }\n set(key: string, value: string) {\n this.#store.set(key, value);\n }\n get(key: string) {\n return this.#store.get(key);\n }\n remove(key: string) {\n this.#store.delete(key);\n }\n clear() {\n this.#store.clear();\n }\n}\n\ndescribe('SettingsStorage class', () => {\n it('is able to set a name', () => {\n const settingsStorage = new SettingsStorage({});\n settingsStorage.set('Test Name', 'Test Value');\n assert.strictEqual(settingsStorage.get('Test Name'), 'Test Value', 'Name was not retrieve correctly');\n });\n\n it('is able to check if a name that it has exists', () => {\n const settingsStorage = new SettingsStorage({});\n settingsStorage.set('Test Name', 'Test Value');\n assert.isTrue(settingsStorage.has('Test Name'), 'the class should have that name');\n });\n\n it('is able to check if a name that it does not have exists', () => {\n const settingsStorage = new SettingsStorage({});\n assert.isFalse(settingsStorage.has('Test Name'), 'the class should not have that name');\n });\n\n it('is able to remove a name', () => {\n const settingsStorage = new SettingsStorage({});\n settingsStorage.set('Test Name', 'Test Value');\n settingsStorage.remove('Test Name');\n assert.isFalse(settingsStorage.has('Test Name'), 'the class should not have that name');\n });\n\n it('is able to remove all names', () => {\n const settingsStorage = new SettingsStorage({});\n settingsStorage.set('Test Name 1', 'Test Value 1');\n settingsStorage.set('Test Name 2', 'Test Value 2');\n settingsStorage.removeAll();\n assert.isFalse(settingsStorage.has('Test Name 1'), 'the class should not have any names');\n assert.isFalse(settingsStorage.has('Test Name 2'), 'the class should not have any names');\n });\n\n describe('forceGet', () => {\n it('returns the value of the backing store, not the cached one', async () => {\n const mockStore = new MockStore();\n const settingsStorage = new SettingsStorage({}, mockStore);\n settingsStorage.set('test', 'value');\n\n mockStore.set('test', 'changed');\n\n assert.strictEqual(await settingsStorage.forceGet('test'), 'changed');\n assert.strictEqual(await settingsStorage.forceGet('test'), 'changed');\n });\n it('updates the cached value of a SettingsStorage', async () => {\n const mockStore = new MockStore();\n const settingsStorage = new SettingsStorage({}, mockStore);\n settingsStorage.set('test', 'value');\n mockStore.set('test', 'changed');\n assert.strictEqual(settingsStorage.get('test'), 'value');\n\n await settingsStorage.forceGet('test');\n\n assert.strictEqual(settingsStorage.get('test'), 'changed');\n });\n it('leaves the cached value alone if the backing store has the same value', async () => {\n const mockStore = new MockStore();\n const settingsStorage = new SettingsStorage({}, mockStore);\n\n mockStore.set('test', 'value');\n settingsStorage.set('test', 'value');\n\n assert.strictEqual(mockStore.get('test'), 'value');\n assert.strictEqual(await settingsStorage.forceGet('test'), 'value');\n assert.strictEqual(mockStore.get('test'), 'value');\n assert.strictEqual(await settingsStorage.forceGet('test'), 'value');\n });\n });\n});\n\ndescribe('Settings instance', () => {\n afterEach(() => {\n Common.Settings.Settings.removeInstance();\n Common.Settings.resetSettings(); // Clear SettingsRegistrations.\n });\n\n it('can be instantiated in a test', () => {\n const dummyStorage = new SettingsStorage({});\n\n const settings = Common.Settings.Settings.instance({\n forceNew: true,\n syncedStorage: dummyStorage,\n globalStorage: dummyStorage,\n localStorage: dummyStorage,\n });\n\n assert.isOk(settings);\n });\n\n it('throws when constructed without storage', () => {\n assert.throws(() => Common.Settings.Settings.instance());\n assert.throws(\n () => Common.Settings.Settings.instance(\n {forceNew: true, syncedStorage: null, globalStorage: null, localStorage: null}));\n });\n\n it('stores synced settings in the correct storage', () => {\n const syncedStorage = new SettingsStorage({});\n const dummyStorage = new SettingsStorage({});\n Common.Settings.registerSettingExtension({\n settingName: 'static-synced-setting',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n storageType: Common.Settings.SettingStorageType.SYNCED,\n });\n const settings = Common.Settings.Settings.instance(\n {forceNew: true, syncedStorage, globalStorage: dummyStorage, localStorage: dummyStorage});\n\n const dynamicSetting: Common.Settings.Setting =\n settings.createSetting('dynamic-synced-setting', 'default val', Common.Settings.SettingStorageType.SYNCED);\n dynamicSetting.set('foo value');\n const staticSetting: Common.Settings.Setting = settings.moduleSetting('static-synced-setting');\n staticSetting.set(true);\n\n assert.isFalse(dummyStorage.has('dynamic-synced-setting'));\n assert.isFalse(dummyStorage.has('static-synced-setting'));\n assert.strictEqual(syncedStorage.get('dynamic-synced-setting'), '\"foo value\"');\n assert.strictEqual(syncedStorage.get('static-synced-setting'), 'true');\n });\n\n it('registers settings with the backing store when creating them', () => {\n const registeredSettings = new Set();\n const mockBackingStore: Common.Settings.SettingsBackingStore = {\n ...Common.Settings.NOOP_STORAGE,\n register: (name: string) => registeredSettings.add(name),\n };\n const storage = new SettingsStorage({}, mockBackingStore, '__prefix__.');\n Common.Settings.registerSettingExtension({\n settingName: 'static-global-setting',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n storageType: Common.Settings.SettingStorageType.GLOBAL,\n });\n\n const settings = Common.Settings.Settings.instance(\n {forceNew: true, syncedStorage: storage, globalStorage: storage, localStorage: storage});\n settings.createSetting('dynamic-local-setting', 42, Common.Settings.SettingStorageType.LOCAL);\n settings.createSetting('dynamic-synced-setting', 'foo', Common.Settings.SettingStorageType.SYNCED);\n\n assert.isTrue(registeredSettings.has('__prefix__.static-global-setting'));\n assert.isTrue(registeredSettings.has('__prefix__.dynamic-local-setting'));\n assert.isTrue(registeredSettings.has('__prefix__.dynamic-synced-setting'));\n });\n\n describe('forceGet', () => {\n it('triggers a setting changed event in case the value in the backing store got updated and we update the cached value',\n async () => {\n const mockStore = new MockStore();\n const settingsStorage = new SettingsStorage({}, mockStore);\n mockStore.set('test', '\"old\"');\n const settings = Common.Settings.Settings.instance({\n forceNew: true,\n syncedStorage: settingsStorage,\n globalStorage: settingsStorage,\n localStorage: settingsStorage,\n });\n const testSetting: Common.Settings.Setting =\n settings.createSetting('test', 'default val', Common.Settings.SettingStorageType.GLOBAL);\n const changes: string[] = [];\n testSetting.addChangeListener((event: Common.EventTarget.EventTargetEvent) => {\n changes.push(event.data);\n });\n mockStore.set('test', '\"new\"');\n assert.strictEqual(await testSetting.forceGet(), 'new');\n assert.deepEqual(changes, ['new']);\n assert.strictEqual(mockStore.get('test'), '\"new\"');\n assert.strictEqual(await settingsStorage.forceGet('test'), '\"new\"');\n assert.strictEqual(await testSetting.forceGet(), 'new');\n });\n });\n});\n\ndescribe('VersionController', () => {\n let settings: Common.Settings.Settings;\n let syncedStorage: Common.Settings.SettingsStorage;\n let globalStorage: Common.Settings.SettingsStorage;\n let localStorage: Common.Settings.SettingsStorage;\n\n beforeEach(() => {\n const mockStore = new MockStore();\n syncedStorage = new Common.Settings.SettingsStorage({}, mockStore);\n globalStorage = new Common.Settings.SettingsStorage({}, mockStore);\n localStorage = new Common.Settings.SettingsStorage({}, mockStore);\n settings = Common.Settings.Settings.instance({\n forceNew: true,\n syncedStorage,\n globalStorage,\n localStorage,\n });\n });\n\n afterEach(() => {\n Common.Settings.Settings.removeInstance();\n });\n\n describe('updateVersion', () => {\n it('initializes version settings with the current version if the setting doesn\\'t exist yet', () => {\n assert.isFalse(globalStorage.has(VersionController.GLOBAL_VERSION_SETTING_NAME));\n assert.isFalse(syncedStorage.has(VersionController.SYNCED_VERSION_SETTING_NAME));\n assert.isFalse(localStorage.has(VersionController.LOCAL_VERSION_SETTING_NAME));\n\n new VersionController().updateVersion();\n\n const currentVersion = VersionController.CURRENT_VERSION.toString();\n assert.strictEqual(globalStorage.get(VersionController.GLOBAL_VERSION_SETTING_NAME), currentVersion);\n assert.strictEqual(syncedStorage.get(VersionController.SYNCED_VERSION_SETTING_NAME), currentVersion);\n assert.strictEqual(localStorage.get(VersionController.LOCAL_VERSION_SETTING_NAME), currentVersion);\n });\n\n function spyAllUpdateMethods(versionController: Common.Settings.VersionController) {\n const spies: Array> = [];\n for (let i = 0; i < VersionController.CURRENT_VERSION; ++i) {\n spies.push(\n sinon.spy(versionController, `updateVersionFrom${i}To${i + 1}` as keyof Common.Settings.VersionController));\n }\n assert.lengthOf(spies, VersionController.CURRENT_VERSION);\n return spies;\n }\n\n it('does not run any update* methods if no version setting exist yet', () => {\n const versionController = new VersionController();\n const spies = spyAllUpdateMethods(versionController);\n\n versionController.updateVersion();\n\n for (const spy of spies) {\n assert.isFalse(spy.called);\n }\n });\n\n it('does not run any update* methods if all version settings are already current', () => {\n const currentVersion = VersionController.CURRENT_VERSION.toString();\n globalStorage.set(VersionController.GLOBAL_VERSION_SETTING_NAME, currentVersion);\n syncedStorage.set(VersionController.SYNCED_VERSION_SETTING_NAME, currentVersion);\n localStorage.set(VersionController.LOCAL_VERSION_SETTING_NAME, currentVersion);\n const versionController = new VersionController();\n const spies = spyAllUpdateMethods(versionController);\n\n versionController.updateVersion();\n\n for (const spy of spies) {\n assert.isFalse(spy.called);\n }\n });\n\n it('runs correct update* methods if the local bucket lags behind', () => {\n const currentVersion = VersionController.CURRENT_VERSION.toString();\n const localVersion = (VersionController.CURRENT_VERSION - 3).toString();\n globalStorage.set(VersionController.GLOBAL_VERSION_SETTING_NAME, currentVersion);\n syncedStorage.set(VersionController.SYNCED_VERSION_SETTING_NAME, currentVersion);\n localStorage.set(VersionController.LOCAL_VERSION_SETTING_NAME, localVersion);\n const versionController = new VersionController();\n const spies = spyAllUpdateMethods(versionController);\n\n versionController.updateVersion();\n\n const expectedUncalledSpies = spies.slice(0, -3);\n for (const spy of expectedUncalledSpies) {\n assert.isFalse(spy.called);\n }\n\n const expectedCalledSpies = spies.slice(-3);\n for (const spy of expectedCalledSpies) {\n assert.isTrue(spy.called);\n }\n });\n\n it('runs correct update* methods if the synced bucket runs ahead', () => {\n const currentVersion = VersionController.CURRENT_VERSION.toString();\n const oldVersion = (VersionController.CURRENT_VERSION - 1).toString();\n globalStorage.set(VersionController.GLOBAL_VERSION_SETTING_NAME, oldVersion);\n syncedStorage.set(VersionController.SYNCED_VERSION_SETTING_NAME, currentVersion);\n localStorage.set(VersionController.LOCAL_VERSION_SETTING_NAME, oldVersion);\n const versionController = new VersionController();\n const spies = spyAllUpdateMethods(versionController);\n\n versionController.updateVersion();\n\n const expectedUncalledSpies = spies.slice(0, -1);\n for (const spy of expectedUncalledSpies) {\n assert.isFalse(spy.called);\n }\n\n const expectedCalledSpies = spies.slice(-1);\n for (const spy of expectedCalledSpies) {\n assert.isTrue(spy.called);\n }\n });\n });\n\n describe('updateVersionFrom31To32', () => {\n it('correctly adds resourceTypeName to breakpoints', () => {\n const versionController = new VersionController();\n const breakpointsSetting = settings.createLocalSetting('breakpoints', [\n {url: 'webpack:///src/foo.ts', lineNumber: 4, condition: '', enabled: false},\n {url: 'foo.js', lineNumber: 1, columnNumber: 42, condition: 'false', enabled: true},\n ]);\n versionController.updateVersionFrom31To32();\n const breakpoints = breakpointsSetting.get();\n assert.lengthOf(breakpoints, 2);\n assert.propertyVal(breakpoints[0], 'url', 'webpack:///src/foo.ts');\n assert.propertyVal(breakpoints[0], 'resourceTypeName', 'script');\n assert.propertyVal(breakpoints[0], 'lineNumber', 4);\n assert.notProperty(breakpoints[0], 'columnNumber');\n assert.propertyVal(breakpoints[0], 'condition', '');\n assert.propertyVal(breakpoints[0], 'enabled', false);\n assert.propertyVal(breakpoints[1], 'url', 'foo.js');\n assert.propertyVal(breakpoints[1], 'resourceTypeName', 'script');\n assert.propertyVal(breakpoints[1], 'lineNumber', 1);\n assert.propertyVal(breakpoints[1], 'columnNumber', 42);\n assert.propertyVal(breakpoints[1], 'condition', 'false');\n assert.propertyVal(breakpoints[1], 'enabled', true);\n });\n });\n\n describe('updateVersionFrom32To33', () => {\n it('correctly discards previously viewed files without url properties', () => {\n const versionController = new VersionController();\n const previouslyViewedFilesSetting = settings.createLocalSetting('previouslyViewedFiles', [\n {url: 'http://localhost:3000', scrollLineNumber: 1},\n {scrollLineNumber: 1},\n {},\n {url: 'webpack:///src/foo.ts'},\n ]);\n versionController.updateVersionFrom32To33();\n const previouslyViewedFiles = previouslyViewedFilesSetting.get();\n assert.lengthOf(previouslyViewedFiles, 2);\n assert.propertyVal(previouslyViewedFiles[0], 'url', 'http://localhost:3000');\n assert.notProperty(previouslyViewedFiles[0], 'selectionRange');\n assert.propertyVal(previouslyViewedFiles[0], 'scrollLineNumber', 1);\n assert.propertyVal(previouslyViewedFiles[1], 'url', 'webpack:///src/foo.ts');\n assert.notProperty(previouslyViewedFiles[1], 'selectionRange');\n assert.notProperty(previouslyViewedFiles[1], 'scrollLineNumber');\n });\n\n it('correctly adds resourceTypeName to previously viewed files', () => {\n const versionController = new VersionController();\n const previouslyViewedFilesSetting = settings.createLocalSetting('previouslyViewedFiles', [\n {url: 'http://localhost:3000', scrollLineNumber: 1},\n {url: 'webpack:///src/foo.ts'},\n ]);\n versionController.updateVersionFrom32To33();\n const previouslyViewedFiles = previouslyViewedFilesSetting.get();\n assert.lengthOf(previouslyViewedFiles, 2);\n assert.propertyVal(previouslyViewedFiles[0], 'url', 'http://localhost:3000');\n assert.propertyVal(previouslyViewedFiles[0], 'resourceTypeName', 'script');\n assert.notProperty(previouslyViewedFiles[0], 'selectionRange');\n assert.propertyVal(previouslyViewedFiles[0], 'scrollLineNumber', 1);\n assert.propertyVal(previouslyViewedFiles[1], 'url', 'webpack:///src/foo.ts');\n assert.propertyVal(previouslyViewedFiles[1], 'resourceTypeName', 'script');\n assert.notProperty(previouslyViewedFiles[1], 'selectionRange');\n assert.notProperty(previouslyViewedFiles[1], 'scrollLineNumber');\n });\n });\n\n describe('updateVersionFrom33To34', () => {\n it('correctly adds isLogpoint to breakpoints', () => {\n const versionController = new VersionController();\n const breakpointsSetting = settings.createLocalSetting('breakpoints', [\n {\n url: 'webpack:///src/foo.ts',\n lineNumber: 4,\n resourceTypeName: 'script',\n condition: '/** DEVTOOLS_LOGPOINT */ console.log(foo.property)',\n enabled: true,\n },\n {\n url: 'foo.js',\n lineNumber: 1,\n columnNumber: 42,\n resourceTypeName: 'script',\n condition: 'x === 42',\n enabled: true,\n },\n {url: 'bar.js', lineNumber: 5, columnNumber: 1, resourceTypeName: 'script', condition: '', enabled: true},\n ]);\n\n versionController.updateVersionFrom33To34();\n const breakpoints = breakpointsSetting.get();\n\n assert.propertyVal(breakpoints[0], 'isLogpoint', true);\n assert.propertyVal(breakpoints[1], 'isLogpoint', false);\n assert.propertyVal(breakpoints[2], 'isLogpoint', false);\n });\n });\n\n describe('updateVersionFrom34To35', () => {\n it('removes the logpoint prefix/suffix from logpoints', () => {\n const versionController = new VersionController();\n const breakpointsSetting =\n settings.createLocalSetting('breakpoints', [{\n url: 'webpack:///src/foo.ts',\n lineNumber: 4,\n resourceTypeName: 'script',\n condition: '/** DEVTOOLS_LOGPOINT */ console.log(foo.property)',\n enabled: true,\n isLogpoint: true,\n }]);\n\n versionController.updateVersionFrom34To35();\n\n const breakpoints = breakpointsSetting.get();\n assert.lengthOf(breakpoints, 1);\n assert.propertyVal(breakpoints[0], 'condition', 'foo.property');\n });\n\n it('leaves conditional breakpoints alone', () => {\n const versionController = new VersionController();\n const breakpointsSetting = settings.createLocalSetting('breakpoints', [{\n url: 'webpack:///src/foo.ts',\n lineNumber: 4,\n resourceTypeName: 'script',\n condition: 'x === 42',\n enabled: true,\n isLogpoint: false,\n }]);\n\n versionController.updateVersionFrom34To35();\n\n const breakpoints = breakpointsSetting.get();\n assert.lengthOf(breakpoints, 1);\n assert.propertyVal(breakpoints[0], 'condition', 'x === 42');\n });\n });\n\n describe('updateVersionFrom35To36', () => {\n it('update showThirdPartyIssues setting value to true', () => {\n const versionController = new VersionController();\n const showThirdPartyIssuesSetting = settings.createLocalSetting('showThirdPartyIssues', false);\n versionController.updateVersionFrom35To36();\n assert.isTrue(showThirdPartyIssuesSetting.get());\n });\n });\n\n describe('updateVersionFrom36To37', () => {\n it('updates all keys to kebab case', () => {\n const versionController = new VersionController();\n settings.globalStorage.set('globalSetting1', '');\n settings.globalStorage.set('globalSetting2', '');\n settings.localStorage.set('localSetting', '');\n settings.syncedStorage.set('syncedSetting', '');\n\n versionController.updateVersionFrom36To37();\n\n assert.deepEqual(settings.globalStorage.keys(), ['global-setting-1', 'global-setting-2']);\n assert.deepEqual(settings.localStorage.keys(), ['local-setting']);\n assert.deepEqual(settings.syncedStorage.keys(), ['synced-setting']);\n });\n\n it('keeps kebab case settings as is', () => {\n const versionController = new VersionController();\n settings.globalStorage.set('setting', '123');\n settings.localStorage.set('another-setting', '456');\n\n versionController.updateVersionFrom36To37();\n\n assert.deepEqual(settings.globalStorage.keys(), ['setting']);\n assert.strictEqual(settings.globalStorage.get('setting'), '123');\n assert.strictEqual(settings.localStorage.get('another-setting'), '456');\n });\n\n it('update data grid column weights value', () => {\n const versionController = new VersionController();\n settings.globalStorage.set('dataGrid-foo-columnWeights', JSON.stringify({\n columnOne: 1,\n columnTwo: 2,\n }));\n\n versionController.updateVersionFrom36To37();\n\n const setting = settings.createSetting('data-grid-foo-column-weights', {});\n\n assert.deepEqual(setting.get(), {'column-one': 1, 'column-two': 2});\n });\n\n it('update view manager settings values', () => {\n const versionController = new VersionController();\n settings.globalStorage.set('viewsLocationOverride', JSON.stringify({\n somePanel: 'main',\n other_panel: 'drawer',\n }));\n settings.globalStorage.set('closeableTabs', JSON.stringify({\n somePanel: false,\n other_panel: true,\n }));\n settings.globalStorage.set('main-tabOrder', JSON.stringify({\n somePanel: 2,\n other_panel: 1,\n }));\n settings.globalStorage.set('main-selectedTab', JSON.stringify('somePanel'));\n\n versionController.updateVersionFrom36To37();\n\n assert.deepEqual(\n settings.createSetting('views-location-override', {}).get(), {'some-panel': 'main', 'other-panel': 'drawer'});\n assert.deepEqual(settings.createSetting('closeable-tabs', {}).get(), {'some-panel': false, 'other-panel': true});\n assert.deepEqual(settings.createSetting('main-tab-order', {}).get(), {'some-panel': 2, 'other-panel': 1});\n assert.deepEqual(settings.createSetting('main-selected-tab', '').get(), 'some-panel');\n });\n });\n});\n"]} \ No newline at end of file +{"version":3,"file":"Settings.test.js","sourceRoot":"","sources":["../../../../../../front_end/core/common/Settings.test.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,MAAM,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC;AACxD,MAAM,iBAAiB,GAAG,MAAM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,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAC,CAAC,CAAC;YACjH,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,EAAE,EAAC,YAAY,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAC,CAAC,CAAC;YAC1G,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,EAAE,YAAY,CAAC,CAAC;QACxF,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,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 './common.js';\n\nconst SettingsStorage = Common.Settings.SettingsStorage;\nconst VersionController = Common.Settings.VersionController;\n\nclass MockStore implements Common.Settings.SettingsBackingStore {\n #store = new Map();\n register() {\n }\n set(key: string, value: string) {\n this.#store.set(key, value);\n }\n get(key: string) {\n return this.#store.get(key);\n }\n remove(key: string) {\n this.#store.delete(key);\n }\n clear() {\n this.#store.clear();\n }\n}\n\ndescribe('SettingsStorage class', () => {\n it('is able to set a name', () => {\n const settingsStorage = new SettingsStorage({});\n settingsStorage.set('Test Name', 'Test Value');\n assert.strictEqual(settingsStorage.get('Test Name'), 'Test Value', 'Name was not retrieve correctly');\n });\n\n it('is able to check if a name that it has exists', () => {\n const settingsStorage = new SettingsStorage({});\n settingsStorage.set('Test Name', 'Test Value');\n assert.isTrue(settingsStorage.has('Test Name'), 'the class should have that name');\n });\n\n it('is able to check if a name that it does not have exists', () => {\n const settingsStorage = new SettingsStorage({});\n assert.isFalse(settingsStorage.has('Test Name'), 'the class should not have that name');\n });\n\n it('is able to remove a name', () => {\n const settingsStorage = new SettingsStorage({});\n settingsStorage.set('Test Name', 'Test Value');\n settingsStorage.remove('Test Name');\n assert.isFalse(settingsStorage.has('Test Name'), 'the class should not have that name');\n });\n\n it('is able to remove all names', () => {\n const settingsStorage = new SettingsStorage({});\n settingsStorage.set('Test Name 1', 'Test Value 1');\n settingsStorage.set('Test Name 2', 'Test Value 2');\n settingsStorage.removeAll();\n assert.isFalse(settingsStorage.has('Test Name 1'), 'the class should not have any names');\n assert.isFalse(settingsStorage.has('Test Name 2'), 'the class should not have any names');\n });\n\n describe('forceGet', () => {\n it('returns the value of the backing store, not the cached one', async () => {\n const mockStore = new MockStore();\n const settingsStorage = new SettingsStorage({}, mockStore);\n settingsStorage.set('test', 'value');\n\n mockStore.set('test', 'changed');\n\n assert.strictEqual(await settingsStorage.forceGet('test'), 'changed');\n assert.strictEqual(await settingsStorage.forceGet('test'), 'changed');\n });\n it('updates the cached value of a SettingsStorage', async () => {\n const mockStore = new MockStore();\n const settingsStorage = new SettingsStorage({}, mockStore);\n settingsStorage.set('test', 'value');\n mockStore.set('test', 'changed');\n assert.strictEqual(settingsStorage.get('test'), 'value');\n\n await settingsStorage.forceGet('test');\n\n assert.strictEqual(settingsStorage.get('test'), 'changed');\n });\n it('leaves the cached value alone if the backing store has the same value', async () => {\n const mockStore = new MockStore();\n const settingsStorage = new SettingsStorage({}, mockStore);\n\n mockStore.set('test', 'value');\n settingsStorage.set('test', 'value');\n\n assert.strictEqual(mockStore.get('test'), 'value');\n assert.strictEqual(await settingsStorage.forceGet('test'), 'value');\n assert.strictEqual(mockStore.get('test'), 'value');\n assert.strictEqual(await settingsStorage.forceGet('test'), 'value');\n });\n });\n});\n\ndescribe('Settings instance', () => {\n afterEach(() => {\n Common.Settings.Settings.removeInstance();\n Common.Settings.resetSettings(); // Clear SettingsRegistrations.\n });\n\n it('can be instantiated in a test', () => {\n const dummyStorage = new SettingsStorage({});\n\n const settings = Common.Settings.Settings.instance({\n forceNew: true,\n syncedStorage: dummyStorage,\n globalStorage: dummyStorage,\n localStorage: dummyStorage,\n });\n\n assert.isOk(settings);\n });\n\n it('throws when constructed without storage', () => {\n assert.throws(() => Common.Settings.Settings.instance());\n assert.throws(\n () => Common.Settings.Settings.instance(\n {forceNew: true, syncedStorage: null, globalStorage: null, localStorage: null}));\n });\n\n it('stores synced settings in the correct storage', () => {\n const syncedStorage = new SettingsStorage({});\n const dummyStorage = new SettingsStorage({});\n Common.Settings.registerSettingExtension({\n settingName: 'static-synced-setting',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n storageType: Common.Settings.SettingStorageType.SYNCED,\n });\n const settings = Common.Settings.Settings.instance(\n {forceNew: true, syncedStorage, globalStorage: dummyStorage, localStorage: dummyStorage});\n\n const dynamicSetting: Common.Settings.Setting =\n settings.createSetting('dynamic-synced-setting', 'default val', Common.Settings.SettingStorageType.SYNCED);\n dynamicSetting.set('foo value');\n const staticSetting: Common.Settings.Setting = settings.moduleSetting('static-synced-setting');\n staticSetting.set(true);\n\n assert.isFalse(dummyStorage.has('dynamic-synced-setting'));\n assert.isFalse(dummyStorage.has('static-synced-setting'));\n assert.strictEqual(syncedStorage.get('dynamic-synced-setting'), '\"foo value\"');\n assert.strictEqual(syncedStorage.get('static-synced-setting'), 'true');\n });\n\n it('registers settings with the backing store when creating them', () => {\n const registeredSettings = new Set();\n const mockBackingStore: Common.Settings.SettingsBackingStore = {\n ...Common.Settings.NOOP_STORAGE,\n register: (name: string) => registeredSettings.add(name),\n };\n const storage = new SettingsStorage({}, mockBackingStore, '__prefix__.');\n Common.Settings.registerSettingExtension({\n settingName: 'static-global-setting',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n storageType: Common.Settings.SettingStorageType.GLOBAL,\n });\n\n const settings = Common.Settings.Settings.instance(\n {forceNew: true, syncedStorage: storage, globalStorage: storage, localStorage: storage});\n settings.createSetting('dynamic-local-setting', 42, Common.Settings.SettingStorageType.LOCAL);\n settings.createSetting('dynamic-synced-setting', 'foo', Common.Settings.SettingStorageType.SYNCED);\n\n assert.isTrue(registeredSettings.has('__prefix__.static-global-setting'));\n assert.isTrue(registeredSettings.has('__prefix__.dynamic-local-setting'));\n assert.isTrue(registeredSettings.has('__prefix__.dynamic-synced-setting'));\n });\n\n describe('forceGet', () => {\n it('triggers a setting changed event in case the value in the backing store got updated and we update the cached value',\n async () => {\n const mockStore = new MockStore();\n const settingsStorage = new SettingsStorage({}, mockStore);\n mockStore.set('test', '\"old\"');\n const settings = Common.Settings.Settings.instance({\n forceNew: true,\n syncedStorage: settingsStorage,\n globalStorage: settingsStorage,\n localStorage: settingsStorage,\n });\n const testSetting: Common.Settings.Setting =\n settings.createSetting('test', 'default val', Common.Settings.SettingStorageType.GLOBAL);\n const changes: string[] = [];\n testSetting.addChangeListener((event: Common.EventTarget.EventTargetEvent) => {\n changes.push(event.data);\n });\n mockStore.set('test', '\"new\"');\n assert.strictEqual(await testSetting.forceGet(), 'new');\n assert.deepEqual(changes, ['new']);\n assert.strictEqual(mockStore.get('test'), '\"new\"');\n assert.strictEqual(await settingsStorage.forceGet('test'), '\"new\"');\n assert.strictEqual(await testSetting.forceGet(), 'new');\n });\n });\n\n it('getIfNotDisabled returns the setting\\'s value only if the setting is not disabled', async () => {\n const registeredSettings = new Set();\n const mockBackingStore: Common.Settings.SettingsBackingStore = {\n ...Common.Settings.NOOP_STORAGE,\n register: (name: string) => registeredSettings.add(name),\n };\n const storage = new SettingsStorage({}, mockBackingStore, '__prefix__.');\n const settings = Common.Settings.Settings.instance(\n {forceNew: true, syncedStorage: storage, globalStorage: storage, localStorage: storage});\n const testSetting = settings.createSetting('test-setting', 'some value');\n assert.strictEqual(testSetting.getIfNotDisabled(), 'some value');\n\n testSetting.setDisabled(true);\n assert.isUndefined(testSetting.getIfNotDisabled());\n\n testSetting.setDisabled(false);\n assert.strictEqual(testSetting.getIfNotDisabled(), 'some value');\n });\n});\n\ndescribe('VersionController', () => {\n let settings: Common.Settings.Settings;\n let syncedStorage: Common.Settings.SettingsStorage;\n let globalStorage: Common.Settings.SettingsStorage;\n let localStorage: Common.Settings.SettingsStorage;\n\n beforeEach(() => {\n const mockStore = new MockStore();\n syncedStorage = new Common.Settings.SettingsStorage({}, mockStore);\n globalStorage = new Common.Settings.SettingsStorage({}, mockStore);\n localStorage = new Common.Settings.SettingsStorage({}, mockStore);\n settings = Common.Settings.Settings.instance({\n forceNew: true,\n syncedStorage,\n globalStorage,\n localStorage,\n });\n });\n\n afterEach(() => {\n Common.Settings.Settings.removeInstance();\n });\n\n describe('updateVersion', () => {\n it('initializes version settings with the current version if the setting doesn\\'t exist yet', () => {\n assert.isFalse(globalStorage.has(VersionController.GLOBAL_VERSION_SETTING_NAME));\n assert.isFalse(syncedStorage.has(VersionController.SYNCED_VERSION_SETTING_NAME));\n assert.isFalse(localStorage.has(VersionController.LOCAL_VERSION_SETTING_NAME));\n\n new VersionController().updateVersion();\n\n const currentVersion = VersionController.CURRENT_VERSION.toString();\n assert.strictEqual(globalStorage.get(VersionController.GLOBAL_VERSION_SETTING_NAME), currentVersion);\n assert.strictEqual(syncedStorage.get(VersionController.SYNCED_VERSION_SETTING_NAME), currentVersion);\n assert.strictEqual(localStorage.get(VersionController.LOCAL_VERSION_SETTING_NAME), currentVersion);\n });\n\n function spyAllUpdateMethods(versionController: Common.Settings.VersionController) {\n const spies: Array> = [];\n for (let i = 0; i < VersionController.CURRENT_VERSION; ++i) {\n spies.push(\n sinon.spy(versionController, `updateVersionFrom${i}To${i + 1}` as keyof Common.Settings.VersionController));\n }\n assert.lengthOf(spies, VersionController.CURRENT_VERSION);\n return spies;\n }\n\n it('does not run any update* methods if no version setting exist yet', () => {\n const versionController = new VersionController();\n const spies = spyAllUpdateMethods(versionController);\n\n versionController.updateVersion();\n\n for (const spy of spies) {\n assert.isFalse(spy.called);\n }\n });\n\n it('does not run any update* methods if all version settings are already current', () => {\n const currentVersion = VersionController.CURRENT_VERSION.toString();\n globalStorage.set(VersionController.GLOBAL_VERSION_SETTING_NAME, currentVersion);\n syncedStorage.set(VersionController.SYNCED_VERSION_SETTING_NAME, currentVersion);\n localStorage.set(VersionController.LOCAL_VERSION_SETTING_NAME, currentVersion);\n const versionController = new VersionController();\n const spies = spyAllUpdateMethods(versionController);\n\n versionController.updateVersion();\n\n for (const spy of spies) {\n assert.isFalse(spy.called);\n }\n });\n\n it('runs correct update* methods if the local bucket lags behind', () => {\n const currentVersion = VersionController.CURRENT_VERSION.toString();\n const localVersion = (VersionController.CURRENT_VERSION - 3).toString();\n globalStorage.set(VersionController.GLOBAL_VERSION_SETTING_NAME, currentVersion);\n syncedStorage.set(VersionController.SYNCED_VERSION_SETTING_NAME, currentVersion);\n localStorage.set(VersionController.LOCAL_VERSION_SETTING_NAME, localVersion);\n const versionController = new VersionController();\n const spies = spyAllUpdateMethods(versionController);\n\n versionController.updateVersion();\n\n const expectedUncalledSpies = spies.slice(0, -3);\n for (const spy of expectedUncalledSpies) {\n assert.isFalse(spy.called);\n }\n\n const expectedCalledSpies = spies.slice(-3);\n for (const spy of expectedCalledSpies) {\n assert.isTrue(spy.called);\n }\n });\n\n it('runs correct update* methods if the synced bucket runs ahead', () => {\n const currentVersion = VersionController.CURRENT_VERSION.toString();\n const oldVersion = (VersionController.CURRENT_VERSION - 1).toString();\n globalStorage.set(VersionController.GLOBAL_VERSION_SETTING_NAME, oldVersion);\n syncedStorage.set(VersionController.SYNCED_VERSION_SETTING_NAME, currentVersion);\n localStorage.set(VersionController.LOCAL_VERSION_SETTING_NAME, oldVersion);\n const versionController = new VersionController();\n const spies = spyAllUpdateMethods(versionController);\n\n versionController.updateVersion();\n\n const expectedUncalledSpies = spies.slice(0, -1);\n for (const spy of expectedUncalledSpies) {\n assert.isFalse(spy.called);\n }\n\n const expectedCalledSpies = spies.slice(-1);\n for (const spy of expectedCalledSpies) {\n assert.isTrue(spy.called);\n }\n });\n });\n\n describe('updateVersionFrom31To32', () => {\n it('correctly adds resourceTypeName to breakpoints', () => {\n const versionController = new VersionController();\n const breakpointsSetting = settings.createLocalSetting('breakpoints', [\n {url: 'webpack:///src/foo.ts', lineNumber: 4, condition: '', enabled: false},\n {url: 'foo.js', lineNumber: 1, columnNumber: 42, condition: 'false', enabled: true},\n ]);\n versionController.updateVersionFrom31To32();\n const breakpoints = breakpointsSetting.get();\n assert.lengthOf(breakpoints, 2);\n assert.propertyVal(breakpoints[0], 'url', 'webpack:///src/foo.ts');\n assert.propertyVal(breakpoints[0], 'resourceTypeName', 'script');\n assert.propertyVal(breakpoints[0], 'lineNumber', 4);\n assert.notProperty(breakpoints[0], 'columnNumber');\n assert.propertyVal(breakpoints[0], 'condition', '');\n assert.propertyVal(breakpoints[0], 'enabled', false);\n assert.propertyVal(breakpoints[1], 'url', 'foo.js');\n assert.propertyVal(breakpoints[1], 'resourceTypeName', 'script');\n assert.propertyVal(breakpoints[1], 'lineNumber', 1);\n assert.propertyVal(breakpoints[1], 'columnNumber', 42);\n assert.propertyVal(breakpoints[1], 'condition', 'false');\n assert.propertyVal(breakpoints[1], 'enabled', true);\n });\n });\n\n describe('updateVersionFrom32To33', () => {\n it('correctly discards previously viewed files without url properties', () => {\n const versionController = new VersionController();\n const previouslyViewedFilesSetting = settings.createLocalSetting('previouslyViewedFiles', [\n {url: 'http://localhost:3000', scrollLineNumber: 1},\n {scrollLineNumber: 1},\n {},\n {url: 'webpack:///src/foo.ts'},\n ]);\n versionController.updateVersionFrom32To33();\n const previouslyViewedFiles = previouslyViewedFilesSetting.get();\n assert.lengthOf(previouslyViewedFiles, 2);\n assert.propertyVal(previouslyViewedFiles[0], 'url', 'http://localhost:3000');\n assert.notProperty(previouslyViewedFiles[0], 'selectionRange');\n assert.propertyVal(previouslyViewedFiles[0], 'scrollLineNumber', 1);\n assert.propertyVal(previouslyViewedFiles[1], 'url', 'webpack:///src/foo.ts');\n assert.notProperty(previouslyViewedFiles[1], 'selectionRange');\n assert.notProperty(previouslyViewedFiles[1], 'scrollLineNumber');\n });\n\n it('correctly adds resourceTypeName to previously viewed files', () => {\n const versionController = new VersionController();\n const previouslyViewedFilesSetting = settings.createLocalSetting('previouslyViewedFiles', [\n {url: 'http://localhost:3000', scrollLineNumber: 1},\n {url: 'webpack:///src/foo.ts'},\n ]);\n versionController.updateVersionFrom32To33();\n const previouslyViewedFiles = previouslyViewedFilesSetting.get();\n assert.lengthOf(previouslyViewedFiles, 2);\n assert.propertyVal(previouslyViewedFiles[0], 'url', 'http://localhost:3000');\n assert.propertyVal(previouslyViewedFiles[0], 'resourceTypeName', 'script');\n assert.notProperty(previouslyViewedFiles[0], 'selectionRange');\n assert.propertyVal(previouslyViewedFiles[0], 'scrollLineNumber', 1);\n assert.propertyVal(previouslyViewedFiles[1], 'url', 'webpack:///src/foo.ts');\n assert.propertyVal(previouslyViewedFiles[1], 'resourceTypeName', 'script');\n assert.notProperty(previouslyViewedFiles[1], 'selectionRange');\n assert.notProperty(previouslyViewedFiles[1], 'scrollLineNumber');\n });\n });\n\n describe('updateVersionFrom33To34', () => {\n it('correctly adds isLogpoint to breakpoints', () => {\n const versionController = new VersionController();\n const breakpointsSetting = settings.createLocalSetting('breakpoints', [\n {\n url: 'webpack:///src/foo.ts',\n lineNumber: 4,\n resourceTypeName: 'script',\n condition: '/** DEVTOOLS_LOGPOINT */ console.log(foo.property)',\n enabled: true,\n },\n {\n url: 'foo.js',\n lineNumber: 1,\n columnNumber: 42,\n resourceTypeName: 'script',\n condition: 'x === 42',\n enabled: true,\n },\n {url: 'bar.js', lineNumber: 5, columnNumber: 1, resourceTypeName: 'script', condition: '', enabled: true},\n ]);\n\n versionController.updateVersionFrom33To34();\n const breakpoints = breakpointsSetting.get();\n\n assert.propertyVal(breakpoints[0], 'isLogpoint', true);\n assert.propertyVal(breakpoints[1], 'isLogpoint', false);\n assert.propertyVal(breakpoints[2], 'isLogpoint', false);\n });\n });\n\n describe('updateVersionFrom34To35', () => {\n it('removes the logpoint prefix/suffix from logpoints', () => {\n const versionController = new VersionController();\n const breakpointsSetting =\n settings.createLocalSetting('breakpoints', [{\n url: 'webpack:///src/foo.ts',\n lineNumber: 4,\n resourceTypeName: 'script',\n condition: '/** DEVTOOLS_LOGPOINT */ console.log(foo.property)',\n enabled: true,\n isLogpoint: true,\n }]);\n\n versionController.updateVersionFrom34To35();\n\n const breakpoints = breakpointsSetting.get();\n assert.lengthOf(breakpoints, 1);\n assert.propertyVal(breakpoints[0], 'condition', 'foo.property');\n });\n\n it('leaves conditional breakpoints alone', () => {\n const versionController = new VersionController();\n const breakpointsSetting = settings.createLocalSetting('breakpoints', [{\n url: 'webpack:///src/foo.ts',\n lineNumber: 4,\n resourceTypeName: 'script',\n condition: 'x === 42',\n enabled: true,\n isLogpoint: false,\n }]);\n\n versionController.updateVersionFrom34To35();\n\n const breakpoints = breakpointsSetting.get();\n assert.lengthOf(breakpoints, 1);\n assert.propertyVal(breakpoints[0], 'condition', 'x === 42');\n });\n });\n\n describe('updateVersionFrom35To36', () => {\n it('update showThirdPartyIssues setting value to true', () => {\n const versionController = new VersionController();\n const showThirdPartyIssuesSetting = settings.createLocalSetting('showThirdPartyIssues', false);\n versionController.updateVersionFrom35To36();\n assert.isTrue(showThirdPartyIssuesSetting.get());\n });\n });\n\n describe('updateVersionFrom36To37', () => {\n it('updates all keys to kebab case', () => {\n const versionController = new VersionController();\n settings.globalStorage.set('globalSetting1', '');\n settings.globalStorage.set('globalSetting2', '');\n settings.localStorage.set('localSetting', '');\n settings.syncedStorage.set('syncedSetting', '');\n\n versionController.updateVersionFrom36To37();\n\n assert.deepEqual(settings.globalStorage.keys(), ['global-setting-1', 'global-setting-2']);\n assert.deepEqual(settings.localStorage.keys(), ['local-setting']);\n assert.deepEqual(settings.syncedStorage.keys(), ['synced-setting']);\n });\n\n it('keeps kebab case settings as is', () => {\n const versionController = new VersionController();\n settings.globalStorage.set('setting', '123');\n settings.localStorage.set('another-setting', '456');\n\n versionController.updateVersionFrom36To37();\n\n assert.deepEqual(settings.globalStorage.keys(), ['setting']);\n assert.strictEqual(settings.globalStorage.get('setting'), '123');\n assert.strictEqual(settings.localStorage.get('another-setting'), '456');\n });\n\n it('update data grid column weights value', () => {\n const versionController = new VersionController();\n settings.globalStorage.set('dataGrid-foo-columnWeights', JSON.stringify({\n columnOne: 1,\n columnTwo: 2,\n }));\n\n versionController.updateVersionFrom36To37();\n\n const setting = settings.createSetting('data-grid-foo-column-weights', {});\n\n assert.deepEqual(setting.get(), {'column-one': 1, 'column-two': 2});\n });\n\n it('update view manager settings values', () => {\n const versionController = new VersionController();\n settings.globalStorage.set('viewsLocationOverride', JSON.stringify({\n somePanel: 'main',\n other_panel: 'drawer',\n }));\n settings.globalStorage.set('closeableTabs', JSON.stringify({\n somePanel: false,\n other_panel: true,\n }));\n settings.globalStorage.set('main-tabOrder', JSON.stringify({\n somePanel: 2,\n other_panel: 1,\n }));\n settings.globalStorage.set('main-selectedTab', JSON.stringify('somePanel'));\n\n versionController.updateVersionFrom36To37();\n\n assert.deepEqual(\n settings.createSetting('views-location-override', {}).get(), {'some-panel': 'main', 'other-panel': 'drawer'});\n assert.deepEqual(settings.createSetting('closeable-tabs', {}).get(), {'some-panel': false, 'other-panel': true});\n assert.deepEqual(settings.createSetting('main-tab-order', {}).get(), {'some-panel': 2, 'other-panel': 1});\n assert.deepEqual(settings.createSetting('main-selected-tab', '').get(), 'some-panel');\n });\n });\n});\n"]} \ No newline at end of file diff --git a/public/core/host/AidaClient.d.ts b/public/core/host/AidaClient.d.ts index cbcef3ec2..37a6997dc 100644 --- a/public/core/host/AidaClient.d.ts +++ b/public/core/host/AidaClient.d.ts @@ -79,6 +79,7 @@ export interface AidaResponseMetadata { export interface AidaResponse { explanation: string; metadata: AidaResponseMetadata; + completed: boolean; } export declare const enum AidaAccessPreconditions { AVAILABLE = "available", diff --git a/public/core/host/AidaClient.js b/public/core/host/AidaClient.js index 095574f40..8d0a3d445 100644 --- a/public/core/host/AidaClient.js +++ b/public/core/host/AidaClient.js @@ -46,6 +46,7 @@ export var RecitationAction; RecitationAction["EXEMPT_FOUND_IN_PROMPT"] = "EXEMPT_FOUND_IN_PROMPT"; })(RecitationAction || (RecitationAction = {})); export const CLIENT_NAME = 'CHROME_DEVTOOLS'; +const CODE_CHUNK_SEPARATOR = '\n`````\n'; export class AidaClient { static buildConsoleInsightsRequest(input) { const request = { @@ -155,7 +156,6 @@ export class AidaClient { catch (error) { throw new Error('Cannot parse chunk: ' + chunk, { cause: error }); } - const CODE_CHUNK_SEPARATOR = '\n`````\n'; for (const result of results) { if ('metadata' in result) { metadata.rpcGlobalId = result.metadata.rpcGlobalId; @@ -193,9 +193,15 @@ export class AidaClient { yield { explanation: text.join('') + (inCodeChunk ? CODE_CHUNK_SEPARATOR : ''), metadata, + completed: false, }; } } + yield { + explanation: text.join('') + (inCodeChunk ? CODE_CHUNK_SEPARATOR : ''), + metadata, + completed: true, + }; } registerClientEvent(clientEvent) { const { promise, resolve } = Promise.withResolvers(); diff --git a/public/core/host/AidaClient.js.map b/public/core/host/AidaClient.js.map index 0c137044a..af7182845 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;AAE9C,OAAO,EAAC,6BAA6B,EAAC,MAAM,4BAA4B,CAAC;AAEzE,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;AAYD,MAAM,CAAN,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,kCAAkC;IAClC,6GAAkC,CAAA;IAClC,wCAAwC;IACxC,yDAAQ,CAAA;IACR,mCAAmC;IACnC,2EAAiB,CAAA;AACnB,CAAC,EAPW,iBAAiB,KAAjB,iB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I,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;IAED,mBAAmB,CAAC,WAA0C;QAC5D,MAAM,EAAC,OAAO,EAAE,OAAO,EAAC,GAAG,OAAO,CAAC,aAAa,EAAoB,CAAC;QACrE,6BAA6B,CAAC,uBAAuB,CACjD,IAAI,CAAC,SAAS,CAAC;YACb,MAAM,EAAE,WAAW;YACnB,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,GAAG,WAAW;SACf,CAAC,EACF,OAAO,CACV,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAED,MAAM,UAAU,qBAAqB,CAAC,QAA0B;IAC9D,IAAI,QAAQ,EAAE,CAAC;QACb,QAAQ,QAAQ,EAAE,CAAC;YACjB,KAAK,SAAS;gBACZ,OAAO,QAAQ,CAAC,OAAO,CAAC;YAC1B,KAAK,QAAQ;gBACX,OAAO,QAAQ,CAAC,MAAM,CAAC;QAC3B,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC,OAAO,CAAC;AAC1B,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 '../common/common.js';\n\nimport {InspectorFrontendHostInstance} from './InspectorFrontendHost.js';\nimport {type AidaClientResult, 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 const enum Rating {\n POSITIVE = 'POSITIVE',\n NEGATIVE = 'NEGATIVE',\n}\n\nexport interface Chunk {\n text: string;\n entity: Entity;\n}\n\nexport enum FunctionalityType {\n // Unspecified functionality type.\n FUNCTIONALITY_TYPE_UNSPECIFIED = 0,\n // The generic AI chatbot functionality.\n CHAT = 1,\n // The explain error functionality.\n EXPLAIN_ERROR = 2,\n}\n\nexport enum ClientFeature {\n // Unspecified client feature.\n CLIENT_FEATURE_UNSPECIFIED = 0,\n // Chrome console insights feature.\n CHROME_CONSOLE_INSIGHTS = 1,\n // Chrome freestyler.\n CHROME_FREESTYLER = 2,\n}\n\nexport enum UserTier {\n // Unspecified user tier.\n USER_TIER_UNSPECIFIED = 0,\n // Users who are internal testers.\n TESTERS = 1,\n // Users in the general public.\n PUBLIC = 3,\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 // eslint-disable-next-line @typescript-eslint/naming-convention\n string_session_id?: string,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n user_tier?: UserTier,\n };\n // eslint-disable-next-line @typescript-eslint/naming-convention\n functionality_type?: FunctionalityType;\n // eslint-disable-next-line @typescript-eslint/naming-convention\n client_feature?: ClientFeature;\n}\n\nexport interface AidaDoConversationClientEvent {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n corresponding_aida_rpc_global_id: number;\n // eslint-disable-next-line @typescript-eslint/naming-convention\n disable_user_content_logging: boolean;\n // eslint-disable-next-line @typescript-eslint/naming-convention\n do_conversation_client_event: {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n user_feedback: {\n sentiment?: Rating,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n user_input?: {\n comment?: string,\n },\n },\n };\n}\n\nexport enum RecitationAction {\n ACTION_UNSPECIFIED = 'ACTION_UNSPECIFIED',\n CITE = 'CITE',\n BLOCK = 'BLOCK',\n NO_ACTION = 'NO_ACTION',\n EXEMPT_FOUND_IN_PROMPT = 'EXEMPT_FOUND_IN_PROMPT',\n}\n\nexport interface Citation {\n startIndex: number;\n endIndex: number;\n url: string;\n}\n\nexport interface AttributionMetadata {\n attributionAction: RecitationAction;\n citations: Citation[];\n}\n\nexport interface AidaResponseMetadata {\n rpcGlobalId?: number;\n attributionMetadata?: AttributionMetadata[];\n}\n\nexport interface AidaResponse {\n explanation: string;\n metadata: AidaResponseMetadata;\n}\n\nexport const enum AidaAccessPreconditions {\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 const CLIENT_NAME = 'CHROME_DEVTOOLS';\n\nexport class AidaClient {\n static buildConsoleInsightsRequest(input: string): AidaRequest {\n const request: AidaRequest = {\n input,\n client: CLIENT_NAME,\n functionality_type: FunctionalityType.EXPLAIN_ERROR,\n client_feature: ClientFeature.CHROME_CONSOLE_INSIGHTS,\n };\n const config = Common.Settings.Settings.instance().getHostConfig();\n let temperature = NaN;\n let modelId = '';\n if (config.devToolsConsoleInsights?.enabled) {\n temperature = config.devToolsConsoleInsights.temperature || 0;\n modelId = config.devToolsConsoleInsights.modelId || '';\n }\n const disallowLogging = config.aidaAvailability?.disallowLogging ?? true;\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 checkAccessPreconditions(): Promise {\n if (!navigator.onLine) {\n return AidaAccessPreconditions.NO_INTERNET;\n }\n\n const syncInfo = await new Promise(\n resolve => InspectorFrontendHostInstance.getSyncInformation(syncInfo => resolve(syncInfo)));\n if (!syncInfo.accountEmail) {\n return AidaAccessPreconditions.NO_ACCOUNT_EMAIL;\n }\n\n if (!syncInfo.isSyncActive) {\n return AidaAccessPreconditions.NO_ACTIVE_SYNC;\n }\n\n return AidaAccessPreconditions.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} = Promise.withResolvers();\n return {\n write: async(data: string): Promise => {\n resolve(data);\n ({promise, resolve, reject} = Promise.withResolvers());\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: AidaResponseMetadata = {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 if ('attributionMetadata' in result.metadata) {\n if (!metadata.attributionMetadata) {\n metadata.attributionMetadata = [];\n }\n metadata.attributionMetadata.push(result.metadata.attributionMetadata);\n }\n }\n if ('textChunk' in result) {\n if (inCodeChunk) {\n text.push(CODE_CHUNK_SEPARATOR);\n inCodeChunk = false;\n }\n text.push(result.textChunk.text);\n 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 registerClientEvent(clientEvent: AidaDoConversationClientEvent): Promise {\n const {promise, resolve} = Promise.withResolvers();\n InspectorFrontendHostInstance.registerAidaClientEvent(\n JSON.stringify({\n client: CLIENT_NAME,\n event_time: new Date().toISOString(),\n ...clientEvent,\n }),\n resolve,\n );\n\n return promise;\n }\n}\n\nexport function convertToUserTierEnum(userTier: string|undefined): UserTier {\n if (userTier) {\n switch (userTier) {\n case 'TESTERS':\n return UserTier.TESTERS;\n case 'PUBLIC':\n return UserTier.PUBLIC;\n }\n }\n return UserTier.TESTERS;\n}\n"]} \ No newline at end of file +{"version":3,"file":"AidaClient.js","sourceRoot":"","sources":["../../../../../../front_end/core/host/AidaClient.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAC,6BAA6B,EAAC,MAAM,4BAA4B,CAAC;AAEzE,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AAErD,MAAM,CAAN,IAAY,MAIX;AAJD,WAAY,MAAM;IAChB,yCAAW,CAAA;IACX,mCAAQ,CAAA;IACR,uCAAU,CA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C3B,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC,OAAO,CAAC;AAC1B,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 '../common/common.js';\n\nimport {InspectorFrontendHostInstance} from './InspectorFrontendHost.js';\nimport {type AidaClientResult, 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 const enum Rating {\n POSITIVE = 'POSITIVE',\n NEGATIVE = 'NEGATIVE',\n}\n\nexport interface Chunk {\n text: string;\n entity: Entity;\n}\n\nexport enum FunctionalityType {\n // Unspecified functionality type.\n FUNCTIONALITY_TYPE_UNSPECIFIED = 0,\n // The generic AI chatbot functionality.\n CHAT = 1,\n // The explain error functionality.\n EXPLAIN_ERROR = 2,\n}\n\nexport enum ClientFeature {\n // Unspecified client feature.\n CLIENT_FEATURE_UNSPECIFIED = 0,\n // Chrome console insights feature.\n CHROME_CONSOLE_INSIGHTS = 1,\n // Chrome freestyler.\n CHROME_FREESTYLER = 2,\n}\n\nexport enum UserTier {\n // Unspecified user tier.\n USER_TIER_UNSPECIFIED = 0,\n // Users who are internal testers.\n TESTERS = 1,\n // Users in the general public.\n PUBLIC = 3,\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 // eslint-disable-next-line @typescript-eslint/naming-convention\n string_session_id?: string,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n user_tier?: UserTier,\n };\n // eslint-disable-next-line @typescript-eslint/naming-convention\n functionality_type?: FunctionalityType;\n // eslint-disable-next-line @typescript-eslint/naming-convention\n client_feature?: ClientFeature;\n}\n\nexport interface AidaDoConversationClientEvent {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n corresponding_aida_rpc_global_id: number;\n // eslint-disable-next-line @typescript-eslint/naming-convention\n disable_user_content_logging: boolean;\n // eslint-disable-next-line @typescript-eslint/naming-convention\n do_conversation_client_event: {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n user_feedback: {\n sentiment?: Rating,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n user_input?: {\n comment?: string,\n },\n },\n };\n}\n\nexport enum RecitationAction {\n ACTION_UNSPECIFIED = 'ACTION_UNSPECIFIED',\n CITE = 'CITE',\n BLOCK = 'BLOCK',\n NO_ACTION = 'NO_ACTION',\n EXEMPT_FOUND_IN_PROMPT = 'EXEMPT_FOUND_IN_PROMPT',\n}\n\nexport interface Citation {\n startIndex: number;\n endIndex: number;\n url: string;\n}\n\nexport interface AttributionMetadata {\n attributionAction: RecitationAction;\n citations: Citation[];\n}\n\nexport interface AidaResponseMetadata {\n rpcGlobalId?: number;\n attributionMetadata?: AttributionMetadata[];\n}\n\nexport interface AidaResponse {\n explanation: string;\n metadata: AidaResponseMetadata;\n completed: boolean;\n}\n\nexport const enum AidaAccessPreconditions {\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 const CLIENT_NAME = 'CHROME_DEVTOOLS';\n\nconst CODE_CHUNK_SEPARATOR = '\\n`````\\n';\n\nexport class AidaClient {\n static buildConsoleInsightsRequest(input: string): AidaRequest {\n const request: AidaRequest = {\n input,\n client: CLIENT_NAME,\n functionality_type: FunctionalityType.EXPLAIN_ERROR,\n client_feature: ClientFeature.CHROME_CONSOLE_INSIGHTS,\n };\n const config = Common.Settings.Settings.instance().getHostConfig();\n let temperature = NaN;\n let modelId = '';\n if (config.devToolsConsoleInsights?.enabled) {\n temperature = config.devToolsConsoleInsights.temperature || 0;\n modelId = config.devToolsConsoleInsights.modelId || '';\n }\n const disallowLogging = config.aidaAvailability?.disallowLogging ?? true;\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 checkAccessPreconditions(): Promise {\n if (!navigator.onLine) {\n return AidaAccessPreconditions.NO_INTERNET;\n }\n\n const syncInfo = await new Promise(\n resolve => InspectorFrontendHostInstance.getSyncInformation(syncInfo => resolve(syncInfo)));\n if (!syncInfo.accountEmail) {\n return AidaAccessPreconditions.NO_ACCOUNT_EMAIL;\n }\n\n if (!syncInfo.isSyncActive) {\n return AidaAccessPreconditions.NO_ACTIVE_SYNC;\n }\n\n return AidaAccessPreconditions.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} = Promise.withResolvers();\n return {\n write: async(data: string): Promise => {\n resolve(data);\n ({promise, resolve, reject} = Promise.withResolvers());\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: AidaResponseMetadata = {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\n for (const result of results) {\n if ('metadata' in result) {\n metadata.rpcGlobalId = result.metadata.rpcGlobalId;\n if ('attributionMetadata' in result.metadata) {\n if (!metadata.attributionMetadata) {\n metadata.attributionMetadata = [];\n }\n metadata.attributionMetadata.push(result.metadata.attributionMetadata);\n }\n }\n if ('textChunk' in result) {\n if (inCodeChunk) {\n text.push(CODE_CHUNK_SEPARATOR);\n inCodeChunk = false;\n }\n text.push(result.textChunk.text);\n 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 completed: false,\n };\n }\n }\n yield {\n explanation: text.join('') + (inCodeChunk ? CODE_CHUNK_SEPARATOR : ''),\n metadata,\n completed: true,\n };\n }\n\n registerClientEvent(clientEvent: AidaDoConversationClientEvent): Promise {\n const {promise, resolve} = Promise.withResolvers();\n InspectorFrontendHostInstance.registerAidaClientEvent(\n JSON.stringify({\n client: CLIENT_NAME,\n event_time: new Date().toISOString(),\n ...clientEvent,\n }),\n resolve,\n );\n\n return promise;\n }\n}\n\nexport function convertToUserTierEnum(userTier: string|undefined): UserTier {\n if (userTier) {\n switch (userTier) {\n case 'TESTERS':\n return UserTier.TESTERS;\n case 'PUBLIC':\n return UserTier.PUBLIC;\n }\n }\n return UserTier.TESTERS;\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 0608373f8..18e59f00e 100644 --- a/public/core/host/AidaClient.test.js +++ b/public/core/host/AidaClient.test.js @@ -126,9 +126,10 @@ describeWithEnvironment('AidaClient', () => { const provider = new Host.AidaClient.AidaClient(); const results = await getAllResults(provider); assert.deepStrictEqual(results, [ - { explanation: 'hello ', metadata: { rpcGlobalId: 123 } }, - { explanation: 'hello brave ', metadata: { rpcGlobalId: 123 } }, - { explanation: 'hello brave new world!', metadata: { rpcGlobalId: 123 } }, + { explanation: 'hello ', metadata: { rpcGlobalId: 123 }, completed: false }, + { explanation: 'hello brave ', metadata: { rpcGlobalId: 123 }, completed: false }, + { explanation: 'hello brave new world!', metadata: { rpcGlobalId: 123 }, completed: false }, + { explanation: 'hello brave new world!', metadata: { rpcGlobalId: 123 }, completed: true }, ]); }); it('handles single square bracket as a chunk', async () => { @@ -144,7 +145,8 @@ describeWithEnvironment('AidaClient', () => { const provider = new Host.AidaClient.AidaClient(); const results = await getAllResults(provider); assert.deepStrictEqual(results, [ - { explanation: 'hello world', metadata: { rpcGlobalId: 123 } }, + { explanation: 'hello world', metadata: { rpcGlobalId: 123 }, completed: false }, + { explanation: 'hello world', metadata: { rpcGlobalId: 123 }, completed: true }, ]); }); it('handles chunked response with multiple objects per chunk', async () => { @@ -178,6 +180,7 @@ describeWithEnvironment('AidaClient', () => { explanation: 'Friends, Romans, countrymen, lend me your ears;\n' + 'I come to bury Caesar, not to praise him.\n', metadata: { rpcGlobalId: 123 }, + completed: false, }, { explanation: 'Friends, Romans, countrymen, lend me your ears;\n' + @@ -186,6 +189,7 @@ describeWithEnvironment('AidaClient', () => { 'The good is oft interred with their bones;\n' + 'So let it be with Caesar. The noble Brutus\n', metadata: { rpcGlobalId: 123 }, + completed: false, }, { explanation: 'Friends, Romans, countrymen, lend me your ears;\n' + @@ -195,6 +199,7 @@ describeWithEnvironment('AidaClient', () => { 'So let it be with Caesar. The noble Brutus\n' + 'Hath told you Caesar was ambitious:\n', metadata: { rpcGlobalId: 123 }, + completed: false, }, { explanation: 'Friends, Romans, countrymen, lend me your ears;\n' + @@ -206,6 +211,19 @@ describeWithEnvironment('AidaClient', () => { 'If it were so, it was a grievous fault,\n' + 'And grievously hath Caesar answer’d it.\n', metadata: { rpcGlobalId: 123 }, + completed: false, + }, + { + explanation: 'Friends, Romans, countrymen, lend me your ears;\n' + + 'I come to bury Caesar, not to praise him.\n' + + 'The evil that men do lives after them;\n' + + 'The good is oft interred with their bones;\n' + + 'So let it be with Caesar. The noble Brutus\n' + + 'Hath told you Caesar was ambitious:\n' + + 'If it were so, it was a grievous fault,\n' + + 'And grievously hath Caesar answer’d it.\n', + metadata: { rpcGlobalId: 123 }, + completed: true, }, ]); }); @@ -247,6 +265,22 @@ describeWithEnvironment('AidaClient', () => { }, ], }, + completed: false, + }, + { + explanation: 'Chunk1\n' + + 'Chunk2\n', + metadata: { + rpcGlobalId: 123, + attributionMetadata: [ + { attributionAction: Host.AidaClient.RecitationAction.BLOCK, citations: [] }, + { + attributionAction: Host.AidaClient.RecitationAction.CITE, + citations: [{ startIndex: 0, endIndex: 1, url: 'https://example.com' }], + }, + ], + }, + completed: true, }, ]); }); @@ -266,7 +300,12 @@ describeWithEnvironment('AidaClient', () => { }); const provider = new Host.AidaClient.AidaClient(); const results = (await getAllResults(provider)).map(r => r.explanation); - assert.deepStrictEqual(results, ['hello ', 'hello \n`````\nbrave \n`````\n', 'hello \n`````\nbrave new World()\n`````\n']); + assert.deepStrictEqual(results, [ + 'hello ', + 'hello \n`````\nbrave \n`````\n', + 'hello \n`````\nbrave new World()\n`````\n', + 'hello \n`````\nbrave new World()\n`````\n', + ]); }); it('throws a readable error on 403', async () => { sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'doAidaConversation').callsArgWith(2, { diff --git a/public/core/host/AidaClient.test.js.map b/public/core/host/AidaClient.test.js.map index 96f7961f3..a2020aee3 100644 --- a/public/core/host/AidaClient.test.js.map +++ b/public/core/host/AidaClient.test.js.map @@ -1 +1 @@ -{"version":3,"file":"AidaClient.test.js","sourceRoot":"","sources":["../../../../../../front_end/core/host/AidaClient.test.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,EAAC,uBAAuB,EAAE,oBAAoB,EAAC,MAAM,qCAAqC,CAAC;AAElG,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,MAAM,aAAa,GAAG,aAAa,CAAC;AAEpC,uBAAuB,CAAC,YAAY,EAAE,GAAG,EAAE;IACzC,EAAE,CAAC,8DAA8D,EAAE,GAAG,EAAE;QACtE,MAAM,IAAI,GAAG,oBAAoB,CAAC,EAAE,CAAC,CAAC;QACtC,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,2BAA2B,CAAC,KAAK,CAAC,CAAC;QAC9E,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE;YAC9B,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,iBAAiB;YACzB,cAAc,EAAE,CAAC;YACjB,kBAAkB,EAAE,CAAC;SACtB,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;QAClC,MAAM,IAAI,GAAG,oBAAoB,CAAC;YAChC,uBAAuB,EAAE;gBACvB,OAAO,EAAE,IAAI;gBACb,WAAW,EAAE,GAAG;aACjB;SACF,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,2BAA2B,CAAC,KAAK,CAAC,CAAC;QAC9E,MA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ACvE,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,6BAA6B,EAAE,yBAAyB,CAAC,CAAC;YAC7G,MAAM,MAAM,GAAG,CAAC,CAAC;YAEjB,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC;YAClD,KAAK,QAAQ,CAAC,mBAAmB,CAAC;gBAChC,gCAAgC,EAAE,MAAM;gBACxC,4BAA4B,EAAE,KAAK;gBACnC,4BAA4B,EAAE,EAAC,aAAa,EAAE,EAAC,SAAS,kDAAiC,EAAC,EAAC;aAC5F,CAAC,CAAC;YACH,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;YAEnD,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC;gBAClC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW;gBACnC,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM;gBAC9B,gCAAgC,EAAE,MAAM;gBACxC,4BAA4B,EAAE;oBAC5B,aAAa,EAAE;wBACb,SAAS,EAAE,UAAU;qBACtB;iBACF;aACF,CAAC,CAAC,CAAC;QACN,CAAC,CAAC,CAAC;IACL,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, 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 client_feature: 1,\n functionality_type: 2,\n });\n stub.restore();\n });\n\n it('adds a model temperature', () => {\n const stub = getGetHostConfigStub({\n devToolsConsoleInsights: {\n enabled: true,\n temperature: 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 client_feature: 1,\n functionality_type: 2,\n });\n stub.restore();\n });\n\n it('adds a model temperature of 0', () => {\n const stub = getGetHostConfigStub({\n devToolsConsoleInsights: {\n enabled: true,\n temperature: 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 client_feature: 1,\n functionality_type: 2,\n });\n stub.restore();\n });\n\n it('adds a model id and temperature', () => {\n const stub = getGetHostConfigStub({\n devToolsConsoleInsights: {\n enabled: true,\n modelId: TEST_MODEL_ID,\n temperature: 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 client_feature: 1,\n functionality_type: 2,\n });\n stub.restore();\n });\n\n it('adds metadata to disallow logging', () => {\n const stub = getGetHostConfigStub({\n aidaAvailability: {\n disallowLogging: true,\n },\n devToolsConsoleInsights: {\n enabled: true,\n temperature: 0.5,\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 client_feature: 1,\n functionality_type: 2,\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 attributionMetadata', async () => {\n sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'doAidaConversation')\n .callsFake(async (_, streamId, callback) => {\n const response = JSON.stringify([\n {\n textChunk: {text: 'Chunk1\\n'},\n metadata: {rpcGlobalId: 123, attributionMetadata: {attributionAction: 'BLOCK', citations: []}},\n },\n {\n textChunk: {text: 'Chunk2\\n'},\n metadata: {\n rpcGlobalId: 123,\n attributionMetadata:\n {attributionAction: 'CITE', citations: [{startIndex: 0, endIndex: 1, url: 'https://example.com'}]},\n },\n },\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 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: 'Chunk1\\n' +\n 'Chunk2\\n',\n metadata: {\n rpcGlobalId: 123,\n attributionMetadata: [\n {attributionAction: Host.AidaClient.RecitationAction.BLOCK, citations: []},\n {\n attributionAction: Host.AidaClient.RecitationAction.CITE,\n citations: [{startIndex: 0, endIndex: 1, url: 'https://example.com'}],\n },\n ],\n },\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.checkAccessPreconditions();\n assert.strictEqual(result, Host.AidaClient.AidaAccessPreconditions.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.checkAccessPreconditions();\n\n assert.strictEqual(result, Host.AidaClient.AidaAccessPreconditions.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.checkAccessPreconditions();\n\n assert.strictEqual(result, Host.AidaClient.AidaAccessPreconditions.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.checkAccessPreconditions();\n\n assert.strictEqual(result, Host.AidaClient.AidaAccessPreconditions.AVAILABLE);\n });\n });\n\n describe('registerClientEvent', () => {\n it('should populate the default value for Aida Client event', async () => {\n const stub = sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'registerAidaClientEvent');\n const RPC_ID = 0;\n\n const provider = new Host.AidaClient.AidaClient();\n void provider.registerClientEvent({\n corresponding_aida_rpc_global_id: RPC_ID,\n disable_user_content_logging: false,\n do_conversation_client_event: {user_feedback: {sentiment: Host.AidaClient.Rating.POSITIVE}},\n });\n const arg = JSON.parse(stub.getCalls()[0].args[0]);\n\n sinon.assert.match(arg, sinon.match({\n client: Host.AidaClient.CLIENT_NAME,\n event_time: sinon.match.string,\n corresponding_aida_rpc_global_id: RPC_ID,\n do_conversation_client_event: {\n user_feedback: {\n sentiment: 'POSITIVE',\n },\n },\n }));\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,WAAW,CAAC;AAElC,MAAM,aAAa,GAAG,aAAa,CAAC;AAEpC,uBAAuB,CAAC,YAAY,EAAE,GAAG,EAAE;IACzC,EAAE,CAAC,8DAA8D,EAAE,GAAG,EAAE;QACtE,MAAM,IAAI,GAAG,oBAAoB,CAAC,EAAE,CAAC,CAAC;QACtC,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,2BAA2B,CAAC,KAAK,CAAC,CAAC;QAC9E,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE;YAC9B,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,iBAAiB;YACzB,cAAc,EAAE,CAAC;YACjB,kBAAkB,EAAE,CAAC;SACtB,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;QAClC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CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;QACnC,EAAE,CAAC,yDAAyD,EAAE,KAAK,IAAI,EAAE;YACvE,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,6BAA6B,EAAE,yBAAyB,CAAC,CAAC;YAC7G,MAAM,MAAM,GAAG,CAAC,CAAC;YAEjB,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC;YAClD,KAAK,QAAQ,CAAC,mBAAmB,CAAC;gBAChC,gCAAgC,EAAE,MAAM;gBACxC,4BAA4B,EAAE,KAAK;gBACnC,4BAA4B,EAAE,EAAC,aAAa,EAAE,EAAC,SAAS,kDAAiC,EAAC,EAAC;aAC5F,CAAC,CAAC;YACH,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;YAEnD,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC;gBAClC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW;gBACnC,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM;gBAC9B,gCAAgC,EAAE,MAAM;gBACxC,4BAA4B,EAAE;oBAC5B,aAAa,EAAE;wBACb,SAAS,EAAE,UAAU;qBACtB;iBACF;aACF,CAAC,CAAC,CAAC;QACN,CAAC,CAAC,CAAC;IACL,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, 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 client_feature: 1,\n functionality_type: 2,\n });\n stub.restore();\n });\n\n it('adds a model temperature', () => {\n const stub = getGetHostConfigStub({\n devToolsConsoleInsights: {\n enabled: true,\n temperature: 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 client_feature: 1,\n functionality_type: 2,\n });\n stub.restore();\n });\n\n it('adds a model temperature of 0', () => {\n const stub = getGetHostConfigStub({\n devToolsConsoleInsights: {\n enabled: true,\n temperature: 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 client_feature: 1,\n functionality_type: 2,\n });\n stub.restore();\n });\n\n it('adds a model id and temperature', () => {\n const stub = getGetHostConfigStub({\n devToolsConsoleInsights: {\n enabled: true,\n modelId: TEST_MODEL_ID,\n temperature: 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 client_feature: 1,\n functionality_type: 2,\n });\n stub.restore();\n });\n\n it('adds metadata to disallow logging', () => {\n const stub = getGetHostConfigStub({\n aidaAvailability: {\n disallowLogging: true,\n },\n devToolsConsoleInsights: {\n enabled: true,\n temperature: 0.5,\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 client_feature: 1,\n functionality_type: 2,\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}, completed: false},\n {explanation: 'hello brave ', metadata: {rpcGlobalId: 123}, completed: false},\n {explanation: 'hello brave new world!', metadata: {rpcGlobalId: 123}, completed: false},\n {explanation: 'hello brave new world!', metadata: {rpcGlobalId: 123}, completed: true},\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}, completed: false},\n {explanation: 'hello world', metadata: {rpcGlobalId: 123}, completed: true},\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 completed: false,\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 completed: false,\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 completed: false,\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 completed: false,\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 completed: true,\n },\n ]);\n });\n\n it('handles attributionMetadata', async () => {\n sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'doAidaConversation')\n .callsFake(async (_, streamId, callback) => {\n const response = JSON.stringify([\n {\n textChunk: {text: 'Chunk1\\n'},\n metadata: {rpcGlobalId: 123, attributionMetadata: {attributionAction: 'BLOCK', citations: []}},\n },\n {\n textChunk: {text: 'Chunk2\\n'},\n metadata: {\n rpcGlobalId: 123,\n attributionMetadata:\n {attributionAction: 'CITE', citations: [{startIndex: 0, endIndex: 1, url: 'https://example.com'}]},\n },\n },\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 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: 'Chunk1\\n' +\n 'Chunk2\\n',\n metadata: {\n rpcGlobalId: 123,\n attributionMetadata: [\n {attributionAction: Host.AidaClient.RecitationAction.BLOCK, citations: []},\n {\n attributionAction: Host.AidaClient.RecitationAction.CITE,\n citations: [{startIndex: 0, endIndex: 1, url: 'https://example.com'}],\n },\n ],\n },\n completed: false,\n },\n {\n explanation: 'Chunk1\\n' +\n 'Chunk2\\n',\n metadata: {\n rpcGlobalId: 123,\n attributionMetadata: [\n {attributionAction: Host.AidaClient.RecitationAction.BLOCK, citations: []},\n {\n attributionAction: Host.AidaClient.RecitationAction.CITE,\n citations: [{startIndex: 0, endIndex: 1, url: 'https://example.com'}],\n },\n ],\n },\n completed: true,\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(results, [\n 'hello ',\n 'hello \\n`````\\nbrave \\n`````\\n',\n 'hello \\n`````\\nbrave new World()\\n`````\\n',\n 'hello \\n`````\\nbrave new World()\\n`````\\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.checkAccessPreconditions();\n assert.strictEqual(result, Host.AidaClient.AidaAccessPreconditions.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.checkAccessPreconditions();\n\n assert.strictEqual(result, Host.AidaClient.AidaAccessPreconditions.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.checkAccessPreconditions();\n\n assert.strictEqual(result, Host.AidaClient.AidaAccessPreconditions.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.checkAccessPreconditions();\n\n assert.strictEqual(result, Host.AidaClient.AidaAccessPreconditions.AVAILABLE);\n });\n });\n\n describe('registerClientEvent', () => {\n it('should populate the default value for Aida Client event', async () => {\n const stub = sinon.stub(Host.InspectorFrontendHost.InspectorFrontendHostInstance, 'registerAidaClientEvent');\n const RPC_ID = 0;\n\n const provider = new Host.AidaClient.AidaClient();\n void provider.registerClientEvent({\n corresponding_aida_rpc_global_id: RPC_ID,\n disable_user_content_logging: false,\n do_conversation_client_event: {user_feedback: {sentiment: Host.AidaClient.Rating.POSITIVE}},\n });\n const arg = JSON.parse(stub.getCalls()[0].args[0]);\n\n sinon.assert.match(arg, sinon.match({\n client: Host.AidaClient.CLIENT_NAME,\n event_time: sinon.match.string,\n corresponding_aida_rpc_global_id: RPC_ID,\n do_conversation_client_event: {\n user_feedback: {\n sentiment: 'POSITIVE',\n },\n },\n }));\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 3b83cc34e..36754e574 100644 --- a/public/core/host/InspectorFrontendHost.js +++ b/public/core/host/InspectorFrontendHost.js @@ -331,6 +331,9 @@ export class InspectorFrontendHostStub { enabled: true, testing: false, }, + devToolsPrivacyUI: { + enabled: false, + }, isOffTheRecord: false, }; if ('hostConfigForTesting' in globalThis) { diff --git a/public/core/host/InspectorFrontendHost.js.map b/public/core/host/InspectorFrontendHost.js.map index be0b24061..cfdb1b669 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,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAExC,OAAO,EASL,gBAAgB,EAChB,MAAM,GAWP,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAC,WAAW,IAAI,yBAAyB,EAAC,MAAM,qBAAqB,CAAC;AAU7E,MAAM,SAAS,GAAG;IAChB;;;OAGG;IACH,SAAS,EAAE,kBAAkB;CAC9B,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,oCAAoC,EAAE,SAAS,CAAC,CAAC;AAC1F,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAEtE,MAAM,4BAA4B,GAA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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 AidaClientResult,\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 if ('getSyncInformationForTesting' in globalThis) {\n // @ts-ignore for testing\n return callback(globalThis.getSyncInformationForTesting());\n }\n callback({\n isSyncActive: false,\n arePreferencesSynced: false,\n });\n }\n\n getHostConfig(callback: (arg0: Root.Runtime.HostConfig) => void): void {\n const result: Root.Runtime.HostConfig = {\n aidaAvailability: {\n enabled: true,\n blockedByAge: false,\n blockedByEnterprisePolicy: false,\n blockedByGeo: false,\n disallowLogging: false,\n },\n devToolsConsoleInsights: {\n modelId: '',\n temperature: 0,\n enabled: false,\n },\n devToolsFreestylerDogfood: {\n modelId: '',\n temperature: 0,\n enabled: false,\n },\n devToolsVeLogging: {\n enabled: true,\n testing: false,\n },\n isOffTheRecord: false,\n };\n if ('hostConfigForTesting' in globalThis) {\n const {hostConfigForTesting} = (globalThis as unknown as {hostConfigForTesting: Root.Runtime.HostConfig});\n for (const key of Object.keys(hostConfigForTesting)) {\n const mergeEntry = (key: K): void => {\n if (typeof result[key] === 'object' && typeof hostConfigForTesting[key] === 'object') {\n // If the config is an object, merge the settings, but preferring\n // the hostConfigForTesting values over the result values.\n result[key] = {...result[key], ...hostConfigForTesting[key]};\n } else {\n // Override with the testing config if the value is present + not null/undefined.\n result[key] = hostConfigForTesting[key] ?? result[key];\n }\n };\n mergeEntry(key as keyof Root.Runtime.HostConfig);\n }\n }\n callback(result);\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 implemented',\n });\n }\n\n registerAidaClientEvent(request: string, callback: (result: AidaClientResult) => void): void {\n callback({\n error: 'Not implemented',\n });\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 } 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,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AAExC,OAAO,EASL,gBAAgB,EAChB,MAAM,GAWP,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAC,WAAW,IAAI,yBAAyB,EAAC,MAAM,qBAAqB,CAAC;AAU7E,MAAM,SAAS,GAAG;IAChB;;;OAGG;IACH,SAAS,EAAE,kBAAkB;CAC9B,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,oCAAoC,EAAE,SAAS,CAAC,CAAC;AAC1F,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAEtE,MAAM,4BAA4B,GAAG,GAAG,CAAC;AACzC,MAAM,0BAA0B,GAAG,YA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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 AidaClientResult,\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 if ('getSyncInformationForTesting' in globalThis) {\n // @ts-ignore for testing\n return callback(globalThis.getSyncInformationForTesting());\n }\n callback({\n isSyncActive: false,\n arePreferencesSynced: false,\n });\n }\n\n getHostConfig(callback: (arg0: Root.Runtime.HostConfig) => void): void {\n const result: Root.Runtime.HostConfig = {\n aidaAvailability: {\n enabled: true,\n blockedByAge: false,\n blockedByEnterprisePolicy: false,\n blockedByGeo: false,\n disallowLogging: false,\n },\n devToolsConsoleInsights: {\n modelId: '',\n temperature: 0,\n enabled: false,\n },\n devToolsFreestylerDogfood: {\n modelId: '',\n temperature: 0,\n enabled: false,\n },\n devToolsVeLogging: {\n enabled: true,\n testing: false,\n },\n devToolsPrivacyUI: {\n enabled: false,\n },\n isOffTheRecord: false,\n };\n if ('hostConfigForTesting' in globalThis) {\n const {hostConfigForTesting} = (globalThis as unknown as {hostConfigForTesting: Root.Runtime.HostConfig});\n for (const key of Object.keys(hostConfigForTesting)) {\n const mergeEntry = (key: K): void => {\n if (typeof result[key] === 'object' && typeof hostConfigForTesting[key] === 'object') {\n // If the config is an object, merge the settings, but preferring\n // the hostConfigForTesting values over the result values.\n result[key] = {...result[key], ...hostConfigForTesting[key]};\n } else {\n // Override with the testing config if the value is present + not null/undefined.\n result[key] = hostConfigForTesting[key] ?? result[key];\n }\n };\n mergeEntry(key as keyof Root.Runtime.HostConfig);\n }\n }\n callback(result);\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 implemented',\n });\n }\n\n registerAidaClientEvent(request: string, callback: (result: AidaClientResult) => void): void {\n callback({\n error: 'Not implemented',\n });\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 } 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 80e2ff261..0bacdc3a5 100644 --- a/public/core/host/InspectorFrontendHostAPI.d.ts +++ b/public/core/host/InspectorFrontendHostAPI.d.ts @@ -297,6 +297,8 @@ export interface SyncInformation { accountEmail?: string; /** The image of the account used for syncing. Its a base64 encoded PNG */ accountImage?: string; + /** The full name of the account used for syncing */ + accountFullName?: string; } /** * Enum for recordPerformanceHistogram diff --git a/public/core/host/InspectorFrontendHostAPI.js.map b/public/core/host/InspectorFrontendHostAPI.js.map index 8fe114fb5..5b7c47bf7 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,MA+BX;AA/BD,WAAY,MAAM;IAChB,oFAAoF;IACpF,yCAA+B,CAAA;IAC/B,6CAAmC,CAAA;IACnC,iDAAuC,CAAA;IACvC,mDAAyC,CAAA;IACzC,6DAAmD,CAAA;IAC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C,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 /* eslint-disable @typescript-eslint/naming-convention -- Accessed from web_tests */\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 ReloadInspectedPage = 'reloadInspectedPage',\n RevealSourceLine = 'revealSourceLine',\n SavedURL = 'savedURL',\n SearchCompleted = 'searchCompleted',\n SetInspectedTabId = 'setInspectedTabId',\n SetUseSoftMenu = 'setUseSoftMenu',\n ShowPanel = 'showPanel',\n /* eslint-enable @typescript-eslint/naming-convention */\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.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 AidaClientResult {\n response?: 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.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, cb: (result: AidaClientResult) => void) => 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 /* eslint-disable @typescript-eslint/naming-convention -- Shadows a legacy enum */\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 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 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 /* eslint-disable @typescript-eslint/naming-convention -- Shadows a legacy enum */\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,MA+BX;AA/BD,WAAY,MAAM;IAChB,oFAAoF;IACpF,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,qDAA2C,CAAA;IAC3C,+CAAqC,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E,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 /* eslint-disable @typescript-eslint/naming-convention -- Accessed from web_tests */\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 ReloadInspectedPage = 'reloadInspectedPage',\n RevealSourceLine = 'revealSourceLine',\n SavedURL = 'savedURL',\n SearchCompleted = 'searchCompleted',\n SetInspectedTabId = 'setInspectedTabId',\n SetUseSoftMenu = 'setUseSoftMenu',\n ShowPanel = 'showPanel',\n /* eslint-enable @typescript-eslint/naming-convention */\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.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 AidaClientResult {\n response?: 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.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, cb: (result: AidaClientResult) => void) => 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 /** The full name of the account used for syncing */\n accountFullName?: 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 /* eslint-disable @typescript-eslint/naming-convention -- Shadows a legacy enum */\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 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 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 /* eslint-disable @typescript-eslint/naming-convention -- Shadows a legacy enum */\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 c58451f8f..efa495a8e 100644 --- a/public/core/host/UserMetrics.d.ts +++ b/public/core/host/UserMetrics.d.ts @@ -220,7 +220,16 @@ export declare enum Action { InsightsOnboardingNextPage = 157, InsightsOnboardingPrevPage = 158, InsightsOnboardingFeatureDisabled = 159, - MAX_VALUE = 160 + InsightsOptInTeaserShown = 160, + InsightsOptInTeaserSettingsLinkClicked = 161, + InsightsOptInTeaserConfirmedInSettings = 162, + InsightsReminderTeaserShown = 163, + InsightsReminderTeaserConfirmed = 164, + InsightsReminderTeaserCanceled = 165, + InsightsReminderTeaserSettingsLinkClicked = 166, + InsightsReminderTeaserAbortedInSettings = 167, + GeneratingInsightWithoutDisclaimer = 168, + MAX_VALUE = 169 } export declare enum PanelCodes { elements = 1, @@ -633,13 +642,10 @@ export declare enum DevtoolsExperiments { 'instrumentation-breakpoints' = 61, 'authored-deployed-grouping' = 63, 'just-my-code' = 65, - 'preloading-status-panel' = 68, - 'outermost-target-selector' = 71, 'highlight-errors-elements-panel' = 73, 'use-source-map-scopes' = 76, 'network-panel-filter-bar-redesign' = 79, 'autofill-view' = 82, - 'sources-frame-indentation-markers-temporarily-disable' = 83, 'css-type-component-length-deprecate' = 85, 'timeline-show-postmessage-events' = 86, 'timeline-enhanced-traces' = 90, @@ -650,7 +656,8 @@ export declare enum DevtoolsExperiments { 'timeline-observations' = 96, 'gen-ai-settings-panel' = 97, 'timeline-server-timings' = 98, - MAX_VALUE = 99 + 'timeline-layout-shift-details' = 99, + MAX_VALUE = 100 } export declare const enum ColorPickerOpenedFrom { SOURCES_PANEL = 0, diff --git a/public/core/host/UserMetrics.js b/public/core/host/UserMetrics.js index 2aa11935a..85ade0c23 100644 --- a/public/core/host/UserMetrics.js +++ b/public/core/host/UserMetrics.js @@ -458,7 +458,16 @@ export var Action; Action[Action["InsightsOnboardingNextPage"] = 157] = "InsightsOnboardingNextPage"; Action[Action["InsightsOnboardingPrevPage"] = 158] = "InsightsOnboardingPrevPage"; Action[Action["InsightsOnboardingFeatureDisabled"] = 159] = "InsightsOnboardingFeatureDisabled"; - Action[Action["MAX_VALUE"] = 160] = "MAX_VALUE"; + Action[Action["InsightsOptInTeaserShown"] = 160] = "InsightsOptInTeaserShown"; + Action[Action["InsightsOptInTeaserSettingsLinkClicked"] = 161] = "InsightsOptInTeaserSettingsLinkClicked"; + Action[Action["InsightsOptInTeaserConfirmedInSettings"] = 162] = "InsightsOptInTeaserConfirmedInSettings"; + Action[Action["InsightsReminderTeaserShown"] = 163] = "InsightsReminderTeaserShown"; + Action[Action["InsightsReminderTeaserConfirmed"] = 164] = "InsightsReminderTeaserConfirmed"; + Action[Action["InsightsReminderTeaserCanceled"] = 165] = "InsightsReminderTeaserCanceled"; + Action[Action["InsightsReminderTeaserSettingsLinkClicked"] = 166] = "InsightsReminderTeaserSettingsLinkClicked"; + Action[Action["InsightsReminderTeaserAbortedInSettings"] = 167] = "InsightsReminderTeaserAbortedInSettings"; + Action[Action["GeneratingInsightWithoutDisclaimer"] = 168] = "GeneratingInsightWithoutDisclaimer"; + Action[Action["MAX_VALUE"] = 169] = "MAX_VALUE"; /* eslint-enable @typescript-eslint/naming-convention */ })(Action || (Action = {})); export var PanelCodes; @@ -883,13 +892,10 @@ export var DevtoolsExperiments; DevtoolsExperiments[DevtoolsExperiments["instrumentation-breakpoints"] = 61] = "instrumentation-breakpoints"; DevtoolsExperiments[DevtoolsExperiments["authored-deployed-grouping"] = 63] = "authored-deployed-grouping"; DevtoolsExperiments[DevtoolsExperiments["just-my-code"] = 65] = "just-my-code"; - DevtoolsExperiments[DevtoolsExperiments["preloading-status-panel"] = 68] = "preloading-status-panel"; - DevtoolsExperiments[DevtoolsExperiments["outermost-target-selector"] = 71] = "outermost-target-selector"; DevtoolsExperiments[DevtoolsExperiments["highlight-errors-elements-panel"] = 73] = "highlight-errors-elements-panel"; DevtoolsExperiments[DevtoolsExperiments["use-source-map-scopes"] = 76] = "use-source-map-scopes"; DevtoolsExperiments[DevtoolsExperiments["network-panel-filter-bar-redesign"] = 79] = "network-panel-filter-bar-redesign"; DevtoolsExperiments[DevtoolsExperiments["autofill-view"] = 82] = "autofill-view"; - DevtoolsExperiments[DevtoolsExperiments["sources-frame-indentation-markers-temporarily-disable"] = 83] = "sources-frame-indentation-markers-temporarily-disable"; DevtoolsExperiments[DevtoolsExperiments["css-type-component-length-deprecate"] = 85] = "css-type-component-length-deprecate"; DevtoolsExperiments[DevtoolsExperiments["timeline-show-postmessage-events"] = 86] = "timeline-show-postmessage-events"; DevtoolsExperiments[DevtoolsExperiments["timeline-enhanced-traces"] = 90] = "timeline-enhanced-traces"; @@ -900,9 +906,10 @@ export var DevtoolsExperiments; DevtoolsExperiments[DevtoolsExperiments["timeline-observations"] = 96] = "timeline-observations"; DevtoolsExperiments[DevtoolsExperiments["gen-ai-settings-panel"] = 97] = "gen-ai-settings-panel"; DevtoolsExperiments[DevtoolsExperiments["timeline-server-timings"] = 98] = "timeline-server-timings"; + DevtoolsExperiments[DevtoolsExperiments["timeline-layout-shift-details"] = 99] = "timeline-layout-shift-details"; /* eslint-enable @typescript-eslint/naming-convention */ // Increment this when new experiments are added. - DevtoolsExperiments[DevtoolsExperiments["MAX_VALUE"] = 99] = "MAX_VALUE"; + DevtoolsExperiments[DevtoolsExperiments["MAX_VALUE"] = 100] = "MAX_VALUE"; })(DevtoolsExperiments || (DevtoolsExperiments = {})); // Update DevToolsIssuesPanelIssueExpanded from tools/metrics/histograms/enums.xml if new enum is added. export var IssueExpanded; diff --git a/public/core/host/UserMetrics.js.map b/public/core/host/UserMetrics.js.map index 49454e04a..5ab8dd712 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,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,SAAS,CAAC,CAAC;QACpH,6BAA6B,CAAC,uBAAuB,CAAC,sBAAsB,GAAG,SAAS,CAAC,CAAC;QAC1F,8FAA8F;QAC9F,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAC;QACvC,CAAC;IACH,CAAC;IAED,oBAAoB,CAAC,SAAiB,EAAE,QAAyB;QAC/D,MAAM,qBAAqB,GAAG,GAAG,SAAS,IAAI,QAAQ,EAAE,CAAC;QACzD,MAAM,iBAAiB,GAAG,iBAAiB,CAAC,qBAAuD,CAAC,IAAI,CAAC,CAAC;QAC1G,6BAA6B,CAAC,yBAAyB,iFAEnD,iBAAiB,EACjB,iBAAiB,CAAC,SAAS,CAC9B,CAAC;IACJ,CAAC;IAED,kBAAkB,CAAC,cAAsB;QACvC,IAAI,CAAC,UAAU,CAAC,WAAW,GAAG,cAAc,CAAC,CAA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AAwD;IACxD,kDAAc,CAAA;AAChB,CAAC,EAtFW,QAAQ,KAAR,QAAQ,QAsFnB;AAqGD,MAAM,CAAN,IAAY,oBAUX;AAVD,WAAY,oBAAoB;IAC9B,4EAA4E;IAC5E,+EAAgB,CAAA;IAChB,uEAAc,CAAA;IACd,+EAAkB,CAAA;IAClB,yFAAuB,CAAA;IACvB,iEAAW,CAAA;IACX,qGAA6B,CAAA;IAC7B,wDAAwD;IACxD,yEAAa,CAAA;AACf,CAAC,EAVW,oBAAoB,KAApB,oBAAoB,QAU/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.MAX_VALUE);\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.MAX_VALUE,\n );\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.MAX_VALUE);\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.MAX_VALUE);\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.MAX_VALUE);\n }\n\n actionTaken(action: Action): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.ActionTaken, action, Action.MAX_VALUE);\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.MAX_VALUE);\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.MAX_VALUE);\n }\n\n issuesPanelOpenedFrom(issueOpener: IssueOpener): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.IssuesPanelOpenedFrom, issueOpener, IssueOpener.MAX_VALUE);\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.MAX_VALUE);\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.MAX_VALUE);\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.MAX_VALUE);\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.MAX_VALUE);\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.MAX_VALUE);\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.MAX_VALUE);\n }\n\n developerResourceLoaded(developerResourceLoaded: DeveloperResourceLoaded): void {\n if (developerResourceLoaded >= DeveloperResourceLoaded.MAX_VALUE) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.DeveloperResourceLoaded, developerResourceLoaded, DeveloperResourceLoaded.MAX_VALUE);\n }\n\n developerResourceScheme(developerResourceScheme: DeveloperResourceScheme): void {\n if (developerResourceScheme >= DeveloperResourceScheme.MAX_VALUE) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.DeveloperResourceScheme, developerResourceScheme, DeveloperResourceScheme.MAX_VALUE);\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.MAX_VALUE);\n }\n\n syncSetting(devtoolsSyncSettingEnabled: boolean): void {\n InspectorFrontendHostInstance.getSyncInformation(syncInfo => {\n let settingValue = SyncSetting.CHROME_SYNC_DISABLED;\n if (syncInfo.isSyncActive && !syncInfo.arePreferencesSynced) {\n settingValue = SyncSetting.CHROME_SYNC_SETTINGS_DISABLED;\n } else if (syncInfo.isSyncActive && syncInfo.arePreferencesSynced) {\n settingValue = devtoolsSyncSettingEnabled ? SyncSetting.DEVTOOLS_SYNC_SETTING_ENABLED :\n SyncSetting.DEVTOOLS_SYNC_SETTING_DISABLED;\n }\n\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SyncSetting, settingValue, SyncSetting.MAX_VALUE);\n });\n }\n\n recordingAssertion(value: RecordingAssertion): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingAssertion, value, RecordingAssertion.MAX_VALUE);\n }\n\n recordingToggled(value: RecordingToggled): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingToggled, value, RecordingToggled.MAX_VALUE);\n }\n\n recordingReplayFinished(value: RecordingReplayFinished): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingReplayFinished, value, RecordingReplayFinished.MAX_VALUE);\n }\n\n recordingReplaySpeed(value: RecordingReplaySpeed): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingReplaySpeed, value, RecordingReplaySpeed.MAX_VALUE);\n }\n\n recordingReplayStarted(value: RecordingReplayStarted): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingReplayStarted, value, RecordingReplayStarted.MAX_VALUE);\n }\n\n recordingEdited(value: RecordingEdited): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingEdited, value, RecordingEdited.MAX_VALUE);\n }\n\n recordingExported(value: RecordingExported): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingExported, value, RecordingExported.MAX_VALUE);\n }\n\n recordingCodeToggled(value: RecordingCodeToggled): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingCodeToggled, value, RecordingCodeToggled.MAX_VALUE);\n }\n\n recordingCopiedToClipboard(value: RecordingCopiedToClipboard): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingCopiedToClipboard, value, RecordingCopiedToClipboard.MAX_VALUE);\n }\n\n styleTextCopied(value: StyleTextCopied): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.StyleTextCopied, value, StyleTextCopied.MAX_VALUE);\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.MAX_VALUE);\n }\n\n cssHintShown(type: CSSHintType): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.CSSHintShown, type, CSSHintType.MAX_VALUE);\n }\n\n lighthouseModeRun(type: LighthouseModeRun): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LighthouseModeRun, type, LighthouseModeRun.MAX_VALUE);\n }\n\n lighthouseCategoryUsed(type: LighthouseCategoryUsed): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LighthouseCategoryUsed, type, LighthouseCategoryUsed.MAX_VALUE);\n }\n\n colorPickerOpenedFrom(type: ColorPickerOpenedFrom): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ColorPickerOpenedFrom, type, ColorPickerOpenedFrom.MAX_VALUE);\n }\n\n cssPropertyDocumentation(type: CSSPropertyDocumentation): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.CSSPropertyDocumentation, type, CSSPropertyDocumentation.MAX_VALUE);\n }\n\n swatchActivated(swatch: SwatchType): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SwatchActivated, swatch, SwatchType.MAX_VALUE);\n }\n\n animationPlaybackRateChanged(playbackRate: AnimationsPlaybackRate): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.AnimationPlaybackRateChanged, playbackRate, AnimationsPlaybackRate.MAX_VALUE);\n }\n\n animationPointDragged(dragType: AnimationPointDragType): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.AnimationPointDragged, dragType, AnimationPointDragType.MAX_VALUE);\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.MAX_VALUE - 1), 1);\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LegacyResourceTypeFilterNumberOfSelectedChanged, boundItemCount, ResourceType.MAX_VALUE);\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.MAX_VALUE);\n }\n\n resourceTypeFilterNumberOfSelectedChanged(itemCount: number): void {\n const boundItemCount = Math.max(Math.min(itemCount, ResourceType.MAX_VALUE - 1), 1);\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ResourceTypeFilterNumberOfSelectedChanged, boundItemCount, ResourceType.MAX_VALUE);\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.MAX_VALUE);\n }\n\n networkPanelMoreFiltersNumberOfSelectedChanged(itemCount: number): void {\n const boundItemCount = Math.max(Math.min(itemCount, NetworkPanelMoreFilters.MAX_VALUE), 0);\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.NetworkPanelMoreFiltersNumberOfSelectedChanged, boundItemCount,\n NetworkPanelMoreFilters.MAX_VALUE);\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.MAX_VALUE);\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 'MAX_VALUE'.\n * 2. Set the value of the new entry to the current value of 'MAX_VALUE'.\n * 2. Increment the value of 'MAX_VALUE' 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 'MAX_VALUE' 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 /* eslint-disable @typescript-eslint/naming-convention */\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 ConsoleFilterByContext = 147,\n ConsoleFilterBySource = 148,\n ConsoleFilterByUrl = 149,\n InsightConsentReminderShown = 150,\n InsightConsentReminderCanceled = 151,\n InsightConsentReminderConfirmed = 152,\n InsightsOnboardingShown = 153,\n InsightsOnboardingCanceledOnPage1 = 154,\n InsightsOnboardingCanceledOnPage2 = 155,\n InsightsOnboardingConfirmed = 156,\n InsightsOnboardingNextPage = 157,\n InsightsOnboardingPrevPage = 158,\n InsightsOnboardingFeatureDisabled = 159,\n MAX_VALUE = 160,\n /* eslint-enable @typescript-eslint/naming-convention */\n}\n\nexport enum PanelCodes {\n /* eslint-disable @typescript-eslint/naming-convention */\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 /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 68,\n}\n\nexport enum PanelWithLocation {\n /* eslint-disable @typescript-eslint/naming-convention */\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 /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 133,\n}\n\nexport enum ElementsSidebarTabCodes {\n /* eslint-disable @typescript-eslint/naming-convention */\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 /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 8,\n}\n\nexport enum MediaTypes {\n /* eslint-disable @typescript-eslint/naming-convention */\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 'text/javascript+snippet' = 36,\n 'text/javascript+eval' = 37, // Scripts resulting from console inputs or page \"eval\"s with no sourceUrl comment.\n /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 38,\n}\n\nexport enum KeybindSetSettings {\n /* eslint-disable @typescript-eslint/naming-convention */\n 'devToolsDefault' = 0,\n 'vsCode' = 1,\n /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 2,\n}\n\nexport enum KeyboardShortcutAction {\n /* eslint-disable @typescript-eslint/naming-convention */\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 /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 118,\n}\n\nexport const enum IssueOpener {\n CONSOLE_INFO_BAR = 0,\n LEARN_MORE_LINK_COEP = 1,\n STATUS_BAR_ISSUES_COUNTER = 2,\n HAMBURGER_MENU = 3,\n ADORNER = 4,\n COMMAND_MENU = 5,\n MAX_VALUE = 6,\n}\n\n/**\n * This list should contain the currently active Devtools Experiments,\n * gaps are expected.\n */\nexport enum DevtoolsExperiments {\n /* eslint-disable @typescript-eslint/naming-convention */\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 '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 'css-type-component-length-deprecate' = 85,\n 'timeline-show-postmessage-events' = 86,\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 'gen-ai-settings-panel' = 97,\n 'timeline-server-timings' = 98,\n /* eslint-enable @typescript-eslint/naming-convention */\n\n // Increment this when new experiments are added.\n MAX_VALUE = 99,\n}\n\nexport const enum ColorPickerOpenedFrom {\n SOURCES_PANEL = 0,\n STYLES_TAB = 1,\n MAX_VALUE = 2,\n}\n\nexport const enum CSSPropertyDocumentation {\n SHOWN = 0,\n TOGGLED_ON = 1,\n TOGGLED_OFF = 2,\n MAX_VALUE = 3,\n}\n\n// Update DevToolsIssuesPanelIssueExpanded from tools/metrics/histograms/enums.xml if new enum is added.\nexport enum IssueExpanded {\n /* eslint-disable @typescript-eslint/naming-convention */\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 /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 9,\n}\n\nexport enum IssueResourceOpened {\n /* eslint-disable @typescript-eslint/naming-convention */\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 /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 13,\n}\n\n/**\n * This list should contain the currently active issue types,\n * gaps are expected.\n */\nexport enum IssueCreated {\n /* eslint-disable @typescript-eslint/naming-convention */\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 /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 86,\n}\n\nexport const enum DeveloperResourceLoaded {\n LOAD_THROUGH_PAGE_VIA_TARGET = 0,\n LOAD_THROUGH_PAGE_VIA_FRAME = 1,\n LOAD_THROUGH_PAGE_FAILURE = 2,\n LOAD_THROUGH_PAGE_FALLBACK = 3,\n FALLBACK_AFTER_FAILURE = 4,\n FALLBACK_PER_OVERRIDE = 5,\n FALLBACK_PER_PROTOCOL = 6,\n FALLBACK_FAILURE = 7,\n MAX_VALUE = 8,\n}\n\nexport const enum DeveloperResourceScheme {\n OTHER = 0,\n UKNOWN = 1,\n HTTP = 2,\n HTTPS = 3,\n HTTP_LOCALHOST = 4,\n HTTPS_LOCALHOST = 5,\n DATA = 6,\n FILE = 7,\n BLOB = 8,\n MAX_VALUE = 9,\n}\n\nexport enum ResourceType {\n /* eslint-disable @typescript-eslint/naming-convention -- Used by web_tests. */\n all = 0,\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 /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 12,\n}\n\nexport enum NetworkPanelMoreFilters {\n /* eslint-disable @typescript-eslint/naming-convention */\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 /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 5,\n}\n\nexport enum Language {\n /* eslint-disable @typescript-eslint/naming-convention */\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 /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 83,\n}\n\nexport const enum SyncSetting {\n CHROME_SYNC_DISABLED = 1,\n CHROME_SYNC_SETTINGS_DISABLED = 2,\n DEVTOOLS_SYNC_SETTING_DISABLED = 3,\n DEVTOOLS_SYNC_SETTING_ENABLED = 4,\n MAX_VALUE = 5,\n}\n\nexport const enum RecordingToggled {\n RECORDING_STARTED = 1,\n RECORDING_FINISHED = 2,\n MAX_VALUE = 3,\n}\n\nexport const enum RecordingAssertion {\n ASSERTION_ADDED = 1,\n PROPERTY_ASSERTION_EDITED = 2,\n ATTRIBUTE_ASSERTION_EDITED = 3,\n MAX_VALUE = 4,\n}\n\nexport const enum RecordingReplayFinished {\n SUCCESS = 1,\n TIMEOUT_ERROR_SELECTORS = 2,\n TIMEOUT_ERROR_TARGET = 3,\n OTHER_ERROR = 4,\n MAX_VALUE = 5,\n}\n\nexport const enum RecordingReplaySpeed {\n NORMAL = 1,\n SLOW = 2,\n VERY_SLOW = 3,\n EXTREMELY_SLOW = 4,\n MAX_VALUE = 5,\n}\n\nexport const enum RecordingReplayStarted {\n REPLAY_ONLY = 1,\n REPLAY_WITH_PERFORMANCE_TRACING = 2,\n REPLAY_VIA_EXTENSION = 3,\n MAX_VALUE = 4,\n}\n\nexport const enum RecordingEdited {\n SELECTOR_PICKER_USED = 1,\n STEP_ADDED = 2,\n STEP_REMOVED = 3,\n SELECTOR_ADDED = 4,\n SELECTOR_REMOVED = 5,\n SELECTOR_PART_ADDED = 6,\n SELECTOR_PART_EDITED = 7,\n SELECTOR_PART_REMOVED = 8,\n TYPE_CHANGED = 9,\n OTHER_EDITING = 10,\n MAX_VALUE = 11,\n}\n\nexport const enum RecordingExported {\n TO_PUPPETEER = 1,\n TO_JSON = 2,\n TO_PUPPETEER_REPLAY = 3,\n TO_EXTENSION = 4,\n TO_LIGHTHOUSE = 5,\n MAX_VALUE = 6,\n}\n\nexport const enum RecordingCodeToggled {\n CODE_SHOWN = 1,\n CODE_HIDDEN = 2,\n MAX_VALUE = 3,\n}\n\nexport const enum RecordingCopiedToClipboard {\n COPIED_RECORDING_WITH_PUPPETEER = 1,\n COPIED_RECORDING_WITH_JSON = 2,\n COPIED_RECORDING_WITH_REPLAY = 3,\n COPIED_RECORDING_WITH_EXTENSION = 4,\n COPIED_STEP_WITH_PUPPETEER = 5,\n COPIED_STEP_WITH_JSON = 6,\n COPIED_STEP_WITH_REPLAY = 7,\n COPIED_STEP_WITH_EXTENSION = 8,\n MAX_VALUE = 9,\n}\n\nexport const enum StyleTextCopied {\n DECLARATION_VIA_CHANGED_LINE = 1,\n ALL_CHANGES_VIA_STYLES_TAB = 2,\n DECLARATION_VIA_CONTEXT_MENU = 3,\n PROPERTY_VIA_CONTEXT_MENU = 4,\n VALUE_VIA_CONTEXT_MENU = 5,\n DECLARATION_AS_JS_VIA_CONTEXT_MENU = 6,\n RULE_VIA_CONTEXT_MENU = 7,\n ALL_DECLARATIONS_VIA_CONTEXT_MENU = 8,\n ALL_DECLARATINS_AS_JS_VIA_CONTEXT_MENU = 9,\n SELECTOR_VIA_CONTEXT_MENU = 10,\n MAX_VALUE = 11,\n}\n\nexport enum ManifestSectionCodes {\n /* eslint-disable @typescript-eslint/naming-convention -- Indexed access. */\n OtherSection = 0,\n 'Identity' = 1,\n 'Presentation' = 2,\n 'Protocol Handlers' = 3,\n 'Icons' = 4,\n 'Window Controls Overlay' = 5,\n /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 6,\n}\n\n// The names here match the CSSRuleValidator names in CSSRuleValidator.ts.\nexport const enum CSSHintType {\n OTHER = 0,\n ALIGN_CONTENT = 1,\n FLEX_ITEM = 2,\n FLEX_CONTAINER = 3,\n GRID_CONTAINER = 4,\n GRID_ITEM = 5,\n FLEX_GRID = 6,\n MULTICOL_FLEX_GRID = 7,\n PADDING = 8,\n POSITION = 9,\n Z_INDEX = 10,\n SIZING = 11,\n FLEX_OR_GRID_ITEM = 12,\n FONT_VARIATION_SETTINGS = 13,\n MAX_VALUE = 14,\n}\n\nexport const enum LighthouseModeRun {\n NAVIGATION = 0,\n TIMESPAN = 1,\n SNAPSHOT = 2,\n LEGACY_NAVIGATION = 3,\n MAX_VALUE = 4,\n}\n\nexport const enum LighthouseCategoryUsed {\n PERFORMANCE = 0,\n ACCESSIBILITY = 1,\n BEST_PRACTICES = 2,\n SEO = 3,\n PWA = 4,\n PUB_ADS = 5,\n MAX_VALUE = 6,\n}\n\nexport const enum SwatchType {\n VAR_LINK = 0,\n ANIMATION_NAME_LINK = 1,\n COLOR = 2,\n ANIMATION_TIMING = 3,\n SHADOW = 4,\n GRID = 5,\n FLEX = 6,\n ANGLE = 7,\n LENGTH = 8,\n POSITION_TRY_LINK = 10,\n MAX_VALUE = 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 MAX_VALUE = 9,\n}\n\nexport const enum AnimationsPlaybackRate {\n PERCENT_100 = 0,\n PERCENT_25 = 1,\n PERCENT_10 = 2,\n OTHER = 3,\n MAX_VALUE = 4,\n}\n\nexport const enum AnimationPointDragType {\n // Animation is dragged as a whole in the Animations panel.\n ANIMATION_DRAG = 0,\n // A keyframe point inside animation timeline is dragged.\n KEYFRAME_MOVE = 1,\n // Start point of the animation inside animation timeline is dragged.\n START_ENDPOINT_MOVE = 2,\n // Finish point of the animation inside animation timeline is dragged.\n FINISH_ENDPOINT_MOVE = 3,\n OTHER = 4,\n MAX_VALUE = 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;;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AA;AAChB,CAAC,EAtFW,QAAQ,KAAR,QAAQ,QAsFnB;AAqGD,MAAM,CAAN,IAAY,oBAUX;AAVD,WAAY,oBAAoB;IAC9B,4EAA4E;IAC5E,+EAAgB,CAAA;IAChB,uEAAc,CAAA;IACd,+EAAkB,CAAA;IAClB,yFAAuB,CAAA;IACvB,iEAAW,CAAA;IACX,qGAA6B,CAAA;IAC7B,wDAAwD;IACxD,yEAAa,CAAA;AACf,CAAC,EAVW,oBAAoB,KAApB,oBAAoB,QAU/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.MAX_VALUE);\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.MAX_VALUE,\n );\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.MAX_VALUE);\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.MAX_VALUE);\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.MAX_VALUE);\n }\n\n actionTaken(action: Action): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.ActionTaken, action, Action.MAX_VALUE);\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.MAX_VALUE);\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.MAX_VALUE);\n }\n\n issuesPanelOpenedFrom(issueOpener: IssueOpener): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.IssuesPanelOpenedFrom, issueOpener, IssueOpener.MAX_VALUE);\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.MAX_VALUE);\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.MAX_VALUE);\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.MAX_VALUE);\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.MAX_VALUE);\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.MAX_VALUE);\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.MAX_VALUE);\n }\n\n developerResourceLoaded(developerResourceLoaded: DeveloperResourceLoaded): void {\n if (developerResourceLoaded >= DeveloperResourceLoaded.MAX_VALUE) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.DeveloperResourceLoaded, developerResourceLoaded, DeveloperResourceLoaded.MAX_VALUE);\n }\n\n developerResourceScheme(developerResourceScheme: DeveloperResourceScheme): void {\n if (developerResourceScheme >= DeveloperResourceScheme.MAX_VALUE) {\n return;\n }\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.DeveloperResourceScheme, developerResourceScheme, DeveloperResourceScheme.MAX_VALUE);\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.MAX_VALUE);\n }\n\n syncSetting(devtoolsSyncSettingEnabled: boolean): void {\n InspectorFrontendHostInstance.getSyncInformation(syncInfo => {\n let settingValue = SyncSetting.CHROME_SYNC_DISABLED;\n if (syncInfo.isSyncActive && !syncInfo.arePreferencesSynced) {\n settingValue = SyncSetting.CHROME_SYNC_SETTINGS_DISABLED;\n } else if (syncInfo.isSyncActive && syncInfo.arePreferencesSynced) {\n settingValue = devtoolsSyncSettingEnabled ? SyncSetting.DEVTOOLS_SYNC_SETTING_ENABLED :\n SyncSetting.DEVTOOLS_SYNC_SETTING_DISABLED;\n }\n\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SyncSetting, settingValue, SyncSetting.MAX_VALUE);\n });\n }\n\n recordingAssertion(value: RecordingAssertion): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingAssertion, value, RecordingAssertion.MAX_VALUE);\n }\n\n recordingToggled(value: RecordingToggled): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingToggled, value, RecordingToggled.MAX_VALUE);\n }\n\n recordingReplayFinished(value: RecordingReplayFinished): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingReplayFinished, value, RecordingReplayFinished.MAX_VALUE);\n }\n\n recordingReplaySpeed(value: RecordingReplaySpeed): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingReplaySpeed, value, RecordingReplaySpeed.MAX_VALUE);\n }\n\n recordingReplayStarted(value: RecordingReplayStarted): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingReplayStarted, value, RecordingReplayStarted.MAX_VALUE);\n }\n\n recordingEdited(value: RecordingEdited): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingEdited, value, RecordingEdited.MAX_VALUE);\n }\n\n recordingExported(value: RecordingExported): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingExported, value, RecordingExported.MAX_VALUE);\n }\n\n recordingCodeToggled(value: RecordingCodeToggled): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingCodeToggled, value, RecordingCodeToggled.MAX_VALUE);\n }\n\n recordingCopiedToClipboard(value: RecordingCopiedToClipboard): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.RecordingCopiedToClipboard, value, RecordingCopiedToClipboard.MAX_VALUE);\n }\n\n styleTextCopied(value: StyleTextCopied): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.StyleTextCopied, value, StyleTextCopied.MAX_VALUE);\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.MAX_VALUE);\n }\n\n cssHintShown(type: CSSHintType): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.CSSHintShown, type, CSSHintType.MAX_VALUE);\n }\n\n lighthouseModeRun(type: LighthouseModeRun): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LighthouseModeRun, type, LighthouseModeRun.MAX_VALUE);\n }\n\n lighthouseCategoryUsed(type: LighthouseCategoryUsed): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LighthouseCategoryUsed, type, LighthouseCategoryUsed.MAX_VALUE);\n }\n\n colorPickerOpenedFrom(type: ColorPickerOpenedFrom): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ColorPickerOpenedFrom, type, ColorPickerOpenedFrom.MAX_VALUE);\n }\n\n cssPropertyDocumentation(type: CSSPropertyDocumentation): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.CSSPropertyDocumentation, type, CSSPropertyDocumentation.MAX_VALUE);\n }\n\n swatchActivated(swatch: SwatchType): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.SwatchActivated, swatch, SwatchType.MAX_VALUE);\n }\n\n animationPlaybackRateChanged(playbackRate: AnimationsPlaybackRate): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.AnimationPlaybackRateChanged, playbackRate, AnimationsPlaybackRate.MAX_VALUE);\n }\n\n animationPointDragged(dragType: AnimationPointDragType): void {\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.AnimationPointDragged, dragType, AnimationPointDragType.MAX_VALUE);\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.MAX_VALUE - 1), 1);\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.LegacyResourceTypeFilterNumberOfSelectedChanged, boundItemCount, ResourceType.MAX_VALUE);\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.MAX_VALUE);\n }\n\n resourceTypeFilterNumberOfSelectedChanged(itemCount: number): void {\n const boundItemCount = Math.max(Math.min(itemCount, ResourceType.MAX_VALUE - 1), 1);\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.ResourceTypeFilterNumberOfSelectedChanged, boundItemCount, ResourceType.MAX_VALUE);\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.MAX_VALUE);\n }\n\n networkPanelMoreFiltersNumberOfSelectedChanged(itemCount: number): void {\n const boundItemCount = Math.max(Math.min(itemCount, NetworkPanelMoreFilters.MAX_VALUE), 0);\n InspectorFrontendHostInstance.recordEnumeratedHistogram(\n EnumeratedHistogram.NetworkPanelMoreFiltersNumberOfSelectedChanged, boundItemCount,\n NetworkPanelMoreFilters.MAX_VALUE);\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.MAX_VALUE);\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 'MAX_VALUE'.\n * 2. Set the value of the new entry to the current value of 'MAX_VALUE'.\n * 2. Increment the value of 'MAX_VALUE' 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 'MAX_VALUE' 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 /* eslint-disable @typescript-eslint/naming-convention */\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 ConsoleFilterByContext = 147,\n ConsoleFilterBySource = 148,\n ConsoleFilterByUrl = 149,\n InsightConsentReminderShown = 150,\n InsightConsentReminderCanceled = 151,\n InsightConsentReminderConfirmed = 152,\n InsightsOnboardingShown = 153,\n InsightsOnboardingCanceledOnPage1 = 154,\n InsightsOnboardingCanceledOnPage2 = 155,\n InsightsOnboardingConfirmed = 156,\n InsightsOnboardingNextPage = 157,\n InsightsOnboardingPrevPage = 158,\n InsightsOnboardingFeatureDisabled = 159,\n InsightsOptInTeaserShown = 160,\n InsightsOptInTeaserSettingsLinkClicked = 161,\n InsightsOptInTeaserConfirmedInSettings = 162,\n InsightsReminderTeaserShown = 163,\n InsightsReminderTeaserConfirmed = 164,\n InsightsReminderTeaserCanceled = 165,\n InsightsReminderTeaserSettingsLinkClicked = 166,\n InsightsReminderTeaserAbortedInSettings = 167,\n GeneratingInsightWithoutDisclaimer = 168,\n MAX_VALUE = 169,\n /* eslint-enable @typescript-eslint/naming-convention */\n}\n\nexport enum PanelCodes {\n /* eslint-disable @typescript-eslint/naming-convention */\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 /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 68,\n}\n\nexport enum PanelWithLocation {\n /* eslint-disable @typescript-eslint/naming-convention */\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 /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 133,\n}\n\nexport enum ElementsSidebarTabCodes {\n /* eslint-disable @typescript-eslint/naming-convention */\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 /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 8,\n}\n\nexport enum MediaTypes {\n /* eslint-disable @typescript-eslint/naming-convention */\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 'text/javascript+snippet' = 36,\n 'text/javascript+eval' = 37, // Scripts resulting from console inputs or page \"eval\"s with no sourceUrl comment.\n /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 38,\n}\n\nexport enum KeybindSetSettings {\n /* eslint-disable @typescript-eslint/naming-convention */\n 'devToolsDefault' = 0,\n 'vsCode' = 1,\n /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 2,\n}\n\nexport enum KeyboardShortcutAction {\n /* eslint-disable @typescript-eslint/naming-convention */\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 /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 118,\n}\n\nexport const enum IssueOpener {\n CONSOLE_INFO_BAR = 0,\n LEARN_MORE_LINK_COEP = 1,\n STATUS_BAR_ISSUES_COUNTER = 2,\n HAMBURGER_MENU = 3,\n ADORNER = 4,\n COMMAND_MENU = 5,\n MAX_VALUE = 6,\n}\n\n/**\n * This list should contain the currently active Devtools Experiments,\n * gaps are expected.\n */\nexport enum DevtoolsExperiments {\n /* eslint-disable @typescript-eslint/naming-convention */\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 'just-my-code' = 65,\n 'highlight-errors-elements-panel' = 73,\n 'use-source-map-scopes' = 76,\n 'network-panel-filter-bar-redesign' = 79,\n 'autofill-view' = 82,\n 'css-type-component-length-deprecate' = 85,\n 'timeline-show-postmessage-events' = 86,\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 'gen-ai-settings-panel' = 97,\n 'timeline-server-timings' = 98,\n 'timeline-layout-shift-details' = 99,\n /* eslint-enable @typescript-eslint/naming-convention */\n\n // Increment this when new experiments are added.\n MAX_VALUE = 100,\n}\n\nexport const enum ColorPickerOpenedFrom {\n SOURCES_PANEL = 0,\n STYLES_TAB = 1,\n MAX_VALUE = 2,\n}\n\nexport const enum CSSPropertyDocumentation {\n SHOWN = 0,\n TOGGLED_ON = 1,\n TOGGLED_OFF = 2,\n MAX_VALUE = 3,\n}\n\n// Update DevToolsIssuesPanelIssueExpanded from tools/metrics/histograms/enums.xml if new enum is added.\nexport enum IssueExpanded {\n /* eslint-disable @typescript-eslint/naming-convention */\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 /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 9,\n}\n\nexport enum IssueResourceOpened {\n /* eslint-disable @typescript-eslint/naming-convention */\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 /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 13,\n}\n\n/**\n * This list should contain the currently active issue types,\n * gaps are expected.\n */\nexport enum IssueCreated {\n /* eslint-disable @typescript-eslint/naming-convention */\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 /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 86,\n}\n\nexport const enum DeveloperResourceLoaded {\n LOAD_THROUGH_PAGE_VIA_TARGET = 0,\n LOAD_THROUGH_PAGE_VIA_FRAME = 1,\n LOAD_THROUGH_PAGE_FAILURE = 2,\n LOAD_THROUGH_PAGE_FALLBACK = 3,\n FALLBACK_AFTER_FAILURE = 4,\n FALLBACK_PER_OVERRIDE = 5,\n FALLBACK_PER_PROTOCOL = 6,\n FALLBACK_FAILURE = 7,\n MAX_VALUE = 8,\n}\n\nexport const enum DeveloperResourceScheme {\n OTHER = 0,\n UKNOWN = 1,\n HTTP = 2,\n HTTPS = 3,\n HTTP_LOCALHOST = 4,\n HTTPS_LOCALHOST = 5,\n DATA = 6,\n FILE = 7,\n BLOB = 8,\n MAX_VALUE = 9,\n}\n\nexport enum ResourceType {\n /* eslint-disable @typescript-eslint/naming-convention -- Used by web_tests. */\n all = 0,\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 /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 12,\n}\n\nexport enum NetworkPanelMoreFilters {\n /* eslint-disable @typescript-eslint/naming-convention */\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 /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 5,\n}\n\nexport enum Language {\n /* eslint-disable @typescript-eslint/naming-convention */\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 /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 83,\n}\n\nexport const enum SyncSetting {\n CHROME_SYNC_DISABLED = 1,\n CHROME_SYNC_SETTINGS_DISABLED = 2,\n DEVTOOLS_SYNC_SETTING_DISABLED = 3,\n DEVTOOLS_SYNC_SETTING_ENABLED = 4,\n MAX_VALUE = 5,\n}\n\nexport const enum RecordingToggled {\n RECORDING_STARTED = 1,\n RECORDING_FINISHED = 2,\n MAX_VALUE = 3,\n}\n\nexport const enum RecordingAssertion {\n ASSERTION_ADDED = 1,\n PROPERTY_ASSERTION_EDITED = 2,\n ATTRIBUTE_ASSERTION_EDITED = 3,\n MAX_VALUE = 4,\n}\n\nexport const enum RecordingReplayFinished {\n SUCCESS = 1,\n TIMEOUT_ERROR_SELECTORS = 2,\n TIMEOUT_ERROR_TARGET = 3,\n OTHER_ERROR = 4,\n MAX_VALUE = 5,\n}\n\nexport const enum RecordingReplaySpeed {\n NORMAL = 1,\n SLOW = 2,\n VERY_SLOW = 3,\n EXTREMELY_SLOW = 4,\n MAX_VALUE = 5,\n}\n\nexport const enum RecordingReplayStarted {\n REPLAY_ONLY = 1,\n REPLAY_WITH_PERFORMANCE_TRACING = 2,\n REPLAY_VIA_EXTENSION = 3,\n MAX_VALUE = 4,\n}\n\nexport const enum RecordingEdited {\n SELECTOR_PICKER_USED = 1,\n STEP_ADDED = 2,\n STEP_REMOVED = 3,\n SELECTOR_ADDED = 4,\n SELECTOR_REMOVED = 5,\n SELECTOR_PART_ADDED = 6,\n SELECTOR_PART_EDITED = 7,\n SELECTOR_PART_REMOVED = 8,\n TYPE_CHANGED = 9,\n OTHER_EDITING = 10,\n MAX_VALUE = 11,\n}\n\nexport const enum RecordingExported {\n TO_PUPPETEER = 1,\n TO_JSON = 2,\n TO_PUPPETEER_REPLAY = 3,\n TO_EXTENSION = 4,\n TO_LIGHTHOUSE = 5,\n MAX_VALUE = 6,\n}\n\nexport const enum RecordingCodeToggled {\n CODE_SHOWN = 1,\n CODE_HIDDEN = 2,\n MAX_VALUE = 3,\n}\n\nexport const enum RecordingCopiedToClipboard {\n COPIED_RECORDING_WITH_PUPPETEER = 1,\n COPIED_RECORDING_WITH_JSON = 2,\n COPIED_RECORDING_WITH_REPLAY = 3,\n COPIED_RECORDING_WITH_EXTENSION = 4,\n COPIED_STEP_WITH_PUPPETEER = 5,\n COPIED_STEP_WITH_JSON = 6,\n COPIED_STEP_WITH_REPLAY = 7,\n COPIED_STEP_WITH_EXTENSION = 8,\n MAX_VALUE = 9,\n}\n\nexport const enum StyleTextCopied {\n DECLARATION_VIA_CHANGED_LINE = 1,\n ALL_CHANGES_VIA_STYLES_TAB = 2,\n DECLARATION_VIA_CONTEXT_MENU = 3,\n PROPERTY_VIA_CONTEXT_MENU = 4,\n VALUE_VIA_CONTEXT_MENU = 5,\n DECLARATION_AS_JS_VIA_CONTEXT_MENU = 6,\n RULE_VIA_CONTEXT_MENU = 7,\n ALL_DECLARATIONS_VIA_CONTEXT_MENU = 8,\n ALL_DECLARATINS_AS_JS_VIA_CONTEXT_MENU = 9,\n SELECTOR_VIA_CONTEXT_MENU = 10,\n MAX_VALUE = 11,\n}\n\nexport enum ManifestSectionCodes {\n /* eslint-disable @typescript-eslint/naming-convention -- Indexed access. */\n OtherSection = 0,\n 'Identity' = 1,\n 'Presentation' = 2,\n 'Protocol Handlers' = 3,\n 'Icons' = 4,\n 'Window Controls Overlay' = 5,\n /* eslint-enable @typescript-eslint/naming-convention */\n MAX_VALUE = 6,\n}\n\n// The names here match the CSSRuleValidator names in CSSRuleValidator.ts.\nexport const enum CSSHintType {\n OTHER = 0,\n ALIGN_CONTENT = 1,\n FLEX_ITEM = 2,\n FLEX_CONTAINER = 3,\n GRID_CONTAINER = 4,\n GRID_ITEM = 5,\n FLEX_GRID = 6,\n MULTICOL_FLEX_GRID = 7,\n PADDING = 8,\n POSITION = 9,\n Z_INDEX = 10,\n SIZING = 11,\n FLEX_OR_GRID_ITEM = 12,\n FONT_VARIATION_SETTINGS = 13,\n MAX_VALUE = 14,\n}\n\nexport const enum LighthouseModeRun {\n NAVIGATION = 0,\n TIMESPAN = 1,\n SNAPSHOT = 2,\n LEGACY_NAVIGATION = 3,\n MAX_VALUE = 4,\n}\n\nexport const enum LighthouseCategoryUsed {\n PERFORMANCE = 0,\n ACCESSIBILITY = 1,\n BEST_PRACTICES = 2,\n SEO = 3,\n PWA = 4,\n PUB_ADS = 5,\n MAX_VALUE = 6,\n}\n\nexport const enum SwatchType {\n VAR_LINK = 0,\n ANIMATION_NAME_LINK = 1,\n COLOR = 2,\n ANIMATION_TIMING = 3,\n SHADOW = 4,\n GRID = 5,\n FLEX = 6,\n ANGLE = 7,\n LENGTH = 8,\n POSITION_TRY_LINK = 10,\n MAX_VALUE = 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 MAX_VALUE = 9,\n}\n\nexport const enum AnimationsPlaybackRate {\n PERCENT_100 = 0,\n PERCENT_25 = 1,\n PERCENT_10 = 2,\n OTHER = 3,\n MAX_VALUE = 4,\n}\n\nexport const enum AnimationPointDragType {\n // Animation is dragged as a whole in the Animations panel.\n ANIMATION_DRAG = 0,\n // A keyframe point inside animation timeline is dragged.\n KEYFRAME_MOVE = 1,\n // Start point of the animation inside animation timeline is dragged.\n START_ENDPOINT_MOVE = 2,\n // Finish point of the animation inside animation timeline is dragged.\n FINISH_ENDPOINT_MOVE = 3,\n OTHER = 4,\n MAX_VALUE = 5,\n}\n"]} \ No newline at end of file diff --git a/public/core/i18n/i18n.test.js b/public/core/i18n/i18n.test.js index 878edf002..df342371d 100644 --- a/public/core/i18n/i18n.test.js +++ b/public/core/i18n/i18n.test.js @@ -113,7 +113,7 @@ describe('fetchAndRegisterLocaleData', () => { // this test. This means we only check the last part of the URL with which `fetch` // was called. const actualUrl = fetchStub.args[0][0]; - assert.isTrue(actualUrl.endsWith('gen/front_end/core/i18n/locales/en-US.json'), `Actually called with ${actualUrl}`); + assert.isTrue(actualUrl.endsWith('front_end/core/i18n/locales/en-US.json'), `Actually called with ${actualUrl}`); }); it('fetches non-bundled locale files from the remote service endpoint', async () => { await i18n.i18n.fetchAndRegisterLocaleData('de', fullLocation); diff --git a/public/core/i18n/i18n.test.js.map b/public/core/i18n/i18n.test.js.map index a1c975352..dd80c562a 100644 --- a/public/core/i18n/i18n.test.js.map +++ b/public/core/i18n/i18n.test.js.map @@ -1 +1 @@ -{"version":3,"file":"i18n.test.js","sourceRoot":"","sources":["../../../../../../front_end/core/i18n/i18n.test.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,OAAO,MAAM,gCAAgC,CAAC;AAE1D,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;QACjD,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;QAClD,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC;YACtC,MAAM,EAAE,KAAK;YACb,MAAM,EAAE,EAAE;SACX,CAAC,CAAC,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4CAA4C,EAAE,GAA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C,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18nRaw from '../../third_party/i18n/i18n.js';\n\nimport * as i18n from './i18n.js';\n\ndescribe('serializeUIString', () => {\n it('serializes strings without placeholders', () => {\n const output = i18n.i18n.serializeUIString('foo');\n assert.deepEqual(output, JSON.stringify({\n string: 'foo',\n values: {},\n }));\n });\n\n it('serializes strings with placeholder values', () => {\n const output = i18n.i18n.serializeUIString('a string', {PH1: 'value1', PH2: 'value2'});\n assert.deepEqual(output, JSON.stringify({\n string: 'a string',\n values: {PH1: 'value1', PH2: 'value2'},\n }));\n });\n});\n\ndescribe('deserializeUIString', () => {\n it('returns an empty object for an empty string input', () => {\n const output = i18n.i18n.deserializeUIString('');\n assert.deepEqual(output, {string: '', values: {}});\n });\n\n it('deserializes correctly for a string with no placeholders', () => {\n const output = i18n.i18n.deserializeUIString('{\"string\":\"foo\", \"values\":{}}');\n assert.deepEqual(output, {string: 'foo', values: {}});\n });\n\n it('deserializes correctly for a string with placeholders', () => {\n const output = i18n.i18n.deserializeUIString('{\"string\":\"foo\", \"values\":{\"PH1\": \"value1\"}}');\n assert.deepEqual(output, {string: 'foo', values: {PH1: 'value1'}});\n });\n});\n\ndescribe('serialize/deserialize round-trip', () => {\n it('returns a matching input/output', () => {\n const inputString = 'a string';\n const serializedString = i18n.i18n.serializeUIString(inputString);\n const deserializedString = i18n.i18n.deserializeUIString(serializedString);\n assert.deepEqual(deserializedString, {\n string: inputString,\n values: {},\n });\n });\n});\n\ndescribe('getLocalizedLanguageRegion', () => {\n function createMockDevToolsLocale(locale: string): i18n.DevToolsLocale.DevToolsLocale {\n return {locale, forceFallbackLocale: () => {}} as i18n.DevToolsLocale.DevToolsLocale;\n }\n\n it('build the correct language/region string', () => {\n assert.strictEqual(\n i18n.i18n.getLocalizedLanguageRegion('de-AT', createMockDevToolsLocale('en-US')),\n 'German (Austria) - Deutsch (Österreich)');\n assert.strictEqual(\n i18n.i18n.getLocalizedLanguageRegion('de', createMockDevToolsLocale('en-US')), 'German - Deutsch');\n assert.strictEqual(\n i18n.i18n.getLocalizedLanguageRegion('en-US', createMockDevToolsLocale('de')), 'Englisch (USA) - English (US)');\n });\n\n it('uses english for the target locale if the languages match', () => {\n assert.strictEqual(\n i18n.i18n.getLocalizedLanguageRegion('de-AT', createMockDevToolsLocale('de')),\n 'Deutsch (Österreich) - German (Austria)');\n assert.strictEqual(i18n.i18n.getLocalizedLanguageRegion('de', createMockDevToolsLocale('de')), 'Deutsch - German');\n });\n});\n\ndescribe('getFormatLocalizedString', () => {\n let i18nInstance: i18nRaw.I18n.I18n;\n beforeEach(() => {\n i18nInstance = new i18nRaw.I18n.I18n(['en-US'], 'en-US');\n i18nInstance.registerLocaleData('en-US', {}); // Always fall back to UIStrings.\n });\n\n it('returns an HTML element', () => {\n const uiStrings = {simple: 'a simple message'};\n const registeredStrings = i18nInstance.registerFileStrings('test.ts', uiStrings);\n\n const messageElement = i18n.i18n.getFormatLocalizedString(registeredStrings, uiStrings.simple, {});\n\n assert.instanceOf(messageElement, HTMLElement);\n assert.strictEqual(messageElement.innerText, 'a simple message');\n });\n\n it('nests HTML placeholders in the message element', () => {\n const uiStrings = {placeholder: 'a message with a {PH1} placeholder'};\n const registeredStrings = i18nInstance.registerFileStrings('test.ts', uiStrings);\n const placeholder = document.createElement('span');\n placeholder.innerText = 'very pretty';\n\n const messageElement =\n i18n.i18n.getFormatLocalizedString(registeredStrings, uiStrings.placeholder, {PH1: placeholder});\n\n assert.instanceOf(messageElement, HTMLElement);\n assert.strictEqual(messageElement.innerHTML, 'a message with a very pretty placeholder');\n });\n\n it('nests string placeholders in the message element', () => {\n const uiStrings = {placeholder: 'a message with a {PH1} placeholder'};\n const registeredStrings = i18nInstance.registerFileStrings('test.ts', uiStrings);\n\n const messageElement =\n i18n.i18n.getFormatLocalizedString(registeredStrings, uiStrings.placeholder, {PH1: 'somewhat nice'});\n\n assert.instanceOf(messageElement, HTMLElement);\n assert.strictEqual(messageElement.innerHTML, 'a message with a somewhat nice placeholder');\n });\n});\n\ndescribe('fetchAndRegisterLocaleData', () => {\n let fetchStub: sinon.SinonStub;\n\n beforeEach(() => {\n fetchStub = sinon.stub(window, 'fetch');\n fetchStub.returns(Promise.resolve(new window.Response(JSON.stringify({}), {\n // Always return an empty JSON object.\n status: 200,\n headers: {'Content-type': 'application/json'},\n })));\n });\n\n afterEach(() => {\n fetchStub.restore();\n i18n.i18n.resetLocaleDataForTest();\n });\n\n const bundled = 'devtools://devtools/bundled/devtools_app.html';\n const version = '@ffe848af6a5df4fa127e2929331116b7f9f1cb30';\n const remoteOrigin = 'https://chrome-devtools-frontend.appspot.com/';\n const remote = `${remoteOrigin}serve_file/${version}/`;\n const fullLocation = `${bundled}?remoteBase=${remote}&can_dock=true&dockSide=undocked`;\n\n it('fetches bundled locale files the same way as i18nImpl.ts itself is loaded', async () => {\n await i18n.i18n.fetchAndRegisterLocaleData('en-US', fullLocation);\n\n // We can't mock `import.meta.url` from i18nImpl so the Karam host leaks into\n // this test. This means we only check the last part of the URL with which `fetch`\n // was called.\n const actualUrl = fetchStub.args[0][0];\n assert.isTrue(\n actualUrl.endsWith('gen/front_end/core/i18n/locales/en-US.json'), `Actually called with ${actualUrl}`);\n });\n\n it('fetches non-bundled locale files from the remote service endpoint', async () => {\n await i18n.i18n.fetchAndRegisterLocaleData('de', fullLocation);\n\n assert.isTrue(\n fetchStub.calledWith(\n 'devtools://devtools/remote/serve_file/@ffe848af6a5df4fa127e2929331116b7f9f1cb30/core/i18n/locales/de.json'),\n `Actually called with ${fetchStub.args[0][0]}`);\n });\n});\n"]} \ No newline at end of file +{"version":3,"file":"i18n.test.js","sourceRoot":"","sources":["../../../../../../front_end/core/i18n/i18n.test.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,OAAO,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,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,wCAAwC,CAAC,EAAE,wBAAwB,SAAS,EAAE,CAAC,CAAC;IACnH,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mEAAmE,EAAE,KAAK,IAAI,EAAE;QACjF,MAAM,IAAI,CAAC,IAAI,CAAC,0BAA0B,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;QAE/D,MAAM,CAAC,MAAM,CACT,SAAS,CAAC,UAAU,CAChB,2GAA2G,CAAC,EAChH,wBAAwB,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as i18nRaw from '../../third_party/i18n/i18n.js';\n\nimport * as i18n from './i18n.js';\n\ndescribe('serializeUIString', () => {\n it('serializes strings without placeholders', () => {\n const output = i18n.i18n.serializeUIString('foo');\n assert.deepEqual(output, JSON.stringify({\n string: 'foo',\n values: {},\n }));\n });\n\n it('serializes strings with placeholder values', () => {\n const output = i18n.i18n.serializeUIString('a string', {PH1: 'value1', PH2: 'value2'});\n assert.deepEqual(output, JSON.stringify({\n string: 'a string',\n values: {PH1: 'value1', PH2: 'value2'},\n }));\n });\n});\n\ndescribe('deserializeUIString', () => {\n it('returns an empty object for an empty string input', () => {\n const output = i18n.i18n.deserializeUIString('');\n assert.deepEqual(output, {string: '', values: {}});\n });\n\n it('deserializes correctly for a string with no placeholders', () => {\n const output = i18n.i18n.deserializeUIString('{\"string\":\"foo\", \"values\":{}}');\n assert.deepEqual(output, {string: 'foo', values: {}});\n });\n\n it('deserializes correctly for a string with placeholders', () => {\n const output = i18n.i18n.deserializeUIString('{\"string\":\"foo\", \"values\":{\"PH1\": \"value1\"}}');\n assert.deepEqual(output, {string: 'foo', values: {PH1: 'value1'}});\n });\n});\n\ndescribe('serialize/deserialize round-trip', () => {\n it('returns a matching input/output', () => {\n const inputString = 'a string';\n const serializedString = i18n.i18n.serializeUIString(inputString);\n const deserializedString = i18n.i18n.deserializeUIString(serializedString);\n assert.deepEqual(deserializedString, {\n string: inputString,\n values: {},\n });\n });\n});\n\ndescribe('getLocalizedLanguageRegion', () => {\n function createMockDevToolsLocale(locale: string): i18n.DevToolsLocale.DevToolsLocale {\n return {locale, forceFallbackLocale: () => {}} as i18n.DevToolsLocale.DevToolsLocale;\n }\n\n it('build the correct language/region string', () => {\n assert.strictEqual(\n i18n.i18n.getLocalizedLanguageRegion('de-AT', createMockDevToolsLocale('en-US')),\n 'German (Austria) - Deutsch (Österreich)');\n assert.strictEqual(\n i18n.i18n.getLocalizedLanguageRegion('de', createMockDevToolsLocale('en-US')), 'German - Deutsch');\n assert.strictEqual(\n i18n.i18n.getLocalizedLanguageRegion('en-US', createMockDevToolsLocale('de')), 'Englisch (USA) - English (US)');\n });\n\n it('uses english for the target locale if the languages match', () => {\n assert.strictEqual(\n i18n.i18n.getLocalizedLanguageRegion('de-AT', createMockDevToolsLocale('de')),\n 'Deutsch (Österreich) - German (Austria)');\n assert.strictEqual(i18n.i18n.getLocalizedLanguageRegion('de', createMockDevToolsLocale('de')), 'Deutsch - German');\n });\n});\n\ndescribe('getFormatLocalizedString', () => {\n let i18nInstance: i18nRaw.I18n.I18n;\n beforeEach(() => {\n i18nInstance = new i18nRaw.I18n.I18n(['en-US'], 'en-US');\n i18nInstance.registerLocaleData('en-US', {}); // Always fall back to UIStrings.\n });\n\n it('returns an HTML element', () => {\n const uiStrings = {simple: 'a simple message'};\n const registeredStrings = i18nInstance.registerFileStrings('test.ts', uiStrings);\n\n const messageElement = i18n.i18n.getFormatLocalizedString(registeredStrings, uiStrings.simple, {});\n\n assert.instanceOf(messageElement, HTMLElement);\n assert.strictEqual(messageElement.innerText, 'a simple message');\n });\n\n it('nests HTML placeholders in the message element', () => {\n const uiStrings = {placeholder: 'a message with a {PH1} placeholder'};\n const registeredStrings = i18nInstance.registerFileStrings('test.ts', uiStrings);\n const placeholder = document.createElement('span');\n placeholder.innerText = 'very pretty';\n\n const messageElement =\n i18n.i18n.getFormatLocalizedString(registeredStrings, uiStrings.placeholder, {PH1: placeholder});\n\n assert.instanceOf(messageElement, HTMLElement);\n assert.strictEqual(messageElement.innerHTML, 'a message with a very pretty placeholder');\n });\n\n it('nests string placeholders in the message element', () => {\n const uiStrings = {placeholder: 'a message with a {PH1} placeholder'};\n const registeredStrings = i18nInstance.registerFileStrings('test.ts', uiStrings);\n\n const messageElement =\n i18n.i18n.getFormatLocalizedString(registeredStrings, uiStrings.placeholder, {PH1: 'somewhat nice'});\n\n assert.instanceOf(messageElement, HTMLElement);\n assert.strictEqual(messageElement.innerHTML, 'a message with a somewhat nice placeholder');\n });\n});\n\ndescribe('fetchAndRegisterLocaleData', () => {\n let fetchStub: sinon.SinonStub;\n\n beforeEach(() => {\n fetchStub = sinon.stub(window, 'fetch');\n fetchStub.returns(Promise.resolve(new window.Response(JSON.stringify({}), {\n // Always return an empty JSON object.\n status: 200,\n headers: {'Content-type': 'application/json'},\n })));\n });\n\n afterEach(() => {\n fetchStub.restore();\n i18n.i18n.resetLocaleDataForTest();\n });\n\n const bundled = 'devtools://devtools/bundled/devtools_app.html';\n const version = '@ffe848af6a5df4fa127e2929331116b7f9f1cb30';\n const remoteOrigin = 'https://chrome-devtools-frontend.appspot.com/';\n const remote = `${remoteOrigin}serve_file/${version}/`;\n const fullLocation = `${bundled}?remoteBase=${remote}&can_dock=true&dockSide=undocked`;\n\n it('fetches bundled locale files the same way as i18nImpl.ts itself is loaded', async () => {\n await i18n.i18n.fetchAndRegisterLocaleData('en-US', fullLocation);\n\n // We can't mock `import.meta.url` from i18nImpl so the Karam host leaks into\n // this test. This means we only check the last part of the URL with which `fetch`\n // was called.\n const actualUrl = fetchStub.args[0][0];\n assert.isTrue(actualUrl.endsWith('front_end/core/i18n/locales/en-US.json'), `Actually called with ${actualUrl}`);\n });\n\n it('fetches non-bundled locale files from the remote service endpoint', async () => {\n await i18n.i18n.fetchAndRegisterLocaleData('de', fullLocation);\n\n assert.isTrue(\n fetchStub.calledWith(\n 'devtools://devtools/remote/serve_file/@ffe848af6a5df4fa127e2929331116b7f9f1cb30/core/i18n/locales/de.json'),\n `Actually called with ${fetchStub.args[0][0]}`);\n });\n});\n"]} \ No newline at end of file diff --git a/public/core/i18n/locales/en-US.json b/public/core/i18n/locales/en-US.json index 3aa290ee2..cc78938a3 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/Revealer.ts | timelinePanel":{"message":"Performance panel"},"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 | exception":{"message":"Exception"},"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 | returnValue":{"message":"Return value"},"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 | exemptionReasonTopLevelTPCDDeprecationTrial":{"message":"This cookie is allowed by top-level third-party cookie deprecation trial. Learn more: goo.gle/ps-dt."},"core/sdk/NetworkRequest.ts | exemptionReasonTPCDDeprecationTrial":{"message":"This cookie is allowed by third-party cookie deprecation trial. Learn more: goo.gle/ps-dt."},"core/sdk/NetworkRequest.ts | exemptionReasonTPCDHeuristics":{"message":"This cookie is allowed by third-party cookie 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 either because of Chrome flags or browser configuration. Learn more in the Issues panel."},"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 either because of Chrome flags or browser configuration. Learn more in the Issues panel."},"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"},"core/sdk/SourceMapScopeChainEntry.ts | block":{"message":"Block"},"core/sdk/SourceMapScopeChainEntry.ts | closure":{"message":"Closure"},"core/sdk/SourceMapScopeChainEntry.ts | global":{"message":"Global"},"core/sdk/SourceMapScopeChainEntry.ts | local":{"message":"Local"},"core/sdk/SourceMapScopeChainEntry.ts | returnValue":{"message":"Return value"},"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 | browserPreference":{"message":"Browser preference"},"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 | switchToBrowserPreferredColor":{"message":"Switch to browser's preferred color theme"},"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 | 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 | useBrowserThemeColors":{"message":"Use browser theme colors"},"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 | CSSInsetAreaProperty":{"message":"The inset-area property is deprecated. Please use the position-area property 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 | 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":"Changes to Chrome's treatment of 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 either because of Chrome flags or browser configuration."},"models/issues_manager/CookieIssue.ts | consoleTpcdWarningMessage":{"message":"Chrome is moving towards a new experience that lets people make an informed choice with respect to third-party cookies."},"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":"Changes to Chrome's treatment of 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 | 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 | contentDiscarded":{"message":"Undefined"},"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 have certain kinds of embedded content (e.g. PDFs) 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 | 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 | key":{"message":"Key"},"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 | 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 registerClientEvent: () => Promise.resolve({}),\n },\n\n Host.AidaClient.AidaAccessPreconditions.AVAILABLE);\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;YACZ,SAAS,EAAE,IAAI;SAChB,CAAC;IACJ,CAAC;IACL,mBAAmB,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;CAC/C,sEAEiD,CAAC;AACvD,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 completed: true,\n };\n },\n registerClientEvent: () => Promise.resolve({}),\n },\n\n Host.AidaClient.AidaAccessPreconditions.AVAILABLE);\ndocument.getElementById('container')?.appendChild(component);\n"]} \ No newline at end of file diff --git a/public/ui/components/docs/freestyler/basic.js b/public/ui/components/docs/freestyler/basic.js index a46256da1..d8597b7a3 100644 --- a/public/ui/components/docs/freestyler/basic.js +++ b/public/ui/components/docs/freestyler/basic.js @@ -16,6 +16,7 @@ const messages = [ { entity: "model" /* Freestyler.ChatMessageEntity.MODEL */, suggestingFix: true, + aborted: false, steps: [ { isLoading: false, @@ -41,6 +42,8 @@ const component = new Freestyler.FreestylerChatUi({ aidaAvailability: "available" /* Host.AidaClient.AidaAccessPreconditions.AVAILABLE */, messages, selectedElement: {}, + selectedNetworkRequest: {}, + agentType: "freestyler" /* Freestyler.AgentType.FREESTYLER */, isLoading: false, canShowFeedbackForm: false, userInfo: {}, diff --git a/public/ui/components/docs/freestyler/basic.js.map b/public/ui/components/docs/freestyler/basic.js.map index 9ea6e59ff..2cf7249ef 100644 --- a/public/ui/components/docs/freestyler/basic.js.map +++ b/public/ui/components/docs/freestyler/basic.js.map @@ -1 +1 @@ -{"version":3,"file":"basic.js","sourceRoot":"","sources":["../../../../../../../../front_end/ui/components/docs/freestyler/basic.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,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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 type * as SDK from '../../../../core/sdk/sdk.js';\nimport * as Freestyler from '../../../../panels/freestyler/freestyler.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 noop = () => {};\n\nconst messages: Freestyler.ChatMessage[] = [\n {\n entity: Freestyler.ChatMessageEntity.USER,\n text: 'Explain the line wrapping behavior of this element.',\n },\n {\n entity: Freestyler.ChatMessageEntity.MODEL,\n suggestingFix: true,\n steps: [\n {\n isLoading: false,\n title: 'Checking element styles',\n thought:\n 'I need to check the element\\'s `white-space` and `overflow-wrap` properties to understand its line wrapping behavior.',\n code:\n 'const data = {\\n whiteSpace: window.getComputedStyle($0).whiteSpace,\\n overflowWrap: window.getComputedStyle($0).overflowWrap\\n};',\n output: '{\"whiteSpace\":\"break-spaces\",\"overflowWrap\":\"anywhere\"}',\n },\n ],\n answer:\n '# Explanation\\n\\n## Before\\n\\nA little bit text here\\n\\n## Next\\n\\nThe element\\'s line wrapping behavior is determined by the following CSS properties:\\n\\n* **`white-space: break-spaces;`**: This property tells the browser to preserve spaces and newlines within the text and to break lines at these points, as well as at normal word boundaries.\\n\\n* **`overflow-wrap: anywhere;`**: This property allows the browser to break lines within words if necessary to prevent overflow. This is useful for long words or URLs that might otherwise extend beyond the container\\'s width.\\n\\nHere\\'s an example of how these properties work together:\\n\\n\\n`````\\ncss\\n.element {\\n white-space: break-spaces;\\n overflow-wrap: anywhere;\\n}\\n`````\\n\\n\\nWith these properties, the text within the element will wrap at spaces, newlines, and within words if necessary to fit within the container.',\n rpcId: -5412527540357623608,\n\n },\n];\n\nconst component = new Freestyler.FreestylerChatUi({\n onTextSubmit: noop,\n onInspectElementClick: noop,\n onFeedbackSubmit: noop,\n onAcceptConsentClick: noop,\n onCancelClick: noop,\n onFixThisIssueClick: noop,\n inspectElementToggled: false,\n state: Freestyler.State.CHAT_VIEW,\n aidaAvailability: Host.AidaClient.AidaAccessPreconditions.AVAILABLE,\n messages,\n selectedElement: {} as unknown as SDK.DOMModel.DOMNode,\n isLoading: false,\n canShowFeedbackForm: false,\n userInfo: {},\n});\n\ndocument.getElementById('container')?.appendChild(component);\n"]} \ No newline at end of file +{"version":3,"file":"basic.js","sourceRoot":"","sources":["../../../../../../../../front_end/ui/components/docs/freestyler/basic.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,+BAA+B,CAAC;AAEtD,OAAO,KAAK,UAAU,MAAM,6CAA6C,CAAC;AAC1E,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,IAAI,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;AAEtB,MAAM,QAAQ,GAA6B;IACzC;QACE,MAAM,gDAAmC;QACzC,IAAI,EAAE,qDAAqD;KAC5D;IACD;QACE,MAAM,kDAAoC;QAC1C,aAAa,EAAE,IAAI;QACnB,OAAO,EAAE,KAAK;QACd,KAAK,EAAE;YACL;gBACE,SAAS,EAAE,KAAK;gBAChB,KAAK,EAAE,yBAAyB;gBAChC,OAAO,EACH,uHAAuH;gBAC3H,IAAI,EACA,qIAAqI;gBACzI,MAAM,EAAE,yDAAyD;aAClE;SACF;QACD,MAAM,EACF,82BAA82B;QACl3B,KAAK,EAAE,CAAC,mBAAmB;KAE5B;CACF,CAAC;AAEF,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,gBAAgB,CAAC;IAChD,YAAY,EAAE,IAAI;IAClB,qBAAqB,EAAE,IAAI;IAC3B,gBAAgB,EAAE,IAAI;IACtB,oBAAoB,EAAE,IAAI;IAC1B,aAAa,EAAE,IAAI;IACnB,mBAAmB,EAAE,IAAI;IACzB,qBAAqB,EAAE,KAAK;IAC5B,KAAK,8CAA4B;IACjC,gBAAgB,qEAAmD;IACnE,QAAQ;IACR,eAAe,EAAE,EAAqC;IACtD,sBAAsB,EAAE,EAAkD;IAC1E,SAAS,oDAAiC;IAC1C,SAAS,EAAE,KAAK;IAChB,mBAAmB,EAAE,KAAK;IAC1B,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC;AAEH,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Host from '../../../../core/host/host.js';\nimport type * as SDK from '../../../../core/sdk/sdk.js';\nimport * as Freestyler from '../../../../panels/freestyler/freestyler.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 noop = () => {};\n\nconst messages: Freestyler.ChatMessage[] = [\n {\n entity: Freestyler.ChatMessageEntity.USER,\n text: 'Explain the line wrapping behavior of this element.',\n },\n {\n entity: Freestyler.ChatMessageEntity.MODEL,\n suggestingFix: true,\n aborted: false,\n steps: [\n {\n isLoading: false,\n title: 'Checking element styles',\n thought:\n 'I need to check the element\\'s `white-space` and `overflow-wrap` properties to understand its line wrapping behavior.',\n code:\n 'const data = {\\n whiteSpace: window.getComputedStyle($0).whiteSpace,\\n overflowWrap: window.getComputedStyle($0).overflowWrap\\n};',\n output: '{\"whiteSpace\":\"break-spaces\",\"overflowWrap\":\"anywhere\"}',\n },\n ],\n answer:\n '# Explanation\\n\\n## Before\\n\\nA little bit text here\\n\\n## Next\\n\\nThe element\\'s line wrapping behavior is determined by the following CSS properties:\\n\\n* **`white-space: break-spaces;`**: This property tells the browser to preserve spaces and newlines within the text and to break lines at these points, as well as at normal word boundaries.\\n\\n* **`overflow-wrap: anywhere;`**: This property allows the browser to break lines within words if necessary to prevent overflow. This is useful for long words or URLs that might otherwise extend beyond the container\\'s width.\\n\\nHere\\'s an example of how these properties work together:\\n\\n\\n`````\\ncss\\n.element {\\n white-space: break-spaces;\\n overflow-wrap: anywhere;\\n}\\n`````\\n\\n\\nWith these properties, the text within the element will wrap at spaces, newlines, and within words if necessary to fit within the container.',\n rpcId: -5412527540357623608,\n\n },\n];\n\nconst component = new Freestyler.FreestylerChatUi({\n onTextSubmit: noop,\n onInspectElementClick: noop,\n onFeedbackSubmit: noop,\n onAcceptConsentClick: noop,\n onCancelClick: noop,\n onFixThisIssueClick: noop,\n inspectElementToggled: false,\n state: Freestyler.State.CHAT_VIEW,\n aidaAvailability: Host.AidaClient.AidaAccessPreconditions.AVAILABLE,\n messages,\n selectedElement: {} as unknown as SDK.DOMModel.DOMNode,\n selectedNetworkRequest: {} as unknown as SDK.NetworkRequest.NetworkRequest,\n agentType: Freestyler.AgentType.FREESTYLER,\n isLoading: false,\n canShowFeedbackForm: false,\n userInfo: {},\n});\n\ndocument.getElementById('container')?.appendChild(component);\n"]} \ No newline at end of file diff --git a/public/ui/components/docs/freestyler/empty_state.js b/public/ui/components/docs/freestyler/empty_state.js index 94082bc10..856c38448 100644 --- a/public/ui/components/docs/freestyler/empty_state.js +++ b/public/ui/components/docs/freestyler/empty_state.js @@ -20,6 +20,8 @@ const component = new Freestyler.FreestylerChatUi({ aidaAvailability: "available" /* Host.AidaClient.AidaAccessPreconditions.AVAILABLE */, messages: [], selectedElement: {}, + selectedNetworkRequest: {}, + agentType: "freestyler" /* Freestyler.AgentType.FREESTYLER */, isLoading: false, canShowFeedbackForm: false, userInfo: {}, diff --git a/public/ui/components/docs/freestyler/empty_state.js.map b/public/ui/components/docs/freestyler/empty_state.js.map index 4c9b36e73..d1f4983fc 100644 --- a/public/ui/components/docs/freestyler/empty_state.js.map +++ b/public/ui/components/docs/freestyler/empty_state.js.map @@ -1 +1 @@ -{"version":3,"file":"empty_state.js","sourceRoot":"","sources":["../../../../../../../../front_end/ui/components/docs/freestyler/empty_state.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,+BAA+B,CAAC;AAEtD,OAAO,KAAK,UAAU,MAAM,6CAA6C,CAAC;AAC1E,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,IAAI,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;AAEtB,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,gBAAgB,CAAC;IAChD,YAAY,EAAE,IAAI;IAClB,qBAAqB,EAAE,IAAI;IAC3B,gBAAgB,EAAE,IAAI;IACtB,oBAAoB,EAAE,IAAI;IAC1B,aAAa,EAAE,IAAI;IACnB,mBAAmB,EAAE,IAAI;IACzB,qBAAqB,EAAE,KAAK;IAC5B,KAAK,8CAA4B;IACjC,gBAAgB,qEAAmD;IACnE,QAAQ,EAAE,EAAE;IACZ,eAAe,EAAE,EAAqC;IACtD,SAAS,EAAE,KAAK;IAChB,mBAAmB,EAAE,KAAK;IAC1B,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC;AAEH,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Host from '../../../../core/host/host.js';\nimport type * as SDK from '../../../../core/sdk/sdk.js';\nimport * as Freestyler from '../../../../panels/freestyler/freestyler.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 noop = () => {};\n\nconst component = new Freestyler.FreestylerChatUi({\n onTextSubmit: noop,\n onInspectElementClick: noop,\n onFeedbackSubmit: noop,\n onAcceptConsentClick: noop,\n onCancelClick: noop,\n onFixThisIssueClick: noop,\n inspectElementToggled: false,\n state: Freestyler.State.CHAT_VIEW,\n aidaAvailability: Host.AidaClient.AidaAccessPreconditions.AVAILABLE,\n messages: [],\n selectedElement: {} as unknown as SDK.DOMModel.DOMNode,\n isLoading: false,\n canShowFeedbackForm: false,\n userInfo: {},\n});\n\ndocument.getElementById('container')?.appendChild(component);\n"]} \ No newline at end of file +{"version":3,"file":"empty_state.js","sourceRoot":"","sources":["../../../../../../../../front_end/ui/components/docs/freestyler/empty_state.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,IAAI,MAAM,+BAA+B,CAAC;AAEtD,OAAO,KAAK,UAAU,MAAM,6CAA6C,CAAC;AAC1E,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,IAAI,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;AAEtB,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,gBAAgB,CAAC;IAChD,YAAY,EAAE,IAAI;IAClB,qBAAqB,EAAE,IAAI;IAC3B,gBAAgB,EAAE,IAAI;IACtB,oBAAoB,EAAE,IAAI;IAC1B,aAAa,EAAE,IAAI;IACnB,mBAAmB,EAAE,IAAI;IACzB,qBAAqB,EAAE,KAAK;IAC5B,KAAK,8CAA4B;IACjC,gBAAgB,qEAAmD;IACnE,QAAQ,EAAE,EAAE;IACZ,eAAe,EAAE,EAAqC;IACtD,sBAAsB,EAAE,EAAkD;IAC1E,SAAS,oDAAiC;IAC1C,SAAS,EAAE,KAAK;IAChB,mBAAmB,EAAE,KAAK;IAC1B,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC;AAEH,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Host from '../../../../core/host/host.js';\nimport type * as SDK from '../../../../core/sdk/sdk.js';\nimport * as Freestyler from '../../../../panels/freestyler/freestyler.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 noop = () => {};\n\nconst component = new Freestyler.FreestylerChatUi({\n onTextSubmit: noop,\n onInspectElementClick: noop,\n onFeedbackSubmit: noop,\n onAcceptConsentClick: noop,\n onCancelClick: noop,\n onFixThisIssueClick: noop,\n inspectElementToggled: false,\n state: Freestyler.State.CHAT_VIEW,\n aidaAvailability: Host.AidaClient.AidaAccessPreconditions.AVAILABLE,\n messages: [],\n selectedElement: {} as unknown as SDK.DOMModel.DOMNode,\n selectedNetworkRequest: {} as unknown as SDK.NetworkRequest.NetworkRequest,\n agentType: Freestyler.AgentType.FREESTYLER,\n isLoading: false,\n canShowFeedbackForm: false,\n userInfo: {},\n});\n\ndocument.getElementById('container')?.appendChild(component);\n"]} \ No newline at end of file diff --git a/public/ui/components/docs/markdown_view/code-block.d.ts b/public/ui/components/docs/markdown_view/code-block.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/public/ui/components/docs/markdown_view/code-block.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/public/ui/components/docs/markdown_view/code-block.html b/public/ui/components/docs/markdown_view/code-block.html new file mode 100644 index 000000000..3727d53f6 --- /dev/null +++ b/public/ui/components/docs/markdown_view/code-block.html @@ -0,0 +1,30 @@ + + + + + + + Code Block - Markdown View example + + + +
+ + + + diff --git a/public/ui/components/docs/markdown_view/code-block.js b/public/ui/components/docs/markdown_view/code-block.js new file mode 100644 index 000000000..b209c7dac --- /dev/null +++ b/public/ui/components/docs/markdown_view/code-block.js @@ -0,0 +1,45 @@ +// Copyright 2021 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 FrontendHelpers from '../../../../testing/EnvironmentHelpers.js'; +import * as ComponentHelpers from '../../helpers/helpers.js'; +import * as MarkdownView from '../../markdown_view/markdown_view.js'; +await ComponentHelpers.ComponentServerSetup.setup(); +await FrontendHelpers.initializeGlobalVars(); +const container = document.getElementById('container'); +function appendCodeBlock(data) { + const component = new MarkdownView.CodeBlock.CodeBlock(); + container?.appendChild(document.createTextNode(JSON.stringify(data))); + container?.appendChild(component); + component.codeLang = 'js'; + component.code = `MarkdownView.MarkdownImagesMap.markdownImages.set('lighthouse-icon', { + src: '../../Images/lighthouse_logo.svg', + width: '16px', + height: '16px', + isIcon: true, + }); + MarkdownView.MarkdownImagesMap.markdownImages.set('baseline', { + src: '../../Images/align-items-baseline.svg', + width: '200px', + height: '200px', + isIcon: false, + });`; + component.displayNotice = data.displayNotice; + component.displayToolbar = data.displayToolbar; + if (data.heading) { + component.heading = data.heading; + } +} +appendCodeBlock({ displayNotice: true, displayToolbar: true, heading: { text: 'Code executed', showCopyButton: false } }); +appendCodeBlock({ displayNotice: false, displayToolbar: true, heading: { text: 'Code executed', showCopyButton: false } }); +appendCodeBlock({ displayNotice: true, displayToolbar: false, heading: { text: 'Code executed', showCopyButton: false } }); +appendCodeBlock({ displayNotice: false, displayToolbar: false, heading: { text: 'Code executed', showCopyButton: false } }); +appendCodeBlock({ displayNotice: true, displayToolbar: true, heading: { text: 'Code executed', showCopyButton: true } }); +appendCodeBlock({ displayNotice: false, displayToolbar: true, heading: { text: 'Code executed', showCopyButton: true } }); +appendCodeBlock({ displayNotice: true, displayToolbar: false, heading: { text: 'Code executed', showCopyButton: true } }); +appendCodeBlock({ displayNotice: false, displayToolbar: false, heading: { text: 'Code executed', showCopyButton: true } }); +appendCodeBlock({ displayNotice: true, displayToolbar: true }); +appendCodeBlock({ displayNotice: false, displayToolbar: true }); +appendCodeBlock({ displayNotice: true, displayToolbar: false }); +appendCodeBlock({ displayNotice: false, displayToolbar: false }); +//# sourceMappingURL=code-block.js.map \ No newline at end of file diff --git a/public/ui/components/docs/markdown_view/code-block.js.map b/public/ui/components/docs/markdown_view/code-block.js.map new file mode 100644 index 000000000..1c1a7d0f6 --- /dev/null +++ b/public/ui/components/docs/markdown_view/code-block.js.map @@ -0,0 +1 @@ +{"version":3,"file":"code-block.js","sourceRoot":"","sources":["../../../../../../../../front_end/ui/components/docs/markdown_view/code-block.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,eAAe,MAAM,2CAA2C,CAAC;AAC7E,OAAO,KAAK,gBAAgB,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,YAAY,MAAM,sCAAsC,CAAC;AAErE,MAAM,gBAAgB,CAAC,oBAAoB,CAAC,KAAK,EAAE,CAAC;AACpD,MAAM,eAAe,CAAC,oBAAoB,EAAE,CAAC;AAE7C,MAAM,SAAS,GAAG,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;AAEvD,SAAS,eAAe,CACpB,IAAiG;IACnG,MAAM,SAAS,GAAG,IAAI,YAAY,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC;IACzD,SAA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EAAC,EAAC,CAAC,CAAC;AACrH,eAAe,CAAC,EAAC,aAAa,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,EAAE,EAAC,IAAI,EAAE,eAAe,EAAE,cAAc,EAAE,IAAI,EAAC,EAAC,CAAC,CAAC;AACtH,eAAe,CAAC,EAAC,aAAa,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,EAAC,IAAI,EAAE,eAAe,EAAE,cAAc,EAAE,IAAI,EAAC,EAAC,CAAC,CAAC;AACtH,eAAe,CAAC,EAAC,aAAa,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,EAAC,IAAI,EAAE,eAAe,EAAE,cAAc,EAAE,IAAI,EAAC,EAAC,CAAC,CAAC;AAEvH,eAAe,CAAC,EAAC,aAAa,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAC,CAAC,CAAC;AAC7D,eAAe,CAAC,EAAC,aAAa,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAC,CAAC,CAAC;AAC9D,eAAe,CAAC,EAAC,aAAa,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAC,CAAC,CAAC;AAC9D,eAAe,CAAC,EAAC,aAAa,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAC,CAAC,CAAC","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as FrontendHelpers from '../../../../testing/EnvironmentHelpers.js';\nimport * as ComponentHelpers from '../../helpers/helpers.js';\nimport * as MarkdownView from '../../markdown_view/markdown_view.js';\n\nawait ComponentHelpers.ComponentServerSetup.setup();\nawait FrontendHelpers.initializeGlobalVars();\n\nconst container = document.getElementById('container');\n\nfunction appendCodeBlock(\n data: {displayNotice: boolean, displayToolbar: boolean, heading?: MarkdownView.CodeBlock.Heading}): void {\n const component = new MarkdownView.CodeBlock.CodeBlock();\n container?.appendChild(document.createTextNode(JSON.stringify(data)));\n container?.appendChild(component);\n component.codeLang = 'js';\n component.code = `MarkdownView.MarkdownImagesMap.markdownImages.set('lighthouse-icon', {\n src: '../../Images/lighthouse_logo.svg',\n width: '16px',\n height: '16px',\n isIcon: true,\n });\n MarkdownView.MarkdownImagesMap.markdownImages.set('baseline', {\n src: '../../Images/align-items-baseline.svg',\n width: '200px',\n height: '200px',\n isIcon: false,\n });`;\n component.displayNotice = data.displayNotice;\n component.displayToolbar = data.displayToolbar;\n if (data.heading) {\n component.heading = data.heading;\n }\n}\n\nappendCodeBlock({displayNotice: true, displayToolbar: true, heading: {text: 'Code executed', showCopyButton: false}});\nappendCodeBlock({displayNotice: false, displayToolbar: true, heading: {text: 'Code executed', showCopyButton: false}});\nappendCodeBlock({displayNotice: true, displayToolbar: false, heading: {text: 'Code executed', showCopyButton: false}});\nappendCodeBlock({displayNotice: false, displayToolbar: false, heading: {text: 'Code executed', showCopyButton: false}});\n\nappendCodeBlock({displayNotice: true, displayToolbar: true, heading: {text: 'Code executed', showCopyButton: true}});\nappendCodeBlock({displayNotice: false, displayToolbar: true, heading: {text: 'Code executed', showCopyButton: true}});\nappendCodeBlock({displayNotice: true, displayToolbar: false, heading: {text: 'Code executed', showCopyButton: true}});\nappendCodeBlock({displayNotice: false, displayToolbar: false, heading: {text: 'Code executed', showCopyButton: true}});\n\nappendCodeBlock({displayNotice: true, displayToolbar: true});\nappendCodeBlock({displayNotice: false, displayToolbar: true});\nappendCodeBlock({displayNotice: true, displayToolbar: false});\nappendCodeBlock({displayNotice: false, displayToolbar: false});\n"]} \ No newline at end of file diff --git a/public/ui/components/docs/markdown_view/ts-tsconfig.json b/public/ui/components/docs/markdown_view/ts-tsconfig.json index d4029a342..207c72526 100644 --- a/public/ui/components/docs/markdown_view/ts-tsconfig.json +++ b/public/ui/components/docs/markdown_view/ts-tsconfig.json @@ -39,6 +39,7 @@ }, "files": [ "../../../../../../../../front_end/ui/components/docs/markdown_view/basic.ts", + "../../../../../../../../front_end/ui/components/docs/markdown_view/code-block.ts", "../../../../../../../../front_end/legacy/legacy-defs.d.ts", "../../../../../../../../front_end/global_typings/global_defs.d.ts", "../../../../../../../../node_modules/@types/filesystem/index.d.ts" diff --git a/public/ui/components/docs/performance_panel/layout_shift_details.d.ts b/public/ui/components/docs/performance_panel/layout_shift_details.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/public/ui/components/docs/performance_panel/layout_shift_details.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/public/ui/components/docs/performance_panel/layout_shift_details.html b/public/ui/components/docs/performance_panel/layout_shift_details.html new file mode 100644 index 000000000..d0fc0ffb3 --- /dev/null +++ b/public/ui/components/docs/performance_panel/layout_shift_details.html @@ -0,0 +1,18 @@ + + + + + + + Layout shift detials component + + +
+
+ + + \ No newline at end of file diff --git a/public/ui/components/docs/performance_panel/layout_shift_details.js b/public/ui/components/docs/performance_panel/layout_shift_details.js new file mode 100644 index 000000000..3e585134b --- /dev/null +++ b/public/ui/components/docs/performance_panel/layout_shift_details.js @@ -0,0 +1,25 @@ +// Copyright 2024 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 TimelineComponents from '../../../../panels/timeline/components/components.js'; +import * as EnvironmentHelpers from '../../../../testing/EnvironmentHelpers.js'; +import * as TraceLoader from '../../../../testing/TraceLoader.js'; +import * as ComponentSetup from '../../helpers/helpers.js'; +await EnvironmentHelpers.initializeGlobalVars(); +await ComponentSetup.ComponentServerSetup.setup(); +/** + * Render details for a Layout shift event. + **/ +async function renderDetails() { + const container = document.querySelector('#container'); + if (!container) { + throw new Error('No container'); + } + const { traceData, insights } = await TraceLoader.TraceLoader.traceEngine(/* mocha context */ null, 'shift-attribution.json.gz'); + const shiftEventIframe = traceData.LayoutShifts.clusters[0].worstShiftEvent; + const details = new TimelineComponents.LayoutShiftDetails.LayoutShiftDetails(); + details.setData(shiftEventIframe, insights, traceData, false); + container.appendChild(details); +} +await renderDetails(); +//# sourceMappingURL=layout_shift_details.js.map \ No newline at end of file diff --git a/public/ui/components/docs/performance_panel/layout_shift_details.js.map b/public/ui/components/docs/performance_panel/layout_shift_details.js.map new file mode 100644 index 000000000..d5ef71799 --- /dev/null +++ b/public/ui/components/docs/performance_panel/layout_shift_details.js.map @@ -0,0 +1 @@ +{"version":3,"file":"layout_shift_details.js","sourceRoot":"","sources":["../../../../../../../../front_end/ui/components/docs/performance_panel/layout_shift_details.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAG7B,OAAO,KAAK,kBAAkB,MAAM,sDAAsD,CAAC;AAC3F,OAAO,KAAK,kBAAkB,MAAM,2CAA2C,CAAC;AAChF,OAAO,KAAK,WAAW,MAAM,oCAAoC,CAAC;AAClE,OAAO,KAAK,cAAc,MAAM,0BAA0B,CAAC;AAE3D,MAAM,kBAAkB,CAAC,oBAAoB,EAAE,CAAC;AAChD,MAAM,cAAc,CAAC,oBAAoB,CAAC,KAAK,EAAE,CAAC;AAElD;;IAEI;AACJ,KAAK,UAAU,aAAa;IAC1B,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IACvD,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC;IAClC,CAAC;IAED,MAAM,EAAC,SAAS,EAAE,QAAQ,EAAC,GACvB,MAAM,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,mBAAmB,CAAC,IAAI,EAAE,2BAA2B,CAAC,CAAC;IAErG,MAAM,gBAAgB,GAClB,SAAS,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,eAAqE,CAAC;IAC7G,MAAM,OAAO,GAAG,IAAI,kBAAkB,CAAC,kBAAkB,CAAC,kBAAkB,EAAE,CAAC;IAC/E,OAAO,CAAC,OAAO,CAAC,gBAAgB,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IAE9D,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC;AAED,MAAM,aAAa,EAAE,CAAC","sourcesContent":["// Copyright 2024 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 TraceEngine from '../../../../models/trace/trace.js';\nimport * as TimelineComponents from '../../../../panels/timeline/components/components.js';\nimport * as EnvironmentHelpers from '../../../../testing/EnvironmentHelpers.js';\nimport * as TraceLoader from '../../../../testing/TraceLoader.js';\nimport * as ComponentSetup from '../../helpers/helpers.js';\n\nawait EnvironmentHelpers.initializeGlobalVars();\nawait ComponentSetup.ComponentServerSetup.setup();\n\n/**\n * Render details for a Layout shift event.\n **/\nasync function renderDetails() {\n const container = document.querySelector('#container');\n if (!container) {\n throw new Error('No container');\n }\n\n const {traceData, insights} =\n await TraceLoader.TraceLoader.traceEngine(/* mocha context */ null, 'shift-attribution.json.gz');\n\n const shiftEventIframe =\n traceData.LayoutShifts.clusters[0].worstShiftEvent as TraceEngine.Types.TraceEvents.SyntheticLayoutShift;\n const details = new TimelineComponents.LayoutShiftDetails.LayoutShiftDetails();\n details.setData(shiftEventIframe, insights, traceData, false);\n\n container.appendChild(details);\n}\n\nawait renderDetails();\n"]} \ No newline at end of file diff --git a/public/ui/components/docs/performance_panel/ts-tsconfig.json b/public/ui/components/docs/performance_panel/ts-tsconfig.json index 5c8ce2a17..5b4d0cdd8 100644 --- a/public/ui/components/docs/performance_panel/ts-tsconfig.json +++ b/public/ui/components/docs/performance_panel/ts-tsconfig.json @@ -40,6 +40,7 @@ "files": [ "../../../../../../../../front_end/ui/components/docs/performance_panel/basic.ts", "../../../../../../../../front_end/ui/components/docs/performance_panel/flamechart.ts", + "../../../../../../../../front_end/ui/components/docs/performance_panel/layout_shift_details.ts", "../../../../../../../../front_end/ui/components/docs/performance_panel/network_request_details.ts", "../../../../../../../../front_end/ui/components/docs/performance_panel/network_request_tooltip.ts", "../../../../../../../../front_end/ui/components/docs/performance_panel/overview.ts", diff --git a/public/ui/components/markdown_view/CodeBlock.d.ts b/public/ui/components/markdown_view/CodeBlock.d.ts index dd3e7ba7a..9b06fe07b 100644 --- a/public/ui/components/markdown_view/CodeBlock.d.ts +++ b/public/ui/components/markdown_view/CodeBlock.d.ts @@ -1,4 +1,8 @@ import '../../../ui/legacy/legacy.js'; +export interface Heading { + showCopyButton: boolean; + text: string; +} export declare class CodeBlock extends HTMLElement { #private; static readonly litTagName: import("../../lit-html/static.js").Static; @@ -9,6 +13,7 @@ export declare class CodeBlock extends HTMLElement { set timeout(value: number); set displayNotice(value: boolean); set displayToolbar(value: boolean); + set heading(heading: Heading); } declare global { interface HTMLElementTagNameMap { diff --git a/public/ui/components/markdown_view/CodeBlock.js b/public/ui/components/markdown_view/CodeBlock.js index 2059b6f9b..505646c4a 100644 --- a/public/ui/components/markdown_view/CodeBlock.js +++ b/public/ui/components/markdown_view/CodeBlock.js @@ -45,6 +45,10 @@ export class CodeBlock extends HTMLElement { * Whether to display the toolbar on the top. */ #displayToolbar = true; + /** + * Details of the `heading` of the codeblock right after toolbar. + */ + #heading; connectedCallback() { this.#shadow.adoptedStyleSheets = [styles]; this.#render(); @@ -81,6 +85,10 @@ export class CodeBlock extends HTMLElement { this.#displayToolbar = value; this.#render(); } + set heading(heading) { + this.#heading = heading; + this.#render(); + } #onCopy() { Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(this.#code); this.#copied = true; @@ -91,43 +99,72 @@ export class CodeBlock extends HTMLElement { this.#render(); }, this.#copyTimeout); } - #render() { + #renderCopyButton({ noText = false } = {}) { const copyButtonClasses = LitHtml.Directives.classMap({ copied: this.#copied, 'copy-button': true, }); // clang-format off - LitHtml.render(LitHtml.html `
- ${this.#displayToolbar ? LitHtml.html `
-
${this.#codeLang}
-
- -
-
` : ''} + i18nString(UIStrings.copy)}` : LitHtml.nothing} + + `; + // clang-format on + } + #renderToolbar() { + // clang-format off + return LitHtml.html `
+
${this.#codeLang}
+
+ ${this.#renderCopyButton()} +
+
`; + // clang-format on + } + #renderNotice() { + // clang-format off + return LitHtml.html `

+ + ${i18nString(UIStrings.disclaimer)} + +

`; + // clang-format on + } + #renderHeading() { + if (!this.#heading) { + return LitHtml.nothing; + } + // clang-format off + return LitHtml.html ` +
+

${this.#heading.text}

+ ${this.#heading.showCopyButton ? LitHtml.html `
+ ${this.#renderCopyButton({ noText: true })} +
` : LitHtml.nothing} +
+ `; + // clang-format on + } + #render() { + // clang-format off + LitHtml.render(LitHtml.html `
+ ${this.#displayToolbar ? this.#renderToolbar() : LitHtml.nothing}
- <${TextEditor.TextEditor.TextEditor.litTagName} .state=${this.#editorState}> - ${this.#displayNotice ? LitHtml.html `

- - ${i18nString(UIStrings.disclaimer)} - -

` : LitHtml.nothing} + ${this.#heading ? this.#renderHeading() : LitHtml.nothing} +
+ <${TextEditor.TextEditor.TextEditor.litTagName} .state=${this.#editorState}> +
+ ${this.#displayNotice ? this.#renderNotice() : LitHtml.nothing}
`, this.#shadow, { host: this, }); diff --git a/public/ui/components/markdown_view/CodeBlock.js.map b/public/ui/components/markdown_view/CodeBlock.js.map index 86943d523..d71c4cb49 100644 --- a/public/ui/components/markdown_view/CodeBlock.js.map +++ b/public/ui/components/markdown_view/CodeBlock.js.map @@ -1 +1 @@ -{"version":3,"file":"CodeBlock.js","sourceRoot":"","sources":["../../../../../../../front_end/ui/components/markdown_view/CodeBlock.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,8BAA8B,CAAC,CAAC,aAAa;AAEpD,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,UAAU,MAAM,yDAAyD,CAAC;AACtF,OAAO,KAAK,UAAU,MAAM,mDAAmD,CAAC;AAChF,OAAO,KAAK,UAAU,MAAM,6CAA6C,CAAC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AC,MAAM,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC","sourcesContent":["// Copyright (c) 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 '../../../ui/legacy/legacy.js'; // for x-link\n\nimport * as Host from '../../../core/host/host.js';\nimport * as i18n from '../../../core/i18n/i18n.js';\nimport * as CodeMirror from '../../../third_party/codemirror.next/codemirror.next.js';\nimport * as TextEditor from '../../../ui/components/text_editor/text_editor.js';\nimport * as IconButton from '../../components/icon_button/icon_button.js';\nimport * as LitHtml from '../../lit-html/lit-html.js';\nimport * as VisualLogging from '../../visual_logging/visual_logging.js';\n\nimport styles from './codeBlock.css.js';\n\nconst UIStrings = {\n /**\n * @description The title of the button to copy the codeblock from a Markdown view.\n */\n copy: 'Copy code',\n /**\n * @description The title of the button after it was pressed and the text was copied to clipboard.\n */\n copied: 'Copied to clipboard',\n /**\n * @description Disclaimer shown in the code blocks.\n */\n disclaimer: 'Use code snippets with caution',\n};\nconst str_ = i18n.i18n.registerUIStrings('ui/components/markdown_view/CodeBlock.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport class CodeBlock extends HTMLElement {\n static readonly litTagName = LitHtml.literal`devtools-code-block`;\n\n readonly #shadow = this.attachShadow({mode: 'open'});\n\n #code = '';\n #codeLang = '';\n #copyTimeout = 1000;\n #timer?: ReturnType;\n #copied = false;\n #editorState?: CodeMirror.EditorState;\n #languageConf = new CodeMirror.Compartment();\n /**\n * Whether to display a notice \"​​Use code snippets with caution\" in code\n * blocks.\n */\n #displayNotice = false;\n /**\n * Whether to display the toolbar on the top.\n */\n #displayToolbar = true;\n\n connectedCallback(): void {\n this.#shadow.adoptedStyleSheets = [styles];\n this.#render();\n }\n\n set code(value: string) {\n this.#code = value;\n this.#editorState = CodeMirror.EditorState.create({\n doc: this.#code,\n extensions: [\n TextEditor.Config.baseConfiguration(this.#code),\n CodeMirror.EditorState.readOnly.of(true),\n CodeMirror.EditorView.lineWrapping,\n this.#languageConf.of(CodeMirror.javascript.javascript()),\n ],\n });\n this.#render();\n }\n\n get code(): string {\n return this.#code;\n }\n\n set codeLang(value: string) {\n this.#codeLang = value;\n this.#render();\n }\n\n set timeout(value: number) {\n this.#copyTimeout = value;\n this.#render();\n }\n\n set displayNotice(value: boolean) {\n this.#displayNotice = value;\n this.#render();\n }\n\n set displayToolbar(value: boolean) {\n this.#displayToolbar = value;\n this.#render();\n }\n\n #onCopy(): void {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(this.#code);\n this.#copied = true;\n this.#render();\n clearTimeout(this.#timer);\n this.#timer = setTimeout(() => {\n this.#copied = false;\n this.#render();\n }, this.#copyTimeout);\n }\n\n #render(): void {\n const copyButtonClasses = LitHtml.Directives.classMap({\n copied: this.#copied,\n 'copy-button': true,\n });\n // clang-format off\n LitHtml.render(LitHtml.html`
\n ${this.#displayToolbar ? LitHtml.html`
\n
${this.#codeLang}
\n
\n \n
\n
` : ''}\n
\n <${TextEditor.TextEditor.TextEditor.litTagName} .state=${\n this.#editorState\n }>\n ${this.#displayNotice ? LitHtml.html`

\n \n ${i18nString(UIStrings.disclaimer)}\n \n

` : LitHtml.nothing}\n
\n
`, this.#shadow, {\n host: this,\n });\n // clang-format on\n\n const editor = this.#shadow?.querySelector('devtools-text-editor')?.editor;\n\n if (!editor) {\n return;\n }\n let language = CodeMirror.html.html({autoCloseTags: false, selfClosingTags: true});\n switch (this.#codeLang) {\n case 'js':\n language = CodeMirror.javascript.javascript();\n break;\n case 'ts':\n language = CodeMirror.javascript.javascript({typescript: true});\n break;\n case 'jsx':\n language = CodeMirror.javascript.javascript({jsx: true});\n break;\n case 'css':\n language = CodeMirror.css.css();\n break;\n }\n editor.dispatch({\n effects: this.#languageConf.reconfigure(language),\n });\n }\n}\n\ncustomElements.define('devtools-code-block', CodeBlock);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'devtools-code-block': CodeBlock;\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"CodeBlock.js","sourceRoot":"","sources":["../../../../../../../front_end/ui/components/markdown_view/CodeBlock.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,8BAA8B,CAAC,CAAC,aAAa;AAEpD,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,UAAU,MAAM,yDAAyD,CAAC;AACtF,OAAO,KAAK,UAAU,MAAM,mDAAmD,CAAC;AAChF,OAAO,KAAK,UAAU,MAAM,6CAA6C,CAAC;AAC1E,OAAO,KAAK,OAAO,MAAM,4BAA4B,CAAC;AACtD,OAAO,KAAK,aAAa,MAAM,wCAAwC,CAAC;AAExE,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAExC,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,IAAI,EAAE,WAAW;IACjB;;OAEG;IACH,MAAM,EAAE,qBAAqB;IAC7B;;OAEG;IACH,UAAU,EAAE,gCAAgC;CAC7C,CAAC;AACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,0CAA0C,EAAE,SAAS,CAAC,CAAC;AAChG,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAOtE,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC,MAAM,CAAU,UAAU,GAAG,OAAO,CAAC,OAAO,CAAA,qBAAqB,CAAC;IAEzD,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC,CAAC;IAErD,KAAK,GAAG,EAAE,CAAC;IACX,SAAS,GAAG,EAAE,CAAC;IACf,YAAY,GAAG,IAAI,CAAC;IACpB,MAAM,CAAiC;IACvC,OAAO,GAAG,KAAK,CAAC;IAChB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,EAAC,CAAC,CAAC;gBACzD,MAAM;YACR,KAAK,KAAK;gBACR,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;gBAChC,MAAM;QACV,CAAC;QACD,MAAM,CAAC,QAAQ,CAAC;YACd,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,QAAQ,CAAC;SAClD,CAAC,CAAC;IACL,CAAC;;AAGH,cAAc,CAAC,MAAM,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC","sourcesContent":["// Copyright (c) 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 '../../../ui/legacy/legacy.js'; // for x-link\n\nimport * as Host from '../../../core/host/host.js';\nimport * as i18n from '../../../core/i18n/i18n.js';\nimport * as CodeMirror from '../../../third_party/codemirror.next/codemirror.next.js';\nimport * as TextEditor from '../../../ui/components/text_editor/text_editor.js';\nimport * as IconButton from '../../components/icon_button/icon_button.js';\nimport * as LitHtml from '../../lit-html/lit-html.js';\nimport * as VisualLogging from '../../visual_logging/visual_logging.js';\n\nimport styles from './codeBlock.css.js';\n\nconst UIStrings = {\n /**\n * @description The title of the button to copy the codeblock from a Markdown view.\n */\n copy: 'Copy code',\n /**\n * @description The title of the button after it was pressed and the text was copied to clipboard.\n */\n copied: 'Copied to clipboard',\n /**\n * @description Disclaimer shown in the code blocks.\n */\n disclaimer: 'Use code snippets with caution',\n};\nconst str_ = i18n.i18n.registerUIStrings('ui/components/markdown_view/CodeBlock.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport interface Heading {\n showCopyButton: boolean;\n text: string;\n}\n\nexport class CodeBlock extends HTMLElement {\n static readonly litTagName = LitHtml.literal`devtools-code-block`;\n\n readonly #shadow = this.attachShadow({mode: 'open'});\n\n #code = '';\n #codeLang = '';\n #copyTimeout = 1000;\n #timer?: ReturnType;\n #copied = false;\n #editorState?: CodeMirror.EditorState;\n #languageConf = new CodeMirror.Compartment();\n /**\n * Whether to display a notice \"​​Use code snippets with caution\" in code\n * blocks.\n */\n #displayNotice = false;\n /**\n * Whether to display the toolbar on the top.\n */\n #displayToolbar = true;\n\n /**\n * Details of the `heading` of the codeblock right after toolbar.\n */\n #heading?: Heading;\n\n connectedCallback(): void {\n this.#shadow.adoptedStyleSheets = [styles];\n this.#render();\n }\n\n set code(value: string) {\n this.#code = value;\n this.#editorState = CodeMirror.EditorState.create({\n doc: this.#code,\n extensions: [\n TextEditor.Config.baseConfiguration(this.#code),\n CodeMirror.EditorState.readOnly.of(true),\n CodeMirror.EditorView.lineWrapping,\n this.#languageConf.of(CodeMirror.javascript.javascript()),\n ],\n });\n this.#render();\n }\n\n get code(): string {\n return this.#code;\n }\n\n set codeLang(value: string) {\n this.#codeLang = value;\n this.#render();\n }\n\n set timeout(value: number) {\n this.#copyTimeout = value;\n this.#render();\n }\n\n set displayNotice(value: boolean) {\n this.#displayNotice = value;\n this.#render();\n }\n\n set displayToolbar(value: boolean) {\n this.#displayToolbar = value;\n this.#render();\n }\n\n set heading(heading: Heading) {\n this.#heading = heading;\n this.#render();\n }\n\n #onCopy(): void {\n Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(this.#code);\n this.#copied = true;\n this.#render();\n clearTimeout(this.#timer);\n this.#timer = setTimeout(() => {\n this.#copied = false;\n this.#render();\n }, this.#copyTimeout);\n }\n\n #renderCopyButton({noText = false}: {noText?: boolean} = {}): LitHtml.TemplateResult {\n const copyButtonClasses = LitHtml.Directives.classMap({\n copied: this.#copied,\n 'copy-button': true,\n });\n\n // clang-format off\n return LitHtml.html`\n \n `;\n // clang-format on\n }\n\n #renderToolbar(): LitHtml.TemplateResult {\n // clang-format off\n return LitHtml.html`
\n
${this.#codeLang}
\n
\n ${this.#renderCopyButton()}\n
\n
`;\n // clang-format on\n }\n\n #renderNotice(): LitHtml.TemplateResult {\n // clang-format off\n return LitHtml.html`

\n \n ${i18nString(UIStrings.disclaimer)}\n \n

`;\n // clang-format on\n }\n\n #renderHeading(): LitHtml.LitTemplate {\n if (!this.#heading) {\n return LitHtml.nothing;\n }\n\n // clang-format off\n return LitHtml.html`\n
\n

${this.#heading.text}

\n ${this.#heading.showCopyButton ? LitHtml.html`
\n ${this.#renderCopyButton({ noText: true })}\n
` : LitHtml.nothing}\n
\n `;\n // clang-format on\n }\n\n #render(): void {\n // clang-format off\n LitHtml.render(LitHtml.html`
\n ${this.#displayToolbar ? this.#renderToolbar() : LitHtml.nothing}\n
\n ${this.#heading ? this.#renderHeading() : LitHtml.nothing}\n
\n <${TextEditor.TextEditor.TextEditor.litTagName} .state=${\n this.#editorState\n }>\n
\n
\n ${this.#displayNotice ? this.#renderNotice() : LitHtml.nothing}\n
`, this.#shadow, {\n host: this,\n });\n // clang-format on\n\n const editor = this.#shadow?.querySelector('devtools-text-editor')?.editor;\n\n if (!editor) {\n return;\n }\n let language = CodeMirror.html.html({autoCloseTags: false, selfClosingTags: true});\n switch (this.#codeLang) {\n case 'js':\n language = CodeMirror.javascript.javascript();\n break;\n case 'ts':\n language = CodeMirror.javascript.javascript({typescript: true});\n break;\n case 'jsx':\n language = CodeMirror.javascript.javascript({jsx: true});\n break;\n case 'css':\n language = CodeMirror.css.css();\n break;\n }\n editor.dispatch({\n effects: this.#languageConf.reconfigure(language),\n });\n }\n}\n\ncustomElements.define('devtools-code-block', CodeBlock);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'devtools-code-block': CodeBlock;\n }\n}\n"]} \ No newline at end of file diff --git a/public/ui/components/markdown_view/MarkdownLinksMap.js b/public/ui/components/markdown_view/MarkdownLinksMap.js index d8cbe1b65..26d744a2c 100644 --- a/public/ui/components/markdown_view/MarkdownLinksMap.js +++ b/public/ui/components/markdown_view/MarkdownLinksMap.js @@ -53,16 +53,16 @@ export const markdownLinks = new Map([ ['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)) { + if (/^https:\/\/www\.chromestatus\.com\//.test(key)) { return key; } - if (/^https:\/\/developer\.chrome\.com\/blog\//.test(key)) { + if (/^https:\/\/developer\.chrome\.com\//.test(key)) { return key; } - if (/^https:\/\/developers\.google\.com\/web\//.test(key)) { + if (/^https:\/\/developers\.google\.com\//.test(key)) { return key; } - if (/^https:\/\/web\.dev\/learn\//.test(key)) { + if (/^https:\/\/web\.dev\//.test(key)) { return key; } const link = markdownLinks.get(key); diff --git a/public/ui/components/markdown_view/MarkdownLinksMap.js.map b/public/ui/components/markdown_view/MarkdownLinksMap.js.map index df27c308e..d78208192 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,yEAAyE,CAAC;CACjH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAAW,EAAU,EAAE;IACrD,IAAI,kDAAkD,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACjE,OAAO,GAAG,CAAC;IACb,CAAC;IACD,IAAI,2CAA2C,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAC1D,OAAO,GAAG,CAAC;IACb,CAAC;IACD,IAAI,2CAA2C,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAC1D,OAAO,GAAG,CAAC;IACb,CAAC;IACD,IAAI,8BAA8B,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAC7C,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 if (/^https:\\/\\/developer\\.chrome\\.com\\/blog\\//.test(key)) {\n return key;\n }\n if (/^https:\\/\\/developers\\.google\\.com\\/web\\//.test(key)) {\n return key;\n }\n if (/^https:\\/\\/web\\.dev\\/learn\\//.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,C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O,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\\//.test(key)) {\n return key;\n }\n if (/^https:\\/\\/developer\\.chrome\\.com\\//.test(key)) {\n return key;\n }\n if (/^https:\\/\\/developers\\.google\\.com\\//.test(key)) {\n return key;\n }\n if (/^https:\\/\\/web\\.dev\\//.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/codeBlock.css.js b/public/ui/components/markdown_view/codeBlock.css.js index afdcf7887..6d33212e6 100644 --- a/public/ui/components/markdown_view/codeBlock.css.js +++ b/public/ui/components/markdown_view/codeBlock.css.js @@ -17,6 +17,14 @@ styles.replaceSync( box-sizing: border-box; } +:host { + /** + Adjusts the max height of the code area. + This can be changed from outside by targeting \\'devtools-code-block\\' element. + */ + --max-code-height: none; +} + code { color: var(--sys-color-on-surface); font-size: 11px; @@ -26,38 +34,68 @@ code { } .codeblock { - margin-bottom: 8px; + margin-bottom: var(--sys-size-5); box-sizing: border-box; - border-radius: 4px; - background-color: var(--sys-color-surface5); color: var(--sys-color-on-surface); } .codeblock .toolbar { + border-top-left-radius: var(--sys-shape-corner-extra-small); + border-top-right-radius: var(--sys-shape-corner-extra-small); box-sizing: border-box; display: flex; - height: 28px; + height: var(--sys-size-12); flex-direction: row; padding: 0 11px; font-size: 11px; font-style: normal; font-weight: 400; - line-height: 16px; + line-height: var(--sys-size-8); + background-color: var(--sys-color-surface5); } .codeblock .editor-wrapper { color: var(--sys-color-on-surface); background: var(--sys-color-surface1); - padding: 10px 5px; + padding: 10px 5px 0; + border-bottom-left-radius: var(--sys-shape-corner-extra-small); + border-bottom-right-radius: var(--sys-shape-corner-extra-small); +} + +.codeblock .editor-wrapper:has(.heading) { + padding: var(--sys-size-3) var(--sys-size-4) 0 5px; +} + +.codeblock:not(:has(.toolbar)) .editor-wrapper { + border-radius: var(--sys-shape-corner-extra-small); +} + +.codeblock .editor-wrapper .code { + max-height: var(--max-code-height); + overflow: auto; + padding-bottom: 10px; +} + +.heading { + display: flex; + justify-content: space-between; + align-items: center; + height: var(--sys-size-11); +} + +.heading-text { + font: var(--sys-typescale-body5-bold); + padding-left: var(--sys-size-4); + padding-right: var(--sys-size-2); } .codeblock .lang { - padding: 6px 0; + padding: var(--sys-size-4) 0; flex: 1; } .codeblock .copy { - padding: 4px 0; + padding: var(--sys-size-3) 0; align-items: center; display: flex; } @@ -72,20 +110,31 @@ code { display: flex; flex-direction: row; align-items: center; - gap: 4px; + gap: var(--sys-size-3); + + devtools-icon { + width: var(--sys-size-8); + height: var(--sys-size-8); + color: var(--icon-default); + } } .codeblock .copy-button.copied { color: var(--sys-color-primary); - --copy-icon-color: var(--sys-color-primary); + devtools-icon { + color: var(--sys-color-primary); + } } .notice { - margin-top: 3px; - margin-left: 3px; + margin-top: var(--sys-size-2); + padding: var(--sys-size-4) var(--sys-size-5); + background-color: var(--sys-color-surface1); + border-radius: var(--sys-shape-corner-extra-small); .link { + font: var(--sys-typescale-body4-regular); color: var(--sys-color-primary); text-decoration-line: underline; } diff --git a/public/ui/components/markdown_view/markdownView.css.js b/public/ui/components/markdown_view/markdownView.css.js index 4553993d2..25adbad1d 100644 --- a/public/ui/components/markdown_view/markdownView.css.js +++ b/public/ui/components/markdown_view/markdownView.css.js @@ -11,6 +11,10 @@ styles.replaceSync( * found in the LICENSE file. */ +:host { + --code-background-color: var(--sys-color-surface4); +} + .message { line-height: 18px; font-size: 12px; @@ -44,7 +48,8 @@ styles.replaceSync( font-size: 11px; user-select: text; cursor: text; - background-color: var(--sys-color-surface4); + /* This is still using design tokens because \\'--code-background-color\\' is defined with them by default */ + background-color: var(--code-background-color); /* stylelint-disable-line plugin/use_theme_colors */ border-radius: 2px; padding: 1px 3px; } diff --git a/public/ui/components/settings/SettingCheckbox.d.ts b/public/ui/components/settings/SettingCheckbox.d.ts index 66996995e..d05051024 100644 --- a/public/ui/components/settings/SettingCheckbox.d.ts +++ b/public/ui/components/settings/SettingCheckbox.d.ts @@ -1,4 +1,5 @@ import type * as Common from '../../../core/common/common.js'; +import * as LitHtml from '../../lit-html/lit-html.js'; export interface SettingCheckboxData { setting: Common.Settings.Setting; textOverride?: string; @@ -11,6 +12,7 @@ export declare class SettingCheckbox extends HTMLElement { static readonly litTagName: import("../../lit-html/static.js").Static; connectedCallback(): void; set data(data: SettingCheckboxData); + icon(): LitHtml.TemplateResult | undefined; } declare global { interface HTMLElementTagNameMap { diff --git a/public/ui/components/settings/SettingCheckbox.js b/public/ui/components/settings/SettingCheckbox.js index f5f49c705..62f652e63 100644 --- a/public/ui/components/settings/SettingCheckbox.js +++ b/public/ui/components/settings/SettingCheckbox.js @@ -1,9 +1,10 @@ // Copyright 2021 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 Host from '../../../core/host/host.js'; import * as LitHtml from '../../lit-html/lit-html.js'; import * as VisualLogging from '../../visual_logging/visual_logging.js'; -import * as IconButton from '../icon_button/icon_button.js'; +import * as Buttons from '../buttons/buttons.js'; import * as Input from '../input/input.js'; import settingCheckboxStyles from './settingCheckbox.css.js'; import { SettingDeprecationWarning } from './SettingDeprecationWarning.js'; @@ -30,20 +31,30 @@ export class SettingCheckbox extends HTMLElement { }); this.#render(); } - #deprecationIcon() { - if (!this.#setting?.deprecation) { + icon() { + if (!this.#setting) { return undefined; } - return LitHtml.html `<${SettingDeprecationWarning.litTagName} .data=${this.#setting.deprecation}>`; + if (this.#setting.deprecation) { + return LitHtml.html `<${SettingDeprecationWarning.litTagName} .data=${this.#setting.deprecation}>`; + } + const learnMore = this.#setting.learnMore(); + if (learnMore) { + const jslog = VisualLogging.link() + .track({ click: true, keydown: 'Enter|Space' }) + .context(this.#setting.name + '-documentation'); + return LitHtml.html `<${Buttons.Button.Button.litTagName} .iconName=${'help'} .size=${"SMALL" /* Buttons.Button.Size.SMALL */} .variant=${"icon" /* Buttons.Button.Variant.ICON */} .title=${learnMore.tooltip()} jslog=${jslog} @click=${() => Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(learnMore.url)} class="learn-more">`; + } + return undefined; } #render() { if (!this.#setting) { throw new Error('No "Setting" object provided for rendering'); } - const icon = this.#deprecationIcon(); + const icon = this.icon(); const reason = this.#setting.disabledReason() ? LitHtml.html ` - <${IconButton.Icon.Icon.litTagName} class="disabled-reason" name="info" title=${this.#setting.disabledReason()} @click=${onclick}> + <${Buttons.Button.Button.litTagName} class="disabled-reason" .iconName=${'info'} .variant=${"icon" /* Buttons.Button.Variant.ICON */} .size=${"SMALL" /* Buttons.Button.Size.SMALL */} title=${this.#setting.disabledReason()} @click=${onclick}> ` : LitHtml.nothing; LitHtml.render(LitHtml.html ` @@ -57,8 +68,9 @@ export class SettingCheckbox extends HTMLElement { jslog=${VisualLogging.toggle().track({ click: true }).context(this.#setting.name)} aria-label=${this.#setting.title()} /> - ${this.#textOverride || this.#setting.title()}${reason}${icon} + ${this.#textOverride || this.#setting.title()}${reason} + ${icon}

`, this.#shadow, { host: this }); } #checkboxChanged(e) { diff --git a/public/ui/components/settings/SettingCheckbox.js.map b/public/ui/components/settings/SettingCheckbox.js.map index 749d36757..f14898c3a 100644 --- a/public/ui/components/settings/SettingCheckbox.js.map +++ b/public/ui/components/settings/SettingCheckbox.js.map @@ -1 +1 @@ -{"version":3,"file":"SettingCheckbox.js","sourceRoot":"","sources":["../../../../../../../front_end/ui/components/settings/SettingCheckbox.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAG7B,OAAO,KAAK,OAAO,MAAM,4BAA4B,CAAC;AACtD,OAAO,KAAK,aAAa,MAAM,wCAAwC,CAAC;AACxE,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAE3C,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAC,yBAAyB,EAAC,MAAM,gCAAgC,CAAC;AAOzE;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,WAAW;IAC9C,MAAM,CAAU,UAAU,GAAG,OAAO,CAAC,OAAO,CAAA,kBAAkB,CAAC;IACtD,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC,CAAC;IAErD,QAAQ,CAAoC;IAC5C,yBAAyB,CAAsC;IAC/D,aAAa,CAAU;IAEvB,iBAAiB;QACf,IAAI,CAAC,OAAO,CAAC,kBAAkB,GAAG,CAAC,KAAK,CAAC,cAAc,EAAE,qBAAqB,CAAC,CAAC;IAClF,CAAC;IAED,IAAI,IAAI,CAAC,IAAyB;QAChC,IAAI,IAAI,CAAC,yBAAyB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YACpD,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,IAAI,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAC;QAC9E,CAAC;QAED,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,YAAY,CAAC;QAEv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CAAC,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;yBAClE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;;YAElC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,MAAM,GAAG,IAAI;;WAE5D,EACH,IAAI,CAAC,OAAO,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC;IAClC,CAAC;IAED,gBAAgB,CAAC,CAAQ;QACvB,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,OAAO,CAAC,CAAC;QAC3D,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,QAAQ,EAAE;YAC3C,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,KAAK;SAChB,CAAC,CAAC,CAAC;IACN,CAAC;;AAGH,cAAc,CAAC,MAAM,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAC","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Common from '../../../core/common/common.js';\nimport * as LitHtml from '../../lit-html/lit-html.js';\nimport * as VisualLogging from '../../visual_logging/visual_logging.js';\nimport * as IconButton from '../icon_button/icon_button.js';\nimport * as Input from '../input/input.js';\n\nimport settingCheckboxStyles from './settingCheckbox.css.js';\nimport {SettingDeprecationWarning} from './SettingDeprecationWarning.js';\n\nexport interface SettingCheckboxData {\n setting: Common.Settings.Setting;\n textOverride?: string;\n}\n\n/**\n * A simple checkbox that is backed by a boolean setting.\n */\nexport class SettingCheckbox extends HTMLElement {\n static readonly litTagName = LitHtml.literal`setting-checkbox`;\n readonly #shadow = this.attachShadow({mode: 'open'});\n\n #setting?: Common.Settings.Setting;\n #changeListenerDescriptor?: Common.EventTarget.EventDescriptor;\n #textOverride?: string;\n\n connectedCallback(): void {\n this.#shadow.adoptedStyleSheets = [Input.checkboxStyles, settingCheckboxStyles];\n }\n\n set data(data: SettingCheckboxData) {\n if (this.#changeListenerDescriptor && this.#setting) {\n this.#setting.removeChangeListener(this.#changeListenerDescriptor.listener);\n }\n\n this.#setting = data.setting;\n this.#textOverride = data.textOverride;\n\n this.#changeListenerDescriptor = this.#setting.addChangeListener(() => {\n this.#render();\n });\n this.#render();\n }\n\n #deprecationIcon(): LitHtml.TemplateResult|undefined {\n if (!this.#setting?.deprecation) {\n return undefined;\n }\n\n return LitHtml.html`<${SettingDeprecationWarning.litTagName} .data=${\n this.#setting.deprecation as Common.Settings.Deprecation}>`;\n }\n\n #render(): void {\n if (!this.#setting) {\n throw new Error('No \"Setting\" object provided for rendering');\n }\n\n const icon = this.#deprecationIcon();\n const reason = this.#setting.disabledReason() ?\n LitHtml.html`\n <${IconButton.Icon.Icon.litTagName} class=\"disabled-reason\" name=\"info\" title=${\n this.#setting.disabledReason()} @click=${onclick}>\n ` :\n LitHtml.nothing;\n LitHtml.render(\n LitHtml.html`\n

\n \n

`,\n this.#shadow, {host: this});\n }\n\n #checkboxChanged(e: Event): void {\n this.#setting?.set((e.target as HTMLInputElement).checked);\n this.dispatchEvent(new CustomEvent('change', {\n bubbles: true,\n composed: false,\n }));\n }\n}\n\ncustomElements.define('setting-checkbox', SettingCheckbox);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'setting-checkbox': SettingCheckbox;\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"SettingCheckbox.js","sourceRoot":"","sources":["../../../../../../../front_end/ui/components/settings/SettingCheckbox.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAG7B,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,KAAK,OAAO,MAAM,4BAA4B,CAAC;AACtD,OAAO,KAAK,aAAa,MAAM,wCAAwC,CAAC;AACxE,OAAO,KAAK,OAAO,MAAM,uBAAuB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CAAC,MAAM,CAAC,MAAM,CAAC,UAAU;KAC7F,CAAC,CAAC;YACC,OAAO,CAAC,OAAO,CAAC;QACpB,OAAO,CAAC,MAAM,CACV,OAAO,CAAC,IAAI,CAAA;;;;;uBAKG,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;wBAC3D,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE;sBAC1B,IAAI,CAAC,gBAAgB;oBACvB,aAAa,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;yBAClE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;;YAElC,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,MAAM;;UAEtD,IAAI;WACH,EACH,IAAI,CAAC,OAAO,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC;IAClC,CAAC;IAED,gBAAgB,CAAC,CAAQ;QACvB,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,OAAO,CAAC,CAAC;QAC3D,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,QAAQ,EAAE;YAC3C,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,KAAK;SAChB,CAAC,CAAC,CAAC;IACN,CAAC;;AAGH,cAAc,CAAC,MAAM,CAAC,kBAAkB,EAAE,eAAe,CAAC,CAAC","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport type * as Common from '../../../core/common/common.js';\nimport * as Host from '../../../core/host/host.js';\nimport * as LitHtml from '../../lit-html/lit-html.js';\nimport * as VisualLogging from '../../visual_logging/visual_logging.js';\nimport * as Buttons from '../buttons/buttons.js';\nimport * as Input from '../input/input.js';\n\nimport settingCheckboxStyles from './settingCheckbox.css.js';\nimport {SettingDeprecationWarning} from './SettingDeprecationWarning.js';\n\nexport interface SettingCheckboxData {\n setting: Common.Settings.Setting;\n textOverride?: string;\n}\n\n/**\n * A simple checkbox that is backed by a boolean setting.\n */\nexport class SettingCheckbox extends HTMLElement {\n static readonly litTagName = LitHtml.literal`setting-checkbox`;\n readonly #shadow = this.attachShadow({mode: 'open'});\n\n #setting?: Common.Settings.Setting;\n #changeListenerDescriptor?: Common.EventTarget.EventDescriptor;\n #textOverride?: string;\n\n connectedCallback(): void {\n this.#shadow.adoptedStyleSheets = [Input.checkboxStyles, settingCheckboxStyles];\n }\n\n set data(data: SettingCheckboxData) {\n if (this.#changeListenerDescriptor && this.#setting) {\n this.#setting.removeChangeListener(this.#changeListenerDescriptor.listener);\n }\n\n this.#setting = data.setting;\n this.#textOverride = data.textOverride;\n\n this.#changeListenerDescriptor = this.#setting.addChangeListener(() => {\n this.#render();\n });\n this.#render();\n }\n\n icon(): LitHtml.TemplateResult|undefined {\n if (!this.#setting) {\n return undefined;\n }\n\n if (this.#setting.deprecation) {\n return LitHtml.html`<${SettingDeprecationWarning.litTagName} .data=${\n this.#setting.deprecation as Common.Settings.Deprecation}>`;\n }\n\n const learnMore = this.#setting.learnMore();\n if (learnMore) {\n const jslog = VisualLogging.link()\n .track({click: true, keydown: 'Enter|Space'})\n .context(this.#setting.name + '-documentation');\n return LitHtml.html`<${Buttons.Button.Button.litTagName} .iconName=${'help'} .size=${\n Buttons.Button.Size.SMALL} .variant=${Buttons.Button.Variant.ICON} .title=${learnMore.tooltip()} jslog=${\n jslog} @click=${\n () => Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(\n learnMore.url)} class=\"learn-more\">`;\n }\n\n return undefined;\n }\n\n #render(): void {\n if (!this.#setting) {\n throw new Error('No \"Setting\" object provided for rendering');\n }\n\n const icon = this.icon();\n const reason = this.#setting.disabledReason() ?\n LitHtml.html`\n <${Buttons.Button.Button.litTagName} class=\"disabled-reason\" .iconName=${'info'} .variant=${\n Buttons.Button.Variant.ICON} .size=${Buttons.Button.Size.SMALL} title=${\n this.#setting.disabledReason()} @click=${onclick}>\n ` :\n LitHtml.nothing;\n LitHtml.render(\n LitHtml.html`\n

\n \n ${icon}\n

`,\n this.#shadow, {host: this});\n }\n\n #checkboxChanged(e: Event): void {\n this.#setting?.set((e.target as HTMLInputElement).checked);\n this.dispatchEvent(new CustomEvent('change', {\n bubbles: true,\n composed: false,\n }));\n }\n}\n\ncustomElements.define('setting-checkbox', SettingCheckbox);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'setting-checkbox': SettingCheckbox;\n }\n}\n"]} \ No newline at end of file diff --git a/public/ui/components/settings/SettingCheckbox.test.js b/public/ui/components/settings/SettingCheckbox.test.js index e637afd97..ee584e90d 100644 --- a/public/ui/components/settings/SettingCheckbox.test.js +++ b/public/ui/components/settings/SettingCheckbox.test.js @@ -92,7 +92,7 @@ describe('SettingCheckbox', () => { }, }); const { component } = renderSettingCheckbox({ setting }); - assert.strictEqual(component.shadowRoot.querySelector('.disabled-reason').title, 'reason'); + assert.strictEqual(component.shadowRoot.querySelector('.disabled-reason').getAttribute('title'), 'reason'); }); it('is disabled for a disabled deprecated settings', () => { const setting = createFakeSetting('setting', false); diff --git a/public/ui/components/settings/SettingCheckbox.test.js.map b/public/ui/components/settings/SettingCheckbox.test.js.map index d609db8ec..f5c3a2573 100644 --- a/public/ui/components/settings/SettingCheckbox.test.js.map +++ b/public/ui/components/settings/SettingCheckbox.test.js.map @@ -1 +1 @@ -{"version":3,"file":"SettingCheckbox.test.js","sourceRoot":"","sources":["../../../../../../../front_end/ui/components/settings/SettingCheckbox.test.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,gCAAgC,CAAC;AAEzD,OAAO,K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AE,KAAK,CAAC,CAAC;QAC7D,OAAO,CAAC,eAAe,CAAC;YACtB,WAAW,EAAE,SAAS;YACtB,WAAW,qDAAqC;YAChD,YAAY,EAAE,KAAK;YACnB,iBAAiB,EAAE;gBACjB,OAAO,EAAE,GAAG,EAAE,CAAC,oBAAyD;gBACxE,QAAQ,EAAE,IAAI;gBACd,UAAU;aACX;SACF,CAAC,CAAC;QAEH,MAAM,EAAC,QAAQ,EAAC,GAAG,qBAAqB,CAAC,EAAC,OAAO,EAAC,CAAC,CAAC;QACpD,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;QACxD,MAAM,OAAO,GAAG,iBAAiB,CAAU,SAAS,EAAE,KAAK,CAAC,CAAC;QAC7D,OAAO,CAAC,eAAe,CAAC;YACtB,WAAW,EAAE,SAAS;YACtB,WAAW,qDAAqC;YAChD,YAAY,EAAE,KAAK;YACnB,iBAAiB,EAAE;gBACjB,OAAO,EAAE,GAAG,EAAE,CAAC,oBAAyD;gBACxE,QAAQ,EAAE,KAAK;aAChB;SACF,CAAC,CAAC;QAEH,MAAM,EAAC,QAAQ,EAAC,GAAG,qBAAqB,CAAC,EAAC,OAAO,EAAC,CAAC,CAAC;QACpD,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../../core/common/common.js';\nimport type * as Platform from '../../../core/platform/platform.js';\nimport * as Root from '../../../core/root/root.js';\nimport {\n renderElementIntoDOM,\n} from '../../../testing/DOMHelpers.js';\nimport {createFakeSetting, stubNoopSettings} from '../../../testing/EnvironmentHelpers.js';\n\nimport * as Settings from './settings.js';\n\nfunction renderSettingCheckbox(data: Settings.SettingCheckbox.SettingCheckboxData):\n {component: Settings.SettingCheckbox.SettingCheckbox, checkbox: HTMLInputElement} {\n const component = new Settings.SettingCheckbox.SettingCheckbox();\n component.data = data;\n renderElementIntoDOM(component);\n assert.isNotNull(component.shadowRoot);\n\n const checkbox = component.shadowRoot.querySelector('input');\n assert.instanceOf(checkbox, HTMLInputElement);\n\n return {component, checkbox};\n}\n\ndescribe('SettingCheckbox', () => {\n beforeEach(() => {\n Root.Runtime.experiments.clearForTest();\n });\n afterEach(() => {\n Root.Runtime.experiments.clearForTest();\n });\n\n it('renders the checkbox ticked when the setting is enabled', () => {\n const setting = createFakeSetting('setting', true);\n const {checkbox} = renderSettingCheckbox({setting});\n\n assert.isTrue(checkbox.checked);\n });\n\n it('renders the checkbox unticked when the setting is disabled', () => {\n const setting = createFakeSetting('setting', false);\n const {checkbox} = renderSettingCheckbox({setting});\n\n assert.isFalse(checkbox.checked);\n });\n\n it('updates the checkbox when the setting changes', () => {\n const setting = createFakeSetting('setting', true);\n const {checkbox} = renderSettingCheckbox({setting});\n\n setting.set(false);\n\n assert.isFalse(checkbox.checked);\n });\n\n it('can be reassigned to a different settings', () => {\n const setting1 = createFakeSetting('setting1', true);\n const setting2 = createFakeSetting('setting2', true);\n const {component, checkbox} = renderSettingCheckbox({setting: setting1});\n\n component.data = {setting: setting2};\n setting1.set(false);\n\n assert.isTrue(checkbox.checked);\n });\n\n it('changes the setting when the checkbox changes', () => {\n const setting = createFakeSetting('setting', false);\n const {checkbox} = renderSettingCheckbox({setting});\n\n checkbox.click();\n\n assert.isTrue(setting.get());\n });\n\n it('renders override text if provided', () => {\n const setting = createFakeSetting('setting', false);\n const {component} = renderSettingCheckbox({setting, textOverride: 'Text override'});\n\n assert.strictEqual(component.shadowRoot!.querySelector('label')!.innerText, 'Text override');\n });\n\n it('ignores clicks when disabled', () => {\n const setting = createFakeSetting('setting', false);\n setting.setDisabled(true);\n const {checkbox} = renderSettingCheckbox({setting});\n\n checkbox.click();\n\n assert.isFalse(setting.get());\n });\n\n it('can be disabled via registration', () => {\n stubNoopSettings();\n const setting = createFakeSetting('setting', false);\n setting.setRegistration({\n settingName: 'setting',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n disabledCondition: () => {\n return {disabled: true, reason: 'reason'};\n },\n });\n\n const {checkbox} = renderSettingCheckbox({setting});\n\n checkbox.click();\n\n assert.isFalse(setting.get());\n assert.isTrue(checkbox.disabled);\n });\n\n it('shows disabled reason', () => {\n stubNoopSettings();\n const setting = createFakeSetting('setting', false);\n setting.setRegistration({\n settingName: 'setting',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n disabledCondition: () => {\n return {disabled: true, reason: 'reason'};\n },\n });\n\n const {component} = renderSettingCheckbox({setting});\n\n assert.strictEqual((component.shadowRoot!.querySelector('.disabled-reason') as HTMLElement).title, 'reason');\n });\n\n it('is disabled for a disabled deprecated settings', () => {\n const setting = createFakeSetting('setting', false);\n setting.setRegistration({\n settingName: 'setting',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n deprecationNotice: {\n warning: () => 'Setting deprecated' as Platform.UIString.LocalizedString,\n disabled: true,\n },\n });\n\n const {checkbox} = renderSettingCheckbox({setting});\n assert.isTrue(checkbox.disabled);\n });\n\n it('is enabled for a disabled deprecated settings with enabled experiment', () => {\n const experiment = 'test-experiment';\n Root.Runtime.experiments.register(experiment, experiment);\n Root.Runtime.experiments.setEnabled(experiment, true);\n const setting = createFakeSetting('setting', false);\n setting.setRegistration({\n settingName: 'setting',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n deprecationNotice: {\n warning: () => 'Setting deprecated' as Platform.UIString.LocalizedString,\n disabled: true,\n experiment,\n },\n });\n\n const {checkbox} = renderSettingCheckbox({setting});\n assert.isTrue(checkbox.disabled);\n });\n\n it('is enabled for a disabled deprecated settings with disabled experiment', () => {\n const experiment = 'test-experiment';\n Root.Runtime.experiments.register(experiment, experiment);\n Root.Runtime.experiments.setEnabled(experiment, false);\n const setting = createFakeSetting('setting', false);\n setting.setRegistration({\n settingName: 'setting',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n deprecationNotice: {\n warning: () => 'Setting deprecated' as Platform.UIString.LocalizedString,\n disabled: true,\n experiment,\n },\n });\n\n const {checkbox} = renderSettingCheckbox({setting});\n assert.isFalse(checkbox.disabled);\n });\n\n it('is disabled for an enabled deprecated settings', () => {\n const setting = createFakeSetting('setting', false);\n setting.setRegistration({\n settingName: 'setting',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n deprecationNotice: {\n warning: () => 'Setting deprecated' as Platform.UIString.LocalizedString,\n disabled: false,\n },\n });\n\n const {checkbox} = renderSettingCheckbox({setting});\n assert.isFalse(checkbox.disabled);\n });\n});\n"]} \ No newline at end of file +{"version":3,"file":"SettingCheckbox.test.js","sourceRoot":"","sources":["../../../../../../../front_end/ui/components/settings/SettingCheckbox.test.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,MAAM,MAAM,gCAAgC,CAAC;AAEzD,OAAO,KAAK,IAAI,MAAM,4BAA4B,CAAC;AACnD,OAAO,EACL,oBAAoB,GACrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAC,iBAAiB,EAAE,gBAAgB,EAAC,MAAM,wCAAwC,CAAC;AAE3F,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAE1C,SAAS,qBAAqB,CAAC,IAAkD;IAE/E,MAAM,SAAS,GAAG,IAAI,QAAQ,CAAC,eAAe,CAAC,eAAe,EAAE,CAAC;IACjE,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC;IACtB,oBAAoB,CAAC,SAAS,CAAC,CAAC;IAChC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAEvC,MAAM,QAAQ,GAAG,SAAS,CAAC,UAAU,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AAO,GAAG,iBAAiB,CAAU,SAAS,EAAE,KAAK,CAAC,CAAC;QAC7D,OAAO,CAAC,eAAe,CAAC;YACtB,WAAW,EAAE,SAAS;YACtB,WAAW,qDAAqC;YAChD,YAAY,EAAE,KAAK;YACnB,iBAAiB,EAAE;gBACjB,OAAO,EAAE,GAAG,EAAE,CAAC,oBAAyD;gBACxE,QAAQ,EAAE,KAAK;aAChB;SACF,CAAC,CAAC;QAEH,MAAM,EAAC,QAAQ,EAAC,GAAG,qBAAqB,CAAC,EAAC,OAAO,EAAC,CAAC,CAAC;QACpD,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["// Copyright 2021 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../../core/common/common.js';\nimport type * as Platform from '../../../core/platform/platform.js';\nimport * as Root from '../../../core/root/root.js';\nimport {\n renderElementIntoDOM,\n} from '../../../testing/DOMHelpers.js';\nimport {createFakeSetting, stubNoopSettings} from '../../../testing/EnvironmentHelpers.js';\n\nimport * as Settings from './settings.js';\n\nfunction renderSettingCheckbox(data: Settings.SettingCheckbox.SettingCheckboxData):\n {component: Settings.SettingCheckbox.SettingCheckbox, checkbox: HTMLInputElement} {\n const component = new Settings.SettingCheckbox.SettingCheckbox();\n component.data = data;\n renderElementIntoDOM(component);\n assert.isNotNull(component.shadowRoot);\n\n const checkbox = component.shadowRoot.querySelector('input');\n assert.instanceOf(checkbox, HTMLInputElement);\n\n return {component, checkbox};\n}\n\ndescribe('SettingCheckbox', () => {\n beforeEach(() => {\n Root.Runtime.experiments.clearForTest();\n });\n afterEach(() => {\n Root.Runtime.experiments.clearForTest();\n });\n\n it('renders the checkbox ticked when the setting is enabled', () => {\n const setting = createFakeSetting('setting', true);\n const {checkbox} = renderSettingCheckbox({setting});\n\n assert.isTrue(checkbox.checked);\n });\n\n it('renders the checkbox unticked when the setting is disabled', () => {\n const setting = createFakeSetting('setting', false);\n const {checkbox} = renderSettingCheckbox({setting});\n\n assert.isFalse(checkbox.checked);\n });\n\n it('updates the checkbox when the setting changes', () => {\n const setting = createFakeSetting('setting', true);\n const {checkbox} = renderSettingCheckbox({setting});\n\n setting.set(false);\n\n assert.isFalse(checkbox.checked);\n });\n\n it('can be reassigned to a different settings', () => {\n const setting1 = createFakeSetting('setting1', true);\n const setting2 = createFakeSetting('setting2', true);\n const {component, checkbox} = renderSettingCheckbox({setting: setting1});\n\n component.data = {setting: setting2};\n setting1.set(false);\n\n assert.isTrue(checkbox.checked);\n });\n\n it('changes the setting when the checkbox changes', () => {\n const setting = createFakeSetting('setting', false);\n const {checkbox} = renderSettingCheckbox({setting});\n\n checkbox.click();\n\n assert.isTrue(setting.get());\n });\n\n it('renders override text if provided', () => {\n const setting = createFakeSetting('setting', false);\n const {component} = renderSettingCheckbox({setting, textOverride: 'Text override'});\n\n assert.strictEqual(component.shadowRoot!.querySelector('label')!.innerText, 'Text override');\n });\n\n it('ignores clicks when disabled', () => {\n const setting = createFakeSetting('setting', false);\n setting.setDisabled(true);\n const {checkbox} = renderSettingCheckbox({setting});\n\n checkbox.click();\n\n assert.isFalse(setting.get());\n });\n\n it('can be disabled via registration', () => {\n stubNoopSettings();\n const setting = createFakeSetting('setting', false);\n setting.setRegistration({\n settingName: 'setting',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n disabledCondition: () => {\n return {disabled: true, reason: 'reason'};\n },\n });\n\n const {checkbox} = renderSettingCheckbox({setting});\n\n checkbox.click();\n\n assert.isFalse(setting.get());\n assert.isTrue(checkbox.disabled);\n });\n\n it('shows disabled reason', () => {\n stubNoopSettings();\n const setting = createFakeSetting('setting', false);\n setting.setRegistration({\n settingName: 'setting',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n disabledCondition: () => {\n return {disabled: true, reason: 'reason'};\n },\n });\n\n const {component} = renderSettingCheckbox({setting});\n\n assert.strictEqual(\n (component.shadowRoot!.querySelector('.disabled-reason') as HTMLElement).getAttribute('title'), 'reason');\n });\n\n it('is disabled for a disabled deprecated settings', () => {\n const setting = createFakeSetting('setting', false);\n setting.setRegistration({\n settingName: 'setting',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n deprecationNotice: {\n warning: () => 'Setting deprecated' as Platform.UIString.LocalizedString,\n disabled: true,\n },\n });\n\n const {checkbox} = renderSettingCheckbox({setting});\n assert.isTrue(checkbox.disabled);\n });\n\n it('is enabled for a disabled deprecated settings with enabled experiment', () => {\n const experiment = 'test-experiment';\n Root.Runtime.experiments.register(experiment, experiment);\n Root.Runtime.experiments.setEnabled(experiment, true);\n const setting = createFakeSetting('setting', false);\n setting.setRegistration({\n settingName: 'setting',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n deprecationNotice: {\n warning: () => 'Setting deprecated' as Platform.UIString.LocalizedString,\n disabled: true,\n experiment,\n },\n });\n\n const {checkbox} = renderSettingCheckbox({setting});\n assert.isTrue(checkbox.disabled);\n });\n\n it('is enabled for a disabled deprecated settings with disabled experiment', () => {\n const experiment = 'test-experiment';\n Root.Runtime.experiments.register(experiment, experiment);\n Root.Runtime.experiments.setEnabled(experiment, false);\n const setting = createFakeSetting('setting', false);\n setting.setRegistration({\n settingName: 'setting',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n deprecationNotice: {\n warning: () => 'Setting deprecated' as Platform.UIString.LocalizedString,\n disabled: true,\n experiment,\n },\n });\n\n const {checkbox} = renderSettingCheckbox({setting});\n assert.isFalse(checkbox.disabled);\n });\n\n it('is disabled for an enabled deprecated settings', () => {\n const setting = createFakeSetting('setting', false);\n setting.setRegistration({\n settingName: 'setting',\n settingType: Common.Settings.SettingType.BOOLEAN,\n defaultValue: false,\n deprecationNotice: {\n warning: () => 'Setting deprecated' as Platform.UIString.LocalizedString,\n disabled: false,\n },\n });\n\n const {checkbox} = renderSettingCheckbox({setting});\n assert.isFalse(checkbox.disabled);\n });\n});\n"]} \ No newline at end of file diff --git a/public/ui/components/settings/settingCheckbox.css.js b/public/ui/components/settings/settingCheckbox.css.js index 056f999f6..1858f4072 100644 --- a/public/ui/components/settings/settingCheckbox.css.js +++ b/public/ui/components/settings/settingCheckbox.css.js @@ -37,9 +37,17 @@ p { .disabled-reason { box-sizing: border-box; - margin-left: 3px; - width: 16px; - height: 16px; + margin-left: var(--sys-size-2); + width: var(--sys-size-9); + height: var(--sys-size-9); +} + +.learn-more { + position: relative; + margin-left: var(--sys-size-2); + top: var(--sys-size-2); + width: var(--sys-size-9); + height: var(--sys-size-9); } /*# sourceURL=settingCheckbox.css */ diff --git a/public/ui/components/settings/settings-tsconfig.json b/public/ui/components/settings/settings-tsconfig.json index d6ba4d72c..12b103b77 100644 --- a/public/ui/components/settings/settings-tsconfig.json +++ b/public/ui/components/settings/settings-tsconfig.json @@ -46,10 +46,10 @@ "path": "../../visual_logging/bundle-tsconfig.json" }, { - "path": "../helpers/bundle-tsconfig.json" + "path": "../buttons/bundle-tsconfig.json" }, { - "path": "../icon_button/bundle-tsconfig.json" + "path": "../helpers/bundle-tsconfig.json" }, { "path": "../input/bundle-tsconfig.json" diff --git a/public/ui/components/spinners/Spinner.d.ts b/public/ui/components/spinners/Spinner.d.ts new file mode 100644 index 000000000..8f753bc49 --- /dev/null +++ b/public/ui/components/spinners/Spinner.d.ts @@ -0,0 +1,10 @@ +export declare class Spinner extends HTMLElement { + #private; + static readonly litTagName: import("../../lit-html/static.js").Static; + connectedCallback(): void; +} +declare global { + interface HTMLElementTagNameMap { + 'devtools-spinner': Spinner; + } +} diff --git a/public/ui/components/spinners/Spinner.js b/public/ui/components/spinners/Spinner.js new file mode 100644 index 000000000..98f5071c3 --- /dev/null +++ b/public/ui/components/spinners/Spinner.js @@ -0,0 +1,41 @@ +// Copyright 2024 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 LitHtml from '../../lit-html/lit-html.js'; +import spinnerStyles from './spinner.css.js'; +export class Spinner extends HTMLElement { + static litTagName = LitHtml.literal `devtools-spinner`; + #shadow = this.attachShadow({ mode: 'open' }); + connectedCallback() { + this.#shadow.adoptedStyleSheets = [spinnerStyles]; + this.#render(); + } + #render() { + // The radius of the circles are set to 2.75rem as per implementation + // of indeterminate progress indicator in + // https://github.com/material-components/material-components-web/tree/master/packages/mdc-circular-progress. + // Changing the value of the radius will cause errors in animation. + // clang-format off + LitHtml.render(LitHtml.html ` +
+
+ + +
+
+ + +
+
+ + +
+
+ `, this.#shadow, { + host: this, + }); + // clang-format on + } +} +customElements.define('devtools-spinner', Spinner); +//# sourceMappingURL=Spinner.js.map \ No newline at end of file diff --git a/public/ui/components/spinners/Spinner.js.map b/public/ui/components/spinners/Spinner.js.map new file mode 100644 index 000000000..a008bd8ad --- /dev/null +++ b/public/ui/components/spinners/Spinner.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Spinner.js","sourceRoot":"","sources":["../../../../../../../front_end/ui/components/spinners/Spinner.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,OAAO,MAAM,4BAA4B,CAAC;AAEtD,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC,MAAM,CAAU,UAAU,GAAG,OAAO,CAAC,OAAO,CAAA,kBAAkB,CAAC;IACtD,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC,CAAC;IAErD,iBAAiB;QACf,IAAI,CAAC,OAAO,CAAC,kBAAkB,GAAG,CAAC,aAAa,CAAC,CAAC;QAClD,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,OAAO;QACL,qEAAqE;QACrE,yCAAyC;QACzC,6GAA6G;QAC7G,mEAAmE;QACnE,mBAAmB;QACnB,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;KAe1B,EAAE,IAAI,CAAC,OAAO,EAAE;YACf,IAAI,EAAE,IAAI;SACX,CAAC,CAAC;QACH,kBAAkB;IACpB,CAAC;;AAGH,cAAc,CAAC,MAAM,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC","sourcesContent":["// Copyright 2024 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 LitHtml from '../../lit-html/lit-html.js';\n\nimport spinnerStyles from './spinner.css.js';\n\nexport class Spinner extends HTMLElement {\n static readonly litTagName = LitHtml.literal`devtools-spinner`;\n readonly #shadow = this.attachShadow({mode: 'open'});\n\n connectedCallback(): void {\n this.#shadow.adoptedStyleSheets = [spinnerStyles];\n this.#render();\n }\n\n #render(): void {\n // The radius of the circles are set to 2.75rem as per implementation\n // of indeterminate progress indicator in\n // https://github.com/material-components/material-components-web/tree/master/packages/mdc-circular-progress.\n // Changing the value of the radius will cause errors in animation.\n // clang-format off\n LitHtml.render(LitHtml.html`\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n `, this.#shadow, {\n host: this,\n });\n // clang-format on\n }\n}\n\ncustomElements.define('devtools-spinner', Spinner);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'devtools-spinner': Spinner;\n }\n}\n"]} \ No newline at end of file diff --git a/public/ui/components/spinners/bundle-tsconfig.json b/public/ui/components/spinners/bundle-tsconfig.json new file mode 100644 index 000000000..72d3efbc9 --- /dev/null +++ b/public/ui/components/spinners/bundle-tsconfig.json @@ -0,0 +1 @@ +{"compilerOptions":{"composite":true,"outDir":".","baseUrl":".","rootDir":"../../../../../../../front_end/ui/components/spinners"},"files":["../../../../../../../front_end/ui/components/spinners/spinners.ts"],"references":[{"path":"./css_files-tsconfig.json"},{"path":"./spinner-tsconfig.json"}]} \ No newline at end of file diff --git a/public/ui/components/spinners/css_files-tsconfig.json b/public/ui/components/spinners/css_files-tsconfig.json new file mode 100644 index 000000000..187866e05 --- /dev/null +++ b/public/ui/components/spinners/css_files-tsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "composite": true, + "outDir": "." + }, + "files": [ + "spinner.css.js" + ] +} diff --git a/public/ui/components/spinners/devtools_entrypoint-bundle-typescript-tsconfig.json b/public/ui/components/spinners/devtools_entrypoint-bundle-typescript-tsconfig.json new file mode 100644 index 000000000..c1b99510f --- /dev/null +++ b/public/ui/components/spinners/devtools_entrypoint-bundle-typescript-tsconfig.json @@ -0,0 +1,45 @@ +{ + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "composite": true, + "declaration": true, + "experimentalDecorators": true, + "forceConsistentCasingInFileNames": true, + "inlineSources": true, + "lib": [ + "esnext", + "dom", + "dom.iterable" + ], + "module": "esnext", + "noEmitOnError": true, + "noFallthroughCasesInSwitch": true, + "noImplicitOverride": true, + "noImplicitReturns": true, + "noUnusedLocals": false, + "outDir": ".", + "rootDir": "../../../../../../../front_end/ui/components/spinners", + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "target": "esnext", + "tsBuildInfoFile": "devtools_entrypoint-bundle-typescript-tsconfig.json.tsbuildinfo", + "typeRoots": [], + "useUnknownInCatchVariables": false + }, + "files": [ + "../../../../../../../front_end/ui/components/spinners/spinners.ts", + "../../../../../../../front_end/legacy/legacy-defs.d.ts", + "../../../../../../../front_end/global_typings/global_defs.d.ts", + "../../../../../../../node_modules/@types/filesystem/index.d.ts" + ], + "references": [ + { + "path": "./css_files-tsconfig.json" + }, + { + "path": "./spinner-tsconfig.json" + } + ] +} \ No newline at end of file diff --git a/public/ui/components/spinners/spinner-tsconfig.json b/public/ui/components/spinners/spinner-tsconfig.json new file mode 100644 index 000000000..d0db2a721 --- /dev/null +++ b/public/ui/components/spinners/spinner-tsconfig.json @@ -0,0 +1,42 @@ +{ + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "composite": true, + "declaration": true, + "experimentalDecorators": true, + "forceConsistentCasingInFileNames": true, + "inlineSources": true, + "lib": [ + "esnext", + "dom", + "dom.iterable" + ], + "module": "esnext", + "noEmitOnError": true, + "noFallthroughCasesInSwitch": true, + "noImplicitOverride": true, + "noImplicitReturns": true, + "noUnusedLocals": false, + "outDir": ".", + "rootDir": "../../../../../../../front_end/ui/components/spinners", + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "target": "esnext", + "tsBuildInfoFile": "spinner-tsconfig.json.tsbuildinfo", + "typeRoots": [], + "useUnknownInCatchVariables": false + }, + "files": [ + "../../../../../../../front_end/ui/components/spinners/Spinner.ts", + "../../../../../../../front_end/legacy/legacy-defs.d.ts", + "../../../../../../../front_end/global_typings/global_defs.d.ts", + "../../../../../../../node_modules/@types/filesystem/index.d.ts" + ], + "references": [ + { + "path": "../../lit-html/bundle-tsconfig.json" + } + ] +} \ No newline at end of file diff --git a/public/ui/components/spinners/spinner.css.js b/public/ui/components/spinners/spinner.css.js new file mode 100644 index 000000000..81fdb1d5b --- /dev/null +++ b/public/ui/components/spinners/spinner.css.js @@ -0,0 +1,172 @@ +// Copyright 2024 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. +// IMPORTANT: this file is auto generated. Please do not edit this file. +/* istanbul ignore file */ +const styles = new CSSStyleSheet(); +styles.replaceSync( +`/* + * Copyright 2024 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. + */ + +:host { + width: var(--sys-size-7); + height: var(--sys-size-7); + display: inline-block; + font-size: 0; + letter-spacing: 0; + white-space: nowrap; + animation: spinner-container-animation 1.5s linear infinite; +} + +.indeterminate-spinner { + /* + * The value for animation duration has been obtained by plugging in values defined + * in packages/mdc-circular-progress/_circular-progress-theme.scss to + * functions defined in packages/mdc-circular-progress/_circular-progress.scss. + * https://github.com/material-components/material-components-web + */ + animation: indeterminate-spinner-animation 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both; + width: 100%; + height: 100%; +} + +.left-circle-graphic-container { + width: 50%; + height: 100%; + display: inline-block; + position: relative; + overflow: hidden; +} + +.left-circle-graphic { + width: 200%; + position: absolute; + /* + * The value for animation duration has been obtained from values defined + * in packages/mdc-circular-progress/_circular-progress-theme.scss + * https://github.com/material-components/material-components-web + */ + animation: indeterminate-left-circle-spinner-animation 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both; +} + +.center-circle-graphic-container { + width: 5%; + height: 100%; + display: inline-block; + position: absolute; + overflow: hidden; + top: 0; + left: 47.5%; + box-sizing: border-box; +} + +.center-circle-graphic { + width: 2000%; + position: absolute; + left: -900%; + transform: rotate(180deg); +} + +.right-circle-graphic-container { + width: 50%; + height: 100%; + display: inline-block; + position: relative; + overflow: hidden; +} + +.right-circle-graphic { + width: 200%; + position: absolute; + left: -100%; + /* + * The value for animation duration has been obtained from values defined + * in packages/mdc-circular-progress/_circular-progress-theme.scss + * https://github.com/material-components/material-components-web + */ + animation: indeterminate-right-circle-spinner-animation 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both; +} + +circle { + stroke: var(--sys-color-primary); + stroke-width: var(--sys-size-6); + fill: transparent; + stroke-dasharray: 290px; + stroke-dashoffset: 150px; +} + +@keyframes spinner-container-animation { + 100% { + transform: rotate(360deg); + } +} + +@keyframes indeterminate-spinner-animation { + 12.5% { + transform: rotate(135deg); + } + + 25% { + transform: rotate(270deg); + } + + 37.5% { + transform: rotate(405deg); + } + + 50% { + transform: rotate(540deg); + } + + 62.5% { + transform: rotate(675deg); + } + + 75% { + transform: rotate(810deg); + } + + 87.5% { + transform: rotate(945deg); + } + + 100% { + transform: rotate(1080deg); + } +} + +@keyframes indeterminate-left-circle-spinner-animation { + from { + transform: rotate(265deg); + } + + 50% { + transform: rotate(130deg); + } + + to { + transform: rotate(265deg); + } +} + +@keyframes indeterminate-right-circle-spinner-animation { + from { + transform: rotate(-265deg); + } + + 50% { + transform: rotate(-130deg); + } + + to { + transform: rotate(-265deg); + } +} + +/*# sourceURL=spinner.css */ +`); + +export default styles; diff --git a/public/ui/components/spinners/spinners.d.ts b/public/ui/components/spinners/spinners.d.ts new file mode 100644 index 000000000..2445116a6 --- /dev/null +++ b/public/ui/components/spinners/spinners.d.ts @@ -0,0 +1,2 @@ +import * as Spinner from './Spinner.js'; +export { Spinner, }; diff --git a/public/ui/components/spinners/spinners.js b/public/ui/components/spinners/spinners.js new file mode 100644 index 000000000..8fb6f0a74 --- /dev/null +++ b/public/ui/components/spinners/spinners.js @@ -0,0 +1,6 @@ +// Copyright 2024 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 Spinner from './Spinner.js'; +export { Spinner, }; +//# sourceMappingURL=spinners.js.map \ No newline at end of file diff --git a/public/ui/components/spinners/spinners.js.map b/public/ui/components/spinners/spinners.js.map new file mode 100644 index 000000000..0c3b24935 --- /dev/null +++ b/public/ui/components/spinners/spinners.js.map @@ -0,0 +1 @@ +{"version":3,"file":"spinners.js","sourceRoot":"","sources":["../../../../../../../front_end/ui/components/spinners/spinners.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,yEAAyE;AACzE,6BAA6B;AAE7B,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AAExC,OAAO,EACL,OAAO,GACR,CAAC","sourcesContent":["// Copyright 2024 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 Spinner from './Spinner.js';\n\nexport {\n Spinner,\n};\n"]} \ No newline at end of file diff --git a/public/ui/components/text_prompt/textPrompt.css.js b/public/ui/components/text_prompt/textPrompt.css.js index 2ee16d051..859c08aa0 100644 --- a/public/ui/components/text_prompt/textPrompt.css.js +++ b/public/ui/components/text_prompt/textPrompt.css.js @@ -43,7 +43,7 @@ input { } .text-prompt-input .suggestion { - color: var(--sys-color-state-disabled); + color: var(--sys-color-on-surface-subtle); position: absolute; left: 0; z-index: 1; diff --git a/public/ui/legacy/ActionRegistration.d.ts b/public/ui/legacy/ActionRegistration.d.ts index 9ad5f5c21..a1d2b8b9a 100644 --- a/public/ui/legacy/ActionRegistration.d.ts +++ b/public/ui/legacy/ActionRegistration.d.ts @@ -100,8 +100,7 @@ export declare const enum IconClass { PLUS = "plus", UNDO = "undo", COPY = "copy", - IMPORT = "import", - SPARK = "spark" + IMPORT = "import" } export declare const enum KeybindSet { DEVTOOLS_DEFAULT = "devToolsDefault", diff --git a/public/ui/legacy/ActionRegistration.js.map b/public/ui/legacy/ActionRegistration.js.map index 4bca10ea3..8ff18751b 100644 --- a/public/ui/legacy/ActionRegistration.js.map +++ b/public/ui/legacy/ActionRegistration.js.map @@ -1 +1 @@ -{"version":3,"file":"ActionRegistration.js","sourceRoot":"","sources":["../../../../../../front_end/ui/legacy/ActionRegistration.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,QAAQ,MAAM,iCAAiC,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,yBAAyB,CAAC;AAEhD,OAAO,EAAC,OAAO,EAAC,MAAM,cAAc,CAAC;AAErC,MAAM,SAAS,GAAG;IAChB;;OAEG;IACH,QAAQ,EAAE,UAAU;IACpB;;OAEG;IACH,UAAU,EAAE,YAAY;IACxB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,mBAAmB,EAAE,qBAAqB;IAC1C;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,WAAW,EAAE,aAAa;IAC1B;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,IAAI,EAAE,MAAM;IACZ;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,UAAU,E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,CAAC;QACtC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACpC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACtC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC1C;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACtC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACtC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QACzC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;QACnD;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QACxC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QACxC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACvC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QACzC;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;IACD,oFAAoF;IACpF,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\n\nimport {Context} from './Context.js';\n\nconst UIStrings = {\n /**\n *@description Title of the keybind category 'Elements' in Settings' Shortcuts pannel.\n */\n elements: 'Elements',\n /**\n *@description Title of the keybind category 'Screenshot' in Settings' Shortcuts pannel.\n */\n screenshot: 'Screenshot',\n /**\n *@description Title of the keybind category 'Network' in Settings' Shortcuts pannel.\n */\n network: 'Network',\n /**\n *@description Title of the keybind category 'Memory' in Settings' Shortcuts pannel.\n */\n memory: 'Memory',\n /**\n *@description Title of the keybind category 'JavaScript Profiler' in Settings' Shortcuts pannel.\n */\n javascript_profiler: 'JavaScript Profiler',\n /**\n *@description Title of the keybind category 'Console' in Settings' Shortcuts pannel.\n */\n console: 'Console',\n /**\n *@description Title of the keybind category 'Performance' in Settings' Shortcuts pannel.\n */\n performance: 'Performance',\n /**\n *@description Title of the keybind category 'Mobile' in Settings' Shortcuts pannel.\n */\n mobile: 'Mobile',\n /**\n *@description Title of the keybind category 'Help' in Settings' Shortcuts pannel.\n */\n help: 'Help',\n /**\n *@description Title of the keybind category 'Layers' in Settings' Shortcuts pannel.\n */\n layers: 'Layers',\n /**\n *@description Title of the keybind category 'Navigation' in Settings' Shortcuts pannel.\n */\n navigation: 'Navigation',\n /**\n *@description Title of the keybind category 'Drawer' in Settings' Shortcuts pannel.\n */\n drawer: 'Drawer',\n /**\n *@description Title of the keybind category 'Global' in Settings' Shortcuts pannel.\n */\n global: 'Global',\n /**\n *@description Title of the keybind category 'Resources' in Settings' Shortcuts pannel.\n */\n resources: 'Resources',\n /**\n *@description Title of the keybind category 'Background Services' in Settings' Shortcuts pannel.\n */\n background_services: 'Background Services',\n /**\n *@description Title of the keybind category 'Settings' in Settings' Shortcuts pannel.\n */\n settings: 'Settings',\n /**\n *@description Title of the keybind category 'Debugger' in Settings' Shortcuts pannel.\n */\n debugger: 'Debugger',\n /**\n *@description Title of the keybind category 'Sources' in Settings' Shortcuts pannel.\n */\n sources: 'Sources',\n /**\n *@description Title of the keybind category 'Rendering' in Settings' Shortcuts pannel.\n */\n rendering: 'Rendering',\n /**\n *@description Title of the keybind category 'Recorder' in Settings' Shortcuts pannel.\n */\n recorder: 'Recorder',\n /**\n *@description Title of the keybind category 'Changes' in Settings' Shortcuts pannel.\n */\n changes: 'Changes',\n};\nconst str_ = i18n.i18n.registerUIStrings('ui/legacy/ActionRegistration.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport interface ActionDelegate {\n handleAction(context: Context, actionId: string): boolean;\n}\n\nexport class Action extends Common.ObjectWrapper.ObjectWrapper {\n private enabledInternal = true;\n private toggledInternal = false;\n private actionRegistration: ActionRegistration;\n constructor(actionRegistration: ActionRegistration) {\n super();\n this.actionRegistration = actionRegistration;\n }\n\n id(): string {\n return this.actionRegistration.actionId;\n }\n\n async execute(): Promise {\n if (!this.actionRegistration.loadActionDelegate) {\n return false;\n }\n const delegate = await this.actionRegistration.loadActionDelegate();\n const actionId = this.id();\n return delegate.handleAction(Context.instance(), actionId);\n }\n\n icon(): string|undefined {\n return this.actionRegistration.iconClass;\n }\n\n toggledIcon(): string|undefined {\n return this.actionRegistration.toggledIconClass;\n }\n\n toggleWithRedColor(): boolean {\n return Boolean(this.actionRegistration.toggleWithRedColor);\n }\n\n setEnabled(enabled: boolean): void {\n if (this.enabledInternal === enabled) {\n return;\n }\n\n this.enabledInternal = enabled;\n this.dispatchEventToListeners(Events.ENABLED, enabled);\n }\n\n enabled(): boolean {\n return this.enabledInternal;\n }\n\n category(): ActionCategory {\n return this.actionRegistration.category;\n }\n\n tags(): string|void {\n if (this.actionRegistration.tags) {\n // Get localized keys and separate by null character to prevent fuzzy matching from matching across them.\n return this.actionRegistration.tags.map(tag => tag()).join('\\0');\n }\n }\n\n toggleable(): boolean {\n return Boolean(this.actionRegistration.toggleable);\n }\n\n title(): Common.UIString.LocalizedString {\n let title = this.actionRegistration.title ? this.actionRegistration.title() : i18n.i18n.lockedString('');\n const options = this.actionRegistration.options;\n if (options) {\n // Actions with an 'options' property don't have a title field. Instead, the displayed\n // title is taken from the 'title' property of the option that is not active. Only one of the\n // two options can be active at a given moment and the 'toggled' property of the action along\n // with the 'value' of the options are used to determine which one it is.\n\n for (const pair of options) {\n if (pair.value !== this.toggledInternal) {\n title = pair.title();\n }\n }\n }\n return title;\n }\n\n toggled(): boolean {\n return this.toggledInternal;\n }\n\n setToggled(toggled: boolean): void {\n console.assert(this.toggleable(), 'Shouldn\\'t be toggling an untoggleable action', this.id());\n if (this.toggledInternal === toggled) {\n return;\n }\n\n this.toggledInternal = toggled;\n this.dispatchEventToListeners(Events.TOGGLED, toggled);\n }\n\n options(): undefined|Array {\n return this.actionRegistration.options;\n }\n\n contextTypes(): undefined|Array {\n if (this.actionRegistration.contextTypes) {\n return this.actionRegistration.contextTypes();\n }\n return undefined;\n }\n\n canInstantiate(): boolean {\n return Boolean(this.actionRegistration.loadActionDelegate);\n }\n\n bindings(): Array|undefined {\n return this.actionRegistration.bindings;\n }\n\n experiment(): string|undefined {\n return this.actionRegistration.experiment;\n }\n\n setting(): string|undefined {\n return this.actionRegistration.setting;\n }\n\n condition(): Root.Runtime.Condition|undefined {\n return this.actionRegistration.condition;\n }\n\n order(): number|undefined {\n return this.actionRegistration.order;\n }\n}\n\nconst registeredActions = new Map();\n\nexport function registerActionExtension(registration: ActionRegistration): void {\n const actionId = registration.actionId;\n if (registeredActions.has(actionId)) {\n throw new Error(`Duplicate action ID '${actionId}'`);\n }\n if (!Platform.StringUtilities.isExtendedKebabCase(actionId)) {\n throw new Error(`Invalid action ID '${actionId}'`);\n }\n registeredActions.set(actionId, new Action(registration));\n}\n\nexport function reset(): void {\n registeredActions.clear();\n}\n\nexport function getRegisteredActionExtensions(): Array {\n return Array.from(registeredActions.values())\n .filter(action => {\n const settingName = action.setting();\n try {\n if (settingName && !Common.Settings.moduleSetting(settingName).get()) {\n return false;\n }\n } catch (err) {\n if (err.message.startsWith('No setting registered')) {\n return false;\n }\n }\n\n return Root.Runtime.Runtime.isDescriptorEnabled(\n {\n experiment: action.experiment(),\n condition: action.condition(),\n },\n Common.Settings.Settings.instance().getHostConfig(),\n );\n })\n .sort((firstAction, secondAction) => {\n const order1 = firstAction.order() || 0;\n const order2 = secondAction.order() || 0;\n return order1 - order2;\n });\n}\n\nexport function maybeRemoveActionExtension(actionId: string): boolean {\n return registeredActions.delete(actionId);\n}\n\nexport const enum Platforms {\n ALL = 'All platforms',\n MAC = 'mac',\n WINDOWS_LINUX = 'windows,linux',\n ANDROID = 'Android',\n WINDOWS = 'windows',\n}\n\nexport const enum Events {\n ENABLED = 'Enabled',\n TOGGLED = 'Toggled',\n}\n\nexport type EventTypes = {\n [Events.ENABLED]: boolean,\n [Events.TOGGLED]: boolean,\n};\n\nexport const enum ActionCategory {\n NONE = '', // `NONE` must be a falsy value. Legacy code uses if-checks for the category.\n ELEMENTS = 'ELEMENTS',\n SCREENSHOT = 'SCREENSHOT',\n NETWORK = 'NETWORK',\n MEMORY = 'MEMORY',\n JAVASCRIPT_PROFILER = 'JAVASCRIPT_PROFILER',\n CONSOLE = 'CONSOLE',\n PERFORMANCE = 'PERFORMANCE',\n MOBILE = 'MOBILE',\n HELP = 'HELP',\n LAYERS = 'LAYERS',\n NAVIGATION = 'NAVIGATION',\n DRAWER = 'DRAWER',\n GLOBAL = 'GLOBAL',\n RESOURCES = 'RESOURCES',\n BACKGROUND_SERVICES = 'BACKGROUND_SERVICES',\n SETTINGS = 'SETTINGS',\n DEBUGGER = 'DEBUGGER',\n SOURCES = 'SOURCES',\n RENDERING = 'RENDERING',\n RECORDER = 'RECORDER',\n CHANGES = 'CHANGES',\n}\n\nexport function getLocalizedActionCategory(category: ActionCategory): Platform.UIString.LocalizedString {\n switch (category) {\n case ActionCategory.ELEMENTS:\n return i18nString(UIStrings.elements);\n case ActionCategory.SCREENSHOT:\n return i18nString(UIStrings.screenshot);\n case ActionCategory.NETWORK:\n return i18nString(UIStrings.network);\n case ActionCategory.MEMORY:\n return i18nString(UIStrings.memory);\n case ActionCategory.JAVASCRIPT_PROFILER:\n return i18nString(UIStrings.javascript_profiler);\n case ActionCategory.CONSOLE:\n return i18nString(UIStrings.console);\n case ActionCategory.PERFORMANCE:\n return i18nString(UIStrings.performance);\n case ActionCategory.MOBILE:\n return i18nString(UIStrings.mobile);\n case ActionCategory.HELP:\n return i18nString(UIStrings.help);\n case ActionCategory.LAYERS:\n return i18nString(UIStrings.layers);\n case ActionCategory.NAVIGATION:\n return i18nString(UIStrings.navigation);\n case ActionCategory.DRAWER:\n return i18nString(UIStrings.drawer);\n case ActionCategory.GLOBAL:\n return i18nString(UIStrings.global);\n case ActionCategory.RESOURCES:\n return i18nString(UIStrings.resources);\n case ActionCategory.BACKGROUND_SERVICES:\n return i18nString(UIStrings.background_services);\n case ActionCategory.SETTINGS:\n return i18nString(UIStrings.settings);\n case ActionCategory.DEBUGGER:\n return i18nString(UIStrings.debugger);\n case ActionCategory.SOURCES:\n return i18nString(UIStrings.sources);\n case ActionCategory.RENDERING:\n return i18nString(UIStrings.rendering);\n case ActionCategory.RECORDER:\n return i18nString(UIStrings.recorder);\n case ActionCategory.CHANGES:\n return i18nString(UIStrings.changes);\n case ActionCategory.NONE:\n return i18n.i18n.lockedString('');\n }\n // Not all categories are cleanly typed yet. Return the category as-is in this case.\n return i18n.i18n.lockedString(category);\n}\n\nexport const enum IconClass {\n LARGEICON_NODE_SEARCH = 'select-element',\n START_RECORDING = 'record-start',\n STOP_RECORDING = 'record-stop',\n REFRESH = 'refresh',\n CLEAR = 'clear',\n EYE = 'eye',\n LARGEICON_PHONE = 'devices',\n PLAY = 'play',\n DOWNLOAD = 'download',\n LARGEICON_PAUSE = 'pause',\n LARGEICON_RESUME = 'resume',\n MOP = 'mop',\n BIN = 'bin',\n LARGEICON_SETTINGS_GEAR = 'gear',\n LARGEICON_STEP_OVER = 'step-over',\n LARGE_ICON_STEP_INTO = 'step-into',\n LARGE_ICON_STEP = 'step',\n LARGE_ICON_STEP_OUT = 'step-out',\n BREAKPOINT_CROSSED_FILLED = 'breakpoint-crossed-filled',\n BREAKPOINT_CROSSED = 'breakpoint-crossed',\n PLUS = 'plus',\n UNDO = 'undo',\n COPY = 'copy',\n IMPORT = 'import',\n SPARK = 'spark',\n}\n\nexport const enum KeybindSet {\n DEVTOOLS_DEFAULT = 'devToolsDefault',\n VS_CODE = 'vsCode',\n}\n\nexport interface ExtensionOption {\n value: boolean;\n title: () => Platform.UIString.LocalizedString;\n text?: string;\n}\n\nexport interface Binding {\n platform?: Platforms;\n shortcut: string;\n keybindSets?: Array;\n}\n\n/**\n * The representation of an action extension to be registered.\n */\nexport interface ActionRegistration {\n /**\n * The unique id of an Action extension.\n */\n actionId: string;\n /**\n * The category with which the action is displayed in the UI.\n */\n category: ActionCategory;\n /**\n * The title with which the action is displayed in the UI.\n */\n title?: () => Platform.UIString.LocalizedString;\n /**\n * The type of the icon used to trigger the action.\n */\n iconClass?: IconClass;\n /**\n * Whether the style of the icon toggles on interaction.\n */\n toggledIconClass?: IconClass;\n /**\n * Whether the class 'toolbar-toggle-with-red-color' is toggled on the icon on interaction.\n */\n toggleWithRedColor?: boolean;\n /**\n * Words used to find an action in the Command Menu.\n */\n tags?: Array<() => Platform.UIString.LocalizedString>;\n /**\n * Whether the action is toggleable.\n */\n toggleable?: boolean;\n /**\n * Loads the class that handles the action when it is triggered. The common pattern for implementing\n * this function relies on having the module that contains the action’s handler lazily loaded. For example:\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.ActionRegistration.registerActionExtension({\n * <...>\n * async loadActionDelegate() {\n * const Elements = await loadElementsModule();\n * return new Elements.ElementsPanel.ElementsActionDelegate();\n * },\n * <...>\n * });\n * ```\n */\n loadActionDelegate?: () => Promise;\n /**\n * Returns the classes that represent the 'context flavors' under which the action is available for triggering.\n * The context of the application is described in 'flavors' that are usually views added and removed to the context\n * as the user interacts with the application (e.g when the user moves across views). (See UI.Context)\n * When the action is supposed to be available globally, that is, it does not depend on the application to have\n * a specific context, the value of this property should be undefined.\n *\n * Because the method is synchronous, context types should be already loaded when the method is invoked.\n * In the case that an action has context types it depends on, and they haven't been loaded yet, the function should\n * return an empty array. Once the context types have been loaded, the function should return an array with all types\n * that it depends on.\n *\n * The common pattern for implementing this function is relying on having the module with the corresponding context\n * types loaded and stored when the related 'view' extension is loaded asynchronously. 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 * function maybeRetrieveContextTypes(getClassCallBack: (elementsModule: typeof Elements) => unknown[]): unknown[] {\n *\n * if (loadedElementsModule === undefined) {\n * return [];\n * }\n * return getClassCallBack(loadedElementsModule);\n * }\n * UI.ActionRegistration.registerActionExtension({\n *\n * contextTypes() {\n * return maybeRetrieveContextTypes(Elements => [Elements.ElementsPanel.ElementsPanel]);\n * }\n * <...>\n * });\n * ```\n */\n contextTypes?: () => Array;\n /**\n * The descriptions for each of the two states in which a toggleable action can be.\n */\n options?: Array;\n /**\n * The description of the variables (e.g. platform, keys and keybind sets) under which a keyboard shortcut triggers the action.\n * If a keybind must be available on all platforms, its 'platform' property must be undefined. The same applies to keybind sets\n * and the keybindSet property.\n *\n * Keybinds also depend on the context types of their corresponding action, and so they will only be available when such context types\n * are flavors of the current appliaction context.\n */\n bindings?: Array;\n /**\n * The name of the experiment an action is associated with. Enabling and disabling the declared\n * experiment will enable and disable the action respectively.\n */\n experiment?: Root.Runtime.ExperimentName;\n /**\n * The name of the setting an action is associated with. Enabling and\n * disabling the declared setting will enable and disable the action\n * respectively. Note that changing the setting requires a reload for it to\n * apply to action registration.\n */\n setting?: string;\n /**\n * A condition is a function that will make the action 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 * Used to sort actions when all registered actions are queried.\n */\n order?: number;\n}\n"]} \ No newline at end of file +{"version":3,"file":"ActionRegistration.js","sourceR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C,CAAC;QACxC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QACxC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACvC;YACE,OAAO,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QACzC;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;IACD,oFAAoF;IACpF,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["// Copyright 2020 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nimport * as Common from '../../core/common/common.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Root from '../../core/root/root.js';\n\nimport {Context} from './Context.js';\n\nconst UIStrings = {\n /**\n *@description Title of the keybind category 'Elements' in Settings' Shortcuts pannel.\n */\n elements: 'Elements',\n /**\n *@description Title of the keybind category 'Screenshot' in Settings' Shortcuts pannel.\n */\n screenshot: 'Screenshot',\n /**\n *@description Title of the keybind category 'Network' in Settings' Shortcuts pannel.\n */\n network: 'Network',\n /**\n *@description Title of the keybind category 'Memory' in Settings' Shortcuts pannel.\n */\n memory: 'Memory',\n /**\n *@description Title of the keybind category 'JavaScript Profiler' in Settings' Shortcuts pannel.\n */\n javascript_profiler: 'JavaScript Profiler',\n /**\n *@description Title of the keybind category 'Console' in Settings' Shortcuts pannel.\n */\n console: 'Console',\n /**\n *@description Title of the keybind category 'Performance' in Settings' Shortcuts pannel.\n */\n performance: 'Performance',\n /**\n *@description Title of the keybind category 'Mobile' in Settings' Shortcuts pannel.\n */\n mobile: 'Mobile',\n /**\n *@description Title of the keybind category 'Help' in Settings' Shortcuts pannel.\n */\n help: 'Help',\n /**\n *@description Title of the keybind category 'Layers' in Settings' Shortcuts pannel.\n */\n layers: 'Layers',\n /**\n *@description Title of the keybind category 'Navigation' in Settings' Shortcuts pannel.\n */\n navigation: 'Navigation',\n /**\n *@description Title of the keybind category 'Drawer' in Settings' Shortcuts pannel.\n */\n drawer: 'Drawer',\n /**\n *@description Title of the keybind category 'Global' in Settings' Shortcuts pannel.\n */\n global: 'Global',\n /**\n *@description Title of the keybind category 'Resources' in Settings' Shortcuts pannel.\n */\n resources: 'Resources',\n /**\n *@description Title of the keybind category 'Background Services' in Settings' Shortcuts pannel.\n */\n background_services: 'Background Services',\n /**\n *@description Title of the keybind category 'Settings' in Settings' Shortcuts pannel.\n */\n settings: 'Settings',\n /**\n *@description Title of the keybind category 'Debugger' in Settings' Shortcuts pannel.\n */\n debugger: 'Debugger',\n /**\n *@description Title of the keybind category 'Sources' in Settings' Shortcuts pannel.\n */\n sources: 'Sources',\n /**\n *@description Title of the keybind category 'Rendering' in Settings' Shortcuts pannel.\n */\n rendering: 'Rendering',\n /**\n *@description Title of the keybind category 'Recorder' in Settings' Shortcuts pannel.\n */\n recorder: 'Recorder',\n /**\n *@description Title of the keybind category 'Changes' in Settings' Shortcuts pannel.\n */\n changes: 'Changes',\n};\nconst str_ = i18n.i18n.registerUIStrings('ui/legacy/ActionRegistration.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\n\nexport interface ActionDelegate {\n handleAction(context: Context, actionId: string): boolean;\n}\n\nexport class Action extends Common.ObjectWrapper.ObjectWrapper {\n private enabledInternal = true;\n private toggledInternal = false;\n private actionRegistration: ActionRegistration;\n constructor(actionRegistration: ActionRegistration) {\n super();\n this.actionRegistration = actionRegistration;\n }\n\n id(): string {\n return this.actionRegistration.actionId;\n }\n\n async execute(): Promise {\n if (!this.actionRegistration.loadActionDelegate) {\n return false;\n }\n const delegate = await this.actionRegistration.loadActionDelegate();\n const actionId = this.id();\n return delegate.handleAction(Context.instance(), actionId);\n }\n\n icon(): string|undefined {\n return this.actionRegistration.iconClass;\n }\n\n toggledIcon(): string|undefined {\n return this.actionRegistration.toggledIconClass;\n }\n\n toggleWithRedColor(): boolean {\n return Boolean(this.actionRegistration.toggleWithRedColor);\n }\n\n setEnabled(enabled: boolean): void {\n if (this.enabledInternal === enabled) {\n return;\n }\n\n this.enabledInternal = enabled;\n this.dispatchEventToListeners(Events.ENABLED, enabled);\n }\n\n enabled(): boolean {\n return this.enabledInternal;\n }\n\n category(): ActionCategory {\n return this.actionRegistration.category;\n }\n\n tags(): string|void {\n if (this.actionRegistration.tags) {\n // Get localized keys and separate by null character to prevent fuzzy matching from matching across them.\n return this.actionRegistration.tags.map(tag => tag()).join('\\0');\n }\n }\n\n toggleable(): boolean {\n return Boolean(this.actionRegistration.toggleable);\n }\n\n title(): Common.UIString.LocalizedString {\n let title = this.actionRegistration.title ? this.actionRegistration.title() : i18n.i18n.lockedString('');\n const options = this.actionRegistration.options;\n if (options) {\n // Actions with an 'options' property don't have a title field. Instead, the displayed\n // title is taken from the 'title' property of the option that is not active. Only one of the\n // two options can be active at a given moment and the 'toggled' property of the action along\n // with the 'value' of the options are used to determine which one it is.\n\n for (const pair of options) {\n if (pair.value !== this.toggledInternal) {\n title = pair.title();\n }\n }\n }\n return title;\n }\n\n toggled(): boolean {\n return this.toggledInternal;\n }\n\n setToggled(toggled: boolean): void {\n console.assert(this.toggleable(), 'Shouldn\\'t be toggling an untoggleable action', this.id());\n if (this.toggledInternal === toggled) {\n return;\n }\n\n this.toggledInternal = toggled;\n this.dispatchEventToListeners(Events.TOGGLED, toggled);\n }\n\n options(): undefined|Array {\n return this.actionRegistration.options;\n }\n\n contextTypes(): undefined|Array {\n if (this.actionRegistration.contextTypes) {\n return this.actionRegistration.contextTypes();\n }\n return undefined;\n }\n\n canInstantiate(): boolean {\n return Boolean(this.actionRegistration.loadActionDelegate);\n }\n\n bindings(): Array|undefined {\n return this.actionRegistration.bindings;\n }\n\n experiment(): string|undefined {\n return this.actionRegistration.experiment;\n }\n\n setting(): string|undefined {\n return this.actionRegistration.setting;\n }\n\n condition(): Root.Runtime.Condition|undefined {\n return this.actionRegistration.condition;\n }\n\n order(): number|undefined {\n return this.actionRegistration.order;\n }\n}\n\nconst registeredActions = new Map();\n\nexport function registerActionExtension(registration: ActionRegistration): void {\n const actionId = registration.actionId;\n if (registeredActions.has(actionId)) {\n throw new Error(`Duplicate action ID '${actionId}'`);\n }\n if (!Platform.StringUtilities.isExtendedKebabCase(actionId)) {\n throw new Error(`Invalid action ID '${actionId}'`);\n }\n registeredActions.set(actionId, new Action(registration));\n}\n\nexport function reset(): void {\n registeredActions.clear();\n}\n\nexport function getRegisteredActionExtensions(): Array {\n return Array.from(registeredActions.values())\n .filter(action => {\n const settingName = action.setting();\n try {\n if (settingName && !Common.Settings.moduleSetting(settingName).get()) {\n return false;\n }\n } catch (err) {\n if (err.message.startsWith('No setting registered')) {\n return false;\n }\n }\n\n return Root.Runtime.Runtime.isDescriptorEnabled(\n {\n experiment: action.experiment(),\n condition: action.condition(),\n },\n Common.Settings.Settings.instance().getHostConfig(),\n );\n })\n .sort((firstAction, secondAction) => {\n const order1 = firstAction.order() || 0;\n const order2 = secondAction.order() || 0;\n return order1 - order2;\n });\n}\n\nexport function maybeRemoveActionExtension(actionId: string): boolean {\n return registeredActions.delete(actionId);\n}\n\nexport const enum Platforms {\n ALL = 'All platforms',\n MAC = 'mac',\n WINDOWS_LINUX = 'windows,linux',\n ANDROID = 'Android',\n WINDOWS = 'windows',\n}\n\nexport const enum Events {\n ENABLED = 'Enabled',\n TOGGLED = 'Toggled',\n}\n\nexport type EventTypes = {\n [Events.ENABLED]: boolean,\n [Events.TOGGLED]: boolean,\n};\n\nexport const enum ActionCategory {\n NONE = '', // `NONE` must be a falsy value. Legacy code uses if-checks for the category.\n ELEMENTS = 'ELEMENTS',\n SCREENSHOT = 'SCREENSHOT',\n NETWORK = 'NETWORK',\n MEMORY = 'MEMORY',\n JAVASCRIPT_PROFILER = 'JAVASCRIPT_PROFILER',\n CONSOLE = 'CONSOLE',\n PERFORMANCE = 'PERFORMANCE',\n MOBILE = 'MOBILE',\n HELP = 'HELP',\n LAYERS = 'LAYERS',\n NAVIGATION = 'NAVIGATION',\n DRAWER = 'DRAWER',\n GLOBAL = 'GLOBAL',\n RESOURCES = 'RESOURCES',\n BACKGROUND_SERVICES = 'BACKGROUND_SERVICES',\n SETTINGS = 'SETTINGS',\n DEBUGGER = 'DEBUGGER',\n SOURCES = 'SOURCES',\n RENDERING = 'RENDERING',\n RECORDER = 'RECORDER',\n CHANGES = 'CHANGES',\n}\n\nexport function getLocalizedActionCategory(category: ActionCategory): Platform.UIString.LocalizedString {\n switch (category) {\n case ActionCategory.ELEMENTS:\n return i18nString(UIStrings.elements);\n case ActionCategory.SCREENSHOT:\n return i18nString(UIStrings.screenshot);\n case ActionCategory.NETWORK:\n return i18nString(UIStrings.network);\n case ActionCategory.MEMORY:\n return i18nString(UIStrings.memory);\n case ActionCategory.JAVASCRIPT_PROFILER:\n return i18nString(UIStrings.javascript_profiler);\n case ActionCategory.CONSOLE:\n return i18nString(UIStrings.console);\n case ActionCategory.PERFORMANCE:\n return i18nString(UIStrings.performance);\n case ActionCategory.MOBILE:\n return i18nString(UIStrings.mobile);\n case ActionCategory.HELP:\n return i18nString(UIStrings.help);\n case ActionCategory.LAYERS:\n return i18nString(UIStrings.layers);\n case ActionCategory.NAVIGATION:\n return i18nString(UIStrings.navigation);\n case ActionCategory.DRAWER:\n return i18nString(UIStrings.drawer);\n case ActionCategory.GLOBAL:\n return i18nString(UIStrings.global);\n case ActionCategory.RESOURCES:\n return i18nString(UIStrings.resources);\n case ActionCategory.BACKGROUND_SERVICES:\n return i18nString(UIStrings.background_services);\n case ActionCategory.SETTINGS:\n return i18nString(UIStrings.settings);\n case ActionCategory.DEBUGGER:\n return i18nString(UIStrings.debugger);\n case ActionCategory.SOURCES:\n return i18nString(UIStrings.sources);\n case ActionCategory.RENDERING:\n return i18nString(UIStrings.rendering);\n case ActionCategory.RECORDER:\n return i18nString(UIStrings.recorder);\n case ActionCategory.CHANGES:\n return i18nString(UIStrings.changes);\n case ActionCategory.NONE:\n return i18n.i18n.lockedString('');\n }\n // Not all categories are cleanly typed yet. Return the category as-is in this case.\n return i18n.i18n.lockedString(category);\n}\n\nexport const enum IconClass {\n LARGEICON_NODE_SEARCH = 'select-element',\n START_RECORDING = 'record-start',\n STOP_RECORDING = 'record-stop',\n REFRESH = 'refresh',\n CLEAR = 'clear',\n EYE = 'eye',\n LARGEICON_PHONE = 'devices',\n PLAY = 'play',\n DOWNLOAD = 'download',\n LARGEICON_PAUSE = 'pause',\n LARGEICON_RESUME = 'resume',\n MOP = 'mop',\n BIN = 'bin',\n LARGEICON_SETTINGS_GEAR = 'gear',\n LARGEICON_STEP_OVER = 'step-over',\n LARGE_ICON_STEP_INTO = 'step-into',\n LARGE_ICON_STEP = 'step',\n LARGE_ICON_STEP_OUT = 'step-out',\n BREAKPOINT_CROSSED_FILLED = 'breakpoint-crossed-filled',\n BREAKPOINT_CROSSED = 'breakpoint-crossed',\n PLUS = 'plus',\n UNDO = 'undo',\n COPY = 'copy',\n IMPORT = 'import',\n}\n\nexport const enum KeybindSet {\n DEVTOOLS_DEFAULT = 'devToolsDefault',\n VS_CODE = 'vsCode',\n}\n\nexport interface ExtensionOption {\n value: boolean;\n title: () => Platform.UIString.LocalizedString;\n text?: string;\n}\n\nexport interface Binding {\n platform?: Platforms;\n shortcut: string;\n keybindSets?: Array;\n}\n\n/**\n * The representation of an action extension to be registered.\n */\nexport interface ActionRegistration {\n /**\n * The unique id of an Action extension.\n */\n actionId: string;\n /**\n * The category with which the action is displayed in the UI.\n */\n category: ActionCategory;\n /**\n * The title with which the action is displayed in the UI.\n */\n title?: () => Platform.UIString.LocalizedString;\n /**\n * The type of the icon used to trigger the action.\n */\n iconClass?: IconClass;\n /**\n * Whether the style of the icon toggles on interaction.\n */\n toggledIconClass?: IconClass;\n /**\n * Whether the class 'toolbar-toggle-with-red-color' is toggled on the icon on interaction.\n */\n toggleWithRedColor?: boolean;\n /**\n * Words used to find an action in the Command Menu.\n */\n tags?: Array<() => Platform.UIString.LocalizedString>;\n /**\n * Whether the action is toggleable.\n */\n toggleable?: boolean;\n /**\n * Loads the class that handles the action when it is triggered. The common pattern for implementing\n * this function relies on having the module that contains the action’s handler lazily loaded. For example:\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.ActionRegistration.registerActionExtension({\n * <...>\n * async loadActionDelegate() {\n * const Elements = await loadElementsModule();\n * return new Elements.ElementsPanel.ElementsActionDelegate();\n * },\n * <...>\n * });\n * ```\n */\n loadActionDelegate?: () => Promise;\n /**\n * Returns the classes that represent the 'context flavors' under which the action is available for triggering.\n * The context of the application is described in 'flavors' that are usually views added and removed to the context\n * as the user interacts with the application (e.g when the user moves across views). (See UI.Context)\n * When the action is supposed to be available globally, that is, it does not depend on the application to have\n * a specific context, the value of this property should be undefined.\n *\n * Because the method is synchronous, context types should be already loaded when the method is invoked.\n * In the case that an action has context types it depends on, and they haven't been loaded yet, the function should\n * return an empty array. Once the context types have been loaded, the function should return an array with all types\n * that it depends on.\n *\n * The common pattern for implementing this function is relying on having the module with the corresponding context\n * types loaded and stored when the related 'view' extension is loaded asynchronously. 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 * function maybeRetrieveContextTypes(getClassCallBack: (elementsModule: typeof Elements) => unknown[]): unknown[] {\n *\n * if (loadedElementsModule === undefined) {\n * return [];\n * }\n * return getClassCallBack(loadedElementsModule);\n * }\n * UI.ActionRegistration.registerActionExtension({\n *\n * contextTypes() {\n * return maybeRetrieveContextTypes(Elements => [Elements.ElementsPanel.ElementsPanel]);\n * }\n * <...>\n * });\n * ```\n */\n contextTypes?: () => Array;\n /**\n * The descriptions for each of the two states in which a toggleable action can be.\n */\n options?: Array;\n /**\n * The description of the variables (e.g. platform, keys and keybind sets) under which a keyboard shortcut triggers the action.\n * If a keybind must be available on all platforms, its 'platform' property must be undefined. The same applies to keybind sets\n * and the keybindSet property.\n *\n * Keybinds also depend on the context types of their corresponding action, and so they will only be available when such context types\n * are flavors of the current appliaction context.\n */\n bindings?: Array;\n /**\n * The name of the experiment an action is associated with. Enabling and disabling the declared\n * experiment will enable and disable the action respectively.\n */\n experiment?: Root.Runtime.ExperimentName;\n /**\n * The name of the setting an action is associated with. Enabling and\n * disabling the declared setting will enable and disable the action\n * respectively. Note that changing the setting requires a reload for it to\n * apply to action registration.\n */\n setting?: string;\n /**\n * A condition is a function that will make the action 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 * Used to sort actions when all registered actions are queried.\n */\n order?: number;\n}\n"]} \ No newline at end of file diff --git a/public/ui/legacy/SettingsUI.js b/public/ui/legacy/SettingsUI.js index 76777a72c..6f2c5ee78 100644 --- a/public/ui/legacy/SettingsUI.js +++ b/public/ui/legacy/SettingsUI.js @@ -84,7 +84,7 @@ const createSettingSelect = function (name, options, requiresReload, setting, su } let reloadWarning = null; if (requiresReload) { - reloadWarning = container.createChild('span', 'reload-warning hidden'); + reloadWarning = container.createChild('p', 'reload-warning hidden'); reloadWarning.textContent = i18nString(UIStrings.srequiresReload); ARIAUtils.markAsAlert(reloadWarning); } diff --git a/public/ui/legacy/SettingsUI.js.map b/public/ui/legacy/SettingsUI.js.map index 01f5f08bc..80570d6dc 100644 --- a/public/ui/legacy/SettingsUI.js.map +++ b/public/ui/legacy/SettingsUI.js.map @@ -1 +1 @@ -{"version":3,"file":"SettingsUI.js","sourceRoot":"","sources":["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,GAAG,GAAG,EAAE;gBACxB,IAAI,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC;oBAC7B,aAAa,CAAC,QAAQ,EAAE,CAAC,4BAA4B,CAAC,UAAU,CAAC,SAAS,CAAC,4BAA4B,CAAC,CAAC,CAAC;gBAC5G,CAAC;YACH,CAAC,CAAC;YACF,OAAO,SAAS,CAAC;QACnB,CAAC;QACD;YACE,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;gBACrC,OAAO,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,cAAc,EAAE,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;YACtG,CAAC;YACD,OAAO,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;YACtD,OAAO,IAAI,CAAC;QACd;YACE,OAAO,CAAC,KAAK,CAAC,wBAAwB,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;YACzD,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2014 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Settings from '../components/settings/settings.js';\nimport * as VisualLogging from '../visual_logging/visual_logging.js';\n\nimport * as ARIAUtils from './ARIAUtils.js';\nimport {InspectorView} from './InspectorView.js';\nimport {Tooltip} from './Tooltip.js';\nimport {CheckboxLabel, createOption} from './UIUtils.js';\n\nconst UIStrings = {\n /**\n *@description Note when a setting change will require the user to reload DevTools\n */\n srequiresReload: '*Requires reload',\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};\nconst str_ = i18n.i18n.registerUIStrings('ui/legacy/SettingsUI.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nexport const createSettingCheckbox = function(\n name: string, setting: Common.Settings.Setting, omitParagraphElement?: boolean,\n tooltip?: string): Element {\n const label = CheckboxLabel.create(name, undefined, undefined, setting.name);\n if (tooltip) {\n Tooltip.install(label, tooltip);\n }\n\n const input = label.checkboxElement;\n input.name = name;\n bindCheckbox(input, setting);\n\n if (omitParagraphElement) {\n return label;\n }\n\n const p = document.createElement('p');\n p.appendChild(label);\n return p;\n};\n\nconst createSettingSelect = function(\n name: string, options: Common.Settings.SimpleSettingOption[], requiresReload: boolean|null,\n setting: Common.Settings.Setting, subtitle?: string): HTMLElement {\n const container = document.createElement('div');\n const settingSelectElement = container.createChild('p');\n settingSelectElement.classList.add('settings-select');\n const label = settingSelectElement.createChild('label');\n const select = (settingSelectElement.createChild('select', 'chrome-select') as HTMLSelectElement);\n label.textContent = name;\n if (subtitle) {\n container.classList.add('chrome-select-label');\n label.createChild('p').textContent = subtitle;\n }\n select.setAttribute('jslog', `${VisualLogging.dropDown().track({change: true}).context(setting.name)}`);\n ARIAUtils.bindLabelToControl(label, select);\n\n for (const option of options) {\n if (option.text && typeof option.value === 'string') {\n select.add(createOption(option.text, option.value, Platform.StringUtilities.toKebabCase(option.value)));\n }\n }\n\n let reloadWarning: HTMLElement|(Element | null) = (null as Element | null);\n if (requiresReload) {\n reloadWarning = container.createChild('span', 'reload-warning hidden');\n reloadWarning.textContent = i18nString(UIStrings.srequiresReload);\n ARIAUtils.markAsAlert(reloadWarning);\n }\n\n const {deprecation} = setting;\n if (deprecation) {\n const warning = new Settings.SettingDeprecationWarning.SettingDeprecationWarning();\n warning.data = deprecation;\n label.appendChild(warning);\n }\n\n setting.addChangeListener(settingChanged);\n settingChanged();\n select.addEventListener('change', selectChanged, false);\n return container;\n\n function settingChanged(): void {\n const newValue = setting.get();\n for (let i = 0; i < options.length; i++) {\n if (options[i].value === newValue) {\n select.selectedIndex = i;\n }\n }\n select.disabled = setting.disabled();\n }\n\n function selectChanged(): void {\n // Don't use event.target.value to avoid conversion of the value to string.\n setting.set(options[select.selectedIndex].value);\n if (reloadWarning) {\n reloadWarning.classList.remove('hidden');\n InspectorView.instance().displayReloadRequiredWarning(i18nString(UIStrings.oneOrMoreSettingsHaveChanged));\n }\n }\n};\n\nexport const bindCheckbox = function(\n inputElement: Element, setting: Common.Settings.Setting, metric?: UserMetricOptions): void {\n const input = (inputElement as HTMLInputElement);\n function settingChanged(): void {\n if (input.checked !== setting.get()) {\n input.checked = setting.get();\n }\n }\n setting.addChangeListener(settingChanged);\n settingChanged();\n\n function inputChanged(): void {\n if (setting.get() !== input.checked) {\n setting.set(input.checked);\n }\n\n if (setting.get() && metric?.enable) {\n Host.userMetrics.actionTaken(metric.enable);\n }\n\n if (!setting.get() && metric?.disable) {\n Host.userMetrics.actionTaken(metric.disable);\n }\n\n if (metric?.toggle) {\n Host.userMetrics.actionTaken(metric.toggle);\n }\n }\n\n input.addEventListener('change', inputChanged, false);\n};\n\nexport const createCustomSetting = function(name: string, element: Element): Element {\n const p = document.createElement('p');\n p.classList.add('settings-select');\n const label = p.createChild('label');\n label.textContent = name;\n ARIAUtils.bindLabelToControl(label, element);\n p.appendChild(element);\n return p;\n};\n\nexport const createControlForSetting = function(\n setting: Common.Settings.Setting, subtitle?: string): HTMLElement|null {\n const uiTitle = setting.title();\n switch (setting.type()) {\n case Common.Settings.SettingType.BOOLEAN: {\n const component = new Settings.SettingCheckbox.SettingCheckbox();\n component.data = {\n setting: setting as Common.Settings.Setting,\n };\n component.onchange = () => {\n if (setting.reloadRequired()) {\n InspectorView.instance().displayReloadRequiredWarning(i18nString(UIStrings.oneOrMoreSettingsHaveChanged));\n }\n };\n return component;\n }\n case Common.Settings.SettingType.ENUM:\n if (Array.isArray(setting.options())) {\n return createSettingSelect(uiTitle, setting.options(), setting.reloadRequired(), setting, subtitle);\n }\n console.error('Enum setting defined without options');\n return null;\n default:\n console.error('Invalid setting type: ' + setting.type());\n return null;\n }\n};\n\nexport interface SettingUI {\n settingElement(): Element|null;\n}\n\n/**\n * Track toggle action as a whole or\n * track on and off action separately.\n */\nexport interface UserMetricOptions {\n toggle?: Host.UserMetrics.Action;\n enable?: Host.UserMetrics.Action;\n disable?: Host.UserMetrics.Action;\n}\n"]} \ No newline at end of file +{"version":3,"file":"SettingsUI.js","sourceRoot":"","sources":["../../../../../../front_end/ui/legacy/SettingsUI.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;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B,aAAa,CAAC,QAAQ,EAAE,CAAC,4BAA4B,CAAC,UAAU,CAAC,SAAS,CAAC,4BAA4B,CAAC,CAAC,CAAC;gBAC5G,CAAC;YACH,CAAC,CAAC;YACF,OAAO,SAAS,CAAC;QACnB,CAAC;QACD;YACE,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;gBACrC,OAAO,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,cAAc,EAAE,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;YACtG,CAAC;YACD,OAAO,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;YACtD,OAAO,IAAI,CAAC;QACd;YACE,OAAO,CAAC,KAAK,CAAC,wBAAwB,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;YACzD,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2014 Google Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nimport * as Common from '../../core/common/common.js';\nimport * as Host from '../../core/host/host.js';\nimport * as i18n from '../../core/i18n/i18n.js';\nimport * as Platform from '../../core/platform/platform.js';\nimport * as Settings from '../components/settings/settings.js';\nimport * as VisualLogging from '../visual_logging/visual_logging.js';\n\nimport * as ARIAUtils from './ARIAUtils.js';\nimport {InspectorView} from './InspectorView.js';\nimport {Tooltip} from './Tooltip.js';\nimport {CheckboxLabel, createOption} from './UIUtils.js';\n\nconst UIStrings = {\n /**\n *@description Note when a setting change will require the user to reload DevTools\n */\n srequiresReload: '*Requires reload',\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};\nconst str_ = i18n.i18n.registerUIStrings('ui/legacy/SettingsUI.ts', UIStrings);\nconst i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);\nexport const createSettingCheckbox = function(\n name: string, setting: Common.Settings.Setting, omitParagraphElement?: boolean,\n tooltip?: string): Element {\n const label = CheckboxLabel.create(name, undefined, undefined, setting.name);\n if (tooltip) {\n Tooltip.install(label, tooltip);\n }\n\n const input = label.checkboxElement;\n input.name = name;\n bindCheckbox(input, setting);\n\n if (omitParagraphElement) {\n return label;\n }\n\n const p = document.createElement('p');\n p.appendChild(label);\n return p;\n};\n\nconst createSettingSelect = function(\n name: string, options: Common.Settings.SimpleSettingOption[], requiresReload: boolean|null,\n setting: Common.Settings.Setting, subtitle?: string): HTMLElement {\n const container = document.createElement('div');\n const settingSelectElement = container.createChild('p');\n settingSelectElement.classList.add('settings-select');\n const label = settingSelectElement.createChild('label');\n const select = (settingSelectElement.createChild('select', 'chrome-select') as HTMLSelectElement);\n label.textContent = name;\n if (subtitle) {\n container.classList.add('chrome-select-label');\n label.createChild('p').textContent = subtitle;\n }\n select.setAttribute('jslog', `${VisualLogging.dropDown().track({change: true}).context(setting.name)}`);\n ARIAUtils.bindLabelToControl(label, select);\n\n for (const option of options) {\n if (option.text && typeof option.value === 'string') {\n select.add(createOption(option.text, option.value, Platform.StringUtilities.toKebabCase(option.value)));\n }\n }\n\n let reloadWarning: HTMLElement|(Element | null) = (null as Element | null);\n if (requiresReload) {\n reloadWarning = container.createChild('p', 'reload-warning hidden');\n reloadWarning.textContent = i18nString(UIStrings.srequiresReload);\n ARIAUtils.markAsAlert(reloadWarning);\n }\n\n const {deprecation} = setting;\n if (deprecation) {\n const warning = new Settings.SettingDeprecationWarning.SettingDeprecationWarning();\n warning.data = deprecation;\n label.appendChild(warning);\n }\n\n setting.addChangeListener(settingChanged);\n settingChanged();\n select.addEventListener('change', selectChanged, false);\n return container;\n\n function settingChanged(): void {\n const newValue = setting.get();\n for (let i = 0; i < options.length; i++) {\n if (options[i].value === newValue) {\n select.selectedIndex = i;\n }\n }\n select.disabled = setting.disabled();\n }\n\n function selectChanged(): void {\n // Don't use event.target.value to avoid conversion of the value to string.\n setting.set(options[select.selectedIndex].value);\n if (reloadWarning) {\n reloadWarning.classList.remove('hidden');\n InspectorView.instance().displayReloadRequiredWarning(i18nString(UIStrings.oneOrMoreSettingsHaveChanged));\n }\n }\n};\n\nexport const bindCheckbox = function(\n inputElement: Element, setting: Common.Settings.Setting, metric?: UserMetricOptions): void {\n const input = (inputElement as HTMLInputElement);\n function settingChanged(): void {\n if (input.checked !== setting.get()) {\n input.checked = setting.get();\n }\n }\n setting.addChangeListener(settingChanged);\n settingChanged();\n\n function inputChanged(): void {\n if (setting.get() !== input.checked) {\n setting.set(input.checked);\n }\n\n if (setting.get() && metric?.enable) {\n Host.userMetrics.actionTaken(metric.enable);\n }\n\n if (!setting.get() && metric?.disable) {\n Host.userMetrics.actionTaken(metric.disable);\n }\n\n if (metric?.toggle) {\n Host.userMetrics.actionTaken(metric.toggle);\n }\n }\n\n input.addEventListener('change', inputChanged, false);\n};\n\nexport const createCustomSetting = function(name: string, element: Element): Element {\n const p = document.createElement('p');\n p.classList.add('settings-select');\n const label = p.createChild('label');\n label.textContent = name;\n ARIAUtils.bindLabelToControl(label, element);\n p.appendChild(element);\n return p;\n};\n\nexport const createControlForSetting = function(\n setting: Common.Settings.Setting, subtitle?: string): HTMLElement|null {\n const uiTitle = setting.title();\n switch (setting.type()) {\n case Common.Settings.SettingType.BOOLEAN: {\n const component = new Settings.SettingCheckbox.SettingCheckbox();\n component.data = {\n setting: setting as Common.Settings.Setting,\n };\n component.onchange = () => {\n if (setting.reloadRequired()) {\n InspectorView.instance().displayReloadRequiredWarning(i18nString(UIStrings.oneOrMoreSettingsHaveChanged));\n }\n };\n return component;\n }\n case Common.Settings.SettingType.ENUM:\n if (Array.isArray(setting.options())) {\n return createSettingSelect(uiTitle, setting.options(), setting.reloadRequired(), setting, subtitle);\n }\n console.error('Enum setting defined without options');\n return null;\n default:\n console.error('Invalid setting type: ' + setting.type());\n return null;\n }\n};\n\nexport interface SettingUI {\n settingElement(): Element|null;\n}\n\n/**\n * Track toggle action as a whole or\n * track on and off action separately.\n */\nexport interface UserMetricOptions {\n toggle?: Host.UserMetrics.Action;\n enable?: Host.UserMetrics.Action;\n disable?: Host.UserMetrics.Action;\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 d2d964495..9f02248a7 100644 --- a/public/ui/legacy/UIUtils.d.ts +++ b/public/ui/legacy/UIUtils.d.ts @@ -193,6 +193,7 @@ export interface ConfirmDialogOptions { jslogContext?: string; } export declare function injectCoreStyles(root: Element | ShadowRoot): void; +export declare function injectTextButtonStyles(root: Element | ShadowRoot): void; export declare function createShadowRootWithCoreStyles(element: Element, options?: { cssFile?: CSSStyleSheet[] | { cssContent: string; diff --git a/public/ui/legacy/UIUtils.js b/public/ui/legacy/UIUtils.js index 9b96ac17d..d46cc15aa 100644 --- a/public/ui/legacy/UIUtils.js +++ b/public/ui/legacy/UIUtils.js @@ -1557,6 +1557,9 @@ export function injectCoreStyles(root) { ThemeSupport.ThemeSupport.instance().injectHighlightStyleSheets(root); ThemeSupport.ThemeSupport.instance().injectCustomStyleSheets(root); } +export function injectTextButtonStyles(root) { + ThemeSupport.ThemeSupport.instance().appendStyle(root, textButtonStyles); +} export function createShadowRootWithCoreStyles(element, options = { delegatesFocus: undefined, cssFile: undefined, diff --git a/public/ui/legacy/UIUtils.js.map b/public/ui/legacy/UIUtils.js.map index d78f18f7e..508302c85 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,M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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.BLOCKED_BY_GLASS_PANE);\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 instanceof WheelEvent) {\n // When shift is pressed while spinning mousewheel, delta comes as wheelDeltaX.\n if (event.deltaY < 0 || event.deltaX < 0) {\n direction = 'Up';\n } else if (event.deltaY > 0 || event.deltaX > 0) {\n direction = 'Down';\n }\n } else if (event instanceof MouseEvent) {\n if (event.movementX < 0) {\n direction = 'Down';\n } else if (event.movementX > 0) {\n direction = 'Up';\n }\n } else if (event instanceof KeyboardEvent) {\n if (event.key === 'ArrowUp' || event.key === 'PageUp') {\n direction = 'Up';\n } else if (event.key === 'ArrowDown' || event.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 = mouseEvent.type === 'mousemove' ? Math.abs(mouseEvent.movementX) : 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 if (event instanceof MouseEvent) {\n const {type} = event;\n return type === 'mousemove' || type === 'wheel';\n }\n if (event instanceof KeyboardEvent) {\n const {key} = event;\n return key === 'ArrowUp' || key === 'ArrowDown' || key === 'PageUp' || key === 'PageDown';\n }\n return false;\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 addPlatformClass(element: HTMLElement): void {\n element.classList.add('platform-' + Host.Platform.platform());\n}\n\nexport function installComponentRootStyles(element: HTMLElement): void {\n injectCoreStyles(element);\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\n/**\n * Creates a file selector element.\n * @param callback - the function that will be called with the file the user selected\n * @param accept - optionally used to set the [`accept`](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept) parameter to limit file-types the user can pick.\n */\nexport function createFileSelectorElement(callback: (arg0: File) => void, accept?: string): HTMLInputElement {\n const fileSelectorElement = document.createElement('input');\n fileSelectorElement.type = 'file';\n if (accept) {\n fileSelectorElement.setAttribute('accept', accept);\n }\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.MEASURE_CONTENT);\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.MEASURE_CONTENT);\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,OA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D,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,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.BLOCKED_BY_GLASS_PANE);\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 instanceof WheelEvent) {\n // When shift is pressed while spinning mousewheel, delta comes as wheelDeltaX.\n if (event.deltaY < 0 || event.deltaX < 0) {\n direction = 'Up';\n } else if (event.deltaY > 0 || event.deltaX > 0) {\n direction = 'Down';\n }\n } else if (event instanceof MouseEvent) {\n if (event.movementX < 0) {\n direction = 'Down';\n } else if (event.movementX > 0) {\n direction = 'Up';\n }\n } else if (event instanceof KeyboardEvent) {\n if (event.key === 'ArrowUp' || event.key === 'PageUp') {\n direction = 'Up';\n } else if (event.key === 'ArrowDown' || event.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 = mouseEvent.type === 'mousemove' ? Math.abs(mouseEvent.movementX) : 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 if (event instanceof MouseEvent) {\n const {type} = event;\n return type === 'mousemove' || type === 'wheel';\n }\n if (event instanceof KeyboardEvent) {\n const {key} = event;\n return key === 'ArrowUp' || key === 'ArrowDown' || key === 'PageUp' || key === 'PageDown';\n }\n return false;\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 addPlatformClass(element: HTMLElement): void {\n element.classList.add('platform-' + Host.Platform.platform());\n}\n\nexport function installComponentRootStyles(element: HTMLElement): void {\n injectCoreStyles(element);\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\n/**\n * Creates a file selector element.\n * @param callback - the function that will be called with the file the user selected\n * @param accept - optionally used to set the [`accept`](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept) parameter to limit file-types the user can pick.\n */\nexport function createFileSelectorElement(callback: (arg0: File) => void, accept?: string): HTMLInputElement {\n const fileSelectorElement = document.createElement('input');\n fileSelectorElement.type = 'file';\n if (accept) {\n fileSelectorElement.setAttribute('accept', accept);\n }\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.MEASURE_CONTENT);\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.MEASURE_CONTENT);\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 injectTextButtonStyles(root: Element|ShadowRoot): void {\n ThemeSupport.ThemeSupport.instance().appendStyle(root, textButtonStyles);\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/components/perf_ui/ChartViewport.d.ts b/public/ui/legacy/components/perf_ui/ChartViewport.d.ts index 9bc902326..ec1b31101 100644 --- a/public/ui/legacy/components/perf_ui/ChartViewport.d.ts +++ b/public/ui/legacy/components/perf_ui/ChartViewport.d.ts @@ -50,7 +50,11 @@ export declare class ChartViewport extends UI.Widget.VBox { reset(): void; private updateContentElementSize; setContentHeight(totalHeight: number): void; - setScrollOffset(offset: number, height?: number): void; + /** + * @param centered - If true, scrolls offset to where it is centered on the chart, + * based on current the this.offsetHeight value. + */ + setScrollOffset(offset: number, height?: number, centered?: boolean): void; scrollOffset(): number; chartHeight(): number; setBoundaries(zeroTime: number, totalTime: number): void; diff --git a/public/ui/legacy/components/perf_ui/ChartViewport.js b/public/ui/legacy/components/perf_ui/ChartViewport.js index 9c012ca66..7490d023f 100644 --- a/public/ui/legacy/components/perf_ui/ChartViewport.js +++ b/public/ui/legacy/components/perf_ui/ChartViewport.js @@ -139,12 +139,26 @@ export class ChartViewport extends UI.Widget.VBox { this.scrollTop = Math.max(0, totalHeight - this.offsetHeight); this.vScrollElement.scrollTop = this.scrollTop; } - setScrollOffset(offset, height) { + /** + * @param centered - If true, scrolls offset to where it is centered on the chart, + * based on current the this.offsetHeight value. + */ + setScrollOffset(offset, height, centered) { height = height || 0; - if (this.vScrollElement.scrollTop > offset) { - this.vScrollElement.scrollTop = offset; + if (centered) { + // Half of the height for padding. + const halfPadding = Math.floor(this.offsetHeight / 2); + if (this.vScrollElement.scrollTop > offset) { + // Need to scroll up, include height. + this.vScrollElement.scrollTop = offset - (height + halfPadding); + } + } + else { + if (this.vScrollElement.scrollTop > offset) { + this.vScrollElement.scrollTop = offset; + } } - else if (this.vScrollElement.scrollTop < offset - this.offsetHeight + height) { + if (this.vScrollElement.scrollTop < offset - this.offsetHeight + height) { this.vScrollElement.scrollTop = offset - this.offsetHeight + height; } } diff --git a/public/ui/legacy/components/perf_ui/ChartViewport.js.map b/public/ui/legacy/components/perf_ui/ChartViewport.js.map index 0b6bb2a06..d2c4418c8 100644 --- a/public/ui/legacy/components/perf_ui/ChartViewport.js.map +++ b/public/ui/legacy/components/perf_ui/ChartViewport.js.map @@ -1 +1 @@ -{"version":3,"file":"ChartViewport.js","sourceRoot":"","s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D,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,EACpD,CAAC,EAAC,IAAI,EAAE,IAAI,CAAC,eAAe,EAAE,EAAE,EAAE,SAAS,EAAC,EAAE,EAAC,IAAI,EAAE,IAAI,CAAC,gBAAgB,EAAE,EAAE,EAAE,OAAO,EAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE;YACnG,IAAI,CAAC,0BAA0B,GAAG,IAAI,CAAC;QACzC,CAAC,CAAC,CAAC;QAEP,SAAS,kBAAkB,CAAsB,SAAiB,EAAE,OAAe;YACjF,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;YACjC,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC;YAChC,IAAI,CAAC,MAAM,EAAE,CAAC;QAChB,CAAC;IACH,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAED,eAAe;QACb,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;CACF","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 i18n from '../../../../core/i18n/i18n.js';\nimport * as Platform from '../../../../core/platform/platform.js';\nimport * as Root from '../../../../core/root/root.js';\nimport * as Coordinator from '../../../components/render_coordinator/render_coordinator.js';\nimport * as UI from '../../legacy.js';\n\nimport chartViewPortStyles from './chartViewport.css.legacy.js';\nimport {MinimalTimeWindowMs} from './FlameChart.js';\n\nconst coordinator = Coordinator.RenderCoordinator.RenderCoordinator.instance();\n\nexport interface ChartViewportDelegate {\n windowChanged(startTime: number, endTime: number, animate: boolean): void;\n updateRangeSelection(startTime: number, endTime: number): void;\n setSize(width: number, height: number): void;\n update(): void;\n}\n\nexport interface Config {\n enableCursorElement: boolean;\n}\n\nexport class ChartViewport extends UI.Widget.VBox {\n private readonly delegate: ChartViewportDelegate;\n viewportElement: HTMLElement;\n private alwaysShowVerticalScrollInternal: boolean;\n private rangeSelectionEnabled: boolean;\n private vScrollElement: HTMLElement;\n private vScrollContent: HTMLElement;\n private readonly selectionOverlay: HTMLElement;\n private selectedTimeSpanLabel: HTMLElement;\n private cursorElement: HTMLElement;\n private isDraggingInternal!: boolean;\n private totalHeight!: number;\n private offsetHeight!: number;\n private scrollTop!: number;\n private rangeSelectionStart: number|null;\n private rangeSelectionEnd: number|null;\n private dragStartPointX!: number;\n private dragStartPointY!: number;\n private dragStartScrollTop!: number;\n private visibleLeftTime!: number;\n private visibleRightTime!: number;\n private offsetWidth!: number;\n private targetLeftTime!: number;\n private targetRightTime!: number;\n private selectionOffsetShiftX!: number;\n private selectionStartX!: number|null;\n private lastMouseOffsetX?: number;\n private minimumBoundary!: number;\n private totalTime!: number;\n private isUpdateScheduled?: boolean;\n private cancelWindowTimesAnimation?: (() => void)|null;\n\n #config: Config;\n\n #usingNewOverlayForTimeRange = Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_ANNOTATIONS);\n\n constructor(delegate: ChartViewportDelegate, config: Config) {\n super();\n this.#config = config;\n this.registerRequiredCSS(chartViewPortStyles);\n\n this.delegate = delegate;\n\n this.viewportElement = this.contentElement.createChild('div', 'fill');\n this.viewportElement.addEventListener('mousemove', this.updateCursorPosition.bind(this), false);\n this.viewportElement.addEventListener('mouseout', this.onMouseOut.bind(this), false);\n this.viewportElement.addEventListener('wheel', this.onMouseWheel.bind(this), false);\n this.viewportElement.addEventListener('keydown', this.onChartKeyDown.bind(this), false);\n this.viewportElement.addEventListener('keyup', this.onChartKeyUp.bind(this), false);\n\n UI.UIUtils.installDragHandle(\n this.viewportElement, this.startDragging.bind(this), this.dragging.bind(this), this.endDragging.bind(this),\n '-webkit-grabbing', null);\n UI.UIUtils.installDragHandle(\n this.viewportElement, this.startRangeSelection.bind(this), this.rangeSelectionDragging.bind(this),\n this.endRangeSelection.bind(this), 'text', null);\n\n this.alwaysShowVerticalScrollInternal = false;\n this.rangeSelectionEnabled = true;\n this.vScrollElement = this.contentElement.createChild('div', 'chart-viewport-v-scroll');\n this.vScrollContent = this.vScrollElement.createChild('div');\n this.vScrollElement.addEventListener('scroll', this.onScroll.bind(this), false);\n\n this.selectionOverlay = this.contentElement.createChild('div', 'chart-viewport-selection-overlay hidden');\n this.selectedTimeSpanLabel = this.selectionOverlay.createChild('div', 'time-span');\n\n this.cursorElement = this.contentElement.createChild('div', 'chart-cursor-element hidden');\n if (this.#usingNewOverlayForTimeRange) {\n this.cursorElement.classList.add('using-new-overlays');\n }\n\n this.reset();\n\n this.rangeSelectionStart = null;\n\n this.rangeSelectionEnd = null;\n }\n\n alwaysShowVerticalScroll(): void {\n this.alwaysShowVerticalScrollInternal = true;\n this.vScrollElement.classList.add('always-show-scrollbar');\n }\n\n disableRangeSelection(): void {\n this.rangeSelectionEnabled = false;\n this.rangeSelectionStart = null;\n this.rangeSelectionEnd = null;\n this.updateRangeSelectionOverlay();\n }\n\n isDragging(): boolean {\n return this.isDraggingInternal;\n }\n\n override elementsToRestoreScrollPositionsFor(): Element[] {\n return [this.vScrollElement];\n }\n\n private updateScrollBar(): void {\n const showScroll = this.alwaysShowVerticalScrollInternal || this.totalHeight > this.offsetHeight;\n if (this.vScrollElement.classList.contains('hidden') !== showScroll) {\n return;\n }\n this.vScrollElement.classList.toggle('hidden', !showScroll);\n this.updateContentElementSize();\n }\n\n override onResize(): void {\n this.updateScrollBar();\n this.updateContentElementSize();\n this.scheduleUpdate();\n }\n\n reset(): void {\n this.vScrollElement.scrollTop = 0;\n this.scrollTop = 0;\n this.rangeSelectionStart = null;\n this.rangeSelectionEnd = null;\n this.isDraggingInternal = false;\n this.dragStartPointX = 0;\n this.dragStartPointY = 0;\n this.dragStartScrollTop = 0;\n this.visibleLeftTime = 0;\n this.visibleRightTime = 0;\n this.offsetWidth = 0;\n this.offsetHeight = 0;\n this.totalHeight = 0;\n this.targetLeftTime = 0;\n this.targetRightTime = 0;\n this.isUpdateScheduled = false;\n this.updateContentElementSize();\n }\n\n private updateContentElementSize(): void {\n let offsetWidth: number = this.vScrollElement.offsetLeft;\n if (!offsetWidth) {\n offsetWidth = this.contentElement.offsetWidth;\n }\n this.offsetWidth = offsetWidth;\n this.offsetHeight = this.contentElement.offsetHeight;\n this.delegate.setSize(this.offsetWidth, this.offsetHeight);\n }\n\n setContentHeight(totalHeight: number): void {\n this.totalHeight = totalHeight;\n this.vScrollContent.style.height = totalHeight + 'px';\n this.updateScrollBar();\n this.updateContentElementSize();\n if (this.scrollTop + this.offsetHeight <= totalHeight) {\n return;\n }\n this.scrollTop = Math.max(0, totalHeight - this.offsetHeight);\n this.vScrollElement.scrollTop = this.scrollTop;\n }\n\n setScrollOffset(offset: number, height?: number): void {\n height = height || 0;\n if (this.vScrollElement.scrollTop > offset) {\n this.vScrollElement.scrollTop = offset;\n } else if (this.vScrollElement.scrollTop < offset - this.offsetHeight + height) {\n this.vScrollElement.scrollTop = offset - this.offsetHeight + height;\n }\n }\n\n scrollOffset(): number {\n return this.vScrollElement.scrollTop;\n }\n\n chartHeight(): number {\n return this.offsetHeight;\n }\n\n setBoundaries(zeroTime: number, totalTime: number): void {\n this.minimumBoundary = zeroTime;\n this.totalTime = totalTime;\n }\n\n private onMouseWheel(e: Event): void {\n const wheelEvent = (e as WheelEvent);\n const doZoomInstead = wheelEvent.shiftKey !==\n (Common.Settings.Settings.instance().moduleSetting('flamechart-mouse-wheel-action').get() === 'zoom');\n const panVertically = !doZoomInstead && (wheelEvent.deltaY || Math.abs(wheelEvent.deltaX) === 53);\n const panHorizontally = doZoomInstead && Math.abs(wheelEvent.deltaX) > Math.abs(wheelEvent.deltaY);\n if (panVertically) {\n this.vScrollElement.scrollTop += (wheelEvent.deltaY || wheelEvent.deltaX) / 53 * this.offsetHeight / 8;\n } else if (panHorizontally) {\n this.handlePanGesture(wheelEvent.deltaX, /* animate */ true);\n } else { // Zoom.\n const wheelZoomSpeed = 1 / 53;\n this.handleZoomGesture(Math.pow(1.2, (wheelEvent.deltaY || wheelEvent.deltaX) * wheelZoomSpeed) - 1);\n }\n\n // Block swipe gesture.\n e.consume(true);\n }\n\n private startDragging(event: MouseEvent): boolean {\n if (event.shiftKey) {\n return false;\n }\n this.isDraggingInternal = true;\n this.dragStartPointX = event.pageX;\n this.dragStartPointY = event.pageY;\n this.dragStartScrollTop = this.vScrollElement.scrollTop;\n this.viewportElement.style.cursor = '';\n return true;\n }\n\n private dragging(event: MouseEvent): void {\n const pixelShift = this.dragStartPointX - event.pageX;\n this.dragStartPointX = event.pageX;\n this.handlePanGesture(pixelShift);\n const pixelScroll = this.dragStartPointY - event.pageY;\n this.vScrollElement.scrollTop = this.dragStartScrollTop + pixelScroll;\n }\n\n private endDragging(): void {\n this.isDraggingInternal = false;\n }\n\n private startRangeSelection(event: MouseEvent): boolean {\n if (!event.shiftKey || !this.rangeSelectionEnabled) {\n return false;\n }\n this.isDraggingInternal = true;\n this.selectionOffsetShiftX = event.offsetX - event.pageX;\n this.selectionStartX = event.offsetX;\n if (!this.#usingNewOverlayForTimeRange) {\n const style = this.selectionOverlay.style;\n style.left = this.selectionStartX + 'px';\n style.width = '1px';\n this.selectedTimeSpanLabel.textContent = '';\n this.selectionOverlay.classList.remove('hidden');\n }\n return true;\n }\n\n private endRangeSelection(): void {\n this.isDraggingInternal = false;\n this.selectionStartX = null;\n }\n\n hideRangeSelection(): void {\n this.selectionOverlay.classList.add('hidden');\n this.rangeSelectionStart = null;\n this.rangeSelectionEnd = null;\n }\n\n /**\n * @param startTime - the start time of the selection in MilliSeconds\n * @param endTime - the end time of the selection in MilliSeconds\n * TODO(crbug.com/346312365): update the type definitions in ChartViewport.ts\n */\n setRangeSelection(startTime: number, endTime: number): void {\n if (!this.rangeSelectionEnabled) {\n return;\n }\n this.rangeSelectionStart = Math.min(startTime, endTime);\n this.rangeSelectionEnd = Math.max(startTime, endTime);\n this.updateRangeSelectionOverlay();\n this.delegate.updateRangeSelection(this.rangeSelectionStart, this.rangeSelectionEnd);\n }\n\n onClick(event: Event): void {\n const mouseEvent = (event as MouseEvent);\n const time = this.pixelToTime(mouseEvent.offsetX);\n if (this.rangeSelectionStart !== null && this.rangeSelectionEnd !== null && time >= this.rangeSelectionStart &&\n time <= this.rangeSelectionEnd) {\n return;\n }\n this.hideRangeSelection();\n }\n\n private rangeSelectionDragging(event: MouseEvent): void {\n const x = Platform.NumberUtilities.clamp(event.pageX + this.selectionOffsetShiftX, 0, this.offsetWidth);\n const start = this.pixelToTime(this.selectionStartX || 0);\n const end = this.pixelToTime(x);\n this.setRangeSelection(start, end);\n }\n\n private updateRangeSelectionOverlay(): void {\n if (this.#usingNewOverlayForTimeRange) {\n return;\n }\n\n const rangeSelectionStart = this.rangeSelectionStart || 0;\n const rangeSelectionEnd = this.rangeSelectionEnd || 0;\n const margin = 100;\n const left =\n Platform.NumberUtilities.clamp(this.timeToPosition(rangeSelectionStart), -margin, this.offsetWidth + margin);\n const right =\n Platform.NumberUtilities.clamp(this.timeToPosition(rangeSelectionEnd), -margin, this.offsetWidth + margin);\n const style = this.selectionOverlay.style;\n style.left = left + 'px';\n style.width = (right - left) + 'px';\n const timeSpan = rangeSelectionEnd - rangeSelectionStart;\n this.selectedTimeSpanLabel.textContent = i18n.TimeUtilities.preciseMillisToString(timeSpan, 2);\n }\n\n private onScroll(): void {\n this.scrollTop = this.vScrollElement.scrollTop;\n this.scheduleUpdate();\n }\n\n private onMouseOut(): void {\n this.lastMouseOffsetX = -1;\n this.showCursor(false);\n }\n\n private updateCursorPosition(e: Event): void {\n const mouseEvent = (e as MouseEvent);\n this.lastMouseOffsetX = mouseEvent.offsetX;\n const shouldShowCursor = this.#config.enableCursorElement && mouseEvent.shiftKey && !mouseEvent.metaKey;\n this.showCursor(shouldShowCursor);\n if (shouldShowCursor) {\n this.cursorElement.style.left = mouseEvent.offsetX + 'px';\n }\n }\n\n pixelToTime(x: number): number {\n return this.pixelToTimeOffset(x) + this.visibleLeftTime;\n }\n\n pixelToTimeOffset(x: number): number {\n return x * (this.visibleRightTime - this.visibleLeftTime) / this.offsetWidth;\n }\n\n timeToPosition(time: number): number {\n return Math.floor(\n (time - this.visibleLeftTime) / (this.visibleRightTime - this.visibleLeftTime) * this.offsetWidth);\n }\n\n timeToPixel(): number {\n return this.offsetWidth / (this.visibleRightTime - this.visibleLeftTime);\n }\n\n private showCursor(visible: boolean): void {\n this.cursorElement.classList.toggle('hidden', !visible || this.isDraggingInternal);\n }\n\n private onChartKeyDown(e: Event): void {\n const mouseEvent = (e as MouseEvent);\n this.showCursor(mouseEvent.shiftKey);\n this.handleZoomPanKeys(e);\n }\n\n private onChartKeyUp(e: Event): void {\n const mouseEvent = (e as MouseEvent);\n this.showCursor(mouseEvent.shiftKey);\n }\n\n private handleZoomPanKeys(e: Event): void {\n if (!UI.KeyboardShortcut.KeyboardShortcut.hasNoModifiers(e)) {\n return;\n }\n const keyboardEvent = (e as KeyboardEvent);\n const zoomFactor = keyboardEvent.shiftKey ? 0.8 : 0.3;\n const panOffset = keyboardEvent.shiftKey ? 320 : 160;\n switch (keyboardEvent.code) {\n case 'KeyA':\n this.handlePanGesture(-panOffset, /* animate */ true);\n break;\n case 'KeyD':\n this.handlePanGesture(panOffset, /* animate */ true);\n break;\n case 'KeyW':\n this.handleZoomGesture(-zoomFactor);\n break;\n case 'KeyS':\n this.handleZoomGesture(zoomFactor);\n break;\n default:\n return;\n }\n e.consume(true);\n }\n\n private handleZoomGesture(zoom: number): void {\n const bounds = {left: this.targetLeftTime, right: this.targetRightTime};\n // If the user has not moved their mouse over the panel (unlikely but\n // possible!), the offsetX will be undefined. In that case, let's just use\n // the minimum time / pixel 0 as their mouse point.\n const cursorTime = this.pixelToTime(this.lastMouseOffsetX || 0);\n bounds.left += (bounds.left - cursorTime) * zoom;\n bounds.right += (bounds.right - cursorTime) * zoom;\n this.requestWindowTimes(bounds, /* animate */ true);\n }\n\n private handlePanGesture(offset: number, animate?: boolean): void {\n const bounds = {left: this.targetLeftTime, right: this.targetRightTime};\n const timeOffset = Platform.NumberUtilities.clamp(\n this.pixelToTimeOffset(offset), this.minimumBoundary - bounds.left,\n this.totalTime + this.minimumBoundary - bounds.right);\n bounds.left += timeOffset;\n bounds.right += timeOffset;\n this.requestWindowTimes(bounds, Boolean(animate));\n }\n\n private requestWindowTimes(\n bounds: {\n left: number,\n right: number,\n },\n animate: boolean): void {\n const maxBound = this.minimumBoundary + this.totalTime;\n if (bounds.left < this.minimumBoundary) {\n bounds.right = Math.min(bounds.right + this.minimumBoundary - bounds.left, maxBound);\n bounds.left = this.minimumBoundary;\n } else if (bounds.right > maxBound) {\n bounds.left = Math.max(bounds.left - bounds.right + maxBound, this.minimumBoundary);\n bounds.right = maxBound;\n }\n if (bounds.right - bounds.left < MinimalTimeWindowMs) {\n return;\n }\n this.delegate.windowChanged(bounds.left, bounds.right, animate);\n }\n\n scheduleUpdate(): void {\n if (this.cancelWindowTimesAnimation || this.isUpdateScheduled) {\n return;\n }\n this.isUpdateScheduled = true;\n void coordinator.write(() => {\n this.isUpdateScheduled = false;\n this.update();\n });\n }\n\n private update(): void {\n this.updateRangeSelectionOverlay();\n this.delegate.update();\n }\n\n setWindowTimes(startTime: number, endTime: number, animate?: boolean): void {\n if (startTime === this.targetLeftTime && endTime === this.targetRightTime) {\n return;\n }\n if (!animate || this.visibleLeftTime === 0 || this.visibleRightTime === Infinity ||\n (startTime === 0 && endTime === Infinity) || (startTime === Infinity && endTime === Infinity)) {\n // Skip animation, move instantly.\n this.targetLeftTime = startTime;\n this.targetRightTime = endTime;\n this.visibleLeftTime = startTime;\n this.visibleRightTime = endTime;\n this.scheduleUpdate();\n return;\n }\n if (this.cancelWindowTimesAnimation) {\n this.cancelWindowTimesAnimation();\n this.visibleLeftTime = this.targetLeftTime;\n this.visibleRightTime = this.targetRightTime;\n }\n this.targetLeftTime = startTime;\n this.targetRightTime = endTime;\n this.cancelWindowTimesAnimation = UI.UIUtils.animateFunction(\n this.element.window(), animateWindowTimes.bind(this),\n [{from: this.visibleLeftTime, to: startTime}, {from: this.visibleRightTime, to: endTime}], 100, () => {\n this.cancelWindowTimesAnimation = null;\n });\n\n function animateWindowTimes(this: ChartViewport, startTime: number, endTime: number): void {\n this.visibleLeftTime = startTime;\n this.visibleRightTime = endTime;\n this.update();\n }\n }\n\n windowLeftTime(): number {\n return this.visibleLeftTime;\n }\n\n windowRightTime(): number {\n return this.visibleRightTime;\n }\n}\n"]} \ No newline at end of file +{"version":3,"file":"ChartViewport.js","sourceRoot":"","sources":["../../../../../../../../front_end/ui/legacy/components/perf_ui/ChartViewport.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,QAAQ,MAAM,uCAAuC,CAAC;AAClE,OAAO,KAAK,IAAI,MAAM,+BAA+B,CAAC;AACtD,OAAO,KAAK,WAAW,MAAM,8DAA8D,CAAC;AAC5F,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAEtC,OAAO,mBAAmB,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAC,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AAEpD,MAAM,WAAW,GAAG,WAAW,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,QAAQ,EAAE,CAAC;AAa/E,MAAM,OAAO,aAAc,SAAQ,EAAE,CAAC,MAAM,CAAC,IAAI;IAC9B,QAAQ,CAAwB;IACjD,eAAe,CAAc;IACrB,gCAAgC,CAAU;IAC1C,qBAAqB,CAAU;IAC/B,cAAc,CAAc;IAC5B,cAAc,CAAc;IACnB,gBAAgB,CAAc;IACvC,qBAAqB,CAAc;IACnC,aAAa,CAAc;IAC3B,kBAAkB,CAAW;IAC7B,WAAW,CAAU;IACrB,YAAY,CAAU;IACtB,SAAS,CAAU;IACnB,mBAAm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AChB,CAAC;IACH,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAED,eAAe;QACb,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;CACF","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 i18n from '../../../../core/i18n/i18n.js';\nimport * as Platform from '../../../../core/platform/platform.js';\nimport * as Root from '../../../../core/root/root.js';\nimport * as Coordinator from '../../../components/render_coordinator/render_coordinator.js';\nimport * as UI from '../../legacy.js';\n\nimport chartViewPortStyles from './chartViewport.css.legacy.js';\nimport {MinimalTimeWindowMs} from './FlameChart.js';\n\nconst coordinator = Coordinator.RenderCoordinator.RenderCoordinator.instance();\n\nexport interface ChartViewportDelegate {\n windowChanged(startTime: number, endTime: number, animate: boolean): void;\n updateRangeSelection(startTime: number, endTime: number): void;\n setSize(width: number, height: number): void;\n update(): void;\n}\n\nexport interface Config {\n enableCursorElement: boolean;\n}\n\nexport class ChartViewport extends UI.Widget.VBox {\n private readonly delegate: ChartViewportDelegate;\n viewportElement: HTMLElement;\n private alwaysShowVerticalScrollInternal: boolean;\n private rangeSelectionEnabled: boolean;\n private vScrollElement: HTMLElement;\n private vScrollContent: HTMLElement;\n private readonly selectionOverlay: HTMLElement;\n private selectedTimeSpanLabel: HTMLElement;\n private cursorElement: HTMLElement;\n private isDraggingInternal!: boolean;\n private totalHeight!: number;\n private offsetHeight!: number;\n private scrollTop!: number;\n private rangeSelectionStart: number|null;\n private rangeSelectionEnd: number|null;\n private dragStartPointX!: number;\n private dragStartPointY!: number;\n private dragStartScrollTop!: number;\n private visibleLeftTime!: number;\n private visibleRightTime!: number;\n private offsetWidth!: number;\n private targetLeftTime!: number;\n private targetRightTime!: number;\n private selectionOffsetShiftX!: number;\n private selectionStartX!: number|null;\n private lastMouseOffsetX?: number;\n private minimumBoundary!: number;\n private totalTime!: number;\n private isUpdateScheduled?: boolean;\n private cancelWindowTimesAnimation?: (() => void)|null;\n\n #config: Config;\n\n #usingNewOverlayForTimeRange = Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_ANNOTATIONS);\n\n constructor(delegate: ChartViewportDelegate, config: Config) {\n super();\n this.#config = config;\n this.registerRequiredCSS(chartViewPortStyles);\n\n this.delegate = delegate;\n\n this.viewportElement = this.contentElement.createChild('div', 'fill');\n this.viewportElement.addEventListener('mousemove', this.updateCursorPosition.bind(this), false);\n this.viewportElement.addEventListener('mouseout', this.onMouseOut.bind(this), false);\n this.viewportElement.addEventListener('wheel', this.onMouseWheel.bind(this), false);\n this.viewportElement.addEventListener('keydown', this.onChartKeyDown.bind(this), false);\n this.viewportElement.addEventListener('keyup', this.onChartKeyUp.bind(this), false);\n\n UI.UIUtils.installDragHandle(\n this.viewportElement, this.startDragging.bind(this), this.dragging.bind(this), this.endDragging.bind(this),\n '-webkit-grabbing', null);\n UI.UIUtils.installDragHandle(\n this.viewportElement, this.startRangeSelection.bind(this), this.rangeSelectionDragging.bind(this),\n this.endRangeSelection.bind(this), 'text', null);\n\n this.alwaysShowVerticalScrollInternal = false;\n this.rangeSelectionEnabled = true;\n this.vScrollElement = this.contentElement.createChild('div', 'chart-viewport-v-scroll');\n this.vScrollContent = this.vScrollElement.createChild('div');\n this.vScrollElement.addEventListener('scroll', this.onScroll.bind(this), false);\n\n this.selectionOverlay = this.contentElement.createChild('div', 'chart-viewport-selection-overlay hidden');\n this.selectedTimeSpanLabel = this.selectionOverlay.createChild('div', 'time-span');\n\n this.cursorElement = this.contentElement.createChild('div', 'chart-cursor-element hidden');\n if (this.#usingNewOverlayForTimeRange) {\n this.cursorElement.classList.add('using-new-overlays');\n }\n\n this.reset();\n\n this.rangeSelectionStart = null;\n\n this.rangeSelectionEnd = null;\n }\n\n alwaysShowVerticalScroll(): void {\n this.alwaysShowVerticalScrollInternal = true;\n this.vScrollElement.classList.add('always-show-scrollbar');\n }\n\n disableRangeSelection(): void {\n this.rangeSelectionEnabled = false;\n this.rangeSelectionStart = null;\n this.rangeSelectionEnd = null;\n this.updateRangeSelectionOverlay();\n }\n\n isDragging(): boolean {\n return this.isDraggingInternal;\n }\n\n override elementsToRestoreScrollPositionsFor(): Element[] {\n return [this.vScrollElement];\n }\n\n private updateScrollBar(): void {\n const showScroll = this.alwaysShowVerticalScrollInternal || this.totalHeight > this.offsetHeight;\n if (this.vScrollElement.classList.contains('hidden') !== showScroll) {\n return;\n }\n this.vScrollElement.classList.toggle('hidden', !showScroll);\n this.updateContentElementSize();\n }\n\n override onResize(): void {\n this.updateScrollBar();\n this.updateContentElementSize();\n this.scheduleUpdate();\n }\n\n reset(): void {\n this.vScrollElement.scrollTop = 0;\n this.scrollTop = 0;\n this.rangeSelectionStart = null;\n this.rangeSelectionEnd = null;\n this.isDraggingInternal = false;\n this.dragStartPointX = 0;\n this.dragStartPointY = 0;\n this.dragStartScrollTop = 0;\n this.visibleLeftTime = 0;\n this.visibleRightTime = 0;\n this.offsetWidth = 0;\n this.offsetHeight = 0;\n this.totalHeight = 0;\n this.targetLeftTime = 0;\n this.targetRightTime = 0;\n this.isUpdateScheduled = false;\n this.updateContentElementSize();\n }\n\n private updateContentElementSize(): void {\n let offsetWidth: number = this.vScrollElement.offsetLeft;\n if (!offsetWidth) {\n offsetWidth = this.contentElement.offsetWidth;\n }\n this.offsetWidth = offsetWidth;\n this.offsetHeight = this.contentElement.offsetHeight;\n this.delegate.setSize(this.offsetWidth, this.offsetHeight);\n }\n\n setContentHeight(totalHeight: number): void {\n this.totalHeight = totalHeight;\n this.vScrollContent.style.height = totalHeight + 'px';\n this.updateScrollBar();\n this.updateContentElementSize();\n if (this.scrollTop + this.offsetHeight <= totalHeight) {\n return;\n }\n this.scrollTop = Math.max(0, totalHeight - this.offsetHeight);\n this.vScrollElement.scrollTop = this.scrollTop;\n }\n\n /**\n * @param centered - If true, scrolls offset to where it is centered on the chart,\n * based on current the this.offsetHeight value.\n */\n setScrollOffset(offset: number, height?: number, centered?: boolean): void {\n height = height || 0;\n if (centered) {\n // Half of the height for padding.\n const halfPadding = Math.floor(this.offsetHeight / 2);\n\n if (this.vScrollElement.scrollTop > offset) {\n // Need to scroll up, include height.\n this.vScrollElement.scrollTop = offset - (height + halfPadding);\n }\n } else {\n if (this.vScrollElement.scrollTop > offset) {\n this.vScrollElement.scrollTop = offset;\n }\n }\n\n if (this.vScrollElement.scrollTop < offset - this.offsetHeight + height) {\n this.vScrollElement.scrollTop = offset - this.offsetHeight + height;\n }\n }\n\n scrollOffset(): number {\n return this.vScrollElement.scrollTop;\n }\n\n chartHeight(): number {\n return this.offsetHeight;\n }\n\n setBoundaries(zeroTime: number, totalTime: number): void {\n this.minimumBoundary = zeroTime;\n this.totalTime = totalTime;\n }\n\n private onMouseWheel(e: Event): void {\n const wheelEvent = (e as WheelEvent);\n const doZoomInstead = wheelEvent.shiftKey !==\n (Common.Settings.Settings.instance().moduleSetting('flamechart-mouse-wheel-action').get() === 'zoom');\n const panVertically = !doZoomInstead && (wheelEvent.deltaY || Math.abs(wheelEvent.deltaX) === 53);\n const panHorizontally = doZoomInstead && Math.abs(wheelEvent.deltaX) > Math.abs(wheelEvent.deltaY);\n if (panVertically) {\n this.vScrollElement.scrollTop += (wheelEvent.deltaY || wheelEvent.deltaX) / 53 * this.offsetHeight / 8;\n } else if (panHorizontally) {\n this.handlePanGesture(wheelEvent.deltaX, /* animate */ true);\n } else { // Zoom.\n const wheelZoomSpeed = 1 / 53;\n this.handleZoomGesture(Math.pow(1.2, (wheelEvent.deltaY || wheelEvent.deltaX) * wheelZoomSpeed) - 1);\n }\n\n // Block swipe gesture.\n e.consume(true);\n }\n\n private startDragging(event: MouseEvent): boolean {\n if (event.shiftKey) {\n return false;\n }\n this.isDraggingInternal = true;\n this.dragStartPointX = event.pageX;\n this.dragStartPointY = event.pageY;\n this.dragStartScrollTop = this.vScrollElement.scrollTop;\n this.viewportElement.style.cursor = '';\n return true;\n }\n\n private dragging(event: MouseEvent): void {\n const pixelShift = this.dragStartPointX - event.pageX;\n this.dragStartPointX = event.pageX;\n this.handlePanGesture(pixelShift);\n const pixelScroll = this.dragStartPointY - event.pageY;\n this.vScrollElement.scrollTop = this.dragStartScrollTop + pixelScroll;\n }\n\n private endDragging(): void {\n this.isDraggingInternal = false;\n }\n\n private startRangeSelection(event: MouseEvent): boolean {\n if (!event.shiftKey || !this.rangeSelectionEnabled) {\n return false;\n }\n this.isDraggingInternal = true;\n this.selectionOffsetShiftX = event.offsetX - event.pageX;\n this.selectionStartX = event.offsetX;\n if (!this.#usingNewOverlayForTimeRange) {\n const style = this.selectionOverlay.style;\n style.left = this.selectionStartX + 'px';\n style.width = '1px';\n this.selectedTimeSpanLabel.textContent = '';\n this.selectionOverlay.classList.remove('hidden');\n }\n return true;\n }\n\n private endRangeSelection(): void {\n this.isDraggingInternal = false;\n this.selectionStartX = null;\n }\n\n hideRangeSelection(): void {\n this.selectionOverlay.classList.add('hidden');\n this.rangeSelectionStart = null;\n this.rangeSelectionEnd = null;\n }\n\n /**\n * @param startTime - the start time of the selection in MilliSeconds\n * @param endTime - the end time of the selection in MilliSeconds\n * TODO(crbug.com/346312365): update the type definitions in ChartViewport.ts\n */\n setRangeSelection(startTime: number, endTime: number): void {\n if (!this.rangeSelectionEnabled) {\n return;\n }\n this.rangeSelectionStart = Math.min(startTime, endTime);\n this.rangeSelectionEnd = Math.max(startTime, endTime);\n this.updateRangeSelectionOverlay();\n this.delegate.updateRangeSelection(this.rangeSelectionStart, this.rangeSelectionEnd);\n }\n\n onClick(event: Event): void {\n const mouseEvent = (event as MouseEvent);\n const time = this.pixelToTime(mouseEvent.offsetX);\n if (this.rangeSelectionStart !== null && this.rangeSelectionEnd !== null && time >= this.rangeSelectionStart &&\n time <= this.rangeSelectionEnd) {\n return;\n }\n this.hideRangeSelection();\n }\n\n private rangeSelectionDragging(event: MouseEvent): void {\n const x = Platform.NumberUtilities.clamp(event.pageX + this.selectionOffsetShiftX, 0, this.offsetWidth);\n const start = this.pixelToTime(this.selectionStartX || 0);\n const end = this.pixelToTime(x);\n this.setRangeSelection(start, end);\n }\n\n private updateRangeSelectionOverlay(): void {\n if (this.#usingNewOverlayForTimeRange) {\n return;\n }\n\n const rangeSelectionStart = this.rangeSelectionStart || 0;\n const rangeSelectionEnd = this.rangeSelectionEnd || 0;\n const margin = 100;\n const left =\n Platform.NumberUtilities.clamp(this.timeToPosition(rangeSelectionStart), -margin, this.offsetWidth + margin);\n const right =\n Platform.NumberUtilities.clamp(this.timeToPosition(rangeSelectionEnd), -margin, this.offsetWidth + margin);\n const style = this.selectionOverlay.style;\n style.left = left + 'px';\n style.width = (right - left) + 'px';\n const timeSpan = rangeSelectionEnd - rangeSelectionStart;\n this.selectedTimeSpanLabel.textContent = i18n.TimeUtilities.preciseMillisToString(timeSpan, 2);\n }\n\n private onScroll(): void {\n this.scrollTop = this.vScrollElement.scrollTop;\n this.scheduleUpdate();\n }\n\n private onMouseOut(): void {\n this.lastMouseOffsetX = -1;\n this.showCursor(false);\n }\n\n private updateCursorPosition(e: Event): void {\n const mouseEvent = (e as MouseEvent);\n this.lastMouseOffsetX = mouseEvent.offsetX;\n const shouldShowCursor = this.#config.enableCursorElement && mouseEvent.shiftKey && !mouseEvent.metaKey;\n this.showCursor(shouldShowCursor);\n if (shouldShowCursor) {\n this.cursorElement.style.left = mouseEvent.offsetX + 'px';\n }\n }\n\n pixelToTime(x: number): number {\n return this.pixelToTimeOffset(x) + this.visibleLeftTime;\n }\n\n pixelToTimeOffset(x: number): number {\n return x * (this.visibleRightTime - this.visibleLeftTime) / this.offsetWidth;\n }\n\n timeToPosition(time: number): number {\n return Math.floor(\n (time - this.visibleLeftTime) / (this.visibleRightTime - this.visibleLeftTime) * this.offsetWidth);\n }\n\n timeToPixel(): number {\n return this.offsetWidth / (this.visibleRightTime - this.visibleLeftTime);\n }\n\n private showCursor(visible: boolean): void {\n this.cursorElement.classList.toggle('hidden', !visible || this.isDraggingInternal);\n }\n\n private onChartKeyDown(e: Event): void {\n const mouseEvent = (e as MouseEvent);\n this.showCursor(mouseEvent.shiftKey);\n this.handleZoomPanKeys(e);\n }\n\n private onChartKeyUp(e: Event): void {\n const mouseEvent = (e as MouseEvent);\n this.showCursor(mouseEvent.shiftKey);\n }\n\n private handleZoomPanKeys(e: Event): void {\n if (!UI.KeyboardShortcut.KeyboardShortcut.hasNoModifiers(e)) {\n return;\n }\n const keyboardEvent = (e as KeyboardEvent);\n const zoomFactor = keyboardEvent.shiftKey ? 0.8 : 0.3;\n const panOffset = keyboardEvent.shiftKey ? 320 : 160;\n switch (keyboardEvent.code) {\n case 'KeyA':\n this.handlePanGesture(-panOffset, /* animate */ true);\n break;\n case 'KeyD':\n this.handlePanGesture(panOffset, /* animate */ true);\n break;\n case 'KeyW':\n this.handleZoomGesture(-zoomFactor);\n break;\n case 'KeyS':\n this.handleZoomGesture(zoomFactor);\n break;\n default:\n return;\n }\n e.consume(true);\n }\n\n private handleZoomGesture(zoom: number): void {\n const bounds = {left: this.targetLeftTime, right: this.targetRightTime};\n // If the user has not moved their mouse over the panel (unlikely but\n // possible!), the offsetX will be undefined. In that case, let's just use\n // the minimum time / pixel 0 as their mouse point.\n const cursorTime = this.pixelToTime(this.lastMouseOffsetX || 0);\n bounds.left += (bounds.left - cursorTime) * zoom;\n bounds.right += (bounds.right - cursorTime) * zoom;\n this.requestWindowTimes(bounds, /* animate */ true);\n }\n\n private handlePanGesture(offset: number, animate?: boolean): void {\n const bounds = {left: this.targetLeftTime, right: this.targetRightTime};\n const timeOffset = Platform.NumberUtilities.clamp(\n this.pixelToTimeOffset(offset), this.minimumBoundary - bounds.left,\n this.totalTime + this.minimumBoundary - bounds.right);\n bounds.left += timeOffset;\n bounds.right += timeOffset;\n this.requestWindowTimes(bounds, Boolean(animate));\n }\n\n private requestWindowTimes(\n bounds: {\n left: number,\n right: number,\n },\n animate: boolean): void {\n const maxBound = this.minimumBoundary + this.totalTime;\n if (bounds.left < this.minimumBoundary) {\n bounds.right = Math.min(bounds.right + this.minimumBoundary - bounds.left, maxBound);\n bounds.left = this.minimumBoundary;\n } else if (bounds.right > maxBound) {\n bounds.left = Math.max(bounds.left - bounds.right + maxBound, this.minimumBoundary);\n bounds.right = maxBound;\n }\n if (bounds.right - bounds.left < MinimalTimeWindowMs) {\n return;\n }\n this.delegate.windowChanged(bounds.left, bounds.right, animate);\n }\n\n scheduleUpdate(): void {\n if (this.cancelWindowTimesAnimation || this.isUpdateScheduled) {\n return;\n }\n this.isUpdateScheduled = true;\n void coordinator.write(() => {\n this.isUpdateScheduled = false;\n this.update();\n });\n }\n\n private update(): void {\n this.updateRangeSelectionOverlay();\n this.delegate.update();\n }\n\n setWindowTimes(startTime: number, endTime: number, animate?: boolean): void {\n if (startTime === this.targetLeftTime && endTime === this.targetRightTime) {\n return;\n }\n if (!animate || this.visibleLeftTime === 0 || this.visibleRightTime === Infinity ||\n (startTime === 0 && endTime === Infinity) || (startTime === Infinity && endTime === Infinity)) {\n // Skip animation, move instantly.\n this.targetLeftTime = startTime;\n this.targetRightTime = endTime;\n this.visibleLeftTime = startTime;\n this.visibleRightTime = endTime;\n this.scheduleUpdate();\n return;\n }\n if (this.cancelWindowTimesAnimation) {\n this.cancelWindowTimesAnimation();\n this.visibleLeftTime = this.targetLeftTime;\n this.visibleRightTime = this.targetRightTime;\n }\n this.targetLeftTime = startTime;\n this.targetRightTime = endTime;\n this.cancelWindowTimesAnimation = UI.UIUtils.animateFunction(\n this.element.window(), animateWindowTimes.bind(this),\n [{from: this.visibleLeftTime, to: startTime}, {from: this.visibleRightTime, to: endTime}], 100, () => {\n this.cancelWindowTimesAnimation = null;\n });\n\n function animateWindowTimes(this: ChartViewport, startTime: number, endTime: number): void {\n this.visibleLeftTime = startTime;\n this.visibleRightTime = endTime;\n this.update();\n }\n }\n\n windowLeftTime(): number {\n return this.visibleLeftTime;\n }\n\n windowRightTime(): number {\n return this.visibleRightTime;\n }\n}\n"]} \ No newline at end of file diff --git a/public/ui/legacy/components/perf_ui/FlameChart.d.ts b/public/ui/legacy/components/perf_ui/FlameChart.d.ts index 0a8acf568..012693028 100644 --- a/public/ui/legacy/components/perf_ui/FlameChart.d.ts +++ b/public/ui/legacy/components/perf_ui/FlameChart.d.ts @@ -192,6 +192,7 @@ export declare class FlameChart extends FlameChart_base implements Calculator, C private dragging; private endDragging; timelineData(rebuid?: boolean): FlameChartTimelineData | null; + revealEntryVertically(entryIndex: number): void; revealEntry(entryIndex: number): void; setWindowTimes(startTime: number, endTime: number, animate?: boolean): void; /** @@ -221,7 +222,13 @@ export declare class FlameChart extends FlameChart_base implements Calculator, C private deselectAllEntries; private isGroupFocused; private scrollGroupIntoView; - private toggleGroupExpand; + /** + * Toggle a group's expanded state. + * @param groupIndex - the index of this group in the timelineData.groups + * array. Note that this is the array index, and not the startLevel of the + * group. + */ + toggleGroupExpand(groupIndex: number): void; private expandGroup; moveGroupUp(groupIndex: number): void; moveGroupDown(groupIndex: number): void; @@ -561,6 +568,7 @@ export interface FlameChartDataProvider { modifyTree?(action: FilterAction, entryIndex: number): void; findPossibleContextMenuActions?(node: number): PossibleFilterActions | void; handleFlameChartTransformKeyboardEvent?(event: KeyboardEvent, entryIndex: number, groupIndex: number): void; + groupForEvent?(entryIndex: number): Group | null; } export interface FlameChartMarker { startTime(): number; diff --git a/public/ui/legacy/components/perf_ui/FlameChart.js b/public/ui/legacy/components/perf_ui/FlameChart.js index f895bdbb3..fa947f0d6 100644 --- a/public/ui/legacy/components/perf_ui/FlameChart.js +++ b/public/ui/legacy/components/perf_ui/FlameChart.js @@ -433,6 +433,14 @@ export class FlameChart extends Common.ObjectWrapper.eventMixin(UI.Widget.VBox) } return this.rawTimelineData || null; } + revealEntryVertically(entryIndex) { + const timelineData = this.timelineData(); + if (!timelineData) { + return; + } + const level = timelineData.entryLevels[entryIndex]; + this.chartViewport.setScrollOffset(this.levelToOffset(level), this.levelHeight(level), true); + } revealEntry(entryIndex) { const timelineData = this.timelineData(); if (!timelineData) { @@ -800,6 +808,12 @@ export class FlameChart extends Common.ObjectWrapper.eventMixin(UI.Widget.VBox) const scrollHeight = Math.min(nextOffset - scrollTop, this.chartViewport.chartHeight()); this.chartViewport.setScrollOffset(scrollTop, scrollHeight); } + /** + * Toggle a group's expanded state. + * @param groupIndex - the index of this group in the timelineData.groups + * array. Note that this is the array index, and not the startLevel of the + * group. + */ toggleGroupExpand(groupIndex) { if (groupIndex < 0 || !this.isGroupCollapsible(groupIndex)) { return; diff --git a/public/ui/legacy/components/perf_ui/FlameChart.js.map b/public/ui/legacy/components/perf_ui/FlameChart.js.map index 572cb092d..c358d0f2a 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,IAAI,MAAM,+BAA+B,CAAC;AAEtD,OAAO,KAAK,WAAW,MAAM,mCAAmC,CAAC;AACjE,OAAO,KAAK,OAAO,MAAM,wCAAwC,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,KAAK,YAAY,MAAM,sCAAsC,CAAC;AAErE,OAAO,EAAC,kBAAkB,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAC5F,OAAO,EAAC,aAAa,EAA6B,MAAM,oBAAoB,CAAC;AAC7E,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAC,iBAAiB,EAAE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AAG,IAAI,CAAC;IAC5B,CAAC;IAED,qHAAqH;IACrH,eAAe;IACf,MAAM,CAAC,MAAM,CAAC,IAOb;QACC,OAAO,IAAI,sBAAsB,CAC7B,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,IAAI,EAAE,EACtG,IAAI,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC;IACjC,CAAC;IAED,qHAAqH;IACrH,eAAe;IACf,MAAM,CAAC,WAAW;QAChB,OAAO,IAAI,sBAAsB,CAC7B,EAAE,EAAG,2DAA2D;QAChE,EAAE,EAAG,qDAAqD;QAC1D,EAAE,EAAG,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 Root from '../../../../core/root/root.js';\nimport type * as TimelineModel from '../../../../models/timeline_model/timeline_model.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 {drawExpansionArrow, drawIcon, drawLegends, horizontalLine} from './CanvasHelper.js';\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 an action that adds a label annotation to an entry in the Flame Chart\n */\n labelEntry: 'Label entry',\n /**\n *@description Text for an action that adds link annotation between entries in the Flame Chart\n */\n linkEntries: 'Link entries',\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;\nexport const 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.\nexport const 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// The gap between the track header and the legends\nconst LEGEND_LEFT_PADDING = 16;\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 // Index of the last entry the popover was shown over.\n entryIndex: number;\n // Index of the last group the popover was shown over.\n groupIndex: 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;\n /**\n * The element to use when populating and positioning the mouse tooltip.\n */\n tooltipElement?: HTMLElement;\n /**\n * Used to disable the cursor element in ChartViewport and instead use the new overlays system.\n */\n useOverlaysForCursorRuler?: boolean;\n}\n\nexport const enum FilterAction {\n MERGE_FUNCTION = 'MERGE_FUNCTION',\n COLLAPSE_FUNCTION = 'COLLAPSE_FUNCTION',\n COLLAPSE_REPEATING_DESCENDANTS = 'COLLAPSE_REPEATING_DESCENDANTS',\n RESET_CHILDREN = 'RESET_CHILDREN',\n UNDO_ALL_ACTIONS = 'UNDO_ALL_ACTIONS',\n}\n\nexport interface UserFilterAction {\n type: FilterAction;\n entry: TraceEngine.Types.TraceEvents.TraceEventData;\n}\n\n// Object used to indicate to the Context Menu if an action is possible on the selected entry.\nexport interface PossibleFilterActions {\n [FilterAction.MERGE_FUNCTION]: boolean;\n [FilterAction.COLLAPSE_FUNCTION]: boolean;\n [FilterAction.COLLAPSE_REPEATING_DESCENDANTS]: boolean;\n [FilterAction.RESET_CHILDREN]: boolean;\n [FilterAction.UNDO_ALL_ACTIONS]: boolean;\n}\n\nexport class FlameChart extends Common.ObjectWrapper.eventMixin(UI.Widget.VBox)\n implements Calculator, ChartViewportDelegate {\n private readonly groupExpansionSetting?: Common.Settings.Setting;\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;\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?: boolean[]|null;\n private entryColorsCache?: string[]|null;\n private totalTime?: number;\n private lastPopoverState: PopoverState;\n\n #tooltipPopoverYAdjustment: number = 0;\n\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 // The ChartViewport has its own built-in ruler for when the user holds\n // shift and moves the mouse. We want to disable that if we are within the\n // performance panel where we use overlays, but enable it otherwise.\n let enableCursorElement = true;\n if (typeof optionalConfig.useOverlaysForCursorRuler === 'boolean') {\n enableCursorElement = !optionalConfig.useOverlaysForCursorRuler;\n }\n this.chartViewport = new ChartViewport(this, {\n enableCursorElement,\n });\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('dblclick', this.#onDblClick.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 =\n optionalConfig.tooltipElement || 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.CANVAS_FOCUSED);\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 groupIndex: -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 /**\n * In some cases we need to manually adjust the positioning of the tooltip\n * vertically to account for the fact that it might be rendered not relative\n * to just this flame chart. This is true of the main flame chart in the\n * Performance Panel where the element is rendered in a higher-stack container\n * and we need to manually adjust its Y position to correctly put the tooltip\n * in the right place.\n */\n setTooltipYPixelAdjustment(y: number): void {\n if (y === this.#tooltipPopoverYAdjustment) {\n return;\n }\n\n this.#tooltipPopoverYAdjustment = y;\n // Reposition the popover if it has any children (otherwise it is not visible)\n if (this.popoverElement.children.length) {\n this.updatePopoverOffset();\n }\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.ENTRY_HOVERED, 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 groupIndex: -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.ENTRY_HOVERED, -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 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. 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\", indicating track can be focused\n * 3. Inside a track -> update the highlight of hovered event\n */\n private onMouseMove(mouseEvent: MouseEvent): void {\n this.#searchResultEntryIndex = -1;\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\n const timeMilliSeconds = TraceEngine.Types.Timing.MilliSeconds(this.chartViewport.pixelToTime(mouseEvent.offsetX));\n\n this.dispatchEventToListeners(Events.MOUSE_MOVE, {\n mouseEvent,\n timeInMicroSeconds: TraceEngine.Helpers.Timing.millisecondsToMicroseconds(timeMilliSeconds),\n });\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.updateHighlight();\n this.viewportElement.style.cursor = 'pointer';\n return;\n case HoverType.INSIDE_TRACK:\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\n const {groupIndex, hoverType} =\n this.coordinatesToGroupIndexAndHoverType(this.lastMouseOffsetX, this.lastMouseOffsetY);\n if (hoverType === HoverType.INSIDE_TRACK_HEADER) {\n this.#updatePopoverForGroup(groupIndex);\n }\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 groupIndex: -1,\n hiddenEntriesPopover: isMouseOverRevealChildrenArrow,\n };\n }\n\n #updatePopoverForGroup(groupIndex: number): void {\n // Just update position if cursor is hovering the group name.\n if (groupIndex === this.lastPopoverState.groupIndex) {\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(groupIndex);\n if (group?.description) {\n this.popoverElement.innerText = (group?.description);\n this.updatePopoverOffset();\n }\n this.lastPopoverState = {\n groupIndex,\n entryIndex: -1,\n hiddenEntriesPopover: false,\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 || 0) + this.#tooltipPopoverYAdjustment + 'px';\n }\n\n /**\n * Handle double mouse click event in flame chart.\n */\n #onDblClick(mouseEvent: MouseEvent): void {\n this.focus();\n const {groupIndex} = this.coordinatesToGroupIndexAndHoverType(mouseEvent.offsetX, mouseEvent.offsetY);\n\n /**\n * When a hovered entry on any track is double clicked, create a label for it.\n *\n * Checking the existance of `highlightedEntryIndex` is enough to make sure that the double\n * click happenned on the entry since an entry is only highlighted if the mouse is hovering it.\n */\n if (this.highlightedEntryIndex !== -1) {\n this.#selectGroup(groupIndex);\n this.dispatchEventToListeners(Events.ENTRY_LABEL_ANNOTATION_ADDED, this.highlightedEntryIndex);\n }\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(mouseEvent: MouseEvent): void {\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.ENTRY_INVOKED, 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: FilterAction, index: number): void {\n const data = this.timelineData();\n if (!data || !this.dataProvider.modifyTree) {\n return;\n }\n this.dataProvider.modifyTree(treeAction, index);\n this.update();\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 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\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.ENTRY_INVOKED, this.highlightedEntryIndex);\n this.setSelectedEntry(this.highlightedEntryIndex);\n // Update the selected group as well.\n this.#selectGroup(groupIndex);\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 in given\n // the conditional checks above)\n // If the flame chart provider can build a customized context menu for the\n // given entry, we will use that, otherwise just do nothing and fall back to\n // default context menu.\n // We need to use |selectedEntryIndex| instead of |highlightedEntryIndex|.\n // The reason is when we call the |setSelectedEntry| and |#selectGroup|,\n // the flame chart will be redrawn, so the |highlightedEntryIndex| will be\n // reset to -1.\n // In real life, because we might trigger the |mousemove| event again, the\n // |highlightedEntryIndex| might be correct, but to make the code easier\n // to maintain, let's use |selectedEntryIndex|.\n this.contextMenu = this.dataProvider.customizedContextMenu?.(event, this.selectedEntryIndex, groupIndex) ??\n new UI.ContextMenu.ContextMenu(event, {useSoftMenu: true});\n\n if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.TIMELINE_ANNOTATIONS)) {\n const annotationSection = this.contextMenu.section('annotations');\n\n const labelEntryAnnotationOption = annotationSection.appendItem(i18nString(UIStrings.labelEntry), () => {\n this.dispatchEventToListeners(Events.ENTRY_LABEL_ANNOTATION_ADDED, this.selectedEntryIndex);\n });\n\n labelEntryAnnotationOption.setShortcut('Double Click');\n\n const linkEntriesAnnotationOption = annotationSection.appendItem(i18nString(UIStrings.linkEntries), () => {\n this.dispatchEventToListeners(\n Events.ENTRIES_LINK_ANNOTATION_CREATED, {entryFromIndex: this.selectedEntryIndex});\n });\n linkEntriesAnnotationOption.setShortcut('Double Click');\n }\n\n void this.contextMenu.show();\n }\n\n #handleFlameChartTransformEvent(event: KeyboardEvent): 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 this.dataProvider.handleFlameChartTransformKeyboardEvent?.(event, this.selectedEntryIndex, this.selectedGroupIndex);\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}|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.ENTRY_SELECTED, 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.ENTRY_SELECTED, levelIndexes[indexOnLevel]);\n return true;\n }\n if (event.key === 'Enter') {\n event.consume(true);\n this.dispatchEventToListeners(Events.ENTRY_INVOKED, 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, hoverType: HoverType.TRACK_CONFIG_UP_BUTTON};\n }\n if (DOWN_ICON_LEFT <= x && x < DOWN_ICON_LEFT + EDIT_ICON_WIDTH) {\n return {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,\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, 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, hoverType: HoverType.INSIDE_TRACK_HEADER};\n }\n return {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.LATEST_DRAW_DIMENSIONS, {\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:\n TraceEngine.Helpers.Timing.traceWindowFromMilliSeconds(this.minimumBoundary(), this.maximumBoundary()),\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.CHART_PLAYABLE_STATE_CHANGED, wideEntryExists);\n\n this.drawMarkers(context, timelineData, markerIndices);\n\n this.drawEventTitles(context, timelineData, titleIndices, canvasWidth);\n\n // If there is a `forceDecoration` function, it will be called in `drawEventTitles`, which will overwrite the\n // default decorations, so we need to call this function after the `drawEventTitles`.\n const allIndexes = Array.from(colorBuckets.values()).map(x => x.indexes).flat();\n this.#drawDecorations(context, timelineData, allIndexes);\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 let endTimePixels = barX + barWidth;\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\n // 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 endTimePixels = this.timeToPositionClipped(endTimeMilli);\n barWidth = endTimePixels - barX;\n }\n const triangleHeight = 8;\n let triangleWidth = 8;\n if (typeof decoration.customStartTime !== 'undefined') {\n // The user can pass a customStartTime to tell us where the event's box start and therefore where we\n // should draw the triangle. So therefore we calculate the width by taking the end time off the start\n // time.\n const startTimeMilli = TraceEngine.Helpers.Timing.microSecondsToMilliseconds(decoration.customStartTime);\n const startTimePixels = this.timeToPositionClipped(startTimeMilli);\n triangleWidth = Math.min(endTimePixels - startTimePixels, 8);\n }\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 - triangleWidth, barY);\n context.lineTo(barX + barWidth, barY);\n context.lineTo(barX + barWidth, barY + triangleHeight);\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, 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();\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?.[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 const levelForcedDrawable = Boolean(this.dataProvider.forceDrawableLevel?.(level));\n if (entryOffsetRight <= this.chartViewport.windowLeftTime() && !levelForcedDrawable) {\n // If the event is entirely to the left of the visible window, and the level is not forced to be drawn, we can stop processing this level.\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 // Draw a separator line at the beginning of each top-level group (except the first one).\n this.forEachGroupInViewport((offset, index, group, isFirst) => {\n if (isFirst || group.style.padding < 4) {\n return;\n }\n horizontalLine(context, width, offset - 2.5);\n });\n // Draw a separator line at the end of all groups.\n horizontalLine(context, width, 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 if (group.legends && group.expanded) {\n drawLegends(\n context, HEADER_LEFT_PADDING + this.labelWidthForGroup(context, group) + LEGEND_LEFT_PADDING, offset,\n group.legends);\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(context, UP_ICON_LEFT, offset, EDIT_ICON_WIDTH, moveUpIconPath, iconColor);\n drawIcon(context, DOWN_ICON_LEFT, offset, EDIT_ICON_WIDTH, moveDownIconPath, iconColor);\n }\n // If this is the last visible top-level group, we will disable the hide action.\n drawIcon(\n context, HIDE_ICON_LEFT, offset, EDIT_ICON_WIDTH, 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(\n context, 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\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(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(a: Common.SegmentedRange.Segment, b: Common.SegmentedRange.Segment):\n Common.SegmentedRange.Segment|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 // Draw an arrow in an 'elbow connector' shape if the initiator ends before the initiated event starts, like this\n // ---\n // |\n // --->\n // Otherwise directly draw from the initiator start to initiated start, like this:\n // |\n // |\n // ---->\n const initiatorStartTime = entryStartTimes[initiatorsData.initiatorIndex];\n const initiatorEndTime =\n entryStartTimes[initiatorsData.initiatorIndex] + entryTotalTimes[initiatorsData.initiatorIndex];\n const initiatedStartTime = entryStartTimes[initiatorsData.eventIndex];\n\n const initiatorEndsBeforeInitiatedStart = initiatorEndTime < initiatedStartTime;\n const initiatorArrowStartTime = initiatorEndsBeforeInitiatedStart ?\n initiatorEndTime :\n // The blue indicator's width is 2, so add a little bit offset to start the arrow.\n Math.max(initiatorStartTime, this.chartViewport.pixelToTime(5));\n const initiatorArrowEndTime = initiatedStartTime;\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 around 'collapsed entries' arrow to indicate that the initiated entry is hidden\n if (initiatorsData.isInitiatorHidden) {\n const {circleEndX} = this.drawCircleAroundCollapseArrow(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.drawCircleAroundCollapseArrow(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 // Make line an arrow if the line is long enough to fit the arrow head. Otherwise, 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 if (initiatorEndsBeforeInitiatedStart) {\n // ---\n // |\n // --->\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 } else {\n // |\n // |\n // ---->\n context.beginPath();\n context.moveTo(startX, startY);\n context.lineTo(startX, endY);\n context.lineTo(endX, endY);\n context.stroke();\n }\n }\n context.restore();\n }\n\n private drawCircleAroundCollapseArrow(\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 Array(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) ?? false;\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(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 customStartTime?: TraceEngine.Types.Timing.MicroSeconds,\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 = {\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 DataProviderSearchResult {\n index: number;\n startTimeMilli: TraceEngine.Types.Timing.MilliSeconds;\n provider: 'main'|'network'|'other';\n}\n\nexport interface DataProviderSearchResult {\n index: number;\n startTimeMilli: TraceEngine.Types.Timing.MilliSeconds;\n provider: 'main'|'network'|'other';\n}\n\nexport interface FlameChartDataProvider {\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 forceDrawableLevel?(level: number): boolean;\n\n textColor(entryIndex: number): string;\n\n mainFrameNavigationStartEvents?(): readonly TraceEngine.Types.TraceEvents.TraceEventNavigationStart[];\n\n hasTrackConfigurationMode(): boolean;\n\n // The following functions are optional and are used in Performance panel.\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.Types.TraceEvents.LegacyTimelineFrame): number|null;\n\n buildFlowForInitiator?(index: number): unknown;\n\n customizedContextMenu?\n (event: MouseEvent, eventIndex: number, groupIndex: number): UI.ContextMenu.ContextMenu|undefined;\n\n search?\n (visibleWindow: TraceEngine.Types.Timing.TraceWindowMicroSeconds,\n filter: TimelineModel.TimelineModelFilter.TimelineModelFilter): DataProviderSearchResult[];\n\n // The following three functions are used for the flame chart entry customization.\n modifyTree?(action: FilterAction, entryIndex: number): void;\n\n findPossibleContextMenuActions?(node: number): PossibleFilterActions|void;\n\n handleFlameChartTransformKeyboardEvent?(event: KeyboardEvent, entryIndex: number, groupIndex: number): void;\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 element of the FlameChart is focused by the user.\n **/\n CANVAS_FOCUSED = 'CanvasFocused',\n /**\n * Emitted when an event is selected by either mouse click, or hitting\n * on the keyboard - e.g. the same actions that would invoke a\n *