getBoundingClientRect-empty-inline-002.html (858B)
1 <!DOCTYPE html> 2 <link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-element-getboundingclientrect"> 3 <link rel="help" href="https://drafts.csswg.org/css-inline-3/#invisible-line-boxes"> 4 <link rel="help" href="https://github.com/servo/servo/issues/39648"> 5 <link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com"> 6 <meta name="assert" content="An inline box in a phantom line box has a size of 0."> 7 8 <style>body { margin: 8px }</style> 9 <span></span> 10 11 <script src="/resources/testharness.js"></script> 12 <script src="/resources/testharnessreport.js"></script> 13 <script> 14 let rect = document.querySelector("span").getBoundingClientRect(); 15 test(() => assert_equals(rect.x, 8), "x"); 16 test(() => assert_equals(rect.y, 8), "y"); 17 test(() => assert_equals(rect.width, 0), "width"); 18 test(() => assert_equals(rect.height, 0), "height"); 19 </script>