diff options
author | Bobby Holley <bobbyholley@gmail.com> | 2015-11-04 18:31:17 -0800 |
---|---|---|
committer | Bobby Holley <bobbyholley@gmail.com> | 2015-11-04 19:09:58 -0800 |
commit | 7dba4447f196bbd75676402dac7858b0f7741cd2 (patch) | |
tree | 0d91f8d35b0dcc11396e968b6bfd1e458a4fd6d8 /components/layout/layout_task.rs | |
parent | d89816bb5fa90421a4dea49ff6387f635ce7b389 (diff) | |
download | servo-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/layout/layout_task.rs')
-rw-r--r-- | components/layout/layout_task.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs index 7a615b02f6b..bdf1b613562 100644 --- a/components/layout/layout_task.rs +++ b/components/layout/layout_task.rs @@ -1213,13 +1213,12 @@ impl LayoutTask { } } - let state_changes = document.drain_element_state_changes(); + let modified_elements = document.drain_modified_elements(); if !needs_dirtying { - for &(el, state_change) in state_changes.iter() { - debug_assert!(!state_change.is_empty()); + for &(el, old_state) in modified_elements.iter() { let hint = rw_data.stylist.restyle_hint_for_state_change(&el, el.get_state(), - state_change); + old_state); el.note_restyle_hint(hint); } } |