@@ -537,8 +537,19 @@ <h3 id=box-fixup><span class=secno>2.2. </span> Anonymous Ruby Box
537537 those used to normalize tables</ a > . < a
538538 href ="#ref-CSS21 "> [CSS21]<!--{{!CSS21}}--> </ a >
539539
540- < ol >
541- < li > Any in-flow block-level boxes directly contained by a < a
540+ < dl > </ dl >
541+
542+ < head >
543+ < style scoped =scoped >
544+ dt { counter-increment : box-fixup; }
545+ dt ::before { content : counter (box-fixup) ". " ; }
546+ </ style >
547+
548+ < body >
549+ < dl >
550+ < dt id =anon-gen-inlinize > Inlinize Block-level Boxes
551+
552+ < dd > Any in-flow block-level boxes directly contained by a < a
542553 href ="#ruby-container-box "> < i > ruby container</ i > </ a > , < a
543554 href ="#ruby-base-container-box "> < i > ruby base container</ i > </ a > , < a
544555 href ="#ruby-annotation-container-box "> < i > ruby annotation
@@ -552,32 +563,121 @@ <h3 id=box-fixup><span class=secno>2.2. </span> Anonymous Ruby Box
552563 ‘< code class =css > inline-block</ code > ’. This computation occurs after
553564 any intermediary anonymous-box fixup (such as that required by internal
554565 table elements).
566+ < p class =issue > I'm not sure if this simplifies anything, since we might
567+ need to handle < a
568+ href ="http://lists.w3.org/Archives/Public/www-style/2013Sep/0160.html "> wrapping
569+ content</ a > within ruby annotations anyway.
555570
556- < li > Any consecutive sequence of < a href ="#ruby-base-box "> < i > ruby
557- bases</ i > </ a > not parented by a < a
558- href ="#ruby-base-container-box "> < i > ruby base container</ i > </ a > is wrapped
559- in an anonymous < a href ="#ruby-base-container-box "> < i > ruby base
560- container</ i > </ a > . Similarly, any consecutive sequence of < a
561- href ="#ruby-annotation-box "> < i > ruby annotations</ i > </ a > not parented by a
562- < a href ="#ruby-annotation-container-box "> < i > ruby annotation
571+ < dt id =anon-gen-bare-inlines > Wrap misparented inline-level content
572+
573+ < dd > Any consecutive sequence of text and inline-level boxes directly
574+ parented by a < a href ="#ruby-container-box "> < i > ruby container</ i > </ a > or
575+ < a href ="#ruby-base-container-box "> < i > ruby base container</ i > </ a > is
576+ wrapped in an anonymous < a href ="#ruby-base-box "> < i > ruby base</ i > </ a > .
577+ Similarly, any consecutive sequence of text and inline-level boxes
578+ directly parented by a < a href ="#ruby-annotation-container-box "> < i > ruby
579+ annotation container</ i > </ a > is wrapped in an anonymous < a
580+ href ="#ruby-annotation-box "> < i > ruby annotation</ i > </ a > .
581+
582+ < dt id =anon-gen-discard-space > Remove inter-level white space
583+
584+ < dd > Any anonymous < a href ="#ruby-base-box "> < i > ruby base</ i > </ a >
585+ containing only white space immediately following a box of type A and
586+ immediately followed by at box of its corresponding type B as defined in
587+ the table below is removed, as if it had ‘< code class =css > display:
588+ none</ code > ’.
589+ < table class =data >
590+ < thead >
591+ < tr >
592+ < th > A
593+
594+ < th > B
595+
596+ < tbody >
597+ < tr >
598+ < td > < a href ="#ruby-base-box "> < i > ruby base</ i > </ a > or < a
599+ href ="#ruby-base-container-box "> < i > ruby base container</ i > </ a >
600+
601+ < td > < a href ="#ruby-annotation-box "> < i > ruby annotation</ i > </ a > or < a
602+ href ="#ruby-annotation-container-box "> < i > ruby annotation
603+ container</ i > </ a >
604+
605+ < tr >
606+ < td > < a href ="#ruby-annotation-container-box "> < i > ruby annotation
607+ container</ i > </ a >
608+
609+ < td > < a href ="#ruby-annotation-container-box "> < i > ruby annotation
610+ container</ i > </ a >
611+
612+ < tr >
613+ < td > < a href ="#ruby-annotation-box "> < i > ruby annotation</ i > </ a >
614+
615+ < td > < a href ="#ruby-annotation-container-box "> < i > ruby annotation
616+ container</ i > </ a >
617+
618+ < tr >
619+ < td > < a href ="#ruby-annotation-container-box "> < i > ruby annotation
620+ container</ i > </ a >
621+
622+ < td > < a href ="#ruby-annotation-box "> < i > ruby annotation</ i > </ a >
623+ </ table >
624+
625+ < dt id =anon-gen-interpret-space > Interpret intra-level white space
626+
627+ < dd >
628+ < ul >
629+ < li > Any anonymous < a href ="#ruby-base-box "> < i > ruby base</ i > </ a >
630+ containing only white space immediately following a < a
631+ href ="#ruby-annotation-box "> < i > ruby annotation</ i > </ a > or < a
632+ href ="#ruby-annotation-container-box "> < i > ruby annotation
633+ container</ i > </ a > and immediately followed by a < a
634+ href ="#ruby-base-box "> < i > ruby base</ i > </ a > or < a
635+ href ="#ruby-base-container-box "> < i > ruby base container</ i > </ a > is
636+ labelled as < dfn id =inter-segment-white-space > inter-segment white
637+ space</ dfn > (and treated specially for pairing and layout, see below).
638+
639+ < li > Any anonymous < a href ="#ruby-base-box "> < i > ruby base</ i > </ a >
640+ containing only white space both immediately following and immediately
641+ followed by a < a href ="#ruby-base-box "> < i > ruby base</ i > </ a > is labelled
642+ as < dfn id =inter-base-white-space > inter-base white space</ dfn > (and
643+ treated specially for pairing and layout, see below).
644+
645+ < li > Any anonymous < a href ="#ruby-annotation-box "> < i > ruby
646+ annotation</ i > </ a > containing only white space both immediately
647+ following and immediately followed by a < a
648+ href ="#ruby-annotation-box "> < i > ruby annotation</ i > </ a > is labelled as
649+ < dfn id =inter-annotation-white-space > inter-annotation white space</ dfn >
650+ (and treated specially for pairing and layout, see below).
651+ </ ul >
652+
653+ < dt id =anon-gen-anon-containers > Generate anonymous level containers
654+
655+ < dd > Any consecutive sequence of < a href ="#ruby-base-box "> < i > ruby
656+ bases</ i > </ a > and < a href ="#inter-base-white-space "> < i > inter-base white
657+ space</ i > </ a > (and not < a
658+ href ="#inter-segment-white-space "> < i > inter-segment white space</ i > </ a > )
659+ not parented by a < a href ="#ruby-base-container-box "> < i > ruby base
660+ container</ i > </ a > is wrapped in an anonymous < a
661+ href ="#ruby-base-container-box "> < i > ruby base container</ i > </ a > .
662+ Similarly, any consecutive sequence of < a
663+ href ="#ruby-annotation-box "> < i > ruby annotations</ i > </ a > and < a
664+ href ="#inter-annotation-white-space "> < i > inter-annotation white
665+ space</ i > </ a > not parented by a < a
666+ href ="#ruby-annotation-container-box "> < i > ruby annotation
563667 container</ i > </ a > is wrapped in an anonymous < a
564668 href ="#ruby-annotation-container-box "> < i > ruby annotation
565669 container</ i > </ a > .
566670
567- < li > Within each < a href ="#ruby-base-container-box "> < i > ruby base
568- container</ i > </ a > , each sequence of inline-level boxes is wrapped in an
569- anonymous < a href ="#ruby-base-box "> < i > ruby base box</ i > </ a > . Similarly,
570- within each < a href ="#ruby-annotation-container-box "> < i > ruby annotation
571- container</ i > </ a > , each sequence of inline-level boxes is wrapped in an
572- anonymous < a href ="#ruby-annotation-box "> < i > ruby annotation box</ i > </ a > .
671+ < dt id =anon-gen-anon-ruby > Generate anonymous ruby containers
573672
574- < li > A sequence of < a href ="#ruby-base-container-box "> < i > ruby base
575- containers</ i > </ a > and/or < a
576- href ="#ruby-annotation-container-box "> < i > ruby annotation
577- containers</ i > </ a > not parented by a < a
578- href ="#ruby-container-box "> < i > ruby container</ i > </ a > is wrapped in an
579- anonymous < a href ="#ruby-container-box "> < i > ruby container</ i > </ a > .
580- </ ol >
673+ < dd > A sequence of < a href ="#ruby-base-container-box "> < i > ruby base
674+ containers</ i > </ a > , < a href ="#ruby-annotation-container-box "> < i > ruby
675+ annotation containers</ i > </ a > , and/or < a
676+ href ="#inter-segment-white-space "> < i > inter-segment white space</ i > </ a >
677+ not parented by a < a href ="#ruby-container-box "> < i > ruby container</ i > </ a >
678+ is wrapped in an anonymous < a href ="#ruby-container-box "> < i > ruby
679+ container</ i > </ a > .
680+ </ dl >
581681
582682 < p > At this point, all ruby layout structures are properly parented, and the
583683 UA can start to associate bases with their annotations.
@@ -2341,6 +2441,15 @@ <h2 class=no-num id=index> Index</h2>
23412441 < li > hidden ruby annotation, < a href ="#hidden "
23422442 title ="section 2.4. "> < strong > 2.4.</ strong > </ a >
23432443
2444+ < li > inter-annotation white space, < a href ="#inter-annotation-white-space "
2445+ title ="section 2.2. "> < strong > 2.2.</ strong > </ a >
2446+
2447+ < li > inter-base white space, < a href ="#inter-base-white-space "
2448+ title ="section 2.2. "> < strong > 2.2.</ strong > </ a >
2449+
2450+ < li > inter-segment white space, < a href ="#inter-segment-white-space "
2451+ title ="section 2.2. "> < strong > 2.2.</ strong > </ a >
2452+
23442453 < li > level, < a href ="#level " title ="section 2.3. "> < strong > 2.3.</ strong > </ a >
23452454
23462455 < li > renderer, < a href ="#renderer "
0 commit comments