mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Auto merge of #5919 - pcwalton:inline-block-intrinsic-widths, r=mbrubeck
* 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. r? @mbrubeck <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5919) <!-- Reviewable:end -->
This commit is contained in:
commit
7b87085c18
8 changed files with 118 additions and 8 deletions
|
@ -89,6 +89,7 @@ flaky_cpu == append_style_a.html append_style_b.html
|
|||
== first_of_type_pseudo_a.html first_of_type_pseudo_b.html
|
||||
== fixed_width_overrides_child_intrinsic_width_a.html fixed_width_overrides_child_intrinsic_width_ref.html
|
||||
== float_clearance_a.html float_clearance_ref.html
|
||||
== float_clearance_intrinsic_width_a.html float_clearance_intrinsic_width_ref.html
|
||||
== float_intrinsic_height.html float_intrinsic_height_ref.html
|
||||
== float_intrinsic_width_a.html float_intrinsic_width_ref.html
|
||||
== float_right_intrinsic_width_a.html float_right_intrinsic_width_ref.html
|
||||
|
@ -135,6 +136,7 @@ flaky_cpu == append_style_a.html append_style_b.html
|
|||
!= inline_background_a.html inline_background_ref.html
|
||||
== inline_block_baseline_a.html inline_block_baseline_ref.html
|
||||
== inline_block_border_a.html inline_block_border_ref.html
|
||||
== inline_block_border_intrinsic_size_a.html inline_block_border_intrinsic_size_ref.html
|
||||
== inline_block_img_a.html inline_block_img_ref.html
|
||||
== inline_block_margin_a.html inline_block_margin_ref.html
|
||||
== inline_block_min_width.html inline_block_min_width_ref.html
|
||||
|
|
25
tests/ref/float_clearance_intrinsic_width_a.html
Normal file
25
tests/ref/float_clearance_intrinsic_width_a.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
#nav-your-account {
|
||||
background: lightblue;
|
||||
display: inline-block;
|
||||
}
|
||||
.nav-button-title {
|
||||
float: left;
|
||||
clear: both;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<a id="nav-your-account">
|
||||
<div class="nav-button-title">Hello.</div>
|
||||
<div class="nav-button-title">Account</div>
|
||||
<div class="nav-button-title">Account</div>
|
||||
<div class="nav-button-title">Account</div>
|
||||
<div class="nav-button-title">Account</div>
|
||||
<div class="nav-button-title">Account</div>
|
||||
</a>
|
||||
</body>
|
||||
</html>
|
21
tests/ref/float_clearance_intrinsic_width_ref.html
Normal file
21
tests/ref/float_clearance_intrinsic_width_ref.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
#nav-your-account {
|
||||
background: lightblue;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<a id="nav-your-account">
|
||||
<div class="nav-button-title">Hello.</div>
|
||||
<div class="nav-button-title">Account</div>
|
||||
<div class="nav-button-title">Account</div>
|
||||
<div class="nav-button-title">Account</div>
|
||||
<div class="nav-button-title">Account</div>
|
||||
<div class="nav-button-title">Account</div>
|
||||
</a>
|
||||
</body>
|
||||
</html>
|
26
tests/ref/inline_block_border_intrinsic_size_a.html
Normal file
26
tests/ref/inline_block_border_intrinsic_size_a.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
html, body {
|
||||
margin: 0;
|
||||
font-size: 0;
|
||||
line-height: 0;
|
||||
}
|
||||
.nav-button-outer {
|
||||
background: red;
|
||||
display: inline-block;
|
||||
}
|
||||
.nav-down-arrow {
|
||||
display: inline-block;
|
||||
border-style: solid;
|
||||
border-color: black;
|
||||
border-width: 10px 200px 0 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a class="nav-button-outer"><span class="nav-down-arrow"></span></a>
|
||||
</body>
|
||||
</html>
|
25
tests/ref/inline_block_border_intrinsic_size_ref.html
Normal file
25
tests/ref/inline_block_border_intrinsic_size_ref.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
html, body {
|
||||
margin: 0;
|
||||
font-size: 0;
|
||||
line-height: 0;
|
||||
}
|
||||
.nav-button-outer {
|
||||
display: inline-block;
|
||||
}
|
||||
.nav-down-arrow {
|
||||
display: inline-block;
|
||||
border-style: solid;
|
||||
border-color: black;
|
||||
border-width: 10px 200px 0 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a class="nav-button-outer"><span class="nav-down-arrow"></span></a>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue