gfx: Sort layers according to their Z-index value before handing them

off to the compositor.

Closes #7166.
This commit is contained in:
Patrick Walton 2015-08-19 16:30:00 -07:00
parent ac4ca05337
commit 277cbf407e
4 changed files with 57 additions and 0 deletions

View file

@ -191,6 +191,7 @@ experimental == iframe/size_attributes_vertical_writing_mode.html iframe/size_at
== jumpiness_a.html jumpiness_ref.html
== last_child_pseudo_a.html last_child_pseudo_b.html
== last_of_type_pseudo_a.html last_of_type_pseudo_b.html
== layerization_z_order_a.html layerization_z_order_ref.html
== legacy_cellspacing_attribute_a.html border_spacing_ref.html
== legacy_input_size_attribute_override_a.html legacy_input_size_attribute_override_ref.html
== legacy_table_border_attribute_a.html legacy_table_border_attribute_ref.html

View file

@ -0,0 +1,26 @@
<style>
body, html {
margin: 0;
}
#a, #b {
position: absolute;
width: 100px;
height: 100px;
}
#a {
z-index: 2;
background: red;
}
#b {
top: 50px;
left: 50px;
background: green;
}
#c {
position: fixed;
}
</style>
<div id=a></div>
<div id=b></div>
<div id=c></div>

View file

@ -0,0 +1,22 @@
<style>
body, html {
margin: 0;
}
#a, #b {
position: absolute;
width: 100px;
height: 100px;
}
#a {
z-index: 2;
background: red;
}
#b {
top: 50px;
left: 50px;
background: green;
}
</style>
<div id=a></div>
<div id=b></div>