chrome-devtools-frontend 1.0.1539728 → 1.0.1539972
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/common/Debouncer.ts +2 -2
- package/front_end/core/common/Gzip.ts +1 -1
- package/front_end/core/common/Throttler.ts +3 -3
- package/front_end/core/host/GdpClient.ts +4 -0
- package/front_end/core/protocol_client/DevToolsCDPConnection.ts +181 -0
- package/front_end/core/protocol_client/InspectorBackend.ts +36 -203
- package/front_end/core/protocol_client/protocol_client.ts +2 -2
- package/front_end/core/sdk/DebuggerModel.ts +3 -16
- package/front_end/core/sdk/RemoteObject.ts +4 -0
- package/front_end/core/sdk/Target.ts +3 -6
- package/front_end/core/sdk/TargetManager.ts +1 -2
- package/front_end/entrypoints/lighthouse_worker/LighthouseWorkerService.ts +1 -3
- package/front_end/entrypoints/node_app/app/NodeMain.ts +3 -2
- package/front_end/generated/Deprecation.ts +8 -0
- package/front_end/generated/InspectorBackendCommands.ts +2 -2
- package/front_end/generated/SupportedCSSProperties.js +50 -9
- package/front_end/generated/protocol.ts +2 -2
- package/front_end/models/ai_assistance/EvaluateAction.ts +88 -5
- package/front_end/models/ai_assistance/injected.ts +15 -2
- package/front_end/models/live-metrics/web-vitals-injected/README.md +1 -1
- package/front_end/models/trace/Styles.ts +1 -1
- package/front_end/panels/ai_assistance/PatchWidget.ts +22 -12
- package/front_end/panels/ai_assistance/components/ChatView.ts +1 -1
- package/front_end/panels/common/AiCodeCompletionDisclaimer.ts +4 -4
- package/front_end/panels/common/AiCodeCompletionSummaryToolbar.ts +2 -2
- package/front_end/panels/elements/PropertiesWidget.ts +3 -2
- package/front_end/panels/event_listeners/EventListenersView.ts +9 -5
- package/front_end/panels/explain/components/ConsoleInsight.ts +2 -2
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +3 -3
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorController.ts +2 -2
- package/front_end/panels/network/RequestPayloadView.ts +2 -1
- package/front_end/panels/network/RequestTimingView.ts +4 -2
- package/front_end/panels/network/components/RequestHeadersView.ts +24 -17
- package/front_end/panels/protocol_monitor/JSONEditor.ts +2 -2
- package/front_end/panels/recorder/RecorderController.ts +6 -7
- package/front_end/panels/recorder/models/RecordingPlayer.ts +3 -3
- package/front_end/panels/settings/components/SyncSection.ts +1 -1
- package/front_end/panels/sources/BreakpointsView.ts +3 -3
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +4 -3
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +3 -2
- package/front_end/panels/timeline/components/FieldSettingsDialog.ts +9 -5
- package/front_end/panels/timeline/components/LiveMetricsView.ts +20 -9
- package/front_end/panels/timeline/components/MetricCard.ts +4 -2
- package/front_end/services/puppeteer/PuppeteerConnection.ts +2 -1
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +21 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExtensionTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExtensionTransport.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExtensionTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +6 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js +29 -27
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +61 -26
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +21 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExtensionTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExtensionTransport.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExtensionTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +6 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js +30 -28
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/package.json +1 -1
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +6 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +4 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +32 -0
- package/front_end/third_party/puppeteer/package/src/cdp/ExtensionTransport.ts +5 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +8 -0
- package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +36 -43
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/components/dialogs/ButtonDialog.ts +15 -5
- package/front_end/ui/components/expandable_list/ExpandableList.ts +1 -1
- package/front_end/ui/components/helpers/helpers.ts +0 -2
- package/front_end/ui/components/menus/Menu.ts +5 -3
- package/front_end/ui/components/survey_link/SurveyLink.docs.ts +22 -0
- package/front_end/ui/components/tree_outline/TreeOutline.ts +1 -2
- package/front_end/ui/legacy/SelectMenu.docs.ts +14 -0
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +3 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +453 -347
- package/package.json +1 -1
- package/front_end/core/protocol_client/NodeURL.ts +0 -40
- package/front_end/ui/components/docs/combo_box/basic.html +0 -20
- package/front_end/ui/components/docs/combo_box/basic.ts +0 -49
- package/front_end/ui/components/docs/legacy_color_invert/basic.html +0 -77
- package/front_end/ui/components/docs/legacy_color_invert/basic.ts +0 -98
- package/front_end/ui/components/docs/survey_link/basic.html +0 -20
- package/front_end/ui/components/docs/survey_link/basic.ts +0 -28
- package/front_end/ui/components/docs/tree_outline/basic.html +0 -33
- package/front_end/ui/components/docs/tree_outline/basic.ts +0 -38
- package/front_end/ui/components/docs/tree_outline/custom-renderers.html +0 -32
- package/front_end/ui/components/docs/tree_outline/custom-renderers.ts +0 -61
- package/front_end/ui/components/docs/tree_outline/lazy-children.html +0 -32
- package/front_end/ui/components/docs/tree_outline/lazy-children.ts +0 -91
- package/front_end/ui/components/docs/tree_outline/sample-data.ts +0 -67
- package/front_end/ui/components/helpers/directives.ts +0 -38
|
@@ -209,8 +209,7 @@ export class TargetManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
|
209
209
|
|
|
210
210
|
createTarget(
|
|
211
211
|
id: Protocol.Target.TargetID|'main', name: string, type: TargetType, parentTarget: Target|null,
|
|
212
|
-
sessionId?: string, waitForDebuggerInPage?: boolean,
|
|
213
|
-
connection?: ProtocolClient.ConnectionTransport.ConnectionTransport,
|
|
212
|
+
sessionId?: string, waitForDebuggerInPage?: boolean, connection?: ProtocolClient.CDPConnection.CDPConnection,
|
|
214
213
|
targetInfo?: Protocol.Target.TargetInfo): Target {
|
|
215
214
|
const target = new Target(
|
|
216
215
|
this, id, name, type, parentTarget, sessionId || '', this.#isSuspended, connection || null, targetInfo);
|
|
@@ -84,9 +84,7 @@ async function invokeLH(action: string, args: any): Promise<unknown> {
|
|
|
84
84
|
|
|
85
85
|
const {rootTargetId, mainSessionId} = args;
|
|
86
86
|
cdpTransport = new WorkerConnectionTransport();
|
|
87
|
-
|
|
88
|
-
// a connection handling part and a session handling part.
|
|
89
|
-
const connection = new ProtocolClient.InspectorBackend.SessionRouter(cdpTransport);
|
|
87
|
+
const connection = new ProtocolClient.DevToolsCDPConnection.DevToolsCDPConnection(cdpTransport);
|
|
90
88
|
puppeteerHandle =
|
|
91
89
|
await PuppeteerService.PuppeteerConnection.PuppeteerConnectionHelper.connectPuppeteerToConnectionViaTab({
|
|
92
90
|
connection,
|
|
@@ -6,7 +6,7 @@ import type * as Common from '../../../core/common/common.js';
|
|
|
6
6
|
import * as Host from '../../../core/host/host.js';
|
|
7
7
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
8
8
|
import type * as Platform from '../../../core/platform/platform.js';
|
|
9
|
-
import
|
|
9
|
+
import * as ProtocolClient from '../../../core/protocol_client/protocol_client.js';
|
|
10
10
|
import * as SDK from '../../../core/sdk/sdk.js';
|
|
11
11
|
import type * as ProtocolProxyApi from '../../../generated/protocol-proxy-api.js';
|
|
12
12
|
import type * as Protocol from '../../../generated/protocol.js';
|
|
@@ -119,7 +119,8 @@ export class NodeChildTargetManager extends SDK.SDKModel.SDKModel<void> implemen
|
|
|
119
119
|
const connection = new NodeConnection(this.#targetAgent, sessionId);
|
|
120
120
|
this.#childConnections.set(sessionId, connection);
|
|
121
121
|
target = this.#targetManager.createTarget(
|
|
122
|
-
targetInfo.targetId, name, SDK.Target.Type.NODE, null, undefined, undefined,
|
|
122
|
+
targetInfo.targetId, name, SDK.Target.Type.NODE, null, undefined, undefined,
|
|
123
|
+
new ProtocolClient.DevToolsCDPConnection.DevToolsCDPConnection(connection));
|
|
123
124
|
}
|
|
124
125
|
this.#childTargets.set(sessionId, target);
|
|
125
126
|
void target.runtimeAgent().invoke_runIfWaitingForDebugger();
|
|
@@ -230,6 +230,10 @@ export const UIStrings = {
|
|
|
230
230
|
* @description Warning displayed to developers. It is shown when the `XMLHttpRequest` API is used in a way that it slows down the page load of the next page. The `main thread` refers to an operating systems thread used to run most of the processing of HTML documents, so please use a consistent wording.
|
|
231
231
|
*/
|
|
232
232
|
XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload: "Synchronous `XMLHttpRequest` on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.",
|
|
233
|
+
/**
|
|
234
|
+
* @description Warning displayed to developers that they are using either the XSLTProcessor API, or XSLT processing instructions, both of which have been deprecated and are scheduled to be removed.
|
|
235
|
+
*/
|
|
236
|
+
XSLT: "XSLTProcessor and XSLT Processing Instructions have been deprecated by all browsers. These features will be removed from this browser soon.",
|
|
233
237
|
} as const;
|
|
234
238
|
|
|
235
239
|
export interface DeprecationDescriptor {
|
|
@@ -350,5 +354,9 @@ export const DEPRECATIONS_METADATA: Partial<Record<string, DeprecationDescriptor
|
|
|
350
354
|
},
|
|
351
355
|
"XHRJSONEncodingDetection": {
|
|
352
356
|
"milestone": 93
|
|
357
|
+
},
|
|
358
|
+
"XSLT": {
|
|
359
|
+
"chromeStatusFeature": 4709671889534976,
|
|
360
|
+
"milestone": 143
|
|
353
361
|
}
|
|
354
362
|
};
|
|
@@ -336,7 +336,7 @@ inspectorBackend.registerCommand("Cast.stopCasting", [{"name": "sinkName", "type
|
|
|
336
336
|
inspectorBackend.registerType("Cast.Sink", [{"name": "name", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "id", "type": "string", "optional": false, "description": "", "typeRef": null}, {"name": "session", "type": "string", "optional": true, "description": "Text describing the current session. Present only if there is an active session on the sink.", "typeRef": null}]);
|
|
337
337
|
|
|
338
338
|
// DOM.
|
|
339
|
-
inspectorBackend.registerEnum("DOM.PseudoType", {FirstLine: "first-line", FirstLetter: "first-letter", Checkmark: "checkmark", Before: "before", After: "after", PickerIcon: "picker-icon", InterestHint: "interest-hint", Marker: "marker", Backdrop: "backdrop", Column: "column", Selection: "selection", SearchText: "search-text", TargetText: "target-text", SpellingError: "spelling-error", GrammarError: "grammar-error", Highlight: "highlight", FirstLineInherited: "first-line-inherited", ScrollMarker: "scroll-marker", ScrollMarkerGroup: "scroll-marker-group", ScrollButton: "scroll-button", Scrollbar: "scrollbar", ScrollbarThumb: "scrollbar-thumb", ScrollbarButton: "scrollbar-button", ScrollbarTrack: "scrollbar-track", ScrollbarTrackPiece: "scrollbar-track-piece", ScrollbarCorner: "scrollbar-corner", Resizer: "resizer", InputListButton: "input-list-button", ViewTransition: "view-transition", ViewTransitionGroup: "view-transition-group", ViewTransitionImagePair: "view-transition-image-pair", ViewTransitionGroupChildren: "view-transition-group-children", ViewTransitionOld: "view-transition-old", ViewTransitionNew: "view-transition-new", Placeholder: "placeholder", FileSelectorButton: "file-selector-button", DetailsContent: "details-content", Picker: "picker", PermissionIcon: "permission-icon"});
|
|
339
|
+
inspectorBackend.registerEnum("DOM.PseudoType", {FirstLine: "first-line", FirstLetter: "first-letter", Checkmark: "checkmark", Before: "before", After: "after", PickerIcon: "picker-icon", InterestHint: "interest-hint", Marker: "marker", Backdrop: "backdrop", Column: "column", Selection: "selection", SearchText: "search-text", TargetText: "target-text", SpellingError: "spelling-error", GrammarError: "grammar-error", Highlight: "highlight", FirstLineInherited: "first-line-inherited", ScrollMarker: "scroll-marker", ScrollMarkerGroup: "scroll-marker-group", ScrollButton: "scroll-button", Scrollbar: "scrollbar", ScrollbarThumb: "scrollbar-thumb", ScrollbarButton: "scrollbar-button", ScrollbarTrack: "scrollbar-track", ScrollbarTrackPiece: "scrollbar-track-piece", ScrollbarCorner: "scrollbar-corner", Resizer: "resizer", InputListButton: "input-list-button", ViewTransition: "view-transition", ViewTransitionGroup: "view-transition-group", ViewTransitionImagePair: "view-transition-image-pair", ViewTransitionGroupChildren: "view-transition-group-children", ViewTransitionOld: "view-transition-old", ViewTransitionNew: "view-transition-new", Placeholder: "placeholder", FileSelectorButton: "file-selector-button", DetailsContent: "details-content", Picker: "picker", PermissionIcon: "permission-icon", OverscrollAreaParent: "overscroll-area-parent", OverscrollClientArea: "overscroll-client-area"});
|
|
340
340
|
inspectorBackend.registerEnum("DOM.ShadowRootType", {UserAgent: "user-agent", Open: "open", Closed: "closed"});
|
|
341
341
|
inspectorBackend.registerEnum("DOM.CompatibilityMode", {QuirksMode: "QuirksMode", LimitedQuirksMode: "LimitedQuirksMode", NoQuirksMode: "NoQuirksMode"});
|
|
342
342
|
inspectorBackend.registerEnum("DOM.PhysicalAxes", {Horizontal: "Horizontal", Vertical: "Vertical", Both: "Both"});
|
|
@@ -777,7 +777,7 @@ inspectorBackend.registerEnum("Network.InterceptionStage", {Request: "Request",
|
|
|
777
777
|
inspectorBackend.registerEnum("Network.SignedExchangeErrorField", {SignatureSig: "signatureSig", SignatureIntegrity: "signatureIntegrity", SignatureCertUrl: "signatureCertUrl", SignatureCertSha256: "signatureCertSha256", SignatureValidityUrl: "signatureValidityUrl", SignatureTimestamps: "signatureTimestamps"});
|
|
778
778
|
inspectorBackend.registerEnum("Network.ContentEncoding", {Deflate: "deflate", Gzip: "gzip", Br: "br", Zstd: "zstd"});
|
|
779
779
|
inspectorBackend.registerEnum("Network.DirectSocketDnsQueryType", {Ipv4: "ipv4", Ipv6: "ipv6"});
|
|
780
|
-
inspectorBackend.registerEnum("Network.PrivateNetworkRequestPolicy", {Allow: "Allow", BlockFromInsecureToMorePrivate: "BlockFromInsecureToMorePrivate", WarnFromInsecureToMorePrivate: "WarnFromInsecureToMorePrivate",
|
|
780
|
+
inspectorBackend.registerEnum("Network.PrivateNetworkRequestPolicy", {Allow: "Allow", BlockFromInsecureToMorePrivate: "BlockFromInsecureToMorePrivate", WarnFromInsecureToMorePrivate: "WarnFromInsecureToMorePrivate", PermissionBlock: "PermissionBlock", PermissionWarn: "PermissionWarn"});
|
|
781
781
|
inspectorBackend.registerEnum("Network.IPAddressSpace", {Loopback: "Loopback", Local: "Local", Public: "Public", Unknown: "Unknown"});
|
|
782
782
|
inspectorBackend.registerEnum("Network.CrossOriginOpenerPolicyValue", {SameOrigin: "SameOrigin", SameOriginAllowPopups: "SameOriginAllowPopups", RestrictProperties: "RestrictProperties", UnsafeNone: "UnsafeNone", SameOriginPlusCoep: "SameOriginPlusCoep", RestrictPropertiesPlusCoep: "RestrictPropertiesPlusCoep", NoopenerAllowPopups: "NoopenerAllowPopups"});
|
|
783
783
|
inspectorBackend.registerEnum("Network.CrossOriginEmbedderPolicyValue", {None: "None", Credentialless: "Credentialless", RequireCorp: "RequireCorp"});
|
|
@@ -419,7 +419,10 @@ export const generatedProperties = [
|
|
|
419
419
|
"column-height",
|
|
420
420
|
"column-rule-break",
|
|
421
421
|
"column-rule-color",
|
|
422
|
-
"column-rule-outset",
|
|
422
|
+
"column-rule-edge-end-outset",
|
|
423
|
+
"column-rule-edge-start-outset",
|
|
424
|
+
"column-rule-interior-end-outset",
|
|
425
|
+
"column-rule-interior-start-outset",
|
|
423
426
|
"column-rule-style",
|
|
424
427
|
"column-rule-visibility-items",
|
|
425
428
|
"column-rule-width",
|
|
@@ -639,7 +642,10 @@ export const generatedProperties = [
|
|
|
639
642
|
"row-gap",
|
|
640
643
|
"row-rule-break",
|
|
641
644
|
"row-rule-color",
|
|
642
|
-
"row-rule-outset",
|
|
645
|
+
"row-rule-edge-end-outset",
|
|
646
|
+
"row-rule-edge-start-outset",
|
|
647
|
+
"row-rule-interior-end-outset",
|
|
648
|
+
"row-rule-interior-start-outset",
|
|
643
649
|
"row-rule-style",
|
|
644
650
|
"row-rule-visibility-items",
|
|
645
651
|
"row-rule-width",
|
|
@@ -1723,6 +1729,27 @@ export const generatedProperties = [
|
|
|
1723
1729
|
},
|
|
1724
1730
|
{
|
|
1725
1731
|
"inherited": false,
|
|
1732
|
+
"name": "column-rule-edge-end-outset"
|
|
1733
|
+
},
|
|
1734
|
+
{
|
|
1735
|
+
"inherited": false,
|
|
1736
|
+
"name": "column-rule-edge-start-outset"
|
|
1737
|
+
},
|
|
1738
|
+
{
|
|
1739
|
+
"inherited": false,
|
|
1740
|
+
"name": "column-rule-interior-end-outset"
|
|
1741
|
+
},
|
|
1742
|
+
{
|
|
1743
|
+
"inherited": false,
|
|
1744
|
+
"name": "column-rule-interior-start-outset"
|
|
1745
|
+
},
|
|
1746
|
+
{
|
|
1747
|
+
"longhands": [
|
|
1748
|
+
"column-rule-edge-start-outset",
|
|
1749
|
+
"column-rule-edge-end-outset",
|
|
1750
|
+
"column-rule-interior-start-outset",
|
|
1751
|
+
"column-rule-interior-end-outset"
|
|
1752
|
+
],
|
|
1726
1753
|
"name": "column-rule-outset"
|
|
1727
1754
|
},
|
|
1728
1755
|
{
|
|
@@ -3711,6 +3738,27 @@ export const generatedProperties = [
|
|
|
3711
3738
|
},
|
|
3712
3739
|
{
|
|
3713
3740
|
"inherited": false,
|
|
3741
|
+
"name": "row-rule-edge-end-outset"
|
|
3742
|
+
},
|
|
3743
|
+
{
|
|
3744
|
+
"inherited": false,
|
|
3745
|
+
"name": "row-rule-edge-start-outset"
|
|
3746
|
+
},
|
|
3747
|
+
{
|
|
3748
|
+
"inherited": false,
|
|
3749
|
+
"name": "row-rule-interior-end-outset"
|
|
3750
|
+
},
|
|
3751
|
+
{
|
|
3752
|
+
"inherited": false,
|
|
3753
|
+
"name": "row-rule-interior-start-outset"
|
|
3754
|
+
},
|
|
3755
|
+
{
|
|
3756
|
+
"longhands": [
|
|
3757
|
+
"row-rule-edge-start-outset",
|
|
3758
|
+
"row-rule-edge-end-outset",
|
|
3759
|
+
"row-rule-interior-start-outset",
|
|
3760
|
+
"row-rule-interior-end-outset"
|
|
3761
|
+
],
|
|
3714
3762
|
"name": "row-rule-outset"
|
|
3715
3763
|
},
|
|
3716
3764
|
{
|
|
@@ -3797,13 +3845,6 @@ export const generatedProperties = [
|
|
|
3797
3845
|
],
|
|
3798
3846
|
"name": "rule-color"
|
|
3799
3847
|
},
|
|
3800
|
-
{
|
|
3801
|
-
"longhands": [
|
|
3802
|
-
"row-rule-outset",
|
|
3803
|
-
"column-rule-outset"
|
|
3804
|
-
],
|
|
3805
|
-
"name": "rule-outset"
|
|
3806
|
-
},
|
|
3807
3848
|
{
|
|
3808
3849
|
"longhands": [
|
|
3809
3850
|
"column-rule-style",
|
|
@@ -4440,6 +4440,8 @@ export namespace DOM {
|
|
|
4440
4440
|
DetailsContent = 'details-content',
|
|
4441
4441
|
Picker = 'picker',
|
|
4442
4442
|
PermissionIcon = 'permission-icon',
|
|
4443
|
+
OverscrollAreaParent = 'overscroll-area-parent',
|
|
4444
|
+
OverscrollClientArea = 'overscroll-client-area',
|
|
4443
4445
|
}
|
|
4444
4446
|
|
|
4445
4447
|
/**
|
|
@@ -11124,8 +11126,6 @@ export namespace Network {
|
|
|
11124
11126
|
Allow = 'Allow',
|
|
11125
11127
|
BlockFromInsecureToMorePrivate = 'BlockFromInsecureToMorePrivate',
|
|
11126
11128
|
WarnFromInsecureToMorePrivate = 'WarnFromInsecureToMorePrivate',
|
|
11127
|
-
PreflightBlock = 'PreflightBlock',
|
|
11128
|
-
PreflightWarn = 'PreflightWarn',
|
|
11129
11129
|
PermissionBlock = 'PermissionBlock',
|
|
11130
11130
|
PermissionWarn = 'PermissionWarn',
|
|
11131
11131
|
}
|
|
@@ -5,16 +5,25 @@
|
|
|
5
5
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
6
6
|
import * as Protocol from '../../generated/protocol.js';
|
|
7
7
|
|
|
8
|
+
import {PAGE_EXPOSED_FUNCTIONS} from './injected.js';
|
|
9
|
+
|
|
8
10
|
export function formatError(message: string): string {
|
|
9
11
|
return `Error: ${message}`;
|
|
10
12
|
}
|
|
11
13
|
export class SideEffectError extends Error {}
|
|
12
14
|
|
|
15
|
+
export interface GetErrorStackOutput {
|
|
16
|
+
message: string;
|
|
17
|
+
stack?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* istanbul ignore next */
|
|
21
|
+
export function getErrorStackOnThePage(this: Error): GetErrorStackOutput {
|
|
22
|
+
return {stack: this.stack, message: this.message};
|
|
23
|
+
}
|
|
24
|
+
|
|
13
25
|
/* istanbul ignore next */
|
|
14
26
|
export function stringifyObjectOnThePage(this: unknown): string {
|
|
15
|
-
if (this instanceof Error) {
|
|
16
|
-
return `Error: ${this.message}`;
|
|
17
|
-
}
|
|
18
27
|
const seenBefore = new WeakMap();
|
|
19
28
|
return JSON.stringify(this, function replacer(this: unknown, key: string, value: unknown) {
|
|
20
29
|
if (typeof value === 'object' && value !== null) {
|
|
@@ -44,7 +53,8 @@ export function stringifyObjectOnThePage(this: unknown): string {
|
|
|
44
53
|
});
|
|
45
54
|
}
|
|
46
55
|
|
|
47
|
-
export async function stringifyRemoteObject(
|
|
56
|
+
export async function stringifyRemoteObject(
|
|
57
|
+
object: SDK.RemoteObject.RemoteObject, functionDeclaration: string): Promise<string> {
|
|
48
58
|
switch (object.type) {
|
|
49
59
|
case Protocol.Runtime.RemoteObjectType.String:
|
|
50
60
|
return `'${object.value}'`;
|
|
@@ -59,7 +69,17 @@ export async function stringifyRemoteObject(object: SDK.RemoteObject.RemoteObjec
|
|
|
59
69
|
case Protocol.Runtime.RemoteObjectType.Function:
|
|
60
70
|
return `${object.description}`;
|
|
61
71
|
case Protocol.Runtime.RemoteObjectType.Object: {
|
|
72
|
+
if (object.subtype === 'error') {
|
|
73
|
+
const res = await object.callFunctionJSON(getErrorStackOnThePage, []);
|
|
74
|
+
|
|
75
|
+
if (!res) {
|
|
76
|
+
throw new Error('Could not stringify the object' + object);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return EvaluateAction.stringifyError(res, functionDeclaration);
|
|
80
|
+
}
|
|
62
81
|
const res = await object.callFunction(stringifyObjectOnThePage);
|
|
82
|
+
|
|
63
83
|
if (!res.object || res.object.type !== Protocol.Runtime.RemoteObjectType.String) {
|
|
64
84
|
throw new Error('Could not stringify the object' + object);
|
|
65
85
|
}
|
|
@@ -110,9 +130,72 @@ export class EvaluateAction {
|
|
|
110
130
|
return formatError(exceptionDescription ?? 'JS exception');
|
|
111
131
|
}
|
|
112
132
|
|
|
113
|
-
return await stringifyRemoteObject(response.object);
|
|
133
|
+
return await stringifyRemoteObject(response.object, functionDeclaration);
|
|
114
134
|
} finally {
|
|
115
135
|
executionContext.runtimeModel.releaseEvaluationResult(response);
|
|
116
136
|
}
|
|
117
137
|
}
|
|
138
|
+
|
|
139
|
+
static getExecutedLineFromStack(stack: string, pageExposedFunctions: string[]): number|null {
|
|
140
|
+
const lines = stack.split('\n');
|
|
141
|
+
|
|
142
|
+
const stackLines = lines.map(curr => curr.trim()).filter(trimmedLine => {
|
|
143
|
+
return trimmedLine.startsWith('at');
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
const selectedStack = stackLines.find(stackLine => {
|
|
147
|
+
const splittedStackLine = stackLine.split(' ');
|
|
148
|
+
|
|
149
|
+
if (splittedStackLine.length < 2) {
|
|
150
|
+
return false;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const signature = splittedStackLine[1] === 'async' ?
|
|
154
|
+
splittedStackLine[2] : // if the stack line contains async the function name is the next element
|
|
155
|
+
splittedStackLine[1];
|
|
156
|
+
|
|
157
|
+
const lastDotIndex = signature.lastIndexOf('.');
|
|
158
|
+
const functionName = lastDotIndex !== -1 ? signature.substring(lastDotIndex + 1) : signature;
|
|
159
|
+
|
|
160
|
+
return !pageExposedFunctions.includes(functionName);
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
if (!selectedStack) {
|
|
164
|
+
return null;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
const frameLocationRegex = /:(\d+)(?::\d+)?\)?$/;
|
|
168
|
+
const match = selectedStack.match(frameLocationRegex);
|
|
169
|
+
|
|
170
|
+
if (!match?.[1]) {
|
|
171
|
+
return null;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
const lineNum = parseInt(match[1], 10);
|
|
175
|
+
if (isNaN(lineNum)) {
|
|
176
|
+
return null;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return lineNum - 1;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
static stringifyError(result: GetErrorStackOutput, functionDeclaration: string): string {
|
|
183
|
+
if (!result.stack) {
|
|
184
|
+
return `Error: ${result.message}`;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const lineNum = EvaluateAction.getExecutedLineFromStack(result.stack, PAGE_EXPOSED_FUNCTIONS);
|
|
188
|
+
if (!lineNum) {
|
|
189
|
+
return `Error: ${result.message}`;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
const functionLines = functionDeclaration.split('\n');
|
|
193
|
+
|
|
194
|
+
const errorLine = functionLines[lineNum];
|
|
195
|
+
if (!errorLine) {
|
|
196
|
+
return `Error: ${result.message}`;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
return `Error: executing the line "${errorLine.trim()}" failed with the following error:\n${result.message}`;
|
|
200
|
+
}
|
|
118
201
|
}
|
|
@@ -24,6 +24,7 @@ export interface FreestyleCallbackArgs {
|
|
|
24
24
|
className: `${typeof AI_ASSISTANCE_CSS_CLASS_NAME}-${number}`;
|
|
25
25
|
styles: Record<string, string>;
|
|
26
26
|
element: Node;
|
|
27
|
+
error: Error;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
interface FreestyleCallbackData {
|
|
@@ -31,6 +32,7 @@ interface FreestyleCallbackData {
|
|
|
31
32
|
element: Node;
|
|
32
33
|
resolve(value: string): void;
|
|
33
34
|
reject(err?: Error): void;
|
|
35
|
+
error: Error;
|
|
34
36
|
}
|
|
35
37
|
interface FreestylerBinding {
|
|
36
38
|
(args: FreestyleCallbackArgs): Promise<string>;
|
|
@@ -58,6 +60,7 @@ function freestylerBindingFunc(bindingName: string): void {
|
|
|
58
60
|
element: args.element,
|
|
59
61
|
resolve,
|
|
60
62
|
reject,
|
|
63
|
+
error: args.error,
|
|
61
64
|
});
|
|
62
65
|
// @ts-expect-error this is binding added though CDP
|
|
63
66
|
globalThis[bindingName](String(freestyler.id));
|
|
@@ -72,11 +75,16 @@ function freestylerBindingFunc(bindingName: string): void {
|
|
|
72
75
|
freestyler.getArgs = (callbackId: number) => {
|
|
73
76
|
return freestyler.callbacks.get(callbackId)?.args;
|
|
74
77
|
};
|
|
75
|
-
freestyler.respond = (callbackId: number, styleChangesOrError: string) => {
|
|
78
|
+
freestyler.respond = (callbackId: number, styleChangesOrError: string|Error) => {
|
|
76
79
|
if (typeof styleChangesOrError === 'string') {
|
|
77
80
|
freestyler.callbacks.get(callbackId)?.resolve(styleChangesOrError);
|
|
78
81
|
} else {
|
|
79
|
-
freestyler.callbacks.get(callbackId)
|
|
82
|
+
const callback = freestyler.callbacks.get(callbackId);
|
|
83
|
+
|
|
84
|
+
if (callback) {
|
|
85
|
+
callback.error.message = styleChangesOrError.message;
|
|
86
|
+
callback.reject(callback?.error);
|
|
87
|
+
}
|
|
80
88
|
}
|
|
81
89
|
|
|
82
90
|
freestyler.callbacks.delete(callbackId);
|
|
@@ -87,6 +95,8 @@ function freestylerBindingFunc(bindingName: string): void {
|
|
|
87
95
|
|
|
88
96
|
export const freestylerBinding = `(${String(freestylerBindingFunc)})('${FREESTYLER_BINDING_NAME}')`;
|
|
89
97
|
|
|
98
|
+
export const PAGE_EXPOSED_FUNCTIONS = ['setElementStyles'];
|
|
99
|
+
|
|
90
100
|
/**
|
|
91
101
|
* Please see fileoverview
|
|
92
102
|
*/
|
|
@@ -134,12 +144,15 @@ function setupSetElementStyles(prefix: typeof AI_ASSISTANCE_CSS_CLASS_NAME): voi
|
|
|
134
144
|
el.style[key] = '';
|
|
135
145
|
}
|
|
136
146
|
|
|
147
|
+
const bindingError = new Error();
|
|
148
|
+
|
|
137
149
|
const result = await global.freestyler({
|
|
138
150
|
method: 'setElementStyles',
|
|
139
151
|
selector,
|
|
140
152
|
className,
|
|
141
153
|
styles,
|
|
142
154
|
element: el,
|
|
155
|
+
error: bindingError,
|
|
143
156
|
});
|
|
144
157
|
|
|
145
158
|
const rootNode = el.getRootNode();
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
[`web-vitals`](https://github.com/GoogleChrome/web-vitals-extension) is a Google-maintained library that measures CWV metrics using their canonical definition. We use it to ensure we are using consistent implementations for measuring CWV across Google. It can also measure performance metrics of the current page *after* the they happen (See [`PerformanceObserver` buffered setting](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceObserver/observe#buffered)). See [go/cpq:rpp-metric-observations](http://go/cpq:rpp-metric-observations) for more information.
|
|
4
4
|
|
|
5
|
-
The web-vitals library needs to be run in the target page (although it can be used in an isolated execution context). We therefore need to create a JS binary that can be injected via `Page.evaluate`/`Page.addScriptToEvaluateOnNewDocument`. See `BUILD.gn` and `rollup.config.
|
|
5
|
+
The web-vitals library needs to be run in the target page (although it can be used in an isolated execution context). We therefore need to create a JS binary that can be injected via `Page.evaluate`/`Page.addScriptToEvaluateOnNewDocument`. See `BUILD.gn` and `rollup.config.mjs` for how we bundle the JS binary.
|
|
@@ -432,7 +432,7 @@ const UIStrings = {
|
|
|
432
432
|
/**
|
|
433
433
|
* @description Event category in the Performance panel for time spent to perform Garbage Collection for C++: https://chromium.googlesource.com/v8/v8/+/main/include/cppgc/README.md
|
|
434
434
|
*/
|
|
435
|
-
cppGc: '
|
|
435
|
+
cppGc: 'C++ GC',
|
|
436
436
|
/**
|
|
437
437
|
* @description Event category in the Performance panel for time spent to perform encryption
|
|
438
438
|
*/
|
|
@@ -310,11 +310,13 @@ const DEFAULT_VIEW: View =
|
|
|
310
310
|
const iconName = input.projectType === SelectedProjectType.AUTOMATIC_DISCONNECTED ? 'folder-off' : input.projectType === SelectedProjectType.AUTOMATIC_CONNECTED ? 'folder-asterisk' : 'folder';
|
|
311
311
|
return html`
|
|
312
312
|
<div class="footer">
|
|
313
|
-
${
|
|
313
|
+
${
|
|
314
|
+
input.projectName ? html`
|
|
314
315
|
<div class="change-workspace" jslog=${VisualLogging.section('patch-widget.workspace')}>
|
|
315
316
|
<devtools-icon .name=${iconName}></devtools-icon>
|
|
316
317
|
<span class="folder-name" title=${input.projectPath}>${input.projectName}</span>
|
|
317
|
-
${
|
|
318
|
+
${
|
|
319
|
+
input.onChangeWorkspaceClick ? html`
|
|
318
320
|
<devtools-button
|
|
319
321
|
@click=${input.onChangeWorkspaceClick}
|
|
320
322
|
.jslogContext=${'change-workspace'}
|
|
@@ -323,18 +325,24 @@ const DEFAULT_VIEW: View =
|
|
|
323
325
|
.disabled=${input.patchSuggestionState === PatchSuggestionState.LOADING}
|
|
324
326
|
${Directives.ref(output.changeRef)}
|
|
325
327
|
>${lockedString(UIStringsNotTranslate.change)}</devtools-button>
|
|
326
|
-
` :
|
|
328
|
+
` :
|
|
329
|
+
nothing}
|
|
327
330
|
</div>
|
|
328
|
-
` :
|
|
331
|
+
` :
|
|
332
|
+
nothing}
|
|
329
333
|
<div class="apply-to-workspace-container" aria-live="polite">
|
|
330
|
-
${
|
|
331
|
-
|
|
334
|
+
${
|
|
335
|
+
input.patchSuggestionState === PatchSuggestionState.LOADING ?
|
|
336
|
+
html`
|
|
337
|
+
<div class="loading-text-container" jslog=${
|
|
338
|
+
VisualLogging.section('patch-widget.apply-to-workspace-loading')}>
|
|
332
339
|
<devtools-spinner></devtools-spinner>
|
|
333
340
|
<span>
|
|
334
341
|
${lockedString(UIStringsNotTranslate.applyingToWorkspace)}
|
|
335
342
|
</span>
|
|
336
343
|
</div>
|
|
337
|
-
` :
|
|
344
|
+
` :
|
|
345
|
+
html`
|
|
338
346
|
<devtools-button
|
|
339
347
|
@click=${input.onApplyToWorkspace}
|
|
340
348
|
.jslogContext=${'patch-widget.apply-to-workspace'}
|
|
@@ -342,12 +350,14 @@ const DEFAULT_VIEW: View =
|
|
|
342
350
|
${lockedString(UIStringsNotTranslate.applyToWorkspace)}
|
|
343
351
|
</devtools-button>
|
|
344
352
|
`}
|
|
345
|
-
${
|
|
353
|
+
${
|
|
354
|
+
input.patchSuggestionState === PatchSuggestionState.LOADING ? html`<devtools-button
|
|
346
355
|
@click=${input.onCancel}
|
|
347
356
|
.jslogContext=${'cancel'}
|
|
348
357
|
.variant=${Buttons.Button.Variant.OUTLINED}>
|
|
349
358
|
${lockedString(UIStringsNotTranslate.cancel)}
|
|
350
|
-
</devtools-button>` :
|
|
359
|
+
</devtools-button>` :
|
|
360
|
+
nothing}
|
|
351
361
|
<devtools-button
|
|
352
362
|
aria-details="info-tooltip"
|
|
353
363
|
.jslogContext=${'patch-widget.info-tooltip-trigger'}
|
|
@@ -356,7 +366,7 @@ const DEFAULT_VIEW: View =
|
|
|
356
366
|
></devtools-button>
|
|
357
367
|
<devtools-tooltip
|
|
358
368
|
id="info-tooltip"
|
|
359
|
-
variant
|
|
369
|
+
variant="rich"
|
|
360
370
|
>
|
|
361
371
|
<div class="info-tooltip-container">
|
|
362
372
|
${input.applyToWorkspaceTooltipText}
|
|
@@ -364,8 +374,8 @@ const DEFAULT_VIEW: View =
|
|
|
364
374
|
class="link tooltip-link"
|
|
365
375
|
role="link"
|
|
366
376
|
jslog=${VisualLogging.link('open-ai-settings').track({
|
|
367
|
-
|
|
368
|
-
|
|
377
|
+
click: true,
|
|
378
|
+
})}
|
|
369
379
|
@click=${input.onLearnMoreTooltipClick}
|
|
370
380
|
>${lockedString(UIStringsNotTranslate.learnMore)}</button>
|
|
371
381
|
</div>
|
|
@@ -1510,7 +1510,7 @@ function renderDisclamerTooltip(id: string, disclaimerText: string): Lit.Templat
|
|
|
1510
1510
|
return html`
|
|
1511
1511
|
<devtools-tooltip
|
|
1512
1512
|
id=${id}
|
|
1513
|
-
variant
|
|
1513
|
+
variant="rich"
|
|
1514
1514
|
>
|
|
1515
1515
|
<div class="info-tooltip-container">
|
|
1516
1516
|
${disclaimerText}
|
|
@@ -88,8 +88,8 @@ export const DEFAULT_SUMMARY_TOOLBAR_VIEW: View =
|
|
|
88
88
|
aria-describedby=${input.spinnerTooltipId}></devtools-spinner>
|
|
89
89
|
<devtools-tooltip
|
|
90
90
|
id=${input.spinnerTooltipId}
|
|
91
|
-
variant
|
|
92
|
-
jslogContext
|
|
91
|
+
variant="rich"
|
|
92
|
+
jslogContext="ai-code-completion-spinner-tooltip">
|
|
93
93
|
<div class="disclaimer-tooltip-container"><div class="tooltip-text">
|
|
94
94
|
${lockedString(UIStringsNotTranslate.tooltipTextForSpinner)}
|
|
95
95
|
</div></div></devtools-tooltip>
|
|
@@ -108,8 +108,8 @@ export const DEFAULT_SUMMARY_TOOLBAR_VIEW: View =
|
|
|
108
108
|
>${lockedString(UIStringsNotTranslate.relevantData)}</span>${lockedString(UIStringsNotTranslate.isSentToGoogle)}
|
|
109
109
|
<devtools-tooltip
|
|
110
110
|
id=${input.disclaimerTooltipId}
|
|
111
|
-
variant
|
|
112
|
-
jslogContext
|
|
111
|
+
variant="rich"
|
|
112
|
+
jslogContext="ai-code-completion-disclaimer"
|
|
113
113
|
${Directives.ref(el => {
|
|
114
114
|
if (el instanceof HTMLElement) {
|
|
115
115
|
output.hideTooltip = () => {
|
|
@@ -79,8 +79,8 @@ export const DEFAULT_SUMMARY_TOOLBAR_VIEW: View = (input, _output, target) => {
|
|
|
79
79
|
</span>
|
|
80
80
|
<devtools-tooltip
|
|
81
81
|
id=${input.citationsTooltipId}
|
|
82
|
-
variant
|
|
83
|
-
jslogContext
|
|
82
|
+
variant="rich"
|
|
83
|
+
jslogContext="ai-code-completion-citations"
|
|
84
84
|
><div class="citations-tooltip-container">
|
|
85
85
|
${Directives.repeat(input.citations, citation => html`<x-link
|
|
86
86
|
tabIndex="0"
|
|
@@ -158,7 +158,7 @@ export class PropertiesWidget extends UI.Widget.VBox {
|
|
|
158
158
|
this.#displayNoMatchingPropertyMessage = true;
|
|
159
159
|
for (const element of this.treeOutline.rootElement().children()) {
|
|
160
160
|
const {property} = element as ObjectUI.ObjectPropertiesSection.ObjectPropertyTreeElement;
|
|
161
|
-
const hidden = !property?.match({
|
|
161
|
+
const hidden = !property?.property.match({
|
|
162
162
|
includeNullOrUndefinedValues: this.showAllPropertiesSetting.get(),
|
|
163
163
|
regex: this.filterRegex,
|
|
164
164
|
});
|
|
@@ -195,7 +195,8 @@ export class PropertiesWidget extends UI.Widget.VBox {
|
|
|
195
195
|
properties = [];
|
|
196
196
|
}
|
|
197
197
|
ObjectUI.ObjectPropertiesSection.ObjectPropertyTreeElement.populateWithProperties(
|
|
198
|
-
treeElement, properties
|
|
198
|
+
treeElement, {properties: properties.map(p => new ObjectUI.ObjectPropertiesSection.ObjectTreeNode(p))},
|
|
199
|
+
true /* skipProto */, true /* skipGettersAndSetters */);
|
|
199
200
|
this.internalFilterProperties();
|
|
200
201
|
}
|
|
201
202
|
this.#view(
|
|
@@ -296,14 +296,18 @@ export class ObjectEventListenerBar extends UI.TreeOutline.TreeElement {
|
|
|
296
296
|
const properties = [];
|
|
297
297
|
const eventListener = this.#eventListener;
|
|
298
298
|
const runtimeModel = eventListener.domDebuggerModel().runtimeModel();
|
|
299
|
-
properties.push(
|
|
300
|
-
|
|
301
|
-
properties.push(
|
|
299
|
+
properties.push(new ObjectUI.ObjectPropertiesSection.ObjectTreeNode(
|
|
300
|
+
runtimeModel.createRemotePropertyFromPrimitiveValue('useCapture', eventListener.useCapture())));
|
|
301
|
+
properties.push(new ObjectUI.ObjectPropertiesSection.ObjectTreeNode(
|
|
302
|
+
runtimeModel.createRemotePropertyFromPrimitiveValue('passive', eventListener.passive())));
|
|
303
|
+
properties.push(new ObjectUI.ObjectPropertiesSection.ObjectTreeNode(
|
|
304
|
+
runtimeModel.createRemotePropertyFromPrimitiveValue('once', eventListener.once())));
|
|
302
305
|
if (typeof eventListener.handler() !== 'undefined') {
|
|
303
|
-
properties.push(new
|
|
306
|
+
properties.push(new ObjectUI.ObjectPropertiesSection.ObjectTreeNode(
|
|
307
|
+
new SDK.RemoteObject.RemoteObjectProperty('handler', eventListener.handler())));
|
|
304
308
|
}
|
|
305
309
|
ObjectUI.ObjectPropertiesSection.ObjectPropertyTreeElement.populateWithProperties(
|
|
306
|
-
this, properties,
|
|
310
|
+
this, {properties}, true, true, undefined);
|
|
307
311
|
}
|
|
308
312
|
|
|
309
313
|
private setTitle(object: SDK.RemoteObject.RemoteObject, linkifier: Components.Linkifier.Linkifier): void {
|
|
@@ -996,7 +996,7 @@ export class ConsoleInsight extends HTMLElement {
|
|
|
996
996
|
<div class="filler"></div>
|
|
997
997
|
<div class="rating">
|
|
998
998
|
<devtools-button
|
|
999
|
-
data-rating
|
|
999
|
+
data-rating="true"
|
|
1000
1000
|
.data=${
|
|
1001
1001
|
{
|
|
1002
1002
|
variant: Buttons.Button.Variant.ICON_TOGGLE,
|
|
@@ -1014,7 +1014,7 @@ export class ConsoleInsight extends HTMLElement {
|
|
|
1014
1014
|
@click=${this.#onRating}
|
|
1015
1015
|
></devtools-button>
|
|
1016
1016
|
<devtools-button
|
|
1017
|
-
data-rating
|
|
1017
|
+
data-rating="false"
|
|
1018
1018
|
.data=${
|
|
1019
1019
|
{
|
|
1020
1020
|
variant: Buttons.Button.Variant.ICON_TOGGLE,
|
|
@@ -95,14 +95,14 @@ export class ProtocolService implements ProtocolClient.CDPConnection.CDPConnecti
|
|
|
95
95
|
throw new Error('Could not find the child target manager class for the root target');
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
const
|
|
99
|
-
if (!
|
|
98
|
+
const connection = rootTarget.router()?.connection;
|
|
99
|
+
if (!connection) {
|
|
100
100
|
throw new Error('Expected root target to have a session router');
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
const rootTargetId = await rootChildTargetManager.getParentTargetId();
|
|
104
104
|
const {sessionId} = await rootTarget.targetAgent().invoke_attachToTarget({targetId: rootTargetId, flatten: true});
|
|
105
|
-
this.connection =
|
|
105
|
+
this.connection = connection;
|
|
106
106
|
this.connection.observe(this);
|
|
107
107
|
|
|
108
108
|
// Lighthouse implements its own dialog handler like this, however its lifecycle ends when
|
|
@@ -318,9 +318,9 @@ export class LinearMemoryInspectorController extends SDK.TargetManager.SDKModelO
|
|
|
318
318
|
appendApplicableItems(
|
|
319
319
|
_event: Event, contextMenu: UI.ContextMenu.ContextMenu,
|
|
320
320
|
target: ObjectUI.ObjectPropertiesSection.ObjectPropertyTreeElement): void {
|
|
321
|
-
if (target.property.
|
|
321
|
+
if (target.property.object?.isLinearMemoryInspectable()) {
|
|
322
322
|
const expression = target.path();
|
|
323
|
-
const object = target.property.
|
|
323
|
+
const object = target.property.object;
|
|
324
324
|
contextMenu.debugSection().appendItem(
|
|
325
325
|
i18nString(UIStrings.openInMemoryInspectorPanel),
|
|
326
326
|
this.reveal.bind(this, new SDK.RemoteObject.LinearMemoryInspectable(object, expression)),
|