chrome-devtools-frontend 1.0.944903 → 1.0.945884

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 (86) 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/Images/src/circled_exclamation_icon.svg +3 -0
  4. package/front_end/core/host/InspectorFrontendHostAPI.ts +5 -5
  5. package/front_end/core/host/UserMetrics.ts +3 -1
  6. package/front_end/core/i18n/i18nImpl.ts +7 -4
  7. package/front_end/core/i18n/locales/en-US.json +9 -45
  8. package/front_end/core/i18n/locales/en-XL.json +9 -45
  9. package/front_end/core/sdk/CSSMetadata.ts +0 -1
  10. package/front_end/core/sdk/sdk-meta.ts +20 -8
  11. package/front_end/entrypoints/main/MainImpl.ts +6 -0
  12. package/front_end/generated/protocol.d.ts +0 -4
  13. package/front_end/models/emulation/EmulatedDevices.ts +2 -4
  14. package/front_end/models/persistence/IsolatedFileSystemManager.ts +6 -10
  15. package/front_end/models/timeline_model/TimelineJSProfile.ts +16 -3
  16. package/front_end/models/timeline_model/TimelineModel.ts +1 -0
  17. package/front_end/models/workspace_diff/WorkspaceDiff.ts +20 -6
  18. package/front_end/panels/animation/AnimationTimeline.ts +1 -1
  19. package/front_end/panels/application/BackForwardCacheStrings.ts +15 -75
  20. package/front_end/panels/application/BackForwardCacheView.ts +8 -1
  21. package/front_end/panels/changes/ChangesView.ts +8 -7
  22. package/front_end/panels/elements/StyleEditorWidget.ts +7 -7
  23. package/front_end/panels/elements/StylePropertyTreeElement.ts +8 -15
  24. package/front_end/panels/elements/StylesSidebarPane.ts +35 -9
  25. package/front_end/panels/emulation/DeviceModeView.ts +3 -0
  26. package/front_end/panels/help/ReleaseNoteText.ts +3 -1
  27. package/front_end/panels/network/NetworkItemView.ts +7 -1
  28. package/front_end/panels/profiler/heapProfiler.css +2 -5
  29. package/front_end/panels/timeline/TimelineController.ts +3 -0
  30. package/front_end/panels/webauthn/WebauthnPane.ts +31 -32
  31. package/front_end/third_party/acorn/README.chromium +2 -2
  32. package/front_end/third_party/acorn/acorn.ts +1 -1
  33. package/front_end/third_party/acorn/package/CHANGELOG.md +31 -1
  34. package/front_end/third_party/acorn/package/README.md +1 -1
  35. package/front_end/third_party/acorn/package/dist/acorn.d.ts +3 -0
  36. package/front_end/third_party/acorn/package/dist/acorn.js +772 -708
  37. package/front_end/third_party/acorn/package/dist/acorn.mjs +767 -703
  38. package/front_end/third_party/acorn/package/dist/bin.js +47 -21
  39. package/front_end/third_party/acorn/package/package.json +1 -1
  40. package/front_end/third_party/acorn-loose/README.chromium +2 -2
  41. package/front_end/third_party/acorn-loose/package/CHANGELOG.md +12 -0
  42. package/front_end/third_party/acorn-loose/package/dist/acorn-loose.js +27 -7
  43. package/front_end/third_party/acorn-loose/package/dist/acorn-loose.mjs +28 -8
  44. package/front_end/third_party/acorn-loose/package/package.json +2 -2
  45. package/front_end/third_party/i18n/i18n-impl.ts +1 -1
  46. package/front_end/ui/components/adorners/Adorner.ts +14 -14
  47. package/front_end/ui/components/buttons/Button.ts +133 -42
  48. package/front_end/ui/components/buttons/button.css +31 -0
  49. package/front_end/ui/components/data_grid/DataGrid.ts +131 -122
  50. package/front_end/ui/components/data_grid/DataGridController.ts +42 -42
  51. package/front_end/ui/components/diff_view/DiffView.ts +4 -4
  52. package/front_end/ui/components/docs/button/basic.html +3 -0
  53. package/front_end/ui/components/docs/button/basic.ts +58 -0
  54. package/front_end/ui/components/expandable_list/ExpandableList.ts +11 -11
  55. package/front_end/ui/components/icon_button/Icon.ts +24 -21
  56. package/front_end/ui/components/icon_button/IconButton.ts +31 -31
  57. package/front_end/ui/components/issue_counter/IssueCounter.ts +52 -52
  58. package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +42 -42
  59. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +67 -67
  60. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +22 -22
  61. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +36 -36
  62. package/front_end/ui/components/linear_memory_inspector/LinearMemoryNavigator.ts +19 -19
  63. package/front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts +24 -32
  64. package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +52 -52
  65. package/front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay.ts +21 -21
  66. package/front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings.ts +6 -6
  67. package/front_end/ui/components/markdown_view/MarkdownImage.ts +14 -14
  68. package/front_end/ui/components/markdown_view/MarkdownLink.ts +8 -8
  69. package/front_end/ui/components/markdown_view/MarkdownView.ts +6 -6
  70. package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +33 -33
  71. package/front_end/ui/components/report_view/ReportView.ts +18 -18
  72. package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +53 -53
  73. package/front_end/ui/components/settings/SettingCheckbox.ts +15 -15
  74. package/front_end/ui/components/survey_link/SurveyLink.ts +28 -28
  75. package/front_end/ui/components/text_editor/TextEditor.ts +55 -52
  76. package/front_end/ui/components/text_editor/javascript.ts +6 -6
  77. package/front_end/ui/components/text_prompt/TextPrompt.ts +19 -19
  78. package/front_end/ui/components/tree_outline/TreeOutline.ts +56 -56
  79. package/front_end/ui/legacy/Infobar.ts +9 -0
  80. package/front_end/ui/legacy/InspectorView.ts +1 -1
  81. package/front_end/ui/legacy/ListWidget.ts +2 -2
  82. package/front_end/ui/legacy/tabbedPane.css +1 -1
  83. package/inspector_overlay/main.ts +3 -0
  84. package/package.json +1 -1
  85. package/scripts/eslint_rules/lib/l10n_filename_matches.js +17 -4
  86. package/scripts/eslint_rules/tests/l10n_filename_matches_test.js +21 -0
