element-timing
element-timing copied to clipboard
Text nodes do not have a "border box"
https://wicg.github.io/element-timing/#sec-report-text step 2.1 says:
the border box of text
where text is a Text node. In CSS elements can have border boxes but text cannot. See https://www.w3.org/TR/css-display-3/#intro which defines boxes (for elements and pseudo-elements, plus anonymous boxes) and https://drafts.csswg.org/css-box-3/#border-box which defines a "border box", but only for boxes, not text runs.
@hawkinsw @npm1
Hmmm I wonder if there is no CSS box which specifies the content size of a text node or text run then?
I don't believe there is, but it's worth checking with the CSSWG.
Note also that if you have something like <span>text</span> then the content box of the span may not contain all of the bits the text paints. See https://drafts.csswg.org/css-overflow-3/#ink for some examples. It's not clear to me whether you'd want to include such bits in the rectangle you want here.