Hmm, on looking at the spec, I'm not sure the "expected" result is actually correct for the testcase as given, which has: <ruby><span>base</span><rt>text</ruby> with a large font-size applied to the <span> containing the word "base". The [Anonymous Ruby Box Generation] section of the spec tells us that the <span> here will be wrapped in an anonymous ruby-base, so it's as if the testcase had <ruby><rb><span>base</span></rb><rt>text</rt></ruby> with a large font-size on the <span>. According to the [Ruby Layout](https://drafts.csswg.org/css-ruby/#ruby-layout) section, "its base level is laid out on the line, aligned according to its vertical-align property exactly as if its ruby bases were a regular sequence of inline boxes". But note that the height of an inline box is *not* increased as a result of a large font-size on a child of the inline; compare data:text/html,<span style="border:1px solid gray">foo<span style="font-size:36px">bar</span></span> where the larger font-size of the inner <span> does not affect the height of the outer one. Similarly, in the example above, it seems like the font-size of the <span> should *not* affect the height of the <rb>, and so it would not affect the positioning of the ruby text. So AFAICS, on this particular example Firefox may be correct after all, and Safari and Chrome are wrong to increase the height of the ruby base. *However*, if I [modify the example](https://jsfiddle.net/ueq8whd3/) to use <rb> in place of <span>, with a large font-size on the <rb> element, Firefox still gives the same result, which in this case does seem wrong; the height of the <rb> should take account of its font-size. So we do have a bug here, I think, but it involves a slightly different testcase. Xidorn, I think you know more about Ruby layout; am I understanding this correctly?
Bug 1565681 Comment 4 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Hmm, on looking at the spec, I'm not sure the "expected" result is actually correct for the testcase as given, which has: <ruby><span>base</span><rt>text</ruby> with a large font-size applied to the <span> containing the word "base". The [Anonymous Ruby Box Generation](https://drafts.csswg.org/css-ruby/#box-fixup) section of the spec tells us that the <span> here will be wrapped in an anonymous ruby-base, so it's as if the testcase had <ruby><rb><span>base</span></rb><rt>text</rt></ruby> with a large font-size on the <span>. According to the [Ruby Layout](https://drafts.csswg.org/css-ruby/#ruby-layout) section, "its base level is laid out on the line, aligned according to its vertical-align property exactly as if its ruby bases were a regular sequence of inline boxes". But note that the height of an inline box is *not* increased as a result of a large font-size on a child of the inline; compare data:text/html,<span style="border:1px solid gray">foo<span style="font-size:36px">bar</span></span> where the larger font-size of the inner <span> does not affect the height of the outer one. Similarly, in the example above, it seems like the font-size of the <span> should *not* affect the height of the <rb>, and so it would not affect the positioning of the ruby text. So AFAICS, on this particular example Firefox may be correct after all, and Safari and Chrome are wrong to increase the height of the ruby base. *However*, if I [modify the example](https://jsfiddle.net/ueq8whd3/) to use <rb> in place of <span>, with a large font-size on the <rb> element, Firefox still gives the same result, which in this case does seem wrong; the height of the <rb> should take account of its font-size. So we do have a bug here, I think, but it involves a slightly different testcase. Xidorn, I think you know more about Ruby layout; am I understanding this correctly?