chrome-devtools-frontend 1.0.1626840 → 1.0.1628368
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/front_end/core/common/VersionController.ts +33 -1
- package/front_end/core/host/UserMetrics.ts +0 -2
- package/front_end/core/root/ExperimentNames.ts +0 -2
- package/front_end/core/sdk/CSSContainerQuery.ts +3 -1
- package/front_end/core/sdk/CSSModel.ts +23 -0
- package/front_end/entrypoints/formatter_worker/AcornTokenizer.ts +2 -1
- package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +2 -4
- package/front_end/entrypoints/formatter_worker/ESTreeWalker.ts +3 -2
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +13 -0
- package/front_end/entrypoints/formatter_worker/Substitute.ts +1 -1
- package/front_end/entrypoints/main/MainImpl.ts +0 -7
- package/front_end/generated/InspectorBackendCommands.ts +1 -1
- package/front_end/generated/protocol.ts +1 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +4 -0
- package/front_end/panels/common/common.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +2 -2
- package/front_end/panels/elements/StylePropertiesSection.ts +6 -2
- package/front_end/panels/elements/StylesSidebarPane.ts +8 -7
- package/front_end/panels/emulation/DeviceModeToolbar.ts +20 -26
- package/front_end/panels/emulation/DeviceModeView.ts +2 -2
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +9 -4
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +7 -6
- package/front_end/panels/timeline/TimelineController.ts +1 -2
- package/front_end/panels/timeline/TimelinePanel.ts +1 -1
- package/front_end/panels/timeline/TimelineUIUtils.ts +2 -10
- package/front_end/panels/timeline/timeline-meta.ts +26 -0
- package/front_end/third_party/acorn/README.chromium +1 -1
- package/front_end/third_party/acorn/acorn.ts +1 -1
- package/front_end/third_party/acorn/package/CHANGELOG.md +128 -0
- package/front_end/third_party/acorn/package/README.md +42 -19
- package/front_end/third_party/acorn/package/dist/acorn.d.mts +883 -26
- package/front_end/third_party/acorn/package/dist/acorn.d.ts +859 -268
- package/front_end/third_party/acorn/package/dist/acorn.js +420 -115
- package/front_end/third_party/acorn/package/dist/acorn.mjs +420 -115
- package/front_end/third_party/acorn/package/dist/bin.js +1 -1
- package/front_end/third_party/acorn/package/package.json +3 -3
- 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/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js +7 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js +4 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts +15 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/JSHandle.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/JSHandle.js.map +1 -1
- 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/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js +4 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExecutionContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExecutionContext.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExecutionContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts +2 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.js +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/IsolatedWorld.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/IsolatedWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +1 -0
- 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 +3 -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 +4 -0
- 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 +2 -2
- 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/common/BrowserConnector.d.ts +5 -0
- 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 +9 -1
- 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/EventEmitter.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.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 +6 -3
- 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/ScreenRecorder.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ScreenRecorder.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ScreenRecorder.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +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 +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 +23 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +171 -149
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js +7 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js +4 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts +15 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/JSHandle.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/JSHandle.js.map +1 -1
- 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/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js +4 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExecutionContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExecutionContext.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExecutionContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts +2 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.js +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/IsolatedWorld.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/IsolatedWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +1 -0
- 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 +3 -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 +4 -0
- 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 +2 -2
- 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/common/BrowserConnector.d.ts +5 -0
- 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 +8 -1
- 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/EventEmitter.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.js +8 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.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 +6 -3
- 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/ScreenRecorder.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ScreenRecorder.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ScreenRecorder.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +1 -1
- 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 +23 -2
- package/front_end/third_party/puppeteer/package/package.json +2 -2
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +6 -7
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +4 -3
- package/front_end/third_party/puppeteer/package/src/api/Frame.ts +21 -1
- package/front_end/third_party/puppeteer/package/src/api/JSHandle.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +9 -4
- package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +2 -1
- package/front_end/third_party/puppeteer/package/src/cdp/ExecutionContext.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +9 -5
- package/front_end/third_party/puppeteer/package/src/cdp/FrameManager.ts +3 -1
- package/front_end/third_party/puppeteer/package/src/cdp/IsolatedWorld.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +4 -0
- package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +19 -3
- package/front_end/third_party/puppeteer/package/src/common/EventEmitter.ts +10 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +7 -3
- package/front_end/third_party/puppeteer/package/src/node/ScreenRecorder.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/revisions.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ export class VersionController {
|
|
|
17
17
|
static readonly SYNCED_VERSION_SETTING_NAME = 'syncedInspectorVersion';
|
|
18
18
|
static readonly LOCAL_VERSION_SETTING_NAME = 'localInspectorVersion';
|
|
19
19
|
|
|
20
|
-
static readonly CURRENT_VERSION =
|
|
20
|
+
static readonly CURRENT_VERSION = 46;
|
|
21
21
|
|
|
22
22
|
readonly #settings: Settings;
|
|
23
23
|
readonly #globalVersionSetting: Setting<number>;
|
|
@@ -865,6 +865,38 @@ export class VersionController {
|
|
|
865
865
|
}
|
|
866
866
|
}
|
|
867
867
|
|
|
868
|
+
updateVersionFrom44To45(): void {
|
|
869
|
+
const timelineDebugModeExperimentEnabled =
|
|
870
|
+
Root.Runtime.experiments.getValueFromStorage('timeline-debug-mode' as Root.ExperimentNames.ExperimentName);
|
|
871
|
+
if (timelineDebugModeExperimentEnabled !== undefined) {
|
|
872
|
+
if (this.#settings.syncedStorage.has('timeline-debug-mode')) {
|
|
873
|
+
return; // Already migrated
|
|
874
|
+
}
|
|
875
|
+
try {
|
|
876
|
+
const timelineDebugModeSetting = this.#settings.moduleSetting('timeline-debug-mode');
|
|
877
|
+
timelineDebugModeSetting.set(timelineDebugModeExperimentEnabled);
|
|
878
|
+
} catch {
|
|
879
|
+
// If the setting is not registered yet (e.g. in tests), skip.
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
updateVersionFrom45To46(): void {
|
|
885
|
+
const timelineInvalidationTrackingExperimentEnabled = Root.Runtime.experiments.getValueFromStorage(
|
|
886
|
+
'timeline-invalidation-tracking' as Root.ExperimentNames.ExperimentName);
|
|
887
|
+
if (timelineInvalidationTrackingExperimentEnabled !== undefined) {
|
|
888
|
+
if (this.#settings.syncedStorage.has('timeline-invalidation-tracking')) {
|
|
889
|
+
return; // Already migrated
|
|
890
|
+
}
|
|
891
|
+
try {
|
|
892
|
+
const timelineInvalidationTrackingSetting = this.#settings.moduleSetting('timeline-invalidation-tracking');
|
|
893
|
+
timelineInvalidationTrackingSetting.set(timelineInvalidationTrackingExperimentEnabled);
|
|
894
|
+
} catch {
|
|
895
|
+
// If the setting is not registered yet (e.g. in tests), skip.
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
|
|
868
900
|
/*
|
|
869
901
|
* Any new migration should be added before this comment.
|
|
870
902
|
*
|
|
@@ -764,10 +764,8 @@ export enum DevtoolsExperiments {
|
|
|
764
764
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
765
765
|
'capture-node-creation-stacks' = 1,
|
|
766
766
|
'protocol-monitor' = 13,
|
|
767
|
-
'timeline-invalidation-tracking' = 26,
|
|
768
767
|
'instrumentation-breakpoints' = 61,
|
|
769
768
|
'use-source-map-scopes' = 76,
|
|
770
|
-
'timeline-debug-mode' = 93,
|
|
771
769
|
'durable-messages' = 110,
|
|
772
770
|
'jpeg-xl' = 111,
|
|
773
771
|
/* eslint-enable @typescript-eslint/naming-convention */
|
|
@@ -7,10 +7,8 @@ export enum ExperimentName {
|
|
|
7
7
|
CAPTURE_NODE_CREATION_STACKS = 'capture-node-creation-stacks',
|
|
8
8
|
|
|
9
9
|
PROTOCOL_MONITOR = 'protocol-monitor',
|
|
10
|
-
TIMELINE_INVALIDATION_TRACKING = 'timeline-invalidation-tracking',
|
|
11
10
|
INSTRUMENTATION_BREAKPOINTS = 'instrumentation-breakpoints',
|
|
12
11
|
USE_SOURCE_MAP_SCOPES = 'use-source-map-scopes',
|
|
13
|
-
TIMELINE_DEBUG_MODE = 'timeline-debug-mode',
|
|
14
12
|
DURABLE_MESSAGES = 'durable-messages',
|
|
15
13
|
JPEG_XL = 'jpeg-xl',
|
|
16
14
|
// Adding or removing an entry from this enum?
|
|
@@ -15,6 +15,7 @@ export class CSSContainerQuery extends CSSQuery {
|
|
|
15
15
|
logicalAxes?: Protocol.DOM.LogicalAxes;
|
|
16
16
|
queriesScrollState?: boolean;
|
|
17
17
|
queriesAnchored?: boolean;
|
|
18
|
+
textIsConditionText?: boolean;
|
|
18
19
|
|
|
19
20
|
static parseContainerQueriesPayload(cssModel: CSSModel, payload: Protocol.CSS.CSSContainerQuery[]):
|
|
20
21
|
CSSContainerQuery[] {
|
|
@@ -27,7 +28,8 @@ export class CSSContainerQuery extends CSSQuery {
|
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
reinitialize(payload: Protocol.CSS.CSSContainerQuery): void {
|
|
30
|
-
this.
|
|
31
|
+
this.textIsConditionText = !!payload.conditionText;
|
|
32
|
+
this.text = this.textIsConditionText ? payload.conditionText : payload.text;
|
|
31
33
|
this.range = payload.range ? TextUtils.TextRange.TextRange.fromObject(payload.range) : null;
|
|
32
34
|
this.styleSheetId = payload.styleSheetId;
|
|
33
35
|
this.name = payload.name;
|
|
@@ -552,6 +552,29 @@ export class CSSModel extends SDKModel<EventTypes> {
|
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
554
|
|
|
555
|
+
async setContainerQueryConditionText(
|
|
556
|
+
styleSheetId: Protocol.DOM.StyleSheetId, range: TextUtils.TextRange.TextRange,
|
|
557
|
+
newContainerQueryConditionText: string): Promise<boolean> {
|
|
558
|
+
Host.userMetrics.actionTaken(Host.UserMetrics.Action.StyleRuleEdited);
|
|
559
|
+
|
|
560
|
+
try {
|
|
561
|
+
await this.ensureOriginalStyleSheetText(styleSheetId);
|
|
562
|
+
const {containerQuery} = await this.agent.invoke_setContainerQueryConditionText(
|
|
563
|
+
{styleSheetId, range, text: newContainerQueryConditionText});
|
|
564
|
+
|
|
565
|
+
if (!containerQuery) {
|
|
566
|
+
return false;
|
|
567
|
+
}
|
|
568
|
+
this.#domModel.markUndoableState();
|
|
569
|
+
const edit = new Edit(styleSheetId, range, newContainerQueryConditionText, containerQuery);
|
|
570
|
+
this.fireStyleSheetChanged(styleSheetId, edit);
|
|
571
|
+
return true;
|
|
572
|
+
} catch (e) {
|
|
573
|
+
console.error(e);
|
|
574
|
+
return false;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
|
|
555
578
|
async setSupportsText(
|
|
556
579
|
styleSheetId: Protocol.DOM.StyleSheetId, range: TextUtils.TextRange.TextRange,
|
|
557
580
|
newSupportsText: string): Promise<boolean> {
|
|
@@ -61,6 +61,7 @@ export class AcornTokenizer {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
static identifier(token: TokenOrComment, identifier?: string): boolean {
|
|
64
|
+
// @ts-expect-error https://github.com/acornjs/acorn/issues/1285
|
|
64
65
|
return token.type === Acorn.tokTypes.name && (!identifier || token.value === identifier);
|
|
65
66
|
}
|
|
66
67
|
|
|
@@ -107,4 +108,4 @@ export class AcornTokenizer {
|
|
|
107
108
|
}
|
|
108
109
|
}
|
|
109
110
|
|
|
110
|
-
export const ECMA_VERSION =
|
|
111
|
+
export const ECMA_VERSION = 'latest';
|
|
@@ -18,17 +18,15 @@ export class CSSFormatter {
|
|
|
18
18
|
#toOffset!: number;
|
|
19
19
|
#fromOffset!: number;
|
|
20
20
|
#lineEndings!: number[];
|
|
21
|
-
#lastLine
|
|
21
|
+
#lastLine = -1;
|
|
22
22
|
#state: {
|
|
23
23
|
eatWhitespace?: boolean,
|
|
24
24
|
seenProperty?: boolean,
|
|
25
25
|
inPropertyValue?: boolean,
|
|
26
26
|
afterClosingBrace?: boolean,
|
|
27
|
-
};
|
|
27
|
+
} = {};
|
|
28
28
|
constructor(builder: FormattedContentBuilder) {
|
|
29
29
|
this.#builder = builder;
|
|
30
|
-
this.#lastLine = -1;
|
|
31
|
-
this.#state = {};
|
|
32
30
|
}
|
|
33
31
|
|
|
34
32
|
format(text: string, lineEndings: number[], fromOffset: number, toOffset: number): void {
|
|
@@ -91,7 +91,8 @@ const WALK_ORDER = {
|
|
|
91
91
|
FunctionDeclaration: ['id', 'params', 'body'],
|
|
92
92
|
FunctionExpression: ['id', 'params', 'body'],
|
|
93
93
|
Identifier: [],
|
|
94
|
-
ImportDeclaration: ['specifiers', 'source'],
|
|
94
|
+
ImportDeclaration: ['specifiers', 'source', 'attributes'],
|
|
95
|
+
ImportAttribute: ['key', 'value'],
|
|
95
96
|
ImportDefaultSpecifier: ['local'],
|
|
96
97
|
ImportNamespaceSpecifier: ['local'],
|
|
97
98
|
ImportSpecifier: ['imported', 'local'],
|
|
@@ -136,4 +137,4 @@ const WALK_ORDER = {
|
|
|
136
137
|
WhileStatement: ['test', 'body'],
|
|
137
138
|
WithStatement: ['object', 'body'],
|
|
138
139
|
YieldExpression: ['argument'],
|
|
139
|
-
};
|
|
140
|
+
} as const;
|
|
@@ -150,6 +150,13 @@ export class JavaScriptFormatter {
|
|
|
150
150
|
}
|
|
151
151
|
return 't';
|
|
152
152
|
}
|
|
153
|
+
// @ts-expect-error not on the types
|
|
154
|
+
if (nodeType === 'ImportAttribute') {
|
|
155
|
+
if (AT.punctuator(token, ':')) {
|
|
156
|
+
return 'ts';
|
|
157
|
+
}
|
|
158
|
+
return 't';
|
|
159
|
+
}
|
|
153
160
|
if (nodeType === 'ArrayExpression') {
|
|
154
161
|
if (AT.punctuator(token, ',')) {
|
|
155
162
|
return 'ts';
|
|
@@ -339,11 +346,17 @@ export class JavaScriptFormatter {
|
|
|
339
346
|
return 'ts';
|
|
340
347
|
}
|
|
341
348
|
if (AT.punctuator(token, '}')) {
|
|
349
|
+
if (node.attributes.length > 0) {
|
|
350
|
+
return 't';
|
|
351
|
+
}
|
|
342
352
|
return node.source ? 'ts' : 't';
|
|
343
353
|
}
|
|
344
354
|
if (AT.punctuator(token, '*')) {
|
|
345
355
|
return 'sts';
|
|
346
356
|
}
|
|
357
|
+
if (AT.keyword(token, 'with')) {
|
|
358
|
+
return 'sts';
|
|
359
|
+
}
|
|
347
360
|
return 't';
|
|
348
361
|
} else if (nodeType === 'MemberExpression') {
|
|
349
362
|
if (node.object.type === 'Literal' && typeof (node.object.value) === 'number') {
|
|
@@ -34,7 +34,7 @@ function computeSubstitution(expression: string, nameMap: Map<string, string|nul
|
|
|
34
34
|
allowImportExportEverywhere: true,
|
|
35
35
|
checkPrivateFields: false,
|
|
36
36
|
ranges: false,
|
|
37
|
-
}
|
|
37
|
+
}) as Acorn.ESTree.Node;
|
|
38
38
|
const scopeVariables = new ScopeVariableAnalysis(root, expression);
|
|
39
39
|
scopeVariables.run();
|
|
40
40
|
const freeVariables = scopeVariables.getFreeVariables();
|
|
@@ -365,13 +365,6 @@ export class MainImpl {
|
|
|
365
365
|
this.#migrateValueFromLegacyToHostExperiment(
|
|
366
366
|
Root.ExperimentNames.ExperimentName.PROTOCOL_MONITOR, protocolMonitorExperiment);
|
|
367
367
|
|
|
368
|
-
// Timeline
|
|
369
|
-
Root.Runtime.experiments.register(
|
|
370
|
-
Root.ExperimentNames.ExperimentName.TIMELINE_INVALIDATION_TRACKING, 'Performance panel: invalidation tracking');
|
|
371
|
-
Root.Runtime.experiments.register(
|
|
372
|
-
Root.ExperimentNames.ExperimentName.TIMELINE_DEBUG_MODE,
|
|
373
|
-
'Performance panel: debug mode (trace event details, etc)');
|
|
374
|
-
|
|
375
368
|
// Debugging
|
|
376
369
|
Root.Runtime.experiments.register(
|
|
377
370
|
Root.ExperimentNames.ExperimentName.INSTRUMENTATION_BREAKPOINTS, 'Instrumentation breakpoints');
|
|
@@ -83,7 +83,7 @@ inspectorBackend.registerEnum("Audits.SharedDictionaryError", {UseErrorCrossOrig
|
|
|
83
83
|
inspectorBackend.registerEnum("Audits.SRIMessageSignatureError", {MissingSignatureHeader: "MissingSignatureHeader", MissingSignatureInputHeader: "MissingSignatureInputHeader", InvalidSignatureHeader: "InvalidSignatureHeader", InvalidSignatureInputHeader: "InvalidSignatureInputHeader", SignatureHeaderValueIsNotByteSequence: "SignatureHeaderValueIsNotByteSequence", SignatureHeaderValueIsParameterized: "SignatureHeaderValueIsParameterized", SignatureHeaderValueIsIncorrectLength: "SignatureHeaderValueIsIncorrectLength", SignatureInputHeaderMissingLabel: "SignatureInputHeaderMissingLabel", SignatureInputHeaderValueNotInnerList: "SignatureInputHeaderValueNotInnerList", SignatureInputHeaderValueMissingComponents: "SignatureInputHeaderValueMissingComponents", SignatureInputHeaderInvalidComponentType: "SignatureInputHeaderInvalidComponentType", SignatureInputHeaderInvalidComponentName: "SignatureInputHeaderInvalidComponentName", SignatureInputHeaderInvalidHeaderComponentParameter: "SignatureInputHeaderInvalidHeaderComponentParameter", SignatureInputHeaderInvalidDerivedComponentParameter: "SignatureInputHeaderInvalidDerivedComponentParameter", SignatureInputHeaderKeyIdLength: "SignatureInputHeaderKeyIdLength", SignatureInputHeaderInvalidParameter: "SignatureInputHeaderInvalidParameter", SignatureInputHeaderMissingRequiredParameters: "SignatureInputHeaderMissingRequiredParameters", ValidationFailedSignatureExpired: "ValidationFailedSignatureExpired", ValidationFailedInvalidLength: "ValidationFailedInvalidLength", ValidationFailedSignatureMismatch: "ValidationFailedSignatureMismatch", ValidationFailedIntegrityMismatch: "ValidationFailedIntegrityMismatch"});
|
|
84
84
|
inspectorBackend.registerEnum("Audits.UnencodedDigestError", {MalformedDictionary: "MalformedDictionary", UnknownAlgorithm: "UnknownAlgorithm", IncorrectDigestType: "IncorrectDigestType", IncorrectDigestLength: "IncorrectDigestLength"});
|
|
85
85
|
inspectorBackend.registerEnum("Audits.ConnectionAllowlistError", {InvalidHeader: "InvalidHeader", MoreThanOneList: "MoreThanOneList", ItemNotInnerList: "ItemNotInnerList", InvalidAllowlistItemType: "InvalidAllowlistItemType", ReportingEndpointNotToken: "ReportingEndpointNotToken", InvalidUrlPattern: "InvalidUrlPattern"});
|
|
86
|
-
inspectorBackend.registerEnum("Audits.GenericIssueErrorType", {FormLabelForNameError: "FormLabelForNameError", FormDuplicateIdForInputError: "FormDuplicateIdForInputError", FormInputWithNoLabelError: "FormInputWithNoLabelError", FormAutocompleteAttributeEmptyError: "FormAutocompleteAttributeEmptyError", FormEmptyIdAndNameAttributesForInputError: "FormEmptyIdAndNameAttributesForInputError", FormAriaLabelledByToNonExistingIdError: "FormAriaLabelledByToNonExistingIdError", FormInputAssignedAutocompleteValueToIdOrNameAttributeError: "FormInputAssignedAutocompleteValueToIdOrNameAttributeError", FormLabelHasNeitherForNorNestedInputError: "FormLabelHasNeitherForNorNestedInputError", FormLabelForMatchesNonExistingIdError: "FormLabelForMatchesNonExistingIdError", FormInputHasWrongButWellIntendedAutocompleteValueError: "FormInputHasWrongButWellIntendedAutocompleteValueError", ResponseWasBlockedByORB: "ResponseWasBlockedByORB", NavigationEntryMarkedSkippable: "NavigationEntryMarkedSkippable", AutofillAndManualTextPolicyControlledFeaturesInfo: "AutofillAndManualTextPolicyControlledFeaturesInfo", AutofillPolicyControlledFeatureInfo: "AutofillPolicyControlledFeatureInfo", ManualTextPolicyControlledFeatureInfo: "ManualTextPolicyControlledFeatureInfo", FormModelContextParameterMissingTitleAndDescription: "FormModelContextParameterMissingTitleAndDescription", FormModelContextMissingToolName: "FormModelContextMissingToolName", FormModelContextMissingToolDescription: "FormModelContextMissingToolDescription", FormModelContextRequiredParameterMissingName: "FormModelContextRequiredParameterMissingName", FormModelContextParameterMissingName: "FormModelContextParameterMissingName"});
|
|
86
|
+
inspectorBackend.registerEnum("Audits.GenericIssueErrorType", {FormLabelForNameError: "FormLabelForNameError", FormDuplicateIdForInputError: "FormDuplicateIdForInputError", FormInputWithNoLabelError: "FormInputWithNoLabelError", FormAutocompleteAttributeEmptyError: "FormAutocompleteAttributeEmptyError", FormEmptyIdAndNameAttributesForInputError: "FormEmptyIdAndNameAttributesForInputError", FormAriaLabelledByToNonExistingIdError: "FormAriaLabelledByToNonExistingIdError", FormInputAssignedAutocompleteValueToIdOrNameAttributeError: "FormInputAssignedAutocompleteValueToIdOrNameAttributeError", FormLabelHasNeitherForNorNestedInputError: "FormLabelHasNeitherForNorNestedInputError", FormLabelForMatchesNonExistingIdError: "FormLabelForMatchesNonExistingIdError", FormInputHasWrongButWellIntendedAutocompleteValueError: "FormInputHasWrongButWellIntendedAutocompleteValueError", ResponseWasBlockedByORB: "ResponseWasBlockedByORB", NavigationEntryMarkedSkippable: "NavigationEntryMarkedSkippable", BackUINavigationWouldSkipAd: "BackUINavigationWouldSkipAd", AutofillAndManualTextPolicyControlledFeaturesInfo: "AutofillAndManualTextPolicyControlledFeaturesInfo", AutofillPolicyControlledFeatureInfo: "AutofillPolicyControlledFeatureInfo", ManualTextPolicyControlledFeatureInfo: "ManualTextPolicyControlledFeatureInfo", FormModelContextParameterMissingTitleAndDescription: "FormModelContextParameterMissingTitleAndDescription", FormModelContextMissingToolName: "FormModelContextMissingToolName", FormModelContextMissingToolDescription: "FormModelContextMissingToolDescription", FormModelContextRequiredParameterMissingName: "FormModelContextRequiredParameterMissingName", FormModelContextParameterMissingName: "FormModelContextParameterMissingName"});
|
|
87
87
|
inspectorBackend.registerEnum("Audits.ClientHintIssueReason", {MetaTagAllowListInvalidOrigin: "MetaTagAllowListInvalidOrigin", MetaTagModifiedHTML: "MetaTagModifiedHTML"});
|
|
88
88
|
inspectorBackend.registerEnum("Audits.FederatedAuthRequestIssueReason", {ShouldEmbargo: "ShouldEmbargo", TooManyRequests: "TooManyRequests", WellKnownHttpNotFound: "WellKnownHttpNotFound", WellKnownNoResponse: "WellKnownNoResponse", WellKnownInvalidResponse: "WellKnownInvalidResponse", WellKnownListEmpty: "WellKnownListEmpty", WellKnownInvalidContentType: "WellKnownInvalidContentType", ConfigNotInWellKnown: "ConfigNotInWellKnown", WellKnownTooBig: "WellKnownTooBig", ConfigHttpNotFound: "ConfigHttpNotFound", ConfigNoResponse: "ConfigNoResponse", ConfigInvalidResponse: "ConfigInvalidResponse", ConfigInvalidContentType: "ConfigInvalidContentType", IdpNotPotentiallyTrustworthy: "IdpNotPotentiallyTrustworthy", DisabledInSettings: "DisabledInSettings", DisabledInFlags: "DisabledInFlags", ErrorFetchingSignin: "ErrorFetchingSignin", InvalidSigninResponse: "InvalidSigninResponse", AccountsHttpNotFound: "AccountsHttpNotFound", AccountsNoResponse: "AccountsNoResponse", AccountsInvalidResponse: "AccountsInvalidResponse", AccountsListEmpty: "AccountsListEmpty", AccountsInvalidContentType: "AccountsInvalidContentType", IdTokenHttpNotFound: "IdTokenHttpNotFound", IdTokenNoResponse: "IdTokenNoResponse", IdTokenInvalidResponse: "IdTokenInvalidResponse", IdTokenIdpErrorResponse: "IdTokenIdpErrorResponse", IdTokenCrossSiteIdpErrorResponse: "IdTokenCrossSiteIdpErrorResponse", IdTokenInvalidRequest: "IdTokenInvalidRequest", IdTokenInvalidContentType: "IdTokenInvalidContentType", ErrorIdToken: "ErrorIdToken", Canceled: "Canceled", RpPageNotVisible: "RpPageNotVisible", SilentMediationFailure: "SilentMediationFailure", NotSignedInWithIdp: "NotSignedInWithIdp", MissingTransientUserActivation: "MissingTransientUserActivation", ReplacedByActiveMode: "ReplacedByActiveMode", RelyingPartyOriginIsOpaque: "RelyingPartyOriginIsOpaque", TypeNotMatching: "TypeNotMatching", UiDismissedNoEmbargo: "UiDismissedNoEmbargo", CorsError: "CorsError", SuppressedBySegmentationPlatform: "SuppressedBySegmentationPlatform"});
|
|
89
89
|
inspectorBackend.registerEnum("Audits.FederatedAuthUserInfoRequestIssueReason", {NotSameOrigin: "NotSameOrigin", NotIframe: "NotIframe", NotPotentiallyTrustworthy: "NotPotentiallyTrustworthy", NoAPIPermission: "NoApiPermission", NotSignedInWithIdp: "NotSignedInWithIdp", NoAccountSharingPermission: "NoAccountSharingPermission", InvalidConfigOrWellKnown: "InvalidConfigOrWellKnown", InvalidAccountsResponse: "InvalidAccountsResponse", NoReturningUserFromFetchedAccounts: "NoReturningUserFromFetchedAccounts"});
|
|
@@ -1208,6 +1208,7 @@ export namespace Audits {
|
|
|
1208
1208
|
FormInputHasWrongButWellIntendedAutocompleteValueError = 'FormInputHasWrongButWellIntendedAutocompleteValueError',
|
|
1209
1209
|
ResponseWasBlockedByORB = 'ResponseWasBlockedByORB',
|
|
1210
1210
|
NavigationEntryMarkedSkippable = 'NavigationEntryMarkedSkippable',
|
|
1211
|
+
BackUINavigationWouldSkipAd = 'BackUINavigationWouldSkipAd',
|
|
1211
1212
|
AutofillAndManualTextPolicyControlledFeaturesInfo = 'AutofillAndManualTextPolicyControlledFeaturesInfo',
|
|
1212
1213
|
AutofillPolicyControlledFeatureInfo = 'AutofillPolicyControlledFeatureInfo',
|
|
1213
1214
|
ManualTextPolicyControlledFeatureInfo = 'ManualTextPolicyControlledFeatureInfo',
|
|
@@ -7664,6 +7664,10 @@ export const NativeFunctions = [
|
|
|
7664
7664
|
name: "registerTool",
|
|
7665
7665
|
signatures: [["tool","?options"]]
|
|
7666
7666
|
},
|
|
7667
|
+
{
|
|
7668
|
+
name: "executeTool",
|
|
7669
|
+
signatures: [["tool","input_arguments","?options"]]
|
|
7670
|
+
},
|
|
7667
7671
|
{
|
|
7668
7672
|
name: "SnapEvent",
|
|
7669
7673
|
signatures: [["type","?eventInitDict"]]
|
|
@@ -102,7 +102,7 @@ export {FreDialog} from './FreDialog.js';
|
|
|
102
102
|
export {GdpSignUpDialog} from './GdpSignUpDialog.js';
|
|
103
103
|
export {GeminiRebrandPromoDialog} from './GeminiRebrandPromoDialog.js';
|
|
104
104
|
export {AiCodeCompletionDisclaimer} from './AiCodeCompletionDisclaimer.js';
|
|
105
|
-
export
|
|
105
|
+
export * as AiCodeCompletionSummaryToolbar from './AiCodeCompletionSummaryToolbar.js';
|
|
106
106
|
export * from './BadgeNotification.js';
|
|
107
107
|
export * as ExtensionPanel from './ExtensionPanel.js';
|
|
108
108
|
export * as ExtensionServer from './ExtensionServer.js';
|
|
@@ -351,7 +351,7 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
351
351
|
#allCollapsed = false;
|
|
352
352
|
aiCodeCompletionConfig?: TextEditor.AiCodeCompletionProvider.AiCodeCompletionConfig;
|
|
353
353
|
private aiCodeCompletionSummaryToolbarContainer?: HTMLElement;
|
|
354
|
-
private aiCodeCompletionSummaryToolbar?: AiCodeCompletionSummaryToolbar;
|
|
354
|
+
private aiCodeCompletionSummaryToolbar?: AiCodeCompletionSummaryToolbar.AiCodeCompletionSummaryToolbar;
|
|
355
355
|
|
|
356
356
|
constructor(viewportThrottlerTimeout: number) {
|
|
357
357
|
super();
|
|
@@ -667,7 +667,7 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
667
667
|
if (this.aiCodeCompletionSummaryToolbar) {
|
|
668
668
|
return;
|
|
669
669
|
}
|
|
670
|
-
this.aiCodeCompletionSummaryToolbar = new AiCodeCompletionSummaryToolbar({
|
|
670
|
+
this.aiCodeCompletionSummaryToolbar = new AiCodeCompletionSummaryToolbar.AiCodeCompletionSummaryToolbar({
|
|
671
671
|
citationsTooltipId: CITATIONS_TOOLTIP_ID,
|
|
672
672
|
disclaimerTooltipId: DISCLAIMER_TOOLTIP_ID,
|
|
673
673
|
spinnerTooltipId: SPINNER_TOOLTIP_ID,
|
|
@@ -1021,7 +1021,7 @@ export class StylePropertiesSection {
|
|
|
1021
1021
|
const containerQueryElement = new ElementsComponents.CSSQuery.CSSQuery();
|
|
1022
1022
|
containerQueryElement.data = {
|
|
1023
1023
|
queryPrefix: '@container',
|
|
1024
|
-
queryName: containerQuery.name,
|
|
1024
|
+
queryName: containerQuery.textIsConditionText ? undefined : containerQuery.name,
|
|
1025
1025
|
queryText: containerQuery.text,
|
|
1026
1026
|
onQueryTextClick,
|
|
1027
1027
|
jslogContext: 'container-query',
|
|
@@ -1596,7 +1596,11 @@ export class StylePropertiesSection {
|
|
|
1596
1596
|
const range = query.range as TextUtils.TextRange.TextRange;
|
|
1597
1597
|
let success = false;
|
|
1598
1598
|
if (query instanceof SDK.CSSContainerQuery.CSSContainerQuery) {
|
|
1599
|
-
|
|
1599
|
+
if (query.textIsConditionText) {
|
|
1600
|
+
success = await cssModel.setContainerQueryConditionText(query.styleSheetId, range, newContent);
|
|
1601
|
+
} else {
|
|
1602
|
+
success = await cssModel.setContainerQueryText(query.styleSheetId, range, newContent);
|
|
1603
|
+
}
|
|
1600
1604
|
} else if (query instanceof SDK.CSSSupports.CSSSupports) {
|
|
1601
1605
|
success = await cssModel.setSupportsText(query.styleSheetId, range, newContent);
|
|
1602
1606
|
} else if (query instanceof SDK.CSSScope.CSSScope) {
|
|
@@ -229,7 +229,7 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
229
229
|
aiCodeCompletionConfig?: TextEditor.AiCodeCompletionProvider.AiCodeCompletionConfig;
|
|
230
230
|
aiCodeCompletionProvider?: StylesAiCodeCompletionProvider.StylesAiCodeCompletionProvider;
|
|
231
231
|
#aiCodeCompletionSummaryToolbarContainer?: HTMLElement;
|
|
232
|
-
#aiCodeCompletionSummaryToolbar?: PanelsCommon.AiCodeCompletionSummaryToolbar;
|
|
232
|
+
#aiCodeCompletionSummaryToolbar?: PanelsCommon.AiCodeCompletionSummaryToolbar.AiCodeCompletionSummaryToolbar;
|
|
233
233
|
|
|
234
234
|
constructor(computedStyleModel: ComputedStyle.ComputedStyleModel.ComputedStyleModel) {
|
|
235
235
|
super(computedStyleModel, {delegatesFocus: true, useShadowDom: true, classes: ['flex-none']});
|
|
@@ -1581,12 +1581,13 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
1581
1581
|
if (this.#aiCodeCompletionSummaryToolbar) {
|
|
1582
1582
|
return;
|
|
1583
1583
|
}
|
|
1584
|
-
this.#aiCodeCompletionSummaryToolbar =
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1584
|
+
this.#aiCodeCompletionSummaryToolbar =
|
|
1585
|
+
new PanelsCommon.AiCodeCompletionSummaryToolbar.AiCodeCompletionSummaryToolbar({
|
|
1586
|
+
citationsTooltipId: CITATIONS_TOOLTIP_ID,
|
|
1587
|
+
disclaimerTooltipId: DISCLAIMER_TOOLTIP_ID,
|
|
1588
|
+
spinnerTooltipId: SPINNER_TOOLTIP_ID,
|
|
1589
|
+
panel: AiCodeCompletion.AiCodeCompletion.ContextFlavor.STYLES,
|
|
1590
|
+
});
|
|
1590
1591
|
const containingPane = this.contentElement.enclosingNodeOrSelfWithClass('style-panes-wrapper') as HTMLElement;
|
|
1591
1592
|
this.#aiCodeCompletionSummaryToolbarContainer =
|
|
1592
1593
|
containingPane.createChild('div', 'ai-code-completion-summary-toolbar-container');
|
|
@@ -188,11 +188,11 @@ const UIStrings = {
|
|
|
188
188
|
} as const;
|
|
189
189
|
const str_ = i18n.i18n.registerUIStrings('panels/emulation/DeviceModeToolbar.ts', UIStrings);
|
|
190
190
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
191
|
-
const {ifDefined, styleMap} = Directives;
|
|
191
|
+
const {ifDefined, live, styleMap} = Directives;
|
|
192
192
|
const {widget} = UI.Widget;
|
|
193
193
|
const {bindToSetting} = UI.UIUtils;
|
|
194
194
|
|
|
195
|
-
export class DeviceModeToolbar {
|
|
195
|
+
export class DeviceModeToolbar extends UI.Widget.Widget {
|
|
196
196
|
private model: EmulationModel.DeviceModeModel.DeviceModeModel;
|
|
197
197
|
private readonly showMediaInspectorSetting: Common.Settings.Setting<boolean>;
|
|
198
198
|
private readonly showRulersSetting: Common.Settings.Setting<boolean>;
|
|
@@ -201,7 +201,6 @@ export class DeviceModeToolbar {
|
|
|
201
201
|
private readonly showUserAgentTypeSetting: Common.Settings.Setting<boolean>;
|
|
202
202
|
private autoAdjustScaleSetting: Common.Settings.Setting<boolean>;
|
|
203
203
|
private readonly lastMode: Map<EmulationModel.EmulatedDevices.EmulatedDevice, EmulationModel.EmulatedDevices.Mode>;
|
|
204
|
-
readonly #element: HTMLDivElement;
|
|
205
204
|
private readonly emulatedDevicesList: EmulationModel.EmulatedDevices.EmulatedDevicesList;
|
|
206
205
|
private readonly persistenceSetting: Common.Settings.Setting<{device: string, orientation: string, mode: string}>;
|
|
207
206
|
private mainToolbar: UI.Toolbar.Toolbar;
|
|
@@ -213,6 +212,7 @@ export class DeviceModeToolbar {
|
|
|
213
212
|
model: EmulationModel.DeviceModeModel.DeviceModeModel,
|
|
214
213
|
showMediaInspectorSetting: Common.Settings.Setting<boolean>,
|
|
215
214
|
showRulersSetting: Common.Settings.Setting<boolean>) {
|
|
215
|
+
super();
|
|
216
216
|
this.model = model;
|
|
217
217
|
this.showMediaInspectorSetting = showMediaInspectorSetting;
|
|
218
218
|
this.showRulersSetting = showRulersSetting;
|
|
@@ -220,21 +220,19 @@ export class DeviceModeToolbar {
|
|
|
220
220
|
this.deviceOutlineSetting = this.model.deviceOutlineSetting();
|
|
221
221
|
this.showDeviceScaleFactorSetting =
|
|
222
222
|
Common.Settings.Settings.instance().createSetting('emulation.show-device-scale-factor', false);
|
|
223
|
-
this.showDeviceScaleFactorSetting.addChangeListener(this.
|
|
223
|
+
this.showDeviceScaleFactorSetting.addChangeListener(this.requestUpdate, this);
|
|
224
224
|
|
|
225
225
|
this.showUserAgentTypeSetting =
|
|
226
226
|
Common.Settings.Settings.instance().createSetting('emulation.show-user-agent-type', false);
|
|
227
|
-
this.showUserAgentTypeSetting.addChangeListener(this.
|
|
227
|
+
this.showUserAgentTypeSetting.addChangeListener(this.requestUpdate, this);
|
|
228
228
|
|
|
229
229
|
this.autoAdjustScaleSetting =
|
|
230
230
|
Common.Settings.Settings.instance().createSetting('emulation.auto-adjust-scale', true);
|
|
231
231
|
|
|
232
232
|
this.lastMode = new Map();
|
|
233
233
|
|
|
234
|
-
this
|
|
235
|
-
this
|
|
236
|
-
this.#element.setAttribute('jslog', `${VisualLogging.toolbar('device-mode').track({resize: true})}`);
|
|
237
|
-
|
|
234
|
+
this.contentElement.classList.add('device-mode-toolbar');
|
|
235
|
+
this.contentElement.setAttribute('jslog', VisualLogging.toolbar('device-mode').track({resize: true}).toString());
|
|
238
236
|
this.mainToolbar = this.createMainToolbar();
|
|
239
237
|
this.optionsToolbar = this.createOptionsToolbar();
|
|
240
238
|
|
|
@@ -247,13 +245,13 @@ export class DeviceModeToolbar {
|
|
|
247
245
|
this.persistenceSetting = Common.Settings.Settings.instance().createSetting(
|
|
248
246
|
'emulation.device-mode-value', {device: '', orientation: '', mode: ''});
|
|
249
247
|
|
|
250
|
-
this.model.toolbarControlsEnabledSetting().addChangeListener(this.
|
|
251
|
-
this.model.scaleSetting().addChangeListener(this.
|
|
252
|
-
this.model.uaSetting().addChangeListener(this.
|
|
253
|
-
this.model.deviceScaleFactorSetting().addChangeListener(this.
|
|
254
|
-
this.model.addEventListener(EmulationModel.DeviceModeModel.Events.UPDATED, this.
|
|
248
|
+
this.model.toolbarControlsEnabledSetting().addChangeListener(this.requestUpdate, this);
|
|
249
|
+
this.model.scaleSetting().addChangeListener(this.requestUpdate, this);
|
|
250
|
+
this.model.uaSetting().addChangeListener(this.requestUpdate, this);
|
|
251
|
+
this.model.deviceScaleFactorSetting().addChangeListener(this.requestUpdate, this);
|
|
252
|
+
this.model.addEventListener(EmulationModel.DeviceModeModel.Events.UPDATED, this.requestUpdate, this);
|
|
255
253
|
|
|
256
|
-
this.
|
|
254
|
+
this.requestUpdate();
|
|
257
255
|
}
|
|
258
256
|
|
|
259
257
|
private createEmptyToolbarElement(): HTMLDivElement {
|
|
@@ -292,7 +290,7 @@ export class DeviceModeToolbar {
|
|
|
292
290
|
}
|
|
293
291
|
|
|
294
292
|
private createMainToolbar(): UI.Toolbar.Toolbar {
|
|
295
|
-
const mainToolbar = this
|
|
293
|
+
const mainToolbar = this.contentElement.createChild('devtools-toolbar', 'main-toolbar');
|
|
296
294
|
return mainToolbar as UI.Toolbar.Toolbar;
|
|
297
295
|
}
|
|
298
296
|
|
|
@@ -359,7 +357,7 @@ export class DeviceModeToolbar {
|
|
|
359
357
|
title=${i18nString(UIStrings.deviceType)}
|
|
360
358
|
aria-label=${i18nString(UIStrings.deviceType)}
|
|
361
359
|
@change=${this.onDeviceChange.bind(this)}
|
|
362
|
-
.value=${selectedDeviceOption === deviceModeOptions.responsive ? 'Responsive' : (selectedDeviceOption?.title || 'Responsive')}
|
|
360
|
+
.value=${live(selectedDeviceOption === deviceModeOptions.responsive ? 'Responsive' : (selectedDeviceOption?.title || 'Responsive'))}
|
|
363
361
|
jslog=${VisualLogging.dropDown().track({change: true}).context('device')}>
|
|
364
362
|
<option value="Responsive" ?selected=${deviceModeOptions.responsive.selected} jslog=${VisualLogging.item(deviceModeOptions.responsive.jslogContext).track({click: true})}>
|
|
365
363
|
${deviceModeOptions.responsive.title}
|
|
@@ -485,7 +483,7 @@ export class DeviceModeToolbar {
|
|
|
485
483
|
}
|
|
486
484
|
|
|
487
485
|
private createOptionsToolbar(): UI.Toolbar.Toolbar {
|
|
488
|
-
const optionsToolbar = this
|
|
486
|
+
const optionsToolbar = this.contentElement.createChild('devtools-toolbar', 'device-mode-toolbar-options');
|
|
489
487
|
optionsToolbar.wrappable = true;
|
|
490
488
|
optionsToolbar.appendToolbarItem(new UI.Toolbar.ToolbarItem(this.createEmptyToolbarElement()));
|
|
491
489
|
const moreOptionsButton = new UI.Toolbar.ToolbarMenuButton(
|
|
@@ -737,7 +735,7 @@ export class DeviceModeToolbar {
|
|
|
737
735
|
const value = (event.target as HTMLSelectElement).value;
|
|
738
736
|
if (value === 'Edit') {
|
|
739
737
|
this.emulatedDevicesList.revealCustomSetting();
|
|
740
|
-
this.
|
|
738
|
+
this.requestUpdate();
|
|
741
739
|
} else if (value === 'Responsive') {
|
|
742
740
|
this.switchToResponsive();
|
|
743
741
|
} else {
|
|
@@ -751,7 +749,7 @@ export class DeviceModeToolbar {
|
|
|
751
749
|
}
|
|
752
750
|
|
|
753
751
|
private deviceListChanged(): void {
|
|
754
|
-
this.
|
|
752
|
+
this.requestUpdate();
|
|
755
753
|
const device = this.model.device();
|
|
756
754
|
if (!device) {
|
|
757
755
|
return;
|
|
@@ -875,11 +873,7 @@ export class DeviceModeToolbar {
|
|
|
875
873
|
return `${(this.model.scale() * 100).toFixed(0)}`;
|
|
876
874
|
}
|
|
877
875
|
|
|
878
|
-
|
|
879
|
-
return this.#element;
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
update(): void {
|
|
876
|
+
override performUpdate(): void {
|
|
883
877
|
const enabled = this.model.toolbarControlsEnabledSetting().get();
|
|
884
878
|
this.mainToolbar.setEnabled(enabled);
|
|
885
879
|
this.optionsToolbar.setEnabled(enabled);
|
|
@@ -942,7 +936,7 @@ export class DeviceModeToolbar {
|
|
|
942
936
|
this.#measuringElement.style.pointerEvents = 'none';
|
|
943
937
|
const dummyOption = document.createElement('option');
|
|
944
938
|
this.#measuringElement.appendChild(dummyOption);
|
|
945
|
-
this
|
|
939
|
+
this.contentElement.appendChild(this.#measuringElement);
|
|
946
940
|
}
|
|
947
941
|
|
|
948
942
|
const dummyOption = this.#measuringElement.options[0];
|
|
@@ -124,7 +124,7 @@ export class DeviceModeView extends UI.Widget.VBox {
|
|
|
124
124
|
|
|
125
125
|
private createUI(): void {
|
|
126
126
|
this.toolbar = new DeviceModeToolbar(this.model, this.showMediaInspectorSetting, this.showRulersSetting);
|
|
127
|
-
this.
|
|
127
|
+
this.toolbar.show(this.contentElement);
|
|
128
128
|
this.contentClip = this.contentElement.createChild('div', 'device-mode-content-clip vbox');
|
|
129
129
|
this.responsivePresetsContainer = this.contentClip.createChild('div', 'device-mode-presets-container');
|
|
130
130
|
this.responsivePresetsContainer.setAttribute('jslog', `${VisualLogging.responsivePresets()}`);
|
|
@@ -358,7 +358,7 @@ export class DeviceModeView extends UI.Widget.VBox {
|
|
|
358
358
|
this.cachedScale = this.model.scale();
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
-
this.toolbar.
|
|
361
|
+
this.toolbar.requestUpdate();
|
|
362
362
|
this.loadImage(this.screenImage, this.model.screenImage());
|
|
363
363
|
this.loadImage(this.outlineImage, this.model.outlineImage());
|
|
364
364
|
this.mediaInspector.setAxisTransform(this.model.scale());
|
|
@@ -269,11 +269,13 @@ export class HeapSnapshotGridNode extends
|
|
|
269
269
|
const value = this.data[columnId];
|
|
270
270
|
const percentColumn = columnId + '-percent';
|
|
271
271
|
const percent = this.data[percentColumn];
|
|
272
|
+
const tooltipColumn = `${columnId}-tooltip`;
|
|
273
|
+
const tooltip = this.data[tooltipColumn];
|
|
272
274
|
if (percent) {
|
|
273
275
|
render(
|
|
274
276
|
html`
|
|
275
277
|
<div class="profile-multiple-values">
|
|
276
|
-
<span aria-hidden="true">${value}</span>
|
|
278
|
+
<span aria-hidden="true" title=${Directives.ifDefined(tooltip)}>${value}</span>
|
|
277
279
|
<span class="percent-column" aria-hidden="true">${percent}</span>
|
|
278
280
|
</div>`,
|
|
279
281
|
cell);
|
|
@@ -283,7 +285,7 @@ export class HeapSnapshotGridNode extends
|
|
|
283
285
|
render(
|
|
284
286
|
html`
|
|
285
287
|
<div>
|
|
286
|
-
<span>${value}</span>
|
|
288
|
+
<span title=${Directives.ifDefined(tooltip)}>${value}</span>
|
|
287
289
|
</div>`,
|
|
288
290
|
cell);
|
|
289
291
|
}
|
|
@@ -560,6 +562,8 @@ export abstract class HeapSnapshotGenericObjectNode extends HeapSnapshotGridNode
|
|
|
560
562
|
retainedSize: i18n.ByteUtilities.formatBytesToKb(this.retainedSize),
|
|
561
563
|
'shallowSize-percent': this.toPercentString(shallowSizePercent),
|
|
562
564
|
'retainedSize-percent': this.toPercentString(retainedSizePercent),
|
|
565
|
+
'shallowSize-tooltip': i18n.ByteUtilities.bytesToString(this.shallowSize),
|
|
566
|
+
'retainedSize-tooltip': i18n.ByteUtilities.bytesToString(this.retainedSize),
|
|
563
567
|
};
|
|
564
568
|
}
|
|
565
569
|
|
|
@@ -580,8 +584,7 @@ export abstract class HeapSnapshotGenericObjectNode extends HeapSnapshotGridNode
|
|
|
580
584
|
}
|
|
581
585
|
|
|
582
586
|
override createCell(columnId: string): HTMLElement {
|
|
583
|
-
|
|
584
|
-
return cell;
|
|
587
|
+
return columnId !== 'object' ? this.createValueCell(columnId) : this.createObjectCell();
|
|
585
588
|
}
|
|
586
589
|
|
|
587
590
|
createObjectCell(): HTMLElement {
|
|
@@ -1132,6 +1135,8 @@ export class HeapSnapshotConstructorNode extends HeapSnapshotGridNode {
|
|
|
1132
1135
|
retainedSize: i18n.ByteUtilities.formatBytesToKb(this.retainedSize),
|
|
1133
1136
|
'shallowSize-percent': this.toPercentString(shallowSizePercent),
|
|
1134
1137
|
'retainedSize-percent': this.toPercentString(retainedSizePercent),
|
|
1138
|
+
'shallowSize-tooltip': i18n.ByteUtilities.bytesToString(this.shallowSize),
|
|
1139
|
+
'retainedSize-tooltip': i18n.ByteUtilities.bytesToString(this.retainedSize),
|
|
1135
1140
|
};
|
|
1136
1141
|
}
|
|
1137
1142
|
|
|
@@ -23,7 +23,7 @@ export class AiCodeCompletionPlugin extends Plugin {
|
|
|
23
23
|
#aiCodeCompletionDisclaimer?: PanelCommon.AiCodeCompletionDisclaimer;
|
|
24
24
|
#aiCodeCompletionDisclaimerContainer = document.createElement('div');
|
|
25
25
|
#aiCodeCompletionDisclaimerToolbarItem = new UI.Toolbar.ToolbarItem(this.#aiCodeCompletionDisclaimerContainer);
|
|
26
|
-
#aiCodeCompletionCitationsToolbar?: PanelCommon.AiCodeCompletionSummaryToolbar;
|
|
26
|
+
#aiCodeCompletionCitationsToolbar?: PanelCommon.AiCodeCompletionSummaryToolbar.AiCodeCompletionSummaryToolbar;
|
|
27
27
|
#aiCodeCompletionCitationsToolbarContainer = document.createElement('div');
|
|
28
28
|
#aiCodeCompletionCitationsToolbarAttached = false;
|
|
29
29
|
aiCodeCompletionConfig: TextEditor.AiCodeCompletionProvider.AiCodeCompletionConfig;
|
|
@@ -113,11 +113,12 @@ export class AiCodeCompletionPlugin extends Plugin {
|
|
|
113
113
|
if (this.#aiCodeCompletionCitationsToolbar) {
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
|
-
this.#aiCodeCompletionCitationsToolbar =
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
116
|
+
this.#aiCodeCompletionCitationsToolbar =
|
|
117
|
+
new PanelCommon.AiCodeCompletionSummaryToolbar.AiCodeCompletionSummaryToolbar({
|
|
118
|
+
citationsTooltipId: CITATIONS_TOOLTIP_ID,
|
|
119
|
+
hasTopBorder: true,
|
|
120
|
+
panel: AiCodeCompletion.AiCodeCompletion.ContextFlavor.SOURCES
|
|
121
|
+
});
|
|
121
122
|
this.#aiCodeCompletionCitationsToolbar.show(this.#aiCodeCompletionCitationsToolbarContainer, undefined, true);
|
|
122
123
|
}
|
|
123
124
|
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
7
|
import type * as Platform from '../../core/platform/platform.js';
|
|
8
|
-
import * as Root from '../../core/root/root.js';
|
|
9
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
10
9
|
import type * as Protocol from '../../generated/protocol.js';
|
|
11
10
|
import * as CrUXManager from '../../models/crux-manager/crux-manager.js';
|
|
@@ -254,7 +253,7 @@ export class TimelineController implements Tracing.TracingManager.TracingManager
|
|
|
254
253
|
if (options.enableJSSampling) {
|
|
255
254
|
categoriesArray.push(disabledByDefault('v8.cpu_profiler'));
|
|
256
255
|
}
|
|
257
|
-
if (
|
|
256
|
+
if (Common.Settings.Settings.instance().moduleSetting('timeline-invalidation-tracking').get() as boolean) {
|
|
258
257
|
categoriesArray.push(disabledByDefault('devtools.timeline.invalidationTracking'));
|
|
259
258
|
}
|
|
260
259
|
if (options.capturePictures) {
|
|
@@ -740,7 +740,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
740
740
|
#instantiateNewModel(): Trace.TraceModel.Model {
|
|
741
741
|
const config = Trace.Types.Configuration.defaults();
|
|
742
742
|
config.showAllEvents = Common.Settings.Settings.instance().moduleSetting('timeline-show-all-events').get();
|
|
743
|
-
config.debugMode =
|
|
743
|
+
config.debugMode = Common.Settings.Settings.instance().moduleSetting('timeline-debug-mode').get() as boolean;
|
|
744
744
|
|
|
745
745
|
const traceEngineModel = Trace.TraceModel.Model.createWithAllHandlers(config);
|
|
746
746
|
|