Closed
Bug 719287
Opened 12 years ago
Closed 11 years ago
font metrics of ::first-line erroneously used to calculate intrinsic width of entire element
Categories
(Core :: Layout: Block and Inline, defect)
Core
Layout: Block and Inline
Tracking
()
RESOLVED
DUPLICATE
of bug 860666
People
(Reporter: eclipsechasers2, Unassigned)
Details
Attachments
(1 file)
1.61 KB,
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1 Build ID: 20111220165912 Steps to reproduce: Browse the attached file, which shows some different colors in a table as foreground color on a black background, and background color with black foreground. In both cases, the same text is displayed twice in the table cell, one with normal weight, and once with bold (with a break tag between them). (For convenience, I have uploaded the attachment to http://www.dayenu.com/interesting/fftdfmt.html.) Actual results: The width of the table cells is set to the width for "LightGoldenrodYellow" in normal font weight. This means that the bold line exceeds the width of the table cell, and is truncated in one case, and extends beyond the bounds of the table in another. It does this no matter how different weights are applied (e.g. I use css :first-child in the attached file, but see the same result when using explicit html <b> tags instead). If both lines are displayed in bold, the table width is set correctly. Expected results: The width of the cell should be set to the width for "LightGoldenrodYellow" in bold font weight (so that no data should be truncated or extend beyond the table boundary). It happens this way in Opera, Safari, Chrome, all releases IE5.5-10, and even Netscape 4.
Comment 1•12 years ago
|
||
Maybe Duplication Bug 385615
Reporter | ||
Comment 2•12 years ago
|
||
(In reply to Alice0775 White from comment #1) > Maybe Duplication Bug 385615 Correcting a misstatement - the problem seems to happen only in conjunction with use of css first-line, not with explicit html tags. So, yes, it may well be a duplicate of the first-letter problem identified in the previous comment. Looking at that problem and its duplicates, some report "zoom in then zoom out" as a workaround for the problem, and that workaround is indeed effective in this case.
Comment 3•11 years ago
|
||
Owen, are you still seeing this problem in the current Firefox release? I'm looking at your testcase and the text doesn't look like it's going outside of the table boundaries. Thanks!
Component: Untriaged → Layout: Text
Flags: needinfo?(eclipsechasers2)
Product: Firefox → Core
Updated•11 years ago
|
Attachment #589707 -
Attachment mime type: text/plain → text/html
Comment 4•11 years ago
|
||
I can still reproduce the problem with newly created clean profile in latest Nightly26.0a1. http://hg.mozilla.org/mozilla-central/rev/1ed5a88cd4d0 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0 ID:20130816030205
Status: UNCONFIRMED → NEW
Component: Layout: Text → Layout: Block and Inline
Ever confirmed: true
Flags: needinfo?(eclipsechasers2)
OS: Windows 7 → All
Hardware: x86_64 → All
Summary: TD Too Narrow With Normal Text on One Line and Bold on Another → font metrics of ::first-line erroneously used to calculate intrinsic width of entire element
Version: 9 Branch → Trunk
Actually, despite being older, I'm going to dupe forward since the other bug has more analysis.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 6•11 years ago
|
||
In respone to Liz Henry's message above, I tried my testcase on both Windows 7 Pro 64-bit and Ubuntu 12.04 LTS 64-bit. It still appears to render incorrectly in both environments.
You need to log in
before you can comment on or make changes to this bug.
Description
•