Auto merge of #5706 - pcwalton:absolute-clipping-of-own-contents, r=glennw

r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5706)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-04-15 21:04:59 -05:00
commit f7bfea5879
5 changed files with 96 additions and 10 deletions

View file

@ -0,0 +1,42 @@
<!DOCTYPE html>
<html>
<head>
<!-- Tests that clipping is preserved properly for nested `position: absolute` elements. -->
<style>
body, html {
margin: 0;
height: 100%;
}
#map {
position: absolute;
top: 0;
left: 0;
right: 0;
height: 256px;
background: lightblue;
overflow: hidden;
}
#outer {
position: absolute;
left: -128px;
top: -128px;
}
#inner {
position: absolute;
background: navy;
width: 256px;
height: 256px;
left: 128px;
top: 0;
}
</style>
</head>
<body>
<div id=map>
<div id=outer>
<div id=inner></div>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,41 @@
<!DOCTYPE html>
<html>
<head>
<!-- Tests that clipping is preserved properly for nested `position: absolute` elements. -->
<style>
body, html {
margin: 0;
height: 100%;
}
#map {
position: absolute;
top: 0;
left: 0;
right: 0;
height: 256px;
background: lightblue;
}
#outer {
position: absolute;
left: -128px;
top: -128px;
}
#inner {
position: absolute;
background: navy;
width: 256px;
height: 256px;
left: 128px;
top: 0;
}
</style>
</head>
<body>
<div id=map>
<div id=outer>
<div id=inner></div>
</div>
</div>
</body>
</html>

View file

@ -39,6 +39,7 @@ fragment=top != ../html/acid2.html acid2_ref.html
== 2dcontext/transform_a.html 2dcontext/transform_ref.html
== abs_float_pref_width_a.html abs_float_pref_width_ref.html
== absolute_clipping_of_own_contents_a.html absolute_clipping_of_own_contents_ref.html
== absolute_content_height_a.html absolute_content_height_ref.html
== absolute_hypothetical_float_a.html absolute_hypothetical_float_ref.html
== acid1_a.html acid1_b.html