chrome-devtools-frontend 1.0.962581 → 1.0.964938

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 (61) hide show
  1. package/AUTHORS +1 -0
  2. package/config/gni/devtools_grd_files.gni +6 -0
  3. package/docs/resource_management.md +119 -0
  4. package/docs/workflows.md +7 -0
  5. package/front_end/core/common/ParsedURL.ts +12 -10
  6. package/front_end/core/host/UserMetrics.ts +2 -1
  7. package/front_end/core/i18n/locales/en-US.json +23 -2
  8. package/front_end/core/i18n/locales/en-XL.json +23 -2
  9. package/front_end/core/root/Runtime.ts +2 -0
  10. package/front_end/core/sdk/DOMModel.ts +2 -2
  11. package/front_end/core/sdk/DebuggerModel.ts +1 -1
  12. package/front_end/entrypoints/main/MainImpl.ts +7 -2
  13. package/front_end/generated/InspectorBackendCommands.js +8 -4
  14. package/front_end/generated/protocol-mapping.d.ts +12 -1
  15. package/front_end/generated/protocol-proxy-api.d.ts +11 -1
  16. package/front_end/generated/protocol.ts +27 -12
  17. package/front_end/models/javascript_metadata/NativeFunctions.js +7480 -4147
  18. package/front_end/models/persistence/IsolatedFileSystem.ts +3 -2
  19. package/front_end/models/persistence/PersistenceActions.ts +2 -2
  20. package/front_end/models/workspace/UISourceCode.ts +4 -5
  21. package/front_end/panels/animation/AnimationUI.ts +2 -1
  22. package/front_end/panels/application/AppManifestView.ts +7 -1
  23. package/front_end/panels/application/ApplicationPanelSidebar.ts +41 -1
  24. package/front_end/panels/application/InterestGroupStorageModel.ts +87 -0
  25. package/front_end/panels/application/InterestGroupStorageView.ts +112 -0
  26. package/front_end/panels/application/InterestGroupTreeElement.ts +61 -0
  27. package/front_end/panels/application/application.ts +4 -0
  28. package/front_end/panels/application/components/BackForwardCacheStrings.ts +1 -1
  29. package/front_end/panels/application/components/FrameDetailsView.ts +1 -0
  30. package/front_end/panels/application/components/InterestGroupAccessGrid.ts +149 -0
  31. package/front_end/panels/application/components/components.ts +2 -0
  32. package/front_end/panels/application/components/interestGroupAccessGrid.css +26 -0
  33. package/front_end/panels/application/interestGroupStorageView.css +13 -0
  34. package/front_end/panels/elements/StylePropertyTreeElement.ts +13 -0
  35. package/front_end/panels/elements/StylesSidebarPane.ts +73 -4
  36. package/front_end/panels/elements/stylesSectionTree.css +28 -0
  37. package/front_end/panels/media/PlayerListView.ts +2 -0
  38. package/front_end/panels/media/playerListView.css +3 -0
  39. package/front_end/panels/sensors/sensors-meta.ts +2 -2
  40. package/front_end/panels/sources/NavigatorView.ts +1 -1
  41. package/front_end/panels/sources/UISourceCodeFrame.ts +7 -0
  42. package/front_end/ui/components/diff_view/DiffView.ts +2 -2
  43. package/front_end/ui/components/docs/icon_button/basic.ts +1 -1
  44. package/front_end/ui/components/icon_button/IconButton.ts +1 -1
  45. package/front_end/ui/legacy/GlassPane.ts +2 -0
  46. package/front_end/ui/legacy/components/inline_editor/cssLength.css +1 -0
  47. package/front_end/ui/legacy/softDropDownButton.css +2 -0
  48. package/front_end/ui/legacy/themeColors.css +3 -1
  49. package/front_end/ui/legacy/toolbar.css +6 -0
  50. package/package.json +1 -1
  51. package/scripts/build/devtools_plugin.js +103 -0
  52. package/scripts/build/ninja/{rollup.gni → bundle.gni} +2 -2
  53. package/scripts/build/ninja/devtools_entrypoint.gni +8 -8
  54. package/scripts/build/rollup.config.js +3 -93
  55. package/scripts/devtools_paths.js +3 -2
  56. package/scripts/javascript_natives/helpers.js +211 -0
  57. package/scripts/javascript_natives/index.js +57 -194
  58. package/scripts/javascript_natives/package.json +8 -3
  59. package/scripts/javascript_natives/test.d.ts +9 -0
  60. package/scripts/javascript_natives/tests.js +195 -0
  61. package/scripts/whitespaces.txt +1 -0
package/AUTHORS CHANGED
@@ -39,6 +39,7 @@ Luke Swiderski <luke.swiderski@gmail.com>
39
39
  Marijn Haverbeke <marijnh@gmail.com>
40
40
  Michael Brüning <michael.bruning@qt.io>
