chrome-devtools-frontend 1.0.998281 → 1.0.998787
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/front_end/core/host/UserMetrics.ts +2 -1
- package/front_end/core/i18n/locales/en-US.json +3 -0
- package/front_end/core/i18n/locales/en-XL.json +3 -0
- package/front_end/core/sdk/DebuggerModel.ts +4 -30
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +31 -0
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +15 -0
- package/front_end/entrypoints/lighthouse_worker/LighthouseWorkerService.ts +6 -0
- package/front_end/generated/InspectorBackendCommands.js +0 -1
- package/front_end/generated/protocol.ts +0 -1
- package/front_end/models/issues_manager/DeprecationIssue.ts +200 -199
- package/front_end/panels/lighthouse/LighthouseController.ts +19 -12
- package/front_end/panels/lighthouse/LighthousePanel.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseStartView.ts +10 -4
- package/front_end/panels/lighthouse/LighthouseStartViewFR.ts +50 -48
- package/front_end/panels/lighthouse/lighthouseStartView.css +3 -3
- package/front_end/panels/timeline/TimelineUIUtils.ts +7 -28
- package/front_end/ui/legacy/ActionRegistration.ts +1 -0
- package/front_end/ui/legacy/Toolbar.ts +4 -0
- package/package.json +1 -1
@@ -549,7 +549,8 @@ export enum KeyboardShortcutAction {
|
|
549
549
|
'layers.left' = 104,
|
550
550
|
'layers.right' = 105,
|
551
551
|
'help.report-translation-issue' = 106,
|
552
|
-
|
552
|
+
'rendering.toggle-prefers-color-scheme' = 107,
|
553
|
+
MaxValue = 108,
|
553
554
|
}
|
554
555
|
/* eslint-enable @typescript-eslint/naming-convention */
|
555
556
|
|
@@ -899,6 +899,9 @@
|
|
899
899
|
"entrypoints/inspector_main/inspector_main-meta.ts | showRendering": {
|
900
900
|
"message": "Show Rendering"
|
901
901
|
},
|
902
|
+
"entrypoints/inspector_main/inspector_main-meta.ts | toggleCssPrefersColorSchemeMedia": {
|
903
|
+
"message": "Toggle forces CSS prefers-color-scheme color"
|
904
|
+
},
|
902
905
|
"entrypoints/inspector_main/inspector_main-meta.ts | visionDeficiency": {
|
903
906
|
"message": "vision deficiency"
|
904
907
|
},
|
@@ -899,6 +899,9 @@
|
|
899
899
|
"entrypoints/inspector_main/inspector_main-meta.ts | showRendering": {
|
900
900
|
"message": "Ŝh́ôẃ R̂én̂d́êŕîńĝ"
|
901
901
|
},
|
902
|
+
"entrypoints/inspector_main/inspector_main-meta.ts | toggleCssPrefersColorSchemeMedia": {
|
903
|
+
"message": "T̂óĝǵl̂é f̂ór̂ćêś ĈŚŜ ṕr̂éf̂ér̂ś-ĉól̂ór̂-śĉh́êḿê ćôĺôŕ"
|
904
|
+
},
|
902
905
|
"entrypoints/inspector_main/inspector_main-meta.ts | visionDeficiency": {
|
903
906
|
"message": "v̂íŝíôń d̂éf̂íĉíêńĉý"
|
904
907
|
},
|
@@ -245,9 +245,6 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
245
245
|
if (!Common.Settings.Settings.instance().moduleSetting('breakpointsActive').get()) {
|
246
246
|
this.breakpointsActiveChanged();
|
247
247
|
}
|
248
|
-
if (_scheduledPauseOnAsyncCall) {
|
249
|
-
void this.pauseOnAsyncCall(_scheduledPauseOnAsyncCall);
|
250
|
-
}
|
251
248
|
this.dispatchEventToListeners(Events.DebuggerWasEnabled, this);
|
252
249
|
const [enableResult] = await Promise.all([enablePromise, instrumentationPromise]);
|
253
250
|
this.registerDebugger(enableResult);
|
@@ -422,10 +419,6 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
422
419
|
void this.agent.invoke_pause();
|
423
420
|
}
|
424
421
|
|
425
|
-
private pauseOnAsyncCall(parentStackTraceId: Protocol.Runtime.StackTraceId): Promise<Object> {
|
426
|
-
return this.agent.invoke_pauseOnAsyncCall({parentStackTraceId: parentStackTraceId});
|
427
|
-
}
|
428
|
-
|
429
422
|
async setBreakpointByURL(
|
430
423
|
url: Platform.DevToolsPath.UrlString, lineNumber: number, columnNumber?: number,
|
431
424
|
condition?: string): Promise<SetBreakpointResult> {
|
@@ -659,8 +652,7 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
659
652
|
async pausedScript(
|
660
653
|
callFrames: Protocol.Debugger.CallFrame[], reason: Protocol.Debugger.PausedEventReason, auxData: Object|undefined,
|
661
654
|
breakpointIds: string[], asyncStackTrace?: Protocol.Runtime.StackTrace,
|
662
|
-
asyncStackTraceId?: Protocol.Runtime.StackTraceId
|
663
|
-
asyncCallStackTraceId?: Protocol.Runtime.StackTraceId): Promise<void> {
|
655
|
+
asyncStackTraceId?: Protocol.Runtime.StackTraceId): Promise<void> {
|
664
656
|
if (reason === Protocol.Debugger.PausedEventReason.Instrumentation) {
|
665
657
|
const script = this.scriptForId(callFrames[0].location.scriptId);
|
666
658
|
if (this.#synchronizeBreakpointsCallback && script) {
|
@@ -670,18 +662,6 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
670
662
|
return;
|
671
663
|
}
|
672
664
|
|
673
|
-
if (asyncCallStackTraceId) {
|
674
|
-
// Note: this is only to support old backends. Newer ones do not send asyncCallStackTraceId.
|
675
|
-
_scheduledPauseOnAsyncCall = asyncCallStackTraceId;
|
676
|
-
const promises = [];
|
677
|
-
for (const model of _debuggerIdToModel.values()) {
|
678
|
-
promises.push(model.pauseOnAsyncCall(asyncCallStackTraceId));
|
679
|
-
}
|
680
|
-
await Promise.all(promises);
|
681
|
-
this.resume();
|
682
|
-
return;
|
683
|
-
}
|
684
|
-
|
685
665
|
const pausedDetails =
|
686
666
|
new DebuggerPausedDetails(this, callFrames, reason, auxData, breakpointIds, asyncStackTrace, asyncStackTraceId);
|
687
667
|
|
@@ -706,8 +686,6 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
706
686
|
} else {
|
707
687
|
Common.EventTarget.fireEvent('DevTools.DebuggerPaused');
|
708
688
|
}
|
709
|
-
|
710
|
-
_scheduledPauseOnAsyncCall = null;
|
711
689
|
}
|
712
690
|
|
713
691
|
resumedScript(): void {
|
@@ -989,10 +967,6 @@ export class DebuggerModel extends SDKModel<EventTypes> {
|
|
989
967
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
990
968
|
export const _debuggerIdToModel = new Map<string, DebuggerModel>();
|
991
969
|
|
992
|
-
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
|
993
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
994
|
-
export let _scheduledPauseOnAsyncCall: Protocol.Runtime.StackTraceId|null = null;
|
995
|
-
|
996
970
|
/**
|
997
971
|
* Keep these in sync with WebCore::V8Debugger
|
998
972
|
*/
|
@@ -1037,13 +1011,13 @@ class DebuggerDispatcher implements ProtocolProxyApi.DebuggerDispatcher {
|
|
1037
1011
|
this.#debuggerModel = debuggerModel;
|
1038
1012
|
}
|
1039
1013
|
|
1040
|
-
paused({callFrames, reason, data, hitBreakpoints, asyncStackTrace, asyncStackTraceId
|
1041
|
-
|
1014
|
+
paused({callFrames, reason, data, hitBreakpoints, asyncStackTrace, asyncStackTraceId}: Protocol.Debugger.PausedEvent):
|
1015
|
+
void {
|
1042
1016
|
if (!this.#debuggerModel.debuggerEnabled()) {
|
1043
1017
|
return;
|
1044
1018
|
}
|
1045
1019
|
void this.#debuggerModel.pausedScript(
|
1046
|
-
callFrames, reason, data, hitBreakpoints || [], asyncStackTrace, asyncStackTraceId
|
1020
|
+
callFrames, reason, data, hitBreakpoints || [], asyncStackTrace, asyncStackTraceId);
|
1047
1021
|
}
|
1048
1022
|
|
1049
1023
|
resumed(): void {
|
@@ -346,3 +346,34 @@ export class RenderingOptionsView extends UI.Widget.VBox {
|
|
346
346
|
this.registerCSSFiles([renderingOptionsStyles]);
|
347
347
|
}
|
348
348
|
}
|
349
|
+
|
350
|
+
let reloadActionDelegateInstance: ReloadActionDelegate;
|
351
|
+
|
352
|
+
export class ReloadActionDelegate implements UI.ActionRegistration.ActionDelegate {
|
353
|
+
static instance(opts: {
|
354
|
+
forceNew: boolean|null,
|
355
|
+
} = {forceNew: null}): ReloadActionDelegate {
|
356
|
+
const {forceNew} = opts;
|
357
|
+
if (!reloadActionDelegateInstance || forceNew) {
|
358
|
+
reloadActionDelegateInstance = new ReloadActionDelegate();
|
359
|
+
}
|
360
|
+
|
361
|
+
return reloadActionDelegateInstance;
|
362
|
+
}
|
363
|
+
|
364
|
+
handleAction(context: UI.Context.Context, actionId: string): boolean {
|
365
|
+
const emulatedCSSMediaFeaturePrefersColorSchemeSetting =
|
366
|
+
Common.Settings.Settings.instance().moduleSetting('emulatedCSSMediaFeaturePrefersColorScheme');
|
367
|
+
|
368
|
+
switch (actionId) {
|
369
|
+
case 'rendering.toggle-prefers-color-scheme':
|
370
|
+
if (emulatedCSSMediaFeaturePrefersColorSchemeSetting.get() === 'light') {
|
371
|
+
emulatedCSSMediaFeaturePrefersColorSchemeSetting.set('dark');
|
372
|
+
} else {
|
373
|
+
emulatedCSSMediaFeaturePrefersColorSchemeSetting.set('light');
|
374
|
+
}
|
375
|
+
return true;
|
376
|
+
}
|
377
|
+
return false;
|
378
|
+
}
|
379
|
+
}
|
@@ -99,6 +99,11 @@ const UIStrings = {
|
|
99
99
|
* setting turns off this overlay.
|
100
100
|
*/
|
101
101
|
disablePaused: 'Disable paused state overlay',
|
102
|
+
/**
|
103
|
+
* @description Title of an action that toggle
|
104
|
+
* "forces CSS prefers-color-scheme" color
|
105
|
+
*/
|
106
|
+
toggleCssPrefersColorSchemeMedia: 'Toggle forces CSS prefers-color-scheme color',
|
102
107
|
};
|
103
108
|
const str_ = i18n.i18n.registerUIStrings('entrypoints/inspector_main/inspector_main-meta.ts', UIStrings);
|
104
109
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
@@ -191,6 +196,16 @@ UI.ActionRegistration.registerActionExtension({
|
|
191
196
|
],
|
192
197
|
});
|
193
198
|
|
199
|
+
UI.ActionRegistration.registerActionExtension({
|
200
|
+
actionId: 'rendering.toggle-prefers-color-scheme',
|
201
|
+
category: UI.ActionRegistration.ActionCategory.RENDERING,
|
202
|
+
title: i18nLazyString(UIStrings.toggleCssPrefersColorSchemeMedia),
|
203
|
+
async loadActionDelegate() {
|
204
|
+
const InspectorMain = await loadInspectorMainModule();
|
205
|
+
return InspectorMain.RenderingOptions.ReloadActionDelegate.instance();
|
206
|
+
},
|
207
|
+
});
|
208
|
+
|
194
209
|
Common.Settings.registerSettingExtension({
|
195
210
|
category: Common.Settings.SettingCategory.NETWORK,
|
196
211
|
title: i18nLazyString(UIStrings.forceAdBlocking),
|
@@ -118,6 +118,12 @@ async function invokeLH(action: string, args: any): Promise<unknown> {
|
|
118
118
|
flags.channel = 'devtools';
|
119
119
|
flags.locale = locale;
|
120
120
|
|
121
|
+
// TODO: Remove this filter once pubads is mode restricted
|
122
|
+
// https://github.com/googleads/publisher-ads-lighthouse-plugin/pull/339
|
123
|
+
if (action === 'startTimespan' || action === 'snapshot') {
|
124
|
+
args.categoryIDs = args.categoryIDs.filter((c: string) => c !== 'lighthouse-plugin-publisher-ads');
|
125
|
+
}
|
126
|
+
|
121
127
|
// @ts-expect-error https://github.com/GoogleChrome/lighthouse/issues/11628
|
122
128
|
const config = self.createConfig(args.categoryIDs, flags.emulatedFormFactor);
|
123
129
|
const url = args.url;
|
@@ -273,7 +273,6 @@ export function registerCommands(inspectorBackend) {
|
|
273
273
|
'Audits.GenericIssueErrorType', {CrossOriginPortalPostMessageError: 'CrossOriginPortalPostMessageError'});
|
274
274
|
inspectorBackend.registerEnum('Audits.DeprecationIssueType', {
|
275
275
|
AuthorizationCoveredByWildcard: 'AuthorizationCoveredByWildcard',
|
276
|
-
BatteryStatusInsecureOrigin: 'BatteryStatusInsecureOrigin',
|
277
276
|
CanRequestURLHTTPContainingNewline: 'CanRequestURLHTTPContainingNewline',
|
278
277
|
ChromeLoadTimesConnectionInfo: 'ChromeLoadTimesConnectionInfo',
|
279
278
|
ChromeLoadTimesFirstPaintAfterLoadTime: 'ChromeLoadTimesFirstPaintAfterLoadTime',
|
@@ -1020,7 +1020,6 @@ export namespace Audits {
|
|
1020
1020
|
|
1021
1021
|
export const enum DeprecationIssueType {
|
1022
1022
|
AuthorizationCoveredByWildcard = 'AuthorizationCoveredByWildcard',
|
1023
|
-
BatteryStatusInsecureOrigin = 'BatteryStatusInsecureOrigin',
|
1024
1023
|
CanRequestURLHTTPContainingNewline = 'CanRequestURLHTTPContainingNewline',
|
1025
1024
|
ChromeLoadTimesConnectionInfo = 'ChromeLoadTimesConnectionInfo',
|
1026
1025
|
ChromeLoadTimesFirstPaintAfterLoadTime = 'ChromeLoadTimesFirstPaintAfterLoadTime',
|
@@ -10,322 +10,328 @@ import {Issue, IssueCategory, IssueKind} from './Issue.js';
|
|
10
10
|
import type {MarkdownIssueDescription} from './MarkdownIssueDescription.js';
|
11
11
|
import {resolveLazyDescription} from './MarkdownIssueDescription.js';
|
12
12
|
|
13
|
-
const
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
const
|
14
|
+
UIStrings =
|
15
|
+
{
|
16
|
+
// Store strings used across messages in this block.
|
17
|
+
/**
|
17
18
|
* @description This links to the chrome feature status page when one exists.
|
18
19
|
*/
|
19
|
-
|
20
|
-
|
20
|
+
feature: 'Check the feature status page for more details.',
|
21
|
+
/**
|
21
22
|
* @description This links to the chromium dash schedule when a milestone is set.
|
22
23
|
* @example {100} milestone
|
23
24
|
*/
|
24
|
-
|
25
|
-
|
25
|
+
milestone: 'This change will go into effect with milestone {milestone}.',
|
26
|
+
/**
|
26
27
|
*@description Title of issue raised when a deprecated feature is used
|
27
28
|
*/
|
28
|
-
|
29
|
+
title: 'Deprecated Feature Used',
|
29
30
|
|
30
|
-
|
31
|
-
|
31
|
+
// Store alphabetized messages per DeprecationIssueType in this block.
|
32
|
+
/**
|
32
33
|
*@description TODO(crbug.com/1318846): Description needed for translation
|
33
34
|
*/
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
*@description Warning displayed to developers when the Battery Status API is used from an insecure origin (one that isn't localhost or doesn't use HTTPS) to notify them that this use is deprecated and will soon be unsupported.
|
38
|
-
*/
|
39
|
-
batteryStatusInsecureOrigin:
|
40
|
-
'Using the Battery Status API (e.g. `navigator.getBattery()`) in insecure origins like HTTP is deprecated and will be removed.',
|
41
|
-
/**
|
35
|
+
authorizationCoveredByWildcard:
|
36
|
+
'Authorization will not be covered by the wildcard symbol (*) in CORS `Access-Control-Allow-Headers` handling.',
|
37
|
+
/**
|
42
38
|
*@description TODO(crbug.com/1320334): Description needed for translation
|
43
39
|
*/
|
44
|
-
|
45
|
-
|
46
|
-
|
40
|
+
canRequestURLHTTPContainingNewline:
|
41
|
+
'Resource requests whose URLs contained both removed whitespace `\\(n|r|t)` characters and less-than characters (`<`) are blocked. Please remove newlines and encode less-than characters from places like element attribute values in order to load these resources.',
|
42
|
+
/**
|
47
43
|
*@description TODO(crbug.com/1320335): Description needed for translation
|
48
44
|
*/
|
49
|
-
|
50
|
-
|
51
|
-
|
45
|
+
chromeLoadTimesConnectionInfo:
|
46
|
+
'`chrome.loadTimes()` is deprecated, instead use standardized API: Navigation Timing 2.',
|
47
|
+
/**
|
52
48
|
*@description TODO(crbug.com/1320336): Description needed for translation
|
53
49
|
*/
|
54
|
-
|
55
|
-
|
56
|
-
|
50
|
+
chromeLoadTimesFirstPaintAfterLoadTime:
|
51
|
+
'`chrome.loadTimes()` is deprecated, instead use standardized API: Paint Timing.',
|
52
|
+
/**
|
57
53
|
*@description TODO(crbug.com/1320337): Description needed for translation
|
58
54
|
*/
|
59
|
-
|
60
|
-
|
61
|
-
|
55
|
+
chromeLoadTimesWasAlternateProtocolAvailable:
|
56
|
+
'`chrome.loadTimes()` is deprecated, instead use standardized API: `nextHopProtocol` in Navigation Timing 2.',
|
57
|
+
/**
|
62
58
|
*@description TODO(crbug.com/1318847): Description needed for translation
|
63
59
|
*/
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
60
|
+
cookieWithTruncatingChar: 'Cookies containing a `\\(0|r|n)` character will be rejected instead of truncated.',
|
61
|
+
/**
|
62
|
+
*@description This warning occurs when a frame accesses another frame's
|
63
|
+
* data after having set `document.domain` without having set the
|
64
|
+
* `Origin-Agent-Cluster` http header. This is a companion warning to
|
65
|
+
* `documentDomainSettingWithoutOriginAgentClusterHeader`, where that
|
66
|
+
* warning occurs when `document.domain` is set, and this warning
|
67
|
+
* occurs when an access has been made, based on that previous
|
68
|
+
* `document.domain` setting.
|
69
|
+
*/
|
70
|
+
crossOriginAccessBasedOnDocumentDomain:
|
71
|
+
'Relaxing the same-origin policy by setting `document.domain` is deprecated, and will be disabled by default. This deprecation warning is for a cross-origin access that was enabled by setting `document.domain`.',
|
72
|
+
/**
|
71
73
|
*@description TODO(crbug.com/1318850): Description needed for translation
|
72
74
|
*/
|
73
|
-
|
74
|
-
|
75
|
-
|
75
|
+
crossOriginWindowAlert:
|
76
|
+
'Triggering `window.alert` from cross origin iframes has been deprecated and will be removed in the future.',
|
77
|
+
/**
|
76
78
|
*@description TODO(crbug.com/1318851): Description needed for translation
|
77
79
|
*/
|
78
|
-
|
79
|
-
|
80
|
-
|
80
|
+
crossOriginWindowConfirm:
|
81
|
+
'Triggering `window.confirm` from cross origin iframes has been deprecated and will be removed in the future.',
|
82
|
+
/**
|
81
83
|
*@description TODO(crbug.com/1320339): Description needed for translation
|
82
84
|
*/
|
83
|
-
|
84
|
-
|
85
|
-
|
85
|
+
cssSelectorInternalMediaControlsOverlayCastButton:
|
86
|
+
'The `disableRemotePlayback` attribute should be used in order to disable the default Cast integration instead of using `-internal-media-controls-overlay-cast-button` selector.',
|
87
|
+
/**
|
86
88
|
*@description TODO(crbug.com/1320340): Description needed for translation
|
87
89
|
*/
|
88
|
-
|
89
|
-
|
90
|
-
|
90
|
+
customCursorIntersectsViewport:
|
91
|
+
'Custom cursors with size greater than 32x32 DIP intersecting native UI is deprecated and will be removed.',
|
92
|
+
/**
|
91
93
|
*@description This message is shown when the example deprecated feature is used
|
92
94
|
*/
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
95
|
+
deprecationExample: 'This is an example of a translated deprecation issue message.',
|
96
|
+
/**
|
97
|
+
*@description This warning occurs when a script modifies `document.domain`
|
98
|
+
* without having set on `Origin-Agent-Cluster` http header. In other
|
99
|
+
* words, when a script relies on the default behaviour of
|
100
|
+
* `Origin-Agent-Cluster` when setting document.domain.
|
101
|
+
*/
|
102
|
+
documentDomainSettingWithoutOriginAgentClusterHeader:
|
103
|
+
'Relaxing the same-origin policy by setting `document.domain` is deprecated, and will be disabled by default. To continue using this feature, please opt-out of origin-keyed agent clusters by sending an `Origin-Agent-Cluster: ?0` header along with the HTTP response for the document and frames. See https://developer.chrome.com/blog/immutable-document-domain/ for more details.',
|
104
|
+
/**
|
100
105
|
*@description TODO(crbug.com/1320338): Description needed for translation
|
101
106
|
*/
|
102
|
-
|
103
|
-
|
107
|
+
eventPath: '`Event.path` is deprecated and will be removed. Please use `Event.composedPath()` instead.',
|
108
|
+
/**
|
104
109
|
*@description Warning displayed to developers when the Geolocation API is used from an insecure origin (one that isn't localhost or doesn't use HTTPS) to notify them that this use is no longer supported.
|
105
110
|
*/
|
106
|
-
|
107
|
-
|
108
|
-
|
111
|
+
geolocationInsecureOrigin:
|
112
|
+
'`getCurrentPosition()` and `watchPosition()` no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details.',
|
113
|
+
/**
|
109
114
|
*@description Warning displayed to developers when the Geolocation API is used from an insecure origin (one that isn't localhost or doesn't use HTTPS) to notify them that this use is deprecated.
|
110
115
|
*/
|
111
|
-
|
112
|
-
|
113
|
-
|
116
|
+
geolocationInsecureOriginDeprecatedNotRemoved:
|
117
|
+
'`getCurrentPosition()` and `watchPosition()` are deprecated on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details.',
|
118
|
+
/**
|
114
119
|
*@description TODO(crbug.com/1318858): Description needed for translation
|
115
120
|
*/
|
116
|
-
|
117
|
-
|
118
|
-
|
121
|
+
getUserMediaInsecureOrigin:
|
122
|
+
'`getUserMedia()` no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details.',
|
123
|
+
/**
|
119
124
|
*@description TODO(crbug.com/1320342): Description needed for translation
|
120
125
|
*/
|
121
|
-
|
122
|
-
|
123
|
-
|
126
|
+
hostCandidateAttributeGetter:
|
127
|
+
'`RTCPeerConnectionIceErrorEvent.hostCandidate` is deprecated. Please use `RTCPeerConnectionIceErrorEvent.address` or `RTCPeerConnectionIceErrorEvent.port` instead.',
|
128
|
+
/**
|
124
129
|
*@description TODO(crbug.com/1320343): Description needed for translation
|
125
130
|
*/
|
126
|
-
|
127
|
-
|
128
|
-
|
131
|
+
insecurePrivateNetworkSubresourceRequest:
|
132
|
+
'The website requested a subresource from a network that it could only access because of its users\' privileged network position. These requests expose non-public devices and servers to the internet, increasing the risk of a cross-site request forgery (CSRF) attack, and/or information leakage. To mitigate these risks, Chrome deprecates requests to non-public subresources when initiated from non-secure contexts, and will start blocking them.',
|
133
|
+
/**
|
129
134
|
*@description TODO(crbug.com/1318860): Description needed for translation
|
130
135
|
*/
|
131
|
-
|
132
|
-
|
133
|
-
|
136
|
+
legacyConstraintGoogCpuOveruseDetection:
|
137
|
+
'CPU overuse detection is enabled-by-default and the ability to disable it using `googCpuOveruseDetection` will soon be removed. Please stop using this legacy constraint.',
|
138
|
+
/**
|
134
139
|
*@description TODO(crbug.com/1318861): Description needed for translation
|
135
140
|
*/
|
136
|
-
|
137
|
-
|
138
|
-
|
141
|
+
legacyConstraintGoogIPv6:
|
142
|
+
'IPv6 is enabled-by-default and the ability to disable it using `googIPv6` will soon be removed. Please stop using this legacy constraint.',
|
143
|
+
/**
|
139
144
|
*@description TODO(crbug.com/1318863): Description needed for translation
|
140
145
|
*/
|
141
|
-
|
142
|
-
|
143
|
-
|
146
|
+
legacyConstraintGoogScreencastMinBitrate:
|
147
|
+
'Screencast min bitrate is now set to 100 kbps by default and `googScreencastMinBitrate` will soon be ignored in favor of this new default. Please stop using this legacy constraint.',
|
148
|
+
/**
|
144
149
|
*@description TODO(crbug.com/1318864): Description needed for translation
|
145
150
|
*/
|
146
|
-
|
147
|
-
|
148
|
-
|
151
|
+
legacyConstraintGoogSuspendBelowMinBitrate:
|
152
|
+
'Support for the `googSuspendBelowMinBitrate` constraint is about to be removed. Please stop using this legacy constraint.',
|
153
|
+
/**
|
149
154
|
*@description TODO(crbug.com/1318865): Description needed for translation
|
150
155
|
*/
|
151
|
-
|
152
|
-
|
153
|
-
|
156
|
+
localCSSFileExtensionRejected:
|
157
|
+
'CSS cannot be loaded from `file:` URLs unless they end in a `.css` file extension.',
|
158
|
+
/**
|
154
159
|
*@description TODO(crbug.com/1320344): Description needed for translation
|
155
160
|
*/
|
156
|
-
|
157
|
-
|
158
|
-
|
161
|
+
mediaElementAudioSourceNode:
|
162
|
+
'Creating a `MediaElementAudioSourceNode` on an `OfflineAudioContext` is deprecated and will be removed.',
|
163
|
+
/**
|
159
164
|
*@description TODO(crbug.com/1320345): Description needed for translation
|
160
165
|
*/
|
161
|
-
|
162
|
-
|
163
|
-
|
166
|
+
mediaSourceAbortRemove:
|
167
|
+
'Using `SourceBuffer.abort()` to abort `remove()`\'s asynchronous range removal is deprecated due to specification change. Support will be removed in the future. You should instead await `updateend`. `abort()` is intended to only abort an asynchronous media append or reset parser state.',
|
168
|
+
/**
|
164
169
|
*@description TODO(crbug.com/1320346): Description needed for translation
|
165
170
|
*/
|
166
|
-
|
167
|
-
|
168
|
-
|
171
|
+
mediaSourceDurationTruncatingBuffered:
|
172
|
+
'Setting `MediaSource.duration` below the highest presentation timestamp of any buffered coded frames is deprecated due to specification change. Support for implicit removal of truncated buffered media will be removed in the future. You should instead perform explicit `remove(newDuration, oldDuration)` on all `sourceBuffers`, where `newDuration < oldDuration`.',
|
173
|
+
/**
|
169
174
|
*@description TODO(crbug.com/1320347): Description needed for translation
|
170
175
|
*/
|
171
|
-
|
172
|
-
|
173
|
-
|
176
|
+
noSysexWebMIDIWithoutPermission:
|
177
|
+
'Web MIDI will ask a permission to use even if the sysex is not specified in the `MIDIOptions`.',
|
178
|
+
/**
|
174
179
|
*@description Warning displayed to developers when the Notification API is used from an insecure origin (one that isn't localhost or doesn't use HTTPS) to notify them that this use is no longer supported.
|
175
180
|
*/
|
176
|
-
|
177
|
-
|
178
|
-
|
181
|
+
notificationInsecureOrigin:
|
182
|
+
'The Notification API may no longer be used from insecure origins. You should consider switching your application to a secure origin, such as HTTPS. See https://goo.gle/chrome-insecure-origins for more details.',
|
183
|
+
/**
|
179
184
|
*@description Warning displayed to developers when permission to use notifications has been requested by a cross-origin iframe, to notify them that this use is no longer supported.
|
180
185
|
*/
|
181
|
-
|
182
|
-
|
186
|
+
notificationPermissionRequestedIframe:
|
187
|
+
'Permission for the Notification API may no longer be requested from a cross-origin iframe. You should consider requesting permission from a top-level frame or opening a new window instead.',
|
188
|
+
/**
|
183
189
|
*@description TODO(crbug.com/1318867): Description needed for translation
|
184
190
|
*/
|
185
|
-
|
186
|
-
|
187
|
-
|
191
|
+
obsoleteWebRtcCipherSuite:
|
192
|
+
'Your partner is negotiating an obsolete (D)TLS version. Please check with your partner to have this fixed.',
|
193
|
+
/**
|
188
194
|
*@description TODO(crbug.com/1320349): Description needed for translation
|
189
195
|
*/
|
190
|
-
|
191
|
-
|
196
|
+
paymentRequestBasicCard: 'The `basic-card` payment method is deprecated and will be removed.',
|
197
|
+
/**
|
192
198
|
*@description TODO(crbug.com/1320350): Description needed for translation
|
193
199
|
*/
|
194
|
-
|
195
|
-
|
196
|
-
|
200
|
+
paymentRequestShowWithoutGesture:
|
201
|
+
'Calling `PaymentRequest.show()` without user activation is deprecated and will be removed.',
|
202
|
+
/**
|
197
203
|
*@description This issue indicates that a `<source>` element with a `<picture>` parent was using an `src` attribute, which is not valid and is ignored by the browser. The `srcset` attribute should be used instead.
|
198
204
|
*/
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
*@description
|
205
|
+
pictureSourceSrc:
|
206
|
+
'`<source src>` with a `<picture>` parent is invalid and therefore ignored. Please use `<source srcset>` instead.',
|
207
|
+
/**
|
208
|
+
*@description Warning displayed to developers when the vendor-prefixed method is used rather than the equivalent unprefixed method.
|
203
209
|
*/
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
*@description
|
210
|
+
prefixedCancelAnimationFrame:
|
211
|
+
'`webkitCancelAnimationFrame` is vendor-specific. Please use the standard `cancelAnimationFrame` instead.',
|
212
|
+
/**
|
213
|
+
*@description Warning displayed to developers when the vendor-prefixed method is used rather than the equivalent unprefixed method.
|
208
214
|
*/
|
209
|
-
|
210
|
-
|
211
|
-
|
215
|
+
prefixedRequestAnimationFrame:
|
216
|
+
'`webkitRequestAnimationFrame` is vendor-specific. Please use the standard `requestAnimationFrame` instead.',
|
217
|
+
/**
|
212
218
|
*@description TODO(crbug.com/1320351): Description needed for translation
|
213
219
|
*/
|
214
|
-
|
215
|
-
|
216
|
-
|
220
|
+
prefixedStorageInfo:
|
221
|
+
'`window.webkitStorageInfo` is deprecated. Please use `navigator.webkitTemporaryStorage` or `navigator.webkitPersistentStorage` instead.',
|
222
|
+
/**
|
217
223
|
*@description TODO(crbug.com/1320352): Description needed for translation
|
218
224
|
*/
|
219
|
-
|
220
|
-
|
221
|
-
|
225
|
+
prefixedVideoDisplayingFullscreen:
|
226
|
+
'`HTMLVideoElement.webkitDisplayingFullscreen` is deprecated. Please use `Document.fullscreenElement` instead.',
|
227
|
+
/**
|
222
228
|
*@description TODO(crbug.com/1320353): Description needed for translation
|
223
229
|
*/
|
224
|
-
|
225
|
-
|
226
|
-
|
230
|
+
prefixedVideoEnterFullScreen:
|
231
|
+
'`HTMLVideoElement.webkitEnterFullScreen()` is deprecated. Please use `Element.requestFullscreen()` instead.',
|
232
|
+
/**
|
227
233
|
*@description TODO(crbug.com/1320353): Description needed for translation
|
228
234
|
*/
|
229
|
-
|
230
|
-
|
231
|
-
|
235
|
+
prefixedVideoEnterFullscreen:
|
236
|
+
'`HTMLVideoElement.webkitEnterFullscreen()` is deprecated. Please use `Element.requestFullscreen()` instead.',
|
237
|
+
/**
|
232
238
|
*@description TODO(crbug.com/1320354): Description needed for translation
|
233
239
|
*/
|
234
|
-
|
235
|
-
|
236
|
-
|
240
|
+
prefixedVideoExitFullScreen:
|
241
|
+
'`HTMLVideoElement.webkitExitFullsSreen()` is deprecated. Please use `Document.exitFullscreen()` instead.',
|
242
|
+
/**
|
237
243
|
*@description TODO(crbug.com/1320354): Description needed for translation
|
238
244
|
*/
|
239
|
-
|
240
|
-
|
241
|
-
|
245
|
+
prefixedVideoExitFullscreen:
|
246
|
+
'`HTMLVideoElement.webkitExitFullscreen()` is deprecated. Please use `Document.exitFullscreen()` instead.',
|
247
|
+
/**
|
242
248
|
*@description TODO(crbug.com/1320355): Description needed for translation
|
243
249
|
*/
|
244
|
-
|
245
|
-
|
246
|
-
|
250
|
+
prefixedVideoSupportsFullscreen:
|
251
|
+
'`HTMLVideoElement.webkitSupportsFullscreen` is deprecated. Please use `Document.fullscreenEnabled` instead.',
|
252
|
+
/**
|
247
253
|
*@description TODO(crbug.com/1320356): Description needed for translation
|
248
254
|
*/
|
249
|
-
|
250
|
-
|
255
|
+
rangeExpand: '`Range.expand()` is deprecated. Please use `Selection.modify()` instead.',
|
256
|
+
/**
|
251
257
|
*@description TODO(crbug.com/1320357): Description needed for translation
|
252
258
|
*/
|
253
|
-
|
254
|
-
|
255
|
-
|
259
|
+
requestedSubresourceWithEmbeddedCredentials:
|
260
|
+
'Subresource requests whose URLs contain embedded credentials (e.g. `https://user:pass@host/`) are blocked.',
|
261
|
+
/**
|
256
262
|
*@description TODO(crbug.com/1318872): Description needed for translation
|
257
263
|
*/
|
258
|
-
|
259
|
-
|
260
|
-
|
264
|
+
rtcConstraintEnableDtlsSrtpFalse:
|
265
|
+
'The constraint `DtlsSrtpKeyAgreement` is removed. You have specified a `false` value for this constraint, which is interpreted as an attempt to use the removed `SDES` key negotiation method. This functionality is removed; use a service that supports DTLS key negotiation instead.',
|
266
|
+
/**
|
261
267
|
*@description TODO(crbug.com/1318873): Description needed for translation
|
262
268
|
*/
|
263
|
-
|
264
|
-
|
265
|
-
|
269
|
+
rtcConstraintEnableDtlsSrtpTrue:
|
270
|
+
'The constraint `DtlsSrtpKeyAgreement` is removed. You have specified a `true` value for this constraint, which had no effect, but you can remove this constraint for tidiness.',
|
271
|
+
/**
|
266
272
|
*@description TODO(crbug.com/1318874): Description needed for translation
|
267
273
|
*/
|
268
|
-
|
269
|
-
|
270
|
-
|
274
|
+
rtcPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics:
|
275
|
+
'Complex Plan B SDP detected! Chrome will switch the default `sdpSemantics` from `plan-b` to the standardized `unified-plan` format and this peer connection is relying on the default `sdpSemantics`. This SDP is not compatible with Unified Plan and will be rejected by clients expecting Unified Plan. For more information about how to prepare for the switch, see https://webrtc.org/web-apis/chrome/unified-plan/.',
|
276
|
+
/**
|
271
277
|
*@description TODO(crbug.com/1318875): Description needed for translation
|
272
278
|
*/
|
273
|
-
|
274
|
-
|
275
|
-
|
279
|
+
rtcPeerConnectionLegacyCreateWithMediaConstraints:
|
280
|
+
'The `mediaConstraints` version of `RTCOfferOptions/RTCAnswerOptions` are deprecated and will soon be removed, please migrate to the promise-based `createOffer`/`createAnswer` instead.',
|
281
|
+
/**
|
276
282
|
*@description TODO(crbug.com/1320358): Description needed for translation
|
277
283
|
*/
|
278
|
-
|
279
|
-
|
280
|
-
|
284
|
+
rtcPeerConnectionSdpSemanticsPlanB:
|
285
|
+
'Plan B SDP semantics, which is used when constructing an `RTCPeerConnection` with `{sdpSemantics:\'plan-b\'}`, is a legacy non-standard version of the Session Description Protocol that has been permanently deleted from the Web Platform. It is still available when building with IS_FUCHSIA, but we intend to delete it as soon as possible. Stop depending on it. See https://crbug.com/1302249 for status.',
|
286
|
+
/**
|
281
287
|
*@description TODO(crbug.com/1320360): Description needed for translation
|
282
288
|
*/
|
283
|
-
|
284
|
-
|
289
|
+
rtcpMuxPolicyNegotiate: 'The `rtcpMuxPolicy` option is deprecated and will be removed.',
|
290
|
+
/**
|
285
291
|
*@description TODO(crbug.com/1318876): Description needed for translation
|
286
292
|
*/
|
287
|
-
|
288
|
-
|
289
|
-
|
293
|
+
rtpDataChannel:
|
294
|
+
'RTP data channels are no longer supported. The `RtpDataChannels` constraint is currently ignored, and may cause an error at a later date.',
|
295
|
+
/**
|
290
296
|
*@description TODO(crbug.com/1320361): Description needed for translation
|
291
297
|
*/
|
292
|
-
|
293
|
-
|
294
|
-
|
298
|
+
selectionAddRangeIntersect:
|
299
|
+
'The behavior that `Selection.addRange()` merges existing Range and the specified Range was removed.',
|
300
|
+
/**
|
295
301
|
*@description TODO(crbug.com/1318878): Description needed for translation
|
296
302
|
*/
|
297
|
-
|
298
|
-
|
299
|
-
|
303
|
+
sharedArrayBufferConstructedWithoutIsolation:
|
304
|
+
'`SharedArrayBuffer` will require cross-origin isolation. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details.',
|
305
|
+
/**
|
300
306
|
*@description TODO(crbug.com/1320363): Description needed for translation
|
301
307
|
*/
|
302
|
-
|
303
|
-
|
304
|
-
|
308
|
+
textToSpeech_DisallowedByAutoplay:
|
309
|
+
'`speechSynthesis.speak()` without user activation is deprecated and will be removed.',
|
310
|
+
/**
|
305
311
|
*@description TODO(crbug.com/1318879): Description needed for translation
|
306
312
|
*/
|
307
|
-
|
308
|
-
|
309
|
-
|
313
|
+
v8SharedArrayBufferConstructedInExtensionWithoutIsolation:
|
314
|
+
'Extensions should opt into cross-origin isolation to continue using `SharedArrayBuffer`. See https://developer.chrome.com/docs/extensions/mv3/cross-origin-isolation/.',
|
315
|
+
/**
|
310
316
|
*@description TODO(crbug.com/1318880): Description needed for translation
|
311
317
|
*/
|
312
|
-
|
313
|
-
|
314
|
-
|
318
|
+
webCodecsVideoFrameDefaultTimestamp:
|
319
|
+
'Constructing a `VideoFrame` without a timestamp is deprecated and support will be removed. Please provide a timestamp via `VideoFrameInit`.',
|
320
|
+
/**
|
315
321
|
*@description TODO(crbug.com/1318881): Description needed for translation
|
316
322
|
*/
|
317
|
-
|
318
|
-
|
323
|
+
xhrJSONEncodingDetection: 'UTF-16 is not supported by response json in `XMLHttpRequest`',
|
324
|
+
/**
|
319
325
|
*@description TODO(crbug.com/1318882): Description needed for translation
|
320
326
|
*/
|
321
|
-
|
322
|
-
|
323
|
-
|
327
|
+
xmlHttpRequestSynchronousInNonWorkerOutsideBeforeUnload:
|
328
|
+
'Synchronous `XMLHttpRequest` on the main thread is deprecated because of its detrimental effects to the end user\u2019s experience. For more help, check https://xhr.spec.whatwg.org/.',
|
329
|
+
/**
|
324
330
|
*@description TODO(crbug.com/1320365): Description needed for translation
|
325
331
|
*/
|
326
|
-
|
327
|
-
|
328
|
-
|
332
|
+
xrSupportsSession:
|
333
|
+
'`supportsSession()` is deprecated. Please use `isSessionSupported()` and check the resolved boolean value instead.',
|
334
|
+
};
|
329
335
|
const str_ = i18n.i18n.registerUIStrings('models/issues_manager/DeprecationIssue.ts', UIStrings);
|
330
336
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
331
337
|
|
@@ -359,11 +365,6 @@ export class DeprecationIssue extends Issue {
|
|
359
365
|
messageFunction = i18nLazyString(UIStrings.authorizationCoveredByWildcard);
|
360
366
|
milestone = 97;
|
361
367
|
break;
|
362
|
-
case Protocol.Audits.DeprecationIssueType.BatteryStatusInsecureOrigin:
|
363
|
-
messageFunction = i18nLazyString(UIStrings.batteryStatusInsecureOrigin);
|
364
|
-
feature = 4878376799043584;
|
365
|
-
milestone = 103;
|
366
|
-
break;
|
367
368
|
case Protocol.Audits.DeprecationIssueType.CanRequestURLHTTPContainingNewline:
|
368
369
|
messageFunction = i18nLazyString(UIStrings.canRequestURLHTTPContainingNewline);
|
369
370
|
feature = 5735596811091968;
|
@@ -399,14 +399,16 @@ export const Presets: Preset[] = [
|
|
399
399
|
title: i18nLazyString(UIStrings.performance),
|
400
400
|
description: i18nLazyString(UIStrings.howLongDoesThisAppTakeToShow),
|
401
401
|
plugin: false,
|
402
|
+
supportedModes: ['navigation', 'timespan', 'snapshot'],
|
402
403
|
},
|
403
404
|
{
|
404
405
|
setting: Common.Settings.Settings.instance().createSetting(
|
405
|
-
'lighthouse.
|
406
|
-
configID: '
|
407
|
-
title: i18nLazyString(UIStrings.
|
408
|
-
description: i18nLazyString(UIStrings.
|
406
|
+
'lighthouse.cat_a11y', true, Common.Settings.SettingStorageType.Synced),
|
407
|
+
configID: 'accessibility',
|
408
|
+
title: i18nLazyString(UIStrings.accessibility),
|
409
|
+
description: i18nLazyString(UIStrings.isThisPageUsableByPeopleWith),
|
409
410
|
plugin: false,
|
411
|
+
supportedModes: ['navigation', 'snapshot'],
|
410
412
|
},
|
411
413
|
{
|
412
414
|
setting: Common.Settings.Settings.instance().createSetting(
|
@@ -415,14 +417,7 @@ export const Presets: Preset[] = [
|
|
415
417
|
title: i18nLazyString(UIStrings.bestPractices),
|
416
418
|
description: i18nLazyString(UIStrings.doesThisPageFollowBestPractices),
|
417
419
|
plugin: false,
|
418
|
-
|
419
|
-
{
|
420
|
-
setting: Common.Settings.Settings.instance().createSetting(
|
421
|
-
'lighthouse.cat_a11y', true, Common.Settings.SettingStorageType.Synced),
|
422
|
-
configID: 'accessibility',
|
423
|
-
title: i18nLazyString(UIStrings.accessibility),
|
424
|
-
description: i18nLazyString(UIStrings.isThisPageUsableByPeopleWith),
|
425
|
-
plugin: false,
|
420
|
+
supportedModes: ['navigation', 'timespan', 'snapshot'],
|
426
421
|
},
|
427
422
|
{
|
428
423
|
setting: Common.Settings.Settings.instance().createSetting(
|
@@ -431,6 +426,16 @@ export const Presets: Preset[] = [
|
|
431
426
|
title: i18nLazyString(UIStrings.seo),
|
432
427
|
description: i18nLazyString(UIStrings.isThisPageOptimizedForSearch),
|
433
428
|
plugin: false,
|
429
|
+
supportedModes: ['navigation', 'snapshot'],
|
430
|
+
},
|
431
|
+
{
|
432
|
+
setting: Common.Settings.Settings.instance().createSetting(
|
433
|
+
'lighthouse.cat_pwa', true, Common.Settings.SettingStorageType.Synced),
|
434
|
+
configID: 'pwa',
|
435
|
+
title: i18nLazyString(UIStrings.progressiveWebApp),
|
436
|
+
description: i18nLazyString(UIStrings.doesThisPageMeetTheStandardOfA),
|
437
|
+
plugin: false,
|
438
|
+
supportedModes: ['navigation'],
|
434
439
|
},
|
435
440
|
{
|
436
441
|
setting: Common.Settings.Settings.instance().createSetting(
|
@@ -439,6 +444,7 @@ export const Presets: Preset[] = [
|
|
439
444
|
configID: 'lighthouse-plugin-publisher-ads',
|
440
445
|
title: i18nLazyString(UIStrings.publisherAds),
|
441
446
|
description: i18nLazyString(UIStrings.isThisPageOptimizedForAdSpeedAnd),
|
447
|
+
supportedModes: ['navigation'],
|
442
448
|
},
|
443
449
|
];
|
444
450
|
|
@@ -567,6 +573,7 @@ export interface Preset {
|
|
567
573
|
title: () => Common.UIString.LocalizedString;
|
568
574
|
description: () => Common.UIString.LocalizedString;
|
569
575
|
plugin: boolean;
|
576
|
+
supportedModes: string[];
|
570
577
|
}
|
571
578
|
export interface RuntimeSetting {
|
572
579
|
setting: Common.Settings.Setting<string|boolean>;
|
@@ -174,7 +174,7 @@ export class LighthousePanel extends UI.Panel.Panel {
|
|
174
174
|
return;
|
175
175
|
}
|
176
176
|
|
177
|
-
this.startView.
|
177
|
+
this.startView.refresh();
|
178
178
|
|
179
179
|
this.unauditableExplanation = evt.data.helpText;
|
180
180
|
this.startView.setUnauditableExplanation(evt.data.helpText);
|
@@ -102,20 +102,26 @@ export class StartView extends UI.Widget.Widget {
|
|
102
102
|
}
|
103
103
|
}
|
104
104
|
|
105
|
-
protected populateFormControls(fragment: UI.Fragment.Fragment): void {
|
105
|
+
protected populateFormControls(fragment: UI.Fragment.Fragment, mode?: string): void {
|
106
106
|
// Populate the device type
|
107
107
|
const deviceTypeFormElements = fragment.$('device-type-form-elements');
|
108
108
|
this.populateRuntimeSettingAsRadio('lighthouse.device_type', i18nString(UIStrings.device), deviceTypeFormElements);
|
109
109
|
|
110
110
|
// Populate the categories
|
111
|
-
const categoryFormElements = fragment.$('categories-form-elements');
|
112
|
-
|
111
|
+
const categoryFormElements = fragment.$('categories-form-elements') as HTMLElement;
|
112
|
+
categoryFormElements.textContent = '';
|
113
|
+
const pluginFormElements = fragment.$('plugins-form-elements') as HTMLElement;
|
114
|
+
pluginFormElements.textContent = '';
|
113
115
|
for (const preset of Presets) {
|
114
116
|
const formElements = preset.plugin ? pluginFormElements : categoryFormElements;
|
115
117
|
preset.setting.setTitle(preset.title());
|
116
118
|
const checkbox = new UI.Toolbar.ToolbarSettingCheckbox(preset.setting, preset.description());
|
117
119
|
const row = formElements.createChild('div', 'vbox lighthouse-launcher-row');
|
118
120
|
row.appendChild(checkbox.element);
|
121
|
+
if (mode && !preset.supportedModes.includes(mode)) {
|
122
|
+
checkbox.setEnabled(false);
|
123
|
+
checkbox.setIndeterminate(true);
|
124
|
+
}
|
119
125
|
}
|
120
126
|
UI.ARIAUtils.markAsGroup(categoryFormElements);
|
121
127
|
UI.ARIAUtils.setAccessibleName(categoryFormElements, i18nString(UIStrings.categories));
|
@@ -181,7 +187,7 @@ export class StartView extends UI.Widget.Widget {
|
|
181
187
|
this.contentElement.style.overflow = 'auto';
|
182
188
|
}
|
183
189
|
|
184
|
-
|
190
|
+
refresh(): void {
|
185
191
|
// Do nothing in default case.
|
186
192
|
}
|
187
193
|
|
@@ -46,6 +46,52 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
46
46
|
export class StartViewFR extends StartView {
|
47
47
|
protected render(): void {
|
48
48
|
super.render();
|
49
|
+
this.refresh();
|
50
|
+
}
|
51
|
+
|
52
|
+
private createStartButton(mode: string): HTMLButtonElement {
|
53
|
+
let buttonLabel: Platform.UIString.LocalizedString;
|
54
|
+
let callback: () => void;
|
55
|
+
|
56
|
+
if (mode === 'timespan') {
|
57
|
+
buttonLabel = i18nString(UIStrings.startTimespan);
|
58
|
+
callback = (): void => {
|
59
|
+
this.controller.dispatchEventToListeners(
|
60
|
+
Events.RequestLighthouseTimespanStart,
|
61
|
+
/* keyboardInitiated */ this.startButton.matches(':focus-visible'),
|
62
|
+
);
|
63
|
+
};
|
64
|
+
} else if (mode === 'snapshot') {
|
65
|
+
buttonLabel = i18nString(UIStrings.analyzeSnapshot);
|
66
|
+
callback = (): void => {
|
67
|
+
this.controller.dispatchEventToListeners(
|
68
|
+
Events.RequestLighthouseStart,
|
69
|
+
/* keyboardInitiated */ this.startButton.matches(':focus-visible'),
|
70
|
+
);
|
71
|
+
};
|
72
|
+
} else {
|
73
|
+
buttonLabel = i18nString(UIStrings.analyzeNavigation);
|
74
|
+
callback = (): void => {
|
75
|
+
this.controller.dispatchEventToListeners(
|
76
|
+
Events.RequestLighthouseStart,
|
77
|
+
/* keyboardInitiated */ this.startButton.matches(':focus-visible'),
|
78
|
+
);
|
79
|
+
};
|
80
|
+
}
|
81
|
+
|
82
|
+
return UI.UIUtils.createTextButton(
|
83
|
+
buttonLabel,
|
84
|
+
callback,
|
85
|
+
/* className */ '',
|
86
|
+
/* primary */ true,
|
87
|
+
);
|
88
|
+
}
|
89
|
+
|
90
|
+
refresh(): void {
|
91
|
+
const {mode} = this.controller.getFlags();
|
92
|
+
|
93
|
+
this.startButton = this.createStartButton(mode);
|
94
|
+
|
49
95
|
const fragment = UI.Fragment.Fragment.build`
|
50
96
|
<form class="lighthouse-start-view-fr">
|
51
97
|
<header class="hbox">
|
@@ -82,7 +128,7 @@ export class StartViewFR extends StartView {
|
|
82
128
|
this.warningText = fragment.$('warning-text');
|
83
129
|
|
84
130
|
// The previous radios are removed later and don't exist on the new fragment yet.
|
85
|
-
this.populateFormControls(fragment);
|
131
|
+
this.populateFormControls(fragment, mode);
|
86
132
|
|
87
133
|
// Populate the Lighthouse mode
|
88
134
|
const modeFormElements = fragment.$('mode-form-elements');
|
@@ -90,7 +136,9 @@ export class StartViewFR extends StartView {
|
|
90
136
|
|
91
137
|
this.contentElement.textContent = '';
|
92
138
|
this.contentElement.append(fragment.element());
|
93
|
-
|
139
|
+
|
140
|
+
// Ensure the correct layout is used after refresh.
|
141
|
+
this.onResize();
|
94
142
|
}
|
95
143
|
|
96
144
|
onResize(): void {
|
@@ -107,50 +155,4 @@ export class StartViewFR extends StartView {
|
|
107
155
|
optionsEl.classList.toggle('narrow', useNarrowLayout);
|
108
156
|
}
|
109
157
|
}
|
110
|
-
|
111
|
-
updateMode(): void {
|
112
|
-
const {mode} = this.controller.getFlags();
|
113
|
-
|
114
|
-
let buttonLabel: Platform.UIString.LocalizedString;
|
115
|
-
let callback: () => void;
|
116
|
-
|
117
|
-
if (mode === 'timespan') {
|
118
|
-
buttonLabel = i18nString(UIStrings.startTimespan);
|
119
|
-
callback = (): void => {
|
120
|
-
this.controller.dispatchEventToListeners(
|
121
|
-
Events.RequestLighthouseTimespanStart,
|
122
|
-
/* keyboardInitiated */ this.startButton.matches(':focus-visible'),
|
123
|
-
);
|
124
|
-
};
|
125
|
-
} else if (mode === 'snapshot') {
|
126
|
-
buttonLabel = i18nString(UIStrings.analyzeSnapshot);
|
127
|
-
callback = (): void => {
|
128
|
-
this.controller.dispatchEventToListeners(
|
129
|
-
Events.RequestLighthouseStart,
|
130
|
-
/* keyboardInitiated */ this.startButton.matches(':focus-visible'),
|
131
|
-
);
|
132
|
-
};
|
133
|
-
} else {
|
134
|
-
buttonLabel = i18nString(UIStrings.analyzeNavigation);
|
135
|
-
callback = (): void => {
|
136
|
-
this.controller.dispatchEventToListeners(
|
137
|
-
Events.RequestLighthouseStart,
|
138
|
-
/* keyboardInitiated */ this.startButton.matches(':focus-visible'),
|
139
|
-
);
|
140
|
-
};
|
141
|
-
}
|
142
|
-
|
143
|
-
this.startButton = UI.UIUtils.createTextButton(
|
144
|
-
buttonLabel,
|
145
|
-
callback,
|
146
|
-
/* className */ '',
|
147
|
-
/* primary */ true,
|
148
|
-
);
|
149
|
-
|
150
|
-
const startButtonContainerEl = this.contentElement.querySelector('.lighthouse-start-button-container');
|
151
|
-
if (startButtonContainerEl) {
|
152
|
-
startButtonContainerEl.textContent = '';
|
153
|
-
startButtonContainerEl.appendChild(this.startButton);
|
154
|
-
}
|
155
|
-
}
|
156
158
|
}
|
@@ -170,16 +170,16 @@ input[type="radio"]:focus {
|
|
170
170
|
|
171
171
|
.lighthouse-options {
|
172
172
|
display: grid;
|
173
|
-
grid-template-columns:
|
173
|
+
grid-template-columns: 1fr 1fr;
|
174
174
|
grid-template-rows: auto auto;
|
175
175
|
}
|
176
176
|
|
177
177
|
.lighthouse-options.narrow {
|
178
|
-
grid-template-columns:
|
178
|
+
grid-template-columns: 1fr;
|
179
179
|
grid-template-rows: auto auto auto;
|
180
180
|
}
|
181
181
|
|
182
182
|
.lighthouse-options.wide {
|
183
|
-
grid-template-columns:
|
183
|
+
grid-template-columns: 1fr 1fr 1fr;
|
184
184
|
grid-template-rows: auto;
|
185
185
|
}
|
@@ -1682,8 +1682,7 @@ export class TimelineUIUtils {
|
|
1682
1682
|
}
|
1683
1683
|
}
|
1684
1684
|
|
1685
|
-
static async buildDetailsTextForTraceEvent(event: SDK.TracingModel.Event
|
1686
|
-
Promise<string|null> {
|
1685
|
+
static async buildDetailsTextForTraceEvent(event: SDK.TracingModel.Event): Promise<string|null> {
|
1687
1686
|
const recordType = TimelineModel.TimelineModel.RecordType;
|
1688
1687
|
let detailsText;
|
1689
1688
|
const eventData = event.args['data'];
|
@@ -1696,9 +1695,9 @@ export class TimelineUIUtils {
|
|
1696
1695
|
break;
|
1697
1696
|
}
|
1698
1697
|
case recordType.FunctionCall:
|
1699
|
-
if (eventData
|
1700
|
-
|
1701
|
-
|
1698
|
+
if (eventData && eventData['url'] && eventData['lineNumber'] !== undefined &&
|
1699
|
+
eventData['columnNumber'] !== undefined) {
|
1700
|
+
detailsText = eventData.url + ':' + (eventData.lineNumber + 1) + ':' + (eventData.columnNumber + 1);
|
1702
1701
|
}
|
1703
1702
|
break;
|
1704
1703
|
case recordType.JSFrame:
|
@@ -1804,33 +1803,13 @@ export class TimelineUIUtils {
|
|
1804
1803
|
|
1805
1804
|
return detailsText;
|
1806
1805
|
|
1807
|
-
async function linkifyLocationAsText(
|
1808
|
-
scriptId: Protocol.Runtime.ScriptId, lineNumber: number, columnNumber: number): Promise<string|null> {
|
1809
|
-
const debuggerModel = target ? target.model(SDK.DebuggerModel.DebuggerModel) : null;
|
1810
|
-
if (!target || target.isDisposed() || !scriptId || !debuggerModel) {
|
1811
|
-
return null;
|
1812
|
-
}
|
1813
|
-
const rawLocation = debuggerModel.createRawLocationByScriptId(scriptId, lineNumber, columnNumber);
|
1814
|
-
if (!rawLocation) {
|
1815
|
-
return null;
|
1816
|
-
}
|
1817
|
-
const uiLocation =
|
1818
|
-
await Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().rawLocationToUILocation(
|
1819
|
-
rawLocation);
|
1820
|
-
return uiLocation ? uiLocation.linkText(false /* skipTrim*/, true /* showColumnNumber*/) : null;
|
1821
|
-
}
|
1822
|
-
|
1823
1806
|
async function linkifyTopCallFrameAsText(): Promise<string|null> {
|
1824
1807
|
const frame = TimelineModel.TimelineModel.TimelineData.forEvent(event).topFrame();
|
1825
1808
|
if (!frame) {
|
1826
1809
|
return null;
|
1827
1810
|
}
|
1828
|
-
|
1829
|
-
|
1830
|
-
if (!text) {
|
1831
|
-
text = frame.url + ':' + (frame.lineNumber + 1) + ':' + (frame.columnNumber + 1);
|
1832
|
-
}
|
1833
|
-
return text;
|
1811
|
+
|
1812
|
+
return frame.url + ':' + (frame.lineNumber + 1) + ':' + (frame.columnNumber + 1);
|
1834
1813
|
}
|
1835
1814
|
}
|
1836
1815
|
|
@@ -1859,7 +1838,7 @@ export class TimelineUIUtils {
|
|
1859
1838
|
case recordType.WebSocketSendHandshakeRequest:
|
1860
1839
|
case recordType.WebSocketReceiveHandshakeResponse:
|
1861
1840
|
case recordType.WebSocketDestroy: {
|
1862
|
-
detailsText = await TimelineUIUtils.buildDetailsTextForTraceEvent(event
|
1841
|
+
detailsText = await TimelineUIUtils.buildDetailsTextForTraceEvent(event);
|
1863
1842
|
break;
|
1864
1843
|
}
|
1865
1844
|
|
@@ -1084,6 +1084,10 @@ export class ToolbarCheckbox extends ToolbarItem<void> {
|
|
1084
1084
|
super.applyEnabledState(enabled);
|
1085
1085
|
this.inputElement.disabled = !enabled;
|
1086
1086
|
}
|
1087
|
+
|
1088
|
+
setIndeterminate(indeterminate: boolean): void {
|
1089
|
+
this.inputElement.indeterminate = indeterminate;
|
1090
|
+
}
|
1087
1091
|
}
|
1088
1092
|
|
1089
1093
|
export class ToolbarSettingCheckbox extends ToolbarCheckbox {
|
package/package.json
CHANGED