chrome-devtools-frontend 1.0.1679060 → 1.0.1681091
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/AUTHORS +1 -0
- package/front_end/core/platform/TypescriptUtilities.ts +0 -9
- package/front_end/core/platform/platform.ts +1 -1
- package/front_end/core/root/Runtime.ts +5 -0
- package/front_end/core/sdk/CSSMetadata.ts +1 -6
- package/front_end/core/sdk/ConsoleModel.ts +6 -3
- package/front_end/core/sdk/DOMModel.ts +146 -3
- package/front_end/core/sdk/EmulationModel.ts +22 -11
- package/front_end/core/sdk/NetworkManager.ts +7 -6
- package/front_end/core/sdk/PageResourceLoader.ts +4 -3
- package/front_end/core/sdk/RuntimeModel.ts +5 -3
- package/front_end/core/sdk/SDKSettings.ts +113 -0
- package/front_end/core/sdk/sdk-meta.ts +0 -568
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +23 -19
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +417 -0
- package/front_end/entrypoints/main/MainImpl.ts +1 -1
- package/front_end/generated/InspectorBackendCommands.ts +4 -2
- package/front_end/generated/SupportedCSSProperties.ts +20 -0
- package/front_end/generated/protocol-mapping.d.ts +7 -0
- package/front_end/generated/protocol-proxy-api.d.ts +5 -0
- package/front_end/generated/protocol.ts +16 -3
- package/front_end/models/emulation/DeviceModeModel.ts +9 -2
- package/front_end/models/issues_manager/FederatedAuthRequestIssue.ts +48 -0
- package/front_end/models/issues_manager/descriptions/federatedAuthRequestAccountsBlockedByConnectionAllowlist.md +1 -0
- package/front_end/models/issues_manager/descriptions/federatedAuthRequestConfigBlockedByConnectionAllowlist.md +1 -0
- package/front_end/models/issues_manager/descriptions/federatedAuthRequestIdTokenBlockedByConnectionAllowlist.md +1 -0
- package/front_end/models/issues_manager/descriptions/federatedAuthRequestWellKnownBlockedByConnectionAllowlist.md +1 -0
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +4 -0
- package/front_end/panels/console/ConsoleView.ts +2 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +56 -20
- package/front_end/panels/console/console-meta.ts +10 -5
- package/front_end/panels/console/consoleView.css +4 -2
- package/front_end/panels/elements/DOMTreeContextMenu.ts +541 -0
- package/front_end/panels/elements/ElementsTreeElement.ts +27 -494
- package/front_end/panels/elements/ElementsTreeOutline.ts +173 -287
- package/front_end/panels/elements/StylesSidebarPane.ts +2 -1
- package/front_end/panels/elements/elements.ts +3 -0
- package/front_end/panels/emulation/DeviceModeView.ts +11 -2
- package/front_end/panels/emulation/InspectedPagePlaceholder.ts +0 -10
- package/front_end/panels/issues/AffectedBlockedByResponseView.ts +6 -6
- package/front_end/panels/issues/AffectedCookiesView.ts +8 -8
- package/front_end/panels/issues/AffectedDescendantsWithinSelectElementView.ts +2 -2
- package/front_end/panels/issues/AffectedDirectivesView.ts +11 -12
- package/front_end/panels/issues/AffectedDocumentsInQuirksModeView.ts +4 -4
- package/front_end/panels/issues/AffectedElementsView.ts +1 -1
- package/front_end/panels/issues/AffectedHeavyAdView.ts +10 -14
- package/front_end/panels/issues/AffectedLazyLoadImagesView.ts +1 -1
- package/front_end/panels/issues/AffectedMetadataAllowedSitesView.ts +1 -5
- package/front_end/panels/issues/AffectedPartitioningBlobURLView.ts +4 -4
- package/front_end/panels/issues/AffectedPermissionElementsView.ts +1 -1
- package/front_end/panels/issues/AffectedResourcesView.ts +5 -5
- package/front_end/panels/issues/AffectedSelectivePermissionsInterventionView.ts +9 -9
- package/front_end/panels/issues/AffectedSharedArrayBufferIssueDetailsView.ts +15 -14
- package/front_end/panels/issues/AffectedSourcesView.ts +1 -1
- package/front_end/panels/issues/AffectedTrackingSitesView.ts +1 -5
- package/front_end/panels/issues/CorsIssueDetailsView.ts +60 -56
- package/front_end/panels/issues/GenericIssueDetailsView.ts +3 -3
- package/front_end/panels/issues/HiddenIssuesRow.ts +2 -2
- package/front_end/panels/issues/IssueKindView.ts +6 -6
- package/front_end/panels/issues/IssueView.ts +15 -16
- package/front_end/panels/issues/IssuesPane.ts +32 -37
- package/front_end/panels/issues/components/HideIssuesMenu.ts +1 -1
- package/front_end/panels/issues/issues-meta.ts +2 -2
- package/front_end/panels/mobile_throttling/NetworkPanelIndicator.ts +3 -1
- package/front_end/panels/network/NetworkConfigView.ts +2 -1
- package/front_end/panels/network/NetworkPanel.ts +1 -1
- package/front_end/panels/network/network-meta.ts +60 -0
- package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +107 -91
- package/front_end/panels/profiler/HeapDetachedElementsView.ts +4 -7
- package/front_end/panels/profiler/ProfileLauncherView.ts +19 -16
- package/front_end/panels/profiler/ProfileSidebarTreeElement.ts +1 -1
- package/front_end/panels/profiler/heapDetachedElementsDataGrid.css +14 -0
- package/front_end/panels/security/security.ts +6 -0
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +38 -29
- package/front_end/panels/sources/SourcesView.ts +24 -119
- package/front_end/panels/sources/TabbedEditorContainer.ts +110 -7
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +214 -51
- package/front_end/panels/sources/sources-meta.ts +16 -0
- package/front_end/panels/timeline/TimelineLoader.ts +1 -1
- package/front_end/panels/timeline/TimelineUIUtils.ts +6 -0
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +4 -3
- package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -1
- package/front_end/panels/timeline/components/MetricCard.ts +4 -3
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +5 -2
- package/front_end/panels/timeline/components/TimelineRangeSummaryView.ts +1 -1
- package/front_end/panels/timeline/components/TimelineSummary.ts +8 -5
- package/front_end/panels/whats_new/ReleaseNoteText.ts +9 -15
- package/front_end/panels/whats_new/resources/WNDT.md +5 -8
- 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/es5-iife/puppeteer-core-browser.d.ts +8 -0
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +33 -18
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Frame.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js +11 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/environment.d.ts +16 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/environment.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/environment.js +16 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/environment.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js +5 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/FirefoxLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/FirefoxLauncher.js +0 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/FirefoxLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/PuppeteerNode.d.ts +8 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/PuppeteerNode.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/PuppeteerNode.js +11 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/PuppeteerNode.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.d.ts +1 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.js +1 -10
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ScreenRecorder.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/util/fs.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/util/fs.js +2 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/util/fs.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node-env-setup.js +69 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node-env-setup.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +8 -0
- package/front_end/third_party/puppeteer/package/package.json +2 -2
- package/front_end/third_party/puppeteer/package/src/api/Frame.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +15 -4
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +1 -2
- package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +1 -4
- package/front_end/third_party/puppeteer/package/src/common/util.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/environment.ts +35 -5
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +5 -0
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +7 -5
- package/front_end/third_party/puppeteer/package/src/node/FirefoxLauncher.ts +0 -1
- package/front_end/third_party/puppeteer/package/src/node/PuppeteerNode.ts +12 -0
- package/front_end/third_party/puppeteer/package/src/node/ScreenRecorder.ts +0 -14
- package/front_end/third_party/puppeteer/package/src/node/util/fs.ts +2 -1
- package/front_end/third_party/puppeteer/package/src/node-env-setup.ts +97 -1
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/comments/CommentAnchorResolver.ts +1 -2
- package/front_end/ui/comments/CommentOverlayManager.ts +30 -9
- package/front_end/ui/legacy/TabbedPane.ts +34 -2
- package/front_end/ui/legacy/TextPrompt.ts +1 -1
- package/front_end/ui/legacy/Treeoutline.ts +22 -10
- package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +5 -6
- package/front_end/ui/legacy/components/inline_editor/ColorSwatch.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +9 -4
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +11 -43
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +5 -5
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +7 -7
- package/front_end/ui/legacy/components/quick_open/QuickOpen.ts +1 -1
- package/front_end/ui/legacy/components/quick_open/quick_open-meta.ts +2 -2
- package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +2 -2
- package/front_end/ui/visual_logging/KnownContextValues.ts +29 -0
- package/mcp/mcp.ts +2 -0
- package/package.json +1 -1
package/AUTHORS
CHANGED
|
@@ -24,6 +24,7 @@ Anna Agoha <annaagoha@gmail.com>
|
|
|
24
24
|
Anthony Xie <anthonyxie64@gmail.com>
|
|
25
25
|
Axel Chong <haxatron1@gmail.com>
|
|
26
26
|
Anton Bershanskyi <bershanskyi@gmail.com>
|
|
27
|
+
Ashish Shrees <flowoker1@gmail.com>
|
|
27
28
|
Aviv Keller <me@aviv.sh>
|
|
28
29
|
Biboswan Roy <biboswan98@gmail.com>
|
|
29
30
|
Boris Verkhovskiy <boris.verk@gmail.com>
|
|
@@ -17,15 +17,6 @@ export function assertNever(_type: never, message: string): never {
|
|
|
17
17
|
throw new Error(message);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
/**
|
|
21
|
-
* This is useful to check on the type-level that the unhandled cases of
|
|
22
|
-
* a switch are exactly `T` (where T is usually a union type of enum values).
|
|
23
|
-
* @param caseVariable
|
|
24
|
-
*/
|
|
25
|
-
export function assertUnhandled<T>(_caseVariable: T): T {
|
|
26
|
-
return _caseVariable;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
20
|
export type FieldsThatExtend<Type, Selector> = {
|
|
30
21
|
[Key in keyof Type]: Type[Key] extends Selector ? Key : never;
|
|
31
22
|
}[keyof Type];
|
|
@@ -24,7 +24,7 @@ import * as UserVisibleError from './UserVisibleError.js';
|
|
|
24
24
|
* `Platform.TypeScriptUtilities.assertNotNullOrUndefined` causes a compile
|
|
25
25
|
* error).
|
|
26
26
|
*/
|
|
27
|
-
export {assertNever, assertNotNullOrUndefined
|
|
27
|
+
export {assertNever, assertNotNullOrUndefined} from './TypescriptUtilities.js';
|
|
28
28
|
export {
|
|
29
29
|
ArrayUtilities,
|
|
30
30
|
Brand,
|
|
@@ -544,6 +544,10 @@ interface DevToolsAriaLiveRecording {
|
|
|
544
544
|
enabled: boolean;
|
|
545
545
|
}
|
|
546
546
|
|
|
547
|
+
interface DevToolsMobileSafeAreaEmulation {
|
|
548
|
+
enabled: boolean;
|
|
549
|
+
}
|
|
550
|
+
|
|
547
551
|
/**
|
|
548
552
|
* The host configuration that we expect from the DevTools back-end.
|
|
549
553
|
*
|
|
@@ -601,6 +605,7 @@ export type HostConfig = Platform.TypeScriptUtilities.RecursivePartial<{
|
|
|
601
605
|
devToolsPlusButton: DevToolsPlusButton,
|
|
602
606
|
devToolsAriaLiveRecording: DevToolsAriaLiveRecording,
|
|
603
607
|
devToolsInstrumentationBreakpoints: DevToolsInstrumentationBreakpoints,
|
|
608
|
+
devToolsMobileSafeAreaEmulation: DevToolsMobileSafeAreaEmulation,
|
|
604
609
|
extensionsOnChromeUrls: ExtensionsOnChromeUrls,
|
|
605
610
|
devToolsComments: HostConfigDevToolsComments,
|
|
606
611
|
}>;
|
|
@@ -160,7 +160,7 @@ export class CSSMetadata {
|
|
|
160
160
|
if (partialValueKeywordsNoPresets.get(name)?.has(value)) {
|
|
161
161
|
return false;
|
|
162
162
|
}
|
|
163
|
-
return
|
|
163
|
+
return true;
|
|
164
164
|
})
|
|
165
165
|
.sort(CSSMetadata.sortPrefixesAndCSSWideKeywordsToEnd);
|
|
166
166
|
const presets = values.map(value => `${name}: ${value}`);
|
|
@@ -340,11 +340,6 @@ export class CSSMetadata {
|
|
|
340
340
|
let keywords: (string[]|undefined) = propertyValues.get(propertyName) || propertyValues.get(unprefixedName);
|
|
341
341
|
if (!keywords) {
|
|
342
342
|
keywords = [];
|
|
343
|
-
for (const commonKeyword of CommonKeywords) {
|
|
344
|
-
if (CSS.supports(propertyName, commonKeyword)) {
|
|
345
|
-
keywords.push(commonKeyword);
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
343
|
propertyValues.set(propertyName, keywords);
|
|
349
344
|
}
|
|
350
345
|
return keywords;
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
RuntimeModel,
|
|
35
35
|
} from './RuntimeModel.js';
|
|
36
36
|
import {SDKModel} from './SDKModel.js';
|
|
37
|
-
import {preserveConsoleLogSettingDescriptor} from './SDKSettings.js';
|
|
37
|
+
import {consoleUserActivationEvalSettingDescriptor, preserveConsoleLogSettingDescriptor} from './SDKSettings.js';
|
|
38
38
|
import {Capability, type Target, Type} from './Target.js';
|
|
39
39
|
import type {TargetManager} from './TargetManager.js';
|
|
40
40
|
|
|
@@ -156,13 +156,16 @@ export class ConsoleModel extends SDKModel<EventTypes> {
|
|
|
156
156
|
replMode: true,
|
|
157
157
|
allowUnsafeEvalBlockedByCSP: false,
|
|
158
158
|
},
|
|
159
|
-
this.target().targetManager().settings.
|
|
159
|
+
this.target().targetManager().settings.resolve(consoleUserActivationEvalSettingDescriptor).get(),
|
|
160
160
|
/* awaitPromise */ false);
|
|
161
161
|
Host.userMetrics.actionTaken(Host.UserMetrics.Action.ConsoleEvaluated);
|
|
162
162
|
if ('error' in result) {
|
|
163
163
|
return;
|
|
164
164
|
}
|
|
165
|
-
|
|
165
|
+
try {
|
|
166
|
+
await this.#console.showPromise();
|
|
167
|
+
} catch {
|
|
168
|
+
}
|
|
166
169
|
this.dispatchEventToListeners(
|
|
167
170
|
Events.CommandEvaluated,
|
|
168
171
|
{result: result.object, commandMessage: originatingMessage, exceptionDetails: result.exceptionDetails});
|
|
@@ -140,6 +140,47 @@ export interface DOMNodeEventTypes {
|
|
|
140
140
|
[DOMNodeEvents.CONTAINER_QUERY_OVERLAY_STATE_CHANGED]: {enabled: boolean};
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
+
export function cssEscape(value: string): string {
|
|
144
|
+
const length = value.length;
|
|
145
|
+
let index = -1;
|
|
146
|
+
let codeUnit: number;
|
|
147
|
+
let result = '';
|
|
148
|
+
const firstCodeUnit = value.charCodeAt(0);
|
|
149
|
+
|
|
150
|
+
if (length === 0) {
|
|
151
|
+
return '';
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
if (length === 1 && firstCodeUnit === 0x002D) {
|
|
155
|
+
return '\\' + value;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
while (++index < length) {
|
|
159
|
+
codeUnit = value.charCodeAt(index);
|
|
160
|
+
if (codeUnit === 0x0000) {
|
|
161
|
+
result += '\uFFFD';
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if ((codeUnit >= 0x0001 && codeUnit <= 0x001F) || codeUnit === 0x007F ||
|
|
166
|
+
(index === 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039) ||
|
|
167
|
+
(index === 1 && codeUnit >= 0x0030 && codeUnit <= 0x0039 && firstCodeUnit === 0x002D)) {
|
|
168
|
+
result += '\\' + codeUnit.toString(16) + ' ';
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
if (codeUnit >= 0x0080 || codeUnit === 0x002D || codeUnit === 0x005F ||
|
|
173
|
+
(codeUnit >= 0x0030 && codeUnit <= 0x0039) || (codeUnit >= 0x0041 && codeUnit <= 0x005A) ||
|
|
174
|
+
(codeUnit >= 0x0061 && codeUnit <= 0x007A)) {
|
|
175
|
+
result += value.charAt(index);
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
result += '\\' + value.charAt(index);
|
|
180
|
+
}
|
|
181
|
+
return result;
|
|
182
|
+
}
|
|
183
|
+
|
|
143
184
|
export class DOMNode extends Common.ObjectWrapper.ObjectWrapper<DOMNodeEventTypes> {
|
|
144
185
|
#domModel: DOMModel;
|
|
145
186
|
readonly #frameManager: FrameManager;
|
|
@@ -1025,6 +1066,102 @@ export class DOMNode extends Common.ObjectWrapper.ObjectWrapper<DOMNodeEventType
|
|
|
1025
1066
|
});
|
|
1026
1067
|
}
|
|
1027
1068
|
|
|
1069
|
+
duplicate(): void {
|
|
1070
|
+
if (this.isInShadowTree()) {
|
|
1071
|
+
return;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
const parentNode = this.parentNode ? this.parentNode : this;
|
|
1075
|
+
if (parentNode.nodeName() === '#document') {
|
|
1076
|
+
return;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
this.copyTo(parentNode, this.nextSibling);
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* Runs a script on the node's remote object that toggles a class name on
|
|
1084
|
+
* the node and injects a stylesheet into the head of the node's document
|
|
1085
|
+
* containing a rule to set "visibility: hidden" on the class and all it's
|
|
1086
|
+
* ancestors.
|
|
1087
|
+
*/
|
|
1088
|
+
async toggleHideElement(): Promise<void> {
|
|
1089
|
+
let pseudoElementName = this.pseudoType() ? this.nodeName() : null;
|
|
1090
|
+
if (pseudoElementName && this.pseudoIdentifier()) {
|
|
1091
|
+
pseudoElementName += `(${this.pseudoIdentifier()})`;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
let effectiveNode: DOMNode|null = this;
|
|
1095
|
+
while (effectiveNode?.pseudoType()) {
|
|
1096
|
+
if (effectiveNode !== this && effectiveNode.pseudoType() === 'column') {
|
|
1097
|
+
// Ideally we would select the specific column pseudo element, but
|
|
1098
|
+
// we don't have a way to do that at the moment.
|
|
1099
|
+
pseudoElementName = '::column' + pseudoElementName;
|
|
1100
|
+
}
|
|
1101
|
+
effectiveNode = effectiveNode.parentNode;
|
|
1102
|
+
}
|
|
1103
|
+
if (!effectiveNode) {
|
|
1104
|
+
return;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
const hidden = this.marker('hidden-marker');
|
|
1108
|
+
const object = await effectiveNode.resolveToObject('');
|
|
1109
|
+
|
|
1110
|
+
if (!object) {
|
|
1111
|
+
return;
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
await object.callFunction((toggleClassAndInjectStyleRule as (this: Object, ...arg1: unknown[]) => void),
|
|
1115
|
+
[{value: pseudoElementName}, {value: !hidden}]);
|
|
1116
|
+
object.release();
|
|
1117
|
+
this.setMarker('hidden-marker', hidden ? null : true);
|
|
1118
|
+
|
|
1119
|
+
function toggleClassAndInjectStyleRule(this: Element, pseudoElementName: string|null, hidden: boolean): void {
|
|
1120
|
+
const classNamePrefix = '__web-inspector-hide';
|
|
1121
|
+
const classNameSuffix = '-shortcut__';
|
|
1122
|
+
const styleTagId = '__web-inspector-hide-shortcut-style__';
|
|
1123
|
+
const pseudoElementNameEscaped = pseudoElementName ? pseudoElementName.replace(/[\(\)\:]/g, '_') : '';
|
|
1124
|
+
const className = classNamePrefix + pseudoElementNameEscaped + classNameSuffix;
|
|
1125
|
+
this.classList.toggle(className, hidden);
|
|
1126
|
+
|
|
1127
|
+
let localRoot: Element|HTMLHeadElement = this;
|
|
1128
|
+
while (localRoot.parentNode) {
|
|
1129
|
+
localRoot = (localRoot.parentNode as Element);
|
|
1130
|
+
}
|
|
1131
|
+
if (localRoot.nodeType === Node.DOCUMENT_NODE) {
|
|
1132
|
+
localRoot = document.head;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
let style = localRoot.querySelector('style#' + styleTagId);
|
|
1136
|
+
if (!style) {
|
|
1137
|
+
const selectors = [];
|
|
1138
|
+
selectors.push('.__web-inspector-hide-shortcut__');
|
|
1139
|
+
selectors.push('.__web-inspector-hide-shortcut__ *');
|
|
1140
|
+
const selector = selectors.join(', ');
|
|
1141
|
+
const ruleBody = ' visibility: hidden !important;';
|
|
1142
|
+
const rule = '\n' + selector + '\n{\n' + ruleBody + '\n}\n';
|
|
1143
|
+
|
|
1144
|
+
style = document.createElement('style');
|
|
1145
|
+
style.id = styleTagId;
|
|
1146
|
+
style.textContent = rule;
|
|
1147
|
+
|
|
1148
|
+
localRoot.appendChild(style);
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
// In addition to putting them on the element we want to hide, we will
|
|
1152
|
+
// also add pseudo element classes to the style element to keep track of
|
|
1153
|
+
// which pseudo elements we have style rules for.
|
|
1154
|
+
if (pseudoElementName && !style.classList.contains(className)) {
|
|
1155
|
+
style.classList.add(className);
|
|
1156
|
+
style.textContent = `.${className}${pseudoElementName}, ${style.textContent}`;
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
isToggledToHidden(): boolean {
|
|
1162
|
+
return Boolean(this.marker('hidden-marker'));
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1028
1165
|
isXMLNode(): boolean {
|
|
1029
1166
|
return Boolean(this.#xmlVersion);
|
|
1030
1167
|
}
|
|
@@ -1243,14 +1380,14 @@ export class DOMNode extends Common.ObjectWrapper.ObjectWrapper<DOMNodeEventType
|
|
|
1243
1380
|
const classes = this.getAttribute('class');
|
|
1244
1381
|
|
|
1245
1382
|
if (lowerCaseName === 'input' && type && !id && !classes) {
|
|
1246
|
-
return lowerCaseName + '[type="' +
|
|
1383
|
+
return lowerCaseName + '[type="' + cssEscape(type) + '"]';
|
|
1247
1384
|
}
|
|
1248
1385
|
if (id) {
|
|
1249
|
-
return lowerCaseName + '#' +
|
|
1386
|
+
return lowerCaseName + '#' + cssEscape(id);
|
|
1250
1387
|
}
|
|
1251
1388
|
if (classes) {
|
|
1252
1389
|
const classList = classes.trim().split(/\s+/g);
|
|
1253
|
-
return (lowerCaseName === 'div' ? '' : lowerCaseName) + '.' + classList.map(cls =>
|
|
1390
|
+
return (lowerCaseName === 'div' ? '' : lowerCaseName) + '.' + classList.map(cls => cssEscape(cls)).join('.');
|
|
1254
1391
|
}
|
|
1255
1392
|
if (this.pseudoIdentifier()) {
|
|
1256
1393
|
return `${lowerCaseName}(${this.pseudoIdentifier()})`;
|
|
@@ -2384,6 +2521,9 @@ export class DOMNodeSnapshot extends DOMNode {
|
|
|
2384
2521
|
_callback?: ((arg0: string|null, arg1: DOMNode|null) => void)|undefined): void {
|
|
2385
2522
|
}
|
|
2386
2523
|
|
|
2524
|
+
override duplicate(): void {
|
|
2525
|
+
}
|
|
2526
|
+
|
|
2387
2527
|
override canInspectNode(): boolean {
|
|
2388
2528
|
return false;
|
|
2389
2529
|
}
|
|
@@ -2433,6 +2573,9 @@ export class DOMDocumentSnapshot extends DOMDocument {
|
|
|
2433
2573
|
_callback?: ((arg0: string|null, arg1: DOMNode|null) => void)|undefined): void {
|
|
2434
2574
|
}
|
|
2435
2575
|
|
|
2576
|
+
override duplicate(): void {
|
|
2577
|
+
}
|
|
2578
|
+
|
|
2436
2579
|
override canInspectNode(): boolean {
|
|
2437
2580
|
return false;
|
|
2438
2581
|
}
|
|
@@ -10,14 +10,25 @@ import type {MultitargetNetworkManager} from './NetworkManager.js';
|
|
|
10
10
|
import {Events, OverlayModel} from './OverlayModel.js';
|
|
11
11
|
import {SDKModel} from './SDKModel.js';
|
|
12
12
|
import {
|
|
13
|
+
avifFormatDisabledSettingDescriptor,
|
|
13
14
|
cpuPressureSettingDescriptor,
|
|
15
|
+
emulateAutoDarkModeSettingDescriptor,
|
|
16
|
+
emulatedCSSMediaFeatureColorGamutSettingDescriptor,
|
|
14
17
|
emulatedCSSMediaFeatureForcedColorsSettingDescriptor,
|
|
15
18
|
emulatedCSSMediaFeaturePrefersColorSchemeSettingDescriptor,
|
|
19
|
+
emulatedCSSMediaFeaturePrefersContrastSettingDescriptor,
|
|
20
|
+
emulatedCSSMediaFeaturePrefersReducedDataSettingDescriptor,
|
|
16
21
|
emulatedCSSMediaFeaturePrefersReducedMotionSettingDescriptor,
|
|
22
|
+
emulatedCSSMediaFeaturePrefersReducedTransparencySettingDescriptor,
|
|
17
23
|
emulatedCSSMediaSettingDescriptor,
|
|
24
|
+
emulatedOSTextScaleSettingDescriptor,
|
|
25
|
+
emulatedVisionDeficiencySettingDescriptor,
|
|
18
26
|
idleDetectionSettingDescriptor,
|
|
19
27
|
javaScriptDisabledSettingDescriptor,
|
|
28
|
+
jpegXlFormatDisabledSettingDescriptor,
|
|
29
|
+
localFontsDisabledSettingDescriptor,
|
|
20
30
|
touchSettingDescriptor,
|
|
31
|
+
webpFormatDisabledSettingDescriptor,
|
|
21
32
|
} from './SDKSettings.js';
|
|
22
33
|
import {Capability, type Target} from './Target.js';
|
|
23
34
|
|
|
@@ -111,16 +122,16 @@ export class EmulationModel extends SDKModel<EmulationModelEventTypes> implement
|
|
|
111
122
|
});
|
|
112
123
|
|
|
113
124
|
const mediaTypeSetting = settings.resolve(emulatedCSSMediaSettingDescriptor);
|
|
114
|
-
const mediaFeatureColorGamutSetting = settings.
|
|
125
|
+
const mediaFeatureColorGamutSetting = settings.resolve(emulatedCSSMediaFeatureColorGamutSettingDescriptor);
|
|
115
126
|
const mediaFeaturePrefersColorSchemeSetting =
|
|
116
127
|
settings.resolve(emulatedCSSMediaFeaturePrefersColorSchemeSettingDescriptor);
|
|
117
128
|
const mediaFeatureForcedColorsSetting = settings.resolve(emulatedCSSMediaFeatureForcedColorsSettingDescriptor);
|
|
118
129
|
const mediaFeaturePrefersContrastSetting =
|
|
119
|
-
settings.
|
|
130
|
+
settings.resolve(emulatedCSSMediaFeaturePrefersContrastSettingDescriptor);
|
|
120
131
|
const mediaFeaturePrefersReducedDataSetting =
|
|
121
|
-
settings.
|
|
132
|
+
settings.resolve(emulatedCSSMediaFeaturePrefersReducedDataSettingDescriptor);
|
|
122
133
|
const mediaFeaturePrefersReducedTransparencySetting =
|
|
123
|
-
settings.
|
|
134
|
+
settings.resolve(emulatedCSSMediaFeaturePrefersReducedTransparencySettingDescriptor);
|
|
124
135
|
const mediaFeaturePrefersReducedMotionSetting =
|
|
125
136
|
settings.resolve(emulatedCSSMediaFeaturePrefersReducedMotionSettingDescriptor);
|
|
126
137
|
// Note: this uses a different format than what the CDP API expects,
|
|
@@ -171,7 +182,7 @@ export class EmulationModel extends SDKModel<EmulationModelEventTypes> implement
|
|
|
171
182
|
});
|
|
172
183
|
void this.updateCssMedia();
|
|
173
184
|
|
|
174
|
-
const autoDarkModeSetting = settings.
|
|
185
|
+
const autoDarkModeSetting = settings.resolve(emulateAutoDarkModeSettingDescriptor);
|
|
175
186
|
autoDarkModeSetting.addChangeListener(() => {
|
|
176
187
|
const enabled = autoDarkModeSetting.get();
|
|
177
188
|
mediaFeaturePrefersColorSchemeSetting.set(enabled ? 'dark' : '');
|
|
@@ -182,13 +193,13 @@ export class EmulationModel extends SDKModel<EmulationModelEventTypes> implement
|
|
|
182
193
|
void this.emulateAutoDarkMode(true);
|
|
183
194
|
}
|
|
184
195
|
|
|
185
|
-
const visionDeficiencySetting = settings.
|
|
196
|
+
const visionDeficiencySetting = settings.resolve(emulatedVisionDeficiencySettingDescriptor);
|
|
186
197
|
visionDeficiencySetting.addChangeListener(() => this.emulateVisionDeficiency(visionDeficiencySetting.get()));
|
|
187
198
|
if (visionDeficiencySetting.get()) {
|
|
188
199
|
void this.emulateVisionDeficiency(visionDeficiencySetting.get());
|
|
189
200
|
}
|
|
190
201
|
|
|
191
|
-
const osTextScaleSetting = settings.
|
|
202
|
+
const osTextScaleSetting = settings.resolve(emulatedOSTextScaleSettingDescriptor);
|
|
192
203
|
osTextScaleSetting.addChangeListener(() => {
|
|
193
204
|
void this.emulateOSTextScale(parseFloat(osTextScaleSetting.get()) || undefined);
|
|
194
205
|
});
|
|
@@ -196,15 +207,15 @@ export class EmulationModel extends SDKModel<EmulationModelEventTypes> implement
|
|
|
196
207
|
void this.emulateOSTextScale(parseFloat(osTextScaleSetting.get()) || undefined);
|
|
197
208
|
}
|
|
198
209
|
|
|
199
|
-
const localFontsDisabledSetting = settings.
|
|
210
|
+
const localFontsDisabledSetting = settings.resolve(localFontsDisabledSettingDescriptor);
|
|
200
211
|
localFontsDisabledSetting.addChangeListener(() => this.setLocalFontsDisabled(localFontsDisabledSetting.get()));
|
|
201
212
|
if (localFontsDisabledSetting.get()) {
|
|
202
213
|
this.setLocalFontsDisabled(localFontsDisabledSetting.get());
|
|
203
214
|
}
|
|
204
215
|
|
|
205
|
-
const avifFormatDisabledSetting = settings.
|
|
206
|
-
const jpegXlFormatDisabledSetting = settings.
|
|
207
|
-
const webpFormatDisabledSetting = settings.
|
|
216
|
+
const avifFormatDisabledSetting = settings.resolve(avifFormatDisabledSettingDescriptor);
|
|
217
|
+
const jpegXlFormatDisabledSetting = settings.resolve(jpegXlFormatDisabledSettingDescriptor);
|
|
218
|
+
const webpFormatDisabledSetting = settings.resolve(webpFormatDisabledSettingDescriptor);
|
|
208
219
|
|
|
209
220
|
const updateDisabledImageFormats = (): void => {
|
|
210
221
|
const types = [];
|
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
} from './NetworkRequest.js';
|
|
27
27
|
import {type ExecutionContext, RuntimeModel} from './RuntimeModel.js';
|
|
28
28
|
import {SDKModel} from './SDKModel.js';
|
|
29
|
+
import {cacheDisabledSettingDescriptor, requestBlockingEnabledSettingDescriptor} from './SDKSettings.js';
|
|
29
30
|
import {Capability, type Target} from './Target.js';
|
|
30
31
|
import {type SDKModelObserver, TargetManager} from './TargetManager.js';
|
|
31
32
|
|
|
@@ -187,7 +188,7 @@ export class NetworkManager extends SDKModel<EventTypes> {
|
|
|
187
188
|
const settings = this.target().targetManager().settings;
|
|
188
189
|
this.activeNetworkThrottlingKey = activeNetworkThrottlingKeySetting(settings);
|
|
189
190
|
|
|
190
|
-
if (settings.
|
|
191
|
+
if (settings.resolve(cacheDisabledSettingDescriptor).get()) {
|
|
191
192
|
void this.#networkAgent.invoke_setCacheDisabled({cacheDisabled: true});
|
|
192
193
|
}
|
|
193
194
|
|
|
@@ -211,7 +212,7 @@ export class NetworkManager extends SDKModel<EventTypes> {
|
|
|
211
212
|
}
|
|
212
213
|
this.#bypassServiceWorkerSetting.addChangeListener(this.bypassServiceWorkerChanged, this);
|
|
213
214
|
|
|
214
|
-
settings.
|
|
215
|
+
settings.resolve(cacheDisabledSettingDescriptor).addChangeListener(this.cacheDisabledSettingChanged, this);
|
|
215
216
|
}
|
|
216
217
|
|
|
217
218
|
static forRequest(request: NetworkRequest): NetworkManager|null {
|
|
@@ -555,7 +556,7 @@ export class NetworkManager extends SDKModel<EventTypes> {
|
|
|
555
556
|
|
|
556
557
|
override dispose(): void {
|
|
557
558
|
const settings = this.target().targetManager().settings;
|
|
558
|
-
settings.
|
|
559
|
+
settings.resolve(cacheDisabledSettingDescriptor).removeChangeListener(this.cacheDisabledSettingChanged, this);
|
|
559
560
|
settings.moduleSetting('network-log.preserve-log').removeChangeListener(this.preserveLogChanged, this);
|
|
560
561
|
}
|
|
561
562
|
|
|
@@ -1992,7 +1993,7 @@ export class RequestConditions extends Common.ObjectWrapper.ObjectWrapper<Reques
|
|
|
1992
1993
|
constructor(settings: Common.Settings.Settings) {
|
|
1993
1994
|
super();
|
|
1994
1995
|
this.#setting = settings.createSetting<RequestConditionsSetting[]>('network-blocked-patterns', []);
|
|
1995
|
-
this.#conditionsEnabledSetting = settings.
|
|
1996
|
+
this.#conditionsEnabledSetting = settings.resolve(requestBlockingEnabledSettingDescriptor);
|
|
1996
1997
|
for (const condition of this.#setting.get()) {
|
|
1997
1998
|
try {
|
|
1998
1999
|
this.#conditions.push(RequestCondition.createFromSetting(condition, settings));
|
|
@@ -2433,8 +2434,8 @@ export class MultitargetNetworkManager extends Common.ObjectWrapper.ObjectWrappe
|
|
|
2433
2434
|
|
|
2434
2435
|
private async updateInterceptionPatterns(): Promise<void> {
|
|
2435
2436
|
const settings = this.#targetManager.settings;
|
|
2436
|
-
if (!settings.
|
|
2437
|
-
settings.
|
|
2437
|
+
if (!settings.resolve(cacheDisabledSettingDescriptor).get()) {
|
|
2438
|
+
settings.resolve(cacheDisabledSettingDescriptor).set(true);
|
|
2438
2439
|
}
|
|
2439
2440
|
this.#updatingInterceptionPatternsPromise = null;
|
|
2440
2441
|
const promises = ([] as Array<Promise<unknown>>);
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
type ResourceTreeFrame,
|
|
18
18
|
ResourceTreeModel,
|
|
19
19
|
} from './ResourceTreeModel.js';
|
|
20
|
+
import {cacheDisabledSettingDescriptor, enableRemoteFileLoadingSettingDescriptor} from './SDKSettings.js';
|
|
20
21
|
import type {Target} from './Target.js';
|
|
21
22
|
import {TargetManager} from './TargetManager.js';
|
|
22
23
|
|
|
@@ -433,7 +434,7 @@ export class PageResourceLoader extends Common.ObjectWrapper.ObjectWrapper<Event
|
|
|
433
434
|
}> {
|
|
434
435
|
const networkManager = (target.model(NetworkManager) as NetworkManager);
|
|
435
436
|
const ioModel = (target.model(IOModel) as IOModel);
|
|
436
|
-
const disableCache = this.#settings.
|
|
437
|
+
const disableCache = this.#settings.resolve(cacheDisabledSettingDescriptor).get();
|
|
437
438
|
const resource = await networkManager.loadNetworkResource(frameId, url, {disableCache, includeCredentials: true});
|
|
438
439
|
try {
|
|
439
440
|
const content = resource.stream ?
|
|
@@ -470,11 +471,11 @@ export class PageResourceLoader extends Common.ObjectWrapper.ObjectWrapper<Event
|
|
|
470
471
|
headers['User-Agent'] = currentUserAgent;
|
|
471
472
|
}
|
|
472
473
|
|
|
473
|
-
if (this.#settings.
|
|
474
|
+
if (this.#settings.resolve(cacheDisabledSettingDescriptor).get()) {
|
|
474
475
|
headers['Cache-Control'] = 'no-cache';
|
|
475
476
|
}
|
|
476
477
|
|
|
477
|
-
const allowRemoteFilePaths = this.#settings.
|
|
478
|
+
const allowRemoteFilePaths = this.#settings.resolve(enableRemoteFileLoadingSettingDescriptor).get();
|
|
478
479
|
|
|
479
480
|
return await new Promise(
|
|
480
481
|
resolve => Host.ResourceLoader.load(url, headers, (success, _responseHeaders, content, errorDescription) => {
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
ScopeRemoteObject,
|
|
20
20
|
} from './RemoteObject.js';
|
|
21
21
|
import {SDKModel} from './SDKModel.js';
|
|
22
|
+
import {customFormattersSettingDescriptor} from './SDKSettings.js';
|
|
22
23
|
import {Capability, type Target, Type} from './Target.js';
|
|
23
24
|
|
|
24
25
|
export class RuntimeModel extends SDKModel<EventTypes> {
|
|
@@ -32,12 +33,13 @@ export class RuntimeModel extends SDKModel<EventTypes> {
|
|
|
32
33
|
this.target().registerRuntimeDispatcher(new RuntimeDispatcher(this));
|
|
33
34
|
void this.agent.invoke_enable();
|
|
34
35
|
|
|
35
|
-
const
|
|
36
|
-
|
|
36
|
+
const customFormattersSetting =
|
|
37
|
+
this.target().targetManager().context.get(Common.Settings.Settings).resolve(customFormattersSettingDescriptor);
|
|
38
|
+
if (customFormattersSetting.get()) {
|
|
37
39
|
void this.agent.invoke_setCustomObjectFormatterEnabled({enabled: true});
|
|
38
40
|
}
|
|
39
41
|
|
|
40
|
-
|
|
42
|
+
customFormattersSetting.addChangeListener(this.customFormattersStateChanged.bind(this));
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
static isSideEffectFailure(response: Protocol.Runtime.EvaluateResponse|EvaluationResult): boolean {
|
|
@@ -2,6 +2,7 @@
|
|
|
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 Protocol from '../../generated/protocol.js';
|
|
5
6
|
import * as Common from '../common/common.js';
|
|
6
7
|
|
|
7
8
|
export const jsSourceMapsEnabledSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
@@ -199,3 +200,115 @@ export const emulatedCSSMediaFeaturePrefersReducedMotionSettingDescriptor: Commo
|
|
|
199
200
|
defaultValue: '',
|
|
200
201
|
storageType: Common.Settings.SettingStorageType.SESSION,
|
|
201
202
|
};
|
|
203
|
+
|
|
204
|
+
export const emulatedCSSMediaFeaturePrefersContrastSettingDescriptor: Common.Settings.SettingDescriptor<string> = {
|
|
205
|
+
name: 'emulated-css-media-feature-prefers-contrast',
|
|
206
|
+
type: Common.Settings.SettingType.ENUM,
|
|
207
|
+
defaultValue: '',
|
|
208
|
+
storageType: Common.Settings.SettingStorageType.SESSION,
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
export const emulatedCSSMediaFeaturePrefersReducedDataSettingDescriptor: Common.Settings.SettingDescriptor<string> = {
|
|
212
|
+
name: 'emulated-css-media-feature-prefers-reduced-data',
|
|
213
|
+
type: Common.Settings.SettingType.ENUM,
|
|
214
|
+
defaultValue: '',
|
|
215
|
+
storageType: Common.Settings.SettingStorageType.SESSION,
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
export const emulatedCSSMediaFeaturePrefersReducedTransparencySettingDescriptor:
|
|
219
|
+
Common.Settings.SettingDescriptor<string> = {
|
|
220
|
+
name: 'emulated-css-media-feature-prefers-reduced-transparency',
|
|
221
|
+
type: Common.Settings.SettingType.ENUM,
|
|
222
|
+
defaultValue: '',
|
|
223
|
+
storageType: Common.Settings.SettingStorageType.SESSION,
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
export const emulatedCSSMediaFeatureColorGamutSettingDescriptor: Common.Settings.SettingDescriptor<string> = {
|
|
227
|
+
name: 'emulated-css-media-feature-color-gamut',
|
|
228
|
+
type: Common.Settings.SettingType.ENUM,
|
|
229
|
+
defaultValue: '',
|
|
230
|
+
storageType: Common.Settings.SettingStorageType.SESSION,
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
export const emulatedVisionDeficiencySettingDescriptor:
|
|
234
|
+
Common.Settings.SettingDescriptor<Protocol.Emulation.SetEmulatedVisionDeficiencyRequestType> = {
|
|
235
|
+
name: 'emulated-vision-deficiency',
|
|
236
|
+
type: Common.Settings.SettingType.ENUM,
|
|
237
|
+
defaultValue: 'none' as Protocol.Emulation.SetEmulatedVisionDeficiencyRequestType,
|
|
238
|
+
storageType: Common.Settings.SettingStorageType.SESSION,
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
export const emulatedOSTextScaleSettingDescriptor: Common.Settings.SettingDescriptor<string> = {
|
|
242
|
+
name: 'emulated-os-text-scale',
|
|
243
|
+
type: Common.Settings.SettingType.ENUM,
|
|
244
|
+
defaultValue: '',
|
|
245
|
+
storageType: Common.Settings.SettingStorageType.SESSION,
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
export const localFontsDisabledSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
249
|
+
name: 'local-fonts-disabled',
|
|
250
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
251
|
+
defaultValue: false,
|
|
252
|
+
storageType: Common.Settings.SettingStorageType.SESSION,
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
export const avifFormatDisabledSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
256
|
+
name: 'avif-format-disabled',
|
|
257
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
258
|
+
defaultValue: false,
|
|
259
|
+
storageType: Common.Settings.SettingStorageType.SESSION,
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
export const jpegXlFormatDisabledSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
263
|
+
name: 'jpeg-xl-format-disabled',
|
|
264
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
265
|
+
defaultValue: false,
|
|
266
|
+
storageType: Common.Settings.SettingStorageType.SESSION,
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
export const webpFormatDisabledSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
270
|
+
name: 'webp-format-disabled',
|
|
271
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
272
|
+
defaultValue: false,
|
|
273
|
+
storageType: Common.Settings.SettingStorageType.SESSION,
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
export const customFormattersSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
277
|
+
name: 'custom-formatters',
|
|
278
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
279
|
+
defaultValue: false,
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
export const requestBlockingEnabledSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
283
|
+
name: 'request-blocking-enabled',
|
|
284
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
285
|
+
defaultValue: false,
|
|
286
|
+
storageType: Common.Settings.SettingStorageType.LOCAL,
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
export const cacheDisabledSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
290
|
+
name: 'cache-disabled',
|
|
291
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
292
|
+
defaultValue: false,
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
export const emulateAutoDarkModeSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
296
|
+
name: 'emulate-auto-dark-mode',
|
|
297
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
298
|
+
defaultValue: false,
|
|
299
|
+
storageType: Common.Settings.SettingStorageType.SESSION,
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
export const enableRemoteFileLoadingSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
303
|
+
name: 'network.enable-remote-file-loading',
|
|
304
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
305
|
+
defaultValue: false,
|
|
306
|
+
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
export const consoleUserActivationEvalSettingDescriptor: Common.Settings.SettingDescriptor<boolean> = {
|
|
310
|
+
name: 'console-user-activation-eval',
|
|
311
|
+
type: Common.Settings.SettingType.BOOLEAN,
|
|
312
|
+
defaultValue: true,
|
|
313
|
+
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
314
|
+
};
|