chrome-devtools-frontend 1.0.1593518 → 1.0.1593959
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/docs/contributing/settings-experiments-features.md +75 -100
- package/front_end/core/host/UserMetrics.ts +1 -2
- package/front_end/core/protocol_client/InspectorBackend.ts +4 -0
- package/front_end/core/root/ExperimentNames.ts +0 -1
- package/front_end/core/sdk/EmulationModel.ts +41 -1
- package/front_end/entrypoints/main/MainImpl.ts +0 -6
- package/front_end/generated/InspectorBackendCommands.ts +6 -4
- 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 +47 -0
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +1 -0
- package/front_end/models/emulation/DeviceModeModel.ts +47 -0
- package/front_end/models/issues_manager/IssueAggregator.ts +0 -9
- package/front_end/models/issues_manager/IssuesManager.ts +0 -5
- package/front_end/models/issues_manager/issues_manager.ts +0 -4
- package/front_end/models/javascript_metadata/NativeFunctions.js +4 -0
- package/front_end/models/lighthouse/lighthouse.ts +9 -0
- package/front_end/panels/common/AiCodeCompletionDisclaimer.ts +3 -0
- package/front_end/panels/common/AiCodeGenerationTeaser.ts +3 -0
- package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +1 -6
- package/front_end/panels/elements/StylesSidebarPane.ts +79 -0
- package/front_end/panels/emulation/DeviceModeToolbar.ts +206 -66
- package/front_end/panels/issues/HiddenIssuesRow.ts +1 -1
- package/front_end/panels/issues/IssueKindView.ts +2 -1
- package/front_end/panels/issues/IssueView.ts +2 -4
- package/front_end/panels/issues/IssuesPane.ts +2 -2
- package/front_end/panels/lighthouse/LighthouseController.ts +3 -3
- package/front_end/panels/lighthouse/LighthousePanel.ts +9 -5
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +5 -5
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +6 -7
- package/front_end/panels/lighthouse/LighthouseReportSelector.ts +4 -3
- package/front_end/panels/lighthouse/lighthouse.ts +0 -2
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/deno.json +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/package.json +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.ts +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.ts +2 -2
- package/front_end/ui/legacy/SuggestBox.ts +4 -0
- package/front_end/ui/legacy/TextPrompt.ts +1 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +15 -0
- package/inspector_overlay/highlight_grid_common.ts +11 -8
- package/package.json +1 -1
- package/front_end/models/issues_manager/ContrastCheckTrigger.ts +0 -78
- package/front_end/models/issues_manager/LowTextContrastIssue.ts +0 -63
- package/front_end/panels/issues/AffectedElementsWithLowContrastView.ts +0 -91
- /package/front_end/{panels → models}/lighthouse/LighthouseReporterTypes.ts +0 -0
|
@@ -1,44 +1,35 @@
|
|
|
1
1
|
# Settings, Experiments, and Features in Chromium DevTools
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
customized in multiple ways:
|
|
3
|
+
Chromium DevTools can be customized in several ways:
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Adding new DevTools experiments is deprecated, the preferred way for adding new
|
|
12
|
-
features / exposing experimental features is via `base::Feature`s. These are
|
|
13
|
-
controllable via Chromium command line parameters or optionally via `chrome://flags`.
|
|
14
|
-
|
|
15
|
-
Note: We are currently in the process of migrating away from DevTools experiments,
|
|
16
|
-
this documentation is partly outdated and will be updated ASAP.
|
|
5
|
+
**Preferences** (found in Settings > Preferences) control the general appearance and behavior of
|
|
6
|
+
DevTools, such as language or UI options. In the codebase, these are represented as "Settings"
|
|
7
|
+
([documentation](https://chromium.googlesource.com/devtools/devtools-frontend/+/main/front_end/core/common/README.md)).
|
|
8
|
+
They are intended as permanent options that remain relatively stable over time.
|
|
17
9
|
|
|
10
|
+
**Experiments** are features under active development or evaluation. These can change frequently
|
|
11
|
+
and are managed through DevTools > Settings > Experiments, `chrome://flags`, or command-line
|
|
12
|
+
switches. They are implemented using Chromium's `base::Feature` system, which allows for granular
|
|
13
|
+
control and testing.
|
|
18
14
|
|
|
19
15
|
[TOC]
|
|
20
16
|
|
|
21
|
-
## How to add
|
|
22
|
-
|
|
23
|
-
[go/chrome-devtools:command-line-config](http://go/chrome-devtools:command-line-config)
|
|
17
|
+
## How to add base::Feature feature flags
|
|
24
18
|
|
|
25
|
-
`base::Feature`
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
`base::Feature` flags are defined in the Chromium repository and exposed to DevTools through [host
|
|
20
|
+
bindings](https://crsrc.org/c/chrome/browser/devtools/devtools_ui_bindings.cc). This architecture
|
|
21
|
+
ensures a single source of truth for features that span both the front-end (DevTools) and back-end
|
|
22
|
+
(Chromium). Even features that only affect the front-end should use this system for consistency.
|
|
23
|
+
By default, `base::Features` are configurable via command line parameters when launching Chromium.
|
|
24
|
+
Optionally, they can be made available via the `chrome://flags` UI and via
|
|
25
|
+
DevTools > Settings > Preferences as well.
|
|
30
26
|
|
|
31
|
-
|
|
32
|
-
launching Chromium. Optionally, they can be made available via the `chrome://flags`
|
|
33
|
-
UI as well.
|
|
34
|
-
|
|
35
|
-
### Define a new `base::Feature`
|
|
27
|
+
### Define a new base::Feature
|
|
36
28
|
|
|
37
29
|
Add a new `base::Feature` to DevTools' [`features.cc`](https://crsrc.org/c/chrome/browser/devtools/features.cc). This feature will automatically be available as a Chrome command line parameter:
|
|
38
30
|
|
|
39
31
|
```cxx
|
|
40
|
-
// in
|
|
41
|
-
|
|
32
|
+
// in features.cc
|
|
42
33
|
BASE_FEATURE(kDevToolsNewFeature, "DevToolsNewFeature",
|
|
43
34
|
base::FEATURE_DISABLED_BY_DEFAULT);
|
|
44
35
|
|
|
@@ -47,25 +38,20 @@ const base::FeatureParam<std::string> kDevToolsNewFeatureStringParam{
|
|
|
47
38
|
&kDevToolsNewFeature, "string_param", /*default_value=*/""};
|
|
48
39
|
const base::FeatureParam<double> kDevToolsNewFeatureDoubleParam{
|
|
49
40
|
&kDevToolsNewFeature, "double_param", /*default_value=*/0};
|
|
50
|
-
|
|
51
41
|
```
|
|
52
42
|
|
|
53
43
|
Start Chrome via command line including flags:
|
|
54
44
|
|
|
55
45
|
```bash
|
|
56
|
-
|
|
46
|
+
[path to chrome]/chrome --enable-features=DevToolsNewFeature
|
|
57
47
|
```
|
|
58
48
|
|
|
59
|
-
|
|
49
|
+
Command for starting Chrome with feature and additional feature parameters:
|
|
60
50
|
|
|
61
51
|
```bash
|
|
62
|
-
|
|
52
|
+
[path to chrome]/chrome --enable-features="DevToolsNewFeature:string_param/foo/double_param/0.5"
|
|
63
53
|
```
|
|
64
54
|
|
|
65
|
-
### Make the `base::Feature` available via `chrome://flags`
|
|
66
|
-
|
|
67
|
-
This step is optional. If you want the `base::Feature` to be controllable via the `chrome://flags` UI and not only via the command line, follow [this documentation](https://chromium.googlesource.com/chromium/src/+/main/docs/how_to_add_your_feature_flag.md#step-2_adding-the-feature-flag-to-the-chrome_flags-ui).
|
|
68
|
-
|
|
69
55
|
### Add the new feature to the host configuration being sent to DevTools
|
|
70
56
|
|
|
71
57
|
Add the new feature to `DevToolsUIBindings::GetHostConfig` ([link to code](https://crsrc.org/c/chrome/browser/devtools/devtools_ui_bindings.cc;l=1506;drc=dd0b2a0bee86088ec0d481bd8722c06edaaba4a4), [example CL](https://crrev.com/c/5625935)).
|
|
@@ -73,92 +59,81 @@ This step is optional. If you want the `base::Feature` to be controllable via th
|
|
|
73
59
|
### In DevTools, use the new property added to HostConfig
|
|
74
60
|
|
|
75
61
|
* Update the type definition in [`Runtime.ts`](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/core/root/Runtime.ts).
|
|
76
|
-
*
|
|
77
|
-
|
|
78
|
-
* In unit tests, make sure to assign the expected configuration using
|
|
62
|
+
* Check if the `base::Feature` is enabled and use this to run certain code blocks conditionally by
|
|
63
|
+
accessing the host config via `Root.Runtime.hostConfig`.
|
|
64
|
+
* In unit tests, make sure to assign the expected configuration using
|
|
65
|
+
`updateHostConfig({ someFeature: {enabled: true} })`.
|
|
79
66
|
|
|
80
|
-
Please refer to this [example CL](https://crrev.com/c/
|
|
67
|
+
Please refer to this [example CL](https://crrev.com/c/6820841).
|
|
81
68
|
|
|
82
|
-
|
|
69
|
+
### Optional: Make the base::Feature available via chrome://flags
|
|
83
70
|
|
|
84
|
-
|
|
71
|
+
This step is optional. If you want the `base::Feature` to be controllable via the
|
|
72
|
+
`chrome://flags` UI and not only via the command line, follow
|
|
73
|
+
[this documentation](https://chromium.googlesource.com/chromium/src/+/main/docs/how_to_add_your_feature_flag.md#step-2_adding-the-feature-flag-to-the-chrome_flags-ui).
|
|
85
74
|
|
|
86
|
-
|
|
87
|
-
will need to do two things:
|
|
75
|
+
[Example CL](https://crrev.com/c/7588357)
|
|
88
76
|
|
|
89
|
-
|
|
90
|
-
enabling/disabling the experiment.
|
|
91
|
-
2. Register the experiment in DevTools to have it added to the Settings UI.
|
|
77
|
+
### Optional: Add the base::Feature to DevTools > Settings > Experiments
|
|
92
78
|
|
|
93
|
-
|
|
79
|
+
Prerequisite: The `base::Feature` needs to be have been added to `chrome://flags`.
|
|
94
80
|
|
|
95
|
-
|
|
96
|
-
`DevToolsExperiments` (your best bet is to search for this text in your editor,
|
|
97
|
-
as `enums.xml` is very large).
|
|
81
|
+
#### Step 1: Create a HostExperiment in the DevTools repository
|
|
98
82
|
|
|
99
|
-
|
|
100
|
-
increased by one from the previous entry. The label can be anything you like but
|
|
101
|
-
make sure it is easily identifiable.
|
|
83
|
+
Register the experiment in [`MainImpl.ts`](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/entrypoints/main/MainImpl.ts;l=343)
|
|
102
84
|
|
|
103
|
-
```
|
|
104
|
-
|
|
85
|
+
```ts
|
|
86
|
+
Root.Runtime.experiments.registerHostExperiment({
|
|
87
|
+
name: Root.ExperimentNames.ExperimentName.DURABLE_MESSAGES,
|
|
88
|
+
// Short description of the experiment, shown to users
|
|
89
|
+
title: 'Durable Messages',
|
|
90
|
+
// This must match the name of the Chrome flag as seen in `chrome://flags` or in `chrome/browser/about_flags.cc`
|
|
91
|
+
aboutFlag: 'devtools-enable-durable-messages',
|
|
92
|
+
isEnabled: Root.Runtime.hostConfig.devToolsEnableDurableMessages?.enabled ?? false,
|
|
93
|
+
// Whether the experiment requires a Chrome restart or only a reload of DevTools
|
|
94
|
+
requiresChromeRestart: false,
|
|
95
|
+
// optional
|
|
96
|
+
docLink: 'https://goo.gle/related-documentation',
|
|
97
|
+
// optional
|
|
98
|
+
feedbackLink: 'https://crbug.com/[bug number]',
|
|
99
|
+
});
|
|
105
100
|
```
|
|
106
101
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
### DevTools front-end
|
|
110
|
-
|
|
111
|
-
In DevTools, you need to register the experiment. This is done in
|
|
112
|
-
`front_end/entrypoints/main/MainImpl.ts` and is done by calling
|
|
113
|
-
`Root.Runtime.experiments.register`:
|
|
102
|
+
[Example CL](https://crrev.com/c/7588114)
|
|
114
103
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
false,
|
|
120
|
-
);
|
|
121
|
-
```
|
|
104
|
+
`requiresChromeRestart` should be set to `true` if the `base::Feature` is used for conditionally
|
|
105
|
+
running code in the Chromium repository as well. If it only affects code paths in the DevTools
|
|
106
|
+
repository, `requiresChromeRestart` can be set to `false`. This means that toggling the
|
|
107
|
+
experimental feature requires only reloading DevTools and not restarting Chrome.
|
|
122
108
|
|
|
123
|
-
|
|
124
|
-
|
|
109
|
+
You may also pass in two additional arguments which can be used to link users to documentation and
|
|
110
|
+
a way to provide feedback.
|
|
125
111
|
|
|
126
|
-
|
|
127
|
-
|
|
112
|
+
You must also add the experiment to [UserMetrics.ts](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/core/host/UserMetrics.ts;l=807).
|
|
113
|
+
Add an entry to the `DevToolsExperiments` enum, incrementing the `MAX_VALUE` by 1 and assigning the
|
|
114
|
+
un-incremented value to your experiment. There are gaps in the values assigned to experiments. This
|
|
115
|
+
is explained by the fact that expired experiments are removed from the codebase.
|
|
128
116
|
|
|
129
|
-
|
|
130
|
-
`true` if you want your experiment to be marked as unstable. This moves it into
|
|
131
|
-
a separate part of the UI where users are warned that enabling the experiment
|
|
132
|
-
may cause issues.
|
|
117
|
+
#### Step 2: Add the experiment to enums.xml in the Chromium repository
|
|
133
118
|
|
|
134
|
-
|
|
135
|
-
|
|
119
|
+
In Chromium, edit [tools/metrics/histograms/metadata/dev/enums.xml](https://crsrc.org/c/tools/metrics/histograms/metadata/dev/enums.xml;l=898).
|
|
120
|
+
Find the enum titled `DevToolsExperiments`, and add a new entry. Make sure that the value matches the one from
|
|
121
|
+
[UserMetrics.ts](https://crsrc.org/c/third_party/devtools-frontend/src/front_end/core/host/UserMetrics.ts;l=807)
|
|
122
|
+
in the DevTools repository. The label can be anything you like but make sure it is easily identifiable.
|
|
136
123
|
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
'jsProfilerTemporarilyEnable',
|
|
140
|
-
'Enable JavaScript Profiler temporarily',
|
|
141
|
-
/* unstable= */ false,
|
|
142
|
-
/* documentation */ 'https://goo.gle/js-profiler-deprecation',
|
|
143
|
-
/* feedback */ 'https://crbug.com/1354548',
|
|
144
|
-
);
|
|
124
|
+
```xml
|
|
125
|
+
<int value="95" label="yourExperimentNameHere"/>
|
|
145
126
|
```
|
|
146
127
|
|
|
147
|
-
|
|
148
|
-
entry to the `DevToolsExperiments` enum, using **the same label and integer
|
|
149
|
-
value** that you used in the Chromium CL. You should also increase the
|
|
150
|
-
`MaxValue` entry by one.
|
|
128
|
+
[Example CL](https://crrev.com/c/4915777)
|
|
151
129
|
|
|
152
|
-
|
|
153
|
-
to run certain code blocks conditionally:
|
|
130
|
+
## Deprecated: DevTools experiments
|
|
154
131
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
-
```
|
|
132
|
+
Previously, DevTools experiments that lacked a Chrome component were managed separately. This
|
|
133
|
+
system is now deprecated. All legacy experiments are being migrated to the `base::Feature`
|
|
134
|
+
framework to streamline development.
|
|
160
135
|
|
|
161
|
-
## A/B Testing with Finch and
|
|
136
|
+
## A/B Testing with Finch and base::Feature
|
|
162
137
|
|
|
163
138
|
`base::Feature` flags can be used with Finch to conduct A/B testing by toggling feature flags for a defined percentage of users. A/B testing can be a good way of testing the waters. However, since the time to get meaningful metrics may take a long time, it shouldn't be used to get feedback on options quickly.
|
|
164
139
|
|
|
@@ -817,7 +817,6 @@ export enum DevtoolsExperiments {
|
|
|
817
817
|
apca = 39,
|
|
818
818
|
'font-editor' = 41,
|
|
819
819
|
'full-accessibility-tree' = 42,
|
|
820
|
-
'contrast-issues' = 44,
|
|
821
820
|
'experimental-cookie-features' = 45,
|
|
822
821
|
'instrumentation-breakpoints' = 61,
|
|
823
822
|
'authored-deployed-grouping' = 63,
|
|
@@ -907,7 +906,7 @@ export enum IssueCreated {
|
|
|
907
906
|
'CookieIssue::WarnSameSiteUnspecifiedCrossSiteContext::SetCookie' = 35,
|
|
908
907
|
'SharedArrayBufferIssue::TransferIssue' = 36,
|
|
909
908
|
'SharedArrayBufferIssue::CreationIssue' = 37,
|
|
910
|
-
|
|
909
|
+
|
|
911
910
|
'CorsIssue::InsecureLocalNetwork' = 42,
|
|
912
911
|
'CorsIssue::InvalidHeaders' = 44,
|
|
913
912
|
'CorsIssue::WildcardOriginWithCredentials' = 45,
|
|
@@ -559,6 +559,10 @@ export class TargetBase {
|
|
|
559
559
|
this.registerDispatcher('DOMStorage', dispatcher);
|
|
560
560
|
}
|
|
561
561
|
|
|
562
|
+
registerEmulationDispatcher(dispatcher: ProtocolProxyApi.EmulationDispatcher): void {
|
|
563
|
+
this.registerDispatcher('Emulation', dispatcher);
|
|
564
|
+
}
|
|
565
|
+
|
|
562
566
|
registerFetchDispatcher(dispatcher: ProtocolProxyApi.FetchDispatcher): void {
|
|
563
567
|
this.registerDispatcher('Fetch', dispatcher);
|
|
564
568
|
}
|
|
@@ -15,7 +15,6 @@ export enum ExperimentName {
|
|
|
15
15
|
APCA = 'apca',
|
|
16
16
|
FONT_EDITOR = 'font-editor',
|
|
17
17
|
FULL_ACCESSIBILITY_TREE = 'full-accessibility-tree',
|
|
18
|
-
CONTRAST_ISSUES = 'contrast-issues',
|
|
19
18
|
EXPERIMENTAL_COOKIE_FEATURES = 'experimental-cookie-features',
|
|
20
19
|
INSTRUMENTATION_BREAKPOINTS = 'instrumentation-breakpoints',
|
|
21
20
|
AUTHORED_DEPLOYED_GROUPING = 'authored-deployed-grouping',
|
|
@@ -18,7 +18,7 @@ export const enum DataSaverOverride {
|
|
|
18
18
|
DISABLED = 'disabled',
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export class EmulationModel extends SDKModel<
|
|
21
|
+
export class EmulationModel extends SDKModel<EmulationModelEventTypes> implements ProtocolProxyApi.EmulationDispatcher {
|
|
22
22
|
readonly #emulationAgent: ProtocolProxyApi.EmulationApi;
|
|
23
23
|
readonly #deviceOrientationAgent: ProtocolProxyApi.DeviceOrientationApi;
|
|
24
24
|
#cssModel: CSSModel|null;
|
|
@@ -33,11 +33,15 @@ export class EmulationModel extends SDKModel<void> {
|
|
|
33
33
|
enabled: boolean,
|
|
34
34
|
configuration: Protocol.Emulation.SetEmitTouchEventsForMouseRequestConfiguration,
|
|
35
35
|
};
|
|
36
|
+
#screenOrientationLocked: boolean;
|
|
37
|
+
#lockedOrientation: Protocol.Emulation.ScreenOrientation|null;
|
|
36
38
|
|
|
37
39
|
constructor(target: Target) {
|
|
38
40
|
super(target);
|
|
39
41
|
this.#emulationAgent = target.emulationAgent();
|
|
40
42
|
this.#deviceOrientationAgent = target.deviceOrientationAgent();
|
|
43
|
+
this.#screenOrientationLocked = false;
|
|
44
|
+
this.#lockedOrientation = null;
|
|
41
45
|
this.#cssModel = target.model(CSSModel);
|
|
42
46
|
this.#overlayModel = target.model(OverlayModel);
|
|
43
47
|
if (this.#overlayModel) {
|
|
@@ -225,6 +229,7 @@ export class EmulationModel extends SDKModel<void> {
|
|
|
225
229
|
enabled: false,
|
|
226
230
|
configuration: Protocol.Emulation.SetEmitTouchEventsForMouseRequestConfiguration.Mobile,
|
|
227
231
|
};
|
|
232
|
+
target.registerEmulationDispatcher(this);
|
|
228
233
|
}
|
|
229
234
|
|
|
230
235
|
setTouchEmulationAllowed(touchEmulationAllowed: boolean): void {
|
|
@@ -478,6 +483,41 @@ export class EmulationModel extends SDKModel<void> {
|
|
|
478
483
|
];
|
|
479
484
|
return await this.emulateCSSMedia(type, features);
|
|
480
485
|
}
|
|
486
|
+
|
|
487
|
+
// ProtocolProxyApi.EmulationDispatcher implementation
|
|
488
|
+
|
|
489
|
+
virtualTimeBudgetExpired(): void {
|
|
490
|
+
// No-op for now; not used by the frontend.
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
screenOrientationLockChanged(event: Protocol.Emulation.ScreenOrientationLockChangedEvent): void {
|
|
494
|
+
this.#screenOrientationLocked = event.locked;
|
|
495
|
+
this.#lockedOrientation = event.orientation ?? null;
|
|
496
|
+
this.dispatchEventToListeners(
|
|
497
|
+
EmulationModelEvents.SCREEN_ORIENTATION_LOCK_CHANGED,
|
|
498
|
+
{locked: event.locked, orientation: event.orientation ?? null});
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
isScreenOrientationLocked(): boolean {
|
|
502
|
+
return this.#screenOrientationLocked;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
lockedOrientation(): Protocol.Emulation.ScreenOrientation|null {
|
|
506
|
+
return this.#lockedOrientation;
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
export const enum EmulationModelEvents {
|
|
511
|
+
SCREEN_ORIENTATION_LOCK_CHANGED = 'ScreenOrientationLockChanged',
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
export interface ScreenOrientationLockChangedEvent {
|
|
515
|
+
locked: boolean;
|
|
516
|
+
orientation: Protocol.Emulation.ScreenOrientation|null;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
export interface EmulationModelEventTypes {
|
|
520
|
+
[EmulationModelEvents.SCREEN_ORIENTATION_LOCK_CHANGED]: ScreenOrientationLockChangedEvent;
|
|
481
521
|
}
|
|
482
522
|
|
|
483
523
|
export class Location {
|
|
@@ -399,11 +399,6 @@ export class MainImpl {
|
|
|
399
399
|
Root.ExperimentNames.ExperimentName.FONT_EDITOR, 'New font editor in the Styles tab',
|
|
400
400
|
'https://developer.chrome.com/blog/new-in-devtools-89/#font');
|
|
401
401
|
|
|
402
|
-
// Contrast issues reported via the Issues panel.
|
|
403
|
-
Root.Runtime.experiments.register(
|
|
404
|
-
Root.ExperimentNames.ExperimentName.CONTRAST_ISSUES, 'Automatic contrast issue reporting via the Issues panel',
|
|
405
|
-
'https://developer.chrome.com/blog/new-in-devtools-90/#low-contrast');
|
|
406
|
-
|
|
407
402
|
// New cookie features.
|
|
408
403
|
Root.Runtime.experiments.register(
|
|
409
404
|
Root.ExperimentNames.ExperimentName.EXPERIMENTAL_COOKIE_FEATURES, 'Experimental cookie features');
|
|
@@ -506,7 +501,6 @@ export class MainImpl {
|
|
|
506
501
|
showThirdPartyIssuesSetting: IssuesManager.Issue.getShowThirdPartyIssuesSetting(),
|
|
507
502
|
hideIssueSetting: IssuesManager.IssuesManager.getHideIssueByCodeSetting(),
|
|
508
503
|
});
|
|
509
|
-
IssuesManager.ContrastCheckTrigger.ContrastCheckTrigger.instance();
|
|
510
504
|
|
|
511
505
|
UI.DockController.DockController.instance({forceNew: true, canDock});
|
|
512
506
|
SDK.DOMDebuggerModel.DOMDebuggerManager.instance({forceNew: true});
|
|
@@ -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"});
|
|
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"});
|
|
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"});
|
|
@@ -233,7 +233,7 @@ inspectorBackend.registerType("Browser.Histogram", [{"name": "name", "type": "st
|
|
|
233
233
|
|
|
234
234
|
// CSS.
|
|
235
235
|
inspectorBackend.registerEnum("CSS.StyleSheetOrigin", {Injected: "injected", UserAgent: "user-agent", Inspector: "inspector", Regular: "regular"});
|
|
236
|
-
inspectorBackend.registerEnum("CSS.CSSRuleType", {MediaRule: "MediaRule", SupportsRule: "SupportsRule", ContainerRule: "ContainerRule", LayerRule: "LayerRule", ScopeRule: "ScopeRule", StyleRule: "StyleRule", StartingStyleRule: "StartingStyleRule"});
|
|
236
|
+
inspectorBackend.registerEnum("CSS.CSSRuleType", {MediaRule: "MediaRule", SupportsRule: "SupportsRule", ContainerRule: "ContainerRule", LayerRule: "LayerRule", ScopeRule: "ScopeRule", StyleRule: "StyleRule", StartingStyleRule: "StartingStyleRule", NavigationRule: "NavigationRule"});
|
|
237
237
|
inspectorBackend.registerEnum("CSS.CSSMediaSource", {MediaRule: "mediaRule", ImportRule: "importRule", LinkedSheet: "linkedSheet", InlineSheet: "inlineSheet"});
|
|
238
238
|
inspectorBackend.registerEnum("CSS.CSSAtRuleType", {FontFace: "font-face", FontFeatureValues: "font-feature-values", FontPaletteValues: "font-palette-values"});
|
|
239
239
|
inspectorBackend.registerEnum("CSS.CSSAtRuleSubsection", {Swash: "swash", Annotation: "annotation", Ornaments: "ornaments", Stylistic: "stylistic", Styleset: "styleset", CharacterVariant: "character-variant"});
|
|
@@ -272,6 +272,7 @@ inspectorBackend.registerCommand("CSS.setKeyframeKey", [{"name": "styleSheetId",
|
|
|
272
272
|
inspectorBackend.registerCommand("CSS.setMediaText", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "text", "type": "string", "optional": false, "description": "", "typeRef": null}], ["media"], "Modifies the rule selector.");
|
|
273
273
|
inspectorBackend.registerCommand("CSS.setContainerQueryText", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "text", "type": "string", "optional": false, "description": "", "typeRef": null}], ["containerQuery"], "Modifies the expression of a container query.");
|
|
274
274
|
inspectorBackend.registerCommand("CSS.setSupportsText", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "text", "type": "string", "optional": false, "description": "", "typeRef": null}], ["supports"], "Modifies the expression of a supports at-rule.");
|
|
275
|
+
inspectorBackend.registerCommand("CSS.setNavigationText", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "text", "type": "string", "optional": false, "description": "", "typeRef": null}], ["navigation"], "Modifies the expression of a navigation at-rule.");
|
|
275
276
|
inspectorBackend.registerCommand("CSS.setScopeText", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "text", "type": "string", "optional": false, "description": "", "typeRef": null}], ["scope"], "Modifies the expression of a scope at-rule.");
|
|
276
277
|
inspectorBackend.registerCommand("CSS.setRuleSelector", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "range", "type": "object", "optional": false, "description": "", "typeRef": "CSS.SourceRange"}, {"name": "selector", "type": "string", "optional": false, "description": "", "typeRef": null}], ["selectorList"], "Modifies the rule selector.");
|
|
277
278
|
inspectorBackend.registerCommand("CSS.setStyleSheetText", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "", "typeRef": "DOM.StyleSheetId"}, {"name": "text", "type": "string", "optional": false, "description": "", "typeRef": null}], ["sourceMapURL"], "Sets the new stylesheet text.");
|
|
@@ -290,7 +291,7 @@ inspectorBackend.registerType("CSS.Value", [{"name": "text", "type": "string", "
|
|
|
290
291
|
inspectorBackend.registerType("CSS.Specificity", [{"name": "a", "type": "number", "optional": false, "description": "The a component, which represents the number of ID selectors.", "typeRef": null}, {"name": "b", "type": "number", "optional": false, "description": "The b component, which represents the number of class selectors, attributes selectors, and pseudo-classes.", "typeRef": null}, {"name": "c", "type": "number", "optional": false, "description": "The c component, which represents the number of type selectors and pseudo-elements.", "typeRef": null}]);
|
|
291
292
|
inspectorBackend.registerType("CSS.SelectorList", [{"name": "selectors", "type": "array", "optional": false, "description": "Selectors in the list.", "typeRef": "CSS.Value"}, {"name": "text", "type": "string", "optional": false, "description": "Rule selector text.", "typeRef": null}]);
|
|
292
293
|
inspectorBackend.registerType("CSS.CSSStyleSheetHeader", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "The stylesheet identifier.", "typeRef": "DOM.StyleSheetId"}, {"name": "frameId", "type": "string", "optional": false, "description": "Owner frame identifier.", "typeRef": "Page.FrameId"}, {"name": "sourceURL", "type": "string", "optional": false, "description": "Stylesheet resource URL. Empty if this is a constructed stylesheet created using new CSSStyleSheet() (but non-empty if this is a constructed stylesheet imported as a CSS module script).", "typeRef": null}, {"name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with the stylesheet (if any).", "typeRef": null}, {"name": "origin", "type": "string", "optional": false, "description": "Stylesheet origin.", "typeRef": "CSS.StyleSheetOrigin"}, {"name": "title", "type": "string", "optional": false, "description": "Stylesheet title.", "typeRef": null}, {"name": "ownerNode", "type": "number", "optional": true, "description": "The backend id for the owner node of the stylesheet.", "typeRef": "DOM.BackendNodeId"}, {"name": "disabled", "type": "boolean", "optional": false, "description": "Denotes whether the stylesheet is disabled.", "typeRef": null}, {"name": "hasSourceURL", "type": "boolean", "optional": true, "description": "Whether the sourceURL field value comes from the sourceURL comment.", "typeRef": null}, {"name": "isInline", "type": "boolean", "optional": false, "description": "Whether this stylesheet is created for STYLE tag by parser. This flag is not set for document.written STYLE tags.", "typeRef": null}, {"name": "isMutable", "type": "boolean", "optional": false, "description": "Whether this stylesheet is mutable. Inline stylesheets become mutable after they have been modified via CSSOM API. `<link>` element's stylesheets become mutable only if DevTools modifies them. Constructed stylesheets (new CSSStyleSheet()) are mutable immediately after creation.", "typeRef": null}, {"name": "isConstructed", "type": "boolean", "optional": false, "description": "True if this stylesheet is created through new CSSStyleSheet() or imported as a CSS module script.", "typeRef": null}, {"name": "startLine", "type": "number", "optional": false, "description": "Line offset of the stylesheet within the resource (zero based).", "typeRef": null}, {"name": "startColumn", "type": "number", "optional": false, "description": "Column offset of the stylesheet within the resource (zero based).", "typeRef": null}, {"name": "length", "type": "number", "optional": false, "description": "Size of the content (in characters).", "typeRef": null}, {"name": "endLine", "type": "number", "optional": false, "description": "Line offset of the end of the stylesheet within the resource (zero based).", "typeRef": null}, {"name": "endColumn", "type": "number", "optional": false, "description": "Column offset of the end of the stylesheet within the resource (zero based).", "typeRef": null}, {"name": "loadingFailed", "type": "boolean", "optional": true, "description": "If the style sheet was loaded from a network resource, this indicates when the resource failed to load", "typeRef": null}]);
|
|
293
|
-
inspectorBackend.registerType("CSS.CSSRule", [{"name": "styleSheetId", "type": "string", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId"}, {"name": "selectorList", "type": "object", "optional": false, "description": "Rule selector data.", "typeRef": "CSS.SelectorList"}, {"name": "nestingSelectors", "type": "array", "optional": true, "description": "Array of selectors from ancestor style rules, sorted by distance from the current rule.", "typeRef": "string"}, {"name": "origin", "type": "string", "optional": false, "description": "Parent stylesheet's origin.", "typeRef": "CSS.StyleSheetOrigin"}, {"name": "style", "type": "object", "optional": false, "description": "Associated style declaration.", "typeRef": "CSS.CSSStyle"}, {"name": "originTreeScopeNodeId", "type": "number", "optional": true, "description": "The BackendNodeId of the DOM node that constitutes the origin tree scope of this rule.", "typeRef": "DOM.BackendNodeId"}, {"name": "media", "type": "array", "optional": true, "description": "Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards.", "typeRef": "CSS.CSSMedia"}, {"name": "containerQueries", "type": "array", "optional": true, "description": "Container query list array (for rules involving container queries). The array enumerates container queries starting with the innermost one, going outwards.", "typeRef": "CSS.CSSContainerQuery"}, {"name": "supports", "type": "array", "optional": true, "description": "@supports CSS at-rule array. The array enumerates @supports at-rules starting with the innermost one, going outwards.", "typeRef": "CSS.CSSSupports"}, {"name": "layers", "type": "array", "optional": true, "description": "Cascade layer array. Contains the layer hierarchy that this rule belongs to starting with the innermost layer and going outwards.", "typeRef": "CSS.CSSLayer"}, {"name": "scopes", "type": "array", "optional": true, "description": "@scope CSS at-rule array. The array enumerates @scope at-rules starting with the innermost one, going outwards.", "typeRef": "CSS.CSSScope"}, {"name": "ruleTypes", "type": "array", "optional": true, "description": "The array keeps the types of ancestor CSSRules from the innermost going outwards.", "typeRef": "CSS.CSSRuleType"}, {"name": "startingStyles", "type": "array", "optional": true, "description": "@starting-style CSS at-rule array. The array enumerates @starting-style at-rules starting with the innermost one, going outwards.", "typeRef": "CSS.CSSStartingStyle"}]);
|
|
294
|
+
inspectorBackend.registerType("CSS.CSSRule", [{"name": "styleSheetId", "type": "string", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId"}, {"name": "selectorList", "type": "object", "optional": false, "description": "Rule selector data.", "typeRef": "CSS.SelectorList"}, {"name": "nestingSelectors", "type": "array", "optional": true, "description": "Array of selectors from ancestor style rules, sorted by distance from the current rule.", "typeRef": "string"}, {"name": "origin", "type": "string", "optional": false, "description": "Parent stylesheet's origin.", "typeRef": "CSS.StyleSheetOrigin"}, {"name": "style", "type": "object", "optional": false, "description": "Associated style declaration.", "typeRef": "CSS.CSSStyle"}, {"name": "originTreeScopeNodeId", "type": "number", "optional": true, "description": "The BackendNodeId of the DOM node that constitutes the origin tree scope of this rule.", "typeRef": "DOM.BackendNodeId"}, {"name": "media", "type": "array", "optional": true, "description": "Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards.", "typeRef": "CSS.CSSMedia"}, {"name": "containerQueries", "type": "array", "optional": true, "description": "Container query list array (for rules involving container queries). The array enumerates container queries starting with the innermost one, going outwards.", "typeRef": "CSS.CSSContainerQuery"}, {"name": "supports", "type": "array", "optional": true, "description": "@supports CSS at-rule array. The array enumerates @supports at-rules starting with the innermost one, going outwards.", "typeRef": "CSS.CSSSupports"}, {"name": "layers", "type": "array", "optional": true, "description": "Cascade layer array. Contains the layer hierarchy that this rule belongs to starting with the innermost layer and going outwards.", "typeRef": "CSS.CSSLayer"}, {"name": "scopes", "type": "array", "optional": true, "description": "@scope CSS at-rule array. The array enumerates @scope at-rules starting with the innermost one, going outwards.", "typeRef": "CSS.CSSScope"}, {"name": "ruleTypes", "type": "array", "optional": true, "description": "The array keeps the types of ancestor CSSRules from the innermost going outwards.", "typeRef": "CSS.CSSRuleType"}, {"name": "startingStyles", "type": "array", "optional": true, "description": "@starting-style CSS at-rule array. The array enumerates @starting-style at-rules starting with the innermost one, going outwards.", "typeRef": "CSS.CSSStartingStyle"}, {"name": "navigations", "type": "array", "optional": true, "description": "@navigation CSS at-rule array. The array enumerates @navigation at-rules starting with the innermost one, going outwards.", "typeRef": "CSS.CSSNavigation"}]);
|
|
294
295
|
inspectorBackend.registerType("CSS.RuleUsage", [{"name": "styleSheetId", "type": "string", "optional": false, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId"}, {"name": "startOffset", "type": "number", "optional": false, "description": "Offset of the start of the rule (including selector) from the beginning of the stylesheet.", "typeRef": null}, {"name": "endOffset", "type": "number", "optional": false, "description": "Offset of the end of the rule body from the beginning of the stylesheet.", "typeRef": null}, {"name": "used", "type": "boolean", "optional": false, "description": "Indicates whether the rule was actually used by some element in the page.", "typeRef": null}]);
|
|
295
296
|
inspectorBackend.registerType("CSS.SourceRange", [{"name": "startLine", "type": "number", "optional": false, "description": "Start line of range.", "typeRef": null}, {"name": "startColumn", "type": "number", "optional": false, "description": "Start column of range (inclusive).", "typeRef": null}, {"name": "endLine", "type": "number", "optional": false, "description": "End line of range", "typeRef": null}, {"name": "endColumn", "type": "number", "optional": false, "description": "End column of range (exclusive).", "typeRef": null}]);
|
|
296
297
|
inspectorBackend.registerType("CSS.ShorthandEntry", [{"name": "name", "type": "string", "optional": false, "description": "Shorthand name.", "typeRef": null}, {"name": "value", "type": "string", "optional": false, "description": "Shorthand value.", "typeRef": null}, {"name": "important", "type": "boolean", "optional": true, "description": "Whether the property has \\\"!important\\\" annotation (implies `false` if absent).", "typeRef": null}]);
|
|
@@ -303,6 +304,7 @@ inspectorBackend.registerType("CSS.MediaQuery", [{"name": "expressions", "type":
|
|
|
303
304
|
inspectorBackend.registerType("CSS.MediaQueryExpression", [{"name": "value", "type": "number", "optional": false, "description": "Media query expression value.", "typeRef": null}, {"name": "unit", "type": "string", "optional": false, "description": "Media query expression units.", "typeRef": null}, {"name": "feature", "type": "string", "optional": false, "description": "Media query expression feature.", "typeRef": null}, {"name": "valueRange", "type": "object", "optional": true, "description": "The associated range of the value text in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange"}, {"name": "computedLength", "type": "number", "optional": true, "description": "Computed length of media query expression (if applicable).", "typeRef": null}]);
|
|
304
305
|
inspectorBackend.registerType("CSS.CSSContainerQuery", [{"name": "text", "type": "string", "optional": false, "description": "Container query text.", "typeRef": null}, {"name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange"}, {"name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId"}, {"name": "name", "type": "string", "optional": true, "description": "Optional name for the container.", "typeRef": null}, {"name": "physicalAxes", "type": "string", "optional": true, "description": "Optional physical axes queried for the container.", "typeRef": "DOM.PhysicalAxes"}, {"name": "logicalAxes", "type": "string", "optional": true, "description": "Optional logical axes queried for the container.", "typeRef": "DOM.LogicalAxes"}, {"name": "queriesScrollState", "type": "boolean", "optional": true, "description": "true if the query contains scroll-state() queries.", "typeRef": null}, {"name": "queriesAnchored", "type": "boolean", "optional": true, "description": "true if the query contains anchored() queries.", "typeRef": null}]);
|
|
305
306
|
inspectorBackend.registerType("CSS.CSSSupports", [{"name": "text", "type": "string", "optional": false, "description": "Supports rule text.", "typeRef": null}, {"name": "active", "type": "boolean", "optional": false, "description": "Whether the supports condition is satisfied.", "typeRef": null}, {"name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange"}, {"name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId"}]);
|
|
307
|
+
inspectorBackend.registerType("CSS.CSSNavigation", [{"name": "text", "type": "string", "optional": false, "description": "Navigation rule text.", "typeRef": null}, {"name": "active", "type": "boolean", "optional": true, "description": "Whether the navigation condition is satisfied.", "typeRef": null}, {"name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange"}, {"name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId"}]);
|
|
306
308
|
inspectorBackend.registerType("CSS.CSSScope", [{"name": "text", "type": "string", "optional": false, "description": "Scope rule text.", "typeRef": null}, {"name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange"}, {"name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId"}]);
|
|
307
309
|
inspectorBackend.registerType("CSS.CSSLayer", [{"name": "text", "type": "string", "optional": false, "description": "Layer name.", "typeRef": null}, {"name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange"}, {"name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId"}]);
|
|
308
310
|
inspectorBackend.registerType("CSS.CSSStartingStyle", [{"name": "range", "type": "object", "optional": true, "description": "The associated rule header range in the enclosing stylesheet (if available).", "typeRef": "CSS.SourceRange"}, {"name": "styleSheetId", "type": "string", "optional": true, "description": "Identifier of the stylesheet containing this object (if exists).", "typeRef": "DOM.StyleSheetId"}]);
|
|
@@ -317,7 +319,7 @@ inspectorBackend.registerType("CSS.CSSPropertyRegistration", [{"name": "property
|
|
|
317
319
|
inspectorBackend.registerType("CSS.CSSAtRule", [{"name": "type", "type": "string", "optional": false, "description": "Type of at-rule.", "typeRef": null}, {"name": "subsection", "type": "string", "optional": true, "description": "Subsection of font-feature-values, if this is a subsection.", "typeRef": null}, {"name": "name", "type": "object", "optional": true, "description": "LINT_SKIP.ThenChange(//third_party/blink/renderer/core/inspector/inspector_style_sheet.cc:FontVariantAlternatesFeatureType,//third_party/blink/renderer/core/inspector/inspector_css_agent.cc:FontVariantAlternatesFeatureType) Associated name, if applicable.", "typeRef": "CSS.Value"}, {"name": "styleSheetId", "type": "string", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId"}, {"name": "origin", "type": "string", "optional": false, "description": "Parent stylesheet's origin.", "typeRef": "CSS.StyleSheetOrigin"}, {"name": "style", "type": "object", "optional": false, "description": "Associated style declaration.", "typeRef": "CSS.CSSStyle"}]);
|
|
318
320
|
inspectorBackend.registerType("CSS.CSSPropertyRule", [{"name": "styleSheetId", "type": "string", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId"}, {"name": "origin", "type": "string", "optional": false, "description": "Parent stylesheet's origin.", "typeRef": "CSS.StyleSheetOrigin"}, {"name": "propertyName", "type": "object", "optional": false, "description": "Associated property name.", "typeRef": "CSS.Value"}, {"name": "style", "type": "object", "optional": false, "description": "Associated style declaration.", "typeRef": "CSS.CSSStyle"}]);
|
|
319
321
|
inspectorBackend.registerType("CSS.CSSFunctionParameter", [{"name": "name", "type": "string", "optional": false, "description": "The parameter name.", "typeRef": null}, {"name": "type", "type": "string", "optional": false, "description": "The parameter type.", "typeRef": null}]);
|
|
320
|
-
inspectorBackend.registerType("CSS.CSSFunctionConditionNode", [{"name": "media", "type": "object", "optional": true, "description": "Media query for this conditional block. Only one type of condition should be set.", "typeRef": "CSS.CSSMedia"}, {"name": "containerQueries", "type": "object", "optional": true, "description": "Container query for this conditional block. Only one type of condition should be set.", "typeRef": "CSS.CSSContainerQuery"}, {"name": "supports", "type": "object", "optional": true, "description": "@supports CSS at-rule condition. Only one type of condition should be set.", "typeRef": "CSS.CSSSupports"}, {"name": "children", "type": "array", "optional": false, "description": "Block body.", "typeRef": "CSS.CSSFunctionNode"}, {"name": "conditionText", "type": "string", "optional": false, "description": "The condition text.", "typeRef": null}]);
|
|
322
|
+
inspectorBackend.registerType("CSS.CSSFunctionConditionNode", [{"name": "media", "type": "object", "optional": true, "description": "Media query for this conditional block. Only one type of condition should be set.", "typeRef": "CSS.CSSMedia"}, {"name": "containerQueries", "type": "object", "optional": true, "description": "Container query for this conditional block. Only one type of condition should be set.", "typeRef": "CSS.CSSContainerQuery"}, {"name": "supports", "type": "object", "optional": true, "description": "@supports CSS at-rule condition. Only one type of condition should be set.", "typeRef": "CSS.CSSSupports"}, {"name": "navigation", "type": "object", "optional": true, "description": "@navigation condition. Only one type of condition should be set.", "typeRef": "CSS.CSSNavigation"}, {"name": "children", "type": "array", "optional": false, "description": "Block body.", "typeRef": "CSS.CSSFunctionNode"}, {"name": "conditionText", "type": "string", "optional": false, "description": "The condition text.", "typeRef": null}]);
|
|
321
323
|
inspectorBackend.registerType("CSS.CSSFunctionNode", [{"name": "condition", "type": "object", "optional": true, "description": "A conditional block. If set, style should not be set.", "typeRef": "CSS.CSSFunctionConditionNode"}, {"name": "style", "type": "object", "optional": true, "description": "Values set by this node. If set, condition should not be set.", "typeRef": "CSS.CSSStyle"}]);
|
|
322
324
|
inspectorBackend.registerType("CSS.CSSFunctionRule", [{"name": "name", "type": "object", "optional": false, "description": "Name of the function.", "typeRef": "CSS.Value"}, {"name": "styleSheetId", "type": "string", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId"}, {"name": "origin", "type": "string", "optional": false, "description": "Parent stylesheet's origin.", "typeRef": "CSS.StyleSheetOrigin"}, {"name": "parameters", "type": "array", "optional": false, "description": "List of parameters.", "typeRef": "CSS.CSSFunctionParameter"}, {"name": "children", "type": "array", "optional": false, "description": "Function body.", "typeRef": "CSS.CSSFunctionNode"}]);
|
|
323
325
|
inspectorBackend.registerType("CSS.CSSKeyframeRule", [{"name": "styleSheetId", "type": "string", "optional": true, "description": "The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.", "typeRef": "DOM.StyleSheetId"}, {"name": "origin", "type": "string", "optional": false, "description": "Parent stylesheet's origin.", "typeRef": "CSS.StyleSheetOrigin"}, {"name": "keyText", "type": "object", "optional": false, "description": "Associated key text.", "typeRef": "CSS.Value"}, {"name": "style", "type": "object", "optional": false, "description": "Associated style declaration.", "typeRef": "CSS.CSSStyle"}]);
|
|
@@ -1737,6 +1737,13 @@ export namespace ProtocolMapping {
|
|
|
1737
1737
|
paramsType: [Protocol.CSS.SetSupportsTextRequest];
|
|
1738
1738
|
returnType: Protocol.CSS.SetSupportsTextResponse;
|
|
1739
1739
|
};
|
|
1740
|
+
/**
|
|
1741
|
+
* Modifies the expression of a navigation at-rule.
|
|
1742
|
+
*/
|
|
1743
|
+
'CSS.setNavigationText': {
|
|
1744
|
+
paramsType: [Protocol.CSS.SetNavigationTextRequest];
|
|
1745
|
+
returnType: Protocol.CSS.SetNavigationTextResponse;
|
|
1746
|
+
};
|
|
1740
1747
|
/**
|
|
1741
1748
|
* Modifies the expression of a scope at-rule.
|
|
1742
1749
|
*/
|
|
@@ -886,6 +886,11 @@ declare namespace ProtocolProxyApi {
|
|
|
886
886
|
*/
|
|
887
887
|
invoke_setSupportsText(params: Protocol.CSS.SetSupportsTextRequest): Promise<Protocol.CSS.SetSupportsTextResponse>;
|
|
888
888
|
|
|
889
|
+
/**
|
|
890
|
+
* Modifies the expression of a navigation at-rule.
|
|
891
|
+
*/
|
|
892
|
+
invoke_setNavigationText(params: Protocol.CSS.SetNavigationTextRequest): Promise<Protocol.CSS.SetNavigationTextResponse>;
|
|
893
|
+
|
|
889
894
|
/**
|
|
890
895
|
* Modifies the expression of a scope at-rule.
|
|
891
896
|
*/
|