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
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
9
9
|
export declare const PUPPETEER_REVISIONS: Readonly<{
|
|
10
|
-
chrome: "141.0.7390.
|
|
11
|
-
'chrome-headless-shell': "141.0.7390.
|
|
12
|
-
firefox: "
|
|
10
|
+
chrome: "141.0.7390.78";
|
|
11
|
+
'chrome-headless-shell': "141.0.7390.78";
|
|
12
|
+
firefox: "stable_144.0";
|
|
13
13
|
}>;
|
|
14
14
|
//# sourceMappingURL=revisions.d.ts.map
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
9
9
|
export const PUPPETEER_REVISIONS = Object.freeze({
|
|
10
|
-
chrome: '141.0.7390.
|
|
11
|
-
'chrome-headless-shell': '141.0.7390.
|
|
12
|
-
firefox: '
|
|
10
|
+
chrome: '141.0.7390.78',
|
|
11
|
+
'chrome-headless-shell': '141.0.7390.78',
|
|
12
|
+
firefox: 'stable_144.0',
|
|
13
13
|
});
|
|
14
14
|
//# sourceMappingURL=revisions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revisions.js","sourceRoot":"","sources":["../../../src/revisions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,eAAe;IACvB,uBAAuB,EAAE,eAAe;IACxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"revisions.js","sourceRoot":"","sources":["../../../src/revisions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC/C,MAAM,EAAE,eAAe;IACvB,uBAAuB,EAAE,eAAe;IACxC,OAAO,EAAE,cAAc;CACxB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../../src/util/version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,eAAO,MAAM,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google Inc.
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
// If moved update release-please config
|
|
7
|
+
// x-release-please-start-version
|
|
8
|
+
export const packageVersion = '24.25.0';
|
|
9
|
+
// x-release-please-end
|
|
10
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../src/util/version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wCAAwC;AACxC,iCAAiC;AACjC,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS,CAAC;AACxC,uBAAuB"}
|
|
@@ -1075,6 +1075,13 @@ export declare interface ConnectOptions {
|
|
|
1075
1075
|
*/
|
|
1076
1076
|
targetFilter?: TargetFilterCallback;
|
|
1077
1077
|
|
|
1078
|
+
/**
|
|
1079
|
+
* Whether to handle the DevTools windows as pages in Puppeteer. Supported
|
|
1080
|
+
* only in Chrome with CDP.
|
|
1081
|
+
*
|
|
1082
|
+
* @defaultValue 'false'
|
|
1083
|
+
*/
|
|
1084
|
+
handleDevToolsAsPage?: boolean;
|
|
1078
1085
|
/**
|
|
1079
1086
|
* @defaultValue Determined at run time:
|
|
1080
1087
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "puppeteer-core",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.25.0",
|
|
4
4
|
"description": "A high-level API to control headless Chrome over the DevTools Protocol",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"puppeteer",
|
|
@@ -148,16 +148,16 @@
|
|
|
148
148
|
"author": "The Chromium Authors",
|
|
149
149
|
"license": "Apache-2.0",
|
|
150
150
|
"dependencies": {
|
|
151
|
-
"@puppeteer/browsers": "2.10.
|
|
151
|
+
"@puppeteer/browsers": "2.10.12",
|
|
152
152
|
"chromium-bidi": "9.1.0",
|
|
153
153
|
"debug": "^4.4.3",
|
|
154
154
|
"devtools-protocol": "0.0.1508733",
|
|
155
155
|
"typed-query-selector": "^2.12.0",
|
|
156
|
-
"webdriver-bidi-protocol": "0.3.
|
|
156
|
+
"webdriver-bidi-protocol": "0.3.7",
|
|
157
157
|
"ws": "^8.18.3"
|
|
158
158
|
},
|
|
159
159
|
"devDependencies": {
|
|
160
|
-
"@types/chrome": "0.1.
|
|
160
|
+
"@types/chrome": "0.1.24",
|
|
161
161
|
"@types/debug": "4.1.12",
|
|
162
162
|
"@types/node": "^18.17.15",
|
|
163
163
|
"@types/ws": "8.18.1",
|
|
@@ -319,6 +319,7 @@ class AXNode {
|
|
|
319
319
|
#name: string;
|
|
320
320
|
#role: string;
|
|
321
321
|
#ignored: boolean;
|
|
322
|
+
#cachedHasFocusableChild?: boolean;
|
|
322
323
|
#realm: Realm;
|
|
323
324
|
|
|
324
325
|
constructor(realm: Realm, payload: Protocol.Accessibility.AXNode) {
|
|
@@ -361,6 +362,19 @@ class AXNode {
|
|
|
361
362
|
);
|
|
362
363
|
}
|
|
363
364
|
|
|
365
|
+
#hasFocusableChild(): boolean {
|
|
366
|
+
if (this.#cachedHasFocusableChild === undefined) {
|
|
367
|
+
this.#cachedHasFocusableChild = false;
|
|
368
|
+
for (const child of this.children) {
|
|
369
|
+
if (child.#focusable || child.#hasFocusableChild()) {
|
|
370
|
+
this.#cachedHasFocusableChild = true;
|
|
371
|
+
break;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
return this.#cachedHasFocusableChild;
|
|
376
|
+
}
|
|
377
|
+
|
|
364
378
|
public find(predicate: (x: AXNode) => boolean): AXNode | null {
|
|
365
379
|
if (predicate(this)) {
|
|
366
380
|
return this;
|
|
@@ -406,6 +420,10 @@ class AXNode {
|
|
|
406
420
|
break;
|
|
407
421
|
}
|
|
408
422
|
|
|
423
|
+
if (this.#hasFocusableChild()) {
|
|
424
|
+
return false;
|
|
425
|
+
}
|
|
426
|
+
|
|
409
427
|
if (this.#role === 'heading' && this.#name) {
|
|
410
428
|
return true;
|
|
411
429
|
}
|
|
@@ -56,6 +56,7 @@ export class CdpBrowser extends BrowserBase {
|
|
|
56
56
|
isPageTargetCallback?: IsPageTargetCallback,
|
|
57
57
|
waitForInitiallyDiscoveredTargets = true,
|
|
58
58
|
networkEnabled = true,
|
|
59
|
+
handleDevToolsAsPage = false,
|
|
59
60
|
): Promise<CdpBrowser> {
|
|
60
61
|
const browser = new CdpBrowser(
|
|
61
62
|
connection,
|
|
@@ -67,6 +68,7 @@ export class CdpBrowser extends BrowserBase {
|
|
|
67
68
|
isPageTargetCallback,
|
|
68
69
|
waitForInitiallyDiscoveredTargets,
|
|
69
70
|
networkEnabled,
|
|
71
|
+
handleDevToolsAsPage,
|
|
70
72
|
);
|
|
71
73
|
if (acceptInsecureCerts) {
|
|
72
74
|
await connection.send('Security.setIgnoreCertificateErrors', {
|
|
@@ -86,6 +88,7 @@ export class CdpBrowser extends BrowserBase {
|
|
|
86
88
|
#contexts = new Map<string, CdpBrowserContext>();
|
|
87
89
|
#networkEnabled = true;
|
|
88
90
|
#targetManager: TargetManager;
|
|
91
|
+
#handleDevToolsAsPage = false;
|
|
89
92
|
|
|
90
93
|
constructor(
|
|
91
94
|
connection: Connection,
|
|
@@ -97,6 +100,7 @@ export class CdpBrowser extends BrowserBase {
|
|
|
97
100
|
isPageTargetCallback?: IsPageTargetCallback,
|
|
98
101
|
waitForInitiallyDiscoveredTargets = true,
|
|
99
102
|
networkEnabled = true,
|
|
103
|
+
handleDevToolsAsPage = false,
|
|
100
104
|
) {
|
|
101
105
|
super();
|
|
102
106
|
this.#networkEnabled = networkEnabled;
|
|
@@ -109,6 +113,7 @@ export class CdpBrowser extends BrowserBase {
|
|
|
109
113
|
(() => {
|
|
110
114
|
return true;
|
|
111
115
|
});
|
|
116
|
+
this.#handleDevToolsAsPage = handleDevToolsAsPage;
|
|
112
117
|
this.#setIsPageTargetCallback(isPageTargetCallback);
|
|
113
118
|
this.#targetManager = new TargetManager(
|
|
114
119
|
connection,
|
|
@@ -188,7 +193,10 @@ export class CdpBrowser extends BrowserBase {
|
|
|
188
193
|
return (
|
|
189
194
|
target.type() === 'page' ||
|
|
190
195
|
target.type() === 'background_page' ||
|
|
191
|
-
target.type() === 'webview'
|
|
196
|
+
target.type() === 'webview' ||
|
|
197
|
+
(this.#handleDevToolsAsPage &&
|
|
198
|
+
target.type() === 'other' &&
|
|
199
|
+
target.url().startsWith('devtools://'))
|
|
192
200
|
);
|
|
193
201
|
});
|
|
194
202
|
}
|
|
@@ -31,6 +31,7 @@ export async function _connectToCdpBrowser(
|
|
|
31
31
|
_isPageTarget: isPageTarget,
|
|
32
32
|
slowMo = 0,
|
|
33
33
|
protocolTimeout,
|
|
34
|
+
handleDevToolsAsPage,
|
|
34
35
|
} = options;
|
|
35
36
|
|
|
36
37
|
const connection = new Connection(
|
|
@@ -57,6 +58,7 @@ export async function _connectToCdpBrowser(
|
|
|
57
58
|
isPageTarget,
|
|
58
59
|
undefined,
|
|
59
60
|
networkEnabled,
|
|
61
|
+
handleDevToolsAsPage,
|
|
60
62
|
);
|
|
61
63
|
return browser;
|
|
62
64
|
}
|
|
@@ -82,6 +82,14 @@ export interface ConnectOptions {
|
|
|
82
82
|
*/
|
|
83
83
|
_isPageTarget?: IsPageTargetCallback;
|
|
84
84
|
|
|
85
|
+
/**
|
|
86
|
+
* Whether to handle the DevTools windows as pages in Puppeteer. Supported
|
|
87
|
+
* only in Chrome with CDP.
|
|
88
|
+
*
|
|
89
|
+
* @defaultValue 'false'
|
|
90
|
+
*/
|
|
91
|
+
handleDevToolsAsPage?: boolean;
|
|
92
|
+
|
|
85
93
|
/**
|
|
86
94
|
* @defaultValue Determined at run time:
|
|
87
95
|
*
|
|
@@ -17,9 +17,9 @@ import {
|
|
|
17
17
|
} from '../../third_party/rxjs/rxjs.js';
|
|
18
18
|
import type {CDPSession} from '../api/CDPSession.js';
|
|
19
19
|
import {environment} from '../environment.js';
|
|
20
|
-
import {packageVersion} from '../generated/version.js';
|
|
21
20
|
import {assert} from '../util/assert.js';
|
|
22
21
|
import {mergeUint8Arrays, stringToTypedArray} from '../util/encoding.js';
|
|
22
|
+
import {packageVersion} from '../util/version.js';
|
|
23
23
|
|
|
24
24
|
import {debug} from './Debug.js';
|
|
25
25
|
import {TimeoutError} from './Errors.js';
|
|
@@ -87,6 +87,7 @@ export abstract class BrowserLauncher {
|
|
|
87
87
|
timeout = 30000,
|
|
88
88
|
waitForInitialPage = true,
|
|
89
89
|
protocolTimeout,
|
|
90
|
+
handleDevToolsAsPage,
|
|
90
91
|
} = options;
|
|
91
92
|
|
|
92
93
|
let {protocol} = options;
|
|
@@ -206,22 +207,32 @@ export abstract class BrowserLauncher {
|
|
|
206
207
|
undefined,
|
|
207
208
|
undefined,
|
|
208
209
|
networkEnabled,
|
|
210
|
+
handleDevToolsAsPage,
|
|
209
211
|
);
|
|
210
212
|
}
|
|
211
213
|
}
|
|
212
214
|
} catch (error) {
|
|
213
215
|
void browserCloseCallback();
|
|
216
|
+
const logs = browserProcess.getRecentLogs().join('\n');
|
|
214
217
|
if (
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
logs.includes(
|
|
219
|
+
'Failed to create a ProcessSingleton for your profile directory',
|
|
220
|
+
) ||
|
|
221
|
+
// On Windows we will not get logs due to the singleton process
|
|
222
|
+
// handover. See
|
|
223
|
+
// https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/process_singleton_win.cc;l=46;drc=fc7952f0422b5073515a205a04ec9c3a1ae81658
|
|
224
|
+
(process.platform === 'win32' &&
|
|
225
|
+
existsSync(join(launchArgs.userDataDir, 'lockfile')))
|
|
220
226
|
) {
|
|
221
227
|
throw new Error(
|
|
222
228
|
`The browser is already running for ${launchArgs.userDataDir}. Use a different \`userDataDir\` or stop the running browser first.`,
|
|
223
229
|
);
|
|
224
230
|
}
|
|
231
|
+
if (logs.includes('Missing X server') && options.headless === false) {
|
|
232
|
+
throw new Error(
|
|
233
|
+
`Missing X server to start the headful browser. Either set headless to true or use xvfb-run to run your Puppeteer script.`,
|
|
234
|
+
);
|
|
235
|
+
}
|
|
225
236
|
if (error instanceof BrowsersTimeoutError) {
|
|
226
237
|
throw new TimeoutError(error.message);
|
|
227
238
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @internal
|
|
9
9
|
*/
|
|
10
10
|
export const PUPPETEER_REVISIONS = Object.freeze({
|
|
11
|
-
chrome: '141.0.7390.
|
|
12
|
-
'chrome-headless-shell': '141.0.7390.
|
|
13
|
-
firefox: '
|
|
11
|
+
chrome: '141.0.7390.78',
|
|
12
|
+
'chrome-headless-shell': '141.0.7390.78',
|
|
13
|
+
firefox: 'stable_144.0',
|
|
14
14
|
});
|
|
@@ -132,7 +132,6 @@
|
|
|
132
132
|
"package/lib/esm/puppeteer/common/util.js",
|
|
133
133
|
"package/lib/esm/puppeteer/environment.js",
|
|
134
134
|
"package/lib/esm/puppeteer/generated/injected.js",
|
|
135
|
-
"package/lib/esm/puppeteer/generated/version.js",
|
|
136
135
|
"package/lib/esm/puppeteer/index-browser.js",
|
|
137
136
|
"package/lib/esm/puppeteer/index.js",
|
|
138
137
|
"package/lib/esm/puppeteer/injected/ARIAQuerySelector.js",
|
|
@@ -170,6 +169,7 @@
|
|
|
170
169
|
"package/lib/esm/puppeteer/util/encoding.js",
|
|
171
170
|
"package/lib/esm/puppeteer/util/incremental-id-generator.js",
|
|
172
171
|
"package/lib/esm/puppeteer/util/util.js",
|
|
172
|
+
"package/lib/esm/puppeteer/util/version.js",
|
|
173
173
|
"package/lib/esm/third_party/mitt/mitt.js",
|
|
174
174
|
"package/lib/esm/third_party/parsel-js/parsel-js.js",
|
|
175
175
|
"package/lib/esm/third_party/rxjs/rxjs.js"
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// Copyright 2020 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import * as Lit from '../../lit/lit.js';
|
|
6
|
+
|
|
7
|
+
import {Icon} from './icon_button.js';
|
|
8
|
+
|
|
9
|
+
const {html} = Lit;
|
|
10
|
+
|
|
11
|
+
export function render(container: HTMLElement): void {
|
|
12
|
+
const iconTable = document.createElement('table');
|
|
13
|
+
const header = document.createElement('tr');
|
|
14
|
+
const th1 = document.createElement('th');
|
|
15
|
+
th1.textContent = 'Icon description';
|
|
16
|
+
header.appendChild(th1);
|
|
17
|
+
const th2 = document.createElement('th');
|
|
18
|
+
th2.textContent = 'Icon';
|
|
19
|
+
header.appendChild(th2);
|
|
20
|
+
iconTable.appendChild(header);
|
|
21
|
+
|
|
22
|
+
container.appendChild(iconTable);
|
|
23
|
+
|
|
24
|
+
const row1 = document.createElement('tr');
|
|
25
|
+
const iconDescription1 = document.createElement('td');
|
|
26
|
+
iconDescription1.textContent = 'Programmatically created with default size and color';
|
|
27
|
+
row1.appendChild(iconDescription1);
|
|
28
|
+
|
|
29
|
+
const icon = Icon.create('select-element');
|
|
30
|
+
const icon1 = document.createElement('td');
|
|
31
|
+
icon1.appendChild(icon);
|
|
32
|
+
row1.appendChild(icon1);
|
|
33
|
+
|
|
34
|
+
iconTable.appendChild(row1);
|
|
35
|
+
|
|
36
|
+
const row2 = document.createElement('tr');
|
|
37
|
+
const iconDescription2 = document.createElement('td');
|
|
38
|
+
iconDescription2.textContent = 'Programmatically created with custom size and color';
|
|
39
|
+
row2.appendChild(iconDescription2);
|
|
40
|
+
|
|
41
|
+
const otherIcon = Icon.create('issue-exclamation-filled');
|
|
42
|
+
otherIcon.classList.toggle('custom-size-and-color');
|
|
43
|
+
const icon2 = document.createElement('td');
|
|
44
|
+
icon2.appendChild(otherIcon);
|
|
45
|
+
row2.appendChild(icon2);
|
|
46
|
+
|
|
47
|
+
iconTable.appendChild(row2);
|
|
48
|
+
|
|
49
|
+
const row3 = document.createElement('tr');
|
|
50
|
+
const iconDescription3 = document.createElement('td');
|
|
51
|
+
iconDescription3.textContent = 'Created through html template with default size and color';
|
|
52
|
+
row3.appendChild(iconDescription3);
|
|
53
|
+
|
|
54
|
+
const icon3 = document.createElement('td');
|
|
55
|
+
Lit.render(
|
|
56
|
+
html`
|
|
57
|
+
<devtools-icon name="select-element"></devtools-icon>
|
|
58
|
+
`,
|
|
59
|
+
icon3);
|
|
60
|
+
row3.appendChild(icon3);
|
|
61
|
+
|
|
62
|
+
iconTable.appendChild(row3);
|
|
63
|
+
|
|
64
|
+
const row4 = document.createElement('tr');
|
|
65
|
+
const iconDescription4 = document.createElement('td');
|
|
66
|
+
iconDescription4.textContent = 'Created through html template with custom size and color';
|
|
67
|
+
row4.appendChild(iconDescription4);
|
|
68
|
+
|
|
69
|
+
const icon4 = document.createElement('td');
|
|
70
|
+
Lit.render(
|
|
71
|
+
html`
|
|
72
|
+
<devtools-icon name="select-element" class="custom-color small"></devtools-icon>
|
|
73
|
+
`,
|
|
74
|
+
icon4);
|
|
75
|
+
row4.appendChild(icon4);
|
|
76
|
+
|
|
77
|
+
iconTable.appendChild(row4);
|
|
78
|
+
}
|
|
@@ -8,8 +8,8 @@ import '../../../ui/legacy/legacy.js'; // for x-link
|
|
|
8
8
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
9
9
|
import * as CodeMirror from '../../../third_party/codemirror.next/codemirror.next.js';
|
|
10
10
|
import * as Buttons from '../../../ui/components/buttons/buttons.js';
|
|
11
|
-
import * as CopyToClipboard from '../../../ui/components/copy_to_clipboard/copy_to_clipboard.js';
|
|
12
11
|
import * as TextEditor from '../../../ui/components/text_editor/text_editor.js';
|
|
12
|
+
import * as UI from '../../../ui/legacy/legacy.js';
|
|
13
13
|
import * as Lit from '../../lit/lit.js';
|
|
14
14
|
import * as VisualLogging from '../../visual_logging/visual_logging.js';
|
|
15
15
|
|
|
@@ -191,7 +191,7 @@ export class CodeBlock extends HTMLElement {
|
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
#onCopy(): void {
|
|
194
|
-
|
|
194
|
+
UI.UIUtils.copyTextToClipboard(this.#code, i18nString(UIStrings.copied));
|
|
195
195
|
this.#copied = true;
|
|
196
196
|
void this.#render();
|
|
197
197
|
clearTimeout(this.#timer);
|
|
@@ -488,10 +488,10 @@ export const setAiAutoCompleteSuggestion = CM.StateEffect.define<ActiveSuggestio
|
|
|
488
488
|
interface ActiveSuggestion {
|
|
489
489
|
text: string;
|
|
490
490
|
from: number;
|
|
491
|
-
sampleId
|
|
491
|
+
sampleId?: number;
|
|
492
492
|
rpcGlobalId?: Host.AidaClient.RpcGlobalId;
|
|
493
493
|
startTime: number;
|
|
494
|
-
onImpression: (rpcGlobalId: Host.AidaClient.RpcGlobalId,
|
|
494
|
+
onImpression: (rpcGlobalId: Host.AidaClient.RpcGlobalId, latency: number, sampleId?: number) => void;
|
|
495
495
|
clearCachedRequest: () => void;
|
|
496
496
|
}
|
|
497
497
|
|
|
@@ -679,7 +679,7 @@ export const aiAutoCompleteSuggestion: CM.Extension = [
|
|
|
679
679
|
}
|
|
680
680
|
const latency = performance.now() - activeSuggestion.startTime;
|
|
681
681
|
// only register impression for the first time AI generated suggestion is shown to the user.
|
|
682
|
-
activeSuggestion.onImpression(activeSuggestion.rpcGlobalId, activeSuggestion.sampleId
|
|
682
|
+
activeSuggestion.onImpression(activeSuggestion.rpcGlobalId, latency, activeSuggestion.sampleId);
|
|
683
683
|
this.#lastLoggedSuggestion = activeSuggestion;
|
|
684
684
|
}
|
|
685
685
|
},
|
|
@@ -374,6 +374,10 @@ export class Tooltip extends HTMLElement {
|
|
|
374
374
|
}, this.hoverDelay);
|
|
375
375
|
};
|
|
376
376
|
|
|
377
|
+
#containsNode(target: EventTarget|null): boolean {
|
|
378
|
+
return target instanceof Node && this.contains(target);
|
|
379
|
+
}
|
|
380
|
+
|
|
377
381
|
hideTooltip = (event?: MouseEvent|FocusEvent): void => {
|
|
378
382
|
if (this.#timeout) {
|
|
379
383
|
window.clearTimeout(this.#timeout);
|
|
@@ -382,10 +386,11 @@ export class Tooltip extends HTMLElement {
|
|
|
382
386
|
// 1. event.currentTarget = the element that got blurred
|
|
383
387
|
// 2. event.relatedTarget = the element that gained focus
|
|
384
388
|
// https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/relatedTarget
|
|
385
|
-
// If the blurred element (1) was our anchor
|
|
386
|
-
// (2) is within the tooltip,
|
|
387
|
-
|
|
388
|
-
|
|
389
|
+
// If the blurred element (1) was our anchor or within the tooltip,
|
|
390
|
+
// and the newly focused element (2) is within the tooltip,
|
|
391
|
+
// we do not want to hide the tooltip.
|
|
392
|
+
if (event && this.variant === 'rich' && (event.target === this.#anchor || this.#containsNode(event.target)) &&
|
|
393
|
+
this.#containsNode(event.relatedTarget)) {
|
|
389
394
|
return;
|
|
390
395
|
}
|
|
391
396
|
|
|
@@ -2336,3 +2336,15 @@ export class HTMLElementWithLightDOMTemplate extends HTMLElement {
|
|
|
2336
2336
|
return targetElement;
|
|
2337
2337
|
}
|
|
2338
2338
|
}
|
|
2339
|
+
|
|
2340
|
+
/**
|
|
2341
|
+
* @param text Text to copy to clipboard
|
|
2342
|
+
* @param alert Message to send for a11y only required if there
|
|
2343
|
+
* were other UI changes that visually indicated this copy happened.
|
|
2344
|
+
*/
|
|
2345
|
+
export function copyTextToClipboard(text: string, alert?: string): void {
|
|
2346
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(text);
|
|
2347
|
+
if (alert) {
|
|
2348
|
+
ARIAUtils.LiveAnnouncer.alert(alert);
|
|
2349
|
+
}
|
|
2350
|
+
}
|
package/package.json
CHANGED
package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../../src/generated/version.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,cAAc,YAAY,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../src/generated/version.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACU,QAAA,cAAc,GAAG,SAAS,CAAC"}
|
package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../../src/generated/version.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,cAAc,YAAY,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../src/generated/version.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
// Copyright 2025 The Chromium Authors
|
|
3
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
4
|
-
// found in the LICENSE file.
|
|
5
|
-
|
|
6
|
-
import * as Host from '../../../core/host/host.js';
|
|
7
|
-
import * as UI from '../../legacy/legacy.js';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @param text Text to copy to clipboard
|
|
11
|
-
* @param alert Message to send for a11y
|
|
12
|
-
*/
|
|
13
|
-
export function copyTextToClipboard(text: string, alert?: string): void {
|
|
14
|
-
Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(text);
|
|
15
|
-
// TODO: make alert required.
|
|
16
|
-
if (alert) {
|
|
17
|
-
UI.ARIAUtils.LiveAnnouncer.alert(alert);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
Copyright 2020 The Chromium Authors
|
|
3
|
-
Use of this source code is governed by a BSD-style license that can be
|
|
4
|
-
found in the LICENSE file.
|
|
5
|
-
-->
|
|
6
|
-
<!DOCTYPE html>
|
|
7
|
-
<html>
|
|
8
|
-
<head>
|
|
9
|
-
<meta charset="UTF-8" />
|
|
10
|
-
<meta name="viewport" content="width=device-width" />
|
|
11
|
-
<title>Element explore icon example</title>
|
|
12
|
-
<style>
|
|
13
|
-
#icon-overview {
|
|
14
|
-
width: 80%;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
td,
|
|
18
|
-
th {
|
|
19
|
-
text-align: left;
|
|
20
|
-
width: 50%;
|
|
21
|
-
height: 50px;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.custom-color {
|
|
25
|
-
color: blue;
|
|
26
|
-
}
|
|
27
|
-
</style>
|
|
28
|
-
</head>
|
|
29
|
-
<body>
|
|
30
|
-
|
|
31
|
-
<table id='icon-overview'>
|
|
32
|
-
<tr>
|
|
33
|
-
<th>Icon description</th>
|
|
34
|
-
<th>Icon</th>
|
|
35
|
-
</tr>
|
|
36
|
-
</table>
|
|
37
|
-
|
|
38
|
-
<script type="module" src="./basic.js"></script>
|
|
39
|
-
</body>
|
|
40
|
-
</html>
|