Closed Bug 42495 Opened 24 years ago Closed 2 years ago

image + " " don't respect table cell borders

Categories

(Core :: Layout: Tables, defect, P3)

x86
All
defect

Tracking

()

RESOLVED INCOMPLETE
Future

People

(Reporter: alex, Unassigned)

References

()

Details

(Keywords: testcase)

Attachments

(2 files)

From Bugzilla Helper:
User-Agent: Mozilla/4.73 [de]C-CCK-MCD DT  (Win98; U)
BuildID:    20000608020

On the specified page in section "Ausstellungen", there is a list of cities and 
a leading little graphic element before each word; the city name and the graphic 
are concatenated by " " codes to insert unbreakable spaces. Mozilla does 
not insert line breaks before the last element that _fits_ into the line, but 
before the element which _exceeds_ the cell border. Thus, Mozilla writes over 
the fixed-width cell in every line (but the last one).

Reproducible: Always
Steps to Reproduce:
See "Description"

Actual Results:  Wrong page layout -> fixed table cells are not respected by 
expressions containing " " codes.

Expected Results:  Respect the cell border...
Attached file testcase
Confirming the bug, Changing component,assigning to karnaze, this is table bug.
Adding testcase keyword, renaming the bug. The bug goes away if the image tag is
removed. Bug 22273 is similar but not identical, since here is no strong tag.
Status: UNCONFIRMED → NEW
Component: Layout → HTMLTables
Ever confirmed: true
Keywords: testcase
Summary: expressions concatenated by " " don't respect table cell borders → image + " " don't respect table cell borders
As I commented before reassigning to karnaze.
Assignee: clayton → karnaze
Buster, in the attachment, the cell's block contains a line wider than the block 
(which can be seen by dumping frames).
Assignee: karnaze → buster
P2 layout correctness problem
Status: NEW → ASSIGNED
Priority: P3 → P2
Target Milestone: --- → M19
Here's the problem:
In nsLineLayout::CanPlaceFrame(), we determine if an inline frame can fit on a 
line or not.
In the attached test case, we are laying out into a 900 twip wide table cell.  
The frames we see are:
  1. Text frame, width 705 twips, total width 705 twips, fits on one line
  2. Image frame, width 105 twips, total width 810 twips, still fits
  3. Text frame, width 504 twips, total width 1314 twips, shouldn't fit
But there is a special case in nsLineLayout::CanPlaceFrame() 
  if (pfd->GetFlag(PFD_ISNONEMPTYTEXTFRAME) && GetFlag(LL_TEXTSTARTSWITHNBSP)) {
    return PR_TRUE;
This is saying that if the first character of the text run is an   then we 
consider it part of the previous "word unit", and we force it to fit.  However, 
there is no mechanism that goes back and re-measures the combined width of the 
resulting "word unit" to verify that it still fits, and to push it to the next 
line if it doesn't.
This would take 1-2 days to fix.
Marking "future."  This is a perfectly valid but rare case.  Tthere is some risk
to fix this since it is core line layout code.  This won't make netscape 6 rtm.
Target Milestone: M19 → Future
FWIW, the weird rendering goes away when the page is redrawn.
OS: Windows 98 → All
Build reassigning Buster's bugs to Marc.
Assignee: buster → attinasi
Status: ASSIGNED → NEW
I have this problem too, and the fact that it doesn't trigger the overflow
handling makes it particularly bad. Here we see that it results in overlapping
images where none should exist.
This should be All/All, not PC/All.
attinasi will probably not work on those bugs :-(
Assignee: attinasi → table
QA Contact: petersen → madhur
Target Milestone: Future → ---
Target Milestone: --- → Future
*** Bug 113297 has been marked as a duplicate of this bug. ***
Assignee: layout.tables → nobody
QA Contact: madhur → layout.tables
Moving to p3 because no activity for at least 1 year(s).
See https://github.com/mozilla/bug-handling/blob/master/policy/triage-bugzilla.md#how-do-you-triage for more information
Priority: P2 → P3

Page no longer active

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: