chrome-devtools-frontend 1.0.1535712 → 1.0.1536371
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/contributing/images/issues-nearestslo.png +0 -0
- package/docs/contributing/issues.md +17 -21
- package/front_end/core/common/Console.ts +1 -8
- package/front_end/core/common/ParsedURL.ts +10 -20
- package/front_end/core/common/SegmentedRange.ts +1 -2
- package/front_end/core/common/StringOutputStream.ts +1 -4
- package/front_end/core/i18n/i18nImpl.ts +0 -24
- package/front_end/core/sdk/AnimationModel.ts +1 -2
- package/front_end/core/sdk/CSSMatchedStyles.ts +2 -2
- package/front_end/core/sdk/CSSModel.ts +1 -1
- package/front_end/core/sdk/CSSProperty.ts +3 -6
- package/front_end/core/sdk/CSSStyleDeclaration.ts +4 -4
- package/front_end/core/sdk/DebuggerModel.ts +1 -2
- package/front_end/core/sdk/EnhancedTracesParser.ts +4 -0
- package/front_end/core/sdk/SourceMap.ts +2 -3
- package/front_end/entrypoints/node_app/NodeConnectionsPanel.ts +2 -1
- package/front_end/generated/InspectorBackendCommands.js +1 -2
- package/front_end/generated/SupportedCSSProperties.js +19 -0
- package/front_end/generated/protocol.ts +0 -27
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +18 -17
- package/front_end/panels/accessibility/AccessibilitySidebarView.ts +9 -12
- package/front_end/panels/ai_assistance/components/ChatView.ts +5 -4
- package/front_end/panels/application/AppManifestView.ts +7 -6
- package/front_end/panels/application/ApplicationPanelSidebar.ts +4 -4
- package/front_end/panels/application/OpenedWindowDetailsView.ts +6 -6
- package/front_end/panels/application/StorageView.ts +9 -8
- package/front_end/panels/application/components/BackForwardCacheView.ts +333 -314
- package/front_end/panels/application/components/ProtocolHandlersView.ts +3 -2
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +2 -1
- package/front_end/panels/browser_debugger/ObjectEventListenersSidebarPane.ts +8 -8
- package/front_end/panels/common/BadgeNotification.ts +2 -1
- package/front_end/panels/common/GdpSignUpDialog.ts +2 -1
- package/front_end/panels/console/ConsoleInsightTeaser.ts +8 -2
- package/front_end/panels/console/ConsolePinPane.ts +12 -7
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +9 -9
- package/front_end/panels/elements/ComputedStyleWidget.ts +7 -7
- package/front_end/panels/elements/EventListenersWidget.ts +9 -9
- package/front_end/panels/elements/NodeStackTraceWidget.ts +6 -6
- package/front_end/panels/elements/PlatformFontsWidget.ts +5 -5
- package/front_end/panels/elements/PropertiesWidget.ts +8 -8
- package/front_end/panels/layer_viewer/Layers3DView.ts +2 -1
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +3 -3
- package/front_end/panels/network/RequestCookiesView.ts +2 -1
- package/front_end/panels/network/RequestTimingView.ts +2 -1
- package/front_end/panels/recorder/RecorderController.ts +34 -23
- package/front_end/panels/recorder/components/CreateRecordingView.ts +249 -240
- package/front_end/panels/security/CookieControlsView.ts +2 -1
- package/front_end/panels/security/CookieReportView.ts +3 -2
- package/front_end/panels/settings/AISettingsTab.ts +2 -1
- package/front_end/panels/settings/KeybindsSettingsTab.ts +6 -0
- package/front_end/panels/settings/components/SyncSection.ts +2 -1
- package/front_end/panels/sources/DebuggerPausedMessage.ts +4 -3
- package/front_end/panels/sources/ResourceOriginPlugin.ts +3 -2
- package/front_end/panels/sources/SourcesNavigator.ts +2 -1
- package/front_end/panels/sources/TabbedEditorContainer.ts +3 -2
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +9 -9
- package/front_end/panels/timeline/TimelineUIUtils.ts +3 -2
- package/front_end/panels/timeline/components/DetailsView.ts +5 -4
- package/front_end/panels/timeline/components/FieldSettingsDialog.ts +2 -1
- package/front_end/panels/timeline/components/LiveMetricsView.ts +5 -4
- package/front_end/panels/timeline/components/MetricCompareStrings.ts +25 -24
- package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +2 -1
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/docs/tooltip/basic.ts +1 -1
- package/front_end/ui/components/tooltips/Tooltip.ts +32 -17
- package/front_end/ui/i18n/i18n.ts +31 -0
- package/front_end/ui/legacy/SoftDropDown.ts +1 -12
- package/front_end/ui/legacy/ViewManager.ts +2 -4
- package/front_end/ui/legacy/Widget.ts +33 -17
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +2 -1
- package/front_end/ui/legacy/legacy.ts +0 -2
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
- package/mcp/mcp.ts +1 -0
- package/package.json +1 -1
- package/front_end/ui/components/docs/recorder_create_recording_view/basic.html +0 -20
- package/front_end/ui/components/docs/recorder_create_recording_view/basic.ts +0 -27
- package/front_end/ui/legacy/ThrottledWidget.ts +0 -48
|
@@ -10,6 +10,7 @@ import * as i18n from '../../../core/i18n/i18n.js';
|
|
|
10
10
|
import * as Platform from '../../../core/platform/platform.js';
|
|
11
11
|
import * as Buttons from '../../../ui/components/buttons/buttons.js';
|
|
12
12
|
import * as Input from '../../../ui/components/input/input.js';
|
|
13
|
+
import * as uiI18n from '../../../ui/i18n/i18n.js';
|
|
13
14
|
import * as UI from '../../../ui/legacy/legacy.js';
|
|
14
15
|
import * as Lit from '../../../ui/lit/lit.js';
|
|
15
16
|
import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
|
@@ -116,7 +117,7 @@ export class ProtocolHandlersView extends HTMLElement {
|
|
|
116
117
|
<devtools-icon class="inline-icon"
|
|
117
118
|
name=${this.#protocolHandlers.length > 0 ? 'check-circle' : 'info'}>
|
|
118
119
|
</devtools-icon>
|
|
119
|
-
${
|
|
120
|
+
${uiI18n.getFormatLocalizedString(str_, statusString, {
|
|
120
121
|
PH1: manifestInTextLink,
|
|
121
122
|
})}
|
|
122
123
|
</div>
|
|
@@ -175,7 +176,7 @@ export class ProtocolHandlersView extends HTMLElement {
|
|
|
175
176
|
<style>${Input.textInputStyles}</style>
|
|
176
177
|
${this.#renderStatusMessage()}
|
|
177
178
|
<div class="protocol-handlers-row">
|
|
178
|
-
${
|
|
179
|
+
${uiI18n.getFormatLocalizedString(str_, UIStrings.needHelpReadOur, {PH1: protocolDocLink})}
|
|
179
180
|
</div>
|
|
180
181
|
${this.#renderProtocolTest()}
|
|
181
182
|
`, this.#shadow, {host: this});
|
|
@@ -13,6 +13,7 @@ import * as ChromeLink from '../../../../ui/components/chrome_link/chrome_link.j
|
|
|
13
13
|
import * as Dialogs from '../../../../ui/components/dialogs/dialogs.js';
|
|
14
14
|
import * as LegacyWrapper from '../../../../ui/components/legacy_wrapper/legacy_wrapper.js';
|
|
15
15
|
import * as RenderCoordinator from '../../../../ui/components/render_coordinator/render_coordinator.js';
|
|
16
|
+
import * as uiI18n from '../../../../ui/i18n/i18n.js';
|
|
16
17
|
import * as UI from '../../../../ui/legacy/legacy.js';
|
|
17
18
|
import * as Lit from '../../../../ui/lit/lit.js';
|
|
18
19
|
import * as VisualLogging from '../../../../ui/visual_logging/visual_logging.js';
|
|
@@ -214,7 +215,7 @@ export class PreloadingDisabledInfobar extends LegacyWrapper.LegacyWrapper.Wrapp
|
|
|
214
215
|
const extensionsSettingLink = new ChromeLink.ChromeLink.ChromeLink();
|
|
215
216
|
extensionsSettingLink.href = 'chrome://extensions' as Platform.DevToolsPath.UrlString;
|
|
216
217
|
extensionsSettingLink.textContent = i18nString(UIStrings.extensionsSettings);
|
|
217
|
-
const description =
|
|
218
|
+
const description = uiI18n.getFormatLocalizedString(
|
|
218
219
|
str_, UIStrings.descriptionDisabledByPreference, {PH1: preloadingSettingLink, PH2: extensionsSettingLink});
|
|
219
220
|
return this.#maybeKeyValue(
|
|
220
221
|
this.#data.disabledByPreference, i18nString(UIStrings.headerDisabledByPreference), description);
|
|
@@ -9,8 +9,7 @@ import * as UI from '../../ui/legacy/legacy.js';
|
|
|
9
9
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
10
10
|
import * as EventListeners from '../event_listeners/event_listeners.js';
|
|
11
11
|
|
|
12
|
-
export class ObjectEventListenersSidebarPane extends UI.
|
|
13
|
-
UI.Toolbar.ItemsProvider {
|
|
12
|
+
export class ObjectEventListenersSidebarPane extends UI.Widget.VBox implements UI.Toolbar.ItemsProvider {
|
|
14
13
|
#lastRequestedContext?: SDK.RuntimeModel.ExecutionContext;
|
|
15
14
|
|
|
16
15
|
// TODO(bmeurer): This is only public for web tests.
|
|
@@ -21,11 +20,11 @@ export class ObjectEventListenersSidebarPane extends UI.ThrottledWidget.Throttle
|
|
|
21
20
|
this.contentElement.setAttribute('jslog', `${VisualLogging.section('sources.global-listeners')}`);
|
|
22
21
|
|
|
23
22
|
this.eventListenersView = new EventListeners.EventListenersView.EventListenersView();
|
|
24
|
-
this.eventListenersView.changeCallback = this.
|
|
23
|
+
this.eventListenersView.changeCallback = this.requestUpdate.bind(this);
|
|
25
24
|
this.eventListenersView.enableDefaultTreeFocus = true;
|
|
26
25
|
this.eventListenersView.show(this.element);
|
|
27
26
|
this.setDefaultFocusedChild(this.eventListenersView);
|
|
28
|
-
this.
|
|
27
|
+
this.requestUpdate();
|
|
29
28
|
}
|
|
30
29
|
|
|
31
30
|
toolbarItems(): UI.Toolbar.ToolbarItem[] {
|
|
@@ -34,7 +33,7 @@ export class ObjectEventListenersSidebarPane extends UI.ThrottledWidget.Throttle
|
|
|
34
33
|
return [refreshButton];
|
|
35
34
|
}
|
|
36
35
|
|
|
37
|
-
|
|
36
|
+
override async performUpdate(): Promise<void> {
|
|
38
37
|
if (this.#lastRequestedContext) {
|
|
39
38
|
this.#lastRequestedContext.runtimeModel.releaseObjectGroup(objectGroupName);
|
|
40
39
|
this.#lastRequestedContext = undefined;
|
|
@@ -64,13 +63,14 @@ export class ObjectEventListenersSidebarPane extends UI.ThrottledWidget.Throttle
|
|
|
64
63
|
|
|
65
64
|
override wasShown(): void {
|
|
66
65
|
super.wasShown();
|
|
67
|
-
UI.Context.Context.instance().addFlavorChangeListener(SDK.RuntimeModel.ExecutionContext, this.
|
|
66
|
+
UI.Context.Context.instance().addFlavorChangeListener(SDK.RuntimeModel.ExecutionContext, this.requestUpdate, this);
|
|
68
67
|
UI.Context.Context.instance().setFlavor(ObjectEventListenersSidebarPane, this);
|
|
69
68
|
}
|
|
70
69
|
|
|
71
70
|
override willHide(): void {
|
|
72
71
|
UI.Context.Context.instance().setFlavor(ObjectEventListenersSidebarPane, null);
|
|
73
|
-
UI.Context.Context.instance().removeFlavorChangeListener(
|
|
72
|
+
UI.Context.Context.instance().removeFlavorChangeListener(
|
|
73
|
+
SDK.RuntimeModel.ExecutionContext, this.requestUpdate, this);
|
|
74
74
|
super.willHide();
|
|
75
75
|
if (this.#lastRequestedContext) {
|
|
76
76
|
this.#lastRequestedContext.runtimeModel.releaseObjectGroup(objectGroupName);
|
|
@@ -85,7 +85,7 @@ export class ActionDelegate implements UI.ActionRegistration.ActionDelegate {
|
|
|
85
85
|
case 'browser-debugger.refresh-global-event-listeners': {
|
|
86
86
|
const eventListenersSidebarPane = context.flavor(ObjectEventListenersSidebarPane);
|
|
87
87
|
if (eventListenersSidebarPane) {
|
|
88
|
-
eventListenersSidebarPane.
|
|
88
|
+
eventListenersSidebarPane.requestUpdate();
|
|
89
89
|
return true;
|
|
90
90
|
}
|
|
91
91
|
return false;
|
|
@@ -7,6 +7,7 @@ import * as Host from '../../core/host/host.js';
|
|
|
7
7
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
8
8
|
import * as Badges from '../../models/badges/badges.js';
|
|
9
9
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
10
|
+
import * as uiI18n from '../../ui/i18n/i18n.js';
|
|
10
11
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
11
12
|
import * as Lit from '../../ui/lit/lit.js';
|
|
12
13
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
@@ -63,7 +64,7 @@ const UIStrings = {
|
|
|
63
64
|
|
|
64
65
|
const str_ = i18n.i18n.registerUIStrings('panels/common/BadgeNotification.ts', UIStrings);
|
|
65
66
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
66
|
-
const i18nFormatString =
|
|
67
|
+
const i18nFormatString = uiI18n.getFormatLocalizedString.bind(undefined, str_);
|
|
67
68
|
const lockedString = i18n.i18n.lockedString;
|
|
68
69
|
|
|
69
70
|
const LEFT_OFFSET = 5;
|
|
@@ -12,6 +12,7 @@ import * as Geometry from '../../models/geometry/geometry.js';
|
|
|
12
12
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
13
13
|
import * as Snackbars from '../../ui/components/snackbars/snackbars.js';
|
|
14
14
|
import type * as Switch from '../../ui/components/switch/switch.js';
|
|
15
|
+
import * as uiI18n from '../../ui/i18n/i18n.js';
|
|
15
16
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
16
17
|
import {html, render} from '../../ui/lit/lit.js';
|
|
17
18
|
|
|
@@ -150,7 +151,7 @@ export const DEFAULT_VIEW: View = (input, _output, target): void => {
|
|
|
150
151
|
<h2 class="section-title">${i18nString(UIStrings.tailorProfile)}</h2>
|
|
151
152
|
<div class="section-text">
|
|
152
153
|
<div>${i18nString(UIStrings.tailorProfileBody)}</div><br/>
|
|
153
|
-
<div>${
|
|
154
|
+
<div>${uiI18n.getFormatLocalizedString(str_, UIStrings.tailorProfileBodyDisclaimer, {
|
|
154
155
|
PH1: UI.XLink.XLink.create(CONTENT_POLICY_URL, i18nString(UIStrings.contentPolicy), 'link', undefined, 'content-policy'),
|
|
155
156
|
PH2: UI.XLink.XLink.create(TERMS_OF_SERVICE_URL, i18nString(UIStrings.termsOfService), 'link',
|
|
156
157
|
undefined, 'terms-of-service'),
|
|
@@ -164,7 +164,7 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLE
|
|
|
164
164
|
${input.hasTellMeMoreButton ? html`
|
|
165
165
|
<devtools-button
|
|
166
166
|
title=${lockedString(UIStringsNotTranslate.tellMeMore)}
|
|
167
|
-
.jslogContext=${'insights-teaser-tell-me-more'}
|
|
167
|
+
.jslogContext=${'insights-teaser-tell-me-more'}
|
|
168
168
|
.variant=${Buttons.Button.Variant.PRIMARY}
|
|
169
169
|
@click=${input.onTellMeMoreClick}
|
|
170
170
|
>
|
|
@@ -178,7 +178,13 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLE
|
|
|
178
178
|
aria-details=${'teaser-info-tooltip-' + input.uuid}
|
|
179
179
|
.accessibleLabel=${lockedString(UIStringsNotTranslate.learnDataUsage)}
|
|
180
180
|
></devtools-button>
|
|
181
|
-
<devtools-tooltip
|
|
181
|
+
<devtools-tooltip
|
|
182
|
+
id=${'teaser-info-tooltip-' + input.uuid}
|
|
183
|
+
variant="rich"
|
|
184
|
+
jslogContext="teaser-info-tooltip"
|
|
185
|
+
trigger="both"
|
|
186
|
+
hover-delay=500
|
|
187
|
+
>
|
|
182
188
|
<div class="info-tooltip-text">${lockedString(UIStringsNotTranslate.infoTooltipText)}</div>
|
|
183
189
|
<div class="learn-more">
|
|
184
190
|
<x-link
|
|
@@ -58,11 +58,13 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
58
58
|
|
|
59
59
|
const elementToConsolePin = new WeakMap<Element, ConsolePin>();
|
|
60
60
|
|
|
61
|
-
export class ConsolePinPane extends UI.
|
|
61
|
+
export class ConsolePinPane extends UI.Widget.VBox {
|
|
62
62
|
private pins: Set<ConsolePin>;
|
|
63
63
|
private readonly pinsSetting: Common.Settings.Setting<string[]>;
|
|
64
|
+
private readonly throttler: Common.Throttler.Throttler;
|
|
64
65
|
constructor(private readonly liveExpressionButton: UI.Toolbar.ToolbarButton, private readonly focusOut: () => void) {
|
|
65
|
-
super(true
|
|
66
|
+
super({useShadowDom: true});
|
|
67
|
+
this.throttler = new Common.Throttler.Throttler(250);
|
|
66
68
|
this.registerRequiredCSS(consolePinPaneStyles, objectValueStyles);
|
|
67
69
|
this.contentElement.classList.add('console-pins', 'monospace');
|
|
68
70
|
this.contentElement.addEventListener('contextmenu', this.contextMenuEventFired.bind(this), false);
|
|
@@ -134,7 +136,7 @@ export class ConsolePinPane extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
134
136
|
if (userGesture) {
|
|
135
137
|
void pin.focus();
|
|
136
138
|
}
|
|
137
|
-
this.
|
|
139
|
+
this.requestUpdate();
|
|
138
140
|
}
|
|
139
141
|
|
|
140
142
|
private focusedPinAfterDeletion(deletedPin: ConsolePin): ConsolePin|null {
|
|
@@ -153,16 +155,19 @@ export class ConsolePinPane extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
153
155
|
return null;
|
|
154
156
|
}
|
|
155
157
|
|
|
156
|
-
override
|
|
158
|
+
override wasShown(): void {
|
|
159
|
+
super.wasShown();
|
|
160
|
+
void this.throttler.schedule(this.requestUpdate.bind(this));
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
override async performUpdate(): Promise<void> {
|
|
157
164
|
if (!this.pins.size || !this.isShowing()) {
|
|
158
165
|
return;
|
|
159
166
|
}
|
|
160
|
-
if (this.isShowing()) {
|
|
161
|
-
this.update();
|
|
162
|
-
}
|
|
163
167
|
const updatePromises = Array.from(this.pins, pin => pin.updatePreview());
|
|
164
168
|
await Promise.all(updatePromises);
|
|
165
169
|
this.updatedForTest();
|
|
170
|
+
void this.throttler.schedule(this.requestUpdate.bind(this));
|
|
166
171
|
}
|
|
167
172
|
|
|
168
173
|
private updatedForTest(): void {
|
|
@@ -117,22 +117,22 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
117
117
|
// clang-format on
|
|
118
118
|
};
|
|
119
119
|
|
|
120
|
-
export class DeveloperResourcesView extends UI.
|
|
120
|
+
export class DeveloperResourcesView extends UI.Widget.VBox {
|
|
121
121
|
readonly #loader: SDK.PageResourceLoader.PageResourceLoader;
|
|
122
122
|
readonly #view: View;
|
|
123
123
|
#selectedItem: SDK.PageResourceLoader.PageResource|null = null;
|
|
124
124
|
#filters: TextUtils.TextUtils.ParsedFilter[] = [];
|
|
125
125
|
|
|
126
126
|
constructor(view: View = DEFAULT_VIEW) {
|
|
127
|
-
super(true);
|
|
127
|
+
super({useShadowDom: true});
|
|
128
128
|
this.#view = view;
|
|
129
129
|
|
|
130
130
|
this.#loader = SDK.PageResourceLoader.PageResourceLoader.instance();
|
|
131
|
-
this.#loader.addEventListener(SDK.PageResourceLoader.Events.UPDATE, this.
|
|
132
|
-
this.
|
|
131
|
+
this.#loader.addEventListener(SDK.PageResourceLoader.Events.UPDATE, this.requestUpdate, this);
|
|
132
|
+
this.requestUpdate();
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
override async
|
|
135
|
+
override async performUpdate(): Promise<void> {
|
|
136
136
|
const {loading, resources} = this.#loader.getScopedNumberOfResources();
|
|
137
137
|
const input = {
|
|
138
138
|
onFilterChanged: (e: CustomEvent<string>) => {
|
|
@@ -152,13 +152,13 @@ export class DeveloperResourcesView extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
async select(resource: SDK.PageResourceLoader.PageResource): Promise<void> {
|
|
155
|
-
await this.
|
|
155
|
+
await this.updateComplete;
|
|
156
156
|
this.#selectedItem = resource;
|
|
157
|
-
this.
|
|
157
|
+
this.requestUpdate();
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
async selectedItem(): Promise<SDK.PageResourceLoader.PageResource|null> {
|
|
161
|
-
await this.
|
|
161
|
+
await this.updateComplete;
|
|
162
162
|
return this.#selectedItem;
|
|
163
163
|
}
|
|
164
164
|
|
|
@@ -171,6 +171,6 @@ export class DeveloperResourcesView extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
171
171
|
} else {
|
|
172
172
|
this.#filters = [];
|
|
173
173
|
}
|
|
174
|
-
this.
|
|
174
|
+
this.requestUpdate();
|
|
175
175
|
}
|
|
176
176
|
}
|
|
@@ -255,7 +255,7 @@ type ComputedStyleData = {
|
|
|
255
255
|
name: string,
|
|
256
256
|
};
|
|
257
257
|
|
|
258
|
-
export class ComputedStyleWidget extends UI.
|
|
258
|
+
export class ComputedStyleWidget extends UI.Widget.VBox {
|
|
259
259
|
private computedStyleModel: ComputedStyleModel;
|
|
260
260
|
private readonly showInheritedComputedStylePropertiesSetting: Common.Settings.Setting<boolean>;
|
|
261
261
|
private readonly groupComputedStylesSetting: Common.Settings.Setting<boolean>;
|
|
@@ -269,22 +269,22 @@ export class ComputedStyleWidget extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
269
269
|
#treeData?: TreeOutline.TreeOutline.TreeOutlineData<ComputedStyleData>;
|
|
270
270
|
|
|
271
271
|
constructor(computedStyleModel: ComputedStyleModel) {
|
|
272
|
-
super(true);
|
|
272
|
+
super({useShadowDom: true});
|
|
273
273
|
this.registerRequiredCSS(computedStyleSidebarPaneStyles);
|
|
274
274
|
|
|
275
275
|
this.contentElement.classList.add('styles-sidebar-computed-style-widget');
|
|
276
276
|
|
|
277
277
|
this.computedStyleModel = computedStyleModel;
|
|
278
|
-
this.computedStyleModel.addEventListener(Events.CSS_MODEL_CHANGED, this.
|
|
279
|
-
this.computedStyleModel.addEventListener(Events.COMPUTED_STYLE_CHANGED, this.
|
|
278
|
+
this.computedStyleModel.addEventListener(Events.CSS_MODEL_CHANGED, this.requestUpdate, this);
|
|
279
|
+
this.computedStyleModel.addEventListener(Events.COMPUTED_STYLE_CHANGED, this.requestUpdate, this);
|
|
280
280
|
|
|
281
281
|
this.showInheritedComputedStylePropertiesSetting =
|
|
282
282
|
Common.Settings.Settings.instance().createSetting('show-inherited-computed-style-properties', false);
|
|
283
|
-
this.showInheritedComputedStylePropertiesSetting.addChangeListener(this.
|
|
283
|
+
this.showInheritedComputedStylePropertiesSetting.addChangeListener(this.requestUpdate.bind(this));
|
|
284
284
|
|
|
285
285
|
this.groupComputedStylesSetting = Common.Settings.Settings.instance().createSetting('group-computed-styles', false);
|
|
286
286
|
this.groupComputedStylesSetting.addChangeListener(() => {
|
|
287
|
-
this.
|
|
287
|
+
this.requestUpdate();
|
|
288
288
|
});
|
|
289
289
|
|
|
290
290
|
const hbox = this.contentElement.createChild('div', 'hbox styles-sidebar-pane-toolbar');
|
|
@@ -334,7 +334,7 @@ export class ComputedStyleWidget extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
334
334
|
UI.Context.Context.instance().setFlavor(ComputedStyleWidget, null);
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
override async
|
|
337
|
+
override async performUpdate(): Promise<void> {
|
|
338
338
|
const [nodeStyles, matchedStyles] =
|
|
339
339
|
await Promise.all([this.computedStyleModel.fetchComputedStyle(), this.fetchMatchedCascade()]);
|
|
340
340
|
if (!nodeStyles || !matchedStyles) {
|
|
@@ -135,7 +135,7 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
135
135
|
// clang-format on
|
|
136
136
|
};
|
|
137
137
|
|
|
138
|
-
export class EventListenersWidget extends UI.
|
|
138
|
+
export class EventListenersWidget extends UI.Widget.VBox {
|
|
139
139
|
private showForAncestorsSetting: Common.Settings.Setting<boolean>;
|
|
140
140
|
private readonly dispatchFilterBySetting: Common.Settings.Setting<string>;
|
|
141
141
|
private readonly showFrameworkListenersSetting: Common.Settings.Setting<boolean>;
|
|
@@ -147,19 +147,19 @@ export class EventListenersWidget extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
147
147
|
this.#view = view;
|
|
148
148
|
this.showForAncestorsSetting =
|
|
149
149
|
Common.Settings.Settings.instance().moduleSetting('show-event-listeners-for-ancestors');
|
|
150
|
-
this.showForAncestorsSetting.addChangeListener(this.
|
|
150
|
+
this.showForAncestorsSetting.addChangeListener(this.requestUpdate.bind(this));
|
|
151
151
|
|
|
152
152
|
this.dispatchFilterBySetting =
|
|
153
153
|
Common.Settings.Settings.instance().createSetting('event-listener-dispatch-filter-type', DispatchFilterBy.All);
|
|
154
|
-
this.dispatchFilterBySetting.addChangeListener(this.
|
|
154
|
+
this.dispatchFilterBySetting.addChangeListener(this.requestUpdate.bind(this));
|
|
155
155
|
|
|
156
156
|
this.showFrameworkListenersSetting =
|
|
157
157
|
Common.Settings.Settings.instance().createSetting('show-frameowkr-listeners', true);
|
|
158
158
|
this.showFrameworkListenersSetting.setTitle(i18nString(UIStrings.frameworkListeners));
|
|
159
|
-
this.showFrameworkListenersSetting.addChangeListener(this.
|
|
159
|
+
this.showFrameworkListenersSetting.addChangeListener(this.requestUpdate.bind(this));
|
|
160
160
|
|
|
161
|
-
UI.Context.Context.instance().addFlavorChangeListener(SDK.DOMModel.DOMNode, this.
|
|
162
|
-
this.
|
|
161
|
+
UI.Context.Context.instance().addFlavorChangeListener(SDK.DOMModel.DOMNode, this.requestUpdate.bind(this));
|
|
162
|
+
this.requestUpdate();
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
static instance(opts: {
|
|
@@ -173,7 +173,7 @@ export class EventListenersWidget extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
173
173
|
return eventListenersWidgetInstance;
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
override async
|
|
176
|
+
override async performUpdate(): Promise<void> {
|
|
177
177
|
const dispatchFilter = this.dispatchFilterBySetting.get();
|
|
178
178
|
const showPassive = dispatchFilter === DispatchFilterBy.All || dispatchFilter === DispatchFilterBy.Passive;
|
|
179
179
|
const showBlocking = dispatchFilter === DispatchFilterBy.All || dispatchFilter === DispatchFilterBy.Blocking;
|
|
@@ -186,7 +186,7 @@ export class EventListenersWidget extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
186
186
|
onDispatchFilterTypeChange: (value: string) => {
|
|
187
187
|
this.dispatchFilterBySetting.set(value);
|
|
188
188
|
},
|
|
189
|
-
onEventListenersViewChange: this.
|
|
189
|
+
onEventListenersViewChange: this.requestUpdate.bind(this),
|
|
190
190
|
dispatchFilters: [
|
|
191
191
|
{name: i18nString(UIStrings.all), value: DispatchFilterBy.All},
|
|
192
192
|
{name: i18nString(UIStrings.passive), value: DispatchFilterBy.Passive},
|
|
@@ -279,7 +279,7 @@ export class ActionDelegate implements UI.ActionRegistration.ActionDelegate {
|
|
|
279
279
|
handleAction(_context: UI.Context.Context, actionId: string): boolean {
|
|
280
280
|
switch (actionId) {
|
|
281
281
|
case 'elements.refresh-event-listeners': {
|
|
282
|
-
EventListenersWidget.instance().
|
|
282
|
+
EventListenersWidget.instance().requestUpdate();
|
|
283
283
|
return true;
|
|
284
284
|
}
|
|
285
285
|
}
|
|
@@ -42,27 +42,27 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
42
42
|
// clang-format on
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
export class NodeStackTraceWidget extends UI.
|
|
45
|
+
export class NodeStackTraceWidget extends UI.Widget.VBox {
|
|
46
46
|
readonly #linkifier = new Components.Linkifier.Linkifier(MaxLengthForLinks);
|
|
47
47
|
readonly #view: View;
|
|
48
48
|
|
|
49
49
|
constructor(view = DEFAULT_VIEW) {
|
|
50
|
-
super(true
|
|
50
|
+
super({useShadowDom: true});
|
|
51
51
|
this.#view = view;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
override wasShown(): void {
|
|
55
55
|
super.wasShown();
|
|
56
|
-
UI.Context.Context.instance().addFlavorChangeListener(SDK.DOMModel.DOMNode, this.
|
|
57
|
-
this.
|
|
56
|
+
UI.Context.Context.instance().addFlavorChangeListener(SDK.DOMModel.DOMNode, this.requestUpdate, this);
|
|
57
|
+
this.requestUpdate();
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
override willHide(): void {
|
|
61
61
|
super.willHide();
|
|
62
|
-
UI.Context.Context.instance().removeFlavorChangeListener(SDK.DOMModel.DOMNode, this.
|
|
62
|
+
UI.Context.Context.instance().removeFlavorChangeListener(SDK.DOMModel.DOMNode, this.requestUpdate, this);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
override async
|
|
65
|
+
override async performUpdate(): Promise<void> {
|
|
66
66
|
const node = UI.Context.Context.instance().flavor(SDK.DOMModel.DOMNode);
|
|
67
67
|
|
|
68
68
|
const stackTrace = await node?.creationStackTrace() ?? undefined;
|
|
@@ -77,21 +77,21 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
77
77
|
// clang-format on
|
|
78
78
|
};
|
|
79
79
|
|
|
80
|
-
export class PlatformFontsWidget extends UI.
|
|
80
|
+
export class PlatformFontsWidget extends UI.Widget.VBox {
|
|
81
81
|
private readonly sharedModel: ComputedStyleModel;
|
|
82
82
|
readonly #view: View;
|
|
83
83
|
|
|
84
84
|
constructor(sharedModel: ComputedStyleModel, view: View = DEFAULT_VIEW) {
|
|
85
|
-
super(true);
|
|
85
|
+
super({useShadowDom: true});
|
|
86
86
|
this.#view = view;
|
|
87
87
|
this.registerRequiredCSS(platformFontsWidgetStyles);
|
|
88
88
|
|
|
89
89
|
this.sharedModel = sharedModel;
|
|
90
|
-
this.sharedModel.addEventListener(ComputedStyleModelEvents.CSS_MODEL_CHANGED, this.
|
|
91
|
-
this.sharedModel.addEventListener(ComputedStyleModelEvents.COMPUTED_STYLE_CHANGED, this.
|
|
90
|
+
this.sharedModel.addEventListener(ComputedStyleModelEvents.CSS_MODEL_CHANGED, this.requestUpdate, this);
|
|
91
|
+
this.sharedModel.addEventListener(ComputedStyleModelEvents.COMPUTED_STYLE_CHANGED, this.requestUpdate, this);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
override async
|
|
94
|
+
override async performUpdate(): Promise<void> {
|
|
95
95
|
const cssModel = this.sharedModel.cssModel();
|
|
96
96
|
const node = this.sharedModel.node();
|
|
97
97
|
if (!node || !cssModel) {
|
|
@@ -103,7 +103,7 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
103
103
|
const getShowAllPropertiesSetting = (): Common.Settings.Setting<boolean> =>
|
|
104
104
|
Common.Settings.Settings.instance().createSetting('show-all-properties', /* defaultValue */ false);
|
|
105
105
|
|
|
106
|
-
export class PropertiesWidget extends UI.
|
|
106
|
+
export class PropertiesWidget extends UI.Widget.VBox {
|
|
107
107
|
private node: SDK.DOMModel.DOMNode|null;
|
|
108
108
|
private readonly showAllPropertiesSetting: Common.Settings.Setting<boolean>;
|
|
109
109
|
private filterRegex: RegExp|null = null;
|
|
@@ -112,8 +112,8 @@ export class PropertiesWidget extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
112
112
|
readonly #view: View;
|
|
113
113
|
#displayNoMatchingPropertyMessage = false;
|
|
114
114
|
|
|
115
|
-
constructor(
|
|
116
|
-
super(true
|
|
115
|
+
constructor(view: View = DEFAULT_VIEW) {
|
|
116
|
+
super({useShadowDom: true});
|
|
117
117
|
this.registerRequiredCSS(propertiesWidgetStyles);
|
|
118
118
|
|
|
119
119
|
this.showAllPropertiesSetting = getShowAllPropertiesSetting();
|
|
@@ -138,7 +138,7 @@ export class PropertiesWidget extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
138
138
|
Host.userMetrics.actionTaken(Host.UserMetrics.Action.DOMPropertiesExpanded);
|
|
139
139
|
});
|
|
140
140
|
|
|
141
|
-
void this.
|
|
141
|
+
void this.performUpdate();
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
private onFilterChanged(event: CustomEvent<string>): void {
|
|
@@ -150,7 +150,7 @@ export class PropertiesWidget extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
150
150
|
const previousDisplay = this.#displayNoMatchingPropertyMessage;
|
|
151
151
|
this.internalFilterProperties();
|
|
152
152
|
if (previousDisplay !== this.#displayNoMatchingPropertyMessage) {
|
|
153
|
-
this.
|
|
153
|
+
this.requestUpdate();
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
|
|
@@ -169,10 +169,10 @@ export class PropertiesWidget extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
169
169
|
|
|
170
170
|
private setNode(event: Common.EventTarget.EventTargetEvent<SDK.DOMModel.DOMNode|null>): void {
|
|
171
171
|
this.node = event.data;
|
|
172
|
-
this.
|
|
172
|
+
this.requestUpdate();
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
override async
|
|
175
|
+
override async performUpdate(): Promise<void> {
|
|
176
176
|
if (this.lastRequestedNode) {
|
|
177
177
|
this.lastRequestedNode.domModel().runtimeModel().releaseObjectGroup(OBJECT_GROUP_NAME);
|
|
178
178
|
delete this.lastRequestedNode;
|
|
@@ -218,6 +218,6 @@ export class PropertiesWidget extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
218
218
|
if (this.node !== node) {
|
|
219
219
|
return;
|
|
220
220
|
}
|
|
221
|
-
this.
|
|
221
|
+
this.requestUpdate();
|
|
222
222
|
}
|
|
223
223
|
}
|
|
@@ -10,6 +10,7 @@ import * as Platform from '../../core/platform/platform.js';
|
|
|
10
10
|
import type * as SDK from '../../core/sdk/sdk.js';
|
|
11
11
|
import type * as Protocol from '../../generated/protocol.js';
|
|
12
12
|
import * as Geometry from '../../models/geometry/geometry.js';
|
|
13
|
+
import * as uiI18n from '../../ui/i18n/i18n.js';
|
|
13
14
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
14
15
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
15
16
|
|
|
@@ -772,7 +773,7 @@ export class Layers3DView extends Common.ObjectWrapper.eventMixin<EventTypes, ty
|
|
|
772
773
|
private webglDisabledBanner(): UI.EmptyWidget.EmptyWidget {
|
|
773
774
|
const emptyWidget = new UI.EmptyWidget.EmptyWidget(
|
|
774
775
|
i18nString(UIStrings.cantDisplayLayers), i18nString(UIStrings.webglSupportIsDisabledInYour));
|
|
775
|
-
emptyWidget.contentElement.appendChild(
|
|
776
|
+
emptyWidget.contentElement.appendChild(uiI18n.getFormatLocalizedString(
|
|
776
777
|
str_, UIStrings.checkSForPossibleReasons,
|
|
777
778
|
{PH1: UI.XLink.XLink.create('about:gpu', undefined, undefined, undefined, 'about-gpu')}));
|
|
778
779
|
return emptyWidget;
|
|
@@ -397,7 +397,7 @@ export interface EventTypes {
|
|
|
397
397
|
[Events.WINDOW_CHANGED]: void;
|
|
398
398
|
}
|
|
399
399
|
|
|
400
|
-
export class PaintProfilerCommandLogView extends UI.
|
|
400
|
+
export class PaintProfilerCommandLogView extends UI.Widget.VBox {
|
|
401
401
|
private readonly treeOutline: UI.TreeOutline.TreeOutlineInShadow;
|
|
402
402
|
private log: SDK.PaintProfiler.PaintProfilerLogItem[];
|
|
403
403
|
private readonly treeItemCache: Map<SDK.PaintProfiler.PaintProfilerLogItem, LogTreeElement>;
|
|
@@ -435,10 +435,10 @@ export class PaintProfilerCommandLogView extends UI.ThrottledWidget.ThrottledWid
|
|
|
435
435
|
|
|
436
436
|
updateWindow(selectionWindow: {left: number, right: number}|null): void {
|
|
437
437
|
this.selectionWindow = selectionWindow;
|
|
438
|
-
this.
|
|
438
|
+
this.requestUpdate();
|
|
439
439
|
}
|
|
440
440
|
|
|
441
|
-
override
|
|
441
|
+
override performUpdate(): Promise<void> {
|
|
442
442
|
if (!this.selectionWindow || !this.log.length) {
|
|
443
443
|
this.treeOutline.removeChildren();
|
|
444
444
|
return Promise.resolve();
|
|
@@ -8,6 +8,7 @@ import * as i18n from '../../core/i18n/i18n.js';
|
|
|
8
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
9
9
|
import * as Protocol from '../../generated/protocol.js';
|
|
10
10
|
import * as IconButton from '../../ui/components/icon_button/icon_button.js';
|
|
11
|
+
import * as uiI18n from '../../ui/i18n/i18n.js';
|
|
11
12
|
import * as CookieTable from '../../ui/legacy/components/cookie_table/cookie_table.js';
|
|
12
13
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
13
14
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
@@ -120,7 +121,7 @@ export class RequestCookiesView extends UI.Widget.Widget {
|
|
|
120
121
|
this.siteHasCookieInOtherPartition =
|
|
121
122
|
this.element.createChild('div', 'cookies-panel-item site-has-cookies-in-other-partition');
|
|
122
123
|
this.siteHasCookieInOtherPartition.appendChild(
|
|
123
|
-
|
|
124
|
+
uiI18n.getFormatLocalizedString(str_, UIStrings.siteHasCookieInOtherPartition, {
|
|
124
125
|
PH1: UI.XLink.XLink.create(
|
|
125
126
|
'https://developer.chrome.com/en/docs/privacy-sandbox/chips/', i18nString(UIStrings.learnMore), undefined,
|
|
126
127
|
undefined, 'learn-more'),
|
|
@@ -11,6 +11,7 @@ import * as SDK from '../../core/sdk/sdk.js';
|
|
|
11
11
|
import * as Protocol from '../../generated/protocol.js';
|
|
12
12
|
import * as Logs from '../../models/logs/logs.js';
|
|
13
13
|
import * as NetworkTimeCalculator from '../../models/network_time_calculator/network_time_calculator.js';
|
|
14
|
+
import * as uiI18n from '../../ui/i18n/i18n.js';
|
|
14
15
|
import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
|
|
15
16
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
16
17
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
@@ -412,7 +413,7 @@ export class RequestTimingView extends UI.Widget.VBox {
|
|
|
412
413
|
'https://web.dev/custom-metrics/#server-timing-api', i18nString(UIStrings.theServerTimingApi), undefined,
|
|
413
414
|
undefined, 'server-timing-api');
|
|
414
415
|
information.appendChild(
|
|
415
|
-
|
|
416
|
+
uiI18n.getFormatLocalizedString(str_, UIStrings.duringDevelopmentYouCanUseSToAdd, {PH1: link}));
|
|
416
417
|
|
|
417
418
|
return tableElement;
|
|
418
419
|
}
|