temprary fix for combobox dropdowns that jump all around.

r=beard a=chofmann bug 19416
This commit is contained in:
rods%netscape.com 1999-12-14 22:21:58 +00:00
parent 7eda757e29
commit 4cf3515a9b
5 changed files with 43 additions and 0 deletions

View File

@ -2984,6 +2984,14 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresShell* aPresShell,
listStyle, PR_FALSE, PR_FALSE, PR_TRUE);
newFrame = listFrame;
// XXX Temporary for Bug 19416
{
nsIView * lstView;
scrolledFrame->GetView(aPresContext, &lstView);
if (lstView) {
lstView->IgnoreSetPosition(PR_TRUE);
}
}
// Set flag so the events go to the listFrame not child frames.
// XXX: We should replace this with a real widget manager similar

View File

@ -2984,6 +2984,14 @@ nsCSSFrameConstructor::ConstructSelectFrame(nsIPresShell* aPresShell,
listStyle, PR_FALSE, PR_FALSE, PR_TRUE);
newFrame = listFrame;
// XXX Temporary for Bug 19416
{
nsIView * lstView;
scrolledFrame->GetView(aPresContext, &lstView);
if (lstView) {
lstView->IgnoreSetPosition(PR_TRUE);
}
}
// Set flag so the events go to the listFrame not child frames.
// XXX: We should replace this with a real widget manager similar

View File

@ -481,6 +481,9 @@ public:
*/
NS_IMETHOD GetExtents(nsRect *aExtents) = 0;
// XXX Temporary for Bug #19416
NS_IMETHOD IgnoreSetPosition(PRBool aShouldIgnore) = 0;
private:
NS_IMETHOD_(nsrefcnt) AddRef(void) = 0;
NS_IMETHOD_(nsrefcnt) Release(void) = 0;

View File

@ -856,11 +856,28 @@ NS_IMETHODIMP nsView :: HandleEvent(nsGUIEvent *event, PRUint32 aEventFlags,
return NS_OK;
}
// XXX Start Temporary fix for Bug #19416
NS_IMETHODIMP nsView :: IgnoreSetPosition(PRBool aShouldIgnore)
{
mShouldIgnoreSetPosition = aShouldIgnore;
// resync here
if (!mShouldIgnoreSetPosition) {
SetPosition(mBounds.x, mBounds.y);
}
return NS_OK;
}
// XXX End Temporary fix for Bug #19416
NS_IMETHODIMP nsView :: SetPosition(nscoord x, nscoord y)
{
mBounds.MoveTo(x, y);
// XXX Start Temporary fix for Bug #19416
if (mShouldIgnoreSetPosition) {
return NS_OK;
}
// XXX End Temporary fix for Bug #19416
if (nsnull != mWindow)
{
nsIDeviceContext *dx;
@ -1012,6 +1029,7 @@ NS_IMETHODIMP nsView :: GetClip(nscoord *aLeft, nscoord *aTop, nscoord *aRight,
NS_IMETHODIMP nsView :: SetVisibility(nsViewVisibility aVisibility)
{
mVis = aVisibility;
if (nsnull != mWindow)

View File

@ -106,6 +106,9 @@ public:
NS_IMETHOD GetScratchPoint(nsPoint **aPoint);
NS_IMETHOD GetExtents(nsRect *aExtents);
// XXX Temporary for Bug #19416
NS_IMETHOD IgnoreSetPosition(PRBool aShouldIgnore);
// Helper function to get the view that's associated with a widget
static nsIView* GetViewFor(nsIWidget* aWidget);
@ -134,6 +137,9 @@ protected:
nsIRegion* mDirtyRegion;
nsPoint mScratchPoint;
// Bug #19416
PRBool mShouldIgnoreSetPosition;
private:
NS_IMETHOD_(nsrefcnt) AddRef(void);
NS_IMETHOD_(nsrefcnt) Release(void);