Automatic update from web-platform-tests layout: Make inline boxes in phantom line boxes be 0px tall The height of an inline box is typically decided by font metrics, but if it's on a phantom line box, then it should be zero. This is hard to observe, because the contents of a phantom line box are typically invisible, but it's noticeable on these cases: - If the inline has a box shadow or an outline (not on all browsers). - If the inline establishes a containing block for abspos descendants. - When getting the size using JS APIs. Signed-off-by: Oriol Brufau <obrufau@igalia.com> -- wpt-commits: 15cbfdbe9c917a7e61d0b984d677584dd6ca9d6f wpt-pr: 55397
20 lines
858 B
HTML
20 lines
858 B
HTML
<!DOCTYPE html>
|
|
<link rel="help" href="https://drafts.csswg.org/cssom-view/#dom-element-getboundingclientrect">
|
|
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#invisible-line-boxes">
|
|
<link rel="help" href="https://github.com/servo/servo/issues/39648">
|
|
<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>
|