Change overflow calculation to be calculated after compute_absolute_position.

Also include absolutely positioned elements in the overflow rect calculation.

Fixes #7797.
This commit is contained in:
Glenn Watson 2015-11-03 15:49:52 +10:00
parent 4f51710ed3
commit 695b7491fe
10 changed files with 75 additions and 105 deletions

View file

@ -7,7 +7,7 @@
use construct::FlowConstructor;
use context::LayoutContext;
use css::matching::{ApplicableDeclarations, ElementMatchMethods, MatchMethods, StyleSharingResult};
use flow::{MutableFlowUtils, PostorderFlowTraversal, PreorderFlowTraversal};
use flow::{PostorderFlowTraversal, PreorderFlowTraversal};
use flow::{self, Flow};
use gfx::display_list::OpaqueNode;
use incremental::{self, BUBBLE_ISIZES, REFLOW, REFLOW_OUT_OF_FLOW, RestyleDamage};
@ -360,7 +360,6 @@ impl<'a> PostorderFlowTraversal for AssignBSizesAndStoreOverflow<'a> {
}
flow.assign_block_size(self.layout_context);
flow.early_store_overflow(self.layout_context);
}
#[inline]
@ -378,6 +377,7 @@ impl<'a> PreorderFlowTraversal for ComputeAbsolutePositions<'a> {
#[inline]
fn process(&self, flow: &mut Flow) {
flow.compute_absolute_position(self.layout_context);
flow.store_overflow(self.layout_context);
}
}