aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/microtask.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-05-17 01:21:40 -0500
committerGitHub <noreply@github.com>2017-05-17 01:21:40 -0500
commit5da0aa9f11b7b1c2dc8b5adf178eebafa92d1849 (patch)
treeccf0d864f7043d761a57e287a932cd325e1ba756 /components/script/microtask.rs
parent837531992864f920342020462830b933d5ed0280 (diff)
parent3ca89204ffcdcabcf7bb1a343497bdae860c72b2 (diff)
downloadservo-5da0aa9f11b7b1c2dc8b5adf178eebafa92d1849.tar.gz
servo-5da0aa9f11b7b1c2dc8b5adf178eebafa92d1849.zip
Auto merge of #16883 - jdm:mutationobserver, r=jdm
Mutation Observer API Rebased from #16668. - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix (partially) #6633 - [X] There are tests for these changes <!-- 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/16883) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/microtask.rs')
-rw-r--r--components/script/microtask.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/components/script/microtask.rs b/components/script/microtask.rs
index da04d1ed6ab..7fadf111ddb 100644
--- a/components/script/microtask.rs
+++ b/components/script/microtask.rs
@@ -11,6 +11,7 @@ use dom::bindings::cell::DOMRefCell;
use dom::bindings::codegen::Bindings::PromiseBinding::PromiseJobCallback;
use dom::bindings::js::Root;
use dom::globalscope::GlobalScope;
+use dom::mutationobserver::MutationObserver;
use msg::constellation_msg::PipelineId;
use std::cell::Cell;
use std::mem;
@@ -28,6 +29,7 @@ pub struct MicrotaskQueue {
#[derive(JSTraceable, HeapSizeOf)]
pub enum Microtask {
Promise(EnqueuedPromiseCallback),
+ NotifyMutationObservers,
}
/// A promise callback scheduled to run during the next microtask checkpoint (#4283).
@@ -71,6 +73,9 @@ impl MicrotaskQueue {
let _ = job.callback.Call_(&*target, ExceptionHandling::Report);
}
}
+ Microtask::NotifyMutationObservers => {
+ MutationObserver::notify_mutation_observers();
+ }
}
}
}