Bug 1680387 - Fix interaction with src-set() / image-set(), and enable the feature by default. r=tnikkel

As discussed here: https://github.com/whatwg/html/pull/5574#issuecomment-826347560

This matches other browsers.

Depends on D113265

Differential Revision: https://phabricator.services.mozilla.com/D113267
This commit is contained in:
Emilio Cobos Álvarez
2021-05-04 10:24:08 +00:00
parent 7529205fc3
commit 329b858d07
11 changed files with 82 additions and 21 deletions

View File

@@ -732,7 +732,7 @@ nsIntSize HTMLImageElement::NaturalSize() {
if (mResponsiveSelector) {
float density = mResponsiveSelector->GetSelectedImageDensity();
MOZ_ASSERT(density >= 0.0);
resolution = {density, density};
resolution.ScaleBy(density);
}
resolution.ApplyTo(size.width, size.height);