chrome-devtools-frontend 1.0.957495 → 1.0.959543

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 (159) hide show
  1. package/.eslintignore +0 -1
  2. package/AUTHORS +1 -0
  3. package/config/owner/COMMON_OWNERS +0 -1
  4. package/config/owner/INFRA_OWNERS +0 -1
  5. package/extension-api/ExtensionAPI.d.ts +7 -0
  6. package/front_end/Images/generate-css-vars.js +12 -13
  7. package/front_end/Tests.js +14 -0
  8. package/front_end/core/common/Debouncer.ts +1 -1
  9. package/front_end/core/common/Settings.ts +33 -0
  10. package/front_end/core/host/InspectorFrontendHost.ts +7 -3
  11. package/front_end/core/host/InspectorFrontendHostAPI.ts +2 -0
  12. package/front_end/core/host/UserMetrics.ts +2 -2
  13. package/front_end/core/i18n/i18nImpl.ts +1 -1
  14. package/front_end/core/i18n/locales/af.json +399 -354
  15. package/front_end/core/i18n/locales/am.json +399 -354
  16. package/front_end/core/i18n/locales/ar.json +399 -354
  17. package/front_end/core/i18n/locales/as.json +399 -354
  18. package/front_end/core/i18n/locales/az.json +399 -354
  19. package/front_end/core/i18n/locales/be.json +399 -354
  20. package/front_end/core/i18n/locales/bg.json +399 -354
  21. package/front_end/core/i18n/locales/bn.json +399 -354
  22. package/front_end/core/i18n/locales/bs.json +400 -355
  23. package/front_end/core/i18n/locales/ca.json +399 -354
  24. package/front_end/core/i18n/locales/cs.json +399 -354
  25. package/front_end/core/i18n/locales/cy.json +399 -354
  26. package/front_end/core/i18n/locales/da.json +399 -354
  27. package/front_end/core/i18n/locales/de.json +399 -354
  28. package/front_end/core/i18n/locales/el.json +399 -354
  29. package/front_end/core/i18n/locales/en-GB.json +420 -375
  30. package/front_end/core/i18n/locales/es-419.json +399 -354
  31. package/front_end/core/i18n/locales/es.json +399 -354
  32. package/front_end/core/i18n/locales/et.json +399 -354
  33. package/front_end/core/i18n/locales/eu.json +403 -358
  34. package/front_end/core/i18n/locales/fa.json +399 -354
  35. package/front_end/core/i18n/locales/fi.json +399 -354
  36. package/front_end/core/i18n/locales/fil.json +399 -354
  37. package/front_end/core/i18n/locales/fr-CA.json +399 -354
  38. package/front_end/core/i18n/locales/fr.json +399 -354
  39. package/front_end/core/i18n/locales/gl.json +399 -354
  40. package/front_end/core/i18n/locales/gu.json +399 -354
  41. package/front_end/core/i18n/locales/he.json +399 -354
  42. package/front_end/core/i18n/locales/hi.json +399 -354
  43. package/front_end/core/i18n/locales/hr.json +399 -354
  44. package/front_end/core/i18n/locales/hu.json +399 -354
  45. package/front_end/core/i18n/locales/hy.json +399 -354
  46. package/front_end/core/i18n/locales/id.json +399 -354
  47. package/front_end/core/i18n/locales/is.json +399 -354
  48. package/front_end/core/i18n/locales/it.json +399 -354
  49. package/front_end/core/i18n/locales/ja.json +399 -354
  50. package/front_end/core/i18n/locales/ka.json +399 -354
  51. package/front_end/core/i18n/locales/kk.json +400 -355
  52. package/front_end/core/i18n/locales/km.json +399 -354
  53. package/front_end/core/i18n/locales/kn.json +399 -354
  54. package/front_end/core/i18n/locales/ko.json +399 -354
  55. package/front_end/core/i18n/locales/ky.json +399 -354
  56. package/front_end/core/i18n/locales/lo.json +399 -354
  57. package/front_end/core/i18n/locales/lt.json +399 -354
  58. package/front_end/core/i18n/locales/lv.json +399 -354
  59. package/front_end/core/i18n/locales/mk.json +399 -354
  60. package/front_end/core/i18n/locales/ml.json +399 -354
  61. package/front_end/core/i18n/locales/mn.json +399 -354
  62. package/front_end/core/i18n/locales/mr.json +399 -354
  63. package/front_end/core/i18n/locales/ms.json +399 -354
  64. package/front_end/core/i18n/locales/my.json +399 -354
  65. package/front_end/core/i18n/locales/ne.json +399 -354
  66. package/front_end/core/i18n/locales/nl.json +399 -354
  67. package/front_end/core/i18n/locales/no.json +399 -354
  68. package/front_end/core/i18n/locales/or.json +399 -354
  69. package/front_end/core/i18n/locales/pa.json +410 -365
  70. package/front_end/core/i18n/locales/pl.json +399 -354
  71. package/front_end/core/i18n/locales/pt-PT.json +399 -354
  72. package/front_end/core/i18n/locales/pt.json +399 -354
  73. package/front_end/core/i18n/locales/ro.json +399 -354
  74. package/front_end/core/i18n/locales/ru.json +399 -354
  75. package/front_end/core/i18n/locales/si.json +399 -354
  76. package/front_end/core/i18n/locales/sk.json +399 -354
  77. package/front_end/core/i18n/locales/sl.json +399 -354
  78. package/front_end/core/i18n/locales/sq.json +399 -354
  79. package/front_end/core/i18n/locales/sr-Latn.json +399 -354
  80. package/front_end/core/i18n/locales/sr.json +399 -354
  81. package/front_end/core/i18n/locales/sv.json +399 -354
  82. package/front_end/core/i18n/locales/sw.json +399 -354
  83. package/front_end/core/i18n/locales/ta.json +405 -360
  84. package/front_end/core/i18n/locales/te.json +399 -354
  85. package/front_end/core/i18n/locales/th.json +399 -354
  86. package/front_end/core/i18n/locales/tr.json +399 -354
  87. package/front_end/core/i18n/locales/uk.json +399 -354
  88. package/front_end/core/i18n/locales/ur.json +399 -354
  89. package/front_end/core/i18n/locales/uz.json +399 -354
  90. package/front_end/core/i18n/locales/vi.json +399 -354
  91. package/front_end/core/i18n/locales/zh-HK.json +399 -354
  92. package/front_end/core/i18n/locales/zh-TW.json +399 -354
  93. package/front_end/core/i18n/locales/zh.json +399 -354
  94. package/front_end/core/i18n/locales/zu.json +399 -354
  95. package/front_end/core/platform/generate-dcheck.js +2 -2
  96. package/front_end/core/protocol_client/InspectorBackend.ts +3 -3
  97. package/front_end/core/sdk/Connections.ts +1 -1
  98. package/front_end/core/sdk/IsolateManager.ts +1 -1
  99. package/front_end/core/sdk/PageResourceLoader.ts +4 -2
  100. package/front_end/core/sdk/ProfileTreeModel.ts +1 -1
  101. package/front_end/devtools_compatibility.js +9 -0
  102. package/front_end/entrypoints/main/MainImpl.ts +7 -2
  103. package/front_end/entrypoints/main/main-meta.ts +24 -24
  104. package/front_end/generated/SupportedCSSProperties.js +2 -2
  105. package/front_end/models/extensions/ExtensionAPI.ts +33 -5
  106. package/front_end/models/extensions/ExtensionServer.ts +28 -0
  107. package/front_end/models/logs/LogManager.ts +1 -1
  108. package/front_end/models/persistence/Automapping.ts +32 -4
  109. package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +1 -1
  110. package/front_end/models/persistence/PersistenceImpl.ts +33 -13
  111. package/front_end/models/persistence/WorkspaceSettingsTab.ts +0 -1
  112. package/front_end/models/persistence/workspaceSettingsTab.css +3 -7
  113. package/front_end/models/workspace/UISourceCode.ts +1 -1
  114. package/front_end/panels/application/StorageView.ts +1 -1
  115. package/front_end/panels/console/ConsoleView.ts +1 -1
  116. package/front_end/panels/elements/AccessibilityTreeView.ts +2 -2
  117. package/front_end/panels/elements/ComputedStyleModel.ts +1 -1
  118. package/front_end/panels/elements/ElementsPanel.ts +34 -29
  119. package/front_end/panels/elements/StylesSidebarPane.ts +2 -2
  120. package/front_end/panels/elements/elementsPanel.css +10 -4
  121. package/front_end/panels/network/NetworkItemView.ts +1 -1
  122. package/front_end/panels/profiler/HeapTimelineOverview.ts +2 -2
  123. package/front_end/panels/profiler/LiveHeapProfileView.ts +1 -1
  124. package/front_end/panels/screencast/ScreencastView.ts +2 -2
  125. package/front_end/panels/settings/SettingsScreen.ts +1 -1
  126. package/front_end/panels/settings/settingsScreen.css +11 -5
  127. package/front_end/panels/sources/DebuggerPlugin.ts +1 -1
  128. package/front_end/panels/sources/NavigatorView.ts +1 -1
  129. package/front_end/panels/sources/SourcesSearchScope.ts +1 -1
  130. package/front_end/panels/sources/sources-meta.ts +14 -11
  131. package/front_end/panels/timeline/TimelineController.ts +2 -2
  132. package/front_end/panels/timeline/TimelineLoader.ts +3 -3
  133. package/front_end/panels/timeline/TimelinePanel.ts +1 -1
  134. package/front_end/panels/webauthn/WebauthnPane.ts +1 -1
  135. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  136. package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -1
  137. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +76 -12
  138. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
  139. package/front_end/third_party/codemirror.next/package.json +13 -13
  140. package/front_end/ui/components/buttons/Button.ts +5 -1
  141. package/front_end/ui/components/buttons/button.css +10 -1
  142. package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +2 -2
  143. package/front_end/ui/components/text_editor/TextEditor.ts +1 -1
  144. package/front_end/ui/components/text_editor/cursor_tooltip.ts +1 -1
  145. package/front_end/ui/components/text_editor/javascript.ts +1 -1
  146. package/front_end/ui/legacy/SearchableView.ts +1 -1
  147. package/front_end/ui/legacy/SoftDropDown.ts +2 -2
  148. package/front_end/ui/legacy/TextPrompt.ts +2 -1
  149. package/front_end/ui/legacy/components/perf_ui/LiveHeapProfile.ts +1 -1
  150. package/front_end/ui/legacy/filter.css +1 -0
  151. package/front_end/ui/legacy/toolbar.css +2 -0
  152. package/package.json +1 -1
  153. package/scripts/build/generate_css_js_files.js +8 -6
  154. package/scripts/build/generate_html_entrypoint.js +2 -1
  155. package/scripts/build/ninja/copy-file.js +2 -1
  156. package/scripts/build/ninja/copy-files.js +2 -1
  157. package/scripts/build/ninja/generate-declaration.js +2 -1
  158. package/scripts/build/ninja/node.gni +4 -1
  159. package/scripts/build/ninja/write-if-changed.js +27 -0
