chrome-devtools-frontend 1.0.1696961 → 1.0.1697595
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/.geminiignore +0 -1
- package/front_end/core/common/Color.ts +5 -2
- package/front_end/core/host/InspectorFrontendHostAPI.ts +16 -3
- package/front_end/core/host/InspectorFrontendHostStub.ts +3 -2
- package/front_end/core/host/ResourceLoader.ts +1 -2
- package/front_end/core/platform/api/HostRuntime.ts +1 -0
- package/front_end/core/platform/browser/HostRuntime.ts +4 -0
- package/front_end/core/platform/node/HostRuntime.ts +5 -0
- package/front_end/core/root/Runtime.ts +5 -0
- package/front_end/core/sdk/DOMModel.ts +13 -0
- package/front_end/core/sdk/SourceMapScopeChainEntry.ts +9 -6
- package/front_end/core/sdk/SourceMapScopesInfo.ts +3 -1
- package/front_end/foundation/Universe.ts +8 -0
- package/front_end/generated/InspectorBackendCommands.ts +3 -0
- package/front_end/generated/protocol-mapping.d.ts +19 -0
- package/front_end/generated/protocol-proxy-api.d.ts +15 -0
- package/front_end/generated/protocol.ts +35 -0
- package/front_end/models/ai_assistance/AiAgent2.ts +20 -18
- package/front_end/models/ai_assistance/AiConversation.ts +38 -12
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +9 -2
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +13 -4
- package/front_end/models/ai_assistance/tools/CookieUtils.ts +10 -8
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +1 -1
- package/front_end/models/ai_assistance/tools/GetElementAccessibilityDetails.ts +1 -3
- package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +9 -8
- package/front_end/models/ai_assistance/tools/GetSourceContent.ts +5 -6
- package/front_end/models/ai_assistance/tools/GetStorageValues.ts +6 -25
- package/front_end/models/ai_assistance/tools/GetStyles.ts +1 -3
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +7 -6
- package/front_end/models/ai_assistance/tools/ListPageOrigins.ts +8 -5
- package/front_end/models/ai_assistance/tools/ListSources.ts +8 -10
- package/front_end/models/ai_assistance/tools/ListStorageKeys.ts +6 -25
- package/front_end/models/ai_assistance/tools/README.md +5 -3
- package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +1 -2
- package/front_end/models/ai_assistance/tools/Tool.ts +52 -14
- package/front_end/models/change_tracker/ChangeTracker.ts +89 -0
- package/front_end/models/change_tracker/change_tracker.ts +9 -0
- package/front_end/models/issues_manager/MarkdownIssueDescription.ts +2 -2
- package/front_end/models/live-metrics/LiveMetrics.ts +1 -2
- package/front_end/models/trace/ModelImpl.ts +0 -6
- package/front_end/models/trace/Processor.ts +4 -7
- package/front_end/models/trace/helpers/Timing.ts +2 -1
- package/front_end/models/trace/types/Overlays.ts +12 -1
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +67 -19
- package/front_end/panels/application/IndexedDBViews.ts +1 -1
- package/front_end/panels/elements/DOMTreeContextMenu.ts +16 -23
- package/front_end/panels/elements/ElementsTreeElement.ts +286 -59
- package/front_end/panels/elements/ElementsTreeOutline.ts +273 -42
- package/front_end/panels/network/NetworkPanel.ts +137 -52
- package/front_end/panels/network/RequestHeadersView.ts +65 -32
- package/front_end/panels/network/components/RequestHeadersView.css +7 -1
- package/front_end/panels/network/forward/BackendLinking.ts +49 -0
- package/front_end/panels/network/forward/forward.ts +2 -0
- package/front_end/panels/settings/BackendLinkingSettingsTab.ts +303 -0
- package/front_end/panels/settings/backendLinkingSettingsTab.css +78 -0
- package/front_end/panels/settings/settings-meta.ts +25 -0
- package/front_end/panels/settings/settings.ts +2 -0
- package/front_end/panels/timeline/README.md +3 -2
- package/front_end/panels/timeline/TimelineFlameChartView.ts +23 -2
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +64 -4
- package/front_end/panels/timeline/timelineFlameChartView.css +47 -0
- package/front_end/panels/whats_new/ReleaseNoteText.ts +8 -8
- package/front_end/panels/whats_new/resources/WNDT.md +6 -6
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +6 -0
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +5 -8
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Coverage.d.ts +6 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Coverage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Coverage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.js +1 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ScreenRecording.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +6 -0
- package/front_end/third_party/puppeteer/package/package.json +2 -2
- package/front_end/third_party/puppeteer/package/src/cdp/Coverage.ts +6 -0
- package/front_end/third_party/puppeteer/package/src/cdp/ScreenRecording.ts +3 -7
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/web-vitals/README.chromium +2 -2
- package/front_end/third_party/web-vitals/package/dist/modules/attribution/onINP.js +8 -5
- package/front_end/third_party/web-vitals/package/package.json +1 -1
- package/front_end/third_party/web-vitals/package/src/attribution/onINP.ts +8 -4
- package/front_end/third_party/web-vitals/rebuild.sh +2 -2
- package/front_end/ui/legacy/ContextMenu.ts +19 -0
- package/front_end/ui/legacy/SoftContextMenu.ts +6 -0
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +62 -22
- package/front_end/ui/visual_logging/KnownContextValues.ts +4 -0
- package/package.json +5 -4
|
@@ -173,6 +173,7 @@ export class SoftContextMenu {
|
|
|
173
173
|
if (this.subMenu) {
|
|
174
174
|
this.subMenu.discard();
|
|
175
175
|
}
|
|
176
|
+
this.highlightMenuItem(null, false);
|
|
176
177
|
if (this.focusRestorer) {
|
|
177
178
|
this.focusRestorer.restore();
|
|
178
179
|
}
|
|
@@ -268,6 +269,7 @@ export class SoftContextMenu {
|
|
|
268
269
|
menuItemElement.addEventListener('mouseleave', (this.menuItemMouseLeave.bind(this) as EventListener), false);
|
|
269
270
|
|
|
270
271
|
detailsForElement.actionId = item.id;
|
|
272
|
+
detailsForElement.onHover = item.onHover;
|
|
271
273
|
|
|
272
274
|
let accessibleName: Platform.UIString.LocalizedString|string = item.label || '';
|
|
273
275
|
|
|
@@ -463,6 +465,7 @@ export class SoftContextMenu {
|
|
|
463
465
|
window.clearTimeout(detailsForElement.subMenuTimer);
|
|
464
466
|
delete detailsForElement.subMenuTimer;
|
|
465
467
|
}
|
|
468
|
+
detailsForElement?.onHover?.(false);
|
|
466
469
|
}
|
|
467
470
|
|
|
468
471
|
this.highlightedMenuItemElement = menuItemElement;
|
|
@@ -479,6 +482,7 @@ export class SoftContextMenu {
|
|
|
479
482
|
detailsForElement.subMenuTimer =
|
|
480
483
|
window.setTimeout(this.showSubMenu.bind(this, this.highlightedMenuItemElement), 150);
|
|
481
484
|
}
|
|
485
|
+
detailsForElement?.onHover?.(true);
|
|
482
486
|
}
|
|
483
487
|
|
|
484
488
|
if (this.contextMenuElement) {
|
|
@@ -628,6 +632,7 @@ export interface SoftContextMenuDescriptor {
|
|
|
628
632
|
jslogContext?: string;
|
|
629
633
|
/** A no-op. For native context menus, feature name will request showing a new badge. */
|
|
630
634
|
featureName?: string;
|
|
635
|
+
onHover?: (hovered: boolean) => void;
|
|
631
636
|
}
|
|
632
637
|
interface ElementMenuDetails {
|
|
633
638
|
customElement?: HTMLElement;
|
|
@@ -635,4 +640,5 @@ interface ElementMenuDetails {
|
|
|
635
640
|
subMenuTimer?: number;
|
|
636
641
|
subItems?: SoftContextMenuDescriptor[];
|
|
637
642
|
actionId?: number;
|
|
643
|
+
onHover?: (hovered: boolean) => void;
|
|
638
644
|
}
|
|
@@ -3914,21 +3914,17 @@ export class FlameChart extends FlameChartBase implements NetworkTimeCalculator.
|
|
|
3914
3914
|
}
|
|
3915
3915
|
|
|
3916
3916
|
/**
|
|
3917
|
-
*
|
|
3918
|
-
*
|
|
3917
|
+
* Retrieves the bounding box coordinates and dimensions of an entry relative to the flame chart viewport canvas.
|
|
3918
|
+
* Coordinates account for horizontal time-to-pixel mapping and vertical scroll offset.
|
|
3919
|
+
* Returns null if entryIndex is invalid or if the entry lies entirely outside the visible viewport bounds.
|
|
3919
3920
|
*/
|
|
3920
|
-
|
|
3921
|
-
if (
|
|
3922
|
-
return;
|
|
3923
|
-
}
|
|
3924
|
-
const elementMinWidthPx = 2;
|
|
3925
|
-
element.classList.add('hidden');
|
|
3926
|
-
if (entryIndex === -1) {
|
|
3927
|
-
return;
|
|
3921
|
+
getEntryDimensions(entryIndex: number): EntryDimensions|null {
|
|
3922
|
+
if (entryIndex < 0) {
|
|
3923
|
+
return null;
|
|
3928
3924
|
}
|
|
3929
3925
|
const timelineData = this.timelineData();
|
|
3930
|
-
if (!timelineData) {
|
|
3931
|
-
return;
|
|
3926
|
+
if (!timelineData || entryIndex >= timelineData.entryStartTimes.length) {
|
|
3927
|
+
return null;
|
|
3932
3928
|
}
|
|
3933
3929
|
|
|
3934
3930
|
const startTime = timelineData.entryStartTimes[entryIndex];
|
|
@@ -3955,30 +3951,61 @@ export class FlameChart extends FlameChartBase implements NetworkTimeCalculator.
|
|
|
3955
3951
|
barWidth = duration * this.chartViewport.timeToPixel();
|
|
3956
3952
|
}
|
|
3957
3953
|
if (barX + barWidth <= 0 || barX >= this.offsetWidth) {
|
|
3958
|
-
return;
|
|
3954
|
+
return null;
|
|
3959
3955
|
}
|
|
3956
|
+
const elementMinWidthPx = 2;
|
|
3960
3957
|
const barCenter = barX + barWidth / 2;
|
|
3961
3958
|
barWidth = Math.max(barWidth, elementMinWidthPx);
|
|
3962
3959
|
barX = barCenter - barWidth / 2;
|
|
3963
3960
|
const entryLevel = timelineData.entryLevels[entryIndex];
|
|
3964
3961
|
const barY = this.levelToOffset(entryLevel) - this.chartViewport.scrollOffset();
|
|
3965
3962
|
const barHeight = this.levelHeight(entryLevel);
|
|
3963
|
+
if (this.offsetHeight && (barY + barHeight <= 0 || barY >= this.offsetHeight)) {
|
|
3964
|
+
return null;
|
|
3965
|
+
}
|
|
3966
|
+
|
|
3967
|
+
return {
|
|
3968
|
+
x: barX,
|
|
3969
|
+
y: barY,
|
|
3970
|
+
width: barWidth,
|
|
3971
|
+
height: barHeight - 1,
|
|
3972
|
+
visible,
|
|
3973
|
+
};
|
|
3974
|
+
}
|
|
3975
|
+
|
|
3976
|
+
/**
|
|
3977
|
+
* Update position of an Element. By default, the element is treated as a full entry and it's dimensions are set to the full entry width/length/height.
|
|
3978
|
+
* If isDecoration parameter is set to true, the element will be positioned on the right side of the entry and have a square shape where width == height of the entry.
|
|
3979
|
+
*/
|
|
3980
|
+
private updateElementPosition(element: HTMLElement|null, entryIndex: number, isDecoration?: boolean): void {
|
|
3981
|
+
if (!element) {
|
|
3982
|
+
return;
|
|
3983
|
+
}
|
|
3984
|
+
element.classList.add('hidden');
|
|
3985
|
+
if (entryIndex === -1) {
|
|
3986
|
+
return;
|
|
3987
|
+
}
|
|
3988
|
+
const dimensions = this.getEntryDimensions(entryIndex);
|
|
3989
|
+
if (!dimensions) {
|
|
3990
|
+
return;
|
|
3991
|
+
}
|
|
3992
|
+
|
|
3966
3993
|
const style = element.style;
|
|
3994
|
+
style.top = dimensions.y + 'px';
|
|
3995
|
+
const entryHeight = dimensions.height + 1;
|
|
3967
3996
|
|
|
3968
3997
|
// TODO(paulirish): make these changes within a RenderCoordinator.write callback.
|
|
3969
3998
|
// Currently these (plus the scrollOffset() right above) trigger layout thrashing.
|
|
3970
3999
|
if (isDecoration) {
|
|
3971
|
-
style.
|
|
3972
|
-
style.
|
|
3973
|
-
style.
|
|
3974
|
-
style.left = barX + barWidth - barHeight + 'px';
|
|
4000
|
+
style.width = entryHeight + 'px';
|
|
4001
|
+
style.height = entryHeight + 'px';
|
|
4002
|
+
style.left = dimensions.x + dimensions.width - entryHeight + 'px';
|
|
3975
4003
|
} else {
|
|
3976
|
-
style.
|
|
3977
|
-
style.
|
|
3978
|
-
style.
|
|
3979
|
-
style.left = barX + 'px';
|
|
4004
|
+
style.width = dimensions.width + 'px';
|
|
4005
|
+
style.height = dimensions.height + 'px';
|
|
4006
|
+
style.left = dimensions.x + 'px';
|
|
3980
4007
|
}
|
|
3981
|
-
element.classList.toggle('hidden', !visible);
|
|
4008
|
+
element.classList.toggle('hidden', !dimensions.visible);
|
|
3982
4009
|
this.viewportElement.appendChild(element);
|
|
3983
4010
|
}
|
|
3984
4011
|
|
|
@@ -4435,6 +4462,19 @@ export const enum Events {
|
|
|
4435
4462
|
MOUSE_MOVE = 'MouseMove',
|
|
4436
4463
|
}
|
|
4437
4464
|
|
|
4465
|
+
export interface EntryDimensions {
|
|
4466
|
+
/** X coordinate in pixels relative to the flame chart viewport canvas. */
|
|
4467
|
+
x: number;
|
|
4468
|
+
/** Y coordinate in pixels relative to the flame chart viewport canvas, adjusted for vertical scroll. */
|
|
4469
|
+
y: number;
|
|
4470
|
+
/** Rendered width in pixels (minimum 2px). */
|
|
4471
|
+
width: number;
|
|
4472
|
+
/** Rendered height in pixels excluding the 1px inter-level border gap. */
|
|
4473
|
+
height: number;
|
|
4474
|
+
/** Indicates whether the entry is currently visible within the timeline data. */
|
|
4475
|
+
visible: boolean;
|
|
4476
|
+
}
|
|
4477
|
+
|
|
4438
4478
|
export interface EventTypes {
|
|
4439
4479
|
[Events.ENTRY_LABEL_ANNOTATION_ADDED]: {
|
|
4440
4480
|
entryIndex: number,
|
|
@@ -590,6 +590,7 @@ export const knownContextValues: Set<string> = new Set([
|
|
|
590
590
|
'back-forward-cache',
|
|
591
591
|
'back-forward-cache.run-test',
|
|
592
592
|
'backdrop-filter',
|
|
593
|
+
'backend-linking',
|
|
593
594
|
'backface-visibility',
|
|
594
595
|
'background /* color: red */',
|
|
595
596
|
'background',
|
|
@@ -2106,6 +2107,7 @@ export const knownContextValues: Set<string> = new Set([
|
|
|
2106
2107
|
'image-view.open-in-new-tab',
|
|
2107
2108
|
'image-view.save-image',
|
|
2108
2109
|
'impact',
|
|
2110
|
+
'implicit-anchor-candidate',
|
|
2109
2111
|
'import-har',
|
|
2110
2112
|
'import-recording',
|
|
2111
2113
|
'important',
|
|
@@ -3040,6 +3042,7 @@ export const knownContextValues: Set<string> = new Set([
|
|
|
3040
3042
|
'opacity',
|
|
3041
3043
|
'open',
|
|
3042
3044
|
'open-ai-settings',
|
|
3045
|
+
'open-backend-link',
|
|
3043
3046
|
'open-elements-panel',
|
|
3044
3047
|
'open-folder',
|
|
3045
3048
|
'open-in-animations-panel',
|
|
@@ -4384,6 +4387,7 @@ export const knownContextValues: Set<string> = new Set([
|
|
|
4384
4387
|
'timeline.network-request-details',
|
|
4385
4388
|
'timeline.next-recording',
|
|
4386
4389
|
'timeline.overlays.candy-striped-time-range',
|
|
4390
|
+
'timeline.overlays.comment-pin',
|
|
4387
4391
|
'timeline.overlays.cursor-timestamp-marker',
|
|
4388
4392
|
'timeline.overlays.entries-link',
|
|
4389
4393
|
'timeline.overlays.entry-label',
|
package/package.json
CHANGED
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"test": "vpython3 third_party/node/node.py --output scripts/run_on_target.mjs gen/test/run.js",
|
|
34
34
|
"test-health": "node scripts/test_health.ts"
|
|
35
35
|
},
|
|
36
|
+
"type": "module",
|
|
36
37
|
"devDependencies": {
|
|
37
38
|
"@stylistic/eslint-plugin": "5.10.0",
|
|
38
39
|
"@types/chai": "5.2.3",
|
|
@@ -63,7 +64,7 @@
|
|
|
63
64
|
"eslint-plugin-mocha": "10.5.0",
|
|
64
65
|
"globals": "17.7.0",
|
|
65
66
|
"js-rouge": "3.2.0",
|
|
66
|
-
"js-yaml": "4.
|
|
67
|
+
"js-yaml": "5.4.1",
|
|
67
68
|
"karma": "6.4.4",
|
|
68
69
|
"karma-chrome-launcher": "3.2.0",
|
|
69
70
|
"karma-coverage": "2.2.1",
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
"karma-spec-reporter": "0.0.36",
|
|
73
74
|
"license-checker": "25.0.1",
|
|
74
75
|
"lit-analyzer": "2.0.3",
|
|
75
|
-
"mocha": "
|
|
76
|
+
"mocha": "12.0.0",
|
|
76
77
|
"ora": "9.0.0",
|
|
77
78
|
"postcss": "8.5.25",
|
|
78
79
|
"puppeteer-core": "25.3.0",
|
|
@@ -86,8 +87,8 @@
|
|
|
86
87
|
"typescript-eslint": "8.64.0",
|
|
87
88
|
"uuid": "14.0.0",
|
|
88
89
|
"webidl2": "24.5.0",
|
|
89
|
-
"yargs": "
|
|
90
|
+
"yargs": "18.1.0",
|
|
90
91
|
"yargs-unparser": "2.0.0"
|
|
91
92
|
},
|
|
92
|
-
"version": "1.0.
|
|
93
|
+
"version": "1.0.1697595"
|
|
93
94
|
}
|