chrome-devtools-frontend 1.0.1654411 → 1.0.1656897

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 (204) hide show
  1. package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +116 -0
  2. package/.agents/skills/ui-eng-vision-logic-consolidator/SKILL.md +82 -0
  3. package/.agents/skills/ui-eng-vision-orchestrator/SKILL.md +123 -0
  4. package/.agents/skills/ui-eng-vision-test-scaffolder/SKILL.md +125 -0
  5. package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +75 -0
  6. package/AUTHORS +1 -0
  7. package/config/owner/COMMON_OWNERS +0 -4
  8. package/docs/playbook.md +1 -1
  9. package/front_end/Tests.js +1 -0
  10. package/front_end/core/common/Settings.ts +47 -30
  11. package/front_end/core/sdk/CPUThrottlingManager.ts +10 -159
  12. package/front_end/core/sdk/ConsoleModel.ts +13 -11
  13. package/front_end/core/sdk/DOMDebuggerModel.ts +11 -5
  14. package/front_end/core/sdk/DOMModel.ts +7 -5
  15. package/front_end/core/sdk/EventBreakpointsModel.ts +9 -5
  16. package/front_end/core/sdk/IsolateManager.ts +6 -6
  17. package/front_end/core/sdk/ResourceTreeModel.ts +5 -3
  18. package/front_end/core/sdk/SourceMapCache.ts +2 -4
  19. package/front_end/core/sdk/SourceMapManager.ts +8 -7
  20. package/front_end/core/sdk/TargetManager.ts +17 -0
  21. package/front_end/entrypoints/devtools_app/devtools_app.ts +0 -1
  22. package/front_end/entrypoints/main/MainImpl.ts +12 -36
  23. package/front_end/entrypoints/main/SimpleApp.ts +0 -13
  24. package/front_end/entrypoints/main/main-meta.ts +1 -1
  25. package/front_end/foundation/Universe.ts +110 -3
  26. package/front_end/generated/InspectorBackendCommands.ts +5 -1
  27. package/front_end/generated/SupportedCSSProperties.js +2 -6
  28. package/front_end/generated/protocol-mapping.d.ts +8 -0
  29. package/front_end/generated/protocol-proxy-api.d.ts +15 -0
  30. package/front_end/generated/protocol.ts +36 -1
  31. package/front_end/models/ai_assistance/AiConversation.ts +0 -6
  32. package/front_end/models/ai_assistance/agents/NetworkAgent.snapshot.txt +1 -1
  33. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +2 -156
  34. package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +0 -24
  35. package/front_end/models/ai_assistance/agents/StylingAgent.ts +2 -358
  36. package/front_end/models/ai_assistance/ai_assistance.ts +0 -6
  37. package/front_end/models/ai_assistance/contexts/RequestContext.snapshot.txt +0 -1
  38. package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +0 -2
  39. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +1 -14
  40. package/front_end/models/autofill_manager/AutofillManager.ts +1 -2
  41. package/front_end/models/crux-manager/CrUXManager.ts +16 -11
  42. package/front_end/models/javascript_metadata/NativeFunctions.js +1 -1
  43. package/front_end/models/persistence/AutomaticFileSystemManager.ts +14 -13
  44. package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +12 -9
  45. package/front_end/models/persistence/IsolatedFileSystemManager.ts +18 -9
  46. package/front_end/models/project_settings/ProjectSettingsModel.ts +12 -11
  47. package/front_end/models/trace/handlers/ScreenshotsHandler.ts +14 -59
  48. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +3 -29
  49. package/front_end/panels/application/DeviceBoundSessionsView.ts +15 -3
  50. package/front_end/panels/application/FrameDetailsView.ts +2 -1
  51. package/front_end/panels/application/ServiceWorkersView.ts +193 -161
  52. package/front_end/panels/application/serviceWorkersView.css +8 -0
  53. package/front_end/panels/common/CPUThrottlingOption.ts +142 -0
  54. package/front_end/panels/common/ThrottlingUtils.ts +9 -4
  55. package/front_end/panels/common/common.ts +1 -1
  56. package/front_end/panels/console/ConsoleViewMessage.ts +45 -0
  57. package/front_end/panels/elements/ElementsPanel.ts +35 -102
  58. package/front_end/panels/elements/ElementsTreeOutline.ts +0 -4
  59. package/front_end/panels/elements/elements-meta.ts +3 -2
  60. package/front_end/panels/emulation/DeviceModeToolbar.ts +46 -45
  61. package/front_end/panels/mobile_throttling/CalibrationController.ts +6 -5
  62. package/front_end/panels/mobile_throttling/MobileThrottlingSelector.ts +1 -1
  63. package/front_end/panels/mobile_throttling/ThrottlingManager.ts +40 -13
  64. package/front_end/panels/mobile_throttling/ThrottlingPresets.ts +13 -17
  65. package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +15 -13
  66. package/front_end/panels/network/NetworkLogView.ts +0 -9
  67. package/front_end/panels/network/NetworkPanel.ts +1 -63
  68. package/front_end/panels/network/RequestInitiatorView.ts +29 -4
  69. package/front_end/panels/network/components/HeaderSectionRow.css +9 -7
  70. package/front_end/panels/network/components/HeaderSectionRow.ts +20 -1
  71. package/front_end/panels/network/components/RequestHeaderSection.css +5 -3
  72. package/front_end/panels/network/components/RequestHeaderSection.ts +1 -2
  73. package/front_end/panels/network/components/RequestHeadersView.css +1 -1
  74. package/front_end/panels/security/SecurityPanel.ts +36 -23
  75. package/front_end/panels/settings/SettingsScreen.ts +18 -103
  76. package/front_end/panels/settings/settings-meta.ts +0 -24
  77. package/front_end/panels/timeline/TimelineController.ts +3 -2
  78. package/front_end/panels/timeline/TimelinePanel.ts +20 -3
  79. package/front_end/panels/timeline/components/CPUThrottlingSelector.ts +15 -14
  80. package/front_end/panels/timeline/timelineFlamechartPopover.css +2 -0
  81. package/front_end/panels/utils/utils.ts +25 -24
  82. package/front_end/third_party/chromium/README.chromium +1 -1
  83. package/front_end/third_party/puppeteer/README.chromium +2 -2
  84. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +34 -55
  85. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +96 -83
  86. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts +10 -1
  87. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts.map +1 -1
  88. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.js.map +1 -1
  89. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.d.ts.map +1 -1
  90. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js +1 -1
  91. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js.map +1 -1
  92. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/CDPSession.d.ts.map +1 -1
  93. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/CDPSession.js.map +1 -1
  94. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts +3 -2
  95. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts.map +1 -1
  96. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.js.map +1 -1
  97. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Realm.d.ts.map +1 -1
  98. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Realm.js.map +1 -1
  99. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Target.d.ts +1 -1
  100. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Target.js +1 -1
  101. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.d.ts.map +1 -1
  102. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.js.map +1 -1
  103. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.d.ts.map +1 -1
  104. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js +2 -1
  105. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js.map +1 -1
  106. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Realm.d.ts.map +1 -1
  107. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Realm.js.map +1 -1
  108. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts +2 -2
  109. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts.map +1 -1
  110. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js +5 -2
  111. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js.map +1 -1
  112. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js +1 -1
  113. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js.map +1 -1
  114. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.d.ts.map +1 -1
  115. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js +23 -13
  116. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js.map +1 -1
  117. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.d.ts.map +1 -1
  118. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.js +4 -1
  119. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.js.map +1 -1
  120. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Input.js +1 -1
  121. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/LifecycleWatcher.d.ts.map +1 -1
  122. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/LifecycleWatcher.js.map +1 -1
  123. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.d.ts.map +1 -1
  124. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.js.map +1 -1
  125. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.d.ts +3 -41
  126. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.d.ts.map +1 -1
  127. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.js.map +1 -1
  128. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts.map +1 -1
  129. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
  130. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js +4 -2
  131. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js.map +1 -1
  132. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/LaunchOptions.d.ts +5 -0
  133. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/LaunchOptions.d.ts.map +1 -1
  134. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +1 -1
  135. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +1 -1
  136. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.d.ts +1 -1
  137. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.d.ts.map +1 -1
  138. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.js +5 -5
  139. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.js.map +1 -1
  140. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
  141. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
  142. package/front_end/third_party/puppeteer/package/lib/types.d.ts +34 -55
  143. package/front_end/third_party/puppeteer/package/package.json +4 -4
  144. package/front_end/third_party/puppeteer/package/src/api/Browser.ts +13 -1
  145. package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +2 -3
  146. package/front_end/third_party/puppeteer/package/src/api/CDPSession.ts +3 -1
  147. package/front_end/third_party/puppeteer/package/src/api/HTTPResponse.ts +3 -2
  148. package/front_end/third_party/puppeteer/package/src/api/Realm.ts +1 -2
  149. package/front_end/third_party/puppeteer/package/src/api/Target.ts +1 -1
  150. package/front_end/third_party/puppeteer/package/src/api/locators/locators.ts +1 -2
  151. package/front_end/third_party/puppeteer/package/src/bidi/HTTPResponse.ts +3 -1
  152. package/front_end/third_party/puppeteer/package/src/bidi/core/Realm.ts +1 -3
  153. package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +13 -3
  154. package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +1 -1
  155. package/front_end/third_party/puppeteer/package/src/cdp/FrameManager.ts +24 -13
  156. package/front_end/third_party/puppeteer/package/src/cdp/HTTPResponse.ts +4 -1
  157. package/front_end/third_party/puppeteer/package/src/cdp/Input.ts +1 -1
  158. package/front_end/third_party/puppeteer/package/src/cdp/LifecycleWatcher.ts +1 -4
  159. package/front_end/third_party/puppeteer/package/src/cdp/Target.ts +2 -4
  160. package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +7 -76
  161. package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +1 -4
  162. package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +4 -1
  163. package/front_end/third_party/puppeteer/package/src/node/LaunchOptions.ts +5 -0
  164. package/front_end/third_party/puppeteer/package/src/revisions.ts +1 -1
  165. package/front_end/third_party/puppeteer/package/src/util/httpUtils.ts +5 -5
  166. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  167. package/front_end/third_party/puppeteer/third_party/parsel/README.chromium +1 -1
  168. package/front_end/ui/components/dialogs/Dialog.ts +3 -0
  169. package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +0 -7
  170. package/front_end/ui/helpers/OpenInNewTab.ts +15 -7
  171. package/front_end/ui/legacy/TabbedPane.ts +1 -108
  172. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +9 -0
  173. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +172 -123
  174. package/front_end/ui/legacy/components/data_grid/DataGridExporter.ts +89 -0
  175. package/front_end/ui/legacy/components/data_grid/dataGrid.css +10 -0
  176. package/front_end/ui/legacy/components/data_grid/data_grid.ts +3 -1
  177. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +89 -40
  178. package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
  179. package/package.json +1 -1
  180. package/front_end/Images/navigationControls.png +0 -0
  181. package/front_end/Images/navigationControls_2x.png +0 -0
  182. package/front_end/Images/popoverArrows.png +0 -0
  183. package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +0 -746
  184. package/front_end/entrypoints/greendev_floaty/floaty.css +0 -301
  185. package/front_end/entrypoints/greendev_floaty/floaty.html +0 -38
  186. package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +0 -415
  187. package/front_end/models/ai_assistance/agents/GreenDevAgent.ts +0 -834
  188. package/front_end/models/ai_assistance/agents/GreenDevAgentAntigravityCliSocketClient.ts +0 -53
  189. package/front_end/models/ai_assistance/agents/GreenDevAgentGeminiCliSocketClient.ts +0 -117
  190. package/front_end/models/annotations/AnnotationRepository.ts +0 -238
  191. package/front_end/models/annotations/AnnotationType.ts +0 -10
  192. package/front_end/models/annotations/README.md +0 -7
  193. package/front_end/models/annotations/annotations.ts +0 -6
  194. package/front_end/models/greendev/Prototypes.ts +0 -68
  195. package/front_end/models/greendev/README.md +0 -5
  196. package/front_end/models/greendev/greendev.ts +0 -5
  197. package/front_end/panels/common/Annotation.ts +0 -184
  198. package/front_end/panels/common/AnnotationManager.ts +0 -208
  199. package/front_end/panels/common/annotation.css +0 -40
  200. package/front_end/panels/greendev/GreenDevPanel.css +0 -282
  201. package/front_end/panels/greendev/GreenDevPanel.ts +0 -364
  202. package/front_end/panels/greendev/GreenDevShared.ts +0 -13
  203. package/front_end/panels/greendev/greendev-meta.ts +0 -52
  204. package/front_end/panels/greendev/greendev.ts +0 -9
