Find asset paths in picture source srcsets #176
Merged
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.
We received a report of a confusing Happo report. Looking at the source
of the "after" version, the problematic part seemed to be related to a
<picture>
element with nested<source>
elements that usedsrcset
.After downloading the assets zip file for this report, we noticed that
the assets for these images were not included. I suspected that this was
related to our asset finding code, which we confirmed by pushing up a
change that included regular
<img>
tags with the same assets, whichended up fixing the confusing report.
To fix this bug, we can include these elements in our srcset extraction
query selector. Since
<source>
is used for<picture>
,<video>
, and<audio>
, I scoped the selector to source elements that descend frompicture elements to avoid also grabbing audio and video files, which I
think we do not want in these bundles.