mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Fixed SetInitialChildList() so "frame" doesn't get reset after processing
the legend frame
This commit is contained in:
parent
99eee28edb
commit
60863f9b77
@ -143,7 +143,7 @@ nsFieldSetFrame::SetInitialChildList(nsIPresContext& aPresContext,
|
||||
// Set the geometric and content parent for each of the child frames.
|
||||
// The legend is handled differently and removed from aChildList
|
||||
nsIFrame* lastFrame = nsnull;
|
||||
for (nsIFrame* frame = aChildList; nsnull != frame; frame->GetNextSibling(frame)) {
|
||||
for (nsIFrame* frame = aChildList; nsnull != frame;) {
|
||||
nsIFrame* legendFrame = nsnull;
|
||||
nsresult result = frame->QueryInterface(kLegendFrameCID, (void**)&legendFrame);
|
||||
if ((NS_OK == result) && legendFrame) {
|
||||
@ -159,9 +159,11 @@ nsFieldSetFrame::SetInitialChildList(nsIPresContext& aPresContext,
|
||||
mFirstChild->SetNextSibling(frame);
|
||||
mLegendFrame = frame;
|
||||
mLegendFrame->SetNextSibling(nsnull);
|
||||
frame = nextFrame;
|
||||
} else {
|
||||
frame->SetGeometricParent(mFirstChild);
|
||||
frame->SetContentParent(mFirstChild);
|
||||
frame->GetNextSibling(frame);
|
||||
}
|
||||
lastFrame = frame;
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ nsFieldSetFrame::SetInitialChildList(nsIPresContext& aPresContext,
|
||||
// Set the geometric and content parent for each of the child frames.
|
||||
// The legend is handled differently and removed from aChildList
|
||||
nsIFrame* lastFrame = nsnull;
|
||||
for (nsIFrame* frame = aChildList; nsnull != frame; frame->GetNextSibling(frame)) {
|
||||
for (nsIFrame* frame = aChildList; nsnull != frame;) {
|
||||
nsIFrame* legendFrame = nsnull;
|
||||
nsresult result = frame->QueryInterface(kLegendFrameCID, (void**)&legendFrame);
|
||||
if ((NS_OK == result) && legendFrame) {
|
||||
@ -159,9 +159,11 @@ nsFieldSetFrame::SetInitialChildList(nsIPresContext& aPresContext,
|
||||
mFirstChild->SetNextSibling(frame);
|
||||
mLegendFrame = frame;
|
||||
mLegendFrame->SetNextSibling(nsnull);
|
||||
frame = nextFrame;
|
||||
} else {
|
||||
frame->SetGeometricParent(mFirstChild);
|
||||
frame->SetContentParent(mFirstChild);
|
||||
frame->GetNextSibling(frame);
|
||||
}
|
||||
lastFrame = frame;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user