mirror of
https://github.com/servo/servo.git
synced 2025-09-27 15:20:09 +01:00
Fix layout of Create Account / Login when rendering Wikipedia.
When calculating the preferred width for a block, accumulate the left and right float widths of children separately, which is then max'ed with the normal flow widths later on. Ref bug #2554 - improves the layout of the top bar.
This commit is contained in:
parent
05f2d0ca83
commit
98caecf7ec
5 changed files with 83 additions and 3 deletions
30
tests/ref/abs_float_pref_width_a.html
Normal file
30
tests/ref/abs_float_pref_width_a.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
@font-face {
|
||||
font-family: 'ahem';
|
||||
src: url(fonts/ahem/ahem.ttf);
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'ahem';
|
||||
font-size: 100px;
|
||||
color: green;
|
||||
}
|
||||
div {
|
||||
position: absolute;
|
||||
left: 100px;
|
||||
}
|
||||
span {
|
||||
float: left;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<span>X</span>
|
||||
<span>X</span>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
21
tests/ref/abs_float_pref_width_ref.html
Normal file
21
tests/ref/abs_float_pref_width_ref.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
div {
|
||||
position: absolute;
|
||||
left: 100px;
|
||||
width: 200px;
|
||||
height: 100px;
|
||||
background-color: green;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -110,3 +110,4 @@ flaky_gpu,flaky_linux == acid2_noscroll.html acid2_ref_broken.html
|
|||
== float_intrinsic_width_a.html float_intrinsic_width_ref.html
|
||||
== float_right_intrinsic_width_a.html float_right_intrinsic_width_ref.html
|
||||
== fixed_width_overrides_child_intrinsic_width_a.html fixed_width_overrides_child_intrinsic_width_ref.html
|
||||
== abs_float_pref_width_a.html abs_float_pref_width_ref.html
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue