aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/web-platform-tests/css/css-transforms/transform-box/svgbox-content-box.html
diff options
context:
space:
mode:
Diffstat (limited to 'tests/wpt/web-platform-tests/css/css-transforms/transform-box/svgbox-content-box.html')
-rw-r--r--tests/wpt/web-platform-tests/css/css-transforms/transform-box/svgbox-content-box.html28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/wpt/web-platform-tests/css/css-transforms/transform-box/svgbox-content-box.html b/tests/wpt/web-platform-tests/css/css-transforms/transform-box/svgbox-content-box.html
new file mode 100644
index 00000000000..2f7f2dd071a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-transforms/transform-box/svgbox-content-box.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<title>transform-box: content-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: content-box; /* alias for fill-box */
+ transform-origin: 0px 0px;
+ 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 = "content-box";
+var compStyle = getComputedStyle(document.getElementById('target')).transformBox;
+if (refStyle != compStyle)
+ document.getElementById('error').textContent = "Error, got computed style " + compStyle;
+</script>