Index: LayoutTests/svg/foreignObject/fO-percentage-height-style.html |
diff --git a/LayoutTests/svg/foreignObject/fO-percentage-height-style.html b/LayoutTests/svg/foreignObject/fO-percentage-height-style.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..16475cb1bf3f39cb91c99a4bf7203ee74b2df4c8 |
--- /dev/null |
+++ b/LayoutTests/svg/foreignObject/fO-percentage-height-style.html |
@@ -0,0 +1,21 @@ |
+<!doctype html> |
+<script src="../../resources/js-test.js"></script> |
+<svg viewBox="0 0 250 250"> |
+ <foreignObject width="250" height="250"> |
+ <svg style="height:100%; background: blue"> |
+ </svg> |
+ </foreignObject> |
+</svg> |
+<script> |
+ description("Test use of percentages inside foreignObject"); |
+ |
+ var nestedSvg = document.querySelectorAll('svg')[1]; |
+ shouldBe("nestedSvg.offsetHeight", "250"); |
+ |
+ nestedSvg.style.height = "50%"; |
+ shouldBe("nestedSvg.offsetHeight", "125"); |
+ |
+ var foreignObject = nestedSvg.parentNode; |
+ foreignObject.height.baseVal.value = 400; |
+ shouldBe("nestedSvg.offsetHeight", "200"); |
+</script> |