mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-12 18:50:08 +00:00
deCOMtaminate nsIFrame::GetWindow; the COM wrapper doesn't ADDREF when it should, the easiest thing to do is to just not use the wrapper. r+sr=dbaron
This commit is contained in:
parent
a9e0202cc6
commit
542467a8bd
@ -1458,14 +1458,11 @@ nsEventStateManager :: GenerateDragGesture ( nsIPresContext* aPresContext, nsGUI
|
||||
#endif
|
||||
|
||||
// get the widget from the target frame
|
||||
nsCOMPtr<nsIWidget> targetWidget;
|
||||
mGestureDownFrame->GetWindow(aPresContext, getter_AddRefs(targetWidget));
|
||||
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsMouseEvent event;
|
||||
event.eventStructType = NS_DRAGDROP_EVENT;
|
||||
event.message = NS_DRAGDROP_GESTURE;
|
||||
event.widget = targetWidget;
|
||||
event.widget = mGestureDownFrame->GetWindow();
|
||||
event.clickCount = 0;
|
||||
event.point = mGestureDownPoint;
|
||||
event.refPoint = mGestureDownRefPoint;
|
||||
@ -2380,9 +2377,7 @@ nsEventStateManager::UpdateCursor(nsIPresContext* aPresContext,
|
||||
}
|
||||
|
||||
if (aTargetFrame) {
|
||||
nsCOMPtr<nsIWidget> window;
|
||||
aTargetFrame->GetWindow(aPresContext, getter_AddRefs(window));
|
||||
SetCursor(cursor, window, PR_FALSE);
|
||||
SetCursor(cursor, aTargetFrame->GetWindow(), PR_FALSE);
|
||||
}
|
||||
|
||||
if (mLockCursor || NS_STYLE_CURSOR_AUTO != cursor) {
|
||||
|
@ -2062,14 +2062,11 @@ GetEditorContentWindow(nsIPresShell *aPresShell, nsIDOMElement *aRoot, nsIWidget
|
||||
// which will traverse it's parent hierarchy till it finds a
|
||||
// view with a widget.
|
||||
|
||||
result = frame->GetWindow(presContext, aResult);
|
||||
|
||||
if (NS_FAILED(result))
|
||||
return result;
|
||||
|
||||
*aResult = frame->GetWindow();
|
||||
if (!*aResult)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
NS_ADDREF(*aResult);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user