Bug 1729951 [wpt PR 30476] - Fix abspos-in-block-in-inline-in-relpos-inline, a=testonly
commitc0f1f146cc4e7a15404bec76db29ee266ed56c50
authorKoji Ishii <kojii@chromium.org>
Thu, 23 Sep 2021 10:24:21 +0000 (23 10:24 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Mon, 27 Sep 2021 09:24:27 +0000 (27 09:24 +0000)
tree4ac395aea4f974e240ce6da449138898acd65412
parent4f82608226a3724d186eea252ccba1491fb7da81
Bug 1729951 [wpt PR 30476] - Fix abspos-in-block-in-inline-in-relpos-inline, a=testonly

Automatic update from web-platform-tests
Fix abspos-in-block-in-inline-in-relpos-inline

This patch changes the test to avoid using
`Element.offsetWidth` to block-in-inline boxes.

`Element.offsetWidth` for block-in-inline is not interoperable.
Blink/WebKit ignores continuations, while Gecko takes them
into account. Also its spec[1] is not clear about how to
handle rects whose width or height is zero.

`getBoundingClientRects().width` is a possible replacement.
All 3 impls takes continuations into acccount, and its spec[2]
is clear about when width or height is zero, but WebKit has an
issue when width or height is zero.

This patch uses the size of inline-block instead as the
expected value to focus on what it wants to test.

I will add a separate test for `getBoundingClientRects()` at
crrev.com/c/3149307.

[1] https://www.w3.org/TR/cssom-view-1/#dom-htmlelement-offsetwidth
[2] https://www.w3.org/TR/cssom-view-1/#dom-range-getboundingclientrect

Bug: 716930
Change-Id: I910a707f749513b231f6e41a9220f3b2a99be5be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3149807
Auto-Submit: Koji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/main@{#920139}

--

wpt-commits: f3753211e5c53b49c2a87b3eaa5378e7a298b4be
wpt-pr: 30476
testing/web-platform/tests/css/CSS2/abspos/abspos-in-block-in-inline-in-relpos-inline.html