chrome-devtools-frontend 1.0.1006768 → 1.0.1007846

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 (47) hide show
  1. package/config/gni/devtools_grd_files.gni +5 -0
  2. package/config/gni/devtools_image_files.gni +2 -0
  3. package/extension-api/ExtensionAPI.d.ts +10 -0
  4. package/front_end/Images/src/ic_sources_authored.svg +5 -0
  5. package/front_end/Images/src/ic_sources_deployed.svg +5 -0
  6. package/front_end/core/i18n/locales/en-US.json +39 -3
  7. package/front_end/core/i18n/locales/en-XL.json +39 -3
  8. package/front_end/core/sdk/CSSFontFace.ts +8 -0
  9. package/front_end/core/sdk/DebuggerModel.ts +12 -3
  10. package/front_end/core/sdk/NetworkManager.ts +6 -2
  11. package/front_end/devtools_compatibility.js +1 -0
  12. package/front_end/entrypoints/formatter_worker/FormatterActions.ts +1 -0
  13. package/front_end/entrypoints/formatter_worker/ScopeParser.ts +12 -10
  14. package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +4 -0
  15. package/front_end/entrypoints/lighthouse_worker/LighthouseWorkerService.ts +1 -4
  16. package/front_end/legacy_test_runner/lighthouse_test_runner/lighthouse_test_runner.js +16 -0
  17. package/front_end/models/extensions/ExtensionAPI.ts +95 -12
  18. package/front_end/models/extensions/ExtensionEndpoint.ts +69 -0
  19. package/front_end/models/extensions/ExtensionServer.ts +21 -0
  20. package/front_end/models/extensions/LanguageExtensionEndpoint.ts +46 -78
  21. package/front_end/models/extensions/RecorderExtensionEndpoint.ts +43 -0
  22. package/front_end/models/extensions/RecorderPluginManager.ts +30 -0
  23. package/front_end/models/extensions/extensions.ts +2 -0
  24. package/front_end/models/formatter/FormatterWorkerPool.ts +6 -0
  25. package/front_end/models/javascript_metadata/JavaScriptMetadata.ts +13 -20
  26. package/front_end/models/javascript_metadata/NativeFunctions.js +1237 -3962
  27. package/front_end/models/source_map_scopes/NamesResolver.ts +206 -73
  28. package/front_end/models/workspace/UISourceCode.ts +7 -0
  29. package/front_end/panels/application/AppManifestView.ts +2 -1
  30. package/front_end/panels/application/components/BackForwardCacheView.ts +16 -0
  31. package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +15 -1
  32. package/front_end/panels/lighthouse/LighthouseController.ts +25 -10
  33. package/front_end/panels/lighthouse/LighthouseStartView.ts +32 -6
  34. package/front_end/panels/lighthouse/LighthouseStartViewFR.ts +70 -49
  35. package/front_end/panels/network/components/RequestHeadersView.css +36 -3
  36. package/front_end/panels/network/components/RequestHeadersView.ts +176 -3
  37. package/front_end/panels/sources/NavigatorView.ts +141 -40
  38. package/front_end/panels/sources/SourcesPanel.ts +8 -0
  39. package/front_end/panels/sources/TabbedEditorContainer.ts +2 -2
  40. package/front_end/panels/sources/sources-meta.ts +6 -0
  41. package/front_end/ui/components/text_editor/javascript.ts +12 -14
  42. package/front_end/ui/legacy/Treeoutline.ts +5 -2
  43. package/package.json +1 -1
  44. package/scripts/hosted_mode/server.js +14 -1
  45. package/scripts/javascript_natives/helpers.js +26 -7
  46. package/scripts/javascript_natives/index.js +4 -3
  47. package/scripts/javascript_natives/tests.js +2 -2
