Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <script src="../../resources/testharness.js"></script> | |
| 3 <script src="../../resources/testharnessreport.js"></script> | |
| 4 <style type="text/css"> | |
| 5 body > div { width: 100px } | |
| 6 #stf1 { float: left } | |
| 7 #stf2 { position: absolute } | |
| 8 #stf3 { display: table-cell } | |
| 9 </style> | |
| 10 <div> | |
| 11 <div id="stf1"> | |
| 12 <svg viewBox='0 0 1 1'></svg> | |
| 13 </div> | |
| 14 <div id="stf2"> | |
| 15 <svg viewBox='0 0 1 1'></svg> | |
| 16 </div> | |
| 17 <div id="stf3"> | |
| 18 <svg viewBox='0 0 1 1'></svg> | |
| 19 </div> | |
| 20 </div> | |
| 21 <script> | |
| 22 test(function() { | |
| 23 var r = document.getElementById('stf1').getBoundingClientRect(); | |
| 24 assert_equals(r.width, 0); | |
| 25 }, "Test floated element width with replaced element with intrinsic ratio bu t no dimensions"); | |
| 26 test(function() { | |
| 27 var r = document.getElementById('stf2').getBoundingClientRect(); | |
| 28 assert_equals(r.width, 0); | |
| 29 }, "Test absolute positioned element width with replaced element with intrin sic ratio but no dimensions"); | |
| 30 test(function() { | |
| 31 var r = document.getElementById('stf3').getBoundingClientRect(); | |
| 32 assert_true(r.width == 1 || r.width == 0); // Unclear if width should be 0 or 1. (Firefox and Blink doesn't agree) | |
|
pdr.
2014/06/18 17:48:43
Lets pick one but leave the comment. This will let
davve
2014/06/18 19:16:47
Fair. Will fix grammar in the comment though :)
| |
| 33 }, "Test table cell width with replaced element with intrinsic ratio but no dimensions"); | |
| 34 </script> | |
| OLD | NEW |