chrome-devtools-frontend 1.0.1555174 → 1.0.1555430

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 (66) hide show
  1. package/front_end/core/protocol_client/InspectorBackend.ts +1 -1
  2. package/front_end/core/root/Runtime.ts +0 -4
  3. package/front_end/core/sdk/DOMModel.ts +101 -7
  4. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +1 -1
  5. package/front_end/models/ai_assistance/agents/StylingAgent.ts +1 -1
  6. package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +1 -1
  7. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +1 -1
  8. package/front_end/{ui/components → models}/annotations/AnnotationRepository.ts +3 -3
  9. package/front_end/models/annotations/README.md +7 -0
  10. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +8 -0
  11. package/front_end/models/stack_trace/StackTrace.ts +13 -2
  12. package/front_end/models/stack_trace/StackTraceImpl.ts +81 -6
  13. package/front_end/models/stack_trace/StackTraceModel.ts +35 -3
  14. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +45 -4
  15. package/front_end/panels/ai_assistance/components/ArtifactsViewer.ts +57 -0
  16. package/front_end/panels/ai_assistance/components/ChatView.ts +1 -0
  17. package/front_end/panels/ai_assistance/components/artifactsViewer.css +10 -0
  18. package/front_end/panels/application/preloading/PreloadingView.ts +12 -6
  19. package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +230 -237
  20. package/front_end/panels/application/preloading/components/PreloadingGrid.ts +96 -79
  21. package/front_end/panels/application/preloading/components/preloadingGrid.css +26 -29
  22. package/front_end/panels/application/preloading/preloadingView.css +6 -0
  23. package/front_end/panels/common/Annotation.ts +1 -1
  24. package/front_end/panels/common/AnnotationManager.ts +1 -1
  25. package/front_end/panels/common/ExtensionView.ts +1 -0
  26. package/front_end/panels/console/ConsoleContextSelector.ts +74 -9
  27. package/front_end/panels/console/consoleContextSelector.css +31 -29
  28. package/front_end/panels/coverage/coverageListView.css +59 -57
  29. package/front_end/panels/elements/ElementsPanel.ts +1 -1
  30. package/front_end/panels/elements/ElementsTreeElement.ts +39 -1
  31. package/front_end/panels/elements/ElementsTreeOutline.ts +23 -21
  32. package/front_end/panels/elements/TopLayerContainer.ts +26 -91
  33. package/front_end/panels/explain/components/ConsoleInsight.ts +3 -3
  34. package/front_end/panels/network/NetworkItemView.ts +1 -1
  35. package/front_end/panels/network/NetworkLogView.ts +1 -1
  36. package/front_end/panels/network/NetworkPanel.ts +1 -1
  37. package/front_end/panels/recorder/RecorderController.ts +0 -1
  38. package/front_end/panels/security/SecurityPanelSidebar.ts +5 -0
  39. package/front_end/panels/timeline/TimelineUIUtils.ts +5 -8
  40. package/front_end/panels/timeline/components/TimelineSummary.ts +75 -54
  41. package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +16 -25
  42. package/front_end/panels/timeline/components/insights/Cache.ts +12 -8
  43. package/front_end/panels/timeline/components/insights/DOMSize.ts +25 -21
  44. package/front_end/panels/timeline/components/insights/DuplicatedJavaScript.ts +7 -7
  45. package/front_end/panels/timeline/components/insights/FontDisplay.ts +7 -5
  46. package/front_end/panels/timeline/components/insights/ForcedReflow.ts +11 -9
  47. package/front_end/panels/timeline/components/insights/INPBreakdown.ts +7 -6
  48. package/front_end/panels/timeline/components/insights/ImageDelivery.ts +7 -5
  49. package/front_end/panels/timeline/components/insights/InsightRenderer.ts +20 -18
  50. package/front_end/panels/timeline/components/insights/LCPBreakdown.ts +12 -12
  51. package/front_end/panels/timeline/components/insights/LegacyJavaScript.ts +7 -7
  52. package/front_end/panels/timeline/components/insights/ModernHTTP.ts +7 -5
  53. package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +15 -13
  54. package/front_end/panels/timeline/components/insights/RenderBlocking.ts +2 -2
  55. package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +15 -14
  56. package/front_end/panels/timeline/components/insights/Table.ts +152 -130
  57. package/front_end/panels/timeline/components/insights/ThirdParties.ts +11 -9
  58. package/front_end/panels/timeline/components/timelineSummary.css +58 -57
  59. package/front_end/panels/timeline/thirdPartyTreeView.css +109 -0
  60. package/front_end/panels/timeline/timelineDetailsView.css +2 -4
  61. package/front_end/panels/timeline/timelinePanel.css +0 -110
  62. package/front_end/ui/legacy/TabbedPane.ts +1 -1
  63. package/front_end/ui/legacy/ViewManager.ts +2 -32
  64. package/package.json +1 -1
  65. /package/front_end/{ui/components → models}/annotations/AnnotationType.ts +0 -0
  66. /package/front_end/{ui/components → models}/annotations/annotations.ts +0 -0
@@ -3,69 +3,70 @@
3
3
  * Use of this source code is governed by a BSD-style license that can be
4
4
  * found in the LICENSE file.
5
5
  */
6
+ @scope to (devtools-widget > *){
7
+ .timeline-summary {
8
+ max-height: 100%;
9
+ overflow: hidden auto;
10
+ scrollbar-width: thin; /* ~11px wide reserved for gutter */
11
+ font-size: var(--sys-typescale-body4-size);
12
+ flex-direction: column;
13
+ padding: 0 var(--sys-size-6) var(--sys-size-4) var(--sys-size-8) ;
14
+ /* The category summary can't be more narrow than this, so we'll force a horizontal scrollbar
15
+ */
16
+ min-width: 192px;
17
+ }
6
18
 
7
- :host {
8
- max-height: 100%;
9
- overflow: hidden auto;
10
- scrollbar-width: thin; /* ~11px wide reserved for gutter */
11
- }
19
+ .summary-range {
20
+ font-weight: var(--ref-typeface-weight-medium);
21
+ height: 24.5px;
22
+ line-height: 22px;
23
+ }
12
24
 
13
- .timeline-summary {
14
- font-size: var(--sys-typescale-body4-size);
15
- flex-direction: column;
16
- padding: 0 var(--sys-size-6) var(--sys-size-4) var(--sys-size-8) ;
17
- }
25
+ .category-summary {
26
+ gap: var(--sys-size-4);
27
+ display: flex;
28
+ flex-direction: column;
29
+ }
18
30
 
19
- .summary-range {
20
- font-weight: var(--ref-typeface-weight-medium);
21
- height: 24.5px;
22
- line-height: 22px;
23
- }
31
+ .category-row {
32
+ min-height: 16px;
33
+ line-height: 16px;
34
+ }
24
35
 
25
- .category-summary {
26
- gap: var(--sys-size-4);
27
- display: flex;
28
- flex-direction: column;
29
- }
36
+ .category-swatch {
37
+ display: inline-block;
38
+ width: var(--sys-size-6);
39
+ height: var(--sys-size-6);
40
+ margin-right: var(--sys-size-4);
41
+ top: var(--sys-size-1);
42
+ position: relative;
43
+ border: var(--sys-size-1) solid var(--sys-color-neutral-outline);
44
+ }
30
45
 
31
- .category-row {
32
- min-height: 16px;
33
- line-height: 16px;
34
- }
46
+ .category-name {
47
+ display: inline;
48
+ word-break: break-all;
49
+ }
35
50
 
36
- .category-swatch {
37
- display: inline-block;
38
- width: var(--sys-size-6);
39
- height: var(--sys-size-6);
40
- margin-right: var(--sys-size-4);
41
- top: var(--sys-size-1);
42
- position: relative;
43
- border: var(--sys-size-1) solid var(--sys-color-neutral-outline);
44
- }
51
+ .category-value {
52
+ text-align: right;
53
+ position: relative;
54
+ float: right;
55
+ z-index: 0;
56
+ width: var(--sys-size-19);
57
+ }
45
58
 
46
- .category-name {
47
- display: inline;
48
- word-break: break-all;
49
- }
50
-
51
- .category-value {
52
- text-align: right;
53
- position: relative;
54
- float: right;
55
- z-index: 0;
56
- width: var(--sys-size-19);
57
- }
58
-
59
- .background-bar-container {
60
- position: absolute;
61
- inset: 0 0 0 var(--sys-size-3);
62
- z-index: -1;
63
- }
59
+ .background-bar-container {
60
+ position: absolute;
61
+ inset: 0 0 0 var(--sys-size-3);
62
+ z-index: -1;
63
+ }
64
64
 
65
- .background-bar {
66
- width: 100%;
67
- float: right;
68
- height: var(--sys-size-8);
69
- background-color: var(--sys-color-surface-yellow);
70
- border-bottom: var(--sys-size-1) solid var(--sys-color-yellow-outline);
65
+ .background-bar {
66
+ width: 100%;
67
+ float: right;
68
+ height: var(--sys-size-8);
69
+ background-color: var(--sys-color-surface-yellow);
70
+ border-bottom: var(--sys-size-1) solid var(--sys-color-yellow-outline);
71
+ }
71
72
  }
@@ -4,6 +4,115 @@
4
4
  * found in the LICENSE file.
5
5
  */
6
6
 
7
+ devtools-performance-third-party-tree-view {
8
+ .background-bar-container {
9
+ /* Dont need the bars in 3p table */
10
+ display: none;
11
+ }
12
+
13
+ .timeline-tree-view devtools-toolbar {
14
+ border: 0;
15
+ }
16
+
17
+ .timeline-tree-view .data-grid .odd {
18
+ background: none;
19
+ }
20
+
21
+ .timeline-tree-view .data-grid {
22
+ border-width: 0 !important; /* stylelint-disable-line declaration-no-important */
23
+
24
+ th {
25
+ background-color: var(--sys-color-cdt-base-container);
26
+ font-weight: var(--ref-typeface-weight-medium);
27
+ /* Center to give some gap against sorting triangle */
28
+ text-align: center;
29
+
30
+ &.site-column {
31
+ text-align: left;
32
+ }
33
+ }
34
+
35
+ tr .numeric-column,
36
+ tr .site-column {
37
+ border-left: none;
38
+ border-bottom: var(--sys-size-1) solid var(--sys-color-divider);
39
+ /* Don't let devtools-button size mess with things */
40
+ contain: strict;
41
+ padding: 0;
42
+ line-height: 21px;
43
+ }
44
+
45
+ .bottom-filler-td,
46
+ th.sortable {
47
+ border: none;
48
+ }
49
+
50
+ tr {
51
+ height: 22px;
52
+ }
53
+
54
+ devtools-button {
55
+ display: inline-flex;
56
+ visibility: hidden;
57
+ margin: 0 8px 0 4px;
58
+ vertical-align: top;
59
+ }
60
+
61
+ tr.revealed:hover,
62
+ tr.selected {
63
+ devtools-button {
64
+ visibility: visible;
65
+ }
66
+ }
67
+
68
+ /* Default data-grid has this element on the edge of the rows,
69
+ we don't need them for the 3P table. So for now set display to none. */
70
+ .corner,
71
+ &.data-grid-fits-viewport .corner {
72
+ display: none;
73
+ }
74
+
75
+ .data-grid-resizer:hover {
76
+ background: linear-gradient(to right, transparent, transparent 2px, var(--sys-color-divider) 2px, var(--sys-color-divider) 3px, transparent 3px) no-repeat 0 0 / 100% 100%;
77
+ }
78
+ }
79
+
80
+ .widget.vbox.timeline-tree-view {
81
+ /* See column width comments in populateColumns() */
82
+ max-width: min(100%, 550px);
83
+ min-width: 350px; /* Lower than this, there's not enough room for the entity name */
84
+ padding: 0 0 0 var(--sys-size-6);
85
+ border-left: var(--sys-size-1) solid var(--sys-color-divider);
86
+ }
87
+
88
+ /* While timeline treeview name-container uses flexbox to layout, it's overkill for this table's purposes.
89
+ By not using it, we can benefit from text-overflow:ellipsis applying correctly to names and entity-badges */
90
+ .timeline-tree-view .data-grid .name-container {
91
+ display: block;
92
+ padding-left: 2px;
93
+
94
+ .activity-name {
95
+ display: inline;
96
+ }
97
+
98
+ .activity-icon-container {
99
+ display: none;
100
+ }
101
+
102
+ .entity-badge {
103
+ margin-left: var(--sys-size-4);
104
+ font-weight: var(--ref-typeface-weight-medium);
105
+ padding: 0 var(--sys-size-2);
106
+ background-color: var(--sys-color-tonal-container);
107
+ border-radius: var(--sys-shape-corner-extra-small);
108
+ height: 16px;
109
+ line-height: 16px;
110
+ font-size: var(--sys-typescale-body5-size);
111
+ display: inline-block;
112
+ }
113
+ }
114
+ }
115
+
7
116
  .empty-table {
8
117
  display: none;
9
118
  }
@@ -60,10 +60,8 @@
60
60
  padding: var(--sys-size-4) 0 0;
61
61
  height: 100%;
62
62
 
63
- & > devtools-performance-timeline-summary {
64
- /* The category summary can't be more narrow than this, so we'll force a horizontal scrollbar
65
- Also this style can't be applied on the element's :host without !important, thus its here. */
66
- min-width: 192px;
63
+ >.widget:has(.timeline-summary) {
64
+ flex-grow: 0;
67
65
  }
68
66
  }
69
67
 
@@ -314,116 +314,6 @@
314
314
  flex: none;
315
315
  }
