chrome-devtools-frontend 1.0.1521880 → 1.0.1522145

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 (42) hide show
  1. package/front_end/core/host/GdpClient.ts +116 -66
  2. package/front_end/core/root/Runtime.ts +1 -0
  3. package/front_end/entrypoints/inspector_main/InspectorMain.ts +82 -32
  4. package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +1 -1
  5. package/front_end/entrypoints/main/MainImpl.ts +7 -1
  6. package/front_end/models/ai_assistance/agents/NetworkAgent.ts +10 -6
  7. package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +42 -4
  8. package/front_end/models/badges/UserBadges.ts +14 -16
  9. package/front_end/panels/ai_assistance/components/UserActionRow.ts +1 -2
  10. package/front_end/panels/application/IndexedDBViews.ts +1 -0
  11. package/front_end/panels/application/ReportingApiTreeElement.ts +1 -2
  12. package/front_end/panels/application/ReportingApiView.ts +18 -20
  13. package/front_end/panels/application/ServiceWorkerCacheViews.ts +3 -0
  14. package/front_end/panels/application/components/EndpointsGrid.ts +51 -59
  15. package/front_end/panels/application/components/ReportsGrid.ts +86 -107
  16. package/front_end/panels/application/components/StorageMetadataView.ts +30 -4
  17. package/front_end/panels/application/components/endpointsGrid.css +30 -0
  18. package/front_end/panels/application/components/reportsGrid.css +34 -0
  19. package/front_end/panels/application/components/storageMetadataView.css +9 -0
  20. package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +19 -27
  21. package/front_end/panels/common/BadgeNotification.ts +10 -3
  22. package/front_end/panels/network/NetworkPanel.ts +1 -1
  23. package/front_end/panels/search/SearchResultsPane.ts +14 -13
  24. package/front_end/panels/search/SearchView.ts +3 -20
  25. package/front_end/panels/settings/components/SyncSection.ts +8 -6
  26. package/front_end/panels/sources/SearchSourcesView.ts +1 -1
  27. package/front_end/panels/whats_new/ReleaseNoteText.ts +15 -11
  28. package/front_end/panels/whats_new/resources/WNDT.md +9 -6
  29. package/front_end/third_party/diff/README.chromium +0 -1
  30. package/front_end/ui/legacy/Treeoutline.ts +6 -9
  31. package/front_end/ui/legacy/UIUtils.ts +4 -17
  32. package/front_end/ui/legacy/Widget.ts +0 -5
  33. package/front_end/ui/legacy/XElement.ts +0 -33
  34. package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +3 -3
  35. package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +38 -21
  36. package/front_end/ui/legacy/components/perf_ui/filmStripView.css +29 -0
  37. package/front_end/ui/legacy/components/source_frame/XMLView.ts +3 -2
  38. package/front_end/ui/legacy/legacy.ts +0 -2
  39. package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
  40. package/package.json +1 -1
  41. package/front_end/panels/application/components/reportingApiGrid.css +0 -31
  42. package/front_end/ui/legacy/XWidget.ts +0 -133
@@ -59,3 +59,32 @@
59
59
  .film-strip-view .frame:focus .thumbnail img {
60
60
  box-shadow: none;
61
61
  }
62
+
63
+ .film-strip-image-dialog {
64
+ display: flex;
65
+ flex-direction: column;
66
+ width: 100%;
67
+
68
+ .image-box {
69
+ overflow: auto;
70
+ margin: var(--sys-size-7) var(--sys-size-8) var(--sys-size-8)
71
+ var(--sys-size-8);
72
+ border: var(--sys-size-1) solid var(--sys-color-divider);
73
+ }
74
+
75
+ img {
76
+ max-height: 80vh;
77
+ max-width: 80vw;
78
+ }
79
+
80
+ .time-box {
81
+ margin: 0 var(--sys-size-3);
82
+ }
83
+
84
+ .button-box {
85
+ display: flex;
86
+ align-items: center;
87
+ justify-content: center;
88
+ margin: var(--sys-size-6) 0 var(--sys-size-5);
89
+ }
90
+ }
@@ -5,6 +5,7 @@
5
5
  import * as i18n from '../../../../core/i18n/i18n.js';
