aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/document.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-09-26 12:09:48 -0500
committerGitHub <noreply@github.com>2016-09-26 12:09:48 -0500
commit9b7708063aec5dbabc96cd93e16028e0ee6e14cd (patch)
tree686ae598128ea3e7cebde6d2b6243b08a42c8cda /components/script/dom/document.rs
parent6a0c70a22269cbec6b72cfa8db499838bb00a0c3 (diff)
parent6c8bfdb77467314d9b9cc77e16c7d938794a445f (diff)
downloadservo-9b7708063aec5dbabc96cd93e16028e0ee6e14cd.tar.gz
servo-9b7708063aec5dbabc96cd93e16028e0ee6e14cd.zip
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 -->
Diffstat (limited to 'components/script/dom/document.rs')
-rw-r--r--components/script/dom/document.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index 2cca84a625a..1b91e743a78 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -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