chrome-devtools-frontend 1.0.1017938 → 1.0.1018569

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.
@@ -3209,6 +3209,9 @@
3209
3209
  "panels/application/components/PermissionsPolicySection.ts | showDetails": {
3210
3210
  "message": "Show details"
3211
3211
  },
3212
+ "panels/application/components/ProtocolHandlersView.ts | dropdownLabel": {
3213
+ "message": "Select protocol handler"
3214
+ },
3212
3215
  "panels/application/components/ProtocolHandlersView.ts | manifest": {
3213
3216
  "message": "manifest"
3214
3217
  },
@@ -3227,6 +3230,9 @@
3227
3230
  "panels/application/components/ProtocolHandlersView.ts | testProtocol": {
3228
3231
  "message": "Test protocol"
3229
3232
  },
3233
+ "panels/application/components/ProtocolHandlersView.ts | textboxLabel": {
3234
+ "message": "Query parameter or endpoint for protocol handler"
3235
+ },
3230
3236
  "panels/application/components/ReportsGrid.ts | destination": {
3231
3237
  "message": "Destination"
3232
3238
  },
@@ -3209,6 +3209,9 @@
3209
3209
  "panels/application/components/PermissionsPolicySection.ts | showDetails": {
3210
3210
  "message": "Ŝh́ôẃ d̂ét̂áîĺŝ"
3211
3211
  },
3212
+ "panels/application/components/ProtocolHandlersView.ts | dropdownLabel": {
3213
+ "message": "Ŝél̂éĉt́ p̂ŕôt́ôćôĺ ĥán̂d́l̂ér̂"
3214
+ },
3212
3215
  "panels/application/components/ProtocolHandlersView.ts | manifest": {
3213
3216
  "message": "m̂án̂íf̂éŝt́"
3214
3217
  },
@@ -3227,6 +3230,9 @@
3227
3230
  "panels/application/components/ProtocolHandlersView.ts | testProtocol": {
3228
3231
  "message": "T̂éŝt́ p̂ŕôt́ôćôĺ"
3229
3232
  },
3233
+ "panels/application/components/ProtocolHandlersView.ts | textboxLabel": {
3234
+ "message": "Q̂úêŕŷ ṕâŕâḿêt́êŕ ôŕ êńd̂ṕôín̂t́ f̂ór̂ ṕr̂ót̂óĉól̂ h́âńd̂ĺêŕ"
3235
+ },
3230
3236
  "panels/application/components/ReportsGrid.ts | destination": {
3231
3237
  "message": "D̂éŝt́îńât́îón̂"
3232
3238
  },
@@ -451,11 +451,10 @@ export class TextSourceMap implements SourceMap {
451
451
  if (url === this.#compiledURLInternal && source) {
452
452
  url = Common.ParsedURL.ParsedURL.concatenate(url, '? [sm]');
453
453
  }
454
- if (this.#sourceInfos.has(url)) {
455
- continue;
456
- }
457
- this.#sourceInfos.set(url, new TextSourceMap.SourceInfo(source ?? null));
458
454
  sourcesList.push(url);
455
+ if (!this.#sourceInfos.has(url)) {
456
+ this.#sourceInfos.set(url, new TextSourceMap.SourceInfo(source ?? null));
457
+ }
459
458
  }
460
459
  sourceMapToSourceList.set(sourceMap, sourcesList);
461
460
  }
@@ -319,12 +319,16 @@ export class DOMStorageModel extends SDK.SDKModel.SDKModel<EventTypes> {
319
319
  }
320
320
  }
321
321
 
