chrome-devtools-frontend 1.0.1512147 → 1.0.1513662

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 (337) hide show
  1. package/docs/cookbook/release_management.md +15 -13
  2. package/docs/get_the_code.md +114 -35
  3. package/front_end/Images/src/ai-explorer-badge.svg +114 -0
  4. package/front_end/Images/src/code-whisperer-badge.svg +166 -0
  5. package/front_end/Images/src/devtools-user-badge.svg +129 -0
  6. package/front_end/Images/src/dom-detective-badge.svg +136 -0
  7. package/front_end/Images/src/speedster-badge.svg +166 -0
  8. package/front_end/core/common/Color.ts +40 -44
  9. package/front_end/core/common/Console.ts +4 -4
  10. package/front_end/core/common/ParsedURL.ts +14 -14
  11. package/front_end/core/common/ResourceType.ts +20 -20
  12. package/front_end/core/common/SegmentedRange.ts +13 -14
  13. package/front_end/core/common/Settings.ts +4 -4
  14. package/front_end/core/common/StringOutputStream.ts +4 -4
  15. package/front_end/core/host/GdpClient.ts +76 -2
  16. package/front_end/core/host/InspectorFrontendHost.ts +4 -1
  17. package/front_end/core/host/InspectorFrontendHostAPI.ts +2 -0
  18. package/front_end/core/host/ResourceLoader.ts +2 -2
  19. package/front_end/core/host/UserMetrics.ts +0 -2
  20. package/front_end/core/i18n/NumberFormatter.ts +7 -0
  21. package/front_end/core/protocol_client/InspectorBackend.ts +9 -9
  22. package/front_end/core/root/Runtime.ts +5 -2
  23. package/front_end/core/sdk/AccessibilityModel.ts +48 -48
  24. package/front_end/core/sdk/AnimationModel.ts +78 -79
  25. package/front_end/core/sdk/CPUProfilerModel.ts +5 -5
  26. package/front_end/core/sdk/CPUThrottlingManager.ts +17 -17
  27. package/front_end/core/sdk/CSSMatchedStyles.ts +44 -44
  28. package/front_end/core/sdk/CSSMedia.ts +22 -22
  29. package/front_end/core/sdk/CSSModel.ts +4 -4
  30. package/front_end/core/sdk/CSSProperty.ts +9 -9
  31. package/front_end/core/sdk/CSSPropertyParser.ts +1 -2
  32. package/front_end/core/sdk/CSSRule.ts +3 -3
  33. package/front_end/core/sdk/CSSStyleDeclaration.ts +27 -28
  34. package/front_end/core/sdk/CSSStyleSheetHeader.ts +13 -13
  35. package/front_end/core/sdk/CategorizedBreakpoint.ts +4 -4
  36. package/front_end/core/sdk/ChildTargetManager.ts +6 -6
  37. package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +4 -4
  38. package/front_end/core/sdk/ConsoleModel.ts +24 -24
  39. package/front_end/core/sdk/Cookie.ts +16 -16
  40. package/front_end/core/sdk/CookieParser.ts +6 -6
  41. package/front_end/core/sdk/DOMDebuggerModel.ts +88 -89
  42. package/front_end/core/sdk/DOMModel.ts +113 -113
  43. package/front_end/core/sdk/DebuggerModel.ts +102 -103
  44. package/front_end/core/sdk/EmulationModel.ts +6 -6
  45. package/front_end/core/sdk/EventBreakpointsModel.ts +5 -5
  46. package/front_end/core/sdk/HeapProfilerModel.ts +5 -5
  47. package/front_end/core/sdk/IsolateManager.ts +26 -26
  48. package/front_end/core/sdk/LayerTreeBase.ts +29 -30
  49. package/front_end/core/sdk/OverlayModel.ts +6 -6
  50. package/front_end/core/sdk/Resource.ts +43 -43
  51. package/front_end/core/sdk/ResourceTreeModel.ts +58 -61
  52. package/front_end/core/sdk/RuntimeModel.ts +12 -13
  53. package/front_end/core/sdk/SDKModel.ts +3 -3
  54. package/front_end/core/sdk/Script.ts +17 -17
  55. package/front_end/core/sdk/SecurityOriginManager.ts +14 -14
  56. package/front_end/core/sdk/ServerTiming.ts +2 -2
  57. package/front_end/core/sdk/ServiceWorkerCacheModel.ts +15 -15
  58. package/front_end/core/sdk/ServiceWorkerManager.ts +19 -24
  59. package/front_end/core/sdk/SourceMap.ts +10 -10
  60. package/front_end/core/sdk/StorageKeyManager.ts +12 -12
  61. package/front_end/core/sdk/Target.ts +33 -34
  62. package/front_end/core/sdk/TargetManager.ts +20 -20
  63. package/front_end/entrypoints/formatter_worker/AcornTokenizer.ts +8 -8
  64. package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +7 -7
  65. package/front_end/entrypoints/heap_snapshot_worker/AllocationProfile.ts +7 -7
  66. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +24 -24
  67. package/front_end/entrypoints/main/GlobalAiButton.ts +3 -3
  68. package/front_end/entrypoints/main/MainImpl.ts +16 -14
  69. package/front_end/entrypoints/main/main-meta.ts +1 -2
  70. package/front_end/generated/InspectorBackendCommands.js +3 -2
  71. package/front_end/generated/SupportedCSSProperties.js +20 -0
  72. package/front_end/generated/protocol-mapping.d.ts +4 -0
  73. package/front_end/generated/protocol-proxy-api.d.ts +5 -0
  74. package/front_end/generated/protocol.ts +20 -0
  75. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +18 -35
  76. package/front_end/models/ai_assistance/ai_assistance.ts +1 -1
  77. package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +7 -6
  78. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +246 -119
  79. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +187 -73
  80. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +106 -100
  81. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +20 -27
  82. package/front_end/models/ai_assistance/data_formatters/UnitFormatters.ts +151 -0
  83. package/front_end/models/badges/AiExplorerBadge.ts +21 -0
  84. package/front_end/models/badges/Badge.ts +10 -9
  85. package/front_end/models/badges/CodeWhispererBadge.ts +21 -0
  86. package/front_end/models/badges/DOMDetectiveBadge.ts +21 -0
  87. package/front_end/models/badges/SpeedsterBadge.ts +7 -2
  88. package/front_end/models/badges/StarterBadge.ts +6 -1
  89. package/front_end/models/badges/UserBadges.ts +61 -9
  90. package/front_end/models/bindings/CSSWorkspaceBinding.ts +6 -6
  91. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +18 -18
  92. package/front_end/models/bindings/FileUtils.ts +15 -15
  93. package/front_end/models/bindings/ResourceScriptMapping.ts +14 -14
  94. package/front_end/models/elements/ElementUpdateRecord.ts +11 -11
  95. package/front_end/models/emulation/DeviceModeModel.ts +123 -131
  96. package/front_end/models/emulation/EmulatedDevices.ts +22 -22
  97. package/front_end/models/extensions/ExtensionPanel.ts +24 -24
  98. package/front_end/models/extensions/ExtensionServer.ts +4 -4
  99. package/front_end/models/javascript_metadata/NativeFunctions.js +14 -2
  100. package/front_end/models/persistence/IsolatedFileSystem.ts +18 -19
  101. package/front_end/models/persistence/IsolatedFileSystemManager.ts +13 -13
  102. package/front_end/models/trace/EventsSerializer.ts +5 -5
  103. package/front_end/models/trace/LanternComputationData.ts +10 -10
  104. package/front_end/models/trace/ModelImpl.ts +32 -54
  105. package/front_end/models/trace/Processor.ts +28 -30
  106. package/front_end/models/trace/extras/FilmStrip.ts +6 -6
  107. package/front_end/models/trace/extras/StackTraceForEvent.ts +22 -25
  108. package/front_end/models/trace/extras/ThirdParties.ts +16 -17
  109. package/front_end/models/trace/extras/TraceFilter.ts +1 -1
  110. package/front_end/models/trace/handlers/Threads.ts +10 -10
  111. package/front_end/models/trace/handlers/helpers.ts +9 -9
  112. package/front_end/models/trace/handlers/types.ts +3 -3
  113. package/front_end/models/trace/insights/CLSCulprits.ts +12 -14
  114. package/front_end/models/trace/insights/Cache.ts +8 -4
  115. package/front_end/models/trace/insights/DOMSize.ts +8 -5
  116. package/front_end/models/trace/insights/DocumentLatency.ts +2 -2
  117. package/front_end/models/trace/insights/DuplicatedJavaScript.ts +3 -3
  118. package/front_end/models/trace/insights/FontDisplay.ts +3 -4
  119. package/front_end/models/trace/insights/ForcedReflow.ts +3 -3
  120. package/front_end/models/trace/insights/INPBreakdown.ts +2 -2
  121. package/front_end/models/trace/insights/ImageDelivery.ts +11 -11
  122. package/front_end/models/trace/insights/LCPBreakdown.ts +4 -4
  123. package/front_end/models/trace/insights/LCPDiscovery.ts +4 -4
  124. package/front_end/models/trace/insights/LegacyJavaScript.ts +2 -2
  125. package/front_end/models/trace/insights/ModernHTTP.ts +4 -5
  126. package/front_end/models/trace/insights/NetworkDependencyTree.ts +12 -12
  127. package/front_end/models/trace/insights/RenderBlocking.ts +9 -10
  128. package/front_end/models/trace/insights/SlowCSSSelector.ts +2 -2
  129. package/front_end/models/trace/insights/ThirdParties.ts +4 -5
  130. package/front_end/models/trace/insights/Viewport.ts +8 -5
  131. package/front_end/models/trace/insights/types.ts +1 -0
  132. package/front_end/models/trace/lantern/testing/MetricTestUtils.ts +10 -10
  133. package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +52 -52
  134. package/front_end/panels/accessibility/AccessibilitySidebarView.ts +8 -8
  135. package/front_end/panels/animation/AnimationTimeline.ts +5 -5
  136. package/front_end/panels/animation/AnimationUI.ts +22 -23
  137. package/front_end/panels/application/ApplicationPanelSidebar.ts +12 -12
  138. package/front_end/panels/application/DOMStorageModel.ts +23 -23
  139. package/front_end/panels/application/ExtensionStorageModel.ts +31 -31
  140. package/front_end/panels/application/IndexedDBModel.ts +1 -0
  141. package/front_end/panels/application/PreloadingTreeElement.ts +8 -8
  142. package/front_end/panels/application/ServiceWorkersView.ts +0 -53
  143. package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +2 -2
  144. package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +2 -2
  145. package/front_end/panels/common/BadgeNotification.ts +140 -10
  146. package/front_end/panels/common/GdpSignUpDialog.ts +5 -0
  147. package/front_end/panels/common/badgeNotification.css +30 -9
  148. package/front_end/panels/console/ConsoleContextSelector.ts +9 -9
  149. package/front_end/panels/console/ConsolePrompt.ts +8 -5
  150. package/front_end/panels/console/ConsoleView.ts +13 -13
  151. package/front_end/panels/console/ConsoleViewport.ts +29 -29
  152. package/front_end/panels/coverage/CoverageModel.ts +22 -22
  153. package/front_end/panels/elements/ClassesPaneWidget.ts +1 -1
  154. package/front_end/panels/elements/ComputedStyleModel.ts +17 -18
  155. package/front_end/panels/elements/DOMPath.ts +2 -2
  156. package/front_end/panels/elements/ElementsPanel.ts +13 -13
  157. package/front_end/panels/elements/ElementsTreeElement.ts +30 -18
  158. package/front_end/panels/elements/ElementsTreeOutline.ts +44 -48
  159. package/front_end/panels/elements/ShortcutTreeElement.ts +4 -4
  160. package/front_end/panels/elements/StylePropertiesSection.ts +7 -4
  161. package/front_end/panels/elements/StylePropertyTreeElement.ts +54 -50
  162. package/front_end/panels/elements/StylesSidebarPane.ts +19 -19
  163. package/front_end/panels/emulation/DeviceModeToolbar.ts +7 -7
  164. package/front_end/panels/emulation/DeviceModeView.ts +6 -6
  165. package/front_end/panels/emulation/MediaQueryInspector.ts +18 -18
  166. package/front_end/panels/event_listeners/EventListenersView.ts +13 -14
  167. package/front_end/panels/layer_viewer/LayerTreeOutline.ts +3 -3
  168. package/front_end/panels/layer_viewer/LayerViewHost.ts +13 -13
  169. package/front_end/panels/layer_viewer/PaintProfilerView.ts +9 -10
  170. package/front_end/panels/layer_viewer/TransformController.ts +34 -36
  171. package/front_end/panels/layers/LayerTreeModel.ts +41 -40
  172. package/front_end/panels/lighthouse/LighthouseReportSelector.ts +13 -13
  173. package/front_end/panels/lighthouse/LighthouseStartView.ts +7 -7
  174. package/front_end/panels/media/PlayerMessagesView.ts +5 -5
  175. package/front_end/panels/media/TickingFlameChart.ts +24 -24
  176. package/front_end/panels/media/TickingFlameChartHelpers.ts +32 -32
  177. package/front_end/panels/network/NetworkItemView.ts +4 -4
  178. package/front_end/panels/network/NetworkLogViewColumns.ts +29 -29
  179. package/front_end/panels/network/NetworkPanel.ts +8 -5
  180. package/front_end/panels/network/ResourceWebSocketFrameView.ts +10 -10
  181. package/front_end/panels/profiler/HeapDetachedElementsView.ts +3 -3
  182. package/front_end/panels/profiler/HeapProfileView.ts +1 -1
  183. package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +3 -4
  184. package/front_end/panels/profiler/ProfileHeader.ts +25 -25
  185. package/front_end/panels/profiler/ProfileLauncherView.ts +5 -6
  186. package/front_end/panels/recorder/components/ReplaySection.ts +3 -1
  187. package/front_end/panels/security/OriginTreeElement.ts +8 -8
  188. package/front_end/panels/security/SecurityPanel.ts +5 -5
  189. package/front_end/panels/settings/SettingsScreen.ts +18 -18
  190. package/front_end/panels/settings/components/SyncSection.ts +26 -8
  191. package/front_end/panels/sources/AiCodeCompletionPlugin.ts +3 -0
  192. package/front_end/panels/sources/DebuggerPausedMessage.ts +8 -9
  193. package/front_end/panels/sources/NavigatorView.ts +43 -46
  194. package/front_end/panels/sources/SourcesPanel.ts +35 -35
  195. package/front_end/panels/sources/SourcesView.ts +13 -13
  196. package/front_end/panels/sources/TabbedEditorContainer.ts +19 -22
  197. package/front_end/panels/sources/UISourceCodeFrame.ts +4 -4
  198. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +34 -36
  199. package/front_end/panels/timeline/AnimationsTrackAppender.ts +3 -3
  200. package/front_end/panels/timeline/CompatibilityTracksAppender.ts +8 -8
  201. package/front_end/panels/timeline/CountersGraph.ts +16 -16
  202. package/front_end/panels/timeline/EntriesFilter.ts +4 -3
  203. package/front_end/panels/timeline/EventsTimelineTreeView.ts +3 -3
  204. package/front_end/panels/timeline/GPUTrackAppender.ts +3 -3
  205. package/front_end/panels/timeline/Initiators.ts +10 -10
  206. package/front_end/panels/timeline/InteractionsTrackAppender.ts +5 -5
  207. package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +7 -7
  208. package/front_end/panels/timeline/ModificationsManager.ts +8 -15
  209. package/front_end/panels/timeline/TargetForEvent.ts +2 -2
  210. package/front_end/panels/timeline/ThirdPartyTreeView.ts +1 -1
  211. package/front_end/panels/timeline/ThreadAppender.ts +13 -13
  212. package/front_end/panels/timeline/TimelineDetailsView.ts +6 -14
  213. package/front_end/panels/timeline/TimelineEventOverview.ts +27 -26
  214. package/front_end/panels/timeline/TimelineFilters.ts +5 -5
  215. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +54 -53
  216. package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +34 -34
  217. package/front_end/panels/timeline/TimelineFlameChartView.ts +18 -31
  218. package/front_end/panels/timeline/TimelineHistoryManager.ts +17 -18
  219. package/front_end/panels/timeline/TimelineMiniMap.ts +6 -6
  220. package/front_end/panels/timeline/TimelinePaintProfilerView.ts +6 -6
  221. package/front_end/panels/timeline/TimelinePanel.ts +73 -68
  222. package/front_end/panels/timeline/TimelineSelectorStatsView.ts +7 -5
  223. package/front_end/panels/timeline/TimelineTreeView.ts +10 -10
  224. package/front_end/panels/timeline/TimelineUIUtils.ts +47 -46
  225. package/front_end/panels/timeline/TimingsTrackAppender.ts +12 -12
  226. package/front_end/panels/timeline/TracingLayerTree.ts +43 -43
  227. package/front_end/panels/timeline/TrackConfigBanner.ts +6 -6
  228. package/front_end/panels/timeline/TrackConfiguration.ts +1 -1
  229. package/front_end/panels/timeline/components/DetailsView.ts +4 -4
  230. package/front_end/panels/timeline/components/LayoutShiftDetails.ts +12 -21
  231. package/front_end/panels/timeline/components/LiveMetricsView.ts +2 -1
  232. package/front_end/panels/timeline/components/NetworkRequestDetails.ts +5 -5
  233. package/front_end/panels/timeline/components/Sidebar.ts +4 -14
  234. package/front_end/panels/timeline/components/SidebarInsightsTab.ts +13 -36
  235. package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +21 -19
  236. package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +1 -1
  237. package/front_end/panels/timeline/components/insights/Cache.ts +4 -0
  238. package/front_end/panels/timeline/components/insights/DOMSize.ts +5 -1
  239. package/front_end/panels/timeline/components/insights/Helpers.ts +19 -0
  240. package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +1 -1
  241. package/front_end/panels/timeline/components/insights/Viewport.ts +4 -0
  242. package/front_end/panels/timeline/overlays/OverlaysImpl.ts +1 -1
  243. package/front_end/panels/timeline/utils/AICallTree.ts +11 -11
  244. package/front_end/panels/timeline/utils/AIContext.ts +17 -19
  245. package/front_end/panels/timeline/utils/EntityMapper.ts +6 -5
  246. package/front_end/panels/timeline/utils/EntryName.ts +2 -2
  247. package/front_end/panels/timeline/utils/EntryNodes.ts +5 -5
  248. package/front_end/panels/timeline/utils/EntryStyles.ts +4 -4
  249. package/front_end/panels/timeline/utils/FreshRecording.ts +3 -3
  250. package/front_end/panels/timeline/utils/Helpers.ts +0 -18
  251. package/front_end/panels/timeline/utils/InsightAIContext.ts +6 -6
  252. package/front_end/panels/timeline/utils/SourceMapsResolver.ts +7 -7
  253. package/front_end/panels/webauthn/WebauthnPane.ts +1 -0
  254. package/front_end/third_party/chromium/README.chromium +1 -1
  255. package/front_end/third_party/codemirror.next/chunk/angular.js +1 -1
  256. package/front_end/third_party/codemirror.next/chunk/angular.js.map +1 -1
  257. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  258. package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
  259. package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -1
  260. package/front_end/third_party/codemirror.next/chunk/cpp.js.map +1 -1
  261. package/front_end/third_party/codemirror.next/chunk/java.js +1 -1
  262. package/front_end/third_party/codemirror.next/chunk/java.js.map +1 -1
  263. package/front_end/third_party/codemirror.next/chunk/legacy.js +1 -1
  264. package/front_end/third_party/codemirror.next/chunk/legacy.js.map +1 -1
  265. package/front_end/third_party/codemirror.next/chunk/less.js +1 -1
  266. package/front_end/third_party/codemirror.next/chunk/less.js.map +1 -1
  267. package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -1
  268. package/front_end/third_party/codemirror.next/chunk/markdown.js.map +1 -1
  269. package/front_end/third_party/codemirror.next/chunk/php.js +1 -1
  270. package/front_end/third_party/codemirror.next/chunk/php.js.map +1 -1
  271. package/front_end/third_party/codemirror.next/chunk/python.js +1 -1
  272. package/front_end/third_party/codemirror.next/chunk/python.js.map +1 -1
  273. package/front_end/third_party/codemirror.next/chunk/sass.js +1 -1
  274. package/front_end/third_party/codemirror.next/chunk/sass.js.map +1 -1
  275. package/front_end/third_party/codemirror.next/chunk/svelte.js +1 -1
  276. package/front_end/third_party/codemirror.next/chunk/svelte.js.map +1 -1
  277. package/front_end/third_party/codemirror.next/chunk/vue.js +1 -1
  278. package/front_end/third_party/codemirror.next/chunk/vue.js.map +1 -1
  279. package/front_end/third_party/codemirror.next/chunk/wast.js +1 -1
  280. package/front_end/third_party/codemirror.next/chunk/wast.js.map +1 -1
  281. package/front_end/third_party/codemirror.next/chunk/xml.js +1 -1
  282. package/front_end/third_party/codemirror.next/chunk/xml.js.map +1 -1
  283. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
  284. package/front_end/third_party/codemirror.next/package.json +1 -1
  285. package/front_end/third_party/codemirror.next/rebuild.sh +1 -1
  286. package/front_end/third_party/json5/rebuild.sh +1 -1
  287. package/front_end/third_party/legacy-javascript/{update.sh → rebuild.sh} +1 -1
  288. package/front_end/third_party/lit/lib/decorators.d.ts +26 -9
  289. package/front_end/third_party/lit/lib/decorators.js +5 -5
  290. package/front_end/third_party/lit/lib/decorators.js.map +1 -1
  291. package/front_end/third_party/lit/lib/directive.js.map +1 -1
  292. package/front_end/third_party/lit/lib/directives.js +8 -13
  293. package/front_end/third_party/lit/lib/directives.js.map +1 -1
  294. package/front_end/third_party/lit/lib/lit.d.ts +26 -9
  295. package/front_end/third_party/lit/lib/lit.js +5 -5
  296. package/front_end/third_party/lit/lib/lit.js.map +1 -1
  297. package/front_end/third_party/lit/lib/static-html.js +2 -2
  298. package/front_end/third_party/lit/lib/static-html.js.map +1 -1
  299. package/front_end/third_party/lit/rebuild.sh +1 -1
  300. package/front_end/third_party/third-party-web/rebuild.sh +1 -1
  301. package/front_end/ui/components/dialogs/Dialog.ts +6 -7
  302. package/front_end/ui/legacy/ActionRegistration.ts +9 -9
  303. package/front_end/ui/legacy/DockController.ts +18 -18
  304. package/front_end/ui/legacy/FilterBar.ts +7 -7
  305. package/front_end/ui/legacy/Fragment.ts +4 -4
  306. package/front_end/ui/legacy/GlassPane.ts +12 -12
  307. package/front_end/ui/legacy/InspectorView.ts +5 -15
  308. package/front_end/ui/legacy/ListControl.ts +27 -27
  309. package/front_end/ui/legacy/ListWidget.ts +4 -4
  310. package/front_end/ui/legacy/PopoverHelper.ts +4 -4
  311. package/front_end/ui/legacy/ShortcutRegistry.ts +17 -17
  312. package/front_end/ui/legacy/TabbedPane.ts +74 -75
  313. package/front_end/ui/legacy/TextPrompt.ts +31 -31
  314. package/front_end/ui/legacy/Toolbar.ts +13 -14
  315. package/front_end/ui/legacy/ViewManager.ts +30 -31
  316. package/front_end/ui/legacy/Widget.ts +6 -6
  317. package/front_end/ui/legacy/XLink.ts +9 -9
  318. package/front_end/ui/legacy/ZoomManager.ts +9 -9
  319. package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +27 -27
  320. package/front_end/ui/legacy/components/color_picker/ContrastInfo.ts +30 -32
  321. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +15 -15
  322. package/front_end/ui/legacy/components/data_grid/DataGrid.ts +64 -64
  323. package/front_end/ui/legacy/components/data_grid/ShowMoreDataGridNode.ts +2 -2
  324. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +10 -11
  325. package/front_end/ui/legacy/components/perf_ui/ChartViewport.ts +12 -12
  326. package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +3 -3
  327. package/front_end/ui/legacy/components/perf_ui/TimelineGrid.ts +14 -14
  328. package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +8 -8
  329. package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +5 -5
  330. package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +4 -4
  331. package/front_end/ui/legacy/filter.css +1 -1
  332. package/front_end/ui/legacy/inspectorCommon.css +1 -1
  333. package/front_end/ui/legacy/softDropDownButton.css +1 -1
  334. package/front_end/ui/legacy/theme_support/ThemeSupport.ts +4 -4
  335. package/front_end/ui/visual_logging/KnownContextValues.ts +2 -2
  336. package/package.json +1 -1
  337. package/front_end/models/ai_assistance/data_formatters/Types.ts +0 -9
