aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/layout_task.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2015-11-01 07:23:51 +0530
committerbors-servo <lbergstrom+bors@mozilla.com>2015-11-01 07:23:51 +0530
commit959ae86bd0435bf67626d3203a220c0e9f2eea40 (patch)
treedf243b4ddd967c9f8d7e2615a21c9cea2874d278 /components/layout/layout_task.rs
parent1add1185ab338709082981f226e8227cabfac866 (diff)
parent564170f41bb82c57620541dc7f40bac32d63b4a6 (diff)
downloadservo-959ae86bd0435bf67626d3203a220c0e9f2eea40.tar.gz
servo-959ae86bd0435bf67626d3203a220c0e9f2eea40.zip
Auto merge of #8274 - bholley:state_restyle_hints, r=pcwalton
Implement state-based restyle hints <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8274) <!-- Reviewable:end -->
Diffstat (limited to 'components/layout/layout_task.rs')
-rw-r--r--components/layout/layout_task.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs
index 4ebe8363fbc..273d56bca80 100644
--- a/components/layout/layout_task.rs
+++ b/components/layout/layout_task.rs
@@ -1182,9 +1182,10 @@ impl LayoutTask {
let state_changes = document.drain_element_state_changes();
if !needs_dirtying {
- for &(el, state) in state_changes.iter() {
- assert!(!state.is_empty());
- el.note_state_change();
+ for &(el, state_change) in state_changes.iter() {
+ debug_assert!(!state_change.is_empty());
+ let hint = rw_data.stylist.restyle_hint_for_state_change(&el, el.get_state(), state_change);
+ el.note_restyle_hint(hint);
}
}