Auto merge of #13397 - aochagavia:dispatch-event, r=Ms2ger

Return an enum instead of a boolean from dispatch_event

Fixes #13196

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13196.
- [X] These changes do not require tests because the functionality hasn't changed

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13397)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-09-26 12:09:48 -05:00 committed by GitHub
commit 9b7708063a
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;
@ -1119,7 +1120,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