Bug 776865 - change mWindow to mWidget in nsNativeDragTarget to avoid confusion. r=bbondy.

This commit is contained in:
Jim Mathies 2012-07-25 10:09:16 -05:00
parent 5489c9a378
commit 8dd63d0840
2 changed files with 9 additions and 9 deletions

View File

@ -31,13 +31,13 @@ static POINTL gDragLastPoint;
/*
* class nsNativeDragTarget
*/
nsNativeDragTarget::nsNativeDragTarget(nsIWidget * aWnd)
nsNativeDragTarget::nsNativeDragTarget(nsIWidget * aWidget)
: m_cRef(0),
mEffectsAllowed(DROPEFFECT_MOVE | DROPEFFECT_COPY | DROPEFFECT_LINK),
mEffectsPreferred(DROPEFFECT_NONE),
mTookOwnRef(false), mWindow(aWnd), mDropTargetHelper(nsnull)
mTookOwnRef(false), mWidget(aWidget), mDropTargetHelper(nsnull)
{
mHWnd = (HWND)mWindow->GetNativeData(NS_NATIVE_WINDOW);
mHWnd = (HWND)mWidget->GetNativeData(NS_NATIVE_WINDOW);
/*
* Create/Get the DragService that we have implemented
@ -97,7 +97,7 @@ nsNativeDragTarget::GetGeckoDragAction(DWORD grfKeyState, LPDWORD pdwEffect,
{
// If a window is disabled or a modal window is on top of it
// (which implies it is disabled), then we should not allow dropping.
if (!mWindow->IsEnabled()) {
if (!mWidget->IsEnabled()) {
*pdwEffect = DROPEFFECT_NONE;
*aGeckoAction = nsIDragService::DRAGDROP_ACTION_NONE;
return;
@ -153,9 +153,9 @@ void
nsNativeDragTarget::DispatchDragDropEvent(PRUint32 aEventType, POINTL aPT)
{
nsEventStatus status;
nsDragEvent event(true, aEventType, mWindow);
nsDragEvent event(true, aEventType, mWidget);
nsWindow * win = static_cast<nsWindow *>(mWindow);
nsWindow * win = static_cast<nsWindow *>(mWidget);
win->InitEvent(event);
POINT cpos;
@ -176,7 +176,7 @@ nsNativeDragTarget::DispatchDragDropEvent(PRUint32 aEventType, POINTL aPT)
event.inputSource = static_cast<nsBaseDragService*>(mDragService)->GetInputSource();
mWindow->DispatchEvent(&event, status);
mWidget->DispatchEvent(&event, status);
}
void

View File

@ -29,7 +29,7 @@ struct IDataObject;
class nsNativeDragTarget MOZ_FINAL : public IDropTarget
{
public:
nsNativeDragTarget(nsIWidget * aWnd);
nsNativeDragTarget(nsIWidget * aWidget);
~nsNativeDragTarget();
// IUnknown members - see iunknown.h for documentation
@ -85,7 +85,7 @@ protected:
bool mTookOwnRef;
// Gecko Stuff
nsIWidget * mWindow;
nsIWidget * mWidget;
nsIDragService * mDragService;
// Drag target helper
IDropTargetHelper * GetDropTargetHelper();