mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #7011 - pcwalton:inline-margin-intrinsic-size, r=mbrubeck
layout: Take inline margins into account when determining the intrinsic sizes of fragments. Avoids a needless wrapped line in the repository name on GitHub. r? @mbrubeck <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7011) <!-- Reviewable:end -->
This commit is contained in:
commit
da06c2dda0
5 changed files with 49 additions and 1 deletions
|
@ -1340,8 +1340,10 @@ impl Fragment {
|
|||
let border_width = node.style.logical_border_width().inline_start_end();
|
||||
let padding_inline_size =
|
||||
model::padding_from_style(&*node.style, Au(0)).inline_start_end();
|
||||
let margin_inline_size =
|
||||
model::specified_margin_from_style(&*node.style).inline_start_end();
|
||||
result.surrounding_size = result.surrounding_size + border_width +
|
||||
padding_inline_size;
|
||||
padding_inline_size + margin_inline_size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue