Closed Bug 187899 Opened 22 years ago Closed 21 years ago

table cells overlap if wrapped before " "

Categories

(Core :: Layout: Block and Inline, defect, P3)

defect

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: kazhik, Assigned: dbaron)

References

Details

(Whiteboard: [patch][line-breaking])

Attachments

(2 files, 2 obsolete files)

table cells overlap if wrapped before " ". Testcase: http://bugzilla.mozilla.gr.jp/attachment.cgi?id=1432 The first "1234567890" and the second in the first line overlaps if you resize the navigator window to the extent that the second line is wrapped. Saito-san has a patch. Original report in Bugzilla-jp: http://bugzilla.mozilla.gr.jp/show_bug.cgi?id=2888
tables
Assignee: other → table
Component: Layout → Layout: Tables
QA Contact: ian → amar
Attached patch patch (obsolete) (deleted) — Splinter Review
The error is caused in order to make the nbsp entity following the element which finishes with a space or a CJK character into the first thing in the section of text. (ex. <a>abc </a>&nbsp;xyz)
-> jkeiser
Assignee: table → jkeiser
Priority: -- → P3
Whiteboard: [patch]
Target Milestone: --- → Future
Attached file testcase (deleted) —
The following patch is able to break a line. --- ./layout/html/base/src/nsLineLayout.cpp.org Thu May 15 13:41:42 2003 +++ ./layout/html/base/src/nsLineLayout.cpp Thu Sep 4 01:11:52 2003 @@ -1567,7 +1567,8 @@ // edge...Which means that whatever piece of text we just formatted // will be the piece that fits (the text frame logic knows to stop // when it runs out of room). - if (pfd->GetFlag(PFD_ISNONEMPTYTEXTFRAME) && GetFlag(LL_TEXTSTARTSWITHNBSP)) { + if (psd->mLeftEdge == psd->mX && + pfd->GetFlag(PFD_ISNONEMPTYTEXTFRAME) && GetFlag(LL_TEXTSTARTSWITHNBSP)) { return PR_TRUE; } For a line of test case, Fig.1 shows the effect of the patch. However, Fig.2 shows that a line overlaps with a image. It seems that this condition of Fig.2 relates to Bug 186593. Is this behavior a bug? Fig.1 +--------------------------------- |aaaaaaaaaa | Here is a image. | bcdefghijklmnopqrstuvwxyz | | | | +----- Fig.2 +--------------------------------- |aaaaaaaaaa | Here is a image. | bcdefghijklmnopqrstuvwxyz | | | +----- Fig.3 Current condition +--------------------------------- |aaaaaaaaaa bcdefghijklmnopqrstuvwxyz | | Here is a image. | | |
Attached patch patch (obsolete) (deleted) — Splinter Review
Attachment #110852 - Attachment is obsolete: true
dbaron, rbs, Do you have any comment for commnet #4?
OS: Linux → All
Hardware: PC → All
The real problem here is that the &nbsp; stuff should be in the line-breaking code rather than having us override the line-breaking code's result in nsLineLayout. The patch in comment 4 is undoing what this code is intended to do, which is to support nbsp correctly. If you're going to do that, you should remove the whole LL_TEXTSTARTSWITHNBSP flag, which is what should really happen anyway, although perhaps it should wait for correct line-breaking code.
Component: Layout: Tables → Layout: Block & Inline
Whiteboard: [patch] → [patch][line-breaking]
I think the whole starts-with-nbsp thing is broken anyway, since it's only working when the nbsp is the first character in the text frame in question. We should probably just remove it and fix it later when we fix the line-breaking code.
*** Bug 218928 has been marked as a duplicate of this bug. ***
Blocks: 139152
*** Bug 198114 has been marked as a duplicate of this bug. ***
Attached patch remove broken logic (deleted) — Splinter Review
I propose removing the whole business, since: * it really belongs in the line breaking code * there's not much point doing it correctly in only one obscure case
Attachment #130843 - Attachment is obsolete: true
Taking bug.
Assignee: john → dbaron
Attachment #132154 - Flags: superreview?(roc)
Attachment #132154 - Flags: review?(roc)
Attachment #132154 - Flags: superreview?(roc)
Attachment #132154 - Flags: superreview+
Attachment #132154 - Flags: review?(roc)
Attachment #132154 - Flags: review+
Fix checked in to trunk, 2003-09-28 15:56 -0700.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: