Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/cssom-view/getBoundingClientRect-empty-inline-002.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<meta name="assert" content="An inline box in a phantom line box has a size of 0.">
<style>body { margin: 8px }</style>
<span></span>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
let rect = document.querySelector("span").getBoundingClientRect();
test(() => assert_equals(rect.x, 8), "x");
test(() => assert_equals(rect.y, 8), "y");
test(() => assert_equals(rect.width, 0), "width");
test(() => assert_equals(rect.height, 0), "height");
</script>