Skip to content

Commit

Permalink
layout: Make intrinsic inline sizes take the value of box-sizing into
Browse files Browse the repository at this point in the history
account.
  • Loading branch information
pcwalton committed Oct 26, 2016
1 parent d222e3e commit ce2e5dc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/layout/fragment.rs
Expand Up @@ -1176,10 +1176,11 @@ impl Fragment {
if let Some(max) = model::specified_or_none(style.max_inline_size(), Au(0)) {
specified = min(specified, max)
}
}

// FIXME(#2261, pcwalton): This won't work well for inlines: is this OK?
let surrounding_inline_size = self.surrounding_intrinsic_inline_size();
if self.style.get_position().box_sizing == box_sizing::T::border_box {
specified -= border_padding
}
}

IntrinsicISizesContribution {
content_intrinsic_sizes: IntrinsicISizes {
Expand Down

0 comments on commit ce2e5dc

Please sign in to comment.