Z-index should be ignored for non-positioned stacking contexts

When a stacking-context is not positioned, its z-index should be
ignored. This is per CSS 2 9.9.1. The only exception to this is when
the z-index is applied to an element with display: flex | inline-flex.
inline-flex does not appear to be implemented at this time so we only
do this for flex.
This commit is contained in:
Martin Robinson 2015-10-14 15:13:59 -07:00
parent ef1f0479ad
commit f2a66af463
4 changed files with 36 additions and 5 deletions

View file

@ -1331,7 +1331,7 @@ impl FragmentDisplayListBuilding for Fragment {
Arc::new(StackingContext::new(display_list,
&border_box,
&overflow,
self.style().get_box().z_index.number_or_zero(),
self.effective_z_index(),
filters,
self.style().get_effects().mix_blend_mode,
transform,