chrome-devtools-frontend 1.0.1697595 → 1.0.1698733
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/version-control/SKILL.md +21 -9
- package/.stylelintignore +2 -0
- package/front_end/core/common/VersionController.ts +5 -1
- package/front_end/core/platform/HostRuntime.ts +12 -0
- package/front_end/core/platform/api/HostRuntime.ts +13 -0
- package/front_end/core/platform/browser/HostRuntime.ts +34 -0
- package/front_end/core/platform/node/HostRuntime.ts +40 -0
- package/front_end/core/sdk/AnimationModel.ts +21 -99
- package/front_end/core/sdk/CSSModel.ts +4 -2
- package/front_end/core/sdk/CSSPropertyParser.ts +4 -4
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +4 -44
- package/front_end/core/sdk/Connections.ts +6 -1
- package/front_end/core/sdk/ConsoleModel.ts +1 -12
- package/front_end/core/sdk/DOMModel.ts +3 -51
- package/front_end/core/sdk/DebuggerModel.ts +9 -8
- package/front_end/core/sdk/NetworkRequest.ts +1 -1
- package/front_end/core/sdk/PageFunctions.ts +187 -0
- package/front_end/core/sdk/Resource.ts +1 -1
- package/front_end/core/sdk/RuntimeModel.ts +1 -20
- package/front_end/core/sdk/Script.ts +21 -0
- package/front_end/core/sdk/SourceMap.ts +15 -2
- package/front_end/core/sdk/SourceMapCache.ts +13 -10
- package/front_end/core/sdk/SourceMapManager.ts +11 -9
- package/front_end/core/sdk/SourceMapScopeChainEntry.ts +59 -17
- package/front_end/core/sdk/SourceMapScopesInfo.ts +8 -2
- package/front_end/entrypoints/heap_snapshot_worker/ContextAnalyzer.ts +635 -0
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +26 -12
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +16 -2
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotWorkerDispatcher.ts +4 -4
- package/front_end/entrypoints/heap_snapshot_worker/heap_snapshot_worker.ts +2 -0
- package/front_end/entrypoints/shell/shell.ts +1 -1
- package/front_end/generated/InspectorBackendCommands.ts +1 -1
- package/front_end/generated/protocol.ts +8 -2
- package/front_end/models/ai_assistance/DOMHelpers.ts +95 -0
- package/front_end/models/ai_assistance/EvaluateAction.ts +5 -42
- package/front_end/models/ai_assistance/ExtensionScope.ts +2 -31
- package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -1
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +27 -2
- package/front_end/models/ai_assistance/ai_assistance.ts +6 -4
- package/front_end/models/ai_assistance/contexts/DOMNodeContext.ts +10 -7
- package/front_end/models/ai_assistance/contexts/FileContext.ts +2 -10
- package/front_end/models/ai_assistance/skills/performance.md +4 -3
- package/front_end/models/ai_assistance/tools/GetSourceContent.ts +3 -2
- package/front_end/models/ai_assistance/tools/{GetFunctionCode.ts → GetTraceFunctionCode.ts} +26 -13
- package/front_end/models/ai_assistance/tools/{GetResourceContent.ts → GetTraceResourceContent.ts} +31 -11
- package/front_end/models/ai_assistance/tools/ListSources.ts +21 -14
- package/front_end/models/ai_assistance/tools/Tool.ts +2 -2
- package/front_end/models/ai_assistance/tools/ToolRegistry.ts +6 -6
- package/front_end/models/bindings/CompilerScriptMapping.ts +3 -10
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +48 -17
- package/front_end/models/bindings/ResourceScriptMapping.ts +2 -2
- package/front_end/models/bindings/StylesSourceMapping.ts +1 -1
- package/front_end/models/comment_manager/CD4ABridge.ts +55 -12
- package/front_end/models/comment_manager/CommentManager.ts +46 -91
- package/front_end/models/comment_manager/CommentThread.ts +145 -0
- package/front_end/models/comment_manager/comment_manager.ts +2 -0
- package/front_end/models/elements/DOMChanges.ts +238 -0
- package/front_end/models/elements/elements.ts +2 -0
- package/front_end/models/emulation/DeviceModeModel.ts +53 -0
- package/front_end/models/extensions/ExtensionAPI.ts +8 -6
- package/front_end/models/extensions/ExtensionEndpoint.ts +11 -8
- package/front_end/models/extensions/HostUrlPattern.ts +4 -3
- package/front_end/models/extensions/LanguageExtensionEndpoint.ts +3 -2
- package/front_end/models/extensions/RecorderExtensionEndpoint.ts +2 -1
- package/front_end/models/formatter/FormatterWorkerPool.ts +4 -6
- package/front_end/models/heap_snapshot/HeapSnapshotModel.ts +55 -0
- package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +18 -14
- package/front_end/models/issues_manager/IssuesManager.ts +5 -0
- package/front_end/models/issues_manager/WebInstallIssue.ts +63 -0
- package/front_end/models/issues_manager/descriptions/webInstallManifestMissingId.md +3 -0
- package/front_end/models/issues_manager/descriptions/webInstallManifestMissingNameOrShortName.md +3 -0
- package/front_end/models/issues_manager/descriptions/webInstallManifestParsingOrNetworkError.md +3 -0
- package/front_end/models/issues_manager/descriptions/webInstallNoManifest.md +3 -0
- package/front_end/models/issues_manager/descriptions/webInstallStartUrlInvalid.md +3 -0
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/models/workspace/UISourceCode.ts +20 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +7 -7
- package/front_end/panels/ai_assistance/components/AIv2MarkdownRenderer.ts +4 -10
- package/front_end/panels/ai_assistance/components/MarkdownRendererWithCodeBlock.ts +25 -5
- package/front_end/panels/browser_debugger/ObjectEventListenersSidebarPane.ts +2 -3
- package/front_end/panels/common/CommentThreadWidget.ts +221 -0
- package/front_end/{ui/comments → panels/common}/CommentsOverlayWidget.ts +117 -28
- package/front_end/{ui/comments → panels/common}/CommentsStatusBarPill.ts +5 -5
- package/front_end/panels/common/ExtensionServer.ts +2 -1
- package/front_end/panels/common/commentThreadWidget.css +173 -0
- package/front_end/{ui/comments → panels/common}/commentsOverlay.css +8 -1
- package/front_end/{ui/comments/comments-meta.ts → panels/common/common-meta.ts} +11 -11
- package/front_end/panels/common/common.ts +3 -0
- package/front_end/panels/elements/AdoptedStyleSheetTreeElement.ts +3 -3
- package/front_end/panels/elements/ElementsPanel.ts +5 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +102 -21
- package/front_end/panels/elements/ElementsTreeOutline.ts +326 -91
- package/front_end/panels/elements/EventListenersWidget.ts +0 -1
- package/front_end/panels/elements/PropertiesWidget.ts +11 -10
- package/front_end/panels/elements/PropertyRenderer.ts +29 -25
- package/front_end/panels/elements/StylePropertyTreeElement.ts +6 -6
- package/front_end/panels/elements/elementsTreeOutline.css +7 -1
- package/front_end/panels/emulation/DeviceModeToolbar.ts +2 -3
- package/front_end/panels/event_listeners/EventListenersView.ts +235 -302
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorController.ts +6 -7
- package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +5 -1
- package/front_end/panels/linear_memory_inspector/linear_memory_inspector-meta.ts +1 -1
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +10 -2
- package/front_end/panels/network/NetworkConfigView.ts +141 -116
- package/front_end/panels/network/NetworkPanel.ts +7 -4
- package/front_end/panels/network/RequestHeadersView.ts +1 -1
- package/front_end/panels/network/forward/BackendLinking.ts +5 -2
- package/front_end/panels/recorder/stepView.css +1 -0
- package/front_end/panels/security/SecurityPanel.ts +5 -5
- package/front_end/panels/security/SecurityPanelSidebar.ts +2 -11
- package/front_end/panels/settings/BackendLinkingSettingsTab.ts +7 -2
- package/front_end/panels/sources/DebuggerPlugin.ts +1 -1
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +11 -16
- package/front_end/panels/sources/sources-meta.ts +1 -1
- package/front_end/panels/timeline/TimelineTreeView.ts +11 -1
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +0 -3
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/comments/CommentOverlayManager.ts +89 -42
- package/front_end/ui/comments/comments.ts +0 -4
- package/front_end/ui/legacy/Treeoutline.ts +4 -0
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +15 -8
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +4 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +5 -5
|
@@ -6,6 +6,7 @@ import * as Common from '../../core/common/common.js';
|
|
|
6
6
|
import * as CommentManager from '../../models/comment_manager/comment_manager.js';
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
|
+
closestAcrossShadow,
|
|
9
10
|
type CommentAnchorSignature,
|
|
10
11
|
type CommentThread,
|
|
11
12
|
computeVisibleRect,
|
|
@@ -25,7 +26,6 @@ export interface StartOptions {
|
|
|
25
26
|
root?: Document|Element;
|
|
26
27
|
scrollTarget?: EventTarget;
|
|
27
28
|
resizeTarget?: Element;
|
|
28
|
-
defaultText?: string;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export interface PinPositionData {
|
|
@@ -45,6 +45,12 @@ export interface HighlightRectData {
|
|
|
45
45
|
visible: boolean;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
export interface CreateCommentOptions {
|
|
49
|
+
author?: 'DEVELOPER'|'AGENT';
|
|
50
|
+
changes?: CommentManager.CommentManager.ChangeRecord[];
|
|
51
|
+
coordinates?: {clientX: number, clientY: number};
|
|
52
|
+
}
|
|
53
|
+
|
|
48
54
|
export interface HoverHighlightData {
|
|
49
55
|
top: number;
|
|
50
56
|
left: number;
|
|
@@ -113,6 +119,7 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
113
119
|
#mutationObserver?: MutationObserver;
|
|
114
120
|
#rematchTimeoutId?: ReturnType<typeof setTimeout>;
|
|
115
121
|
#cursorElement: HTMLElement|null = null;
|
|
122
|
+
#isCreatingComment = false;
|
|
116
123
|
|
|
117
124
|
constructor(commentManager: CommentManager.CommentManager.CommentManager) {
|
|
118
125
|
super();
|
|
@@ -120,7 +127,9 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
120
127
|
this.#commentManager.addEventListener(
|
|
121
128
|
CommentManager.CommentManager.Events.COMMENT_THREADS_CHANGED,
|
|
122
129
|
() => {
|
|
123
|
-
this.#
|
|
130
|
+
if (!this.#isCreatingComment) {
|
|
131
|
+
this.#updatePositions();
|
|
132
|
+
}
|
|
124
133
|
},
|
|
125
134
|
this,
|
|
126
135
|
);
|
|
@@ -129,6 +138,7 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
129
138
|
({data: active}) => {
|
|
130
139
|
if (!active) {
|
|
131
140
|
this.#clearHover();
|
|
141
|
+
this.clearDraftThreads();
|
|
132
142
|
}
|
|
133
143
|
document.body.style.cursor = active ? COMMENT_MODE_CURSOR : '';
|
|
134
144
|
},
|
|
@@ -216,56 +226,94 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
216
226
|
return this.#highlightRects;
|
|
217
227
|
}
|
|
218
228
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
229
|
+
getAnchorElement(thread: CommentThread): Element|undefined {
|
|
230
|
+
return this.#liveNodeCache.get(thread);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
clearDraftThreads(): void {
|
|
234
|
+
const draftThreads = this.#commentManager.getCommentThreads().filter(t => t.status === 'DRAFT');
|
|
235
|
+
for (const thread of draftThreads) {
|
|
236
|
+
this.removeCommentThread(thread.id);
|
|
226
237
|
}
|
|
227
|
-
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
handleElementClick(element: Element, options?: {clientX: number, clientY: number}): boolean {
|
|
241
|
+
if (!this.isCommentMode() || closestAcrossShadow(element, '.comment-thread-widget')) {
|
|
242
|
+
return false;
|
|
243
|
+
}
|
|
244
|
+
this.clearDraftThreads();
|
|
245
|
+
|
|
246
|
+
const resolved = this.#resolveAnchor(element, options);
|
|
247
|
+
if (!resolved) {
|
|
248
|
+
return false;
|
|
249
|
+
}
|
|
250
|
+
const {anchorElement: anchorEl} = resolved;
|
|
251
|
+
const visibleRect = computeVisibleRect(anchorEl);
|
|
252
|
+
if (!visibleRect) {
|
|
253
|
+
return false;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
const thread = this.createComment(element, undefined, {coordinates: options});
|
|
257
|
+
return thread !== null;
|
|
228
258
|
}
|
|
229
259
|
|
|
230
260
|
createComment(
|
|
231
261
|
element: Element,
|
|
232
|
-
text
|
|
233
|
-
|
|
234
|
-
changes?: CommentManager.CommentManager.ChangeRecord[],
|
|
235
|
-
options?: {clientX: number, clientY: number},
|
|
262
|
+
text?: string,
|
|
263
|
+
options?: CreateCommentOptions,
|
|
236
264
|
): CommentThread|null {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
const
|
|
240
|
-
if (
|
|
241
|
-
const result = customResolver.resolve(element, options);
|
|
242
|
-
if (result) {
|
|
243
|
-
anchor = result.anchor;
|
|
244
|
-
anchorEl = result.anchorElement ?? element;
|
|
245
|
-
}
|
|
246
|
-
} else {
|
|
247
|
-
anchorEl = resolveCommentAnchorElement(element, options);
|
|
248
|
-
anchor = resolveCommentAnchor(element, undefined, options);
|
|
249
|
-
}
|
|
250
|
-
if (!anchor || !anchorEl) {
|
|
265
|
+
const author = options?.author ?? 'DEVELOPER';
|
|
266
|
+
const changes = options?.changes;
|
|
267
|
+
const resolved = this.#resolveAnchor(element, options?.coordinates);
|
|
268
|
+
if (!resolved) {
|
|
251
269
|
return null;
|
|
252
270
|
}
|
|
253
271
|
|
|
254
|
-
const
|
|
272
|
+
const {anchor, anchorElement} = resolved;
|
|
273
|
+
|
|
274
|
+
let thread: CommentThread;
|
|
275
|
+
this.#isCreatingComment = true;
|
|
276
|
+
try {
|
|
277
|
+
thread = this.#commentManager.createCommentThread(anchor, text, author, changes);
|
|
278
|
+
} finally {
|
|
279
|
+
this.#isCreatingComment = false;
|
|
280
|
+
}
|
|
255
281
|
// Non-DOM anchors (e.g. canvas-rendered timeline entries) manage their own overlays
|
|
256
282
|
// and do not have individual backing DOM nodes to cache or observe.
|
|
257
283
|
if (isDomTrackedAnchor(anchor)) {
|
|
258
|
-
this.#liveNodeCache.set(thread,
|
|
284
|
+
this.#liveNodeCache.set(thread, anchorElement);
|
|
259
285
|
|
|
260
286
|
const observer = this.#getIntersectionObserver();
|
|
261
|
-
observer.observe(
|
|
262
|
-
this.#observedThreads.add(
|
|
287
|
+
observer.observe(anchorElement);
|
|
288
|
+
this.#observedThreads.add(anchorElement);
|
|
263
289
|
}
|
|
264
290
|
|
|
265
291
|
this.#updatePositions();
|
|
292
|
+
|
|
266
293
|
return thread;
|
|
267
294
|
}
|
|
268
295
|
|
|
296
|
+
#resolveAnchor(element: Element, options?: {clientX: number, clientY: number}):
|
|
297
|
+
{anchor: CommentAnchorSignature, anchorElement: Element}|null {
|
|
298
|
+
let anchorElement: Element|null = null;
|
|
299
|
+
let anchor: CommentAnchorSignature|null = null;
|
|
300
|
+
const customResolver = getCustomAnchorResolverForElement(element);
|
|
301
|
+
if (customResolver) {
|
|
302
|
+
const result = customResolver.resolve(element, options);
|
|
303
|
+
if (result) {
|
|
304
|
+
anchor = result.anchor;
|
|
305
|
+
anchorElement = result.anchorElement ?? element;
|
|
306
|
+
}
|
|
307
|
+
} else {
|
|
308
|
+
anchorElement = resolveCommentAnchorElement(element, options);
|
|
309
|
+
anchor = resolveCommentAnchor(element, undefined, options);
|
|
310
|
+
}
|
|
311
|
+
if (!anchor || !anchorElement) {
|
|
312
|
+
return null;
|
|
313
|
+
}
|
|
314
|
+
return {anchor, anchorElement};
|
|
315
|
+
}
|
|
316
|
+
|
|
269
317
|
getCommentThread(id: string): CommentThread|undefined {
|
|
270
318
|
return this.#commentManager.getCommentThread(id);
|
|
271
319
|
}
|
|
@@ -420,17 +468,15 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
420
468
|
* - A ResizeObserver to recalculate overlay coordinates when DevTools panels or drawers are resized.
|
|
421
469
|
* - A MutationObserver to automatically rematch existing comment anchors when the DOM re-renders.
|
|
422
470
|
*/
|
|
423
|
-
start(rootOrOptions?: Document|Element|StartOptions
|
|
471
|
+
start(rootOrOptions?: Document|Element|StartOptions): void {
|
|
424
472
|
let root: Document|Element|undefined;
|
|
425
473
|
let scrollTarget: EventTarget|undefined;
|
|
426
474
|
let resizeTarget: Element|undefined;
|
|
427
|
-
let text = defaultText;
|
|
428
475
|
|
|
429
476
|
if (rootOrOptions && !(rootOrOptions instanceof Document) && !(rootOrOptions instanceof Element)) {
|
|
430
477
|
root = rootOrOptions.root;
|
|
431
478
|
scrollTarget = rootOrOptions.scrollTarget;
|
|
432
479
|
resizeTarget = rootOrOptions.resizeTarget;
|
|
433
|
-
text = rootOrOptions.defaultText ?? defaultText;
|
|
434
480
|
} else if (rootOrOptions) {
|
|
435
481
|
root = rootOrOptions;
|
|
436
482
|
}
|
|
@@ -440,7 +486,7 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
440
486
|
resizeTarget = resizeTarget || (root instanceof Document ? (root.body || root.documentElement) : root);
|
|
441
487
|
|
|
442
488
|
this.stop();
|
|
443
|
-
this.#installClickListener(root
|
|
489
|
+
this.#installClickListener(root);
|
|
444
490
|
this.#installScrollListener(scrollTarget);
|
|
445
491
|
this.#installResizeObserver(resizeTarget);
|
|
446
492
|
this.#installMutationObserver(root);
|
|
@@ -451,6 +497,7 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
451
497
|
*/
|
|
452
498
|
stop(): void {
|
|
453
499
|
document.body.style.cursor = '';
|
|
500
|
+
this.clearDraftThreads();
|
|
454
501
|
this.#removeClickListener();
|
|
455
502
|
this.#removeScrollListener();
|
|
456
503
|
this.#removeResizeObserver();
|
|
@@ -465,12 +512,12 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
465
512
|
* Sets up capturing click, hover, and pointer interaction listeners on the container.
|
|
466
513
|
*
|
|
467
514
|
* When Comment Mode is active:
|
|
468
|
-
* - Clicks on anchorable elements
|
|
515
|
+
* - Clicks on anchorable elements open a comment thread creation draft and consume the click event,
|
|
469
516
|
* preventing normal DevTools UI triggers such as node selection or navigation.
|
|
470
517
|
* - Pointer and mouse press events are suppressed to prevent accidental text selections or drag interactions.
|
|
471
518
|
* - Hover events compute and display a real-time preview highlight over the candidate anchor element.
|
|
472
519
|
*/
|
|
473
|
-
#installClickListener(container: Element|Document = document
|
|
520
|
+
#installClickListener(container: Element|Document = document): void {
|
|
474
521
|
this.#removeClickListener();
|
|
475
522
|
this.#clickContainer = container;
|
|
476
523
|
|
|
@@ -478,15 +525,15 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
478
525
|
if (!this.isCommentMode()) {
|
|
479
526
|
return;
|
|
480
527
|
}
|
|
528
|
+
|
|
481
529
|
const composedTarget = event.composedPath()[0];
|
|
482
530
|
const target = (composedTarget instanceof Element) ? composedTarget : event.target;
|
|
483
531
|
if (!(target instanceof Element)) {
|
|
484
532
|
return;
|
|
485
533
|
}
|
|
486
|
-
|
|
487
|
-
const options = {clientX:
|
|
488
|
-
|
|
489
|
-
if (thread) {
|
|
534
|
+
|
|
535
|
+
const options = event instanceof MouseEvent ? {clientX: event.clientX, clientY: event.clientY} : undefined;
|
|
536
|
+
if (this.handleElementClick(target, options)) {
|
|
490
537
|
event.consume(true);
|
|
491
538
|
}
|
|
492
539
|
};
|
|
@@ -4,12 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import * as CommentAnchorResolver from './CommentAnchorResolver.js';
|
|
6
6
|
import * as CommentOverlayManager from './CommentOverlayManager.js';
|
|
7
|
-
import * as CommentsOverlayWidget from './CommentsOverlayWidget.js';
|
|
8
|
-
import * as CommentsStatusBarPill from './CommentsStatusBarPill.js';
|
|
9
7
|
|
|
10
8
|
export {
|
|
11
9
|
CommentAnchorResolver,
|
|
12
10
|
CommentOverlayManager,
|
|
13
|
-
CommentsOverlayWidget,
|
|
14
|
-
CommentsStatusBarPill,
|
|
15
11
|
};
|
|
@@ -1631,6 +1631,10 @@ class TreeViewTreeElement extends TreeElement {
|
|
|
1631
1631
|
}
|
|
1632
1632
|
|
|
1633
1633
|
updateExpansionFromAttribute(): void {
|
|
1634
|
+
if (!this.isExpandable()) {
|
|
1635
|
+
this.#previousOpenAttributeValue = undefined;
|
|
1636
|
+
return;
|
|
1637
|
+
}
|
|
1634
1638
|
const openAttr = this.configElement.getAttribute('open');
|
|
1635
1639
|
if (openAttr === this.#previousOpenAttributeValue) {
|
|
1636
1640
|
return;
|
|
@@ -1295,6 +1295,7 @@ export interface ObjectTreeViewInput {
|
|
|
1295
1295
|
linkifier?: Components.Linkifier.Linkifier;
|
|
1296
1296
|
emptyPlaceholder?: string;
|
|
1297
1297
|
skipProto: boolean;
|
|
1298
|
+
skipGettersAndSetters: boolean;
|
|
1298
1299
|
onExpand: (expanded: boolean) => void;
|
|
1299
1300
|
}
|
|
1300
1301
|
export type ObjectTreeView = (input: ObjectTreeViewInput, output: object, target: HTMLElement) => void;
|
|
@@ -1310,8 +1311,8 @@ export const OBJECT_TREE_DEFAULT_VIEW: ObjectTreeView = (input, output, target)
|
|
|
1310
1311
|
if (entry) {
|
|
1311
1312
|
objectTree.removeEventListener(ObjectTreeNodeBase.Events.CHILDREN_CHANGED, entry.listener);
|
|
1312
1313
|
}
|
|
1313
|
-
const nodes = Array.from(ObjectPropertyTreeElement.createNodes(
|
|
1314
|
-
|
|
1314
|
+
const nodes = Array.from(ObjectPropertyTreeElement.createNodes(
|
|
1315
|
+
objectTree, input.skipProto, input.skipGettersAndSetters, input.linkifier, input.emptyPlaceholder));
|
|
1315
1316
|
const listener = (): void => {
|
|
1316
1317
|
topLevelNodesCache.delete(objectTree);
|
|
1317
1318
|
objectTree.removeEventListener(ObjectTreeNodeBase.Events.CHILDREN_CHANGED, listener);
|
|
@@ -1337,6 +1338,7 @@ export class ObjectTreeWidget extends UI.Widget.Widget {
|
|
|
1337
1338
|
#emptyPlaceholder?: string;
|
|
1338
1339
|
#renderAsSubtree = false;
|
|
1339
1340
|
#skipProto = false;
|
|
1341
|
+
#skipGettersAndSetters = false;
|
|
1340
1342
|
readonly #view: ObjectTreeView;
|
|
1341
1343
|
|
|
1342
1344
|
constructor(element?: HTMLElement, view: ObjectTreeView = OBJECT_TREE_DEFAULT_VIEW) {
|
|
@@ -1359,6 +1361,15 @@ export class ObjectTreeWidget extends UI.Widget.Widget {
|
|
|
1359
1361
|
this.requestUpdate();
|
|
1360
1362
|
}
|
|
1361
1363
|
|
|
1364
|
+
get skipGettersAndSetters(): boolean {
|
|
1365
|
+
return this.#skipGettersAndSetters;
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
set skipGettersAndSetters(val: boolean) {
|
|
1369
|
+
this.#skipGettersAndSetters = val;
|
|
1370
|
+
this.requestUpdate();
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1362
1373
|
get objectTree(): ObjectTree|undefined {
|
|
1363
1374
|
return this.#objectTree;
|
|
1364
1375
|
}
|
|
@@ -1984,7 +1995,7 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1984
1995
|
if (arrayRanges && arrayRanges.length > 0) {
|
|
1985
1996
|
empty = false;
|
|
1986
1997
|
}
|
|
1987
|
-
const sortPropertiesAlphabetically = properties?.[0]?.
|
|
1998
|
+
const sortPropertiesAlphabetically = properties?.[0]?.sortPropertiesAlphabetically ?? true;
|
|
1988
1999
|
properties?.sort((a, b) => compareProperties(a, b, sortPropertiesAlphabetically));
|
|
1989
2000
|
|
|
1990
2001
|
const entriesProperty = internalProperties?.find(({property}) => property.name === '[[Entries]]');
|
|
@@ -2149,7 +2160,7 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2149
2160
|
|
|
2150
2161
|
getContextMenu(event: Event): UI.ContextMenu.ContextMenu {
|
|
2151
2162
|
const contextMenu = new UI.ContextMenu.ContextMenu(event);
|
|
2152
|
-
contextMenu.appendApplicableItems(this);
|
|
2163
|
+
contextMenu.appendApplicableItems(this.property);
|
|
2153
2164
|
if (this.property.property.symbol) {
|
|
2154
2165
|
contextMenu.appendApplicableItems(this.property.property.symbol);
|
|
2155
2166
|
}
|
|
@@ -2214,10 +2225,6 @@ export class ObjectPropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2214
2225
|
this.setExpandable(false);
|
|
2215
2226
|
}
|
|
2216
2227
|
}
|
|
2217
|
-
|
|
2218
|
-
path(): string {
|
|
2219
|
-
return this.property.path;
|
|
2220
|
-
}
|
|
2221
2228
|
}
|
|
2222
2229
|
|
|
2223
2230
|
async function arrayRangeGroups(object: SDK.RemoteObject.RemoteObject, fromIndex: number, toIndex: number):
|
|
@@ -583,6 +583,10 @@ export class FlameChart extends FlameChartBase implements NetworkTimeCalculator.
|
|
|
583
583
|
}
|
|
584
584
|
|
|
585
585
|
#transformColor(entryIndex: number, color: string): string {
|
|
586
|
+
if (!color) {
|
|
587
|
+
return '';
|
|
588
|
+
}
|
|
589
|
+
|
|
586
590
|
if (this.#shouldDimEvent(entryIndex)) {
|
|
587
591
|
let dimmed = this.colorDimmingCache.get(color);
|
|
588
592
|
if (dimmed) {
|
|
@@ -1634,6 +1634,7 @@ export const knownContextValues: Set<string> = new Set([
|
|
|
1634
1634
|
'emulation.device-orientation-override',
|
|
1635
1635
|
'emulation.device-scale',
|
|
1636
1636
|
'emulation.device-scale-factor',
|
|
1637
|
+
'emulation.device-scale-map',
|
|
1637
1638
|
'emulation.device-ua',
|
|
1638
1639
|
'emulation.device-width',
|
|
1639
1640
|
'emulation.idle-detection',
|
package/package.json
CHANGED
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"@typescript-eslint/utils": "8.64.0",
|
|
53
53
|
"@typescript/tsc": "npm:typescript@6.0.2",
|
|
54
54
|
"chai": "6.2.2",
|
|
55
|
-
"cssnano": "
|
|
56
|
-
"cssnano-preset-lite": "
|
|
55
|
+
"cssnano": "9.0.4",
|
|
56
|
+
"cssnano-preset-lite": "6.0.2",
|
|
57
57
|
"diff": "9.0.0",
|
|
58
58
|
"esbuild": "0.28.2",
|
|
59
59
|
"eslint": "9.39.5",
|
|
@@ -75,11 +75,11 @@
|
|
|
75
75
|
"lit-analyzer": "2.0.3",
|
|
76
76
|
"mocha": "12.0.0",
|
|
77
77
|
"ora": "9.0.0",
|
|
78
|
-
"postcss": "8.5.
|
|
78
|
+
"postcss": "8.5.28",
|
|
79
79
|
"puppeteer-core": "25.3.0",
|
|
80
80
|
"sinon": "22.0.0",
|
|
81
81
|
"source-map-support": "0.5.21",
|
|
82
|
-
"stylelint": "17.
|
|
82
|
+
"stylelint": "17.15.0",
|
|
83
83
|
"stylelint-config-standard": "40.0.0",
|
|
84
84
|
"svgo": "4.1.0",
|
|
85
85
|
"ts-lit-plugin": "2.0.2",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"yargs": "18.1.0",
|
|
91
91
|
"yargs-unparser": "2.0.0"
|
|
92
92
|
},
|
|
93
|
-
"version": "1.0.
|
|
93
|
+
"version": "1.0.1698733"
|
|
94
94
|
}
|