chrome-devtools-frontend 1.0.1553956 → 1.0.1555430
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/front_end/Images/src/spark.svg +10 -0
- package/front_end/core/protocol_client/InspectorBackend.ts +1 -1
- package/front_end/core/root/Runtime.ts +0 -4
- package/front_end/core/sdk/DOMModel.ts +101 -7
- package/front_end/core/sdk/ResourceTreeModel.ts +0 -1
- package/front_end/generated/SupportedCSSProperties.js +18 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +1 -1
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +1 -1
- package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +1 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +1 -1
- package/front_end/{ui/components → models}/annotations/AnnotationRepository.ts +3 -3
- package/front_end/models/annotations/README.md +7 -0
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +8 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +15 -23
- package/front_end/models/stack_trace/StackTrace.ts +13 -2
- package/front_end/models/stack_trace/StackTraceImpl.ts +81 -6
- package/front_end/models/stack_trace/StackTraceModel.ts +35 -3
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +45 -4
- package/front_end/panels/ai_assistance/components/ArtifactsViewer.ts +57 -0
- package/front_end/panels/ai_assistance/components/ChatView.ts +1 -0
- package/front_end/panels/ai_assistance/components/artifactsViewer.css +10 -0
- package/front_end/panels/application/BounceTrackingMitigationsTreeElement.ts +2 -6
- package/front_end/panels/application/components/BounceTrackingMitigationsView.ts +133 -118
- package/front_end/panels/application/preloading/PreloadingView.ts +12 -6
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +230 -237
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +96 -79
- package/front_end/panels/application/preloading/components/preloadingGrid.css +26 -29
- package/front_end/panels/application/preloading/preloadingView.css +6 -0
- package/front_end/panels/common/Annotation.ts +1 -1
- package/front_end/panels/common/AnnotationManager.ts +1 -1
- package/front_end/panels/common/ExtensionView.ts +1 -0
- package/front_end/panels/console/ConsoleContextSelector.ts +74 -9
- package/front_end/panels/console/consoleContextSelector.css +31 -29
- package/front_end/panels/coverage/coverageListView.css +59 -57
- package/front_end/panels/elements/ElementsPanel.ts +1 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +39 -1
- package/front_end/panels/elements/ElementsTreeOutline.ts +23 -21
- package/front_end/panels/elements/TopLayerContainer.ts +26 -91
- package/front_end/panels/explain/components/ConsoleInsight.ts +3 -3
- package/front_end/panels/network/NetworkItemView.ts +1 -1
- package/front_end/panels/network/NetworkLogView.ts +1 -1
- package/front_end/panels/network/NetworkPanel.ts +1 -1
- package/front_end/panels/recorder/RecorderController.ts +0 -1
- package/front_end/panels/security/CookieControlsView.ts +21 -10
- package/front_end/panels/security/SecurityPanelSidebar.ts +5 -0
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +0 -1
- package/front_end/panels/timeline/TimelineUIUtils.ts +5 -8
- package/front_end/panels/timeline/components/Sidebar.ts +16 -7
- package/front_end/panels/timeline/components/SidebarInsightsTab.ts +169 -129
- package/front_end/panels/timeline/components/TimelineSummary.ts +75 -54
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +16 -25
- package/front_end/panels/timeline/components/insights/Cache.ts +12 -8
- package/front_end/panels/timeline/components/insights/Checklist.ts +53 -43
- package/front_end/panels/timeline/components/insights/DOMSize.ts +25 -21
- package/front_end/panels/timeline/components/insights/DocumentLatency.ts +6 -3
- package/front_end/panels/timeline/components/insights/DuplicatedJavaScript.ts +7 -7
- package/front_end/panels/timeline/components/insights/FontDisplay.ts +7 -5
- package/front_end/panels/timeline/components/insights/ForcedReflow.ts +11 -9
- package/front_end/panels/timeline/components/insights/INPBreakdown.ts +7 -6
- package/front_end/panels/timeline/components/insights/ImageDelivery.ts +7 -5
- package/front_end/panels/timeline/components/insights/InsightRenderer.ts +20 -18
- package/front_end/panels/timeline/components/insights/LCPBreakdown.ts +12 -12
- package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +7 -3
- package/front_end/panels/timeline/components/insights/LegacyJavaScript.ts +7 -7
- package/front_end/panels/timeline/components/insights/ModernHTTP.ts +7 -5
- package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +15 -13
- package/front_end/panels/timeline/components/insights/RenderBlocking.ts +2 -2
- package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +15 -14
- package/front_end/panels/timeline/components/insights/Table.ts +152 -130
- package/front_end/panels/timeline/components/insights/ThirdParties.ts +11 -9
- package/front_end/panels/timeline/components/sidebarInsightsTab.css +50 -48
- package/front_end/panels/timeline/components/timelineSummary.css +58 -57
- package/front_end/panels/timeline/thirdPartyTreeView.css +109 -0
- package/front_end/panels/timeline/timelineDetailsView.css +2 -4
- package/front_end/panels/timeline/timelinePanel.css +0 -110
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/settings/SettingCheckbox.ts +4 -6
- package/front_end/ui/legacy/TabbedPane.ts +20 -13
- package/front_end/ui/legacy/ViewManager.ts +2 -32
- package/front_end/ui/legacy/Widget.ts +1 -3
- package/front_end/ui/legacy/tabbedPane.css +4 -7
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +1 -1
- /package/front_end/{ui/components → models}/annotations/AnnotationType.ts +0 -0
- /package/front_end/{ui/components → models}/annotations/annotations.ts +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svg width="14" height="16" viewBox="0 0 14 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_1320_25512)">
|
|
3
|
+
<path d="M7 12.6319C6.94299 12.6319 6.89549 12.6129 6.85749 12.5749C6.81948 12.5369 6.79098 12.4894 6.77198 12.4324C6.61997 11.8338 6.38245 11.259 6.05942 10.708C5.74589 10.1474 5.37536 9.64862 4.94782 9.21158C4.51078 8.77454 4.01199 8.39926 3.45144 8.08573C2.90039 7.7722 2.32559 7.53943 1.72704 7.38742C1.67003 7.36842 1.62253 7.33992 1.58452 7.30191C1.54652 7.26391 1.52752 7.2164 1.52752 7.1594C1.52752 7.10239 1.54652 7.05489 1.58452 7.01689C1.62253 6.97888 1.67003 6.95038 1.72704 6.93138C2.32559 6.77937 2.90039 6.5466 3.45144 6.23307C4.00249 5.91954 4.50128 5.54426 4.94782 5.10722C5.38486 4.67968 5.76014 4.18564 6.07367 3.62509C6.3872 3.06454 6.61997 2.48499 6.77198 1.88644C6.79098 1.82943 6.81948 1.78193 6.85749 1.74392C6.89549 1.70592 6.94299 1.68692 7 1.68692C7.057 1.68692 7.10451 1.70592 7.14251 1.74392C7.18052 1.78193 7.20902 1.82943 7.22802 1.88644C7.38003 2.48499 7.6128 3.06454 7.92633 3.62509C8.23986 4.17614 8.61514 4.67018 9.05218 5.10722C9.48922 5.54426 9.98326 5.91954 10.5343 6.23307C11.0949 6.5466 11.6744 6.77937 12.273 6.93138C12.33 6.95038 12.3775 6.97888 12.4155 7.01689C12.4535 7.05489 12.4725 7.10239 12.4725 7.1594C12.4725 7.2164 12.4535 7.26391 12.4155 7.30191C12.3775 7.33992 12.33 7.36842 12.273 7.38742C11.6744 7.53943 11.0949 7.7722 10.5343 8.08573C9.97376 8.39926 9.47972 8.77454 9.05218 9.21158C8.61514 9.65812 8.23986 10.1569 7.92633 10.708C7.6128 11.259 7.38003 11.8338 7.22802 12.4324C7.20902 12.4894 7.18052 12.5369 7.14251 12.5749C7.10451 12.6129 7.057 12.6319 7 12.6319Z" fill="#0B57D0"/>
|
|
4
|
+
</g>
|
|
5
|
+
<defs>
|
|
6
|
+
<clipPath id="clip0_1320_25512">
|
|
7
|
+
<rect width="14" height="15.1442" fill="white"/>
|
|
8
|
+
</clipPath>
|
|
9
|
+
</defs>
|
|
10
|
+
</svg>
|
|
@@ -389,7 +389,6 @@ export interface HostConfigFreestyler {
|
|
|
389
389
|
multimodal?: boolean;
|
|
390
390
|
multimodalUploadInput?: boolean;
|
|
391
391
|
functionCalling?: boolean;
|
|
392
|
-
featureName?: string;
|
|
393
392
|
}
|
|
394
393
|
|
|
395
394
|
export interface HostConfigAiAssistanceNetworkAgent {
|
|
@@ -397,7 +396,6 @@ export interface HostConfigAiAssistanceNetworkAgent {
|
|
|
397
396
|
temperature: number;
|
|
398
397
|
enabled: boolean;
|
|
399
398
|
userTier: string;
|
|
400
|
-
featureName?: string;
|
|
401
399
|
}
|
|
402
400
|
|
|
403
401
|
export interface HostConfigAiAssistancePerformanceAgent {
|
|
@@ -405,7 +403,6 @@ export interface HostConfigAiAssistancePerformanceAgent {
|
|
|
405
403
|
temperature: number;
|
|
406
404
|
enabled: boolean;
|
|
407
405
|
userTier: string;
|
|
408
|
-
featureName?: string;
|
|
409
406
|
}
|
|
410
407
|
|
|
411
408
|
export interface HostConfigAiAssistanceFileAgent {
|
|
@@ -413,7 +410,6 @@ export interface HostConfigAiAssistanceFileAgent {
|
|
|
413
410
|
temperature: number;
|
|
414
411
|
enabled: boolean;
|
|
415
412
|
userTier: string;
|
|
416
|
-
featureName?: string;
|
|
417
413
|
}
|
|
418
414
|
|
|
419
415
|
export interface HostConfigAiCodeCompletion {
|
|
@@ -108,7 +108,15 @@ export const ARIA_ATTRIBUTES = new Set<string>([
|
|
|
108
108
|
'aria-valuetext',
|
|
109
109
|
]);
|
|
110
110
|
|
|
111
|
-
export
|
|
111
|
+
export enum DOMNodeEvents {
|
|
112
|
+
TOP_LAYER_INDEX_CHANGED = 'TopLayerIndexChanged',
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface DOMNodeEventTypes {
|
|
116
|
+
[DOMNodeEvents.TOP_LAYER_INDEX_CHANGED]: void;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export class DOMNode extends Common.ObjectWrapper.ObjectWrapper<DOMNodeEventTypes> {
|
|
112
120
|
#domModel: DOMModel;
|
|
113
121
|
#agent: ProtocolProxyApi.DOMApi;
|
|
114
122
|
ownerDocument!: DOMDocument|null;
|
|
@@ -162,8 +170,14 @@ export class DOMNode {
|
|
|
162
170
|
detached = false;
|
|
163
171
|
#retainedNodes?: Set<Protocol.DOM.BackendNodeId>;
|
|
164
172
|
#adoptedStyleSheets: AdoptedStyleSheet[] = [];
|
|
173
|
+
/**
|
|
174
|
+
* 1-based index of the node in the top layer. Only set
|
|
175
|
+
* for non-backdrop nodes.
|
|
176
|
+
*/
|
|
177
|
+
#topLayerIndex = -1;
|
|
165
178
|
|
|
166
179
|
constructor(domModel: DOMModel) {
|
|
180
|
+
super();
|
|
167
181
|
this.#domModel = domModel;
|
|
168
182
|
this.#agent = this.#domModel.getAgent();
|
|
169
183
|
}
|
|
@@ -285,6 +299,18 @@ export class DOMNode {
|
|
|
285
299
|
return await (childModel?.requestDocument() || null);
|
|
286
300
|
}
|
|
287
301
|
|
|
302
|
+
setTopLayerIndex(idx: number): void {
|
|
303
|
+
const oldIndex = this.#topLayerIndex;
|
|
304
|
+
this.#topLayerIndex = idx;
|
|
305
|
+
if (oldIndex !== idx) {
|
|
306
|
+
this.dispatchEventToListeners(DOMNodeEvents.TOP_LAYER_INDEX_CHANGED);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
topLayerIndex(): number {
|
|
311
|
+
return this.#topLayerIndex;
|
|
312
|
+
}
|
|
313
|
+
|
|
288
314
|
isAdFrameNode(): boolean {
|
|
289
315
|
if (this.isIframe() && this.#frameOwnerFrameId) {
|
|
290
316
|
const frame = FrameManager.instance().getFrame(this.#frameOwnerFrameId);
|
|
@@ -1203,10 +1229,16 @@ export class DOMNodeShortcut {
|
|
|
1203
1229
|
nodeType: number;
|
|
1204
1230
|
nodeName: string;
|
|
1205
1231
|
deferredNode: DeferredDOMNode;
|
|
1206
|
-
|
|
1232
|
+
// Shortctus to elements that children of the element this shortcut is for.
|
|
1233
|
+
// Currently, use for backdrop elements in the top layer.«
|
|
1234
|
+
childShortcuts: DOMNodeShortcut[] = [];
|
|
1235
|
+
constructor(
|
|
1236
|
+
target: Target, backendNodeId: Protocol.DOM.BackendNodeId, nodeType: number, nodeName: string,
|
|
1237
|
+
childShortcuts: DOMNodeShortcut[] = []) {
|
|
1207
1238
|
this.nodeType = nodeType;
|
|
1208
1239
|
this.nodeName = nodeName;
|
|
1209
1240
|
this.deferredNode = new DeferredDOMNode(target, backendNodeId);
|
|
1241
|
+
this.childShortcuts = childShortcuts;
|
|
1210
1242
|
}
|
|
1211
1243
|
}
|
|
1212
1244
|
|
|
@@ -1241,6 +1273,9 @@ export class DOMModel extends SDKModel<EventTypes> {
|
|
|
1241
1273
|
#frameOwnerNode?: DOMNode|null;
|
|
1242
1274
|
#loadNodeAttributesTimeout?: number;
|
|
1243
1275
|
#searchId?: string;
|
|
1276
|
+
#topLayerThrottler = new Common.Throttler.Throttler(100);
|
|
1277
|
+
#topLayerNodes: DOMNode[] = [];
|
|
1278
|
+
|
|
1244
1279
|
constructor(target: Target) {
|
|
1245
1280
|
super(target);
|
|
1246
1281
|
|
|
@@ -1621,10 +1656,6 @@ export class DOMModel extends SDKModel<EventTypes> {
|
|
|
1621
1656
|
this.dispatchEventToListeners(Events.AffectedByStartingStylesFlagUpdated, {node});
|
|
1622
1657
|
}
|
|
1623
1658
|
|
|
1624
|
-
topLayerElementsUpdated(): void {
|
|
1625
|
-
this.dispatchEventToListeners(Events.TopLayerElementsChanged);
|
|
1626
|
-
}
|
|
1627
|
-
|
|
1628
1659
|
pseudoElementRemoved(parentId: Protocol.DOM.NodeId, pseudoElementId: Protocol.DOM.NodeId): void {
|
|
1629
1660
|
const parent = this.idToDOMNode.get(parentId);
|
|
1630
1661
|
if (!parent) {
|
|
@@ -1730,6 +1761,69 @@ export class DOMModel extends SDKModel<EventTypes> {
|
|
|
1730
1761
|
return this.agent.invoke_getTopLayerElements().then(({nodeIds}) => nodeIds);
|
|
1731
1762
|
}
|
|
1732
1763
|
|
|
1764
|
+
topLayerElementsUpdated(): void {
|
|
1765
|
+
void this.#topLayerThrottler.schedule(async () => {
|
|
1766
|
+
// This returns top layer nodes for all local frames.
|
|
1767
|
+
const result = await this.agent.invoke_getTopLayerElements();
|
|
1768
|
+
if (result.getError()) {
|
|
1769
|
+
return;
|
|
1770
|
+
}
|
|
1771
|
+
// Re-set indexes as we re-create top layer nodes list.
|
|
1772
|
+
const previousDocs = new Set<DOMDocument>();
|
|
1773
|
+
for (const node of this.#topLayerNodes) {
|
|
1774
|
+
node.setTopLayerIndex(-1);
|
|
1775
|
+
if (node.ownerDocument) {
|
|
1776
|
+
previousDocs.add(node.ownerDocument);
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
this.#topLayerNodes.splice(0);
|
|
1780
|
+
const nodes: DOMNode[] =
|
|
1781
|
+
result.nodeIds.map(id => this.idToDOMNode.get(id)).filter((node): node is DOMNode => Boolean(node));
|
|
1782
|
+
const nodesByDocument = new Map<DOMDocument, DOMNode[]>();
|
|
1783
|
+
for (const node of nodes) {
|
|
1784
|
+
const document = node.ownerDocument;
|
|
1785
|
+
if (!document) {
|
|
1786
|
+
continue;
|
|
1787
|
+
}
|
|
1788
|
+
if (!nodesByDocument.has(document)) {
|
|
1789
|
+
nodesByDocument.set(document, []);
|
|
1790
|
+
}
|
|
1791
|
+
nodesByDocument.get(document)?.push(node);
|
|
1792
|
+
}
|
|
1793
|
+
for (const [document, nodes] of nodesByDocument) {
|
|
1794
|
+
let topLayerIdx = 1;
|
|
1795
|
+
const documentShortcuts = [];
|
|
1796
|
+
for (const [idx, node] of nodes.entries()) {
|
|
1797
|
+
if (node.nodeName() === '::backdrop') {
|
|
1798
|
+
continue;
|
|
1799
|
+
}
|
|
1800
|
+
const childShortcuts = [];
|
|
1801
|
+
const previousNode = result.nodeIds[idx - 1] ? this.idToDOMNode.get(result.nodeIds[idx - 1]) : null;
|
|
1802
|
+
if (previousNode && previousNode.nodeName() === '::backdrop') {
|
|
1803
|
+
childShortcuts.push(
|
|
1804
|
+
new DOMNodeShortcut(this.target(), previousNode.backendNodeId(), 0, previousNode.nodeName()));
|
|
1805
|
+
}
|
|
1806
|
+
const shortcut = new DOMNodeShortcut(this.target(), node.backendNodeId(), 0, node.nodeName(), childShortcuts);
|
|
1807
|
+
node.setTopLayerIndex(topLayerIdx++);
|
|
1808
|
+
this.#topLayerNodes.push(node);
|
|
1809
|
+
documentShortcuts.push(shortcut);
|
|
1810
|
+
previousDocs.delete(document);
|
|
1811
|
+
}
|
|
1812
|
+
this.dispatchEventToListeners(Events.TopLayerElementsChanged, {
|
|
1813
|
+
document,
|
|
1814
|
+
documentShortcuts,
|
|
1815
|
+
});
|
|
1816
|
+
}
|
|
1817
|
+
// Emit empty events for documents that are no longer in the top layer.
|
|
1818
|
+
for (const document of previousDocs) {
|
|
1819
|
+
this.dispatchEventToListeners(Events.TopLayerElementsChanged, {
|
|
1820
|
+
document,
|
|
1821
|
+
documentShortcuts: [],
|
|
1822
|
+
});
|
|
1823
|
+
}
|
|
1824
|
+
});
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1733
1827
|
getDetachedDOMNodes(): Promise<Protocol.DOM.DetachedElementInfo[]|null> {
|
|
1734
1828
|
return this.agent.invoke_getDetachedDomNodes().then(({detachedNodes}) => detachedNodes);
|
|
1735
1829
|
}
|
|
@@ -1823,7 +1917,7 @@ export interface EventTypes {
|
|
|
1823
1917
|
[Events.ChildNodeCountUpdated]: DOMNode;
|
|
1824
1918
|
[Events.DistributedNodesChanged]: DOMNode;
|
|
1825
1919
|
[Events.MarkersChanged]: DOMNode;
|
|
1826
|
-
[Events.TopLayerElementsChanged]:
|
|
1920
|
+
[Events.TopLayerElementsChanged]: {document: DOMDocument, documentShortcuts: DOMNodeShortcut[]};
|
|
1827
1921
|
[Events.ScrollableFlagUpdated]: {node: DOMNode};
|
|
1828
1922
|
[Events.AffectedByStartingStylesFlagUpdated]: {node: DOMNode};
|
|
1829
1923
|
[Events.AdoptedStyleSheetsModified]: DOMNode;
|
|
@@ -105,7 +105,6 @@ export class ResourceTreeModel extends SDKModel<EventTypes> {
|
|
|
105
105
|
return null;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
// TODO(crbug.com/445966299): Refactor to use `storageAgent().invoke_getStorageKey()` instead.
|
|
109
108
|
const response = await this.storageAgent.invoke_getStorageKey({frameId});
|
|
110
109
|
if (response.getError() === 'Frame tree node for given frame not found') {
|
|
111
110
|
return null;
|
|
@@ -757,6 +757,7 @@ export const generatedProperties = [
|
|
|
757
757
|
"transition-property",
|
|
758
758
|
"transition-timing-function",
|
|
759
759
|
"translate",
|
|
760
|
+
"trigger-scope",
|
|
760
761
|
"types",
|
|
761
762
|
"unicode-range",
|
|
762
763
|
"user-select",
|
|
@@ -1712,6 +1713,7 @@ export const generatedProperties = [
|
|
|
1712
1713
|
"inherited": false,
|
|
1713
1714
|
"keywords": [
|
|
1714
1715
|
"none",
|
|
1716
|
+
"auto",
|
|
1715
1717
|
"spanning-item",
|
|
1716
1718
|
"intersection"
|
|
1717
1719
|
],
|
|
@@ -3722,6 +3724,7 @@ export const generatedProperties = [
|
|
|
3722
3724
|
"inherited": false,
|
|
3723
3725
|
"keywords": [
|
|
3724
3726
|
"none",
|
|
3727
|
+
"auto",
|
|
3725
3728
|
"spanning-item",
|
|
3726
3729
|
"intersection"
|
|
3727
3730
|
],
|
|
@@ -4650,6 +4653,13 @@ export const generatedProperties = [
|
|
|
4650
4653
|
{
|
|
4651
4654
|
"name": "translate"
|
|
4652
4655
|
},
|
|
4656
|
+
{
|
|
4657
|
+
"keywords": [
|
|
4658
|
+
"none",
|
|
4659
|
+
"all"
|
|
4660
|
+
],
|
|
4661
|
+
"name": "trigger-scope"
|
|
4662
|
+
},
|
|
4653
4663
|
{
|
|
4654
4664
|
"name": "types"
|
|
4655
4665
|
},
|
|
@@ -5421,6 +5431,7 @@ export const generatedPropertyValues = {
|
|
|
5421
5431
|
"column-rule-break": {
|
|
5422
5432
|
"values": [
|
|
5423
5433
|
"none",
|
|
5434
|
+
"auto",
|
|
5424
5435
|
"spanning-item",
|
|
5425
5436
|
"intersection"
|
|
5426
5437
|
]
|
|
@@ -6546,6 +6557,7 @@ export const generatedPropertyValues = {
|
|
|
6546
6557
|
"row-rule-break": {
|
|
6547
6558
|
"values": [
|
|
6548
6559
|
"none",
|
|
6560
|
+
"auto",
|
|
6549
6561
|
"spanning-item",
|
|
6550
6562
|
"intersection"
|
|
6551
6563
|
]
|
|
@@ -7027,6 +7039,12 @@ export const generatedPropertyValues = {
|
|
|
7027
7039
|
"step-end"
|
|
7028
7040
|
]
|
|
7029
7041
|
},
|
|
7042
|
+
"trigger-scope": {
|
|
7043
|
+
"values": [
|
|
7044
|
+
"none",
|
|
7045
|
+
"all"
|
|
7046
|
+
]
|
|
7047
|
+
},
|
|
7030
7048
|
"unicode-bidi": {
|
|
7031
7049
|
"values": [
|
|
7032
7050
|
"normal",
|
|
@@ -9,7 +9,7 @@ import * as Platform from '../../../core/platform/platform.js';
|
|
|
9
9
|
import * as Root from '../../../core/root/root.js';
|
|
10
10
|
import * as SDK from '../../../core/sdk/sdk.js';
|
|
11
11
|
import * as Tracing from '../../../services/tracing/tracing.js';
|
|
12
|
-
import * as Annotations from '
|
|
12
|
+
import * as Annotations from '../../annotations/annotations.js';
|
|
13
13
|
import * as SourceMapScopes from '../../source_map_scopes/source_map_scopes.js';
|
|
14
14
|
import * as Trace from '../../trace/trace.js';
|
|
15
15
|
import {
|
|
@@ -8,7 +8,7 @@ import * as Platform from '../../../core/platform/platform.js';
|
|
|
8
8
|
import * as Root from '../../../core/root/root.js';
|
|
9
9
|
import * as SDK from '../../../core/sdk/sdk.js';
|
|
10
10
|
import type * as Protocol from '../../../generated/protocol.js';
|
|
11
|
-
import * as Annotations from '
|
|
11
|
+
import * as Annotations from '../../annotations/annotations.js';
|
|
12
12
|
import {ChangeManager} from '../ChangeManager.js';
|
|
13
13
|
import {debugLog} from '../debug.js';
|
|
14
14
|
import {EvaluateAction, formatError, SideEffectError} from '../EvaluateAction.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import type * as SDK from '../../../core/sdk/sdk.js';
|
|
6
|
-
import * as Annotations from '
|
|
6
|
+
import * as Annotations from '../../annotations/annotations.js';
|
|
7
7
|
import * as Logs from '../../logs/logs.js';
|
|
8
8
|
import * as NetworkTimeCalculator from '../../network_time_calculator/network_time_calculator.js';
|
|
9
9
|
import * as TextUtils from '../../text_utils/text_utils.js';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import type * as Platform from '../../../core/platform/platform.js';
|
|
6
6
|
import type * as Protocol from '../../../generated/protocol.js';
|
|
7
|
-
import * as Annotations from '
|
|
7
|
+
import * as Annotations from '../../annotations/annotations.js';
|
|
8
8
|
import * as CrUXManager from '../../crux-manager/crux-manager.js';
|
|
9
9
|
import type * as SourceMapScopes from '../../source_map_scopes/source_map_scopes.js';
|
|
10
10
|
import * as Trace from '../../trace/trace.js';
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
-
import * as Common from '
|
|
6
|
-
import * as Root from '
|
|
7
|
-
import type * as SDK from '
|
|
5
|
+
import * as Common from '../../core/common/common.js';
|
|
6
|
+
import * as Root from '../../core/root/root.js';
|
|
7
|
+
import type * as SDK from '../../core/sdk/sdk.js';
|
|
8
8
|
|
|
9
9
|
import {AnnotationType} from './AnnotationType.js';
|
|
10
10
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Annotations Model
|
|
2
|
+
|
|
3
|
+
**IMPORTANT**: this model exists because on the GreenDev project we prototyped a build of DevTools that is able to add annotations to various parts of the UI.
|
|
4
|
+
|
|
5
|
+
This feature is only enabled when Chromium is run with the GreenDev feature flag enabled. There are currently NO PLANS to ship this code to production.
|
|
6
|
+
|
|
7
|
+
If you are reading this and you want to use this code, please speak to jacktfranklin@ first. This code is for a prototype and not in a production state.
|
|
@@ -191,6 +191,14 @@ export class DebuggerWorkspaceBinding implements SDK.TargetManager.SDKModelObser
|
|
|
191
191
|
return await model.createFromProtocolRuntime(stackTrace, this.#translateRawFrames.bind(this));
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
+
async createStackTraceFromDebuggerPaused(
|
|
195
|
+
pausedDetails: SDK.DebuggerModel.DebuggerPausedDetails,
|
|
196
|
+
target: SDK.Target.Target): Promise<StackTrace.StackTrace.DebuggableStackTrace> {
|
|
197
|
+
const model =
|
|
198
|
+
target.model(StackTraceImpl.StackTraceModel.StackTraceModel) as StackTraceImpl.StackTraceModel.StackTraceModel;
|
|
199
|
+
return await model.createFromDebuggerPaused(pausedDetails, this.#translateRawFrames.bind(this));
|
|
200
|
+
}
|
|
201
|
+
|
|
194
202
|
async createLiveLocation(
|
|
195
203
|
rawLocation: SDK.DebuggerModel.Location, updateDelegate: (arg0: LiveLocation) => Promise<void>,
|
|
196
204
|
locationPool: LiveLocationPool): Promise<Location|null> {
|
|
@@ -3154,7 +3154,7 @@ export const NativeFunctions = [
|
|
|
3154
3154
|
},
|
|
3155
3155
|
{
|
|
3156
3156
|
name: "initKeyboardEvent",
|
|
3157
|
-
signatures: [["typeArg","?bubblesArg","?cancelableArg","?viewArg","?keyArg","?locationArg","?ctrlKey","?altKey","?shiftKey","?metaKey"]
|
|
3157
|
+
signatures: [["typeArg","?bubblesArg","?cancelableArg","?viewArg","?keyArg","?locationArg","?ctrlKey","?altKey","?shiftKey","?metaKey"]]
|
|
3158
3158
|
},
|
|
3159
3159
|
{
|
|
3160
3160
|
name: "setKeyframes",
|
|
@@ -6611,6 +6611,10 @@ export const NativeFunctions = [
|
|
|
6611
6611
|
name: "when",
|
|
6612
6612
|
signatures: [["type","?options"]]
|
|
6613
6613
|
},
|
|
6614
|
+
{
|
|
6615
|
+
name: "Event",
|
|
6616
|
+
signatures: [["type","?eventInitDict"]]
|
|
6617
|
+
},
|
|
6614
6618
|
{
|
|
6615
6619
|
name: "setFormControlRange",
|
|
6616
6620
|
signatures: [["element","start","end"]]
|
|
@@ -6737,10 +6741,6 @@ export const NativeFunctions = [
|
|
|
6737
6741
|
name: "TextUpdateEvent",
|
|
6738
6742
|
signatures: [["type","?options"]]
|
|
6739
6743
|
},
|
|
6740
|
-
{
|
|
6741
|
-
name: "AnimationEvent",
|
|
6742
|
-
signatures: [["type","?eventInitDict"]]
|
|
6743
|
-
},
|
|
6744
6744
|
{
|
|
6745
6745
|
name: "AnimationPlaybackEvent",
|
|
6746
6746
|
signatures: [["type","?eventInitDict"]]
|
|
@@ -6769,10 +6769,6 @@ export const NativeFunctions = [
|
|
|
6769
6769
|
name: "ErrorEvent",
|
|
6770
6770
|
signatures: [["type","?eventInitDict"]]
|
|
6771
6771
|
},
|
|
6772
|
-
{
|
|
6773
|
-
name: "FocusEvent",
|
|
6774
|
-
signatures: [["type","?eventInitDict"]]
|
|
6775
|
-
},
|
|
6776
6772
|
{
|
|
6777
6773
|
name: "HashChangeEvent",
|
|
6778
6774
|
signatures: [["type","?eventInitDict"]]
|
|
@@ -6785,10 +6781,6 @@ export const NativeFunctions = [
|
|
|
6785
6781
|
name: "InterestEvent",
|
|
6786
6782
|
signatures: [["type","?eventInitDict"]]
|
|
6787
6783
|
},
|
|
6788
|
-
{
|
|
6789
|
-
name: "KeyboardEvent",
|
|
6790
|
-
signatures: [["type","?eventInitDict"]]
|
|
6791
|
-
},
|
|
6792
6784
|
{
|
|
6793
6785
|
name: "MessageEvent",
|
|
6794
6786
|
signatures: [["type","?eventInitDict"]]
|
|
@@ -6829,14 +6821,6 @@ export const NativeFunctions = [
|
|
|
6829
6821
|
name: "ToggleEvent",
|
|
6830
6822
|
signatures: [["type","?eventInitDict"]]
|
|
6831
6823
|
},
|
|
6832
|
-
{
|
|
6833
|
-
name: "TouchEvent",
|
|
6834
|
-
signatures: [["type","?eventInitDict"]]
|
|
6835
|
-
},
|
|
6836
|
-
{
|
|
6837
|
-
name: "TransitionEvent",
|
|
6838
|
-
signatures: [["type","?eventInitDict"]]
|
|
6839
|
-
},
|
|
6840
6824
|
{
|
|
6841
6825
|
name: "UIEvent",
|
|
6842
6826
|
signatures: [["type","?eventInitDict"]]
|
|
@@ -7161,6 +7145,10 @@ export const NativeFunctions = [
|
|
|
7161
7145
|
name: "NavigationCurrentEntryChangeEvent",
|
|
7162
7146
|
signatures: [["type","eventInit"]]
|
|
7163
7147
|
},
|
|
7148
|
+
{
|
|
7149
|
+
name: "addHandler",
|
|
7150
|
+
signatures: [["handler"]]
|
|
7151
|
+
},
|
|
7164
7152
|
{
|
|
7165
7153
|
name: "updateCurrentEntry",
|
|
7166
7154
|
signatures: [["options"]]
|
|
@@ -7606,11 +7594,11 @@ export const NativeFunctions = [
|
|
|
7606
7594
|
},
|
|
7607
7595
|
{
|
|
7608
7596
|
name: "drawElement",
|
|
7609
|
-
signatures: [["element","
|
|
7597
|
+
signatures: [["element","dx","dy","?dwidth","?dheight"]]
|
|
7610
7598
|
},
|
|
7611
7599
|
{
|
|
7612
7600
|
name: "drawElementImage",
|
|
7613
|
-
signatures: [["element","
|
|
7601
|
+
signatures: [["element","dx","dy","?dwidth","?dheight"],["element","sx","sy","swidth","sheight","dx","dy","?dwidth","?dheight"]]
|
|
7614
7602
|
},
|
|
7615
7603
|
{
|
|
7616
7604
|
name: "Path2D",
|
|
@@ -8432,6 +8420,10 @@ export const NativeFunctions = [
|
|
|
8432
8420
|
name: "RTCSessionDescription",
|
|
8433
8421
|
signatures: [["?descriptionInitDict"]]
|
|
8434
8422
|
},
|
|
8423
|
+
{
|
|
8424
|
+
name: "copyPayloadTo",
|
|
8425
|
+
signatures: [["destination"]]
|
|
8426
|
+
},
|
|
8435
8427
|
{
|
|
8436
8428
|
name: "RtcTransport",
|
|
8437
8429
|
signatures: [["name"]]
|
|
@@ -6,8 +6,11 @@ import type * as Common from '../../core/common/common.js';
|
|
|
6
6
|
import type * as SDK from '../../core/sdk/sdk.js';
|
|
7
7
|
import type * as Workspace from '../workspace/workspace.js';
|
|
8
8
|
|
|
9
|
-
export
|
|
10
|
-
|
|
9
|
+
export type StackTrace = BaseStackTrace<Fragment>;
|
|
10
|
+
export type DebuggableStackTrace = BaseStackTrace<DebuggableFragment>;
|
|
11
|
+
|
|
12
|
+
export interface BaseStackTrace<SyncFragmentT extends Fragment> extends Common.EventTarget.EventTarget<EventTypes> {
|
|
13
|
+
readonly syncFragment: SyncFragmentT;
|
|
11
14
|
readonly asyncFragments: readonly AsyncFragment[];
|
|
12
15
|
}
|
|
13
16
|
|
|
@@ -19,6 +22,10 @@ export interface AsyncFragment extends Fragment {
|
|
|
19
22
|
readonly description: string;
|
|
20
23
|
}
|
|
21
24
|
|
|
25
|
+
export interface DebuggableFragment {
|
|
26
|
+
readonly frames: readonly DebuggableFrame[];
|
|
27
|
+
}
|
|
28
|
+
|
|
22
29
|
export interface Frame {
|
|
23
30
|
readonly url?: string;
|
|
24
31
|
readonly uiSourceCode?: Workspace.UISourceCode.UISourceCode;
|
|
@@ -29,6 +36,10 @@ export interface Frame {
|
|
|
29
36
|
readonly missingDebugInfo?: MissingDebugInfo;
|
|
30
37
|
}
|
|
31
38
|
|
|
39
|
+
export interface DebuggableFrame extends Frame {
|
|
40
|
+
readonly sdkFrame: SDK.DebuggerModel.CallFrame;
|
|
41
|
+
}
|
|
42
|
+
|
|
32
43
|
export const enum MissingDebugInfoType {
|
|
33
44
|
/** No debug information at all for the call frame */
|
|
34
45
|
NO_INFO = 'NO_INFO',
|
|
@@ -3,29 +3,36 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
|
+
import type * as SDK from '../../core/sdk/sdk.js';
|
|
6
7
|
import type * as Workspace from '../workspace/workspace.js';
|
|
7
8
|
|
|
8
9
|
import type * as StackTrace from './stack_trace.js';
|
|
9
10
|
import type {FrameNode} from './Trie.js';
|
|
10
11
|
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
export type AnyStackTraceImpl = StackTraceImpl<FragmentImpl|DebuggableFragmentImpl>;
|
|
13
|
+
|
|
14
|
+
export class StackTraceImpl<SyncFragmentT extends FragmentImpl|DebuggableFragmentImpl = FragmentImpl> extends
|
|
15
|
+
Common.ObjectWrapper.ObjectWrapper<StackTrace.StackTrace.EventTypes> implements
|
|
16
|
+
StackTrace.StackTrace.BaseStackTrace<SyncFragmentT> {
|
|
17
|
+
readonly syncFragment: SyncFragmentT;
|
|
14
18
|
readonly asyncFragments: readonly AsyncFragmentImpl[];
|
|
15
19
|
|
|
16
|
-
constructor(syncFragment:
|
|
20
|
+
constructor(syncFragment: SyncFragmentT, asyncFragments: AsyncFragmentImpl[]) {
|
|
17
21
|
super();
|
|
18
22
|
this.syncFragment = syncFragment;
|
|
19
23
|
this.asyncFragments = asyncFragments;
|
|
20
24
|
|
|
21
|
-
|
|
25
|
+
const fragment =
|
|
26
|
+
syncFragment instanceof DebuggableFragmentImpl ? syncFragment.fragment : syncFragment as FragmentImpl;
|
|
27
|
+
fragment.stackTraces.add(this);
|
|
28
|
+
|
|
22
29
|
this.asyncFragments.forEach(asyncFragment => asyncFragment.fragment.stackTraces.add(this));
|
|
23
30
|
}
|
|
24
31
|
}
|
|
25
32
|
|
|
26
33
|
export class FragmentImpl implements StackTrace.StackTrace.Fragment {
|
|
27
34
|
readonly node: FrameNode;
|
|
28
|
-
readonly stackTraces = new Set<
|
|
35
|
+
readonly stackTraces = new Set<AnyStackTraceImpl>();
|
|
29
36
|
|
|
30
37
|
/**
|
|
31
38
|
* Fragments are deduplicated based on the node.
|
|
@@ -83,3 +90,71 @@ export class FrameImpl implements StackTrace.StackTrace.Frame {
|
|
|
83
90
|
this.missingDebugInfo = missingDebugInfo;
|
|
84
91
|
}
|
|
85
92
|
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* A DebuggableFragmentImpl wraps an existing FragmentImpl. This is important: We can pause at the
|
|
96
|
+
* same location multiple times and the paused information changes each and everytime while the underlying
|
|
97
|
+
* FragmentImpl will stay the same.
|
|
98
|
+
*/
|
|
99
|
+
export class DebuggableFragmentImpl implements StackTrace.StackTrace.DebuggableFragment {
|
|
100
|
+
constructor(readonly fragment: FragmentImpl, private readonly callFrames: SDK.DebuggerModel.CallFrame[]) {
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
get frames(): DebuggableFrameImpl[] {
|
|
104
|
+
const frames: DebuggableFrameImpl[] = [];
|
|
105
|
+
|
|
106
|
+
let index = 0;
|
|
107
|
+
for (const node of this.fragment.node.getCallStack()) {
|
|
108
|
+
for (const frame of node.frames) {
|
|
109
|
+
// Each inlined frame gets the same DebugerModel.CallFrame for debugging.
|
|
110
|
+
frames.push(new DebuggableFrameImpl(frame, this.callFrames[index]));
|
|
111
|
+
}
|
|
112
|
+
index++;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return frames;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* A DebuggableFrameImpl wraps an existing FrameImpl. This is important: We can pause at the
|
|
121
|
+
* same location multiple times and the paused information changes each and everytime while the underlying
|
|
122
|
+
* FrameImpl will stay the same.
|
|
123
|
+
*/
|
|
124
|
+
export class DebuggableFrameImpl implements StackTrace.StackTrace.DebuggableFrame {
|
|
125
|
+
readonly #frame: FrameImpl;
|
|
126
|
+
readonly #sdkFrame: SDK.DebuggerModel.CallFrame;
|
|
127
|
+
|
|
128
|
+
constructor(frame: FrameImpl, sdkFrame: SDK.DebuggerModel.CallFrame) {
|
|
129
|
+
this.#frame = frame;
|
|
130
|
+
this.#sdkFrame = sdkFrame;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
get url(): string|undefined {
|
|
134
|
+
return this.#frame.url;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
get uiSourceCode(): Workspace.UISourceCode.UISourceCode|undefined {
|
|
138
|
+
return this.#frame.uiSourceCode;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
get name(): string|undefined {
|
|
142
|
+
return this.#frame.name;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
get line(): number {
|
|
146
|
+
return this.#frame.line;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
get column(): number {
|
|
150
|
+
return this.#frame.column;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
get missingDebugInfo(): StackTrace.StackTrace.MissingDebugInfo|undefined {
|
|
154
|
+
return this.#frame.missingDebugInfo;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
get sdkFrame(): SDK.DebuggerModel.CallFrame {
|
|
158
|
+
return this.#sdkFrame;
|
|
159
|
+
}
|
|
160
|
+
}
|