diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2018-01-04 14:45:54 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2018-01-04 14:45:54 +0100 |
commit | f3ea2481884ec957d7c4f5fa2fc395753f4a574f (patch) | |
tree | 1824830484d93d11d9c01fbe990b0d562c563e8a /components/layout/construct.rs | |
parent | 10a1e1e15f713756ebb38509d619abb3c79a1f25 (diff) | |
download | servo-f3ea2481884ec957d7c4f5fa2fc395753f4a574f.tar.gz servo-f3ea2481884ec957d7c4f5fa2fc395753f4a574f.zip |
style: Remove TNode::set_can_be_fragmented and TNode::can_be_fragmented.
Replace them instead by a computed value flag, the same way as the
IS_IN_DISPLAY_NONE_SUBTREE flag works.
Diffstat (limited to 'components/layout/construct.rs')
-rw-r--r-- | components/layout/construct.rs | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs index 67e61b7dfcb..8efeeb97e83 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -1353,13 +1353,14 @@ impl<'a, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode> return false } - if node.can_be_fragmented() || node.style(self.style_context()).is_multicol() { - return false - } - let mut set_has_newly_constructed_flow_flag = false; let result = { let style = node.style(self.style_context()); + + if style.can_be_fragmented() || style.is_multicol() { + return false + } + let damage = node.restyle_damage(); let mut data = node.mutate_layout_data().unwrap(); @@ -1657,16 +1658,9 @@ impl<ConcreteThreadSafeLayoutNode> NodeUtils for ConcreteThreadSafeLayoutNode } #[inline(always)] - fn set_flow_construction_result(self, mut result: ConstructionResult) { - if self.can_be_fragmented() { - if let ConstructionResult::Flow(ref mut flow, _) = result { - FlowRef::deref_mut(flow).mut_base().flags.insert(FlowFlags::CAN_BE_FRAGMENTED); - } - } - + fn set_flow_construction_result(self, result: ConstructionResult) { let mut layout_data = self.mutate_layout_data().unwrap(); let dst = self.construction_result_mut(&mut *layout_data); - *dst = result; } |