Auto merge of #20079 - servo:ZEH-INDEX, r=emilio

Replace IntegerOrAuto with ZIndex

It's its only use.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20079)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-02-20 12:13:40 -05:00 committed by GitHub
commit 05b8ba0a48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 75 additions and 50 deletions

View file

@ -58,7 +58,7 @@ use style::properties::ComputedValues;
use style::selector_parser::RestyleDamage;
use style::servo::restyle_damage::ServoRestyleDamage;
use style::str::char_is_whitespace;
use style::values::{self, Either, Auto};
use style::values::{self, Either};
use style::values::computed::{Length, LengthOrPercentage, LengthOrPercentageOrAuto};
use style::values::computed::counters::ContentItem;
use style::values::generics::box_::VerticalAlign;
@ -2512,7 +2512,7 @@ impl Fragment {
// For absolutely and relatively positioned fragments we only establish a stacking
// context if there is a z-index set.
// See https://www.w3.org/TR/CSS2/visuren.html#z-index
self.style().get_position().z_index != Either::Second(Auto)
!self.style().get_position().z_index.is_auto()
}
// Get the effective z-index of this fragment. Z-indices only apply to positioned element