-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core(image-size-responsive): remove elidedUrl, elide url property instead #13226
Merged
adamraine
merged 21 commits into
GoogleChrome:master
from
prerana1821:drop-image-size-responsive
Oct 29, 2021
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
a288f9e
fix: drop image size responsiveness
prerana1821 76a43f4
fix: formatting
prerana1821 556a662
fix: lighthouse version
prerana1821 7fd1522
fix: removed not required changes
prerana1821 5ad1b48
fix: undo formatting changes
prerana1821 2fb2c6d
fix: undo formatting changes
prerana1821 9a15074
fix: undo formatting changes
prerana1821 84bc9cf
fix: formatting changes
prerana1821 7901e6b
fix: space formatting changes
prerana1821 9049403
fix: space formatting changes
prerana1821 3b24f1d
fix: space formatting changes
prerana1821 15441b8
fix: space formatting changes
prerana1821 9ee2fd0
fix: space formatting changes
prerana1821 4585874
fix: formatting changes
prerana1821 7f8a238
fix: formatting changes
prerana1821 832df61
fix: merge conflicts
prerana1821 15d397d
fix: formatting changes
prerana1821 9faa284
fix: formatting changes
prerana1821 e8e3c7f
update sample
adamraine e427b17
nit
adamraine 80ba2ba
sample
adamraine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,7 @@ const LARGE_IMAGE_FACTOR = 0.75; | |
// considered SMALL. | ||
const SMALL_IMAGE_THRESHOLD = 64; | ||
|
||
/** @typedef {{url: string, node: LH.Audit.Details.NodeValue, elidedUrl: string, displayedSize: string, actualSize: string, actualPixels: number, expectedSize: string, expectedPixels: number}} Result */ | ||
/** @typedef {{url: string, node: LH.Audit.Details.NodeValue, displayedSize: string, actualSize: string, actualPixels: number, expectedSize: string, expectedPixels: number}} Result */ | ||
|
||
/** | ||
* @param {{top: number, bottom: number, left: number, right: number}} imageRect | ||
|
@@ -146,9 +146,8 @@ function getResult(image, DPR) { | |
const [expectedWidth, expectedHeight] = | ||
expectedImageSize(image.displayedWidth, image.displayedHeight, DPR); | ||
return { | ||
url: image.src, | ||
url: URL.elideDataURI(image.src), | ||
node: Audit.makeNodeItem(image.node), | ||
elidedUrl: URL.elideDataURI(image.src), | ||
displayedSize: `${image.displayedWidth} x ${image.displayedHeight}`, | ||
actualSize: `${image.naturalDimensions.width} x ${image.naturalDimensions.height}`, | ||
actualPixels: image.naturalDimensions.width * image.naturalDimensions.height, | ||
|
@@ -265,7 +264,7 @@ class ImageSizeResponsive extends Audit { | |
/** @type {LH.Audit.Details.Table['headings']} */ | ||
const headings = [ | ||
{key: 'node', itemType: 'node', text: ''}, | ||
{key: 'elidedUrl', itemType: 'url', text: str_(i18n.UIStrings.columnURL)}, | ||
{key: 'url', itemType: 'url', text: str_(i18n.UIStrings.columnURL)}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removal of the |
||
{key: 'displayedSize', itemType: 'text', text: str_(UIStrings.columnDisplayed)}, | ||
{key: 'actualSize', itemType: 'text', text: str_(UIStrings.columnActual)}, | ||
{key: 'expectedSize', itemType: 'text', text: str_(UIStrings.columnExpected)}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing
elidedUrl
here is good.