chrome-devtools-frontend 1.0.1029149 → 1.0.1029692

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.
@@ -1451,6 +1451,9 @@
1451
1451
  "models/issues_manager/DeprecationIssue.ts | openWebDatabaseInsecureContext": {
1452
1452
  "message": "WebSQL in non-secure contexts is deprecated and will be removed in M107. Please use Web Storage or Indexed Database."
1453
1453
  },
1454
+ "models/issues_manager/DeprecationIssue.ts | persistentQuotaType": {
1455
+ "message": "StorageType.persistent is deprecated. Please use standardized navigator.storage instead."
1456
+ },
1454
1457
  "models/issues_manager/DeprecationIssue.ts | pictureSourceSrc": {
1455
1458
  "message": "<source src> with a <picture> parent is invalid and therefore ignored. Please use <source srcset> instead."
1456
1459
  },
@@ -8792,6 +8795,9 @@
8792
8795
  "panels/protocol_monitor/ProtocolMonitor.ts | sendRawCDPCommand": {
8793
8796
  "message": "Send a raw CDP command"
8794
8797
  },
8798
+ "panels/protocol_monitor/ProtocolMonitor.ts | sendRawCDPCommandExplanation": {
8799
+ "message": "Format: 'Domain.commandName' for a command without parameters, or '{\"command\":\"Domain.commandName\", \"parameters\": {...}}' as a JSON object for a command with parameters. 'cmd'/'method' and 'args'/'params'/'arguments' are also supported as alternative keys for the JSON object."
8800
+ },
8795
8801
  "panels/protocol_monitor/ProtocolMonitor.ts | session": {
8796
8802
  "message": "Session"
8797
8803
  },
@@ -1451,6 +1451,9 @@
1451
1451
  "models/issues_manager/DeprecationIssue.ts | openWebDatabaseInsecureContext": {
1452
1452
  "message": "Ŵéb̂ŚQ̂Ĺ îń n̂ón̂-śêćûŕê ćôńt̂éx̂t́ŝ íŝ d́êṕr̂éĉát̂éd̂ án̂d́ ŵíl̂ĺ b̂é r̂ém̂óv̂éd̂ ín̂ Ḿ107. P̂ĺêáŝé ûśê Ẃêb́ Ŝt́ôŕâǵê ór̂ Ín̂d́êx́êd́ D̂át̂áb̂áŝé."
1453
1453
  },
1454
+ "models/issues_manager/DeprecationIssue.ts | persistentQuotaType": {
1455
+ "message": "StorageType.persistent îś d̂ép̂ŕêćât́êd́. P̂ĺêáŝé ûśê śt̂án̂d́âŕd̂íẑéd̂ navigator.storage ín̂śt̂éâd́."
1456
+ },
1454
1457
  "models/issues_manager/DeprecationIssue.ts | pictureSourceSrc": {
1455
1458
  "message": "<source src> ŵít̂h́ â <picture> ṕâŕêńt̂ íŝ ín̂v́âĺîd́ âńd̂ t́ĥér̂éf̂ór̂é îǵn̂ór̂éd̂. Ṕl̂éâśê úŝé <source srcset> îńŝt́êád̂."
1456
1459
  },
@@ -8792,6 +8795,9 @@
8792
8795
  "panels/protocol_monitor/ProtocolMonitor.ts | sendRawCDPCommand": {
8793
8796
  "message": "Ŝén̂d́ â ŕâẃ CDP ĉóm̂ḿâńd̂"
8794
8797
  },
8798
+ "panels/protocol_monitor/ProtocolMonitor.ts | sendRawCDPCommandExplanation": {
8799
+ "message": "F̂ór̂ḿât́: 'Domain.commandName' f̂ór̂ á ĉóm̂ḿâńd̂ ẃît́ĥóût́ p̂ár̂ám̂ét̂ér̂ś, ôŕ '{\"command\":\"Domain.commandName\", \"parameters\": {...}}' âś â J́ŜÓN̂ ób̂j́êćt̂ f́ôŕ â ćôḿm̂án̂d́ ŵít̂h́ p̂ár̂ám̂ét̂ér̂ś. 'cmd'/'method' âńd̂ 'args'/'params'/'arguments' ár̂é âĺŝó ŝúp̂ṕôŕt̂éd̂ áŝ ál̂t́êŕn̂át̂ív̂é k̂éŷś f̂ór̂ t́ĥé JSON ôb́ĵéĉt́."
8800
+ },
8795
8801
  "panels/protocol_monitor/ProtocolMonitor.ts | session": {
8796
8802
  "message": "Ŝéŝśîón̂"
8797
8803
  },
