chrome-devtools-frontend 1.0.952865 → 1.0.954086

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 (74) hide show
  1. package/config/gni/devtools_grd_files.gni +4 -0
  2. package/config/gni/devtools_image_files.gni +1 -0
  3. package/front_end/.eslintrc.js +1 -0
  4. package/front_end/Images/src/info-icon.svg +1 -0
  5. package/front_end/core/common/ParsedURL.ts +31 -0
  6. package/front_end/core/host/UserMetrics.ts +515 -481
  7. package/front_end/core/i18n/i18nImpl.ts +8 -30
  8. package/front_end/core/i18n/locales/en-US.json +48 -0
  9. package/front_end/core/i18n/locales/en-XL.json +48 -0
  10. package/front_end/core/platform/number-utilities.ts +5 -7
  11. package/front_end/core/platform/string-utilities.ts +45 -25
  12. package/front_end/core/sdk/ChildTargetManager.ts +1 -0
  13. package/front_end/core/sdk/PageResourceLoader.ts +1 -2
  14. package/front_end/core/sdk/ResourceTreeModel.ts +12 -2
  15. package/front_end/generated/InspectorBackendCommands.js +3 -1
  16. package/front_end/generated/protocol.d.ts +19 -0
  17. package/front_end/models/extensions/ExtensionServer.ts +2 -3
  18. package/front_end/panels/application/components/BackForwardCacheStrings.ts +93 -15
  19. package/front_end/panels/application/components/EndpointsGrid.ts +1 -1
  20. package/front_end/panels/elements/components/AdornerSettingsPane.ts +2 -1
  21. package/front_end/panels/elements/components/LayoutPane.ts +2 -0
  22. package/front_end/panels/elements/components/elementsBreadcrumbs.css +2 -0
  23. package/front_end/panels/elements/layoutPane.css +0 -4
  24. package/front_end/panels/emulation/components/DeviceSizeInputElement.ts +2 -0
  25. package/front_end/panels/network/NetworkDataGridNode.ts +0 -2
  26. package/front_end/panels/network/components/WebBundleInfoView.ts +1 -1
  27. package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +2 -1
  28. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +188 -185
  29. package/front_end/third_party/lighthouse/locales/en-US.json +1 -1
  30. package/front_end/third_party/lighthouse/locales/en-XL.json +1 -1
  31. package/front_end/third_party/lighthouse/report/bundle.js +3 -3
  32. package/front_end/third_party/lighthouse/report-assets/report-generator.js +1 -1
  33. package/front_end/third_party/puppeteer/package/README.md +11 -11
  34. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js +2 -2
  35. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/AriaQueryHandler.js.map +1 -1
  36. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts +2 -0
  37. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.d.ts.map +1 -1
  38. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js +20 -11
  39. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/DOMWorld.js.map +1 -1
  40. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.d.ts.map +1 -1
  41. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js +13 -3
  42. package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/JSHandle.js.map +1 -1
  43. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js +2 -2
  44. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/AriaQueryHandler.js.map +1 -1
  45. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts +2 -0
  46. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.d.ts.map +1 -1
  47. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js +20 -11
  48. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/DOMWorld.js.map +1 -1
  49. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.d.ts.map +1 -1
  50. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js +13 -3
  51. package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/JSHandle.js.map +1 -1
  52. package/front_end/third_party/puppeteer/package/lib/types.d.ts +2 -0
  53. package/front_end/third_party/puppeteer/package/package.json +1 -1
  54. package/front_end/ui/components/docs/component_docs.ts +4 -4
  55. package/front_end/ui/components/docs/component_docs_styles.css +51 -0
  56. package/front_end/ui/components/input/checkbox.css +11 -0
  57. package/front_end/ui/components/input/input.ts +3 -3
  58. package/front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings.ts +2 -1
  59. package/front_end/ui/components/markdown_view/MarkdownView.ts +1 -1
  60. package/front_end/ui/components/panel_feedback/PreviewToggle.ts +2 -1
  61. package/front_end/ui/components/settings/SettingCheckbox.ts +2 -1
  62. package/front_end/ui/components/settings/settingCheckbox.css +0 -5
  63. package/front_end/ui/legacy/RemoteDebuggingTerminatedScreen.ts +10 -3
  64. package/front_end/ui/legacy/UIUtils.ts +0 -12
  65. package/front_end/ui/legacy/themeColors.css +1 -0
  66. package/inspector_overlay/main.ts +2 -16
  67. package/package.json +1 -1
  68. package/scripts/check_experiments.js +3 -6
  69. package/scripts/component_server/server.js +4 -12
  70. package/scripts/eslint_rules/lib/check_enumerated_histograms.js +32 -0
  71. package/scripts/eslint_rules/lib/lit_html_host_this.js +1 -10
  72. package/scripts/eslint_rules/lib/utils.js +20 -1
  73. package/scripts/eslint_rules/tests/check_enumerated_histograms_test.js +32 -0
  74. package/scripts/eslint_rules/tests/utils_test.js +30 -0
@@ -93,6 +93,7 @@ grd_files_release_sources = [
93
93
  "front_end/Images/ic_suggest_color.svg",
94
94
  "front_end/Images/ic_undo_16x16_icon.svg",
95
95
  "front_end/Images/ic_warning_black_18dp.svg",
96
+ "front_end/Images/info-icon.svg",
96
97
  "front_end/Images/issue-cross-icon.svg",
97
98
  "front_end/Images/issue-exclamation-icon.svg",
98
99
  "front_end/Images/issue-questionmark-icon.svg",
@@ -460,6 +461,7 @@ grd_files_release_sources = [
460
461
  "front_end/ui/components/expandable_list/expandable_list.js",
461
462
  "front_end/ui/components/helpers/helpers.js",
462
463
  "front_end/ui/components/icon_button/icon_button.js",
464
+ "front_end/ui/components/input/input.js",
463
465
  "front_end/ui/components/issue_counter/issue_counter.js",
464
466
  "front_end/ui/components/linear_memory_inspector/linear_memory_inspector-meta.js",
465
467
  "front_end/ui/components/linear_memory_inspector/linear_memory_inspector.js",
@@ -1321,6 +1323,8 @@ grd_files_debug_sources = [
1321
1323
  "front_end/ui/components/icon_button/IconButton.js",
1322
1324
  "front_end/ui/components/icon_button/icon.css.js",
1323
1325
  "front_end/ui/components/icon_button/iconButton.css.js",
1326
+ "front_end/ui/components/input/checkbox.css.js",
1327
+ "front_end/ui/components/input/textInput.css.js",
1324
1328
  "front_end/ui/components/issue_counter/IssueCounter.js",
1325
1329
  "front_end/ui/components/issue_counter/IssueLinkIcon.js",
1326
1330
  "front_end/ui/components/issue_counter/issueCounter.css.js",
@@ -103,6 +103,7 @@ devtools_svg_sources = [
103
103
  "ic_suggest_color.svg",
104
104
  "ic_undo_16x16_icon.svg",
105
105
  "ic_warning_black_18dp.svg",
106
+ "info-icon.svg",
106
107
  "issue-cross-icon.svg",
107
108
  "issue-exclamation-icon.svg",
108
109
  "issue-questionmark-icon.svg",
@@ -37,6 +37,7 @@ module.exports = {
37
37
  'rulesdir/ban_a_tags_in_lit_html': 2,
38
38
  'rulesdir/check_component_naming': 2,
39
39
  'rulesdir/check_css_import': 2,
40
+ 'rulesdir/check_enumerated_histograms': 2,
40
41
  'rulesdir/check_was_shown_methods': 2,
41
42
  'rulesdir/static_custom_event_names': 2,
42
43
  'rulesdir/lit_html_host_this': 2,
@@ -0,0 +1 @@
1
+ <svg width="11" height="12" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="5.5" cy="6" r="5" stroke="#202124"/><path fill="#202124" d="M5 4.5h1v5H5zM5 2.5h1v1H5z"/></svg>
@@ -110,6 +110,30 @@ export class ParsedURL {
110
110
  return null;
111
111
  }
112
112
 
113
+ private static preEncodeSpecialCharactersInPath(path: string): string {
114
+ // Based on net::FilePathToFileURL. Ideally we would handle
115
+ // '\\' as well on non-Windows file systems.
116
+ for (const specialChar of ['%', ';', '#', '?']) {
117
+ (path as string) = path.replaceAll(specialChar, encodeURIComponent(specialChar));
118
+ }
119
+ return path;
120
+ }
121
+
122
+ static rawPathToEncodedPathString(path: Platform.DevToolsPath.RawPathString):
123
+ Platform.DevToolsPath.EncodedPathString {
124
+ const partiallyEncoded = ParsedURL.preEncodeSpecialCharactersInPath(path);
125
+ if (path.startsWith('/')) {
126
+ return new URL(partiallyEncoded, 'file:///').pathname as Platform.DevToolsPath.EncodedPathString;
127
+ }
128
+ // URL prepends a '/'
129
+ return new URL('/' + partiallyEncoded, 'file:///').pathname.substr(1) as Platform.DevToolsPath.EncodedPathString;
130
+ }
131
+
132
+ static encodedPathToRawPathString(encPath: Platform.DevToolsPath.EncodedPathString):
133
+ Platform.DevToolsPath.RawPathString {
134
+ return decodeURIComponent(encPath) as Platform.DevToolsPath.RawPathString;
135
+ }
136
+
113
137
  static rawPathToUrlString(fileSystemPath: Platform.DevToolsPath.RawPathString): Platform.DevToolsPath.UrlString {
114
138
  let rawPath: string = fileSystemPath;
115
139
  rawPath = rawPath.replace(/\\/g, '/');
@@ -123,6 +147,13 @@ export class ParsedURL {
123
147
  return rawPath as Platform.DevToolsPath.UrlString;
124
148
  }
125
149
 
150
+ static relativePathToUrlString(relativePath: string, baseURL: Platform.DevToolsPath.UrlString):
151
+ Platform.DevToolsPath.UrlString {
152
+ const preEncodedPath: string = ParsedURL.preEncodeSpecialCharactersInPath(
153
+ relativePath.replace(/\\/g, '/') as Platform.DevToolsPath.RawPathString);
154
+ return new URL(preEncodedPath, baseURL).toString() as Platform.DevToolsPath.UrlString;
155
+ }
156
+
126
157
  static capFilePrefix(fileURL: Platform.DevToolsPath.UrlString, isWindows?: boolean):
127
158
  Platform.DevToolsPath.RawPathString {
128
159
  console.assert(fileURL.startsWith('file://'), 'This must be a file URL.');