Created attachment 584562 [details]
If there is a newline in a list before a block element it gets stripped off.
What to do:
No change in display, newline should not be shown.
Newline is shown in rendered page.
May be relate to Bug 697793 and Bug 690164
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b8pre) Gecko/20101104 Firefox/4.0b8pre ID:20101104134944
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b8pre) Gecko/20101104 Firefox/4.0b8pre ID:20101104165457
ed0befc22bb7 Ehsan Akhgari — Bug 389321 - Part 3: Use a centralized algorithm for caret positioning; r=roc a=blocking-betaN+
So presumably the only reason the newline doesn't show up the first time is due to the frame-construction-time whitespace frame suppression?
My guess (untested) would be that this is another regression from bug 389321, and likely a duplicate of one of the existing regressions from it.
> My guess (untested) would be that this is another regression from bug 389321,
Comment 1 says so too, based on a bisect.
This seems to be the code responsible for this bug: http://hg.mozilla.org/mozilla-central/rev/ed0befc22bb7#l15.12
(In reply to Boris Zbarsky (:bz) from comment #2)
> So presumably the only reason the newline doesn't show up the first time is
> due to the frame-construction-time whitespace frame suppression?
I think this is the reason, since the code in question doesn't get run the first time that the document is reflown. Can you please point me to the code responsible for the whitespace frame suppression? Why don't we do the same thing on the future reflows?
It's an optimization that happens at frame construction time. When you assign to the node data, we undo the optimization ... it's simpler than trying to keep it optimized through dynamic changes.
Do we undo the optimization only for the textframe that changed? Note that in this case, the textframe before the <p> element (containing a "\n") triggers this bug.
(In reply to Ehsan Akhgari [:ehsan] from comment #8)
> Do we undo the optimization only for the textframe that changed?
Yes. The optimization really has nothing to do with this though.
Created attachment 584875 [details]
Here's a testcase where the empty-textframe optimization never kicks in (because the whitespace-only text node between the <li> and <p> is not adjacent to a block element boundary), which shows the bug.
Created attachment 584982 [details] [diff] [review]
Oh, I figured out the problem. This change had snuck its way into the patch for bug 389321. It's not needed, and reverting it fixes this bug.
*** Bug 697793 has been marked as a duplicate of this bug. ***
Try run for 33568bb15cbb is complete.
Detailed breakdown of the results available here:
Results (out of 222 total builds):
Builds (or logs if builds failed) available at:
Timed out after 06 hours without completing.
*** Bug 719360 has been marked as a duplicate of this bug. ***
*** Bug 735554 has been marked as a duplicate of this bug. ***