From f2c02ce75cb5d6a1572f4663a723a5369b8bccba Mon Sep 17 00:00:00 2001 From: Dmitry Murzin Date: Sun, 9 Dec 2018 16:21:34 +0300 Subject: [PATCH] core(gather): fix usesObjectFit property for ImageElement ISSUES CLOSED: #6760 --- lighthouse-core/gather/gatherers/image-usage.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lighthouse-core/gather/gatherers/image-usage.js b/lighthouse-core/gather/gatherers/image-usage.js index 0f97537135fd..6071b86af2f9 100644 --- a/lighthouse-core/gather/gatherers/image-usage.js +++ b/lighthouse-core/gather/gatherers/image-usage.js @@ -53,8 +53,9 @@ function collectImageElementInfo() { naturalHeight: element.naturalHeight, isCss: false, isPicture: !!element.parentElement && element.parentElement.tagName === 'PICTURE', - usesObjectFit: computedStyle.getPropertyValue('object-fit') === 'cover' - || computedStyle.getPropertyValue('object-fit') === 'contain', + usesObjectFit: ['cover', 'contain', 'scale-down', 'none'].includes( + computedStyle.getPropertyValue('object-fit') + ), }; });