mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-03 15:26:07 +00:00
Make the title change events we fire trusted. Bug 295210, r+sr=jst, a=dveditz
This commit is contained in:
parent
4b8823720e
commit
6cab785436
@ -2967,6 +2967,10 @@ nsDocument::SetTitle(const nsAString& aTitle)
|
||||
CreateEvent(NS_LITERAL_STRING("Events"), getter_AddRefs(event));
|
||||
if (event) {
|
||||
event->InitEvent(NS_LITERAL_STRING("DOMTitleChanged"), PR_TRUE, PR_TRUE);
|
||||
// There might be script running, so the event might have ended up
|
||||
// untrusted. Make it trusted.
|
||||
nsCOMPtr<nsIPrivateDOMEvent> privEvt(do_QueryInterface(event));
|
||||
privEvt->SetTrusted(PR_TRUE);
|
||||
PRBool defaultActionEnabled;
|
||||
DispatchEvent(event, &defaultActionEnabled);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user