ListControlFrame now use the nsSelectsAreaFrame to get the correct frame

when clicking in a list
removed NS_VIEW_PUBLIC_FLAG_DONT_CHECK_CHILDREN on list frames the events get routed correctly
This commit is contained in:
rods%netscape.com 1999-09-03 14:57:47 +00:00
parent e2e4220db7
commit 4b5adf6a1f
2 changed files with 8 additions and 8 deletions

View File

@ -3034,7 +3034,7 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresContext* aPresContex
// absolutely positioned. // absolutely positioned.
nsIFrame* newFrame = nsnull; nsIFrame* newFrame = nsnull;
nsIFrame* scrolledFrame = nsnull; nsIFrame* scrolledFrame = nsnull;
NS_NewAreaFrame(&scrolledFrame, NS_BLOCK_SHRINK_WRAP); NS_NewSelectsAreaFrame(&scrolledFrame, NS_BLOCK_SHRINK_WRAP);
InitializeScrollFrame(aPresContext, aState, listFrame, scrolledFrame, aContent, comboboxFrame, InitializeScrollFrame(aPresContext, aState, listFrame, scrolledFrame, aContent, comboboxFrame,
listStyle, PR_TRUE, PR_FALSE, PR_FALSE, PR_TRUE); listStyle, PR_TRUE, PR_FALSE, PR_FALSE, PR_TRUE);
@ -3047,7 +3047,7 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresContext* aPresContex
nsIView *listView; nsIView *listView;
listFrame->GetView(&listView); listFrame->GetView(&listView);
NS_ASSERTION(nsnull != listView,"ListFrame's view is nsnull"); NS_ASSERTION(nsnull != listView,"ListFrame's view is nsnull");
listView->SetViewFlags(NS_VIEW_PUBLIC_FLAG_DONT_CHECK_CHILDREN); //listView->SetViewFlags(NS_VIEW_PUBLIC_FLAG_DONT_CHECK_CHILDREN);
nsIFrame* frame = nsnull; nsIFrame* frame = nsnull;
if (NS_SUCCEEDED(comboboxFrame->QueryInterface(kIFrameIID, (void**)&frame))) { if (NS_SUCCEEDED(comboboxFrame->QueryInterface(kIFrameIID, (void**)&frame))) {
@ -3078,7 +3078,7 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresContext* aPresContex
rv = NS_NewListControlFrame(&listFrame); rv = NS_NewListControlFrame(&listFrame);
aNewFrame = listFrame; aNewFrame = listFrame;
nsIFrame* scrolledFrame = nsnull; nsIFrame* scrolledFrame = nsnull;
NS_NewAreaFrame(&scrolledFrame, NS_BLOCK_SHRINK_WRAP); NS_NewSelectsAreaFrame(&scrolledFrame, NS_BLOCK_SHRINK_WRAP);
InitializeScrollFrame(aPresContext, aState, listFrame, scrolledFrame, aContent, aParentFrame, InitializeScrollFrame(aPresContext, aState, listFrame, scrolledFrame, aContent, aParentFrame,
aStyleContext, PR_TRUE, aIsAbsolutelyPositioned, aIsFixedPositioned, PR_FALSE); aStyleContext, PR_TRUE, aIsAbsolutelyPositioned, aIsFixedPositioned, PR_FALSE);
@ -3092,7 +3092,7 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresContext* aPresContex
nsIView *listView; nsIView *listView;
listFrame->GetView(&listView); listFrame->GetView(&listView);
NS_ASSERTION(nsnull != listView,"ListFrame's view is nsnull"); NS_ASSERTION(nsnull != listView,"ListFrame's view is nsnull");
listView->SetViewFlags(NS_VIEW_PUBLIC_FLAG_DONT_CHECK_CHILDREN); //listView->SetViewFlags(NS_VIEW_PUBLIC_FLAG_DONT_CHECK_CHILDREN);
aFrameHasBeenInitialized = PR_TRUE; aFrameHasBeenInitialized = PR_TRUE;
} }
} else { } else {

View File

@ -3034,7 +3034,7 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresContext* aPresContex
// absolutely positioned. // absolutely positioned.
nsIFrame* newFrame = nsnull; nsIFrame* newFrame = nsnull;
nsIFrame* scrolledFrame = nsnull; nsIFrame* scrolledFrame = nsnull;
NS_NewAreaFrame(&scrolledFrame, NS_BLOCK_SHRINK_WRAP); NS_NewSelectsAreaFrame(&scrolledFrame, NS_BLOCK_SHRINK_WRAP);
InitializeScrollFrame(aPresContext, aState, listFrame, scrolledFrame, aContent, comboboxFrame, InitializeScrollFrame(aPresContext, aState, listFrame, scrolledFrame, aContent, comboboxFrame,
listStyle, PR_TRUE, PR_FALSE, PR_FALSE, PR_TRUE); listStyle, PR_TRUE, PR_FALSE, PR_FALSE, PR_TRUE);
@ -3047,7 +3047,7 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresContext* aPresContex
nsIView *listView; nsIView *listView;
listFrame->GetView(&listView); listFrame->GetView(&listView);
NS_ASSERTION(nsnull != listView,"ListFrame's view is nsnull"); NS_ASSERTION(nsnull != listView,"ListFrame's view is nsnull");
listView->SetViewFlags(NS_VIEW_PUBLIC_FLAG_DONT_CHECK_CHILDREN); //listView->SetViewFlags(NS_VIEW_PUBLIC_FLAG_DONT_CHECK_CHILDREN);
nsIFrame* frame = nsnull; nsIFrame* frame = nsnull;
if (NS_SUCCEEDED(comboboxFrame->QueryInterface(kIFrameIID, (void**)&frame))) { if (NS_SUCCEEDED(comboboxFrame->QueryInterface(kIFrameIID, (void**)&frame))) {
@ -3078,7 +3078,7 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresContext* aPresContex
rv = NS_NewListControlFrame(&listFrame); rv = NS_NewListControlFrame(&listFrame);
aNewFrame = listFrame; aNewFrame = listFrame;
nsIFrame* scrolledFrame = nsnull; nsIFrame* scrolledFrame = nsnull;
NS_NewAreaFrame(&scrolledFrame, NS_BLOCK_SHRINK_WRAP); NS_NewSelectsAreaFrame(&scrolledFrame, NS_BLOCK_SHRINK_WRAP);
InitializeScrollFrame(aPresContext, aState, listFrame, scrolledFrame, aContent, aParentFrame, InitializeScrollFrame(aPresContext, aState, listFrame, scrolledFrame, aContent, aParentFrame,
aStyleContext, PR_TRUE, aIsAbsolutelyPositioned, aIsFixedPositioned, PR_FALSE); aStyleContext, PR_TRUE, aIsAbsolutelyPositioned, aIsFixedPositioned, PR_FALSE);
@ -3092,7 +3092,7 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresContext* aPresContex
nsIView *listView; nsIView *listView;
listFrame->GetView(&listView); listFrame->GetView(&listView);
NS_ASSERTION(nsnull != listView,"ListFrame's view is nsnull"); NS_ASSERTION(nsnull != listView,"ListFrame's view is nsnull");
listView->SetViewFlags(NS_VIEW_PUBLIC_FLAG_DONT_CHECK_CHILDREN); //listView->SetViewFlags(NS_VIEW_PUBLIC_FLAG_DONT_CHECK_CHILDREN);
aFrameHasBeenInitialized = PR_TRUE; aFrameHasBeenInitialized = PR_TRUE;
} }
} else { } else {