chrome-devtools-frontend 1.0.948916 → 1.0.950768

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 (46) hide show
  1. package/config/gni/all_devtools_files.gni +5 -0
  2. package/config/gni/devtools_grd_files.gni +5 -1
  3. package/docs/triage_guidelines.md +2 -2
  4. package/front_end/core/dom_extension/DOMExtension.ts +1 -1
  5. package/front_end/core/host/InspectorFrontendHostAPI.ts +0 -1
  6. package/front_end/core/host/UserMetrics.ts +0 -14
  7. package/front_end/core/i18n/locales/en-US.json +30 -0
  8. package/front_end/core/i18n/locales/en-XL.json +34 -4
  9. package/front_end/core/platform/platform.ts +1 -2
  10. package/front_end/core/platform/typescript-utilities.ts +4 -0
  11. package/front_end/core/root/Runtime.ts +1 -0
  12. package/front_end/core/sdk/AccessibilityModel.ts +7 -7
  13. package/front_end/devtools_compatibility.js +0 -1
  14. package/front_end/entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.ts +2 -7
  15. package/front_end/entrypoints/main/MainImpl.ts +1 -3
  16. package/front_end/models/issues_manager/AttributionReportingIssue.ts +53 -7
  17. package/front_end/models/issues_manager/CorsIssue.ts +1 -4
  18. package/front_end/models/issues_manager/descriptions/arInvalidAttributionSourceExpiry.md +4 -0
  19. package/front_end/models/issues_manager/descriptions/arInvalidAttributionSourcePriority.md +4 -0
  20. package/front_end/models/issues_manager/descriptions/arInvalidEventSourceTriggerData.md +9 -0
  21. package/front_end/models/issues_manager/descriptions/arInvalidTriggerDedupKey.md +5 -0
  22. package/front_end/models/issues_manager/descriptions/arInvalidTriggerPriority.md +5 -0
  23. package/front_end/models/issues_manager/descriptions/corsPreflightResponseInvalid.md +2 -2
  24. package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +45 -3
  25. package/front_end/panels/accessibility/AccessibilitySidebarView.ts +2 -4
  26. package/front_end/panels/accessibility/axBreadcrumbs.css +4 -0
  27. package/front_end/panels/animation/animationTimeline.css +2 -1
  28. package/front_end/panels/application/components/FrameDetailsView.ts +29 -15
  29. package/front_end/panels/console/ConsolePrompt.ts +14 -8
  30. package/front_end/panels/elements/AccessibilityTreeView.ts +4 -6
  31. package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +44 -0
  32. package/front_end/panels/issues/CorsIssueDetailsView.ts +6 -2
  33. package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +1 -0
  34. package/front_end/panels/sources/BreakpointEditDialog.ts +8 -5
  35. package/front_end/panels/timeline/TimelinePanel.ts +5 -4
  36. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  37. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +23 -6
  38. package/front_end/third_party/codemirror.next/package.json +4 -4
  39. package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +16 -0
  40. package/front_end/ui/components/report_view/report.css +0 -1
  41. package/front_end/ui/components/text_editor/config.ts +7 -4
  42. package/front_end/ui/components/text_editor/javascript.ts +16 -7
  43. package/package.json +1 -1
  44. package/scripts/build/ninja/copy.gni +2 -2
  45. package/front_end/core/platform/utilities.ts +0 -49
  46. package/scripts/build/rjsmin.py +0 -484
@@ -50,6 +50,11 @@ all_devtools_files = [
50
50
  "front_end/models/issues_manager/descriptions/arAttributionUntrustworthyOrigin.md",
51
51
  "front_end/models/issues_manager/descriptions/arInvalidAttributionData.md",
52
52
  "front_end/models/issues_manager/descriptions/arInvalidAttributionSourceEventId.md",
53
+ "front_end/models/issues_manager/descriptions/arInvalidAttributionSourceExpiry.md",
54
+ "front_end/models/issues_manager/descriptions/arInvalidAttributionSourcePriority.md",
55
+ "front_end/models/issues_manager/descriptions/arInvalidEventSourceTriggerData.md",
56
+ "front_end/models/issues_manager/descriptions/arInvalidTriggerDedupKey.md",
57
+ "front_end/models/issues_manager/descriptions/arInvalidTriggerPriority.md",
53
58
  "front_end/models/issues_manager/descriptions/arMissingAttributionData.md",
54
59
  "front_end/models/issues_manager/descriptions/arPermissionPolicyDisabled.md",
55
60
  "front_end/models/issues_manager/descriptions/CoepCoopSandboxedIframeCannotNavigateToCoopPage.md",
@@ -274,6 +274,11 @@ grd_files_release_sources = [
274
274
  "front_end/models/issues_manager/descriptions/arAttributionUntrustworthyOrigin.md",
275
275
  "front_end/models/issues_manager/descriptions/arInvalidAttributionData.md",
276
276
  "front_end/models/issues_manager/descriptions/arInvalidAttributionSourceEventId.md",
277
+ "front_end/models/issues_manager/descriptions/arInvalidAttributionSourceExpiry.md",
278
+ "front_end/models/issues_manager/descriptions/arInvalidAttributionSourcePriority.md",
279
+ "front_end/models/issues_manager/descriptions/arInvalidEventSourceTriggerData.md",
280
+ "front_end/models/issues_manager/descriptions/arInvalidTriggerDedupKey.md",
281
+ "front_end/models/issues_manager/descriptions/arInvalidTriggerPriority.md",
277
282
  "front_end/models/issues_manager/descriptions/arMissingAttributionData.md",
278
283
  "front_end/models/issues_manager/descriptions/arPermissionPolicyDisabled.md",
279
284
  "front_end/models/issues_manager/descriptions/corsAllowCredentialsRequired.md",
@@ -549,7 +554,6 @@ grd_files_debug_sources = [
549
554
  "front_end/core/platform/set-utilities.js",
550
555
  "front_end/core/platform/string-utilities.js",
551
556
  "front_end/core/platform/typescript-utilities.js",
552
- "front_end/core/platform/utilities.js",
553
557
  "front_end/core/protocol_client/InspectorBackend.js",
554
558
  "front_end/core/protocol_client/NodeURL.js",
555
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
@@ -1955,9 +1955,18 @@
1955
1955
  "panels/accessibility/AXBreadcrumbsPane.ts | accessibilityTree": {
1956
1956
  "message": "Accessibility Tree"
1957
1957
  },
1958
+ "panels/accessibility/AXBreadcrumbsPane.ts | fullTreeExperimentDescription": {
1959
+ "message": "The accessibility tree moved to the top right corner of the DOM tree."
1960
+ },
1961
+ "panels/accessibility/AXBreadcrumbsPane.ts | fullTreeExperimentName": {
1962
+ "message": "Enable full-page accessibility tree"
1963
+ },
1958
1964
  "panels/accessibility/AXBreadcrumbsPane.ts | ignored": {
1959
1965
  "message": "Ignored"
1960
1966
  },
1967
+ "panels/accessibility/AXBreadcrumbsPane.ts | reloadRequired": {
1968
+ "message": "Reload required before the change takes effect."
1969
+ },
1961
1970
  "panels/accessibility/AXBreadcrumbsPane.ts | scrollIntoView": {
1962
1971
  "message": "Scroll into view"
1963
1972
  },
@@ -2837,6 +2846,9 @@
2837
2846
  "panels/application/components/FrameDetailsView.ts | no": {
2838
2847
  "message": "No"
2839
2848
  },
2849
+ "panels/application/components/FrameDetailsView.ts | origin": {
2850
+ "message": "Origin"
2851
+ },
2840
2852
  "panels/application/components/FrameDetailsView.ts | ownerElement": {
2841
2853
  "message": "Owner Element"
2842
2854
  },
@@ -2888,6 +2900,9 @@
2888
2900
  "panels/application/components/FrameDetailsView.ts | unreachableUrl": {
2889
2901
  "message": "Unreachable URL"
2890
2902
  },
2903
+ "panels/application/components/FrameDetailsView.ts | url": {
2904
+ "message": "URL"
2905
+ },
2891
2906
  "panels/application/components/FrameDetailsView.ts | willRequireCrossoriginIsolated": {
2892
2907
  "message": "⚠️ will require cross-origin isolated context in the future"
2893
2908
  },
@@ -5189,9 +5204,21 @@
5189
5204
  "panels/issues/AttributionReportingIssueDetailsView.ts | invalidSourceEventId": {
5190
5205
  "message": "Invalid attributionsourceeventid"
5191
5206
  },
5207
+ "panels/issues/AttributionReportingIssueDetailsView.ts | invalidSourceExpiry": {
5208
+ "message": "Invalid attributionexpiry"
5209
+ },
5210
+ "panels/issues/AttributionReportingIssueDetailsView.ts | invalidSourcePriority": {
5211
+ "message": "Invalid attributionsourcepriority"
5212
+ },
5192
5213
  "panels/issues/AttributionReportingIssueDetailsView.ts | invalidTriggerData": {
5193
5214
  "message": "Invalid trigger-data"
5194
5215
  },
5216
+ "panels/issues/AttributionReportingIssueDetailsView.ts | invalidTriggerDedupKey": {
5217
+ "message": "Invalid dedup-key"
5218
+ },
5219
+ "panels/issues/AttributionReportingIssueDetailsView.ts | invalidTriggerPriority": {
5220
+ "message": "Invalid priority"
5221
+ },
5195
5222
  "panels/issues/AttributionReportingIssueDetailsView.ts | nViolations": {
5196
5223
  "message": "{n, plural, =1 {# violation} other {# violations}}"
5197
5224
  },
@@ -5219,6 +5246,9 @@
5219
5246
  "panels/issues/CorsIssueDetailsView.ts | disallowedRequestMethod": {
5220
5247
  "message": "Disallowed Request Method"
5221
5248
  },
5249
+ "panels/issues/CorsIssueDetailsView.ts | failedRequest": {
5250
+ "message": "Failed Request"
5251
+ },
5222
5252
  "panels/issues/CorsIssueDetailsView.ts | header": {
5223
5253
  "message": "Header"
5224
5254
  },
@@ -1955,9 +1955,18 @@
1955
1955
  "panels/accessibility/AXBreadcrumbsPane.ts | accessibilityTree": {
1956
1956
  "message": "Âćĉéŝśîb́îĺît́ŷ T́r̂éê"
1957
1957
  },
1958
+ "panels/accessibility/AXBreadcrumbsPane.ts | fullTreeExperimentDescription": {
1959
+ "message": "T̂h́ê áĉćêśŝíb̂íl̂ít̂ý t̂ŕêé m̂óv̂éd̂ t́ô t́ĥé t̂óp̂ ŕîǵĥt́ ĉór̂ńêŕ ôf́ t̂h́ê D́ÔḾ t̂ŕêé."
1960
+ },
1961
+ "panels/accessibility/AXBreadcrumbsPane.ts | fullTreeExperimentName": {
1962
+ "message": "Êńâb́l̂é f̂úl̂ĺ-p̂áĝé âćĉéŝśîb́îĺît́ŷ t́r̂éê"
1963
+ },
1958
1964
  "panels/accessibility/AXBreadcrumbsPane.ts | ignored": {
1959
1965
  "message": "Îǵn̂ór̂éd̂"
1960
1966
  },
1967
+ "panels/accessibility/AXBreadcrumbsPane.ts | reloadRequired": {
1968
+ "message": "R̂él̂óâd́ r̂éq̂úîŕêd́ b̂éf̂ór̂é t̂h́ê ćĥán̂ǵê t́âḱêś êf́f̂éĉt́."
1969
+ },
1961
1970
  "panels/accessibility/AXBreadcrumbsPane.ts | scrollIntoView": {
1962
1971
  "message": "Ŝćr̂ól̂ĺ îńt̂ó v̂íêẃ"
1963
1972
  },
@@ -2775,7 +2784,7 @@
2775
2784
  "message": "ÂṔÎ áv̂áîĺâb́îĺît́ŷ"
2776
2785
  },
2777
2786
  "panels/application/components/FrameDetailsView.ts | availabilityOfCertainApisDepends": {
2778
- "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̂."
2779
2788
  },
2780
2789
  "panels/application/components/FrameDetailsView.ts | available": {
2781
2790
  "message": "âv́âíl̂áb̂ĺê"
@@ -2814,7 +2823,7 @@
2814
2823
  "message": "T̂h́îś f̂ŕâḿê ẃâś ĉŕêát̂éd̂ ṕr̂óĝŕâḿm̂át̂íĉál̂ĺŷ. T́ĥé stack trace ŝh́ôẃŝ ẃĥér̂é t̂h́îś ĥáp̂ṕêńêd́."
2815
2824
  },
2816
2825
  "panels/application/components/FrameDetailsView.ts | crossoriginIsolated": {
2817
- "message": "Cross-Originśôĺât́ê"
2826
+ "message": "Ĉŕôśŝ-Ór̂íĝín̂ Íŝól̂át̂éd̂"
2818
2827
  },
2819
2828
  "panels/application/components/FrameDetailsView.ts | document": {
2820
2829
  "message": "D̂óĉúm̂én̂t́"
@@ -2837,6 +2846,9 @@
2837
2846
  "panels/application/components/FrameDetailsView.ts | no": {
2838
2847
  "message": "N̂ó"
2839
2848
  },
2849
+ "panels/application/components/FrameDetailsView.ts | origin": {
2850
+ "message": "Ôŕîǵîń"
2851
+ },
2840
2852
  "panels/application/components/FrameDetailsView.ts | ownerElement": {
2841
2853
  "message": "Ôẃn̂ér̂ Él̂ém̂én̂t́"
2842
2854
  },
@@ -2847,7 +2859,7 @@
2847
2859
  "message": "r̂ép̂ór̂t́îńĝ t́ô"
2848
2860
  },
2849
2861
  "panels/application/components/FrameDetailsView.ts | requiresCrossoriginIsolated": {
2850
- "message": "r̂éq̂úîŕêś cross-origin îśôĺât́êd́ ĉón̂t́êx́t̂"
2862
+ "message": "r̂éq̂úîŕêś ĉŕôŝ-ór̂íĝín̂ íŝól̂t̂éd̂ ćôńéx̂t́"
2851
2863
  },
2852
2864
  "panels/application/components/FrameDetailsView.ts | root": {
2853
2865
  "message": "r̂óôt́"
@@ -2888,8 +2900,11 @@
2888
2900
  "panels/application/components/FrameDetailsView.ts | unreachableUrl": {
2889
2901
  "message": "Ûńr̂éâćĥáb̂ĺê ÚR̂Ĺ"
2890
2902
  },
2903
+ "panels/application/components/FrameDetailsView.ts | url": {
2904
+ "message": "ÛŔL̂"
2905
+ },
2891
2906
  "panels/application/components/FrameDetailsView.ts | willRequireCrossoriginIsolated": {
2892
- "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̂é"
2893
2908
  },
2894
2909
  "panels/application/components/FrameDetailsView.ts | yes": {
2895
2910
  "message": "Ŷéŝ"
@@ -5189,9 +5204,21 @@
5189
5204
  "panels/issues/AttributionReportingIssueDetailsView.ts | invalidSourceEventId": {
5190
5205
  "message": "Îńv̂ál̂íd̂ attributionsourceeventid"
5191
5206
  },
5207
+ "panels/issues/AttributionReportingIssueDetailsView.ts | invalidSourceExpiry": {
5208
+ "message": "Îńv̂ál̂íd̂ attributionexpiry"
5209
+ },
5210
+ "panels/issues/AttributionReportingIssueDetailsView.ts | invalidSourcePriority": {
5211
+ "message": "Îńv̂ál̂íd̂ attributionsourcepriority"
5212
+ },
5192
5213
  "panels/issues/AttributionReportingIssueDetailsView.ts | invalidTriggerData": {
5193
5214
  "message": "Îńv̂ál̂íd̂ trigger-data"
5194
5215
  },
5216
+ "panels/issues/AttributionReportingIssueDetailsView.ts | invalidTriggerDedupKey": {
5217
+ "message": "Îńv̂ál̂íd̂ dedup-key"
5218
+ },
5219
+ "panels/issues/AttributionReportingIssueDetailsView.ts | invalidTriggerPriority": {
5220
+ "message": "Îńv̂ál̂íd̂ priority"
5221
+ },
5195
5222
  "panels/issues/AttributionReportingIssueDetailsView.ts | nViolations": {
5196
5223
  "message": "{n, plural, =1 {# v̂íôĺât́îón̂} other {# v́îól̂át̂íôńŝ}}"
5197
5224
  },
@@ -5219,6 +5246,9 @@
5219
5246
  "panels/issues/CorsIssueDetailsView.ts | disallowedRequestMethod": {
5220
5247
  "message": "D̂íŝál̂ĺôẃêd́ R̂éq̂úêśt̂ Ḿêt́ĥód̂"
5221
5248
  },
5249
+ "panels/issues/CorsIssueDetailsView.ts | failedRequest": {
5250
+ "message": "F̂áîĺêd́ R̂éq̂úêśt̂"
5251
+ },
5222
5252
  "panels/issues/CorsIssueDetailsView.ts | header": {
5223
5253
  "message": "Ĥéâd́êŕ"
5224
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).
@@ -351,6 +351,7 @@ export enum ExperimentName {
351
351
  PROTOCOL_MONITOR = 'protocolMonitor',
352
352
  WEBAUTHN_PANE = 'webauthnPane',
353
353
  SYNC_SETTINGS = 'syncSettings',
354
+ FULL_ACCESSIBILITY_TREE = 'fullAccessibilityTree',
354
355
  }
355
356
 
356
357
  // TODO(crbug.com/1167717): Make this a const enum again
@@ -291,25 +291,25 @@ export class AccessibilityModel extends SDKModel<EventTypes> implements Protocol
291
291
  async requestAXChildren(nodeId: Protocol.Accessibility.AXNodeId, frameId?: Protocol.Page.FrameId):
292
292
  Promise<AccessibilityNode[]> {
293
293
  const parent = this.#axIdToAXNode.get(nodeId);
294
- if (parent && !parent.hasUnloadedChildren()) {
294
+ if (!parent) {
295
+ throw Error('Cannot request children before parent');
296
+ }
297
+ if (!parent.hasUnloadedChildren()) {
295
298
  return parent.children();
296
299
  }
297
300
 
298
301
  let nodes;
299
302
  const request = this.#pendingChildRequests.get(nodeId);
300
303
  if (request) {
301
- nodes = (await request).nodes;
304
+ await request;
302
305
  } else {
303
306
  const req = this.agent.invoke_getChildAXNodes({id: nodeId, frameId});
304
307
  this.#pendingChildRequests.set(nodeId, req);
305
308
  nodes = (await req).nodes;
309
+ this.createNodesFromPayload(nodes);
306
310
  this.#pendingChildRequests.delete(nodeId);
307
311
  }
308
- if (!nodes) {
309
- return [];
310
- }
311
- const axNodes = this.createNodesFromPayload(nodes);
312
- return axNodes;
312
+ return parent.children();
313
313
  }
314
314
 
315
315
  async requestAndLoadSubTreeToNode(node: DOMNode): Promise<AccessibilityNode[]|null> {
@@ -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 {
@@ -124,15 +139,46 @@ export class AttributionReportingIssue extends Issue<IssueCode> {
124
139
  links: [],
125
140
  };
126
141
  case IssueCode.InvalidAttributionSourceExpiry:
127
- return null;
142
+ return {
143
+ file: 'arInvalidAttributionSourceExpiry.md',
144
+ links: [{
145
+ link:
146
+ 'https://developer.chrome.com/docs/privacy-sandbox/attribution-reporting-event-guide/#html-attribute-attributionexpiry',
147
+ linkTitle: 'attributionexpiry attribute',
148
+ }],
149
+ };
128
150
  case IssueCode.InvalidAttributionSourcePriority:
129
- return null;
151
+ return {
152
+ file: 'arInvalidAttributionSourcePriority.md',
153
+ links: [{
154
+ link:
155
+ 'https://developer.chrome.com/docs/privacy-sandbox/attribution-reporting-event-guide/#html-attribute-attributionsourcepriority',
156
+ linkTitle: 'attributionsourcepriority attribute',
157
+ }],
158
+ };
130
159
  case IssueCode.InvalidEventSourceTriggerData:
131
- return null;
160
+ return {
161
+ file: 'arInvalidEventSourceTriggerData.md',
162
+ links: [],
163
+ };
132
164
  case IssueCode.InvalidTriggerPriority:
133
- return null;
165
+ return {
166
+ file: 'arInvalidTriggerPriority.md',
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
+ }],
172
+ };
134
173
  case IssueCode.InvalidTriggerDedupKey:
135
- return null;
174
+ return {
175
+ file: 'arInvalidTriggerDedupKey.md',
176
+ links: [{
177
+ link:
178
+ 'https://developer.chrome.com/docs/privacy-sandbox/attribution-reporting-event-guide/#deduplicate-reports',
179
+ linkTitle: 'Deduplicating reports',
180
+ }],
181
+ };
136
182
  }
137
183
  }
138
184
 
@@ -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;
@@ -0,0 +1,4 @@
1
+ # Ensure attribution source expiry is a valid number
2
+
3
+ The expiry associated with an attribution source was defaulted to 30 days.
4
+ This happens if the provided value is not a valid 64-bit signed integer.
@@ -0,0 +1,4 @@
1
+ # Ensure attribution source priority is a valid number
2
+
3
+ The priority associated with an attribution source was defaulted to `0`.
4
+ This happens if the provided value is not a valid 64-bit signed integer.
@@ -0,0 +1,9 @@
1
+ # Ensure the "event-source-trigger-data" query parameter for an attribution redirect is a valid number
2
+
3
+ The event-source trigger data associated with an attribution was defaulted to `0`.
4
+ This happens if the `event-source-trigger-data` query parameter provided in the `.well-known`
5
+ redirect is not a valid 64-bit unsigned integer.
6
+
7
+ Note that even if a valid integer is provided, only the lowest 1-bit of the
8
+ `event-source-trigger-data` query parameter is recorded, with a 5% chance of the 1 bit being
9
+ noised.
@@ -0,0 +1,5 @@
1
+ # Ensure the "dedup-key" query parameter for an attribution redirect is a valid number
2
+
3
+ The dedup key associated with an attribution was defaulted to `null`.
4
+ This happens if the `dedup-key` query parameter provided in the `.well-known` redirect is not a
5
+ valid 64-bit signed integer.
@@ -0,0 +1,5 @@
1
+ # Ensure the "priority" query parameter for an attribution redirect is a valid number
2
+
3
+ The priority associated with an attribution was defaulted to `0`.
4
+ This happens if the `priority` query parameter provided in the `.well-known` redirect is not a
5
+ valid 64-bit signed integer.
@@ -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.
@@ -3,8 +3,11 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import * as Common from '../../core/common/common.js';
6
+ import * as Host from '../../core/host/host.js';
6
7
  import * as i18n from '../../core/i18n/i18n.js';
8
+ import * as Root from '../../core/root/root.js';
7
9
  import * as SDK from '../../core/sdk/sdk.js';
10
+ import * as Feedback from '../../ui/components/panel_feedback/panel_feedback.js';
8
11
  import * as UI from '../../ui/legacy/legacy.js';
9
12
 
10
13
  import axBreadcrumbsStyles from './axBreadcrumbs.css.js';
@@ -27,6 +30,18 @@ const UIStrings = {
27
30
  *@description Ignored node element text content in AXBreadcrumbs Pane of the Accessibility panel
28
31
  */
29
32
  ignored: 'Ignored',
33
+ /**
34
+ *@description Name for experimental tree toggle.
35
+ */
36
+ fullTreeExperimentName: 'Enable full-page accessibility tree',
37
+ /**
38
+ *@description Description text for experimental tree toggle.
39
+ */
40
+ fullTreeExperimentDescription: 'The accessibility tree moved to the top right corner of the DOM tree.',
41
+ /**
42
+ *@description Message saying that DevTools must be restarted before the experiment is enabled.
43
+ */
44
+ reloadRequired: 'Reload required before the change takes effect.',
30
45
  };
31
46
  const str_ = i18n.i18n.registerUIStrings('panels/accessibility/AXBreadcrumbsPane.ts', UIStrings);
32
47
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -37,24 +52,48 @@ export class AXBreadcrumbsPane extends AccessibilitySubPane {
37
52
  private collapsingBreadcrumbId: number;
38
53
  private hoveredBreadcrumb: AXBreadcrumb|null;
39
54
  private readonly rootElement: HTMLElement;
55
+ #legacyTreeDisabled = false;
40
56
 
41
57
  constructor(axSidebarView: AccessibilitySidebarView) {
42
58
  super(i18nString(UIStrings.accessibilityTree));
43
59
 
44
60
  this.element.classList.add('ax-subpane');
45
- UI.ARIAUtils.markAsTree(this.element);
46
61
  this.element.tabIndex = -1;
47
62
 
48
63
  this.axSidebarView = axSidebarView;
49
-
50
64
  this.preselectedBreadcrumb = null;
51
65
  this.inspectedNodeBreadcrumb = null;
52
66
 
53
67
  this.collapsingBreadcrumbId = -1;
54
68
 
55
- this.hoveredBreadcrumb = null;
56
69
  this.rootElement = this.element.createChild('div', 'ax-breadcrumbs');
57
70
 
71
+ this.hoveredBreadcrumb = null;
72
+ const previewToggle = new Feedback.PreviewToggle.PreviewToggle();
73
+ const name = i18nString(UIStrings.fullTreeExperimentName);
74
+ const experiment = Root.Runtime.ExperimentName.FULL_ACCESSIBILITY_TREE;
75
+ const onChangeCallback: (checked: boolean) => void = checked => {
76
+ Host.userMetrics.experimentChanged(experiment, checked);
77
+ UI.InspectorView.InspectorView.instance().displayReloadRequiredWarning(i18nString(UIStrings.reloadRequired));
78
+ };
79
+ if (Root.Runtime.experiments.isEnabled(experiment)) {
80
+ this.#legacyTreeDisabled = true;
81
+ const feedbackURL = 'https://goo.gle/devtools-a11y-tree-feedback';
82
+ previewToggle.data = {
83
+ name,
84
+ helperText: i18nString(UIStrings.fullTreeExperimentDescription),
85
+ feedbackURL,
86
+ experiment,
87
+ onChangeCallback,
88
+ };
89
+ this.element.appendChild(previewToggle);
90
+ return;
91
+ }
92
+ previewToggle.data = {name, helperText: null, feedbackURL: null, experiment, onChangeCallback};
93
+ this.element.prepend(previewToggle);
94
+
95
+ UI.ARIAUtils.markAsTree(this.rootElement);
96
+
58
97
  this.rootElement.addEventListener('keydown', this.onKeyDown.bind(this), true);
59
98
  this.rootElement.addEventListener('mousemove', this.onMouseMove.bind(this), false);
60
99
  this.rootElement.addEventListener('mouseleave', this.onMouseLeave.bind(this), false);
@@ -72,6 +111,9 @@ export class AXBreadcrumbsPane extends AccessibilitySubPane {
72
111
  }
73
112
 
74
113
  setAXNode(axNode: SDK.AccessibilityModel.AccessibilityNode|null): void {
114
+ if (this.#legacyTreeDisabled) {
115
+ return;
116
+ }
75
117
  const hadFocus = this.element.hasFocus();
76
118
  super.setAXNode(axNode);
77
119
 
@@ -31,10 +31,8 @@ export class AccessibilitySidebarView extends UI.ThrottledWidget.ThrottledWidget
31
31
  this.axNodeInternal = null;
32
32
  this.skipNextPullNode = false;
33
33
  this.sidebarPaneStack = UI.ViewManager.ViewManager.instance().createStackLocation();
34
- if (!Root.Runtime.experiments.isEnabled('fullAccessibilityTree')) {
35
- this.breadcrumbsSubPane = new AXBreadcrumbsPane(this);
36
- this.sidebarPaneStack.showView(this.breadcrumbsSubPane);
37
- }
34
+ this.breadcrumbsSubPane = new AXBreadcrumbsPane(this);
35
+ this.sidebarPaneStack.showView(this.breadcrumbsSubPane);
38
36
  this.ariaSubPane = new ARIAAttributesPane();
39
37
  this.sidebarPaneStack.showView(this.ariaSubPane);
40
38
  this.axNodeSubPane = new AXNodeSubPane();