chrome-devtools-frontend 1.0.1675430 → 1.0.1676824

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 (225) hide show
  1. package/WATCHLISTS +0 -4
  2. package/front_end/core/common/Settings.ts +0 -66
  3. package/front_end/core/root/Runtime.ts +0 -5
  4. package/front_end/core/sdk/CSSMetadata.ts +5 -9
  5. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +8 -28
  6. package/front_end/core/sdk/DebuggerModel.ts +50 -30
  7. package/front_end/core/sdk/ResourceTreeModel.ts +20 -1
  8. package/front_end/core/sdk/Script.ts +9 -53
  9. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +213 -23
  10. package/front_end/entrypoints/main/MainImpl.ts +31 -0
  11. package/front_end/generated/InspectorBackendCommands.ts +3 -1
  12. package/front_end/generated/SupportedCSSProperties.ts +21 -4
  13. package/front_end/generated/protocol-mapping.d.ts +14 -0
  14. package/front_end/generated/protocol-proxy-api.d.ts +10 -0
  15. package/front_end/generated/protocol.ts +35 -0
  16. package/front_end/models/ai_assistance/AiAgent2.ts +11 -0
  17. package/front_end/models/ai_assistance/AiConversation.ts +22 -5
  18. package/front_end/models/ai_assistance/README.md +52 -26
  19. package/front_end/models/ai_assistance/agents/AiAgent.ts +54 -8
  20. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +1 -1
  21. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +7 -194
  22. package/front_end/models/ai_assistance/agents/StorageAgent.ts +8 -87
  23. package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -1
  24. package/front_end/models/ai_assistance/ai_assistance.ts +16 -0
  25. package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +124 -0
  26. package/front_end/models/ai_assistance/contexts/StorageContext.ts +111 -0
  27. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +69 -1
  28. package/front_end/models/ai_assistance/skills/README.md +63 -1
  29. package/front_end/models/ai_assistance/skills/Skill.ts +1 -1
  30. package/front_end/models/ai_assistance/skills/SkillRegistry.ts +4 -0
  31. package/front_end/models/ai_assistance/skills/performance.md +8 -0
  32. package/front_end/models/ai_assistance/skills/sources.md +16 -0
  33. package/front_end/models/ai_assistance/skills/storage.md +31 -0
  34. package/front_end/models/ai_assistance/tools/GetSourceContent.ts +101 -0
  35. package/front_end/models/ai_assistance/tools/GetTraceEventByKey.ts +83 -0
  36. package/front_end/models/ai_assistance/tools/GetTraceMainThreadSummary.ts +106 -0
  37. package/front_end/models/ai_assistance/tools/GetTraceNetworkSummary.ts +104 -0
  38. package/front_end/models/ai_assistance/tools/ListPageOrigins.ts +81 -0
  39. package/front_end/models/ai_assistance/tools/ListSources.ts +116 -0
  40. package/front_end/models/ai_assistance/tools/SelectTraceEventByKey.ts +90 -0
  41. package/front_end/models/ai_assistance/tools/Tool.ts +22 -1
  42. package/front_end/models/ai_assistance/tools/ToolRegistry.ts +14 -0
  43. package/front_end/models/bindings/CSSWorkspaceBinding.ts +4 -0
  44. package/front_end/models/bindings/CompilerScriptMapping.ts +4 -0
  45. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +8 -0
  46. package/front_end/models/bindings/ResourceScriptMapping.ts +3 -201
  47. package/front_end/models/bindings/SASSSourceMapping.ts +6 -0
  48. package/front_end/models/breakpoints/BreakpointManager.ts +2 -49
  49. package/front_end/models/heap_snapshot/HeapSnapshotModel.ts +27 -0
  50. package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +10 -2
  51. package/front_end/models/issues_manager/descriptions/connectionAllowlistEmbeddingRequirementNotSatisfied.md +26 -0
  52. package/front_end/models/issues_manager/descriptions/connectionAllowlistIFrameAttributeLoosensEmbeddingRequirement.md +19 -0
  53. package/front_end/models/issues_manager/descriptions/connectionAllowlistInvalidAllowConnectionAllowlistFrom.md +21 -0
  54. package/front_end/models/javascript_metadata/NativeFunctions.js +1 -1
  55. package/front_end/models/persistence/IsolatedFileSystem.ts +7 -8
  56. package/front_end/models/persistence/IsolatedFileSystemManager.ts +2 -2
  57. package/front_end/models/persistence/PlatformFileSystem.ts +1 -1
  58. package/front_end/models/persistence/persistence-meta.ts +9 -9
  59. package/front_end/models/trace/types/TraceEvents.ts +36 -0
  60. package/front_end/panels/accessibility/ARIAAttributesView.ts +3 -3
  61. package/front_end/panels/accessibility/AccessibilityNodeView.ts +36 -36
  62. package/front_end/panels/accessibility/AccessibilityStrings.ts +168 -168
  63. package/front_end/panels/accessibility/SourceOrderView.ts +7 -7
  64. package/front_end/panels/accessibility/accessibility-meta.ts +2 -2
  65. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +5 -5
  66. package/front_end/panels/ai_assistance/components/AIv2MarkdownRenderer.ts +2 -3
  67. package/front_end/panels/ai_assistance/components/ChatInput.ts +2 -2
  68. package/front_end/panels/ai_assistance/components/ChatMessage.ts +27 -2
  69. package/front_end/panels/application/IndexedDBViews.ts +65 -63
  70. package/front_end/panels/application/WebMCPView.ts +16 -7
  71. package/front_end/panels/common/AiCodeCompletionSummaryToolbar.ts +5 -5
  72. package/front_end/panels/common/BadgeNotification.ts +8 -8
  73. package/front_end/panels/common/ExtensionServer.ts +21 -1
  74. package/front_end/panels/common/GdpSignUpDialog.ts +16 -16
  75. package/front_end/panels/common/GeminiRebrandPromoDialog.ts +5 -6
  76. package/front_end/panels/common/PersistenceUtils.ts +2 -2
  77. package/front_end/panels/common/common.ts +0 -97
  78. package/front_end/panels/console/ConsoleInsightTeaser.ts +2 -2
  79. package/front_end/panels/console/ConsolePinPane.ts +2 -2
  80. package/front_end/panels/console/ConsoleView.ts +20 -19
  81. package/front_end/panels/elements/LayoutPane.ts +2 -8
  82. package/front_end/panels/event_listeners/EventListenersView.ts +8 -4
  83. package/front_end/panels/issues/AffectedTrackingSitesView.ts +25 -14
  84. package/front_end/panels/media/PlayerMessagesView.ts +149 -68
  85. package/front_end/panels/network/NetworkPanel.ts +1 -1
  86. package/front_end/panels/network/RequestPayloadView.ts +1 -0
  87. package/front_end/panels/profiler/HeapSnapshotView.ts +0 -2
  88. package/front_end/panels/profiler/heapProfiler.css +0 -9
  89. package/front_end/panels/recorder/RecorderPanel.ts +2 -3
  90. package/front_end/panels/screencast/ScreencastView.ts +148 -138
  91. package/front_end/panels/sources/AiCodeCompletionPlugin.ts +2 -2
  92. package/front_end/panels/sources/DebuggerPlugin.ts +9 -58
  93. package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
  94. package/front_end/panels/sources/UISourceCodeFrame.ts +3 -8
  95. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +4 -2
  96. package/front_end/panels/timeline/TimelineController.ts +36 -64
  97. package/front_end/panels/timeline/TimelinePanel.ts +11 -8
  98. package/front_end/panels/timeline/TimelineUIUtils.ts +5 -2
  99. package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +2 -2
  100. package/front_end/panels/timeline/timelinePanel.css +0 -10
  101. package/front_end/panels/utils/utils.ts +7 -7
  102. package/front_end/services/tracing/PerformanceTracing.ts +5 -17
  103. package/front_end/third_party/chromium/README.chromium +1 -1
  104. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  105. package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
  106. package/front_end/third_party/codemirror.next/package.json +2 -2
  107. package/front_end/third_party/codemirror.next/rebuild.sh +4 -1
  108. package/front_end/ui/comments/CommentAnchorResolver.ts +436 -10
  109. package/front_end/ui/comments/CommentManager.ts +640 -0
  110. package/front_end/ui/comments/CommentsOverlayWidget.ts +121 -0
  111. package/front_end/ui/comments/comments.ts +4 -0
  112. package/front_end/ui/comments/commentsOverlay.css +49 -0
  113. package/front_end/{panels/common → ui/components/dialogs}/FreDialog.ts +6 -6
  114. package/front_end/ui/components/dialogs/TypeToAllowDialog.ts +96 -0
  115. package/front_end/ui/components/dialogs/dialogs.ts +4 -0
  116. package/front_end/ui/components/settings/SettingCheckbox.ts +3 -3
  117. package/front_end/{panels/common → ui/components/text_editor}/AiCodeCompletionDisclaimer.ts +13 -13
  118. package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +7 -6
  119. package/front_end/{panels/common → ui/components/text_editor}/AiCodeCompletionTeaser.ts +43 -46
  120. package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +22 -26
  121. package/front_end/{panels/common → ui/components/text_editor}/AiCodeGenerationTeaser.ts +10 -10
  122. package/front_end/{panels/common → ui/components/text_editor}/AiCodeGenerationUpgradeDialog.ts +5 -5
  123. package/front_end/ui/components/text_editor/text_editor.ts +4 -0
  124. package/front_end/ui/legacy/Toolbar.ts +1 -1
  125. package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +11 -3
  126. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +270 -162
  127. package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +5 -0
  128. package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +11 -16
  129. package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +5 -12
  130. package/front_end/ui/legacy/components/source_frame/JSONView.ts +8 -1
  131. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +2 -2
  132. package/front_end/ui/settings/SettingUIRegistration.ts +55 -6
  133. package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
  134. package/mcp/mcp.ts +6 -1
  135. package/package.json +1 -1
  136. package/front_end/Images/toolbarResizerVertical.png +0 -0
  137. package/front_end/emulated_devices/MotoG4-landscape.svg +0 -155
  138. package/front_end/emulated_devices/MotoG4-portrait.svg +0 -155
  139. package/front_end/emulated_devices/Nexus5X-landscape.svg +0 -19
  140. package/front_end/emulated_devices/Nexus5X-portrait.svg +0 -19
  141. package/front_end/emulated_devices/Nexus6P-landscape.svg +0 -50
  142. package/front_end/emulated_devices/Nexus6P-portrait.svg +0 -54
  143. package/front_end/emulated_devices/google-nest-hub-horizontal.png +0 -0
  144. package/front_end/emulated_devices/google-nest-hub-max-horizontal.png +0 -0
  145. package/front_end/emulated_devices/google-nexus-5-horizontal-default-1x.png +0 -0
  146. package/front_end/emulated_devices/google-nexus-5-horizontal-default-2x.png +0 -0
  147. package/front_end/emulated_devices/google-nexus-5-horizontal-keyboard-1x.png +0 -0
  148. package/front_end/emulated_devices/google-nexus-5-horizontal-keyboard-2x.png +0 -0
  149. package/front_end/emulated_devices/google-nexus-5-horizontal-navigation-1x.png +0 -0
  150. package/front_end/emulated_devices/google-nexus-5-horizontal-navigation-2x.png +0 -0
  151. package/front_end/emulated_devices/google-nexus-5-vertical-default-1x.png +0 -0
  152. package/front_end/emulated_devices/google-nexus-5-vertical-default-2x.png +0 -0
  153. package/front_end/emulated_devices/google-nexus-5-vertical-keyboard-1x.png +0 -0
  154. package/front_end/emulated_devices/google-nexus-5-vertical-keyboard-2x.png +0 -0
  155. package/front_end/emulated_devices/google-nexus-5-vertical-navigation-1x.png +0 -0
  156. package/front_end/emulated_devices/google-nexus-5-vertical-navigation-2x.png +0 -0
  157. package/front_end/emulated_devices/google-nexus-5x-horizontal-default-1x.png +0 -0
  158. package/front_end/emulated_devices/google-nexus-5x-horizontal-default-2x.png +0 -0
  159. package/front_end/emulated_devices/google-nexus-5x-horizontal-keyboard-1x.png +0 -0
  160. package/front_end/emulated_devices/google-nexus-5x-horizontal-keyboard-2x.png +0 -0
  161. package/front_end/emulated_devices/google-nexus-5x-horizontal-navigation-1x.png +0 -0
  162. package/front_end/emulated_devices/google-nexus-5x-horizontal-navigation-2x.png +0 -0
  163. package/front_end/emulated_devices/google-nexus-5x-vertical-default-1x.png +0 -0
  164. package/front_end/emulated_devices/google-nexus-5x-vertical-default-2x.png +0 -0
  165. package/front_end/emulated_devices/google-nexus-5x-vertical-keyboard-1x.png +0 -0
  166. package/front_end/emulated_devices/google-nexus-5x-vertical-keyboard-2x.png +0 -0
  167. package/front_end/emulated_devices/google-nexus-5x-vertical-navigation-1x.png +0 -0
  168. package/front_end/emulated_devices/google-nexus-5x-vertical-navigation-2x.png +0 -0
  169. package/front_end/emulated_devices/iPad-landscape.svg +0 -73
  170. package/front_end/emulated_devices/iPad-portrait.svg +0 -76
  171. package/front_end/emulated_devices/iPhone5-landscape.svg +0 -99
  172. package/front_end/emulated_devices/iPhone5-portrait.svg +0 -83
  173. package/front_end/emulated_devices/iPhone6-landscape.svg +0 -111
  174. package/front_end/emulated_devices/iPhone6-portrait.svg +0 -116
  175. package/front_end/emulated_devices/iPhone6Plus-landscape.svg +0 -118
  176. package/front_end/emulated_devices/iPhone6Plus-portrait.svg +0 -116
  177. package/front_end/emulated_devices/optimized/MotoG4-landscape.avif +0 -0
  178. package/front_end/emulated_devices/optimized/MotoG4-portrait.avif +0 -0
  179. package/front_end/emulated_devices/optimized/Nexus5X-landscape.avif +0 -0
  180. package/front_end/emulated_devices/optimized/Nexus5X-portrait.avif +0 -0
  181. package/front_end/emulated_devices/optimized/Nexus6P-landscape.avif +0 -0
  182. package/front_end/emulated_devices/optimized/Nexus6P-portrait.avif +0 -0
  183. package/front_end/emulated_devices/optimized/README.md +0 -9
  184. package/front_end/emulated_devices/optimized/google-nest-hub-horizontal.avif +0 -0
  185. package/front_end/emulated_devices/optimized/google-nest-hub-max-horizontal.avif +0 -0
  186. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-1x.avif +0 -0
  187. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-2x.avif +0 -0
  188. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-1x.avif +0 -0
  189. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-2x.avif +0 -0
  190. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-1x.avif +0 -0
  191. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-2x.avif +0 -0
  192. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-1x.avif +0 -0
  193. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-2x.avif +0 -0
  194. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-1x.avif +0 -0
  195. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-2x.avif +0 -0
  196. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-1x.avif +0 -0
  197. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-2x.avif +0 -0
  198. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-1x.avif +0 -0
  199. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-2x.avif +0 -0
  200. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-1x.avif +0 -0
  201. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-2x.avif +0 -0
  202. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-1x.avif +0 -0
  203. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-2x.avif +0 -0
  204. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-1x.avif +0 -0
  205. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-2x.avif +0 -0
  206. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-1x.avif +0 -0
  207. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-2x.avif +0 -0
  208. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-1x.avif +0 -0
  209. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-2x.avif +0 -0
  210. package/front_end/emulated_devices/optimized/iPad-landscape.avif +0 -0
  211. package/front_end/emulated_devices/optimized/iPad-portrait.avif +0 -0
  212. package/front_end/emulated_devices/optimized/iPhone5-landscape.avif +0 -0
  213. package/front_end/emulated_devices/optimized/iPhone5-portrait.avif +0 -0
  214. package/front_end/emulated_devices/optimized/iPhone6-landscape.avif +0 -0
  215. package/front_end/emulated_devices/optimized/iPhone6-portrait.avif +0 -0
  216. package/front_end/emulated_devices/optimized/iPhone6Plus-landscape.avif +0 -0
  217. package/front_end/emulated_devices/optimized/iPhone6Plus-portrait.avif +0 -0
  218. package/front_end/emulated_devices/optimized/optimized_images.gni +0 -53
  219. package/front_end/models/ai_assistance/agents/README.md +0 -136
  220. /package/front_end/{panels/common → ui/components/dialogs}/freDialog.css +0 -0
  221. /package/front_end/{panels/common/common.css → ui/components/dialogs/typeToAllowDialog.css} +0 -0
  222. /package/front_end/{panels/common → ui/components/text_editor}/aiCodeCompletionDisclaimer.css +0 -0
  223. /package/front_end/{panels/common → ui/components/text_editor}/aiCodeCompletionTeaser.css +0 -0
  224. /package/front_end/{panels/common → ui/components/text_editor}/aiCodeGenerationTeaser.css +0 -0
  225. /package/front_end/{panels/common → ui/components/text_editor}/aiCodeGenerationUpgradeDialog.css +0 -0
