Open Bug 1058203 Opened 11 years ago Updated 2 months ago

line-height: normal is handled differently for non-floating ::first-letter

Categories

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

defect

Tracking

()

People

(Reporter: dbaron, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(7 files, 1 obsolete file)

line-height: normal somehow produces different results for non-floating ::first-letter than it does for regular inlines. I don't think this should be the case. I ran into this while adjusting the tests for layout/reftests/first-letter/429968-1* in bug 1055865 patch 5. I think those tests ought to work with line-height: normal instead of the explicit line-height: 1.2 that I had to add, although I might be missing something.
Severity: normal → S3
Attached file testcase 1
Attachment #9505046 - Attachment mime type: text/plain → text/html
Attached image screenshot of testcase 1 (obsolete) —

Here's a screenshot of testcase 1, taken on Windows 11 with Nightly 143.0a1 (2025-08-04) (64-bit)

Comment on attachment 9505048 [details]
screenshot of testcase 1

(sorry, obsoleting/reposting; trying to capture a screenshot of testcase/reference with exact same window size, and I inadvertently resized my window in between. :) )

Attachment #9505048 - Attachment is obsolete: true

I can't reproduce with testcase 1 / reference case 1 on Ubuntu 25.04, but I think that's because the normal line-height behavior is font-dependent and the default font on Ubuntu happens to use a normal value that Just Works for the purposes of this bug.

However, some other fonts do reproduce it; e.g. DejaVu Sans Mono (the font that I get for the monospace generic font-family) seems to trigger the bug on LInux.

Here's testcase 2 / reference case 2 in side-by-side Nightly windows on Ubuntu 25.04.

The reference case's text is placed slightly further down the page than the testcase's text, due to a slightly different line-height value.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: