Closed Bug 233451 Opened 21 years ago Closed 21 years ago

white-space at end of line doesn't collapse when followed by out-of-flow element

Categories

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

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla1.7alpha

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

Attachments

(2 files)

Testcase coming up.  The problem is that the text frames get rendered if there
is a placeholder after them.
Attached file Testcase
Happens in standards mode too.

Ian, is that the right behavior?
This is a whitespace collapsing bug.  If you remove the whitespace before the
out-of-flow element, the bug goes away.
It's probably worth starting with the loop in
nsLineLayout::TrimTrailingWhiteSpaceIn, but fixing this probably requires
returning additional status from nsIFrame::TrimTrailingWhiteSpace.
Summary: Placeholders affect shrink-wrap width of blocks → white-space at end of line doesn't collapse when followed by out-of-flow element
Comment on attachment 140899 [details] [diff] [review]
Or we could do this...

I suppose we could also use return values from nsIFrame::TrimTrailingWhiteSpace
and override it in textframes and placeholder frames to return "continue" or
something, but this seems simpler given how this code currently works.
Attachment #140899 - Flags: superreview?(dbaron)
Attachment #140899 - Flags: review?(dbaron)
Oh, right.  I guess we already solve elsewhere the problem of collapsing
whitespace between text frames across placeholders, so PFD_NONEMPTYTEXTFRAME
won't be set -- I was thinking it would be.
Attachment #140899 - Flags: superreview?(dbaron)
Attachment #140899 - Flags: superreview+
Attachment #140899 - Flags: review?(dbaron)
Attachment #140899 - Flags: review+
Assignee: nobody → bzbarsky
Priority: -- → P2
Target Milestone: --- → mozilla1.7alpha
Fixed.
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

Created:
Updated:
Size: