set HAS_NEWLY_CONSTRUCTED_FLOW flag for reconstructed flow'less inline element

This commit is contained in:
Alexandrov Sergey 2016-08-23 00:24:20 +03:00
parent fc549fcd2f
commit 3e73475d5b

View file

@ -1408,9 +1408,12 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
return false
}
let mut set_has_newly_constructed_flow_flag = false;
let result = {
let mut style = node.style(self.style_context()).clone();
let mut data = node.mutate_layout_data().unwrap();
let damage = data.restyle_damage;
match *node.construction_result_mut(&mut *data) {
ConstructionResult::None => true,
ConstructionResult::Flow(ref mut flow, _) => {
@ -1419,6 +1422,7 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
if !flow.is_block_flow() {
return false
}
let flow = flow_ref::deref_mut(flow);
flow::mut_base(flow).restyle_damage.insert(damage);
flow.repair_style_and_bubble_inline_sizes(&style);
@ -1481,6 +1485,7 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
properties::modify_style_for_replaced_content(&mut style);
}
fragment.repair_style(&style);
set_has_newly_constructed_flow_flag = true;
}
}
}
@ -1490,6 +1495,11 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
false
}
}
};
if set_has_newly_constructed_flow_flag {
node.insert_flags(HAS_NEWLY_CONSTRUCTED_FLOW);
}
return result;
}
}