chrome-devtools-frontend 1.0.1674545 → 1.0.1676824
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-ux-writing-refactor/SKILL.md +26 -9
- package/WATCHLISTS +0 -4
- package/front_end/core/common/ParsedURL.ts +5 -1
- package/front_end/core/common/SettingRegistration.ts +29 -8
- package/front_end/core/common/Settings.ts +0 -77
- package/front_end/core/root/Runtime.ts +4 -5
- package/front_end/core/sdk/CSSMetadata.ts +5 -9
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +8 -28
- package/front_end/core/sdk/DebuggerModel.ts +50 -30
- package/front_end/core/sdk/ResourceTreeModel.ts +20 -1
- package/front_end/core/sdk/Script.ts +9 -53
- package/front_end/core/sdk/TargetManager.ts +18 -0
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +213 -23
- package/front_end/entrypoints/main/MainImpl.ts +32 -0
- package/front_end/foundation/Universe.ts +44 -29
- package/front_end/generated/InspectorBackendCommands.ts +3 -1
- package/front_end/generated/SupportedCSSProperties.ts +21 -4
- package/front_end/generated/protocol-mapping.d.ts +14 -0
- package/front_end/generated/protocol-proxy-api.d.ts +10 -0
- package/front_end/generated/protocol.ts +35 -0
- package/front_end/models/ai_assistance/AiAgent2.ts +11 -0
- package/front_end/models/ai_assistance/AiConversation.ts +22 -5
- package/front_end/models/ai_assistance/README.md +52 -26
- package/front_end/models/ai_assistance/agents/AiAgent.ts +54 -8
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +1 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +15 -192
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +8 -87
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -1
- package/front_end/models/ai_assistance/ai_assistance.ts +16 -0
- package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +124 -0
- package/front_end/models/ai_assistance/contexts/StorageContext.ts +111 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +69 -1
- package/front_end/models/ai_assistance/skills/README.md +63 -1
- package/front_end/models/ai_assistance/skills/Skill.ts +1 -1
- package/front_end/models/ai_assistance/skills/SkillRegistry.ts +4 -0
- package/front_end/models/ai_assistance/skills/performance.md +8 -0
- package/front_end/models/ai_assistance/skills/sources.md +16 -0
- package/front_end/models/ai_assistance/skills/storage.md +31 -0
- package/front_end/models/ai_assistance/tools/GetSourceContent.ts +101 -0
- package/front_end/models/ai_assistance/tools/GetTraceEventByKey.ts +83 -0
- package/front_end/models/ai_assistance/tools/GetTraceMainThreadSummary.ts +106 -0
- package/front_end/models/ai_assistance/tools/GetTraceNetworkSummary.ts +104 -0
- package/front_end/models/ai_assistance/tools/ListPageOrigins.ts +81 -0
- package/front_end/models/ai_assistance/tools/ListSources.ts +116 -0
- package/front_end/models/ai_assistance/tools/SelectTraceEventByKey.ts +90 -0
- package/front_end/models/ai_assistance/tools/Tool.ts +22 -1
- package/front_end/models/ai_assistance/tools/ToolRegistry.ts +14 -0
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +4 -0
- package/front_end/models/bindings/CompilerScriptMapping.ts +4 -0
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +8 -0
- package/front_end/models/bindings/ResourceScriptMapping.ts +3 -201
- package/front_end/models/bindings/SASSSourceMapping.ts +6 -0
- package/front_end/models/breakpoints/BreakpointManager.ts +2 -49
- package/front_end/models/emulation/DeviceModeModel.ts +60 -71
- package/front_end/models/emulation/EmulatedDevices.ts +18 -66
- package/front_end/models/heap_snapshot/HeapSnapshotModel.ts +27 -0
- package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +10 -2
- package/front_end/models/issues_manager/descriptions/connectionAllowlistEmbeddingRequirementNotSatisfied.md +26 -0
- package/front_end/models/issues_manager/descriptions/connectionAllowlistIFrameAttributeLoosensEmbeddingRequirement.md +19 -0
- package/front_end/models/issues_manager/descriptions/connectionAllowlistInvalidAllowConnectionAllowlistFrom.md +21 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +1 -1
- package/front_end/models/persistence/AutomaticFileSystemManager.ts +2 -2
- package/front_end/models/persistence/IsolatedFileSystem.ts +7 -8
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +22 -31
- package/front_end/models/persistence/PlatformFileSystem.ts +1 -1
- package/front_end/models/persistence/persistence-meta.ts +9 -9
- package/front_end/models/trace/types/TraceEvents.ts +36 -0
- package/front_end/models/workspace/FileManager.ts +13 -6
- package/front_end/panels/accessibility/ARIAAttributesView.ts +3 -3
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +36 -36
- package/front_end/panels/accessibility/AccessibilityStrings.ts +168 -168
- package/front_end/panels/accessibility/SourceOrderView.ts +7 -7
- package/front_end/panels/accessibility/accessibility-meta.ts +2 -2
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +5 -5
- package/front_end/panels/ai_assistance/components/AIv2MarkdownRenderer.ts +2 -3
- package/front_end/panels/ai_assistance/components/ChatInput.ts +2 -2
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +27 -2
- package/front_end/panels/application/IndexedDBViews.ts +65 -63
- package/front_end/panels/application/WebMCPView.ts +29 -12
- package/front_end/panels/application/components/AdsView.ts +24 -1
- package/front_end/panels/application/components/adsView.css +27 -21
- package/front_end/panels/autofill/AutofillView.ts +12 -12
- package/front_end/panels/autofill/autofill-meta.ts +2 -2
- package/front_end/panels/common/AiCodeCompletionSummaryToolbar.ts +5 -5
- package/front_end/panels/common/BadgeNotification.ts +8 -8
- package/front_end/panels/common/ExtensionServer.ts +21 -1
- package/front_end/panels/common/GdpSignUpDialog.ts +16 -16
- package/front_end/panels/common/GeminiRebrandPromoDialog.ts +5 -6
- package/front_end/panels/common/PersistenceUtils.ts +2 -2
- package/front_end/panels/common/common.ts +0 -97
- package/front_end/panels/console/ConsoleInsightTeaser.ts +2 -2
- package/front_end/panels/console/ConsolePinPane.ts +2 -2
- package/front_end/panels/console/ConsoleView.ts +20 -19
- package/front_end/panels/elements/ElementsTreeElement.ts +550 -327
- package/front_end/panels/elements/ElementsTreeOutline.ts +1 -1
- package/front_end/panels/elements/LayoutPane.ts +2 -8
- package/front_end/panels/event_listeners/EventListenersView.ts +8 -4
- package/front_end/panels/issues/AffectedTrackingSitesView.ts +25 -14
- package/front_end/panels/js_timeline/js_timeline-meta.ts +8 -8
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +30 -30
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +6 -6
- package/front_end/panels/layer_viewer/LayerViewHost.ts +1 -1
- package/front_end/panels/layer_viewer/Layers3DView.ts +11 -11
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +8 -8
- package/front_end/panels/layer_viewer/TransformController.ts +3 -3
- package/front_end/panels/layer_viewer/layer_viewer-meta.ts +11 -11
- package/front_end/panels/media/PlayerMessagesView.ts +149 -68
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +1 -58
- package/front_end/panels/mobile_throttling/mobile_throttling.ts +0 -10
- package/front_end/panels/network/NetworkPanel.ts +1 -1
- package/front_end/panels/network/RequestPayloadView.ts +1 -0
- package/front_end/panels/profiler/HeapSnapshotView.ts +0 -2
- package/front_end/panels/profiler/heapProfiler.css +0 -9
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +7 -0
- package/front_end/panels/recorder/RecorderPanel.ts +2 -3
- package/front_end/panels/screencast/ScreencastView.ts +148 -138
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +1 -2
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +2 -2
- package/front_end/panels/sources/DebuggerPlugin.ts +9 -58
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
- package/front_end/panels/sources/UISourceCodeFrame.ts +3 -8
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +4 -2
- package/front_end/panels/timeline/TimelineController.ts +36 -64
- package/front_end/panels/timeline/TimelinePanel.ts +11 -8
- package/front_end/panels/timeline/TimelineUIUtils.ts +5 -2
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +2 -2
- package/front_end/panels/timeline/timelinePanel.css +0 -10
- package/front_end/panels/utils/utils.ts +7 -7
- package/front_end/services/tracing/PerformanceTracing.ts +5 -17
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
- package/front_end/third_party/codemirror.next/package.json +2 -2
- package/front_end/third_party/codemirror.next/rebuild.sh +4 -1
- package/front_end/ui/comments/CommentAnchorResolver.ts +558 -0
- package/front_end/ui/comments/CommentManager.ts +640 -0
- package/front_end/ui/comments/CommentsOverlayWidget.ts +121 -0
- package/front_end/ui/comments/comments.ts +13 -0
- package/front_end/ui/comments/commentsOverlay.css +49 -0
- package/front_end/{panels/common → ui/components/dialogs}/FreDialog.ts +6 -6
- package/front_end/ui/components/dialogs/TypeToAllowDialog.ts +96 -0
- package/front_end/ui/components/dialogs/dialogs.ts +4 -0
- package/front_end/ui/components/settings/SettingCheckbox.ts +3 -3
- package/front_end/{panels/common → ui/components/text_editor}/AiCodeCompletionDisclaimer.ts +13 -13
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +7 -6
- package/front_end/{panels/common → ui/components/text_editor}/AiCodeCompletionTeaser.ts +43 -46
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +22 -26
- package/front_end/{panels/common → ui/components/text_editor}/AiCodeGenerationTeaser.ts +10 -10
- package/front_end/{panels/common → ui/components/text_editor}/AiCodeGenerationUpgradeDialog.ts +5 -5
- package/front_end/ui/components/text_editor/text_editor.ts +4 -0
- package/front_end/ui/legacy/Toolbar.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +40 -0
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +11 -3
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +270 -162
- package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +5 -0
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +11 -16
- package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +5 -12
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +8 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +2 -2
- package/front_end/ui/legacy/components/utils/Linkifier.ts +1 -0
- package/front_end/ui/settings/SettingUIRegistration.ts +59 -6
- package/front_end/ui/visual_logging/Debugging.ts +1 -5
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
- package/front_end/ui/visual_logging/LoggingConfig.ts +21 -0
- package/front_end/ui/visual_logging/visual_logging.ts +9 -0
- package/mcp/mcp.ts +6 -1
- package/package.json +1 -1
- package/front_end/Images/toolbarResizerVertical.png +0 -0
- package/front_end/emulated_devices/MotoG4-landscape.svg +0 -155
- package/front_end/emulated_devices/MotoG4-portrait.svg +0 -155
- package/front_end/emulated_devices/Nexus5X-landscape.svg +0 -19
- package/front_end/emulated_devices/Nexus5X-portrait.svg +0 -19
- package/front_end/emulated_devices/Nexus6P-landscape.svg +0 -50
- package/front_end/emulated_devices/Nexus6P-portrait.svg +0 -54
- package/front_end/emulated_devices/google-nest-hub-horizontal.png +0 -0
- package/front_end/emulated_devices/google-nest-hub-max-horizontal.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-default-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-default-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-keyboard-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-keyboard-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-navigation-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-navigation-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-default-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-default-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-keyboard-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-keyboard-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-navigation-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-navigation-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-default-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-default-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-keyboard-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-keyboard-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-navigation-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-navigation-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-default-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-default-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-keyboard-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-keyboard-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-navigation-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-navigation-2x.png +0 -0
- package/front_end/emulated_devices/iPad-landscape.svg +0 -73
- package/front_end/emulated_devices/iPad-portrait.svg +0 -76
- package/front_end/emulated_devices/iPhone5-landscape.svg +0 -99
- package/front_end/emulated_devices/iPhone5-portrait.svg +0 -83
- package/front_end/emulated_devices/iPhone6-landscape.svg +0 -111
- package/front_end/emulated_devices/iPhone6-portrait.svg +0 -116
- package/front_end/emulated_devices/iPhone6Plus-landscape.svg +0 -118
- package/front_end/emulated_devices/iPhone6Plus-portrait.svg +0 -116
- package/front_end/emulated_devices/optimized/MotoG4-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/MotoG4-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/Nexus5X-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/Nexus5X-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/Nexus6P-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/Nexus6P-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/README.md +0 -9
- package/front_end/emulated_devices/optimized/google-nest-hub-horizontal.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nest-hub-max-horizontal.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/iPad-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/iPad-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone5-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone5-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone6-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone6-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone6Plus-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone6Plus-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/optimized_images.gni +0 -53
- package/front_end/models/ai_assistance/agents/README.md +0 -136
- package/front_end/panels/mobile_throttling/MobileThrottlingSelector.ts +0 -92
- /package/front_end/{panels/common → ui/components/dialogs}/freDialog.css +0 -0
- /package/front_end/{panels/common/common.css → ui/components/dialogs/typeToAllowDialog.css} +0 -0
- /package/front_end/{panels/common → ui/components/text_editor}/aiCodeCompletionDisclaimer.css +0 -0
- /package/front_end/{panels/common → ui/components/text_editor}/aiCodeCompletionTeaser.css +0 -0
- /package/front_end/{panels/common → ui/components/text_editor}/aiCodeGenerationTeaser.css +0 -0
- /package/front_end/{panels/common → ui/components/text_editor}/aiCodeGenerationUpgradeDialog.css +0 -0
|
@@ -48,12 +48,6 @@ const str_ = i18n.i18n.registerUIStrings('models/emulation/EmulatedDevices.ts',
|
|
|
48
48
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
|
49
49
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
50
50
|
|
|
51
|
-
export function computeRelativeImageURL(cssURLValue: string): string {
|
|
52
|
-
return cssURLValue.replace(/@url\(([^\)]*?)\)/g, (_match: string, url: string) => {
|
|
53
|
-
return new URL(`../../emulated_devices/${url}`, import.meta.url).toString();
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
|
|
57
51
|
export class EmulatedDevice {
|
|
58
52
|
title: string;
|
|
59
53
|
type: Type;
|
|
@@ -75,8 +69,8 @@ export class EmulatedDevice {
|
|
|
75
69
|
constructor() {
|
|
76
70
|
this.title = '';
|
|
77
71
|
this.type = Type.Unknown;
|
|
78
|
-
this.vertical = {width: 0, height: 0,
|
|
79
|
-
this.horizontal = {width: 0, height: 0,
|
|
72
|
+
this.vertical = {width: 0, height: 0, hinge: null};
|
|
73
|
+
this.horizontal = {width: 0, height: 0, hinge: null};
|
|
80
74
|
this.deviceScaleFactor = 1;
|
|
81
75
|
this.capabilities = [Capability.TOUCH, Capability.MOBILE];
|
|
82
76
|
this.userAgent = '';
|
|
@@ -85,8 +79,8 @@ export class EmulatedDevice {
|
|
|
85
79
|
|
|
86
80
|
this.isDualScreen = false;
|
|
87
81
|
this.isFoldableScreen = false;
|
|
88
|
-
this.verticalSpanned = {width: 0, height: 0,
|
|
89
|
-
this.horizontalSpanned = {width: 0, height: 0,
|
|
82
|
+
this.verticalSpanned = {width: 0, height: 0, hinge: null};
|
|
83
|
+
this.horizontalSpanned = {width: 0, height: 0, hinge: null};
|
|
90
84
|
|
|
91
85
|
this.#show = Show.Default;
|
|
92
86
|
this.#showByDefault = true;
|
|
@@ -202,15 +196,6 @@ export class EmulatedDevice {
|
|
|
202
196
|
throw new Error('Emulated device has wrong height: ' + result.height);
|
|
203
197
|
}
|
|
204
198
|
|
|
205
|
-
const outlineInsets = parseValue(json['outline'], 'insets', 'object', null);
|
|
206
|
-
if (outlineInsets) {
|
|
207
|
-
result.outlineInsets = parseInsets(outlineInsets);
|
|
208
|
-
if (result.outlineInsets.left < 0 || result.outlineInsets.top < 0) {
|
|
209
|
-
throw new Error('Emulated device has wrong outline insets');
|
|
210
|
-
}
|
|
211
|
-
result.outlineImage = (parseValue(json['outline'], 'image', 'string') as string);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
199
|
if (json['hinge']) {
|
|
215
200
|
result.hinge = parseHinge(parseValue(json, 'hinge', 'object', undefined));
|
|
216
201
|
}
|
|
@@ -282,9 +267,10 @@ export class EmulatedDevice {
|
|
|
282
267
|
if (mode.insets.top < 0 || mode.insets.left < 0 || mode.insets.right < 0 || mode.insets.bottom < 0 ||
|
|
283
268
|
mode.insets.top + mode.insets.bottom > orientation.height ||
|
|
284
269
|
mode.insets.left + mode.insets.right > orientation.width) {
|
|
285
|
-
throw new Error(
|
|
270
|
+
throw new Error(
|
|
271
|
+
'Emulated device mode \'' + mode.title + '\'has wrong mode insets',
|
|
272
|
+
);
|
|
286
273
|
}
|
|
287
|
-
mode.image = (parseValue(modes[i], 'image', 'string', null) as string);
|
|
288
274
|
const safeAreaInsets = parseValue(modes[i], 'safe-area-insets', 'object', null);
|
|
289
275
|
if (safeAreaInsets) {
|
|
290
276
|
mode.safeAreaInsets = parseInsets(safeAreaInsets);
|
|
@@ -419,7 +405,6 @@ export class EmulatedDevice {
|
|
|
419
405
|
right: this.modes[i].insets.right,
|
|
420
406
|
bottom: this.modes[i].insets.bottom,
|
|
421
407
|
},
|
|
422
|
-
image: this.modes[i].image || undefined,
|
|
423
408
|
};
|
|
424
409
|
const safeAreaInsets = this.modes[i].safeAreaInsets;
|
|
425
410
|
if (safeAreaInsets) {
|
|
@@ -469,17 +454,7 @@ export class EmulatedDevice {
|
|
|
469
454
|
const json = {} as any;
|
|
470
455
|
json['width'] = orientation.width;
|
|
471
456
|
json['height'] = orientation.height;
|
|
472
|
-
|
|
473
|
-
json.outline = {
|
|
474
|
-
insets: {
|
|
475
|
-
left: orientation.outlineInsets.left,
|
|
476
|
-
top: orientation.outlineInsets.top,
|
|
477
|
-
right: orientation.outlineInsets.right,
|
|
478
|
-
bottom: orientation.outlineInsets.bottom,
|
|
479
|
-
},
|
|
480
|
-
image: orientation.outlineImage,
|
|
481
|
-
} as {image: string | null, insets: {left: number, right: number, top: number, bottom: number}};
|
|
482
|
-
}
|
|
457
|
+
|
|
483
458
|
if (orientation.hinge) {
|
|
484
459
|
json.hinge = {
|
|
485
460
|
width: orientation.hinge.width,
|
|
@@ -515,21 +490,6 @@ export class EmulatedDevice {
|
|
|
515
490
|
return json;
|
|
516
491
|
}
|
|
517
492
|
|
|
518
|
-
modeImage(mode: Mode): string {
|
|
519
|
-
if (!mode.image) {
|
|
520
|
-
return '';
|
|
521
|
-
}
|
|
522
|
-
return computeRelativeImageURL(mode.image);
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
outlineImage(mode: Mode): string {
|
|
526
|
-
const orientation = this.orientationByName(mode.orientation);
|
|
527
|
-
if (!orientation.outlineImage) {
|
|
528
|
-
return '';
|
|
529
|
-
}
|
|
530
|
-
return computeRelativeImageURL(orientation.outlineImage);
|
|
531
|
-
}
|
|
532
|
-
|
|
533
493
|
orientationByName(name: string): Orientation {
|
|
534
494
|
switch (name) {
|
|
535
495
|
case VerticalSpanned:
|
|
@@ -688,8 +648,16 @@ export class EmulatedDevicesList extends Common.ObjectWrapper.ObjectWrapper<Even
|
|
|
688
648
|
if (device) {
|
|
689
649
|
result.add(device);
|
|
690
650
|
if (!device.modes.length) {
|
|
691
|
-
device.modes.push({
|
|
692
|
-
|
|
651
|
+
device.modes.push({
|
|
652
|
+
title: '',
|
|
653
|
+
orientation: Horizontal,
|
|
654
|
+
insets: new Insets(0, 0, 0, 0),
|
|
655
|
+
});
|
|
656
|
+
device.modes.push({
|
|
657
|
+
title: '',
|
|
658
|
+
orientation: Vertical,
|
|
659
|
+
insets: new Insets(0, 0, 0, 0),
|
|
660
|
+
});
|
|
693
661
|
}
|
|
694
662
|
} else {
|
|
695
663
|
success = false;
|
|
@@ -769,7 +737,6 @@ export interface Mode {
|
|
|
769
737
|
title: string;
|
|
770
738
|
orientation: string;
|
|
771
739
|
insets: Insets;
|
|
772
|
-
image: string|null;
|
|
773
740
|
safeAreaInsets?: Insets;
|
|
774
741
|
cutout?: Cutout;
|
|
775
742
|
}
|
|
@@ -791,14 +758,11 @@ export type Cutout = BaseCutout&({shape: CutoutShape.RECTANGLE}|{shape: CutoutSh
|
|
|
791
758
|
export interface Orientation {
|
|
792
759
|
width: number;
|
|
793
760
|
height: number;
|
|
794
|
-
outlineInsets: Insets|null;
|
|
795
|
-
outlineImage: string|null;
|
|
796
761
|
hinge: SDK.OverlayModel.Hinge|null;
|
|
797
762
|
}
|
|
798
763
|
export interface JSONMode {
|
|
799
764
|
title: string;
|
|
800
765
|
orientation: string;
|
|
801
|
-
image?: string;
|
|
802
766
|
insets: {
|
|
803
767
|
left: number,
|
|
804
768
|
right: number,
|
|
@@ -2136,10 +2100,6 @@ const emulatedDevices = [
|
|
|
2136
2100
|
'title': 'Nest Hub Max',
|
|
2137
2101
|
'screen': {
|
|
2138
2102
|
'horizontal': {
|
|
2139
|
-
'outline': {
|
|
2140
|
-
'image': '@url(optimized/google-nest-hub-max-horizontal.avif)',
|
|
2141
|
-
'insets': {'left': 92, 'top': 96, 'right': 91, 'bottom': 248},
|
|
2142
|
-
},
|
|
2143
2103
|
'width': 1280,
|
|
2144
2104
|
'height': 800,
|
|
2145
2105
|
},
|
|
@@ -2249,19 +2209,11 @@ const emulatedDevices = [
|
|
|
2249
2209
|
'title': 'Moto G4',
|
|
2250
2210
|
'screen': {
|
|
2251
2211
|
'horizontal': {
|
|
2252
|
-
'outline': {
|
|
2253
|
-
'image': '@url(optimized/MotoG4-landscape.avif)',
|
|
2254
|
-
'insets': {'left': 91, 'top': 30, 'right': 74, 'bottom': 30},
|
|
2255
|
-
},
|
|
2256
2212
|
'width': 640,
|
|
2257
2213
|
'height': 360,
|
|
2258
2214
|
},
|
|
2259
2215
|
'device-pixel-ratio': 3,
|
|
2260
2216
|
'vertical': {
|
|
2261
|
-
'outline': {
|
|
2262
|
-
'image': '@url(optimized/MotoG4-portrait.avif)',
|
|
2263
|
-
'insets': {'left': 30, 'top': 91, 'right': 30, 'bottom': 74},
|
|
2264
|
-
},
|
|
2265
2217
|
'width': 360,
|
|
2266
2218
|
'height': 640,
|
|
2267
2219
|
},
|
|
@@ -335,6 +335,15 @@ export interface NativeContextSizes {
|
|
|
335
335
|
noAttributionSize: number;
|
|
336
336
|
}
|
|
337
337
|
|
|
338
|
+
export interface RetainedByContextSummary {
|
|
339
|
+
contextCount: number;
|
|
340
|
+
retainedByContextSize: number;
|
|
341
|
+
retainedByContextCount: number;
|
|
342
|
+
notRetainedByContextSize: number;
|
|
343
|
+
notRetainedByContextCount: number;
|
|
344
|
+
totalSize: number;
|
|
345
|
+
}
|
|
346
|
+
|
|
338
347
|
export const enum DOMLinkState {
|
|
339
348
|
UNKNOWN = 0,
|
|
340
349
|
ATTACHED = 1,
|
|
@@ -353,3 +362,21 @@ export interface ObjectInfo {
|
|
|
353
362
|
edgeCount: number;
|
|
354
363
|
retainerCount: number;
|
|
355
364
|
}
|
|
365
|
+
|
|
366
|
+
export interface HeapQueryOptions {
|
|
367
|
+
className?: string;
|
|
368
|
+
propertyName?: string;
|
|
369
|
+
nodeType?: string;
|
|
370
|
+
minRetainedSize?: number;
|
|
371
|
+
maxRetainedSize?: number;
|
|
372
|
+
minSelfSize?: number;
|
|
373
|
+
maxSelfSize?: number;
|
|
374
|
+
isDetached?: boolean;
|
|
375
|
+
sortBy?: 'retainedSize'|'selfSize'|'id';
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
export interface HeapEdgesQueryOptions {
|
|
379
|
+
sortBy?: 'retainedSize'|'selfSize'|'name';
|
|
380
|
+
minRetainedSize?: number;
|
|
381
|
+
excludePrimitives?: boolean;
|
|
382
|
+
}
|
|
@@ -280,6 +280,10 @@ export class HeapSnapshotProxy extends HeapSnapshotProxyObject {
|
|
|
280
280
|
return this.callMethodPromise('getNativeContextSizes');
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
+
getRetainedByContextSummary(): Promise<HeapSnapshotModel.RetainedByContextSummary> {
|
|
284
|
+
return this.callMethodPromise('getRetainedByContextSummary');
|
|
285
|
+
}
|
|
286
|
+
|
|
283
287
|
aggregatesWithFilter(filter: HeapSnapshotModel.NodeFilter):
|
|
284
288
|
Promise<Record<string, HeapSnapshotModel.AggregatedInfo>> {
|
|
285
289
|
return this.callMethodPromise('aggregatesWithFilter', filter);
|
|
@@ -312,8 +316,8 @@ export class HeapSnapshotProxy extends HeapSnapshotProxyObject {
|
|
|
312
316
|
return this.callMethodPromise('getObjectInfo', nodeIndex);
|
|
313
317
|
}
|
|
314
318
|
|
|
315
|
-
createEdgesProvider(nodeIndex: number): HeapSnapshotProviderProxy {
|
|
316
|
-
return this.callFactoryMethod('createEdgesProvider', HeapSnapshotProviderProxy, nodeIndex);
|
|
319
|
+
createEdgesProvider(nodeIndex: number, options?: HeapSnapshotModel.HeapEdgesQueryOptions): HeapSnapshotProviderProxy {
|
|
320
|
+
return this.callFactoryMethod('createEdgesProvider', HeapSnapshotProviderProxy, nodeIndex, options);
|
|
317
321
|
}
|
|
318
322
|
|
|
319
323
|
createRetainingEdgesProvider(nodeIndex: number): HeapSnapshotProviderProxy {
|
|
@@ -336,6 +340,10 @@ export class HeapSnapshotProxy extends HeapSnapshotProxyObject {
|
|
|
336
340
|
return this.callFactoryMethod('createNodesProviderForClass', HeapSnapshotProviderProxy, classKey, nodeFilter);
|
|
337
341
|
}
|
|
338
342
|
|
|
343
|
+
queryObjects(queryOptions: HeapSnapshotModel.HeapQueryOptions): HeapSnapshotProviderProxy {
|
|
344
|
+
return this.callFactoryMethod('queryObjects', HeapSnapshotProviderProxy, queryOptions);
|
|
345
|
+
}
|
|
346
|
+
|
|
339
347
|
allocationTracesTops(): Promise<HeapSnapshotModel.SerializedAllocationNode[]> {
|
|
340
348
|
return this.callMethodPromise('allocationTracesTops');
|
|
341
349
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# A framed document did not accept its embedder's `Connection-Allowlist`.
|
|
2
|
+
|
|
3
|
+
An embedder can require a framed document to enforce a `Connection-Allowlist` by
|
|
4
|
+
setting the `connectionallowlist` attribute on the frame. The framed document
|
|
5
|
+
must agree, in one of two ways:
|
|
6
|
+
|
|
7
|
+
* by responding with an `Allow-Connection-Allowlist-From` header naming the
|
|
8
|
+
embedder's origin (or `*` to accept any embedder), which installs the
|
|
9
|
+
embedder's allowlist on the framed document, or
|
|
10
|
+
* by responding with a `Connection-Allowlist` header of its own that is at
|
|
11
|
+
least as strict as the one required, which is then enforced instead.
|
|
12
|
+
|
|
13
|
+
This response did neither, so it was not displayed.
|
|
14
|
+
|
|
15
|
+
For example, a document framed by an embedder requiring
|
|
16
|
+
`("https://cdn.example/")` may accept that requirement outright:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
Allow-Connection-Allowlist-From: *
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
or satisfy it with an allowlist that is no more permissive:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
Connection-Allowlist: ("https://cdn.example/")
|
|
26
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# A frame's `connectionallowlist` attribute was discarded.
|
|
2
|
+
|
|
3
|
+
An embedder can require a framed document to enforce a `Connection-Allowlist` by
|
|
4
|
+
setting the `connectionallowlist` attribute on the frame. When a requirement is
|
|
5
|
+
already in effect for the embedder itself, a nested frame's attribute may only
|
|
6
|
+
make that requirement stricter, never looser.
|
|
7
|
+
|
|
8
|
+
This frame's attribute allowed connections that the requirement it inherits from
|
|
9
|
+
an ancestor does not, so the attribute was discarded and the inherited
|
|
10
|
+
requirement applies unchanged.
|
|
11
|
+
|
|
12
|
+
For example, the nested frame below cannot re-admit `https://example.com/`, so
|
|
13
|
+
it inherits `("https://cdn.example/")` rather than the value it asked for:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
<!-- Framed by an ancestor that requires ("https://cdn.example/"): -->
|
|
17
|
+
<iframe connectionallowlist='("https://cdn.example/" "https://example.com/")'
|
|
18
|
+
src="..."></iframe>
|
|
19
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# The `Allow-Connection-Allowlist-From` header is invalid.
|
|
2
|
+
|
|
3
|
+
A document that is framed by an embedder requiring a `Connection-Allowlist` can
|
|
4
|
+
accept that requirement by responding with an `Allow-Connection-Allowlist-From`
|
|
5
|
+
header. The header's value must be either `*`, or a single serialized origin
|
|
6
|
+
naming the embedder whose requirement it is willing to accept.
|
|
7
|
+
|
|
8
|
+
This response's header was neither, so it could not be used to accept the
|
|
9
|
+
embedder's requirement.
|
|
10
|
+
|
|
11
|
+
For example, both of the following are valid:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
Allow-Connection-Allowlist-From: *
|
|
15
|
+
Allow-Connection-Allowlist-From: https://example.com
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Note that an origin's serialization has no trailing slash, and carries no path,
|
|
19
|
+
query, or userinfo. Values like `https://example.com/` and
|
|
20
|
+
`https://user@example.com/path` are therefore rejected rather than being
|
|
21
|
+
silently reinterpreted as `https://example.com`.
|
|
@@ -113,12 +113,12 @@ export class AutomaticFileSystemManager extends Common.ObjectWrapper.ObjectWrapp
|
|
|
113
113
|
*/
|
|
114
114
|
static removeInstance(): void {
|
|
115
115
|
if (Root.DevToolsContext.globalInstance().has(AutomaticFileSystemManager)) {
|
|
116
|
-
Root.DevToolsContext.globalInstance().get(AutomaticFileSystemManager)
|
|
116
|
+
Root.DevToolsContext.globalInstance().get(AutomaticFileSystemManager).dispose();
|
|
117
117
|
Root.DevToolsContext.globalInstance().delete(AutomaticFileSystemManager);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
dispose(): void {
|
|
122
122
|
this.#inspectorFrontendHost.events.removeEventListener(
|
|
123
123
|
Host.InspectorFrontendHostAPI.Events.FileSystemRemoved, this.#fileSystemRemoved, this);
|
|
124
124
|
this.#projectSettingsModel.removeEventListener(
|
|
@@ -13,14 +13,14 @@ import {Events as PlatformFileSystemEvents, PlatformFileSystem, PlatformFileSyst
|
|
|
13
13
|
|
|
14
14
|
const UIStrings = {
|
|
15
15
|
/**
|
|
16
|
-
* @description Text in
|
|
16
|
+
* @description Text in isolated file system of workspace settings in Settings.
|
|
17
17
|
* @example {folder does not exist} PH1
|
|
18
18
|
*/
|
|
19
19
|
fileSystemErrorS: 'File system error: {PH1}',
|
|
20
20
|
/**
|
|
21
|
-
* @description Error message when reading a remote blob
|
|
21
|
+
* @description Error message when reading a remote blob.
|
|
22
22
|
*/
|
|
23
|
-
blobCouldNotBeLoaded: 'Blob
|
|
23
|
+
blobCouldNotBeLoaded: 'Blob couldn’t be loaded',
|
|
24
24
|
/**
|
|
25
25
|
* @description Error message when reading a file.
|
|
26
26
|
* @example {c:\dir\file.js} PH1
|
|
@@ -28,18 +28,17 @@ const UIStrings = {
|
|
|
28
28
|
*/
|
|
29
29
|
cantReadFileSS: 'Can’t read file: {PH1}: {PH2}',
|
|
30
30
|
/**
|
|
31
|
-
* @description Text to show something is linked to another
|
|
31
|
+
* @description Text to show something is linked to another.
|
|
32
32
|
* @example {example.url} PH1
|
|
33
33
|
*/
|
|
34
34
|
linkedToS: 'Linked to {PH1}',
|
|
35
35
|
/**
|
|
36
|
-
* @description Error message shown when
|
|
36
|
+
* @description Error message shown when DevTools failed to create a file system directory.
|
|
37
37
|
* @example {path/} PH1
|
|
38
38
|
*/
|
|
39
|
-
createDirFailedBecausePathIsFile:
|
|
40
|
-
'Overrides: Failed to create directory {PH1} because the path exists and is a file.',
|
|
39
|
+
createDirFailedBecausePathIsFile: 'Overrides: Failed to create directory {PH1} because the path exists and is a file',
|
|
41
40
|
/**
|
|
42
|
-
* @description Error message shown when
|
|
41
|
+
* @description Error message shown when DevTools failed to create a file system directory.
|
|
43
42
|
* @example {path/} PH1
|
|
44
43
|
*/
|
|
45
44
|
createDirFailed: 'Overrides: Failed to create directory {PH1}. Are the workspace or overrides configured correctly?',
|
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
|
|
19
19
|
const UIStrings = {
|
|
20
20
|
/**
|
|
21
|
-
* @description Text in
|
|
21
|
+
* @description Text in isolated file system manager of workspace settings in Settings.
|
|
22
22
|
* @example {folder does not exist} PH1
|
|
23
23
|
*/
|
|
24
|
-
unableToAddFilesystemS: '
|
|
24
|
+
unableToAddFilesystemS: 'Can’t add file system: {PH1}',
|
|
25
25
|
} as const;
|
|
26
26
|
const str_ = i18n.i18n.registerUIStrings('models/persistence/IsolatedFileSystemManager.ts', UIStrings);
|
|
27
27
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
@@ -35,6 +35,7 @@ export class IsolatedFileSystemManager extends Common.ObjectWrapper.ObjectWrappe
|
|
|
35
35
|
private readonly fileSystemsLoadedPromise: Promise<IsolatedFileSystem[]>;
|
|
36
36
|
readonly #settings: Common.Settings.Settings;
|
|
37
37
|
readonly #console: Common.Console.Console;
|
|
38
|
+
readonly #eventDescriptors: Common.EventTarget.EventDescriptor[];
|
|
38
39
|
constructor(settings: Common.Settings.Settings, console: Common.Console.Console) {
|
|
39
40
|
super();
|
|
40
41
|
this.#settings = settings;
|
|
@@ -44,20 +45,22 @@ export class IsolatedFileSystemManager extends Common.ObjectWrapper.ObjectWrappe
|
|
|
44
45
|
this.callbacks = new Map();
|
|
45
46
|
this.progresses = new Map();
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
48
|
+
this.#eventDescriptors = [
|
|
49
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(
|
|
50
|
+
Host.InspectorFrontendHostAPI.Events.FileSystemRemoved, this.onFileSystemRemoved, this),
|
|
51
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(
|
|
52
|
+
Host.InspectorFrontendHostAPI.Events.FileSystemAdded, this.onFileSystemAdded, this),
|
|
53
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(
|
|
54
|
+
Host.InspectorFrontendHostAPI.Events.FileSystemFilesChangedAddedRemoved, this.onFileSystemFilesChanged, this),
|
|
55
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(
|
|
56
|
+
Host.InspectorFrontendHostAPI.Events.IndexingTotalWorkCalculated, this.onIndexingTotalWorkCalculated, this),
|
|
57
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(
|
|
58
|
+
Host.InspectorFrontendHostAPI.Events.IndexingWorked, this.onIndexingWorked, this),
|
|
59
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(
|
|
60
|
+
Host.InspectorFrontendHostAPI.Events.IndexingDone, this.onIndexingDone, this),
|
|
61
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(
|
|
62
|
+
Host.InspectorFrontendHostAPI.Events.SearchCompleted, this.onSearchCompleted, this),
|
|
63
|
+
];
|
|
61
64
|
|
|
62
65
|
// Initialize exclude pattern settings
|
|
63
66
|
const defaultCommonExcludedFolders = [
|
|
@@ -101,20 +104,7 @@ export class IsolatedFileSystemManager extends Common.ObjectWrapper.ObjectWrappe
|
|
|
101
104
|
|
|
102
105
|
// TODO(crbug.com/542394587): Should be `Symbol.dispsoe`
|
|
103
106
|
dispose(): void {
|
|
104
|
-
|
|
105
|
-
Host.InspectorFrontendHostAPI.Events.FileSystemRemoved, this.onFileSystemRemoved, this);
|
|
106
|
-
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.removeEventListener(
|
|
107
|
-
Host.InspectorFrontendHostAPI.Events.FileSystemAdded, this.onFileSystemAdded, this);
|
|
108
|
-
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.removeEventListener(
|
|
109
|
-
Host.InspectorFrontendHostAPI.Events.FileSystemFilesChangedAddedRemoved, this.onFileSystemFilesChanged, this);
|
|
110
|
-
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.removeEventListener(
|
|
111
|
-
Host.InspectorFrontendHostAPI.Events.IndexingTotalWorkCalculated, this.onIndexingTotalWorkCalculated, this);
|
|
112
|
-
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.removeEventListener(
|
|
113
|
-
Host.InspectorFrontendHostAPI.Events.IndexingWorked, this.onIndexingWorked, this);
|
|
114
|
-
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.removeEventListener(
|
|
115
|
-
Host.InspectorFrontendHostAPI.Events.IndexingDone, this.onIndexingDone, this);
|
|
116
|
-
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.removeEventListener(
|
|
117
|
-
Host.InspectorFrontendHostAPI.Events.SearchCompleted, this.onSearchCompleted, this);
|
|
107
|
+
Common.EventTarget.removeEventListeners(this.#eventDescriptors);
|
|
118
108
|
}
|
|
119
109
|
|
|
120
110
|
static instance(opts: {
|
|
@@ -141,8 +131,9 @@ export class IsolatedFileSystemManager extends Common.ObjectWrapper.ObjectWrappe
|
|
|
141
131
|
|
|
142
132
|
private requestFileSystems(): Promise<IsolatedFileSystem[]> {
|
|
143
133
|
const {resolve, promise} = Promise.withResolvers<IsolatedFileSystem[]>();
|
|
144
|
-
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(
|
|
134
|
+
const descriptor = Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(
|
|
145
135
|
Host.InspectorFrontendHostAPI.Events.FileSystemsLoaded, onFileSystemsLoaded, this);
|
|
136
|
+
this.#eventDescriptors.push(descriptor);
|
|
146
137
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.requestFileSystems();
|
|
147
138
|
return promise;
|
|
148
139
|
|
|
@@ -11,7 +11,7 @@ const UIStrings = {
|
|
|
11
11
|
/**
|
|
12
12
|
* @description Assertion error message when failing to load a file.
|
|
13
13
|
*/
|
|
14
|
-
unableToReadFilesWithThis: '`PlatformFileSystem`
|
|
14
|
+
unableToReadFilesWithThis: '`PlatformFileSystem` can’t read files',
|
|
15
15
|
} as const;
|
|
16
16
|
const str_ = i18n.i18n.registerUIStrings('models/persistence/PlatformFileSystem.ts', UIStrings);
|
|
17
17
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
@@ -7,36 +7,36 @@ import * as i18n from '../../core/i18n/i18n.js';
|
|
|
7
7
|
|
|
8
8
|
const UIStrings = {
|
|
9
9
|
/**
|
|
10
|
-
* @description Title of a setting under the Persistence category in Settings
|
|
10
|
+
* @description Title of a setting under the Persistence category in Settings.
|
|
11
11
|
*/
|
|
12
12
|
localOverrides: 'Local overrides',
|
|
13
13
|
/**
|
|
14
|
-
* @description A tag of
|
|
14
|
+
* @description A tag of enable local overrides setting that can be searched in the command menu.
|
|
15
15
|
*/
|
|
16
16
|
interception: 'interception',
|
|
17
17
|
/**
|
|
18
|
-
* @description A tag of
|
|
18
|
+
* @description A tag of enable local overrides setting that can be searched in the command menu.
|
|
19
19
|
*/
|
|
20
20
|
override: 'override',
|
|
21
21
|
/**
|
|
22
|
-
* @description A tag of
|
|
22
|
+
* @description A tag of group network by frame setting that can be searched in the command menu.
|
|
23
23
|
*/
|
|
24
24
|
network: 'network',
|
|
25
25
|
/**
|
|
26
|
-
* @description A tag of
|
|
26
|
+
* @description A tag of enable local overrides setting that can be searched in the command menu.
|
|
27
27
|
*/
|
|
28
28
|
rewrite: 'rewrite',
|
|
29
29
|
/**
|
|
30
|
-
* @description A tag of
|
|
31
|
-
*Noun for network request.
|
|
30
|
+
* @description A tag of enable local overrides setting that can be searched in the command menu.
|
|
31
|
+
* Noun for network request.
|
|
32
32
|
*/
|
|
33
33
|
request: 'request',
|
|
34
34
|
/**
|
|
35
|
-
* @description Title of an option under the Persistence category that can be invoked through the
|
|
35
|
+
* @description Title of an option under the Persistence category that can be invoked through the command menu.
|
|
36
36
|
*/
|
|
37
37
|
enableOverrideNetworkRequests: 'Enable override network requests',
|
|
38
38
|
/**
|
|
39
|
-
* @description Title of an option under the Persistence category that can be invoked through the
|
|
39
|
+
* @description Title of an option under the Persistence category that can be invoked through the command menu.
|
|
40
40
|
*/
|
|
41
41
|
disableOverrideNetworkRequests: 'Disable override network requests',
|
|
42
42
|
} as const;
|
|
@@ -3277,6 +3277,42 @@ export const Categories = {
|
|
|
3277
3277
|
Loading: 'loading',
|
|
3278
3278
|
} as const;
|
|
3279
3279
|
|
|
3280
|
+
export const DefaultCategories = [
|
|
3281
|
+
'blink.console',
|
|
3282
|
+
'blink.user_timing',
|
|
3283
|
+
'loading',
|
|
3284
|
+
'devtools.timeline',
|
|
3285
|
+
'disabled-by-default-devtools.target-rundown',
|
|
3286
|
+
'disabled-by-default-devtools.timeline.frame',
|
|
3287
|
+
'disabled-by-default-devtools.timeline.stack',
|
|
3288
|
+
'disabled-by-default-devtools.timeline',
|
|
3289
|
+
'disabled-by-default-devtools.v8-source-rundown-sources',
|
|
3290
|
+
'disabled-by-default-devtools.v8-source-rundown',
|
|
3291
|
+
'disabled-by-default-layout_shift.debug',
|
|
3292
|
+
'disabled-by-default-v8.inspector',
|
|
3293
|
+
'disabled-by-default-v8.cpu_profiler.hires',
|
|
3294
|
+
'disabled-by-default-lighthouse',
|
|
3295
|
+
'v8.execute',
|
|
3296
|
+
'v8',
|
|
3297
|
+
'cppgc',
|
|
3298
|
+
'navigation,rail',
|
|
3299
|
+
] as const;
|
|
3300
|
+
|
|
3301
|
+
export const OptionalCategories = {
|
|
3302
|
+
JsSampling: ['disabled-by-default-v8.cpu_profiler'],
|
|
3303
|
+
InvalidationTracking: ['disabled-by-default-devtools.timeline.invalidationTracking'],
|
|
3304
|
+
AdvancedPaint: [
|
|
3305
|
+
'disabled-by-default-devtools.timeline.layers',
|
|
3306
|
+
'disabled-by-default-devtools.timeline.picture',
|
|
3307
|
+
'disabled-by-default-blink.graphics_context_annotations',
|
|
3308
|
+
],
|
|
3309
|
+
Screenshot: ['disabled-by-default-devtools.screenshot'],
|
|
3310
|
+
CssSelectorStats: [
|
|
3311
|
+
'disabled-by-default-blink.debug',
|
|
3312
|
+
'disabled-by-default-devtools.timeline.invalidationTracking',
|
|
3313
|
+
],
|
|
3314
|
+
} as const;
|
|
3315
|
+
|
|
3280
3316
|
/**
|
|
3281
3317
|
* The frames implementation in handlers/FramesHandler is considered "legacy"
|
|
3282
3318
|
* in that it is based on the old TimelineModel implementation rather than
|
|
@@ -15,14 +15,21 @@ export interface SaveCallbackParam {
|
|
|
15
15
|
export class FileManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
16
16
|
readonly #saveCallbacks = new Map<
|
|
17
17
|
Platform.DevToolsPath.RawPathString|Platform.DevToolsPath.UrlString, (arg0: SaveCallbackParam|null) => void>();
|
|
18
|
+
readonly #eventDescriptors: Common.EventTarget.EventDescriptor[];
|
|
18
19
|
constructor() {
|
|
19
20
|
super();
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
this.#eventDescriptors = [
|
|
22
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(
|
|
23
|
+
Host.InspectorFrontendHostAPI.Events.SavedURL, this.savedURL, this),
|
|
24
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(
|
|
25
|
+
Host.InspectorFrontendHostAPI.Events.CanceledSaveURL, this.#canceledSavedURL, this),
|
|
26
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.events.addEventListener(
|
|
27
|
+
Host.InspectorFrontendHostAPI.Events.AppendedToURL, this.appendedToURL, this),
|
|
28
|
+
];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
dispose(): void {
|
|
32
|
+
Common.EventTarget.removeEventListeners(this.#eventDescriptors);
|
|
26
33
|
}
|
|
27
34
|
|
|
28
35
|
static instance(opts: {forceNew: boolean|null} = {forceNew: null}): FileManager {
|
|
@@ -15,11 +15,11 @@ import {ariaMetadata} from './ARIAMetadata.js';
|
|
|
15
15
|
|
|
16
16
|
const UIStrings = {
|
|
17
17
|
/**
|
|
18
|
-
* @description Text in
|
|
18
|
+
* @description Text in the ARIA attributes view under the Accessibility tab in the Elements panel.
|
|
19
19
|
*/
|
|
20
|
-
ariaAttributes: 'ARIA
|
|
20
|
+
ariaAttributes: 'ARIA attributes',
|
|
21
21
|
/**
|
|
22
|
-
* @description Text in
|
|
22
|
+
* @description Text in the ARIA attributes view under the Accessibility tab in the Elements panel.
|
|
23
23
|
*/
|
|
24
24
|
noAriaAttributes: 'No ARIA attributes',
|
|
25
25
|
} as const;
|