chrome-devtools-frontend 1.0.1012379 → 1.0.1013298

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 (35) hide show
  1. package/config/gni/devtools_grd_files.gni +3 -0
  2. package/front_end/core/host/UserMetrics.ts +4 -2
  3. package/front_end/core/i18n/locales/en-US.json +38 -2
  4. package/front_end/core/i18n/locales/en-XL.json +38 -2
  5. package/front_end/core/root/Runtime.ts +1 -0
  6. package/front_end/core/sdk/CSSFontFace.ts +6 -0
  7. package/front_end/entrypoints/main/MainImpl.ts +4 -0
  8. package/front_end/generated/InspectorBackendCommands.js +2 -0
  9. package/front_end/generated/protocol.ts +16 -0
  10. package/front_end/panels/application/AppManifestView.ts +12 -1
  11. package/front_end/panels/application/DOMStorageItemsView.ts +5 -5
  12. package/front_end/panels/application/components/ProtocolHandlersView.ts +182 -0
  13. package/front_end/panels/application/components/components.ts +2 -0
  14. package/front_end/panels/application/components/protocolHandlersView.css +39 -0
  15. package/front_end/panels/profiler/HeapSnapshotView.ts +3 -1
  16. package/front_end/panels/sources/NavigatorView.ts +50 -22
  17. package/front_end/panels/sources/SourcesNavigator.ts +45 -1
  18. package/front_end/panels/sources/SourcesPanel.ts +26 -4
  19. package/front_end/panels/sources/navigatorTree.css +4 -0
  20. package/front_end/panels/sources/sourcesNavigator.css +10 -0
  21. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +15 -15
  22. package/front_end/third_party/lighthouse/report/bundle.d.ts +23 -2
  23. package/front_end/third_party/lighthouse/report/bundle.js +45 -19
  24. package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
  25. package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +16 -11
  26. package/front_end/ui/components/linear_memory_inspector/linearMemoryInspector.css +4 -0
  27. package/front_end/ui/components/panel_feedback/PreviewToggle.ts +35 -14
  28. package/front_end/ui/components/panel_feedback/previewToggle.css +21 -1
  29. package/front_end/ui/legacy/ContextMenu.ts +11 -2
  30. package/package.json +1 -1
  31. package/scripts/build/ninja/devtools_entrypoint.gni +3 -3
  32. package/scripts/build/ninja/wasm.gni +25 -0
  33. package/scripts/build/wasm-as.py +87 -0
  34. package/scripts/build/wasm_sourcemap.mjs +22 -0
  35. package/scripts/eslint_rules/lib/lit_template_result_or_nothing.js +6 -0
@@ -314,24 +314,26 @@ class Util {
314
314
  }
315
315
 
316
316
  const MAX_LENGTH = 64;
317
- // Always elide hexadecimal hash
318
- name = name.replace(/([a-f0-9]{7})[a-f0-9]{13}[a-f0-9]*/g, `$1${ELLIPSIS}`);
319
- // Also elide other hash-like mixed-case strings
320
- name = name.replace(/([a-zA-Z0-9-_]{9})(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9-_]{10,}/g,
321
- `$1${ELLIPSIS}`);
322
- // Also elide long number sequences
323
- name = name.replace(/(\d{3})\d{6,}/g, `$1${ELLIPSIS}`);
324
- // Merge any adjacent ellipses
325
- name = name.replace(/\u2026+/g, ELLIPSIS);
326
-
327
- // Elide query params first
328
- if (name.length > MAX_LENGTH && name.includes('?')) {
329
- // Try to leave the first query parameter intact
330
- name = name.replace(/\?([^=]*)(=)?.*/, `?$1$2${ELLIPSIS}`);
331
-
332
- // Remove it all if it's still too long
333
- if (name.length > MAX_LENGTH) {
334
- name = name.replace(/\?.*/, `?${ELLIPSIS}`);
317
+ if (parsedUrl.protocol !== 'data:') {
318
+ // Always elide hexadecimal hash
319
+ name = name.replace(/([a-f0-9]{7})[a-f0-9]{13}[a-f0-9]*/g, `$1${ELLIPSIS}`);
320
+ // Also elide other hash-like mixed-case strings
321
+ name = name.replace(/([a-zA-Z0-9-_]{9})(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9-_]{10,}/g,
322
+ `$1${ELLIPSIS}`);
323
+ // Also elide long number sequences
324
+ name = name.replace(/(\d{3})\d{6,}/g, `$1${ELLIPSIS}`);
325
+ // Merge any adjacent ellipses
326
+ name = name.replace(/\u2026+/g, ELLIPSIS);
327
+
328
+ // Elide query params first
329
+ if (name.length > MAX_LENGTH && name.includes('?')) {
330
+ // Try to leave the first query parameter intact
331
+ name = name.replace(/\?([^=]*)(=)?.*/, `?$1$2${ELLIPSIS}`);
332
+
333
+ // Remove it all if it's still too long
334
+ if (name.length > MAX_LENGTH) {
335
+ name = name.replace(/\?.*/, `?${ELLIPSIS}`);
336
+ }
335
337
  }
336
338
  }
337
339
 
@@ -5702,6 +5704,30 @@ function renderReport(lhr, opts = {}) {
5702
5704
  return rootEl;
5703
5705
  }
5704
5706
 
5705
- const swapLocale = _ => {}; const format = _ => {};
5707
+ /**
5708
+ * Returns a new LHR with all strings changed to the new requestedLocale.
5709
+ * @param {LH.Result} lhr
5710
+ * @param {LH.Locale} requestedLocale
5711
+ * @return {{lhr: LH.Result, missingIcuMessageIds: string[]}}
5712
+ */
5713
+ function swapLocale(lhr, requestedLocale) {
5714
+ // Stub function only included for types
5715
+ return {
5716
+ lhr,
5717
+ missingIcuMessageIds: [],
5718
+ };
5719
+ }
5720
+
5721
+ /**
5722
+ * Populate the i18n string lookup dict with locale data
5723
+ * Used when the host environment selects the locale and serves lighthouse the intended locale file
5724
+ * @see https://docs.google.com/document/d/1jnt3BqKB-4q3AE94UWFA0Gqspx8Sd_jivlB7gQMlmfk/edit
5725
+ * @param {LH.Locale} locale
5726
+ * @param {Record<string, {message: string}>} lhlMessages
5727
+ */
5728
+ function registerLocaleData(locale, lhlMessages) {
5729
+ // Stub function only included for types
5730
+ }
5731
+ const format = {registerLocaleData};
5706
5732
 
5707
5733
  export { DOM, ReportRenderer, ReportUIFeatures, format, renderReport, swapLocale };