chrome-devtools-frontend 1.0.1695017 → 1.0.1696904
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/front_end/core/platform/Size.ts +43 -0
- package/front_end/core/platform/platform.ts +1 -0
- package/front_end/core/sdk/AccessibilityModel.ts +2 -2
- package/front_end/core/sdk/CSSMatchedStyles.ts +2 -0
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +29 -0
- package/front_end/core/sdk/DOMModel.ts +10 -6
- package/front_end/generated/InspectorBackendCommands.ts +6 -3
- package/front_end/generated/protocol-mapping.d.ts +7 -0
- package/front_end/generated/protocol-proxy-api.d.ts +5 -0
- package/front_end/generated/protocol.ts +36 -3
- package/front_end/models/ai_assistance/AiAgent2.ts +27 -27
- package/front_end/models/ai_assistance/agents/AiAgent.ts +4 -0
- package/front_end/models/ai_assistance/contexts/AccessibilityContext.ts +1 -0
- package/front_end/models/ai_assistance/contexts/DOMNodeContext.ts +1 -0
- package/front_end/models/ai_assistance/contexts/FileContext.ts +1 -0
- package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +1 -0
- package/front_end/models/ai_assistance/contexts/RequestContext.ts +1 -0
- package/front_end/models/ai_assistance/contexts/StorageContext.ts +1 -0
- package/front_end/models/ai_assistance/tools/GetElementAccessibilityDetails.ts +5 -8
- package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +4 -8
- package/front_end/models/ai_assistance/tools/GetSourceContent.ts +7 -5
- package/front_end/models/ai_assistance/tools/GetStyles.ts +10 -6
- package/front_end/models/ai_assistance/tools/ListSources.ts +26 -7
- package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +5 -10
- package/front_end/models/ai_assistance/tools/Tool.ts +8 -1
- package/front_end/models/comment_manager/CommentManager.ts +30 -6
- package/front_end/models/emulation/DeviceModeModel.ts +11 -12
- package/front_end/models/javascript_metadata/NativeFunctions.ts +1 -5
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +73 -17
- package/front_end/panels/ai_assistance/components/AIv2MarkdownRenderer.ts +14 -3
- package/front_end/panels/animation/AnimationUI.ts +1 -1
- package/front_end/panels/application/CookieItemsView.ts +1 -1
- package/front_end/panels/application/KeyValueStorageItemsView.ts +1 -1
- package/front_end/panels/application/components/AdsView.ts +134 -5
- package/front_end/panels/application/components/adScriptsTable.css +22 -0
- package/front_end/panels/application/resourcesPanel.css +17 -17
- package/front_end/panels/common/CPUThrottlingOption.ts +0 -1
- package/front_end/panels/common/GdpSignUpDialog.ts +1 -1
- package/front_end/panels/common/GeminiRebrandPromoDialog.ts +1 -1
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +1 -1
- package/front_end/panels/elements/ElementsTreeOutline.ts +1 -1
- package/front_end/panels/elements/StylePropertyTreeElement.ts +83 -0
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +2 -1
- package/front_end/panels/emulation/DeviceModeView.ts +1 -1
- package/front_end/panels/event_listeners/EventListenersView.ts +57 -88
- package/front_end/panels/layer_viewer/Layers3DView.ts +1 -1
- package/front_end/panels/layers/LayerTreeModel.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseStatusView.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseTimespanView.ts +1 -1
- package/front_end/panels/mobile_throttling/CalibrationController.ts +3 -0
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +10 -0
- package/front_end/panels/security/OriginTreeElement.ts +59 -0
- package/front_end/panels/security/SecurityPanel.ts +6 -5
- package/front_end/panels/security/SecurityPanelSidebar.ts +231 -64
- package/front_end/panels/security/SecurityPanelSidebarTreeElement.ts +30 -0
- package/front_end/panels/security/security.ts +4 -0
- package/front_end/panels/sensors/SensorsView.ts +1 -1
- package/front_end/panels/sources/CSSPlugin.ts +1 -1
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +1 -1
- package/front_end/panels/timeline/timelineMiniMap.css +9 -9
- package/front_end/panels/timeline/timelineStatusDialog.css +9 -9
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/comments/CommentAnchorResolver.ts +114 -3
- package/front_end/ui/comments/CommentOverlayManager.ts +95 -16
- package/front_end/ui/components/dialogs/TypeToAllowDialog.ts +1 -1
- package/front_end/ui/components/markdown_view/codeBlock.css +3 -8
- package/front_end/ui/components/markdown_view/markdownView.css +2 -7
- package/front_end/{models → ui}/geometry/GeometryImpl.ts +4 -40
- package/front_end/ui/legacy/GlassPane.ts +1 -1
- package/front_end/ui/legacy/SoftDropDown.ts +1 -1
- package/front_end/ui/legacy/SplitWidget.ts +1 -1
- package/front_end/ui/legacy/SuggestBox.ts +1 -1
- package/front_end/ui/legacy/TabbedPane.ts +1 -1
- package/front_end/ui/legacy/Treeoutline.ts +5 -1
- package/front_end/ui/legacy/UIUtils.ts +1 -1
- package/front_end/ui/legacy/Widget.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingModel.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingUI.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/BezierUI.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/CSSAngleUtils.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/PositionAreaEditor.ts +204 -17
- package/front_end/ui/legacy/components/inline_editor/positionAreaEditor.css +6 -0
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +1 -1
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +1 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +12 -0
- package/package.json +1 -1
- /package/front_end/{models → ui}/geometry/geometry.ts +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Copyright 2026 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
export class Size {
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
constructor(width: number, height: number) {
|
|
9
|
+
this.width = width;
|
|
10
|
+
this.height = height;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
clipTo(size?: Size|null): Size {
|
|
14
|
+
if (!size) {
|
|
15
|
+
return this;
|
|
16
|
+
}
|
|
17
|
+
return new Size(Math.min(this.width, size.width), Math.min(this.height, size.height));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
scale(scale: number): Size {
|
|
21
|
+
return new Size(this.width * scale, this.height * scale);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
isEqual(size: Size|null): boolean {
|
|
25
|
+
return size !== null && this.width === size.width && this.height === size.height;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
widthToMax(size: number|Size): Size {
|
|
29
|
+
return new Size(Math.max(this.width, (typeof size === 'number' ? size : size.width)), this.height);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
addWidth(size: number|Size): Size {
|
|
33
|
+
return new Size(this.width + (typeof size === 'number' ? size : size.width), this.height);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
heightToMax(size: number|Size): Size {
|
|
37
|
+
return new Size(this.width, Math.max(this.height, (typeof size === 'number' ? size : size.height)));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
addHeight(size: number|Size): Size {
|
|
41
|
+
return new Size(this.width, this.height + (typeof size === 'number' ? size : size.height));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -19,6 +19,7 @@ import * as TypeScriptUtilities from './TypescriptUtilities.js';
|
|
|
19
19
|
import * as UIString from './UIString.js';
|
|
20
20
|
import * as UserVisibleError from './UserVisibleError.js';
|
|
21
21
|
|
|
22
|
+
export {Size} from './Size.js';
|
|
22
23
|
/* `assertNotNullOrUndefined` also need to be exposed, as TypeScript does
|
|
23
24
|
* not allow `asserts` functions to be used with qualified access (e.g.
|
|
24
25
|
* `Platform.TypeScriptUtilities.assertNotNullOrUndefined` causes a compile
|
|
@@ -352,7 +352,7 @@ export class AccessibilityModel extends SDKModel<EventTypes> implements Protocol
|
|
|
352
352
|
Promise<AccessibilityNode[]> {
|
|
353
353
|
const parent = this.#axIdToAXNode.get(nodeId);
|
|
354
354
|
if (!parent) {
|
|
355
|
-
|
|
355
|
+
return [];
|
|
356
356
|
}
|
|
357
357
|
if (!parent.hasUnloadedChildren()) {
|
|
358
358
|
return parent.children();
|
|
@@ -370,7 +370,7 @@ export class AccessibilityModel extends SDKModel<EventTypes> implements Protocol
|
|
|
370
370
|
this.#pendingChildRequests.delete(nodeId);
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
|
-
return
|
|
373
|
+
return this.#axIdToAXNode.get(nodeId)?.children() ?? [];
|
|
374
374
|
}
|
|
375
375
|
|
|
376
376
|
async requestAndLoadSubTreeToNode(node: DOMNode): Promise<AccessibilityNode[]|null> {
|
|
@@ -34,6 +34,7 @@ import {
|
|
|
34
34
|
localEvalCSS,
|
|
35
35
|
MathFunctionMatcher,
|
|
36
36
|
PositionAnchorMatcher,
|
|
37
|
+
PositionAreaMatcher,
|
|
37
38
|
PositionTryMatcher,
|
|
38
39
|
RelativeColorChannelMatcher,
|
|
39
40
|
ShadowMatcher,
|
|
@@ -1068,6 +1069,7 @@ export class CSSMatchedStyles {
|
|
|
1068
1069
|
new AnchorFunctionMatcher(),
|
|
1069
1070
|
new PositionAnchorMatcher(),
|
|
1070
1071
|
new FlexGridGridLanesMatcher(),
|
|
1072
|
+
new PositionAreaMatcher(),
|
|
1071
1073
|
new PositionTryMatcher(),
|
|
1072
1074
|
new LengthMatcher(),
|
|
1073
1075
|
new MathFunctionMatcher(),
|
|
@@ -1508,3 +1508,32 @@ export class EnvFunctionMatcher extends EnvFunctionMatcherBase {
|
|
|
1508
1508
|
return new EnvFunctionMatch(matching.ast.text(node), node, varName, value ?? fallbackValue ?? null, Boolean(value));
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
1511
|
+
|
|
1512
|
+
export class PositionAreaMatch implements Match {
|
|
1513
|
+
constructor(readonly text: string, readonly node: CodeMirror.SyntaxNode) {
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
const PositionAreaMatcherBase: MatcherClass<PositionAreaMatch> = matcherBase(PositionAreaMatch);
|
|
1518
|
+
// clang-format off
|
|
1519
|
+
export class PositionAreaMatcher extends PositionAreaMatcherBase {
|
|
1520
|
+
// clang-format on
|
|
1521
|
+
override accepts(propertyName: string): boolean {
|
|
1522
|
+
return propertyName === 'position-area' || propertyName === 'inset-area';
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
override matches(node: CodeMirror.SyntaxNode, matching: BottomUpTreeMatching): PositionAreaMatch|null {
|
|
1526
|
+
if (node.name !== 'Declaration') {
|
|
1527
|
+
return null;
|
|
1528
|
+
}
|
|
1529
|
+
const valueNodes = ASTUtils.siblings(ASTUtils.declValue(node));
|
|
1530
|
+
if (valueNodes.length === 0) {
|
|
1531
|
+
return null;
|
|
1532
|
+
}
|
|
1533
|
+
const valueText = matching.getComputedTextRange(valueNodes[0], valueNodes[valueNodes.length - 1]);
|
|
1534
|
+
if (CSSMetadata.isCSSWideKeyword(valueText)) {
|
|
1535
|
+
return null;
|
|
1536
|
+
}
|
|
1537
|
+
return new PositionAreaMatch(valueText, node);
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
@@ -1076,17 +1076,19 @@ export class DOMNode extends Common.ObjectWrapper.ObjectWrapper<DOMNodeEventType
|
|
|
1076
1076
|
});
|
|
1077
1077
|
}
|
|
1078
1078
|
|
|
1079
|
-
duplicate():
|
|
1079
|
+
async duplicate(): Promise<{error: string | null, node: DOMNode|null}> {
|
|
1080
1080
|
if (this.isInShadowTree()) {
|
|
1081
|
-
return;
|
|
1081
|
+
return {error: 'Cannot duplicate node in shadow tree', node: null};
|
|
1082
1082
|
}
|
|
1083
1083
|
|
|
1084
1084
|
const parentNode = this.parentNode ? this.parentNode : this;
|
|
1085
1085
|
if (parentNode.nodeName() === '#document') {
|
|
1086
|
-
return;
|
|
1086
|
+
return {error: 'Parent node is document', node: null};
|
|
1087
1087
|
}
|
|
1088
1088
|
|
|
1089
|
-
|
|
1089
|
+
return await new Promise(resolve => {
|
|
1090
|
+
this.copyTo(parentNode, this.nextSibling, (error, node) => resolve({error, node}));
|
|
1091
|
+
});
|
|
1090
1092
|
}
|
|
1091
1093
|
|
|
1092
1094
|
/**
|
|
@@ -2564,7 +2566,8 @@ export class DOMNodeSnapshot extends DOMNode {
|
|
|
2564
2566
|
_callback?: ((arg0: string|null, arg1: DOMNode|null) => void)|undefined): void {
|
|
2565
2567
|
}
|
|
2566
2568
|
|
|
2567
|
-
override duplicate():
|
|
2569
|
+
override duplicate(): Promise<{error: string | null, node: DOMNode|null}> {
|
|
2570
|
+
return Promise.resolve({error: null, node: null});
|
|
2568
2571
|
}
|
|
2569
2572
|
|
|
2570
2573
|
override canInspectNode(): boolean {
|
|
@@ -2616,7 +2619,8 @@ export class DOMDocumentSnapshot extends DOMDocument {
|
|
|
2616
2619
|
_callback?: ((arg0: string|null, arg1: DOMNode|null) => void)|undefined): void {
|
|
2617
2620
|
}
|
|
2618
2621
|
|
|
2619
|
-
override duplicate():
|
|
2622
|
+
override duplicate(): Promise<{error: string | null, node: DOMNode|null}> {
|
|
2623
|
+
return Promise.resolve({error: null, node: null});
|
|
2620
2624
|
}
|
|
2621
2625
|
|
|
2622
2626
|
override canInspectNode(): boolean {
|
|
@@ -100,7 +100,8 @@ inspectorBackend.registerEnum("Audits.StyleSheetLoadingIssueReason", {LateImport
|
|
|
100
100
|
inspectorBackend.registerEnum("Audits.PropertyRuleIssueReason", {InvalidSyntax: "InvalidSyntax", InvalidInitialValue: "InvalidInitialValue", InvalidInherits: "InvalidInherits", InvalidName: "InvalidName"});
|
|
101
101
|
inspectorBackend.registerEnum("Audits.UserReidentificationIssueType", {BlockedFrameNavigation: "BlockedFrameNavigation", BlockedSubresource: "BlockedSubresource", NoisedCanvasReadback: "NoisedCanvasReadback"});
|
|
102
102
|
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"});
|
|
103
|
-
inspectorBackend.registerEnum("Audits.
|
|
103
|
+
inspectorBackend.registerEnum("Audits.WebInstallIssueReason", {ManifestParsingOrNetworkError: "ManifestParsingOrNetworkError", StartUrlInvalid: "StartUrlInvalid", ManifestMissingNameOrShortName: "ManifestMissingNameOrShortName", ManifestMissingId: "ManifestMissingId", NoManifest: "NoManifest"});
|
|
104
|
+
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", WebInstallIssue: "WebInstallIssue"});
|
|
104
105
|
inspectorBackend.registerEvent("Audits.issueAdded", ["issue"]);
|
|
105
106
|
inspectorBackend.registerEnum("Audits.GetEncodedResponseRequestEncoding", {Webp: "webp", Jpeg: "jpeg", Png: "png"});
|
|
106
107
|
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.");
|
|
@@ -141,9 +142,10 @@ inspectorBackend.registerType("Audits.StylesheetLoadingIssueDetails", [{"name":
|
|
|
141
142
|
inspectorBackend.registerType("Audits.PropertyRuleIssueDetails", [{"name": "sourceCodeLocation", "type": "object", "optional": false, "description": "Source code position of the property rule.", "typeRef": "Audits.SourceCodeLocation"}, {"name": "propertyRuleIssueReason", "type": "string", "optional": false, "description": "Reason why the property rule was discarded.", "typeRef": "Audits.PropertyRuleIssueReason"}, {"name": "propertyValue", "type": "string", "optional": true, "description": "The value of the property rule property that failed to parse", "typeRef": null}]);
|
|
142
143
|
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
144
|
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}]);
|
|
145
|
+
inspectorBackend.registerType("Audits.WebInstallIssueDetails", [{"name": "manifestUrl", "type": "string", "optional": true, "description": "", "typeRef": null}, {"name": "reason", "type": "string", "optional": false, "description": "", "typeRef": "Audits.WebInstallIssueReason"}]);
|
|
144
146
|
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
147
|
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"}]);
|
|
146
|
-
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"}]);
|
|
148
|
+
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"}, {"name": "webInstallIssueDetails", "type": "object", "optional": true, "description": "", "typeRef": "Audits.WebInstallIssueDetails"}]);
|
|
147
149
|
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"}]);
|
|
148
150
|
|
|
149
151
|
// Autofill.
|
|
@@ -440,6 +442,7 @@ inspectorBackend.registerCommand("DOM.getContainerForNode", [{"name": "nodeId",
|
|
|
440
442
|
inspectorBackend.registerCommand("DOM.getQueryingDescendantsForContainer", [{"name": "nodeId", "type": "number", "optional": false, "description": "Id of the container node to find querying descendants from.", "typeRef": "DOM.NodeId"}], ["nodeIds"], "Returns the descendants of a container query container that have container queries against this container.");
|
|
441
443
|
inspectorBackend.registerCommand("DOM.getAnchorElement", [{"name": "nodeId", "type": "number", "optional": false, "description": "Id of the positioned element from which to find the anchor.", "typeRef": "DOM.NodeId"}, {"name": "anchorSpecifier", "type": "string", "optional": true, "description": "An optional anchor specifier, as defined in https://www.w3.org/TR/css-anchor-position-1/#anchor-specifier. If not provided, it will return the implicit anchor element for the given positioned element.", "typeRef": null}], ["nodeId"], "Returns the target anchor element of the given anchor query according to https://www.w3.org/TR/css-anchor-position-1/#target.");
|
|
442
444
|
inspectorBackend.registerCommand("DOM.forceShowPopover", [{"name": "nodeId", "type": "number", "optional": false, "description": "Id of the popover HTMLElement", "typeRef": "DOM.NodeId"}, {"name": "enable", "type": "boolean", "optional": false, "description": "If true, opens the popover and keeps it open. If false, closes the popover if it was previously force-opened.", "typeRef": null}, {"name": "invokerNodeId", "type": "number", "optional": true, "description": "Optional ID of the element invoking this popover, used to establish the implicit anchor. If not provided, it will fall back to the first invoker in the document, preferring elements with a popovertarget attribute over those with a commandfor attribute. Note that if there are multiple invokers, this is just an estimate.", "typeRef": "DOM.BackendNodeId"}], ["nodeIds"], "When enabling, this API force-opens the popover identified by nodeId and keeps it open until disabled.");
|
|
445
|
+
inspectorBackend.registerCommand("DOM.getImplicitAnchorCandidates", [{"name": "nodeId", "type": "number", "optional": false, "description": "Id of the popover HTMLElement.", "typeRef": "DOM.NodeId"}], ["backendNodeIds"], "Returns candidate nodes that are configured as triggers for the given popover.");
|
|
443
446
|
inspectorBackend.registerCommand("DOM.forceShowInterest", [{"name": "nodeId", "type": "number", "optional": false, "description": "Id of the interest invoker HTMLElement.", "typeRef": "DOM.NodeId"}, {"name": "enable", "type": "boolean", "optional": false, "description": "If true, opens and holds interest. If false, releases forced interest.", "typeRef": null}], [], "When enabling, this API forces an element to gain interest in its target, keeping interest active until disabled.");
|
|
444
447
|
inspectorBackend.registerType("DOM.BackendNode", [{"name": "nodeType", "type": "number", "optional": false, "description": "`Node`'s nodeType.", "typeRef": null}, {"name": "nodeName", "type": "string", "optional": false, "description": "`Node`'s nodeName.", "typeRef": null}, {"name": "backendNodeId", "type": "number", "optional": false, "description": "", "typeRef": "DOM.BackendNodeId"}]);
|
|
445
448
|
inspectorBackend.registerType("DOM.Node", [{"name": "nodeId", "type": "number", "optional": false, "description": "Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend will only push node with given `id` once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client.", "typeRef": "DOM.NodeId"}, {"name": "parentId", "type": "number", "optional": true, "description": "The id of the parent node if any.", "typeRef": "DOM.NodeId"}, {"name": "backendNodeId", "type": "number", "optional": false, "description": "The BackendNodeId for this node.", "typeRef": "DOM.BackendNodeId"}, {"name": "nodeType", "type": "number", "optional": false, "description": "`Node`'s nodeType.", "typeRef": null}, {"name": "nodeName", "type": "string", "optional": false, "description": "`Node`'s nodeName.", "typeRef": null}, {"name": "localName", "type": "string", "optional": false, "description": "`Node`'s localName.", "typeRef": null}, {"name": "nodeValue", "type": "string", "optional": false, "description": "`Node`'s nodeValue.", "typeRef": null}, {"name": "childNodeCount", "type": "number", "optional": true, "description": "Child count for `Container` nodes.", "typeRef": null}, {"name": "children", "type": "array", "optional": true, "description": "Child nodes of this node when requested with children.", "typeRef": "DOM.Node"}, {"name": "attributes", "type": "array", "optional": true, "description": "Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`.", "typeRef": "string"}, {"name": "documentURL", "type": "string", "optional": true, "description": "Document URL that `Document` or `FrameOwner` node points to.", "typeRef": null}, {"name": "baseURL", "type": "string", "optional": true, "description": "Base URL that `Document` or `FrameOwner` node uses for URL completion.", "typeRef": null}, {"name": "publicId", "type": "string", "optional": true, "description": "`DocumentType`'s publicId.", "typeRef": null}, {"name": "systemId", "type": "string", "optional": true, "description": "`DocumentType`'s systemId.", "typeRef": null}, {"name": "internalSubset", "type": "string", "optional": true, "description": "`DocumentType`'s internalSubset.", "typeRef": null}, {"name": "xmlVersion", "type": "string", "optional": true, "description": "`Document`'s XML version in case of XML documents.", "typeRef": null}, {"name": "name", "type": "string", "optional": true, "description": "`Attr`'s name.", "typeRef": null}, {"name": "value", "type": "string", "optional": true, "description": "`Attr`'s value.", "typeRef": null}, {"name": "pseudoType", "type": "string", "optional": true, "description": "Pseudo element type for this node.", "typeRef": "DOM.PseudoType"}, {"name": "pseudoIdentifier", "type": "string", "optional": true, "description": "Pseudo element identifier for this node. Only present if there is a valid pseudoType.", "typeRef": null}, {"name": "shadowRootType", "type": "string", "optional": true, "description": "Shadow root type.", "typeRef": "DOM.ShadowRootType"}, {"name": "frameId", "type": "string", "optional": true, "description": "Frame ID for frame owner elements.", "typeRef": "Page.FrameId"}, {"name": "contentDocument", "type": "object", "optional": true, "description": "Content document for frame owner elements.", "typeRef": "DOM.Node"}, {"name": "shadowRoots", "type": "array", "optional": true, "description": "Shadow root list for given element host.", "typeRef": "DOM.Node"}, {"name": "templateContent", "type": "object", "optional": true, "description": "Content document fragment for template elements.", "typeRef": "DOM.Node"}, {"name": "pseudoElements", "type": "array", "optional": true, "description": "Pseudo elements associated with this node.", "typeRef": "DOM.Node"}, {"name": "importedDocument", "type": "object", "optional": true, "description": "Deprecated, as the HTML Imports API has been removed (crbug.com/937746). This property used to return the imported document for the HTMLImport links. The property is always undefined now.", "typeRef": "DOM.Node"}, {"name": "distributedNodes", "type": "array", "optional": true, "description": "Distributed nodes for given insertion point.", "typeRef": "DOM.BackendNode"}, {"name": "isSVG", "type": "boolean", "optional": true, "description": "Whether the node is SVG.", "typeRef": null}, {"name": "compatibilityMode", "type": "string", "optional": true, "description": "", "typeRef": "DOM.CompatibilityMode"}, {"name": "assignedSlot", "type": "object", "optional": true, "description": "", "typeRef": "DOM.BackendNode"}, {"name": "isScrollable", "type": "boolean", "optional": true, "description": "", "typeRef": null}, {"name": "affectedByStartingStyles", "type": "boolean", "optional": true, "description": "", "typeRef": null}, {"name": "adoptedStyleSheets", "type": "array", "optional": true, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "adProvenance", "type": "object", "optional": true, "description": "", "typeRef": "Network.AdProvenance"}]);
|
|
@@ -1278,7 +1281,7 @@ inspectorBackend.registerCommand("ServiceWorker.stopWorker", [{"name": "versionI
|
|
|
1278
1281
|
inspectorBackend.registerCommand("ServiceWorker.unregister", [{"name": "scopeURL", "type": "string", "optional": false, "description": "", "typeRef": null}], [], "");
|
|
1279
1282
|
inspectorBackend.registerCommand("ServiceWorker.updateRegistration", [{"name": "scopeURL", "type": "string", "optional": false, "description": "", "typeRef": null}], [], "");
|
|
1280
1283
|
inspectorBackend.registerType("ServiceWorker.ServiceWorkerRegistration", [{"name": "registrationId", "type": "string", "optional": false, "description": "", "typeRef": "ServiceWorker.RegistrationID"}, {"name": "scopeURL", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "isDeleted", "type": "boolean", "optional": false, "description": "", "typeRef": null}]);
|
|
1281
|
-
inspectorBackend.registerType("ServiceWorker.ServiceWorkerRouterCondition", [{"name": "urlPattern", "type": "string", "optional": true, "description": "Plain text, or JSON serialization of URLPatternInit or URLPattern", "typeRef": null}, {"name": "requestMethod", "type": "string", "optional": true, "description": "", "typeRef": null}, {"name": "requestMode", "type": "string", "optional": true, "description": "", "typeRef": null}, {"name": "requestDestination", "type": "string", "optional": true, "description": "", "typeRef": null}, {"name": "runningStatus", "type": "string", "optional": true, "description": "", "typeRef": "ServiceWorker.ServiceWorkerVersionRunningStatus"}]);
|
|
1284
|
+
inspectorBackend.registerType("ServiceWorker.ServiceWorkerRouterCondition", [{"name": "urlPattern", "type": "string", "optional": true, "description": "Plain text, or JSON serialization of URLPatternInit or URLPattern", "typeRef": null}, {"name": "requestMethod", "type": "string", "optional": true, "description": "", "typeRef": null}, {"name": "requestMode", "type": "string", "optional": true, "description": "", "typeRef": null}, {"name": "requestDestination", "type": "string", "optional": true, "description": "", "typeRef": null}, {"name": "runningStatus", "type": "string", "optional": true, "description": "", "typeRef": "ServiceWorker.ServiceWorkerVersionRunningStatus"}, {"name": "or", "type": "array", "optional": true, "description": "", "typeRef": "ServiceWorker.ServiceWorkerRouterCondition"}, {"name": "not", "type": "object", "optional": true, "description": "", "typeRef": "ServiceWorker.ServiceWorkerRouterCondition"}]);
|
|
1282
1285
|
inspectorBackend.registerType("ServiceWorker.ServiceWorkerRouterSourceDict", [{"name": "cacheName", "type": "string", "optional": false, "description": "", "typeRef": null}]);
|
|
1283
1286
|
inspectorBackend.registerType("ServiceWorker.ServiceWorkerRouterSource", [{"name": "type", "type": "string", "optional": false, "description": "", "typeRef": "ServiceWorker.ServiceWorkerRouterSourceType"}, {"name": "sourceDict", "type": "object", "optional": true, "description": "Non-empty iff `type` equals \\\"sourceDict\\\".", "typeRef": "ServiceWorker.ServiceWorkerRouterSourceDict"}]);
|
|
1284
1287
|
inspectorBackend.registerType("ServiceWorker.ServiceWorkerRouterRule", [{"name": "condition", "type": "object", "optional": false, "description": "", "typeRef": "ServiceWorker.ServiceWorkerRouterCondition"}, {"name": "source", "type": "object", "optional": false, "description": "", "typeRef": "ServiceWorker.ServiceWorkerRouterSource"}, {"name": "id", "type": "number", "optional": false, "description": "Rule ID assigned by the browser. Unique within each ServiceWorkerVersion.", "typeRef": null}]);
|
|
@@ -2297,6 +2297,13 @@ export namespace ProtocolMapping {
|
|
|
2297
2297
|
paramsType: [Protocol.DOM.ForceShowPopoverRequest];
|
|
2298
2298
|
returnType: Protocol.DOM.ForceShowPopoverResponse;
|
|
2299
2299
|
};
|
|
2300
|
+
/**
|
|
2301
|
+
* Returns candidate nodes that are configured as triggers for the given popover.
|
|
2302
|
+
*/
|
|
2303
|
+
'DOM.getImplicitAnchorCandidates': {
|
|
2304
|
+
paramsType: [Protocol.DOM.GetImplicitAnchorCandidatesRequest];
|
|
2305
|
+
returnType: Protocol.DOM.GetImplicitAnchorCandidatesResponse;
|
|
2306
|
+
};
|
|
2300
2307
|
/**
|
|
2301
2308
|
* When enabling, this API forces an element to gain interest in its target,
|
|
2302
2309
|
* keeping interest active until disabled.
|
|
@@ -1395,6 +1395,11 @@ declare namespace ProtocolProxyApi {
|
|
|
1395
1395
|
*/
|
|
1396
1396
|
invoke_forceShowPopover(params: Protocol.DOM.ForceShowPopoverRequest): Promise<Protocol.DOM.ForceShowPopoverResponse>;
|
|
1397
1397
|
|
|
1398
|
+
/**
|
|
1399
|
+
* Returns candidate nodes that are configured as triggers for the given popover.
|
|
1400
|
+
*/
|
|
1401
|
+
invoke_getImplicitAnchorCandidates(params: Protocol.DOM.GetImplicitAnchorCandidatesRequest): Promise<Protocol.DOM.GetImplicitAnchorCandidatesResponse>;
|
|
1402
|
+
|
|
1398
1403
|
/**
|
|
1399
1404
|
* When enabling, this API forces an element to gain interest in its target,
|
|
1400
1405
|
* keeping interest active until disabled.
|
|
@@ -1684,6 +1684,23 @@ export namespace Audits {
|
|
|
1684
1684
|
disableReason?: string;
|
|
1685
1685
|
}
|
|
1686
1686
|
|
|
1687
|
+
export const enum WebInstallIssueReason {
|
|
1688
|
+
ManifestParsingOrNetworkError = 'ManifestParsingOrNetworkError',
|
|
1689
|
+
StartUrlInvalid = 'StartUrlInvalid',
|
|
1690
|
+
ManifestMissingNameOrShortName = 'ManifestMissingNameOrShortName',
|
|
1691
|
+
ManifestMissingId = 'ManifestMissingId',
|
|
1692
|
+
NoManifest = 'NoManifest',
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
/**
|
|
1696
|
+
* This issue reports a failure involving a web app manifest used by a Web
|
|
1697
|
+
* Install operation.
|
|
1698
|
+
*/
|
|
1699
|
+
export interface WebInstallIssueDetails {
|
|
1700
|
+
manifestUrl?: string;
|
|
1701
|
+
reason: WebInstallIssueReason;
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1687
1704
|
/**
|
|
1688
1705
|
* The issue warns about blocked calls to privacy sensitive APIs via the
|
|
1689
1706
|
* Selective Permissions Intervention.
|
|
@@ -1757,6 +1774,7 @@ export namespace Audits {
|
|
|
1757
1774
|
SelectivePermissionsInterventionIssue = 'SelectivePermissionsInterventionIssue',
|
|
1758
1775
|
EmailVerificationRequestIssue = 'EmailVerificationRequestIssue',
|
|
1759
1776
|
LazyLoadImageIssue = 'LazyLoadImageIssue',
|
|
1777
|
+
WebInstallIssue = 'WebInstallIssue',
|
|
1760
1778
|
}
|
|
1761
1779
|
|
|
1762
1780
|
/**
|
|
@@ -1798,6 +1816,7 @@ export namespace Audits {
|
|
|
1798
1816
|
selectivePermissionsInterventionIssueDetails?: SelectivePermissionsInterventionIssueDetails;
|
|
1799
1817
|
emailVerificationRequestIssueDetails?: EmailVerificationRequestIssueDetails;
|
|
1800
1818
|
lazyLoadImageIssueDetails?: LazyLoadImageIssueDetails;
|
|
1819
|
+
webInstallIssueDetails?: WebInstallIssueDetails;
|
|
1801
1820
|
}
|
|
1802
1821
|
|
|
1803
1822
|
/**
|
|
@@ -5946,6 +5965,20 @@ export namespace DOM {
|
|
|
5946
5965
|
nodeIds: NodeId[];
|
|
5947
5966
|
}
|
|
5948
5967
|
|
|
5968
|
+
export interface GetImplicitAnchorCandidatesRequest {
|
|
5969
|
+
/**
|
|
5970
|
+
* Id of the popover HTMLElement.
|
|
5971
|
+
*/
|
|
5972
|
+
nodeId: NodeId;
|
|
5973
|
+
}
|
|
5974
|
+
|
|
5975
|
+
export interface GetImplicitAnchorCandidatesResponse extends ProtocolResponseWithError {
|
|
5976
|
+
/**
|
|
5977
|
+
* Candidate elements that can invoke this popover.
|
|
5978
|
+
*/
|
|
5979
|
+
backendNodeIds: BackendNodeId[];
|
|
5980
|
+
}
|
|
5981
|
+
|
|
5949
5982
|
export interface ForceShowInterestRequest {
|
|
5950
5983
|
/**
|
|
5951
5984
|
* Id of the interest invoker HTMLElement.
|
|
@@ -17763,9 +17796,7 @@ export namespace ServiceWorker {
|
|
|
17763
17796
|
|
|
17764
17797
|
/**
|
|
17765
17798
|
* Mostly corresponds to `RouterCondition` in ServiceWorker spec
|
|
17766
|
-
* (https://www.w3.org/TR/service-workers/#dictdef-routercondition)
|
|
17767
|
-
* currently lacks support for the nested conditions ("or" and "not").
|
|
17768
|
-
* TODO(crbug.com/540469610): Support recursive conditions.
|
|
17799
|
+
* (https://www.w3.org/TR/service-workers/#dictdef-routercondition)
|
|
17769
17800
|
*/
|
|
17770
17801
|
export interface ServiceWorkerRouterCondition {
|
|
17771
17802
|
/**
|
|
@@ -17776,6 +17807,8 @@ export namespace ServiceWorker {
|
|
|
17776
17807
|
requestMode?: string;
|
|
17777
17808
|
requestDestination?: string;
|
|
17778
17809
|
runningStatus?: ServiceWorkerVersionRunningStatus;
|
|
17810
|
+
or?: ServiceWorkerRouterCondition[];
|
|
17811
|
+
not?: ServiceWorkerRouterCondition;
|
|
17779
17812
|
}
|
|
17780
17813
|
|
|
17781
17814
|
export const enum ServiceWorkerRouterSourceType {
|
|
@@ -26,7 +26,7 @@ import {debugLog} from './debug.js';
|
|
|
26
26
|
import {ExtensionScope} from './ExtensionScope.js';
|
|
27
27
|
import type {Skill, SkillName} from './skills/Skill.js';
|
|
28
28
|
import {SKILLS} from './skills/SkillRegistry.js';
|
|
29
|
-
import type
|
|
29
|
+
import {type AllToolsCapabilities, isOriginAllowedByLock, type Tool, type ToolArgs} from './tools/Tool.js';
|
|
30
30
|
import {ToolRegistry} from './tools/ToolRegistry.js';
|
|
31
31
|
|
|
32
32
|
const SKILL_DISPLAY_NAMES: Record<SkillName, string> = {
|
|
@@ -101,8 +101,13 @@ export class AiAgent2 extends AiAgent<unknown> {
|
|
|
101
101
|
this.disableServerSideLogging();
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
const target = this
|
|
105
|
-
const
|
|
104
|
+
const target = this.targetManager.primaryPageTarget();
|
|
105
|
+
const establishedOrigin = this.#getConversationOrigin();
|
|
106
|
+
// Avoid fetching or caching top-level documents across origins or when
|
|
107
|
+
// the origin lock is blocked/uninitialized.
|
|
108
|
+
// Note: b/559642568 tracks making the tri-state ('blocked' | 'uninitialized' | 'locked') explicit.
|
|
109
|
+
const isTargetAllowed = target && isOriginAllowedByLock(establishedOrigin, target.inspectedSecurityOrigin());
|
|
110
|
+
const domModel = isTargetAllowed ? target.model(SDK.DOMModel.DOMModel) : null;
|
|
106
111
|
// Ensure the DOM document is requested and cached in DOMModel so that
|
|
107
112
|
// subsequent synchronous lookups via domModel.existingDocument() (e.g.,
|
|
108
113
|
// in #getDocumentBodyNode()) resolve the document and body immediately.
|
|
@@ -291,7 +296,7 @@ User query: ${enhancedQuery}`;
|
|
|
291
296
|
createExtensionScope: this.#createExtensionScope.bind(this),
|
|
292
297
|
execJs: this.#execJs,
|
|
293
298
|
getExecutionContextNode: () => this.#getExecutionContextNode(),
|
|
294
|
-
getTarget: () => this.#
|
|
299
|
+
getTarget: () => this.#getTarget(),
|
|
295
300
|
getEstablishedOrigin: () => this.#getConversationOrigin(),
|
|
296
301
|
getLighthouseReport: () => (this.context instanceof AccessibilityContext ? this.context.getItem() : null),
|
|
297
302
|
runLighthouse: async overrides => await (this.#lighthouseRecording?.(overrides) ?? null),
|
|
@@ -307,42 +312,37 @@ User query: ${enhancedQuery}`;
|
|
|
307
312
|
}
|
|
308
313
|
|
|
309
314
|
/**
|
|
310
|
-
* Returns the primary page target
|
|
311
|
-
*
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
* (e.g. an iframe origin), returns null to prevent cross-origin target access.
|
|
315
|
+
* Returns the primary page target unless origin access is explicitly blocked
|
|
316
|
+
* (e.g. following cross-origin navigation).
|
|
317
|
+
* Tools use this target to resolve node IDs and fetch frame resources, and
|
|
318
|
+
* perform their own origin checks on the resolved entities.
|
|
315
319
|
*/
|
|
316
|
-
#
|
|
320
|
+
#getTarget(): SDK.Target.Target|null {
|
|
317
321
|
const allowed = this.#allowedOrigin?.();
|
|
318
322
|
if (allowed && 'blocked' in allowed) {
|
|
319
323
|
return null;
|
|
320
324
|
}
|
|
321
|
-
|
|
322
|
-
if (!target) {
|
|
323
|
-
return null;
|
|
324
|
-
}
|
|
325
|
-
const establishedOrigin = this.#getConversationOrigin();
|
|
326
|
-
if (!establishedOrigin) {
|
|
327
|
-
return target;
|
|
328
|
-
}
|
|
329
|
-
const targetOrigin = target.inspectedSecurityOrigin();
|
|
330
|
-
if (targetOrigin.isSameOriginWith(establishedOrigin)) {
|
|
331
|
-
return target;
|
|
332
|
-
}
|
|
333
|
-
return null;
|
|
325
|
+
return this.targetManager.primaryPageTarget();
|
|
334
326
|
}
|
|
335
327
|
|
|
336
328
|
/**
|
|
337
329
|
* For non-DOM contexts (e.g., Lighthouse accessibility reports or storage items),
|
|
338
330
|
* there is no user-selected DOM node. We fall back to the document body as the
|
|
339
331
|
* default execution context node so scripts have a valid `$0` target.
|
|
340
|
-
*
|
|
341
|
-
*
|
|
332
|
+
* Fails closed and returns null if the conversation origin is not established or
|
|
333
|
+
* does not match the primary page document's security origin.
|
|
342
334
|
*/
|
|
343
335
|
#getDocumentBodyNode(): SDK.DOMModel.DOMNode|null {
|
|
344
|
-
const
|
|
345
|
-
|
|
336
|
+
const target = this.#getTarget();
|
|
337
|
+
const document = target?.model(SDK.DOMModel.DOMModel)?.existingDocument();
|
|
338
|
+
if (!document) {
|
|
339
|
+
return null;
|
|
340
|
+
}
|
|
341
|
+
const establishedOrigin = this.#getConversationOrigin();
|
|
342
|
+
if (!isOriginAllowedByLock(establishedOrigin, document.securityOrigin())) {
|
|
343
|
+
return null;
|
|
344
|
+
}
|
|
345
|
+
return document.body ?? null;
|
|
346
346
|
}
|
|
347
347
|
|
|
348
348
|
#getConversationOrigin(): SDK.SecurityOrigin.SecurityOrigin|undefined {
|
|
@@ -191,7 +191,11 @@ export interface ConversationSuggestion {
|
|
|
191
191
|
/** At least one. */
|
|
192
192
|
export type ConversationSuggestions = [ConversationSuggestion, ...ConversationSuggestion[]];
|
|
193
193
|
|
|
194
|
+
export type ConversationContextJslog = 'ai-context-dom-node'|'ai-context-network-request'|'ai-context-file'|
|
|
195
|
+
'ai-context-performance-trace'|'ai-context-accessibility'|'ai-context-storage';
|
|
196
|
+
|
|
194
197
|
export abstract class ConversationContext<T> {
|
|
198
|
+
abstract readonly jslogContext: ConversationContextJslog;
|
|
195
199
|
abstract getItem(): T;
|
|
196
200
|
abstract getTitle(): string;
|
|
197
201
|
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
import {LighthouseFormatter} from '../data_formatters/LighthouseFormatter.js';
|
|
13
13
|
|
|
14
14
|
export class AccessibilityContext extends ConversationContext<LHModel.ReporterTypes.ReportJSON> {
|
|
15
|
+
override readonly jslogContext = 'ai-context-accessibility' as const;
|
|
15
16
|
readonly #lh: LHModel.ReporterTypes.ReportJSON;
|
|
16
17
|
#cachedPayload: string|null = null;
|
|
17
18
|
|
|
@@ -20,6 +20,7 @@ const UIStringsNotTranslate = {
|
|
|
20
20
|
const lockedString = i18n.i18n.lockedString;
|
|
21
21
|
|
|
22
22
|
export class DOMNodeContext extends ConversationContext<SDK.DOMModel.DOMNode> {
|
|
23
|
+
override readonly jslogContext = 'ai-context-dom-node' as const;
|
|
23
24
|
#node: SDK.DOMModel.DOMNode;
|
|
24
25
|
#opaqueOrigin?: SDK.SecurityOrigin.SecurityOrigin;
|
|
25
26
|
|
|
@@ -9,6 +9,7 @@ import {type ContextDetail, ConversationContext} from '../agents/AiAgent.js';
|
|
|
9
9
|
import {FileFormatter} from '../data_formatters/FileFormatter.js';
|
|
10
10
|
|
|
11
11
|
export class FileContext extends ConversationContext<Workspace.UISourceCode.UISourceCode> {
|
|
12
|
+
override readonly jslogContext = 'ai-context-file' as const;
|
|
12
13
|
#file: Workspace.UISourceCode.UISourceCode;
|
|
13
14
|
#debuggerWorkspaceBinding?: Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding;
|
|
14
15
|
|
|
@@ -82,6 +82,7 @@ export class PerformanceTraceContext extends ConversationContext<AgentFocus> {
|
|
|
82
82
|
);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
override readonly jslogContext = 'ai-context-performance-trace' as const;
|
|
85
86
|
readonly #focus: AgentFocus;
|
|
86
87
|
readonly #targetManager: SDK.TargetManager.TargetManager;
|
|
87
88
|
readonly #freshRecordingTracker: Tracing.FreshRecording.Tracker;
|
|
@@ -24,6 +24,7 @@ const UIStringsNotTranslate = {
|
|
|
24
24
|
const lockedString = i18n.i18n.lockedString;
|
|
25
25
|
|
|
26
26
|
export class RequestContext extends ConversationContext<SDK.NetworkRequest.NetworkRequest> {
|
|
27
|
+
override readonly jslogContext = 'ai-context-network-request' as const;
|
|
27
28
|
#request: SDK.NetworkRequest.NetworkRequest;
|
|
28
29
|
#calculator: NetworkTimeCalculator.NetworkTransferTimeCalculator;
|
|
29
30
|
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
import {CookieItem, DOMStorageItem, type StorageItem} from '../StorageItem.js';
|
|
11
11
|
|
|
12
12
|
export class StorageContext extends ConversationContext<StorageItem> {
|
|
13
|
+
override readonly jslogContext = 'ai-context-storage' as const;
|
|
13
14
|
#item: StorageItem;
|
|
14
15
|
|
|
15
16
|
constructor(item: StorageItem) {
|
|
@@ -6,7 +6,6 @@ import * as Host from '../../../core/host/host.js';
|
|
|
6
6
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
7
7
|
import * as SDK from '../../../core/sdk/sdk.js';
|
|
8
8
|
import type * as Protocol from '../../../generated/protocol.js';
|
|
9
|
-
import {DOMNodeContext} from '../contexts/DOMNodeContext.js';
|
|
10
9
|
|
|
11
10
|
import {
|
|
12
11
|
type BaseToolCapability,
|
|
@@ -82,9 +81,6 @@ export class GetElementAccessibilityDetailsTool implements
|
|
|
82
81
|
context: BaseToolCapability&TargetCapability&OriginLockCapability,
|
|
83
82
|
): Promise<DataHandlerResult<string>> {
|
|
84
83
|
const establishedOrigin = context.getEstablishedOrigin();
|
|
85
|
-
if (!establishedOrigin || establishedOrigin.isOpaque()) {
|
|
86
|
-
return {error: 'Error: Origin lock is not established.'};
|
|
87
|
-
}
|
|
88
84
|
|
|
89
85
|
const target = context.getTarget();
|
|
90
86
|
if (!target) {
|
|
@@ -100,13 +96,14 @@ export class GetElementAccessibilityDetailsTool implements
|
|
|
100
96
|
return {error: 'Error: Could not resolve element by ID.'};
|
|
101
97
|
}
|
|
102
98
|
|
|
103
|
-
const nodeContext = new DOMNodeContext(resolved);
|
|
104
99
|
// Security check: Ensure the element matches the active conversation's origin lock.
|
|
105
|
-
|
|
106
|
-
|
|
100
|
+
// Because getTarget() returns the primary page target to support resolving elements
|
|
101
|
+
// across frames, origin validation must be enforced directly on the resolved node.
|
|
102
|
+
if (!isOriginAllowedByLock(establishedOrigin, resolved.securityOrigin())) {
|
|
103
|
+
return {error: 'Error: Node does not belong to the current origin.'};
|
|
107
104
|
}
|
|
108
105
|
|
|
109
|
-
const axModel = target.model(SDK.AccessibilityModel.AccessibilityModel);
|
|
106
|
+
const axModel = resolved.domModel().target().model(SDK.AccessibilityModel.AccessibilityModel);
|
|
110
107
|
if (!axModel) {
|
|
111
108
|
return {error: 'Error: Accessibility model not found.'};
|
|
112
109
|
}
|
|
@@ -79,13 +79,6 @@ export class GetNetworkRequestDetailsTool implements
|
|
|
79
79
|
// We only allow inspecting requests matching the conversation's established origin.
|
|
80
80
|
const establishedOrigin = context.getEstablishedOrigin();
|
|
81
81
|
|
|
82
|
-
// Opaque origins are never allowed to be used as context.
|
|
83
|
-
if (!establishedOrigin || establishedOrigin.isOpaque()) {
|
|
84
|
-
return {
|
|
85
|
-
error: 'Opaque origin not allowed',
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
|
|
89
82
|
// eslint-disable-next-line @devtools/no-instance-of-migrated-singletons
|
|
90
83
|
const networkLog = this.#networkLog ?? Logs.NetworkLog.NetworkLog.instance();
|
|
91
84
|
const request = networkLog.requests().find(req => {
|
|
@@ -97,7 +90,10 @@ export class GetNetworkRequestDetailsTool implements
|
|
|
97
90
|
return isOriginAllowedByLock(establishedOrigin, req.initiatorSecurityOrigin());
|
|
98
91
|
});
|
|
99
92
|
|
|
100
|
-
|
|
93
|
+
// If establishedOrigin is undefined or opaque, isOriginAllowedByLock() fails closed,
|
|
94
|
+
// so find() will never return a request. We check establishedOrigin here as a defensive
|
|
95
|
+
// guard and to narrow the type for NetworkRequestFormatter below.
|
|
96
|
+
if (!establishedOrigin || !request) {
|
|
101
97
|
return {
|
|
102
98
|
error: 'No request found',
|
|
103
99
|
};
|