[reflow branch] intrinsic widths computed incorrectly for ::first-letter

NEW
Assigned to

Status

()

Core
Layout: Block and Inline
11 years ago
6 months ago

People

(Reporter: dbaron, Assigned: dbaron)

Tracking

(Depends on: 1 bug, Blocks: 2 bugs)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [first letter])

Attachments

(1 attachment)

736 bytes, text/html; charset=UTF-8
Details
(Assignee)

Description

11 years ago
nsFirstLetterFrame needs to implement AddInlineMinWidth, AddInlinePrefWidth, GetMinWidth, and GetPrefWidth.
(Assignee)

Comment 1

11 years ago
Created attachment 247589 [details]
testcase

The first and third tables should intrinsically size around the pref widh; the second and fourth around the min width.
(Assignee)

Updated

11 years ago
Whiteboard: [first letter]
(Assignee)

Comment 2

11 years ago
So I did the implementations.  It turns out that making this really work requires splitting the first-letter at frame-construction time rather than at reflow.  This probably means:

 * making nsCSSFrameConstructor::CreateLetterFrame and nsCSSFrameConstructor::CreateFloatingLetterFrame actually do the split, and create the continuation with aIsFluid==PR_FALSE

 * removing the code that does the splits from nsTextFrame

 * moving the style context munging from nsFirstLetterFrame::Init to nsCSSFrameConstructor::CreateLetterFrame (if we even want the continuation letter frame at all!)

 * removing the first-letter-related code from nsLineLayout.

I propose doing this as a separate patch after the reflow branch lands.
(Assignee)

Updated

11 years ago
Blocks: 357527
(Assignee)

Updated

11 years ago
Blocks: 300030
(Assignee)

Updated

11 years ago
Depends on: 365131
(Assignee)

Updated

8 years ago
Duplicate of this bug: 593551
(Assignee)

Updated

8 years ago
Summary: [reflow branch] nsFirstLetterFrame: implement all 4 intrinsic width functions → [reflow branch] intrinsic widths computed incorrectly for ::first-letter
(Assignee)

Updated

7 years ago
Blocks: 385615
Duplicate of this bug: 877955
Duplicate of this bug: 1025447

Comment 6

2 years ago
Another test case, demonstrating how this bug has affected one of my websites in the wild:
http://codepen.io/dampkwab/pen/rOZPwa

This has been a long-standing and it doesn't look like it's received much attention.
It sounds like a fix would require a lot of familiarity with the codebase but is there anything an external contributor could to to help speed up the process?
You need to log in before you can comment on or make changes to this bug.