chrome-devtools-frontend 1.0.1672557 → 1.0.1675430

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/.agents/skills/devtools-ux-writing-refactor/SKILL.md +26 -9
  2. package/front_end/core/common/ParsedURL.ts +5 -1
  3. package/front_end/core/common/SettingRegistration.ts +30 -34
  4. package/front_end/core/common/Settings.ts +4 -64
  5. package/front_end/core/host/UserMetrics.ts +127 -117
  6. package/front_end/core/protocol_client/PuppeteerDevToolsConnection.ts +42 -9
  7. package/front_end/core/root/Runtime.ts +14 -0
  8. package/front_end/core/sdk/NetworkManager.ts +0 -35
  9. package/front_end/core/sdk/SourceMap.ts +1 -19
  10. package/front_end/core/sdk/SourceMapManager.ts +75 -48
  11. package/front_end/core/sdk/SourceMapScopesInfo.ts +0 -62
  12. package/front_end/core/sdk/TargetManager.ts +18 -0
  13. package/front_end/devtools_compatibility.js +1 -1
  14. package/front_end/entrypoints/main/MainImpl.ts +1 -0
  15. package/front_end/foundation/Universe.ts +44 -29
  16. package/front_end/generated/InspectorBackendCommands.ts +4 -3
  17. package/front_end/generated/SupportedCSSProperties.ts +16 -1
  18. package/front_end/generated/protocol-mapping.d.ts +8 -0
  19. package/front_end/generated/protocol-proxy-api.d.ts +6 -0
  20. package/front_end/generated/protocol.ts +16 -2
  21. package/front_end/models/ai_assistance/AiSetting.ts +66 -3
  22. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +15 -5
  23. package/front_end/models/bindings/CompilerScriptMapping.ts +1 -1
  24. package/front_end/models/emulation/DeviceModeModel.ts +82 -102
  25. package/front_end/models/emulation/EmulatedDevices.ts +18 -66
  26. package/front_end/models/javascript_metadata/NativeFunctions.js +4 -4
  27. package/front_end/models/persistence/AutomaticFileSystemManager.ts +2 -2
  28. package/front_end/models/persistence/IsolatedFileSystemManager.ts +20 -29
  29. package/front_end/models/trace/ModelImpl.ts +5 -0
  30. package/front_end/models/trace/Processor.ts +5 -0
  31. package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +7 -1
  32. package/front_end/models/trace/handlers/MetaHandler.ts +8 -4
  33. package/front_end/models/trace/handlers/PageLoadMetricsHandler.ts +11 -0
  34. package/front_end/models/workspace/FileManager.ts +13 -6
  35. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +11 -10
  36. package/front_end/panels/ai_assistance/ai_assistance-meta.ts +3 -45
  37. package/front_end/panels/application/BackgroundServiceView.ts +42 -40
  38. package/front_end/panels/application/KeyValueStorageItemsView.ts +1 -0
  39. package/front_end/panels/application/WebMCPView.ts +13 -5
  40. package/front_end/panels/application/components/AdsView.ts +24 -1
  41. package/front_end/panels/application/components/adsView.css +27 -21
  42. package/front_end/panels/autofill/AutofillView.ts +12 -12
  43. package/front_end/panels/autofill/autofill-meta.ts +2 -2
  44. package/front_end/panels/common/ExtensionServer.ts +7 -1
  45. package/front_end/panels/common/common.ts +0 -1
  46. package/front_end/panels/console/ConsoleInsightTeaser.ts +7 -6
  47. package/front_end/panels/console/ConsoleViewMessage.ts +1 -1
  48. package/front_end/panels/elements/ClassesPaneWidget.ts +2 -2
  49. package/front_end/panels/elements/ElementsTreeElement.ts +602 -327
  50. package/front_end/panels/elements/ElementsTreeOutline.ts +1 -1
  51. package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
  52. package/front_end/panels/elements/components/AdornerManager.ts +1 -0
  53. package/front_end/panels/emulation/AdvancedApp.ts +3 -3
  54. package/front_end/panels/emulation/DeviceModeToolbar.ts +2 -11
  55. package/front_end/panels/emulation/DeviceModeView.ts +234 -75
  56. package/front_end/panels/emulation/InspectedPagePlaceholder.ts +1 -1
  57. package/front_end/panels/emulation/deviceModeView.css +4 -21
  58. package/front_end/panels/emulation/emulation-meta.ts +4 -30
  59. package/front_end/panels/emulation/emulation.ts +0 -3
  60. package/front_end/panels/explain/components/ConsoleInsight.ts +11 -7
  61. package/front_end/panels/js_timeline/js_timeline-meta.ts +8 -8
  62. package/front_end/panels/layer_viewer/LayerDetailsView.ts +30 -30
  63. package/front_end/panels/layer_viewer/LayerTreeOutline.ts +6 -6
  64. package/front_end/panels/layer_viewer/LayerViewHost.ts +1 -1
  65. package/front_end/panels/layer_viewer/Layers3DView.ts +11 -11
  66. package/front_end/panels/layer_viewer/PaintProfilerView.ts +8 -8
  67. package/front_end/panels/layer_viewer/TransformController.ts +3 -3
  68. package/front_end/panels/layer_viewer/layer_viewer-meta.ts +11 -11
  69. package/front_end/panels/layers/LayersPanel.ts +2 -2
  70. package/front_end/panels/layers/layers-meta.ts +2 -2
  71. package/front_end/panels/lighthouse/LighthouseController.ts +3 -7
  72. package/front_end/panels/mobile_throttling/CPUThrottlingSelector.ts +313 -0
  73. package/front_end/panels/mobile_throttling/NetworkPanelIndicator.ts +0 -10
  74. package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +21 -10
  75. package/front_end/panels/mobile_throttling/ThrottlingManager.ts +1 -58
  76. package/front_end/panels/mobile_throttling/mobile_throttling.ts +2 -9
  77. package/front_end/panels/network/NetworkConfigView.ts +1 -71
  78. package/front_end/panels/network/networkConfigView.css +1 -2
  79. package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +3 -3
  80. package/front_end/panels/profiler/HeapDetachedElementsView.ts +5 -5
  81. package/front_end/panels/profiler/HeapProfileView.ts +32 -32
  82. package/front_end/panels/profiler/HeapProfilerPanel.ts +2 -2
  83. package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +33 -37
  84. package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +26 -27
  85. package/front_end/panels/profiler/HeapSnapshotView.ts +48 -48
  86. package/front_end/panels/profiler/IsolateSelector.ts +10 -10
  87. package/front_end/panels/profiler/ModuleUIStrings.ts +25 -25
  88. package/front_end/panels/profiler/ProfileLauncherView.ts +6 -6
  89. package/front_end/panels/profiler/ProfilesPanel.ts +6 -6
  90. package/front_end/panels/profiler/WritableProfileHeader.ts +6 -6
  91. package/front_end/panels/profiler/profiler-meta.ts +7 -7
  92. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +7 -0
  93. package/front_end/panels/recorder/RecorderPanel.ts +1 -1
  94. package/front_end/panels/settings/AISettingsTab.ts +27 -23
  95. package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +1 -2
  96. package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +12 -17
  97. package/front_end/panels/timeline/TimelinePanel.ts +20 -35
  98. package/front_end/panels/timeline/components/LiveMetricsView.ts +27 -6
  99. package/front_end/panels/timeline/components/NetworkTrackWidget.ts +1 -1
  100. package/front_end/panels/timeline/components/components.ts +0 -4
  101. package/front_end/panels/timeline/components/liveMetricsView.css +7 -0
  102. package/front_end/third_party/chromium/README.chromium +1 -1
  103. package/front_end/third_party/source-map-scopes-codec/package/CONTRIBUTING.md +0 -0
  104. package/front_end/third_party/source-map-scopes-codec/package/LICENSE +0 -0
  105. package/front_end/third_party/source-map-scopes-codec/package/README.md +0 -0
  106. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/builder.d.ts +0 -0
  107. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/builder.d.ts.map +1 -1
  108. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/safe_builder.d.ts +0 -0
  109. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/safe_builder.d.ts.map +0 -0
  110. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts +0 -0
  111. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts.map +0 -0
  112. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/encode/encode.d.ts +0 -0
  113. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/encode/encode.d.ts.map +0 -0
  114. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts +0 -0
  115. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts.map +0 -0
  116. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/scopes.d.ts +0 -0
  117. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/scopes.d.ts.map +0 -0
  118. package/front_end/third_party/source-map-scopes-codec/package/deno.json +1 -1
  119. package/front_end/third_party/source-map-scopes-codec/package/package.json +1 -1
  120. package/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.js +2 -0
  121. package/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.js.map +1 -1
  122. package/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.ts +2 -0
  123. package/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.js +0 -0
  124. package/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.js.map +0 -0
  125. package/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.ts +0 -0
  126. package/front_end/third_party/source-map-scopes-codec/package/src/codec.js +0 -0
  127. package/front_end/third_party/source-map-scopes-codec/package/src/codec.js.map +0 -0
  128. package/front_end/third_party/source-map-scopes-codec/package/src/codec.ts +0 -0
  129. package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js +0 -0
  130. package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js.map +0 -0
  131. package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.ts +0 -0
  132. package/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.js +0 -0
  133. package/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.js.map +0 -0
  134. package/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.ts +0 -0
  135. package/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js +0 -0
  136. package/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js.map +0 -0
  137. package/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.ts +0 -0
  138. package/front_end/third_party/source-map-scopes-codec/package/src/mod.js +0 -0
  139. package/front_end/third_party/source-map-scopes-codec/package/src/mod.js.map +0 -0
  140. package/front_end/third_party/source-map-scopes-codec/package/src/mod.ts +0 -0
  141. package/front_end/third_party/source-map-scopes-codec/package/src/scopes.js +0 -0
  142. package/front_end/third_party/source-map-scopes-codec/package/src/scopes.js.map +0 -0
  143. package/front_end/third_party/source-map-scopes-codec/package/src/scopes.ts +0 -0
  144. package/front_end/third_party/source-map-scopes-codec/package/src/util.js +0 -0
  145. package/front_end/third_party/source-map-scopes-codec/package/src/util.js.map +0 -0
  146. package/front_end/third_party/source-map-scopes-codec/package/src/util.ts +0 -0
  147. package/front_end/third_party/source-map-scopes-codec/package/src/vlq.js +0 -0
  148. package/front_end/third_party/source-map-scopes-codec/package/src/vlq.js.map +0 -0
  149. package/front_end/third_party/source-map-scopes-codec/package/src/vlq.ts +0 -0
  150. package/front_end/ui/comments/CommentAnchorResolver.ts +132 -0
  151. package/front_end/ui/comments/comments.ts +9 -0
  152. package/front_end/ui/components/dialogs/ShortcutDialog.ts +2 -0
  153. package/front_end/ui/components/settings/SettingCheckbox.ts +4 -12
  154. package/front_end/ui/components/settings/settingCheckbox.css +0 -7
  155. package/front_end/ui/legacy/Treeoutline.ts +14 -14
  156. package/front_end/ui/legacy/UIUtils.ts +2 -47
  157. package/front_end/ui/legacy/Widget.ts +10 -2
  158. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +40 -0
  159. package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +1 -1
  160. package/front_end/ui/legacy/components/utils/Linkifier.ts +1 -0
  161. package/front_end/ui/lit/Directives.ts +80 -0
  162. package/front_end/ui/lit/lit.ts +1 -0
  163. package/front_end/ui/lit/render.ts +8 -0
  164. package/front_end/ui/settings/SettingUIRegistration.ts +4 -0
  165. package/front_end/ui/visual_logging/Debugging.ts +1 -5
  166. package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
  167. package/front_end/ui/visual_logging/LoggingConfig.ts +21 -0
  168. package/front_end/ui/visual_logging/visual_logging.ts +9 -0
  169. package/mcp/mcp.ts +1 -0
  170. package/package.json +1 -1
  171. package/front_end/panels/common/ThrottlingUtils.ts +0 -51
  172. package/front_end/panels/emulation/DeviceModeWrapper.ts +0 -248
  173. package/front_end/panels/mobile_throttling/MobileThrottlingSelector.ts +0 -92
  174. package/front_end/panels/timeline/components/CPUThrottlingSelector.ts +0 -235
  175. package/front_end/panels/timeline/components/NetworkThrottlingSelector.ts +0 -245
  176. package/front_end/panels/timeline/components/cpuThrottlingSelector.css +0 -30
  177. package/front_end/panels/timeline/components/networkThrottlingSelector.css +0 -24
