chrome-devtools-frontend 1.0.1624583 → 1.0.1625854
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/.agents/skills/foundation-test-migration/SKILL.md +2 -2
- package/front_end/core/common/VersionController.ts +9 -7
- package/front_end/core/common/common.ts +0 -4
- package/front_end/core/host/Platform.ts +0 -9
- package/front_end/core/host/UserMetrics.ts +0 -55
- package/front_end/core/root/ExperimentNames.ts +0 -1
- package/front_end/core/sdk/CPUThrottlingManager.ts +1 -1
- package/front_end/core/sdk/CSSMetadata.ts +0 -8
- package/front_end/core/sdk/CSSProperty.ts +1 -5
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +0 -30
- package/front_end/{panels/application → core/sdk}/DOMStorageModel.ts +12 -10
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/entrypoints/main/MainImpl.ts +12 -8
- package/front_end/entrypoints/main/SimpleApp.ts +3 -4
- package/front_end/entrypoints/main/main-meta.ts +1 -1
- package/front_end/generated/InspectorBackendCommands.ts +3 -3
- package/front_end/generated/SupportedCSSProperties.js +21 -21
- package/front_end/generated/protocol.ts +4 -1
- package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +6 -2
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +10 -2
- package/front_end/models/ai_code_generation/AiCodeGeneration.ts +5 -1
- package/front_end/models/issues_manager/CookieIssue.ts +0 -4
- package/front_end/models/issues_manager/RelatedIssue.ts +0 -14
- package/front_end/models/javascript_metadata/NativeFunctions.js +4 -0
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +4 -0
- package/front_end/models/trace/insights/FontDisplay.ts +4 -0
- package/front_end/models/trace/insights/LegacyJavaScript.ts +4 -0
- package/front_end/models/workspace/IgnoreListManager.ts +1 -1
- package/front_end/models/workspace/UISourceCode.ts +10 -5
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +26 -9
- package/front_end/panels/application/ApplicationPanelSidebar.ts +32 -42
- package/front_end/panels/application/BackForwardCacheTreeElement.ts +2 -2
- package/front_end/panels/application/BounceTrackingMitigationsTreeElement.ts +2 -2
- package/front_end/panels/application/DOMStorageItemsView.ts +18 -13
- package/front_end/panels/application/InterestGroupTreeElement.ts +2 -2
- package/front_end/panels/application/ReportingApiTreeElement.ts +3 -3
- package/front_end/panels/application/ResourcesPanel.ts +1 -2
- package/front_end/panels/application/ServiceWorkerCacheTreeElement.ts +1 -2
- package/front_end/panels/application/StorageView.ts +1 -2
- package/front_end/panels/application/TrustTokensTreeElement.ts +2 -2
- package/front_end/panels/application/WebMCPTreeElement.ts +2 -2
- package/front_end/panels/application/application.ts +0 -2
- package/front_end/panels/console/ConsolePrompt.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +3 -4
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +0 -152
- package/front_end/panels/elements/ElementsTreeElement.ts +4 -9
- package/front_end/panels/elements/StylePropertiesSection.ts +0 -61
- package/front_end/panels/elements/StylePropertyTreeElement.ts +1 -21
- package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +6 -4
- package/front_end/panels/elements/StylesSidebarPane.ts +2 -3
- package/front_end/panels/elements/stylesSidebarPane.css +0 -8
- package/front_end/panels/emulation/AdvancedApp.ts +3 -3
- package/front_end/panels/emulation/DeviceModeToolbar.ts +275 -433
- package/front_end/panels/emulation/emulation-meta.ts +1 -1
- package/front_end/panels/network/NetworkPanel.ts +1 -1
- package/front_end/panels/profiler/HeapProfilerPanel.ts +1 -2
- package/front_end/panels/screencast/ScreencastApp.ts +3 -3
- package/front_end/panels/screencast/screencast-meta.ts +1 -2
- package/front_end/panels/settings/SettingsScreen.ts +2 -2
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +2 -4
- package/front_end/panels/sources/SourcesNavigator.ts +1 -1
- package/front_end/panels/sources/UISourceCodeFrame.ts +1 -3
- package/front_end/panels/timeline/TimelinePanel.ts +2 -2
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +12 -4
- package/front_end/panels/timeline/components/insights/DuplicatedJavaScript.ts +4 -0
- package/front_end/panels/timeline/components/insights/FontDisplay.ts +4 -0
- package/front_end/panels/timeline/components/insights/LegacyJavaScript.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/api/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.js +53 -23
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/locators/locators.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +3 -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 +18 -8
- 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/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js +54 -19
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.js +2 -9
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/WebMCP.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/ConnectOptions.d.ts +37 -1
- 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/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 +5 -2
- 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/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ChromeLauncher.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/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +47 -65
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +143 -55
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.js +53 -23
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/locators/locators.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +3 -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 +18 -8
- 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/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js +54 -19
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.js +2 -9
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/WebMCP.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/ConnectOptions.d.ts +37 -1
- 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/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +5 -2
- 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/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ChromeLauncher.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/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +47 -65
- package/front_end/third_party/puppeteer/package/package.json +6 -6
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/api/locators/locators.ts +69 -27
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +27 -8
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserConnector.ts +4 -2
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +6 -0
- package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +60 -18
- package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +7 -9
- package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +3 -0
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +37 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +7 -2
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +19 -14
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +8 -7
- package/front_end/{core/common → ui/legacy}/AppProvider.ts +1 -1
- package/front_end/ui/legacy/InspectorView.ts +4 -3
- package/front_end/ui/legacy/TabbedPane.ts +1 -1
- package/front_end/ui/legacy/UIUserMetrics.ts +70 -0
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +1 -8
- package/front_end/ui/legacy/components/inline_editor/inline_editor.ts +0 -6
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +328 -47
- package/front_end/ui/legacy/legacy.ts +6 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +1 -1
- package/front_end/Images/src/custom-typography.svg +0 -3
- package/front_end/ui/legacy/components/inline_editor/FontEditor.ts +0 -798
- package/front_end/ui/legacy/components/inline_editor/FontEditorUnitConverter.ts +0 -250
- package/front_end/ui/legacy/components/inline_editor/FontEditorUtils.ts +0 -204
- package/front_end/ui/legacy/components/inline_editor/fontEditor.css +0 -185
- /package/front_end/{core/common → ui/legacy}/App.ts +0 -0
|
@@ -111,9 +111,9 @@ Protocol requests/responses dynamically generated by Chrome (like Network condit
|
|
|
111
111
|
|
|
112
112
|
```ts
|
|
113
113
|
const emulateSpy = sinon.spy();
|
|
114
|
-
connection.
|
|
114
|
+
connection.setSuccessHandler('Network.emulateNetworkConditionsByRule', request => {
|
|
115
115
|
emulateSpy(request);
|
|
116
|
-
return {
|
|
116
|
+
return {ruleIds: []};
|
|
117
117
|
});
|
|
118
118
|
|
|
119
119
|
// Matches only the fields you care about, ignoring extra protocol fields
|
|
@@ -247,12 +247,13 @@ export class VersionController {
|
|
|
247
247
|
|
|
248
248
|
updateVersionFrom9To10(): void {
|
|
249
249
|
// This one is localStorage specific, which is fine.
|
|
250
|
-
|
|
250
|
+
const localStorage = Platform.HostRuntime.HOST_RUNTIME.getLocalStorage();
|
|
251
|
+
if (!localStorage) {
|
|
251
252
|
return;
|
|
252
253
|
}
|
|
253
|
-
for (const key in
|
|
254
|
+
for (const key in localStorage) {
|
|
254
255
|
if (key.startsWith('revision-history')) {
|
|
255
|
-
|
|
256
|
+
localStorage.removeItem(key);
|
|
256
257
|
}
|
|
257
258
|
}
|
|
258
259
|
}
|
|
@@ -888,16 +889,17 @@ export class VersionController {
|
|
|
888
889
|
'workspaceExcludedFolders',
|
|
889
890
|
'xhrBreakpoints',
|
|
890
891
|
]);
|
|
891
|
-
|
|
892
|
+
const localStorage = Platform.HostRuntime.HOST_RUNTIME.getLocalStorage();
|
|
893
|
+
if (!localStorage) {
|
|
892
894
|
return;
|
|
893
895
|
}
|
|
894
896
|
|
|
895
|
-
for (const key in
|
|
897
|
+
for (const key in localStorage) {
|
|
896
898
|
if (localSettings.has(key)) {
|
|
897
899
|
continue;
|
|
898
900
|
}
|
|
899
|
-
const value =
|
|
900
|
-
|
|
901
|
+
const value = localStorage[key];
|
|
902
|
+
localStorage.removeItem(key);
|
|
901
903
|
this.#settings.globalStorage.set(key, value);
|
|
902
904
|
}
|
|
903
905
|
}
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
-
import * as App from './App.js';
|
|
6
|
-
import * as AppProvider from './AppProvider.js';
|
|
7
5
|
import * as Base64 from './Base64.js';
|
|
8
6
|
import * as CharacterIdMap from './CharacterIdMap.js';
|
|
9
7
|
import * as Color from './Color.js';
|
|
@@ -43,8 +41,6 @@ import * as VersionController from './VersionController.js';
|
|
|
43
41
|
*/
|
|
44
42
|
export {UIString} from '../platform/platform.js';
|
|
45
43
|
export {
|
|
46
|
-
App,
|
|
47
|
-
AppProvider,
|
|
48
44
|
Base64,
|
|
49
45
|
CharacterIdMap,
|
|
50
46
|
Color,
|
|
@@ -46,15 +46,6 @@ export function setPlatformForTests(platform: string): void {
|
|
|
46
46
|
_isWin = undefined;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
let _isCustomDevtoolsFrontend: boolean;
|
|
50
|
-
|
|
51
|
-
export function isCustomDevtoolsFrontend(): boolean {
|
|
52
|
-
if (typeof _isCustomDevtoolsFrontend === 'undefined') {
|
|
53
|
-
_isCustomDevtoolsFrontend = window.location.toString().startsWith('devtools://devtools/custom/');
|
|
54
|
-
}
|
|
55
|
-
return _isCustomDevtoolsFrontend;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
49
|
let _fontFamily: string;
|
|
59
50
|
|
|
60
51
|
export function fontFamily(): string {
|
|
@@ -6,28 +6,6 @@ import {InspectorFrontendHostInstance} from './InspectorFrontendHost.js';
|
|
|
6
6
|
import {EnumeratedHistogram} from './InspectorFrontendHostAPI.js';
|
|
7
7
|
|
|
8
8
|
export class UserMetrics {
|
|
9
|
-
#panelChangedSinceLaunch: boolean;
|
|
10
|
-
#firedLaunchHistogram: boolean;
|
|
11
|
-
#launchPanelName: string;
|
|
12
|
-
constructor() {
|
|
13
|
-
this.#panelChangedSinceLaunch = false;
|
|
14
|
-
this.#firedLaunchHistogram = false;
|
|
15
|
-
this.#launchPanelName = '';
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
panelShown(panelName: string, isLaunching?: boolean): void {
|
|
19
|
-
const code = PanelCodes[panelName as keyof typeof PanelCodes] || 0;
|
|
20
|
-
InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.PanelShown, code, PanelCodes.MAX_VALUE);
|
|
21
|
-
InspectorFrontendHostInstance.recordUserMetricsAction('DevTools_PanelShown_' + panelName);
|
|
22
|
-
// Store that the user has changed the panel so we know launch histograms should not be fired.
|
|
23
|
-
if (!isLaunching) {
|
|
24
|
-
this.#panelChangedSinceLaunch = true;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
settingsPanelShown(settingsViewId: string): void {
|
|
29
|
-
this.panelShown('settings-' + settingsViewId);
|
|
30
|
-
}
|
|
31
9
|
|
|
32
10
|
sourcesPanelFileDebugged(mediaType?: string): void {
|
|
33
11
|
const code = (mediaType && MediaTypes[mediaType as keyof typeof MediaTypes]) || MediaTypes.Unknown;
|
|
@@ -51,38 +29,6 @@ export class UserMetrics {
|
|
|
51
29
|
InspectorFrontendHostInstance.recordEnumeratedHistogram(EnumeratedHistogram.ActionTaken, action, Action.MAX_VALUE);
|
|
52
30
|
}
|
|
53
31
|
|
|
54
|
-
panelLoaded(panelName: string, histogramName: string): void {
|
|
55
|
-
if (this.#firedLaunchHistogram || panelName !== this.#launchPanelName) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
this.#firedLaunchHistogram = true;
|
|
60
|
-
// Use rAF and window.setTimeout to ensure the marker is fired after layout and rendering.
|
|
61
|
-
// This will give the most accurate representation of the tool being ready for a user.
|
|
62
|
-
requestAnimationFrame(() => {
|
|
63
|
-
window.setTimeout(() => {
|
|
64
|
-
// Mark the load time so that we can pinpoint it more easily in a trace.
|
|
65
|
-
performance.mark(histogramName);
|
|
66
|
-
// If the user has switched panel before we finished loading, ignore the histogram,
|
|
67
|
-
// since the launch timings will have been affected and are no longer valid.
|
|
68
|
-
if (this.#panelChangedSinceLaunch) {
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
// This fires the event for the appropriate launch histogram.
|
|
72
|
-
// The duration is measured as the time elapsed since the time origin of the document.
|
|
73
|
-
InspectorFrontendHostInstance.recordPerformanceHistogram(histogramName, performance.now());
|
|
74
|
-
}, 0);
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
setLaunchPanel(panelName: string|null): void {
|
|
79
|
-
this.#launchPanelName = (panelName as string);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
performanceTraceLoad(measure: PerformanceMeasure): void {
|
|
83
|
-
InspectorFrontendHostInstance.recordPerformanceHistogram('DevTools.TraceLoad', measure.duration);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
32
|
keybindSetSettingChanged(keybindSet: string): void {
|
|
87
33
|
const value = KeybindSetSettings[keybindSet as keyof typeof KeybindSetSettings] || 0;
|
|
88
34
|
InspectorFrontendHostInstance.recordEnumeratedHistogram(
|
|
@@ -815,7 +761,6 @@ export enum DevtoolsExperiments {
|
|
|
815
761
|
'live-heap-profile' = 11,
|
|
816
762
|
'protocol-monitor' = 13,
|
|
817
763
|
'timeline-invalidation-tracking' = 26,
|
|
818
|
-
'font-editor' = 41,
|
|
819
764
|
'instrumentation-breakpoints' = 61,
|
|
820
765
|
'use-source-map-scopes' = 76,
|
|
821
766
|
'timeline-debug-mode' = 93,
|
|
@@ -8,7 +8,6 @@ export enum ExperimentName {
|
|
|
8
8
|
LIVE_HEAP_PROFILE = 'live-heap-profile',
|
|
9
9
|
PROTOCOL_MONITOR = 'protocol-monitor',
|
|
10
10
|
TIMELINE_INVALIDATION_TRACKING = 'timeline-invalidation-tracking',
|
|
11
|
-
FONT_EDITOR = 'font-editor',
|
|
12
11
|
INSTRUMENTATION_BREAKPOINTS = 'instrumentation-breakpoints',
|
|
13
12
|
USE_SOURCE_MAP_SCOPES = 'use-source-map-scopes',
|
|
14
13
|
TIMELINE_DEBUG_MODE = 'timeline-debug-mode',
|
|
@@ -45,7 +45,7 @@ export class CPUThrottlingManager extends Common.ObjectWrapper.ObjectWrapper<Eve
|
|
|
45
45
|
#hardwareConcurrency?: number;
|
|
46
46
|
#pendingMainTargetPromise?: (r: number) => void;
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
constructor(settings: Common.Settings.Settings, targetManager: TargetManager) {
|
|
49
49
|
super();
|
|
50
50
|
this.#targetManager = targetManager;
|
|
51
51
|
this.#cpuThrottlingOption = NoThrottlingOption;
|
|
@@ -233,11 +233,6 @@ export class CSSMetadata {
|
|
|
233
233
|
return bezierAwareProperties.has(propertyName) || this.isCustomProperty(propertyName);
|
|
234
234
|
}
|
|
235
235
|
|
|
236
|
-
isFontAwareProperty(propertyName: string): boolean {
|
|
237
|
-
propertyName = propertyName.toLowerCase();
|
|
238
|
-
return fontAwareProperties.has(propertyName) || this.isCustomProperty(propertyName);
|
|
239
|
-
}
|
|
240
|
-
|
|
241
236
|
isCustomProperty(propertyName: string): boolean {
|
|
242
237
|
return propertyName.startsWith('--');
|
|
243
238
|
}
|
|
@@ -532,9 +527,6 @@ const bezierAwareProperties = new Set<string>([
|
|
|
532
527
|
'-webkit-transition-timing-function',
|
|
533
528
|
]);
|
|
534
529
|
|
|
535
|
-
const fontAwareProperties =
|
|
536
|
-
new Set<string>(['font-size', 'line-height', 'font-weight', 'font-family', 'letter-spacing']);
|
|
537
|
-
|
|
538
530
|
const colorAwareProperties = new Set<string>([
|
|
539
531
|
'accent-color',
|
|
540
532
|
'background',
|
|
@@ -7,7 +7,6 @@ import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
|
7
7
|
import * as Common from '../common/common.js';
|
|
8
8
|
import * as HostModule from '../host/host.js';
|
|
9
9
|
import * as Platform from '../platform/platform.js';
|
|
10
|
-
import * as Root from '../root/root.js';
|
|
11
10
|
|
|
12
11
|
import type {CSSMatchedStyles} from './CSSMatchedStyles.js';
|
|
13
12
|
import {cssMetadata, GridAreaRowRegex} from './CSSMetadata.js';
|
|
@@ -19,7 +18,7 @@ import {
|
|
|
19
18
|
type Matcher,
|
|
20
19
|
stripComments
|
|
21
20
|
} from './CSSPropertyParser.js';
|
|
22
|
-
import {CSSWideKeywordMatcher
|
|
21
|
+
import {CSSWideKeywordMatcher} from './CSSPropertyParserMatchers.js';
|
|
23
22
|
import type {CSSStyleDeclaration} from './CSSStyleDeclaration.js';
|
|
24
23
|
|
|
25
24
|
export const enum Events {
|
|
@@ -115,9 +114,6 @@ export class CSSProperty extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
115
114
|
const matchers = matchedStyles.propertyMatchers(this.ownerStyle, computedStyles);
|
|
116
115
|
|
|
117
116
|
matchers.push(new CSSWideKeywordMatcher(this, matchedStyles));
|
|
118
|
-
if (Root.Runtime.experiments.isEnabled(Root.ExperimentNames.ExperimentName.FONT_EDITOR)) {
|
|
119
|
-
matchers.push(new FontMatcher());
|
|
120
|
-
}
|
|
121
117
|
return matchers;
|
|
122
118
|
}
|
|
123
119
|
|
|
@@ -945,36 +945,6 @@ export class ShadowMatcher extends matcherBase(ShadowMatch) {
|
|
|
945
945
|
}
|
|
946
946
|
}
|
|
947
947
|
|
|
948
|
-
export class FontMatch implements Match {
|
|
949
|
-
constructor(readonly text: string, readonly node: CodeMirror.SyntaxNode) {
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
// clang-format off
|
|
954
|
-
export class FontMatcher extends matcherBase(FontMatch) {
|
|
955
|
-
// clang-format on
|
|
956
|
-
override accepts(propertyName: string): boolean {
|
|
957
|
-
return cssMetadata().isFontAwareProperty(propertyName);
|
|
958
|
-
}
|
|
959
|
-
override matches(node: CodeMirror.SyntaxNode, matching: BottomUpTreeMatching): Match|null {
|
|
960
|
-
if (node.name !== 'Declaration') {
|
|
961
|
-
return null;
|
|
962
|
-
}
|
|
963
|
-
const valueNodes = ASTUtils.siblings(ASTUtils.declValue(node));
|
|
964
|
-
if (valueNodes.length === 0) {
|
|
965
|
-
return null;
|
|
966
|
-
}
|
|
967
|
-
const validNodes = matching.ast.propertyName === 'font-family' ? ['ValueName', 'StringLiteral', 'Comment', ','] :
|
|
968
|
-
['Comment', 'ValueName', 'NumberLiteral'];
|
|
969
|
-
|
|
970
|
-
if (valueNodes.some(node => !validNodes.includes(node.name))) {
|
|
971
|
-
return null;
|
|
972
|
-
}
|
|
973
|
-
const valueText = matching.ast.textRange(valueNodes[0], valueNodes[valueNodes.length - 1]);
|
|
974
|
-
return new FontMatch(valueText, node);
|
|
975
|
-
}
|
|
976
|
-
}
|
|
977
|
-
|
|
978
948
|
export class LengthMatch implements Match {
|
|
979
949
|
constructor(readonly text: string, readonly node: CodeMirror.SyntaxNode, readonly unit: string) {
|
|
980
950
|
}
|
|
@@ -31,10 +31,13 @@
|
|
|
31
31
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
|
-
import * as Common from '../../core/common/common.js';
|
|
35
|
-
import * as SDK from '../../core/sdk/sdk.js';
|
|
36
34
|
import type * as ProtocolProxyApi from '../../generated/protocol-proxy-api.js';
|
|
37
35
|
import type * as Protocol from '../../generated/protocol.js';
|
|
36
|
+
import * as Common from '../common/common.js';
|
|
37
|
+
|
|
38
|
+
import {SDKModel} from './SDKModel.js';
|
|
39
|
+
import * as StorageKeyManager from './StorageKeyManager.js';
|
|
40
|
+
import {Capability, type Target} from './Target.js';
|
|
38
41
|
|
|
39
42
|
export class DOMStorage extends Common.ObjectWrapper.ObjectWrapper<DOMStorage.EventTypes> {
|
|
40
43
|
private readonly model: DOMStorageModel;
|
|
@@ -112,16 +115,16 @@ export namespace DOMStorage {
|
|
|
112
115
|
}
|
|
113
116
|
}
|
|
114
117
|
|
|
115
|
-
export class DOMStorageModel extends
|
|
116
|
-
readonly #storageKeyManager:
|
|
118
|
+
export class DOMStorageModel extends SDKModel<EventTypes> {
|
|
119
|
+
readonly #storageKeyManager: StorageKeyManager.StorageKeyManager|null;
|
|
117
120
|
#storages: Record<string, DOMStorage>;
|
|
118
121
|
readonly agent: ProtocolProxyApi.DOMStorageApi;
|
|
119
122
|
private enabled?: boolean;
|
|
120
123
|
|
|
121
|
-
constructor(target:
|
|
124
|
+
constructor(target: Target) {
|
|
122
125
|
super(target);
|
|
123
126
|
|
|
124
|
-
this.#storageKeyManager = target.model(
|
|
127
|
+
this.#storageKeyManager = target.model(StorageKeyManager.StorageKeyManager);
|
|
125
128
|
this.#storages = {};
|
|
126
129
|
this.agent = target.domstorageAgent();
|
|
127
130
|
}
|
|
@@ -133,10 +136,9 @@ export class DOMStorageModel extends SDK.SDKModel.SDKModel<EventTypes> {
|
|
|
133
136
|
|
|
134
137
|
this.target().registerDOMStorageDispatcher(new DOMStorageDispatcher(this));
|
|
135
138
|
if (this.#storageKeyManager) {
|
|
139
|
+
this.#storageKeyManager.addEventListener(StorageKeyManager.Events.STORAGE_KEY_ADDED, this.storageKeyAdded, this);
|
|
136
140
|
this.#storageKeyManager.addEventListener(
|
|
137
|
-
|
|
138
|
-
this.#storageKeyManager.addEventListener(
|
|
139
|
-
SDK.StorageKeyManager.Events.STORAGE_KEY_REMOVED, this.storageKeyRemoved, this);
|
|
141
|
+
StorageKeyManager.Events.STORAGE_KEY_REMOVED, this.storageKeyRemoved, this);
|
|
140
142
|
|
|
141
143
|
for (const storageKey of this.#storageKeyManager.storageKeys()) {
|
|
142
144
|
this.addStorageKey(storageKey);
|
|
@@ -250,7 +252,7 @@ export class DOMStorageModel extends SDK.SDKModel.SDKModel<EventTypes> {
|
|
|
250
252
|
}
|
|
251
253
|
}
|
|
252
254
|
|
|
253
|
-
|
|
255
|
+
SDKModel.register(DOMStorageModel, {capabilities: Capability.DOM_STORAGE, autostart: false});
|
|
254
256
|
|
|
255
257
|
export const enum Events {
|
|
256
258
|
DOM_STORAGE_ADDED = 'DOMStorageAdded',
|
|
@@ -44,6 +44,7 @@ import * as CSSSupports from './CSSSupports.js';
|
|
|
44
44
|
import * as DebuggerModel from './DebuggerModel.js';
|
|
45
45
|
import * as DOMDebuggerModel from './DOMDebuggerModel.js';
|
|
46
46
|
import * as DOMModel from './DOMModel.js';
|
|
47
|
+
import * as DOMStorageModel from './DOMStorageModel.js';
|
|
47
48
|
import * as EmulationModel from './EmulationModel.js';
|
|
48
49
|
import * as EnhancedTracesParser from './EnhancedTracesParser.js';
|
|
49
50
|
import * as EventBreakpointsModel from './EventBreakpointsModel.js';
|
|
@@ -128,6 +129,7 @@ export {
|
|
|
128
129
|
DebuggerModel,
|
|
129
130
|
DOMDebuggerModel,
|
|
130
131
|
DOMModel,
|
|
132
|
+
DOMStorageModel,
|
|
131
133
|
EmulationModel,
|
|
132
134
|
EnhancedTracesParser,
|
|
133
135
|
EventBreakpointsModel,
|
|
@@ -149,6 +149,15 @@ const WINDOW_LOCAL_STORAGE: Common.Settings.SettingsBackingStore = {
|
|
|
149
149
|
clear: () => window.localStorage.clear(),
|
|
150
150
|
};
|
|
151
151
|
|
|
152
|
+
let isCustomDevtoolsFrontendInternal: boolean;
|
|
153
|
+
|
|
154
|
+
function isCustomDevtoolsFrontend(): boolean {
|
|
155
|
+
if (typeof isCustomDevtoolsFrontendInternal === 'undefined') {
|
|
156
|
+
isCustomDevtoolsFrontendInternal = window.location.toString().startsWith('devtools://devtools/custom/');
|
|
157
|
+
}
|
|
158
|
+
return isCustomDevtoolsFrontendInternal;
|
|
159
|
+
}
|
|
160
|
+
|
|
152
161
|
export class MainImpl {
|
|
153
162
|
#readyForTestPromise = Promise.withResolvers<void>();
|
|
154
163
|
#veStartPromise!: Promise<void>;
|
|
@@ -285,7 +294,7 @@ export class MainImpl {
|
|
|
285
294
|
} {
|
|
286
295
|
this.#initializeExperiments();
|
|
287
296
|
let storagePrefix = '';
|
|
288
|
-
if (
|
|
297
|
+
if (isCustomDevtoolsFrontend()) {
|
|
289
298
|
storagePrefix = '__custom__';
|
|
290
299
|
} else if (
|
|
291
300
|
!Root.Runtime.Runtime.queryParam('can_dock') && Boolean(Root.Runtime.Runtime.queryParam('debugFrontend')) &&
|
|
@@ -370,11 +379,6 @@ export class MainImpl {
|
|
|
370
379
|
Root.Runtime.experiments.register(
|
|
371
380
|
Root.ExperimentNames.ExperimentName.USE_SOURCE_MAP_SCOPES, 'Use scope information from source maps');
|
|
372
381
|
|
|
373
|
-
// Font Editor
|
|
374
|
-
Root.Runtime.experiments.register(
|
|
375
|
-
Root.ExperimentNames.ExperimentName.FONT_EDITOR, 'New font editor in the Styles tab',
|
|
376
|
-
'https://developer.chrome.com/blog/new-in-devtools-89/#font');
|
|
377
|
-
|
|
378
382
|
Root.Runtime.experiments.registerHostExperiment({
|
|
379
383
|
name: Root.ExperimentNames.ExperimentName.DURABLE_MESSAGES,
|
|
380
384
|
title: 'Durable Messages',
|
|
@@ -563,7 +567,7 @@ export class MainImpl {
|
|
|
563
567
|
|
|
564
568
|
MainImpl.timeEnd('Main._createAppUI');
|
|
565
569
|
|
|
566
|
-
const appProvider =
|
|
570
|
+
const appProvider = UI.AppProvider.getRegisteredAppProviders()[0];
|
|
567
571
|
if (!appProvider) {
|
|
568
572
|
throw new Error('Unable to boot DevTools, as the appprovider is missing');
|
|
569
573
|
}
|
|
@@ -572,7 +576,7 @@ export class MainImpl {
|
|
|
572
576
|
|
|
573
577
|
async #showAppUI(appProvider: Object): Promise<void> {
|
|
574
578
|
MainImpl.time('Main._showAppUI');
|
|
575
|
-
const app = (appProvider as
|
|
579
|
+
const app = (appProvider as UI.AppProvider.AppProvider).createApp();
|
|
576
580
|
// It is important to kick controller lifetime after apps are instantiated.
|
|
577
581
|
UI.DockController.DockController.instance().initialize();
|
|
578
582
|
ThemeSupport.ThemeSupport.instance().fetchColorsAndApplyHostTheme();
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
-
import type * as Common from '../../core/common/common.js';
|
|
6
5
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
7
6
|
|
|
8
|
-
export class SimpleApp implements
|
|
7
|
+
export class SimpleApp implements UI.App.App {
|
|
9
8
|
presentUI(document: Document): void {
|
|
10
9
|
const rootView = new UI.RootView.RootView();
|
|
11
10
|
UI.InspectorView.InspectorView.instance().show(rootView.element);
|
|
@@ -16,7 +15,7 @@ export class SimpleApp implements Common.App.App {
|
|
|
16
15
|
|
|
17
16
|
let simpleAppProviderInstance: SimpleAppProvider;
|
|
18
17
|
|
|
19
|
-
export class SimpleAppProvider implements
|
|
18
|
+
export class SimpleAppProvider implements UI.AppProvider.AppProvider {
|
|
20
19
|
static instance(opts: {
|
|
21
20
|
forceNew: boolean|null,
|
|
22
21
|
} = {forceNew: null}): SimpleAppProvider {
|
|
@@ -28,7 +27,7 @@ export class SimpleAppProvider implements Common.AppProvider.AppProvider {
|
|
|
28
27
|
return simpleAppProviderInstance;
|
|
29
28
|
}
|
|
30
29
|
|
|
31
|
-
createApp():
|
|
30
|
+
createApp(): UI.App.App {
|
|
32
31
|
return new SimpleApp();
|
|
33
32
|
}
|
|
34
33
|
}
|
|
@@ -946,7 +946,7 @@ UI.Toolbar.registerToolbarItem({
|
|
|
946
946
|
location: UI.Toolbar.ToolbarItemLocation.MAIN_TOOLBAR_RIGHT,
|
|
947
947
|
});
|
|
948
948
|
|
|
949
|
-
|
|
949
|
+
UI.AppProvider.registerAppProvider({
|
|
950
950
|
async loadAppProvider() {
|
|
951
951
|
const Main = await loadMainModule();
|
|
952
952
|
return Main.SimpleApp.SimpleAppProvider.instance();
|
|
@@ -231,7 +231,7 @@ inspectorBackend.registerType("Browser.Histogram", [{"name": "name", "type": "st
|
|
|
231
231
|
inspectorBackend.registerEnum("CSS.StyleSheetOrigin", {Injected: "injected", UserAgent: "user-agent", Inspector: "inspector", Regular: "regular"});
|
|
232
232
|
inspectorBackend.registerEnum("CSS.CSSRuleType", {MediaRule: "MediaRule", SupportsRule: "SupportsRule", ContainerRule: "ContainerRule", LayerRule: "LayerRule", ScopeRule: "ScopeRule", StyleRule: "StyleRule", StartingStyleRule: "StartingStyleRule", NavigationRule: "NavigationRule"});
|
|
233
233
|
inspectorBackend.registerEnum("CSS.CSSMediaSource", {MediaRule: "mediaRule", ImportRule: "importRule", LinkedSheet: "linkedSheet", InlineSheet: "inlineSheet"});
|
|
234
|
-
inspectorBackend.registerEnum("CSS.CSSAtRuleType", {FontFace: "font-face", FontFeatureValues: "font-feature-values", FontPaletteValues: "font-palette-values"});
|
|
234
|
+
inspectorBackend.registerEnum("CSS.CSSAtRuleType", {FontFace: "font-face", FontFeatureValues: "font-feature-values", FontPaletteValues: "font-palette-values", CounterStyle: "counter-style"});
|
|
235
235
|
inspectorBackend.registerEnum("CSS.CSSAtRuleSubsection", {Swash: "swash", Annotation: "annotation", Ornaments: "ornaments", Stylistic: "stylistic", Styleset: "styleset", CharacterVariant: "character-variant"});
|
|
236
236
|
inspectorBackend.registerEvent("CSS.fontsUpdated", ["font"]);
|
|
237
237
|
inspectorBackend.registerEvent("CSS.mediaQueryResultChanged", []);
|
|
@@ -807,8 +807,8 @@ inspectorBackend.registerEnum("Network.ContentSecurityPolicySource", {HTTP: "HTT
|
|
|
807
807
|
inspectorBackend.registerEnum("Network.ReportStatus", {Queued: "Queued", Pending: "Pending", MarkedForRemoval: "MarkedForRemoval", Success: "Success"});
|
|
808
808
|
inspectorBackend.registerEnum("Network.DeviceBoundSessionWithUsageUsage", {NotInScope: "NotInScope", InScopeRefreshNotYetNeeded: "InScopeRefreshNotYetNeeded", InScopeRefreshNotAllowed: "InScopeRefreshNotAllowed", ProactiveRefreshNotPossible: "ProactiveRefreshNotPossible", ProactiveRefreshAttempted: "ProactiveRefreshAttempted", Deferred: "Deferred"});
|
|
809
809
|
inspectorBackend.registerEnum("Network.DeviceBoundSessionUrlRuleRuleType", {Exclude: "Exclude", Include: "Include"});
|
|
810
|
-
inspectorBackend.registerEnum("Network.DeviceBoundSessionFetchResult", {Success: "Success", KeyError: "KeyError", SigningError: "SigningError", ServerRequestedTermination: "ServerRequestedTermination", InvalidSessionId: "InvalidSessionId", InvalidChallenge: "InvalidChallenge", TooManyChallenges: "TooManyChallenges", InvalidFetcherUrl: "InvalidFetcherUrl", InvalidRefreshUrl: "InvalidRefreshUrl", TransientHttpError: "TransientHttpError", ScopeOriginSameSiteMismatch: "ScopeOriginSameSiteMismatch", RefreshUrlSameSiteMismatch: "RefreshUrlSameSiteMismatch", MismatchedSessionId: "MismatchedSessionId", MissingScope: "MissingScope", NoCredentials: "NoCredentials", SubdomainRegistrationWellKnownUnavailable: "SubdomainRegistrationWellKnownUnavailable", SubdomainRegistrationUnauthorized: "SubdomainRegistrationUnauthorized", SubdomainRegistrationWellKnownMalformed: "SubdomainRegistrationWellKnownMalformed", SessionProviderWellKnownUnavailable: "SessionProviderWellKnownUnavailable", RelyingPartyWellKnownUnavailable: "RelyingPartyWellKnownUnavailable", FederatedKeyThumbprintMismatch: "FederatedKeyThumbprintMismatch", InvalidFederatedSessionUrl: "InvalidFederatedSessionUrl", InvalidFederatedKey: "InvalidFederatedKey", TooManyRelyingOriginLabels: "TooManyRelyingOriginLabels", BoundCookieSetForbidden: "BoundCookieSetForbidden", NetError: "NetError", ProxyError: "ProxyError", EmptySessionConfig: "EmptySessionConfig", InvalidCredentialsConfig: "InvalidCredentialsConfig", InvalidCredentialsType: "InvalidCredentialsType", InvalidCredentialsEmptyName: "InvalidCredentialsEmptyName", InvalidCredentialsCookie: "InvalidCredentialsCookie", PersistentHttpError: "PersistentHttpError", RegistrationAttemptedChallenge: "RegistrationAttemptedChallenge", InvalidScopeOrigin: "InvalidScopeOrigin", ScopeOriginContainsPath: "ScopeOriginContainsPath", RefreshInitiatorNotString: "RefreshInitiatorNotString", RefreshInitiatorInvalidHostPattern: "RefreshInitiatorInvalidHostPattern", InvalidScopeSpecification: "InvalidScopeSpecification", MissingScopeSpecificationType: "MissingScopeSpecificationType", EmptyScopeSpecificationDomain: "EmptyScopeSpecificationDomain", EmptyScopeSpecificationPath: "EmptyScopeSpecificationPath", InvalidScopeSpecificationType: "InvalidScopeSpecificationType", InvalidScopeIncludeSite: "InvalidScopeIncludeSite", MissingScopeIncludeSite: "MissingScopeIncludeSite", FederatedNotAuthorizedByProvider: "FederatedNotAuthorizedByProvider", FederatedNotAuthorizedByRelyingParty: "FederatedNotAuthorizedByRelyingParty", SessionProviderWellKnownMalformed: "SessionProviderWellKnownMalformed", SessionProviderWellKnownHasProviderOrigin: "SessionProviderWellKnownHasProviderOrigin", RelyingPartyWellKnownMalformed: "RelyingPartyWellKnownMalformed", RelyingPartyWellKnownHasRelyingOrigins: "RelyingPartyWellKnownHasRelyingOrigins", InvalidFederatedSessionProviderSessionMissing: "InvalidFederatedSessionProviderSessionMissing", InvalidFederatedSessionWrongProviderOrigin: "InvalidFederatedSessionWrongProviderOrigin", InvalidCredentialsCookieCreationTime: "InvalidCredentialsCookieCreationTime", InvalidCredentialsCookieName: "InvalidCredentialsCookieName", InvalidCredentialsCookieParsing: "InvalidCredentialsCookieParsing", InvalidCredentialsCookieUnpermittedAttribute: "InvalidCredentialsCookieUnpermittedAttribute", InvalidCredentialsCookieInvalidDomain: "InvalidCredentialsCookieInvalidDomain", InvalidCredentialsCookiePrefix: "InvalidCredentialsCookiePrefix", InvalidScopeRulePath: "InvalidScopeRulePath", InvalidScopeRuleHostPattern: "InvalidScopeRuleHostPattern", ScopeRuleOriginScopedHostPatternMismatch: "ScopeRuleOriginScopedHostPatternMismatch", ScopeRuleSiteScopedHostPatternMismatch: "ScopeRuleSiteScopedHostPatternMismatch", SigningQuotaExceeded: "SigningQuotaExceeded", InvalidConfigJson: "InvalidConfigJson", InvalidFederatedSessionProviderFailedToRestoreKey: "InvalidFederatedSessionProviderFailedToRestoreKey", FailedToUnwrapKey: "FailedToUnwrapKey", SessionDeletedDuringRefresh: "SessionDeletedDuringRefresh"});
|
|
811
|
-
inspectorBackend.registerEnum("Network.RefreshEventDetailsRefreshResult", {Refreshed: "Refreshed",
|
|
810
|
+
inspectorBackend.registerEnum("Network.DeviceBoundSessionFetchResult", {Success: "Success", KeyError: "KeyError", SigningError: "SigningError", TransientSigningError: "TransientSigningError", ServerRequestedTermination: "ServerRequestedTermination", InvalidSessionId: "InvalidSessionId", InvalidChallenge: "InvalidChallenge", TooManyChallenges: "TooManyChallenges", InvalidFetcherUrl: "InvalidFetcherUrl", InvalidRefreshUrl: "InvalidRefreshUrl", TransientHttpError: "TransientHttpError", ScopeOriginSameSiteMismatch: "ScopeOriginSameSiteMismatch", RefreshUrlSameSiteMismatch: "RefreshUrlSameSiteMismatch", MismatchedSessionId: "MismatchedSessionId", MissingScope: "MissingScope", NoCredentials: "NoCredentials", SubdomainRegistrationWellKnownUnavailable: "SubdomainRegistrationWellKnownUnavailable", SubdomainRegistrationUnauthorized: "SubdomainRegistrationUnauthorized", SubdomainRegistrationWellKnownMalformed: "SubdomainRegistrationWellKnownMalformed", SessionProviderWellKnownUnavailable: "SessionProviderWellKnownUnavailable", RelyingPartyWellKnownUnavailable: "RelyingPartyWellKnownUnavailable", FederatedKeyThumbprintMismatch: "FederatedKeyThumbprintMismatch", InvalidFederatedSessionUrl: "InvalidFederatedSessionUrl", InvalidFederatedKey: "InvalidFederatedKey", TooManyRelyingOriginLabels: "TooManyRelyingOriginLabels", BoundCookieSetForbidden: "BoundCookieSetForbidden", NetError: "NetError", ProxyError: "ProxyError", EmptySessionConfig: "EmptySessionConfig", InvalidCredentialsConfig: "InvalidCredentialsConfig", InvalidCredentialsType: "InvalidCredentialsType", InvalidCredentialsEmptyName: "InvalidCredentialsEmptyName", InvalidCredentialsCookie: "InvalidCredentialsCookie", PersistentHttpError: "PersistentHttpError", RegistrationAttemptedChallenge: "RegistrationAttemptedChallenge", InvalidScopeOrigin: "InvalidScopeOrigin", ScopeOriginContainsPath: "ScopeOriginContainsPath", RefreshInitiatorNotString: "RefreshInitiatorNotString", RefreshInitiatorInvalidHostPattern: "RefreshInitiatorInvalidHostPattern", InvalidScopeSpecification: "InvalidScopeSpecification", MissingScopeSpecificationType: "MissingScopeSpecificationType", EmptyScopeSpecificationDomain: "EmptyScopeSpecificationDomain", EmptyScopeSpecificationPath: "EmptyScopeSpecificationPath", InvalidScopeSpecificationType: "InvalidScopeSpecificationType", InvalidScopeIncludeSite: "InvalidScopeIncludeSite", MissingScopeIncludeSite: "MissingScopeIncludeSite", FederatedNotAuthorizedByProvider: "FederatedNotAuthorizedByProvider", FederatedNotAuthorizedByRelyingParty: "FederatedNotAuthorizedByRelyingParty", SessionProviderWellKnownMalformed: "SessionProviderWellKnownMalformed", SessionProviderWellKnownHasProviderOrigin: "SessionProviderWellKnownHasProviderOrigin", RelyingPartyWellKnownMalformed: "RelyingPartyWellKnownMalformed", RelyingPartyWellKnownHasRelyingOrigins: "RelyingPartyWellKnownHasRelyingOrigins", InvalidFederatedSessionProviderSessionMissing: "InvalidFederatedSessionProviderSessionMissing", InvalidFederatedSessionWrongProviderOrigin: "InvalidFederatedSessionWrongProviderOrigin", InvalidCredentialsCookieCreationTime: "InvalidCredentialsCookieCreationTime", InvalidCredentialsCookieName: "InvalidCredentialsCookieName", InvalidCredentialsCookieParsing: "InvalidCredentialsCookieParsing", InvalidCredentialsCookieUnpermittedAttribute: "InvalidCredentialsCookieUnpermittedAttribute", InvalidCredentialsCookieInvalidDomain: "InvalidCredentialsCookieInvalidDomain", InvalidCredentialsCookiePrefix: "InvalidCredentialsCookiePrefix", InvalidScopeRulePath: "InvalidScopeRulePath", InvalidScopeRuleHostPattern: "InvalidScopeRuleHostPattern", ScopeRuleOriginScopedHostPatternMismatch: "ScopeRuleOriginScopedHostPatternMismatch", ScopeRuleSiteScopedHostPatternMismatch: "ScopeRuleSiteScopedHostPatternMismatch", SigningQuotaExceeded: "SigningQuotaExceeded", InvalidConfigJson: "InvalidConfigJson", InvalidFederatedSessionProviderFailedToRestoreKey: "InvalidFederatedSessionProviderFailedToRestoreKey", FailedToUnwrapKey: "FailedToUnwrapKey", SessionDeletedDuringRefresh: "SessionDeletedDuringRefresh"});
|
|
811
|
+
inspectorBackend.registerEnum("Network.RefreshEventDetailsRefreshResult", {Refreshed: "Refreshed", InitializedService: "InitializedService", Unreachable: "Unreachable", ServerError: "ServerError", RefreshQuotaExceeded: "RefreshQuotaExceeded", FatalError: "FatalError", SigningQuotaExceeded: "SigningQuotaExceeded", RefreshedAsWaiter: "RefreshedAsWaiter", TransientSigningError: "TransientSigningError"});
|
|
812
812
|
inspectorBackend.registerEnum("Network.TerminationEventDetailsDeletionReason", {Expired: "Expired", FailedToRestoreKey: "FailedToRestoreKey", FailedToUnwrapKey: "FailedToUnwrapKey", StoragePartitionCleared: "StoragePartitionCleared", ClearBrowsingData: "ClearBrowsingData", ServerRequested: "ServerRequested", InvalidSessionParams: "InvalidSessionParams", RefreshFatalError: "RefreshFatalError", DevTools: "DevTools"});
|
|
813
813
|
inspectorBackend.registerEnum("Network.ChallengeEventDetailsChallengeResult", {Success: "Success", NoSessionId: "NoSessionId", NoSessionMatch: "NoSessionMatch", CantSetBoundCookie: "CantSetBoundCookie"});
|
|
814
814
|
inspectorBackend.registerEvent("Network.dataReceived", ["requestId", "timestamp", "dataLength", "encodedDataLength", "data"]);
|
|
@@ -1951,6 +1951,22 @@ export const generatedProperties = [
|
|
|
1951
1951
|
],
|
|
1952
1952
|
"name": "continue"
|
|
1953
1953
|
},
|
|
1954
|
+
{
|
|
1955
|
+
"keywords": [
|
|
1956
|
+
"normal"
|
|
1957
|
+
],
|
|
1958
|
+
"longhands": [
|
|
1959
|
+
"border-top-left-radius",
|
|
1960
|
+
"corner-top-left-shape",
|
|
1961
|
+
"border-top-right-radius",
|
|
1962
|
+
"corner-top-right-shape",
|
|
1963
|
+
"border-bottom-right-radius",
|
|
1964
|
+
"corner-bottom-right-shape",
|
|
1965
|
+
"border-bottom-left-radius",
|
|
1966
|
+
"corner-bottom-left-shape"
|
|
1967
|
+
],
|
|
1968
|
+
"name": "corner"
|
|
1969
|
+
},
|
|
1954
1970
|
{
|
|
1955
1971
|
"longhands": [
|
|
1956
1972
|
"corner-end-start-shape",
|
|
@@ -2072,22 +2088,6 @@ export const generatedProperties = [
|
|
|
2072
2088
|
],
|
|
2073
2089
|
"name": "corner-top-shape"
|
|
2074
2090
|
},
|
|
2075
|
-
{
|
|
2076
|
-
"keywords": [
|
|
2077
|
-
"normal"
|
|
2078
|
-
],
|
|
2079
|
-
"longhands": [
|
|
2080
|
-
"border-top-left-radius",
|
|
2081
|
-
"corner-top-left-shape",
|
|
2082
|
-
"border-top-right-radius",
|
|
2083
|
-
"corner-top-right-shape",
|
|
2084
|
-
"border-bottom-right-radius",
|
|
2085
|
-
"corner-bottom-right-shape",
|
|
2086
|
-
"border-bottom-left-radius",
|
|
2087
|
-
"corner-bottom-left-shape"
|
|
2088
|
-
],
|
|
2089
|
-
"name": "corners"
|
|
2090
|
-
},
|
|
2091
2091
|
{
|
|
2092
2092
|
"keywords": [
|
|
2093
2093
|
"none"
|
|
@@ -5772,6 +5772,11 @@ export const generatedPropertyValues = {
|
|
|
5772
5772
|
"-webkit-legacy"
|
|
5773
5773
|
]
|
|
5774
5774
|
},
|
|
5775
|
+
"corner": {
|
|
5776
|
+
"values": [
|
|
5777
|
+
"normal"
|
|
5778
|
+
]
|
|
5779
|
+
},
|
|
5775
5780
|
"corner-bottom-left-shape": {
|
|
5776
5781
|
"values": [
|
|
5777
5782
|
"notch",
|
|
@@ -5812,11 +5817,6 @@ export const generatedPropertyValues = {
|
|
|
5812
5817
|
"square"
|
|
5813
5818
|
]
|
|
5814
5819
|
},
|
|
5815
|
-
"corners": {
|
|
5816
|
-
"values": [
|
|
5817
|
-
"normal"
|
|
5818
|
-
]
|
|
5819
|
-
},
|
|
5820
5820
|
"counter-increment": {
|
|
5821
5821
|
"values": [
|
|
5822
5822
|
"none"
|
|
@@ -3557,6 +3557,7 @@ export namespace CSS {
|
|
|
3557
3557
|
FontFace = 'font-face',
|
|
3558
3558
|
FontFeatureValues = 'font-feature-values',
|
|
3559
3559
|
FontPaletteValues = 'font-palette-values',
|
|
3560
|
+
CounterStyle = 'counter-style',
|
|
3560
3561
|
}
|
|
3561
3562
|
|
|
3562
3563
|
export const enum CSSAtRuleSubsection {
|
|
@@ -11813,6 +11814,7 @@ export namespace Network {
|
|
|
11813
11814
|
Success = 'Success',
|
|
11814
11815
|
KeyError = 'KeyError',
|
|
11815
11816
|
SigningError = 'SigningError',
|
|
11817
|
+
TransientSigningError = 'TransientSigningError',
|
|
11816
11818
|
ServerRequestedTermination = 'ServerRequestedTermination',
|
|
11817
11819
|
InvalidSessionId = 'InvalidSessionId',
|
|
11818
11820
|
InvalidChallenge = 'InvalidChallenge',
|
|
@@ -11926,13 +11928,14 @@ export namespace Network {
|
|
|
11926
11928
|
|
|
11927
11929
|
export const enum RefreshEventDetailsRefreshResult {
|
|
11928
11930
|
Refreshed = 'Refreshed',
|
|
11929
|
-
RefreshedAsWaiter = 'RefreshedAsWaiter',
|
|
11930
11931
|
InitializedService = 'InitializedService',
|
|
11931
11932
|
Unreachable = 'Unreachable',
|
|
11932
11933
|
ServerError = 'ServerError',
|
|
11933
11934
|
RefreshQuotaExceeded = 'RefreshQuotaExceeded',
|
|
11934
11935
|
FatalError = 'FatalError',
|
|
11935
11936
|
SigningQuotaExceeded = 'SigningQuotaExceeded',
|
|
11937
|
+
RefreshedAsWaiter = 'RefreshedAsWaiter',
|
|
11938
|
+
TransientSigningError = 'TransientSigningError',
|
|
11936
11939
|
}
|
|
11937
11940
|
|
|
11938
11941
|
/**
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import type * as SDK from '../../../core/sdk/sdk.js';
|
|
6
|
-
import
|
|
6
|
+
import * as Protocol from '../../../generated/protocol.js';
|
|
7
7
|
import * as Annotations from '../../annotations/annotations.js';
|
|
8
8
|
import * as Logs from '../../logs/logs.js';
|
|
9
9
|
import * as NetworkTimeCalculator from '../../network_time_calculator/network_time_calculator.js';
|
|
@@ -115,7 +115,11 @@ export class NetworkRequestFormatter {
|
|
|
115
115
|
}): string {
|
|
116
116
|
const lines = [];
|
|
117
117
|
if (reasons.blockedReason) {
|
|
118
|
-
|
|
118
|
+
if (reasons.blockedReason === Protocol.Network.BlockedReason.Inspector) {
|
|
119
|
+
lines.push('Blocked reason: a custom network condition in DevTools is blocking this request');
|
|
120
|
+
} else {
|
|
121
|
+
lines.push(`Blocked reason: ${reasons.blockedReason}`);
|
|
122
|
+
}
|
|
119
123
|
}
|
|
120
124
|
if (reasons.corsErrorStatus) {
|
|
121
125
|
lines.push(`CORS error: ${reasons.corsErrorStatus.corsError} ${reasons.corsErrorStatus.failedParameter}`);
|
|
@@ -352,6 +352,10 @@ export class AiCodeCompletion {
|
|
|
352
352
|
this.#callbacks?.setAiAutoCompletion(null);
|
|
353
353
|
}
|
|
354
354
|
|
|
355
|
+
static isAiCodeCompletionAvailable(): boolean {
|
|
356
|
+
return Root.Runtime.hostConfig.devToolsAiCodeCompletion?.enabled ?? false;
|
|
357
|
+
}
|
|
358
|
+
|
|
355
359
|
static isAiCodeCompletionEnabled(locale: string): boolean {
|
|
356
360
|
if (!locale.startsWith('en-')) {
|
|
357
361
|
return false;
|
|
@@ -361,7 +365,11 @@ export class AiCodeCompletion {
|
|
|
361
365
|
aidaAvailability.blockedByEnterprisePolicy) {
|
|
362
366
|
return false;
|
|
363
367
|
}
|
|
364
|
-
return Boolean(aidaAvailability.enabled &&
|
|
368
|
+
return Boolean(aidaAvailability.enabled && AiCodeCompletion.isAiCodeCompletionAvailable());
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
static isAiCodeCompletionStylesAvailable(): boolean {
|
|
372
|
+
return Root.Runtime.hostConfig.devToolsAiCodeCompletionStyles?.enabled ?? false;
|
|
365
373
|
}
|
|
366
374
|
|
|
367
375
|
static isAiCodeCompletionStylesEnabled(locale: string): boolean {
|
|
@@ -373,7 +381,7 @@ export class AiCodeCompletion {
|
|
|
373
381
|
aidaAvailability.blockedByEnterprisePolicy) {
|
|
374
382
|
return false;
|
|
375
383
|
}
|
|
376
|
-
return Boolean(aidaAvailability.enabled &&
|
|
384
|
+
return Boolean(aidaAvailability.enabled && AiCodeCompletion.isAiCodeCompletionStylesAvailable());
|
|
377
385
|
}
|
|
378
386
|
}
|
|
379
387
|
|