@@ -93,6 +93,8 @@ grd_files_release_sources = [
93
93
  "front_end/Images/ic_request_response.svg",
94
94
  "front_end/Images/ic_response.svg",
95
95
  "front_end/Images/ic_show_node_16x16.svg",
96
+ "front_end/Images/ic_sources_authored.svg",
97
+ "front_end/Images/ic_sources_deployed.svg",
96
98
  "front_end/Images/ic_suggest_color.svg",
97
99
  "front_end/Images/ic_undo_16x16_icon.svg",
98
100
  "front_end/Images/ic_warning_black_18dp.svg",
@@ -712,11 +714,14 @@ grd_files_debug_sources = [
712
714
  "front_end/models/emulation/DeviceModeModel.js",
713
715
  "front_end/models/emulation/EmulatedDevices.js",
714
716
  "front_end/models/extensions/ExtensionAPI.js",
717
+ "front_end/models/extensions/ExtensionEndpoint.js",
715
718
  "front_end/models/extensions/ExtensionPanel.js",
716
719
  "front_end/models/extensions/ExtensionServer.js",
717
720
  "front_end/models/extensions/ExtensionTraceProvider.js",
718
721
  "front_end/models/extensions/ExtensionView.js",
719
722
  "front_end/models/extensions/LanguageExtensionEndpoint.js",
723
+ "front_end/models/extensions/RecorderExtensionEndpoint.js",
724
+ "front_end/models/extensions/RecorderPluginManager.js",
720
725
  "front_end/models/formatter/FormatterWorkerPool.js",
721
726
  "front_end/models/formatter/ScriptFormatter.js",
722
727
  "front_end/models/formatter/SourceFormatter.js",
@@ -103,6 +103,8 @@ devtools_svg_sources = [
103
103
  "ic_request_response.svg",
104
104
  "ic_response.svg",
105
105
  "ic_show_node_16x16.svg",
106
+ "ic_sources_authored.svg",
107
+ "ic_sources_deployed.svg",
106
108
  "ic_suggest_color.svg",
107
109
  "ic_undo_16x16_icon.svg",
108
110
  "ic_warning_black_18dp.svg",
@@ -94,6 +94,7 @@ export namespace Chrome {
94
94
  panels: Panels;
95
95
  inspectedWindow: InspectedWindow;
96
96
  languageServices: LanguageExtensions;
97
+ recorder: RecorderExtensions;
97
98
  }
98
99
 
99
100
  export interface ExperimentalDevToolsAPI {
@@ -170,6 +171,10 @@ export namespace Chrome {
170
171
  payload: unknown;
171
172
  }
172
173
 
174
+ export interface RecorderExtensionPlugin {
175
+ stringify(obj: Record<string, any>): Promise<string>;
176
+ }
177
+
173
178
  export interface LanguageExtensionPlugin {
174
179
  /**
175
180
  * A new raw module has been loaded. If the raw wasm module references an external debug info module, its URL will be
@@ -272,6 +277,11 @@ export namespace Chrome {
272
277
  unregisterLanguageExtensionPlugin(plugin: LanguageExtensionPlugin): Promise<void>;
273
278
  }
274
279
 
280
+ export interface RecorderExtensions {
281
+ registerRecorderExtensionPlugin(plugin: RecorderExtensionPlugin, pluginName: string): Promise<void>;
282
+ unregisterRecorderExtensionPlugin(plugin: RecorderExtensionPlugin): Promise<void>;
283
+ }
284
+
275
285
  export interface Chrome {
276
286
  devtools: DevToolsAPI;
277
287
  experimental: {devtools: ExperimentalDevToolsAPI};
@@ -0,0 +1,5 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M0.939346 8L4.46968 4.46967C4.76257 4.17678 5.23744 4.17678 5.53034 4.46967C5.82323 4.76256 5.82323 5.23744 5.53034 5.53033L3.06067 8L5.53034 10.4697C5.82323 10.7626 5.82323 11.2374 5.53034 11.5303C5.23744 11.8232 4.76257 11.8232 4.46968 11.5303L0.939346 8Z" fill="black"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M9.48821 2.44593C9.88831 2.55314 10.1257 2.96439 10.0185 3.36449L7.43035 13.0237C7.32314 13.4238 6.91189 13.6613 6.51179 13.5541C6.11169 13.4469 5.87425 13.0356 5.98146 12.6355L8.56965 2.97626C8.67686 2.57616 9.08811 2.33872 9.48821 2.44593Z" fill="black"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M15.0607 8L11.5303 4.46967C11.2374 4.17678 10.7626 4.17678 10.4697 4.46967C10.1768 4.76256 10.1768 5.23744 10.4697 5.53033L12.9393 8L10.4697 10.4697C10.1768 10.7626 10.1768 11.2374 10.4697 11.5303C10.7626 11.8232 11.2374 11.8232 11.5303 11.5303L15.0607 8Z" fill="black"/>
5
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M2 5L8 7.5L14 5L8 2.5L2 5Z" fill="black"/>
3
+ <path d="M14 6L8.5 8.5V14.5L14 12V6Z" fill="black"/>
4
+ <path d="M2 6L7.5 8.5V14.5L2 12V6Z" fill="black"/>
5
+ </svg>
@@ -254,6 +254,9 @@
254
254
  "core/sdk/DebuggerModel.ts | block": {
255
255
  "message": "Block"
256
256
  },
257
+ "core/sdk/DebuggerModel.ts | catchBlock": {
258
+ "message": "Catch block"
259
+ },
257
260
  "core/sdk/DebuggerModel.ts | closure": {
258
261
  "message": "Closure"
259
262
  },
@@ -273,7 +276,7 @@
273
276
  "message": "Script"
274
277
  },
275
278
  "core/sdk/DebuggerModel.ts | withBlock": {
276
- "message": "With Block"
279
+ "message": "With block"
277
280
  },
278
281
  "core/sdk/DOMDebuggerModel.ts | animation": {
279
282
  "message": "Animation"
@@ -2939,6 +2942,9 @@
2939
2942
  "panels/application/components/BackForwardCacheView.ts | mainFrame": {
2940
2943
  "message": "Main Frame"
2941
2944
  },
2945
+ "panels/application/components/BackForwardCacheView.ts | neverUseUnload": {
2946
+ "message": "Learn more: Never use unload handler"
2947
+ },
2942
2948
  "panels/application/components/BackForwardCacheView.ts | normalNavigation": {
2943
2949
  "message": "Not served from back/forward cache: to trigger back/forward cache, use Chrome's back/forward buttons, or use the test button below to automatically navigate away and back."
2944
2950
  },
@@ -3797,6 +3803,9 @@
3797
3803
  "panels/browser_debugger/DOMBreakpointsSidebarPane.ts | sS": {
3798
3804
  "message": "{PH1}: {PH2}"
3799
3805
  },
3806
+ "panels/browser_debugger/DOMBreakpointsSidebarPane.ts | sSS": {
3807
+ "message": "{PH1}: {PH2}, {PH3}"
3808
+ },
3800
3809
  "panels/browser_debugger/DOMBreakpointsSidebarPane.ts | subtreeModified": {
3801
3810
  "message": "Subtree modified"
3802
3811
  },
@@ -5945,6 +5954,9 @@
5945
5954
  "panels/lighthouse/LighthouseController.ts | desktop": {
5946
5955
  "message": "Desktop"
5947
5956
  },
5957
+ "panels/lighthouse/LighthouseController.ts | devtoolsThrottling": {
5958
+ "message": "DevTools throttling (advanced)"
5959
+ },
5948
5960
  "panels/lighthouse/LighthouseController.ts | doesThisPageFollowBestPractices": {
5949
5961
  "message": "Does this page follow best practices for modern web development"
5950
5962
  },
@@ -6009,10 +6021,10 @@
6009
6021
  "message": "SEO"
6010
6022
  },
6011
6023
  "panels/lighthouse/LighthouseController.ts | simulateASlowerPageLoadBasedOn": {
6012
- "message": "Simulate a slower page load, based on data from an initial unthrottled load. If disabled, the page is actually slowed with applied throttling."
6024
+ "message": "Simulated throttling simulates a slower page load based on data from an initial unthrottled load. DevTools throttling actually slows down the page."
6013
6025
  },
6014
6026
  "panels/lighthouse/LighthouseController.ts | simulatedThrottling": {
6015
- "message": "Simulated throttling"
6027
+ "message": "Simulated throttling (default)"
6016
6028
  },
6017
6029
  "panels/lighthouse/LighthouseController.ts | snapshot": {
6018
6030
  "message": "Snapshot"
@@ -6026,6 +6038,9 @@
6026
6038
  "panels/lighthouse/LighthouseController.ts | thereMayBeStoredDataAffectingSingular": {
6027
6039
  "message": "There may be stored data affecting loading performance in this location: {PH1}. Audit this page in an incognito window to prevent those resources from affecting your scores."
6028
6040
  },
6041
+ "panels/lighthouse/LighthouseController.ts | throttlingMethod": {
6042
+ "message": "Throttling method"
6043
+ },
6029
6044
  "panels/lighthouse/LighthouseController.ts | timespan": {
6030
6045
  "message": "Timespan"
6031
6046
  },
@@ -6626,18 +6641,30 @@
6626
6641
  "panels/network/components/RequestHeadersView.ts | general": {
6627
6642
  "message": "General"
6628
6643
  },
6644
+ "panels/network/components/RequestHeadersView.ts | raw": {
6645
+ "message": "Raw"
6646
+ },
6629
6647
  "panels/network/components/RequestHeadersView.ts | referrerPolicy": {
6630
6648
  "message": "Referrer Policy"
6631
6649
  },
6632
6650
  "panels/network/components/RequestHeadersView.ts | remoteAddress": {
6633
6651
  "message": "Remote Address"
6634
6652
  },
6653
+ "panels/network/components/RequestHeadersView.ts | requestHeaders": {
6654
+ "message": "Request Headers"
6655
+ },
6635
6656
  "panels/network/components/RequestHeadersView.ts | requestMethod": {
6636
6657
  "message": "Request Method"
6637
6658
  },
6638
6659
  "panels/network/components/RequestHeadersView.ts | requestUrl": {
6639
6660
  "message": "Request URL"
6640
6661
  },
6662
+ "panels/network/components/RequestHeadersView.ts | responseHeaders": {
6663
+ "message": "Response Headers"
6664
+ },
6665
+ "panels/network/components/RequestHeadersView.ts | showMore": {
6666
+ "message": "Show more"
6667
+ },
6641
6668
  "panels/network/components/RequestHeadersView.ts | statusCode": {
6642
6669
  "message": "Status Code"
6643
6670
  },
@@ -9758,12 +9785,18 @@
9758
9785
  "panels/sources/NavigatorView.ts | areYouSureYouWantToRemoveThis": {
9759
9786
  "message": "Are you sure you want to remove this folder?"
9760
9787
  },
9788
+ "panels/sources/NavigatorView.ts | authored": {
9789
+ "message": "Authored"
9790
+ },
9761
9791
  "panels/sources/NavigatorView.ts | delete": {
9762
9792
  "message": "Delete"
9763
9793
  },
9764
9794
  "panels/sources/NavigatorView.ts | deleteAllOverrides": {
9765
9795
  "message": "Delete all overrides"
9766
9796
  },
9797
+ "panels/sources/NavigatorView.ts | deployed": {
9798
+ "message": "Deployed"
9799
+ },
9767
9800
  "panels/sources/NavigatorView.ts | excludeFolder": {
9768
9801
  "message": "Exclude folder"
9769
9802
  },
@@ -10193,6 +10226,9 @@
10193
10226
  "panels/sources/SourcesPanel.ts | dropWorkspaceFolderHere": {
10194
10227
  "message": "Drop workspace folder here"
10195
10228
  },
10229
+ "panels/sources/SourcesPanel.ts | groupByAuthored": {
10230
+ "message": "Group by Authored/Deployed (experimental)"
10231
+ },
10196
10232
  "panels/sources/SourcesPanel.ts | groupByFolder": {
10197
10233
  "message": "Group by folder"
10198
10234
  },
@@ -254,6 +254,9 @@
254
254
  "core/sdk/DebuggerModel.ts | block": {
255
255
  "message": "B̂ĺôćk̂"
256
256
  },
257
+ "core/sdk/DebuggerModel.ts | catchBlock": {
258
+ "message": "Catch b̂ĺôćk̂"
259
+ },
257
260
  "core/sdk/DebuggerModel.ts | closure": {
258
261
  "message": "Ĉĺôśûŕê"
259
262
  },
@@ -273,7 +276,7 @@
273
276
  "message": "Ŝćr̂íp̂t́"
274
277
  },
275
278
  "core/sdk/DebuggerModel.ts | withBlock": {
276
- "message": "With B̂ĺôćk̂"
279
+ "message": "With b̂ĺôćk̂"
277
280
  },
278
281
  "core/sdk/DOMDebuggerModel.ts | animation": {
279
282
  "message": "Âńîḿât́îón̂"
@@ -2939,6 +2942,9 @@
2939
2942
  "panels/application/components/BackForwardCacheView.ts | mainFrame": {
2940
2943
  "message": "M̂áîń F̂ŕâḿê"
2941
2944
  },
2945
+ "panels/application/components/BackForwardCacheView.ts | neverUseUnload": {
2946
+ "message": "L̂éâŕn̂ ḿôŕê: Ńêv́êŕ ûśê ún̂ĺôád̂ h́âńd̂ĺêŕ"
2947
+ },
2942
2948
  "panels/application/components/BackForwardCacheView.ts | normalNavigation": {
2943
2949
  "message": "N̂ót̂ śêŕv̂éd̂ f́r̂óm̂ b́âćk̂/f́ôŕŵár̂d́ ĉáĉh́ê: t́ô t́r̂íĝǵêŕ b̂áĉḱ/f̂ór̂ẃâŕd̂ ćâćĥé, ûśê Ćĥŕôḿê'ś b̂áĉḱ/f̂ór̂ẃâŕd̂ b́ût́t̂ón̂ś, ôŕ ûśê t́ĥé t̂éŝt́ b̂út̂t́ôń b̂él̂óŵ t́ô áût́ôḿât́îćâĺl̂ý n̂áv̂íĝát̂é âẃâý âńd̂ b́âćk̂."
2944
2950
  },
@@ -3797,6 +3803,9 @@
3797
3803
  "panels/browser_debugger/DOMBreakpointsSidebarPane.ts | sS": {
3798
3804
  "message": "{PH1}: {PH2}"
3799
3805
  },
3806
+ "panels/browser_debugger/DOMBreakpointsSidebarPane.ts | sSS": {
3807
+ "message": "{PH1}: {PH2}, {PH3}"
3808
+ },
3800
3809
  "panels/browser_debugger/DOMBreakpointsSidebarPane.ts | subtreeModified": {
3801
3810
  "message": "Ŝúb̂t́r̂éê ḿôd́îf́îéd̂"
3802
3811
  },
@@ -5945,6 +5954,9 @@
5945
5954
  "panels/lighthouse/LighthouseController.ts | desktop": {
5946
5955
  "message": "D̂éŝḱt̂óp̂"
5947
5956
  },
5957
+ "panels/lighthouse/LighthouseController.ts | devtoolsThrottling": {
5958
+ "message": "D̂év̂T́ôól̂ś t̂h́r̂ót̂t́l̂ín̂ǵ (âd́v̂án̂ćêd́)"
5959
+ },
5948
5960
  "panels/lighthouse/LighthouseController.ts | doesThisPageFollowBestPractices": {
5949
5961
  "message": "D̂óêś t̂h́îś p̂áĝé f̂ól̂ĺôẃ b̂éŝt́ p̂ŕâćt̂íĉéŝ f́ôŕ m̂ód̂ér̂ń ŵéb̂ d́êv́êĺôṕm̂én̂t́"
5950
5962
  },
@@ -6009,10 +6021,10 @@
6009
6021
  "message": "ŜÉÔ"
6010
6022
  },
6011
6023
  "panels/lighthouse/LighthouseController.ts | simulateASlowerPageLoadBasedOn": {
6012
- "message": "Ŝím̂úl̂át̂é â śl̂óŵér̂ ṕâǵê ĺôád̂, b́âśêd́ ôń d̂át̂á f̂ŕôḿ âń îńît́îál̂ ún̂t́ĥŕôt́t̂ĺêd́ l̂óâd́. Îf́ d̂íŝáb̂ĺêd́, t̂h́ê ṕâǵê ŝ áĉt́ûál̂ĺl̂óŵéd̂ ît́ĥ ṕl̂êd́ t̂h́r̂ót̂t́l̂ín̂ǵ."
6024
+ "message": "Ŝím̂úl̂át̂é t́ĥŕôt́t̂ĺîńĝ śîḿûĺt́êś śl̂óŵér̂ ṕâǵê ĺôád̂ b́âśêd́ ôń d̂át̂á f̂ŕôḿ âń îńît́îál̂ ún̂t́ĥŕôt́t̂ĺêd́ l̂óâd́. D̂év̂T́ôól̂ś t̂h́r̂ót̂t́l̂ín̂ âćt̂úâĺl̂ý ŝĺôẃŝ d́ôẃn̂ t́ĥáĝé."
6013
6025
  },
6014
6026
  "panels/lighthouse/LighthouseController.ts | simulatedThrottling": {
6015
- "message": "Ŝím̂úl̂át̂éd̂ t́ĥŕôt́t̂ĺîńĝ"
6027
+ "message": "Ŝím̂úl̂át̂éd̂ t́ĥŕôt́t̂ĺîńĝ (d́êf́âúl̂t́)"
6016
6028
  },
6017
6029
  "panels/lighthouse/LighthouseController.ts | snapshot": {
6018
6030
  "message": "Ŝńâṕŝh́ôt́"
@@ -6026,6 +6038,9 @@
6026
6038
  "panels/lighthouse/LighthouseController.ts | thereMayBeStoredDataAffectingSingular": {
6027
6039
  "message": "T̂h́êŕê ḿâý b̂é ŝt́ôŕêd́ d̂át̂á âf́f̂éĉt́îńĝ ĺôád̂ín̂ǵ p̂ér̂f́ôŕm̂án̂ćê ín̂ t́ĥíŝ ĺôćât́îón̂: {PH1}. Áûd́ît́ t̂h́îś p̂áĝé îń âń îńĉóĝńît́ô ẃîńd̂óŵ t́ô ṕr̂év̂én̂t́ t̂h́ôśê ŕêśôúr̂ćêś f̂ŕôḿ âf́f̂éĉt́îńĝ ýôúr̂ śĉór̂éŝ."
6028
6040
  },
6041
+ "panels/lighthouse/LighthouseController.ts | throttlingMethod": {
6042
+ "message": "T̂h́r̂ót̂t́l̂ín̂ǵ m̂ét̂h́ôd́"
6043
+ },
6029
6044
  "panels/lighthouse/LighthouseController.ts | timespan": {
6030
6045
  "message": "T̂ím̂éŝṕâń"
6031
6046
  },
@@ -6626,18 +6641,30 @@
6626
6641
  "panels/network/components/RequestHeadersView.ts | general": {
6627
6642
  "message": "Ĝén̂ér̂ál̂"
6628
6643
  },
6644
+ "panels/network/components/RequestHeadersView.ts | raw": {
6645
+ "message": "R̂áŵ"
6646
+ },
6629
6647
  "panels/network/components/RequestHeadersView.ts | referrerPolicy": {
6630
6648
  "message": "R̂éf̂ér̂ŕêŕ P̂ól̂íĉý"
6631
6649
  },
6632
6650
  "panels/network/components/RequestHeadersView.ts | remoteAddress": {
6633
6651
  "message": "R̂ém̂ót̂é Âd́d̂ŕêśŝ"
6634
6652
  },
6653
+ "panels/network/components/RequestHeadersView.ts | requestHeaders": {
6654
+ "message": "R̂éq̂úêśt̂ H́êád̂ér̂ś"
6655
+ },
6635
6656
  "panels/network/components/RequestHeadersView.ts | requestMethod": {
6636
6657
  "message": "R̂éq̂úêśt̂ Ḿêt́ĥód̂"
6637
6658
  },
6638
6659
  "panels/network/components/RequestHeadersView.ts | requestUrl": {
6639
6660
  "message": "R̂éq̂úêśt̂ ÚR̂Ĺ"
6640
6661
  },
6662
+ "panels/network/components/RequestHeadersView.ts | responseHeaders": {
6663
+ "message": "R̂éŝṕôńŝé Ĥéâd́êŕŝ"
6664
+ },
6665
+ "panels/network/components/RequestHeadersView.ts | showMore": {
6666
+ "message": "Ŝh́ôẃ m̂ór̂é"
6667
+ },
6641
6668
  "panels/network/components/RequestHeadersView.ts | statusCode": {
6642
6669
  "message": "Ŝt́ât́ûś Ĉód̂é"
6643
6670
  },
@@ -9758,12 +9785,18 @@
9758
9785
  "panels/sources/NavigatorView.ts | areYouSureYouWantToRemoveThis": {
9759
9786
  "message": "Âŕê ýôú ŝúr̂é ŷóû ẃâńt̂ t́ô ŕêḿôv́ê t́ĥíŝ f́ôĺd̂ér̂?"
9760
9787
  },
9788
+ "panels/sources/NavigatorView.ts | authored": {
9789
+ "message": "Âút̂h́ôŕêd́"
9790
+ },
9761
9791
  "panels/sources/NavigatorView.ts | delete": {
9762
9792
  "message": "D̂él̂ét̂é"
9763
9793
  },
9764
9794
  "panels/sources/NavigatorView.ts | deleteAllOverrides": {
9765
9795
  "message": "D̂él̂ét̂é âĺl̂ óv̂ér̂ŕîd́êś"
9766
9796
  },
9797
+ "panels/sources/NavigatorView.ts | deployed": {
9798
+ "message": "D̂ép̂ĺôýêd́"
9799
+ },
9767
9800
  "panels/sources/NavigatorView.ts | excludeFolder": {
9768
9801
  "message": "Êx́ĉĺûd́ê f́ôĺd̂ér̂"
9769
9802
  },
@@ -10193,6 +10226,9 @@
10193
10226
  "panels/sources/SourcesPanel.ts | dropWorkspaceFolderHere": {
10194
10227
  "message": "D̂ŕôṕ ŵór̂ḱŝṕâćê f́ôĺd̂ér̂ h́êŕê"
10195
10228
  },
10229
+ "panels/sources/SourcesPanel.ts | groupByAuthored": {
10230
+ "message": "Ĝŕôúp̂ b́ŷ Áût́ĥór̂éd̂/D́êṕl̂óŷéd̂ (éx̂ṕêŕîḿêńt̂ál̂)"
10231
+ },
10196
10232
  "panels/sources/SourcesPanel.ts | groupByFolder": {
10197
10233
  "message": "Ĝŕôúp̂ b́ŷ f́ôĺd̂ér̂"
10198
10234
  },
@@ -3,15 +3,19 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  import type * as Protocol from '../../generated/protocol.js';
6
+ import type * as Platform from '../platform/platform.js';
6
7
 
7
8
  export class CSSFontFace {
8
9
  readonly #fontFamily: string;
9
10
  readonly #fontVariationAxes: Protocol.CSS.FontVariationAxis[];
10
11
  readonly #fontVariationAxesByTag: Map<string, Protocol.CSS.FontVariationAxis>;
12
+ readonly #src: Platform.DevToolsPath.UrlString;
13
+
11
14
  constructor(payload: Protocol.CSS.FontFace) {
12
15
  this.#fontFamily = payload.fontFamily;
13
16
  this.#fontVariationAxes = payload.fontVariationAxes || [];
14
17
  this.#fontVariationAxesByTag = new Map();
18
+ this.#src = payload.src as Platform.DevToolsPath.UrlString;
15
19
  for (const axis of this.#fontVariationAxes) {
16
20
  this.#fontVariationAxesByTag.set(axis.tag, axis);
17
21
  }
@@ -21,6 +25,10 @@ export class CSSFontFace {
21
25
  return this.#fontFamily;
22
26
  }
23
27
 
28
+ getSrc(): Platform.DevToolsPath.UrlString {
29
+ return this.#src;
30
+ }
31
+
24
32
  getVariationAxisByTag(tag: string): Protocol.CSS.FontVariationAxis|undefined {
25
33
  return this.#fontVariationAxesByTag.get(tag);
26
34
  }
@@ -70,9 +70,16 @@ const UIStrings = {
70
70
  script: 'Script',
71
71
  /**
72
72
  *@description Title of a section in the debugger showing JavaScript variables from the a 'with'
73
- *block. Block here means section of code, 'with' refers to a JavaScript programming concept.
73
+ *block. Block here means section of code, 'with' refers to a JavaScript programming concept and
74
+ *is a fixed term.
74
75
  */
75
- withBlock: '`With` Block',
76
+ withBlock: '`With` block',
77
+ /**
78
+ *@description Title of a section in the debugger showing JavaScript variables from the a 'catch'
79
+ *block. Block here means section of code, 'catch' refers to a JavaScript programming concept and
80
+ *is a fixed term.
81
+ */
82
+ catchBlock: '`Catch` block',
76
83
  /**
77
84
  *@description Title of a section in the debugger showing JavaScript variables from the global scope.
78
85
  */
@@ -1464,7 +1471,9 @@ export class Scope implements ScopeChainEntry {
1464
1471
  case Protocol.Debugger.ScopeType.Closure:
1465
1472
  return i18nString(UIStrings.closure);
1466
1473
  case Protocol.Debugger.ScopeType.Catch:
1467
- return i18n.i18n.lockedString('Catch');
1474
+ return i18nString(UIStrings.catchBlock);
1475
+ case Protocol.Debugger.ScopeType.Eval:
1476
+ return i18n.i18n.lockedString('Eval');
1468
1477
  case Protocol.Debugger.ScopeType.Block:
1469
1478
  return i18nString(UIStrings.block);
1470
1479
  case Protocol.Debugger.ScopeType.Script:
@@ -255,6 +255,10 @@ export class NetworkManager extends SDKModel<EventTypes> {
255
255
  return this.dispatcher.requestForURL(url);
256
256
  }
257
257
 
258
+ requestforId(id: string): NetworkRequest|null {
259
+ return this.dispatcher.requestForId(id);
260
+ }
261
+
258
262
  private cacheDisabledSettingChanged({data: enabled}: Common.EventTarget.EventTargetEvent<boolean>): void {
259
263
  void this.#networkAgent.invoke_setCacheDisabled({cacheDisabled: enabled});
260
264
  }
@@ -520,8 +524,8 @@ export class NetworkDispatcher implements ProtocolProxyApi.NetworkDispatcher {
520
524
  }
521
525
  }
522
526
 
523
- requestForId(url: string): NetworkRequest|null {
524
- return this.#requestsById.get(url) || null;
527
+ requestForId(id: string): NetworkRequest|null {
528
+ return this.#requestsById.get(id) || null;
525
529
  }
526
530
 
527
531
  requestForURL(url: Platform.DevToolsPath.UrlString): NetworkRequest|null {
@@ -1098,6 +1098,7 @@
1098
1098
  'messageLevelFilters',
1099
1099
  'messageURLFilters',
1100
1100
  'monitoringXHREnabled',
1101
+ 'navigatorGroupByAuthored',
1101
1102
  'navigatorGroupByFolder',
1102
1103
  'navigatorHidden',
1103
1104
  'networkColorCodeResourceTypes',
@@ -9,6 +9,7 @@ export const enum FormatterActions {
9
9
  JAVASCRIPT_OUTLINE = 'javaScriptOutline',
10
10
  JAVASCRIPT_IDENTIFIERS = 'javaScriptIdentifiers',
11
11
  JAVASCRIPT_SUBSTITUTE = 'javaScriptSubstitute',
12
+ JAVASCRIPT_SCOPE_TREE = 'javaScriptScopeTree',
12
13
  EVALUATE_JAVASCRIPT_SUBSTRING = 'evaluatableJavaScriptSubstring',
13
14
  ARGUMENTS_LIST = 'argumentsList',
14
15
  }
@@ -171,7 +171,12 @@ export class ScopeVariableAnalysis {
171
171
  case 'ArrowFunctionExpression': {
172
172
  this.#pushScope(node.start, node.end);
173
173
  node.params.forEach(this.#processNodeAsDefinition.bind(this, DefinitionKind.Var));
174
- this.#processNode(node.body);
174
+ if (node.body.type === 'BlockStatement') {
175
+ // Include the body of the arrow function in the same scope as the arguments.
176
+ node.body.body.forEach(this.#processNode.bind(this));
177
+ } else {
178
+ this.#processNode(node.body);
179
+ }
175
180
  this.#popScope(true);
176
181
  break;
177
182
  }
@@ -199,7 +204,7 @@ export class ScopeVariableAnalysis {
199
204
  case 'CatchClause':
200
205
  this.#pushScope(node.start, node.end);
201
206
  this.#processNodeAsDefinition(DefinitionKind.Let, node.param);
202
- node.body.body.forEach(this.#processNode.bind(this));
207
+ this.#processNode(node.body);
203
208
  this.#popScope(false);
204
209
  break;
205
210
  case 'ClassBody':
@@ -207,17 +212,13 @@ export class ScopeVariableAnalysis {
207
212
  break;
208
213
  case 'ClassDeclaration':
209
214
  this.#processNodeAsDefinition(DefinitionKind.Let, node.id);
210
- this.#pushScope(node.start, node.end);
211
215
  this.#processNode(node.superClass ?? null);
212
216
  this.#processNode(node.body);
213
- this.#popScope(false);
214
217
  break;
215
218
  case 'ClassExpression':
216
- this.#pushScope(node.start, node.end);
217
219
  // Intentionally ignore the id.
218
220
  this.#processNode(node.superClass ?? null);
219
221
  this.#processNode(node.body);
220
- this.#popScope(false);
221
222
  break;
222
223
  case 'ChainExpression':
223
224
  this.#processNode(node.expression);
@@ -253,16 +254,17 @@ export class ScopeVariableAnalysis {
253
254
  this.#addVariable('this', node.start, DefinitionKind.Fixed);
254
255
  this.#addVariable('arguments', node.start, DefinitionKind.Fixed);
255
256
  node.params.forEach(this.#processNodeAsDefinition.bind(this, DefinitionKind.Let));
256
- this.#processNode(node.body);
257
+ // Process the body of the block statement directly to avoid creating new scope.
258
+ node.body.body.forEach(this.#processNode.bind(this));
257
259
  this.#popScope(true);
258
260
  break;
259
261
  case 'FunctionExpression':
260
- // Id is intentionally ignored in function expressions.
261
- this.#pushScope(node.start, node.end);
262
+ this.#pushScope(node.id?.end ?? node.start, node.end);
262
263
  this.#addVariable('this', node.start, DefinitionKind.Fixed);
263
264
  this.#addVariable('arguments', node.start, DefinitionKind.Fixed);
264
265
  node.params.forEach(this.#processNodeAsDefinition.bind(this, DefinitionKind.Let));
265
- this.#processNode(node.body);
266
+ // Process the body of the block statement directly to avoid creating new scope.
267
+ node.body.body.forEach(this.#processNode.bind(this));
266
268
  this.#popScope(true);
267
269
  break;
268
270
  case 'Identifier':
@@ -37,6 +37,10 @@ self.onmessage = function(event: MessageEvent): void {
37
37
  self.postMessage(FormatterWorker.Substitute.substituteExpression(params.content, mapping));
38
38
  break;
39
39
  }
40
+ case FormatterActions.JAVASCRIPT_SCOPE_TREE: {
41
+ self.postMessage(FormatterWorker.ScopeParser.parseScopes(params.content)?.export());
42
+ break;
43
+ }
40
44
  case FormatterActions.EVALUATE_JAVASCRIPT_SUBSTRING:
41
45
  self.postMessage(FormatterWorker.FormatterWorker.evaluatableJavaScriptSubstring(params.content));
42
46
  break;
@@ -143,10 +143,7 @@ async function invokeLH(action: string, args: any): Promise<unknown> {
143
143
  const {page} = puppeteerConnection;
144
144
  const configContext = {
145
145
  logLevel: flags.logLevel,
146
- settingsOverrides: {
147
- channel: flags.channel,
148
- locale: flags.locale,
149
- },
146
+ settingsOverrides: flags,
150
147
  };
151
148
 
152
149
  if (action === 'snapshot') {
@@ -100,6 +100,18 @@ LighthouseTestRunner._checkboxStateLabel = function(checkboxContainer) {
100
100
  return `[${checkedLabel}] ${label}`;
101
101
  };
102
102
 
103
+ /**
104
+ * @param {?Element} combobox
105
+ * @return {string}
106
+ */
107
+ LighthouseTestRunner._comboboxStateLabel = function(combobox) {
108
+ if (!combobox) {
109
+ return 'missing';
110
+ }
111
+
112
+ return `${combobox.ariaLabel}: ${combobox.value}`;
113
+ };
114
+
103
115
  /**
104
116
  * @param {?Element} button
105
117
  * @return {string}
@@ -130,6 +142,10 @@ LighthouseTestRunner.dumpStartAuditState = function() {
130
142
  TestRunner.addResult(LighthouseTestRunner._checkboxStateLabel(element));
131
143
  });
132
144
 
145
+ for (const combobox of toolbarShadowRoot.querySelectorAll('select')) {
146
+ TestRunner.addResult(LighthouseTestRunner._comboboxStateLabel(combobox));
147
+ }
148
+
133
149
  const helpText = containerElement.querySelector('.lighthouse-help-text');
134
150
  if (!helpText.classList.contains('hidden')) {
135
151
  TestRunner.addResult(`Help text: ${helpText.textContent}`);