6
6
  import * as TextUtils from '../../../../models/text_utils/text_utils.js';
7
7
  import * as Lit from '../../../lit/lit.js';
8
+ import * as VisualLogging from '../../../visual_logging/visual_logging.js';
8
9
  import * as UI from '../../legacy.js';
9
10
 
10
11
  import xmlTreeStyles from './xmlTree.css.js';
@@ -29,7 +30,7 @@ function* attributes(element: Element): Generator<Attr> {
29
30
  }
30
31
 
31
32
  function hasNonTextChildren(node: Node): boolean {
32
- return node.childNodes.length !== node.childTextNodes.length;
33
+ return Boolean(node.childNodes.values().find(node => node.nodeType !== Node.TEXT_NODE));
33
34
  }
34
35
 
35
36
  function textView(treeNode: XMLTreeViewNode, closeTag: boolean): string {
@@ -249,7 +250,7 @@ export class XMLView extends UI.Widget.Widget implements UI.SearchableView.Searc
249
250
  #nextJump: SearchResult|undefined;
250
251
 
251
252
  constructor(target?: HTMLElement, view: View = DEFAULT_VIEW) {
252
- super(target, {jslog: 'xml-view', classes: ['shadow-xml-view', 'source-code']});
253
+ super(target, {jslog: `${VisualLogging.pane('xml-view')}`, classes: ['shadow-xml-view', 'source-code']});
253
254
  this.#view = view;
254
255
  }
255
256
 
@@ -52,7 +52,6 @@ import * as ViewManager from './ViewManager.js';
52
52
  import * as Widget from './Widget.js';
53
53
  import * as XElement from './XElement.js';
54
54
  import * as XLink from './XLink.js';
55
- import * as XWidget from './XWidget.js';
56
55
  import * as ZoomManager from './ZoomManager.js';
57
56
 
58
57
  export {
@@ -106,6 +105,5 @@ export {
106
105
  Widget,
107
106
  XElement,
108
107
  XLink,
109
- XWidget,
110
108
  ZoomManager,
111
109
  };
@@ -4137,6 +4137,7 @@ export const knownContextValues = new Set([
4137
4137
  'x-offset',
4138
4138
  'x-small',
4139
4139
  'xhr',
4140
+ 'xml-view',
4140
4141
  'xr',
4141
4142
  'xx-large',
4142
4143
  'xx-small',
package/package.json CHANGED
@@ -102,5 +102,5 @@
102
102
  "@eslint/core": "0.15.1"
103
103
  }
104
104
  },
105
- "version": "1.0.1521880"
105
+ "version": "1.0.1522145"
106
106
  }
@@ -1,31 +0,0 @@
1
- /*
2
- * Copyright 2021 The Chromium Authors
3
- * Use of this source code is governed by a BSD-style license that can be
4
- * found in the LICENSE file.
5
- */
6
-
7
- :host {
8
- overflow: auto;
9
- height: 100%;
10
- }
11
-
12
- .reporting-container {
13
- height: 100%;
14
- display: flex;
15
- flex-direction: column;
16
- }
17
-
18
- .reporting-header {
19
- font-size: 15px;
20
- background-color: var(--sys-color-surface2);
21
- padding: 1px 4px;
22
- flex-shrink: 0;
23
- }
24
-
25
- devtools-data-grid {
26
- flex: auto;
27
- }
28
-
29
- .inline-icon {
30
- vertical-align: text-bottom;
31
- }
@@ -1,133 +0,0 @@
1
- // Copyright 2017 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
-
5
- import {XElement} from './XElement.js';
6
-
7
- let observer: ResizeObserver|null = null;
8
-
9
- const storedScrollPositions = new WeakMap<Element, {
10
- scrollLeft: number,
11
- scrollTop: number,
12
- }>();
13
-
14
- export class XWidget extends XElement {
15
- private visible: boolean;
16
- defaultFocusedElement: Element|null;
17
- private elementsToRestoreScrollPositionsFor: Element[];
18
- private onShownCallback!: (() => void)|null;
19
- private onHiddenCallback!: (() => void)|null;
20
- private onResizedCallback!: (() => void)|null;
21
-
22
- constructor() {
23
- super();
24
- this.style.setProperty('display', 'flex');
25
- this.style.setProperty('flex-direction', 'column');
26
- this.style.setProperty('align-items', 'stretch');
27
- this.style.setProperty('justify-content', 'flex-start');
28
- this.style.setProperty('contain', 'layout style');
29
-
30
- this.visible = false;
31
- this.defaultFocusedElement = null;
32
- this.elementsToRestoreScrollPositionsFor = [];
33
-
34
- if (!observer) {
35
- observer = new ResizeObserver(entries => {
36
- for (const entry of entries) {
37
- const widget = (entry.target as XWidget);
38
- if (widget.visible && widget.onResizedCallback) {
39
- widget.onResizedCallback.call(null);
40
- }
41
- }
42
- });
43
- }
44
-
45
- observer.observe(this);
46
-
47
- this.setElementsToRestoreScrollPositionsFor([this]);
48
- }
49
-
50
- isShowing(): boolean {
51
- return this.visible;
52
- }
53
-
54
- setElementsToRestoreScrollPositionsFor(elements: Element[]): void {
55
- for (const element of this.elementsToRestoreScrollPositionsFor) {
56
- element.removeEventListener('scroll', XWidget.storeScrollPosition, {capture: false});
57
- }
58
- this.elementsToRestoreScrollPositionsFor = elements;
59
- for (const element of this.elementsToRestoreScrollPositionsFor) {
60
- element.addEventListener('scroll', XWidget.storeScrollPosition, {passive: true, capture: false});
61
- }
62
- }
63
-
64
- restoreScrollPositions(): void {
65
- for (const element of this.elementsToRestoreScrollPositionsFor) {
66
- const storedPositions = storedScrollPositions.get(element);
67
- if (storedPositions) {
68
- element.scrollTop = storedPositions.scrollTop;
69
- element.scrollLeft = storedPositions.scrollLeft;
70
- }
71
- }
72
- }
73
-
74
- private static storeScrollPosition(event: Event): void {
75
- const element = (event.currentTarget as Element);
76
- storedScrollPositions.set(element, {scrollLeft: element.scrollLeft, scrollTop: element.scrollTop});
77
- }
78
-
79
- setDefaultFocusedElement(element: Element|null): void {
80
- if (element && !this.isSelfOrAncestor(element)) {
81
- throw new Error('Default focus must be descendant');
82
- }
83
- this.defaultFocusedElement = element;
84
- }
85
-
86
- override focus(): void {
87
- if (!this.visible) {
88
- return;
89
- }
90
-
91
- let element;
92
- if (this.defaultFocusedElement && this.isSelfOrAncestor(this.defaultFocusedElement)) {
93
- element = this.defaultFocusedElement;
94
- } else if (this.tabIndex !== -1) {
95
- element = this;
96
- } else {
97
- let child = this.traverseNextNode(this);
98
- while (child) {
99
- if ((child instanceof XWidget) && child.visible) {
100
- element = child;
101
- break;
102
- }
103
- child = child.traverseNextNode(this);
104
- }
105
- }
106
-
107
- if (!element || element.hasFocus()) {
108
- return;
109
- }
110
- if (element === this) {
111
- HTMLElement.prototype.focus.call(this);
112
- } else {
113
- (element as HTMLElement).focus();
114
- }
115
- }
116
-
117
- connectedCallback(): void {
118
- this.visible = true;
119
- this.restoreScrollPositions();
120
- if (this.onShownCallback) {
121
- this.onShownCallback.call(null);
122
- }
123
- }
124
-
125
- disconnectedCallback(): void {
126
- this.visible = false;
127
- if (this.onHiddenCallback) {
128
- this.onHiddenCallback.call(null);
129
- }
130
- }
131
- }
132
-
133
- customElements.define('x-widget', XWidget);