@@ -108,16 +108,9 @@ const UIStrings = {
108
108
  moreOptions: 'More options',
109
109
  /**
110
110
  * @description A menu item in the drop-down box that allows the user to select the zoom level.
111
- * Labels the value which corresponds to the 'fit to window' zoom level, represented by the
112
- * placeholder, which is a number. In the Device Mode Toolbar.
113
- * @example {30.0} PH1
114
- */
115
- fitToWindowPercentage: '{PH1}% (fit to window)',
116
- /**
117
- * @description A checkbox setting that appears in the context menu for the zoom level, in the
118
- * Device Mode Toolbar.
111
+ * Labels the option to automatically fit the preview to the available window space. In the Device Mode Toolbar.
119
112
  */
120
- autoadjustZoom: 'Auto-adjust zoom',
113
+ fitToWindow: 'Fit to window',
121
114
  /**
122
115
  * @description A menu item in the drop-down box that allows the user to select the device pixel
123
116
  * ratio. Labels the default value which varies between device types, represented by the
@@ -236,7 +229,6 @@ const str_ = i18n.i18n.registerUIStrings('panels/emulation/DeviceModeToolbar.ts'
236
229
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
237
230
  const {ifDefined, live} = Directives;
238
231
  const {widget} = UI.Widget;
239
- const {bindToSetting} = UI.UIUtils;
240
232
 
241
233
  export interface DeviceModeOption {
242
234
  device: EmulationModel.EmulatedDevices.EmulatedDevice;
@@ -359,17 +351,11 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
359
351
  title=${i18nString(UIStrings.zoom)}
360
352
  aria-label=${i18nString(UIStrings.zoom)}
361
353
  @change=${input.onScaleChange}
362
- .value=${String(input.scaleOptions.find(o => o.selected)?.value || '')}
354
+ .value=${String(input.scaleOptions.find(o => o.selected)?.value ?? '')}
363
355
  jslog=${VisualLogging.dropDown().track({change: true}).context('scale')}>
364
356
  ${input.scaleOptions.map(o => html`<option value=${o.value} ?selected=${o.selected} jslog=${VisualLogging.item(o.jslogContext).track({click: true})}>${o.title}</option>`)}
365
357
  </select>
366
358
 
367
- <devtools-button .data=${{variant: Buttons.Button.Variant.TOOLBAR, iconName: 'center-focus-weak',
368
- toggledIconName: 'center-focus-weak', toggleType: Buttons.Button.ToggleType.PRIMARY} as Buttons.Button.ButtonData}
369
- class="toolbar-button" title=${i18nString(UIStrings.autoadjustZoom)}
370
- ${bindToSetting(input.autoAdjustScaleSetting)}>
371
- </devtools-button>
372
-
373
359
  <div class="device-mode-empty-toolbar-element"></div>
374
360
 
375
361
  ${input.showDeviceScaleFactorSetting.get() ? html`
@@ -381,7 +367,7 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
381
367
  title=${i18nString(UIStrings.devicePixelRatio)}
382
368
  aria-label=${i18nString(UIStrings.devicePixelRatio)}
383
369
  @change=${input.onDeviceScaleChange}
384
- .value=${String(input.dprOptions.find(o => o.selected)?.value || '')}
370
+ .value=${String(input.dprOptions.find(o => o.selected)?.value ?? '')}
385
371
  jslog=${VisualLogging.dropDown().track({change: true}).context('device-pixel-ratio')}
386
372
  ?disabled=${!input.isResponsive}>
387
373
  ${input.dprOptions.map(o => html`<option value=${o.value} ?selected=${o.selected} jslog=${VisualLogging.item(o.jslogContext).track({click: true})}>${o.title}</option>`)}
@@ -488,6 +474,7 @@ export class DeviceModeToolbar extends UI.Widget.Widget {
488
474
 
489
475
  this.autoAdjustScaleSetting =
490
476
  Common.Settings.Settings.instance().createSetting('emulation.auto-adjust-scale', true);
477
+ this.autoAdjustScaleSetting.addChangeListener(this.requestUpdate, this);
491
478
 
492
479
  this.lastMode = new Map();
493
480
 
@@ -665,39 +652,53 @@ export class DeviceModeToolbar extends UI.Widget.Widget {
665
652
 
666
653
  private getScaleOptions(): Array<{title: string, value: number, selected: boolean, jslogContext: string}> {
667
654
  const values = [0.5, 0.75, 1, 1.25, 1.5, 2];
668
- let fitValue: number|null = null;
669
- if (this.model.type() === EmulationModel.DeviceModeModel.Type.Device) {
670
- fitValue = this.model.fitScale();
671
- const fitValuePct = (fitValue * 100).toFixed(0);
672
- let found = false;
673
- for (let i = 0; i < values.length; ++i) {
674
- if ((values[i] * 100).toFixed(0) === fitValuePct) {
675
- found = true;
676
- values[i] = fitValue;
677
- break;
678
- }
679
- }
680
- if (!found) {
681
- values.push(fitValue);
682
- values.sort((a, b) => a - b);
683
- }
655
+ const isAutoAdjusting = this.autoAdjustScaleSetting.get();
656
+ const currentScale = this.model.scaleSetting().get();
657
+
658
+ if (!isAutoAdjusting && !values.includes(currentScale)) {
659
+ values.push(currentScale);
660
+ values.sort((a, b) => a - b);
684
661
  }
685
662
 
686
- const currentScale = this.model.scaleSetting().get();
687
- return values.map(value => {
688
- let title = (value * 100).toFixed(0) + '%';
689
- let jslogContext = title;
690
- if (value === fitValue) {
691
- title = i18nString(UIStrings.fitToWindowPercentage, {PH1: (value * 100).toFixed(0)});
692
- jslogContext = 'fit-to-window';
693
- }
694
- return {title, value, selected: currentScale === value, jslogContext};
695
- });
663
+ const options: Array<{title: string, value: number, selected: boolean, jslogContext: string}> = [
664
+ {
665
+ title: i18nString(UIStrings.fitToWindow),
666
+ value: 0,
667
+ selected: isAutoAdjusting,
668
+ jslogContext: 'fit-to-window',
669
+ },
670
+ ];
671
+
672
+ for (const value of values) {
673
+ const title = (value * 100).toFixed(0) + '%';
674
+ options.push({
675
+ title,
676
+ value,
677
+ selected: !isAutoAdjusting && currentScale === value,
678
+ jslogContext: title,
679
+ });
680
+ }
681
+ return options;
696
682
  }
697
683
 
698
684
  private onScaleChange(event: Event): void {
699
685
  const value = Number((event.target as HTMLSelectElement).value);
700
- this.model.scaleSetting().set(value);
686
+ if (value === 0) {
687
+ this.autoAdjustScaleSetting.set(true);
688
+ if (this.model.type() === EmulationModel.DeviceModeModel.Type.Responsive) {
689
+ const appliedSize = this.model.appliedDeviceSize();
690
+ this.model.setSizeAndScaleToFit(appliedSize.width, appliedSize.height);
691
+ } else {
692
+ const device = this.model.device();
693
+ const mode = this.model.mode();
694
+ if (device && mode) {
695
+ this.model.emulate(EmulationModel.DeviceModeModel.Type.Device, device, mode, undefined);
696
+ }
697
+ }
698
+ } else {
699
+ this.autoAdjustScaleSetting.set(false);
700
+ this.model.scaleSetting().set(value);
701
+ }
701
702
  }
702
703
 
703
704
  private getDeviceScaleFactorOptions():
@@ -4,6 +4,7 @@
4
4
 
5
5
  import * as i18n from '../../core/i18n/i18n.js';
6
6
  import * as SDK from '../../core/sdk/sdk.js';
7
+ import * as PanelsCommon from '../common/common.js';
7
8
 
8
9
  const UIStrings = {
9
10
  /**
@@ -55,7 +56,7 @@ export class CalibrationController {
55
56
  #runtimeModel!: SDK.RuntimeModel.RuntimeModel;
56
57
  #emulationModel!: SDK.EmulationModel.EmulationModel;
57
58
  #originalUrl!: string;
58
- #result?: SDK.CPUThrottlingManager.CalibratedCPUThrottling;
59
+ #result?: PanelsCommon.CPUThrottlingOption.CalibratedCPUThrottling;
59
60
  #state: 'idle'|'running'|'aborting' = 'idle';
60
61
 
61
62
  /**
@@ -220,14 +221,14 @@ export class CalibrationController {
220
221
  if (actualScore < midScore) {
221
222
  if (actualScore < lowScore) {
222
223
  this.#result = {
223
- low: SDK.CPUThrottlingManager.CalibrationError.DEVICE_TOO_WEAK,
224
- mid: SDK.CPUThrottlingManager.CalibrationError.DEVICE_TOO_WEAK,
224
+ low: PanelsCommon.CPUThrottlingOption.CalibrationError.DEVICE_TOO_WEAK,
225
+ mid: PanelsCommon.CPUThrottlingOption.CalibrationError.DEVICE_TOO_WEAK,
225
226
  };
226
227
  return;
227
228
  }
228
229
 
229
230
  // Can still emulate the low-end device.
230
- this.#result = {mid: SDK.CPUThrottlingManager.CalibrationError.DEVICE_TOO_WEAK};
231
+ this.#result = {mid: PanelsCommon.CPUThrottlingOption.CalibrationError.DEVICE_TOO_WEAK};
231
232
  isHalfwayDone = true;
232
233
  }
233
234
  }
@@ -258,7 +259,7 @@ export class CalibrationController {
258
259
  }
259
260
  }
260
261
 
261
- result(): SDK.CPUThrottlingManager.CalibratedCPUThrottling|undefined {
262
+ result(): PanelsCommon.CPUThrottlingOption.CalibratedCPUThrottling|undefined {
262
263
  return this.#result;
263
264
  }
264
265
 
@@ -70,7 +70,7 @@ export class MobileThrottlingSelector {
70
70
  this.populateOptions();
71
71
 
72
72
  const networkConditions = SDK.NetworkManager.MultitargetNetworkManager.instance().networkConditions();
73
- const cpuThrottlingOption = SDK.CPUThrottlingManager.CPUThrottlingManager.instance().cpuThrottlingOption();
73
+ const cpuThrottlingOption = throttlingManager().cpuThrottlingOption();
74
74
  for (let index = 0; index < this.options.length; ++index) {
75
75
  const option = this.options[index];
76
76
  if (option && 'network' in option && option.network === networkConditions &&
@@ -11,6 +11,7 @@ import {Icon} from '../../ui/kit/kit.js';
11
11
  import * as UI from '../../ui/legacy/legacy.js';
12
12
  import {html, render} from '../../ui/lit/lit.js';
13
13
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
14
+ import * as PanelsCommon from '../common/common.js';
14
15
 
15
16
  import {MobileThrottlingSelector} from './MobileThrottlingSelector.js';
16
17
  import {
@@ -22,7 +23,7 @@ import {
22
23
 
23
24
  export interface CPUThrottlingSelectorWrapper {
24
25
  control: UI.Toolbar.ToolbarComboBox;
25
- updateRecommendedOption(recommendedOption: SDK.CPUThrottlingManager.CPUThrottlingOption|null): void;
26
+ updateRecommendedOption(recommendedOption: PanelsCommon.CPUThrottlingOption.CPUThrottlingOption|null): void;
26
27
  }
27
28
 
28
29
  const UIStrings = {
@@ -109,15 +110,17 @@ class PromiseQueue<T> {
109
110
 
110
111
  export class ThrottlingManager extends Common.ObjectWrapper.ObjectWrapper<ThrottlingManager.EventTypes> {
111
112
  private readonly cpuThrottlingControls: Set<UI.Toolbar.ToolbarComboBox>;
112
- private readonly cpuThrottlingOptions: SDK.CPUThrottlingManager.CPUThrottlingOption[];
113
+ private readonly cpuThrottlingOptions: PanelsCommon.CPUThrottlingOption.CPUThrottlingOption[];
113
114
  private readonly customNetworkConditionsSetting: Common.Settings.Setting<SDK.NetworkManager.Conditions[]>;
114
115
  private readonly currentNetworkThrottlingConditionKeySetting:
115
116
  Common.Settings.Setting<SDK.NetworkManager.ThrottlingConditionKey>;
116
117
  private readonly calibratedCpuThrottlingSetting:
117
- Common.Settings.Setting<SDK.CPUThrottlingManager.CalibratedCPUThrottling>;
118
+ Common.Settings.Setting<PanelsCommon.CPUThrottlingOption.CalibratedCPUThrottling>;
118
119
  private lastNetworkThrottlingConditions!: SDK.NetworkManager.Conditions;
119
120
  private readonly cpuThrottlingManager: SDK.CPUThrottlingManager.CPUThrottlingManager;
120
121
  #hardwareConcurrencyOverrideEnabled = false;
122
+ #currentCPUThrottlingOption: PanelsCommon.CPUThrottlingOption.CPUThrottlingOption =
123
+ PanelsCommon.CPUThrottlingOption.NoThrottlingOption;
121
124
  readonly #emulationQueue = new PromiseQueue<void>();
122
125
  get hardwareConcurrencyOverrideEnabled(): boolean {
123
126
  return this.#hardwareConcurrencyOverrideEnabled;
@@ -136,8 +139,9 @@ export class ThrottlingManager extends Common.ObjectWrapper.ObjectWrapper<Thrott
136
139
  this.currentNetworkThrottlingConditionKeySetting = SDK.NetworkManager.activeNetworkThrottlingKeySetting();
137
140
 
138
141
  this.calibratedCpuThrottlingSetting =
139
- Common.Settings.Settings.instance().createSetting<SDK.CPUThrottlingManager.CalibratedCPUThrottling>(
142
+ Common.Settings.Settings.instance().createSetting<PanelsCommon.CPUThrottlingOption.CalibratedCPUThrottling>(
140
143
  'calibrated-cpu-throttling', {}, Common.Settings.SettingStorageType.GLOBAL);
144
+ this.calibratedCpuThrottlingSetting.addChangeListener(this.onCalibratedSettingChanged, this);
141
145
 
142
146
  SDK.NetworkManager.MultitargetNetworkManager.instance().addEventListener(
143
147
  SDK.NetworkManager.MultitargetNetworkManager.Events.CONDITIONS_CHANGED, () => {
@@ -250,23 +254,46 @@ export class ThrottlingManager extends Common.ObjectWrapper.ObjectWrapper<Thrott
250
254
 
251
255
  private updatePanelIcon(): void {
252
256
  const warnings = [];
253
- if (this.cpuThrottlingManager.cpuThrottlingRate() !== SDK.CPUThrottlingManager.CPUThrottlingRates.NO_THROTTLING) {
257
+ if (this.cpuThrottlingManager.cpuThrottlingRate() !==
258
+ PanelsCommon.CPUThrottlingOption.CPUThrottlingRates.NO_THROTTLING) {
254
259
  warnings.push(i18nString(UIStrings.cpuThrottlingIsEnabled));
255
260
  }
256
261
  UI.InspectorView.InspectorView.instance().setPanelWarnings('timeline', warnings);
257
262
  }
258
263
 
259
- setCPUThrottlingOption(option: SDK.CPUThrottlingManager.CPUThrottlingOption): void {
260
- // This will transitively call onCPUThrottlingRateChangedOnSDK.
261
- this.cpuThrottlingManager.setCPUThrottlingOption(option);
264
+ cpuThrottlingOption(): PanelsCommon.CPUThrottlingOption.CPUThrottlingOption {
265
+ return this.#currentCPUThrottlingOption;
266
+ }
267
+
268
+ setCPUThrottlingOption(option: PanelsCommon.CPUThrottlingOption.CPUThrottlingOption): void {
269
+ if (this.#currentCPUThrottlingOption === option) {
270
+ return;
271
+ }
272
+ this.#currentCPUThrottlingOption = option;
273
+ this.cpuThrottlingManager.setCPUThrottlingRate(option.rate());
274
+ }
275
+
276
+ private onCalibratedSettingChanged(): void {
277
+ if (!this.#currentCPUThrottlingOption.calibratedDeviceType) {
278
+ return;
279
+ }
280
+ const rate = this.#currentCPUThrottlingOption.rate();
281
+ if (rate === 0) {
282
+ this.setCPUThrottlingOption(PanelsCommon.CPUThrottlingOption.NoThrottlingOption);
283
+ return;
284
+ }
285
+ this.cpuThrottlingManager.setCPUThrottlingRate(rate);
262
286
  }
263
287
 
264
288
  onCPUThrottlingRateChangedOnSDK(rate: number): void {
265
- if (rate !== SDK.CPUThrottlingManager.CPUThrottlingRates.NO_THROTTLING) {
289
+ if (rate !== PanelsCommon.CPUThrottlingOption.CPUThrottlingRates.NO_THROTTLING) {
266
290
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.CpuThrottlingEnabled);
267
291
  }
268
292
 
269
- const index = this.cpuThrottlingOptions.indexOf(this.cpuThrottlingManager.cpuThrottlingOption());
293
+ const option = PanelsCommon.CPUThrottlingOption.determineOptionFromRate(rate, this.#currentCPUThrottlingOption);
294
+ this.#currentCPUThrottlingOption = option;
295
+
296
+ const index = this.cpuThrottlingOptions.indexOf(option);
270
297
  for (const control of this.cpuThrottlingControls) {
271
298
  control.setSelectedIndex(index);
272
299
  }
@@ -282,7 +309,7 @@ export class ThrottlingManager extends Common.ObjectWrapper.ObjectWrapper<Thrott
282
309
 
283
310
  const optionSelected = (): void => {
284
311
  if (control.selectedIndex() === control.options().length - 1) {
285
- const index = this.cpuThrottlingOptions.indexOf(this.cpuThrottlingManager.cpuThrottlingOption());
312
+ const index = this.cpuThrottlingOptions.indexOf(this.#currentCPUThrottlingOption);
286
313
  control.setSelectedIndex(index);
287
314
  void Common.Revealer.reveal(this.calibratedCpuThrottlingSetting);
288
315
  } else {
@@ -293,7 +320,7 @@ export class ThrottlingManager extends Common.ObjectWrapper.ObjectWrapper<Thrott
293
320
  const control =
294
321
  new UI.Toolbar.ToolbarComboBox(optionSelected, i18nString(UIStrings.cpuThrottling), '', 'cpu-throttling');
295
322
  this.cpuThrottlingControls.add(control);
296
- const currentOption = this.cpuThrottlingManager.cpuThrottlingOption();
323
+ const currentOption = this.#currentCPUThrottlingOption;
297
324
 
298
325
  const optionEls: HTMLOptionElement[] = [];
299
326
  const options = this.cpuThrottlingOptions;
@@ -317,7 +344,7 @@ export class ThrottlingManager extends Common.ObjectWrapper.ObjectWrapper<Thrott
317
344
 
318
345
  return {
319
346
  control,
320
- updateRecommendedOption(recommendedOption: SDK.CPUThrottlingManager.CPUThrottlingOption|null) {
347
+ updateRecommendedOption(recommendedOption: PanelsCommon.CPUThrottlingOption.CPUThrottlingOption|null) {
321
348
  for (let i = 0; i < optionEls.length - 1; i++) {
322
349
  const option = options[i];
323
350
  optionEls[i].text = option === recommendedOption ?
@@ -4,6 +4,7 @@
4
4
 
5
5
  import * as i18n from '../../core/i18n/i18n.js';
6
6
  import * as SDK from '../../core/sdk/sdk.js';
7
+ import * as PanelsCommon from '../common/common.js';
7
8
 
8
9
  const UIStrings = {
9
10
  /**
@@ -61,7 +62,7 @@ export class ThrottlingPresets {
61
62
  title,
62
63
  description: i18nString(UIStrings.noThrottling),
63
64
  network: SDK.NetworkManager.NoThrottlingConditions,
64
- cpuThrottlingOption: SDK.CPUThrottlingManager.NoThrottlingOption,
65
+ cpuThrottlingOption: PanelsCommon.CPUThrottlingOption.NoThrottlingOption,
65
66
  jslogContext: 'no-throttling',
66
67
  };
67
68
  }
@@ -74,15 +75,16 @@ export class ThrottlingPresets {
74
75
  title,
75
76
  description: i18nString(UIStrings.noInternetConnectivity),
76
77
  network: SDK.NetworkManager.OfflineConditions,
77
- cpuThrottlingOption: SDK.CPUThrottlingManager.NoThrottlingOption,
78
+ cpuThrottlingOption: PanelsCommon.CPUThrottlingOption.NoThrottlingOption,
78
79
  jslogContext: 'offline',
79
80
  };
80
81
  }
81
82
 
82
83
  static getLowEndMobileConditions(): Conditions {
83
- const useCalibrated = SDK.CPUThrottlingManager.CalibratedLowTierMobileThrottlingOption.rate() !== 0;
84
- const cpuThrottlingOption = useCalibrated ? SDK.CPUThrottlingManager.CalibratedLowTierMobileThrottlingOption :
85
- SDK.CPUThrottlingManager.LowTierThrottlingOption;
84
+ const useCalibrated = PanelsCommon.CPUThrottlingOption.CalibratedLowTierMobileThrottlingOption.rate() !== 0;
85
+ const cpuThrottlingOption = useCalibrated ?
86
+ PanelsCommon.CPUThrottlingOption.CalibratedLowTierMobileThrottlingOption :
87
+ PanelsCommon.CPUThrottlingOption.LowTierThrottlingOption;
86
88
  const description = useCalibrated ?
87
89
  i18nString(UIStrings.slowGXCpuSlowdownCalibrated, {PH1: cpuThrottlingOption.rate()}) :
88
90
  i18nString(UIStrings.slowGXCpuSlowdown);
@@ -97,9 +99,10 @@ export class ThrottlingPresets {
97
99
  }
98
100
 
99
101
  static getMidTierMobileConditions(): Conditions {
100
- const useCalibrated = SDK.CPUThrottlingManager.CalibratedMidTierMobileThrottlingOption.rate() !== 0;
101
- const cpuThrottlingOption = useCalibrated ? SDK.CPUThrottlingManager.CalibratedMidTierMobileThrottlingOption :
102
- SDK.CPUThrottlingManager.MidTierThrottlingOption;
102
+ const useCalibrated = PanelsCommon.CPUThrottlingOption.CalibratedMidTierMobileThrottlingOption.rate() !== 0;
103
+ const cpuThrottlingOption = useCalibrated ?
104
+ PanelsCommon.CPUThrottlingOption.CalibratedMidTierMobileThrottlingOption :
105
+ PanelsCommon.CPUThrottlingOption.MidTierThrottlingOption;
103
106
  const description = useCalibrated ?
104
107
  i18nString(UIStrings.fastGXCpuSlowdownCalibrated, {PH1: cpuThrottlingOption.rate()}) :
105
108
  i18nString(UIStrings.fastGXCpuSlowdown);
@@ -142,14 +145,7 @@ export class ThrottlingPresets {
142
145
  SDK.NetworkManager.OfflineConditions,
143
146
  ];
144
147
 
145
- static cpuThrottlingPresets: SDK.CPUThrottlingManager.CPUThrottlingOption[] = [
146
- SDK.CPUThrottlingManager.NoThrottlingOption,
147
- SDK.CPUThrottlingManager.MidTierThrottlingOption,
148
- SDK.CPUThrottlingManager.LowTierThrottlingOption,
149
- SDK.CPUThrottlingManager.ExtraSlowThrottlingOption,
150
- SDK.CPUThrottlingManager.CalibratedLowTierMobileThrottlingOption,
151
- SDK.CPUThrottlingManager.CalibratedMidTierMobileThrottlingOption,
152
- ];
148
+ static cpuThrottlingPresets = PanelsCommon.CPUThrottlingOption.cpuThrottlingPresets;
153
149
  }
154
150
 
155
151
  // @ts-expect-error exported for Tests.js
@@ -161,7 +157,7 @@ export interface Conditions {
161
157
  title: string;
162
158
  description: string;
163
159
  network: SDK.NetworkManager.Conditions;
164
- cpuThrottlingOption: SDK.CPUThrottlingManager.CPUThrottlingOption;
160
+ cpuThrottlingOption: PanelsCommon.CPUThrottlingOption.CPUThrottlingOption;
165
161
  jslogContext?: string;
166
162
  }
167
163
 
@@ -12,6 +12,7 @@ import * as Buttons from '../../ui/components/buttons/buttons.js';
12
12
  import {type Card, createIcon} from '../../ui/kit/kit.js';
13
13
  import * as UI from '../../ui/legacy/legacy.js';
14
14
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
15
+ import * as PanelsCommon from '../common/common.js';
15
16
 
16
17
  import {CalibrationController} from './CalibrationController.js';
17
18
  import {ThrottlingPresets} from './ThrottlingPresets.js';
@@ -214,7 +215,7 @@ function createComputePressurePromise(): Promise<{state: string}> {
214
215
  export class CPUThrottlingCard {
215
216
  element: Card;
216
217
 
217
- private readonly setting: Common.Settings.Setting<SDK.CPUThrottlingManager.CalibratedCPUThrottling>;
218
+ private readonly setting: Common.Settings.Setting<PanelsCommon.CPUThrottlingOption.CalibratedCPUThrottling>;
218
219
  private computePressurePromise?: ReturnType<typeof createComputePressurePromise>;
219
220
  private controller?: CalibrationController;
220
221
 
@@ -230,8 +231,9 @@ export class CPUThrottlingCard {
230
231
  private warnings: string[] = [];
231
232
 
232
233
  constructor() {
233
- this.setting = Common.Settings.Settings.instance().createSetting<SDK.CPUThrottlingManager.CalibratedCPUThrottling>(
234
- 'calibrated-cpu-throttling', {}, Common.Settings.SettingStorageType.GLOBAL);
234
+ this.setting =
235
+ Common.Settings.Settings.instance().createSetting<PanelsCommon.CPUThrottlingOption.CalibratedCPUThrottling>(
236
+ 'calibrated-cpu-throttling', {}, Common.Settings.SettingStorageType.GLOBAL);
235
237
 
236
238
  this.element = document.createElement('devtools-card');
237
239
  this.element.heading = i18nString(UIStrings.cpuThrottlingPresets);
@@ -331,13 +333,13 @@ export class CPUThrottlingCard {
331
333
  this.progress.style.display = '';
332
334
  }
333
335
 
334
- const resultToString = (result: number|SDK.CPUThrottlingManager.CalibrationError|undefined): string => {
336
+ const resultToString = (result: number|PanelsCommon.CPUThrottlingOption.CalibrationError|undefined): string => {
335
337
  if (result === undefined) {
336
338
  return i18nString(UIStrings.needsCalibration);
337
339
  }
338
340
 
339
341
  if (typeof result === 'string') {
340
- return SDK.CPUThrottlingManager.calibrationErrorToString(result);
342
+ return PanelsCommon.CPUThrottlingOption.calibrationErrorToString(result);
341
343
  }
342
344
 
343
345
  // Shouldn't happen, but let's not throw an error (.toFixed) if the setting
@@ -349,15 +351,15 @@ export class CPUThrottlingCard {
349
351
  return i18nString(UIStrings.dSlowdown, {PH1: result.toFixed(1)});
350
352
  };
351
353
 
352
- const setPresetResult =
353
- (element: HTMLElement|null, result: number|SDK.CPUThrottlingManager.CalibrationError|undefined): void => {
354
- if (!element) {
355
- throw new Error('expected HTMLElement');
356
- }
354
+ const setPresetResult = (element: HTMLElement|null,
355
+ result: number|PanelsCommon.CPUThrottlingOption.CalibrationError|undefined): void => {
356
+ if (!element) {
357
+ throw new Error('expected HTMLElement');
358
+ }
357
359
 
358
- element.textContent = resultToString(result);
359
- element.classList.toggle('not-calibrated', result === undefined);
360
- };
360
+ element.textContent = resultToString(result);
361
+ element.classList.toggle('not-calibrated', result === undefined);
362
+ };
361
363
 
362
364
  setPresetResult(this.lowTierMobileDeviceEl.querySelector('.cpu-preset-result'), result.low);
363
365
  setPresetResult(this.midTierMobileDeviceEl.querySelector('.cpu-preset-result'), result.mid);
@@ -41,7 +41,6 @@ import * as i18n from '../../core/i18n/i18n.js';
41
41
  import * as Platform from '../../core/platform/platform.js';
42
42
  import * as SDK from '../../core/sdk/sdk.js';
43
43
  import * as Protocol from '../../generated/protocol.js';
44
- import * as Annotations from '../../models/annotations/annotations.js';
45
44
  import * as Bindings from '../../models/bindings/bindings.js';
46
45
  import * as HAR from '../../models/har/har.js';
47
46
  import * as Logs from '../../models/logs/logs.js';
@@ -998,14 +997,6 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
998
997
  return this.summaryToolbarInternal;
999
998
  }
1000
999
 
1001
- getDataGrid(): DataGrid.SortableDataGrid.SortableDataGrid<NetworkNode>|null {
1002
- if (Annotations.AnnotationRepository.annotationsEnabled()) {
1003
- return this.dataGrid;
1004
- }
1005
-
1006
- return null;
1007
- }
1008
-
1009
1000
  modelAdded(networkManager: SDK.NetworkManager.NetworkManager): void {
1010
1001
  // TODO(allada) Remove dependency on networkManager and instead use NetworkLog and PageLoad for needed data.
1011
1002
  const target = networkManager.target();
@@ -40,12 +40,11 @@ import * as Host from '../../core/host/host.js';
40
40
  import * as i18n from '../../core/i18n/i18n.js';
41
41
  import * as Platform from '../../core/platform/platform.js';
42
42
  import * as SDK from '../../core/sdk/sdk.js';
43
- import * as Annotations from '../../models/annotations/annotations.js';
44
43
  import * as Logs from '../../models/logs/logs.js';
45
44
  import * as NetworkTimeCalculator from '../../models/network_time_calculator/network_time_calculator.js';
46
45
  import * as Trace from '../../models/trace/trace.js';
47
46
  import * as Workspace from '../../models/workspace/workspace.js';
48
- import * as PanelCommon from '../../panels/common/common.js';
47
+ import type * as PanelCommon from '../../panels/common/common.js';
49
48
  import * as NetworkForward from '../../panels/network/forward/forward.js';
50
49
  import * as Tracing from '../../services/tracing/tracing.js';
51
50
  import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';
@@ -340,14 +339,6 @@ export class NetworkPanel extends UI.Panel.Panel implements
340
339
  HTMLElement);
341
340
  panel.element.appendChild(this.fileSelectorElement);
342
341
 
343
- if (Annotations.AnnotationRepository.annotationsEnabled()) {
344
- const dataGrid = this.networkLogView.getDataGrid();
345
- if (dataGrid) {
346
- PanelCommon.AnnotationManager.instance().initializePlacementForAnnotationType(
347
- Annotations.AnnotationType.NETWORK_REQUEST, this.resolveInitialState.bind(this), dataGrid.scrollContainer);
348
- }
349
- }
350
-
351
342
  this.detailsWidget = new UI.Widget.VBox();
352
343
  this.detailsWidget.element.classList.add('network-details-view');
353
344
  this.splitWidget.setMainWidget(this.detailsWidget);
@@ -661,11 +652,6 @@ export class NetworkPanel extends UI.Panel.Panel implements
661
652
 
662
653
  // Record the network tool load time after the panel has loaded.
663
654
  UI.UIUserMetrics.UIUserMetrics.instance().panelLoaded('network', 'DevTools.Launch.Network');
664
-
665
- if (Annotations.AnnotationRepository.annotationsEnabled()) {
666
- void PanelCommon.AnnotationManager.instance().resolveAnnotationsOfType(
667
- Annotations.AnnotationType.NETWORK_REQUEST);
668
- }
669
655
  }
670
656
 
671
657
  override willHide(): void {
@@ -765,47 +751,6 @@ export class NetworkPanel extends UI.Panel.Panel implements
765
751
  return this.networkItemView;
766
752
  }
767
753
 
768
- async resolveInitialState(
769
- parentElement: Element, reveal: boolean, lookupId: string,
770
- anchor?: SDK.DOMModel.DOMNode|SDK.NetworkRequest.NetworkRequest): Promise<{x: number, y: number}|null> {
771
- let request = anchor as SDK.NetworkRequest.NetworkRequest;
772
- if (!this.isShowing()) {
773
- return null;
774
- }
775
-
776
- if (!request) {
777
- const networkManager =
778
- SDK.TargetManager.TargetManager.instance().scopeTarget()?.model(SDK.NetworkManager.NetworkManager);
779
- if (!networkManager) {
780
- return null;
781
- }
782
-
783
- const requests = Logs.NetworkLog.NetworkLog.instance().requestsForId(lookupId);
784
- if (requests.length === 0) {
785
- console.warn('Network Request list is empty');
786
- return null;
787
- }
788
- request = requests[0];
789
- }
790
-
791
- if (reveal) {
792
- await Common.Revealer.reveal(request);
793
- await this.selectAndActivateRequest(request);
794
- }
795
-
796
- const requestNode = this.networkLogView?.nodeForRequest(request);
797
- if (requestNode?.element()) {
798
- const targetRect = requestNode.element().getBoundingClientRect();
799
- const parentRect = parentElement.getBoundingClientRect();
800
- const relativeX = 4;
801
- const relativeY = targetRect.y - parentRect.y + parentElement.scrollTop;
802
- return {x: relativeX, y: relativeY};
803
- }
804
-
805
- console.warn('Could not find element for request:', anchor);
806
- return null;
807
- }
808
-
809
754
  private updateUI(): void {
810
755
  if (this.detailsWidget) {
811
756
  this.detailsWidget.element.classList.toggle(
@@ -905,13 +850,6 @@ export class NetworkPanel extends UI.Panel.Panel implements
905
850
  Trace.Types.Timing.Milli(this.calculator.minimumBoundary() * 1000),
906
851
  Trace.Types.Timing.Milli(this.calculator.maximumBoundary() * 1000));
907
852
  this.networkOverview.updateRequest(request);
908
-
909
- if (Annotations.AnnotationRepository.annotationsEnabled()) {
910
- requestAnimationFrame(() => {
911
- void PanelCommon.AnnotationManager.instance().resolveAnnotationsOfType(
912
- Annotations.AnnotationType.NETWORK_REQUEST);
913
- });
914
- }
915
853
  }
916
854
 
917
855
  resolveLocation(locationName: string): UI.View.ViewLocation|null {