chrome-devtools-frontend 1.0.1529904 → 1.0.1530564
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 +1 -1
- package/front_end/core/common/Worker.ts +10 -2
- package/front_end/core/host/AidaClient.ts +3 -3
- package/front_end/core/host/InspectorFrontendHostAPI.ts +1 -2
- package/front_end/core/sdk/NetworkManager.ts +25 -1
- package/front_end/entrypoints/main/main-meta.ts +2 -0
- package/front_end/entrypoints/trace_app/trace_app.ts +1 -0
- package/front_end/generated/SupportedCSSProperties.js +7 -0
- package/front_end/models/ai_assistance/performance/AICallTree.ts +2 -3
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +3 -3
- package/front_end/models/formatter/FormatterWorkerPool.ts +17 -1
- package/front_end/models/javascript_metadata/NativeFunctions.js +1 -1
- package/front_end/models/trace/ModelImpl.ts +8 -3
- package/front_end/models/trace/handlers/MetaHandler.ts +9 -1
- package/front_end/models/trace/types/Configuration.ts +1 -0
- package/front_end/panels/browser_debugger/browser_debugger-meta.ts +2 -1
- package/front_end/panels/changes/CombinedDiffView.ts +1 -2
- package/front_end/panels/console/ConsoleInsightTeaser.ts +19 -9
- package/front_end/panels/console/ConsolePrompt.ts +1 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +7 -5
- package/front_end/panels/console/consoleInsightTeaser.css +0 -4
- package/front_end/panels/elements/ElementsTreeOutline.ts +1 -2
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +137 -37
- package/front_end/panels/mobile_throttling/ThrottlingPresets.ts +1 -1
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +1 -1
- package/front_end/panels/sources/SourcesPanel.ts +5 -0
- package/front_end/panels/sources/sources-meta.ts +13 -12
- package/front_end/panels/sources/sourcesView.css +1 -0
- package/front_end/panels/timeline/TimelinePanel.ts +1 -0
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +1 -2
- package/front_end/panels/timeline/TimelineTreeView.ts +3 -3
- package/front_end/panels/timeline/TimelineUIUtils.ts +16 -16
- package/front_end/services/tracing/FreshRecording.ts +4 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +16 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +9 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +7 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +12 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/NodeWebSocketTransport.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/NodeWebSocketTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +7 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +13 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +7 -0
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +40 -14
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +16 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +9 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts +7 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +12 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/NodeWebSocketTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +7 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +10 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +7 -0
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +18 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +9 -1
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserConnector.ts +2 -0
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +8 -0
- package/front_end/third_party/puppeteer/package/src/common/util.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +16 -5
- package/front_end/third_party/puppeteer/package/src/node/NodeWebSocketTransport.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +10 -0
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +1 -1
- package/front_end/ui/components/icon_button/Icon.docs.ts +78 -0
- package/front_end/ui/components/markdown_view/CodeBlock.ts +2 -2
- package/front_end/ui/components/text_editor/config.ts +3 -3
- package/front_end/ui/components/tooltips/Tooltip.ts +9 -4
- package/front_end/ui/legacy/UIUtils.ts +12 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +0 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +0 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +0 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts.map +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +0 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js.map +0 -1
- package/front_end/third_party/puppeteer/package/src/generated/version.ts +0 -4
- package/front_end/ui/components/copy_to_clipboard/copyToClipboard.ts +0 -19
- package/front_end/ui/components/copy_to_clipboard/copy_to_clipboard.ts +0 -5
- package/front_end/ui/components/docs/icon_component/basic.html +0 -40
- package/front_end/ui/components/docs/icon_component/basic.ts +0 -68
|
@@ -6,14 +6,14 @@ import * as Common from '../../core/common/common.js';
|
|
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
7
|
import * as Platform from '../../core/platform/platform.js';
|
|
8
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
9
|
-
import * as
|
|
9
|
+
import * as UI from '../../ui/legacy/legacy.js';
|
|
10
10
|
import * as Lit from '../../ui/lit/lit.js';
|
|
11
11
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
12
12
|
|
|
13
13
|
import {ThrottlingManager} from './ThrottlingManager.js';
|
|
14
|
-
import
|
|
14
|
+
import type {NetworkThrottlingConditionsGroup} from './ThrottlingPresets.js';
|
|
15
15
|
|
|
16
|
-
const {render, html, Directives} = Lit;
|
|
16
|
+
const {render, html, Directives, nothing} = Lit;
|
|
17
17
|
|
|
18
18
|
const UIStrings = {
|
|
19
19
|
/**
|
|
@@ -28,6 +28,10 @@ const UIStrings = {
|
|
|
28
28
|
* @description Text in Network Throttling Selector of the Network panel
|
|
29
29
|
*/
|
|
30
30
|
custom: 'Custom',
|
|
31
|
+
/**
|
|
32
|
+
* @description Title for a network throttling group containing the request blocking option
|
|
33
|
+
*/
|
|
34
|
+
blockingGroup: 'Blocking',
|
|
31
35
|
/**
|
|
32
36
|
*@description Text with two placeholders separated by a colon
|
|
33
37
|
*@example {Node removed} PH1
|
|
@@ -54,26 +58,28 @@ const str_ = i18n.i18n.registerUIStrings('panels/mobile_throttling/NetworkThrott
|
|
|
54
58
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
55
59
|
|
|
56
60
|
interface ViewInput {
|
|
57
|
-
recommendedConditions: SDK.NetworkManager.
|
|
58
|
-
selectedConditions: SDK.NetworkManager.
|
|
61
|
+
recommendedConditions: SDK.NetworkManager.ThrottlingConditions|null;
|
|
62
|
+
selectedConditions: SDK.NetworkManager.ThrottlingConditions|undefined;
|
|
59
63
|
throttlingGroups: NetworkThrottlingConditionsGroup[];
|
|
60
64
|
customConditionsGroup: NetworkThrottlingConditionsGroup;
|
|
61
|
-
jslogContext: string;
|
|
62
|
-
title: string;
|
|
63
|
-
onSelect: (conditions: SDK.NetworkManager.
|
|
65
|
+
jslogContext: string|undefined;
|
|
66
|
+
title: string|undefined;
|
|
67
|
+
onSelect: (conditions: SDK.NetworkManager.ThrottlingConditions) => void;
|
|
64
68
|
onAddCustomConditions: () => void;
|
|
65
69
|
}
|
|
66
70
|
export type ViewFunction = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
67
71
|
|
|
68
72
|
export const DEFAULT_VIEW: ViewFunction = (input, output, target) => {
|
|
69
73
|
// The title is usually an i18nLazyString except for custom values that are stored in the local storage in the form of a string.
|
|
70
|
-
const title = (conditions: SDK.NetworkManager.
|
|
74
|
+
const title = (conditions: SDK.NetworkManager.ThrottlingConditions): string =>
|
|
71
75
|
typeof conditions.title === 'function' ? conditions.title() : conditions.title;
|
|
72
|
-
const jslog = (group: NetworkThrottlingConditionsGroup, condition: SDK.NetworkManager.
|
|
73
|
-
`${
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
const jslog = (group: NetworkThrottlingConditionsGroup, condition: SDK.NetworkManager.ThrottlingConditions): string =>
|
|
77
|
+
`${
|
|
78
|
+
VisualLogging
|
|
79
|
+
.item(Platform.StringUtilities.toKebabCase(
|
|
80
|
+
('i18nTitleKey' in condition && condition.i18nTitleKey) || title(condition)))
|
|
81
|
+
.track({click: true})}`;
|
|
82
|
+
const optionsMap = new WeakMap<HTMLOptionElement, SDK.NetworkManager.ThrottlingConditions>();
|
|
77
83
|
let selectedConditions = input.selectedConditions;
|
|
78
84
|
function onSelect(event: Event): void {
|
|
79
85
|
const element = (event.target as HTMLSelectElement | null);
|
|
@@ -87,7 +93,9 @@ export const DEFAULT_VIEW: ViewFunction = (input, output, target) => {
|
|
|
87
93
|
if (option === element.options[element.options.length - 1]) {
|
|
88
94
|
input.onAddCustomConditions();
|
|
89
95
|
event.consume(true);
|
|
90
|
-
|
|
96
|
+
if (selectedConditions) {
|
|
97
|
+
element.value = title(selectedConditions);
|
|
98
|
+
}
|
|
91
99
|
} else {
|
|
92
100
|
const conditions = optionsMap.get(option);
|
|
93
101
|
if (conditions) {
|
|
@@ -96,10 +104,11 @@ export const DEFAULT_VIEW: ViewFunction = (input, output, target) => {
|
|
|
96
104
|
}
|
|
97
105
|
}
|
|
98
106
|
}
|
|
107
|
+
|
|
99
108
|
render(
|
|
100
109
|
// clang-format off
|
|
101
110
|
html`<select
|
|
102
|
-
aria-label=${input.title}
|
|
111
|
+
aria-label=${input.title ?? nothing}
|
|
103
112
|
jslog=${VisualLogging.dropDown().track({change: true}).context(input.jslogContext)}
|
|
104
113
|
@change=${onSelect}>
|
|
105
114
|
${input.throttlingGroups.map(
|
|
@@ -108,7 +117,9 @@ export const DEFAULT_VIEW: ViewFunction = (input, output, target) => {
|
|
|
108
117
|
label=${group.title}>
|
|
109
118
|
${group.items.map(condition => html`<option
|
|
110
119
|
${Directives.ref(option => option && optionsMap.set(option as HTMLOptionElement, condition))}
|
|
111
|
-
?selected=${
|
|
120
|
+
?selected=${selectedConditions ?
|
|
121
|
+
SDK.NetworkManager.networkConditionsEqual(condition, selectedConditions) :
|
|
122
|
+
(group === input.throttlingGroups[0])}
|
|
112
123
|
value=${title(condition)}
|
|
113
124
|
aria-label=${i18nString(UIStrings.sS, {PH1: group.title, PH2: title(condition)})}
|
|
114
125
|
jslog=${jslog(group, condition)}>
|
|
@@ -120,7 +131,7 @@ export const DEFAULT_VIEW: ViewFunction = (input, output, target) => {
|
|
|
120
131
|
<optgroup label=${input.customConditionsGroup.title}>
|
|
121
132
|
${input.customConditionsGroup.items.map(condition => html`<option
|
|
122
133
|
${Directives.ref(option => option && optionsMap.set(option as HTMLOptionElement, condition))}
|
|
123
|
-
?selected=${SDK.NetworkManager.networkConditionsEqual(condition, selectedConditions)}
|
|
134
|
+
?selected=${selectedConditions && SDK.NetworkManager.networkConditionsEqual(condition, selectedConditions)}
|
|
124
135
|
value=${title(condition)}
|
|
125
136
|
aria-label=${i18nString(UIStrings.sS, {PH1: input.customConditionsGroup.title, PH2: title(condition)})}
|
|
126
137
|
jslog=${VisualLogging.item('custom-network-throttling-item').track({click: true})}>
|
|
@@ -144,25 +155,29 @@ export const enum Events {
|
|
|
144
155
|
}
|
|
145
156
|
|
|
146
157
|
export interface EventTypes {
|
|
147
|
-
[Events.CONDITIONS_CHANGED]: SDK.NetworkManager.
|
|
158
|
+
[Events.CONDITIONS_CHANGED]: SDK.NetworkManager.ThrottlingConditions;
|
|
148
159
|
}
|
|
149
160
|
|
|
150
161
|
export class NetworkThrottlingSelect extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
151
162
|
#recommendedConditions: SDK.NetworkManager.Conditions|null = null;
|
|
152
163
|
readonly #element: HTMLElement;
|
|
153
|
-
|
|
154
|
-
#currentConditions: SDK.NetworkManager.
|
|
155
|
-
readonly #title
|
|
164
|
+
#jslogContext?: string;
|
|
165
|
+
#currentConditions: SDK.NetworkManager.ThrottlingConditions|undefined;
|
|
166
|
+
readonly #title?: string;
|
|
156
167
|
readonly #view: ViewFunction;
|
|
168
|
+
#variant: NetworkThrottlingSelect.Variant = NetworkThrottlingSelect.Variant.GLOBAL_CONDITIONS;
|
|
157
169
|
|
|
158
170
|
static createForGlobalConditions(element: HTMLElement, title: string): NetworkThrottlingSelect {
|
|
159
171
|
ThrottlingManager.instance(); // Instantiate the throttling manager to connect network manager with the setting
|
|
160
|
-
const select = new NetworkThrottlingSelect(
|
|
161
|
-
|
|
162
|
-
|
|
172
|
+
const select = new NetworkThrottlingSelect(element, {
|
|
173
|
+
title,
|
|
174
|
+
jslogContext: SDK.NetworkManager.activeNetworkThrottlingKeySetting().name,
|
|
175
|
+
currentConditions: SDK.NetworkManager.MultitargetNetworkManager.instance().networkConditions()
|
|
176
|
+
});
|
|
163
177
|
select.addEventListener(
|
|
164
178
|
Events.CONDITIONS_CHANGED,
|
|
165
|
-
ev =>
|
|
179
|
+
ev => !('block' in ev.data) &&
|
|
180
|
+
SDK.NetworkManager.MultitargetNetworkManager.instance().setNetworkConditions(ev.data));
|
|
166
181
|
SDK.NetworkManager.MultitargetNetworkManager.instance().addEventListener(
|
|
167
182
|
SDK.NetworkManager.MultitargetNetworkManager.Events.CONDITIONS_CHANGED, () => {
|
|
168
183
|
select.currentConditions = SDK.NetworkManager.MultitargetNetworkManager.instance().networkConditions();
|
|
@@ -171,29 +186,57 @@ export class NetworkThrottlingSelect extends Common.ObjectWrapper.ObjectWrapper<
|
|
|
171
186
|
}
|
|
172
187
|
|
|
173
188
|
constructor(
|
|
174
|
-
element: HTMLElement,
|
|
189
|
+
element: HTMLElement, options: {
|
|
190
|
+
title?: string,
|
|
191
|
+
jslogContext?: string,
|
|
192
|
+
currentConditions?: SDK.NetworkManager.Conditions,
|
|
193
|
+
includeBlocking?: true,
|
|
194
|
+
} = {},
|
|
175
195
|
view = DEFAULT_VIEW) {
|
|
176
196
|
super();
|
|
177
197
|
SDK.NetworkManager.customUserNetworkConditionsSetting().addChangeListener(this.#performUpdate, this);
|
|
178
198
|
this.#element = element;
|
|
179
|
-
this.#jslogContext = jslogContext;
|
|
180
|
-
this.#currentConditions = currentConditions;
|
|
181
|
-
this.#title = title;
|
|
199
|
+
this.#jslogContext = options.jslogContext;
|
|
200
|
+
this.#currentConditions = options.currentConditions;
|
|
201
|
+
this.#title = options.title;
|
|
182
202
|
this.#view = view;
|
|
183
203
|
|
|
184
204
|
this.#performUpdate();
|
|
185
205
|
}
|
|
186
206
|
|
|
207
|
+
get recommendedConditions(): SDK.NetworkManager.Conditions|null {
|
|
208
|
+
return this.#recommendedConditions;
|
|
209
|
+
}
|
|
187
210
|
set recommendedConditions(recommendedConditions: SDK.NetworkManager.Conditions|null) {
|
|
188
211
|
this.#recommendedConditions = recommendedConditions;
|
|
189
212
|
this.#performUpdate();
|
|
190
213
|
}
|
|
191
214
|
|
|
192
|
-
|
|
215
|
+
get currentConditions(): SDK.NetworkManager.ThrottlingConditions|undefined {
|
|
216
|
+
return this.#currentConditions;
|
|
217
|
+
}
|
|
218
|
+
set currentConditions(currentConditions: SDK.NetworkManager.ThrottlingConditions|undefined) {
|
|
193
219
|
this.#currentConditions = currentConditions;
|
|
194
220
|
this.#performUpdate();
|
|
195
221
|
}
|
|
196
222
|
|
|
223
|
+
get jslogContext(): string|undefined {
|
|
224
|
+
return this.#jslogContext;
|
|
225
|
+
}
|
|
226
|
+
set jslogContext(jslogContext: string|undefined) {
|
|
227
|
+
this.#jslogContext = jslogContext;
|
|
228
|
+
this.#performUpdate();
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
get variant(): NetworkThrottlingSelect.Variant {
|
|
232
|
+
return this.#variant;
|
|
233
|
+
}
|
|
234
|
+
set variant(variant: NetworkThrottlingSelect.Variant) {
|
|
235
|
+
this.#variant = variant;
|
|
236
|
+
this.#performUpdate();
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// FIXME Should use requestUpdate once we merge this with the widget
|
|
197
240
|
#performUpdate(): void {
|
|
198
241
|
const customNetworkConditionsSetting = SDK.NetworkManager.customUserNetworkConditionsSetting();
|
|
199
242
|
const customNetworkConditions = customNetworkConditionsSetting.get();
|
|
@@ -201,16 +244,41 @@ export class NetworkThrottlingSelect extends Common.ObjectWrapper.ObjectWrapper<
|
|
|
201
244
|
void Common.Revealer.reveal(SDK.NetworkManager.customUserNetworkConditionsSetting());
|
|
202
245
|
};
|
|
203
246
|
|
|
204
|
-
const onSelect = (conditions: SDK.NetworkManager.
|
|
247
|
+
const onSelect = (conditions: SDK.NetworkManager.ThrottlingConditions): void => {
|
|
205
248
|
this.dispatchEventToListeners(Events.CONDITIONS_CHANGED, conditions);
|
|
206
|
-
Badges.UserBadges.instance().recordAction(Badges.BadgeAction.NETWORK_SPEED_THROTTLED);
|
|
207
249
|
};
|
|
208
250
|
|
|
209
|
-
const throttlingGroups = [
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
251
|
+
const throttlingGroups: NetworkThrottlingConditionsGroup[] = [];
|
|
252
|
+
|
|
253
|
+
switch (this.#variant) {
|
|
254
|
+
case NetworkThrottlingSelect.Variant.GLOBAL_CONDITIONS:
|
|
255
|
+
throttlingGroups.push(
|
|
256
|
+
{title: i18nString(UIStrings.disabled), items: [SDK.NetworkManager.NoThrottlingConditions]}, {
|
|
257
|
+
title: i18nString(UIStrings.presets),
|
|
258
|
+
items: [
|
|
259
|
+
SDK.NetworkManager.Fast4GConditions,
|
|
260
|
+
SDK.NetworkManager.Slow4GConditions,
|
|
261
|
+
SDK.NetworkManager.Slow3GConditions,
|
|
262
|
+
SDK.NetworkManager.OfflineConditions,
|
|
263
|
+
]
|
|
264
|
+
});
|
|
265
|
+
break;
|
|
266
|
+
case NetworkThrottlingSelect.Variant.INDIVIDUAL_REQUEST_CONDITIONS:
|
|
267
|
+
throttlingGroups.push(
|
|
268
|
+
{title: i18nString(UIStrings.blockingGroup), items: [SDK.NetworkManager.BlockingConditions]},
|
|
269
|
+
{
|
|
270
|
+
title: i18nString(UIStrings.presets),
|
|
271
|
+
items: [
|
|
272
|
+
SDK.NetworkManager.Fast4GConditions,
|
|
273
|
+
SDK.NetworkManager.Slow4GConditions,
|
|
274
|
+
SDK.NetworkManager.Slow3GConditions,
|
|
275
|
+
]
|
|
276
|
+
},
|
|
277
|
+
);
|
|
278
|
+
break;
|
|
279
|
+
}
|
|
213
280
|
const customConditionsGroup = {title: i18nString(UIStrings.custom), items: customNetworkConditions};
|
|
281
|
+
|
|
214
282
|
const viewInput: ViewInput = {
|
|
215
283
|
recommendedConditions: this.#recommendedConditions,
|
|
216
284
|
selectedConditions: this.#currentConditions,
|
|
@@ -224,3 +292,35 @@ export class NetworkThrottlingSelect extends Common.ObjectWrapper.ObjectWrapper<
|
|
|
224
292
|
this.#view(viewInput, {}, this.#element);
|
|
225
293
|
}
|
|
226
294
|
}
|
|
295
|
+
export namespace NetworkThrottlingSelect {
|
|
296
|
+
export const enum Variant {
|
|
297
|
+
GLOBAL_CONDITIONS = 'global-conditions',
|
|
298
|
+
INDIVIDUAL_REQUEST_CONDITIONS = 'individual-request-conditions',
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export class NetworkThrottlingSelectorWidget extends UI.Widget.VBox {
|
|
303
|
+
#select: NetworkThrottlingSelect;
|
|
304
|
+
#conditionsChangedHandler?: ((conditions: SDK.NetworkManager.ThrottlingConditions) => void);
|
|
305
|
+
constructor(element?: HTMLElement, view = DEFAULT_VIEW) {
|
|
306
|
+
super(element, {useShadowDom: true});
|
|
307
|
+
this.#select = new NetworkThrottlingSelect(this.contentElement, {}, view);
|
|
308
|
+
this.#select.addEventListener(Events.CONDITIONS_CHANGED, ({data}) => this.#conditionsChangedHandler?.(data));
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
set variant(variant: NetworkThrottlingSelect.Variant) {
|
|
312
|
+
this.#select.variant = variant;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
set jslogContext(context: string) {
|
|
316
|
+
this.#select.jslogContext = context;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
set currentConditions(currentConditions: SDK.NetworkManager.ThrottlingConditions|undefined) {
|
|
320
|
+
this.#select.currentConditions = currentConditions;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
set onConditionsChanged(handler: (conditions: SDK.NetworkManager.ThrottlingConditions) => void) {
|
|
324
|
+
this.#conditionsChangedHandler = handler;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
@@ -167,7 +167,7 @@ export interface Conditions {
|
|
|
167
167
|
|
|
168
168
|
export interface NetworkThrottlingConditionsGroup {
|
|
169
169
|
title: string;
|
|
170
|
-
items: SDK.NetworkManager.
|
|
170
|
+
items: SDK.NetworkManager.ThrottlingConditions[];
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
export interface MobileThrottlingConditionsGroup {
|
|
@@ -154,7 +154,7 @@ export class AiCodeCompletionPlugin extends Plugin {
|
|
|
154
154
|
if (this.#aiCodeCompletion && this.#editor && TextEditor.Config.hasActiveAiSuggestion(this.#editor.state)) {
|
|
155
155
|
const {accepted, suggestion} = TextEditor.Config.acceptAiAutoCompleteSuggestion(this.#editor.editor);
|
|
156
156
|
if (accepted) {
|
|
157
|
-
if (suggestion?.rpcGlobalId
|
|
157
|
+
if (suggestion?.rpcGlobalId) {
|
|
158
158
|
this.#aiCodeCompletion?.registerUserAcceptance(suggestion.rpcGlobalId, suggestion.sampleId);
|
|
159
159
|
}
|
|
160
160
|
this.#onAiCodeCompletionSuggestionAccepted();
|
|
@@ -1212,6 +1212,11 @@ export class SourcesPanel extends UI.Panel.Panel implements
|
|
|
1212
1212
|
this.sidebarPaneView.detach();
|
|
1213
1213
|
}
|
|
1214
1214
|
|
|
1215
|
+
if (Root.Runtime.Runtime.isTraceApp()) {
|
|
1216
|
+
this.splitWidget.hideSidebar();
|
|
1217
|
+
return;
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1215
1220
|
this.splitWidget.setVertical(!vertically);
|
|
1216
1221
|
this.splitWidget.element.classList.toggle('sources-split-view-vertical', vertically);
|
|
1217
1222
|
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import * as Host from '../../core/host/host.js';
|
|
7
7
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
8
|
+
import * as Root from '../../core/root/root.js';
|
|
8
9
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
9
10
|
import * as Breakpoints from '../../models/breakpoints/breakpoints.js';
|
|
10
11
|
import * as Workspace from '../../models/workspace/workspace.js';
|
|
@@ -528,6 +529,7 @@ UI.ViewManager.registerViewExtension({
|
|
|
528
529
|
title: i18nLazyString(UIStrings.snippets),
|
|
529
530
|
order: 6,
|
|
530
531
|
persistence: UI.ViewManager.ViewPersistence.PERMANENT,
|
|
532
|
+
condition: () => !Root.Runtime.Runtime.isTraceApp(),
|
|
531
533
|
async loadView() {
|
|
532
534
|
const Sources = await loadSourcesModule();
|
|
533
535
|
return new Sources.SourcesNavigator.SnippetsNavigatorView();
|
|
@@ -1280,18 +1282,17 @@ UI.ActionRegistration.registerActionExtension({
|
|
|
1280
1282
|
title: i18nLazyString(UIStrings.createNewSnippet),
|
|
1281
1283
|
});
|
|
1282
1284
|
|
|
1283
|
-
|
|
1284
|
-
UI.ActionRegistration.
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
}
|
|
1285
|
+
UI.ActionRegistration.registerActionExtension({
|
|
1286
|
+
category: UI.ActionRegistration.ActionCategory.SOURCES,
|
|
1287
|
+
actionId: 'sources.add-folder-to-workspace',
|
|
1288
|
+
condition: () => !Host.InspectorFrontendHost.InspectorFrontendHostInstance.isHostedMode(),
|
|
1289
|
+
async loadActionDelegate() {
|
|
1290
|
+
const Sources = await loadSourcesModule();
|
|
1291
|
+
return new Sources.SourcesNavigator.ActionDelegate();
|
|
1292
|
+
},
|
|
1293
|
+
iconClass: UI.ActionRegistration.IconClass.PLUS,
|
|
1294
|
+
title: i18nLazyString(UIStrings.addFolderToWorkspace),
|
|
1295
|
+
});
|
|
1295
1296
|
|
|
1296
1297
|
UI.ActionRegistration.registerActionExtension({
|
|
1297
1298
|
category: UI.ActionRegistration.ActionCategory.DEBUGGER,
|
|
@@ -1637,6 +1637,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
1637
1637
|
const url = new URL(window.location.href);
|
|
1638
1638
|
const pathToEntrypoint = url.pathname.slice(0, url.pathname.lastIndexOf('/'));
|
|
1639
1639
|
url.pathname = `${pathToEntrypoint}/trace_app.html`;
|
|
1640
|
+
url.search = '';
|
|
1640
1641
|
pathToLaunch = url.toString();
|
|
1641
1642
|
|
|
1642
1643
|
// Clarifying the window the code is referring to
|
|
@@ -11,7 +11,6 @@ import * as i18n from '../../core/i18n/i18n.js';
|
|
|
11
11
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
12
12
|
import type * as Protocol from '../../generated/protocol.js';
|
|
13
13
|
import * as Trace from '../../models/trace/trace.js';
|
|
14
|
-
import * as CopyToClipboard from '../../ui/components/copy_to_clipboard/copy_to_clipboard.js';
|
|
15
14
|
import type * as Linkifier from '../../ui/components/linkifier/linkifier.js';
|
|
16
15
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
17
16
|
import {html, render} from '../../ui/lit/lit.js';
|
|
@@ -259,7 +258,7 @@ export class TimelineSelectorStatsView extends UI.Widget.VBox {
|
|
|
259
258
|
].join('\t'));
|
|
260
259
|
}
|
|
261
260
|
const data = tableData.join('\n');
|
|
262
|
-
|
|
261
|
+
UI.UIUtils.copyTextToClipboard(data, i18nString(UIStrings.tableCopiedToClipboard));
|
|
263
262
|
});
|
|
264
263
|
}
|
|
265
264
|
|
|
@@ -799,9 +799,9 @@ export class GridNode extends DataGrid.SortableDataGrid.SortableDataGridNode<Gri
|
|
|
799
799
|
const parsedTrace = this.treeView.parsedTrace();
|
|
800
800
|
const target = parsedTrace ? targetForEvent(parsedTrace, event) : null;
|
|
801
801
|
const linkifier = this.treeView.linkifier;
|
|
802
|
-
const
|
|
803
|
-
Boolean(parsedTrace && Tracing.FreshRecording.Tracker.instance().
|
|
804
|
-
this.linkElement = TimelineUIUtils.linkifyTopCallFrame(event, target, linkifier,
|
|
802
|
+
const isFreshOrEnhanced =
|
|
803
|
+
Boolean(parsedTrace && Tracing.FreshRecording.Tracker.instance().recordingIsFreshOrEnhanced(parsedTrace));
|
|
804
|
+
this.linkElement = TimelineUIUtils.linkifyTopCallFrame(event, target, linkifier, isFreshOrEnhanced);
|
|
805
805
|
if (this.linkElement) {
|
|
806
806
|
container.createChild('div', 'activity-link').appendChild(this.linkElement);
|
|
807
807
|
}
|
|
@@ -493,7 +493,7 @@ interface LinkifyLocationOptions {
|
|
|
493
493
|
lineNumber: number;
|
|
494
494
|
target: SDK.Target.Target|null;
|
|
495
495
|
linkifier: LegacyComponents.Linkifier.Linkifier;
|
|
496
|
-
|
|
496
|
+
isFreshOrEnhanced?: boolean;
|
|
497
497
|
columnNumber?: number;
|
|
498
498
|
omitOrigin?: boolean;
|
|
499
499
|
}
|
|
@@ -656,7 +656,7 @@ export class TimelineUIUtils {
|
|
|
656
656
|
|
|
657
657
|
static async buildDetailsNodeForTraceEvent(
|
|
658
658
|
event: Trace.Types.Events.Event, target: SDK.Target.Target|null, linkifier: LegacyComponents.Linkifier.Linkifier,
|
|
659
|
-
|
|
659
|
+
isFreshOrEnhanced = false, parsedTrace: Trace.TraceModel.ParsedTrace): Promise<Node|null> {
|
|
660
660
|
let details: HTMLElement|HTMLSpanElement|(Element | null)|Text|null = null;
|
|
661
661
|
let detailsText;
|
|
662
662
|
// TODO(40287735): update this code with type-safe data checks.
|
|
@@ -706,7 +706,7 @@ export class TimelineUIUtils {
|
|
|
706
706
|
lineNumber: callFrame?.lineNumber || 0,
|
|
707
707
|
columnNumber: callFrame?.columnNumber,
|
|
708
708
|
target,
|
|
709
|
-
|
|
709
|
+
isFreshOrEnhanced,
|
|
710
710
|
linkifier,
|
|
711
711
|
omitOrigin: true,
|
|
712
712
|
});
|
|
@@ -725,7 +725,7 @@ export class TimelineUIUtils {
|
|
|
725
725
|
lineNumber: 0,
|
|
726
726
|
columnNumber: 0,
|
|
727
727
|
target,
|
|
728
|
-
|
|
728
|
+
isFreshOrEnhanced,
|
|
729
729
|
linkifier,
|
|
730
730
|
});
|
|
731
731
|
break;
|
|
@@ -743,7 +743,7 @@ export class TimelineUIUtils {
|
|
|
743
743
|
lineNumber: lineNumber || 0,
|
|
744
744
|
columnNumber: 0,
|
|
745
745
|
target,
|
|
746
|
-
|
|
746
|
+
isFreshOrEnhanced,
|
|
747
747
|
linkifier,
|
|
748
748
|
omitOrigin: true,
|
|
749
749
|
});
|
|
@@ -761,7 +761,7 @@ export class TimelineUIUtils {
|
|
|
761
761
|
lineNumber: 0,
|
|
762
762
|
columnNumber: 0,
|
|
763
763
|
target,
|
|
764
|
-
|
|
764
|
+
isFreshOrEnhanced,
|
|
765
765
|
linkifier,
|
|
766
766
|
omitOrigin: true,
|
|
767
767
|
});
|
|
@@ -779,7 +779,7 @@ export class TimelineUIUtils {
|
|
|
779
779
|
Trace.Types.Events.isProfileCall(event)) {
|
|
780
780
|
detailsText = null;
|
|
781
781
|
} else {
|
|
782
|
-
details = this.linkifyTopCallFrame(event, target, linkifier,
|
|
782
|
+
details = this.linkifyTopCallFrame(event, target, linkifier, isFreshOrEnhanced) ?? null;
|
|
783
783
|
}
|
|
784
784
|
break;
|
|
785
785
|
}
|
|
@@ -792,7 +792,7 @@ export class TimelineUIUtils {
|
|
|
792
792
|
}
|
|
793
793
|
|
|
794
794
|
static linkifyLocation(linkifyOptions: LinkifyLocationOptions): Element|null {
|
|
795
|
-
const {scriptId, url, lineNumber, columnNumber,
|
|
795
|
+
const {scriptId, url, lineNumber, columnNumber, isFreshOrEnhanced, linkifier, target, omitOrigin} = linkifyOptions;
|
|
796
796
|
const options = {
|
|
797
797
|
lineNumber,
|
|
798
798
|
columnNumber,
|
|
@@ -802,7 +802,7 @@ export class TimelineUIUtils {
|
|
|
802
802
|
tabStop: true,
|
|
803
803
|
omitOrigin,
|
|
804
804
|
};
|
|
805
|
-
if (
|
|
805
|
+
if (isFreshOrEnhanced) {
|
|
806
806
|
return linkifier.linkifyScriptLocation(
|
|
807
807
|
target, scriptId, url as Platform.DevToolsPath.UrlString, lineNumber, options);
|
|
808
808
|
}
|
|
@@ -811,7 +811,7 @@ export class TimelineUIUtils {
|
|
|
811
811
|
|
|
812
812
|
static linkifyTopCallFrame(
|
|
813
813
|
event: Trace.Types.Events.Event, target: SDK.Target.Target|null, linkifier: LegacyComponents.Linkifier.Linkifier,
|
|
814
|
-
|
|
814
|
+
isFreshOrEnhanced = false): Element|null {
|
|
815
815
|
let frame = Trace.Helpers.Trace.getZeroIndexedStackTraceInEventPayload(event)?.[0];
|
|
816
816
|
if (Trace.Types.Events.isProfileCall(event)) {
|
|
817
817
|
frame = event.callFrame;
|
|
@@ -827,7 +827,7 @@ export class TimelineUIUtils {
|
|
|
827
827
|
columnNumber: frame.columnNumber,
|
|
828
828
|
lineNumber: frame.lineNumber,
|
|
829
829
|
};
|
|
830
|
-
if (
|
|
830
|
+
if (isFreshOrEnhanced) {
|
|
831
831
|
return linkifier.maybeLinkifyConsoleCallFrame(target, frame, {showColumnNumber: true, inlineFrameIndex: 0});
|
|
832
832
|
}
|
|
833
833
|
return LegacyComponents.Linkifier.Linkifier.linkifyURL(frame.url as Platform.DevToolsPath.UrlString, options);
|
|
@@ -1078,8 +1078,8 @@ export class TimelineUIUtils {
|
|
|
1078
1078
|
}
|
|
1079
1079
|
}
|
|
1080
1080
|
|
|
1081
|
-
const
|
|
1082
|
-
Boolean(parsedTrace && Tracing.FreshRecording.Tracker.instance().
|
|
1081
|
+
const isFreshOrEnhanced =
|
|
1082
|
+
Boolean(parsedTrace && Tracing.FreshRecording.Tracker.instance().recordingIsFreshOrEnhanced(parsedTrace));
|
|
1083
1083
|
|
|
1084
1084
|
switch (event.name) {
|
|
1085
1085
|
case Trace.Types.Events.Name.GC:
|
|
@@ -1110,7 +1110,7 @@ export class TimelineUIUtils {
|
|
|
1110
1110
|
}
|
|
1111
1111
|
case Trace.Types.Events.Name.FUNCTION_CALL: {
|
|
1112
1112
|
const detailsNode = await TimelineUIUtils.buildDetailsNodeForTraceEvent(
|
|
1113
|
-
event, targetForEvent(parsedTrace, event), linkifier,
|
|
1113
|
+
event, targetForEvent(parsedTrace, event), linkifier, isFreshOrEnhanced, parsedTrace);
|
|
1114
1114
|
if (detailsNode) {
|
|
1115
1115
|
contentHelper.appendElementRow(i18nString(UIStrings.function), detailsNode);
|
|
1116
1116
|
const originWithEntity = this.getOriginWithEntity(entityMapper, parsedTrace, event);
|
|
@@ -1473,7 +1473,7 @@ export class TimelineUIUtils {
|
|
|
1473
1473
|
|
|
1474
1474
|
case Trace.Types.Events.Name.EVENT_TIMING: {
|
|
1475
1475
|
const detailsNode = await TimelineUIUtils.buildDetailsNodeForTraceEvent(
|
|
1476
|
-
event, targetForEvent(parsedTrace, event), linkifier,
|
|
1476
|
+
event, targetForEvent(parsedTrace, event), linkifier, isFreshOrEnhanced, parsedTrace);
|
|
1477
1477
|
if (detailsNode) {
|
|
1478
1478
|
contentHelper.appendElementRow(i18nString(UIStrings.details), detailsNode);
|
|
1479
1479
|
}
|
|
@@ -1491,7 +1491,7 @@ export class TimelineUIUtils {
|
|
|
1491
1491
|
|
|
1492
1492
|
default: {
|
|
1493
1493
|
const detailsNode = await TimelineUIUtils.buildDetailsNodeForTraceEvent(
|
|
1494
|
-
event, targetForEvent(parsedTrace, event), linkifier,
|
|
1494
|
+
event, targetForEvent(parsedTrace, event), linkifier, isFreshOrEnhanced, parsedTrace);
|
|
1495
1495
|
if (detailsNode) {
|
|
1496
1496
|
contentHelper.appendElementRow(i18nString(UIStrings.details), detailsNode);
|
|
1497
1497
|
}
|
|
@@ -28,4 +28,8 @@ export class Tracker {
|
|
|
28
28
|
recordingIsFresh(data: Trace.TraceModel.ParsedTrace): boolean {
|
|
29
29
|
return this.#freshRecordings.has(data);
|
|
30
30
|
}
|
|
31
|
+
|
|
32
|
+
recordingIsFreshOrEnhanced(data: Trace.TraceModel.ParsedTrace): boolean {
|
|
33
|
+
return this.#freshRecordings.has(data) || data.metadata.enhancedTraceVersion !== undefined;
|
|
34
|
+
}
|
|
31
35
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Name: Dependencies sourced from the upstream `chromium` repository
|
|
2
2
|
URL: https://source.chromium.org/chromium/chromium/src/+/main:components/variations/proto/devtools/
|
|
3
3
|
Version: N/A
|
|
4
|
-
Revision:
|
|
4
|
+
Revision: b8cee13d6f07e8bccc83905ddeccf1865b86b5e4
|
|
5
5
|
Update Mechanism: Manual (https://crbug.com/428069060)
|
|
6
6
|
License: BSD-3-Clause
|
|
7
7
|
License File: LICENSE
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Name: Puppeteer Core
|
|
2
2
|
Short Name: Puppeteer Core
|
|
3
3
|
URL: https://github.com/puppeteer/puppeteer/tree/main/packages/puppeteer-core
|
|
4
|
-
Version: 24.
|
|
4
|
+
Version: 24.25.0
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
License File: LICENSE
|
|
7
|
-
Revision:
|
|
7
|
+
Revision: 7d3f88132698d4c7374ca059662d2d750001e521
|
|
8
8
|
Security Critical: no
|
|
9
9
|
Shipped: yes
|
|
10
10
|
Update Mechanism: Autoroll
|
|
@@ -34,8 +34,8 @@ export declare abstract class Realm extends EventEmitter<{
|
|
|
34
34
|
}> {
|
|
35
35
|
#private;
|
|
36
36
|
protected readonly disposables: {
|
|
37
|
-
"__#
|
|
38
|
-
"__#
|
|
37
|
+
"__#59417@#disposed": boolean;
|
|
38
|
+
"__#59417@#stack": Disposable[];
|
|
39
39
|
readonly disposed: boolean;
|
|
40
40
|
dispose(): void;
|
|
41
41
|
use<T extends Disposable | null | undefined>(value: T): T;
|
|
@@ -239,6 +239,7 @@ class AXNode {
|
|
|
239
239
|
#name;
|
|
240
240
|
#role;
|
|
241
241
|
#ignored;
|
|
242
|
+
#cachedHasFocusableChild;
|
|
242
243
|
#realm;
|
|
243
244
|
constructor(realm, payload) {
|
|
244
245
|
this.payload = payload;
|
|
@@ -275,6 +276,18 @@ class AXNode {
|
|
|
275
276
|
role === 'InlineTextBox' ||
|
|
276
277
|
role === 'StaticText');
|
|
277
278
|
}
|
|
279
|
+
#hasFocusableChild() {
|
|
280
|
+
if (this.#cachedHasFocusableChild === undefined) {
|
|
281
|
+
this.#cachedHasFocusableChild = false;
|
|
282
|
+
for (const child of this.children) {
|
|
283
|
+
if (child.#focusable || child.#hasFocusableChild()) {
|
|
284
|
+
this.#cachedHasFocusableChild = true;
|
|
285
|
+
break;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
return this.#cachedHasFocusableChild;
|
|
290
|
+
}
|
|
278
291
|
find(predicate) {
|
|
279
292
|
if (predicate(this)) {
|
|
280
293
|
return this;
|
|
@@ -316,6 +329,9 @@ class AXNode {
|
|
|
316
329
|
default:
|
|
317
330
|
break;
|
|
318
331
|
}
|
|
332
|
+
if (this.#hasFocusableChild()) {
|
|
333
|
+
return false;
|
|
334
|
+
}
|
|
319
335
|
if (this.#role === 'heading' && this.#name) {
|
|
320
336
|
return true;
|
|
321
337
|
}
|