chrome-devtools-frontend 1.0.1715126 → 1.0.1716465

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 (205) hide show
  1. package/eslint.config.mjs +1 -0
  2. package/front_end/core/host/Platform.ts +37 -0
  3. package/front_end/core/host/UserMetricsEnums.ts +5 -2
  4. package/front_end/core/platform/browser/HostRuntime.ts +3 -3
  5. package/front_end/core/sdk/CSSProperty.ts +2 -1
  6. package/front_end/core/sdk/DebuggerModel.ts +7 -1
  7. package/front_end/core/sdk/ResourceTreeModel.ts +9 -0
  8. package/front_end/core/sdk/RuntimeModel.ts +6 -3
  9. package/front_end/core/sdk/SDKSettings.ts +7 -0
  10. package/front_end/core/sdk/SourceMapFunctionRanges.ts +4 -1
  11. package/front_end/core/sdk/SourceMapScopesInfo.ts +8 -7
  12. package/front_end/devtools_compatibility.js +5 -2
  13. package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +56 -6
  14. package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +29 -6
  15. package/front_end/entrypoints/main/MainImpl.ts +6 -14
  16. package/front_end/generated/Deprecation.ts +0 -7
  17. package/front_end/generated/InspectorBackendCommands.ts +2 -2
  18. package/front_end/generated/protocol.ts +5 -2
  19. package/front_end/models/ai_assistance/AiAgent2.ts +0 -1
  20. package/front_end/models/ai_assistance/README.md +2 -2
  21. package/front_end/models/ai_assistance/skills/Skill.ts +1 -1
  22. package/front_end/models/ai_assistance/skills/SkillRegistry.ts +0 -2
  23. package/front_end/models/ai_assistance/skills/lighthouse.md +28 -10
  24. package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +0 -3
  25. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +21 -11
  26. package/front_end/models/bindings/DefaultScriptMapping.ts +8 -2
  27. package/front_end/models/bindings/SourceMapStepping.ts +23 -3
  28. package/front_end/models/emulation/DeviceModeModel.ts +4 -19
  29. package/front_end/models/formatter/ScriptFormatter.ts +6 -7
  30. package/front_end/models/javascript_metadata/NativeFunctions.ts +0 -44
  31. package/front_end/models/source_map_scopes/FunctionCodeResolver.ts +9 -12
  32. package/front_end/models/trace/LanternComputationData.ts +6 -14
  33. package/front_end/models/trace/extras/TraceTree.ts +44 -13
  34. package/front_end/models/trace/helpers/SamplesIntegrator.ts +70 -58
  35. package/front_end/models/trace/insights/Common.ts +3 -2
  36. package/front_end/models/trace/insights/RenderBlocking.ts +28 -6
  37. package/front_end/models/trace/lantern/core/NetworkAnalyzer.ts +12 -20
  38. package/front_end/models/trace/lantern/simulation/Simulator.ts +5 -2
  39. package/front_end/models/trace/lantern/simulation/TCPConnection.ts +1 -1
  40. package/front_end/models/trace/types/Overlays.ts +4 -3
  41. package/front_end/models/workspace_diff/WorkspaceDiff.ts +5 -3
  42. package/front_end/panels/ai_assistance/components/ChatMessage.ts +1 -2
  43. package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +0 -8
  44. package/front_end/panels/application/FrameDetailsView.ts +84 -0
  45. package/front_end/panels/application/WebMCPView.ts +3 -3
  46. package/front_end/panels/application/preloading/PreloadingView.ts +4 -1
  47. package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +5 -2
  48. package/front_end/panels/common/ExtensionServer.ts +84 -26
  49. package/front_end/panels/console/PromptBuilder.ts +5 -2
  50. package/front_end/panels/elements/AdoptedStyleSheetTreeElement.ts +1 -118
  51. package/front_end/panels/elements/DOMPath.ts +38 -5
  52. package/front_end/panels/elements/DOMTreeContextMenu.ts +13 -8
  53. package/front_end/panels/elements/{ElementsTreeElement.ts → DOMTreeElementWidget.ts} +104 -469
  54. package/front_end/panels/elements/DOMTreeWidget.ts +74 -1253
  55. package/front_end/panels/elements/StylePropertiesSection.ts +3 -3
  56. package/front_end/panels/elements/StylePropertyTreeElement.ts +2 -2
  57. package/front_end/panels/elements/StylesSidebarPane.ts +3 -1
  58. package/front_end/panels/elements/{elementsTreeOutline.css → domTreeWidget.css} +3 -178
  59. package/front_end/panels/elements/elements.ts +3 -6
  60. package/front_end/panels/emulation/DeviceModeToolbar.ts +0 -8
  61. package/front_end/panels/media/PlayerPropertiesView.ts +4 -4
  62. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +4 -4
  63. package/front_end/panels/recorder/RecorderPanel.ts +2 -1
  64. package/front_end/panels/security/SecurityPanel.ts +163 -100
  65. package/front_end/panels/sources/DebuggerPlugin.ts +125 -81
  66. package/front_end/panels/sources/SourcesPanel.ts +10 -4
  67. package/front_end/panels/sources/TabbedEditorContainer.ts +2 -1
  68. package/front_end/panels/sources/UISourceCodeFrame.ts +4 -2
  69. package/front_end/panels/sources/sources-meta.ts +20 -34
  70. package/front_end/panels/timeline/README.md +3 -1
  71. package/front_end/panels/timeline/TimelineUIUtils.ts +2 -1
  72. package/front_end/panels/timeline/components/LiveMetricsView.ts +2 -2
  73. package/front_end/panels/timeline/overlays/OverlaysImpl.ts +14 -32
  74. package/front_end/panels/timeline/timelineFlameChartView.css +1 -42
  75. package/front_end/panels/whats_new/ReleaseNoteText.ts +8 -8
  76. package/front_end/panels/whats_new/resources/WNDT.md +5 -5
  77. package/front_end/third_party/chromium/README.chromium +1 -1
  78. package/front_end/third_party/puppeteer/README.chromium +2 -2
  79. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +77 -0
  80. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +474 -358
  81. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.d.ts +15 -0
  82. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.d.ts.map +1 -1
  83. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.js +27 -0
  84. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.js.map +1 -1
  85. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts +13 -0
  86. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts.map +1 -1
  87. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.js +38 -0
  88. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.js.map +1 -1
  89. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts +20 -0
  90. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts.map +1 -1
  91. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js.map +1 -1
  92. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.d.ts.map +1 -1
  93. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.js +9 -2
  94. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.js.map +1 -1
  95. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserContext.js +6 -5
  96. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserContext.js.map +1 -1
  97. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.d.ts.map +1 -1
  98. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js +2 -1
  99. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js.map +1 -1
  100. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ExposedFunction.js +2 -1
  101. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/ExposedFunction.js.map +1 -1
  102. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Frame.js +2 -1
  103. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Frame.js.map +1 -1
  104. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Input.js +4 -3
  105. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Input.js.map +1 -1
  106. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js +9 -8
  107. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js.map +1 -1
  108. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.d.ts.map +1 -1
  109. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.js +9 -3
  110. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.js.map +1 -1
  111. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Request.js +3 -2
  112. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Request.js.map +1 -1
  113. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/UserPrompt.js +3 -2
  114. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/UserPrompt.js.map +1 -1
  115. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/util.d.ts +2 -1
  116. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/util.d.ts.map +1 -1
  117. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/util.js +2 -2
  118. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/util.js.map +1 -1
  119. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts.map +1 -1
  120. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js +11 -2
  121. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js.map +1 -1
  122. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/EmulationManager.d.ts.map +1 -1
  123. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/EmulationManager.js +9 -1
  124. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/EmulationManager.js.map +1 -1
  125. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts +1 -1
  126. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts.map +1 -1
  127. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js +7 -2
  128. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js.map +1 -1
  129. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebWorker.d.ts.map +1 -1
  130. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebWorker.js +9 -2
  131. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebWorker.js.map +1 -1
  132. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/utils.d.ts +3 -1
  133. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/utils.d.ts.map +1 -1
  134. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/utils.js +2 -2
  135. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/utils.js.map +1 -1
  136. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.d.ts +1 -0
  137. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.d.ts.map +1 -1
  138. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js +9 -2
  139. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js.map +1 -1
  140. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts +8 -0
  141. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts.map +1 -1
  142. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConsoleMessage.d.ts +24 -1
  143. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
  144. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConsoleMessage.js +30 -1
  145. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConsoleMessage.js.map +1 -1
  146. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/CustomQueryHandler.js +1 -1
  147. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/CustomQueryHandler.js.map +1 -1
  148. package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.d.ts +1 -1
  149. package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.d.ts.map +1 -1
  150. package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.js +1 -1
  151. package/front_end/third_party/puppeteer/package/lib/puppeteer/generated/injected.js.map +1 -1
  152. package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/util.d.ts.map +1 -1
  153. package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/util.js +5 -1
  154. package/front_end/third_party/puppeteer/package/lib/puppeteer/injected/util.js.map +1 -1
  155. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  156. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js +7 -2
  157. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js.map +1 -1
  158. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.d.ts +10 -0
  159. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.d.ts.map +1 -1
  160. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.js +7 -1
  161. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/NodeWebSocketTransport.js.map +1 -1
  162. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +3 -3
  163. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +3 -3
  164. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
  165. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
  166. package/front_end/third_party/puppeteer/package/lib/types.d.ts +77 -0
  167. package/front_end/third_party/puppeteer/package/package.json +7 -7
  168. package/front_end/third_party/puppeteer/package/src/api/HTTPRequest.ts +30 -0
  169. package/front_end/third_party/puppeteer/package/src/api/HTTPResponse.ts +41 -0
  170. package/front_end/third_party/puppeteer/package/src/api/Page.ts +20 -0
  171. package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +6 -0
  172. package/front_end/third_party/puppeteer/package/src/bidi/Connection.ts +2 -1
  173. package/front_end/third_party/puppeteer/package/src/bidi/Realm.ts +1 -0
  174. package/front_end/third_party/puppeteer/package/src/bidi/util.ts +3 -0
  175. package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +9 -2
  176. package/front_end/third_party/puppeteer/package/src/cdp/EmulationManager.ts +10 -3
  177. package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +11 -2
  178. package/front_end/third_party/puppeteer/package/src/cdp/WebWorker.ts +19 -2
  179. package/front_end/third_party/puppeteer/package/src/cdp/utils.ts +6 -1
  180. package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +10 -2
  181. package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +9 -0
  182. package/front_end/third_party/puppeteer/package/src/common/ConsoleMessage.ts +35 -0
  183. package/front_end/third_party/puppeteer/package/src/common/CustomQueryHandler.ts +1 -1
  184. package/front_end/third_party/puppeteer/package/src/generated/injected.ts +1 -1
  185. package/front_end/third_party/puppeteer/package/src/injected/util.ts +6 -2
  186. package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +7 -2
  187. package/front_end/third_party/puppeteer/package/src/node/NodeWebSocketTransport.ts +12 -1
  188. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  189. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  190. package/front_end/ui/components/text_editor/config.ts +6 -3
  191. package/front_end/ui/legacy/InspectorView.ts +13 -12
  192. package/front_end/ui/legacy/ProgressIndicator.ts +18 -0
  193. package/front_end/ui/legacy/SearchableView.ts +348 -269
  194. package/front_end/ui/legacy/TabbedPane.ts +19 -3
  195. package/front_end/ui/legacy/UIUtils.ts +1 -46
  196. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +4 -0
  197. package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +3 -3
  198. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +66 -30
  199. package/front_end/ui/legacy/components/source_frame/source_frame-meta.ts +3 -5
  200. package/front_end/ui/settings/SourcesSettings.ts +21 -0
  201. package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
  202. package/package.json +1 -1
  203. package/front_end/models/ai_assistance/skills/accessibility.md +0 -33
  204. package/front_end/panels/elements/ShortcutTreeElement.ts +0 -172
  205. package/front_end/panels/elements/TopLayerContainer.ts +0 -54
