chrome-devtools-frontend 1.0.1548980 → 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/contributing/settings-experiments-features.md +35 -0
- package/docs/styleguide/ux/components.md +53 -12
- package/docs/styleguide/ux/images/cards.png +0 -0
- package/docs/styleguide/ux/patterns.md +27 -0
- package/docs/ui_engineering.md +2 -2
- package/eslint.config.mjs +1 -0
- package/front_end/Tests.js +2 -0
- package/front_end/core/host/InspectorFrontendHost.ts +26 -558
- package/front_end/core/host/InspectorFrontendHostAPI.ts +6 -3
- package/front_end/core/host/InspectorFrontendHostStub.ts +558 -0
- package/front_end/core/host/ResourceLoader.ts +9 -23
- package/front_end/core/host/UserMetrics.ts +4 -4
- package/front_end/core/root/DevToolsContext.ts +4 -0
- package/front_end/core/root/Runtime.ts +10 -0
- package/front_end/core/sdk/CSSMatchedStyles.ts +2 -2
- package/front_end/core/sdk/CSSModel.ts +24 -24
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +11 -11
- package/front_end/core/sdk/CSSQuery.ts +1 -1
- package/front_end/core/sdk/CSSRule.ts +2 -2
- package/front_end/core/sdk/CSSStyleDeclaration.ts +1 -1
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +1 -1
- package/front_end/core/sdk/DOMModel.ts +3 -0
- package/front_end/core/sdk/NetworkManager.ts +41 -41
- package/front_end/core/sdk/NetworkRequest.ts +4 -0
- package/front_end/core/sdk/OverlayModel.ts +2 -2
- package/front_end/core/sdk/PageResourceLoader.ts +71 -38
- package/front_end/core/sdk/SourceMap.ts +6 -0
- package/front_end/core/sdk/SourceMapCache.ts +21 -0
- package/front_end/core/sdk/SourceMapManager.ts +14 -7
- package/front_end/core/sdk/SourceMapScopesInfo.ts +6 -2
- package/front_end/core/sdk/TargetManager.ts +14 -2
- package/front_end/core/sdk/sdk-meta.ts +13 -0
- package/front_end/entrypoints/formatter_worker/FormatterActions.ts +1 -0
- package/front_end/entrypoints/formatter_worker/ScopeParser.ts +1 -1
- package/front_end/entrypoints/main/MainImpl.ts +5 -4
- package/front_end/foundation/Universe.ts +8 -1
- package/front_end/generated/Deprecation.ts +18 -4
- package/front_end/generated/InspectorBackendCommands.ts +38 -33
- package/front_end/generated/SupportedCSSProperties.js +41 -41
- package/front_end/generated/protocol-mapping.d.ts +20 -0
- package/front_end/generated/protocol-proxy-api.d.ts +17 -0
- package/front_end/generated/protocol.ts +146 -35
- package/front_end/models/ai_assistance/AiConversation.ts +5 -4
- package/front_end/models/ai_assistance/BuiltInAi.ts +79 -5
- package/front_end/models/ai_assistance/ChangeManager.ts +4 -4
- package/front_end/models/ai_assistance/ConversationHandler.ts +0 -15
- package/front_end/models/ai_assistance/agents/AiAgent.ts +9 -6
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +135 -3
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +24 -0
- package/front_end/models/bindings/CompilerScriptMapping.ts +43 -0
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +19 -0
- package/front_end/models/bindings/ResourceMapping.ts +73 -0
- package/front_end/models/bindings/ResourceScriptMapping.ts +50 -0
- 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 +28 -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/issues_manager/descriptions/genericNavigationEntryMarkedSkippable.md +7 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +7 -16
- package/front_end/models/source_map_scopes/FunctionCodeResolver.snapshot.txt +98 -0
- package/front_end/models/source_map_scopes/FunctionCodeResolver.ts +270 -0
- package/front_end/models/source_map_scopes/source_map_scopes.ts +2 -0
- package/front_end/models/workspace/UISourceCode.ts +51 -44
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +76 -34
- package/front_end/panels/ai_assistance/aiAssistancePanel.css +1 -0
- package/front_end/panels/ai_assistance/components/ChatView.ts +23 -11
- package/front_end/panels/application/AppManifestView.ts +7 -6
- 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/FrameDetailsView.ts +5 -6
- 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/ServiceWorkersView.ts +2 -2
- 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 +4 -8
- package/front_end/panels/application/components/PermissionsPolicySection.ts +202 -158
- package/front_end/panels/application/components/ProtocolHandlersView.ts +118 -81
- package/front_end/panels/application/components/ServiceWorkerRouterView.ts +47 -41
- package/front_end/panels/application/components/SharedStorageMetadataView.ts +1 -1
- package/front_end/panels/application/components/StorageMetadataView.ts +31 -34
- package/front_end/panels/application/components/TrustTokensView.ts +77 -69
- 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 +5 -4
- package/front_end/panels/console/ConsoleViewMessage.ts +16 -15
- package/front_end/panels/console/console-meta.ts +0 -13
- package/front_end/panels/console_counters/WarningErrorCounter.ts +2 -0
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +1 -1
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +3 -1
- package/front_end/panels/elements/CSSRuleValidator.ts +7 -7
- package/front_end/panels/elements/CSSRuleValidatorHelper.ts +2 -2
- 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 +172 -121
- package/front_end/panels/elements/ElementsTreeOutline.ts +11 -3
- package/front_end/panels/elements/LayoutPane.ts +12 -10
- 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 +18 -18
- package/front_end/panels/elements/StylesSidebarPane.ts +4 -5
- package/front_end/panels/elements/TopLayerContainer.ts +2 -2
- package/front_end/panels/elements/components/AdornerManager.ts +3 -3
- 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 +7 -7
- 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 +28 -50
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +15 -11
- 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 +100 -73
- package/front_end/panels/media/playerListView.css +5 -0
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +2 -2
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +4 -5
- 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/RequestConditionsDrawer.ts +5 -5
- package/front_end/panels/network/RequestCookiesView.ts +2 -2
- package/front_end/panels/network/SignedExchangeInfoView.ts +2 -2
- package/front_end/panels/network/components/DirectSocketConnectionView.ts +17 -0
- package/front_end/panels/network/components/RequestTrustTokensView.ts +5 -6
- package/front_end/panels/network/resourceChunkView.css +4 -0
- 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/CookieControlsView.ts +1 -1
- 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/sensors/LocationsSettingsTab.ts +1 -1
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +1 -1
- package/front_end/panels/settings/KeybindsSettingsTab.ts +5 -5
- package/front_end/panels/settings/SettingsScreen.ts +7 -8
- package/front_end/panels/settings/WorkspaceSettingsTab.ts +1 -1
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +1 -1
- package/front_end/panels/snippets/SnippetsQuickOpen.ts +16 -6
- 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 +4 -4
- 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 +40 -23
- package/front_end/panels/sources/GoToLineQuickOpen.ts +11 -5
- package/front_end/panels/sources/NavigatorView.ts +4 -4
- package/front_end/panels/sources/OpenFileQuickOpen.ts +11 -16
- package/front_end/panels/sources/OutlineQuickOpen.ts +23 -23
- package/front_end/panels/sources/ProfilePlugin.ts +21 -12
- 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 -6
- package/front_end/panels/sources/filteredUISourceCodeListProvider.css +41 -0
- package/front_end/panels/timeline/TimelineHistoryManager.ts +2 -2
- package/front_end/panels/timeline/TimelinePanel.ts +29 -25
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +3 -3
- 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/components/insights/SlowCSSSelector.ts +2 -2
- package/front_end/panels/timeline/docs/flame_chart_migration.md +11 -16
- 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 +18 -3
- package/front_end/panels/whats_new/ReleaseNoteText.ts +10 -20
- package/front_end/panels/whats_new/resources/WNDT.md +8 -8
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/third_party/mitt/README.chromium +1 -0
- package/front_end/third_party/puppeteer/third_party/parsel/README.chromium +1 -0
- package/front_end/third_party/puppeteer/third_party/rxjs/README.chromium +1 -0
- package/front_end/ui/components/adorners/Adorner.ts +21 -1
- package/front_end/ui/components/annotations/AnnotationRepository.ts +98 -0
- package/front_end/ui/components/annotations/AnnotationType.ts +10 -0
- package/front_end/ui/components/annotations/annotations.ts +6 -0
- package/front_end/ui/components/buttons/Button.ts +2 -2
- package/front_end/ui/components/buttons/FloatingButton.ts +2 -2
- package/front_end/ui/components/chrome_link/ChromeLink.ts +1 -1
- package/front_end/ui/components/dialogs/ButtonDialog.ts +1 -1
- package/front_end/ui/components/dialogs/Dialog.ts +1 -1
- package/front_end/ui/components/dialogs/ShortcutDialog.ts +1 -0
- package/front_end/ui/components/diff_view/DiffView.ts +1 -1
- package/front_end/ui/components/expandable_list/ExpandableList.ts +1 -1
- package/front_end/ui/components/highlighting/HighlightElement.ts +16 -2
- package/front_end/ui/components/highlighting/MarkupHighlight.ts +162 -0
- package/front_end/ui/components/highlighting/highlighting.ts +7 -0
- package/front_end/ui/components/icon_button/FileSourceIcon.ts +2 -2
- package/front_end/ui/components/icon_button/IconButton.ts +2 -2
- package/front_end/ui/components/icon_button/icon_button.ts +0 -2
- package/front_end/ui/components/issue_counter/IssueCounter.ts +2 -2
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +2 -2
- package/front_end/ui/components/legacy_wrapper/LegacyWrapper.ts +1 -1
- package/front_end/ui/components/linkifier/LinkifierImpl.ts +1 -1
- package/front_end/ui/components/list/List.ts +184 -0
- package/front_end/ui/components/list/list.css +90 -0
- package/front_end/ui/components/{cards/cards.ts → list/lists.ts} +3 -3
- package/front_end/ui/components/markdown_view/CodeBlock.ts +1 -1
- package/front_end/ui/components/markdown_view/MarkdownImage.ts +4 -4
- package/front_end/ui/components/markdown_view/MarkdownLink.ts +1 -1
- package/front_end/ui/components/markdown_view/MarkdownView.ts +1 -1
- package/front_end/ui/components/menus/Menu.ts +1 -1
- package/front_end/ui/components/menus/SelectMenu.ts +1 -1
- package/front_end/ui/components/node_text/NodeText.ts +1 -1
- package/front_end/ui/components/panel_feedback/FeedbackButton.ts +1 -1
- package/front_end/ui/components/panel_feedback/PanelFeedback.ts +1 -1
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +1 -1
- package/front_end/ui/components/panel_introduction_steps/PanelIntroductionSteps.ts +1 -1
- package/front_end/ui/components/report_view/ReportView.ts +1 -1
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +2 -2
- package/front_end/ui/components/settings/SettingCheckbox.ts +1 -1
- package/front_end/ui/components/settings/SettingDeprecationWarning.ts +2 -2
- package/front_end/ui/components/snackbars/Snackbar.ts +1 -1
- package/front_end/ui/components/spinners/Spinner.ts +1 -1
- package/front_end/ui/components/srgb_overlay/SrgbOverlay.ts +1 -1
- package/front_end/ui/components/suggestion_input/SuggestionInput.ts +1 -0
- package/front_end/ui/components/survey_link/SurveyLink.ts +2 -2
- package/front_end/ui/components/switch/SwitchImpl.ts +1 -1
- package/front_end/ui/components/text_editor/TextEditor.ts +1 -0
- package/front_end/ui/components/text_editor/config.ts +2 -2
- package/front_end/ui/components/text_prompt/TextPrompt.ts +1 -1
- package/front_end/ui/components/tooltips/Tooltip.ts +1 -1
- package/front_end/ui/components/tree_outline/TreeOutline.ts +1 -1
- 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 +6 -4
- package/front_end/ui/kit/kit.ts +6 -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 +106 -8
- 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 -188
- package/front_end/ui/legacy/ViewManager.ts +27 -12
- package/front_end/ui/legacy/ViewRegistration.ts +21 -22
- 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/object_ui/ObjectPropertiesSection.ts +5 -4
- package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +73 -35
- package/front_end/ui/legacy/components/perf_ui/LiveHeapProfile.ts +11 -2
- package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +3 -3
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +23 -31
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +11 -27
- package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +11 -15
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +18 -65
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +2 -1
- package/front_end/ui/legacy/components/utils/Linkifier.ts +3 -3
- package/front_end/ui/legacy/tabbedPane.css +10 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
- package/inspector_overlay/README.md +3 -3
- package/mcp/HostBindings.ts +310 -0
- package/mcp/mcp.ts +18 -0
- package/mcp/tsconfig.json +6 -1
- package/package.json +26 -24
- /package/front_end/ui/{components → kit}/cards/Card.ts +0 -0
- /package/front_end/ui/{components → kit}/cards/card.css +0 -0
- /package/front_end/ui/{components/icon_button → kit/icons}/icon.css +0 -0
|
@@ -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');
|
|
@@ -47,8 +47,9 @@ import * as IssuesManager from '../../models/issues_manager/issues_manager.js';
|
|
|
47
47
|
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
|
-
import * as
|
|
50
|
+
import * as Highlighting from '../../ui/components/highlighting/highlighting.js';
|
|
51
51
|
import * as IssueCounter from '../../ui/components/issue_counter/issue_counter.js';
|
|
52
|
+
import {createIcon} from '../../ui/kit/kit.js';
|
|
52
53
|
// eslint-disable-next-line @devtools/es-modules-import
|
|
53
54
|
import objectValueStyles from '../../ui/legacy/components/object_ui/objectValue.css.js';
|
|
54
55
|
import * as SettingsUI from '../../ui/legacy/components/settings_ui/settings_ui.js';
|
|
@@ -1618,7 +1619,7 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
1618
1619
|
matchRange = this.regexMatchRanges[this.currentMatchRangeIndex];
|
|
1619
1620
|
const message = this.visibleViewMessages[matchRange.messageIndex];
|
|
1620
1621
|
message.searchHighlightNode(matchRange.matchIndex)
|
|
1621
|
-
.classList.remove(
|
|
1622
|
+
.classList.remove(Highlighting.highlightedCurrentSearchResultClassName);
|
|
1622
1623
|
}
|
|
1623
1624
|
|
|
1624
1625
|
index = Platform.NumberUtilities.mod(index, this.regexMatchRanges.length);
|
|
@@ -1627,7 +1628,7 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
1627
1628
|
matchRange = this.regexMatchRanges[index];
|
|
1628
1629
|
const message = this.visibleViewMessages[matchRange.messageIndex];
|
|
1629
1630
|
const highlightNode = message.searchHighlightNode(matchRange.matchIndex);
|
|
1630
|
-
highlightNode.classList.add(
|
|
1631
|
+
highlightNode.classList.add(Highlighting.highlightedCurrentSearchResultClassName);
|
|
1631
1632
|
if (scrollIntoView) {
|
|
1632
1633
|
this.viewport.scrollItemIntoView(matchRange.messageIndex);
|
|
1633
1634
|
highlightNode.scrollIntoViewIfNeeded();
|
|
@@ -1780,7 +1781,7 @@ export class ConsoleViewFilter {
|
|
|
1780
1781
|
|
|
1781
1782
|
this.levelMenuButton =
|
|
1782
1783
|
new UI.Toolbar.ToolbarMenuButton(this.appendLevelMenuItems.bind(this), undefined, undefined, 'log-level');
|
|
1783
|
-
const levelMenuButtonInfoIcon =
|
|
1784
|
+
const levelMenuButtonInfoIcon = createIcon('info', 'console-sidebar-levels-info');
|
|
1784
1785
|
levelMenuButtonInfoIcon.title = i18nString(UIStrings.overriddenByFilterSidebar);
|
|
1785
1786
|
this.levelMenuButtonInfo = new UI.Toolbar.ToolbarItem(levelMenuButtonInfoIcon);
|
|
1786
1787
|
this.levelMenuButtonInfo.setVisible(false);
|
|
@@ -49,9 +49,10 @@ import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
|
49
49
|
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
|
-
import * as
|
|
52
|
+
import * as Highlighting from '../../ui/components/highlighting/highlighting.js';
|
|
53
53
|
import * as IssueCounter from '../../ui/components/issue_counter/issue_counter.js';
|
|
54
54
|
import * as RequestLinkIcon from '../../ui/components/request_link_icon/request_link_icon.js';
|
|
55
|
+
import {createIcon, Icon} from '../../ui/kit/kit.js';
|
|
55
56
|
import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
|
|
56
57
|
import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
|
|
57
58
|
// eslint-disable-next-line @devtools/es-modules-import
|
|
@@ -316,14 +317,14 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
316
317
|
protected consoleRowWrapper: HTMLElement|null = null;
|
|
317
318
|
private readonly previewFormatter: ObjectUI.RemoteObjectPreviewFormatter.RemoteObjectPreviewFormatter;
|
|
318
319
|
private searchRegexInternal: RegExp|null;
|
|
319
|
-
protected messageIcon:
|
|
320
|
+
protected messageIcon: Icon|null;
|
|
320
321
|
private traceExpanded: boolean;
|
|
321
322
|
private expandTrace: ((arg0: boolean) => void)|null;
|
|
322
323
|
protected anchorElement: HTMLElement|null;
|
|
323
324
|
protected contentElementInternal: HTMLElement|null;
|
|
324
325
|
private nestingLevelMarkers: HTMLElement[]|null;
|
|
325
326
|
private searchHighlightNodes: Element[];
|
|
326
|
-
private searchHighlightNodeChanges:
|
|
327
|
+
private searchHighlightNodeChanges: Highlighting.HighlightChange[];
|
|
327
328
|
private isVisibleInternal: boolean;
|
|
328
329
|
private cachedHeight: number;
|
|
329
330
|
private messagePrefix: string;
|
|
@@ -661,7 +662,7 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
661
662
|
}
|
|
662
663
|
|
|
663
664
|
private buildMessageWithStackTrace(runtimeModel: SDK.RuntimeModel.RuntimeModel): HTMLElement {
|
|
664
|
-
const icon =
|
|
665
|
+
const icon = createIcon('triangle-right', 'console-message-expand-icon');
|
|
665
666
|
const {stackTraceElement, contentElement, messageElement, clickableElement, toggleElement} =
|
|
666
667
|
this.buildMessageHelper(runtimeModel.target(), this.message.stackTrace, icon);
|
|
667
668
|
// We debounce the trace expansion metric in case this was accidental.
|
|
@@ -710,8 +711,7 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
710
711
|
}
|
|
711
712
|
|
|
712
713
|
private buildMessageHelper(
|
|
713
|
-
target: SDK.Target.Target|null, stackTrace: Protocol.Runtime.StackTrace|undefined,
|
|
714
|
-
icon: IconButton.Icon.Icon|null): {
|
|
714
|
+
target: SDK.Target.Target|null, stackTrace: Protocol.Runtime.StackTrace|undefined, icon: Icon|null): {
|
|
715
715
|
stackTraceElement: HTMLElement,
|
|
716
716
|
contentElement: HTMLElement,
|
|
717
717
|
messageElement: HTMLElement,
|
|
@@ -1567,7 +1567,7 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
1567
1567
|
}
|
|
1568
1568
|
|
|
1569
1569
|
#createHoverButton(): HTMLButtonElement {
|
|
1570
|
-
const icon = new
|
|
1570
|
+
const icon = new Icon();
|
|
1571
1571
|
icon.name = 'lightbulb-spark';
|
|
1572
1572
|
icon.style.color = 'var(--devtools-icon-color)';
|
|
1573
1573
|
icon.classList.add('medium');
|
|
@@ -1630,7 +1630,7 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
1630
1630
|
return;
|
|
1631
1631
|
}
|
|
1632
1632
|
|
|
1633
|
-
this.messageIcon = new
|
|
1633
|
+
this.messageIcon = new Icon();
|
|
1634
1634
|
this.messageIcon.name = iconName;
|
|
1635
1635
|
this.messageIcon.style.color = color;
|
|
1636
1636
|
this.messageIcon.classList.add('message-level-icon', 'small');
|
|
@@ -1739,7 +1739,7 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
1739
1739
|
|
|
1740
1740
|
setSearchRegex(regex: RegExp|null): void {
|
|
1741
1741
|
if (this.searchHighlightNodeChanges?.length) {
|
|
1742
|
-
|
|
1742
|
+
Highlighting.revertDomChanges(this.searchHighlightNodeChanges);
|
|
1743
1743
|
}
|
|
1744
1744
|
this.searchRegexInternal = regex;
|
|
1745
1745
|
this.searchHighlightNodes = [];
|
|
@@ -1757,8 +1757,9 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
1757
1757
|
}
|
|
1758
1758
|
|
|
1759
1759
|
if (sourceRanges.length) {
|
|
1760
|
-
this.searchHighlightNodes =
|
|
1761
|
-
|
|
1760
|
+
this.searchHighlightNodes = Highlighting.highlightRangesWithStyleClass(
|
|
1761
|
+
this.contentElement(), sourceRanges, Highlighting.highlightedSearchResultClassName,
|
|
1762
|
+
this.searchHighlightNodeChanges);
|
|
1762
1763
|
}
|
|
1763
1764
|
}
|
|
1764
1765
|
|
|
@@ -2065,7 +2066,7 @@ function getOrCreateTokenizers(): {
|
|
|
2065
2066
|
|
|
2066
2067
|
export class ConsoleGroupViewMessage extends ConsoleViewMessage {
|
|
2067
2068
|
private collapsedInternal: boolean;
|
|
2068
|
-
private expandGroupIcon:
|
|
2069
|
+
private expandGroupIcon: Icon|null;
|
|
2069
2070
|
private readonly onToggle: () => void;
|
|
2070
2071
|
private groupEndMessageInternal: ConsoleViewMessage|null;
|
|
2071
2072
|
|
|
@@ -2111,7 +2112,7 @@ export class ConsoleGroupViewMessage extends ConsoleViewMessage {
|
|
|
2111
2112
|
if (!element) {
|
|
2112
2113
|
element = super.toMessageElement();
|
|
2113
2114
|
const iconType = this.collapsedInternal ? 'triangle-right' : 'triangle-down';
|
|
2114
|
-
this.expandGroupIcon =
|
|
2115
|
+
this.expandGroupIcon = createIcon(iconType, 'expand-group-icon');
|
|
2115
2116
|
// Intercept focus to avoid highlight on click.
|
|
2116
2117
|
this.contentElement().tabIndex = -1;
|
|
2117
2118
|
if (this.repeatCountElement) {
|
|
@@ -2173,7 +2174,7 @@ export class ConsoleCommand extends ConsoleViewMessage {
|
|
|
2173
2174
|
const newContentElement = document.createElement('div');
|
|
2174
2175
|
this.setContentElement(newContentElement);
|
|
2175
2176
|
newContentElement.classList.add('console-user-command');
|
|
2176
|
-
const userCommandIcon = new
|
|
2177
|
+
const userCommandIcon = new Icon();
|
|
2177
2178
|
userCommandIcon.name = 'chevron-right';
|
|
2178
2179
|
userCommandIcon.classList.add('command-result-icon', 'medium');
|
|
2179
2180
|
newContentElement.appendChild(userCommandIcon);
|
|
@@ -2206,7 +2207,7 @@ export class ConsoleCommandResult extends ConsoleViewMessage {
|
|
|
2206
2207
|
if (!element.classList.contains('console-user-command-result')) {
|
|
2207
2208
|
element.classList.add('console-user-command-result');
|
|
2208
2209
|
if (this.consoleMessage().level === Protocol.Log.LogEntryLevel.Info) {
|
|
2209
|
-
const icon = new
|
|
2210
|
+
const icon = new Icon();
|
|
2210
2211
|
icon.name = 'chevron-left-dot';
|
|
2211
2212
|
icon.classList.add('command-result-icon', 'medium');
|
|
2212
2213
|
element.insertBefore(icon, element.firstChild);
|
|
@@ -53,10 +53,6 @@ const UIStrings = {
|
|
|
53
53
|
* @description Title of a setting under the Console category that can be invoked through the Command Menu
|
|
54
54
|
*/
|
|
55
55
|
showMessagesFromAllContexts: 'Show messages from all contexts',
|
|
56
|
-
/**
|
|
57
|
-
* @description Title of a setting under the Console category in Settings
|
|
58
|
-
*/
|
|
59
|
-
logXmlhttprequests: 'Log XMLHttpRequests',
|
|
60
56
|
/**
|
|
61
57
|
* @description Title of a setting under the Console category
|
|
62
58
|
*/
|
|
@@ -283,15 +279,6 @@ Common.Settings.registerSettingExtension({
|
|
|
283
279
|
],
|
|
284
280
|
});
|
|
285
281
|
|
|
286
|
-
Common.Settings.registerSettingExtension({
|
|
287
|
-
category: Common.Settings.SettingCategory.CONSOLE,
|
|
288
|
-
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
289
|
-
title: i18nLazyString(UIStrings.logXmlhttprequests),
|
|
290
|
-
settingName: 'monitoring-xhr-enabled',
|
|
291
|
-
settingType: Common.Settings.SettingType.BOOLEAN,
|
|
292
|
-
defaultValue: false,
|
|
293
|
-
});
|
|
294
|
-
|
|
295
282
|
Common.Settings.registerSettingExtension({
|
|
296
283
|
category: Common.Settings.SettingCategory.CONSOLE,
|
|
297
284
|
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
@@ -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';
|
|
@@ -72,6 +72,7 @@ interface ViewInput {
|
|
|
72
72
|
filters: TextUtils.TextUtils.ParsedFilter[];
|
|
73
73
|
numResources: number;
|
|
74
74
|
numLoading: number;
|
|
75
|
+
loadThroughTargetSetting: Common.Settings.Setting<boolean>;
|
|
75
76
|
}
|
|
76
77
|
|
|
77
78
|
type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
@@ -91,7 +92,7 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
91
92
|
</devtools-toolbar-input>
|
|
92
93
|
<devtools-checkbox
|
|
93
94
|
title=${i18nString(UIStrings.loadHttpsDeveloperResources)}
|
|
94
|
-
${bindToSetting(
|
|
95
|
+
${bindToSetting(input.loadThroughTargetSetting)}>
|
|
95
96
|
${i18nString(UIStrings.enableLoadingThroughTarget)}
|
|
96
97
|
</devtools-checkbox>
|
|
97
98
|
</devtools-toolbar>
|
|
@@ -146,6 +147,7 @@ export class DeveloperResourcesView extends UI.Widget.VBox {
|
|
|
146
147
|
filters: this.#filters,
|
|
147
148
|
numResources: resources,
|
|
148
149
|
numLoading: loading,
|
|
150
|
+
loadThroughTargetSetting: this.#loader.getLoadThroughTargetSetting(),
|
|
149
151
|
};
|
|
150
152
|
const output = {};
|
|
151
153
|
this.#view(input, output, this.contentElement);
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
isBlockContainer,
|
|
13
13
|
isFlexContainer,
|
|
14
14
|
isGridContainer,
|
|
15
|
+
isGridLanesContainer,
|
|
15
16
|
isInlineElement,
|
|
16
|
-
isMasonryContainer,
|
|
17
17
|
isMulticolContainer,
|
|
18
18
|
isPossiblyReplacedElement,
|
|
19
19
|
} from './CSSRuleValidatorHelper.js';
|
|
@@ -145,7 +145,7 @@ export class AlignContentValidator extends CSSRuleValidator {
|
|
|
145
145
|
}
|
|
146
146
|
const isFlex = isFlexContainer(computedStyles);
|
|
147
147
|
if (!isFlex && !isBlockContainer(computedStyles) && !isGridContainer(computedStyles) &&
|
|
148
|
-
!
|
|
148
|
+
!isGridLanesContainer(computedStyles)) {
|
|
149
149
|
const reasonPropertyDeclaration = buildPropertyDefinitionText('display', computedStyles?.get('display'));
|
|
150
150
|
const affectedPropertyDeclarationCode = buildPropertyName('align-content');
|
|
151
151
|
|
|
@@ -257,7 +257,7 @@ export class GridContainerValidator extends CSSRuleValidator {
|
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
getHint(propertyName: string, computedStyles?: Map<string, string>): Hint|undefined {
|
|
260
|
-
if (isGridContainer(computedStyles) ||
|
|
260
|
+
if (isGridContainer(computedStyles) || isGridLanesContainer(computedStyles)) {
|
|
261
261
|
return;
|
|
262
262
|
}
|
|
263
263
|
const reasonPropertyDeclaration = buildPropertyDefinitionText('display', computedStyles?.get('display'));
|
|
@@ -293,7 +293,7 @@ export class GridItemValidator extends CSSRuleValidator {
|
|
|
293
293
|
if (!parentComputedStyles) {
|
|
294
294
|
return;
|
|
295
295
|
}
|
|
296
|
-
if (isGridContainer(parentComputedStyles) ||
|
|
296
|
+
if (isGridContainer(parentComputedStyles) || isGridLanesContainer(parentComputedStyles)) {
|
|
297
297
|
return;
|
|
298
298
|
}
|
|
299
299
|
const reasonPropertyDeclaration = buildPropertyDefinitionText('display', parentComputedStyles?.get('display'));
|
|
@@ -358,13 +358,13 @@ export class FlexGridValidator extends CSSRuleValidator {
|
|
|
358
358
|
return;
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
-
if (isFlexContainer(computedStyles) || isGridContainer(computedStyles) ||
|
|
361
|
+
if (isFlexContainer(computedStyles) || isGridContainer(computedStyles) || isGridLanesContainer(computedStyles)) {
|
|
362
362
|
return;
|
|
363
363
|
}
|
|
364
364
|
|
|
365
365
|
if (parentComputedStyles &&
|
|
366
366
|
(isFlexContainer(parentComputedStyles) || isGridContainer(parentComputedStyles) ||
|
|
367
|
-
|
|
367
|
+
isGridLanesContainer(parentComputedStyles))) {
|
|
368
368
|
const reasonContainerDisplayName = buildPropertyValue(parentComputedStyles.get('display') as string);
|
|
369
369
|
const reasonPropertyName = buildPropertyName(propertyName);
|
|
370
370
|
const reasonAlternativePropertyName = buildPropertyName('justify-self');
|
|
@@ -414,7 +414,7 @@ export class MulticolFlexGridValidator extends CSSRuleValidator {
|
|
|
414
414
|
}
|
|
415
415
|
|
|
416
416
|
if (isMulticolContainer(computedStyles) || isFlexContainer(computedStyles) || isGridContainer(computedStyles) ||
|
|
417
|
-
|
|
417
|
+
isGridLanesContainer(computedStyles)) {
|
|
418
418
|
return;
|
|
419
419
|
}
|
|
420
420
|
|
|
@@ -91,12 +91,12 @@ export const isGridContainer = (computedStyles?: Map<string, string>): boolean =
|
|
|
91
91
|
return display === 'grid' || display === 'inline-grid';
|
|
92
92
|
};
|
|
93
93
|
|
|
94
|
-
export const
|
|
94
|
+
export const isGridLanesContainer = (computedStyles?: Map<string, string>): boolean => {
|
|
95
95
|
if (!computedStyles) {
|
|
96
96
|
return false;
|
|
97
97
|
}
|
|
98
98
|
const display = computedStyles.get('display');
|
|
99
|
-
return display === '
|
|
99
|
+
return display === 'grid-lanes' || display === 'inline-grid-lanes';
|
|
100
100
|
};
|
|
101
101
|
|
|
102
102
|
export const isMulticolContainer = (computedStyles?: Map<string, string>): boolean => {
|
|
@@ -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
|
}
|