Index: LayoutTests/svg/custom/stf-container-with-intrinsic-ratio-svg.html |
diff --git a/LayoutTests/svg/custom/stf-container-with-intrinsic-ratio-svg.html b/LayoutTests/svg/custom/stf-container-with-intrinsic-ratio-svg.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..bfec186eac8e34fe984b64672558e644a6a09bb9 |
--- /dev/null |
+++ b/LayoutTests/svg/custom/stf-container-with-intrinsic-ratio-svg.html |
@@ -0,0 +1,34 @@ |
+<!DOCTYPE html> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<style type="text/css"> |
+ body > div { width: 100px } |
+ #stf1 { float: left } |
+ #stf2 { position: absolute } |
+ #stf3 { display: table-cell } |
+</style> |
+<div> |
+ <div id="stf1"> |
+ <svg viewBox='0 0 1 1'></svg> |
+ </div> |
+ <div id="stf2"> |
+ <svg viewBox='0 0 1 1'></svg> |
+ </div> |
+ <div id="stf3"> |
+ <svg viewBox='0 0 1 1'></svg> |
+ </div> |
+</div> |
+<script> |
+ test(function() { |
+ var r = document.getElementById('stf1').getBoundingClientRect(); |
+ assert_equals(r.width, 0); |
+ }, "Test floated element width with replaced element with intrinsic ratio but no dimensions"); |
+ test(function() { |
+ var r = document.getElementById('stf2').getBoundingClientRect(); |
+ assert_equals(r.width, 0); |
+ }, "Test absolute positioned element width with replaced element with intrinsic ratio but no dimensions"); |
+ test(function() { |
+ var r = document.getElementById('stf3').getBoundingClientRect(); |
+ assert_equals(r.width, 1); // Unclear if width should be 0 or 1. (Gecko and Blink disagree) |
+ }, "Test table cell width with replaced element with intrinsic ratio but no dimensions"); |
+</script> |