chrome-devtools-frontend 1.0.952713 → 1.0.953446

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 (107) hide show
  1. package/config/gni/devtools_grd_files.gni +1 -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/locales/af.json +158 -176
  8. package/front_end/core/i18n/locales/am.json +163 -181
  9. package/front_end/core/i18n/locales/ar.json +162 -180
  10. package/front_end/core/i18n/locales/as.json +163 -181
  11. package/front_end/core/i18n/locales/az.json +161 -179
  12. package/front_end/core/i18n/locales/be.json +160 -178
  13. package/front_end/core/i18n/locales/bg.json +159 -177
  14. package/front_end/core/i18n/locales/bn.json +166 -184
  15. package/front_end/core/i18n/locales/bs.json +161 -179
  16. package/front_end/core/i18n/locales/ca.json +159 -177
  17. package/front_end/core/i18n/locales/cs.json +159 -177
  18. package/front_end/core/i18n/locales/cy.json +164 -182
  19. package/front_end/core/i18n/locales/da.json +158 -176
  20. package/front_end/core/i18n/locales/de.json +160 -178
  21. package/front_end/core/i18n/locales/el.json +158 -176
  22. package/front_end/core/i18n/locales/en-GB.json +158 -176
  23. package/front_end/core/i18n/locales/en-US.json +45 -0
  24. package/front_end/core/i18n/locales/en-XL.json +45 -0
  25. package/front_end/core/i18n/locales/es-419.json +160 -178
  26. package/front_end/core/i18n/locales/es.json +156 -174
  27. package/front_end/core/i18n/locales/et.json +161 -179
  28. package/front_end/core/i18n/locales/eu.json +159 -177
  29. package/front_end/core/i18n/locales/fa.json +166 -184
  30. package/front_end/core/i18n/locales/fi.json +161 -179
  31. package/front_end/core/i18n/locales/fil.json +162 -180
  32. package/front_end/core/i18n/locales/fr-CA.json +159 -177
  33. package/front_end/core/i18n/locales/fr.json +158 -176
  34. package/front_end/core/i18n/locales/gl.json +160 -178
  35. package/front_end/core/i18n/locales/gu.json +179 -197
  36. package/front_end/core/i18n/locales/he.json +160 -178
  37. package/front_end/core/i18n/locales/hi.json +166 -184
  38. package/front_end/core/i18n/locales/hr.json +161 -179
  39. package/front_end/core/i18n/locales/hu.json +161 -179
  40. package/front_end/core/i18n/locales/hy.json +157 -175
  41. package/front_end/core/i18n/locales/id.json +160 -178
  42. package/front_end/core/i18n/locales/is.json +163 -181
  43. package/front_end/core/i18n/locales/it.json +162 -180
  44. package/front_end/core/i18n/locales/ja.json +160 -178
  45. package/front_end/core/i18n/locales/ka.json +161 -179
  46. package/front_end/core/i18n/locales/kk.json +164 -182
  47. package/front_end/core/i18n/locales/km.json +160 -178
  48. package/front_end/core/i18n/locales/kn.json +162 -180
  49. package/front_end/core/i18n/locales/ko.json +162 -180
  50. package/front_end/core/i18n/locales/ky.json +160 -178
  51. package/front_end/core/i18n/locales/lo.json +159 -177
  52. package/front_end/core/i18n/locales/lt.json +159 -177
  53. package/front_end/core/i18n/locales/lv.json +162 -180
  54. package/front_end/core/i18n/locales/mk.json +162 -180
  55. package/front_end/core/i18n/locales/ml.json +160 -178
  56. package/front_end/core/i18n/locales/mn.json +164 -182
  57. package/front_end/core/i18n/locales/mr.json +163 -181
  58. package/front_end/core/i18n/locales/ms.json +163 -181
  59. package/front_end/core/i18n/locales/my.json +164 -182
  60. package/front_end/core/i18n/locales/ne.json +160 -178
  61. package/front_end/core/i18n/locales/nl.json +160 -178
  62. package/front_end/core/i18n/locales/no.json +281 -299
  63. package/front_end/core/i18n/locales/or.json +165 -183
  64. package/front_end/core/i18n/locales/pa.json +159 -177
  65. package/front_end/core/i18n/locales/pl.json +163 -181
  66. package/front_end/core/i18n/locales/pt-PT.json +160 -178
  67. package/front_end/core/i18n/locales/pt.json +159 -177
  68. package/front_end/core/i18n/locales/ro.json +161 -179
  69. package/front_end/core/i18n/locales/ru.json +159 -177
  70. package/front_end/core/i18n/locales/si.json +161 -179
  71. package/front_end/core/i18n/locales/sk.json +158 -176
  72. package/front_end/core/i18n/locales/sl.json +160 -178
  73. package/front_end/core/i18n/locales/sq.json +279 -297
  74. package/front_end/core/i18n/locales/sr-Latn.json +160 -178
  75. package/front_end/core/i18n/locales/sr.json +160 -178
  76. package/front_end/core/i18n/locales/sv.json +159 -177
  77. package/front_end/core/i18n/locales/sw.json +164 -182
  78. package/front_end/core/i18n/locales/ta.json +160 -178
  79. package/front_end/core/i18n/locales/te.json +165 -183
  80. package/front_end/core/i18n/locales/th.json +158 -176
  81. package/front_end/core/i18n/locales/tr.json +162 -180
  82. package/front_end/core/i18n/locales/uk.json +160 -178
  83. package/front_end/core/i18n/locales/ur.json +160 -178
  84. package/front_end/core/i18n/locales/uz.json +160 -178
  85. package/front_end/core/i18n/locales/vi.json +162 -180
  86. package/front_end/core/i18n/locales/zh-HK.json +160 -178
  87. package/front_end/core/i18n/locales/zh-TW.json +161 -179
  88. package/front_end/core/i18n/locales/zh.json +162 -180
  89. package/front_end/core/i18n/locales/zu.json +164 -182
  90. package/front_end/core/sdk/ChildTargetManager.ts +1 -0
  91. package/front_end/core/sdk/PageResourceLoader.ts +1 -2
  92. package/front_end/panels/application/components/BackForwardCacheStrings.ts +93 -15
  93. package/front_end/panels/elements/components/elementsBreadcrumbs.css +2 -0
  94. package/front_end/panels/emulation/components/DeviceSizeInputElement.ts +2 -0
  95. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +188 -185
  96. package/front_end/third_party/lighthouse/locales/en-US.json +1 -1
  97. package/front_end/third_party/lighthouse/locales/en-XL.json +1 -1
  98. package/front_end/third_party/lighthouse/report/bundle.js +3 -3
  99. package/front_end/third_party/lighthouse/report-assets/report-generator.js +1 -1
  100. package/front_end/ui/components/docs/component_docs.ts +4 -4
  101. package/front_end/ui/components/docs/component_docs_styles.css +51 -0
  102. package/inspector_overlay/main.ts +2 -16
  103. package/package.json +1 -1
  104. package/scripts/check_experiments.js +3 -6
  105. package/scripts/component_server/server.js +4 -12
  106. package/scripts/eslint_rules/lib/check_enumerated_histograms.js +32 -0
  107. package/scripts/eslint_rules/tests/check_enumerated_histograms_test.js +32 -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",
@@ -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.');