chrome-devtools-frontend 1.0.927127 → 1.0.928589

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 (144) hide show
  1. package/AUTHORS +1 -0
  2. package/config/gni/all_devtools_files.gni +0 -1
  3. package/config/gni/devtools_grd_files.gni +30 -4
  4. package/config/gni/devtools_image_files.gni +1 -0
  5. package/front_end/Images/src/ic_preview_feature.svg +3 -0
  6. package/front_end/Tests.js +2 -3
  7. package/front_end/core/common/Settings.ts +26 -45
  8. package/front_end/core/host/UserMetrics.ts +2 -2
  9. package/front_end/core/i18n/locales/en-US.json +60 -15
  10. package/front_end/core/i18n/locales/en-XL.json +60 -15
  11. package/front_end/core/platform/keyboard-utilities.ts +1 -0
  12. package/front_end/core/root/Runtime.ts +62 -61
  13. package/front_end/core/sdk/AccessibilityModel.ts +73 -73
  14. package/front_end/core/sdk/CPUProfileDataModel.ts +14 -14
  15. package/front_end/core/sdk/CPUProfilerModel.ts +33 -33
  16. package/front_end/core/sdk/CPUThrottlingManager.ts +8 -8
  17. package/front_end/core/sdk/CSSFontFace.ts +10 -10
  18. package/front_end/core/sdk/CSSMatchedStyles.ts +114 -114
  19. package/front_end/core/sdk/CSSMedia.ts +22 -22
  20. package/front_end/core/sdk/CSSMetadata.ts +53 -49
  21. package/front_end/core/sdk/CSSModel.ts +139 -135
  22. package/front_end/core/sdk/CSSProperty.ts +18 -18
  23. package/front_end/core/sdk/CSSRule.ts +15 -15
  24. package/front_end/core/sdk/CSSStyleDeclaration.ts +49 -47
  25. package/front_end/core/sdk/CSSStyleSheetHeader.ts +12 -12
  26. package/front_end/core/sdk/ChildTargetManager.ts +41 -40
  27. package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +10 -10
  28. package/front_end/core/sdk/Connections.ts +81 -81
  29. package/front_end/core/sdk/ConsoleModel.ts +68 -68
  30. package/front_end/core/sdk/Cookie.ts +48 -48
  31. package/front_end/core/sdk/CookieModel.ts +13 -13
  32. package/front_end/core/sdk/CookieParser.ts +45 -45
  33. package/front_end/core/sdk/DOMDebuggerModel.ts +131 -131
  34. package/front_end/core/sdk/DOMModel.ts +264 -252
  35. package/front_end/core/sdk/DebuggerModel.ts +209 -205
  36. package/front_end/core/sdk/EmulationModel.ts +76 -76
  37. package/front_end/core/sdk/FilmStripModel.ts +29 -29
  38. package/front_end/core/sdk/FrameManager.ts +43 -42
  39. package/front_end/core/sdk/HeapProfilerModel.ts +36 -36
  40. package/front_end/core/sdk/IsolateManager.ts +82 -82
  41. package/front_end/core/sdk/IssuesModel.ts +6 -6
  42. package/front_end/core/sdk/LayerTreeBase.ts +37 -37
  43. package/front_end/core/sdk/LogModel.ts +5 -5
  44. package/front_end/core/sdk/NetworkManager.ts +229 -225
  45. package/front_end/core/sdk/NetworkRequest.ts +368 -360
  46. package/front_end/core/sdk/OverlayColorGenerator.ts +9 -9
  47. package/front_end/core/sdk/OverlayModel.ts +155 -153
  48. package/front_end/core/sdk/OverlayPersistentHighlighter.ts +100 -101
  49. package/front_end/core/sdk/PageResourceLoader.ts +30 -30
  50. package/front_end/core/sdk/PaintProfiler.ts +16 -16
  51. package/front_end/core/sdk/PerformanceMetricsModel.ts +12 -12
  52. package/front_end/core/sdk/ProfileTreeModel.ts +3 -3
  53. package/front_end/core/sdk/RemoteObject.ts +108 -104
  54. package/front_end/core/sdk/Resource.ts +85 -84
  55. package/front_end/core/sdk/ResourceTreeModel.ts +150 -145
  56. package/front_end/core/sdk/RuntimeModel.ts +38 -34
  57. package/front_end/core/sdk/SDKModel.ts +3 -3
  58. package/front_end/core/sdk/ScreenCaptureModel.ts +19 -19
  59. package/front_end/core/sdk/Script.ts +29 -29
  60. package/front_end/core/sdk/SecurityOriginManager.ts +19 -19
  61. package/front_end/core/sdk/ServerTiming.ts +2 -2
  62. package/front_end/core/sdk/ServiceWorkerCacheModel.ts +43 -43
  63. package/front_end/core/sdk/ServiceWorkerManager.ts +72 -68
  64. package/front_end/core/sdk/SourceMap.ts +40 -36
  65. package/front_end/core/sdk/SourceMapManager.ts +57 -57
  66. package/front_end/core/sdk/Target.ts +64 -63
  67. package/front_end/core/sdk/TargetManager.ts +60 -56
  68. package/front_end/core/sdk/TracingManager.ts +39 -39
  69. package/front_end/core/sdk/TracingModel.ts +125 -125
  70. package/front_end/core/sdk/WebAuthnModel.ts +9 -9
  71. package/front_end/entrypoints/lighthouse_worker/{LighthouseService.js → LighthouseService.ts} +20 -45
  72. package/front_end/entrypoints/lighthouse_worker/{lighthouse_worker.js → lighthouse_worker.ts} +0 -0
  73. package/front_end/entrypoints/main/MainImpl.ts +7 -2
  74. package/front_end/legacy_test_runner/elements_test_runner/ElementsTestRunner.js +4 -4
  75. package/front_end/legacy_test_runner/sdk_test_runner/sdk_test_runner.js +1 -1
  76. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +0 -6
  77. package/front_end/models/issues_manager/GenericIssue.ts +86 -0
  78. package/front_end/models/issues_manager/Issue.ts +24 -0
  79. package/front_end/models/issues_manager/IssuesManager.ts +18 -6
  80. package/front_end/models/issues_manager/descriptions/genericCrossOriginPortalPostMessageError.md +3 -0
  81. package/front_end/models/issues_manager/issues_manager.ts +2 -0
  82. package/front_end/models/javascript_metadata/NativeFunctions.js +5422 -1
  83. package/front_end/panels/console/ConsoleSidebar.ts +0 -3
  84. package/front_end/panels/elements/ElementsTreeElement.ts +53 -61
  85. package/front_end/panels/elements/ElementsTreeOutline.ts +0 -1
  86. package/front_end/panels/elements/components/LayoutPane.ts +5 -1
  87. package/front_end/panels/issues/GenericIssueDetailsView.ts +68 -0
  88. package/front_end/panels/issues/IssueAggregator.ts +16 -0
  89. package/front_end/panels/issues/IssueKindView.ts +95 -0
  90. package/front_end/panels/issues/IssueView.ts +6 -0
  91. package/front_end/panels/issues/IssuesPane.ts +81 -18
  92. package/front_end/panels/issues/issuesTree.css +8 -3
  93. package/front_end/panels/lighthouse/LighthouseController.ts +3 -1
  94. package/front_end/panels/network/NetworkItemView.ts +1 -1
  95. package/front_end/panels/network/networkLogView.css +5 -0
  96. package/front_end/panels/sensors/LocationsSettingsTab.ts +1 -1
  97. package/front_end/panels/settings/SettingsScreen.ts +1 -0
  98. package/front_end/panels/settings/settingsScreen.css +24 -0
  99. package/front_end/panels/snippets/SnippetsQuickOpen.ts +8 -3
  100. package/front_end/panels/sources/TabbedEditorContainer.ts +1 -1
  101. package/front_end/panels/sources/sources-meta.ts +22 -7
  102. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  103. package/front_end/third_party/codemirror.next/package.json +4 -4
  104. package/front_end/ui/components/code_highlighter/CodeHighlighter.ts +137 -0
  105. package/front_end/ui/components/code_highlighter/codeHighlighter.css +51 -0
  106. package/front_end/ui/components/code_highlighter/code_highlighter.ts +11 -0
  107. package/front_end/ui/components/docs/text_editor/basic.html +28 -0
  108. package/front_end/ui/components/docs/text_editor/basic.ts +14 -0
  109. package/front_end/ui/components/docs/text_prompt/basic.html +35 -0
  110. package/front_end/ui/components/docs/text_prompt/basic.ts +19 -0
  111. package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +1 -0
  112. package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +17 -0
  113. package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +1 -0
  114. package/front_end/ui/components/text_editor/TextEditor.ts +161 -0
  115. package/front_end/ui/components/text_editor/config.ts +264 -0
  116. package/front_end/{panels/console/components/components.ts → ui/components/text_editor/text_editor.ts} +2 -5
  117. package/front_end/ui/components/text_editor/theme.ts +113 -0
  118. package/front_end/ui/components/text_prompt/TextPrompt.ts +144 -0
  119. package/front_end/ui/components/text_prompt/textPrompt.css +33 -0
  120. package/front_end/ui/components/text_prompt/text_prompt.ts +9 -0
  121. package/front_end/ui/legacy/ARIAUtils.ts +14 -11
  122. package/front_end/ui/legacy/TabbedPane.ts +32 -3
  123. package/front_end/ui/legacy/UIUtils.ts +3 -1
  124. package/front_end/ui/legacy/View.ts +6 -0
  125. package/front_end/ui/legacy/ViewManager.ts +5 -1
  126. package/front_end/ui/legacy/ViewRegistration.ts +5 -0
  127. package/front_end/ui/legacy/XLink.ts +1 -1
  128. package/front_end/ui/legacy/closeButton.css +6 -0
  129. package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +8 -3
  130. package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +38 -38
  131. package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +10 -4
  132. package/front_end/ui/legacy/components/quick_open/QuickOpen.ts +23 -6
  133. package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +14 -16
  134. package/front_end/ui/legacy/filter.css +1 -0
  135. package/front_end/ui/legacy/tabbedPane.css +24 -0
  136. package/front_end/ui/legacy/toolbar.css +5 -0
  137. package/inspector_overlay/main.ts +2 -1
  138. package/inspector_overlay/tool_screenshot.ts +8 -1
  139. package/package.json +1 -1
  140. package/scripts/build/rollup.config.js +9 -0
  141. package/scripts/migration/class-fields/migrate.js +56 -0
  142. package/scripts/migration/class-fields/package.json +5 -0
  143. package/front_end/panels/console/components/SidebarDeprecation.ts +0 -58
  144. package/front_end/panels/console/components/sidebarDeprecation.css +0 -17