322
- private storageKey(securityOrigin: string, storageKey: string, isLocalStorage: boolean): string {
322
+ private storageKey(securityOrigin: string|undefined, storageKey: string|undefined, isLocalStorage: boolean): string {
323
323
  // TODO(crbug.com/1313434) Prioritize storageKey once everything is ready
324
+ console.assert(Boolean(securityOrigin) || Boolean(storageKey));
324
325
  if (securityOrigin) {
325
326
  return JSON.stringify(DOMStorage.storageIdWithSecurityOrigin(securityOrigin, isLocalStorage));
326
327
  }
327
- return JSON.stringify(DOMStorage.storageIdWithStorageKey(storageKey, isLocalStorage));
328
+ if (storageKey) {
329
+ return JSON.stringify(DOMStorage.storageIdWithStorageKey(storageKey, isLocalStorage));
330
+ }
331
+ throw new Error('Either securityOrigin or storageKey is required');
328
332
  }
329
333
 
330
334
  private keyForSecurityOrigin(securityOrigin: string, isLocalStorage: boolean): string {
@@ -375,7 +379,8 @@ export class DOMStorageModel extends SDK.SDKModel.SDKModel<EventTypes> {
375
379
  }
376
380
 
377
381
  storageForId(storageId: Protocol.DOMStorage.StorageId): DOMStorage {
378
- return this.storagesInternal[JSON.stringify(storageId)];
382
+ return this
383
+ .storagesInternal[this.storageKey(storageId.securityOrigin, storageId.storageKey, storageId.isLocalStorage)];
379
384
  }
380
385
 
381
386
  storages(): DOMStorage[] {
@@ -48,6 +48,14 @@ const UIStrings = {
48
48
  *@description Text for test protocol button
49
49
  */
50
50
  testProtocol: 'Test protocol',
51
+ /**
52
+ * @description Aria text for screen reader to announce they can select a protocol handler in the dropdown
53
+ */
54
+ dropdownLabel: 'Select protocol handler',
55
+ /**
56
+ * @description Aria text for screen reader to announce they can enter query parameters or endpoints into the textbox
57
+ */
58
+ textboxLabel: 'Query parameter or endpoint for protocol handler',
51
59
  };
52
60
 
53
61
  const str_ = i18n.i18n.registerUIStrings('panels/application/components/ProtocolHandlersView.ts', UIStrings);
@@ -121,11 +129,12 @@ export class ProtocolHandlersView extends HTMLElement {
121
129
  .map(p => LitHtml.html`<option value=${p.protocol}>${p.protocol}://</option>`);
122
130
  return LitHtml.html`
123
131
  <div class="protocol-handlers-row">
124
- <select class="chrome-select protocol-select" @change=${this.#handleProtocolSelect}>
132
+ <select class="chrome-select protocol-select" @change=${this.#handleProtocolSelect} aria-label=${
133
+ i18nString(UIStrings.dropdownLabel)}>
125
134
  ${protocolOptions}
126
135
  </select>
127
136
  <input .value=${this.#queryInputState} class="devtools-text-input" type="text" @change=${
128
- this.#handleQueryInputChange}/>
137
+ this.#handleQueryInputChange} aria-label=${i18nString(UIStrings.textboxLabel)}/>
129
138
  <${Buttons.Button.Button.litTagName} .variant=${Buttons.Button.Variant.PRIMARY} @click=${
130
139
  this.#handleTestProtocolClick}>
131
140
  ${i18nString(UIStrings.testProtocol)}
@@ -16,3 +16,7 @@
16
16
  .data-grid .event-display-table-basic-text-table-entry {
17
17
  line-height: 26px;
18
18
  }
19
+
20
+ .event-display-table-contents-json-wrapper > .json-view {
21
+ overflow: visible;
22
+ }
@@ -67,11 +67,18 @@ export class PreviewToggle extends HTMLElement {
67
67
 
68
68
  #render(): void {
69
69
  const checked = Root.Runtime.experiments.isEnabled(this.#experiment);
70
+ const hasLink = Boolean(this.#feedbackURL) || Boolean(this.#learnMoreURL);
71
+
72
+ const containerClasses = LitHtml.Directives.classMap({
73
+ 'container': true,
74
+ 'has-link': hasLink,
75
+ });
76
+
70
77
  // Disabled until https://crbug.com/1079231 is fixed.
71
78
  // clang-format off
72
79
  render(
73
80
  html`
74
- <div class="container">
81
+ <div class=${containerClasses}>
75
82
  <div class="checkbox-line">
76
83
  <label class="experiment-preview">
77
84
  <input type="checkbox" ?checked=${checked} @change=${this.#checkboxChanged} aria-label=${this.#name}/>
@@ -33,6 +33,12 @@
33
33
  padding: 4px;
34
34
  }
35
35
 
36
+ .container.has-link {
37
+ /* For x-link outline not to paint over the helper text
38
+ we need to have 2 * <padding>px additional line height */
39
+ line-height: calc(1em + 8px);
40
+ }
41
+
36
42
  .x-link {
37
43
  color: var(--color-primary);
38
44
  text-decoration-line: underline;
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.1017938"
58
+ "version": "1.0.1018569"
59
59
  }