package/eslint.config.mjs CHANGED
@@ -61,6 +61,7 @@ export default defineConfig([
61
61
  'scripts/deps/tests/fixtures',
62
62
  'scripts/gn_deps_verifier/tests/fixtures',
63
63
  'test/**/fixtures/',
64
+ 'test/ai_evals/eval_data/',
64
65
  'test/e2e/**/*.js',
65
66
  'test/shared/**/*.js',
66
67
  'extensions/cxx_debugging/tests/inputs/',
@@ -69,3 +69,40 @@ export function fontFamily(): string {
69
69
  export function setFontFamilyForTests(family: string): void {
70
70
  _fontFamily = family;
71
71
  }
72
+
73
+ let _isRemoteDevtoolsFrontend: boolean|undefined;
74
+ let _locationForTest: string|undefined;
75
+
76
+ export function setLocationForTest(url: string|undefined): void {
77
+ _locationForTest = url;
78
+ _isRemoteDevtoolsFrontend = undefined;
79
+ _isCustomDevtoolsFrontend = undefined;
80
+ }
81
+
82
+ export function isRemoteDevtoolsFrontend(): boolean {
83
+ if (typeof _isRemoteDevtoolsFrontend === 'undefined') {
84
+ const location = (globalThis as unknown as {location?: {toString(): string}}).location;
85
+ const url = _locationForTest ?? (location ? location.toString() : '');
86
+ _isRemoteDevtoolsFrontend = url.startsWith('devtools://devtools-remote/');
87
+ }
88
+ return _isRemoteDevtoolsFrontend ?? false;
89
+ }
90
+
91
+ let _isCustomDevtoolsFrontend: boolean|undefined;
92
+
93
+ export function isCustomDevtoolsFrontend(): boolean {
94
+ if (typeof _isCustomDevtoolsFrontend === 'undefined') {
95
+ const location = (globalThis as unknown as {location?: {toString(): string}}).location;
96
+ const url = _locationForTest ?? (location ? location.toString() : '');
97
+ _isCustomDevtoolsFrontend = url.startsWith('devtools://devtools/custom/');
98
+ }
99
+ return _isCustomDevtoolsFrontend ?? false;
100
+ }
101
+
102
+ export function setIsRemoteDevtoolsFrontendForTest(isRemote: boolean|undefined): void {
103
+ _isRemoteDevtoolsFrontend = isRemote;
104
+ }
105
+
106
+ export function setIsCustomDevtoolsFrontendForTest(isCustom: boolean|undefined): void {
107
+ _isCustomDevtoolsFrontend = isCustom;
108
+ }
@@ -633,9 +633,12 @@ export enum IssueCreated {
633
633
  'CorsIssue::LocalNetworkAccessPermissionDenied' = 111,
634
634
  'SRIMessageSignatureIssue::ValidationFailedIntegrityMismatch' = 112,
635
635
  'ElementAccessibilityIssue::InteractiveContentSummaryDescendant' = 113,
636
- 'CorsIssue::InvalidLocalNetworkAccess' = 114,
636
+ 'GenericIssue::AutofillAndManualTextPolicyControlledFeaturesInfo' = 114,
637
+ 'GenericIssue::AutofillPolicyControlledFeatureInfo' = 115,
638
+ 'GenericIssue::ManualTextPolicyControlledFeatureInfo' = 116,
639
+ 'CorsIssue::InvalidLocalNetworkAccess' = 118,
637
640
  /* eslint-enable @typescript-eslint/naming-convention */
638
- MAX_VALUE = 115,
641
+ MAX_VALUE = 119,
639
642
  }
640
643
 
641
644
  export enum DeveloperResourceLoaded {
@@ -95,17 +95,17 @@ async function saveScreenshot(options: Api.HostRuntime.ScreenshotOptions): Promi
95
95
  const contentTop = options.clip.visiblePageRectTop * scale;
96
96
 
97
97
  canvas = new OffscreenCanvas(
98
- Math.floor(screenRectWidth),
98
+ Math.round(screenRectWidth),
99
99
  // Cap the height to not hit the GPU limit.
100
100
  // https://crbug.com/1260828
101
- Math.min(1 << 14, Math.floor(screenRectHeight)),
101
+ Math.min(1 << 14, Math.round(screenRectHeight)),
102
102
  );
103
103
  const ctx = canvas.getContext('2d', {willReadFrequently: true});
104
104
  if (!ctx) {
105
105
  throw new Error('Could not get 2d context from canvas.');
106
106
  }
107
107
  ctx.imageSmoothingEnabled = false;
108
- ctx.drawImage(pageImage, Math.floor(contentLeft), Math.floor(contentTop));
108
+ ctx.drawImage(pageImage, Math.round(contentLeft), Math.round(contentTop));
109
109
  } else {
110
110
  canvas = new OffscreenCanvas(
111
111
  pageImage.naturalWidth,
@@ -20,6 +20,7 @@ import {
20
20
  } from './CSSPropertyParser.js';
21
21
  import {CSSWideKeywordMatcher} from './CSSPropertyParserMatchers.js';
22
22
  import type {CSSStyleDeclaration} from './CSSStyleDeclaration.js';
23
+ import {textEditorIndentSettingDescriptor} from './SDKSettings.js';
23
24
 
24
25
  export const enum Events {
25
26
  LOCAL_VALUE_UPDATED = 'localValueUpdated',
@@ -221,7 +222,7 @@ export class CSSProperty extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
221
222
  const range = this.range.relativeTo(this.ownerStyle.range.startLine, this.ownerStyle.range.startColumn);
222
223
  const indentation = this.ownerStyle.cssText ?
223
224
  this.detectIndentation(this.ownerStyle.cssText) :
224
- this.ownerStyle.cssModel().target().targetManager().settings.moduleSetting('text-editor-indent').get();
225
+ this.ownerStyle.cssModel().target().targetManager().settings.resolve(textEditorIndentSettingDescriptor).get();
225
226
  const endIndentation = this.ownerStyle.cssText ? indentation.substring(0, this.ownerStyle.range.endColumn) : '';
226
227
  const text = new TextUtils.Text.Text(this.ownerStyle.cssText || '');
227
228
  const newStyleText = text.replaceRange(range, Platform.StringUtilities.sprintf(';%s;', propertyText));
@@ -509,6 +509,11 @@ export class DebuggerModel extends SDKModel<EventTypes> {
509
509
 
510
510
  resume(): void {
511
511
  this.#stepContext = null;
512
+ this.#resumeBackend();
513
+ }
514
+
515
+ /** Resumes without touching the step context. */
516
+ #resumeBackend(): void {
512
517
  void this.agent.invoke_resume({terminateOnResume: false});
513
518
  this.#isPausing = false;
514
519
  }
@@ -691,7 +696,8 @@ export class DebuggerModel extends SDKModel<EventTypes> {
691
696
  if (this.#synchronizeBreakpointsCallback && script) {
692
697
  await this.#synchronizeBreakpointsCallback(script);
693
698
  }
694
- this.resume();
699
+ // V8 continues an in-progress step after an instrumentation pause, so keep the step context.
700
+ this.#resumeBackend();
695
701
  return;
696
702
  }
697
703
 
@@ -1097,6 +1097,15 @@ export class ResourceTreeFrame {
1097
1097
  return response.originTrials;
1098
1098
  }
1099
1099
 
1100
+ async getSpellCheckCustomDictionary(): Promise<string[]> {
1101
+ const response =
1102
+ await this.resourceTreeModel().target().pageAgent().invoke_getSpellCheckCustomDictionary({frameId: this.#id});
1103
+ if (response.getError()) {
1104
+ return [];
1105
+ }
1106
+ return response.words;
1107
+ }
1108
+
1100
1109
  setCreationStackTrace(creationStackTraceData: {
1101
1110
  creationStackTrace: Protocol.Runtime.StackTrace|null,
1102
1111
  creationStackTraceTarget: Target,
@@ -20,7 +20,7 @@ import {
20
20
  ScopeRemoteObject,
21
21
  } from './RemoteObject.js';
22
22
  import {SDKModel} from './SDKModel.js';
23
- import {customFormattersSettingDescriptor} from './SDKSettings.js';
23
+ import {customFormattersSettingDescriptor, textEditorIndentSettingDescriptor} from './SDKSettings.js';
24
24
  import {Capability, type Target, Type} from './Target.js';
25
25
 
26
26
  export class RuntimeModel extends SDKModel<EventTypes> {
@@ -303,8 +303,11 @@ export class RuntimeModel extends SDKModel<EventTypes> {
303
303
  return;
304
304
  }
305
305
 
306
- const indent =
307
- this.target().targetManager().context.get(Common.Settings.Settings).moduleSetting('text-editor-indent').get();
306
+ const indent = this.target()
307
+ .targetManager()
308
+ .context.get(Common.Settings.Settings)
309
+ .resolve(textEditorIndentSettingDescriptor)
310
+ .get();
308
311
  void object
309
312
  .callFunctionJSON(toStringForClipboard, [{
310
313
  value: {
@@ -346,3 +346,10 @@ export const preserveNetworkLogSettingDescriptor: Common.Settings.SettingDescrip
346
346
  type: Common.Settings.SettingType.BOOLEAN,
347
347
  defaultValue: false,
348
348
  };
349
+
350
+ export const textEditorIndentSettingDescriptor: Common.Settings.SettingDescriptor<string> = {
351
+ name: 'text-editor-indent',
352
+ type: Common.Settings.SettingType.ENUM,
353
+ defaultValue: ' ',
354
+ storageType: Common.Settings.SettingStorageType.SYNCED,
355
+ };
@@ -77,8 +77,11 @@ function validateStartBeforeEnd(ranges: NamedFunctionRange[]): void {
77
77
  }
78
78
 
79
79
  function createScopeFrom(range: NamedFunctionRange, parent?: ScopesCodec.OriginalScope): ScopesCodec.OriginalScope {
80
+ // Copy only known fields: ranges can come from extensions and may carry extra properties.
80
81
  return {
81
- ...range,
82
+ start: range.start,
83
+ end: range.end,
84
+ name: typeof range.name === 'string' ? range.name : String(range.name ?? ''),
82
85
  kind: 'Function',
83
86
  isStackFrame: true,
84
87
  parent,
@@ -615,8 +615,9 @@ export class SourceMapScopesInfo {
615
615
 
616
616
  /**
617
617
  * @returns the outlined parts of the authored function at the position: the hidden generated functions whose
618
- * original scope lies within that function's original scope (see {@link GeneratedFrameKind.OUTLINED}).
619
- * Includes the outlined part the position itself is in, if any. Sorted by start position.
618
+ * original scope lies within that function's original scope (see {@link GeneratedFrameKind.OUTLINED}),
619
+ * but not within a nested authored function. Includes the outlined part the position itself is in, if
620
+ * any. Sorted by start position.
620
621
  */
621
622
  outlinedFunctionRanges(generatedLine: number, generatedColumn: number): PositionRange[] {
622
623
  const rangeChain = this.#findGeneratedRangeChain(generatedLine, generatedColumn);
@@ -624,17 +625,17 @@ export class SourceMapScopesInfo {
624
625
  if (!functionScope) {
625
626
  return [];
626
627
  }
627
- const isWithinFunction = (scope: ScopesCodec.OriginalScope|undefined): boolean =>
628
- scope !== undefined && (scope === functionScope || isWithinFunction(scope.parent));
629
628
  const result: PositionRange[] = [];
630
- (function walk(ranges: ScopesCodec.GeneratedRange[]) {
629
+ const walk = (ranges: ScopesCodec.GeneratedRange[]): void => {
631
630
  for (const range of ranges) {
632
- if (range.isStackFrame && range.isHidden && isWithinFunction(range.originalScope)) {
631
+ if (range.isStackFrame && range.isHidden && range.originalScope &&
632
+ this.#findFunctionScopeInOriginalScopeChain(range.originalScope) === functionScope) {
633
633
  result.push({start: range.start, end: range.end});
634
634
  }
635
635
  walk(range.children);
636
636
  }
637
- })(this.#generatedRanges);
637
+ };
638
+ walk(this.#generatedRanges);
638
639
  return result;
639
640
  }
640
641
 
@@ -1006,8 +1006,11 @@
1006
1006
  'CorsIssue::LocalNetworkAccessPermissionDenied': 111,
1007
1007
  'SRIMessageSignatureIssue::ValidationFailedIntegrityMismatch': 112,
1008
1008
  'ElementAccessibilityIssue::InteractiveContentSummaryDescendant': 113,
1009
- 'CorsIssue::InvalidLocalNetworkAccess': 114,
1010
- MAX_VALUE: 115,
1009
+ 'GenericIssue::AutofillAndManualTextPolicyControlledFeaturesInfo': 114,
1010
+ 'GenericIssue::AutofillPolicyControlledFeatureInfo': 115,
1011
+ 'GenericIssue::ManualTextPolicyControlledFeatureInfo': 116,
1012
+ 'CorsIssue::InvalidLocalNetworkAccess': 118,
1013
+ MAX_VALUE: 119,
1011
1014
  },
1012
1015
  DeveloperResourceLoaded: {
1013
1016
  LOAD_THROUGH_PAGE_VIA_TARGET: 0,
@@ -13,6 +13,7 @@ const cssTrimEnd = (tokenValue: string): string => {
13
13
 
14
14
  export class CSSFormatter {
15
15
  readonly #builder: FormattedContentBuilder;
16
+ #text!: string;
16
17
  #toOffset!: number;
17
18
  #fromOffset!: number;
18
19
  #lineEndings!: number[];
@@ -29,6 +30,7 @@ export class CSSFormatter {
29
30
  }
30
31
 
31
32
  format(text: string, lineEndings: number[], fromOffset: number, toOffset: number): void {
33
+ this.#text = text;
32
34
  this.#lineEndings = lineEndings;
33
35
  this.#fromOffset = fromOffset;
34
36
  this.#toOffset = toOffset;
@@ -41,6 +43,48 @@ export class CSSFormatter {
41
43
  this.#builder.setEnforceSpaceBetweenWords(oldEnforce);
42
44
  }
43
45
 
46
+ #isSelectorPseudoColon(colonOffset: number): boolean {
47
+ let parenDepth = 0;
48
+ for (let i = colonOffset + 1; i < this.#toOffset; ++i) {
49
+ const ch = this.#text[i];
50
+ if (ch === '/' && this.#text[i + 1] === '*') {
51
+ const commentEnd = this.#text.indexOf('*/', i + 2);
52
+ if (commentEnd === -1) {
53
+ break;
54
+ }
55
+ i = commentEnd + 1;
56
+ continue;
57
+ }
58
+ if (ch === '\'' || ch === '"') {
59
+ const quote = ch;
60
+ for (++i; i < this.#toOffset; ++i) {
61
+ if (this.#text[i] === '\\') {
62
+ ++i;
63
+ } else if (this.#text[i] === quote) {
64
+ break;
65
+ }
66
+ }
67
+ continue;
68
+ }
69
+ if (ch === '(') {
70
+ ++parenDepth;
71
+ } else if (ch === ')') {
72
+ if (parenDepth === 0) {
73
+ return false;
74
+ }
75
+ --parenDepth;
76
+ } else if (parenDepth === 0) {
77
+ if (ch === '{') {
78
+ return true;
79
+ }
80
+ if (ch === ';' || ch === '}') {
81
+ return false;
82
+ }
83
+ }
84
+ }
85
+ return false;
86
+ }
87
+
44
88
  #tokenCallback(token: string, type: string|null, startPosition: number): void {
45
89
  // startPosition is relative to the start of the CSS block.
46
90
  // Convert it to an absolute document offset to match this.#lineEndings.
@@ -87,14 +131,20 @@ export class CSSFormatter {
87
131
  this.#builder.decreaseNestingLevel();
88
132
  this.#state.afterClosingBrace = true;
89
133
  this.#state.inPropertyValue = false;
90
- } else if (token === ':' && !this.#state.inPropertyValue && this.#state.seenProperty) {
91
- this.#builder.addToken(token, startPosition);
92
- this.#builder.addSoftSpace();
93
- this.#state.eatWhitespace = true;
94
- this.#state.inPropertyValue = true;
95
134
  this.#state.seenProperty = false;
96
- return;
135
+ } else if (token === ':' && !this.#state.inPropertyValue && this.#state.seenProperty) {
136
+ if (this.#isSelectorPseudoColon(startPosition)) {
137
+ this.#state.seenProperty = false;
138
+ } else {
139
+ this.#builder.addToken(token, startPosition);
140
+ this.#builder.addSoftSpace();
141
+ this.#state.eatWhitespace = true;
142
+ this.#state.inPropertyValue = true;
143
+ this.#state.seenProperty = false;
144
+ return;
145
+ }
97
146
  } else if (token === '{') {
147
+ this.#state.seenProperty = false;
98
148
  this.#builder.addSoftSpace();
99
149
  this.#builder.addToken(token, startPosition);
100
150
  this.#builder.addNewLine();
@@ -102,7 +102,26 @@ export class HTMLFormatter {
102
102
  this.#builder.addNewLine();
103
103
  }
104
104
 
105
- #afterCloseTag(_element: FormatterElement): void {
105
+ #afterCloseTag(element: FormatterElement): void {
106
+ if (!this.#model) {
107
+ return;
108
+ }
109
+
110
+ if (!element.children.length && element !== this.#model.document()) {
111
+ const nextToken = this.#model.peekToken();
112
+ if (nextToken) {
113
+ if (isTextToken(nextToken)) {
114
+ return;
115
+ }
116
+ const followingToken = this.#model.peekToken(1);
117
+ if (Platform.StringUtilities.isWhitespace(nextToken.value) && !/[\r\n]/.test(nextToken.value) &&
118
+ followingToken && isTextToken(followingToken)) {
119
+ this.#model.nextToken();
120
+ this.#builder.addToken(nextToken.value, nextToken.startOffset);
121
+ return;
122
+ }
123
+ }
124
+ }
106
125
  this.#builder.addNewLine();
107
126
  }
108
127
 
@@ -239,6 +258,12 @@ function hasTokenInSet(tokenTypes: Set<string>, type: string): boolean {
239
258
  return tokenTypes.has(type) || tokenTypes.has(`xml-${type}`);
240
259
  }
241
260
 
261
+ function isTextToken(token: Token): boolean {
262
+ return !Platform.StringUtilities.isWhitespace(token.value) && !hasTokenInSet(token.type, 'tag') &&
263
+ !hasTokenInSet(token.type, 'attribute') && !hasTokenInSet(token.type, 'bracket') &&
264
+ !hasTokenInSet(token.type, 'comment') && !hasTokenInSet(token.type, 'meta');
265
+ }
266
+
242
267
  export class HTMLModel {
243
268
  #state: ParseState = ParseState.INITIAL;
244
269
  readonly #document: FormatterElement;
@@ -275,9 +300,7 @@ export class HTMLModel {
275
300
  if (element && (hasTokenInSet(token.type, 'comment') || hasTokenInSet(token.type, 'meta'))) {
276
301
  element.hasComments = true;
277
302
  }
278
- if (element && !Platform.StringUtilities.isWhitespace(token.value) && !hasTokenInSet(token.type, 'tag') &&
279
- !hasTokenInSet(token.type, 'attribute') && !hasTokenInSet(token.type, 'bracket') &&
280
- !hasTokenInSet(token.type, 'comment') && !hasTokenInSet(token.type, 'meta')) {
303
+ if (element && isTextToken(token)) {
281
304
  element.hasContent = true;
282
305
  }
283
306
  if (element && (element.name === 'script' || element.name === 'style') &&
@@ -497,8 +520,8 @@ export class HTMLModel {
497
520
  this.#stack.push(newElement);
498
521
  }
499
522
 
500
- peekToken(): Token|null {
501
- return this.#tokenIndex < this.#tokens.length ? this.#tokens[this.#tokenIndex] : null;
523
+ peekToken(offset = 0): Token|null {
524
+ return this.#tokenIndex + offset < this.#tokens.length ? this.#tokens[this.#tokenIndex + offset] : null;
502
525
  }
503
526
 
504
527
  nextToken(): Token|null {
@@ -144,15 +144,6 @@ const WINDOW_LOCAL_STORAGE: Common.Settings.SettingsBackingStore = {
144
144
  clear: () => window.localStorage.clear(),
145
145
  };
146
146
 
147
- let isCustomDevtoolsFrontendInternal: boolean;
148
-
149
- function isCustomDevtoolsFrontend(): boolean {
150
- if (typeof isCustomDevtoolsFrontendInternal === 'undefined') {
151
- isCustomDevtoolsFrontendInternal = window.location.toString().startsWith('devtools://devtools/custom/');
152
- }
153
- return isCustomDevtoolsFrontendInternal;
154
- }
155
-
156
147
  export class MainImpl {
157
148
  #readyForTestPromise = Promise.withResolvers<void>();
158
149
  #veStartPromise!: Promise<void>;
@@ -309,11 +300,12 @@ export class MainImpl {
309
300
  } {
310
301
  this.#initializeExperiments();
311
302
  let storagePrefix = '';
312
- if (isCustomDevtoolsFrontend()) {
303
+ if (Host.Platform.isCustomDevtoolsFrontend()) {
313
304
  storagePrefix = '__custom__';
314
- } else if (
315
- !Root.Runtime.Runtime.queryParam('can_dock') && Boolean(Root.Runtime.Runtime.queryParam('debugFrontend')) &&
316
- !Host.InspectorFrontendHost.isUnderTest()) {
305
+ } else if (Host.Platform.isRemoteDevtoolsFrontend()) {
306
+ storagePrefix = '__remote__';
307
+ } else if (!Root.Runtime.Runtime.queryParam('can_dock') &&
308
+ Boolean(Root.Runtime.Runtime.queryParam('debugFrontend')) && !Host.InspectorFrontendHost.isUnderTest()) {
317
309
  storagePrefix = '__bundled__';
318
310
  }
319
311
 
@@ -669,7 +661,7 @@ export class MainImpl {
669
661
 
670
662
  #redispatchClipboardEvent(event: Event): void {
671
663
  const eventCopy = new CustomEvent('clipboard-' + event.type, {bubbles: true, composed: true});
672
- // @ts-expect-error Used in ElementsTreeOutline
664
+ // @ts-expect-error Used in DOMTreeWidget
673
665
  eventCopy['original'] = event;
674
666
  const document = event.target && (event.target as HTMLElement).ownerDocument;
675
667
  const target = document ? UI.DOMUtilities.deepActiveElement(document) : null;
@@ -258,10 +258,6 @@ export const UIStrings = {
258
258
  * @description A deprecation warning shown in the DevTools Issues tab. The placeholder is always the noun 'SharedArrayBuffer' which refers to a JavaScript construct.
259
259
  */
260
260
  SharedArrayBufferConstructedWithoutIsolation: "`SharedArrayBuffer` will require cross-origin isolation. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details.",
261
- /**
262
- * @description A deprecation warning shown in the DevTools Issues tab. It's shown when one of the Shared Storage APIs like `sharedStorage.set()`, `sharedStorage.worklet.addModule()`, `sharedStorage.selectURL()`, etc., along with `<img sharedstoragewritable>`, `<iframe sharedstoragewritable>`, or `fetch(url, {sharedStorageWritable: true})` are used.
263
- */
264
- SharedStorage: "The Shared Storage API is deprecated and will be removed in a future release.",
265
261
  /**
266
262
  * @description A deprecation warning shown in the DevTools Issues tab. It's shown when the `document.requestStorageAccessFor` API is called. The placeholder will always be the string `document.requestStorageAccessFor`.
267
263
  */
@@ -452,9 +448,6 @@ export const DEPRECATIONS_METADATA: Partial<Record<string, DeprecationDescriptor
452
448
  "SharedArrayBufferConstructedWithoutIsolation": {
453
449
  "milestone": 106
454
450
  },
455
- "SharedStorage": {
456
- "chromeStatusFeature": 5076349064708096
457
- },
458
451
  "StorageAccessAPI_requestStorageAccessFor_Method": {
459
452
  "chromeStatusFeature": 5162221567082496
460
453
  },
@@ -845,7 +845,7 @@ inspectorBackend.registerEnum("Network.ChallengeEventDetailsChallengeResult", {S
845
845
  inspectorBackend.registerEvent("Network.dataReceived", ["requestId", "timestamp", "dataLength", "encodedDataLength", "data"]);
846
846
  inspectorBackend.registerEvent("Network.eventSourceMessageReceived", ["requestId", "timestamp", "eventName", "eventId", "data"]);
847
847
  inspectorBackend.registerEvent("Network.loadingFailed", ["requestId", "timestamp", "type", "errorText", "canceled", "blockedReason", "corsErrorStatus"]);
848
- inspectorBackend.registerEvent("Network.loadingFinished", ["requestId", "timestamp", "encodedDataLength"]);
848
+ inspectorBackend.registerEvent("Network.loadingFinished", ["requestId", "timestamp", "encodedDataLength", "encodedBodyLength"]);
849
849
  inspectorBackend.registerEvent("Network.requestServedFromCache", ["requestId"]);
850
850
  inspectorBackend.registerEvent("Network.requestWillBeSent", ["requestId", "loaderId", "documentURL", "request", "timestamp", "wallTime", "initiator", "redirectHasExtraInfo", "redirectResponse", "type", "frameId", "hasUserGesture", "renderBlockingBehavior"]);
851
851
  inspectorBackend.registerEvent("Network.resourceChangedPriority", ["requestId", "newPriority", "timestamp"]);
@@ -1059,7 +1059,7 @@ inspectorBackend.registerEnum("Page.AdFrameExplanation", {ParentIsAd: "ParentIsA
1059
1059
  inspectorBackend.registerEnum("Page.SecureContextType", {Secure: "Secure", SecureLocalhost: "SecureLocalhost", InsecureScheme: "InsecureScheme", InsecureAncestor: "InsecureAncestor"});
1060
1060
  inspectorBackend.registerEnum("Page.CrossOriginIsolatedContextType", {Isolated: "Isolated", NotIsolated: "NotIsolated", NotIsolatedFeatureDisabled: "NotIsolatedFeatureDisabled"});
1061
1061
  inspectorBackend.registerEnum("Page.GatedAPIFeatures", {SharedArrayBuffers: "SharedArrayBuffers", SharedArrayBuffersTransferAllowed: "SharedArrayBuffersTransferAllowed", PerformanceMeasureMemory: "PerformanceMeasureMemory", PerformanceProfile: "PerformanceProfile"});
1062
- inspectorBackend.registerEnum("Page.PermissionsPolicyFeature", {Accelerometer: "accelerometer", AllScreensCapture: "all-screens-capture", AmbientLightSensor: "ambient-light-sensor", AriaNotify: "aria-notify", Autofill: "autofill", Autoplay: "autoplay", Bluetooth: "bluetooth", BrowsingTopics: "browsing-topics", Camera: "camera", CapturedSurfaceControl: "captured-surface-control", ChDpr: "ch-dpr", ChDeviceMemory: "ch-device-memory", ChDownlink: "ch-downlink", ChEct: "ch-ect", ChPrefersColorScheme: "ch-prefers-color-scheme", ChPrefersReducedMotion: "ch-prefers-reduced-motion", ChPrefersReducedTransparency: "ch-prefers-reduced-transparency", ChRtt: "ch-rtt", ChSaveData: "ch-save-data", ChUa: "ch-ua", ChUaArch: "ch-ua-arch", ChUaBitness: "ch-ua-bitness", ChUaHighEntropyValues: "ch-ua-high-entropy-values", ChUaPlatform: "ch-ua-platform", ChUaModel: "ch-ua-model", ChUaMobile: "ch-ua-mobile", ChUaFormFactors: "ch-ua-form-factors", ChUaFullVersion: "ch-ua-full-version", ChUaFullVersionList: "ch-ua-full-version-list", ChUaPlatformVersion: "ch-ua-platform-version", ChUaWow64: "ch-ua-wow64", ChViewportHeight: "ch-viewport-height", ChViewportWidth: "ch-viewport-width", ChWidth: "ch-width", ClipboardRead: "clipboard-read", ClipboardWrite: "clipboard-write", ComputePressure: "compute-pressure", ControlledFrame: "controlled-frame", CrossOriginIsolated: "cross-origin-isolated", DeferredFetch: "deferred-fetch", DeferredFetchMinimal: "deferred-fetch-minimal", DeviceAttributes: "device-attributes", DigitalCredentialsCreate: "digital-credentials-create", DigitalCredentialsGet: "digital-credentials-get", DirectSockets: "direct-sockets", DirectSocketsMulticast: "direct-sockets-multicast", DisplayCapture: "display-capture", DocumentDomain: "document-domain", EncryptedMedia: "encrypted-media", ExecutionWhileOutOfViewport: "execution-while-out-of-viewport", ExecutionWhileNotRendered: "execution-while-not-rendered", FocusWithoutUserActivation: "focus-without-user-activation", Fullscreen: "fullscreen", Frobulate: "frobulate", Gamepad: "gamepad", Geolocation: "geolocation", Gyroscope: "gyroscope", Haptics: "haptics", Hid: "hid", IdentityCredentialsGet: "identity-credentials-get", IdleDetection: "idle-detection", InterestCohort: "interest-cohort", KeyboardMap: "keyboard-map", LanguageDetector: "language-detector", LanguageModel: "language-model", LocalFonts: "local-fonts", LocalNetwork: "local-network", LocalNetworkAccess: "local-network-access", LoopbackNetwork: "loopback-network", Magnetometer: "magnetometer", ManualText: "manual-text", MediaPlaybackWhileNotVisible: "media-playback-while-not-visible", Microphone: "microphone", Midi: "midi", OnDeviceSpeechRecognition: "on-device-speech-recognition", OtpCredentials: "otp-credentials", Payment: "payment", PictureInPicture: "picture-in-picture", PrivateStateTokenIssuance: "private-state-token-issuance", PrivateStateTokenRedemption: "private-state-token-redemption", PublickeyCredentialsCreate: "publickey-credentials-create", PublickeyCredentialsGet: "publickey-credentials-get", PublickeyCredentialsRemoteClientDataJson: "publickey-credentials-remote-client-data-json", Rewriter: "rewriter", ScreenWakeLock: "screen-wake-lock", Serial: "serial", SharedStorage: "shared-storage", SharedStorageSelectUrl: "shared-storage-select-url", SmartCard: "smart-card", SpeakerSelection: "speaker-selection", StorageAccess: "storage-access", SubApps: "sub-apps", Summarizer: "summarizer", SyncXhr: "sync-xhr", Tools: "tools", Translator: "translator", Unload: "unload", Usb: "usb", UsbUnrestricted: "usb-unrestricted", VerticalScroll: "vertical-scroll", WebAppInstallation: "web-app-installation", Webnn: "webnn", WebPrinting: "web-printing", WebShare: "web-share", WindowManagement: "window-management", Writer: "writer", XrSpatialTracking: "xr-spatial-tracking"});
1062
+ inspectorBackend.registerEnum("Page.PermissionsPolicyFeature", {Accelerometer: "accelerometer", AllScreensCapture: "all-screens-capture", AmbientLightSensor: "ambient-light-sensor", AriaNotify: "aria-notify", Autofill: "autofill", Autoplay: "autoplay", Bluetooth: "bluetooth", BrowsingTopics: "browsing-topics", Camera: "camera", CapturedSurfaceControl: "captured-surface-control", ChDpr: "ch-dpr", ChDeviceMemory: "ch-device-memory", ChDownlink: "ch-downlink", ChEct: "ch-ect", ChPrefersColorScheme: "ch-prefers-color-scheme", ChPrefersReducedMotion: "ch-prefers-reduced-motion", ChPrefersReducedTransparency: "ch-prefers-reduced-transparency", ChRtt: "ch-rtt", ChSaveData: "ch-save-data", ChUa: "ch-ua", ChUaArch: "ch-ua-arch", ChUaBitness: "ch-ua-bitness", ChUaHighEntropyValues: "ch-ua-high-entropy-values", ChUaPlatform: "ch-ua-platform", ChUaModel: "ch-ua-model", ChUaMobile: "ch-ua-mobile", ChUaFormFactors: "ch-ua-form-factors", ChUaFullVersion: "ch-ua-full-version", ChUaFullVersionList: "ch-ua-full-version-list", ChUaPlatformVersion: "ch-ua-platform-version", ChUaWow64: "ch-ua-wow64", ChViewportHeight: "ch-viewport-height", ChViewportWidth: "ch-viewport-width", ChWidth: "ch-width", ClipboardRead: "clipboard-read", ClipboardWrite: "clipboard-write", ComputePressure: "compute-pressure", ControlledFrame: "controlled-frame", CrossOriginIsolated: "cross-origin-isolated", DeferredFetch: "deferred-fetch", DeferredFetchMinimal: "deferred-fetch-minimal", DeviceAttributes: "device-attributes", DigitalCredentialsCreate: "digital-credentials-create", DigitalCredentialsGet: "digital-credentials-get", DirectSockets: "direct-sockets", DirectSocketsMulticast: "direct-sockets-multicast", DisplayCapture: "display-capture", DocumentDomain: "document-domain", EncryptedMedia: "encrypted-media", ExecutionWhileOutOfViewport: "execution-while-out-of-viewport", ExecutionWhileNotRendered: "execution-while-not-rendered", FocusWithoutUserActivation: "focus-without-user-activation", Fullscreen: "fullscreen", Frobulate: "frobulate", Gamepad: "gamepad", Geolocation: "geolocation", Gyroscope: "gyroscope", Haptics: "haptics", Hid: "hid", IdentityCredentialsGet: "identity-credentials-get", IdleDetection: "idle-detection", InterestCohort: "interest-cohort", KeyboardMap: "keyboard-map", LanguageDetector: "language-detector", LanguageModel: "language-model", LocalFonts: "local-fonts", LocalNetwork: "local-network", LocalNetworkAccess: "local-network-access", LoopbackNetwork: "loopback-network", Magnetometer: "magnetometer", ManualText: "manual-text", MediaPlaybackWhileNotVisible: "media-playback-while-not-visible", Microphone: "microphone", Midi: "midi", OnDeviceSpeechRecognition: "on-device-speech-recognition", OtpCredentials: "otp-credentials", Payment: "payment", PictureInPicture: "picture-in-picture", PrivateStateTokenIssuance: "private-state-token-issuance", PrivateStateTokenRedemption: "private-state-token-redemption", PublickeyCredentialsCreate: "publickey-credentials-create", PublickeyCredentialsGet: "publickey-credentials-get", PublickeyCredentialsRemoteClientDataJson: "publickey-credentials-remote-client-data-json", Rewriter: "rewriter", ScreenWakeLock: "screen-wake-lock", Serial: "serial", SmartCard: "smart-card", SpeakerSelection: "speaker-selection", StorageAccess: "storage-access", SubApps: "sub-apps", Summarizer: "summarizer", SyncXhr: "sync-xhr", Tools: "tools", Translator: "translator", Unload: "unload", Usb: "usb", UsbUnrestricted: "usb-unrestricted", VerticalScroll: "vertical-scroll", WebAppInstallation: "web-app-installation", Webnn: "webnn", WebPrinting: "web-printing", WebShare: "web-share", WindowManagement: "window-management", Writer: "writer", XrSpatialTracking: "xr-spatial-tracking"});
1063
1063
  inspectorBackend.registerEnum("Page.PermissionsPolicyBlockReason", {Header: "Header", IframeAttribute: "IframeAttribute", InFencedFrameTree: "InFencedFrameTree", InIsolatedApp: "InIsolatedApp"});
1064
1064
  inspectorBackend.registerEnum("Page.OriginTrialTokenStatus", {Success: "Success", NotSupported: "NotSupported", Insecure: "Insecure", Expired: "Expired", WrongOrigin: "WrongOrigin", InvalidSignature: "InvalidSignature", Malformed: "Malformed", WrongVersion: "WrongVersion", FeatureDisabled: "FeatureDisabled", TokenDisabled: "TokenDisabled", FeatureDisabledForUser: "FeatureDisabledForUser", UnknownTrial: "UnknownTrial"});
1065
1065
  inspectorBackend.registerEnum("Page.OriginTrialStatus", {Enabled: "Enabled", ValidTokenNotProvided: "ValidTokenNotProvided", OSNotSupported: "OSNotSupported", TrialNotAllowed: "TrialNotAllowed"});
@@ -13003,6 +13003,11 @@ export namespace Network {
13003
13003
  * Total number of bytes received for this request.
13004
13004
  */
13005
13005
  encodedDataLength: number;
13006
+ /**
13007
+ * Size of the response body before removing content encodings.
13008
+ * Includes cached bodies, but excludes headers and transfer framing.
13009
+ */
13010
+ encodedBodyLength?: number;
13006
13011
  }
13007
13012
 
13008
13013
  /**
@@ -14835,8 +14840,6 @@ export namespace Page {
14835
14840
  Rewriter = 'rewriter',
14836
14841
  ScreenWakeLock = 'screen-wake-lock',
14837
14842
  Serial = 'serial',
14838
- SharedStorage = 'shared-storage',
14839
- SharedStorageSelectUrl = 'shared-storage-select-url',
14840
14843
  SmartCard = 'smart-card',
14841
14844
  SpeakerSelection = 'speaker-selection',
14842
14845
  StorageAccess = 'storage-access',
@@ -39,7 +39,6 @@ import {ToolRegistry} from './tools/ToolRegistry.js';
39
39
  const SKILL_DISPLAY_NAMES: Record<SkillName, string> = {
40
40
  styling: 'CSS and styling',
41
41
  network: 'Network requests',
42
- accessibility: 'Accessibility',
43
42
  performance: 'Performance',
44
43
  storage: 'Storage',
45
44
  sources: 'Sources',
@@ -143,6 +143,6 @@ To aid debugging, you can enable the AI Assistance logging. This setting is stor
143
143
 
144
144
  Now, when interacting with the AI and sending requests, you will see output logged to the console. You can use the `debugLog` helper to add your own logging as you are building out your feature.
145
145
 
146
- ### Testing the Accessibility Skill
146
+ ### Testing the Lighthouse Skill
147
147
 
148
- The accessibility skill (`accessibility.md`) relies on an active Lighthouse report. Before interacting with the agent using this skill, ensure you have run a Lighthouse audit on the page you are inspecting so that the `getLighthouseAudits` tool can retrieve the report data.
148
+ The Lighthouse skill (`lighthouse.md`) handles Lighthouse audits across all categories (including accessibility) as well as live DOM accessibility inspection. It can either inspect an existing Lighthouse report via `getLighthouseAudits` or record a new report via `runLighthouse`.
@@ -2,7 +2,7 @@
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
- export type SkillName = 'styling'|'network'|'accessibility'|'performance'|'storage'|'sources'|'lighthouse';
5
+ export type SkillName = 'styling'|'network'|'performance'|'storage'|'sources'|'lighthouse';
6
6
 
7
7
  export interface Skill {
8
8
  name: SkillName;
@@ -2,7 +2,6 @@
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
- import {skill as accessibilitySkill} from './accessibility.skill.js';
6
5
  import {skill as lighthouseSkill} from './lighthouse.skill.js';
7
6
  import {skill as networkSkill} from './network.skill.js';
8
7
  import {skill as performanceSkill} from './performance.skill.js';
@@ -14,7 +13,6 @@ import {skill as stylingSkill} from './styling.skill.js';
14
13
  export const SKILLS: Record<SkillName, Skill> = {
15
14
  styling: stylingSkill,
16
15
  network: networkSkill,
17
- accessibility: accessibilitySkill,
18
16
  performance: performanceSkill,
19
17
  storage: storageSkill,
20
18
  sources: sourcesSkill,