Layout fixes for RTL child flows in LTR parents

...and vice-versa.  This is not a complete fix for all mixed-direction layout
cases, but it fixes enough problems to make some simple test cases pass, like
tha attached reftest.

There are FIXME comments for many of the remaining issues.  In particular,
this does not yet handle RTL layout of fixed/absolute elements.
This commit is contained in:
Matt Brubeck 2015-02-24 16:43:43 -08:00
parent 7cd776b74f
commit 8221bfc3ef
7 changed files with 131 additions and 25 deletions

View file

@ -1118,6 +1118,7 @@ impl Flow for InlineFlow {
debug!("InlineFlow::assign_inline_sizes: floats in: {:?}", self.base.floats);
let inline_size = self.base.block_container_inline_size;
let container_mode = self.base.block_container_writing_mode;
self.base.position.size.inline = inline_size;
{
@ -1137,6 +1138,7 @@ impl Flow for InlineFlow {
let kid_base = flow::mut_base(kid);
kid_base.block_container_inline_size = inline_size;
kid_base.block_container_writing_mode = container_mode;
kid_base.block_container_explicit_block_size = block_container_explicit_block_size;
}
}