mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
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:
parent
eea49ee1d9
commit
7be30dee8e
3 changed files with 21 additions and 11 deletions
|
@ -1191,20 +1191,27 @@ impl<'a> MutableFlowUtils for &'a mut Flow + 'a {
|
|||
let mut overflow = my_position;
|
||||
|
||||
if self.is_block_container() {
|
||||
let writing_mode = base(self).writing_mode;
|
||||
// FIXME(#2795): Get the real container size
|
||||
let container_size = Size2D::zero();
|
||||
for kid in child_iter(self) {
|
||||
if kid.is_store_overflow_delayed() {
|
||||
// Absolute flows will be handled by their CB. If we are
|
||||
// their CB, they will show up in `abs_descendants`.
|
||||
continue;
|
||||
}
|
||||
let mut kid_overflow = base(kid).overflow;
|
||||
let kid_base = base(kid);
|
||||
let mut kid_overflow = kid_base.overflow.convert(
|
||||
kid_base.writing_mode, writing_mode, container_size);
|
||||
kid_overflow = kid_overflow.translate(&my_position.start);
|
||||
overflow = overflow.union(&kid_overflow)
|
||||
}
|
||||
|
||||
// FIXME(#2004, pcwalton): This is wrong for `position: fixed`.
|
||||
for descendant_link in mut_base(self).abs_descendants.iter() {
|
||||
let mut kid_overflow = base(descendant_link).overflow;
|
||||
let kid_base = base(descendant_link);
|
||||
let mut kid_overflow = kid_base.overflow.convert(
|
||||
kid_base.writing_mode, writing_mode, container_size);
|
||||
kid_overflow = kid_overflow.translate(&my_position.start);
|
||||
overflow = overflow.union(&kid_overflow)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue