Closed Bug 1472760 Opened 6 years ago Closed 6 years ago

Initial reflow is wrong for inline-block with ::first-letter of different font-size

Categories

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

defect

Tracking

()

RESOLVED DUPLICATE of bug 385615

People

(Reporter: dholbert, Unassigned)

Details

(Keywords: testcase)

Attachments

(2 files, 1 obsolete file)

STR:
 1. Load attached testcase.
 2. Hover and un-hover the orange area
 (to cause a dynamic style change that triggers a reflow)

ACTUAL RESULTS:
 - In the initial layout, the orange area (the inline-block) is an awkward size, too skinny to fit its contents, for no good reason.
 - After you hover to trigger a reflow, the orange area gets wide enough to fit its contents, and it stays that way.

I think this might be caused by us calculating intrinsic sizes as if the ::first-letter's smaller font-size were applied to the whole inline-block.  (It looks roughly like that, at least.)

This seems to be the root cause of this mobile webcompat issue:
  https://github.com/webcompat/web-bugs/issues/17462
Attached file testcase 1
I can reproduce a version* of this bug with builds at least as old as 2011-01-01 (pre-Firefox 4). So this is not a regression (or not a recent one).

* (the results aren't quite the same in old builds -- in recent builds, the orange area is initially 2 lines tall, whereas in older builds, it's only one line tall. However, it's too skinny in all of them and fixes it self on hover-triggered relayout, and that's the core issue here.)
Keywords: testcase
OS: Unspecified → All
Priority: -- → P3
Hardware: Unspecified → All
For archival purposes (and more thorough testing when this is eventually/hopefully fixed): here's a snapshot of the original site content here from the webcompat issue.  This needs to be viewed in responsive design mode in order to trigger the misalignment issue.
Attachment #8989248 - Attachment description: testcase 2 (from original site; needs responsive-design-mode for misalignment to be visible) → testcase 2 (as zip with CSS in external files)
Duplicate of bug 362880 or bug 385615.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: