chrome-devtools-frontend 1.0.1547147 → 1.0.1548870

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 (212) hide show
  1. package/.stylelintrc.json +5 -1
  2. package/docs/contributing/infrastructure.md +2 -2
  3. package/eslint.config.mjs +3 -2
  4. package/front_end/Images/generate-css-vars.js +1 -1
  5. package/front_end/core/common/common.ts +0 -2
  6. package/front_end/core/i18n/collect-ui-strings.js +1 -1
  7. package/front_end/core/i18n/generate-locales-js.js +1 -1
  8. package/front_end/core/platform/HostRuntime.ts +14 -7
  9. package/front_end/core/platform/api/HostRuntime.ts +28 -3
  10. package/front_end/core/platform/browser/HostRuntime.ts +66 -5
  11. package/front_end/core/platform/node/HostRuntime.ts +76 -4
  12. package/front_end/core/sdk/AnimationModel.ts +1 -1
  13. package/front_end/core/sdk/CSSModel.ts +1 -1
  14. package/front_end/core/sdk/CSSProperty.ts +1 -1
  15. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +1 -1
  16. package/front_end/core/sdk/ConsoleModel.ts +1 -1
  17. package/front_end/core/sdk/Cookie.ts +1 -1
  18. package/front_end/core/sdk/DOMModel.ts +2 -2
  19. package/front_end/core/sdk/DebuggerModel.ts +1 -1
  20. package/front_end/core/sdk/NetworkManager.ts +6 -0
  21. package/front_end/core/sdk/PreloadingModel.ts +1 -1
  22. package/front_end/core/sdk/RemoteObject.ts +1 -1
  23. package/front_end/core/sdk/ResourceTreeModel.ts +1 -1
  24. package/front_end/core/sdk/Script.ts +4 -4
  25. package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +2 -2
  26. package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +15 -18
  27. package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +8 -5
  28. package/front_end/entrypoints/main/ExecutionContextSelector.ts +1 -1
  29. package/front_end/entrypoints/main/MainImpl.ts +2 -2
  30. package/front_end/generated/Deprecation.ts +19 -0
  31. package/front_end/generated/InspectorBackendCommands.ts +4 -3
  32. package/front_end/generated/SupportedCSSProperties.js +13 -13
  33. package/front_end/generated/protocol-mapping.d.ts +2 -0
  34. package/front_end/generated/protocol-proxy-api.d.ts +4 -0
  35. package/front_end/generated/protocol.ts +16 -27
  36. package/front_end/models/ai_assistance/AiConversation.ts +104 -24
  37. package/front_end/models/ai_assistance/BuiltInAi.ts +131 -134
  38. package/front_end/models/ai_assistance/ChangeManager.ts +9 -0
  39. package/front_end/models/ai_assistance/ConversationHandler.ts +23 -48
  40. package/front_end/models/ai_assistance/agents/AiAgent.ts +8 -5
  41. package/front_end/models/ai_assistance/agents/StylingAgent.ts +0 -10
  42. package/front_end/models/formatter/FormatterWorkerPool.ts +9 -7
  43. package/front_end/models/har/Importer.ts +1 -1
  44. package/front_end/models/issues_manager/ContrastCheckTrigger.ts +1 -1
  45. package/front_end/models/persistence/AutomaticFileSystemManager.ts +1 -1
  46. package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -1
  47. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +80 -153
  48. package/front_end/panels/ai_assistance/components/ChatView.ts +54 -31
  49. package/front_end/panels/application/ExtensionStorageModel.ts +1 -1
  50. package/front_end/panels/application/FrameDetailsView.ts +62 -34
  51. package/front_end/panels/application/ServiceWorkerCacheViews.ts +1 -1
  52. package/front_end/panels/application/components/components.ts +0 -2
  53. package/front_end/panels/console/ConsoleInsightTeaser.ts +166 -100
  54. package/front_end/panels/console/ConsolePrompt.ts +1 -1
  55. package/front_end/panels/console/ConsoleViewMessage.ts +77 -29
  56. package/front_end/panels/console/ConsoleViewport.ts +1 -1
  57. package/front_end/panels/console/consoleInsightTeaser.css +1 -0
  58. package/front_end/panels/coverage/CoverageModel.ts +2 -2
  59. package/front_end/panels/elements/ElementsPanel.ts +1 -1
  60. package/front_end/panels/elements/ElementsTreeOutline.ts +17 -7
  61. package/front_end/panels/elements/NodeStackTraceWidget.ts +6 -5
  62. package/front_end/panels/elements/StylePropertyTreeElement.ts +1 -2
  63. package/front_end/panels/explain/components/ConsoleInsight.ts +1 -1
  64. package/front_end/panels/network/RequestConditionsDrawer.ts +64 -20
  65. package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +1 -1
  66. package/front_end/panels/profiler/HeapSnapshotProxy.ts +15 -14
  67. package/front_end/panels/recorder/components/StepEditor.ts +1 -1
  68. package/front_end/panels/security/SecurityPanelSidebar.ts +1 -3
  69. package/front_end/panels/settings/KeybindsSettingsTab.ts +1 -1
  70. package/front_end/panels/sources/CSSPlugin.ts +1 -1
  71. package/front_end/panels/sources/DebuggerPlugin.ts +2 -2
  72. package/front_end/panels/sources/NavigatorView.ts +1 -1
  73. package/front_end/panels/sources/SourcesSearchScope.ts +1 -1
  74. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +10 -2
  75. package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -1
  76. package/front_end/panels/timeline/TimelinePanel.ts +7 -7
  77. package/front_end/panels/timeline/TimelineUIUtils.ts +3 -1
  78. package/front_end/panels/timeline/enable-easter-egg.js +1 -1
  79. package/front_end/panels/timeline/utils/Treemap.ts +1 -1
  80. package/front_end/third_party/chromium/README.chromium +1 -1
  81. package/front_end/third_party/puppeteer/README.chromium +2 -2
  82. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts +66 -0
  83. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
  84. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js +57 -0
  85. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
  86. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts +1 -1
  87. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
  88. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
  89. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +2 -2
  90. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
  91. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
  92. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts +1 -0
  93. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts.map +1 -1
  94. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.js +1 -0
  95. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.js.map +1 -1
  96. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
  97. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js +1 -6
  98. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js.map +1 -1
  99. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +0 -4
  100. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
  101. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +18 -23
  102. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
  103. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts +2 -0
  104. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  105. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +16 -0
  106. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  107. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts +4 -62
  108. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
  109. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js +9 -73
  110. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
  111. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts +1 -1
  112. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts.map +1 -1
  113. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.js.map +1 -1
  114. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +1 -1
  115. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
  116. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +3 -3
  117. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
  118. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts +8 -1
  119. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
  120. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js +11 -1
  121. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js.map +1 -1
  122. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
  123. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
  124. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
  125. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
  126. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
  127. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
  128. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
  129. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +9 -10
  130. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +80 -81
  131. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts +66 -0
  132. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
  133. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js +52 -0
  134. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
  135. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts +1 -1
  136. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
  137. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js.map +1 -1
  138. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +2 -2
  139. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
  140. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
  141. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts +1 -0
  142. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts.map +1 -1
  143. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.js +1 -0
  144. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.js.map +1 -1
  145. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
  146. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js +1 -6
  147. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js.map +1 -1
  148. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +0 -4
  149. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
  150. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +18 -23
  151. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
  152. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts +2 -0
  153. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
  154. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +16 -0
  155. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
  156. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts +4 -62
  157. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
  158. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js +6 -69
  159. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
  160. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts +1 -1
  161. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts.map +1 -1
  162. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.js.map +1 -1
  163. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +1 -1
  164. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
  165. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +3 -3
  166. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
  167. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts +8 -1
  168. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
  169. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js +11 -1
  170. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js.map +1 -1
  171. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
  172. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
  173. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
  174. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
  175. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
  176. package/front_end/third_party/puppeteer/package/lib/types.d.ts +9 -10
  177. package/front_end/third_party/puppeteer/package/package.json +3 -3
  178. package/front_end/third_party/puppeteer/package/src/api/DeviceRequestPrompt.ts +79 -0
  179. package/front_end/third_party/puppeteer/package/src/api/Frame.ts +1 -1
  180. package/front_end/third_party/puppeteer/package/src/api/Page.ts +2 -2
  181. package/front_end/third_party/puppeteer/package/src/api/api.ts +1 -0
  182. package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +1 -9
  183. package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +21 -31
  184. package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +18 -0
  185. package/front_end/third_party/puppeteer/package/src/cdp/DeviceRequestPrompt.ts +6 -72
  186. package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +2 -4
  187. package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +7 -2
  188. package/front_end/third_party/puppeteer/package/src/common/ConsoleMessage.ts +14 -0
  189. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  190. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  191. package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +1 -0
  192. package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +4 -0
  193. package/front_end/ui/components/text_editor/javascript.ts +1 -1
  194. package/front_end/ui/legacy/ListWidget.ts +51 -18
  195. package/front_end/ui/legacy/ReportView.ts +1 -1
  196. package/front_end/ui/legacy/TabbedPane.ts +3 -3
  197. package/front_end/ui/legacy/Treeoutline.ts +1 -1
  198. package/front_end/ui/legacy/components/color_picker/ContrastInfo.ts +1 -1
  199. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +3 -2
  200. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +87 -111
  201. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +1 -2
  202. package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +40 -11
  203. package/front_end/ui/legacy/components/utils/jsUtils.css +28 -0
  204. package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
  205. package/front_end/ui/visual_logging/LoggingConfig.ts +2 -1
  206. package/inspector_overlay/tool_window_controls.ts +4 -1
  207. package/mcp/mcp.ts +1 -1
  208. package/package.json +2 -3
  209. package/front_end/core/common/Worker.ts +0 -60
  210. package/front_end/panels/application/components/StackTrace.ts +0 -238
  211. package/front_end/panels/application/components/stackTraceLinkButton.css +0 -16
  212. package/front_end/panels/application/components/stackTraceRow.css +0 -50
