Skip to content

Commit

Permalink
use floats to represent intended fixed position, re-enable position_f…
Browse files Browse the repository at this point in the history
…ixed test
  • Loading branch information
Mitchell Hentges committed May 29, 2016
1 parent d160f8c commit 94a884b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 30 deletions.
3 changes: 0 additions & 3 deletions tests/wpt/mozilla/meta/css/position_fixed_a.html.ini

This file was deleted.

17 changes: 8 additions & 9 deletions tests/wpt/mozilla/tests/css/position_fixed_a.html
Expand Up @@ -5,6 +5,11 @@
.container {
display: block;
background: blue;

/* Use font available on all hosts, instead of system font,
because test reference depends on dynamic sizing, and different
fonts change the required margins. */
font-family: 'Ahem';
}
.fixed_block {
background: green;
Expand All @@ -26,19 +31,13 @@
top: 100px;
bottom: 30px;
}
.stretched_fixed_block {
position: fixed;
background: black;
top: 100px;
bottom: 30px;
}
</style>
</head>
<body>
<div class="container">
<div class="fixed_block"> fixed block </div>
<div class="positioned_fixed_block"> positioned fixed block </div>
<div class="sized_fixed_block"> sized fixed block </div>
<div class="fixed_block"> a </div>
<div class="sized_fixed_block"> b </div>
<div class="positioned_fixed_block"> c </div>
</div>
</body>
</html>
33 changes: 15 additions & 18 deletions tests/wpt/mozilla/tests/css/position_fixed_b.html
Expand Up @@ -4,40 +4,37 @@
.container {
display: block;
background: blue;

font-family: 'Ahem';
}
.fixed_block {
background: green;
position: fixed;
float: left;

/* Servo seems to ignore default margins when position: fixed */
margin-top: -8px;
}
.positioned_fixed_block {
background: yellow;
position: fixed;
top: 50%;
right: 25px;
float: left;
margin-top: 292px;
margin-left: 704px;
}
.sized_fixed_block {
background: red;
position: fixed;
height: 50px;
width: 50px;
left: 5px;
right: 10px;
top: 100px;
bottom: 30px;
}
.stretched_fixed_block {
position: fixed;
background: black;
top: 100px;
bottom: 30px;
float: left;
margin-top: 92px;
margin-left: -19px;
}
</style>
</head>
<body>
<div class="container">
<div class="fixed_block"> fixed block </div>
<div class="positioned_fixed_block"> positioned fixed block </div>
<div class="sized_fixed_block"> sized fixed block </div>
<div class="fixed_block"> a </div>
<div class="sized_fixed_block"> b </div>
<div class="positioned_fixed_block"> c </div>
</div>
</body>
</html>

0 comments on commit 94a884b

Please sign in to comment.