mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
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:
commit
9b7708063a
7 changed files with 45 additions and 17 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue