Don't expose any AtomicRefCell directly from style traits

This lets us experiment with how we store this data on the DOM side.
This commit is contained in:
Anthony Ramine 2020-04-03 14:34:37 +02:00
parent 4c61baee30
commit 516e8e0aa6
9 changed files with 67 additions and 42 deletions

View file

@ -1472,7 +1472,7 @@ impl LayoutThread {
// If we haven't styled this node yet, we don't need to track a
// restyle.
let style_data = match el.get_data() {
let mut style_data = match el.mutate_data() {
Some(d) => d,
None => {
unsafe { el.unset_snapshot_flags() };
@ -1485,8 +1485,6 @@ impl LayoutThread {
map.insert(el.as_node().opaque(), s);
}
let mut style_data = style_data.borrow_mut();
// Stash the data on the element for processing by the style system.
style_data.hint.insert(restyle.hint.into());
style_data.damage = restyle.damage;