chrome-devtools-frontend 1.0.1681091 → 1.0.1682249

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 (208) hide show
  1. package/eslint.config.mjs +8 -3
  2. package/front_end/core/sdk/ConsoleModel.ts +1 -1
  3. package/front_end/core/sdk/DOMModel.ts +8 -0
  4. package/front_end/core/sdk/NetworkManager.ts +9 -4
  5. package/front_end/core/sdk/OverlayModel.ts +3 -2
  6. package/front_end/core/sdk/PreloadingModel.ts +44 -22
  7. package/front_end/core/sdk/RemoteObject.ts +4 -1
  8. package/front_end/core/sdk/RuntimeModel.ts +5 -5
  9. package/front_end/core/sdk/SDKSettings.ts +19 -0
  10. package/front_end/core/sdk/sdk.ts +2 -0
  11. package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +1 -1
  12. package/front_end/entrypoints/inspector_main/InspectorMain.ts +3 -1
  13. package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +1 -5
  14. package/front_end/entrypoints/main/MainImpl.ts +9 -10
  15. package/front_end/entrypoints/main/main-meta.ts +82 -0
  16. package/front_end/entrypoints/shell/shell.ts +0 -5
  17. package/front_end/entrypoints/trace_app/trace_app.ts +0 -5
  18. package/front_end/generated/InspectorBackendCommands.ts +2 -0
  19. package/front_end/generated/protocol-mapping.d.ts +16 -0
  20. package/front_end/generated/protocol-proxy-api.d.ts +12 -0
  21. package/front_end/generated/protocol.ts +12 -0
  22. package/front_end/models/ai_assistance/ExtensionScope.ts +11 -12
  23. package/front_end/models/ai_assistance/agents/AiAgent.ts +1 -1
  24. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +2 -1
  25. package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +1 -1
  26. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +2 -1
  27. package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +2 -1
  28. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +8 -8
  29. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +8 -8
  30. package/front_end/models/ai_code_completion/debug.ts +6 -3
  31. package/front_end/models/ai_code_generation/debug.ts +6 -3
  32. package/front_end/models/badges/UserBadges.ts +9 -2
  33. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +1 -0
  34. package/front_end/models/emulation/DeviceModeModel.ts +16 -27
  35. package/front_end/models/emulation/EmulatedDevices.ts +30 -125
  36. package/front_end/models/extensions/ExtensionAPI.ts +34 -23
  37. package/front_end/models/formatter/ScriptFormatter.ts +1 -0
  38. package/front_end/models/javascript_metadata/NativeFunctions.js +5 -1
  39. package/front_end/models/live-metrics/web-vitals-injected/spec/spec.ts +4 -4
  40. package/front_end/models/logs/NetworkLog.ts +11 -4
  41. package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +4 -2
  42. package/front_end/models/persistence/NetworkPersistenceManager.ts +7 -1
  43. package/front_end/models/stack_trace/StackTraceImpl.ts +1 -0
  44. package/front_end/models/trace/Name.ts +5 -5
  45. package/front_end/models/trace/Styles.ts +115 -115
  46. package/front_end/models/trace/extras/TraceTree.ts +2 -1
  47. package/front_end/models/trace/helpers/Network.ts +4 -1
  48. package/front_end/models/trace/insights/CLSCulprits.ts +4 -2
  49. package/front_end/models/trace/insights/CharacterSet.ts +3 -3
  50. package/front_end/models/trace/insights/DOMSize.ts +1 -1
  51. package/front_end/models/trace/insights/DuplicatedJavaScript.ts +6 -2
  52. package/front_end/models/trace/insights/FontDisplay.ts +9 -3
  53. package/front_end/models/trace/insights/ForcedReflow.ts +4 -4
  54. package/front_end/models/trace/insights/INPBreakdown.ts +3 -4
  55. package/front_end/models/trace/insights/ImageDelivery.ts +2 -2
  56. package/front_end/models/trace/insights/LCPBreakdown.ts +1 -1
  57. package/front_end/models/trace/insights/LCPDiscovery.ts +5 -5
  58. package/front_end/models/trace/insights/LegacyJavaScript.ts +7 -3
  59. package/front_end/models/trace/insights/ModernHTTP.ts +3 -3
  60. package/front_end/models/trace/insights/NetworkDependencyTree.ts +13 -9
  61. package/front_end/models/trace/insights/RenderBlocking.ts +1 -1
  62. package/front_end/models/trace/insights/SlowCSSSelector.ts +29 -25
  63. package/front_end/models/trace/insights/ThirdParties.ts +13 -5
  64. package/front_end/models/trace/insights/Viewport.ts +4 -2
  65. package/front_end/models/workspace/IgnoreListManager.ts +53 -17
  66. package/front_end/panels/accessibility/ARIAAttributesView.ts +11 -2
  67. package/front_end/panels/ai_assistance/components/ChatMessage.ts +67 -53
  68. package/front_end/panels/ai_assistance/components/ChatView.ts +2 -2
  69. package/front_end/panels/ai_assistance/components/StylingAgentMarkdownRenderer.ts +2 -2
  70. package/front_end/panels/ai_assistance/components/WalkthroughView.ts +5 -5
  71. package/front_end/panels/animation/AnimationTimeline.ts +2 -0
  72. package/front_end/panels/application/ServiceWorkersView.ts +1 -1
  73. package/front_end/panels/application/StorageView.ts +2 -0
  74. package/front_end/panels/application/preloading/PreloadingView.ts +9 -3
  75. package/front_end/panels/application/preloading/components/components.ts +2 -0
  76. package/front_end/panels/browser_debugger/ObjectEventListenersSidebarPane.ts +10 -11
  77. package/front_end/panels/changes/CombinedDiffView.ts +1 -1
  78. package/front_end/panels/common/BadgeNotification.ts +1 -1
  79. package/front_end/panels/common/ExtensionPanel.ts +12 -7
  80. package/front_end/panels/common/ExtensionServer.ts +85 -26
  81. package/front_end/panels/common/GdpSignUpDialog.ts +1 -1
  82. package/front_end/panels/console/ConsoleView.ts +2 -1
  83. package/front_end/panels/console/ConsoleViewMessage.ts +3 -2
  84. package/front_end/panels/console/console-meta.ts +9 -0
  85. package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +9 -4
  86. package/front_end/panels/elements/CSSRuleValidator.ts +12 -12
  87. package/front_end/panels/elements/CSSSpecificityBreakdown.ts +1 -1
  88. package/front_end/panels/elements/ClassesPaneWidget.ts +6 -6
  89. package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +1 -1
  90. package/front_end/panels/elements/ComputedStyleWidget.ts +4 -5
  91. package/front_end/panels/elements/DOMTreeContextMenu.ts +3 -6
  92. package/front_end/panels/elements/ElementIssueUtils.ts +20 -20
  93. package/front_end/panels/elements/ElementStatePaneWidget.ts +9 -6
  94. package/front_end/panels/elements/ElementsPanel.ts +10 -10
  95. package/front_end/panels/elements/ElementsTreeElement.ts +35 -29
  96. package/front_end/panels/elements/ElementsTreeOutline.ts +5 -20
  97. package/front_end/panels/elements/EventListenersWidget.ts +18 -19
  98. package/front_end/panels/elements/LayersWidget.ts +4 -4
  99. package/front_end/panels/elements/LayoutPane.ts +11 -11
  100. package/front_end/panels/elements/MarkerDecorator.ts +3 -3
  101. package/front_end/panels/elements/PlatformFontsWidget.ts +8 -8
  102. package/front_end/panels/elements/PropertiesWidget.ts +4 -4
  103. package/front_end/panels/elements/PropertyRenderer.ts +2 -2
  104. package/front_end/panels/elements/ShortcutTreeElement.ts +1 -1
  105. package/front_end/panels/elements/StylePropertiesSection.ts +14 -14
  106. package/front_end/panels/elements/StylePropertyTreeElement.ts +21 -21
  107. package/front_end/panels/elements/StylesSidebarPane.ts +12 -13
  108. package/front_end/panels/elements/components/AccessibilityTreeNode.ts +1 -1
  109. package/front_end/panels/elements/components/CSSHintDetailsView.ts +1 -1
  110. package/front_end/panels/elements/components/CSSVariableValueView.ts +3 -3
  111. package/front_end/panels/elements/components/ElementsBreadcrumbsUtils.ts +2 -2
  112. package/front_end/panels/elements/components/ElementsTreeExpandButton.ts +1 -1
  113. package/front_end/panels/elements/elements-meta.ts +13 -13
  114. package/front_end/panels/issues/AffectedCookiesView.ts +2 -0
  115. package/front_end/panels/issues/AffectedElementsView.ts +5 -0
  116. package/front_end/panels/issues/IssueView.ts +12 -8
  117. package/front_end/panels/layer_viewer/LayerDetailsView.ts +11 -7
  118. package/front_end/panels/layer_viewer/LayerTreeOutline.ts +2 -0
  119. package/front_end/panels/linear_memory_inspector/components/LinearMemoryViewer.ts +1 -1
  120. package/front_end/panels/media/PlayerPropertiesView.ts +309 -416
  121. package/front_end/panels/media/playerPropertiesView.css +1 -1
  122. package/front_end/panels/network/NetworkLogView.ts +5 -2
  123. package/front_end/panels/network/NetworkOverview.ts +11 -5
  124. package/front_end/panels/network/NetworkPanel.ts +4 -2
  125. package/front_end/panels/network/NetworkWaterfallColumn.ts +16 -3
  126. package/front_end/panels/network/RequestHeadersView.ts +4 -4
  127. package/front_end/panels/network/components/ResponseHeaderSection.ts +7 -4
  128. package/front_end/panels/network/network-meta.ts +63 -0
  129. package/front_end/panels/performance_monitor/PerformanceMonitor.ts +2 -1
  130. package/front_end/panels/recorder/RecordingView.ts +89 -73
  131. package/front_end/panels/recorder/ReplaySection.ts +59 -40
  132. package/front_end/panels/recorder/injected/injected.ts +4 -0
  133. package/front_end/panels/security/SecurityPanel.ts +5 -6
  134. package/front_end/panels/security/SecurityPanelSidebar.ts +244 -204
  135. package/front_end/panels/security/security.ts +0 -4
  136. package/front_end/panels/settings/EditFileSystemView.ts +8 -7
  137. package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +20 -14
  138. package/front_end/panels/settings/components/SyncSection.ts +1 -1
  139. package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +0 -3
  140. package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +10 -11
  141. package/front_end/panels/sources/NavigatorView.ts +6 -2
  142. package/front_end/panels/sources/SourcesNavigator.ts +8 -4
  143. package/front_end/panels/sources/SourcesPanel.ts +4 -2
  144. package/front_end/panels/sources/SourcesSearchScope.ts +3 -1
  145. package/front_end/panels/sources/UISourceCodeFrame.ts +2 -2
  146. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +3 -3
  147. package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +5 -5
  148. package/front_end/panels/timeline/components/CWVMetrics.ts +1 -2
  149. package/front_end/panels/timeline/components/IgnoreListSetting.ts +5 -5
  150. package/front_end/panels/timeline/components/LayoutShiftDetails.ts +2 -3
  151. package/front_end/panels/timeline/components/LiveMetricsView.ts +2 -2
  152. package/front_end/panels/timeline/components/Sidebar.ts +3 -3
  153. package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +1 -2
  154. package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +3 -1
  155. package/front_end/panels/timeline/components/insights/CLSCulprits.ts +1 -2
  156. package/front_end/panels/timeline/components/insights/Cache.ts +1 -2
  157. package/front_end/panels/timeline/components/insights/CharacterSet.ts +1 -2
  158. package/front_end/panels/timeline/components/insights/DOMSize.ts +1 -2
  159. package/front_end/panels/timeline/components/insights/DocumentLatency.ts +2 -2
  160. package/front_end/panels/timeline/components/insights/DuplicatedJavaScript.ts +2 -2
  161. package/front_end/panels/timeline/components/insights/FontDisplay.ts +1 -2
  162. package/front_end/panels/timeline/components/insights/ForcedReflow.ts +1 -2
  163. package/front_end/panels/timeline/components/insights/INPBreakdown.ts +1 -2
  164. package/front_end/panels/timeline/components/insights/ImageDelivery.ts +1 -2
  165. package/front_end/panels/timeline/components/insights/LCPBreakdown.ts +13 -13
  166. package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +1 -2
  167. package/front_end/panels/timeline/components/insights/LegacyJavaScript.ts +4 -4
  168. package/front_end/panels/timeline/components/insights/ModernHTTP.ts +1 -2
  169. package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +10 -8
  170. package/front_end/panels/timeline/components/insights/RenderBlocking.ts +2 -2
  171. package/front_end/panels/timeline/components/insights/SidebarInsight.ts +3 -1
  172. package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +2 -2
  173. package/front_end/panels/timeline/components/insights/ThirdParties.ts +1 -2
  174. package/front_end/panels/timeline/components/insights/Viewport.ts +1 -2
  175. package/front_end/panels/timeline/overlays/OverlaysImpl.ts +1 -2
  176. package/front_end/panels/timeline/timeline.ts +0 -2
  177. package/front_end/panels/web_audio/WebAudioView.ts +14 -6
  178. package/front_end/panels/webauthn/WebauthnPane.ts +9 -9
  179. package/front_end/third_party/chromium/README.chromium +1 -1
  180. package/front_end/third_party/web-vitals/rebuild.sh +1 -1
  181. package/front_end/ui/components/diff_view/DiffView.ts +2 -1
  182. package/front_end/ui/components/report_view/ReportView.docs.ts +2 -2
  183. package/front_end/ui/components/text_editor/javascript.ts +12 -13
  184. package/front_end/ui/legacy/GlassPane.ts +38 -14
  185. package/front_end/ui/legacy/Treeoutline.ts +14 -3
  186. package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +11 -11
  187. package/front_end/ui/legacy/components/color_picker/FormatPickerContextMenu.ts +1 -1
  188. package/front_end/ui/legacy/components/color_picker/Spectrum.ts +19 -20
  189. package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +1 -1
  190. package/front_end/ui/legacy/components/object_ui/JavaScriptREPL.ts +1 -1
  191. package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +3 -3
  192. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +185 -355
  193. package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +3 -8
  194. package/front_end/ui/legacy/components/utils/ImagePreview.ts +15 -16
  195. package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +4 -4
  196. package/front_end/ui/legacy/components/utils/Linkifier.ts +8 -10
  197. package/front_end/ui/settings/InspectorMainSettings.ts +12 -0
  198. package/front_end/ui/settings/settings.ts +2 -0
  199. package/front_end/ui/visual_logging/KnownContextValues.ts +32 -0
  200. package/mcp/mcp.ts +0 -9
  201. package/package.json +1 -1
  202. package/front_end/core/sdk/sdk-meta.ts +0 -40
  203. package/front_end/models/badges/badges-meta.ts +0 -27
  204. package/front_end/models/logs/logs-meta.ts +0 -84
  205. package/front_end/models/persistence/persistence-meta.ts +0 -69
  206. package/front_end/models/workspace/workspace-meta.ts +0 -40
  207. package/front_end/panels/security/OriginTreeElement.ts +0 -60
  208. package/front_end/panels/security/SecurityPanelSidebarTreeElement.ts +0 -30
@@ -49,42 +49,22 @@ const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined
49
49
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
50
50
 
51
51
  export class EmulatedDevice {
52
- title: string;
53
- type: Type;
52
+ title = '';
53
+ type = Type.Unknown;
54
54
  order!: number;
55
- vertical: Orientation;
56
- horizontal: Orientation;
57
- deviceScaleFactor: number;
58
- capabilities: string[];
59
- userAgent: string;
60
- userAgentMetadata: Protocol.Emulation.UserAgentMetadata|null;
61
- modes: Mode[];
62
- isDualScreen: boolean;
63
- isFoldableScreen: boolean;
64
- verticalSpanned: Orientation;
65
- horizontalSpanned: Orientation;
66
- #show: Show;
67
- #showByDefault: boolean;
68
-
69
- constructor() {
70
- this.title = '';
71
- this.type = Type.Unknown;
72
- this.vertical = {width: 0, height: 0, hinge: null};
73
- this.horizontal = {width: 0, height: 0, hinge: null};
74
- this.deviceScaleFactor = 1;
75
- this.capabilities = [Capability.TOUCH, Capability.MOBILE];
76
- this.userAgent = '';
77
- this.userAgentMetadata = null;
78
- this.modes = [];
79
-
80
- this.isDualScreen = false;
81
- this.isFoldableScreen = false;
82
- this.verticalSpanned = {width: 0, height: 0, hinge: null};
83
- this.horizontalSpanned = {width: 0, height: 0, hinge: null};
84
-
85
- this.#show = Show.Default;
86
- this.#showByDefault = true;
87
- }
55
+ vertical: Orientation = {width: 0, height: 0, hinge: null};
56
+ horizontal: Orientation = {width: 0, height: 0, hinge: null};
57
+ deviceScaleFactor = 1;
58
+ capabilities: string[] = [Capability.TOUCH, Capability.MOBILE];
59
+ userAgent = '';
60
+ userAgentMetadata: Protocol.Emulation.UserAgentMetadata|null = null;
61
+ modes: Mode[] = [];
62
+ isDualScreen = false;
63
+ isFoldableScreen = false;
64
+ verticalSpanned: Orientation = {width: 0, height: 0, hinge: null};
65
+ horizontalSpanned: Orientation = {width: 0, height: 0, hinge: null};
66
+ #show = Show.Default;
67
+ #showByDefault = true;
88
68
 
89
69
  static fromJSONV1(json: any): EmulatedDevice|null {
90
70
  try {
@@ -262,15 +242,7 @@ export class EmulatedDevice {
262
242
  mode.orientation !== HorizontalSpanned) {
263
243
  throw new Error('Emulated device mode has wrong orientation \'' + mode.orientation + '\'');
264
244
  }
265
- const orientation = result.orientationByName(mode.orientation);
266
- mode.insets = parseInsets(parseValue(modes[i], 'insets', 'object', {left: 0, top: 0, right: 0, bottom: 0}));
267
- if (mode.insets.top < 0 || mode.insets.left < 0 || mode.insets.right < 0 || mode.insets.bottom < 0 ||
268
- mode.insets.top + mode.insets.bottom > orientation.height ||
269
- mode.insets.left + mode.insets.right > orientation.width) {
270
- throw new Error(
271
- 'Emulated device mode \'' + mode.title + '\'has wrong mode insets',
272
- );
273
- }
245
+
274
246
  const safeAreaInsets = parseValue(modes[i], 'safe-area-insets', 'object', null);
275
247
  if (safeAreaInsets) {
276
248
  mode.safeAreaInsets = parseInsets(safeAreaInsets);
@@ -399,12 +371,6 @@ export class EmulatedDevice {
399
371
  const mode: JSONMode = {
400
372
  title: this.modes[i].title,
401
373
  orientation: this.modes[i].orientation,
402
- insets: {
403
- left: this.modes[i].insets.left,
404
- top: this.modes[i].insets.top,
405
- right: this.modes[i].insets.right,
406
- bottom: this.modes[i].insets.bottom,
407
- },
408
374
  };
409
375
  const safeAreaInsets = this.modes[i].safeAreaInsets;
410
376
  if (safeAreaInsets) {
@@ -651,12 +617,10 @@ export class EmulatedDevicesList extends Common.ObjectWrapper.ObjectWrapper<Even
651
617
  device.modes.push({
652
618
  title: '',
653
619
  orientation: Horizontal,
654
- insets: new Insets(0, 0, 0, 0),
655
620
  });
656
621
  device.modes.push({
657
622
  title: '',
658
623
  orientation: Vertical,
659
- insets: new Insets(0, 0, 0, 0),
660
624
  });
661
625
  }
662
626
  } else {
@@ -736,7 +700,6 @@ export interface EventTypes {
736
700
  export interface Mode {
737
701
  title: string;
738
702
  orientation: string;
739
- insets: Insets;
740
703
  safeAreaInsets?: Insets;
741
704
  cutout?: Cutout;
742
705
  }
@@ -763,12 +726,6 @@ export interface Orientation {
763
726
  export interface JSONMode {
764
727
  title: string;
765
728
  orientation: string;
766
- insets: {
767
- left: number,
768
- right: number,
769
- top: number,
770
- bottom: number,
771
- };
772
729
  'safe-area-insets'?: {
773
730
  left: number,
774
731
  right: number,
@@ -845,7 +802,6 @@ const emulatedDevices = [
845
802
  {
846
803
  'title': 'default',
847
804
  'orientation': 'vertical',
848
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
849
805
  'safe-area-insets': {'left': 0, 'top': 44, 'right': 0, 'bottom': 34},
850
806
  'cutout':
851
807
  {'shape': 'notch', 'x': 92, 'y': 0, 'width': 231, 'height': 33, 'upper-radius': 6, 'lower-radius': 25},
@@ -853,7 +809,6 @@ const emulatedDevices = [
853
809
  {
854
810
  'title': 'default',
855
811
  'orientation': 'horizontal',
856
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
857
812
  'safe-area-insets': {'left': 44, 'top': 0, 'right': 44, 'bottom': 21},
858
813
  },
859
814
  ],
@@ -883,7 +838,6 @@ const emulatedDevices = [
883
838
  {
884
839
  'title': 'default',
885
840
  'orientation': 'vertical',
886
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
887
841
  'safe-area-insets': {'left': 0, 'top': 47, 'right': 0, 'bottom': 34},
888
842
  'cutout':
889
843
  {'shape': 'notch', 'x': 90, 'y': 0, 'width': 210, 'height': 32, 'upper-radius': 6, 'lower-radius': 23},
@@ -891,7 +845,6 @@ const emulatedDevices = [
891
845
  {
892
846
  'title': 'default',
893
847
  'orientation': 'horizontal',
894
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
895
848
  'safe-area-insets': {'left': 47, 'top': 0, 'right': 47, 'bottom': 21},
896
849
  },
897
850
  ],
@@ -921,7 +874,6 @@ const emulatedDevices = [
921
874
  {
922
875
  'title': 'default',
923
876
  'orientation': 'vertical',
924
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
925
877
  'safe-area-insets': {'left': 0, 'top': 47, 'right': 0, 'bottom': 34},
926
878
  'cutout':
927
879
  {'shape': 'notch', 'x': 114, 'y': 0, 'width': 162, 'height': 34, 'upper-radius': 5, 'lower-radius': 22},
@@ -929,7 +881,6 @@ const emulatedDevices = [
929
881
  {
930
882
  'title': 'default',
931
883
  'orientation': 'horizontal',
932
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
933
884
  'safe-area-insets': {'left': 47, 'top': 0, 'right': 47, 'bottom': 21},
934
885
  },
935
886
  ],
@@ -959,7 +910,6 @@ const emulatedDevices = [
959
910
  {
960
911
  'title': 'default',
961
912
  'orientation': 'vertical',
962
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
963
913
  'safe-area-insets': {'left': 0, 'top': 47, 'right': 0, 'bottom': 34},
964
914
  'cutout':
965
915
  {'shape': 'notch', 'x': 133, 'y': 0, 'width': 161, 'height': 34, 'upper-radius': 5, 'lower-radius': 22},
@@ -967,7 +917,6 @@ const emulatedDevices = [
967
917
  {
968
918
  'title': 'default',
969
919
  'orientation': 'horizontal',
970
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
971
920
  'safe-area-insets': {'left': 47, 'top': 0, 'right': 47, 'bottom': 21},
972
921
  },
973
922
  ],
@@ -997,14 +946,12 @@ const emulatedDevices = [
997
946
  {
998
947
  'title': 'default',
999
948
  'orientation': 'vertical',
1000
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1001
949
  'safe-area-insets': {'left': 0, 'top': 59, 'right': 0, 'bottom': 34},
1002
950
  'cutout': {'shape': 'pill', 'x': 134, 'y': 11, 'width': 125, 'height': 37, 'border-radius': 19},
1003
951
  },
1004
952
  {
1005
953
  'title': 'default',
1006
954
  'orientation': 'horizontal',
1007
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1008
955
  'safe-area-insets': {'left': 59, 'top': 0, 'right': 59, 'bottom': 21},
1009
956
  },
1010
957
  ],
@@ -1034,14 +981,12 @@ const emulatedDevices = [
1034
981
  {
1035
982
  'title': 'default',
1036
983
  'orientation': 'vertical',
1037
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1038
984
  'safe-area-insets': {'left': 0, 'top': 59, 'right': 0, 'bottom': 34},
1039
985
  'cutout': {'shape': 'pill', 'x': 153, 'y': 11, 'width': 125, 'height': 37, 'border-radius': 19},
1040
986
  },
1041
987
  {
1042
988
  'title': 'default',
1043
989
  'orientation': 'horizontal',
1044
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1045
990
  'safe-area-insets': {'left': 59, 'top': 0, 'right': 59, 'bottom': 21},
1046
991
  },
1047
992
  ],
@@ -1071,14 +1016,12 @@ const emulatedDevices = [
1071
1016
  {
1072
1017
  'title': 'default',
1073
1018
  'orientation': 'vertical',
1074
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1075
1019
  'safe-area-insets': {'left': 0, 'top': 59, 'right': 0, 'bottom': 34},
1076
1020
  'cutout': {'shape': 'pill', 'x': 134, 'y': 11, 'width': 125, 'height': 37, 'border-radius': 19},
1077
1021
  },
1078
1022
  {
1079
1023
  'title': 'default',
1080
1024
  'orientation': 'horizontal',
1081
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1082
1025
  'safe-area-insets': {'left': 59, 'top': 0, 'right': 59, 'bottom': 21},
1083
1026
  },
1084
1027
  ],
@@ -1108,14 +1051,12 @@ const emulatedDevices = [
1108
1051
  {
1109
1052
  'title': 'default',
1110
1053
  'orientation': 'vertical',
1111
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1112
1054
  'safe-area-insets': {'left': 0, 'top': 59, 'right': 0, 'bottom': 34},
1113
1055
  'cutout': {'shape': 'pill', 'x': 153, 'y': 11, 'width': 125, 'height': 37, 'border-radius': 19},
1114
1056
  },
1115
1057
  {
1116
1058
  'title': 'default',
1117
1059
  'orientation': 'horizontal',
1118
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1119
1060
  'safe-area-insets': {'left': 59, 'top': 0, 'right': 59, 'bottom': 21},
1120
1061
  },
1121
1062
  ],
@@ -1145,14 +1086,12 @@ const emulatedDevices = [
1145
1086
  {
1146
1087
  'title': 'default',
1147
1088
  'orientation': 'vertical',
1148
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1149
1089
  'safe-area-insets': {'left': 0, 'top': 59, 'right': 0, 'bottom': 34},
1150
1090
  'cutout': {'shape': 'pill', 'x': 134, 'y': 11, 'width': 125, 'height': 37, 'border-radius': 19},
1151
1091
  },
1152
1092
  {
1153
1093
  'title': 'default',
1154
1094
  'orientation': 'horizontal',
1155
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1156
1095
  'safe-area-insets': {'left': 59, 'top': 0, 'right': 59, 'bottom': 21},
1157
1096
  },
1158
1097
  ],
@@ -1182,14 +1121,12 @@ const emulatedDevices = [
1182
1121
  {
1183
1122
  'title': 'default',
1184
1123
  'orientation': 'vertical',
1185
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1186
1124
  'safe-area-insets': {'left': 0, 'top': 59, 'right': 0, 'bottom': 34},
1187
1125
  'cutout': {'shape': 'pill', 'x': 153, 'y': 11, 'width': 125, 'height': 37, 'border-radius': 19},
1188
1126
  },
1189
1127
  {
1190
1128
  'title': 'default',
1191
1129
  'orientation': 'horizontal',
1192
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1193
1130
  'safe-area-insets': {'left': 59, 'top': 0, 'right': 59, 'bottom': 21},
1194
1131
  },
1195
1132
  ],
@@ -1219,7 +1156,6 @@ const emulatedDevices = [
1219
1156
  {
1220
1157
  'title': 'default',
1221
1158
  'orientation': 'vertical',
1222
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1223
1159
  'safe-area-insets': {'left': 0, 'top': 47, 'right': 0, 'bottom': 34},
1224
1160
  'cutout':
1225
1161
  {'shape': 'notch', 'x': 114, 'y': 0, 'width': 162, 'height': 34, 'upper-radius': 5, 'lower-radius': 22},
@@ -1227,7 +1163,6 @@ const emulatedDevices = [
1227
1163
  {
1228
1164
  'title': 'default',
1229
1165
  'orientation': 'horizontal',
1230
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1231
1166
  'safe-area-insets': {'left': 47, 'top': 0, 'right': 47, 'bottom': 21},
1232
1167
  },
1233
1168
  ],
@@ -1257,14 +1192,12 @@ const emulatedDevices = [
1257
1192
  {
1258
1193
  'title': 'default',
1259
1194
  'orientation': 'vertical',
1260
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1261
1195
  'safe-area-insets': {'left': 0, 'top': 59, 'right': 0, 'bottom': 34},
1262
1196
  'cutout': {'shape': 'pill', 'x': 134, 'y': 11, 'width': 125, 'height': 37, 'border-radius': 19},
1263
1197
  },
1264
1198
  {
1265
1199
  'title': 'default',
1266
1200
  'orientation': 'horizontal',
1267
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1268
1201
  'safe-area-insets': {'left': 59, 'top': 0, 'right': 59, 'bottom': 21},
1269
1202
  },
1270
1203
  ],
@@ -1294,14 +1227,12 @@ const emulatedDevices = [
1294
1227
  {
1295
1228
  'title': 'default',
1296
1229
  'orientation': 'vertical',
1297
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1298
1230
  'safe-area-insets': {'left': 0, 'top': 59, 'right': 0, 'bottom': 34},
1299
1231
  'cutout': {'shape': 'pill', 'x': 153, 'y': 11, 'width': 125, 'height': 37, 'border-radius': 19},
1300
1232
  },
1301
1233
  {
1302
1234
  'title': 'default',
1303
1235
  'orientation': 'horizontal',
1304
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1305
1236
  'safe-area-insets': {'left': 59, 'top': 0, 'right': 59, 'bottom': 21},
1306
1237
  },
1307
1238
  ],
@@ -1331,14 +1262,12 @@ const emulatedDevices = [
1331
1262
  {
1332
1263
  'title': 'default',
1333
1264
  'orientation': 'vertical',
1334
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1335
1265
  'safe-area-insets': {'left': 0, 'top': 62, 'right': 0, 'bottom': 34},
1336
1266
  'cutout': {'shape': 'pill', 'x': 139, 'y': 14, 'width': 125, 'height': 37, 'border-radius': 19},
1337
1267
  },
1338
1268
  {
1339
1269
  'title': 'default',
1340
1270
  'orientation': 'horizontal',
1341
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1342
1271
  'safe-area-insets': {'left': 62, 'top': 0, 'right': 62, 'bottom': 21},
1343
1272
  },
1344
1273
  ],
@@ -1368,14 +1297,12 @@ const emulatedDevices = [
1368
1297
  {
1369
1298
  'title': 'default',
1370
1299
  'orientation': 'vertical',
1371
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1372
1300
  'safe-area-insets': {'left': 0, 'top': 62, 'right': 0, 'bottom': 34},
1373
1301
  'cutout': {'shape': 'pill', 'x': 158, 'y': 14, 'width': 125, 'height': 37, 'border-radius': 19},
1374
1302
  },
1375
1303
  {
1376
1304
  'title': 'default',
1377
1305
  'orientation': 'horizontal',
1378
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1379
1306
  'safe-area-insets': {'left': 62, 'top': 0, 'right': 62, 'bottom': 21},
1380
1307
  },
1381
1308
  ],
@@ -1406,14 +1333,12 @@ const emulatedDevices = [
1406
1333
  {
1407
1334
  'title': 'default',
1408
1335
  'orientation': 'vertical',
1409
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1410
1336
  'safe-area-insets': {'left': 0, 'top': 52, 'right': 0, 'bottom': 0},
1411
1337
  'cutout': {'shape': 'circle', 'x': 183, 'y': 0, 'width': 55, 'height': 52, 'cx': 206, 'cy': 26, 'radius': 13},
1412
1338
  },
1413
1339
  {
1414
1340
  'title': 'default',
1415
1341
  'orientation': 'horizontal',
1416
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1417
1342
  'safe-area-insets': {'left': 0, 'top': 0, 'right': 52, 'bottom': 0},
1418
1343
  },
1419
1344
  ],
@@ -1443,14 +1368,12 @@ const emulatedDevices = [
1443
1368
  {
1444
1369
  'title': 'default',
1445
1370
  'orientation': 'vertical',
1446
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1447
1371
  'safe-area-insets': {'left': 0, 'top': 50, 'right': 0, 'bottom': 0},
1448
1372
  'cutout': {'shape': 'circle', 'x': 182, 'y': 0, 'width': 46, 'height': 50, 'cx': 206, 'cy': 25, 'radius': 14},
1449
1373
  },
1450
1374
  {
1451
1375
  'title': 'default',
1452
1376
  'orientation': 'horizontal',
1453
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1454
1377
  'safe-area-insets': {'left': 0, 'top': 0, 'right': 50, 'bottom': 0},
1455
1378
  },
1456
1379
  ],
@@ -1480,14 +1403,12 @@ const emulatedDevices = [
1480
1403
  {
1481
1404
  'title': 'default',
1482
1405
  'orientation': 'vertical',
1483
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1484
1406
  'safe-area-insets': {'left': 0, 'top': 50, 'right': 0, 'bottom': 0},
1485
1407
  'cutout': {'shape': 'circle', 'x': 205, 'y': 0, 'width': 37, 'height': 50, 'cx': 224, 'cy': 25, 'radius': 14},
1486
1408
  },
1487
1409
  {
1488
1410
  'title': 'default',
1489
1411
  'orientation': 'horizontal',
1490
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1491
1412
  'safe-area-insets': {'left': 0, 'top': 0, 'right': 50, 'bottom': 0},
1492
1413
  },
1493
1414
  ],
@@ -1517,14 +1438,12 @@ const emulatedDevices = [
1517
1438
  {
1518
1439
  'title': 'default',
1519
1440
  'orientation': 'vertical',
1520
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1521
1441
  'safe-area-insets': {'left': 0, 'top': 46, 'right': 0, 'bottom': 0},
1522
1442
  'cutout': {'shape': 'circle', 'x': 185, 'y': 0, 'width': 42, 'height': 46, 'cx': 206, 'cy': 26, 'radius': 13},
1523
1443
  },
1524
1444
  {
1525
1445
  'title': 'default',
1526
1446
  'orientation': 'horizontal',
1527
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1528
1447
  'safe-area-insets': {'left': 0, 'top': 0, 'right': 46, 'bottom': 0},
1529
1448
  },
1530
1449
  ],
@@ -1554,14 +1473,12 @@ const emulatedDevices = [
1554
1473
  {
1555
1474
  'title': 'default',
1556
1475
  'orientation': 'vertical',
1557
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1558
1476
  'safe-area-insets': {'left': 0, 'top': 58, 'right': 0, 'bottom': 0},
1559
1477
  'cutout': {'shape': 'circle', 'x': 188, 'y': 0, 'width': 37, 'height': 58, 'cx': 206, 'cy': 29, 'radius': 14},
1560
1478
  },
1561
1479
  {
1562
1480
  'title': 'default',
1563
1481
  'orientation': 'horizontal',
1564
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1565
1482
  'safe-area-insets': {'left': 0, 'top': 0, 'right': 58, 'bottom': 0},
1566
1483
  },
1567
1484
  ],
@@ -1591,14 +1508,12 @@ const emulatedDevices = [
1591
1508
  {
1592
1509
  'title': 'default',
1593
1510
  'orientation': 'vertical',
1594
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1595
1511
  'safe-area-insets': {'left': 0, 'top': 68, 'right': 0, 'bottom': 0},
1596
1512
  'cutout': {'shape': 'circle', 'x': 195, 'y': 0, 'width': 36, 'height': 68, 'cx': 213, 'cy': 34, 'radius': 16},
1597
1513
  },
1598
1514
  {
1599
1515
  'title': 'default',
1600
1516
  'orientation': 'horizontal',
1601
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1602
1517
  'safe-area-insets': {'left': 0, 'top': 0, 'right': 68, 'bottom': 0},
1603
1518
  },
1604
1519
  ],
@@ -1628,14 +1543,12 @@ const emulatedDevices = [
1628
1543
  {
1629
1544
  'title': 'default',
1630
1545
  'orientation': 'vertical',
1631
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1632
1546
  'safe-area-insets': {'left': 0, 'top': 66, 'right': 0, 'bottom': 0},
1633
1547
  'cutout': {'shape': 'circle', 'x': 205, 'y': 0, 'width': 38, 'height': 66, 'cx': 224, 'cy': 33, 'radius': 16},
1634
1548
  },
1635
1549
  {
1636
1550
  'title': 'default',
1637
1551
  'orientation': 'horizontal',
1638
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1639
1552
  'safe-area-insets': {'left': 0, 'top': 0, 'right': 66, 'bottom': 0},
1640
1553
  },
1641
1554
  ],
@@ -1665,14 +1578,12 @@ const emulatedDevices = [
1665
1578
  {
1666
1579
  'title': 'default',
1667
1580
  'orientation': 'vertical',
1668
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1669
1581
  'safe-area-insets': {'left': 0, 'top': 58, 'right': 0, 'bottom': 0},
1670
1582
  'cutout': {'shape': 'circle', 'x': 188, 'y': 0, 'width': 37, 'height': 58, 'cx': 206, 'cy': 29, 'radius': 14},
1671
1583
  },
1672
1584
  {
1673
1585
  'title': 'default',
1674
1586
  'orientation': 'horizontal',
1675
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1676
1587
  'safe-area-insets': {'left': 0, 'top': 0, 'right': 58, 'bottom': 0},
1677
1588
  },
1678
1589
  ],
@@ -1833,13 +1744,12 @@ const emulatedDevices = [
1833
1744
  {'platform': 'Android', 'platformVersion': '11.0', 'architecture': '', 'model': 'Surface Duo', 'mobile': true},
1834
1745
  'type': 'phone',
1835
1746
  'modes': [
1836
- {'title': 'default', 'orientation': 'vertical', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
1837
- {'title': 'default', 'orientation': 'horizontal', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
1838
- {'title': 'spanned', 'orientation': 'vertical-spanned', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
1747
+ {'title': 'default', 'orientation': 'vertical'},
1748
+ {'title': 'default', 'orientation': 'horizontal'},
1749
+ {'title': 'spanned', 'orientation': 'vertical-spanned'},
1839
1750
  {
1840
1751
  'title': 'spanned',
1841
1752
  'orientation': 'horizontal-spanned',
1842
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1843
1753
  },
1844
1754
  ],
1845
1755
  },
@@ -1905,13 +1815,12 @@ const emulatedDevices = [
1905
1815
  },
1906
1816
  'type': 'phone',
1907
1817
  'modes': [
1908
- {'title': 'default', 'orientation': 'vertical', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
1909
- {'title': 'default', 'orientation': 'horizontal', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
1910
- {'title': 'spanned', 'orientation': 'vertical-spanned', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
1818
+ {'title': 'default', 'orientation': 'vertical'},
1819
+ {'title': 'default', 'orientation': 'horizontal'},
1820
+ {'title': 'spanned', 'orientation': 'vertical-spanned'},
1911
1821
  {
1912
1822
  'title': 'spanned',
1913
1823
  'orientation': 'horizontal-spanned',
1914
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1915
1824
  },
1916
1825
  ],
1917
1826
  },
@@ -1956,13 +1865,12 @@ const emulatedDevices = [
1956
1865
  {'platform': 'Android', 'platformVersion': '14', 'architecture': '', 'model': 'SM-F956U', 'mobile': true},
1957
1866
  'type': 'phone',
1958
1867
  'modes': [
1959
- {'title': 'default', 'orientation': 'vertical', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
1960
- {'title': 'default', 'orientation': 'horizontal', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
1961
- {'title': 'spanned', 'orientation': 'vertical-spanned', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
1868
+ {'title': 'default', 'orientation': 'vertical'},
1869
+ {'title': 'default', 'orientation': 'horizontal'},
1870
+ {'title': 'spanned', 'orientation': 'vertical-spanned'},
1962
1871
  {
1963
1872
  'title': 'spanned',
1964
1873
  'orientation': 'horizontal-spanned',
1965
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
1966
1874
  },
1967
1875
  ],
1968
1876
  },
@@ -2007,13 +1915,12 @@ const emulatedDevices = [
2007
1915
  {'platform': 'Android', 'platformVersion': '10.0', 'architecture': '', 'model': 'SM-F946U', 'mobile': true},
2008
1916
  'type': 'phone',
2009
1917
  'modes': [
2010
- {'title': 'default', 'orientation': 'vertical', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
2011
- {'title': 'default', 'orientation': 'horizontal', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
2012
- {'title': 'spanned', 'orientation': 'vertical-spanned', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
1918
+ {'title': 'default', 'orientation': 'vertical'},
1919
+ {'title': 'default', 'orientation': 'horizontal'},
1920
+ {'title': 'spanned', 'orientation': 'vertical-spanned'},
2013
1921
  {
2014
1922
  'title': 'spanned',
2015
1923
  'orientation': 'horizontal-spanned',
2016
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
2017
1924
  },
2018
1925
  ],
2019
1926
  },
@@ -2058,17 +1965,15 @@ const emulatedDevices = [
2058
1965
  {'platform': 'Windows', 'platformVersion': '11.0', 'architecture': '', 'model': 'UX9702AA', 'mobile': false},
2059
1966
  'type': 'tablet',
2060
1967
  'modes': [
2061
- {'title': 'default', 'orientation': 'vertical', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
2062
- {'title': 'default', 'orientation': 'horizontal', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
1968
+ {'title': 'default', 'orientation': 'vertical'},
1969
+ {'title': 'default', 'orientation': 'horizontal'},
2063
1970
  {
2064
1971
  'title': 'spanned',
2065
1972
  'orientation': 'vertical-spanned',
2066
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
2067
1973
  },
2068
1974
  {
2069
1975
  'title': 'spanned',
2070
1976
  'orientation': 'horizontal-spanned',
2071
- 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
2072
1977
  },
2073
1978
  ],
2074
1979
  },
@@ -247,9 +247,20 @@ export namespace PrivateAPI {
247
247
  scriptUrl: string;
248
248
  ranges: PublicAPI.Chrome.DevTools.NamedFunctionRange[];
249
249
  }
250
+ export interface ForwardKeyboardEventRequestEntry {
251
+ eventType: string;
252
+ ctrlKey: boolean;
253
+ altKey: boolean;
254
+ metaKey: boolean;
255
+ shiftKey: boolean;
256
+ key: string;
257
+ code: string;
258
+ keyCode: number;
259
+ location: number;
260
+ }
250
261
  interface ForwardKeyboardEventRequest {
251
262
  command: Commands.ForwardKeyboardEvent;
252
- entries: Array<KeyboardEventInit&{eventType: string}>;
263
+ entries: ForwardKeyboardEventRequestEntry[];
253
264
  }
254
265
  interface GetHARRequest {
255
266
  command: Commands.GetHAR;
@@ -1553,52 +1564,52 @@ self.injectedExtensionAPI = function(
1553
1564
  return inspectedTabId;
1554
1565
  }
1555
1566
 
1556
- let keyboardEventRequestQueue: KeyboardEventInit&Array<{eventType: string}> = [];
1567
+ let keyboardEventRequestQueue: PrivateAPI.ForwardKeyboardEventRequestEntry[] = [];
1557
1568
  let forwardTimer: ReturnType<typeof setTimeout>|undefined;
1558
1569
  function forwardKeyboardEvent(event: KeyboardEvent): void {
1570
+ const requestPayload: Readonly<PrivateAPI.ForwardKeyboardEventRequestEntry> = Object.freeze({
1571
+ eventType: event.type,
1572
+ ctrlKey: event.ctrlKey,
1573
+ altKey: event.altKey,
1574
+ metaKey: event.metaKey,
1575
+ shiftKey: event.shiftKey,
1576
+ key: event.key,
1577
+ code: event.code,
1578
+ keyCode: event.keyCode,
1579
+ location: event.location,
1580
+ });
1581
+
1559
1582
  // Check if the event should be forwarded.
1560
1583
  // This is a workaround for crbug.com/923338.
1561
- const focused = document.activeElement;
1584
+ const targetDocument = targetWindowForTest?.document ?? document;
1585
+ const focused = targetDocument.activeElement;
1562
1586
  if (focused) {
1563
1587
  const isInput =
1564
1588
  focused.nodeName === 'INPUT' || focused.nodeName === 'TEXTAREA' || (focused as HTMLElement).isContentEditable;
1565
- if (isInput && !(event.ctrlKey || event.altKey || event.metaKey)) {
1589
+ if (isInput && !(requestPayload.ctrlKey || requestPayload.altKey || requestPayload.metaKey)) {
1566
1590
  return;
1567
1591
  }
1568
1592
  }
1569
1593
 
1570
1594
  let modifiers = 0;
1571
- if (event.shiftKey) {
1595
+ if (requestPayload.shiftKey) {
1572
1596
  modifiers |= 1;
1573
1597
  }
1574
- if (event.ctrlKey) {
1598
+ if (requestPayload.ctrlKey) {
1575
1599
  modifiers |= 2;
1576
1600
  }
1577
- if (event.altKey) {
1601
+ if (requestPayload.altKey) {
1578
1602
  modifiers |= 4;
1579
1603
  }
1580
- if (event.metaKey) {
1604
+ if (requestPayload.metaKey) {
1581
1605
  modifiers |= 8;
1582
1606
  }
1583
- const num = (event.keyCode & 255) | (modifiers << 8);
1607
+ const num = (requestPayload.keyCode & 255) | (modifiers << 8);
1584
1608
  // We only care about global hotkeys, not about random text
1585
1609
  if (!keysToForwardSet.has(num)) {
1586
1610
  return;
1587
1611
  }
1588
1612
  event.preventDefault();
1589
- const requestPayload = {
1590
- eventType: event.type,
1591
- ctrlKey: event.ctrlKey,
1592
- altKey: event.altKey,
1593
- metaKey: event.metaKey,
1594
- shiftKey: event.shiftKey,
1595
- // @ts-expect-error keyIdentifier is a deprecated non-standard property that typescript doesn't know about.
1596
- keyIdentifier: event.keyIdentifier,
1597
- key: event.key,
1598
- code: event.code,
1599
- location: event.location,
1600
- keyCode: event.keyCode,
1601
- };
1602
1613
  keyboardEventRequestQueue.push(requestPayload);
1603
1614
  if (!forwardTimer) {
1604
1615
  forwardTimer = globalThis.setTimeout(forwardEventQueue, 0);
@@ -1612,7 +1623,7 @@ self.injectedExtensionAPI = function(
1612
1623
  keyboardEventRequestQueue = [];
1613
1624
  }
1614
1625
 
1615
- document.addEventListener('keydown', forwardKeyboardEvent, false);
1626
+ (targetWindowForTest?.document ?? document).addEventListener('keydown', forwardKeyboardEvent, false);
1616
1627
 
1617
1628
  function ExtensionServerClient(this: APIImpl.ExtensionServerClient, targetWindow: Window): void {
1618
1629
  this._callbacks = {};
@@ -4,6 +4,7 @@
4
4
 
5
5
  import type * as Common from '../../core/common/common.js';
6
6
  import * as Platform from '../../core/platform/platform.js';
7
+ // eslint-disable-next-line @devtools/es-modules-import
7
8
  import type * as FormatterActions from '../../entrypoints/formatter_worker/FormatterActions.js';
8
9
 
9
10
  import {formatterWorkerPool} from './FormatterWorkerPool.js';