Open
Bug 298579
Opened 20 years ago
Updated 2 years ago
inline boxes with negative width (e.g. from negative letter-spacing/word-spacing) are treated as width zero
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
NEW
People
(Reporter: ian, Unassigned)
References
()
Details
(Keywords: helpwanted, testcase)
Attachments
(3 files)
STEPS TO REPRODUCE 1. Make letter-spacing be very negative. ACTUAL RESULTS Text disappears. EXPECTED RESULT Text renders, but backwards. TESTCASE http://bugzilla.opendarwin.org/attachment.cgi?id=2580 This bug derived from webkit bug number 3676. http://bugzilla.opendarwin.org/show_bug.cgi?id=3676
Comment 1•20 years ago
|
||
Bug also occurs with negative 'word-spacing'
Updated•20 years ago
|
Keywords: testcase
Summary: large negative letter-spacing makes text disappear → large negative letter-spacing/word-spacing makes text disappear
Comment 2•20 years ago
|
||
I'm a bit curious what the correct rendering would be - does this screenshot look correct to you?
| Reporter | ||
Comment 3•20 years ago
|
||
Yeah, that seems roughly correct.
| Reporter | ||
Comment 4•20 years ago
|
||
dbaron: Do you agree this bug is valid?
Comment 5•19 years ago
|
||
Fixing this would break MIR image replacement. http://www.stuffandnonsense.co.uk/archives/mir_image_replacement.html
Comment 6•19 years ago
|
||
Sorry, just read the webkit bug linked in the original report - ignore me.
Comment 7•19 years ago
|
||
Ian, can we add some tests for this to the CSS2.1 test suite just to make sure this edge case is done interoperably?
Keywords: helpwanted
Comment 8•19 years ago
|
||
This testcase triggers an assertion (see bug 334107) : ###!!! ASSERTION: bad width: 'metrics.width>=0', file /Users/admin/trunk/mozilla/layout/generic/nsLineLayout.cpp, line 1069
Comment 9•19 years ago
|
||
We should really fix this, imo. Esp. if us not fixing it is cause for Safari to start breaking the spec...
Flags: blocking1.9a2?
We should fix it, but it might be very hard because we don't really support negative-width frames. Maybe we can do it by getting the right overflow area and then finding a way to get a negative X-advance reported to nsLineLayout.
Comment 11•19 years ago
|
||
Yeah, that's what I was more or less thinking...
Updated•18 years ago
|
Flags: blocking1.9a2? → blocking1.9-
Whiteboard: [wanted-1.9]
Comment 12•17 years ago
|
||
http://bugzilla.opendarwin.org/ seems to have moved to http://bugs.webkit.org so the links in comment 0 are now: Testcase: http://bugs.webkit.org/attachment.cgi?id=2580 Webkit bug: http://bugs.webkit.org/show_bug.cgi?id=3676
Comment 13•17 years ago
|
||
The current layout is very close to that of Safari 3.0.4, so the layout is much improved compared to Firefox 2. We still set the box height to zero in some cases though. I don't see the assertion in comment 8 on either testcase.
Severity: normal → minor
Updated•17 years ago
|
Flags: wanted1.9+
Whiteboard: [wanted-1.9]
Flags: wanted1.9-
Flags: wanted1.9+
Flags: wanted-next+
Comment 14•17 years ago
|
||
I have a simpler test case for this bug. There are two lines, which should be rendered nearly identically (the inter-glyph spacing may not be exactly the same). Instead, the top line is rendered with groups of three numbers painted on top of each other. This highlights what's actually going wrong here: when an inline box (== layout frame, probably) has negative width, the next box is placed as if the negative-width box had had width zero. I think this is what roc is getting at in comment 10 when he says "we don't really support negative-width frames."
Updated•17 years ago
|
Summary: large negative letter-spacing/word-spacing makes text disappear → inline boxes with negative width (e.g. from negative letter-spacing/word-spacing) are treated as width zero
Comment 15•11 years ago
|
||
I am interested to work on this bug and I would I like to know more details about this bug. I would also like to know where I should get started.
Updated•2 years ago
|
Severity: minor → S4
You need to log in
before you can comment on or make changes to this bug.
Description
•