@@ -308,9 +308,9 @@ export class ResourceScriptFile extends Common.ObjectWrapper.ObjectWrapper<Resou
308
308
  readonly uiSourceCode: Workspace.UISourceCode.UISourceCode;
309
309
  readonly script: SDK.Script.Script|null;
310
310
  #scriptSource?: string|null;
311
- #isDivergingFromVMInternal?: boolean;
312
- #hasDivergedFromVMInternal?: boolean;
313
- #isMergingToVMInternal?: boolean;
311
+ #isDivergingFromVM?: boolean;
312
+ #hasDivergedFromVM?: boolean;
313
+ #isMergingToVM?: boolean;
314
314
  #updateMutex = new Common.Mutex.Mutex();
315
315
  constructor(
316
316
  resourceScriptMapping: ResourceScriptMapping, uiSourceCode: Workspace.UISourceCode.UISourceCode,
@@ -414,9 +414,9 @@ export class ResourceScriptFile extends Common.ObjectWrapper.ObjectWrapper<Resou
414
414
  // Do not interleave "divergeFromVM" with "mergeToVM" calls.
415
415
  const release = await this.#updateMutex.acquire();
416
416
  const diverged = this.isDiverged();
417
- if (diverged && !this.#hasDivergedFromVMInternal) {
417
+ if (diverged && !this.#hasDivergedFromVM) {
418
418
  await this.divergeFromVM();
419
- } else if (!diverged && this.#hasDivergedFromVMInternal) {
419
+ } else if (!diverged && this.#hasDivergedFromVM) {
420
420
  await this.mergeToVM();
421
421
  }
422
422
  release();
@@ -424,34 +424,34 @@ export class ResourceScriptFile extends Common.ObjectWrapper.ObjectWrapper<Resou
424
424
 
425
425
  private async divergeFromVM(): Promise<void> {
426
426
  if (this.script) {
427
- this.#isDivergingFromVMInternal = true;
427
+ this.#isDivergingFromVM = true;
428
428
  await this.#resourceScriptMapping.debuggerWorkspaceBinding.updateLocations(this.script);
429
- this.#isDivergingFromVMInternal = undefined;
430
- this.#hasDivergedFromVMInternal = true;
429
+ this.#isDivergingFromVM = undefined;
430
+ this.#hasDivergedFromVM = true;
431
431
  this.dispatchEventToListeners(ResourceScriptFile.Events.DID_DIVERGE_FROM_VM);
432
432
  }
433
433
  }
434
434
 
435
435
  private async mergeToVM(): Promise<void> {
436
436
  if (this.script) {
437
- this.#hasDivergedFromVMInternal = undefined;
438
- this.#isMergingToVMInternal = true;
437
+ this.#hasDivergedFromVM = undefined;
438
+ this.#isMergingToVM = true;
439
439
  await this.#resourceScriptMapping.debuggerWorkspaceBinding.updateLocations(this.script);
440
- this.#isMergingToVMInternal = undefined;
440
+ this.#isMergingToVM = undefined;
441
441
  this.dispatchEventToListeners(ResourceScriptFile.Events.DID_MERGE_TO_VM);
442
442
  }
443
443
  }
444
444
 
445
445
  hasDivergedFromVM(): boolean {
446
- return Boolean(this.#hasDivergedFromVMInternal);
446
+ return Boolean(this.#hasDivergedFromVM);
447
447
  }
448
448
 
449
449
  isDivergingFromVM(): boolean {
450
- return Boolean(this.#isDivergingFromVMInternal);
450
+ return Boolean(this.#isDivergingFromVM);
451
451
  }
452
452
 
453
453
  isMergingToVM(): boolean {
454
- return Boolean(this.#isMergingToVMInternal);
454
+ return Boolean(this.#isMergingToVM);
455
455
  }
456
456
 
457
457
  checkMapping(): void {
@@ -37,9 +37,9 @@ import type * as SDK from '../../core/sdk/sdk.js';
37
37
  export class ElementUpdateRecord {
38
38
  private modifiedAttributes?: Set<string>;
39
39
  private removedAttributes?: Set<string>;
40
- private hasChangedChildrenInternal?: boolean;
41
- private hasRemovedChildrenInternal?: boolean;
42
- private charDataModifiedInternal?: boolean;
40
+ #hasChangedChildren?: boolean;
41
+ #hasRemovedChildren?: boolean;
42
+ #charDataModified?: boolean;
43
43
 
44
44
  attributeModified(attrName: string): void {
45
45
  if (this.removedAttributes?.has(attrName)) {
@@ -62,20 +62,20 @@ export class ElementUpdateRecord {
62
62
  }
63
63
 
64
64
  nodeInserted(_node: SDK.DOMModel.DOMNode): void {
65
- this.hasChangedChildrenInternal = true;
65
+ this.#hasChangedChildren = true;
66
66
  }
67
67
 
68
68
  nodeRemoved(_node: SDK.DOMModel.DOMNode): void {
69
- this.hasChangedChildrenInternal = true;
70
- this.hasRemovedChildrenInternal = true;
69
+ this.#hasChangedChildren = true;
70
+ this.#hasRemovedChildren = true;
71
71
  }
72
72
 
73
73
  charDataModified(): void {
74
- this.charDataModifiedInternal = true;
74
+ this.#charDataModified = true;
75
75
  }
76
76
 
77
77
  childrenModified(): void {
78
- this.hasChangedChildrenInternal = true;
78
+ this.#hasChangedChildren = true;
79
79
  }
80
80
 
81
81
  isAttributeModified(attributeName: string): boolean {
@@ -88,14 +88,14 @@ export class ElementUpdateRecord {
88
88
  }
89
89
 
90
90
  isCharDataModified(): boolean {
91
- return Boolean(this.charDataModifiedInternal);
91
+ return Boolean(this.#charDataModified);
92
92
  }
93
93
 
94
94
  hasChangedChildren(): boolean {
95
- return Boolean(this.hasChangedChildrenInternal);
95
+ return Boolean(this.#hasChangedChildren);
96
96
  }
97
97
 
98
98
  hasRemovedChildren(): boolean {
99
- return Boolean(this.hasRemovedChildrenInternal);
99
+ return Boolean(this.#hasRemovedChildren);
100
100
  }
101
101
  }
@@ -88,50 +88,50 @@ let deviceModeModelInstance: DeviceModeModel|null;
88
88
 
89
89
  export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTypes> implements
90
90
  SDK.TargetManager.SDKModelObserver<SDK.EmulationModel.EmulationModel> {
91
- #screenRectInternal: Rect;
92
- #visiblePageRectInternal: Rect;
91
+ #screenRect: Rect;
92
+ #visiblePageRect: Rect;
93
93
  #availableSize: Geometry.Size;
94
94
  #preferredSize: Geometry.Size;
95
95
  #initialized: boolean;
96
- #appliedDeviceSizeInternal: Geometry.Size;
97
- #appliedDeviceScaleFactorInternal: number;
98
- #appliedUserAgentTypeInternal: UA;
99
- readonly #scaleSettingInternal: Common.Settings.Setting<number>;
100
- #scaleInternal: number;
96
+ #appliedDeviceSize: Geometry.Size;
97
+ #appliedDeviceScaleFactor: number;
98
+ #appliedUserAgentType: UA;
99
+ readonly #scaleSetting: Common.Settings.Setting<number>;
100
+ #scale: number;
101
101
  #widthSetting: Common.Settings.Setting<number>;
102
102
  #heightSetting: Common.Settings.Setting<number>;
103
- #uaSettingInternal: Common.Settings.Setting<UA>;
104
- readonly #deviceScaleFactorSettingInternal: Common.Settings.Setting<number>;
105
- readonly #deviceOutlineSettingInternal: Common.Settings.Setting<boolean>;
106
- readonly #toolbarControlsEnabledSettingInternal: Common.Settings.Setting<boolean>;
107
- #typeInternal: Type;
108
- #deviceInternal: EmulatedDevice|null;
109
- #modeInternal: Mode|null;
110
- #fitScaleInternal: number;
103
+ #uaSetting: Common.Settings.Setting<UA>;
104
+ readonly #deviceScaleFactorSetting: Common.Settings.Setting<number>;
105
+ readonly #deviceOutlineSetting: Common.Settings.Setting<boolean>;
106
+ readonly #toolbarControlsEnabledSetting: Common.Settings.Setting<boolean>;
107
+ #type: Type;
108
+ #device: EmulatedDevice|null;
109
+ #mode: Mode|null;
110
+ #fitScale: number;
111
111
  #touchEnabled: boolean;
112
112
  #touchMobile: boolean;
113
113
  #emulationModel: SDK.EmulationModel.EmulationModel|null;
114
114
  #onModelAvailable: (() => void)|null;
115
- #outlineRectInternal?: Rect;
115
+ #outlineRect?: Rect;
116
116
 
117
117
  private constructor() {
118
118
  super();
119
- this.#screenRectInternal = new Rect(0, 0, 1, 1);
120
- this.#visiblePageRectInternal = new Rect(0, 0, 1, 1);
119
+ this.#screenRect = new Rect(0, 0, 1, 1);
120
+ this.#visiblePageRect = new Rect(0, 0, 1, 1);
121
121
  this.#availableSize = new Geometry.Size(1, 1);
122
122
  this.#preferredSize = new Geometry.Size(1, 1);
123
123
  this.#initialized = false;
124
- this.#appliedDeviceSizeInternal = new Geometry.Size(1, 1);
125
- this.#appliedDeviceScaleFactorInternal = window.devicePixelRatio;
126
- this.#appliedUserAgentTypeInternal = UA.DESKTOP;
124
+ this.#appliedDeviceSize = new Geometry.Size(1, 1);
125
+ this.#appliedDeviceScaleFactor = window.devicePixelRatio;
126
+ this.#appliedUserAgentType = UA.DESKTOP;
127
127
 
128
- this.#scaleSettingInternal = Common.Settings.Settings.instance().createSetting('emulation.device-scale', 1);
128
+ this.#scaleSetting = Common.Settings.Settings.instance().createSetting('emulation.device-scale', 1);
129
129
  // We've used to allow zero before.
130
- if (!this.#scaleSettingInternal.get()) {
131
- this.#scaleSettingInternal.set(1);
130
+ if (!this.#scaleSetting.get()) {
131
+ this.#scaleSetting.set(1);
132
132
  }
133
- this.#scaleSettingInternal.addChangeListener(this.scaleSettingChanged, this);
134
- this.#scaleInternal = 1;
133
+ this.#scaleSetting.addChangeListener(this.scaleSettingChanged, this);
134
+ this.#scale = 1;
135
135
 
136
136
  this.#widthSetting = Common.Settings.Settings.instance().createSetting('emulation.device-width', 400);
137
137
  if (this.#widthSetting.get() < MinDeviceSize) {
@@ -151,23 +151,22 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
151
151
  }
152
152
  this.#heightSetting.addChangeListener(this.heightSettingChanged, this);
153
153
 
154
- this.#uaSettingInternal = Common.Settings.Settings.instance().createSetting('emulation.device-ua', UA.MOBILE);
155
- this.#uaSettingInternal.addChangeListener(this.uaSettingChanged, this);
156
- this.#deviceScaleFactorSettingInternal =
154
+ this.#uaSetting = Common.Settings.Settings.instance().createSetting('emulation.device-ua', UA.MOBILE);
155
+ this.#uaSetting.addChangeListener(this.uaSettingChanged, this);
156
+ this.#deviceScaleFactorSetting =
157
157
  Common.Settings.Settings.instance().createSetting('emulation.device-scale-factor', 0);
158
- this.#deviceScaleFactorSettingInternal.addChangeListener(this.deviceScaleFactorSettingChanged, this);
158
+ this.#deviceScaleFactorSetting.addChangeListener(this.deviceScaleFactorSettingChanged, this);
159
159
 
160
- this.#deviceOutlineSettingInternal =
161
- Common.Settings.Settings.instance().moduleSetting('emulation.show-device-outline');
162
- this.#deviceOutlineSettingInternal.addChangeListener(this.deviceOutlineSettingChanged, this);
160
+ this.#deviceOutlineSetting = Common.Settings.Settings.instance().moduleSetting('emulation.show-device-outline');
161
+ this.#deviceOutlineSetting.addChangeListener(this.deviceOutlineSettingChanged, this);
163
162
 
164
- this.#toolbarControlsEnabledSettingInternal = Common.Settings.Settings.instance().createSetting(
163
+ this.#toolbarControlsEnabledSetting = Common.Settings.Settings.instance().createSetting(
165
164
  'emulation.toolbar-controls-enabled', true, Common.Settings.SettingStorageType.SESSION);
166
165
 
167
- this.#typeInternal = Type.None;
168
- this.#deviceInternal = null;
169
- this.#modeInternal = null;
170
- this.#fitScaleInternal = 1;
166
+ this.#type = Type.None;
167
+ this.#device = null;
168
+ this.#mode = null;
169
+ this.#fitScale = 1;
171
170
  this.#touchEnabled = false;
172
171
  this.#touchMobile = false;
173
172
 
@@ -267,7 +266,7 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
267
266
  }
268
267
 
269
268
  get scaleSettingInternal(): Common.Settings.Setting<number> {
270
- return this.#scaleSettingInternal;
269
+ return this.#scaleSetting;
271
270
  }
272
271
 
273
272
  setAvailableSize(availableSize: Geometry.Size, preferredSize: Geometry.Size): void {
@@ -278,23 +277,22 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
278
277
  }
279
278
 
280
279
  emulate(type: Type, device: EmulatedDevice|null, mode: Mode|null, scale?: number): void {
281
- const resetPageScaleFactor =
282
- this.#typeInternal !== type || this.#deviceInternal !== device || this.#modeInternal !== mode;
283
- this.#typeInternal = type;
280
+ const resetPageScaleFactor = this.#type !== type || this.#device !== device || this.#mode !== mode;
281
+ this.#type = type;
284
282
 
285
283
  if (type === Type.Device && device && mode) {
286
284
  console.assert(Boolean(device) && Boolean(mode), 'Must pass device and mode for device emulation');
287
- this.#modeInternal = mode;
288
- this.#deviceInternal = device;
285
+ this.#mode = mode;
286
+ this.#device = device;
289
287
  if (this.#initialized) {
290
288
  const orientation = device.orientationByName(mode.orientation);
291
- this.#scaleSettingInternal.set(
289
+ this.#scaleSetting.set(
292
290
  scale ||
293
291
  this.calculateFitScale(orientation.width, orientation.height, this.currentOutline(), this.currentInsets()));
294
292
  }
295
293
  } else {
296
- this.#deviceInternal = null;
297
- this.#modeInternal = null;
294
+ this.#device = null;
295
+ this.#mode = null;
298
296
  }
299
297
 
300
298
  if (type !== Type.None) {
@@ -311,7 +309,7 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
311
309
 
312
310
  setWidthAndScaleToFit(width: number): void {
313
311
  width = Math.max(Math.min(width, MaxDeviceSize), 1);
314
- this.#scaleSettingInternal.set(this.calculateFitScale(width, this.#heightSetting.get()));
312
+ this.#scaleSetting.set(this.calculateFitScale(width, this.#heightSetting.get()));
315
313
  this.#widthSetting.set(width);
316
314
  }
317
315
 
@@ -326,66 +324,65 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
326
324
 
327
325
  setHeightAndScaleToFit(height: number): void {
328
326
  height = Math.max(Math.min(height, MaxDeviceSize), 0);
329
- this.#scaleSettingInternal.set(this.calculateFitScale(this.#widthSetting.get(), height));
327
+ this.#scaleSetting.set(this.calculateFitScale(this.#widthSetting.get(), height));
330
328
  this.#heightSetting.set(height);
331
329
  }
332
330
 
333
331
  setScale(scale: number): void {
334
- this.#scaleSettingInternal.set(scale);
332
+ this.#scaleSetting.set(scale);
335
333
  }
336
334
 
337
335
  device(): EmulatedDevice|null {
338
- return this.#deviceInternal;
336
+ return this.#device;
339
337
  }
340
338
 
341
339
  mode(): Mode|null {
342
- return this.#modeInternal;
340
+ return this.#mode;
343
341
  }
344
342
 
345
343
  type(): Type {
346
- return this.#typeInternal;
344
+ return this.#type;
347
345
  }
348
346
 
349
347
  screenImage(): string {
350
- return (this.#deviceInternal && this.#modeInternal) ? this.#deviceInternal.modeImage(this.#modeInternal) : '';
348
+ return (this.#device && this.#mode) ? this.#device.modeImage(this.#mode) : '';
351
349
  }
352
350
 
353
351
  outlineImage(): string {
354
- return (this.#deviceInternal && this.#modeInternal && this.#deviceOutlineSettingInternal.get()) ?
355
- this.#deviceInternal.outlineImage(this.#modeInternal) :
356
- '';
352
+ return (this.#device && this.#mode && this.#deviceOutlineSetting.get()) ? this.#device.outlineImage(this.#mode) :
353
+ '';
357
354
  }
358
355
 
359
356
  outlineRect(): Rect|null {
360
- return this.#outlineRectInternal || null;
357
+ return this.#outlineRect || null;
361
358
  }
362
359
 
363
360
  screenRect(): Rect {
364
- return this.#screenRectInternal;
361
+ return this.#screenRect;
365
362
  }
366
363
 
367
364
  visiblePageRect(): Rect {
368
- return this.#visiblePageRectInternal;
365
+ return this.#visiblePageRect;
369
366
  }
370
367
 
371
368
  scale(): number {
372
- return this.#scaleInternal;
369
+ return this.#scale;
373
370
  }
374
371
 
375
372
  fitScale(): number {
376
- return this.#fitScaleInternal;
373
+ return this.#fitScale;
377
374
  }
378
375
 
379
376
  appliedDeviceSize(): Geometry.Size {
380
- return this.#appliedDeviceSizeInternal;
377
+ return this.#appliedDeviceSize;
381
378
  }
382
379
 
383
380
  appliedDeviceScaleFactor(): number {
384
- return this.#appliedDeviceScaleFactorInternal;
381
+ return this.#appliedDeviceScaleFactor;
385
382
  }
386
383
 
387
384
  appliedUserAgentType(): UA {
388
- return this.#appliedUserAgentTypeInternal;
385
+ return this.#appliedUserAgentType;
389
386
  }
390
387
 
391
388
  isFullHeight(): boolean {
@@ -393,13 +390,13 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
393
390
  }
394
391
 
395
392
  isMobile(): boolean {
396
- switch (this.#typeInternal) {
393
+ switch (this.#type) {
397
394
  case Type.Device:
398
- return this.#deviceInternal ? this.#deviceInternal.mobile() : false;
395
+ return this.#device ? this.#device.mobile() : false;
399
396
  case Type.None:
400
397
  return false;
401
398
  case Type.Responsive:
402
- return this.#uaSettingInternal.get() === UA.MOBILE || this.#uaSettingInternal.get() === UA.MOBILE_NO_TOUCH;
399
+ return this.#uaSetting.get() === UA.MOBILE || this.#uaSetting.get() === UA.MOBILE_NO_TOUCH;
403
400
  }
404
401
  return false;
405
402
  }
@@ -409,31 +406,31 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
409
406
  }
410
407
 
411
408
  scaleSetting(): Common.Settings.Setting<number> {
412
- return this.#scaleSettingInternal;
409
+ return this.#scaleSetting;
413
410
  }
414
411
 
415
412
  uaSetting(): Common.Settings.Setting<UA> {
416
- return this.#uaSettingInternal;
413
+ return this.#uaSetting;
417
414
  }
418
415
 
419
416
  deviceScaleFactorSetting(): Common.Settings.Setting<number> {
420
- return this.#deviceScaleFactorSettingInternal;
417
+ return this.#deviceScaleFactorSetting;
421
418
  }
422
419
 
423
420
  deviceOutlineSetting(): Common.Settings.Setting<boolean> {
424
- return this.#deviceOutlineSettingInternal;
421
+ return this.#deviceOutlineSetting;
425
422
  }
426
423
 
427
424
  toolbarControlsEnabledSetting(): Common.Settings.Setting<boolean> {
428
- return this.#toolbarControlsEnabledSettingInternal;
425
+ return this.#toolbarControlsEnabledSetting;
429
426
  }
430
427
 
431
428
  reset(): void {
432
- this.#deviceScaleFactorSettingInternal.set(0);
433
- this.#scaleSettingInternal.set(1);
429
+ this.#deviceScaleFactorSetting.set(0);
430
+ this.#scaleSetting.set(1);
434
431
  this.setWidth(400);
435
432
  this.setHeight(0);
436
- this.#uaSettingInternal.set(UA.MOBILE);
433
+ this.#uaSetting.set(UA.MOBILE);
437
434
  }
438
435
 
439
436
  modelAdded(emulationModel: SDK.EmulationModel.EmulationModel): void {
@@ -499,37 +496,37 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
499
496
  }
500
497
 
501
498
  private preferredScaledWidth(): number {
502
- return Math.floor(this.#preferredSize.width / (this.#scaleSettingInternal.get() || 1));
499
+ return Math.floor(this.#preferredSize.width / (this.#scaleSetting.get() || 1));
503
500
  }
504
501
 
505
502
  private preferredScaledHeight(): number {
506
- return Math.floor(this.#preferredSize.height / (this.#scaleSettingInternal.get() || 1));
503
+ return Math.floor(this.#preferredSize.height / (this.#scaleSetting.get() || 1));
507
504
  }
508
505
 
509
506
  private currentOutline(): Insets {
510
507
  let outline: Insets = new Insets(0, 0, 0, 0);
511
- if (this.#typeInternal !== Type.Device || !this.#deviceInternal || !this.#modeInternal) {
508
+ if (this.#type !== Type.Device || !this.#device || !this.#mode) {
512
509
  return outline;
513
510
  }
514
- const orientation = this.#deviceInternal.orientationByName(this.#modeInternal.orientation);
515
- if (this.#deviceOutlineSettingInternal.get()) {
511
+ const orientation = this.#device.orientationByName(this.#mode.orientation);
512
+ if (this.#deviceOutlineSetting.get()) {
516
513
  outline = orientation.outlineInsets || outline;
517
514
  }
518
515
  return outline;
519
516
  }
520
517
 
521
518
  private currentInsets(): Insets {
522
- if (this.#typeInternal !== Type.Device || !this.#modeInternal) {
519
+ if (this.#type !== Type.Device || !this.#mode) {
523
520
  return new Insets(0, 0, 0, 0);
524
521
  }
525
- return this.#modeInternal.insets;
522
+ return this.#mode.insets;
526
523
  }
527
524
 
528
525
  private getScreenOrientationType(): Protocol.Emulation.ScreenOrientationType {
529
- if (!this.#modeInternal) {
526
+ if (!this.#mode) {
530
527
  throw new Error('Mode required to get orientation type.');
531
528
  }
532
- switch (this.#modeInternal.orientation) {
529
+ switch (this.#mode.orientation) {
533
530
  case VerticalSpanned:
534
531
  case Vertical:
535
532
  return Protocol.Emulation.ScreenOrientationType.PortraitPrimary;
@@ -549,30 +546,30 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
549
546
  if (overlayModel) {
550
547
  this.showHingeIfApplicable(overlayModel);
551
548
  }
552
- if (this.#typeInternal === Type.Device && this.#deviceInternal && this.#modeInternal) {
553
- const orientation = this.#deviceInternal.orientationByName(this.#modeInternal.orientation);
549
+ if (this.#type === Type.Device && this.#device && this.#mode) {
550
+ const orientation = this.#device.orientationByName(this.#mode.orientation);
554
551
  const outline = this.currentOutline();
555
552
  const insets = this.currentInsets();
556
- this.#fitScaleInternal = this.calculateFitScale(orientation.width, orientation.height, outline, insets);
553
+ this.#fitScale = this.calculateFitScale(orientation.width, orientation.height, outline, insets);
557
554
  if (mobile) {
558
- this.#appliedUserAgentTypeInternal = this.#deviceInternal.touch() ? UA.MOBILE : UA.MOBILE_NO_TOUCH;
555
+ this.#appliedUserAgentType = this.#device.touch() ? UA.MOBILE : UA.MOBILE_NO_TOUCH;
559
556
  } else {
560
- this.#appliedUserAgentTypeInternal = this.#deviceInternal.touch() ? UA.DESKTOP_TOUCH : UA.DESKTOP;
557
+ this.#appliedUserAgentType = this.#device.touch() ? UA.DESKTOP_TOUCH : UA.DESKTOP;
561
558
  }
562
559
  this.applyDeviceMetrics(
563
- new Geometry.Size(orientation.width, orientation.height), insets, outline, this.#scaleSettingInternal.get(),
564
- this.#deviceInternal.deviceScaleFactor, mobile, this.getScreenOrientationType(), resetPageScaleFactor);
565
- this.applyUserAgent(this.#deviceInternal.userAgent, this.#deviceInternal.userAgentMetadata);
566
- this.applyTouch(this.#deviceInternal.touch(), mobile);
567
- } else if (this.#typeInternal === Type.None) {
568
- this.#fitScaleInternal = this.calculateFitScale(this.#availableSize.width, this.#availableSize.height);
569
- this.#appliedUserAgentTypeInternal = UA.DESKTOP;
560
+ new Geometry.Size(orientation.width, orientation.height), insets, outline, this.#scaleSetting.get(),
561
+ this.#device.deviceScaleFactor, mobile, this.getScreenOrientationType(), resetPageScaleFactor);
562
+ this.applyUserAgent(this.#device.userAgent, this.#device.userAgentMetadata);
563
+ this.applyTouch(this.#device.touch(), mobile);
564
+ } else if (this.#type === Type.None) {
565
+ this.#fitScale = this.calculateFitScale(this.#availableSize.width, this.#availableSize.height);
566
+ this.#appliedUserAgentType = UA.DESKTOP;
570
567
  this.applyDeviceMetrics(
571
568
  this.#availableSize, new Insets(0, 0, 0, 0), new Insets(0, 0, 0, 0), 1, 0, mobile, null,
572
569
  resetPageScaleFactor);
573
570
  this.applyUserAgent('', null);
574
571
  this.applyTouch(false, false);
575
- } else if (this.#typeInternal === Type.Responsive) {
572
+ } else if (this.#type === Type.Responsive) {
576
573
  let screenWidth = this.#widthSetting.get();
577
574
  if (!screenWidth || screenWidth > this.preferredScaledWidth()) {
578
575
  screenWidth = this.preferredScaledWidth();
@@ -582,23 +579,22 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
582
579
  screenHeight = this.preferredScaledHeight();
583
580
  }
584
581
  const defaultDeviceScaleFactor = mobile ? defaultMobileScaleFactor : 0;
585
- this.#fitScaleInternal = this.calculateFitScale(this.#widthSetting.get(), this.#heightSetting.get());
586
- this.#appliedUserAgentTypeInternal = this.#uaSettingInternal.get();
582
+ this.#fitScale = this.calculateFitScale(this.#widthSetting.get(), this.#heightSetting.get());
583
+ this.#appliedUserAgentType = this.#uaSetting.get();
587
584
  this.applyDeviceMetrics(
588
585
  new Geometry.Size(screenWidth, screenHeight), new Insets(0, 0, 0, 0), new Insets(0, 0, 0, 0),
589
- this.#scaleSettingInternal.get(), this.#deviceScaleFactorSettingInternal.get() || defaultDeviceScaleFactor,
590
- mobile,
586
+ this.#scaleSetting.get(), this.#deviceScaleFactorSetting.get() || defaultDeviceScaleFactor, mobile,
591
587
  screenHeight >= screenWidth ? Protocol.Emulation.ScreenOrientationType.PortraitPrimary :
592
588
  Protocol.Emulation.ScreenOrientationType.LandscapePrimary,
593
589
  resetPageScaleFactor);
594
590
  this.applyUserAgent(mobile ? defaultMobileUserAgent : '', mobile ? defaultMobileUserAgentMetadata : null);
595
591
  this.applyTouch(
596
- this.#uaSettingInternal.get() === UA.DESKTOP_TOUCH || this.#uaSettingInternal.get() === UA.MOBILE,
597
- this.#uaSettingInternal.get() === UA.MOBILE);
592
+ this.#uaSetting.get() === UA.DESKTOP_TOUCH || this.#uaSetting.get() === UA.MOBILE,
593
+ this.#uaSetting.get() === UA.MOBILE);
598
594
  }
599
595
 
600
596
  if (overlayModel) {
601
- overlayModel.setShowViewportSizeOnResize(this.#typeInternal === Type.None);
597
+ overlayModel.setShowViewportSizeOnResize(this.#type === Type.None);
602
598
  }
603
599
  this.dispatchEventToListeners(Events.UPDATED);
604
600
  }
@@ -631,7 +627,7 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
631
627
  }
632
628
 
633
629
  setSizeAndScaleToFit(width: number, height: number): void {
634
- this.#scaleSettingInternal.set(this.calculateFitScale(width, height));
630
+ this.#scaleSetting.set(this.calculateFitScale(width, height));
635
631
  this.setWidth(width);
636
632
  this.setHeight(height);
637
633
  }
@@ -655,20 +651,19 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
655
651
  const screenOrientationAngle =
656
652
  screenOrientation === Protocol.Emulation.ScreenOrientationType.LandscapePrimary ? 90 : 0;
657
653
 
658
- this.#appliedDeviceSizeInternal = screenSize;
659
- this.#appliedDeviceScaleFactorInternal = deviceScaleFactor || window.devicePixelRatio;
660
- this.#screenRectInternal = new Rect(
654
+ this.#appliedDeviceSize = screenSize;
655
+ this.#appliedDeviceScaleFactor = deviceScaleFactor || window.devicePixelRatio;
656
+ this.#screenRect = new Rect(
661
657
  Math.max(0, (this.#availableSize.width - screenSize.width * scale) / 2), outline.top * scale,
662
658
  screenSize.width * scale, screenSize.height * scale);
663
- this.#outlineRectInternal = new Rect(
664
- this.#screenRectInternal.left - outline.left * scale, 0,
665
- (outline.left + screenSize.width + outline.right) * scale,
659
+ this.#outlineRect = new Rect(
660
+ this.#screenRect.left - outline.left * scale, 0, (outline.left + screenSize.width + outline.right) * scale,
666
661
  (outline.top + screenSize.height + outline.bottom) * scale);
667
- this.#visiblePageRectInternal = new Rect(
662
+ this.#visiblePageRect = new Rect(
668
663
  positionX * scale, positionY * scale,
669
- Math.min(pageWidth * scale, this.#availableSize.width - this.#screenRectInternal.left - positionX * scale),
670
- Math.min(pageHeight * scale, this.#availableSize.height - this.#screenRectInternal.top - positionY * scale));
671
- this.#scaleInternal = scale;
664
+ Math.min(pageWidth * scale, this.#availableSize.width - this.#screenRect.left - positionX * scale),
665
+ Math.min(pageHeight * scale, this.#availableSize.height - this.#screenRect.top - positionY * scale));
666
+ this.#scale = scale;
672
667
  const displayFeature = this.getDisplayFeature();
673
668
  if (!displayFeature) {
674
669
  // When sending displayFeature, we cannot use the optimization below due to backend restrictions.
@@ -678,9 +673,8 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
678
673
  pageWidth = 0;
679
674
  pageHeight = 0;
680
675
  }
681
- if (this.#visiblePageRectInternal.width === pageWidth * scale &&
682
- this.#visiblePageRectInternal.height === pageHeight * scale && Number.isInteger(pageWidth * scale) &&
683
- Number.isInteger(pageHeight * scale)) {
676
+ if (this.#visiblePageRect.width === pageWidth * scale && this.#visiblePageRect.height === pageHeight * scale &&
677
+ Number.isInteger(pageWidth * scale) && Number.isInteger(pageHeight * scale)) {
684
678
  // When we only have to apply scale, do not resize the page. This will speed things up and remove lag.
685
679
  pageWidth = 0;
686
680
  pageHeight = 0;
@@ -763,8 +757,8 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
763
757
  mobile: false,
764
758
  };
765
759
  if (fullSize && this.#emulationModel) {
766
- if (this.#deviceInternal && this.#modeInternal) {
767
- const orientation = this.#deviceInternal.orientationByName(this.#modeInternal.orientation);
760
+ if (this.#device && this.#mode) {
761
+ const orientation = this.#device.orientationByName(this.#mode.orientation);
768
762
  deviceMetrics.width = orientation.width;
769
763
  deviceMetrics.height = orientation.height;
770
764
  const dispFeature = this.getDisplayFeature();
@@ -793,9 +787,7 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
793
787
  }
794
788
 
795
789
  private showHingeIfApplicable(overlayModel: SDK.OverlayModel.OverlayModel): void {
796
- const orientation = (this.#deviceInternal && this.#modeInternal) ?
797
- this.#deviceInternal.orientationByName(this.#modeInternal.orientation) :
798
- null;
790
+ const orientation = (this.#device && this.#mode) ? this.#device.orientationByName(this.#mode.orientation) : null;
799
791
  if (orientation?.hinge) {
800
792
  overlayModel.showHingeForDualScreen(orientation.hinge);
801
793
  return;
@@ -805,10 +797,10 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
805
797
  }
806
798
 
807
799
  private getDisplayFeatureOrientation(): Protocol.Emulation.DisplayFeatureOrientation {
808
- if (!this.#modeInternal) {
800
+ if (!this.#mode) {
809
801
  throw new Error('Mode required to get display feature orientation.');
810
802
  }
811
- switch (this.#modeInternal.orientation) {
803
+ switch (this.#mode.orientation) {
812
804
  case VerticalSpanned:
813
805
  case Vertical:
814
806
  return Protocol.Emulation.DisplayFeatureOrientation.Vertical;
@@ -820,12 +812,12 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
820
812
  }
821
813
 
822
814
  private getDisplayFeature(): Protocol.Emulation.DisplayFeature|null {
823
- if (!this.#deviceInternal || !this.#modeInternal ||
824
- (this.#modeInternal.orientation !== VerticalSpanned && this.#modeInternal.orientation !== HorizontalSpanned)) {
815
+ if (!this.#device || !this.#mode ||
816
+ (this.#mode.orientation !== VerticalSpanned && this.#mode.orientation !== HorizontalSpanned)) {
825
817
  return null;
826
818
  }
827
819
 
828
- const orientation = this.#deviceInternal.orientationByName(this.#modeInternal.orientation);
820
+ const orientation = this.#device.orientationByName(this.#mode.orientation);
829
821
  if (!orientation?.hinge) {
830
822
  return null;
831
823
  }
@@ -833,8 +825,8 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
833
825
  const hinge = orientation.hinge;
834
826
  return {
835
827
  orientation: this.getDisplayFeatureOrientation(),
836
- offset: (this.#modeInternal.orientation === VerticalSpanned) ? hinge.x : hinge.y,
837
- maskLength: (this.#modeInternal.orientation === VerticalSpanned) ? hinge.width : hinge.height,
828
+ offset: (this.#mode.orientation === VerticalSpanned) ? hinge.x : hinge.y,
829
+ maskLength: (this.#mode.orientation === VerticalSpanned) ? hinge.width : hinge.height,
838
830
  };
839
831
  }
840
832
  }