summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/img-with-containment-and-size.html
blob: bdeae0ac2ead8d0ff4113fbfa33b4b594cea5196 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!doctype html>
<html class="reftest-wait">
<title>Ensure images with containment and size are rendered properly</title>
<meta charset="utf-8">
<link rel="match" href="img-with-containment-and-size-ref.html">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-img-element">
<style>
img {
  contain: paint;
  width: 200px;
  height: 100px;
  will-change: transform;
}
</style>
<script>
onload = () => {
  var i = new Image();
  i.onload = function() {
    document.body.appendChild(i);
    document.documentElement.classList.remove("reftest-wait");
  };
  i.src = "image.png";
};
</script>