chrome-devtools-frontend 1.0.1660788 → 1.0.1662289

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/evaluate-ai-css-completion/SKILL.md +143 -0
  2. package/.agents/skills/evaluate-ai-css-completion/scripts/evaluate.js +104 -0
  3. package/.agents/skills/migrate-chromium-test/SKILL.md +7 -2
  4. package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +7 -1
  5. package/docs/ui_engineering.md +75 -42
  6. package/eslint.config.mjs +7 -0
  7. package/extension-api/ExtensionAPI.d.ts +88 -0
  8. package/front_end/core/common/SettingRegistration.ts +0 -5
  9. package/front_end/core/host/InspectorFrontendHost.ts +1 -0
  10. package/front_end/core/host/InspectorFrontendHostStub.ts +2 -0
  11. package/front_end/core/platform/ArrayUtilities.ts +10 -0
  12. package/front_end/core/platform/StringUtilities.ts +20 -4
  13. package/front_end/core/sdk/CPUThrottlingManager.ts +2 -0
  14. package/front_end/core/sdk/DOMDebuggerModel.ts +2 -0
  15. package/front_end/core/sdk/DOMModel.ts +1 -0
  16. package/front_end/core/sdk/DebuggerModel.ts +4 -4
  17. package/front_end/core/sdk/EventBreakpointsModel.ts +2 -0
  18. package/front_end/core/sdk/FrameManager.ts +1 -0
  19. package/front_end/core/sdk/IsolateManager.ts +1 -0
  20. package/front_end/core/sdk/NetworkManager.ts +2 -0
  21. package/front_end/core/sdk/NetworkRequest.ts +1 -0
  22. package/front_end/core/sdk/PageResourceLoader.ts +2 -0
  23. package/front_end/core/sdk/SourceMap.ts +5 -5
  24. package/front_end/core/sdk/SourceMapManager.ts +3 -2
  25. package/front_end/core/sdk/TargetManager.ts +4 -0
  26. package/front_end/entrypoints/main/MainImpl.ts +2 -1
  27. package/front_end/foundation/README.md +86 -0
  28. package/front_end/generated/InspectorBackendCommands.ts +4 -5
  29. package/front_end/generated/protocol.ts +20 -38
  30. package/front_end/models/bindings/CompilerScriptMapping.ts +5 -5
  31. package/front_end/models/bindings/ContentProviderBasedProject.ts +2 -3
  32. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +3 -3
  33. package/front_end/models/bindings/DefaultScriptMapping.ts +3 -3
  34. package/front_end/models/bindings/ResourceMapping.ts +3 -3
  35. package/front_end/models/bindings/ResourceScriptMapping.ts +2 -2
  36. package/front_end/models/bindings/SASSSourceMapping.ts +3 -3
  37. package/front_end/models/bindings/TempFile.ts +8 -3
  38. package/front_end/models/extensions/ExtensionAPI.ts +110 -46
  39. package/front_end/models/extensions/RecorderExtensionEndpoint.ts +7 -5
  40. package/front_end/models/formatter/ScriptFormatter.ts +8 -11
  41. package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +14 -5
  42. package/front_end/models/issues_manager/CheckFormsIssuesTrigger.ts +8 -9
  43. package/front_end/models/issues_manager/CookieIssue.ts +21 -9
  44. package/front_end/models/issues_manager/Issue.ts +3 -4
  45. package/front_end/models/issues_manager/IssueAggregator.ts +0 -9
  46. package/front_end/models/issues_manager/IssueResolver.ts +2 -2
  47. package/front_end/models/issues_manager/IssuesManager.ts +136 -137
  48. package/front_end/models/issues_manager/RelatedIssue.ts +10 -8
  49. package/front_end/models/issues_manager/issues_manager.ts +0 -2
  50. package/front_end/models/javascript_metadata/NativeFunctions.js +1 -1
  51. package/front_end/models/logs/RequestResolver.ts +2 -2
  52. package/front_end/models/source_map_scopes/FunctionCodeResolver.ts +12 -9
  53. package/front_end/models/trace/handlers/FramesHandler.ts +4 -7
  54. package/front_end/models/trace/handlers/ModelHandlers.ts +0 -1
  55. package/front_end/models/trace/handlers/RendererHandler.ts +2 -15
  56. package/front_end/models/trace/handlers/Threads.ts +4 -11
  57. package/front_end/models/trace/insights/DOMSize.ts +1 -1
  58. package/front_end/models/workspace_diff/WorkspaceDiff.ts +10 -4
  59. package/front_end/panels/ai_assistance/components/ChatMessage.ts +2 -1
  60. package/front_end/panels/application/ApplicationPanelSidebar.ts +0 -44
  61. package/front_end/panels/application/CookieItemsView.ts +1 -1
  62. package/front_end/panels/application/ServiceWorkersView.ts +494 -411
  63. package/front_end/panels/application/WebMCPView.ts +38 -43
  64. package/front_end/panels/application/application.ts +0 -6
  65. package/front_end/panels/application/components/AdsView.ts +201 -30
  66. package/front_end/panels/application/components/adsView.css +25 -0
  67. package/front_end/panels/application/components/components.ts +0 -2
  68. package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +1 -1
  69. package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +2 -2
  70. package/front_end/panels/application/serviceWorkersView.css +40 -4
  71. package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +147 -123
  72. package/front_end/panels/common/ExtensionServer.ts +3 -3
  73. package/front_end/panels/console/ConsoleView.ts +3 -2
  74. package/front_end/panels/console/PromptBuilder.ts +2 -1
  75. package/front_end/panels/emulation/DeviceModeView.ts +164 -113
  76. package/front_end/panels/issues/AffectedResourcesView.ts +1 -1
  77. package/front_end/panels/issues/IssueView.ts +0 -2
  78. package/front_end/panels/issues/IssuesPane.ts +1 -8
  79. package/front_end/panels/js_timeline/js_timeline-meta.ts +3 -2
  80. package/front_end/panels/lighthouse/LighthouseProtocolService.ts +53 -12
  81. package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorController.ts +3 -3
  82. package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +5 -5
  83. package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +4 -4
  84. package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +2 -2
  85. package/front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts +6 -6
  86. package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +3 -3
  87. package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplay.ts +8 -9
  88. package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplayUtils.ts +2 -2
  89. package/front_end/panels/linear_memory_inspector/components/ValueInterpreterSettings.ts +1 -1
  90. package/front_end/panels/linear_memory_inspector/linear_memory_inspector-meta.ts +2 -2
  91. package/front_end/panels/network/RequestPayloadView.ts +92 -52
  92. package/front_end/panels/network/RequestTimingView.ts +95 -127
  93. package/front_end/panels/network/components/ResponseHeaderSection.ts +5 -3
  94. package/front_end/panels/profiler/HeapSnapshotView.ts +3 -3
  95. package/front_end/panels/profiler/WritableProfileHeader.ts +2 -2
  96. package/front_end/panels/recorder/{components/ControlButton.ts → ControlButton.ts} +9 -10
  97. package/front_end/panels/recorder/{components/CreateRecordingView.ts → CreateRecordingView.ts} +48 -47
  98. package/front_end/panels/recorder/{components/ExtensionView.ts → ExtensionView.ts} +8 -8
  99. package/front_end/panels/recorder/RecorderController.ts +302 -127
  100. package/front_end/panels/recorder/RecorderPanel.ts +1 -1
  101. package/front_end/panels/recorder/{components/RecordingListView.ts → RecordingListView.ts} +19 -20
  102. package/front_end/panels/recorder/{components/RecordingView.ts → RecordingView.ts} +88 -88
  103. package/front_end/panels/recorder/{components/ReplaySection.ts → ReplaySection.ts} +11 -11
  104. package/front_end/panels/recorder/{components/SelectorPicker.ts → SelectorPicker.ts} +13 -13
  105. package/front_end/panels/recorder/{components/StepEditor.ts → StepEditor.ts} +15 -15
  106. package/front_end/panels/recorder/{components/StepView.ts → StepView.ts} +10 -10
  107. package/front_end/panels/recorder/{components/TimelineSection.ts → TimelineSection.ts} +2 -2
  108. package/front_end/panels/recorder/recorder.ts +23 -1
  109. package/front_end/panels/recorder/util/util.ts +113 -0
  110. package/front_end/panels/sources/SourcesView.ts +0 -17
  111. package/front_end/panels/sources/TabbedEditorContainer.ts +1 -1
  112. package/front_end/panels/sources/UISourceCodeFrame.ts +42 -0
  113. package/front_end/panels/sources/sources.ts +0 -2
  114. package/front_end/panels/timeline/CompatibilityTracksAppender.ts +0 -17
  115. package/front_end/panels/timeline/IsolateSelector.ts +10 -8
  116. package/front_end/panels/timeline/ThreadAppender.ts +0 -106
  117. package/front_end/panels/timeline/TimelinePanel.ts +18 -7
  118. package/front_end/panels/timeline/TimelineUIUtils.ts +144 -129
  119. package/front_end/panels/timeline/timeline-meta.ts +3 -2
  120. package/front_end/third_party/chromium/README.chromium +1 -1
  121. package/front_end/ui/components/report_view/ReportView.ts +11 -5
  122. package/front_end/ui/components/report_view/report.css +4 -1
  123. package/front_end/ui/legacy/TextPrompt.ts +49 -1
  124. package/front_end/ui/legacy/Treeoutline.ts +3 -0
  125. package/front_end/ui/legacy/UIUtils.ts +11 -1
  126. package/front_end/ui/legacy/Widget.ts +14 -15
  127. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +2 -2
  128. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +11 -7
  129. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +2 -1
  130. package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +10 -1
  131. package/front_end/ui/legacy/textPrompt.css +10 -0
  132. package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
  133. package/package.json +1 -1
  134. package/front_end/models/issues_manager/AttributionReportingIssue.ts +0 -247
  135. package/front_end/models/issues_manager/descriptions/arInsecureContext.md +0 -7
  136. package/front_end/models/issues_manager/descriptions/arInvalidInfoHeader.md +0 -5
  137. package/front_end/models/issues_manager/descriptions/arInvalidRegisterOsSourceHeader.md +0 -5
  138. package/front_end/models/issues_manager/descriptions/arInvalidRegisterOsTriggerHeader.md +0 -5
  139. package/front_end/models/issues_manager/descriptions/arInvalidRegisterSourceHeader.md +0 -5
  140. package/front_end/models/issues_manager/descriptions/arInvalidRegisterTriggerHeader.md +0 -5
  141. package/front_end/models/issues_manager/descriptions/arNavigationRegistrationUniqueScopeAlreadySet.md +0 -5
  142. package/front_end/models/issues_manager/descriptions/arNavigationRegistrationWithoutTransientUserActivation.md +0 -6
  143. package/front_end/models/issues_manager/descriptions/arNoRegisterOsSourceHeader.md +0 -5
  144. package/front_end/models/issues_manager/descriptions/arNoRegisterOsTriggerHeader.md +0 -5
  145. package/front_end/models/issues_manager/descriptions/arNoRegisterSourceHeader.md +0 -5
  146. package/front_end/models/issues_manager/descriptions/arNoRegisterTriggerHeader.md +0 -5
  147. package/front_end/models/issues_manager/descriptions/arNoWebOrOsSupport.md +0 -4
  148. package/front_end/models/issues_manager/descriptions/arOsSourceIgnored.md +0 -18
  149. package/front_end/models/issues_manager/descriptions/arOsTriggerIgnored.md +0 -19
  150. package/front_end/models/issues_manager/descriptions/arPermissionPolicyDisabled.md +0 -8
  151. package/front_end/models/issues_manager/descriptions/arSourceAndTriggerHeaders.md +0 -9
  152. package/front_end/models/issues_manager/descriptions/arSourceIgnored.md +0 -13
  153. package/front_end/models/issues_manager/descriptions/arTriggerIgnored.md +0 -12
  154. package/front_end/models/issues_manager/descriptions/arUntrustworthyReportingOrigin.md +0 -10
  155. package/front_end/models/issues_manager/descriptions/arWebAndOsHeaders.md +0 -11
  156. package/front_end/models/trace/handlers/AuctionWorkletsHandler.ts +0 -183
  157. package/front_end/panels/application/InterestGroupStorageModel.ts +0 -81
  158. package/front_end/panels/application/InterestGroupStorageView.ts +0 -151
  159. package/front_end/panels/application/InterestGroupTreeElement.ts +0 -65
  160. package/front_end/panels/application/components/InterestGroupAccessGrid.ts +0 -135
  161. package/front_end/panels/application/components/interestGroupAccessGrid.css +0 -27
  162. package/front_end/panels/application/interestGroupStorageView.css +0 -9
  163. package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +0 -182
  164. package/front_end/panels/recorder/components/components.ts +0 -25
  165. package/front_end/panels/recorder/components/util.ts +0 -116
  166. package/front_end/panels/sources/InplaceFormatterEditorAction.ts +0 -149
  167. /package/front_end/panels/recorder/{components/controlButton.css → controlButton.css} +0 -0
  168. /package/front_end/panels/recorder/{components/createRecordingView.css → createRecordingView.css} +0 -0
  169. /package/front_end/panels/recorder/{components/extensionView.css → extensionView.css} +0 -0
  170. /package/front_end/panels/recorder/{components/recordingListView.css → recordingListView.css} +0 -0
  171. /package/front_end/panels/recorder/{components/recordingView.css → recordingView.css} +0 -0
  172. /package/front_end/panels/recorder/{components/replaySection.css → replaySection.css} +0 -0
  173. /package/front_end/panels/recorder/{components/selectorPicker.css → selectorPicker.css} +0 -0
  174. /package/front_end/panels/recorder/{components/startView.css → startView.css} +0 -0
  175. /package/front_end/panels/recorder/{components/stepEditor.css → stepEditor.css} +0 -0
  176. /package/front_end/panels/recorder/{components/stepView.css → stepView.css} +0 -0
  177. /package/front_end/panels/recorder/{components/timelineSection.css → timelineSection.css} +0 -0
