diff --git a/view/public/nsIView.h b/view/public/nsIView.h index 73b07a0f6c4..fab2cad8773 100644 --- a/view/public/nsIView.h +++ b/view/public/nsIView.h @@ -395,7 +395,8 @@ public: */ NS_IMETHOD CreateWidget(const nsIID &aWindowIID, nsWidgetInitData *aWidgetInitData = nsnull, - nsNativeWidget aNative = nsnull) = 0; + nsNativeWidget aNative = nsnull, + PRBool aEnableDragDrop = PR_TRUE) = 0; /** * Set the widget associated with this view. diff --git a/view/src/nsView.cpp b/view/src/nsView.cpp index aeac7339534..0ed5350e8b7 100644 --- a/view/src/nsView.cpp +++ b/view/src/nsView.cpp @@ -1209,7 +1209,8 @@ NS_IMETHODIMP nsView :: GetClientData(void *&aData) const NS_IMETHODIMP nsView :: CreateWidget(const nsIID &aWindowIID, nsWidgetInitData *aWidgetInitData, - nsNativeWidget aNative) + nsNativeWidget aNative, + PRBool aEnableDragDrop) { nsIDeviceContext *dx; nsRect trect = mBounds; @@ -1239,6 +1240,9 @@ NS_IMETHODIMP nsView :: CreateWidget(const nsIID &aWindowIID, mWindow->Create(parent, trect, ::HandleEvent, dx, nsnull, nsnull, aWidgetInitData); NS_IF_RELEASE(parent); } + if (aEnableDragDrop) { + mWindow->EnableDragDrop(PR_TRUE); + } } } diff --git a/view/src/nsView.h b/view/src/nsView.h index 083d9c2e8e9..1c05d3acd5a 100644 --- a/view/src/nsView.h +++ b/view/src/nsView.h @@ -89,7 +89,8 @@ public: NS_IMETHOD SetDirtyRegion(nsIRegion* aRegion); NS_IMETHOD CreateWidget(const nsIID &aWindowIID, nsWidgetInitData *aWidgetInitData = nsnull, - nsNativeWidget aNative = nsnull); + nsNativeWidget aNative = nsnull, + PRBool aEnableDragDrop = PR_TRUE); NS_IMETHOD SetWidget(nsIWidget *aWidget); NS_IMETHOD GetWidget(nsIWidget *&aWidget) const; virtual void List(FILE* out = stdout, PRInt32 aIndent = 0) const;