@@ -471,7 +471,7 @@ function createLocaleInfobar(): Infobar {
471
471
  // @ts-ignore TODO(crbug.com/1163928) Wait for Intl support.
472
472
  const locale = new Intl.Locale(closestSupportedLocale);
473
473
  const closestSupportedLanguageInCurrentLocale =
474
- new Intl.DisplayNames([devtoolsLocale.locale], {type: 'language'}).of(locale.language);
474
+ new Intl.DisplayNames([devtoolsLocale.locale], {type: 'language'}).of(locale.language || 'en');
475
475
 
476
476
  const languageSetting = Common.Settings.Settings.instance().moduleSetting<string>('language');
477
477
  return new Infobar(
@@ -276,10 +276,10 @@ export class Editor<T> {
276
276
  this.element = document.createElement('div');
277
277
  this.element.classList.add('editor-container');
278
278
  this.element.addEventListener('keydown', onKeyDown.bind(null, isEscKey, this.cancelClicked.bind(this)), false);
279
- this.element.addEventListener(
280
- 'keydown', onKeyDown.bind(null, event => event.key === 'Enter', this.commitClicked.bind(this)), false);
281
279
 
282
280
  this.contentElementInternal = this.element.createChild('div', 'editor-content');
281
+ this.contentElementInternal.addEventListener(
282
+ 'keydown', onKeyDown.bind(null, event => event.key === 'Enter', this.commitClicked.bind(this)), false);
283
283
 
284
284
  const buttonsRow = this.element.createChild('div', 'editor-buttons');
285
285
  this.commitButton = createTextButton('', this.commitClicked.bind(this), '', true /* primary */);
@@ -134,7 +134,7 @@
134
134
  .tabbed-pane-header-tab:hover,
135
135
  .tabbed-pane-shadow .tabbed-pane-header-tab:focus-visible {
136
136
  color: var(--color-text-primary);
137
- background-color: var(--legacy-toolbar-hover-bg-color);
137
+ background-color: var(--color-background-elevation-1);
138
138
  }
139
139
 
140
140
  .tabbed-pane-header-tab-title {
@@ -77,6 +77,7 @@ let platformName: PlatformName;
77
77
  type MessageLookup = {
78
78
  'setOverlay': keyof Overlays,
79
79
  'setPlatform': PlatformName,
80
+ drawingFinished: '',
80
81
  };
81
82
 
82
83
  const dispatch = <K extends keyof MessageLookup>(message: [a: K, b: MessageLookup[K]]) => {
@@ -95,6 +96,8 @@ const dispatch = <K extends keyof MessageLookup>(message: [a: K, b: MessageLooku
95
96
  }
96
97
  } else if (functionName === 'setPlatform') {
97
98
  platformName = message[1];
99
+ } else if (functionName === 'drawingFinished') {
100
+ // TODO The logic needs to be added here once the backend starts sending this event.
98
101
  } else {
99
102
  currentOverlay.dispatch(message);
100
103
  }
package/package.json CHANGED
@@ -55,5 +55,5 @@
55
55
  "unittest": "scripts/test/run_unittests.py --no-text-coverage",
56
56
  "watch": "third_party/node/node.py --output scripts/watch_build.js"
57
57
  },
58
- "version": "1.0.944903"
58
+ "version": "1.0.945884"
59
59
  }
@@ -5,8 +5,9 @@
5
5
  'use strict';
6
6
 
7
7
  const path = require('path');
8
+ const {devtoolsRootPath} = require('../../devtools_paths.js');
8
9
 
9
- const FRONT_END_DIRECTORY = path.join(__dirname, '..', '..', '..', 'front_end');
10
+ const DEFAULT_FRONT_END_DIRECTORY = path.join(devtoolsRootPath(), 'front_end');
10
11
 
11
12
  function isModuleScope(context) {
12
13
  return context.getScope().type === 'module';
@@ -36,7 +37,15 @@ module.exports = {
36
37
  category: 'Possible Errors',
37
38
  },
38
39
  fixable: 'code',
39
- schema: [] // no options
40
+ schema: [{
41
+ 'type': 'object',
42
+ 'properties': {
43
+ 'rootFrontendDirectory': {
44
+ 'type': 'string',
45
+ },
46
+ },
47
+ additionalProperties: false,
48
+ }]
40
49
  },
41
50
  create: function(context) {
42
51
  return {
@@ -51,8 +60,12 @@ module.exports = {
51
60
  return;
52
61
  }
53
62
 
63
+ let frontEndDirectory = DEFAULT_FRONT_END_DIRECTORY;
64
+ if (context.options && context.options[0]?.rootFrontendDirectory) {
65
+ frontEndDirectory = context.options[0].rootFrontendDirectory;
66
+ }
54
67
  const currentSourceFile = path.resolve(context.getFilename());
55
- const currentFileRelativeToFrontEnd = path.relative(FRONT_END_DIRECTORY, currentSourceFile);
68
+ const currentFileRelativeToFrontEnd = path.relative(frontEndDirectory, currentSourceFile);
56
69
 
57
70
  const currentModuleDirectory = path.dirname(currentSourceFile);
58
71
  const allowedPathArguments = [
@@ -62,7 +75,7 @@ module.exports = {
62
75
  ];
63
76
 
64
77
  const previousFileLocationArgument = callExpression.arguments[0];
65
- const actualPath = path.join(FRONT_END_DIRECTORY, previousFileLocationArgument.value);
78
+ const actualPath = path.join(frontEndDirectory, previousFileLocationArgument.value);
66
79
  if (!allowedPathArguments.includes(actualPath)) {
67
80
  const newFileName = currentFileRelativeToFrontEnd.replace(/\\/g, '/');
68
81
  context.report({
@@ -4,6 +4,8 @@
4
4
 
5
5
  'use strict';
6
6
 
7
+ const path = require('path');
8
+
7
9
  const rule = require('../lib/l10n_filename_matches.js');
8
10
  const ruleTester = new (require('eslint').RuleTester)({
9
11
  parserOptions: {ecmaVersion: 9, sourceType: 'module'},
@@ -24,6 +26,16 @@ ruleTester.run('l10n_filename_matches', rule, {
24
26
  code: 'const str_ = i18n.i18n.registerUIStrings(\'components/ModuleUIStrings.ts\', UIStrings);',
25
27
  filename: 'front_end/components/test.ts',
26
28
  },
29
+ {
30
+ code: 'const str_ = i18n.i18n.registerUIStrings(\'ModuleUIStrings.ts\', UIStrings);',
31
+ filename: 'front_end/components/test.ts',
32
+ options: [{rootFrontendDirectory: path.join(__dirname, '..', '..', '..', 'front_end', 'components')}]
33
+ },
34
+ {
35
+ code: 'const str_ = i18n.i18n.registerUIStrings(\'test.ts\', UIStrings);',
36
+ filename: 'front_end/components/test.ts',
37
+ options: [{rootFrontendDirectory: path.join(__dirname, '..', '..', '..', 'front_end', 'components')}]
38
+ },
27
39
  ],
28
40
  invalid: [
29
41
  {
@@ -35,5 +47,14 @@ ruleTester.run('l10n_filename_matches', rule, {
35
47
  }],
36
48
  output: 'const str_ = i18n.i18n.registerUIStrings(\'components/test.ts\', UIStrings);',
37
49
  },
50
+ {
51
+ code: 'const str_ = i18n.i18n.registerUIStrings(\'components/test.ts\', UIStrings);',
52
+ filename: 'front_end/components/test.ts',
53
+ errors: [
54
+ {message: 'First argument to \'registerUIStrings\' call must be \'test.ts\' or the ModuleUIStrings.(js|ts)'}
55
+ ],
56
+ output: 'const str_ = i18n.i18n.registerUIStrings(\'test.ts\', UIStrings);',
57
+ options: [{rootFrontendDirectory: path.join(__dirname, '..', '..', '..', 'front_end', 'components')}]
58
+ },
38
59
  ]
39
60
  });