[csswg-drafts] [cssom-view] Needs more details for `offsetWidth` and `offsetHeight` (#6588)

kojiishi has just created a new issue for https://github.com/w3c/csswg-drafts:

== [cssom-view] Needs more details for `offsetWidth` and `offsetHeight` ==
The [`offsetWidth` spec]:
1. Says "the **first** CSS layout box" but great if we can define what the "first" means more clearly.
2. Isn't as clear what to do when the width or height is zero as the [`getBoundingClientRect` spec] is.

From a few quick testing for an inline box:
* When the inline box is line-fragmented, all 3 impls include all fragments.
* When the [inline box contains an in-flow block-level box], Gecko includes it and also inline boxes after the block-level box, while Blink/WebKit ignore them. Blink may try to change this though.
* WebKit includes width of boxes whose height is zero, while Blink/Gecko does not.

[`offsetWidth` spec]: https://www.w3.org/TR/cssom-view-1/#dom-htmlelement-offsetwidth
[`getBoundingClientRect` spec]: https://www.w3.org/TR/cssom-view-1/#dom-range-getboundingclientrect
[inline box contains an in-flow block-level box]: https://www.w3.org/TR/CSS21/visuren.html#:~:text=When%20an%20inline%20box%20contains%20an%20in-flow%20block-level%20box

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6588 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 9 September 2021 18:37:12 UTC