chrome-devtools-frontend 1.0.1547147 → 1.0.1548870
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/.stylelintrc.json +5 -1
- package/docs/contributing/infrastructure.md +2 -2
- package/eslint.config.mjs +3 -2
- package/front_end/Images/generate-css-vars.js +1 -1
- package/front_end/core/common/common.ts +0 -2
- package/front_end/core/i18n/collect-ui-strings.js +1 -1
- package/front_end/core/i18n/generate-locales-js.js +1 -1
- package/front_end/core/platform/HostRuntime.ts +14 -7
- package/front_end/core/platform/api/HostRuntime.ts +28 -3
- package/front_end/core/platform/browser/HostRuntime.ts +66 -5
- package/front_end/core/platform/node/HostRuntime.ts +76 -4
- package/front_end/core/sdk/AnimationModel.ts +1 -1
- package/front_end/core/sdk/CSSModel.ts +1 -1
- package/front_end/core/sdk/CSSProperty.ts +1 -1
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +1 -1
- package/front_end/core/sdk/ConsoleModel.ts +1 -1
- package/front_end/core/sdk/Cookie.ts +1 -1
- package/front_end/core/sdk/DOMModel.ts +2 -2
- package/front_end/core/sdk/DebuggerModel.ts +1 -1
- package/front_end/core/sdk/NetworkManager.ts +6 -0
- package/front_end/core/sdk/PreloadingModel.ts +1 -1
- package/front_end/core/sdk/RemoteObject.ts +1 -1
- package/front_end/core/sdk/ResourceTreeModel.ts +1 -1
- package/front_end/core/sdk/Script.ts +4 -4
- package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +2 -2
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +15 -18
- package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +8 -5
- package/front_end/entrypoints/main/ExecutionContextSelector.ts +1 -1
- package/front_end/entrypoints/main/MainImpl.ts +2 -2
- package/front_end/generated/Deprecation.ts +19 -0
- package/front_end/generated/InspectorBackendCommands.ts +4 -3
- package/front_end/generated/SupportedCSSProperties.js +13 -13
- package/front_end/generated/protocol-mapping.d.ts +2 -0
- package/front_end/generated/protocol-proxy-api.d.ts +4 -0
- package/front_end/generated/protocol.ts +16 -27
- package/front_end/models/ai_assistance/AiConversation.ts +104 -24
- package/front_end/models/ai_assistance/BuiltInAi.ts +131 -134
- package/front_end/models/ai_assistance/ChangeManager.ts +9 -0
- package/front_end/models/ai_assistance/ConversationHandler.ts +23 -48
- package/front_end/models/ai_assistance/agents/AiAgent.ts +8 -5
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +0 -10
- package/front_end/models/formatter/FormatterWorkerPool.ts +9 -7
- package/front_end/models/har/Importer.ts +1 -1
- package/front_end/models/issues_manager/ContrastCheckTrigger.ts +1 -1
- package/front_end/models/persistence/AutomaticFileSystemManager.ts +1 -1
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +80 -153
- package/front_end/panels/ai_assistance/components/ChatView.ts +54 -31
- package/front_end/panels/application/ExtensionStorageModel.ts +1 -1
- package/front_end/panels/application/FrameDetailsView.ts +62 -34
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +1 -1
- package/front_end/panels/application/components/components.ts +0 -2
- package/front_end/panels/console/ConsoleInsightTeaser.ts +166 -100
- package/front_end/panels/console/ConsolePrompt.ts +1 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +77 -29
- package/front_end/panels/console/ConsoleViewport.ts +1 -1
- package/front_end/panels/console/consoleInsightTeaser.css +1 -0
- package/front_end/panels/coverage/CoverageModel.ts +2 -2
- package/front_end/panels/elements/ElementsPanel.ts +1 -1
- package/front_end/panels/elements/ElementsTreeOutline.ts +17 -7
- package/front_end/panels/elements/NodeStackTraceWidget.ts +6 -5
- package/front_end/panels/elements/StylePropertyTreeElement.ts +1 -2
- package/front_end/panels/explain/components/ConsoleInsight.ts +1 -1
- package/front_end/panels/network/RequestConditionsDrawer.ts +64 -20
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotProxy.ts +15 -14
- package/front_end/panels/recorder/components/StepEditor.ts +1 -1
- package/front_end/panels/security/SecurityPanelSidebar.ts +1 -3
- package/front_end/panels/settings/KeybindsSettingsTab.ts +1 -1
- package/front_end/panels/sources/CSSPlugin.ts +1 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +2 -2
- package/front_end/panels/sources/NavigatorView.ts +1 -1
- package/front_end/panels/sources/SourcesSearchScope.ts +1 -1
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +10 -2
- package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -1
- package/front_end/panels/timeline/TimelinePanel.ts +7 -7
- package/front_end/panels/timeline/TimelineUIUtils.ts +3 -1
- package/front_end/panels/timeline/enable-easter-egg.js +1 -1
- package/front_end/panels/timeline/utils/Treemap.ts +1 -1
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts +66 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js +57 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +2 -2
- 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/api/api.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/api.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js +1 -6
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +0 -4
- 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 +18 -23
- 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/BrowsingContext.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +16 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts +4 -62
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js +9 -73
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +1 -1
- 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 -3
- 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/common/ConsoleMessage.d.ts +8 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.js +11 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConsoleMessage.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/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 +9 -10
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +80 -81
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts +66 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js +52 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/DeviceRequestPrompt.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +2 -2
- 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/api/api.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/api.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js +1 -6
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +0 -4
- 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 +18 -23
- 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/BrowsingContext.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +16 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts +4 -62
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js +6 -69
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/DeviceRequestPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +1 -1
- 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 -3
- 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/common/ConsoleMessage.d.ts +8 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.js +11 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConsoleMessage.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/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 +9 -10
- package/front_end/third_party/puppeteer/package/package.json +3 -3
- package/front_end/third_party/puppeteer/package/src/api/DeviceRequestPrompt.ts +79 -0
- package/front_end/third_party/puppeteer/package/src/api/Frame.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/api/api.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +1 -9
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +21 -31
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +18 -0
- package/front_end/third_party/puppeteer/package/src/cdp/DeviceRequestPrompt.ts +6 -72
- package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +2 -4
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +7 -2
- package/front_end/third_party/puppeteer/package/src/common/ConsoleMessage.ts +14 -0
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +1 -0
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +4 -0
- package/front_end/ui/components/text_editor/javascript.ts +1 -1
- package/front_end/ui/legacy/ListWidget.ts +51 -18
- package/front_end/ui/legacy/ReportView.ts +1 -1
- package/front_end/ui/legacy/TabbedPane.ts +3 -3
- package/front_end/ui/legacy/Treeoutline.ts +1 -1
- package/front_end/ui/legacy/components/color_picker/ContrastInfo.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +3 -2
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +87 -111
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +1 -2
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +40 -11
- package/front_end/ui/legacy/components/utils/jsUtils.css +28 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/front_end/ui/visual_logging/LoggingConfig.ts +2 -1
- package/inspector_overlay/tool_window_controls.ts +4 -1
- package/mcp/mcp.ts +1 -1
- package/package.json +2 -3
- package/front_end/core/common/Worker.ts +0 -60
- package/front_end/panels/application/components/StackTrace.ts +0 -238
- package/front_end/panels/application/components/stackTraceLinkButton.css +0 -16
- package/front_end/panels/application/components/stackTraceRow.css +0 -50
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
// Copyright 2021 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
/* eslint-disable @devtools/no-lit-render-outside-of-view */
|
|
5
|
-
|
|
6
|
-
import '../../../ui/components/expandable_list/expandable_list.js';
|
|
7
|
-
|
|
8
|
-
import * as i18n from '../../../core/i18n/i18n.js';
|
|
9
|
-
import type * as SDK from '../../../core/sdk/sdk.js';
|
|
10
|
-
import type * as Protocol from '../../../generated/protocol.js';
|
|
11
|
-
import * as Components from '../../../ui/legacy/components/utils/utils.js';
|
|
12
|
-
import * as UI from '../../../ui/legacy/legacy.js';
|
|
13
|
-
import {html, nothing, render, type TemplateResult} from '../../../ui/lit/lit.js';
|
|
14
|
-
import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
|
15
|
-
|
|
16
|
-
import stackTraceLinkButtonStyles from './stackTraceLinkButton.css.js';
|
|
17
|
-
import stackTraceRowStyles from './stackTraceRow.css.js';
|
|
18
|
-
|
|
19
|
-
const {widgetConfig} = UI.Widget;
|
|
20
|
-
|
|
21
|
-
const UIStrings = {
|
|
22
|
-
/**
|
|
23
|
-
* @description Error message stating that something went wrong when trying to render stack trace
|
|
24
|
-
*/
|
|
25
|
-
cannotRenderStackTrace: 'Cannot render stack trace',
|
|
26
|
-
/**
|
|
27
|
-
* @description A link to show more frames in the stack trace if more are available. Never 0.
|
|
28
|
-
*/
|
|
29
|
-
showSMoreFrames: '{n, plural, =1 {Show # more frame} other {Show # more frames}}',
|
|
30
|
-
/**
|
|
31
|
-
* @description A link to rehide frames that are by default hidden.
|
|
32
|
-
*/
|
|
33
|
-
showLess: 'Show less',
|
|
34
|
-
/**
|
|
35
|
-
* @description Label for a stack trace. If a frame is created programmatically (i.e. via JavaScript), there is a
|
|
36
|
-
* stack trace for the line of code which caused the creation of the iframe. This is the stack trace we are showing here.
|
|
37
|
-
*/
|
|
38
|
-
creationStackTrace: 'Frame Creation `Stack Trace`',
|
|
39
|
-
} as const;
|
|
40
|
-
const str_ = i18n.i18n.registerUIStrings('panels/application/components/StackTrace.ts', UIStrings);
|
|
41
|
-
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
42
|
-
|
|
43
|
-
export interface StackTraceData {
|
|
44
|
-
creationStackTraceData: {
|
|
45
|
-
creationStackTrace: Protocol.Runtime.StackTrace|null,
|
|
46
|
-
creationStackTraceTarget: SDK.Target.Target|null,
|
|
47
|
-
};
|
|
48
|
-
buildStackTraceRows: (
|
|
49
|
-
stackTrace: Protocol.Runtime.StackTrace,
|
|
50
|
-
target: SDK.Target.Target|null,
|
|
51
|
-
linkifier: Components.Linkifier.Linkifier,
|
|
52
|
-
tabStops: boolean|undefined,
|
|
53
|
-
updateCallback?: (arg0: Array<Components.JSPresentationUtils.StackTraceRegularRow|
|
|
54
|
-
Components.JSPresentationUtils.StackTraceAsyncRow>) => void,
|
|
55
|
-
) => Array<Components.JSPresentationUtils.StackTraceRegularRow|Components.JSPresentationUtils.StackTraceAsyncRow>;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
interface StackTraceRowViewInput {
|
|
59
|
-
stackTraceRowItem: Components.JSPresentationUtils.StackTraceRegularRow|null;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
type StackTraceRowView = (input: StackTraceRowViewInput, output: undefined, target: HTMLElement) => void;
|
|
63
|
-
const ROW_DEFAULT_VIEW: StackTraceRowView = (input, output, target) => {
|
|
64
|
-
if (!input.stackTraceRowItem) {
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
// clang-format off
|
|
68
|
-
render(html`
|
|
69
|
-
<style>${stackTraceRowStyles}</style>
|
|
70
|
-
<div class="stack-trace-row">
|
|
71
|
-
<div class="stack-trace-function-name text-ellipsis" title=${input.stackTraceRowItem.functionName}>
|
|
72
|
-
${input.stackTraceRowItem.functionName}
|
|
73
|
-
</div>
|
|
74
|
-
<div class="stack-trace-source-location">
|
|
75
|
-
${input.stackTraceRowItem.link ? html`
|
|
76
|
-
<div class="text-ellipsis">\xA0@\xA0${input.stackTraceRowItem.link}</div>` :
|
|
77
|
-
nothing}
|
|
78
|
-
</div>
|
|
79
|
-
</div>`, target);
|
|
80
|
-
// clang-format on
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
export class StackTraceRow extends UI.Widget.Widget {
|
|
84
|
-
constructor(element?: HTMLElement, view = ROW_DEFAULT_VIEW) {
|
|
85
|
-
super(element, {useShadowDom: true});
|
|
86
|
-
this.#view = view;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
stackTraceRowItem: Components.JSPresentationUtils.StackTraceRegularRow|null = null;
|
|
90
|
-
#view: StackTraceRowView;
|
|
91
|
-
|
|
92
|
-
override performUpdate(): void {
|
|
93
|
-
this.#view(this, undefined, this.contentElement);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
interface StackTraceLinkViewInput {
|
|
98
|
-
onShowAllClick: () => void;
|
|
99
|
-
hiddenCallFramesCount: number|null;
|
|
100
|
-
expandedView: boolean;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
type StackTraceLinkView = (input: StackTraceLinkViewInput, output: undefined, target: HTMLElement) => void;
|
|
104
|
-
const LINK_DEFAULT_VIEW: StackTraceLinkView = (input, output, target) => {
|
|
105
|
-
if (!input.hiddenCallFramesCount) {
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
const linkText = input.expandedView ? i18nString(UIStrings.showLess) :
|
|
109
|
-
i18nString(UIStrings.showSMoreFrames, {n: input.hiddenCallFramesCount});
|
|
110
|
-
// clang-format off
|
|
111
|
-
render(html`
|
|
112
|
-
<style>${stackTraceLinkButtonStyles}</style>
|
|
113
|
-
<div class="stack-trace-row">
|
|
114
|
-
<button class="link" @click=${() => input.onShowAllClick()}>
|
|
115
|
-
${linkText}
|
|
116
|
-
</button>
|
|
117
|
-
</div>`, target);
|
|
118
|
-
// clang-format on
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
export class StackTraceLinkButton extends UI.Widget.Widget {
|
|
122
|
-
onShowAllClick: () => void = () => {};
|
|
123
|
-
hiddenCallFramesCount: number|null = null;
|
|
124
|
-
expandedView = false;
|
|
125
|
-
#view: StackTraceLinkView;
|
|
126
|
-
|
|
127
|
-
constructor(element?: HTMLElement, view = LINK_DEFAULT_VIEW) {
|
|
128
|
-
super(element, {useShadowDom: true});
|
|
129
|
-
this.#view = view;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
override performUpdate(): void {
|
|
133
|
-
this.#view(this, undefined, this.contentElement);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export class StackTrace extends UI.Widget.Widget {
|
|
138
|
-
readonly #linkifier = new Components.Linkifier.Linkifier();
|
|
139
|
-
#stackTraceRows:
|
|
140
|
-
Array<Components.JSPresentationUtils.StackTraceRegularRow|Components.JSPresentationUtils.StackTraceAsyncRow> = [];
|
|
141
|
-
#showHidden = false;
|
|
142
|
-
|
|
143
|
-
constructor(element?: HTMLElement) {
|
|
144
|
-
super(element, {useShadowDom: true});
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
set data(data: StackTraceData) {
|
|
148
|
-
const {creationStackTrace, creationStackTraceTarget} = data.creationStackTraceData;
|
|
149
|
-
if (creationStackTrace) {
|
|
150
|
-
this.#stackTraceRows = data.buildStackTraceRows(
|
|
151
|
-
creationStackTrace, creationStackTraceTarget, this.#linkifier, true,
|
|
152
|
-
this.#onStackTraceRowsUpdated.bind(this));
|
|
153
|
-
}
|
|
154
|
-
this.#render();
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
#onStackTraceRowsUpdated(
|
|
158
|
-
stackTraceRows:
|
|
159
|
-
Array<Components.JSPresentationUtils.StackTraceRegularRow|Components.JSPresentationUtils.StackTraceAsyncRow>):
|
|
160
|
-
void {
|
|
161
|
-
this.#stackTraceRows = stackTraceRows;
|
|
162
|
-
this.#render();
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
#onToggleShowAllClick(): void {
|
|
166
|
-
this.#showHidden = !this.#showHidden;
|
|
167
|
-
this.#render();
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
createRowTemplates(): TemplateResult[] {
|
|
171
|
-
const expandableRows = [];
|
|
172
|
-
let hiddenCallFramesCount = 0;
|
|
173
|
-
for (const item of this.#stackTraceRows) {
|
|
174
|
-
let ignoreListHide = false;
|
|
175
|
-
// TODO(crbug.com/1183325): fix race condition with uiLocation still being null here
|
|
176
|
-
// Note: This has always checked whether the call frame location *in the generated
|
|
177
|
-
// code* is ignore-listed or not. This can change after the live location updates,
|
|
178
|
-
// and is handled again in the linkifier live location update callback.
|
|
179
|
-
if ('link' in item && item.link) {
|
|
180
|
-
const uiLocation = Components.Linkifier.Linkifier.uiLocation(item.link);
|
|
181
|
-
ignoreListHide = Boolean(uiLocation?.isIgnoreListed());
|
|
182
|
-
}
|
|
183
|
-
if (this.#showHidden || !ignoreListHide) {
|
|
184
|
-
if ('functionName' in item) {
|
|
185
|
-
expandableRows.push(html`
|
|
186
|
-
<devtools-widget data-stack-trace-row .widgetConfig=${widgetConfig(StackTraceRow, {
|
|
187
|
-
stackTraceRowItem: item
|
|
188
|
-
})}></devtools-widget>`);
|
|
189
|
-
}
|
|
190
|
-
if ('asyncDescription' in item) {
|
|
191
|
-
expandableRows.push(html`
|
|
192
|
-
<div>${item.asyncDescription}</div>
|
|
193
|
-
`);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
if ('functionName' in item && ignoreListHide) {
|
|
197
|
-
hiddenCallFramesCount++;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
if (hiddenCallFramesCount) {
|
|
201
|
-
// Disabled until https://crbug.com/1079231 is fixed.
|
|
202
|
-
// clang-format off
|
|
203
|
-
expandableRows.push(html`
|
|
204
|
-
<devtools-widget data-stack-trace-row .widgetConfig=${widgetConfig(StackTraceLinkButton, {
|
|
205
|
-
onShowAllClick: this.#onToggleShowAllClick.bind(this),
|
|
206
|
-
hiddenCallFramesCount,
|
|
207
|
-
expandedView: this.#showHidden})}>
|
|
208
|
-
</devtools-widget>
|
|
209
|
-
`);
|
|
210
|
-
// clang-format on
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
return expandableRows;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
#render(): void {
|
|
217
|
-
if (!this.#stackTraceRows.length) {
|
|
218
|
-
// Disabled until https://crbug.com/1079231 is fixed.
|
|
219
|
-
// clang-format off
|
|
220
|
-
render(
|
|
221
|
-
html`
|
|
222
|
-
<span>${i18nString(UIStrings.cannotRenderStackTrace)}</span>
|
|
223
|
-
`,
|
|
224
|
-
this.contentElement, {host: this});
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
const expandableRows = this.createRowTemplates();
|
|
229
|
-
render(
|
|
230
|
-
html`
|
|
231
|
-
<devtools-expandable-list .data=${{rows: expandableRows, title: i18nString(UIStrings.creationStackTrace)}}
|
|
232
|
-
jslog=${VisualLogging.tree()}>
|
|
233
|
-
</devtools-expandable-list>
|
|
234
|
-
`,
|
|
235
|
-
this.contentElement, {host: this});
|
|
236
|
-
// clang-format on
|
|
237
|
-
}
|
|
238
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2021 The Chromium Authors
|
|
3
|
-
* Use of this source code is governed by a BSD-style license that can be
|
|
4
|
-
* found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
button.link {
|
|
8
|
-
color: var(--sys-color-primary);
|
|
9
|
-
text-decoration: underline;
|
|
10
|
-
cursor: pointer;
|
|
11
|
-
outline-offset: 2px;
|
|
12
|
-
border: none;
|
|
13
|
-
background: none;
|
|
14
|
-
font-family: inherit;
|
|
15
|
-
font-size: inherit;
|
|
16
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2021 The Chromium Authors
|
|
3
|
-
* Use of this source code is governed by a BSD-style license that can be
|
|
4
|
-
* found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
.stack-trace-row {
|
|
8
|
-
display: flex;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.stack-trace-function-name {
|
|
12
|
-
width: 100px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.stack-trace-source-location {
|
|
16
|
-
display: flex;
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.text-ellipsis {
|
|
21
|
-
overflow: hidden;
|
|
22
|
-
text-overflow: ellipsis;
|
|
23
|
-
white-space: nowrap;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.stack-trace-source-location .text-ellipsis {
|
|
27
|
-
padding-right: 2px;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.ignore-list-link {
|
|
31
|
-
opacity: 60%;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.link,
|
|
35
|
-
.devtools-link {
|
|
36
|
-
color: var(--sys-color-primary);
|
|
37
|
-
text-decoration: underline;
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
outline-offset: 2px;
|
|
40
|
-
border: none;
|
|
41
|
-
background: none;
|
|
42
|
-
font-family: inherit;
|
|
43
|
-
font-size: var(--sys-size-6);
|
|
44
|
-
|
|
45
|
-
&:focus-visible {
|
|
46
|
-
outline: 2px solid var(--sys-color-state-focus-ring);
|
|
47
|
-
outline-offset: 0;
|
|
48
|
-
border-radius: var(--sys-shape-corner-extra-small);
|
|
49
|
-
}
|
|
50
|
-
}
|