wpt / svg / linking / reftests / media-fragment-spatial-percent-nonsquare.html

Status: FAIL | Duration: 9ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/svg/linking/reftests/media-fragment-spatial-percent-nonsquare.html

<!doctype html>
<title>SVG media fragment: percent-based spatial clipping on non-square SVG</title>
<link rel="help" href="https://www.w3.org/TR/media-frags/#naming-space">
<link rel="help" href="https://svgwg.org/svg2-draft/linking.html#LinksIntoSVG">
<link rel="match" href="../../struct/reftests/reference/green-100x100.html">
<style>
  div {
    width: 100px;
    height: 100px;
    /* The SVG's intrinsic size is 200x100 but the fragment selects a 100x100
       region. Without explicit background-size, the image renders at its
       intrinsic 2:1 aspect ratio, causing a viewport/viewBox mismatch. */
    background-size: 100px 100px;
    background-repeat: no-repeat;
    background-image: url("support/red-green-200x100.svg#xywh=percent:50,0,50,100");
  }
</style>
<div></div>

/svg/struct/reftests/reference/green-100x100.html

<!DOCTYPE html>
<div style="width: 100px; height: 100px; background-color: green"></div>