[css3-ruby] Section 2.2 step 7's provisions for inter-segment white space are odd

Specifically, this part of the text:

   A sequence of ruby base containers, ruby annotation containers,
   and/or inter-segment white space not parented by a ruby container
   is wrapped in an anonymous ruby container.

The definition of "inter-segment white space", per step 5, is "anonymous 
ruby base containing only white space ...".

The only way to get an anonymous ruby base is from step 3, and requires 
a ruby base container or ruby container parent.

Therefore there cannot be any inter-segment white space which is not 
parented by a ruby base container or ruby base.

If it's parented by a ruby base, there is nothing to do in step 7.  So 
presumably this is talking about inter-segment white space parented by a 
ruby base container.

For this white space to be inter-segment white space it must have a ruby 
base or ruby base container as a following sibling, and a ruby 
annotation or ruby annotation container as a previous sibling.  Say it 
has a ruby base following sibling.  So we're talking markup like this:

   <div style="display: ruby-base-container">
     <div style="display: ruby-text-container"></div>
     <div style="display: ruby-base"></div>
   </div>

In this case the final box structure called for in the spec seems to be 
identical to the one this markup would produce:

   <div style="display: ruby-base-container">
     <div style="display: ruby">
        <div style="display: ruby-text-container"></div>
     </div><div style="display: ruby-base"></div>
   </div>

except that the trailing whitespace in the ruby container is NOT thrown 
out in this case and is treated as inter-segment white space.

I strongly suspect that something here is buggy, but I'm not sure yet 
what this spec text is trying to accomplish, so I can't tell what the 
"something" is.

-Boris

Received on Friday, 27 June 2014 21:24:18 UTC