chrome-devtools-frontend 1.0.928589 → 1.0.929998

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 (64) hide show
  1. package/config/gni/devtools_grd_files.gni +7 -2
  2. package/config/gni/devtools_image_files.gni +1 -0
  3. package/front_end/Images/src/preview_feature_video_thumbnail.svg +92 -0
  4. package/front_end/Images/whatsnew.avif +0 -0
  5. package/front_end/core/common/CharacterIdMap.ts +12 -12
  6. package/front_end/core/common/Color.ts +71 -71
  7. package/front_end/core/common/Console.ts +4 -4
  8. package/front_end/core/common/ParsedURL.ts +14 -14
  9. package/front_end/core/common/Progress.ts +45 -45
  10. package/front_end/core/common/ResolverBase.ts +8 -8
  11. package/front_end/core/common/ResourceType.ts +20 -20
  12. package/front_end/core/common/SegmentedRange.ts +17 -16
  13. package/front_end/core/common/Settings.ts +84 -66
  14. package/front_end/core/common/SimpleHistoryManager.ts +33 -33
  15. package/front_end/core/common/StringOutputStream.ts +4 -4
  16. package/front_end/core/common/Throttler.ts +44 -40
  17. package/front_end/core/common/Trie.ts +42 -42
  18. package/front_end/core/common/WasmDisassembly.ts +11 -11
  19. package/front_end/core/common/Worker.ts +9 -9
  20. package/front_end/core/host/InspectorFrontendHost.ts +13 -13
  21. package/front_end/core/host/UserMetrics.ts +12 -13
  22. package/front_end/core/i18n/locales/en-US.json +53 -20
  23. package/front_end/core/i18n/locales/en-XL.json +53 -20
  24. package/front_end/core/platform/keyboard-utilities.ts +6 -0
  25. package/front_end/core/sdk/sdk-meta.ts +5 -0
  26. package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +1 -0
  27. package/front_end/entrypoints/main/MainImpl.ts +14 -5
  28. package/front_end/entrypoints/main/main-meta.ts +4 -0
  29. package/front_end/models/issues_manager/IssuesManager.ts +2 -2
  30. package/front_end/panels/application/BackForwardCacheView.ts +19 -31
  31. package/front_end/panels/application/components/OriginTrialTreeView.ts +16 -0
  32. package/front_end/panels/console/console-meta.ts +6 -0
  33. package/front_end/panels/css_overview/CSSOverviewPanel.ts +9 -6
  34. package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +171 -0
  35. package/front_end/panels/css_overview/components/components.ts +9 -0
  36. package/front_end/panels/css_overview/components/cssOverviewStartView.css +134 -0
  37. package/front_end/panels/css_overview/css_overview-meta.ts +2 -1
  38. package/front_end/panels/css_overview/css_overview.ts +0 -3
  39. package/front_end/panels/elements/ElementsTreeElement.ts +9 -0
  40. package/front_end/panels/elements/components/LayoutPane.ts +1 -1
  41. package/front_end/panels/elements/elements-meta.ts +1 -0
  42. package/front_end/panels/elements/layoutPane.css +1 -1
  43. package/front_end/panels/event_listeners/EventListenersView.ts +9 -0
  44. package/front_end/panels/help/ReleaseNoteText.ts +29 -0
  45. package/front_end/panels/help/help-meta.ts +1 -0
  46. package/front_end/panels/issues/IssueKindView.ts +36 -0
  47. package/front_end/panels/issues/IssueView.ts +19 -4
  48. package/front_end/panels/issues/IssuesPane.ts +2 -3
  49. package/front_end/panels/issues/components/HideIssuesMenu.ts +11 -40
  50. package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +11 -0
  51. package/front_end/panels/sources/DebuggerPlugin.ts +23 -4
  52. package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +1 -1
  53. package/front_end/ui/components/helpers/get-stylesheet.ts +4 -0
  54. package/front_end/ui/components/text_prompt/TextPrompt.ts +21 -19
  55. package/front_end/ui/components/text_prompt/textPrompt.css +20 -9
  56. package/front_end/ui/legacy/Infobar.ts +1 -0
  57. package/front_end/ui/legacy/components/inline_editor/CSSLength.ts +4 -2
  58. package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +17 -7
  59. package/front_end/ui/legacy/components/quick_open/QuickOpen.ts +6 -6
  60. package/front_end/ui/legacy/tabbedPane.css +9 -0
  61. package/package.json +1 -1
  62. package/scripts/javascript_natives/index.js +31 -25
  63. package/front_end/panels/css_overview/CSSOverviewStartView.ts +0 -55
  64. package/front_end/panels/css_overview/cssOverviewStartView.css +0 -29
@@ -48,19 +48,19 @@ export class Progress {
48
48
 
49
49
  export class CompositeProgress {
50
50
  readonly parent: Progress;
51
- private readonly children: SubProgress[];
52
- private childrenDone: number;
51
+ readonly #children: SubProgress[];
52
+ #childrenDone: number;
53
53
 
54
54
  constructor(parent: Progress) {
55
55
  this.parent = parent;
56
- this.children = [];
57
- this.childrenDone = 0;
56
+ this.#children = [];
57
+ this.#childrenDone = 0;
58
58
  this.parent.setTotalWork(1);
59
59
  this.parent.setWorked(0);
60
60
  }
61
61
 
62
62
  childDone(): void {
63
- if (++this.childrenDone !== this.children.length) {
63
+ if (++this.#childrenDone !== this.#children.length) {
64
64
  return;
65
65
  }
66
66
  this.parent.done();
@@ -68,7 +68,7 @@ export class CompositeProgress {
68
68
 
69
69
  createSubProgress(weight?: number): SubProgress {
70
70
  const child = new SubProgress(this, weight);
71
- this.children.push(child);
71
+ this.#children.push(child);
72
72
  return child;
73
73
  }
74
74
 
@@ -76,8 +76,8 @@ export class CompositeProgress {
76
76
  let totalWeights = 0;
77
77
  let done = 0;
78
78
 
79
- for (let i = 0; i < this.children.length; ++i) {
80
- const child = this.children[i];
79
+ for (let i = 0; i < this.#children.length; ++i) {
80
+ const child = this.#children[i];
81
81
  if (child.getTotalWork()) {
82
82
  done += child.getWeight() * child.getWorked() / child.getTotalWork();
83
83
  }
@@ -88,103 +88,103 @@ export class CompositeProgress {
88
88
  }
89
89
 
90
90
  export class SubProgress implements Progress {
91
- private readonly composite: CompositeProgress;
92
- private weight: number;
93
- private worked: number;
94
- private totalWork: number;
91
+ readonly #composite: CompositeProgress;
92
+ #weight: number;
93
+ #worked: number;
94
+ #totalWork: number;
95
95
  constructor(composite: CompositeProgress, weight?: number) {
96
- this.composite = composite;
97
- this.weight = weight || 1;
98
- this.worked = 0;
96
+ this.#composite = composite;
97
+ this.#weight = weight || 1;
98
+ this.#worked = 0;
99
99
 
100
- this.totalWork = 0;
100
+ this.#totalWork = 0;
101
101
  }
102
102
 
103
103
  isCanceled(): boolean {
104
- return this.composite.parent.isCanceled();
104
+ return this.#composite.parent.isCanceled();
105
105
  }
106
106
 
107
107
  setTitle(title: string): void {
108
- this.composite.parent.setTitle(title);
108
+ this.#composite.parent.setTitle(title);
109
109
  }
110
110
 
111
111
  done(): void {
112
- this.setWorked(this.totalWork);
113
- this.composite.childDone();
112
+ this.setWorked(this.#totalWork);
113
+ this.#composite.childDone();
114
114
  }
115
115
 
116
116
  setTotalWork(totalWork: number): void {
117
- this.totalWork = totalWork;
118
- this.composite.update();
117
+ this.#totalWork = totalWork;
118
+ this.#composite.update();
119
119
  }
120
120
 
121
121
  setWorked(worked: number, title?: string): void {
122
- this.worked = worked;
122
+ this.#worked = worked;
123
123
  if (typeof title !== 'undefined') {
124
124
  this.setTitle(title);
125
125
  }
126
- this.composite.update();
126
+ this.#composite.update();
127
127
  }
128
128
 
129
129
  incrementWorked(worked?: number): void {
130
- this.setWorked(this.worked + (worked || 1));
130
+ this.setWorked(this.#worked + (worked || 1));
131
131
  }
132
132
 
133
133
  getWeight(): number {
134
- return this.weight;
134
+ return this.#weight;
135
135
  }
136
136
 
137
137
  getWorked(): number {
138
- return this.worked;
138
+ return this.#worked;
139
139
  }
140
140
 
141
141
  getTotalWork(): number {
142
- return this.totalWork;
142
+ return this.#totalWork;
143
143
  }
144
144
  }
145
145
 
146
146
  export class ProgressProxy implements Progress {
147
- private readonly delegate: Progress|null|undefined;
148
- private readonly doneCallback: (() => void)|undefined;
147
+ readonly #delegate: Progress|null|undefined;
148
+ readonly #doneCallback: (() => void)|undefined;
149
149
  constructor(delegate?: Progress|null, doneCallback?: (() => void)) {
150
- this.delegate = delegate;
151
- this.doneCallback = doneCallback;
150
+ this.#delegate = delegate;
151
+ this.#doneCallback = doneCallback;
152
152
  }
153
153
 
154
154
  isCanceled(): boolean {
155
- return this.delegate ? this.delegate.isCanceled() : false;
155
+ return this.#delegate ? this.#delegate.isCanceled() : false;
156
156
  }
157
157
 
158
158
  setTitle(title: string): void {
159
- if (this.delegate) {
160
- this.delegate.setTitle(title);
159
+ if (this.#delegate) {
160
+ this.#delegate.setTitle(title);
161
161
  }
162
162
  }
163
163
 
164
164
  done(): void {
165
- if (this.delegate) {
166
- this.delegate.done();
165
+ if (this.#delegate) {
166
+ this.#delegate.done();
167
167
  }
168
- if (this.doneCallback) {
169
- this.doneCallback();
168
+ if (this.#doneCallback) {
169
+ this.#doneCallback();
170
170
  }
171
171
  }
172
172
 
173
173
  setTotalWork(totalWork: number): void {
174
- if (this.delegate) {
175
- this.delegate.setTotalWork(totalWork);
174
+ if (this.#delegate) {
175
+ this.#delegate.setTotalWork(totalWork);
176
176
  }
177
177
  }
178
178
 
179
179
  setWorked(worked: number, title?: string): void {
180
- if (this.delegate) {
181
- this.delegate.setWorked(worked, title);
180
+ if (this.#delegate) {
181
+ this.#delegate.setWorked(worked, title);
182
182
  }
183
183
  }
184
184
 
185
185
  incrementWorked(worked?: number): void {
186
- if (this.delegate) {
187
- this.delegate.incrementWorked(worked);
186
+ if (this.#delegate) {
187
+ this.#delegate.incrementWorked(worked);
188
188
  }
189
189
  }
190
190
  }
@@ -16,7 +16,7 @@ interface PromiseInfo<T> {
16
16
  * promises by using the `clear` method on this class.
17
17
  */
18
18
  export abstract class ResolverBase<Id, T> {
19
- private unresolvedIds: Map<Id, PromiseInfo<T>> = new Map();
19
+ #unresolvedIds: Map<Id, PromiseInfo<T>> = new Map();
20
20
 
21
21
  protected abstract getForId(id: Id): T|null;
22
22
  protected abstract startListening(): void;
@@ -57,14 +57,14 @@ export abstract class ResolverBase<Id, T> {
57
57
  */
58
58
  clear(): void {
59
59
  this.stopListening();
60
- for (const [id, {reject}] of this.unresolvedIds.entries()) {
60
+ for (const [id, {reject}] of this.#unresolvedIds.entries()) {
61
61
  reject(new Error(`Object with ${id} never resolved.`));
62
62
  }
63
- this.unresolvedIds.clear();
63
+ this.#unresolvedIds.clear();
64
64
  }
65
65
 
66
66
  private getOrCreatePromise(id: Id): Promise<T> {
67
- const promiseInfo = this.unresolvedIds.get(id);
67
+ const promiseInfo = this.#unresolvedIds.get(id);
68
68
  if (promiseInfo) {
69
69
  return promiseInfo.promise;
70
70
  }
@@ -74,15 +74,15 @@ export abstract class ResolverBase<Id, T> {
74
74
  resolve = res;
75
75
  reject = rej;
76
76
  });
77
- this.unresolvedIds.set(id, {promise, resolve, reject});
77
+ this.#unresolvedIds.set(id, {promise, resolve, reject});
78
78
  this.startListening();
79
79
  return promise;
80
80
  }
81
81
 
82
82
  protected onResolve(id: Id, t: T): void {
83
- const promiseInfo = this.unresolvedIds.get(id);
84
- this.unresolvedIds.delete(id);
85
- if (this.unresolvedIds.size === 0) {
83
+ const promiseInfo = this.#unresolvedIds.get(id);
84
+ this.#unresolvedIds.delete(id);
85
+ if (this.#unresolvedIds.size === 0) {
86
86
  this.stopListening();
87
87
  }
88
88
  promiseInfo?.resolve(t);
@@ -170,17 +170,17 @@ const str_ = i18n.i18n.registerUIStrings('core/common/ResourceType.ts', UIString
170
170
  const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
171
171
 
172
172
  export class ResourceType {
173
- private readonly nameInternal: string;
174
- private readonly titleInternal: () => Platform.UIString.LocalizedString;
175
- private readonly categoryInternal: ResourceCategory;
176
- private readonly isTextTypeInternal: boolean;
173
+ readonly #nameInternal: string;
174
+ readonly #titleInternal: () => Platform.UIString.LocalizedString;
175
+ readonly #categoryInternal: ResourceCategory;
176
+ readonly #isTextTypeInternal: boolean;
177
177
 
178
178
  constructor(
179
179
  name: string, title: () => Platform.UIString.LocalizedString, category: ResourceCategory, isTextType: boolean) {
180
- this.nameInternal = name;
181
- this.titleInternal = title;
182
- this.categoryInternal = category;
183
- this.isTextTypeInternal = isTextType;
180
+ this.#nameInternal = name;
181
+ this.#titleInternal = title;
182
+ this.#categoryInternal = category;
183
+ this.#isTextTypeInternal = isTextType;
184
184
  }
185
185
 
186
186
  static fromMimeType(mimeType: string|null): ResourceType {
@@ -258,23 +258,23 @@ export class ResourceType {
258
258
  }
259
259
 
260
260
  name(): string {
261
- return this.nameInternal;
261
+ return this.#nameInternal;
262
262
  }
263
263
 
264
264
  title(): string {
265
- return this.titleInternal();
265
+ return this.#titleInternal();
266
266
  }
267
267
 
268
268
  category(): ResourceCategory {
269
- return this.categoryInternal;
269
+ return this.#categoryInternal;
270
270
  }
271
271
 
272
272
  isTextType(): boolean {
273
- return this.isTextTypeInternal;
273
+ return this.#isTextTypeInternal;
274
274
  }
275
275
 
276
276
  isScript(): boolean {
277
- return this.nameInternal === 'script' || this.nameInternal === 'sm-script';
277
+ return this.#nameInternal === 'script' || this.#nameInternal === 'sm-script';
278
278
  }
279
279
 
280
280
  hasScripts(): boolean {
@@ -282,11 +282,11 @@ export class ResourceType {
282
282
  }
283
283
 
284
284
  isStyleSheet(): boolean {
285
- return this.nameInternal === 'stylesheet' || this.nameInternal === 'sm-stylesheet';
285
+ return this.#nameInternal === 'stylesheet' || this.#nameInternal === 'sm-stylesheet';
286
286
  }
287
287
 
288
288
  isDocument(): boolean {
289
- return this.nameInternal === 'document';
289
+ return this.#nameInternal === 'document';
290
290
  }
291
291
 
292
292
  isDocumentOrScriptOrStyleSheet(): boolean {
@@ -294,23 +294,23 @@ export class ResourceType {
294
294
  }
295
295
 
296
296
  isFont(): boolean {
297
- return this.nameInternal === 'font';
297
+ return this.#nameInternal === 'font';
298
298
  }
299
299
 
300
300
  isImage(): boolean {
301
- return this.nameInternal === 'image';
301
+ return this.#nameInternal === 'image';
302
302
  }
303
303
 
304
304
  isFromSourceMap(): boolean {
305
- return this.nameInternal.startsWith('sm-');
305
+ return this.#nameInternal.startsWith('sm-');
306
306
  }
307
307
 
308
308
  isWebbundle(): boolean {
309
- return this.nameInternal === 'webbundle';
309
+ return this.#nameInternal === 'webbundle';
310
310
  }
311
311
 
312
312
  toString(): string {
313
- return this.nameInternal;
313
+ return this.#nameInternal;
314
314
  }
315
315
 
316
316
  canonicalMimeType(): string {
@@ -24,51 +24,52 @@ export class Segment<T> {
24
24
  }
25
25
 
26
26
  export class SegmentedRange<T> {
27
- private segmentsInternal: Segment<T>[];
28
- private readonly mergeCallback: ((arg0: Segment<T>, arg1: Segment<T>) => Segment<T>| null)|undefined;
27
+ #segmentsInternal: Segment<T>[];
28
+ readonly #mergeCallback: ((arg0: Segment<T>, arg1: Segment<T>) => Segment<T>| null)|undefined;
29
29
 
30
30
  constructor(mergeCallback?: ((arg0: Segment<T>, arg1: Segment<T>) => Segment<T>| null)) {
31
- this.segmentsInternal = [];
32
- this.mergeCallback = mergeCallback;
31
+ this.#segmentsInternal = [];
32
+ this.#mergeCallback = mergeCallback;
33
33
  }
34
34
 
35
35
  append(newSegment: Segment<T>): void {
36
36
  // 1. Find the proper insertion point for new segment
37
- let startIndex = Platform.ArrayUtilities.lowerBound(this.segmentsInternal, newSegment, (a, b) => a.begin - b.begin);
37
+ let startIndex =
38
+ Platform.ArrayUtilities.lowerBound(this.#segmentsInternal, newSegment, (a, b) => a.begin - b.begin);
38
39
  let endIndex = startIndex;
39
40
  let merged: (Segment<T>|null)|null = null;
40
41
  if (startIndex > 0) {
41
42
  // 2. Try mering the preceding segment
42
- const precedingSegment = this.segmentsInternal[startIndex - 1];
43
+ const precedingSegment = this.#segmentsInternal[startIndex - 1];
43
44
  merged = this.tryMerge(precedingSegment, newSegment);
44
45
  if (merged) {
45
46
  --startIndex;
46
47
  newSegment = merged;
47
- } else if (this.segmentsInternal[startIndex - 1].end >= newSegment.begin) {
48
+ } else if (this.#segmentsInternal[startIndex - 1].end >= newSegment.begin) {
48
49
  // 2a. If merge failed and segments overlap, adjust preceding segment.
49
50
  // If an old segment entirely contains new one, split it in two.
50
51
  if (newSegment.end < precedingSegment.end) {
51
- this.segmentsInternal.splice(
52
+ this.#segmentsInternal.splice(
52
53
  startIndex, 0, new Segment<T>(newSegment.end, precedingSegment.end, precedingSegment.data));
53
54
  }
54
55
  precedingSegment.end = newSegment.begin;
55
56
  }
56
57
  }
57
58
  // 3. Consume all segments that are entirely covered by the new one.
58
- while (endIndex < this.segmentsInternal.length && this.segmentsInternal[endIndex].end <= newSegment.end) {
59
+ while (endIndex < this.#segmentsInternal.length && this.#segmentsInternal[endIndex].end <= newSegment.end) {
59
60
  ++endIndex;
60
61
  }
61
62
  // 4. Merge or adjust the succeeding segment if it overlaps.
62
- if (endIndex < this.segmentsInternal.length) {
63
- merged = this.tryMerge(newSegment, this.segmentsInternal[endIndex]);
63
+ if (endIndex < this.#segmentsInternal.length) {
64
+ merged = this.tryMerge(newSegment, this.#segmentsInternal[endIndex]);
64
65
  if (merged) {
65
66
  endIndex++;
66
67
  newSegment = merged;
67
- } else if (newSegment.intersects(this.segmentsInternal[endIndex])) {
68
- this.segmentsInternal[endIndex].begin = newSegment.end;
68
+ } else if (newSegment.intersects(this.#segmentsInternal[endIndex])) {
69
+ this.#segmentsInternal[endIndex].begin = newSegment.end;
69
70
  }
70
71
  }
71
- this.segmentsInternal.splice(startIndex, endIndex - startIndex, newSegment);
72
+ this.#segmentsInternal.splice(startIndex, endIndex - startIndex, newSegment);
72
73
  }
73
74
 
74
75
  appendRange(that: SegmentedRange<T>): void {
@@ -76,11 +77,11 @@ export class SegmentedRange<T> {
76
77
  }
77
78
 
78
79
  segments(): Segment<T>[] {
79
- return this.segmentsInternal;
80
+ return this.#segmentsInternal;
80
81
  }
81
82
 
82
83
  private tryMerge(first: Segment<T>, second: Segment<T>): Segment<T>|null {
83
- const merged = this.mergeCallback && this.mergeCallback(first, second);
84
+ const merged = this.#mergeCallback && this.#mergeCallback(first, second);
84
85
  if (!merged) {
85
86
  return null;
86
87
  }