Closed
Bug 154741
Opened 23 years ago
Closed 23 years ago
Multiple line text isn't displayed if it's in an inline element with an floating image
Categories
(Core :: Layout, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla1.0.1
People
(Reporter: kazhik, Assigned: karnaze)
Details
(Keywords: dataloss, regression, Whiteboard: [PATCH])
Attachments
(2 files)
261 bytes,
text/html
|
Details | |
2.31 KB,
patch
|
alexsavulov
:
review+
kinmoz
:
superreview+
asa
:
approval+
|
Details | Diff | Splinter Review |
if there are an floating image and multiple line text in an inline element,
and the height of the image is smaller than that of the text,
the text in the second line and after isn't displayed.
<span>
<img>Line1<br>Line2
</span>
Reporter | ||
Comment 1•23 years ago
|
||
Dump Frames is showing that the text frame for the second line has an empty
string inside it. It doesn't seem like something of this type would be messed
up during frame construction, particularly since it depends on the size of the
float, so it seems like the problem has something to do with the code that's
breaking lines during reflow.
Severity: normal → major
The br and "Line 2" frames never get reflowed.
While reflowing the "Line 1" text frame, nsTextFrame::Reflow() sets the
NS_FRAME_TRUNCATED bit in the passed in aStatus, which triggers the following
code in nsInlineFrame::ReflowFrames() which bails without reflowing any frames
after the "Line 1" text frame:
528 karnaze 3.179 if (NS_FRAME_COMPLETE != aStatus) {
529 kipp 3.121 if (!reflowingFirstLetter || NS_INLINE_IS_BREAK(aStatus)) {
530 done = PR_TRUE;
531 break;
532 }
533 }
I verified that jumping over this code in the debugger allows everything to
reflow and render.
In case anyone is wondering, here are the aReflowState and aMetrics fields that
are causing the NS_FRAME_TRUNCATED bits to be set in nsTextFrame::Reflow():
aReflowState.mFlags.mIsTopOfPage == PR_FALSE
aReflowState.availableHeight == 120
aMetrics.height == 285
If I modify the html file so that it uses a non-floated image, or no image at
all, aReflowState.availableHeight is unconstrained.
According to cvs blame the NS_FRAME_SET_TRUNCATION() macro call in
nsTextFrame::Reflow() was added when the fix for floater splitting was checked
in on the TRUNK back in May:
5485 karnaze 1.369 NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aMetrics);
This bug doesn't exist on the MOZILLA_1_0_BRANCH.
Keywords: regression
Assignee | ||
Comment 6•23 years ago
|
||
taking the bug.
Assignee: attinasi → karnaze
Priority: -- → P2
Target Milestone: --- → mozilla1.0.1
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Whiteboard: [PATCH]
Assignee | ||
Comment 7•23 years ago
|
||
The patch uses reflow status macros instead of checking against
NS_FRAME_COMPLETE. The patch in bug 145305 made a feeble attempt at this, since
it added a new bit to check for truncation in the reflow status.
Comment 8•23 years ago
|
||
Comment on attachment 90688 [details] [diff] [review]
patch to use reflow status macros rather than NS_FRAME_COMPLETE
r= alexsavulov
Attachment #90688 -
Flags: review+
Comment on attachment 90688 [details] [diff] [review]
patch to use reflow status macros rather than NS_FRAME_COMPLETE
sr=kin@netscape.com
Attachment #90688 -
Flags: superreview+
Assignee | ||
Updated•23 years ago
|
Comment 10•23 years ago
|
||
Comment on attachment 90688 [details] [diff] [review]
patch to use reflow status macros rather than NS_FRAME_COMPLETE
a=asa (on behalf of drivers) for checkin to the 1.1 trunk.
Attachment #90688 -
Flags: approval+
Assignee | ||
Comment 11•23 years ago
|
||
the patch is in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•