chrome-devtools-frontend 1.0.1535712 → 1.0.1537268
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.
- package/docs/contributing/images/issues-nearestslo.png +0 -0
- package/docs/contributing/issues.md +17 -21
- package/front_end/core/common/Console.ts +1 -8
- package/front_end/core/common/ParsedURL.ts +10 -20
- package/front_end/core/common/SegmentedRange.ts +1 -2
- package/front_end/core/common/StringOutputStream.ts +1 -4
- package/front_end/core/host/AidaClient.ts +64 -5
- package/front_end/core/host/DispatchHttpRequestClient.ts +62 -0
- package/front_end/core/host/GdpClient.ts +8 -57
- package/front_end/core/host/host.ts +2 -0
- package/front_end/core/i18n/i18nImpl.ts +0 -24
- package/front_end/core/protocol_client/CDPConnection.ts +10 -8
- package/front_end/core/protocol_client/InspectorBackend.ts +36 -42
- package/front_end/core/sdk/AnimationModel.ts +1 -2
- package/front_end/core/sdk/CSSMatchedStyles.ts +2 -2
- package/front_end/core/sdk/CSSModel.ts +1 -1
- package/front_end/core/sdk/CSSProperty.ts +3 -6
- package/front_end/core/sdk/CSSStyleDeclaration.ts +4 -4
- package/front_end/core/sdk/DebuggerModel.ts +1 -2
- package/front_end/core/sdk/EnhancedTracesParser.ts +24 -5
- package/front_end/core/sdk/RehydratingConnection.ts +112 -4
- package/front_end/core/sdk/RehydratingObject.ts +8 -0
- package/front_end/core/sdk/SourceMap.ts +2 -3
- package/front_end/core/sdk/TraceObject.ts +5 -1
- package/front_end/entrypoints/node_app/NodeConnectionsPanel.ts +2 -1
- package/front_end/generated/InspectorBackendCommands.js +1 -2
- package/front_end/generated/SupportedCSSProperties.js +19 -0
- package/front_end/generated/protocol.ts +0 -27
- package/front_end/models/javascript_metadata/NativeFunctions.js +1 -1
- package/front_end/models/trace/types/File.ts +9 -0
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +18 -17
- package/front_end/panels/accessibility/AccessibilitySidebarView.ts +9 -12
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +5 -9
- package/front_end/panels/ai_assistance/components/ChatView.ts +63 -74
- package/front_end/panels/application/AppManifestView.ts +7 -6
- package/front_end/panels/application/ApplicationPanelSidebar.ts +4 -4
- package/front_end/panels/application/BackForwardCacheTreeElement.ts +2 -6
- package/front_end/panels/application/OpenedWindowDetailsView.ts +6 -6
- package/front_end/panels/application/StorageView.ts +9 -8
- package/front_end/panels/application/components/BackForwardCacheView.ts +366 -342
- package/front_end/panels/application/components/FrameDetailsView.ts +8 -11
- package/front_end/panels/application/components/OriginTrialTreeView.ts +65 -69
- package/front_end/panels/application/components/ProtocolHandlersView.ts +3 -2
- package/front_end/panels/application/components/backForwardCacheView.css +4 -0
- package/front_end/panels/application/components/badge.css +1 -1
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +2 -1
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +44 -53
- package/front_end/panels/browser_debugger/ObjectEventListenersSidebarPane.ts +8 -8
- package/front_end/panels/common/BadgeNotification.ts +2 -1
- package/front_end/panels/common/GdpSignUpDialog.ts +2 -1
- package/front_end/panels/console/ConsoleInsightTeaser.ts +8 -2
- package/front_end/panels/console/ConsolePinPane.ts +12 -7
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +9 -9
- package/front_end/panels/elements/ComputedStyleWidget.ts +7 -7
- package/front_end/panels/elements/EventListenersWidget.ts +9 -9
- package/front_end/panels/elements/NodeStackTraceWidget.ts +6 -6
- package/front_end/panels/elements/PlatformFontsWidget.ts +5 -5
- package/front_end/panels/elements/PropertiesWidget.ts +8 -8
- package/front_end/panels/layer_viewer/Layers3DView.ts +2 -1
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +3 -3
- package/front_end/panels/network/RequestCookiesView.ts +2 -1
- package/front_end/panels/network/RequestTimingView.ts +2 -1
- package/front_end/panels/recorder/RecorderController.ts +33 -23
- package/front_end/panels/recorder/components/CreateRecordingView.ts +259 -226
- package/front_end/panels/security/CookieControlsView.ts +2 -1
- package/front_end/panels/security/CookieReportView.ts +3 -2
- package/front_end/panels/settings/AISettingsTab.ts +164 -172
- package/front_end/panels/settings/KeybindsSettingsTab.ts +6 -0
- package/front_end/panels/settings/SettingsScreen.ts +3 -7
- package/front_end/panels/settings/aiSettingsTab.css +151 -148
- package/front_end/panels/settings/components/SyncSection.ts +2 -1
- package/front_end/panels/settings/settings-meta.ts +1 -2
- package/front_end/panels/sources/AddSourceMapURLDialog.ts +23 -26
- package/front_end/panels/sources/DebuggerPausedMessage.ts +4 -3
- package/front_end/panels/sources/ResourceOriginPlugin.ts +3 -2
- package/front_end/panels/sources/SourcesNavigator.ts +2 -1
- package/front_end/panels/sources/TabbedEditorContainer.ts +3 -2
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +9 -9
- package/front_end/panels/timeline/TimelinePanel.ts +60 -11
- package/front_end/panels/timeline/TimelineUIUtils.ts +3 -2
- package/front_end/panels/timeline/components/DetailsView.ts +5 -4
- package/front_end/panels/timeline/components/ExportTraceOptions.ts +33 -34
- package/front_end/panels/timeline/components/FieldSettingsDialog.ts +2 -1
- package/front_end/panels/timeline/components/LiveMetricsView.ts +5 -4
- package/front_end/panels/timeline/components/MetricCompareStrings.ts +25 -24
- package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +2 -1
- package/front_end/third_party/chromium/README.chromium +2 -2
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +9 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +13 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +1 -12
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts +6 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +6 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/disposable.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/disposable.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/disposable.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/disposable.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +28 -3
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +21 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +9 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Input.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +13 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.d.ts +1 -12
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts +6 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +6 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +28 -3
- package/front_end/third_party/puppeteer/package/package.json +2 -2
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +13 -1
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +7 -2
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +14 -1
- package/front_end/third_party/puppeteer/package/src/bidi/BrowserContext.ts +8 -5
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +5 -2
- package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +8 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +11 -2
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserContext.ts +3 -2
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +5 -5
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/disposable.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/util/util.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/components/docs/tooltip/basic.ts +1 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +280 -0
- package/front_end/ui/components/text_editor/text_editor.ts +1 -0
- package/front_end/ui/components/tooltips/Tooltip.ts +33 -18
- package/front_end/ui/i18n/i18n.ts +31 -0
- package/front_end/ui/legacy/Dialog.ts +0 -1
- package/front_end/ui/legacy/SettingsUI.ts +0 -14
- package/front_end/ui/legacy/SoftDropDown.ts +1 -12
- package/front_end/ui/legacy/ViewManager.ts +2 -4
- package/front_end/ui/legacy/Widget.ts +33 -17
- package/front_end/ui/legacy/XLink.ts +0 -3
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +9 -0
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +2 -1
- package/front_end/ui/legacy/components/utils/Linkifier.ts +9 -3
- package/front_end/ui/legacy/legacy.ts +0 -2
- package/front_end/ui/visual_logging/KnownContextValues.ts +4 -1
- package/mcp/mcp.ts +6 -0
- package/package.json +1 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatterBounds.snapshot.txt +0 -4
- package/front_end/ui/components/docs/breadcrumbs_perf/initial-breadcrumb-perf.html +0 -20
- package/front_end/ui/components/docs/breadcrumbs_perf/initial-breadcrumb-perf.ts +0 -25
- package/front_end/ui/components/docs/breadcrumbs_perf/nested-breadcrumbs-perf.html +0 -20
- package/front_end/ui/components/docs/breadcrumbs_perf/nested-breadcrumbs-perf.ts +0 -36
- package/front_end/ui/components/docs/recorder_create_recording_view/basic.html +0 -20
- package/front_end/ui/components/docs/recorder_create_recording_view/basic.ts +0 -27
- package/front_end/ui/legacy/ThrottledWidget.ts +0 -48
|
@@ -42,7 +42,7 @@ import * as i18n from '../../core/i18n/i18n.js';
|
|
|
42
42
|
import * as Platform from '../../core/platform/platform.js';
|
|
43
43
|
import * as Root from '../../core/root/root.js';
|
|
44
44
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
45
|
-
import
|
|
45
|
+
import * as Protocol from '../../generated/protocol.js';
|
|
46
46
|
import * as AiAssistanceModel from '../../models/ai_assistance/ai_assistance.js';
|
|
47
47
|
import * as Badges from '../../models/badges/badges.js';
|
|
48
48
|
import * as CrUXManager from '../../models/crux-manager/crux-manager.js';
|
|
@@ -1364,7 +1364,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
1364
1364
|
}
|
|
1365
1365
|
|
|
1366
1366
|
async saveToFile(config: {
|
|
1367
|
-
|
|
1367
|
+
includeResourceContent: boolean,
|
|
1368
1368
|
includeSourceMaps: boolean,
|
|
1369
1369
|
/**
|
|
1370
1370
|
* Includes many things:
|
|
@@ -1399,9 +1399,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
1399
1399
|
if (Trace.Types.Events.isAnyScriptSourceEvent(event) && event.name !== 'StubScriptCatchup') {
|
|
1400
1400
|
const mappedScript = scriptByIdMap.get(`${event.args.data.isolate}.${event.args.data.scriptId}`);
|
|
1401
1401
|
|
|
1402
|
-
|
|
1403
|
-
// extension we dont include the script content.
|
|
1404
|
-
if (!config.includeScriptContent ||
|
|
1402
|
+
if (!config.includeResourceContent ||
|
|
1405
1403
|
(mappedScript?.url && Trace.Helpers.Trace.isExtensionUrl(mappedScript.url))) {
|
|
1406
1404
|
return {
|
|
1407
1405
|
cat: event.cat,
|
|
@@ -1434,7 +1432,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
1434
1432
|
|
|
1435
1433
|
try {
|
|
1436
1434
|
await this.innerSaveToFile(traceEvents, metadata, {
|
|
1437
|
-
|
|
1435
|
+
includeResourceContent: config.includeResourceContent,
|
|
1438
1436
|
includeSourceMaps: config.includeSourceMaps,
|
|
1439
1437
|
addModifications: config.addModifications,
|
|
1440
1438
|
shouldCompress: config.shouldCompress,
|
|
@@ -1454,7 +1452,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
1454
1452
|
}
|
|
1455
1453
|
|
|
1456
1454
|
async innerSaveToFile(traceEvents: readonly Trace.Types.Events.Event[], metadata: Trace.Types.File.MetaData, config: {
|
|
1457
|
-
|
|
1455
|
+
includeResourceContent: boolean,
|
|
1458
1456
|
includeSourceMaps: boolean,
|
|
1459
1457
|
addModifications: boolean,
|
|
1460
1458
|
shouldCompress: boolean,
|
|
@@ -1464,9 +1462,9 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
1464
1462
|
Platform.DateUtilities.toISO8601Compact(metadata.startTime ? new Date(metadata.startTime) : new Date());
|
|
1465
1463
|
|
|
1466
1464
|
const isCpuProfile = metadata.dataOrigin === Trace.Types.File.DataOrigin.CPU_PROFILE;
|
|
1467
|
-
const {
|
|
1465
|
+
const {includeResourceContent, includeSourceMaps} = config;
|
|
1468
1466
|
metadata.enhancedTraceVersion =
|
|
1469
|
-
|
|
1467
|
+
includeResourceContent ? SDK.EnhancedTracesParser.EnhancedTracesParser.enhancedTraceVersion : undefined;
|
|
1470
1468
|
|
|
1471
1469
|
let fileName =
|
|
1472
1470
|
(isCpuProfile ? `CPU-${isoDate}.cpuprofile` : `Trace-${isoDate}.json`) as Platform.DevToolsPath.RawPathString;
|
|
@@ -1477,10 +1475,12 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
1477
1475
|
blobParts = [JSON.stringify(profile)];
|
|
1478
1476
|
} else {
|
|
1479
1477
|
const filteredMetadataSourceMaps =
|
|
1480
|
-
|
|
1478
|
+
includeResourceContent && includeSourceMaps ? this.#filterMetadataSourceMaps(metadata) : undefined;
|
|
1479
|
+
const filteredResources = includeResourceContent ? this.#filterMetadataResoures(metadata) : undefined;
|
|
1481
1480
|
const formattedTraceIter = traceJsonGenerator(traceEvents, {
|
|
1482
1481
|
...metadata,
|
|
1483
1482
|
sourceMaps: filteredMetadataSourceMaps,
|
|
1483
|
+
resources: filteredResources,
|
|
1484
1484
|
});
|
|
1485
1485
|
blobParts = Array.from(formattedTraceIter);
|
|
1486
1486
|
}
|
|
@@ -1531,7 +1531,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
1531
1531
|
this.saveButton.element as TimelineComponents.ExportTraceOptions.ExportTraceOptions;
|
|
1532
1532
|
const state = exportTraceOptionsElement.state;
|
|
1533
1533
|
await this.saveToFile({
|
|
1534
|
-
|
|
1534
|
+
includeResourceContent: state.includeResourceContent,
|
|
1535
1535
|
includeSourceMaps: state.includeSourceMaps,
|
|
1536
1536
|
addModifications: state.includeAnnotations,
|
|
1537
1537
|
shouldCompress: state.shouldCompress,
|
|
@@ -1550,6 +1550,14 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
1550
1550
|
});
|
|
1551
1551
|
}
|
|
1552
1552
|
|
|
1553
|
+
#filterMetadataResoures(metadata: Trace.Types.File.MetaData): Trace.Types.File.MetadataResource[]|undefined {
|
|
1554
|
+
if (!metadata.resources) {
|
|
1555
|
+
return undefined;
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
return metadata.resources;
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1553
1561
|
#showExportTraceErrorDialog(error: Error): void {
|
|
1554
1562
|
if (this.statusDialog) {
|
|
1555
1563
|
this.statusDialog.remove();
|
|
@@ -2744,6 +2752,45 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
2744
2752
|
};
|
|
2745
2753
|
}
|
|
2746
2754
|
|
|
2755
|
+
async #retainResourceContentsForEnhancedTrace(
|
|
2756
|
+
parsedTrace: Trace.TraceModel.ParsedTrace, metadata: Trace.Types.File.MetaData): Promise<void> {
|
|
2757
|
+
// Scripts are already stored as trace events.
|
|
2758
|
+
const resourceTypesToRetain =
|
|
2759
|
+
new Set([Protocol.Network.ResourceType.Document, Protocol.Network.ResourceType.Stylesheet]);
|
|
2760
|
+
|
|
2761
|
+
for (const request of parsedTrace.data.NetworkRequests.byId.values()) {
|
|
2762
|
+
if (!resourceTypesToRetain.has(request.args.data.resourceType)) {
|
|
2763
|
+
continue;
|
|
2764
|
+
}
|
|
2765
|
+
|
|
2766
|
+
const url = request.args.data.url as Platform.DevToolsPath.UrlString;
|
|
2767
|
+
const resource = SDK.ResourceTreeModel.ResourceTreeModel.resourceForURL(url);
|
|
2768
|
+
if (!resource) {
|
|
2769
|
+
continue;
|
|
2770
|
+
}
|
|
2771
|
+
|
|
2772
|
+
const content = await resource.requestContentData();
|
|
2773
|
+
if ('error' in content) {
|
|
2774
|
+
continue;
|
|
2775
|
+
}
|
|
2776
|
+
|
|
2777
|
+
if (!content.isTextContent) {
|
|
2778
|
+
continue;
|
|
2779
|
+
}
|
|
2780
|
+
|
|
2781
|
+
if (!metadata.resources) {
|
|
2782
|
+
metadata.resources = [];
|
|
2783
|
+
}
|
|
2784
|
+
|
|
2785
|
+
metadata.resources.push({
|
|
2786
|
+
url,
|
|
2787
|
+
frame: resource.frameId ?? '',
|
|
2788
|
+
content: content.text,
|
|
2789
|
+
mimeType: content.mimeType,
|
|
2790
|
+
});
|
|
2791
|
+
}
|
|
2792
|
+
}
|
|
2793
|
+
|
|
2747
2794
|
async #executeNewTrace(
|
|
2748
2795
|
collectedEvents: Trace.Types.Events.Event[], isFreshRecording: boolean,
|
|
2749
2796
|
metadata: Trace.Types.File.MetaData|null): Promise<void> {
|
|
@@ -2772,11 +2819,13 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
2772
2819
|
|
|
2773
2820
|
// Store all source maps on the trace metadata.
|
|
2774
2821
|
// If not fresh, we can't validate the maps are still accurate.
|
|
2822
|
+
// Also handle HTML content.
|
|
2775
2823
|
if (isFreshRecording && metadata) {
|
|
2776
2824
|
const traceIndex = this.#traceEngineModel.lastTraceIndex();
|
|
2777
2825
|
const parsedTrace = this.#traceEngineModel.parsedTrace(traceIndex);
|
|
2778
2826
|
if (parsedTrace) {
|
|
2779
2827
|
await this.#retainSourceMapsForEnhancedTrace(parsedTrace, metadata);
|
|
2828
|
+
await this.#retainResourceContentsForEnhancedTrace(parsedTrace, metadata);
|
|
2780
2829
|
}
|
|
2781
2830
|
}
|
|
2782
2831
|
}
|
|
@@ -48,6 +48,7 @@ import * as Tracing from '../../services/tracing/tracing.js';
|
|
|
48
48
|
import * as CodeHighlighter from '../../ui/components/code_highlighter/code_highlighter.js';
|
|
49
49
|
// eslint-disable-next-line @devtools/es-modules-import
|
|
50
50
|
import codeHighlighterStyles from '../../ui/components/code_highlighter/codeHighlighter.css.js';
|
|
51
|
+
import * as uiI18n from '../../ui/i18n/i18n.js';
|
|
51
52
|
import * as PerfUI from '../../ui/legacy/components/perf_ui/perf_ui.js';
|
|
52
53
|
// eslint-disable-next-line @devtools/es-modules-import
|
|
53
54
|
import imagePreviewStyles from '../../ui/legacy/components/utils/imagePreview.css.js';
|
|
@@ -1899,7 +1900,7 @@ export class TimelineUIUtils {
|
|
|
1899
1900
|
const niceNodeLink = createLinkForInvalidationNode(invalidation);
|
|
1900
1901
|
|
|
1901
1902
|
const text = scriptLink ?
|
|
1902
|
-
|
|
1903
|
+
uiI18n.getFormatLocalizedString(
|
|
1903
1904
|
str_, UIStrings.invalidationWithCallFrame, {PH1: niceNodeLink, PH2: scriptLink}) as HTMLElement :
|
|
1904
1905
|
niceNodeLink;
|
|
1905
1906
|
|
|
@@ -2207,7 +2208,7 @@ export class TimelineUIUtils {
|
|
|
2207
2208
|
PH1: i18n.TimeUtilities.millisToString(durationMilli, true),
|
|
2208
2209
|
PH2: i18n.TimeUtilities.millisToString(offsetMilli, true),
|
|
2209
2210
|
});
|
|
2210
|
-
return
|
|
2211
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.emptyPlaceholder, {PH1: durationText});
|
|
2211
2212
|
}
|
|
2212
2213
|
|
|
2213
2214
|
static quadWidth(quad: number[]): number {
|
|
@@ -7,6 +7,7 @@ import * as i18n from '../../../core/i18n/i18n.js';
|
|
|
7
7
|
import * as Platform from '../../../core/platform/platform.js';
|
|
8
8
|
import type * as Protocol from '../../../generated/protocol.js';
|
|
9
9
|
import * as Trace from '../../../models/trace/trace.js';
|
|
10
|
+
import * as uiI18n from '../../../ui/i18n/i18n.js';
|
|
10
11
|
import * as UI from '../../../ui/legacy/legacy.js';
|
|
11
12
|
|
|
12
13
|
// *********************************************************************
|
|
@@ -86,8 +87,8 @@ export function buildWarningElementsForEvent(
|
|
|
86
87
|
const forcedReflowLink = UI.XLink.XLink.create(
|
|
87
88
|
'https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing#avoid-forced-synchronous-layouts',
|
|
88
89
|
i18nString(UIStrings.forcedReflow), undefined, undefined, 'forced-reflow');
|
|
89
|
-
span.appendChild(
|
|
90
|
-
str_, UIStrings.sIsALikelyPerformanceBottleneck, {PH1: forcedReflowLink}));
|
|
90
|
+
span.appendChild(
|
|
91
|
+
uiI18n.getFormatLocalizedString(str_, UIStrings.sIsALikelyPerformanceBottleneck, {PH1: forcedReflowLink}));
|
|
91
92
|
break;
|
|
92
93
|
}
|
|
93
94
|
case 'IDLE_CALLBACK_OVER_TIME': {
|
|
@@ -103,7 +104,7 @@ export function buildWarningElementsForEvent(
|
|
|
103
104
|
case 'LONG_TASK': {
|
|
104
105
|
const longTaskLink = UI.XLink.XLink.create(
|
|
105
106
|
'https://web.dev/optimize-long-tasks/', i18nString(UIStrings.longTask), undefined, undefined, 'long-tasks');
|
|
106
|
-
span.appendChild(
|
|
107
|
+
span.appendChild(uiI18n.getFormatLocalizedString(
|
|
107
108
|
str_, UIStrings.sTookS,
|
|
108
109
|
{PH1: longTaskLink, PH2: i18n.TimeUtilities.millisToString((duration || 0), true)}));
|
|
109
110
|
break;
|
|
@@ -111,7 +112,7 @@ export function buildWarningElementsForEvent(
|
|
|
111
112
|
case 'LONG_INTERACTION': {
|
|
112
113
|
const longInteractionINPLink = UI.XLink.XLink.create(
|
|
113
114
|
'https://web.dev/inp', i18nString(UIStrings.longInteractionINP), undefined, undefined, 'long-interaction');
|
|
114
|
-
span.appendChild(
|
|
115
|
+
span.appendChild(uiI18n.getFormatLocalizedString(
|
|
115
116
|
str_, UIStrings.sIsLikelyPoorPageResponsiveness, {PH1: longInteractionINPLink}));
|
|
116
117
|
break;
|
|
117
118
|
}
|
|
@@ -31,7 +31,7 @@ const UIStrings = {
|
|
|
31
31
|
/**
|
|
32
32
|
* @description Text for the include script content option.
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
includeResourceContent: 'Include resource content',
|
|
35
35
|
/**
|
|
36
36
|
* @description Text for the include script source maps option.
|
|
37
37
|
*/
|
|
@@ -49,9 +49,9 @@ const UIStrings = {
|
|
|
49
49
|
*/
|
|
50
50
|
saveButtonTitle: 'Save',
|
|
51
51
|
/**
|
|
52
|
-
* @description Text shown in the information pop-up next to the "Include
|
|
52
|
+
* @description Text shown in the information pop-up next to the "Include resource content" option.
|
|
53
53
|
*/
|
|
54
|
-
|
|
54
|
+
resourceContentPrivacyInfo: 'Includes the full content of all loaded HTML, CSS, and scripts (except extensions).',
|
|
55
55
|
/**
|
|
56
56
|
* @description Text shown in the information pop-up next to the "Include script sourcemaps" option.
|
|
57
57
|
*/
|
|
@@ -67,7 +67,7 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
67
67
|
|
|
68
68
|
export interface ExportTraceOptionsData {
|
|
69
69
|
onExport: (config: {
|
|
70
|
-
|
|
70
|
+
includeResourceContent: boolean,
|
|
71
71
|
includeSourceMaps: boolean,
|
|
72
72
|
addModifications: boolean,
|
|
73
73
|
shouldCompress: boolean,
|
|
@@ -80,30 +80,30 @@ export type ExportTraceDialogState = Dialogs.Dialog.DialogState;
|
|
|
80
80
|
export interface ExportTraceOptionsState {
|
|
81
81
|
dialogState: ExportTraceDialogState;
|
|
82
82
|
includeAnnotations: boolean;
|
|
83
|
-
|
|
83
|
+
includeResourceContent: boolean;
|
|
84
84
|
includeSourceMaps: boolean;
|
|
85
85
|
shouldCompress: boolean;
|
|
86
86
|
displayAnnotationsCheckbox?: boolean;
|
|
87
|
-
|
|
87
|
+
displayResourceContentCheckbox?: boolean;
|
|
88
88
|
displaySourceMapsCheckbox?: boolean;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
type CheckboxId = 'annotations'|'
|
|
92
|
-
const checkboxesWithInfoDialog = new Set<CheckboxId>(['
|
|
91
|
+
type CheckboxId = 'annotations'|'resource-content'|'script-source-maps'|'compress-with-gzip';
|
|
92
|
+
const checkboxesWithInfoDialog = new Set<CheckboxId>(['resource-content', 'script-source-maps']);
|
|
93
93
|
|
|
94
94
|
export class ExportTraceOptions extends HTMLElement {
|
|
95
95
|
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
96
96
|
#data: ExportTraceOptionsData|null = null;
|
|
97
97
|
|
|
98
98
|
static readonly #includeAnnotationsSettingString: string = 'export-performance-trace-include-annotations';
|
|
99
|
-
static readonly #
|
|
99
|
+
static readonly #includeResourceContentSettingString: string = 'export-performance-trace-include-resources';
|
|
100
100
|
static readonly #includeSourceMapsSettingString: string = 'export-performance-trace-include-sourcemaps';
|
|
101
101
|
static readonly #shouldCompressSettingString: string = 'export-performance-trace-should-compress';
|
|
102
102
|
|
|
103
103
|
#includeAnnotationsSetting: Common.Settings.Setting<boolean> = Common.Settings.Settings.instance().createSetting(
|
|
104
104
|
ExportTraceOptions.#includeAnnotationsSettingString, true, Common.Settings.SettingStorageType.SESSION);
|
|
105
|
-
#
|
|
106
|
-
ExportTraceOptions.#
|
|
105
|
+
#includeResourceContentSetting: Common.Settings.Setting<boolean> = Common.Settings.Settings.instance().createSetting(
|
|
106
|
+
ExportTraceOptions.#includeResourceContentSettingString, false, Common.Settings.SettingStorageType.SESSION);
|
|
107
107
|
#includeSourceMapsSetting: Common.Settings.Setting<boolean> = Common.Settings.Settings.instance().createSetting(
|
|
108
108
|
ExportTraceOptions.#includeSourceMapsSettingString, false, Common.Settings.SettingStorageType.SESSION);
|
|
109
109
|
#shouldCompressSetting: Common.Settings.Setting<boolean> = Common.Settings.Settings.instance().createSetting(
|
|
@@ -112,7 +112,7 @@ export class ExportTraceOptions extends HTMLElement {
|
|
|
112
112
|
#state: ExportTraceOptionsState = {
|
|
113
113
|
dialogState: Dialogs.Dialog.DialogState.COLLAPSED,
|
|
114
114
|
includeAnnotations: this.#includeAnnotationsSetting.get(),
|
|
115
|
-
|
|
115
|
+
includeResourceContent: this.#includeResourceContentSetting.get(),
|
|
116
116
|
includeSourceMaps: this.#includeSourceMapsSetting.get(),
|
|
117
117
|
shouldCompress: this.#shouldCompressSetting.get(),
|
|
118
118
|
};
|
|
@@ -121,10 +121,10 @@ export class ExportTraceOptions extends HTMLElement {
|
|
|
121
121
|
/* title*/ i18nString(UIStrings.includeAnnotations), /* checked*/ this.#state.includeAnnotations,
|
|
122
122
|
/* subtitle*/ undefined,
|
|
123
123
|
/* jslogContext*/ 'timeline.export-trace-options.annotations-checkbox');
|
|
124
|
-
#
|
|
125
|
-
/* title*/ i18nString(UIStrings.
|
|
124
|
+
#includeResourceContentCheckbox = UI.UIUtils.CheckboxLabel.create(
|
|
125
|
+
/* title*/ i18nString(UIStrings.includeResourceContent), /* checked*/ this.#state.includeResourceContent,
|
|
126
126
|
/* subtitle*/ undefined,
|
|
127
|
-
/* jslogContext*/ 'timeline.export-trace-options.
|
|
127
|
+
/* jslogContext*/ 'timeline.export-trace-options.resource-content-checkbox');
|
|
128
128
|
#includeSourceMapsCheckbox = UI.UIUtils.CheckboxLabel.create(
|
|
129
129
|
/* title*/ i18nString(UIStrings.includeSourcemap), /* checked*/ this.#state.includeSourceMaps,
|
|
130
130
|
/* subtitle*/ undefined,
|
|
@@ -142,7 +142,7 @@ export class ExportTraceOptions extends HTMLElement {
|
|
|
142
142
|
set state(state: ExportTraceOptionsState) {
|
|
143
143
|
this.#state = state;
|
|
144
144
|
this.#includeAnnotationsSetting.set(state.includeAnnotations);
|
|
145
|
-
this.#
|
|
145
|
+
this.#includeResourceContentSetting.set(state.includeResourceContent);
|
|
146
146
|
this.#includeSourceMapsSetting.set(state.includeSourceMaps);
|
|
147
147
|
this.#shouldCompressSetting.set(state.shouldCompress);
|
|
148
148
|
|
|
@@ -154,13 +154,12 @@ export class ExportTraceOptions extends HTMLElement {
|
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
updateContentVisibility(options: {annotationsExist: boolean}): void {
|
|
157
|
-
|
|
157
|
+
this.state = {
|
|
158
|
+
...this.#state,
|
|
158
159
|
displayAnnotationsCheckbox: options.annotationsExist,
|
|
159
|
-
|
|
160
|
+
displayResourceContentCheckbox: true,
|
|
160
161
|
displaySourceMapsCheckbox: true
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
this.state = newState;
|
|
162
|
+
};
|
|
164
163
|
}
|
|
165
164
|
|
|
166
165
|
#scheduleRender(): void {
|
|
@@ -175,11 +174,11 @@ export class ExportTraceOptions extends HTMLElement {
|
|
|
175
174
|
newState.includeAnnotations = checked;
|
|
176
175
|
break;
|
|
177
176
|
}
|
|
178
|
-
case this.#
|
|
179
|
-
newState.
|
|
177
|
+
case this.#includeResourceContentCheckbox: {
|
|
178
|
+
newState.includeResourceContent = checked;
|
|
180
179
|
|
|
181
180
|
// if the `Include Script` is checked off, cascade the change to `Include Script Source`
|
|
182
|
-
if (!newState.
|
|
181
|
+
if (!newState.includeResourceContent) {
|
|
183
182
|
newState.includeSourceMaps = false;
|
|
184
183
|
}
|
|
185
184
|
|
|
@@ -203,8 +202,8 @@ export class ExportTraceOptions extends HTMLElement {
|
|
|
203
202
|
return i18nString(UIStrings.moreInfoLabel) + ' ' + i18nString(UIStrings.sourceMapsContentPrivacyInfo);
|
|
204
203
|
}
|
|
205
204
|
|
|
206
|
-
if (checkboxId === '
|
|
207
|
-
return i18nString(UIStrings.moreInfoLabel) + ' ' + i18nString(UIStrings.
|
|
205
|
+
if (checkboxId === 'resource-content') {
|
|
206
|
+
return i18nString(UIStrings.moreInfoLabel) + ' ' + i18nString(UIStrings.resourceContentPrivacyInfo);
|
|
208
207
|
}
|
|
209
208
|
|
|
210
209
|
return '';
|
|
@@ -219,7 +218,7 @@ export class ExportTraceOptions extends HTMLElement {
|
|
|
219
218
|
'change', this.#checkboxOptionChanged.bind(this, checkboxWithLabel, !checked), false);
|
|
220
219
|
|
|
221
220
|
// Disable the includeSourceMapsSetting when the includeScriptContentSetting is also disabled.
|
|
222
|
-
this.#includeSourceMapsCheckbox.disabled = !this.#state.
|
|
221
|
+
this.#includeSourceMapsCheckbox.disabled = !this.#state.includeResourceContent;
|
|
223
222
|
|
|
224
223
|
// clang-format off
|
|
225
224
|
return html`
|
|
@@ -252,7 +251,7 @@ export class ExportTraceOptions extends HTMLElement {
|
|
|
252
251
|
>
|
|
253
252
|
<div class="info-tooltip-container">
|
|
254
253
|
<p>
|
|
255
|
-
${checkboxId === '
|
|
254
|
+
${checkboxId === 'resource-content' ? i18nString(UIStrings.resourceContentPrivacyInfo) : Lit.nothing}
|
|
256
255
|
${checkboxId === 'script-source-maps' ? i18nString(UIStrings.sourceMapsContentPrivacyInfo) : Lit.nothing}
|
|
257
256
|
</p>
|
|
258
257
|
</div>
|
|
@@ -287,9 +286,9 @@ export class ExportTraceOptions extends HTMLElement {
|
|
|
287
286
|
${this.#state.displayAnnotationsCheckbox ? this.#renderCheckbox('annotations', this.#includeAnnotationsCheckbox,
|
|
288
287
|
i18nString(UIStrings.includeAnnotations),
|
|
289
288
|
this.#state.includeAnnotations): ''}
|
|
290
|
-
${this.#state.
|
|
291
|
-
i18nString(UIStrings.
|
|
292
|
-
${this.#state.
|
|
289
|
+
${this.#state.displayResourceContentCheckbox ? this.#renderCheckbox('resource-content', this.#includeResourceContentCheckbox,
|
|
290
|
+
i18nString(UIStrings.includeResourceContent), this.#state.includeResourceContent): ''}
|
|
291
|
+
${this.#state.displayResourceContentCheckbox && this.#state.displaySourceMapsCheckbox ? this.#renderCheckbox(
|
|
293
292
|
'script-source-maps',
|
|
294
293
|
this.#includeSourceMapsCheckbox, i18nString(UIStrings.includeSourcemap), this.#state.includeSourceMaps): ''}
|
|
295
294
|
${this.#renderCheckbox('compress-with-gzip', this.#shouldCompressCheckbox, i18nString(UIStrings.shouldCompress), this.#state.shouldCompress)}
|
|
@@ -303,8 +302,8 @@ export class ExportTraceOptions extends HTMLElement {
|
|
|
303
302
|
} as Buttons.Button.ButtonData}
|
|
304
303
|
>${i18nString(UIStrings.saveButtonTitle)}</devtools-button>
|
|
305
304
|
</div>
|
|
306
|
-
${this.#state.
|
|
307
|
-
${this.#state.
|
|
305
|
+
${this.#state.displayResourceContentCheckbox ? this.#renderInfoTooltip('resource-content') : Lit.nothing}
|
|
306
|
+
${this.#state.displayResourceContentCheckbox && this.#state.displaySourceMapsCheckbox ? this.#renderInfoTooltip('script-source-maps') : Lit.nothing}
|
|
308
307
|
</div>
|
|
309
308
|
</devtools-button-dialog>
|
|
310
309
|
`;
|
|
@@ -319,7 +318,7 @@ export class ExportTraceOptions extends HTMLElement {
|
|
|
319
318
|
async #onExportCallback(): Promise<void> {
|
|
320
319
|
// Calls passed onExport function with current settings.
|
|
321
320
|
await this.#data?.onExport({
|
|
322
|
-
|
|
321
|
+
includeResourceContent: this.#state.includeResourceContent,
|
|
323
322
|
includeSourceMaps: this.#state.includeSourceMaps,
|
|
324
323
|
// Note: this also includes track configuration ...
|
|
325
324
|
addModifications: this.#state.includeAnnotations,
|
|
@@ -11,6 +11,7 @@ import * as Buttons from '../../../ui/components/buttons/buttons.js';
|
|
|
11
11
|
import * as Dialogs from '../../../ui/components/dialogs/dialogs.js';
|
|
12
12
|
import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
|
|
13
13
|
import * as Input from '../../../ui/components/input/input.js';
|
|
14
|
+
import * as uiI18n from '../../../ui/i18n/i18n.js';
|
|
14
15
|
import * as UI from '../../../ui/legacy/legacy.js';
|
|
15
16
|
import * as Lit from '../../../ui/lit/lit.js';
|
|
16
17
|
import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
|
@@ -331,7 +332,7 @@ export class FieldSettingsDialog extends HTMLElement {
|
|
|
331
332
|
#render = (): void => {
|
|
332
333
|
const linkEl =
|
|
333
334
|
UI.XLink.XLink.create('https://developer.chrome.com/docs/crux', i18n.i18n.lockedString('Chrome UX Report'));
|
|
334
|
-
const descriptionEl =
|
|
335
|
+
const descriptionEl = uiI18n.getFormatLocalizedString(str_, UIStrings.fetchAggregated, {PH1: linkEl});
|
|
335
336
|
|
|
336
337
|
// clang-format off
|
|
337
338
|
const output = html`
|
|
@@ -25,6 +25,7 @@ import * as LegacyWrapper from '../../../ui/components/legacy_wrapper/legacy_wra
|
|
|
25
25
|
import type * as Menus from '../../../ui/components/menus/menus.js';
|
|
26
26
|
import * as RenderCoordinator from '../../../ui/components/render_coordinator/render_coordinator.js';
|
|
27
27
|
import type * as Settings from '../../../ui/components/settings/settings.js';
|
|
28
|
+
import * as uiI18n from '../../../ui/i18n/i18n.js';
|
|
28
29
|
import * as UI from '../../../ui/legacy/legacy.js';
|
|
29
30
|
import * as Lit from '../../../ui/lit/lit.js';
|
|
30
31
|
import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
|
@@ -629,8 +630,8 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
|
|
|
629
630
|
<div class="device-toolbar-description">${md(i18nString(UIStrings.useDeviceToolbar))}</div>
|
|
630
631
|
${fieldEnabled ? html`
|
|
631
632
|
<ul class="environment-recs-list">
|
|
632
|
-
<li>${
|
|
633
|
-
<li>${
|
|
633
|
+
<li>${uiI18n.getFormatLocalizedString(str_, UIStrings.device, {PH1: deviceRecEl})}</li>
|
|
634
|
+
<li>${uiI18n.getFormatLocalizedString(str_, UIStrings.network, {PH1: networkRecEl})}</li>
|
|
634
635
|
</ul>
|
|
635
636
|
` : nothing}
|
|
636
637
|
<div class="environment-option">
|
|
@@ -839,7 +840,7 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
|
|
|
839
840
|
dateEl.classList.add('collection-period-range');
|
|
840
841
|
dateEl.textContent = range || i18nString(UIStrings.notEnoughData);
|
|
841
842
|
|
|
842
|
-
const message =
|
|
843
|
+
const message = uiI18n.getFormatLocalizedString(str_, UIStrings.collectionPeriod, {
|
|
843
844
|
PH1: dateEl,
|
|
844
845
|
});
|
|
845
846
|
|
|
@@ -862,7 +863,7 @@ export class LiveMetricsView extends LegacyWrapper.LegacyWrapper.WrappableCompon
|
|
|
862
863
|
|
|
863
864
|
const linkEl =
|
|
864
865
|
UI.XLink.XLink.create('https://developer.chrome.com/docs/crux', i18n.i18n.lockedString('Chrome UX Report'));
|
|
865
|
-
const messageEl =
|
|
866
|
+
const messageEl = uiI18n.getFormatLocalizedString(str_, UIStrings.seeHowYourLocalMetricsCompare, {PH1: linkEl});
|
|
866
867
|
|
|
867
868
|
return html`
|
|
868
869
|
<div class="field-data-message">${messageEl}</div>
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
6
|
+
import * as uiI18n from '../../../ui/i18n/i18n.js';
|
|
6
7
|
|
|
7
8
|
import type {MetricRating} from './Utils.js';
|
|
8
9
|
|
|
@@ -185,40 +186,40 @@ export function renderCompareText(
|
|
|
185
186
|
};
|
|
186
187
|
|
|
187
188
|
if (rating === 'good' && compare === 'better') {
|
|
188
|
-
return
|
|
189
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.goodBetterCompare, values);
|
|
189
190
|
}
|
|
190
191
|
if (rating === 'good' && compare === 'worse') {
|
|
191
|
-
return
|
|
192
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.goodWorseCompare, values);
|
|
192
193
|
}
|
|
193
194
|
if (rating === 'good' && compare === 'similar') {
|
|
194
|
-
return
|
|
195
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.goodSimilarCompare, values);
|
|
195
196
|
}
|
|
196
197
|
if (rating === 'good' && !compare) {
|
|
197
|
-
return
|
|
198
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.goodSummarized, values);
|
|
198
199
|
}
|
|
199
200
|
if (rating === 'needs-improvement' && compare === 'better') {
|
|
200
|
-
return
|
|
201
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.needsImprovementBetterCompare, values);
|
|
201
202
|
}
|
|
202
203
|
if (rating === 'needs-improvement' && compare === 'worse') {
|
|
203
|
-
return
|
|
204
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.needsImprovementWorseCompare, values);
|
|
204
205
|
}
|
|
205
206
|
if (rating === 'needs-improvement' && compare === 'similar') {
|
|
206
|
-
return
|
|
207
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.needsImprovementSimilarCompare, values);
|
|
207
208
|
}
|
|
208
209
|
if (rating === 'needs-improvement' && !compare) {
|
|
209
|
-
return
|
|
210
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.needsImprovementSummarized, values);
|
|
210
211
|
}
|
|
211
212
|
if (rating === 'poor' && compare === 'better') {
|
|
212
|
-
return
|
|
213
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.poorBetterCompare, values);
|
|
213
214
|
}
|
|
214
215
|
if (rating === 'poor' && compare === 'worse') {
|
|
215
|
-
return
|
|
216
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.poorWorseCompare, values);
|
|
216
217
|
}
|
|
217
218
|
if (rating === 'poor' && compare === 'similar') {
|
|
218
|
-
return
|
|
219
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.poorSimilarCompare, values);
|
|
219
220
|
}
|
|
220
221
|
if (rating === 'poor' && !compare) {
|
|
221
|
-
return
|
|
222
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.poorSummarized, values);
|
|
222
223
|
}
|
|
223
224
|
|
|
224
225
|
throw new Error('Compare string not found');
|
|
@@ -241,40 +242,40 @@ export function renderDetailedCompareText(options: {
|
|
|
241
242
|
};
|
|
242
243
|
|
|
243
244
|
if (localRating === 'good' && fieldRating === 'good') {
|
|
244
|
-
return
|
|
245
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.goodGoodDetailedCompare, values);
|
|
245
246
|
}
|
|
246
247
|
if (localRating === 'good' && fieldRating === 'needs-improvement') {
|
|
247
|
-
return
|
|
248
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.goodNeedsImprovementDetailedCompare, values);
|
|
248
249
|
}
|
|
249
250
|
if (localRating === 'good' && fieldRating === 'poor') {
|
|
250
|
-
return
|
|
251
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.goodPoorDetailedCompare, values);
|
|
251
252
|
}
|
|
252
253
|
if (localRating === 'good' && !fieldRating) {
|
|
253
|
-
return
|
|
254
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.goodSummarized, values);
|
|
254
255
|
}
|
|
255
256
|
if (localRating === 'needs-improvement' && fieldRating === 'good') {
|
|
256
|
-
return
|
|
257
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.needsImprovementGoodDetailedCompare, values);
|
|
257
258
|
}
|
|
258
259
|
if (localRating === 'needs-improvement' && fieldRating === 'needs-improvement') {
|
|
259
|
-
return
|
|
260
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.needsImprovementNeedsImprovementDetailedCompare, values);
|
|
260
261
|
}
|
|
261
262
|
if (localRating === 'needs-improvement' && fieldRating === 'poor') {
|
|
262
|
-
return
|
|
263
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.needsImprovementPoorDetailedCompare, values);
|
|
263
264
|
}
|
|
264
265
|
if (localRating === 'needs-improvement' && !fieldRating) {
|
|
265
|
-
return
|
|
266
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.needsImprovementSummarized, values);
|
|
266
267
|
}
|
|
267
268
|
if (localRating === 'poor' && fieldRating === 'good') {
|
|
268
|
-
return
|
|
269
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.poorGoodDetailedCompare, values);
|
|
269
270
|
}
|
|
270
271
|
if (localRating === 'poor' && fieldRating === 'needs-improvement') {
|
|
271
|
-
return
|
|
272
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.poorNeedsImprovementDetailedCompare, values);
|
|
272
273
|
}
|
|
273
274
|
if (localRating === 'poor' && fieldRating === 'poor') {
|
|
274
|
-
return
|
|
275
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.poorPoorDetailedCompare, values);
|
|
275
276
|
}
|
|
276
277
|
if (localRating === 'poor' && !fieldRating) {
|
|
277
|
-
return
|
|
278
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.poorSummarized, values);
|
|
278
279
|
}
|
|
279
280
|
|
|
280
281
|
throw new Error('Detailed compare string not found');
|
|
@@ -8,6 +8,7 @@ import './Checklist.js';
|
|
|
8
8
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
9
9
|
import type {LCPDiscoveryInsightModel} from '../../../../models/trace/insights/LCPDiscovery.js';
|
|
10
10
|
import * as Trace from '../../../../models/trace/trace.js';
|
|
11
|
+
import * as uiI18n from '../../../../ui/i18n/i18n.js';
|
|
11
12
|
import * as Lit from '../../../../ui/lit/lit.js';
|
|
12
13
|
|
|
13
14
|
import {BaseInsightComponent} from './BaseInsightComponent.js';
|
|
@@ -63,7 +64,7 @@ export class LCPDiscovery extends BaseInsightComponent<LCPDiscoveryInsightModel>
|
|
|
63
64
|
const timeWrapper = document.createElement('span');
|
|
64
65
|
timeWrapper.classList.add('discovery-time-ms');
|
|
65
66
|
timeWrapper.innerText = i18n.TimeUtilities.formatMicroSecondsAsMillisFixed(delay);
|
|
66
|
-
return
|
|
67
|
+
return uiI18n.getFormatLocalizedString(str_, UIStrings.lcpLoadDelay, {PH1: timeWrapper});
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
override renderContent(): Lit.LitTemplate {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Name: Dependencies sourced from the upstream `chromium` repository
|
|
2
|
-
URL: https://
|
|
2
|
+
URL: https://chromium.googlesource.com/chromium/src
|
|
3
3
|
Version: N/A
|
|
4
|
-
Revision:
|
|
4
|
+
Revision: 5ea04b0081c4e9801ea4b74784e39ff75c8c7abb
|
|
5
5
|
Update Mechanism: Manual (https://crbug.com/428069060)
|
|
6
6
|
License: BSD-3-Clause
|
|
7
7
|
License File: LICENSE
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Name: Puppeteer Core
|
|
2
2
|
Short Name: Puppeteer Core
|
|
3
3
|
URL: https://github.com/puppeteer/puppeteer/tree/main/packages/puppeteer-core
|
|
4
|
-
Version: 24.
|
|
4
|
+
Version: 24.27.0
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
License File: LICENSE
|
|
7
|
-
Revision:
|
|
7
|
+
Revision: f73ebcde308687cd3f8d44596371a02c86626fd6
|
|
8
8
|
Security Critical: no
|
|
9
9
|
Shipped: yes
|
|
10
10
|
Update Mechanism: Autoroll
|
|
@@ -136,6 +136,14 @@ export interface BrowserEvents extends Record<EventType, unknown> {
|
|
|
136
136
|
export interface DebugInfo {
|
|
137
137
|
pendingProtocolErrors: Error[];
|
|
138
138
|
}
|
|
139
|
+
/**
|
|
140
|
+
* @public
|
|
141
|
+
*/
|
|
142
|
+
export type CreatePageOptions = {
|
|
143
|
+
type: 'tab';
|
|
144
|
+
} | {
|
|
145
|
+
type: 'window';
|
|
146
|
+
};
|
|
139
147
|
/**
|
|
140
148
|
* {@link Browser} represents a browser instance that is either:
|
|
141
149
|
*
|
|
@@ -240,7 +248,7 @@ export declare abstract class Browser extends EventEmitter<BrowserEvents> {
|
|
|
240
248
|
* Creates a new {@link Page | page} in the
|
|
241
249
|
* {@link Browser.defaultBrowserContext | default browser context}.
|
|
242
250
|
*/
|
|
243
|
-
abstract newPage(): Promise<Page>;
|
|
251
|
+
abstract newPage(options?: CreatePageOptions): Promise<Page>;
|
|
244
252
|
/**
|
|
245
253
|
* Gets all active {@link Target | targets}.
|
|
246
254
|
*
|