mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
layout: Implement floated list items.
This patch also makes Servo not crash when `generated_containing_block_rect()` is called on a list item (as, for example, GitHub does), and for good measure I added the fix to other flows as well.
This commit is contained in:
parent
c8e68fa45c
commit
d891c677aa
9 changed files with 110 additions and 12 deletions
|
@ -233,3 +233,4 @@ fragment=top != ../html/acid2.html acid2_ref.html
|
|||
== filter_sepia_a.html filter_sepia_ref.html
|
||||
== mix_blend_mode_a.html mix_blend_mode_ref.html
|
||||
!= text_overflow_a.html text_overflow_ref.html
|
||||
== floated_list_item_a.html floated_list_item_ref.html
|
||||
|
|
26
tests/ref/floated_list_item_a.html
Normal file
26
tests/ref/floated_list_item_a.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!-- Tests that list items can be floated. -->
|
||||
<style>
|
||||
ul div {
|
||||
display: list-item;
|
||||
float: left;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
}
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<ul>
|
||||
<div>Foo</div>
|
||||
<div>Bar</div>
|
||||
<div>Baz</div>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
24
tests/ref/floated_list_item_ref.html
Normal file
24
tests/ref/floated_list_item_ref.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!-- Tests that list items can be floated. -->
|
||||
<style>
|
||||
ul div {
|
||||
float: left;
|
||||
margin: 0;
|
||||
}
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<ul>
|
||||
<div>Foo</div>
|
||||
<div>Bar</div>
|
||||
<div>Baz</div>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue