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

RESOLVED FIXED in mozilla1.7alpha

Status

()

Core
Layout: Block and Inline
P2
normal
RESOLVED FIXED
14 years ago
14 years ago

People

(Reporter: bz, Assigned: bz)

Tracking

Trunk
mozilla1.7alpha
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

14 years ago
Testcase coming up.  The problem is that the text frames get rendered if there
is a placeholder after them.
(Assignee)

Comment 1

14 years ago
Created attachment 140894 [details]
Testcase
(Assignee)

Comment 2

14 years ago
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
(Assignee)

Comment 5

14 years ago
Created attachment 140899 [details] [diff] [review]
Or we could do this...
(Assignee)

Comment 6

14 years ago
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)

Updated

14 years ago
Assignee: nobody → bzbarsky
Priority: -- → P2
Target Milestone: --- → mozilla1.7alpha
(Assignee)

Comment 8

14 years ago
Fixed.
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.