@@ -4,6 +4,7 @@
4
4
  const fs = require('fs');
5
5
  const path = require('path');
6
6
  const CleanCSS = require('clean-css');
7
+ const {writeIfChanged} = require('./ninja/write-if-changed.js');
7
8
  const [, , buildTimestamp, isDebugString, legacyString, targetName, srcDir, targetGenDir, files] = process.argv;
8
9
 
9
10
  const filenames = files.split(',');
@@ -34,21 +35,22 @@ export default styles;`;
34
35
  }
35
36
 
36
37
  const generatedFileName = `${fileName}${isLegacy ? '.legacy' : ''}.js`;
37
-
38
- fs.writeFileSync(
39
- path.join(targetGenDir, generatedFileName),
40
- `// Copyright ${new Date(Number(buildTimestamp) * 1000).getFullYear()} The Chromium Authors. All rights reserved.
38
+ const generatedFileLocation = path.join(targetGenDir, generatedFileName);
39
+ const newContents = `// Copyright ${
40
+ new Date(Number(buildTimestamp) * 1000).getUTCFullYear()} The Chromium Authors. All rights reserved.
41
41
  // Use of this source code is governed by a BSD-style license that can be
42
42
  // found in the LICENSE file.
43
43
  // IMPORTANT: this file is auto generated. Please do not edit this file.
44
44
  /* istanbul ignore file */
45
45
  ${exportStatement}
46
- `);
46
+ `;
47
+
48
+ writeIfChanged(generatedFileLocation, newContents);
47
49
 
48
50
  configFiles.push(`\"${generatedFileName}\"`);
