Closed
Bug 407111
Opened 17 years ago
Closed 17 years ago
Text won't break before an image
Categories
(Core :: Layout: Block and Inline, defect, P2)
Tracking
()
VERIFIED
FIXED
People
(Reporter: roc, Assigned: roc)
Details
Attachments
(2 files)
285 bytes,
text/html
|
Details | |
10.52 KB,
patch
|
dbaron
:
review+
dbaron
:
superreview+
mtschrep
:
approvalM10+
mtschrep
:
approval1.9+
|
Details | Diff | Splinter Review |
The testcase should wrap to two lines, but it doesn't.
Assignee | ||
Updated•17 years ago
|
Flags: blocking1.9?
Comment 1•17 years ago
|
||
The <br> in the testcase doesn't seem to be necessary.
Seems like we ought to break before the second image, no? Isn't that the only possible break point in the line?
Assignee | ||
Comment 3•17 years ago
|
||
Yeah. I didn't mean the summary to imply that we should break directly before the <br>
Summary: Text won't break before a <br> → Text won't break before an image
Assignee | ||
Comment 4•17 years ago
|
||
Turns out the <br> is necessary, actually. I'm not sure what Jesse is seeing, maybe a build before 405577 was fixed. Somewhere recently I exposed a bug that's been around for at least a little while. When nsLineLayout places a frame that doesn't continue a textrun and is wrappable CSS white-space, it records a break opportunity. The problem is, it passes PR_TRUE for the aFits parameter, which is sometimes incorrect ... sometimes, such as in this testcase after the <br>, the break position after the frame is beyond the available width. Thus this "bad" break opportunity wipes out the "good" one that really did fit. The fix is to return in CanPlaceFrame whether the trailing edge of the frame fits in the available width, pass that for aFits. This also shows the "shouldn't be updating the break position after we've already flagged an overrun" assertion firing incorrectly. It's legitimate to get a NotifyOptionalBreakPosition call after we've detected an overrun, but aFits must be false.
Attachment #291856 -
Flags: superreview?(dbaron)
Attachment #291856 -
Flags: review?(dbaron)
Assignee | ||
Updated•17 years ago
|
Whiteboard: [needs review]
Comment 5•17 years ago
|
||
Block p2 since I'd hope we'd squash the layout/text changes before B3..
Flags: blocking1.9? → blocking1.9+
Priority: -- → P2
Assignee | ||
Comment 6•17 years ago
|
||
I don't think that's going to happen unfortunately.
Comment 7•17 years ago
|
||
(In reply to comment #6) > I don't think that's going to happen unfortunately. > I can dream right :-)? Please adjust if you think P2 is not right...
Comment on attachment 291856 [details] [diff] [review] fix r+sr=dbaron
Attachment #291856 -
Flags: superreview?(dbaron)
Attachment #291856 -
Flags: superreview+
Attachment #291856 -
Flags: review?(dbaron)
Attachment #291856 -
Flags: review+
Assignee | ||
Comment 9•17 years ago
|
||
I'm not sure if we should take this for beta2. David, what do you think?
Assignee | ||
Updated•17 years ago
|
Whiteboard: [needs review] → [needs landing]
I don't have strong feelings either way; you probably have a better handle on the bugs that have been filed.
Assignee | ||
Comment 11•17 years ago
|
||
Comment on attachment 291856 [details] [diff] [review] fix Let's do it. This is a tough call but I think the risk is low and I'm afraid that this bug could be common.
Attachment #291856 -
Flags: approvalM10?
Comment 12•17 years ago
|
||
Comment on attachment 291856 [details] [diff] [review] fix k - if you think it's good let's do it roc
Attachment #291856 -
Flags: approvalM10?
Attachment #291856 -
Flags: approvalM10+
Attachment #291856 -
Flags: approval1.9+
Assignee | ||
Comment 13•17 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 17 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [needs landing]
Comment 14•16 years ago
|
||
verified fixed using the testcase from roc and Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9pre) Gecko/2008050621 Firefox/3.0pre
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•