tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit b294ea6f2a3d2905d6e2b78d1cf8346e4070240d
parent 0f21027462228052cd7a7bfbbc0d62946802481b
Author: Oriol Brufau <obrufau@igalia.com>
Date:   Wed, 15 Oct 2025 08:58:44 +0000

Bug 1994011 [wpt PR 55397] - layout: Make inline boxes in phantom line boxes be 0px tall, a=testonly

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

Diffstat:
Atesting/web-platform/tests/css/cssom-view/getBoundingClientRect-empty-inline-002.html | 19+++++++++++++++++++
1 file changed, 19 insertions(+), 0 deletions(-)

diff --git a/testing/web-platform/tests/css/cssom-view/getBoundingClientRect-empty-inline-002.html b/testing/web-platform/tests/css/cssom-view/getBoundingClientRect-empty-inline-002.html @@ -0,0 +1,19 @@ +<!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>