mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Invoke backup element queue via a microtask
This commit is contained in:
parent
4665991503
commit
9b587a4f2d
15 changed files with 252 additions and 7 deletions
|
@ -15,6 +15,7 @@ use dom::htmlimageelement::ImageElementMicrotask;
|
|||
use dom::htmlmediaelement::MediaElementMicrotask;
|
||||
use dom::mutationobserver::MutationObserver;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use script_thread::ScriptThread;
|
||||
use std::cell::Cell;
|
||||
use std::mem;
|
||||
use std::rc::Rc;
|
||||
|
@ -33,6 +34,7 @@ pub enum Microtask {
|
|||
Promise(EnqueuedPromiseCallback),
|
||||
MediaElement(MediaElementMicrotask),
|
||||
ImageElement(ImageElementMicrotask),
|
||||
CustomElementReaction,
|
||||
NotifyMutationObservers,
|
||||
}
|
||||
|
||||
|
@ -87,6 +89,9 @@ impl MicrotaskQueue {
|
|||
Microtask::ImageElement(ref task) => {
|
||||
task.handler();
|
||||
},
|
||||
Microtask::CustomElementReaction => {
|
||||
ScriptThread::invoke_backup_element_queue();
|
||||
},
|
||||
Microtask::NotifyMutationObservers => {
|
||||
MutationObserver::notify_mutation_observers();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue