Repository navigation
Conversation
Replace the implementation-defined choice in select an image source from a source set with deterministic selection matching implementations: deduplicate equal pixel densities keeping the earliest entry, sort ascending by pixel density, and pick the first candidate whose pixel density is greater than or equal to the document's device pixel ratio (or the last candidate if none qualify), with a "may" allowance for preferring an already-available higher-density candidate. Also pass the document from preload links and return early if no source is selected. Fixes #13077.
This was referenced Nov 4, 2026
noamr
marked this pull request as ready for review
November 4, 2026 15:32
# Conflicts: # source
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add
mindensityandmaxdensitycontent attributes (reflected asminDensityandmaxDensityonHTMLImageElementandHTMLSourceElement) to clamp the target pixel density (devicePixelRatio) used when selecting an image source from a source set.Stacked on #13183:
mindensityandmaxdensityto<img>and<source>(when inside<picture>), reflected asminDensityandmaxDensity(DOMString). Values are parsed using the rules for parsing floating-point number values; non-positive values and parse errors are ignored.<picture>: When a<source>element is selected in<picture>, each ofmindensityandmaxdensityfalls back independently to the corresponding attribute on the<img>element if not present on<source>.targetDensitystarts atdevicePixelRatio, is clamped tomaximum density(min(targetDensity, maxDensity)), and then tominimum density(max(targetDensity, minDensity)), somindensitytakes precedence ifmindensity > maxdensity(matching CSSmin/maxclamping).mindensityormaxdensityon<img>or a preceding sibling<source>in<picture>triggers update the image data.Fixes #4421.
Fixes #13069.
💥 Error: Wattsi server error 💥
PR Preview failed to build. (Last tried on Nov 25, 2026, 11:24 AM UTC).
More
PR Preview relies on a number of web services to run. There seems to be an issue with the following one:
🚨 Wattsi Server - Wattsi Server is the web service used to build the WHATWG HTML spec.
🔗 Related URL
Error output:
This seems to be an issue with the Wattsi Server service. PR Preview doesn't manage this service and so has no control over it. If you've identified an issue with it, you can report the issue to the maintainers of Wattsi Server directly. Please be courteous. Thank you!
If you don't have enough information above to solve the error by yourself or if the issue doesn't seem related to Wattsi Server, you can file an issue with PR Preview.