layout: Implement overflow-x and overflow-y per CSS-OVERFLOW § 3.

Fragmentation is not yet supported.
This commit is contained in:
Patrick Walton 2015-01-07 16:05:10 -08:00 committed by Simon Sapin
parent 417a932e30
commit a82fc00806
9 changed files with 199 additions and 17 deletions

View file

@ -255,6 +255,7 @@ fragment=top != ../html/acid2.html acid2_ref.html
== canvas_lineto_a.html canvas_lineto_ref.html
!= text_decoration_smoke_a.html text_decoration_smoke_ref.html
== hide_after_create.html hide_after_create_ref.html
== overflow_xy_a.html overflow_xy_ref.html
== text_shadow_simple_a.html text_shadow_simple_ref.html
== text_shadow_decorations_a.html text_shadow_decorations_ref.html
== text_shadow_blur_a.html text_shadow_blur_ref.html

View file

@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<!-- Tests that `overflow-x` and `overflow-y` work. -->
<style>
section {
position: absolute;
width: 100px;
height: 100px;
left: 0;
}
#x {
overflow-x: hidden;
overflow-y: visible; /* computes to `auto` */
top: 0;
}
#y {
overflow: hidden;
top: 200px;
}
div {
position: absolute;
width: 200px;
height: 200px;
top: 0;
left: 0;
background: green;
}
</style>
</head>
<body>
<section id=x><div></div></section>
<section id=y><div></div></section>
</body>
</html>

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<head>
<!-- Tests that `overflow-x` and `overflow-y` work. -->
<style>
section {
position: absolute;
left: 0;
background: green;
}
#x {
top: 0;
width: 100px;
height: 100px;
}
#y {
top: 200px;
width: 100px;
height: 100px;
}
</style>
</head>
<body>
<section id=x></section>
<section id=y></section>
</body>
</html>