Skip to content

Commit

Permalink
Fix interaction with src-set() / image-set(), and enable the feature …
Browse files Browse the repository at this point in the history
…by default.

As discussed here: whatwg/html#5574 (comment)

This matches other browsers.

Depends on D113265

Differential Revision: https://phabricator.services.mozilla.com/D113267

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1680387
gecko-commit: 2ac7c9cd4629feab34606a88e9a380599566049d
gecko-reviewers: tnikkel
  • Loading branch information
emilio authored and moz-wptsync-bot committed May 5, 2021
1 parent 8238192 commit 120d2f6
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 0 deletions.
11 changes: 11 additions & 0 deletions density-size-correction/image-set-001-ref.html
@@ -0,0 +1,11 @@
<!doctype html>
<style>
body { margin: 0 }
div {
width: 100vw;
height: 100vh;
background-image: url(resources/exif-resolution-valid-hires.jpg);
background-repeat: no-repeat;
}
</style>
<div></div>
15 changes: 15 additions & 0 deletions density-size-correction/image-set-001.html
@@ -0,0 +1,15 @@
<!doctype html>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="match" href="image-set-001-ref.html">
<style>
body { margin: 0 }
div {
width: 100vw;
height: 100vh;
background-image: -webkit-image-set(url(resources/exif-resolution-valid-hires.jpg) 1x);
background-image: image-set(url(resources/exif-resolution-valid-hires.jpg) 1x);
background-repeat: no-repeat;
}
</style>
<div></div>
11 changes: 11 additions & 0 deletions density-size-correction/image-set-002-ref.html
@@ -0,0 +1,11 @@
<!doctype html>
<style>
body { margin: 0 }
div {
width: 100vw;
height: 100vh;
background-image: url(resources/exif-resolution-none.jpg);
background-repeat: no-repeat;
}
</style>
<div></div>
15 changes: 15 additions & 0 deletions density-size-correction/image-set-002.html
@@ -0,0 +1,15 @@
<!doctype html>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="match" href="image-set-002-ref.html">
<style>
body { margin: 0 }
div {
width: 100vw;
height: 100vh;
background-image: -webkit-image-set(url(resources/exif-resolution-valid-hires.jpg) 0.5x);
background-image: image-set(url(resources/exif-resolution-valid-hires.jpg) 0.5x);
background-repeat: no-repeat;
}
</style>
<div></div>
3 changes: 3 additions & 0 deletions density-size-correction/srcset-ref.html
@@ -0,0 +1,3 @@
<!doctype html>
<img src="resources/exif-resolution-valid-hires.jpg">
<img src="resources/exif-resolution-none.jpg">
6 changes: 6 additions & 0 deletions density-size-correction/srcset.html
@@ -0,0 +1,6 @@
<!doctype html>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="match" href="srcset-ref.html">
<img srcset="resources/exif-resolution-valid-hires.jpg 1x">
<img srcset="resources/exif-resolution-valid-hires.jpg 0.5x">

0 comments on commit 120d2f6

Please sign in to comment.