mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
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:
parent
4f51710ed3
commit
695b7491fe
10 changed files with 75 additions and 105 deletions
|
@ -5,7 +5,7 @@
|
|||
#![deny(unsafe_code)]
|
||||
|
||||
use app_units::Au;
|
||||
use block::{AbsoluteAssignBSizesTraversal, AbsoluteStoreOverflowTraversal};
|
||||
use block::AbsoluteAssignBSizesTraversal;
|
||||
use context::LayoutContext;
|
||||
use display_list_builder::{FragmentDisplayListBuilding, InlineFlowDisplayListBuilding};
|
||||
use euclid::{Point2D, Rect, Size2D};
|
||||
|
@ -1598,11 +1598,6 @@ impl Flow for InlineFlow {
|
|||
// the block-size of its containing block, which may also be an absolute flow.
|
||||
(&mut *self as &mut Flow).traverse_preorder_absolute_flows(
|
||||
&mut AbsoluteAssignBSizesTraversal(layout_context));
|
||||
// Store overflow for all absolute descendants.
|
||||
(&mut *self as &mut Flow).traverse_postorder_absolute_flows(
|
||||
&mut AbsoluteStoreOverflowTraversal {
|
||||
layout_context: layout_context,
|
||||
});
|
||||
}
|
||||
|
||||
self.base.position.size.block = match self.lines.last() {
|
||||
|
@ -1627,7 +1622,6 @@ impl Flow for InlineFlow {
|
|||
relative_containing_block_size: containing_block_size,
|
||||
relative_containing_block_mode: writing_mode,
|
||||
};
|
||||
(block.as_mut_block() as &mut Flow).late_store_overflow(layout_context);
|
||||
}
|
||||
SpecificFragmentInfo::InlineAbsolute(ref mut info) => {
|
||||
let block = flow_ref::deref_mut(&mut info.flow_ref);
|
||||
|
@ -1635,7 +1629,6 @@ impl Flow for InlineFlow {
|
|||
relative_containing_block_size: containing_block_size,
|
||||
relative_containing_block_mode: writing_mode,
|
||||
};
|
||||
(block.as_mut_block() as &mut Flow).late_store_overflow(layout_context);
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue