chrome-devtools-frontend 1.0.1613625 → 1.0.1614363
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/AUTHORS +1 -0
- package/front_end/core/common/MapWithDefault.ts +2 -2
- package/front_end/core/common/Object.ts +6 -9
- package/front_end/core/common/VersionController.ts +17 -1
- package/front_end/core/host/UserMetrics.ts +0 -1
- package/front_end/core/root/ExperimentNames.ts +0 -1
- package/front_end/core/sdk/OverlayModel.ts +2 -4
- package/front_end/core/sdk/sdk-meta.ts +13 -0
- package/front_end/entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.ts +4 -0
- package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +0 -1
- package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +0 -1
- package/front_end/entrypoints/main/MainImpl.ts +0 -6
- package/front_end/entrypoints/shell/shell.ts +4 -0
- package/front_end/entrypoints/trace_app/trace_app.ts +4 -0
- package/front_end/generated/InspectorBackendCommands.ts +2 -2
- package/front_end/generated/protocol.ts +5 -3
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +10 -2
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +23 -7
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +161 -36
- package/front_end/models/javascript_metadata/NativeFunctions.js +673 -639
- package/front_end/models/stack_trace/DetailedErrorStackParser.ts +142 -0
- package/front_end/models/stack_trace/StackTrace.ts +18 -0
- package/front_end/models/stack_trace/StackTraceImpl.ts +96 -4
- package/front_end/models/stack_trace/Trie.ts +21 -0
- package/front_end/models/stack_trace/stack_trace_impl.ts +2 -0
- package/front_end/panels/ai_assistance/components/ChatView.ts +4 -3
- package/front_end/panels/ai_assistance/components/ExportForAgentsDialog.ts +4 -1
- package/front_end/panels/ai_assistance/components/optInChangeDialog.css +1 -2
- package/front_end/panels/application/WebMCPView.ts +249 -17
- package/front_end/panels/application/components/ProtocolHandlersView.ts +2 -2
- package/front_end/panels/common/AiCodeCompletionDisclaimer.ts +7 -0
- package/front_end/panels/console/ConsoleContextSelector.ts +1 -1
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +2 -3
- package/front_end/panels/css_overview/CSSOverviewModel.ts +1 -2
- package/front_end/panels/network/RequestConditionsDrawer.ts +4 -2
- package/front_end/panels/network/RequestPayloadView.ts +8 -3
- package/front_end/panels/network/RequestTimingView.ts +6 -7
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +7 -5
- package/front_end/panels/protocol_monitor/JSONEditor.ts +1 -1
- package/front_end/panels/recorder/models/RecordingPlayer.ts +1 -1
- package/front_end/services/puppeteer/PuppeteerConnection.ts +1 -1
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/codemirror/codemirror-tsconfig.json +4 -4
- package/front_end/third_party/lighthouse/lighthouse-tsconfig.json +1 -1
- package/front_end/tsconfig.json +2 -1
- package/front_end/ui/kit/icons/Icon.ts +0 -1
- package/front_end/ui/legacy/EmptyWidget.ts +2 -2
- package/front_end/ui/legacy/Treeoutline.ts +2 -3
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +1 -2
- package/front_end/ui/legacy/components/color_picker/ContrastOverlay.ts +4 -5
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +3 -4
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +12 -7
- package/front_end/ui/lit/lit.ts +4 -1
- package/front_end/ui/lit/render.ts +81 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -1
- package/package.json +2 -2
- /package/front_end/third_party/codemirror/package/addon/runmode/{runmode-standalone.mjs.d.ts → runmode-standalone.d.mts} +0 -0
- /package/front_end/third_party/codemirror/package/mode/css/{css.mjs.d.ts → css.d.mts} +0 -0
- /package/front_end/third_party/codemirror/package/mode/javascript/{javascript.mjs.d.ts → javascript.d.mts} +0 -0
- /package/front_end/third_party/codemirror/package/mode/xml/{xml.mjs.d.ts → xml.d.mts} +0 -0
- /package/front_end/third_party/lighthouse/report-assets/{report-generator.mjs.d.ts → report-generator.d.mts} +0 -0
|
@@ -1932,7 +1932,7 @@ export namespace TreeViewElement {
|
|
|
1932
1932
|
}
|
|
1933
1933
|
}
|
|
1934
1934
|
|
|
1935
|
-
class
|
|
1935
|
+
export const ifExpanded = Lit.Directive.directive(class extends Lit.Directive.Directive {
|
|
1936
1936
|
#partInfo: {type: Lit.Directive.PartType, startNode: Node};
|
|
1937
1937
|
constructor(partInfo: Lit.Directive.PartInfo) {
|
|
1938
1938
|
if (partInfo.type !== Lit.Directive.PartType.CHILD) {
|
|
@@ -1969,8 +1969,7 @@ class IfExpandedDirective extends Lit.Directive.Directive {
|
|
|
1969
1969
|
}
|
|
1970
1970
|
return node.expanded;
|
|
1971
1971
|
}
|
|
1972
|
-
}
|
|
1973
|
-
export const ifExpanded = Lit.Directive.directive(IfExpandedDirective);
|
|
1972
|
+
});
|
|
1974
1973
|
|
|
1975
1974
|
export class TreeElementWrapper extends HTMLElement {
|
|
1976
1975
|
#treeElement?: TreeElement;
|
|
@@ -9,7 +9,6 @@ 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';
|
|
13
12
|
import {createIcon, Icon} from '../../../../ui/kit/kit.js';
|
|
14
13
|
import * as UIHelpers from '../../../helpers/helpers.js';
|
|
15
14
|
import * as UI from '../../legacy.js';
|
|
@@ -242,7 +241,7 @@ export class ContrastDetails extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
242
241
|
this.setVisible(true);
|
|
243
242
|
this.hideNoContrastInfoAvailableMessage();
|
|
244
243
|
|
|
245
|
-
const isAPCAEnabled =
|
|
244
|
+
const isAPCAEnabled = Common.Settings.Settings.instance().moduleSetting('apca').get();
|
|
246
245
|
|
|
247
246
|
const fgColor = this.contrastInfo.color();
|
|
248
247
|
const bgColor = this.contrastInfo.bgColor();
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as Common from '../../../../core/common/common.js';
|
|
6
|
-
import * as Root from '../../../../core/root/root.js';
|
|
7
6
|
import * as UI from '../../legacy.js';
|
|
8
7
|
|
|
9
8
|
import {type ContrastInfo, Events} from './ContrastInfo.js';
|
|
@@ -25,7 +24,7 @@ export class ContrastOverlay {
|
|
|
25
24
|
|
|
26
25
|
this.contrastRatioSVG = UI.UIUtils.createSVGChild(colorElement, 'svg', 'spectrum-contrast-container fill');
|
|
27
26
|
this.contrastRatioLines = new Map();
|
|
28
|
-
if (
|
|
27
|
+
if (Common.Settings.Settings.instance().moduleSetting('apca').get()) {
|
|
29
28
|
this.contrastRatioLines.set(
|
|
30
29
|
'APCA', UI.UIUtils.createSVGChild(this.contrastRatioSVG, 'path', 'spectrum-contrast-line'));
|
|
31
30
|
} else {
|
|
@@ -50,7 +49,7 @@ export class ContrastOverlay {
|
|
|
50
49
|
if (!this.visible || this.contrastInfo.isNull()) {
|
|
51
50
|
return;
|
|
52
51
|
}
|
|
53
|
-
if (
|
|
52
|
+
if (Common.Settings.Settings.instance().moduleSetting('apca').get() &&
|
|
54
53
|
this.contrastInfo.contrastRatioAPCA() === null) {
|
|
55
54
|
return;
|
|
56
55
|
}
|
|
@@ -91,7 +90,7 @@ export class ContrastRatioLineBuilder {
|
|
|
91
90
|
}
|
|
92
91
|
|
|
93
92
|
drawContrastRatioLine(width: number, height: number, level: string): string|null {
|
|
94
|
-
const isAPCA =
|
|
93
|
+
const isAPCA = Common.Settings.Settings.instance().moduleSetting('apca').get();
|
|
95
94
|
const requiredContrast =
|
|
96
95
|
isAPCA ? this.contrastInfo.contrastRatioAPCAThreshold() : this.contrastInfo.contrastRatioThreshold(level);
|
|
97
96
|
if (!width || !height || requiredContrast === null) {
|
|
@@ -140,7 +139,7 @@ export class ContrastRatioLineBuilder {
|
|
|
140
139
|
Common.ColorUtils.blendColors(Common.Color.Legacy.fromHSVA(candidateHSVA).rgba(), bgRGBA));
|
|
141
140
|
};
|
|
142
141
|
|
|
143
|
-
if (
|
|
142
|
+
if (Common.Settings.Settings.instance().moduleSetting('apca').get()) {
|
|
144
143
|
candidateLuminance = (candidateHSVA: Common.ColorUtils.Color4D) => {
|
|
145
144
|
return Common.ColorUtils.luminanceAPCA(
|
|
146
145
|
Common.ColorUtils.blendColors(Common.Color.Legacy.fromHSVA(candidateHSVA).rgba(), bgRGBA));
|
|
@@ -50,7 +50,7 @@ const DUMMY_COLUMN_ID = 'dummy'; // SortableDataGrid.create requires at least o
|
|
|
50
50
|
* @attribute striped If true, the data grid will have striped rows.
|
|
51
51
|
* @attribute displayName
|
|
52
52
|
*/
|
|
53
|
-
|
|
53
|
+
class DataGridElement extends UI.UIUtils.HTMLElementWithLightDOMTemplate {
|
|
54
54
|
static readonly observedAttributes = ['striped', 'name', 'inline', 'resize'];
|
|
55
55
|
|
|
56
56
|
#dataGrid = SortableDataGrid.create([DUMMY_COLUMN_ID], [], '') as SortableDataGrid<DataGridElementNode>;
|
|
@@ -609,7 +609,7 @@ const INTERNAL_TOKEN: DataGridInternalToken = {
|
|
|
609
609
|
token: 'DataGridInternalToken'
|
|
610
610
|
};
|
|
611
611
|
|
|
612
|
-
class
|
|
612
|
+
export const ifExpanded = Lit.Directive.directive(class extends Lit.Directive.Directive {
|
|
613
613
|
#partInfo: {type: Lit.Directive.PartType, startNode: Node};
|
|
614
614
|
constructor(partInfo: Lit.Directive.PartInfo) {
|
|
615
615
|
if (partInfo.type !== Lit.Directive.PartType.CHILD) {
|
|
@@ -639,5 +639,4 @@ class IfExpandedDirective extends Lit.Directive.Directive {
|
|
|
639
639
|
}
|
|
640
640
|
return node.expanded;
|
|
641
641
|
}
|
|
642
|
-
}
|
|
643
|
-
export const ifExpanded = Lit.Directive.directive(IfExpandedDirective);
|
|
642
|
+
});
|
|
@@ -191,19 +191,24 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
// clang-format off
|
|
194
|
-
render(
|
|
195
|
-
html`
|
|
194
|
+
render(html`
|
|
196
195
|
<style>${xmlViewStyles}</style>
|
|
197
196
|
<style>${xmlTreeStyles}</style>
|
|
198
197
|
<devtools-tree
|
|
199
198
|
class="shadow-xml-view source-code"
|
|
200
199
|
.template=${html`
|
|
201
200
|
<ul role="tree">
|
|
202
|
-
|
|
201
|
+
${input.xml.children().map(node => layOutNode(node))}
|
|
203
202
|
</ul>`}
|
|
204
|
-
></devtools-tree>`,
|
|
205
|
-
|
|
206
|
-
|
|
203
|
+
></devtools-tree>`, target, {
|
|
204
|
+
container: {
|
|
205
|
+
classes: ['shadow-xml-view', 'source-code'],
|
|
206
|
+
attributes: {
|
|
207
|
+
jslog: `${VisualLogging.pane('xml-view')}`,
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
});
|
|
211
|
+
// clang-format on
|
|
207
212
|
};
|
|
208
213
|
|
|
209
214
|
function* children(xmlNode: Node|ParentNode|undefined): Generator<Node> {
|
|
@@ -272,7 +277,7 @@ export class XMLView extends UI.Widget.Widget implements UI.SearchableView.Searc
|
|
|
272
277
|
#nextJump: SearchResult|undefined;
|
|
273
278
|
|
|
274
279
|
constructor(target?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
275
|
-
super(target
|
|
280
|
+
super(target);
|
|
276
281
|
this.#view = view;
|
|
277
282
|
}
|
|
278
283
|
|
package/front_end/ui/lit/lit.ts
CHANGED
|
@@ -14,7 +14,6 @@ export {
|
|
|
14
14
|
noChange,
|
|
15
15
|
nothing,
|
|
16
16
|
type PropertyValues,
|
|
17
|
-
render,
|
|
18
17
|
StaticHtml,
|
|
19
18
|
svg,
|
|
20
19
|
type TemplateResult,
|
|
@@ -22,6 +21,10 @@ export {
|
|
|
22
21
|
export {
|
|
23
22
|
i18nTemplate,
|
|
24
23
|
} from './i18n-template.js';
|
|
24
|
+
export {
|
|
25
|
+
render,
|
|
26
|
+
type RenderOptions,
|
|
27
|
+
} from './render.js';
|
|
25
28
|
export {
|
|
26
29
|
html,
|
|
27
30
|
} from './strip-whitespace.js';
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// Copyright 2026 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
|
+
/* eslint-disable @devtools/no-lit-render-outside-of-view */
|
|
5
|
+
|
|
6
|
+
import * as Lit from '../../third_party/lit/lit.js';
|
|
7
|
+
|
|
8
|
+
export interface RenderOptions extends Lit.RenderOptions {
|
|
9
|
+
container?: {
|
|
10
|
+
attributes?: Record<string, string|null|boolean|undefined|{toString(): string}>,
|
|
11
|
+
classes?: string[],
|
|
12
|
+
listeners?: Record<string, EventListenerOrEventListenerObject>,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const renderOptions = new WeakMap<HTMLElement|DocumentFragment, RenderOptions|undefined>();
|
|
17
|
+
|
|
18
|
+
export function render(template: unknown, container: HTMLElement|DocumentFragment, options?: RenderOptions):
|
|
19
|
+
ReturnType<typeof Lit.render> {
|
|
20
|
+
if (container instanceof HTMLElement) {
|
|
21
|
+
const oldAttributes = renderOptions.get(container)?.container?.attributes;
|
|
22
|
+
const newAttributes = options?.container?.attributes;
|
|
23
|
+
if (newAttributes) {
|
|
24
|
+
for (const [name, value] of Object.entries(newAttributes)) {
|
|
25
|
+
if (oldAttributes?.[name] === value) {
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
if (value === null || value === undefined) {
|
|
29
|
+
container.removeAttribute(name);
|
|
30
|
+
} else if (typeof value === 'boolean') {
|
|
31
|
+
container.toggleAttribute(name, value);
|
|
32
|
+
} else {
|
|
33
|
+
container.setAttribute(name, value.toString());
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (oldAttributes) {
|
|
38
|
+
for (const name of Object.keys(oldAttributes)) {
|
|
39
|
+
if (!newAttributes || !(name in newAttributes)) {
|
|
40
|
+
container.removeAttribute(name);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const oldClasses = renderOptions.get(container)?.container?.classes;
|
|
46
|
+
const newClasses = options?.container?.classes;
|
|
47
|
+
if (oldClasses) {
|
|
48
|
+
for (const cls of oldClasses) {
|
|
49
|
+
if (!newClasses?.includes(cls)) {
|
|
50
|
+
container.classList.remove(cls);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (newClasses) {
|
|
55
|
+
for (const cls of newClasses) {
|
|
56
|
+
if (!oldClasses?.includes(cls)) {
|
|
57
|
+
container.classList.add(cls);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const oldListeners = renderOptions.get(container)?.container?.listeners;
|
|
64
|
+
const newListeners = options?.container?.listeners;
|
|
65
|
+
if (oldListeners) {
|
|
66
|
+
for (const [name, listener] of Object.entries(oldListeners)) {
|
|
67
|
+
if (newListeners?.[name] !== listener) {
|
|
68
|
+
container.removeEventListener(name, listener);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (newListeners) {
|
|
73
|
+
for (const [name, listener] of Object.entries(newListeners)) {
|
|
74
|
+
if (oldListeners?.[name] !== listener) {
|
|
75
|
+
container.addEventListener(name, listener);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
renderOptions.set(container, options);
|
|
80
|
+
return Lit.render(template, container, options);
|
|
81
|
+
}
|
|
@@ -4349,12 +4349,12 @@ export const knownContextValues = new Set([
|
|
|
4349
4349
|
'webgl-warning-fired',
|
|
4350
4350
|
'webmcp.call-inputs',
|
|
4351
4351
|
'webmcp.call-outputs',
|
|
4352
|
+
'webmcp.completed',
|
|
4352
4353
|
'webmcp.declarative',
|
|
4353
4354
|
'webmcp.error',
|
|
4354
4355
|
'webmcp.imperative',
|
|
4355
4356
|
'webmcp.pending',
|
|
4356
4357
|
'webmcp.status-types',
|
|
4357
|
-
'webmcp.success',
|
|
4358
4358
|
'webmcp.tool-details',
|
|
4359
4359
|
'webp-format-disabled',
|
|
4360
4360
|
'webp-format-disabled-true',
|
package/package.json
CHANGED
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"svgo": "3.3.2",
|
|
90
90
|
"terser": "5.44.1",
|
|
91
91
|
"ts-lit-plugin": "2.0.2",
|
|
92
|
-
"typescript": "
|
|
92
|
+
"typescript": "5.9.3",
|
|
93
93
|
"typescript-eslint": "8.58.0",
|
|
94
94
|
"uuid": "13.0.0",
|
|
95
95
|
"webidl2": "24.5.0",
|
|
@@ -104,5 +104,5 @@
|
|
|
104
104
|
"flat-cache": "6.1.12"
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
|
-
"version": "1.0.
|
|
107
|
+
"version": "1.0.1614363"
|
|
108
108
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|