Auto merge of #8863 - simartin:issue_8352, r=jdm

Issue #8352: Dispatch mozbrowsershowmodalprompt event for alert().

Fixes https://github.com/servo/servo/issues/8352

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8863)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-12-21 02:28:32 +05:30
commit 9a4d82c314
7 changed files with 58 additions and 5 deletions

View file

@ -283,7 +283,7 @@ pub enum MozBrowserEvent {
/// Sent when the SSL state changes within a browser `<iframe>`.
SecurityChange,
/// Sent when alert(), confirm(), or prompt() is called within a browser `<iframe>`.
ShowModalPrompt,
ShowModalPrompt(String, String, String, String), // TODO(simartin): Handle unblock()
/// Sent when the document.title changes within a browser `<iframe>`.
TitleChange(String),
/// Sent when an HTTP authentification is requested.
@ -305,7 +305,7 @@ impl MozBrowserEvent {
MozBrowserEvent::LocationChange(_) => "mozbrowserlocationchange",
MozBrowserEvent::OpenWindow => "mozbrowseropenwindow",
MozBrowserEvent::SecurityChange => "mozbrowsersecuritychange",
MozBrowserEvent::ShowModalPrompt => "mozbrowsershowmodalprompt",
MozBrowserEvent::ShowModalPrompt(_, _, _, _) => "mozbrowsershowmodalprompt",
MozBrowserEvent::TitleChange(_) => "mozbrowsertitlechange",
MozBrowserEvent::UsernameAndPasswordRequired => "mozbrowserusernameandpasswordrequired",
MozBrowserEvent::OpenSearch => "mozbrowseropensearch"