зеркало из https://github.com/mozilla/gecko-dev.git
Fixed SetInitialChildList() so "frame" doesn't get reset after processing
the legend frame
This commit is contained in:
Родитель
99eee28edb
Коммит
60863f9b77
|
@ -143,7 +143,7 @@ nsFieldSetFrame::SetInitialChildList(nsIPresContext& aPresContext,
|
||||||
// Set the geometric and content parent for each of the child frames.
|
// Set the geometric and content parent for each of the child frames.
|
||||||
// The legend is handled differently and removed from aChildList
|
// The legend is handled differently and removed from aChildList
|
||||||
nsIFrame* lastFrame = nsnull;
|
nsIFrame* lastFrame = nsnull;
|
||||||
for (nsIFrame* frame = aChildList; nsnull != frame; frame->GetNextSibling(frame)) {
|
for (nsIFrame* frame = aChildList; nsnull != frame;) {
|
||||||
nsIFrame* legendFrame = nsnull;
|
nsIFrame* legendFrame = nsnull;
|
||||||
nsresult result = frame->QueryInterface(kLegendFrameCID, (void**)&legendFrame);
|
nsresult result = frame->QueryInterface(kLegendFrameCID, (void**)&legendFrame);
|
||||||
if ((NS_OK == result) && legendFrame) {
|
if ((NS_OK == result) && legendFrame) {
|
||||||
|
@ -159,9 +159,11 @@ nsFieldSetFrame::SetInitialChildList(nsIPresContext& aPresContext,
|
||||||
mFirstChild->SetNextSibling(frame);
|
mFirstChild->SetNextSibling(frame);
|
||||||
mLegendFrame = frame;
|
mLegendFrame = frame;
|
||||||
mLegendFrame->SetNextSibling(nsnull);
|
mLegendFrame->SetNextSibling(nsnull);
|
||||||
|
frame = nextFrame;
|
||||||
} else {
|
} else {
|
||||||
frame->SetGeometricParent(mFirstChild);
|
frame->SetGeometricParent(mFirstChild);
|
||||||
frame->SetContentParent(mFirstChild);
|
frame->SetContentParent(mFirstChild);
|
||||||
|
frame->GetNextSibling(frame);
|
||||||
}
|
}
|
||||||
lastFrame = frame;
|
lastFrame = frame;
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,7 +143,7 @@ nsFieldSetFrame::SetInitialChildList(nsIPresContext& aPresContext,
|
||||||
// Set the geometric and content parent for each of the child frames.
|
// Set the geometric and content parent for each of the child frames.
|
||||||
// The legend is handled differently and removed from aChildList
|
// The legend is handled differently and removed from aChildList
|
||||||
nsIFrame* lastFrame = nsnull;
|
nsIFrame* lastFrame = nsnull;
|
||||||
for (nsIFrame* frame = aChildList; nsnull != frame; frame->GetNextSibling(frame)) {
|
for (nsIFrame* frame = aChildList; nsnull != frame;) {
|
||||||
nsIFrame* legendFrame = nsnull;
|
nsIFrame* legendFrame = nsnull;
|
||||||
nsresult result = frame->QueryInterface(kLegendFrameCID, (void**)&legendFrame);
|
nsresult result = frame->QueryInterface(kLegendFrameCID, (void**)&legendFrame);
|
||||||
if ((NS_OK == result) && legendFrame) {
|
if ((NS_OK == result) && legendFrame) {
|
||||||
|
@ -159,9 +159,11 @@ nsFieldSetFrame::SetInitialChildList(nsIPresContext& aPresContext,
|
||||||
mFirstChild->SetNextSibling(frame);
|
mFirstChild->SetNextSibling(frame);
|
||||||
mLegendFrame = frame;
|
mLegendFrame = frame;
|
||||||
mLegendFrame->SetNextSibling(nsnull);
|
mLegendFrame->SetNextSibling(nsnull);
|
||||||
|
frame = nextFrame;
|
||||||
} else {
|
} else {
|
||||||
frame->SetGeometricParent(mFirstChild);
|
frame->SetGeometricParent(mFirstChild);
|
||||||
frame->SetContentParent(mFirstChild);
|
frame->SetContentParent(mFirstChild);
|
||||||
|
frame->GetNextSibling(frame);
|
||||||
}
|
}
|
||||||
lastFrame = frame;
|
lastFrame = frame;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче