mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
improve spec compliance of update the image data
This commit is contained in:
parent
f05491166f
commit
71b0c10164
6 changed files with 401 additions and 118 deletions
|
@ -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::htmlimageelement::ImageElementMicrotask;
|
||||
use dom::htmlmediaelement::MediaElementMicrotask;
|
||||
use dom::mutationobserver::MutationObserver;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
|
@ -31,6 +32,7 @@ pub struct MicrotaskQueue {
|
|||
pub enum Microtask {
|
||||
Promise(EnqueuedPromiseCallback),
|
||||
MediaElement(MediaElementMicrotask),
|
||||
ImageElement(ImageElementMicrotask),
|
||||
NotifyMutationObservers,
|
||||
}
|
||||
|
||||
|
@ -81,7 +83,10 @@ impl MicrotaskQueue {
|
|||
},
|
||||
Microtask::MediaElement(ref task) => {
|
||||
task.handler();
|
||||
}
|
||||
},
|
||||
Microtask::ImageElement(ref task) => {
|
||||
task.handler();
|
||||
},
|
||||
Microtask::NotifyMutationObservers => {
|
||||
MutationObserver::notify_mutation_observers();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue