chrome-devtools-frontend 1.0.1661063 → 1.0.1662289
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/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 +7 -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 -5
- package/front_end/core/platform/ArrayUtilities.ts +10 -0
- package/front_end/foundation/README.md +86 -0
- package/front_end/generated/InspectorBackendCommands.ts +4 -5
- package/front_end/generated/protocol.ts +20 -38
- 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 +10 -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/extensions/RecorderExtensionEndpoint.ts +7 -5
- 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 +1 -1
- 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/ServiceWorkersView.ts +494 -411
- package/front_end/panels/application/application.ts +0 -6
- package/front_end/panels/application/components/components.ts +0 -2
- 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/RequestPayloadView.ts +77 -39
- package/front_end/panels/network/components/ResponseHeaderSection.ts +5 -3
- package/front_end/panels/profiler/HeapSnapshotView.ts +2 -2
- package/front_end/panels/recorder/RecorderController.ts +213 -49
- package/front_end/panels/recorder/RecorderPanel.ts +1 -1
- 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/legacy/TextPrompt.ts +49 -1
- package/front_end/ui/legacy/UIUtils.ts +11 -1
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +2 -2
- package/front_end/ui/legacy/textPrompt.css +10 -0
- 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/sources/InplaceFormatterEditorAction.ts +0 -149
|
@@ -83,7 +83,6 @@ inspectorBackend.registerEnum("Audits.HeavyAdResolutionStatus", {HeavyAdBlocked:
|
|
|
83
83
|
inspectorBackend.registerEnum("Audits.HeavyAdReason", {NetworkTotalLimit: "NetworkTotalLimit", CpuTotalLimit: "CpuTotalLimit", CpuPeakLimit: "CpuPeakLimit"});
|
|
84
84
|
inspectorBackend.registerEnum("Audits.ContentSecurityPolicyViolationType", {KInlineViolation: "kInlineViolation", KEvalViolation: "kEvalViolation", KURLViolation: "kURLViolation", KSRIViolation: "kSRIViolation", KTrustedTypesSinkViolation: "kTrustedTypesSinkViolation", KTrustedTypesPolicyViolation: "kTrustedTypesPolicyViolation", KWasmEvalViolation: "kWasmEvalViolation"});
|
|
85
85
|
inspectorBackend.registerEnum("Audits.SharedArrayBufferIssueType", {TransferIssue: "TransferIssue", CreationIssue: "CreationIssue"});
|
|
86
|
-
inspectorBackend.registerEnum("Audits.AttributionReportingIssueType", {PermissionPolicyDisabled: "PermissionPolicyDisabled", UntrustworthyReportingOrigin: "UntrustworthyReportingOrigin", InsecureContext: "InsecureContext", InvalidHeader: "InvalidHeader", InvalidRegisterTriggerHeader: "InvalidRegisterTriggerHeader", SourceAndTriggerHeaders: "SourceAndTriggerHeaders", SourceIgnored: "SourceIgnored", TriggerIgnored: "TriggerIgnored", OsSourceIgnored: "OsSourceIgnored", OsTriggerIgnored: "OsTriggerIgnored", InvalidRegisterOsSourceHeader: "InvalidRegisterOsSourceHeader", InvalidRegisterOsTriggerHeader: "InvalidRegisterOsTriggerHeader", WebAndOsHeaders: "WebAndOsHeaders", NoWebOrOsSupport: "NoWebOrOsSupport", NavigationRegistrationWithoutTransientUserActivation: "NavigationRegistrationWithoutTransientUserActivation", InvalidInfoHeader: "InvalidInfoHeader", NoRegisterSourceHeader: "NoRegisterSourceHeader", NoRegisterTriggerHeader: "NoRegisterTriggerHeader", NoRegisterOsSourceHeader: "NoRegisterOsSourceHeader", NoRegisterOsTriggerHeader: "NoRegisterOsTriggerHeader", NavigationRegistrationUniqueScopeAlreadySet: "NavigationRegistrationUniqueScopeAlreadySet"});
|
|
87
86
|
inspectorBackend.registerEnum("Audits.SharedDictionaryError", {UseErrorCrossOriginNoCorsRequest: "UseErrorCrossOriginNoCorsRequest", UseErrorDictionaryLoadFailure: "UseErrorDictionaryLoadFailure", UseErrorMatchingDictionaryNotUsed: "UseErrorMatchingDictionaryNotUsed", UseErrorUnexpectedContentDictionaryHeader: "UseErrorUnexpectedContentDictionaryHeader", WriteErrorCossOriginNoCorsRequest: "WriteErrorCossOriginNoCorsRequest", WriteErrorDisallowedBySettings: "WriteErrorDisallowedBySettings", WriteErrorExpiredResponse: "WriteErrorExpiredResponse", WriteErrorFeatureDisabled: "WriteErrorFeatureDisabled", WriteErrorInsufficientResources: "WriteErrorInsufficientResources", WriteErrorInvalidMatchField: "WriteErrorInvalidMatchField", WriteErrorInvalidStructuredHeader: "WriteErrorInvalidStructuredHeader", WriteErrorInvalidTTLField: "WriteErrorInvalidTTLField", WriteErrorNavigationRequest: "WriteErrorNavigationRequest", WriteErrorNoMatchField: "WriteErrorNoMatchField", WriteErrorNonIntegerTTLField: "WriteErrorNonIntegerTTLField", WriteErrorNonListMatchDestField: "WriteErrorNonListMatchDestField", WriteErrorNonSecureContext: "WriteErrorNonSecureContext", WriteErrorNonStringIdField: "WriteErrorNonStringIdField", WriteErrorNonStringInMatchDestList: "WriteErrorNonStringInMatchDestList", WriteErrorInvalidMatchDestList: "WriteErrorInvalidMatchDestList", WriteErrorNonStringMatchField: "WriteErrorNonStringMatchField", WriteErrorNonTokenTypeField: "WriteErrorNonTokenTypeField", WriteErrorRequestAborted: "WriteErrorRequestAborted", WriteErrorShuttingDown: "WriteErrorShuttingDown", WriteErrorTooLongIdField: "WriteErrorTooLongIdField", WriteErrorUnsupportedType: "WriteErrorUnsupportedType"});
|
|
88
87
|
inspectorBackend.registerEnum("Audits.SRIMessageSignatureError", {MissingSignatureHeader: "MissingSignatureHeader", MissingSignatureInputHeader: "MissingSignatureInputHeader", InvalidSignatureHeader: "InvalidSignatureHeader", InvalidSignatureInputHeader: "InvalidSignatureInputHeader", SignatureHeaderValueIsNotByteSequence: "SignatureHeaderValueIsNotByteSequence", SignatureHeaderValueIsParameterized: "SignatureHeaderValueIsParameterized", SignatureHeaderValueIsIncorrectLength: "SignatureHeaderValueIsIncorrectLength", SignatureInputHeaderMissingLabel: "SignatureInputHeaderMissingLabel", SignatureInputHeaderValueNotInnerList: "SignatureInputHeaderValueNotInnerList", SignatureInputHeaderValueMissingComponents: "SignatureInputHeaderValueMissingComponents", SignatureInputHeaderInvalidComponentType: "SignatureInputHeaderInvalidComponentType", SignatureInputHeaderInvalidComponentName: "SignatureInputHeaderInvalidComponentName", SignatureInputHeaderInvalidHeaderComponentParameter: "SignatureInputHeaderInvalidHeaderComponentParameter", SignatureInputHeaderInvalidDerivedComponentParameter: "SignatureInputHeaderInvalidDerivedComponentParameter", SignatureInputHeaderKeyIdLength: "SignatureInputHeaderKeyIdLength", SignatureInputHeaderInvalidParameter: "SignatureInputHeaderInvalidParameter", SignatureInputHeaderMissingRequiredParameters: "SignatureInputHeaderMissingRequiredParameters", ValidationFailedSignatureExpired: "ValidationFailedSignatureExpired", ValidationFailedInvalidLength: "ValidationFailedInvalidLength", ValidationFailedSignatureMismatch: "ValidationFailedSignatureMismatch", ValidationFailedIntegrityMismatch: "ValidationFailedIntegrityMismatch", SignatureBaseUnknownDerivedComponent: "SignatureBaseUnknownDerivedComponent", SignatureBaseMissingHeader: "SignatureBaseMissingHeader", SignatureBaseInvalidUnencodedDigest: "SignatureBaseInvalidUnencodedDigest", SignatureBaseUnsupportedComponent: "SignatureBaseUnsupportedComponent"});
|
|
89
88
|
inspectorBackend.registerEnum("Audits.UnencodedDigestError", {MalformedDictionary: "MalformedDictionary", UnknownAlgorithm: "UnknownAlgorithm", IncorrectDigestType: "IncorrectDigestType", IncorrectDigestLength: "IncorrectDigestLength"});
|
|
@@ -99,7 +98,7 @@ inspectorBackend.registerEnum("Audits.StyleSheetLoadingIssueReason", {LateImport
|
|
|
99
98
|
inspectorBackend.registerEnum("Audits.PropertyRuleIssueReason", {InvalidSyntax: "InvalidSyntax", InvalidInitialValue: "InvalidInitialValue", InvalidInherits: "InvalidInherits", InvalidName: "InvalidName"});
|
|
100
99
|
inspectorBackend.registerEnum("Audits.UserReidentificationIssueType", {BlockedFrameNavigation: "BlockedFrameNavigation", BlockedSubresource: "BlockedSubresource", NoisedCanvasReadback: "NoisedCanvasReadback"});
|
|
101
100
|
inspectorBackend.registerEnum("Audits.PermissionElementIssueType", {InvalidType: "InvalidType", FencedFrameDisallowed: "FencedFrameDisallowed", CspFrameAncestorsMissing: "CspFrameAncestorsMissing", PermissionsPolicyBlocked: "PermissionsPolicyBlocked", PaddingRightUnsupported: "PaddingRightUnsupported", PaddingBottomUnsupported: "PaddingBottomUnsupported", InsetBoxShadowUnsupported: "InsetBoxShadowUnsupported", RequestInProgress: "RequestInProgress", UntrustedEvent: "UntrustedEvent", RegistrationFailed: "RegistrationFailed", TypeNotSupported: "TypeNotSupported", InvalidTypeActivation: "InvalidTypeActivation", SecurityChecksFailed: "SecurityChecksFailed", ActivationDisabled: "ActivationDisabled", GeolocationDeprecated: "GeolocationDeprecated", InvalidDisplayStyle: "InvalidDisplayStyle", NonOpaqueColor: "NonOpaqueColor", LowContrast: "LowContrast", FontSizeTooSmall: "FontSizeTooSmall", FontSizeTooLarge: "FontSizeTooLarge", InvalidSizeValue: "InvalidSizeValue", NonSecureContext: "NonSecureContext", MissingTransientUserActivation: "MissingTransientUserActivation"});
|
|
102
|
-
inspectorBackend.registerEnum("Audits.InspectorIssueCode", {CookieIssue: "CookieIssue", MixedContentIssue: "MixedContentIssue", BlockedByResponseIssue: "BlockedByResponseIssue", HeavyAdIssue: "HeavyAdIssue", ContentSecurityPolicyIssue: "ContentSecurityPolicyIssue", SharedArrayBufferIssue: "SharedArrayBufferIssue", CorsIssue: "CorsIssue",
|
|
101
|
+
inspectorBackend.registerEnum("Audits.InspectorIssueCode", {CookieIssue: "CookieIssue", MixedContentIssue: "MixedContentIssue", BlockedByResponseIssue: "BlockedByResponseIssue", HeavyAdIssue: "HeavyAdIssue", ContentSecurityPolicyIssue: "ContentSecurityPolicyIssue", SharedArrayBufferIssue: "SharedArrayBufferIssue", CorsIssue: "CorsIssue", QuirksModeIssue: "QuirksModeIssue", PartitioningBlobURLIssue: "PartitioningBlobURLIssue", NavigatorUserAgentIssue: "NavigatorUserAgentIssue", GenericIssue: "GenericIssue", DeprecationIssue: "DeprecationIssue", ClientHintIssue: "ClientHintIssue", FederatedAuthRequestIssue: "FederatedAuthRequestIssue", BounceTrackingIssue: "BounceTrackingIssue", CookieDeprecationMetadataIssue: "CookieDeprecationMetadataIssue", StylesheetLoadingIssue: "StylesheetLoadingIssue", FederatedAuthUserInfoRequestIssue: "FederatedAuthUserInfoRequestIssue", PropertyRuleIssue: "PropertyRuleIssue", SharedDictionaryIssue: "SharedDictionaryIssue", ElementAccessibilityIssue: "ElementAccessibilityIssue", SRIMessageSignatureIssue: "SRIMessageSignatureIssue", UnencodedDigestIssue: "UnencodedDigestIssue", ConnectionAllowlistIssue: "ConnectionAllowlistIssue", UserReidentificationIssue: "UserReidentificationIssue", PermissionElementIssue: "PermissionElementIssue", PerformanceIssue: "PerformanceIssue", SelectivePermissionsInterventionIssue: "SelectivePermissionsInterventionIssue", EmailVerificationRequestIssue: "EmailVerificationRequestIssue", LazyLoadImageIssue: "LazyLoadImageIssue"});
|
|
103
102
|
inspectorBackend.registerEvent("Audits.issueAdded", ["issue"]);
|
|
104
103
|
inspectorBackend.registerEnum("Audits.GetEncodedResponseRequestEncoding", {Webp: "webp", Jpeg: "jpeg", Png: "png"});
|
|
105
104
|
inspectorBackend.registerCommand("Audits.getEncodedResponse", [{"name": "requestId", "type": "string", "optional": false, "description": "Identifier of the network request to get content for.", "typeRef": "Network.RequestId"}, {"name": "encoding", "type": "string", "optional": false, "description": "The encoding to use.", "typeRef": "Audits.GetEncodedResponseRequestEncoding"}, {"name": "quality", "type": "number", "optional": true, "description": "The quality of the encoding (0-1). (defaults to 1)", "typeRef": null}, {"name": "sizeOnly", "type": "boolean", "optional": true, "description": "Whether to only return the size information (defaults to false).", "typeRef": null}], ["body", "originalSize", "encodedSize"], "Returns the response body and size if it were re-encoded with the specified settings. Only applies to images.");
|
|
@@ -119,7 +118,6 @@ inspectorBackend.registerType("Audits.SourceCodeLocation", [{"name": "scriptId",
|
|
|
119
118
|
inspectorBackend.registerType("Audits.ContentSecurityPolicyIssueDetails", [{"name": "blockedURL", "type": "string", "optional": true, "description": "The url not included in allowed sources.", "typeRef": null}, {"name": "violatedDirective", "type": "string", "optional": false, "description": "Specific directive that is violated, causing the CSP issue.", "typeRef": null}, {"name": "isReportOnly", "type": "boolean", "optional": false, "description": "", "typeRef": null}, {"name": "contentSecurityPolicyViolationType", "type": "string", "optional": false, "description": "", "typeRef": "Audits.ContentSecurityPolicyViolationType"}, {"name": "frameAncestor", "type": "object", "optional": true, "description": "", "typeRef": "Audits.AffectedFrame"}, {"name": "sourceCodeLocation", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SourceCodeLocation"}, {"name": "violatingNodeId", "type": "number", "optional": true, "description": "", "typeRef": "DOM.BackendNodeId"}]);
|
|
120
119
|
inspectorBackend.registerType("Audits.SharedArrayBufferIssueDetails", [{"name": "sourceCodeLocation", "type": "object", "optional": false, "description": "", "typeRef": "Audits.SourceCodeLocation"}, {"name": "isWarning", "type": "boolean", "optional": false, "description": "", "typeRef": null}, {"name": "type", "type": "string", "optional": false, "description": "", "typeRef": "Audits.SharedArrayBufferIssueType"}]);
|
|
121
120
|
inspectorBackend.registerType("Audits.CorsIssueDetails", [{"name": "corsErrorStatus", "type": "object", "optional": false, "description": "", "typeRef": "Network.CorsErrorStatus"}, {"name": "isWarning", "type": "boolean", "optional": false, "description": "", "typeRef": null}, {"name": "request", "type": "object", "optional": false, "description": "", "typeRef": "Audits.AffectedRequest"}, {"name": "location", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SourceCodeLocation"}, {"name": "initiatorOrigin", "type": "string", "optional": true, "description": "", "typeRef": null}, {"name": "resourceIPAddressSpace", "type": "string", "optional": true, "description": "", "typeRef": "Network.IPAddressSpace"}, {"name": "clientSecurityState", "type": "object", "optional": true, "description": "", "typeRef": "Network.ClientSecurityState"}]);
|
|
122
|
-
inspectorBackend.registerType("Audits.AttributionReportingIssueDetails", [{"name": "violationType", "type": "string", "optional": false, "description": "", "typeRef": "Audits.AttributionReportingIssueType"}, {"name": "request", "type": "object", "optional": true, "description": "", "typeRef": "Audits.AffectedRequest"}, {"name": "violatingNodeId", "type": "number", "optional": true, "description": "", "typeRef": "DOM.BackendNodeId"}, {"name": "invalidParameter", "type": "string", "optional": true, "description": "", "typeRef": null}]);
|
|
123
121
|
inspectorBackend.registerType("Audits.QuirksModeIssueDetails", [{"name": "isLimitedQuirksMode", "type": "boolean", "optional": false, "description": "If false, it means the document's mode is \\\"quirks\\\" instead of \\\"limited-quirks\\\".", "typeRef": null}, {"name": "documentNodeId", "type": "number", "optional": false, "description": "", "typeRef": "DOM.BackendNodeId"}, {"name": "url", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "frameId", "type": "string", "optional": false, "description": "", "typeRef": "Page.FrameId"}, {"name": "loaderId", "type": "string", "optional": false, "description": "", "typeRef": "Network.LoaderId"}]);
|
|
124
122
|
inspectorBackend.registerType("Audits.NavigatorUserAgentIssueDetails", [{"name": "url", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "location", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SourceCodeLocation"}]);
|
|
125
123
|
inspectorBackend.registerType("Audits.SharedDictionaryIssueDetails", [{"name": "sharedDictionaryError", "type": "string", "optional": false, "description": "", "typeRef": "Audits.SharedDictionaryError"}, {"name": "request", "type": "object", "optional": false, "description": "", "typeRef": "Audits.AffectedRequest"}]);
|
|
@@ -142,7 +140,8 @@ inspectorBackend.registerType("Audits.PropertyRuleIssueDetails", [{"name": "sour
|
|
|
142
140
|
inspectorBackend.registerType("Audits.UserReidentificationIssueDetails", [{"name": "type", "type": "string", "optional": false, "description": "", "typeRef": "Audits.UserReidentificationIssueType"}, {"name": "request", "type": "object", "optional": true, "description": "Applies to BlockedFrameNavigation and BlockedSubresource issue types.", "typeRef": "Audits.AffectedRequest"}, {"name": "sourceCodeLocation", "type": "object", "optional": true, "description": "Applies to NoisedCanvasReadback issue type.", "typeRef": "Audits.SourceCodeLocation"}]);
|
|
143
141
|
inspectorBackend.registerType("Audits.PermissionElementIssueDetails", [{"name": "issueType", "type": "string", "optional": false, "description": "", "typeRef": "Audits.PermissionElementIssueType"}, {"name": "type", "type": "string", "optional": true, "description": "The value of the type attribute.", "typeRef": null}, {"name": "nodeId", "type": "number", "optional": true, "description": "The node ID of the <permission> element.", "typeRef": "DOM.BackendNodeId"}, {"name": "isWarning", "type": "boolean", "optional": true, "description": "True if the issue is a warning, false if it is an error.", "typeRef": null}, {"name": "permissionName", "type": "string", "optional": true, "description": "Fields for message construction: Used for messages that reference a specific permission name", "typeRef": null}, {"name": "occluderNodeInfo", "type": "string", "optional": true, "description": "Used for messages about occlusion", "typeRef": null}, {"name": "occluderParentNodeInfo", "type": "string", "optional": true, "description": "Used for messages about occluder's parent", "typeRef": null}, {"name": "disableReason", "type": "string", "optional": true, "description": "Used for messages about activation disabled reason", "typeRef": null}]);
|
|
144
142
|
inspectorBackend.registerType("Audits.SelectivePermissionsInterventionIssueDetails", [{"name": "apiName", "type": "string", "optional": false, "description": "Which API was intervened on.", "typeRef": null}, {"name": "adAncestry", "type": "object", "optional": false, "description": "Why the ad script using the API is considered an ad.", "typeRef": "Network.AdAncestry"}, {"name": "stackTrace", "type": "object", "optional": true, "description": "The stack trace at the time of the intervention.", "typeRef": "Runtime.StackTrace"}]);
|
|
145
|
-
inspectorBackend.registerType("Audits.
|
|
143
|
+
inspectorBackend.registerType("Audits.LazyLoadImageIssueDetails", [{"name": "nodeId", "type": "number", "optional": false, "description": "DOM node of the problematic HTMLImageElement.", "typeRef": "DOM.BackendNodeId"}, {"name": "url", "type": "string", "optional": false, "description": "URL or src attribute of the image.", "typeRef": null}, {"name": "frameId", "type": "string", "optional": false, "description": "Frame containing the image.", "typeRef": "Page.FrameId"}]);
|
|
144
|
+
inspectorBackend.registerType("Audits.InspectorIssueDetails", [{"name": "cookieIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CookieIssueDetails"}, {"name": "mixedContentIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.MixedContentIssueDetails"}, {"name": "blockedByResponseIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.BlockedByResponseIssueDetails"}, {"name": "heavyAdIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.HeavyAdIssueDetails"}, {"name": "contentSecurityPolicyIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ContentSecurityPolicyIssueDetails"}, {"name": "sharedArrayBufferIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SharedArrayBufferIssueDetails"}, {"name": "corsIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CorsIssueDetails"}, {"name": "quirksModeIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.QuirksModeIssueDetails"}, {"name": "partitioningBlobURLIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PartitioningBlobURLIssueDetails"}, {"name": "navigatorUserAgentIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.NavigatorUserAgentIssueDetails"}, {"name": "genericIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.GenericIssueDetails"}, {"name": "deprecationIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.DeprecationIssueDetails"}, {"name": "clientHintIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ClientHintIssueDetails"}, {"name": "federatedAuthRequestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.FederatedAuthRequestIssueDetails"}, {"name": "bounceTrackingIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.BounceTrackingIssueDetails"}, {"name": "cookieDeprecationMetadataIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.CookieDeprecationMetadataIssueDetails"}, {"name": "stylesheetLoadingIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.StylesheetLoadingIssueDetails"}, {"name": "propertyRuleIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PropertyRuleIssueDetails"}, {"name": "federatedAuthUserInfoRequestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.FederatedAuthUserInfoRequestIssueDetails"}, {"name": "sharedDictionaryIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SharedDictionaryIssueDetails"}, {"name": "elementAccessibilityIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ElementAccessibilityIssueDetails"}, {"name": "sriMessageSignatureIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SRIMessageSignatureIssueDetails"}, {"name": "unencodedDigestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.UnencodedDigestIssueDetails"}, {"name": "connectionAllowlistIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.ConnectionAllowlistIssueDetails"}, {"name": "userReidentificationIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.UserReidentificationIssueDetails"}, {"name": "permissionElementIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PermissionElementIssueDetails"}, {"name": "performanceIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.PerformanceIssueDetails"}, {"name": "selectivePermissionsInterventionIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.SelectivePermissionsInterventionIssueDetails"}, {"name": "emailVerificationRequestIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.EmailVerificationRequestIssueDetails"}, {"name": "lazyLoadImageIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.LazyLoadImageIssueDetails"}]);
|
|
146
145
|
inspectorBackend.registerType("Audits.InspectorIssue", [{"name": "code", "type": "string", "optional": false, "description": "", "typeRef": "Audits.InspectorIssueCode"}, {"name": "details", "type": "object", "optional": false, "description": "", "typeRef": "Audits.InspectorIssueDetails"}, {"name": "issueId", "type": "string", "optional": true, "description": "A unique id for this issue. May be omitted if no other entity (e.g. exception, CDP message, etc.) is referencing this issue.", "typeRef": "Audits.IssueId"}]);
|
|
147
146
|
|
|
148
147
|
// Autofill.
|
|
@@ -1047,7 +1046,7 @@ inspectorBackend.registerEnum("Page.AdFrameExplanation", {ParentIsAd: "ParentIsA
|
|
|
1047
1046
|
inspectorBackend.registerEnum("Page.SecureContextType", {Secure: "Secure", SecureLocalhost: "SecureLocalhost", InsecureScheme: "InsecureScheme", InsecureAncestor: "InsecureAncestor"});
|
|
1048
1047
|
inspectorBackend.registerEnum("Page.CrossOriginIsolatedContextType", {Isolated: "Isolated", NotIsolated: "NotIsolated", NotIsolatedFeatureDisabled: "NotIsolatedFeatureDisabled"});
|
|
1049
1048
|
inspectorBackend.registerEnum("Page.GatedAPIFeatures", {SharedArrayBuffers: "SharedArrayBuffers", SharedArrayBuffersTransferAllowed: "SharedArrayBuffersTransferAllowed", PerformanceMeasureMemory: "PerformanceMeasureMemory", PerformanceProfile: "PerformanceProfile"});
|
|
1050
|
-
inspectorBackend.registerEnum("Page.PermissionsPolicyFeature", {Accelerometer: "accelerometer", AllScreensCapture: "all-screens-capture", AmbientLightSensor: "ambient-light-sensor", AriaNotify: "aria-notify",
|
|
1049
|
+
inspectorBackend.registerEnum("Page.PermissionsPolicyFeature", {Accelerometer: "accelerometer", AllScreensCapture: "all-screens-capture", AmbientLightSensor: "ambient-light-sensor", AriaNotify: "aria-notify", Autofill: "autofill", Autoplay: "autoplay", Bluetooth: "bluetooth", BrowsingTopics: "browsing-topics", Camera: "camera", CapturedSurfaceControl: "captured-surface-control", ChDpr: "ch-dpr", ChDeviceMemory: "ch-device-memory", ChDownlink: "ch-downlink", ChEct: "ch-ect", ChPrefersColorScheme: "ch-prefers-color-scheme", ChPrefersReducedMotion: "ch-prefers-reduced-motion", ChPrefersReducedTransparency: "ch-prefers-reduced-transparency", ChRtt: "ch-rtt", ChSaveData: "ch-save-data", ChUa: "ch-ua", ChUaArch: "ch-ua-arch", ChUaBitness: "ch-ua-bitness", ChUaHighEntropyValues: "ch-ua-high-entropy-values", ChUaPlatform: "ch-ua-platform", ChUaModel: "ch-ua-model", ChUaMobile: "ch-ua-mobile", ChUaFormFactors: "ch-ua-form-factors", ChUaFullVersion: "ch-ua-full-version", ChUaFullVersionList: "ch-ua-full-version-list", ChUaPlatformVersion: "ch-ua-platform-version", ChUaWow64: "ch-ua-wow64", ChViewportHeight: "ch-viewport-height", ChViewportWidth: "ch-viewport-width", ChWidth: "ch-width", ClipboardRead: "clipboard-read", ClipboardWrite: "clipboard-write", ComputePressure: "compute-pressure", ControlledFrame: "controlled-frame", CrossOriginIsolated: "cross-origin-isolated", DeferredFetch: "deferred-fetch", DeferredFetchMinimal: "deferred-fetch-minimal", DeviceAttributes: "device-attributes", DigitalCredentialsCreate: "digital-credentials-create", DigitalCredentialsGet: "digital-credentials-get", DirectSockets: "direct-sockets", DirectSocketsMulticast: "direct-sockets-multicast", DisplayCapture: "display-capture", DocumentDomain: "document-domain", EncryptedMedia: "encrypted-media", ExecutionWhileOutOfViewport: "execution-while-out-of-viewport", ExecutionWhileNotRendered: "execution-while-not-rendered", FocusWithoutUserActivation: "focus-without-user-activation", Fullscreen: "fullscreen", Frobulate: "frobulate", Gamepad: "gamepad", Geolocation: "geolocation", Gyroscope: "gyroscope", Hid: "hid", IdentityCredentialsGet: "identity-credentials-get", IdleDetection: "idle-detection", InterestCohort: "interest-cohort", JoinAdInterestGroup: "join-ad-interest-group", KeyboardMap: "keyboard-map", LanguageDetector: "language-detector", LanguageModel: "language-model", LocalFonts: "local-fonts", LocalNetwork: "local-network", LocalNetworkAccess: "local-network-access", LoopbackNetwork: "loopback-network", Magnetometer: "magnetometer", ManualText: "manual-text", MediaPlaybackWhileNotVisible: "media-playback-while-not-visible", Microphone: "microphone", Midi: "midi", OnDeviceSpeechRecognition: "on-device-speech-recognition", OtpCredentials: "otp-credentials", Payment: "payment", PictureInPicture: "picture-in-picture", PrivateAggregation: "private-aggregation", PrivateStateTokenIssuance: "private-state-token-issuance", PrivateStateTokenRedemption: "private-state-token-redemption", PublickeyCredentialsCreate: "publickey-credentials-create", PublickeyCredentialsGet: "publickey-credentials-get", RecordAdAuctionEvents: "record-ad-auction-events", Rewriter: "rewriter", RunAdAuction: "run-ad-auction", ScreenWakeLock: "screen-wake-lock", Serial: "serial", SharedStorage: "shared-storage", SharedStorageSelectUrl: "shared-storage-select-url", SmartCard: "smart-card", SpeakerSelection: "speaker-selection", StorageAccess: "storage-access", SubApps: "sub-apps", Summarizer: "summarizer", SyncXhr: "sync-xhr", Tools: "tools", Translator: "translator", Unload: "unload", Usb: "usb", UsbUnrestricted: "usb-unrestricted", VerticalScroll: "vertical-scroll", WebAppInstallation: "web-app-installation", Webnn: "webnn", WebPrinting: "web-printing", WebShare: "web-share", WindowManagement: "window-management", Writer: "writer", XrSpatialTracking: "xr-spatial-tracking"});
|
|
1051
1050
|
inspectorBackend.registerEnum("Page.PermissionsPolicyBlockReason", {Header: "Header", IframeAttribute: "IframeAttribute", InFencedFrameTree: "InFencedFrameTree", InIsolatedApp: "InIsolatedApp"});
|
|
1052
1051
|
inspectorBackend.registerEnum("Page.OriginTrialTokenStatus", {Success: "Success", NotSupported: "NotSupported", Insecure: "Insecure", Expired: "Expired", WrongOrigin: "WrongOrigin", InvalidSignature: "InvalidSignature", Malformed: "Malformed", WrongVersion: "WrongVersion", FeatureDisabled: "FeatureDisabled", TokenDisabled: "TokenDisabled", FeatureDisabledForUser: "FeatureDisabledForUser", UnknownTrial: "UnknownTrial"});
|
|
1053
1052
|
inspectorBackend.registerEnum("Page.OriginTrialStatus", {Enabled: "Enabled", ValidTokenNotProvided: "ValidTokenNotProvided", OSNotSupported: "OSNotSupported", TrialNotAllowed: "TrialNotAllowed"});
|
|
@@ -1120,30 +1120,6 @@ export namespace Audits {
|
|
|
1120
1120
|
clientSecurityState?: Network.ClientSecurityState;
|
|
1121
1121
|
}
|
|
1122
1122
|
|
|
1123
|
-
export const enum AttributionReportingIssueType {
|
|
1124
|
-
PermissionPolicyDisabled = 'PermissionPolicyDisabled',
|
|
1125
|
-
UntrustworthyReportingOrigin = 'UntrustworthyReportingOrigin',
|
|
1126
|
-
InsecureContext = 'InsecureContext',
|
|
1127
|
-
InvalidHeader = 'InvalidHeader',
|
|
1128
|
-
InvalidRegisterTriggerHeader = 'InvalidRegisterTriggerHeader',
|
|
1129
|
-
SourceAndTriggerHeaders = 'SourceAndTriggerHeaders',
|
|
1130
|
-
SourceIgnored = 'SourceIgnored',
|
|
1131
|
-
TriggerIgnored = 'TriggerIgnored',
|
|
1132
|
-
OsSourceIgnored = 'OsSourceIgnored',
|
|
1133
|
-
OsTriggerIgnored = 'OsTriggerIgnored',
|
|
1134
|
-
InvalidRegisterOsSourceHeader = 'InvalidRegisterOsSourceHeader',
|
|
1135
|
-
InvalidRegisterOsTriggerHeader = 'InvalidRegisterOsTriggerHeader',
|
|
1136
|
-
WebAndOsHeaders = 'WebAndOsHeaders',
|
|
1137
|
-
NoWebOrOsSupport = 'NoWebOrOsSupport',
|
|
1138
|
-
NavigationRegistrationWithoutTransientUserActivation = 'NavigationRegistrationWithoutTransientUserActivation',
|
|
1139
|
-
InvalidInfoHeader = 'InvalidInfoHeader',
|
|
1140
|
-
NoRegisterSourceHeader = 'NoRegisterSourceHeader',
|
|
1141
|
-
NoRegisterTriggerHeader = 'NoRegisterTriggerHeader',
|
|
1142
|
-
NoRegisterOsSourceHeader = 'NoRegisterOsSourceHeader',
|
|
1143
|
-
NoRegisterOsTriggerHeader = 'NoRegisterOsTriggerHeader',
|
|
1144
|
-
NavigationRegistrationUniqueScopeAlreadySet = 'NavigationRegistrationUniqueScopeAlreadySet',
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
1123
|
export const enum SharedDictionaryError {
|
|
1148
1124
|
UseErrorCrossOriginNoCorsRequest = 'UseErrorCrossOriginNoCorsRequest',
|
|
1149
1125
|
UseErrorDictionaryLoadFailure = 'UseErrorDictionaryLoadFailure',
|
|
@@ -1217,17 +1193,6 @@ export namespace Audits {
|
|
|
1217
1193
|
InvalidUrlPattern = 'InvalidUrlPattern',
|
|
1218
1194
|
}
|
|
1219
1195
|
|
|
1220
|
-
/**
|
|
1221
|
-
* Details for issues around "Attribution Reporting API" usage.
|
|
1222
|
-
* Explainer: https://github.com/WICG/attribution-reporting-api
|
|
1223
|
-
*/
|
|
1224
|
-
export interface AttributionReportingIssueDetails {
|
|
1225
|
-
violationType: AttributionReportingIssueType;
|
|
1226
|
-
request?: AffectedRequest;
|
|
1227
|
-
violatingNodeId?: DOM.BackendNodeId;
|
|
1228
|
-
invalidParameter?: string;
|
|
1229
|
-
}
|
|
1230
|
-
|
|
1231
1196
|
/**
|
|
1232
1197
|
* Details for issues about documents in Quirks Mode
|
|
1233
1198
|
* or Limited Quirks Mode that affects page layouting.
|
|
@@ -1707,6 +1672,24 @@ export namespace Audits {
|
|
|
1707
1672
|
stackTrace?: Runtime.StackTrace;
|
|
1708
1673
|
}
|
|
1709
1674
|
|
|
1675
|
+
/**
|
|
1676
|
+
* Details for issues about lazy-loaded images without explicit dimensions.
|
|
1677
|
+
*/
|
|
1678
|
+
export interface LazyLoadImageIssueDetails {
|
|
1679
|
+
/**
|
|
1680
|
+
* DOM node of the problematic HTMLImageElement.
|
|
1681
|
+
*/
|
|
1682
|
+
nodeId: DOM.BackendNodeId;
|
|
1683
|
+
/**
|
|
1684
|
+
* URL or src attribute of the image.
|
|
1685
|
+
*/
|
|
1686
|
+
url: string;
|
|
1687
|
+
/**
|
|
1688
|
+
* Frame containing the image.
|
|
1689
|
+
*/
|
|
1690
|
+
frameId: Page.FrameId;
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1710
1693
|
/**
|
|
1711
1694
|
* A unique identifier for the type of issue. Each type may use one of the
|
|
1712
1695
|
* optional fields in InspectorIssueDetails to convey more specific
|
|
@@ -1720,7 +1703,6 @@ export namespace Audits {
|
|
|
1720
1703
|
ContentSecurityPolicyIssue = 'ContentSecurityPolicyIssue',
|
|
1721
1704
|
SharedArrayBufferIssue = 'SharedArrayBufferIssue',
|
|
1722
1705
|
CorsIssue = 'CorsIssue',
|
|
1723
|
-
AttributionReportingIssue = 'AttributionReportingIssue',
|
|
1724
1706
|
QuirksModeIssue = 'QuirksModeIssue',
|
|
1725
1707
|
PartitioningBlobURLIssue = 'PartitioningBlobURLIssue',
|
|
1726
1708
|
NavigatorUserAgentIssue = 'NavigatorUserAgentIssue',
|
|
@@ -1743,6 +1725,7 @@ export namespace Audits {
|
|
|
1743
1725
|
PerformanceIssue = 'PerformanceIssue',
|
|
1744
1726
|
SelectivePermissionsInterventionIssue = 'SelectivePermissionsInterventionIssue',
|
|
1745
1727
|
EmailVerificationRequestIssue = 'EmailVerificationRequestIssue',
|
|
1728
|
+
LazyLoadImageIssue = 'LazyLoadImageIssue',
|
|
1746
1729
|
}
|
|
1747
1730
|
|
|
1748
1731
|
/**
|
|
@@ -1758,7 +1741,6 @@ export namespace Audits {
|
|
|
1758
1741
|
contentSecurityPolicyIssueDetails?: ContentSecurityPolicyIssueDetails;
|
|
1759
1742
|
sharedArrayBufferIssueDetails?: SharedArrayBufferIssueDetails;
|
|
1760
1743
|
corsIssueDetails?: CorsIssueDetails;
|
|
1761
|
-
attributionReportingIssueDetails?: AttributionReportingIssueDetails;
|
|
1762
1744
|
quirksModeIssueDetails?: QuirksModeIssueDetails;
|
|
1763
1745
|
partitioningBlobURLIssueDetails?: PartitioningBlobURLIssueDetails;
|
|
1764
1746
|
/**
|
|
@@ -1784,6 +1766,7 @@ export namespace Audits {
|
|
|
1784
1766
|
performanceIssueDetails?: PerformanceIssueDetails;
|
|
1785
1767
|
selectivePermissionsInterventionIssueDetails?: SelectivePermissionsInterventionIssueDetails;
|
|
1786
1768
|
emailVerificationRequestIssueDetails?: EmailVerificationRequestIssueDetails;
|
|
1769
|
+
lazyLoadImageIssueDetails?: LazyLoadImageIssueDetails;
|
|
1787
1770
|
}
|
|
1788
1771
|
|
|
1789
1772
|
/**
|
|
@@ -14719,7 +14702,6 @@ export namespace Page {
|
|
|
14719
14702
|
AllScreensCapture = 'all-screens-capture',
|
|
14720
14703
|
AmbientLightSensor = 'ambient-light-sensor',
|
|
14721
14704
|
AriaNotify = 'aria-notify',
|
|
14722
|
-
AttributionReporting = 'attribution-reporting',
|
|
14723
14705
|
Autofill = 'autofill',
|
|
14724
14706
|
Autoplay = 'autoplay',
|
|
14725
14707
|
Bluetooth = 'bluetooth',
|
|
@@ -55,9 +55,9 @@ export class CompilerScriptMapping implements DebuggerSourceMapping {
|
|
|
55
55
|
this.#debuggerModel = debuggerModel;
|
|
56
56
|
this.#ignoreListManager = debuggerWorkspaceBinding.ignoreListManager;
|
|
57
57
|
|
|
58
|
-
this.#stubProject =
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
this.#stubProject =
|
|
59
|
+
new ContentProviderBasedProject(workspace, 'jsSourceMaps:stub:' + debuggerModel.target().id(),
|
|
60
|
+
Workspace.Workspace.projectTypes.Service, '', true /* isServiceProject */);
|
|
61
61
|
this.#eventListeners = [
|
|
62
62
|
this.#sourceMapManager.addEventListener(
|
|
63
63
|
SDK.SourceMapManager.Events.SourceMapWillAttach, this.sourceMapWillAttach, this),
|
|
@@ -464,7 +464,8 @@ export class CompilerScriptMapping implements DebuggerSourceMapping {
|
|
|
464
464
|
const projectType = script.isContentScript() ? Workspace.Workspace.projectTypes.ContentScripts :
|
|
465
465
|
Workspace.Workspace.projectTypes.Network;
|
|
466
466
|
project = new ContentProviderBasedProject(this.#stubProject.workspace(), projectId, projectType,
|
|
467
|
-
/* displayName */ '', /* isServiceProject */ false
|
|
467
|
+
/* displayName */ '', /* isServiceProject */ false);
|
|
468
|
+
NetworkProject.setTargetForProject(project, target);
|
|
468
469
|
this.#projects.set(projectId, project);
|
|
469
470
|
}
|
|
470
471
|
this.#sourceMapToProject.set(sourceMap, project);
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import type * as Common from '../../core/common/common.js';
|
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
7
|
import * as Platform from '../../core/platform/platform.js';
|
|
8
|
-
import type * as SDK from '../../core/sdk/sdk.js';
|
|
9
8
|
import * as TextUtils from '../text_utils/text_utils.js';
|
|
10
9
|
import * as Workspace from '../workspace/workspace.js';
|
|
11
10
|
|
|
@@ -28,8 +27,8 @@ export class ContentProviderBasedProject extends Workspace.Workspace.ProjectStor
|
|
|
28
27
|
readonly #isServiceProject: boolean;
|
|
29
28
|
readonly #uiSourceCodeToData = new WeakMap<Workspace.UISourceCode.UISourceCode, UISourceCodeData>();
|
|
30
29
|
constructor(workspace: Workspace.Workspace.WorkspaceImpl, id: string, type: Workspace.Workspace.projectTypes,
|
|
31
|
-
displayName: string, isServiceProject: boolean
|
|
32
|
-
super(workspace, id, type, displayName
|
|
30
|
+
displayName: string, isServiceProject: boolean) {
|
|
31
|
+
super(workspace, id, type, displayName);
|
|
33
32
|
this.#isServiceProject = isServiceProject;
|
|
34
33
|
workspace.addProject(this);
|
|
35
34
|
}
|
|
@@ -1100,9 +1100,10 @@ class ModelData {
|
|
|
1100
1100
|
project: ContentProviderBasedProject;
|
|
1101
1101
|
readonly uiSourceCodeToScripts: Map<Workspace.UISourceCode.UISourceCode, SDK.Script.Script[]>;
|
|
1102
1102
|
constructor(debuggerModel: SDK.DebuggerModel.DebuggerModel, workspace: Workspace.Workspace.WorkspaceImpl) {
|
|
1103
|
-
this.project =
|
|
1104
|
-
|
|
1105
|
-
|
|
1103
|
+
this.project =
|
|
1104
|
+
new ContentProviderBasedProject(workspace, 'language_plugins::' + debuggerModel.target().id(),
|
|
1105
|
+
Workspace.Workspace.projectTypes.Network, '', false /* isServiceProject */);
|
|
1106
|
+
NetworkProject.setTargetForProject(this.project, debuggerModel.target());
|
|
1106
1107
|
|
|
1107
1108
|
this.uiSourceCodeToScripts = new Map();
|
|
1108
1109
|
}
|
|
@@ -23,9 +23,9 @@ export class DefaultScriptMapping implements DebuggerSourceMapping {
|
|
|
23
23
|
debuggerWorkspaceBinding: DebuggerWorkspaceBinding) {
|
|
24
24
|
defaultScriptMappings.add(this);
|
|
25
25
|
this.#debuggerWorkspaceBinding = debuggerWorkspaceBinding;
|
|
26
|
-
this.#project =
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
this.#project =
|
|
27
|
+
new ContentProviderBasedProject(workspace, 'debugger:' + debuggerModel.target().id(),
|
|
28
|
+
Workspace.Workspace.projectTypes.Debugger, '', true /* isServiceProject */);
|
|
29
29
|
this.#eventListeners = [
|
|
30
30
|
debuggerModel.addEventListener(SDK.DebuggerModel.Events.GlobalObjectCleared, this.globalObjectCleared, this),
|
|
31
31
|
debuggerModel.addEventListener(SDK.DebuggerModel.Events.ParsedScriptSource, this.parsedScriptSource, this),
|
|
@@ -12,6 +12,7 @@ const uiSourceCodeToAttributionMap = new WeakMap<Workspace.UISourceCode.UISource
|
|
|
12
12
|
frame: SDK.ResourceTreeModel.ResourceTreeFrame,
|
|
13
13
|
count: number,
|
|
14
14
|
}>>();
|
|
15
|
+
const projectToTargetMap = new WeakMap<Workspace.Workspace.Project, SDK.Target.Target>();
|
|
15
16
|
|
|
16
17
|
export class NetworkProjectManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
17
18
|
|
|
@@ -131,7 +132,15 @@ export class NetworkProject {
|
|
|
131
132
|
}
|
|
132
133
|
|
|
133
134
|
static targetForUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): SDK.Target.Target|null {
|
|
134
|
-
return uiSourceCode.project()
|
|
135
|
+
return projectToTargetMap.get(uiSourceCode.project()) || null;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
static setTargetForProject(project: Workspace.Workspace.Project, target: SDK.Target.Target): void {
|
|
139
|
+
projectToTargetMap.set(project, target);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
static getTargetForProject(project: Workspace.Workspace.Project): SDK.Target.Target|null {
|
|
143
|
+
return projectToTargetMap.get(project) || null;
|
|
135
144
|
}
|
|
136
145
|
|
|
137
146
|
static framesForUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode):
|
|
@@ -361,9 +361,10 @@ class ModelInfo {
|
|
|
361
361
|
constructor(resourceMapping: ResourceMapping, resourceTreeModel: SDK.ResourceTreeModel.ResourceTreeModel) {
|
|
362
362
|
const target = resourceTreeModel.target();
|
|
363
363
|
this.resourceMapping = resourceMapping;
|
|
364
|
-
this.project =
|
|
365
|
-
|
|
366
|
-
|
|
364
|
+
this.project =
|
|
365
|
+
new ContentProviderBasedProject(resourceMapping.workspace, 'resources:' + target.id(),
|
|
366
|
+
Workspace.Workspace.projectTypes.Network, '', false /* isServiceProject */);
|
|
367
|
+
NetworkProject.setTargetForProject(this.project, target);
|
|
367
368
|
|
|
368
369
|
const cssModel = target.model(SDK.CSSModel.CSSModel);
|
|
369
370
|
console.assert(Boolean(cssModel));
|
|
@@ -74,7 +74,8 @@ export class ResourceScriptMapping implements DebuggerSourceMapping {
|
|
|
74
74
|
const projectType = script.isContentScript() ? Workspace.Workspace.projectTypes.ContentScripts :
|
|
75
75
|
Workspace.Workspace.projectTypes.Network;
|
|
76
76
|
project = new ContentProviderBasedProject(this.#workspace, projectId, projectType, '' /* displayName */,
|
|
77
|
-
false /* isServiceProject
|
|
77
|
+
false /* isServiceProject */);
|
|
78
|
+
NetworkProject.setTargetForProject(project, this.debuggerModel.target());
|
|
78
79
|
this.#projects.set(projectId, project);
|
|
79
80
|
}
|
|
80
81
|
return project;
|
|
@@ -26,9 +26,10 @@ export class SASSSourceMapping implements SourceMapping {
|
|
|
26
26
|
workspace: Workspace.Workspace.WorkspaceImpl, cssWorkspaceBinding: CSSWorkspaceBinding) {
|
|
27
27
|
this.#sourceMapManager = sourceMapManager;
|
|
28
28
|
this.#cssWorkspaceBinding = cssWorkspaceBinding;
|
|
29
|
-
this.#project =
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
this.#project =
|
|
30
|
+
new ContentProviderBasedProject(workspace, 'cssSourceMaps:' + target.id(),
|
|
31
|
+
Workspace.Workspace.projectTypes.Network, '', false /* isServiceProject */);
|
|
32
|
+
NetworkProject.setTargetForProject(this.#project, target);
|
|
32
33
|
|
|
33
34
|
this.#bindings = new Map();
|
|
34
35
|
|
|
@@ -24,9 +24,9 @@ export class StylesSourceMapping implements SourceMapping {
|
|
|
24
24
|
constructor(cssModel: SDK.CSSModel.CSSModel, workspace: Workspace.Workspace.WorkspaceImpl) {
|
|
25
25
|
this.#cssModel = cssModel;
|
|
26
26
|
const target = this.#cssModel.target();
|
|
27
|
-
this.#project =
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
this.#project = new ContentProviderBasedProject(
|
|
28
|
+
workspace, 'css:' + target.id(), Workspace.Workspace.projectTypes.Network, '', false /* isServiceProject */);
|
|
29
|
+
NetworkProject.setTargetForProject(this.#project, target);
|
|
30
30
|
|
|
31
31
|
this.#eventListeners = [
|
|
32
32
|
this.#cssModel.addEventListener(SDK.CSSModel.Events.StyleSheetAdded, this.styleSheetAdded, this),
|
|
@@ -6,22 +6,24 @@ import type * as Platform from '../../core/platform/platform.js';
|
|
|
6
6
|
|
|
7
7
|
import {PrivateAPI} from './ExtensionAPI.js';
|
|
8
8
|
import {ExtensionEndpoint} from './ExtensionEndpoint.js';
|
|
9
|
-
import {RecorderPluginManager} from './RecorderPluginManager.js';
|
|
9
|
+
import type {RecorderPluginManager} from './RecorderPluginManager.js';
|
|
10
10
|
|
|
11
11
|
export class RecorderExtensionEndpoint extends ExtensionEndpoint {
|
|
12
12
|
private readonly name: string;
|
|
13
13
|
private readonly mediaType?: string;
|
|
14
14
|
private readonly capabilities: PrivateAPI.RecordingExtensionPluginCapability[];
|
|
15
15
|
readonly #extensionOrigin: Platform.DevToolsPath.UrlString;
|
|
16
|
+
readonly #recorderPluginManager: RecorderPluginManager;
|
|
16
17
|
|
|
17
|
-
constructor(
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
constructor(name: string, port: MessagePort, capabilities: PrivateAPI.RecordingExtensionPluginCapability[],
|
|
19
|
+
extensionOrigin: Platform.DevToolsPath.UrlString, recorderPluginManager: RecorderPluginManager,
|
|
20
|
+
mediaType?: string) {
|
|
20
21
|
super(port);
|
|
21
22
|
this.name = name;
|
|
22
23
|
this.mediaType = mediaType;
|
|
23
24
|
this.capabilities = capabilities;
|
|
24
25
|
this.#extensionOrigin = extensionOrigin;
|
|
26
|
+
this.#recorderPluginManager = recorderPluginManager;
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
getName(): string {
|
|
@@ -44,7 +46,7 @@ export class RecorderExtensionEndpoint extends ExtensionEndpoint {
|
|
|
44
46
|
switch (event) {
|
|
45
47
|
case PrivateAPI.RecorderExtensionPluginEvents.UnregisteredRecorderExtensionPlugin: {
|
|
46
48
|
this.disconnect();
|
|
47
|
-
|
|
49
|
+
this.#recorderPluginManager.removePlugin(this);
|
|
48
50
|
break;
|
|
49
51
|
}
|
|
50
52
|
default:
|
|
@@ -11,6 +11,7 @@ import type * as HeapSnapshotModel from './HeapSnapshotModel.js';
|
|
|
11
11
|
|
|
12
12
|
export class HeapSnapshotWorkerProxy extends Common.ObjectWrapper.ObjectWrapper<HeapSnapshotWorkerProxy.EventTypes> {
|
|
13
13
|
readonly eventHandler: (arg0: string, arg1: string) => void;
|
|
14
|
+
#console: Common.Console.Console;
|
|
14
15
|
nextObjectId = 1;
|
|
15
16
|
nextCallId = 1;
|
|
16
17
|
callbacks = new Map<number, (...args: any[]) => void>();
|
|
@@ -19,9 +20,14 @@ export class HeapSnapshotWorkerProxy extends Common.ObjectWrapper.ObjectWrapper<
|
|
|
19
20
|
interval?: number;
|
|
20
21
|
readonly workerUrl?: string;
|
|
21
22
|
|
|
22
|
-
constructor(
|
|
23
|
+
constructor(
|
|
24
|
+
eventHandler: (arg0: string, arg1: string) => void,
|
|
25
|
+
console: Common.Console.Console,
|
|
26
|
+
workerUrl?: string,
|
|
27
|
+
) {
|
|
23
28
|
super();
|
|
24
29
|
this.eventHandler = eventHandler;
|
|
30
|
+
this.#console = console;
|
|
25
31
|
this.workerUrl = workerUrl;
|
|
26
32
|
this.worker = Platform.HostRuntime.HOST_RUNTIME.createWorker(
|
|
27
33
|
workerUrl ?? import.meta.resolve('../../entrypoints/heap_snapshot_worker/heap_snapshot_worker-entrypoint.js'),
|
|
@@ -29,6 +35,10 @@ export class HeapSnapshotWorkerProxy extends Common.ObjectWrapper.ObjectWrapper<
|
|
|
29
35
|
this.worker.onmessage = this.messageReceived.bind(this);
|
|
30
36
|
}
|
|
31
37
|
|
|
38
|
+
get console(): Common.Console.Console {
|
|
39
|
+
return this.#console;
|
|
40
|
+
}
|
|
41
|
+
|
|
32
42
|
createLoader(profileUid: number, snapshotReceivedCallback: (arg0: HeapSnapshotProxy) => void):
|
|
33
43
|
HeapSnapshotLoaderProxy {
|
|
34
44
|
const objectId = this.nextObjectId++;
|
|
@@ -159,9 +169,8 @@ export class HeapSnapshotWorkerProxy extends Common.ObjectWrapper.ObjectWrapper<
|
|
|
159
169
|
return;
|
|
160
170
|
}
|
|
161
171
|
if (data.error) {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
Common.Console.Console.instance().error(data['errorCallStack']);
|
|
172
|
+
this.#console.error(`An error occurred when a call to method '${data.errorMethodName}' was requested`);
|
|
173
|
+
this.#console.error(data['errorCallStack']);
|
|
165
174
|
this.callbacks.delete(data.callId);
|
|
166
175
|
return;
|
|
167
176
|
}
|
|
@@ -238,7 +247,7 @@ export class HeapSnapshotLoaderProxy extends HeapSnapshotProxyObject implements
|
|
|
238
247
|
|
|
239
248
|
async close(): Promise<void> {
|
|
240
249
|
await this.callMethodPromise('close');
|
|
241
|
-
const secondWorker = new HeapSnapshotWorkerProxy(() => {}, this.worker.workerUrl);
|
|
250
|
+
const secondWorker = new HeapSnapshotWorkerProxy(() => {}, this.worker.console, this.worker.workerUrl);
|
|
242
251
|
const channel = new MessageChannel();
|
|
243
252
|
await secondWorker.setupForSecondaryInit(channel.port2);
|
|
244
253
|
const snapshotProxy = await this.callFactoryMethodPromise('buildSnapshot', HeapSnapshotProxy, [channel.port1]);
|
|
@@ -3,20 +3,19 @@
|
|
|
3
3
|
// Use of this source code is governed by a BSD-style license that can be
|
|
4
4
|
// found in the LICENSE file.
|
|
5
5
|
import type * as Common from '../../core/common/common.js';
|
|
6
|
+
import * as Root from '../../core/root/root.js';
|
|
6
7
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Responsible for asking autofill for current form issues. This currently happens when devtools is first open.
|
|
10
11
|
*/
|
|
11
12
|
// TODO(crbug.com/1399414): Trigger check form issues when an element with an associated issue is editted in the issues panel.
|
|
12
|
-
let checkFormsIssuesTriggerInstance: CheckFormsIssuesTrigger|null = null;
|
|
13
13
|
export class CheckFormsIssuesTrigger {
|
|
14
|
-
constructor() {
|
|
15
|
-
SDK.
|
|
16
|
-
|
|
17
|
-
{scoped: true});
|
|
14
|
+
constructor(targetManager: SDK.TargetManager.TargetManager = SDK.TargetManager.TargetManager.instance()) {
|
|
15
|
+
targetManager.addModelListener(SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.Load,
|
|
16
|
+
this.#pageLoaded, this, {scoped: true});
|
|
18
17
|
|
|
19
|
-
for (const model of
|
|
18
|
+
for (const model of targetManager.models(SDK.ResourceTreeModel.ResourceTreeModel)) {
|
|
20
19
|
if (model.target().outermostTarget() !== model.target()) {
|
|
21
20
|
continue;
|
|
22
21
|
}
|
|
@@ -26,10 +25,10 @@ export class CheckFormsIssuesTrigger {
|
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
static instance({forceNew}: {forceNew: boolean} = {forceNew: false}): CheckFormsIssuesTrigger {
|
|
29
|
-
if (!
|
|
30
|
-
|
|
28
|
+
if (!Root.DevToolsContext.globalInstance().has(CheckFormsIssuesTrigger) || forceNew) {
|
|
29
|
+
Root.DevToolsContext.globalInstance().set(CheckFormsIssuesTrigger, new CheckFormsIssuesTrigger());
|
|
31
30
|
}
|
|
32
|
-
return
|
|
31
|
+
return Root.DevToolsContext.globalInstance().get(CheckFormsIssuesTrigger);
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
// TODO(crbug.com/1399414): Handle response by dropping current issues in favor of new ones.
|
|
@@ -6,7 +6,7 @@ import * as Common from '../../core/common/common.js';
|
|
|
6
6
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
7
7
|
|
|
8
8
|
import type {Issue, IssueCategory} from './Issue.js';
|
|
9
|
-
import {IssuesManager} from './IssuesManager.js';
|
|
9
|
+
import type {IssuesManager} from './IssuesManager.js';
|
|
10
10
|
|
|
11
11
|
export type IssuesAssociatable = Readonly<SDK.NetworkRequest.NetworkRequest>|SDK.Cookie.Cookie|string;
|
|
12
12
|
|
|
@@ -45,24 +45,26 @@ export function issuesAssociatedWith(issues: Issue[], obj: IssuesAssociatable):
|
|
|
45
45
|
throw new Error(`issues can not be associated with ${JSON.stringify(obj)}`);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
export function hasIssues(obj: IssuesAssociatable): boolean {
|
|
49
|
-
const issues = Array.from(
|
|
48
|
+
export function hasIssues(obj: IssuesAssociatable, issuesManager: IssuesManager): boolean {
|
|
49
|
+
const issues = Array.from(issuesManager.issues());
|
|
50
50
|
return issuesAssociatedWith(issues, obj).length > 0;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
export function hasIssueOfCategory(obj: IssuesAssociatable, category: IssueCategory
|
|
54
|
-
|
|
53
|
+
export function hasIssueOfCategory(obj: IssuesAssociatable, category: IssueCategory,
|
|
54
|
+
issuesManager: IssuesManager): boolean {
|
|
55
|
+
const issues = Array.from(issuesManager.issues());
|
|
55
56
|
return issuesAssociatedWith(issues, obj).some(issue => issue.getCategory() === category);
|
|
56
57
|
}
|
|
57
58
|
|
|
58
|
-
export async function reveal(obj: IssuesAssociatable,
|
|
59
|
+
export async function reveal(obj: IssuesAssociatable, issuesManager: IssuesManager,
|
|
60
|
+
category?: IssueCategory): Promise<void|undefined> {
|
|
59
61
|
if (typeof obj === 'string') {
|
|
60
|
-
const issue =
|
|
62
|
+
const issue = issuesManager.getIssueById(obj);
|
|
61
63
|
if (issue) {
|
|
62
64
|
return await Common.Revealer.reveal(issue);
|
|
63
65
|
}
|
|
64
66
|
}
|
|
65
|
-
const issues = Array.from(
|
|
67
|
+
const issues = Array.from(issuesManager.issues());
|
|
66
68
|
const candidates = issuesAssociatedWith(issues, obj).filter(issue => !category || issue.getCategory() === category);
|
|
67
69
|
if (candidates.length > 0) {
|
|
68
70
|
return await Common.Revealer.reveal(candidates[0]);
|
|
@@ -6,7 +6,7 @@ import * as Common from '../../core/common/common.js';
|
|
|
6
6
|
import type * as SDK from '../../core/sdk/sdk.js';
|
|
7
7
|
import type * as Protocol from '../../generated/protocol.js';
|
|
8
8
|
|
|
9
|
-
import {Events as NetworkLogEvents, NetworkLog} from './NetworkLog.js';
|
|
9
|
+
import {Events as NetworkLogEvents, type NetworkLog} from './NetworkLog.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* A class that facilitates resolving a requestId to a network request. If the requestId does not resolve, a listener
|
|
@@ -22,7 +22,7 @@ export class RequestResolver extends
|
|
|
22
22
|
private networkListener: Common.EventTarget.EventDescriptor|null = null;
|
|
23
23
|
private networkLog: NetworkLog;
|
|
24
24
|
|
|
25
|
-
constructor(networkLog: NetworkLog
|
|
25
|
+
constructor(networkLog: NetworkLog) {
|
|
26
26
|
super();
|
|
27
27
|
this.networkLog = networkLog;
|
|
28
28
|
}
|