diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2015-12-29 17:44:50 +0000 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2016-01-28 09:42:17 +0100 |
commit | 9abbd1b5d1506b9183915f7c44e436ebd79471ee (patch) | |
tree | 88e20f73a12107d7c1ac454a4ebf2eda4c486666 /components/layout/construct.rs | |
parent | da2b4ab3812605580187373d5fb1ff3c8de78fb4 (diff) | |
download | servo-9abbd1b5d1506b9183915f7c44e436ebd79471ee.tar.gz servo-9abbd1b5d1506b9183915f7c44e436ebd79471ee.zip |
Sequentialize assign_block_size for flows that can be fragmented.
Fragmentation will be intertwined with block size calculation.
Diffstat (limited to 'components/layout/construct.rs')
-rw-r--r-- | components/layout/construct.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/components/layout/construct.rs b/components/layout/construct.rs index 2e05b1ed694..53ddc2bed04 100644 --- a/components/layout/construct.rs +++ b/components/layout/construct.rs @@ -18,7 +18,7 @@ use context::LayoutContext; use data::{HAS_NEWLY_CONSTRUCTED_FLOW, PrivateLayoutData}; use flex::FlexFlow; use floats::FloatKind; -use flow::{MutableFlowUtils, MutableOwnedFlowUtils}; +use flow::{MutableFlowUtils, MutableOwnedFlowUtils, CAN_BE_FRAGMENTED}; use flow::{self, AbsoluteDescendants, Flow, IS_ABSOLUTELY_POSITIONED, ImmutableFlowUtils}; use flow_ref::{self, FlowRef}; use fragment::{CanvasFragmentInfo, ImageFragmentInfo, InlineAbsoluteFragmentInfo}; @@ -1318,7 +1318,7 @@ impl<'a, 'ln, ConcreteThreadSafeLayoutNode: ThreadSafeLayoutNode<'ln>> return false } - if node.in_fragmentation_container() { + if node.can_be_fragmented() || node.style().is_multicol() { return false } @@ -1616,7 +1616,13 @@ impl<'ln, ConcreteThreadSafeLayoutNode> NodeUtils for ConcreteThreadSafeLayoutNo } #[inline(always)] - fn set_flow_construction_result(self, result: ConstructionResult) { + fn set_flow_construction_result(self, mut result: ConstructionResult) { + if self.can_be_fragmented() { + if let ConstructionResult::Flow(ref mut flow, _) = result { + flow::mut_base(flow_ref::deref_mut(flow)).flags.insert(CAN_BE_FRAGMENTED); + } + } + let mut layout_data = self.mutate_layout_data().unwrap(); let dst = self.construction_result_mut(&mut *layout_data); |