chrome-devtools-frontend 1.0.1672557 → 1.0.1675430

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/.agents/skills/devtools-ux-writing-refactor/SKILL.md +26 -9
  2. package/front_end/core/common/ParsedURL.ts +5 -1
  3. package/front_end/core/common/SettingRegistration.ts +30 -34
  4. package/front_end/core/common/Settings.ts +4 -64
  5. package/front_end/core/host/UserMetrics.ts +127 -117
  6. package/front_end/core/protocol_client/PuppeteerDevToolsConnection.ts +42 -9
  7. package/front_end/core/root/Runtime.ts +14 -0
  8. package/front_end/core/sdk/NetworkManager.ts +0 -35
  9. package/front_end/core/sdk/SourceMap.ts +1 -19
  10. package/front_end/core/sdk/SourceMapManager.ts +75 -48
  11. package/front_end/core/sdk/SourceMapScopesInfo.ts +0 -62
  12. package/front_end/core/sdk/TargetManager.ts +18 -0
  13. package/front_end/devtools_compatibility.js +1 -1
  14. package/front_end/entrypoints/main/MainImpl.ts +1 -0
  15. package/front_end/foundation/Universe.ts +44 -29
  16. package/front_end/generated/InspectorBackendCommands.ts +4 -3
  17. package/front_end/generated/SupportedCSSProperties.ts +16 -1
  18. package/front_end/generated/protocol-mapping.d.ts +8 -0
  19. package/front_end/generated/protocol-proxy-api.d.ts +6 -0
  20. package/front_end/generated/protocol.ts +16 -2
  21. package/front_end/models/ai_assistance/AiSetting.ts +66 -3
  22. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +15 -5
  23. package/front_end/models/bindings/CompilerScriptMapping.ts +1 -1
  24. package/front_end/models/emulation/DeviceModeModel.ts +82 -102
  25. package/front_end/models/emulation/EmulatedDevices.ts +18 -66
  26. package/front_end/models/javascript_metadata/NativeFunctions.js +4 -4
  27. package/front_end/models/persistence/AutomaticFileSystemManager.ts +2 -2
  28. package/front_end/models/persistence/IsolatedFileSystemManager.ts +20 -29
  29. package/front_end/models/trace/ModelImpl.ts +5 -0
  30. package/front_end/models/trace/Processor.ts +5 -0
  31. package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +7 -1
  32. package/front_end/models/trace/handlers/MetaHandler.ts +8 -4
  33. package/front_end/models/trace/handlers/PageLoadMetricsHandler.ts +11 -0
  34. package/front_end/models/workspace/FileManager.ts +13 -6
  35. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +11 -10
  36. package/front_end/panels/ai_assistance/ai_assistance-meta.ts +3 -45
  37. package/front_end/panels/application/BackgroundServiceView.ts +42 -40
  38. package/front_end/panels/application/KeyValueStorageItemsView.ts +1 -0
  39. package/front_end/panels/application/WebMCPView.ts +13 -5
  40. package/front_end/panels/application/components/AdsView.ts +24 -1
  41. package/front_end/panels/application/components/adsView.css +27 -21
  42. package/front_end/panels/autofill/AutofillView.ts +12 -12
  43. package/front_end/panels/autofill/autofill-meta.ts +2 -2
  44. package/front_end/panels/common/ExtensionServer.ts +7 -1
  45. package/front_end/panels/common/common.ts +0 -1
  46. package/front_end/panels/console/ConsoleInsightTeaser.ts +7 -6
  47. package/front_end/panels/console/ConsoleViewMessage.ts +1 -1
  48. package/front_end/panels/elements/ClassesPaneWidget.ts +2 -2
  49. package/front_end/panels/elements/ElementsTreeElement.ts +602 -327
  50. package/front_end/panels/elements/ElementsTreeOutline.ts +1 -1
  51. package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
  52. package/front_end/panels/elements/components/AdornerManager.ts +1 -0
  53. package/front_end/panels/emulation/AdvancedApp.ts +3 -3
  54. package/front_end/panels/emulation/DeviceModeToolbar.ts +2 -11
  55. package/front_end/panels/emulation/DeviceModeView.ts +234 -75
  56. package/front_end/panels/emulation/InspectedPagePlaceholder.ts +1 -1
  57. package/front_end/panels/emulation/deviceModeView.css +4 -21
  58. package/front_end/panels/emulation/emulation-meta.ts +4 -30
  59. package/front_end/panels/emulation/emulation.ts +0 -3
  60. package/front_end/panels/explain/components/ConsoleInsight.ts +11 -7
  61. package/front_end/panels/js_timeline/js_timeline-meta.ts +8 -8
  62. package/front_end/panels/layer_viewer/LayerDetailsView.ts +30 -30
  63. package/front_end/panels/layer_viewer/LayerTreeOutline.ts +6 -6
  64. package/front_end/panels/layer_viewer/LayerViewHost.ts +1 -1
  65. package/front_end/panels/layer_viewer/Layers3DView.ts +11 -11
  66. package/front_end/panels/layer_viewer/PaintProfilerView.ts +8 -8
  67. package/front_end/panels/layer_viewer/TransformController.ts +3 -3
  68. package/front_end/panels/layer_viewer/layer_viewer-meta.ts +11 -11
  69. package/front_end/panels/layers/LayersPanel.ts +2 -2
  70. package/front_end/panels/layers/layers-meta.ts +2 -2
  71. package/front_end/panels/lighthouse/LighthouseController.ts +3 -7
  72. package/front_end/panels/mobile_throttling/CPUThrottlingSelector.ts +313 -0
  73. package/front_end/panels/mobile_throttling/NetworkPanelIndicator.ts +0 -10
  74. package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +21 -10
  75. package/front_end/panels/mobile_throttling/ThrottlingManager.ts +1 -58
  76. package/front_end/panels/mobile_throttling/mobile_throttling.ts +2 -9
  77. package/front_end/panels/network/NetworkConfigView.ts +1 -71
  78. package/front_end/panels/network/networkConfigView.css +1 -2
  79. package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +3 -3
  80. package/front_end/panels/profiler/HeapDetachedElementsView.ts +5 -5
  81. package/front_end/panels/profiler/HeapProfileView.ts +32 -32
  82. package/front_end/panels/profiler/HeapProfilerPanel.ts +2 -2
  83. package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +33 -37
  84. package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +26 -27
  85. package/front_end/panels/profiler/HeapSnapshotView.ts +48 -48
  86. package/front_end/panels/profiler/IsolateSelector.ts +10 -10
  87. package/front_end/panels/profiler/ModuleUIStrings.ts +25 -25
  88. package/front_end/panels/profiler/ProfileLauncherView.ts +6 -6
  89. package/front_end/panels/profiler/ProfilesPanel.ts +6 -6
  90. package/front_end/panels/profiler/WritableProfileHeader.ts +6 -6
  91. package/front_end/panels/profiler/profiler-meta.ts +7 -7
  92. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +7 -0
  93. package/front_end/panels/recorder/RecorderPanel.ts +1 -1
  94. package/front_end/panels/settings/AISettingsTab.ts +27 -23
  95. package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +1 -2
  96. package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +12 -17
  97. package/front_end/panels/timeline/TimelinePanel.ts +20 -35
  98. package/front_end/panels/timeline/components/LiveMetricsView.ts +27 -6
  99. package/front_end/panels/timeline/components/NetworkTrackWidget.ts +1 -1
  100. package/front_end/panels/timeline/components/components.ts +0 -4
  101. package/front_end/panels/timeline/components/liveMetricsView.css +7 -0
  102. package/front_end/third_party/chromium/README.chromium +1 -1
  103. package/front_end/third_party/source-map-scopes-codec/package/CONTRIBUTING.md +0 -0
  104. package/front_end/third_party/source-map-scopes-codec/package/LICENSE +0 -0
  105. package/front_end/third_party/source-map-scopes-codec/package/README.md +0 -0
  106. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/builder.d.ts +0 -0
  107. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/builder.d.ts.map +1 -1
  108. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/safe_builder.d.ts +0 -0
  109. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/safe_builder.d.ts.map +0 -0
  110. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts +0 -0
  111. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts.map +0 -0
  112. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/encode/encode.d.ts +0 -0
  113. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/encode/encode.d.ts.map +0 -0
  114. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts +0 -0
  115. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts.map +0 -0
  116. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/scopes.d.ts +0 -0
  117. package/front_end/third_party/source-map-scopes-codec/package/_dist/src/scopes.d.ts.map +0 -0
  118. package/front_end/third_party/source-map-scopes-codec/package/deno.json +1 -1
  119. package/front_end/third_party/source-map-scopes-codec/package/package.json +1 -1
  120. package/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.js +2 -0
  121. package/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.js.map +1 -1
  122. package/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.ts +2 -0
  123. package/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.js +0 -0
  124. package/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.js.map +0 -0
  125. package/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.ts +0 -0
  126. package/front_end/third_party/source-map-scopes-codec/package/src/codec.js +0 -0
  127. package/front_end/third_party/source-map-scopes-codec/package/src/codec.js.map +0 -0
  128. package/front_end/third_party/source-map-scopes-codec/package/src/codec.ts +0 -0
  129. package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js +0 -0
  130. package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js.map +0 -0
  131. package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.ts +0 -0
  132. package/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.js +0 -0
  133. package/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.js.map +0 -0
  134. package/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.ts +0 -0
  135. package/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js +0 -0
  136. package/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js.map +0 -0
  137. package/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.ts +0 -0
  138. package/front_end/third_party/source-map-scopes-codec/package/src/mod.js +0 -0
  139. package/front_end/third_party/source-map-scopes-codec/package/src/mod.js.map +0 -0
  140. package/front_end/third_party/source-map-scopes-codec/package/src/mod.ts +0 -0
  141. package/front_end/third_party/source-map-scopes-codec/package/src/scopes.js +0 -0
  142. package/front_end/third_party/source-map-scopes-codec/package/src/scopes.js.map +0 -0
  143. package/front_end/third_party/source-map-scopes-codec/package/src/scopes.ts +0 -0
  144. package/front_end/third_party/source-map-scopes-codec/package/src/util.js +0 -0
  145. package/front_end/third_party/source-map-scopes-codec/package/src/util.js.map +0 -0
  146. package/front_end/third_party/source-map-scopes-codec/package/src/util.ts +0 -0
  147. package/front_end/third_party/source-map-scopes-codec/package/src/vlq.js +0 -0
  148. package/front_end/third_party/source-map-scopes-codec/package/src/vlq.js.map +0 -0
  149. package/front_end/third_party/source-map-scopes-codec/package/src/vlq.ts +0 -0
  150. package/front_end/ui/comments/CommentAnchorResolver.ts +132 -0
  151. package/front_end/ui/comments/comments.ts +9 -0
  152. package/front_end/ui/components/dialogs/ShortcutDialog.ts +2 -0
  153. package/front_end/ui/components/settings/SettingCheckbox.ts +4 -12
  154. package/front_end/ui/components/settings/settingCheckbox.css +0 -7
  155. package/front_end/ui/legacy/Treeoutline.ts +14 -14
  156. package/front_end/ui/legacy/UIUtils.ts +2 -47
  157. package/front_end/ui/legacy/Widget.ts +10 -2
  158. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +40 -0
  159. package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +1 -1
  160. package/front_end/ui/legacy/components/utils/Linkifier.ts +1 -0
  161. package/front_end/ui/lit/Directives.ts +80 -0
  162. package/front_end/ui/lit/lit.ts +1 -0
  163. package/front_end/ui/lit/render.ts +8 -0
  164. package/front_end/ui/settings/SettingUIRegistration.ts +4 -0
  165. package/front_end/ui/visual_logging/Debugging.ts +1 -5
  166. package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
  167. package/front_end/ui/visual_logging/LoggingConfig.ts +21 -0
  168. package/front_end/ui/visual_logging/visual_logging.ts +9 -0
  169. package/mcp/mcp.ts +1 -0
  170. package/package.json +1 -1
  171. package/front_end/panels/common/ThrottlingUtils.ts +0 -51
  172. package/front_end/panels/emulation/DeviceModeWrapper.ts +0 -248
  173. package/front_end/panels/mobile_throttling/MobileThrottlingSelector.ts +0 -92
  174. package/front_end/panels/timeline/components/CPUThrottlingSelector.ts +0 -235
  175. package/front_end/panels/timeline/components/NetworkThrottlingSelector.ts +0 -245
  176. package/front_end/panels/timeline/components/cpuThrottlingSelector.css +0 -30
  177. package/front_end/panels/timeline/components/networkThrottlingSelector.css +0 -24
