chrome-devtools-frontend 1.0.1695017 → 1.0.1696961

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 (247) hide show
  1. package/eslint.config.mjs +4 -1
  2. package/front_end/core/common/Base64.ts +14 -4
  3. package/front_end/core/common/Gzip.ts +1 -1
  4. package/front_end/core/common/Object.ts +0 -1
  5. package/front_end/core/platform/Size.ts +43 -0
  6. package/front_end/core/platform/api/HostRuntime.ts +14 -0
  7. package/front_end/core/platform/browser/HostRuntime.ts +66 -0
  8. package/front_end/core/platform/node/HostRuntime.ts +12 -3
  9. package/front_end/core/platform/platform.ts +1 -0
  10. package/front_end/core/sdk/AccessibilityModel.ts +2 -2
  11. package/front_end/core/sdk/CSSMatchedStyles.ts +2 -0
  12. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +29 -0
  13. package/front_end/core/sdk/CSSStyleSheetHeader.ts +2 -2
  14. package/front_end/core/sdk/ConsoleModel.ts +3 -3
  15. package/front_end/core/sdk/DOMModel.ts +10 -6
  16. package/front_end/core/sdk/DebuggerModel.ts +6 -0
  17. package/front_end/core/sdk/NetworkRequest.ts +19 -19
  18. package/front_end/core/sdk/RuntimeModel.ts +5 -0
  19. package/front_end/core/sdk/Script.ts +2 -2
  20. package/front_end/core/sdk/ServerTiming.ts +6 -6
  21. package/front_end/core/sdk/SourceMap.ts +112 -14
  22. package/front_end/core/sdk/SourceMapRangeMappings.ts +43 -0
  23. package/front_end/core/sdk/SourceMapScopeChainEntry.ts +15 -10
  24. package/front_end/core/sdk/SourceMapScopesInfo.ts +92 -10
  25. package/front_end/core/sdk/sdk.ts +2 -0
  26. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +1 -1
  27. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +6 -6
  28. package/front_end/entrypoints/main/MainImpl.ts +1 -1
  29. package/front_end/generated/InspectorBackendCommands.ts +6 -3
  30. package/front_end/generated/protocol-mapping.d.ts +7 -0
  31. package/front_end/generated/protocol-proxy-api.d.ts +5 -0
  32. package/front_end/generated/protocol.ts +36 -3
  33. package/front_end/models/ai_assistance/AiAgent2.ts +27 -27
  34. package/front_end/models/ai_assistance/agents/AiAgent.ts +4 -0
  35. package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +2 -2
  36. package/front_end/models/ai_assistance/contexts/AccessibilityContext.ts +1 -0
  37. package/front_end/models/ai_assistance/contexts/DOMNodeContext.ts +5 -4
  38. package/front_end/models/ai_assistance/contexts/FileContext.ts +1 -0
  39. package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +1 -0
  40. package/front_end/models/ai_assistance/contexts/RequestContext.ts +1 -0
  41. package/front_end/models/ai_assistance/contexts/StorageContext.ts +1 -0
  42. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +5 -5
  43. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +6 -6
  44. package/front_end/models/ai_assistance/tools/GetElementAccessibilityDetails.ts +5 -8
  45. package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +4 -8
  46. package/front_end/models/ai_assistance/tools/GetSourceContent.ts +7 -5
  47. package/front_end/models/ai_assistance/tools/GetStyles.ts +10 -6
  48. package/front_end/models/ai_assistance/tools/ListSources.ts +26 -7
  49. package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +5 -10
  50. package/front_end/models/ai_assistance/tools/Tool.ts +8 -1
  51. package/front_end/models/bindings/FileUtils.ts +18 -40
  52. package/front_end/models/bindings/TempFile.ts +5 -12
  53. package/front_end/models/comment_manager/CommentManager.ts +30 -6
  54. package/front_end/models/crux-manager/CrUXManager.ts +8 -5
  55. package/front_end/models/emulation/DeviceModeModel.ts +55 -105
  56. package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +1 -1
  57. package/front_end/models/issues_manager/CookieIssue.ts +1 -1
  58. package/front_end/models/issues_manager/DeprecationIssue.ts +2 -2
  59. package/front_end/models/javascript_metadata/NativeFunctions.ts +1 -5
  60. package/front_end/models/live-metrics/LiveMetrics.ts +1 -1
  61. package/front_end/models/persistence/IsolatedFileSystem.ts +16 -23
  62. package/front_end/models/trace/insights/DuplicatedJavaScript.ts +1 -1
  63. package/front_end/models/trace/insights/INPBreakdown.ts +1 -1
  64. package/front_end/models/trace/insights/ImageDelivery.ts +3 -3
  65. package/front_end/models/trace/insights/LCPDiscovery.ts +2 -2
  66. package/front_end/models/trace/insights/NetworkDependencyTree.ts +3 -3
  67. package/front_end/models/trace/insights/Viewport.ts +1 -1
  68. package/front_end/models/trace/types/Overlays.ts +2 -2
  69. package/front_end/panels/accessibility/AccessibilityNodeView.ts +2 -2
  70. package/front_end/panels/accessibility/AccessibilitySubPane.ts +0 -1
  71. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +74 -18
  72. package/front_end/panels/ai_assistance/components/AIv2MarkdownRenderer.ts +14 -3
  73. package/front_end/panels/ai_assistance/components/ChatInput.ts +1 -1
  74. package/front_end/panels/ai_assistance/components/ChatMessage.ts +1 -1
  75. package/front_end/panels/animation/AnimationUI.ts +1 -1
  76. package/front_end/panels/application/AppManifestView.ts +9 -11
  77. package/front_end/panels/application/ApplicationPanelSidebar.ts +9 -9
  78. package/front_end/panels/application/BackgroundServiceView.ts +1 -1
  79. package/front_end/panels/application/CookieItemsView.ts +1 -1
  80. package/front_end/panels/application/DOMStorageItemsView.ts +1 -1
  81. package/front_end/panels/application/DeviceBoundSessionsView.ts +2 -2
  82. package/front_end/panels/application/FrameDetailsView.ts +5 -5
  83. package/front_end/panels/application/IndexedDBViews.ts +2 -2
  84. package/front_end/panels/application/KeyValueStorageItemsView.ts +1 -2
  85. package/front_end/panels/application/ReportingApiView.ts +1 -1
  86. package/front_end/panels/application/ServiceWorkerCacheTreeElement.ts +1 -1
  87. package/front_end/panels/application/ServiceWorkersView.ts +1 -1
  88. package/front_end/panels/application/StorageBucketsTreeElement.ts +1 -1
  89. package/front_end/panels/application/WebMCPView.ts +1 -1
  90. package/front_end/panels/application/components/AdsView.ts +136 -7
  91. package/front_end/panels/application/components/BackForwardCacheStrings.ts +116 -117
  92. package/front_end/panels/application/components/BackForwardCacheView.ts +7 -7
  93. package/front_end/panels/application/components/BounceTrackingMitigationsView.ts +2 -2
  94. package/front_end/panels/application/components/PermissionsPolicySection.ts +2 -2
  95. package/front_end/panels/application/components/ProtocolHandlersView.ts +1 -1
  96. package/front_end/panels/application/components/ReportsGrid.ts +1 -1
  97. package/front_end/panels/application/components/StorageMetadataView.ts +1 -1
  98. package/front_end/panels/application/components/TrustTokensView.ts +3 -3
  99. package/front_end/panels/application/components/adScriptsTable.css +22 -0
  100. package/front_end/panels/application/preloading/PreloadingView.ts +20 -22
  101. package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +9 -9
  102. package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +31 -33
  103. package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +23 -23
  104. package/front_end/panels/application/preloading/components/PreloadingGrid.ts +4 -4
  105. package/front_end/panels/application/preloading/components/PreloadingString.ts +161 -161
  106. package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +2 -6
  107. package/front_end/panels/application/preloading/components/RuleSetGrid.ts +8 -8
  108. package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +32 -32
  109. package/front_end/panels/application/resourcesPanel.css +17 -17
  110. package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +1 -1
  111. package/front_end/panels/changes/ChangesView.ts +1 -1
  112. package/front_end/panels/common/AiCodeCompletionSummaryToolbar.ts +1 -1
  113. package/front_end/panels/common/CPUThrottlingOption.ts +0 -1
  114. package/front_end/panels/common/GdpSignUpDialog.ts +3 -4
  115. package/front_end/panels/common/GeminiRebrandPromoDialog.ts +1 -1
  116. package/front_end/panels/console/ConsoleInsightTeaser.ts +1 -1
  117. package/front_end/panels/console/ConsolePinPane.ts +0 -1
  118. package/front_end/panels/console/ConsoleView.ts +2 -3
  119. package/front_end/panels/console/ConsoleViewMessage.ts +2 -3
  120. package/front_end/panels/coverage/CoverageListView.ts +6 -6
  121. package/front_end/panels/coverage/CoverageView.ts +7 -7
  122. package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +1 -1
  123. package/front_end/panels/elements/CSSRuleValidator.ts +10 -10
  124. package/front_end/panels/elements/ElementsPanel.ts +3 -3
  125. package/front_end/panels/elements/ElementsTreeElement.ts +1 -1
  126. package/front_end/panels/elements/ElementsTreeOutline.ts +1 -1
  127. package/front_end/panels/elements/LayoutPane.ts +1 -1
  128. package/front_end/panels/elements/StylePropertyTreeElement.ts +85 -2
  129. package/front_end/panels/elements/StylesSidebarPane.ts +3 -3
  130. package/front_end/panels/elements/stylePropertiesTreeOutline.css +2 -1
  131. package/front_end/panels/emulation/DeviceModeView.ts +1 -1
  132. package/front_end/panels/event_listeners/EventListenersView.ts +57 -89
  133. package/front_end/panels/explain/components/ConsoleInsight.ts +4 -4
  134. package/front_end/panels/issues/AffectedPartitioningBlobURLView.ts +3 -3
  135. package/front_end/panels/issues/IssuesPane.ts +1 -1
  136. package/front_end/panels/layer_viewer/Layers3DView.ts +4 -4
  137. package/front_end/panels/layers/LayerTreeModel.ts +1 -1
  138. package/front_end/panels/lighthouse/LighthouseController.ts +4 -4
  139. package/front_end/panels/lighthouse/LighthouseStatusView.ts +10 -10
  140. package/front_end/panels/lighthouse/LighthouseTimespanView.ts +2 -2
  141. package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorController.ts +1 -1
  142. package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +1 -1
  143. package/front_end/panels/media/MainView.ts +2 -2
  144. package/front_end/panels/mobile_throttling/CalibrationController.ts +4 -1
  145. package/front_end/panels/mobile_throttling/NetworkPanelIndicator.ts +1 -1
  146. package/front_end/panels/mobile_throttling/ThrottlingManager.ts +10 -0
  147. package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +3 -3
  148. package/front_end/panels/network/NetworkConfigView.ts +26 -16
  149. package/front_end/panels/network/NetworkItemView.ts +1 -1
  150. package/front_end/panels/network/NetworkLogView.ts +4 -5
  151. package/front_end/panels/network/NetworkPanel.ts +1 -1
  152. package/front_end/panels/network/RequestConditionsDrawer.ts +3 -3
  153. package/front_end/panels/network/RequestCookiesView.ts +2 -2
  154. package/front_end/panels/network/RequestPayloadView.ts +0 -2
  155. package/front_end/panels/network/RequestTimingView.ts +1 -1
  156. package/front_end/panels/network/ResourceChunkView.ts +1 -1
  157. package/front_end/panels/network/components/HeaderSectionRow.ts +2 -2
  158. package/front_end/panels/network/components/RequestHeaderSection.ts +1 -1
  159. package/front_end/panels/network/components/RequestTrustTokensView.ts +7 -7
  160. package/front_end/panels/network/components/ResponseHeaderSection.ts +3 -4
  161. package/front_end/panels/network/network-meta.ts +1 -1
  162. package/front_end/panels/profiler/HeapDetachedElementsView.ts +1 -1
  163. package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +10 -10
  164. package/front_end/panels/profiler/HeapSnapshotView.ts +1 -1
  165. package/front_end/panels/profiler/IsolateSelector.ts +4 -4
  166. package/front_end/panels/profiler/ModuleUIStrings.ts +1 -1
  167. package/front_end/panels/profiler/ProfilesPanel.ts +2 -3
  168. package/front_end/panels/recorder/RecorderPanel.ts +1 -1
  169. package/front_end/panels/search/SearchView.ts +6 -6
  170. package/front_end/panels/security/SecurityModel.ts +4 -4
  171. package/front_end/panels/security/SecurityPanel.ts +83 -54
  172. package/front_end/panels/security/SecurityPanelSidebar.ts +41 -5
  173. package/front_end/panels/security/sidebar.css +9 -10
  174. package/front_end/panels/sensors/SensorsView.ts +1 -1
  175. package/front_end/panels/settings/AISettingsTab.ts +9 -9
  176. package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +1 -1
  177. package/front_end/panels/settings/KeybindsSettingsTab.ts +2 -2
  178. package/front_end/panels/settings/SettingsScreen.ts +156 -109
  179. package/front_end/panels/settings/WorkspaceSettingsTab.ts +1 -1
  180. package/front_end/panels/settings/components/SyncSection.ts +3 -3
  181. package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +13 -13
  182. package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +2 -2
  183. package/front_end/panels/snippets/SnippetsQuickOpen.ts +1 -1
  184. package/front_end/panels/sources/CSSPlugin.ts +3 -3
  185. package/front_end/panels/sources/DebuggerPlugin.ts +4 -4
  186. package/front_end/panels/sources/NavigatorView.ts +3 -3
  187. package/front_end/panels/sources/OutlineQuickOpen.ts +1 -1
  188. package/front_end/panels/sources/PersistenceActions.ts +2 -2
  189. package/front_end/panels/sources/SourcesNavigator.ts +5 -5
  190. package/front_end/panels/sources/TabbedEditorContainer.ts +1 -1
  191. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +0 -1
  192. package/front_end/panels/sources/components/HeadersView.ts +1 -1
  193. package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +1 -1
  194. package/front_end/panels/timeline/TimelinePaintProfilerView.ts +1 -1
  195. package/front_end/panels/timeline/TimelineUIUtils.ts +0 -1
  196. package/front_end/panels/timeline/components/ExportTraceOptions.ts +2 -2
  197. package/front_end/panels/timeline/components/FieldSettingsDialog.ts +4 -4
  198. package/front_end/panels/timeline/components/IgnoreListSetting.ts +1 -1
  199. package/front_end/panels/timeline/components/LiveMetricsView.ts +7 -7
  200. package/front_end/panels/timeline/components/MetricCard.ts +3 -3
  201. package/front_end/panels/timeline/components/MetricCompareStrings.ts +12 -14
  202. package/front_end/panels/timeline/components/OriginMap.ts +3 -3
  203. package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +4 -4
  204. package/front_end/panels/timeline/overlays/OverlaysImpl.ts +6 -0
  205. package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +1 -1
  206. package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +3 -1
  207. package/front_end/panels/timeline/timelineMiniMap.css +9 -9
  208. package/front_end/panels/timeline/timelineStatusDialog.css +9 -9
  209. package/front_end/panels/web_audio/WebAudioView.ts +1 -1
  210. package/front_end/panels/webauthn/WebauthnPane.ts +1 -1
  211. package/front_end/third_party/chromium/README.chromium +1 -1
  212. package/front_end/ui/comments/CommentAnchorResolver.ts +114 -3
  213. package/front_end/ui/comments/CommentOverlayManager.ts +95 -16
  214. package/front_end/ui/components/dialogs/TypeToAllowDialog.ts +1 -1
  215. package/front_end/ui/components/markdown_view/codeBlock.css +3 -8
  216. package/front_end/ui/components/markdown_view/markdownView.css +2 -7
  217. package/front_end/ui/components/panel_feedback/PanelFeedback.ts +2 -2
  218. package/front_end/ui/components/panel_feedback/PreviewToggle.ts +1 -1
  219. package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +1 -1
  220. package/front_end/ui/components/text_editor/AiCodeCompletionTeaser.ts +4 -4
  221. package/front_end/ui/components/text_editor/AiCodeGenerationTeaser.ts +3 -3
  222. package/front_end/{models → ui}/geometry/GeometryImpl.ts +4 -40
  223. package/front_end/ui/legacy/GlassPane.ts +1 -1
  224. package/front_end/ui/legacy/RemoteDebuggingTerminatedScreen.ts +2 -2
  225. package/front_end/ui/legacy/SoftDropDown.ts +1 -1
  226. package/front_end/ui/legacy/SplitWidget.ts +1 -1
  227. package/front_end/ui/legacy/SuggestBox.ts +1 -1
  228. package/front_end/ui/legacy/TabbedPane.ts +1 -1
  229. package/front_end/ui/legacy/TargetCrashedScreen.ts +2 -2
  230. package/front_end/ui/legacy/Treeoutline.ts +5 -1
  231. package/front_end/ui/legacy/UIUtils.ts +1 -1
  232. package/front_end/ui/legacy/Widget.ts +1 -1
  233. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
  234. package/front_end/ui/legacy/components/inline_editor/AnimationTimingModel.ts +1 -1
  235. package/front_end/ui/legacy/components/inline_editor/AnimationTimingUI.ts +1 -1
  236. package/front_end/ui/legacy/components/inline_editor/BezierUI.ts +1 -1
  237. package/front_end/ui/legacy/components/inline_editor/CSSAngleUtils.ts +1 -1
  238. package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +1 -1
  239. package/front_end/ui/legacy/components/inline_editor/PositionAreaEditor.ts +204 -17
  240. package/front_end/ui/legacy/components/inline_editor/positionAreaEditor.css +6 -0
  241. package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +1 -1
  242. package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +1 -1
  243. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +7 -9
  244. package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +1 -1
  245. package/front_end/ui/visual_logging/KnownContextValues.ts +12 -0
  246. package/package.json +7 -4
  247. /package/front_end/{models → ui}/geometry/geometry.ts +0 -0
