layout: Do a couple of minor style cleanups.

This commit is contained in:
Patrick Walton 2015-09-10 14:17:35 -07:00
parent 9bb6acd690
commit 1892b27daf
2 changed files with 7 additions and 5 deletions

View file

@ -165,10 +165,10 @@ impl FontContext {
size: style.font_size,
address: address,
};
if let Some(ref cached_font_group) =
self.layout_font_group_cache.get(&layout_font_group_cache_key) {
return (*cached_font_group).clone()
}
if let Some(ref cached_font_group) = self.layout_font_group_cache.get(
&layout_font_group_cache_key) {
return (*cached_font_group).clone()
}
// TODO: The font context holds a strong ref to the cached fonts
// so they will never be released. Find out a good time to drop them.

View file

@ -136,5 +136,7 @@ pub fn recalc_style_for_animations(flow: &mut Flow,
pub fn tick_all_animations(layout_task: &LayoutTask, rw_data: &mut LayoutTaskData) {
layout_task.tick_animations(rw_data);
layout_task.script_chan.send(ConstellationControlMsg::TickAllAnimations(layout_task.id)).unwrap();
layout_task.script_chan
.send(ConstellationControlMsg::TickAllAnimations(layout_task.id))
.unwrap();
}