Force reflow in the sequential fallback of block format context

When reflowing a block format context during the inorder traversal,
propagate restyle damage manually to its children since they were
already reflowed.
This commit is contained in:
Pu Xingyu 2017-04-14 23:44:20 +08:00
parent 56435db820
commit 68f74d5cbe
6 changed files with 25 additions and 14 deletions

View file

@ -43,6 +43,7 @@ use flow_list::FlowList;
use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow};
use fragment::{IS_INLINE_FLEX_ITEM, IS_BLOCK_FLEX_ITEM};
use gfx_traits::print_tree::PrintTree;
use incremental::RelayoutMode;
use layout_debug;
use model::{AdjoiningMargins, CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo, MaybeAuto};
use model::{specified, specified_or_none};
@ -1549,7 +1550,7 @@ impl BlockFlow {
self.assign_inline_sizes(layout_context);
// Re-run layout on our children.
for child in flow::mut_base(self).children.iter_mut() {
sequential::traverse_flow_tree_preorder(child, layout_context);
sequential::traverse_flow_tree_preorder(child, layout_context, RelayoutMode::Force);
}
// Assign our final-final block size.
self.assign_block_size(layout_context);