chrome-devtools-frontend 1.0.1730971 → 1.0.1732418
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/front_end/Tests.js +20 -0
- package/front_end/core/host/AidaClient.ts +47 -3
- package/front_end/core/host/AidaClientTypes.ts +8 -1
- package/front_end/core/host/AidaGcaTranslation.ts +1 -1
- package/front_end/core/sdk/NetworkManager.ts +2 -1
- package/front_end/generated/Deprecation.ts +0 -8
- package/front_end/generated/InspectorBackendCommands.ts +2 -1
- package/front_end/generated/protocol.ts +9 -0
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/contexts/LighthouseContext.snapshot.txt +6 -1
- package/front_end/models/ai_assistance/contexts/LighthouseContext.ts +4 -3
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.snapshot.txt +91 -11
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.ts +90 -43
- package/front_end/models/ai_assistance/skills/styling.md +4 -2
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +31 -36
- package/front_end/models/bindings/CompilerScriptMapping.ts +0 -1
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +0 -1
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +0 -1
- package/front_end/models/har/HARFormat.ts +1 -0
- package/front_end/models/har/Importer.ts +7 -1
- package/front_end/models/har/Log.snapshot.txt +2 -0
- package/front_end/models/har/Log.ts +2 -0
- package/front_end/models/javascript_metadata/NativeFunctions.ts +0 -4
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +1 -1
- package/front_end/panels/ai_assistance/components/ChatInput.ts +2 -0
- package/front_end/panels/ai_assistance/components/chatInput.css +1 -1
- package/front_end/panels/ai_assistance/components/exploreWidget.css +1 -1
- package/front_end/panels/animation/animationTimeline.css +11 -9
- package/front_end/panels/application/IndexedDBViews.ts +2 -2
- package/front_end/panels/application/PrivateVerificationTokensView.ts +217 -9
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +1 -1
- package/front_end/panels/application/ServiceWorkersView.ts +1 -1
- package/front_end/panels/application/StorageView.ts +1 -1
- package/front_end/panels/application/appManifestView.css +0 -6
- package/front_end/panels/application/backgroundServiceView.css +0 -21
- package/front_end/panels/application/components/backForwardCacheView.css +1 -9
- package/front_end/panels/application/components/endpointsGrid.css +1 -1
- package/front_end/panels/application/components/permissionsPolicySection.css +1 -1
- package/front_end/panels/application/cookieItemsView.css +0 -1
- package/front_end/panels/application/frameDetailsReportView.css +0 -10
- package/front_end/panels/application/indexedDBViews.css +0 -6
- package/front_end/panels/application/privateVerificationTokensView.css +12 -0
- package/front_end/panels/application/resourcesPanel.css +0 -14
- package/front_end/panels/application/serviceWorkerUpdateCycleView.css +4 -4
- package/front_end/panels/application/serviceWorkersView.css +1 -1
- package/front_end/panels/changes/CombinedDiffView.ts +1 -1
- package/front_end/panels/comments/CommentsPane.ts +5 -0
- package/front_end/panels/common/CommentsOverlayWidget.ts +337 -117
- package/front_end/panels/console/consoleView.css +5 -3
- package/front_end/panels/coverage/CoverageView.ts +0 -1
- package/front_end/panels/coverage/coverageView.css +4 -3
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +0 -1
- package/front_end/panels/elements/AccessibilityTreeView.ts +1 -1
- package/front_end/panels/elements/CSSValueTraceView.ts +2 -4
- package/front_end/panels/elements/DOMTreeContextMenu.ts +1 -1
- package/front_end/panels/elements/DOMTreeWidget.ts +14 -0
- package/front_end/panels/elements/MetricsSidebarPane.ts +1 -1
- package/front_end/panels/elements/PlatformFontsWidget.ts +0 -1
- package/front_end/panels/elements/PropertiesWidget.ts +1 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +2 -0
- package/front_end/panels/elements/WebCustomData.ts +1 -1
- package/front_end/panels/elements/components/cssHintDetailsView.css +1 -1
- package/front_end/panels/elements/components/cssVariableValueView.css +3 -1
- package/front_end/panels/elements/components/elementsTreeExpandButton.css +3 -2
- package/front_end/panels/elements/components/stylePropertyEditor.css +2 -2
- package/front_end/panels/elements/layoutPane.css +1 -1
- package/front_end/panels/elements/metricsSidebarPane.css +4 -4
- package/front_end/panels/elements/platformFontsWidget.css +1 -1
- package/front_end/panels/elements/stylesSidebarPane.css +1 -1
- package/front_end/panels/emulation/DeviceModeView.ts +4 -3
- package/front_end/panels/emulation/deviceModeView.css +6 -7
- package/front_end/panels/event_listeners/eventListenersView.css +4 -4
- package/front_end/panels/explain/components/consoleInsight.css +3 -18
- package/front_end/panels/issues/issuesTree.css +5 -6
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +4 -2
- package/front_end/panels/layer_viewer/TransformController.ts +106 -54
- package/front_end/panels/lighthouse/lighthousePanel.css +4 -7
- package/front_end/panels/lighthouse/lighthouseStartView.css +1 -2
- package/front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css +4 -4
- package/front_end/panels/media/EventTimelineView.ts +1 -4
- package/front_end/panels/media/TickingFlameChart.ts +3 -2
- package/front_end/panels/media/playerListView.css +6 -3
- package/front_end/panels/media/playerMessagesView.css +2 -2
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +1 -1
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +5 -7
- package/front_end/panels/network/NetworkConfigView.ts +1 -1
- package/front_end/panels/network/binaryResourceView.css +0 -7
- package/front_end/panels/network/networkLogView.css +0 -7
- package/front_end/panels/network/networkTimingTable.css +2 -2
- package/front_end/panels/network/requestConditionsDrawer.css +1 -24
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +1 -1
- package/front_end/panels/performance_monitor/performanceMonitor.css +1 -1
- package/front_end/panels/protocol_monitor/JSONEditor.ts +1 -1
- package/front_end/panels/protocol_monitor/protocolMonitor.css +1 -1
- package/front_end/panels/recorder/extensionView.css +1 -1
- package/front_end/panels/recorder/recorderPanel.css +3 -3
- package/front_end/panels/recorder/recordingListView.css +1 -1
- package/front_end/panels/recorder/stepEditor.css +2 -2
- package/front_end/panels/recorder/stepView.css +0 -24
- package/front_end/panels/screencast/screencastView.css +2 -1
- package/front_end/panels/search/searchView.css +4 -3
- package/front_end/panels/security/SecurityPanelSidebar.ts +0 -1
- package/front_end/panels/security/mainView.css +1 -1
- package/front_end/panels/security/originView.css +0 -4
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +2 -1
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +1 -2
- package/front_end/panels/sources/breakpointsView.css +0 -1
- package/front_end/panels/sources/tabbedEditorContainer.css +1 -1
- package/front_end/panels/sources/watchExpressionsSidebarPane.css +2 -2
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +1 -1
- package/front_end/panels/timeline/components/OriginMap.ts +1 -1
- package/front_end/panels/timeline/components/fieldSettingsDialog.css +1 -1
- package/front_end/panels/timeline/components/metricCard.css +1 -1
- package/front_end/panels/timeline/components/networkRequestDetails.css +0 -1
- package/front_end/panels/timeline/components/networkRequestTooltip.css +2 -2
- package/front_end/panels/timeline/timelineFlamechartPopover.css +1 -1
- package/front_end/panels/timeline/timelineHistoryManager.css +1 -1
- package/front_end/panels/timeline/timelineMiniMap.css +1 -1
- package/front_end/panels/timeline/timelineStatusDialog.css +1 -1
- package/front_end/panels/web_audio/webAudio.css +0 -20
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/comments/CommentAnchorResolver.ts +166 -8
- package/front_end/ui/comments/CommentOverlayManager.ts +17 -2
- package/front_end/ui/components/diff_view/diffView.css +1 -1
- package/front_end/ui/components/markdown_view/markdownView.css +1 -1
- package/front_end/ui/components/menus/Menu.ts +1 -1
- package/front_end/ui/components/menus/menuItem.css +1 -1
- package/front_end/ui/components/panel_feedback/panelFeedback.css +2 -2
- package/front_end/ui/components/panel_introduction_steps/panelIntroductionSteps.css +1 -1
- package/front_end/ui/components/report_view/reportValue.css +5 -2
- package/front_end/ui/components/suggestion_input/suggestionInput.css +4 -4
- package/front_end/ui/legacy/ContextMenu.ts +3 -0
- package/front_end/ui/legacy/GlassPane.ts +3 -3
- package/front_end/ui/legacy/SoftContextMenu.ts +7 -1
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +2 -0
- package/front_end/ui/legacy/components/inline_editor/bezierEditor.css +7 -6
- package/front_end/ui/legacy/components/inline_editor/cssAngleEditor.css +3 -3
- package/front_end/ui/legacy/components/perf_ui/flameChart.css +7 -6
- package/front_end/ui/legacy/components/perf_ui/overviewGrid.css +4 -3
- package/front_end/ui/legacy/components/perf_ui/pieChart.css +3 -3
- package/front_end/ui/legacy/components/source_frame/imageView.css +4 -4
- package/front_end/ui/legacy/components/utils/jsUtils.css +2 -1
- package/front_end/ui/legacy/dropTarget.css +1 -1
- package/front_end/ui/legacy/filter.css +4 -3
- package/front_end/ui/legacy/inspectorCommon.css +8 -23
- package/front_end/ui/legacy/inspectorDrawerTabbedPane.css +1 -1
- package/front_end/ui/legacy/suggestBox.css +2 -1
- package/front_end/ui/legacy/toolbar.css +2 -1
- package/front_end/ui/legacy/treeoutline.css +5 -4
- package/front_end/ui/legacy/viewContainers.css +2 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +7 -0
- package/inspector_overlay/highlight_anchor.ts +8 -11
- package/package.json +1 -1
|
@@ -1,34 +1,97 @@
|
|
|
1
1
|
// Copyright 2014 The Chromium Authors
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
|
-
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
5
4
|
|
|
6
5
|
import '../../ui/legacy/legacy.js';
|
|
7
6
|
|
|
8
7
|
import * as Common from '../../core/common/common.js';
|
|
9
8
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
10
9
|
import * as Platform from '../../core/platform/platform.js';
|
|
10
|
+
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
11
11
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
12
|
+
import {html, nothing, render} from '../../ui/lit/lit.js';
|
|
12
13
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
13
14
|
|
|
14
15
|
const UIStrings = {
|
|
15
16
|
/**
|
|
16
|
-
* @description Tooltip text that appears when hovering over largeicon pan
|
|
17
|
+
* @description Tooltip text that appears when hovering over largeicon pan
|
|
18
|
+
* button in transform controller of the Layers panel.
|
|
17
19
|
*/
|
|
18
20
|
panModeX: 'Pan mode (X)',
|
|
19
21
|
/**
|
|
20
|
-
* @description Tooltip text that appears when hovering over largeicon rotate
|
|
22
|
+
* @description Tooltip text that appears when hovering over largeicon rotate
|
|
23
|
+
* button in transform controller of the Layers panel.
|
|
21
24
|
*/
|
|
22
25
|
rotateModeV: 'Rotate mode (V)',
|
|
23
26
|
/**
|
|
24
|
-
* @description Tooltip text that appears when hovering over the largeicon
|
|
27
|
+
* @description Tooltip text that appears when hovering over the largeicon
|
|
28
|
+
* center button in the transform controller of the Layers panel.
|
|
25
29
|
*/
|
|
26
30
|
resetTransform: 'Reset transform (0)',
|
|
27
31
|
} as const;
|
|
28
32
|
const str_ = i18n.i18n.registerUIStrings('panels/layer_viewer/TransformController.ts', UIStrings);
|
|
29
33
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
34
|
+
|
|
35
|
+
export interface ViewInput {
|
|
36
|
+
disableRotate: boolean;
|
|
37
|
+
mode: Modes;
|
|
38
|
+
onSetMode: (mode: Modes) => void;
|
|
39
|
+
onReset: () => void;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type View = (input: ViewInput, output: undefined, target: HTMLElement) => void;
|
|
43
|
+
|
|
44
|
+
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
45
|
+
// clang-format off
|
|
46
|
+
render(html`
|
|
47
|
+
${!input.disableRotate ? html`
|
|
48
|
+
<devtools-button
|
|
49
|
+
class="toolbar-button"
|
|
50
|
+
title=${i18nString(UIStrings.panModeX)}
|
|
51
|
+
jslog=${VisualLogging.toggle().track({click: true}).context('layers.3d-pan')}
|
|
52
|
+
.iconName=${'3d-pan'}
|
|
53
|
+
.toggledIconName=${'3d-pan'}
|
|
54
|
+
.toggleType=${Buttons.Button.ToggleType.PRIMARY}
|
|
55
|
+
.toggleOnClick=${false}
|
|
56
|
+
.toggled=${input.mode === Modes.PAN}
|
|
57
|
+
.variant=${Buttons.Button.Variant.ICON_TOGGLE}
|
|
58
|
+
@click=${() => input.onSetMode(Modes.PAN)}>
|
|
59
|
+
</devtools-button>
|
|
60
|
+
<devtools-button
|
|
61
|
+
class="toolbar-button"
|
|
62
|
+
title=${i18nString(UIStrings.rotateModeV)}
|
|
63
|
+
jslog=${VisualLogging.toggle().track({click: true}).context('layers.3d-rotate')}
|
|
64
|
+
.iconName=${'3d-rotate'}
|
|
65
|
+
.toggledIconName=${'3d-rotate'}
|
|
66
|
+
.toggleType=${Buttons.Button.ToggleType.PRIMARY}
|
|
67
|
+
.toggleOnClick=${false}
|
|
68
|
+
.toggled=${input.mode === Modes.ROTATE}
|
|
69
|
+
.variant=${Buttons.Button.Variant.ICON_TOGGLE}
|
|
70
|
+
@click=${() => input.onSetMode(Modes.ROTATE)}>
|
|
71
|
+
</devtools-button>
|
|
72
|
+
` : nothing}
|
|
73
|
+
<devtools-button
|
|
74
|
+
class="toolbar-button"
|
|
75
|
+
title=${i18nString(UIStrings.resetTransform)}
|
|
76
|
+
.iconName=${'3d-center'}
|
|
77
|
+
.jslogContext=${'layers.3d-center'}
|
|
78
|
+
.variant=${Buttons.Button.Variant.TOOLBAR}
|
|
79
|
+
@click=${(event: Event) => {
|
|
80
|
+
event.preventDefault();
|
|
81
|
+
input.onReset();
|
|
82
|
+
}}>
|
|
83
|
+
</devtools-button>
|
|
84
|
+
`, target, {
|
|
85
|
+
container: {
|
|
86
|
+
classes: ['transform-control-panel'],
|
|
87
|
+
attributes: {jslog: `${VisualLogging.toolbar()}`},
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
// clang-format on
|
|
91
|
+
};
|
|
92
|
+
|
|
30
93
|
export class TransformController extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
31
|
-
private mode
|
|
94
|
+
private mode: Modes = Modes.PAN;
|
|
32
95
|
#scale: number;
|
|
33
96
|
#offsetX: number;
|
|
34
97
|
#offsetY: number;
|
|
@@ -41,15 +104,22 @@ export class TransformController extends Common.ObjectWrapper.ObjectWrapper<Even
|
|
|
41
104
|
element: HTMLElement;
|
|
42
105
|
private minScale: number;
|
|
43
106
|
private maxScale: number;
|
|
44
|
-
|
|
45
|
-
|
|
107
|
+
readonly #disableRotate: boolean;
|
|
108
|
+
readonly #controlPanelToolbar = new UI.Toolbar.Toolbar();
|
|
109
|
+
readonly #view: View;
|
|
46
110
|
/**
|
|
47
111
|
* @param element The HTML element to apply transformations to.
|
|
48
|
-
* @param disableRotate Optional. If true, pan and rotate will be disabled.
|
|
49
|
-
*
|
|
112
|
+
* @param disableRotate Optional. If true, pan and rotate will be disabled.
|
|
113
|
+
* Defaults to false.
|
|
114
|
+
* @param preventDefaultOnMousedown Optional. If true, mousedown events will
|
|
115
|
+
* be prevented from their default behavior (including focus). Defaults to
|
|
116
|
+
* true.
|
|
50
117
|
*/
|
|
51
|
-
constructor(element: HTMLElement, disableRotate?: boolean, preventDefaultOnMouseDown = true
|
|
118
|
+
constructor(element: HTMLElement, disableRotate?: boolean, preventDefaultOnMouseDown = true,
|
|
119
|
+
view: View = DEFAULT_VIEW) {
|
|
52
120
|
super();
|
|
121
|
+
this.#view = view;
|
|
122
|
+
this.#disableRotate = Boolean(disableRotate);
|
|
53
123
|
this.#scale = 1;
|
|
54
124
|
this.#offsetX = 0;
|
|
55
125
|
this.#offsetY = 0;
|
|
@@ -61,42 +131,31 @@ export class TransformController extends Common.ObjectWrapper.ObjectWrapper<Even
|
|
|
61
131
|
this.originY = 0;
|
|
62
132
|
this.element = element;
|
|
63
133
|
this.registerShortcuts();
|
|
64
|
-
UI.UIUtils.installDragHandle(
|
|
65
|
-
|
|
66
|
-
preventDefaultOnMouseDown);
|
|
134
|
+
UI.UIUtils.installDragHandle(element, this.onDragStart.bind(this), this.onDrag.bind(this),
|
|
135
|
+
this.onDragEnd.bind(this), 'move', null, 0, preventDefaultOnMouseDown);
|
|
67
136
|
element.addEventListener('wheel', this.onMouseWheel.bind(this), false);
|
|
68
137
|
this.minScale = 0;
|
|
69
138
|
this.maxScale = Infinity;
|
|
70
139
|
|
|
71
|
-
this
|
|
72
|
-
this.controlPanelToolbar.classList.add('transform-control-panel');
|
|
73
|
-
this.controlPanelToolbar.setAttribute('jslog', `${VisualLogging.toolbar()}`);
|
|
74
|
-
|
|
75
|
-
this.modeButtons = {};
|
|
76
|
-
if (!disableRotate) {
|
|
77
|
-
const panModeButton = new UI.Toolbar.ToolbarToggle(
|
|
78
|
-
i18nString(UIStrings.panModeX), '3d-pan', undefined, 'layers.3d-pan', /* toggleOnClick */ false);
|
|
79
|
-
panModeButton.addEventListener(UI.Toolbar.ToolbarButton.Events.CLICK, this.setMode.bind(this, Modes.PAN));
|
|
80
|
-
this.modeButtons[Modes.PAN] = panModeButton;
|
|
81
|
-
this.controlPanelToolbar.appendToolbarItem(panModeButton);
|
|
82
|
-
const rotateModeButton = new UI.Toolbar.ToolbarToggle(
|
|
83
|
-
i18nString(UIStrings.rotateModeV), '3d-rotate', undefined, 'layers.3d-rotate', /* toggleOnClick */ false);
|
|
84
|
-
rotateModeButton.addEventListener(UI.Toolbar.ToolbarButton.Events.CLICK, this.setMode.bind(this, Modes.ROTATE));
|
|
85
|
-
this.modeButtons[Modes.ROTATE] = rotateModeButton;
|
|
86
|
-
this.controlPanelToolbar.appendToolbarItem(rotateModeButton);
|
|
87
|
-
}
|
|
88
|
-
this.setMode(Modes.PAN);
|
|
89
|
-
|
|
90
|
-
const resetButton =
|
|
91
|
-
new UI.Toolbar.ToolbarButton(i18nString(UIStrings.resetTransform), '3d-center', undefined, 'layers.3d-center');
|
|
92
|
-
resetButton.addEventListener(UI.Toolbar.ToolbarButton.Events.CLICK, this.resetAndNotify.bind(this, undefined));
|
|
93
|
-
this.controlPanelToolbar.appendToolbarItem(resetButton);
|
|
94
|
-
|
|
140
|
+
this.#performUpdate();
|
|
95
141
|
this.reset();
|
|
96
142
|
}
|
|
97
143
|
|
|
144
|
+
#performUpdate(): void {
|
|
145
|
+
this.#view(
|
|
146
|
+
{
|
|
147
|
+
disableRotate: this.#disableRotate,
|
|
148
|
+
mode: this.mode,
|
|
149
|
+
onSetMode: this.setMode.bind(this),
|
|
150
|
+
onReset: this.resetAndNotify.bind(this),
|
|
151
|
+
},
|
|
152
|
+
undefined,
|
|
153
|
+
this.#controlPanelToolbar,
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
|
|
98
157
|
toolbar(): UI.Toolbar.Toolbar {
|
|
99
|
-
return this
|
|
158
|
+
return this.#controlPanelToolbar;
|
|
100
159
|
}
|
|
101
160
|
|
|
102
161
|
private registerShortcuts(): void {
|
|
@@ -140,13 +199,7 @@ export class TransformController extends Common.ObjectWrapper.ObjectWrapper<Even
|
|
|
140
199
|
return;
|
|
141
200
|
}
|
|
142
201
|
this.mode = mode;
|
|
143
|
-
this
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
private updateModeButtons(): void {
|
|
147
|
-
for (const mode in this.modeButtons) {
|
|
148
|
-
this.modeButtons[mode].setToggled(mode === this.mode);
|
|
149
|
-
}
|
|
202
|
+
this.#performUpdate();
|
|
150
203
|
}
|
|
151
204
|
|
|
152
205
|
resetAndNotify(event?: Event): void {
|
|
@@ -219,9 +272,10 @@ export class TransformController extends Common.ObjectWrapper.ObjectWrapper<Even
|
|
|
219
272
|
const rotateStepInDegrees = 5;
|
|
220
273
|
|
|
221
274
|
if (this.mode === Modes.ROTATE) {
|
|
222
|
-
// Sic! onRotate treats X and Y as "rotate around X" and "rotate around
|
|
223
|
-
|
|
224
|
-
|
|
275
|
+
// Sic! onRotate treats X and Y as "rotate around X" and "rotate around
|
|
276
|
+
// Y", so swap X/Y multipliers.
|
|
277
|
+
this.onRotate(this.#rotateX + yMultiplier * rotateStepInDegrees,
|
|
278
|
+
this.#rotateY + xMultiplier * rotateStepInDegrees);
|
|
225
279
|
} else {
|
|
226
280
|
this.onPan(xMultiplier * panStepInPixels, yMultiplier * panStepInPixels);
|
|
227
281
|
}
|
|
@@ -235,17 +289,15 @@ export class TransformController extends Common.ObjectWrapper.ObjectWrapper<Even
|
|
|
235
289
|
const wheelZoomSpeed = 1 / 53;
|
|
236
290
|
const mouseEvent = event as WheelEvent;
|
|
237
291
|
const scaleFactor = Math.pow(zoomFactor, -mouseEvent.deltaY * wheelZoomSpeed);
|
|
238
|
-
this.onScale(
|
|
239
|
-
|
|
240
|
-
mouseEvent.clientY - this.element.getBoundingClientRect().top);
|
|
292
|
+
this.onScale(scaleFactor, mouseEvent.clientX - this.element.getBoundingClientRect().left,
|
|
293
|
+
mouseEvent.clientY - this.element.getBoundingClientRect().top);
|
|
241
294
|
}
|
|
242
295
|
|
|
243
296
|
private onDrag(event: Event): void {
|
|
244
297
|
const {clientX, clientY} = event as MouseEvent;
|
|
245
298
|
if (this.mode === Modes.ROTATE) {
|
|
246
|
-
this.onRotate(
|
|
247
|
-
|
|
248
|
-
this.oldRotateY - (this.originX - clientX) / this.element.clientWidth * 180);
|
|
299
|
+
this.onRotate(this.oldRotateX + (this.originY - clientY) / this.element.clientHeight * 180,
|
|
300
|
+
this.oldRotateY - (this.originX - clientX) / this.element.clientWidth * 180);
|
|
249
301
|
} else {
|
|
250
302
|
this.onPan(clientX - this.originX, clientY - this.originY);
|
|
251
303
|
this.originX = clientX;
|
|
@@ -15,10 +15,6 @@
|
|
|
15
15
|
position: relative;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
button.view-trace {
|
|
19
|
-
margin: 10px;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
18
|
/** `window.opener` is null for windows opened from DevTools. This breaks
|
|
23
19
|
the LH viewer app, so disable this feature. */
|
|
24
20
|
|
|
@@ -38,9 +34,10 @@ button.view-trace {
|
|
|
38
34
|
}
|
|
39
35
|
|
|
40
36
|
select.lighthouse-report {
|
|
41
|
-
min-width:
|
|
42
|
-
/* Up to
|
|
43
|
-
|
|
37
|
+
min-width: var(--sys-size-22);
|
|
38
|
+
/* Up to 176px (--sys-size-24) wide; reserve 28px (--sys-size-12)
|
|
39
|
+
in narrow viewports so the dropdown arrow stays visible. */
|
|
40
|
+
max-width: min(var(--sys-size-24), calc(100% - var(--sys-size-12)));
|
|
44
41
|
}
|
|
45
42
|
|
|
46
43
|
.lighthouse-toolbar-container {
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.lighthouse-form-section-label {
|
|
62
|
-
margin:
|
|
62
|
+
margin: var(--sys-size-5) 0;
|
|
63
63
|
font-weight: 500;
|
|
64
64
|
}
|
|
65
65
|
|
|
@@ -128,7 +128,6 @@
|
|
|
128
128
|
color: #f00; /* stylelint-disable-line plugin/use_theme_colors */
|
|
129
129
|
/* See: crbug.com/1152736 for color variable migration. */
|
|
130
130
|
font-weight: bold;
|
|
131
|
-
padding-left: 10px;
|
|
132
131
|
}
|
|
133
132
|
|
|
134
133
|
.lighthouse-warning-text {
|
package/front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css
CHANGED
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
|
|
46
46
|
.delete-highlight-button {
|
|
47
47
|
cursor: pointer;
|
|
48
|
-
width:
|
|
49
|
-
height:
|
|
48
|
+
width: var(--sys-size-7);
|
|
49
|
+
height: var(--sys-size-7);
|
|
50
50
|
border: none;
|
|
51
51
|
background-color: transparent;
|
|
52
52
|
display: flex;
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
.delete-highlight-button devtools-icon {
|
|
74
|
-
width:
|
|
75
|
-
height:
|
|
74
|
+
width: var(--sys-size-7);
|
|
75
|
+
height: var(--sys-size-7);
|
|
76
76
|
display: flex;
|
|
77
77
|
align-items: center;
|
|
78
78
|
justify-content: center;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// Copyright 2019 The Chromium Authors
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
|
-
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
5
4
|
|
|
6
5
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
6
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
@@ -40,9 +39,7 @@ export class PlayerEventsTimeline extends TickingFlameChart {
|
|
|
40
39
|
private videoBufferingStateEvent: Event|null;
|
|
41
40
|
|
|
42
41
|
constructor() {
|
|
43
|
-
super();
|
|
44
|
-
|
|
45
|
-
this.element.setAttribute('jslog', `${VisualLogging.pane('timeline')}`);
|
|
42
|
+
super({jslog: `${VisualLogging.pane('timeline')}`});
|
|
46
43
|
|
|
47
44
|
this.normalizedTimestamp = NO_NORMALIZED_TIMESTAMP;
|
|
48
45
|
|
|
@@ -293,8 +293,9 @@ export class TickingFlameChart extends UI.Widget.VBox {
|
|
|
293
293
|
readonly #view: TickingFlameChartView;
|
|
294
294
|
readonly #boundOnScroll = this.onScroll.bind(this);
|
|
295
295
|
|
|
296
|
-
constructor(
|
|
297
|
-
|
|
296
|
+
constructor(elementOrOptions?: HTMLElement|UI.Widget.WidgetOptions, view: TickingFlameChartView = DEFAULT_VIEW) {
|
|
297
|
+
// @ts-expect-error
|
|
298
|
+
super(elementOrOptions);
|
|
298
299
|
this.#view = view;
|
|
299
300
|
|
|
300
301
|
// set to update once per second _while the tab is active_
|
|
@@ -22,9 +22,12 @@ li.storage-group-list-item::before {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.player-entry-row {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
/* 28px icon-column/toolbar base (--sys-size-12) minus 2px compact
|
|
26
|
+
* row offset (--sys-size-2) = 26px, matching the 26px child cells
|
|
27
|
+
* and continuous border-right column dividers below. */
|
|
28
|
+
height: calc(var(--sys-size-12) - var(--sys-size-2));
|
|
29
|
+
min-height: calc(var(--sys-size-12) - var(--sys-size-2));
|
|
30
|
+
line-height: calc(var(--sys-size-12) - var(--sys-size-2));
|
|
28
31
|
|
|
29
32
|
&:nth-child(odd) {
|
|
30
33
|
background: var(--sys-color-surface1);
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
.media-messages-message-container {
|
|
33
33
|
margin: var(--sys-size-3);
|
|
34
34
|
font-size: var(--sys-typescale-body2-size);
|
|
35
|
-
line-height:
|
|
35
|
+
line-height: var(--sys-typescale-body2-line-height);
|
|
36
36
|
padding: var(--sys-size-3);
|
|
37
37
|
user-select: text;
|
|
38
38
|
}
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.media-message-warning {
|
|
50
|
-
border-radius:
|
|
50
|
+
border-radius: var(--sys-shape-corner-extra-small);
|
|
51
51
|
background-color: var(--sys-color-surface-yellow);
|
|
52
52
|
color: var(--sys-color-on-surface-yellow);
|
|
53
53
|
}
|
|
@@ -738,6 +738,7 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
738
738
|
// clang-format off
|
|
739
739
|
render(
|
|
740
740
|
html`
|
|
741
|
+
<style>${throttlingSettingsTabStyles}</style>
|
|
741
742
|
<div class="settings-card-container-wrapper">
|
|
742
743
|
<div class="settings-card-container throttling-conditions-settings">
|
|
743
744
|
${widget(CPUThrottlingCard)}
|
|
@@ -821,7 +822,6 @@ export class ThrottlingSettingsTab extends UI.Widget.VBox {
|
|
|
821
822
|
useShadowDom: true,
|
|
822
823
|
});
|
|
823
824
|
this.#view = view;
|
|
824
|
-
this.registerRequiredCSS(throttlingSettingsTabStyles);
|
|
825
825
|
|
|
826
826
|
this.customUserConditions = SDK.NetworkManager.customUserNetworkConditionsSetting(settings);
|
|
827
827
|
this.customUserConditions.addChangeListener(this.#conditionsUpdated, this);
|
|
@@ -40,7 +40,9 @@
|
|
|
40
40
|
gap: var(--sys-size-3);
|
|
41
41
|
padding: var(--sys-size-4);
|
|
42
42
|
flex-shrink: 0;
|
|
43
|
-
|
|
43
|
+
/* 80px (--sys-size-19) minus 6px (--sys-size-4) padding step so all
|
|
44
|
+
* 7 columns (518px) fit inside the 532px card slot without overflow. */
|
|
45
|
+
width: calc(var(--sys-size-19) - var(--sys-size-4));
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
.input {
|
|
@@ -65,10 +67,6 @@
|
|
|
65
67
|
color: var(--sys-color-on-surface);
|
|
66
68
|
text-align: center;
|
|
67
69
|
position: relative;
|
|
68
|
-
|
|
69
|
-
& > input {
|
|
70
|
-
scroll-margin-left: 5px;
|
|
71
|
-
}
|
|
72
70
|
}
|
|
73
71
|
|
|
74
72
|
.conditions-list-text:last-child {
|
|
@@ -134,13 +132,13 @@
|
|
|
134
132
|
|
|
135
133
|
.cpu-preset-calibrate .button-container {
|
|
136
134
|
display: flex;
|
|
137
|
-
gap:
|
|
135
|
+
gap: var(--sys-size-5);
|
|
138
136
|
}
|
|
139
137
|
|
|
140
138
|
.cpu-preset-calibrate .text-container {
|
|
141
139
|
display: flex;
|
|
142
140
|
flex-direction: column;
|
|
143
|
-
gap:
|
|
141
|
+
gap: var(--sys-size-5);
|
|
144
142
|
}
|
|
145
143
|
|
|
146
144
|
.text-with-icon {
|
|
@@ -211,6 +211,7 @@ function renderUserAgentSection(input: NetworkConfigViewInput, output: NetworkCo
|
|
|
211
211
|
|
|
212
212
|
export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
213
213
|
render(html`
|
|
214
|
+
<style>${networkConfigViewStyles}</style>
|
|
214
215
|
${renderCacheSection(input)}
|
|
215
216
|
<div class="panel-section-separator"></div>
|
|
216
217
|
${renderNetworkThrottlingSection()}
|
|
@@ -247,7 +248,6 @@ export class NetworkConfigView extends UI.Widget.VBox {
|
|
|
247
248
|
super({
|
|
248
249
|
useShadowDom: true,
|
|
249
250
|
});
|
|
250
|
-
this.registerRequiredCSS(networkConfigViewStyles);
|
|
251
251
|
this.#view = view;
|
|
252
252
|
|
|
253
253
|
this.#cacheDisabledSetting.addChangeListener(() => this.requestUpdate());
|
|
@@ -5,13 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
@scope to (devtools-widget > *) {
|
|
8
|
-
.panel.network devtools-toolbar.binary-view-toolbar {
|
|
9
|
-
border-top: var(--sys-size-1) solid var(--sys-color-divider);
|
|
10
|
-
border-bottom: 0;
|
|
11
|
-
padding-left: 5px;
|
|
12
|
-
flex: none;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
8
|
.binary-view-copied-text {
|
|
16
9
|
opacity: 100%;
|
|
17
10
|
}
|
|
@@ -319,13 +319,6 @@ td.time-column {
|
|
|
319
319
|
z-index: 0;
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
-
.network-log-grid.data-grid .resources-dividers-label-bar {
|
|
323
|
-
background-color: transparent;
|
|
324
|
-
border: none;
|
|
325
|
-
height: 30px;
|
|
326
|
-
pointer-events: none;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
322
|
.network-log-grid.data-grid span.separator-in-cell {
|
|
330
323
|
user-select: none;
|
|
331
324
|
min-width: 1ex;
|
|
@@ -72,7 +72,7 @@ table.network-timing-table > tr:not(.network-timing-table-header, .network-timin
|
|
|
72
72
|
|
|
73
73
|
.network-timing-row {
|
|
74
74
|
position: relative;
|
|
75
|
-
height:
|
|
75
|
+
height: var(--sys-size-7);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
.network-timing-bar {
|
|
@@ -172,7 +172,7 @@ tr:has([aria-expanded="true"].network-fetch-timing-bar-clickable) ~ .network-fet
|
|
|
172
172
|
|
|
173
173
|
.network-fetch-timing-bar-details,
|
|
174
174
|
.router-evaluation-timing-bar-details {
|
|
175
|
-
padding-left:
|
|
175
|
+
padding-left: var(--sys-size-5);
|
|
176
176
|
width: fit-content;
|
|
177
177
|
}
|
|
178
178
|
|
|
@@ -48,40 +48,17 @@
|
|
|
48
48
|
flex: none;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
.blocked-url-checkbox:focus {
|
|
52
|
-
outline: auto 5px -webkit-focus-ring-color;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
51
|
.blocked-url-label {
|
|
56
52
|
white-space: nowrap;
|
|
57
53
|
text-overflow: ellipsis;
|
|
58
54
|
overflow: hidden;
|
|
59
55
|
flex: auto;
|
|
60
|
-
padding: 0
|
|
56
|
+
padding: 0 var(--sys-size-3);
|
|
61
57
|
cursor: text;
|
|
62
58
|
|
|
63
59
|
--devtools-text-prompt-min-width: 6em;
|
|
64
60
|
}
|
|
65
61
|
|
|
66
|
-
.blocked-url-edit-row {
|
|
67
|
-
flex: none;
|
|
68
|
-
display: flex;
|
|
69
|
-
flex-direction: row;
|
|
70
|
-
margin: 7px 5px 0;
|
|
71
|
-
align-items: center;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.blocked-url-edit-value {
|
|
75
|
-
user-select: none;
|
|
76
|
-
flex: 1 1 0;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.blocked-url-edit-row input {
|
|
80
|
-
width: 100%;
|
|
81
|
-
text-align: inherit;
|
|
82
|
-
height: var(--sys-size-10);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
62
|
.conditions-selector {
|
|
86
63
|
width: max-content;
|
|
87
64
|
flex: none;
|
|
@@ -81,6 +81,7 @@ type PerformanceMonitorView =
|
|
|
81
81
|
const DEFAULT_VIEW: PerformanceMonitorView = (input, output, target) => {
|
|
82
82
|
// clang-format off
|
|
83
83
|
render(html`
|
|
84
|
+
<style>${performanceMonitorStyles}</style>
|
|
84
85
|
<devtools-widget ${widget(ControlPane, {
|
|
85
86
|
onMetricChanged: input.onMetricChanged,
|
|
86
87
|
chartsInfo: input.chartsInfo,
|
|
@@ -130,7 +131,6 @@ export class PerformanceMonitorImpl extends UI.Widget.HBox<ShadowRoot> implement
|
|
|
130
131
|
constructor(pollIntervalMs = 500, view: PerformanceMonitorView = DEFAULT_VIEW) {
|
|
131
132
|
super({useShadowDom: 'pure'});
|
|
132
133
|
this.view = view;
|
|
133
|
-
this.registerRequiredCSS(performanceMonitorStyles);
|
|
134
134
|
|
|
135
135
|
this.metricsBuffer = [];
|
|
136
136
|
/** @constant */
|
|
@@ -198,7 +198,6 @@ export class JSONEditor extends JSONEditorBase {
|
|
|
198
198
|
constructor(element: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
199
199
|
super(element, {useShadowDom: true});
|
|
200
200
|
this.#view = view;
|
|
201
|
-
this.registerRequiredCSS(editorWidgetStyles);
|
|
202
201
|
}
|
|
203
202
|
|
|
204
203
|
get metadataByCommand(): Map<string, {parameters: Parameter[], description: string, replyArgs: string[]}> {
|
|
@@ -1265,6 +1264,7 @@ function renderParameters(
|
|
|
1265
1264
|
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
1266
1265
|
// clang-format off
|
|
1267
1266
|
render(html`
|
|
1267
|
+
<style>${editorWidgetStyles}</style>
|
|
1268
1268
|
<div class="wrapper" @keydown=${input.onKeydown} jslog=${VisualLogging.pane('command-editor').track({resize: true})}>
|
|
1269
1269
|
<div class="editor-wrapper">
|
|
1270
1270
|
${input.displayTargetSelector !== false ? renderTargetSelectorRow(input) : nothing}
|
|
@@ -58,8 +58,8 @@ select {
|
|
|
58
58
|
border: none;
|
|
59
59
|
border-radius: var(--sys-shape-corner-extra-small);
|
|
60
60
|
height: var(--sys-size-9);
|
|
61
|
-
max-width:
|
|
62
|
-
min-width:
|
|
61
|
+
max-width: var(--sys-size-22);
|
|
62
|
+
min-width: var(--sys-size-22);
|
|
63
63
|
padding: 0 var(--sys-size-6) 0 var(--sys-size-5);
|
|
64
64
|
position: relative;
|
|
65
65
|
color: var(--sys-color-on-surface);
|
|
@@ -135,7 +135,7 @@ devtools-recording-list-view {
|
|
|
135
135
|
font-size: var(--sys-typescale-body4-size);
|
|
136
136
|
line-height: var(--sys-typescale-body4-line-height);
|
|
137
137
|
color: var(--sys-color-primary);
|
|
138
|
-
outline-offset:
|
|
138
|
+
outline-offset: var(--sys-size-2);
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
.feedback .devtools-link:focus-visible,
|
|
@@ -81,11 +81,11 @@
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
.row-buttons {
|
|
84
|
-
margin-top:
|
|
84
|
+
margin-top: var(--sys-size-3);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
.error {
|
|
88
|
-
margin:
|
|
88
|
+
margin: var(--sys-size-3) 0 var(--sys-size-4);
|
|
89
89
|
padding: var(--sys-size-5) var(--sys-size-6);
|
|
90
90
|
background: var(--sys-color-error-container);
|
|
91
91
|
color: var(--sys-color-error);
|