style: Document the restyle hints code, and make it operate on TElement.

This removes the annoying constraint of having to provide the current state from
outside of the restyle hints code.
This commit is contained in:
Emilio Cobos Álvarez 2017-01-01 23:53:34 +01:00
parent c5f2142d8f
commit fa8874fb14
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
4 changed files with 101 additions and 53 deletions

View file

@ -295,10 +295,8 @@ impl RestyleData {
}
// Compute the hint.
let state = element.get_state();
let mut hint = stylist.compute_restyle_hint(&element,
self.snapshot.as_ref().unwrap(),
state);
self.snapshot.as_ref().unwrap());
// If the hint includes a directive for later siblings, strip it out and
// notify the caller to modify the base hint for future siblings.