aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/selector_matching.rs
diff options
context:
space:
mode:
authorBobby Holley <bobbyholley@gmail.com>2015-11-04 18:31:17 -0800
committerBobby Holley <bobbyholley@gmail.com>2015-11-04 19:09:58 -0800
commit7dba4447f196bbd75676402dac7858b0f7741cd2 (patch)
tree0d91f8d35b0dcc11396e968b6bfd1e458a4fd6d8 /components/style/selector_matching.rs
parentd89816bb5fa90421a4dea49ff6387f635ce7b389 (diff)
downloadservo-7dba4447f196bbd75676402dac7858b0f7741cd2.tar.gz
servo-7dba4447f196bbd75676402dac7858b0f7741cd2.zip
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.
Diffstat (limited to 'components/style/selector_matching.rs')
-rw-r--r--components/style/selector_matching.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/style/selector_matching.rs b/components/style/selector_matching.rs
index 53f1a0d3589..8cc56e693eb 100644
--- a/components/style/selector_matching.rs
+++ b/components/style/selector_matching.rs
@@ -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) {