49
51
  }
50
52
 
51
- fs.writeFileSync(path.join(targetGenDir, `${targetName}-tsconfig.json`), `{
53
+ writeIfChanged(path.join(targetGenDir, `${targetName}-tsconfig.json`), `{
52
54
  "compilerOptions": {
53
55
  "composite": true,
54
56
  "outDir": "."
@@ -5,6 +5,7 @@
5
5
  const fs = require('fs');
6
6
  const path = require('path');
7
7
  const {argv} = require('yargs');
8
+ const {writeIfChanged} = require('./ninja/write-if-changed.js');
8
9
 
9
10
  const {template} = argv;
10
11
 
@@ -32,5 +33,5 @@ const templateContent = fs.readFileSync(template, 'utf-8');
32
33
 
33
34
  for (const entrypoint of entrypoints) {
34
35
  const rewrittenTemplateContent = templateContent.replace(new RegExp('%ENTRYPOINT_NAME%', 'g'), entrypoint);
35
- fs.writeFileSync(path.join(outDirectory, `${entrypoint}.html`), rewrittenTemplateContent);
36
+ writeIfChanged(path.join(outDirectory, `${entrypoint}.html`), rewrittenTemplateContent);
36
37
  }
@@ -3,6 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
  const fs = require('fs');
5
5
  const path = require('path');
6
+ const {writeIfChanged} = require('./write-if-changed.js');
6
7
  const [, , src, dest] = process.argv;
7
8
 
8
9
  const srcPath = path.join(process.cwd(), src);
@@ -23,7 +24,7 @@ if (fileExists(destPath)) {
23
24
  // Force a write to the target filesystem, since by default the ninja
24
25
  // toolchain will create a hardlink, which in turn reflects changes in
25
26
  // gen and resources/inspector back to //front_end.
26
- fs.writeFileSync(destPath, srcContents);
27
+ writeIfChanged(destPath, srcContents);
27
28
 
28
29
  /**
29
30
  * Case sensitive implementation of a file look up.
@@ -3,6 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
  const fs = require('fs');
5
5
  const path = require('path');
6
+ const {writeIfChanged} = require('./write-if-changed.js');
6
7
  const [, , src, dest, files] = process.argv;
7
8
 
8
9
  for (const file of files.split(',')) {
@@ -24,7 +25,7 @@ for (const file of files.split(',')) {
24
25
  // Force a write to the target filesystem, since by default the ninja
25
26
  // toolchain will create a hardlink, which in turn reflects changes in
26
27
  // gen and resources/inspector back to //front_end.
27
- fs.writeFileSync(destPath, srcContents);
28
+ writeIfChanged(destPath, srcContents);
28
29
  }
29
30
 
30
31
  /**
@@ -3,6 +3,7 @@
3
3
  // found in the LICENSE file.
4
4
  const fs = require('fs');
5
5
  const path = require('path');
6
+ const {writeIfChanged} = require('./write-if-changed.js');
6
7
 
7
8
  const [, , outputDirectory, entrypointName] = process.argv;
8
9
 
@@ -13,4 +14,4 @@ const outputLocation = path.join(outputDirectory, `${rawFileName}.d.ts`);
13
14
  // We can't use copy here, as that would maintain the original file timestamps.
14
15
  // This can throw off Ninja, which verifies that timestamps of generated files
15
16
  // are the same as the timestamp it ran the action on.
16
- fs.writeFileSync(outputLocation, fs.readFileSync(inputLocation));
17
+ writeIfChanged(outputLocation, fs.readFileSync(inputLocation));
@@ -20,7 +20,10 @@ template("node_action") {
20
20
 
21
21
  _full_script_location = devtools_location_prepend + invoker.script
22
22
 
23
- inputs += [ _full_script_location ]
23
+ inputs += [
24
+ _full_script_location,
25
+ devtools_location_prepend + "scripts/build/ninja/write-if-changed.js",
26
+ ]
24
27
 
25
28
  args = [ rebase_path(_full_script_location, root_build_dir) ] + invoker.args
26
29
  }
@@ -0,0 +1,27 @@
1
+ // Copyright 2022 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ const fs = require('fs');
6
+
7
+ /**
8
+ * Only write content to a file if the content is different that what it previously contained.
9
+ * The reason for only writing when necessary is that GN uses file timestamps to determine freshness.
10
+ * Therefore, if the file contents hasn't changed, but the timestamp has, GN thinks the file is new.
11
+ *
12
+ * Instead, we can only write when the content is changed, meaning we don't touch a file when it is
13
+ * unchanged. This would preserve the original file timestamps and hence GN can correctly conclude
14
+ * the file output hasn't changed.
15
+ *
16
+ * @param {string} generatedFileLocation Location to write to
17
+ * @param {string} newContents The contents to write (or noop if unchanged with previous content)
18
+ */
19
+ module.exports.writeIfChanged = (generatedFileLocation, newContents) => {
20
+ if (fs.existsSync(generatedFileLocation)) {
21
+ if (fs.readFileSync(generatedFileLocation, {encoding: 'utf8', flag: 'r'}) === newContents) {
22
+ return;
23
+ }
24
+ }
25
+
26
+ fs.writeFileSync(generatedFileLocation, newContents, {encoding: 'utf-8'});
27
+ };