@@ -68,7 +68,7 @@ import {cloneCustomElement, ElementFocusRestorer} from './UIUtils.js';
68
68
  * @attribute value Sets the initial text value that's edited when editing starts. If not provided, the slot's inner text is used.
69
69
  */
70
70
  export class TextPromptElement extends HTMLElement {
71
- static readonly observedAttributes = ['editing', 'completions', 'placeholder', 'cancel-on-blur'];
71
+ static readonly observedAttributes = ['editing', 'completions', 'placeholder', 'cancel-on-blur', 'render-as-block'];
72
72
  static formAssociated = true;
73
73
  readonly #shadow = this.attachShadow({mode: 'open'});
74
74
  readonly #internals = this.attachInternals();
@@ -79,6 +79,7 @@ export class TextPromptElement extends HTMLElement {
79
79
  #completionObserver = new MutationObserver(this.#onMutate.bind(this));
80
80
  #validator?: (value: string) => null | Platform.UIString.LocalizedString;
81
81
  #cancelOnBlur = false;
82
+ #isEditing = false;
82
83
 
83
84
  constructor() {
84
85
  super();
@@ -101,6 +102,18 @@ export class TextPromptElement extends HTMLElement {
101
102
  return this.#cancelOnBlur;
102
103
  }
103
104
 
105
+ set renderAsBlock(renderAsBlock: boolean) {
106
+ if (renderAsBlock) {
107
+ this.setAttribute('render-as-block', '');
108
+ } else {
109
+ this.removeAttribute('render-as-block');
110
+ }
111
+ }
112
+
113
+ get renderAsBlock(): boolean {
114
+ return this.hasAttribute('render-as-block');
115
+ }
116
+
104
117
  #onMutate(changes: MutationRecord[]): void {
105
118
  const listId = this.getAttribute('completions');
106
119
  if (!listId) {
@@ -159,6 +172,17 @@ export class TextPromptElement extends HTMLElement {
159
172
  this.#completionObserver.disconnect();
160
173
  }
161
174
  break;
175
+ case 'render-as-block':
176
+ if (this.#isEditing) {
177
+ if (isTruthy(newValue)) {
178
+ this.#textPrompt.renderAsBlock();
179
+ this.#entrypoint.style.display = 'block';
180
+ } else {
181
+ this.#textPrompt.renderAsInlineBlock();
182
+ this.#entrypoint.style.display = 'inline';
183
+ }
184
+ }
185
+ break;
162
186
  }
163
187
  }
164
188
 
@@ -188,6 +212,7 @@ export class TextPromptElement extends HTMLElement {
188
212
  }
189
213
 
190
214
  #startEditing(): void {
215
+ this.#isEditing = true;
191
216
  const truncatedTextPlaceholder = this.getAttribute('placeholder');
192
217
  const placeholder = this.#entrypoint.createChild('span');
193
218
  const initialText = this.getAttribute('value') ?? this.#slot.deepInnerText();
@@ -198,6 +223,13 @@ export class TextPromptElement extends HTMLElement {
198
223
  }
199
224
  this.#slot.remove();
200
225
 
226
+ if (this.renderAsBlock) {
227
+ this.#textPrompt.renderAsBlock();
228
+ this.#entrypoint.style.display = 'block';
229
+ } else {
230
+ this.#textPrompt.renderAsInlineBlock();
231
+ this.#entrypoint.style.display = 'inline';
232
+ }
201
233
  const proxy =
202
234
  this.#textPrompt.attachAndStartEditing(placeholder, e => this.#done(e, /* commit=*/ !this.#cancelOnBlur));
203
235
  proxy.addEventListener('keydown', this.#editingValueKeyDown.bind(this));
@@ -206,6 +238,7 @@ export class TextPromptElement extends HTMLElement {
206
238
  }
207
239
 
208
240
  #stopEditing(): void {
241
+ this.#isEditing = false;
209
242
  this.#entrypoint.removeChildren();
210
243
  this.#entrypoint.appendChild(this.#slot);
211
244
  this.#textPrompt.detach();
@@ -224,6 +257,9 @@ export class TextPromptElement extends HTMLElement {
224
257
  }
225
258
 
226
259
  #done(e: Event, commit: boolean): void {
260
+ if (!this.#isEditing) {
261
+ return;
262
+ }
227
263
  const target = e.target as HTMLElement;
228
264
  const text = target.textContent || '';
229
265
  if (commit) {
@@ -238,9 +274,11 @@ export class TextPromptElement extends HTMLElement {
238
274
  return;
239
275
  }
240
276
 
277
+ this.#isEditing = false;
241
278
  this.dispatchEvent(new TextPromptElement.CommitEvent(text));
242
279
  } else {
243
280
  this.#internals.setValidity({});
281
+ this.#isEditing = false;
244
282
  this.dispatchEvent(new TextPromptElement.CancelEvent());
245
283
  }
246
284
  e.consume();
@@ -365,6 +403,16 @@ export class TextPrompt extends Common.ObjectWrapper.ObjectWrapper<EventTypes> i
365
403
 
366
404
  renderAsBlock(): void {
367
405
  this.proxyElementDisplay = 'block';
406
+ if (this.proxyElement) {
407
+ (this.proxyElement as HTMLElement).style.display = 'block';
408
+ }
409
+ }
410
+
411
+ renderAsInlineBlock(): void {
412
+ this.proxyElementDisplay = 'inline-block';
413
+ if (this.proxyElement) {
414
+ (this.proxyElement as HTMLElement).style.display = 'inline-block';
415
+ }
368
416
  }
369
417
 
370
418
  /**
@@ -1895,6 +1895,9 @@ export class TreeViewElement extends HTMLElementWithLightDOMTemplate {
1895
1895
  removeNode(treeElement);
1896
1896
  }
1897
1897
  parent.treeElement.insertChild(treeElement, index);
1898
+ if (parent.treeElement instanceof TreeViewTreeElement) {
1899
+ parent.treeElement.updateExpansionFromAttribute();
1900
+ }
1898
1901
  if (hasBooleanAttribute(node, 'selected')) {
1899
1902
  treeElement.revealAndSelect(true);
1900
1903
  }
@@ -1190,7 +1190,7 @@ export function setTitle(element: HTMLElement, title: string): void {
1190
1190
  }
1191
1191
 
1192
1192
  export class CheckboxLabel extends HTMLElement {
1193
- static readonly observedAttributes = ['checked', 'disabled', 'indeterminate', 'name', 'title', 'aria-label'];
1193
+ static readonly observedAttributes = ['checked', 'disabled', 'indeterminate', 'name', 'title', 'aria-label', 'small'];
1194
1194
 
1195
1195
  readonly #shadowRoot!: DocumentFragment;
1196
1196
  #checkboxElement!: HTMLInputElement;
@@ -1255,6 +1255,8 @@ export class CheckboxLabel extends HTMLElement {
1255
1255
  this.#textElement.title = newValue ?? '';
1256
1256
  } else if (name === 'aria-label') {
1257
1257
  this.#checkboxElement.ariaLabel = newValue;
1258
+ } else if (name === 'small') {
1259
+ this.#checkboxElement.classList.toggle('small', newValue !== null);
1258
1260
  }
1259
1261
  }
1260
1262
 
@@ -1282,6 +1284,14 @@ export class CheckboxLabel extends HTMLElement {
1282
1284
  this.toggleAttribute('checked', checked);
1283
1285
  }
1284
1286
 
1287
+ get small(): boolean {
1288
+ return this.hasAttribute('small');
1289
+ }
1290
+
1291
+ set small(small: boolean) {
1292
+ this.toggleAttribute('small', small);
1293
+ }
1294
+
1285
1295
  set disabled(disabled: boolean) {
1286
1296
  this.toggleAttribute('disabled', disabled);
1287
1297
  }
@@ -84,7 +84,8 @@ function enqueueIntoNextUpdateQueue(widget: AnyWidget): Promise<void> {
84
84
  nextUpdateQueue.delete(widget);
85
85
  nextUpdateQueue.set(widget, scheduledUpdate);
86
86
  if (pendingAnimationFrame === null) {
87
- pendingAnimationFrame = requestAnimationFrame(runNextUpdate);
87
+ const widgetWindow = widget.contentElement.window() || window;
88
+ pendingAnimationFrame = widgetWindow.requestAnimationFrame(runNextUpdate);
88
89
  }
89
90
  return scheduledUpdate.promise;
90
91
  }
@@ -155,7 +156,8 @@ function runNextUpdate(): void {
155
156
  if (nextUpdate) {
156
157
  void nextUpdate.promise.then(resolve);
157
158
  if (pendingAnimationFrame === null) {
158
- pendingAnimationFrame = requestAnimationFrame(runNextUpdate);
159
+ const widgetWindow = widget.contentElement.window() || window;
160
+ pendingAnimationFrame = widgetWindow.requestAnimationFrame(runNextUpdate);
159
161
  }
160
162
  } else {
161
163
  resolve();
@@ -182,16 +184,16 @@ function runNextUpdate(): void {
182
184
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
183
185
  const widgetConfigs = new WeakMap<HTMLElement, WidgetConfig<any>>();
184
186
 
185
- export function registerWidgetConfig<WidgetT extends AnyWidget>(
186
- element: HTMLElement, config: WidgetConfig<WidgetT>): void {
187
+ export function registerWidgetConfig<WidgetT extends AnyWidget>(element: HTMLElement,
188
+ config: WidgetConfig<WidgetT>): void {
187
189
  if (!widgetConfigs.has(element)) {
188
190
  setUpLifecycleTracking(element);
189
191
  }
190
192
  widgetConfigs.set(element, config);
191
193
  }
192
194
 
193
- function instantiateWidget<WidgetT extends AnyWidget>(
194
- element: HTMLElement, widgetConfig: WidgetConfig<WidgetT>): WidgetT {
195
+ function instantiateWidget<WidgetT extends AnyWidget>(element: HTMLElement,
196
+ widgetConfig: WidgetConfig<WidgetT>): WidgetT {
195
197
  if (!widgetConfig.widgetClass) {
196
198
  throw new Error('No widgetClass defined');
197
199
  }
@@ -794,9 +796,8 @@ export class Widget<ContentTypeT extends HTMLElement|DocumentFragment = HTMLElem
794
796
  if (this.#isRoot) {
795
797
  assert(!currentParent, 'Attempt to show root widget under another widget');
796
798
  } else {
797
- assert(
798
- currentParent && widgetMap.get(currentParent) === this.#parentWidget,
799
- 'Attempt to show under node belonging to alien widget');
799
+ assert(currentParent && widgetMap.get(currentParent) === this.#parentWidget,
800
+ 'Attempt to show under node belonging to alien widget');
800
801
  }
801
802
 
802
803
  const wasVisible = this.#visible;
@@ -1031,9 +1032,8 @@ export class Widget<ContentTypeT extends HTMLElement|DocumentFragment = HTMLElem
1031
1032
  getDefaultFocusedElement(): HTMLElement|null {
1032
1033
  const elements = this.getDefaultFocusedElements();
1033
1034
  if (elements.length > 1) {
1034
- console.error(
1035
- 'Multiple autofocus elements found', this.constructor.name,
1036
- ...elements.map(e => Platform.StringUtilities.trimMiddle(e.outerHTML, 250)));
1035
+ console.error('Multiple autofocus elements found', this.constructor.name,
1036
+ ...elements.map(e => Platform.StringUtilities.trimMiddle(e.outerHTML, 250)));
1037
1037
  }
1038
1038
  return elements[0] || null;
1039
1039
  }
@@ -1110,9 +1110,8 @@ export class Widget<ContentTypeT extends HTMLElement|DocumentFragment = HTMLElem
1110
1110
 
1111
1111
  private hasNonZeroConstraints(): boolean {
1112
1112
  const constraints = this.constraints();
1113
- return Boolean(
1114
- constraints.minimum.width || constraints.minimum.height || constraints.preferred.width ||
1115
- constraints.preferred.height);
1113
+ return Boolean(constraints.minimum.width || constraints.minimum.height || constraints.preferred.width ||
1114
+ constraints.preferred.height);
1116
1115
  }
1117
1116
 
1118
1117
  suspendInvalidations(): void {
@@ -688,10 +688,10 @@ export class CookiesTable extends UI.Widget.VBox {
688
688
  ]);
689
689
  void Common.Revealer.reveal(requestFilter);
690
690
  }, {jslogContext: 'show-requests-with-this-cookie'});
691
- if (IssuesManager.RelatedIssue.hasIssues(cookie)) {
691
+ if (IssuesManager.RelatedIssue.hasIssues(cookie, IssuesManager.IssuesManager.IssuesManager.instance())) {
692
692
  contextMenu.revealSection().appendItem(i18nString(UIStrings.showIssueAssociatedWithThis), () => {
693
693
  // TODO(chromium:1077719): Just filter for the cookie instead of revealing one of the associated issues.
694
- void IssuesManager.RelatedIssue.reveal(cookie);
694
+ void IssuesManager.RelatedIssue.reveal(cookie, IssuesManager.IssuesManager.IssuesManager.instance());
695
695
  }, {jslogContext: 'show-issue-associated-with-this'});
696
696
  }
697
697
  }
@@ -442,6 +442,7 @@ export abstract class ObjectTreeNodeBase extends Common.ObjectWrapper.ObjectWrap
442
442
  get canExpandRecursively(): boolean {
443
443
  return true;
444
444
  }
445
+
445
446
  get sortPropertiesAlphabetically(): boolean {
446
447
  if (this.isWasm) {
447
448
  return false;
@@ -457,7 +458,6 @@ export abstract class ObjectTreeNodeBase extends Common.ObjectWrapper.ObjectWrap
457
458
  setting.set(value);
458
459
  this.removeChildren();
459
460
  }
460
-
461
461
  // Performs a pre-order tree traversal over the populated children. If any children need to be populated, callers must
462
462
  // do that while walking (pre-order visitation enables that).
463
463
  * #walk(maxDepth = -1, filter?: (node: ObjectTreeNodeBase) => boolean): Generator<ObjectTreeNodeBase> {
@@ -783,6 +783,7 @@ export class ObjectTreeNode extends ObjectTreeNodeBase {
783
783
  override get canExpandRecursively(): boolean {
784
784
  return this.property.name !== '[[Prototype]]';
785
785
  }
786
+
786
787
  get name(): string {
787
788
  return this.property.name;
788
789
  }
@@ -806,7 +807,7 @@ export class ObjectTreeNode extends ObjectTreeNodeBase {
806
807
  } else if (isInteger.test(this.name)) {
807
808
  this.#path = `${parentPath}[${this.name}]`;
808
809
  } else {
809
- this.#path = `${parentPath}[${JSON.stringify(this.name)}]`;
810
+ this.#path = `${parentPath}[${Platform.StringUtilities.formatAsJSLiteral(this.name)}]`;
810
811
  }
811
812
  }
812
813
  return this.#path;
@@ -1151,7 +1152,7 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
1151
1152
  return html`<span class=value title=${description}>${'<' + i18nString(UIStrings.unknown) + '>'}</span>`;
1152
1153
  }
1153
1154
  if (type === 'string' && typeof description === 'string') {
1154
- const text = JSON.stringify(description);
1155
+ const text = Platform.StringUtilities.escapeUnicode(JSON.stringify(description));
1155
1156
  const tooLong = description.length > maxRenderableStringLength;
1156
1157
  return html`<span class="value object-value-string" title=${ifDefined(tooLong ? undefined : description)}>${
1157
1158
  tooLong ? widget(ExpandableTextPropertyValue, {text}) : text}</span>`;
@@ -1162,7 +1163,7 @@ export class ObjectPropertiesSection extends UI.TreeOutline.TreeOutlineInShadow
1162
1163
  return html`<span class="value object-value-trustedtype" title=${ifDefined(tooLong ? undefined : text)}>${
1163
1164
  tooLong ? widget(ExpandableTextPropertyValue, {text}) :
1164
1165
  html`${className} <span class=object-value-string title=${description}>${
1165
- JSON.stringify(description)}</span>`}</span>`;
1166
+ Platform.StringUtilities.escapeUnicode(JSON.stringify(description))}</span>`}</span>`;
1166
1167
  }
1167
1168
  if (type === 'function') {
1168
1169
  return ObjectPropertiesSection.valueElementForFunctionDescription(description, undefined, undefined, 'value');
@@ -1320,7 +1321,8 @@ export function populateObjectTreeContextMenu(
1320
1321
 
1321
1322
  if (object.object instanceof SDK.RemoteObject.LocalJSONObject) {
1322
1323
  const {value} = object.object;
1323
- const propertyValue = typeof value === 'object' ? JSON.stringify(value, null, 2) : value;
1324
+ const propertyValue =
1325
+ typeof value === 'object' ? Platform.StringUtilities.escapeUnicode(JSON.stringify(value, null, 2)) : value;
1324
1326
  const copyValueHandler = (): void => {
1325
1327
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.NetworkPanelCopyValue);
1326
1328
  Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText((propertyValue as string | undefined));
@@ -1379,7 +1381,7 @@ export function renderObjectTree(
1379
1381
 
1380
1382
  return until(promise, html`<ul class="source-code object-properties-section" role="group"></ul>`);
1381
1383
  }
1382
- export class RootElement extends UI.TreeOutline.TreeElement {
1384
+ class RootElement extends UI.TreeOutline.TreeElement {
1383
1385
  private readonly object: ObjectTree;
1384
1386
  private readonly linkifier: Components.Linkifier.Linkifier|undefined;
1385
1387
  private readonly emptyPlaceholder: string|null|undefined;
@@ -1997,6 +1999,7 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
1997
1999
  this.collapse();
1998
2000
  }
1999
2001
  }
2002
+
2000
2003
  getContextMenu(event: Event): UI.ContextMenu.ContextMenu {
2001
2004
  const contextMenu = new UI.ContextMenu.ContextMenu(event);
2002
2005
  contextMenu.appendApplicableItems(this);
@@ -2007,7 +2010,8 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
2007
2010
  contextMenu.appendApplicableItems(this.property.object);
2008
2011
  if (this.property.parent?.object instanceof SDK.RemoteObject.LocalJSONObject) {
2009
2012
  const {object: {value}} = this.property;
2010
- const propertyValue = typeof value === 'object' ? JSON.stringify(value, null, 2) : value;
2013
+ const propertyValue =
2014
+ typeof value === 'object' ? Platform.StringUtilities.escapeUnicode(JSON.stringify(value, null, 2)) : value;
2011
2015
  const copyValueHandler = (): void => {
2012
2016
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.NetworkPanelCopyValue);
2013
2017
  Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText((propertyValue as string | undefined));
@@ -392,7 +392,8 @@ export class SourceFrameImpl extends Common.ObjectWrapper.eventMixin<EventTypes,
392
392
  const content =
393
393
  this.rawContent instanceof CodeMirror.Text ? this.rawContent.sliceString(0) : this.rawContent || '';
394
394
  this.textEditor.state = this.placeholderEditorState(i18nString(UIStrings.formatting));
395
- const formatInfo = await Formatter.ScriptFormatter.formatScriptContent(this.contentType, content);
395
+ const formatInfo = await Formatter.ScriptFormatter.formatScriptContent(Common.Settings.Settings.instance(),
396
+ this.contentType, content);
396
397
  this.formattedMap = formatInfo.formattedMapping;
397
398
  await this.setContent(formatInfo.formattedContent);
398
399
  this.prettyBaseDoc = textEditor.state.doc;
@@ -268,9 +268,16 @@ export class StackTracePreviewContent extends UI.Widget.Widget<ShadowRoot> {
268
268
  if (Root.DevToolsContext.globalInstance().has(Workspace.IgnoreListManager.IgnoreListManager)) {
269
269
  Workspace.IgnoreListManager.IgnoreListManager.instance().addChangeListener(this.#updateHasNonIgnoredLinks);
270
270
  }
271
+ if (this.#stackTrace) {
272
+ this.#stackTrace.addEventListener(StackTrace.StackTrace.Events.UPDATED, this.requestUpdate, this);
273
+ }
274
+ this.requestUpdate();
271
275
  }
272
276
 
273
277
  override willHide(): void {
278
+ if (this.#stackTrace) {
279
+ this.#stackTrace.removeEventListener(StackTrace.StackTrace.Events.UPDATED, this.requestUpdate, this);
280
+ }
274
281
  if (Root.DevToolsContext.globalInstance().has(Workspace.IgnoreListManager.IgnoreListManager)) {
275
282
  Workspace.IgnoreListManager.IgnoreListManager.instance().removeChangeListener(this.#updateHasNonIgnoredLinks);
276
283
  }
@@ -291,7 +298,9 @@ export class StackTracePreviewContent extends UI.Widget.Widget<ShadowRoot> {
291
298
  this.#stackTrace.removeEventListener(StackTrace.StackTrace.Events.UPDATED, this.requestUpdate, this);
292
299
  }
293
300
  this.#stackTrace = stackTrace;
294
- this.#stackTrace.addEventListener(StackTrace.StackTrace.Events.UPDATED, this.requestUpdate, this);
301
+ if (this.#stackTrace && this.isShowing()) {
302
+ this.#stackTrace.addEventListener(StackTrace.StackTrace.Events.UPDATED, this.requestUpdate, this);
303
+ }
295
304
  this.requestUpdate();
296
305
  }
297
306
 
@@ -24,6 +24,16 @@
24
24
  min-width: var(--devtools-text-prompt-min-width, auto);
25
25
  }
26
26
 
27
+ :host([render-as-block]) .text-prompt-root,
28
+ :host([render-as-block]) .text-prompt {
29
+ flex: auto;
30
+ width: 100%;
31
+ }
32
+
33
+ :host([render-as-block]) .text-prompt:focus {
34
+ outline: none;
35
+ }
36
+
27
37
  .text-prompt::-webkit-scrollbar {
28
38
  display: none;
29
39
  }
@@ -1353,6 +1353,7 @@ export const knownContextValues = new Set([
1353
1353
  'device-bound-sessions-request',
1354
1354
  'device-bound-sessions-root',
1355
1355
  'device-fold',
1356
+ 'device-frame-disable',
1356
1357
  'device-frame-enable',
1357
1358
  'device-mode',
1358
1359
  'device-mode-preset-1024px',
package/package.json CHANGED
@@ -92,5 +92,5 @@
92
92
  "webidl2": "24.5.0",
93
93
  "yargs": "17.7.2"
94
94
  },
95
- "version": "1.0.1660788"
95
+ "version": "1.0.1662289"
96
96
  }
@@ -1,247 +0,0 @@
1
- // Copyright 2021 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
- import type * as SDK from '../../core/sdk/sdk.js';
6
- import * as Protocol from '../../generated/protocol.js';
7
-
8
- import {Issue, IssueCategory, IssueKind} from './Issue.js';
9
- import type {MarkdownIssueDescription} from './MarkdownIssueDescription.js';
10
-
11
- export const enum IssueCode {
12
- PERMISSION_POLICY_DISABLED = 'AttributionReportingIssue::PermissionPolicyDisabled',
13
- UNTRUSTWORTHY_REPORTING_ORIGIN = 'AttributionReportingIssue::UntrustworthyReportingOrigin',
14
- INSECURE_CONTEXT = 'AttributionReportingIssue::InsecureContext',
15
- INVALID_REGISTER_SOURCE_HEADER = 'AttributionReportingIssue::InvalidRegisterSourceHeader',
16
- INVALID_REGISTER_TRIGGER_HEADER = 'AttributionReportingIssue::InvalidRegisterTriggerHeader',
17
- SOURCE_AND_TRIGGER_HEADERS = 'AttributionReportingIssue::SourceAndTriggerHeaders',
18
- SOURCE_IGNORED = 'AttributionReportingIssue::SourceIgnored',
19
- TRIGGER_IGNORED = 'AttributionReportingIssue::TriggerIgnored',
20
- OS_SOURCE_IGNORED = 'AttributionReportingIssue::OsSourceIgnored',
21
- OS_TRIGGER_IGNORED = 'AttributionReportingIssue::OsTriggerIgnored',
22
- INVALID_REGISTER_OS_SOURCE_HEADER = 'AttributionReportingIssue::InvalidRegisterOsSourceHeader',
23
- INVALID_REGISTER_OS_TRIGGER_HEADER = 'AttributionReportingIssue::InvalidRegisterOsTriggerHeader',
24
- WEB_AND_OS_HEADERS = 'AttributionReportingIssue::WebAndOsHeaders',
25
- NO_WEB_OR_OS_SUPPORT = 'AttributionReportingIssue::NoWebOrOsSupport',
26
- NAVIGATION_REGISTRATION_WITHOUT_TRANSIENT_USER_ACTIVATION =
27
- 'AttributionReportingIssue::NavigationRegistrationWithoutTransientUserActivation',
28
- INVALID_INFO_HEADER = 'AttributionReportingIssue::InvalidInfoHeader',
29
- NO_REGISTER_SOURCE_HEADER = 'AttributionReportingIssue::NoRegisterSourceHeader',
30
- NO_REGISTER_TRIGGER_HEADER = 'AttributionReportingIssue::NoRegisterTriggerHeader',
31
- NO_REGISTER_OS_SOURCE_HEADER = 'AttributionReportingIssue::NoRegisterOsSourceHeader',
32
- NO_REGISTER_OS_TRIGGER_HEADER = 'AttributionReportingIssue::NoRegisterOsTriggerHeader',
33
- NAVIGATION_REGISTRATION_UNIQUE_SCOPE_ALREADY_SET =
34
- 'AttributionReportingIssue::NavigationRegistrationUniqueScopeAlreadySet',
35
- UNKNOWN = 'AttributionReportingIssue::Unknown',
36
- }
37
-
38
- function getIssueCode(details: Protocol.Audits.AttributionReportingIssueDetails): IssueCode {
39
- switch (details.violationType) {
40
- case Protocol.Audits.AttributionReportingIssueType.PermissionPolicyDisabled:
41
- return IssueCode.PERMISSION_POLICY_DISABLED;
42
- case Protocol.Audits.AttributionReportingIssueType.UntrustworthyReportingOrigin:
43
- return IssueCode.UNTRUSTWORTHY_REPORTING_ORIGIN;
44
- case Protocol.Audits.AttributionReportingIssueType.InsecureContext:
45
- return IssueCode.INSECURE_CONTEXT;
46
- case Protocol.Audits.AttributionReportingIssueType.InvalidHeader:
47
- return IssueCode.INVALID_REGISTER_SOURCE_HEADER;
48
- case Protocol.Audits.AttributionReportingIssueType.InvalidRegisterTriggerHeader:
49
- return IssueCode.INVALID_REGISTER_TRIGGER_HEADER;
50
- case Protocol.Audits.AttributionReportingIssueType.SourceAndTriggerHeaders:
51
- return IssueCode.SOURCE_AND_TRIGGER_HEADERS;
52
- case Protocol.Audits.AttributionReportingIssueType.SourceIgnored:
53
- return IssueCode.SOURCE_IGNORED;
54
- case Protocol.Audits.AttributionReportingIssueType.TriggerIgnored:
55
- return IssueCode.TRIGGER_IGNORED;
56
- case Protocol.Audits.AttributionReportingIssueType.OsSourceIgnored:
57
- return IssueCode.OS_SOURCE_IGNORED;
58
- case Protocol.Audits.AttributionReportingIssueType.OsTriggerIgnored:
59
- return IssueCode.OS_TRIGGER_IGNORED;
60
- case Protocol.Audits.AttributionReportingIssueType.InvalidRegisterOsSourceHeader:
61
- return IssueCode.INVALID_REGISTER_OS_SOURCE_HEADER;
62
- case Protocol.Audits.AttributionReportingIssueType.InvalidRegisterOsTriggerHeader:
63
- return IssueCode.INVALID_REGISTER_OS_TRIGGER_HEADER;
64
- case Protocol.Audits.AttributionReportingIssueType.WebAndOsHeaders:
65
- return IssueCode.WEB_AND_OS_HEADERS;
66
- case Protocol.Audits.AttributionReportingIssueType.NoWebOrOsSupport:
67
- return IssueCode.NO_WEB_OR_OS_SUPPORT;
68
- case Protocol.Audits.AttributionReportingIssueType.NavigationRegistrationWithoutTransientUserActivation:
69
- return IssueCode.NAVIGATION_REGISTRATION_WITHOUT_TRANSIENT_USER_ACTIVATION;
70
- case Protocol.Audits.AttributionReportingIssueType.InvalidInfoHeader:
71
- return IssueCode.INVALID_INFO_HEADER;
72
- case Protocol.Audits.AttributionReportingIssueType.NoRegisterSourceHeader:
73
- return IssueCode.NO_REGISTER_SOURCE_HEADER;
74
- case Protocol.Audits.AttributionReportingIssueType.NoRegisterTriggerHeader:
75
- return IssueCode.NO_REGISTER_TRIGGER_HEADER;
76
- case Protocol.Audits.AttributionReportingIssueType.NoRegisterOsSourceHeader:
77
- return IssueCode.NO_REGISTER_OS_SOURCE_HEADER;
78
- case Protocol.Audits.AttributionReportingIssueType.NoRegisterOsTriggerHeader:
79
- return IssueCode.NO_REGISTER_OS_TRIGGER_HEADER;
80
- case Protocol.Audits.AttributionReportingIssueType.NavigationRegistrationUniqueScopeAlreadySet:
81
- return IssueCode.NAVIGATION_REGISTRATION_UNIQUE_SCOPE_ALREADY_SET;
82
- default:
83
- return IssueCode.UNKNOWN;
84
- }
85
- }
86
-
87
- const structuredHeaderLink = {
88
- link: 'https://tools.ietf.org/id/draft-ietf-httpbis-header-structure-15.html#rfc.section.4.2.2',
89
- linkTitle: 'Structured Headers RFC',
90
- };
91
-
92
- export class AttributionReportingIssue extends Issue<Protocol.Audits.AttributionReportingIssueDetails, IssueCode> {
93
- constructor(
94
- issueDetails: Protocol.Audits.AttributionReportingIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel|null) {
95
- super(getIssueCode(issueDetails), issueDetails, issuesModel);
96
- }
97
-
98
- getCategory(): IssueCategory {
99
- return IssueCategory.ATTRIBUTION_REPORTING;
100
- }
101
-
102
- getHeaderValidatorLink(name: string): {link: string, linkTitle: string} {
103
- const url = new URL('https://wicg.github.io/attribution-reporting-api/validate-headers');
104
- url.searchParams.set('header', name);
105
-
106
- const details = this.details();
107
- if (details.invalidParameter) {
108
- url.searchParams.set('json', details.invalidParameter);
109
- }
110
-
111
- return {
112
- link: url.toString(),
113
- linkTitle: 'Header Validator',
114
- };
115
- }
116
-
117
- getDescription(): MarkdownIssueDescription|null {
118
- switch (this.code()) {
119
- case IssueCode.PERMISSION_POLICY_DISABLED:
120
- return {
121
- file: 'arPermissionPolicyDisabled.md',
122
- links: [],
123
- };
124
- case IssueCode.UNTRUSTWORTHY_REPORTING_ORIGIN:
125
- return {
126
- file: 'arUntrustworthyReportingOrigin.md',
127
- links: [],
128
- };
129
- case IssueCode.INSECURE_CONTEXT:
130
- return {
131
- file: 'arInsecureContext.md',
132
- links: [],
133
- };
134
- case IssueCode.INVALID_REGISTER_SOURCE_HEADER:
135
- return {
136
- file: 'arInvalidRegisterSourceHeader.md',
137
- links: [this.getHeaderValidatorLink('source')],
138
- };
139
- case IssueCode.INVALID_REGISTER_TRIGGER_HEADER:
140
- return {
141
- file: 'arInvalidRegisterTriggerHeader.md',
142
- links: [this.getHeaderValidatorLink('trigger')],
143
- };
144
- case IssueCode.INVALID_REGISTER_OS_SOURCE_HEADER:
145
- return {
146
- file: 'arInvalidRegisterOsSourceHeader.md',
147
- links: [this.getHeaderValidatorLink('os-source')],
148
- };
149
- case IssueCode.INVALID_REGISTER_OS_TRIGGER_HEADER:
150
- return {
151
- file: 'arInvalidRegisterOsTriggerHeader.md',
152
- links: [this.getHeaderValidatorLink('os-trigger')],
153
- };
154
- case IssueCode.SOURCE_AND_TRIGGER_HEADERS:
155
- return {
156
- file: 'arSourceAndTriggerHeaders.md',
157
- links: [],
158
- };
159
- case IssueCode.WEB_AND_OS_HEADERS:
160
- return {
161
- file: 'arWebAndOsHeaders.md',
162
- links: [],
163
- };
164
- case IssueCode.SOURCE_IGNORED:
165
- return {
166
- file: 'arSourceIgnored.md',
167
- links: [structuredHeaderLink],
168
- };
169
- case IssueCode.TRIGGER_IGNORED:
170
- return {
171
- file: 'arTriggerIgnored.md',
172
- links: [structuredHeaderLink],
173
- };
174
- case IssueCode.OS_SOURCE_IGNORED:
175
- return {
176
- file: 'arOsSourceIgnored.md',
177
- links: [structuredHeaderLink],
178
- };
179
- case IssueCode.OS_TRIGGER_IGNORED:
180
- return {
181
- file: 'arOsTriggerIgnored.md',
182
- links: [structuredHeaderLink],
183
- };
184
- case IssueCode.NAVIGATION_REGISTRATION_WITHOUT_TRANSIENT_USER_ACTIVATION:
185
- return {
186
- file: 'arNavigationRegistrationWithoutTransientUserActivation.md',
187
- links: [],
188
- };
189
- case IssueCode.NO_WEB_OR_OS_SUPPORT:
190
- return {
191
- file: 'arNoWebOrOsSupport.md',
192
- links: [],
193
- };
194
- case IssueCode.INVALID_INFO_HEADER:
195
- return {
196
- file: 'arInvalidInfoHeader.md',
197
- links: [],
198
- };
199
- case IssueCode.NO_REGISTER_SOURCE_HEADER:
200
- return {
201
- file: 'arNoRegisterSourceHeader.md',
202
- links: [],
203
- };
204
- case IssueCode.NO_REGISTER_TRIGGER_HEADER:
205
- return {
206
- file: 'arNoRegisterTriggerHeader.md',
207
- links: [],
208
- };
209
- case IssueCode.NO_REGISTER_OS_SOURCE_HEADER:
210
- return {
211
- file: 'arNoRegisterOsSourceHeader.md',
212
- links: [],
213
- };
214
- case IssueCode.NO_REGISTER_OS_TRIGGER_HEADER:
215
- return {
216
- file: 'arNoRegisterOsTriggerHeader.md',
217
- links: [],
218
- };
219
- case IssueCode.NAVIGATION_REGISTRATION_UNIQUE_SCOPE_ALREADY_SET:
220
- return {
221
- file: 'arNavigationRegistrationUniqueScopeAlreadySet.md',
222
- links: [],
223
- };
224
- case IssueCode.UNKNOWN:
225
- return null;
226
- }
227
- }
228
-
229
- primaryKey(): string {
230
- return JSON.stringify(this.details());
231
- }
232
-
233
- getKind(): IssueKind {
234
- return IssueKind.PAGE_ERROR;
235
- }
236
-
237
- static fromInspectorIssue(
238
- issuesModel: SDK.IssuesModel.IssuesModel|null,
239
- inspectorIssue: Protocol.Audits.InspectorIssue): AttributionReportingIssue[] {
240
- const {attributionReportingIssueDetails} = inspectorIssue.details;
241
- if (!attributionReportingIssueDetails) {
242
- console.warn('Attribution Reporting issue without details received.');
243
- return [];
244
- }
245
- return [new AttributionReportingIssue(attributionReportingIssueDetails, issuesModel)];
246
- }
247
- }
@@ -1,7 +0,0 @@
1
- # Ensure that the attribution registration context is secure
2
-
3
- This page tried to register a source or trigger using the Attribution Reporting
4
- API but failed because the page that initiated the registration was not secure.
5
-
6
- The registration context must use HTTPS unless it is `localhost` or
7
- `127.0.0.1`.