mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Store pristine element state rather than a set of changes.
This is the strategy we'll need to take for attributes, and so this change puts us in a position to handle attributes and state the same way. This does mean that we stop taking care to track the situations where our state has reverted to the original state, with no net change. I think that's probably of negligible value though.
This commit is contained in:
parent
d89816bb5f
commit
7dba4447f1
6 changed files with 23 additions and 35 deletions
|
@ -174,10 +174,10 @@ impl Stylist {
|
|||
|
||||
pub fn restyle_hint_for_state_change<E>(&self, element: &E,
|
||||
current_state: ElementState,
|
||||
state_change: ElementState)
|
||||
old_state: ElementState)
|
||||
-> RestyleHint
|
||||
where E: Element + Clone {
|
||||
self.state_deps.compute_hint(element, current_state, state_change)
|
||||
self.state_deps.compute_hint(element, current_state, old_state)
|
||||
}
|
||||
|
||||
pub fn set_device(&mut self, device: Device) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue