Closed Bug 2055372 Opened 1 month ago Closed 1 month ago

[text-box-trim] Fix font baseline selection for `text` edge

Categories

(Core :: Layout: Block and Inline, defect)

defect

Tracking

()

RESOLVED FIXED
154 Branch
Tracking Status
firefox154 --- fixed

People

(Reporter: sajidanwar, Assigned: sajidanwar)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

See Bug 2050141 (and specifically, Sebastian's comment, my comment, and the attached test case). The text edge is supposed to use the text-over and text-under baselines, which in Firefox and other browsers is based on the max ascent and descent of the inline box's font. But my implementation instead selected the "trimmed" ascent and descent (ref), which additionally subtract the "internal leading" of the font (if any). This makes Firefox trim too far on certain fonts as can be seen in the test case on the other bug.

Pushed by asilaghi@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/a3209c786f13 https://hg.mozilla.org/integration/autoland/rev/22bb39905ab2 Revert "Bug 2055372 - Fix font baseline selection for text-box-edge: text. r=layout-reviewers,emilio" for causing wpt failures at text-box-trim-multicol-013.html

Backed out for causing wpt failures at text-box-trim/text-box-trim-multicol-013.html
Backout Link
Push with failures
Failure Log
Failure line TEST-UNEXPECTED-FAIL | /css/css-inline/text-box-trim/text-box-trim-multicol-013.html | .multicol 1 - assert_equals:

Flags: needinfo?(sajidanwar94)

Test failed because it was checking the layout values before the Ahem font loaded. On Linux it seems the initial font family has internal leading, so fixing the trim baseline revealed this font loading issue. Updating the patch to fix the test case.

Flags: needinfo?(sajidanwar94)

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/61354 for changes under testing/web-platform/tests

Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch

Upstream PR was closed without merging

QA Whiteboard: [qa-triage-done-c155/b154]

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: