mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
auto merge of #2411 : glennw/servo/issue-2335, r=pcwalton
This commit is contained in:
commit
891ca73785
4 changed files with 46 additions and 3 deletions
|
@ -879,9 +879,11 @@ impl<'a> PostorderNodeMutTraversal for FlowConstructor<'a> {
|
|||
|
||||
// Absolutely positioned elements will have computed value of
|
||||
// `float` as 'none' and `display` as per the table.
|
||||
// Currently, for original `display` value of 'inline', the new
|
||||
// `display` value is 'block'.
|
||||
(_, _, position::absolute) | (_, _, position::fixed) => {
|
||||
// Only match here for block items. If an item is absolutely
|
||||
// positioned, but inline we shouldn't try to construct a block
|
||||
// flow here - instead, let it match the inline case
|
||||
// below.
|
||||
(display::block, _, position::absolute) | (_, _, position::fixed) => {
|
||||
node.set_flow_construction_result(self.build_flow_for_block(node))
|
||||
}
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
== position_abs_replaced_simple_a.html position_abs_replaced_simple_b.html
|
||||
== position_abs_static_y_a.html position_abs_static_y_b.html
|
||||
== position_abs_width_percentage_a.html position_abs_width_percentage_b.html
|
||||
== position_abs_pseudo_a.html position_abs_pseudo_b.html
|
||||
# commented out because multiple layers don't work with reftests --pcwalton
|
||||
# == position_fixed_a.html position_fixed_b.html
|
||||
# == position_fixed_simple_a.html position_fixed_simple_b.html
|
||||
|
|
21
src/test/ref/position_abs_pseudo_a.html
Normal file
21
src/test/ref/position_abs_pseudo_a.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
div:before {
|
||||
position: absolute;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-color: red;
|
||||
content: "";
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
19
src/test/ref/position_abs_pseudo_b.html
Normal file
19
src/test/ref/position_abs_pseudo_b.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
.before {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-color: red;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="before">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue