mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
set HAS_NEWLY_CONSTRUCTED_FLOW flag for reconstructed flow'less inline element
This commit is contained in:
parent
fc549fcd2f
commit
3e73475d5b
1 changed files with 81 additions and 71 deletions
|
@ -1408,9 +1408,12 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let mut set_has_newly_constructed_flow_flag = false;
|
||||||
|
let result = {
|
||||||
let mut style = node.style(self.style_context()).clone();
|
let mut style = node.style(self.style_context()).clone();
|
||||||
let mut data = node.mutate_layout_data().unwrap();
|
let mut data = node.mutate_layout_data().unwrap();
|
||||||
let damage = data.restyle_damage;
|
let damage = data.restyle_damage;
|
||||||
|
|
||||||
match *node.construction_result_mut(&mut *data) {
|
match *node.construction_result_mut(&mut *data) {
|
||||||
ConstructionResult::None => true,
|
ConstructionResult::None => true,
|
||||||
ConstructionResult::Flow(ref mut flow, _) => {
|
ConstructionResult::Flow(ref mut flow, _) => {
|
||||||
|
@ -1419,6 +1422,7 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
|
||||||
if !flow.is_block_flow() {
|
if !flow.is_block_flow() {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
let flow = flow_ref::deref_mut(flow);
|
let flow = flow_ref::deref_mut(flow);
|
||||||
flow::mut_base(flow).restyle_damage.insert(damage);
|
flow::mut_base(flow).restyle_damage.insert(damage);
|
||||||
flow.repair_style_and_bubble_inline_sizes(&style);
|
flow.repair_style_and_bubble_inline_sizes(&style);
|
||||||
|
@ -1481,6 +1485,7 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
|
||||||
properties::modify_style_for_replaced_content(&mut style);
|
properties::modify_style_for_replaced_content(&mut style);
|
||||||
}
|
}
|
||||||
fragment.repair_style(&style);
|
fragment.repair_style(&style);
|
||||||
|
set_has_newly_constructed_flow_flag = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1490,6 +1495,11 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode>
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
if set_has_newly_constructed_flow_flag {
|
||||||
|
node.insert_flags(HAS_NEWLY_CONSTRUCTED_FLOW);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue