Auto merge of #6457 - glennw:raf-reflow, r=metajack

Trigger reflow after requestAnimationFrame callbacks.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6457)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-06-24 13:51:15 -06:00
commit 6889f5fb4e
2 changed files with 6 additions and 0 deletions

View file

@ -931,6 +931,10 @@ impl<'a> DocumentHelpers<'a> for &'a Document {
for (_, callback) in animation_frame_list {
callback(*performance.Now());
}
window.reflow(ReflowGoal::ForDisplay,
ReflowQueryType::NoQuery,
ReflowReason::RequestAnimationFrame);
}
fn prepare_async_load(self, load: LoadType) -> PendingAsyncLoad {

View file

@ -92,6 +92,7 @@ pub enum ReflowReason {
DOMContentLoaded,
DocumentLoaded,
ImageLoaded,
RequestAnimationFrame,
}
#[dom_struct]
@ -1068,6 +1069,7 @@ fn debug_reflow_events(goal: &ReflowGoal, query_type: &ReflowQueryType, reason:
ReflowReason::DOMContentLoaded => "\tDOMContentLoaded",
ReflowReason::DocumentLoaded => "\tDocumentLoaded",
ReflowReason::ImageLoaded => "\tImageLoaded",
ReflowReason::RequestAnimationFrame => "\tRequestAnimationFrame",
});
println!("{}", debug_msg);