Return an enum instead of a boolean from dispatch_event

Fixes #13196
This commit is contained in:
Adolfo Ochagavía 2016-09-23 17:51:24 +02:00
parent 821797d6f7
commit 6c8bfdb774
7 changed files with 45 additions and 17 deletions

View file

@ -41,6 +41,7 @@ use dom::domimplementation::DOMImplementation;
use dom::element::{Element, ElementCreator};
use dom::errorevent::ErrorEvent;
use dom::event::{Event, EventBubbles, EventCancelable};
use dom::eventdispatcher::EventStatus;
use dom::eventtarget::EventTarget;
use dom::focusevent::FocusEvent;
use dom::forcetouchevent::ForceTouchEvent;
@ -1118,7 +1119,11 @@ impl Document {
window.reflow(ReflowGoal::ForDisplay,
ReflowQueryType::NoQuery,
ReflowReason::MouseEvent);
result
match result {
EventStatus::Canceled => false,
EventStatus::NotCanceled => true
}
}
/// The entry point for all key processing for web content