chrome-devtools-frontend 1.0.1661063 → 1.0.1662965
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/devtools-unicode-escaping/SKILL.md +64 -0
- package/.agents/skills/evaluate-ai-css-completion/SKILL.md +19 -9
- package/.agents/skills/evaluate-ai-css-completion/scripts/evaluate.js +44 -16
- package/.agents/skills/migrate-chromium-test/SKILL.md +32 -2
- package/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +7 -1
- package/docs/ui_engineering.md +75 -42
- package/front_end/core/common/SettingRegistration.ts +0 -10
- package/front_end/core/common/Settings.ts +69 -3
- package/front_end/core/platform/ArrayUtilities.ts +10 -0
- package/front_end/core/platform/StringUtilities.ts +38 -6
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +0 -10
- package/front_end/core/sdk/StorageBucketsModel.ts +0 -10
- package/front_end/core/sdk/sdk-meta.ts +0 -1
- package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +0 -13
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +8 -3
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +3 -3
- package/front_end/entrypoints/main/MainImpl.ts +7 -2
- package/front_end/foundation/README.md +86 -0
- package/front_end/foundation/Universe.ts +16 -0
- package/front_end/generated/InspectorBackendCommands.ts +6 -19
- package/front_end/generated/protocol-mapping.d.ts +0 -53
- package/front_end/generated/protocol-proxy-api.d.ts +0 -46
- package/front_end/generated/protocol.ts +20 -186
- package/front_end/models/ai_assistance/AiAgent2.ts +3 -3
- package/front_end/models/ai_assistance/AiConversation.ts +21 -10
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +21 -10
- package/front_end/models/ai_assistance/ChangeManager.ts +2 -2
- package/front_end/models/ai_assistance/ExtensionScope.ts +6 -2
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +1 -1
- package/front_end/models/ai_assistance/agents/AiAgent.ts +8 -1
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +1 -1
- package/front_end/models/badges/UserBadges.ts +31 -17
- package/front_end/models/bindings/CompilerScriptMapping.ts +5 -4
- package/front_end/models/bindings/ContentProviderBasedProject.ts +2 -3
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +4 -3
- package/front_end/models/bindings/DefaultScriptMapping.ts +3 -3
- package/front_end/models/bindings/NetworkProject.ts +22 -1
- package/front_end/models/bindings/ResourceMapping.ts +4 -3
- package/front_end/models/bindings/ResourceScriptMapping.ts +2 -1
- package/front_end/models/bindings/SASSSourceMapping.ts +4 -3
- package/front_end/models/bindings/StylesSourceMapping.ts +3 -3
- package/front_end/models/emulation/DeviceModeModel.ts +67 -5
- package/front_end/models/extensions/RecorderExtensionEndpoint.ts +7 -5
- package/front_end/models/extensions/RecorderPluginManager.ts +10 -6
- package/front_end/models/har/Log.snapshot.txt +193 -0
- package/front_end/models/har/Log.ts +3 -2
- package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +14 -5
- package/front_end/models/issues_manager/CheckFormsIssuesTrigger.ts +8 -9
- package/front_end/models/issues_manager/RelatedIssue.ts +10 -8
- package/front_end/models/javascript_metadata/NativeFunctions.js +1 -1
- package/front_end/models/logs/RequestResolver.ts +2 -2
- package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +0 -5
- package/front_end/models/source_map_scopes/FunctionCodeResolver.ts +8 -6
- package/front_end/models/source_map_scopes/NamesResolver.ts +36 -30
- package/front_end/models/stack_trace/StackTrace.ts +17 -0
- package/front_end/models/trace/handlers/FramesHandler.ts +4 -7
- package/front_end/models/trace/handlers/ModelHandlers.ts +0 -1
- package/front_end/models/trace/handlers/RendererHandler.ts +2 -15
- package/front_end/models/trace/handlers/Threads.ts +4 -11
- package/front_end/models/trace/insights/DOMSize.ts +1 -1
- package/front_end/models/workspace/WorkspaceImpl.ts +1 -10
- package/front_end/panels/application/ApplicationPanelSidebar.ts +0 -44
- package/front_end/panels/application/CookieItemsView.ts +1 -1
- package/front_end/panels/application/FrameDetailsView.ts +1 -1
- package/front_end/panels/application/IndexedDBModel.ts +0 -10
- package/front_end/panels/application/IndexedDBViews.ts +240 -164
- package/front_end/panels/application/ServiceWorkersView.ts +494 -411
- package/front_end/panels/application/SharedStorageModel.ts +0 -10
- package/front_end/panels/application/application.ts +0 -6
- package/front_end/panels/application/components/AdsView.ts +23 -0
- package/front_end/panels/application/components/SharedStorageAccessGrid.ts +1 -1
- package/front_end/panels/application/components/adsView.css +21 -1
- package/front_end/panels/application/components/components.ts +0 -2
- package/front_end/panels/application/indexedDBViews.css +1 -1
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +1 -1
- package/front_end/panels/application/serviceWorkersView.css +40 -4
- package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +147 -123
- package/front_end/panels/common/ExtensionServer.ts +3 -3
- package/front_end/panels/console/ConsoleView.ts +1 -1
- package/front_end/panels/emulation/DeviceModeView.ts +139 -70
- package/front_end/panels/issues/AffectedResourcesView.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +53 -12
- package/front_end/panels/network/NetworkDataGridNode.ts +43 -1
- package/front_end/panels/network/RequestInitiatorView.ts +24 -2
- package/front_end/panels/network/RequestPayloadView.ts +77 -39
- package/front_end/panels/network/components/ResponseHeaderSection.ts +5 -3
- package/front_end/panels/network/networkLogView.css +5 -0
- package/front_end/panels/network/requestInitiatorViewTree.css +5 -0
- package/front_end/panels/profiler/HeapProfileView.ts +198 -79
- package/front_end/panels/profiler/HeapSnapshotView.ts +2 -2
- package/front_end/panels/recorder/README.md +1 -2
- package/front_end/panels/recorder/RecorderPanel.ts +1749 -17
- package/front_end/panels/recorder/recorder.ts +0 -2
- package/front_end/panels/settings/AISettingsTab.ts +13 -0
- package/front_end/panels/sources/SourcesNavigator.ts +3 -2
- package/front_end/panels/sources/SourcesView.ts +0 -17
- package/front_end/panels/sources/UISourceCodeFrame.ts +42 -0
- package/front_end/panels/sources/sources.ts +0 -2
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +0 -17
- package/front_end/panels/timeline/ThreadAppender.ts +0 -106
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/report_view/ReportView.ts +11 -5
- package/front_end/ui/components/report_view/report.css +4 -1
- package/front_end/ui/components/spinners/Spinner.ts +29 -32
- package/front_end/ui/components/spinners/spinner.css +32 -84
- package/front_end/ui/legacy/TextPrompt.ts +49 -1
- package/front_end/ui/legacy/Treeoutline.ts +14 -6
- package/front_end/ui/legacy/UIUtils.ts +36 -11
- package/front_end/ui/legacy/Widget.ts +17 -10
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +2 -2
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +36 -7
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +63 -68
- package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/objectValue.css +2 -1
- package/front_end/ui/legacy/inspectorCommon.css +4 -4
- package/front_end/ui/legacy/textPrompt.css +10 -0
- package/front_end/ui/lit/lit.ts +1 -0
- package/front_end/ui/lit/render.ts +44 -10
- package/front_end/ui/lit/strip-whitespace.ts +23 -2
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +1 -1
- package/front_end/models/trace/handlers/AuctionWorkletsHandler.ts +0 -183
- package/front_end/panels/application/InterestGroupStorageModel.ts +0 -81
- package/front_end/panels/application/InterestGroupStorageView.ts +0 -151
- package/front_end/panels/application/InterestGroupTreeElement.ts +0 -65
- package/front_end/panels/application/components/InterestGroupAccessGrid.ts +0 -135
- package/front_end/panels/application/components/interestGroupAccessGrid.css +0 -27
- package/front_end/panels/application/interestGroupStorageView.css +0 -9
- package/front_end/panels/recorder/RecorderController.ts +0 -1595
- package/front_end/panels/sources/InplaceFormatterEditorAction.ts +0 -149
- /package/front_end/panels/recorder/{recorderController.css → recorderPanel.css} +0 -0
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import * as ControlButton from './ControlButton.js';
|
|
6
6
|
import * as CreateRecordingView from './CreateRecordingView.js';
|
|
7
|
-
import * as RecorderController from './RecorderController.js';
|
|
8
7
|
import * as RecorderEvents from './RecorderEvents.js';
|
|
9
8
|
import * as RecorderPanel from './RecorderPanel.js';
|
|
10
9
|
import * as RecordingListView from './RecordingListView.js';
|
|
@@ -18,7 +17,6 @@ import * as TimelineSection from './TimelineSection.js';
|
|
|
18
17
|
export {
|
|
19
18
|
ControlButton,
|
|
20
19
|
CreateRecordingView,
|
|
21
|
-
RecorderController,
|
|
22
20
|
RecorderEvents,
|
|
23
21
|
RecorderPanel,
|
|
24
22
|
RecordingListView,
|
|
@@ -75,6 +75,16 @@ const UIStrings = {
|
|
|
75
75
|
* @description Label for a button to collapse an accordion.
|
|
76
76
|
*/
|
|
77
77
|
showLess: 'Show less',
|
|
78
|
+
/**
|
|
79
|
+
* @description Accessible label for a button to expand an accordion for a specific setting.
|
|
80
|
+
* @example {Code suggestions} PH1
|
|
81
|
+
*/
|
|
82
|
+
showMoreOfSetting: 'Show more of {PH1}',
|
|
83
|
+
/**
|
|
84
|
+
* @description Accessible label for a button to collapse an accordion for a specific setting.
|
|
85
|
+
* @example {Code suggestions} PH1
|
|
86
|
+
*/
|
|
87
|
+
showLessOfSetting: 'Show less of {PH1}',
|
|
78
88
|
/**
|
|
79
89
|
* @description Header for a list of feature attributes. 'When on, you’ll be able to …'.
|
|
80
90
|
*/
|
|
@@ -358,6 +368,9 @@ export const AI_SETTINGS_TAB_DEFAULT_VIEW: View = (input, _output, target): void
|
|
|
358
368
|
<devtools-button
|
|
359
369
|
.data=${{
|
|
360
370
|
title: settingData.settingExpandState.isSettingExpanded ? i18nString(UIStrings.showLess) : i18nString(UIStrings.showMore),
|
|
371
|
+
accessibleLabel: settingData.settingExpandState.isSettingExpanded ?
|
|
372
|
+
i18nString(UIStrings.showLessOfSetting, {PH1: settingData.settingName}) :
|
|
373
|
+
i18nString(UIStrings.showMoreOfSetting, {PH1: settingData.settingName}),
|
|
361
374
|
size: Buttons.Button.Size.SMALL,
|
|
362
375
|
iconName: settingData.settingExpandState.isSettingExpanded ? 'chevron-up' : 'chevron-down',
|
|
363
376
|
variant: Buttons.Button.Variant.ICON,
|
|
@@ -11,7 +11,7 @@ import * as Host from '../../core/host/host.js';
|
|
|
11
11
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
12
12
|
import * as Platform from '../../core/platform/platform.js';
|
|
13
13
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
14
|
-
import
|
|
14
|
+
import * as Bindings from '../../models/bindings/bindings.js';
|
|
15
15
|
import * as Persistence from '../../models/persistence/persistence.js';
|
|
16
16
|
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
17
17
|
import * as Workspace from '../../models/workspace/workspace.js';
|
|
@@ -135,7 +135,8 @@ export class NetworkNavigatorView extends NavigatorView {
|
|
|
135
135
|
|
|
136
136
|
override acceptProject(project: Workspace.Workspace.Project): boolean {
|
|
137
137
|
return project.type() === Workspace.Workspace.projectTypes.Network &&
|
|
138
|
-
SDK.TargetManager.TargetManager.instance().isInScope(
|
|
138
|
+
SDK.TargetManager.TargetManager.instance().isInScope(
|
|
139
|
+
Bindings.NetworkProject.NetworkProject.getTargetForProject(project));
|
|
139
140
|
}
|
|
140
141
|
|
|
141
142
|
onScopeChange(): void {
|
|
@@ -345,9 +345,6 @@ export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typ
|
|
|
345
345
|
if (view instanceof UI.View.SimpleView) {
|
|
346
346
|
void view.toolbarItems().then(items => {
|
|
347
347
|
this.#scriptViewToolbar.removeToolbarItems();
|
|
348
|
-
for (const action of getRegisteredEditorActions()) {
|
|
349
|
-
this.#scriptViewToolbar.appendToolbarItem(action.getOrCreateButton(this));
|
|
350
|
-
}
|
|
351
348
|
if (Array.isArray(items)) {
|
|
352
349
|
items.map(item => this.#scriptViewToolbar.appendToolbarItem(item));
|
|
353
350
|
} else {
|
|
@@ -657,20 +654,6 @@ export interface EventTypes {
|
|
|
657
654
|
[Events.EDITOR_SELECTED]: Workspace.UISourceCode.UISourceCode;
|
|
658
655
|
}
|
|
659
656
|
|
|
660
|
-
export interface EditorAction {
|
|
661
|
-
getOrCreateButton(sourcesView: SourcesView): UI.Toolbar.ToolbarButton;
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
const registeredEditorActions: Array<() => EditorAction> = [];
|
|
665
|
-
|
|
666
|
-
export function registerEditorAction(editorAction: () => EditorAction): void {
|
|
667
|
-
registeredEditorActions.push(editorAction);
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
export function getRegisteredEditorActions(): EditorAction[] {
|
|
671
|
-
return registeredEditorActions.map(editorAction => editorAction());
|
|
672
|
-
}
|
|
673
|
-
|
|
674
657
|
export class SwitchFileActionDelegate implements UI.ActionRegistration.ActionDelegate {
|
|
675
658
|
private static nextFile(currentUISourceCode: Workspace.UISourceCode.UISourceCode): Workspace.UISourceCode.UISourceCode
|
|
676
659
|
|null {
|
|
@@ -6,8 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
import * as Common from '../../core/common/common.js';
|
|
8
8
|
import * as Host from '../../core/host/host.js';
|
|
9
|
+
import * as i18n from '../../core/i18n/i18n.js';
|
|
9
10
|
import * as FormatterActions from '../../entrypoints/formatter_worker/FormatterActions.js'; // eslint-disable-line @devtools/es-modules-import
|
|
10
11
|
import * as AiCodeCompletion from '../../models/ai_code_completion/ai_code_completion.js';
|
|
12
|
+
import * as Formatter from '../../models/formatter/formatter.js';
|
|
11
13
|
import * as IssuesManager from '../../models/issues_manager/issues_manager.js';
|
|
12
14
|
import * as Persistence from '../../models/persistence/persistence.js';
|
|
13
15
|
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
@@ -30,6 +32,15 @@ import {ResourceOriginPlugin} from './ResourceOriginPlugin.js';
|
|
|
30
32
|
import {SnippetsPlugin} from './SnippetsPlugin.js';
|
|
31
33
|
import {SourcesPanel} from './SourcesPanel.js';
|
|
32
34
|
|
|
35
|
+
const UIStrings = {
|
|
36
|
+
/**
|
|
37
|
+
* @description Title of the format button
|
|
38
|
+
*/
|
|
39
|
+
format: 'Format',
|
|
40
|
+
} as const;
|
|
41
|
+
const str_ = i18n.i18n.registerUIStrings('panels/sources/UISourceCodeFrame.ts', UIStrings);
|
|
42
|
+
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
43
|
+
|
|
33
44
|
export class UISourceCodeFrame extends Common.ObjectWrapper
|
|
34
45
|
.eventMixin<EventTypes, typeof SourceFrame.SourceFrame.SourceFrameImpl>(
|
|
35
46
|
SourceFrame.SourceFrame.SourceFrameImpl) {
|
|
@@ -290,6 +301,24 @@ export class UISourceCodeFrame extends Common.ObjectWrapper
|
|
|
290
301
|
this.maybeSetContent(this.#uiSourceCode.workingCopyContentData());
|
|
291
302
|
}
|
|
292
303
|
|
|
304
|
+
async #formatSourceInPlace(): Promise<void> {
|
|
305
|
+
const contentDataOrError = await this.workingCopy();
|
|
306
|
+
if (TextUtils.ContentData.ContentData.isError(contentDataOrError)) {
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
const content = TextUtils.ContentData.ContentData.textOr(contentDataOrError, '');
|
|
310
|
+
const {formattedContent, formattedMapping} = await Formatter.ScriptFormatter.format(
|
|
311
|
+
Common.Settings.Settings.instance(), this.#uiSourceCode.contentType(), this.contentType, content);
|
|
312
|
+
if (this.#uiSourceCode.workingCopy() === formattedContent) {
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
315
|
+
const selection = this.textEditor.toLineColumn(this.textEditor.state.selection.main.head);
|
|
316
|
+
const [lineNumber, columnNumber] =
|
|
317
|
+
formattedMapping.originalToFormatted(selection.lineNumber, selection.columnNumber);
|
|
318
|
+
this.#uiSourceCode.setWorkingCopy(formattedContent);
|
|
319
|
+
this.revealPosition({lineNumber, columnNumber});
|
|
320
|
+
}
|
|
321
|
+
|
|
293
322
|
private onWorkingCopyCommitted(): void {
|
|
294
323
|
if (!this.#muteSourceCodeEvents) {
|
|
295
324
|
this.maybeSetContent(this.uiSourceCode().workingCopyContentData());
|
|
@@ -433,6 +462,19 @@ export class UISourceCodeFrame extends Common.ObjectWrapper
|
|
|
433
462
|
|
|
434
463
|
override async toolbarItems(): Promise<UI.Toolbar.ToolbarItem[]> {
|
|
435
464
|
const leftToolbarItems = await super.toolbarItems();
|
|
465
|
+
|
|
466
|
+
const isEditable = Persistence.Persistence.PersistenceImpl.instance().hasEditableContent(this.#uiSourceCode);
|
|
467
|
+
const isJavaScript = Common.ResourceType.ResourceType.isJavaScriptMimeType(this.contentType);
|
|
468
|
+
const isInplaceFormattable = isEditable && isJavaScript;
|
|
469
|
+
|
|
470
|
+
if (isInplaceFormattable) {
|
|
471
|
+
const formatButton = new UI.Toolbar.ToolbarButton(i18nString(UIStrings.format), 'brackets');
|
|
472
|
+
formatButton.addEventListener(UI.Toolbar.ToolbarButton.Events.CLICK, () => {
|
|
473
|
+
void this.#formatSourceInPlace();
|
|
474
|
+
});
|
|
475
|
+
leftToolbarItems.unshift(formatButton);
|
|
476
|
+
}
|
|
477
|
+
|
|
436
478
|
const rightToolbarItems = [];
|
|
437
479
|
for (const plugin of this.plugins) {
|
|
438
480
|
leftToolbarItems.push(...plugin.leftToolbarItems());
|
|
@@ -18,7 +18,6 @@ import * as EditingLocationHistoryManager from './EditingLocationHistoryManager.
|
|
|
18
18
|
import * as FilePathScoreFunction from './FilePathScoreFunction.js';
|
|
19
19
|
import * as FilteredUISourceCodeListProvider from './FilteredUISourceCodeListProvider.js';
|
|
20
20
|
import * as GoToLineQuickOpen from './GoToLineQuickOpen.js';
|
|
21
|
-
import * as InplaceFormatterEditorAction from './InplaceFormatterEditorAction.js';
|
|
22
21
|
import * as NavigatorView from './NavigatorView.js';
|
|
23
22
|
import * as OpenFileQuickOpen from './OpenFileQuickOpen.js';
|
|
24
23
|
import * as OutlineQuickOpen from './OutlineQuickOpen.js';
|
|
@@ -54,7 +53,6 @@ export {
|
|
|
54
53
|
FilePathScoreFunction,
|
|
55
54
|
FilteredUISourceCodeListProvider,
|
|
56
55
|
GoToLineQuickOpen,
|
|
57
|
-
InplaceFormatterEditorAction,
|
|
58
56
|
NavigatorView,
|
|
59
57
|
OpenFileQuickOpen,
|
|
60
58
|
OutlineQuickOpen,
|
|
@@ -168,7 +168,6 @@ export const enum VisualLoggingTrackName {
|
|
|
168
168
|
THREAD_MAIN = 'thread.main',
|
|
169
169
|
THREAD_FRAME = 'thread.frame',
|
|
170
170
|
THREAD_WORKER = 'thread.worker',
|
|
171
|
-
THREAD_AUCTION_WORKLET = 'thread.auction-worklet',
|
|
172
171
|
THREAD_RASTERIZER = 'thread.rasterizer',
|
|
173
172
|
THREAD_POOL = 'thread.pool',
|
|
174
173
|
THREAD_OTHER = 'thread.other',
|
|
@@ -301,8 +300,6 @@ export class CompatibilityTracksAppender {
|
|
|
301
300
|
}
|
|
302
301
|
case Trace.Handlers.Threads.ThreadType.WORKER:
|
|
303
302
|
return 3;
|
|
304
|
-
case Trace.Handlers.Threads.ThreadType.AUCTION_WORKLET:
|
|
305
|
-
return 3;
|
|
306
303
|
case Trace.Handlers.Threads.ThreadType.RASTERIZER:
|
|
307
304
|
return 4;
|
|
308
305
|
case Trace.Handlers.Threads.ThreadType.THREAD_POOL:
|
|
@@ -328,20 +325,6 @@ export class CompatibilityTracksAppender {
|
|
|
328
325
|
continue;
|
|
329
326
|
}
|
|
330
327
|
|
|
331
|
-
const matchingWorklet = this.#parsedTrace.data.AuctionWorklets.worklets.get(pid);
|
|
332
|
-
if (matchingWorklet) {
|
|
333
|
-
// Each AuctionWorklet has two key threads:
|
|
334
|
-
// 1. the Utility Thread
|
|
335
|
-
// 2. the V8 Helper Thread - either a bidder or seller. see buildNameForAuctionWorklet()
|
|
336
|
-
// There are other threads in a worklet process, but we don't render them.
|
|
337
|
-
const tids = [matchingWorklet.args.data.utilityThread.tid, matchingWorklet.args.data.v8HelperThread.tid];
|
|
338
|
-
if (tids.includes(tid)) {
|
|
339
|
-
this.#threadAppenders.push(new ThreadAppender(
|
|
340
|
-
this, this.#parsedTrace, pid, tid, '', Trace.Handlers.Threads.ThreadType.AUCTION_WORKLET, entries, tree));
|
|
341
|
-
}
|
|
342
|
-
continue;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
328
|
// The Common case… Add the main thread, or iframe, or thread pool, etc.
|
|
346
329
|
this.#threadAppenders.push(new ThreadAppender(this, this.#parsedTrace, pid, tid, name, type, entries, tree));
|
|
347
330
|
}
|
|
@@ -87,48 +87,7 @@ const UIStrings = {
|
|
|
87
87
|
* @example {2} PH1
|
|
88
88
|
*/
|
|
89
89
|
threadPoolThreadS: 'Thread pool worker {PH1}',
|
|
90
|
-
/**
|
|
91
|
-
* @description Title of a bidder auction worklet with known URL in the timeline flame chart of the Performance panel
|
|
92
|
-
* @example {https://google.com} PH1
|
|
93
|
-
*/
|
|
94
|
-
bidderWorkletS: 'Bidder Worklet — {PH1}',
|
|
95
|
-
/**
|
|
96
|
-
* @description Title of a bidder auction worklet in the timeline flame chart of the Performance panel with an unknown URL
|
|
97
|
-
*/
|
|
98
|
-
bidderWorklet: 'Bidder Worklet',
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* @description Title of a seller auction worklet in the timeline flame chart of the Performance panel with an unknown URL
|
|
102
|
-
*/
|
|
103
|
-
sellerWorklet: 'Seller Worklet',
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* @description Title of an auction worklet in the timeline flame chart of the Performance panel with an unknown URL
|
|
107
|
-
*/
|
|
108
|
-
unknownWorklet: 'Auction Worklet',
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* @description Title of control thread of a service process for an auction worklet in the timeline flame chart of the Performance panel with an unknown URL
|
|
112
|
-
*/
|
|
113
|
-
workletService: 'Auction Worklet service',
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* @description Title of a seller auction worklet with known URL in the timeline flame chart of the Performance panel
|
|
117
|
-
* @example {https://google.com} PH1
|
|
118
|
-
*/
|
|
119
|
-
sellerWorkletS: 'Seller Worklet — {PH1}',
|
|
120
90
|
|
|
121
|
-
/**
|
|
122
|
-
* @description Title of an auction worklet with known URL in the timeline flame chart of the Performance panel
|
|
123
|
-
* @example {https://google.com} PH1
|
|
124
|
-
*/
|
|
125
|
-
unknownWorkletS: 'Auction Worklet — {PH1}',
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* @description Title of control thread of a service process for an auction worklet with known URL in the timeline flame chart of the Performance panel
|
|
129
|
-
* @example {https://google.com} PH1
|
|
130
|
-
*/
|
|
131
|
-
workletServiceS: 'Auction Worklet service — {PH1}',
|
|
132
91
|
} as const;
|
|
133
92
|
|
|
134
93
|
const str_ = i18n.i18n.registerUIStrings('panels/timeline/ThreadAppender.ts', UIStrings);
|
|
@@ -181,12 +140,6 @@ export class ThreadAppender implements TrackAppender {
|
|
|
181
140
|
this.#threadDefaultName = threadName || i18nString(UIStrings.threadS, {PH1: threadId});
|
|
182
141
|
this.isOnMainFrame = Boolean(this.#parsedTrace.data.Renderer?.processes.get(processId)?.isOnMainFrame);
|
|
183
142
|
this.threadType = type;
|
|
184
|
-
// AuctionWorklets are threads, so we re-use this appender rather than
|
|
185
|
-
// duplicate it, but we change the name because we want to render these
|
|
186
|
-
// lower down than other threads.
|
|
187
|
-
if (this.#parsedTrace.data.AuctionWorklets.worklets.has(processId)) {
|
|
188
|
-
this.appenderName = 'Thread_AuctionWorklet';
|
|
189
|
-
}
|
|
190
143
|
this.#url = this.#parsedTrace.data.Renderer?.processes.get(this.#processId)?.url || '';
|
|
191
144
|
}
|
|
192
145
|
|
|
@@ -279,8 +232,6 @@ export class ThreadAppender implements TrackAppender {
|
|
|
279
232
|
return VisualLoggingTrackName.THREAD_WORKER;
|
|
280
233
|
case Trace.Handlers.Threads.ThreadType.RASTERIZER:
|
|
281
234
|
return VisualLoggingTrackName.THREAD_RASTERIZER;
|
|
282
|
-
case Trace.Handlers.Threads.ThreadType.AUCTION_WORKLET:
|
|
283
|
-
return VisualLoggingTrackName.THREAD_AUCTION_WORKLET;
|
|
284
235
|
case Trace.Handlers.Threads.ThreadType.OTHER:
|
|
285
236
|
return VisualLoggingTrackName.THREAD_OTHER;
|
|
286
237
|
case Trace.Handlers.Threads.ThreadType.CPU_PROFILE:
|
|
@@ -350,9 +301,6 @@ export class ThreadAppender implements TrackAppender {
|
|
|
350
301
|
break;
|
|
351
302
|
case Trace.Handlers.Threads.ThreadType.OTHER:
|
|
352
303
|
break;
|
|
353
|
-
case Trace.Handlers.Threads.ThreadType.AUCTION_WORKLET:
|
|
354
|
-
threadTypeLabel = this.#buildNameForAuctionWorklet();
|
|
355
|
-
break;
|
|
356
304
|
default:
|
|
357
305
|
return Platform.assertNever(this.threadType, `Unknown thread type: ${this.threadType}`);
|
|
358
306
|
}
|
|
@@ -371,60 +319,6 @@ export class ThreadAppender implements TrackAppender {
|
|
|
371
319
|
return this.#entries;
|
|
372
320
|
}
|
|
373
321
|
|
|
374
|
-
#buildNameForAuctionWorklet(): string {
|
|
375
|
-
const workletMetadataEvent = this.#parsedTrace.data.AuctionWorklets.worklets.get(this.#processId);
|
|
376
|
-
// We should always have this event - if we do not, we were instantiated with invalid data.
|
|
377
|
-
if (!workletMetadataEvent) {
|
|
378
|
-
return i18nString(UIStrings.unknownWorklet);
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
// Host could be empty - in which case we do not want to add it.
|
|
382
|
-
const host = workletMetadataEvent.host ? `https://${workletMetadataEvent.host}` : '';
|
|
383
|
-
const shouldAddHost = host.length > 0;
|
|
384
|
-
|
|
385
|
-
// For each Auction Worklet in a page there are two threads we care about on the same process.
|
|
386
|
-
// 1. The "Worklet Service" which is a generic helper service. This thread
|
|
387
|
-
// is always named "auction_worklet.CrUtilityMain".
|
|
388
|
-
//
|
|
389
|
-
// 2. The "Seller/Bidder" service. This thread is always named
|
|
390
|
-
// "AuctionV8HelperThread". The AuctionWorkets handler does the job of
|
|
391
|
-
// figuring this out for us - the metadata event it provides for each
|
|
392
|
-
// worklet process will have a `type` already set.
|
|
393
|
-
//
|
|
394
|
-
// Therefore, for this given thread, which we know is part of
|
|
395
|
-
// an AuctionWorklet process, we need to figure out if this thread is the
|
|
396
|
-
// generic service, or a seller/bidder worklet.
|
|
397
|
-
//
|
|
398
|
-
// Note that the worklet could also have the "unknown" type - this is not
|
|
399
|
-
// expected but implemented to prevent trace event changes causing DevTools
|
|
400
|
-
// to break with unknown worklet types.
|
|
401
|
-
const isUtilityThread = workletMetadataEvent.args.data.utilityThread.tid === this.#threadId;
|
|
402
|
-
const isBidderOrSeller = workletMetadataEvent.args.data.v8HelperThread.tid === this.#threadId;
|
|
403
|
-
|
|
404
|
-
if (isUtilityThread) {
|
|
405
|
-
return shouldAddHost ? i18nString(UIStrings.workletServiceS, {PH1: host}) : i18nString(UIStrings.workletService);
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
if (isBidderOrSeller) {
|
|
409
|
-
switch (workletMetadataEvent.type) {
|
|
410
|
-
case Trace.Types.Events.AuctionWorkletType.SELLER:
|
|
411
|
-
return shouldAddHost ? i18nString(UIStrings.sellerWorkletS, {PH1: host}) :
|
|
412
|
-
i18nString(UIStrings.sellerWorklet);
|
|
413
|
-
case Trace.Types.Events.AuctionWorkletType.BIDDER:
|
|
414
|
-
return shouldAddHost ? i18nString(UIStrings.bidderWorkletS, {PH1: host}) :
|
|
415
|
-
i18nString(UIStrings.bidderWorklet);
|
|
416
|
-
case Trace.Types.Events.AuctionWorkletType.UNKNOWN:
|
|
417
|
-
return shouldAddHost ? i18nString(UIStrings.unknownWorkletS, {PH1: host}) :
|
|
418
|
-
i18nString(UIStrings.unknownWorklet);
|
|
419
|
-
default:
|
|
420
|
-
Platform.assertNever(
|
|
421
|
-
workletMetadataEvent.type, `Unexpected Auction Worklet Type ${workletMetadataEvent.type}`);
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
// We should never reach here, but just in case!
|
|
425
|
-
return shouldAddHost ? i18nString(UIStrings.unknownWorkletS, {PH1: host}) : i18nString(UIStrings.unknownWorklet);
|
|
426
|
-
}
|
|
427
|
-
|
|
428
322
|
#buildNameForWorker(): string {
|
|
429
323
|
const url = this.#parsedTrace.data.Renderer?.processes.get(this.#processId)?.url || '';
|
|
430
324
|
const workerId = this.#parsedTrace.data.Workers.workerIdByThread.get(this.#threadId);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Name: Dependencies sourced from the upstream `chromium` repository
|
|
2
2
|
URL: Internal
|
|
3
3
|
Version: N/A
|
|
4
|
-
Revision:
|
|
4
|
+
Revision: 7eaaa785deda657a652efc66266b8cc2957167f9
|
|
5
5
|
Update Mechanism: Manual (https://crbug.com/428069060)
|
|
6
6
|
License: BSD-3-Clause
|
|
7
7
|
License File: LICENSE
|
|
@@ -55,13 +55,19 @@ export class Report extends HTMLElement {
|
|
|
55
55
|
#render(): void {
|
|
56
56
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
57
57
|
// clang-format off
|
|
58
|
+
const hasToolbar = this.querySelector('[slot="toolbar"]') !== null;
|
|
58
59
|
render(html`
|
|
59
60
|
<style>${reportStyles}</style>
|
|
60
|
-
${this.#reportTitle ? html
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
${(this.#reportTitle || hasToolbar) ? html`
|
|
62
|
+
<div class="report-header-wrapper">
|
|
63
|
+
${this.#reportTitle ? html`<h1 class="report-title">
|
|
64
|
+
${this.#reportTitle}
|
|
65
|
+
${this.#reportUrl ? Components.Linkifier.Linkifier.linkifyURL(this.#reportUrl, {
|
|
66
|
+
tabStop: true, jslogContext: 'source-location', className: 'report-url'}) : nothing}
|
|
67
|
+
</h1>` : nothing}
|
|
68
|
+
<slot name="toolbar"></slot>
|
|
69
|
+
</div>
|
|
70
|
+
` : nothing}
|
|
65
71
|
<div class="content">
|
|
66
72
|
<slot></slot>
|
|
67
73
|
</div>
|
|
@@ -16,13 +16,16 @@
|
|
|
16
16
|
margin: var(--sys-size-5) 0;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
.report-header-wrapper {
|
|
20
|
+
border-bottom: 1px solid var(--sys-color-divider);
|
|
21
|
+
}
|
|
22
|
+
|
|
19
23
|
.report-title {
|
|
20
24
|
padding: var(--sys-size-7) var(--sys-size-9);
|
|
21
25
|
font: var(--sys-typescale-headline4);
|
|
22
26
|
white-space: nowrap;
|
|
23
27
|
overflow: hidden;
|
|
24
28
|
text-overflow: ellipsis;
|
|
25
|
-
border-bottom: 1px solid var(--sys-color-divider);
|
|
26
29
|
color: var(--sys-color-on-surface);
|
|
27
30
|
background-color: var(--sys-color-cdt-base-container);
|
|
28
31
|
margin: 0;
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
/* eslint-disable @devtools/no-lit-render-outside-of-view, @devtools/enforce-custom-element-definitions-location */
|
|
5
5
|
|
|
6
|
-
import {html, render} from '../../lit/lit.js';
|
|
6
|
+
import {Directives, html, render} from '../../lit/lit.js';
|
|
7
7
|
|
|
8
8
|
import spinnerStyles from './spinner.css.js';
|
|
9
9
|
|
|
10
|
+
const {classMap} = Directives;
|
|
11
|
+
|
|
10
12
|
export interface SpinnerProperties {
|
|
11
13
|
active: boolean;
|
|
12
14
|
}
|
|
@@ -48,39 +50,34 @@ export class Spinner extends HTMLElement {
|
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
#render(): void {
|
|
51
|
-
// The radius
|
|
52
|
-
//
|
|
53
|
-
// https://github.com/material-components/material-components-web/tree/master/packages/mdc-circular-progress.
|
|
54
|
-
// Changing the value of the radius will cause errors in animation.
|
|
53
|
+
// The radius is set to 40 to allow for stroke width padding, and
|
|
54
|
+
// pathLength=100 is used for scalable, unitless animation length.
|
|
55
55
|
// clang-format off
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
</
|
|
66
|
-
<
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
56
|
+
const spinnerClasses = {
|
|
57
|
+
indeterminate: this.active,
|
|
58
|
+
spinner: true,
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
render(
|
|
62
|
+
html`
|
|
63
|
+
<style>
|
|
64
|
+
${spinnerStyles}
|
|
65
|
+
</style>
|
|
66
|
+
<svg
|
|
67
|
+
class=${classMap(spinnerClasses)}
|
|
68
|
+
viewBox="0 0 100 100"
|
|
69
|
+
>
|
|
70
|
+
<circle
|
|
71
|
+
cx="50"
|
|
72
|
+
cy="50"
|
|
73
|
+
r="44"
|
|
74
|
+
pathLength="100"
|
|
75
|
+
></circle>
|
|
75
76
|
</svg>
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
${spinnerStyles}
|
|
81
|
-
</style>
|
|
82
|
-
${content}
|
|
83
|
-
`, this.#shadow, {host: this});
|
|
77
|
+
`,
|
|
78
|
+
this.#shadow,
|
|
79
|
+
{host: this},
|
|
80
|
+
);
|
|
84
81
|
// clang-format on
|
|
85
82
|
}
|
|
86
83
|
}
|
|
@@ -18,87 +18,43 @@
|
|
|
18
18
|
animation: spinner-container-animation 1.5s linear infinite;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.
|
|
21
|
+
.spinner {
|
|
22
|
+
height: 100%;
|
|
23
|
+
width: 100%;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.spinner.indeterminate {
|
|
22
27
|
/*
|
|
23
28
|
* The value for animation duration has been obtained by plugging in values defined
|
|
24
29
|
* in packages/mdc-circular-progress/_circular-progress-theme.scss to
|
|
25
30
|
* functions defined in packages/mdc-circular-progress/_circular-progress.scss.
|
|
26
31
|
* https://github.com/material-components/material-components-web
|
|
27
32
|
*/
|
|
28
|
-
animation: indeterminate-spinner-animation 5332ms cubic-bezier(0.4, 0, 0.2, 1)
|
|
29
|
-
|
|
30
|
-
width: 100%;
|
|
31
|
-
|
|
32
|
-
.left-circle {
|
|
33
|
-
height: 100%;
|
|
34
|
-
width: 50%;
|
|
35
|
-
display: inline-block;
|
|
36
|
-
position: relative;
|
|
37
|
-
overflow: hidden;
|
|
38
|
-
|
|
39
|
-
& > svg {
|
|
40
|
-
position: absolute;
|
|
41
|
-
width: 200%;
|
|
42
|
-
/*
|
|
43
|
-
* The value for animation duration has been obtained from values defined
|
|
44
|
-
* in packages/mdc-circular-progress/_circular-progress-theme.scss
|
|
45
|
-
* https://github.com/material-components/material-components-web
|
|
46
|
-
*/
|
|
47
|
-
animation: indeterminate-left-circle-spinner-animation 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.center-circle {
|
|
52
|
-
height: 100%;
|
|
53
|
-
width: 5%;
|
|
54
|
-
display: inline-block;
|
|
55
|
-
position: absolute;
|
|
56
|
-
overflow: hidden;
|
|
57
|
-
top: 0;
|
|
58
|
-
left: 47.5%;
|
|
59
|
-
box-sizing: border-box;
|
|
60
|
-
|
|
61
|
-
& > svg {
|
|
62
|
-
position: absolute;
|
|
63
|
-
width: 2000%;
|
|
64
|
-
left: -900%;
|
|
65
|
-
transform: rotate(180deg);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
33
|
+
animation: indeterminate-spinner-animation 5332ms cubic-bezier(0.4, 0, 0.2, 1)
|
|
34
|
+
infinite both;
|
|
68
35
|
|
|
69
|
-
.right-circle {
|
|
70
|
-
height: 100%;
|
|
71
|
-
width: 50%;
|
|
72
|
-
display: inline-block;
|
|
73
|
-
position: relative;
|
|
74
|
-
overflow: hidden;
|
|
75
|
-
|
|
76
|
-
& > svg {
|
|
77
|
-
position: absolute;
|
|
78
|
-
width: 200%;
|
|
79
|
-
left: -100%;
|
|
80
|
-
/*
|
|
81
|
-
* The value for animation duration has been obtained from values defined
|
|
82
|
-
* in packages/mdc-circular-progress/_circular-progress-theme.scss
|
|
83
|
-
* https://github.com/material-components/material-components-web
|
|
84
|
-
*/
|
|
85
|
-
animation: indeterminate-right-circle-spinner-animation 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
36
|
}
|
|
89
37
|
|
|
90
|
-
.
|
|
38
|
+
.spinner circle {
|
|
91
39
|
stroke: var(--sys-color-state-disabled);
|
|
92
40
|
stroke-width: var(--sys-size-6);
|
|
93
41
|
fill: transparent;
|
|
42
|
+
transform-origin: 50% 50%;
|
|
43
|
+
transform: rotate(-90deg);
|
|
94
44
|
}
|
|
95
45
|
|
|
96
|
-
|
|
46
|
+
|
|
47
|
+
.spinner.indeterminate circle {
|
|
97
48
|
stroke: var(--sys-color-primary);
|
|
98
|
-
stroke-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
49
|
+
stroke-dasharray: 100, 100;
|
|
50
|
+
stroke-dashoffset: 0;
|
|
51
|
+
/*
|
|
52
|
+
* The value for animation duration has been obtained from values defined
|
|
53
|
+
* in packages/mdc-circular-progress/_circular-progress-theme.scss
|
|
54
|
+
* https://github.com/material-components/material-components-web
|
|
55
|
+
*/
|
|
56
|
+
animation: indeterminate-spinner-circle-animation 1333ms
|
|
57
|
+
cubic-bezier(0.4, 0, 0.2, 1) infinite both;
|
|
102
58
|
}
|
|
103
59
|
|
|
104
60
|
@keyframes spinner-container-animation {
|
|
@@ -141,30 +97,22 @@
|
|
|
141
97
|
}
|
|
142
98
|
}
|
|
143
99
|
|
|
144
|
-
@keyframes indeterminate-
|
|
145
|
-
0% {
|
|
146
|
-
transform: rotate(265deg);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
50% {
|
|
150
|
-
transform: rotate(130deg);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
100% {
|
|
154
|
-
transform: rotate(265deg);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
@keyframes indeterminate-right-circle-spinner-animation {
|
|
100
|
+
@keyframes indeterminate-spinner-circle-animation {
|
|
159
101
|
0% {
|
|
160
|
-
|
|
102
|
+
stroke-dasharray: 5, 100;
|
|
103
|
+
stroke-dashoffset: 0;
|
|
104
|
+
transform: rotate(-90deg);
|
|
161
105
|
}
|
|
162
106
|
|
|
163
107
|
50% {
|
|
164
|
-
|
|
108
|
+
stroke-dasharray: 75, 100;
|
|
109
|
+
stroke-dashoffset: 0;
|
|
110
|
+
transform: rotate(-225deg);
|
|
165
111
|
}
|
|
166
112
|
|
|
167
113
|
100% {
|
|
168
|
-
|
|
114
|
+
stroke-dasharray: 5, 100;
|
|
115
|
+
stroke-dashoffset: 0;
|
|
116
|
+
transform: rotate(-90deg);
|
|
169
117
|
}
|
|
170
118
|
}
|