CheckIfAllFramesHere not actually check to see if all the frames are there

r=kmcclusk Bug 19949
This commit is contained in:
rods%netscape.com 1999-11-24 21:12:03 +00:00
parent 178617001b
commit 6af28faed3
2 changed files with 4 additions and 54 deletions

View File

@ -310,11 +310,6 @@ nsListControlFrame::Reflow(nsIPresContext* aPresContext,
// then initialize it before reflow
if (mIsAllContentHere && !mHasBeenInitialized) {
if (PR_FALSE == mIsAllFramesHere) {
#ifdef DEBUG_rodsXXX
printf("**********************************************************\n");
printf("**********************************************************\n");
printf("**********************************************************\n");
#endif
CheckIfAllFramesHere();
}
if (mIsAllFramesHere && !mHasBeenInitialized) {
@ -1799,32 +1794,12 @@ nsListControlFrame::ToggleSelected(PRInt32 aIndex)
PRBool nsListControlFrame::CheckIfAllFramesHere()
{
// Get the number of optgroups and options
/* PRInt32 numContentItems = 0;
PRInt32 numContentItems = 0;
nsCOMPtr<nsIDOMNode> node(do_QueryInterface(mContent));
if (node) {
CountAllChild(node, numContentItems);
mIsAllFramesHere = NS_OK == CountAllChild(node, numContentItems);
}
//printf("number of items %d ", numContentItems);
// now count the number of block frames
// each option is in a block frame
PRInt32 numFrames = 0;
nsIFrame * areaFrame = nsnull;
FirstChild(nsnull, &areaFrame);
if (areaFrame) {
nsIFrame * child = nsnull;
areaFrame->FirstChild(nsnull, &child);
while (child) {
nsIFrame * blkFrame;
if (NS_SUCCEEDED(child->QueryInterface(kBlockFrameCID,(void**)&blkFrame))) {
numFrames++;
}
child->GetNextSibling(&child);
}
}
*/
// now make sure we have a frame each piece of content
mIsAllFramesHere = PR_TRUE;//numFrames == numContentItems;
return mIsAllFramesHere;
}

View File

@ -310,11 +310,6 @@ nsListControlFrame::Reflow(nsIPresContext* aPresContext,
// then initialize it before reflow
if (mIsAllContentHere && !mHasBeenInitialized) {
if (PR_FALSE == mIsAllFramesHere) {
#ifdef DEBUG_rodsXXX
printf("**********************************************************\n");
printf("**********************************************************\n");
printf("**********************************************************\n");
#endif
CheckIfAllFramesHere();
}
if (mIsAllFramesHere && !mHasBeenInitialized) {
@ -1799,32 +1794,12 @@ nsListControlFrame::ToggleSelected(PRInt32 aIndex)
PRBool nsListControlFrame::CheckIfAllFramesHere()
{
// Get the number of optgroups and options
/* PRInt32 numContentItems = 0;
PRInt32 numContentItems = 0;
nsCOMPtr<nsIDOMNode> node(do_QueryInterface(mContent));
if (node) {
CountAllChild(node, numContentItems);
mIsAllFramesHere = NS_OK == CountAllChild(node, numContentItems);
}
//printf("number of items %d ", numContentItems);
// now count the number of block frames
// each option is in a block frame
PRInt32 numFrames = 0;
nsIFrame * areaFrame = nsnull;
FirstChild(nsnull, &areaFrame);
if (areaFrame) {
nsIFrame * child = nsnull;
areaFrame->FirstChild(nsnull, &child);
while (child) {
nsIFrame * blkFrame;
if (NS_SUCCEEDED(child->QueryInterface(kBlockFrameCID,(void**)&blkFrame))) {
numFrames++;
}
child->GetNextSibling(&child);
}
}
*/
// now make sure we have a frame each piece of content
mIsAllFramesHere = PR_TRUE;//numFrames == numContentItems;
return mIsAllFramesHere;
}