lighthouse 10.3.0-dev.20230614 → 10.3.0-dev.20230616
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.
|
@@ -125,6 +125,7 @@ class NonCompositedAnimations extends Audit {
|
|
|
125
125
|
return {
|
|
126
126
|
score: 1,
|
|
127
127
|
notApplicable: true,
|
|
128
|
+
metricSavings: {CLS: 0},
|
|
128
129
|
};
|
|
129
130
|
}
|
|
130
131
|
|
|
@@ -195,6 +196,12 @@ class NonCompositedAnimations extends Audit {
|
|
|
195
196
|
return {
|
|
196
197
|
score: results.length === 0 ? 1 : 0,
|
|
197
198
|
notApplicable: results.length === 0,
|
|
199
|
+
metricSavings: {
|
|
200
|
+
// We do not have enough information to accurately predict the impact of individual animations on CLS.
|
|
201
|
+
// It is also not worth the effort since only a small percentage of sites have their CLS affected by non-composited animations.
|
|
202
|
+
// https://github.com/GoogleChrome/lighthouse/pull/15099#issuecomment-1558107906
|
|
203
|
+
CLS: 0,
|
|
204
|
+
},
|
|
198
205
|
details,
|
|
199
206
|
displayValue,
|
|
200
207
|
};
|
package/core/audits/viewport.js
CHANGED
|
@@ -46,15 +46,26 @@ class Viewport extends Audit {
|
|
|
46
46
|
static async audit(artifacts, context) {
|
|
47
47
|
const viewportMeta = await ViewportMeta.request(artifacts.MetaElements, context);
|
|
48
48
|
|
|
49
|
+
let inpSavings = 300;
|
|
49
50
|
if (!viewportMeta.hasViewportTag) {
|
|
50
51
|
return {
|
|
51
52
|
score: 0,
|
|
52
53
|
explanation: str_(UIStrings.explanationNoTag),
|
|
54
|
+
metricSavings: {
|
|
55
|
+
INP: inpSavings,
|
|
56
|
+
},
|
|
53
57
|
};
|
|
54
58
|
}
|
|
55
59
|
|
|
60
|
+
if (viewportMeta.isMobileOptimized) {
|
|
61
|
+
inpSavings = 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
56
64
|
return {
|
|
57
65
|
score: Number(viewportMeta.isMobileOptimized),
|
|
66
|
+
metricSavings: {
|
|
67
|
+
INP: inpSavings,
|
|
68
|
+
},
|
|
58
69
|
warnings: viewportMeta.parserWarnings,
|
|
59
70
|
};
|
|
60
71
|
}
|
|
@@ -224,7 +224,11 @@ class WorkDuringInteraction extends Audit {
|
|
|
224
224
|
const {settings} = context;
|
|
225
225
|
// TODO: responsiveness isn't yet supported by lantern.
|
|
226
226
|
if (settings.throttlingMethod === 'simulate') {
|
|
227
|
-
return {
|
|
227
|
+
return {
|
|
228
|
+
score: null,
|
|
229
|
+
notApplicable: true,
|
|
230
|
+
metricSavings: {INP: 0},
|
|
231
|
+
};
|
|
228
232
|
}
|
|
229
233
|
|
|
230
234
|
const trace = artifacts.traces[WorkDuringInteraction.DEFAULT_PASS];
|
|
@@ -232,7 +236,11 @@ class WorkDuringInteraction extends Audit {
|
|
|
232
236
|
const interactionEvent = await Responsiveness.request(metricData, context);
|
|
233
237
|
// If no interaction, diagnostic audit is n/a.
|
|
234
238
|
if (interactionEvent === null) {
|
|
235
|
-
return {
|
|
239
|
+
return {
|
|
240
|
+
score: null,
|
|
241
|
+
notApplicable: true,
|
|
242
|
+
metricSavings: {INP: 0},
|
|
243
|
+
};
|
|
236
244
|
}
|
|
237
245
|
// TODO: remove workaround once 103.0.5052.0 is sufficiently released.
|
|
238
246
|
if (interactionEvent.name === 'FallbackTiming') {
|
|
@@ -271,6 +279,9 @@ class WorkDuringInteraction extends Audit {
|
|
|
271
279
|
type: 'list',
|
|
272
280
|
items: auditDetailsItems,
|
|
273
281
|
},
|
|
282
|
+
metricSavings: {
|
|
283
|
+
INP: duration,
|
|
284
|
+
},
|
|
274
285
|
};
|
|
275
286
|
}
|
|
276
287
|
}
|
package/package.json
CHANGED