chrome-devtools-frontend 1.0.1613625 → 1.0.1615539
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/docs/contributing/infrastructure.md +0 -1
- 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/floaty.css +3 -0
- 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 +6 -4
- package/front_end/generated/protocol-mapping.d.ts +14 -0
- package/front_end/generated/protocol-proxy-api.d.ts +10 -0
- package/front_end/generated/protocol.ts +33 -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.snapshot.txt +4 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +200 -46
- package/front_end/models/issues_manager/IssuesManager.ts +4 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +673 -639
- package/front_end/models/stack_trace/DetailedErrorStackParser.ts +161 -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/StackTraceModel.ts +39 -0
- 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/AccessibilityAgentMarkdownRenderer.ts +55 -14
- 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 +270 -18
- package/front_end/panels/application/components/ProtocolHandlersView.ts +2 -2
- package/front_end/panels/application/webMCPView.css +4 -1
- package/front_end/panels/common/AiCodeCompletionDisclaimer.ts +7 -0
- package/front_end/panels/console/ConsoleContextSelector.ts +1 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +8 -2
- package/front_end/panels/console/consoleView.css +4 -0
- 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/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/legacy/EmptyWidget.ts +2 -2
- 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/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 +3 -1
- package/package.json +1 -1
- /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
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
},
|
|
5
5
|
"files": [
|
|
6
6
|
"package/addon/runmode/runmode-standalone.mjs",
|
|
7
|
-
"package/addon/runmode/runmode-standalone.
|
|
7
|
+
"package/addon/runmode/runmode-standalone.d.mts",
|
|
8
8
|
"package/mode/css/css.mjs",
|
|
9
|
-
"package/mode/css/css.
|
|
9
|
+
"package/mode/css/css.d.mts",
|
|
10
10
|
"package/mode/javascript/javascript.mjs",
|
|
11
|
-
"package/mode/javascript/javascript.
|
|
11
|
+
"package/mode/javascript/javascript.d.mts",
|
|
12
12
|
"package/mode/xml/xml.mjs",
|
|
13
|
-
"package/mode/xml/xml.
|
|
13
|
+
"package/mode/xml/xml.d.mts"
|
|
14
14
|
]
|
|
15
15
|
}
|
package/front_end/tsconfig.json
CHANGED
|
@@ -49,7 +49,7 @@ const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
49
49
|
${input.link ? html`<devtools-link href=${input.link} jslogContext=${'learn-more'}>${i18nString(UIStrings.learnMore)}</devtools-link>` : ''}
|
|
50
50
|
</div>
|
|
51
51
|
${input.extraElements}
|
|
52
|
-
</div>`, target);
|
|
52
|
+
</div>`, target, {container: {classes: ['empty-view-scroller']}});
|
|
53
53
|
// clang-format on
|
|
54
54
|
};
|
|
55
55
|
|
|
@@ -66,7 +66,7 @@ export class EmptyWidget extends VBox {
|
|
|
66
66
|
if (!element && headerOrElement instanceof HTMLElement) {
|
|
67
67
|
element = headerOrElement;
|
|
68
68
|
}
|
|
69
|
-
super(element
|
|
69
|
+
super(element);
|
|
70
70
|
this.#header = header;
|
|
71
71
|
this.#text = text;
|
|
72
72
|
this.#link = undefined;
|
|
@@ -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));
|
|
@@ -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,14 @@ export const knownContextValues = new Set([
|
|
|
4349
4349
|
'webgl-warning-fired',
|
|
4350
4350
|
'webmcp.call-inputs',
|
|
4351
4351
|
'webmcp.call-outputs',
|
|
4352
|
+
'webmcp.completed',
|
|
4353
|
+
'webmcp.copy-tool-description',
|
|
4354
|
+
'webmcp.copy-tool-name',
|
|
4352
4355
|
'webmcp.declarative',
|
|
4353
4356
|
'webmcp.error',
|
|
4354
4357
|
'webmcp.imperative',
|
|
4355
4358
|
'webmcp.pending',
|
|
4356
4359
|
'webmcp.status-types',
|
|
4357
|
-
'webmcp.success',
|
|
4358
4360
|
'webmcp.tool-details',
|
|
4359
4361
|
'webp-format-disabled',
|
|
4360
4362
|
'webp-format-disabled-true',
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|