diff options
author | Patrick Walton <pcwalton@mimiga.net> | 2014-10-30 13:27:35 -0700 |
---|---|---|
committer | Patrick Walton <pcwalton@mimiga.net> | 2014-10-31 12:24:40 -0700 |
commit | 08fc7c2795ebfbb53b409ad563e9b1131c99f669 (patch) | |
tree | 7cba247ef4993af57d6106ef6e7265680dab73e6 /components/layout/inline.rs | |
parent | 7712052e137cdefc567d17366b233c060cf2477b (diff) | |
download | servo-08fc7c2795ebfbb53b409ad563e9b1131c99f669.tar.gz servo-08fc7c2795ebfbb53b409ad563e9b1131c99f669.zip |
layout: Make incremental reflow more fine-grained by introducing "reflow
out-of-flow" and "reconstruct flow" damage bits.
This is needed for good performance on the maze solver.
Diffstat (limited to 'components/layout/inline.rs')
-rw-r--r-- | components/layout/inline.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/components/layout/inline.rs b/components/layout/inline.rs index 771e275dee1..83e18ac3668 100644 --- a/components/layout/inline.rs +++ b/components/layout/inline.rs @@ -12,6 +12,7 @@ use flow::{BaseFlow, FlowClass, Flow, InlineFlowClass, MutableFlowUtils}; use flow; use fragment::{Fragment, InlineAbsoluteHypotheticalFragment, InlineBlockFragment}; use fragment::{ScannedTextFragment, ScannedTextFragmentInfo, SplitInfo}; +use incremental::{Reflow, ReflowOutOfFlow}; use layout_debug; use model::IntrinsicISizesContribution; use text; @@ -1111,6 +1112,14 @@ impl Flow for InlineFlow { line.bounds.size.block; } // End of `lines.each` loop. + // Assign block sizes for any inline-block descendants. + for kid in self.base.child_iter() { + if flow::base(kid).flags.is_absolutely_positioned() || kid.is_float() { + continue + } + kid.assign_block_size_for_inorder_child_if_necessary(layout_context); + } + self.base.position.size.block = match self.lines.as_slice().last() { Some(ref last_line) => last_line.bounds.start.b + last_line.bounds.size.block, None => Au(0), @@ -1120,6 +1129,8 @@ impl Flow for InlineFlow { self.base.floats.translate(LogicalSize::new(self.base.writing_mode, Au(0), -self.base.position.size.block)); + + self.base.restyle_damage.remove(ReflowOutOfFlow | Reflow); } fn compute_absolute_position(&mut self) { @@ -1210,6 +1221,8 @@ impl Flow for InlineFlow { self.base.validate_display_list_geometry(); } } + + fn repair_style(&mut self, _: &Arc<ComputedValues>) {} } impl fmt::Show for InlineFlow { |