@@ -63,7 +63,7 @@ inspectorBackend.registerEnum("Audits.HeavyAdReason", {NetworkTotalLimit: "Netwo
63
63
  inspectorBackend.registerEnum("Audits.ContentSecurityPolicyViolationType", {KInlineViolation: "kInlineViolation", KEvalViolation: "kEvalViolation", KURLViolation: "kURLViolation", KTrustedTypesSinkViolation: "kTrustedTypesSinkViolation", KTrustedTypesPolicyViolation: "kTrustedTypesPolicyViolation", KWasmEvalViolation: "kWasmEvalViolation"});
64
64
  inspectorBackend.registerEnum("Audits.SharedArrayBufferIssueType", {TransferIssue: "TransferIssue", CreationIssue: "CreationIssue"});
65
65
  inspectorBackend.registerEnum("Audits.TwaQualityEnforcementViolationType", {KHttpError: "kHttpError", KUnavailableOffline: "kUnavailableOffline", KDigitalAssetLinks: "kDigitalAssetLinks"});
66
- inspectorBackend.registerEnum("Audits.AttributionReportingIssueType", {PermissionPolicyDisabled: "PermissionPolicyDisabled", AttributionSourceUntrustworthyOrigin: "AttributionSourceUntrustworthyOrigin", AttributionUntrustworthyOrigin: "AttributionUntrustworthyOrigin", UntrustworthyReportingOrigin: "UntrustworthyReportingOrigin", InsecureContext: "InsecureContext", InvalidHeader: "InvalidHeader", InvalidRegisterTriggerHeader: "InvalidRegisterTriggerHeader"});
66
+ inspectorBackend.registerEnum("Audits.AttributionReportingIssueType", {PermissionPolicyDisabled: "PermissionPolicyDisabled", UntrustworthyReportingOrigin: "UntrustworthyReportingOrigin", InsecureContext: "InsecureContext", InvalidHeader: "InvalidHeader", InvalidRegisterTriggerHeader: "InvalidRegisterTriggerHeader", InvalidEligibleHeader: "InvalidEligibleHeader"});
67
67
  inspectorBackend.registerEnum("Audits.GenericIssueErrorType", {CrossOriginPortalPostMessageError: "CrossOriginPortalPostMessageError"});
68
68
  inspectorBackend.registerEnum("Audits.DeprecationIssueType", {AuthorizationCoveredByWildcard: "AuthorizationCoveredByWildcard", CanRequestURLHTTPContainingNewline: "CanRequestURLHTTPContainingNewline", ChromeLoadTimesConnectionInfo: "ChromeLoadTimesConnectionInfo", ChromeLoadTimesFirstPaintAfterLoadTime: "ChromeLoadTimesFirstPaintAfterLoadTime", ChromeLoadTimesWasAlternateProtocolAvailable: "ChromeLoadTimesWasAlternateProtocolAvailable", CookieWithTruncatingChar: "CookieWithTruncatingChar", CrossOriginAccessBasedOnDocumentDomain: "CrossOriginAccessBasedOnDocumentDomain", CrossOriginWindowAlert: "CrossOriginWindowAlert", CrossOriginWindowConfirm: "CrossOriginWindowConfirm", CSSSelectorInternalMediaControlsOverlayCastButton: "CSSSelectorInternalMediaControlsOverlayCastButton", DeprecationExample: "DeprecationExample", DocumentDomainSettingWithoutOriginAgentClusterHeader: "DocumentDomainSettingWithoutOriginAgentClusterHeader", EventPath: "EventPath", ExpectCTHeader: "ExpectCTHeader", GeolocationInsecureOrigin: "GeolocationInsecureOrigin", GeolocationInsecureOriginDeprecatedNotRemoved: "GeolocationInsecureOriginDeprecatedNotRemoved", GetUserMediaInsecureOrigin: "GetUserMediaInsecureOrigin", HostCandidateAttributeGetter: "HostCandidateAttributeGetter", IdentityInCanMakePaymentEvent: "IdentityInCanMakePaymentEvent", InsecurePrivateNetworkSubresourceRequest: "InsecurePrivateNetworkSubresourceRequest", LegacyConstraintGoogIPv6: "LegacyConstraintGoogIPv6", LocalCSSFileExtensionRejected: "LocalCSSFileExtensionRejected", MediaSourceAbortRemove: "MediaSourceAbortRemove", MediaSourceDurationTruncatingBuffered: "MediaSourceDurationTruncatingBuffered", NavigateEventRestoreScroll: "NavigateEventRestoreScroll", NavigateEventTransitionWhile: "NavigateEventTransitionWhile", NoSysexWebMIDIWithoutPermission: "NoSysexWebMIDIWithoutPermission", NotificationInsecureOrigin: "NotificationInsecureOrigin", NotificationPermissionRequestedIframe: "NotificationPermissionRequestedIframe", ObsoleteWebRtcCipherSuite: "ObsoleteWebRtcCipherSuite", OpenWebDatabaseInsecureContext: "OpenWebDatabaseInsecureContext", OverflowVisibleOnReplacedElement: "OverflowVisibleOnReplacedElement", PersistentQuotaType: "PersistentQuotaType", PictureSourceSrc: "PictureSourceSrc", PrefixedCancelAnimationFrame: "PrefixedCancelAnimationFrame", PrefixedRequestAnimationFrame: "PrefixedRequestAnimationFrame", PrefixedStorageInfo: "PrefixedStorageInfo", PrefixedVideoDisplayingFullscreen: "PrefixedVideoDisplayingFullscreen", PrefixedVideoEnterFullscreen: "PrefixedVideoEnterFullscreen", PrefixedVideoEnterFullScreen: "PrefixedVideoEnterFullScreen", PrefixedVideoExitFullscreen: "PrefixedVideoExitFullscreen", PrefixedVideoExitFullScreen: "PrefixedVideoExitFullScreen", PrefixedVideoSupportsFullscreen: "PrefixedVideoSupportsFullscreen", RangeExpand: "RangeExpand", RequestedSubresourceWithEmbeddedCredentials: "RequestedSubresourceWithEmbeddedCredentials", RTCConstraintEnableDtlsSrtpFalse: "RTCConstraintEnableDtlsSrtpFalse", RTCConstraintEnableDtlsSrtpTrue: "RTCConstraintEnableDtlsSrtpTrue", RTCPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics: "RTCPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics", RTCPeerConnectionSdpSemanticsPlanB: "RTCPeerConnectionSdpSemanticsPlanB", RtcpMuxPolicyNegotiate: "RtcpMuxPolicyNegotiate", SharedArrayBufferConstructedWithoutIsolation: "SharedArrayBufferConstructedWithoutIsolation", TextToSpeech_DisallowedByAutoplay: "TextToSpeech_DisallowedByAutoplay", V8SharedArrayBufferConstructedInExtensionWithoutIsolation: "V8SharedArrayBufferConstructedInExtensionWithoutIsolation", XHRJSONEncodingDetection: "XHRJSONEncodingDetection", XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload: "XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload", XRSupportsSession: "XRSupportsSession"});
69
69
  inspectorBackend.registerEnum("Audits.ClientHintIssueReason", {MetaTagAllowListInvalidOrigin: "MetaTagAllowListInvalidOrigin", MetaTagModifiedHTML: "MetaTagModifiedHTML"});
@@ -343,9 +343,9 @@ inspectorBackend.registerCommand("IndexedDB.deleteDatabase", [{"name": "security
343
343
  inspectorBackend.registerCommand("IndexedDB.deleteObjectStoreEntries", [{"name": "securityOrigin", "type": "string", "optional": true}, {"name": "storageKey", "type": "string", "optional": true}, {"name": "databaseName", "type": "string", "optional": false}, {"name": "objectStoreName", "type": "string", "optional": false}, {"name": "keyRange", "type": "object", "optional": false}], []);
344
344
  inspectorBackend.registerCommand("IndexedDB.disable", [], []);
345
345
  inspectorBackend.registerCommand("IndexedDB.enable", [], []);
346
- inspectorBackend.registerCommand("IndexedDB.requestData", [{"name": "securityOrigin", "type": "string", "optional": false}, {"name": "databaseName", "type": "string", "optional": false}, {"name": "objectStoreName", "type": "string", "optional": false}, {"name": "indexName", "type": "string", "optional": false}, {"name": "skipCount", "type": "number", "optional": false}, {"name": "pageSize", "type": "number", "optional": false}, {"name": "keyRange", "type": "object", "optional": true}], ["objectStoreDataEntries", "hasMore"]);
346
+ inspectorBackend.registerCommand("IndexedDB.requestData", [{"name": "securityOrigin", "type": "string", "optional": true}, {"name": "storageKey", "type": "string", "optional": true}, {"name": "databaseName", "type": "string", "optional": false}, {"name": "objectStoreName", "type": "string", "optional": false}, {"name": "indexName", "type": "string", "optional": false}, {"name": "skipCount", "type": "number", "optional": false}, {"name": "pageSize", "type": "number", "optional": false}, {"name": "keyRange", "type": "object", "optional": true}], ["objectStoreDataEntries", "hasMore"]);
347
347
  inspectorBackend.registerCommand("IndexedDB.getMetadata", [{"name": "securityOrigin", "type": "string", "optional": true}, {"name": "storageKey", "type": "string", "optional": true}, {"name": "databaseName", "type": "string", "optional": false}, {"name": "objectStoreName", "type": "string", "optional": false}], ["entriesCount", "keyGeneratorValue"]);
348
- inspectorBackend.registerCommand("IndexedDB.requestDatabase", [{"name": "securityOrigin", "type": "string", "optional": false}, {"name": "databaseName", "type": "string", "optional": false}], ["databaseWithObjectStores"]);
348
+ inspectorBackend.registerCommand("IndexedDB.requestDatabase", [{"name": "securityOrigin", "type": "string", "optional": true}, {"name": "storageKey", "type": "string", "optional": true}, {"name": "databaseName", "type": "string", "optional": false}], ["databaseWithObjectStores"]);
349
349
  inspectorBackend.registerCommand("IndexedDB.requestDatabaseNames", [{"name": "securityOrigin", "type": "string", "optional": false}], ["databaseNames"]);
350
350
 
351
351
  // Input.
@@ -1302,8 +1302,7 @@ export const generatedProperties = [
1302
1302
  "keywords": [
1303
1303
  "visible",
1304
1304
  "auto",
1305
- "hidden",
1306
- "hidden-matchable"
1305
+ "hidden"
1307
1306
  ],
1308
1307
  "name": "content-visibility"
1309
1308
  },
@@ -4082,8 +4081,7 @@ export const generatedPropertyValues = {
4082
4081
  "values": [
4083
4082
  "visible",
4084
4083
  "auto",
4085
- "hidden",
4086
- "hidden-matchable"
4084
+ "hidden"
4087
4085
  ]
4088
4086
  },
4089
4087
  "counter-increment": {
@@ -963,12 +963,11 @@ export namespace Audits {
963
963
 
964
964
  export const enum AttributionReportingIssueType {
965
965
  PermissionPolicyDisabled = 'PermissionPolicyDisabled',
966
- AttributionSourceUntrustworthyOrigin = 'AttributionSourceUntrustworthyOrigin',
967
- AttributionUntrustworthyOrigin = 'AttributionUntrustworthyOrigin',
968
966
  UntrustworthyReportingOrigin = 'UntrustworthyReportingOrigin',
969
967
  InsecureContext = 'InsecureContext',
970
968
  InvalidHeader = 'InvalidHeader',
971
969
  InvalidRegisterTriggerHeader = 'InvalidRegisterTriggerHeader',
970
+ InvalidEligibleHeader = 'InvalidEligibleHeader',
972
971
  }
973
972
 
974
973
  /**
@@ -977,10 +976,6 @@ export namespace Audits {
977
976
  */
978
977
  export interface AttributionReportingIssueDetails {
979
978
  violationType: AttributionReportingIssueType;
980
- /**
981
- * TODO(apaseltiner): Remove this once it is no longer referenced by the frontend.
982
- */
983
- frame?: AffectedFrame;
984
979
  request?: AffectedRequest;
985
980
  violatingNodeId?: DOM.BackendNodeId;
986
981
  invalidParameter?: string;
@@ -5919,9 +5914,14 @@ export namespace IndexedDB {
5919
5914
 
5920
5915
  export interface RequestDataRequest {
5921
5916
  /**
5917
+ * At least and at most one of securityOrigin, storageKey must be specified.
5922
5918
  * Security origin.
5923
5919
  */
5924
- securityOrigin: string;
5920
+ securityOrigin?: string;
5921
+ /**
5922
+ * Storage key.
5923
+ */
5924
+ storageKey?: string;
5925
5925
  /**
5926
5926
  * Database name.
5927
5927
  */
@@ -5994,9 +5994,14 @@ export namespace IndexedDB {
5994
5994
 
5995
5995
  export interface RequestDatabaseRequest {
5996
5996
  /**
5997
+ * At least and at most one of securityOrigin, storageKey must be specified.
5997
5998
  * Security origin.
5998
5999
  */
5999
- securityOrigin: string;
6000
+ securityOrigin?: string;
6001
+ /**
6002
+ * Storage key.
6003
+ */
6004
+ storageKey?: string;
6000
6005
  /**
6001
6006
  * Database name.
6002
6007
  */
@@ -186,6 +186,11 @@ const UIStrings = {
186
186
  */
187
187
  openWebDatabaseInsecureContext:
188
188
  'WebSQL in non-secure contexts is deprecated and will be removed in M107. Please use Web Storage or Indexed Database.',
189
+ /**
190
+ * @description Warning displayed to developers when persistent storage type is used to notify that storage type is deprecated.
191
+ */
192
+ persistentQuotaType:
193
+ '`StorageType.persistent` is deprecated. Please use standardized `navigator.storage` instead.',
189
194
  /**
190
195
  * @description This issue indicates that a `<source>` element with a `<picture>` parent was using an `src` attribute, which is not valid and is ignored by the browser. The `srcset` attribute should be used instead.
191
196
  */
@@ -446,6 +451,11 @@ export class DeprecationIssue extends Issue {
446
451
  feature = 5175124599767040;
447
452
  milestone = 105;
448
453
  break;
454
+ case Protocol.Audits.DeprecationIssueType.PersistentQuotaType:
455
+ messageFunction = i18nLazyString(UIStrings.persistentQuotaType);
456
+ feature = 5176235376246784;
457
+ milestone = 106;
458
+ break;
449
459
  case Protocol.Audits.DeprecationIssueType.PictureSourceSrc:
450
460
  messageFunction = i18nLazyString(UIStrings.pictureSourceSrc);
451
461
  break;
@@ -6,7 +6,6 @@ import * 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 * as Platform from '../../../core/platform/platform.js';
9
- import {assertNotNullOrUndefined} from '../../../core/platform/platform.js';
10
9
  import * as SDK from '../../../core/sdk/sdk.js';
11
10
  import * as Protocol from '../../../generated/protocol.js';
12
11
  import * as IssuesManager from '../../../models/issues_manager/issues_manager.js';
@@ -212,7 +211,9 @@ export class RequestHeadersComponent extends HTMLElement {
212
211
  }
213
212
 
214
213
  #render(): void {
215
- assertNotNullOrUndefined(this.#request);
214
+ if (!this.#request) {
215
+ return;
216
+ }
216
217
 
217
218
  // Disabled until https://crbug.com/1079231 is fixed.
218
219
  // clang-format off
@@ -224,8 +225,10 @@ export class RequestHeadersComponent extends HTMLElement {
224
225
  // clang-format on
225
226
  }
226
227
 
227
- #renderResponseHeaders(): LitHtml.TemplateResult {
228
- assertNotNullOrUndefined(this.#request);
228
+ #renderResponseHeaders(): LitHtml.LitTemplate {
229
+ if (!this.#request) {
230
+ return LitHtml.nothing;
231
+ }
229
232
 
230
233
  const headersWithIssues = [];
231
234
  if (this.#request.wasBlocked()) {
@@ -299,8 +302,10 @@ export class RequestHeadersComponent extends HTMLElement {
299
302
  // clang-format on
300
303
  }
301
304
 
302
- #renderRequestHeaders(): LitHtml.TemplateResult {
303
- assertNotNullOrUndefined(this.#request);
305
+ #renderRequestHeaders(): LitHtml.LitTemplate {
306
+ if (!this.#request) {
307
+ return LitHtml.nothing;
308
+ }
304
309
 
305
310
  const headers = this.#request.requestHeaders().slice();
306
311
  headers.sort(function(a, b) {
@@ -337,8 +342,7 @@ export class RequestHeadersComponent extends HTMLElement {
337
342
  }
338
343
 
339
344
  #maybeRenderProvisionalHeadersWarning(): LitHtml.LitTemplate {
340
- assertNotNullOrUndefined(this.#request);
341
- if (this.#request.requestHeadersText() !== undefined) {
345
+ if (!this.#request || this.#request.requestHeadersText() !== undefined) {
342
346
  return LitHtml.nothing;
343
347
  }
344
348
 
@@ -535,8 +539,10 @@ export class RequestHeadersComponent extends HTMLElement {
535
539
  `;
536
540
  }
537
541
 
538
- #renderGeneralSection(): LitHtml.TemplateResult {
539
- assertNotNullOrUndefined(this.#request);
542
+ #renderGeneralSection(): LitHtml.LitTemplate {
543
+ if (!this.#request) {
544
+ return LitHtml.nothing;
545
+ }
540
546
 
541
547
  let coloredCircleClassName = 'red-circle';
542
548
  if (this.#request.statusCode < 300 || this.#request.statusCode === 304) {
@@ -82,6 +82,11 @@ const UIStrings = {
82
82
  *@description A placeholder for an input in Protocol Monitor. The input accepts commands that are sent to the backend on Enter. CDP stands for Chrome DevTools Protocol.
83
83
  */
84
84
  sendRawCDPCommand: 'Send a raw `CDP` command',
85
+ /**
86
+ * @description A tooltip text for the input in the Protocol Monitor panel. The tooltip describes what format is expected.
87
+ */
88
+ sendRawCDPCommandExplanation:
89
+ 'Format: `\'Domain.commandName\'` for a command without parameters, or `\'{"command":"Domain.commandName", "parameters": {...}}\'` as a JSON object for a command with parameters. `\'cmd\'`/`\'method\'` and `\'args\'`/`\'params\'`/`\'arguments\'` are also supported as alternative keys for the `JSON` object.',
85
90
  };
86
91
  const str_ = i18n.i18n.registerUIStrings('panels/protocol_monitor/ProtocolMonitor.ts', UIStrings);
87
92
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -287,28 +292,29 @@ export class ProtocolMonitorImpl extends UI.Widget.VBox {
287
292
  });
288
293
  topToolbar.appendToolbarItem(this.textFilterUI);
289
294
 
290
- const onSend = (): void => {
291
- const value = input.value();
292
- // If input cannot be parsed as json, we assume it's the command name
293
- // for a command without parameters. Otherwise, we expect an object
294
- // with "command" and "parameters" attributes.
295
- let json = null;
296
- try {
297
- json = JSON.parse(value);
298
- } catch (err) {
299
- }
300
- const command = json ? json.command : value;
301
- const parameters = json ? json.parameters : null;
302
- const test = ProtocolClient.InspectorBackend.test;
303
- // TODO: TS thinks that properties are read-only because
304
- // in TS test is defined as a namespace.
305
- // @ts-ignore
306
- test.sendRawMessage(command, parameters, () => {});
307
- };
308
- const input = new UI.Toolbar.ToolbarInput(i18nString(UIStrings.sendRawCDPCommand), '', 1, .2, '', undefined, false);
309
- input.addEventListener(UI.Toolbar.ToolbarInput.Event.EnterPressed, onSend);
310
295
  const bottomToolbar = new UI.Toolbar.Toolbar('protocol-monitor-bottom-toolbar', this.contentElement);
311
- bottomToolbar.appendToolbarItem(input);
296
+ bottomToolbar.appendToolbarItem(this.#createCommandInput());
297
+ }
298
+
299
+ #createCommandInput(): UI.Toolbar.ToolbarInput {
300
+ const placeholder = i18nString(UIStrings.sendRawCDPCommand);
301
+ const accessiblePlaceholder = placeholder;
302
+ const growFactor = 1;
303
+ const shrinkFactor = 0.2;
304
+ const tooltip = i18nString(UIStrings.sendRawCDPCommandExplanation);
305
+ const input = new UI.Toolbar.ToolbarInput(
306
+ placeholder, accessiblePlaceholder, growFactor, shrinkFactor, tooltip, undefined, false);
307
+ input.addEventListener(UI.Toolbar.ToolbarInput.Event.EnterPressed, () => this.#onCommandSend(input));
308
+ return input;
309
+ }
310
+
311
+ #onCommandSend(input: UI.Toolbar.ToolbarInput): void {
312
+ const {command, parameters} = parseCommandInput(input.value());
313
+ const test = ProtocolClient.InspectorBackend.test;
314
+ // TODO: TS thinks that properties are read-only because
315
+ // in TS test is defined as a namespace.
316
+ // @ts-ignore
317
+ test.sendRawMessage(command, parameters, () => {});
312
318
  }
313
319
 
314
320
  static instance(opts = {forceNew: null}): ProtocolMonitorImpl {
@@ -518,3 +524,17 @@ export class InfoWidget extends UI.Widget.VBox {
518
524
  this.tabbedPane.changeTabView('response', SourceFrame.JSONView.JSONView.createViewSync(responseParsed));
519
525
  }
520
526
  }
527
+
528
+ export function parseCommandInput(input: string): {command: string, parameters: unknown} {
529
+ // If input cannot be parsed as json, we assume it's the command name
530
+ // for a command without parameters. Otherwise, we expect an object
531
+ // with "command"/"method"/"cmd" and "parameters"/"params"/"args"/"arguments" attributes.
532
+ let json = null;
533
+ try {
534
+ json = JSON.parse(input);
535
+ } catch (err) {
536
+ }
537
+ const command = json ? json.command || json.method || json.cmd : input;
538
+ const parameters = json ? json.parameters || json.params || json.args || json.arguments : null;
539
+ return {command, parameters};
540
+ }
@@ -532,6 +532,7 @@ export class SplitWidget extends Common.ObjectWrapper.eventMixin<EventTypes, typ
532
532
  // This order of things is important.
533
533
  // 1. Resize main element early and force layout.
534
534
  this.contentElement.style.setProperty(animatedMarginPropertyName, marginFrom);
535
+ this.contentElement.style.setProperty('overflow', 'hidden');
535
536
  if (!reverse) {
536
537
  suppressUnused(this.mainElement.offsetWidth);
537
538
  suppressUnused(this.sidebarElementInternal.offsetWidth);
@@ -579,6 +580,7 @@ export class SplitWidget extends Common.ObjectWrapper.eventMixin<EventTypes, typ
579
580
  this.contentElement.style.removeProperty('margin-bottom');
580
581
  this.contentElement.style.removeProperty('margin-left');
581
582
  this.contentElement.style.removeProperty('transition');
583
+ this.contentElement.style.removeProperty('overflow');
582
584
 
583
585
  if (this.animationFrameHandle) {
584
586
  this.contentElement.window().cancelAnimationFrame(this.animationFrameHandle);
package/package.json CHANGED
@@ -55,5 +55,5 @@
55
55
  "unittest": "scripts/test/run_unittests.py --no-text-coverage",
56
56
  "watch": "vpython third_party/node/node.py --output scripts/watch_build.js"
57
57
  },
58
- "version": "1.0.1029149"
58
+ "version": "1.0.1029692"
59
59
  }