chrome-devtools-frontend 1.0.942095 → 1.0.942529

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 (125) hide show
  1. package/config/gni/all_devtools_files.gni +0 -44
  2. package/config/gni/devtools_grd_files.gni +42 -2
  3. package/config/gni/devtools_image_files.gni +1 -1
  4. package/front_end/.eslintrc.js +11 -1
  5. package/front_end/Images/src/{feedback_thin_16x16_icon.svg → survey_feedback_icon.svg} +1 -1
  6. package/front_end/core/sdk/DebuggerModel.ts +4 -14
  7. package/front_end/emulated_devices/module.json +1 -3
  8. package/front_end/entrypoints/devtools_app/devtools_app.json +0 -2
  9. package/front_end/entrypoints/shell/shell.json +0 -1
  10. package/front_end/legacy_test_runner/bindings_test_runner/IsolatedFilesystemTestRunner.js +2 -2
  11. package/front_end/legacy_test_runner/test_runner/TestRunner.js +3 -1
  12. package/front_end/panels/application/components/EndpointsGrid.ts +1 -1
  13. package/front_end/panels/application/components/ReportsGrid.ts +1 -1
  14. package/front_end/panels/elements/components/StylePropertyEditor.ts +2 -0
  15. package/front_end/panels/emulation/DeviceModeToolbar.ts +3 -1
  16. package/front_end/panels/emulation/DeviceModeView.ts +2 -1
  17. package/front_end/panels/emulation/InspectedPagePlaceholder.ts +3 -1
  18. package/front_end/panels/emulation/MediaQueryInspector.ts +3 -1
  19. package/front_end/panels/emulation/emulation-meta.ts +0 -2
  20. package/front_end/panels/lighthouse/LighthousePanel.ts +2 -4
  21. package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +1 -4
  22. package/front_end/panels/lighthouse/module.json +1 -4
  23. package/front_end/panels/profiler/module.json +1 -3
  24. package/front_end/panels/screencast/module.json +1 -4
  25. package/front_end/panels/timeline/module.json +0 -1
  26. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1128 -1158
  27. package/front_end/third_party/lighthouse/locales/ar-XB.json +211 -79
  28. package/front_end/third_party/lighthouse/locales/ar.json +213 -81
  29. package/front_end/third_party/lighthouse/locales/bg.json +211 -79
  30. package/front_end/third_party/lighthouse/locales/ca.json +212 -80
  31. package/front_end/third_party/lighthouse/locales/cs.json +211 -79
  32. package/front_end/third_party/lighthouse/locales/da.json +211 -79
  33. package/front_end/third_party/lighthouse/locales/de.json +211 -79
  34. package/front_end/third_party/lighthouse/locales/el.json +213 -81
  35. package/front_end/third_party/lighthouse/locales/en-GB.json +211 -79
  36. package/front_end/third_party/lighthouse/locales/en-US.json +186 -75
  37. package/front_end/third_party/lighthouse/locales/en-XA.json +211 -79
  38. package/front_end/third_party/lighthouse/locales/en-XL.json +186 -75
  39. package/front_end/third_party/lighthouse/locales/es-419.json +211 -79
  40. package/front_end/third_party/lighthouse/locales/es.json +212 -80
  41. package/front_end/third_party/lighthouse/locales/fi.json +211 -79
  42. package/front_end/third_party/lighthouse/locales/fil.json +211 -79
  43. package/front_end/third_party/lighthouse/locales/fr.json +211 -79
  44. package/front_end/third_party/lighthouse/locales/he.json +212 -80
  45. package/front_end/third_party/lighthouse/locales/hi.json +214 -82
  46. package/front_end/third_party/lighthouse/locales/hr.json +211 -79
  47. package/front_end/third_party/lighthouse/locales/hu.json +211 -79
  48. package/front_end/third_party/lighthouse/locales/id.json +211 -79
  49. package/front_end/third_party/lighthouse/locales/it.json +211 -79
  50. package/front_end/third_party/lighthouse/locales/ja.json +211 -79
  51. package/front_end/third_party/lighthouse/locales/ko.json +211 -79
  52. package/front_end/third_party/lighthouse/locales/lt.json +211 -79
  53. package/front_end/third_party/lighthouse/locales/lv.json +214 -82
  54. package/front_end/third_party/lighthouse/locales/nl.json +211 -79
  55. package/front_end/third_party/lighthouse/locales/no.json +211 -79
  56. package/front_end/third_party/lighthouse/locales/pl.json +211 -79
  57. package/front_end/third_party/lighthouse/locales/pt-PT.json +211 -79
  58. package/front_end/third_party/lighthouse/locales/pt.json +211 -79
  59. package/front_end/third_party/lighthouse/locales/ro.json +212 -80
  60. package/front_end/third_party/lighthouse/locales/ru.json +211 -79
  61. package/front_end/third_party/lighthouse/locales/sk.json +211 -79
  62. package/front_end/third_party/lighthouse/locales/sl.json +211 -79
  63. package/front_end/third_party/lighthouse/locales/sr-Latn.json +211 -79
  64. package/front_end/third_party/lighthouse/locales/sr.json +211 -79
  65. package/front_end/third_party/lighthouse/locales/sv.json +211 -79
  66. package/front_end/third_party/lighthouse/locales/ta.json +218 -86
  67. package/front_end/third_party/lighthouse/locales/te.json +251 -119
  68. package/front_end/third_party/lighthouse/locales/th.json +211 -79
  69. package/front_end/third_party/lighthouse/locales/tr.json +211 -79
  70. package/front_end/third_party/lighthouse/locales/uk.json +212 -80
  71. package/front_end/third_party/lighthouse/locales/vi.json +211 -79
  72. package/front_end/third_party/lighthouse/locales/zh-HK.json +211 -79
  73. package/front_end/third_party/lighthouse/locales/zh-TW.json +211 -79
  74. package/front_end/third_party/lighthouse/locales/zh.json +211 -79
  75. package/front_end/third_party/lighthouse/report/bundle.d.ts +72 -34
  76. package/front_end/third_party/lighthouse/report/bundle.js +698 -492
  77. package/front_end/third_party/lighthouse/report-assets/report-generator.js +1 -2
  78. package/front_end/third_party/lighthouse/report-assets/report.js +40 -35
  79. package/front_end/third_party/lighthouse/report-assets/standalone-template.html +2 -4
  80. package/front_end/ui/components/docs/icon_button/basic.ts +3 -3
  81. package/front_end/ui/components/helpers/get-stylesheet.ts +0 -14
  82. package/front_end/ui/components/markdown_view/MarkdownImagesMap.ts +1 -1
  83. package/front_end/ui/components/survey_link/SurveyLink.ts +1 -1
  84. package/front_end/ui/legacy/Dialog.ts +3 -1
  85. package/front_end/ui/legacy/DropTarget.ts +2 -1
  86. package/front_end/ui/legacy/EmptyWidget.ts +2 -1
  87. package/front_end/ui/legacy/FilterBar.ts +2 -1
  88. package/front_end/ui/legacy/GlassPane.ts +4 -2
  89. package/front_end/ui/legacy/Infobar.ts +3 -2
  90. package/front_end/ui/legacy/InspectorView.ts +6 -1
  91. package/front_end/ui/legacy/ListWidget.ts +2 -1
  92. package/front_end/ui/legacy/PopoverHelper.ts +2 -1
  93. package/front_end/ui/legacy/ProgressIndicator.ts +2 -1
  94. package/front_end/ui/legacy/RemoteDebuggingTerminatedScreen.ts +2 -1
  95. package/front_end/ui/legacy/ReportView.ts +2 -1
  96. package/front_end/ui/legacy/RootView.ts +2 -1
  97. package/front_end/ui/legacy/SearchableView.ts +2 -1
  98. package/front_end/ui/legacy/SoftContextMenu.ts +2 -1
  99. package/front_end/ui/legacy/SoftDropDown.ts +4 -2
  100. package/front_end/ui/legacy/SplitWidget.ts +2 -1
  101. package/front_end/ui/legacy/SuggestBox.ts +2 -1
  102. package/front_end/ui/legacy/TabbedPane.ts +2 -1
  103. package/front_end/ui/legacy/TargetCrashedScreen.ts +2 -1
  104. package/front_end/ui/legacy/TextPrompt.ts +2 -1
  105. package/front_end/ui/legacy/Toolbar.ts +3 -2
  106. package/front_end/ui/legacy/Treeoutline.ts +3 -2
  107. package/front_end/ui/legacy/UIUtils.ts +16 -13
  108. package/front_end/ui/legacy/ViewManager.ts +2 -1
  109. package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +2 -2
  110. package/front_end/ui/legacy/components/source_frame/FontView.ts +1 -0
  111. package/front_end/ui/legacy/components/source_frame/ImageView.ts +1 -0
  112. package/front_end/ui/legacy/components/source_frame/JSONView.ts +1 -0
  113. package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +1 -0
  114. package/front_end/ui/legacy/components/source_frame/XMLView.ts +2 -0
  115. package/front_end/ui/legacy/components/source_frame/module.json +0 -3
  116. package/front_end/ui/legacy/components/text_editor/CodeMirrorTextEditor.ts +2 -0
  117. package/front_end/ui/legacy/components/text_editor/module.json +0 -3
  118. package/front_end/ui/legacy/components/utils/Linkifier.ts +7 -15
  119. package/front_end/ui/legacy/theme_support/theme_support_impl.ts +7 -9
  120. package/front_end/ui/legacy/utils/create-shadow-root-with-core-styles.ts +2 -2
  121. package/front_end/ui/legacy/utils/inject-core-styles.ts +7 -4
  122. package/package.json +1 -1
  123. package/front_end/panels/emulation/module.json +0 -11
  124. package/front_end/third_party/lighthouse/report-assets/report.css +0 -1774
  125. package/front_end/ui/legacy/module.json +0 -41
@@ -113,7 +113,7 @@ devtools-text-prompt {
113
113
  }
114
114
 
115
115
  .filtered-list-widget-item .filtered-list-widget-title {
116
- flex: auto;
116
+ flex: initial;
117
117
  overflow: hidden;
118
118
  text-overflow: ellipsis;
119
119
  }
@@ -194,7 +194,7 @@ devtools-text-prompt {
194
194
  }
195
195
 
196
196
  .filtered-list-widget-item.one-row .filtered-list-widget-title {
197
- flex: none;
197
+ padding-right: 8px;
198
198
  }
199
199
 
200
200
  .filtered-list-widget-item.two-rows {
@@ -59,6 +59,7 @@ export class FontView extends UI.View.SimpleView {
59
59
  private inResize!: boolean|null;
60
60
  constructor(mimeType: string, contentProvider: TextUtils.ContentProvider.ContentProvider) {
61
61
  super(i18nString(UIStrings.font));
62
+ // eslint-disable-next-line no-restricted-syntax -- Should import styles https://crbug.com/1106746
62
63
  this.registerRequiredCSS('ui/legacy/components/source_frame/fontView.css');
63
64
  this.element.classList.add('font-view');
64
65
  this.url = contentProvider.contentURL();
@@ -96,6 +96,7 @@ export class ImageView extends UI.View.SimpleView {
96
96
  private cachedContent?: string|null;
97
97
  constructor(mimeType: string, contentProvider: TextUtils.ContentProvider.ContentProvider) {
98
98
  super(i18nString(UIStrings.image));
99
+ // eslint-disable-next-line no-restricted-syntax -- Should import styles https://crbug.com/1106746
99
100
  this.registerRequiredCSS('ui/legacy/components/source_frame/imageView.css');
100
101
  this.element.tabIndex = -1;
101
102
  this.element.classList.add('image-view');
@@ -54,6 +54,7 @@ export class JSONView extends UI.Widget.VBox implements UI.SearchableView.Search
54
54
  constructor(parsedJSON: ParsedJSON, startCollapsed?: boolean) {
55
55
  super();
56
56
  this.initialized = false;
57
+ // eslint-disable-next-line no-restricted-syntax -- Should import styles https://crbug.com/1106746
57
58
  this.registerRequiredCSS('ui/legacy/components/source_frame/jsonView.css');
58
59
  this.parsedJSON = parsedJSON;
59
60
  this.startCollapsed = Boolean(startCollapsed);
@@ -83,6 +83,7 @@ export class SearchableContainer extends UI.Widget.VBox {
83
83
 
84
84
  constructor(resource: TextUtils.ContentProvider.ContentProvider, contentType: string, autoPrettyPrint?: boolean) {
85
85
  super(true);
86
+ // eslint-disable-next-line no-restricted-syntax -- Should import styles https://crbug.com/1106746
86
87
  this.registerRequiredCSS('ui/legacy/components/source_frame/resourceSourceFrame.css');
87
88
  const sourceFrame = new ResourceSourceFrame(resource, contentType);
88
89
  this.sourceFrame = sourceFrame;
@@ -25,9 +25,11 @@ export class XMLView extends UI.Widget.Widget implements UI.SearchableView.Searc
25
25
 
26
26
  constructor(parsedXML: Document) {
27
27
  super(true);
28
+ // eslint-disable-next-line no-restricted-syntax -- Should import styles https://crbug.com/1106746
28
29
  this.registerRequiredCSS('ui/legacy/components/source_frame/xmlView.css');
29
30
  this.contentElement.classList.add('shadow-xml-view', 'source-code');
30
31
  this.treeOutline = new UI.TreeOutline.TreeOutlineInShadow();
32
+ // eslint-disable-next-line no-restricted-syntax -- Should import styles https://crbug.com/1106746
31
33
  this.treeOutline.registerRequiredCSS('ui/legacy/components/source_frame/xmlTree.css');
32
34
  this.contentElement.appendChild(this.treeOutline.element);
33
35
  this.currentSearchFocusIndex = 0;
@@ -1,7 +1,4 @@
1
1
  {
2
- "dependencies": [
3
- "ui/legacy"
4
- ],
5
2
  "resources": [
6
3
  "fontView.css",
7
4
  "imageView.css",
@@ -93,7 +93,9 @@ export class CodeMirrorTextEditor extends
93
93
  super();
94
94
  this.options = options;
95
95
 
96
+ // eslint-disable-next-line no-restricted-syntax -- Should import styles https://crbug.com/1106746
96
97
  this.registerRequiredCSS('third_party/codemirror/codemirror.css');
98
+ // eslint-disable-next-line no-restricted-syntax -- Should import styles https://crbug.com/1106746
97
99
  this.registerRequiredCSS('ui/legacy/components/text_editor/cmdevtools.css');
98
100
 
99
101
  const {indentWithTabs, indentUnit} = CodeMirrorTextEditor.getIndentation(
@@ -1,7 +1,4 @@
1
1
  {
2
- "dependencies": [
3
- "ui/legacy"
4
- ],
5
2
  "resources": [
6
3
  "../../../../third_party/codemirror/codemirror.css",
7
4
  "autocompleteTooltip.css",
@@ -227,21 +227,13 @@ export class Linkifier implements SDK.TargetManager.Observer {
227
227
  return fallbackAnchor;
228
228
  }
229
229
 
230
- let rawLocation;
231
- if (scriptId) {
232
- rawLocation = debuggerModel.createRawLocationByScriptId(
233
- scriptId, lineNumber || 0, columnNumber, linkifyURLOptions.inlineFrameIndex);
234
- }
235
- // The function createRawLocationByScriptId will always return a raw location. Normally
236
- // we rely on the live location that is created from it to update missing information
237
- // to create the link. If we, however, already have a similar script with the same source url,
238
- // use that one.
239
- if (!rawLocation?.script()) {
240
- rawLocation = debuggerModel.createRawLocationByURL(
241
- sourceURL, lineNumber || 0, columnNumber, linkifyURLOptions.inlineFrameIndex) ||
242
- rawLocation;
243
- }
244
-
230
+ // Prefer createRawLocationByScriptId() here, since it will always produce a correct
231
+ // link, since the script ID is unique. Only fall back to createRawLocationByURL()
232
+ // when all we have is an URL, which is not guaranteed to be unique.
233
+ const rawLocation = scriptId ? debuggerModel.createRawLocationByScriptId(
234
+ scriptId, lineNumber || 0, columnNumber, linkifyURLOptions.inlineFrameIndex) :
235
+ debuggerModel.createRawLocationByURL(
236
+ sourceURL, lineNumber || 0, columnNumber, linkifyURLOptions.inlineFrameIndex);
245
237
  if (!rawLocation) {
246
238
  return fallbackAnchor;
247
239
  }
@@ -35,7 +35,9 @@
35
35
 
36
36
  import * as Common from '../../../core/common/common.js';
37
37
  import * as Platform from '../../../core/platform/platform.js';
38
- import * as Root from '../../../core/root/root.js';
38
+
39
+ import inspectorSyntaxHighlightStyles from '../inspectorSyntaxHighlight.css.legacy.js';
40
+ import inspectorSyntaxHighlightDarkStyles from '../inspectorSyntaxHighlightDark.css.legacy.js';
39
41
 
40
42
  let themeSupportInstance: ThemeSupport;
41
43
 
@@ -112,9 +114,9 @@ export class ThemeSupport {
112
114
 
113
115
  injectHighlightStyleSheets(element: Element|ShadowRoot): void {
114
116
  this.injectingStyleSheet = true;
115
- this.appendStyle(element, 'ui/legacy/inspectorSyntaxHighlight.css');
117
+ this.appendStyle(element, inspectorSyntaxHighlightStyles);
116
118
  if (this.themeNameInternal === 'dark') {
117
- this.appendStyle(element, 'ui/legacy/inspectorSyntaxHighlightDark.css');
119
+ this.appendStyle(element, inspectorSyntaxHighlightDarkStyles);
118
120
  }
119
121
  this.injectingStyleSheet = false;
120
122
  }
@@ -123,13 +125,9 @@ export class ThemeSupport {
123
125
  * Note: this is a duplicate of the function in ui/utils. It exists here
124
126
  * so there is no circular dependency between ui/utils and theme_support.
125
127
  */
126
- private appendStyle(node: Node, cssFile: string): void {
127
- const content = Root.Runtime.cachedResources.get(cssFile) || '';
128
- if (!content) {
129
- console.error(cssFile + ' not preloaded. Check module.json');
130
- }
128
+ private appendStyle(node: Node, {cssContent}: {cssContent: string}): void {
131
129
  const styleElement = document.createElement('style');
132
- styleElement.textContent = content;
130
+ styleElement.textContent = cssContent;
133
131
  node.appendChild(styleElement);
134
132
  }
135
133
 
@@ -7,7 +7,7 @@ import {focusChanged} from './focus-changed.js';
7
7
  import {injectCoreStyles} from './inject-core-styles.js';
8
8
 
9
9
  interface Options {
10
- cssFile?: string|CSSStyleSheet[];
10
+ cssFile?: string|CSSStyleSheet[]|{cssContent: string};
11
11
  delegatesFocus?: boolean;
12
12
  }
13
13
 
@@ -22,7 +22,7 @@ export function createShadowRootWithCoreStyles(element: Element, options: Option
22
22
 
23
23
  const shadowRoot = element.attachShadow({mode: 'open', delegatesFocus});
24
24
  injectCoreStyles(shadowRoot);
25
- if (typeof cssFile === 'string') {
25
+ if (typeof cssFile === 'string' || (cssFile !== undefined && 'cssContent' in cssFile)) {
26
26
  appendStyle(shadowRoot, cssFile);
27
27
  } else if (cssFile) {
28
28
  shadowRoot.adoptedStyleSheets = cssFile;
@@ -2,14 +2,17 @@
2
2
  // Use of this source code is governed by a BSD-style license that can be
3
3
  // found in the LICENSE file.
4
4
 
5
+ import inspectorCommonStyles from '../inspectorCommon.css.legacy.js';
6
+ import textButtonStyles from '../textButton.css.legacy.js';
5
7
  import * as ThemeSupport from '../theme_support/theme_support.js';
8
+ import themeColorsStyles from '../themeColors.css.legacy.js';
9
+
6
10
  import {appendStyle} from './append-style.js';
7
11
 
8
12
  export function injectCoreStyles(root: Element|ShadowRoot): void {
9
- // TODO: Migrate inspectorCommpon.css last https://crbug.com/1222666
10
- appendStyle(root, 'ui/legacy/inspectorCommon.css');
11
- appendStyle(root, 'ui/legacy/textButton.css');
12
- appendStyle(root, 'ui/legacy/themeColors.css');
13
+ appendStyle(root, inspectorCommonStyles);
14
+ appendStyle(root, textButtonStyles);
15
+ appendStyle(root, themeColorsStyles);
13
16
 
14
17
  ThemeSupport.ThemeSupport.instance().injectHighlightStyleSheets(root);
15
18
  ThemeSupport.ThemeSupport.instance().injectCustomStyleSheets(root);
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.942095"
58
+ "version": "1.0.942529"
59
59
  }
@@ -1,11 +0,0 @@
1
- {
2
- "dependencies": [
3
- "ui/legacy"
4
- ],
5
- "resources": [
6
- "deviceModeToolbar.css",
7
- "deviceModeView.css",
8
- "inspectedPagePlaceholder.css",
9
- "mediaQueryInspector.css"
10
- ]
11
- }