@@ -50,7 +50,7 @@ export class ReportView extends VBox {
50
50
  }
51
51
 
52
52
  setSubtitle(subtitle: string): void {
53
- if (this.subtitleElement && this.subtitleElement.textContent === subtitle) {
53
+ if (this.subtitleElement?.textContent === subtitle) {
54
54
  return;
55
55
  }
56
56
  if (!this.subtitleElement) {
@@ -261,7 +261,7 @@ export class TabbedPane extends Common.ObjectWrapper.eventMixin<EventTypes, type
261
261
  if (userGesture && !tab.closeable) {
262
262
  return;
263
263
  }
264
- if (this.currentTab && this.currentTab.id === id) {
264
+ if (this.currentTab?.id === id) {
265
265
  this.hideCurrentTab();
266
266
  }
267
267
 
@@ -335,7 +335,7 @@ export class TabbedPane extends Common.ObjectWrapper.eventMixin<EventTypes, type
335
335
  isUserGesture: userGesture,
336
336
  };
337
337
  this.dispatchEventToListeners(Events.TabInvoked, eventData);
338
- if (this.currentTab && this.currentTab.id === id) {
338
+ if (this.currentTab?.id === id) {
339
339
  return true;
340
340
  }
341
341
 
@@ -474,7 +474,7 @@ export class TabbedPane extends Common.ObjectWrapper.eventMixin<EventTypes, type
474
474
  }
475
475
 
476
476
  this.suspendInvalidations();
477
- const isSelected = this.currentTab && this.currentTab.id === id;
477
+ const isSelected = this.currentTab?.id === id;
478
478
  const shouldFocus = tab.view.hasFocus();
479
479
  if (isSelected) {
480
480
  this.hideTab(tab);
@@ -1254,7 +1254,7 @@ export class TreeElement {
1254
1254
  ARIAUtils.clearSelected(this.listItemNode);
1255
1255
  this.setFocusable(false);
1256
1256
 
1257
- if (this.treeOutline && this.treeOutline.selectedTreeElement === this) {
1257
+ if (this.treeOutline?.selectedTreeElement === this) {
1258
1258
  this.treeOutline.selectedTreeElement = null;
1259
1259
  this.treeOutline.updateFocusable();
1260
1260
  if (hadFocus) {
@@ -37,7 +37,7 @@ export class ContrastInfo extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
37
37
  this.#contrastRatioAPCAThreshold =
38
38
  Common.ColorUtils.getAPCAThreshold(contrastInfo.computedFontSize, contrastInfo.computedFontWeight);
39
39
 
40
- if (!contrastInfo.backgroundColors || contrastInfo.backgroundColors.length !== 1) {
40
+ if (contrastInfo.backgroundColors?.length !== 1) {
41
41
  return;
42
42
  }
43
43
  const bgColorText = contrastInfo.backgroundColors[0];
@@ -466,7 +466,8 @@ export class DataGridImpl<T> extends Common.ObjectWrapper.ObjectWrapper<EventTyp
466
466
  cell.createChild('div', 'sort-order-icon-container').appendChild(icon);
467
467
 
468
468
  if (column.title) {
469
- UI.ARIAUtils.setLabel(cell, i18nString(UIStrings.sortableColumn));
469
+ const columnLabel = `${column.title} - ${i18nString(UIStrings.sortableColumn)}`;
470
+ UI.ARIAUtils.setLabel(cell, columnLabel);
470
471
  }
471
472
  }
472
473
  }
@@ -2341,7 +2342,7 @@ export class DataGridNode<T> {
2341
2342
  }
2342
2343
 
2343
2344
  deselect(supressDeselectedEvent?: boolean): void {
2344
- if (!this.dataGrid || this.dataGrid.selectedNode !== this || !this.selected) {
2345
+ if (this.dataGrid?.selectedNode !== this || !this.selected) {
2345
2346
  return;
2346
2347
  }
2347
2348
 
@@ -49,6 +49,7 @@ import objectPropertiesSectionStyles from './objectPropertiesSection.css.js';
49
49
  import objectValueStyles from './objectValue.css.js';
50
50
  import {RemoteObjectPreviewFormatter, renderNodeTitle} from './RemoteObjectPreviewFormatter.js';
51
51
 
52
+ const {widgetConfig} = UI.Widget;
52
53
  const {ref, repeat, ifDefined, classMap} = Directives;
53
54
  const UIStrings = {
54
55
  /**
@@ -135,7 +136,6 @@ const UIStrings = {
135
136
  } as const;
136
137
  const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/object_ui/ObjectPropertiesSection.ts', UIStrings);
137
138
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
138
- const EXPANDABLE_MAX_LENGTH = 50;
139
139
  const EXPANDABLE_MAX_DEPTH = 100;
140
140
 
141
141
  const objectPropertiesSectionMap = new WeakMap<Element, ObjectPropertiesSection>();
@@ -639,13 +639,16 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
639
639
  const text = JSON.stringify(description);
640
640
  const tooLong = description.length > maxRenderableStringLength;
641
641
  return html`<span class="value object-value-string" title=${ifDefined(tooLong ? undefined : description)}>${
642
- tooLong ? new ExpandableTextPropertyValue(text, EXPANDABLE_MAX_LENGTH).element : text}</span>`;
642
+ tooLong ? html`<devtools-widget .widgetConfig=${
643
+ widgetConfig(ExpandableTextPropertyValue, {text})}></devtools-widget>` :
644
+ text}</span>`;
643
645
  }
644
646
  if (type === 'object' && subtype === 'trustedtype') {
645
647
  const text = `${className} '${description}'`;
646
648
  const tooLong = text.length > maxRenderableStringLength;
647
649
  return html`<span class="value object-value-trustedtype" title=${ifDefined(tooLong ? undefined : text)}>${
648
- tooLong ? new ExpandableTextPropertyValue(text, EXPANDABLE_MAX_LENGTH).element :
650
+ tooLong ? html`<devtools-widget .widgetConfig=${
651
+ widgetConfig(ExpandableTextPropertyValue, {text})}></devtools-widget>` :
649
652
  html`${className} <span class=object-value-string title=${description}>${
650
653
  JSON.stringify(description)}</span>`}</span>`;
651
654
  }
@@ -663,8 +666,9 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
663
666
  >${renderNodeTitle(description)}</span>`;
664
667
  }
665
668
  if (description.length > maxRenderableStringLength) {
666
- return html`<span class="value object-value-${subtype || type}" title=${description}>${
667
- new ExpandableTextPropertyValue(description, EXPANDABLE_MAX_LENGTH).element}</span>`;
669
+ return html`<span class="value object-value-${subtype || type}" title=${description}><devtools-widget
670
+ .widgetConfig=${
671
+ widgetConfig(ExpandableTextPropertyValue, {text: description})}></devtools-widget></span>`;
668
672
  }
669
673
  const hasPreview = value.preview && showPreview;
670
674
  return html`<span class="value object-value-${subtype || type}" title=${description}>${
@@ -992,7 +996,6 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
992
996
  private linkifier: Components.Linkifier.Linkifier|undefined;
993
997
  private readonly maxNumPropertiesToShow: number;
994
998
  readOnly!: boolean;
995
- private prompt!: ObjectPropertyPrompt|undefined;
996
999
  #editing = false;
997
1000
  readonly #view: TreeElementView;
998
1001
  #completions: string[] = [];
@@ -1107,39 +1110,6 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
1107
1110
  treeNode.appendChild(infoElement);
1108
1111
  }
1109
1112
 
1110
- static createRemoteObjectAccessorPropertySpan(
1111
- object: SDK.RemoteObject.RemoteObject|null, propertyPath: string[],
1112
- callback: (arg0: SDK.RemoteObject.CallFunctionResult) => void): HTMLElement {
1113
- const rootElement = document.createElement('span');
1114
- const element = rootElement.createChild('span');
1115
- element.textContent = i18nString(UIStrings.dots);
1116
- if (!object) {
1117
- return rootElement;
1118
- }
1119
- element.classList.add('object-value-calculate-value-button');
1120
- UI.Tooltip.Tooltip.install(element, i18nString(UIStrings.invokePropertyGetter));
1121
- element.addEventListener('click', onInvokeGetterClick, false);
1122
-
1123
- function onInvokeGetterClick(event: Event): void {
1124
- event.consume();
1125
- if (object) {
1126
- void object.callFunction(invokeGetter, [{value: JSON.stringify(propertyPath)}]).then(callback);
1127
- }
1128
- }
1129
-
1130
- function invokeGetter(this: Object, arrayStr: string): Object {
1131
- let result: Object = this;
1132
- const properties = JSON.parse(arrayStr);
1133
- for (let i = 0, n = properties.length; i < n; ++i) {
1134
- // @ts-expect-error callFunction expects this to be a generic Object, so while this works we can't be more specific on types.
1135
- result = result[properties[i]];
1136
- }
1137
- return result;
1138
- }
1139
-
1140
- return rootElement;
1141
- }
1142
-
1143
1113
  get nameElement(): Element|undefined {
1144
1114
  return this.#nameElement;
1145
1115
  }
@@ -1623,13 +1593,6 @@ export class ArrayGroupingTreeElement extends UI.TreeOutline.TreeElement {
1623
1593
  static sparseIterationThreshold = 250000;
1624
1594
  }
1625
1595
 
1626
- export class ObjectPropertyPrompt extends UI.TextPrompt.TextPrompt {
1627
- constructor() {
1628
- super();
1629
- this.initialize(TextEditor.JavaScript.completeInContext);
1630
- }
1631
- }
1632
-
1633
1596
  export class ObjectPropertiesSectionsTreeExpandController {
1634
1597
  static readonly #propertyPathCache = new WeakMap<UI.TreeOutline.TreeElement, string>();
1635
1598
  static readonly #sectionMap = new WeakMap<RootElement, string>();
@@ -1740,89 +1703,102 @@ export class Renderer implements UI.UIUtils.Renderer {
1740
1703
  }
1741
1704
  }
1742
1705
 
1743
- export class ExpandableTextPropertyValue {
1744
- private readonly text: string;
1745
- private readonly maxLength: number;
1746
- private readonly maxDisplayableTextLength: number;
1747
- readonly #byteCount: number;
1748
- #expanded = false;
1749
- #element: DocumentFragment;
1750
-
1751
- constructor(text: string, maxLength: number) {
1752
- this.#element = document.createDocumentFragment();
1753
- this.text = text;
1754
- this.maxLength = maxLength;
1755
- this.maxDisplayableTextLength = 10000000;
1756
- this.#byteCount = Platform.StringUtilities.countWtf8Bytes(text);
1757
- this.#render();
1758
- }
1759
-
1760
- get element(): DocumentFragment {
1761
- return this.#element;
1762
- }
1763
-
1764
- #render(): void {
1765
- const totalBytesText = i18n.ByteUtilities.bytesToString(this.#byteCount);
1766
- const onContextMenu = (e: Event): void => {
1767
- const {target} = e;
1768
- if (!(target instanceof Element)) {
1769
- return;
1770
- }
1771
- const listItem = target.closest('li');
1772
- const element = listItem && UI.TreeOutline.TreeElement.getTreeElementBylistItemNode(listItem);
1773
- if (!(element instanceof ObjectPropertyTreeElement)) {
1774
- return;
1775
- }
1776
- const contextMenu = element.getContextMenu(e);
1777
- if (this.text.length < this.maxDisplayableTextLength && !this.#expanded) {
1778
- contextMenu.clipboardSection().appendItem(
1779
- i18nString(UIStrings.showMoreS, {PH1: totalBytesText}), this.expandText.bind(this),
1780
- {jslogContext: 'show-more'});
1781
- }
1706
+ interface ExpandableTextViewInput {
1707
+ copyText: () => void;
1708
+ expandText: () => void;
1709
+ expanded: boolean;
1710
+ maxLength: number;
1711
+ byteCount: number;
1712
+ text: string;
1713
+ }
1714
+ type ExpandableTextView = (input: ExpandableTextViewInput, output: object, target: HTMLElement) => void;
1715
+ export const EXPANDABLE_TEXT_DEFAULT_VIEW: ExpandableTextView = (input, output, target) => {
1716
+ const totalBytesText = i18n.ByteUtilities.bytesToString(input.byteCount);
1717
+ const canExpand = input.text.length < ExpandableTextPropertyValue.MAX_DISPLAYABLE_TEXT_LENGTH;
1718
+ const onContextMenu = (e: Event): void => {
1719
+ const {target} = e;
1720
+ if (!(target instanceof Element)) {
1721
+ return;
1722
+ }
1723
+ const listItem = target.closest('li');
1724
+ const element = listItem && UI.TreeOutline.TreeElement.getTreeElementBylistItemNode(listItem);
1725
+ if (!(element instanceof ObjectPropertyTreeElement)) {
1726
+ return;
1727
+ }
1728
+ const contextMenu = element.getContextMenu(e);
1729
+ if (canExpand && !input.expanded) {
1782
1730
  contextMenu.clipboardSection().appendItem(
1783
- i18nString(UIStrings.copy), this.copyText.bind(this), {jslogContext: 'copy'});
1784
- void contextMenu.show();
1785
- e.consume(true);
1786
- };
1731
+ i18nString(UIStrings.showMoreS, {PH1: totalBytesText}), input.expandText, {jslogContext: 'show-more'});
1732
+ }
1733
+ contextMenu.clipboardSection().appendItem(i18nString(UIStrings.copy), input.copyText, {jslogContext: 'copy'});
1734
+ void contextMenu.show();
1735
+ e.consume(true);
1736
+ };
1787
1737
 
1788
- const croppedText = this.text.slice(0, this.maxLength);
1738
+ const croppedText = input.text.slice(0, input.maxLength);
1789
1739
 
1790
- // eslint-disable-next-line @devtools/no-lit-render-outside-of-view
1791
- render(
1792
- // clang-format off
1740
+ render(
1741
+ // clang-format off
1793
1742
  html`<span title=${croppedText + '…'} @contextmenu=${onContextMenu}>
1794
- ${this.#expanded ? this.text : croppedText}
1743
+ ${input.expanded ? input.text : croppedText}
1795
1744
  <button
1796
- ?hidden=${this.#expanded}
1797
- @click=${this.#canExpand ? this.expandText.bind(this) : undefined}
1798
- jslog=${ifDefined(this.#canExpand ? VisualLogging.action('expand').track({click: true}) : undefined)}
1799
- class=${this.#canExpand ? 'expandable-inline-button' : 'undisplayable-text'}
1800
- data-text=${this.#canExpand ? i18nString(UIStrings.showMoreS, {PH1: totalBytesText}) :
1745
+ ?hidden=${input.expanded}
1746
+ @click=${canExpand ? input.expandText : undefined}
1747
+ jslog=${ifDefined(canExpand ? VisualLogging.action('expand').track({click: true}) : undefined)}
1748
+ class=${canExpand ? 'expandable-inline-button' : 'undisplayable-text'}
1749
+ data-text=${canExpand ? i18nString(UIStrings.showMoreS, {PH1: totalBytesText}) :
1801
1750
  i18nString(UIStrings.longTextWasTruncatedS, {PH1: totalBytesText})}
1802
1751
  ></button>
1803
1752
  <button
1804
1753
  class=expandable-inline-button
1805
- @click=${this.copyText.bind(this)}
1754
+ @click=${input.copyText}
1806
1755
  data-text=${i18nString(UIStrings.copy)}
1807
1756
  jslog=${VisualLogging.action('copy').track({click: true})}
1808
1757
  ></button>
1809
1758
  </span>`,
1810
- // clang-format on
1811
- this.#element);
1759
+ // clang-format on
1760
+ target);
1761
+ };
1762
+
1763
+ export class ExpandableTextPropertyValue extends UI.Widget.Widget {
1764
+ static readonly MAX_DISPLAYABLE_TEXT_LENGTH = 10000000;
1765
+ static readonly EXPANDABLE_MAX_LENGTH = 50;
1766
+ #text = '';
1767
+ #byteCount = 0;
1768
+ #expanded = false;
1769
+ #maxLength = ExpandableTextPropertyValue.EXPANDABLE_MAX_LENGTH;
1770
+ readonly #view: ExpandableTextView;
1771
+
1772
+ constructor(target?: HTMLElement, view = EXPANDABLE_TEXT_DEFAULT_VIEW) {
1773
+ super(target);
1774
+ this.#view = view;
1812
1775
  }
1813
1776
 
1814
- get #canExpand(): boolean {
1815
- return this.text.length < this.maxDisplayableTextLength;
1777
+ set text(text: string) {
1778
+ this.#text = text;
1779
+ this.#byteCount = Platform.StringUtilities.countWtf8Bytes(text);
1780
+ this.requestUpdate();
1816
1781
  }
1817
1782
 
1818
- private expandText(): void {
1819
- if (!this.#expanded) {
1820
- this.#expanded = true;
1821
- this.#render();
1822
- }
1783
+ set maxLength(maxLength: number) {
1784
+ this.#maxLength = maxLength;
1785
+ this.requestUpdate();
1823
1786
  }
1824
1787
 
1825
- private copyText(): void {
1826
- Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(this.text);
1788
+ override performUpdate(): void {
1789
+ const input: ExpandableTextViewInput = {
1790
+ copyText: () => Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(this.#text),
1791
+ expandText: () => {
1792
+ if (!this.#expanded) {
1793
+ this.#expanded = true;
1794
+ this.requestUpdate();
1795
+ }
1796
+ },
1797
+ expanded: this.#expanded,
1798
+ byteCount: this.#byteCount,
1799
+ maxLength: this.#maxLength,
1800
+ text: this.#text,
1801
+ };
1802
+ this.#view(input, {}, this.contentElement);
1827
1803
  }
1828
1804
  }
@@ -1130,8 +1130,7 @@ const searchHighlighter = CodeMirror.ViewPlugin.fromClass(class {
1130
1130
  }
1131
1131
  if (match[0].length) {
1132
1132
  const start = pos + match.index, end = start + match[0].length;
1133
- const current =
1134
- active.currentRange && active.currentRange.from === start && active.currentRange.to === end;
1133
+ const current = active.currentRange?.from === start && active.currentRange.to === end;
1135
1134
  builder.add(start, end, current ? currentSearchMatchDeco : searchMatchDeco);
1136
1135
  } else {
1137
1136
  active.regexp.regex.lastIndex = match.index + 1;
@@ -217,7 +217,7 @@ export function buildStackTraceRows(
217
217
  }
218
218
 
219
219
  function renderStackTraceTable(
220
- container: Element, parent: Element,
220
+ container: Element, parent: Element, expandable: boolean,
221
221
  stackTraceRows: Array<StackTraceRegularRow|StackTraceAsyncRow>): HTMLElement[] {
222
222
  container.removeChildren();
223
223
  const links: HTMLElement[] = [];
@@ -225,20 +225,33 @@ function renderStackTraceTable(
225
225
  // The tableSection groups one or more synchronous call frames together.
226
226
  // Wherever there is an asynchronous call, a new section is created.
227
227
  let tableSection: Element|null = null;
228
+ let firstRow = true;
228
229
  for (const item of stackTraceRows) {
229
230
  if (!tableSection || 'asyncDescription' in item) {
230
231
  tableSection = container.createChild('tbody');
231
232
  }
232
233
 
233
234
  const row = tableSection.createChild('tr');
234
- if ('asyncDescription' in item) {
235
+ if (firstRow && expandable) {
236
+ const button = row.createChild('td').createChild('button', 'arrow-icon-button');
237
+ button.createChild('span', 'arrow-icon');
238
+ parent.classList.add('expandable');
239
+ container.classList.add('expandable');
240
+ button.addEventListener('click', () => {
241
+ button.setAttribute('jslog', `${VisualLogging.expand().track({click: true})}`);
242
+ parent.classList.toggle('expanded');
243
+ container.classList.toggle('expanded');
244
+ });
245
+ firstRow = false;
246
+ } else {
235
247
  row.createChild('td').textContent = '\n';
248
+ }
249
+ if ('asyncDescription' in item) {
236
250
  row.createChild('td', 'stack-preview-async-description').textContent = item.asyncDescription;
237
251
  row.createChild('td');
238
252
  row.createChild('td');
239
253
  row.classList.add('stack-preview-async-row');
240
254
  } else {
241
- row.createChild('td').textContent = '\n';
242
255
  row.createChild('td', 'function-name').textContent = item.functionName;
243
256
  row.createChild('td').textContent = ' @ ';
244
257
  if (item.link) {
@@ -284,13 +297,13 @@ function renderStackTraceTable(
284
297
  export interface Options {
285
298
  // TODO(crbug.com/456517732): remove when all usages of runtimeStackTrace are migrated.
286
299
  runtimeStackTrace?: Protocol.Runtime.StackTrace;
287
- stackTrace?: StackTrace.StackTrace.StackTrace;
288
300
  tabStops?: boolean;
289
301
  // Whether the width of stack trace preview
290
302
  // is constrained to its container or whether
291
303
  // it can grow the container.
292
304
  widthConstrained?: boolean;
293
305
  showColumnNumber?: boolean;
306
+ expandable?: boolean;
294
307
  }
295
308
 
296
309
  export interface StackTraceRegularRow {
@@ -303,8 +316,10 @@ export interface StackTraceAsyncRow {
303
316
  }
304
317
 
305
318
  export class StackTracePreviewContent extends UI.Widget.Widget {
319
+ #stackTrace?: StackTrace.StackTrace.StackTrace;
306
320
  #target?: SDK.Target.Target;
307
321
  #linkifier?: Linkifier;
322
+ #ownedLinkifier?: Linkifier;
308
323
  #options: Options;
309
324
  #links: HTMLElement[] = [];
310
325
 
@@ -315,6 +330,10 @@ export class StackTracePreviewContent extends UI.Widget.Widget {
315
330
 
316
331
  this.#target = target;
317
332
  this.#linkifier = linkifier;
333
+ if (!this.#linkifier) {
334
+ this.#ownedLinkifier = new Linkifier();
335
+ this.#linkifier = this.#ownedLinkifier;
336
+ }
318
337
  this.#options = options || {
319
338
  widthConstrained: false,
320
339
  };
@@ -329,7 +348,7 @@ export class StackTracePreviewContent extends UI.Widget.Widget {
329
348
  this.#table = this.contentElement.createChild('table', 'stack-preview-container');
330
349
  this.#table.classList.toggle('width-constrained', this.#options.widthConstrained ?? false);
331
350
 
332
- this.#options.stackTrace?.addEventListener(StackTrace.StackTrace.Events.UPDATED, this.performUpdate.bind(this));
351
+ this.#stackTrace?.addEventListener(StackTrace.StackTrace.Events.UPDATED, this.performUpdate.bind(this));
333
352
 
334
353
  this.performUpdate();
335
354
  }
@@ -339,21 +358,22 @@ export class StackTracePreviewContent extends UI.Widget.Widget {
339
358
  return;
340
359
  }
341
360
 
342
- const {runtimeStackTrace, stackTrace, tabStops} = this.#options;
361
+ const {runtimeStackTrace, tabStops} = this.#options;
343
362
 
344
- if (stackTrace) {
363
+ if (this.#stackTrace) {
345
364
  const stackTraceRows = buildStackTraceRows(
346
- stackTrace, this.#target ?? null, this.#linkifier, tabStops, this.#options.showColumnNumber);
347
- this.#links = renderStackTraceTable(this.#table, this.element, stackTraceRows);
365
+ this.#stackTrace, this.#target ?? null, this.#linkifier, tabStops, this.#options.showColumnNumber);
366
+ this.#links = renderStackTraceTable(this.#table, this.element, this.#options.expandable ?? false, stackTraceRows);
348
367
  return;
349
368
  }
350
369
 
351
370
  // TODO(crbug.com/456517732): remove when all usages of runtimeStackTrace are migrated.
352
- const updateCallback = renderStackTraceTable.bind(null, this.#table, this.element);
371
+ const updateCallback =
372
+ renderStackTraceTable.bind(null, this.#table, this.element, this.#options.expandable ?? false);
353
373
  const stackTraceRows = buildStackTraceRowsForLegacyRuntimeStackTrace(
354
374
  runtimeStackTrace ?? {callFrames: []}, this.#target ?? null, this.#linkifier, tabStops, updateCallback,
355
375
  this.#options.showColumnNumber);
356
- this.#links = renderStackTraceTable(this.#table, this.element, stackTraceRows);
376
+ this.#links = renderStackTraceTable(this.#table, this.element, this.#options.expandable ?? false, stackTraceRows);
357
377
  }
358
378
 
359
379
  get linkElements(): readonly HTMLElement[] {
@@ -374,4 +394,13 @@ export class StackTracePreviewContent extends UI.Widget.Widget {
374
394
  this.#options = options;
375
395
  this.requestUpdate();
376
396
  }
397
+
398
+ set stackTrace(stackTrace: StackTrace.StackTrace.StackTrace) {
399
+ this.#stackTrace = stackTrace;
400
+ this.requestUpdate();
401
+ }
402
+
403
+ override onDetach(): void {
404
+ this.#ownedLinkifier?.dispose();
405
+ }
377
406
  }
@@ -99,6 +99,34 @@
99
99
  &:not(.show-hidden-rows) > tfoot > tr.show-less-link {
100
100
  --display-toggle-link: none;
101
101
  }
102
+
103
+ .arrow-icon-button {
104
+ cursor: pointer;
105
+ padding: 1px 0;
106
+ border: none;
107
+ background: none;
108
+ margin-left: -4px;
109
+ margin-right: -2px;
110
+ }
111
+
112
+ .arrow-icon {
113
+ display: inline-block;
114
+ mask-image: var(--image-file-triangle-right);
115
+ background-color: var(--icon-default);
116
+ margin-top: 2px;
117
+ height: 14px;
118
+ width: 14px;
119
+ transition: transform 200ms;
120
+ }
121
+
122
+ &.expanded .arrow-icon{
123
+ transform: rotate(90deg);
124
+ }
125
+
126
+ &.expandable:not(.expanded) tbody:not(:first-of-type),
127
+ &.expandable:not(.expanded) tbody tr:not(:first-of-type) {
128
+ display: none;
129
+ }
102
130
  }
103
131
 
104
132
  /* The show more/less links aren't really a part of the content
@@ -1753,6 +1753,7 @@ export const knownContextValues = new Set([
1753
1753
  'grid-column-start',
1754
1754
  'grid-gap',
1755
1755
  'grid-how',
1756
+ 'grid-lanes',
1756
1757
  'grid-overlays',
1757
1758
  'grid-row',
1758
1759
  'grid-row-end',
@@ -131,7 +131,8 @@ function checkContextValue(context: string|number|undefined): void {
131
131
  if (Root.Runtime.Runtime.queryParam('debugFrontend') || Host.InspectorFrontendHost.isUnderTest() ||
132
132
  localStorage.getItem('veDebugLoggingEnabled') === DebugLoggingFormat.TEST) {
133
133
  const stack = (new Error().stack || '').split('\n').slice(3).join('\n');
134
- console.error(`Unknown VE context: ${context}${stack}`);
134
+ console.error(`Unknown VE context: '${context}'\n${
135
+ stack}\nPlease add it to front_end/ui/visual_logging/KnownContextValues.ts if you think that's a valid context value.`);
135
136
  }
136
137
  reportedUnknownVeContext.add(context);
137
138
  }
@@ -38,7 +38,10 @@ export class WindowControlsOverlay extends Overlay {
38
38
  }
39
39
 
40
40
  override uninstall() {
41
- this.document.body.innerHTML = '';
41
+ this.windowsToolBar.remove();
42
+ this.linuxToolBar.remove();
43
+ this.macToolbarRight.remove();
44
+ this.macToolbarLeft.remove();
42
45
  super.uninstall();
43
46
  }
44
47
 
package/mcp/mcp.ts CHANGED
@@ -31,6 +31,6 @@ export {
31
31
  type EventTypes as IssuesManagerEventTypes,
32
32
  IssuesManager
33
33
  } from '../front_end/models/issues_manager/IssuesManager.js';
34
- export {findTitleFromMarkdownAst} from '../front_end/models/issues_manager/MarkdownIssueDescription.js';
34
+ export * as MarkdownIssueDescription from '../front_end/models/issues_manager/MarkdownIssueDescription.js';
35
35
  export * as TraceEngine from '../front_end/models/trace/trace.js';
36
36
  export * as Marked from '../front_end/third_party/marked/marked.js';
package/package.json CHANGED
@@ -21,11 +21,10 @@
21
21
  "build": "vpython3 third_party/node/node.py --output scripts/run_build.mjs",
22
22
  "check-external-links": "vpython3 third_party/node/node.py --output scripts/check_external_links.js",
23
23
  "collect-strings": "vpython3 third_party/node/node.py --output third_party/i18n/collect-strings.js front_end",
24
- "components-server": "vpython3 third_party/node/node.py --output scripts/component_server/server.js",
25
24
  "debug-webtest": "vpython3 third_party/node/node.py --output scripts/npm_test.js --debug-devtools",
26
25
  "generate-protocol-resources": "vpython3 scripts/deps/generate_protocol_resources.py && git cl format --js",
27
26
  "install-deps": "vpython3 scripts/deps/manage_node_deps.py",
28
- "lint": "vpython3 third_party/node/node.py --output --experimental-strip-types --no-warnings=ExperimentalWarning scripts/test/run_lint_check.mjs",
27
+ "lint": "vpython3 third_party/node/node.py --output scripts/test/run_lint_check.mjs",
29
28
  "prebuild": "gn gen out/Default",
30
29
  "rdb": "rdb stream -new -realm chromium:public --",
31
30
  "start": "vpython3 third_party/node/node.py --output scripts/run_start.mjs",
@@ -103,5 +102,5 @@
103
102
  "flat-cache": "6.1.12"
104
103
  }
105
104
  },
106
- "version": "1.0.1547147"
105
+ "version": "1.0.1548870"
107
106
  }
@@ -1,60 +0,0 @@
1
- // Copyright 2014 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- export class WorkerWrapper {
6
- readonly #workerPromise: Promise<Worker>;
7
- #disposed?: boolean;
8
- #rejectWorkerPromise?: (error: Error) => void;
9
-
10
- private constructor(workerLocation: URL) {
11
- this.#workerPromise = new Promise((fulfill, reject) => {
12
- this.#rejectWorkerPromise = reject;
13
- const worker = new Worker(workerLocation, {type: 'module'});
14
- worker.onerror = event => {
15
- console.error(`Failed to load worker for ${workerLocation.href}:`, event);
16
- };
17
- worker.onmessage = (event: MessageEvent<unknown>) => {
18
- console.assert(event.data === 'workerReady');
19
- worker.onmessage = null;
20
- fulfill(worker);
21
- };
22
- });
23
- }
24
-
25
- static fromURL(url: URL): WorkerWrapper {
26
- return new WorkerWrapper(url);
27
- }
28
-
29
- postMessage(message: unknown, transfer?: Transferable[]): void {
30
- void this.#workerPromise.then(worker => {
31
- if (!this.#disposed) {
32
- worker.postMessage(message, transfer ?? []);
33
- }
34
- });
35
- }
36
-
37
- dispose(): void {
38
- this.#disposed = true;
39
- void this.#workerPromise.then(worker => worker.terminate());
40
- }
41
-
42
- terminate(immediately = false): void {
43
- if (immediately) {
44
- this.#rejectWorkerPromise?.(new Error('Worker terminated'));
45
- }
46
- this.dispose();
47
- }
48
-
49
- set onmessage(listener: (event: MessageEvent) => void) {
50
- void this.#workerPromise.then(worker => {
51
- worker.onmessage = listener;
52
- });
53
- }
54
-
55
- set onerror(listener: (event: Event) => void) {
56
- void this.#workerPromise.then(worker => {
57
- worker.onerror = listener;
58
- });
59
- }
60
- }