layout: Implement inline margins.

Improves the Google SERPs.

We mark `html/rendering/replaced-elements/images/space.html` as failing.
This test tested whether `<img hspace>` and inline margins do the same
thing. Since this was trivially the case before (since we implemented
neither) and now is not, this test now fails.
This commit is contained in:
Patrick Walton 2015-05-04 17:23:29 -07:00
parent 92f46e3149
commit b17b90c8df
10 changed files with 190 additions and 57 deletions

View file

@ -151,6 +151,8 @@ flaky_cpu == append_style_a.html append_style_b.html
# inline_border_a.html inline_border_b.html
== inline_element_border_a.html inline_element_border_ref.html
== inline_hypothetical_box_a.html inline_hypothetical_box_ref.html
== inline_margin_multiple_fragments_a.html inline_margin_multiple_fragments_ref.html
== inline_margins_a.html inline_margins_ref.html
== inline_padding_a.html inline_padding_b.html
# inline_text_align_a.html inline_text_align_b.html
== inline_whitespace_a.html inline_whitespace_ref.html

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<style>
span {
margin-left: 128px;
margin-right: 128px;
}
</style>
</head>
<body>
<span><img src=rust.png><img src=rust.png><img src=rust.png></span>
</body>
</html>

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<style>
#first {
margin-left: 128px;
}
#last {
margin-right: 128px;
}
</style>
</head>
<body>
<span id=first><img src=rust.png></span><img src=rust.png><span id=last><img src=rust.png></span>
</body>
</html>

View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/ahem.css">
<style>
span {
margin-left: 100px;
margin-right: 100px;
}
</style>
</head>
<body>x<span>x</span>x</body>
</html>

View file

@ -0,0 +1,8 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/ahem.css">
</head>
<body>x x x</body>
</html>

View file

@ -0,0 +1,3 @@
[space.html]
type: reftest
expected: FAIL