chrome-devtools-frontend 1.0.1520139 → 1.0.1521223
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/checklist/README.md +80 -27
- package/front_end/core/host/GdpClient.ts +18 -6
- package/front_end/core/host/InspectorFrontendHost.ts +3 -0
- package/front_end/core/root/Runtime.ts +5 -0
- package/front_end/core/sdk/CSSModel.ts +8 -0
- package/front_end/core/sdk/CSSRule.ts +4 -0
- package/front_end/core/sdk/CSSStartingStyle.ts +29 -0
- package/front_end/core/sdk/DOMModel.ts +24 -1
- package/front_end/core/sdk/RehydratingConnection.snapshot.txt +209 -209
- package/front_end/core/sdk/RehydratingConnection.ts +5 -2
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/entrypoints/rehydrated_devtools_app/rehydrated_devtools_app.ts +1 -0
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +2 -26
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +32 -32
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +11 -21
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +32 -21
- package/front_end/models/badges/UserBadges.ts +5 -4
- package/front_end/models/trace/handlers/ScriptsHandler.ts +2 -1
- package/front_end/models/trace/insights/LegacyJavaScript.ts +2 -1
- package/front_end/panels/ai_assistance/components/ChatView.ts +1 -1
- package/front_end/panels/ai_assistance/components/chatView.css +1 -1
- package/front_end/panels/coverage/CoverageListView.ts +28 -55
- package/front_end/panels/coverage/CoverageView.ts +12 -5
- package/front_end/panels/elements/ComputedStyleModel.ts +2 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +47 -0
- package/front_end/panels/elements/ElementsTreeOutline.ts +13 -0
- package/front_end/panels/elements/StylePropertiesSection.ts +16 -0
- package/front_end/panels/elements/components/AdornerManager.ts +7 -0
- package/front_end/panels/settings/components/SyncSection.ts +5 -17
- package/front_end/panels/timeline/components/ExportTraceOptions.ts +56 -4
- package/front_end/panels/timeline/components/exportTraceOptions.css +5 -0
- package/front_end/third_party/lighthouse/README.chromium +8 -1
- package/front_end/ui/legacy/InspectorView.ts +22 -15
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +1 -1
@@ -105,6 +105,7 @@ export class ComputedStyleModel extends Common.ObjectWrapper.ObjectWrapper<Event
|
|
105
105
|
cssModel.addEventListener(SDK.CSSModel.Events.FontsUpdated, this.onCSSModelChanged, this),
|
106
106
|
cssModel.addEventListener(SDK.CSSModel.Events.MediaQueryResultChanged, this.onCSSModelChanged, this),
|
107
107
|
cssModel.addEventListener(SDK.CSSModel.Events.PseudoStateForced, this.onCSSModelChanged, this),
|
108
|
+
cssModel.addEventListener(SDK.CSSModel.Events.StartingStylesStateForced, this.onCSSModelChanged, this),
|
108
109
|
cssModel.addEventListener(SDK.CSSModel.Events.ModelWasEnabled, this.onCSSModelChanged, this),
|
109
110
|
cssModel.addEventListener(SDK.CSSModel.Events.ComputedStyleUpdated, this.onComputedStyleChanged, this),
|
110
111
|
domModel.addEventListener(SDK.DOMModel.Events.DOMMutated, this.onDOMModelChanged, this),
|
@@ -193,7 +194,7 @@ export const enum Events {
|
|
193
194
|
}
|
194
195
|
|
195
196
|
export type CSSModelChangedEvent = SDK.CSSStyleSheetHeader.CSSStyleSheetHeader|SDK.CSSModel.StyleSheetChangedEvent|
|
196
|
-
SDK.CSSModel.PseudoStateForcedEvent|null|void;
|
197
|
+
SDK.CSSModel.PseudoStateForcedEvent|SDK.DOMModel.DOMNode|null|void;
|
197
198
|
|
198
199
|
export interface EventTypes {
|
199
200
|
[Events.CSS_MODEL_CHANGED]: CSSModelChangedEvent;
|
@@ -221,6 +221,16 @@ const UIStrings = {
|
|
221
221
|
* the overlay showing CSS scroll snapping for the current element.
|
222
222
|
*/
|
223
223
|
disableScrollSnap: 'Disable scroll-snap overlay',
|
224
|
+
/**
|
225
|
+
* @description Label of an adorner in the Elements panel. When clicked, it forces
|
226
|
+
* the element into applying its starting-style rules.
|
227
|
+
*/
|
228
|
+
enableStartingStyle: 'Enable @starting-style mode',
|
229
|
+
/**
|
230
|
+
* @description Label of an adorner in the Elements panel. When clicked, it no longer
|
231
|
+
* forces the element into applying its starting-style rules.
|
232
|
+
*/
|
233
|
+
disableStartingStyle: 'Disable @starting-style mode',
|
224
234
|
/**
|
225
235
|
* @description Label of an adorner in the Elements panel. When clicked, it redirects
|
226
236
|
* to the Media Panel.
|
@@ -2586,6 +2596,13 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
|
|
2586
2596
|
this.pushMediaAdorner(this.tagTypeContext);
|
2587
2597
|
}
|
2588
2598
|
|
2599
|
+
if (Root.Runtime.hostConfig.devToolsStartingStyleDebugging?.enabled) {
|
2600
|
+
const affectedByStartingStyles = node.affectedByStartingStyles();
|
2601
|
+
if (affectedByStartingStyles) {
|
2602
|
+
this.pushStartingStyleAdorner(this.tagTypeContext);
|
2603
|
+
}
|
2604
|
+
}
|
2605
|
+
|
2589
2606
|
if (node.attributes().find(attr => attr.name === 'popover')) {
|
2590
2607
|
this.pushPopoverAdorner(this.tagTypeContext);
|
2591
2608
|
}
|
@@ -2756,6 +2773,36 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
|
|
2756
2773
|
}
|
2757
2774
|
}
|
2758
2775
|
|
2776
|
+
pushStartingStyleAdorner(context: OpeningTagContext): void {
|
2777
|
+
const node = this.node();
|
2778
|
+
const nodeId = node.id;
|
2779
|
+
if (!nodeId) {
|
2780
|
+
return;
|
2781
|
+
}
|
2782
|
+
const config = ElementsComponents.AdornerManager.getRegisteredAdorner(
|
2783
|
+
ElementsComponents.AdornerManager.RegisteredAdorners.STARTING_STYLE);
|
2784
|
+
const adorner = this.adorn(config);
|
2785
|
+
adorner.classList.add('starting-style');
|
2786
|
+
|
2787
|
+
const onClick = ((() => {
|
2788
|
+
const model = node.domModel().cssModel();
|
2789
|
+
if (adorner.isActive()) {
|
2790
|
+
model.forceStartingStyle(node, true);
|
2791
|
+
} else {
|
2792
|
+
model.forceStartingStyle(node, false);
|
2793
|
+
}
|
2794
|
+
}) as EventListener);
|
2795
|
+
|
2796
|
+
adorner.addInteraction(onClick, {
|
2797
|
+
isToggle: true,
|
2798
|
+
shouldPropagateOnKeydown: false,
|
2799
|
+
ariaLabelDefault: i18nString(UIStrings.enableStartingStyle),
|
2800
|
+
ariaLabelActive: i18nString(UIStrings.disableStartingStyle),
|
2801
|
+
});
|
2802
|
+
|
2803
|
+
context.styleAdorners.add(adorner);
|
2804
|
+
}
|
2805
|
+
|
2759
2806
|
pushFlexAdorner(context: OpeningTagContext): void {
|
2760
2807
|
const node = this.node();
|
2761
2808
|
const nodeId = node.id;
|
@@ -1497,6 +1497,8 @@ export class ElementsTreeOutline extends
|
|
1497
1497
|
domModel.addEventListener(SDK.DOMModel.Events.DistributedNodesChanged, this.distributedNodesChanged, this);
|
1498
1498
|
domModel.addEventListener(SDK.DOMModel.Events.TopLayerElementsChanged, this.topLayerElementsChanged, this);
|
1499
1499
|
domModel.addEventListener(SDK.DOMModel.Events.ScrollableFlagUpdated, this.scrollableFlagUpdated, this);
|
1500
|
+
domModel.addEventListener(
|
1501
|
+
SDK.DOMModel.Events.AffectedByStartingStylesFlagUpdated, this.affectedByStartingStylesFlagUpdated, this);
|
1500
1502
|
}
|
1501
1503
|
|
1502
1504
|
unwireFromDOMModel(domModel: SDK.DOMModel.DOMModel): void {
|
@@ -1511,6 +1513,8 @@ export class ElementsTreeOutline extends
|
|
1511
1513
|
domModel.removeEventListener(SDK.DOMModel.Events.DistributedNodesChanged, this.distributedNodesChanged, this);
|
1512
1514
|
domModel.removeEventListener(SDK.DOMModel.Events.TopLayerElementsChanged, this.topLayerElementsChanged, this);
|
1513
1515
|
domModel.removeEventListener(SDK.DOMModel.Events.ScrollableFlagUpdated, this.scrollableFlagUpdated, this);
|
1516
|
+
domModel.removeEventListener(
|
1517
|
+
SDK.DOMModel.Events.AffectedByStartingStylesFlagUpdated, this.affectedByStartingStylesFlagUpdated, this);
|
1514
1518
|
elementsTreeOutlineByDOMModel.delete(domModel);
|
1515
1519
|
}
|
1516
1520
|
|
@@ -1983,6 +1987,15 @@ export class ElementsTreeOutline extends
|
|
1983
1987
|
void treeElement.tagTypeContext.adornersThrottler.schedule(async () => treeElement.updateScrollAdorner());
|
1984
1988
|
}
|
1985
1989
|
}
|
1990
|
+
|
1991
|
+
private affectedByStartingStylesFlagUpdated(event: Common.EventTarget.EventTargetEvent<{node: SDK.DOMModel.DOMNode}>):
|
1992
|
+
void {
|
1993
|
+
const {node} = event.data;
|
1994
|
+
const treeElement = this.treeElementByNode.get(node);
|
1995
|
+
if (treeElement && isOpeningTag(treeElement.tagTypeContext)) {
|
1996
|
+
void treeElement.tagTypeContext.adornersThrottler.schedule(async () => await treeElement.updateStyleAdorners());
|
1997
|
+
}
|
1998
|
+
}
|
1986
1999
|
}
|
1987
2000
|
|
1988
2001
|
export namespace ElementsTreeOutline {
|
@@ -796,6 +796,11 @@ export class StylePropertiesSection {
|
|
796
796
|
case Protocol.CSS.CSSRuleType.StyleRule:
|
797
797
|
ancestorRuleElement = this.createNestingElement(rule.nestingSelectors?.[nestingIndex++]);
|
798
798
|
break;
|
799
|
+
case Protocol.CSS.CSSRuleType.StartingStyleRule:
|
800
|
+
if (Root.Runtime.hostConfig.devToolsStartingStyleDebugging?.enabled) {
|
801
|
+
ancestorRuleElement = this.createStartingStyleElement();
|
802
|
+
}
|
803
|
+
break;
|
799
804
|
}
|
800
805
|
if (ancestorRuleElement) {
|
801
806
|
this.#ancestorRuleListElement.prepend(ancestorRuleElement);
|
@@ -917,6 +922,17 @@ export class StylePropertiesSection {
|
|
917
922
|
return scopeElement;
|
918
923
|
}
|
919
924
|
|
925
|
+
protected createStartingStyleElement(/* startingStyle: SDK.CSSStartingStyle.CSSStartingStyle*/):
|
926
|
+
ElementsComponents.CSSQuery.CSSQuery|undefined {
|
927
|
+
const startingStyleElement = new ElementsComponents.CSSQuery.CSSQuery();
|
928
|
+
startingStyleElement.data = {
|
929
|
+
queryPrefix: '@starting-style',
|
930
|
+
queryText: '',
|
931
|
+
jslogContext: 'starting-style',
|
932
|
+
};
|
933
|
+
return startingStyleElement;
|
934
|
+
}
|
935
|
+
|
920
936
|
protected createSupportsElement(supports: SDK.CSSSupports.CSSSupports): ElementsComponents.CSSQuery.CSSQuery
|
921
937
|
|undefined {
|
922
938
|
if (!supports.text) {
|
@@ -28,6 +28,7 @@ export enum RegisteredAdorners {
|
|
28
28
|
FLEX = 'flex',
|
29
29
|
AD = 'ad',
|
30
30
|
SCROLL_SNAP = 'scroll-snap',
|
31
|
+
STARTING_STYLE = 'starting-style',
|
31
32
|
CONTAINER = 'container',
|
32
33
|
SLOT = 'slot',
|
33
34
|
TOP_LAYER = 'top-layer',
|
@@ -77,6 +78,12 @@ export function getRegisteredAdorner(which: RegisteredAdorners): RegisteredAdorn
|
|
77
78
|
category: AdornerCategories.LAYOUT,
|
78
79
|
enabledByDefault: true,
|
79
80
|
};
|
81
|
+
case RegisteredAdorners.STARTING_STYLE:
|
82
|
+
return {
|
83
|
+
name: 'starting-style',
|
84
|
+
category: AdornerCategories.LAYOUT,
|
85
|
+
enabledByDefault: true,
|
86
|
+
};
|
80
87
|
case RegisteredAdorners.CONTAINER:
|
81
88
|
return {
|
82
89
|
name: 'container',
|
@@ -54,22 +54,12 @@ const UIStrings = {
|
|
54
54
|
* @description Label for the Google Developer Program subscription status that corresponds to
|
55
55
|
* `PREMIUM_ANNUAL` plan.
|
56
56
|
*/
|
57
|
-
|
58
|
-
/**
|
59
|
-
* @description Label for the Google Developer Program subscription status that corresponds to
|
60
|
-
* `PREMIUM_MONTHLY` plan.
|
61
|
-
*/
|
62
|
-
gdpPremiumMonthlySubscription: 'Premium (Monthly)',
|
57
|
+
gdpPremiumSubscription: 'Premium',
|
63
58
|
/**
|
64
59
|
* @description Label for the Google Developer Program subscription status that corresponds to
|
65
60
|
* `PRO_ANNUAL` plan.
|
66
61
|
*/
|
67
|
-
|
68
|
-
/**
|
69
|
-
* @description Label for the Google Developer Program subscription status that corresponds to
|
70
|
-
* `PRO_MONTHLY` plan.
|
71
|
-
*/
|
72
|
-
gdpProMonthlySubscription: 'Pro (Monthly)',
|
62
|
+
gdpProSubscription: 'Pro',
|
73
63
|
/**
|
74
64
|
* @description Label for the Google Developer Program subscription status that corresponds
|
75
65
|
* to a plan not known by the client.
|
@@ -137,13 +127,11 @@ function getGdpSubscriptionText(profile: Host.GdpClient.Profile): Platform.UIStr
|
|
137
127
|
|
138
128
|
switch (profile.activeSubscription.subscriptionTier) {
|
139
129
|
case Host.GdpClient.SubscriptionTier.PREMIUM_ANNUAL:
|
140
|
-
return i18nString(UIStrings.gdpPremiumAnnualSubscription);
|
141
130
|
case Host.GdpClient.SubscriptionTier.PREMIUM_MONTHLY:
|
142
|
-
return i18nString(UIStrings.
|
131
|
+
return i18nString(UIStrings.gdpPremiumSubscription);
|
143
132
|
case Host.GdpClient.SubscriptionTier.PRO_ANNUAL:
|
144
|
-
return i18nString(UIStrings.gdpProAnnualSubscription);
|
145
133
|
case Host.GdpClient.SubscriptionTier.PRO_MONTHLY:
|
146
|
-
return i18nString(UIStrings.
|
134
|
+
return i18nString(UIStrings.gdpProSubscription);
|
147
135
|
default:
|
148
136
|
return i18nString(UIStrings.gdpUnknownSubscription);
|
149
137
|
}
|
@@ -270,7 +258,7 @@ function renderWarningIfNeeded(syncInfo: Host.InspectorFrontendHostAPI.SyncInfor
|
|
270
258
|
return html`
|
271
259
|
<devtools-button
|
272
260
|
aria-describedby=settings-sync-info
|
273
|
-
|
261
|
+
.title=${warningText}
|
274
262
|
.iconName=${'info'}
|
275
263
|
.variant=${Buttons.Button.Variant.ICON}
|
276
264
|
.size=${Buttons.Button.Size.SMALL}
|
@@ -3,6 +3,9 @@
|
|
3
3
|
// found in the LICENSE file.
|
4
4
|
/* eslint-disable rulesdir/no-lit-render-outside-of-view */
|
5
5
|
|
6
|
+
import '../../../ui/components/tooltips/tooltips.js';
|
7
|
+
import '../../../ui/components/buttons/buttons.js';
|
8
|
+
|
6
9
|
import * as Common from '../../../core/common/common.js';
|
7
10
|
import * as Host from '../../../core/host/host.js';
|
8
11
|
import * as i18n from '../../../core/i18n/i18n.js';
|
@@ -46,6 +49,18 @@ const UIStrings = {
|
|
46
49
|
* @description Text for the save trace button
|
47
50
|
*/
|
48
51
|
saveButtonTitle: 'Save',
|
52
|
+
/**
|
53
|
+
* @description Title for the information icon showing more information about an option
|
54
|
+
*/
|
55
|
+
moreInfoTitle: 'More information',
|
56
|
+
/**
|
57
|
+
* @description Text shown in the information pop-up next to the "Include script content" option.
|
58
|
+
*/
|
59
|
+
scriptContentPrivacyInfo: 'Includes the full content of all loaded scripts (except extensions).',
|
60
|
+
/**
|
61
|
+
* @description Text shown in the information pop-up next to the "Include script sourcemaps" option.
|
62
|
+
*/
|
63
|
+
sourceMapsContentPrivacyInfo: 'Includes available source maps, which may expose authored code.'
|
49
64
|
} as const;
|
50
65
|
|
51
66
|
const str_ = i18n.i18n.registerUIStrings('panels/timeline/components/ExportTraceOptions.ts', UIStrings);
|
@@ -74,6 +89,9 @@ export interface ExportTraceOptionsState {
|
|
74
89
|
displaySourceMapsCheckbox?: boolean;
|
75
90
|
}
|
76
91
|
|
92
|
+
type CheckboxId = 'annotations'|'script-content'|'script-source-maps'|'compress-with-gzip';
|
93
|
+
const checkboxesWithInfoDialog = new Set<CheckboxId>(['script-content', 'script-source-maps']);
|
94
|
+
|
77
95
|
export class ExportTraceOptions extends HTMLElement {
|
78
96
|
readonly #shadow = this.attachShadow({mode: 'open'});
|
79
97
|
#data: ExportTraceOptionsData|null = null;
|
@@ -187,7 +205,7 @@ export class ExportTraceOptions extends HTMLElement {
|
|
187
205
|
}
|
188
206
|
|
189
207
|
#renderCheckbox(
|
190
|
-
checkboxWithLabel: UI.UIUtils.CheckboxLabel, title: Common.UIString.LocalizedString,
|
208
|
+
checkboxId: CheckboxId, checkboxWithLabel: UI.UIUtils.CheckboxLabel, title: Common.UIString.LocalizedString,
|
191
209
|
checked: boolean): Lit.TemplateResult {
|
192
210
|
UI.Tooltip.Tooltip.install(checkboxWithLabel, title);
|
193
211
|
checkboxWithLabel.ariaLabel = title;
|
@@ -202,11 +220,40 @@ export class ExportTraceOptions extends HTMLElement {
|
|
202
220
|
return html`
|
203
221
|
<div class='export-trace-options-row'>
|
204
222
|
${checkboxWithLabel}
|
223
|
+
|
224
|
+
${checkboxesWithInfoDialog.has(checkboxId) ? html`
|
225
|
+
<devtools-button
|
226
|
+
aria-details=${`export-trace-tooltip-${checkboxId}`}
|
227
|
+
class="pen-icon"
|
228
|
+
.title=${UIStrings.moreInfoTitle}
|
229
|
+
.iconName=${'info'}
|
230
|
+
.variant=${Buttons.Button.Variant.ICON}
|
231
|
+
></devtools-button>
|
232
|
+
` : Lit.nothing}
|
205
233
|
</div>
|
206
234
|
`;
|
207
235
|
// clang-format on
|
208
236
|
}
|
209
237
|
|
238
|
+
#renderInfoTooltip(checkboxId: CheckboxId): Lit.LitTemplate {
|
239
|
+
if (!checkboxesWithInfoDialog.has(checkboxId)) {
|
240
|
+
return Lit.nothing;
|
241
|
+
}
|
242
|
+
|
243
|
+
return html`
|
244
|
+
<devtools-tooltip
|
245
|
+
variant="rich"
|
246
|
+
id=${`export-trace-tooltip-${checkboxId}`}
|
247
|
+
>
|
248
|
+
<div class="info-tooltip-container">
|
249
|
+
<p>
|
250
|
+
${checkboxId === 'script-content' ? i18nString(UIStrings.scriptContentPrivacyInfo) : Lit.nothing}
|
251
|
+
${checkboxId === 'script-source-maps' ? i18nString(UIStrings.sourceMapsContentPrivacyInfo) : Lit.nothing}
|
252
|
+
</p>
|
253
|
+
</div>
|
254
|
+
</devtools-tooltip>`;
|
255
|
+
}
|
256
|
+
|
210
257
|
#render(): void {
|
211
258
|
if (!ComponentHelpers.ScheduledRender.isScheduledRender(this)) {
|
212
259
|
throw new Error('Export trace options dialog render was not scheduled');
|
@@ -230,16 +277,18 @@ export class ExportTraceOptions extends HTMLElement {
|
|
230
277
|
state: this.#state.dialogState,
|
231
278
|
} as Dialogs.ButtonDialog.ButtonDialogData}>
|
232
279
|
<div class='export-trace-options-content'>
|
233
|
-
${this.#state.displayAnnotationsCheckbox ? this.#renderCheckbox(this.#includeAnnotationsCheckbox,
|
280
|
+
${this.#state.displayAnnotationsCheckbox ? this.#renderCheckbox('annotations', this.#includeAnnotationsCheckbox,
|
234
281
|
i18nString(UIStrings.includeAnnotations),
|
235
282
|
this.#state.includeAnnotations): ''}
|
236
|
-
${this.#state.displayScriptContentCheckbox ? this.#renderCheckbox(this.#includeScriptContentCheckbox,
|
283
|
+
${this.#state.displayScriptContentCheckbox ? this.#renderCheckbox('script-content', this.#includeScriptContentCheckbox,
|
237
284
|
i18nString(UIStrings.includeScriptContent), this.#state.includeScriptContent): ''}
|
238
285
|
${this.#state.displayScriptContentCheckbox && this.#state.displaySourceMapsCheckbox ? this.#renderCheckbox(
|
286
|
+
'script-source-maps',
|
239
287
|
this.#includeSourceMapsCheckbox, i18nString(UIStrings.includeSourcemap), this.#state.includeSourceMaps): ''}
|
240
|
-
${this.#renderCheckbox(this.#shouldCompressCheckbox, i18nString(UIStrings.shouldCompress), this.#state.shouldCompress)}
|
288
|
+
${this.#renderCheckbox('compress-with-gzip', this.#shouldCompressCheckbox, i18nString(UIStrings.shouldCompress), this.#state.shouldCompress)}
|
241
289
|
<div class='export-trace-options-row'><div class='export-trace-blank'></div><devtools-button
|
242
290
|
class="setup-button"
|
291
|
+
data-export-button
|
243
292
|
@click=${this.#onExportClick.bind(this)}
|
244
293
|
.data=${{
|
245
294
|
variant: Buttons.Button.Variant.PRIMARY,
|
@@ -249,6 +298,9 @@ export class ExportTraceOptions extends HTMLElement {
|
|
249
298
|
</div>
|
250
299
|
</div>
|
251
300
|
</devtools-button-dialog>
|
301
|
+
|
302
|
+
${this.#state.displayScriptContentCheckbox ? this.#renderInfoTooltip('script-content') : Lit.nothing}
|
303
|
+
${this.#state.displayScriptContentCheckbox && this.#state.displaySourceMapsCheckbox ? this.#renderInfoTooltip('script-source-maps') : Lit.nothing}
|
252
304
|
`;
|
253
305
|
// clang-format on
|
254
306
|
Lit.render(output, this.#shadow, {host: this});
|
@@ -9,4 +9,11 @@ License File: LICENSE
|
|
9
9
|
Security Critical: no
|
10
10
|
Shipped: yes
|
11
11
|
|
12
|
-
This directory contains Chromium's version of
|
12
|
+
This directory contains Chromium's version of Lighthouse. It includes:
|
13
|
+
|
14
|
+
- locale strings
|
15
|
+
- report assets
|
16
|
+
- report renderer
|
17
|
+
- worker bundle for running Lighthouse core
|
18
|
+
|
19
|
+
Build documentation: https://github.com/GoogleChrome/lighthouse/blob/main/build/readme.md#building-for-devtools
|
@@ -197,8 +197,8 @@ export class InspectorView extends VBox implements ViewLocationResolver {
|
|
197
197
|
this.#toggleOrientationButton = new ToolbarButton(
|
198
198
|
i18nString(UIStrings.toggleDrawerOrientation),
|
199
199
|
this.drawerSplitWidget.isVertical() ? 'dock-bottom' : 'dock-right');
|
200
|
-
this.#toggleOrientationButton.element.setAttribute(
|
201
|
-
|
200
|
+
this.#toggleOrientationButton.element.setAttribute(
|
201
|
+
'jslog', `${VisualLogging.toggle('toggle-drawer-orientation').track({click: true})}`);
|
202
202
|
this.#toggleOrientationButton.addEventListener(
|
203
203
|
ToolbarButton.Events.CLICK, () => this.toggleDrawerOrientation(), this);
|
204
204
|
this.drawerTabbedPane.addEventListener(
|
@@ -302,17 +302,17 @@ export class InspectorView extends VBox implements ViewLocationResolver {
|
|
302
302
|
inspectorViewInstance = null;
|
303
303
|
}
|
304
304
|
|
305
|
-
|
305
|
+
applyDrawerOrientationForDockSideForTest(): void {
|
306
306
|
}
|
307
307
|
|
308
|
-
#
|
308
|
+
#applyDrawerOrientationForDockSide(): void {
|
309
309
|
if (!this.drawerVisible()) {
|
310
|
-
this.
|
310
|
+
this.applyDrawerOrientationForDockSideForTest();
|
311
311
|
return;
|
312
312
|
}
|
313
313
|
const newOrientation = this.#getOrientationForDockMode();
|
314
|
-
this.#
|
315
|
-
this.
|
314
|
+
this.#applyDrawerOrientation(newOrientation);
|
315
|
+
this.applyDrawerOrientationForDockSideForTest();
|
316
316
|
}
|
317
317
|
|
318
318
|
#getDockMode(): DockMode {
|
@@ -339,10 +339,15 @@ export class InspectorView extends VBox implements ViewLocationResolver {
|
|
339
339
|
return orientation;
|
340
340
|
}
|
341
341
|
|
342
|
-
#
|
343
|
-
const
|
344
|
-
this
|
345
|
-
|
342
|
+
#applyDrawerOrientation(orientation: Omit<DrawerOrientation, DrawerOrientation.UNSET>): void {
|
343
|
+
const shouldBeVertical = orientation === DrawerOrientation.VERTICAL;
|
344
|
+
const isVertical = this.drawerSplitWidget.isVertical();
|
345
|
+
if (shouldBeVertical === isVertical) {
|
346
|
+
return;
|
347
|
+
}
|
348
|
+
|
349
|
+
this.#toggleOrientationButton.setGlyph(shouldBeVertical ? 'dock-bottom' : 'dock-right');
|
350
|
+
this.drawerSplitWidget.setVertical(shouldBeVertical);
|
346
351
|
this.setDrawerRelatedMinimumSizes();
|
347
352
|
}
|
348
353
|
|
@@ -360,15 +365,16 @@ export class InspectorView extends VBox implements ViewLocationResolver {
|
|
360
365
|
this.#resizeObserver.observe(this.element);
|
361
366
|
this.#observedResize();
|
362
367
|
this.element.ownerDocument.addEventListener('keydown', this.keyDownBound, false);
|
363
|
-
DockController.instance().addEventListener(
|
364
|
-
|
368
|
+
DockController.instance().addEventListener(
|
369
|
+
DockControllerEvents.DOCK_SIDE_CHANGED, this.#applyDrawerOrientationForDockSide, this);
|
370
|
+
this.#applyDrawerOrientationForDockSide();
|
365
371
|
}
|
366
372
|
|
367
373
|
override willHide(): void {
|
368
374
|
this.#resizeObserver.unobserve(this.element);
|
369
375
|
this.element.ownerDocument.removeEventListener('keydown', this.keyDownBound, false);
|
370
376
|
DockController.instance().removeEventListener(
|
371
|
-
DockControllerEvents.DOCK_SIDE_CHANGED, this.#
|
377
|
+
DockControllerEvents.DOCK_SIDE_CHANGED, this.#applyDrawerOrientationForDockSide, this);
|
372
378
|
}
|
373
379
|
|
374
380
|
resolveLocation(locationName: string): ViewLocation|null {
|
@@ -463,6 +469,7 @@ export class InspectorView extends VBox implements ViewLocationResolver {
|
|
463
469
|
} else {
|
464
470
|
this.focusRestorer = null;
|
465
471
|
}
|
472
|
+
this.#applyDrawerOrientationForDockSide();
|
466
473
|
ARIAUtils.LiveAnnouncer.alert(i18nString(UIStrings.drawerShown));
|
467
474
|
}
|
468
475
|
|
@@ -502,7 +509,7 @@ export class InspectorView extends VBox implements ViewLocationResolver {
|
|
502
509
|
currentSettings[dockMode] = newOrientation as DrawerOrientation;
|
503
510
|
this.drawerOrientationByDockSetting.set(currentSettings);
|
504
511
|
|
505
|
-
this.#
|
512
|
+
this.#applyDrawerOrientation(newOrientation);
|
506
513
|
}
|
507
514
|
|
508
515
|
isUserExplicitlyUpdatedDrawerOrientation(): boolean {
|
@@ -3573,6 +3573,7 @@ export const knownContextValues = new Set([
|
|
3573
3573
|
'starter-badge-dismissed',
|
3574
3574
|
'starter-badge-last-snoozed-timestamp',
|
3575
3575
|
'starter-badge-snooze-count',
|
3576
|
+
'starting-style',
|
3576
3577
|
'static-global-setting',
|
3577
3578
|
'static-synced-setting',
|
3578
3579
|
'status',
|
package/package.json
CHANGED