Re: Refactoring of inline-block-alignment tests

On Sun, Jun 7, 2015 at 6:01 PM, 塩澤 元 (Shiozawa, Hajime)
<hajime.shiozawa@gmail.com> wrote:
> Koji,
>
>
>>
>> Hajime,
>>
>> When an inline-block (with block descendants) is in a 'writing-mode:
>> vertical-rl' context with 'text-orientation: mixed' or with
>> 'text-orientation: upright', then the horizontal center of inline-block's
>> margin box is used for baseline-alignment with the central (dominant)
>> baseline
>>
>>
>> "
>> If an atomic inline (such as an inline-block, inline-table, or replaced
>> inline element) is not capable of providing its own baseline information,
>> then the UA synthesizes a baseline table thus:
>>
>> alphabetic
>>     The alphabetic baseline is assumed to be at the under margin edge.
>> central
>>     The central baseline is assumed to be *_halfway between the under and
>> over margin edges of the box_*.
>> "
>> 4.3. Atomic Inline Baselines
>> http://dev.w3.org/csswg/css-writing-modes-3/#replaced-baselines
>>
>> and this is what Firefox does: it aligns the center of the inline-block's
>> margin box with the central baseline.
>>
>>
>>
>> What Chrome does is trying to apply:
>> "
>> The baseline of an 'inline-block' is the baseline of its last line box in
>> the normal flow (...)
>> "
>> CSS 2.1, 10.8.1 Leading and half-leading
>> http://www.w3.org/TR/CSS21/visudet.html#leading
>>
>> which is wrong in my opinion in the context of dominant central baseline.
>>
>> Example given:
>>
>>
>> http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/vert-align-latin-baseline-inline-block-dhtml.html
>>
>> or
>>
>>
>> http://www.gtalbot.org/BrowserBugsSection/CSS3WritingModes/vert-align-japan-baseline-inline-block-dhtml.html
>>
>> 'vertical-align: text-top', 'vertical-align: text-bottom',
>> 'vertical-align: top' and 'vertical-align: bottom' appear to be rendered as
>> expected in both Firefox and Chrome. I think Chrome has a decisive
>> implementation bug for baseline-aligning inline-blocks (which uses block
>> descendants).
>
>
> Koji, what do you think?
> Does Chrome have bug?

Can you try to create a case that stands out the difference and ask at
www-style?

As far as I understand, 4.3 applies only when "is not capable of
providing its own baseline information", and when inline-blocks have
children, using the last line box is correct.

Am I correct to understand, what Gérard is saying is that, if all
children of an inline-block are block, there should not be a line box
and thus the inline-block should not be able to provide its own
baseline information? That's quite a case that I can hardly answer
which is what the spec defines.

I wonder, this is not a vertical-flow specific issue and you could
probably create a case where the diff appear in horizontal flow too,
and www-style could better answer to the quesiton.

/koji

Received on Monday, 8 June 2015 07:43:55 UTC