Closed
Bug 411059
Opened 17 years ago
Closed 16 years ago
Tab character in table cell with white-space:pre leads to table border overlapping text
Categories
(Core :: Graphics, defect, P3)
Core
Graphics
Tracking
()
RESOLVED
FIXED
People
(Reporter: jruderman, Assigned: roc)
References
Details
(Keywords: regression, testcase)
Attachments
(2 files)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
smontagu
:
review+
dveditz
:
approval1.9.0.4-
|
Details | Diff | Splinter Review |
A tab character in a table cell can trigger:
WARNING: Tabs encountered in a situation where we don't support tabbing: file /Users/jruderman/trunk/mozilla/layout/generic/nsTextFrameThebes.cpp, line 2293
Also, the border of the table overlaps the table cell, so the table seems to be confused about how long the text is. In bug 375058, Bernd said he thought this wasn't a table bug.
Assignee | ||
Comment 1•17 years ago
|
||
It's hard to determine the preferred or minimum width of text containing a preformatted tab, because the width of the tab depends on where the tab occurs in the line and thus on where line breaks have been placed. This testcase might be fixable but there are more general testcases that aren't. Any thoughts David?
Comment 2•17 years ago
|
||
I think, just like everything else, we should assume that we take all optional breaks for GetMinWidth, and don't take any optional breaks for GetPrefWidth. I'm having trouble thinking of what that wouldn't be sufficient for.
Assignee | ||
Comment 3•17 years ago
|
||
I guess you're right, if we use the current width in the InlineData as the x position to figure out where the next tab stop is, we should be OK. Inserting a break before a tab can never make the content wider, and removing a break before a tab can never make the content narrower.
Comment 7•16 years ago
|
||
This used to work in Firefox 2, so marking as regression.
Comment 8•16 years ago
|
||
here's a somewhat more general test case, with tabs at various points within a line: http://www.cs.cmu.edu/~dkindred/tmp/ff3-width-bug.html
Assignee | ||
Updated•16 years ago
|
Flags: wanted1.9.1?
Flags: wanted1.9.1? → wanted1.9.1+
Priority: -- → P3
Assignee | ||
Updated•16 years ago
|
Assignee: nobody → roc
Assignee | ||
Comment 9•16 years ago
|
||
Adding dependency on bug 230555 since the patch there treads on AddInline(Min/Pref)WidthForFlow which I need to change here.
Depends on: 230555
Assignee | ||
Comment 11•16 years ago
|
||
Includes a reftest partially based on dkindred's testcase.
Attachment #333892 -
Flags: review?(smontagu)
Comment 12•16 years ago
|
||
Comment on attachment 333892 [details] [diff] [review]
fix
> PRBool collapseWhitespace = !textStyle->WhiteSpaceIsSignificant();
> PRBool preformatNewlines = textStyle->NewlineIsSignificant();
>+ PRBool preformatTabs = textStyle->WhiteSpaceIsSignificant();
The extra boolean which is just equivalent to !collapseWhitespace seems redundant to me, but OK if you think it's worth it for clarity.
Attachment #333892 -
Flags: review?(smontagu) → review+
Assignee | ||
Comment 13•16 years ago
|
||
Pushed c4b0381a259b. I think the extra boolean helps clarity significantly.
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Assignee | ||
Comment 16•16 years ago
|
||
Comment on attachment 333892 [details] [diff] [review]
fix
Pretty bad regression in 1.9, no regressions noted on trunk so far, so we might want to take on 1.9.0.x.
Attachment #333892 -
Flags: approval1.9.0.3?
Comment 18•16 years ago
|
||
Comment on attachment 333892 [details] [diff] [review]
fix
Looks ugly, but I think we have to minus for the branch. Appeal to mconnor directly if you disagree.
Attachment #333892 -
Flags: approval1.9.0.4? → approval1.9.0.4-
You need to log in
before you can comment on or make changes to this bug.
Description
•