chrome-devtools-frontend 1.0.1695017 → 1.0.1696961
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/eslint.config.mjs +4 -1
- package/front_end/core/common/Base64.ts +14 -4
- package/front_end/core/common/Gzip.ts +1 -1
- package/front_end/core/common/Object.ts +0 -1
- package/front_end/core/platform/Size.ts +43 -0
- package/front_end/core/platform/api/HostRuntime.ts +14 -0
- package/front_end/core/platform/browser/HostRuntime.ts +66 -0
- package/front_end/core/platform/node/HostRuntime.ts +12 -3
- package/front_end/core/platform/platform.ts +1 -0
- package/front_end/core/sdk/AccessibilityModel.ts +2 -2
- package/front_end/core/sdk/CSSMatchedStyles.ts +2 -0
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +29 -0
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +2 -2
- package/front_end/core/sdk/ConsoleModel.ts +3 -3
- package/front_end/core/sdk/DOMModel.ts +10 -6
- package/front_end/core/sdk/DebuggerModel.ts +6 -0
- package/front_end/core/sdk/NetworkRequest.ts +19 -19
- package/front_end/core/sdk/RuntimeModel.ts +5 -0
- package/front_end/core/sdk/Script.ts +2 -2
- package/front_end/core/sdk/ServerTiming.ts +6 -6
- package/front_end/core/sdk/SourceMap.ts +112 -14
- package/front_end/core/sdk/SourceMapRangeMappings.ts +43 -0
- package/front_end/core/sdk/SourceMapScopeChainEntry.ts +15 -10
- package/front_end/core/sdk/SourceMapScopesInfo.ts +92 -10
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +1 -1
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +6 -6
- package/front_end/entrypoints/main/MainImpl.ts +1 -1
- package/front_end/generated/InspectorBackendCommands.ts +6 -3
- package/front_end/generated/protocol-mapping.d.ts +7 -0
- package/front_end/generated/protocol-proxy-api.d.ts +5 -0
- package/front_end/generated/protocol.ts +36 -3
- package/front_end/models/ai_assistance/AiAgent2.ts +27 -27
- package/front_end/models/ai_assistance/agents/AiAgent.ts +4 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/contexts/AccessibilityContext.ts +1 -0
- package/front_end/models/ai_assistance/contexts/DOMNodeContext.ts +5 -4
- package/front_end/models/ai_assistance/contexts/FileContext.ts +1 -0
- package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +1 -0
- package/front_end/models/ai_assistance/contexts/RequestContext.ts +1 -0
- package/front_end/models/ai_assistance/contexts/StorageContext.ts +1 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +5 -5
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +6 -6
- package/front_end/models/ai_assistance/tools/GetElementAccessibilityDetails.ts +5 -8
- package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +4 -8
- package/front_end/models/ai_assistance/tools/GetSourceContent.ts +7 -5
- package/front_end/models/ai_assistance/tools/GetStyles.ts +10 -6
- package/front_end/models/ai_assistance/tools/ListSources.ts +26 -7
- package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +5 -10
- package/front_end/models/ai_assistance/tools/Tool.ts +8 -1
- package/front_end/models/bindings/FileUtils.ts +18 -40
- package/front_end/models/bindings/TempFile.ts +5 -12
- package/front_end/models/comment_manager/CommentManager.ts +30 -6
- package/front_end/models/crux-manager/CrUXManager.ts +8 -5
- package/front_end/models/emulation/DeviceModeModel.ts +55 -105
- package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +1 -1
- package/front_end/models/issues_manager/CookieIssue.ts +1 -1
- package/front_end/models/issues_manager/DeprecationIssue.ts +2 -2
- package/front_end/models/javascript_metadata/NativeFunctions.ts +1 -5
- package/front_end/models/live-metrics/LiveMetrics.ts +1 -1
- package/front_end/models/persistence/IsolatedFileSystem.ts +16 -23
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +1 -1
- package/front_end/models/trace/insights/INPBreakdown.ts +1 -1
- package/front_end/models/trace/insights/ImageDelivery.ts +3 -3
- package/front_end/models/trace/insights/LCPDiscovery.ts +2 -2
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +3 -3
- package/front_end/models/trace/insights/Viewport.ts +1 -1
- package/front_end/models/trace/types/Overlays.ts +2 -2
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +2 -2
- package/front_end/panels/accessibility/AccessibilitySubPane.ts +0 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +74 -18
- package/front_end/panels/ai_assistance/components/AIv2MarkdownRenderer.ts +14 -3
- package/front_end/panels/ai_assistance/components/ChatInput.ts +1 -1
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +1 -1
- package/front_end/panels/animation/AnimationUI.ts +1 -1
- package/front_end/panels/application/AppManifestView.ts +9 -11
- package/front_end/panels/application/ApplicationPanelSidebar.ts +9 -9
- package/front_end/panels/application/BackgroundServiceView.ts +1 -1
- package/front_end/panels/application/CookieItemsView.ts +1 -1
- package/front_end/panels/application/DOMStorageItemsView.ts +1 -1
- package/front_end/panels/application/DeviceBoundSessionsView.ts +2 -2
- package/front_end/panels/application/FrameDetailsView.ts +5 -5
- package/front_end/panels/application/IndexedDBViews.ts +2 -2
- package/front_end/panels/application/KeyValueStorageItemsView.ts +1 -2
- package/front_end/panels/application/ReportingApiView.ts +1 -1
- package/front_end/panels/application/ServiceWorkerCacheTreeElement.ts +1 -1
- package/front_end/panels/application/ServiceWorkersView.ts +1 -1
- package/front_end/panels/application/StorageBucketsTreeElement.ts +1 -1
- package/front_end/panels/application/WebMCPView.ts +1 -1
- package/front_end/panels/application/components/AdsView.ts +136 -7
- package/front_end/panels/application/components/BackForwardCacheStrings.ts +116 -117
- package/front_end/panels/application/components/BackForwardCacheView.ts +7 -7
- package/front_end/panels/application/components/BounceTrackingMitigationsView.ts +2 -2
- package/front_end/panels/application/components/PermissionsPolicySection.ts +2 -2
- package/front_end/panels/application/components/ProtocolHandlersView.ts +1 -1
- package/front_end/panels/application/components/ReportsGrid.ts +1 -1
- package/front_end/panels/application/components/StorageMetadataView.ts +1 -1
- package/front_end/panels/application/components/TrustTokensView.ts +3 -3
- package/front_end/panels/application/components/adScriptsTable.css +22 -0
- package/front_end/panels/application/preloading/PreloadingView.ts +20 -22
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +9 -9
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +31 -33
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +23 -23
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +4 -4
- package/front_end/panels/application/preloading/components/PreloadingString.ts +161 -161
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +2 -6
- package/front_end/panels/application/preloading/components/RuleSetGrid.ts +8 -8
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +32 -32
- package/front_end/panels/application/resourcesPanel.css +17 -17
- package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +1 -1
- package/front_end/panels/changes/ChangesView.ts +1 -1
- package/front_end/panels/common/AiCodeCompletionSummaryToolbar.ts +1 -1
- package/front_end/panels/common/CPUThrottlingOption.ts +0 -1
- package/front_end/panels/common/GdpSignUpDialog.ts +3 -4
- package/front_end/panels/common/GeminiRebrandPromoDialog.ts +1 -1
- package/front_end/panels/console/ConsoleInsightTeaser.ts +1 -1
- package/front_end/panels/console/ConsolePinPane.ts +0 -1
- package/front_end/panels/console/ConsoleView.ts +2 -3
- package/front_end/panels/console/ConsoleViewMessage.ts +2 -3
- package/front_end/panels/coverage/CoverageListView.ts +6 -6
- package/front_end/panels/coverage/CoverageView.ts +7 -7
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +1 -1
- package/front_end/panels/elements/CSSRuleValidator.ts +10 -10
- package/front_end/panels/elements/ElementsPanel.ts +3 -3
- package/front_end/panels/elements/ElementsTreeElement.ts +1 -1
- package/front_end/panels/elements/ElementsTreeOutline.ts +1 -1
- package/front_end/panels/elements/LayoutPane.ts +1 -1
- package/front_end/panels/elements/StylePropertyTreeElement.ts +85 -2
- package/front_end/panels/elements/StylesSidebarPane.ts +3 -3
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +2 -1
- package/front_end/panels/emulation/DeviceModeView.ts +1 -1
- package/front_end/panels/event_listeners/EventListenersView.ts +57 -89
- package/front_end/panels/explain/components/ConsoleInsight.ts +4 -4
- package/front_end/panels/issues/AffectedPartitioningBlobURLView.ts +3 -3
- package/front_end/panels/issues/IssuesPane.ts +1 -1
- package/front_end/panels/layer_viewer/Layers3DView.ts +4 -4
- package/front_end/panels/layers/LayerTreeModel.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +4 -4
- package/front_end/panels/lighthouse/LighthouseStatusView.ts +10 -10
- package/front_end/panels/lighthouse/LighthouseTimespanView.ts +2 -2
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorController.ts +1 -1
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +1 -1
- package/front_end/panels/media/MainView.ts +2 -2
- package/front_end/panels/mobile_throttling/CalibrationController.ts +4 -1
- package/front_end/panels/mobile_throttling/NetworkPanelIndicator.ts +1 -1
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +10 -0
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +3 -3
- package/front_end/panels/network/NetworkConfigView.ts +26 -16
- package/front_end/panels/network/NetworkItemView.ts +1 -1
- package/front_end/panels/network/NetworkLogView.ts +4 -5
- package/front_end/panels/network/NetworkPanel.ts +1 -1
- package/front_end/panels/network/RequestConditionsDrawer.ts +3 -3
- package/front_end/panels/network/RequestCookiesView.ts +2 -2
- package/front_end/panels/network/RequestPayloadView.ts +0 -2
- package/front_end/panels/network/RequestTimingView.ts +1 -1
- package/front_end/panels/network/ResourceChunkView.ts +1 -1
- package/front_end/panels/network/components/HeaderSectionRow.ts +2 -2
- package/front_end/panels/network/components/RequestHeaderSection.ts +1 -1
- package/front_end/panels/network/components/RequestTrustTokensView.ts +7 -7
- package/front_end/panels/network/components/ResponseHeaderSection.ts +3 -4
- package/front_end/panels/network/network-meta.ts +1 -1
- package/front_end/panels/profiler/HeapDetachedElementsView.ts +1 -1
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +10 -10
- package/front_end/panels/profiler/HeapSnapshotView.ts +1 -1
- package/front_end/panels/profiler/IsolateSelector.ts +4 -4
- package/front_end/panels/profiler/ModuleUIStrings.ts +1 -1
- package/front_end/panels/profiler/ProfilesPanel.ts +2 -3
- package/front_end/panels/recorder/RecorderPanel.ts +1 -1
- package/front_end/panels/search/SearchView.ts +6 -6
- package/front_end/panels/security/SecurityModel.ts +4 -4
- package/front_end/panels/security/SecurityPanel.ts +83 -54
- package/front_end/panels/security/SecurityPanelSidebar.ts +41 -5
- package/front_end/panels/security/sidebar.css +9 -10
- package/front_end/panels/sensors/SensorsView.ts +1 -1
- package/front_end/panels/settings/AISettingsTab.ts +9 -9
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +1 -1
- package/front_end/panels/settings/KeybindsSettingsTab.ts +2 -2
- package/front_end/panels/settings/SettingsScreen.ts +156 -109
- package/front_end/panels/settings/WorkspaceSettingsTab.ts +1 -1
- package/front_end/panels/settings/components/SyncSection.ts +3 -3
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +13 -13
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +2 -2
- package/front_end/panels/snippets/SnippetsQuickOpen.ts +1 -1
- package/front_end/panels/sources/CSSPlugin.ts +3 -3
- package/front_end/panels/sources/DebuggerPlugin.ts +4 -4
- package/front_end/panels/sources/NavigatorView.ts +3 -3
- package/front_end/panels/sources/OutlineQuickOpen.ts +1 -1
- package/front_end/panels/sources/PersistenceActions.ts +2 -2
- package/front_end/panels/sources/SourcesNavigator.ts +5 -5
- package/front_end/panels/sources/TabbedEditorContainer.ts +1 -1
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +0 -1
- package/front_end/panels/sources/components/HeadersView.ts +1 -1
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +1 -1
- package/front_end/panels/timeline/TimelineUIUtils.ts +0 -1
- package/front_end/panels/timeline/components/ExportTraceOptions.ts +2 -2
- package/front_end/panels/timeline/components/FieldSettingsDialog.ts +4 -4
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +1 -1
- package/front_end/panels/timeline/components/LiveMetricsView.ts +7 -7
- package/front_end/panels/timeline/components/MetricCard.ts +3 -3
- package/front_end/panels/timeline/components/MetricCompareStrings.ts +12 -14
- package/front_end/panels/timeline/components/OriginMap.ts +3 -3
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +4 -4
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +6 -0
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +1 -1
- package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +3 -1
- package/front_end/panels/timeline/timelineMiniMap.css +9 -9
- package/front_end/panels/timeline/timelineStatusDialog.css +9 -9
- package/front_end/panels/web_audio/WebAudioView.ts +1 -1
- package/front_end/panels/webauthn/WebauthnPane.ts +1 -1
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/comments/CommentAnchorResolver.ts +114 -3
- package/front_end/ui/comments/CommentOverlayManager.ts +95 -16
- package/front_end/ui/components/dialogs/TypeToAllowDialog.ts +1 -1
- package/front_end/ui/components/markdown_view/codeBlock.css +3 -8
- package/front_end/ui/components/markdown_view/markdownView.css +2 -7
- package/front_end/ui/components/panel_feedback/PanelFeedback.ts +2 -2
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +1 -1
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +1 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionTeaser.ts +4 -4
- package/front_end/ui/components/text_editor/AiCodeGenerationTeaser.ts +3 -3
- package/front_end/{models → ui}/geometry/GeometryImpl.ts +4 -40
- package/front_end/ui/legacy/GlassPane.ts +1 -1
- package/front_end/ui/legacy/RemoteDebuggingTerminatedScreen.ts +2 -2
- package/front_end/ui/legacy/SoftDropDown.ts +1 -1
- package/front_end/ui/legacy/SplitWidget.ts +1 -1
- package/front_end/ui/legacy/SuggestBox.ts +1 -1
- package/front_end/ui/legacy/TabbedPane.ts +1 -1
- package/front_end/ui/legacy/TargetCrashedScreen.ts +2 -2
- package/front_end/ui/legacy/Treeoutline.ts +5 -1
- package/front_end/ui/legacy/UIUtils.ts +1 -1
- package/front_end/ui/legacy/Widget.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingModel.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingUI.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/BezierUI.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/CSSAngleUtils.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/PositionAreaEditor.ts +204 -17
- package/front_end/ui/legacy/components/inline_editor/positionAreaEditor.css +6 -0
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +7 -9
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +1 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +12 -0
- package/package.json +7 -4
- /package/front_end/{models → ui}/geometry/geometry.ts +0 -0
|
@@ -1025,7 +1025,11 @@ export class TreeElement {
|
|
|
1025
1025
|
}
|
|
1026
1026
|
if (this.expandable && !this.expanded) {
|
|
1027
1027
|
void this.#setExpandedFromUser(true, false);
|
|
1028
|
-
|
|
1028
|
+
// An inline editor or other interactive child may already hold the focus
|
|
1029
|
+
// inside this row; expanding must not take it away from them.
|
|
1030
|
+
if (!this.listItemElement.hasFocus()) {
|
|
1031
|
+
this.listItemElement.focus();
|
|
1032
|
+
}
|
|
1029
1033
|
}
|
|
1030
1034
|
}
|
|
1031
1035
|
|
|
@@ -40,9 +40,9 @@ import * as Common from '../../core/common/common.js';
|
|
|
40
40
|
import * as Host from '../../core/host/host.js';
|
|
41
41
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
42
42
|
import * as Platform from '../../core/platform/platform.js';
|
|
43
|
-
import * as Geometry from '../../models/geometry/geometry.js';
|
|
44
43
|
import type * as StackTrace from '../../models/stack_trace/stack_trace.js';
|
|
45
44
|
import * as Buttons from '../components/buttons/buttons.js';
|
|
45
|
+
import * as Geometry from '../geometry/geometry.js';
|
|
46
46
|
import {Icon, type IconData} from '../kit/kit.js';
|
|
47
47
|
import * as Lit from '../lit/lit.js';
|
|
48
48
|
import * as VisualLogging from '../visual_logging/visual_logging.js';
|
|
@@ -34,8 +34,8 @@ import '../dom_extension/dom_extension.js';
|
|
|
34
34
|
import * as Platform from '../../core/platform/platform.js';
|
|
35
35
|
import type * as Root from '../../core/root/root.js';
|
|
36
36
|
import type * as Foundation from '../../foundation/foundation.js';
|
|
37
|
-
import * as Geometry from '../../models/geometry/geometry.js';
|
|
38
37
|
import * as Lit from '../../ui/lit/lit.js';
|
|
38
|
+
import * as Geometry from '../geometry/geometry.js';
|
|
39
39
|
|
|
40
40
|
import {appendStyle, deepActiveElement} from './DOMUtilities.js';
|
|
41
41
|
import {cloneCustomElement, createShadowRootWithCoreStyles} from './UIUtils.js';
|
|
@@ -64,7 +64,7 @@ const UIStrings = {
|
|
|
64
64
|
* @example {rows: 27} PH2
|
|
65
65
|
*/
|
|
66
66
|
sSUseTheUpAndDownArrowKeysTo:
|
|
67
|
-
'{PH1} {PH2}, use the up and down arrow keys to navigate and interact with the rows of the table; use browse mode to read cell by cell
|
|
67
|
+
'{PH1} {PH2}, use the up and down arrow keys to navigate and interact with the rows of the table; use browse mode to read cell by cell',
|
|
68
68
|
/**
|
|
69
69
|
* @description Context menu item label to sort the rows of a datagrid by a column.
|
|
70
70
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
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 * as Geometry from '
|
|
5
|
+
import * as Geometry from '../../../geometry/geometry.js';
|
|
6
6
|
|
|
7
7
|
import {CSSLinearEasingModel} from './CSSLinearEasingModel.js';
|
|
8
8
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
7
7
|
import * as Platform from '../../../../core/platform/platform.js';
|
|
8
|
-
import * as Geometry from '
|
|
8
|
+
import * as Geometry from '../../../geometry/geometry.js';
|
|
9
9
|
import * as VisualLogging from '../../../visual_logging/visual_logging.js';
|
|
10
10
|
import * as UI from '../../legacy.js';
|
|
11
11
|
|
|
@@ -2,7 +2,7 @@
|
|
|
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 * as Geometry from '
|
|
5
|
+
import * as Geometry from '../../../geometry/geometry.js';
|
|
6
6
|
import * as VisualLogging from '../../../visual_logging/visual_logging.js';
|
|
7
7
|
import * as UI from '../../legacy.js';
|
|
8
8
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as Platform from '../../../../core/platform/platform.js';
|
|
6
|
-
import * as Geometry from '
|
|
6
|
+
import * as Geometry from '../../../geometry/geometry.js';
|
|
7
7
|
import * as UI from '../../legacy.js';
|
|
8
8
|
|
|
9
9
|
const CSSAngleRegex = /(?<value>[+-]?\d*\.?\d+)(?<unit>deg|grad|rad|turn)/;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import * as Common from '../../../../core/common/common.js';
|
|
7
7
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
8
8
|
import * as Platform from '../../../../core/platform/platform.js';
|
|
9
|
-
import * as Geometry from '
|
|
9
|
+
import * as Geometry from '../../../geometry/geometry.js';
|
|
10
10
|
import * as VisualLogging from '../../../visual_logging/visual_logging.js';
|
|
11
11
|
import * as UI from '../../legacy.js';
|
|
12
12
|
|
|
@@ -2,11 +2,58 @@
|
|
|
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
|
import * as Common from '../../../../core/common/common.js';
|
|
5
|
+
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
5
6
|
import * as Lit from '../../../../ui/lit/lit.js';
|
|
6
7
|
import * as UI from '../../legacy.js';
|
|
7
8
|
|
|
8
9
|
import positionAreaEditorStyles from './positionAreaEditor.css.js';
|
|
9
10
|
|
|
11
|
+
const UIStrings = {
|
|
12
|
+
/**
|
|
13
|
+
* @description Accessible description for the position-area grid editor explaining keyboard navigation and range selection.
|
|
14
|
+
*/
|
|
15
|
+
positionAreaGridDescription:
|
|
16
|
+
'Use arrow keys to navigate, Space or Enter to select, and Shift + arrow keys to select a range',
|
|
17
|
+
/**
|
|
18
|
+
* @description Accessible label for the position-area grid editor.
|
|
19
|
+
*/
|
|
20
|
+
positionAreaGrid: 'position-area grid',
|
|
21
|
+
/**
|
|
22
|
+
* @description Title for the block axis section in the position-area editor.
|
|
23
|
+
*/
|
|
24
|
+
block: 'Block',
|
|
25
|
+
/**
|
|
26
|
+
* @description Title for the inline axis section in the position-area editor.
|
|
27
|
+
*/
|
|
28
|
+
inline: 'Inline',
|
|
29
|
+
/**
|
|
30
|
+
* @description Accessible label for the block axis mode radio button group.
|
|
31
|
+
*/
|
|
32
|
+
blockAxisMode: 'Block axis mode',
|
|
33
|
+
/**
|
|
34
|
+
* @description Accessible label for the inline axis mode radio button group.
|
|
35
|
+
*/
|
|
36
|
+
inlineAxisMode: 'Inline axis mode',
|
|
37
|
+
/**
|
|
38
|
+
* @description Label for physical mode radio button in the position-area editor.
|
|
39
|
+
*/
|
|
40
|
+
physical: 'Physical',
|
|
41
|
+
/**
|
|
42
|
+
* @description Label for coordinate mode radio button in the position-area editor.
|
|
43
|
+
*/
|
|
44
|
+
coordinate: 'Coordinate',
|
|
45
|
+
/**
|
|
46
|
+
* @description Label for logical mode radio button in the position-area editor.
|
|
47
|
+
*/
|
|
48
|
+
logical: 'Logical',
|
|
49
|
+
/**
|
|
50
|
+
* @description Label for auto mode radio button in the position-area editor.
|
|
51
|
+
*/
|
|
52
|
+
auto: 'Auto',
|
|
53
|
+
} as const;
|
|
54
|
+
const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/inline_editor/PositionAreaEditor.ts', UIStrings);
|
|
55
|
+
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
56
|
+
|
|
10
57
|
const {Directives, html, nothing, render} = Lit;
|
|
11
58
|
const {repeat} = Directives;
|
|
12
59
|
|
|
@@ -248,6 +295,7 @@ export function stringifyPositionArea(area: Area): string {
|
|
|
248
295
|
|
|
249
296
|
export interface ViewInput {
|
|
250
297
|
area: Area|undefined;
|
|
298
|
+
readonly isSelecting?: boolean;
|
|
251
299
|
onSelectStart: (x: number, y: number) => void;
|
|
252
300
|
onSelect: (x: number, y: number) => void;
|
|
253
301
|
onSelectEnd: (x?: number, y?: number) => void;
|
|
@@ -256,14 +304,25 @@ export interface ViewInput {
|
|
|
256
304
|
}
|
|
257
305
|
export type View = (input: ViewInput, output: undefined, target: HTMLElement) => void;
|
|
258
306
|
export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
307
|
+
const container = {
|
|
308
|
+
attributes: {
|
|
309
|
+
tabindex: '0',
|
|
310
|
+
},
|
|
311
|
+
};
|
|
259
312
|
if (!input.area) {
|
|
260
|
-
render(nothing, target);
|
|
313
|
+
render(nothing, target, {container});
|
|
261
314
|
return;
|
|
262
315
|
}
|
|
263
316
|
const x = input.area.primaryAxis === Axis.INLINE ? input.area.first : input.area.second;
|
|
264
317
|
const y = input.area.primaryAxis === Axis.BLOCK ? input.area.first : input.area.second;
|
|
265
318
|
const grid = [[0, 0], [1, 0], [2, 0], [0, 1], [1, 1], [2, 1], [0, 2], [1, 2], [2, 2]];
|
|
266
319
|
|
|
320
|
+
// Determine which cell receives tabindex="0" for roving focus:
|
|
321
|
+
// use the currently focused cell if any, otherwise default to the selection's start.
|
|
322
|
+
const activeCell = target.querySelector<HTMLElement>('.position-area-builder > div:focus');
|
|
323
|
+
const focusedX = activeCell ? Number(activeCell.dataset.x) : x.start;
|
|
324
|
+
const focusedY = activeCell ? Number(activeCell.dataset.y) : y.start;
|
|
325
|
+
|
|
267
326
|
function getCellCoords(e: PointerEvent, container: HTMLElement): [number, number]|null {
|
|
268
327
|
const root = container.getRootNode() as Document | ShadowRoot;
|
|
269
328
|
const el = root.elementFromPoint(e.clientX, e.clientY);
|
|
@@ -276,6 +335,13 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
276
335
|
return [cellX, cellY];
|
|
277
336
|
}
|
|
278
337
|
|
|
338
|
+
function focusCell(cell: HTMLElement, container: HTMLElement): void {
|
|
339
|
+
for (const c of container.querySelectorAll<HTMLElement>('[data-x]')) {
|
|
340
|
+
c.tabIndex = c === cell ? 0 : -1;
|
|
341
|
+
}
|
|
342
|
+
cell.focus();
|
|
343
|
+
}
|
|
344
|
+
|
|
279
345
|
function onPointerDown(e: PointerEvent): void {
|
|
280
346
|
const container = e.currentTarget as HTMLElement;
|
|
281
347
|
const targetCell = (e.target as HTMLElement).closest('[data-x]') as HTMLElement | null;
|
|
@@ -284,6 +350,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
284
350
|
}
|
|
285
351
|
const startX = Number(targetCell.dataset.x);
|
|
286
352
|
const startY = Number(targetCell.dataset.y);
|
|
353
|
+
focusCell(targetCell, container);
|
|
287
354
|
container.setPointerCapture(e.pointerId);
|
|
288
355
|
input.onSelectStart(startX, startY);
|
|
289
356
|
}
|
|
@@ -295,6 +362,10 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
295
362
|
}
|
|
296
363
|
const cell = getCellCoords(e, container);
|
|
297
364
|
if (cell) {
|
|
365
|
+
const targetCell = container.querySelector<HTMLElement>(`[data-x="${cell[0]}"][data-y="${cell[1]}"]`);
|
|
366
|
+
if (targetCell && targetCell !== document.activeElement) {
|
|
367
|
+
focusCell(targetCell, container);
|
|
368
|
+
}
|
|
298
369
|
input.onSelect(...cell);
|
|
299
370
|
}
|
|
300
371
|
}
|
|
@@ -307,6 +378,10 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
307
378
|
container.releasePointerCapture(e.pointerId);
|
|
308
379
|
const coords = getCellCoords(e, container);
|
|
309
380
|
if (coords) {
|
|
381
|
+
const targetCell = container.querySelector<HTMLElement>(`[data-x="${coords[0]}"][data-y="${coords[1]}"]`);
|
|
382
|
+
if (targetCell) {
|
|
383
|
+
focusCell(targetCell, container);
|
|
384
|
+
}
|
|
310
385
|
input.onSelectEnd(...coords);
|
|
311
386
|
} else {
|
|
312
387
|
input.onSelectEnd(x.end, y.end);
|
|
@@ -322,6 +397,91 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
322
397
|
input.onSelectEnd();
|
|
323
398
|
}
|
|
324
399
|
|
|
400
|
+
function onCellKeyDown(e: KeyboardEvent): void {
|
|
401
|
+
const currentCell = e.currentTarget as HTMLElement;
|
|
402
|
+
const cellX = Number(currentCell.dataset.x);
|
|
403
|
+
const cellY = Number(currentCell.dataset.y);
|
|
404
|
+
const builder = currentCell.closest<HTMLElement>('.position-area-builder');
|
|
405
|
+
if (!builder) {
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
if (e.key === ' ' || e.key === 'Enter') {
|
|
410
|
+
e.preventDefault();
|
|
411
|
+
input.onSelectStart(cellX, cellY);
|
|
412
|
+
input.onSelectEnd(cellX, cellY);
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
let dx = 0;
|
|
417
|
+
let dy = 0;
|
|
418
|
+
switch (e.key) {
|
|
419
|
+
case 'ArrowLeft':
|
|
420
|
+
dx = -1;
|
|
421
|
+
break;
|
|
422
|
+
case 'ArrowRight':
|
|
423
|
+
dx = 1;
|
|
424
|
+
break;
|
|
425
|
+
case 'ArrowUp':
|
|
426
|
+
dy = -1;
|
|
427
|
+
break;
|
|
428
|
+
case 'ArrowDown':
|
|
429
|
+
dy = 1;
|
|
430
|
+
break;
|
|
431
|
+
default:
|
|
432
|
+
return;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
const nextX = Math.max(0, Math.min(2, cellX + dx));
|
|
436
|
+
const nextY = Math.max(0, Math.min(2, cellY + dy));
|
|
437
|
+
if (nextX === cellX && nextY === cellY) {
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
e.preventDefault();
|
|
442
|
+
|
|
443
|
+
const nextCell = builder.querySelector<HTMLElement>(`[data-x="${nextX}"][data-y="${nextY}"]`);
|
|
444
|
+
if (!nextCell) {
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
focusCell(nextCell, builder);
|
|
449
|
+
|
|
450
|
+
if (e.shiftKey) {
|
|
451
|
+
if (!input.isSelecting) {
|
|
452
|
+
input.onSelectStart(cellX, cellY);
|
|
453
|
+
}
|
|
454
|
+
input.onSelect(nextX, nextY);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
function onKeyUp(e: KeyboardEvent): void {
|
|
459
|
+
if (e.key === 'Shift' && input.isSelecting) {
|
|
460
|
+
const activeCell = (e.target as HTMLElement).closest<HTMLElement>('[data-x]');
|
|
461
|
+
if (activeCell) {
|
|
462
|
+
const activeX = Number(activeCell.dataset.x);
|
|
463
|
+
const activeY = Number(activeCell.dataset.y);
|
|
464
|
+
input.onSelectEnd(activeX, activeY);
|
|
465
|
+
} else {
|
|
466
|
+
input.onSelectEnd();
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
function getCellTitle(cellX: number, cellY: number): string {
|
|
472
|
+
if (!input.area) {
|
|
473
|
+
return '';
|
|
474
|
+
}
|
|
475
|
+
const cellArea: Area = {
|
|
476
|
+
first: input.area.primaryAxis === Axis.INLINE ? {...x, start: cellX, end: cellX} :
|
|
477
|
+
{...y, start: cellY, end: cellY},
|
|
478
|
+
second: input.area.primaryAxis === Axis.BLOCK ? {...x, start: cellX, end: cellX} :
|
|
479
|
+
{...y, start: cellY, end: cellY},
|
|
480
|
+
primaryAxis: input.area.primaryAxis,
|
|
481
|
+
};
|
|
482
|
+
return stringifyPositionArea(cellArea);
|
|
483
|
+
}
|
|
484
|
+
|
|
325
485
|
const propertyValue = stringifyPositionArea(input.area);
|
|
326
486
|
|
|
327
487
|
const blockAxis = input.area.primaryAxis === Axis.BLOCK ? input.area.first : input.area.second;
|
|
@@ -329,14 +489,16 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
329
489
|
|
|
330
490
|
function renderModeRadioGroup(axis: Axis, currentMode: Mode): Lit.TemplateResult {
|
|
331
491
|
const modes = [
|
|
332
|
-
{mode: Mode.PHYSICAL, label:
|
|
333
|
-
{mode: Mode.COORDINATE, label:
|
|
334
|
-
{mode: Mode.LOGICAL, label:
|
|
335
|
-
{mode: Mode.AUTO, label:
|
|
492
|
+
{mode: Mode.PHYSICAL, label: i18nString(UIStrings.physical)},
|
|
493
|
+
{mode: Mode.COORDINATE, label: i18nString(UIStrings.coordinate)},
|
|
494
|
+
{mode: Mode.LOGICAL, label: i18nString(UIStrings.logical)},
|
|
495
|
+
{mode: Mode.AUTO, label: i18nString(UIStrings.auto)},
|
|
336
496
|
];
|
|
497
|
+
const axisModeLabel =
|
|
498
|
+
axis === Axis.BLOCK ? i18nString(UIStrings.blockAxisMode) : i18nString(UIStrings.inlineAxisMode);
|
|
337
499
|
|
|
338
500
|
return html`
|
|
339
|
-
<fieldset class="chip-radio-group" aria-label
|
|
501
|
+
<fieldset class="chip-radio-group" aria-label=${axisModeLabel}>
|
|
340
502
|
${modes.map(({mode, label}) => {
|
|
341
503
|
const id = `${axis}-mode-${mode}`;
|
|
342
504
|
return html`
|
|
@@ -354,53 +516,74 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
354
516
|
</fieldset>
|
|
355
517
|
`;
|
|
356
518
|
}
|
|
519
|
+
|
|
520
|
+
// clang-format off
|
|
357
521
|
render(html`
|
|
358
522
|
<style>${positionAreaEditorStyles}</style>
|
|
359
|
-
<div class=property>
|
|
523
|
+
<div class=property aria-live="polite" aria-atomic="true">
|
|
360
524
|
<span class=property-name>position-area:</span>
|
|
361
525
|
<span class=property-value>${
|
|
362
526
|
propertyValue.split(' ').map(
|
|
363
527
|
(keyword, i) => html`${i > 0 ? ' ' : ''}<span class=property-keyword>${keyword}</span>`)}</span>
|
|
364
528
|
</div>
|
|
365
529
|
<div class=position-area-builder
|
|
530
|
+
role="grid"
|
|
531
|
+
aria-label=${i18nString(UIStrings.positionAreaGrid)}
|
|
532
|
+
aria-description=${i18nString(UIStrings.positionAreaGridDescription)}
|
|
533
|
+
aria-multiselectable="true"
|
|
366
534
|
data-x-start=${x.start} data-x-end=${x.end} data-y-start=${y.start} data-y-end=${y.end}
|
|
367
535
|
@pointerdown=${onPointerDown}
|
|
368
536
|
@pointermove=${onPointerMove}
|
|
369
537
|
@pointerup=${onPointerUp}
|
|
370
|
-
@pointercancel=${onPointerCancel}
|
|
371
|
-
|
|
372
|
-
|
|
538
|
+
@pointercancel=${onPointerCancel}
|
|
539
|
+
@keyup=${onKeyUp}>
|
|
540
|
+
${repeat(grid, ([cellX, cellY]) => cellX * 10 + cellY, ([cellX, cellY]) => {
|
|
541
|
+
const isFocused = cellX === focusedX && cellY === focusedY;
|
|
542
|
+
const isSelected = cellX >= x.start && cellX <= x.end && cellY >= y.start && cellY <= y.end;
|
|
543
|
+
const cellTitle = getCellTitle(cellX, cellY);
|
|
544
|
+
return html`
|
|
545
|
+
<div
|
|
546
|
+
role="gridcell"
|
|
547
|
+
data-x=${cellX}
|
|
548
|
+
data-y=${cellY}
|
|
549
|
+
title=${cellTitle}
|
|
550
|
+
aria-label=${cellTitle}
|
|
551
|
+
tabindex=${isFocused ? 0 : -1}
|
|
552
|
+
aria-selected=${isSelected ? 'true' : 'false'}
|
|
553
|
+
@keydown=${onCellKeyDown}>
|
|
373
554
|
</div>
|
|
374
|
-
|
|
555
|
+
`;
|
|
556
|
+
})}
|
|
375
557
|
</div>
|
|
376
558
|
<div class=position-area-controls>
|
|
377
559
|
<div class=axis-section>
|
|
378
560
|
<div class=axis-header>
|
|
379
|
-
<span class=axis-title
|
|
561
|
+
<span class=axis-title>${i18nString(UIStrings.block)}</span>
|
|
380
562
|
<devtools-checkbox
|
|
381
563
|
.checked=${blockAxis.self}
|
|
382
564
|
?disabled=${isGeneric(blockAxis)}
|
|
383
565
|
@change=${(e: Event) => input.onSelfChange(Axis.BLOCK, (e.target as UI.UIUtils.CheckboxLabel).checked)}>
|
|
384
|
-
<span class=self-checkbox-label>self</span>
|
|
566
|
+
<span class="self-checkbox-label source-code">self</span>
|
|
385
567
|
</devtools-checkbox>
|
|
386
568
|
</div>
|
|
387
569
|
${renderModeRadioGroup(Axis.BLOCK, blockAxis.mode)}
|
|
388
570
|
</div>
|
|
389
571
|
<div class=axis-section>
|
|
390
572
|
<div class=axis-header>
|
|
391
|
-
<span class=axis-title
|
|
573
|
+
<span class=axis-title>${i18nString(UIStrings.inline)}</span>
|
|
392
574
|
<devtools-checkbox
|
|
393
575
|
.checked=${inlineAxis.self}
|
|
394
576
|
?disabled=${isGeneric(inlineAxis)}
|
|
395
577
|
@change=${(e: Event) => input.onSelfChange(Axis.INLINE, (e.target as UI.UIUtils.CheckboxLabel).checked)}>
|
|
396
|
-
<span class=self-checkbox-label>self</span>
|
|
578
|
+
<span class="self-checkbox-label source-code">self</span>
|
|
397
579
|
</devtools-checkbox>
|
|
398
580
|
</div>
|
|
399
581
|
${renderModeRadioGroup(Axis.INLINE, inlineAxis.mode)}
|
|
400
582
|
</div>
|
|
401
583
|
</div>
|
|
402
584
|
`,
|
|
403
|
-
|
|
585
|
+
// clang-format on
|
|
586
|
+
target, {container});
|
|
404
587
|
};
|
|
405
588
|
|
|
406
589
|
export const enum Events {
|
|
@@ -433,7 +616,7 @@ export class PositionAreaEditor extends PositionAreaEditorBase {
|
|
|
433
616
|
|
|
434
617
|
override wasShown(): void {
|
|
435
618
|
super.wasShown();
|
|
436
|
-
this.
|
|
619
|
+
this.performUpdate();
|
|
437
620
|
}
|
|
438
621
|
|
|
439
622
|
get area(): Area|undefined {
|
|
@@ -587,8 +770,12 @@ export class PositionAreaEditor extends PositionAreaEditorBase {
|
|
|
587
770
|
}
|
|
588
771
|
|
|
589
772
|
override performUpdate(): void {
|
|
773
|
+
const isSelecting = (): boolean => this.#inProgressSelection !== undefined;
|
|
590
774
|
this.#view({
|
|
591
775
|
area: this.#area,
|
|
776
|
+
get isSelecting(): boolean {
|
|
777
|
+
return isSelecting();
|
|
778
|
+
},
|
|
592
779
|
onSelectStart: this.#startSelection.bind(this),
|
|
593
780
|
onSelect: this.#select.bind(this),
|
|
594
781
|
onSelectEnd: this.#finishSelection.bind(this),
|
|
@@ -64,6 +64,12 @@
|
|
|
64
64
|
min-width: var(--box-size);
|
|
65
65
|
min-height: var(--box-size);
|
|
66
66
|
outline: 1px solid var(--sys-color-neutral-outline);
|
|
67
|
+
|
|
68
|
+
&:focus-visible {
|
|
69
|
+
outline: 1px solid var(--sys-color-state-focus-ring);
|
|
70
|
+
outline-offset: -1px;
|
|
71
|
+
z-index: 2;
|
|
72
|
+
}
|
|
67
73
|
}
|
|
68
74
|
|
|
69
75
|
&::after {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
8
8
|
import * as Platform from '../../../../core/platform/platform.js';
|
|
9
9
|
import * as SDK from '../../../../core/sdk/sdk.js';
|
|
10
|
-
import * as Geometry from '
|
|
10
|
+
import * as Geometry from '../../../geometry/geometry.js';
|
|
11
11
|
import {Link} from '../../../kit/kit.js';
|
|
12
12
|
import {render} from '../../../lit/lit.js';
|
|
13
13
|
import * as UI from '../../legacy.js';
|
|
@@ -21,7 +21,7 @@ const UIStrings = {
|
|
|
21
21
|
* @description Accessible label for a screenshot frame in the film strip view of the Network panel.
|
|
22
22
|
* @example {3ms} PH1
|
|
23
23
|
*/
|
|
24
|
-
screenshotForSSelectToView: 'Screenshot for {PH1} - select to view preceding requests
|
|
24
|
+
screenshotForSSelectToView: 'Screenshot for {PH1} - select to view preceding requests',
|
|
25
25
|
/**
|
|
26
26
|
* @description Alt text for a screenshot thumbnail image in the film strip view.
|
|
27
27
|
*/
|
|
@@ -2976,9 +2976,8 @@ export class FlameChart extends FlameChartBase implements NetworkTimeCalculator.
|
|
|
2976
2976
|
* not fit into the viewport entirely, the max width we can draw is that
|
|
2977
2977
|
* width, not the width of the event itself.
|
|
2978
2978
|
*/
|
|
2979
|
-
private drawEventTitles(
|
|
2980
|
-
|
|
2981
|
-
canvasWidth: number): void {
|
|
2979
|
+
private drawEventTitles(context: CanvasRenderingContext2D, timelineData: FlameChartTimelineData,
|
|
2980
|
+
titleIndices: number[], canvasWidth: number): void {
|
|
2982
2981
|
const timeToPixel = this.chartViewport.timeToPixel();
|
|
2983
2982
|
const textPadding = this.textPadding;
|
|
2984
2983
|
context.save();
|
|
@@ -3000,9 +2999,9 @@ export class FlameChart extends FlameChartBase implements NetworkTimeCalculator.
|
|
|
3000
2999
|
context.font = this.#font;
|
|
3001
3000
|
const hasArrowDecoration =
|
|
3002
3001
|
this.entryHasDecoration(entryIndex, FlameChartDecorationType.HIDDEN_DESCENDANTS_ARROW);
|
|
3003
|
-
// Set the max width to be the width of the bar plus some padding. If the bar has an arrow decoration and
|
|
3004
|
-
// version of the decoration that is a square button, also subtract
|
|
3005
|
-
// Because the decoration is square,
|
|
3002
|
+
// Set the max width to be the width of the bar plus some padding. If the bar has an arrow decoration and
|
|
3003
|
+
// the bar is wide enough for the larger version of the decoration that is a square button, also subtract
|
|
3004
|
+
// the width of the decoration. Because the decoration is square, its width is equal to this.barHeight.
|
|
3006
3005
|
const maxBarWidth = (hasArrowDecoration && barWidth > barHeight * 2) ? barWidth - textPadding - this.barHeight :
|
|
3007
3006
|
barWidth - 2 * textPadding;
|
|
3008
3007
|
text = UI.UIUtils.trimTextMiddle(
|
|
@@ -3012,9 +3011,8 @@ export class FlameChart extends FlameChartBase implements NetworkTimeCalculator.
|
|
|
3012
3011
|
);
|
|
3013
3012
|
}
|
|
3014
3013
|
const unclippedBarX = this.chartViewport.timeToPosition(entryStartTime);
|
|
3015
|
-
if (this.dataProvider.decorateEntry(
|
|
3016
|
-
|
|
3017
|
-
color => this.#transformColor(entryIndex, color))) {
|
|
3014
|
+
if (this.dataProvider.decorateEntry(entryIndex, context, text, barX, barY, barWidth, barHeight, unclippedBarX,
|
|
3015
|
+
timeToPixel, color => this.#transformColor(entryIndex, color))) {
|
|
3018
3016
|
continue;
|
|
3019
3017
|
}
|
|
3020
3018
|
if (!text?.length) {
|
|
@@ -7,9 +7,9 @@ import * as Common from '../../../../core/common/common.js';
|
|
|
7
7
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
8
8
|
import * as Platform from '../../../../core/platform/platform.js';
|
|
9
9
|
import * as TextUtils from '../../../../core/text_utils/text_utils.js';
|
|
10
|
-
import * as Geometry from '../../../../models/geometry/geometry.js';
|
|
11
10
|
import * as Diff from '../../../../third_party/diff/diff.js';
|
|
12
11
|
import * as TextPrompt from '../../../../ui/components/text_prompt/text_prompt.js';
|
|
12
|
+
import * as Geometry from '../../../geometry/geometry.js';
|
|
13
13
|
import {type LitTemplate, nothing, render} from '../../../lit/lit.js';
|
|
14
14
|
import * as VisualLogging from '../../../visual_logging/visual_logging.js';
|
|
15
15
|
import * as UI from '../../legacy.js';
|
|
@@ -391,12 +391,24 @@ export const knownContextValues: Set<string> = new Set([
|
|
|
391
391
|
'ai-code-generation-upgrade-dialog.continue',
|
|
392
392
|
'ai-code-generation-upgrade-dialog.manage-in-settings',
|
|
393
393
|
'ai-code-generation-used',
|
|
394
|
+
'ai-context-accessibility',
|
|
395
|
+
'ai-context-dom-node',
|
|
396
|
+
'ai-context-file',
|
|
397
|
+
'ai-context-network-request',
|
|
398
|
+
'ai-context-none',
|
|
399
|
+
'ai-context-performance-trace',
|
|
400
|
+
'ai-context-storage',
|
|
401
|
+
'ai-context-unknown',
|
|
394
402
|
'ai-explorer',
|
|
395
403
|
'ai-export-for-agents',
|
|
396
404
|
'ai-export-for-agents.copy-to-clipboard',
|
|
397
405
|
'ai-export-for-agents.save-as-markdown',
|
|
398
406
|
'ai-hide-walkthrough-sidebar',
|
|
399
407
|
'ai-show-walkthrough-sidebar',
|
|
408
|
+
'ai-v2-context-agent-change',
|
|
409
|
+
'ai-v2-context-user-add',
|
|
410
|
+
'ai-v2-context-user-change',
|
|
411
|
+
'ai-v2-context-user-removal',
|
|
400
412
|
'ai-v2-opt-in-change-dialog',
|
|
401
413
|
'ai_assistance',
|
|
402
414
|
'align-content',
|
package/package.json
CHANGED
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"@stylistic/eslint-plugin": "5.10.0",
|
|
38
38
|
"@types/chai": "5.2.3",
|
|
39
39
|
"@types/codemirror": "5.60.17",
|
|
40
|
+
"@types/diff": "7.0.2",
|
|
40
41
|
"@types/emscripten": "1.39.4",
|
|
41
42
|
"@types/estree": "1.0.8",
|
|
42
43
|
"@types/filesystem": "0.0.36",
|
|
@@ -52,6 +53,7 @@
|
|
|
52
53
|
"chai": "6.2.2",
|
|
53
54
|
"cssnano": "8.0.2",
|
|
54
55
|
"cssnano-preset-lite": "5.0.1",
|
|
56
|
+
"diff": "9.0.0",
|
|
55
57
|
"esbuild": "0.28.2",
|
|
56
58
|
"eslint": "9.39.5",
|
|
57
59
|
"eslint-plugin-eslint-plugin": "7.4.2",
|
|
@@ -61,7 +63,7 @@
|
|
|
61
63
|
"eslint-plugin-mocha": "10.5.0",
|
|
62
64
|
"globals": "17.7.0",
|
|
63
65
|
"js-rouge": "3.2.0",
|
|
64
|
-
"js-yaml": "4.3.
|
|
66
|
+
"js-yaml": "4.3.2",
|
|
65
67
|
"karma": "6.4.4",
|
|
66
68
|
"karma-chrome-launcher": "3.2.0",
|
|
67
69
|
"karma-coverage": "2.2.1",
|
|
@@ -78,13 +80,14 @@
|
|
|
78
80
|
"source-map-support": "0.5.21",
|
|
79
81
|
"stylelint": "17.14.0",
|
|
80
82
|
"stylelint-config-standard": "40.0.0",
|
|
81
|
-
"svgo": "4.0
|
|
83
|
+
"svgo": "4.1.0",
|
|
82
84
|
"ts-lit-plugin": "2.0.2",
|
|
83
85
|
"typescript": "npm:@typescript/typescript6@6.0.2",
|
|
84
86
|
"typescript-eslint": "8.64.0",
|
|
85
87
|
"uuid": "14.0.0",
|
|
86
88
|
"webidl2": "24.5.0",
|
|
87
|
-
"yargs": "17.7.2"
|
|
89
|
+
"yargs": "17.7.2",
|
|
90
|
+
"yargs-unparser": "2.0.0"
|
|
88
91
|
},
|
|
89
|
-
"version": "1.0.
|
|
92
|
+
"version": "1.0.1696961"
|
|
90
93
|
}
|
|
File without changes
|