41
41
  Michael Rienstra <mrienstra@gmail.com>
42
+ Paul Fisher <paul@pfish.zone>
42
43
  Per-Olov Jernberg <possan@possan.se>
43
44
  PhistucK <phistuck@gmail.com>
44
45
  Pradhuman Singh Baid <pradhumansinghbaid@gmail.com>
@@ -785,6 +785,9 @@ grd_files_debug_sources = [
785
785
  "front_end/panels/application/DatabaseTableView.js",
786
786
  "front_end/panels/application/IndexedDBModel.js",
787
787
  "front_end/panels/application/IndexedDBViews.js",
788
+ "front_end/panels/application/InterestGroupStorageModel.js",
789
+ "front_end/panels/application/InterestGroupStorageView.js",
790
+ "front_end/panels/application/InterestGroupTreeElement.js",
788
791
  "front_end/panels/application/OpenedWindowDetailsView.js",
789
792
  "front_end/panels/application/ReportingApiReportsView.js",
790
793
  "front_end/panels/application/ReportingApiTreeElement.js",
@@ -802,6 +805,7 @@ grd_files_debug_sources = [
802
805
  "front_end/panels/application/components/BackForwardCacheView.js",
803
806
  "front_end/panels/application/components/EndpointsGrid.js",
804
807
  "front_end/panels/application/components/FrameDetailsView.js",
808
+ "front_end/panels/application/components/InterestGroupAccessGrid.js",
805
809
  "front_end/panels/application/components/OriginTrialTreeView.js",
806
810
  "front_end/panels/application/components/PermissionsPolicySection.js",
807
811
  "front_end/panels/application/components/ReportsGrid.js",
@@ -810,6 +814,7 @@ grd_files_debug_sources = [
810
814
  "front_end/panels/application/components/backForwardCacheView.css.js",
811
815
  "front_end/panels/application/components/badge.css.js",
812
816
  "front_end/panels/application/components/frameDetailsReportView.css.js",
817
+ "front_end/panels/application/components/interestGroupAccessGrid.css.js",
813
818
  "front_end/panels/application/components/originTrialTokenRows.css.js",
814
819
  "front_end/panels/application/components/originTrialTreeView.css.js",
815
820
  "front_end/panels/application/components/permissionsPolicySection.css.js",
@@ -821,6 +826,7 @@ grd_files_debug_sources = [
821
826
  "front_end/panels/application/cookieItemsView.css.js",
822
827
  "front_end/panels/application/frameDetailsReportView.css.js",
823
828
  "front_end/panels/application/indexedDBViews.css.js",
829
+ "front_end/panels/application/interestGroupStorageView.css.js",
824
830
  "front_end/panels/application/reportingApiReportsView.css.js",
825
831
  "front_end/panels/application/resourcesPanel.css.js",
826
832
  "front_end/panels/application/resourcesSidebar.css.js",
@@ -0,0 +1,119 @@
1
+ # Resource management in DevTools
2
+
3
+ This document outlines how DevTools keeps track of resources like scripts and
4
+ HTML files, and how they interact with other features such as the Debugger.
5
+ The source code lives in the bindings/, persistence/ and workspace/ directories.
6
+
7
+ ## Core concepts and classes
8
+
9
+ * **Project:** Interface to a collection of resources. DevTools supports
10
+ different project **types**. For example “filesystem”, for resources
11
+ originating from the developers local machine, and “network”, for actual page
12
+ resources. The **Project** interface abstracts away rudimentary file
13
+ operations. Depending on the **type**, a **Project** may be able to create,
14
+ rename or delete resources, or change the contents.
15
+
16
+ * **Workspace**: A collection of all the **Projects** currently in use.
17
+ Implemented as a singleton in WorkspaceImpl.ts.
18
+
19
+ * **UISourceCode:** An actual resource identified by its URL. Scripts and
20
+ stylesheets are prominent examples, but DevTools also uses more esoteric
21
+ **ResourceTypes** such as XHR, WebSocket or EventSource.
22
+
23
+ ## Project types
24
+
25
+ A short overview over the different Project types and what **kind of resources**
26
+ they contain.
27
+
28
+ * **Network:** All resources loaded from the network are stored in network
29
+ projects. Different targets and/or **Resource** **types** may use different
30
+ projects. E.g. Each target has their own project containing only JavaScript
31
+ source maps.
32
+
33
+ * **Filesystem:** Resources stored on the developers local machine.
34
+ * Snippets are managed with a single Project just for snippets.
35
+ * Each local directory mapped into DevTools with the “Workspaces” feature has
36
+ its own project.
37
+ * Each directory used for the “Overrides” feature has a corresponding project
38
+ to manage the local files.
39
+
40
+ * **Formatter:** A single project of this type manages the formatted version of
41
+ script resources. That is the “pretty-print” feature for minified JS files.
42
+
43
+ * **ContentScripts**: Scripts from extensions running in the context of the page
44
+ itself. One project per target. Source maps for content scripts are managed by
45
+ separate, per target, projects. The source map projects also have the
46
+ **ContentScripts** type.
47
+
48
+ * **Service:** One project of this type per target. It holds placeholder
49
+ UISourceCodes for source maps while they are loaded. Once a source map
50
+ finishes loading, the placeholder is removed from the **Service** project.
51
+
52
+ * **Debugger:** One project of this type per target. Debugger projects store
53
+ parsed JS scripts (see next section).
54
+
55
+ ## The “Debugger” project type
56
+
57
+ When V8 parses scripts, it sends out a
58
+ [“Debugger.ScriptParsed”](https://chromedevtools.github.io/devtools-protocol/tot/Debugger/#event-scriptParsed)
59
+ event with some details, including a unique script ID and the URL of the script.
60
+ For each “Debugger.ScriptParsed” event, DevTools creates a **Script** object and
61
+ an associated **UISourceCode** in the “debugger” project. It is important to
62
+ note that the URL of this “debugger” UISourceCode contains both the script ID as
63
+ well as the script name (not URL!) to uniquely identify it. This is because:
64
+
65
+ _The relationship between network/filesystem UISourceCodes and **Script**
66
+ **objects**/debugger UISourceCodes is 1:n._
67
+
68
+ For example if the same script is included twice on a page with &lt;script>
69
+ elements, it will result in a single UISourceCode in the **Network** project but
70
+ **two Script** **objects** and two UISourceCodes in the **Debugger** project.
71
+ Similarly, every invocation of a Snippet will result in a separate **Script**
72
+ object per invocation while the Snippet itself is stored in a **Filesystem**
73
+ project.
74
+
75
+ ## Mappings and bindings
76
+
77
+ As can be seen above, UISourceCodes in different projects can potentially be
78
+ related to one another. A minified script resource in a **scripts Network project**
79
+ might have a pretty-printed version in the **Formatter project** while the
80
+ source map for the minified script is stored in the **source map Network project**.
81
+ Once the minified script is parsed/executed by V8, it also has a corresponding
82
+ **Script object** and a UISourceCode in the **Debugger project**.
83
+
84
+ This brings us to mappings and bindings. The terminology is roughly:
85
+
86
+ * _A **binding** ties different UISourceCodes together and determines which
87
+ UISourceCodes relate to one another._
88
+ * _A **mapping** translates source positions between bound UISourceCodes._
89
+
90
+ ## Binding implementations
91
+
92
+ There are a couple of classes tasked with establishing bindings between
93
+ UISourceCodes:
94
+
95
+ * **DebuggerWorkspaceBinding:** Responsible for scripts and source maps.
96
+ It ties together network/filesystem UISourceCodes with **Script** objects and
97
+ the debugger USourceCodes. Script source maps are also partially implemented
98
+ by this class.
99
+
100
+ * **CSSWorkspaceBinding:** Responsible for CSS and CSS source maps. DevTools can
101
+ handle source mapped CSS when it was authored in SASS and this class is
102
+ responsible for binding the corresponding UISourceCodes.
103
+
104
+ * **PersistenceBinding/PersistenceImpl/Automapping**: Responsible for the
105
+ [“Workspaces”](https://developer.chrome.com/docs/devtools/workspaces/)
106
+ feature. When a developer adds a local directory to DevTools that corresponds
107
+ to the pages sources, these classes establish and manage the binding between
108
+ the corresponding **Filesystem** and **Network** resources.
109
+
110
+ * **NetworkPersistenceManager**: Responsible for the
111
+ [“Local Overrides”](https://developer.chrome.com/blog/new-in-devtools-65/#overrides)
112
+ feature. It connects the **Network** resources with the corresponding
113
+ overwritten version in a **Filesystem** project. This class also handles
114
+ network request interceptions and determines whether to serve the original or
115
+ the overwritten UISourceCode.
116
+
117
+ Please keep in mind that many of these classes have gathered additional
118
+ responsibilities over the years, so the concepts presented above might not
119
+ always cleanly apply or be apparent in code.
package/docs/workflows.md CHANGED
@@ -32,6 +32,13 @@ autoninja -C out/Default
32
32
 
33
33
  The resulting build artifacts can be found in `out/Default/gen/front_end`.
34
34
 
35
+ If you want to have faster build by disabling typecheck, consider to use
36
+ `devtools_skip_typecheck=true` build args like:
37
+
38
+ ```bash
39
+ gn gen out/fast-build --args='devtools_skip_typecheck=true'
40
+ ```
41
+
35
42
  #### Update to latest
36
43
 
37
44
  To update to latest tip of tree version:
@@ -168,16 +168,17 @@ export class ParsedURL {
168
168
  }
169
169
 
170
170
  static rawPathToUrlString(fileSystemPath: Platform.DevToolsPath.RawPathString): Platform.DevToolsPath.UrlString {
171
- let rawPath: string = fileSystemPath;
172
- rawPath = rawPath.replace(/\\/g, '/');
173
- if (!rawPath.startsWith('file://')) {
174
- if (rawPath.startsWith('/')) {
175
- rawPath = 'file://' + rawPath;
171
+ let preEncodedPath: string = ParsedURL.preEncodeSpecialCharactersInPath(
172
+ fileSystemPath.replace(/\\/g, '/') as Platform.DevToolsPath.RawPathString);
173
+ preEncodedPath = preEncodedPath.replace(/\\/g, '/');
174
+ if (!preEncodedPath.startsWith('file://')) {
175
+ if (preEncodedPath.startsWith('/')) {
176
+ preEncodedPath = 'file://' + preEncodedPath;
176
177
  } else {
177
- rawPath = 'file:///' + rawPath;
178
+ preEncodedPath = 'file:///' + preEncodedPath;
178
179
  }
179
180
  }
180
- return rawPath as Platform.DevToolsPath.UrlString;
181
+ return new URL(preEncodedPath).toString() as Platform.DevToolsPath.UrlString;
181
182
  }
182
183
 
183
184
  static relativePathToUrlString(relativePath: string, baseURL: Platform.DevToolsPath.UrlString):
@@ -187,13 +188,14 @@ export class ParsedURL {
187
188
  return new URL(preEncodedPath, baseURL).toString() as Platform.DevToolsPath.UrlString;
188
189
  }
189
190
 
190
- static capFilePrefix(fileURL: Platform.DevToolsPath.UrlString, isWindows?: boolean):
191
+ static urlToRawPathString(fileURL: Platform.DevToolsPath.UrlString, isWindows?: boolean):
191
192
  Platform.DevToolsPath.RawPathString {
192
193
  console.assert(fileURL.startsWith('file://'), 'This must be a file URL.');
194
+ const decodedFileURL = decodeURIComponent(fileURL);
193
195
  if (isWindows) {
194
- return fileURL.substr('file:///'.length).replace(/\//g, '\\') as Platform.DevToolsPath.RawPathString;
196
+ return decodedFileURL.substr('file:///'.length).replace(/\//g, '\\') as Platform.DevToolsPath.RawPathString;
195
197
  }
196
- return fileURL.substr('file://'.length) as Platform.DevToolsPath.RawPathString;
198
+ return decodedFileURL.substr('file://'.length) as Platform.DevToolsPath.RawPathString;
197
199
  }
198
200
 
199
201
  static urlWithoutHash(url: string): string {
@@ -584,7 +584,8 @@ export enum DevtoolsExperiments {
584
584
  'cssTypeComponentLength' = 52,
585
585
  'preciseChanges' = 53,
586
586
  'bfcacheDisplayTree' = 54,
587
- 'MaxValue' = 55,
587
+ 'stylesPaneCSSChanges' = 55,
588
+ 'MaxValue' = 56,
588
589
  }
589
590
  /* eslint-enable @typescript-eslint/naming-convention */
590
591
 
@@ -2951,6 +2951,21 @@
2951
2951
  "panels/application/components/FrameDetailsView.ts | yes": {
2952
2952
  "message": "Yes"
2953
2953
  },
2954
+ "panels/application/components/InterestGroupAccessGrid.ts | allInterestGroupStorageEvents": {
2955
+ "message": "All interest group storage events."
2956
+ },
2957
+ "panels/application/components/InterestGroupAccessGrid.ts | eventTime": {
2958
+ "message": "Event Time"
2959
+ },
2960
+ "panels/application/components/InterestGroupAccessGrid.ts | eventType": {
2961
+ "message": "Access Type"
2962
+ },
2963
+ "panels/application/components/InterestGroupAccessGrid.ts | groupName": {
2964
+ "message": "Name"
2965
+ },
2966
+ "panels/application/components/InterestGroupAccessGrid.ts | groupOwner": {
2967
+ "message": "Owner"
2968
+ },
2954
2969
  "panels/application/components/OriginTrialTreeView.ts | expiryTime": {
2955
2970
  "message": "Expiry Time"
2956
2971
  },
@@ -3179,6 +3194,12 @@
3179
3194
  "panels/application/IndexedDBViews.ts | version": {
3180
3195
  "message": "Version"
3181
3196
  },
3197
+ "panels/application/InterestGroupStorageView.ts | clickToDisplayBody": {
3198
+ "message": "Click on any interest group event to display the group's current state"
3199
+ },
3200
+ "panels/application/InterestGroupTreeElement.ts | interestGroups": {
3201
+ "message": "Interest Groups"
3202
+ },
3182
3203
  "panels/application/OpenedWindowDetailsView.ts | accessToOpener": {
3183
3204
  "message": "Access to opener"
3184
3205
  },
@@ -4809,10 +4830,10 @@
4809
4830
  "message": "Copy selector"
4810
4831
  },
4811
4832
  "panels/elements/StylesSidebarPane.ts | cssPropertyName": {
4812
- "message": "CSS property name"
4833
+ "message": "CSS property name: {PH1}"
4813
4834
  },
4814
4835
  "panels/elements/StylesSidebarPane.ts | cssPropertyValue": {
4815
- "message": "CSS property value"
4836
+ "message": "CSS property value: {PH1}"
4816
4837
  },
4817
4838
  "panels/elements/StylesSidebarPane.ts | cssSelector": {
4818
4839
  "message": "CSS selector"
@@ -2951,6 +2951,21 @@
2951
2951
  "panels/application/components/FrameDetailsView.ts | yes": {
2952
2952
  "message": "Ŷéŝ"
2953
2953
  },
2954
+ "panels/application/components/InterestGroupAccessGrid.ts | allInterestGroupStorageEvents": {
2955
+ "message": "Âĺl̂ ín̂t́êŕêśt̂ ǵr̂óûṕ ŝt́ôŕâǵê év̂én̂t́ŝ."
2956
+ },
2957
+ "panels/application/components/InterestGroupAccessGrid.ts | eventTime": {
2958
+ "message": "Êv́êńt̂ T́îḿê"
2959
+ },
2960
+ "panels/application/components/InterestGroupAccessGrid.ts | eventType": {
2961
+ "message": "Âćĉéŝś T̂ýp̂é"
2962
+ },
2963
+ "panels/application/components/InterestGroupAccessGrid.ts | groupName": {
2964
+ "message": "N̂ám̂é"
2965
+ },
2966
+ "panels/application/components/InterestGroupAccessGrid.ts | groupOwner": {
2967
+ "message": "Ôẃn̂ér̂"
2968
+ },
2954
2969
  "panels/application/components/OriginTrialTreeView.ts | expiryTime": {
2955
2970
  "message": "Êx́p̂ír̂ý T̂ím̂é"
2956
2971
  },
@@ -3179,6 +3194,12 @@
3179
3194
  "panels/application/IndexedDBViews.ts | version": {
3180
3195
  "message": "V̂ér̂śîón̂"
3181
3196
  },
3197
+ "panels/application/InterestGroupStorageView.ts | clickToDisplayBody": {
3198
+ "message": "Ĉĺîćk̂ ón̂ án̂ý îńt̂ér̂éŝt́ ĝŕôúp̂ év̂én̂t́ t̂ó d̂íŝṕl̂áŷ t́ĥé ĝŕôúp̂'ś ĉúr̂ŕêńt̂ śt̂át̂é"
3199
+ },
3200
+ "panels/application/InterestGroupTreeElement.ts | interestGroups": {
3201
+ "message": "Îńt̂ér̂éŝt́ Ĝŕôúp̂ś"
3202
+ },
3182
3203
  "panels/application/OpenedWindowDetailsView.ts | accessToOpener": {
3183
3204
  "message": "Âćĉéŝś t̂ó ôṕêńêŕ"
3184
3205
  },
@@ -4809,10 +4830,10 @@
4809
4830
  "message": "Ĉóp̂ý selector"
4810
4831
  },
4811
4832
  "panels/elements/StylesSidebarPane.ts | cssPropertyName": {
4812
- "message": "CSS p̂ŕôṕêŕt̂ý n̂ám̂é"
4833
+ "message": "CSS p̂ŕôṕêŕt̂ý n̂ám̂é: {PH1}"
4813
4834
  },
4814
4835
  "panels/elements/StylesSidebarPane.ts | cssPropertyValue": {
4815
- "message": "CSS p̂ŕôṕêŕt̂ý v̂ál̂úê"
4836
+ "message": "CSS p̂ŕôṕêŕt̂ý v̂ál̂úê: {PH1}"
4816
4837
  },
4817
4838
  "panels/elements/StylesSidebarPane.ts | cssSelector": {
4818
4839
  "message": "CSS ŝél̂éĉt́ôŕ"
@@ -272,6 +272,8 @@ export enum ExperimentName {
272
272
  WEBAUTHN_PANE = 'webauthnPane',
273
273
  SYNC_SETTINGS = 'syncSettings',
274
274
  FULL_ACCESSIBILITY_TREE = 'fullAccessibilityTree',
275
+ PRECISE_CHANGES = 'preciseChanges',
276
+ STYLES_PANE_CSS_CHANGES = 'stylesPaneCSSChanges',
275
277
  }
276
278
 
277
279
  // TODO(crbug.com/1167717): Make this a const enum again
@@ -1038,7 +1038,7 @@ export class DOMModel extends SDKModel<EventTypes> {
1038
1038
  this.#pendingDocumentRequestPromise = null;
1039
1039
 
1040
1040
  if (!target.suspended()) {
1041
- void this.agent.invoke_enable();
1041
+ void this.agent.invoke_enable({});
1042
1042
  }
1043
1043
 
1044
1044
  if (Root.Runtime.experiments.isEnabled('captureNodeCreationStacks')) {
@@ -1497,7 +1497,7 @@ export class DOMModel extends SDKModel<EventTypes> {
1497
1497
  }
1498
1498
 
1499
1499
  async resumeModel(): Promise<void> {
1500
- await this.agent.invoke_enable();
1500
+ await this.agent.invoke_enable({});
1501
1501
  }
1502
1502
 
1503
1503
  dispose(): void {
@@ -425,7 +425,7 @@ export class DebuggerModel extends SDKModel<EventTypes> {
425
425
  if (this.target().type() === Type.Node && url.startsWith('file://')) {
426
426
  // TODO(crbug.com/1253323): Cast to UrlString will be removed when migration to branded types is complete.
427
427
  const platformPath =
428
- Common.ParsedURL.ParsedURL.capFilePrefix(url as Platform.DevToolsPath.UrlString, Host.Platform.isWin());
428
+ Common.ParsedURL.ParsedURL.urlToRawPathString(url as Platform.DevToolsPath.UrlString, Host.Platform.isWin());
429
429
  urlRegex =
430
430
  `${Platform.StringUtilities.escapeForRegExp(platformPath)}|${Platform.StringUtilities.escapeForRegExp(url)}`;
431
431
  }
@@ -365,13 +365,18 @@ export class MainImpl {
365
365
  'https://developer.chrome.com/blog/new-in-devtools-96/#length');
366
366
 
367
367
  // Display precise changes in the Changes tab.
368
- Root.Runtime.experiments.register('preciseChanges', 'Display more precise changes in the Changes tab');
368
+ Root.Runtime.experiments.register(
369
+ Root.Runtime.ExperimentName.PRECISE_CHANGES, 'Display more precise changes in the Changes tab');
370
+
371
+ // Integrate CSS changes in the Styles pane.
372
+ Root.Runtime.experiments.register(
373
+ Root.Runtime.ExperimentName.STYLES_PANE_CSS_CHANGES, 'Sync CSS changes in the Styles pane');
369
374
 
370
375
  Root.Runtime.experiments.enableExperimentsByDefault([
371
376
  'sourceOrderViewer',
372
377
  'hideIssuesFeature',
373
378
  'cssTypeComponentLength',
374
- 'preciseChanges',
379
+ Root.Runtime.ExperimentName.PRECISE_CHANGES,
375
380
  'reportingApiDebugging',
376
381
  Root.Runtime.ExperimentName.SYNC_SETTINGS,
377
382
  ]);
@@ -295,7 +295,6 @@ export function registerCommands(inspectorBackend) {
295
295
  AttributionReportingIssue: 'AttributionReportingIssue',
296
296
  QuirksModeIssue: 'QuirksModeIssue',
297
297
  NavigatorUserAgentIssue: 'NavigatorUserAgentIssue',
298
- WasmCrossOriginModuleSharingIssue: 'WasmCrossOriginModuleSharingIssue',
299
298
  GenericIssue: 'GenericIssue',
300
299
  DeprecationIssue: 'DeprecationIssue',
301
300
  ClientHintIssue: 'ClientHintIssue'
@@ -681,7 +680,9 @@ export function registerCommands(inspectorBackend) {
681
680
  inspectorBackend.registerCommand('DOM.disable', [], []);
682
681
  inspectorBackend.registerCommand(
683
682
  'DOM.discardSearchResults', [{'name': 'searchId', 'type': 'string', 'optional': false}], []);
684
- inspectorBackend.registerCommand('DOM.enable', [], []);
683
+ inspectorBackend.registerEnum('DOM.EnableRequestIncludeWhitespace', {None: 'none', All: 'all'});
684
+ inspectorBackend.registerCommand(
685
+ 'DOM.enable', [{'name': 'includeWhitespace', 'type': 'string', 'optional': true}], []);
685
686
  inspectorBackend.registerCommand(
686
687
  'DOM.focus',
687
688
  [
@@ -2114,7 +2115,7 @@ export function registerCommands(inspectorBackend) {
2114
2115
  inspectorBackend.registerEnum(
2115
2116
  'Page.NavigationType', {Navigation: 'Navigation', BackForwardCacheRestore: 'BackForwardCacheRestore'});
2116
2117
  inspectorBackend.registerEnum('Page.BackForwardCacheNotRestoredReason', {
2117
- NotMainFrame: 'NotMainFrame',
2118
+ NotPrimaryMainFrame: 'NotPrimaryMainFrame',
2118
2119
  BackForwardCacheDisabled: 'BackForwardCacheDisabled',
2119
2120
  RelatedActiveContentsExist: 'RelatedActiveContentsExist',
2120
2121
  HTTPStatusNotOK: 'HTTPStatusNotOK',
@@ -2637,7 +2638,7 @@ export function registerCommands(inspectorBackend) {
2637
2638
  inspectorBackend.registerEvent('Storage.cacheStorageListUpdated', ['origin']);
2638
2639
  inspectorBackend.registerEvent('Storage.indexedDBContentUpdated', ['origin', 'databaseName', 'objectStoreName']);
2639
2640
  inspectorBackend.registerEvent('Storage.indexedDBListUpdated', ['origin']);
2640
- inspectorBackend.registerEvent('Storage.interestGroupAccessed', ['type', 'ownerOrigin', 'name']);
2641
+ inspectorBackend.registerEvent('Storage.interestGroupAccessed', ['accessTime', 'type', 'ownerOrigin', 'name']);
2641
2642
  inspectorBackend.registerCommand(
2642
2643
  'Storage.clearDataForOrigin',
2643
2644
  [
@@ -3488,6 +3489,9 @@ export function registerCommands(inspectorBackend) {
3488
3489
  []);
3489
3490
  inspectorBackend.registerCommand(
3490
3491
  'Runtime.removeBinding', [{'name': 'name', 'type': 'string', 'optional': false}], []);
3492
+ inspectorBackend.registerCommand(
3493
+ 'Runtime.getExceptionDetails', [{'name': 'errorObjectId', 'type': 'string', 'optional': false}],
3494
+ ['exceptionDetails']);
3491
3495
 
3492
3496
  // Schema.
3493
3497
  inspectorBackend.registerCommand('Schema.getDomains', [], ['domains']);
@@ -1138,7 +1138,7 @@ export namespace ProtocolMapping {
1138
1138
  /**
1139
1139
  * Enables DOM agent for the given page.
1140
1140
  */
1141
- 'DOM.enable': {paramsType: []; returnType: void;};
1141
+ 'DOM.enable': {paramsType: [Protocol.DOM.EnableRequest?]; returnType: void;};
1142
1142
  /**
1143
1143
  * Focuses the given element.
1144
1144
  */
@@ -3115,6 +3115,17 @@ export namespace ProtocolMapping {
3115
3115
  * unsubscribes current runtime agent from Runtime.bindingCalled notifications.
3116
3116
  */
3117
3117
  'Runtime.removeBinding': {paramsType: [Protocol.Runtime.RemoveBindingRequest]; returnType: void;};
3118
+ /**
3119
+ * This method tries to lookup and populate exception details for a
3120
+ * JavaScript Error object.
3121
+ * Note that the stackTrace portion of the resulting exceptionDetails will
3122
+ * only be populated if the Runtime domain was enabled at the time when the
3123
+ * Error was thrown.
3124
+ */
3125
+ 'Runtime.getExceptionDetails': {
3126
+ paramsType: [Protocol.Runtime.GetExceptionDetailsRequest];
3127
+ returnType: Protocol.Runtime.GetExceptionDetailsResponse;
3128
+ };
3118
3129
  /**
3119
3130
  * Returns supported domains.
3120
3131
  */
@@ -824,7 +824,7 @@ declare namespace ProtocolProxyApi {
824
824
  /**
825
825
  * Enables DOM agent for the given page.
826
826
  */
827
- invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
827
+ invoke_enable(params: Protocol.DOM.EnableRequest): Promise<Protocol.ProtocolResponseWithError>;
828
828
 
829
829
  /**
830
830
  * Focuses the given element.
@@ -4050,6 +4050,16 @@ declare namespace ProtocolProxyApi {
4050
4050
  * unsubscribes current runtime agent from Runtime.bindingCalled notifications.
4051
4051
  */
4052
4052
  invoke_removeBinding(params: Protocol.Runtime.RemoveBindingRequest): Promise<Protocol.ProtocolResponseWithError>;
4053
+
4054
+ /**
4055
+ * This method tries to lookup and populate exception details for a
4056
+ * JavaScript Error object.
4057
+ * Note that the stackTrace portion of the resulting exceptionDetails will
4058
+ * only be populated if the Runtime domain was enabled at the time when the
4059
+ * Error was thrown.
4060
+ */
4061
+ invoke_getExceptionDetails(params: Protocol.Runtime.GetExceptionDetailsRequest):
4062
+ Promise<Protocol.Runtime.GetExceptionDetailsResponse>;
4053
4063
  }
4054
4064
  export interface RuntimeDispatcher {
4055
4065
  /**
@@ -1011,13 +1011,6 @@ export namespace Audits {
1011
1011
  location?: SourceCodeLocation;
1012
1012
  }
1013
1013
 
1014
- export interface WasmCrossOriginModuleSharingIssueDetails {
1015
- wasmModuleUrl: string;
1016
- sourceOrigin: string;
1017
- targetOrigin: string;
1018
- isWarning: boolean;
1019
- }
1020
-
1021
1014
  export const enum GenericIssueErrorType {
1022
1015
  CrossOriginPortalPostMessageError = 'CrossOriginPortalPostMessageError',
1023
1016
  }
@@ -1086,7 +1079,6 @@ export namespace Audits {
1086
1079
  AttributionReportingIssue = 'AttributionReportingIssue',
1087
1080
  QuirksModeIssue = 'QuirksModeIssue',
1088
1081
  NavigatorUserAgentIssue = 'NavigatorUserAgentIssue',
1089
- WasmCrossOriginModuleSharingIssue = 'WasmCrossOriginModuleSharingIssue',
1090
1082
  GenericIssue = 'GenericIssue',
1091
1083
  DeprecationIssue = 'DeprecationIssue',
1092
1084
  ClientHintIssue = 'ClientHintIssue',
@@ -1110,7 +1102,6 @@ export namespace Audits {
1110
1102
  attributionReportingIssueDetails?: AttributionReportingIssueDetails;
1111
1103
  quirksModeIssueDetails?: QuirksModeIssueDetails;
1112
1104
  navigatorUserAgentIssueDetails?: NavigatorUserAgentIssueDetails;
1113
- wasmCrossOriginModuleSharingIssue?: WasmCrossOriginModuleSharingIssueDetails;
1114
1105
  genericIssueDetails?: GenericIssueDetails;
1115
1106
  deprecationIssueDetails?: DeprecationIssueDetails;
1116
1107
  clientHintIssueDetails?: ClientHintIssueDetails;
@@ -3245,6 +3236,18 @@ export namespace DOM {
3245
3236
  searchId: string;
3246
3237
  }
3247
3238
 
3239
+ export const enum EnableRequestIncludeWhitespace {
3240
+ None = 'none',
3241
+ All = 'all',
3242
+ }
3243
+
3244
+ export interface EnableRequest {
3245
+ /**
3246
+ * Whether to include whitespaces in the children array of returned Nodes.
3247
+ */
3248
+ includeWhitespace?: EnableRequestIncludeWhitespace;
3249
+ }
3250
+
3248
3251
  export interface FocusRequest {
3249
3252
  /**
3250
3253
  * Identifier of the node.
@@ -5927,7 +5930,7 @@ export namespace Input {
5927
5930
  /**
5928
5931
  * Editing commands to send with the key event (e.g., 'selectAll') (default: []).
5929
5932
  * These are related to but not equal the command names used in `document.execCommand` and NSStandardKeyBindingResponding.
5930
- * See https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/editing/commands/editor_command_names.h for valid command names.
5933
+ * See https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/editing/commands/editor_command_names.h for valid command names.
5931
5934
  */
5932
5935
  commands?: string[];
5933
5936
  }
@@ -10597,7 +10600,7 @@ export namespace Page {
10597
10600
  * List of not restored reasons for back-forward cache.
10598
10601
  */
10599
10602
  export const enum BackForwardCacheNotRestoredReason {
10600
- NotMainFrame = 'NotMainFrame',
10603
+ NotPrimaryMainFrame = 'NotPrimaryMainFrame',
10601
10604
  BackForwardCacheDisabled = 'BackForwardCacheDisabled',
10602
10605
  RelatedActiveContentsExist = 'RelatedActiveContentsExist',
10603
10606
  HTTPStatusNotOK = 'HTTPStatusNotOK',
@@ -12492,7 +12495,7 @@ export namespace Storage {
12492
12495
  export interface InterestGroupDetails {
12493
12496
  ownerOrigin: string;
12494
12497
  name: string;
12495
- expirationTime: number;
12498
+ expirationTime: Network.TimeSinceEpoch;
12496
12499
  joiningOrigin: string;
12497
12500
  biddingUrl?: string;
12498
12501
  biddingWasmHelperUrl?: string;
@@ -12702,6 +12705,7 @@ export namespace Storage {
12702
12705
  * One of the interest groups was accessed by the associated page.
12703
12706
  */
12704
12707
  export interface InterestGroupAccessedEvent {
12708
+ accessTime: Network.TimeSinceEpoch;
12705
12709
  type: InterestGroupAccessType;
12706
12710
  ownerOrigin: string;
12707
12711
  name: string;
@@ -16618,6 +16622,17 @@ export namespace Runtime {
16618
16622
  name: string;
16619
16623
  }
16620
16624
 
16625
+ export interface GetExceptionDetailsRequest {
16626
+ /**
16627
+ * The error object for which to resolve the exception details.
16628
+ */
16629
+ errorObjectId: RemoteObjectId;
16630
+ }
16631
+
16632
+ export interface GetExceptionDetailsResponse extends ProtocolResponseWithError {
16633
+ exceptionDetails?: ExceptionDetails;
16634
+ }
16635
+
16621
16636
  /**
16622
16637
  * Notification is issued every time when binding is called.
16623
16638
  */