layout: Implement partial support for inline absolute containing blocks.

Improves the position of the down arrows on google.com SERPs.
This commit is contained in:
Patrick Walton 2015-08-31 18:56:52 -07:00
parent 9f85370885
commit 676f7014e8
7 changed files with 145 additions and 35 deletions

View file

@ -312,6 +312,7 @@ flaky_cpu == linebreak_simple_a.html linebreak_simple_b.html
== rtl_table_a.html rtl_table_ref.html
== servo_center_a.html servo_center_ref.html
== setattribute_id_restyle_a.html setattribute_id_restyle_b.html
== simple_inline_absolute_containing_block_a.html simple_inline_absolute_containing_block_ref.html
== stacking_context_overflow_a.html stacking_context_overflow_ref.html
== stacking_context_overflow_relative_outline_a.html stacking_context_overflow_relative_outline_ref.html
== style_is_in_doc.html style_is_in_doc_ref.html

View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<style>
main {
position: relative;
padding: 0 16px;
display: inline;
}
section {
position: absolute;
top: 25%;
bottom: 25%;
left: 0;
right: 0;
background: red;
}
#coveritup {
position: relative;
background: white;
top: -20px;
display: inline;
color: white;
}
</style>
<div>There should be no red.<main><section></section></main></div>
<div>There should be no red.<div id=coveritup>XXXXX</div></div>

View file

@ -0,0 +1,4 @@
<!DOCTYPE html>
<div>There should be no red.</div>
<div>There should be no red.</div>