Re: Anonymous Ruby Box Generation

Hello Richard,

Wednesday, September 25, 2013, 2:53:12 PM, you wrote:

> http://www.w3.org/TR/css3-ruby/#box-fixup
> 2.2. Anonymous Ruby Box Generation

> I'm having a little trouble understanding how this works such that we 
> end up with all ruby layout structures properly parented.

I started to write an email explaining it, and now I'm also having
trouble. I think this stems from the use of 'ruby bases' in step 2 of
the Anonymous Ruby Box Generation, which links to '‘ruby-base’ in
Ruby-specific ‘display’ property values, which is tied to the display
property values for *elements*.

You can set the display property on an element, but youcan't set it on
an anonymous box unless it happens to be selectable as a
pseudo-element.

So step 1 is talking about boxes (which inside ruby become
inline-level boxes) and step 2 should also, but because of the earlier
definition is still talking about elements. Which means literal text,
not contained in an element child of a 'ruby' element, should have
been wrapped at stage two but is not.

Which means that step 3 does not wrap the inline level boxes in an
anonymous ruby base box.

It seems that we need a step between 2 and 3, something like this

2a. Any consecutive sequence of anonymous inline boxes directly contained by a
ruby container is wrapped in an anonymous ruby base container.

> [1]
> If the ruby markup is

> <ruby>振<rt>ふ</rt>り<rt>り</rt>仮<rt>が</rt>名<rt>な</rt></ruby>

> How do the base characters get anonymous ruby-base boxes?

Currently, they wouldn't; it seems step 2a would generate them though.

> [2]
> If the ruby markup is

> <ruby><rb>振<rb>り<rb>仮<rb>名<rt>ふ<rt>り</rt><rt>が<rt>な</ruby>

> step 3 says

> "Within each ruby base container, each sequence of inline-level boxes is
> wrapped in an anonymous ruby base box"

> Shouldn't this say:

> "Within each ruby base container, each of the inline-level boxes is 
> wrapped in an anonymous ruby base box"

> since the sequence is equivalent to the ruby base container by the 
> definition in step 2.

I think not. Consider this example

<ruby>aaaaabbbb<rt>c</rt></ruby>

and assume that a line break occurs such that aaaaa is on one line and
bbbb is on the next line. That is a sequence of two inline boxes. But
we want the whole string to be wrapped, generating the fictitious
markup

<ruby>[rbc][box1]aaaaa[/box1][box2]bbbb[/box2][/rbc]<rt>c</rt></ruby>

> [3]
> If the ruby markup is

> <ruby><rb>振<span>り</span>仮名<rt>annotations</ruby>

> wouldn't step 3 produce 3 ruby bases where only one was intended?

No (assuming we don't accept your change from your point 2 above),
because there is a sequence of three inline boxes

[box1]振[/box1]<span box2>り</span box2>[box3]仮名[/box3]

and the whole sequence gets wrapped in an anonymous ruby base
container.

Good examples, I think the spec needs several such examples with the
markup and the final sequence of anonymous boxes.

-- 
Best regards,
 Chris                            mailto:chris@w3.org

Received on Wednesday, 25 September 2013 13:43:02 UTC