Implement that the vertical sizing of ruby elements per spec

NEW
Unassigned

Status

()

Core
Layout: Block and Inline
4 years ago
2 years ago

People

(Reporter: dbaron, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
In bug 1030993 I argued that the vertical size of CSS ruby elements should be computed like it is for inline elements.  The spec isn't yet clear on the matter.  While I think this is probably what the spec should say, it hasn't yet been resolved, so we should track the resolution, and when it's clear, we should add tests for the correct behavior.
The spec says:

> Each ruby base container is sized and positioned to contain exactly the full height of its ruby bases.

and

> Each ruby annotation container is sized and positioned to contain exactly the full height of its ruby annotations.

We should implement it.
Summary: check that the vertical sizing of ruby elements matches spec → Implement that the vertical sizing of ruby elements per spec
OK, after learning more on code for vertical aligning inline frames, I agree that the spec is not clear enough at this point. And I guess it is probably better to make rbc and rtc just like normal inline element.
(Reporter)

Comment 3

3 years ago
We discussed this in the CSS working group meeting about 5 hours ago.

I think the conclusion was:

 * vertical-align should not apply to ruby-text elements (force to baseline somehow)

 * ruby-text-container and ruby-base-container elements should have a height that contains the margin boxes of their ruby-texts/ruby-bases (which are really just font metrics plus padding, border, and margin)

 * ruby-text-containers should be stacked directly adjacent to the ruby-base-containers.  I guess the sentence "Ruby annotation containers are stacked outward over or under their corresponding ruby base container, without any intervening space." probably means margin boxes, though the spec should be clearer.
(In reply to David Baron [:dbaron] (UTC+11) (needinfo? for questions) from comment #3)
> We discussed this in the CSS working group meeting about 5 hours ago.
> 
> I think the conclusion was:
> 
>  * vertical-align should not apply to ruby-text elements (force to baseline
> somehow)

I think the conclusion is not applying vertical-align to ruby base elements? We are able to handle vertical-align for ruby text because their lines are inside rtcs.

>  * ruby-text-container and ruby-base-container elements should have a height
> that contains the margin boxes of their ruby-texts/ruby-bases (which are
> really just font metrics plus padding, border, and margin)

I guess I need to enumerate all children of them, and find the topmost and bottommost coord.
BTW, would you like to review patches for this bug, or have some other person to do it?
Flags: needinfo?(dbaron)
(Reporter)

Comment 6

3 years ago
(In reply to Xidorn Quan [:xidorn] (UTC+11) from comment #4)
> (In reply to David Baron [:dbaron] (UTC+11) (needinfo? for questions) from
> comment #3)
> > We discussed this in the CSS working group meeting about 5 hours ago.
> > 
> > I think the conclusion was:
> > 
> >  * vertical-align should not apply to ruby-text elements (force to baseline
> > somehow)
> 
> I think the conclusion is not applying vertical-align to ruby base elements?
> We are able to handle vertical-align for ruby text because their lines are
> inside rtcs.

Sorry, you're right.  Not applying vertical-align to ruby-base elements.

> >  * ruby-text-container and ruby-base-container elements should have a height
> > that contains the margin boxes of their ruby-texts/ruby-bases (which are
> > really just font metrics plus padding, border, and margin)
> 
> I guess I need to enumerate all children of them, and find the topmost and
> bottommost coord.

Yes.

(In reply to Xidorn Quan [:xidorn] (UTC+11) from comment #5)
> BTW, would you like to review patches for this bug, or have some other
> person to do it?

I should probably review the bits about vertical-align not applying, but either jfkthame or I or dholbert could review the rest, I think.
Flags: needinfo?(dbaron)
Depends on: 1132008
Blocks: 256274
No longer blocks: 1039006
You need to log in before you can comment on or make changes to this bug.