mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
temprary fix for combobox dropdowns that jump all around.
r=beard a=chofmann bug 19416
This commit is contained in:
parent
7eda757e29
commit
4cf3515a9b
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user