316
316
 
317
-
318
- devtools-performance-third-party-tree-view {
319
- .background-bar-container {
320
- /* Dont need the bars in 3p table */
321
- display: none;
322
- }
323
-
324
- .timeline-tree-view devtools-toolbar {
325
- border: 0;
326
- }
327
-
328
- .timeline-tree-view .data-grid .odd {
329
- background: none;
330
- }
331
-
332
- .timeline-tree-view .data-grid {
333
- border-width: 0 !important; /* stylelint-disable-line declaration-no-important */
334
-
335
- th {
336
- background-color: var(--sys-color-cdt-base-container);
337
- font-weight: var(--ref-typeface-weight-medium);
338
- /* Center to give some gap against sorting triangle */
339
- text-align: center;
340
-
341
- &.site-column {
342
- text-align: left;
343
- }
344
- }
345
-
346
- tr .numeric-column,
347
- tr .site-column {
348
- border-left: none;
349
- border-bottom: var(--sys-size-1) solid var(--sys-color-divider);
350
- /* Don't let devtools-button size mess with things */
351
- contain: strict;
352
- padding: 0;
353
- line-height: 21px;
354
- }
355
-
356
- .bottom-filler-td,
357
- th.sortable {
358
- border: none;
359
- }
360
-
361
- tr {
362
- height: 22px;
363
- }
364
-
365
- devtools-button {
366
- display: inline-flex;
367
- visibility: hidden;
368
- margin: 0 8px 0 4px;
369
- vertical-align: top;
370
- }
371
-
372
- tr.revealed:hover,
373
- tr.selected {
374
- devtools-button {
375
- visibility: visible;
376
- }
377
- }
378
-
379
- /* Default data-grid has this element on the edge of the rows,
380
- we don't need them for the 3P table. So for now set display to none. */
381
- .corner,
382
- &.data-grid-fits-viewport .corner {
383
- display: none;
384
- }
385
-
386
- .data-grid-resizer:hover {
387
- background: linear-gradient(to right, transparent, transparent 2px, var(--sys-color-divider) 2px, var(--sys-color-divider) 3px, transparent 3px) no-repeat 0 0 / 100% 100%;
388
- }
389
- }
390
-
391
- .widget.vbox.timeline-tree-view {
392
- /* See column width comments in populateColumns() */
393
- max-width: min(100%, 550px);
394
- min-width: 350px; /* Lower than this, there's not enough room for the entity name */
395
- padding: 0 0 0 var(--sys-size-6);
396
- border-left: var(--sys-size-1) solid var(--sys-color-divider);
397
- }
398
-
399
- /* While timeline treeview name-container uses flexbox to layout, it's overkill for this table's purposes.
400
- By not using it, we can benefit from text-overflow:ellipsis applying correctly to names and entity-badges */
401
- .timeline-tree-view .data-grid .name-container {
402
- display: block;
403
- padding-left: 2px;
404
-
405
- .activity-name {
406
- display: inline;
407
- }
408
-
409
- .activity-icon-container {
410
- display: none;
411
- }
412
-
413
- .entity-badge {
414
- margin-left: var(--sys-size-4);
415
- font-weight: var(--ref-typeface-weight-medium);
416
- padding: 0 var(--sys-size-2);
417
- background-color: var(--sys-color-tonal-container);
418
- border-radius: var(--sys-shape-corner-extra-small);
419
- height: 16px;
420
- line-height: 16px;
421
- font-size: var(--sys-typescale-body5-size);
422
- display: inline-block;
423
- }
424
- }
425
- }
426
-
427
317
  devtools-toolbar {
428
318
  .history-dropdown-button {
429
319
  width: var(--sys-size-23);
@@ -9,8 +9,8 @@ import './Toolbar.js';
9
9
  import * as Common from '../../core/common/common.js';
10
10
  import * as i18n from '../../core/i18n/i18n.js';
11
11
  import * as Platform from '../../core/platform/platform.js';
12
+ import * as Annotations from '../../models/annotations/annotations.js';
12
13
  import * as Geometry from '../../models/geometry/geometry.js';
13
- import * as Annotations from '../../ui/components/annotations/annotations.js';
14
14
  import * as Buttons from '../../ui/components/buttons/buttons.js';
15
15
  import {type LitTemplate, render} from '../../ui/lit/lit.js';
16
16
  import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
@@ -9,7 +9,7 @@ import * as Common from '../../core/common/common.js';
9
9
  import * as Host from '../../core/host/host.js';
10
10
  import * as i18n from '../../core/i18n/i18n.js';
11
11
  import * as Platform from '../../core/platform/platform.js';
12
- import * as Root from '../../core/root/root.js';
12
+ import type * as Root from '../../core/root/root.js';
13
13
  import type * as Foundation from '../../foundation/foundation.js';
14
14
  import {createIcon, type Icon} from '../kit/kit.js';
15
15
  import * as VisualLogging from '../visual_logging/visual_logging.js';
@@ -18,7 +18,7 @@ import * as ARIAUtils from './ARIAUtils.js';
18
18
  import type {ContextMenu} from './ContextMenu.js';
19
19
  import {type EventData, Events as TabbedPaneEvents, TabbedPane} from './TabbedPane.js';
20
20
  import {type ItemsProvider, type ToolbarItem, ToolbarMenuButton} from './Toolbar.js';
21
- import {createTextChild, PromotionManager} from './UIUtils.js';
21
+ import {createTextChild} from './UIUtils.js';
22
22
  import type {TabbedViewLocation, View, ViewLocation} from './View.js';
23
23
  import viewContainersStyles from './viewContainers.css.js';
24
24
  import {
@@ -756,31 +756,6 @@ class TabbedLocation extends Location implements TabbedViewLocation {
756
756
  const views = Array.from(this.views.values());
757
757
  views.sort((viewa, viewb) => viewa.title().localeCompare(viewb.title()));
758
758
 
759
- const freestylerView = views.find(view => view.viewId() === 'freestyler');
760
- if (freestylerView) {
761
- const featureName = Root.Runtime.hostConfig.devToolsFreestyler?.featureName;
762
- const promotionId =
763
- (freestylerView instanceof PreRegisteredView) ? freestylerView.featurePromotionId() : undefined;
764
- // Register this with the PromotionManager and the back-end, in order to make sure that
765
- // showing the general ai assistance panel new badge is synchronized.
766
- const handler = (): void => {
767
- void this.showView(freestylerView, undefined, true);
768
- if (promotionId) {
769
- PromotionManager.instance().recordFeatureInteraction(promotionId);
770
- }
771
- };
772
- contextMenu.defaultSection().appendItem(freestylerView.title(), handler, {
773
- isPreviewFeature: freestylerView.isPreviewFeature(),
774
- jslogContext: freestylerView.viewId(),
775
- // Request to show a new badge in the native context menu only if:
776
- // 1. The promotion manager agrees that we may show it, or 2. the promotion manager doesn't track this badge.
777
- // Note that this is only a request to show the new badge, the back-end will decide whether
778
- // or not it will show it depending on the user education service.
779
- featureName: !promotionId || PromotionManager.instance().maybeShowPromotion(promotionId) ? featureName :
780
- undefined,
781
- });
782
- }
783
-
784
759
  for (const view of views) {
785
760
  const title = view.title();
786
761
 
@@ -792,11 +767,6 @@ class TabbedLocation extends Location implements TabbedViewLocation {
792
767
  continue;
793
768
  }
794
769
 
795
- if (view.viewId() === 'freestyler') {
796
- // We have already taken care of this.
797
- continue;
798
- }
799
-
800
770
  const isPreviewFeature = view.isPreviewFeature();
801
771
  contextMenu.defaultSection().appendItem(
802
772
  title, this.showView.bind(this, view, undefined, true), {isPreviewFeature, jslogContext: view.viewId()});
package/package.json CHANGED
@@ -104,5 +104,5 @@
104
104
  "flat-cache": "6.1.12"
105
105
  }
106
106
  },
107
- "version": "1.0.1555174"
107
+ "version": "1.0.1555430"
108
108
  }