@@ -435,6 +435,7 @@ inspectorBackend.registerCommand("DOM.getContainerForNode", [{"name": "nodeId",
435
435
  inspectorBackend.registerCommand("DOM.getQueryingDescendantsForContainer", [{"name": "nodeId", "type": "number", "optional": false, "description": "Id of the container node to find querying descendants from.", "typeRef": "DOM.NodeId"}], ["nodeIds"], "Returns the descendants of a container query container that have container queries against this container.");
436
436
  inspectorBackend.registerCommand("DOM.getAnchorElement", [{"name": "nodeId", "type": "number", "optional": false, "description": "Id of the positioned element from which to find the anchor.", "typeRef": "DOM.NodeId"}, {"name": "anchorSpecifier", "type": "string", "optional": true, "description": "An optional anchor specifier, as defined in https://www.w3.org/TR/css-anchor-position-1/#anchor-specifier. If not provided, it will return the implicit anchor element for the given positioned element.", "typeRef": null}], ["nodeId"], "Returns the target anchor element of the given anchor query according to https://www.w3.org/TR/css-anchor-position-1/#target.");
437
437
  inspectorBackend.registerCommand("DOM.forceShowPopover", [{"name": "nodeId", "type": "number", "optional": false, "description": "Id of the popover HTMLElement", "typeRef": "DOM.NodeId"}, {"name": "enable", "type": "boolean", "optional": false, "description": "If true, opens the popover and keeps it open. If false, closes the popover if it was previously force-opened.", "typeRef": null}, {"name": "invokerNodeId", "type": "number", "optional": true, "description": "Optional ID of the element invoking this popover, used to establish the implicit anchor. If not provided, it will fall back to the first invoker in the document, preferring elements with a popovertarget attribute over those with a commandfor attribute. Note that if there are multiple invokers, this is just an estimate.", "typeRef": "DOM.BackendNodeId"}], ["nodeIds"], "When enabling, this API force-opens the popover identified by nodeId and keeps it open until disabled.");
438
+ inspectorBackend.registerCommand("DOM.forceShowInterest", [{"name": "nodeId", "type": "number", "optional": false, "description": "Id of the interest invoker HTMLElement.", "typeRef": "DOM.NodeId"}, {"name": "enable", "type": "boolean", "optional": false, "description": "If true, opens and holds interest. If false, releases forced interest.", "typeRef": null}], [], "When enabling, this API forces an element to gain interest in its target, keeping interest active until disabled.");
438
439
  inspectorBackend.registerType("DOM.BackendNode", [{"name": "nodeType", "type": "number", "optional": false, "description": "`Node`'s nodeType.", "typeRef": null}, {"name": "nodeName", "type": "string", "optional": false, "description": "`Node`'s nodeName.", "typeRef": null}, {"name": "backendNodeId", "type": "number", "optional": false, "description": "", "typeRef": "DOM.BackendNodeId"}]);
439
440
  inspectorBackend.registerType("DOM.Node", [{"name": "nodeId", "type": "number", "optional": false, "description": "Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend will only push node with given `id` once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client.", "typeRef": "DOM.NodeId"}, {"name": "parentId", "type": "number", "optional": true, "description": "The id of the parent node if any.", "typeRef": "DOM.NodeId"}, {"name": "backendNodeId", "type": "number", "optional": false, "description": "The BackendNodeId for this node.", "typeRef": "DOM.BackendNodeId"}, {"name": "nodeType", "type": "number", "optional": false, "description": "`Node`'s nodeType.", "typeRef": null}, {"name": "nodeName", "type": "string", "optional": false, "description": "`Node`'s nodeName.", "typeRef": null}, {"name": "localName", "type": "string", "optional": false, "description": "`Node`'s localName.", "typeRef": null}, {"name": "nodeValue", "type": "string", "optional": false, "description": "`Node`'s nodeValue.", "typeRef": null}, {"name": "childNodeCount", "type": "number", "optional": true, "description": "Child count for `Container` nodes.", "typeRef": null}, {"name": "children", "type": "array", "optional": true, "description": "Child nodes of this node when requested with children.", "typeRef": "DOM.Node"}, {"name": "attributes", "type": "array", "optional": true, "description": "Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`.", "typeRef": "string"}, {"name": "documentURL", "type": "string", "optional": true, "description": "Document URL that `Document` or `FrameOwner` node points to.", "typeRef": null}, {"name": "baseURL", "type": "string", "optional": true, "description": "Base URL that `Document` or `FrameOwner` node uses for URL completion.", "typeRef": null}, {"name": "publicId", "type": "string", "optional": true, "description": "`DocumentType`'s publicId.", "typeRef": null}, {"name": "systemId", "type": "string", "optional": true, "description": "`DocumentType`'s systemId.", "typeRef": null}, {"name": "internalSubset", "type": "string", "optional": true, "description": "`DocumentType`'s internalSubset.", "typeRef": null}, {"name": "xmlVersion", "type": "string", "optional": true, "description": "`Document`'s XML version in case of XML documents.", "typeRef": null}, {"name": "name", "type": "string", "optional": true, "description": "`Attr`'s name.", "typeRef": null}, {"name": "value", "type": "string", "optional": true, "description": "`Attr`'s value.", "typeRef": null}, {"name": "pseudoType", "type": "string", "optional": true, "description": "Pseudo element type for this node.", "typeRef": "DOM.PseudoType"}, {"name": "pseudoIdentifier", "type": "string", "optional": true, "description": "Pseudo element identifier for this node. Only present if there is a valid pseudoType.", "typeRef": null}, {"name": "shadowRootType", "type": "string", "optional": true, "description": "Shadow root type.", "typeRef": "DOM.ShadowRootType"}, {"name": "frameId", "type": "string", "optional": true, "description": "Frame ID for frame owner elements.", "typeRef": "Page.FrameId"}, {"name": "contentDocument", "type": "object", "optional": true, "description": "Content document for frame owner elements.", "typeRef": "DOM.Node"}, {"name": "shadowRoots", "type": "array", "optional": true, "description": "Shadow root list for given element host.", "typeRef": "DOM.Node"}, {"name": "templateContent", "type": "object", "optional": true, "description": "Content document fragment for template elements.", "typeRef": "DOM.Node"}, {"name": "pseudoElements", "type": "array", "optional": true, "description": "Pseudo elements associated with this node.", "typeRef": "DOM.Node"}, {"name": "importedDocument", "type": "object", "optional": true, "description": "Deprecated, as the HTML Imports API has been removed (crbug.com/937746). This property used to return the imported document for the HTMLImport links. The property is always undefined now.", "typeRef": "DOM.Node"}, {"name": "distributedNodes", "type": "array", "optional": true, "description": "Distributed nodes for given insertion point.", "typeRef": "DOM.BackendNode"}, {"name": "isSVG", "type": "boolean", "optional": true, "description": "Whether the node is SVG.", "typeRef": null}, {"name": "compatibilityMode", "type": "string", "optional": true, "description": "", "typeRef": "DOM.CompatibilityMode"}, {"name": "assignedSlot", "type": "object", "optional": true, "description": "", "typeRef": "DOM.BackendNode"}, {"name": "isScrollable", "type": "boolean", "optional": true, "description": "", "typeRef": null}, {"name": "affectedByStartingStyles", "type": "boolean", "optional": true, "description": "", "typeRef": null}, {"name": "adoptedStyleSheets", "type": "array", "optional": true, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "adProvenance", "type": "object", "optional": true, "description": "", "typeRef": "Network.AdProvenance"}]);
440
441
  inspectorBackend.registerType("DOM.DetachedElementInfo", [{"name": "treeNode", "type": "object", "optional": false, "description": "", "typeRef": "DOM.Node"}, {"name": "retainedNodeIds", "type": "array", "optional": false, "description": "", "typeRef": "DOM.NodeId"}]);
@@ -1178,7 +1179,7 @@ inspectorBackend.registerType("Page.InstallabilityErrorArgument", [{"name": "nam
1178
1179
  inspectorBackend.registerType("Page.InstallabilityError", [{"name": "errorId", "type": "string", "optional": false, "description": "The error id (e.g. 'manifest-missing-suitable-icon').", "typeRef": null}, {"name": "errorArguments", "type": "array", "optional": false, "description": "The list of error arguments (e.g. {name:'minimum-icon-size-in-pixels', value:'64'}).", "typeRef": "Page.InstallabilityErrorArgument"}]);
1179
1180
  inspectorBackend.registerType("Page.CompilationCacheParams", [{"name": "url", "type": "string", "optional": false, "description": "The URL of the script to produce a compilation cache entry for.", "typeRef": null}, {"name": "eager", "type": "boolean", "optional": true, "description": "A hint to the backend whether eager compilation is recommended. (the actual compilation mode used is upon backend discretion).", "typeRef": null}]);
1180
1181
  inspectorBackend.registerType("Page.FileFilter", [{"name": "name", "type": "string", "optional": true, "description": "", "typeRef": null}, {"name": "accepts", "type": "array", "optional": true, "description": "", "typeRef": "string"}]);
1181
- inspectorBackend.registerType("Page.FileHandler", [{"name": "action", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "name", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "icons", "type": "array", "optional": true, "description": "", "typeRef": "Page.ImageResource"}, {"name": "accepts", "type": "array", "optional": true, "description": "Mimic a map, name is the key, accepts is the value.", "typeRef": "Page.FileFilter"}, {"name": "launchType", "type": "string", "optional": false, "description": "Won't repeat the enums, using string for easy comparison. Same as the other enums below.", "typeRef": null}]);
1182
+ inspectorBackend.registerType("Page.FileHandler", [{"name": "action", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "name", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "accepts", "type": "array", "optional": true, "description": "Mimic a map, name is the key, accepts is the value.", "typeRef": "Page.FileFilter"}, {"name": "launchType", "type": "string", "optional": false, "description": "Won't repeat the enums, using string for easy comparison. Same as the other enums below.", "typeRef": null}]);
1182
1183
  inspectorBackend.registerType("Page.ImageResource", [{"name": "url", "type": "string", "optional": false, "description": "The src field in the definition, but changing to url in favor of consistency.", "typeRef": null}, {"name": "sizes", "type": "string", "optional": true, "description": "", "typeRef": null}, {"name": "type", "type": "string", "optional": true, "description": "", "typeRef": null}]);
1183
1184
  inspectorBackend.registerType("Page.LaunchHandler", [{"name": "clientMode", "type": "string", "optional": false, "description": "", "typeRef": null}]);
1184
1185
  inspectorBackend.registerType("Page.ProtocolHandler", [{"name": "protocol", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "url", "type": "string", "optional": false, "description": "", "typeRef": null}]);
@@ -1482,7 +1483,7 @@ inspectorBackend.registerCommand("WebAuthn.setUserVerified", [{"name": "authenti
1482
1483
  inspectorBackend.registerCommand("WebAuthn.setAutomaticPresenceSimulation", [{"name": "authenticatorId", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorId"}, {"name": "enabled", "type": "boolean", "optional": false, "description": "", "typeRef": null}], [], "Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator. The default is true.");
1483
1484
  inspectorBackend.registerCommand("WebAuthn.setCredentialProperties", [{"name": "authenticatorId", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorId"}, {"name": "credentialId", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "backupEligibility", "type": "boolean", "optional": true, "description": "", "typeRef": null}, {"name": "backupState", "type": "boolean", "optional": true, "description": "", "typeRef": null}, {"name": "activeCmtgKeyIndex", "type": "number", "optional": true, "description": "", "typeRef": null}, {"name": "generateCmtgKeyOnNextOperation", "type": "boolean", "optional": true, "description": "", "typeRef": null}, {"name": "signCount", "type": "number", "optional": true, "description": "Must be equal to or greater than -1. If -1, the signature counter is removed from the credential, and every assertion operation will report a value of 0. See https://w3c.github.io/webauthn/#signature-counter", "typeRef": null}], [], "Allows setting credential properties. https://w3c.github.io/webauthn/#sctn-automation-set-credential-properties");
1484
1485
  inspectorBackend.registerType("WebAuthn.VirtualAuthenticatorOptions", [{"name": "protocol", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorProtocol"}, {"name": "ctap2Version", "type": "string", "optional": true, "description": "Defaults to ctap2_0. Ignored if |protocol| == u2f.", "typeRef": "WebAuthn.Ctap2Version"}, {"name": "transport", "type": "string", "optional": false, "description": "", "typeRef": "WebAuthn.AuthenticatorTransport"}, {"name": "hasResidentKey", "type": "boolean", "optional": true, "description": "Defaults to false.", "typeRef": null}, {"name": "hasUserVerification", "type": "boolean", "optional": true, "description": "Defaults to false.", "typeRef": null}, {"name": "hasLargeBlob", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the largeBlob extension. https://w3c.github.io/webauthn#largeBlob Defaults to false.", "typeRef": null}, {"name": "hasCredBlob", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the credBlob extension. https://fidoalliance.org/specs/fido-v2.1-rd-20201208/fido-client-to-authenticator-protocol-v2.1-rd-20201208.html#sctn-credBlob-extension Defaults to false.", "typeRef": null}, {"name": "hasMinPinLength", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the minPinLength extension. https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#sctn-minpinlength-extension Defaults to false.", "typeRef": null}, {"name": "hasPrf", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the prf extension. https://w3c.github.io/webauthn/#prf-extension Defaults to false.", "typeRef": null}, {"name": "hasHmacSecret", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the hmac-secret extension. https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#sctn-hmac-secret-extension Defaults to false.", "typeRef": null}, {"name": "hasHmacSecretMc", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the hmac-secret-mc extension. https://fidoalliance.org/specs/fido-v2.2-rd-20241003/fido-client-to-authenticator-protocol-v2.2-rd-20241003.html#sctn-hmac-secret-make-cred-extension Defaults to false.", "typeRef": null}, {"name": "hasCmtgKey", "type": "boolean", "optional": true, "description": "If set to true, the authenticator will support the cmtgKey (Credential Manager Trust Group Key) extension. https://github.com/w3c/webauthn/pull/2377 Defaults to false.", "typeRef": null}, {"name": "automaticPresenceSimulation", "type": "boolean", "optional": true, "description": "If set to true, tests of user presence will succeed immediately. Otherwise, they will not be resolved. Defaults to true.", "typeRef": null}, {"name": "isUserVerified", "type": "boolean", "optional": true, "description": "Sets whether User Verification succeeds or fails for an authenticator. Defaults to false.", "typeRef": null}, {"name": "defaultBackupEligibility", "type": "boolean", "optional": true, "description": "Credentials created by this authenticator will have the backup eligibility (BE) flag set to this value. Defaults to false. https://w3c.github.io/webauthn/#sctn-credential-backup", "typeRef": null}, {"name": "defaultBackupState", "type": "boolean", "optional": true, "description": "Credentials created by this authenticator will have the backup state (BS) flag set to this value. Defaults to false. https://w3c.github.io/webauthn/#sctn-credential-backup", "typeRef": null}]);
1485
- inspectorBackend.registerType("WebAuthn.Credential", [{"name": "credentialId", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "isResidentCredential", "type": "boolean", "optional": false, "description": "", "typeRef": null}, {"name": "rpId", "type": "string", "optional": true, "description": "Relying Party ID the credential is scoped to. Must be set when adding a credential.", "typeRef": null}, {"name": "privateKey", "type": "string", "optional": false, "description": "The ECDSA P-256 private key in PKCS#8 format.", "typeRef": null}, {"name": "userHandle", "type": "string", "optional": true, "description": "An opaque byte sequence with a maximum size of 64 bytes mapping the credential to a specific user.", "typeRef": null}, {"name": "signCount", "type": "number", "optional": true, "description": "Signature counter. Must be equal to or greater than -1. If -1, the credential won't have an associated signature counter, and every assertion operation will report a value of 0. See https://w3c.github.io/webauthn/#signature-counter", "typeRef": null}, {"name": "largeBlob", "type": "string", "optional": true, "description": "The large blob associated with the credential. See https://w3c.github.io/webauthn/#sctn-large-blob-extension", "typeRef": null}, {"name": "backupEligibility", "type": "boolean", "optional": true, "description": "Assertions returned by this credential will have the backup eligibility (BE) flag set to this value. Defaults to the authenticator's defaultBackupEligibility value.", "typeRef": null}, {"name": "backupState", "type": "boolean", "optional": true, "description": "Assertions returned by this credential will have the backup state (BS) flag set to this value. Defaults to the authenticator's defaultBackupState value.", "typeRef": null}, {"name": "userName", "type": "string", "optional": true, "description": "The credential's user.name property. Equivalent to empty if not set. https://w3c.github.io/webauthn/#dom-publickeycredentialentity-name", "typeRef": null}, {"name": "userDisplayName", "type": "string", "optional": true, "description": "The credential's user.displayName property. Equivalent to empty if not set. https://w3c.github.io/webauthn/#dom-publickeycredentialuserentity-displayname", "typeRef": null}, {"name": "cmtgKeys", "type": "array", "optional": true, "description": "The CMTG keys associated with the credential.", "typeRef": "binary"}, {"name": "activeCmtgKeyIndex", "type": "number", "optional": true, "description": "The 0-based index of the active key in cmtgKeys.", "typeRef": null}, {"name": "generateCmtgKeyOnNextOperation", "type": "boolean", "optional": true, "description": "If true, the authenticator will generate a new CMTG key on the next operation.", "typeRef": null}]);
1486
+ inspectorBackend.registerType("WebAuthn.Credential", [{"name": "credentialId", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "isResidentCredential", "type": "boolean", "optional": false, "description": "", "typeRef": null}, {"name": "rpId", "type": "string", "optional": true, "description": "Relying Party ID the credential is scoped to. Must be set when adding a credential.", "typeRef": null}, {"name": "privateKey", "type": "string", "optional": false, "description": "The ECDSA P-256 private key in PKCS#8 format.", "typeRef": null}, {"name": "userHandle", "type": "string", "optional": true, "description": "An opaque byte sequence with a maximum size of 64 bytes mapping the credential to a specific user.", "typeRef": null}, {"name": "signCount", "type": "number", "optional": false, "description": "Signature counter. Must be equal to or greater than -1. If -1, the credential won't have an associated signature counter, and every assertion operation will report a value of 0. See https://w3c.github.io/webauthn/#signature-counter", "typeRef": null}, {"name": "largeBlob", "type": "string", "optional": true, "description": "The large blob associated with the credential. See https://w3c.github.io/webauthn/#sctn-large-blob-extension", "typeRef": null}, {"name": "backupEligibility", "type": "boolean", "optional": true, "description": "Assertions returned by this credential will have the backup eligibility (BE) flag set to this value. Defaults to the authenticator's defaultBackupEligibility value.", "typeRef": null}, {"name": "backupState", "type": "boolean", "optional": true, "description": "Assertions returned by this credential will have the backup state (BS) flag set to this value. Defaults to the authenticator's defaultBackupState value.", "typeRef": null}, {"name": "userName", "type": "string", "optional": true, "description": "The credential's user.name property. Equivalent to empty if not set. https://w3c.github.io/webauthn/#dom-publickeycredentialentity-name", "typeRef": null}, {"name": "userDisplayName", "type": "string", "optional": true, "description": "The credential's user.displayName property. Equivalent to empty if not set. https://w3c.github.io/webauthn/#dom-publickeycredentialuserentity-displayname", "typeRef": null}, {"name": "cmtgKeys", "type": "array", "optional": true, "description": "The CMTG keys associated with the credential.", "typeRef": "binary"}, {"name": "activeCmtgKeyIndex", "type": "number", "optional": true, "description": "The 0-based index of the active key in cmtgKeys.", "typeRef": null}, {"name": "generateCmtgKeyOnNextOperation", "type": "boolean", "optional": true, "description": "If true, the authenticator will generate a new CMTG key on the next operation.", "typeRef": null}]);
1486
1487
 
1487
1488
  // WebMCP.
1488
1489
  inspectorBackend.registerEnum("WebMCP.InvocationStatus", {Completed: "Completed", Canceled: "Canceled", Error: "Error"});
@@ -1513,7 +1514,7 @@ inspectorBackend.registerEnum("Debugger.ContinueToLocationRequestTargetCallFrame
1513
1514
  inspectorBackend.registerCommand("Debugger.continueToLocation", [{"name": "location", "type": "object", "optional": false, "description": "Location to continue to.", "typeRef": "Debugger.Location"}, {"name": "targetCallFrames", "type": "string", "optional": true, "description": "", "typeRef": "Debugger.ContinueToLocationRequestTargetCallFrames"}], [], "Continues execution until specific location is reached.");
1514
1515
  inspectorBackend.registerCommand("Debugger.disable", [], [], "Disables debugger for given page.");
1515
1516
  inspectorBackend.registerCommand("Debugger.enable", [{"name": "maxScriptsCacheSize", "type": "number", "optional": true, "description": "The maximum size in bytes of collected scripts (not referenced by other heap objects) the debugger can hold. Puts no limit if parameter is omitted.", "typeRef": null}], ["debuggerId"], "Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.");
1516
- inspectorBackend.registerCommand("Debugger.evaluateOnCallFrame", [{"name": "callFrameId", "type": "string", "optional": false, "description": "Call frame identifier to evaluate on.", "typeRef": "Debugger.CallFrameId"}, {"name": "expression", "type": "string", "optional": false, "description": "Expression to evaluate.", "typeRef": null}, {"name": "objectGroup", "type": "string", "optional": true, "description": "String object group name to put result into (allows rapid releasing resulting object handles using `releaseObjectGroup`).", "typeRef": null}, {"name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Specifies whether command line API should be available to the evaluated expression, defaults to false.", "typeRef": null}, {"name": "silent", "type": "boolean", "optional": true, "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state.", "typeRef": null}, {"name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value.", "typeRef": null}, {"name": "generatePreview", "type": "boolean", "optional": true, "description": "Whether preview should be generated for the result.", "typeRef": null}, {"name": "throwOnSideEffect", "type": "boolean", "optional": true, "description": "Whether to throw an exception if side effect cannot be ruled out during evaluation.", "typeRef": null}, {"name": "timeout", "type": "number", "optional": true, "description": "Terminate execution after timing out (number of milliseconds).", "typeRef": "Runtime.TimeDelta"}], ["result", "exceptionDetails"], "Evaluates expression on a given call frame.");
1517
+ inspectorBackend.registerCommand("Debugger.evaluateOnCallFrame", [{"name": "callFrameId", "type": "string", "optional": false, "description": "Call frame identifier to evaluate on.", "typeRef": "Debugger.CallFrameId"}, {"name": "expression", "type": "string", "optional": false, "description": "Expression to evaluate.", "typeRef": null}, {"name": "objectGroup", "type": "string", "optional": true, "description": "String object group name to put result into (allows rapid releasing resulting object handles using `releaseObjectGroup`).", "typeRef": null}, {"name": "includeCommandLineAPI", "type": "boolean", "optional": true, "description": "Specifies whether command line API should be available to the evaluated expression, defaults to false.", "typeRef": null}, {"name": "silent", "type": "boolean", "optional": true, "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state.", "typeRef": null}, {"name": "returnByValue", "type": "boolean", "optional": true, "description": "Whether the result is expected to be a JSON object that should be sent by value.", "typeRef": null}, {"name": "generatePreview", "type": "boolean", "optional": true, "description": "Whether preview should be generated for the result.", "typeRef": null}, {"name": "throwOnSideEffect", "type": "boolean", "optional": true, "description": "Whether to throw an exception if side effect cannot be ruled out during evaluation.", "typeRef": null}, {"name": "timeout", "type": "number", "optional": true, "description": "Terminate execution after timing out (number of milliseconds).", "typeRef": "Runtime.TimeDelta"}, {"name": "scopeNumber", "type": "number", "optional": true, "description": "Specifies the scope number to evaluate the expression in (default: 0, innermost scope).", "typeRef": null}], ["result", "exceptionDetails"], "Evaluates expression on a given call frame.");
1517
1518
  inspectorBackend.registerCommand("Debugger.getPossibleBreakpoints", [{"name": "start", "type": "object", "optional": false, "description": "Start of range to search possible breakpoint locations in.", "typeRef": "Debugger.Location"}, {"name": "end", "type": "object", "optional": true, "description": "End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range.", "typeRef": "Debugger.Location"}, {"name": "restrictToFunction", "type": "boolean", "optional": true, "description": "Only consider locations which are in the same (non-nested) function as start.", "typeRef": null}], ["locations"], "Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.");
1518
1519
  inspectorBackend.registerCommand("Debugger.getScriptSource", [{"name": "scriptId", "type": "string", "optional": false, "description": "Id of the script to get source for.", "typeRef": "Runtime.ScriptId"}], ["scriptSource", "bytecode"], "Returns source for the script with given id.");
1519
1520
  inspectorBackend.registerCommand("Debugger.disassembleWasmModule", [{"name": "scriptId", "type": "string", "optional": false, "description": "Id of the script to disassemble", "typeRef": "Runtime.ScriptId"}], ["streamId", "totalNumberOfLines", "functionBodyOffsets", "chunk"], "");
@@ -827,6 +827,7 @@ export const generatedProperties = [
827
827
  "text-box-trim",
828
828
  "text-combine-upright",
829
829
  "text-decoration-color",
830
+ "text-decoration-inset",
830
831
  "text-decoration-line",
831
832
  "text-decoration-skip-ink",
832
833
  "text-decoration-skip-spaces",
@@ -4991,7 +4992,7 @@ export const generatedProperties = [
4991
4992
  ],
4992
4993
  "name": "scroll-axis-lock",
4993
4994
  "runtime_flag": "ScrollAxisLock",
4994
- "runtime_flag_status": "experimental"
4995
+ "runtime_flag_status": "stable"
4995
4996
  },
4996
4997
  {
4997
4998
  "keywords": [
@@ -5489,6 +5490,15 @@ export const generatedProperties = [
5489
5490
  ],
5490
5491
  "name": "text-decoration-color"
5491
5492
  },
5493
+ {
5494
+ "inherited": false,
5495
+ "keywords": [
5496
+ "auto"
5497
+ ],
5498
+ "name": "text-decoration-inset",
5499
+ "runtime_flag": "CSSTextDecorationInset",
5500
+ "runtime_flag_status": "experimental"
5501
+ },
5492
5502
  {
5493
5503
  "keywords": [
5494
5504
  "none",
@@ -8847,6 +8857,11 @@ export const generatedPropertyValues = {
8847
8857
  "currentcolor"
8848
8858
  ]
8849
8859
  },
8860
+ "text-decoration-inset": {
8861
+ "values": [
8862
+ "auto"
8863
+ ]
8864
+ },
8850
8865
  "text-decoration-line": {
8851
8866
  "values": [
8852
8867
  "none",
@@ -2273,6 +2273,14 @@ export namespace ProtocolMapping {
2273
2273
  paramsType: [Protocol.DOM.ForceShowPopoverRequest];
2274
2274
  returnType: Protocol.DOM.ForceShowPopoverResponse;
2275
2275
  };
2276
+ /**
2277
+ * When enabling, this API forces an element to gain interest in its target,
2278
+ * keeping interest active until disabled.
2279
+ */
2280
+ 'DOM.forceShowInterest': {
2281
+ paramsType: [Protocol.DOM.ForceShowInterestRequest];
2282
+ returnType: void;
2283
+ };
2276
2284
  /**
2277
2285
  * Returns event listeners of the given object.
2278
2286
  */
@@ -1369,6 +1369,12 @@ declare namespace ProtocolProxyApi {
1369
1369
  */
1370
1370
  invoke_forceShowPopover(params: Protocol.DOM.ForceShowPopoverRequest): Promise<Protocol.DOM.ForceShowPopoverResponse>;
1371
1371
 
1372
+ /**
1373
+ * When enabling, this API forces an element to gain interest in its target,
1374
+ * keeping interest active until disabled.
1375
+ */
1376
+ invoke_forceShowInterest(params: Protocol.DOM.ForceShowInterestRequest): Promise<Protocol.ProtocolResponseWithError>;
1377
+
1372
1378
  }
1373
1379
  export interface DOMDispatcher {
1374
1380
  /**
@@ -5897,6 +5897,17 @@ export namespace DOM {
5897
5897
  nodeIds: NodeId[];
5898
5898
  }
5899
5899
 
5900
+ export interface ForceShowInterestRequest {
5901
+ /**
5902
+ * Id of the interest invoker HTMLElement.
5903
+ */
5904
+ nodeId: NodeId;
5905
+ /**
5906
+ * If true, opens and holds interest. If false, releases forced interest.
5907
+ */
5908
+ enable: boolean;
5909
+ }
5910
+
5900
5911
  /**
5901
5912
  * Fired when `Element`'s attribute is modified.
5902
5913
  */
@@ -15215,7 +15226,6 @@ export namespace Page {
15215
15226
  export interface FileHandler {
15216
15227
  action: string;
15217
15228
  name: string;
15218
- icons?: ImageResource[];
15219
15229
  /**
15220
15230
  * Mimic a map, name is the key, accepts is the value.
15221
15231
  */
@@ -20172,7 +20182,7 @@ export namespace WebAuthn {
20172
20182
  * every assertion operation will report a value of 0.
20173
20183
  * See https://w3c.github.io/webauthn/#signature-counter
20174
20184
  */
20175
- signCount?: integer;
20185
+ signCount: integer;
20176
20186
  /**
20177
20187
  * The large blob associated with the credential.
20178
20188
  * See https://w3c.github.io/webauthn/#sctn-large-blob-extension
@@ -20816,6 +20826,10 @@ export namespace Debugger {
20816
20826
  * Terminate execution after timing out (number of milliseconds).
20817
20827
  */
20818
20828
  timeout?: Runtime.TimeDelta;
20829
+ /**
20830
+ * Specifies the scope number to evaluate the expression in (default: 0, innermost scope).
20831
+ */
20832
+ scopeNumber?: integer;
20819
20833
  }
20820
20834
 
20821
20835
  export interface EvaluateOnCallFrameResponse extends ProtocolResponseWithError {
@@ -33,6 +33,7 @@ export class AiSetting<ValueT> extends Common.ObjectWrapper.ObjectWrapper<EventT
33
33
  readonly #settings: Common.Settings.Settings;
34
34
  readonly #boundOnSettingChanged = this.#onSettingChanged.bind(this);
35
35
  readonly #boundOnAidaAvailabilityChanged = this.#onAidaAvailabilityChanged.bind(this);
36
+ #isSubscribed = false;
36
37
 
37
38
  constructor(
38
39
  descriptor: Common.Settings.ConditionalSettingDescriptor<ValueT, DisabledReason[]>,
@@ -44,11 +45,56 @@ export class AiSetting<ValueT> extends Common.ObjectWrapper.ObjectWrapper<EventT
44
45
  this.#hostConfigTracker = hostConfigTracker;
45
46
  this.#settings = settings;
46
47
 
48
+ this.#tryResolveSetting();
49
+ }
50
+
51
+ override addEventListener<T extends keyof EventTypes>(
52
+ eventType: T,
53
+ listener: Common.EventTarget.EventListener<EventTypes, T>,
54
+ thisObject?: Object,
55
+ ): Common.EventTarget.EventDescriptor<EventTypes, T> {
56
+ const isFirst = !this.hasEventListeners(eventType);
57
+ const descriptor = super.addEventListener(eventType, listener, thisObject);
58
+ if (isFirst) {
59
+ this.#subscribe();
60
+ }
61
+ return descriptor;
62
+ }
63
+
64
+ override removeEventListener<T extends keyof EventTypes>(
65
+ eventType: T,
66
+ listener: Common.EventTarget.EventListener<EventTypes, T>,
67
+ thisObject?: Object,
68
+ ): void {
69
+ super.removeEventListener(eventType, listener, thisObject);
70
+ if (!this.hasEventListeners(eventType)) {
71
+ this.#unsubscribe();
72
+ }
73
+ }
74
+
75
+ #subscribe(): void {
76
+ if (this.#isSubscribed) {
77
+ return;
78
+ }
79
+ this.#tryResolveSetting();
80
+ this.#isSubscribed = true;
47
81
  this.#hostConfigTracker.addEventListener(
48
82
  Host.AidaClient.Events.AIDA_AVAILABILITY_CHANGED,
49
83
  this.#boundOnAidaAvailabilityChanged,
50
84
  );
51
- this.#tryResolveSetting();
85
+ this.#setting?.addChangeListener(this.#boundOnSettingChanged);
86
+ }
87
+
88
+ #unsubscribe(): void {
89
+ if (!this.#isSubscribed) {
90
+ return;
91
+ }
92
+ this.#isSubscribed = false;
93
+ this.#hostConfigTracker.removeEventListener(
94
+ Host.AidaClient.Events.AIDA_AVAILABILITY_CHANGED,
95
+ this.#boundOnAidaAvailabilityChanged,
96
+ );
97
+ this.#setting?.removeChangeListener(this.#boundOnSettingChanged);
52
98
  }
53
99
 
54
100
  #tryResolveSetting(): void {
@@ -56,12 +102,19 @@ export class AiSetting<ValueT> extends Common.ObjectWrapper.ObjectWrapper<EventT
56
102
  Common.Settings.ConditionalSettingDescriptor<unknown, DisabledReason[]>);
57
103
  if ('setting' in result) {
58
104
  if (this.#setting !== result.setting) {
59
- if (this.#setting) {
105
+ if (this.#setting && this.#isSubscribed) {
60
106
  this.#setting.removeChangeListener(this.#boundOnSettingChanged);
61
107
  }
62
108
  this.#setting = result.setting as Common.Settings.Setting<ValueT>;
63
- this.#setting.addChangeListener(this.#boundOnSettingChanged);
109
+ if (this.#isSubscribed) {
110
+ this.#setting.addChangeListener(this.#boundOnSettingChanged);
111
+ }
64
112
  }
113
+ } else if (this.#setting) {
114
+ if (this.#isSubscribed) {
115
+ this.#setting.removeChangeListener(this.#boundOnSettingChanged);
116
+ }
117
+ this.#setting = undefined;
65
118
  }
66
119
  }
67
120
 
@@ -87,6 +140,7 @@ export class AiSetting<ValueT> extends Common.ObjectWrapper.ObjectWrapper<EventT
87
140
  if (this.disabled || this.unavailable) {
88
141
  return undefined;
89
142
  }
143
+ this.#tryResolveSetting();
90
144
  return this.#setting?.get();
91
145
  }
92
146
 
@@ -94,9 +148,18 @@ export class AiSetting<ValueT> extends Common.ObjectWrapper.ObjectWrapper<EventT
94
148
  if (this.disabled || this.unavailable) {
95
149
  return;
96
150
  }
151
+ this.#tryResolveSetting();
97
152
  this.#setting?.set(value);
98
153
  }
99
154
 
155
+ get(): ValueT|undefined {
156
+ return this.getIfNotDisabled();
157
+ }
158
+
159
+ set(value: ValueT): void {
160
+ this.setIfNotDisabled(value);
161
+ }
162
+
100
163
  #onSettingChanged(): void {
101
164
  this.dispatchEventToListeners(Events.CHANGED);
102
165
  }
@@ -204,12 +204,22 @@ const STATIC_LABEL_NAMES: Record<string, string> = {
204
204
  NO_NAVIGATION: 'the period before the first navigation',
205
205
  };
206
206
 
207
+ function getInsightModel(
208
+ model: Trace.Insights.Types.InsightModels,
209
+ key: string,
210
+ ): Trace.Insights.Types.InsightModels[keyof Trace.Insights.Types.InsightModels]|undefined {
211
+ if (Object.prototype.hasOwnProperty.call(model, key)) {
212
+ return model[key as keyof Trace.Insights.Types.InsightModels];
213
+ }
214
+ return undefined;
215
+ }
216
+
207
217
  /**
208
218
  * Converts the label name we use in the code to a human readable one that is
209
219
  * shown to the user.
210
220
  */
211
221
  export function getLabelName(label: MainThreadSectionLabel, focus: AgentFocus): string {
212
- if (STATIC_LABEL_NAMES[label]) {
222
+ if (Object.prototype.hasOwnProperty.call(STATIC_LABEL_NAMES, label)) {
213
223
  return STATIC_LABEL_NAMES[label];
214
224
  }
215
225
 
@@ -222,7 +232,7 @@ export function getLabelName(label: MainThreadSectionLabel, focus: AgentFocus):
222
232
  // Go through all the insights we have to find the first one that matches to find the title.
223
233
  // TODO(b/505291090): make it easier to look up Insight titles from a key.
224
234
  for (const insightSet of parsedTrace.insights?.values() ?? []) {
225
- const model = insightSet.model[label as keyof Trace.Insights.Types.InsightModels];
235
+ const model = getInsightModel(insightSet.model, label);
226
236
  if (model) {
227
237
  return `${model.title} insight`;
228
238
  }
@@ -813,7 +823,7 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
813
823
  return {error: `Invalid insight set id. Valid insight set ids are: ${valid}`};
814
824
  }
815
825
 
816
- const insight = insightSet.model[params.insightName as keyof Trace.Insights.Types.InsightModels];
826
+ const insight = getInsightModel(insightSet.model, params.insightName);
817
827
  if (!insight) {
818
828
  const valid = Object.keys(insightSet.model).join(', ');
819
829
  return {error: `No insight available. Valid insight names are: ${valid}`};
@@ -1361,14 +1371,14 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
1361
1371
  }
1362
1372
 
1363
1373
  if (insightSet) {
1364
- const model = insightSet.model[label as keyof Trace.Insights.Types.InsightModels];
1374
+ const model = getInsightModel(insightSet.model, label);
1365
1375
  if (model) {
1366
1376
  return Trace.Insights.Common.insightBounds(model, insightSet.bounds);
1367
1377
  }
1368
1378
  }
1369
1379
 
1370
1380
  for (const is of parsedTrace.insights?.values() ?? []) {
1371
- const model = is.model[label as keyof Trace.Insights.Types.InsightModels];
1381
+ const model = getInsightModel(is.model, label);
1372
1382
  if (model) {
1373
1383
  return Trace.Insights.Common.insightBounds(model, is.bounds);
1374
1384
  }
@@ -193,7 +193,7 @@ export class CompilerScriptMapping implements DebuggerSourceMapping {
193
193
  return null;
194
194
  }
195
195
 
196
- const entry = sourceMap.findEntry(lineNumber, columnNumber, rawLocation.inlineFrameIndex);
196
+ const entry = sourceMap.findEntry(lineNumber, columnNumber);
197
197
  if (!entry?.sourceURL) {
198
198
  return null;
199
199
  }