Closed Bug 1849038 Opened 9 months ago Closed 9 months ago

Fix wpt flexbox-align-self-baseline-horiz-006.xhtml

Categories

(Core :: Layout: Flexbox, defect)

defect

Tracking

()

RESOLVED FIXED
118 Branch
Tracking Status
firefox118 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

After bug 1818933, this test is supposed to render correctly on Firefox. However, there is a < 1px vertical offset (probably due to font) in the second "last baseline" subtest between the test and reference files.

After bug 1818933, this test is supposed to render correctly on Firefox.
However, there is a < 1px vertical offset (probably due to font) in the second
"last baseline" subtest between the test and reference files.

This patch makes the top edge of the lime "ortho" block touch the flex
container's content top edge in the test file. This doesn't change the purpose
of the second subtest for the last baseline alignment.

Summary: Fix wpt flexbox-align-self-baseline-horiz-006.html → Fix wpt flexbox-align-self-baseline-horiz-006.xhtml

This WPT doesn't robustly pass in any browser before this patch now -- it's
off by 1px in Firefox, and it shows a similar misalignment in Chrome on Ubuntu
if you zoom in the testcase and the reference case.

This is becuase the test has a fragile dependency on using 'margin-top:4px' as
a fudge-factor to bottom-align some content. But that content's size is
font-dependent, so there's no guarantee that 4px will be the right amount to
make it bottom-aligned.

In this patch, I'm fixing the reference case to properly bottom-align the
relevant elements, by using a flex container with align-items:end. This
should make the test more robust, such that it can be expected to pass,
regardless of the font that's used.

Attachment #9349291 - Attachment is obsolete: true
Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cdc41ab01ece
Fix reference case for WPT flexbox-align-self-baseline-horiz-006.xhtml to remove magic/imprecise margin-top hack. r=TYLin
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/41523 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch
Upstream PR was closed without merging
Upstream PR merged by moz-wptsync-bot
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: