Closed Bug 1835562 Opened 1 year ago Closed 1 year ago

WPT css/css-flexbox/baseline-synthesis-003.html fails

Categories

(Core :: Layout: Flexbox, defect)

defect

Tracking

()

RESOLVED FIXED
118 Branch
Tracking Status
firefox118 --- fixed

People

(Reporter: dholbert, Assigned: TYLin)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

WPT failure:
https://wpt.fyi/results/css/css-flexbox/baseline-synthesis-003.html

This test was merged down in bug 1783720. Quoting IanK's upstream commit message there:

[flexbox] Fix baseline synthesis for vertical-rl/sideways.

Previously we'd synthesize the baseline at the block-end edge. For
writing-mode: vertical-rl; text-orientation: sideways; this is
incorrect - instead it should synthesize on the block-start edge.

I think what we're currently doing matches the "previously" behavior that he describes here.

This was the corresponding code change in Chromium that made this patch pass for them, FWIW:
https://chromium-review.googlesource.com/c/chromium/src/+/3815741/5/third_party/blink/renderer/core/layout/ng/ng_box_fragment.h

The test references this spec text:
" To synthesize baselines from a rectangle (or two parallel lines), synthesize the alphabetic baseline from the line-under line, "
https://drafts.csswg.org/css-align-3/#synthesize-baseline

The "line-under" side is defined as "the side underlines are typically drawn on", here:
https://drafts.csswg.org/css-writing-modes-4/#line-under

Normally the line-under side is the block-end side, but it seems vertical-lr is special in that these are instead opposite, as you can see here:

data:text/html,<body style="writing-mode:vertical-lr"><u>first line</u><br>second line<br>Block end edge

(I think text-orientation:sideways is only relevant here in that it makes us use the alphabetic baseline instead of the central baseline? or something to that effect. It doesn't seem to change the layout of latin text itself.)

Baseline::SynthesizeBOffsetFromMarginBox() and
Baseline::SynthesizeBOffsetFromContentBox() already handle the writing mode
with inverted lines (i.e. writing-mode: vertical-lr).

Attachment #9346348 - Attachment is obsolete: true
Attachment #9346349 - Attachment is obsolete: true
Assignee: nobody → aethanyc
Status: NEW → ASSIGNED
Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/5ba7142bc00f Fix synthesized baseline from border-box when line is inverted. r=dholbert
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: