mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
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:
parent
c5f2142d8f
commit
fa8874fb14
4 changed files with 101 additions and 53 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue