chrome-devtools-frontend 1.0.1628368 → 1.0.1629211
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/front_end/core/host/UserMetrics.ts +0 -1
- package/front_end/core/root/ExperimentNames.ts +0 -2
- package/front_end/core/sdk/DOMModel.ts +0 -5
- package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +0 -2
- package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +0 -2
- package/front_end/entrypoints/main/MainImpl.ts +0 -3
- package/front_end/generated/InspectorBackendCommands.ts +2 -2
- package/front_end/generated/protocol.ts +5 -0
- package/front_end/models/emulation/DeviceModeModel.ts +4 -0
- package/front_end/models/issues_manager/GenericIssue.ts +18 -1
- package/front_end/models/issues_manager/descriptions/genericBackUINavigationWouldSkipAd.md +4 -0
- package/front_end/panels/common/freDialog.css +1 -0
- package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
- package/front_end/panels/elements/elements-meta.ts +0 -25
- package/front_end/panels/elements/elements.ts +0 -3
- package/front_end/panels/emulation/DeviceModeToolbar.ts +335 -248
- package/front_end/panels/profiler/ProfilesPanel.ts +7 -1
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +29 -18
- package/front_end/panels/sources/sources-meta.ts +7 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/legacy/TabbedPane.ts +142 -16
- package/front_end/ui/legacy/TextPrompt.docs.ts +51 -0
- package/front_end/ui/legacy/TextPrompt.ts +55 -6
- package/front_end/ui/legacy/Toolbar.ts +2 -1
- package/front_end/ui/legacy/View.ts +2 -1
- package/front_end/ui/legacy/ViewManager.ts +11 -5
- package/front_end/ui/legacy/textPrompt.css +4 -0
- package/mcp/mcp.ts +1 -0
- package/package.json +1 -1
- package/front_end/panels/elements/NodeStackTraceWidget.ts +0 -76
- package/front_end/panels/elements/nodeStackTraceWidget.css +0 -11
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
// Copyright 2019 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
|
-
|
|
5
|
-
import * as i18n from '../../core/i18n/i18n.js';
|
|
6
|
-
import * as SDK from '../../core/sdk/sdk.js';
|
|
7
|
-
import * as Bindings from '../../models/bindings/bindings.js';
|
|
8
|
-
import type * as StackTrace from '../../models/stack_trace/stack_trace.js';
|
|
9
|
-
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
10
|
-
import * as UI from '../../ui/legacy/legacy.js';
|
|
11
|
-
import {html, render} from '../../ui/lit/lit.js';
|
|
12
|
-
|
|
13
|
-
import nodeStackTraceWidgetStyles from './nodeStackTraceWidget.css.js';
|
|
14
|
-
|
|
15
|
-
const UIStrings = {
|
|
16
|
-
/**
|
|
17
|
-
* @description Message displayed when no JavaScript stack trace is available for the DOM node in the Stack Trace widget of the Elements panel
|
|
18
|
-
*/
|
|
19
|
-
noStackTraceAvailable: 'No stack trace available',
|
|
20
|
-
} as const;
|
|
21
|
-
const str_ = i18n.i18n.registerUIStrings('panels/elements/NodeStackTraceWidget.ts', UIStrings);
|
|
22
|
-
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
23
|
-
const {widget} = UI.Widget;
|
|
24
|
-
|
|
25
|
-
interface ViewInput {
|
|
26
|
-
stackTrace?: StackTrace.StackTrace.StackTrace;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
30
|
-
|
|
31
|
-
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
32
|
-
const {stackTrace} = input;
|
|
33
|
-
// clang-format off
|
|
34
|
-
render(html`
|
|
35
|
-
<style>${nodeStackTraceWidgetStyles}</style>
|
|
36
|
-
${target && stackTrace ?
|
|
37
|
-
html`<devtools-widget
|
|
38
|
-
class="stack-trace"
|
|
39
|
-
${widget(Components.JSPresentationUtils.StackTracePreviewContent, {stackTrace})}>
|
|
40
|
-
</devtools-widget>` :
|
|
41
|
-
html`<div class="gray-info-message">${i18nString(UIStrings.noStackTraceAvailable)}</div>`}`,
|
|
42
|
-
target);
|
|
43
|
-
// clang-format on
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export class NodeStackTraceWidget extends UI.Widget.VBox {
|
|
47
|
-
readonly #view: View;
|
|
48
|
-
|
|
49
|
-
constructor(view = DEFAULT_VIEW) {
|
|
50
|
-
super({useShadowDom: true});
|
|
51
|
-
this.#view = view;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
override wasShown(): void {
|
|
55
|
-
super.wasShown();
|
|
56
|
-
UI.Context.Context.instance().addFlavorChangeListener(SDK.DOMModel.DOMNode, this.requestUpdate, this);
|
|
57
|
-
this.requestUpdate();
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
override willHide(): void {
|
|
61
|
-
super.willHide();
|
|
62
|
-
UI.Context.Context.instance().removeFlavorChangeListener(SDK.DOMModel.DOMNode, this.requestUpdate, this);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
override async performUpdate(): Promise<void> {
|
|
66
|
-
const node = UI.Context.Context.instance().flavor(SDK.DOMModel.DOMNode);
|
|
67
|
-
|
|
68
|
-
const target = node?.domModel().target();
|
|
69
|
-
const runtimeStackTrace = await node?.creationStackTrace() ?? undefined;
|
|
70
|
-
const stackTrace = runtimeStackTrace && target ?
|
|
71
|
-
await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().createStackTraceFromProtocolRuntime(
|
|
72
|
-
runtimeStackTrace, target) :
|
|
73
|
-
undefined;
|
|
74
|
-
this.#view({stackTrace}, {}, this.contentElement);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2019 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
|
-
@scope to (devtools-widget > *) {
|
|
7
|
-
.stack-trace {
|
|
8
|
-
font-size: 11px !important; /* stylelint-disable-line declaration-no-important */
|
|
9
|
-
font-family: Menlo, var(--monospace-font-family);
|
|
10
|
-
}
|
|
11
|
-
}
|