chrome-devtools-frontend 1.0.1681091 → 1.0.1682249
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 +8 -3
- package/front_end/core/sdk/ConsoleModel.ts +1 -1
- package/front_end/core/sdk/DOMModel.ts +8 -0
- package/front_end/core/sdk/NetworkManager.ts +9 -4
- package/front_end/core/sdk/OverlayModel.ts +3 -2
- package/front_end/core/sdk/PreloadingModel.ts +44 -22
- package/front_end/core/sdk/RemoteObject.ts +4 -1
- package/front_end/core/sdk/RuntimeModel.ts +5 -5
- package/front_end/core/sdk/SDKSettings.ts +19 -0
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +1 -1
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +3 -1
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +1 -5
- package/front_end/entrypoints/main/MainImpl.ts +9 -10
- package/front_end/entrypoints/main/main-meta.ts +82 -0
- package/front_end/entrypoints/shell/shell.ts +0 -5
- package/front_end/entrypoints/trace_app/trace_app.ts +0 -5
- package/front_end/generated/InspectorBackendCommands.ts +2 -0
- package/front_end/generated/protocol-mapping.d.ts +16 -0
- package/front_end/generated/protocol-proxy-api.d.ts +12 -0
- package/front_end/generated/protocol.ts +12 -0
- package/front_end/models/ai_assistance/ExtensionScope.ts +11 -12
- package/front_end/models/ai_assistance/agents/AiAgent.ts +1 -1
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +2 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +2 -1
- package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +2 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +8 -8
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +8 -8
- package/front_end/models/ai_code_completion/debug.ts +6 -3
- package/front_end/models/ai_code_generation/debug.ts +6 -3
- package/front_end/models/badges/UserBadges.ts +9 -2
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +1 -0
- package/front_end/models/emulation/DeviceModeModel.ts +16 -27
- package/front_end/models/emulation/EmulatedDevices.ts +30 -125
- package/front_end/models/extensions/ExtensionAPI.ts +34 -23
- package/front_end/models/formatter/ScriptFormatter.ts +1 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +5 -1
- package/front_end/models/live-metrics/web-vitals-injected/spec/spec.ts +4 -4
- package/front_end/models/logs/NetworkLog.ts +11 -4
- package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +4 -2
- package/front_end/models/persistence/NetworkPersistenceManager.ts +7 -1
- package/front_end/models/stack_trace/StackTraceImpl.ts +1 -0
- package/front_end/models/trace/Name.ts +5 -5
- package/front_end/models/trace/Styles.ts +115 -115
- package/front_end/models/trace/extras/TraceTree.ts +2 -1
- package/front_end/models/trace/helpers/Network.ts +4 -1
- package/front_end/models/trace/insights/CLSCulprits.ts +4 -2
- package/front_end/models/trace/insights/CharacterSet.ts +3 -3
- package/front_end/models/trace/insights/DOMSize.ts +1 -1
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +6 -2
- package/front_end/models/trace/insights/FontDisplay.ts +9 -3
- package/front_end/models/trace/insights/ForcedReflow.ts +4 -4
- package/front_end/models/trace/insights/INPBreakdown.ts +3 -4
- package/front_end/models/trace/insights/ImageDelivery.ts +2 -2
- package/front_end/models/trace/insights/LCPBreakdown.ts +1 -1
- package/front_end/models/trace/insights/LCPDiscovery.ts +5 -5
- package/front_end/models/trace/insights/LegacyJavaScript.ts +7 -3
- package/front_end/models/trace/insights/ModernHTTP.ts +3 -3
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +13 -9
- package/front_end/models/trace/insights/RenderBlocking.ts +1 -1
- package/front_end/models/trace/insights/SlowCSSSelector.ts +29 -25
- package/front_end/models/trace/insights/ThirdParties.ts +13 -5
- package/front_end/models/trace/insights/Viewport.ts +4 -2
- package/front_end/models/workspace/IgnoreListManager.ts +53 -17
- package/front_end/panels/accessibility/ARIAAttributesView.ts +11 -2
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +67 -53
- package/front_end/panels/ai_assistance/components/ChatView.ts +2 -2
- package/front_end/panels/ai_assistance/components/StylingAgentMarkdownRenderer.ts +2 -2
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +5 -5
- package/front_end/panels/animation/AnimationTimeline.ts +2 -0
- package/front_end/panels/application/ServiceWorkersView.ts +1 -1
- package/front_end/panels/application/StorageView.ts +2 -0
- package/front_end/panels/application/preloading/PreloadingView.ts +9 -3
- package/front_end/panels/application/preloading/components/components.ts +2 -0
- package/front_end/panels/browser_debugger/ObjectEventListenersSidebarPane.ts +10 -11
- package/front_end/panels/changes/CombinedDiffView.ts +1 -1
- package/front_end/panels/common/BadgeNotification.ts +1 -1
- package/front_end/panels/common/ExtensionPanel.ts +12 -7
- package/front_end/panels/common/ExtensionServer.ts +85 -26
- package/front_end/panels/common/GdpSignUpDialog.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +2 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +3 -2
- package/front_end/panels/console/console-meta.ts +9 -0
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +9 -4
- package/front_end/panels/elements/CSSRuleValidator.ts +12 -12
- package/front_end/panels/elements/CSSSpecificityBreakdown.ts +1 -1
- package/front_end/panels/elements/ClassesPaneWidget.ts +6 -6
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +1 -1
- package/front_end/panels/elements/ComputedStyleWidget.ts +4 -5
- package/front_end/panels/elements/DOMTreeContextMenu.ts +3 -6
- package/front_end/panels/elements/ElementIssueUtils.ts +20 -20
- package/front_end/panels/elements/ElementStatePaneWidget.ts +9 -6
- package/front_end/panels/elements/ElementsPanel.ts +10 -10
- package/front_end/panels/elements/ElementsTreeElement.ts +35 -29
- package/front_end/panels/elements/ElementsTreeOutline.ts +5 -20
- package/front_end/panels/elements/EventListenersWidget.ts +18 -19
- package/front_end/panels/elements/LayersWidget.ts +4 -4
- package/front_end/panels/elements/LayoutPane.ts +11 -11
- package/front_end/panels/elements/MarkerDecorator.ts +3 -3
- package/front_end/panels/elements/PlatformFontsWidget.ts +8 -8
- package/front_end/panels/elements/PropertiesWidget.ts +4 -4
- package/front_end/panels/elements/PropertyRenderer.ts +2 -2
- package/front_end/panels/elements/ShortcutTreeElement.ts +1 -1
- package/front_end/panels/elements/StylePropertiesSection.ts +14 -14
- package/front_end/panels/elements/StylePropertyTreeElement.ts +21 -21
- package/front_end/panels/elements/StylesSidebarPane.ts +12 -13
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +1 -1
- package/front_end/panels/elements/components/CSSHintDetailsView.ts +1 -1
- package/front_end/panels/elements/components/CSSVariableValueView.ts +3 -3
- package/front_end/panels/elements/components/ElementsBreadcrumbsUtils.ts +2 -2
- package/front_end/panels/elements/components/ElementsTreeExpandButton.ts +1 -1
- package/front_end/panels/elements/elements-meta.ts +13 -13
- package/front_end/panels/issues/AffectedCookiesView.ts +2 -0
- package/front_end/panels/issues/AffectedElementsView.ts +5 -0
- package/front_end/panels/issues/IssueView.ts +12 -8
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +11 -7
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +2 -0
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryViewer.ts +1 -1
- package/front_end/panels/media/PlayerPropertiesView.ts +309 -416
- package/front_end/panels/media/playerPropertiesView.css +1 -1
- package/front_end/panels/network/NetworkLogView.ts +5 -2
- package/front_end/panels/network/NetworkOverview.ts +11 -5
- package/front_end/panels/network/NetworkPanel.ts +4 -2
- package/front_end/panels/network/NetworkWaterfallColumn.ts +16 -3
- package/front_end/panels/network/RequestHeadersView.ts +4 -4
- package/front_end/panels/network/components/ResponseHeaderSection.ts +7 -4
- package/front_end/panels/network/network-meta.ts +63 -0
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +2 -1
- package/front_end/panels/recorder/RecordingView.ts +89 -73
- package/front_end/panels/recorder/ReplaySection.ts +59 -40
- package/front_end/panels/recorder/injected/injected.ts +4 -0
- package/front_end/panels/security/SecurityPanel.ts +5 -6
- package/front_end/panels/security/SecurityPanelSidebar.ts +244 -204
- package/front_end/panels/security/security.ts +0 -4
- package/front_end/panels/settings/EditFileSystemView.ts +8 -7
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +20 -14
- package/front_end/panels/settings/components/SyncSection.ts +1 -1
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +0 -3
- package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +10 -11
- package/front_end/panels/sources/NavigatorView.ts +6 -2
- package/front_end/panels/sources/SourcesNavigator.ts +8 -4
- package/front_end/panels/sources/SourcesPanel.ts +4 -2
- package/front_end/panels/sources/SourcesSearchScope.ts +3 -1
- package/front_end/panels/sources/UISourceCodeFrame.ts +2 -2
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +3 -3
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +5 -5
- package/front_end/panels/timeline/components/CWVMetrics.ts +1 -2
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +5 -5
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +2 -3
- package/front_end/panels/timeline/components/LiveMetricsView.ts +2 -2
- package/front_end/panels/timeline/components/Sidebar.ts +3 -3
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +1 -2
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +3 -1
- package/front_end/panels/timeline/components/insights/CLSCulprits.ts +1 -2
- package/front_end/panels/timeline/components/insights/Cache.ts +1 -2
- package/front_end/panels/timeline/components/insights/CharacterSet.ts +1 -2
- package/front_end/panels/timeline/components/insights/DOMSize.ts +1 -2
- package/front_end/panels/timeline/components/insights/DocumentLatency.ts +2 -2
- package/front_end/panels/timeline/components/insights/DuplicatedJavaScript.ts +2 -2
- package/front_end/panels/timeline/components/insights/FontDisplay.ts +1 -2
- package/front_end/panels/timeline/components/insights/ForcedReflow.ts +1 -2
- package/front_end/panels/timeline/components/insights/INPBreakdown.ts +1 -2
- package/front_end/panels/timeline/components/insights/ImageDelivery.ts +1 -2
- package/front_end/panels/timeline/components/insights/LCPBreakdown.ts +13 -13
- package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +1 -2
- package/front_end/panels/timeline/components/insights/LegacyJavaScript.ts +4 -4
- package/front_end/panels/timeline/components/insights/ModernHTTP.ts +1 -2
- package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +10 -8
- package/front_end/panels/timeline/components/insights/RenderBlocking.ts +2 -2
- package/front_end/panels/timeline/components/insights/SidebarInsight.ts +3 -1
- package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +2 -2
- package/front_end/panels/timeline/components/insights/ThirdParties.ts +1 -2
- package/front_end/panels/timeline/components/insights/Viewport.ts +1 -2
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +1 -2
- package/front_end/panels/timeline/timeline.ts +0 -2
- package/front_end/panels/web_audio/WebAudioView.ts +14 -6
- package/front_end/panels/webauthn/WebauthnPane.ts +9 -9
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/web-vitals/rebuild.sh +1 -1
- package/front_end/ui/components/diff_view/DiffView.ts +2 -1
- package/front_end/ui/components/report_view/ReportView.docs.ts +2 -2
- package/front_end/ui/components/text_editor/javascript.ts +12 -13
- package/front_end/ui/legacy/GlassPane.ts +38 -14
- package/front_end/ui/legacy/Treeoutline.ts +14 -3
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +11 -11
- package/front_end/ui/legacy/components/color_picker/FormatPickerContextMenu.ts +1 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +19 -20
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/JavaScriptREPL.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +3 -3
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +185 -355
- package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +3 -8
- package/front_end/ui/legacy/components/utils/ImagePreview.ts +15 -16
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +4 -4
- package/front_end/ui/legacy/components/utils/Linkifier.ts +8 -10
- package/front_end/ui/settings/InspectorMainSettings.ts +12 -0
- package/front_end/ui/settings/settings.ts +2 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +32 -0
- package/mcp/mcp.ts +0 -9
- package/package.json +1 -1
- package/front_end/core/sdk/sdk-meta.ts +0 -40
- package/front_end/models/badges/badges-meta.ts +0 -27
- package/front_end/models/logs/logs-meta.ts +0 -84
- package/front_end/models/persistence/persistence-meta.ts +0 -69
- package/front_end/models/workspace/workspace-meta.ts +0 -40
- package/front_end/panels/security/OriginTreeElement.ts +0 -60
- package/front_end/panels/security/SecurityPanelSidebarTreeElement.ts +0 -30
|
@@ -6,8 +6,6 @@ import * as Common from '../../../../core/common/common.js';
|
|
|
6
6
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
7
7
|
import * as SDK from '../../../../core/sdk/sdk.js';
|
|
8
8
|
import * as Bindings from '../../../../models/bindings/bindings.js';
|
|
9
|
-
import type {
|
|
10
|
-
LegacyJavaScriptInsightModel, PatternMatchResult} from '../../../../models/trace/insights/LegacyJavaScript.js';
|
|
11
9
|
import * as Trace from '../../../../models/trace/trace.js';
|
|
12
10
|
import * as UI from '../../../../ui/legacy/legacy.js';
|
|
13
11
|
import * as Lit from '../../../../ui/lit/lit.js';
|
|
@@ -21,7 +19,8 @@ const {UIStrings, i18nString} = Trace.Insights.Models.LegacyJavaScript;
|
|
|
21
19
|
const {html} = Lit;
|
|
22
20
|
const {widget} = UI.Widget;
|
|
23
21
|
|
|
24
|
-
export class LegacyJavaScript extends
|
|
22
|
+
export class LegacyJavaScript extends
|
|
23
|
+
BaseInsightComponent<Trace.Insights.Models.LegacyJavaScript.LegacyJavaScriptInsightModel> {
|
|
25
24
|
override internalName = 'legacy-javascript';
|
|
26
25
|
|
|
27
26
|
override getEstimatedSavingsTime(): Trace.Types.Timing.Milli|null {
|
|
@@ -32,7 +31,8 @@ export class LegacyJavaScript extends BaseInsightComponent<LegacyJavaScriptInsig
|
|
|
32
31
|
return true;
|
|
33
32
|
}
|
|
34
33
|
|
|
35
|
-
async #revealLocation(script: Trace.Handlers.ModelHandlers.Scripts.Script,
|
|
34
|
+
async #revealLocation(script: Trace.Handlers.ModelHandlers.Scripts.Script,
|
|
35
|
+
match: Trace.Insights.Models.LegacyJavaScript.PatternMatchResult): Promise<void> {
|
|
36
36
|
const target = SDK.TargetManager.TargetManager.instance().primaryPageTarget();
|
|
37
37
|
if (!target) {
|
|
38
38
|
return;
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import './Table.js';
|
|
6
6
|
|
|
7
|
-
import type {ModernHTTPInsightModel} from '../../../../models/trace/insights/ModernHTTP.js';
|
|
8
7
|
import * as Trace from '../../../../models/trace/trace.js';
|
|
9
8
|
import * as UI from '../../../../ui/legacy/legacy.js';
|
|
10
9
|
import * as Lit from '../../../../ui/lit/lit.js';
|
|
@@ -18,7 +17,7 @@ const {UIStrings, i18nString, createOverlayForRequest} = Trace.Insights.Models.M
|
|
|
18
17
|
const {html} = Lit;
|
|
19
18
|
const {widget} = UI.Widget;
|
|
20
19
|
|
|
21
|
-
export class ModernHTTP extends BaseInsightComponent<ModernHTTPInsightModel> {
|
|
20
|
+
export class ModernHTTP extends BaseInsightComponent<Trace.Insights.Models.ModernHTTP.ModernHTTPInsightModel> {
|
|
22
21
|
override internalName = 'modern-http';
|
|
23
22
|
|
|
24
23
|
protected override hasAskAiSupport(): boolean {
|
|
@@ -6,9 +6,6 @@ import './Table.js';
|
|
|
6
6
|
import '../../../../ui/kit/kit.js';
|
|
7
7
|
|
|
8
8
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
9
|
-
import type {
|
|
10
|
-
CriticalRequestNode, NetworkDependencyTreeInsightModel} from
|
|
11
|
-
'../../../../models/trace/insights/NetworkDependencyTree.js';
|
|
12
9
|
import * as Trace from '../../../../models/trace/trace.js';
|
|
13
10
|
import * as UI from '../../../../ui/legacy/legacy.js';
|
|
14
11
|
import * as Lit from '../../../../ui/lit/lit.js';
|
|
@@ -27,7 +24,8 @@ const {widget} = UI.Widget;
|
|
|
27
24
|
|
|
28
25
|
export const MAX_CHAINS_TO_SHOW = 5;
|
|
29
26
|
|
|
30
|
-
export class NetworkDependencyTree extends
|
|
27
|
+
export class NetworkDependencyTree extends
|
|
28
|
+
BaseInsightComponent<Trace.Insights.Models.NetworkDependencyTree.NetworkDependencyTreeInsightModel> {
|
|
31
29
|
override internalName = 'long-critical-network-tree';
|
|
32
30
|
|
|
33
31
|
#relatedRequests: Set<Trace.Types.Events.SyntheticNetworkRequest>|null = null;
|
|
@@ -48,7 +46,7 @@ export class NetworkDependencyTree extends BaseInsightComponent<NetworkDependenc
|
|
|
48
46
|
return overlays;
|
|
49
47
|
}
|
|
50
48
|
|
|
51
|
-
#renderNetworkTreeRow(node: CriticalRequestNode): Lit.LitTemplate {
|
|
49
|
+
#renderNetworkTreeRow(node: Trace.Insights.Models.NetworkDependencyTree.CriticalRequestNode): Lit.LitTemplate {
|
|
52
50
|
const requestStyles = Lit.Directives.styleMap({
|
|
53
51
|
display: 'flex',
|
|
54
52
|
'--override-timeline-link-text-color': node.isLongest ? 'var(--sys-color-error)' : '',
|
|
@@ -71,7 +69,7 @@ export class NetworkDependencyTree extends BaseInsightComponent<NetworkDependenc
|
|
|
71
69
|
// clang-format on
|
|
72
70
|
}
|
|
73
71
|
|
|
74
|
-
mapNetworkDependencyToRow(node: CriticalRequestNode): TableDataRow|null {
|
|
72
|
+
mapNetworkDependencyToRow(node: Trace.Insights.Models.NetworkDependencyTree.CriticalRequestNode): TableDataRow|null {
|
|
75
73
|
// Check early if we've exceeded the maximum number of chains to show.
|
|
76
74
|
// If so, and this is a leaf node, increment count and then skip rendering.
|
|
77
75
|
// Otherwise, simply skip rendering.
|
|
@@ -93,11 +91,15 @@ export class NetworkDependencyTree extends BaseInsightComponent<NetworkDependenc
|
|
|
93
91
|
values: [this.#renderNetworkTreeRow(node)],
|
|
94
92
|
overlays: this.#createOverlayForChain(node.relatedRequests),
|
|
95
93
|
// Filter out the empty rows otherwise the `Table`component will render a super short row
|
|
96
|
-
subRows: node.children
|
|
94
|
+
subRows: node.children
|
|
95
|
+
.map((child: Trace.Insights.Models.NetworkDependencyTree.CriticalRequestNode) =>
|
|
96
|
+
this.mapNetworkDependencyToRow(child))
|
|
97
|
+
.filter((row: TableDataRow|null) => row !== null),
|
|
97
98
|
};
|
|
98
99
|
}
|
|
99
100
|
|
|
100
|
-
#renderNetworkDependencyTree(nodes: CriticalRequestNode[]):
|
|
101
|
+
#renderNetworkDependencyTree(nodes: Trace.Insights.Models.NetworkDependencyTree.CriticalRequestNode[]):
|
|
102
|
+
Lit.LitTemplate|null {
|
|
101
103
|
if (nodes.length === 0) {
|
|
102
104
|
return null;
|
|
103
105
|
}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
6
|
-
import type {RenderBlockingInsightModel} from '../../../../models/trace/insights/RenderBlocking.js';
|
|
7
6
|
import * as Trace from '../../../../models/trace/trace.js';
|
|
8
7
|
import * as UI from '../../../../ui/legacy/legacy.js';
|
|
9
8
|
import * as Lit from '../../../../ui/lit/lit.js';
|
|
@@ -17,7 +16,8 @@ const {UIStrings, i18nString, createOverlayForRequest} = Trace.Insights.Models.R
|
|
|
17
16
|
const {html} = Lit;
|
|
18
17
|
const {widget} = UI.Widget;
|
|
19
18
|
|
|
20
|
-
export class RenderBlocking extends
|
|
19
|
+
export class RenderBlocking extends
|
|
20
|
+
BaseInsightComponent<Trace.Insights.Models.RenderBlocking.RenderBlockingInsightModel> {
|
|
21
21
|
override internalName = 'render-blocking-requests';
|
|
22
22
|
|
|
23
23
|
mapToRow(request: Trace.Types.Events.SyntheticNetworkRequest): TableDataRow {
|
|
@@ -2,10 +2,12 @@
|
|
|
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 type
|
|
5
|
+
import type * as Insights from '../../../../models/trace/insights/insights.js';
|
|
6
6
|
import type * as Trace from '../../../../models/trace/trace.js';
|
|
7
7
|
import type * as Overlays from '../../overlays/overlays.js';
|
|
8
8
|
|
|
9
|
+
type InsightModel = Insights.Types.InsightModel;
|
|
10
|
+
|
|
9
11
|
export interface InsightDetails {
|
|
10
12
|
title: string;
|
|
11
13
|
description: string;
|
|
@@ -8,7 +8,6 @@ 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
10
|
import type * as Protocol from '../../../../generated/protocol.js';
|
|
11
|
-
import type {SlowCSSSelectorInsightModel} from '../../../../models/trace/insights/SlowCSSSelector.js';
|
|
12
11
|
import * as Trace from '../../../../models/trace/trace.js';
|
|
13
12
|
import type * as Linkifier from '../../../../ui/components/linkifier/linkifier.js';
|
|
14
13
|
import * as UI from '../../../../ui/legacy/legacy.js';
|
|
@@ -22,7 +21,8 @@ const {UIStrings, i18nString} = Trace.Insights.Models.SlowCSSSelector;
|
|
|
22
21
|
const {html} = Lit;
|
|
23
22
|
const {widget} = UI.Widget;
|
|
24
23
|
|
|
25
|
-
export class SlowCSSSelector extends
|
|
24
|
+
export class SlowCSSSelector extends
|
|
25
|
+
BaseInsightComponent<Trace.Insights.Models.SlowCSSSelector.SlowCSSSelectorInsightModel> {
|
|
26
26
|
override internalName = 'slow-css-selector';
|
|
27
27
|
#selectorLocations = new Map<string, Protocol.CSS.SourceRange[]>();
|
|
28
28
|
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
6
|
-
import type {ThirdPartiesInsightModel} from '../../../../models/trace/insights/ThirdParties.js';
|
|
7
6
|
import * as Trace from '../../../../models/trace/trace.js';
|
|
8
7
|
import * as UI from '../../../../ui/legacy/legacy.js';
|
|
9
8
|
import * as Lit from '../../../../ui/lit/lit.js';
|
|
@@ -18,7 +17,7 @@ const {widget} = UI.Widget;
|
|
|
18
17
|
|
|
19
18
|
const MAX_TO_SHOW = 5;
|
|
20
19
|
|
|
21
|
-
export class ThirdParties extends BaseInsightComponent<ThirdPartiesInsightModel> {
|
|
20
|
+
export class ThirdParties extends BaseInsightComponent<Trace.Insights.Models.ThirdParties.ThirdPartiesInsightModel> {
|
|
22
21
|
override internalName = 'third-parties';
|
|
23
22
|
|
|
24
23
|
#mainThreadTimeAggregator: RowLimitAggregator<Trace.Extras.ThirdParties.EntitySummary> = {
|
|
@@ -2,7 +2,6 @@
|
|
|
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 type {ViewportInsightModel} from '../../../../models/trace/insights/Viewport.js';
|
|
6
5
|
import type * as Trace from '../../../../models/trace/trace.js';
|
|
7
6
|
import * as Lit from '../../../../ui/lit/lit.js';
|
|
8
7
|
|
|
@@ -11,7 +10,7 @@ import {nodeLink} from './NodeLink.js';
|
|
|
11
10
|
|
|
12
11
|
const {html} = Lit;
|
|
13
12
|
|
|
14
|
-
export class Viewport extends BaseInsightComponent<ViewportInsightModel> {
|
|
13
|
+
export class Viewport extends BaseInsightComponent<Trace.Insights.Models.Viewport.ViewportInsightModel> {
|
|
15
14
|
override internalName = 'viewport';
|
|
16
15
|
|
|
17
16
|
protected override hasAskAiSupport(): boolean {
|
|
@@ -15,7 +15,6 @@ import {html, render} from '../../../ui/lit/lit.js';
|
|
|
15
15
|
import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
|
16
16
|
|
|
17
17
|
import * as Components from './components/components.js';
|
|
18
|
-
import type {SectionPosition} from './components/TimespanBreakdownOverlay.js';
|
|
19
18
|
|
|
20
19
|
const UIStrings = {
|
|
21
20
|
/**
|
|
@@ -939,7 +938,7 @@ export class Overlays extends EventTarget {
|
|
|
939
938
|
widget.left = leftEdgePixel;
|
|
940
939
|
widget.width = rangeWidth;
|
|
941
940
|
|
|
942
|
-
const widths: SectionPosition[] = [];
|
|
941
|
+
const widths: Components.TimespanBreakdownOverlay.SectionPosition[] = [];
|
|
943
942
|
for (const section of overlay.sections) {
|
|
944
943
|
const leftPixel = this.#xPixelForMicroSeconds('main', section.bounds.min);
|
|
945
944
|
const rightPixel = this.#xPixelForMicroSeconds('main', section.bounds.max);
|
|
@@ -7,7 +7,6 @@ import * as AnnotationHelpers from './AnnotationHelpers.js';
|
|
|
7
7
|
import * as AppenderUtils from './AppenderUtils.js';
|
|
8
8
|
import * as BenchmarkEvents from './BenchmarkEvents.js';
|
|
9
9
|
import * as CompatibilityTracksAppender from './CompatibilityTracksAppender.js';
|
|
10
|
-
import * as NetworkTrackWidget from './components/NetworkTrackWidget.js';
|
|
11
10
|
import * as CountersGraph from './CountersGraph.js';
|
|
12
11
|
import * as EntriesFilter from './EntriesFilter.js';
|
|
13
12
|
import * as EventsTimelineTreeView from './EventsTimelineTreeView.js';
|
|
@@ -62,7 +61,6 @@ export {
|
|
|
62
61
|
LayoutShiftsTrackAppender,
|
|
63
62
|
ModificationsManager,
|
|
64
63
|
NetworkTrackAppender,
|
|
65
|
-
NetworkTrackWidget,
|
|
66
64
|
RecordingMetadata,
|
|
67
65
|
SaveFileFormatter,
|
|
68
66
|
TargetForEvent,
|
|
@@ -49,6 +49,10 @@ const UIStrings = {
|
|
|
49
49
|
* @description Label for the callback buffer size of an audio context.
|
|
50
50
|
*/
|
|
51
51
|
callbackBufferSize: 'Callback buffer size',
|
|
52
|
+
/**
|
|
53
|
+
* @description Label for the render quantum size of an audio context.
|
|
54
|
+
*/
|
|
55
|
+
renderQuantumSize: 'Render quantum size',
|
|
52
56
|
/**
|
|
53
57
|
* @description Label in the WebAudio tool for the maximum number of output channels of an audio context.
|
|
54
58
|
*/
|
|
@@ -128,7 +132,7 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
128
132
|
link: WEBAUDIO_EXPLANATION_URL,
|
|
129
133
|
})}
|
|
130
134
|
</div>` : html`<div class="web-audio-details-container vbox flex-auto">
|
|
131
|
-
<div class="context-detail-container">
|
|
135
|
+
<div class="context-detail-container" jslog=${VisualLogging.section('audio-context-details')}>
|
|
132
136
|
<div class="context-detail-header">
|
|
133
137
|
<div class="context-detail-title">
|
|
134
138
|
${selectedContext.contextType === 'realtime' ? i18n.i18n.lockedString('AudioContext')
|
|
@@ -136,20 +140,24 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
136
140
|
</div>
|
|
137
141
|
<div class="context-detail-subtitle">${selectedContext.contextId}</div>
|
|
138
142
|
</div>
|
|
139
|
-
<div class="context-detail-row">
|
|
143
|
+
<div class="context-detail-row" jslog=${VisualLogging.item('detail-row')}>
|
|
140
144
|
<div class="context-detail-row-entry">${i18nString(UIStrings.state)}</div>
|
|
141
145
|
<div class="context-detail-row-value">${selectedContext.contextState}</div>
|
|
142
146
|
</div>
|
|
143
|
-
<div class="context-detail-row">
|
|
147
|
+
<div class="context-detail-row" jslog=${VisualLogging.item('detail-row')}>
|
|
144
148
|
<div class="context-detail-row-entry">${i18nString(UIStrings.sampleRate)}</div>
|
|
145
149
|
<div class="context-detail-row-value">${selectedContext.sampleRate} Hz</div>
|
|
146
150
|
</div>
|
|
147
151
|
${selectedContext.contextType === 'realtime' ? html`
|
|
148
|
-
<div class="context-detail-row">
|
|
152
|
+
<div class="context-detail-row" jslog=${VisualLogging.item('detail-row')}>
|
|
149
153
|
<div class="context-detail-row-entry">${i18nString(UIStrings.callbackBufferSize)}</div>
|
|
150
154
|
<div class="context-detail-row-value">${selectedContext.callbackBufferSize} frames</div>
|
|
151
155
|
</div>` : ''}
|
|
152
|
-
<div class="context-detail-row">
|
|
156
|
+
<div class="context-detail-row" jslog=${VisualLogging.item('detail-row')}>
|
|
157
|
+
<div class="context-detail-row-entry">${i18nString(UIStrings.renderQuantumSize)}</div>
|
|
158
|
+
<div class="context-detail-row-value">${selectedContext.renderQuantumSize} frames</div>
|
|
159
|
+
</div>
|
|
160
|
+
<div class="context-detail-row" jslog=${VisualLogging.item('detail-row')}>
|
|
153
161
|
<div class="context-detail-row-entry">${i18nString(UIStrings.maxOutputChannels)}</div>
|
|
154
162
|
<div class="context-detail-row-value">${selectedContext.maxOutputChannelCount} ch</div>
|
|
155
163
|
</div>
|
|
@@ -157,7 +165,7 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
157
165
|
</div>`}
|
|
158
166
|
<div class="web-audio-summary-container">
|
|
159
167
|
${contextRealtimeData ?
|
|
160
|
-
html`<div class="context-summary-container">
|
|
168
|
+
html`<div class="context-summary-container" jslog=${VisualLogging.section('audio-context-summary')}>
|
|
161
169
|
<span>${i18nString(UIStrings.currentTime)}: ${contextRealtimeData.currentTime.toFixed(3)} s</span>
|
|
162
170
|
<span>\u2758</span>
|
|
163
171
|
<span>${i18nString(UIStrings.callbackInterval)}: μ = ${
|
|
@@ -189,7 +189,7 @@ function renderCredentialsDataGrid(
|
|
|
189
189
|
</thead>
|
|
190
190
|
<tbody>
|
|
191
191
|
${credentials.length ? repeat(credentials, c => c.credentialId, credential => html`
|
|
192
|
-
<tr>
|
|
192
|
+
<tr jslog=${VisualLogging.tableRow('credential')}>
|
|
193
193
|
<td>${credential.credentialId}</td>
|
|
194
194
|
<td>${credential.isResidentCredential}</td>
|
|
195
195
|
<td>${credential.rpId}</td>
|
|
@@ -492,19 +492,19 @@ function renderAuthenticatorFields(
|
|
|
492
492
|
// clang-format off
|
|
493
493
|
return html`
|
|
494
494
|
<div class="authenticator-fields">
|
|
495
|
-
<div class="authenticator-field">
|
|
495
|
+
<div class="authenticator-field" jslog=${VisualLogging.item('authenticator-field')}>
|
|
496
496
|
<label class="authenticator-option-label">${i18nString(UIStrings.uuid)}</label>
|
|
497
497
|
<div class="authenticator-field-value">${authenticatorId}</div>
|
|
498
498
|
</div>
|
|
499
|
-
<div class="authenticator-field">
|
|
499
|
+
<div class="authenticator-field" jslog=${VisualLogging.item('authenticator-field')}>
|
|
500
500
|
<label class="authenticator-option-label">${i18nString(UIStrings.protocol)}</label>
|
|
501
501
|
<div class="authenticator-field-value">${options.protocol}</div>
|
|
502
502
|
</div>
|
|
503
|
-
<div class="authenticator-field">
|
|
503
|
+
<div class="authenticator-field" jslog=${VisualLogging.item('authenticator-field')}>
|
|
504
504
|
<label class="authenticator-option-label">${i18nString(UIStrings.transport)}</label>
|
|
505
505
|
<div class="authenticator-field-value">${options.transport}</div>
|
|
506
506
|
</div>
|
|
507
|
-
<div class="authenticator-field">
|
|
507
|
+
<div class="authenticator-field" jslog=${VisualLogging.item('authenticator-field')}>
|
|
508
508
|
<label class="authenticator-option-label">
|
|
509
509
|
${i18nString(UIStrings.supportsResidentKeys)}
|
|
510
510
|
</label>
|
|
@@ -512,7 +512,7 @@ function renderAuthenticatorFields(
|
|
|
512
512
|
${options.hasResidentKey ? i18nString(UIStrings.yes) : i18nString(UIStrings.no)}
|
|
513
513
|
</div>
|
|
514
514
|
</div>
|
|
515
|
-
<div class="authenticator-field">
|
|
515
|
+
<div class="authenticator-field" jslog=${VisualLogging.item('authenticator-field')}>
|
|
516
516
|
<label class="authenticator-option-label">
|
|
517
517
|
${i18nString(UIStrings.supportsLargeBlob)}
|
|
518
518
|
</label>
|
|
@@ -520,7 +520,7 @@ function renderAuthenticatorFields(
|
|
|
520
520
|
${options.hasLargeBlob ? i18nString(UIStrings.yes) : i18nString(UIStrings.no)}
|
|
521
521
|
</div>
|
|
522
522
|
</div>
|
|
523
|
-
<div class="authenticator-field">
|
|
523
|
+
<div class="authenticator-field" jslog=${VisualLogging.item('authenticator-field')}>
|
|
524
524
|
<label class="authenticator-option-label">
|
|
525
525
|
${i18nString(UIStrings.supportsUserVerification)}
|
|
526
526
|
</label>
|
|
@@ -528,7 +528,7 @@ function renderAuthenticatorFields(
|
|
|
528
528
|
${options.hasUserVerification ? i18nString(UIStrings.yes) : i18nString(UIStrings.no)}
|
|
529
529
|
</div>
|
|
530
530
|
</div>
|
|
531
|
-
<div class="authenticator-field">
|
|
531
|
+
<div class="authenticator-field" jslog=${VisualLogging.item('authenticator-field')}>
|
|
532
532
|
<label class="authenticator-option-label">
|
|
533
533
|
${i18nString(UIStrings.supportsHmacSecret)}
|
|
534
534
|
</label>
|
|
@@ -536,7 +536,7 @@ function renderAuthenticatorFields(
|
|
|
536
536
|
${options.hasHmacSecret ? i18nString(UIStrings.yes) : i18nString(UIStrings.no)}
|
|
537
537
|
</div>
|
|
538
538
|
</div>
|
|
539
|
-
<div class="authenticator-field">
|
|
539
|
+
<div class="authenticator-field" jslog=${VisualLogging.item('authenticator-field')}>
|
|
540
540
|
<label class="authenticator-option-label">
|
|
541
541
|
${i18nString(UIStrings.supportsHmacSecretMc)}
|
|
542
542
|
</label>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Name: Dependencies sourced from the upstream `chromium` repository
|
|
2
2
|
URL: Internal
|
|
3
3
|
Version: N/A
|
|
4
|
-
Revision:
|
|
4
|
+
Revision: e35c9c6a769bb2bfc92bbbd8270b7ef6b330b939
|
|
5
5
|
Update Mechanism: Manual (https://crbug.com/428069060)
|
|
6
6
|
License: BSD-3-Clause
|
|
7
7
|
License File: LICENSE
|
|
@@ -33,6 +33,6 @@ cd -
|
|
|
33
33
|
|
|
34
34
|
# Copy the source files to our repo, and build it.
|
|
35
35
|
cp -r tmp-repo/src package/src
|
|
36
|
-
../../../
|
|
36
|
+
vpython3 ../../../third_party/typescript/typescript.py --ignoreConfig --skipLibCheck -d -t esnext -m esnext --moduleResolution bundler --strict --outDir package/dist/modules/ package/src/**/*.ts package/src/index.ts
|
|
37
37
|
|
|
38
38
|
echo "Rebuild complete."
|
|
@@ -201,7 +201,8 @@ class DiffRenderer {
|
|
|
201
201
|
return html`
|
|
202
202
|
<style>${diffViewStyles}</style>
|
|
203
203
|
<style>${CodeHighlighter.codeHighlighterStyles}</style>
|
|
204
|
-
<div class="diff-listing" aria-label=${i18nString(UIStrings.changesDiffViewer)}
|
|
204
|
+
<div class="diff-listing" aria-label=${i18nString(UIStrings.changesDiffViewer)} jslog=${
|
|
205
|
+
VisualLogging.section('diff-view')}>
|
|
205
206
|
${rows.map(row => this.#renderRow(row))}
|
|
206
207
|
</div>`;
|
|
207
208
|
}
|
|
@@ -6,7 +6,7 @@ import './report_view.js';
|
|
|
6
6
|
|
|
7
7
|
import * as Lit from '../../lit/lit.js';
|
|
8
8
|
|
|
9
|
-
import type
|
|
9
|
+
import type * as ReportView from './report_view.js';
|
|
10
10
|
|
|
11
11
|
const {html} = Lit;
|
|
12
12
|
|
|
@@ -19,7 +19,7 @@ export function render(container: HTMLElement) {
|
|
|
19
19
|
// clang-format off
|
|
20
20
|
Lit.render(
|
|
21
21
|
html`
|
|
22
|
-
<devtools-report .data=${{reportTitle: 'Optional Title'} as ReportData}>
|
|
22
|
+
<devtools-report .data=${{reportTitle: 'Optional Title'} as ReportView.ReportView.ReportData}>
|
|
23
23
|
<devtools-report-section-header>Section 1</devtools-report-section-header>
|
|
24
24
|
<devtools-report-key>Basic plain text field</devtools-report-key>
|
|
25
25
|
<devtools-report-value>And this is the value</devtools-report-value>
|
|
@@ -237,19 +237,18 @@ async function evaluateExpression(
|
|
|
237
237
|
expression: string,
|
|
238
238
|
group: string,
|
|
239
239
|
): Promise<SDK.RemoteObject.RemoteObject|null> {
|
|
240
|
-
const result = await context.
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
false, false);
|
|
240
|
+
const result = await context.evaluateWithSelectedFrameFallback({
|
|
241
|
+
expression,
|
|
242
|
+
objectGroup: group,
|
|
243
|
+
includeCommandLineAPI: true,
|
|
244
|
+
silent: true,
|
|
245
|
+
returnByValue: false,
|
|
246
|
+
generatePreview: false,
|
|
247
|
+
throwOnSideEffect: true,
|
|
248
|
+
timeout: 500,
|
|
249
|
+
replMode: true,
|
|
250
|
+
},
|
|
251
|
+
false, false);
|
|
253
252
|
if ('error' in result || result.exceptionDetails || !result.object) {
|
|
254
253
|
return null;
|
|
255
254
|
}
|
|
@@ -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
|
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
5
|
-
import type
|
|
5
|
+
import type * as Geometry from '../../models/geometry/geometry.js';
|
|
6
6
|
|
|
7
7
|
import glassPaneStyles from './glassPane.css.js';
|
|
8
8
|
import {deepElementFromEvent, measuredScrollbarWidth} from './UIUtils.js';
|
|
@@ -16,7 +16,7 @@ export class GlassPane {
|
|
|
16
16
|
private readonly onMouseDownBound: (event: Event) => void;
|
|
17
17
|
private onClickOutsideCallback: ((arg0: Event) => void)|null = null;
|
|
18
18
|
#onHideCallback: (() => void)|null = null;
|
|
19
|
-
private maxSize: Size|null = null;
|
|
19
|
+
private maxSize: Geometry.Size|null = null;
|
|
20
20
|
private positionX: number|null = null;
|
|
21
21
|
private positionY: number|null = null;
|
|
22
22
|
private anchorBox: AnchorBox|null = null;
|
|
@@ -60,9 +60,13 @@ export class GlassPane {
|
|
|
60
60
|
|
|
61
61
|
setPointerEventsBehavior(pointerEventsBehavior: PointerEventsBehavior): void {
|
|
62
62
|
this.element.classList.toggle(
|
|
63
|
-
'no-pointer-events',
|
|
63
|
+
'no-pointer-events',
|
|
64
|
+
pointerEventsBehavior !== PointerEventsBehavior.BLOCKED_BY_GLASS_PANE,
|
|
65
|
+
);
|
|
64
66
|
this.contentElement.classList.toggle(
|
|
65
|
-
'no-pointer-events',
|
|
67
|
+
'no-pointer-events',
|
|
68
|
+
pointerEventsBehavior === PointerEventsBehavior.PIERCE_CONTENTS,
|
|
69
|
+
);
|
|
66
70
|
}
|
|
67
71
|
|
|
68
72
|
setOutsideClickCallback(callback: ((arg0: Event) => void)|null): void {
|
|
@@ -73,7 +77,7 @@ export class GlassPane {
|
|
|
73
77
|
this.#onHideCallback = cb;
|
|
74
78
|
}
|
|
75
79
|
|
|
76
|
-
setMaxContentSize(size: Size|null): void {
|
|
80
|
+
setMaxContentSize(size: Geometry.Size|null): void {
|
|
77
81
|
this.maxSize = size;
|
|
78
82
|
this.positionContent();
|
|
79
83
|
}
|
|
@@ -133,8 +137,16 @@ export class GlassPane {
|
|
|
133
137
|
|
|
134
138
|
#onDetach(): void {
|
|
135
139
|
panes.delete(this);
|
|
136
|
-
this.element.ownerDocument.body.removeEventListener(
|
|
137
|
-
|
|
140
|
+
this.element.ownerDocument.body.removeEventListener(
|
|
141
|
+
'mousedown',
|
|
142
|
+
this.onMouseDownBound,
|
|
143
|
+
true,
|
|
144
|
+
);
|
|
145
|
+
this.element.ownerDocument.body.removeEventListener(
|
|
146
|
+
'pointerdown',
|
|
147
|
+
this.onMouseDownBound,
|
|
148
|
+
true,
|
|
149
|
+
);
|
|
138
150
|
}
|
|
139
151
|
|
|
140
152
|
private onMouseDown(event: Event): void {
|
|
@@ -157,7 +169,7 @@ export class GlassPane {
|
|
|
157
169
|
const scrollbarSize = measuredScrollbarWidth(this.element.ownerDocument);
|
|
158
170
|
const offsetSize = 10;
|
|
159
171
|
|
|
160
|
-
const container =
|
|
172
|
+
const container = containers.get(this.element.ownerDocument) as HTMLElement;
|
|
161
173
|
if (this.sizeBehavior === SizeBehavior.MEASURE_CONTENT) {
|
|
162
174
|
this.contentElement.positionAt(0, 0);
|
|
163
175
|
this.contentElement.style.width = '';
|
|
@@ -189,7 +201,7 @@ export class GlassPane {
|
|
|
189
201
|
|
|
190
202
|
if (this.anchorBox) {
|
|
191
203
|
const anchorBox = this.anchorBox.relativeToElement(container);
|
|
192
|
-
let behavior
|
|
204
|
+
let behavior:|AnchorBehavior.PREFER_BOTTOM|AnchorBehavior.PREFER_TOP|AnchorBehavior.PREFER_RIGHT|
|
|
193
205
|
AnchorBehavior.PREFER_LEFT|AnchorBehavior = this.anchorBehavior;
|
|
194
206
|
|
|
195
207
|
if (behavior === AnchorBehavior.PREFER_TOP || behavior === AnchorBehavior.PREFER_BOTTOM) {
|
|
@@ -226,14 +238,20 @@ export class GlassPane {
|
|
|
226
238
|
}
|
|
227
239
|
}
|
|
228
240
|
|
|
229
|
-
const naturalPositionX = Math.min(
|
|
241
|
+
const naturalPositionX = Math.min(
|
|
242
|
+
anchorBox.x,
|
|
243
|
+
containerWidth - width - gutterSize,
|
|
244
|
+
);
|
|
230
245
|
positionX = Math.max(gutterSize, naturalPositionX);
|
|
231
246
|
if (this.#ignoreLeftMargin && gutterSize > naturalPositionX) {
|
|
232
247
|
positionX = 0;
|
|
233
248
|
}
|
|
234
249
|
|
|
235
250
|
if (!enoughHeight) {
|
|
236
|
-
positionX = Math.min(
|
|
251
|
+
positionX = Math.min(
|
|
252
|
+
positionX + offsetSize,
|
|
253
|
+
containerWidth - width - gutterSize,
|
|
254
|
+
);
|
|
237
255
|
} else if (positionX - offsetSize >= gutterSize) {
|
|
238
256
|
positionX -= offsetSize;
|
|
239
257
|
}
|
|
@@ -272,9 +290,15 @@ export class GlassPane {
|
|
|
272
290
|
}
|
|
273
291
|
}
|
|
274
292
|
|
|
275
|
-
positionY = Math.max(
|
|
293
|
+
positionY = Math.max(
|
|
294
|
+
gutterSize,
|
|
295
|
+
Math.min(anchorBox.y, containerHeight - height - gutterSize),
|
|
296
|
+
);
|
|
276
297
|
if (!enoughWidth) {
|
|
277
|
-
positionY = Math.min(
|
|
298
|
+
positionY = Math.min(
|
|
299
|
+
positionY + offsetSize,
|
|
300
|
+
containerHeight - height - gutterSize,
|
|
301
|
+
);
|
|
278
302
|
} else if (positionY - offsetSize >= gutterSize) {
|
|
279
303
|
positionY -= offsetSize;
|
|
280
304
|
}
|
|
@@ -303,7 +327,7 @@ export class GlassPane {
|
|
|
303
327
|
}
|
|
304
328
|
|
|
305
329
|
static setContainer(element: Element): void {
|
|
306
|
-
containers.set(
|
|
330
|
+
containers.set(element.ownerDocument, element);
|
|
307
331
|
GlassPane.containerMoved(element);
|
|
308
332
|
}
|
|
309
333
|
|
|
@@ -1876,20 +1876,26 @@ export class TreeViewElement extends HTMLElementWithLightDOMTemplate {
|
|
|
1876
1876
|
}
|
|
1877
1877
|
|
|
1878
1878
|
#getParentTreeElement(element: HTMLLIElement|TreeElementWrapper):
|
|
1879
|
-
{treeElement: TreeElement, expanded: boolean, classes: DOMTokenList}|null {
|
|
1879
|
+
{treeElement: TreeElement, expanded: boolean, classes: DOMTokenList, attributes?: NamedNodeMap}|null {
|
|
1880
1880
|
const subtreeRoot = element.parentElement;
|
|
1881
1881
|
if (!(subtreeRoot instanceof HTMLUListElement)) {
|
|
1882
1882
|
return null;
|
|
1883
1883
|
}
|
|
1884
1884
|
if (subtreeRoot.role === 'tree') {
|
|
1885
|
-
return {
|
|
1885
|
+
return {
|
|
1886
|
+
treeElement: this.#treeOutline.rootElement(),
|
|
1887
|
+
expanded: false,
|
|
1888
|
+
classes: subtreeRoot.classList,
|
|
1889
|
+
attributes: subtreeRoot.attributes,
|
|
1890
|
+
};
|
|
1886
1891
|
}
|
|
1887
1892
|
if (subtreeRoot.role !== 'group' || !subtreeRoot.parentElement) {
|
|
1888
1893
|
return null;
|
|
1889
1894
|
}
|
|
1890
1895
|
const treeElement = TreeViewTreeElement.get(subtreeRoot.parentElement);
|
|
1891
1896
|
const expanded = treeElement ? treeElement.expanded : hasBooleanAttribute(subtreeRoot.parentElement, 'open');
|
|
1892
|
-
return treeElement ? {expanded, treeElement, classes: subtreeRoot.classList} :
|
|
1897
|
+
return treeElement ? {expanded, treeElement, classes: subtreeRoot.classList, attributes: subtreeRoot.attributes} :
|
|
1898
|
+
null;
|
|
1893
1899
|
}
|
|
1894
1900
|
|
|
1895
1901
|
protected override updateNode(node: Node, attributeName: string|null): void {
|
|
@@ -1929,6 +1935,11 @@ export class TreeViewElement extends HTMLElementWithLightDOMTemplate {
|
|
|
1929
1935
|
}
|
|
1930
1936
|
if (parent.treeElement.childCount() === 0) {
|
|
1931
1937
|
parent.treeElement.childrenListElement.classList.add(...parent.classes.values());
|
|
1938
|
+
for (const attr of parent.attributes || []) {
|
|
1939
|
+
if (attr.name !== 'role' && attr.name !== 'class') {
|
|
1940
|
+
parent.treeElement.childrenListElement.setAttribute(attr.name, attr.value);
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1932
1943
|
}
|
|
1933
1944
|
let nextElement: TreeElement|null = null;
|
|
1934
1945
|
for (let e: Element|null = node.nextElementSibling; e; e = e.nextElementSibling) {
|