Auto merge of #8299 - pcwalton:dont-reflow-on-hover, r=mbrubeck

Fix several bugs causing the page to reflow on every mouse move event

After all these changes are applied, Hacker News and GitHub only repaint and reflow nodes that actually have hover styles applied when the mouse moves over them.

r? @mbrubeck 

cc @bholley

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8299)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-11-04 06:28:46 +05:30
commit 36c5dd4c8c
5 changed files with 56 additions and 40 deletions

View file

@ -463,7 +463,7 @@ impl<'ln> PrivateMatchMethods for LayoutNode<'ln> {
None => None,
Some(ref style) => Some(&**style),
};
let (the_style, is_cacheable) = cascade(layout_context.screen_size,
let (the_style, is_cacheable) = cascade(layout_context.viewport_size,
applicable_declarations,
shareable,
Some(&***parent_style),
@ -472,7 +472,7 @@ impl<'ln> PrivateMatchMethods for LayoutNode<'ln> {
this_style = the_style
}
None => {
let (the_style, is_cacheable) = cascade(layout_context.screen_size,
let (the_style, is_cacheable) = cascade(layout_context.viewport_size,
applicable_declarations,
shareable,
None,