@@ -38,23 +38,23 @@
38
38
  import {Cookie, Type} from './Cookie.js';
39
39
 
40
40
  export class CookieParser {
41
- private readonly domain: string|undefined;
42
- private cookiesInternal: Cookie[];
43
- private input!: string|undefined;
44
- private originalInputLength: number;
45
- private lastCookie?: Cookie|null;
46
- private lastCookieLine?: string;
47
- private lastCookiePosition?: number;
41
+ readonly #domain: string|undefined;
42
+ #cookiesInternal: Cookie[];
43
+ #input!: string|undefined;
44
+ #originalInputLength: number;
45
+ #lastCookie?: Cookie|null;
46
+ #lastCookieLine?: string;
47
+ #lastCookiePosition?: number;
48
48
  constructor(domain?: string) {
49
49
  if (domain) {
50
- // Handle domain according to
50
+ // Handle #domain according to
51
51
  // https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-5.3.3
52
- this.domain = domain.toLowerCase().replace(/^\./, '');
52
+ this.#domain = domain.toLowerCase().replace(/^\./, '');
53
53
  }
54
54
 
55
- this.cookiesInternal = [];
55
+ this.#cookiesInternal = [];
56
56
 
57
- this.originalInputLength = 0;
57
+ this.#originalInputLength = 0;
58
58
  }
59
59
 
60
60
  static parseSetCookie(header: string|undefined, domain?: string): Cookie[]|null {
@@ -62,7 +62,7 @@ export class CookieParser {
62
62
  }
63
63
 
64
64
  cookies(): Cookie[] {
65
- return this.cookiesInternal;
65
+ return this.#cookiesInternal;
66
66
  }
67
67
 
68
68
  parseSetCookie(setCookieHeader: string|undefined): Cookie[]|null {
@@ -70,8 +70,8 @@ export class CookieParser {
70
70
  return null;
71
71
  }
72
72
  for (let kv = this.extractKeyValue(); kv; kv = this.extractKeyValue()) {
73
- if (this.lastCookie) {
74
- this.lastCookie.addAttribute(kv.key, kv.value);
73
+ if (this.#lastCookie) {
74
+ this.#lastCookie.addAttribute(kv.key, kv.value);
75
75
  } else {
76
76
  this.addCookie(kv, Type.Response);
77
77
  }
@@ -80,36 +80,36 @@ export class CookieParser {
80
80
  }
81
81
  }
82
82
  this.flushCookie();
83
- return this.cookiesInternal;
83
+ return this.#cookiesInternal;
84
84
  }
85
85
 
86
86
  private initialize(headerValue: string|undefined): boolean {
87
- this.input = headerValue;
87
+ this.#input = headerValue;
88
88
 
89
89
  if (typeof headerValue !== 'string') {
90
90
  return false;
91
91
  }
92
92
 
93
- this.cookiesInternal = [];
94
- this.lastCookie = null;
95
- this.lastCookieLine = '';
96
- this.originalInputLength = (this.input as string).length;
93
+ this.#cookiesInternal = [];
94
+ this.#lastCookie = null;
95
+ this.#lastCookieLine = '';
96
+ this.#originalInputLength = (this.#input as string).length;
97
97
  return true;
98
98
  }
99
99
 
100
100
  private flushCookie(): void {
101
- if (this.lastCookie) {
101
+ if (this.#lastCookie) {
102
102
  // if we have a last cookie we know that these valeus all exist, hence the typecasts
103
- this.lastCookie.setSize(
104
- this.originalInputLength - (this.input as string).length - (this.lastCookiePosition as number));
105
- this.lastCookie.setCookieLine((this.lastCookieLine as string).replace('\n', ''));
103
+ this.#lastCookie.setSize(
104
+ this.#originalInputLength - (this.#input as string).length - (this.#lastCookiePosition as number));
105
+ this.#lastCookie.setCookieLine((this.#lastCookieLine as string).replace('\n', ''));
106
106
  }
107
- this.lastCookie = null;
108
- this.lastCookieLine = '';
107
+ this.#lastCookie = null;
108
+ this.#lastCookieLine = '';
109
109
  }
110
110
 
111
111
  private extractKeyValue(): KeyValue|null {
112
- if (!this.input || !this.input.length) {
112
+ if (!this.#input || !this.#input.length) {
113
113
  return null;
114
114
  }
115
115
  // Note: RFCs offer an option for quoted values that may contain commas and semicolons.
@@ -117,48 +117,48 @@ export class CookieParser {
117
117
  // and http://crbug.com/12361). The logic below matches latest versions of IE, Firefox,
118
118
  // Chrome and Safari on some old platforms. The latest version of Safari supports quoted
119
119
  // cookie values, though.
120
- const keyValueMatch = /^[ \t]*([^\s=;]+)[ \t]*(?:=[ \t]*([^;\n]*))?/.exec(this.input);
120
+ const keyValueMatch = /^[ \t]*([^=;]+)[ \t]*(?:=[ \t]*([^;\n]*))?/.exec(this.#input);
121
121
  if (!keyValueMatch) {
122
- console.error('Failed parsing cookie header before: ' + this.input);
122
+ console.error('Failed parsing cookie header before: ' + this.#input);
123
123
  return null;
124
124
  }
125
125
 
126
126
  const result = new KeyValue(
127
- keyValueMatch[1], keyValueMatch[2] && keyValueMatch[2].trim(),
128
- (this.originalInputLength as number) - this.input.length);
129
- this.lastCookieLine += keyValueMatch[0];
130
- this.input = this.input.slice(keyValueMatch[0].length);
127
+ keyValueMatch[1] && keyValueMatch[1].trim(), keyValueMatch[2] && keyValueMatch[2].trim(),
128
+ (this.#originalInputLength as number) - this.#input.length);
129
+ this.#lastCookieLine += keyValueMatch[0];
130
+ this.#input = this.#input.slice(keyValueMatch[0].length);
131
131
  return result;
132
132
  }
133
133
 
134
134
  private advanceAndCheckCookieDelimiter(): boolean {
135
- if (!this.input) {
135
+ if (!this.#input) {
136
136
  return false;
137
137
  }
138
138
 
139
- const match = /^\s*[\n;]\s*/.exec(this.input);
139
+ const match = /^\s*[\n;]\s*/.exec(this.#input);
140
140
  if (!match) {
141
141
  return false;
142
142
  }
143
- this.lastCookieLine += match[0];
144
- this.input = this.input.slice(match[0].length);
143
+ this.#lastCookieLine += match[0];
144
+ this.#input = this.#input.slice(match[0].length);
145
145
  return match[0].match('\n') !== null;
146
146
  }
147
147
 
148
148
  private addCookie(keyValue: KeyValue, type: Type): void {
149
- if (this.lastCookie) {
150
- this.lastCookie.setSize(keyValue.position - (this.lastCookiePosition as number));
149
+ if (this.#lastCookie) {
150
+ this.#lastCookie.setSize(keyValue.position - (this.#lastCookiePosition as number));
151
151
  }
152
152
 
153
153
  // Mozilla bug 169091: Mozilla, IE and Chrome treat single token (w/o "=") as
154
154
  // specifying a value for a cookie with empty name.
155
- this.lastCookie = typeof keyValue.value === 'string' ? new Cookie(keyValue.key, keyValue.value, type) :
156
- new Cookie('', keyValue.key, type);
157
- if (this.domain) {
158
- this.lastCookie.addAttribute('domain', this.domain);
155
+ this.#lastCookie = typeof keyValue.value === 'string' ? new Cookie(keyValue.key, keyValue.value, type) :
156
+ new Cookie('', keyValue.key, type);
157
+ if (this.#domain) {
158
+ this.#lastCookie.addAttribute('domain', this.#domain);
159
159
  }
160
- this.lastCookiePosition = keyValue.position;
161
- this.cookiesInternal.push(this.lastCookie);
160
+ this.#lastCookiePosition = keyValue.position;
161
+ this.#cookiesInternal.push(this.#lastCookie);
162
162
  }
163
163
  }
164
164