diff options
Diffstat (limited to 'tests/wpt/web-platform-tests/css/css-transforms/transform-box/svgbox-view-box.html')
-rw-r--r-- | tests/wpt/web-platform-tests/css/css-transforms/transform-box/svgbox-view-box.html | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/transform-box/svgbox-view-box.html b/tests/wpt/web-platform-tests/css/css-transforms/transform-box/svgbox-view-box.html new file mode 100644 index 00000000000..dbce635d6e7 --- /dev/null +++ b/tests/wpt/web-platform-tests/css/css-transforms/transform-box/svgbox-view-box.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<title>transform-box: view-box (SVG layout)</title> +<link rel="match" href="./reference/svgbox-ref.html"> +<link rel="help" href="https://drafts.csswg.org/css-transforms-1/#transform-box"> +<meta name="assert" content="This should display a C shape with the center of the top endpoint at 200,100."/> + +<style> +#target { + fill: green; + stroke: black; + stroke-width: 50; + transform-box: view-box; + transform-origin: 200px 100px; + transform: rotate(90deg); +} +</style> + +<svg width="400" height="300"> + <path id="target" d="M 200 100 v 100 h 100 v -100"/> +</svg> + +<div id="error"></div> +<script> +var refStyle = "view-box"; +var compStyle = getComputedStyle(document.getElementById('target')).transformBox; +if (refStyle != compStyle) + document.getElementById('error').textContent = "Error, got computed style " + compStyle; +</script> |