Fix some writing mode mismatch assertions errors.

The rendering is still wrong beause of #2795, but at least we get a rendering.

(This test change is just for readability, it should be equivalent to before.)
This commit is contained in:
Simon Sapin 2014-12-18 17:15:51 +00:00
parent eea49ee1d9
commit 7be30dee8e
3 changed files with 21 additions and 11 deletions

View file

@ -1783,9 +1783,9 @@ impl Flow for BlockFlow {
if !flow::base(kid).flags.contains(IS_ABSOLUTELY_POSITIONED) {
let kid_base = flow::mut_base(kid);
kid_base.stacking_relative_position =
origin_for_children +
(kid_base.position.start + relative_offset).to_physical(writing_mode,
container_size);
origin_for_children
+ kid_base.position.start.to_physical(kid_base.writing_mode, container_size)
+ relative_offset.to_physical(writing_mode);
}
flow::mut_base(kid).absolute_position_info = absolute_position_info_for_children;