wpt / css / css-viewport / zoom / iframe-zoom.sub.html

Status: PASS | Duration: 12ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-viewport/zoom/iframe-zoom.sub.html

<!DOCTYPE html>
<title>iframe in an element with CSS zoom</title>
<link rel="author" title="Yotam Hacohen" href="mailto:yotha@chromium.org">
<link rel="author" title="Stefan Zager" href="mailto:szager@chromium.org">
<link rel="author" title="Google" href="http://www.google.com/">
<link href="reference/iframe-zoom-ref.html" rel="match">
<link rel="help" href="https://drafts.csswg.org/css-viewport/">

<style>
body {
  --iframe-width: 128px;
  --iframe-height: 64px;
}
iframe {
  border: none;
  width: var(--iframe-width);
  height: var(--iframe-height);
}
.zoom {
  zoom: 2;
}
</style>

<iframe id="baseline" src="resources/leaf.html"></iframe>
<iframe id="zoom-same-origin" class="zoom" src="resources/leaf.html" scrolling="no"></iframe>
<iframe id="zoom-cross-origin" class="zoom" src="http://{{hosts[alt][]}}:{{ports[http][0]}}/css/css-viewport/zoom/resources/leaf.html" scrolling="no"></iframe>

/css/css-viewport/zoom/reference/iframe-zoom-ref.html

<!DOCTYPE html>
<title>ref for iframe in an element with css zoom</title>
<link rel="author" title="Yotam Hacohen" href="mailto:yotha@chromium.org">
<link rel="author" title="Stefan Zager" href="mailto:szager@chromium.org">
<link rel="author" title="Google" href="http://www.google.com/">
<link rel="help" href="https://drafts.csswg.org/css-viewport/">

<style>
body {
  --iframe-width: 128px;
  --iframe-height: 64px;
  --scale: 1;
}
iframe {
  border: none;
  width: calc(var(--iframe-width) * var(--scale));
  height: calc(var(--iframe-height) * var(--scale));
}
.scale {
  --scale: 2;
}
</style>

<iframe id="baseline-ref" src="../resources/leaf.html"></iframe>
<iframe id="zoom-same-origin-ref" class="scale" src="../resources/leaf.html?scale=2"></iframe>
<iframe id="zoom-cross-origin-ref" class="scale" src="../resources/leaf.html?scale=2"></iframe>