content-aspect-ratio.html (886B)
1 <!doctype html> 2 <title>div with content style's width and height attributes are not used to infer aspect-ratio</title> 3 <link rel="help" href="https://bugs.webkit.org/show_bug.cgi?id=201641#c22"> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <style> 7 video { 8 width: 100%; 9 max-width: 100px; 10 height: auto; 11 } 12 </style> 13 <body> 14 <script> 15 // Create and append a div with content style and immediately check the height. 16 let t = test(function() { 17 var div = document.createElement("div"); 18 div.setAttribute("style", "content: url('/images/blue.png')"); 19 div.setAttribute("width", "250"); 20 div.setAttribute("height", "100"); 21 document.body.appendChild(div); 22 assert_equals(getComputedStyle(div).height, "0px"); 23 }, "div with content style's width and height attributes are not used to infer aspect-ratio"); 24 25 </script>