chrome-devtools-frontend 1.0.949424 → 1.0.950850

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.
Files changed (31) hide show
  1. package/config/gni/devtools_grd_files.gni +0 -1
  2. package/docs/triage_guidelines.md +2 -2
  3. package/front_end/core/dom_extension/DOMExtension.ts +1 -1
  4. package/front_end/core/host/InspectorFrontendHostAPI.ts +0 -1
  5. package/front_end/core/host/UserMetrics.ts +0 -14
  6. package/front_end/core/i18n/locales/en-US.json +9 -0
  7. package/front_end/core/i18n/locales/en-XL.json +13 -4
  8. package/front_end/core/platform/platform.ts +1 -2
  9. package/front_end/core/platform/typescript-utilities.ts +4 -0
  10. package/front_end/devtools_compatibility.js +0 -1
  11. package/front_end/entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.ts +2 -7
  12. package/front_end/entrypoints/main/MainImpl.ts +1 -3
  13. package/front_end/models/issues_manager/AttributionReportingIssue.ts +37 -6
  14. package/front_end/models/issues_manager/CorsIssue.ts +1 -4
  15. package/front_end/models/issues_manager/descriptions/corsPreflightResponseInvalid.md +2 -2
  16. package/front_end/panels/animation/animationTimeline.css +2 -1
  17. package/front_end/panels/application/components/FrameDetailsView.ts +29 -15
  18. package/front_end/panels/console/ConsolePrompt.ts +14 -8
  19. package/front_end/panels/issues/CorsIssueDetailsView.ts +6 -2
  20. package/front_end/panels/sources/BreakpointEditDialog.ts +8 -5
  21. package/front_end/panels/timeline/TimelinePanel.ts +5 -4
  22. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  23. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +15 -0
  24. package/front_end/third_party/codemirror.next/package.json +3 -3
  25. package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +16 -0
  26. package/front_end/ui/components/report_view/report.css +0 -1
  27. package/front_end/ui/components/text_editor/config.ts +7 -4
  28. package/front_end/ui/components/text_editor/javascript.ts +16 -7
  29. package/package.json +1 -1
  30. package/scripts/build/ninja/copy.gni +2 -2
  31. package/front_end/core/platform/utilities.ts +0 -49
@@ -554,7 +554,6 @@ grd_files_debug_sources = [
554
554
  "front_end/core/platform/set-utilities.js",
555
555
  "front_end/core/platform/string-utilities.js",
556
556
  "front_end/core/platform/typescript-utilities.js",
557
- "front_end/core/platform/utilities.js",
558
557
  "front_end/core/protocol_client/InspectorBackend.js",
559
558
  "front_end/core/protocol_client/NodeURL.js",
560
559
  "front_end/core/root/Runtime.js",
@@ -45,8 +45,8 @@ Issues in the untriaged queue should receive a meaningful response within a busi
45
45
 
46
46
  - Close issues as `WontFix` if they don't reproduce (in simple cases) or are requests for features we've already concluded not to pursue.
47
47
  - Close issues as `Archived` that are valid, but it seems unlikely that we will get there anytime soon.
48
- - Move issues out of `Platform>DevTools` if they are not DevTools issues (but just reported via the menu item in DevTools), put on the `Hotlist-DevTools-Triaged` and leave the `Untriaged` status as is.
49
- - Assign regression bugs with bisects to individuals directly and set the status to `Assigned`.
48
+ - Move issues out of `Platform>DevTools` if they are not DevTools issues (but just reported via the menu item in DevTools), put on the `DevTools-Triaged` label and leave the `Untriaged` status as is.
49
+ - Assign regression bugs with bisects to individuals directly and set the status to `Assigned`.
50
50
  - Put proper `Platform>DevTools>XXX` component(s) on the issue and do an initial check-in regarding the priority.
51
51
  - Put one of the following labels on it and set the status to `Available`:
52
52
  - `Hotlist-DevTools-ProductReview` if it's controversial or clear that consensus needs to be built first.
@@ -457,7 +457,7 @@ Node.prototype.isSelfOrDescendant = function(node: Node|null): boolean {
457
457
  return Boolean(node) && (node === this || this.isDescendant(node));
458
458
  };
459
459
 
460
- Node.prototype.traverseNextNode = function(stayWithin?: Node, skipShadowRoot?: boolean = false): Node|null {
460
+ Node.prototype.traverseNextNode = function(stayWithin?: Node, skipShadowRoot: boolean = false): Node|null {
461
461
  if (!skipShadowRoot && this.shadowRoot) {
462
462
  return this.shadowRoot;
463
463
  }
@@ -357,7 +357,6 @@ export enum EnumeratedHistogram {
357
357
  IssuesPanelOpenedFrom = 'DevTools.IssuesPanelOpenedFrom',
358
358
  IssuesPanelResourceOpened = 'DevTools.IssuesPanelResourceOpened',
359
359
  KeybindSetSettingChanged = 'DevTools.KeybindSetSettingChanged',
360
- DualScreenDeviceEmulated = 'DevTools.DualScreenDeviceEmulated',
361
360
  ExperimentEnabledAtLaunch = 'DevTools.ExperimentEnabledAtLaunch',
362
361
  ExperimentEnabled = 'DevTools.ExperimentEnabled',
363
362
  ExperimentDisabled = 'DevTools.ExperimentDisabled',
@@ -158,12 +158,6 @@ export class UserMetrics {
158
158
  InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.IssueCreated, issueCreated, size);
159
159
  }
160
160
 
161
- dualScreenDeviceEmulated(emulationAction: DualScreenDeviceEmulated): void {
162
- const size = Object.keys(DualScreenDeviceEmulated).length + 1;
163
- InspectorFrontendHostInstance.recordEnumeratedHistogram(
164
- EnumeratedHistogram.DualScreenDeviceEmulated, emulationAction, size);
165
- }
166
-
167
161
  experimentEnabledAtLaunch(experimentId: string): void {
168
162
  const size = DevtoolsExperiments['__lastValidEnumPosition'] + 1;
169
163
  const experiment = DevtoolsExperiments[experimentId];
@@ -537,14 +531,6 @@ export enum IssueOpener {
537
531
  CommandMenu = 5,
538
532
  }
539
533
 
540
- // TODO(crbug.com/1167717): Make this a const enum again
541
- // eslint-disable-next-line rulesdir/const_enum
542
- export enum DualScreenDeviceEmulated {
543
- DualScreenDeviceSelected = 0,
544
- SpanButtonClicked = 1,
545
- PlatformSupportUsed = 2, // user starts to use platform dual screen support feature.
546
- }
547
-
548
534
  /**
549
535
  * This list should contain the currently active Devtools Experiments.
550
536
  * Therefore, it is possible that the id's will no longer be continuous
@@ -2846,6 +2846,9 @@
2846
2846
  "panels/application/components/FrameDetailsView.ts | no": {
2847
2847
  "message": "No"
2848
2848
  },
2849
+ "panels/application/components/FrameDetailsView.ts | origin": {
2850
+ "message": "Origin"
2851
+ },
2849
2852
  "panels/application/components/FrameDetailsView.ts | ownerElement": {
2850
2853
  "message": "Owner Element"
2851
2854
  },
@@ -2897,6 +2900,9 @@
2897
2900
  "panels/application/components/FrameDetailsView.ts | unreachableUrl": {
2898
2901
  "message": "Unreachable URL"
2899
2902
  },
2903
+ "panels/application/components/FrameDetailsView.ts | url": {
2904
+ "message": "URL"
2905
+ },
2900
2906
  "panels/application/components/FrameDetailsView.ts | willRequireCrossoriginIsolated": {
2901
2907
  "message": "⚠️ will require cross-origin isolated context in the future"
2902
2908
  },
@@ -5240,6 +5246,9 @@
5240
5246
  "panels/issues/CorsIssueDetailsView.ts | disallowedRequestMethod": {
5241
5247
  "message": "Disallowed Request Method"
5242
5248
  },
5249
+ "panels/issues/CorsIssueDetailsView.ts | failedRequest": {
5250
+ "message": "Failed Request"
5251
+ },
5243
5252
  "panels/issues/CorsIssueDetailsView.ts | header": {
5244
5253
  "message": "Header"
5245
5254
  },
@@ -2784,7 +2784,7 @@
2784
2784
  "message": "ÂṔÎ áv̂áîĺâb́îĺît́ŷ"
2785
2785
  },
2786
2786
  "panels/application/components/FrameDetailsView.ts | availabilityOfCertainApisDepends": {
2787
- "message": "Âv́âíl̂áb̂íl̂ít̂ý ôf́ ĉér̂t́âín̂ ÁP̂Íŝ d́êṕêńd̂ś ôń t̂h́ê d́ôćûḿêńt̂ b́êín̂ǵ cross-origin îśôĺât́d́."
2787
+ "message": "Âv́âíl̂áb̂íl̂ít̂ý ôf́ ĉér̂t́âín̂ ÁP̂Íŝ d́êṕêńd̂ś ôń t̂h́ê d́ôćûḿêńt̂ b́êín̂ǵ ĉŕôŝ-ór̂íĝín̂ íŝól̂át̂éd̂."
2788
2788
  },
2789
2789
  "panels/application/components/FrameDetailsView.ts | available": {
2790
2790
  "message": "âv́âíl̂áb̂ĺê"
@@ -2823,7 +2823,7 @@
2823
2823
  "message": "T̂h́îś f̂ŕâḿê ẃâś ĉŕêát̂éd̂ ṕr̂óĝŕâḿm̂át̂íĉál̂ĺŷ. T́ĥé stack trace ŝh́ôẃŝ ẃĥér̂é t̂h́îś ĥáp̂ṕêńêd́."
2824
2824
  },
2825
2825
  "panels/application/components/FrameDetailsView.ts | crossoriginIsolated": {
2826
- "message": "Cross-Originśôĺât́ê"
2826
+ "message": "Ĉŕôśŝ-Ór̂íĝín̂ Íŝól̂át̂éd̂"
2827
2827
  },
2828
2828
  "panels/application/components/FrameDetailsView.ts | document": {
2829
2829
  "message": "D̂óĉúm̂én̂t́"
@@ -2846,6 +2846,9 @@
2846
2846
  "panels/application/components/FrameDetailsView.ts | no": {
2847
2847
  "message": "N̂ó"
2848
2848
  },
2849
+ "panels/application/components/FrameDetailsView.ts | origin": {
2850
+ "message": "Ôŕîǵîń"
2851
+ },
2849
2852
  "panels/application/components/FrameDetailsView.ts | ownerElement": {
2850
2853
  "message": "Ôẃn̂ér̂ Él̂ém̂én̂t́"
2851
2854
  },
@@ -2856,7 +2859,7 @@
2856
2859
  "message": "r̂ép̂ór̂t́îńĝ t́ô"
2857
2860
  },
2858
2861
  "panels/application/components/FrameDetailsView.ts | requiresCrossoriginIsolated": {
2859
- "message": "r̂éq̂úîŕêś cross-origin îśôĺât́êd́ ĉón̂t́êx́t̂"
2862
+ "message": "r̂éq̂úîŕêś ĉŕôŝ-ór̂íĝín̂ íŝól̂t̂éd̂ ćôńéx̂t́"
2860
2863
  },
2861
2864
  "panels/application/components/FrameDetailsView.ts | root": {
2862
2865
  "message": "r̂óôt́"
@@ -2897,8 +2900,11 @@
2897
2900
  "panels/application/components/FrameDetailsView.ts | unreachableUrl": {
2898
2901
  "message": "Ûńr̂éâćĥáb̂ĺê ÚR̂Ĺ"
2899
2902
  },
2903
+ "panels/application/components/FrameDetailsView.ts | url": {
2904
+ "message": "ÛŔL̂"
2905
+ },
2900
2906
  "panels/application/components/FrameDetailsView.ts | willRequireCrossoriginIsolated": {
2901
- "message": "⚠️ ŵíl̂ĺ r̂éq̂úîŕê cross-origin íŝól̂át̂éd̂ ćôńt̂éx̂t́ îh́ f́ût́ûŕ"
2907
+ "message": "⚠️ ŵíl̂ĺ r̂éq̂úîŕê ćr̂óś-ôŕîǵîń îśôĺt́êd́ ĉón̂êx́t̂ ín̂ t́ĥé f̂úr̂é"
2902
2908
  },
2903
2909
  "panels/application/components/FrameDetailsView.ts | yes": {
2904
2910
  "message": "Ŷéŝ"
@@ -5240,6 +5246,9 @@
5240
5246
  "panels/issues/CorsIssueDetailsView.ts | disallowedRequestMethod": {
5241
5247
  "message": "D̂íŝál̂ĺôẃêd́ R̂éq̂úêśt̂ Ḿêt́ĥód̂"
5242
5248
  },
5249
+ "panels/issues/CorsIssueDetailsView.ts | failedRequest": {
5250
+ "message": "F̂áîĺêd́ R̂éq̂úêśt̂"
5251
+ },
5243
5252
  "panels/issues/CorsIssueDetailsView.ts | header": {
5244
5253
  "message": "Ĥéâd́êŕ"
5245
5254
  },
@@ -45,8 +45,7 @@ export {DCHECK} from './dcheck.js';
45
45
  * (e.g. `Platform.TypeScriptUtilities.assertNotNull` causes a
46
46
  * compiler error)
47
47
  */
48
- export {assertNotNullOrUndefined, assertUnhandled} from './typescript-utilities.js';
49
- export {assertNever, runOnWindowLoad} from './utilities.js';
48
+ export {assertNever, assertNotNullOrUndefined, assertUnhandled} from './typescript-utilities.js';
50
49
  export {
51
50
  ArrayUtilities,
52
51
  DateUtilities,
@@ -13,6 +13,10 @@ export function assertNotNullOrUndefined<T>(val: T): asserts val is NonNullable<
13
13
  }
14
14
  }
15
15
 
16
+ export function assertNever(type: never, message: string): never {
17
+ throw new Error(message);
18
+ }
19
+
16
20
  /**
17
21
  * This is useful to check on the type-level that the unhandled cases of
18
22
  * a switch are exactly `T` (where T is usually a union type of enum values).
@@ -385,7 +385,6 @@
385
385
  IssuesPanelOpenedFrom: 'DevTools.IssuesPanelOpenedFrom',
386
386
  IssuesPanelResourceOpened: 'DevTools.IssuesPanelResourceOpened',
387
387
  KeybindSetSettingChanged: 'DevTools.KeybindSetSettingChanged',
388
- DualScreenDeviceEmulated: 'DevTools.DualScreenDeviceEmulated',
389
388
  ExperimentEnabledAtLaunch: 'DevTools.ExperimentEnabledAtLaunch',
390
389
  ExperimentEnabled: 'DevTools.ExperimentEnabled',
391
390
  ExperimentDisabled: 'DevTools.ExperimentDisabled',
@@ -5,13 +5,8 @@
5
5
  import '../../core/dom_extension/dom_extension.js';
6
6
  import '../../Images/Images.js';
7
7
 
8
- import * as Platform from '../../core/platform/platform.js';
9
-
10
- Platform.runOnWindowLoad(() => {
11
- if (!window.opener) {
12
- return;
13
- }
8
+ if (window.opener) {
14
9
  // @ts-ignore TypeScript doesn't know about `Emulation` on `Window`.
15
10
  const app = window.opener.Emulation.AdvancedApp.instance();
16
11
  app.deviceModeEmulationFrameLoaded(document);
17
- });
12
+ }
@@ -118,9 +118,7 @@ export class MainImpl {
118
118
 
119
119
  constructor() {
120
120
  MainImpl.instanceForTest = this;
121
- Platform.runOnWindowLoad(() => {
122
- this.loaded();
123
- });
121
+ this.loaded();
124
122
  }
125
123
 
126
124
  static time(label: string): void {
@@ -81,7 +81,11 @@ export class AttributionReportingIssue extends Issue<IssueCode> {
81
81
  case IssueCode.InvalidAttributionSourceEventId:
82
82
  return {
83
83
  file: 'arInvalidAttributionSourceEventId.md',
84
- links: [],
84
+ links: [{
85
+ link:
86
+ 'https://developer.chrome.com/docs/privacy-sandbox/attribution-reporting-event-guide/#html-attribute-attributionsourceeventid-required',
87
+ linkTitle: 'attributionsourceeventid attribute',
88
+ }],
85
89
  };
86
90
  case IssueCode.InvalidAttributionData:
87
91
  return {
@@ -101,7 +105,18 @@ export class AttributionReportingIssue extends Issue<IssueCode> {
101
105
  case IssueCode.AttributionSourceUntrustworthyOrigin:
102
106
  return {
103
107
  file: 'arAttributionSourceUntrustworthyOrigin.md',
104
- links: [],
108
+ links: [
109
+ {
110
+ link:
111
+ 'https://developer.chrome.com/docs/privacy-sandbox/attribution-reporting-event-guide/#html-attribute-attributiondestination-required',
112
+ linkTitle: 'attributiondestination attribute',
113
+ },
114
+ {
115
+ link:
116
+ 'https://developer.chrome.com/docs/privacy-sandbox/attribution-reporting-event-guide/#html-attribute-attributionreportto',
117
+ linkTitle: 'attributionreportto attribute',
118
+ },
119
+ ],
105
120
  };
106
121
  case IssueCode.AttributionUntrustworthyFrameOrigin:
107
122
  return {
@@ -126,12 +141,20 @@ export class AttributionReportingIssue extends Issue<IssueCode> {
126
141
  case IssueCode.InvalidAttributionSourceExpiry:
127
142
  return {
128
143
  file: 'arInvalidAttributionSourceExpiry.md',
129
- links: [],
144
+ links: [{
145
+ link:
146
+ 'https://developer.chrome.com/docs/privacy-sandbox/attribution-reporting-event-guide/#html-attribute-attributionexpiry',
147
+ linkTitle: 'attributionexpiry attribute',
148
+ }],
130
149
  };
131
150
  case IssueCode.InvalidAttributionSourcePriority:
132
151
  return {
133
152
  file: 'arInvalidAttributionSourcePriority.md',
134
- links: [],
153
+ links: [{
154
+ link:
155
+ 'https://developer.chrome.com/docs/privacy-sandbox/attribution-reporting-event-guide/#html-attribute-attributionsourcepriority',
156
+ linkTitle: 'attributionsourcepriority attribute',
157
+ }],
135
158
  };
136
159
  case IssueCode.InvalidEventSourceTriggerData:
137
160
  return {
@@ -141,12 +164,20 @@ export class AttributionReportingIssue extends Issue<IssueCode> {
141
164
  case IssueCode.InvalidTriggerPriority:
142
165
  return {
143
166
  file: 'arInvalidTriggerPriority.md',
144
- links: [],
167
+ links: [{
168
+ link:
169
+ 'https://developer.chrome.com/docs/privacy-sandbox/attribution-reporting-event-guide/#prioritize-specific-conversions',
170
+ linkTitle: 'Prioritizing specific conversions',
171
+ }],
145
172
  };
146
173
  case IssueCode.InvalidTriggerDedupKey:
147
174
  return {
148
175
  file: 'arInvalidTriggerDedupKey.md',
149
- links: [],
176
+ links: [{
177
+ link:
178
+ 'https://developer.chrome.com/docs/privacy-sandbox/attribution-reporting-event-guide/#deduplicate-reports',
179
+ linkTitle: 'Deduplicating reports',
180
+ }],
150
181
  };
151
182
  }
152
183
  }
@@ -40,7 +40,6 @@ export enum IssueCode {
40
40
  PreflightMissingAllowExternal = 'CorsIssue::PreflightMissingAllowExternal',
41
41
  // TODO(https://crbug.com/1263483): Remove this once it's removed from CDP.
42
42
  PreflightInvalidAllowExternal = 'CorsIssue::PreflightInvalidAllowExternal',
43
- InvalidResponse = 'CorsIssue::InvalidResponse',
44
43
  NoCorsRedirectModeNotFollow = 'CorsIssue::NoCorsRedirectModeNotFollow',
45
44
  InvalidPrivateNetworkAccess = 'CorsIssue::InvalidPrivateNetworkAccess',
46
45
  UnexpectedPrivateNetworkAccess = 'CorsIssue::UnexpectedPrivateNetworkAccess',
@@ -63,6 +62,7 @@ function getIssueCode(details: Protocol.Audits.CorsIssueDetails): IssueCode {
63
62
  return IssueCode.WildcardOriginNotAllowed;
64
63
  case Protocol.Network.CorsError.PreflightInvalidStatus:
65
64
  case Protocol.Network.CorsError.PreflightDisallowedRedirect:
65
+ case Protocol.Network.CorsError.InvalidResponse:
66
66
  return IssueCode.PreflightResponseInvalid;
67
67
  case Protocol.Network.CorsError.AllowOriginMismatch:
68
68
  case Protocol.Network.CorsError.PreflightAllowOriginMismatch:
@@ -84,8 +84,6 @@ function getIssueCode(details: Protocol.Audits.CorsIssueDetails): IssueCode {
84
84
  return IssueCode.PreflightMissingAllowExternal;
85
85
  case Protocol.Network.CorsError.PreflightInvalidAllowExternal:
86
86
  return IssueCode.PreflightInvalidAllowExternal;
87
- case Protocol.Network.CorsError.InvalidResponse:
88
- return IssueCode.InvalidResponse;
89
87
  case Protocol.Network.CorsError.InsecurePrivateNetwork:
90
88
  return IssueCode.InsecurePrivateNetwork;
91
89
  case Protocol.Network.CorsError.NoCorsRedirectModeNotFollow:
@@ -226,7 +224,6 @@ export class CorsIssue extends Issue<IssueCode> {
226
224
  };
227
225
  case IssueCode.PreflightMissingAllowExternal:
228
226
  case IssueCode.PreflightInvalidAllowExternal:
229
- case IssueCode.InvalidResponse:
230
227
  case IssueCode.InvalidPrivateNetworkAccess:
231
228
  case IssueCode.UnexpectedPrivateNetworkAccess:
232
229
  return null;
@@ -1,5 +1,5 @@
1
1
  # Ensure preflight responses are valid
2
2
 
3
- A cross-origin resource sharing (CORS) request was blocked because the response to the associated [preflight request](issueCorsPreflightRequest) had an unsuccessful HTTP status code and/or was a redirect.
3
+ A cross-origin resource sharing (CORS) request was blocked because the response to the associated [preflight request](issueCorsPreflightRequest) failed, had an unsuccessful HTTP status code, and/or was a redirect.
4
4
 
5
- To fix this issue, ensure all CORS preflight `OPTION` requests are answered with a successful HTTP status code (2xx) and do not redirect.
5
+ To fix this issue, ensure all CORS preflight `OPTIONS` requests are answered with a successful HTTP status code (2xx) and do not redirect.
@@ -26,7 +26,8 @@
26
26
  display: flex;
27
27
  flex-direction: column;
28
28
  justify-content: space-around;
29
- align-items: center;
29
+ align-items: flex-start;
30
+ white-space: nowrap;
30
31
  flex: 0 0 150px;
31
32
  }
32
33
 
@@ -47,6 +47,11 @@ const UIStrings = {
47
47
  */
48
48
  document: 'Document',
49
49
  /**
50
+ *@description A web URL (for a lot of languages this does not need to be translated, please translate only where necessary)
51
+ */
52
+ url: 'URL',
53
+ /**
54
+ /**
50
55
  *@description Title for a link to the Sources panel
51
56
  */
52
57
  clickToRevealInSourcesPanel: 'Click to reveal in Sources panel',
@@ -63,6 +68,12 @@ const UIStrings = {
63
68
  */
64
69
  clickToRevealInNetworkPanelMight: 'Click to reveal in Network panel (might require page reload)',
65
70
  /**
71
+ *@description The origin of a URL (https://web.dev/same-site-same-origin/#origin)
72
+ *(for a lot of languages this does not need to be translated, please translate only where necessary)
73
+ */
74
+ origin: 'Origin',
75
+ /**
76
+ /**
66
77
  *@description Related node label in Timeline UIUtils of the Performance panel
67
78
  */
68
79
  ownerElement: 'Owner Element',
@@ -107,9 +118,11 @@ const UIStrings = {
107
118
  */
108
119
  no: 'No',
109
120
  /**
110
- *@description Row title for in the Frame Details view
121
+ *@description Label for whether a frame is cross-origin isolated
122
+ *(https://developer.chrome.com/docs/extensions/mv3/cross-origin-isolation/)
123
+ *(for a lot of languages this does not need to be translated, please translate only where necessary)
111
124
  */
112
- crossoriginIsolated: '`Cross-Origin` Isolated',
125
+ crossoriginIsolated: 'Cross-Origin Isolated',
113
126
  /**
114
127
  *@description Explanatory text in the Frame Details view
115
128
  */
@@ -132,10 +145,11 @@ const UIStrings = {
132
145
  */
133
146
  apiAvailability: 'API availability',
134
147
  /**
135
- *@description Explanatory text in the Frame Details view for the API availability section
148
+ *@description Explanation of why cross-origin isolation is important
149
+ *(https://web.dev/why-coop-coep/)
150
+ *(for a lot of languages 'cross-origin isolation' does not need to be translated, please translate only where necessary)
136
151
  */
137
- availabilityOfCertainApisDepends:
138
- 'Availability of certain APIs depends on the document being `cross-origin` isolated.',
152
+ availabilityOfCertainApisDepends: 'Availability of certain APIs depends on the document being cross-origin isolated.',
139
153
  /**
140
154
  *@description Description of the SharedArrayBuffer status
141
155
  */
@@ -159,13 +173,17 @@ const UIStrings = {
159
173
  sharedarraybufferConstructorIsAvailable:
160
174
  '`SharedArrayBuffer` constructor is available but `SABs` cannot be transferred via `postMessage`',
161
175
  /**
162
- *@description Explanation for the SharedArrayBuffer availability status
176
+ *@description Explanation why SharedArrayBuffer will not be available in the future
177
+ *(https://developer.chrome.com/docs/extensions/mv3/cross-origin-isolation/)
178
+ *(for a lot of languages 'cross-origin isolation' does not need to be translated, please translate only where necessary)
163
179
  */
164
- willRequireCrossoriginIsolated: '⚠️ will require `cross-origin` isolated context in the future',
180
+ willRequireCrossoriginIsolated: '⚠️ will require cross-origin isolated context in the future',
165
181
  /**
166
- *@description Explanation for the SharedArrayBuffer availability status
182
+ *@description Explanation why SharedArrayBuffer is not available
183
+ *(https://developer.chrome.com/docs/extensions/mv3/cross-origin-isolation/)
184
+ *(for a lot of languages 'cross-origin isolation' does not need to be translated, please translate only where necessary).
167
185
  */
168
- requiresCrossoriginIsolated: 'requires `cross-origin` isolated context',
186
+ requiresCrossoriginIsolated: 'requires cross-origin isolated context',
169
187
  /**
170
188
  *@description Explanation for the SharedArrayBuffer availability status in case the transfer of a SAB requires the
171
189
  * permission policy `cross-origin-isolated` to be enabled (e.g. because the message refers to the situation in an iframe).
@@ -218,10 +236,6 @@ const UIStrings = {
218
236
  */
219
237
  createdByAdScriptExplanation:
220
238
  'There was an ad script in the `(async) stack` when this frame was created. Examining the creation `stack trace` of this frame might provide more insight.',
221
- /**
222
- *@description Label for a list of origin trials that associated with at least one token.
223
- */
224
- // originTrials: 'Origin Trials',
225
239
  };
226
240
  const str_ = i18n.i18n.registerUIStrings('panels/application/components/FrameDetailsView.ts', UIStrings);
227
241
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -343,7 +357,7 @@ export class FrameDetailsReportView extends HTMLElement {
343
357
  return LitHtml.html`
344
358
  <${ReportView.ReportView.ReportSectionHeader.litTagName}>${i18nString(UIStrings.document)}</${
345
359
  ReportView.ReportView.ReportSectionHeader.litTagName}>
346
- <${ReportView.ReportView.ReportKey.litTagName}>${i18n.i18n.lockedString('URL')}</${
360
+ <${ReportView.ReportView.ReportKey.litTagName}>${i18nString(UIStrings.url)}</${
347
361
  ReportView.ReportView.ReportKey.litTagName}>
348
362
  <${ReportView.ReportView.ReportValue.litTagName}>
349
363
  <div class="inline-items">
@@ -449,7 +463,7 @@ export class FrameDetailsReportView extends HTMLElement {
449
463
  private maybeRenderOrigin(): LitHtml.TemplateResult|{} {
450
464
  if (this.frame && this.frame.securityOrigin && this.frame.securityOrigin !== '://') {
451
465
  return LitHtml.html`
452
- <${ReportView.ReportView.ReportKey.litTagName}>${i18n.i18n.lockedString('Origin')}</${
466
+ <${ReportView.ReportView.ReportKey.litTagName}>${i18nString(UIStrings.origin)}</${
453
467
  ReportView.ReportView.ReportKey.litTagName}>
454
468
  <${ReportView.ReportView.ReportValue.litTagName}>
455
469
  <div class="text-ellipsis" title=${this.frame.securityOrigin}>${this.frame.securityOrigin}</div>
@@ -207,7 +207,14 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
207
207
  {key: 'ArrowDown', run: (): boolean => this.moveHistory(1)},
208
208
  {mac: 'Ctrl-p', run: (): boolean => this.moveHistory(-1, true)},
209
209
  {mac: 'Ctrl-n', run: (): boolean => this.moveHistory(1, true)},
210
- {key: 'Enter', run: (): boolean => this.evaluate(), shift: CodeMirror.insertNewlineAndIndent},
210
+ {
211
+ key: 'Enter',
212
+ run: (): boolean => {
213
+ this.handleEnter();
214
+ return true;
215
+ },
216
+ shift: CodeMirror.insertNewlineAndIndent,
217
+ },
211
218
  ];
212
219
  }
213
220
 
@@ -242,29 +249,28 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
242
249
  return true;
243
250
  }
244
251
 
245
- private enterWillEvaluate(): boolean {
252
+ private async enterWillEvaluate(): Promise<boolean> {
246
253
  const {state} = this.editor;
247
- return state.doc.length > 0 && TextEditor.JavaScript.isExpressionComplete(state);
254
+ return state.doc.length > 0 && await TextEditor.JavaScript.isExpressionComplete(state.doc.toString());
248
255
  }
249
256
 
250
- private evaluate(): boolean {
251
- if (this.enterWillEvaluate()) {
257
+ private async handleEnter(): Promise<void> {
258
+ if (await this.enterWillEvaluate()) {
252
259
  this.appendCommand(this.text(), true);
253
260
  this.editor.dispatch({
254
261
  changes: {from: 0, to: this.editor.state.doc.length},
255
262
  scrollIntoView: true,
256
263
  });
257
264
  } else if (this.editor.state.doc.length) {
258
- return CodeMirror.insertNewlineAndIndent(this.editor.editor);
265
+ CodeMirror.insertNewlineAndIndent(this.editor.editor);
259
266
  } else {
260
267
  this.editor.dispatch({scrollIntoView: true});
261
268
  }
262
- return true;
263
269
  }
264
270
 
265
271
  private updatePromptIcon(): void {
266
272
  this.iconThrottler.schedule(async () => {
267
- this.promptIcon.classList.toggle('console-prompt-incomplete', !this.enterWillEvaluate());
273
+ this.promptIcon.classList.toggle('console-prompt-incomplete', !(await this.enterWillEvaluate()));
268
274
  });
269
275
  }
270
276
 
@@ -119,6 +119,10 @@ const UIStrings = {
119
119
  *@description Header for the column with the URL scheme that is not supported by fetch
120
120
  */
121
121
  unsupportedScheme: 'Unsupported Scheme',
122
+ /**
123
+ *@description A failed network request.
124
+ */
125
+ failedRequest: 'Failed Request',
122
126
  };
123
127
  const str_ = i18n.i18n.registerUIStrings('panels/issues/CorsIssueDetailsView.ts', UIStrings);
124
128
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -210,7 +214,6 @@ export class CorsIssueDetailsView extends AffectedResourcesView {
210
214
  default:
211
215
  Platform.assertUnhandled<IssuesManager.CorsIssue.IssueCode.PreflightMissingAllowExternal|
212
216
  IssuesManager.CorsIssue.IssueCode.PreflightInvalidAllowExternal|
213
- IssuesManager.CorsIssue.IssueCode.InvalidResponse|
214
217
  IssuesManager.CorsIssue.IssueCode.InvalidPrivateNetworkAccess|
215
218
  IssuesManager.CorsIssue.IssueCode.UnexpectedPrivateNetworkAccess>(issueCode);
216
219
  }
@@ -283,6 +286,8 @@ export class CorsIssueDetailsView extends AffectedResourcesView {
283
286
  return i18nString(UIStrings.preflightInvalidStatus);
284
287
  case Protocol.Network.CorsError.PreflightDisallowedRedirect:
285
288
  return i18nString(UIStrings.preflightDisallowedRedirect);
289
+ case Protocol.Network.CorsError.InvalidResponse:
290
+ return i18nString(UIStrings.failedRequest);
286
291
  }
287
292
  throw new Error('Invalid Argument');
288
293
  }
@@ -447,7 +452,6 @@ export class CorsIssueDetailsView extends AffectedResourcesView {
447
452
  this.appendStatus(element, details.isWarning);
448
453
  Platform.assertUnhandled<IssuesManager.CorsIssue.IssueCode.PreflightMissingAllowExternal|
449
454
  IssuesManager.CorsIssue.IssueCode.PreflightInvalidAllowExternal|
450
- IssuesManager.CorsIssue.IssueCode.InvalidResponse|
451
455
  IssuesManager.CorsIssue.IssueCode.InvalidPrivateNetworkAccess|
452
456
  IssuesManager.CorsIssue.IssueCode.UnexpectedPrivateNetworkAccess>(issueCode);
453
457
  break;
@@ -106,11 +106,14 @@ export class BreakpointEditDialog extends UI.Widget.Widget {
106
106
 
107
107
  const content = oldCondition || '';
108
108
  const finishIfComplete = (view: CodeMirror.EditorView): boolean => {
109
- if (TextEditor.JavaScript.isExpressionComplete(view.state)) {
110
- this.finishEditing(true, this.editor.state.doc.toString());
111
- return true;
112
- }
113
- return false;
109
+ TextEditor.JavaScript.isExpressionComplete(view.state.doc.toString()).then((complete): void => {
110
+ if (complete) {
111
+ this.finishEditing(true, this.editor.state.doc.toString());
112
+ } else {
113
+ CodeMirror.insertNewlineAndIndent(view);
114
+ }
115
+ });
116
+ return true;
114
117
  };
115
118
  const keymap = [
116
119
  {
@@ -842,7 +842,7 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
842
842
 
843
843
  private recordingFailed(error: string): void {
844
844
  if (this.statusPane) {
845
- this.statusPane.hide();
845
+ this.statusPane.remove();
846
846
  }
847
847
  this.statusPane = new StatusPane(
848
848
  {
@@ -1036,7 +1036,7 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
1036
1036
  this.hideLandingPage();
1037
1037
 
1038
1038
  if (this.statusPane) {
1039
- this.statusPane.hide();
1039
+ this.statusPane.remove();
1040
1040
  }
1041
1041
  this.statusPane = new StatusPane(
1042
1042
  {
@@ -1073,7 +1073,7 @@ export class TimelinePanel extends UI.Panel.Panel implements Client, TimelineMod
1073
1073
  this.setState(State.Idle);
1074
1074
 
1075
1075
  if (this.statusPane) {
1076
- this.statusPane.hide();
1076
+ this.statusPane.remove();
1077
1077
  }
1078
1078
  this.statusPane = null;
1079
1079
 
@@ -1405,9 +1405,10 @@ export class StatusPane extends UI.Widget.VBox {
1405
1405
  this.button.disabled = true;
1406
1406
  }
1407
1407
 
1408
- hide(): void {
1408
+ remove(): void {
1409
1409
  (this.element.parentNode as HTMLElement).classList.remove('tinted');
1410
1410
  this.arrangeDialog((this.element.parentNode as HTMLElement));
1411
+ this.stopTimer();
1411
1412
  this.element.remove();
1412
1413
  }
1413
1414