@@ -9,7 +9,6 @@ import * as Platform from '../../core/platform/platform.js';
9
9
  import * as Root from '../../core/root/root.js';
10
10
  import * as SDK from '../../core/sdk/sdk.js';
11
11
  import * as Protocol from '../../generated/protocol.js';
12
- import * as Geometry from '../geometry/geometry.js';
13
12
 
14
13
  import {
15
14
  type Cutout,
@@ -27,46 +26,46 @@ const UIStrings = {
27
26
  * @description Error message shown on the Devices settings tab when the user enters an empty
28
27
  * width for a custom device.
29
28
  */
30
- widthCannotBeEmpty: 'Width can’t be empty.',
29
+ widthCannotBeEmpty: 'Width can’t be empty',
31
30
  /**
32
31
  * @description Error message shown on the Devices settings tab when the user enters an invalid
33
32
  * width for a custom device.
34
33
  */
35
- widthMustBeANumber: 'Width must be a number.',
34
+ widthMustBeANumber: 'Width must be a number',
36
35
  /**
37
36
  * @description Error message shown on the Devices settings tab when the user has entered a width
38
37
  * for a custom device that is too large.
39
38
  * @example {9999} PH1
40
39
  */
41
- widthMustBeLessThanOrEqualToS: 'Width must be less than or equal to {PH1}.',
40
+ widthMustBeLessThanOrEqualToS: 'Width must be less than or equal to {PH1}',
42
41
  /**
43
42
  * @description Error message shown on the Devices settings tab when the user has entered a width
44
43
  * for a custom device that is too small.
45
44
  * @example {50} PH1
46
45
  */
47
- widthMustBeGreaterThanOrEqualToS: 'Width must be greater than or equal to {PH1}.',
46
+ widthMustBeGreaterThanOrEqualToS: 'Width must be greater than or equal to {PH1}',
48
47
  /**
49
48
  * @description Error message shown on the Devices settings tab when the user enters an empty
50
49
  * height for a custom device.
51
50
  */
52
- heightCannotBeEmpty: 'Height can’t be empty.',
51
+ heightCannotBeEmpty: 'Height can’t be empty',
53
52
  /**
54
53
  * @description Error message shown on the Devices settings tab when the user enters an invalid
55
54
  * height for a custom device.
56
55
  */
57
- heightMustBeANumber: 'Height must be a number.',
56
+ heightMustBeANumber: 'Height must be a number',
58
57
  /**
59
58
  * @description Error message shown on the Devices settings tab when the user has entered a height
60
59
  * for a custom device that is too large.
61
60
  * @example {9999} PH1
62
61
  */
63
- heightMustBeLessThanOrEqualToS: 'Height must be less than or equal to {PH1}.',
62
+ heightMustBeLessThanOrEqualToS: 'Height must be less than or equal to {PH1}',
64
63
  /**
65
64
  * @description Error message shown on the Devices settings tab when the user has entered a height
66
65
  * for a custom device that is too small.
67
66
  * @example {50} PH1
68
67
  */
69
- heightMustBeGreaterThanOrEqualTo: 'Height must be greater than or equal to {PH1}.',
68
+ heightMustBeGreaterThanOrEqualTo: 'Height must be greater than or equal to {PH1}',
70
69
  /**
71
70
  * @description Error message shown on the Devices settings tab when the user enters an invalid
72
71
  * device pixel ratio for a custom device.
@@ -77,13 +76,13 @@ const UIStrings = {
77
76
  * pixel ratio for a custom device that is too large.
78
77
  * @example {10} PH1
79
78
  */
80
- devicePixelRatioMustBeLessThanOr: 'Device pixel ratio must be less than or equal to {PH1}.',
79
+ devicePixelRatioMustBeLessThanOr: 'Device pixel ratio must be less than or equal to {PH1}',
81
80
  /**
82
81
  * @description Error message shown on the Devices settings tab when the user enters a device
83
82
  * pixel ratio for a custom device that is too small.
84
83
  * @example {0} PH1
85
84
  */
86
- devicePixelRatioMustBeGreater: 'Device pixel ratio must be greater than or equal to {PH1}.',
85
+ devicePixelRatioMustBeGreater: 'Device pixel ratio must be greater than or equal to {PH1}',
87
86
  } as const;
88
87
  const str_ = i18n.i18n.registerUIStrings('models/emulation/DeviceModeModel.ts', UIStrings);
89
88
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -99,11 +98,11 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
99
98
  SDK.TargetManager.SDKModelObserver<SDK.EmulationModel.EmulationModel> {
100
99
  #screenRect: Rect;
101
100
  #visiblePageRect: Rect;
102
- #availableSize: Geometry.Size;
103
- #preferredSize: Geometry.Size;
101
+ #availableSize: Platform.Size;
102
+ #preferredSize: Platform.Size;
104
103
  #initialized: boolean;
105
104
  #autoFitScaleOnInitialize: boolean;
106
- #appliedDeviceSize: Geometry.Size;
105
+ #appliedDeviceSize: Platform.Size;
107
106
  #appliedDeviceScaleFactor: number;
108
107
  #appliedUserAgentType: UA;
109
108
  readonly #scaleSetting: Common.Settings.Setting<number>;
@@ -126,7 +125,6 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
126
125
  readonly #targetManager: SDK.TargetManager.TargetManager;
127
126
  readonly #settings: Common.Settings.Settings;
128
127
  readonly #multitargetNetworkManager: SDK.NetworkManager.MultitargetNetworkManager;
129
- #lastScreenshotBlobUrl: string|null = null;
130
128
 
131
129
  constructor(
132
130
  targetManager: SDK.TargetManager.TargetManager,
@@ -139,12 +137,12 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
139
137
  this.#multitargetNetworkManager = multitargetNetworkManager;
140
138
  this.#screenRect = new Rect(0, 0, 1, 1);
141
139
  this.#visiblePageRect = new Rect(0, 0, 1, 1);
142
- this.#availableSize = new Geometry.Size(1, 1);
143
- this.#preferredSize = new Geometry.Size(1, 1);
140
+ this.#availableSize = new Platform.Size(1, 1);
141
+ this.#preferredSize = new Platform.Size(1, 1);
144
142
  this.#initialized = false;
145
143
  this.#autoFitScaleOnInitialize = false;
146
- this.#appliedDeviceSize = new Geometry.Size(1, 1);
147
- this.#appliedDeviceScaleFactor = globalThis.devicePixelRatio;
144
+ this.#appliedDeviceSize = new Platform.Size(1, 1);
145
+ this.#appliedDeviceScaleFactor = Platform.HostRuntime.HOST_RUNTIME.getDevicePixelRatio();
148
146
  this.#appliedUserAgentType = UA.DESKTOP;
149
147
 
150
148
  this.#scaleSetting = this.#settings.createSetting('emulation.device-scale', 1);
@@ -316,7 +314,7 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
316
314
  }
317
315
  }
318
316
 
319
- setAvailableSize(availableSize: Geometry.Size, preferredSize: Geometry.Size): void {
317
+ setAvailableSize(availableSize: Platform.Size, preferredSize: Platform.Size): void {
320
318
  this.#availableSize = availableSize;
321
319
  this.#preferredSize = preferredSize;
322
320
  this.#initialized = true;
@@ -417,7 +415,7 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
417
415
  return this.#fitScale;
418
416
  }
419
417
 
420
- appliedDeviceSize(): Geometry.Size {
418
+ appliedDeviceSize(): Platform.Size {
421
419
  return this.#appliedDeviceSize;
422
420
  }
423
421
 
@@ -659,7 +657,7 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
659
657
  } else {
660
658
  this.#appliedUserAgentType = this.#device.touch() ? UA.DESKTOP_TOUCH : UA.DESKTOP;
661
659
  }
662
- this.applyDeviceMetrics(new Geometry.Size(orientation.width, orientation.height), this.#scaleSetting.get(),
660
+ this.applyDeviceMetrics(new Platform.Size(orientation.width, orientation.height), this.#scaleSetting.get(),
663
661
  this.#device.deviceScaleFactor, mobile, this.getScreenOrientationType(),
664
662
  resetPageScaleFactor);
665
663
  this.applyUserAgent(this.#device.userAgent, this.#device.userAgentMetadata);
@@ -682,7 +680,7 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
682
680
  const defaultDeviceScaleFactor = mobile ? defaultMobileScaleFactor : 0;
683
681
  this.#fitScale = this.calculateFitScale(this.#widthSetting.get(), this.#heightSetting.get());
684
682
  this.#appliedUserAgentType = this.#uaSetting.get();
685
- this.applyDeviceMetrics(new Geometry.Size(screenWidth, screenHeight), this.#scaleSetting.get(),
683
+ this.applyDeviceMetrics(new Platform.Size(screenWidth, screenHeight), this.#scaleSetting.get(),
686
684
  this.#deviceScaleFactorSetting.get() || defaultDeviceScaleFactor, mobile,
687
685
  screenHeight >= screenWidth ? Protocol.Emulation.ScreenOrientationType.PortraitPrimary :
688
686
  Protocol.Emulation.ScreenOrientationType.LandscapePrimary,
@@ -737,7 +735,7 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
737
735
  this.#multitargetNetworkManager.setUserAgentOverride(userAgent, userAgent ? userAgentMetadata : null);
738
736
  }
739
737
 
740
- private applyDeviceMetrics(screenSize: Geometry.Size, scale: number, deviceScaleFactor: number, mobile: boolean,
738
+ private applyDeviceMetrics(screenSize: Platform.Size, scale: number, deviceScaleFactor: number, mobile: boolean,
741
739
  screenOrientation: Protocol.Emulation.ScreenOrientationType|null,
742
740
  resetPageScaleFactor: boolean): void {
743
741
  screenSize.width = Math.max(1, Math.floor(screenSize.width));
@@ -752,7 +750,7 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
752
750
  screenOrientation === Protocol.Emulation.ScreenOrientationType.LandscapePrimary ? 90 : 0;
753
751
 
754
752
  this.#appliedDeviceSize = screenSize;
755
- this.#appliedDeviceScaleFactor = deviceScaleFactor || window.devicePixelRatio;
753
+ this.#appliedDeviceScaleFactor = deviceScaleFactor || Platform.HostRuntime.HOST_RUNTIME.getDevicePixelRatio();
756
754
  this.#screenRect = new Rect(Math.max(0, (this.#availableSize.width - screenSize.width * scale) / 2), 0,
757
755
  screenSize.width * scale, screenSize.height * scale);
758
756
  this.#visiblePageRect = new Rect(
@@ -866,34 +864,37 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
866
864
  }
867
865
  }
868
866
 
867
+ private getScreenshotFileName(): string {
868
+ const url = this.inspectedURL();
869
+ let fileName = '';
870
+ if (url) {
871
+ const withoutFragment = Platform.StringUtilities.removeURLFragment(url);
872
+ fileName = Platform.StringUtilities.trimURL(withoutFragment);
873
+ }
874
+
875
+ const device = this.device();
876
+ if (device && this.type() === Type.Device) {
877
+ fileName += `(${device.title})`;
878
+ }
879
+ return fileName;
880
+ }
881
+
869
882
  async captureScreenshot(): Promise<void> {
870
883
  const screenshot = await this.#captureScreenshot(false);
871
884
  if (screenshot === null) {
872
885
  return;
873
886
  }
874
887
 
875
- const pageImage = new Image();
876
- pageImage.src = 'data:image/png;base64,' + screenshot;
877
- pageImage.onload = async () => {
878
- const scale = pageImage.naturalWidth / this.screenRect().width;
879
- const screenRect = this.screenRect().scale(scale);
880
- const visiblePageRect = this.visiblePageRect().scale(scale);
881
- const contentLeft = visiblePageRect.left;
882
- const contentTop = visiblePageRect.top;
883
-
884
- const canvas = new OffscreenCanvas(Math.floor(screenRect.width),
885
- // Cap the height to not hit the GPU limit.
886
- // https://crbug.com/1260828
887
- Math.min((1 << 14), Math.floor(screenRect.height)));
888
- const ctx = canvas.getContext('2d', {willReadFrequently: true});
889
- if (!ctx) {
890
- throw new Error('Could not get 2d context from canvas.');
891
- }
892
- ctx.imageSmoothingEnabled = false;
893
-
894
- ctx.drawImage(pageImage, Math.floor(contentLeft), Math.floor(contentTop));
895
- void this.saveScreenshot(canvas);
896
- };
888
+ await Platform.HostRuntime.HOST_RUNTIME.saveScreenshot({
889
+ base64Png: screenshot,
890
+ fileName: this.getScreenshotFileName(),
891
+ clip: {
892
+ screenRectWidth: this.screenRect().width,
893
+ screenRectHeight: this.screenRect().height,
894
+ visiblePageRectLeft: this.visiblePageRect().left,
895
+ visiblePageRectTop: this.visiblePageRect().top,
896
+ },
897
+ });
897
898
  }
898
899
 
899
900
  async captureFullSizeScreenshot(): Promise<void> {
@@ -901,7 +902,7 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
901
902
  if (screenshot === null) {
902
903
  return;
903
904
  }
904
- return this.saveScreenshotBase64(screenshot);
905
+ await this.saveScreenshot(screenshot);
905
906
  }
906
907
 
907
908
  async captureAreaScreenshot(clip?: Protocol.Page.Viewport): Promise<void> {
@@ -909,69 +910,18 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
909
910
  if (screenshot === null) {
910
911
  return;
911
912
  }
912
- return this.saveScreenshotBase64(screenshot);
913
- }
914
-
915
- private saveScreenshotBase64(screenshot: string): void {
916
- const pageImage = new Image();
917
- pageImage.src = 'data:image/png;base64,' + screenshot;
918
- pageImage.onload = () => {
919
- const canvas = new OffscreenCanvas(pageImage.naturalWidth,
920
- // Cap the height to not hit the GPU limit.
921
- // https://crbug.com/1260828
922
- Math.min((1 << 14), Math.floor(pageImage.naturalHeight)));
923
- const ctx = canvas.getContext('2d', {willReadFrequently: true});
924
- if (!ctx) {
925
- throw new Error('Could not get 2d context for base64 screenshot.');
926
- }
927
- ctx.imageSmoothingEnabled = false;
928
- ctx.drawImage(pageImage, 0, 0);
929
- void this.saveScreenshot(canvas);
930
- };
913
+ await this.saveScreenshot(screenshot);
931
914
  }
932
915
 
933
- private paintImage(ctx: OffscreenCanvasRenderingContext2D|CanvasRenderingContext2D, src: string,
934
- rect: Rect): Promise<void> {
935
- return new Promise(resolve => {
936
- const image = new Image();
937
- image.crossOrigin = 'Anonymous';
938
- image.srcset = src;
939
- image.onerror = () => resolve();
940
- image.onload = () => {
941
- ctx.drawImage(image, rect.left, rect.top, rect.width, rect.height);
942
- resolve();
943
- };
916
+ async saveScreenshot(screenshot: string): Promise<void> {
917
+ await Platform.HostRuntime.HOST_RUNTIME.saveScreenshot({
918
+ base64Png: screenshot,
919
+ fileName: this.getScreenshotFileName(),
944
920
  });
945
921
  }
946
922
 
947
- async saveScreenshot(canvas: OffscreenCanvas): Promise<void> {
948
- const url = this.inspectedURL();
949
- let fileName = '';
950
- if (url) {
951
- const withoutFragment = Platform.StringUtilities.removeURLFragment(url);
952
- fileName = Platform.StringUtilities.trimURL(withoutFragment);
953
- }
954
-
955
- const device = this.device();
956
- if (device && this.type() === Type.Device) {
957
- fileName += `(${device.title})`;
958
- }
959
- this.#revokeLastScreenshotBlobUrl();
960
- /* eslint-disable-next-line @devtools/no-imperative-dom-api */
961
- const link = document.createElement('a');
962
- link.download = fileName + '.png';
963
- const blob = await canvas.convertToBlob({type: 'image/png'});
964
- const blobUrl = URL.createObjectURL(blob);
965
- this.#lastScreenshotBlobUrl = blobUrl;
966
- link.href = blobUrl;
967
- link.click();
968
- }
969
-
970
923
  #revokeLastScreenshotBlobUrl(): void {
971
- if (this.#lastScreenshotBlobUrl) {
972
- URL.revokeObjectURL(this.#lastScreenshotBlobUrl);
973
- this.#lastScreenshotBlobUrl = null;
974
- }
924
+ Platform.HostRuntime.HOST_RUNTIME.revokeLastScreenshotUrl();
975
925
  }
976
926
 
977
927
  private applyTouch(touchEnabled: boolean, mobile: boolean): void {
@@ -154,7 +154,7 @@ export class HeapSnapshotWorkerProxy extends Common.ObjectWrapper.ObjectWrapper<
154
154
  }
155
155
  }
156
156
 
157
- setupForSecondaryInit(port: MessagePort): Promise<void> {
157
+ setupForSecondaryInit(port: PlatformApi.HostRuntime.WorkerMessagePort): Promise<void> {
158
158
  const callId = this.nextCallId++;
159
159
  const done = new Promise<void>((resolve, reject) => {
160
160
  this.callbacks.set(callId, error => {
@@ -28,7 +28,7 @@ const UIStrings = {
28
28
  /**
29
29
  * @description Text to show in Console panel when a third-party cookie is blocked in Chrome.
30
30
  */
31
- consoleTpcdErrorMessage: 'Third-party cookie blocked in Chrome due to Chrome flags or browser settings.',
31
+ consoleTpcdErrorMessage: 'Third-party cookie blocked in Chrome due to Chrome flags or browser settings',
32
32
 
33
33
  } as const;
34
34
  const str_ = i18n.i18n.registerUIStrings('models/issues_manager/CookieIssue.ts', UIStrings);
@@ -14,12 +14,12 @@ const UIStrings = {
14
14
  /**
15
15
  * @description This links to the Chrome feature status page when one exists.
16
16
  */
17
- feature: 'Check the feature status page for more details.',
17
+ feature: 'Check the feature status page for more details',
18
18
  /**
19
19
  * @description This links to the Chromium Dash schedule when a milestone is set.
20
20
  * @example {100} milestone
21
21
  */
22
- milestone: 'This change will go into effect with milestone {milestone}.',
22
+ milestone: 'This change will go into effect with milestone {milestone}',
23
23
  /**
24
24
  * @description Title of issue raised when a deprecated feature is used.
25
25
  */
@@ -8490,7 +8490,7 @@ export const NativeFunctions: readonly NativeFunctionValue[] = [
8490
8490
  },
8491
8491
  {
8492
8492
  name: "executeTool",
8493
- signatures: [["tool","inputArguments","?options"]]
8493
+ signatures: [["tool","?inputObject","?options"]]
8494
8494
  },
8495
8495
  {
8496
8496
  name: "TaskController",
@@ -8722,10 +8722,6 @@ export const NativeFunctions: readonly NativeFunctionValue[] = [
8722
8722
  name: "setReportEventDataForAutomaticBeacons",
8723
8723
  signatures: [["event"]]
8724
8724
  },
8725
- {
8726
- name: "FencedFrameConfig",
8727
- signatures: [["url"]]
8728
- },
8729
8725
  {
8730
8726
  name: "setSharedStorageContext",
8731
8727
  signatures: [["contextString"]]
@@ -29,7 +29,7 @@ const UIStrings = {
29
29
  /**
30
30
  * @description Warning text indicating that the Largest Contentful Paint (LCP) performance metric was affected by the page loading in the background.
31
31
  */
32
- lcpVisibilityWarning: 'LCP may be inflated because the page started loading in the background.',
32
+ lcpVisibilityWarning: 'LCP may be inflated because the page started loading in the background',
33
33
  } as const;
34
34
 
35
35
  const str_ = i18n.i18n.registerUIStrings('models/live-metrics/LiveMetrics.ts', UIStrings);
@@ -84,7 +84,7 @@ export class IsolatedFileSystem extends PlatformFileSystem {
84
84
  });
85
85
  }
86
86
 
87
- static errorMessage(error: DOMError): string {
87
+ static errorMessage(error: DOMException|Error): string {
88
88
  return i18nString(UIStrings.fileSystemErrorS, {PH1: error.message});
89
89
  }
90
90
 
@@ -105,7 +105,7 @@ export class IsolatedFileSystem extends PlatformFileSystem {
105
105
  entry.getMetadata(resolve, errorHandler);
106
106
  }
107
107
 
108
- function errorHandler(error: DOMError): void {
108
+ function errorHandler(error: DOMException|Error): void {
109
109
  const errorMessage = IsolatedFileSystem.errorMessage(error);
110
110
  console.error(errorMessage + ' when getting file metadata \'' + path);
111
111
  resolve(null);
@@ -256,10 +256,7 @@ export class IsolatedFileSystem extends PlatformFileSystem {
256
256
  resolve(true);
257
257
  }
258
258
 
259
- /**
260
- * TODO(jsbell): Update externs replacing DOMError with DOMException. https://crbug.com/496901
261
- */
262
- function errorHandler(this: IsolatedFileSystem, error: DOMError): void {
259
+ function errorHandler(this: IsolatedFileSystem, error: DOMException|Error): void {
263
260
  const errorMessage = IsolatedFileSystem.errorMessage(error);
264
261
  console.error(errorMessage + ' when deleting file \'' + (this.path() + '/' + path) + '\'');
265
262
  resolve(false);
@@ -281,10 +278,7 @@ export class IsolatedFileSystem extends PlatformFileSystem {
281
278
  resolve(true);
282
279
  }
283
280
 
284
- /**
285
- * TODO(jsbell): Update externs replacing DOMError with DOMException. https://crbug.com/496901
286
- */
287
- function errorHandler(this: IsolatedFileSystem, error: DOMError): void {
281
+ function errorHandler(this: IsolatedFileSystem, error: DOMException|Error): void {
288
282
  const errorMessage = IsolatedFileSystem.errorMessage(error);
289
283
  console.error(errorMessage + ' when deleting directory \'' + (this.path() + '/' + path) + '\'');
290
284
  resolve(false);
@@ -297,7 +291,7 @@ export class IsolatedFileSystem extends PlatformFileSystem {
297
291
  entry.file(resolve, errorHandler.bind(this));
298
292
  }, errorHandler.bind(this));
299
293
 
300
- function errorHandler(this: IsolatedFileSystem, error: DOMError): void {
294
+ function errorHandler(this: IsolatedFileSystem, error: DOMException|Error): void {
301
295
  if (error.name === 'NotFoundError') {
302
296
  resolve(null);
303
297
  return;
@@ -336,9 +330,9 @@ export class IsolatedFileSystem extends PlatformFileSystem {
336
330
  override async setFileContent(path: Platform.DevToolsPath.EncodedPathString, content: string, isBase64: boolean):
337
331
  Promise<void> {
338
332
  Host.userMetrics.actionTaken(Host.UserMetrics.Action.FileSavedInWorkspace);
339
- let resolve: (result: ProgressEvent<EventTarget>|undefined) => void;
340
- const innerSetFileContent = (): Promise<ProgressEvent<EventTarget>|undefined> => {
341
- const promise = new Promise<ProgressEvent<EventTarget>|undefined>(x => {
333
+ let resolve: () => void;
334
+ const innerSetFileContent = (): Promise<void> => {
335
+ const promise = new Promise<void>(x => {
342
336
  resolve = x;
343
337
  });
344
338
  this.domFileSystem.root.getFile(
@@ -354,7 +348,7 @@ export class IsolatedFileSystem extends PlatformFileSystem {
354
348
  }
355
349
 
356
350
  async function fileWriterCreated(this: IsolatedFileSystem, fileWriter: FileWriter): Promise<void> {
357
- fileWriter.onerror = errorHandler.bind(this);
351
+ fileWriter.onerror = () => errorHandler.call(this, fileWriter.error);
358
352
  fileWriter.onwriteend = fileWritten;
359
353
  let blob: Blob;
360
354
  if (isBase64) {
@@ -365,16 +359,15 @@ export class IsolatedFileSystem extends PlatformFileSystem {
365
359
  fileWriter.write(blob);
366
360
 
367
361
  function fileWritten(): void {
368
- fileWriter.onwriteend = resolve;
362
+ fileWriter.onwriteend = () => resolve();
369
363
  fileWriter.truncate(blob.size);
370
364
  }
371
365
  }
372
366
 
373
- function errorHandler(this: IsolatedFileSystem, error: DOMError|ProgressEvent<EventTarget>): void {
374
- // @ts-expect-error TODO(crbug.com/1172300) Properly type this after jsdoc to ts migration
367
+ function errorHandler(this: IsolatedFileSystem, error: DOMException|Error): void {
375
368
  const errorMessage = IsolatedFileSystem.errorMessage(error);
376
369
  console.error(errorMessage + ' when setting content for file \'' + (this.path() + '/' + path) + '\'');
377
- resolve(undefined);
370
+ resolve();
378
371
  }
379
372
  }
380
373
 
@@ -412,7 +405,7 @@ export class IsolatedFileSystem extends PlatformFileSystem {
412
405
  callback(false);
413
406
  }
414
407
 
415
- function newFileEntryLoadErrorHandler(this: IsolatedFileSystem, error: DOMError): void {
408
+ function newFileEntryLoadErrorHandler(this: IsolatedFileSystem, error: DOMException|Error): void {
416
409
  if (error.name !== 'NotFoundError') {
417
410
  callback(false);
418
411
  return;
@@ -424,7 +417,7 @@ export class IsolatedFileSystem extends PlatformFileSystem {
424
417
  callback(true, entry.name);
425
418
  }
426
419
 
427
- function errorHandler(this: IsolatedFileSystem, error: DOMError): void {
420
+ function errorHandler(this: IsolatedFileSystem, error: DOMException|Error): void {
428
421
  const errorMessage = IsolatedFileSystem.errorMessage(error);
429
422
  console.error(errorMessage + ' when renaming file \'' + (this.path() + '/' + path) + '\' to \'' + newName + '\'');
430
423
  callback(false);
@@ -450,7 +443,7 @@ export class IsolatedFileSystem extends PlatformFileSystem {
450
443
 
451
444
  dirReader.readEntries(innerCallback, errorHandler);
452
445
 
453
- function errorHandler(error: DOMError): void {
446
+ function errorHandler(error: DOMException|Error): void {
454
447
  const errorMessage = IsolatedFileSystem.errorMessage(error);
455
448
  console.error(errorMessage + ' when reading directory \'' + dirEntry.fullPath + '\'');
456
449
  callback([]);
@@ -464,7 +457,7 @@ export class IsolatedFileSystem extends PlatformFileSystem {
464
457
  this.readDirectory(dirEntry, callback);
465
458
  }
466
459
 
467
- function errorHandler(error: DOMError): void {
460
+ function errorHandler(error: DOMException|Error): void {
468
461
  const errorMessage = IsolatedFileSystem.errorMessage(error);
469
462
  console.error(errorMessage + ' when requesting entry \'' + path + '\'');
470
463
  callback([]);
@@ -26,7 +26,7 @@ export const UIStrings = {
26
26
  * @description Description of an insight that identifies multiple copies of the same JavaScript sources, and recommends removing the duplication.
27
27
  */
28
28
  description:
29
- 'Remove large, [duplicate JavaScript modules](https://developer.chrome.com/docs/performance/insights/duplicated-javascript) from bundles to reduce unnecessary bytes consumed by network activity.',
29
+ 'Remove large, [duplicate JavaScript modules](https://developer.chrome.com/docs/performance/insights/duplicated-javascript) from bundles to reduce unnecessary bytes consumed by network activity',
30
30
  /**
31
31
  * @description Label for a column in a data table; entries will be the locations of JavaScript or CSS code, e.g. the name of a JavaScript package or module.
32
32
  */
@@ -20,7 +20,7 @@ export const UIStrings = {
20
20
  * @description Text to tell the user about the longest user interaction.
21
21
  */
22
22
  description:
23
- 'Start investigating [how to improve INP](https://developer.chrome.com/docs/performance/insights/inp-breakdown) by looking at the longest subpart.',
23
+ 'Start investigating [how to improve INP](https://developer.chrome.com/docs/performance/insights/inp-breakdown) by looking at the longest subpart',
24
24
  /**
25
25
  * @description Title for the performance insight "INP breakdown", which shows a breakdown of INP by subparts / sections.
26
26
  */
@@ -29,16 +29,16 @@ export const UIStrings = {
29
29
  /**
30
30
  * @description Message displayed in a chip explaining that an image file size is large for the # of pixels it has and recommends possible adjustments to improve the image size.
31
31
  */
32
- useCompression: 'Increasing the image compression factor could improve this image’s download size.',
32
+ useCompression: 'Increasing the image compression factor could improve this image’s download size',
33
33
  /**
34
34
  * @description Message displayed in a chip explaining that an image file size is large for the # of pixels it has and recommends possible adjustments to improve the image size.
35
35
  */
36
36
  useModernFormat:
37
- 'Using a modern image format (WebP, AVIF) or increasing the image compression could improve this image’s download size.',
37
+ 'Using a modern image format (WebP, AVIF) or increasing the image compression could improve this image’s download size',
38
38
  /**
39
39
  * @description Message displayed in a chip advising the user to use video formats instead of GIFs because videos generally have smaller file sizes.
40
40
  */
41
- useVideoFormat: 'Using video formats instead of GIFs can improve the download size of animated content.',
41
+ useVideoFormat: 'Using video formats instead of GIFs can improve the download size of animated content',
42
42
  /**
43
43
  * @description Message displayed in a chip explaining that an image was displayed on the page with dimensions much smaller than the image file dimensions.
44
44
  * @example {1000x500} PH1
@@ -27,12 +27,12 @@ export const UIStrings = {
27
27
  * @description Description of an insight that provides details about the LCP metric, and the network requests necessary to load it.
28
28
  */
29
29
  description:
30
- '[Optimize LCP](https://developer.chrome.com/docs/performance/insights/lcp-discovery) by making the LCP image discoverable from the HTML immediately, and avoiding lazy-loading.',
30
+ '[Optimize LCP](https://developer.chrome.com/docs/performance/insights/lcp-discovery) by making the LCP image discoverable from the HTML immediately, and avoiding lazy-loading',
31
31
  /**
32
32
  * @description Text to tell the user how long after the earliest discovery time their LCP element loaded.
33
33
  * @example {401ms} PH1
34
34
  */
35
- lcpLoadDelay: 'LCP image loaded {PH1} after earliest start point.',
35
+ lcpLoadDelay: 'LCP image loaded {PH1} after earliest start point',
36
36
  /**
37
37
  * @description Text to tell the user that a fetchpriority property value of "high" is applied to the LCP request.
38
38
  */
@@ -31,12 +31,12 @@ export const UIStrings = {
31
31
  * @description Description of an insight that recommends avoiding chaining critical requests.
32
32
  */
33
33
  description:
34
- '[Avoid chaining critical requests](https://developer.chrome.com/docs/performance/insights/network-dependency-tree) by reducing the length of chains, reducing the download size of resources, or deferring the download of unnecessary resources to improve page load.',
34
+ '[Avoid chaining critical requests](https://developer.chrome.com/docs/performance/insights/network-dependency-tree) by reducing the length of chains, reducing the download size of resources, or deferring the download of unnecessary resources to improve page load',
35
35
  /**
36
36
  * @description Description of the warning that recommends avoiding chaining critical requests.
37
37
  */
38
38
  warningDescription:
39
- 'Avoid chaining critical requests by reducing the length of chains, reducing the download size of resources, or deferring the download of unnecessary resources to improve page load.',
39
+ 'Avoid chaining critical requests by reducing the length of chains, reducing the download size of resources, or deferring the download of unnecessary resources to improve page load',
40
40
  /**
41
41
  * @description Text status indicating that there aren’t long chaining critical network requests.
42
42
  */
@@ -96,7 +96,7 @@ export const UIStrings = {
96
96
  * @description Description of the table that recommends preconnecting to the origins to save time. "preconnect" should not be translated.
97
97
  */
98
98
  estSavingTableDescription:
99
- 'Add [preconnect](https://developer.chrome.com/docs/lighthouse/performance/uses-rel-preconnect/) hints to your most important origins, but try to use no more than 4.',
99
+ 'Add [preconnect](https://developer.chrome.com/docs/lighthouse/performance/uses-rel-preconnect/) hints to your most important origins, but try to use no more than 4',
100
100
  /**
101
101
  * @description Label for a column in a data table; entries will be the origin of a web resource.
102
102
  */
@@ -26,7 +26,7 @@ export const UIStrings = {
26
26
  * @description Text to tell the user how a viewport meta element can improve performance. \xa0 is a non-breaking space
27
27
  */
28
28
  description:
29
- 'Tap interactions may be [delayed by up to 300\xA0ms](https://developer.chrome.com/docs/performance/insights/viewport) if the viewport isn’t optimized for mobile.',
29
+ 'Tap interactions may be [delayed by up to 300\xA0ms](https://developer.chrome.com/docs/performance/insights/viewport) if the viewport isn’t optimized for mobile',
30
30
  /**
31
31
  * @description Text for a label describing the portion of an interaction event that was delayed due to a bad mobile viewport.
32
32
  */
@@ -84,7 +84,7 @@ export interface CandyStripedTimeRange {
84
84
  */
85
85
  export interface TimespanBreakdownEntryBreakdown {
86
86
  bounds: TraceWindowMicro;
87
- label: string|HTMLElement;
87
+ label: string|object;
88
88
  showDuration: boolean;
89
89
  }
90
90
 
@@ -126,7 +126,7 @@ export interface BottomInfoBar {
126
126
  // In DevTools, this infobar is a UI.Infobar.Infobar but we can't refer to
127
127
  // the type here.
128
128
  infobar: {
129
- element: HTMLElement,
129
+ element: object,
130
130
  dispose: () => void,
131
131
  };
132
132
  }
@@ -59,7 +59,7 @@ const UIStrings = {
59
59
  * @description Reason in the Accessibility tab in the Elements panel.
60
60
  * @example {aria-hidden} PH1
61
61
  */
62
- elementIsPlaceholder: 'Element is {PH1}.',
62
+ elementIsPlaceholder: 'Element is {PH1}',
63
63
  /**
64
64
  * @description Reason in the Accessibility tab in the Elements panel.
65
65
  * @example {aria-hidden} PH1
@@ -108,7 +108,7 @@ const UIStrings = {
108
108
  * (which are not translated). https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles
109
109
  * @example {role=link} PH1
110
110
  */
111
- elementHasPlaceholder: 'Element has {PH1}.',
111
+ elementHasPlaceholder: 'Element has {PH1}',
112
112
  /**
113
113
  * @description Reason in the Accessibility tab in the Elements panel.
114
114
  */
@@ -4,7 +4,6 @@
4
4
  /* eslint-disable @devtools/no-imperative-dom-api */
5
5
 
6
6
  import type * as SDK from '../../core/sdk/sdk.js';
7
- // eslint-disable-next-line @devtools/es-modules-import
8
7
  import objectValueStyles from '../../ui/legacy/components/object_ui/objectValue.css.js';
9
8
  import * as UI from '../../ui/legacy/legacy.js';
10
9