chrome-devtools-frontend 1.0.1593959 → 1.0.1595925
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 +25 -5
- package/front_end/core/common/README.md +126 -0
- package/front_end/core/sdk/CSSModel.ts +22 -0
- package/front_end/core/sdk/CSSNavigation.ts +33 -0
- package/front_end/core/sdk/CSSRule.ts +12 -2
- package/front_end/core/sdk/sdk-meta.ts +22 -18
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/design_system_tokens.css +538 -259
- package/front_end/entrypoints/main/main-meta.ts +2 -2
- package/front_end/generated/InspectorBackendCommands.ts +3 -5
- package/front_end/generated/SupportedCSSProperties.js +12 -0
- package/front_end/generated/protocol-mapping.d.ts +0 -8
- package/front_end/generated/protocol-proxy-api.d.ts +0 -6
- package/front_end/generated/protocol.ts +1 -19
- package/front_end/models/issues_manager/Issue.ts +1 -0
- package/front_end/models/issues_manager/IssueAggregator.ts +9 -0
- package/front_end/models/issues_manager/IssuesManager.ts +5 -0
- package/front_end/models/issues_manager/SelectivePermissionsInterventionIssue.ts +65 -0
- package/front_end/models/issues_manager/descriptions/selectivePermissionsIntervention.md +7 -0
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +49 -10
- package/front_end/models/persistence/persistence-meta.ts +4 -4
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +12 -1
- package/front_end/panels/ai_assistance/components/ChatInput.ts +37 -30
- package/front_end/panels/ai_assistance/components/ChatView.ts +4 -2
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +10 -7
- package/front_end/panels/ai_assistance/components/chatInput.css +26 -1
- package/front_end/panels/ai_assistance/components/walkthroughView.css +15 -0
- package/front_end/panels/application/StorageView.ts +8 -2
- package/front_end/panels/application/preloading/PreloadingView.ts +105 -7
- package/front_end/panels/application/preloading/preloadingView.css +4 -0
- package/front_end/panels/console/ConsoleView.ts +2 -2
- package/front_end/panels/console/console-meta.ts +18 -14
- package/front_end/panels/elements/ComputedStyleWidget.ts +12 -7
- package/front_end/panels/elements/ElementsPanel.ts +1 -1
- package/front_end/panels/elements/ElementsTreeOutline.ts +4 -6
- package/front_end/panels/elements/ImagePreviewPopover.ts +6 -9
- package/front_end/panels/elements/StylePropertiesSection.ts +30 -0
- package/front_end/panels/elements/StylesSidebarPane.ts +13 -7
- package/front_end/panels/elements/elements-meta.ts +12 -8
- package/front_end/panels/issues/AffectedSelectivePermissionsInterventionView.ts +120 -0
- package/front_end/panels/issues/IssueView.ts +2 -0
- package/front_end/panels/issues/IssuesPane.ts +6 -0
- package/front_end/panels/issues/issues.ts +2 -0
- package/front_end/panels/lighthouse/LighthouseStartView.ts +99 -38
- package/front_end/panels/lighthouse/LighthouseTimespanView.ts +53 -14
- package/front_end/panels/lighthouse/RadioSetting.ts +33 -19
- package/front_end/panels/lighthouse/lighthouse.ts +2 -0
- package/front_end/panels/media/PlayerMessagesView.ts +62 -49
- package/front_end/panels/media/media.ts +2 -0
- package/front_end/panels/media/playerMessagesView.css +1 -1
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +49 -24
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +2 -2
- package/front_end/panels/sources/sources-meta.ts +8 -4
- package/front_end/panels/utils/utils.ts +11 -5
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/lit/lib/async-directive.d.ts +465 -0
- package/front_end/third_party/lit/lib/async-directive.js +23 -0
- package/front_end/third_party/lit/lib/async-directive.js.map +1 -0
- package/front_end/third_party/lit/lib/decorators.d.ts +7 -1
- package/front_end/third_party/lit/lib/decorators.js +2 -2
- package/front_end/third_party/lit/lib/decorators.js.map +1 -1
- package/front_end/third_party/lit/lib/directive.js.map +1 -1
- package/front_end/third_party/lit/lib/directives.d.ts +27 -8
- package/front_end/third_party/lit/lib/directives.js +8 -8
- package/front_end/third_party/lit/lib/directives.js.map +1 -1
- package/front_end/third_party/lit/lib/lit.d.ts +15 -5
- package/front_end/third_party/lit/lib/lit.js +4 -4
- package/front_end/third_party/lit/lib/lit.js.map +1 -1
- package/front_end/third_party/lit/lib/static-html.js +2 -2
- package/front_end/third_party/lit/lib/static-html.js.map +1 -1
- package/front_end/third_party/lit/lit.ts +2 -1
- package/front_end/third_party/lit/rollup.config.mjs +1 -1
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +5 -0
- package/front_end/ui/legacy/components/utils/ImagePreview.ts +27 -23
- package/front_end/ui/lit/lit.ts +1 -0
- package/front_end/ui/visual_logging/Debugging.ts +1 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +4 -0
- package/package.json +1 -1
|
@@ -103,18 +103,38 @@ Root.Runtime.experiments.registerHostExperiment({
|
|
|
103
103
|
|
|
104
104
|
`requiresChromeRestart` should be set to `true` if the `base::Feature` is used for conditionally
|
|
105
105
|
running code in the Chromium repository as well. If it only affects code paths in the DevTools
|
|
106
|
-
repository, `requiresChromeRestart`
|
|
106
|
+
repository, `requiresChromeRestart` should be set to `false`. This means that toggling the
|
|
107
107
|
experimental feature requires only reloading DevTools and not restarting Chrome.
|
|
108
108
|
|
|
109
109
|
You may also pass in two additional arguments which can be used to link users to documentation and
|
|
110
|
-
a
|
|
110
|
+
to a place for providing feedback.
|
|
111
111
|
|
|
112
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
113
|
Add an entry to the `DevToolsExperiments` enum, incrementing the `MAX_VALUE` by 1 and assigning the
|
|
114
|
-
un-incremented value to your experiment
|
|
115
|
-
|
|
114
|
+
un-incremented value to your experiment (the gaps in the values assigned to experiments are caused
|
|
115
|
+
by expired experiments which are no longer part of the codebase).
|
|
116
116
|
|
|
117
|
-
#### Step 2:
|
|
117
|
+
#### Step 2: Update UI bindings to allow toggling the experiment from the DevTools UI
|
|
118
|
+
|
|
119
|
+
In the scenario of allowing users to toggle the experiment from the DevTools UI, when assembling
|
|
120
|
+
the host config to be sent to DevTools, use the `GetFeatureStateForDevTools` helper to determine
|
|
121
|
+
the enabled/disabled state of the experiment.
|
|
122
|
+
|
|
123
|
+
```cxx
|
|
124
|
+
response_dict.Set(
|
|
125
|
+
"devToolsNewFeature",
|
|
126
|
+
base::DictValue().Set(
|
|
127
|
+
"enabled",
|
|
128
|
+
GetFeatureStateForDevTools(
|
|
129
|
+
::features::kDevToolsNewFeature,
|
|
130
|
+
enabled_by_flags,
|
|
131
|
+
disabled_by_flags
|
|
132
|
+
)
|
|
133
|
+
)
|
|
134
|
+
);
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
#### Step 3: Add the experiment to enums.xml in the Chromium repository
|
|
118
138
|
|
|
119
139
|
In Chromium, edit [tools/metrics/histograms/metadata/dev/enums.xml](https://crsrc.org/c/tools/metrics/histograms/metadata/dev/enums.xml;l=898).
|
|
120
140
|
Find the enum titled `DevToolsExperiments`, and add a new entry. Make sure that the value matches the one from
|
|
@@ -31,3 +31,129 @@ Common.Settings.registerSettingExtension({
|
|
|
31
31
|
|
|
32
32
|
A controller for the each setting is added to the 'preferences' tab if they are visible, that is, they have a `title` and a `category`.
|
|
33
33
|
They can also be set with the command menu if they have `options` and a `category` (options’ names are added as commands).
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
# The DevTools Revealer System
|
|
38
|
+
|
|
39
|
+
The `Revealer.ts` module provides a centralized system that allows different parts of the DevTools UI to "reveal" or display various types of objects without being tightly coupled to one another. It's a powerful decoupling mechanism that makes the codebase more modular, extensible, and performant.
|
|
40
|
+
|
|
41
|
+
For example, if you click on a CSS file link in the **Console**, this system is responsible for telling the **Sources** panel to open and display that file, without the Console needing a direct reference to the Sources panel.
|
|
42
|
+
|
|
43
|
+
## Core Concepts
|
|
44
|
+
|
|
45
|
+
1. **`Revealer<T>` Interface**: This is the fundamental contract. A "Revealer" is any object (typically a UI panel or view) that knows how to display a specific type of data (`T`). It must implement a single method: `reveal(revealable: T): Promise<void>`.
|
|
46
|
+
|
|
47
|
+
2. **"Revealable" Object**: This is any object you want to show to the user. It can be a source code file (`SDK.SourceCode.UISourceCode`), a network request (`SDK.NetworkRequest.NetworkRequest`), a DOM node (`SDK.DOMModel.DOMNode`), or any other custom data type.
|
|
48
|
+
|
|
49
|
+
3. **`RevealerRegistry`**: This is a singleton class that acts as a central directory. It holds a list of all available `Revealer`s and maps them to the data types they can handle.
|
|
50
|
+
|
|
51
|
+
4. **`RevealerRegistration<T>`**: This is a configuration object used to register a `Revealer` with the `RevealerRegistry`. It contains three key pieces of information:
|
|
52
|
+
* `contextTypes`: A function that returns an array of classes (constructors) that the `Revealer` can handle.
|
|
53
|
+
* `loadRevealer`: An asynchronous function that returns a promise, which resolves to an instance of the `Revealer`. This allows for the lazy-loading of UI panels, improving initial application performance.
|
|
54
|
+
* `destination` (optional): A user-friendly, localized string that describes where the object will be revealed (e.g., "Network panel", "Elements panel"). This is used for UI text, such as in context menus ("Reveal in...").
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## How to Create a New Revealer
|
|
59
|
+
|
|
60
|
+
Here are the steps to implement a new revealer that can take the user to a specific place in the DevTools UI.
|
|
61
|
+
|
|
62
|
+
### Step 1: Define the Object to be Revealed
|
|
63
|
+
|
|
64
|
+
First, ensure you have a class or data type that you want to make "revealable."
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
// front_end/models/my_app/MyApp.ts
|
|
68
|
+
export class MyDataObject {
|
|
69
|
+
id: string;
|
|
70
|
+
constructor(id: string) {
|
|
71
|
+
this.id = id;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Step 2: Implement the `Revealer` Interface in Your UI Panel
|
|
77
|
+
|
|
78
|
+
The UI component that will display the object (e.g., your panel or widget) must implement the `Common.Revealer.Revealer<T>` interface for your specific data type.
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
// front_end/panels/my_panel/MyPanel.ts
|
|
82
|
+
import * as Common from '../../core/common/common.js';
|
|
83
|
+
import * as UI from '../../ui/legacy/legacy.js';
|
|
84
|
+
import * as MyApp from '../../models/my_app/my_app.js';
|
|
85
|
+
|
|
86
|
+
// 1. Implement the interface for your specific data type.
|
|
87
|
+
export class MyPanel extends UI.Panel.Panel implements Common.Revealer.Revealer<MyApp.MyDataObject> {
|
|
88
|
+
// ... other panel implementation ...
|
|
89
|
+
|
|
90
|
+
// 2. This is the required method from the interface.
|
|
91
|
+
async reveal(dataObject: MyApp.MyDataObject): Promise<void> {
|
|
92
|
+
// This is where you put your panel's custom logic to show the object.
|
|
93
|
+
|
|
94
|
+
// First, ensure this panel is visible to the user.
|
|
95
|
+
await UI.ViewManager.ViewManager.instance().showView('my-panel-view-id');
|
|
96
|
+
|
|
97
|
+
// Now, highlight the specific item within your panel.
|
|
98
|
+
console.log(`Revealing data object with ID: ${dataObject.id}`);
|
|
99
|
+
// e.g., this.selectItemInUI(dataObject.id);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Step 3: Register Your Panel as a `Revealer`
|
|
105
|
+
|
|
106
|
+
This is the most important step. You must tell the central `RevealerRegistry` that `MyPanel` knows how to handle `MyDataObject`. This registration is typically done in a module's `-meta.ts` or `-legacy.ts` configuration file, which is executed at startup.
|
|
107
|
+
|
|
108
|
+
```ts
|
|
109
|
+
// front_end/panels/my_panel/my_panel-meta.ts
|
|
110
|
+
import * as Common from '../../core/common/common.js';
|
|
111
|
+
import * as i18n from '../../core/i18n/i18n.js';
|
|
112
|
+
|
|
113
|
+
const UIStrings = {
|
|
114
|
+
/**
|
|
115
|
+
* @description The name of the panel that reveals our custom data objects.
|
|
116
|
+
*/
|
|
117
|
+
myPanel: 'My Awesome Panel',
|
|
118
|
+
};
|
|
119
|
+
const str_ = i18n.i18n.registerUIStrings('panels/my_panel/my_panel-meta.ts', UIStrings);
|
|
120
|
+
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
|
121
|
+
|
|
122
|
+
Common.Revealer.registerRevealer({
|
|
123
|
+
// 1. Specify the data type(s) this revealer can handle.
|
|
124
|
+
contextTypes() {
|
|
125
|
+
// Use a dynamic import to avoid circular dependencies at module load time.
|
|
126
|
+
const {MyApp} = await import('../../models/my_app/my_app.js');
|
|
127
|
+
return [
|
|
128
|
+
MyApp.MyDataObject,
|
|
129
|
+
];
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
// 2. Provide a function to load and return an instance of your panel.
|
|
133
|
+
// This is what makes lazy loading possible.
|
|
134
|
+
async loadRevealer() {
|
|
135
|
+
const {MyPanel} = await import('./MyPanel.js');
|
|
136
|
+
// If your panel is a singleton, return its instance, otherwise create a new one.
|
|
137
|
+
return MyPanel.instance();
|
|
138
|
+
},
|
|
139
|
+
|
|
140
|
+
// 3. (Optional) Provide a user-facing destination name for context menus.
|
|
141
|
+
destination: i18nLazyString(UIStrings.myPanel),
|
|
142
|
+
});
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Step 4: Trigger the Reveal from Anywhere
|
|
146
|
+
|
|
147
|
+
Now that your revealer is registered, any other part of the DevTools codebase can ask to reveal an instance of `MyDataObject` without needing to know anything about `MyPanel`.
|
|
148
|
+
|
|
149
|
+
```ts
|
|
150
|
+
// In some other file, e.g., a context menu action.
|
|
151
|
+
import * as Common from '../../core/common/common.js';
|
|
152
|
+
import * as MyApp from '../../models/my_app/my_app.js';
|
|
153
|
+
|
|
154
|
+
// Create an instance of the object you want to reveal.
|
|
155
|
+
const myObject = new MyApp.MyDataObject('abc-123');
|
|
156
|
+
|
|
157
|
+
// Call the global reveal function.
|
|
158
|
+
await Common.Revealer.reveal(myObject);
|
|
159
|
+
```
|
|
@@ -575,6 +575,28 @@ export class CSSModel extends SDKModel<EventTypes> {
|
|
|
575
575
|
}
|
|
576
576
|
}
|
|
577
577
|
|
|
578
|
+
async setNavigationText(
|
|
579
|
+
styleSheetId: Protocol.DOM.StyleSheetId, range: TextUtils.TextRange.TextRange,
|
|
580
|
+
newNavigationText: string): Promise<boolean> {
|
|
581
|
+
Host.userMetrics.actionTaken(Host.UserMetrics.Action.StyleRuleEdited);
|
|
582
|
+
|
|
583
|
+
try {
|
|
584
|
+
await this.ensureOriginalStyleSheetText(styleSheetId);
|
|
585
|
+
const {navigation} = await this.agent.invoke_setNavigationText({styleSheetId, range, text: newNavigationText});
|
|
586
|
+
|
|
587
|
+
if (!navigation) {
|
|
588
|
+
return false;
|
|
589
|
+
}
|
|
590
|
+
this.#domModel.markUndoableState();
|
|
591
|
+
const edit = new Edit(styleSheetId, range, newNavigationText, navigation);
|
|
592
|
+
this.fireStyleSheetChanged(styleSheetId, edit);
|
|
593
|
+
return true;
|
|
594
|
+
} catch (e) {
|
|
595
|
+
console.error(e);
|
|
596
|
+
return false;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
|
|
578
600
|
async setScopeText(
|
|
579
601
|
styleSheetId: Protocol.DOM.StyleSheetId, range: TextUtils.TextRange.TextRange,
|
|
580
602
|
newScopeText: string): Promise<boolean> {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Copyright 2026 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import type * as Protocol from '../../generated/protocol.js';
|
|
6
|
+
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
7
|
+
|
|
8
|
+
import type {CSSModel} from './CSSModel.js';
|
|
9
|
+
import {CSSQuery} from './CSSQuery.js';
|
|
10
|
+
|
|
11
|
+
export class CSSNavigation extends CSSQuery {
|
|
12
|
+
static parseNavigationPayload(cssModel: CSSModel, payload: Protocol.CSS.CSSNavigation[]): CSSNavigation[] {
|
|
13
|
+
return payload.map(navigation => new CSSNavigation(cssModel, navigation));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
#active = true;
|
|
17
|
+
|
|
18
|
+
constructor(cssModel: CSSModel, payload: Protocol.CSS.CSSNavigation) {
|
|
19
|
+
super(cssModel);
|
|
20
|
+
this.reinitialize(payload);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
reinitialize(payload: Protocol.CSS.CSSNavigation): void {
|
|
24
|
+
this.text = payload.text;
|
|
25
|
+
this.range = payload.range ? TextUtils.TextRange.TextRange.fromObject(payload.range) : null;
|
|
26
|
+
this.styleSheetId = payload.styleSheetId;
|
|
27
|
+
this.#active = payload.active ?? true;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
active(): boolean {
|
|
31
|
+
return this.#active;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -10,6 +10,7 @@ import {CSSContainerQuery} from './CSSContainerQuery.js';
|
|
|
10
10
|
import {CSSLayer} from './CSSLayer.js';
|
|
11
11
|
import {CSSMedia} from './CSSMedia.js';
|
|
12
12
|
import type {CSSModel, Edit} from './CSSModel.js';
|
|
13
|
+
import {CSSNavigation} from './CSSNavigation.js';
|
|
13
14
|
import {CSSScope} from './CSSScope.js';
|
|
14
15
|
import {CSSStartingStyle} from './CSSStartingStyle.js';
|
|
15
16
|
import {CSSStyleDeclaration, Type} from './CSSStyleDeclaration.js';
|
|
@@ -113,6 +114,7 @@ export class CSSStyleRule extends CSSRule {
|
|
|
113
114
|
layers: CSSLayer[];
|
|
114
115
|
ruleTypes: Protocol.CSS.CSSRuleType[];
|
|
115
116
|
startingStyles: CSSStartingStyle[];
|
|
117
|
+
navigations: CSSNavigation[];
|
|
116
118
|
wasUsed: boolean;
|
|
117
119
|
constructor(cssModel: CSSModel, payload: Protocol.CSS.CSSRule, wasUsed?: boolean) {
|
|
118
120
|
super(cssModel, {
|
|
@@ -132,6 +134,7 @@ export class CSSStyleRule extends CSSRule {
|
|
|
132
134
|
this.layers = payload.layers ? CSSLayer.parseLayerPayload(cssModel, payload.layers) : [];
|
|
133
135
|
this.startingStyles =
|
|
134
136
|
payload.startingStyles ? CSSStartingStyle.parseStartingStylePayload(cssModel, payload.startingStyles) : [];
|
|
137
|
+
this.navigations = payload.navigations ? CSSNavigation.parseNavigationPayload(cssModel, payload.navigations) : [];
|
|
135
138
|
this.ruleTypes = payload.ruleTypes || [];
|
|
136
139
|
this.wasUsed = wasUsed || false;
|
|
137
140
|
}
|
|
@@ -224,6 +227,7 @@ export class CSSStyleRule extends CSSRule {
|
|
|
224
227
|
this.containerQueries.forEach(cq => cq.rebase(edit));
|
|
225
228
|
this.scopes.forEach(scope => scope.rebase(edit));
|
|
226
229
|
this.supports.forEach(supports => supports.rebase(edit));
|
|
230
|
+
this.navigations.forEach(navigation => navigation.rebase(edit));
|
|
227
231
|
|
|
228
232
|
super.rebase(edit);
|
|
229
233
|
}
|
|
@@ -396,7 +400,7 @@ export interface CSSNestedStyleLeaf {
|
|
|
396
400
|
|
|
397
401
|
export type CSSNestedStyleCondition = {
|
|
398
402
|
children: CSSNestedStyle[],
|
|
399
|
-
}&({media: CSSMedia}|{container: CSSContainerQuery}|{supports: CSSSupports});
|
|
403
|
+
}&({media: CSSMedia}|{container: CSSContainerQuery}|{supports: CSSSupports}|{navigation: CSSNavigation});
|
|
400
404
|
|
|
401
405
|
export type CSSNestedStyle = CSSNestedStyleLeaf|CSSNestedStyleCondition;
|
|
402
406
|
|
|
@@ -463,7 +467,13 @@ export class CSSFunctionRule extends CSSRule {
|
|
|
463
467
|
supports: new CSSSupports(this.cssModelInternal, node.condition.supports),
|
|
464
468
|
};
|
|
465
469
|
}
|
|
466
|
-
|
|
470
|
+
if (node.condition.navigation) {
|
|
471
|
+
return {
|
|
472
|
+
children,
|
|
473
|
+
navigation: new CSSNavigation(this.cssModelInternal, node.condition.navigation),
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
console.error('A function rule condition must have a media, container, supports, or navigation');
|
|
467
477
|
return;
|
|
468
478
|
}
|
|
469
479
|
console.error('A function rule node must have a style or condition');
|
|
@@ -43,13 +43,17 @@ const UIStrings = {
|
|
|
43
43
|
*/
|
|
44
44
|
captureAsyncStackTraces: 'Capture async stack traces',
|
|
45
45
|
/**
|
|
46
|
-
* @description Text of a setting that
|
|
46
|
+
* @description Text of a setting that turn on the measuring rulers when hover over a target
|
|
47
|
+
*/
|
|
48
|
+
rulersOnHover: 'Rulers on hover',
|
|
49
|
+
/**
|
|
50
|
+
* @description Text of an option that turn on the measuring rulers when hover over a target through the Command Menu
|
|
47
51
|
*/
|
|
48
52
|
showRulersOnHover: 'Show rulers on hover',
|
|
49
53
|
/**
|
|
50
54
|
* @description Text of a setting that do turn off the measuring rulers when hover over a target
|
|
51
55
|
*/
|
|
52
|
-
doNotShowRulersOnHover: '
|
|
56
|
+
doNotShowRulersOnHover: 'Don\'t show rulers on hover',
|
|
53
57
|
/**
|
|
54
58
|
* @description Title of a setting that turns on grid area name labels
|
|
55
59
|
*/
|
|
@@ -99,19 +103,19 @@ const UIStrings = {
|
|
|
99
103
|
*/
|
|
100
104
|
showLineNames: 'Show line names',
|
|
101
105
|
/**
|
|
102
|
-
* @description Title of
|
|
106
|
+
* @description Title of an option under the Rendering category that can be invoked through the Command Menu
|
|
103
107
|
*/
|
|
104
108
|
showPaintFlashingRectangles: 'Show paint flashing rectangles',
|
|
105
109
|
/**
|
|
106
|
-
* @description Title of
|
|
110
|
+
* @description Title of an option under the Rendering category that can be invoked through the Command Menu
|
|
107
111
|
*/
|
|
108
112
|
hidePaintFlashingRectangles: 'Hide paint flashing rectangles',
|
|
109
113
|
/**
|
|
110
|
-
* @description Title of
|
|
114
|
+
* @description Title of an option under the Rendering category that can be invoked through the Command Menu
|
|
111
115
|
*/
|
|
112
116
|
showLayoutShiftRegions: 'Show layout shift regions',
|
|
113
117
|
/**
|
|
114
|
-
* @description Title of
|
|
118
|
+
* @description Title of an option under the Rendering category that can be invoked through the Command Menu
|
|
115
119
|
*/
|
|
116
120
|
hideLayoutShiftRegions: 'Hide layout shift regions',
|
|
117
121
|
/**
|
|
@@ -119,31 +123,31 @@ const UIStrings = {
|
|
|
119
123
|
*/
|
|
120
124
|
highlightAdFrames: 'Highlight ad frames',
|
|
121
125
|
/**
|
|
122
|
-
* @description Title of
|
|
126
|
+
* @description Title of an option under the Rendering category that can be invoked through the Command Menu
|
|
123
127
|
*/
|
|
124
128
|
doNotHighlightAdFrames: 'Do not highlight ad frames',
|
|
125
129
|
/**
|
|
126
|
-
* @description Title of
|
|
130
|
+
* @description Title of an option under the Rendering category that can be invoked through the Command Menu
|
|
127
131
|
*/
|
|
128
132
|
showLayerBorders: 'Show layer borders',
|
|
129
133
|
/**
|
|
130
|
-
* @description Title of
|
|
134
|
+
* @description Title of an option under the Rendering category that can be invoked through the Command Menu
|
|
131
135
|
*/
|
|
132
136
|
hideLayerBorders: 'Hide layer borders',
|
|
133
137
|
/**
|
|
134
|
-
* @description Title of
|
|
138
|
+
* @description Title of an option under the Rendering category that can be invoked through the Command Menu
|
|
135
139
|
*/
|
|
136
140
|
showFramesPerSecondFpsMeter: 'Show frames per second (FPS) meter',
|
|
137
141
|
/**
|
|
138
|
-
* @description Title of
|
|
142
|
+
* @description Title of an option under the Rendering category that can be invoked through the Command Menu
|
|
139
143
|
*/
|
|
140
144
|
hideFramesPerSecondFpsMeter: 'Hide frames per second (FPS) meter',
|
|
141
145
|
/**
|
|
142
|
-
* @description Title of
|
|
146
|
+
* @description Title of an option under the Rendering category that can be invoked through the Command Menu
|
|
143
147
|
*/
|
|
144
148
|
showScrollPerformanceBottlenecks: 'Show scroll performance bottlenecks',
|
|
145
149
|
/**
|
|
146
|
-
* @description Title of
|
|
150
|
+
* @description Title of an option under the Rendering category that can be invoked through the Command Menu
|
|
147
151
|
*/
|
|
148
152
|
hideScrollPerformanceBottlenecks: 'Hide scroll performance bottlenecks',
|
|
149
153
|
/**
|
|
@@ -376,11 +380,11 @@ const UIStrings = {
|
|
|
376
380
|
*/
|
|
377
381
|
javaScriptSourceMaps: 'JavaScript source maps',
|
|
378
382
|
/**
|
|
379
|
-
* @description Title of
|
|
383
|
+
* @description Title of an option under the Sources category that can be invoked through the Command Menu
|
|
380
384
|
*/
|
|
381
385
|
enableJavaScriptSourceMaps: 'Enable JavaScript source maps',
|
|
382
386
|
/**
|
|
383
|
-
* @description Title of
|
|
387
|
+
* @description Title of an option under the Sources category that can be invoked through the Command Menu
|
|
384
388
|
*/
|
|
385
389
|
disableJavaScriptSourceMaps: 'Disable JavaScript source maps',
|
|
386
390
|
/**
|
|
@@ -388,11 +392,11 @@ const UIStrings = {
|
|
|
388
392
|
*/
|
|
389
393
|
cssSourceMaps: 'CSS source maps',
|
|
390
394
|
/**
|
|
391
|
-
* @description Title of
|
|
395
|
+
* @description Title of an option under the Sources category that can be invoked through the Command Menu
|
|
392
396
|
*/
|
|
393
397
|
enableCssSourceMaps: 'Enable CSS source maps',
|
|
394
398
|
/**
|
|
395
|
-
* @description Title of
|
|
399
|
+
* @description Title of an option under the Sources category that can be invoked through the Command Menu
|
|
396
400
|
*/
|
|
397
401
|
disableCssSourceMaps: 'Disable CSS source maps',
|
|
398
402
|
/**
|
|
@@ -501,7 +505,7 @@ Common.Settings.registerSettingExtension({
|
|
|
501
505
|
Common.Settings.registerSettingExtension({
|
|
502
506
|
category: Common.Settings.SettingCategory.ELEMENTS,
|
|
503
507
|
storageType: Common.Settings.SettingStorageType.SYNCED,
|
|
504
|
-
title: i18nLazyString(UIStrings.
|
|
508
|
+
title: i18nLazyString(UIStrings.rulersOnHover),
|
|
505
509
|
settingName: 'show-metrics-rulers',
|
|
506
510
|
settingType: Common.Settings.SettingType.BOOLEAN,
|
|
507
511
|
options: [
|
|
@@ -29,6 +29,7 @@ import * as CSSMatchedStyles from './CSSMatchedStyles.js';
|
|
|
29
29
|
import * as CSSMedia from './CSSMedia.js';
|
|
30
30
|
import * as CSSMetadata from './CSSMetadata.js';
|
|
31
31
|
import * as CSSModel from './CSSModel.js';
|
|
32
|
+
import * as CSSNavigation from './CSSNavigation.js';
|
|
32
33
|
import * as CSSProperty from './CSSProperty.js';
|
|
33
34
|
import * as CSSPropertyParser from './CSSPropertyParser.js';
|
|
34
35
|
import * as CSSPropertyParserMatchers from './CSSPropertyParserMatchers.js';
|
|
@@ -111,6 +112,7 @@ export {
|
|
|
111
112
|
CSSMedia,
|
|
112
113
|
CSSMetadata,
|
|
113
114
|
CSSModel,
|
|
115
|
+
CSSNavigation,
|
|
114
116
|
CSSProperty,
|
|
115
117
|
CSSPropertyParser,
|
|
116
118
|
CSSPropertyParserMatchers,
|