Open
Bug 362880
Opened 18 years ago
Updated 1 year ago
[reflow branch] intrinsic widths computed incorrectly for ::first-letter
Categories
(Core :: Layout: Block and Inline, defect)
Core
Layout: Block and Inline
Tracking
()
NEW
People
(Reporter: dbaron, Unassigned)
References
(Depends on 1 open bug, Blocks 2 open bugs)
Details
(Whiteboard: [first letter])
Attachments
(1 file)
736 bytes,
text/html; charset=UTF-8
|
Details |
nsFirstLetterFrame needs to implement AddInlineMinWidth, AddInlinePrefWidth, GetMinWidth, and GetPrefWidth.
Reporter | ||
Comment 1•18 years ago
|
||
The first and third tables should intrinsically size around the pref widh; the second and fourth around the min width.
Reporter | ||
Updated•18 years ago
|
Whiteboard: [first letter]
Reporter | ||
Comment 2•18 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.
Reporter | ||
Updated•18 years ago
|
Blocks: reflow-refactor
Reporter | ||
Updated•14 years ago
|
Summary: [reflow branch] nsFirstLetterFrame: implement all 4 intrinsic width functions → [reflow branch] intrinsic widths computed incorrectly for ::first-letter
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?
Comment 9•6 years ago
|
||
I understand that it is a longstanding issue requiering fundamental core changes but can we hope a fix?
Comment 10•5 years ago
|
||
Another test case for this: https://test.chrislewis.codes/initial-letter/simple.html
I'm trying to fit text into a given space, and the mis-calculation of ::first-letter box width makes the text measurements very inaccurate.
Comment 11•5 years ago
|
||
I opened a PR on WPT with a reftest for this bug: https://github.com/web-platform-tests/wpt/pull/18882
Reporter | ||
Updated•3 years ago
|
Assignee: dbaron → nobody
Updated•2 years ago
|
Severity: normal → S3
Comment 17•2 years ago
|
||
The severity field for this bug is relatively low, S3. However, the bug has 10 duplicates.
:jfkthame, could you consider increasing the bug severity?
For more information, please visit auto_nag documentation.
Flags: needinfo?(jfkthame)
Comment 18•2 years ago
|
||
The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.
Flags: needinfo?(jfkthame)
You need to log in
before you can comment on or make changes to this bug.
Description
•