layout: Fix a couple of issues relating to intrinsic widths of inline

blocks.

* Stop double-counting border and padding for inline-block fragments.
  (Test case: `inline_block_border_intrinsic_size_a.html`.)

* Take clearance into account when determining intrinsic widths of
  blocks containing floats.

Improves the Amazon headers.
This commit is contained in:
Patrick Walton 2015-05-01 18:05:07 -07:00
parent a346f95e68
commit 33087497ac
8 changed files with 118 additions and 8 deletions

View file

@ -882,8 +882,7 @@ impl Fragment {
SpecificFragmentInfo::Generic |
SpecificFragmentInfo::GeneratedContent(_) |
SpecificFragmentInfo::Iframe(_) |
SpecificFragmentInfo::Image(_) |
SpecificFragmentInfo::InlineBlock(_) => {
SpecificFragmentInfo::Image(_) => {
QuantitiesIncludedInIntrinsicInlineSizes::all()
}
SpecificFragmentInfo::Table | SpecificFragmentInfo::TableCell => {
@ -918,7 +917,8 @@ impl Fragment {
SpecificFragmentInfo::ScannedText(_) |
SpecificFragmentInfo::TableColumn(_) |
SpecificFragmentInfo::UnscannedText(_) |
SpecificFragmentInfo::InlineAbsoluteHypothetical(_) => {
SpecificFragmentInfo::InlineAbsoluteHypothetical(_) |
SpecificFragmentInfo::InlineBlock(_) => {
QuantitiesIncludedInIntrinsicInlineSizes::empty()
}
}