This commit is contained in:
Olli.Pettay%helsinki.fi 2006-05-08 07:14:08 +00:00
Родитель 98e4815208
Коммит 5b30fac518
2 изменённых файлов: 5 добавлений и 10 удалений

Просмотреть файл

@ -142,6 +142,10 @@ nsPoint nsDOMUIEvent::GetClientPoint() {
return nsPoint(0, 0);
}
nsCOMPtr<nsIWidget> eventWidget = ((nsGUIEvent*)mEvent)->widget;
if (!eventWidget)
return mClientPoint;
//My god, man, there *must* be a better way to do this.
nsCOMPtr<nsIWidget> docWidget;
nsIPresShell *presShell = mPresContext->GetPresShell();
@ -152,10 +156,6 @@ nsPoint nsDOMUIEvent::GetClientPoint() {
}
}
nsCOMPtr<nsIWidget> eventWidget = ((nsGUIEvent*)mEvent)->widget;
if (!eventWidget || !docWidget)
return mClientPoint;
nsPoint pt = mEvent->refPoint;
// BUG 296004 (see also BUG 242833)

Просмотреть файл

@ -1945,12 +1945,7 @@ nsEventListenerManager::FixContextMenuEvent(nsPresContext* aPresContext,
nsEvent* aEvent,
nsIDOMEvent** aDOMEvent)
{
nsIPresShell* shell = aPresContext->GetPresShell();
if (!shell) {
// Nothing to do.
return NS_OK;
}
nsIPresShell* shell = aPresContext->PresShell();
nsresult ret = NS_OK;
if (nsnull == *aDOMEvent) {