chrome-devtools-frontend 1.0.1549484 → 1.0.1550444
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/styleguide/ux/components.md +53 -12
- package/docs/styleguide/ux/images/cards.png +0 -0
- package/docs/ui_engineering.md +2 -2
- package/front_end/core/sdk/NetworkManager.ts +12 -10
- package/front_end/core/sdk/PageResourceLoader.ts +8 -1
- package/front_end/core/sdk/SourceMapManager.ts +12 -6
- package/front_end/entrypoints/main/MainImpl.ts +0 -9
- package/front_end/foundation/Universe.ts +7 -0
- package/front_end/generated/InspectorBackendCommands.ts +5 -2
- package/front_end/generated/protocol-mapping.d.ts +8 -0
- package/front_end/generated/protocol-proxy-api.d.ts +6 -0
- package/front_end/generated/protocol.ts +76 -0
- package/front_end/models/ai_assistance/BuiltInAi.ts +79 -5
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +6 -8
- package/front_end/models/issues_manager/BounceTrackingIssue.ts +4 -14
- package/front_end/models/issues_manager/ClientHintIssue.ts +5 -12
- package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +5 -12
- package/front_end/models/issues_manager/CookieDeprecationMetadataIssue.ts +7 -14
- package/front_end/models/issues_manager/CookieIssue.ts +27 -30
- package/front_end/models/issues_manager/CorsIssue.ts +8 -17
- package/front_end/models/issues_manager/CrossOriginEmbedderPolicyIssue.ts +5 -8
- package/front_end/models/issues_manager/DeprecationIssue.ts +7 -14
- package/front_end/models/issues_manager/ElementAccessibilityIssue.ts +7 -14
- package/front_end/models/issues_manager/FederatedAuthRequestIssue.ts +4 -11
- package/front_end/models/issues_manager/FederatedAuthUserInfoRequestIssue.ts +4 -11
- package/front_end/models/issues_manager/GenericIssue.ts +11 -16
- package/front_end/models/issues_manager/HeavyAdIssue.ts +4 -11
- package/front_end/models/issues_manager/Issue.ts +12 -4
- package/front_end/models/issues_manager/IssueAggregator.ts +8 -2
- package/front_end/models/issues_manager/LowTextContrastIssue.ts +3 -10
- package/front_end/models/issues_manager/MixedContentIssue.ts +7 -13
- package/front_end/models/issues_manager/PartitioningBlobURLIssue.ts +4 -11
- package/front_end/models/issues_manager/PropertyRuleIssue.ts +6 -12
- package/front_end/models/issues_manager/QuirksModeIssue.ts +3 -10
- package/front_end/models/issues_manager/SRIMessageSignatureIssue.ts +7 -13
- package/front_end/models/issues_manager/SharedArrayBufferIssue.ts +4 -11
- package/front_end/models/issues_manager/SharedDictionaryIssue.ts +6 -13
- package/front_end/models/issues_manager/StylesheetLoadingIssue.ts +8 -13
- package/front_end/models/issues_manager/UnencodedDigestIssue.ts +2 -9
- package/front_end/models/javascript_metadata/NativeFunctions.js +0 -13
- package/front_end/panels/application/AppManifestView.ts +4 -4
- package/front_end/panels/application/ApplicationPanelSidebar.ts +21 -21
- package/front_end/panels/application/BackForwardCacheTreeElement.ts +2 -2
- package/front_end/panels/application/BounceTrackingMitigationsTreeElement.ts +2 -2
- package/front_end/panels/application/InterestGroupTreeElement.ts +2 -2
- package/front_end/panels/application/OpenedWindowDetailsView.ts +2 -2
- package/front_end/panels/application/OriginTrialTreeView.ts +1 -1
- package/front_end/panels/application/PreloadingTreeElement.ts +3 -3
- package/front_end/panels/application/ReportingApiTreeElement.ts +2 -2
- package/front_end/panels/application/ServiceWorkerCacheTreeElement.ts +3 -3
- package/front_end/panels/application/SharedStorageListTreeElement.ts +2 -2
- package/front_end/panels/application/StorageBucketsTreeElement.ts +3 -3
- package/front_end/panels/application/StorageView.ts +2 -2
- package/front_end/panels/application/TrustTokensTreeElement.ts +2 -2
- package/front_end/panels/application/components/PermissionsPolicySection.ts +1 -1
- package/front_end/panels/application/components/ProtocolHandlersView.ts +1 -1
- package/front_end/panels/application/components/SharedStorageMetadataView.ts +1 -1
- package/front_end/panels/application/components/TrustTokensView.ts +1 -1
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +1 -1
- package/front_end/panels/application/preloading/components/RuleSetGrid.ts +1 -1
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +1 -1
- package/front_end/panels/changes/ChangesSidebar.ts +2 -0
- package/front_end/panels/changes/CombinedDiffView.ts +2 -0
- package/front_end/panels/common/AnnotationManager.ts +71 -0
- package/front_end/panels/common/PersistenceUtils.ts +6 -7
- package/front_end/panels/common/common.ts +1 -0
- package/front_end/panels/console/ConsolePrompt.ts +4 -4
- package/front_end/panels/console/ConsoleView.ts +2 -2
- package/front_end/panels/console/ConsoleViewMessage.ts +10 -11
- package/front_end/panels/console_counters/WarningErrorCounter.ts +2 -0
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +1 -1
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +3 -3
- package/front_end/panels/elements/ElementsPanel.ts +49 -0
- package/front_end/panels/elements/ElementsTreeElement.ts +156 -108
- package/front_end/panels/elements/ElementsTreeOutline.ts +9 -2
- package/front_end/panels/elements/ShortcutTreeElement.ts +2 -2
- package/front_end/panels/elements/StyleEditorWidget.ts +2 -2
- package/front_end/panels/elements/StylePropertyTreeElement.ts +6 -6
- package/front_end/panels/elements/StylesSidebarPane.ts +4 -5
- package/front_end/panels/elements/TopLayerContainer.ts +2 -2
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +1 -1
- package/front_end/panels/elements/components/ElementsTreeExpandButton.ts +1 -1
- package/front_end/panels/elements/components/QueryContainer.ts +1 -1
- package/front_end/panels/elements/components/StylePropertyEditor.ts +1 -1
- package/front_end/panels/emulation/DeviceModeWrapper.ts +48 -3
- package/front_end/panels/explain/components/ConsoleInsight.ts +6 -4
- package/front_end/panels/issues/AffectedResourcesView.ts +2 -2
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +2 -2
- package/front_end/panels/issues/IssueKindView.ts +2 -2
- package/front_end/panels/issues/IssueView.ts +4 -4
- package/front_end/panels/js_timeline/js_timeline-meta.ts +4 -2
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplay.ts +1 -1
- package/front_end/panels/media/PlayerListView.ts +1 -1
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +2 -2
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +2 -3
- package/front_end/panels/network/NetworkDataGridNode.ts +3 -3
- package/front_end/panels/network/NetworkFrameGrouper.ts +2 -2
- package/front_end/panels/network/NetworkItemView.ts +4 -4
- package/front_end/panels/network/NetworkLogViewColumns.ts +3 -3
- package/front_end/panels/network/RequestCookiesView.ts +2 -2
- package/front_end/panels/network/SignedExchangeInfoView.ts +2 -2
- package/front_end/panels/network/components/RequestTrustTokensView.ts +5 -6
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +3 -3
- package/front_end/panels/profiler/ProfileDataGrid.ts +2 -2
- package/front_end/panels/profiler/ProfilesPanel.ts +2 -2
- package/front_end/panels/protocol_monitor/JSONEditor.ts +1 -1
- package/front_end/panels/recorder/components/CreateRecordingView.ts +1 -1
- package/front_end/panels/recorder/components/ExtensionView.ts +1 -1
- package/front_end/panels/recorder/components/RecordingListView.ts +1 -1
- package/front_end/panels/recorder/components/RecordingView.ts +1 -1
- package/front_end/panels/recorder/components/StepView.ts +1 -1
- package/front_end/panels/screencast/ScreencastView.ts +8 -8
- package/front_end/panels/search/SearchView.ts +1 -1
- package/front_end/panels/security/CookieControlsTreeElement.ts +2 -2
- package/front_end/panels/security/CookieReportTreeElement.ts +2 -2
- package/front_end/panels/security/SecurityPanel.ts +5 -5
- package/front_end/panels/security/SecurityPanelSidebar.ts +3 -4
- package/front_end/panels/settings/KeybindsSettingsTab.ts +4 -4
- package/front_end/panels/settings/SettingsScreen.ts +2 -3
- package/front_end/panels/snippets/SnippetsQuickOpen.ts +16 -8
- package/front_end/panels/sources/BreakpointEditDialog.ts +3 -3
- package/front_end/panels/sources/BreakpointsView.ts +1 -1
- package/front_end/panels/sources/CSSPlugin.ts +3 -3
- package/front_end/panels/sources/CallStackSidebarPane.ts +4 -4
- package/front_end/panels/sources/DebuggerPausedMessage.ts +3 -3
- package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +39 -30
- package/front_end/panels/sources/GoToLineQuickOpen.ts +11 -7
- package/front_end/panels/sources/NavigatorView.ts +2 -2
- package/front_end/panels/sources/OpenFileQuickOpen.ts +11 -15
- package/front_end/panels/sources/OutlineQuickOpen.ts +23 -26
- package/front_end/panels/sources/SourcesView.ts +2 -2
- package/front_end/panels/sources/TabbedEditorContainer.ts +4 -5
- package/front_end/panels/sources/ThreadsSidebarPane.ts +2 -2
- package/front_end/panels/sources/UISourceCodeFrame.ts +5 -5
- package/front_end/panels/timeline/TimelineHistoryManager.ts +2 -2
- package/front_end/panels/timeline/TimelinePanel.ts +14 -9
- package/front_end/panels/timeline/components/CPUThrottlingSelector.ts +1 -1
- package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -1
- package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +1 -1
- package/front_end/panels/timeline/components/NetworkThrottlingSelector.ts +1 -1
- package/front_end/panels/timeline/components/OriginMap.ts +1 -1
- package/front_end/panels/timeline/components/insights/Checklist.ts +1 -1
- package/front_end/panels/timeline/components/insights/DOMSize.ts +1 -1
- package/front_end/panels/timeline/components/insights/ImageDelivery.ts +1 -1
- package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +1 -1
- package/front_end/panels/timeline/overlays/components/EntriesLinkOverlay.ts +1 -1
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +1 -1
- package/front_end/panels/timeline/timeline-meta.ts +3 -2
- package/front_end/panels/utils/utils.ts +1 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/adorners/Adorner.ts +20 -0
- package/front_end/ui/components/annotations/AnnotationRepository.ts +1 -1
- package/front_end/ui/components/buttons/Button.ts +1 -1
- package/front_end/ui/components/buttons/FloatingButton.ts +1 -1
- package/front_end/ui/components/highlighting/HighlightElement.ts +15 -2
- package/front_end/ui/components/icon_button/FileSourceIcon.ts +1 -1
- package/front_end/ui/components/icon_button/IconButton.ts +1 -1
- package/front_end/ui/components/icon_button/icon_button.ts +0 -2
- package/front_end/ui/components/issue_counter/IssueCounter.ts +1 -1
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +1 -1
- package/front_end/ui/components/markdown_view/MarkdownImage.ts +3 -3
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +1 -1
- package/front_end/ui/components/settings/SettingDeprecationWarning.ts +1 -1
- package/front_end/ui/components/survey_link/SurveyLink.ts +1 -1
- package/front_end/ui/components/text_editor/config.ts +2 -2
- package/front_end/ui/kit/cards/Card.docs.ts +43 -0
- package/front_end/ui/{components/icon_button → kit/icons}/Icon.docs.ts +3 -4
- package/front_end/ui/{components/icon_button → kit/icons}/Icon.ts +4 -4
- package/front_end/ui/kit/kit.ts +1 -0
- package/front_end/ui/legacy/Infobar.ts +3 -3
- package/front_end/ui/legacy/InspectorView.ts +3 -3
- package/front_end/ui/legacy/SearchableView.ts +2 -2
- package/front_end/ui/legacy/SoftContextMenu.ts +5 -5
- package/front_end/ui/legacy/SoftDropDown.ts +2 -2
- package/front_end/ui/legacy/TabbedPane.ts +9 -9
- package/front_end/ui/legacy/Toolbar.ts +3 -3
- package/front_end/ui/legacy/Treeoutline.ts +2 -2
- package/front_end/ui/legacy/UIUtils.ts +4 -4
- package/front_end/ui/legacy/ViewManager.ts +4 -4
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +8 -8
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +4 -4
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +4 -4
- package/front_end/ui/legacy/components/inline_editor/FontEditor.ts +2 -2
- package/front_end/ui/legacy/components/inline_editor/Swatches.ts +5 -5
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +3 -3
- package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +3 -3
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +22 -29
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +8 -15
- package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +11 -14
- package/front_end/ui/legacy/components/utils/Linkifier.ts +3 -3
- package/mcp/mcp.ts +1 -0
- package/package.json +1 -1
- /package/front_end/ui/{components/icon_button → kit/icons}/icon.css +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
/* eslint-disable @devtools/no-lit-render-outside-of-view */
|
|
5
5
|
|
|
6
|
-
import '../../../../ui/
|
|
6
|
+
import '../../../../ui/kit/kit.js';
|
|
7
7
|
import '../../../../ui/components/report_view/report_view.js';
|
|
8
8
|
import './PreloadingMismatchedHeadersGrid.js';
|
|
9
9
|
import './MismatchedPreloadingGrid.js';
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
+
import '../../ui/kit/kit.js';
|
|
6
|
+
|
|
5
7
|
import * as Common from '../../core/common/common.js';
|
|
6
8
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
9
|
import * as Workspace from '../../models/workspace/workspace.js';
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
+
import '../../ui/kit/kit.js';
|
|
6
|
+
|
|
5
7
|
import * as Common from '../../core/common/common.js';
|
|
6
8
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
9
|
import * as Persistence from '../../models/persistence/persistence.js';
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// Copyright 2025 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 type * as Common from '../../core/common/common.js';
|
|
6
|
+
import type * as SDK from '../../core/sdk/sdk.js';
|
|
7
|
+
import * as Annotations from '../../ui/components/annotations/annotations.js';
|
|
8
|
+
|
|
9
|
+
interface AnnotationPlacement {
|
|
10
|
+
parentElement: Element;
|
|
11
|
+
insertBefore?: Node|null;
|
|
12
|
+
resolveRelativePosition:
|
|
13
|
+
(parentElement: Element, revealNode: boolean, lookupId: string,
|
|
14
|
+
node?: SDK.DOMModel.DOMNode) => Promise<{x: number, y: number}|null>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// This class handles general management of Annotations, the data needed to display them and any panel-specific things
|
|
18
|
+
// that the AnnotationRepository must be free from. It is created on-demand the first time a panel, that wants to show
|
|
19
|
+
// an Annotation, appears.
|
|
20
|
+
//
|
|
21
|
+
// NOTE: For now this class is not for general use and is inactive (unless a specific flag is supplied).
|
|
22
|
+
export class AnnotationManager {
|
|
23
|
+
static #instance: AnnotationManager|null = null;
|
|
24
|
+
|
|
25
|
+
#annotationPlacements: Map<Annotations.AnnotationType, AnnotationPlacement>|null = null;
|
|
26
|
+
|
|
27
|
+
constructor() {
|
|
28
|
+
if (!Annotations.AnnotationRepository.annotationsEnabled()) {
|
|
29
|
+
console.warn('AnnotationManager created with annotations disabled');
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
Annotations.AnnotationRepository.instance().addEventListener(
|
|
34
|
+
Annotations.Events.ANNOTATION_ADDED, this.#onAnnotationAdded, this);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
static instance(): AnnotationManager {
|
|
38
|
+
if (!AnnotationManager.#instance) {
|
|
39
|
+
AnnotationManager.#instance = new AnnotationManager();
|
|
40
|
+
}
|
|
41
|
+
return AnnotationManager.#instance;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
initializePlacementForAnnotationType(
|
|
45
|
+
type: Annotations.AnnotationType,
|
|
46
|
+
resolveRelativePosition:
|
|
47
|
+
(parentElement: Element, revealNode: boolean, lookupId: string,
|
|
48
|
+
node?: SDK.DOMModel.DOMNode) => Promise<{x: number, y: number}|null>,
|
|
49
|
+
parentElement: Element, insertBefore: Node|null = null): void {
|
|
50
|
+
if (!Annotations.AnnotationRepository.annotationsEnabled()) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (!this.#annotationPlacements) {
|
|
55
|
+
this.#annotationPlacements = new Map();
|
|
56
|
+
}
|
|
57
|
+
this.#annotationPlacements.set(type, {parentElement, insertBefore, resolveRelativePosition});
|
|
58
|
+
|
|
59
|
+
// eslint-disable-next-line no-console
|
|
60
|
+
console.log(
|
|
61
|
+
`[AnnotationManager] initializing placement for ${Annotations.AnnotationType[type]}`, {parentElement},
|
|
62
|
+
'placement count:', this.#annotationPlacements);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
async #onAnnotationAdded(
|
|
66
|
+
event: Common.EventTarget.EventTargetEvent<Annotations.EventTypes[Annotations.Events.ANNOTATION_ADDED]>):
|
|
67
|
+
Promise<void> {
|
|
68
|
+
// eslint-disable-next-line no-console
|
|
69
|
+
console.log('[AnnotationManager] received event onAnnotationAdded', event);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
// Copyright 2016 The Chromium Authors
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
|
-
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
5
4
|
|
|
6
5
|
import * as Common from '../../core/common/common.js';
|
|
7
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
8
7
|
import * as Platform from '../../core/platform/platform.js';
|
|
9
8
|
import * as Persistence from '../../models/persistence/persistence.js';
|
|
10
9
|
import * as Workspace from '../../models/workspace/workspace.js';
|
|
11
|
-
import
|
|
10
|
+
import {Icon} from '../../ui/kit/kit.js';
|
|
12
11
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
13
12
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
14
13
|
|
|
@@ -43,13 +42,13 @@ export class PersistenceUtils {
|
|
|
43
42
|
return i18nString(UIStrings.linkedToS, {PH1: Platform.StringUtilities.trimMiddle(binding.network.url(), 150)});
|
|
44
43
|
}
|
|
45
44
|
|
|
46
|
-
static iconForUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode):
|
|
45
|
+
static iconForUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): Icon|null {
|
|
47
46
|
const binding = Persistence.Persistence.PersistenceImpl.instance().binding(uiSourceCode);
|
|
48
47
|
if (binding) {
|
|
49
48
|
if (!Common.ParsedURL.schemeIs(binding.fileSystem.url(), 'file:')) {
|
|
50
49
|
return null;
|
|
51
50
|
}
|
|
52
|
-
const icon = new
|
|
51
|
+
const icon = new Icon();
|
|
53
52
|
icon.name = 'document';
|
|
54
53
|
icon.classList.add('small');
|
|
55
54
|
UI.Tooltip.Tooltip.install(icon, PersistenceUtils.tooltipForUISourceCode(binding.network));
|
|
@@ -69,14 +68,14 @@ export class PersistenceUtils {
|
|
|
69
68
|
|
|
70
69
|
if (Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance().isActiveHeaderOverrides(
|
|
71
70
|
uiSourceCode)) {
|
|
72
|
-
const icon = new
|
|
71
|
+
const icon = new Icon();
|
|
73
72
|
icon.name = 'document';
|
|
74
73
|
icon.classList.add('small');
|
|
75
74
|
icon.classList.add('dot', 'purple');
|
|
76
75
|
return icon;
|
|
77
76
|
}
|
|
78
77
|
|
|
79
|
-
const icon = new
|
|
78
|
+
const icon = new Icon();
|
|
80
79
|
icon.name = 'document';
|
|
81
80
|
icon.classList.add('small');
|
|
82
81
|
UI.Tooltip.Tooltip.install(icon, PersistenceUtils.tooltipForUISourceCode(uiSourceCode));
|
|
@@ -97,7 +96,7 @@ export class LinkDecorator extends Common.ObjectWrapper.ObjectWrapper<Components
|
|
|
97
96
|
this.dispatchEventToListeners(Components.Linkifier.LinkDecorator.Events.LINK_ICON_CHANGED, binding.network);
|
|
98
97
|
}
|
|
99
98
|
|
|
100
|
-
linkIcon(uiSourceCode: Workspace.UISourceCode.UISourceCode):
|
|
99
|
+
linkIcon(uiSourceCode: Workspace.UISourceCode.UISourceCode): Icon|null {
|
|
101
100
|
return PersistenceUtils.iconForUISourceCode(uiSourceCode);
|
|
102
101
|
}
|
|
103
102
|
}
|
|
@@ -96,6 +96,7 @@ export class TypeToAllowDialog {
|
|
|
96
96
|
|
|
97
97
|
export {AiCodeCompletionTeaser} from './AiCodeCompletionTeaser.js';
|
|
98
98
|
export {AiCodeGenerationTeaser} from './AiCodeGenerationTeaser.js';
|
|
99
|
+
export {AnnotationManager} from './AnnotationManager.js';
|
|
99
100
|
export {FreDialog} from './FreDialog.js';
|
|
100
101
|
export {GdpSignUpDialog} from './GdpSignUpDialog.js';
|
|
101
102
|
export {AiCodeCompletionDisclaimer} from './AiCodeCompletionDisclaimer.js';
|
|
@@ -13,8 +13,8 @@ import * as Badges from '../../models/badges/badges.js';
|
|
|
13
13
|
import * as Formatter from '../../models/formatter/formatter.js';
|
|
14
14
|
import * as SourceMapScopes from '../../models/source_map_scopes/source_map_scopes.js';
|
|
15
15
|
import * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';
|
|
16
|
-
import * as IconButton from '../../ui/components/icon_button/icon_button.js';
|
|
17
16
|
import * as TextEditor from '../../ui/components/text_editor/text_editor.js';
|
|
17
|
+
import {Icon} from '../../ui/kit/kit.js';
|
|
18
18
|
import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
|
|
19
19
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
20
20
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
@@ -57,7 +57,7 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
57
57
|
private requestPreviewBound: () => Promise<void>;
|
|
58
58
|
private requestPreviewCurrent = 0;
|
|
59
59
|
private readonly innerPreviewElement: HTMLElement;
|
|
60
|
-
private readonly promptIcon:
|
|
60
|
+
private readonly promptIcon: Icon;
|
|
61
61
|
private readonly iconThrottler: Common.Throttler.Throttler;
|
|
62
62
|
private readonly eagerEvalSetting: Common.Settings.Setting<boolean>;
|
|
63
63
|
protected previewRequestForTest: Promise<void>|null;
|
|
@@ -119,7 +119,7 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
119
119
|
this.textChangeThrottler = new Common.Throttler.Throttler(150);
|
|
120
120
|
this.requestPreviewBound = this.requestPreview.bind(this);
|
|
121
121
|
this.innerPreviewElement = this.eagerPreviewElement.createChild('div', 'console-eager-inner-preview');
|
|
122
|
-
const previewIcon = new
|
|
122
|
+
const previewIcon = new Icon();
|
|
123
123
|
previewIcon.name = 'chevron-left-dot';
|
|
124
124
|
previewIcon.classList.add('preview-result-icon', 'medium');
|
|
125
125
|
this.eagerPreviewElement.appendChild(previewIcon);
|
|
@@ -127,7 +127,7 @@ export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
127
127
|
const editorContainerElement = this.element.createChild('div', 'console-prompt-editor-container');
|
|
128
128
|
this.element.appendChild(this.eagerPreviewElement);
|
|
129
129
|
|
|
130
|
-
this.promptIcon = new
|
|
130
|
+
this.promptIcon = new Icon();
|
|
131
131
|
this.promptIcon.name = 'chevron-right';
|
|
132
132
|
this.promptIcon.style.color = 'var(--icon-action)';
|
|
133
133
|
this.promptIcon.classList.add('console-prompt-icon', 'medium');
|
|
@@ -48,8 +48,8 @@ import * as Logs from '../../models/logs/logs.js';
|
|
|
48
48
|
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
49
49
|
import * as CodeHighlighter from '../../ui/components/code_highlighter/code_highlighter.js';
|
|
50
50
|
import * as Highlighting from '../../ui/components/highlighting/highlighting.js';
|
|
51
|
-
import * as IconButton from '../../ui/components/icon_button/icon_button.js';
|
|
52
51
|
import * as IssueCounter from '../../ui/components/issue_counter/issue_counter.js';
|
|
52
|
+
import {createIcon} from '../../ui/kit/kit.js';
|
|
53
53
|
// eslint-disable-next-line @devtools/es-modules-import
|
|
54
54
|
import objectValueStyles from '../../ui/legacy/components/object_ui/objectValue.css.js';
|
|
55
55
|
import * as SettingsUI from '../../ui/legacy/components/settings_ui/settings_ui.js';
|
|
@@ -1781,7 +1781,7 @@ export class ConsoleViewFilter {
|
|
|
1781
1781
|
|
|
1782
1782
|
this.levelMenuButton =
|
|
1783
1783
|
new UI.Toolbar.ToolbarMenuButton(this.appendLevelMenuItems.bind(this), undefined, undefined, 'log-level');
|
|
1784
|
-
const levelMenuButtonInfoIcon =
|
|
1784
|
+
const levelMenuButtonInfoIcon = createIcon('info', 'console-sidebar-levels-info');
|
|
1785
1785
|
levelMenuButtonInfoIcon.title = i18nString(UIStrings.overriddenByFilterSidebar);
|
|
1786
1786
|
this.levelMenuButtonInfo = new UI.Toolbar.ToolbarItem(levelMenuButtonInfoIcon);
|
|
1787
1787
|
this.levelMenuButtonInfo.setVisible(false);
|
|
@@ -50,9 +50,9 @@ import * as Workspace from '../../models/workspace/workspace.js';
|
|
|
50
50
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
51
51
|
import * as CodeHighlighter from '../../ui/components/code_highlighter/code_highlighter.js';
|
|
52
52
|
import * as Highlighting from '../../ui/components/highlighting/highlighting.js';
|
|
53
|
-
import * as IconButton from '../../ui/components/icon_button/icon_button.js';
|
|
54
53
|
import * as IssueCounter from '../../ui/components/issue_counter/issue_counter.js';
|
|
55
54
|
import * as RequestLinkIcon from '../../ui/components/request_link_icon/request_link_icon.js';
|
|
55
|
+
import {createIcon, Icon} from '../../ui/kit/kit.js';
|
|
56
56
|
import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
|
|
57
57
|
import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
|
|
58
58
|
// eslint-disable-next-line @devtools/es-modules-import
|
|
@@ -317,7 +317,7 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
317
317
|
protected consoleRowWrapper: HTMLElement|null = null;
|
|
318
318
|
private readonly previewFormatter: ObjectUI.RemoteObjectPreviewFormatter.RemoteObjectPreviewFormatter;
|
|
319
319
|
private searchRegexInternal: RegExp|null;
|
|
320
|
-
protected messageIcon:
|
|
320
|
+
protected messageIcon: Icon|null;
|
|
321
321
|
private traceExpanded: boolean;
|
|
322
322
|
private expandTrace: ((arg0: boolean) => void)|null;
|
|
323
323
|
protected anchorElement: HTMLElement|null;
|
|
@@ -662,7 +662,7 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
662
662
|
}
|
|
663
663
|
|
|
664
664
|
private buildMessageWithStackTrace(runtimeModel: SDK.RuntimeModel.RuntimeModel): HTMLElement {
|
|
665
|
-
const icon =
|
|
665
|
+
const icon = createIcon('triangle-right', 'console-message-expand-icon');
|
|
666
666
|
const {stackTraceElement, contentElement, messageElement, clickableElement, toggleElement} =
|
|
667
667
|
this.buildMessageHelper(runtimeModel.target(), this.message.stackTrace, icon);
|
|
668
668
|
// We debounce the trace expansion metric in case this was accidental.
|
|
@@ -711,8 +711,7 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
711
711
|
}
|
|
712
712
|
|
|
713
713
|
private buildMessageHelper(
|
|
714
|
-
target: SDK.Target.Target|null, stackTrace: Protocol.Runtime.StackTrace|undefined,
|
|
715
|
-
icon: IconButton.Icon.Icon|null): {
|
|
714
|
+
target: SDK.Target.Target|null, stackTrace: Protocol.Runtime.StackTrace|undefined, icon: Icon|null): {
|
|
716
715
|
stackTraceElement: HTMLElement,
|
|
717
716
|
contentElement: HTMLElement,
|
|
718
717
|
messageElement: HTMLElement,
|
|
@@ -1568,7 +1567,7 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
1568
1567
|
}
|
|
1569
1568
|
|
|
1570
1569
|
#createHoverButton(): HTMLButtonElement {
|
|
1571
|
-
const icon = new
|
|
1570
|
+
const icon = new Icon();
|
|
1572
1571
|
icon.name = 'lightbulb-spark';
|
|
1573
1572
|
icon.style.color = 'var(--devtools-icon-color)';
|
|
1574
1573
|
icon.classList.add('medium');
|
|
@@ -1631,7 +1630,7 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
1631
1630
|
return;
|
|
1632
1631
|
}
|
|
1633
1632
|
|
|
1634
|
-
this.messageIcon = new
|
|
1633
|
+
this.messageIcon = new Icon();
|
|
1635
1634
|
this.messageIcon.name = iconName;
|
|
1636
1635
|
this.messageIcon.style.color = color;
|
|
1637
1636
|
this.messageIcon.classList.add('message-level-icon', 'small');
|
|
@@ -2067,7 +2066,7 @@ function getOrCreateTokenizers(): {
|
|
|
2067
2066
|
|
|
2068
2067
|
export class ConsoleGroupViewMessage extends ConsoleViewMessage {
|
|
2069
2068
|
private collapsedInternal: boolean;
|
|
2070
|
-
private expandGroupIcon:
|
|
2069
|
+
private expandGroupIcon: Icon|null;
|
|
2071
2070
|
private readonly onToggle: () => void;
|
|
2072
2071
|
private groupEndMessageInternal: ConsoleViewMessage|null;
|
|
2073
2072
|
|
|
@@ -2113,7 +2112,7 @@ export class ConsoleGroupViewMessage extends ConsoleViewMessage {
|
|
|
2113
2112
|
if (!element) {
|
|
2114
2113
|
element = super.toMessageElement();
|
|
2115
2114
|
const iconType = this.collapsedInternal ? 'triangle-right' : 'triangle-down';
|
|
2116
|
-
this.expandGroupIcon =
|
|
2115
|
+
this.expandGroupIcon = createIcon(iconType, 'expand-group-icon');
|
|
2117
2116
|
// Intercept focus to avoid highlight on click.
|
|
2118
2117
|
this.contentElement().tabIndex = -1;
|
|
2119
2118
|
if (this.repeatCountElement) {
|
|
@@ -2175,7 +2174,7 @@ export class ConsoleCommand extends ConsoleViewMessage {
|
|
|
2175
2174
|
const newContentElement = document.createElement('div');
|
|
2176
2175
|
this.setContentElement(newContentElement);
|
|
2177
2176
|
newContentElement.classList.add('console-user-command');
|
|
2178
|
-
const userCommandIcon = new
|
|
2177
|
+
const userCommandIcon = new Icon();
|
|
2179
2178
|
userCommandIcon.name = 'chevron-right';
|
|
2180
2179
|
userCommandIcon.classList.add('command-result-icon', 'medium');
|
|
2181
2180
|
newContentElement.appendChild(userCommandIcon);
|
|
@@ -2208,7 +2207,7 @@ export class ConsoleCommandResult extends ConsoleViewMessage {
|
|
|
2208
2207
|
if (!element.classList.contains('console-user-command-result')) {
|
|
2209
2208
|
element.classList.add('console-user-command-result');
|
|
2210
2209
|
if (this.consoleMessage().level === Protocol.Log.LogEntryLevel.Info) {
|
|
2211
|
-
const icon = new
|
|
2210
|
+
const icon = new Icon();
|
|
2212
2211
|
icon.name = 'chevron-left-dot';
|
|
2213
2212
|
icon.classList.add('command-result-icon', 'medium');
|
|
2214
2213
|
element.insertBefore(icon, element.firstChild);
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
+
import '../../ui/components/icon_button/icon_button.js';
|
|
6
|
+
|
|
5
7
|
import * as Common from '../../core/common/common.js';
|
|
6
8
|
import * as Host from '../../core/host/host.js';
|
|
7
9
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import '../../ui/legacy/components/data_grid/data_grid.js';
|
|
6
|
-
import '../../ui/
|
|
6
|
+
import '../../ui/kit/kit.js';
|
|
7
7
|
|
|
8
8
|
import * as Common from '../../core/common/common.js';
|
|
9
9
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
@@ -6,7 +6,7 @@ import * as Common from '../../core/common/common.js';
|
|
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
7
|
import * as Platform from '../../core/platform/platform.js';
|
|
8
8
|
import * as Bindings from '../../models/bindings/bindings.js';
|
|
9
|
-
import type
|
|
9
|
+
import type {Icon} from '../../ui/kit/kit.js';
|
|
10
10
|
import * as ColorPicker from '../../ui/legacy/components/color_picker/color_picker.js';
|
|
11
11
|
import * as InlineEditor from '../../ui/legacy/components/inline_editor/inline_editor.js';
|
|
12
12
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
@@ -33,14 +33,14 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
33
33
|
interface BezierPopoverIconParams {
|
|
34
34
|
treeElement: StylePropertyTreeElement;
|
|
35
35
|
swatchPopoverHelper: InlineEditor.SwatchPopoverHelper.SwatchPopoverHelper;
|
|
36
|
-
swatch:
|
|
36
|
+
swatch: Icon;
|
|
37
37
|
bezierText: HTMLElement;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export class BezierPopoverIcon {
|
|
41
41
|
private treeElement: StylePropertyTreeElement;
|
|
42
42
|
private readonly swatchPopoverHelper: InlineEditor.SwatchPopoverHelper.SwatchPopoverHelper;
|
|
43
|
-
private readonly swatch:
|
|
43
|
+
private readonly swatch: Icon;
|
|
44
44
|
private readonly bezierText: HTMLElement;
|
|
45
45
|
private readonly boundBezierChanged: (event: Common.EventTarget.EventTargetEvent<string>) => void;
|
|
46
46
|
private readonly boundOnScroll: (event: Event) => void;
|
|
@@ -39,8 +39,10 @@ import * as i18n from '../../core/i18n/i18n.js';
|
|
|
39
39
|
import * as Platform from '../../core/platform/platform.js';
|
|
40
40
|
import * as Root from '../../core/root/root.js';
|
|
41
41
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
42
|
+
import type * as Protocol from '../../generated/protocol.js';
|
|
42
43
|
import * as PanelCommon from '../../panels/common/common.js';
|
|
43
44
|
import type * as Adorners from '../../ui/components/adorners/adorners.js';
|
|
45
|
+
import * as Annotations from '../../ui/components/annotations/annotations.js';
|
|
44
46
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
45
47
|
import * as TreeOutline from '../../ui/components/tree_outline/tree_outline.js';
|
|
46
48
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
@@ -332,6 +334,12 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
|
332
334
|
.addChangeListener(this.showUAShadowDOMChanged.bind(this));
|
|
333
335
|
PanelCommon.ExtensionServer.ExtensionServer.instance().addEventListener(
|
|
334
336
|
PanelCommon.ExtensionServer.Events.SidebarPaneAdded, this.extensionSidebarPaneAdded, this);
|
|
337
|
+
|
|
338
|
+
if (Annotations.AnnotationRepository.annotationsEnabled()) {
|
|
339
|
+
PanelCommon.AnnotationManager.instance().initializePlacementForAnnotationType(
|
|
340
|
+
Annotations.AnnotationType.ELEMENT_NODE, this.resolveRelativePosition.bind(this),
|
|
341
|
+
this.#domTreeWidget.element);
|
|
342
|
+
}
|
|
335
343
|
}
|
|
336
344
|
|
|
337
345
|
private initializeFullAccessibilityTreeView(): void {
|
|
@@ -1169,6 +1177,47 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
|
1169
1177
|
this.#domTreeWidget.copyStyles(node);
|
|
1170
1178
|
}
|
|
1171
1179
|
|
|
1180
|
+
async resolveRelativePosition(
|
|
1181
|
+
parentElement: Element, revealNode: boolean, lookupId: string,
|
|
1182
|
+
node?: SDK.DOMModel.DOMNode): Promise<{x: number, y: number}|null> {
|
|
1183
|
+
if (!node) {
|
|
1184
|
+
const backendNodeId = Number(lookupId) as Protocol.DOM.BackendNodeId;
|
|
1185
|
+
if (isNaN(backendNodeId)) {
|
|
1186
|
+
return null;
|
|
1187
|
+
}
|
|
1188
|
+
const rootDOMNode = this.#domTreeWidget.rootDOMNode;
|
|
1189
|
+
if (!rootDOMNode) {
|
|
1190
|
+
return null;
|
|
1191
|
+
}
|
|
1192
|
+
const domModel = rootDOMNode.domModel();
|
|
1193
|
+
const nodes = await domModel.pushNodesByBackendIdsToFrontend(new Set([backendNodeId]));
|
|
1194
|
+
if (!nodes) {
|
|
1195
|
+
return null;
|
|
1196
|
+
}
|
|
1197
|
+
const foundNode = nodes.get(backendNodeId);
|
|
1198
|
+
if (!foundNode) {
|
|
1199
|
+
return null;
|
|
1200
|
+
}
|
|
1201
|
+
node = foundNode;
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
const element = this.#domTreeWidget.treeElementForNode(node);
|
|
1205
|
+
if (!element) {
|
|
1206
|
+
return null;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
if (revealNode) {
|
|
1210
|
+
// The node must have been revealed in order to calculate its position.
|
|
1211
|
+
await Common.Revealer.reveal(node);
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
const targetRect = element.listItemElement.getBoundingClientRect();
|
|
1215
|
+
const parentRect = parentElement.getBoundingClientRect();
|
|
1216
|
+
const relativeX = 0;
|
|
1217
|
+
const relativeY = targetRect.y - parentRect.y;
|
|
1218
|
+
return {x: relativeX, y: relativeY};
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1172
1221
|
protected static firstInspectElementCompletedForTest = function(): void {};
|
|
1173
1222
|
protected static firstInspectElementNodeNameForTest = '';
|
|
1174
1223
|
}
|