Closed
Bug 506250
Opened 15 years ago
Closed 14 years ago
nsTableFrame::ReflowChildren declares and sets kidNextInFlow too early
Categories
(Core :: Layout: Tables, enhancement)
Core
Layout: Tables
Tracking
()
RESOLVED
INVALID
People
(Reporter: timeless, Assigned: bernd_mozilla)
References
(Blocks 1 open bug, )
Details
(Keywords: coverity)
3017 nsIFrame* kidNextInFlow = kidFrame->GetNextInFlow(); 3084 if (NS_FRAME_IS_NOT_COMPLETE(aStatus)) { 3085 kidNextInFlow = kidFrame->GetNextInFlow(); 3086 if (!kidNextInFlow) { 3110 rowGroups.InsertElementAt(childX + 1, kidNextInFlow);
wrong code arises from bug 302911
Assignee: nobody → bernd_mozilla
probably the url changed now to http://mxr.mozilla.org/mozilla-central/source/layout/tables/nsTableFrame.cpp?mark=2909,2930#2906 however I fail to see what is wrong with the code. The indentation in of line 3110 in comment 0 is wrong. If there is no nextinflow the code below the if will try to create a nextinflow. if if fails the code at previously at line 3110 will no execute. So what is exactly the issue here?
2798 if (NS_FRAME_IS_NOT_COMPLETE(aStatus)) { 2799 kidNextInFlow = kidFrame->GetNextInFlow(); 2800 if (!kidNextInFlow) { 2801 // The child doesn't have a next-in-flow so create a continuing 2802 // frame. This hooks the child into the flow 2803 rv = presContext->PresShell()->FrameConstructor()-> 2804 CreateContinuingFrame(presContext, kidFrame, this, &kidNextInFlow); 2805 if (NS_FAILED(rv)) { 2806 aStatus = NS_FRAME_COMPLETE; 2807 break; 2808 } 2809 2810 // Insert the continuing frame into the sibling list. 2811 mFrames.InsertFrame(nsnull, kidFrame, kidNextInFlow); 2812 2813 // Fall through and update |rowGroups| with the new rowgroup, just as 2814 // it would have been if we had called OrderRowGroups again. 2815 // Note that rowGroups doesn't get used again after we PushChildren 2816 // below, anyway. 2817 } 2818 2819 // Put the nextinflow so that it will get pushed 2820 rowGroups.InsertElementAt(childX + 1, 2821 static_cast <nsTableRowGroupFrame*>(kidNextInFlow)); marking this is as invalid, please reopen if you still see a issue within the pasted code.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
Updated•6 years ago
|
Blocks: coverity-analysis
You need to log in
before you can comment on or make changes to this bug.
Description
•