mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #7331 - paulrouget:issue-7316, r=SimonSapin
prevent division by 0 Fix #7316 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7331) <!-- Reviewable:end -->
This commit is contained in:
commit
524b02dbf7
1 changed files with 8 additions and 2 deletions
|
@ -212,8 +212,14 @@ impl FlexFlow {
|
|||
debug!("inline_mode_assign_inline_sizes");
|
||||
|
||||
debug!("content_inline_size = {:?}", content_inline_size);
|
||||
debug!("child_count = {:?}", ImmutableFlowUtils::child_count(self as &Flow) as i32);
|
||||
let even_content_inline_size = content_inline_size / ImmutableFlowUtils::child_count(self as &Flow) as i32;
|
||||
|
||||
let child_count = ImmutableFlowUtils::child_count(self as &Flow) as i32;
|
||||
debug!("child_count = {:?}", child_count);
|
||||
if child_count == 0 {
|
||||
return;
|
||||
}
|
||||
|
||||
let even_content_inline_size = content_inline_size / child_count;
|
||||
|
||||
let inline_size = self.block_flow.base.block_container_inline_size;
|
||||
let container_mode = self.block_flow.base.block_container_writing_mode;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue