WICG / layout-instability

A proposal for a Layout Instability specification
https://wicg.github.io/layout-instability/
Other
158 stars 26 forks source link

Spec's usage of the term "line box generated by N" might be imprecise/incorrect (where N is a text node) #51

Closed dholbert closed 4 years ago

dholbert commented 4 years ago

In this section... https://wicg.github.io/layout-instability/#sec-terminology ...the spec defines the "starting point" and "visual representation" of a text node N in terms of "the first line box generated by N".

I think this might be misusing terminology -- I'm not sure it's correct to say that text nodes "generate line boxes", really. They're contained within line boxes, and they do (in aggregate) cause line boxes to exist, but their block container (or their inline formatting context) is really the thing that generates the line boxes.

As a concrete example, consider e.g. a line box which is formed to contain all of this content (with many individual text nodes): 1<a>2</a>3<i>4</i>5<u>6</u>7 . It would be misleading to say any individual one of the text nodes here "generated" the line box. Really, the line box was generated by the block container / inline formatting context, and it contains boxes for all of these text nodes, I think.

So, anyway -- assuming that the spec really wants to refer to the whole line box (rather than just the box around the text): maybe it wants to say something like "the first line box that contains a piece of N's content"? (or use "contains" / "participates-in" terminology, rather than "generates")

npm1 commented 4 years ago

This reminds me of similar feedback we received on Element Timing which led me to file https://github.com/w3c/csswg-drafts/issues/4197 to ask from guidance from CSS folks there. But it seems that there currently is no good term to use :(

dholbert commented 4 years ago

OK; we can probably just close this, then.

dholbert commented 4 years ago

(I don't think there's any ambiguity in the current spec's wording on this; this was just a language-lawyer sort of thing.)