Closed Bug 407078 Opened 16 years ago Closed 16 years ago

Unwanted blank lines on news.bbc.co.uk when text line is as wide as its container

Categories

(Core :: Layout, defect, P3)

x86
Windows 2000
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: stevee, Assigned: roc)

References

Details

(Keywords: regression, testcase)

Attachments

(3 files)

Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9b2pre) Gecko/2007120319 Minefield/3.0b2pre ID:2007120319

1. New profile, start firefox
2. Go to http://news.bbc.co.uk/
3. Observe the text under "Other Top Stories" on the left hand side

If any of the stories' titles are as wide enough to stop at the edge of the webpage, then an unwanted blank line appears underneath.

No problem with: 20071203_0014_firefox-3.0b2pre.en-US.win32
Problems with: 20071203_0030_firefox-3.0b2pre.en-US.win32

Checkins to module PhoenixTinderbox between 2007-12-03 00:14 and 2007-12-03 00:29 : 
http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&date=explicit&mindate=1196669640&maxdate=1196670599

Due to bug 403426.

This bug description is really crappy, so please feel free to rewrite it. Also, a testcase would be a help ;-)
Flags: blocking1.9?
Maybe fixed by bug 405577. I can't see the bug in a regular build on Mac, but then the testcase is pretty fragile.
I can see the bug on Mac/10.4.11 if I zoom in (using Camino trunk: that is *text* zoom).
Flags: blocking1.9? → blocking1.9+
Priority: -- → P3
(In reply to comment #2)
> Maybe fixed by bug 405577. I can't see the bug in a regular build on Mac, but
> then the testcase is pretty fragile.

Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9b2pre) Gecko/2007120602 Minefield/3.0b2pre

I still see this problem, even after the landing of bug 405577.
Attached file testcase
Keywords: qawantedtestcase
I think here we're breaking before the <br> because it looks like any other non-text element.
Attached patch fixSplinter Review
Yeah, the problem is that we're breaking just before the <BR> which we should never do.

The patch here is very simple. We just suppress the trailing break from the nsLineBreaker when we're stopping because of a <BR>.
Assignee: nobody → roc
Status: NEW → ASSIGNED
Attachment #291953 - Flags: review?(smontagu)
Whiteboard: [needs review]
Attachment #291953 - Flags: review?(smontagu) → review+
I think we probably don't need to take this for beta2, but the patch is pretty safe so I could be convinced otherwise if it shows on the radar.
Whiteboard: [needs review] → [needs landing]
checked in
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [needs landing]
You need to log in before you can comment on or make changes to this bug.