chrome-devtools-frontend 1.0.1672388 → 1.0.1672557

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 (103) hide show
  1. package/eslint.config.mjs +3 -3
  2. package/front_end/core/root/Runtime.ts +0 -5
  3. package/front_end/generated/{SupportedCSSProperties.js → SupportedCSSProperties.ts} +16 -0
  4. package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +1 -1
  5. package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +4 -3
  6. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +1 -1
  7. package/front_end/models/emulation/EmulatedDevices.ts +1 -1
  8. package/front_end/models/trace/Processor.ts +42 -10
  9. package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +12 -19
  10. package/front_end/models/trace/handlers/MetaHandler.ts +38 -5
  11. package/front_end/models/trace/insights/CLSCulprits.ts +1 -2
  12. package/front_end/models/trace/insights/CharacterSet.ts +1 -1
  13. package/front_end/models/trace/insights/Common.ts +21 -2
  14. package/front_end/models/trace/insights/DocumentLatency.ts +1 -1
  15. package/front_end/models/trace/insights/LCPBreakdown.ts +7 -6
  16. package/front_end/models/trace/insights/LCPDiscovery.ts +1 -1
  17. package/front_end/models/trace/insights/ModernHTTP.ts +7 -3
  18. package/front_end/models/trace/insights/NetworkDependencyTree.ts +1 -1
  19. package/front_end/models/trace/insights/RenderBlocking.ts +1 -1
  20. package/front_end/models/trace/insights/ThirdParties.ts +5 -2
  21. package/front_end/models/trace/insights/types.ts +11 -6
  22. package/front_end/models/trace/types/Configuration.ts +5 -0
  23. package/front_end/panels/elements/ElementsTreeElement.ts +1 -2
  24. package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +3 -1
  25. package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +463 -13
  26. package/front_end/panels/timeline/TimelinePanel.ts +2 -0
  27. package/front_end/panels/timeline/components/CWVMetrics.ts +16 -3
  28. package/front_end/panels/timeline/components/cwvMetrics.css +4 -0
  29. package/front_end/panels/timeline/components/liveMetricsView.css +0 -17
  30. package/front_end/panels/timeline/components/metricValueStyles.css +17 -0
  31. package/front_end/third_party/chromium/README.chromium +1 -1
  32. package/front_end/third_party/puppeteer/README.chromium +2 -2
  33. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +64 -15
  34. package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +65 -16
  35. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts +50 -7
  36. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts.map +1 -1
  37. package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js.map +1 -1
  38. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BidiOverCdp.d.ts +2 -1
  39. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BidiOverCdp.d.ts.map +1 -1
  40. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BidiOverCdp.js +5 -5
  41. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BidiOverCdp.js.map +1 -1
  42. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.d.ts +2 -1
  43. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.d.ts.map +1 -1
  44. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js +8 -6
  45. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js.map +1 -1
  46. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Dialog.d.ts.map +1 -1
  47. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Dialog.js +3 -0
  48. package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Dialog.js.map +1 -1
  49. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts.map +1 -1
  50. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js +16 -1
  51. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js.map +1 -1
  52. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Connection.d.ts +5 -1
  53. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Connection.d.ts.map +1 -1
  54. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Connection.js +11 -6
  55. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Connection.js.map +1 -1
  56. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Dialog.d.ts.map +1 -1
  57. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Dialog.js +5 -0
  58. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Dialog.js.map +1 -1
  59. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
  60. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js +10 -0
  61. package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js.map +1 -1
  62. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js +4 -3
  63. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js.map +1 -1
  64. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.d.ts +27 -2
  65. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.d.ts.map +1 -1
  66. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.js +12 -1
  67. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/Debug.js.map +1 -1
  68. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.d.ts +2 -2
  69. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.d.ts.map +1 -1
  70. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js +2 -2
  71. package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js.map +1 -1
  72. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
  73. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.js +2 -0
  74. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.js.map +1 -1
  75. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.d.ts +2 -1
  76. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.d.ts.map +1 -1
  77. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.js +5 -4
  78. package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.js.map +1 -1
  79. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +3 -3
  80. package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +3 -3
  81. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
  82. package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
  83. package/front_end/third_party/puppeteer/package/lib/types.d.ts +64 -15
  84. package/front_end/third_party/puppeteer/package/package.json +2 -2
  85. package/front_end/third_party/puppeteer/package/src/api/Page.ts +50 -7
  86. package/front_end/third_party/puppeteer/package/src/bidi/BidiOverCdp.ts +9 -7
  87. package/front_end/third_party/puppeteer/package/src/bidi/Connection.ts +9 -6
  88. package/front_end/third_party/puppeteer/package/src/bidi/Dialog.ts +4 -0
  89. package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +24 -1
  90. package/front_end/third_party/puppeteer/package/src/cdp/Connection.ts +11 -6
  91. package/front_end/third_party/puppeteer/package/src/cdp/Dialog.ts +7 -0
  92. package/front_end/third_party/puppeteer/package/src/cdp/NetworkManager.ts +11 -0
  93. package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +7 -3
  94. package/front_end/third_party/puppeteer/package/src/common/Debug.ts +30 -5
  95. package/front_end/third_party/puppeteer/package/src/common/util.ts +2 -2
  96. package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +2 -0
  97. package/front_end/third_party/puppeteer/package/src/node/ScreenRecorder.ts +6 -4
  98. package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
  99. package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
  100. package/front_end/ui/visual_logging/KnownContextValues.ts +16 -0
  101. package/package.json +1 -1
  102. /package/front_end/core/host/{UserMetricsEnums.d.ts → UserMetricsEnums.ts} +0 -0
  103. /package/front_end/generated/{ARIAProperties.js → ARIAProperties.ts} +0 -0
@@ -674,7 +674,7 @@ export function isNetworkDependencyTreeInsight(model: InsightModel): model is Ne
674
674
 
675
675
  export function generateInsight(
676
676
  data: Handlers.Types.HandlerData, context: InsightSetContext): NetworkDependencyTreeInsightModel {
677
- if (!context.navigation) {
677
+ if (!context.navigation || !('navigationId' in context)) {
678
678
  return finalize({
679
679
  rootNodes: [],
680
680
  maxTime: 0 as Types.Timing.Micro,
@@ -178,7 +178,7 @@ function finalize(partialModel: PartialInsightModel<RenderBlockingInsightModel>)
178
178
 
179
179
  export function generateInsight(
180
180
  data: Handlers.Types.HandlerData, context: InsightSetContext): RenderBlockingInsightModel {
181
- if (!context.navigation) {
181
+ if (!context.navigation || !('navigationId' in context)) {
182
182
  return finalize({
183
183
  renderBlockingRequests: [],
184
184
  });
@@ -6,7 +6,7 @@ import * as i18n from '../../../core/i18n/i18n.js';
6
6
  import * as ThirdPartyWeb from '../../../third_party/third-party-web/third-party-web.js';
7
7
  import * as Extras from '../extras/extras.js';
8
8
  import * as Handlers from '../handlers/handlers.js';
9
- import type * as Types from '../types/types.js';
9
+ import * as Types from '../types/types.js';
10
10
 
11
11
  import {
12
12
  InsightCategory,
@@ -82,7 +82,10 @@ export function generateInsight(
82
82
  data: Handlers.Types.HandlerData, context: InsightSetContext): ThirdPartiesInsightModel {
83
83
  const entitySummaries = Extras.ThirdParties.summarizeByThirdParty(data as Handlers.Types.HandlerData, context.bounds);
84
84
 
85
- const firstPartyUrl = context.navigation?.args.data?.documentLoaderURL ?? data.Meta.mainFrameURL;
85
+ let firstPartyUrl = data.Meta.mainFrameURL;
86
+ if (context.navigation && !Types.Events.isSoftNavigationStart(context.navigation)) {
87
+ firstPartyUrl = context.navigation.args.data?.documentLoaderURL ?? firstPartyUrl;
88
+ }
86
89
  const firstPartyEntity = ThirdPartyWeb.ThirdPartyWeb.getEntity(firstPartyUrl) ||
87
90
  Handlers.Helpers.makeUpEntity(data.Renderer.entityMappings.createdEntityCache, firstPartyUrl);
88
91
 
@@ -11,7 +11,8 @@ import type * as Models from './Models.js';
11
11
  /**
12
12
  * Context for the portion of the trace an insight should look at.
13
13
  */
14
- export type InsightSetContext = InsightSetContextWithoutNavigation|InsightSetContextWithNavigation;
14
+ export type InsightSetContext =
15
+ InsightSetContextWithoutNavigation|InsightSetContextWithNavigation|InsightSetContextWithSoftNavigation;
15
16
 
16
17
  export interface InsightSetContextWithoutNavigation {
17
18
  options: Types.Configuration.ParseOptions;
@@ -29,6 +30,13 @@ export interface InsightSetContextWithNavigation {
29
30
  lantern?: LanternContext;
30
31
  }
31
32
 
33
+ export interface InsightSetContextWithSoftNavigation {
34
+ options: Types.Configuration.ParseOptions;
35
+ bounds: Types.Timing.TraceWindowMicro;
36
+ frameId: string;
37
+ navigation: Types.Events.SoftNavigationStart;
38
+ }
39
+
32
40
  export interface LanternContext {
33
41
  requests: Array<Lantern.Types.NetworkRequest<Types.Events.SyntheticNetworkRequest>>;
34
42
  graph: Lantern.Graph.Node<Types.Events.SyntheticNetworkRequest>;
@@ -93,10 +101,7 @@ export type InsightModel<UIStrings extends Record<string, string> = Record<strin
93
101
  */
94
102
  wastedBytes?: number,
95
103
  frameId?: string,
96
- /**
97
- * If this insight is attached to a navigation, this stores its ID.
98
- */
99
- navigation?: Types.Events.NavigationStart,
104
+ navigation?: Types.Events.NavigationStart | Types.Events.SoftNavigationStart,
100
105
  /** This is lazily-generated because some insights may create many overlays. */
101
106
  createOverlays?: () => Types.Overlays.Overlay[],
102
107
  };
@@ -120,7 +125,7 @@ export interface InsightSet {
120
125
  model: InsightModels;
121
126
  /** Contains errors for all insights that had an internal error. */
122
127
  modelErrors: InsightModelErrors;
123
- navigation?: Types.Events.NavigationStart;
128
+ navigation?: Types.Events.NavigationStart|Types.Events.SoftNavigationStart;
124
129
  }
125
130
 
126
131
  /**
@@ -42,6 +42,10 @@ export interface Configuration {
42
42
  * from the model, but the contents will be empty.
43
43
  */
44
44
  enableAnimationsFrameHandler: boolean;
45
+ /**
46
+ * Whether soft-navs are used in the model/insights.
47
+ */
48
+ enableSoftNavigation: boolean;
45
49
  }
46
50
 
47
51
  export const defaults = (): Configuration => ({
@@ -49,6 +53,7 @@ export const defaults = (): Configuration => ({
49
53
  debugMode: false,
50
54
  maxInvalidationEventsPerEvent: 20,
51
55
  enableAnimationsFrameHandler: false,
56
+ enableSoftNavigation: true,
52
57
  });
53
58
 
54
59
  /**
@@ -40,7 +40,6 @@ import * as Common from '../../core/common/common.js';
40
40
  import * as Host from '../../core/host/host.js';
41
41
  import * as i18n from '../../core/i18n/i18n.js';
42
42
  import * as Platform from '../../core/platform/platform.js';
43
- import * as Root from '../../core/root/root.js';
44
43
  import * as SDK from '../../core/sdk/sdk.js';
45
44
  import * as TextUtils from '../../core/text_utils/text_utils.js';
46
45
  import * as Protocol from '../../generated/protocol.js';
@@ -1388,7 +1387,7 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
1388
1387
  showGridAdorner: Boolean(this.#layout?.isGrid) && !this.isClosingTag(),
1389
1388
  showGridLanesAdorner: Boolean(this.#layout?.isGridLanes) && !this.isClosingTag(),
1390
1389
  showMediaAdorner: this.node().isMediaNode() && !this.isClosingTag(),
1391
- showPopoverAdorner: Boolean(Root.Runtime.hostConfig.devToolsAllowPopoverForcing?.enabled) &&
1390
+ showPopoverAdorner:
1392
1391
  Boolean(this.node().attributes().find(attr => attr.name === 'popover')) && !this.isClosingTag(),
1393
1392
  showTopLayerAdorner: this.node().topLayerIndex() !== -1 && !this.isClosingTag(),
1394
1393
  gridAdornerActive: this.#gridAdornerActive,
@@ -72,6 +72,8 @@ interface ViewInput {
72
72
  }
73
73
  export type ViewFunction = (input: ViewInput, output: object, target: HTMLSelectElement) => void;
74
74
 
75
+ const optionsMap = new WeakMap<HTMLOptionElement, SDK.NetworkManager.ThrottlingConditions>();
76
+
75
77
  export const DEFAULT_VIEW: ViewFunction = (input, output, target) => {
76
78
  // The title is usually an i18nLazyString except for custom values that are stored in the local storage in the form of a string.
77
79
  const title = (conditions: SDK.NetworkManager.ThrottlingConditions): string =>
@@ -82,7 +84,7 @@ export const DEFAULT_VIEW: ViewFunction = (input, output, target) => {
82
84
  .item(Platform.StringUtilities.toKebabCase(
83
85
  ('i18nTitleKey' in condition && condition.i18nTitleKey) || title(condition)))
84
86
  .track({click: true})}`;
85
- const optionsMap = new WeakMap<HTMLOptionElement, SDK.NetworkManager.ThrottlingConditions>();
87
+
86
88
  let selectedConditions = input.selectedConditions;
87
89
  function onSelect(event: Event): void {
88
90
  const element = (event.target as HTMLSelectElement | null);