@@ -3,6 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import '../../../ui/legacy/components/data_grid/data_grid.js';
6
+ import '../../../ui/kit/kit.js';
6
7
 
7
8
  import * as Common from '../../../core/common/common.js';
8
9
  import * as i18n from '../../../core/i18n/i18n.js';
@@ -89,6 +90,14 @@ const UIStrings = {
89
90
  * @description Explanation text for the 'Highlight ads' setting.
90
91
  */
91
92
  highlightsElementsRedDetectedToBe: 'Highlights elements (red) detected to be ads.',
93
+ /**
94
+ * @description Text explaining that ad detection is not perfect.
95
+ */
96
+ adDetectionMistakes: 'Chrome’s ad detection can make mistakes.',
97
+ /**
98
+ * @description Link text for learning more about ad detection in Chrome.
99
+ */
100
+ learnMore: 'Learn more',
92
101
  } as const;
93
102
 
94
103
  const str_ = i18n.i18n.registerUIStrings('panels/application/components/AdsView.ts', UIStrings);
@@ -203,6 +212,7 @@ const DEFAULT_VIEW: View = (input, output, target) => {
203
212
  </dd>
204
213
  </div>
205
214
  </dl>
215
+ <hr class="divider">
206
216
  <div class="ad-frames-title">${i18nString(UIStrings.adIframesTitle, {PH1: input.adFrames.length})}</div>
207
217
  <div class="ad-frames-container">
208
218
  <devtools-data-grid striped resize="last" class="ad-frames-data-grid" name=${i18nString(UIStrings.adIframes)}>
@@ -232,14 +242,27 @@ const DEFAULT_VIEW: View = (input, output, target) => {
232
242
  </table>
233
243
  </devtools-data-grid>
234
244
  </div>
245
+ <hr class="divider">
235
246
  <div class="settings-title">${i18nString(UIStrings.settings)}</div>
236
- <devtools-checkbox class="setting-container"
247
+ <devtools-checkbox class="setting-container small"
237
248
  ${bindToSetting(Common.Settings.Settings.instance().moduleSetting('show-ad-highlights'))}>
238
249
  <div class="setting-text-container">
239
250
  <div class="setting-label">${i18nString(UIStrings.highlightAds)}</div>
240
251
  <div class="setting-explanation">${i18nString(UIStrings.highlightsElementsRedDetectedToBe)}</div>
241
252
  </div>
242
253
  </devtools-checkbox>
254
+ <hr class="divider">
255
+ <div class="footer-text">
256
+ <devtools-icon class="inline-icon" name="info"></devtools-icon>
257
+ &#32;
258
+ <span>
259
+ ${i18nString(UIStrings.adDetectionMistakes)}
260
+ &#32;
261
+ <devtools-link class="link devtools-link" href="https://chromium.googlesource.com/chromium/src/+/main/docs/ad_tagging.md" jslogcontext="learn-more">
262
+ ${i18nString(UIStrings.learnMore)}
263
+ </devtools-link>
264
+ </span>
265
+ </div>
243
266
  </div>
244
267
  `, target);
245
268
  // clang-format on
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  :host {
8
- padding: 12px;
8
+ padding: var(--sys-size-6);
9
9
  display: flex;
10
10
  flex-direction: column;
11
11
  overflow: auto;
@@ -19,17 +19,17 @@
19
19
 
20
20
  .metrics-container {
21
21
  flex: 0 0 auto;
22
- margin: 0 0 24px;
22
+ margin: 0;
23
23
  border: 1px solid var(--sys-color-divider);
24
24
  display: grid;
25
25
  grid-template-columns: repeat(2, 1fr);
26
- gap: 1px;
26
+ gap: var(--sys-size-1);
27
27
  background-color: var(--sys-color-divider);
28
28
  }
29
29
 
30
30
  .metric-box {
31
31
  background-color: var(--sys-color-surface);
32
- padding: 12px;
32
+ padding: var(--sys-size-6);
33
33
  display: flex;
34
34
  flex-direction: column;
35
35
  align-items: center;
@@ -37,24 +37,24 @@
37
37
  }
38
38
 
39
39
  .metric-title {
40
- font-size: 12px;
40
+ font-size: var(--sys-typescale-body4-size);
41
41
  color: var(--sys-color-on-surface-subtle);
42
- margin: 0 0 4px;
42
+ margin: 0 0 var(--sys-size-3);
43
43
  }
44
44
 
45
45
  .metric-value {
46
- font-size: 18px;
46
+ font-size: var(--sys-typescale-headline3-size);
47
47
  font-weight: bold;
48
48
  color: var(--sys-color-on-surface);
49
49
  display: flex;
50
50
  flex-direction: column;
51
51
  align-items: center;
52
52
  margin: 0;
53
- gap: 2px;
53
+ gap: var(--sys-size-2);
54
54
  }
55
55
 
56
56
  .metric-average {
57
- font-size: 12px;
57
+ font-size: var(--sys-typescale-body4-size);
58
58
  font-weight: normal;
59
59
  color: var(--sys-color-on-surface-subtle);
60
60
  }
@@ -65,7 +65,7 @@
65
65
  color: var(--sys-color-on-surface);
66
66
  flex: 0 0 auto;
67
67
  font-weight: bold;
68
- margin-bottom: 8px;
68
+ margin-bottom: var(--sys-size-5);
69
69
  }
70
70
 
71
71
  .ad-frames-data-grid {
@@ -75,22 +75,18 @@
75
75
  .ad-frames-container {
76
76
  border: 1px solid var(--sys-color-divider);
77
77
  display: flex;
78
- flex: auto;
78
+ flex: 1; /* Takes up remaining space */
79
79
  flex-direction: column;
80
- margin-bottom: 24px;
81
- height: 300px;
82
- min-height: 150px;
80
+ margin-bottom: 0;
81
+ min-height: var(--sys-size-22); /* 144px */
83
82
  position: relative;
84
- resize: vertical;
85
83
  overflow: hidden;
86
84
  }
87
85
 
88
- devtools-checkbox.setting-container {
89
- /*
90
- * Apply negative margins here to offset the default devtools-checkbox style
91
- * to align this component with the rest of the Ads panel layout.
92
- */
93
- margin: 0 0 -6px -6px;
86
+ .divider {
87
+ border: none;
88
+ border-top: 1px solid var(--sys-color-divider);
89
+ margin: var(--sys-size-8) 0 var(--sys-size-6);
94
90
  }
95
91
 
96
92
  .setting-text-container {
@@ -103,3 +99,13 @@ devtools-checkbox.setting-container {
103
99
  white-space: break-spaces;
104
100
  margin-top: 0;
105
101
  }
102
+
103
+ .footer-text {
104
+ margin-bottom: var(--sys-size-6);
105
+ }
106
+
107
+ .inline-icon {
108
+ width: var(--sys-size-8);
109
+ height: var(--sys-size-8);
110
+ vertical-align: text-bottom;
111
+ }
@@ -29,30 +29,30 @@ const UIStrings = {
29
29
  */
30
30
  noAutofill: 'No autofill detected',
31
31
  /**
32
- * @description Explanation for how to populate the autofill panel with data. Shown when there is
32
+ * @description Explanation for how to populate the Autofill panel with data. Shown when there is
33
33
  * no data available.
34
34
  */
35
- toStartDebugging: 'To start debugging autofill, use Chrome’s autofill menu to fill an address form.',
35
+ toStartDebugging: 'To start debugging autofill, use Chrome’s autofill menu to fill an address form',
36
36
  /**
37
- * @description Column header for column containing form field values
37
+ * @description Column header for column containing form field values.
38
38
  */
39
39
  value: 'Value',
40
40
  /**
41
- * @description Column header for column containing the predicted autofill categories
41
+ * @description Column header for column containing the predicted autofill categories.
42
42
  */
43
43
  predictedAutofillValue: 'Predicted autofill value',
44
44
  /**
45
- * @description Column header for column containing the name/label/id of form fields
45
+ * @description Column header for column containing the name/label/id of form fields.
46
46
  */
47
47
  formField: 'Form field',
48
48
  /**
49
49
  * @description Tooltip for an adorner for form fields which have an autocomplete attribute
50
- * (http://go/mdn/HTML/Attributes/autocomplete)
50
+ * (http://go/mdn/HTML/Attributes/autocomplete).
51
51
  */
52
52
  autocompleteAttribute: 'Autocomplete attribute',
53
53
  /**
54
54
  * @description Abbreviation of 'attribute'. Text content of an adorner for form fields which
55
- * have an autocomplete attribute (http://go/mdn/HTML/Attributes/autocomplete)
55
+ * have an autocomplete attribute (http://go/mdn/HTML/Attributes/autocomplete).
56
56
  */
57
57
  attr: 'attr',
58
58
  /**
@@ -80,21 +80,21 @@ const UIStrings = {
80
80
  * @description Tooltip text for a checkbox label in the Autofill panel. If checked, this panel
81
81
  * will open automatically whenever a form is being autofilled.
82
82
  */
83
- autoShowTooltip: 'Open the autofill panel automatically when an autofill activity is detected.',
83
+ autoShowTooltip: 'Open the Autofill panel automatically when an autofill activity is detected',
84
84
  /**
85
- * @description Aria text for the section of the autofill view containing a preview of the autofilled address.
85
+ * @description Aria text for the section of the Autofill view containing a preview of the autofilled address.
86
86
  */
87
87
  addressPreview: 'Address preview',
88
88
  /**
89
- * @description Aria text for the section of the autofill view containing the info about the autofilled form fields.
89
+ * @description Aria text for the section of the Autofill view containing the info about the autofilled form fields.
90
90
  */
91
91
  formInspector: 'Form inspector',
92
92
  /**
93
- * @description Link text for a hyperlink to more documentation
93
+ * @description Link text for a hyperlink to more documentation.
94
94
  */
95
95
  learnMore: 'Learn more',
96
96
  /**
97
- * @description Link text for a hyperlink to webpage for leaving user feedback
97
+ * @description Link text for a hyperlink to webpage for leaving user feedback.
98
98
  */
99
99
  sendFeedback: 'Send feedback',
100
100
  } as const;
@@ -9,11 +9,11 @@ import type * as Autofill from './autofill.js';
9
9
 
10
10
  const UIStrings = {
11
11
  /**
12
- * @description Label for the autofill pane
12
+ * @description Label for the Autofill panel.
13
13
  */
14
14
  autofill: 'Autofill',
15
15
  /**
16
- * @description Command for showing the 'Autofill' pane
16
+ * @description Command for showing the Autofill panel.
17
17
  */
18
18
  showAutofill: 'Show Autofill',
19
19
  } as const;
@@ -951,7 +951,7 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper<EventTyp
951
951
  /**
952
952
  * Slightly more permissive as {@link extensionAllowedOnURL}: This method also permits
953
953
  * UISourceCodes that originate from a {@link SDK.Script.Script} with a sourceURL magic comment as
954
- * long as the corresponding target is permitted.
954
+ * long as the corresponding target and the embedder name (if it is a URL) are permitted.
955
955
  */
956
956
  private extensionAllowedOnContentProvider(
957
957
  contentProvider: TextUtils.ContentProvider.ContentProvider, port: MessagePort): boolean {
@@ -968,6 +968,12 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper<EventTyp
968
968
  }
969
969
  return scripts.every(script => {
970
970
  if (script.hasSourceURL) {
971
+ // TODO(542925220): embedderName is a terrible proxy, but currently V8 stores the original URL only in there.
972
+ // We'll add a proper field in the future and will replace it then.
973
+ const embedderName = script.embedderName();
974
+ if (embedderName && URL.canParse(embedderName) && !this.extensionAllowedOnURL(embedderName, port)) {
975
+ return false;
976
+ }
971
977
  return this.extensionAllowedOnTarget(script.target(), port);
972
978
  }
973
979
  return this.extensionAllowedOnURL(script.contentURL(), port) &&
@@ -109,5 +109,4 @@ export * as ExtensionServer from './ExtensionServer.js';
109
109
  export * as ExtensionView from './ExtensionView.js';
110
110
  export * as PersistenceUtils from './PersistenceUtils.js';
111
111
  export * as DOMLinkifier from './DOMLinkifier.js';
112
- export * as ThrottlingUtils from './ThrottlingUtils.js';
113
112
  export * as ExtensionIframe from './ExtensionView.js';
@@ -437,10 +437,12 @@ export class ConsoleInsightTeaser extends UI.Widget.Widget {
437
437
  this.requestUpdate();
438
438
  }
439
439
 
440
- #getConsoleInsightsEnabledSetting(): Common.Settings.Setting<boolean>|undefined {
441
- const result = Common.Settings.Settings.instance().maybeResolve(
442
- AiAssistanceModel.AiUtils.consoleInsightsEnabledSettingDescriptor);
443
- return 'setting' in result ? (result.setting as Common.Settings.Setting<boolean>) : undefined;
440
+ #getConsoleInsightsEnabledSetting(): AiAssistanceModel.AiSetting.AiSetting<boolean> {
441
+ return new AiAssistanceModel.AiSetting.AiSetting(
442
+ AiAssistanceModel.AiUtils.consoleInsightsEnabledSettingDescriptor,
443
+ Host.AidaClient.HostConfigTracker.instance(),
444
+ Common.Settings.Settings.instance(),
445
+ );
444
446
  }
445
447
 
446
448
  #getOnboardingCompletedSetting(): Common.Settings.Setting<boolean> {
@@ -466,8 +468,7 @@ export class ConsoleInsightTeaser extends UI.Widget.Widget {
466
468
 
467
469
  #onTellMeMoreClick(event: Event): void {
468
470
  event.stopPropagation();
469
- if (this.#getConsoleInsightsEnabledSetting()?.getIfNotDisabled() &&
470
- this.#getOnboardingCompletedSetting()?.getIfNotDisabled()) {
471
+ if (this.#getConsoleInsightsEnabledSetting()?.getIfNotDisabled() && this.#getOnboardingCompletedSetting()?.get()) {
471
472
  this.#executeConsoleInsightAction();
472
473
  return;
473
474
  }
@@ -1539,7 +1539,7 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
1539
1539
  if (!this.shouldShowInsights()) {
1540
1540
  return false;
1541
1541
  }
1542
- if (!Common.Settings.Settings.instance().moduleSetting('console-insight-teasers-enabled').getIfNotDisabled() ||
1542
+ if (!Common.Settings.Settings.instance().moduleSetting('console-insight-teasers-enabled').get() ||
1543
1543
  !AiAssistanceModel.BuiltInAi.BuiltInAi.instance().isEventuallyAvailable()) {
1544
1544
  return false;
1545
1545
  }
@@ -342,8 +342,8 @@ export class ClassNamePrompt extends UI.TextPrompt.TextPrompt {
342
342
  return [...completions];
343
343
  }
344
344
 
345
- private async buildClassNameCompletions(expression: string, prefix: string, force?: boolean):
346
- Promise<UI.SuggestBox.Suggestions> {
345
+ private async buildClassNameCompletions(expression: string, prefix: string,
346
+ force?: boolean): Promise<UI.SuggestBox.Suggestions> {
347
347
  if (!prefix || force) {
348
348
  this.classNamesPromise = null;
349
349
  }