chrome-devtools-frontend 1.0.1724140 → 1.0.1726686
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.
- package/.agents/skills/review-ui-widgets/SKILL.md +7 -7
- package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +12 -0
- package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +3 -3
- package/.agents/skills/ui-widgets/SKILL.md +2 -1
- package/docs/cookbook/dependencies.md +6 -4
- package/front_end/core/i18n/i18nImpl.ts +1 -1
- package/front_end/core/root/Runtime.ts +1 -1
- package/front_end/core/sdk/ResourceTreeModel.ts +16 -0
- package/front_end/entrypoints/js_app/js_app.ts +2 -5
- package/front_end/entrypoints/node_app/node_app.ts +2 -3
- package/front_end/generated/InspectorBackendCommands.ts +1 -1
- package/front_end/generated/protocol.ts +1 -0
- package/front_end/models/ai_assistance/skills/lighthouse.md +2 -1
- package/front_end/models/ai_assistance/skills/network.md +1 -0
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +26 -2
- package/front_end/models/ai_assistance/tools/GetLighthouseAudits.ts +1 -1
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +2 -7
- package/front_end/models/ai_assistance/tools/RunLighthouse.ts +2 -2
- package/front_end/models/comment_manager/CommentManager.ts +0 -6
- package/front_end/models/comment_manager/CommentThread.ts +23 -19
- package/front_end/models/elements/StyleChanges.ts +66 -0
- package/front_end/models/trace/EventsSerializer.ts +2 -7
- package/front_end/models/trace/ModelImpl.ts +0 -2
- package/front_end/models/trace/handlers/FlowsHandler.ts +37 -29
- package/front_end/models/trace/helpers/SyntheticEvents.ts +10 -37
- package/front_end/models/trace/insights/RenderBlocking.ts +3 -1
- package/front_end/models/trace/lantern/simulation/Simulator.ts +4 -0
- package/front_end/models/trace/lantern/types/Lantern.ts +1 -0
- package/front_end/panels/accessibility/SourceOrderView.ts +1 -1
- package/front_end/panels/application/ApplicationPanelSidebar.ts +90 -0
- package/front_end/panels/application/StorageView.ts +196 -174
- package/front_end/panels/application/SubAppsView.ts +2 -2
- package/front_end/panels/application/preloading/PreloadingView.ts +360 -336
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +2 -2
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +6 -3
- package/front_end/panels/application/preloading/components/RuleSetGrid.ts +17 -17
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +2 -2
- package/front_end/panels/application/preloading/preloadingView.css +12 -4
- package/front_end/panels/application/preloading/preloadingViewDropDown.css +1 -1
- package/front_end/panels/application/storageView.css +16 -21
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +2 -2
- package/front_end/panels/browser_debugger/browser_debugger-meta.ts +6 -8
- package/front_end/panels/comments/CommentsPane.ts +26 -9
- package/front_end/panels/comments/commentsPane.css +25 -6
- package/front_end/panels/common/CommentThreadWidget.ts +2 -2
- package/front_end/panels/common/CommentsOverlayWidget.ts +94 -35
- package/front_end/panels/common/commentThreadWidget.css +17 -0
- package/front_end/panels/common/commentsOverlay.css +5 -10
- package/front_end/panels/common/common-meta.ts +11 -1
- package/front_end/panels/elements/ClassesPaneWidget.ts +130 -88
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +7 -33
- package/front_end/panels/elements/DOMTreeWidget.ts +7 -3
- package/front_end/panels/elements/ElementStatePaneWidget.ts +11 -1
- package/front_end/panels/elements/PropertyRenderer.ts +3 -2
- package/front_end/panels/elements/StyleEditorWidget.ts +60 -41
- package/front_end/panels/elements/StylePropertiesSection.ts +32 -5
- package/front_end/panels/elements/StylePropertyTreeElement.ts +227 -162
- package/front_end/panels/event_listeners/EventListenersView.ts +11 -8
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterSettings.ts +1 -1
- package/front_end/panels/network/NetworkDataGridNode.ts +3 -1
- package/front_end/panels/network/RequestConditionsDrawer.ts +1 -1
- package/front_end/panels/network/RequestPayloadView.ts +12 -5
- package/front_end/panels/profiler/HeapProfileView.ts +28 -6
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +7 -3
- package/front_end/panels/protocol_monitor/JSONEditor.ts +0 -1
- package/front_end/panels/recorder/RecorderPanel.ts +2 -2
- package/front_end/panels/settings/SettingsScreen.ts +1 -1
- package/front_end/panels/sources/NavigatorView.ts +105 -45
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +8 -5
- package/front_end/panels/sources/SourcesNavigator.ts +421 -213
- package/front_end/panels/sources/SourcesPanel.ts +6 -4
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +10 -5
- package/front_end/panels/sources/sources-meta.ts +4 -15
- package/front_end/panels/sources/sourcesNavigator.css +5 -0
- package/front_end/panels/timeline/ModificationsManager.ts +0 -2
- package/front_end/panels/timeline/README.md +2 -0
- package/front_end/panels/timeline/TimelineCommentController.ts +132 -30
- package/front_end/panels/timeline/TimelinePanel.ts +4 -0
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +1 -1
- package/front_end/panels/timeline/utils/Treemap.ts +8 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/comments/CommentAnchorResolver.ts +3 -0
- package/front_end/ui/comments/CommentOverlayManager.ts +2 -4
- package/front_end/ui/components/lists/List.ts +14 -1
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +1 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +23 -14
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +3 -0
- package/front_end/ui/legacy/Toolbar.ts +0 -1
- package/front_end/ui/legacy/Treeoutline.ts +7 -2
- package/front_end/ui/legacy/UIUtils.ts +4 -1
- package/front_end/ui/legacy/components/inline_editor/Swatches.ts +19 -6
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +20 -11
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +27 -7
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +1 -1
|
@@ -6,33 +6,46 @@
|
|
|
6
6
|
import '../../../kit/kit.js';
|
|
7
7
|
|
|
8
8
|
import type {Icon} from '../../../kit/kit.js';
|
|
9
|
-
import {html, render} from '../../../lit/lit.js';
|
|
9
|
+
import {Directives, html, render} from '../../../lit/lit.js';
|
|
10
10
|
|
|
11
11
|
import type {CSSShadowModel} from './CSSShadowEditor.js';
|
|
12
12
|
import cssShadowSwatchStyles from './cssShadowSwatch.css.js';
|
|
13
13
|
|
|
14
14
|
export class CSSShadowSwatch extends HTMLElement {
|
|
15
|
+
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
15
16
|
readonly #icon: Icon;
|
|
16
|
-
|
|
17
|
+
#model?: CSSShadowModel;
|
|
17
18
|
|
|
18
|
-
constructor(model
|
|
19
|
+
constructor(model?: CSSShadowModel) {
|
|
19
20
|
super();
|
|
20
21
|
this.#model = model;
|
|
22
|
+
const icon = Directives.createRef<Icon>();
|
|
21
23
|
|
|
22
24
|
// clang-format off
|
|
23
25
|
render(html`
|
|
24
26
|
<style>${cssShadowSwatchStyles}</style>
|
|
25
|
-
<devtools-icon tabindex=-1 name="shadow" class="shadow-swatch-icon"></devtools-icon>`,
|
|
26
|
-
this, {host: this});
|
|
27
|
+
<devtools-icon ${Directives.ref(icon)} tabindex=-1 name="shadow" class="shadow-swatch-icon"></devtools-icon>`,
|
|
28
|
+
this.#shadow, {host: this});
|
|
27
29
|
// clang-format on
|
|
28
30
|
|
|
29
|
-
this.#icon =
|
|
31
|
+
this.#icon = icon.value as Icon;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
model(): CSSShadowModel {
|
|
35
|
+
return this.cssShadowModel;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
get cssShadowModel(): CSSShadowModel {
|
|
39
|
+
if (!this.#model) {
|
|
40
|
+
throw new Error('No model set on CSSShadowSwatch');
|
|
41
|
+
}
|
|
33
42
|
return this.#model;
|
|
34
43
|
}
|
|
35
44
|
|
|
45
|
+
set cssShadowModel(model: CSSShadowModel) {
|
|
46
|
+
this.#model = model;
|
|
47
|
+
}
|
|
48
|
+
|
|
36
49
|
iconElement(): Icon {
|
|
37
50
|
return this.#icon;
|
|
38
51
|
}
|
|
@@ -613,7 +613,7 @@ export abstract class ObjectTreeNodeBase extends Common.ObjectWrapper.ObjectWrap
|
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
615
|
|
|
616
|
-
async expandRecursively(maxDepth
|
|
616
|
+
async expandRecursively(maxDepth = 3): Promise<void> {
|
|
617
617
|
for (const node of this.#walk(maxDepth, n => n.canExpandRecursively)) {
|
|
618
618
|
await node.populateChildrenIfNeeded();
|
|
619
619
|
node.expanded = true;
|
|
@@ -1313,10 +1313,15 @@ export class ObjectPropertiesSectionWidget extends UI.Widget.Widget {
|
|
|
1313
1313
|
this.requestUpdate();
|
|
1314
1314
|
}
|
|
1315
1315
|
|
|
1316
|
-
onExpand = (expanded: boolean): void => {
|
|
1317
|
-
if (this.#root) {
|
|
1318
|
-
|
|
1316
|
+
onExpand = (expanded: boolean, recursively = false): void => {
|
|
1317
|
+
if (!this.#root) {
|
|
1318
|
+
return;
|
|
1319
|
+
}
|
|
1320
|
+
if (expanded && recursively) {
|
|
1321
|
+
void this.#root.expandRecursively();
|
|
1322
|
+
return;
|
|
1319
1323
|
}
|
|
1324
|
+
this.#root.expanded = expanded;
|
|
1320
1325
|
};
|
|
1321
1326
|
override performUpdate(): void {
|
|
1322
1327
|
if (!this.#root) {
|
|
@@ -1442,7 +1447,7 @@ export function populateObjectTreeContextMenu(contextMenu: UI.ContextMenu.Contex
|
|
|
1442
1447
|
|
|
1443
1448
|
interface ObjectTreeViewInput extends ContextMenuHandlers {
|
|
1444
1449
|
onShowAllProperties: (node: ObjectTreeNode) => void;
|
|
1445
|
-
onExpand: (node: ObjectTreeNodeBase, expanded: boolean) => void;
|
|
1450
|
+
onExpand: (node: ObjectTreeNodeBase, expanded: boolean, recursively?: boolean) => void;
|
|
1446
1451
|
renderAsSubtree: boolean;
|
|
1447
1452
|
objectTree?: ObjectTree;
|
|
1448
1453
|
linkifier?: Components.Linkifier.Linkifier;
|
|
@@ -1466,7 +1471,7 @@ const OBJECT_TREE_DEFAULT_VIEW: ObjectTreeView = (input, output, target) => {
|
|
|
1466
1471
|
};
|
|
1467
1472
|
|
|
1468
1473
|
const onExpand = (e: UI.TreeOutline.TreeViewElement.ExpandEvent): void => {
|
|
1469
|
-
input.onExpand(property, e.detail.expanded);
|
|
1474
|
+
input.onExpand(property, e.detail.expanded, e.detail.recursively);
|
|
1470
1475
|
e.consume(true);
|
|
1471
1476
|
};
|
|
1472
1477
|
const childCount = (property.children?.properties?.length ?? 0) +
|
|
@@ -1510,7 +1515,7 @@ const OBJECT_TREE_DEFAULT_VIEW: ObjectTreeView = (input, output, target) => {
|
|
|
1510
1515
|
|
|
1511
1516
|
function renderArrayGroup(child: ArrayGroupTreeNode): LitTemplate {
|
|
1512
1517
|
const onExpand = (e: UI.TreeOutline.TreeViewElement.ExpandEvent): void => {
|
|
1513
|
-
input.onExpand(child, e.detail.expanded);
|
|
1518
|
+
input.onExpand(child, e.detail.expanded, e.detail.recursively);
|
|
1514
1519
|
e.consume(true);
|
|
1515
1520
|
};
|
|
1516
1521
|
|
|
@@ -1684,7 +1689,11 @@ export class ObjectTreeWidget extends UI.Widget.Widget {
|
|
|
1684
1689
|
}
|
|
1685
1690
|
}
|
|
1686
1691
|
|
|
1687
|
-
onExpand = (node: ObjectTreeNodeBase, expanded: boolean): void => {
|
|
1692
|
+
onExpand = (node: ObjectTreeNodeBase, expanded: boolean, recursively = false): void => {
|
|
1693
|
+
if (expanded && recursively) {
|
|
1694
|
+
void node.expandRecursively().then(() => this.requestUpdate());
|
|
1695
|
+
return;
|
|
1696
|
+
}
|
|
1688
1697
|
if (node.expanded !== expanded) {
|
|
1689
1698
|
node.expanded = expanded;
|
|
1690
1699
|
this.requestUpdate();
|
|
@@ -1822,7 +1831,7 @@ interface ObjectPropertiesSectionViewInput {
|
|
|
1822
1831
|
skipProto: boolean;
|
|
1823
1832
|
showOverflow: boolean;
|
|
1824
1833
|
onRootItemContextMenu: (menu: UI.ContextMenu.ContextMenu) => void;
|
|
1825
|
-
onExpand: (expanded: boolean) => void;
|
|
1834
|
+
onExpand: (expanded: boolean, recursively?: boolean) => void;
|
|
1826
1835
|
}
|
|
1827
1836
|
|
|
1828
1837
|
type ObjectPropertiesSectionView = (input: ObjectPropertiesSectionViewInput, output: object, target: HTMLElement) =>
|
|
@@ -1849,8 +1858,8 @@ export const OBJECT_PROPERTIES_SECTION_DEFAULT_VIEW: ObjectPropertiesSectionView
|
|
|
1849
1858
|
<style>${objectPropertiesSectionStyles}</style>
|
|
1850
1859
|
<li role="treeitem" class="object-properties-section-root-element" toggle-on-click ?open=${
|
|
1851
1860
|
input.objectTree.expanded} @expand=${
|
|
1852
|
-
(e:
|
|
1853
|
-
|
|
1861
|
+
(e: UI.TreeOutline.TreeViewElement.ExpandEvent) => input.onExpand(
|
|
1862
|
+
e.detail.expanded, e.detail.recursively)} @contextmenu=${onRootItemContextMenuHandler}>
|
|
1854
1863
|
${input.title}
|
|
1855
1864
|
<ul role="group" ${widget(ObjectTreeWidget, {
|
|
1856
1865
|
objectTree: input.objectTree,
|
|
@@ -23,7 +23,6 @@ const UIStrings = {
|
|
|
23
23
|
const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/source_frame/XMLView.ts', UIStrings);
|
|
24
24
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
25
25
|
const {render, html} = Lit;
|
|
26
|
-
const {ifExpanded} = UI.TreeOutline;
|
|
27
26
|
|
|
28
27
|
function* attributes(element: Element): Generator<Attr> {
|
|
29
28
|
for (let i = 0; i < element.attributes.length; ++i) {
|
|
@@ -111,7 +110,7 @@ function htmlView(treeNode: XMLTreeViewNode): Lit.LitTemplate {
|
|
|
111
110
|
}
|
|
112
111
|
|
|
113
112
|
interface ViewInput {
|
|
114
|
-
onExpand(node: XMLTreeViewNode, expanded: boolean): void;
|
|
113
|
+
onExpand(node: XMLTreeViewNode, expanded: boolean, recursively?: boolean): void;
|
|
115
114
|
xml: XMLTreeViewNode;
|
|
116
115
|
search: UI.TreeOutline.TreeSearch<XMLTreeViewNode, SearchResult>|undefined;
|
|
117
116
|
jumpToNextSearchResult: SearchResult|undefined;
|
|
@@ -140,7 +139,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
140
139
|
|
|
141
140
|
function layOutNode(node: XMLTreeViewNode): Lit.LitTemplate {
|
|
142
141
|
const onExpand = (event: UI.TreeOutline.TreeViewElement.ExpandEvent): void =>
|
|
143
|
-
input.onExpand(node, event.detail.expanded);
|
|
142
|
+
input.onExpand(node, event.detail.expanded, event.detail.recursively);
|
|
144
143
|
const {highlights, selected} = highlight(node, /* closeTag=*/ false);
|
|
145
144
|
|
|
146
145
|
const containsSearchResult = (node: XMLTreeViewNode): boolean => {
|
|
@@ -155,18 +154,20 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
155
154
|
return false;
|
|
156
155
|
};
|
|
157
156
|
|
|
157
|
+
const isExpanded = node.expanded || containsSearchResult(node);
|
|
158
|
+
|
|
158
159
|
// clang-format off
|
|
159
160
|
return html`
|
|
160
161
|
<li role="treeitem"
|
|
161
162
|
?selected=${input.jumpToNextSearchResult?.node === node}
|
|
162
163
|
@expand=${onExpand}
|
|
163
|
-
?open=${
|
|
164
|
+
?open=${isExpanded}>
|
|
164
165
|
<devtools-highlight ranges=${highlights} current-range=${selected}>
|
|
165
166
|
${htmlView(node)}
|
|
166
167
|
</devtools-highlight>
|
|
167
168
|
${node.children().length ? html`
|
|
168
169
|
<ul role="group">
|
|
169
|
-
${
|
|
170
|
+
${isExpanded ? subtree(node) : Lit.nothing}
|
|
170
171
|
</ul>` : Lit.nothing}
|
|
171
172
|
</li>`;
|
|
172
173
|
// clang-format on
|
|
@@ -253,6 +254,18 @@ export class XMLTreeViewNode {
|
|
|
253
254
|
return this.children();
|
|
254
255
|
}
|
|
255
256
|
|
|
257
|
+
expandRecursively(maxDepth = 3): void {
|
|
258
|
+
this.expanded = true;
|
|
259
|
+
if (maxDepth <= 1) {
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
for (const child of this.children()) {
|
|
263
|
+
if (child.children().length > 0) {
|
|
264
|
+
child.expandRecursively(maxDepth - 1);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
256
269
|
match(regex: RegExp, closeTag: boolean): RegExpStringIterator<RegExpExecArray> {
|
|
257
270
|
return textView(this, closeTag).matchAll(regex);
|
|
258
271
|
}
|
|
@@ -294,8 +307,15 @@ export class XMLView extends UI.Widget.Widget implements UI.SearchableView.Searc
|
|
|
294
307
|
|
|
295
308
|
override performUpdate(): void {
|
|
296
309
|
if (this.#treeViewModel) {
|
|
297
|
-
const onExpand = (node: XMLTreeViewNode, expanded: boolean): void => {
|
|
298
|
-
node.expanded
|
|
310
|
+
const onExpand = (node: XMLTreeViewNode, expanded: boolean, recursively = false): void => {
|
|
311
|
+
if (node.expanded === expanded && !recursively) {
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
if (expanded && recursively) {
|
|
315
|
+
node.expandRecursively();
|
|
316
|
+
} else {
|
|
317
|
+
node.expanded = expanded;
|
|
318
|
+
}
|
|
299
319
|
this.requestUpdate();
|
|
300
320
|
};
|
|
301
321
|
this.#view(
|
package/package.json
CHANGED