From bccee5ad91ff7b2a4dcdbb2d8cde02020f8216b3 Mon Sep 17 00:00:00 2001 From: "mjudge%netscape.com" Date: Thu, 13 Apr 2000 00:15:02 +0000 Subject: [PATCH] a=gramps. smoketest fix for 35590 git-svn-id: svn://10.0.0.236/trunk@65739 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsFrame.cpp | 11 +++++------ mozilla/layout/html/base/src/nsFrame.cpp | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/mozilla/layout/generic/nsFrame.cpp b/mozilla/layout/generic/nsFrame.cpp index 56514a4daa9..a5158cafb1c 100644 --- a/mozilla/layout/generic/nsFrame.cpp +++ b/mozilla/layout/generic/nsFrame.cpp @@ -786,8 +786,6 @@ nsFrame::HandleEvent(nsIPresContext* aPresContext, if (NS_SUCCEEDED(shell->GetFrameSelection(getter_AddRefs(frameselection))) && frameselection) { frameselection->SetMouseDownState( PR_TRUE);//not important if it fails here - if (!IsMouseCaptured(aPresContext)) - CaptureMouse(aPresContext, PR_TRUE); } HandlePress(aPresContext, aEvent, aEventStatus); }break; @@ -923,6 +921,8 @@ nsFrame::HandlePress(nsIPresContext* aPresContext, nsGUIEvent* aEvent, nsEventStatus* aEventStatus) { + if (!IsMouseCaptured(aPresContext)) + CaptureMouse(aPresContext, PR_TRUE); if (!DisplaySelection(aPresContext)) { return NS_OK; } @@ -952,8 +952,6 @@ nsFrame::HandlePress(nsIPresContext* aPresContext, if (NS_SUCCEEDED(shell->GetFrameSelection(getter_AddRefs(frameselection))) && frameselection) { frameselection->SetMouseDownState(PR_TRUE);//not important if it fails here - if (!IsMouseCaptured(aPresContext)) - CaptureMouse(aPresContext, PR_TRUE); nsCOMPtrparentContent; PRInt32 contentOffset; @@ -1103,6 +1101,9 @@ NS_IMETHODIMP nsFrame::HandleRelease(nsIPresContext* aPresContext, nsGUIEvent* aEvent, nsEventStatus* aEventStatus) { + if (IsMouseCaptured(aPresContext)) + CaptureMouse(aPresContext, PR_FALSE); + if (!DisplaySelection(aPresContext)) return NS_OK; @@ -1117,8 +1118,6 @@ NS_IMETHODIMP nsFrame::HandleRelease(nsIPresContext* aPresContext, nsCOMPtr frameselection; result = presShell->GetFrameSelection(getter_AddRefs(frameselection)); - if (IsMouseCaptured(aPresContext)) - CaptureMouse(aPresContext, PR_FALSE); if (NS_SUCCEEDED(result) && frameselection) frameselection->StopAutoScrollTimer(); diff --git a/mozilla/layout/html/base/src/nsFrame.cpp b/mozilla/layout/html/base/src/nsFrame.cpp index 56514a4daa9..a5158cafb1c 100644 --- a/mozilla/layout/html/base/src/nsFrame.cpp +++ b/mozilla/layout/html/base/src/nsFrame.cpp @@ -786,8 +786,6 @@ nsFrame::HandleEvent(nsIPresContext* aPresContext, if (NS_SUCCEEDED(shell->GetFrameSelection(getter_AddRefs(frameselection))) && frameselection) { frameselection->SetMouseDownState( PR_TRUE);//not important if it fails here - if (!IsMouseCaptured(aPresContext)) - CaptureMouse(aPresContext, PR_TRUE); } HandlePress(aPresContext, aEvent, aEventStatus); }break; @@ -923,6 +921,8 @@ nsFrame::HandlePress(nsIPresContext* aPresContext, nsGUIEvent* aEvent, nsEventStatus* aEventStatus) { + if (!IsMouseCaptured(aPresContext)) + CaptureMouse(aPresContext, PR_TRUE); if (!DisplaySelection(aPresContext)) { return NS_OK; } @@ -952,8 +952,6 @@ nsFrame::HandlePress(nsIPresContext* aPresContext, if (NS_SUCCEEDED(shell->GetFrameSelection(getter_AddRefs(frameselection))) && frameselection) { frameselection->SetMouseDownState(PR_TRUE);//not important if it fails here - if (!IsMouseCaptured(aPresContext)) - CaptureMouse(aPresContext, PR_TRUE); nsCOMPtrparentContent; PRInt32 contentOffset; @@ -1103,6 +1101,9 @@ NS_IMETHODIMP nsFrame::HandleRelease(nsIPresContext* aPresContext, nsGUIEvent* aEvent, nsEventStatus* aEventStatus) { + if (IsMouseCaptured(aPresContext)) + CaptureMouse(aPresContext, PR_FALSE); + if (!DisplaySelection(aPresContext)) return NS_OK; @@ -1117,8 +1118,6 @@ NS_IMETHODIMP nsFrame::HandleRelease(nsIPresContext* aPresContext, nsCOMPtr frameselection; result = presShell->GetFrameSelection(getter_AddRefs(frameselection)); - if (IsMouseCaptured(aPresContext)) - CaptureMouse(aPresContext, PR_FALSE); if (NS_SUCCEEDED(result) && frameselection) frameselection->StopAutoScrollTimer();