Testcase coming up. The problem is that the text frames get rendered if there is a placeholder after them.
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.
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.
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.
13 years ago