Fixing bug 289940. Make chrome event handlers only receive trusted events by default. r=jonas@sicking.cc, sr=peterv@propagandism.org, a=chofmann@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@172848 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -543,7 +543,7 @@ void nsWebShellWindow::LoadNativeMenus(nsIDOMDocument *aDOMDoc,
|
||||
nsCOMPtr<nsIMenuListener> menuListener = do_QueryInterface(pnsMenuBar);
|
||||
|
||||
// fake event
|
||||
nsMenuEvent fake;
|
||||
nsMenuEvent fake(PR_TRUE, 0, nsnull);
|
||||
menuListener->MenuConstruct(fake, aParentWindow, menubarNode, mDocShell);
|
||||
}
|
||||
|
||||
@@ -810,7 +810,8 @@ PRBool nsWebShellWindow::ExecuteCloseHandler()
|
||||
docViewer->GetPresContext(getter_AddRefs(presContext));
|
||||
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
nsMouseEvent event(NS_XUL_CLOSE);
|
||||
nsMouseEvent event(PR_TRUE, NS_XUL_CLOSE, nsnull,
|
||||
nsMouseEvent::eReal);
|
||||
|
||||
nsresult rv = globalObject->HandleDOMEvent(presContext, &event, nsnull,
|
||||
NS_EVENT_FLAG_INIT, &status);
|
||||
|
||||
Reference in New Issue
Block a user