package/WATCHLISTS CHANGED
@@ -13,9 +13,6 @@
13
13
  'all': {
14
14
  'filepath': '.',
15
15
  },
16
- 'chromedriver': {
17
- 'filepath': 'front_end/emulated_devices/',
18
- },
19
16
  'lighthouse': {
20
17
  'filepath': '[Ll]ighthouse',
21
18
  },
@@ -26,7 +23,6 @@
26
23
 
27
24
  'WATCHLISTS': {
28
25
  'all': ['devtools-reviews+devtools@chromium.org'],
29
- 'chromedriver': [],
30
26
  'lighthouse': ['lighthouse-eng+devtools-cl@google.com'],
31
27
  'third_party': ['devtools-reviews+third_party@chromium.org'],
32
28
  },
@@ -10,7 +10,6 @@ import type {EventDescriptor, EventTargetEvent, GenericEvents} from './EventTarg
10
10
  import {ObjectWrapper} from './Object.js';
11
11
  import {
12
12
  getLocalizedSettingsCategory,
13
- type LearnMore,
14
13
  maybeRemoveSettingExtension,
15
14
  type RegExpSettingItem,
16
15
  registerSettingExtension,
@@ -518,13 +517,6 @@ export class Setting<V> {
518
517
  this.eventSupport.removeEventListener(this.name, listener, thisObject);
519
518
  }
520
519
 
521
- title(): Platform.UIString.LocalizedString {
522
- if (this.#registration?.title) {
523
- return this.#registration.title();
524
- }
525
- return '' as Platform.UIString.LocalizedString;
526
- }
527
-
528
520
  setRequiresUserAction(requiresUserAction: boolean): void {
529
521
  this.#requiresUserAction = requiresUserAction;
530
522
  }
@@ -624,57 +616,6 @@ export class Setting<V> {
624
616
  return this.#type ?? this.#registration?.settingType ?? null;
625
617
  }
626
618
 
627
- options(): SimpleSettingOption[] {
628
- if (this.#registration && this.#registration.options) {
629
- return this.#registration.options.map(opt => {
630
- const {value, title, text, raw} = opt;
631
- return {
632
- value,
633
- title: title(),
634
- text: typeof text === 'function' ? text() : text,
635
- raw,
636
- };
637
- });
638
- }
639
- return [];
640
- }
641
-
642
- reloadRequired(): boolean|null {
643
- if (this.#registration) {
644
- return this.#registration.reloadRequired || null;
645
- }
646
- return null;
647
- }
648
-
649
- category(): SettingCategory|null {
650
- if (this.#registration) {
651
- return this.#registration.category || null;
652
- }
653
- return null;
654
- }
655
-
656
- tags(): string|null {
657
- if (this.#registration && this.#registration.tags) {
658
- // Get localized keys and separate by null character to prevent fuzzy matching from matching across them.
659
- return this.#registration.tags.map(tag => tag()).join('\0');
660
- }
661
- return null;
662
- }
663
-
664
- order(): number|null {
665
- if (this.#registration) {
666
- return this.#registration.order || null;
667
- }
668
- return null;
669
- }
670
-
671
- /**
672
- * See {@link LearnMore} for more info
673
- */
674
- learnMore(): LearnMore|null {
675
- return this.#registration?.learnMore ?? null;
676
- }
677
-
678
619
  private printSettingsSavingError(message: string, value: string): void {
679
620
  const errorMessage =
680
621
  'Error saving setting with name: ' + this.name + ', value length: ' + value.length + '. Error: ' + message;
@@ -766,10 +707,3 @@ export {
766
707
  SettingRegistration,
767
708
  SettingType,
768
709
  };
769
-
770
- export interface SimpleSettingOption {
771
- value: string|boolean;
772
- title: string;
773
- text?: string;
774
- raw?: boolean;
775
- }
@@ -484,10 +484,6 @@ interface GdpProfilesAvailability {
484
484
  enterprisePolicyValue: GdpProfilesEnterprisePolicyValue;
485
485
  }
486
486
 
487
- interface LiveEdit {
488
- enabled: boolean;
489
- }
490
-
491
487
  interface ExtensionsOnChromeUrls {
492
488
  enabled: boolean;
493
489
  }
@@ -588,7 +584,6 @@ export type HostConfig = Platform.TypeScriptUtilities.RecursivePartial<{
588
584
  devToolsGlobalAiButton: GlobalAiButton,
589
585
  devToolsGdpProfiles: GdpProfiles,
590
586
  devToolsGdpProfilesAvailability: GdpProfilesAvailability,
591
- devToolsLiveEdit: LiveEdit,
592
587
  devToolsFlexibleLayout: DevToolsFlexibleLayout,
593
588
  deviceBoundSessionsDebugging: DeviceBoundSessionsDebugging,
594
589
  devToolsEnableDurableMessages: DevToolsEnableDurableMessages,
@@ -64,9 +64,6 @@ export class CSSMetadata {
64
64
  if (Boolean(runtimeFlagStatus) && runtimeFlagStatus !== 'stable') {
65
65
  continue;
66
66
  }
67
- if (!CSS.supports(propertyName, 'initial')) {
68
- continue;
69
- }
70
67
  this.#values.push(propertyName);
71
68
 
72
69
  if (property.inherited) {
@@ -113,7 +110,7 @@ export class CSSMetadata {
113
110
  for (const propertyName of this.#longhands.keys()) {
114
111
  // skip "all" because it is a CSS-wide keyword
115
112
  // skip shorthands that are defined in generatedPropertyValues because they have their own value sets
116
- if (propertyName === 'all' || propertyValueSets.has(propertyName)) {
113
+ if (propertyName === 'all' || propertyName in SupportedCSSProperties.generatedPropertyValues) {
117
114
  continue;
118
115
  }
119
116
  const longhands = this.#longhands.get(propertyName);
@@ -121,6 +118,10 @@ export class CSSMetadata {
121
118
  continue;
122
119
  }
123
120
  const values = new Array<string>();
121
+ const propertyValueSet = propertyValueSets.get(propertyName);
122
+ if (propertyValueSet) {
123
+ values.push(...propertyValueSet);
124
+ }
124
125
  for (const longhand of longhands) {
125
126
  const longhandValues = propertyValueSets.get(longhand);
126
127
  if (!longhandValues) {
@@ -143,11 +144,6 @@ export class CSSMetadata {
143
144
  }
144
145
  }
145
146
  }
146
- for (const commonKeyword of CommonKeywords) {
147
- if (!values.has(commonKeyword) && CSS.supports(propertyName, commonKeyword)) {
148
- values.add(commonKeyword);
149
- }
150
- }
151
147
 
152
148
  this.#propertyValues.set(propertyName, [...values]);
153
149
  }
@@ -156,42 +156,22 @@ export class VariableNameMatcher extends matcherBase(VariableNameMatch) {
156
156
  }
157
157
 
158
158
  override matches(node: CodeMirror.SyntaxNode, matching: BottomUpTreeMatching): VariableNameMatch|null {
159
- if (node.name !== 'VariableName' && node.name !== 'FeatureName' && node.name !== 'KeywordQuery') {
160
- // TODO(b/484268589): The result shouldn't be KeywordQuery, but currently
161
- // sometimes Lezer parses it that way. Fix this when Lezer is fixed.
159
+ if (!node.parent) {
162
160
  return null;
163
161
  }
164
- const rawText = matching.ast.text(node);
165
- if (!rawText.startsWith('--')) {
162
+ // TODO(b/484268589): When the misspelling is removed from Lezer we can remove that case.
163
+ if (node.name !== 'FeatureName' && node.name !== 'PropertyName' && node.name !== 'ProperyName') {
166
164
  return null;
167
165
  }
168
-
169
- let cur: CodeMirror.SyntaxNode|null = node.parent;
170
- let foundStyleCall: CodeMirror.SyntaxNode|null = null;
171
- while (cur) {
172
- if (cur.name === 'CallExpression') {
173
- return null;
174
- }
175
- if (cur.name === 'CallQuery') {
176
- const callee = cur.getChild('QueryCallee');
177
- if (callee && matching.ast.text(callee) === 'style') {
178
- foundStyleCall = cur;
179
- break;
180
- }
181
- return null;
182
- }
183
- cur = cur.parent;
166
+ if (node.parent.name !== 'StyleFeature' && node.parent.name !== 'StyleRange') {
167
+ return null;
184
168
  }
185
-
186
- if (!foundStyleCall) {
169
+ const rawText = matching.ast.text(node);
170
+ if (!rawText.startsWith('--')) {
187
171
  return null;
188
172
  }
189
173
 
190
- // When parsing style(--foo > 10px), Lezer thinks it is a KeywordQuery and
191
- // includes the > in the token with --foo. We need to strip it.
192
- const text = node.name === 'KeywordQuery' ? rawText.split(/\s|[>!=<:]/)[0] : rawText;
193
-
194
- return new VariableNameMatch(node, text, this.matchedStyles, this.style);
174
+ return new VariableNameMatch(node, rawText, this.matchedStyles, this.style);
195
175
  }
196
176
  }
197
177
 
@@ -137,6 +137,12 @@ export const WASM_SYMBOLS_PRIORITY = [
137
137
  Protocol.Debugger.DebugSymbolsType.SourceMap,
138
138
  ];
139
139
 
140
+ export const skipAllPausesSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
141
+ name: 'skip-all-pauses',
142
+ type: Common.Settings.SettingType.BOOLEAN,
143
+ defaultValue: false,
144
+ };
145
+
140
146
  export class DebuggerModel extends SDKModel<EventTypes> {
141
147
  readonly agent: ProtocolProxyApi.DebuggerApi;
142
148
  #runtimeModel: RuntimeModel;
@@ -149,6 +155,7 @@ export class DebuggerModel extends SDKModel<EventTypes> {
149
155
  #selectedCallFrame: CallFrame|null = null;
150
156
  #debuggerEnabled = false;
151
157
  #debuggerId: string|null = null;
158
+ readonly #skipAllPausesSetting: Common.Settings.Setting<boolean>;
152
159
  #skipAllPausesTimeout?: ReturnType<typeof setTimeout>;
153
160
  #beforePausedCallback: ((arg0: DebuggerPausedDetails, stepOver: Location|null) => Promise<boolean>)|null = null;
154
161
  #computeAutoStepRangesCallback: ((arg0: StepMode, arg1: CallFrame) => Promise<Array<{
@@ -179,10 +186,12 @@ export class DebuggerModel extends SDKModel<EventTypes> {
179
186
  compiledURL, sourceMappingURL, payload, target.targetManager().getConsole(), script));
180
187
 
181
188
  const settings = this.target().targetManager().settings;
189
+ this.#skipAllPausesSetting = settings.resolve(skipAllPausesSettingDescriptor);
182
190
  settings.resolve(pauseOnExceptionEnabledSettingDescriptor)
183
191
  .addChangeListener(this.pauseOnExceptionStateChanged, this);
184
192
  settings.resolve(pauseOnCaughtExceptionSettingDescriptor)
185
193
  .addChangeListener(this.pauseOnExceptionStateChanged, this);
194
+ this.#skipAllPausesSetting.addChangeListener(this.skipAllPausesChanged, this);
186
195
  settings.moduleSetting('pause-on-uncaught-exception').addChangeListener(this.pauseOnExceptionStateChanged, this);
187
196
  settings.moduleSetting('disable-async-stack-traces').addChangeListener(this.asyncStackTracesStateChanged, this);
188
197
  settings.moduleSetting('breakpoints-active').addChangeListener(this.breakpointsActiveChanged, this);
@@ -256,6 +265,11 @@ export class DebuggerModel extends SDKModel<EventTypes> {
256
265
  }
257
266
  this.#debuggerEnabled = true;
258
267
 
268
+ let skipAllPausesPromise: Promise<Protocol.ProtocolResponseWithError>|undefined;
269
+ if (this.#skipAllPausesSetting.get()) {
270
+ skipAllPausesPromise = this.agent.invoke_setSkipAllPauses({skip: true});
271
+ }
272
+
259
273
  // Set a limit for the total size of collected script sources retained by debugger.
260
274
  // 10MB for remote frontends, 100MB for others.
261
275
  const isRemoteFrontend = Root.Runtime.Runtime.queryParam('remoteFrontend') || Root.Runtime.Runtime.queryParam('ws');
@@ -267,14 +281,14 @@ export class DebuggerModel extends SDKModel<EventTypes> {
267
281
  instrumentation: Protocol.Debugger.SetInstrumentationBreakpointRequestInstrumentation.BeforeScriptExecution,
268
282
  });
269
283
  }
284
+ const settings = this.target().targetManager().settings;
270
285
  this.pauseOnExceptionStateChanged();
271
286
  void this.asyncStackTracesStateChanged();
272
- const settings = this.target().targetManager().settings;
273
287
  if (!settings.moduleSetting('breakpoints-active').get()) {
274
288
  this.breakpointsActiveChanged();
275
289
  }
276
290
  this.dispatchEventToListeners(Events.DebuggerWasEnabled, this);
277
- const [enableResult] = await Promise.all([enablePromise, instrumentationPromise]);
291
+ const [enableResult] = await Promise.all([enablePromise, instrumentationPromise, skipAllPausesPromise]);
278
292
  this.registerDebugger(enableResult);
279
293
  }
280
294
 
@@ -344,12 +358,24 @@ export class DebuggerModel extends SDKModel<EventTypes> {
344
358
  }
345
359
 
346
360
  private skipAllPauses(skip: boolean): void {
361
+ if (this.#skipAllPausesSetting.get()) {
362
+ return;
363
+ }
347
364
  clearTimeout(this.#skipAllPausesTimeout);
348
365
 
349
366
  void this.agent.invoke_setSkipAllPauses({skip});
350
367
  }
351
368
 
369
+ private skipAllPausesChanged(): void {
370
+ const skip = this.#skipAllPausesSetting.get();
371
+ clearTimeout(this.#skipAllPausesTimeout);
372
+ void this.agent.invoke_setSkipAllPauses({skip});
373
+ }
374
+
352
375
  skipAllPausesUntilReloadOrTimeout(timeout: number): void {
376
+ if (this.#skipAllPausesSetting.get()) {
377
+ return;
378
+ }
353
379
  clearTimeout(this.#skipAllPausesTimeout);
354
380
 
355
381
  void this.agent.invoke_setSkipAllPauses({skip: true});
@@ -649,16 +675,16 @@ export class DebuggerModel extends SDKModel<EventTypes> {
649
675
  this.dispatchEventToListeners(Events.DebuggerResumed, this);
650
676
  }
651
677
 
652
- parsedScriptSource(
653
- scriptId: Protocol.Runtime.ScriptId, sourceURL: Platform.DevToolsPath.UrlString, startLine: number,
654
- startColumn: number, endLine: number, endColumn: number,
655
- // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
656
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
657
- executionContextId: number, hash: string, executionContextAuxData: any, isLiveEdit: boolean,
658
- sourceMapURL: string|undefined, hasSourceURLComment: boolean, hasSyntaxError: boolean, length: number,
659
- isModule: boolean|null, originStackTrace: Protocol.Runtime.StackTrace|null, codeOffset: number|null,
660
- scriptLanguage: string|null, debugSymbols: Protocol.Debugger.DebugSymbols[]|null,
661
- embedderName: Platform.DevToolsPath.UrlString|null, buildId: string|null): Script {
678
+ parsedScriptSource(scriptId: Protocol.Runtime.ScriptId, sourceURL: Platform.DevToolsPath.UrlString, startLine: number,
679
+ startColumn: number, endLine: number, endColumn: number,
680
+ // TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
681
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
682
+ executionContextId: number, hash: string, executionContextAuxData: any,
683
+ sourceMapURL: string|undefined, hasSourceURLComment: boolean, hasSyntaxError: boolean,
684
+ length: number, isModule: boolean|null, originStackTrace: Protocol.Runtime.StackTrace|null,
685
+ codeOffset: number|null, scriptLanguage: string|null,
686
+ debugSymbols: Protocol.Debugger.DebugSymbols[]|null,
687
+ embedderName: Platform.DevToolsPath.UrlString|null, buildId: string|null): Script {
662
688
  const knownScript = this.#scripts.get(scriptId);
663
689
  if (knownScript) {
664
690
  return knownScript;
@@ -670,10 +696,9 @@ export class DebuggerModel extends SDKModel<EventTypes> {
670
696
 
671
697
  const selectedDebugSymbol =
672
698
  DebuggerModel.selectSymbolSource(debugSymbols, this.target().targetManager().getConsole());
673
- const script = new Script(
674
- this, scriptId, sourceURL, startLine, startColumn, endLine, endColumn, executionContextId, hash,
675
- isContentScript, isLiveEdit, sourceMapURL, hasSourceURLComment, length, isModule, originStackTrace, codeOffset,
676
- scriptLanguage, selectedDebugSymbol, embedderName, buildId);
699
+ const script = new Script(this, scriptId, sourceURL, startLine, startColumn, endLine, endColumn, executionContextId,
700
+ hash, isContentScript, sourceMapURL, hasSourceURLComment, length, isModule,
701
+ originStackTrace, codeOffset, scriptLanguage, selectedDebugSymbol, embedderName, buildId);
677
702
  this.registerScript(script);
678
703
  this.dispatchEventToListeners(Events.ParsedScriptSource, script);
679
704
 
@@ -878,6 +903,7 @@ export class DebuggerModel extends SDKModel<EventTypes> {
878
903
  .removeChangeListener(this.pauseOnExceptionStateChanged, this);
879
904
  settings.resolve(pauseOnCaughtExceptionSettingDescriptor)
880
905
  .removeChangeListener(this.pauseOnExceptionStateChanged, this);
906
+ this.#skipAllPausesSetting.removeChangeListener(this.skipAllPausesChanged, this);
881
907
  settings.moduleSetting('disable-async-stack-traces').removeChangeListener(this.asyncStackTracesStateChanged, this);
882
908
  }
883
909
 
@@ -972,7 +998,6 @@ export enum Events {
972
998
  GlobalObjectCleared = 'GlobalObjectCleared',
973
999
  CallFrameSelected = 'CallFrameSelected',
974
1000
  DebuggerIsReadyToPause = 'DebuggerIsReadyToPause',
975
- ScriptSourceWasEdited = 'ScriptSourceWasEdited',
976
1001
  /* eslint-enable @typescript-eslint/naming-convention */
977
1002
  }
978
1003
 
@@ -987,10 +1012,6 @@ export interface EventTypes {
987
1012
  [Events.CallFrameSelected]: DebuggerModel;
988
1013
  [Events.DebuggerIsReadyToPause]: DebuggerModel;
989
1014
  [Events.DebugInfoAttached]: Script;
990
- [Events.ScriptSourceWasEdited]: {
991
- script: Script,
992
- status: Protocol.Debugger.SetScriptSourceResponseStatus,
993
- };
994
1015
  }
995
1016
 
996
1017
  class DebuggerDispatcher implements ProtocolProxyApi.DebuggerDispatcher {
@@ -1026,7 +1047,6 @@ class DebuggerDispatcher implements ProtocolProxyApi.DebuggerDispatcher {
1026
1047
  executionContextId,
1027
1048
  hash,
1028
1049
  executionContextAuxData,
1029
- isLiveEdit,
1030
1050
  sourceMapURL,
1031
1051
  hasSourceURL,
1032
1052
  length,
@@ -1043,9 +1063,9 @@ class DebuggerDispatcher implements ProtocolProxyApi.DebuggerDispatcher {
1043
1063
  }
1044
1064
  this.#debuggerModel.parsedScriptSource(
1045
1065
  scriptId, url as Platform.DevToolsPath.UrlString, startLine, startColumn, endLine, endColumn,
1046
- executionContextId, hash, executionContextAuxData, Boolean(isLiveEdit), sourceMapURL, Boolean(hasSourceURL),
1047
- false, length || 0, isModule || null, stackTrace || null, codeOffset || null, scriptLanguage || null,
1048
- debugSymbols || null, embedderName as Platform.DevToolsPath.UrlString || null, buildId || null);
1066
+ executionContextId, hash, executionContextAuxData, sourceMapURL, Boolean(hasSourceURL), false, length || 0,
1067
+ isModule || null, stackTrace || null, codeOffset || null, scriptLanguage || null, debugSymbols || null,
1068
+ embedderName as Platform.DevToolsPath.UrlString || null, buildId || null);
1049
1069
  }
1050
1070
 
1051
1071
  scriptFailedToParse({
@@ -1071,11 +1091,11 @@ class DebuggerDispatcher implements ProtocolProxyApi.DebuggerDispatcher {
1071
1091
  if (!this.#debuggerModel.debuggerEnabled()) {
1072
1092
  return;
1073
1093
  }
1074
- this.#debuggerModel.parsedScriptSource(
1075
- scriptId, url as Platform.DevToolsPath.UrlString, startLine, startColumn, endLine, endColumn,
1076
- executionContextId, hash, executionContextAuxData, false, sourceMapURL, Boolean(hasSourceURL), true,
1077
- length || 0, isModule || null, stackTrace || null, codeOffset || null, scriptLanguage || null, null,
1078
- embedderName as Platform.DevToolsPath.UrlString || null, buildId || null);
1094
+ this.#debuggerModel.parsedScriptSource(scriptId, url as Platform.DevToolsPath.UrlString, startLine, startColumn,
1095
+ endLine, endColumn, executionContextId, hash, executionContextAuxData,
1096
+ sourceMapURL, Boolean(hasSourceURL), true, length || 0, isModule || null,
1097
+ stackTrace || null, codeOffset || null, scriptLanguage || null, null,
1098
+ embedderName as Platform.DevToolsPath.UrlString || null, buildId || null);
1079
1099
  }
1080
1100
 
1081
1101
  breakpointResolved({breakpointId, location}: Protocol.Debugger.BreakpointResolvedEvent): void {
@@ -247,6 +247,18 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
247
247
  }
248
248
  }
249
249
 
250
+ navigatedWithinDocument(frameId: Protocol.Page.FrameId, url: string): void {
251
+ const frame = this.framesInternal.get(frameId);
252
+ if (!frame) {
253
+ return;
254
+ }
255
+ frame.navigatedWithinDocument(url as Platform.DevToolsPath.UrlString);
256
+ if (frame.isMainFrame()) {
257
+ this.target().setInspectedURL(frame.url);
258
+ }
259
+ this.dispatchEventToListeners(Events.FrameNavigatedWithinDocument, frame);
260
+ }
261
+
250
262
  frameDetached(frameId: Protocol.Page.FrameId, isSwap: boolean): void {
251
263
  // Do nothing unless cached resource tree is processed - it will overwrite everything.
252
264
  if (!this.#cachedResourcesProcessed) {
@@ -584,6 +596,7 @@ export enum Events {
584
596
  /* eslint-disable @typescript-eslint/naming-convention -- Used by web_tests. */
585
597
  FrameAdded = 'FrameAdded',
586
598
  FrameNavigated = 'FrameNavigated',
599
+ FrameNavigatedWithinDocument = 'FrameNavigatedWithinDocument',
587
600
  FrameDetached = 'FrameDetached',
588
601
  FrameResized = 'FrameResized',
589
602
  FrameWillNavigate = 'FrameWillNavigate',
@@ -607,6 +620,7 @@ export enum Events {
607
620
  export interface EventTypes {
608
621
  [Events.FrameAdded]: ResourceTreeFrame;
609
622
  [Events.FrameNavigated]: ResourceTreeFrame;
623
+ [Events.FrameNavigatedWithinDocument]: ResourceTreeFrame;
610
624
  [Events.FrameDetached]: {frame: ResourceTreeFrame, isSwap: boolean};
611
625
  [Events.FrameResized]: void;
612
626
  [Events.FrameWillNavigate]: ResourceTreeFrame;
@@ -736,6 +750,10 @@ export class ResourceTreeFrame {
736
750
  }
737
751
  }
738
752
 
753
+ navigatedWithinDocument(url: Platform.DevToolsPath.UrlString): void {
754
+ this.#url = url;
755
+ }
756
+
739
757
  resourceTreeModel(): ResourceTreeModel {
740
758
  return this.#model;
741
759
  }
@@ -1096,7 +1114,8 @@ export class PageDispatcher implements ProtocolProxyApi.PageDispatcher {
1096
1114
  frameStartedNavigating({}: Protocol.Page.FrameStartedNavigatingEvent): void {
1097
1115
  }
1098
1116
 
1099
- navigatedWithinDocument({}: Protocol.Page.NavigatedWithinDocumentEvent): void {
1117
+ navigatedWithinDocument({frameId, url}: Protocol.Page.NavigatedWithinDocumentEvent): void {
1118
+ this.#resourceTreeModel.navigatedWithinDocument(frameId, url);
1100
1119
  }
1101
1120
 
1102
1121
  frameResized(): void {
@@ -36,7 +36,6 @@ import * as TextUtils from '../text_utils/text_utils.js';
36
36
  import {
37
37
  COND_BREAKPOINT_SOURCE_URL,
38
38
  type DebuggerModel,
39
- Events,
40
39
  Location,
41
40
  LOGPOINT_SOURCE_URL,
42
41
  } from './DebuggerModel.js';
@@ -80,7 +79,6 @@ export class Script implements TextUtils.ContentProvider.ContentProvider, FrameA
80
79
  executionContextId: number;
81
80
  hash: string;
82
81
  readonly #isContentScript: boolean;
83
- readonly #isLiveEdit: boolean;
84
82
  sourceMapURL?: string;
85
83
  debugSymbols: Protocol.Debugger.DebugSymbols|null;
86
84
  hasSourceURL: boolean;
@@ -92,13 +90,13 @@ export class Script implements TextUtils.ContentProvider.ContentProvider, FrameA
92
90
  readonly #embedderName: Platform.DevToolsPath.UrlString|null;
93
91
  readonly isModule: boolean|null;
94
92
  readonly buildId: string|null;
95
- constructor(
96
- debuggerModel: DebuggerModel, scriptId: Protocol.Runtime.ScriptId, sourceURL: Platform.DevToolsPath.UrlString,
97
- startLine: number, startColumn: number, endLine: number, endColumn: number, executionContextId: number,
98
- hash: string, isContentScript: boolean, isLiveEdit: boolean, sourceMapURL: string|undefined,
99
- hasSourceURL: boolean, length: number, isModule: boolean|null, originStackTrace: Protocol.Runtime.StackTrace|null,
100
- codeOffset: number|null, scriptLanguage: string|null, debugSymbols: Protocol.Debugger.DebugSymbols|null,
101
- embedderName: Platform.DevToolsPath.UrlString|null, buildId: string|null) {
93
+ constructor(debuggerModel: DebuggerModel, scriptId: Protocol.Runtime.ScriptId,
94
+ sourceURL: Platform.DevToolsPath.UrlString, startLine: number, startColumn: number, endLine: number,
95
+ endColumn: number, executionContextId: number, hash: string, isContentScript: boolean,
96
+ sourceMapURL: string|undefined, hasSourceURL: boolean, length: number, isModule: boolean|null,
97
+ originStackTrace: Protocol.Runtime.StackTrace|null, codeOffset: number|null, scriptLanguage: string|null,
98
+ debugSymbols: Protocol.Debugger.DebugSymbols|null, embedderName: Platform.DevToolsPath.UrlString|null,
99
+ buildId: string|null) {
102
100
  this.debuggerModel = debuggerModel;
103
101
  this.scriptId = scriptId;
104
102
  this.sourceURL = sourceURL;
@@ -112,7 +110,6 @@ export class Script implements TextUtils.ContentProvider.ContentProvider, FrameA
112
110
  this.executionContextId = executionContextId;
113
111
  this.hash = hash;
114
112
  this.#isContentScript = isContentScript;
115
- this.#isLiveEdit = isLiveEdit;
116
113
  this.sourceMapURL = sourceMapURL;
117
114
  this.debugSymbols = debugSymbols;
118
115
  this.hasSourceURL = hasSourceURL;
@@ -175,10 +172,6 @@ export class Script implements TextUtils.ContentProvider.ContentProvider, FrameA
175
172
  return this.debuggerModel.runtimeModel().executionContext(this.executionContextId);
176
173
  }
177
174
 
178
- isLiveEdit(): boolean {
179
- return this.#isLiveEdit;
180
- }
181
-
182
175
  contentURL(): Platform.DevToolsPath.UrlString {
183
176
  return this.sourceURL;
184
177
  }
@@ -261,8 +254,8 @@ export class Script implements TextUtils.ContentProvider.ContentProvider, FrameA
261
254
  requestContentData(): Promise<TextUtils.ContentData.ContentDataOrError> {
262
255
  if (!this.#contentPromise) {
263
256
  const fileSizeToCache = 65535; // We won't bother cacheing files under 64K
264
- if (this.hash && !this.#isLiveEdit && this.contentLength > fileSizeToCache) {
265
- // For large files that aren't live edits and have a hash, we keep a content-addressed cache
257
+ if (this.hash && this.contentLength > fileSizeToCache) {
258
+ // For large files that have a hash, we keep a content-addressed cache
266
259
  // so we don't need to load multiple copies or disassemble wasm modules multiple times.
267
260
  if (!scriptCacheInstance) {
268
261
  // Initialize script cache singleton. Add a finalizer for removing keys from the map.
@@ -331,43 +324,6 @@ export class Script implements TextUtils.ContentProvider.ContentProvider, FrameA
331
324
  return TextUtils.TextUtils.performSearchInSearchMatches(matches.result || [], query, caseSensitive, isRegex);
332
325
  }
333
326
 
334
- private appendSourceURLCommentIfNeeded(source: string): string {
335
- if (!this.hasSourceURL) {
336
- return source;
337
- }
338
- return source + '\n //# sourceURL=' + this.sourceURL;
339
- }
340
-
341
- async editSource(newSource: string): Promise<{
342
- changed: boolean,
343
- status: Protocol.Debugger.SetScriptSourceResponseStatus,
344
- exceptionDetails?: Protocol.Runtime.ExceptionDetails,
345
- }> {
346
- newSource = Script.trimSourceURLComment(newSource);
347
- // We append correct #sourceURL to script for consistency only. It's not actually needed for things to work correctly.
348
- newSource = this.appendSourceURLCommentIfNeeded(newSource);
349
-
350
- const oldSource = TextUtils.ContentData.ContentData.textOr(await this.requestContentData(), null);
351
- if (oldSource === newSource) {
352
- return {changed: false, status: Protocol.Debugger.SetScriptSourceResponseStatus.Ok};
353
- }
354
- const response = await this.debuggerModel.target().debuggerAgent().invoke_setScriptSource(
355
- {scriptId: this.scriptId, scriptSource: newSource, allowTopFrameEditing: true});
356
- if (response.getError()) {
357
- // Something went seriously wrong, like the V8 inspector no longer knowing about this script without
358
- // shutting down the Debugger agent etc.
359
- throw new Error(`Script#editSource failed for script with id ${this.scriptId}: ${response.getError()}`);
360
- }
361
-
362
- if (!response.getError() && response.status === Protocol.Debugger.SetScriptSourceResponseStatus.Ok) {
363
- this.#contentPromise =
364
- Promise.resolve(new TextUtils.ContentData.ContentData(newSource, /* isBase64 */ false, 'text/javascript'));
365
- }
366
-
367
- this.debuggerModel.dispatchEventToListeners(Events.ScriptSourceWasEdited, {script: this, status: response.status});
368
- return {changed: true, status: response.status, exceptionDetails: response.exceptionDetails};
369
- }
370
-
371
327
  rawLocation(lineNumber: number, columnNumber: number): Location|null {
372
328
  if (this.containsLocation(lineNumber, columnNumber)) {
373
329
  return new Location(this.debuggerModel, this.scriptId, lineNumber, columnNumber);